cli.js 413 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335
  1. "use strict";
  2. var __getOwnPropNames = Object.getOwnPropertyNames;
  3. var __commonJS = (cb, mod) => function __require() {
  4. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  5. };
  6. // node_modules/core-js/internals/global.js
  7. var require_global = __commonJS({
  8. "node_modules/core-js/internals/global.js"(exports2, module2) {
  9. var check = function(it) {
  10. return it && it.Math == Math && it;
  11. };
  12. module2.exports = check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || check(typeof self == "object" && self) || check(typeof global == "object" && global) || function() {
  13. return this;
  14. }() || Function("return this")();
  15. }
  16. });
  17. // node_modules/core-js/internals/fails.js
  18. var require_fails = __commonJS({
  19. "node_modules/core-js/internals/fails.js"(exports2, module2) {
  20. module2.exports = function(exec) {
  21. try {
  22. return !!exec();
  23. } catch (error) {
  24. return true;
  25. }
  26. };
  27. }
  28. });
  29. // node_modules/core-js/internals/descriptors.js
  30. var require_descriptors = __commonJS({
  31. "node_modules/core-js/internals/descriptors.js"(exports2, module2) {
  32. var fails = require_fails();
  33. module2.exports = !fails(function() {
  34. return Object.defineProperty({}, 1, { get: function() {
  35. return 7;
  36. } })[1] != 7;
  37. });
  38. }
  39. });
  40. // node_modules/core-js/internals/function-bind-native.js
  41. var require_function_bind_native = __commonJS({
  42. "node_modules/core-js/internals/function-bind-native.js"(exports2, module2) {
  43. var fails = require_fails();
  44. module2.exports = !fails(function() {
  45. var test = function() {
  46. }.bind();
  47. return typeof test != "function" || test.hasOwnProperty("prototype");
  48. });
  49. }
  50. });
  51. // node_modules/core-js/internals/function-call.js
  52. var require_function_call = __commonJS({
  53. "node_modules/core-js/internals/function-call.js"(exports2, module2) {
  54. var NATIVE_BIND = require_function_bind_native();
  55. var call = Function.prototype.call;
  56. module2.exports = NATIVE_BIND ? call.bind(call) : function() {
  57. return call.apply(call, arguments);
  58. };
  59. }
  60. });
  61. // node_modules/core-js/internals/object-property-is-enumerable.js
  62. var require_object_property_is_enumerable = __commonJS({
  63. "node_modules/core-js/internals/object-property-is-enumerable.js"(exports2) {
  64. "use strict";
  65. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  66. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  67. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  68. exports2.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  69. var descriptor = getOwnPropertyDescriptor(this, V);
  70. return !!descriptor && descriptor.enumerable;
  71. } : $propertyIsEnumerable;
  72. }
  73. });
  74. // node_modules/core-js/internals/create-property-descriptor.js
  75. var require_create_property_descriptor = __commonJS({
  76. "node_modules/core-js/internals/create-property-descriptor.js"(exports2, module2) {
  77. module2.exports = function(bitmap, value) {
  78. return {
  79. enumerable: !(bitmap & 1),
  80. configurable: !(bitmap & 2),
  81. writable: !(bitmap & 4),
  82. value
  83. };
  84. };
  85. }
  86. });
  87. // node_modules/core-js/internals/function-uncurry-this.js
  88. var require_function_uncurry_this = __commonJS({
  89. "node_modules/core-js/internals/function-uncurry-this.js"(exports2, module2) {
  90. var NATIVE_BIND = require_function_bind_native();
  91. var FunctionPrototype = Function.prototype;
  92. var bind = FunctionPrototype.bind;
  93. var call = FunctionPrototype.call;
  94. var uncurryThis = NATIVE_BIND && bind.bind(call, call);
  95. module2.exports = NATIVE_BIND ? function(fn) {
  96. return fn && uncurryThis(fn);
  97. } : function(fn) {
  98. return fn && function() {
  99. return call.apply(fn, arguments);
  100. };
  101. };
  102. }
  103. });
  104. // node_modules/core-js/internals/classof-raw.js
  105. var require_classof_raw = __commonJS({
  106. "node_modules/core-js/internals/classof-raw.js"(exports2, module2) {
  107. var uncurryThis = require_function_uncurry_this();
  108. var toString = uncurryThis({}.toString);
  109. var stringSlice = uncurryThis("".slice);
  110. module2.exports = function(it) {
  111. return stringSlice(toString(it), 8, -1);
  112. };
  113. }
  114. });
  115. // node_modules/core-js/internals/indexed-object.js
  116. var require_indexed_object = __commonJS({
  117. "node_modules/core-js/internals/indexed-object.js"(exports2, module2) {
  118. var global2 = require_global();
  119. var uncurryThis = require_function_uncurry_this();
  120. var fails = require_fails();
  121. var classof = require_classof_raw();
  122. var Object2 = global2.Object;
  123. var split = uncurryThis("".split);
  124. module2.exports = fails(function() {
  125. return !Object2("z").propertyIsEnumerable(0);
  126. }) ? function(it) {
  127. return classof(it) == "String" ? split(it, "") : Object2(it);
  128. } : Object2;
  129. }
  130. });
  131. // node_modules/core-js/internals/require-object-coercible.js
  132. var require_require_object_coercible = __commonJS({
  133. "node_modules/core-js/internals/require-object-coercible.js"(exports2, module2) {
  134. var global2 = require_global();
  135. var TypeError2 = global2.TypeError;
  136. module2.exports = function(it) {
  137. if (it == void 0)
  138. throw TypeError2("Can't call method on " + it);
  139. return it;
  140. };
  141. }
  142. });
  143. // node_modules/core-js/internals/to-indexed-object.js
  144. var require_to_indexed_object = __commonJS({
  145. "node_modules/core-js/internals/to-indexed-object.js"(exports2, module2) {
  146. var IndexedObject = require_indexed_object();
  147. var requireObjectCoercible = require_require_object_coercible();
  148. module2.exports = function(it) {
  149. return IndexedObject(requireObjectCoercible(it));
  150. };
  151. }
  152. });
  153. // node_modules/core-js/internals/is-callable.js
  154. var require_is_callable = __commonJS({
  155. "node_modules/core-js/internals/is-callable.js"(exports2, module2) {
  156. module2.exports = function(argument) {
  157. return typeof argument == "function";
  158. };
  159. }
  160. });
  161. // node_modules/core-js/internals/is-object.js
  162. var require_is_object = __commonJS({
  163. "node_modules/core-js/internals/is-object.js"(exports2, module2) {
  164. var isCallable = require_is_callable();
  165. module2.exports = function(it) {
  166. return typeof it == "object" ? it !== null : isCallable(it);
  167. };
  168. }
  169. });
  170. // node_modules/core-js/internals/get-built-in.js
  171. var require_get_built_in = __commonJS({
  172. "node_modules/core-js/internals/get-built-in.js"(exports2, module2) {
  173. var global2 = require_global();
  174. var isCallable = require_is_callable();
  175. var aFunction = function(argument) {
  176. return isCallable(argument) ? argument : void 0;
  177. };
  178. module2.exports = function(namespace, method) {
  179. return arguments.length < 2 ? aFunction(global2[namespace]) : global2[namespace] && global2[namespace][method];
  180. };
  181. }
  182. });
  183. // node_modules/core-js/internals/object-is-prototype-of.js
  184. var require_object_is_prototype_of = __commonJS({
  185. "node_modules/core-js/internals/object-is-prototype-of.js"(exports2, module2) {
  186. var uncurryThis = require_function_uncurry_this();
  187. module2.exports = uncurryThis({}.isPrototypeOf);
  188. }
  189. });
  190. // node_modules/core-js/internals/engine-user-agent.js
  191. var require_engine_user_agent = __commonJS({
  192. "node_modules/core-js/internals/engine-user-agent.js"(exports2, module2) {
  193. var getBuiltIn = require_get_built_in();
  194. module2.exports = getBuiltIn("navigator", "userAgent") || "";
  195. }
  196. });
  197. // node_modules/core-js/internals/engine-v8-version.js
  198. var require_engine_v8_version = __commonJS({
  199. "node_modules/core-js/internals/engine-v8-version.js"(exports2, module2) {
  200. var global2 = require_global();
  201. var userAgent = require_engine_user_agent();
  202. var process2 = global2.process;
  203. var Deno = global2.Deno;
  204. var versions = process2 && process2.versions || Deno && Deno.version;
  205. var v8 = versions && versions.v8;
  206. var match;
  207. var version;
  208. if (v8) {
  209. match = v8.split(".");
  210. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  211. }
  212. if (!version && userAgent) {
  213. match = userAgent.match(/Edge\/(\d+)/);
  214. if (!match || match[1] >= 74) {
  215. match = userAgent.match(/Chrome\/(\d+)/);
  216. if (match)
  217. version = +match[1];
  218. }
  219. }
  220. module2.exports = version;
  221. }
  222. });
  223. // node_modules/core-js/internals/native-symbol.js
  224. var require_native_symbol = __commonJS({
  225. "node_modules/core-js/internals/native-symbol.js"(exports2, module2) {
  226. var V8_VERSION = require_engine_v8_version();
  227. var fails = require_fails();
  228. module2.exports = !!Object.getOwnPropertySymbols && !fails(function() {
  229. var symbol = Symbol();
  230. return !String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  231. });
  232. }
  233. });
  234. // node_modules/core-js/internals/use-symbol-as-uid.js
  235. var require_use_symbol_as_uid = __commonJS({
  236. "node_modules/core-js/internals/use-symbol-as-uid.js"(exports2, module2) {
  237. var NATIVE_SYMBOL = require_native_symbol();
  238. module2.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
  239. }
  240. });
  241. // node_modules/core-js/internals/is-symbol.js
  242. var require_is_symbol = __commonJS({
  243. "node_modules/core-js/internals/is-symbol.js"(exports2, module2) {
  244. var global2 = require_global();
  245. var getBuiltIn = require_get_built_in();
  246. var isCallable = require_is_callable();
  247. var isPrototypeOf = require_object_is_prototype_of();
  248. var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
  249. var Object2 = global2.Object;
  250. module2.exports = USE_SYMBOL_AS_UID ? function(it) {
  251. return typeof it == "symbol";
  252. } : function(it) {
  253. var $Symbol = getBuiltIn("Symbol");
  254. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object2(it));
  255. };
  256. }
  257. });
  258. // node_modules/core-js/internals/try-to-string.js
  259. var require_try_to_string = __commonJS({
  260. "node_modules/core-js/internals/try-to-string.js"(exports2, module2) {
  261. var global2 = require_global();
  262. var String2 = global2.String;
  263. module2.exports = function(argument) {
  264. try {
  265. return String2(argument);
  266. } catch (error) {
  267. return "Object";
  268. }
  269. };
  270. }
  271. });
  272. // node_modules/core-js/internals/a-callable.js
  273. var require_a_callable = __commonJS({
  274. "node_modules/core-js/internals/a-callable.js"(exports2, module2) {
  275. var global2 = require_global();
  276. var isCallable = require_is_callable();
  277. var tryToString = require_try_to_string();
  278. var TypeError2 = global2.TypeError;
  279. module2.exports = function(argument) {
  280. if (isCallable(argument))
  281. return argument;
  282. throw TypeError2(tryToString(argument) + " is not a function");
  283. };
  284. }
  285. });
  286. // node_modules/core-js/internals/get-method.js
  287. var require_get_method = __commonJS({
  288. "node_modules/core-js/internals/get-method.js"(exports2, module2) {
  289. var aCallable = require_a_callable();
  290. module2.exports = function(V, P) {
  291. var func = V[P];
  292. return func == null ? void 0 : aCallable(func);
  293. };
  294. }
  295. });
  296. // node_modules/core-js/internals/ordinary-to-primitive.js
  297. var require_ordinary_to_primitive = __commonJS({
  298. "node_modules/core-js/internals/ordinary-to-primitive.js"(exports2, module2) {
  299. var global2 = require_global();
  300. var call = require_function_call();
  301. var isCallable = require_is_callable();
  302. var isObject = require_is_object();
  303. var TypeError2 = global2.TypeError;
  304. module2.exports = function(input, pref) {
  305. var fn, val;
  306. if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
  307. return val;
  308. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input)))
  309. return val;
  310. if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
  311. return val;
  312. throw TypeError2("Can't convert object to primitive value");
  313. };
  314. }
  315. });
  316. // node_modules/core-js/internals/is-pure.js
  317. var require_is_pure = __commonJS({
  318. "node_modules/core-js/internals/is-pure.js"(exports2, module2) {
  319. module2.exports = false;
  320. }
  321. });
  322. // node_modules/core-js/internals/set-global.js
  323. var require_set_global = __commonJS({
  324. "node_modules/core-js/internals/set-global.js"(exports2, module2) {
  325. var global2 = require_global();
  326. var defineProperty = Object.defineProperty;
  327. module2.exports = function(key, value) {
  328. try {
  329. defineProperty(global2, key, { value, configurable: true, writable: true });
  330. } catch (error) {
  331. global2[key] = value;
  332. }
  333. return value;
  334. };
  335. }
  336. });
  337. // node_modules/core-js/internals/shared-store.js
  338. var require_shared_store = __commonJS({
  339. "node_modules/core-js/internals/shared-store.js"(exports2, module2) {
  340. var global2 = require_global();
  341. var setGlobal = require_set_global();
  342. var SHARED = "__core-js_shared__";
  343. var store = global2[SHARED] || setGlobal(SHARED, {});
  344. module2.exports = store;
  345. }
  346. });
  347. // node_modules/core-js/internals/shared.js
  348. var require_shared = __commonJS({
  349. "node_modules/core-js/internals/shared.js"(exports2, module2) {
  350. var IS_PURE = require_is_pure();
  351. var store = require_shared_store();
  352. (module2.exports = function(key, value) {
  353. return store[key] || (store[key] = value !== void 0 ? value : {});
  354. })("versions", []).push({
  355. version: "3.21.1",
  356. mode: IS_PURE ? "pure" : "global",
  357. copyright: "\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",
  358. license: "https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",
  359. source: "https://github.com/zloirock/core-js"
  360. });
  361. }
  362. });
  363. // node_modules/core-js/internals/to-object.js
  364. var require_to_object = __commonJS({
  365. "node_modules/core-js/internals/to-object.js"(exports2, module2) {
  366. var global2 = require_global();
  367. var requireObjectCoercible = require_require_object_coercible();
  368. var Object2 = global2.Object;
  369. module2.exports = function(argument) {
  370. return Object2(requireObjectCoercible(argument));
  371. };
  372. }
  373. });
  374. // node_modules/core-js/internals/has-own-property.js
  375. var require_has_own_property = __commonJS({
  376. "node_modules/core-js/internals/has-own-property.js"(exports2, module2) {
  377. var uncurryThis = require_function_uncurry_this();
  378. var toObject = require_to_object();
  379. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  380. module2.exports = Object.hasOwn || function hasOwn(it, key) {
  381. return hasOwnProperty(toObject(it), key);
  382. };
  383. }
  384. });
  385. // node_modules/core-js/internals/uid.js
  386. var require_uid = __commonJS({
  387. "node_modules/core-js/internals/uid.js"(exports2, module2) {
  388. var uncurryThis = require_function_uncurry_this();
  389. var id = 0;
  390. var postfix = Math.random();
  391. var toString = uncurryThis(1 .toString);
  392. module2.exports = function(key) {
  393. return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
  394. };
  395. }
  396. });
  397. // node_modules/core-js/internals/well-known-symbol.js
  398. var require_well_known_symbol = __commonJS({
  399. "node_modules/core-js/internals/well-known-symbol.js"(exports2, module2) {
  400. var global2 = require_global();
  401. var shared = require_shared();
  402. var hasOwn = require_has_own_property();
  403. var uid = require_uid();
  404. var NATIVE_SYMBOL = require_native_symbol();
  405. var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
  406. var WellKnownSymbolsStore = shared("wks");
  407. var Symbol2 = global2.Symbol;
  408. var symbolFor = Symbol2 && Symbol2["for"];
  409. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
  410. module2.exports = function(name) {
  411. if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == "string")) {
  412. var description = "Symbol." + name;
  413. if (NATIVE_SYMBOL && hasOwn(Symbol2, name)) {
  414. WellKnownSymbolsStore[name] = Symbol2[name];
  415. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  416. WellKnownSymbolsStore[name] = symbolFor(description);
  417. } else {
  418. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  419. }
  420. }
  421. return WellKnownSymbolsStore[name];
  422. };
  423. }
  424. });
  425. // node_modules/core-js/internals/to-primitive.js
  426. var require_to_primitive = __commonJS({
  427. "node_modules/core-js/internals/to-primitive.js"(exports2, module2) {
  428. var global2 = require_global();
  429. var call = require_function_call();
  430. var isObject = require_is_object();
  431. var isSymbol = require_is_symbol();
  432. var getMethod = require_get_method();
  433. var ordinaryToPrimitive = require_ordinary_to_primitive();
  434. var wellKnownSymbol = require_well_known_symbol();
  435. var TypeError2 = global2.TypeError;
  436. var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
  437. module2.exports = function(input, pref) {
  438. if (!isObject(input) || isSymbol(input))
  439. return input;
  440. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  441. var result;
  442. if (exoticToPrim) {
  443. if (pref === void 0)
  444. pref = "default";
  445. result = call(exoticToPrim, input, pref);
  446. if (!isObject(result) || isSymbol(result))
  447. return result;
  448. throw TypeError2("Can't convert object to primitive value");
  449. }
  450. if (pref === void 0)
  451. pref = "number";
  452. return ordinaryToPrimitive(input, pref);
  453. };
  454. }
  455. });
  456. // node_modules/core-js/internals/to-property-key.js
  457. var require_to_property_key = __commonJS({
  458. "node_modules/core-js/internals/to-property-key.js"(exports2, module2) {
  459. var toPrimitive = require_to_primitive();
  460. var isSymbol = require_is_symbol();
  461. module2.exports = function(argument) {
  462. var key = toPrimitive(argument, "string");
  463. return isSymbol(key) ? key : key + "";
  464. };
  465. }
  466. });
  467. // node_modules/core-js/internals/document-create-element.js
  468. var require_document_create_element = __commonJS({
  469. "node_modules/core-js/internals/document-create-element.js"(exports2, module2) {
  470. var global2 = require_global();
  471. var isObject = require_is_object();
  472. var document = global2.document;
  473. var EXISTS = isObject(document) && isObject(document.createElement);
  474. module2.exports = function(it) {
  475. return EXISTS ? document.createElement(it) : {};
  476. };
  477. }
  478. });
  479. // node_modules/core-js/internals/ie8-dom-define.js
  480. var require_ie8_dom_define = __commonJS({
  481. "node_modules/core-js/internals/ie8-dom-define.js"(exports2, module2) {
  482. var DESCRIPTORS = require_descriptors();
  483. var fails = require_fails();
  484. var createElement = require_document_create_element();
  485. module2.exports = !DESCRIPTORS && !fails(function() {
  486. return Object.defineProperty(createElement("div"), "a", {
  487. get: function() {
  488. return 7;
  489. }
  490. }).a != 7;
  491. });
  492. }
  493. });
  494. // node_modules/core-js/internals/object-get-own-property-descriptor.js
  495. var require_object_get_own_property_descriptor = __commonJS({
  496. "node_modules/core-js/internals/object-get-own-property-descriptor.js"(exports2) {
  497. var DESCRIPTORS = require_descriptors();
  498. var call = require_function_call();
  499. var propertyIsEnumerableModule = require_object_property_is_enumerable();
  500. var createPropertyDescriptor = require_create_property_descriptor();
  501. var toIndexedObject = require_to_indexed_object();
  502. var toPropertyKey = require_to_property_key();
  503. var hasOwn = require_has_own_property();
  504. var IE8_DOM_DEFINE = require_ie8_dom_define();
  505. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  506. exports2.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  507. O = toIndexedObject(O);
  508. P = toPropertyKey(P);
  509. if (IE8_DOM_DEFINE)
  510. try {
  511. return $getOwnPropertyDescriptor(O, P);
  512. } catch (error) {
  513. }
  514. if (hasOwn(O, P))
  515. return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  516. };
  517. }
  518. });
  519. // node_modules/core-js/internals/v8-prototype-define-bug.js
  520. var require_v8_prototype_define_bug = __commonJS({
  521. "node_modules/core-js/internals/v8-prototype-define-bug.js"(exports2, module2) {
  522. var DESCRIPTORS = require_descriptors();
  523. var fails = require_fails();
  524. module2.exports = DESCRIPTORS && fails(function() {
  525. return Object.defineProperty(function() {
  526. }, "prototype", {
  527. value: 42,
  528. writable: false
  529. }).prototype != 42;
  530. });
  531. }
  532. });
  533. // node_modules/core-js/internals/an-object.js
  534. var require_an_object = __commonJS({
  535. "node_modules/core-js/internals/an-object.js"(exports2, module2) {
  536. var global2 = require_global();
  537. var isObject = require_is_object();
  538. var String2 = global2.String;
  539. var TypeError2 = global2.TypeError;
  540. module2.exports = function(argument) {
  541. if (isObject(argument))
  542. return argument;
  543. throw TypeError2(String2(argument) + " is not an object");
  544. };
  545. }
  546. });
  547. // node_modules/core-js/internals/object-define-property.js
  548. var require_object_define_property = __commonJS({
  549. "node_modules/core-js/internals/object-define-property.js"(exports2) {
  550. var global2 = require_global();
  551. var DESCRIPTORS = require_descriptors();
  552. var IE8_DOM_DEFINE = require_ie8_dom_define();
  553. var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
  554. var anObject = require_an_object();
  555. var toPropertyKey = require_to_property_key();
  556. var TypeError2 = global2.TypeError;
  557. var $defineProperty = Object.defineProperty;
  558. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  559. var ENUMERABLE = "enumerable";
  560. var CONFIGURABLE = "configurable";
  561. var WRITABLE = "writable";
  562. exports2.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  563. anObject(O);
  564. P = toPropertyKey(P);
  565. anObject(Attributes);
  566. if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  567. var current = $getOwnPropertyDescriptor(O, P);
  568. if (current && current[WRITABLE]) {
  569. O[P] = Attributes.value;
  570. Attributes = {
  571. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  572. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  573. writable: false
  574. };
  575. }
  576. }
  577. return $defineProperty(O, P, Attributes);
  578. } : $defineProperty : function defineProperty(O, P, Attributes) {
  579. anObject(O);
  580. P = toPropertyKey(P);
  581. anObject(Attributes);
  582. if (IE8_DOM_DEFINE)
  583. try {
  584. return $defineProperty(O, P, Attributes);
  585. } catch (error) {
  586. }
  587. if ("get" in Attributes || "set" in Attributes)
  588. throw TypeError2("Accessors not supported");
  589. if ("value" in Attributes)
  590. O[P] = Attributes.value;
  591. return O;
  592. };
  593. }
  594. });
  595. // node_modules/core-js/internals/create-non-enumerable-property.js
  596. var require_create_non_enumerable_property = __commonJS({
  597. "node_modules/core-js/internals/create-non-enumerable-property.js"(exports2, module2) {
  598. var DESCRIPTORS = require_descriptors();
  599. var definePropertyModule = require_object_define_property();
  600. var createPropertyDescriptor = require_create_property_descriptor();
  601. module2.exports = DESCRIPTORS ? function(object, key, value) {
  602. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  603. } : function(object, key, value) {
  604. object[key] = value;
  605. return object;
  606. };
  607. }
  608. });
  609. // node_modules/core-js/internals/inspect-source.js
  610. var require_inspect_source = __commonJS({
  611. "node_modules/core-js/internals/inspect-source.js"(exports2, module2) {
  612. var uncurryThis = require_function_uncurry_this();
  613. var isCallable = require_is_callable();
  614. var store = require_shared_store();
  615. var functionToString = uncurryThis(Function.toString);
  616. if (!isCallable(store.inspectSource)) {
  617. store.inspectSource = function(it) {
  618. return functionToString(it);
  619. };
  620. }
  621. module2.exports = store.inspectSource;
  622. }
  623. });
  624. // node_modules/core-js/internals/native-weak-map.js
  625. var require_native_weak_map = __commonJS({
  626. "node_modules/core-js/internals/native-weak-map.js"(exports2, module2) {
  627. var global2 = require_global();
  628. var isCallable = require_is_callable();
  629. var inspectSource = require_inspect_source();
  630. var WeakMap2 = global2.WeakMap;
  631. module2.exports = isCallable(WeakMap2) && /native code/.test(inspectSource(WeakMap2));
  632. }
  633. });
  634. // node_modules/core-js/internals/shared-key.js
  635. var require_shared_key = __commonJS({
  636. "node_modules/core-js/internals/shared-key.js"(exports2, module2) {
  637. var shared = require_shared();
  638. var uid = require_uid();
  639. var keys = shared("keys");
  640. module2.exports = function(key) {
  641. return keys[key] || (keys[key] = uid(key));
  642. };
  643. }
  644. });
  645. // node_modules/core-js/internals/hidden-keys.js
  646. var require_hidden_keys = __commonJS({
  647. "node_modules/core-js/internals/hidden-keys.js"(exports2, module2) {
  648. module2.exports = {};
  649. }
  650. });
  651. // node_modules/core-js/internals/internal-state.js
  652. var require_internal_state = __commonJS({
  653. "node_modules/core-js/internals/internal-state.js"(exports2, module2) {
  654. var NATIVE_WEAK_MAP = require_native_weak_map();
  655. var global2 = require_global();
  656. var uncurryThis = require_function_uncurry_this();
  657. var isObject = require_is_object();
  658. var createNonEnumerableProperty = require_create_non_enumerable_property();
  659. var hasOwn = require_has_own_property();
  660. var shared = require_shared_store();
  661. var sharedKey = require_shared_key();
  662. var hiddenKeys = require_hidden_keys();
  663. var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
  664. var TypeError2 = global2.TypeError;
  665. var WeakMap2 = global2.WeakMap;
  666. var set;
  667. var get;
  668. var has;
  669. var enforce = function(it) {
  670. return has(it) ? get(it) : set(it, {});
  671. };
  672. var getterFor = function(TYPE) {
  673. return function(it) {
  674. var state;
  675. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  676. throw TypeError2("Incompatible receiver, " + TYPE + " required");
  677. }
  678. return state;
  679. };
  680. };
  681. if (NATIVE_WEAK_MAP || shared.state) {
  682. store = shared.state || (shared.state = new WeakMap2());
  683. wmget = uncurryThis(store.get);
  684. wmhas = uncurryThis(store.has);
  685. wmset = uncurryThis(store.set);
  686. set = function(it, metadata) {
  687. if (wmhas(store, it))
  688. throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
  689. metadata.facade = it;
  690. wmset(store, it, metadata);
  691. return metadata;
  692. };
  693. get = function(it) {
  694. return wmget(store, it) || {};
  695. };
  696. has = function(it) {
  697. return wmhas(store, it);
  698. };
  699. } else {
  700. STATE = sharedKey("state");
  701. hiddenKeys[STATE] = true;
  702. set = function(it, metadata) {
  703. if (hasOwn(it, STATE))
  704. throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
  705. metadata.facade = it;
  706. createNonEnumerableProperty(it, STATE, metadata);
  707. return metadata;
  708. };
  709. get = function(it) {
  710. return hasOwn(it, STATE) ? it[STATE] : {};
  711. };
  712. has = function(it) {
  713. return hasOwn(it, STATE);
  714. };
  715. }
  716. var store;
  717. var wmget;
  718. var wmhas;
  719. var wmset;
  720. var STATE;
  721. module2.exports = {
  722. set,
  723. get,
  724. has,
  725. enforce,
  726. getterFor
  727. };
  728. }
  729. });
  730. // node_modules/core-js/internals/function-name.js
  731. var require_function_name = __commonJS({
  732. "node_modules/core-js/internals/function-name.js"(exports2, module2) {
  733. var DESCRIPTORS = require_descriptors();
  734. var hasOwn = require_has_own_property();
  735. var FunctionPrototype = Function.prototype;
  736. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  737. var EXISTS = hasOwn(FunctionPrototype, "name");
  738. var PROPER = EXISTS && function something() {
  739. }.name === "something";
  740. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, "name").configurable);
  741. module2.exports = {
  742. EXISTS,
  743. PROPER,
  744. CONFIGURABLE
  745. };
  746. }
  747. });
  748. // node_modules/core-js/internals/redefine.js
  749. var require_redefine = __commonJS({
  750. "node_modules/core-js/internals/redefine.js"(exports2, module2) {
  751. var global2 = require_global();
  752. var isCallable = require_is_callable();
  753. var hasOwn = require_has_own_property();
  754. var createNonEnumerableProperty = require_create_non_enumerable_property();
  755. var setGlobal = require_set_global();
  756. var inspectSource = require_inspect_source();
  757. var InternalStateModule = require_internal_state();
  758. var CONFIGURABLE_FUNCTION_NAME = require_function_name().CONFIGURABLE;
  759. var getInternalState = InternalStateModule.get;
  760. var enforceInternalState = InternalStateModule.enforce;
  761. var TEMPLATE = String(String).split("String");
  762. (module2.exports = function(O, key, value, options) {
  763. var unsafe = options ? !!options.unsafe : false;
  764. var simple = options ? !!options.enumerable : false;
  765. var noTargetGet = options ? !!options.noTargetGet : false;
  766. var name = options && options.name !== void 0 ? options.name : key;
  767. var state;
  768. if (isCallable(value)) {
  769. if (String(name).slice(0, 7) === "Symbol(") {
  770. name = "[" + String(name).replace(/^Symbol\(([^)]*)\)/, "$1") + "]";
  771. }
  772. if (!hasOwn(value, "name") || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
  773. createNonEnumerableProperty(value, "name", name);
  774. }
  775. state = enforceInternalState(value);
  776. if (!state.source) {
  777. state.source = TEMPLATE.join(typeof name == "string" ? name : "");
  778. }
  779. }
  780. if (O === global2) {
  781. if (simple)
  782. O[key] = value;
  783. else
  784. setGlobal(key, value);
  785. return;
  786. } else if (!unsafe) {
  787. delete O[key];
  788. } else if (!noTargetGet && O[key]) {
  789. simple = true;
  790. }
  791. if (simple)
  792. O[key] = value;
  793. else
  794. createNonEnumerableProperty(O, key, value);
  795. })(Function.prototype, "toString", function toString() {
  796. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  797. });
  798. }
  799. });
  800. // node_modules/core-js/internals/to-integer-or-infinity.js
  801. var require_to_integer_or_infinity = __commonJS({
  802. "node_modules/core-js/internals/to-integer-or-infinity.js"(exports2, module2) {
  803. var ceil = Math.ceil;
  804. var floor = Math.floor;
  805. module2.exports = function(argument) {
  806. var number = +argument;
  807. return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
  808. };
  809. }
  810. });
  811. // node_modules/core-js/internals/to-absolute-index.js
  812. var require_to_absolute_index = __commonJS({
  813. "node_modules/core-js/internals/to-absolute-index.js"(exports2, module2) {
  814. var toIntegerOrInfinity = require_to_integer_or_infinity();
  815. var max = Math.max;
  816. var min = Math.min;
  817. module2.exports = function(index, length) {
  818. var integer = toIntegerOrInfinity(index);
  819. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  820. };
  821. }
  822. });
  823. // node_modules/core-js/internals/to-length.js
  824. var require_to_length = __commonJS({
  825. "node_modules/core-js/internals/to-length.js"(exports2, module2) {
  826. var toIntegerOrInfinity = require_to_integer_or_infinity();
  827. var min = Math.min;
  828. module2.exports = function(argument) {
  829. return argument > 0 ? min(toIntegerOrInfinity(argument), 9007199254740991) : 0;
  830. };
  831. }
  832. });
  833. // node_modules/core-js/internals/length-of-array-like.js
  834. var require_length_of_array_like = __commonJS({
  835. "node_modules/core-js/internals/length-of-array-like.js"(exports2, module2) {
  836. var toLength = require_to_length();
  837. module2.exports = function(obj) {
  838. return toLength(obj.length);
  839. };
  840. }
  841. });
  842. // node_modules/core-js/internals/array-includes.js
  843. var require_array_includes = __commonJS({
  844. "node_modules/core-js/internals/array-includes.js"(exports2, module2) {
  845. var toIndexedObject = require_to_indexed_object();
  846. var toAbsoluteIndex = require_to_absolute_index();
  847. var lengthOfArrayLike = require_length_of_array_like();
  848. var createMethod = function(IS_INCLUDES) {
  849. return function($this, el, fromIndex) {
  850. var O = toIndexedObject($this);
  851. var length = lengthOfArrayLike(O);
  852. var index = toAbsoluteIndex(fromIndex, length);
  853. var value;
  854. if (IS_INCLUDES && el != el)
  855. while (length > index) {
  856. value = O[index++];
  857. if (value != value)
  858. return true;
  859. }
  860. else
  861. for (; length > index; index++) {
  862. if ((IS_INCLUDES || index in O) && O[index] === el)
  863. return IS_INCLUDES || index || 0;
  864. }
  865. return !IS_INCLUDES && -1;
  866. };
  867. };
  868. module2.exports = {
  869. includes: createMethod(true),
  870. indexOf: createMethod(false)
  871. };
  872. }
  873. });
  874. // node_modules/core-js/internals/object-keys-internal.js
  875. var require_object_keys_internal = __commonJS({
  876. "node_modules/core-js/internals/object-keys-internal.js"(exports2, module2) {
  877. var uncurryThis = require_function_uncurry_this();
  878. var hasOwn = require_has_own_property();
  879. var toIndexedObject = require_to_indexed_object();
  880. var indexOf = require_array_includes().indexOf;
  881. var hiddenKeys = require_hidden_keys();
  882. var push = uncurryThis([].push);
  883. module2.exports = function(object, names) {
  884. var O = toIndexedObject(object);
  885. var i = 0;
  886. var result = [];
  887. var key;
  888. for (key in O)
  889. !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  890. while (names.length > i)
  891. if (hasOwn(O, key = names[i++])) {
  892. ~indexOf(result, key) || push(result, key);
  893. }
  894. return result;
  895. };
  896. }
  897. });
  898. // node_modules/core-js/internals/enum-bug-keys.js
  899. var require_enum_bug_keys = __commonJS({
  900. "node_modules/core-js/internals/enum-bug-keys.js"(exports2, module2) {
  901. module2.exports = [
  902. "constructor",
  903. "hasOwnProperty",
  904. "isPrototypeOf",
  905. "propertyIsEnumerable",
  906. "toLocaleString",
  907. "toString",
  908. "valueOf"
  909. ];
  910. }
  911. });
  912. // node_modules/core-js/internals/object-get-own-property-names.js
  913. var require_object_get_own_property_names = __commonJS({
  914. "node_modules/core-js/internals/object-get-own-property-names.js"(exports2) {
  915. var internalObjectKeys = require_object_keys_internal();
  916. var enumBugKeys = require_enum_bug_keys();
  917. var hiddenKeys = enumBugKeys.concat("length", "prototype");
  918. exports2.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  919. return internalObjectKeys(O, hiddenKeys);
  920. };
  921. }
  922. });
  923. // node_modules/core-js/internals/object-get-own-property-symbols.js
  924. var require_object_get_own_property_symbols = __commonJS({
  925. "node_modules/core-js/internals/object-get-own-property-symbols.js"(exports2) {
  926. exports2.f = Object.getOwnPropertySymbols;
  927. }
  928. });
  929. // node_modules/core-js/internals/own-keys.js
  930. var require_own_keys = __commonJS({
  931. "node_modules/core-js/internals/own-keys.js"(exports2, module2) {
  932. var getBuiltIn = require_get_built_in();
  933. var uncurryThis = require_function_uncurry_this();
  934. var getOwnPropertyNamesModule = require_object_get_own_property_names();
  935. var getOwnPropertySymbolsModule = require_object_get_own_property_symbols();
  936. var anObject = require_an_object();
  937. var concat = uncurryThis([].concat);
  938. module2.exports = getBuiltIn("Reflect", "ownKeys") || function ownKeys(it) {
  939. var keys = getOwnPropertyNamesModule.f(anObject(it));
  940. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  941. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  942. };
  943. }
  944. });
  945. // node_modules/core-js/internals/copy-constructor-properties.js
  946. var require_copy_constructor_properties = __commonJS({
  947. "node_modules/core-js/internals/copy-constructor-properties.js"(exports2, module2) {
  948. var hasOwn = require_has_own_property();
  949. var ownKeys = require_own_keys();
  950. var getOwnPropertyDescriptorModule = require_object_get_own_property_descriptor();
  951. var definePropertyModule = require_object_define_property();
  952. module2.exports = function(target, source, exceptions) {
  953. var keys = ownKeys(source);
  954. var defineProperty = definePropertyModule.f;
  955. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  956. for (var i = 0; i < keys.length; i++) {
  957. var key = keys[i];
  958. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  959. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  960. }
  961. }
  962. };
  963. }
  964. });
  965. // node_modules/core-js/internals/is-forced.js
  966. var require_is_forced = __commonJS({
  967. "node_modules/core-js/internals/is-forced.js"(exports2, module2) {
  968. var fails = require_fails();
  969. var isCallable = require_is_callable();
  970. var replacement = /#|\.prototype\./;
  971. var isForced = function(feature, detection) {
  972. var value = data[normalize(feature)];
  973. return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
  974. };
  975. var normalize = isForced.normalize = function(string) {
  976. return String(string).replace(replacement, ".").toLowerCase();
  977. };
  978. var data = isForced.data = {};
  979. var NATIVE = isForced.NATIVE = "N";
  980. var POLYFILL = isForced.POLYFILL = "P";
  981. module2.exports = isForced;
  982. }
  983. });
  984. // node_modules/core-js/internals/export.js
  985. var require_export = __commonJS({
  986. "node_modules/core-js/internals/export.js"(exports2, module2) {
  987. var global2 = require_global();
  988. var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
  989. var createNonEnumerableProperty = require_create_non_enumerable_property();
  990. var redefine = require_redefine();
  991. var setGlobal = require_set_global();
  992. var copyConstructorProperties = require_copy_constructor_properties();
  993. var isForced = require_is_forced();
  994. module2.exports = function(options, source) {
  995. var TARGET = options.target;
  996. var GLOBAL = options.global;
  997. var STATIC = options.stat;
  998. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  999. if (GLOBAL) {
  1000. target = global2;
  1001. } else if (STATIC) {
  1002. target = global2[TARGET] || setGlobal(TARGET, {});
  1003. } else {
  1004. target = (global2[TARGET] || {}).prototype;
  1005. }
  1006. if (target)
  1007. for (key in source) {
  1008. sourceProperty = source[key];
  1009. if (options.noTargetGet) {
  1010. descriptor = getOwnPropertyDescriptor(target, key);
  1011. targetProperty = descriptor && descriptor.value;
  1012. } else
  1013. targetProperty = target[key];
  1014. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
  1015. if (!FORCED && targetProperty !== void 0) {
  1016. if (typeof sourceProperty == typeof targetProperty)
  1017. continue;
  1018. copyConstructorProperties(sourceProperty, targetProperty);
  1019. }
  1020. if (options.sham || targetProperty && targetProperty.sham) {
  1021. createNonEnumerableProperty(sourceProperty, "sham", true);
  1022. }
  1023. redefine(target, key, sourceProperty, options);
  1024. }
  1025. };
  1026. }
  1027. });
  1028. // node_modules/core-js/internals/function-bind-context.js
  1029. var require_function_bind_context = __commonJS({
  1030. "node_modules/core-js/internals/function-bind-context.js"(exports2, module2) {
  1031. var uncurryThis = require_function_uncurry_this();
  1032. var aCallable = require_a_callable();
  1033. var NATIVE_BIND = require_function_bind_native();
  1034. var bind = uncurryThis(uncurryThis.bind);
  1035. module2.exports = function(fn, that) {
  1036. aCallable(fn);
  1037. return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
  1038. return fn.apply(that, arguments);
  1039. };
  1040. };
  1041. }
  1042. });
  1043. // node_modules/core-js/internals/iterators.js
  1044. var require_iterators = __commonJS({
  1045. "node_modules/core-js/internals/iterators.js"(exports2, module2) {
  1046. module2.exports = {};
  1047. }
  1048. });
  1049. // node_modules/core-js/internals/is-array-iterator-method.js
  1050. var require_is_array_iterator_method = __commonJS({
  1051. "node_modules/core-js/internals/is-array-iterator-method.js"(exports2, module2) {
  1052. var wellKnownSymbol = require_well_known_symbol();
  1053. var Iterators = require_iterators();
  1054. var ITERATOR = wellKnownSymbol("iterator");
  1055. var ArrayPrototype = Array.prototype;
  1056. module2.exports = function(it) {
  1057. return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  1058. };
  1059. }
  1060. });
  1061. // node_modules/core-js/internals/to-string-tag-support.js
  1062. var require_to_string_tag_support = __commonJS({
  1063. "node_modules/core-js/internals/to-string-tag-support.js"(exports2, module2) {
  1064. var wellKnownSymbol = require_well_known_symbol();
  1065. var TO_STRING_TAG = wellKnownSymbol("toStringTag");
  1066. var test = {};
  1067. test[TO_STRING_TAG] = "z";
  1068. module2.exports = String(test) === "[object z]";
  1069. }
  1070. });
  1071. // node_modules/core-js/internals/classof.js
  1072. var require_classof = __commonJS({
  1073. "node_modules/core-js/internals/classof.js"(exports2, module2) {
  1074. var global2 = require_global();
  1075. var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
  1076. var isCallable = require_is_callable();
  1077. var classofRaw = require_classof_raw();
  1078. var wellKnownSymbol = require_well_known_symbol();
  1079. var TO_STRING_TAG = wellKnownSymbol("toStringTag");
  1080. var Object2 = global2.Object;
  1081. var CORRECT_ARGUMENTS = classofRaw(function() {
  1082. return arguments;
  1083. }()) == "Arguments";
  1084. var tryGet = function(it, key) {
  1085. try {
  1086. return it[key];
  1087. } catch (error) {
  1088. }
  1089. };
  1090. module2.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
  1091. var O, tag, result;
  1092. return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag = tryGet(O = Object2(it), TO_STRING_TAG)) == "string" ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == "Object" && isCallable(O.callee) ? "Arguments" : result;
  1093. };
  1094. }
  1095. });
  1096. // node_modules/core-js/internals/get-iterator-method.js
  1097. var require_get_iterator_method = __commonJS({
  1098. "node_modules/core-js/internals/get-iterator-method.js"(exports2, module2) {
  1099. var classof = require_classof();
  1100. var getMethod = require_get_method();
  1101. var Iterators = require_iterators();
  1102. var wellKnownSymbol = require_well_known_symbol();
  1103. var ITERATOR = wellKnownSymbol("iterator");
  1104. module2.exports = function(it) {
  1105. if (it != void 0)
  1106. return getMethod(it, ITERATOR) || getMethod(it, "@@iterator") || Iterators[classof(it)];
  1107. };
  1108. }
  1109. });
  1110. // node_modules/core-js/internals/get-iterator.js
  1111. var require_get_iterator = __commonJS({
  1112. "node_modules/core-js/internals/get-iterator.js"(exports2, module2) {
  1113. var global2 = require_global();
  1114. var call = require_function_call();
  1115. var aCallable = require_a_callable();
  1116. var anObject = require_an_object();
  1117. var tryToString = require_try_to_string();
  1118. var getIteratorMethod = require_get_iterator_method();
  1119. var TypeError2 = global2.TypeError;
  1120. module2.exports = function(argument, usingIterator) {
  1121. var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
  1122. if (aCallable(iteratorMethod))
  1123. return anObject(call(iteratorMethod, argument));
  1124. throw TypeError2(tryToString(argument) + " is not iterable");
  1125. };
  1126. }
  1127. });
  1128. // node_modules/core-js/internals/iterator-close.js
  1129. var require_iterator_close = __commonJS({
  1130. "node_modules/core-js/internals/iterator-close.js"(exports2, module2) {
  1131. var call = require_function_call();
  1132. var anObject = require_an_object();
  1133. var getMethod = require_get_method();
  1134. module2.exports = function(iterator, kind, value) {
  1135. var innerResult, innerError;
  1136. anObject(iterator);
  1137. try {
  1138. innerResult = getMethod(iterator, "return");
  1139. if (!innerResult) {
  1140. if (kind === "throw")
  1141. throw value;
  1142. return value;
  1143. }
  1144. innerResult = call(innerResult, iterator);
  1145. } catch (error) {
  1146. innerError = true;
  1147. innerResult = error;
  1148. }
  1149. if (kind === "throw")
  1150. throw value;
  1151. if (innerError)
  1152. throw innerResult;
  1153. anObject(innerResult);
  1154. return value;
  1155. };
  1156. }
  1157. });
  1158. // node_modules/core-js/internals/iterate.js
  1159. var require_iterate = __commonJS({
  1160. "node_modules/core-js/internals/iterate.js"(exports2, module2) {
  1161. var global2 = require_global();
  1162. var bind = require_function_bind_context();
  1163. var call = require_function_call();
  1164. var anObject = require_an_object();
  1165. var tryToString = require_try_to_string();
  1166. var isArrayIteratorMethod = require_is_array_iterator_method();
  1167. var lengthOfArrayLike = require_length_of_array_like();
  1168. var isPrototypeOf = require_object_is_prototype_of();
  1169. var getIterator = require_get_iterator();
  1170. var getIteratorMethod = require_get_iterator_method();
  1171. var iteratorClose = require_iterator_close();
  1172. var TypeError2 = global2.TypeError;
  1173. var Result = function(stopped, result) {
  1174. this.stopped = stopped;
  1175. this.result = result;
  1176. };
  1177. var ResultPrototype = Result.prototype;
  1178. module2.exports = function(iterable, unboundFunction, options) {
  1179. var that = options && options.that;
  1180. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  1181. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  1182. var INTERRUPTED = !!(options && options.INTERRUPTED);
  1183. var fn = bind(unboundFunction, that);
  1184. var iterator, iterFn, index, length, result, next, step;
  1185. var stop = function(condition) {
  1186. if (iterator)
  1187. iteratorClose(iterator, "normal", condition);
  1188. return new Result(true, condition);
  1189. };
  1190. var callFn = function(value) {
  1191. if (AS_ENTRIES) {
  1192. anObject(value);
  1193. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  1194. }
  1195. return INTERRUPTED ? fn(value, stop) : fn(value);
  1196. };
  1197. if (IS_ITERATOR) {
  1198. iterator = iterable;
  1199. } else {
  1200. iterFn = getIteratorMethod(iterable);
  1201. if (!iterFn)
  1202. throw TypeError2(tryToString(iterable) + " is not iterable");
  1203. if (isArrayIteratorMethod(iterFn)) {
  1204. for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
  1205. result = callFn(iterable[index]);
  1206. if (result && isPrototypeOf(ResultPrototype, result))
  1207. return result;
  1208. }
  1209. return new Result(false);
  1210. }
  1211. iterator = getIterator(iterable, iterFn);
  1212. }
  1213. next = iterator.next;
  1214. while (!(step = call(next, iterator)).done) {
  1215. try {
  1216. result = callFn(step.value);
  1217. } catch (error) {
  1218. iteratorClose(iterator, "throw", error);
  1219. }
  1220. if (typeof result == "object" && result && isPrototypeOf(ResultPrototype, result))
  1221. return result;
  1222. }
  1223. return new Result(false);
  1224. };
  1225. }
  1226. });
  1227. // node_modules/core-js/internals/create-property.js
  1228. var require_create_property = __commonJS({
  1229. "node_modules/core-js/internals/create-property.js"(exports2, module2) {
  1230. "use strict";
  1231. var toPropertyKey = require_to_property_key();
  1232. var definePropertyModule = require_object_define_property();
  1233. var createPropertyDescriptor = require_create_property_descriptor();
  1234. module2.exports = function(object, key, value) {
  1235. var propertyKey = toPropertyKey(key);
  1236. if (propertyKey in object)
  1237. definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  1238. else
  1239. object[propertyKey] = value;
  1240. };
  1241. }
  1242. });
  1243. // node_modules/core-js/modules/es.object.from-entries.js
  1244. var require_es_object_from_entries = __commonJS({
  1245. "node_modules/core-js/modules/es.object.from-entries.js"() {
  1246. var $ = require_export();
  1247. var iterate = require_iterate();
  1248. var createProperty = require_create_property();
  1249. $({ target: "Object", stat: true }, {
  1250. fromEntries: function fromEntries(iterable) {
  1251. var obj = {};
  1252. iterate(iterable, function(k, v) {
  1253. createProperty(obj, k, v);
  1254. }, { AS_ENTRIES: true });
  1255. return obj;
  1256. }
  1257. });
  1258. }
  1259. });
  1260. // node_modules/core-js/internals/is-array.js
  1261. var require_is_array = __commonJS({
  1262. "node_modules/core-js/internals/is-array.js"(exports2, module2) {
  1263. var classof = require_classof_raw();
  1264. module2.exports = Array.isArray || function isArray(argument) {
  1265. return classof(argument) == "Array";
  1266. };
  1267. }
  1268. });
  1269. // node_modules/core-js/internals/flatten-into-array.js
  1270. var require_flatten_into_array = __commonJS({
  1271. "node_modules/core-js/internals/flatten-into-array.js"(exports2, module2) {
  1272. "use strict";
  1273. var global2 = require_global();
  1274. var isArray = require_is_array();
  1275. var lengthOfArrayLike = require_length_of_array_like();
  1276. var bind = require_function_bind_context();
  1277. var TypeError2 = global2.TypeError;
  1278. var flattenIntoArray = function(target, original, source, sourceLen, start, depth, mapper, thisArg) {
  1279. var targetIndex = start;
  1280. var sourceIndex = 0;
  1281. var mapFn = mapper ? bind(mapper, thisArg) : false;
  1282. var element, elementLen;
  1283. while (sourceIndex < sourceLen) {
  1284. if (sourceIndex in source) {
  1285. element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
  1286. if (depth > 0 && isArray(element)) {
  1287. elementLen = lengthOfArrayLike(element);
  1288. targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
  1289. } else {
  1290. if (targetIndex >= 9007199254740991)
  1291. throw TypeError2("Exceed the acceptable array length");
  1292. target[targetIndex] = element;
  1293. }
  1294. targetIndex++;
  1295. }
  1296. sourceIndex++;
  1297. }
  1298. return targetIndex;
  1299. };
  1300. module2.exports = flattenIntoArray;
  1301. }
  1302. });
  1303. // node_modules/core-js/internals/is-constructor.js
  1304. var require_is_constructor = __commonJS({
  1305. "node_modules/core-js/internals/is-constructor.js"(exports2, module2) {
  1306. var uncurryThis = require_function_uncurry_this();
  1307. var fails = require_fails();
  1308. var isCallable = require_is_callable();
  1309. var classof = require_classof();
  1310. var getBuiltIn = require_get_built_in();
  1311. var inspectSource = require_inspect_source();
  1312. var noop = function() {
  1313. };
  1314. var empty = [];
  1315. var construct = getBuiltIn("Reflect", "construct");
  1316. var constructorRegExp = /^\s*(?:class|function)\b/;
  1317. var exec = uncurryThis(constructorRegExp.exec);
  1318. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1319. var isConstructorModern = function isConstructor(argument) {
  1320. if (!isCallable(argument))
  1321. return false;
  1322. try {
  1323. construct(noop, empty, argument);
  1324. return true;
  1325. } catch (error) {
  1326. return false;
  1327. }
  1328. };
  1329. var isConstructorLegacy = function isConstructor(argument) {
  1330. if (!isCallable(argument))
  1331. return false;
  1332. switch (classof(argument)) {
  1333. case "AsyncFunction":
  1334. case "GeneratorFunction":
  1335. case "AsyncGeneratorFunction":
  1336. return false;
  1337. }
  1338. try {
  1339. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1340. } catch (error) {
  1341. return true;
  1342. }
  1343. };
  1344. isConstructorLegacy.sham = true;
  1345. module2.exports = !construct || fails(function() {
  1346. var called;
  1347. return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
  1348. called = true;
  1349. }) || called;
  1350. }) ? isConstructorLegacy : isConstructorModern;
  1351. }
  1352. });
  1353. // node_modules/core-js/internals/array-species-constructor.js
  1354. var require_array_species_constructor = __commonJS({
  1355. "node_modules/core-js/internals/array-species-constructor.js"(exports2, module2) {
  1356. var global2 = require_global();
  1357. var isArray = require_is_array();
  1358. var isConstructor = require_is_constructor();
  1359. var isObject = require_is_object();
  1360. var wellKnownSymbol = require_well_known_symbol();
  1361. var SPECIES = wellKnownSymbol("species");
  1362. var Array2 = global2.Array;
  1363. module2.exports = function(originalArray) {
  1364. var C;
  1365. if (isArray(originalArray)) {
  1366. C = originalArray.constructor;
  1367. if (isConstructor(C) && (C === Array2 || isArray(C.prototype)))
  1368. C = void 0;
  1369. else if (isObject(C)) {
  1370. C = C[SPECIES];
  1371. if (C === null)
  1372. C = void 0;
  1373. }
  1374. }
  1375. return C === void 0 ? Array2 : C;
  1376. };
  1377. }
  1378. });
  1379. // node_modules/core-js/internals/array-species-create.js
  1380. var require_array_species_create = __commonJS({
  1381. "node_modules/core-js/internals/array-species-create.js"(exports2, module2) {
  1382. var arraySpeciesConstructor = require_array_species_constructor();
  1383. module2.exports = function(originalArray, length) {
  1384. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1385. };
  1386. }
  1387. });
  1388. // node_modules/core-js/modules/es.array.flat-map.js
  1389. var require_es_array_flat_map = __commonJS({
  1390. "node_modules/core-js/modules/es.array.flat-map.js"() {
  1391. "use strict";
  1392. var $ = require_export();
  1393. var flattenIntoArray = require_flatten_into_array();
  1394. var aCallable = require_a_callable();
  1395. var toObject = require_to_object();
  1396. var lengthOfArrayLike = require_length_of_array_like();
  1397. var arraySpeciesCreate = require_array_species_create();
  1398. $({ target: "Array", proto: true }, {
  1399. flatMap: function flatMap(callbackfn) {
  1400. var O = toObject(this);
  1401. var sourceLen = lengthOfArrayLike(O);
  1402. var A;
  1403. aCallable(callbackfn);
  1404. A = arraySpeciesCreate(O, 0);
  1405. A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : void 0);
  1406. return A;
  1407. }
  1408. });
  1409. }
  1410. });
  1411. // node_modules/core-js/modules/es.array.flat.js
  1412. var require_es_array_flat = __commonJS({
  1413. "node_modules/core-js/modules/es.array.flat.js"() {
  1414. "use strict";
  1415. var $ = require_export();
  1416. var flattenIntoArray = require_flatten_into_array();
  1417. var toObject = require_to_object();
  1418. var lengthOfArrayLike = require_length_of_array_like();
  1419. var toIntegerOrInfinity = require_to_integer_or_infinity();
  1420. var arraySpeciesCreate = require_array_species_create();
  1421. $({ target: "Array", proto: true }, {
  1422. flat: function flat() {
  1423. var depthArg = arguments.length ? arguments[0] : void 0;
  1424. var O = toObject(this);
  1425. var sourceLen = lengthOfArrayLike(O);
  1426. var A = arraySpeciesCreate(O, 0);
  1427. A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === void 0 ? 1 : toIntegerOrInfinity(depthArg));
  1428. return A;
  1429. }
  1430. });
  1431. }
  1432. });
  1433. // dist/cli.js
  1434. require_es_object_from_entries();
  1435. require_es_array_flat_map();
  1436. require_es_array_flat();
  1437. var __getOwnPropNames2 = Object.getOwnPropertyNames;
  1438. var __commonJS2 = (cb, mod) => function __require() {
  1439. return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = {
  1440. exports: {}
  1441. }).exports, mod), mod.exports;
  1442. };
  1443. var require_fast_json_stable_stringify = __commonJS2({
  1444. "node_modules/fast-json-stable-stringify/index.js"(exports2, module2) {
  1445. "use strict";
  1446. module2.exports = function(data, opts) {
  1447. if (!opts)
  1448. opts = {};
  1449. if (typeof opts === "function")
  1450. opts = {
  1451. cmp: opts
  1452. };
  1453. var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false;
  1454. var cmp = opts.cmp && function(f) {
  1455. return function(node) {
  1456. return function(a, b) {
  1457. var aobj = {
  1458. key: a,
  1459. value: node[a]
  1460. };
  1461. var bobj = {
  1462. key: b,
  1463. value: node[b]
  1464. };
  1465. return f(aobj, bobj);
  1466. };
  1467. };
  1468. }(opts.cmp);
  1469. var seen = [];
  1470. return function stringify2(node) {
  1471. if (node && node.toJSON && typeof node.toJSON === "function") {
  1472. node = node.toJSON();
  1473. }
  1474. if (node === void 0)
  1475. return;
  1476. if (typeof node == "number")
  1477. return isFinite(node) ? "" + node : "null";
  1478. if (typeof node !== "object")
  1479. return JSON.stringify(node);
  1480. var i, out;
  1481. if (Array.isArray(node)) {
  1482. out = "[";
  1483. for (i = 0; i < node.length; i++) {
  1484. if (i)
  1485. out += ",";
  1486. out += stringify2(node[i]) || "null";
  1487. }
  1488. return out + "]";
  1489. }
  1490. if (node === null)
  1491. return "null";
  1492. if (seen.indexOf(node) !== -1) {
  1493. if (cycles)
  1494. return JSON.stringify("__cycle__");
  1495. throw new TypeError("Converting circular structure to JSON");
  1496. }
  1497. var seenIndex = seen.push(node) - 1;
  1498. var keys = Object.keys(node).sort(cmp && cmp(node));
  1499. out = "";
  1500. for (i = 0; i < keys.length; i++) {
  1501. var key = keys[i];
  1502. var value = stringify2(node[key]);
  1503. if (!value)
  1504. continue;
  1505. if (out)
  1506. out += ",";
  1507. out += JSON.stringify(key) + ":" + value;
  1508. }
  1509. seen.splice(seenIndex, 1);
  1510. return "{" + out + "}";
  1511. }(data);
  1512. };
  1513. }
  1514. });
  1515. var require_clone = __commonJS2({
  1516. "node_modules/clone/clone.js"(exports2, module2) {
  1517. var clone = function() {
  1518. "use strict";
  1519. function clone2(parent, circular, depth, prototype) {
  1520. var filter;
  1521. if (typeof circular === "object") {
  1522. depth = circular.depth;
  1523. prototype = circular.prototype;
  1524. filter = circular.filter;
  1525. circular = circular.circular;
  1526. }
  1527. var allParents = [];
  1528. var allChildren = [];
  1529. var useBuffer = typeof Buffer != "undefined";
  1530. if (typeof circular == "undefined")
  1531. circular = true;
  1532. if (typeof depth == "undefined")
  1533. depth = Infinity;
  1534. function _clone(parent2, depth2) {
  1535. if (parent2 === null)
  1536. return null;
  1537. if (depth2 == 0)
  1538. return parent2;
  1539. var child;
  1540. var proto;
  1541. if (typeof parent2 != "object") {
  1542. return parent2;
  1543. }
  1544. if (clone2.__isArray(parent2)) {
  1545. child = [];
  1546. } else if (clone2.__isRegExp(parent2)) {
  1547. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  1548. if (parent2.lastIndex)
  1549. child.lastIndex = parent2.lastIndex;
  1550. } else if (clone2.__isDate(parent2)) {
  1551. child = new Date(parent2.getTime());
  1552. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  1553. if (Buffer.allocUnsafe) {
  1554. child = Buffer.allocUnsafe(parent2.length);
  1555. } else {
  1556. child = new Buffer(parent2.length);
  1557. }
  1558. parent2.copy(child);
  1559. return child;
  1560. } else {
  1561. if (typeof prototype == "undefined") {
  1562. proto = Object.getPrototypeOf(parent2);
  1563. child = Object.create(proto);
  1564. } else {
  1565. child = Object.create(prototype);
  1566. proto = prototype;
  1567. }
  1568. }
  1569. if (circular) {
  1570. var index = allParents.indexOf(parent2);
  1571. if (index != -1) {
  1572. return allChildren[index];
  1573. }
  1574. allParents.push(parent2);
  1575. allChildren.push(child);
  1576. }
  1577. for (var i in parent2) {
  1578. var attrs;
  1579. if (proto) {
  1580. attrs = Object.getOwnPropertyDescriptor(proto, i);
  1581. }
  1582. if (attrs && attrs.set == null) {
  1583. continue;
  1584. }
  1585. child[i] = _clone(parent2[i], depth2 - 1);
  1586. }
  1587. return child;
  1588. }
  1589. return _clone(parent, depth);
  1590. }
  1591. clone2.clonePrototype = function clonePrototype(parent) {
  1592. if (parent === null)
  1593. return null;
  1594. var c = function() {
  1595. };
  1596. c.prototype = parent;
  1597. return new c();
  1598. };
  1599. function __objToStr(o) {
  1600. return Object.prototype.toString.call(o);
  1601. }
  1602. ;
  1603. clone2.__objToStr = __objToStr;
  1604. function __isDate(o) {
  1605. return typeof o === "object" && __objToStr(o) === "[object Date]";
  1606. }
  1607. ;
  1608. clone2.__isDate = __isDate;
  1609. function __isArray(o) {
  1610. return typeof o === "object" && __objToStr(o) === "[object Array]";
  1611. }
  1612. ;
  1613. clone2.__isArray = __isArray;
  1614. function __isRegExp(o) {
  1615. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  1616. }
  1617. ;
  1618. clone2.__isRegExp = __isRegExp;
  1619. function __getRegExpFlags(re) {
  1620. var flags = "";
  1621. if (re.global)
  1622. flags += "g";
  1623. if (re.ignoreCase)
  1624. flags += "i";
  1625. if (re.multiline)
  1626. flags += "m";
  1627. return flags;
  1628. }
  1629. ;
  1630. clone2.__getRegExpFlags = __getRegExpFlags;
  1631. return clone2;
  1632. }();
  1633. if (typeof module2 === "object" && module2.exports) {
  1634. module2.exports = clone;
  1635. }
  1636. }
  1637. });
  1638. var require_defaults = __commonJS2({
  1639. "node_modules/defaults/index.js"(exports2, module2) {
  1640. var clone = require_clone();
  1641. module2.exports = function(options, defaults) {
  1642. options = options || {};
  1643. Object.keys(defaults).forEach(function(key) {
  1644. if (typeof options[key] === "undefined") {
  1645. options[key] = clone(defaults[key]);
  1646. }
  1647. });
  1648. return options;
  1649. };
  1650. }
  1651. });
  1652. var require_combining = __commonJS2({
  1653. "node_modules/wcwidth/combining.js"(exports2, module2) {
  1654. module2.exports = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531], [68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
  1655. }
  1656. });
  1657. var require_wcwidth = __commonJS2({
  1658. "node_modules/wcwidth/index.js"(exports2, module2) {
  1659. "use strict";
  1660. var defaults = require_defaults();
  1661. var combining = require_combining();
  1662. var DEFAULTS = {
  1663. nul: 0,
  1664. control: 0
  1665. };
  1666. module2.exports = function wcwidth2(str) {
  1667. return wcswidth(str, DEFAULTS);
  1668. };
  1669. module2.exports.config = function(opts) {
  1670. opts = defaults(opts || {}, DEFAULTS);
  1671. return function wcwidth2(str) {
  1672. return wcswidth(str, opts);
  1673. };
  1674. };
  1675. function wcswidth(str, opts) {
  1676. if (typeof str !== "string")
  1677. return wcwidth(str, opts);
  1678. var s = 0;
  1679. for (var i = 0; i < str.length; i++) {
  1680. var n = wcwidth(str.charCodeAt(i), opts);
  1681. if (n < 0)
  1682. return -1;
  1683. s += n;
  1684. }
  1685. return s;
  1686. }
  1687. function wcwidth(ucs, opts) {
  1688. if (ucs === 0)
  1689. return opts.nul;
  1690. if (ucs < 32 || ucs >= 127 && ucs < 160)
  1691. return opts.control;
  1692. if (bisearch(ucs))
  1693. return 0;
  1694. return 1 + (ucs >= 4352 && (ucs <= 4447 || ucs == 9001 || ucs == 9002 || ucs >= 11904 && ucs <= 42191 && ucs != 12351 || ucs >= 44032 && ucs <= 55203 || ucs >= 63744 && ucs <= 64255 || ucs >= 65040 && ucs <= 65049 || ucs >= 65072 && ucs <= 65135 || ucs >= 65280 && ucs <= 65376 || ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141));
  1695. }
  1696. function bisearch(ucs) {
  1697. var min = 0;
  1698. var max = combining.length - 1;
  1699. var mid;
  1700. if (ucs < combining[0][0] || ucs > combining[max][1])
  1701. return false;
  1702. while (max >= min) {
  1703. mid = Math.floor((min + max) / 2);
  1704. if (ucs > combining[mid][1])
  1705. min = mid + 1;
  1706. else if (ucs < combining[mid][0])
  1707. max = mid - 1;
  1708. else
  1709. return true;
  1710. }
  1711. return false;
  1712. }
  1713. }
  1714. });
  1715. var require_strip_ansi = __commonJS2({
  1716. "vendors/strip-ansi.js"(exports2, module2) {
  1717. var __defProp = Object.defineProperty;
  1718. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  1719. var __getOwnPropNames22 = Object.getOwnPropertyNames;
  1720. var __hasOwnProp = Object.prototype.hasOwnProperty;
  1721. var __export = (target, all) => {
  1722. for (var name in all)
  1723. __defProp(target, name, {
  1724. get: all[name],
  1725. enumerable: true
  1726. });
  1727. };
  1728. var __copyProps = (to, from, except, desc) => {
  1729. if (from && typeof from === "object" || typeof from === "function") {
  1730. for (let key of __getOwnPropNames22(from))
  1731. if (!__hasOwnProp.call(to, key) && key !== except)
  1732. __defProp(to, key, {
  1733. get: () => from[key],
  1734. enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
  1735. });
  1736. }
  1737. return to;
  1738. };
  1739. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
  1740. value: true
  1741. }), mod);
  1742. var strip_ansi_exports = {};
  1743. __export(strip_ansi_exports, {
  1744. default: () => stripAnsi
  1745. });
  1746. module2.exports = __toCommonJS(strip_ansi_exports);
  1747. function ansiRegex({
  1748. onlyFirst = false
  1749. } = {}) {
  1750. const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
  1751. return new RegExp(pattern, onlyFirst ? void 0 : "g");
  1752. }
  1753. function stripAnsi(string) {
  1754. if (typeof string !== "string") {
  1755. throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
  1756. }
  1757. return string.replace(ansiRegex(), "");
  1758. }
  1759. }
  1760. });
  1761. var require_chalk = __commonJS2({
  1762. "vendors/chalk.js"(exports2, module2) {
  1763. var __create = Object.create;
  1764. var __defProp = Object.defineProperty;
  1765. var __defProps = Object.defineProperties;
  1766. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  1767. var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
  1768. var __getOwnPropNames22 = Object.getOwnPropertyNames;
  1769. var __getOwnPropSymbols = Object.getOwnPropertySymbols;
  1770. var __getProtoOf = Object.getPrototypeOf;
  1771. var __hasOwnProp = Object.prototype.hasOwnProperty;
  1772. var __propIsEnum = Object.prototype.propertyIsEnumerable;
  1773. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
  1774. enumerable: true,
  1775. configurable: true,
  1776. writable: true,
  1777. value
  1778. }) : obj[key] = value;
  1779. var __spreadValues = (a, b) => {
  1780. for (var prop in b || (b = {}))
  1781. if (__hasOwnProp.call(b, prop))
  1782. __defNormalProp(a, prop, b[prop]);
  1783. if (__getOwnPropSymbols)
  1784. for (var prop of __getOwnPropSymbols(b)) {
  1785. if (__propIsEnum.call(b, prop))
  1786. __defNormalProp(a, prop, b[prop]);
  1787. }
  1788. return a;
  1789. };
  1790. var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
  1791. var __export = (target, all) => {
  1792. for (var name in all)
  1793. __defProp(target, name, {
  1794. get: all[name],
  1795. enumerable: true
  1796. });
  1797. };
  1798. var __copyProps = (to, from, except, desc) => {
  1799. if (from && typeof from === "object" || typeof from === "function") {
  1800. for (let key of __getOwnPropNames22(from))
  1801. if (!__hasOwnProp.call(to, key) && key !== except)
  1802. __defProp(to, key, {
  1803. get: () => from[key],
  1804. enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
  1805. });
  1806. }
  1807. return to;
  1808. };
  1809. var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
  1810. value: mod,
  1811. enumerable: true
  1812. }) : target, mod));
  1813. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
  1814. value: true
  1815. }), mod);
  1816. var source_exports = {};
  1817. __export(source_exports, {
  1818. Chalk: () => Chalk,
  1819. chalkStderr: () => chalkStderr,
  1820. default: () => source_default,
  1821. supportsColor: () => stdoutColor,
  1822. supportsColorStderr: () => stderrColor
  1823. });
  1824. module2.exports = __toCommonJS(source_exports);
  1825. var ANSI_BACKGROUND_OFFSET = 10;
  1826. var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
  1827. var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
  1828. var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
  1829. function assembleStyles() {
  1830. const codes = /* @__PURE__ */ new Map();
  1831. const styles2 = {
  1832. modifier: {
  1833. reset: [0, 0],
  1834. bold: [1, 22],
  1835. dim: [2, 22],
  1836. italic: [3, 23],
  1837. underline: [4, 24],
  1838. overline: [53, 55],
  1839. inverse: [7, 27],
  1840. hidden: [8, 28],
  1841. strikethrough: [9, 29]
  1842. },
  1843. color: {
  1844. black: [30, 39],
  1845. red: [31, 39],
  1846. green: [32, 39],
  1847. yellow: [33, 39],
  1848. blue: [34, 39],
  1849. magenta: [35, 39],
  1850. cyan: [36, 39],
  1851. white: [37, 39],
  1852. blackBright: [90, 39],
  1853. redBright: [91, 39],
  1854. greenBright: [92, 39],
  1855. yellowBright: [93, 39],
  1856. blueBright: [94, 39],
  1857. magentaBright: [95, 39],
  1858. cyanBright: [96, 39],
  1859. whiteBright: [97, 39]
  1860. },
  1861. bgColor: {
  1862. bgBlack: [40, 49],
  1863. bgRed: [41, 49],
  1864. bgGreen: [42, 49],
  1865. bgYellow: [43, 49],
  1866. bgBlue: [44, 49],
  1867. bgMagenta: [45, 49],
  1868. bgCyan: [46, 49],
  1869. bgWhite: [47, 49],
  1870. bgBlackBright: [100, 49],
  1871. bgRedBright: [101, 49],
  1872. bgGreenBright: [102, 49],
  1873. bgYellowBright: [103, 49],
  1874. bgBlueBright: [104, 49],
  1875. bgMagentaBright: [105, 49],
  1876. bgCyanBright: [106, 49],
  1877. bgWhiteBright: [107, 49]
  1878. }
  1879. };
  1880. styles2.color.gray = styles2.color.blackBright;
  1881. styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
  1882. styles2.color.grey = styles2.color.blackBright;
  1883. styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
  1884. for (const [groupName, group] of Object.entries(styles2)) {
  1885. for (const [styleName, style] of Object.entries(group)) {
  1886. styles2[styleName] = {
  1887. open: `\x1B[${style[0]}m`,
  1888. close: `\x1B[${style[1]}m`
  1889. };
  1890. group[styleName] = styles2[styleName];
  1891. codes.set(style[0], style[1]);
  1892. }
  1893. Object.defineProperty(styles2, groupName, {
  1894. value: group,
  1895. enumerable: false
  1896. });
  1897. }
  1898. Object.defineProperty(styles2, "codes", {
  1899. value: codes,
  1900. enumerable: false
  1901. });
  1902. styles2.color.close = "\x1B[39m";
  1903. styles2.bgColor.close = "\x1B[49m";
  1904. styles2.color.ansi = wrapAnsi16();
  1905. styles2.color.ansi256 = wrapAnsi256();
  1906. styles2.color.ansi16m = wrapAnsi16m();
  1907. styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
  1908. styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
  1909. styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
  1910. Object.defineProperties(styles2, {
  1911. rgbToAnsi256: {
  1912. value: (red, green, blue) => {
  1913. if (red === green && green === blue) {
  1914. if (red < 8) {
  1915. return 16;
  1916. }
  1917. if (red > 248) {
  1918. return 231;
  1919. }
  1920. return Math.round((red - 8) / 247 * 24) + 232;
  1921. }
  1922. return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
  1923. },
  1924. enumerable: false
  1925. },
  1926. hexToRgb: {
  1927. value: (hex) => {
  1928. const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
  1929. if (!matches) {
  1930. return [0, 0, 0];
  1931. }
  1932. let {
  1933. colorString
  1934. } = matches.groups;
  1935. if (colorString.length === 3) {
  1936. colorString = [...colorString].map((character) => character + character).join("");
  1937. }
  1938. const integer = Number.parseInt(colorString, 16);
  1939. return [integer >> 16 & 255, integer >> 8 & 255, integer & 255];
  1940. },
  1941. enumerable: false
  1942. },
  1943. hexToAnsi256: {
  1944. value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
  1945. enumerable: false
  1946. },
  1947. ansi256ToAnsi: {
  1948. value: (code) => {
  1949. if (code < 8) {
  1950. return 30 + code;
  1951. }
  1952. if (code < 16) {
  1953. return 90 + (code - 8);
  1954. }
  1955. let red;
  1956. let green;
  1957. let blue;
  1958. if (code >= 232) {
  1959. red = ((code - 232) * 10 + 8) / 255;
  1960. green = red;
  1961. blue = red;
  1962. } else {
  1963. code -= 16;
  1964. const remainder = code % 36;
  1965. red = Math.floor(code / 36) / 5;
  1966. green = Math.floor(remainder / 6) / 5;
  1967. blue = remainder % 6 / 5;
  1968. }
  1969. const value = Math.max(red, green, blue) * 2;
  1970. if (value === 0) {
  1971. return 30;
  1972. }
  1973. let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
  1974. if (value === 2) {
  1975. result += 60;
  1976. }
  1977. return result;
  1978. },
  1979. enumerable: false
  1980. },
  1981. rgbToAnsi: {
  1982. value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
  1983. enumerable: false
  1984. },
  1985. hexToAnsi: {
  1986. value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
  1987. enumerable: false
  1988. }
  1989. });
  1990. return styles2;
  1991. }
  1992. var ansiStyles = assembleStyles();
  1993. var ansi_styles_default = ansiStyles;
  1994. var import_node_process = __toESM(require("process"), 1);
  1995. var import_node_os = __toESM(require("os"), 1);
  1996. var import_node_tty = __toESM(require("tty"), 1);
  1997. function hasFlag(flag, argv = import_node_process.default.argv) {
  1998. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  1999. const position = argv.indexOf(prefix + flag);
  2000. const terminatorPosition = argv.indexOf("--");
  2001. return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
  2002. }
  2003. var {
  2004. env
  2005. } = import_node_process.default;
  2006. var flagForceColor;
  2007. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
  2008. flagForceColor = 0;
  2009. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  2010. flagForceColor = 1;
  2011. }
  2012. function envForceColor() {
  2013. if ("FORCE_COLOR" in env) {
  2014. if (env.FORCE_COLOR === "true") {
  2015. return 1;
  2016. }
  2017. if (env.FORCE_COLOR === "false") {
  2018. return 0;
  2019. }
  2020. return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
  2021. }
  2022. }
  2023. function translateLevel(level) {
  2024. if (level === 0) {
  2025. return false;
  2026. }
  2027. return {
  2028. level,
  2029. hasBasic: true,
  2030. has256: level >= 2,
  2031. has16m: level >= 3
  2032. };
  2033. }
  2034. function _supportsColor(haveStream, {
  2035. streamIsTTY,
  2036. sniffFlags = true
  2037. } = {}) {
  2038. const noFlagForceColor = envForceColor();
  2039. if (noFlagForceColor !== void 0) {
  2040. flagForceColor = noFlagForceColor;
  2041. }
  2042. const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
  2043. if (forceColor === 0) {
  2044. return 0;
  2045. }
  2046. if (sniffFlags) {
  2047. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  2048. return 3;
  2049. }
  2050. if (hasFlag("color=256")) {
  2051. return 2;
  2052. }
  2053. }
  2054. if (haveStream && !streamIsTTY && forceColor === void 0) {
  2055. return 0;
  2056. }
  2057. const min = forceColor || 0;
  2058. if (env.TERM === "dumb") {
  2059. return min;
  2060. }
  2061. if (import_node_process.default.platform === "win32") {
  2062. const osRelease = import_node_os.default.release().split(".");
  2063. if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  2064. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  2065. }
  2066. return 1;
  2067. }
  2068. if ("CI" in env) {
  2069. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
  2070. return 1;
  2071. }
  2072. return min;
  2073. }
  2074. if ("TEAMCITY_VERSION" in env) {
  2075. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  2076. }
  2077. if ("TF_BUILD" in env && "AGENT_NAME" in env) {
  2078. return 1;
  2079. }
  2080. if (env.COLORTERM === "truecolor") {
  2081. return 3;
  2082. }
  2083. if ("TERM_PROGRAM" in env) {
  2084. const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  2085. switch (env.TERM_PROGRAM) {
  2086. case "iTerm.app":
  2087. return version >= 3 ? 3 : 2;
  2088. case "Apple_Terminal":
  2089. return 2;
  2090. }
  2091. }
  2092. if (/-256(color)?$/i.test(env.TERM)) {
  2093. return 2;
  2094. }
  2095. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  2096. return 1;
  2097. }
  2098. if ("COLORTERM" in env) {
  2099. return 1;
  2100. }
  2101. return min;
  2102. }
  2103. function createSupportsColor(stream, options = {}) {
  2104. const level = _supportsColor(stream, __spreadValues({
  2105. streamIsTTY: stream && stream.isTTY
  2106. }, options));
  2107. return translateLevel(level);
  2108. }
  2109. var supportsColor = {
  2110. stdout: createSupportsColor({
  2111. isTTY: import_node_tty.default.isatty(1)
  2112. }),
  2113. stderr: createSupportsColor({
  2114. isTTY: import_node_tty.default.isatty(2)
  2115. })
  2116. };
  2117. var supports_color_default = supportsColor;
  2118. function stringReplaceAll(string, substring, replacer) {
  2119. let index = string.indexOf(substring);
  2120. if (index === -1) {
  2121. return string;
  2122. }
  2123. const substringLength = substring.length;
  2124. let endIndex = 0;
  2125. let returnValue = "";
  2126. do {
  2127. returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
  2128. endIndex = index + substringLength;
  2129. index = string.indexOf(substring, endIndex);
  2130. } while (index !== -1);
  2131. returnValue += string.slice(endIndex);
  2132. return returnValue;
  2133. }
  2134. function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
  2135. let endIndex = 0;
  2136. let returnValue = "";
  2137. do {
  2138. const gotCR = string[index - 1] === "\r";
  2139. returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
  2140. endIndex = index + 1;
  2141. index = string.indexOf("\n", endIndex);
  2142. } while (index !== -1);
  2143. returnValue += string.slice(endIndex);
  2144. return returnValue;
  2145. }
  2146. var {
  2147. stdout: stdoutColor,
  2148. stderr: stderrColor
  2149. } = supports_color_default;
  2150. var GENERATOR = Symbol("GENERATOR");
  2151. var STYLER = Symbol("STYLER");
  2152. var IS_EMPTY = Symbol("IS_EMPTY");
  2153. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  2154. var styles = /* @__PURE__ */ Object.create(null);
  2155. var applyOptions = (object, options = {}) => {
  2156. if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
  2157. throw new Error("The `level` option should be an integer from 0 to 3");
  2158. }
  2159. const colorLevel = stdoutColor ? stdoutColor.level : 0;
  2160. object.level = options.level === void 0 ? colorLevel : options.level;
  2161. };
  2162. var Chalk = class {
  2163. constructor(options) {
  2164. return chalkFactory(options);
  2165. }
  2166. };
  2167. var chalkFactory = (options) => {
  2168. const chalk2 = (...strings) => strings.join(" ");
  2169. applyOptions(chalk2, options);
  2170. Object.setPrototypeOf(chalk2, createChalk.prototype);
  2171. return chalk2;
  2172. };
  2173. function createChalk(options) {
  2174. return chalkFactory(options);
  2175. }
  2176. Object.setPrototypeOf(createChalk.prototype, Function.prototype);
  2177. for (const [styleName, style] of Object.entries(ansi_styles_default)) {
  2178. styles[styleName] = {
  2179. get() {
  2180. const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
  2181. Object.defineProperty(this, styleName, {
  2182. value: builder
  2183. });
  2184. return builder;
  2185. }
  2186. };
  2187. }
  2188. styles.visible = {
  2189. get() {
  2190. const builder = createBuilder(this, this[STYLER], true);
  2191. Object.defineProperty(this, "visible", {
  2192. value: builder
  2193. });
  2194. return builder;
  2195. }
  2196. };
  2197. var getModelAnsi = (model, level, type, ...arguments_) => {
  2198. if (model === "rgb") {
  2199. if (level === "ansi16m") {
  2200. return ansi_styles_default[type].ansi16m(...arguments_);
  2201. }
  2202. if (level === "ansi256") {
  2203. return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
  2204. }
  2205. return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
  2206. }
  2207. if (model === "hex") {
  2208. return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
  2209. }
  2210. return ansi_styles_default[type][model](...arguments_);
  2211. };
  2212. var usedModels = ["rgb", "hex", "ansi256"];
  2213. for (const model of usedModels) {
  2214. styles[model] = {
  2215. get() {
  2216. const {
  2217. level
  2218. } = this;
  2219. return function(...arguments_) {
  2220. const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
  2221. return createBuilder(this, styler, this[IS_EMPTY]);
  2222. };
  2223. }
  2224. };
  2225. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  2226. styles[bgModel] = {
  2227. get() {
  2228. const {
  2229. level
  2230. } = this;
  2231. return function(...arguments_) {
  2232. const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
  2233. return createBuilder(this, styler, this[IS_EMPTY]);
  2234. };
  2235. }
  2236. };
  2237. }
  2238. var proto = Object.defineProperties(() => {
  2239. }, __spreadProps(__spreadValues({}, styles), {
  2240. level: {
  2241. enumerable: true,
  2242. get() {
  2243. return this[GENERATOR].level;
  2244. },
  2245. set(level) {
  2246. this[GENERATOR].level = level;
  2247. }
  2248. }
  2249. }));
  2250. var createStyler = (open, close, parent) => {
  2251. let openAll;
  2252. let closeAll;
  2253. if (parent === void 0) {
  2254. openAll = open;
  2255. closeAll = close;
  2256. } else {
  2257. openAll = parent.openAll + open;
  2258. closeAll = close + parent.closeAll;
  2259. }
  2260. return {
  2261. open,
  2262. close,
  2263. openAll,
  2264. closeAll,
  2265. parent
  2266. };
  2267. };
  2268. var createBuilder = (self2, _styler, _isEmpty) => {
  2269. const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
  2270. Object.setPrototypeOf(builder, proto);
  2271. builder[GENERATOR] = self2;
  2272. builder[STYLER] = _styler;
  2273. builder[IS_EMPTY] = _isEmpty;
  2274. return builder;
  2275. };
  2276. var applyStyle = (self2, string) => {
  2277. if (self2.level <= 0 || !string) {
  2278. return self2[IS_EMPTY] ? "" : string;
  2279. }
  2280. let styler = self2[STYLER];
  2281. if (styler === void 0) {
  2282. return string;
  2283. }
  2284. const {
  2285. openAll,
  2286. closeAll
  2287. } = styler;
  2288. if (string.includes("\x1B")) {
  2289. while (styler !== void 0) {
  2290. string = stringReplaceAll(string, styler.close, styler.open);
  2291. styler = styler.parent;
  2292. }
  2293. }
  2294. const lfIndex = string.indexOf("\n");
  2295. if (lfIndex !== -1) {
  2296. string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
  2297. }
  2298. return openAll + string + closeAll;
  2299. };
  2300. Object.defineProperties(createChalk.prototype, styles);
  2301. var chalk = createChalk();
  2302. var chalkStderr = createChalk({
  2303. level: stderrColor ? stderrColor.level : 0
  2304. });
  2305. var source_default = chalk;
  2306. }
  2307. });
  2308. var require_logger = __commonJS2({
  2309. "src/cli/logger.js"(exports2, module2) {
  2310. "use strict";
  2311. var readline = require("readline");
  2312. var wcwidth = require_wcwidth();
  2313. var {
  2314. default: stripAnsi
  2315. } = require_strip_ansi();
  2316. var {
  2317. default: chalk
  2318. } = require_chalk();
  2319. var countLines = (stream, text) => {
  2320. const columns = stream.columns || 80;
  2321. let lineCount = 0;
  2322. for (const line of stripAnsi(text).split("\n")) {
  2323. lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns));
  2324. }
  2325. return lineCount;
  2326. };
  2327. var clear = (stream, text) => () => {
  2328. const lineCount = countLines(stream, text);
  2329. for (let line = 0; line < lineCount; line++) {
  2330. if (line > 0) {
  2331. readline.moveCursor(stream, 0, -1);
  2332. }
  2333. readline.clearLine(stream, 0);
  2334. readline.cursorTo(stream, 0);
  2335. }
  2336. };
  2337. var emptyLogResult = {
  2338. clear() {
  2339. }
  2340. };
  2341. function createLogger2(logLevel = "log") {
  2342. return {
  2343. logLevel,
  2344. warn: createLogFunc("warn", "yellow"),
  2345. error: createLogFunc("error", "red"),
  2346. debug: createLogFunc("debug", "blue"),
  2347. log: createLogFunc("log")
  2348. };
  2349. function createLogFunc(loggerName, color) {
  2350. if (!shouldLog(loggerName)) {
  2351. return () => emptyLogResult;
  2352. }
  2353. const prefix = color ? `[${chalk[color](loggerName)}] ` : "";
  2354. const stream = process[loggerName === "log" ? "stdout" : "stderr"];
  2355. return (message, options) => {
  2356. options = Object.assign({
  2357. newline: true,
  2358. clearable: false
  2359. }, options);
  2360. message = message.replace(/^/gm, prefix) + (options.newline ? "\n" : "");
  2361. stream.write(message);
  2362. if (options.clearable) {
  2363. return {
  2364. clear: clear(stream, message)
  2365. };
  2366. }
  2367. };
  2368. }
  2369. function shouldLog(loggerName) {
  2370. switch (logLevel) {
  2371. case "silent":
  2372. return false;
  2373. case "debug":
  2374. if (loggerName === "debug") {
  2375. return true;
  2376. }
  2377. case "log":
  2378. if (loggerName === "log") {
  2379. return true;
  2380. }
  2381. case "warn":
  2382. if (loggerName === "warn") {
  2383. return true;
  2384. }
  2385. case "error":
  2386. return loggerName === "error";
  2387. }
  2388. }
  2389. }
  2390. module2.exports = createLogger2;
  2391. }
  2392. });
  2393. var require_prettier_internal = __commonJS2({
  2394. "src/cli/prettier-internal.js"(exports2, module2) {
  2395. "use strict";
  2396. module2.exports = require("./index.js").__internal;
  2397. }
  2398. });
  2399. var require_lib = __commonJS2({
  2400. "node_modules/outdent/lib/index.js"(exports2, module2) {
  2401. "use strict";
  2402. Object.defineProperty(exports2, "__esModule", {
  2403. value: true
  2404. });
  2405. exports2.outdent = void 0;
  2406. function noop() {
  2407. var args = [];
  2408. for (var _i = 0; _i < arguments.length; _i++) {
  2409. args[_i] = arguments[_i];
  2410. }
  2411. }
  2412. function createWeakMap() {
  2413. if (typeof WeakMap !== "undefined") {
  2414. return /* @__PURE__ */ new WeakMap();
  2415. } else {
  2416. return fakeSetOrMap();
  2417. }
  2418. }
  2419. function fakeSetOrMap() {
  2420. return {
  2421. add: noop,
  2422. delete: noop,
  2423. get: noop,
  2424. set: noop,
  2425. has: function(k) {
  2426. return false;
  2427. }
  2428. };
  2429. }
  2430. var hop = Object.prototype.hasOwnProperty;
  2431. var has = function(obj, prop) {
  2432. return hop.call(obj, prop);
  2433. };
  2434. function extend(target, source) {
  2435. for (var prop in source) {
  2436. if (has(source, prop)) {
  2437. target[prop] = source[prop];
  2438. }
  2439. }
  2440. return target;
  2441. }
  2442. var reLeadingNewline = /^[ \t]*(?:\r\n|\r|\n)/;
  2443. var reTrailingNewline = /(?:\r\n|\r|\n)[ \t]*$/;
  2444. var reStartsWithNewlineOrIsEmpty = /^(?:[\r\n]|$)/;
  2445. var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
  2446. var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
  2447. function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
  2448. var indentationLevel = 0;
  2449. var match = strings[0].match(reDetectIndentation);
  2450. if (match) {
  2451. indentationLevel = match[1].length;
  2452. }
  2453. var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
  2454. var reMatchIndent = new RegExp(reSource, "g");
  2455. if (firstInterpolatedValueSetsIndentationLevel) {
  2456. strings = strings.slice(1);
  2457. }
  2458. var newline = options.newline, trimLeadingNewline = options.trimLeadingNewline, trimTrailingNewline = options.trimTrailingNewline;
  2459. var normalizeNewlines = typeof newline === "string";
  2460. var l = strings.length;
  2461. var outdentedStrings = strings.map(function(v, i) {
  2462. v = v.replace(reMatchIndent, "$1");
  2463. if (i === 0 && trimLeadingNewline) {
  2464. v = v.replace(reLeadingNewline, "");
  2465. }
  2466. if (i === l - 1 && trimTrailingNewline) {
  2467. v = v.replace(reTrailingNewline, "");
  2468. }
  2469. if (normalizeNewlines) {
  2470. v = v.replace(/\r\n|\n|\r/g, function(_) {
  2471. return newline;
  2472. });
  2473. }
  2474. return v;
  2475. });
  2476. return outdentedStrings;
  2477. }
  2478. function concatStringsAndValues(strings, values) {
  2479. var ret = "";
  2480. for (var i = 0, l = strings.length; i < l; i++) {
  2481. ret += strings[i];
  2482. if (i < l - 1) {
  2483. ret += values[i];
  2484. }
  2485. }
  2486. return ret;
  2487. }
  2488. function isTemplateStringsArray(v) {
  2489. return has(v, "raw") && has(v, "length");
  2490. }
  2491. function createInstance(options) {
  2492. var arrayAutoIndentCache = createWeakMap();
  2493. var arrayFirstInterpSetsIndentCache = createWeakMap();
  2494. function outdent(stringsOrOptions) {
  2495. var values = [];
  2496. for (var _i = 1; _i < arguments.length; _i++) {
  2497. values[_i - 1] = arguments[_i];
  2498. }
  2499. if (isTemplateStringsArray(stringsOrOptions)) {
  2500. var strings = stringsOrOptions;
  2501. var firstInterpolatedValueSetsIndentationLevel = (values[0] === outdent || values[0] === defaultOutdent) && reOnlyWhitespaceWithAtLeastOneNewline.test(strings[0]) && reStartsWithNewlineOrIsEmpty.test(strings[1]);
  2502. var cache = firstInterpolatedValueSetsIndentationLevel ? arrayFirstInterpSetsIndentCache : arrayAutoIndentCache;
  2503. var renderedArray = cache.get(strings);
  2504. if (!renderedArray) {
  2505. renderedArray = _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options);
  2506. cache.set(strings, renderedArray);
  2507. }
  2508. if (values.length === 0) {
  2509. return renderedArray[0];
  2510. }
  2511. var rendered = concatStringsAndValues(renderedArray, firstInterpolatedValueSetsIndentationLevel ? values.slice(1) : values);
  2512. return rendered;
  2513. } else {
  2514. return createInstance(extend(extend({}, options), stringsOrOptions || {}));
  2515. }
  2516. }
  2517. var fullOutdent = extend(outdent, {
  2518. string: function(str) {
  2519. return _outdentArray([str], false, options)[0];
  2520. }
  2521. });
  2522. return fullOutdent;
  2523. }
  2524. var defaultOutdent = createInstance({
  2525. trimLeadingNewline: true,
  2526. trimTrailingNewline: true
  2527. });
  2528. exports2.outdent = defaultOutdent;
  2529. exports2.default = defaultOutdent;
  2530. if (typeof module2 !== "undefined") {
  2531. try {
  2532. module2.exports = defaultOutdent;
  2533. Object.defineProperty(defaultOutdent, "__esModule", {
  2534. value: true
  2535. });
  2536. defaultOutdent.default = defaultOutdent;
  2537. defaultOutdent.outdent = defaultOutdent;
  2538. } catch (e) {
  2539. }
  2540. }
  2541. }
  2542. });
  2543. var require_constant = __commonJS2({
  2544. "src/cli/constant.js"(exports2, module2) {
  2545. "use strict";
  2546. var {
  2547. outdent
  2548. } = require_lib();
  2549. var {
  2550. coreOptions
  2551. } = require_prettier_internal();
  2552. var categoryOrder = [coreOptions.CATEGORY_OUTPUT, coreOptions.CATEGORY_FORMAT, coreOptions.CATEGORY_CONFIG, coreOptions.CATEGORY_EDITOR, coreOptions.CATEGORY_OTHER];
  2553. var options = {
  2554. check: {
  2555. type: "boolean",
  2556. category: coreOptions.CATEGORY_OUTPUT,
  2557. alias: "c",
  2558. description: outdent`
  2559. Check if the given files are formatted, print a human-friendly summary
  2560. message and paths to unformatted files (see also --list-different).
  2561. `
  2562. },
  2563. color: {
  2564. type: "boolean",
  2565. default: true,
  2566. description: "Colorize error messages.",
  2567. oppositeDescription: "Do not colorize error messages."
  2568. },
  2569. config: {
  2570. type: "path",
  2571. category: coreOptions.CATEGORY_CONFIG,
  2572. description: "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).",
  2573. oppositeDescription: "Do not look for a configuration file.",
  2574. exception: (value) => value === false
  2575. },
  2576. "config-precedence": {
  2577. type: "choice",
  2578. category: coreOptions.CATEGORY_CONFIG,
  2579. default: "cli-override",
  2580. choices: [{
  2581. value: "cli-override",
  2582. description: "CLI options take precedence over config file"
  2583. }, {
  2584. value: "file-override",
  2585. description: "Config file take precedence over CLI options"
  2586. }, {
  2587. value: "prefer-file",
  2588. description: outdent`
  2589. If a config file is found will evaluate it and ignore other CLI options.
  2590. If no config file is found CLI options will evaluate as normal.
  2591. `
  2592. }],
  2593. description: "Define in which order config files and CLI options should be evaluated."
  2594. },
  2595. "debug-benchmark": {
  2596. type: "boolean"
  2597. },
  2598. "debug-check": {
  2599. type: "boolean"
  2600. },
  2601. "debug-print-doc": {
  2602. type: "boolean"
  2603. },
  2604. "debug-print-comments": {
  2605. type: "boolean"
  2606. },
  2607. "debug-print-ast": {
  2608. type: "boolean"
  2609. },
  2610. "debug-repeat": {
  2611. type: "int",
  2612. default: 0
  2613. },
  2614. editorconfig: {
  2615. type: "boolean",
  2616. category: coreOptions.CATEGORY_CONFIG,
  2617. description: "Take .editorconfig into account when parsing configuration.",
  2618. oppositeDescription: "Don't take .editorconfig into account when parsing configuration.",
  2619. default: true
  2620. },
  2621. "error-on-unmatched-pattern": {
  2622. type: "boolean",
  2623. oppositeDescription: "Prevent errors when pattern is unmatched."
  2624. },
  2625. "find-config-path": {
  2626. type: "path",
  2627. category: coreOptions.CATEGORY_CONFIG,
  2628. description: "Find and print the path to a configuration file for the given input file."
  2629. },
  2630. "file-info": {
  2631. type: "path",
  2632. description: outdent`
  2633. Extract the following info (as JSON) for a given file path. Reported fields:
  2634. * ignored (boolean) - true if file path is filtered by --ignore-path
  2635. * inferredParser (string | null) - name of parser inferred from file path
  2636. `
  2637. },
  2638. help: {
  2639. type: "flag",
  2640. alias: "h",
  2641. description: outdent`
  2642. Show CLI usage, or details about the given flag.
  2643. Example: --help write
  2644. `,
  2645. exception: (value) => value === ""
  2646. },
  2647. "ignore-path": {
  2648. type: "path",
  2649. category: coreOptions.CATEGORY_CONFIG,
  2650. default: ".prettierignore",
  2651. description: "Path to a file with patterns describing files to ignore."
  2652. },
  2653. "ignore-unknown": {
  2654. type: "boolean",
  2655. alias: "u",
  2656. description: "Ignore unknown files."
  2657. },
  2658. "list-different": {
  2659. type: "boolean",
  2660. category: coreOptions.CATEGORY_OUTPUT,
  2661. alias: "l",
  2662. description: "Print the names of files that are different from Prettier's formatting (see also --check)."
  2663. },
  2664. loglevel: {
  2665. type: "choice",
  2666. description: "What level of logs to report.",
  2667. default: "log",
  2668. choices: ["silent", "error", "warn", "log", "debug"]
  2669. },
  2670. "plugin-search": {
  2671. type: "boolean",
  2672. oppositeDescription: "Disable plugin autoloading."
  2673. },
  2674. "support-info": {
  2675. type: "boolean",
  2676. description: "Print support information as JSON."
  2677. },
  2678. version: {
  2679. type: "boolean",
  2680. alias: "v",
  2681. description: "Print Prettier version."
  2682. },
  2683. "with-node-modules": {
  2684. type: "boolean",
  2685. category: coreOptions.CATEGORY_CONFIG,
  2686. description: "Process files inside 'node_modules' directory."
  2687. },
  2688. write: {
  2689. type: "boolean",
  2690. alias: "w",
  2691. category: coreOptions.CATEGORY_OUTPUT,
  2692. description: "Edit files in-place. (Beware!)"
  2693. }
  2694. };
  2695. var usageSummary = outdent`
  2696. Usage: prettier [options] [file/dir/glob ...]
  2697. By default, output is written to stdout.
  2698. Stdin is read if it is piped to Prettier and no files are given.
  2699. `;
  2700. module2.exports = {
  2701. categoryOrder,
  2702. options,
  2703. usageSummary
  2704. };
  2705. }
  2706. });
  2707. var require_dashify = __commonJS2({
  2708. "node_modules/dashify/index.js"(exports2, module2) {
  2709. "use strict";
  2710. module2.exports = (str, options) => {
  2711. if (typeof str !== "string")
  2712. throw new TypeError("expected a string");
  2713. return str.trim().replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\W/g, (m) => /[À-ž]/.test(m) ? m : "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, (m) => options && options.condense ? "-" : m).toLowerCase();
  2714. };
  2715. }
  2716. });
  2717. var require_option_map = __commonJS2({
  2718. "src/cli/options/option-map.js"(exports2, module2) {
  2719. "use strict";
  2720. var dashify = require_dashify();
  2721. var {
  2722. coreOptions
  2723. } = require_prettier_internal();
  2724. function normalizeDetailedOption(name, option) {
  2725. return Object.assign(Object.assign({
  2726. category: coreOptions.CATEGORY_OTHER
  2727. }, option), {}, {
  2728. choices: option.choices && option.choices.map((choice) => {
  2729. const newChoice = Object.assign({
  2730. description: "",
  2731. deprecated: false
  2732. }, typeof choice === "object" ? choice : {
  2733. value: choice
  2734. });
  2735. if (newChoice.value === true) {
  2736. newChoice.value = "";
  2737. }
  2738. return newChoice;
  2739. })
  2740. });
  2741. }
  2742. function normalizeDetailedOptionMap(detailedOptionMap) {
  2743. return Object.fromEntries(Object.entries(detailedOptionMap).sort(([leftName], [rightName]) => leftName.localeCompare(rightName)).map(([name, option]) => [name, normalizeDetailedOption(name, option)]));
  2744. }
  2745. function createDetailedOptionMap(supportOptions) {
  2746. return Object.fromEntries(supportOptions.map((option) => {
  2747. const newOption = Object.assign(Object.assign({}, option), {}, {
  2748. name: option.cliName || dashify(option.name),
  2749. description: option.cliDescription || option.description,
  2750. category: option.cliCategory || coreOptions.CATEGORY_FORMAT,
  2751. forwardToApi: option.name
  2752. });
  2753. if (option.deprecated) {
  2754. delete newOption.forwardToApi;
  2755. delete newOption.description;
  2756. delete newOption.oppositeDescription;
  2757. newOption.deprecated = true;
  2758. }
  2759. return [newOption.name, newOption];
  2760. }));
  2761. }
  2762. module2.exports = {
  2763. normalizeDetailedOptionMap,
  2764. createDetailedOptionMap
  2765. };
  2766. }
  2767. });
  2768. var require_get_context_options = __commonJS2({
  2769. "src/cli/options/get-context-options.js"(exports2, module2) {
  2770. "use strict";
  2771. var prettier2 = require("./index.js");
  2772. var {
  2773. optionsModule,
  2774. utils: {
  2775. arrayify
  2776. }
  2777. } = require_prettier_internal();
  2778. var constant = require_constant();
  2779. var {
  2780. normalizeDetailedOptionMap,
  2781. createDetailedOptionMap
  2782. } = require_option_map();
  2783. function getContextOptions(plugins, pluginSearchDirs) {
  2784. const {
  2785. options: supportOptions,
  2786. languages
  2787. } = prettier2.getSupportInfo({
  2788. showDeprecated: true,
  2789. showUnreleased: true,
  2790. showInternal: true,
  2791. plugins,
  2792. pluginSearchDirs
  2793. });
  2794. const detailedOptionMap = normalizeDetailedOptionMap(Object.assign(Object.assign({}, createDetailedOptionMap(supportOptions)), constant.options));
  2795. const detailedOptions = arrayify(detailedOptionMap, "name");
  2796. const apiDefaultOptions = Object.assign(Object.assign({}, optionsModule.hiddenDefaults), Object.fromEntries(supportOptions.filter(({
  2797. deprecated
  2798. }) => !deprecated).map((option) => [option.name, option.default])));
  2799. return {
  2800. supportOptions,
  2801. detailedOptions,
  2802. detailedOptionMap,
  2803. apiDefaultOptions,
  2804. languages
  2805. };
  2806. }
  2807. module2.exports = getContextOptions;
  2808. }
  2809. });
  2810. var require_isArray = __commonJS2({
  2811. "node_modules/lodash/isArray.js"(exports2, module2) {
  2812. var isArray = Array.isArray;
  2813. module2.exports = isArray;
  2814. }
  2815. });
  2816. var require_freeGlobal = __commonJS2({
  2817. "node_modules/lodash/_freeGlobal.js"(exports2, module2) {
  2818. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  2819. module2.exports = freeGlobal;
  2820. }
  2821. });
  2822. var require_root = __commonJS2({
  2823. "node_modules/lodash/_root.js"(exports2, module2) {
  2824. var freeGlobal = require_freeGlobal();
  2825. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  2826. var root = freeGlobal || freeSelf || Function("return this")();
  2827. module2.exports = root;
  2828. }
  2829. });
  2830. var require_Symbol = __commonJS2({
  2831. "node_modules/lodash/_Symbol.js"(exports2, module2) {
  2832. var root = require_root();
  2833. var Symbol2 = root.Symbol;
  2834. module2.exports = Symbol2;
  2835. }
  2836. });
  2837. var require_getRawTag = __commonJS2({
  2838. "node_modules/lodash/_getRawTag.js"(exports2, module2) {
  2839. var Symbol2 = require_Symbol();
  2840. var objectProto = Object.prototype;
  2841. var hasOwnProperty = objectProto.hasOwnProperty;
  2842. var nativeObjectToString = objectProto.toString;
  2843. var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
  2844. function getRawTag(value) {
  2845. var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
  2846. try {
  2847. value[symToStringTag] = void 0;
  2848. var unmasked = true;
  2849. } catch (e) {
  2850. }
  2851. var result = nativeObjectToString.call(value);
  2852. if (unmasked) {
  2853. if (isOwn) {
  2854. value[symToStringTag] = tag;
  2855. } else {
  2856. delete value[symToStringTag];
  2857. }
  2858. }
  2859. return result;
  2860. }
  2861. module2.exports = getRawTag;
  2862. }
  2863. });
  2864. var require_objectToString = __commonJS2({
  2865. "node_modules/lodash/_objectToString.js"(exports2, module2) {
  2866. var objectProto = Object.prototype;
  2867. var nativeObjectToString = objectProto.toString;
  2868. function objectToString(value) {
  2869. return nativeObjectToString.call(value);
  2870. }
  2871. module2.exports = objectToString;
  2872. }
  2873. });
  2874. var require_baseGetTag = __commonJS2({
  2875. "node_modules/lodash/_baseGetTag.js"(exports2, module2) {
  2876. var Symbol2 = require_Symbol();
  2877. var getRawTag = require_getRawTag();
  2878. var objectToString = require_objectToString();
  2879. var nullTag = "[object Null]";
  2880. var undefinedTag = "[object Undefined]";
  2881. var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
  2882. function baseGetTag(value) {
  2883. if (value == null) {
  2884. return value === void 0 ? undefinedTag : nullTag;
  2885. }
  2886. return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  2887. }
  2888. module2.exports = baseGetTag;
  2889. }
  2890. });
  2891. var require_isObjectLike = __commonJS2({
  2892. "node_modules/lodash/isObjectLike.js"(exports2, module2) {
  2893. function isObjectLike(value) {
  2894. return value != null && typeof value == "object";
  2895. }
  2896. module2.exports = isObjectLike;
  2897. }
  2898. });
  2899. var require_isSymbol = __commonJS2({
  2900. "node_modules/lodash/isSymbol.js"(exports2, module2) {
  2901. var baseGetTag = require_baseGetTag();
  2902. var isObjectLike = require_isObjectLike();
  2903. var symbolTag = "[object Symbol]";
  2904. function isSymbol(value) {
  2905. return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
  2906. }
  2907. module2.exports = isSymbol;
  2908. }
  2909. });
  2910. var require_isKey = __commonJS2({
  2911. "node_modules/lodash/_isKey.js"(exports2, module2) {
  2912. var isArray = require_isArray();
  2913. var isSymbol = require_isSymbol();
  2914. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
  2915. var reIsPlainProp = /^\w*$/;
  2916. function isKey(value, object) {
  2917. if (isArray(value)) {
  2918. return false;
  2919. }
  2920. var type = typeof value;
  2921. if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
  2922. return true;
  2923. }
  2924. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
  2925. }
  2926. module2.exports = isKey;
  2927. }
  2928. });
  2929. var require_isObject = __commonJS2({
  2930. "node_modules/lodash/isObject.js"(exports2, module2) {
  2931. function isObject(value) {
  2932. var type = typeof value;
  2933. return value != null && (type == "object" || type == "function");
  2934. }
  2935. module2.exports = isObject;
  2936. }
  2937. });
  2938. var require_isFunction = __commonJS2({
  2939. "node_modules/lodash/isFunction.js"(exports2, module2) {
  2940. var baseGetTag = require_baseGetTag();
  2941. var isObject = require_isObject();
  2942. var asyncTag = "[object AsyncFunction]";
  2943. var funcTag = "[object Function]";
  2944. var genTag = "[object GeneratorFunction]";
  2945. var proxyTag = "[object Proxy]";
  2946. function isFunction(value) {
  2947. if (!isObject(value)) {
  2948. return false;
  2949. }
  2950. var tag = baseGetTag(value);
  2951. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  2952. }
  2953. module2.exports = isFunction;
  2954. }
  2955. });
  2956. var require_coreJsData = __commonJS2({
  2957. "node_modules/lodash/_coreJsData.js"(exports2, module2) {
  2958. var root = require_root();
  2959. var coreJsData = root["__core-js_shared__"];
  2960. module2.exports = coreJsData;
  2961. }
  2962. });
  2963. var require_isMasked = __commonJS2({
  2964. "node_modules/lodash/_isMasked.js"(exports2, module2) {
  2965. var coreJsData = require_coreJsData();
  2966. var maskSrcKey = function() {
  2967. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  2968. return uid ? "Symbol(src)_1." + uid : "";
  2969. }();
  2970. function isMasked(func) {
  2971. return !!maskSrcKey && maskSrcKey in func;
  2972. }
  2973. module2.exports = isMasked;
  2974. }
  2975. });
  2976. var require_toSource = __commonJS2({
  2977. "node_modules/lodash/_toSource.js"(exports2, module2) {
  2978. var funcProto = Function.prototype;
  2979. var funcToString = funcProto.toString;
  2980. function toSource(func) {
  2981. if (func != null) {
  2982. try {
  2983. return funcToString.call(func);
  2984. } catch (e) {
  2985. }
  2986. try {
  2987. return func + "";
  2988. } catch (e) {
  2989. }
  2990. }
  2991. return "";
  2992. }
  2993. module2.exports = toSource;
  2994. }
  2995. });
  2996. var require_baseIsNative = __commonJS2({
  2997. "node_modules/lodash/_baseIsNative.js"(exports2, module2) {
  2998. var isFunction = require_isFunction();
  2999. var isMasked = require_isMasked();
  3000. var isObject = require_isObject();
  3001. var toSource = require_toSource();
  3002. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  3003. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  3004. var funcProto = Function.prototype;
  3005. var objectProto = Object.prototype;
  3006. var funcToString = funcProto.toString;
  3007. var hasOwnProperty = objectProto.hasOwnProperty;
  3008. var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
  3009. function baseIsNative(value) {
  3010. if (!isObject(value) || isMasked(value)) {
  3011. return false;
  3012. }
  3013. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  3014. return pattern.test(toSource(value));
  3015. }
  3016. module2.exports = baseIsNative;
  3017. }
  3018. });
  3019. var require_getValue = __commonJS2({
  3020. "node_modules/lodash/_getValue.js"(exports2, module2) {
  3021. function getValue(object, key) {
  3022. return object == null ? void 0 : object[key];
  3023. }
  3024. module2.exports = getValue;
  3025. }
  3026. });
  3027. var require_getNative = __commonJS2({
  3028. "node_modules/lodash/_getNative.js"(exports2, module2) {
  3029. var baseIsNative = require_baseIsNative();
  3030. var getValue = require_getValue();
  3031. function getNative(object, key) {
  3032. var value = getValue(object, key);
  3033. return baseIsNative(value) ? value : void 0;
  3034. }
  3035. module2.exports = getNative;
  3036. }
  3037. });
  3038. var require_nativeCreate = __commonJS2({
  3039. "node_modules/lodash/_nativeCreate.js"(exports2, module2) {
  3040. var getNative = require_getNative();
  3041. var nativeCreate = getNative(Object, "create");
  3042. module2.exports = nativeCreate;
  3043. }
  3044. });
  3045. var require_hashClear = __commonJS2({
  3046. "node_modules/lodash/_hashClear.js"(exports2, module2) {
  3047. var nativeCreate = require_nativeCreate();
  3048. function hashClear() {
  3049. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3050. this.size = 0;
  3051. }
  3052. module2.exports = hashClear;
  3053. }
  3054. });
  3055. var require_hashDelete = __commonJS2({
  3056. "node_modules/lodash/_hashDelete.js"(exports2, module2) {
  3057. function hashDelete(key) {
  3058. var result = this.has(key) && delete this.__data__[key];
  3059. this.size -= result ? 1 : 0;
  3060. return result;
  3061. }
  3062. module2.exports = hashDelete;
  3063. }
  3064. });
  3065. var require_hashGet = __commonJS2({
  3066. "node_modules/lodash/_hashGet.js"(exports2, module2) {
  3067. var nativeCreate = require_nativeCreate();
  3068. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  3069. var objectProto = Object.prototype;
  3070. var hasOwnProperty = objectProto.hasOwnProperty;
  3071. function hashGet(key) {
  3072. var data = this.__data__;
  3073. if (nativeCreate) {
  3074. var result = data[key];
  3075. return result === HASH_UNDEFINED ? void 0 : result;
  3076. }
  3077. return hasOwnProperty.call(data, key) ? data[key] : void 0;
  3078. }
  3079. module2.exports = hashGet;
  3080. }
  3081. });
  3082. var require_hashHas = __commonJS2({
  3083. "node_modules/lodash/_hashHas.js"(exports2, module2) {
  3084. var nativeCreate = require_nativeCreate();
  3085. var objectProto = Object.prototype;
  3086. var hasOwnProperty = objectProto.hasOwnProperty;
  3087. function hashHas(key) {
  3088. var data = this.__data__;
  3089. return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
  3090. }
  3091. module2.exports = hashHas;
  3092. }
  3093. });
  3094. var require_hashSet = __commonJS2({
  3095. "node_modules/lodash/_hashSet.js"(exports2, module2) {
  3096. var nativeCreate = require_nativeCreate();
  3097. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  3098. function hashSet(key, value) {
  3099. var data = this.__data__;
  3100. this.size += this.has(key) ? 0 : 1;
  3101. data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
  3102. return this;
  3103. }
  3104. module2.exports = hashSet;
  3105. }
  3106. });
  3107. var require_Hash = __commonJS2({
  3108. "node_modules/lodash/_Hash.js"(exports2, module2) {
  3109. var hashClear = require_hashClear();
  3110. var hashDelete = require_hashDelete();
  3111. var hashGet = require_hashGet();
  3112. var hashHas = require_hashHas();
  3113. var hashSet = require_hashSet();
  3114. function Hash(entries) {
  3115. var index = -1, length = entries == null ? 0 : entries.length;
  3116. this.clear();
  3117. while (++index < length) {
  3118. var entry = entries[index];
  3119. this.set(entry[0], entry[1]);
  3120. }
  3121. }
  3122. Hash.prototype.clear = hashClear;
  3123. Hash.prototype["delete"] = hashDelete;
  3124. Hash.prototype.get = hashGet;
  3125. Hash.prototype.has = hashHas;
  3126. Hash.prototype.set = hashSet;
  3127. module2.exports = Hash;
  3128. }
  3129. });
  3130. var require_listCacheClear = __commonJS2({
  3131. "node_modules/lodash/_listCacheClear.js"(exports2, module2) {
  3132. function listCacheClear() {
  3133. this.__data__ = [];
  3134. this.size = 0;
  3135. }
  3136. module2.exports = listCacheClear;
  3137. }
  3138. });
  3139. var require_eq = __commonJS2({
  3140. "node_modules/lodash/eq.js"(exports2, module2) {
  3141. function eq(value, other) {
  3142. return value === other || value !== value && other !== other;
  3143. }
  3144. module2.exports = eq;
  3145. }
  3146. });
  3147. var require_assocIndexOf = __commonJS2({
  3148. "node_modules/lodash/_assocIndexOf.js"(exports2, module2) {
  3149. var eq = require_eq();
  3150. function assocIndexOf(array, key) {
  3151. var length = array.length;
  3152. while (length--) {
  3153. if (eq(array[length][0], key)) {
  3154. return length;
  3155. }
  3156. }
  3157. return -1;
  3158. }
  3159. module2.exports = assocIndexOf;
  3160. }
  3161. });
  3162. var require_listCacheDelete = __commonJS2({
  3163. "node_modules/lodash/_listCacheDelete.js"(exports2, module2) {
  3164. var assocIndexOf = require_assocIndexOf();
  3165. var arrayProto = Array.prototype;
  3166. var splice = arrayProto.splice;
  3167. function listCacheDelete(key) {
  3168. var data = this.__data__, index = assocIndexOf(data, key);
  3169. if (index < 0) {
  3170. return false;
  3171. }
  3172. var lastIndex = data.length - 1;
  3173. if (index == lastIndex) {
  3174. data.pop();
  3175. } else {
  3176. splice.call(data, index, 1);
  3177. }
  3178. --this.size;
  3179. return true;
  3180. }
  3181. module2.exports = listCacheDelete;
  3182. }
  3183. });
  3184. var require_listCacheGet = __commonJS2({
  3185. "node_modules/lodash/_listCacheGet.js"(exports2, module2) {
  3186. var assocIndexOf = require_assocIndexOf();
  3187. function listCacheGet(key) {
  3188. var data = this.__data__, index = assocIndexOf(data, key);
  3189. return index < 0 ? void 0 : data[index][1];
  3190. }
  3191. module2.exports = listCacheGet;
  3192. }
  3193. });
  3194. var require_listCacheHas = __commonJS2({
  3195. "node_modules/lodash/_listCacheHas.js"(exports2, module2) {
  3196. var assocIndexOf = require_assocIndexOf();
  3197. function listCacheHas(key) {
  3198. return assocIndexOf(this.__data__, key) > -1;
  3199. }
  3200. module2.exports = listCacheHas;
  3201. }
  3202. });
  3203. var require_listCacheSet = __commonJS2({
  3204. "node_modules/lodash/_listCacheSet.js"(exports2, module2) {
  3205. var assocIndexOf = require_assocIndexOf();
  3206. function listCacheSet(key, value) {
  3207. var data = this.__data__, index = assocIndexOf(data, key);
  3208. if (index < 0) {
  3209. ++this.size;
  3210. data.push([key, value]);
  3211. } else {
  3212. data[index][1] = value;
  3213. }
  3214. return this;
  3215. }
  3216. module2.exports = listCacheSet;
  3217. }
  3218. });
  3219. var require_ListCache = __commonJS2({
  3220. "node_modules/lodash/_ListCache.js"(exports2, module2) {
  3221. var listCacheClear = require_listCacheClear();
  3222. var listCacheDelete = require_listCacheDelete();
  3223. var listCacheGet = require_listCacheGet();
  3224. var listCacheHas = require_listCacheHas();
  3225. var listCacheSet = require_listCacheSet();
  3226. function ListCache(entries) {
  3227. var index = -1, length = entries == null ? 0 : entries.length;
  3228. this.clear();
  3229. while (++index < length) {
  3230. var entry = entries[index];
  3231. this.set(entry[0], entry[1]);
  3232. }
  3233. }
  3234. ListCache.prototype.clear = listCacheClear;
  3235. ListCache.prototype["delete"] = listCacheDelete;
  3236. ListCache.prototype.get = listCacheGet;
  3237. ListCache.prototype.has = listCacheHas;
  3238. ListCache.prototype.set = listCacheSet;
  3239. module2.exports = ListCache;
  3240. }
  3241. });
  3242. var require_Map = __commonJS2({
  3243. "node_modules/lodash/_Map.js"(exports2, module2) {
  3244. var getNative = require_getNative();
  3245. var root = require_root();
  3246. var Map2 = getNative(root, "Map");
  3247. module2.exports = Map2;
  3248. }
  3249. });
  3250. var require_mapCacheClear = __commonJS2({
  3251. "node_modules/lodash/_mapCacheClear.js"(exports2, module2) {
  3252. var Hash = require_Hash();
  3253. var ListCache = require_ListCache();
  3254. var Map2 = require_Map();
  3255. function mapCacheClear() {
  3256. this.size = 0;
  3257. this.__data__ = {
  3258. "hash": new Hash(),
  3259. "map": new (Map2 || ListCache)(),
  3260. "string": new Hash()
  3261. };
  3262. }
  3263. module2.exports = mapCacheClear;
  3264. }
  3265. });
  3266. var require_isKeyable = __commonJS2({
  3267. "node_modules/lodash/_isKeyable.js"(exports2, module2) {
  3268. function isKeyable(value) {
  3269. var type = typeof value;
  3270. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  3271. }
  3272. module2.exports = isKeyable;
  3273. }
  3274. });
  3275. var require_getMapData = __commonJS2({
  3276. "node_modules/lodash/_getMapData.js"(exports2, module2) {
  3277. var isKeyable = require_isKeyable();
  3278. function getMapData(map, key) {
  3279. var data = map.__data__;
  3280. return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
  3281. }
  3282. module2.exports = getMapData;
  3283. }
  3284. });
  3285. var require_mapCacheDelete = __commonJS2({
  3286. "node_modules/lodash/_mapCacheDelete.js"(exports2, module2) {
  3287. var getMapData = require_getMapData();
  3288. function mapCacheDelete(key) {
  3289. var result = getMapData(this, key)["delete"](key);
  3290. this.size -= result ? 1 : 0;
  3291. return result;
  3292. }
  3293. module2.exports = mapCacheDelete;
  3294. }
  3295. });
  3296. var require_mapCacheGet = __commonJS2({
  3297. "node_modules/lodash/_mapCacheGet.js"(exports2, module2) {
  3298. var getMapData = require_getMapData();
  3299. function mapCacheGet(key) {
  3300. return getMapData(this, key).get(key);
  3301. }
  3302. module2.exports = mapCacheGet;
  3303. }
  3304. });
  3305. var require_mapCacheHas = __commonJS2({
  3306. "node_modules/lodash/_mapCacheHas.js"(exports2, module2) {
  3307. var getMapData = require_getMapData();
  3308. function mapCacheHas(key) {
  3309. return getMapData(this, key).has(key);
  3310. }
  3311. module2.exports = mapCacheHas;
  3312. }
  3313. });
  3314. var require_mapCacheSet = __commonJS2({
  3315. "node_modules/lodash/_mapCacheSet.js"(exports2, module2) {
  3316. var getMapData = require_getMapData();
  3317. function mapCacheSet(key, value) {
  3318. var data = getMapData(this, key), size = data.size;
  3319. data.set(key, value);
  3320. this.size += data.size == size ? 0 : 1;
  3321. return this;
  3322. }
  3323. module2.exports = mapCacheSet;
  3324. }
  3325. });
  3326. var require_MapCache = __commonJS2({
  3327. "node_modules/lodash/_MapCache.js"(exports2, module2) {
  3328. var mapCacheClear = require_mapCacheClear();
  3329. var mapCacheDelete = require_mapCacheDelete();
  3330. var mapCacheGet = require_mapCacheGet();
  3331. var mapCacheHas = require_mapCacheHas();
  3332. var mapCacheSet = require_mapCacheSet();
  3333. function MapCache(entries) {
  3334. var index = -1, length = entries == null ? 0 : entries.length;
  3335. this.clear();
  3336. while (++index < length) {
  3337. var entry = entries[index];
  3338. this.set(entry[0], entry[1]);
  3339. }
  3340. }
  3341. MapCache.prototype.clear = mapCacheClear;
  3342. MapCache.prototype["delete"] = mapCacheDelete;
  3343. MapCache.prototype.get = mapCacheGet;
  3344. MapCache.prototype.has = mapCacheHas;
  3345. MapCache.prototype.set = mapCacheSet;
  3346. module2.exports = MapCache;
  3347. }
  3348. });
  3349. var require_memoize = __commonJS2({
  3350. "node_modules/lodash/memoize.js"(exports2, module2) {
  3351. var MapCache = require_MapCache();
  3352. var FUNC_ERROR_TEXT = "Expected a function";
  3353. function memoize(func, resolver) {
  3354. if (typeof func != "function" || resolver != null && typeof resolver != "function") {
  3355. throw new TypeError(FUNC_ERROR_TEXT);
  3356. }
  3357. var memoized = function() {
  3358. var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
  3359. if (cache.has(key)) {
  3360. return cache.get(key);
  3361. }
  3362. var result = func.apply(this, args);
  3363. memoized.cache = cache.set(key, result) || cache;
  3364. return result;
  3365. };
  3366. memoized.cache = new (memoize.Cache || MapCache)();
  3367. return memoized;
  3368. }
  3369. memoize.Cache = MapCache;
  3370. module2.exports = memoize;
  3371. }
  3372. });
  3373. var require_memoizeCapped = __commonJS2({
  3374. "node_modules/lodash/_memoizeCapped.js"(exports2, module2) {
  3375. var memoize = require_memoize();
  3376. var MAX_MEMOIZE_SIZE = 500;
  3377. function memoizeCapped(func) {
  3378. var result = memoize(func, function(key) {
  3379. if (cache.size === MAX_MEMOIZE_SIZE) {
  3380. cache.clear();
  3381. }
  3382. return key;
  3383. });
  3384. var cache = result.cache;
  3385. return result;
  3386. }
  3387. module2.exports = memoizeCapped;
  3388. }
  3389. });
  3390. var require_stringToPath = __commonJS2({
  3391. "node_modules/lodash/_stringToPath.js"(exports2, module2) {
  3392. var memoizeCapped = require_memoizeCapped();
  3393. var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  3394. var reEscapeChar = /\\(\\)?/g;
  3395. var stringToPath = memoizeCapped(function(string) {
  3396. var result = [];
  3397. if (string.charCodeAt(0) === 46) {
  3398. result.push("");
  3399. }
  3400. string.replace(rePropName, function(match, number, quote, subString) {
  3401. result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
  3402. });
  3403. return result;
  3404. });
  3405. module2.exports = stringToPath;
  3406. }
  3407. });
  3408. var require_arrayMap = __commonJS2({
  3409. "node_modules/lodash/_arrayMap.js"(exports2, module2) {
  3410. function arrayMap(array, iteratee) {
  3411. var index = -1, length = array == null ? 0 : array.length, result = Array(length);
  3412. while (++index < length) {
  3413. result[index] = iteratee(array[index], index, array);
  3414. }
  3415. return result;
  3416. }
  3417. module2.exports = arrayMap;
  3418. }
  3419. });
  3420. var require_baseToString = __commonJS2({
  3421. "node_modules/lodash/_baseToString.js"(exports2, module2) {
  3422. var Symbol2 = require_Symbol();
  3423. var arrayMap = require_arrayMap();
  3424. var isArray = require_isArray();
  3425. var isSymbol = require_isSymbol();
  3426. var INFINITY = 1 / 0;
  3427. var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
  3428. var symbolToString = symbolProto ? symbolProto.toString : void 0;
  3429. function baseToString(value) {
  3430. if (typeof value == "string") {
  3431. return value;
  3432. }
  3433. if (isArray(value)) {
  3434. return arrayMap(value, baseToString) + "";
  3435. }
  3436. if (isSymbol(value)) {
  3437. return symbolToString ? symbolToString.call(value) : "";
  3438. }
  3439. var result = value + "";
  3440. return result == "0" && 1 / value == -INFINITY ? "-0" : result;
  3441. }
  3442. module2.exports = baseToString;
  3443. }
  3444. });
  3445. var require_toString = __commonJS2({
  3446. "node_modules/lodash/toString.js"(exports2, module2) {
  3447. var baseToString = require_baseToString();
  3448. function toString(value) {
  3449. return value == null ? "" : baseToString(value);
  3450. }
  3451. module2.exports = toString;
  3452. }
  3453. });
  3454. var require_castPath = __commonJS2({
  3455. "node_modules/lodash/_castPath.js"(exports2, module2) {
  3456. var isArray = require_isArray();
  3457. var isKey = require_isKey();
  3458. var stringToPath = require_stringToPath();
  3459. var toString = require_toString();
  3460. function castPath(value, object) {
  3461. if (isArray(value)) {
  3462. return value;
  3463. }
  3464. return isKey(value, object) ? [value] : stringToPath(toString(value));
  3465. }
  3466. module2.exports = castPath;
  3467. }
  3468. });
  3469. var require_toKey = __commonJS2({
  3470. "node_modules/lodash/_toKey.js"(exports2, module2) {
  3471. var isSymbol = require_isSymbol();
  3472. var INFINITY = 1 / 0;
  3473. function toKey(value) {
  3474. if (typeof value == "string" || isSymbol(value)) {
  3475. return value;
  3476. }
  3477. var result = value + "";
  3478. return result == "0" && 1 / value == -INFINITY ? "-0" : result;
  3479. }
  3480. module2.exports = toKey;
  3481. }
  3482. });
  3483. var require_baseGet = __commonJS2({
  3484. "node_modules/lodash/_baseGet.js"(exports2, module2) {
  3485. var castPath = require_castPath();
  3486. var toKey = require_toKey();
  3487. function baseGet(object, path) {
  3488. path = castPath(path, object);
  3489. var index = 0, length = path.length;
  3490. while (object != null && index < length) {
  3491. object = object[toKey(path[index++])];
  3492. }
  3493. return index && index == length ? object : void 0;
  3494. }
  3495. module2.exports = baseGet;
  3496. }
  3497. });
  3498. var require_defineProperty = __commonJS2({
  3499. "node_modules/lodash/_defineProperty.js"(exports2, module2) {
  3500. var getNative = require_getNative();
  3501. var defineProperty = function() {
  3502. try {
  3503. var func = getNative(Object, "defineProperty");
  3504. func({}, "", {});
  3505. return func;
  3506. } catch (e) {
  3507. }
  3508. }();
  3509. module2.exports = defineProperty;
  3510. }
  3511. });
  3512. var require_baseAssignValue = __commonJS2({
  3513. "node_modules/lodash/_baseAssignValue.js"(exports2, module2) {
  3514. var defineProperty = require_defineProperty();
  3515. function baseAssignValue(object, key, value) {
  3516. if (key == "__proto__" && defineProperty) {
  3517. defineProperty(object, key, {
  3518. "configurable": true,
  3519. "enumerable": true,
  3520. "value": value,
  3521. "writable": true
  3522. });
  3523. } else {
  3524. object[key] = value;
  3525. }
  3526. }
  3527. module2.exports = baseAssignValue;
  3528. }
  3529. });
  3530. var require_assignValue = __commonJS2({
  3531. "node_modules/lodash/_assignValue.js"(exports2, module2) {
  3532. var baseAssignValue = require_baseAssignValue();
  3533. var eq = require_eq();
  3534. var objectProto = Object.prototype;
  3535. var hasOwnProperty = objectProto.hasOwnProperty;
  3536. function assignValue(object, key, value) {
  3537. var objValue = object[key];
  3538. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
  3539. baseAssignValue(object, key, value);
  3540. }
  3541. }
  3542. module2.exports = assignValue;
  3543. }
  3544. });
  3545. var require_isIndex = __commonJS2({
  3546. "node_modules/lodash/_isIndex.js"(exports2, module2) {
  3547. var MAX_SAFE_INTEGER = 9007199254740991;
  3548. var reIsUint = /^(?:0|[1-9]\d*)$/;
  3549. function isIndex(value, length) {
  3550. var type = typeof value;
  3551. length = length == null ? MAX_SAFE_INTEGER : length;
  3552. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
  3553. }
  3554. module2.exports = isIndex;
  3555. }
  3556. });
  3557. var require_baseSet = __commonJS2({
  3558. "node_modules/lodash/_baseSet.js"(exports2, module2) {
  3559. var assignValue = require_assignValue();
  3560. var castPath = require_castPath();
  3561. var isIndex = require_isIndex();
  3562. var isObject = require_isObject();
  3563. var toKey = require_toKey();
  3564. function baseSet(object, path, value, customizer) {
  3565. if (!isObject(object)) {
  3566. return object;
  3567. }
  3568. path = castPath(path, object);
  3569. var index = -1, length = path.length, lastIndex = length - 1, nested = object;
  3570. while (nested != null && ++index < length) {
  3571. var key = toKey(path[index]), newValue = value;
  3572. if (key === "__proto__" || key === "constructor" || key === "prototype") {
  3573. return object;
  3574. }
  3575. if (index != lastIndex) {
  3576. var objValue = nested[key];
  3577. newValue = customizer ? customizer(objValue, key, nested) : void 0;
  3578. if (newValue === void 0) {
  3579. newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
  3580. }
  3581. }
  3582. assignValue(nested, key, newValue);
  3583. nested = nested[key];
  3584. }
  3585. return object;
  3586. }
  3587. module2.exports = baseSet;
  3588. }
  3589. });
  3590. var require_basePickBy = __commonJS2({
  3591. "node_modules/lodash/_basePickBy.js"(exports2, module2) {
  3592. var baseGet = require_baseGet();
  3593. var baseSet = require_baseSet();
  3594. var castPath = require_castPath();
  3595. function basePickBy(object, paths, predicate) {
  3596. var index = -1, length = paths.length, result = {};
  3597. while (++index < length) {
  3598. var path = paths[index], value = baseGet(object, path);
  3599. if (predicate(value, path)) {
  3600. baseSet(result, castPath(path, object), value);
  3601. }
  3602. }
  3603. return result;
  3604. }
  3605. module2.exports = basePickBy;
  3606. }
  3607. });
  3608. var require_baseHasIn = __commonJS2({
  3609. "node_modules/lodash/_baseHasIn.js"(exports2, module2) {
  3610. function baseHasIn(object, key) {
  3611. return object != null && key in Object(object);
  3612. }
  3613. module2.exports = baseHasIn;
  3614. }
  3615. });
  3616. var require_baseIsArguments = __commonJS2({
  3617. "node_modules/lodash/_baseIsArguments.js"(exports2, module2) {
  3618. var baseGetTag = require_baseGetTag();
  3619. var isObjectLike = require_isObjectLike();
  3620. var argsTag = "[object Arguments]";
  3621. function baseIsArguments(value) {
  3622. return isObjectLike(value) && baseGetTag(value) == argsTag;
  3623. }
  3624. module2.exports = baseIsArguments;
  3625. }
  3626. });
  3627. var require_isArguments = __commonJS2({
  3628. "node_modules/lodash/isArguments.js"(exports2, module2) {
  3629. var baseIsArguments = require_baseIsArguments();
  3630. var isObjectLike = require_isObjectLike();
  3631. var objectProto = Object.prototype;
  3632. var hasOwnProperty = objectProto.hasOwnProperty;
  3633. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  3634. var isArguments = baseIsArguments(function() {
  3635. return arguments;
  3636. }()) ? baseIsArguments : function(value) {
  3637. return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  3638. };
  3639. module2.exports = isArguments;
  3640. }
  3641. });
  3642. var require_isLength = __commonJS2({
  3643. "node_modules/lodash/isLength.js"(exports2, module2) {
  3644. var MAX_SAFE_INTEGER = 9007199254740991;
  3645. function isLength(value) {
  3646. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  3647. }
  3648. module2.exports = isLength;
  3649. }
  3650. });
  3651. var require_hasPath = __commonJS2({
  3652. "node_modules/lodash/_hasPath.js"(exports2, module2) {
  3653. var castPath = require_castPath();
  3654. var isArguments = require_isArguments();
  3655. var isArray = require_isArray();
  3656. var isIndex = require_isIndex();
  3657. var isLength = require_isLength();
  3658. var toKey = require_toKey();
  3659. function hasPath(object, path, hasFunc) {
  3660. path = castPath(path, object);
  3661. var index = -1, length = path.length, result = false;
  3662. while (++index < length) {
  3663. var key = toKey(path[index]);
  3664. if (!(result = object != null && hasFunc(object, key))) {
  3665. break;
  3666. }
  3667. object = object[key];
  3668. }
  3669. if (result || ++index != length) {
  3670. return result;
  3671. }
  3672. length = object == null ? 0 : object.length;
  3673. return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
  3674. }
  3675. module2.exports = hasPath;
  3676. }
  3677. });
  3678. var require_hasIn = __commonJS2({
  3679. "node_modules/lodash/hasIn.js"(exports2, module2) {
  3680. var baseHasIn = require_baseHasIn();
  3681. var hasPath = require_hasPath();
  3682. function hasIn(object, path) {
  3683. return object != null && hasPath(object, path, baseHasIn);
  3684. }
  3685. module2.exports = hasIn;
  3686. }
  3687. });
  3688. var require_basePick = __commonJS2({
  3689. "node_modules/lodash/_basePick.js"(exports2, module2) {
  3690. var basePickBy = require_basePickBy();
  3691. var hasIn = require_hasIn();
  3692. function basePick(object, paths) {
  3693. return basePickBy(object, paths, function(value, path) {
  3694. return hasIn(object, path);
  3695. });
  3696. }
  3697. module2.exports = basePick;
  3698. }
  3699. });
  3700. var require_arrayPush = __commonJS2({
  3701. "node_modules/lodash/_arrayPush.js"(exports2, module2) {
  3702. function arrayPush(array, values) {
  3703. var index = -1, length = values.length, offset = array.length;
  3704. while (++index < length) {
  3705. array[offset + index] = values[index];
  3706. }
  3707. return array;
  3708. }
  3709. module2.exports = arrayPush;
  3710. }
  3711. });
  3712. var require_isFlattenable = __commonJS2({
  3713. "node_modules/lodash/_isFlattenable.js"(exports2, module2) {
  3714. var Symbol2 = require_Symbol();
  3715. var isArguments = require_isArguments();
  3716. var isArray = require_isArray();
  3717. var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0;
  3718. function isFlattenable(value) {
  3719. return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  3720. }
  3721. module2.exports = isFlattenable;
  3722. }
  3723. });
  3724. var require_baseFlatten = __commonJS2({
  3725. "node_modules/lodash/_baseFlatten.js"(exports2, module2) {
  3726. var arrayPush = require_arrayPush();
  3727. var isFlattenable = require_isFlattenable();
  3728. function baseFlatten(array, depth, predicate, isStrict, result) {
  3729. var index = -1, length = array.length;
  3730. predicate || (predicate = isFlattenable);
  3731. result || (result = []);
  3732. while (++index < length) {
  3733. var value = array[index];
  3734. if (depth > 0 && predicate(value)) {
  3735. if (depth > 1) {
  3736. baseFlatten(value, depth - 1, predicate, isStrict, result);
  3737. } else {
  3738. arrayPush(result, value);
  3739. }
  3740. } else if (!isStrict) {
  3741. result[result.length] = value;
  3742. }
  3743. }
  3744. return result;
  3745. }
  3746. module2.exports = baseFlatten;
  3747. }
  3748. });
  3749. var require_flatten = __commonJS2({
  3750. "node_modules/lodash/flatten.js"(exports2, module2) {
  3751. var baseFlatten = require_baseFlatten();
  3752. function flatten(array) {
  3753. var length = array == null ? 0 : array.length;
  3754. return length ? baseFlatten(array, 1) : [];
  3755. }
  3756. module2.exports = flatten;
  3757. }
  3758. });
  3759. var require_apply = __commonJS2({
  3760. "node_modules/lodash/_apply.js"(exports2, module2) {
  3761. function apply(func, thisArg, args) {
  3762. switch (args.length) {
  3763. case 0:
  3764. return func.call(thisArg);
  3765. case 1:
  3766. return func.call(thisArg, args[0]);
  3767. case 2:
  3768. return func.call(thisArg, args[0], args[1]);
  3769. case 3:
  3770. return func.call(thisArg, args[0], args[1], args[2]);
  3771. }
  3772. return func.apply(thisArg, args);
  3773. }
  3774. module2.exports = apply;
  3775. }
  3776. });
  3777. var require_overRest = __commonJS2({
  3778. "node_modules/lodash/_overRest.js"(exports2, module2) {
  3779. var apply = require_apply();
  3780. var nativeMax = Math.max;
  3781. function overRest(func, start, transform) {
  3782. start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
  3783. return function() {
  3784. var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
  3785. while (++index < length) {
  3786. array[index] = args[start + index];
  3787. }
  3788. index = -1;
  3789. var otherArgs = Array(start + 1);
  3790. while (++index < start) {
  3791. otherArgs[index] = args[index];
  3792. }
  3793. otherArgs[start] = transform(array);
  3794. return apply(func, this, otherArgs);
  3795. };
  3796. }
  3797. module2.exports = overRest;
  3798. }
  3799. });
  3800. var require_constant2 = __commonJS2({
  3801. "node_modules/lodash/constant.js"(exports2, module2) {
  3802. function constant(value) {
  3803. return function() {
  3804. return value;
  3805. };
  3806. }
  3807. module2.exports = constant;
  3808. }
  3809. });
  3810. var require_identity = __commonJS2({
  3811. "node_modules/lodash/identity.js"(exports2, module2) {
  3812. function identity(value) {
  3813. return value;
  3814. }
  3815. module2.exports = identity;
  3816. }
  3817. });
  3818. var require_baseSetToString = __commonJS2({
  3819. "node_modules/lodash/_baseSetToString.js"(exports2, module2) {
  3820. var constant = require_constant2();
  3821. var defineProperty = require_defineProperty();
  3822. var identity = require_identity();
  3823. var baseSetToString = !defineProperty ? identity : function(func, string) {
  3824. return defineProperty(func, "toString", {
  3825. "configurable": true,
  3826. "enumerable": false,
  3827. "value": constant(string),
  3828. "writable": true
  3829. });
  3830. };
  3831. module2.exports = baseSetToString;
  3832. }
  3833. });
  3834. var require_shortOut = __commonJS2({
  3835. "node_modules/lodash/_shortOut.js"(exports2, module2) {
  3836. var HOT_COUNT = 800;
  3837. var HOT_SPAN = 16;
  3838. var nativeNow = Date.now;
  3839. function shortOut(func) {
  3840. var count = 0, lastCalled = 0;
  3841. return function() {
  3842. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  3843. lastCalled = stamp;
  3844. if (remaining > 0) {
  3845. if (++count >= HOT_COUNT) {
  3846. return arguments[0];
  3847. }
  3848. } else {
  3849. count = 0;
  3850. }
  3851. return func.apply(void 0, arguments);
  3852. };
  3853. }
  3854. module2.exports = shortOut;
  3855. }
  3856. });
  3857. var require_setToString = __commonJS2({
  3858. "node_modules/lodash/_setToString.js"(exports2, module2) {
  3859. var baseSetToString = require_baseSetToString();
  3860. var shortOut = require_shortOut();
  3861. var setToString = shortOut(baseSetToString);
  3862. module2.exports = setToString;
  3863. }
  3864. });
  3865. var require_flatRest = __commonJS2({
  3866. "node_modules/lodash/_flatRest.js"(exports2, module2) {
  3867. var flatten = require_flatten();
  3868. var overRest = require_overRest();
  3869. var setToString = require_setToString();
  3870. function flatRest(func) {
  3871. return setToString(overRest(func, void 0, flatten), func + "");
  3872. }
  3873. module2.exports = flatRest;
  3874. }
  3875. });
  3876. var require_pick = __commonJS2({
  3877. "node_modules/lodash/pick.js"(exports2, module2) {
  3878. var basePick = require_basePick();
  3879. var flatRest = require_flatRest();
  3880. var pick = flatRest(function(object, paths) {
  3881. return object == null ? {} : basePick(object, paths);
  3882. });
  3883. module2.exports = pick;
  3884. }
  3885. });
  3886. var require_camelcase = __commonJS2({
  3887. "node_modules/camelcase/index.js"(exports2, module2) {
  3888. "use strict";
  3889. var UPPERCASE = /[\p{Lu}]/u;
  3890. var LOWERCASE = /[\p{Ll}]/u;
  3891. var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
  3892. var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
  3893. var SEPARATORS = /[_.\- ]+/;
  3894. var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
  3895. var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
  3896. var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
  3897. var preserveCamelCase = (string, toLowerCase, toUpperCase) => {
  3898. let isLastCharLower = false;
  3899. let isLastCharUpper = false;
  3900. let isLastLastCharUpper = false;
  3901. for (let i = 0; i < string.length; i++) {
  3902. const character = string[i];
  3903. if (isLastCharLower && UPPERCASE.test(character)) {
  3904. string = string.slice(0, i) + "-" + string.slice(i);
  3905. isLastCharLower = false;
  3906. isLastLastCharUpper = isLastCharUpper;
  3907. isLastCharUpper = true;
  3908. i++;
  3909. } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
  3910. string = string.slice(0, i - 1) + "-" + string.slice(i - 1);
  3911. isLastLastCharUpper = isLastCharUpper;
  3912. isLastCharUpper = false;
  3913. isLastCharLower = true;
  3914. } else {
  3915. isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
  3916. isLastLastCharUpper = isLastCharUpper;
  3917. isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
  3918. }
  3919. }
  3920. return string;
  3921. };
  3922. var preserveConsecutiveUppercase = (input, toLowerCase) => {
  3923. LEADING_CAPITAL.lastIndex = 0;
  3924. return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
  3925. };
  3926. var postProcess = (input, toUpperCase) => {
  3927. SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
  3928. NUMBERS_AND_IDENTIFIER.lastIndex = 0;
  3929. return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
  3930. };
  3931. var camelCase = (input, options) => {
  3932. if (!(typeof input === "string" || Array.isArray(input))) {
  3933. throw new TypeError("Expected the input to be `string | string[]`");
  3934. }
  3935. options = Object.assign({
  3936. pascalCase: false,
  3937. preserveConsecutiveUppercase: false
  3938. }, options);
  3939. if (Array.isArray(input)) {
  3940. input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
  3941. } else {
  3942. input = input.trim();
  3943. }
  3944. if (input.length === 0) {
  3945. return "";
  3946. }
  3947. const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
  3948. const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
  3949. if (input.length === 1) {
  3950. return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
  3951. }
  3952. const hasUpperCase = input !== toLowerCase(input);
  3953. if (hasUpperCase) {
  3954. input = preserveCamelCase(input, toLowerCase, toUpperCase);
  3955. }
  3956. input = input.replace(LEADING_SEPARATORS, "");
  3957. if (options.preserveConsecutiveUppercase) {
  3958. input = preserveConsecutiveUppercase(input, toLowerCase);
  3959. } else {
  3960. input = toLowerCase(input);
  3961. }
  3962. if (options.pascalCase) {
  3963. input = toUpperCase(input.charAt(0)) + input.slice(1);
  3964. }
  3965. return postProcess(input, toUpperCase);
  3966. };
  3967. module2.exports = camelCase;
  3968. module2.exports.default = camelCase;
  3969. }
  3970. });
  3971. var require_minimist = __commonJS2({
  3972. "node_modules/minimist/index.js"(exports2, module2) {
  3973. module2.exports = function(args, opts) {
  3974. if (!opts)
  3975. opts = {};
  3976. var flags = {
  3977. bools: {},
  3978. strings: {},
  3979. unknownFn: null
  3980. };
  3981. if (typeof opts["unknown"] === "function") {
  3982. flags.unknownFn = opts["unknown"];
  3983. }
  3984. if (typeof opts["boolean"] === "boolean" && opts["boolean"]) {
  3985. flags.allBools = true;
  3986. } else {
  3987. [].concat(opts["boolean"]).filter(Boolean).forEach(function(key2) {
  3988. flags.bools[key2] = true;
  3989. });
  3990. }
  3991. var aliases = {};
  3992. Object.keys(opts.alias || {}).forEach(function(key2) {
  3993. aliases[key2] = [].concat(opts.alias[key2]);
  3994. aliases[key2].forEach(function(x) {
  3995. aliases[x] = [key2].concat(aliases[key2].filter(function(y) {
  3996. return x !== y;
  3997. }));
  3998. });
  3999. });
  4000. [].concat(opts.string).filter(Boolean).forEach(function(key2) {
  4001. flags.strings[key2] = true;
  4002. if (aliases[key2]) {
  4003. flags.strings[aliases[key2]] = true;
  4004. }
  4005. });
  4006. var defaults = opts["default"] || {};
  4007. var argv = {
  4008. _: []
  4009. };
  4010. Object.keys(flags.bools).forEach(function(key2) {
  4011. setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
  4012. });
  4013. var notFlags = [];
  4014. if (args.indexOf("--") !== -1) {
  4015. notFlags = args.slice(args.indexOf("--") + 1);
  4016. args = args.slice(0, args.indexOf("--"));
  4017. }
  4018. function argDefined(key2, arg2) {
  4019. return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
  4020. }
  4021. function setArg(key2, val, arg2) {
  4022. if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
  4023. if (flags.unknownFn(arg2) === false)
  4024. return;
  4025. }
  4026. var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
  4027. setKey(argv, key2.split("."), value2);
  4028. (aliases[key2] || []).forEach(function(x) {
  4029. setKey(argv, x.split("."), value2);
  4030. });
  4031. }
  4032. function setKey(obj, keys, value2) {
  4033. var o = obj;
  4034. for (var i2 = 0; i2 < keys.length - 1; i2++) {
  4035. var key2 = keys[i2];
  4036. if (isConstructorOrProto(o, key2))
  4037. return;
  4038. if (o[key2] === void 0)
  4039. o[key2] = {};
  4040. if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype)
  4041. o[key2] = {};
  4042. if (o[key2] === Array.prototype)
  4043. o[key2] = [];
  4044. o = o[key2];
  4045. }
  4046. var key2 = keys[keys.length - 1];
  4047. if (isConstructorOrProto(o, key2))
  4048. return;
  4049. if (o === Object.prototype || o === Number.prototype || o === String.prototype)
  4050. o = {};
  4051. if (o === Array.prototype)
  4052. o = [];
  4053. if (o[key2] === void 0 || flags.bools[key2] || typeof o[key2] === "boolean") {
  4054. o[key2] = value2;
  4055. } else if (Array.isArray(o[key2])) {
  4056. o[key2].push(value2);
  4057. } else {
  4058. o[key2] = [o[key2], value2];
  4059. }
  4060. }
  4061. function aliasIsBoolean(key2) {
  4062. return aliases[key2].some(function(x) {
  4063. return flags.bools[x];
  4064. });
  4065. }
  4066. for (var i = 0; i < args.length; i++) {
  4067. var arg = args[i];
  4068. if (/^--.+=/.test(arg)) {
  4069. var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
  4070. var key = m[1];
  4071. var value = m[2];
  4072. if (flags.bools[key]) {
  4073. value = value !== "false";
  4074. }
  4075. setArg(key, value, arg);
  4076. } else if (/^--no-.+/.test(arg)) {
  4077. var key = arg.match(/^--no-(.+)/)[1];
  4078. setArg(key, false, arg);
  4079. } else if (/^--.+/.test(arg)) {
  4080. var key = arg.match(/^--(.+)/)[1];
  4081. var next = args[i + 1];
  4082. if (next !== void 0 && !/^-/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
  4083. setArg(key, next, arg);
  4084. i++;
  4085. } else if (/^(true|false)$/.test(next)) {
  4086. setArg(key, next === "true", arg);
  4087. i++;
  4088. } else {
  4089. setArg(key, flags.strings[key] ? "" : true, arg);
  4090. }
  4091. } else if (/^-[^-]+/.test(arg)) {
  4092. var letters = arg.slice(1, -1).split("");
  4093. var broken = false;
  4094. for (var j = 0; j < letters.length; j++) {
  4095. var next = arg.slice(j + 2);
  4096. if (next === "-") {
  4097. setArg(letters[j], next, arg);
  4098. continue;
  4099. }
  4100. if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
  4101. setArg(letters[j], next.split("=")[1], arg);
  4102. broken = true;
  4103. break;
  4104. }
  4105. if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
  4106. setArg(letters[j], next, arg);
  4107. broken = true;
  4108. break;
  4109. }
  4110. if (letters[j + 1] && letters[j + 1].match(/\W/)) {
  4111. setArg(letters[j], arg.slice(j + 2), arg);
  4112. broken = true;
  4113. break;
  4114. } else {
  4115. setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg);
  4116. }
  4117. }
  4118. var key = arg.slice(-1)[0];
  4119. if (!broken && key !== "-") {
  4120. if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
  4121. setArg(key, args[i + 1], arg);
  4122. i++;
  4123. } else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
  4124. setArg(key, args[i + 1] === "true", arg);
  4125. i++;
  4126. } else {
  4127. setArg(key, flags.strings[key] ? "" : true, arg);
  4128. }
  4129. }
  4130. } else {
  4131. if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
  4132. argv._.push(flags.strings["_"] || !isNumber(arg) ? arg : Number(arg));
  4133. }
  4134. if (opts.stopEarly) {
  4135. argv._.push.apply(argv._, args.slice(i + 1));
  4136. break;
  4137. }
  4138. }
  4139. }
  4140. Object.keys(defaults).forEach(function(key2) {
  4141. if (!hasKey(argv, key2.split("."))) {
  4142. setKey(argv, key2.split("."), defaults[key2]);
  4143. (aliases[key2] || []).forEach(function(x) {
  4144. setKey(argv, x.split("."), defaults[key2]);
  4145. });
  4146. }
  4147. });
  4148. if (opts["--"]) {
  4149. argv["--"] = new Array();
  4150. notFlags.forEach(function(key2) {
  4151. argv["--"].push(key2);
  4152. });
  4153. } else {
  4154. notFlags.forEach(function(key2) {
  4155. argv._.push(key2);
  4156. });
  4157. }
  4158. return argv;
  4159. };
  4160. function hasKey(obj, keys) {
  4161. var o = obj;
  4162. keys.slice(0, -1).forEach(function(key2) {
  4163. o = o[key2] || {};
  4164. });
  4165. var key = keys[keys.length - 1];
  4166. return key in o;
  4167. }
  4168. function isNumber(x) {
  4169. if (typeof x === "number")
  4170. return true;
  4171. if (/^0x[0-9a-f]+$/i.test(x))
  4172. return true;
  4173. return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
  4174. }
  4175. function isConstructorOrProto(obj, key) {
  4176. return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
  4177. }
  4178. }
  4179. });
  4180. var require_minimist2 = __commonJS2({
  4181. "src/cli/options/minimist.js"(exports2, module2) {
  4182. "use strict";
  4183. var minimist = require_minimist();
  4184. var PLACEHOLDER = null;
  4185. module2.exports = function(args, options) {
  4186. const boolean = options.boolean || [];
  4187. const defaults = options.default || {};
  4188. const booleanWithoutDefault = boolean.filter((key) => !(key in defaults));
  4189. const newDefaults = Object.assign(Object.assign({}, defaults), Object.fromEntries(booleanWithoutDefault.map((key) => [key, PLACEHOLDER])));
  4190. const parsed = minimist(args, Object.assign(Object.assign({}, options), {}, {
  4191. default: newDefaults
  4192. }));
  4193. return Object.fromEntries(Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER));
  4194. };
  4195. }
  4196. });
  4197. var require_arrayAggregator = __commonJS2({
  4198. "node_modules/lodash/_arrayAggregator.js"(exports2, module2) {
  4199. function arrayAggregator(array, setter, iteratee, accumulator) {
  4200. var index = -1, length = array == null ? 0 : array.length;
  4201. while (++index < length) {
  4202. var value = array[index];
  4203. setter(accumulator, value, iteratee(value), array);
  4204. }
  4205. return accumulator;
  4206. }
  4207. module2.exports = arrayAggregator;
  4208. }
  4209. });
  4210. var require_createBaseFor = __commonJS2({
  4211. "node_modules/lodash/_createBaseFor.js"(exports2, module2) {
  4212. function createBaseFor(fromRight) {
  4213. return function(object, iteratee, keysFunc) {
  4214. var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
  4215. while (length--) {
  4216. var key = props[fromRight ? length : ++index];
  4217. if (iteratee(iterable[key], key, iterable) === false) {
  4218. break;
  4219. }
  4220. }
  4221. return object;
  4222. };
  4223. }
  4224. module2.exports = createBaseFor;
  4225. }
  4226. });
  4227. var require_baseFor = __commonJS2({
  4228. "node_modules/lodash/_baseFor.js"(exports2, module2) {
  4229. var createBaseFor = require_createBaseFor();
  4230. var baseFor = createBaseFor();
  4231. module2.exports = baseFor;
  4232. }
  4233. });
  4234. var require_baseTimes = __commonJS2({
  4235. "node_modules/lodash/_baseTimes.js"(exports2, module2) {
  4236. function baseTimes(n, iteratee) {
  4237. var index = -1, result = Array(n);
  4238. while (++index < n) {
  4239. result[index] = iteratee(index);
  4240. }
  4241. return result;
  4242. }
  4243. module2.exports = baseTimes;
  4244. }
  4245. });
  4246. var require_stubFalse = __commonJS2({
  4247. "node_modules/lodash/stubFalse.js"(exports2, module2) {
  4248. function stubFalse() {
  4249. return false;
  4250. }
  4251. module2.exports = stubFalse;
  4252. }
  4253. });
  4254. var require_isBuffer = __commonJS2({
  4255. "node_modules/lodash/isBuffer.js"(exports2, module2) {
  4256. var root = require_root();
  4257. var stubFalse = require_stubFalse();
  4258. var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2;
  4259. var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
  4260. var moduleExports = freeModule && freeModule.exports === freeExports;
  4261. var Buffer2 = moduleExports ? root.Buffer : void 0;
  4262. var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
  4263. var isBuffer = nativeIsBuffer || stubFalse;
  4264. module2.exports = isBuffer;
  4265. }
  4266. });
  4267. var require_baseIsTypedArray = __commonJS2({
  4268. "node_modules/lodash/_baseIsTypedArray.js"(exports2, module2) {
  4269. var baseGetTag = require_baseGetTag();
  4270. var isLength = require_isLength();
  4271. var isObjectLike = require_isObjectLike();
  4272. var argsTag = "[object Arguments]";
  4273. var arrayTag = "[object Array]";
  4274. var boolTag = "[object Boolean]";
  4275. var dateTag = "[object Date]";
  4276. var errorTag = "[object Error]";
  4277. var funcTag = "[object Function]";
  4278. var mapTag = "[object Map]";
  4279. var numberTag = "[object Number]";
  4280. var objectTag = "[object Object]";
  4281. var regexpTag = "[object RegExp]";
  4282. var setTag = "[object Set]";
  4283. var stringTag = "[object String]";
  4284. var weakMapTag = "[object WeakMap]";
  4285. var arrayBufferTag = "[object ArrayBuffer]";
  4286. var dataViewTag = "[object DataView]";
  4287. var float32Tag = "[object Float32Array]";
  4288. var float64Tag = "[object Float64Array]";
  4289. var int8Tag = "[object Int8Array]";
  4290. var int16Tag = "[object Int16Array]";
  4291. var int32Tag = "[object Int32Array]";
  4292. var uint8Tag = "[object Uint8Array]";
  4293. var uint8ClampedTag = "[object Uint8ClampedArray]";
  4294. var uint16Tag = "[object Uint16Array]";
  4295. var uint32Tag = "[object Uint32Array]";
  4296. var typedArrayTags = {};
  4297. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  4298. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  4299. function baseIsTypedArray(value) {
  4300. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  4301. }
  4302. module2.exports = baseIsTypedArray;
  4303. }
  4304. });
  4305. var require_baseUnary = __commonJS2({
  4306. "node_modules/lodash/_baseUnary.js"(exports2, module2) {
  4307. function baseUnary(func) {
  4308. return function(value) {
  4309. return func(value);
  4310. };
  4311. }
  4312. module2.exports = baseUnary;
  4313. }
  4314. });
  4315. var require_nodeUtil = __commonJS2({
  4316. "node_modules/lodash/_nodeUtil.js"(exports2, module2) {
  4317. var freeGlobal = require_freeGlobal();
  4318. var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2;
  4319. var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
  4320. var moduleExports = freeModule && freeModule.exports === freeExports;
  4321. var freeProcess = moduleExports && freeGlobal.process;
  4322. var nodeUtil = function() {
  4323. try {
  4324. var types = freeModule && freeModule.require && freeModule.require("util").types;
  4325. if (types) {
  4326. return types;
  4327. }
  4328. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  4329. } catch (e) {
  4330. }
  4331. }();
  4332. module2.exports = nodeUtil;
  4333. }
  4334. });
  4335. var require_isTypedArray = __commonJS2({
  4336. "node_modules/lodash/isTypedArray.js"(exports2, module2) {
  4337. var baseIsTypedArray = require_baseIsTypedArray();
  4338. var baseUnary = require_baseUnary();
  4339. var nodeUtil = require_nodeUtil();
  4340. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  4341. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  4342. module2.exports = isTypedArray;
  4343. }
  4344. });
  4345. var require_arrayLikeKeys = __commonJS2({
  4346. "node_modules/lodash/_arrayLikeKeys.js"(exports2, module2) {
  4347. var baseTimes = require_baseTimes();
  4348. var isArguments = require_isArguments();
  4349. var isArray = require_isArray();
  4350. var isBuffer = require_isBuffer();
  4351. var isIndex = require_isIndex();
  4352. var isTypedArray = require_isTypedArray();
  4353. var objectProto = Object.prototype;
  4354. var hasOwnProperty = objectProto.hasOwnProperty;
  4355. function arrayLikeKeys(value, inherited) {
  4356. var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
  4357. for (var key in value) {
  4358. if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
  4359. result.push(key);
  4360. }
  4361. }
  4362. return result;
  4363. }
  4364. module2.exports = arrayLikeKeys;
  4365. }
  4366. });
  4367. var require_isPrototype = __commonJS2({
  4368. "node_modules/lodash/_isPrototype.js"(exports2, module2) {
  4369. var objectProto = Object.prototype;
  4370. function isPrototype(value) {
  4371. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
  4372. return value === proto;
  4373. }
  4374. module2.exports = isPrototype;
  4375. }
  4376. });
  4377. var require_overArg = __commonJS2({
  4378. "node_modules/lodash/_overArg.js"(exports2, module2) {
  4379. function overArg(func, transform) {
  4380. return function(arg) {
  4381. return func(transform(arg));
  4382. };
  4383. }
  4384. module2.exports = overArg;
  4385. }
  4386. });
  4387. var require_nativeKeys = __commonJS2({
  4388. "node_modules/lodash/_nativeKeys.js"(exports2, module2) {
  4389. var overArg = require_overArg();
  4390. var nativeKeys = overArg(Object.keys, Object);
  4391. module2.exports = nativeKeys;
  4392. }
  4393. });
  4394. var require_baseKeys = __commonJS2({
  4395. "node_modules/lodash/_baseKeys.js"(exports2, module2) {
  4396. var isPrototype = require_isPrototype();
  4397. var nativeKeys = require_nativeKeys();
  4398. var objectProto = Object.prototype;
  4399. var hasOwnProperty = objectProto.hasOwnProperty;
  4400. function baseKeys(object) {
  4401. if (!isPrototype(object)) {
  4402. return nativeKeys(object);
  4403. }
  4404. var result = [];
  4405. for (var key in Object(object)) {
  4406. if (hasOwnProperty.call(object, key) && key != "constructor") {
  4407. result.push(key);
  4408. }
  4409. }
  4410. return result;
  4411. }
  4412. module2.exports = baseKeys;
  4413. }
  4414. });
  4415. var require_isArrayLike = __commonJS2({
  4416. "node_modules/lodash/isArrayLike.js"(exports2, module2) {
  4417. var isFunction = require_isFunction();
  4418. var isLength = require_isLength();
  4419. function isArrayLike(value) {
  4420. return value != null && isLength(value.length) && !isFunction(value);
  4421. }
  4422. module2.exports = isArrayLike;
  4423. }
  4424. });
  4425. var require_keys = __commonJS2({
  4426. "node_modules/lodash/keys.js"(exports2, module2) {
  4427. var arrayLikeKeys = require_arrayLikeKeys();
  4428. var baseKeys = require_baseKeys();
  4429. var isArrayLike = require_isArrayLike();
  4430. function keys(object) {
  4431. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  4432. }
  4433. module2.exports = keys;
  4434. }
  4435. });
  4436. var require_baseForOwn = __commonJS2({
  4437. "node_modules/lodash/_baseForOwn.js"(exports2, module2) {
  4438. var baseFor = require_baseFor();
  4439. var keys = require_keys();
  4440. function baseForOwn(object, iteratee) {
  4441. return object && baseFor(object, iteratee, keys);
  4442. }
  4443. module2.exports = baseForOwn;
  4444. }
  4445. });
  4446. var require_createBaseEach = __commonJS2({
  4447. "node_modules/lodash/_createBaseEach.js"(exports2, module2) {
  4448. var isArrayLike = require_isArrayLike();
  4449. function createBaseEach(eachFunc, fromRight) {
  4450. return function(collection, iteratee) {
  4451. if (collection == null) {
  4452. return collection;
  4453. }
  4454. if (!isArrayLike(collection)) {
  4455. return eachFunc(collection, iteratee);
  4456. }
  4457. var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
  4458. while (fromRight ? index-- : ++index < length) {
  4459. if (iteratee(iterable[index], index, iterable) === false) {
  4460. break;
  4461. }
  4462. }
  4463. return collection;
  4464. };
  4465. }
  4466. module2.exports = createBaseEach;
  4467. }
  4468. });
  4469. var require_baseEach = __commonJS2({
  4470. "node_modules/lodash/_baseEach.js"(exports2, module2) {
  4471. var baseForOwn = require_baseForOwn();
  4472. var createBaseEach = require_createBaseEach();
  4473. var baseEach = createBaseEach(baseForOwn);
  4474. module2.exports = baseEach;
  4475. }
  4476. });
  4477. var require_baseAggregator = __commonJS2({
  4478. "node_modules/lodash/_baseAggregator.js"(exports2, module2) {
  4479. var baseEach = require_baseEach();
  4480. function baseAggregator(collection, setter, iteratee, accumulator) {
  4481. baseEach(collection, function(value, key, collection2) {
  4482. setter(accumulator, value, iteratee(value), collection2);
  4483. });
  4484. return accumulator;
  4485. }
  4486. module2.exports = baseAggregator;
  4487. }
  4488. });
  4489. var require_stackClear = __commonJS2({
  4490. "node_modules/lodash/_stackClear.js"(exports2, module2) {
  4491. var ListCache = require_ListCache();
  4492. function stackClear() {
  4493. this.__data__ = new ListCache();
  4494. this.size = 0;
  4495. }
  4496. module2.exports = stackClear;
  4497. }
  4498. });
  4499. var require_stackDelete = __commonJS2({
  4500. "node_modules/lodash/_stackDelete.js"(exports2, module2) {
  4501. function stackDelete(key) {
  4502. var data = this.__data__, result = data["delete"](key);
  4503. this.size = data.size;
  4504. return result;
  4505. }
  4506. module2.exports = stackDelete;
  4507. }
  4508. });
  4509. var require_stackGet = __commonJS2({
  4510. "node_modules/lodash/_stackGet.js"(exports2, module2) {
  4511. function stackGet(key) {
  4512. return this.__data__.get(key);
  4513. }
  4514. module2.exports = stackGet;
  4515. }
  4516. });
  4517. var require_stackHas = __commonJS2({
  4518. "node_modules/lodash/_stackHas.js"(exports2, module2) {
  4519. function stackHas(key) {
  4520. return this.__data__.has(key);
  4521. }
  4522. module2.exports = stackHas;
  4523. }
  4524. });
  4525. var require_stackSet = __commonJS2({
  4526. "node_modules/lodash/_stackSet.js"(exports2, module2) {
  4527. var ListCache = require_ListCache();
  4528. var Map2 = require_Map();
  4529. var MapCache = require_MapCache();
  4530. var LARGE_ARRAY_SIZE = 200;
  4531. function stackSet(key, value) {
  4532. var data = this.__data__;
  4533. if (data instanceof ListCache) {
  4534. var pairs = data.__data__;
  4535. if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
  4536. pairs.push([key, value]);
  4537. this.size = ++data.size;
  4538. return this;
  4539. }
  4540. data = this.__data__ = new MapCache(pairs);
  4541. }
  4542. data.set(key, value);
  4543. this.size = data.size;
  4544. return this;
  4545. }
  4546. module2.exports = stackSet;
  4547. }
  4548. });
  4549. var require_Stack = __commonJS2({
  4550. "node_modules/lodash/_Stack.js"(exports2, module2) {
  4551. var ListCache = require_ListCache();
  4552. var stackClear = require_stackClear();
  4553. var stackDelete = require_stackDelete();
  4554. var stackGet = require_stackGet();
  4555. var stackHas = require_stackHas();
  4556. var stackSet = require_stackSet();
  4557. function Stack(entries) {
  4558. var data = this.__data__ = new ListCache(entries);
  4559. this.size = data.size;
  4560. }
  4561. Stack.prototype.clear = stackClear;
  4562. Stack.prototype["delete"] = stackDelete;
  4563. Stack.prototype.get = stackGet;
  4564. Stack.prototype.has = stackHas;
  4565. Stack.prototype.set = stackSet;
  4566. module2.exports = Stack;
  4567. }
  4568. });
  4569. var require_setCacheAdd = __commonJS2({
  4570. "node_modules/lodash/_setCacheAdd.js"(exports2, module2) {
  4571. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  4572. function setCacheAdd(value) {
  4573. this.__data__.set(value, HASH_UNDEFINED);
  4574. return this;
  4575. }
  4576. module2.exports = setCacheAdd;
  4577. }
  4578. });
  4579. var require_setCacheHas = __commonJS2({
  4580. "node_modules/lodash/_setCacheHas.js"(exports2, module2) {
  4581. function setCacheHas(value) {
  4582. return this.__data__.has(value);
  4583. }
  4584. module2.exports = setCacheHas;
  4585. }
  4586. });
  4587. var require_SetCache = __commonJS2({
  4588. "node_modules/lodash/_SetCache.js"(exports2, module2) {
  4589. var MapCache = require_MapCache();
  4590. var setCacheAdd = require_setCacheAdd();
  4591. var setCacheHas = require_setCacheHas();
  4592. function SetCache(values) {
  4593. var index = -1, length = values == null ? 0 : values.length;
  4594. this.__data__ = new MapCache();
  4595. while (++index < length) {
  4596. this.add(values[index]);
  4597. }
  4598. }
  4599. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  4600. SetCache.prototype.has = setCacheHas;
  4601. module2.exports = SetCache;
  4602. }
  4603. });
  4604. var require_arraySome = __commonJS2({
  4605. "node_modules/lodash/_arraySome.js"(exports2, module2) {
  4606. function arraySome(array, predicate) {
  4607. var index = -1, length = array == null ? 0 : array.length;
  4608. while (++index < length) {
  4609. if (predicate(array[index], index, array)) {
  4610. return true;
  4611. }
  4612. }
  4613. return false;
  4614. }
  4615. module2.exports = arraySome;
  4616. }
  4617. });
  4618. var require_cacheHas = __commonJS2({
  4619. "node_modules/lodash/_cacheHas.js"(exports2, module2) {
  4620. function cacheHas(cache, key) {
  4621. return cache.has(key);
  4622. }
  4623. module2.exports = cacheHas;
  4624. }
  4625. });
  4626. var require_equalArrays = __commonJS2({
  4627. "node_modules/lodash/_equalArrays.js"(exports2, module2) {
  4628. var SetCache = require_SetCache();
  4629. var arraySome = require_arraySome();
  4630. var cacheHas = require_cacheHas();
  4631. var COMPARE_PARTIAL_FLAG = 1;
  4632. var COMPARE_UNORDERED_FLAG = 2;
  4633. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  4634. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
  4635. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  4636. return false;
  4637. }
  4638. var arrStacked = stack.get(array);
  4639. var othStacked = stack.get(other);
  4640. if (arrStacked && othStacked) {
  4641. return arrStacked == other && othStacked == array;
  4642. }
  4643. var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
  4644. stack.set(array, other);
  4645. stack.set(other, array);
  4646. while (++index < arrLength) {
  4647. var arrValue = array[index], othValue = other[index];
  4648. if (customizer) {
  4649. var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  4650. }
  4651. if (compared !== void 0) {
  4652. if (compared) {
  4653. continue;
  4654. }
  4655. result = false;
  4656. break;
  4657. }
  4658. if (seen) {
  4659. if (!arraySome(other, function(othValue2, othIndex) {
  4660. if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
  4661. return seen.push(othIndex);
  4662. }
  4663. })) {
  4664. result = false;
  4665. break;
  4666. }
  4667. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  4668. result = false;
  4669. break;
  4670. }
  4671. }
  4672. stack["delete"](array);
  4673. stack["delete"](other);
  4674. return result;
  4675. }
  4676. module2.exports = equalArrays;
  4677. }
  4678. });
  4679. var require_Uint8Array = __commonJS2({
  4680. "node_modules/lodash/_Uint8Array.js"(exports2, module2) {
  4681. var root = require_root();
  4682. var Uint8Array2 = root.Uint8Array;
  4683. module2.exports = Uint8Array2;
  4684. }
  4685. });
  4686. var require_mapToArray = __commonJS2({
  4687. "node_modules/lodash/_mapToArray.js"(exports2, module2) {
  4688. function mapToArray(map) {
  4689. var index = -1, result = Array(map.size);
  4690. map.forEach(function(value, key) {
  4691. result[++index] = [key, value];
  4692. });
  4693. return result;
  4694. }
  4695. module2.exports = mapToArray;
  4696. }
  4697. });
  4698. var require_setToArray = __commonJS2({
  4699. "node_modules/lodash/_setToArray.js"(exports2, module2) {
  4700. function setToArray(set) {
  4701. var index = -1, result = Array(set.size);
  4702. set.forEach(function(value) {
  4703. result[++index] = value;
  4704. });
  4705. return result;
  4706. }
  4707. module2.exports = setToArray;
  4708. }
  4709. });
  4710. var require_equalByTag = __commonJS2({
  4711. "node_modules/lodash/_equalByTag.js"(exports2, module2) {
  4712. var Symbol2 = require_Symbol();
  4713. var Uint8Array2 = require_Uint8Array();
  4714. var eq = require_eq();
  4715. var equalArrays = require_equalArrays();
  4716. var mapToArray = require_mapToArray();
  4717. var setToArray = require_setToArray();
  4718. var COMPARE_PARTIAL_FLAG = 1;
  4719. var COMPARE_UNORDERED_FLAG = 2;
  4720. var boolTag = "[object Boolean]";
  4721. var dateTag = "[object Date]";
  4722. var errorTag = "[object Error]";
  4723. var mapTag = "[object Map]";
  4724. var numberTag = "[object Number]";
  4725. var regexpTag = "[object RegExp]";
  4726. var setTag = "[object Set]";
  4727. var stringTag = "[object String]";
  4728. var symbolTag = "[object Symbol]";
  4729. var arrayBufferTag = "[object ArrayBuffer]";
  4730. var dataViewTag = "[object DataView]";
  4731. var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
  4732. var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
  4733. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  4734. switch (tag) {
  4735. case dataViewTag:
  4736. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
  4737. return false;
  4738. }
  4739. object = object.buffer;
  4740. other = other.buffer;
  4741. case arrayBufferTag:
  4742. if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
  4743. return false;
  4744. }
  4745. return true;
  4746. case boolTag:
  4747. case dateTag:
  4748. case numberTag:
  4749. return eq(+object, +other);
  4750. case errorTag:
  4751. return object.name == other.name && object.message == other.message;
  4752. case regexpTag:
  4753. case stringTag:
  4754. return object == other + "";
  4755. case mapTag:
  4756. var convert = mapToArray;
  4757. case setTag:
  4758. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  4759. convert || (convert = setToArray);
  4760. if (object.size != other.size && !isPartial) {
  4761. return false;
  4762. }
  4763. var stacked = stack.get(object);
  4764. if (stacked) {
  4765. return stacked == other;
  4766. }
  4767. bitmask |= COMPARE_UNORDERED_FLAG;
  4768. stack.set(object, other);
  4769. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  4770. stack["delete"](object);
  4771. return result;
  4772. case symbolTag:
  4773. if (symbolValueOf) {
  4774. return symbolValueOf.call(object) == symbolValueOf.call(other);
  4775. }
  4776. }
  4777. return false;
  4778. }
  4779. module2.exports = equalByTag;
  4780. }
  4781. });
  4782. var require_baseGetAllKeys = __commonJS2({
  4783. "node_modules/lodash/_baseGetAllKeys.js"(exports2, module2) {
  4784. var arrayPush = require_arrayPush();
  4785. var isArray = require_isArray();
  4786. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  4787. var result = keysFunc(object);
  4788. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  4789. }
  4790. module2.exports = baseGetAllKeys;
  4791. }
  4792. });
  4793. var require_arrayFilter = __commonJS2({
  4794. "node_modules/lodash/_arrayFilter.js"(exports2, module2) {
  4795. function arrayFilter(array, predicate) {
  4796. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  4797. while (++index < length) {
  4798. var value = array[index];
  4799. if (predicate(value, index, array)) {
  4800. result[resIndex++] = value;
  4801. }
  4802. }
  4803. return result;
  4804. }
  4805. module2.exports = arrayFilter;
  4806. }
  4807. });
  4808. var require_stubArray = __commonJS2({
  4809. "node_modules/lodash/stubArray.js"(exports2, module2) {
  4810. function stubArray() {
  4811. return [];
  4812. }
  4813. module2.exports = stubArray;
  4814. }
  4815. });
  4816. var require_getSymbols = __commonJS2({
  4817. "node_modules/lodash/_getSymbols.js"(exports2, module2) {
  4818. var arrayFilter = require_arrayFilter();
  4819. var stubArray = require_stubArray();
  4820. var objectProto = Object.prototype;
  4821. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  4822. var nativeGetSymbols = Object.getOwnPropertySymbols;
  4823. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  4824. if (object == null) {
  4825. return [];
  4826. }
  4827. object = Object(object);
  4828. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  4829. return propertyIsEnumerable.call(object, symbol);
  4830. });
  4831. };
  4832. module2.exports = getSymbols;
  4833. }
  4834. });
  4835. var require_getAllKeys = __commonJS2({
  4836. "node_modules/lodash/_getAllKeys.js"(exports2, module2) {
  4837. var baseGetAllKeys = require_baseGetAllKeys();
  4838. var getSymbols = require_getSymbols();
  4839. var keys = require_keys();
  4840. function getAllKeys(object) {
  4841. return baseGetAllKeys(object, keys, getSymbols);
  4842. }
  4843. module2.exports = getAllKeys;
  4844. }
  4845. });
  4846. var require_equalObjects = __commonJS2({
  4847. "node_modules/lodash/_equalObjects.js"(exports2, module2) {
  4848. var getAllKeys = require_getAllKeys();
  4849. var COMPARE_PARTIAL_FLAG = 1;
  4850. var objectProto = Object.prototype;
  4851. var hasOwnProperty = objectProto.hasOwnProperty;
  4852. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  4853. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
  4854. if (objLength != othLength && !isPartial) {
  4855. return false;
  4856. }
  4857. var index = objLength;
  4858. while (index--) {
  4859. var key = objProps[index];
  4860. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  4861. return false;
  4862. }
  4863. }
  4864. var objStacked = stack.get(object);
  4865. var othStacked = stack.get(other);
  4866. if (objStacked && othStacked) {
  4867. return objStacked == other && othStacked == object;
  4868. }
  4869. var result = true;
  4870. stack.set(object, other);
  4871. stack.set(other, object);
  4872. var skipCtor = isPartial;
  4873. while (++index < objLength) {
  4874. key = objProps[index];
  4875. var objValue = object[key], othValue = other[key];
  4876. if (customizer) {
  4877. var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  4878. }
  4879. if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  4880. result = false;
  4881. break;
  4882. }
  4883. skipCtor || (skipCtor = key == "constructor");
  4884. }
  4885. if (result && !skipCtor) {
  4886. var objCtor = object.constructor, othCtor = other.constructor;
  4887. if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
  4888. result = false;
  4889. }
  4890. }
  4891. stack["delete"](object);
  4892. stack["delete"](other);
  4893. return result;
  4894. }
  4895. module2.exports = equalObjects;
  4896. }
  4897. });
  4898. var require_DataView = __commonJS2({
  4899. "node_modules/lodash/_DataView.js"(exports2, module2) {
  4900. var getNative = require_getNative();
  4901. var root = require_root();
  4902. var DataView = getNative(root, "DataView");
  4903. module2.exports = DataView;
  4904. }
  4905. });
  4906. var require_Promise = __commonJS2({
  4907. "node_modules/lodash/_Promise.js"(exports2, module2) {
  4908. var getNative = require_getNative();
  4909. var root = require_root();
  4910. var Promise2 = getNative(root, "Promise");
  4911. module2.exports = Promise2;
  4912. }
  4913. });
  4914. var require_Set = __commonJS2({
  4915. "node_modules/lodash/_Set.js"(exports2, module2) {
  4916. var getNative = require_getNative();
  4917. var root = require_root();
  4918. var Set2 = getNative(root, "Set");
  4919. module2.exports = Set2;
  4920. }
  4921. });
  4922. var require_WeakMap = __commonJS2({
  4923. "node_modules/lodash/_WeakMap.js"(exports2, module2) {
  4924. var getNative = require_getNative();
  4925. var root = require_root();
  4926. var WeakMap2 = getNative(root, "WeakMap");
  4927. module2.exports = WeakMap2;
  4928. }
  4929. });
  4930. var require_getTag = __commonJS2({
  4931. "node_modules/lodash/_getTag.js"(exports2, module2) {
  4932. var DataView = require_DataView();
  4933. var Map2 = require_Map();
  4934. var Promise2 = require_Promise();
  4935. var Set2 = require_Set();
  4936. var WeakMap2 = require_WeakMap();
  4937. var baseGetTag = require_baseGetTag();
  4938. var toSource = require_toSource();
  4939. var mapTag = "[object Map]";
  4940. var objectTag = "[object Object]";
  4941. var promiseTag = "[object Promise]";
  4942. var setTag = "[object Set]";
  4943. var weakMapTag = "[object WeakMap]";
  4944. var dataViewTag = "[object DataView]";
  4945. var dataViewCtorString = toSource(DataView);
  4946. var mapCtorString = toSource(Map2);
  4947. var promiseCtorString = toSource(Promise2);
  4948. var setCtorString = toSource(Set2);
  4949. var weakMapCtorString = toSource(WeakMap2);
  4950. var getTag = baseGetTag;
  4951. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
  4952. getTag = function(value) {
  4953. var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
  4954. if (ctorString) {
  4955. switch (ctorString) {
  4956. case dataViewCtorString:
  4957. return dataViewTag;
  4958. case mapCtorString:
  4959. return mapTag;
  4960. case promiseCtorString:
  4961. return promiseTag;
  4962. case setCtorString:
  4963. return setTag;
  4964. case weakMapCtorString:
  4965. return weakMapTag;
  4966. }
  4967. }
  4968. return result;
  4969. };
  4970. }
  4971. module2.exports = getTag;
  4972. }
  4973. });
  4974. var require_baseIsEqualDeep = __commonJS2({
  4975. "node_modules/lodash/_baseIsEqualDeep.js"(exports2, module2) {
  4976. var Stack = require_Stack();
  4977. var equalArrays = require_equalArrays();
  4978. var equalByTag = require_equalByTag();
  4979. var equalObjects = require_equalObjects();
  4980. var getTag = require_getTag();
  4981. var isArray = require_isArray();
  4982. var isBuffer = require_isBuffer();
  4983. var isTypedArray = require_isTypedArray();
  4984. var COMPARE_PARTIAL_FLAG = 1;
  4985. var argsTag = "[object Arguments]";
  4986. var arrayTag = "[object Array]";
  4987. var objectTag = "[object Object]";
  4988. var objectProto = Object.prototype;
  4989. var hasOwnProperty = objectProto.hasOwnProperty;
  4990. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  4991. var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
  4992. objTag = objTag == argsTag ? objectTag : objTag;
  4993. othTag = othTag == argsTag ? objectTag : othTag;
  4994. var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
  4995. if (isSameTag && isBuffer(object)) {
  4996. if (!isBuffer(other)) {
  4997. return false;
  4998. }
  4999. objIsArr = true;
  5000. objIsObj = false;
  5001. }
  5002. if (isSameTag && !objIsObj) {
  5003. stack || (stack = new Stack());
  5004. return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  5005. }
  5006. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  5007. var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
  5008. if (objIsWrapped || othIsWrapped) {
  5009. var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
  5010. stack || (stack = new Stack());
  5011. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  5012. }
  5013. }
  5014. if (!isSameTag) {
  5015. return false;
  5016. }
  5017. stack || (stack = new Stack());
  5018. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  5019. }
  5020. module2.exports = baseIsEqualDeep;
  5021. }
  5022. });
  5023. var require_baseIsEqual = __commonJS2({
  5024. "node_modules/lodash/_baseIsEqual.js"(exports2, module2) {
  5025. var baseIsEqualDeep = require_baseIsEqualDeep();
  5026. var isObjectLike = require_isObjectLike();
  5027. function baseIsEqual(value, other, bitmask, customizer, stack) {
  5028. if (value === other) {
  5029. return true;
  5030. }
  5031. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
  5032. return value !== value && other !== other;
  5033. }
  5034. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  5035. }
  5036. module2.exports = baseIsEqual;
  5037. }
  5038. });
  5039. var require_baseIsMatch = __commonJS2({
  5040. "node_modules/lodash/_baseIsMatch.js"(exports2, module2) {
  5041. var Stack = require_Stack();
  5042. var baseIsEqual = require_baseIsEqual();
  5043. var COMPARE_PARTIAL_FLAG = 1;
  5044. var COMPARE_UNORDERED_FLAG = 2;
  5045. function baseIsMatch(object, source, matchData, customizer) {
  5046. var index = matchData.length, length = index, noCustomizer = !customizer;
  5047. if (object == null) {
  5048. return !length;
  5049. }
  5050. object = Object(object);
  5051. while (index--) {
  5052. var data = matchData[index];
  5053. if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
  5054. return false;
  5055. }
  5056. }
  5057. while (++index < length) {
  5058. data = matchData[index];
  5059. var key = data[0], objValue = object[key], srcValue = data[1];
  5060. if (noCustomizer && data[2]) {
  5061. if (objValue === void 0 && !(key in object)) {
  5062. return false;
  5063. }
  5064. } else {
  5065. var stack = new Stack();
  5066. if (customizer) {
  5067. var result = customizer(objValue, srcValue, key, object, source, stack);
  5068. }
  5069. if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {
  5070. return false;
  5071. }
  5072. }
  5073. }
  5074. return true;
  5075. }
  5076. module2.exports = baseIsMatch;
  5077. }
  5078. });
  5079. var require_isStrictComparable = __commonJS2({
  5080. "node_modules/lodash/_isStrictComparable.js"(exports2, module2) {
  5081. var isObject = require_isObject();
  5082. function isStrictComparable(value) {
  5083. return value === value && !isObject(value);
  5084. }
  5085. module2.exports = isStrictComparable;
  5086. }
  5087. });
  5088. var require_getMatchData = __commonJS2({
  5089. "node_modules/lodash/_getMatchData.js"(exports2, module2) {
  5090. var isStrictComparable = require_isStrictComparable();
  5091. var keys = require_keys();
  5092. function getMatchData(object) {
  5093. var result = keys(object), length = result.length;
  5094. while (length--) {
  5095. var key = result[length], value = object[key];
  5096. result[length] = [key, value, isStrictComparable(value)];
  5097. }
  5098. return result;
  5099. }
  5100. module2.exports = getMatchData;
  5101. }
  5102. });
  5103. var require_matchesStrictComparable = __commonJS2({
  5104. "node_modules/lodash/_matchesStrictComparable.js"(exports2, module2) {
  5105. function matchesStrictComparable(key, srcValue) {
  5106. return function(object) {
  5107. if (object == null) {
  5108. return false;
  5109. }
  5110. return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
  5111. };
  5112. }
  5113. module2.exports = matchesStrictComparable;
  5114. }
  5115. });
  5116. var require_baseMatches = __commonJS2({
  5117. "node_modules/lodash/_baseMatches.js"(exports2, module2) {
  5118. var baseIsMatch = require_baseIsMatch();
  5119. var getMatchData = require_getMatchData();
  5120. var matchesStrictComparable = require_matchesStrictComparable();
  5121. function baseMatches(source) {
  5122. var matchData = getMatchData(source);
  5123. if (matchData.length == 1 && matchData[0][2]) {
  5124. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  5125. }
  5126. return function(object) {
  5127. return object === source || baseIsMatch(object, source, matchData);
  5128. };
  5129. }
  5130. module2.exports = baseMatches;
  5131. }
  5132. });
  5133. var require_get = __commonJS2({
  5134. "node_modules/lodash/get.js"(exports2, module2) {
  5135. var baseGet = require_baseGet();
  5136. function get(object, path, defaultValue) {
  5137. var result = object == null ? void 0 : baseGet(object, path);
  5138. return result === void 0 ? defaultValue : result;
  5139. }
  5140. module2.exports = get;
  5141. }
  5142. });
  5143. var require_baseMatchesProperty = __commonJS2({
  5144. "node_modules/lodash/_baseMatchesProperty.js"(exports2, module2) {
  5145. var baseIsEqual = require_baseIsEqual();
  5146. var get = require_get();
  5147. var hasIn = require_hasIn();
  5148. var isKey = require_isKey();
  5149. var isStrictComparable = require_isStrictComparable();
  5150. var matchesStrictComparable = require_matchesStrictComparable();
  5151. var toKey = require_toKey();
  5152. var COMPARE_PARTIAL_FLAG = 1;
  5153. var COMPARE_UNORDERED_FLAG = 2;
  5154. function baseMatchesProperty(path, srcValue) {
  5155. if (isKey(path) && isStrictComparable(srcValue)) {
  5156. return matchesStrictComparable(toKey(path), srcValue);
  5157. }
  5158. return function(object) {
  5159. var objValue = get(object, path);
  5160. return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  5161. };
  5162. }
  5163. module2.exports = baseMatchesProperty;
  5164. }
  5165. });
  5166. var require_baseProperty = __commonJS2({
  5167. "node_modules/lodash/_baseProperty.js"(exports2, module2) {
  5168. function baseProperty(key) {
  5169. return function(object) {
  5170. return object == null ? void 0 : object[key];
  5171. };
  5172. }
  5173. module2.exports = baseProperty;
  5174. }
  5175. });
  5176. var require_basePropertyDeep = __commonJS2({
  5177. "node_modules/lodash/_basePropertyDeep.js"(exports2, module2) {
  5178. var baseGet = require_baseGet();
  5179. function basePropertyDeep(path) {
  5180. return function(object) {
  5181. return baseGet(object, path);
  5182. };
  5183. }
  5184. module2.exports = basePropertyDeep;
  5185. }
  5186. });
  5187. var require_property = __commonJS2({
  5188. "node_modules/lodash/property.js"(exports2, module2) {
  5189. var baseProperty = require_baseProperty();
  5190. var basePropertyDeep = require_basePropertyDeep();
  5191. var isKey = require_isKey();
  5192. var toKey = require_toKey();
  5193. function property(path) {
  5194. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  5195. }
  5196. module2.exports = property;
  5197. }
  5198. });
  5199. var require_baseIteratee = __commonJS2({
  5200. "node_modules/lodash/_baseIteratee.js"(exports2, module2) {
  5201. var baseMatches = require_baseMatches();
  5202. var baseMatchesProperty = require_baseMatchesProperty();
  5203. var identity = require_identity();
  5204. var isArray = require_isArray();
  5205. var property = require_property();
  5206. function baseIteratee(value) {
  5207. if (typeof value == "function") {
  5208. return value;
  5209. }
  5210. if (value == null) {
  5211. return identity;
  5212. }
  5213. if (typeof value == "object") {
  5214. return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  5215. }
  5216. return property(value);
  5217. }
  5218. module2.exports = baseIteratee;
  5219. }
  5220. });
  5221. var require_createAggregator = __commonJS2({
  5222. "node_modules/lodash/_createAggregator.js"(exports2, module2) {
  5223. var arrayAggregator = require_arrayAggregator();
  5224. var baseAggregator = require_baseAggregator();
  5225. var baseIteratee = require_baseIteratee();
  5226. var isArray = require_isArray();
  5227. function createAggregator(setter, initializer) {
  5228. return function(collection, iteratee) {
  5229. var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
  5230. return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
  5231. };
  5232. }
  5233. module2.exports = createAggregator;
  5234. }
  5235. });
  5236. var require_partition = __commonJS2({
  5237. "node_modules/lodash/partition.js"(exports2, module2) {
  5238. var createAggregator = require_createAggregator();
  5239. var partition = createAggregator(function(result, value, key) {
  5240. result[key ? 0 : 1].push(value);
  5241. }, function() {
  5242. return [[], []];
  5243. });
  5244. module2.exports = partition;
  5245. }
  5246. });
  5247. var require_create_minimist_options = __commonJS2({
  5248. "src/cli/options/create-minimist-options.js"(exports2, module2) {
  5249. "use strict";
  5250. var partition = require_partition();
  5251. module2.exports = function createMinimistOptions(detailedOptions) {
  5252. const [boolean, string] = partition(detailedOptions, ({
  5253. type
  5254. }) => type === "boolean").map((detailedOptions2) => detailedOptions2.flatMap(({
  5255. name,
  5256. alias
  5257. }) => alias ? [name, alias] : [name]));
  5258. const defaults = Object.fromEntries(detailedOptions.filter((option) => !option.deprecated && (!option.forwardToApi || option.name === "plugin" || option.name === "plugin-search-dir") && option.default !== void 0).map((option) => [option.name, option.default]));
  5259. return {
  5260. alias: {},
  5261. boolean,
  5262. string,
  5263. default: defaults
  5264. };
  5265. };
  5266. }
  5267. });
  5268. var require_leven = __commonJS2({
  5269. "vendors/leven.js"(exports2, module2) {
  5270. var __defProp = Object.defineProperty;
  5271. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  5272. var __getOwnPropNames22 = Object.getOwnPropertyNames;
  5273. var __hasOwnProp = Object.prototype.hasOwnProperty;
  5274. var __export = (target, all) => {
  5275. for (var name in all)
  5276. __defProp(target, name, {
  5277. get: all[name],
  5278. enumerable: true
  5279. });
  5280. };
  5281. var __copyProps = (to, from, except, desc) => {
  5282. if (from && typeof from === "object" || typeof from === "function") {
  5283. for (let key of __getOwnPropNames22(from))
  5284. if (!__hasOwnProp.call(to, key) && key !== except)
  5285. __defProp(to, key, {
  5286. get: () => from[key],
  5287. enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
  5288. });
  5289. }
  5290. return to;
  5291. };
  5292. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
  5293. value: true
  5294. }), mod);
  5295. var leven_exports = {};
  5296. __export(leven_exports, {
  5297. default: () => leven
  5298. });
  5299. module2.exports = __toCommonJS(leven_exports);
  5300. var array = [];
  5301. var characterCodeCache = [];
  5302. function leven(first, second) {
  5303. if (first === second) {
  5304. return 0;
  5305. }
  5306. const swap = first;
  5307. if (first.length > second.length) {
  5308. first = second;
  5309. second = swap;
  5310. }
  5311. let firstLength = first.length;
  5312. let secondLength = second.length;
  5313. while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) {
  5314. firstLength--;
  5315. secondLength--;
  5316. }
  5317. let start = 0;
  5318. while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) {
  5319. start++;
  5320. }
  5321. firstLength -= start;
  5322. secondLength -= start;
  5323. if (firstLength === 0) {
  5324. return secondLength;
  5325. }
  5326. let bCharacterCode;
  5327. let result;
  5328. let temporary;
  5329. let temporary2;
  5330. let index = 0;
  5331. let index2 = 0;
  5332. while (index < firstLength) {
  5333. characterCodeCache[index] = first.charCodeAt(start + index);
  5334. array[index] = ++index;
  5335. }
  5336. while (index2 < secondLength) {
  5337. bCharacterCode = second.charCodeAt(start + index2);
  5338. temporary = index2++;
  5339. result = index2;
  5340. for (index = 0; index < firstLength; index++) {
  5341. temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1;
  5342. temporary = array[index];
  5343. result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2;
  5344. }
  5345. }
  5346. return result;
  5347. }
  5348. }
  5349. });
  5350. var require_normalize_cli_options = __commonJS2({
  5351. "src/cli/options/normalize-cli-options.js"(exports2, module2) {
  5352. "use strict";
  5353. var {
  5354. default: chalk
  5355. } = require_chalk();
  5356. var {
  5357. default: leven
  5358. } = require_leven();
  5359. var {
  5360. optionsNormalizer
  5361. } = require_prettier_internal();
  5362. function normalizeCliOptions(options, optionInfos, opts) {
  5363. return optionsNormalizer.normalizeCliOptions(options, optionInfos, Object.assign({
  5364. colorsModule: chalk,
  5365. levenshteinDistance: leven
  5366. }, opts));
  5367. }
  5368. module2.exports = normalizeCliOptions;
  5369. }
  5370. });
  5371. var require_parse_cli_arguments = __commonJS2({
  5372. "src/cli/options/parse-cli-arguments.js"(exports2, module2) {
  5373. "use strict";
  5374. var pick = require_pick();
  5375. var camelCase = require_camelcase();
  5376. var getContextOptions = require_get_context_options();
  5377. var minimist = require_minimist2();
  5378. var createMinimistOptions = require_create_minimist_options();
  5379. var normalizeCliOptions = require_normalize_cli_options();
  5380. function parseArgv(rawArguments, detailedOptions, logger, keys) {
  5381. const minimistOptions = createMinimistOptions(detailedOptions);
  5382. let argv = minimist(rawArguments, minimistOptions);
  5383. if (keys) {
  5384. if (keys.includes("plugin-search-dir") && !keys.includes("plugin-search")) {
  5385. keys.push("plugin-search");
  5386. }
  5387. detailedOptions = detailedOptions.filter((option) => keys.includes(option.name));
  5388. argv = pick(argv, keys);
  5389. }
  5390. const normalized = normalizeCliOptions(argv, detailedOptions, {
  5391. logger
  5392. });
  5393. return Object.assign(Object.assign({}, Object.fromEntries(Object.entries(normalized).map(([key, value]) => {
  5394. const option = detailedOptions.find(({
  5395. name
  5396. }) => name === key) || {};
  5397. return [option.forwardToApi || camelCase(key), value];
  5398. }))), {}, {
  5399. get __raw() {
  5400. return argv;
  5401. }
  5402. });
  5403. }
  5404. var detailedOptionsWithoutPlugins = getContextOptions([], false).detailedOptions;
  5405. function parseArgvWithoutPlugins2(rawArguments, logger, keys) {
  5406. return parseArgv(rawArguments, detailedOptionsWithoutPlugins, logger, typeof keys === "string" ? [keys] : keys);
  5407. }
  5408. module2.exports = {
  5409. parseArgv,
  5410. parseArgvWithoutPlugins: parseArgvWithoutPlugins2
  5411. };
  5412. }
  5413. });
  5414. var require_context = __commonJS2({
  5415. "src/cli/context.js"(exports2, module2) {
  5416. "use strict";
  5417. var {
  5418. utils: {
  5419. getLast
  5420. }
  5421. } = require_prettier_internal();
  5422. var getContextOptions = require_get_context_options();
  5423. var {
  5424. parseArgv,
  5425. parseArgvWithoutPlugins: parseArgvWithoutPlugins2
  5426. } = require_parse_cli_arguments();
  5427. var Context2 = class {
  5428. constructor({
  5429. rawArguments,
  5430. logger
  5431. }) {
  5432. this.rawArguments = rawArguments;
  5433. this.logger = logger;
  5434. this.stack = [];
  5435. const {
  5436. plugins,
  5437. pluginSearchDirs
  5438. } = parseArgvWithoutPlugins2(rawArguments, logger, ["plugin", "plugin-search-dir"]);
  5439. this.pushContextPlugins(plugins, pluginSearchDirs);
  5440. const argv = parseArgv(rawArguments, this.detailedOptions, logger);
  5441. this.argv = argv;
  5442. this.filePatterns = argv._.map((file) => String(file));
  5443. }
  5444. pushContextPlugins(plugins, pluginSearchDirs) {
  5445. const options = getContextOptions(plugins, pluginSearchDirs);
  5446. this.stack.push(options);
  5447. Object.assign(this, options);
  5448. }
  5449. popContextPlugins() {
  5450. this.stack.pop();
  5451. Object.assign(this, getLast(this.stack));
  5452. }
  5453. };
  5454. module2.exports = Context2;
  5455. }
  5456. });
  5457. var require_groupBy = __commonJS2({
  5458. "node_modules/lodash/groupBy.js"(exports2, module2) {
  5459. var baseAssignValue = require_baseAssignValue();
  5460. var createAggregator = require_createAggregator();
  5461. var objectProto = Object.prototype;
  5462. var hasOwnProperty = objectProto.hasOwnProperty;
  5463. var groupBy = createAggregator(function(result, value, key) {
  5464. if (hasOwnProperty.call(result, key)) {
  5465. result[key].push(value);
  5466. } else {
  5467. baseAssignValue(result, key, [value]);
  5468. }
  5469. });
  5470. module2.exports = groupBy;
  5471. }
  5472. });
  5473. var require_usage = __commonJS2({
  5474. "src/cli/usage.js"(exports2, module2) {
  5475. "use strict";
  5476. var groupBy = require_groupBy();
  5477. var camelCase = require_camelcase();
  5478. var constant = require_constant();
  5479. var OPTION_USAGE_THRESHOLD = 25;
  5480. var CHOICE_USAGE_MARGIN = 3;
  5481. var CHOICE_USAGE_INDENTATION = 2;
  5482. function indent(str, spaces) {
  5483. return str.replace(/^/gm, " ".repeat(spaces));
  5484. }
  5485. function createDefaultValueDisplay(value) {
  5486. return Array.isArray(value) ? `[${value.map(createDefaultValueDisplay).join(", ")}]` : value;
  5487. }
  5488. function getOptionDefaultValue(context, optionName) {
  5489. if (!(optionName in context.detailedOptionMap)) {
  5490. return;
  5491. }
  5492. const option = context.detailedOptionMap[optionName];
  5493. if (option.default !== void 0) {
  5494. return option.default;
  5495. }
  5496. const optionCamelName = camelCase(optionName);
  5497. if (optionCamelName in context.apiDefaultOptions) {
  5498. return context.apiDefaultOptions[optionCamelName];
  5499. }
  5500. }
  5501. function createOptionUsageHeader(option) {
  5502. const name = `--${option.name}`;
  5503. const alias = option.alias ? `-${option.alias},` : null;
  5504. const type = createOptionUsageType(option);
  5505. return [alias, name, type].filter(Boolean).join(" ");
  5506. }
  5507. function createOptionUsageRow(header, content, threshold) {
  5508. const separator = header.length >= threshold ? `
  5509. ${" ".repeat(threshold)}` : " ".repeat(threshold - header.length);
  5510. const description = content.replace(/\n/g, `
  5511. ${" ".repeat(threshold)}`);
  5512. return `${header}${separator}${description}`;
  5513. }
  5514. function createOptionUsageType(option) {
  5515. switch (option.type) {
  5516. case "boolean":
  5517. return null;
  5518. case "choice":
  5519. return `<${option.choices.filter((choice) => !choice.deprecated && choice.since !== null).map((choice) => choice.value).join("|")}>`;
  5520. default:
  5521. return `<${option.type}>`;
  5522. }
  5523. }
  5524. function createChoiceUsages(choices, margin, indentation) {
  5525. const activeChoices = choices.filter((choice) => !choice.deprecated && choice.since !== null);
  5526. const threshold = Math.max(0, ...activeChoices.map((choice) => choice.value.length)) + margin;
  5527. return activeChoices.map((choice) => indent(createOptionUsageRow(choice.value, choice.description, threshold), indentation));
  5528. }
  5529. function createOptionUsage(context, option, threshold) {
  5530. const header = createOptionUsageHeader(option);
  5531. const optionDefaultValue = getOptionDefaultValue(context, option.name);
  5532. return createOptionUsageRow(header, `${option.description}${optionDefaultValue === void 0 ? "" : `
  5533. Defaults to ${createDefaultValueDisplay(optionDefaultValue)}.`}`, threshold);
  5534. }
  5535. function getOptionsWithOpposites(options) {
  5536. const optionsWithOpposites = options.map((option) => [option.description ? option : null, option.oppositeDescription ? Object.assign(Object.assign({}, option), {}, {
  5537. name: `no-${option.name}`,
  5538. type: "boolean",
  5539. description: option.oppositeDescription
  5540. }) : null]);
  5541. return optionsWithOpposites.flat().filter(Boolean);
  5542. }
  5543. function createUsage2(context) {
  5544. const options = getOptionsWithOpposites(context.detailedOptions).filter((option) => !(option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-")));
  5545. const groupedOptions = groupBy(options, (option) => option.category);
  5546. const firstCategories = constant.categoryOrder.slice(0, -1);
  5547. const lastCategories = constant.categoryOrder.slice(-1);
  5548. const restCategories = Object.keys(groupedOptions).filter((category) => !constant.categoryOrder.includes(category));
  5549. const allCategories = [...firstCategories, ...restCategories, ...lastCategories];
  5550. const optionsUsage = allCategories.map((category) => {
  5551. const categoryOptions = groupedOptions[category].map((option) => createOptionUsage(context, option, OPTION_USAGE_THRESHOLD)).join("\n");
  5552. return `${category} options:
  5553. ${indent(categoryOptions, 2)}`;
  5554. });
  5555. return [constant.usageSummary, ...optionsUsage, ""].join("\n\n");
  5556. }
  5557. function createDetailedUsage2(context, flag) {
  5558. const option = getOptionsWithOpposites(context.detailedOptions).find((option2) => option2.name === flag || option2.alias === flag);
  5559. const header = createOptionUsageHeader(option);
  5560. const description = `
  5561. ${indent(option.description, 2)}`;
  5562. const choices = option.type !== "choice" ? "" : `
  5563. Valid options:
  5564. ${createChoiceUsages(option.choices, CHOICE_USAGE_MARGIN, CHOICE_USAGE_INDENTATION).join("\n")}`;
  5565. const optionDefaultValue = getOptionDefaultValue(context, option.name);
  5566. const defaults = optionDefaultValue !== void 0 ? `
  5567. Default: ${createDefaultValueDisplay(optionDefaultValue)}` : "";
  5568. const pluginDefaults = option.pluginDefaults && Object.keys(option.pluginDefaults).length > 0 ? `
  5569. Plugin defaults:${Object.entries(option.pluginDefaults).map(([key, value]) => `
  5570. * ${key}: ${createDefaultValueDisplay(value)}`)}` : "";
  5571. return `${header}${description}${choices}${defaults}${pluginDefaults}`;
  5572. }
  5573. module2.exports = {
  5574. createUsage: createUsage2,
  5575. createDetailedUsage: createDetailedUsage2
  5576. };
  5577. }
  5578. });
  5579. var require_array = __commonJS2({
  5580. "node_modules/fast-glob/out/utils/array.js"(exports2) {
  5581. "use strict";
  5582. Object.defineProperty(exports2, "__esModule", {
  5583. value: true
  5584. });
  5585. exports2.splitWhen = exports2.flatten = void 0;
  5586. function flatten(items) {
  5587. return items.reduce((collection, item) => [].concat(collection, item), []);
  5588. }
  5589. exports2.flatten = flatten;
  5590. function splitWhen(items, predicate) {
  5591. const result = [[]];
  5592. let groupIndex = 0;
  5593. for (const item of items) {
  5594. if (predicate(item)) {
  5595. groupIndex++;
  5596. result[groupIndex] = [];
  5597. } else {
  5598. result[groupIndex].push(item);
  5599. }
  5600. }
  5601. return result;
  5602. }
  5603. exports2.splitWhen = splitWhen;
  5604. }
  5605. });
  5606. var require_errno = __commonJS2({
  5607. "node_modules/fast-glob/out/utils/errno.js"(exports2) {
  5608. "use strict";
  5609. Object.defineProperty(exports2, "__esModule", {
  5610. value: true
  5611. });
  5612. exports2.isEnoentCodeError = void 0;
  5613. function isEnoentCodeError(error) {
  5614. return error.code === "ENOENT";
  5615. }
  5616. exports2.isEnoentCodeError = isEnoentCodeError;
  5617. }
  5618. });
  5619. var require_fs = __commonJS2({
  5620. "node_modules/fast-glob/out/utils/fs.js"(exports2) {
  5621. "use strict";
  5622. Object.defineProperty(exports2, "__esModule", {
  5623. value: true
  5624. });
  5625. exports2.createDirentFromStats = void 0;
  5626. var DirentFromStats = class {
  5627. constructor(name, stats) {
  5628. this.name = name;
  5629. this.isBlockDevice = stats.isBlockDevice.bind(stats);
  5630. this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
  5631. this.isDirectory = stats.isDirectory.bind(stats);
  5632. this.isFIFO = stats.isFIFO.bind(stats);
  5633. this.isFile = stats.isFile.bind(stats);
  5634. this.isSocket = stats.isSocket.bind(stats);
  5635. this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
  5636. }
  5637. };
  5638. function createDirentFromStats(name, stats) {
  5639. return new DirentFromStats(name, stats);
  5640. }
  5641. exports2.createDirentFromStats = createDirentFromStats;
  5642. }
  5643. });
  5644. var require_path = __commonJS2({
  5645. "node_modules/fast-glob/out/utils/path.js"(exports2) {
  5646. "use strict";
  5647. Object.defineProperty(exports2, "__esModule", {
  5648. value: true
  5649. });
  5650. exports2.removeLeadingDotSegment = exports2.escape = exports2.makeAbsolute = exports2.unixify = void 0;
  5651. var path = require("path");
  5652. var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
  5653. var UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
  5654. function unixify(filepath) {
  5655. return filepath.replace(/\\/g, "/");
  5656. }
  5657. exports2.unixify = unixify;
  5658. function makeAbsolute(cwd, filepath) {
  5659. return path.resolve(cwd, filepath);
  5660. }
  5661. exports2.makeAbsolute = makeAbsolute;
  5662. function escape(pattern) {
  5663. return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
  5664. }
  5665. exports2.escape = escape;
  5666. function removeLeadingDotSegment(entry) {
  5667. if (entry.charAt(0) === ".") {
  5668. const secondCharactery = entry.charAt(1);
  5669. if (secondCharactery === "/" || secondCharactery === "\\") {
  5670. return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
  5671. }
  5672. }
  5673. return entry;
  5674. }
  5675. exports2.removeLeadingDotSegment = removeLeadingDotSegment;
  5676. }
  5677. });
  5678. var require_is_extglob = __commonJS2({
  5679. "node_modules/is-extglob/index.js"(exports2, module2) {
  5680. module2.exports = function isExtglob(str) {
  5681. if (typeof str !== "string" || str === "") {
  5682. return false;
  5683. }
  5684. var match;
  5685. while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
  5686. if (match[2])
  5687. return true;
  5688. str = str.slice(match.index + match[0].length);
  5689. }
  5690. return false;
  5691. };
  5692. }
  5693. });
  5694. var require_is_glob = __commonJS2({
  5695. "node_modules/is-glob/index.js"(exports2, module2) {
  5696. var isExtglob = require_is_extglob();
  5697. var chars = {
  5698. "{": "}",
  5699. "(": ")",
  5700. "[": "]"
  5701. };
  5702. var strictCheck = function(str) {
  5703. if (str[0] === "!") {
  5704. return true;
  5705. }
  5706. var index = 0;
  5707. var pipeIndex = -2;
  5708. var closeSquareIndex = -2;
  5709. var closeCurlyIndex = -2;
  5710. var closeParenIndex = -2;
  5711. var backSlashIndex = -2;
  5712. while (index < str.length) {
  5713. if (str[index] === "*") {
  5714. return true;
  5715. }
  5716. if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) {
  5717. return true;
  5718. }
  5719. if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") {
  5720. if (closeSquareIndex < index) {
  5721. closeSquareIndex = str.indexOf("]", index);
  5722. }
  5723. if (closeSquareIndex > index) {
  5724. if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
  5725. return true;
  5726. }
  5727. backSlashIndex = str.indexOf("\\", index);
  5728. if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
  5729. return true;
  5730. }
  5731. }
  5732. }
  5733. if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") {
  5734. closeCurlyIndex = str.indexOf("}", index);
  5735. if (closeCurlyIndex > index) {
  5736. backSlashIndex = str.indexOf("\\", index);
  5737. if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
  5738. return true;
  5739. }
  5740. }
  5741. }
  5742. if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") {
  5743. closeParenIndex = str.indexOf(")", index);
  5744. if (closeParenIndex > index) {
  5745. backSlashIndex = str.indexOf("\\", index);
  5746. if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
  5747. return true;
  5748. }
  5749. }
  5750. }
  5751. if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") {
  5752. if (pipeIndex < index) {
  5753. pipeIndex = str.indexOf("|", index);
  5754. }
  5755. if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
  5756. closeParenIndex = str.indexOf(")", pipeIndex);
  5757. if (closeParenIndex > pipeIndex) {
  5758. backSlashIndex = str.indexOf("\\", pipeIndex);
  5759. if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
  5760. return true;
  5761. }
  5762. }
  5763. }
  5764. }
  5765. if (str[index] === "\\") {
  5766. var open = str[index + 1];
  5767. index += 2;
  5768. var close = chars[open];
  5769. if (close) {
  5770. var n = str.indexOf(close, index);
  5771. if (n !== -1) {
  5772. index = n + 1;
  5773. }
  5774. }
  5775. if (str[index] === "!") {
  5776. return true;
  5777. }
  5778. } else {
  5779. index++;
  5780. }
  5781. }
  5782. return false;
  5783. };
  5784. var relaxedCheck = function(str) {
  5785. if (str[0] === "!") {
  5786. return true;
  5787. }
  5788. var index = 0;
  5789. while (index < str.length) {
  5790. if (/[*?{}()[\]]/.test(str[index])) {
  5791. return true;
  5792. }
  5793. if (str[index] === "\\") {
  5794. var open = str[index + 1];
  5795. index += 2;
  5796. var close = chars[open];
  5797. if (close) {
  5798. var n = str.indexOf(close, index);
  5799. if (n !== -1) {
  5800. index = n + 1;
  5801. }
  5802. }
  5803. if (str[index] === "!") {
  5804. return true;
  5805. }
  5806. } else {
  5807. index++;
  5808. }
  5809. }
  5810. return false;
  5811. };
  5812. module2.exports = function isGlob(str, options) {
  5813. if (typeof str !== "string" || str === "") {
  5814. return false;
  5815. }
  5816. if (isExtglob(str)) {
  5817. return true;
  5818. }
  5819. var check = strictCheck;
  5820. if (options && options.strict === false) {
  5821. check = relaxedCheck;
  5822. }
  5823. return check(str);
  5824. };
  5825. }
  5826. });
  5827. var require_glob_parent = __commonJS2({
  5828. "node_modules/glob-parent/index.js"(exports2, module2) {
  5829. "use strict";
  5830. var isGlob = require_is_glob();
  5831. var pathPosixDirname = require("path").posix.dirname;
  5832. var isWin32 = require("os").platform() === "win32";
  5833. var slash = "/";
  5834. var backslash = /\\/g;
  5835. var enclosure = /[\{\[].*[\}\]]$/;
  5836. var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
  5837. var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
  5838. module2.exports = function globParent(str, opts) {
  5839. var options = Object.assign({
  5840. flipBackslashes: true
  5841. }, opts);
  5842. if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
  5843. str = str.replace(backslash, slash);
  5844. }
  5845. if (enclosure.test(str)) {
  5846. str += slash;
  5847. }
  5848. str += "a";
  5849. do {
  5850. str = pathPosixDirname(str);
  5851. } while (isGlob(str) || globby.test(str));
  5852. return str.replace(escaped, "$1");
  5853. };
  5854. }
  5855. });
  5856. var require_utils = __commonJS2({
  5857. "node_modules/braces/lib/utils.js"(exports2) {
  5858. "use strict";
  5859. exports2.isInteger = (num) => {
  5860. if (typeof num === "number") {
  5861. return Number.isInteger(num);
  5862. }
  5863. if (typeof num === "string" && num.trim() !== "") {
  5864. return Number.isInteger(Number(num));
  5865. }
  5866. return false;
  5867. };
  5868. exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type);
  5869. exports2.exceedsLimit = (min, max, step = 1, limit) => {
  5870. if (limit === false)
  5871. return false;
  5872. if (!exports2.isInteger(min) || !exports2.isInteger(max))
  5873. return false;
  5874. return (Number(max) - Number(min)) / Number(step) >= limit;
  5875. };
  5876. exports2.escapeNode = (block, n = 0, type) => {
  5877. let node = block.nodes[n];
  5878. if (!node)
  5879. return;
  5880. if (type && node.type === type || node.type === "open" || node.type === "close") {
  5881. if (node.escaped !== true) {
  5882. node.value = "\\" + node.value;
  5883. node.escaped = true;
  5884. }
  5885. }
  5886. };
  5887. exports2.encloseBrace = (node) => {
  5888. if (node.type !== "brace")
  5889. return false;
  5890. if (node.commas >> 0 + node.ranges >> 0 === 0) {
  5891. node.invalid = true;
  5892. return true;
  5893. }
  5894. return false;
  5895. };
  5896. exports2.isInvalidBrace = (block) => {
  5897. if (block.type !== "brace")
  5898. return false;
  5899. if (block.invalid === true || block.dollar)
  5900. return true;
  5901. if (block.commas >> 0 + block.ranges >> 0 === 0) {
  5902. block.invalid = true;
  5903. return true;
  5904. }
  5905. if (block.open !== true || block.close !== true) {
  5906. block.invalid = true;
  5907. return true;
  5908. }
  5909. return false;
  5910. };
  5911. exports2.isOpenOrClose = (node) => {
  5912. if (node.type === "open" || node.type === "close") {
  5913. return true;
  5914. }
  5915. return node.open === true || node.close === true;
  5916. };
  5917. exports2.reduce = (nodes) => nodes.reduce((acc, node) => {
  5918. if (node.type === "text")
  5919. acc.push(node.value);
  5920. if (node.type === "range")
  5921. node.type = "text";
  5922. return acc;
  5923. }, []);
  5924. exports2.flatten = (...args) => {
  5925. const result = [];
  5926. const flat = (arr) => {
  5927. for (let i = 0; i < arr.length; i++) {
  5928. let ele = arr[i];
  5929. Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
  5930. }
  5931. return result;
  5932. };
  5933. flat(args);
  5934. return result;
  5935. };
  5936. }
  5937. });
  5938. var require_stringify = __commonJS2({
  5939. "node_modules/braces/lib/stringify.js"(exports2, module2) {
  5940. "use strict";
  5941. var utils = require_utils();
  5942. module2.exports = (ast, options = {}) => {
  5943. let stringify2 = (node, parent = {}) => {
  5944. let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
  5945. let invalidNode = node.invalid === true && options.escapeInvalid === true;
  5946. let output = "";
  5947. if (node.value) {
  5948. if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
  5949. return "\\" + node.value;
  5950. }
  5951. return node.value;
  5952. }
  5953. if (node.value) {
  5954. return node.value;
  5955. }
  5956. if (node.nodes) {
  5957. for (let child of node.nodes) {
  5958. output += stringify2(child);
  5959. }
  5960. }
  5961. return output;
  5962. };
  5963. return stringify2(ast);
  5964. };
  5965. }
  5966. });
  5967. var require_is_number = __commonJS2({
  5968. "node_modules/is-number/index.js"(exports2, module2) {
  5969. "use strict";
  5970. module2.exports = function(num) {
  5971. if (typeof num === "number") {
  5972. return num - num === 0;
  5973. }
  5974. if (typeof num === "string" && num.trim() !== "") {
  5975. return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
  5976. }
  5977. return false;
  5978. };
  5979. }
  5980. });
  5981. var require_to_regex_range = __commonJS2({
  5982. "node_modules/to-regex-range/index.js"(exports2, module2) {
  5983. "use strict";
  5984. var isNumber = require_is_number();
  5985. var toRegexRange = (min, max, options) => {
  5986. if (isNumber(min) === false) {
  5987. throw new TypeError("toRegexRange: expected the first argument to be a number");
  5988. }
  5989. if (max === void 0 || min === max) {
  5990. return String(min);
  5991. }
  5992. if (isNumber(max) === false) {
  5993. throw new TypeError("toRegexRange: expected the second argument to be a number.");
  5994. }
  5995. let opts = Object.assign({
  5996. relaxZeros: true
  5997. }, options);
  5998. if (typeof opts.strictZeros === "boolean") {
  5999. opts.relaxZeros = opts.strictZeros === false;
  6000. }
  6001. let relax = String(opts.relaxZeros);
  6002. let shorthand = String(opts.shorthand);
  6003. let capture = String(opts.capture);
  6004. let wrap = String(opts.wrap);
  6005. let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
  6006. if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
  6007. return toRegexRange.cache[cacheKey].result;
  6008. }
  6009. let a = Math.min(min, max);
  6010. let b = Math.max(min, max);
  6011. if (Math.abs(a - b) === 1) {
  6012. let result = min + "|" + max;
  6013. if (opts.capture) {
  6014. return `(${result})`;
  6015. }
  6016. if (opts.wrap === false) {
  6017. return result;
  6018. }
  6019. return `(?:${result})`;
  6020. }
  6021. let isPadded = hasPadding(min) || hasPadding(max);
  6022. let state = {
  6023. min,
  6024. max,
  6025. a,
  6026. b
  6027. };
  6028. let positives = [];
  6029. let negatives = [];
  6030. if (isPadded) {
  6031. state.isPadded = isPadded;
  6032. state.maxLen = String(state.max).length;
  6033. }
  6034. if (a < 0) {
  6035. let newMin = b < 0 ? Math.abs(b) : 1;
  6036. negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
  6037. a = state.a = 0;
  6038. }
  6039. if (b >= 0) {
  6040. positives = splitToPatterns(a, b, state, opts);
  6041. }
  6042. state.negatives = negatives;
  6043. state.positives = positives;
  6044. state.result = collatePatterns(negatives, positives, opts);
  6045. if (opts.capture === true) {
  6046. state.result = `(${state.result})`;
  6047. } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
  6048. state.result = `(?:${state.result})`;
  6049. }
  6050. toRegexRange.cache[cacheKey] = state;
  6051. return state.result;
  6052. };
  6053. function collatePatterns(neg, pos, options) {
  6054. let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
  6055. let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
  6056. let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
  6057. let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
  6058. return subpatterns.join("|");
  6059. }
  6060. function splitToRanges(min, max) {
  6061. let nines = 1;
  6062. let zeros = 1;
  6063. let stop = countNines(min, nines);
  6064. let stops = /* @__PURE__ */ new Set([max]);
  6065. while (min <= stop && stop <= max) {
  6066. stops.add(stop);
  6067. nines += 1;
  6068. stop = countNines(min, nines);
  6069. }
  6070. stop = countZeros(max + 1, zeros) - 1;
  6071. while (min < stop && stop <= max) {
  6072. stops.add(stop);
  6073. zeros += 1;
  6074. stop = countZeros(max + 1, zeros) - 1;
  6075. }
  6076. stops = [...stops];
  6077. stops.sort(compare);
  6078. return stops;
  6079. }
  6080. function rangeToPattern(start, stop, options) {
  6081. if (start === stop) {
  6082. return {
  6083. pattern: start,
  6084. count: [],
  6085. digits: 0
  6086. };
  6087. }
  6088. let zipped = zip(start, stop);
  6089. let digits = zipped.length;
  6090. let pattern = "";
  6091. let count = 0;
  6092. for (let i = 0; i < digits; i++) {
  6093. let [startDigit, stopDigit] = zipped[i];
  6094. if (startDigit === stopDigit) {
  6095. pattern += startDigit;
  6096. } else if (startDigit !== "0" || stopDigit !== "9") {
  6097. pattern += toCharacterClass(startDigit, stopDigit, options);
  6098. } else {
  6099. count++;
  6100. }
  6101. }
  6102. if (count) {
  6103. pattern += options.shorthand === true ? "\\d" : "[0-9]";
  6104. }
  6105. return {
  6106. pattern,
  6107. count: [count],
  6108. digits
  6109. };
  6110. }
  6111. function splitToPatterns(min, max, tok, options) {
  6112. let ranges = splitToRanges(min, max);
  6113. let tokens = [];
  6114. let start = min;
  6115. let prev;
  6116. for (let i = 0; i < ranges.length; i++) {
  6117. let max2 = ranges[i];
  6118. let obj = rangeToPattern(String(start), String(max2), options);
  6119. let zeros = "";
  6120. if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
  6121. if (prev.count.length > 1) {
  6122. prev.count.pop();
  6123. }
  6124. prev.count.push(obj.count[0]);
  6125. prev.string = prev.pattern + toQuantifier(prev.count);
  6126. start = max2 + 1;
  6127. continue;
  6128. }
  6129. if (tok.isPadded) {
  6130. zeros = padZeros(max2, tok, options);
  6131. }
  6132. obj.string = zeros + obj.pattern + toQuantifier(obj.count);
  6133. tokens.push(obj);
  6134. start = max2 + 1;
  6135. prev = obj;
  6136. }
  6137. return tokens;
  6138. }
  6139. function filterPatterns(arr, comparison, prefix, intersection, options) {
  6140. let result = [];
  6141. for (let ele of arr) {
  6142. let {
  6143. string
  6144. } = ele;
  6145. if (!intersection && !contains(comparison, "string", string)) {
  6146. result.push(prefix + string);
  6147. }
  6148. if (intersection && contains(comparison, "string", string)) {
  6149. result.push(prefix + string);
  6150. }
  6151. }
  6152. return result;
  6153. }
  6154. function zip(a, b) {
  6155. let arr = [];
  6156. for (let i = 0; i < a.length; i++)
  6157. arr.push([a[i], b[i]]);
  6158. return arr;
  6159. }
  6160. function compare(a, b) {
  6161. return a > b ? 1 : b > a ? -1 : 0;
  6162. }
  6163. function contains(arr, key, val) {
  6164. return arr.some((ele) => ele[key] === val);
  6165. }
  6166. function countNines(min, len) {
  6167. return Number(String(min).slice(0, -len) + "9".repeat(len));
  6168. }
  6169. function countZeros(integer, zeros) {
  6170. return integer - integer % Math.pow(10, zeros);
  6171. }
  6172. function toQuantifier(digits) {
  6173. let [start = 0, stop = ""] = digits;
  6174. if (stop || start > 1) {
  6175. return `{${start + (stop ? "," + stop : "")}}`;
  6176. }
  6177. return "";
  6178. }
  6179. function toCharacterClass(a, b, options) {
  6180. return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
  6181. }
  6182. function hasPadding(str) {
  6183. return /^-?(0+)\d/.test(str);
  6184. }
  6185. function padZeros(value, tok, options) {
  6186. if (!tok.isPadded) {
  6187. return value;
  6188. }
  6189. let diff = Math.abs(tok.maxLen - String(value).length);
  6190. let relax = options.relaxZeros !== false;
  6191. switch (diff) {
  6192. case 0:
  6193. return "";
  6194. case 1:
  6195. return relax ? "0?" : "0";
  6196. case 2:
  6197. return relax ? "0{0,2}" : "00";
  6198. default: {
  6199. return relax ? `0{0,${diff}}` : `0{${diff}}`;
  6200. }
  6201. }
  6202. }
  6203. toRegexRange.cache = {};
  6204. toRegexRange.clearCache = () => toRegexRange.cache = {};
  6205. module2.exports = toRegexRange;
  6206. }
  6207. });
  6208. var require_fill_range = __commonJS2({
  6209. "node_modules/fill-range/index.js"(exports2, module2) {
  6210. "use strict";
  6211. var util = require("util");
  6212. var toRegexRange = require_to_regex_range();
  6213. var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
  6214. var transform = (toNumber) => {
  6215. return (value) => toNumber === true ? Number(value) : String(value);
  6216. };
  6217. var isValidValue = (value) => {
  6218. return typeof value === "number" || typeof value === "string" && value !== "";
  6219. };
  6220. var isNumber = (num) => Number.isInteger(+num);
  6221. var zeros = (input) => {
  6222. let value = `${input}`;
  6223. let index = -1;
  6224. if (value[0] === "-")
  6225. value = value.slice(1);
  6226. if (value === "0")
  6227. return false;
  6228. while (value[++index] === "0")
  6229. ;
  6230. return index > 0;
  6231. };
  6232. var stringify2 = (start, end, options) => {
  6233. if (typeof start === "string" || typeof end === "string") {
  6234. return true;
  6235. }
  6236. return options.stringify === true;
  6237. };
  6238. var pad = (input, maxLength, toNumber) => {
  6239. if (maxLength > 0) {
  6240. let dash = input[0] === "-" ? "-" : "";
  6241. if (dash)
  6242. input = input.slice(1);
  6243. input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
  6244. }
  6245. if (toNumber === false) {
  6246. return String(input);
  6247. }
  6248. return input;
  6249. };
  6250. var toMaxLen = (input, maxLength) => {
  6251. let negative = input[0] === "-" ? "-" : "";
  6252. if (negative) {
  6253. input = input.slice(1);
  6254. maxLength--;
  6255. }
  6256. while (input.length < maxLength)
  6257. input = "0" + input;
  6258. return negative ? "-" + input : input;
  6259. };
  6260. var toSequence = (parts, options) => {
  6261. parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
  6262. parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
  6263. let prefix = options.capture ? "" : "?:";
  6264. let positives = "";
  6265. let negatives = "";
  6266. let result;
  6267. if (parts.positives.length) {
  6268. positives = parts.positives.join("|");
  6269. }
  6270. if (parts.negatives.length) {
  6271. negatives = `-(${prefix}${parts.negatives.join("|")})`;
  6272. }
  6273. if (positives && negatives) {
  6274. result = `${positives}|${negatives}`;
  6275. } else {
  6276. result = positives || negatives;
  6277. }
  6278. if (options.wrap) {
  6279. return `(${prefix}${result})`;
  6280. }
  6281. return result;
  6282. };
  6283. var toRange = (a, b, isNumbers, options) => {
  6284. if (isNumbers) {
  6285. return toRegexRange(a, b, Object.assign({
  6286. wrap: false
  6287. }, options));
  6288. }
  6289. let start = String.fromCharCode(a);
  6290. if (a === b)
  6291. return start;
  6292. let stop = String.fromCharCode(b);
  6293. return `[${start}-${stop}]`;
  6294. };
  6295. var toRegex = (start, end, options) => {
  6296. if (Array.isArray(start)) {
  6297. let wrap = options.wrap === true;
  6298. let prefix = options.capture ? "" : "?:";
  6299. return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
  6300. }
  6301. return toRegexRange(start, end, options);
  6302. };
  6303. var rangeError = (...args) => {
  6304. return new RangeError("Invalid range arguments: " + util.inspect(...args));
  6305. };
  6306. var invalidRange = (start, end, options) => {
  6307. if (options.strictRanges === true)
  6308. throw rangeError([start, end]);
  6309. return [];
  6310. };
  6311. var invalidStep = (step, options) => {
  6312. if (options.strictRanges === true) {
  6313. throw new TypeError(`Expected step "${step}" to be a number`);
  6314. }
  6315. return [];
  6316. };
  6317. var fillNumbers = (start, end, step = 1, options = {}) => {
  6318. let a = Number(start);
  6319. let b = Number(end);
  6320. if (!Number.isInteger(a) || !Number.isInteger(b)) {
  6321. if (options.strictRanges === true)
  6322. throw rangeError([start, end]);
  6323. return [];
  6324. }
  6325. if (a === 0)
  6326. a = 0;
  6327. if (b === 0)
  6328. b = 0;
  6329. let descending = a > b;
  6330. let startString = String(start);
  6331. let endString = String(end);
  6332. let stepString = String(step);
  6333. step = Math.max(Math.abs(step), 1);
  6334. let padded = zeros(startString) || zeros(endString) || zeros(stepString);
  6335. let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
  6336. let toNumber = padded === false && stringify2(start, end, options) === false;
  6337. let format = options.transform || transform(toNumber);
  6338. if (options.toRegex && step === 1) {
  6339. return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
  6340. }
  6341. let parts = {
  6342. negatives: [],
  6343. positives: []
  6344. };
  6345. let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
  6346. let range = [];
  6347. let index = 0;
  6348. while (descending ? a >= b : a <= b) {
  6349. if (options.toRegex === true && step > 1) {
  6350. push(a);
  6351. } else {
  6352. range.push(pad(format(a, index), maxLen, toNumber));
  6353. }
  6354. a = descending ? a - step : a + step;
  6355. index++;
  6356. }
  6357. if (options.toRegex === true) {
  6358. return step > 1 ? toSequence(parts, options) : toRegex(range, null, Object.assign({
  6359. wrap: false
  6360. }, options));
  6361. }
  6362. return range;
  6363. };
  6364. var fillLetters = (start, end, step = 1, options = {}) => {
  6365. if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
  6366. return invalidRange(start, end, options);
  6367. }
  6368. let format = options.transform || ((val) => String.fromCharCode(val));
  6369. let a = `${start}`.charCodeAt(0);
  6370. let b = `${end}`.charCodeAt(0);
  6371. let descending = a > b;
  6372. let min = Math.min(a, b);
  6373. let max = Math.max(a, b);
  6374. if (options.toRegex && step === 1) {
  6375. return toRange(min, max, false, options);
  6376. }
  6377. let range = [];
  6378. let index = 0;
  6379. while (descending ? a >= b : a <= b) {
  6380. range.push(format(a, index));
  6381. a = descending ? a - step : a + step;
  6382. index++;
  6383. }
  6384. if (options.toRegex === true) {
  6385. return toRegex(range, null, {
  6386. wrap: false,
  6387. options
  6388. });
  6389. }
  6390. return range;
  6391. };
  6392. var fill = (start, end, step, options = {}) => {
  6393. if (end == null && isValidValue(start)) {
  6394. return [start];
  6395. }
  6396. if (!isValidValue(start) || !isValidValue(end)) {
  6397. return invalidRange(start, end, options);
  6398. }
  6399. if (typeof step === "function") {
  6400. return fill(start, end, 1, {
  6401. transform: step
  6402. });
  6403. }
  6404. if (isObject(step)) {
  6405. return fill(start, end, 0, step);
  6406. }
  6407. let opts = Object.assign({}, options);
  6408. if (opts.capture === true)
  6409. opts.wrap = true;
  6410. step = step || opts.step || 1;
  6411. if (!isNumber(step)) {
  6412. if (step != null && !isObject(step))
  6413. return invalidStep(step, opts);
  6414. return fill(start, end, 1, step);
  6415. }
  6416. if (isNumber(start) && isNumber(end)) {
  6417. return fillNumbers(start, end, step, opts);
  6418. }
  6419. return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
  6420. };
  6421. module2.exports = fill;
  6422. }
  6423. });
  6424. var require_compile = __commonJS2({
  6425. "node_modules/braces/lib/compile.js"(exports2, module2) {
  6426. "use strict";
  6427. var fill = require_fill_range();
  6428. var utils = require_utils();
  6429. var compile = (ast, options = {}) => {
  6430. let walk = (node, parent = {}) => {
  6431. let invalidBlock = utils.isInvalidBrace(parent);
  6432. let invalidNode = node.invalid === true && options.escapeInvalid === true;
  6433. let invalid = invalidBlock === true || invalidNode === true;
  6434. let prefix = options.escapeInvalid === true ? "\\" : "";
  6435. let output = "";
  6436. if (node.isOpen === true) {
  6437. return prefix + node.value;
  6438. }
  6439. if (node.isClose === true) {
  6440. return prefix + node.value;
  6441. }
  6442. if (node.type === "open") {
  6443. return invalid ? prefix + node.value : "(";
  6444. }
  6445. if (node.type === "close") {
  6446. return invalid ? prefix + node.value : ")";
  6447. }
  6448. if (node.type === "comma") {
  6449. return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
  6450. }
  6451. if (node.value) {
  6452. return node.value;
  6453. }
  6454. if (node.nodes && node.ranges > 0) {
  6455. let args = utils.reduce(node.nodes);
  6456. let range = fill(...args, Object.assign(Object.assign({}, options), {}, {
  6457. wrap: false,
  6458. toRegex: true
  6459. }));
  6460. if (range.length !== 0) {
  6461. return args.length > 1 && range.length > 1 ? `(${range})` : range;
  6462. }
  6463. }
  6464. if (node.nodes) {
  6465. for (let child of node.nodes) {
  6466. output += walk(child, node);
  6467. }
  6468. }
  6469. return output;
  6470. };
  6471. return walk(ast);
  6472. };
  6473. module2.exports = compile;
  6474. }
  6475. });
  6476. var require_expand = __commonJS2({
  6477. "node_modules/braces/lib/expand.js"(exports2, module2) {
  6478. "use strict";
  6479. var fill = require_fill_range();
  6480. var stringify2 = require_stringify();
  6481. var utils = require_utils();
  6482. var append = (queue = "", stash = "", enclose = false) => {
  6483. let result = [];
  6484. queue = [].concat(queue);
  6485. stash = [].concat(stash);
  6486. if (!stash.length)
  6487. return queue;
  6488. if (!queue.length) {
  6489. return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
  6490. }
  6491. for (let item of queue) {
  6492. if (Array.isArray(item)) {
  6493. for (let value of item) {
  6494. result.push(append(value, stash, enclose));
  6495. }
  6496. } else {
  6497. for (let ele of stash) {
  6498. if (enclose === true && typeof ele === "string")
  6499. ele = `{${ele}}`;
  6500. result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
  6501. }
  6502. }
  6503. }
  6504. return utils.flatten(result);
  6505. };
  6506. var expand = (ast, options = {}) => {
  6507. let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
  6508. let walk = (node, parent = {}) => {
  6509. node.queue = [];
  6510. let p = parent;
  6511. let q = parent.queue;
  6512. while (p.type !== "brace" && p.type !== "root" && p.parent) {
  6513. p = p.parent;
  6514. q = p.queue;
  6515. }
  6516. if (node.invalid || node.dollar) {
  6517. q.push(append(q.pop(), stringify2(node, options)));
  6518. return;
  6519. }
  6520. if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
  6521. q.push(append(q.pop(), ["{}"]));
  6522. return;
  6523. }
  6524. if (node.nodes && node.ranges > 0) {
  6525. let args = utils.reduce(node.nodes);
  6526. if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
  6527. throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
  6528. }
  6529. let range = fill(...args, options);
  6530. if (range.length === 0) {
  6531. range = stringify2(node, options);
  6532. }
  6533. q.push(append(q.pop(), range));
  6534. node.nodes = [];
  6535. return;
  6536. }
  6537. let enclose = utils.encloseBrace(node);
  6538. let queue = node.queue;
  6539. let block = node;
  6540. while (block.type !== "brace" && block.type !== "root" && block.parent) {
  6541. block = block.parent;
  6542. queue = block.queue;
  6543. }
  6544. for (let i = 0; i < node.nodes.length; i++) {
  6545. let child = node.nodes[i];
  6546. if (child.type === "comma" && node.type === "brace") {
  6547. if (i === 1)
  6548. queue.push("");
  6549. queue.push("");
  6550. continue;
  6551. }
  6552. if (child.type === "close") {
  6553. q.push(append(q.pop(), queue, enclose));
  6554. continue;
  6555. }
  6556. if (child.value && child.type !== "open") {
  6557. queue.push(append(queue.pop(), child.value));
  6558. continue;
  6559. }
  6560. if (child.nodes) {
  6561. walk(child, node);
  6562. }
  6563. }
  6564. return queue;
  6565. };
  6566. return utils.flatten(walk(ast));
  6567. };
  6568. module2.exports = expand;
  6569. }
  6570. });
  6571. var require_constants = __commonJS2({
  6572. "node_modules/braces/lib/constants.js"(exports2, module2) {
  6573. "use strict";
  6574. module2.exports = {
  6575. MAX_LENGTH: 1024 * 64,
  6576. CHAR_0: "0",
  6577. CHAR_9: "9",
  6578. CHAR_UPPERCASE_A: "A",
  6579. CHAR_LOWERCASE_A: "a",
  6580. CHAR_UPPERCASE_Z: "Z",
  6581. CHAR_LOWERCASE_Z: "z",
  6582. CHAR_LEFT_PARENTHESES: "(",
  6583. CHAR_RIGHT_PARENTHESES: ")",
  6584. CHAR_ASTERISK: "*",
  6585. CHAR_AMPERSAND: "&",
  6586. CHAR_AT: "@",
  6587. CHAR_BACKSLASH: "\\",
  6588. CHAR_BACKTICK: "`",
  6589. CHAR_CARRIAGE_RETURN: "\r",
  6590. CHAR_CIRCUMFLEX_ACCENT: "^",
  6591. CHAR_COLON: ":",
  6592. CHAR_COMMA: ",",
  6593. CHAR_DOLLAR: "$",
  6594. CHAR_DOT: ".",
  6595. CHAR_DOUBLE_QUOTE: '"',
  6596. CHAR_EQUAL: "=",
  6597. CHAR_EXCLAMATION_MARK: "!",
  6598. CHAR_FORM_FEED: "\f",
  6599. CHAR_FORWARD_SLASH: "/",
  6600. CHAR_HASH: "#",
  6601. CHAR_HYPHEN_MINUS: "-",
  6602. CHAR_LEFT_ANGLE_BRACKET: "<",
  6603. CHAR_LEFT_CURLY_BRACE: "{",
  6604. CHAR_LEFT_SQUARE_BRACKET: "[",
  6605. CHAR_LINE_FEED: "\n",
  6606. CHAR_NO_BREAK_SPACE: "\xA0",
  6607. CHAR_PERCENT: "%",
  6608. CHAR_PLUS: "+",
  6609. CHAR_QUESTION_MARK: "?",
  6610. CHAR_RIGHT_ANGLE_BRACKET: ">",
  6611. CHAR_RIGHT_CURLY_BRACE: "}",
  6612. CHAR_RIGHT_SQUARE_BRACKET: "]",
  6613. CHAR_SEMICOLON: ";",
  6614. CHAR_SINGLE_QUOTE: "'",
  6615. CHAR_SPACE: " ",
  6616. CHAR_TAB: " ",
  6617. CHAR_UNDERSCORE: "_",
  6618. CHAR_VERTICAL_LINE: "|",
  6619. CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
  6620. };
  6621. }
  6622. });
  6623. var require_parse = __commonJS2({
  6624. "node_modules/braces/lib/parse.js"(exports2, module2) {
  6625. "use strict";
  6626. var stringify2 = require_stringify();
  6627. var {
  6628. MAX_LENGTH,
  6629. CHAR_BACKSLASH,
  6630. CHAR_BACKTICK,
  6631. CHAR_COMMA,
  6632. CHAR_DOT,
  6633. CHAR_LEFT_PARENTHESES,
  6634. CHAR_RIGHT_PARENTHESES,
  6635. CHAR_LEFT_CURLY_BRACE,
  6636. CHAR_RIGHT_CURLY_BRACE,
  6637. CHAR_LEFT_SQUARE_BRACKET,
  6638. CHAR_RIGHT_SQUARE_BRACKET,
  6639. CHAR_DOUBLE_QUOTE,
  6640. CHAR_SINGLE_QUOTE,
  6641. CHAR_NO_BREAK_SPACE,
  6642. CHAR_ZERO_WIDTH_NOBREAK_SPACE
  6643. } = require_constants();
  6644. var parse = (input, options = {}) => {
  6645. if (typeof input !== "string") {
  6646. throw new TypeError("Expected a string");
  6647. }
  6648. let opts = options || {};
  6649. let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
  6650. if (input.length > max) {
  6651. throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
  6652. }
  6653. let ast = {
  6654. type: "root",
  6655. input,
  6656. nodes: []
  6657. };
  6658. let stack = [ast];
  6659. let block = ast;
  6660. let prev = ast;
  6661. let brackets = 0;
  6662. let length = input.length;
  6663. let index = 0;
  6664. let depth = 0;
  6665. let value;
  6666. let memo = {};
  6667. const advance = () => input[index++];
  6668. const push = (node) => {
  6669. if (node.type === "text" && prev.type === "dot") {
  6670. prev.type = "text";
  6671. }
  6672. if (prev && prev.type === "text" && node.type === "text") {
  6673. prev.value += node.value;
  6674. return;
  6675. }
  6676. block.nodes.push(node);
  6677. node.parent = block;
  6678. node.prev = prev;
  6679. prev = node;
  6680. return node;
  6681. };
  6682. push({
  6683. type: "bos"
  6684. });
  6685. while (index < length) {
  6686. block = stack[stack.length - 1];
  6687. value = advance();
  6688. if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
  6689. continue;
  6690. }
  6691. if (value === CHAR_BACKSLASH) {
  6692. push({
  6693. type: "text",
  6694. value: (options.keepEscaping ? value : "") + advance()
  6695. });
  6696. continue;
  6697. }
  6698. if (value === CHAR_RIGHT_SQUARE_BRACKET) {
  6699. push({
  6700. type: "text",
  6701. value: "\\" + value
  6702. });
  6703. continue;
  6704. }
  6705. if (value === CHAR_LEFT_SQUARE_BRACKET) {
  6706. brackets++;
  6707. let closed = true;
  6708. let next;
  6709. while (index < length && (next = advance())) {
  6710. value += next;
  6711. if (next === CHAR_LEFT_SQUARE_BRACKET) {
  6712. brackets++;
  6713. continue;
  6714. }
  6715. if (next === CHAR_BACKSLASH) {
  6716. value += advance();
  6717. continue;
  6718. }
  6719. if (next === CHAR_RIGHT_SQUARE_BRACKET) {
  6720. brackets--;
  6721. if (brackets === 0) {
  6722. break;
  6723. }
  6724. }
  6725. }
  6726. push({
  6727. type: "text",
  6728. value
  6729. });
  6730. continue;
  6731. }
  6732. if (value === CHAR_LEFT_PARENTHESES) {
  6733. block = push({
  6734. type: "paren",
  6735. nodes: []
  6736. });
  6737. stack.push(block);
  6738. push({
  6739. type: "text",
  6740. value
  6741. });
  6742. continue;
  6743. }
  6744. if (value === CHAR_RIGHT_PARENTHESES) {
  6745. if (block.type !== "paren") {
  6746. push({
  6747. type: "text",
  6748. value
  6749. });
  6750. continue;
  6751. }
  6752. block = stack.pop();
  6753. push({
  6754. type: "text",
  6755. value
  6756. });
  6757. block = stack[stack.length - 1];
  6758. continue;
  6759. }
  6760. if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
  6761. let open = value;
  6762. let next;
  6763. if (options.keepQuotes !== true) {
  6764. value = "";
  6765. }
  6766. while (index < length && (next = advance())) {
  6767. if (next === CHAR_BACKSLASH) {
  6768. value += next + advance();
  6769. continue;
  6770. }
  6771. if (next === open) {
  6772. if (options.keepQuotes === true)
  6773. value += next;
  6774. break;
  6775. }
  6776. value += next;
  6777. }
  6778. push({
  6779. type: "text",
  6780. value
  6781. });
  6782. continue;
  6783. }
  6784. if (value === CHAR_LEFT_CURLY_BRACE) {
  6785. depth++;
  6786. let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
  6787. let brace = {
  6788. type: "brace",
  6789. open: true,
  6790. close: false,
  6791. dollar,
  6792. depth,
  6793. commas: 0,
  6794. ranges: 0,
  6795. nodes: []
  6796. };
  6797. block = push(brace);
  6798. stack.push(block);
  6799. push({
  6800. type: "open",
  6801. value
  6802. });
  6803. continue;
  6804. }
  6805. if (value === CHAR_RIGHT_CURLY_BRACE) {
  6806. if (block.type !== "brace") {
  6807. push({
  6808. type: "text",
  6809. value
  6810. });
  6811. continue;
  6812. }
  6813. let type = "close";
  6814. block = stack.pop();
  6815. block.close = true;
  6816. push({
  6817. type,
  6818. value
  6819. });
  6820. depth--;
  6821. block = stack[stack.length - 1];
  6822. continue;
  6823. }
  6824. if (value === CHAR_COMMA && depth > 0) {
  6825. if (block.ranges > 0) {
  6826. block.ranges = 0;
  6827. let open = block.nodes.shift();
  6828. block.nodes = [open, {
  6829. type: "text",
  6830. value: stringify2(block)
  6831. }];
  6832. }
  6833. push({
  6834. type: "comma",
  6835. value
  6836. });
  6837. block.commas++;
  6838. continue;
  6839. }
  6840. if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
  6841. let siblings = block.nodes;
  6842. if (depth === 0 || siblings.length === 0) {
  6843. push({
  6844. type: "text",
  6845. value
  6846. });
  6847. continue;
  6848. }
  6849. if (prev.type === "dot") {
  6850. block.range = [];
  6851. prev.value += value;
  6852. prev.type = "range";
  6853. if (block.nodes.length !== 3 && block.nodes.length !== 5) {
  6854. block.invalid = true;
  6855. block.ranges = 0;
  6856. prev.type = "text";
  6857. continue;
  6858. }
  6859. block.ranges++;
  6860. block.args = [];
  6861. continue;
  6862. }
  6863. if (prev.type === "range") {
  6864. siblings.pop();
  6865. let before = siblings[siblings.length - 1];
  6866. before.value += prev.value + value;
  6867. prev = before;
  6868. block.ranges--;
  6869. continue;
  6870. }
  6871. push({
  6872. type: "dot",
  6873. value
  6874. });
  6875. continue;
  6876. }
  6877. push({
  6878. type: "text",
  6879. value
  6880. });
  6881. }
  6882. do {
  6883. block = stack.pop();
  6884. if (block.type !== "root") {
  6885. block.nodes.forEach((node) => {
  6886. if (!node.nodes) {
  6887. if (node.type === "open")
  6888. node.isOpen = true;
  6889. if (node.type === "close")
  6890. node.isClose = true;
  6891. if (!node.nodes)
  6892. node.type = "text";
  6893. node.invalid = true;
  6894. }
  6895. });
  6896. let parent = stack[stack.length - 1];
  6897. let index2 = parent.nodes.indexOf(block);
  6898. parent.nodes.splice(index2, 1, ...block.nodes);
  6899. }
  6900. } while (stack.length > 0);
  6901. push({
  6902. type: "eos"
  6903. });
  6904. return ast;
  6905. };
  6906. module2.exports = parse;
  6907. }
  6908. });
  6909. var require_braces = __commonJS2({
  6910. "node_modules/braces/index.js"(exports2, module2) {
  6911. "use strict";
  6912. var stringify2 = require_stringify();
  6913. var compile = require_compile();
  6914. var expand = require_expand();
  6915. var parse = require_parse();
  6916. var braces = (input, options = {}) => {
  6917. let output = [];
  6918. if (Array.isArray(input)) {
  6919. for (let pattern of input) {
  6920. let result = braces.create(pattern, options);
  6921. if (Array.isArray(result)) {
  6922. output.push(...result);
  6923. } else {
  6924. output.push(result);
  6925. }
  6926. }
  6927. } else {
  6928. output = [].concat(braces.create(input, options));
  6929. }
  6930. if (options && options.expand === true && options.nodupes === true) {
  6931. output = [...new Set(output)];
  6932. }
  6933. return output;
  6934. };
  6935. braces.parse = (input, options = {}) => parse(input, options);
  6936. braces.stringify = (input, options = {}) => {
  6937. if (typeof input === "string") {
  6938. return stringify2(braces.parse(input, options), options);
  6939. }
  6940. return stringify2(input, options);
  6941. };
  6942. braces.compile = (input, options = {}) => {
  6943. if (typeof input === "string") {
  6944. input = braces.parse(input, options);
  6945. }
  6946. return compile(input, options);
  6947. };
  6948. braces.expand = (input, options = {}) => {
  6949. if (typeof input === "string") {
  6950. input = braces.parse(input, options);
  6951. }
  6952. let result = expand(input, options);
  6953. if (options.noempty === true) {
  6954. result = result.filter(Boolean);
  6955. }
  6956. if (options.nodupes === true) {
  6957. result = [...new Set(result)];
  6958. }
  6959. return result;
  6960. };
  6961. braces.create = (input, options = {}) => {
  6962. if (input === "" || input.length < 3) {
  6963. return [input];
  6964. }
  6965. return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
  6966. };
  6967. module2.exports = braces;
  6968. }
  6969. });
  6970. var require_constants2 = __commonJS2({
  6971. "node_modules/picomatch/lib/constants.js"(exports2, module2) {
  6972. "use strict";
  6973. var path = require("path");
  6974. var WIN_SLASH = "\\\\/";
  6975. var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
  6976. var DOT_LITERAL = "\\.";
  6977. var PLUS_LITERAL = "\\+";
  6978. var QMARK_LITERAL = "\\?";
  6979. var SLASH_LITERAL = "\\/";
  6980. var ONE_CHAR = "(?=.)";
  6981. var QMARK = "[^/]";
  6982. var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
  6983. var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
  6984. var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
  6985. var NO_DOT = `(?!${DOT_LITERAL})`;
  6986. var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
  6987. var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
  6988. var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
  6989. var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
  6990. var STAR = `${QMARK}*?`;
  6991. var POSIX_CHARS = {
  6992. DOT_LITERAL,
  6993. PLUS_LITERAL,
  6994. QMARK_LITERAL,
  6995. SLASH_LITERAL,
  6996. ONE_CHAR,
  6997. QMARK,
  6998. END_ANCHOR,
  6999. DOTS_SLASH,
  7000. NO_DOT,
  7001. NO_DOTS,
  7002. NO_DOT_SLASH,
  7003. NO_DOTS_SLASH,
  7004. QMARK_NO_DOT,
  7005. STAR,
  7006. START_ANCHOR
  7007. };
  7008. var WINDOWS_CHARS = Object.assign(Object.assign({}, POSIX_CHARS), {}, {
  7009. SLASH_LITERAL: `[${WIN_SLASH}]`,
  7010. QMARK: WIN_NO_SLASH,
  7011. STAR: `${WIN_NO_SLASH}*?`,
  7012. DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
  7013. NO_DOT: `(?!${DOT_LITERAL})`,
  7014. NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
  7015. NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
  7016. NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
  7017. QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
  7018. START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
  7019. END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
  7020. });
  7021. var POSIX_REGEX_SOURCE = {
  7022. alnum: "a-zA-Z0-9",
  7023. alpha: "a-zA-Z",
  7024. ascii: "\\x00-\\x7F",
  7025. blank: " \\t",
  7026. cntrl: "\\x00-\\x1F\\x7F",
  7027. digit: "0-9",
  7028. graph: "\\x21-\\x7E",
  7029. lower: "a-z",
  7030. print: "\\x20-\\x7E ",
  7031. punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
  7032. space: " \\t\\r\\n\\v\\f",
  7033. upper: "A-Z",
  7034. word: "A-Za-z0-9_",
  7035. xdigit: "A-Fa-f0-9"
  7036. };
  7037. module2.exports = {
  7038. MAX_LENGTH: 1024 * 64,
  7039. POSIX_REGEX_SOURCE,
  7040. REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
  7041. REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
  7042. REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
  7043. REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
  7044. REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
  7045. REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
  7046. REPLACEMENTS: {
  7047. "***": "*",
  7048. "**/**": "**",
  7049. "**/**/**": "**"
  7050. },
  7051. CHAR_0: 48,
  7052. CHAR_9: 57,
  7053. CHAR_UPPERCASE_A: 65,
  7054. CHAR_LOWERCASE_A: 97,
  7055. CHAR_UPPERCASE_Z: 90,
  7056. CHAR_LOWERCASE_Z: 122,
  7057. CHAR_LEFT_PARENTHESES: 40,
  7058. CHAR_RIGHT_PARENTHESES: 41,
  7059. CHAR_ASTERISK: 42,
  7060. CHAR_AMPERSAND: 38,
  7061. CHAR_AT: 64,
  7062. CHAR_BACKWARD_SLASH: 92,
  7063. CHAR_CARRIAGE_RETURN: 13,
  7064. CHAR_CIRCUMFLEX_ACCENT: 94,
  7065. CHAR_COLON: 58,
  7066. CHAR_COMMA: 44,
  7067. CHAR_DOT: 46,
  7068. CHAR_DOUBLE_QUOTE: 34,
  7069. CHAR_EQUAL: 61,
  7070. CHAR_EXCLAMATION_MARK: 33,
  7071. CHAR_FORM_FEED: 12,
  7072. CHAR_FORWARD_SLASH: 47,
  7073. CHAR_GRAVE_ACCENT: 96,
  7074. CHAR_HASH: 35,
  7075. CHAR_HYPHEN_MINUS: 45,
  7076. CHAR_LEFT_ANGLE_BRACKET: 60,
  7077. CHAR_LEFT_CURLY_BRACE: 123,
  7078. CHAR_LEFT_SQUARE_BRACKET: 91,
  7079. CHAR_LINE_FEED: 10,
  7080. CHAR_NO_BREAK_SPACE: 160,
  7081. CHAR_PERCENT: 37,
  7082. CHAR_PLUS: 43,
  7083. CHAR_QUESTION_MARK: 63,
  7084. CHAR_RIGHT_ANGLE_BRACKET: 62,
  7085. CHAR_RIGHT_CURLY_BRACE: 125,
  7086. CHAR_RIGHT_SQUARE_BRACKET: 93,
  7087. CHAR_SEMICOLON: 59,
  7088. CHAR_SINGLE_QUOTE: 39,
  7089. CHAR_SPACE: 32,
  7090. CHAR_TAB: 9,
  7091. CHAR_UNDERSCORE: 95,
  7092. CHAR_VERTICAL_LINE: 124,
  7093. CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
  7094. SEP: path.sep,
  7095. extglobChars(chars) {
  7096. return {
  7097. "!": {
  7098. type: "negate",
  7099. open: "(?:(?!(?:",
  7100. close: `))${chars.STAR})`
  7101. },
  7102. "?": {
  7103. type: "qmark",
  7104. open: "(?:",
  7105. close: ")?"
  7106. },
  7107. "+": {
  7108. type: "plus",
  7109. open: "(?:",
  7110. close: ")+"
  7111. },
  7112. "*": {
  7113. type: "star",
  7114. open: "(?:",
  7115. close: ")*"
  7116. },
  7117. "@": {
  7118. type: "at",
  7119. open: "(?:",
  7120. close: ")"
  7121. }
  7122. };
  7123. },
  7124. globChars(win32) {
  7125. return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
  7126. }
  7127. };
  7128. }
  7129. });
  7130. var require_utils2 = __commonJS2({
  7131. "node_modules/picomatch/lib/utils.js"(exports2) {
  7132. "use strict";
  7133. var path = require("path");
  7134. var win32 = process.platform === "win32";
  7135. var {
  7136. REGEX_BACKSLASH,
  7137. REGEX_REMOVE_BACKSLASH,
  7138. REGEX_SPECIAL_CHARS,
  7139. REGEX_SPECIAL_CHARS_GLOBAL
  7140. } = require_constants2();
  7141. exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
  7142. exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
  7143. exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str);
  7144. exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
  7145. exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
  7146. exports2.removeBackslashes = (str) => {
  7147. return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
  7148. return match === "\\" ? "" : match;
  7149. });
  7150. };
  7151. exports2.supportsLookbehinds = () => {
  7152. const segs = process.version.slice(1).split(".").map(Number);
  7153. if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
  7154. return true;
  7155. }
  7156. return false;
  7157. };
  7158. exports2.isWindows = (options) => {
  7159. if (options && typeof options.windows === "boolean") {
  7160. return options.windows;
  7161. }
  7162. return win32 === true || path.sep === "\\";
  7163. };
  7164. exports2.escapeLast = (input, char, lastIdx) => {
  7165. const idx = input.lastIndexOf(char, lastIdx);
  7166. if (idx === -1)
  7167. return input;
  7168. if (input[idx - 1] === "\\")
  7169. return exports2.escapeLast(input, char, idx - 1);
  7170. return `${input.slice(0, idx)}\\${input.slice(idx)}`;
  7171. };
  7172. exports2.removePrefix = (input, state = {}) => {
  7173. let output = input;
  7174. if (output.startsWith("./")) {
  7175. output = output.slice(2);
  7176. state.prefix = "./";
  7177. }
  7178. return output;
  7179. };
  7180. exports2.wrapOutput = (input, state = {}, options = {}) => {
  7181. const prepend = options.contains ? "" : "^";
  7182. const append = options.contains ? "" : "$";
  7183. let output = `${prepend}(?:${input})${append}`;
  7184. if (state.negated === true) {
  7185. output = `(?:^(?!${output}).*$)`;
  7186. }
  7187. return output;
  7188. };
  7189. }
  7190. });
  7191. var require_scan = __commonJS2({
  7192. "node_modules/picomatch/lib/scan.js"(exports2, module2) {
  7193. "use strict";
  7194. var utils = require_utils2();
  7195. var {
  7196. CHAR_ASTERISK,
  7197. CHAR_AT,
  7198. CHAR_BACKWARD_SLASH,
  7199. CHAR_COMMA,
  7200. CHAR_DOT,
  7201. CHAR_EXCLAMATION_MARK,
  7202. CHAR_FORWARD_SLASH,
  7203. CHAR_LEFT_CURLY_BRACE,
  7204. CHAR_LEFT_PARENTHESES,
  7205. CHAR_LEFT_SQUARE_BRACKET,
  7206. CHAR_PLUS,
  7207. CHAR_QUESTION_MARK,
  7208. CHAR_RIGHT_CURLY_BRACE,
  7209. CHAR_RIGHT_PARENTHESES,
  7210. CHAR_RIGHT_SQUARE_BRACKET
  7211. } = require_constants2();
  7212. var isPathSeparator = (code) => {
  7213. return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
  7214. };
  7215. var depth = (token) => {
  7216. if (token.isPrefix !== true) {
  7217. token.depth = token.isGlobstar ? Infinity : 1;
  7218. }
  7219. };
  7220. var scan = (input, options) => {
  7221. const opts = options || {};
  7222. const length = input.length - 1;
  7223. const scanToEnd = opts.parts === true || opts.scanToEnd === true;
  7224. const slashes = [];
  7225. const tokens = [];
  7226. const parts = [];
  7227. let str = input;
  7228. let index = -1;
  7229. let start = 0;
  7230. let lastIndex = 0;
  7231. let isBrace = false;
  7232. let isBracket = false;
  7233. let isGlob = false;
  7234. let isExtglob = false;
  7235. let isGlobstar = false;
  7236. let braceEscaped = false;
  7237. let backslashes = false;
  7238. let negated = false;
  7239. let negatedExtglob = false;
  7240. let finished = false;
  7241. let braces = 0;
  7242. let prev;
  7243. let code;
  7244. let token = {
  7245. value: "",
  7246. depth: 0,
  7247. isGlob: false
  7248. };
  7249. const eos = () => index >= length;
  7250. const peek = () => str.charCodeAt(index + 1);
  7251. const advance = () => {
  7252. prev = code;
  7253. return str.charCodeAt(++index);
  7254. };
  7255. while (index < length) {
  7256. code = advance();
  7257. let next;
  7258. if (code === CHAR_BACKWARD_SLASH) {
  7259. backslashes = token.backslashes = true;
  7260. code = advance();
  7261. if (code === CHAR_LEFT_CURLY_BRACE) {
  7262. braceEscaped = true;
  7263. }
  7264. continue;
  7265. }
  7266. if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
  7267. braces++;
  7268. while (eos() !== true && (code = advance())) {
  7269. if (code === CHAR_BACKWARD_SLASH) {
  7270. backslashes = token.backslashes = true;
  7271. advance();
  7272. continue;
  7273. }
  7274. if (code === CHAR_LEFT_CURLY_BRACE) {
  7275. braces++;
  7276. continue;
  7277. }
  7278. if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
  7279. isBrace = token.isBrace = true;
  7280. isGlob = token.isGlob = true;
  7281. finished = true;
  7282. if (scanToEnd === true) {
  7283. continue;
  7284. }
  7285. break;
  7286. }
  7287. if (braceEscaped !== true && code === CHAR_COMMA) {
  7288. isBrace = token.isBrace = true;
  7289. isGlob = token.isGlob = true;
  7290. finished = true;
  7291. if (scanToEnd === true) {
  7292. continue;
  7293. }
  7294. break;
  7295. }
  7296. if (code === CHAR_RIGHT_CURLY_BRACE) {
  7297. braces--;
  7298. if (braces === 0) {
  7299. braceEscaped = false;
  7300. isBrace = token.isBrace = true;
  7301. finished = true;
  7302. break;
  7303. }
  7304. }
  7305. }
  7306. if (scanToEnd === true) {
  7307. continue;
  7308. }
  7309. break;
  7310. }
  7311. if (code === CHAR_FORWARD_SLASH) {
  7312. slashes.push(index);
  7313. tokens.push(token);
  7314. token = {
  7315. value: "",
  7316. depth: 0,
  7317. isGlob: false
  7318. };
  7319. if (finished === true)
  7320. continue;
  7321. if (prev === CHAR_DOT && index === start + 1) {
  7322. start += 2;
  7323. continue;
  7324. }
  7325. lastIndex = index + 1;
  7326. continue;
  7327. }
  7328. if (opts.noext !== true) {
  7329. const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
  7330. if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
  7331. isGlob = token.isGlob = true;
  7332. isExtglob = token.isExtglob = true;
  7333. finished = true;
  7334. if (code === CHAR_EXCLAMATION_MARK && index === start) {
  7335. negatedExtglob = true;
  7336. }
  7337. if (scanToEnd === true) {
  7338. while (eos() !== true && (code = advance())) {
  7339. if (code === CHAR_BACKWARD_SLASH) {
  7340. backslashes = token.backslashes = true;
  7341. code = advance();
  7342. continue;
  7343. }
  7344. if (code === CHAR_RIGHT_PARENTHESES) {
  7345. isGlob = token.isGlob = true;
  7346. finished = true;
  7347. break;
  7348. }
  7349. }
  7350. continue;
  7351. }
  7352. break;
  7353. }
  7354. }
  7355. if (code === CHAR_ASTERISK) {
  7356. if (prev === CHAR_ASTERISK)
  7357. isGlobstar = token.isGlobstar = true;
  7358. isGlob = token.isGlob = true;
  7359. finished = true;
  7360. if (scanToEnd === true) {
  7361. continue;
  7362. }
  7363. break;
  7364. }
  7365. if (code === CHAR_QUESTION_MARK) {
  7366. isGlob = token.isGlob = true;
  7367. finished = true;
  7368. if (scanToEnd === true) {
  7369. continue;
  7370. }
  7371. break;
  7372. }
  7373. if (code === CHAR_LEFT_SQUARE_BRACKET) {
  7374. while (eos() !== true && (next = advance())) {
  7375. if (next === CHAR_BACKWARD_SLASH) {
  7376. backslashes = token.backslashes = true;
  7377. advance();
  7378. continue;
  7379. }
  7380. if (next === CHAR_RIGHT_SQUARE_BRACKET) {
  7381. isBracket = token.isBracket = true;
  7382. isGlob = token.isGlob = true;
  7383. finished = true;
  7384. break;
  7385. }
  7386. }
  7387. if (scanToEnd === true) {
  7388. continue;
  7389. }
  7390. break;
  7391. }
  7392. if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
  7393. negated = token.negated = true;
  7394. start++;
  7395. continue;
  7396. }
  7397. if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
  7398. isGlob = token.isGlob = true;
  7399. if (scanToEnd === true) {
  7400. while (eos() !== true && (code = advance())) {
  7401. if (code === CHAR_LEFT_PARENTHESES) {
  7402. backslashes = token.backslashes = true;
  7403. code = advance();
  7404. continue;
  7405. }
  7406. if (code === CHAR_RIGHT_PARENTHESES) {
  7407. finished = true;
  7408. break;
  7409. }
  7410. }
  7411. continue;
  7412. }
  7413. break;
  7414. }
  7415. if (isGlob === true) {
  7416. finished = true;
  7417. if (scanToEnd === true) {
  7418. continue;
  7419. }
  7420. break;
  7421. }
  7422. }
  7423. if (opts.noext === true) {
  7424. isExtglob = false;
  7425. isGlob = false;
  7426. }
  7427. let base = str;
  7428. let prefix = "";
  7429. let glob = "";
  7430. if (start > 0) {
  7431. prefix = str.slice(0, start);
  7432. str = str.slice(start);
  7433. lastIndex -= start;
  7434. }
  7435. if (base && isGlob === true && lastIndex > 0) {
  7436. base = str.slice(0, lastIndex);
  7437. glob = str.slice(lastIndex);
  7438. } else if (isGlob === true) {
  7439. base = "";
  7440. glob = str;
  7441. } else {
  7442. base = str;
  7443. }
  7444. if (base && base !== "" && base !== "/" && base !== str) {
  7445. if (isPathSeparator(base.charCodeAt(base.length - 1))) {
  7446. base = base.slice(0, -1);
  7447. }
  7448. }
  7449. if (opts.unescape === true) {
  7450. if (glob)
  7451. glob = utils.removeBackslashes(glob);
  7452. if (base && backslashes === true) {
  7453. base = utils.removeBackslashes(base);
  7454. }
  7455. }
  7456. const state = {
  7457. prefix,
  7458. input,
  7459. start,
  7460. base,
  7461. glob,
  7462. isBrace,
  7463. isBracket,
  7464. isGlob,
  7465. isExtglob,
  7466. isGlobstar,
  7467. negated,
  7468. negatedExtglob
  7469. };
  7470. if (opts.tokens === true) {
  7471. state.maxDepth = 0;
  7472. if (!isPathSeparator(code)) {
  7473. tokens.push(token);
  7474. }
  7475. state.tokens = tokens;
  7476. }
  7477. if (opts.parts === true || opts.tokens === true) {
  7478. let prevIndex;
  7479. for (let idx = 0; idx < slashes.length; idx++) {
  7480. const n = prevIndex ? prevIndex + 1 : start;
  7481. const i = slashes[idx];
  7482. const value = input.slice(n, i);
  7483. if (opts.tokens) {
  7484. if (idx === 0 && start !== 0) {
  7485. tokens[idx].isPrefix = true;
  7486. tokens[idx].value = prefix;
  7487. } else {
  7488. tokens[idx].value = value;
  7489. }
  7490. depth(tokens[idx]);
  7491. state.maxDepth += tokens[idx].depth;
  7492. }
  7493. if (idx !== 0 || value !== "") {
  7494. parts.push(value);
  7495. }
  7496. prevIndex = i;
  7497. }
  7498. if (prevIndex && prevIndex + 1 < input.length) {
  7499. const value = input.slice(prevIndex + 1);
  7500. parts.push(value);
  7501. if (opts.tokens) {
  7502. tokens[tokens.length - 1].value = value;
  7503. depth(tokens[tokens.length - 1]);
  7504. state.maxDepth += tokens[tokens.length - 1].depth;
  7505. }
  7506. }
  7507. state.slashes = slashes;
  7508. state.parts = parts;
  7509. }
  7510. return state;
  7511. };
  7512. module2.exports = scan;
  7513. }
  7514. });
  7515. var require_parse2 = __commonJS2({
  7516. "node_modules/picomatch/lib/parse.js"(exports2, module2) {
  7517. "use strict";
  7518. var constants = require_constants2();
  7519. var utils = require_utils2();
  7520. var {
  7521. MAX_LENGTH,
  7522. POSIX_REGEX_SOURCE,
  7523. REGEX_NON_SPECIAL_CHARS,
  7524. REGEX_SPECIAL_CHARS_BACKREF,
  7525. REPLACEMENTS
  7526. } = constants;
  7527. var expandRange = (args, options) => {
  7528. if (typeof options.expandRange === "function") {
  7529. return options.expandRange(...args, options);
  7530. }
  7531. args.sort();
  7532. const value = `[${args.join("-")}]`;
  7533. try {
  7534. new RegExp(value);
  7535. } catch (ex) {
  7536. return args.map((v) => utils.escapeRegex(v)).join("..");
  7537. }
  7538. return value;
  7539. };
  7540. var syntaxError = (type, char) => {
  7541. return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
  7542. };
  7543. var parse = (input, options) => {
  7544. if (typeof input !== "string") {
  7545. throw new TypeError("Expected a string");
  7546. }
  7547. input = REPLACEMENTS[input] || input;
  7548. const opts = Object.assign({}, options);
  7549. const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
  7550. let len = input.length;
  7551. if (len > max) {
  7552. throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
  7553. }
  7554. const bos = {
  7555. type: "bos",
  7556. value: "",
  7557. output: opts.prepend || ""
  7558. };
  7559. const tokens = [bos];
  7560. const capture = opts.capture ? "" : "?:";
  7561. const win32 = utils.isWindows(options);
  7562. const PLATFORM_CHARS = constants.globChars(win32);
  7563. const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
  7564. const {
  7565. DOT_LITERAL,
  7566. PLUS_LITERAL,
  7567. SLASH_LITERAL,
  7568. ONE_CHAR,
  7569. DOTS_SLASH,
  7570. NO_DOT,
  7571. NO_DOT_SLASH,
  7572. NO_DOTS_SLASH,
  7573. QMARK,
  7574. QMARK_NO_DOT,
  7575. STAR,
  7576. START_ANCHOR
  7577. } = PLATFORM_CHARS;
  7578. const globstar = (opts2) => {
  7579. return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
  7580. };
  7581. const nodot = opts.dot ? "" : NO_DOT;
  7582. const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
  7583. let star = opts.bash === true ? globstar(opts) : STAR;
  7584. if (opts.capture) {
  7585. star = `(${star})`;
  7586. }
  7587. if (typeof opts.noext === "boolean") {
  7588. opts.noextglob = opts.noext;
  7589. }
  7590. const state = {
  7591. input,
  7592. index: -1,
  7593. start: 0,
  7594. dot: opts.dot === true,
  7595. consumed: "",
  7596. output: "",
  7597. prefix: "",
  7598. backtrack: false,
  7599. negated: false,
  7600. brackets: 0,
  7601. braces: 0,
  7602. parens: 0,
  7603. quotes: 0,
  7604. globstar: false,
  7605. tokens
  7606. };
  7607. input = utils.removePrefix(input, state);
  7608. len = input.length;
  7609. const extglobs = [];
  7610. const braces = [];
  7611. const stack = [];
  7612. let prev = bos;
  7613. let value;
  7614. const eos = () => state.index === len - 1;
  7615. const peek = state.peek = (n = 1) => input[state.index + n];
  7616. const advance = state.advance = () => input[++state.index] || "";
  7617. const remaining = () => input.slice(state.index + 1);
  7618. const consume = (value2 = "", num = 0) => {
  7619. state.consumed += value2;
  7620. state.index += num;
  7621. };
  7622. const append = (token) => {
  7623. state.output += token.output != null ? token.output : token.value;
  7624. consume(token.value);
  7625. };
  7626. const negate = () => {
  7627. let count = 1;
  7628. while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
  7629. advance();
  7630. state.start++;
  7631. count++;
  7632. }
  7633. if (count % 2 === 0) {
  7634. return false;
  7635. }
  7636. state.negated = true;
  7637. state.start++;
  7638. return true;
  7639. };
  7640. const increment = (type) => {
  7641. state[type]++;
  7642. stack.push(type);
  7643. };
  7644. const decrement = (type) => {
  7645. state[type]--;
  7646. stack.pop();
  7647. };
  7648. const push = (tok) => {
  7649. if (prev.type === "globstar") {
  7650. const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
  7651. const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
  7652. if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
  7653. state.output = state.output.slice(0, -prev.output.length);
  7654. prev.type = "star";
  7655. prev.value = "*";
  7656. prev.output = star;
  7657. state.output += prev.output;
  7658. }
  7659. }
  7660. if (extglobs.length && tok.type !== "paren") {
  7661. extglobs[extglobs.length - 1].inner += tok.value;
  7662. }
  7663. if (tok.value || tok.output)
  7664. append(tok);
  7665. if (prev && prev.type === "text" && tok.type === "text") {
  7666. prev.value += tok.value;
  7667. prev.output = (prev.output || "") + tok.value;
  7668. return;
  7669. }
  7670. tok.prev = prev;
  7671. tokens.push(tok);
  7672. prev = tok;
  7673. };
  7674. const extglobOpen = (type, value2) => {
  7675. const token = Object.assign(Object.assign({}, EXTGLOB_CHARS[value2]), {}, {
  7676. conditions: 1,
  7677. inner: ""
  7678. });
  7679. token.prev = prev;
  7680. token.parens = state.parens;
  7681. token.output = state.output;
  7682. const output = (opts.capture ? "(" : "") + token.open;
  7683. increment("parens");
  7684. push({
  7685. type,
  7686. value: value2,
  7687. output: state.output ? "" : ONE_CHAR
  7688. });
  7689. push({
  7690. type: "paren",
  7691. extglob: true,
  7692. value: advance(),
  7693. output
  7694. });
  7695. extglobs.push(token);
  7696. };
  7697. const extglobClose = (token) => {
  7698. let output = token.close + (opts.capture ? ")" : "");
  7699. let rest;
  7700. if (token.type === "negate") {
  7701. let extglobStar = star;
  7702. if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
  7703. extglobStar = globstar(opts);
  7704. }
  7705. if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
  7706. output = token.close = `)$))${extglobStar}`;
  7707. }
  7708. if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
  7709. const expression = parse(rest, Object.assign(Object.assign({}, options), {}, {
  7710. fastpaths: false
  7711. })).output;
  7712. output = token.close = `)${expression})${extglobStar})`;
  7713. }
  7714. if (token.prev.type === "bos") {
  7715. state.negatedExtglob = true;
  7716. }
  7717. }
  7718. push({
  7719. type: "paren",
  7720. extglob: true,
  7721. value,
  7722. output
  7723. });
  7724. decrement("parens");
  7725. };
  7726. if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
  7727. let backslashes = false;
  7728. let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
  7729. if (first === "\\") {
  7730. backslashes = true;
  7731. return m;
  7732. }
  7733. if (first === "?") {
  7734. if (esc) {
  7735. return esc + first + (rest ? QMARK.repeat(rest.length) : "");
  7736. }
  7737. if (index === 0) {
  7738. return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
  7739. }
  7740. return QMARK.repeat(chars.length);
  7741. }
  7742. if (first === ".") {
  7743. return DOT_LITERAL.repeat(chars.length);
  7744. }
  7745. if (first === "*") {
  7746. if (esc) {
  7747. return esc + first + (rest ? star : "");
  7748. }
  7749. return star;
  7750. }
  7751. return esc ? m : `\\${m}`;
  7752. });
  7753. if (backslashes === true) {
  7754. if (opts.unescape === true) {
  7755. output = output.replace(/\\/g, "");
  7756. } else {
  7757. output = output.replace(/\\+/g, (m) => {
  7758. return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
  7759. });
  7760. }
  7761. }
  7762. if (output === input && opts.contains === true) {
  7763. state.output = input;
  7764. return state;
  7765. }
  7766. state.output = utils.wrapOutput(output, state, options);
  7767. return state;
  7768. }
  7769. while (!eos()) {
  7770. value = advance();
  7771. if (value === "\0") {
  7772. continue;
  7773. }
  7774. if (value === "\\") {
  7775. const next = peek();
  7776. if (next === "/" && opts.bash !== true) {
  7777. continue;
  7778. }
  7779. if (next === "." || next === ";") {
  7780. continue;
  7781. }
  7782. if (!next) {
  7783. value += "\\";
  7784. push({
  7785. type: "text",
  7786. value
  7787. });
  7788. continue;
  7789. }
  7790. const match = /^\\+/.exec(remaining());
  7791. let slashes = 0;
  7792. if (match && match[0].length > 2) {
  7793. slashes = match[0].length;
  7794. state.index += slashes;
  7795. if (slashes % 2 !== 0) {
  7796. value += "\\";
  7797. }
  7798. }
  7799. if (opts.unescape === true) {
  7800. value = advance();
  7801. } else {
  7802. value += advance();
  7803. }
  7804. if (state.brackets === 0) {
  7805. push({
  7806. type: "text",
  7807. value
  7808. });
  7809. continue;
  7810. }
  7811. }
  7812. if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
  7813. if (opts.posix !== false && value === ":") {
  7814. const inner = prev.value.slice(1);
  7815. if (inner.includes("[")) {
  7816. prev.posix = true;
  7817. if (inner.includes(":")) {
  7818. const idx = prev.value.lastIndexOf("[");
  7819. const pre = prev.value.slice(0, idx);
  7820. const rest2 = prev.value.slice(idx + 2);
  7821. const posix = POSIX_REGEX_SOURCE[rest2];
  7822. if (posix) {
  7823. prev.value = pre + posix;
  7824. state.backtrack = true;
  7825. advance();
  7826. if (!bos.output && tokens.indexOf(prev) === 1) {
  7827. bos.output = ONE_CHAR;
  7828. }
  7829. continue;
  7830. }
  7831. }
  7832. }
  7833. }
  7834. if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
  7835. value = `\\${value}`;
  7836. }
  7837. if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
  7838. value = `\\${value}`;
  7839. }
  7840. if (opts.posix === true && value === "!" && prev.value === "[") {
  7841. value = "^";
  7842. }
  7843. prev.value += value;
  7844. append({
  7845. value
  7846. });
  7847. continue;
  7848. }
  7849. if (state.quotes === 1 && value !== '"') {
  7850. value = utils.escapeRegex(value);
  7851. prev.value += value;
  7852. append({
  7853. value
  7854. });
  7855. continue;
  7856. }
  7857. if (value === '"') {
  7858. state.quotes = state.quotes === 1 ? 0 : 1;
  7859. if (opts.keepQuotes === true) {
  7860. push({
  7861. type: "text",
  7862. value
  7863. });
  7864. }
  7865. continue;
  7866. }
  7867. if (value === "(") {
  7868. increment("parens");
  7869. push({
  7870. type: "paren",
  7871. value
  7872. });
  7873. continue;
  7874. }
  7875. if (value === ")") {
  7876. if (state.parens === 0 && opts.strictBrackets === true) {
  7877. throw new SyntaxError(syntaxError("opening", "("));
  7878. }
  7879. const extglob = extglobs[extglobs.length - 1];
  7880. if (extglob && state.parens === extglob.parens + 1) {
  7881. extglobClose(extglobs.pop());
  7882. continue;
  7883. }
  7884. push({
  7885. type: "paren",
  7886. value,
  7887. output: state.parens ? ")" : "\\)"
  7888. });
  7889. decrement("parens");
  7890. continue;
  7891. }
  7892. if (value === "[") {
  7893. if (opts.nobracket === true || !remaining().includes("]")) {
  7894. if (opts.nobracket !== true && opts.strictBrackets === true) {
  7895. throw new SyntaxError(syntaxError("closing", "]"));
  7896. }
  7897. value = `\\${value}`;
  7898. } else {
  7899. increment("brackets");
  7900. }
  7901. push({
  7902. type: "bracket",
  7903. value
  7904. });
  7905. continue;
  7906. }
  7907. if (value === "]") {
  7908. if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
  7909. push({
  7910. type: "text",
  7911. value,
  7912. output: `\\${value}`
  7913. });
  7914. continue;
  7915. }
  7916. if (state.brackets === 0) {
  7917. if (opts.strictBrackets === true) {
  7918. throw new SyntaxError(syntaxError("opening", "["));
  7919. }
  7920. push({
  7921. type: "text",
  7922. value,
  7923. output: `\\${value}`
  7924. });
  7925. continue;
  7926. }
  7927. decrement("brackets");
  7928. const prevValue = prev.value.slice(1);
  7929. if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
  7930. value = `/${value}`;
  7931. }
  7932. prev.value += value;
  7933. append({
  7934. value
  7935. });
  7936. if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
  7937. continue;
  7938. }
  7939. const escaped = utils.escapeRegex(prev.value);
  7940. state.output = state.output.slice(0, -prev.value.length);
  7941. if (opts.literalBrackets === true) {
  7942. state.output += escaped;
  7943. prev.value = escaped;
  7944. continue;
  7945. }
  7946. prev.value = `(${capture}${escaped}|${prev.value})`;
  7947. state.output += prev.value;
  7948. continue;
  7949. }
  7950. if (value === "{" && opts.nobrace !== true) {
  7951. increment("braces");
  7952. const open = {
  7953. type: "brace",
  7954. value,
  7955. output: "(",
  7956. outputIndex: state.output.length,
  7957. tokensIndex: state.tokens.length
  7958. };
  7959. braces.push(open);
  7960. push(open);
  7961. continue;
  7962. }
  7963. if (value === "}") {
  7964. const brace = braces[braces.length - 1];
  7965. if (opts.nobrace === true || !brace) {
  7966. push({
  7967. type: "text",
  7968. value,
  7969. output: value
  7970. });
  7971. continue;
  7972. }
  7973. let output = ")";
  7974. if (brace.dots === true) {
  7975. const arr = tokens.slice();
  7976. const range = [];
  7977. for (let i = arr.length - 1; i >= 0; i--) {
  7978. tokens.pop();
  7979. if (arr[i].type === "brace") {
  7980. break;
  7981. }
  7982. if (arr[i].type !== "dots") {
  7983. range.unshift(arr[i].value);
  7984. }
  7985. }
  7986. output = expandRange(range, opts);
  7987. state.backtrack = true;
  7988. }
  7989. if (brace.comma !== true && brace.dots !== true) {
  7990. const out = state.output.slice(0, brace.outputIndex);
  7991. const toks = state.tokens.slice(brace.tokensIndex);
  7992. brace.value = brace.output = "\\{";
  7993. value = output = "\\}";
  7994. state.output = out;
  7995. for (const t of toks) {
  7996. state.output += t.output || t.value;
  7997. }
  7998. }
  7999. push({
  8000. type: "brace",
  8001. value,
  8002. output
  8003. });
  8004. decrement("braces");
  8005. braces.pop();
  8006. continue;
  8007. }
  8008. if (value === "|") {
  8009. if (extglobs.length > 0) {
  8010. extglobs[extglobs.length - 1].conditions++;
  8011. }
  8012. push({
  8013. type: "text",
  8014. value
  8015. });
  8016. continue;
  8017. }
  8018. if (value === ",") {
  8019. let output = value;
  8020. const brace = braces[braces.length - 1];
  8021. if (brace && stack[stack.length - 1] === "braces") {
  8022. brace.comma = true;
  8023. output = "|";
  8024. }
  8025. push({
  8026. type: "comma",
  8027. value,
  8028. output
  8029. });
  8030. continue;
  8031. }
  8032. if (value === "/") {
  8033. if (prev.type === "dot" && state.index === state.start + 1) {
  8034. state.start = state.index + 1;
  8035. state.consumed = "";
  8036. state.output = "";
  8037. tokens.pop();
  8038. prev = bos;
  8039. continue;
  8040. }
  8041. push({
  8042. type: "slash",
  8043. value,
  8044. output: SLASH_LITERAL
  8045. });
  8046. continue;
  8047. }
  8048. if (value === ".") {
  8049. if (state.braces > 0 && prev.type === "dot") {
  8050. if (prev.value === ".")
  8051. prev.output = DOT_LITERAL;
  8052. const brace = braces[braces.length - 1];
  8053. prev.type = "dots";
  8054. prev.output += value;
  8055. prev.value += value;
  8056. brace.dots = true;
  8057. continue;
  8058. }
  8059. if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
  8060. push({
  8061. type: "text",
  8062. value,
  8063. output: DOT_LITERAL
  8064. });
  8065. continue;
  8066. }
  8067. push({
  8068. type: "dot",
  8069. value,
  8070. output: DOT_LITERAL
  8071. });
  8072. continue;
  8073. }
  8074. if (value === "?") {
  8075. const isGroup = prev && prev.value === "(";
  8076. if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
  8077. extglobOpen("qmark", value);
  8078. continue;
  8079. }
  8080. if (prev && prev.type === "paren") {
  8081. const next = peek();
  8082. let output = value;
  8083. if (next === "<" && !utils.supportsLookbehinds()) {
  8084. throw new Error("Node.js v10 or higher is required for regex lookbehinds");
  8085. }
  8086. if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
  8087. output = `\\${value}`;
  8088. }
  8089. push({
  8090. type: "text",
  8091. value,
  8092. output
  8093. });
  8094. continue;
  8095. }
  8096. if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
  8097. push({
  8098. type: "qmark",
  8099. value,
  8100. output: QMARK_NO_DOT
  8101. });
  8102. continue;
  8103. }
  8104. push({
  8105. type: "qmark",
  8106. value,
  8107. output: QMARK
  8108. });
  8109. continue;
  8110. }
  8111. if (value === "!") {
  8112. if (opts.noextglob !== true && peek() === "(") {
  8113. if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
  8114. extglobOpen("negate", value);
  8115. continue;
  8116. }
  8117. }
  8118. if (opts.nonegate !== true && state.index === 0) {
  8119. negate();
  8120. continue;
  8121. }
  8122. }
  8123. if (value === "+") {
  8124. if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
  8125. extglobOpen("plus", value);
  8126. continue;
  8127. }
  8128. if (prev && prev.value === "(" || opts.regex === false) {
  8129. push({
  8130. type: "plus",
  8131. value,
  8132. output: PLUS_LITERAL
  8133. });
  8134. continue;
  8135. }
  8136. if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
  8137. push({
  8138. type: "plus",
  8139. value
  8140. });
  8141. continue;
  8142. }
  8143. push({
  8144. type: "plus",
  8145. value: PLUS_LITERAL
  8146. });
  8147. continue;
  8148. }
  8149. if (value === "@") {
  8150. if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
  8151. push({
  8152. type: "at",
  8153. extglob: true,
  8154. value,
  8155. output: ""
  8156. });
  8157. continue;
  8158. }
  8159. push({
  8160. type: "text",
  8161. value
  8162. });
  8163. continue;
  8164. }
  8165. if (value !== "*") {
  8166. if (value === "$" || value === "^") {
  8167. value = `\\${value}`;
  8168. }
  8169. const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
  8170. if (match) {
  8171. value += match[0];
  8172. state.index += match[0].length;
  8173. }
  8174. push({
  8175. type: "text",
  8176. value
  8177. });
  8178. continue;
  8179. }
  8180. if (prev && (prev.type === "globstar" || prev.star === true)) {
  8181. prev.type = "star";
  8182. prev.star = true;
  8183. prev.value += value;
  8184. prev.output = star;
  8185. state.backtrack = true;
  8186. state.globstar = true;
  8187. consume(value);
  8188. continue;
  8189. }
  8190. let rest = remaining();
  8191. if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
  8192. extglobOpen("star", value);
  8193. continue;
  8194. }
  8195. if (prev.type === "star") {
  8196. if (opts.noglobstar === true) {
  8197. consume(value);
  8198. continue;
  8199. }
  8200. const prior = prev.prev;
  8201. const before = prior.prev;
  8202. const isStart = prior.type === "slash" || prior.type === "bos";
  8203. const afterStar = before && (before.type === "star" || before.type === "globstar");
  8204. if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
  8205. push({
  8206. type: "star",
  8207. value,
  8208. output: ""
  8209. });
  8210. continue;
  8211. }
  8212. const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
  8213. const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
  8214. if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
  8215. push({
  8216. type: "star",
  8217. value,
  8218. output: ""
  8219. });
  8220. continue;
  8221. }
  8222. while (rest.slice(0, 3) === "/**") {
  8223. const after = input[state.index + 4];
  8224. if (after && after !== "/") {
  8225. break;
  8226. }
  8227. rest = rest.slice(3);
  8228. consume("/**", 3);
  8229. }
  8230. if (prior.type === "bos" && eos()) {
  8231. prev.type = "globstar";
  8232. prev.value += value;
  8233. prev.output = globstar(opts);
  8234. state.output = prev.output;
  8235. state.globstar = true;
  8236. consume(value);
  8237. continue;
  8238. }
  8239. if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
  8240. state.output = state.output.slice(0, -(prior.output + prev.output).length);
  8241. prior.output = `(?:${prior.output}`;
  8242. prev.type = "globstar";
  8243. prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
  8244. prev.value += value;
  8245. state.globstar = true;
  8246. state.output += prior.output + prev.output;
  8247. consume(value);
  8248. continue;
  8249. }
  8250. if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
  8251. const end = rest[1] !== void 0 ? "|$" : "";
  8252. state.output = state.output.slice(0, -(prior.output + prev.output).length);
  8253. prior.output = `(?:${prior.output}`;
  8254. prev.type = "globstar";
  8255. prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
  8256. prev.value += value;
  8257. state.output += prior.output + prev.output;
  8258. state.globstar = true;
  8259. consume(value + advance());
  8260. push({
  8261. type: "slash",
  8262. value: "/",
  8263. output: ""
  8264. });
  8265. continue;
  8266. }
  8267. if (prior.type === "bos" && rest[0] === "/") {
  8268. prev.type = "globstar";
  8269. prev.value += value;
  8270. prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
  8271. state.output = prev.output;
  8272. state.globstar = true;
  8273. consume(value + advance());
  8274. push({
  8275. type: "slash",
  8276. value: "/",
  8277. output: ""
  8278. });
  8279. continue;
  8280. }
  8281. state.output = state.output.slice(0, -prev.output.length);
  8282. prev.type = "globstar";
  8283. prev.output = globstar(opts);
  8284. prev.value += value;
  8285. state.output += prev.output;
  8286. state.globstar = true;
  8287. consume(value);
  8288. continue;
  8289. }
  8290. const token = {
  8291. type: "star",
  8292. value,
  8293. output: star
  8294. };
  8295. if (opts.bash === true) {
  8296. token.output = ".*?";
  8297. if (prev.type === "bos" || prev.type === "slash") {
  8298. token.output = nodot + token.output;
  8299. }
  8300. push(token);
  8301. continue;
  8302. }
  8303. if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
  8304. token.output = value;
  8305. push(token);
  8306. continue;
  8307. }
  8308. if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
  8309. if (prev.type === "dot") {
  8310. state.output += NO_DOT_SLASH;
  8311. prev.output += NO_DOT_SLASH;
  8312. } else if (opts.dot === true) {
  8313. state.output += NO_DOTS_SLASH;
  8314. prev.output += NO_DOTS_SLASH;
  8315. } else {
  8316. state.output += nodot;
  8317. prev.output += nodot;
  8318. }
  8319. if (peek() !== "*") {
  8320. state.output += ONE_CHAR;
  8321. prev.output += ONE_CHAR;
  8322. }
  8323. }
  8324. push(token);
  8325. }
  8326. while (state.brackets > 0) {
  8327. if (opts.strictBrackets === true)
  8328. throw new SyntaxError(syntaxError("closing", "]"));
  8329. state.output = utils.escapeLast(state.output, "[");
  8330. decrement("brackets");
  8331. }
  8332. while (state.parens > 0) {
  8333. if (opts.strictBrackets === true)
  8334. throw new SyntaxError(syntaxError("closing", ")"));
  8335. state.output = utils.escapeLast(state.output, "(");
  8336. decrement("parens");
  8337. }
  8338. while (state.braces > 0) {
  8339. if (opts.strictBrackets === true)
  8340. throw new SyntaxError(syntaxError("closing", "}"));
  8341. state.output = utils.escapeLast(state.output, "{");
  8342. decrement("braces");
  8343. }
  8344. if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
  8345. push({
  8346. type: "maybe_slash",
  8347. value: "",
  8348. output: `${SLASH_LITERAL}?`
  8349. });
  8350. }
  8351. if (state.backtrack === true) {
  8352. state.output = "";
  8353. for (const token of state.tokens) {
  8354. state.output += token.output != null ? token.output : token.value;
  8355. if (token.suffix) {
  8356. state.output += token.suffix;
  8357. }
  8358. }
  8359. }
  8360. return state;
  8361. };
  8362. parse.fastpaths = (input, options) => {
  8363. const opts = Object.assign({}, options);
  8364. const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
  8365. const len = input.length;
  8366. if (len > max) {
  8367. throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
  8368. }
  8369. input = REPLACEMENTS[input] || input;
  8370. const win32 = utils.isWindows(options);
  8371. const {
  8372. DOT_LITERAL,
  8373. SLASH_LITERAL,
  8374. ONE_CHAR,
  8375. DOTS_SLASH,
  8376. NO_DOT,
  8377. NO_DOTS,
  8378. NO_DOTS_SLASH,
  8379. STAR,
  8380. START_ANCHOR
  8381. } = constants.globChars(win32);
  8382. const nodot = opts.dot ? NO_DOTS : NO_DOT;
  8383. const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
  8384. const capture = opts.capture ? "" : "?:";
  8385. const state = {
  8386. negated: false,
  8387. prefix: ""
  8388. };
  8389. let star = opts.bash === true ? ".*?" : STAR;
  8390. if (opts.capture) {
  8391. star = `(${star})`;
  8392. }
  8393. const globstar = (opts2) => {
  8394. if (opts2.noglobstar === true)
  8395. return star;
  8396. return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
  8397. };
  8398. const create = (str) => {
  8399. switch (str) {
  8400. case "*":
  8401. return `${nodot}${ONE_CHAR}${star}`;
  8402. case ".*":
  8403. return `${DOT_LITERAL}${ONE_CHAR}${star}`;
  8404. case "*.*":
  8405. return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
  8406. case "*/*":
  8407. return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
  8408. case "**":
  8409. return nodot + globstar(opts);
  8410. case "**/*":
  8411. return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
  8412. case "**/*.*":
  8413. return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
  8414. case "**/.*":
  8415. return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
  8416. default: {
  8417. const match = /^(.*?)\.(\w+)$/.exec(str);
  8418. if (!match)
  8419. return;
  8420. const source2 = create(match[1]);
  8421. if (!source2)
  8422. return;
  8423. return source2 + DOT_LITERAL + match[2];
  8424. }
  8425. }
  8426. };
  8427. const output = utils.removePrefix(input, state);
  8428. let source = create(output);
  8429. if (source && opts.strictSlashes !== true) {
  8430. source += `${SLASH_LITERAL}?`;
  8431. }
  8432. return source;
  8433. };
  8434. module2.exports = parse;
  8435. }
  8436. });
  8437. var require_picomatch = __commonJS2({
  8438. "node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
  8439. "use strict";
  8440. var path = require("path");
  8441. var scan = require_scan();
  8442. var parse = require_parse2();
  8443. var utils = require_utils2();
  8444. var constants = require_constants2();
  8445. var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
  8446. var picomatch = (glob, options, returnState = false) => {
  8447. if (Array.isArray(glob)) {
  8448. const fns = glob.map((input) => picomatch(input, options, returnState));
  8449. const arrayMatcher = (str) => {
  8450. for (const isMatch of fns) {
  8451. const state2 = isMatch(str);
  8452. if (state2)
  8453. return state2;
  8454. }
  8455. return false;
  8456. };
  8457. return arrayMatcher;
  8458. }
  8459. const isState = isObject(glob) && glob.tokens && glob.input;
  8460. if (glob === "" || typeof glob !== "string" && !isState) {
  8461. throw new TypeError("Expected pattern to be a non-empty string");
  8462. }
  8463. const opts = options || {};
  8464. const posix = utils.isWindows(options);
  8465. const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
  8466. const state = regex.state;
  8467. delete regex.state;
  8468. let isIgnored = () => false;
  8469. if (opts.ignore) {
  8470. const ignoreOpts = Object.assign(Object.assign({}, options), {}, {
  8471. ignore: null,
  8472. onMatch: null,
  8473. onResult: null
  8474. });
  8475. isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
  8476. }
  8477. const matcher = (input, returnObject = false) => {
  8478. const {
  8479. isMatch,
  8480. match,
  8481. output
  8482. } = picomatch.test(input, regex, options, {
  8483. glob,
  8484. posix
  8485. });
  8486. const result = {
  8487. glob,
  8488. state,
  8489. regex,
  8490. posix,
  8491. input,
  8492. output,
  8493. match,
  8494. isMatch
  8495. };
  8496. if (typeof opts.onResult === "function") {
  8497. opts.onResult(result);
  8498. }
  8499. if (isMatch === false) {
  8500. result.isMatch = false;
  8501. return returnObject ? result : false;
  8502. }
  8503. if (isIgnored(input)) {
  8504. if (typeof opts.onIgnore === "function") {
  8505. opts.onIgnore(result);
  8506. }
  8507. result.isMatch = false;
  8508. return returnObject ? result : false;
  8509. }
  8510. if (typeof opts.onMatch === "function") {
  8511. opts.onMatch(result);
  8512. }
  8513. return returnObject ? result : true;
  8514. };
  8515. if (returnState) {
  8516. matcher.state = state;
  8517. }
  8518. return matcher;
  8519. };
  8520. picomatch.test = (input, regex, options, {
  8521. glob,
  8522. posix
  8523. } = {}) => {
  8524. if (typeof input !== "string") {
  8525. throw new TypeError("Expected input to be a string");
  8526. }
  8527. if (input === "") {
  8528. return {
  8529. isMatch: false,
  8530. output: ""
  8531. };
  8532. }
  8533. const opts = options || {};
  8534. const format = opts.format || (posix ? utils.toPosixSlashes : null);
  8535. let match = input === glob;
  8536. let output = match && format ? format(input) : input;
  8537. if (match === false) {
  8538. output = format ? format(input) : input;
  8539. match = output === glob;
  8540. }
  8541. if (match === false || opts.capture === true) {
  8542. if (opts.matchBase === true || opts.basename === true) {
  8543. match = picomatch.matchBase(input, regex, options, posix);
  8544. } else {
  8545. match = regex.exec(output);
  8546. }
  8547. }
  8548. return {
  8549. isMatch: Boolean(match),
  8550. match,
  8551. output
  8552. };
  8553. };
  8554. picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
  8555. const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
  8556. return regex.test(path.basename(input));
  8557. };
  8558. picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
  8559. picomatch.parse = (pattern, options) => {
  8560. if (Array.isArray(pattern))
  8561. return pattern.map((p) => picomatch.parse(p, options));
  8562. return parse(pattern, Object.assign(Object.assign({}, options), {}, {
  8563. fastpaths: false
  8564. }));
  8565. };
  8566. picomatch.scan = (input, options) => scan(input, options);
  8567. picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
  8568. if (returnOutput === true) {
  8569. return state.output;
  8570. }
  8571. const opts = options || {};
  8572. const prepend = opts.contains ? "" : "^";
  8573. const append = opts.contains ? "" : "$";
  8574. let source = `${prepend}(?:${state.output})${append}`;
  8575. if (state && state.negated === true) {
  8576. source = `^(?!${source}).*$`;
  8577. }
  8578. const regex = picomatch.toRegex(source, options);
  8579. if (returnState === true) {
  8580. regex.state = state;
  8581. }
  8582. return regex;
  8583. };
  8584. picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
  8585. if (!input || typeof input !== "string") {
  8586. throw new TypeError("Expected a non-empty string");
  8587. }
  8588. let parsed = {
  8589. negated: false,
  8590. fastpaths: true
  8591. };
  8592. if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
  8593. parsed.output = parse.fastpaths(input, options);
  8594. }
  8595. if (!parsed.output) {
  8596. parsed = parse(input, options);
  8597. }
  8598. return picomatch.compileRe(parsed, options, returnOutput, returnState);
  8599. };
  8600. picomatch.toRegex = (source, options) => {
  8601. try {
  8602. const opts = options || {};
  8603. return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
  8604. } catch (err) {
  8605. if (options && options.debug === true)
  8606. throw err;
  8607. return /$^/;
  8608. }
  8609. };
  8610. picomatch.constants = constants;
  8611. module2.exports = picomatch;
  8612. }
  8613. });
  8614. var require_picomatch2 = __commonJS2({
  8615. "node_modules/picomatch/index.js"(exports2, module2) {
  8616. "use strict";
  8617. module2.exports = require_picomatch();
  8618. }
  8619. });
  8620. var require_micromatch = __commonJS2({
  8621. "node_modules/micromatch/index.js"(exports2, module2) {
  8622. "use strict";
  8623. var util = require("util");
  8624. var braces = require_braces();
  8625. var picomatch = require_picomatch2();
  8626. var utils = require_utils2();
  8627. var isEmptyString = (val) => val === "" || val === "./";
  8628. var micromatch = (list, patterns, options) => {
  8629. patterns = [].concat(patterns);
  8630. list = [].concat(list);
  8631. let omit = /* @__PURE__ */ new Set();
  8632. let keep = /* @__PURE__ */ new Set();
  8633. let items = /* @__PURE__ */ new Set();
  8634. let negatives = 0;
  8635. let onResult = (state) => {
  8636. items.add(state.output);
  8637. if (options && options.onResult) {
  8638. options.onResult(state);
  8639. }
  8640. };
  8641. for (let i = 0; i < patterns.length; i++) {
  8642. let isMatch = picomatch(String(patterns[i]), Object.assign(Object.assign({}, options), {}, {
  8643. onResult
  8644. }), true);
  8645. let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
  8646. if (negated)
  8647. negatives++;
  8648. for (let item of list) {
  8649. let matched = isMatch(item, true);
  8650. let match = negated ? !matched.isMatch : matched.isMatch;
  8651. if (!match)
  8652. continue;
  8653. if (negated) {
  8654. omit.add(matched.output);
  8655. } else {
  8656. omit.delete(matched.output);
  8657. keep.add(matched.output);
  8658. }
  8659. }
  8660. }
  8661. let result = negatives === patterns.length ? [...items] : [...keep];
  8662. let matches = result.filter((item) => !omit.has(item));
  8663. if (options && matches.length === 0) {
  8664. if (options.failglob === true) {
  8665. throw new Error(`No matches found for "${patterns.join(", ")}"`);
  8666. }
  8667. if (options.nonull === true || options.nullglob === true) {
  8668. return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
  8669. }
  8670. }
  8671. return matches;
  8672. };
  8673. micromatch.match = micromatch;
  8674. micromatch.matcher = (pattern, options) => picomatch(pattern, options);
  8675. micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
  8676. micromatch.any = micromatch.isMatch;
  8677. micromatch.not = (list, patterns, options = {}) => {
  8678. patterns = [].concat(patterns).map(String);
  8679. let result = /* @__PURE__ */ new Set();
  8680. let items = [];
  8681. let onResult = (state) => {
  8682. if (options.onResult)
  8683. options.onResult(state);
  8684. items.push(state.output);
  8685. };
  8686. let matches = new Set(micromatch(list, patterns, Object.assign(Object.assign({}, options), {}, {
  8687. onResult
  8688. })));
  8689. for (let item of items) {
  8690. if (!matches.has(item)) {
  8691. result.add(item);
  8692. }
  8693. }
  8694. return [...result];
  8695. };
  8696. micromatch.contains = (str, pattern, options) => {
  8697. if (typeof str !== "string") {
  8698. throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
  8699. }
  8700. if (Array.isArray(pattern)) {
  8701. return pattern.some((p) => micromatch.contains(str, p, options));
  8702. }
  8703. if (typeof pattern === "string") {
  8704. if (isEmptyString(str) || isEmptyString(pattern)) {
  8705. return false;
  8706. }
  8707. if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
  8708. return true;
  8709. }
  8710. }
  8711. return micromatch.isMatch(str, pattern, Object.assign(Object.assign({}, options), {}, {
  8712. contains: true
  8713. }));
  8714. };
  8715. micromatch.matchKeys = (obj, patterns, options) => {
  8716. if (!utils.isObject(obj)) {
  8717. throw new TypeError("Expected the first argument to be an object");
  8718. }
  8719. let keys = micromatch(Object.keys(obj), patterns, options);
  8720. let res = {};
  8721. for (let key of keys)
  8722. res[key] = obj[key];
  8723. return res;
  8724. };
  8725. micromatch.some = (list, patterns, options) => {
  8726. let items = [].concat(list);
  8727. for (let pattern of [].concat(patterns)) {
  8728. let isMatch = picomatch(String(pattern), options);
  8729. if (items.some((item) => isMatch(item))) {
  8730. return true;
  8731. }
  8732. }
  8733. return false;
  8734. };
  8735. micromatch.every = (list, patterns, options) => {
  8736. let items = [].concat(list);
  8737. for (let pattern of [].concat(patterns)) {
  8738. let isMatch = picomatch(String(pattern), options);
  8739. if (!items.every((item) => isMatch(item))) {
  8740. return false;
  8741. }
  8742. }
  8743. return true;
  8744. };
  8745. micromatch.all = (str, patterns, options) => {
  8746. if (typeof str !== "string") {
  8747. throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
  8748. }
  8749. return [].concat(patterns).every((p) => picomatch(p, options)(str));
  8750. };
  8751. micromatch.capture = (glob, input, options) => {
  8752. let posix = utils.isWindows(options);
  8753. let regex = picomatch.makeRe(String(glob), Object.assign(Object.assign({}, options), {}, {
  8754. capture: true
  8755. }));
  8756. let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
  8757. if (match) {
  8758. return match.slice(1).map((v) => v === void 0 ? "" : v);
  8759. }
  8760. };
  8761. micromatch.makeRe = (...args) => picomatch.makeRe(...args);
  8762. micromatch.scan = (...args) => picomatch.scan(...args);
  8763. micromatch.parse = (patterns, options) => {
  8764. let res = [];
  8765. for (let pattern of [].concat(patterns || [])) {
  8766. for (let str of braces(String(pattern), options)) {
  8767. res.push(picomatch.parse(str, options));
  8768. }
  8769. }
  8770. return res;
  8771. };
  8772. micromatch.braces = (pattern, options) => {
  8773. if (typeof pattern !== "string")
  8774. throw new TypeError("Expected a string");
  8775. if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) {
  8776. return [pattern];
  8777. }
  8778. return braces(pattern, options);
  8779. };
  8780. micromatch.braceExpand = (pattern, options) => {
  8781. if (typeof pattern !== "string")
  8782. throw new TypeError("Expected a string");
  8783. return micromatch.braces(pattern, Object.assign(Object.assign({}, options), {}, {
  8784. expand: true
  8785. }));
  8786. };
  8787. module2.exports = micromatch;
  8788. }
  8789. });
  8790. var require_pattern = __commonJS2({
  8791. "node_modules/fast-glob/out/utils/pattern.js"(exports2) {
  8792. "use strict";
  8793. Object.defineProperty(exports2, "__esModule", {
  8794. value: true
  8795. });
  8796. exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
  8797. var path = require("path");
  8798. var globParent = require_glob_parent();
  8799. var micromatch = require_micromatch();
  8800. var GLOBSTAR = "**";
  8801. var ESCAPE_SYMBOL = "\\";
  8802. var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
  8803. var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
  8804. var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
  8805. var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
  8806. var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
  8807. function isStaticPattern(pattern, options = {}) {
  8808. return !isDynamicPattern(pattern, options);
  8809. }
  8810. exports2.isStaticPattern = isStaticPattern;
  8811. function isDynamicPattern(pattern, options = {}) {
  8812. if (pattern === "") {
  8813. return false;
  8814. }
  8815. if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
  8816. return true;
  8817. }
  8818. if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
  8819. return true;
  8820. }
  8821. if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
  8822. return true;
  8823. }
  8824. if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
  8825. return true;
  8826. }
  8827. return false;
  8828. }
  8829. exports2.isDynamicPattern = isDynamicPattern;
  8830. function hasBraceExpansion(pattern) {
  8831. const openingBraceIndex = pattern.indexOf("{");
  8832. if (openingBraceIndex === -1) {
  8833. return false;
  8834. }
  8835. const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1);
  8836. if (closingBraceIndex === -1) {
  8837. return false;
  8838. }
  8839. const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
  8840. return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
  8841. }
  8842. function convertToPositivePattern(pattern) {
  8843. return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
  8844. }
  8845. exports2.convertToPositivePattern = convertToPositivePattern;
  8846. function convertToNegativePattern(pattern) {
  8847. return "!" + pattern;
  8848. }
  8849. exports2.convertToNegativePattern = convertToNegativePattern;
  8850. function isNegativePattern(pattern) {
  8851. return pattern.startsWith("!") && pattern[1] !== "(";
  8852. }
  8853. exports2.isNegativePattern = isNegativePattern;
  8854. function isPositivePattern(pattern) {
  8855. return !isNegativePattern(pattern);
  8856. }
  8857. exports2.isPositivePattern = isPositivePattern;
  8858. function getNegativePatterns(patterns) {
  8859. return patterns.filter(isNegativePattern);
  8860. }
  8861. exports2.getNegativePatterns = getNegativePatterns;
  8862. function getPositivePatterns(patterns) {
  8863. return patterns.filter(isPositivePattern);
  8864. }
  8865. exports2.getPositivePatterns = getPositivePatterns;
  8866. function getPatternsInsideCurrentDirectory(patterns) {
  8867. return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
  8868. }
  8869. exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
  8870. function getPatternsOutsideCurrentDirectory(patterns) {
  8871. return patterns.filter(isPatternRelatedToParentDirectory);
  8872. }
  8873. exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
  8874. function isPatternRelatedToParentDirectory(pattern) {
  8875. return pattern.startsWith("..") || pattern.startsWith("./..");
  8876. }
  8877. exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
  8878. function getBaseDirectory(pattern) {
  8879. return globParent(pattern, {
  8880. flipBackslashes: false
  8881. });
  8882. }
  8883. exports2.getBaseDirectory = getBaseDirectory;
  8884. function hasGlobStar(pattern) {
  8885. return pattern.includes(GLOBSTAR);
  8886. }
  8887. exports2.hasGlobStar = hasGlobStar;
  8888. function endsWithSlashGlobStar(pattern) {
  8889. return pattern.endsWith("/" + GLOBSTAR);
  8890. }
  8891. exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
  8892. function isAffectDepthOfReadingPattern(pattern) {
  8893. const basename = path.basename(pattern);
  8894. return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
  8895. }
  8896. exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
  8897. function expandPatternsWithBraceExpansion(patterns) {
  8898. return patterns.reduce((collection, pattern) => {
  8899. return collection.concat(expandBraceExpansion(pattern));
  8900. }, []);
  8901. }
  8902. exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
  8903. function expandBraceExpansion(pattern) {
  8904. return micromatch.braces(pattern, {
  8905. expand: true,
  8906. nodupes: true
  8907. });
  8908. }
  8909. exports2.expandBraceExpansion = expandBraceExpansion;
  8910. function getPatternParts(pattern, options) {
  8911. let {
  8912. parts
  8913. } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), {
  8914. parts: true
  8915. }));
  8916. if (parts.length === 0) {
  8917. parts = [pattern];
  8918. }
  8919. if (parts[0].startsWith("/")) {
  8920. parts[0] = parts[0].slice(1);
  8921. parts.unshift("");
  8922. }
  8923. return parts;
  8924. }
  8925. exports2.getPatternParts = getPatternParts;
  8926. function makeRe(pattern, options) {
  8927. return micromatch.makeRe(pattern, options);
  8928. }
  8929. exports2.makeRe = makeRe;
  8930. function convertPatternsToRe(patterns, options) {
  8931. return patterns.map((pattern) => makeRe(pattern, options));
  8932. }
  8933. exports2.convertPatternsToRe = convertPatternsToRe;
  8934. function matchAny(entry, patternsRe) {
  8935. return patternsRe.some((patternRe) => patternRe.test(entry));
  8936. }
  8937. exports2.matchAny = matchAny;
  8938. }
  8939. });
  8940. var require_merge2 = __commonJS2({
  8941. "node_modules/merge2/index.js"(exports2, module2) {
  8942. "use strict";
  8943. var Stream = require("stream");
  8944. var PassThrough = Stream.PassThrough;
  8945. var slice = Array.prototype.slice;
  8946. module2.exports = merge2;
  8947. function merge2() {
  8948. const streamsQueue = [];
  8949. const args = slice.call(arguments);
  8950. let merging = false;
  8951. let options = args[args.length - 1];
  8952. if (options && !Array.isArray(options) && options.pipe == null) {
  8953. args.pop();
  8954. } else {
  8955. options = {};
  8956. }
  8957. const doEnd = options.end !== false;
  8958. const doPipeError = options.pipeError === true;
  8959. if (options.objectMode == null) {
  8960. options.objectMode = true;
  8961. }
  8962. if (options.highWaterMark == null) {
  8963. options.highWaterMark = 64 * 1024;
  8964. }
  8965. const mergedStream = PassThrough(options);
  8966. function addStream() {
  8967. for (let i = 0, len = arguments.length; i < len; i++) {
  8968. streamsQueue.push(pauseStreams(arguments[i], options));
  8969. }
  8970. mergeStream();
  8971. return this;
  8972. }
  8973. function mergeStream() {
  8974. if (merging) {
  8975. return;
  8976. }
  8977. merging = true;
  8978. let streams = streamsQueue.shift();
  8979. if (!streams) {
  8980. process.nextTick(endStream);
  8981. return;
  8982. }
  8983. if (!Array.isArray(streams)) {
  8984. streams = [streams];
  8985. }
  8986. let pipesCount = streams.length + 1;
  8987. function next() {
  8988. if (--pipesCount > 0) {
  8989. return;
  8990. }
  8991. merging = false;
  8992. mergeStream();
  8993. }
  8994. function pipe(stream) {
  8995. function onend() {
  8996. stream.removeListener("merge2UnpipeEnd", onend);
  8997. stream.removeListener("end", onend);
  8998. if (doPipeError) {
  8999. stream.removeListener("error", onerror);
  9000. }
  9001. next();
  9002. }
  9003. function onerror(err) {
  9004. mergedStream.emit("error", err);
  9005. }
  9006. if (stream._readableState.endEmitted) {
  9007. return next();
  9008. }
  9009. stream.on("merge2UnpipeEnd", onend);
  9010. stream.on("end", onend);
  9011. if (doPipeError) {
  9012. stream.on("error", onerror);
  9013. }
  9014. stream.pipe(mergedStream, {
  9015. end: false
  9016. });
  9017. stream.resume();
  9018. }
  9019. for (let i = 0; i < streams.length; i++) {
  9020. pipe(streams[i]);
  9021. }
  9022. next();
  9023. }
  9024. function endStream() {
  9025. merging = false;
  9026. mergedStream.emit("queueDrain");
  9027. if (doEnd) {
  9028. mergedStream.end();
  9029. }
  9030. }
  9031. mergedStream.setMaxListeners(0);
  9032. mergedStream.add = addStream;
  9033. mergedStream.on("unpipe", function(stream) {
  9034. stream.emit("merge2UnpipeEnd");
  9035. });
  9036. if (args.length) {
  9037. addStream.apply(null, args);
  9038. }
  9039. return mergedStream;
  9040. }
  9041. function pauseStreams(streams, options) {
  9042. if (!Array.isArray(streams)) {
  9043. if (!streams._readableState && streams.pipe) {
  9044. streams = streams.pipe(PassThrough(options));
  9045. }
  9046. if (!streams._readableState || !streams.pause || !streams.pipe) {
  9047. throw new Error("Only readable stream can be merged.");
  9048. }
  9049. streams.pause();
  9050. } else {
  9051. for (let i = 0, len = streams.length; i < len; i++) {
  9052. streams[i] = pauseStreams(streams[i], options);
  9053. }
  9054. }
  9055. return streams;
  9056. }
  9057. }
  9058. });
  9059. var require_stream = __commonJS2({
  9060. "node_modules/fast-glob/out/utils/stream.js"(exports2) {
  9061. "use strict";
  9062. Object.defineProperty(exports2, "__esModule", {
  9063. value: true
  9064. });
  9065. exports2.merge = void 0;
  9066. var merge2 = require_merge2();
  9067. function merge(streams) {
  9068. const mergedStream = merge2(streams);
  9069. streams.forEach((stream) => {
  9070. stream.once("error", (error) => mergedStream.emit("error", error));
  9071. });
  9072. mergedStream.once("close", () => propagateCloseEventToSources(streams));
  9073. mergedStream.once("end", () => propagateCloseEventToSources(streams));
  9074. return mergedStream;
  9075. }
  9076. exports2.merge = merge;
  9077. function propagateCloseEventToSources(streams) {
  9078. streams.forEach((stream) => stream.emit("close"));
  9079. }
  9080. }
  9081. });
  9082. var require_string = __commonJS2({
  9083. "node_modules/fast-glob/out/utils/string.js"(exports2) {
  9084. "use strict";
  9085. Object.defineProperty(exports2, "__esModule", {
  9086. value: true
  9087. });
  9088. exports2.isEmpty = exports2.isString = void 0;
  9089. function isString(input) {
  9090. return typeof input === "string";
  9091. }
  9092. exports2.isString = isString;
  9093. function isEmpty(input) {
  9094. return input === "";
  9095. }
  9096. exports2.isEmpty = isEmpty;
  9097. }
  9098. });
  9099. var require_utils3 = __commonJS2({
  9100. "node_modules/fast-glob/out/utils/index.js"(exports2) {
  9101. "use strict";
  9102. Object.defineProperty(exports2, "__esModule", {
  9103. value: true
  9104. });
  9105. exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0;
  9106. var array = require_array();
  9107. exports2.array = array;
  9108. var errno = require_errno();
  9109. exports2.errno = errno;
  9110. var fs = require_fs();
  9111. exports2.fs = fs;
  9112. var path = require_path();
  9113. exports2.path = path;
  9114. var pattern = require_pattern();
  9115. exports2.pattern = pattern;
  9116. var stream = require_stream();
  9117. exports2.stream = stream;
  9118. var string = require_string();
  9119. exports2.string = string;
  9120. }
  9121. });
  9122. var require_tasks = __commonJS2({
  9123. "node_modules/fast-glob/out/managers/tasks.js"(exports2) {
  9124. "use strict";
  9125. Object.defineProperty(exports2, "__esModule", {
  9126. value: true
  9127. });
  9128. exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
  9129. var utils = require_utils3();
  9130. function generate(patterns, settings) {
  9131. const positivePatterns = getPositivePatterns(patterns);
  9132. const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
  9133. const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
  9134. const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
  9135. const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false);
  9136. const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true);
  9137. return staticTasks.concat(dynamicTasks);
  9138. }
  9139. exports2.generate = generate;
  9140. function convertPatternsToTasks(positive, negative, dynamic) {
  9141. const tasks = [];
  9142. const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
  9143. const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);
  9144. const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
  9145. const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
  9146. tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
  9147. if ("." in insideCurrentDirectoryGroup) {
  9148. tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic));
  9149. } else {
  9150. tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
  9151. }
  9152. return tasks;
  9153. }
  9154. exports2.convertPatternsToTasks = convertPatternsToTasks;
  9155. function getPositivePatterns(patterns) {
  9156. return utils.pattern.getPositivePatterns(patterns);
  9157. }
  9158. exports2.getPositivePatterns = getPositivePatterns;
  9159. function getNegativePatternsAsPositive(patterns, ignore) {
  9160. const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
  9161. const positive = negative.map(utils.pattern.convertToPositivePattern);
  9162. return positive;
  9163. }
  9164. exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
  9165. function groupPatternsByBaseDirectory(patterns) {
  9166. const group = {};
  9167. return patterns.reduce((collection, pattern) => {
  9168. const base = utils.pattern.getBaseDirectory(pattern);
  9169. if (base in collection) {
  9170. collection[base].push(pattern);
  9171. } else {
  9172. collection[base] = [pattern];
  9173. }
  9174. return collection;
  9175. }, group);
  9176. }
  9177. exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
  9178. function convertPatternGroupsToTasks(positive, negative, dynamic) {
  9179. return Object.keys(positive).map((base) => {
  9180. return convertPatternGroupToTask(base, positive[base], negative, dynamic);
  9181. });
  9182. }
  9183. exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
  9184. function convertPatternGroupToTask(base, positive, negative, dynamic) {
  9185. return {
  9186. dynamic,
  9187. positive,
  9188. negative,
  9189. base,
  9190. patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
  9191. };
  9192. }
  9193. exports2.convertPatternGroupToTask = convertPatternGroupToTask;
  9194. }
  9195. });
  9196. var require_patterns = __commonJS2({
  9197. "node_modules/fast-glob/out/managers/patterns.js"(exports2) {
  9198. "use strict";
  9199. Object.defineProperty(exports2, "__esModule", {
  9200. value: true
  9201. });
  9202. exports2.removeDuplicateSlashes = exports2.transform = void 0;
  9203. var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
  9204. function transform(patterns) {
  9205. return patterns.map((pattern) => removeDuplicateSlashes(pattern));
  9206. }
  9207. exports2.transform = transform;
  9208. function removeDuplicateSlashes(pattern) {
  9209. return pattern.replace(DOUBLE_SLASH_RE, "/");
  9210. }
  9211. exports2.removeDuplicateSlashes = removeDuplicateSlashes;
  9212. }
  9213. });
  9214. var require_async = __commonJS2({
  9215. "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) {
  9216. "use strict";
  9217. Object.defineProperty(exports2, "__esModule", {
  9218. value: true
  9219. });
  9220. exports2.read = void 0;
  9221. function read(path, settings, callback) {
  9222. settings.fs.lstat(path, (lstatError, lstat) => {
  9223. if (lstatError !== null) {
  9224. callFailureCallback(callback, lstatError);
  9225. return;
  9226. }
  9227. if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
  9228. callSuccessCallback(callback, lstat);
  9229. return;
  9230. }
  9231. settings.fs.stat(path, (statError, stat) => {
  9232. if (statError !== null) {
  9233. if (settings.throwErrorOnBrokenSymbolicLink) {
  9234. callFailureCallback(callback, statError);
  9235. return;
  9236. }
  9237. callSuccessCallback(callback, lstat);
  9238. return;
  9239. }
  9240. if (settings.markSymbolicLink) {
  9241. stat.isSymbolicLink = () => true;
  9242. }
  9243. callSuccessCallback(callback, stat);
  9244. });
  9245. });
  9246. }
  9247. exports2.read = read;
  9248. function callFailureCallback(callback, error) {
  9249. callback(error);
  9250. }
  9251. function callSuccessCallback(callback, result) {
  9252. callback(null, result);
  9253. }
  9254. }
  9255. });
  9256. var require_sync = __commonJS2({
  9257. "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) {
  9258. "use strict";
  9259. Object.defineProperty(exports2, "__esModule", {
  9260. value: true
  9261. });
  9262. exports2.read = void 0;
  9263. function read(path, settings) {
  9264. const lstat = settings.fs.lstatSync(path);
  9265. if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
  9266. return lstat;
  9267. }
  9268. try {
  9269. const stat = settings.fs.statSync(path);
  9270. if (settings.markSymbolicLink) {
  9271. stat.isSymbolicLink = () => true;
  9272. }
  9273. return stat;
  9274. } catch (error) {
  9275. if (!settings.throwErrorOnBrokenSymbolicLink) {
  9276. return lstat;
  9277. }
  9278. throw error;
  9279. }
  9280. }
  9281. exports2.read = read;
  9282. }
  9283. });
  9284. var require_fs2 = __commonJS2({
  9285. "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) {
  9286. "use strict";
  9287. Object.defineProperty(exports2, "__esModule", {
  9288. value: true
  9289. });
  9290. exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
  9291. var fs = require("fs");
  9292. exports2.FILE_SYSTEM_ADAPTER = {
  9293. lstat: fs.lstat,
  9294. stat: fs.stat,
  9295. lstatSync: fs.lstatSync,
  9296. statSync: fs.statSync
  9297. };
  9298. function createFileSystemAdapter(fsMethods) {
  9299. if (fsMethods === void 0) {
  9300. return exports2.FILE_SYSTEM_ADAPTER;
  9301. }
  9302. return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
  9303. }
  9304. exports2.createFileSystemAdapter = createFileSystemAdapter;
  9305. }
  9306. });
  9307. var require_settings = __commonJS2({
  9308. "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
  9309. "use strict";
  9310. Object.defineProperty(exports2, "__esModule", {
  9311. value: true
  9312. });
  9313. var fs = require_fs2();
  9314. var Settings = class {
  9315. constructor(_options = {}) {
  9316. this._options = _options;
  9317. this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
  9318. this.fs = fs.createFileSystemAdapter(this._options.fs);
  9319. this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
  9320. this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
  9321. }
  9322. _getValue(option, value) {
  9323. return option !== null && option !== void 0 ? option : value;
  9324. }
  9325. };
  9326. exports2.default = Settings;
  9327. }
  9328. });
  9329. var require_out = __commonJS2({
  9330. "node_modules/@nodelib/fs.stat/out/index.js"(exports2) {
  9331. "use strict";
  9332. Object.defineProperty(exports2, "__esModule", {
  9333. value: true
  9334. });
  9335. exports2.statSync = exports2.stat = exports2.Settings = void 0;
  9336. var async = require_async();
  9337. var sync = require_sync();
  9338. var settings_1 = require_settings();
  9339. exports2.Settings = settings_1.default;
  9340. function stat(path, optionsOrSettingsOrCallback, callback) {
  9341. if (typeof optionsOrSettingsOrCallback === "function") {
  9342. async.read(path, getSettings(), optionsOrSettingsOrCallback);
  9343. return;
  9344. }
  9345. async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
  9346. }
  9347. exports2.stat = stat;
  9348. function statSync(path, optionsOrSettings) {
  9349. const settings = getSettings(optionsOrSettings);
  9350. return sync.read(path, settings);
  9351. }
  9352. exports2.statSync = statSync;
  9353. function getSettings(settingsOrOptions = {}) {
  9354. if (settingsOrOptions instanceof settings_1.default) {
  9355. return settingsOrOptions;
  9356. }
  9357. return new settings_1.default(settingsOrOptions);
  9358. }
  9359. }
  9360. });
  9361. var require_queue_microtask = __commonJS2({
  9362. "node_modules/queue-microtask/index.js"(exports2, module2) {
  9363. var promise;
  9364. module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
  9365. throw err;
  9366. }, 0));
  9367. }
  9368. });
  9369. var require_run_parallel = __commonJS2({
  9370. "node_modules/run-parallel/index.js"(exports2, module2) {
  9371. module2.exports = runParallel;
  9372. var queueMicrotask2 = require_queue_microtask();
  9373. function runParallel(tasks, cb) {
  9374. let results, pending, keys;
  9375. let isSync = true;
  9376. if (Array.isArray(tasks)) {
  9377. results = [];
  9378. pending = tasks.length;
  9379. } else {
  9380. keys = Object.keys(tasks);
  9381. results = {};
  9382. pending = keys.length;
  9383. }
  9384. function done(err) {
  9385. function end() {
  9386. if (cb)
  9387. cb(err, results);
  9388. cb = null;
  9389. }
  9390. if (isSync)
  9391. queueMicrotask2(end);
  9392. else
  9393. end();
  9394. }
  9395. function each(i, err, result) {
  9396. results[i] = result;
  9397. if (--pending === 0 || err) {
  9398. done(err);
  9399. }
  9400. }
  9401. if (!pending) {
  9402. done(null);
  9403. } else if (keys) {
  9404. keys.forEach(function(key) {
  9405. tasks[key](function(err, result) {
  9406. each(key, err, result);
  9407. });
  9408. });
  9409. } else {
  9410. tasks.forEach(function(task, i) {
  9411. task(function(err, result) {
  9412. each(i, err, result);
  9413. });
  9414. });
  9415. }
  9416. isSync = false;
  9417. }
  9418. }
  9419. });
  9420. var require_constants3 = __commonJS2({
  9421. "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) {
  9422. "use strict";
  9423. Object.defineProperty(exports2, "__esModule", {
  9424. value: true
  9425. });
  9426. exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
  9427. var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
  9428. if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) {
  9429. throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
  9430. }
  9431. var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
  9432. var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
  9433. var SUPPORTED_MAJOR_VERSION = 10;
  9434. var SUPPORTED_MINOR_VERSION = 10;
  9435. var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
  9436. var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
  9437. exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
  9438. }
  9439. });
  9440. var require_fs3 = __commonJS2({
  9441. "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) {
  9442. "use strict";
  9443. Object.defineProperty(exports2, "__esModule", {
  9444. value: true
  9445. });
  9446. exports2.createDirentFromStats = void 0;
  9447. var DirentFromStats = class {
  9448. constructor(name, stats) {
  9449. this.name = name;
  9450. this.isBlockDevice = stats.isBlockDevice.bind(stats);
  9451. this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
  9452. this.isDirectory = stats.isDirectory.bind(stats);
  9453. this.isFIFO = stats.isFIFO.bind(stats);
  9454. this.isFile = stats.isFile.bind(stats);
  9455. this.isSocket = stats.isSocket.bind(stats);
  9456. this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
  9457. }
  9458. };
  9459. function createDirentFromStats(name, stats) {
  9460. return new DirentFromStats(name, stats);
  9461. }
  9462. exports2.createDirentFromStats = createDirentFromStats;
  9463. }
  9464. });
  9465. var require_utils4 = __commonJS2({
  9466. "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) {
  9467. "use strict";
  9468. Object.defineProperty(exports2, "__esModule", {
  9469. value: true
  9470. });
  9471. exports2.fs = void 0;
  9472. var fs = require_fs3();
  9473. exports2.fs = fs;
  9474. }
  9475. });
  9476. var require_common = __commonJS2({
  9477. "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) {
  9478. "use strict";
  9479. Object.defineProperty(exports2, "__esModule", {
  9480. value: true
  9481. });
  9482. exports2.joinPathSegments = void 0;
  9483. function joinPathSegments(a, b, separator) {
  9484. if (a.endsWith(separator)) {
  9485. return a + b;
  9486. }
  9487. return a + separator + b;
  9488. }
  9489. exports2.joinPathSegments = joinPathSegments;
  9490. }
  9491. });
  9492. var require_async2 = __commonJS2({
  9493. "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) {
  9494. "use strict";
  9495. Object.defineProperty(exports2, "__esModule", {
  9496. value: true
  9497. });
  9498. exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
  9499. var fsStat = require_out();
  9500. var rpl = require_run_parallel();
  9501. var constants_1 = require_constants3();
  9502. var utils = require_utils4();
  9503. var common = require_common();
  9504. function read(directory, settings, callback) {
  9505. if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
  9506. readdirWithFileTypes(directory, settings, callback);
  9507. return;
  9508. }
  9509. readdir(directory, settings, callback);
  9510. }
  9511. exports2.read = read;
  9512. function readdirWithFileTypes(directory, settings, callback) {
  9513. settings.fs.readdir(directory, {
  9514. withFileTypes: true
  9515. }, (readdirError, dirents) => {
  9516. if (readdirError !== null) {
  9517. callFailureCallback(callback, readdirError);
  9518. return;
  9519. }
  9520. const entries = dirents.map((dirent) => ({
  9521. dirent,
  9522. name: dirent.name,
  9523. path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
  9524. }));
  9525. if (!settings.followSymbolicLinks) {
  9526. callSuccessCallback(callback, entries);
  9527. return;
  9528. }
  9529. const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
  9530. rpl(tasks, (rplError, rplEntries) => {
  9531. if (rplError !== null) {
  9532. callFailureCallback(callback, rplError);
  9533. return;
  9534. }
  9535. callSuccessCallback(callback, rplEntries);
  9536. });
  9537. });
  9538. }
  9539. exports2.readdirWithFileTypes = readdirWithFileTypes;
  9540. function makeRplTaskEntry(entry, settings) {
  9541. return (done) => {
  9542. if (!entry.dirent.isSymbolicLink()) {
  9543. done(null, entry);
  9544. return;
  9545. }
  9546. settings.fs.stat(entry.path, (statError, stats) => {
  9547. if (statError !== null) {
  9548. if (settings.throwErrorOnBrokenSymbolicLink) {
  9549. done(statError);
  9550. return;
  9551. }
  9552. done(null, entry);
  9553. return;
  9554. }
  9555. entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
  9556. done(null, entry);
  9557. });
  9558. };
  9559. }
  9560. function readdir(directory, settings, callback) {
  9561. settings.fs.readdir(directory, (readdirError, names) => {
  9562. if (readdirError !== null) {
  9563. callFailureCallback(callback, readdirError);
  9564. return;
  9565. }
  9566. const tasks = names.map((name) => {
  9567. const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
  9568. return (done) => {
  9569. fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
  9570. if (error !== null) {
  9571. done(error);
  9572. return;
  9573. }
  9574. const entry = {
  9575. name,
  9576. path,
  9577. dirent: utils.fs.createDirentFromStats(name, stats)
  9578. };
  9579. if (settings.stats) {
  9580. entry.stats = stats;
  9581. }
  9582. done(null, entry);
  9583. });
  9584. };
  9585. });
  9586. rpl(tasks, (rplError, entries) => {
  9587. if (rplError !== null) {
  9588. callFailureCallback(callback, rplError);
  9589. return;
  9590. }
  9591. callSuccessCallback(callback, entries);
  9592. });
  9593. });
  9594. }
  9595. exports2.readdir = readdir;
  9596. function callFailureCallback(callback, error) {
  9597. callback(error);
  9598. }
  9599. function callSuccessCallback(callback, result) {
  9600. callback(null, result);
  9601. }
  9602. }
  9603. });
  9604. var require_sync2 = __commonJS2({
  9605. "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) {
  9606. "use strict";
  9607. Object.defineProperty(exports2, "__esModule", {
  9608. value: true
  9609. });
  9610. exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
  9611. var fsStat = require_out();
  9612. var constants_1 = require_constants3();
  9613. var utils = require_utils4();
  9614. var common = require_common();
  9615. function read(directory, settings) {
  9616. if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
  9617. return readdirWithFileTypes(directory, settings);
  9618. }
  9619. return readdir(directory, settings);
  9620. }
  9621. exports2.read = read;
  9622. function readdirWithFileTypes(directory, settings) {
  9623. const dirents = settings.fs.readdirSync(directory, {
  9624. withFileTypes: true
  9625. });
  9626. return dirents.map((dirent) => {
  9627. const entry = {
  9628. dirent,
  9629. name: dirent.name,
  9630. path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
  9631. };
  9632. if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
  9633. try {
  9634. const stats = settings.fs.statSync(entry.path);
  9635. entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
  9636. } catch (error) {
  9637. if (settings.throwErrorOnBrokenSymbolicLink) {
  9638. throw error;
  9639. }
  9640. }
  9641. }
  9642. return entry;
  9643. });
  9644. }
  9645. exports2.readdirWithFileTypes = readdirWithFileTypes;
  9646. function readdir(directory, settings) {
  9647. const names = settings.fs.readdirSync(directory);
  9648. return names.map((name) => {
  9649. const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
  9650. const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
  9651. const entry = {
  9652. name,
  9653. path: entryPath,
  9654. dirent: utils.fs.createDirentFromStats(name, stats)
  9655. };
  9656. if (settings.stats) {
  9657. entry.stats = stats;
  9658. }
  9659. return entry;
  9660. });
  9661. }
  9662. exports2.readdir = readdir;
  9663. }
  9664. });
  9665. var require_fs4 = __commonJS2({
  9666. "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) {
  9667. "use strict";
  9668. Object.defineProperty(exports2, "__esModule", {
  9669. value: true
  9670. });
  9671. exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
  9672. var fs = require("fs");
  9673. exports2.FILE_SYSTEM_ADAPTER = {
  9674. lstat: fs.lstat,
  9675. stat: fs.stat,
  9676. lstatSync: fs.lstatSync,
  9677. statSync: fs.statSync,
  9678. readdir: fs.readdir,
  9679. readdirSync: fs.readdirSync
  9680. };
  9681. function createFileSystemAdapter(fsMethods) {
  9682. if (fsMethods === void 0) {
  9683. return exports2.FILE_SYSTEM_ADAPTER;
  9684. }
  9685. return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
  9686. }
  9687. exports2.createFileSystemAdapter = createFileSystemAdapter;
  9688. }
  9689. });
  9690. var require_settings2 = __commonJS2({
  9691. "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
  9692. "use strict";
  9693. Object.defineProperty(exports2, "__esModule", {
  9694. value: true
  9695. });
  9696. var path = require("path");
  9697. var fsStat = require_out();
  9698. var fs = require_fs4();
  9699. var Settings = class {
  9700. constructor(_options = {}) {
  9701. this._options = _options;
  9702. this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
  9703. this.fs = fs.createFileSystemAdapter(this._options.fs);
  9704. this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
  9705. this.stats = this._getValue(this._options.stats, false);
  9706. this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
  9707. this.fsStatSettings = new fsStat.Settings({
  9708. followSymbolicLink: this.followSymbolicLinks,
  9709. fs: this.fs,
  9710. throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
  9711. });
  9712. }
  9713. _getValue(option, value) {
  9714. return option !== null && option !== void 0 ? option : value;
  9715. }
  9716. };
  9717. exports2.default = Settings;
  9718. }
  9719. });
  9720. var require_out2 = __commonJS2({
  9721. "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) {
  9722. "use strict";
  9723. Object.defineProperty(exports2, "__esModule", {
  9724. value: true
  9725. });
  9726. exports2.Settings = exports2.scandirSync = exports2.scandir = void 0;
  9727. var async = require_async2();
  9728. var sync = require_sync2();
  9729. var settings_1 = require_settings2();
  9730. exports2.Settings = settings_1.default;
  9731. function scandir(path, optionsOrSettingsOrCallback, callback) {
  9732. if (typeof optionsOrSettingsOrCallback === "function") {
  9733. async.read(path, getSettings(), optionsOrSettingsOrCallback);
  9734. return;
  9735. }
  9736. async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
  9737. }
  9738. exports2.scandir = scandir;
  9739. function scandirSync(path, optionsOrSettings) {
  9740. const settings = getSettings(optionsOrSettings);
  9741. return sync.read(path, settings);
  9742. }
  9743. exports2.scandirSync = scandirSync;
  9744. function getSettings(settingsOrOptions = {}) {
  9745. if (settingsOrOptions instanceof settings_1.default) {
  9746. return settingsOrOptions;
  9747. }
  9748. return new settings_1.default(settingsOrOptions);
  9749. }
  9750. }
  9751. });
  9752. var require_reusify = __commonJS2({
  9753. "node_modules/reusify/reusify.js"(exports2, module2) {
  9754. "use strict";
  9755. function reusify(Constructor) {
  9756. var head = new Constructor();
  9757. var tail = head;
  9758. function get() {
  9759. var current = head;
  9760. if (current.next) {
  9761. head = current.next;
  9762. } else {
  9763. head = new Constructor();
  9764. tail = head;
  9765. }
  9766. current.next = null;
  9767. return current;
  9768. }
  9769. function release(obj) {
  9770. tail.next = obj;
  9771. tail = obj;
  9772. }
  9773. return {
  9774. get,
  9775. release
  9776. };
  9777. }
  9778. module2.exports = reusify;
  9779. }
  9780. });
  9781. var require_queue = __commonJS2({
  9782. "node_modules/fastq/queue.js"(exports2, module2) {
  9783. "use strict";
  9784. var reusify = require_reusify();
  9785. function fastqueue(context, worker, concurrency) {
  9786. if (typeof context === "function") {
  9787. concurrency = worker;
  9788. worker = context;
  9789. context = null;
  9790. }
  9791. if (concurrency < 1) {
  9792. throw new Error("fastqueue concurrency must be greater than 1");
  9793. }
  9794. var cache = reusify(Task);
  9795. var queueHead = null;
  9796. var queueTail = null;
  9797. var _running = 0;
  9798. var errorHandler = null;
  9799. var self2 = {
  9800. push,
  9801. drain: noop,
  9802. saturated: noop,
  9803. pause,
  9804. paused: false,
  9805. concurrency,
  9806. running,
  9807. resume,
  9808. idle,
  9809. length,
  9810. getQueue,
  9811. unshift,
  9812. empty: noop,
  9813. kill,
  9814. killAndDrain,
  9815. error
  9816. };
  9817. return self2;
  9818. function running() {
  9819. return _running;
  9820. }
  9821. function pause() {
  9822. self2.paused = true;
  9823. }
  9824. function length() {
  9825. var current = queueHead;
  9826. var counter = 0;
  9827. while (current) {
  9828. current = current.next;
  9829. counter++;
  9830. }
  9831. return counter;
  9832. }
  9833. function getQueue() {
  9834. var current = queueHead;
  9835. var tasks = [];
  9836. while (current) {
  9837. tasks.push(current.value);
  9838. current = current.next;
  9839. }
  9840. return tasks;
  9841. }
  9842. function resume() {
  9843. if (!self2.paused)
  9844. return;
  9845. self2.paused = false;
  9846. for (var i = 0; i < self2.concurrency; i++) {
  9847. _running++;
  9848. release();
  9849. }
  9850. }
  9851. function idle() {
  9852. return _running === 0 && self2.length() === 0;
  9853. }
  9854. function push(value, done) {
  9855. var current = cache.get();
  9856. current.context = context;
  9857. current.release = release;
  9858. current.value = value;
  9859. current.callback = done || noop;
  9860. current.errorHandler = errorHandler;
  9861. if (_running === self2.concurrency || self2.paused) {
  9862. if (queueTail) {
  9863. queueTail.next = current;
  9864. queueTail = current;
  9865. } else {
  9866. queueHead = current;
  9867. queueTail = current;
  9868. self2.saturated();
  9869. }
  9870. } else {
  9871. _running++;
  9872. worker.call(context, current.value, current.worked);
  9873. }
  9874. }
  9875. function unshift(value, done) {
  9876. var current = cache.get();
  9877. current.context = context;
  9878. current.release = release;
  9879. current.value = value;
  9880. current.callback = done || noop;
  9881. if (_running === self2.concurrency || self2.paused) {
  9882. if (queueHead) {
  9883. current.next = queueHead;
  9884. queueHead = current;
  9885. } else {
  9886. queueHead = current;
  9887. queueTail = current;
  9888. self2.saturated();
  9889. }
  9890. } else {
  9891. _running++;
  9892. worker.call(context, current.value, current.worked);
  9893. }
  9894. }
  9895. function release(holder) {
  9896. if (holder) {
  9897. cache.release(holder);
  9898. }
  9899. var next = queueHead;
  9900. if (next) {
  9901. if (!self2.paused) {
  9902. if (queueTail === queueHead) {
  9903. queueTail = null;
  9904. }
  9905. queueHead = next.next;
  9906. next.next = null;
  9907. worker.call(context, next.value, next.worked);
  9908. if (queueTail === null) {
  9909. self2.empty();
  9910. }
  9911. } else {
  9912. _running--;
  9913. }
  9914. } else if (--_running === 0) {
  9915. self2.drain();
  9916. }
  9917. }
  9918. function kill() {
  9919. queueHead = null;
  9920. queueTail = null;
  9921. self2.drain = noop;
  9922. }
  9923. function killAndDrain() {
  9924. queueHead = null;
  9925. queueTail = null;
  9926. self2.drain();
  9927. self2.drain = noop;
  9928. }
  9929. function error(handler) {
  9930. errorHandler = handler;
  9931. }
  9932. }
  9933. function noop() {
  9934. }
  9935. function Task() {
  9936. this.value = null;
  9937. this.callback = noop;
  9938. this.next = null;
  9939. this.release = noop;
  9940. this.context = null;
  9941. this.errorHandler = null;
  9942. var self2 = this;
  9943. this.worked = function worked(err, result) {
  9944. var callback = self2.callback;
  9945. var errorHandler = self2.errorHandler;
  9946. var val = self2.value;
  9947. self2.value = null;
  9948. self2.callback = noop;
  9949. if (self2.errorHandler) {
  9950. errorHandler(err, val);
  9951. }
  9952. callback.call(self2.context, err, result);
  9953. self2.release(self2);
  9954. };
  9955. }
  9956. function queueAsPromised(context, worker, concurrency) {
  9957. if (typeof context === "function") {
  9958. concurrency = worker;
  9959. worker = context;
  9960. context = null;
  9961. }
  9962. function asyncWrapper(arg, cb) {
  9963. worker.call(this, arg).then(function(res) {
  9964. cb(null, res);
  9965. }, cb);
  9966. }
  9967. var queue = fastqueue(context, asyncWrapper, concurrency);
  9968. var pushCb = queue.push;
  9969. var unshiftCb = queue.unshift;
  9970. queue.push = push;
  9971. queue.unshift = unshift;
  9972. queue.drained = drained;
  9973. return queue;
  9974. function push(value) {
  9975. var p = new Promise(function(resolve, reject) {
  9976. pushCb(value, function(err, result) {
  9977. if (err) {
  9978. reject(err);
  9979. return;
  9980. }
  9981. resolve(result);
  9982. });
  9983. });
  9984. p.catch(noop);
  9985. return p;
  9986. }
  9987. function unshift(value) {
  9988. var p = new Promise(function(resolve, reject) {
  9989. unshiftCb(value, function(err, result) {
  9990. if (err) {
  9991. reject(err);
  9992. return;
  9993. }
  9994. resolve(result);
  9995. });
  9996. });
  9997. p.catch(noop);
  9998. return p;
  9999. }
  10000. function drained() {
  10001. var previousDrain = queue.drain;
  10002. var p = new Promise(function(resolve) {
  10003. queue.drain = function() {
  10004. previousDrain();
  10005. resolve();
  10006. };
  10007. });
  10008. return p;
  10009. }
  10010. }
  10011. module2.exports = fastqueue;
  10012. module2.exports.promise = queueAsPromised;
  10013. }
  10014. });
  10015. var require_common2 = __commonJS2({
  10016. "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) {
  10017. "use strict";
  10018. Object.defineProperty(exports2, "__esModule", {
  10019. value: true
  10020. });
  10021. exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0;
  10022. function isFatalError(settings, error) {
  10023. if (settings.errorFilter === null) {
  10024. return true;
  10025. }
  10026. return !settings.errorFilter(error);
  10027. }
  10028. exports2.isFatalError = isFatalError;
  10029. function isAppliedFilter(filter, value) {
  10030. return filter === null || filter(value);
  10031. }
  10032. exports2.isAppliedFilter = isAppliedFilter;
  10033. function replacePathSegmentSeparator(filepath, separator) {
  10034. return filepath.split(/[/\\]/).join(separator);
  10035. }
  10036. exports2.replacePathSegmentSeparator = replacePathSegmentSeparator;
  10037. function joinPathSegments(a, b, separator) {
  10038. if (a === "") {
  10039. return b;
  10040. }
  10041. if (a.endsWith(separator)) {
  10042. return a + b;
  10043. }
  10044. return a + separator + b;
  10045. }
  10046. exports2.joinPathSegments = joinPathSegments;
  10047. }
  10048. });
  10049. var require_reader = __commonJS2({
  10050. "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) {
  10051. "use strict";
  10052. Object.defineProperty(exports2, "__esModule", {
  10053. value: true
  10054. });
  10055. var common = require_common2();
  10056. var Reader = class {
  10057. constructor(_root, _settings) {
  10058. this._root = _root;
  10059. this._settings = _settings;
  10060. this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
  10061. }
  10062. };
  10063. exports2.default = Reader;
  10064. }
  10065. });
  10066. var require_async3 = __commonJS2({
  10067. "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) {
  10068. "use strict";
  10069. Object.defineProperty(exports2, "__esModule", {
  10070. value: true
  10071. });
  10072. var events_1 = require("events");
  10073. var fsScandir = require_out2();
  10074. var fastq = require_queue();
  10075. var common = require_common2();
  10076. var reader_1 = require_reader();
  10077. var AsyncReader = class extends reader_1.default {
  10078. constructor(_root, _settings) {
  10079. super(_root, _settings);
  10080. this._settings = _settings;
  10081. this._scandir = fsScandir.scandir;
  10082. this._emitter = new events_1.EventEmitter();
  10083. this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
  10084. this._isFatalError = false;
  10085. this._isDestroyed = false;
  10086. this._queue.drain = () => {
  10087. if (!this._isFatalError) {
  10088. this._emitter.emit("end");
  10089. }
  10090. };
  10091. }
  10092. read() {
  10093. this._isFatalError = false;
  10094. this._isDestroyed = false;
  10095. setImmediate(() => {
  10096. this._pushToQueue(this._root, this._settings.basePath);
  10097. });
  10098. return this._emitter;
  10099. }
  10100. get isDestroyed() {
  10101. return this._isDestroyed;
  10102. }
  10103. destroy() {
  10104. if (this._isDestroyed) {
  10105. throw new Error("The reader is already destroyed");
  10106. }
  10107. this._isDestroyed = true;
  10108. this._queue.killAndDrain();
  10109. }
  10110. onEntry(callback) {
  10111. this._emitter.on("entry", callback);
  10112. }
  10113. onError(callback) {
  10114. this._emitter.once("error", callback);
  10115. }
  10116. onEnd(callback) {
  10117. this._emitter.once("end", callback);
  10118. }
  10119. _pushToQueue(directory, base) {
  10120. const queueItem = {
  10121. directory,
  10122. base
  10123. };
  10124. this._queue.push(queueItem, (error) => {
  10125. if (error !== null) {
  10126. this._handleError(error);
  10127. }
  10128. });
  10129. }
  10130. _worker(item, done) {
  10131. this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
  10132. if (error !== null) {
  10133. done(error, void 0);
  10134. return;
  10135. }
  10136. for (const entry of entries) {
  10137. this._handleEntry(entry, item.base);
  10138. }
  10139. done(null, void 0);
  10140. });
  10141. }
  10142. _handleError(error) {
  10143. if (this._isDestroyed || !common.isFatalError(this._settings, error)) {
  10144. return;
  10145. }
  10146. this._isFatalError = true;
  10147. this._isDestroyed = true;
  10148. this._emitter.emit("error", error);
  10149. }
  10150. _handleEntry(entry, base) {
  10151. if (this._isDestroyed || this._isFatalError) {
  10152. return;
  10153. }
  10154. const fullpath = entry.path;
  10155. if (base !== void 0) {
  10156. entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
  10157. }
  10158. if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
  10159. this._emitEntry(entry);
  10160. }
  10161. if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
  10162. this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
  10163. }
  10164. }
  10165. _emitEntry(entry) {
  10166. this._emitter.emit("entry", entry);
  10167. }
  10168. };
  10169. exports2.default = AsyncReader;
  10170. }
  10171. });
  10172. var require_async4 = __commonJS2({
  10173. "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) {
  10174. "use strict";
  10175. Object.defineProperty(exports2, "__esModule", {
  10176. value: true
  10177. });
  10178. var async_1 = require_async3();
  10179. var AsyncProvider = class {
  10180. constructor(_root, _settings) {
  10181. this._root = _root;
  10182. this._settings = _settings;
  10183. this._reader = new async_1.default(this._root, this._settings);
  10184. this._storage = [];
  10185. }
  10186. read(callback) {
  10187. this._reader.onError((error) => {
  10188. callFailureCallback(callback, error);
  10189. });
  10190. this._reader.onEntry((entry) => {
  10191. this._storage.push(entry);
  10192. });
  10193. this._reader.onEnd(() => {
  10194. callSuccessCallback(callback, this._storage);
  10195. });
  10196. this._reader.read();
  10197. }
  10198. };
  10199. exports2.default = AsyncProvider;
  10200. function callFailureCallback(callback, error) {
  10201. callback(error);
  10202. }
  10203. function callSuccessCallback(callback, entries) {
  10204. callback(null, entries);
  10205. }
  10206. }
  10207. });
  10208. var require_stream2 = __commonJS2({
  10209. "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) {
  10210. "use strict";
  10211. Object.defineProperty(exports2, "__esModule", {
  10212. value: true
  10213. });
  10214. var stream_1 = require("stream");
  10215. var async_1 = require_async3();
  10216. var StreamProvider = class {
  10217. constructor(_root, _settings) {
  10218. this._root = _root;
  10219. this._settings = _settings;
  10220. this._reader = new async_1.default(this._root, this._settings);
  10221. this._stream = new stream_1.Readable({
  10222. objectMode: true,
  10223. read: () => {
  10224. },
  10225. destroy: () => {
  10226. if (!this._reader.isDestroyed) {
  10227. this._reader.destroy();
  10228. }
  10229. }
  10230. });
  10231. }
  10232. read() {
  10233. this._reader.onError((error) => {
  10234. this._stream.emit("error", error);
  10235. });
  10236. this._reader.onEntry((entry) => {
  10237. this._stream.push(entry);
  10238. });
  10239. this._reader.onEnd(() => {
  10240. this._stream.push(null);
  10241. });
  10242. this._reader.read();
  10243. return this._stream;
  10244. }
  10245. };
  10246. exports2.default = StreamProvider;
  10247. }
  10248. });
  10249. var require_sync3 = __commonJS2({
  10250. "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) {
  10251. "use strict";
  10252. Object.defineProperty(exports2, "__esModule", {
  10253. value: true
  10254. });
  10255. var fsScandir = require_out2();
  10256. var common = require_common2();
  10257. var reader_1 = require_reader();
  10258. var SyncReader = class extends reader_1.default {
  10259. constructor() {
  10260. super(...arguments);
  10261. this._scandir = fsScandir.scandirSync;
  10262. this._storage = [];
  10263. this._queue = /* @__PURE__ */ new Set();
  10264. }
  10265. read() {
  10266. this._pushToQueue(this._root, this._settings.basePath);
  10267. this._handleQueue();
  10268. return this._storage;
  10269. }
  10270. _pushToQueue(directory, base) {
  10271. this._queue.add({
  10272. directory,
  10273. base
  10274. });
  10275. }
  10276. _handleQueue() {
  10277. for (const item of this._queue.values()) {
  10278. this._handleDirectory(item.directory, item.base);
  10279. }
  10280. }
  10281. _handleDirectory(directory, base) {
  10282. try {
  10283. const entries = this._scandir(directory, this._settings.fsScandirSettings);
  10284. for (const entry of entries) {
  10285. this._handleEntry(entry, base);
  10286. }
  10287. } catch (error) {
  10288. this._handleError(error);
  10289. }
  10290. }
  10291. _handleError(error) {
  10292. if (!common.isFatalError(this._settings, error)) {
  10293. return;
  10294. }
  10295. throw error;
  10296. }
  10297. _handleEntry(entry, base) {
  10298. const fullpath = entry.path;
  10299. if (base !== void 0) {
  10300. entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
  10301. }
  10302. if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
  10303. this._pushToStorage(entry);
  10304. }
  10305. if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
  10306. this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
  10307. }
  10308. }
  10309. _pushToStorage(entry) {
  10310. this._storage.push(entry);
  10311. }
  10312. };
  10313. exports2.default = SyncReader;
  10314. }
  10315. });
  10316. var require_sync4 = __commonJS2({
  10317. "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) {
  10318. "use strict";
  10319. Object.defineProperty(exports2, "__esModule", {
  10320. value: true
  10321. });
  10322. var sync_1 = require_sync3();
  10323. var SyncProvider = class {
  10324. constructor(_root, _settings) {
  10325. this._root = _root;
  10326. this._settings = _settings;
  10327. this._reader = new sync_1.default(this._root, this._settings);
  10328. }
  10329. read() {
  10330. return this._reader.read();
  10331. }
  10332. };
  10333. exports2.default = SyncProvider;
  10334. }
  10335. });
  10336. var require_settings3 = __commonJS2({
  10337. "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
  10338. "use strict";
  10339. Object.defineProperty(exports2, "__esModule", {
  10340. value: true
  10341. });
  10342. var path = require("path");
  10343. var fsScandir = require_out2();
  10344. var Settings = class {
  10345. constructor(_options = {}) {
  10346. this._options = _options;
  10347. this.basePath = this._getValue(this._options.basePath, void 0);
  10348. this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
  10349. this.deepFilter = this._getValue(this._options.deepFilter, null);
  10350. this.entryFilter = this._getValue(this._options.entryFilter, null);
  10351. this.errorFilter = this._getValue(this._options.errorFilter, null);
  10352. this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
  10353. this.fsScandirSettings = new fsScandir.Settings({
  10354. followSymbolicLinks: this._options.followSymbolicLinks,
  10355. fs: this._options.fs,
  10356. pathSegmentSeparator: this._options.pathSegmentSeparator,
  10357. stats: this._options.stats,
  10358. throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
  10359. });
  10360. }
  10361. _getValue(option, value) {
  10362. return option !== null && option !== void 0 ? option : value;
  10363. }
  10364. };
  10365. exports2.default = Settings;
  10366. }
  10367. });
  10368. var require_out3 = __commonJS2({
  10369. "node_modules/@nodelib/fs.walk/out/index.js"(exports2) {
  10370. "use strict";
  10371. Object.defineProperty(exports2, "__esModule", {
  10372. value: true
  10373. });
  10374. exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0;
  10375. var async_1 = require_async4();
  10376. var stream_1 = require_stream2();
  10377. var sync_1 = require_sync4();
  10378. var settings_1 = require_settings3();
  10379. exports2.Settings = settings_1.default;
  10380. function walk(directory, optionsOrSettingsOrCallback, callback) {
  10381. if (typeof optionsOrSettingsOrCallback === "function") {
  10382. new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
  10383. return;
  10384. }
  10385. new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
  10386. }
  10387. exports2.walk = walk;
  10388. function walkSync(directory, optionsOrSettings) {
  10389. const settings = getSettings(optionsOrSettings);
  10390. const provider = new sync_1.default(directory, settings);
  10391. return provider.read();
  10392. }
  10393. exports2.walkSync = walkSync;
  10394. function walkStream(directory, optionsOrSettings) {
  10395. const settings = getSettings(optionsOrSettings);
  10396. const provider = new stream_1.default(directory, settings);
  10397. return provider.read();
  10398. }
  10399. exports2.walkStream = walkStream;
  10400. function getSettings(settingsOrOptions = {}) {
  10401. if (settingsOrOptions instanceof settings_1.default) {
  10402. return settingsOrOptions;
  10403. }
  10404. return new settings_1.default(settingsOrOptions);
  10405. }
  10406. }
  10407. });
  10408. var require_reader2 = __commonJS2({
  10409. "node_modules/fast-glob/out/readers/reader.js"(exports2) {
  10410. "use strict";
  10411. Object.defineProperty(exports2, "__esModule", {
  10412. value: true
  10413. });
  10414. var path = require("path");
  10415. var fsStat = require_out();
  10416. var utils = require_utils3();
  10417. var Reader = class {
  10418. constructor(_settings) {
  10419. this._settings = _settings;
  10420. this._fsStatSettings = new fsStat.Settings({
  10421. followSymbolicLink: this._settings.followSymbolicLinks,
  10422. fs: this._settings.fs,
  10423. throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
  10424. });
  10425. }
  10426. _getFullEntryPath(filepath) {
  10427. return path.resolve(this._settings.cwd, filepath);
  10428. }
  10429. _makeEntry(stats, pattern) {
  10430. const entry = {
  10431. name: pattern,
  10432. path: pattern,
  10433. dirent: utils.fs.createDirentFromStats(pattern, stats)
  10434. };
  10435. if (this._settings.stats) {
  10436. entry.stats = stats;
  10437. }
  10438. return entry;
  10439. }
  10440. _isFatalError(error) {
  10441. return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
  10442. }
  10443. };
  10444. exports2.default = Reader;
  10445. }
  10446. });
  10447. var require_stream3 = __commonJS2({
  10448. "node_modules/fast-glob/out/readers/stream.js"(exports2) {
  10449. "use strict";
  10450. Object.defineProperty(exports2, "__esModule", {
  10451. value: true
  10452. });
  10453. var stream_1 = require("stream");
  10454. var fsStat = require_out();
  10455. var fsWalk = require_out3();
  10456. var reader_1 = require_reader2();
  10457. var ReaderStream = class extends reader_1.default {
  10458. constructor() {
  10459. super(...arguments);
  10460. this._walkStream = fsWalk.walkStream;
  10461. this._stat = fsStat.stat;
  10462. }
  10463. dynamic(root, options) {
  10464. return this._walkStream(root, options);
  10465. }
  10466. static(patterns, options) {
  10467. const filepaths = patterns.map(this._getFullEntryPath, this);
  10468. const stream = new stream_1.PassThrough({
  10469. objectMode: true
  10470. });
  10471. stream._write = (index, _enc, done) => {
  10472. return this._getEntry(filepaths[index], patterns[index], options).then((entry) => {
  10473. if (entry !== null && options.entryFilter(entry)) {
  10474. stream.push(entry);
  10475. }
  10476. if (index === filepaths.length - 1) {
  10477. stream.end();
  10478. }
  10479. done();
  10480. }).catch(done);
  10481. };
  10482. for (let i = 0; i < filepaths.length; i++) {
  10483. stream.write(i);
  10484. }
  10485. return stream;
  10486. }
  10487. _getEntry(filepath, pattern, options) {
  10488. return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => {
  10489. if (options.errorFilter(error)) {
  10490. return null;
  10491. }
  10492. throw error;
  10493. });
  10494. }
  10495. _getStat(filepath) {
  10496. return new Promise((resolve, reject) => {
  10497. this._stat(filepath, this._fsStatSettings, (error, stats) => {
  10498. return error === null ? resolve(stats) : reject(error);
  10499. });
  10500. });
  10501. }
  10502. };
  10503. exports2.default = ReaderStream;
  10504. }
  10505. });
  10506. var require_matcher = __commonJS2({
  10507. "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) {
  10508. "use strict";
  10509. Object.defineProperty(exports2, "__esModule", {
  10510. value: true
  10511. });
  10512. var utils = require_utils3();
  10513. var Matcher = class {
  10514. constructor(_patterns, _settings, _micromatchOptions) {
  10515. this._patterns = _patterns;
  10516. this._settings = _settings;
  10517. this._micromatchOptions = _micromatchOptions;
  10518. this._storage = [];
  10519. this._fillStorage();
  10520. }
  10521. _fillStorage() {
  10522. const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns);
  10523. for (const pattern of patterns) {
  10524. const segments = this._getPatternSegments(pattern);
  10525. const sections = this._splitSegmentsIntoSections(segments);
  10526. this._storage.push({
  10527. complete: sections.length <= 1,
  10528. pattern,
  10529. segments,
  10530. sections
  10531. });
  10532. }
  10533. }
  10534. _getPatternSegments(pattern) {
  10535. const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
  10536. return parts.map((part) => {
  10537. const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
  10538. if (!dynamic) {
  10539. return {
  10540. dynamic: false,
  10541. pattern: part
  10542. };
  10543. }
  10544. return {
  10545. dynamic: true,
  10546. pattern: part,
  10547. patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
  10548. };
  10549. });
  10550. }
  10551. _splitSegmentsIntoSections(segments) {
  10552. return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
  10553. }
  10554. };
  10555. exports2.default = Matcher;
  10556. }
  10557. });
  10558. var require_partial = __commonJS2({
  10559. "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) {
  10560. "use strict";
  10561. Object.defineProperty(exports2, "__esModule", {
  10562. value: true
  10563. });
  10564. var matcher_1 = require_matcher();
  10565. var PartialMatcher = class extends matcher_1.default {
  10566. match(filepath) {
  10567. const parts = filepath.split("/");
  10568. const levels = parts.length;
  10569. const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
  10570. for (const pattern of patterns) {
  10571. const section = pattern.sections[0];
  10572. if (!pattern.complete && levels > section.length) {
  10573. return true;
  10574. }
  10575. const match = parts.every((part, index) => {
  10576. const segment = pattern.segments[index];
  10577. if (segment.dynamic && segment.patternRe.test(part)) {
  10578. return true;
  10579. }
  10580. if (!segment.dynamic && segment.pattern === part) {
  10581. return true;
  10582. }
  10583. return false;
  10584. });
  10585. if (match) {
  10586. return true;
  10587. }
  10588. }
  10589. return false;
  10590. }
  10591. };
  10592. exports2.default = PartialMatcher;
  10593. }
  10594. });
  10595. var require_deep = __commonJS2({
  10596. "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) {
  10597. "use strict";
  10598. Object.defineProperty(exports2, "__esModule", {
  10599. value: true
  10600. });
  10601. var utils = require_utils3();
  10602. var partial_1 = require_partial();
  10603. var DeepFilter = class {
  10604. constructor(_settings, _micromatchOptions) {
  10605. this._settings = _settings;
  10606. this._micromatchOptions = _micromatchOptions;
  10607. }
  10608. getFilter(basePath, positive, negative) {
  10609. const matcher = this._getMatcher(positive);
  10610. const negativeRe = this._getNegativePatternsRe(negative);
  10611. return (entry) => this._filter(basePath, entry, matcher, negativeRe);
  10612. }
  10613. _getMatcher(patterns) {
  10614. return new partial_1.default(patterns, this._settings, this._micromatchOptions);
  10615. }
  10616. _getNegativePatternsRe(patterns) {
  10617. const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
  10618. return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
  10619. }
  10620. _filter(basePath, entry, matcher, negativeRe) {
  10621. if (this._isSkippedByDeep(basePath, entry.path)) {
  10622. return false;
  10623. }
  10624. if (this._isSkippedSymbolicLink(entry)) {
  10625. return false;
  10626. }
  10627. const filepath = utils.path.removeLeadingDotSegment(entry.path);
  10628. if (this._isSkippedByPositivePatterns(filepath, matcher)) {
  10629. return false;
  10630. }
  10631. return this._isSkippedByNegativePatterns(filepath, negativeRe);
  10632. }
  10633. _isSkippedByDeep(basePath, entryPath) {
  10634. if (this._settings.deep === Infinity) {
  10635. return false;
  10636. }
  10637. return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
  10638. }
  10639. _getEntryLevel(basePath, entryPath) {
  10640. const entryPathDepth = entryPath.split("/").length;
  10641. if (basePath === "") {
  10642. return entryPathDepth;
  10643. }
  10644. const basePathDepth = basePath.split("/").length;
  10645. return entryPathDepth - basePathDepth;
  10646. }
  10647. _isSkippedSymbolicLink(entry) {
  10648. return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
  10649. }
  10650. _isSkippedByPositivePatterns(entryPath, matcher) {
  10651. return !this._settings.baseNameMatch && !matcher.match(entryPath);
  10652. }
  10653. _isSkippedByNegativePatterns(entryPath, patternsRe) {
  10654. return !utils.pattern.matchAny(entryPath, patternsRe);
  10655. }
  10656. };
  10657. exports2.default = DeepFilter;
  10658. }
  10659. });
  10660. var require_entry = __commonJS2({
  10661. "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) {
  10662. "use strict";
  10663. Object.defineProperty(exports2, "__esModule", {
  10664. value: true
  10665. });
  10666. var utils = require_utils3();
  10667. var EntryFilter = class {
  10668. constructor(_settings, _micromatchOptions) {
  10669. this._settings = _settings;
  10670. this._micromatchOptions = _micromatchOptions;
  10671. this.index = /* @__PURE__ */ new Map();
  10672. }
  10673. getFilter(positive, negative) {
  10674. const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
  10675. const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
  10676. return (entry) => this._filter(entry, positiveRe, negativeRe);
  10677. }
  10678. _filter(entry, positiveRe, negativeRe) {
  10679. if (this._settings.unique && this._isDuplicateEntry(entry)) {
  10680. return false;
  10681. }
  10682. if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
  10683. return false;
  10684. }
  10685. if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) {
  10686. return false;
  10687. }
  10688. const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
  10689. const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
  10690. if (this._settings.unique && isMatched) {
  10691. this._createIndexRecord(entry);
  10692. }
  10693. return isMatched;
  10694. }
  10695. _isDuplicateEntry(entry) {
  10696. return this.index.has(entry.path);
  10697. }
  10698. _createIndexRecord(entry) {
  10699. this.index.set(entry.path, void 0);
  10700. }
  10701. _onlyFileFilter(entry) {
  10702. return this._settings.onlyFiles && !entry.dirent.isFile();
  10703. }
  10704. _onlyDirectoryFilter(entry) {
  10705. return this._settings.onlyDirectories && !entry.dirent.isDirectory();
  10706. }
  10707. _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
  10708. if (!this._settings.absolute) {
  10709. return false;
  10710. }
  10711. const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
  10712. return utils.pattern.matchAny(fullpath, patternsRe);
  10713. }
  10714. _isMatchToPatterns(entryPath, patternsRe) {
  10715. const filepath = utils.path.removeLeadingDotSegment(entryPath);
  10716. return utils.pattern.matchAny(filepath, patternsRe) || utils.pattern.matchAny(filepath + "/", patternsRe);
  10717. }
  10718. };
  10719. exports2.default = EntryFilter;
  10720. }
  10721. });
  10722. var require_error = __commonJS2({
  10723. "node_modules/fast-glob/out/providers/filters/error.js"(exports2) {
  10724. "use strict";
  10725. Object.defineProperty(exports2, "__esModule", {
  10726. value: true
  10727. });
  10728. var utils = require_utils3();
  10729. var ErrorFilter = class {
  10730. constructor(_settings) {
  10731. this._settings = _settings;
  10732. }
  10733. getFilter() {
  10734. return (error) => this._isNonFatalError(error);
  10735. }
  10736. _isNonFatalError(error) {
  10737. return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
  10738. }
  10739. };
  10740. exports2.default = ErrorFilter;
  10741. }
  10742. });
  10743. var require_entry2 = __commonJS2({
  10744. "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) {
  10745. "use strict";
  10746. Object.defineProperty(exports2, "__esModule", {
  10747. value: true
  10748. });
  10749. var utils = require_utils3();
  10750. var EntryTransformer = class {
  10751. constructor(_settings) {
  10752. this._settings = _settings;
  10753. }
  10754. getTransformer() {
  10755. return (entry) => this._transform(entry);
  10756. }
  10757. _transform(entry) {
  10758. let filepath = entry.path;
  10759. if (this._settings.absolute) {
  10760. filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
  10761. filepath = utils.path.unixify(filepath);
  10762. }
  10763. if (this._settings.markDirectories && entry.dirent.isDirectory()) {
  10764. filepath += "/";
  10765. }
  10766. if (!this._settings.objectMode) {
  10767. return filepath;
  10768. }
  10769. return Object.assign(Object.assign({}, entry), {
  10770. path: filepath
  10771. });
  10772. }
  10773. };
  10774. exports2.default = EntryTransformer;
  10775. }
  10776. });
  10777. var require_provider = __commonJS2({
  10778. "node_modules/fast-glob/out/providers/provider.js"(exports2) {
  10779. "use strict";
  10780. Object.defineProperty(exports2, "__esModule", {
  10781. value: true
  10782. });
  10783. var path = require("path");
  10784. var deep_1 = require_deep();
  10785. var entry_1 = require_entry();
  10786. var error_1 = require_error();
  10787. var entry_2 = require_entry2();
  10788. var Provider = class {
  10789. constructor(_settings) {
  10790. this._settings = _settings;
  10791. this.errorFilter = new error_1.default(this._settings);
  10792. this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
  10793. this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
  10794. this.entryTransformer = new entry_2.default(this._settings);
  10795. }
  10796. _getRootDirectory(task) {
  10797. return path.resolve(this._settings.cwd, task.base);
  10798. }
  10799. _getReaderOptions(task) {
  10800. const basePath = task.base === "." ? "" : task.base;
  10801. return {
  10802. basePath,
  10803. pathSegmentSeparator: "/",
  10804. concurrency: this._settings.concurrency,
  10805. deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
  10806. entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
  10807. errorFilter: this.errorFilter.getFilter(),
  10808. followSymbolicLinks: this._settings.followSymbolicLinks,
  10809. fs: this._settings.fs,
  10810. stats: this._settings.stats,
  10811. throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
  10812. transform: this.entryTransformer.getTransformer()
  10813. };
  10814. }
  10815. _getMicromatchOptions() {
  10816. return {
  10817. dot: this._settings.dot,
  10818. matchBase: this._settings.baseNameMatch,
  10819. nobrace: !this._settings.braceExpansion,
  10820. nocase: !this._settings.caseSensitiveMatch,
  10821. noext: !this._settings.extglob,
  10822. noglobstar: !this._settings.globstar,
  10823. posix: true,
  10824. strictSlashes: false
  10825. };
  10826. }
  10827. };
  10828. exports2.default = Provider;
  10829. }
  10830. });
  10831. var require_async5 = __commonJS2({
  10832. "node_modules/fast-glob/out/providers/async.js"(exports2) {
  10833. "use strict";
  10834. Object.defineProperty(exports2, "__esModule", {
  10835. value: true
  10836. });
  10837. var stream_1 = require_stream3();
  10838. var provider_1 = require_provider();
  10839. var ProviderAsync = class extends provider_1.default {
  10840. constructor() {
  10841. super(...arguments);
  10842. this._reader = new stream_1.default(this._settings);
  10843. }
  10844. read(task) {
  10845. const root = this._getRootDirectory(task);
  10846. const options = this._getReaderOptions(task);
  10847. const entries = [];
  10848. return new Promise((resolve, reject) => {
  10849. const stream = this.api(root, task, options);
  10850. stream.once("error", reject);
  10851. stream.on("data", (entry) => entries.push(options.transform(entry)));
  10852. stream.once("end", () => resolve(entries));
  10853. });
  10854. }
  10855. api(root, task, options) {
  10856. if (task.dynamic) {
  10857. return this._reader.dynamic(root, options);
  10858. }
  10859. return this._reader.static(task.patterns, options);
  10860. }
  10861. };
  10862. exports2.default = ProviderAsync;
  10863. }
  10864. });
  10865. var require_stream4 = __commonJS2({
  10866. "node_modules/fast-glob/out/providers/stream.js"(exports2) {
  10867. "use strict";
  10868. Object.defineProperty(exports2, "__esModule", {
  10869. value: true
  10870. });
  10871. var stream_1 = require("stream");
  10872. var stream_2 = require_stream3();
  10873. var provider_1 = require_provider();
  10874. var ProviderStream = class extends provider_1.default {
  10875. constructor() {
  10876. super(...arguments);
  10877. this._reader = new stream_2.default(this._settings);
  10878. }
  10879. read(task) {
  10880. const root = this._getRootDirectory(task);
  10881. const options = this._getReaderOptions(task);
  10882. const source = this.api(root, task, options);
  10883. const destination = new stream_1.Readable({
  10884. objectMode: true,
  10885. read: () => {
  10886. }
  10887. });
  10888. source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end"));
  10889. destination.once("close", () => source.destroy());
  10890. return destination;
  10891. }
  10892. api(root, task, options) {
  10893. if (task.dynamic) {
  10894. return this._reader.dynamic(root, options);
  10895. }
  10896. return this._reader.static(task.patterns, options);
  10897. }
  10898. };
  10899. exports2.default = ProviderStream;
  10900. }
  10901. });
  10902. var require_sync5 = __commonJS2({
  10903. "node_modules/fast-glob/out/readers/sync.js"(exports2) {
  10904. "use strict";
  10905. Object.defineProperty(exports2, "__esModule", {
  10906. value: true
  10907. });
  10908. var fsStat = require_out();
  10909. var fsWalk = require_out3();
  10910. var reader_1 = require_reader2();
  10911. var ReaderSync = class extends reader_1.default {
  10912. constructor() {
  10913. super(...arguments);
  10914. this._walkSync = fsWalk.walkSync;
  10915. this._statSync = fsStat.statSync;
  10916. }
  10917. dynamic(root, options) {
  10918. return this._walkSync(root, options);
  10919. }
  10920. static(patterns, options) {
  10921. const entries = [];
  10922. for (const pattern of patterns) {
  10923. const filepath = this._getFullEntryPath(pattern);
  10924. const entry = this._getEntry(filepath, pattern, options);
  10925. if (entry === null || !options.entryFilter(entry)) {
  10926. continue;
  10927. }
  10928. entries.push(entry);
  10929. }
  10930. return entries;
  10931. }
  10932. _getEntry(filepath, pattern, options) {
  10933. try {
  10934. const stats = this._getStat(filepath);
  10935. return this._makeEntry(stats, pattern);
  10936. } catch (error) {
  10937. if (options.errorFilter(error)) {
  10938. return null;
  10939. }
  10940. throw error;
  10941. }
  10942. }
  10943. _getStat(filepath) {
  10944. return this._statSync(filepath, this._fsStatSettings);
  10945. }
  10946. };
  10947. exports2.default = ReaderSync;
  10948. }
  10949. });
  10950. var require_sync6 = __commonJS2({
  10951. "node_modules/fast-glob/out/providers/sync.js"(exports2) {
  10952. "use strict";
  10953. Object.defineProperty(exports2, "__esModule", {
  10954. value: true
  10955. });
  10956. var sync_1 = require_sync5();
  10957. var provider_1 = require_provider();
  10958. var ProviderSync = class extends provider_1.default {
  10959. constructor() {
  10960. super(...arguments);
  10961. this._reader = new sync_1.default(this._settings);
  10962. }
  10963. read(task) {
  10964. const root = this._getRootDirectory(task);
  10965. const options = this._getReaderOptions(task);
  10966. const entries = this.api(root, task, options);
  10967. return entries.map(options.transform);
  10968. }
  10969. api(root, task, options) {
  10970. if (task.dynamic) {
  10971. return this._reader.dynamic(root, options);
  10972. }
  10973. return this._reader.static(task.patterns, options);
  10974. }
  10975. };
  10976. exports2.default = ProviderSync;
  10977. }
  10978. });
  10979. var require_settings4 = __commonJS2({
  10980. "node_modules/fast-glob/out/settings.js"(exports2) {
  10981. "use strict";
  10982. Object.defineProperty(exports2, "__esModule", {
  10983. value: true
  10984. });
  10985. exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
  10986. var fs = require("fs");
  10987. var os = require("os");
  10988. var CPU_COUNT = Math.max(os.cpus().length, 1);
  10989. exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
  10990. lstat: fs.lstat,
  10991. lstatSync: fs.lstatSync,
  10992. stat: fs.stat,
  10993. statSync: fs.statSync,
  10994. readdir: fs.readdir,
  10995. readdirSync: fs.readdirSync
  10996. };
  10997. var Settings = class {
  10998. constructor(_options = {}) {
  10999. this._options = _options;
  11000. this.absolute = this._getValue(this._options.absolute, false);
  11001. this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
  11002. this.braceExpansion = this._getValue(this._options.braceExpansion, true);
  11003. this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
  11004. this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
  11005. this.cwd = this._getValue(this._options.cwd, process.cwd());
  11006. this.deep = this._getValue(this._options.deep, Infinity);
  11007. this.dot = this._getValue(this._options.dot, false);
  11008. this.extglob = this._getValue(this._options.extglob, true);
  11009. this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
  11010. this.fs = this._getFileSystemMethods(this._options.fs);
  11011. this.globstar = this._getValue(this._options.globstar, true);
  11012. this.ignore = this._getValue(this._options.ignore, []);
  11013. this.markDirectories = this._getValue(this._options.markDirectories, false);
  11014. this.objectMode = this._getValue(this._options.objectMode, false);
  11015. this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
  11016. this.onlyFiles = this._getValue(this._options.onlyFiles, true);
  11017. this.stats = this._getValue(this._options.stats, false);
  11018. this.suppressErrors = this._getValue(this._options.suppressErrors, false);
  11019. this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
  11020. this.unique = this._getValue(this._options.unique, true);
  11021. if (this.onlyDirectories) {
  11022. this.onlyFiles = false;
  11023. }
  11024. if (this.stats) {
  11025. this.objectMode = true;
  11026. }
  11027. }
  11028. _getValue(option, value) {
  11029. return option === void 0 ? value : option;
  11030. }
  11031. _getFileSystemMethods(methods = {}) {
  11032. return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
  11033. }
  11034. };
  11035. exports2.default = Settings;
  11036. }
  11037. });
  11038. var require_out4 = __commonJS2({
  11039. "node_modules/fast-glob/out/index.js"(exports2, module2) {
  11040. "use strict";
  11041. var taskManager = require_tasks();
  11042. var patternManager = require_patterns();
  11043. var async_1 = require_async5();
  11044. var stream_1 = require_stream4();
  11045. var sync_1 = require_sync6();
  11046. var settings_1 = require_settings4();
  11047. var utils = require_utils3();
  11048. async function FastGlob(source, options) {
  11049. assertPatternsInput(source);
  11050. const works = getWorks(source, async_1.default, options);
  11051. const result = await Promise.all(works);
  11052. return utils.array.flatten(result);
  11053. }
  11054. (function(FastGlob2) {
  11055. function sync(source, options) {
  11056. assertPatternsInput(source);
  11057. const works = getWorks(source, sync_1.default, options);
  11058. return utils.array.flatten(works);
  11059. }
  11060. FastGlob2.sync = sync;
  11061. function stream(source, options) {
  11062. assertPatternsInput(source);
  11063. const works = getWorks(source, stream_1.default, options);
  11064. return utils.stream.merge(works);
  11065. }
  11066. FastGlob2.stream = stream;
  11067. function generateTasks(source, options) {
  11068. assertPatternsInput(source);
  11069. const patterns = patternManager.transform([].concat(source));
  11070. const settings = new settings_1.default(options);
  11071. return taskManager.generate(patterns, settings);
  11072. }
  11073. FastGlob2.generateTasks = generateTasks;
  11074. function isDynamicPattern(source, options) {
  11075. assertPatternsInput(source);
  11076. const settings = new settings_1.default(options);
  11077. return utils.pattern.isDynamicPattern(source, settings);
  11078. }
  11079. FastGlob2.isDynamicPattern = isDynamicPattern;
  11080. function escapePath(source) {
  11081. assertPatternsInput(source);
  11082. return utils.path.escape(source);
  11083. }
  11084. FastGlob2.escapePath = escapePath;
  11085. })(FastGlob || (FastGlob = {}));
  11086. function getWorks(source, _Provider, options) {
  11087. const patterns = patternManager.transform([].concat(source));
  11088. const settings = new settings_1.default(options);
  11089. const tasks = taskManager.generate(patterns, settings);
  11090. const provider = new _Provider(settings);
  11091. return tasks.map(provider.read, provider);
  11092. }
  11093. function assertPatternsInput(input) {
  11094. const source = [].concat(input);
  11095. const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
  11096. if (!isValidSource) {
  11097. throw new TypeError("Patterns must be a string (non empty) or an array of strings");
  11098. }
  11099. }
  11100. module2.exports = FastGlob;
  11101. }
  11102. });
  11103. var require_expand_patterns = __commonJS2({
  11104. "src/cli/expand-patterns.js"(exports2, module2) {
  11105. "use strict";
  11106. var path = require("path");
  11107. var {
  11108. promises: fs
  11109. } = require("fs");
  11110. var fastGlob = require_out4();
  11111. async function* expandPatterns(context) {
  11112. const cwd = process.cwd();
  11113. const seen = /* @__PURE__ */ new Set();
  11114. let noResults = true;
  11115. for await (const pathOrError of expandPatternsInternal(context)) {
  11116. noResults = false;
  11117. if (typeof pathOrError !== "string") {
  11118. yield pathOrError;
  11119. continue;
  11120. }
  11121. const relativePath = path.relative(cwd, pathOrError);
  11122. if (seen.has(relativePath)) {
  11123. continue;
  11124. }
  11125. seen.add(relativePath);
  11126. yield relativePath;
  11127. }
  11128. if (noResults && context.argv.errorOnUnmatchedPattern !== false) {
  11129. yield {
  11130. error: `No matching files. Patterns: ${context.filePatterns.join(" ")}`
  11131. };
  11132. }
  11133. }
  11134. async function* expandPatternsInternal(context) {
  11135. const silentlyIgnoredDirs = [".git", ".svn", ".hg"];
  11136. if (context.argv.withNodeModules !== true) {
  11137. silentlyIgnoredDirs.push("node_modules");
  11138. }
  11139. const globOptions = {
  11140. dot: true,
  11141. ignore: silentlyIgnoredDirs.map((dir) => "**/" + dir)
  11142. };
  11143. let supportedFilesGlob;
  11144. const cwd = process.cwd();
  11145. const entries = [];
  11146. for (const pattern of context.filePatterns) {
  11147. const absolutePath = path.resolve(cwd, pattern);
  11148. if (containsIgnoredPathSegment(absolutePath, cwd, silentlyIgnoredDirs)) {
  11149. continue;
  11150. }
  11151. const stat = await statSafe(absolutePath);
  11152. if (stat) {
  11153. if (stat.isFile()) {
  11154. entries.push({
  11155. type: "file",
  11156. glob: escapePathForGlob(fixWindowsSlashes(pattern)),
  11157. input: pattern
  11158. });
  11159. } else if (stat.isDirectory()) {
  11160. const relativePath = path.relative(cwd, absolutePath) || ".";
  11161. entries.push({
  11162. type: "dir",
  11163. glob: escapePathForGlob(fixWindowsSlashes(relativePath)) + "/" + getSupportedFilesGlob(),
  11164. input: pattern
  11165. });
  11166. }
  11167. } else if (pattern[0] === "!") {
  11168. globOptions.ignore.push(fixWindowsSlashes(pattern.slice(1)));
  11169. } else {
  11170. entries.push({
  11171. type: "glob",
  11172. glob: fixWindowsSlashes(pattern),
  11173. input: pattern
  11174. });
  11175. }
  11176. }
  11177. for (const {
  11178. type,
  11179. glob,
  11180. input
  11181. } of entries) {
  11182. let result;
  11183. try {
  11184. result = await fastGlob(glob, globOptions);
  11185. } catch ({
  11186. message
  11187. }) {
  11188. yield {
  11189. error: `${errorMessages.globError[type]}: ${input}
  11190. ${message}`
  11191. };
  11192. continue;
  11193. }
  11194. if (result.length === 0) {
  11195. if (context.argv.errorOnUnmatchedPattern !== false) {
  11196. yield {
  11197. error: `${errorMessages.emptyResults[type]}: "${input}".`
  11198. };
  11199. }
  11200. } else {
  11201. yield* sortPaths(result);
  11202. }
  11203. }
  11204. function getSupportedFilesGlob() {
  11205. if (!supportedFilesGlob) {
  11206. const extensions = context.languages.flatMap((lang) => lang.extensions || []);
  11207. const filenames = context.languages.flatMap((lang) => lang.filenames || []);
  11208. supportedFilesGlob = `**/{${[...extensions.map((ext) => "*" + (ext[0] === "." ? ext : "." + ext)), ...filenames]}}`;
  11209. }
  11210. return supportedFilesGlob;
  11211. }
  11212. }
  11213. var errorMessages = {
  11214. globError: {
  11215. file: "Unable to resolve file",
  11216. dir: "Unable to expand directory",
  11217. glob: "Unable to expand glob pattern"
  11218. },
  11219. emptyResults: {
  11220. file: "Explicitly specified file was ignored due to negative glob patterns",
  11221. dir: "No supported files were found in the directory",
  11222. glob: "No files matching the pattern were found"
  11223. }
  11224. };
  11225. function containsIgnoredPathSegment(absolutePath, cwd, ignoredDirectories) {
  11226. return path.relative(cwd, absolutePath).split(path.sep).some((dir) => ignoredDirectories.includes(dir));
  11227. }
  11228. function sortPaths(paths) {
  11229. return paths.sort((a, b) => a.localeCompare(b));
  11230. }
  11231. async function statSafe(filePath) {
  11232. try {
  11233. return await fs.stat(filePath);
  11234. } catch (error) {
  11235. if (error.code !== "ENOENT") {
  11236. throw error;
  11237. }
  11238. }
  11239. }
  11240. function escapePathForGlob(path2) {
  11241. return fastGlob.escapePath(path2.replace(/\\/g, "\0")).replace(/\\!/g, "@(!)").replace(/\0/g, "@(\\\\)");
  11242. }
  11243. var isWindows = path.sep === "\\";
  11244. function fixWindowsSlashes(pattern) {
  11245. return isWindows ? pattern.replace(/\\/g, "/") : pattern;
  11246. }
  11247. module2.exports = {
  11248. expandPatterns,
  11249. fixWindowsSlashes
  11250. };
  11251. }
  11252. });
  11253. var require_get_options_for_file = __commonJS2({
  11254. "src/cli/options/get-options-for-file.js"(exports2, module2) {
  11255. "use strict";
  11256. var dashify = require_dashify();
  11257. var prettier2 = require("./index.js");
  11258. var {
  11259. optionsNormalizer
  11260. } = require_prettier_internal();
  11261. var minimist = require_minimist2();
  11262. var createMinimistOptions = require_create_minimist_options();
  11263. var normalizeCliOptions = require_normalize_cli_options();
  11264. function getOptions(argv, detailedOptions) {
  11265. return Object.fromEntries(detailedOptions.filter(({
  11266. forwardToApi
  11267. }) => forwardToApi).map(({
  11268. forwardToApi,
  11269. name
  11270. }) => [forwardToApi, argv[name]]));
  11271. }
  11272. function cliifyOptions(object, apiDetailedOptionMap) {
  11273. return Object.fromEntries(Object.entries(object || {}).map(([key, value]) => {
  11274. const apiOption = apiDetailedOptionMap[key];
  11275. const cliKey = apiOption ? apiOption.name : key;
  11276. return [dashify(cliKey), value];
  11277. }));
  11278. }
  11279. function createApiDetailedOptionMap(detailedOptions) {
  11280. return Object.fromEntries(detailedOptions.filter((option) => option.forwardToApi && option.forwardToApi !== option.name).map((option) => [option.forwardToApi, option]));
  11281. }
  11282. function parseArgsToOptions(context, overrideDefaults) {
  11283. const minimistOptions = createMinimistOptions(context.detailedOptions);
  11284. const apiDetailedOptionMap = createApiDetailedOptionMap(context.detailedOptions);
  11285. return getOptions(normalizeCliOptions(minimist(context.rawArguments, {
  11286. string: minimistOptions.string,
  11287. boolean: minimistOptions.boolean,
  11288. default: cliifyOptions(overrideDefaults, apiDetailedOptionMap)
  11289. }), context.detailedOptions, {
  11290. logger: false
  11291. }), context.detailedOptions);
  11292. }
  11293. async function getOptionsOrDie(context, filePath) {
  11294. try {
  11295. if (context.argv.config === false) {
  11296. context.logger.debug("'--no-config' option found, skip loading config file.");
  11297. return null;
  11298. }
  11299. context.logger.debug(context.argv.config ? `load config file from '${context.argv.config}'` : `resolve config from '${filePath}'`);
  11300. const options = await prettier2.resolveConfig(filePath, {
  11301. editorconfig: context.argv.editorconfig,
  11302. config: context.argv.config
  11303. });
  11304. context.logger.debug("loaded options `" + JSON.stringify(options) + "`");
  11305. return options;
  11306. } catch (error) {
  11307. context.logger.error(`Invalid configuration file \`${filePath}\`: ` + error.message);
  11308. process.exit(2);
  11309. }
  11310. }
  11311. function applyConfigPrecedence(context, options) {
  11312. try {
  11313. switch (context.argv.configPrecedence) {
  11314. case "cli-override":
  11315. return parseArgsToOptions(context, options);
  11316. case "file-override":
  11317. return Object.assign(Object.assign({}, parseArgsToOptions(context)), options);
  11318. case "prefer-file":
  11319. return options || parseArgsToOptions(context);
  11320. }
  11321. } catch (error) {
  11322. context.logger.error(error.toString());
  11323. process.exit(2);
  11324. }
  11325. }
  11326. async function getOptionsForFile(context, filepath) {
  11327. const options = await getOptionsOrDie(context, filepath);
  11328. const hasPlugins = options && options.plugins;
  11329. if (hasPlugins) {
  11330. context.pushContextPlugins(options.plugins);
  11331. }
  11332. const appliedOptions = Object.assign({
  11333. filepath
  11334. }, applyConfigPrecedence(context, options && optionsNormalizer.normalizeApiOptions(options, context.supportOptions, {
  11335. logger: context.logger
  11336. })));
  11337. context.logger.debug(`applied config-precedence (${context.argv.configPrecedence}): ${JSON.stringify(appliedOptions)}`);
  11338. if (hasPlugins) {
  11339. context.popContextPlugins();
  11340. }
  11341. return appliedOptions;
  11342. }
  11343. module2.exports = getOptionsForFile;
  11344. }
  11345. });
  11346. var require_is_tty = __commonJS2({
  11347. "src/cli/is-tty.js"(exports2, module2) {
  11348. "use strict";
  11349. var {
  11350. isCI
  11351. } = require("./third-party.js");
  11352. module2.exports = function isTTY() {
  11353. return process.stdout.isTTY && !isCI();
  11354. };
  11355. }
  11356. });
  11357. var require_base = __commonJS2({
  11358. "node_modules/diff/lib/diff/base.js"(exports2) {
  11359. "use strict";
  11360. Object.defineProperty(exports2, "__esModule", {
  11361. value: true
  11362. });
  11363. exports2["default"] = Diff;
  11364. function Diff() {
  11365. }
  11366. Diff.prototype = {
  11367. diff: function diff(oldString, newString) {
  11368. var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  11369. var callback = options.callback;
  11370. if (typeof options === "function") {
  11371. callback = options;
  11372. options = {};
  11373. }
  11374. this.options = options;
  11375. var self2 = this;
  11376. function done(value) {
  11377. if (callback) {
  11378. setTimeout(function() {
  11379. callback(void 0, value);
  11380. }, 0);
  11381. return true;
  11382. } else {
  11383. return value;
  11384. }
  11385. }
  11386. oldString = this.castInput(oldString);
  11387. newString = this.castInput(newString);
  11388. oldString = this.removeEmpty(this.tokenize(oldString));
  11389. newString = this.removeEmpty(this.tokenize(newString));
  11390. var newLen = newString.length, oldLen = oldString.length;
  11391. var editLength = 1;
  11392. var maxEditLength = newLen + oldLen;
  11393. var bestPath = [{
  11394. newPos: -1,
  11395. components: []
  11396. }];
  11397. var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
  11398. if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
  11399. return done([{
  11400. value: this.join(newString),
  11401. count: newString.length
  11402. }]);
  11403. }
  11404. function execEditLength() {
  11405. for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
  11406. var basePath = void 0;
  11407. var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
  11408. if (addPath) {
  11409. bestPath[diagonalPath - 1] = void 0;
  11410. }
  11411. var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
  11412. if (!canAdd && !canRemove) {
  11413. bestPath[diagonalPath] = void 0;
  11414. continue;
  11415. }
  11416. if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
  11417. basePath = clonePath(removePath);
  11418. self2.pushComponent(basePath.components, void 0, true);
  11419. } else {
  11420. basePath = addPath;
  11421. basePath.newPos++;
  11422. self2.pushComponent(basePath.components, true, void 0);
  11423. }
  11424. _oldPos = self2.extractCommon(basePath, newString, oldString, diagonalPath);
  11425. if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
  11426. return done(buildValues(self2, basePath.components, newString, oldString, self2.useLongestToken));
  11427. } else {
  11428. bestPath[diagonalPath] = basePath;
  11429. }
  11430. }
  11431. editLength++;
  11432. }
  11433. if (callback) {
  11434. (function exec() {
  11435. setTimeout(function() {
  11436. if (editLength > maxEditLength) {
  11437. return callback();
  11438. }
  11439. if (!execEditLength()) {
  11440. exec();
  11441. }
  11442. }, 0);
  11443. })();
  11444. } else {
  11445. while (editLength <= maxEditLength) {
  11446. var ret = execEditLength();
  11447. if (ret) {
  11448. return ret;
  11449. }
  11450. }
  11451. }
  11452. },
  11453. pushComponent: function pushComponent(components, added, removed) {
  11454. var last = components[components.length - 1];
  11455. if (last && last.added === added && last.removed === removed) {
  11456. components[components.length - 1] = {
  11457. count: last.count + 1,
  11458. added,
  11459. removed
  11460. };
  11461. } else {
  11462. components.push({
  11463. count: 1,
  11464. added,
  11465. removed
  11466. });
  11467. }
  11468. },
  11469. extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
  11470. var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0;
  11471. while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
  11472. newPos++;
  11473. oldPos++;
  11474. commonCount++;
  11475. }
  11476. if (commonCount) {
  11477. basePath.components.push({
  11478. count: commonCount
  11479. });
  11480. }
  11481. basePath.newPos = newPos;
  11482. return oldPos;
  11483. },
  11484. equals: function equals(left, right) {
  11485. if (this.options.comparator) {
  11486. return this.options.comparator(left, right);
  11487. } else {
  11488. return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
  11489. }
  11490. },
  11491. removeEmpty: function removeEmpty(array) {
  11492. var ret = [];
  11493. for (var i = 0; i < array.length; i++) {
  11494. if (array[i]) {
  11495. ret.push(array[i]);
  11496. }
  11497. }
  11498. return ret;
  11499. },
  11500. castInput: function castInput(value) {
  11501. return value;
  11502. },
  11503. tokenize: function tokenize(value) {
  11504. return value.split("");
  11505. },
  11506. join: function join(chars) {
  11507. return chars.join("");
  11508. }
  11509. };
  11510. function buildValues(diff, components, newString, oldString, useLongestToken) {
  11511. var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0;
  11512. for (; componentPos < componentLen; componentPos++) {
  11513. var component = components[componentPos];
  11514. if (!component.removed) {
  11515. if (!component.added && useLongestToken) {
  11516. var value = newString.slice(newPos, newPos + component.count);
  11517. value = value.map(function(value2, i) {
  11518. var oldValue = oldString[oldPos + i];
  11519. return oldValue.length > value2.length ? oldValue : value2;
  11520. });
  11521. component.value = diff.join(value);
  11522. } else {
  11523. component.value = diff.join(newString.slice(newPos, newPos + component.count));
  11524. }
  11525. newPos += component.count;
  11526. if (!component.added) {
  11527. oldPos += component.count;
  11528. }
  11529. } else {
  11530. component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
  11531. oldPos += component.count;
  11532. if (componentPos && components[componentPos - 1].added) {
  11533. var tmp = components[componentPos - 1];
  11534. components[componentPos - 1] = components[componentPos];
  11535. components[componentPos] = tmp;
  11536. }
  11537. }
  11538. }
  11539. var lastComponent = components[componentLen - 1];
  11540. if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) {
  11541. components[componentLen - 2].value += lastComponent.value;
  11542. components.pop();
  11543. }
  11544. return components;
  11545. }
  11546. function clonePath(path) {
  11547. return {
  11548. newPos: path.newPos,
  11549. components: path.components.slice(0)
  11550. };
  11551. }
  11552. }
  11553. });
  11554. var require_params = __commonJS2({
  11555. "node_modules/diff/lib/util/params.js"(exports2) {
  11556. "use strict";
  11557. Object.defineProperty(exports2, "__esModule", {
  11558. value: true
  11559. });
  11560. exports2.generateOptions = generateOptions;
  11561. function generateOptions(options, defaults) {
  11562. if (typeof options === "function") {
  11563. defaults.callback = options;
  11564. } else if (options) {
  11565. for (var name in options) {
  11566. if (options.hasOwnProperty(name)) {
  11567. defaults[name] = options[name];
  11568. }
  11569. }
  11570. }
  11571. return defaults;
  11572. }
  11573. }
  11574. });
  11575. var require_line = __commonJS2({
  11576. "node_modules/diff/lib/diff/line.js"(exports2) {
  11577. "use strict";
  11578. Object.defineProperty(exports2, "__esModule", {
  11579. value: true
  11580. });
  11581. exports2.diffLines = diffLines;
  11582. exports2.diffTrimmedLines = diffTrimmedLines;
  11583. exports2.lineDiff = void 0;
  11584. var _base = _interopRequireDefault(require_base());
  11585. var _params = require_params();
  11586. function _interopRequireDefault(obj) {
  11587. return obj && obj.__esModule ? obj : {
  11588. "default": obj
  11589. };
  11590. }
  11591. var lineDiff = new _base["default"]();
  11592. exports2.lineDiff = lineDiff;
  11593. lineDiff.tokenize = function(value) {
  11594. var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
  11595. if (!linesAndNewlines[linesAndNewlines.length - 1]) {
  11596. linesAndNewlines.pop();
  11597. }
  11598. for (var i = 0; i < linesAndNewlines.length; i++) {
  11599. var line = linesAndNewlines[i];
  11600. if (i % 2 && !this.options.newlineIsToken) {
  11601. retLines[retLines.length - 1] += line;
  11602. } else {
  11603. if (this.options.ignoreWhitespace) {
  11604. line = line.trim();
  11605. }
  11606. retLines.push(line);
  11607. }
  11608. }
  11609. return retLines;
  11610. };
  11611. function diffLines(oldStr, newStr, callback) {
  11612. return lineDiff.diff(oldStr, newStr, callback);
  11613. }
  11614. function diffTrimmedLines(oldStr, newStr, callback) {
  11615. var options = (0, _params.generateOptions)(callback, {
  11616. ignoreWhitespace: true
  11617. });
  11618. return lineDiff.diff(oldStr, newStr, options);
  11619. }
  11620. }
  11621. });
  11622. var require_create = __commonJS2({
  11623. "node_modules/diff/lib/patch/create.js"(exports2) {
  11624. "use strict";
  11625. Object.defineProperty(exports2, "__esModule", {
  11626. value: true
  11627. });
  11628. exports2.structuredPatch = structuredPatch;
  11629. exports2.formatPatch = formatPatch;
  11630. exports2.createTwoFilesPatch = createTwoFilesPatch;
  11631. exports2.createPatch = createPatch;
  11632. var _line = require_line();
  11633. function _toConsumableArray(arr) {
  11634. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  11635. }
  11636. function _nonIterableSpread() {
  11637. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  11638. }
  11639. function _unsupportedIterableToArray(o, minLen) {
  11640. if (!o)
  11641. return;
  11642. if (typeof o === "string")
  11643. return _arrayLikeToArray(o, minLen);
  11644. var n = Object.prototype.toString.call(o).slice(8, -1);
  11645. if (n === "Object" && o.constructor)
  11646. n = o.constructor.name;
  11647. if (n === "Map" || n === "Set")
  11648. return Array.from(o);
  11649. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
  11650. return _arrayLikeToArray(o, minLen);
  11651. }
  11652. function _iterableToArray(iter) {
  11653. if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter))
  11654. return Array.from(iter);
  11655. }
  11656. function _arrayWithoutHoles(arr) {
  11657. if (Array.isArray(arr))
  11658. return _arrayLikeToArray(arr);
  11659. }
  11660. function _arrayLikeToArray(arr, len) {
  11661. if (len == null || len > arr.length)
  11662. len = arr.length;
  11663. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  11664. arr2[i] = arr[i];
  11665. }
  11666. return arr2;
  11667. }
  11668. function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
  11669. if (!options) {
  11670. options = {};
  11671. }
  11672. if (typeof options.context === "undefined") {
  11673. options.context = 4;
  11674. }
  11675. var diff = (0, _line.diffLines)(oldStr, newStr, options);
  11676. diff.push({
  11677. value: "",
  11678. lines: []
  11679. });
  11680. function contextLines(lines) {
  11681. return lines.map(function(entry) {
  11682. return " " + entry;
  11683. });
  11684. }
  11685. var hunks = [];
  11686. var oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
  11687. var _loop = function _loop2(i2) {
  11688. var current = diff[i2], lines = current.lines || current.value.replace(/\n$/, "").split("\n");
  11689. current.lines = lines;
  11690. if (current.added || current.removed) {
  11691. var _curRange;
  11692. if (!oldRangeStart) {
  11693. var prev = diff[i2 - 1];
  11694. oldRangeStart = oldLine;
  11695. newRangeStart = newLine;
  11696. if (prev) {
  11697. curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
  11698. oldRangeStart -= curRange.length;
  11699. newRangeStart -= curRange.length;
  11700. }
  11701. }
  11702. (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function(entry) {
  11703. return (current.added ? "+" : "-") + entry;
  11704. })));
  11705. if (current.added) {
  11706. newLine += lines.length;
  11707. } else {
  11708. oldLine += lines.length;
  11709. }
  11710. } else {
  11711. if (oldRangeStart) {
  11712. if (lines.length <= options.context * 2 && i2 < diff.length - 2) {
  11713. var _curRange2;
  11714. (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
  11715. } else {
  11716. var _curRange3;
  11717. var contextSize = Math.min(lines.length, options.context);
  11718. (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
  11719. var hunk = {
  11720. oldStart: oldRangeStart,
  11721. oldLines: oldLine - oldRangeStart + contextSize,
  11722. newStart: newRangeStart,
  11723. newLines: newLine - newRangeStart + contextSize,
  11724. lines: curRange
  11725. };
  11726. if (i2 >= diff.length - 2 && lines.length <= options.context) {
  11727. var oldEOFNewline = /\n$/.test(oldStr);
  11728. var newEOFNewline = /\n$/.test(newStr);
  11729. var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
  11730. if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
  11731. curRange.splice(hunk.oldLines, 0, "\\ No newline at end of file");
  11732. }
  11733. if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
  11734. curRange.push("\\ No newline at end of file");
  11735. }
  11736. }
  11737. hunks.push(hunk);
  11738. oldRangeStart = 0;
  11739. newRangeStart = 0;
  11740. curRange = [];
  11741. }
  11742. }
  11743. oldLine += lines.length;
  11744. newLine += lines.length;
  11745. }
  11746. };
  11747. for (var i = 0; i < diff.length; i++) {
  11748. _loop(i);
  11749. }
  11750. return {
  11751. oldFileName,
  11752. newFileName,
  11753. oldHeader,
  11754. newHeader,
  11755. hunks
  11756. };
  11757. }
  11758. function formatPatch(diff) {
  11759. var ret = [];
  11760. if (diff.oldFileName == diff.newFileName) {
  11761. ret.push("Index: " + diff.oldFileName);
  11762. }
  11763. ret.push("===================================================================");
  11764. ret.push("--- " + diff.oldFileName + (typeof diff.oldHeader === "undefined" ? "" : " " + diff.oldHeader));
  11765. ret.push("+++ " + diff.newFileName + (typeof diff.newHeader === "undefined" ? "" : " " + diff.newHeader));
  11766. for (var i = 0; i < diff.hunks.length; i++) {
  11767. var hunk = diff.hunks[i];
  11768. if (hunk.oldLines === 0) {
  11769. hunk.oldStart -= 1;
  11770. }
  11771. if (hunk.newLines === 0) {
  11772. hunk.newStart -= 1;
  11773. }
  11774. ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@");
  11775. ret.push.apply(ret, hunk.lines);
  11776. }
  11777. return ret.join("\n") + "\n";
  11778. }
  11779. function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
  11780. return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
  11781. }
  11782. function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
  11783. return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
  11784. }
  11785. }
  11786. });
  11787. var require_format = __commonJS2({
  11788. "src/cli/format.js"(exports2, module2) {
  11789. "use strict";
  11790. var {
  11791. promises: fs
  11792. } = require("fs");
  11793. var path = require("path");
  11794. var {
  11795. default: chalk
  11796. } = require_chalk();
  11797. var prettier2 = require("./index.js");
  11798. var {
  11799. getStdin
  11800. } = require("./third-party.js");
  11801. var {
  11802. createIgnorer,
  11803. errors
  11804. } = require_prettier_internal();
  11805. var {
  11806. expandPatterns,
  11807. fixWindowsSlashes
  11808. } = require_expand_patterns();
  11809. var getOptionsForFile = require_get_options_for_file();
  11810. var isTTY = require_is_tty();
  11811. function diff(a, b) {
  11812. return require_create().createTwoFilesPatch("", "", a, b, "", "", {
  11813. context: 2
  11814. });
  11815. }
  11816. function handleError(context, filename, error, printedFilename) {
  11817. if (error instanceof errors.UndefinedParserError) {
  11818. if ((context.argv.write || context.argv.ignoreUnknown) && printedFilename) {
  11819. printedFilename.clear();
  11820. }
  11821. if (context.argv.ignoreUnknown) {
  11822. return;
  11823. }
  11824. if (!context.argv.check && !context.argv.listDifferent) {
  11825. process.exitCode = 2;
  11826. }
  11827. context.logger.error(error.message);
  11828. return;
  11829. }
  11830. if (context.argv.write) {
  11831. process.stdout.write("\n");
  11832. }
  11833. const isParseError = Boolean(error && error.loc);
  11834. const isValidationError = /^Invalid \S+ value\./.test(error && error.message);
  11835. if (isParseError) {
  11836. context.logger.error(`${filename}: ${String(error)}`);
  11837. } else if (isValidationError || error instanceof errors.ConfigError) {
  11838. context.logger.error(error.message);
  11839. process.exit(1);
  11840. } else if (error instanceof errors.DebugError) {
  11841. context.logger.error(`${filename}: ${error.message}`);
  11842. } else {
  11843. context.logger.error(filename + ": " + (error.stack || error));
  11844. }
  11845. process.exitCode = 2;
  11846. }
  11847. function writeOutput(context, result, options) {
  11848. process.stdout.write(context.argv.debugCheck ? result.filepath : result.formatted);
  11849. if (options && options.cursorOffset >= 0) {
  11850. process.stderr.write(result.cursorOffset + "\n");
  11851. }
  11852. }
  11853. function listDifferent(context, input, options, filename) {
  11854. if (!context.argv.check && !context.argv.listDifferent) {
  11855. return;
  11856. }
  11857. try {
  11858. if (!options.filepath && !options.parser) {
  11859. throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser.");
  11860. }
  11861. if (!prettier2.check(input, options)) {
  11862. if (!context.argv.write) {
  11863. context.logger.log(filename);
  11864. process.exitCode = 1;
  11865. }
  11866. }
  11867. } catch (error) {
  11868. context.logger.error(error.message);
  11869. }
  11870. return true;
  11871. }
  11872. function format(context, input, opt) {
  11873. if (!opt.parser && !opt.filepath) {
  11874. throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser.");
  11875. }
  11876. if (context.argv.debugPrintDoc) {
  11877. const doc = prettier2.__debug.printToDoc(input, opt);
  11878. return {
  11879. formatted: prettier2.__debug.formatDoc(doc) + "\n"
  11880. };
  11881. }
  11882. if (context.argv.debugPrintComments) {
  11883. return {
  11884. formatted: prettier2.format(JSON.stringify(prettier2.formatWithCursor(input, opt).comments || []), {
  11885. parser: "json"
  11886. })
  11887. };
  11888. }
  11889. if (context.argv.debugPrintAst) {
  11890. const {
  11891. ast
  11892. } = prettier2.__debug.parse(input, opt);
  11893. return {
  11894. formatted: JSON.stringify(ast)
  11895. };
  11896. }
  11897. if (context.argv.debugCheck) {
  11898. const pp = prettier2.format(input, opt);
  11899. const pppp = prettier2.format(pp, opt);
  11900. if (pp !== pppp) {
  11901. throw new errors.DebugError("prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp));
  11902. } else {
  11903. const stringify2 = (obj) => JSON.stringify(obj, null, 2);
  11904. const ast = stringify2(prettier2.__debug.parse(input, opt, true).ast);
  11905. const past = stringify2(prettier2.__debug.parse(pp, opt, true).ast);
  11906. if (ast !== past) {
  11907. const MAX_AST_SIZE = 2097152;
  11908. const astDiff = ast.length > MAX_AST_SIZE || past.length > MAX_AST_SIZE ? "AST diff too large to render" : diff(ast, past);
  11909. throw new errors.DebugError("ast(input) !== ast(prettier(input))\n" + astDiff + "\n" + diff(input, pp));
  11910. }
  11911. }
  11912. return {
  11913. formatted: pp,
  11914. filepath: opt.filepath || "(stdin)\n"
  11915. };
  11916. }
  11917. if (context.argv.debugBenchmark) {
  11918. let benchmark;
  11919. try {
  11920. benchmark = require("benchmark");
  11921. } catch {
  11922. context.logger.debug("'--debug-benchmark' requires the 'benchmark' package to be installed.");
  11923. process.exit(2);
  11924. }
  11925. context.logger.debug("'--debug-benchmark' option found, measuring formatWithCursor with 'benchmark' module.");
  11926. const suite = new benchmark.Suite();
  11927. suite.add("format", () => {
  11928. prettier2.formatWithCursor(input, opt);
  11929. }).on("cycle", (event) => {
  11930. const results = {
  11931. benchmark: String(event.target),
  11932. hz: event.target.hz,
  11933. ms: event.target.times.cycle * 1e3
  11934. };
  11935. context.logger.debug("'--debug-benchmark' measurements for formatWithCursor: " + JSON.stringify(results, null, 2));
  11936. }).run({
  11937. async: false
  11938. });
  11939. } else if (context.argv.debugRepeat > 0) {
  11940. const repeat = context.argv.debugRepeat;
  11941. context.logger.debug("'--debug-repeat' option found, running formatWithCursor " + repeat + " times.");
  11942. let totalMs = 0;
  11943. for (let i = 0; i < repeat; ++i) {
  11944. const startMs = Date.now();
  11945. prettier2.formatWithCursor(input, opt);
  11946. totalMs += Date.now() - startMs;
  11947. }
  11948. const averageMs = totalMs / repeat;
  11949. const results = {
  11950. repeat,
  11951. hz: 1e3 / averageMs,
  11952. ms: averageMs
  11953. };
  11954. context.logger.debug("'--debug-repeat' measurements for formatWithCursor: " + JSON.stringify(results, null, 2));
  11955. }
  11956. return prettier2.formatWithCursor(input, opt);
  11957. }
  11958. async function createIgnorerFromContextOrDie(context) {
  11959. try {
  11960. return await createIgnorer(context.argv.ignorePath, context.argv.withNodeModules);
  11961. } catch (e) {
  11962. context.logger.error(e.message);
  11963. process.exit(2);
  11964. }
  11965. }
  11966. async function formatStdin2(context) {
  11967. const filepath = context.argv.filepath ? path.resolve(process.cwd(), context.argv.filepath) : process.cwd();
  11968. const ignorer = await createIgnorerFromContextOrDie(context);
  11969. const relativeFilepath = context.argv.ignorePath ? path.relative(path.dirname(context.argv.ignorePath), filepath) : path.relative(process.cwd(), filepath);
  11970. try {
  11971. const input = await getStdin();
  11972. if (relativeFilepath && ignorer.ignores(fixWindowsSlashes(relativeFilepath))) {
  11973. writeOutput(context, {
  11974. formatted: input
  11975. });
  11976. return;
  11977. }
  11978. const options = await getOptionsForFile(context, filepath);
  11979. if (listDifferent(context, input, options, "(stdin)")) {
  11980. return;
  11981. }
  11982. writeOutput(context, format(context, input, options), options);
  11983. } catch (error) {
  11984. handleError(context, relativeFilepath || "stdin", error);
  11985. }
  11986. }
  11987. async function formatFiles2(context) {
  11988. const ignorer = await createIgnorerFromContextOrDie(context);
  11989. let numberOfUnformattedFilesFound = 0;
  11990. if (context.argv.check) {
  11991. context.logger.log("Checking formatting...");
  11992. }
  11993. for await (const pathOrError of expandPatterns(context)) {
  11994. if (typeof pathOrError === "object") {
  11995. context.logger.error(pathOrError.error);
  11996. process.exitCode = 2;
  11997. continue;
  11998. }
  11999. const filename = pathOrError;
  12000. const ignoreFilename = context.argv.ignorePath ? path.relative(path.dirname(context.argv.ignorePath), filename) : filename;
  12001. const fileIgnored = ignorer.ignores(fixWindowsSlashes(ignoreFilename));
  12002. if (fileIgnored && (context.argv.debugCheck || context.argv.write || context.argv.check || context.argv.listDifferent)) {
  12003. continue;
  12004. }
  12005. const options = Object.assign(Object.assign({}, await getOptionsForFile(context, filename)), {}, {
  12006. filepath: filename
  12007. });
  12008. let printedFilename;
  12009. if (isTTY()) {
  12010. printedFilename = context.logger.log(filename, {
  12011. newline: false,
  12012. clearable: true
  12013. });
  12014. }
  12015. let input;
  12016. try {
  12017. input = await fs.readFile(filename, "utf8");
  12018. } catch (error) {
  12019. context.logger.log("");
  12020. context.logger.error(`Unable to read file: ${filename}
  12021. ${error.message}`);
  12022. process.exitCode = 2;
  12023. continue;
  12024. }
  12025. if (fileIgnored) {
  12026. writeOutput(context, {
  12027. formatted: input
  12028. }, options);
  12029. continue;
  12030. }
  12031. const start = Date.now();
  12032. let result;
  12033. let output;
  12034. try {
  12035. result = format(context, input, options);
  12036. output = result.formatted;
  12037. } catch (error) {
  12038. handleError(context, filename, error, printedFilename);
  12039. continue;
  12040. }
  12041. const isDifferent = output !== input;
  12042. if (printedFilename) {
  12043. printedFilename.clear();
  12044. }
  12045. if (context.argv.write) {
  12046. if (isDifferent) {
  12047. if (!context.argv.check && !context.argv.listDifferent) {
  12048. context.logger.log(`${filename} ${Date.now() - start}ms`);
  12049. }
  12050. try {
  12051. await fs.writeFile(filename, output, "utf8");
  12052. } catch (error) {
  12053. context.logger.error(`Unable to write file: ${filename}
  12054. ${error.message}`);
  12055. process.exitCode = 2;
  12056. }
  12057. } else if (!context.argv.check && !context.argv.listDifferent) {
  12058. context.logger.log(`${chalk.grey(filename)} ${Date.now() - start}ms`);
  12059. }
  12060. } else if (context.argv.debugCheck) {
  12061. if (result.filepath) {
  12062. context.logger.log(result.filepath);
  12063. } else {
  12064. process.exitCode = 2;
  12065. }
  12066. } else if (!context.argv.check && !context.argv.listDifferent) {
  12067. writeOutput(context, result, options);
  12068. }
  12069. if (isDifferent) {
  12070. if (context.argv.check) {
  12071. context.logger.warn(filename);
  12072. } else if (context.argv.listDifferent) {
  12073. context.logger.log(filename);
  12074. }
  12075. numberOfUnformattedFilesFound += 1;
  12076. }
  12077. }
  12078. if (context.argv.check) {
  12079. if (numberOfUnformattedFilesFound === 0) {
  12080. context.logger.log("All matched files use Prettier code style!");
  12081. } else {
  12082. context.logger.warn(context.argv.write ? "Code style issues fixed in the above file(s)." : "Code style issues found in the above file(s). Forgot to run Prettier?");
  12083. }
  12084. }
  12085. if ((context.argv.check || context.argv.listDifferent) && numberOfUnformattedFilesFound > 0 && !process.exitCode && !context.argv.write) {
  12086. process.exitCode = 1;
  12087. }
  12088. }
  12089. module2.exports = {
  12090. formatStdin: formatStdin2,
  12091. formatFiles: formatFiles2
  12092. };
  12093. }
  12094. });
  12095. var require_utils5 = __commonJS2({
  12096. "src/cli/utils.js"(exports2, module2) {
  12097. "use strict";
  12098. var printToScreen2 = console.log.bind(console);
  12099. module2.exports = {
  12100. printToScreen: printToScreen2
  12101. };
  12102. }
  12103. });
  12104. var require_file_info = __commonJS2({
  12105. "src/cli/file-info.js"(exports2, module2) {
  12106. "use strict";
  12107. var stringify2 = require_fast_json_stable_stringify();
  12108. var prettier2 = require("./index.js");
  12109. var {
  12110. printToScreen: printToScreen2
  12111. } = require_utils5();
  12112. async function logFileInfoOrDie2(context) {
  12113. const {
  12114. fileInfo: file,
  12115. ignorePath,
  12116. withNodeModules,
  12117. plugins,
  12118. pluginSearchDirs,
  12119. config
  12120. } = context.argv;
  12121. const fileInfo = await prettier2.getFileInfo(file, {
  12122. ignorePath,
  12123. withNodeModules,
  12124. plugins,
  12125. pluginSearchDirs,
  12126. resolveConfig: config !== false
  12127. });
  12128. printToScreen2(prettier2.format(stringify2(fileInfo), {
  12129. parser: "json"
  12130. }));
  12131. }
  12132. module2.exports = logFileInfoOrDie2;
  12133. }
  12134. });
  12135. var require_find_config_path = __commonJS2({
  12136. "src/cli/find-config-path.js"(exports2, module2) {
  12137. "use strict";
  12138. var path = require("path");
  12139. var prettier2 = require("./index.js");
  12140. var {
  12141. printToScreen: printToScreen2
  12142. } = require_utils5();
  12143. async function logResolvedConfigPathOrDie2(context) {
  12144. const file = context.argv.findConfigPath;
  12145. const configFile = await prettier2.resolveConfigFile(file);
  12146. if (configFile) {
  12147. printToScreen2(path.relative(process.cwd(), configFile));
  12148. } else {
  12149. throw new Error(`Can not find configure file for "${file}"`);
  12150. }
  12151. }
  12152. module2.exports = logResolvedConfigPathOrDie2;
  12153. }
  12154. });
  12155. var stringify = require_fast_json_stable_stringify();
  12156. var prettier = require("./index.js");
  12157. var createLogger = require_logger();
  12158. var Context = require_context();
  12159. var {
  12160. parseArgvWithoutPlugins
  12161. } = require_parse_cli_arguments();
  12162. var {
  12163. createDetailedUsage,
  12164. createUsage
  12165. } = require_usage();
  12166. var {
  12167. formatStdin,
  12168. formatFiles
  12169. } = require_format();
  12170. var logFileInfoOrDie = require_file_info();
  12171. var logResolvedConfigPathOrDie = require_find_config_path();
  12172. var {
  12173. utils: {
  12174. isNonEmptyArray
  12175. }
  12176. } = require_prettier_internal();
  12177. var {
  12178. printToScreen
  12179. } = require_utils5();
  12180. async function run(rawArguments) {
  12181. let logger = createLogger();
  12182. try {
  12183. const logLevel = parseArgvWithoutPlugins(rawArguments, logger, "loglevel").loglevel;
  12184. if (logLevel !== logger.logLevel) {
  12185. logger = createLogger(logLevel);
  12186. }
  12187. await main(rawArguments, logger);
  12188. } catch (error) {
  12189. logger.error(error.message);
  12190. process.exitCode = 1;
  12191. }
  12192. }
  12193. async function main(rawArguments, logger) {
  12194. const context = new Context({
  12195. rawArguments,
  12196. logger
  12197. });
  12198. logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`);
  12199. if (context.argv.pluginSearch === false) {
  12200. const rawPluginSearchDirs = context.argv.__raw["plugin-search-dir"];
  12201. if (typeof rawPluginSearchDirs === "string" || isNonEmptyArray(rawPluginSearchDirs)) {
  12202. throw new Error("Cannot use --no-plugin-search and --plugin-search-dir together.");
  12203. }
  12204. }
  12205. if (context.argv.check && context.argv.listDifferent) {
  12206. throw new Error("Cannot use --check and --list-different together.");
  12207. }
  12208. if (context.argv.write && context.argv.debugCheck) {
  12209. throw new Error("Cannot use --write and --debug-check together.");
  12210. }
  12211. if (context.argv.findConfigPath && context.filePatterns.length > 0) {
  12212. throw new Error("Cannot use --find-config-path with multiple files");
  12213. }
  12214. if (context.argv.fileInfo && context.filePatterns.length > 0) {
  12215. throw new Error("Cannot use --file-info with multiple files");
  12216. }
  12217. if (context.argv.version) {
  12218. printToScreen(prettier.version);
  12219. return;
  12220. }
  12221. if (context.argv.help !== void 0) {
  12222. printToScreen(typeof context.argv.help === "string" && context.argv.help !== "" ? createDetailedUsage(context, context.argv.help) : createUsage(context));
  12223. return;
  12224. }
  12225. if (context.argv.supportInfo) {
  12226. printToScreen(prettier.format(stringify(prettier.getSupportInfo()), {
  12227. parser: "json"
  12228. }));
  12229. return;
  12230. }
  12231. const hasFilePatterns = context.filePatterns.length > 0;
  12232. const useStdin = !hasFilePatterns && (!process.stdin.isTTY || context.argv.filePath);
  12233. if (context.argv.findConfigPath) {
  12234. await logResolvedConfigPathOrDie(context);
  12235. } else if (context.argv.fileInfo) {
  12236. await logFileInfoOrDie(context);
  12237. } else if (useStdin) {
  12238. await formatStdin(context);
  12239. } else if (hasFilePatterns) {
  12240. await formatFiles(context);
  12241. } else {
  12242. process.exitCode = 1;
  12243. printToScreen(createUsage(context));
  12244. }
  12245. }
  12246. module.exports = {
  12247. run
  12248. };