1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335 |
- "use strict";
- var __getOwnPropNames = Object.getOwnPropertyNames;
- var __commonJS = (cb, mod) => function __require() {
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
- };
- // node_modules/core-js/internals/global.js
- var require_global = __commonJS({
- "node_modules/core-js/internals/global.js"(exports2, module2) {
- var check = function(it) {
- return it && it.Math == Math && it;
- };
- module2.exports = check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || check(typeof self == "object" && self) || check(typeof global == "object" && global) || function() {
- return this;
- }() || Function("return this")();
- }
- });
- // node_modules/core-js/internals/fails.js
- var require_fails = __commonJS({
- "node_modules/core-js/internals/fails.js"(exports2, module2) {
- module2.exports = function(exec) {
- try {
- return !!exec();
- } catch (error) {
- return true;
- }
- };
- }
- });
- // node_modules/core-js/internals/descriptors.js
- var require_descriptors = __commonJS({
- "node_modules/core-js/internals/descriptors.js"(exports2, module2) {
- var fails = require_fails();
- module2.exports = !fails(function() {
- return Object.defineProperty({}, 1, { get: function() {
- return 7;
- } })[1] != 7;
- });
- }
- });
- // node_modules/core-js/internals/function-bind-native.js
- var require_function_bind_native = __commonJS({
- "node_modules/core-js/internals/function-bind-native.js"(exports2, module2) {
- var fails = require_fails();
- module2.exports = !fails(function() {
- var test = function() {
- }.bind();
- return typeof test != "function" || test.hasOwnProperty("prototype");
- });
- }
- });
- // node_modules/core-js/internals/function-call.js
- var require_function_call = __commonJS({
- "node_modules/core-js/internals/function-call.js"(exports2, module2) {
- var NATIVE_BIND = require_function_bind_native();
- var call = Function.prototype.call;
- module2.exports = NATIVE_BIND ? call.bind(call) : function() {
- return call.apply(call, arguments);
- };
- }
- });
- // node_modules/core-js/internals/object-property-is-enumerable.js
- var require_object_property_is_enumerable = __commonJS({
- "node_modules/core-js/internals/object-property-is-enumerable.js"(exports2) {
- "use strict";
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
- exports2.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
- var descriptor = getOwnPropertyDescriptor(this, V);
- return !!descriptor && descriptor.enumerable;
- } : $propertyIsEnumerable;
- }
- });
- // node_modules/core-js/internals/create-property-descriptor.js
- var require_create_property_descriptor = __commonJS({
- "node_modules/core-js/internals/create-property-descriptor.js"(exports2, module2) {
- module2.exports = function(bitmap, value) {
- return {
- enumerable: !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value
- };
- };
- }
- });
- // node_modules/core-js/internals/function-uncurry-this.js
- var require_function_uncurry_this = __commonJS({
- "node_modules/core-js/internals/function-uncurry-this.js"(exports2, module2) {
- var NATIVE_BIND = require_function_bind_native();
- var FunctionPrototype = Function.prototype;
- var bind = FunctionPrototype.bind;
- var call = FunctionPrototype.call;
- var uncurryThis = NATIVE_BIND && bind.bind(call, call);
- module2.exports = NATIVE_BIND ? function(fn) {
- return fn && uncurryThis(fn);
- } : function(fn) {
- return fn && function() {
- return call.apply(fn, arguments);
- };
- };
- }
- });
- // node_modules/core-js/internals/classof-raw.js
- var require_classof_raw = __commonJS({
- "node_modules/core-js/internals/classof-raw.js"(exports2, module2) {
- var uncurryThis = require_function_uncurry_this();
- var toString = uncurryThis({}.toString);
- var stringSlice = uncurryThis("".slice);
- module2.exports = function(it) {
- return stringSlice(toString(it), 8, -1);
- };
- }
- });
- // node_modules/core-js/internals/indexed-object.js
- var require_indexed_object = __commonJS({
- "node_modules/core-js/internals/indexed-object.js"(exports2, module2) {
- var global2 = require_global();
- var uncurryThis = require_function_uncurry_this();
- var fails = require_fails();
- var classof = require_classof_raw();
- var Object2 = global2.Object;
- var split = uncurryThis("".split);
- module2.exports = fails(function() {
- return !Object2("z").propertyIsEnumerable(0);
- }) ? function(it) {
- return classof(it) == "String" ? split(it, "") : Object2(it);
- } : Object2;
- }
- });
- // node_modules/core-js/internals/require-object-coercible.js
- var require_require_object_coercible = __commonJS({
- "node_modules/core-js/internals/require-object-coercible.js"(exports2, module2) {
- var global2 = require_global();
- var TypeError2 = global2.TypeError;
- module2.exports = function(it) {
- if (it == void 0)
- throw TypeError2("Can't call method on " + it);
- return it;
- };
- }
- });
- // node_modules/core-js/internals/to-indexed-object.js
- var require_to_indexed_object = __commonJS({
- "node_modules/core-js/internals/to-indexed-object.js"(exports2, module2) {
- var IndexedObject = require_indexed_object();
- var requireObjectCoercible = require_require_object_coercible();
- module2.exports = function(it) {
- return IndexedObject(requireObjectCoercible(it));
- };
- }
- });
- // node_modules/core-js/internals/is-callable.js
- var require_is_callable = __commonJS({
- "node_modules/core-js/internals/is-callable.js"(exports2, module2) {
- module2.exports = function(argument) {
- return typeof argument == "function";
- };
- }
- });
- // node_modules/core-js/internals/is-object.js
- var require_is_object = __commonJS({
- "node_modules/core-js/internals/is-object.js"(exports2, module2) {
- var isCallable = require_is_callable();
- module2.exports = function(it) {
- return typeof it == "object" ? it !== null : isCallable(it);
- };
- }
- });
- // node_modules/core-js/internals/get-built-in.js
- var require_get_built_in = __commonJS({
- "node_modules/core-js/internals/get-built-in.js"(exports2, module2) {
- var global2 = require_global();
- var isCallable = require_is_callable();
- var aFunction = function(argument) {
- return isCallable(argument) ? argument : void 0;
- };
- module2.exports = function(namespace, method) {
- return arguments.length < 2 ? aFunction(global2[namespace]) : global2[namespace] && global2[namespace][method];
- };
- }
- });
- // node_modules/core-js/internals/object-is-prototype-of.js
- var require_object_is_prototype_of = __commonJS({
- "node_modules/core-js/internals/object-is-prototype-of.js"(exports2, module2) {
- var uncurryThis = require_function_uncurry_this();
- module2.exports = uncurryThis({}.isPrototypeOf);
- }
- });
- // node_modules/core-js/internals/engine-user-agent.js
- var require_engine_user_agent = __commonJS({
- "node_modules/core-js/internals/engine-user-agent.js"(exports2, module2) {
- var getBuiltIn = require_get_built_in();
- module2.exports = getBuiltIn("navigator", "userAgent") || "";
- }
- });
- // node_modules/core-js/internals/engine-v8-version.js
- var require_engine_v8_version = __commonJS({
- "node_modules/core-js/internals/engine-v8-version.js"(exports2, module2) {
- var global2 = require_global();
- var userAgent = require_engine_user_agent();
- var process2 = global2.process;
- var Deno = global2.Deno;
- var versions = process2 && process2.versions || Deno && Deno.version;
- var v8 = versions && versions.v8;
- var match;
- var version;
- if (v8) {
- match = v8.split(".");
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
- }
- if (!version && userAgent) {
- match = userAgent.match(/Edge\/(\d+)/);
- if (!match || match[1] >= 74) {
- match = userAgent.match(/Chrome\/(\d+)/);
- if (match)
- version = +match[1];
- }
- }
- module2.exports = version;
- }
- });
- // node_modules/core-js/internals/native-symbol.js
- var require_native_symbol = __commonJS({
- "node_modules/core-js/internals/native-symbol.js"(exports2, module2) {
- var V8_VERSION = require_engine_v8_version();
- var fails = require_fails();
- module2.exports = !!Object.getOwnPropertySymbols && !fails(function() {
- var symbol = Symbol();
- return !String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;
- });
- }
- });
- // node_modules/core-js/internals/use-symbol-as-uid.js
- var require_use_symbol_as_uid = __commonJS({
- "node_modules/core-js/internals/use-symbol-as-uid.js"(exports2, module2) {
- var NATIVE_SYMBOL = require_native_symbol();
- module2.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
- }
- });
- // node_modules/core-js/internals/is-symbol.js
- var require_is_symbol = __commonJS({
- "node_modules/core-js/internals/is-symbol.js"(exports2, module2) {
- var global2 = require_global();
- var getBuiltIn = require_get_built_in();
- var isCallable = require_is_callable();
- var isPrototypeOf = require_object_is_prototype_of();
- var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
- var Object2 = global2.Object;
- module2.exports = USE_SYMBOL_AS_UID ? function(it) {
- return typeof it == "symbol";
- } : function(it) {
- var $Symbol = getBuiltIn("Symbol");
- return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object2(it));
- };
- }
- });
- // node_modules/core-js/internals/try-to-string.js
- var require_try_to_string = __commonJS({
- "node_modules/core-js/internals/try-to-string.js"(exports2, module2) {
- var global2 = require_global();
- var String2 = global2.String;
- module2.exports = function(argument) {
- try {
- return String2(argument);
- } catch (error) {
- return "Object";
- }
- };
- }
- });
- // node_modules/core-js/internals/a-callable.js
- var require_a_callable = __commonJS({
- "node_modules/core-js/internals/a-callable.js"(exports2, module2) {
- var global2 = require_global();
- var isCallable = require_is_callable();
- var tryToString = require_try_to_string();
- var TypeError2 = global2.TypeError;
- module2.exports = function(argument) {
- if (isCallable(argument))
- return argument;
- throw TypeError2(tryToString(argument) + " is not a function");
- };
- }
- });
- // node_modules/core-js/internals/get-method.js
- var require_get_method = __commonJS({
- "node_modules/core-js/internals/get-method.js"(exports2, module2) {
- var aCallable = require_a_callable();
- module2.exports = function(V, P) {
- var func = V[P];
- return func == null ? void 0 : aCallable(func);
- };
- }
- });
- // node_modules/core-js/internals/ordinary-to-primitive.js
- var require_ordinary_to_primitive = __commonJS({
- "node_modules/core-js/internals/ordinary-to-primitive.js"(exports2, module2) {
- var global2 = require_global();
- var call = require_function_call();
- var isCallable = require_is_callable();
- var isObject = require_is_object();
- var TypeError2 = global2.TypeError;
- module2.exports = function(input, pref) {
- var fn, val;
- if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
- return val;
- if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input)))
- return val;
- if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
- return val;
- throw TypeError2("Can't convert object to primitive value");
- };
- }
- });
- // node_modules/core-js/internals/is-pure.js
- var require_is_pure = __commonJS({
- "node_modules/core-js/internals/is-pure.js"(exports2, module2) {
- module2.exports = false;
- }
- });
- // node_modules/core-js/internals/set-global.js
- var require_set_global = __commonJS({
- "node_modules/core-js/internals/set-global.js"(exports2, module2) {
- var global2 = require_global();
- var defineProperty = Object.defineProperty;
- module2.exports = function(key, value) {
- try {
- defineProperty(global2, key, { value, configurable: true, writable: true });
- } catch (error) {
- global2[key] = value;
- }
- return value;
- };
- }
- });
- // node_modules/core-js/internals/shared-store.js
- var require_shared_store = __commonJS({
- "node_modules/core-js/internals/shared-store.js"(exports2, module2) {
- var global2 = require_global();
- var setGlobal = require_set_global();
- var SHARED = "__core-js_shared__";
- var store = global2[SHARED] || setGlobal(SHARED, {});
- module2.exports = store;
- }
- });
- // node_modules/core-js/internals/shared.js
- var require_shared = __commonJS({
- "node_modules/core-js/internals/shared.js"(exports2, module2) {
- var IS_PURE = require_is_pure();
- var store = require_shared_store();
- (module2.exports = function(key, value) {
- return store[key] || (store[key] = value !== void 0 ? value : {});
- })("versions", []).push({
- version: "3.21.1",
- mode: IS_PURE ? "pure" : "global",
- copyright: "\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",
- license: "https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",
- source: "https://github.com/zloirock/core-js"
- });
- }
- });
- // node_modules/core-js/internals/to-object.js
- var require_to_object = __commonJS({
- "node_modules/core-js/internals/to-object.js"(exports2, module2) {
- var global2 = require_global();
- var requireObjectCoercible = require_require_object_coercible();
- var Object2 = global2.Object;
- module2.exports = function(argument) {
- return Object2(requireObjectCoercible(argument));
- };
- }
- });
- // node_modules/core-js/internals/has-own-property.js
- var require_has_own_property = __commonJS({
- "node_modules/core-js/internals/has-own-property.js"(exports2, module2) {
- var uncurryThis = require_function_uncurry_this();
- var toObject = require_to_object();
- var hasOwnProperty = uncurryThis({}.hasOwnProperty);
- module2.exports = Object.hasOwn || function hasOwn(it, key) {
- return hasOwnProperty(toObject(it), key);
- };
- }
- });
- // node_modules/core-js/internals/uid.js
- var require_uid = __commonJS({
- "node_modules/core-js/internals/uid.js"(exports2, module2) {
- var uncurryThis = require_function_uncurry_this();
- var id = 0;
- var postfix = Math.random();
- var toString = uncurryThis(1 .toString);
- module2.exports = function(key) {
- return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
- };
- }
- });
- // node_modules/core-js/internals/well-known-symbol.js
- var require_well_known_symbol = __commonJS({
- "node_modules/core-js/internals/well-known-symbol.js"(exports2, module2) {
- var global2 = require_global();
- var shared = require_shared();
- var hasOwn = require_has_own_property();
- var uid = require_uid();
- var NATIVE_SYMBOL = require_native_symbol();
- var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
- var WellKnownSymbolsStore = shared("wks");
- var Symbol2 = global2.Symbol;
- var symbolFor = Symbol2 && Symbol2["for"];
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
- module2.exports = function(name) {
- if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == "string")) {
- var description = "Symbol." + name;
- if (NATIVE_SYMBOL && hasOwn(Symbol2, name)) {
- WellKnownSymbolsStore[name] = Symbol2[name];
- } else if (USE_SYMBOL_AS_UID && symbolFor) {
- WellKnownSymbolsStore[name] = symbolFor(description);
- } else {
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
- }
- }
- return WellKnownSymbolsStore[name];
- };
- }
- });
- // node_modules/core-js/internals/to-primitive.js
- var require_to_primitive = __commonJS({
- "node_modules/core-js/internals/to-primitive.js"(exports2, module2) {
- var global2 = require_global();
- var call = require_function_call();
- var isObject = require_is_object();
- var isSymbol = require_is_symbol();
- var getMethod = require_get_method();
- var ordinaryToPrimitive = require_ordinary_to_primitive();
- var wellKnownSymbol = require_well_known_symbol();
- var TypeError2 = global2.TypeError;
- var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
- module2.exports = function(input, pref) {
- if (!isObject(input) || isSymbol(input))
- return input;
- var exoticToPrim = getMethod(input, TO_PRIMITIVE);
- var result;
- if (exoticToPrim) {
- if (pref === void 0)
- pref = "default";
- result = call(exoticToPrim, input, pref);
- if (!isObject(result) || isSymbol(result))
- return result;
- throw TypeError2("Can't convert object to primitive value");
- }
- if (pref === void 0)
- pref = "number";
- return ordinaryToPrimitive(input, pref);
- };
- }
- });
- // node_modules/core-js/internals/to-property-key.js
- var require_to_property_key = __commonJS({
- "node_modules/core-js/internals/to-property-key.js"(exports2, module2) {
- var toPrimitive = require_to_primitive();
- var isSymbol = require_is_symbol();
- module2.exports = function(argument) {
- var key = toPrimitive(argument, "string");
- return isSymbol(key) ? key : key + "";
- };
- }
- });
- // node_modules/core-js/internals/document-create-element.js
- var require_document_create_element = __commonJS({
- "node_modules/core-js/internals/document-create-element.js"(exports2, module2) {
- var global2 = require_global();
- var isObject = require_is_object();
- var document = global2.document;
- var EXISTS = isObject(document) && isObject(document.createElement);
- module2.exports = function(it) {
- return EXISTS ? document.createElement(it) : {};
- };
- }
- });
- // node_modules/core-js/internals/ie8-dom-define.js
- var require_ie8_dom_define = __commonJS({
- "node_modules/core-js/internals/ie8-dom-define.js"(exports2, module2) {
- var DESCRIPTORS = require_descriptors();
- var fails = require_fails();
- var createElement = require_document_create_element();
- module2.exports = !DESCRIPTORS && !fails(function() {
- return Object.defineProperty(createElement("div"), "a", {
- get: function() {
- return 7;
- }
- }).a != 7;
- });
- }
- });
- // node_modules/core-js/internals/object-get-own-property-descriptor.js
- var require_object_get_own_property_descriptor = __commonJS({
- "node_modules/core-js/internals/object-get-own-property-descriptor.js"(exports2) {
- var DESCRIPTORS = require_descriptors();
- var call = require_function_call();
- var propertyIsEnumerableModule = require_object_property_is_enumerable();
- var createPropertyDescriptor = require_create_property_descriptor();
- var toIndexedObject = require_to_indexed_object();
- var toPropertyKey = require_to_property_key();
- var hasOwn = require_has_own_property();
- var IE8_DOM_DEFINE = require_ie8_dom_define();
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- exports2.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
- O = toIndexedObject(O);
- P = toPropertyKey(P);
- if (IE8_DOM_DEFINE)
- try {
- return $getOwnPropertyDescriptor(O, P);
- } catch (error) {
- }
- if (hasOwn(O, P))
- return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
- };
- }
- });
- // node_modules/core-js/internals/v8-prototype-define-bug.js
- var require_v8_prototype_define_bug = __commonJS({
- "node_modules/core-js/internals/v8-prototype-define-bug.js"(exports2, module2) {
- var DESCRIPTORS = require_descriptors();
- var fails = require_fails();
- module2.exports = DESCRIPTORS && fails(function() {
- return Object.defineProperty(function() {
- }, "prototype", {
- value: 42,
- writable: false
- }).prototype != 42;
- });
- }
- });
- // node_modules/core-js/internals/an-object.js
- var require_an_object = __commonJS({
- "node_modules/core-js/internals/an-object.js"(exports2, module2) {
- var global2 = require_global();
- var isObject = require_is_object();
- var String2 = global2.String;
- var TypeError2 = global2.TypeError;
- module2.exports = function(argument) {
- if (isObject(argument))
- return argument;
- throw TypeError2(String2(argument) + " is not an object");
- };
- }
- });
- // node_modules/core-js/internals/object-define-property.js
- var require_object_define_property = __commonJS({
- "node_modules/core-js/internals/object-define-property.js"(exports2) {
- var global2 = require_global();
- var DESCRIPTORS = require_descriptors();
- var IE8_DOM_DEFINE = require_ie8_dom_define();
- var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
- var anObject = require_an_object();
- var toPropertyKey = require_to_property_key();
- var TypeError2 = global2.TypeError;
- var $defineProperty = Object.defineProperty;
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- var ENUMERABLE = "enumerable";
- var CONFIGURABLE = "configurable";
- var WRITABLE = "writable";
- exports2.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
- anObject(O);
- P = toPropertyKey(P);
- anObject(Attributes);
- if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
- var current = $getOwnPropertyDescriptor(O, P);
- if (current && current[WRITABLE]) {
- O[P] = Attributes.value;
- Attributes = {
- configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
- writable: false
- };
- }
- }
- return $defineProperty(O, P, Attributes);
- } : $defineProperty : function defineProperty(O, P, Attributes) {
- anObject(O);
- P = toPropertyKey(P);
- anObject(Attributes);
- if (IE8_DOM_DEFINE)
- try {
- return $defineProperty(O, P, Attributes);
- } catch (error) {
- }
- if ("get" in Attributes || "set" in Attributes)
- throw TypeError2("Accessors not supported");
- if ("value" in Attributes)
- O[P] = Attributes.value;
- return O;
- };
- }
- });
- // node_modules/core-js/internals/create-non-enumerable-property.js
- var require_create_non_enumerable_property = __commonJS({
- "node_modules/core-js/internals/create-non-enumerable-property.js"(exports2, module2) {
- var DESCRIPTORS = require_descriptors();
- var definePropertyModule = require_object_define_property();
- var createPropertyDescriptor = require_create_property_descriptor();
- module2.exports = DESCRIPTORS ? function(object, key, value) {
- return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
- } : function(object, key, value) {
- object[key] = value;
- return object;
- };
- }
- });
- // node_modules/core-js/internals/inspect-source.js
- var require_inspect_source = __commonJS({
- "node_modules/core-js/internals/inspect-source.js"(exports2, module2) {
- var uncurryThis = require_function_uncurry_this();
- var isCallable = require_is_callable();
- var store = require_shared_store();
- var functionToString = uncurryThis(Function.toString);
- if (!isCallable(store.inspectSource)) {
- store.inspectSource = function(it) {
- return functionToString(it);
- };
- }
- module2.exports = store.inspectSource;
- }
- });
- // node_modules/core-js/internals/native-weak-map.js
- var require_native_weak_map = __commonJS({
- "node_modules/core-js/internals/native-weak-map.js"(exports2, module2) {
- var global2 = require_global();
- var isCallable = require_is_callable();
- var inspectSource = require_inspect_source();
- var WeakMap2 = global2.WeakMap;
- module2.exports = isCallable(WeakMap2) && /native code/.test(inspectSource(WeakMap2));
- }
- });
- // node_modules/core-js/internals/shared-key.js
- var require_shared_key = __commonJS({
- "node_modules/core-js/internals/shared-key.js"(exports2, module2) {
- var shared = require_shared();
- var uid = require_uid();
- var keys = shared("keys");
- module2.exports = function(key) {
- return keys[key] || (keys[key] = uid(key));
- };
- }
- });
- // node_modules/core-js/internals/hidden-keys.js
- var require_hidden_keys = __commonJS({
- "node_modules/core-js/internals/hidden-keys.js"(exports2, module2) {
- module2.exports = {};
- }
- });
- // node_modules/core-js/internals/internal-state.js
- var require_internal_state = __commonJS({
- "node_modules/core-js/internals/internal-state.js"(exports2, module2) {
- var NATIVE_WEAK_MAP = require_native_weak_map();
- var global2 = require_global();
- var uncurryThis = require_function_uncurry_this();
- var isObject = require_is_object();
- var createNonEnumerableProperty = require_create_non_enumerable_property();
- var hasOwn = require_has_own_property();
- var shared = require_shared_store();
- var sharedKey = require_shared_key();
- var hiddenKeys = require_hidden_keys();
- var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
- var TypeError2 = global2.TypeError;
- var WeakMap2 = global2.WeakMap;
- var set;
- var get;
- var has;
- var enforce = function(it) {
- return has(it) ? get(it) : set(it, {});
- };
- var getterFor = function(TYPE) {
- return function(it) {
- var state;
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
- throw TypeError2("Incompatible receiver, " + TYPE + " required");
- }
- return state;
- };
- };
- if (NATIVE_WEAK_MAP || shared.state) {
- store = shared.state || (shared.state = new WeakMap2());
- wmget = uncurryThis(store.get);
- wmhas = uncurryThis(store.has);
- wmset = uncurryThis(store.set);
- set = function(it, metadata) {
- if (wmhas(store, it))
- throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
- metadata.facade = it;
- wmset(store, it, metadata);
- return metadata;
- };
- get = function(it) {
- return wmget(store, it) || {};
- };
- has = function(it) {
- return wmhas(store, it);
- };
- } else {
- STATE = sharedKey("state");
- hiddenKeys[STATE] = true;
- set = function(it, metadata) {
- if (hasOwn(it, STATE))
- throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
- metadata.facade = it;
- createNonEnumerableProperty(it, STATE, metadata);
- return metadata;
- };
- get = function(it) {
- return hasOwn(it, STATE) ? it[STATE] : {};
- };
- has = function(it) {
- return hasOwn(it, STATE);
- };
- }
- var store;
- var wmget;
- var wmhas;
- var wmset;
- var STATE;
- module2.exports = {
- set,
- get,
- has,
- enforce,
- getterFor
- };
- }
- });
- // node_modules/core-js/internals/function-name.js
- var require_function_name = __commonJS({
- "node_modules/core-js/internals/function-name.js"(exports2, module2) {
- var DESCRIPTORS = require_descriptors();
- var hasOwn = require_has_own_property();
- var FunctionPrototype = Function.prototype;
- var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
- var EXISTS = hasOwn(FunctionPrototype, "name");
- var PROPER = EXISTS && function something() {
- }.name === "something";
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, "name").configurable);
- module2.exports = {
- EXISTS,
- PROPER,
- CONFIGURABLE
- };
- }
- });
- // node_modules/core-js/internals/redefine.js
- var require_redefine = __commonJS({
- "node_modules/core-js/internals/redefine.js"(exports2, module2) {
- var global2 = require_global();
- var isCallable = require_is_callable();
- var hasOwn = require_has_own_property();
- var createNonEnumerableProperty = require_create_non_enumerable_property();
- var setGlobal = require_set_global();
- var inspectSource = require_inspect_source();
- var InternalStateModule = require_internal_state();
- var CONFIGURABLE_FUNCTION_NAME = require_function_name().CONFIGURABLE;
- var getInternalState = InternalStateModule.get;
- var enforceInternalState = InternalStateModule.enforce;
- var TEMPLATE = String(String).split("String");
- (module2.exports = function(O, key, value, options) {
- var unsafe = options ? !!options.unsafe : false;
- var simple = options ? !!options.enumerable : false;
- var noTargetGet = options ? !!options.noTargetGet : false;
- var name = options && options.name !== void 0 ? options.name : key;
- var state;
- if (isCallable(value)) {
- if (String(name).slice(0, 7) === "Symbol(") {
- name = "[" + String(name).replace(/^Symbol\(([^)]*)\)/, "$1") + "]";
- }
- if (!hasOwn(value, "name") || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
- createNonEnumerableProperty(value, "name", name);
- }
- state = enforceInternalState(value);
- if (!state.source) {
- state.source = TEMPLATE.join(typeof name == "string" ? name : "");
- }
- }
- if (O === global2) {
- if (simple)
- O[key] = value;
- else
- setGlobal(key, value);
- return;
- } else if (!unsafe) {
- delete O[key];
- } else if (!noTargetGet && O[key]) {
- simple = true;
- }
- if (simple)
- O[key] = value;
- else
- createNonEnumerableProperty(O, key, value);
- })(Function.prototype, "toString", function toString() {
- return isCallable(this) && getInternalState(this).source || inspectSource(this);
- });
- }
- });
- // node_modules/core-js/internals/to-integer-or-infinity.js
- var require_to_integer_or_infinity = __commonJS({
- "node_modules/core-js/internals/to-integer-or-infinity.js"(exports2, module2) {
- var ceil = Math.ceil;
- var floor = Math.floor;
- module2.exports = function(argument) {
- var number = +argument;
- return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
- };
- }
- });
- // node_modules/core-js/internals/to-absolute-index.js
- var require_to_absolute_index = __commonJS({
- "node_modules/core-js/internals/to-absolute-index.js"(exports2, module2) {
- var toIntegerOrInfinity = require_to_integer_or_infinity();
- var max = Math.max;
- var min = Math.min;
- module2.exports = function(index, length) {
- var integer = toIntegerOrInfinity(index);
- return integer < 0 ? max(integer + length, 0) : min(integer, length);
- };
- }
- });
- // node_modules/core-js/internals/to-length.js
- var require_to_length = __commonJS({
- "node_modules/core-js/internals/to-length.js"(exports2, module2) {
- var toIntegerOrInfinity = require_to_integer_or_infinity();
- var min = Math.min;
- module2.exports = function(argument) {
- return argument > 0 ? min(toIntegerOrInfinity(argument), 9007199254740991) : 0;
- };
- }
- });
- // node_modules/core-js/internals/length-of-array-like.js
- var require_length_of_array_like = __commonJS({
- "node_modules/core-js/internals/length-of-array-like.js"(exports2, module2) {
- var toLength = require_to_length();
- module2.exports = function(obj) {
- return toLength(obj.length);
- };
- }
- });
- // node_modules/core-js/internals/array-includes.js
- var require_array_includes = __commonJS({
- "node_modules/core-js/internals/array-includes.js"(exports2, module2) {
- var toIndexedObject = require_to_indexed_object();
- var toAbsoluteIndex = require_to_absolute_index();
- var lengthOfArrayLike = require_length_of_array_like();
- var createMethod = function(IS_INCLUDES) {
- return function($this, el, fromIndex) {
- var O = toIndexedObject($this);
- var length = lengthOfArrayLike(O);
- var index = toAbsoluteIndex(fromIndex, length);
- var value;
- if (IS_INCLUDES && el != el)
- while (length > index) {
- value = O[index++];
- if (value != value)
- return true;
- }
- else
- for (; length > index; index++) {
- if ((IS_INCLUDES || index in O) && O[index] === el)
- return IS_INCLUDES || index || 0;
- }
- return !IS_INCLUDES && -1;
- };
- };
- module2.exports = {
- includes: createMethod(true),
- indexOf: createMethod(false)
- };
- }
- });
- // node_modules/core-js/internals/object-keys-internal.js
- var require_object_keys_internal = __commonJS({
- "node_modules/core-js/internals/object-keys-internal.js"(exports2, module2) {
- var uncurryThis = require_function_uncurry_this();
- var hasOwn = require_has_own_property();
- var toIndexedObject = require_to_indexed_object();
- var indexOf = require_array_includes().indexOf;
- var hiddenKeys = require_hidden_keys();
- var push = uncurryThis([].push);
- module2.exports = function(object, names) {
- var O = toIndexedObject(object);
- var i = 0;
- var result = [];
- var key;
- for (key in O)
- !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
- while (names.length > i)
- if (hasOwn(O, key = names[i++])) {
- ~indexOf(result, key) || push(result, key);
- }
- return result;
- };
- }
- });
- // node_modules/core-js/internals/enum-bug-keys.js
- var require_enum_bug_keys = __commonJS({
- "node_modules/core-js/internals/enum-bug-keys.js"(exports2, module2) {
- module2.exports = [
- "constructor",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "toLocaleString",
- "toString",
- "valueOf"
- ];
- }
- });
- // node_modules/core-js/internals/object-get-own-property-names.js
- var require_object_get_own_property_names = __commonJS({
- "node_modules/core-js/internals/object-get-own-property-names.js"(exports2) {
- var internalObjectKeys = require_object_keys_internal();
- var enumBugKeys = require_enum_bug_keys();
- var hiddenKeys = enumBugKeys.concat("length", "prototype");
- exports2.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
- return internalObjectKeys(O, hiddenKeys);
- };
- }
- });
- // node_modules/core-js/internals/object-get-own-property-symbols.js
- var require_object_get_own_property_symbols = __commonJS({
- "node_modules/core-js/internals/object-get-own-property-symbols.js"(exports2) {
- exports2.f = Object.getOwnPropertySymbols;
- }
- });
- // node_modules/core-js/internals/own-keys.js
- var require_own_keys = __commonJS({
- "node_modules/core-js/internals/own-keys.js"(exports2, module2) {
- var getBuiltIn = require_get_built_in();
- var uncurryThis = require_function_uncurry_this();
- var getOwnPropertyNamesModule = require_object_get_own_property_names();
- var getOwnPropertySymbolsModule = require_object_get_own_property_symbols();
- var anObject = require_an_object();
- var concat = uncurryThis([].concat);
- module2.exports = getBuiltIn("Reflect", "ownKeys") || function ownKeys(it) {
- var keys = getOwnPropertyNamesModule.f(anObject(it));
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
- return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
- };
- }
- });
- // node_modules/core-js/internals/copy-constructor-properties.js
- var require_copy_constructor_properties = __commonJS({
- "node_modules/core-js/internals/copy-constructor-properties.js"(exports2, module2) {
- var hasOwn = require_has_own_property();
- var ownKeys = require_own_keys();
- var getOwnPropertyDescriptorModule = require_object_get_own_property_descriptor();
- var definePropertyModule = require_object_define_property();
- module2.exports = function(target, source, exceptions) {
- var keys = ownKeys(source);
- var defineProperty = definePropertyModule.f;
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
- }
- }
- };
- }
- });
- // node_modules/core-js/internals/is-forced.js
- var require_is_forced = __commonJS({
- "node_modules/core-js/internals/is-forced.js"(exports2, module2) {
- var fails = require_fails();
- var isCallable = require_is_callable();
- var replacement = /#|\.prototype\./;
- var isForced = function(feature, detection) {
- var value = data[normalize(feature)];
- return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
- };
- var normalize = isForced.normalize = function(string) {
- return String(string).replace(replacement, ".").toLowerCase();
- };
- var data = isForced.data = {};
- var NATIVE = isForced.NATIVE = "N";
- var POLYFILL = isForced.POLYFILL = "P";
- module2.exports = isForced;
- }
- });
- // node_modules/core-js/internals/export.js
- var require_export = __commonJS({
- "node_modules/core-js/internals/export.js"(exports2, module2) {
- var global2 = require_global();
- var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
- var createNonEnumerableProperty = require_create_non_enumerable_property();
- var redefine = require_redefine();
- var setGlobal = require_set_global();
- var copyConstructorProperties = require_copy_constructor_properties();
- var isForced = require_is_forced();
- module2.exports = function(options, source) {
- var TARGET = options.target;
- var GLOBAL = options.global;
- var STATIC = options.stat;
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
- if (GLOBAL) {
- target = global2;
- } else if (STATIC) {
- target = global2[TARGET] || setGlobal(TARGET, {});
- } else {
- target = (global2[TARGET] || {}).prototype;
- }
- if (target)
- for (key in source) {
- sourceProperty = source[key];
- if (options.noTargetGet) {
- descriptor = getOwnPropertyDescriptor(target, key);
- targetProperty = descriptor && descriptor.value;
- } else
- targetProperty = target[key];
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
- if (!FORCED && targetProperty !== void 0) {
- if (typeof sourceProperty == typeof targetProperty)
- continue;
- copyConstructorProperties(sourceProperty, targetProperty);
- }
- if (options.sham || targetProperty && targetProperty.sham) {
- createNonEnumerableProperty(sourceProperty, "sham", true);
- }
- redefine(target, key, sourceProperty, options);
- }
- };
- }
- });
- // node_modules/core-js/internals/function-bind-context.js
- var require_function_bind_context = __commonJS({
- "node_modules/core-js/internals/function-bind-context.js"(exports2, module2) {
- var uncurryThis = require_function_uncurry_this();
- var aCallable = require_a_callable();
- var NATIVE_BIND = require_function_bind_native();
- var bind = uncurryThis(uncurryThis.bind);
- module2.exports = function(fn, that) {
- aCallable(fn);
- return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
- return fn.apply(that, arguments);
- };
- };
- }
- });
- // node_modules/core-js/internals/iterators.js
- var require_iterators = __commonJS({
- "node_modules/core-js/internals/iterators.js"(exports2, module2) {
- module2.exports = {};
- }
- });
- // node_modules/core-js/internals/is-array-iterator-method.js
- var require_is_array_iterator_method = __commonJS({
- "node_modules/core-js/internals/is-array-iterator-method.js"(exports2, module2) {
- var wellKnownSymbol = require_well_known_symbol();
- var Iterators = require_iterators();
- var ITERATOR = wellKnownSymbol("iterator");
- var ArrayPrototype = Array.prototype;
- module2.exports = function(it) {
- return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
- };
- }
- });
- // node_modules/core-js/internals/to-string-tag-support.js
- var require_to_string_tag_support = __commonJS({
- "node_modules/core-js/internals/to-string-tag-support.js"(exports2, module2) {
- var wellKnownSymbol = require_well_known_symbol();
- var TO_STRING_TAG = wellKnownSymbol("toStringTag");
- var test = {};
- test[TO_STRING_TAG] = "z";
- module2.exports = String(test) === "[object z]";
- }
- });
- // node_modules/core-js/internals/classof.js
- var require_classof = __commonJS({
- "node_modules/core-js/internals/classof.js"(exports2, module2) {
- var global2 = require_global();
- var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
- var isCallable = require_is_callable();
- var classofRaw = require_classof_raw();
- var wellKnownSymbol = require_well_known_symbol();
- var TO_STRING_TAG = wellKnownSymbol("toStringTag");
- var Object2 = global2.Object;
- var CORRECT_ARGUMENTS = classofRaw(function() {
- return arguments;
- }()) == "Arguments";
- var tryGet = function(it, key) {
- try {
- return it[key];
- } catch (error) {
- }
- };
- module2.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
- var O, tag, result;
- 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;
- };
- }
- });
- // node_modules/core-js/internals/get-iterator-method.js
- var require_get_iterator_method = __commonJS({
- "node_modules/core-js/internals/get-iterator-method.js"(exports2, module2) {
- var classof = require_classof();
- var getMethod = require_get_method();
- var Iterators = require_iterators();
- var wellKnownSymbol = require_well_known_symbol();
- var ITERATOR = wellKnownSymbol("iterator");
- module2.exports = function(it) {
- if (it != void 0)
- return getMethod(it, ITERATOR) || getMethod(it, "@@iterator") || Iterators[classof(it)];
- };
- }
- });
- // node_modules/core-js/internals/get-iterator.js
- var require_get_iterator = __commonJS({
- "node_modules/core-js/internals/get-iterator.js"(exports2, module2) {
- var global2 = require_global();
- var call = require_function_call();
- var aCallable = require_a_callable();
- var anObject = require_an_object();
- var tryToString = require_try_to_string();
- var getIteratorMethod = require_get_iterator_method();
- var TypeError2 = global2.TypeError;
- module2.exports = function(argument, usingIterator) {
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
- if (aCallable(iteratorMethod))
- return anObject(call(iteratorMethod, argument));
- throw TypeError2(tryToString(argument) + " is not iterable");
- };
- }
- });
- // node_modules/core-js/internals/iterator-close.js
- var require_iterator_close = __commonJS({
- "node_modules/core-js/internals/iterator-close.js"(exports2, module2) {
- var call = require_function_call();
- var anObject = require_an_object();
- var getMethod = require_get_method();
- module2.exports = function(iterator, kind, value) {
- var innerResult, innerError;
- anObject(iterator);
- try {
- innerResult = getMethod(iterator, "return");
- if (!innerResult) {
- if (kind === "throw")
- throw value;
- return value;
- }
- innerResult = call(innerResult, iterator);
- } catch (error) {
- innerError = true;
- innerResult = error;
- }
- if (kind === "throw")
- throw value;
- if (innerError)
- throw innerResult;
- anObject(innerResult);
- return value;
- };
- }
- });
- // node_modules/core-js/internals/iterate.js
- var require_iterate = __commonJS({
- "node_modules/core-js/internals/iterate.js"(exports2, module2) {
- var global2 = require_global();
- var bind = require_function_bind_context();
- var call = require_function_call();
- var anObject = require_an_object();
- var tryToString = require_try_to_string();
- var isArrayIteratorMethod = require_is_array_iterator_method();
- var lengthOfArrayLike = require_length_of_array_like();
- var isPrototypeOf = require_object_is_prototype_of();
- var getIterator = require_get_iterator();
- var getIteratorMethod = require_get_iterator_method();
- var iteratorClose = require_iterator_close();
- var TypeError2 = global2.TypeError;
- var Result = function(stopped, result) {
- this.stopped = stopped;
- this.result = result;
- };
- var ResultPrototype = Result.prototype;
- module2.exports = function(iterable, unboundFunction, options) {
- var that = options && options.that;
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
- var INTERRUPTED = !!(options && options.INTERRUPTED);
- var fn = bind(unboundFunction, that);
- var iterator, iterFn, index, length, result, next, step;
- var stop = function(condition) {
- if (iterator)
- iteratorClose(iterator, "normal", condition);
- return new Result(true, condition);
- };
- var callFn = function(value) {
- if (AS_ENTRIES) {
- anObject(value);
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
- }
- return INTERRUPTED ? fn(value, stop) : fn(value);
- };
- if (IS_ITERATOR) {
- iterator = iterable;
- } else {
- iterFn = getIteratorMethod(iterable);
- if (!iterFn)
- throw TypeError2(tryToString(iterable) + " is not iterable");
- if (isArrayIteratorMethod(iterFn)) {
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
- result = callFn(iterable[index]);
- if (result && isPrototypeOf(ResultPrototype, result))
- return result;
- }
- return new Result(false);
- }
- iterator = getIterator(iterable, iterFn);
- }
- next = iterator.next;
- while (!(step = call(next, iterator)).done) {
- try {
- result = callFn(step.value);
- } catch (error) {
- iteratorClose(iterator, "throw", error);
- }
- if (typeof result == "object" && result && isPrototypeOf(ResultPrototype, result))
- return result;
- }
- return new Result(false);
- };
- }
- });
- // node_modules/core-js/internals/create-property.js
- var require_create_property = __commonJS({
- "node_modules/core-js/internals/create-property.js"(exports2, module2) {
- "use strict";
- var toPropertyKey = require_to_property_key();
- var definePropertyModule = require_object_define_property();
- var createPropertyDescriptor = require_create_property_descriptor();
- module2.exports = function(object, key, value) {
- var propertyKey = toPropertyKey(key);
- if (propertyKey in object)
- definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
- else
- object[propertyKey] = value;
- };
- }
- });
- // node_modules/core-js/modules/es.object.from-entries.js
- var require_es_object_from_entries = __commonJS({
- "node_modules/core-js/modules/es.object.from-entries.js"() {
- var $ = require_export();
- var iterate = require_iterate();
- var createProperty = require_create_property();
- $({ target: "Object", stat: true }, {
- fromEntries: function fromEntries(iterable) {
- var obj = {};
- iterate(iterable, function(k, v) {
- createProperty(obj, k, v);
- }, { AS_ENTRIES: true });
- return obj;
- }
- });
- }
- });
- // node_modules/core-js/internals/is-array.js
- var require_is_array = __commonJS({
- "node_modules/core-js/internals/is-array.js"(exports2, module2) {
- var classof = require_classof_raw();
- module2.exports = Array.isArray || function isArray(argument) {
- return classof(argument) == "Array";
- };
- }
- });
- // node_modules/core-js/internals/flatten-into-array.js
- var require_flatten_into_array = __commonJS({
- "node_modules/core-js/internals/flatten-into-array.js"(exports2, module2) {
- "use strict";
- var global2 = require_global();
- var isArray = require_is_array();
- var lengthOfArrayLike = require_length_of_array_like();
- var bind = require_function_bind_context();
- var TypeError2 = global2.TypeError;
- var flattenIntoArray = function(target, original, source, sourceLen, start, depth, mapper, thisArg) {
- var targetIndex = start;
- var sourceIndex = 0;
- var mapFn = mapper ? bind(mapper, thisArg) : false;
- var element, elementLen;
- while (sourceIndex < sourceLen) {
- if (sourceIndex in source) {
- element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
- if (depth > 0 && isArray(element)) {
- elementLen = lengthOfArrayLike(element);
- targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
- } else {
- if (targetIndex >= 9007199254740991)
- throw TypeError2("Exceed the acceptable array length");
- target[targetIndex] = element;
- }
- targetIndex++;
- }
- sourceIndex++;
- }
- return targetIndex;
- };
- module2.exports = flattenIntoArray;
- }
- });
- // node_modules/core-js/internals/is-constructor.js
- var require_is_constructor = __commonJS({
- "node_modules/core-js/internals/is-constructor.js"(exports2, module2) {
- var uncurryThis = require_function_uncurry_this();
- var fails = require_fails();
- var isCallable = require_is_callable();
- var classof = require_classof();
- var getBuiltIn = require_get_built_in();
- var inspectSource = require_inspect_source();
- var noop = function() {
- };
- var empty = [];
- var construct = getBuiltIn("Reflect", "construct");
- var constructorRegExp = /^\s*(?:class|function)\b/;
- var exec = uncurryThis(constructorRegExp.exec);
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
- var isConstructorModern = function isConstructor(argument) {
- if (!isCallable(argument))
- return false;
- try {
- construct(noop, empty, argument);
- return true;
- } catch (error) {
- return false;
- }
- };
- var isConstructorLegacy = function isConstructor(argument) {
- if (!isCallable(argument))
- return false;
- switch (classof(argument)) {
- case "AsyncFunction":
- case "GeneratorFunction":
- case "AsyncGeneratorFunction":
- return false;
- }
- try {
- return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
- } catch (error) {
- return true;
- }
- };
- isConstructorLegacy.sham = true;
- module2.exports = !construct || fails(function() {
- var called;
- return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
- called = true;
- }) || called;
- }) ? isConstructorLegacy : isConstructorModern;
- }
- });
- // node_modules/core-js/internals/array-species-constructor.js
- var require_array_species_constructor = __commonJS({
- "node_modules/core-js/internals/array-species-constructor.js"(exports2, module2) {
- var global2 = require_global();
- var isArray = require_is_array();
- var isConstructor = require_is_constructor();
- var isObject = require_is_object();
- var wellKnownSymbol = require_well_known_symbol();
- var SPECIES = wellKnownSymbol("species");
- var Array2 = global2.Array;
- module2.exports = function(originalArray) {
- var C;
- if (isArray(originalArray)) {
- C = originalArray.constructor;
- if (isConstructor(C) && (C === Array2 || isArray(C.prototype)))
- C = void 0;
- else if (isObject(C)) {
- C = C[SPECIES];
- if (C === null)
- C = void 0;
- }
- }
- return C === void 0 ? Array2 : C;
- };
- }
- });
- // node_modules/core-js/internals/array-species-create.js
- var require_array_species_create = __commonJS({
- "node_modules/core-js/internals/array-species-create.js"(exports2, module2) {
- var arraySpeciesConstructor = require_array_species_constructor();
- module2.exports = function(originalArray, length) {
- return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
- };
- }
- });
- // node_modules/core-js/modules/es.array.flat-map.js
- var require_es_array_flat_map = __commonJS({
- "node_modules/core-js/modules/es.array.flat-map.js"() {
- "use strict";
- var $ = require_export();
- var flattenIntoArray = require_flatten_into_array();
- var aCallable = require_a_callable();
- var toObject = require_to_object();
- var lengthOfArrayLike = require_length_of_array_like();
- var arraySpeciesCreate = require_array_species_create();
- $({ target: "Array", proto: true }, {
- flatMap: function flatMap(callbackfn) {
- var O = toObject(this);
- var sourceLen = lengthOfArrayLike(O);
- var A;
- aCallable(callbackfn);
- A = arraySpeciesCreate(O, 0);
- A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : void 0);
- return A;
- }
- });
- }
- });
- // node_modules/core-js/modules/es.array.flat.js
- var require_es_array_flat = __commonJS({
- "node_modules/core-js/modules/es.array.flat.js"() {
- "use strict";
- var $ = require_export();
- var flattenIntoArray = require_flatten_into_array();
- var toObject = require_to_object();
- var lengthOfArrayLike = require_length_of_array_like();
- var toIntegerOrInfinity = require_to_integer_or_infinity();
- var arraySpeciesCreate = require_array_species_create();
- $({ target: "Array", proto: true }, {
- flat: function flat() {
- var depthArg = arguments.length ? arguments[0] : void 0;
- var O = toObject(this);
- var sourceLen = lengthOfArrayLike(O);
- var A = arraySpeciesCreate(O, 0);
- A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === void 0 ? 1 : toIntegerOrInfinity(depthArg));
- return A;
- }
- });
- }
- });
- // dist/cli.js
- require_es_object_from_entries();
- require_es_array_flat_map();
- require_es_array_flat();
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __commonJS2 = (cb, mod) => function __require() {
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = {
- exports: {}
- }).exports, mod), mod.exports;
- };
- var require_fast_json_stable_stringify = __commonJS2({
- "node_modules/fast-json-stable-stringify/index.js"(exports2, module2) {
- "use strict";
- module2.exports = function(data, opts) {
- if (!opts)
- opts = {};
- if (typeof opts === "function")
- opts = {
- cmp: opts
- };
- var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false;
- var cmp = opts.cmp && function(f) {
- return function(node) {
- return function(a, b) {
- var aobj = {
- key: a,
- value: node[a]
- };
- var bobj = {
- key: b,
- value: node[b]
- };
- return f(aobj, bobj);
- };
- };
- }(opts.cmp);
- var seen = [];
- return function stringify2(node) {
- if (node && node.toJSON && typeof node.toJSON === "function") {
- node = node.toJSON();
- }
- if (node === void 0)
- return;
- if (typeof node == "number")
- return isFinite(node) ? "" + node : "null";
- if (typeof node !== "object")
- return JSON.stringify(node);
- var i, out;
- if (Array.isArray(node)) {
- out = "[";
- for (i = 0; i < node.length; i++) {
- if (i)
- out += ",";
- out += stringify2(node[i]) || "null";
- }
- return out + "]";
- }
- if (node === null)
- return "null";
- if (seen.indexOf(node) !== -1) {
- if (cycles)
- return JSON.stringify("__cycle__");
- throw new TypeError("Converting circular structure to JSON");
- }
- var seenIndex = seen.push(node) - 1;
- var keys = Object.keys(node).sort(cmp && cmp(node));
- out = "";
- for (i = 0; i < keys.length; i++) {
- var key = keys[i];
- var value = stringify2(node[key]);
- if (!value)
- continue;
- if (out)
- out += ",";
- out += JSON.stringify(key) + ":" + value;
- }
- seen.splice(seenIndex, 1);
- return "{" + out + "}";
- }(data);
- };
- }
- });
- var require_clone = __commonJS2({
- "node_modules/clone/clone.js"(exports2, module2) {
- var clone = function() {
- "use strict";
- function clone2(parent, circular, depth, prototype) {
- var filter;
- if (typeof circular === "object") {
- depth = circular.depth;
- prototype = circular.prototype;
- filter = circular.filter;
- circular = circular.circular;
- }
- var allParents = [];
- var allChildren = [];
- var useBuffer = typeof Buffer != "undefined";
- if (typeof circular == "undefined")
- circular = true;
- if (typeof depth == "undefined")
- depth = Infinity;
- function _clone(parent2, depth2) {
- if (parent2 === null)
- return null;
- if (depth2 == 0)
- return parent2;
- var child;
- var proto;
- if (typeof parent2 != "object") {
- return parent2;
- }
- if (clone2.__isArray(parent2)) {
- child = [];
- } else if (clone2.__isRegExp(parent2)) {
- child = new RegExp(parent2.source, __getRegExpFlags(parent2));
- if (parent2.lastIndex)
- child.lastIndex = parent2.lastIndex;
- } else if (clone2.__isDate(parent2)) {
- child = new Date(parent2.getTime());
- } else if (useBuffer && Buffer.isBuffer(parent2)) {
- if (Buffer.allocUnsafe) {
- child = Buffer.allocUnsafe(parent2.length);
- } else {
- child = new Buffer(parent2.length);
- }
- parent2.copy(child);
- return child;
- } else {
- if (typeof prototype == "undefined") {
- proto = Object.getPrototypeOf(parent2);
- child = Object.create(proto);
- } else {
- child = Object.create(prototype);
- proto = prototype;
- }
- }
- if (circular) {
- var index = allParents.indexOf(parent2);
- if (index != -1) {
- return allChildren[index];
- }
- allParents.push(parent2);
- allChildren.push(child);
- }
- for (var i in parent2) {
- var attrs;
- if (proto) {
- attrs = Object.getOwnPropertyDescriptor(proto, i);
- }
- if (attrs && attrs.set == null) {
- continue;
- }
- child[i] = _clone(parent2[i], depth2 - 1);
- }
- return child;
- }
- return _clone(parent, depth);
- }
- clone2.clonePrototype = function clonePrototype(parent) {
- if (parent === null)
- return null;
- var c = function() {
- };
- c.prototype = parent;
- return new c();
- };
- function __objToStr(o) {
- return Object.prototype.toString.call(o);
- }
- ;
- clone2.__objToStr = __objToStr;
- function __isDate(o) {
- return typeof o === "object" && __objToStr(o) === "[object Date]";
- }
- ;
- clone2.__isDate = __isDate;
- function __isArray(o) {
- return typeof o === "object" && __objToStr(o) === "[object Array]";
- }
- ;
- clone2.__isArray = __isArray;
- function __isRegExp(o) {
- return typeof o === "object" && __objToStr(o) === "[object RegExp]";
- }
- ;
- clone2.__isRegExp = __isRegExp;
- function __getRegExpFlags(re) {
- var flags = "";
- if (re.global)
- flags += "g";
- if (re.ignoreCase)
- flags += "i";
- if (re.multiline)
- flags += "m";
- return flags;
- }
- ;
- clone2.__getRegExpFlags = __getRegExpFlags;
- return clone2;
- }();
- if (typeof module2 === "object" && module2.exports) {
- module2.exports = clone;
- }
- }
- });
- var require_defaults = __commonJS2({
- "node_modules/defaults/index.js"(exports2, module2) {
- var clone = require_clone();
- module2.exports = function(options, defaults) {
- options = options || {};
- Object.keys(defaults).forEach(function(key) {
- if (typeof options[key] === "undefined") {
- options[key] = clone(defaults[key]);
- }
- });
- return options;
- };
- }
- });
- var require_combining = __commonJS2({
- "node_modules/wcwidth/combining.js"(exports2, module2) {
- 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]];
- }
- });
- var require_wcwidth = __commonJS2({
- "node_modules/wcwidth/index.js"(exports2, module2) {
- "use strict";
- var defaults = require_defaults();
- var combining = require_combining();
- var DEFAULTS = {
- nul: 0,
- control: 0
- };
- module2.exports = function wcwidth2(str) {
- return wcswidth(str, DEFAULTS);
- };
- module2.exports.config = function(opts) {
- opts = defaults(opts || {}, DEFAULTS);
- return function wcwidth2(str) {
- return wcswidth(str, opts);
- };
- };
- function wcswidth(str, opts) {
- if (typeof str !== "string")
- return wcwidth(str, opts);
- var s = 0;
- for (var i = 0; i < str.length; i++) {
- var n = wcwidth(str.charCodeAt(i), opts);
- if (n < 0)
- return -1;
- s += n;
- }
- return s;
- }
- function wcwidth(ucs, opts) {
- if (ucs === 0)
- return opts.nul;
- if (ucs < 32 || ucs >= 127 && ucs < 160)
- return opts.control;
- if (bisearch(ucs))
- return 0;
- 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));
- }
- function bisearch(ucs) {
- var min = 0;
- var max = combining.length - 1;
- var mid;
- if (ucs < combining[0][0] || ucs > combining[max][1])
- return false;
- while (max >= min) {
- mid = Math.floor((min + max) / 2);
- if (ucs > combining[mid][1])
- min = mid + 1;
- else if (ucs < combining[mid][0])
- max = mid - 1;
- else
- return true;
- }
- return false;
- }
- }
- });
- var require_strip_ansi = __commonJS2({
- "vendors/strip-ansi.js"(exports2, module2) {
- var __defProp = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
- var __hasOwnProp = Object.prototype.hasOwnProperty;
- var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, {
- get: all[name],
- enumerable: true
- });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames22(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, {
- get: () => from[key],
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
- });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
- value: true
- }), mod);
- var strip_ansi_exports = {};
- __export(strip_ansi_exports, {
- default: () => stripAnsi
- });
- module2.exports = __toCommonJS(strip_ansi_exports);
- function ansiRegex({
- onlyFirst = false
- } = {}) {
- 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("|");
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
- }
- function stripAnsi(string) {
- if (typeof string !== "string") {
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
- }
- return string.replace(ansiRegex(), "");
- }
- }
- });
- var require_chalk = __commonJS2({
- "vendors/chalk.js"(exports2, module2) {
- var __create = Object.create;
- var __defProp = Object.defineProperty;
- var __defProps = Object.defineProperties;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
- var __getProtoOf = Object.getPrototypeOf;
- var __hasOwnProp = Object.prototype.hasOwnProperty;
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
- enumerable: true,
- configurable: true,
- writable: true,
- value
- }) : obj[key] = value;
- var __spreadValues = (a, b) => {
- for (var prop in b || (b = {}))
- if (__hasOwnProp.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- if (__getOwnPropSymbols)
- for (var prop of __getOwnPropSymbols(b)) {
- if (__propIsEnum.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- }
- return a;
- };
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
- var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, {
- get: all[name],
- enumerable: true
- });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames22(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, {
- get: () => from[key],
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
- });
- }
- return to;
- };
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
- value: mod,
- enumerable: true
- }) : target, mod));
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
- value: true
- }), mod);
- var source_exports = {};
- __export(source_exports, {
- Chalk: () => Chalk,
- chalkStderr: () => chalkStderr,
- default: () => source_default,
- supportsColor: () => stdoutColor,
- supportsColorStderr: () => stderrColor
- });
- module2.exports = __toCommonJS(source_exports);
- var ANSI_BACKGROUND_OFFSET = 10;
- var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
- var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
- var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
- function assembleStyles() {
- const codes = /* @__PURE__ */ new Map();
- const styles2 = {
- modifier: {
- reset: [0, 0],
- bold: [1, 22],
- dim: [2, 22],
- italic: [3, 23],
- underline: [4, 24],
- overline: [53, 55],
- inverse: [7, 27],
- hidden: [8, 28],
- strikethrough: [9, 29]
- },
- color: {
- black: [30, 39],
- red: [31, 39],
- green: [32, 39],
- yellow: [33, 39],
- blue: [34, 39],
- magenta: [35, 39],
- cyan: [36, 39],
- white: [37, 39],
- blackBright: [90, 39],
- redBright: [91, 39],
- greenBright: [92, 39],
- yellowBright: [93, 39],
- blueBright: [94, 39],
- magentaBright: [95, 39],
- cyanBright: [96, 39],
- whiteBright: [97, 39]
- },
- bgColor: {
- bgBlack: [40, 49],
- bgRed: [41, 49],
- bgGreen: [42, 49],
- bgYellow: [43, 49],
- bgBlue: [44, 49],
- bgMagenta: [45, 49],
- bgCyan: [46, 49],
- bgWhite: [47, 49],
- bgBlackBright: [100, 49],
- bgRedBright: [101, 49],
- bgGreenBright: [102, 49],
- bgYellowBright: [103, 49],
- bgBlueBright: [104, 49],
- bgMagentaBright: [105, 49],
- bgCyanBright: [106, 49],
- bgWhiteBright: [107, 49]
- }
- };
- styles2.color.gray = styles2.color.blackBright;
- styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
- styles2.color.grey = styles2.color.blackBright;
- styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
- for (const [groupName, group] of Object.entries(styles2)) {
- for (const [styleName, style] of Object.entries(group)) {
- styles2[styleName] = {
- open: `\x1B[${style[0]}m`,
- close: `\x1B[${style[1]}m`
- };
- group[styleName] = styles2[styleName];
- codes.set(style[0], style[1]);
- }
- Object.defineProperty(styles2, groupName, {
- value: group,
- enumerable: false
- });
- }
- Object.defineProperty(styles2, "codes", {
- value: codes,
- enumerable: false
- });
- styles2.color.close = "\x1B[39m";
- styles2.bgColor.close = "\x1B[49m";
- styles2.color.ansi = wrapAnsi16();
- styles2.color.ansi256 = wrapAnsi256();
- styles2.color.ansi16m = wrapAnsi16m();
- styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
- styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
- styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
- Object.defineProperties(styles2, {
- rgbToAnsi256: {
- value: (red, green, blue) => {
- if (red === green && green === blue) {
- if (red < 8) {
- return 16;
- }
- if (red > 248) {
- return 231;
- }
- return Math.round((red - 8) / 247 * 24) + 232;
- }
- return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
- },
- enumerable: false
- },
- hexToRgb: {
- value: (hex) => {
- const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
- if (!matches) {
- return [0, 0, 0];
- }
- let {
- colorString
- } = matches.groups;
- if (colorString.length === 3) {
- colorString = [...colorString].map((character) => character + character).join("");
- }
- const integer = Number.parseInt(colorString, 16);
- return [integer >> 16 & 255, integer >> 8 & 255, integer & 255];
- },
- enumerable: false
- },
- hexToAnsi256: {
- value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
- enumerable: false
- },
- ansi256ToAnsi: {
- value: (code) => {
- if (code < 8) {
- return 30 + code;
- }
- if (code < 16) {
- return 90 + (code - 8);
- }
- let red;
- let green;
- let blue;
- if (code >= 232) {
- red = ((code - 232) * 10 + 8) / 255;
- green = red;
- blue = red;
- } else {
- code -= 16;
- const remainder = code % 36;
- red = Math.floor(code / 36) / 5;
- green = Math.floor(remainder / 6) / 5;
- blue = remainder % 6 / 5;
- }
- const value = Math.max(red, green, blue) * 2;
- if (value === 0) {
- return 30;
- }
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
- if (value === 2) {
- result += 60;
- }
- return result;
- },
- enumerable: false
- },
- rgbToAnsi: {
- value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
- enumerable: false
- },
- hexToAnsi: {
- value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
- enumerable: false
- }
- });
- return styles2;
- }
- var ansiStyles = assembleStyles();
- var ansi_styles_default = ansiStyles;
- var import_node_process = __toESM(require("process"), 1);
- var import_node_os = __toESM(require("os"), 1);
- var import_node_tty = __toESM(require("tty"), 1);
- function hasFlag(flag, argv = import_node_process.default.argv) {
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
- const position = argv.indexOf(prefix + flag);
- const terminatorPosition = argv.indexOf("--");
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
- }
- var {
- env
- } = import_node_process.default;
- var flagForceColor;
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
- flagForceColor = 0;
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
- flagForceColor = 1;
- }
- function envForceColor() {
- if ("FORCE_COLOR" in env) {
- if (env.FORCE_COLOR === "true") {
- return 1;
- }
- if (env.FORCE_COLOR === "false") {
- return 0;
- }
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
- }
- }
- function translateLevel(level) {
- if (level === 0) {
- return false;
- }
- return {
- level,
- hasBasic: true,
- has256: level >= 2,
- has16m: level >= 3
- };
- }
- function _supportsColor(haveStream, {
- streamIsTTY,
- sniffFlags = true
- } = {}) {
- const noFlagForceColor = envForceColor();
- if (noFlagForceColor !== void 0) {
- flagForceColor = noFlagForceColor;
- }
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
- if (forceColor === 0) {
- return 0;
- }
- if (sniffFlags) {
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
- return 3;
- }
- if (hasFlag("color=256")) {
- return 2;
- }
- }
- if (haveStream && !streamIsTTY && forceColor === void 0) {
- return 0;
- }
- const min = forceColor || 0;
- if (env.TERM === "dumb") {
- return min;
- }
- if (import_node_process.default.platform === "win32") {
- const osRelease = import_node_os.default.release().split(".");
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
- }
- return 1;
- }
- if ("CI" in env) {
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
- return 1;
- }
- return min;
- }
- if ("TEAMCITY_VERSION" in env) {
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
- }
- if ("TF_BUILD" in env && "AGENT_NAME" in env) {
- return 1;
- }
- if (env.COLORTERM === "truecolor") {
- return 3;
- }
- if ("TERM_PROGRAM" in env) {
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
- switch (env.TERM_PROGRAM) {
- case "iTerm.app":
- return version >= 3 ? 3 : 2;
- case "Apple_Terminal":
- return 2;
- }
- }
- if (/-256(color)?$/i.test(env.TERM)) {
- return 2;
- }
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
- return 1;
- }
- if ("COLORTERM" in env) {
- return 1;
- }
- return min;
- }
- function createSupportsColor(stream, options = {}) {
- const level = _supportsColor(stream, __spreadValues({
- streamIsTTY: stream && stream.isTTY
- }, options));
- return translateLevel(level);
- }
- var supportsColor = {
- stdout: createSupportsColor({
- isTTY: import_node_tty.default.isatty(1)
- }),
- stderr: createSupportsColor({
- isTTY: import_node_tty.default.isatty(2)
- })
- };
- var supports_color_default = supportsColor;
- function stringReplaceAll(string, substring, replacer) {
- let index = string.indexOf(substring);
- if (index === -1) {
- return string;
- }
- const substringLength = substring.length;
- let endIndex = 0;
- let returnValue = "";
- do {
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
- endIndex = index + substringLength;
- index = string.indexOf(substring, endIndex);
- } while (index !== -1);
- returnValue += string.slice(endIndex);
- return returnValue;
- }
- function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
- let endIndex = 0;
- let returnValue = "";
- do {
- const gotCR = string[index - 1] === "\r";
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
- endIndex = index + 1;
- index = string.indexOf("\n", endIndex);
- } while (index !== -1);
- returnValue += string.slice(endIndex);
- return returnValue;
- }
- var {
- stdout: stdoutColor,
- stderr: stderrColor
- } = supports_color_default;
- var GENERATOR = Symbol("GENERATOR");
- var STYLER = Symbol("STYLER");
- var IS_EMPTY = Symbol("IS_EMPTY");
- var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
- var styles = /* @__PURE__ */ Object.create(null);
- var applyOptions = (object, options = {}) => {
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
- throw new Error("The `level` option should be an integer from 0 to 3");
- }
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
- object.level = options.level === void 0 ? colorLevel : options.level;
- };
- var Chalk = class {
- constructor(options) {
- return chalkFactory(options);
- }
- };
- var chalkFactory = (options) => {
- const chalk2 = (...strings) => strings.join(" ");
- applyOptions(chalk2, options);
- Object.setPrototypeOf(chalk2, createChalk.prototype);
- return chalk2;
- };
- function createChalk(options) {
- return chalkFactory(options);
- }
- Object.setPrototypeOf(createChalk.prototype, Function.prototype);
- for (const [styleName, style] of Object.entries(ansi_styles_default)) {
- styles[styleName] = {
- get() {
- const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
- Object.defineProperty(this, styleName, {
- value: builder
- });
- return builder;
- }
- };
- }
- styles.visible = {
- get() {
- const builder = createBuilder(this, this[STYLER], true);
- Object.defineProperty(this, "visible", {
- value: builder
- });
- return builder;
- }
- };
- var getModelAnsi = (model, level, type, ...arguments_) => {
- if (model === "rgb") {
- if (level === "ansi16m") {
- return ansi_styles_default[type].ansi16m(...arguments_);
- }
- if (level === "ansi256") {
- return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
- }
- return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
- }
- if (model === "hex") {
- return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
- }
- return ansi_styles_default[type][model](...arguments_);
- };
- var usedModels = ["rgb", "hex", "ansi256"];
- for (const model of usedModels) {
- styles[model] = {
- get() {
- const {
- level
- } = this;
- return function(...arguments_) {
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
- return createBuilder(this, styler, this[IS_EMPTY]);
- };
- }
- };
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
- styles[bgModel] = {
- get() {
- const {
- level
- } = this;
- return function(...arguments_) {
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
- return createBuilder(this, styler, this[IS_EMPTY]);
- };
- }
- };
- }
- var proto = Object.defineProperties(() => {
- }, __spreadProps(__spreadValues({}, styles), {
- level: {
- enumerable: true,
- get() {
- return this[GENERATOR].level;
- },
- set(level) {
- this[GENERATOR].level = level;
- }
- }
- }));
- var createStyler = (open, close, parent) => {
- let openAll;
- let closeAll;
- if (parent === void 0) {
- openAll = open;
- closeAll = close;
- } else {
- openAll = parent.openAll + open;
- closeAll = close + parent.closeAll;
- }
- return {
- open,
- close,
- openAll,
- closeAll,
- parent
- };
- };
- var createBuilder = (self2, _styler, _isEmpty) => {
- const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
- Object.setPrototypeOf(builder, proto);
- builder[GENERATOR] = self2;
- builder[STYLER] = _styler;
- builder[IS_EMPTY] = _isEmpty;
- return builder;
- };
- var applyStyle = (self2, string) => {
- if (self2.level <= 0 || !string) {
- return self2[IS_EMPTY] ? "" : string;
- }
- let styler = self2[STYLER];
- if (styler === void 0) {
- return string;
- }
- const {
- openAll,
- closeAll
- } = styler;
- if (string.includes("\x1B")) {
- while (styler !== void 0) {
- string = stringReplaceAll(string, styler.close, styler.open);
- styler = styler.parent;
- }
- }
- const lfIndex = string.indexOf("\n");
- if (lfIndex !== -1) {
- string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
- }
- return openAll + string + closeAll;
- };
- Object.defineProperties(createChalk.prototype, styles);
- var chalk = createChalk();
- var chalkStderr = createChalk({
- level: stderrColor ? stderrColor.level : 0
- });
- var source_default = chalk;
- }
- });
- var require_logger = __commonJS2({
- "src/cli/logger.js"(exports2, module2) {
- "use strict";
- var readline = require("readline");
- var wcwidth = require_wcwidth();
- var {
- default: stripAnsi
- } = require_strip_ansi();
- var {
- default: chalk
- } = require_chalk();
- var countLines = (stream, text) => {
- const columns = stream.columns || 80;
- let lineCount = 0;
- for (const line of stripAnsi(text).split("\n")) {
- lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns));
- }
- return lineCount;
- };
- var clear = (stream, text) => () => {
- const lineCount = countLines(stream, text);
- for (let line = 0; line < lineCount; line++) {
- if (line > 0) {
- readline.moveCursor(stream, 0, -1);
- }
- readline.clearLine(stream, 0);
- readline.cursorTo(stream, 0);
- }
- };
- var emptyLogResult = {
- clear() {
- }
- };
- function createLogger2(logLevel = "log") {
- return {
- logLevel,
- warn: createLogFunc("warn", "yellow"),
- error: createLogFunc("error", "red"),
- debug: createLogFunc("debug", "blue"),
- log: createLogFunc("log")
- };
- function createLogFunc(loggerName, color) {
- if (!shouldLog(loggerName)) {
- return () => emptyLogResult;
- }
- const prefix = color ? `[${chalk[color](loggerName)}] ` : "";
- const stream = process[loggerName === "log" ? "stdout" : "stderr"];
- return (message, options) => {
- options = Object.assign({
- newline: true,
- clearable: false
- }, options);
- message = message.replace(/^/gm, prefix) + (options.newline ? "\n" : "");
- stream.write(message);
- if (options.clearable) {
- return {
- clear: clear(stream, message)
- };
- }
- };
- }
- function shouldLog(loggerName) {
- switch (logLevel) {
- case "silent":
- return false;
- case "debug":
- if (loggerName === "debug") {
- return true;
- }
- case "log":
- if (loggerName === "log") {
- return true;
- }
- case "warn":
- if (loggerName === "warn") {
- return true;
- }
- case "error":
- return loggerName === "error";
- }
- }
- }
- module2.exports = createLogger2;
- }
- });
- var require_prettier_internal = __commonJS2({
- "src/cli/prettier-internal.js"(exports2, module2) {
- "use strict";
- module2.exports = require("./index.js").__internal;
- }
- });
- var require_lib = __commonJS2({
- "node_modules/outdent/lib/index.js"(exports2, module2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.outdent = void 0;
- function noop() {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- }
- function createWeakMap() {
- if (typeof WeakMap !== "undefined") {
- return /* @__PURE__ */ new WeakMap();
- } else {
- return fakeSetOrMap();
- }
- }
- function fakeSetOrMap() {
- return {
- add: noop,
- delete: noop,
- get: noop,
- set: noop,
- has: function(k) {
- return false;
- }
- };
- }
- var hop = Object.prototype.hasOwnProperty;
- var has = function(obj, prop) {
- return hop.call(obj, prop);
- };
- function extend(target, source) {
- for (var prop in source) {
- if (has(source, prop)) {
- target[prop] = source[prop];
- }
- }
- return target;
- }
- var reLeadingNewline = /^[ \t]*(?:\r\n|\r|\n)/;
- var reTrailingNewline = /(?:\r\n|\r|\n)[ \t]*$/;
- var reStartsWithNewlineOrIsEmpty = /^(?:[\r\n]|$)/;
- var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
- var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
- function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
- var indentationLevel = 0;
- var match = strings[0].match(reDetectIndentation);
- if (match) {
- indentationLevel = match[1].length;
- }
- var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
- var reMatchIndent = new RegExp(reSource, "g");
- if (firstInterpolatedValueSetsIndentationLevel) {
- strings = strings.slice(1);
- }
- var newline = options.newline, trimLeadingNewline = options.trimLeadingNewline, trimTrailingNewline = options.trimTrailingNewline;
- var normalizeNewlines = typeof newline === "string";
- var l = strings.length;
- var outdentedStrings = strings.map(function(v, i) {
- v = v.replace(reMatchIndent, "$1");
- if (i === 0 && trimLeadingNewline) {
- v = v.replace(reLeadingNewline, "");
- }
- if (i === l - 1 && trimTrailingNewline) {
- v = v.replace(reTrailingNewline, "");
- }
- if (normalizeNewlines) {
- v = v.replace(/\r\n|\n|\r/g, function(_) {
- return newline;
- });
- }
- return v;
- });
- return outdentedStrings;
- }
- function concatStringsAndValues(strings, values) {
- var ret = "";
- for (var i = 0, l = strings.length; i < l; i++) {
- ret += strings[i];
- if (i < l - 1) {
- ret += values[i];
- }
- }
- return ret;
- }
- function isTemplateStringsArray(v) {
- return has(v, "raw") && has(v, "length");
- }
- function createInstance(options) {
- var arrayAutoIndentCache = createWeakMap();
- var arrayFirstInterpSetsIndentCache = createWeakMap();
- function outdent(stringsOrOptions) {
- var values = [];
- for (var _i = 1; _i < arguments.length; _i++) {
- values[_i - 1] = arguments[_i];
- }
- if (isTemplateStringsArray(stringsOrOptions)) {
- var strings = stringsOrOptions;
- var firstInterpolatedValueSetsIndentationLevel = (values[0] === outdent || values[0] === defaultOutdent) && reOnlyWhitespaceWithAtLeastOneNewline.test(strings[0]) && reStartsWithNewlineOrIsEmpty.test(strings[1]);
- var cache = firstInterpolatedValueSetsIndentationLevel ? arrayFirstInterpSetsIndentCache : arrayAutoIndentCache;
- var renderedArray = cache.get(strings);
- if (!renderedArray) {
- renderedArray = _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options);
- cache.set(strings, renderedArray);
- }
- if (values.length === 0) {
- return renderedArray[0];
- }
- var rendered = concatStringsAndValues(renderedArray, firstInterpolatedValueSetsIndentationLevel ? values.slice(1) : values);
- return rendered;
- } else {
- return createInstance(extend(extend({}, options), stringsOrOptions || {}));
- }
- }
- var fullOutdent = extend(outdent, {
- string: function(str) {
- return _outdentArray([str], false, options)[0];
- }
- });
- return fullOutdent;
- }
- var defaultOutdent = createInstance({
- trimLeadingNewline: true,
- trimTrailingNewline: true
- });
- exports2.outdent = defaultOutdent;
- exports2.default = defaultOutdent;
- if (typeof module2 !== "undefined") {
- try {
- module2.exports = defaultOutdent;
- Object.defineProperty(defaultOutdent, "__esModule", {
- value: true
- });
- defaultOutdent.default = defaultOutdent;
- defaultOutdent.outdent = defaultOutdent;
- } catch (e) {
- }
- }
- }
- });
- var require_constant = __commonJS2({
- "src/cli/constant.js"(exports2, module2) {
- "use strict";
- var {
- outdent
- } = require_lib();
- var {
- coreOptions
- } = require_prettier_internal();
- var categoryOrder = [coreOptions.CATEGORY_OUTPUT, coreOptions.CATEGORY_FORMAT, coreOptions.CATEGORY_CONFIG, coreOptions.CATEGORY_EDITOR, coreOptions.CATEGORY_OTHER];
- var options = {
- check: {
- type: "boolean",
- category: coreOptions.CATEGORY_OUTPUT,
- alias: "c",
- description: outdent`
- Check if the given files are formatted, print a human-friendly summary
- message and paths to unformatted files (see also --list-different).
- `
- },
- color: {
- type: "boolean",
- default: true,
- description: "Colorize error messages.",
- oppositeDescription: "Do not colorize error messages."
- },
- config: {
- type: "path",
- category: coreOptions.CATEGORY_CONFIG,
- description: "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).",
- oppositeDescription: "Do not look for a configuration file.",
- exception: (value) => value === false
- },
- "config-precedence": {
- type: "choice",
- category: coreOptions.CATEGORY_CONFIG,
- default: "cli-override",
- choices: [{
- value: "cli-override",
- description: "CLI options take precedence over config file"
- }, {
- value: "file-override",
- description: "Config file take precedence over CLI options"
- }, {
- value: "prefer-file",
- description: outdent`
- If a config file is found will evaluate it and ignore other CLI options.
- If no config file is found CLI options will evaluate as normal.
- `
- }],
- description: "Define in which order config files and CLI options should be evaluated."
- },
- "debug-benchmark": {
- type: "boolean"
- },
- "debug-check": {
- type: "boolean"
- },
- "debug-print-doc": {
- type: "boolean"
- },
- "debug-print-comments": {
- type: "boolean"
- },
- "debug-print-ast": {
- type: "boolean"
- },
- "debug-repeat": {
- type: "int",
- default: 0
- },
- editorconfig: {
- type: "boolean",
- category: coreOptions.CATEGORY_CONFIG,
- description: "Take .editorconfig into account when parsing configuration.",
- oppositeDescription: "Don't take .editorconfig into account when parsing configuration.",
- default: true
- },
- "error-on-unmatched-pattern": {
- type: "boolean",
- oppositeDescription: "Prevent errors when pattern is unmatched."
- },
- "find-config-path": {
- type: "path",
- category: coreOptions.CATEGORY_CONFIG,
- description: "Find and print the path to a configuration file for the given input file."
- },
- "file-info": {
- type: "path",
- description: outdent`
- Extract the following info (as JSON) for a given file path. Reported fields:
- * ignored (boolean) - true if file path is filtered by --ignore-path
- * inferredParser (string | null) - name of parser inferred from file path
- `
- },
- help: {
- type: "flag",
- alias: "h",
- description: outdent`
- Show CLI usage, or details about the given flag.
- Example: --help write
- `,
- exception: (value) => value === ""
- },
- "ignore-path": {
- type: "path",
- category: coreOptions.CATEGORY_CONFIG,
- default: ".prettierignore",
- description: "Path to a file with patterns describing files to ignore."
- },
- "ignore-unknown": {
- type: "boolean",
- alias: "u",
- description: "Ignore unknown files."
- },
- "list-different": {
- type: "boolean",
- category: coreOptions.CATEGORY_OUTPUT,
- alias: "l",
- description: "Print the names of files that are different from Prettier's formatting (see also --check)."
- },
- loglevel: {
- type: "choice",
- description: "What level of logs to report.",
- default: "log",
- choices: ["silent", "error", "warn", "log", "debug"]
- },
- "plugin-search": {
- type: "boolean",
- oppositeDescription: "Disable plugin autoloading."
- },
- "support-info": {
- type: "boolean",
- description: "Print support information as JSON."
- },
- version: {
- type: "boolean",
- alias: "v",
- description: "Print Prettier version."
- },
- "with-node-modules": {
- type: "boolean",
- category: coreOptions.CATEGORY_CONFIG,
- description: "Process files inside 'node_modules' directory."
- },
- write: {
- type: "boolean",
- alias: "w",
- category: coreOptions.CATEGORY_OUTPUT,
- description: "Edit files in-place. (Beware!)"
- }
- };
- var usageSummary = outdent`
- Usage: prettier [options] [file/dir/glob ...]
- By default, output is written to stdout.
- Stdin is read if it is piped to Prettier and no files are given.
- `;
- module2.exports = {
- categoryOrder,
- options,
- usageSummary
- };
- }
- });
- var require_dashify = __commonJS2({
- "node_modules/dashify/index.js"(exports2, module2) {
- "use strict";
- module2.exports = (str, options) => {
- if (typeof str !== "string")
- throw new TypeError("expected a string");
- 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();
- };
- }
- });
- var require_option_map = __commonJS2({
- "src/cli/options/option-map.js"(exports2, module2) {
- "use strict";
- var dashify = require_dashify();
- var {
- coreOptions
- } = require_prettier_internal();
- function normalizeDetailedOption(name, option) {
- return Object.assign(Object.assign({
- category: coreOptions.CATEGORY_OTHER
- }, option), {}, {
- choices: option.choices && option.choices.map((choice) => {
- const newChoice = Object.assign({
- description: "",
- deprecated: false
- }, typeof choice === "object" ? choice : {
- value: choice
- });
- if (newChoice.value === true) {
- newChoice.value = "";
- }
- return newChoice;
- })
- });
- }
- function normalizeDetailedOptionMap(detailedOptionMap) {
- return Object.fromEntries(Object.entries(detailedOptionMap).sort(([leftName], [rightName]) => leftName.localeCompare(rightName)).map(([name, option]) => [name, normalizeDetailedOption(name, option)]));
- }
- function createDetailedOptionMap(supportOptions) {
- return Object.fromEntries(supportOptions.map((option) => {
- const newOption = Object.assign(Object.assign({}, option), {}, {
- name: option.cliName || dashify(option.name),
- description: option.cliDescription || option.description,
- category: option.cliCategory || coreOptions.CATEGORY_FORMAT,
- forwardToApi: option.name
- });
- if (option.deprecated) {
- delete newOption.forwardToApi;
- delete newOption.description;
- delete newOption.oppositeDescription;
- newOption.deprecated = true;
- }
- return [newOption.name, newOption];
- }));
- }
- module2.exports = {
- normalizeDetailedOptionMap,
- createDetailedOptionMap
- };
- }
- });
- var require_get_context_options = __commonJS2({
- "src/cli/options/get-context-options.js"(exports2, module2) {
- "use strict";
- var prettier2 = require("./index.js");
- var {
- optionsModule,
- utils: {
- arrayify
- }
- } = require_prettier_internal();
- var constant = require_constant();
- var {
- normalizeDetailedOptionMap,
- createDetailedOptionMap
- } = require_option_map();
- function getContextOptions(plugins, pluginSearchDirs) {
- const {
- options: supportOptions,
- languages
- } = prettier2.getSupportInfo({
- showDeprecated: true,
- showUnreleased: true,
- showInternal: true,
- plugins,
- pluginSearchDirs
- });
- const detailedOptionMap = normalizeDetailedOptionMap(Object.assign(Object.assign({}, createDetailedOptionMap(supportOptions)), constant.options));
- const detailedOptions = arrayify(detailedOptionMap, "name");
- const apiDefaultOptions = Object.assign(Object.assign({}, optionsModule.hiddenDefaults), Object.fromEntries(supportOptions.filter(({
- deprecated
- }) => !deprecated).map((option) => [option.name, option.default])));
- return {
- supportOptions,
- detailedOptions,
- detailedOptionMap,
- apiDefaultOptions,
- languages
- };
- }
- module2.exports = getContextOptions;
- }
- });
- var require_isArray = __commonJS2({
- "node_modules/lodash/isArray.js"(exports2, module2) {
- var isArray = Array.isArray;
- module2.exports = isArray;
- }
- });
- var require_freeGlobal = __commonJS2({
- "node_modules/lodash/_freeGlobal.js"(exports2, module2) {
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
- module2.exports = freeGlobal;
- }
- });
- var require_root = __commonJS2({
- "node_modules/lodash/_root.js"(exports2, module2) {
- var freeGlobal = require_freeGlobal();
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
- var root = freeGlobal || freeSelf || Function("return this")();
- module2.exports = root;
- }
- });
- var require_Symbol = __commonJS2({
- "node_modules/lodash/_Symbol.js"(exports2, module2) {
- var root = require_root();
- var Symbol2 = root.Symbol;
- module2.exports = Symbol2;
- }
- });
- var require_getRawTag = __commonJS2({
- "node_modules/lodash/_getRawTag.js"(exports2, module2) {
- var Symbol2 = require_Symbol();
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- var nativeObjectToString = objectProto.toString;
- var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
- try {
- value[symToStringTag] = void 0;
- var unmasked = true;
- } catch (e) {
- }
- var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
- }
- module2.exports = getRawTag;
- }
- });
- var require_objectToString = __commonJS2({
- "node_modules/lodash/_objectToString.js"(exports2, module2) {
- var objectProto = Object.prototype;
- var nativeObjectToString = objectProto.toString;
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
- module2.exports = objectToString;
- }
- });
- var require_baseGetTag = __commonJS2({
- "node_modules/lodash/_baseGetTag.js"(exports2, module2) {
- var Symbol2 = require_Symbol();
- var getRawTag = require_getRawTag();
- var objectToString = require_objectToString();
- var nullTag = "[object Null]";
- var undefinedTag = "[object Undefined]";
- var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
- function baseGetTag(value) {
- if (value == null) {
- return value === void 0 ? undefinedTag : nullTag;
- }
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
- }
- module2.exports = baseGetTag;
- }
- });
- var require_isObjectLike = __commonJS2({
- "node_modules/lodash/isObjectLike.js"(exports2, module2) {
- function isObjectLike(value) {
- return value != null && typeof value == "object";
- }
- module2.exports = isObjectLike;
- }
- });
- var require_isSymbol = __commonJS2({
- "node_modules/lodash/isSymbol.js"(exports2, module2) {
- var baseGetTag = require_baseGetTag();
- var isObjectLike = require_isObjectLike();
- var symbolTag = "[object Symbol]";
- function isSymbol(value) {
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
- }
- module2.exports = isSymbol;
- }
- });
- var require_isKey = __commonJS2({
- "node_modules/lodash/_isKey.js"(exports2, module2) {
- var isArray = require_isArray();
- var isSymbol = require_isSymbol();
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
- var reIsPlainProp = /^\w*$/;
- function isKey(value, object) {
- if (isArray(value)) {
- return false;
- }
- var type = typeof value;
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
- return true;
- }
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
- }
- module2.exports = isKey;
- }
- });
- var require_isObject = __commonJS2({
- "node_modules/lodash/isObject.js"(exports2, module2) {
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == "object" || type == "function");
- }
- module2.exports = isObject;
- }
- });
- var require_isFunction = __commonJS2({
- "node_modules/lodash/isFunction.js"(exports2, module2) {
- var baseGetTag = require_baseGetTag();
- var isObject = require_isObject();
- var asyncTag = "[object AsyncFunction]";
- var funcTag = "[object Function]";
- var genTag = "[object GeneratorFunction]";
- var proxyTag = "[object Proxy]";
- function isFunction(value) {
- if (!isObject(value)) {
- return false;
- }
- var tag = baseGetTag(value);
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
- }
- module2.exports = isFunction;
- }
- });
- var require_coreJsData = __commonJS2({
- "node_modules/lodash/_coreJsData.js"(exports2, module2) {
- var root = require_root();
- var coreJsData = root["__core-js_shared__"];
- module2.exports = coreJsData;
- }
- });
- var require_isMasked = __commonJS2({
- "node_modules/lodash/_isMasked.js"(exports2, module2) {
- var coreJsData = require_coreJsData();
- var maskSrcKey = function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
- return uid ? "Symbol(src)_1." + uid : "";
- }();
- function isMasked(func) {
- return !!maskSrcKey && maskSrcKey in func;
- }
- module2.exports = isMasked;
- }
- });
- var require_toSource = __commonJS2({
- "node_modules/lodash/_toSource.js"(exports2, module2) {
- var funcProto = Function.prototype;
- var funcToString = funcProto.toString;
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {
- }
- try {
- return func + "";
- } catch (e) {
- }
- }
- return "";
- }
- module2.exports = toSource;
- }
- });
- var require_baseIsNative = __commonJS2({
- "node_modules/lodash/_baseIsNative.js"(exports2, module2) {
- var isFunction = require_isFunction();
- var isMasked = require_isMasked();
- var isObject = require_isObject();
- var toSource = require_toSource();
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
- var funcProto = Function.prototype;
- var objectProto = Object.prototype;
- var funcToString = funcProto.toString;
- var hasOwnProperty = objectProto.hasOwnProperty;
- var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
- function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
- }
- module2.exports = baseIsNative;
- }
- });
- var require_getValue = __commonJS2({
- "node_modules/lodash/_getValue.js"(exports2, module2) {
- function getValue(object, key) {
- return object == null ? void 0 : object[key];
- }
- module2.exports = getValue;
- }
- });
- var require_getNative = __commonJS2({
- "node_modules/lodash/_getNative.js"(exports2, module2) {
- var baseIsNative = require_baseIsNative();
- var getValue = require_getValue();
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : void 0;
- }
- module2.exports = getNative;
- }
- });
- var require_nativeCreate = __commonJS2({
- "node_modules/lodash/_nativeCreate.js"(exports2, module2) {
- var getNative = require_getNative();
- var nativeCreate = getNative(Object, "create");
- module2.exports = nativeCreate;
- }
- });
- var require_hashClear = __commonJS2({
- "node_modules/lodash/_hashClear.js"(exports2, module2) {
- var nativeCreate = require_nativeCreate();
- function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- this.size = 0;
- }
- module2.exports = hashClear;
- }
- });
- var require_hashDelete = __commonJS2({
- "node_modules/lodash/_hashDelete.js"(exports2, module2) {
- function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key];
- this.size -= result ? 1 : 0;
- return result;
- }
- module2.exports = hashDelete;
- }
- });
- var require_hashGet = __commonJS2({
- "node_modules/lodash/_hashGet.js"(exports2, module2) {
- var nativeCreate = require_nativeCreate();
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? void 0 : result;
- }
- return hasOwnProperty.call(data, key) ? data[key] : void 0;
- }
- module2.exports = hashGet;
- }
- });
- var require_hashHas = __commonJS2({
- "node_modules/lodash/_hashHas.js"(exports2, module2) {
- var nativeCreate = require_nativeCreate();
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
- }
- module2.exports = hashHas;
- }
- });
- var require_hashSet = __commonJS2({
- "node_modules/lodash/_hashSet.js"(exports2, module2) {
- var nativeCreate = require_nativeCreate();
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
- function hashSet(key, value) {
- var data = this.__data__;
- this.size += this.has(key) ? 0 : 1;
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
- return this;
- }
- module2.exports = hashSet;
- }
- });
- var require_Hash = __commonJS2({
- "node_modules/lodash/_Hash.js"(exports2, module2) {
- var hashClear = require_hashClear();
- var hashDelete = require_hashDelete();
- var hashGet = require_hashGet();
- var hashHas = require_hashHas();
- var hashSet = require_hashSet();
- function Hash(entries) {
- var index = -1, length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- Hash.prototype.clear = hashClear;
- Hash.prototype["delete"] = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
- module2.exports = Hash;
- }
- });
- var require_listCacheClear = __commonJS2({
- "node_modules/lodash/_listCacheClear.js"(exports2, module2) {
- function listCacheClear() {
- this.__data__ = [];
- this.size = 0;
- }
- module2.exports = listCacheClear;
- }
- });
- var require_eq = __commonJS2({
- "node_modules/lodash/eq.js"(exports2, module2) {
- function eq(value, other) {
- return value === other || value !== value && other !== other;
- }
- module2.exports = eq;
- }
- });
- var require_assocIndexOf = __commonJS2({
- "node_modules/lodash/_assocIndexOf.js"(exports2, module2) {
- var eq = require_eq();
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
- module2.exports = assocIndexOf;
- }
- });
- var require_listCacheDelete = __commonJS2({
- "node_modules/lodash/_listCacheDelete.js"(exports2, module2) {
- var assocIndexOf = require_assocIndexOf();
- var arrayProto = Array.prototype;
- var splice = arrayProto.splice;
- function listCacheDelete(key) {
- var data = this.__data__, index = assocIndexOf(data, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
- }
- --this.size;
- return true;
- }
- module2.exports = listCacheDelete;
- }
- });
- var require_listCacheGet = __commonJS2({
- "node_modules/lodash/_listCacheGet.js"(exports2, module2) {
- var assocIndexOf = require_assocIndexOf();
- function listCacheGet(key) {
- var data = this.__data__, index = assocIndexOf(data, key);
- return index < 0 ? void 0 : data[index][1];
- }
- module2.exports = listCacheGet;
- }
- });
- var require_listCacheHas = __commonJS2({
- "node_modules/lodash/_listCacheHas.js"(exports2, module2) {
- var assocIndexOf = require_assocIndexOf();
- function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
- }
- module2.exports = listCacheHas;
- }
- });
- var require_listCacheSet = __commonJS2({
- "node_modules/lodash/_listCacheSet.js"(exports2, module2) {
- var assocIndexOf = require_assocIndexOf();
- function listCacheSet(key, value) {
- var data = this.__data__, index = assocIndexOf(data, key);
- if (index < 0) {
- ++this.size;
- data.push([key, value]);
- } else {
- data[index][1] = value;
- }
- return this;
- }
- module2.exports = listCacheSet;
- }
- });
- var require_ListCache = __commonJS2({
- "node_modules/lodash/_ListCache.js"(exports2, module2) {
- var listCacheClear = require_listCacheClear();
- var listCacheDelete = require_listCacheDelete();
- var listCacheGet = require_listCacheGet();
- var listCacheHas = require_listCacheHas();
- var listCacheSet = require_listCacheSet();
- function ListCache(entries) {
- var index = -1, length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype["delete"] = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
- module2.exports = ListCache;
- }
- });
- var require_Map = __commonJS2({
- "node_modules/lodash/_Map.js"(exports2, module2) {
- var getNative = require_getNative();
- var root = require_root();
- var Map2 = getNative(root, "Map");
- module2.exports = Map2;
- }
- });
- var require_mapCacheClear = __commonJS2({
- "node_modules/lodash/_mapCacheClear.js"(exports2, module2) {
- var Hash = require_Hash();
- var ListCache = require_ListCache();
- var Map2 = require_Map();
- function mapCacheClear() {
- this.size = 0;
- this.__data__ = {
- "hash": new Hash(),
- "map": new (Map2 || ListCache)(),
- "string": new Hash()
- };
- }
- module2.exports = mapCacheClear;
- }
- });
- var require_isKeyable = __commonJS2({
- "node_modules/lodash/_isKeyable.js"(exports2, module2) {
- function isKeyable(value) {
- var type = typeof value;
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
- }
- module2.exports = isKeyable;
- }
- });
- var require_getMapData = __commonJS2({
- "node_modules/lodash/_getMapData.js"(exports2, module2) {
- var isKeyable = require_isKeyable();
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
- }
- module2.exports = getMapData;
- }
- });
- var require_mapCacheDelete = __commonJS2({
- "node_modules/lodash/_mapCacheDelete.js"(exports2, module2) {
- var getMapData = require_getMapData();
- function mapCacheDelete(key) {
- var result = getMapData(this, key)["delete"](key);
- this.size -= result ? 1 : 0;
- return result;
- }
- module2.exports = mapCacheDelete;
- }
- });
- var require_mapCacheGet = __commonJS2({
- "node_modules/lodash/_mapCacheGet.js"(exports2, module2) {
- var getMapData = require_getMapData();
- function mapCacheGet(key) {
- return getMapData(this, key).get(key);
- }
- module2.exports = mapCacheGet;
- }
- });
- var require_mapCacheHas = __commonJS2({
- "node_modules/lodash/_mapCacheHas.js"(exports2, module2) {
- var getMapData = require_getMapData();
- function mapCacheHas(key) {
- return getMapData(this, key).has(key);
- }
- module2.exports = mapCacheHas;
- }
- });
- var require_mapCacheSet = __commonJS2({
- "node_modules/lodash/_mapCacheSet.js"(exports2, module2) {
- var getMapData = require_getMapData();
- function mapCacheSet(key, value) {
- var data = getMapData(this, key), size = data.size;
- data.set(key, value);
- this.size += data.size == size ? 0 : 1;
- return this;
- }
- module2.exports = mapCacheSet;
- }
- });
- var require_MapCache = __commonJS2({
- "node_modules/lodash/_MapCache.js"(exports2, module2) {
- var mapCacheClear = require_mapCacheClear();
- var mapCacheDelete = require_mapCacheDelete();
- var mapCacheGet = require_mapCacheGet();
- var mapCacheHas = require_mapCacheHas();
- var mapCacheSet = require_mapCacheSet();
- function MapCache(entries) {
- var index = -1, length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype["delete"] = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
- module2.exports = MapCache;
- }
- });
- var require_memoize = __commonJS2({
- "node_modules/lodash/memoize.js"(exports2, module2) {
- var MapCache = require_MapCache();
- var FUNC_ERROR_TEXT = "Expected a function";
- function memoize(func, resolver) {
- if (typeof func != "function" || resolver != null && typeof resolver != "function") {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var memoized = function() {
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
- if (cache.has(key)) {
- return cache.get(key);
- }
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result) || cache;
- return result;
- };
- memoized.cache = new (memoize.Cache || MapCache)();
- return memoized;
- }
- memoize.Cache = MapCache;
- module2.exports = memoize;
- }
- });
- var require_memoizeCapped = __commonJS2({
- "node_modules/lodash/_memoizeCapped.js"(exports2, module2) {
- var memoize = require_memoize();
- var MAX_MEMOIZE_SIZE = 500;
- function memoizeCapped(func) {
- var result = memoize(func, function(key) {
- if (cache.size === MAX_MEMOIZE_SIZE) {
- cache.clear();
- }
- return key;
- });
- var cache = result.cache;
- return result;
- }
- module2.exports = memoizeCapped;
- }
- });
- var require_stringToPath = __commonJS2({
- "node_modules/lodash/_stringToPath.js"(exports2, module2) {
- var memoizeCapped = require_memoizeCapped();
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
- var reEscapeChar = /\\(\\)?/g;
- var stringToPath = memoizeCapped(function(string) {
- var result = [];
- if (string.charCodeAt(0) === 46) {
- result.push("");
- }
- string.replace(rePropName, function(match, number, quote, subString) {
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
- });
- return result;
- });
- module2.exports = stringToPath;
- }
- });
- var require_arrayMap = __commonJS2({
- "node_modules/lodash/_arrayMap.js"(exports2, module2) {
- function arrayMap(array, iteratee) {
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
- }
- module2.exports = arrayMap;
- }
- });
- var require_baseToString = __commonJS2({
- "node_modules/lodash/_baseToString.js"(exports2, module2) {
- var Symbol2 = require_Symbol();
- var arrayMap = require_arrayMap();
- var isArray = require_isArray();
- var isSymbol = require_isSymbol();
- var INFINITY = 1 / 0;
- var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
- var symbolToString = symbolProto ? symbolProto.toString : void 0;
- function baseToString(value) {
- if (typeof value == "string") {
- return value;
- }
- if (isArray(value)) {
- return arrayMap(value, baseToString) + "";
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : "";
- }
- var result = value + "";
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
- }
- module2.exports = baseToString;
- }
- });
- var require_toString = __commonJS2({
- "node_modules/lodash/toString.js"(exports2, module2) {
- var baseToString = require_baseToString();
- function toString(value) {
- return value == null ? "" : baseToString(value);
- }
- module2.exports = toString;
- }
- });
- var require_castPath = __commonJS2({
- "node_modules/lodash/_castPath.js"(exports2, module2) {
- var isArray = require_isArray();
- var isKey = require_isKey();
- var stringToPath = require_stringToPath();
- var toString = require_toString();
- function castPath(value, object) {
- if (isArray(value)) {
- return value;
- }
- return isKey(value, object) ? [value] : stringToPath(toString(value));
- }
- module2.exports = castPath;
- }
- });
- var require_toKey = __commonJS2({
- "node_modules/lodash/_toKey.js"(exports2, module2) {
- var isSymbol = require_isSymbol();
- var INFINITY = 1 / 0;
- function toKey(value) {
- if (typeof value == "string" || isSymbol(value)) {
- return value;
- }
- var result = value + "";
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
- }
- module2.exports = toKey;
- }
- });
- var require_baseGet = __commonJS2({
- "node_modules/lodash/_baseGet.js"(exports2, module2) {
- var castPath = require_castPath();
- var toKey = require_toKey();
- function baseGet(object, path) {
- path = castPath(path, object);
- var index = 0, length = path.length;
- while (object != null && index < length) {
- object = object[toKey(path[index++])];
- }
- return index && index == length ? object : void 0;
- }
- module2.exports = baseGet;
- }
- });
- var require_defineProperty = __commonJS2({
- "node_modules/lodash/_defineProperty.js"(exports2, module2) {
- var getNative = require_getNative();
- var defineProperty = function() {
- try {
- var func = getNative(Object, "defineProperty");
- func({}, "", {});
- return func;
- } catch (e) {
- }
- }();
- module2.exports = defineProperty;
- }
- });
- var require_baseAssignValue = __commonJS2({
- "node_modules/lodash/_baseAssignValue.js"(exports2, module2) {
- var defineProperty = require_defineProperty();
- function baseAssignValue(object, key, value) {
- if (key == "__proto__" && defineProperty) {
- defineProperty(object, key, {
- "configurable": true,
- "enumerable": true,
- "value": value,
- "writable": true
- });
- } else {
- object[key] = value;
- }
- }
- module2.exports = baseAssignValue;
- }
- });
- var require_assignValue = __commonJS2({
- "node_modules/lodash/_assignValue.js"(exports2, module2) {
- var baseAssignValue = require_baseAssignValue();
- var eq = require_eq();
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
- baseAssignValue(object, key, value);
- }
- }
- module2.exports = assignValue;
- }
- });
- var require_isIndex = __commonJS2({
- "node_modules/lodash/_isIndex.js"(exports2, module2) {
- var MAX_SAFE_INTEGER = 9007199254740991;
- var reIsUint = /^(?:0|[1-9]\d*)$/;
- function isIndex(value, length) {
- var type = typeof value;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
- }
- module2.exports = isIndex;
- }
- });
- var require_baseSet = __commonJS2({
- "node_modules/lodash/_baseSet.js"(exports2, module2) {
- var assignValue = require_assignValue();
- var castPath = require_castPath();
- var isIndex = require_isIndex();
- var isObject = require_isObject();
- var toKey = require_toKey();
- function baseSet(object, path, value, customizer) {
- if (!isObject(object)) {
- return object;
- }
- path = castPath(path, object);
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
- while (nested != null && ++index < length) {
- var key = toKey(path[index]), newValue = value;
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
- return object;
- }
- if (index != lastIndex) {
- var objValue = nested[key];
- newValue = customizer ? customizer(objValue, key, nested) : void 0;
- if (newValue === void 0) {
- newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
- }
- }
- assignValue(nested, key, newValue);
- nested = nested[key];
- }
- return object;
- }
- module2.exports = baseSet;
- }
- });
- var require_basePickBy = __commonJS2({
- "node_modules/lodash/_basePickBy.js"(exports2, module2) {
- var baseGet = require_baseGet();
- var baseSet = require_baseSet();
- var castPath = require_castPath();
- function basePickBy(object, paths, predicate) {
- var index = -1, length = paths.length, result = {};
- while (++index < length) {
- var path = paths[index], value = baseGet(object, path);
- if (predicate(value, path)) {
- baseSet(result, castPath(path, object), value);
- }
- }
- return result;
- }
- module2.exports = basePickBy;
- }
- });
- var require_baseHasIn = __commonJS2({
- "node_modules/lodash/_baseHasIn.js"(exports2, module2) {
- function baseHasIn(object, key) {
- return object != null && key in Object(object);
- }
- module2.exports = baseHasIn;
- }
- });
- var require_baseIsArguments = __commonJS2({
- "node_modules/lodash/_baseIsArguments.js"(exports2, module2) {
- var baseGetTag = require_baseGetTag();
- var isObjectLike = require_isObjectLike();
- var argsTag = "[object Arguments]";
- function baseIsArguments(value) {
- return isObjectLike(value) && baseGetTag(value) == argsTag;
- }
- module2.exports = baseIsArguments;
- }
- });
- var require_isArguments = __commonJS2({
- "node_modules/lodash/isArguments.js"(exports2, module2) {
- var baseIsArguments = require_baseIsArguments();
- var isObjectLike = require_isObjectLike();
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
- var isArguments = baseIsArguments(function() {
- return arguments;
- }()) ? baseIsArguments : function(value) {
- return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
- };
- module2.exports = isArguments;
- }
- });
- var require_isLength = __commonJS2({
- "node_modules/lodash/isLength.js"(exports2, module2) {
- var MAX_SAFE_INTEGER = 9007199254740991;
- function isLength(value) {
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
- module2.exports = isLength;
- }
- });
- var require_hasPath = __commonJS2({
- "node_modules/lodash/_hasPath.js"(exports2, module2) {
- var castPath = require_castPath();
- var isArguments = require_isArguments();
- var isArray = require_isArray();
- var isIndex = require_isIndex();
- var isLength = require_isLength();
- var toKey = require_toKey();
- function hasPath(object, path, hasFunc) {
- path = castPath(path, object);
- var index = -1, length = path.length, result = false;
- while (++index < length) {
- var key = toKey(path[index]);
- if (!(result = object != null && hasFunc(object, key))) {
- break;
- }
- object = object[key];
- }
- if (result || ++index != length) {
- return result;
- }
- length = object == null ? 0 : object.length;
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
- }
- module2.exports = hasPath;
- }
- });
- var require_hasIn = __commonJS2({
- "node_modules/lodash/hasIn.js"(exports2, module2) {
- var baseHasIn = require_baseHasIn();
- var hasPath = require_hasPath();
- function hasIn(object, path) {
- return object != null && hasPath(object, path, baseHasIn);
- }
- module2.exports = hasIn;
- }
- });
- var require_basePick = __commonJS2({
- "node_modules/lodash/_basePick.js"(exports2, module2) {
- var basePickBy = require_basePickBy();
- var hasIn = require_hasIn();
- function basePick(object, paths) {
- return basePickBy(object, paths, function(value, path) {
- return hasIn(object, path);
- });
- }
- module2.exports = basePick;
- }
- });
- var require_arrayPush = __commonJS2({
- "node_modules/lodash/_arrayPush.js"(exports2, module2) {
- function arrayPush(array, values) {
- var index = -1, length = values.length, offset = array.length;
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
- module2.exports = arrayPush;
- }
- });
- var require_isFlattenable = __commonJS2({
- "node_modules/lodash/_isFlattenable.js"(exports2, module2) {
- var Symbol2 = require_Symbol();
- var isArguments = require_isArguments();
- var isArray = require_isArray();
- var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0;
- function isFlattenable(value) {
- return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
- }
- module2.exports = isFlattenable;
- }
- });
- var require_baseFlatten = __commonJS2({
- "node_modules/lodash/_baseFlatten.js"(exports2, module2) {
- var arrayPush = require_arrayPush();
- var isFlattenable = require_isFlattenable();
- function baseFlatten(array, depth, predicate, isStrict, result) {
- var index = -1, length = array.length;
- predicate || (predicate = isFlattenable);
- result || (result = []);
- while (++index < length) {
- var value = array[index];
- if (depth > 0 && predicate(value)) {
- if (depth > 1) {
- baseFlatten(value, depth - 1, predicate, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
- }
- return result;
- }
- module2.exports = baseFlatten;
- }
- });
- var require_flatten = __commonJS2({
- "node_modules/lodash/flatten.js"(exports2, module2) {
- var baseFlatten = require_baseFlatten();
- function flatten(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseFlatten(array, 1) : [];
- }
- module2.exports = flatten;
- }
- });
- var require_apply = __commonJS2({
- "node_modules/lodash/_apply.js"(exports2, module2) {
- function apply(func, thisArg, args) {
- switch (args.length) {
- case 0:
- return func.call(thisArg);
- case 1:
- return func.call(thisArg, args[0]);
- case 2:
- return func.call(thisArg, args[0], args[1]);
- case 3:
- return func.call(thisArg, args[0], args[1], args[2]);
- }
- return func.apply(thisArg, args);
- }
- module2.exports = apply;
- }
- });
- var require_overRest = __commonJS2({
- "node_modules/lodash/_overRest.js"(exports2, module2) {
- var apply = require_apply();
- var nativeMax = Math.max;
- function overRest(func, start, transform) {
- start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
- return function() {
- var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = transform(array);
- return apply(func, this, otherArgs);
- };
- }
- module2.exports = overRest;
- }
- });
- var require_constant2 = __commonJS2({
- "node_modules/lodash/constant.js"(exports2, module2) {
- function constant(value) {
- return function() {
- return value;
- };
- }
- module2.exports = constant;
- }
- });
- var require_identity = __commonJS2({
- "node_modules/lodash/identity.js"(exports2, module2) {
- function identity(value) {
- return value;
- }
- module2.exports = identity;
- }
- });
- var require_baseSetToString = __commonJS2({
- "node_modules/lodash/_baseSetToString.js"(exports2, module2) {
- var constant = require_constant2();
- var defineProperty = require_defineProperty();
- var identity = require_identity();
- var baseSetToString = !defineProperty ? identity : function(func, string) {
- return defineProperty(func, "toString", {
- "configurable": true,
- "enumerable": false,
- "value": constant(string),
- "writable": true
- });
- };
- module2.exports = baseSetToString;
- }
- });
- var require_shortOut = __commonJS2({
- "node_modules/lodash/_shortOut.js"(exports2, module2) {
- var HOT_COUNT = 800;
- var HOT_SPAN = 16;
- var nativeNow = Date.now;
- function shortOut(func) {
- var count = 0, lastCalled = 0;
- return function() {
- var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return arguments[0];
- }
- } else {
- count = 0;
- }
- return func.apply(void 0, arguments);
- };
- }
- module2.exports = shortOut;
- }
- });
- var require_setToString = __commonJS2({
- "node_modules/lodash/_setToString.js"(exports2, module2) {
- var baseSetToString = require_baseSetToString();
- var shortOut = require_shortOut();
- var setToString = shortOut(baseSetToString);
- module2.exports = setToString;
- }
- });
- var require_flatRest = __commonJS2({
- "node_modules/lodash/_flatRest.js"(exports2, module2) {
- var flatten = require_flatten();
- var overRest = require_overRest();
- var setToString = require_setToString();
- function flatRest(func) {
- return setToString(overRest(func, void 0, flatten), func + "");
- }
- module2.exports = flatRest;
- }
- });
- var require_pick = __commonJS2({
- "node_modules/lodash/pick.js"(exports2, module2) {
- var basePick = require_basePick();
- var flatRest = require_flatRest();
- var pick = flatRest(function(object, paths) {
- return object == null ? {} : basePick(object, paths);
- });
- module2.exports = pick;
- }
- });
- var require_camelcase = __commonJS2({
- "node_modules/camelcase/index.js"(exports2, module2) {
- "use strict";
- var UPPERCASE = /[\p{Lu}]/u;
- var LOWERCASE = /[\p{Ll}]/u;
- var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
- var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
- var SEPARATORS = /[_.\- ]+/;
- var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
- var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
- var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
- var preserveCamelCase = (string, toLowerCase, toUpperCase) => {
- let isLastCharLower = false;
- let isLastCharUpper = false;
- let isLastLastCharUpper = false;
- for (let i = 0; i < string.length; i++) {
- const character = string[i];
- if (isLastCharLower && UPPERCASE.test(character)) {
- string = string.slice(0, i) + "-" + string.slice(i);
- isLastCharLower = false;
- isLastLastCharUpper = isLastCharUpper;
- isLastCharUpper = true;
- i++;
- } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
- string = string.slice(0, i - 1) + "-" + string.slice(i - 1);
- isLastLastCharUpper = isLastCharUpper;
- isLastCharUpper = false;
- isLastCharLower = true;
- } else {
- isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
- isLastLastCharUpper = isLastCharUpper;
- isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
- }
- }
- return string;
- };
- var preserveConsecutiveUppercase = (input, toLowerCase) => {
- LEADING_CAPITAL.lastIndex = 0;
- return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
- };
- var postProcess = (input, toUpperCase) => {
- SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
- NUMBERS_AND_IDENTIFIER.lastIndex = 0;
- return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
- };
- var camelCase = (input, options) => {
- if (!(typeof input === "string" || Array.isArray(input))) {
- throw new TypeError("Expected the input to be `string | string[]`");
- }
- options = Object.assign({
- pascalCase: false,
- preserveConsecutiveUppercase: false
- }, options);
- if (Array.isArray(input)) {
- input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
- } else {
- input = input.trim();
- }
- if (input.length === 0) {
- return "";
- }
- const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
- const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
- if (input.length === 1) {
- return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
- }
- const hasUpperCase = input !== toLowerCase(input);
- if (hasUpperCase) {
- input = preserveCamelCase(input, toLowerCase, toUpperCase);
- }
- input = input.replace(LEADING_SEPARATORS, "");
- if (options.preserveConsecutiveUppercase) {
- input = preserveConsecutiveUppercase(input, toLowerCase);
- } else {
- input = toLowerCase(input);
- }
- if (options.pascalCase) {
- input = toUpperCase(input.charAt(0)) + input.slice(1);
- }
- return postProcess(input, toUpperCase);
- };
- module2.exports = camelCase;
- module2.exports.default = camelCase;
- }
- });
- var require_minimist = __commonJS2({
- "node_modules/minimist/index.js"(exports2, module2) {
- module2.exports = function(args, opts) {
- if (!opts)
- opts = {};
- var flags = {
- bools: {},
- strings: {},
- unknownFn: null
- };
- if (typeof opts["unknown"] === "function") {
- flags.unknownFn = opts["unknown"];
- }
- if (typeof opts["boolean"] === "boolean" && opts["boolean"]) {
- flags.allBools = true;
- } else {
- [].concat(opts["boolean"]).filter(Boolean).forEach(function(key2) {
- flags.bools[key2] = true;
- });
- }
- var aliases = {};
- Object.keys(opts.alias || {}).forEach(function(key2) {
- aliases[key2] = [].concat(opts.alias[key2]);
- aliases[key2].forEach(function(x) {
- aliases[x] = [key2].concat(aliases[key2].filter(function(y) {
- return x !== y;
- }));
- });
- });
- [].concat(opts.string).filter(Boolean).forEach(function(key2) {
- flags.strings[key2] = true;
- if (aliases[key2]) {
- flags.strings[aliases[key2]] = true;
- }
- });
- var defaults = opts["default"] || {};
- var argv = {
- _: []
- };
- Object.keys(flags.bools).forEach(function(key2) {
- setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
- });
- var notFlags = [];
- if (args.indexOf("--") !== -1) {
- notFlags = args.slice(args.indexOf("--") + 1);
- args = args.slice(0, args.indexOf("--"));
- }
- function argDefined(key2, arg2) {
- return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
- }
- function setArg(key2, val, arg2) {
- if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
- if (flags.unknownFn(arg2) === false)
- return;
- }
- var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
- setKey(argv, key2.split("."), value2);
- (aliases[key2] || []).forEach(function(x) {
- setKey(argv, x.split("."), value2);
- });
- }
- function setKey(obj, keys, value2) {
- var o = obj;
- for (var i2 = 0; i2 < keys.length - 1; i2++) {
- var key2 = keys[i2];
- if (isConstructorOrProto(o, key2))
- return;
- if (o[key2] === void 0)
- o[key2] = {};
- if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype)
- o[key2] = {};
- if (o[key2] === Array.prototype)
- o[key2] = [];
- o = o[key2];
- }
- var key2 = keys[keys.length - 1];
- if (isConstructorOrProto(o, key2))
- return;
- if (o === Object.prototype || o === Number.prototype || o === String.prototype)
- o = {};
- if (o === Array.prototype)
- o = [];
- if (o[key2] === void 0 || flags.bools[key2] || typeof o[key2] === "boolean") {
- o[key2] = value2;
- } else if (Array.isArray(o[key2])) {
- o[key2].push(value2);
- } else {
- o[key2] = [o[key2], value2];
- }
- }
- function aliasIsBoolean(key2) {
- return aliases[key2].some(function(x) {
- return flags.bools[x];
- });
- }
- for (var i = 0; i < args.length; i++) {
- var arg = args[i];
- if (/^--.+=/.test(arg)) {
- var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- var key = m[1];
- var value = m[2];
- if (flags.bools[key]) {
- value = value !== "false";
- }
- setArg(key, value, arg);
- } else if (/^--no-.+/.test(arg)) {
- var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false, arg);
- } else if (/^--.+/.test(arg)) {
- var key = arg.match(/^--(.+)/)[1];
- var next = args[i + 1];
- if (next !== void 0 && !/^-/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
- setArg(key, next, arg);
- i++;
- } else if (/^(true|false)$/.test(next)) {
- setArg(key, next === "true", arg);
- i++;
- } else {
- setArg(key, flags.strings[key] ? "" : true, arg);
- }
- } else if (/^-[^-]+/.test(arg)) {
- var letters = arg.slice(1, -1).split("");
- var broken = false;
- for (var j = 0; j < letters.length; j++) {
- var next = arg.slice(j + 2);
- if (next === "-") {
- setArg(letters[j], next, arg);
- continue;
- }
- if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
- setArg(letters[j], next.split("=")[1], arg);
- broken = true;
- break;
- }
- if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next, arg);
- broken = true;
- break;
- }
- if (letters[j + 1] && letters[j + 1].match(/\W/)) {
- setArg(letters[j], arg.slice(j + 2), arg);
- broken = true;
- break;
- } else {
- setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg);
- }
- }
- var key = arg.slice(-1)[0];
- if (!broken && key !== "-") {
- if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
- setArg(key, args[i + 1], arg);
- i++;
- } else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
- setArg(key, args[i + 1] === "true", arg);
- i++;
- } else {
- setArg(key, flags.strings[key] ? "" : true, arg);
- }
- }
- } else {
- if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
- argv._.push(flags.strings["_"] || !isNumber(arg) ? arg : Number(arg));
- }
- if (opts.stopEarly) {
- argv._.push.apply(argv._, args.slice(i + 1));
- break;
- }
- }
- }
- Object.keys(defaults).forEach(function(key2) {
- if (!hasKey(argv, key2.split("."))) {
- setKey(argv, key2.split("."), defaults[key2]);
- (aliases[key2] || []).forEach(function(x) {
- setKey(argv, x.split("."), defaults[key2]);
- });
- }
- });
- if (opts["--"]) {
- argv["--"] = new Array();
- notFlags.forEach(function(key2) {
- argv["--"].push(key2);
- });
- } else {
- notFlags.forEach(function(key2) {
- argv._.push(key2);
- });
- }
- return argv;
- };
- function hasKey(obj, keys) {
- var o = obj;
- keys.slice(0, -1).forEach(function(key2) {
- o = o[key2] || {};
- });
- var key = keys[keys.length - 1];
- return key in o;
- }
- function isNumber(x) {
- if (typeof x === "number")
- return true;
- if (/^0x[0-9a-f]+$/i.test(x))
- return true;
- return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
- }
- function isConstructorOrProto(obj, key) {
- return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
- }
- }
- });
- var require_minimist2 = __commonJS2({
- "src/cli/options/minimist.js"(exports2, module2) {
- "use strict";
- var minimist = require_minimist();
- var PLACEHOLDER = null;
- module2.exports = function(args, options) {
- const boolean = options.boolean || [];
- const defaults = options.default || {};
- const booleanWithoutDefault = boolean.filter((key) => !(key in defaults));
- const newDefaults = Object.assign(Object.assign({}, defaults), Object.fromEntries(booleanWithoutDefault.map((key) => [key, PLACEHOLDER])));
- const parsed = minimist(args, Object.assign(Object.assign({}, options), {}, {
- default: newDefaults
- }));
- return Object.fromEntries(Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER));
- };
- }
- });
- var require_arrayAggregator = __commonJS2({
- "node_modules/lodash/_arrayAggregator.js"(exports2, module2) {
- function arrayAggregator(array, setter, iteratee, accumulator) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) {
- var value = array[index];
- setter(accumulator, value, iteratee(value), array);
- }
- return accumulator;
- }
- module2.exports = arrayAggregator;
- }
- });
- var require_createBaseFor = __commonJS2({
- "node_modules/lodash/_createBaseFor.js"(exports2, module2) {
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
- module2.exports = createBaseFor;
- }
- });
- var require_baseFor = __commonJS2({
- "node_modules/lodash/_baseFor.js"(exports2, module2) {
- var createBaseFor = require_createBaseFor();
- var baseFor = createBaseFor();
- module2.exports = baseFor;
- }
- });
- var require_baseTimes = __commonJS2({
- "node_modules/lodash/_baseTimes.js"(exports2, module2) {
- function baseTimes(n, iteratee) {
- var index = -1, result = Array(n);
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
- module2.exports = baseTimes;
- }
- });
- var require_stubFalse = __commonJS2({
- "node_modules/lodash/stubFalse.js"(exports2, module2) {
- function stubFalse() {
- return false;
- }
- module2.exports = stubFalse;
- }
- });
- var require_isBuffer = __commonJS2({
- "node_modules/lodash/isBuffer.js"(exports2, module2) {
- var root = require_root();
- var stubFalse = require_stubFalse();
- var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2;
- var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
- var moduleExports = freeModule && freeModule.exports === freeExports;
- var Buffer2 = moduleExports ? root.Buffer : void 0;
- var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
- var isBuffer = nativeIsBuffer || stubFalse;
- module2.exports = isBuffer;
- }
- });
- var require_baseIsTypedArray = __commonJS2({
- "node_modules/lodash/_baseIsTypedArray.js"(exports2, module2) {
- var baseGetTag = require_baseGetTag();
- var isLength = require_isLength();
- var isObjectLike = require_isObjectLike();
- var argsTag = "[object Arguments]";
- var arrayTag = "[object Array]";
- var boolTag = "[object Boolean]";
- var dateTag = "[object Date]";
- var errorTag = "[object Error]";
- var funcTag = "[object Function]";
- var mapTag = "[object Map]";
- var numberTag = "[object Number]";
- var objectTag = "[object Object]";
- var regexpTag = "[object RegExp]";
- var setTag = "[object Set]";
- var stringTag = "[object String]";
- var weakMapTag = "[object WeakMap]";
- var arrayBufferTag = "[object ArrayBuffer]";
- var dataViewTag = "[object DataView]";
- var float32Tag = "[object Float32Array]";
- var float64Tag = "[object Float64Array]";
- var int8Tag = "[object Int8Array]";
- var int16Tag = "[object Int16Array]";
- var int32Tag = "[object Int32Array]";
- var uint8Tag = "[object Uint8Array]";
- var uint8ClampedTag = "[object Uint8ClampedArray]";
- var uint16Tag = "[object Uint16Array]";
- var uint32Tag = "[object Uint32Array]";
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
- 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;
- function baseIsTypedArray(value) {
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
- }
- module2.exports = baseIsTypedArray;
- }
- });
- var require_baseUnary = __commonJS2({
- "node_modules/lodash/_baseUnary.js"(exports2, module2) {
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
- module2.exports = baseUnary;
- }
- });
- var require_nodeUtil = __commonJS2({
- "node_modules/lodash/_nodeUtil.js"(exports2, module2) {
- var freeGlobal = require_freeGlobal();
- var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2;
- var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
- var moduleExports = freeModule && freeModule.exports === freeExports;
- var freeProcess = moduleExports && freeGlobal.process;
- var nodeUtil = function() {
- try {
- var types = freeModule && freeModule.require && freeModule.require("util").types;
- if (types) {
- return types;
- }
- return freeProcess && freeProcess.binding && freeProcess.binding("util");
- } catch (e) {
- }
- }();
- module2.exports = nodeUtil;
- }
- });
- var require_isTypedArray = __commonJS2({
- "node_modules/lodash/isTypedArray.js"(exports2, module2) {
- var baseIsTypedArray = require_baseIsTypedArray();
- var baseUnary = require_baseUnary();
- var nodeUtil = require_nodeUtil();
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
- module2.exports = isTypedArray;
- }
- });
- var require_arrayLikeKeys = __commonJS2({
- "node_modules/lodash/_arrayLikeKeys.js"(exports2, module2) {
- var baseTimes = require_baseTimes();
- var isArguments = require_isArguments();
- var isArray = require_isArray();
- var isBuffer = require_isBuffer();
- var isIndex = require_isIndex();
- var isTypedArray = require_isTypedArray();
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- function arrayLikeKeys(value, inherited) {
- 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;
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
- result.push(key);
- }
- }
- return result;
- }
- module2.exports = arrayLikeKeys;
- }
- });
- var require_isPrototype = __commonJS2({
- "node_modules/lodash/_isPrototype.js"(exports2, module2) {
- var objectProto = Object.prototype;
- function isPrototype(value) {
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
- return value === proto;
- }
- module2.exports = isPrototype;
- }
- });
- var require_overArg = __commonJS2({
- "node_modules/lodash/_overArg.js"(exports2, module2) {
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
- module2.exports = overArg;
- }
- });
- var require_nativeKeys = __commonJS2({
- "node_modules/lodash/_nativeKeys.js"(exports2, module2) {
- var overArg = require_overArg();
- var nativeKeys = overArg(Object.keys, Object);
- module2.exports = nativeKeys;
- }
- });
- var require_baseKeys = __commonJS2({
- "node_modules/lodash/_baseKeys.js"(exports2, module2) {
- var isPrototype = require_isPrototype();
- var nativeKeys = require_nativeKeys();
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != "constructor") {
- result.push(key);
- }
- }
- return result;
- }
- module2.exports = baseKeys;
- }
- });
- var require_isArrayLike = __commonJS2({
- "node_modules/lodash/isArrayLike.js"(exports2, module2) {
- var isFunction = require_isFunction();
- var isLength = require_isLength();
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
- module2.exports = isArrayLike;
- }
- });
- var require_keys = __commonJS2({
- "node_modules/lodash/keys.js"(exports2, module2) {
- var arrayLikeKeys = require_arrayLikeKeys();
- var baseKeys = require_baseKeys();
- var isArrayLike = require_isArrayLike();
- function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
- }
- module2.exports = keys;
- }
- });
- var require_baseForOwn = __commonJS2({
- "node_modules/lodash/_baseForOwn.js"(exports2, module2) {
- var baseFor = require_baseFor();
- var keys = require_keys();
- function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys);
- }
- module2.exports = baseForOwn;
- }
- });
- var require_createBaseEach = __commonJS2({
- "node_modules/lodash/_createBaseEach.js"(exports2, module2) {
- var isArrayLike = require_isArrayLike();
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- if (collection == null) {
- return collection;
- }
- if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee);
- }
- var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
- while (fromRight ? index-- : ++index < length) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
- }
- module2.exports = createBaseEach;
- }
- });
- var require_baseEach = __commonJS2({
- "node_modules/lodash/_baseEach.js"(exports2, module2) {
- var baseForOwn = require_baseForOwn();
- var createBaseEach = require_createBaseEach();
- var baseEach = createBaseEach(baseForOwn);
- module2.exports = baseEach;
- }
- });
- var require_baseAggregator = __commonJS2({
- "node_modules/lodash/_baseAggregator.js"(exports2, module2) {
- var baseEach = require_baseEach();
- function baseAggregator(collection, setter, iteratee, accumulator) {
- baseEach(collection, function(value, key, collection2) {
- setter(accumulator, value, iteratee(value), collection2);
- });
- return accumulator;
- }
- module2.exports = baseAggregator;
- }
- });
- var require_stackClear = __commonJS2({
- "node_modules/lodash/_stackClear.js"(exports2, module2) {
- var ListCache = require_ListCache();
- function stackClear() {
- this.__data__ = new ListCache();
- this.size = 0;
- }
- module2.exports = stackClear;
- }
- });
- var require_stackDelete = __commonJS2({
- "node_modules/lodash/_stackDelete.js"(exports2, module2) {
- function stackDelete(key) {
- var data = this.__data__, result = data["delete"](key);
- this.size = data.size;
- return result;
- }
- module2.exports = stackDelete;
- }
- });
- var require_stackGet = __commonJS2({
- "node_modules/lodash/_stackGet.js"(exports2, module2) {
- function stackGet(key) {
- return this.__data__.get(key);
- }
- module2.exports = stackGet;
- }
- });
- var require_stackHas = __commonJS2({
- "node_modules/lodash/_stackHas.js"(exports2, module2) {
- function stackHas(key) {
- return this.__data__.has(key);
- }
- module2.exports = stackHas;
- }
- });
- var require_stackSet = __commonJS2({
- "node_modules/lodash/_stackSet.js"(exports2, module2) {
- var ListCache = require_ListCache();
- var Map2 = require_Map();
- var MapCache = require_MapCache();
- var LARGE_ARRAY_SIZE = 200;
- function stackSet(key, value) {
- var data = this.__data__;
- if (data instanceof ListCache) {
- var pairs = data.__data__;
- if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
- pairs.push([key, value]);
- this.size = ++data.size;
- return this;
- }
- data = this.__data__ = new MapCache(pairs);
- }
- data.set(key, value);
- this.size = data.size;
- return this;
- }
- module2.exports = stackSet;
- }
- });
- var require_Stack = __commonJS2({
- "node_modules/lodash/_Stack.js"(exports2, module2) {
- var ListCache = require_ListCache();
- var stackClear = require_stackClear();
- var stackDelete = require_stackDelete();
- var stackGet = require_stackGet();
- var stackHas = require_stackHas();
- var stackSet = require_stackSet();
- function Stack(entries) {
- var data = this.__data__ = new ListCache(entries);
- this.size = data.size;
- }
- Stack.prototype.clear = stackClear;
- Stack.prototype["delete"] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
- module2.exports = Stack;
- }
- });
- var require_setCacheAdd = __commonJS2({
- "node_modules/lodash/_setCacheAdd.js"(exports2, module2) {
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
- function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED);
- return this;
- }
- module2.exports = setCacheAdd;
- }
- });
- var require_setCacheHas = __commonJS2({
- "node_modules/lodash/_setCacheHas.js"(exports2, module2) {
- function setCacheHas(value) {
- return this.__data__.has(value);
- }
- module2.exports = setCacheHas;
- }
- });
- var require_SetCache = __commonJS2({
- "node_modules/lodash/_SetCache.js"(exports2, module2) {
- var MapCache = require_MapCache();
- var setCacheAdd = require_setCacheAdd();
- var setCacheHas = require_setCacheHas();
- function SetCache(values) {
- var index = -1, length = values == null ? 0 : values.length;
- this.__data__ = new MapCache();
- while (++index < length) {
- this.add(values[index]);
- }
- }
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
- SetCache.prototype.has = setCacheHas;
- module2.exports = SetCache;
- }
- });
- var require_arraySome = __commonJS2({
- "node_modules/lodash/_arraySome.js"(exports2, module2) {
- function arraySome(array, predicate) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
- module2.exports = arraySome;
- }
- });
- var require_cacheHas = __commonJS2({
- "node_modules/lodash/_cacheHas.js"(exports2, module2) {
- function cacheHas(cache, key) {
- return cache.has(key);
- }
- module2.exports = cacheHas;
- }
- });
- var require_equalArrays = __commonJS2({
- "node_modules/lodash/_equalArrays.js"(exports2, module2) {
- var SetCache = require_SetCache();
- var arraySome = require_arraySome();
- var cacheHas = require_cacheHas();
- var COMPARE_PARTIAL_FLAG = 1;
- var COMPARE_UNORDERED_FLAG = 2;
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- var arrStacked = stack.get(array);
- var othStacked = stack.get(other);
- if (arrStacked && othStacked) {
- return arrStacked == other && othStacked == array;
- }
- var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
- stack.set(array, other);
- stack.set(other, array);
- while (++index < arrLength) {
- var arrValue = array[index], othValue = other[index];
- if (customizer) {
- var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== void 0) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- if (seen) {
- if (!arraySome(other, function(othValue2, othIndex) {
- if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
- return seen.push(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- result = false;
- break;
- }
- }
- stack["delete"](array);
- stack["delete"](other);
- return result;
- }
- module2.exports = equalArrays;
- }
- });
- var require_Uint8Array = __commonJS2({
- "node_modules/lodash/_Uint8Array.js"(exports2, module2) {
- var root = require_root();
- var Uint8Array2 = root.Uint8Array;
- module2.exports = Uint8Array2;
- }
- });
- var require_mapToArray = __commonJS2({
- "node_modules/lodash/_mapToArray.js"(exports2, module2) {
- function mapToArray(map) {
- var index = -1, result = Array(map.size);
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
- module2.exports = mapToArray;
- }
- });
- var require_setToArray = __commonJS2({
- "node_modules/lodash/_setToArray.js"(exports2, module2) {
- function setToArray(set) {
- var index = -1, result = Array(set.size);
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
- module2.exports = setToArray;
- }
- });
- var require_equalByTag = __commonJS2({
- "node_modules/lodash/_equalByTag.js"(exports2, module2) {
- var Symbol2 = require_Symbol();
- var Uint8Array2 = require_Uint8Array();
- var eq = require_eq();
- var equalArrays = require_equalArrays();
- var mapToArray = require_mapToArray();
- var setToArray = require_setToArray();
- var COMPARE_PARTIAL_FLAG = 1;
- var COMPARE_UNORDERED_FLAG = 2;
- var boolTag = "[object Boolean]";
- var dateTag = "[object Date]";
- var errorTag = "[object Error]";
- var mapTag = "[object Map]";
- var numberTag = "[object Number]";
- var regexpTag = "[object RegExp]";
- var setTag = "[object Set]";
- var stringTag = "[object String]";
- var symbolTag = "[object Symbol]";
- var arrayBufferTag = "[object ArrayBuffer]";
- var dataViewTag = "[object DataView]";
- var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
- var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
- switch (tag) {
- case dataViewTag:
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
- return false;
- }
- object = object.buffer;
- other = other.buffer;
- case arrayBufferTag:
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
- return false;
- }
- return true;
- case boolTag:
- case dateTag:
- case numberTag:
- return eq(+object, +other);
- case errorTag:
- return object.name == other.name && object.message == other.message;
- case regexpTag:
- case stringTag:
- return object == other + "";
- case mapTag:
- var convert = mapToArray;
- case setTag:
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
- convert || (convert = setToArray);
- if (object.size != other.size && !isPartial) {
- return false;
- }
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- bitmask |= COMPARE_UNORDERED_FLAG;
- stack.set(object, other);
- var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
- stack["delete"](object);
- return result;
- case symbolTag:
- if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
- }
- return false;
- }
- module2.exports = equalByTag;
- }
- });
- var require_baseGetAllKeys = __commonJS2({
- "node_modules/lodash/_baseGetAllKeys.js"(exports2, module2) {
- var arrayPush = require_arrayPush();
- var isArray = require_isArray();
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
- }
- module2.exports = baseGetAllKeys;
- }
- });
- var require_arrayFilter = __commonJS2({
- "node_modules/lodash/_arrayFilter.js"(exports2, module2) {
- function arrayFilter(array, predicate) {
- var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[resIndex++] = value;
- }
- }
- return result;
- }
- module2.exports = arrayFilter;
- }
- });
- var require_stubArray = __commonJS2({
- "node_modules/lodash/stubArray.js"(exports2, module2) {
- function stubArray() {
- return [];
- }
- module2.exports = stubArray;
- }
- });
- var require_getSymbols = __commonJS2({
- "node_modules/lodash/_getSymbols.js"(exports2, module2) {
- var arrayFilter = require_arrayFilter();
- var stubArray = require_stubArray();
- var objectProto = Object.prototype;
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
- var nativeGetSymbols = Object.getOwnPropertySymbols;
- var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
- if (object == null) {
- return [];
- }
- object = Object(object);
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
- return propertyIsEnumerable.call(object, symbol);
- });
- };
- module2.exports = getSymbols;
- }
- });
- var require_getAllKeys = __commonJS2({
- "node_modules/lodash/_getAllKeys.js"(exports2, module2) {
- var baseGetAllKeys = require_baseGetAllKeys();
- var getSymbols = require_getSymbols();
- var keys = require_keys();
- function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
- }
- module2.exports = getAllKeys;
- }
- });
- var require_equalObjects = __commonJS2({
- "node_modules/lodash/_equalObjects.js"(exports2, module2) {
- var getAllKeys = require_getAllKeys();
- var COMPARE_PARTIAL_FLAG = 1;
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- var objStacked = stack.get(object);
- var othStacked = stack.get(other);
- if (objStacked && othStacked) {
- return objStacked == other && othStacked == object;
- }
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key], othValue = other[key];
- if (customizer) {
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
- }
- if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == "constructor");
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor, othCtor = other.constructor;
- if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- stack["delete"](object);
- stack["delete"](other);
- return result;
- }
- module2.exports = equalObjects;
- }
- });
- var require_DataView = __commonJS2({
- "node_modules/lodash/_DataView.js"(exports2, module2) {
- var getNative = require_getNative();
- var root = require_root();
- var DataView = getNative(root, "DataView");
- module2.exports = DataView;
- }
- });
- var require_Promise = __commonJS2({
- "node_modules/lodash/_Promise.js"(exports2, module2) {
- var getNative = require_getNative();
- var root = require_root();
- var Promise2 = getNative(root, "Promise");
- module2.exports = Promise2;
- }
- });
- var require_Set = __commonJS2({
- "node_modules/lodash/_Set.js"(exports2, module2) {
- var getNative = require_getNative();
- var root = require_root();
- var Set2 = getNative(root, "Set");
- module2.exports = Set2;
- }
- });
- var require_WeakMap = __commonJS2({
- "node_modules/lodash/_WeakMap.js"(exports2, module2) {
- var getNative = require_getNative();
- var root = require_root();
- var WeakMap2 = getNative(root, "WeakMap");
- module2.exports = WeakMap2;
- }
- });
- var require_getTag = __commonJS2({
- "node_modules/lodash/_getTag.js"(exports2, module2) {
- var DataView = require_DataView();
- var Map2 = require_Map();
- var Promise2 = require_Promise();
- var Set2 = require_Set();
- var WeakMap2 = require_WeakMap();
- var baseGetTag = require_baseGetTag();
- var toSource = require_toSource();
- var mapTag = "[object Map]";
- var objectTag = "[object Object]";
- var promiseTag = "[object Promise]";
- var setTag = "[object Set]";
- var weakMapTag = "[object WeakMap]";
- var dataViewTag = "[object DataView]";
- var dataViewCtorString = toSource(DataView);
- var mapCtorString = toSource(Map2);
- var promiseCtorString = toSource(Promise2);
- var setCtorString = toSource(Set2);
- var weakMapCtorString = toSource(WeakMap2);
- var getTag = baseGetTag;
- 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) {
- getTag = function(value) {
- var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString:
- return dataViewTag;
- case mapCtorString:
- return mapTag;
- case promiseCtorString:
- return promiseTag;
- case setCtorString:
- return setTag;
- case weakMapCtorString:
- return weakMapTag;
- }
- }
- return result;
- };
- }
- module2.exports = getTag;
- }
- });
- var require_baseIsEqualDeep = __commonJS2({
- "node_modules/lodash/_baseIsEqualDeep.js"(exports2, module2) {
- var Stack = require_Stack();
- var equalArrays = require_equalArrays();
- var equalByTag = require_equalByTag();
- var equalObjects = require_equalObjects();
- var getTag = require_getTag();
- var isArray = require_isArray();
- var isBuffer = require_isBuffer();
- var isTypedArray = require_isTypedArray();
- var COMPARE_PARTIAL_FLAG = 1;
- var argsTag = "[object Arguments]";
- var arrayTag = "[object Array]";
- var objectTag = "[object Object]";
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
- var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
- objTag = objTag == argsTag ? objectTag : objTag;
- othTag = othTag == argsTag ? objectTag : othTag;
- var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
- if (isSameTag && isBuffer(object)) {
- if (!isBuffer(other)) {
- return false;
- }
- objIsArr = true;
- objIsObj = false;
- }
- if (isSameTag && !objIsObj) {
- stack || (stack = new Stack());
- return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
- }
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
- stack || (stack = new Stack());
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
- }
- }
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new Stack());
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
- }
- module2.exports = baseIsEqualDeep;
- }
- });
- var require_baseIsEqual = __commonJS2({
- "node_modules/lodash/_baseIsEqual.js"(exports2, module2) {
- var baseIsEqualDeep = require_baseIsEqualDeep();
- var isObjectLike = require_isObjectLike();
- function baseIsEqual(value, other, bitmask, customizer, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
- }
- module2.exports = baseIsEqual;
- }
- });
- var require_baseIsMatch = __commonJS2({
- "node_modules/lodash/_baseIsMatch.js"(exports2, module2) {
- var Stack = require_Stack();
- var baseIsEqual = require_baseIsEqual();
- var COMPARE_PARTIAL_FLAG = 1;
- var COMPARE_UNORDERED_FLAG = 2;
- function baseIsMatch(object, source, matchData, customizer) {
- var index = matchData.length, length = index, noCustomizer = !customizer;
- if (object == null) {
- return !length;
- }
- object = Object(object);
- while (index--) {
- var data = matchData[index];
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
- return false;
- }
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0], objValue = object[key], srcValue = data[1];
- if (noCustomizer && data[2]) {
- if (objValue === void 0 && !(key in object)) {
- return false;
- }
- } else {
- var stack = new Stack();
- if (customizer) {
- var result = customizer(objValue, srcValue, key, object, source, stack);
- }
- if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {
- return false;
- }
- }
- }
- return true;
- }
- module2.exports = baseIsMatch;
- }
- });
- var require_isStrictComparable = __commonJS2({
- "node_modules/lodash/_isStrictComparable.js"(exports2, module2) {
- var isObject = require_isObject();
- function isStrictComparable(value) {
- return value === value && !isObject(value);
- }
- module2.exports = isStrictComparable;
- }
- });
- var require_getMatchData = __commonJS2({
- "node_modules/lodash/_getMatchData.js"(exports2, module2) {
- var isStrictComparable = require_isStrictComparable();
- var keys = require_keys();
- function getMatchData(object) {
- var result = keys(object), length = result.length;
- while (length--) {
- var key = result[length], value = object[key];
- result[length] = [key, value, isStrictComparable(value)];
- }
- return result;
- }
- module2.exports = getMatchData;
- }
- });
- var require_matchesStrictComparable = __commonJS2({
- "node_modules/lodash/_matchesStrictComparable.js"(exports2, module2) {
- function matchesStrictComparable(key, srcValue) {
- return function(object) {
- if (object == null) {
- return false;
- }
- return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
- };
- }
- module2.exports = matchesStrictComparable;
- }
- });
- var require_baseMatches = __commonJS2({
- "node_modules/lodash/_baseMatches.js"(exports2, module2) {
- var baseIsMatch = require_baseIsMatch();
- var getMatchData = require_getMatchData();
- var matchesStrictComparable = require_matchesStrictComparable();
- function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- return matchesStrictComparable(matchData[0][0], matchData[0][1]);
- }
- return function(object) {
- return object === source || baseIsMatch(object, source, matchData);
- };
- }
- module2.exports = baseMatches;
- }
- });
- var require_get = __commonJS2({
- "node_modules/lodash/get.js"(exports2, module2) {
- var baseGet = require_baseGet();
- function get(object, path, defaultValue) {
- var result = object == null ? void 0 : baseGet(object, path);
- return result === void 0 ? defaultValue : result;
- }
- module2.exports = get;
- }
- });
- var require_baseMatchesProperty = __commonJS2({
- "node_modules/lodash/_baseMatchesProperty.js"(exports2, module2) {
- var baseIsEqual = require_baseIsEqual();
- var get = require_get();
- var hasIn = require_hasIn();
- var isKey = require_isKey();
- var isStrictComparable = require_isStrictComparable();
- var matchesStrictComparable = require_matchesStrictComparable();
- var toKey = require_toKey();
- var COMPARE_PARTIAL_FLAG = 1;
- var COMPARE_UNORDERED_FLAG = 2;
- function baseMatchesProperty(path, srcValue) {
- if (isKey(path) && isStrictComparable(srcValue)) {
- return matchesStrictComparable(toKey(path), srcValue);
- }
- return function(object) {
- var objValue = get(object, path);
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
- };
- }
- module2.exports = baseMatchesProperty;
- }
- });
- var require_baseProperty = __commonJS2({
- "node_modules/lodash/_baseProperty.js"(exports2, module2) {
- function baseProperty(key) {
- return function(object) {
- return object == null ? void 0 : object[key];
- };
- }
- module2.exports = baseProperty;
- }
- });
- var require_basePropertyDeep = __commonJS2({
- "node_modules/lodash/_basePropertyDeep.js"(exports2, module2) {
- var baseGet = require_baseGet();
- function basePropertyDeep(path) {
- return function(object) {
- return baseGet(object, path);
- };
- }
- module2.exports = basePropertyDeep;
- }
- });
- var require_property = __commonJS2({
- "node_modules/lodash/property.js"(exports2, module2) {
- var baseProperty = require_baseProperty();
- var basePropertyDeep = require_basePropertyDeep();
- var isKey = require_isKey();
- var toKey = require_toKey();
- function property(path) {
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
- }
- module2.exports = property;
- }
- });
- var require_baseIteratee = __commonJS2({
- "node_modules/lodash/_baseIteratee.js"(exports2, module2) {
- var baseMatches = require_baseMatches();
- var baseMatchesProperty = require_baseMatchesProperty();
- var identity = require_identity();
- var isArray = require_isArray();
- var property = require_property();
- function baseIteratee(value) {
- if (typeof value == "function") {
- return value;
- }
- if (value == null) {
- return identity;
- }
- if (typeof value == "object") {
- return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
- }
- return property(value);
- }
- module2.exports = baseIteratee;
- }
- });
- var require_createAggregator = __commonJS2({
- "node_modules/lodash/_createAggregator.js"(exports2, module2) {
- var arrayAggregator = require_arrayAggregator();
- var baseAggregator = require_baseAggregator();
- var baseIteratee = require_baseIteratee();
- var isArray = require_isArray();
- function createAggregator(setter, initializer) {
- return function(collection, iteratee) {
- var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
- return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
- };
- }
- module2.exports = createAggregator;
- }
- });
- var require_partition = __commonJS2({
- "node_modules/lodash/partition.js"(exports2, module2) {
- var createAggregator = require_createAggregator();
- var partition = createAggregator(function(result, value, key) {
- result[key ? 0 : 1].push(value);
- }, function() {
- return [[], []];
- });
- module2.exports = partition;
- }
- });
- var require_create_minimist_options = __commonJS2({
- "src/cli/options/create-minimist-options.js"(exports2, module2) {
- "use strict";
- var partition = require_partition();
- module2.exports = function createMinimistOptions(detailedOptions) {
- const [boolean, string] = partition(detailedOptions, ({
- type
- }) => type === "boolean").map((detailedOptions2) => detailedOptions2.flatMap(({
- name,
- alias
- }) => alias ? [name, alias] : [name]));
- 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]));
- return {
- alias: {},
- boolean,
- string,
- default: defaults
- };
- };
- }
- });
- var require_leven = __commonJS2({
- "vendors/leven.js"(exports2, module2) {
- var __defProp = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames22 = Object.getOwnPropertyNames;
- var __hasOwnProp = Object.prototype.hasOwnProperty;
- var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, {
- get: all[name],
- enumerable: true
- });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames22(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, {
- get: () => from[key],
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
- });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
- value: true
- }), mod);
- var leven_exports = {};
- __export(leven_exports, {
- default: () => leven
- });
- module2.exports = __toCommonJS(leven_exports);
- var array = [];
- var characterCodeCache = [];
- function leven(first, second) {
- if (first === second) {
- return 0;
- }
- const swap = first;
- if (first.length > second.length) {
- first = second;
- second = swap;
- }
- let firstLength = first.length;
- let secondLength = second.length;
- while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) {
- firstLength--;
- secondLength--;
- }
- let start = 0;
- while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) {
- start++;
- }
- firstLength -= start;
- secondLength -= start;
- if (firstLength === 0) {
- return secondLength;
- }
- let bCharacterCode;
- let result;
- let temporary;
- let temporary2;
- let index = 0;
- let index2 = 0;
- while (index < firstLength) {
- characterCodeCache[index] = first.charCodeAt(start + index);
- array[index] = ++index;
- }
- while (index2 < secondLength) {
- bCharacterCode = second.charCodeAt(start + index2);
- temporary = index2++;
- result = index2;
- for (index = 0; index < firstLength; index++) {
- temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1;
- temporary = array[index];
- result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2;
- }
- }
- return result;
- }
- }
- });
- var require_normalize_cli_options = __commonJS2({
- "src/cli/options/normalize-cli-options.js"(exports2, module2) {
- "use strict";
- var {
- default: chalk
- } = require_chalk();
- var {
- default: leven
- } = require_leven();
- var {
- optionsNormalizer
- } = require_prettier_internal();
- function normalizeCliOptions(options, optionInfos, opts) {
- return optionsNormalizer.normalizeCliOptions(options, optionInfos, Object.assign({
- colorsModule: chalk,
- levenshteinDistance: leven
- }, opts));
- }
- module2.exports = normalizeCliOptions;
- }
- });
- var require_parse_cli_arguments = __commonJS2({
- "src/cli/options/parse-cli-arguments.js"(exports2, module2) {
- "use strict";
- var pick = require_pick();
- var camelCase = require_camelcase();
- var getContextOptions = require_get_context_options();
- var minimist = require_minimist2();
- var createMinimistOptions = require_create_minimist_options();
- var normalizeCliOptions = require_normalize_cli_options();
- function parseArgv(rawArguments, detailedOptions, logger, keys) {
- const minimistOptions = createMinimistOptions(detailedOptions);
- let argv = minimist(rawArguments, minimistOptions);
- if (keys) {
- if (keys.includes("plugin-search-dir") && !keys.includes("plugin-search")) {
- keys.push("plugin-search");
- }
- detailedOptions = detailedOptions.filter((option) => keys.includes(option.name));
- argv = pick(argv, keys);
- }
- const normalized = normalizeCliOptions(argv, detailedOptions, {
- logger
- });
- return Object.assign(Object.assign({}, Object.fromEntries(Object.entries(normalized).map(([key, value]) => {
- const option = detailedOptions.find(({
- name
- }) => name === key) || {};
- return [option.forwardToApi || camelCase(key), value];
- }))), {}, {
- get __raw() {
- return argv;
- }
- });
- }
- var detailedOptionsWithoutPlugins = getContextOptions([], false).detailedOptions;
- function parseArgvWithoutPlugins2(rawArguments, logger, keys) {
- return parseArgv(rawArguments, detailedOptionsWithoutPlugins, logger, typeof keys === "string" ? [keys] : keys);
- }
- module2.exports = {
- parseArgv,
- parseArgvWithoutPlugins: parseArgvWithoutPlugins2
- };
- }
- });
- var require_context = __commonJS2({
- "src/cli/context.js"(exports2, module2) {
- "use strict";
- var {
- utils: {
- getLast
- }
- } = require_prettier_internal();
- var getContextOptions = require_get_context_options();
- var {
- parseArgv,
- parseArgvWithoutPlugins: parseArgvWithoutPlugins2
- } = require_parse_cli_arguments();
- var Context2 = class {
- constructor({
- rawArguments,
- logger
- }) {
- this.rawArguments = rawArguments;
- this.logger = logger;
- this.stack = [];
- const {
- plugins,
- pluginSearchDirs
- } = parseArgvWithoutPlugins2(rawArguments, logger, ["plugin", "plugin-search-dir"]);
- this.pushContextPlugins(plugins, pluginSearchDirs);
- const argv = parseArgv(rawArguments, this.detailedOptions, logger);
- this.argv = argv;
- this.filePatterns = argv._.map((file) => String(file));
- }
- pushContextPlugins(plugins, pluginSearchDirs) {
- const options = getContextOptions(plugins, pluginSearchDirs);
- this.stack.push(options);
- Object.assign(this, options);
- }
- popContextPlugins() {
- this.stack.pop();
- Object.assign(this, getLast(this.stack));
- }
- };
- module2.exports = Context2;
- }
- });
- var require_groupBy = __commonJS2({
- "node_modules/lodash/groupBy.js"(exports2, module2) {
- var baseAssignValue = require_baseAssignValue();
- var createAggregator = require_createAggregator();
- var objectProto = Object.prototype;
- var hasOwnProperty = objectProto.hasOwnProperty;
- var groupBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- baseAssignValue(result, key, [value]);
- }
- });
- module2.exports = groupBy;
- }
- });
- var require_usage = __commonJS2({
- "src/cli/usage.js"(exports2, module2) {
- "use strict";
- var groupBy = require_groupBy();
- var camelCase = require_camelcase();
- var constant = require_constant();
- var OPTION_USAGE_THRESHOLD = 25;
- var CHOICE_USAGE_MARGIN = 3;
- var CHOICE_USAGE_INDENTATION = 2;
- function indent(str, spaces) {
- return str.replace(/^/gm, " ".repeat(spaces));
- }
- function createDefaultValueDisplay(value) {
- return Array.isArray(value) ? `[${value.map(createDefaultValueDisplay).join(", ")}]` : value;
- }
- function getOptionDefaultValue(context, optionName) {
- if (!(optionName in context.detailedOptionMap)) {
- return;
- }
- const option = context.detailedOptionMap[optionName];
- if (option.default !== void 0) {
- return option.default;
- }
- const optionCamelName = camelCase(optionName);
- if (optionCamelName in context.apiDefaultOptions) {
- return context.apiDefaultOptions[optionCamelName];
- }
- }
- function createOptionUsageHeader(option) {
- const name = `--${option.name}`;
- const alias = option.alias ? `-${option.alias},` : null;
- const type = createOptionUsageType(option);
- return [alias, name, type].filter(Boolean).join(" ");
- }
- function createOptionUsageRow(header, content, threshold) {
- const separator = header.length >= threshold ? `
- ${" ".repeat(threshold)}` : " ".repeat(threshold - header.length);
- const description = content.replace(/\n/g, `
- ${" ".repeat(threshold)}`);
- return `${header}${separator}${description}`;
- }
- function createOptionUsageType(option) {
- switch (option.type) {
- case "boolean":
- return null;
- case "choice":
- return `<${option.choices.filter((choice) => !choice.deprecated && choice.since !== null).map((choice) => choice.value).join("|")}>`;
- default:
- return `<${option.type}>`;
- }
- }
- function createChoiceUsages(choices, margin, indentation) {
- const activeChoices = choices.filter((choice) => !choice.deprecated && choice.since !== null);
- const threshold = Math.max(0, ...activeChoices.map((choice) => choice.value.length)) + margin;
- return activeChoices.map((choice) => indent(createOptionUsageRow(choice.value, choice.description, threshold), indentation));
- }
- function createOptionUsage(context, option, threshold) {
- const header = createOptionUsageHeader(option);
- const optionDefaultValue = getOptionDefaultValue(context, option.name);
- return createOptionUsageRow(header, `${option.description}${optionDefaultValue === void 0 ? "" : `
- Defaults to ${createDefaultValueDisplay(optionDefaultValue)}.`}`, threshold);
- }
- function getOptionsWithOpposites(options) {
- const optionsWithOpposites = options.map((option) => [option.description ? option : null, option.oppositeDescription ? Object.assign(Object.assign({}, option), {}, {
- name: `no-${option.name}`,
- type: "boolean",
- description: option.oppositeDescription
- }) : null]);
- return optionsWithOpposites.flat().filter(Boolean);
- }
- function createUsage2(context) {
- const options = getOptionsWithOpposites(context.detailedOptions).filter((option) => !(option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-")));
- const groupedOptions = groupBy(options, (option) => option.category);
- const firstCategories = constant.categoryOrder.slice(0, -1);
- const lastCategories = constant.categoryOrder.slice(-1);
- const restCategories = Object.keys(groupedOptions).filter((category) => !constant.categoryOrder.includes(category));
- const allCategories = [...firstCategories, ...restCategories, ...lastCategories];
- const optionsUsage = allCategories.map((category) => {
- const categoryOptions = groupedOptions[category].map((option) => createOptionUsage(context, option, OPTION_USAGE_THRESHOLD)).join("\n");
- return `${category} options:
- ${indent(categoryOptions, 2)}`;
- });
- return [constant.usageSummary, ...optionsUsage, ""].join("\n\n");
- }
- function createDetailedUsage2(context, flag) {
- const option = getOptionsWithOpposites(context.detailedOptions).find((option2) => option2.name === flag || option2.alias === flag);
- const header = createOptionUsageHeader(option);
- const description = `
- ${indent(option.description, 2)}`;
- const choices = option.type !== "choice" ? "" : `
- Valid options:
- ${createChoiceUsages(option.choices, CHOICE_USAGE_MARGIN, CHOICE_USAGE_INDENTATION).join("\n")}`;
- const optionDefaultValue = getOptionDefaultValue(context, option.name);
- const defaults = optionDefaultValue !== void 0 ? `
- Default: ${createDefaultValueDisplay(optionDefaultValue)}` : "";
- const pluginDefaults = option.pluginDefaults && Object.keys(option.pluginDefaults).length > 0 ? `
- Plugin defaults:${Object.entries(option.pluginDefaults).map(([key, value]) => `
- * ${key}: ${createDefaultValueDisplay(value)}`)}` : "";
- return `${header}${description}${choices}${defaults}${pluginDefaults}`;
- }
- module2.exports = {
- createUsage: createUsage2,
- createDetailedUsage: createDetailedUsage2
- };
- }
- });
- var require_array = __commonJS2({
- "node_modules/fast-glob/out/utils/array.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.splitWhen = exports2.flatten = void 0;
- function flatten(items) {
- return items.reduce((collection, item) => [].concat(collection, item), []);
- }
- exports2.flatten = flatten;
- function splitWhen(items, predicate) {
- const result = [[]];
- let groupIndex = 0;
- for (const item of items) {
- if (predicate(item)) {
- groupIndex++;
- result[groupIndex] = [];
- } else {
- result[groupIndex].push(item);
- }
- }
- return result;
- }
- exports2.splitWhen = splitWhen;
- }
- });
- var require_errno = __commonJS2({
- "node_modules/fast-glob/out/utils/errno.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.isEnoentCodeError = void 0;
- function isEnoentCodeError(error) {
- return error.code === "ENOENT";
- }
- exports2.isEnoentCodeError = isEnoentCodeError;
- }
- });
- var require_fs = __commonJS2({
- "node_modules/fast-glob/out/utils/fs.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.createDirentFromStats = void 0;
- var DirentFromStats = class {
- constructor(name, stats) {
- this.name = name;
- this.isBlockDevice = stats.isBlockDevice.bind(stats);
- this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
- this.isDirectory = stats.isDirectory.bind(stats);
- this.isFIFO = stats.isFIFO.bind(stats);
- this.isFile = stats.isFile.bind(stats);
- this.isSocket = stats.isSocket.bind(stats);
- this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
- }
- };
- function createDirentFromStats(name, stats) {
- return new DirentFromStats(name, stats);
- }
- exports2.createDirentFromStats = createDirentFromStats;
- }
- });
- var require_path = __commonJS2({
- "node_modules/fast-glob/out/utils/path.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.removeLeadingDotSegment = exports2.escape = exports2.makeAbsolute = exports2.unixify = void 0;
- var path = require("path");
- var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
- var UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
- function unixify(filepath) {
- return filepath.replace(/\\/g, "/");
- }
- exports2.unixify = unixify;
- function makeAbsolute(cwd, filepath) {
- return path.resolve(cwd, filepath);
- }
- exports2.makeAbsolute = makeAbsolute;
- function escape(pattern) {
- return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
- }
- exports2.escape = escape;
- function removeLeadingDotSegment(entry) {
- if (entry.charAt(0) === ".") {
- const secondCharactery = entry.charAt(1);
- if (secondCharactery === "/" || secondCharactery === "\\") {
- return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
- }
- }
- return entry;
- }
- exports2.removeLeadingDotSegment = removeLeadingDotSegment;
- }
- });
- var require_is_extglob = __commonJS2({
- "node_modules/is-extglob/index.js"(exports2, module2) {
- module2.exports = function isExtglob(str) {
- if (typeof str !== "string" || str === "") {
- return false;
- }
- var match;
- while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
- if (match[2])
- return true;
- str = str.slice(match.index + match[0].length);
- }
- return false;
- };
- }
- });
- var require_is_glob = __commonJS2({
- "node_modules/is-glob/index.js"(exports2, module2) {
- var isExtglob = require_is_extglob();
- var chars = {
- "{": "}",
- "(": ")",
- "[": "]"
- };
- var strictCheck = function(str) {
- if (str[0] === "!") {
- return true;
- }
- var index = 0;
- var pipeIndex = -2;
- var closeSquareIndex = -2;
- var closeCurlyIndex = -2;
- var closeParenIndex = -2;
- var backSlashIndex = -2;
- while (index < str.length) {
- if (str[index] === "*") {
- return true;
- }
- if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) {
- return true;
- }
- if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") {
- if (closeSquareIndex < index) {
- closeSquareIndex = str.indexOf("]", index);
- }
- if (closeSquareIndex > index) {
- if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
- return true;
- }
- backSlashIndex = str.indexOf("\\", index);
- if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
- return true;
- }
- }
- }
- if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") {
- closeCurlyIndex = str.indexOf("}", index);
- if (closeCurlyIndex > index) {
- backSlashIndex = str.indexOf("\\", index);
- if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
- return true;
- }
- }
- }
- if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") {
- closeParenIndex = str.indexOf(")", index);
- if (closeParenIndex > index) {
- backSlashIndex = str.indexOf("\\", index);
- if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
- return true;
- }
- }
- }
- if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") {
- if (pipeIndex < index) {
- pipeIndex = str.indexOf("|", index);
- }
- if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
- closeParenIndex = str.indexOf(")", pipeIndex);
- if (closeParenIndex > pipeIndex) {
- backSlashIndex = str.indexOf("\\", pipeIndex);
- if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
- return true;
- }
- }
- }
- }
- if (str[index] === "\\") {
- var open = str[index + 1];
- index += 2;
- var close = chars[open];
- if (close) {
- var n = str.indexOf(close, index);
- if (n !== -1) {
- index = n + 1;
- }
- }
- if (str[index] === "!") {
- return true;
- }
- } else {
- index++;
- }
- }
- return false;
- };
- var relaxedCheck = function(str) {
- if (str[0] === "!") {
- return true;
- }
- var index = 0;
- while (index < str.length) {
- if (/[*?{}()[\]]/.test(str[index])) {
- return true;
- }
- if (str[index] === "\\") {
- var open = str[index + 1];
- index += 2;
- var close = chars[open];
- if (close) {
- var n = str.indexOf(close, index);
- if (n !== -1) {
- index = n + 1;
- }
- }
- if (str[index] === "!") {
- return true;
- }
- } else {
- index++;
- }
- }
- return false;
- };
- module2.exports = function isGlob(str, options) {
- if (typeof str !== "string" || str === "") {
- return false;
- }
- if (isExtglob(str)) {
- return true;
- }
- var check = strictCheck;
- if (options && options.strict === false) {
- check = relaxedCheck;
- }
- return check(str);
- };
- }
- });
- var require_glob_parent = __commonJS2({
- "node_modules/glob-parent/index.js"(exports2, module2) {
- "use strict";
- var isGlob = require_is_glob();
- var pathPosixDirname = require("path").posix.dirname;
- var isWin32 = require("os").platform() === "win32";
- var slash = "/";
- var backslash = /\\/g;
- var enclosure = /[\{\[].*[\}\]]$/;
- var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
- var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
- module2.exports = function globParent(str, opts) {
- var options = Object.assign({
- flipBackslashes: true
- }, opts);
- if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
- str = str.replace(backslash, slash);
- }
- if (enclosure.test(str)) {
- str += slash;
- }
- str += "a";
- do {
- str = pathPosixDirname(str);
- } while (isGlob(str) || globby.test(str));
- return str.replace(escaped, "$1");
- };
- }
- });
- var require_utils = __commonJS2({
- "node_modules/braces/lib/utils.js"(exports2) {
- "use strict";
- exports2.isInteger = (num) => {
- if (typeof num === "number") {
- return Number.isInteger(num);
- }
- if (typeof num === "string" && num.trim() !== "") {
- return Number.isInteger(Number(num));
- }
- return false;
- };
- exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type);
- exports2.exceedsLimit = (min, max, step = 1, limit) => {
- if (limit === false)
- return false;
- if (!exports2.isInteger(min) || !exports2.isInteger(max))
- return false;
- return (Number(max) - Number(min)) / Number(step) >= limit;
- };
- exports2.escapeNode = (block, n = 0, type) => {
- let node = block.nodes[n];
- if (!node)
- return;
- if (type && node.type === type || node.type === "open" || node.type === "close") {
- if (node.escaped !== true) {
- node.value = "\\" + node.value;
- node.escaped = true;
- }
- }
- };
- exports2.encloseBrace = (node) => {
- if (node.type !== "brace")
- return false;
- if (node.commas >> 0 + node.ranges >> 0 === 0) {
- node.invalid = true;
- return true;
- }
- return false;
- };
- exports2.isInvalidBrace = (block) => {
- if (block.type !== "brace")
- return false;
- if (block.invalid === true || block.dollar)
- return true;
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
- block.invalid = true;
- return true;
- }
- if (block.open !== true || block.close !== true) {
- block.invalid = true;
- return true;
- }
- return false;
- };
- exports2.isOpenOrClose = (node) => {
- if (node.type === "open" || node.type === "close") {
- return true;
- }
- return node.open === true || node.close === true;
- };
- exports2.reduce = (nodes) => nodes.reduce((acc, node) => {
- if (node.type === "text")
- acc.push(node.value);
- if (node.type === "range")
- node.type = "text";
- return acc;
- }, []);
- exports2.flatten = (...args) => {
- const result = [];
- const flat = (arr) => {
- for (let i = 0; i < arr.length; i++) {
- let ele = arr[i];
- Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
- }
- return result;
- };
- flat(args);
- return result;
- };
- }
- });
- var require_stringify = __commonJS2({
- "node_modules/braces/lib/stringify.js"(exports2, module2) {
- "use strict";
- var utils = require_utils();
- module2.exports = (ast, options = {}) => {
- let stringify2 = (node, parent = {}) => {
- let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
- let invalidNode = node.invalid === true && options.escapeInvalid === true;
- let output = "";
- if (node.value) {
- if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
- return "\\" + node.value;
- }
- return node.value;
- }
- if (node.value) {
- return node.value;
- }
- if (node.nodes) {
- for (let child of node.nodes) {
- output += stringify2(child);
- }
- }
- return output;
- };
- return stringify2(ast);
- };
- }
- });
- var require_is_number = __commonJS2({
- "node_modules/is-number/index.js"(exports2, module2) {
- "use strict";
- module2.exports = function(num) {
- if (typeof num === "number") {
- return num - num === 0;
- }
- if (typeof num === "string" && num.trim() !== "") {
- return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
- }
- return false;
- };
- }
- });
- var require_to_regex_range = __commonJS2({
- "node_modules/to-regex-range/index.js"(exports2, module2) {
- "use strict";
- var isNumber = require_is_number();
- var toRegexRange = (min, max, options) => {
- if (isNumber(min) === false) {
- throw new TypeError("toRegexRange: expected the first argument to be a number");
- }
- if (max === void 0 || min === max) {
- return String(min);
- }
- if (isNumber(max) === false) {
- throw new TypeError("toRegexRange: expected the second argument to be a number.");
- }
- let opts = Object.assign({
- relaxZeros: true
- }, options);
- if (typeof opts.strictZeros === "boolean") {
- opts.relaxZeros = opts.strictZeros === false;
- }
- let relax = String(opts.relaxZeros);
- let shorthand = String(opts.shorthand);
- let capture = String(opts.capture);
- let wrap = String(opts.wrap);
- let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
- if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
- return toRegexRange.cache[cacheKey].result;
- }
- let a = Math.min(min, max);
- let b = Math.max(min, max);
- if (Math.abs(a - b) === 1) {
- let result = min + "|" + max;
- if (opts.capture) {
- return `(${result})`;
- }
- if (opts.wrap === false) {
- return result;
- }
- return `(?:${result})`;
- }
- let isPadded = hasPadding(min) || hasPadding(max);
- let state = {
- min,
- max,
- a,
- b
- };
- let positives = [];
- let negatives = [];
- if (isPadded) {
- state.isPadded = isPadded;
- state.maxLen = String(state.max).length;
- }
- if (a < 0) {
- let newMin = b < 0 ? Math.abs(b) : 1;
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
- a = state.a = 0;
- }
- if (b >= 0) {
- positives = splitToPatterns(a, b, state, opts);
- }
- state.negatives = negatives;
- state.positives = positives;
- state.result = collatePatterns(negatives, positives, opts);
- if (opts.capture === true) {
- state.result = `(${state.result})`;
- } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
- state.result = `(?:${state.result})`;
- }
- toRegexRange.cache[cacheKey] = state;
- return state.result;
- };
- function collatePatterns(neg, pos, options) {
- let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
- let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
- let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
- let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
- return subpatterns.join("|");
- }
- function splitToRanges(min, max) {
- let nines = 1;
- let zeros = 1;
- let stop = countNines(min, nines);
- let stops = /* @__PURE__ */ new Set([max]);
- while (min <= stop && stop <= max) {
- stops.add(stop);
- nines += 1;
- stop = countNines(min, nines);
- }
- stop = countZeros(max + 1, zeros) - 1;
- while (min < stop && stop <= max) {
- stops.add(stop);
- zeros += 1;
- stop = countZeros(max + 1, zeros) - 1;
- }
- stops = [...stops];
- stops.sort(compare);
- return stops;
- }
- function rangeToPattern(start, stop, options) {
- if (start === stop) {
- return {
- pattern: start,
- count: [],
- digits: 0
- };
- }
- let zipped = zip(start, stop);
- let digits = zipped.length;
- let pattern = "";
- let count = 0;
- for (let i = 0; i < digits; i++) {
- let [startDigit, stopDigit] = zipped[i];
- if (startDigit === stopDigit) {
- pattern += startDigit;
- } else if (startDigit !== "0" || stopDigit !== "9") {
- pattern += toCharacterClass(startDigit, stopDigit, options);
- } else {
- count++;
- }
- }
- if (count) {
- pattern += options.shorthand === true ? "\\d" : "[0-9]";
- }
- return {
- pattern,
- count: [count],
- digits
- };
- }
- function splitToPatterns(min, max, tok, options) {
- let ranges = splitToRanges(min, max);
- let tokens = [];
- let start = min;
- let prev;
- for (let i = 0; i < ranges.length; i++) {
- let max2 = ranges[i];
- let obj = rangeToPattern(String(start), String(max2), options);
- let zeros = "";
- if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
- if (prev.count.length > 1) {
- prev.count.pop();
- }
- prev.count.push(obj.count[0]);
- prev.string = prev.pattern + toQuantifier(prev.count);
- start = max2 + 1;
- continue;
- }
- if (tok.isPadded) {
- zeros = padZeros(max2, tok, options);
- }
- obj.string = zeros + obj.pattern + toQuantifier(obj.count);
- tokens.push(obj);
- start = max2 + 1;
- prev = obj;
- }
- return tokens;
- }
- function filterPatterns(arr, comparison, prefix, intersection, options) {
- let result = [];
- for (let ele of arr) {
- let {
- string
- } = ele;
- if (!intersection && !contains(comparison, "string", string)) {
- result.push(prefix + string);
- }
- if (intersection && contains(comparison, "string", string)) {
- result.push(prefix + string);
- }
- }
- return result;
- }
- function zip(a, b) {
- let arr = [];
- for (let i = 0; i < a.length; i++)
- arr.push([a[i], b[i]]);
- return arr;
- }
- function compare(a, b) {
- return a > b ? 1 : b > a ? -1 : 0;
- }
- function contains(arr, key, val) {
- return arr.some((ele) => ele[key] === val);
- }
- function countNines(min, len) {
- return Number(String(min).slice(0, -len) + "9".repeat(len));
- }
- function countZeros(integer, zeros) {
- return integer - integer % Math.pow(10, zeros);
- }
- function toQuantifier(digits) {
- let [start = 0, stop = ""] = digits;
- if (stop || start > 1) {
- return `{${start + (stop ? "," + stop : "")}}`;
- }
- return "";
- }
- function toCharacterClass(a, b, options) {
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
- }
- function hasPadding(str) {
- return /^-?(0+)\d/.test(str);
- }
- function padZeros(value, tok, options) {
- if (!tok.isPadded) {
- return value;
- }
- let diff = Math.abs(tok.maxLen - String(value).length);
- let relax = options.relaxZeros !== false;
- switch (diff) {
- case 0:
- return "";
- case 1:
- return relax ? "0?" : "0";
- case 2:
- return relax ? "0{0,2}" : "00";
- default: {
- return relax ? `0{0,${diff}}` : `0{${diff}}`;
- }
- }
- }
- toRegexRange.cache = {};
- toRegexRange.clearCache = () => toRegexRange.cache = {};
- module2.exports = toRegexRange;
- }
- });
- var require_fill_range = __commonJS2({
- "node_modules/fill-range/index.js"(exports2, module2) {
- "use strict";
- var util = require("util");
- var toRegexRange = require_to_regex_range();
- var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
- var transform = (toNumber) => {
- return (value) => toNumber === true ? Number(value) : String(value);
- };
- var isValidValue = (value) => {
- return typeof value === "number" || typeof value === "string" && value !== "";
- };
- var isNumber = (num) => Number.isInteger(+num);
- var zeros = (input) => {
- let value = `${input}`;
- let index = -1;
- if (value[0] === "-")
- value = value.slice(1);
- if (value === "0")
- return false;
- while (value[++index] === "0")
- ;
- return index > 0;
- };
- var stringify2 = (start, end, options) => {
- if (typeof start === "string" || typeof end === "string") {
- return true;
- }
- return options.stringify === true;
- };
- var pad = (input, maxLength, toNumber) => {
- if (maxLength > 0) {
- let dash = input[0] === "-" ? "-" : "";
- if (dash)
- input = input.slice(1);
- input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
- }
- if (toNumber === false) {
- return String(input);
- }
- return input;
- };
- var toMaxLen = (input, maxLength) => {
- let negative = input[0] === "-" ? "-" : "";
- if (negative) {
- input = input.slice(1);
- maxLength--;
- }
- while (input.length < maxLength)
- input = "0" + input;
- return negative ? "-" + input : input;
- };
- var toSequence = (parts, options) => {
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
- let prefix = options.capture ? "" : "?:";
- let positives = "";
- let negatives = "";
- let result;
- if (parts.positives.length) {
- positives = parts.positives.join("|");
- }
- if (parts.negatives.length) {
- negatives = `-(${prefix}${parts.negatives.join("|")})`;
- }
- if (positives && negatives) {
- result = `${positives}|${negatives}`;
- } else {
- result = positives || negatives;
- }
- if (options.wrap) {
- return `(${prefix}${result})`;
- }
- return result;
- };
- var toRange = (a, b, isNumbers, options) => {
- if (isNumbers) {
- return toRegexRange(a, b, Object.assign({
- wrap: false
- }, options));
- }
- let start = String.fromCharCode(a);
- if (a === b)
- return start;
- let stop = String.fromCharCode(b);
- return `[${start}-${stop}]`;
- };
- var toRegex = (start, end, options) => {
- if (Array.isArray(start)) {
- let wrap = options.wrap === true;
- let prefix = options.capture ? "" : "?:";
- return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
- }
- return toRegexRange(start, end, options);
- };
- var rangeError = (...args) => {
- return new RangeError("Invalid range arguments: " + util.inspect(...args));
- };
- var invalidRange = (start, end, options) => {
- if (options.strictRanges === true)
- throw rangeError([start, end]);
- return [];
- };
- var invalidStep = (step, options) => {
- if (options.strictRanges === true) {
- throw new TypeError(`Expected step "${step}" to be a number`);
- }
- return [];
- };
- var fillNumbers = (start, end, step = 1, options = {}) => {
- let a = Number(start);
- let b = Number(end);
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
- if (options.strictRanges === true)
- throw rangeError([start, end]);
- return [];
- }
- if (a === 0)
- a = 0;
- if (b === 0)
- b = 0;
- let descending = a > b;
- let startString = String(start);
- let endString = String(end);
- let stepString = String(step);
- step = Math.max(Math.abs(step), 1);
- let padded = zeros(startString) || zeros(endString) || zeros(stepString);
- let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
- let toNumber = padded === false && stringify2(start, end, options) === false;
- let format = options.transform || transform(toNumber);
- if (options.toRegex && step === 1) {
- return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
- }
- let parts = {
- negatives: [],
- positives: []
- };
- let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
- let range = [];
- let index = 0;
- while (descending ? a >= b : a <= b) {
- if (options.toRegex === true && step > 1) {
- push(a);
- } else {
- range.push(pad(format(a, index), maxLen, toNumber));
- }
- a = descending ? a - step : a + step;
- index++;
- }
- if (options.toRegex === true) {
- return step > 1 ? toSequence(parts, options) : toRegex(range, null, Object.assign({
- wrap: false
- }, options));
- }
- return range;
- };
- var fillLetters = (start, end, step = 1, options = {}) => {
- if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
- return invalidRange(start, end, options);
- }
- let format = options.transform || ((val) => String.fromCharCode(val));
- let a = `${start}`.charCodeAt(0);
- let b = `${end}`.charCodeAt(0);
- let descending = a > b;
- let min = Math.min(a, b);
- let max = Math.max(a, b);
- if (options.toRegex && step === 1) {
- return toRange(min, max, false, options);
- }
- let range = [];
- let index = 0;
- while (descending ? a >= b : a <= b) {
- range.push(format(a, index));
- a = descending ? a - step : a + step;
- index++;
- }
- if (options.toRegex === true) {
- return toRegex(range, null, {
- wrap: false,
- options
- });
- }
- return range;
- };
- var fill = (start, end, step, options = {}) => {
- if (end == null && isValidValue(start)) {
- return [start];
- }
- if (!isValidValue(start) || !isValidValue(end)) {
- return invalidRange(start, end, options);
- }
- if (typeof step === "function") {
- return fill(start, end, 1, {
- transform: step
- });
- }
- if (isObject(step)) {
- return fill(start, end, 0, step);
- }
- let opts = Object.assign({}, options);
- if (opts.capture === true)
- opts.wrap = true;
- step = step || opts.step || 1;
- if (!isNumber(step)) {
- if (step != null && !isObject(step))
- return invalidStep(step, opts);
- return fill(start, end, 1, step);
- }
- if (isNumber(start) && isNumber(end)) {
- return fillNumbers(start, end, step, opts);
- }
- return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
- };
- module2.exports = fill;
- }
- });
- var require_compile = __commonJS2({
- "node_modules/braces/lib/compile.js"(exports2, module2) {
- "use strict";
- var fill = require_fill_range();
- var utils = require_utils();
- var compile = (ast, options = {}) => {
- let walk = (node, parent = {}) => {
- let invalidBlock = utils.isInvalidBrace(parent);
- let invalidNode = node.invalid === true && options.escapeInvalid === true;
- let invalid = invalidBlock === true || invalidNode === true;
- let prefix = options.escapeInvalid === true ? "\\" : "";
- let output = "";
- if (node.isOpen === true) {
- return prefix + node.value;
- }
- if (node.isClose === true) {
- return prefix + node.value;
- }
- if (node.type === "open") {
- return invalid ? prefix + node.value : "(";
- }
- if (node.type === "close") {
- return invalid ? prefix + node.value : ")";
- }
- if (node.type === "comma") {
- return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
- }
- if (node.value) {
- return node.value;
- }
- if (node.nodes && node.ranges > 0) {
- let args = utils.reduce(node.nodes);
- let range = fill(...args, Object.assign(Object.assign({}, options), {}, {
- wrap: false,
- toRegex: true
- }));
- if (range.length !== 0) {
- return args.length > 1 && range.length > 1 ? `(${range})` : range;
- }
- }
- if (node.nodes) {
- for (let child of node.nodes) {
- output += walk(child, node);
- }
- }
- return output;
- };
- return walk(ast);
- };
- module2.exports = compile;
- }
- });
- var require_expand = __commonJS2({
- "node_modules/braces/lib/expand.js"(exports2, module2) {
- "use strict";
- var fill = require_fill_range();
- var stringify2 = require_stringify();
- var utils = require_utils();
- var append = (queue = "", stash = "", enclose = false) => {
- let result = [];
- queue = [].concat(queue);
- stash = [].concat(stash);
- if (!stash.length)
- return queue;
- if (!queue.length) {
- return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
- }
- for (let item of queue) {
- if (Array.isArray(item)) {
- for (let value of item) {
- result.push(append(value, stash, enclose));
- }
- } else {
- for (let ele of stash) {
- if (enclose === true && typeof ele === "string")
- ele = `{${ele}}`;
- result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
- }
- }
- }
- return utils.flatten(result);
- };
- var expand = (ast, options = {}) => {
- let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
- let walk = (node, parent = {}) => {
- node.queue = [];
- let p = parent;
- let q = parent.queue;
- while (p.type !== "brace" && p.type !== "root" && p.parent) {
- p = p.parent;
- q = p.queue;
- }
- if (node.invalid || node.dollar) {
- q.push(append(q.pop(), stringify2(node, options)));
- return;
- }
- if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
- q.push(append(q.pop(), ["{}"]));
- return;
- }
- if (node.nodes && node.ranges > 0) {
- let args = utils.reduce(node.nodes);
- if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
- throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
- }
- let range = fill(...args, options);
- if (range.length === 0) {
- range = stringify2(node, options);
- }
- q.push(append(q.pop(), range));
- node.nodes = [];
- return;
- }
- let enclose = utils.encloseBrace(node);
- let queue = node.queue;
- let block = node;
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
- block = block.parent;
- queue = block.queue;
- }
- for (let i = 0; i < node.nodes.length; i++) {
- let child = node.nodes[i];
- if (child.type === "comma" && node.type === "brace") {
- if (i === 1)
- queue.push("");
- queue.push("");
- continue;
- }
- if (child.type === "close") {
- q.push(append(q.pop(), queue, enclose));
- continue;
- }
- if (child.value && child.type !== "open") {
- queue.push(append(queue.pop(), child.value));
- continue;
- }
- if (child.nodes) {
- walk(child, node);
- }
- }
- return queue;
- };
- return utils.flatten(walk(ast));
- };
- module2.exports = expand;
- }
- });
- var require_constants = __commonJS2({
- "node_modules/braces/lib/constants.js"(exports2, module2) {
- "use strict";
- module2.exports = {
- MAX_LENGTH: 1024 * 64,
- CHAR_0: "0",
- CHAR_9: "9",
- CHAR_UPPERCASE_A: "A",
- CHAR_LOWERCASE_A: "a",
- CHAR_UPPERCASE_Z: "Z",
- CHAR_LOWERCASE_Z: "z",
- CHAR_LEFT_PARENTHESES: "(",
- CHAR_RIGHT_PARENTHESES: ")",
- CHAR_ASTERISK: "*",
- CHAR_AMPERSAND: "&",
- CHAR_AT: "@",
- CHAR_BACKSLASH: "\\",
- CHAR_BACKTICK: "`",
- CHAR_CARRIAGE_RETURN: "\r",
- CHAR_CIRCUMFLEX_ACCENT: "^",
- CHAR_COLON: ":",
- CHAR_COMMA: ",",
- CHAR_DOLLAR: "$",
- CHAR_DOT: ".",
- CHAR_DOUBLE_QUOTE: '"',
- CHAR_EQUAL: "=",
- CHAR_EXCLAMATION_MARK: "!",
- CHAR_FORM_FEED: "\f",
- CHAR_FORWARD_SLASH: "/",
- CHAR_HASH: "#",
- CHAR_HYPHEN_MINUS: "-",
- CHAR_LEFT_ANGLE_BRACKET: "<",
- CHAR_LEFT_CURLY_BRACE: "{",
- CHAR_LEFT_SQUARE_BRACKET: "[",
- CHAR_LINE_FEED: "\n",
- CHAR_NO_BREAK_SPACE: "\xA0",
- CHAR_PERCENT: "%",
- CHAR_PLUS: "+",
- CHAR_QUESTION_MARK: "?",
- CHAR_RIGHT_ANGLE_BRACKET: ">",
- CHAR_RIGHT_CURLY_BRACE: "}",
- CHAR_RIGHT_SQUARE_BRACKET: "]",
- CHAR_SEMICOLON: ";",
- CHAR_SINGLE_QUOTE: "'",
- CHAR_SPACE: " ",
- CHAR_TAB: " ",
- CHAR_UNDERSCORE: "_",
- CHAR_VERTICAL_LINE: "|",
- CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
- };
- }
- });
- var require_parse = __commonJS2({
- "node_modules/braces/lib/parse.js"(exports2, module2) {
- "use strict";
- var stringify2 = require_stringify();
- var {
- MAX_LENGTH,
- CHAR_BACKSLASH,
- CHAR_BACKTICK,
- CHAR_COMMA,
- CHAR_DOT,
- CHAR_LEFT_PARENTHESES,
- CHAR_RIGHT_PARENTHESES,
- CHAR_LEFT_CURLY_BRACE,
- CHAR_RIGHT_CURLY_BRACE,
- CHAR_LEFT_SQUARE_BRACKET,
- CHAR_RIGHT_SQUARE_BRACKET,
- CHAR_DOUBLE_QUOTE,
- CHAR_SINGLE_QUOTE,
- CHAR_NO_BREAK_SPACE,
- CHAR_ZERO_WIDTH_NOBREAK_SPACE
- } = require_constants();
- var parse = (input, options = {}) => {
- if (typeof input !== "string") {
- throw new TypeError("Expected a string");
- }
- let opts = options || {};
- let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
- if (input.length > max) {
- throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
- }
- let ast = {
- type: "root",
- input,
- nodes: []
- };
- let stack = [ast];
- let block = ast;
- let prev = ast;
- let brackets = 0;
- let length = input.length;
- let index = 0;
- let depth = 0;
- let value;
- let memo = {};
- const advance = () => input[index++];
- const push = (node) => {
- if (node.type === "text" && prev.type === "dot") {
- prev.type = "text";
- }
- if (prev && prev.type === "text" && node.type === "text") {
- prev.value += node.value;
- return;
- }
- block.nodes.push(node);
- node.parent = block;
- node.prev = prev;
- prev = node;
- return node;
- };
- push({
- type: "bos"
- });
- while (index < length) {
- block = stack[stack.length - 1];
- value = advance();
- if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
- continue;
- }
- if (value === CHAR_BACKSLASH) {
- push({
- type: "text",
- value: (options.keepEscaping ? value : "") + advance()
- });
- continue;
- }
- if (value === CHAR_RIGHT_SQUARE_BRACKET) {
- push({
- type: "text",
- value: "\\" + value
- });
- continue;
- }
- if (value === CHAR_LEFT_SQUARE_BRACKET) {
- brackets++;
- let closed = true;
- let next;
- while (index < length && (next = advance())) {
- value += next;
- if (next === CHAR_LEFT_SQUARE_BRACKET) {
- brackets++;
- continue;
- }
- if (next === CHAR_BACKSLASH) {
- value += advance();
- continue;
- }
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
- brackets--;
- if (brackets === 0) {
- break;
- }
- }
- }
- push({
- type: "text",
- value
- });
- continue;
- }
- if (value === CHAR_LEFT_PARENTHESES) {
- block = push({
- type: "paren",
- nodes: []
- });
- stack.push(block);
- push({
- type: "text",
- value
- });
- continue;
- }
- if (value === CHAR_RIGHT_PARENTHESES) {
- if (block.type !== "paren") {
- push({
- type: "text",
- value
- });
- continue;
- }
- block = stack.pop();
- push({
- type: "text",
- value
- });
- block = stack[stack.length - 1];
- continue;
- }
- if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
- let open = value;
- let next;
- if (options.keepQuotes !== true) {
- value = "";
- }
- while (index < length && (next = advance())) {
- if (next === CHAR_BACKSLASH) {
- value += next + advance();
- continue;
- }
- if (next === open) {
- if (options.keepQuotes === true)
- value += next;
- break;
- }
- value += next;
- }
- push({
- type: "text",
- value
- });
- continue;
- }
- if (value === CHAR_LEFT_CURLY_BRACE) {
- depth++;
- let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
- let brace = {
- type: "brace",
- open: true,
- close: false,
- dollar,
- depth,
- commas: 0,
- ranges: 0,
- nodes: []
- };
- block = push(brace);
- stack.push(block);
- push({
- type: "open",
- value
- });
- continue;
- }
- if (value === CHAR_RIGHT_CURLY_BRACE) {
- if (block.type !== "brace") {
- push({
- type: "text",
- value
- });
- continue;
- }
- let type = "close";
- block = stack.pop();
- block.close = true;
- push({
- type,
- value
- });
- depth--;
- block = stack[stack.length - 1];
- continue;
- }
- if (value === CHAR_COMMA && depth > 0) {
- if (block.ranges > 0) {
- block.ranges = 0;
- let open = block.nodes.shift();
- block.nodes = [open, {
- type: "text",
- value: stringify2(block)
- }];
- }
- push({
- type: "comma",
- value
- });
- block.commas++;
- continue;
- }
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
- let siblings = block.nodes;
- if (depth === 0 || siblings.length === 0) {
- push({
- type: "text",
- value
- });
- continue;
- }
- if (prev.type === "dot") {
- block.range = [];
- prev.value += value;
- prev.type = "range";
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
- block.invalid = true;
- block.ranges = 0;
- prev.type = "text";
- continue;
- }
- block.ranges++;
- block.args = [];
- continue;
- }
- if (prev.type === "range") {
- siblings.pop();
- let before = siblings[siblings.length - 1];
- before.value += prev.value + value;
- prev = before;
- block.ranges--;
- continue;
- }
- push({
- type: "dot",
- value
- });
- continue;
- }
- push({
- type: "text",
- value
- });
- }
- do {
- block = stack.pop();
- if (block.type !== "root") {
- block.nodes.forEach((node) => {
- if (!node.nodes) {
- if (node.type === "open")
- node.isOpen = true;
- if (node.type === "close")
- node.isClose = true;
- if (!node.nodes)
- node.type = "text";
- node.invalid = true;
- }
- });
- let parent = stack[stack.length - 1];
- let index2 = parent.nodes.indexOf(block);
- parent.nodes.splice(index2, 1, ...block.nodes);
- }
- } while (stack.length > 0);
- push({
- type: "eos"
- });
- return ast;
- };
- module2.exports = parse;
- }
- });
- var require_braces = __commonJS2({
- "node_modules/braces/index.js"(exports2, module2) {
- "use strict";
- var stringify2 = require_stringify();
- var compile = require_compile();
- var expand = require_expand();
- var parse = require_parse();
- var braces = (input, options = {}) => {
- let output = [];
- if (Array.isArray(input)) {
- for (let pattern of input) {
- let result = braces.create(pattern, options);
- if (Array.isArray(result)) {
- output.push(...result);
- } else {
- output.push(result);
- }
- }
- } else {
- output = [].concat(braces.create(input, options));
- }
- if (options && options.expand === true && options.nodupes === true) {
- output = [...new Set(output)];
- }
- return output;
- };
- braces.parse = (input, options = {}) => parse(input, options);
- braces.stringify = (input, options = {}) => {
- if (typeof input === "string") {
- return stringify2(braces.parse(input, options), options);
- }
- return stringify2(input, options);
- };
- braces.compile = (input, options = {}) => {
- if (typeof input === "string") {
- input = braces.parse(input, options);
- }
- return compile(input, options);
- };
- braces.expand = (input, options = {}) => {
- if (typeof input === "string") {
- input = braces.parse(input, options);
- }
- let result = expand(input, options);
- if (options.noempty === true) {
- result = result.filter(Boolean);
- }
- if (options.nodupes === true) {
- result = [...new Set(result)];
- }
- return result;
- };
- braces.create = (input, options = {}) => {
- if (input === "" || input.length < 3) {
- return [input];
- }
- return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
- };
- module2.exports = braces;
- }
- });
- var require_constants2 = __commonJS2({
- "node_modules/picomatch/lib/constants.js"(exports2, module2) {
- "use strict";
- var path = require("path");
- var WIN_SLASH = "\\\\/";
- var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
- var DOT_LITERAL = "\\.";
- var PLUS_LITERAL = "\\+";
- var QMARK_LITERAL = "\\?";
- var SLASH_LITERAL = "\\/";
- var ONE_CHAR = "(?=.)";
- var QMARK = "[^/]";
- var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
- var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
- var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
- var NO_DOT = `(?!${DOT_LITERAL})`;
- var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
- var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
- var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
- var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
- var STAR = `${QMARK}*?`;
- var POSIX_CHARS = {
- DOT_LITERAL,
- PLUS_LITERAL,
- QMARK_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- QMARK,
- END_ANCHOR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOTS,
- NO_DOT_SLASH,
- NO_DOTS_SLASH,
- QMARK_NO_DOT,
- STAR,
- START_ANCHOR
- };
- var WINDOWS_CHARS = Object.assign(Object.assign({}, POSIX_CHARS), {}, {
- SLASH_LITERAL: `[${WIN_SLASH}]`,
- QMARK: WIN_NO_SLASH,
- STAR: `${WIN_NO_SLASH}*?`,
- DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
- NO_DOT: `(?!${DOT_LITERAL})`,
- NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
- NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
- QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
- START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
- END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
- });
- var POSIX_REGEX_SOURCE = {
- alnum: "a-zA-Z0-9",
- alpha: "a-zA-Z",
- ascii: "\\x00-\\x7F",
- blank: " \\t",
- cntrl: "\\x00-\\x1F\\x7F",
- digit: "0-9",
- graph: "\\x21-\\x7E",
- lower: "a-z",
- print: "\\x20-\\x7E ",
- punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
- space: " \\t\\r\\n\\v\\f",
- upper: "A-Z",
- word: "A-Za-z0-9_",
- xdigit: "A-Fa-f0-9"
- };
- module2.exports = {
- MAX_LENGTH: 1024 * 64,
- POSIX_REGEX_SOURCE,
- REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
- REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
- REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
- REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
- REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
- REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
- REPLACEMENTS: {
- "***": "*",
- "**/**": "**",
- "**/**/**": "**"
- },
- CHAR_0: 48,
- CHAR_9: 57,
- CHAR_UPPERCASE_A: 65,
- CHAR_LOWERCASE_A: 97,
- CHAR_UPPERCASE_Z: 90,
- CHAR_LOWERCASE_Z: 122,
- CHAR_LEFT_PARENTHESES: 40,
- CHAR_RIGHT_PARENTHESES: 41,
- CHAR_ASTERISK: 42,
- CHAR_AMPERSAND: 38,
- CHAR_AT: 64,
- CHAR_BACKWARD_SLASH: 92,
- CHAR_CARRIAGE_RETURN: 13,
- CHAR_CIRCUMFLEX_ACCENT: 94,
- CHAR_COLON: 58,
- CHAR_COMMA: 44,
- CHAR_DOT: 46,
- CHAR_DOUBLE_QUOTE: 34,
- CHAR_EQUAL: 61,
- CHAR_EXCLAMATION_MARK: 33,
- CHAR_FORM_FEED: 12,
- CHAR_FORWARD_SLASH: 47,
- CHAR_GRAVE_ACCENT: 96,
- CHAR_HASH: 35,
- CHAR_HYPHEN_MINUS: 45,
- CHAR_LEFT_ANGLE_BRACKET: 60,
- CHAR_LEFT_CURLY_BRACE: 123,
- CHAR_LEFT_SQUARE_BRACKET: 91,
- CHAR_LINE_FEED: 10,
- CHAR_NO_BREAK_SPACE: 160,
- CHAR_PERCENT: 37,
- CHAR_PLUS: 43,
- CHAR_QUESTION_MARK: 63,
- CHAR_RIGHT_ANGLE_BRACKET: 62,
- CHAR_RIGHT_CURLY_BRACE: 125,
- CHAR_RIGHT_SQUARE_BRACKET: 93,
- CHAR_SEMICOLON: 59,
- CHAR_SINGLE_QUOTE: 39,
- CHAR_SPACE: 32,
- CHAR_TAB: 9,
- CHAR_UNDERSCORE: 95,
- CHAR_VERTICAL_LINE: 124,
- CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
- SEP: path.sep,
- extglobChars(chars) {
- return {
- "!": {
- type: "negate",
- open: "(?:(?!(?:",
- close: `))${chars.STAR})`
- },
- "?": {
- type: "qmark",
- open: "(?:",
- close: ")?"
- },
- "+": {
- type: "plus",
- open: "(?:",
- close: ")+"
- },
- "*": {
- type: "star",
- open: "(?:",
- close: ")*"
- },
- "@": {
- type: "at",
- open: "(?:",
- close: ")"
- }
- };
- },
- globChars(win32) {
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
- }
- };
- }
- });
- var require_utils2 = __commonJS2({
- "node_modules/picomatch/lib/utils.js"(exports2) {
- "use strict";
- var path = require("path");
- var win32 = process.platform === "win32";
- var {
- REGEX_BACKSLASH,
- REGEX_REMOVE_BACKSLASH,
- REGEX_SPECIAL_CHARS,
- REGEX_SPECIAL_CHARS_GLOBAL
- } = require_constants2();
- exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
- exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
- exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str);
- exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
- exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
- exports2.removeBackslashes = (str) => {
- return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
- return match === "\\" ? "" : match;
- });
- };
- exports2.supportsLookbehinds = () => {
- const segs = process.version.slice(1).split(".").map(Number);
- if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
- return true;
- }
- return false;
- };
- exports2.isWindows = (options) => {
- if (options && typeof options.windows === "boolean") {
- return options.windows;
- }
- return win32 === true || path.sep === "\\";
- };
- exports2.escapeLast = (input, char, lastIdx) => {
- const idx = input.lastIndexOf(char, lastIdx);
- if (idx === -1)
- return input;
- if (input[idx - 1] === "\\")
- return exports2.escapeLast(input, char, idx - 1);
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
- };
- exports2.removePrefix = (input, state = {}) => {
- let output = input;
- if (output.startsWith("./")) {
- output = output.slice(2);
- state.prefix = "./";
- }
- return output;
- };
- exports2.wrapOutput = (input, state = {}, options = {}) => {
- const prepend = options.contains ? "" : "^";
- const append = options.contains ? "" : "$";
- let output = `${prepend}(?:${input})${append}`;
- if (state.negated === true) {
- output = `(?:^(?!${output}).*$)`;
- }
- return output;
- };
- }
- });
- var require_scan = __commonJS2({
- "node_modules/picomatch/lib/scan.js"(exports2, module2) {
- "use strict";
- var utils = require_utils2();
- var {
- CHAR_ASTERISK,
- CHAR_AT,
- CHAR_BACKWARD_SLASH,
- CHAR_COMMA,
- CHAR_DOT,
- CHAR_EXCLAMATION_MARK,
- CHAR_FORWARD_SLASH,
- CHAR_LEFT_CURLY_BRACE,
- CHAR_LEFT_PARENTHESES,
- CHAR_LEFT_SQUARE_BRACKET,
- CHAR_PLUS,
- CHAR_QUESTION_MARK,
- CHAR_RIGHT_CURLY_BRACE,
- CHAR_RIGHT_PARENTHESES,
- CHAR_RIGHT_SQUARE_BRACKET
- } = require_constants2();
- var isPathSeparator = (code) => {
- return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
- };
- var depth = (token) => {
- if (token.isPrefix !== true) {
- token.depth = token.isGlobstar ? Infinity : 1;
- }
- };
- var scan = (input, options) => {
- const opts = options || {};
- const length = input.length - 1;
- const scanToEnd = opts.parts === true || opts.scanToEnd === true;
- const slashes = [];
- const tokens = [];
- const parts = [];
- let str = input;
- let index = -1;
- let start = 0;
- let lastIndex = 0;
- let isBrace = false;
- let isBracket = false;
- let isGlob = false;
- let isExtglob = false;
- let isGlobstar = false;
- let braceEscaped = false;
- let backslashes = false;
- let negated = false;
- let negatedExtglob = false;
- let finished = false;
- let braces = 0;
- let prev;
- let code;
- let token = {
- value: "",
- depth: 0,
- isGlob: false
- };
- const eos = () => index >= length;
- const peek = () => str.charCodeAt(index + 1);
- const advance = () => {
- prev = code;
- return str.charCodeAt(++index);
- };
- while (index < length) {
- code = advance();
- let next;
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- code = advance();
- if (code === CHAR_LEFT_CURLY_BRACE) {
- braceEscaped = true;
- }
- continue;
- }
- if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
- braces++;
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- advance();
- continue;
- }
- if (code === CHAR_LEFT_CURLY_BRACE) {
- braces++;
- continue;
- }
- if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
- isBrace = token.isBrace = true;
- isGlob = token.isGlob = true;
- finished = true;
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
- if (braceEscaped !== true && code === CHAR_COMMA) {
- isBrace = token.isBrace = true;
- isGlob = token.isGlob = true;
- finished = true;
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
- if (code === CHAR_RIGHT_CURLY_BRACE) {
- braces--;
- if (braces === 0) {
- braceEscaped = false;
- isBrace = token.isBrace = true;
- finished = true;
- break;
- }
- }
- }
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
- if (code === CHAR_FORWARD_SLASH) {
- slashes.push(index);
- tokens.push(token);
- token = {
- value: "",
- depth: 0,
- isGlob: false
- };
- if (finished === true)
- continue;
- if (prev === CHAR_DOT && index === start + 1) {
- start += 2;
- continue;
- }
- lastIndex = index + 1;
- continue;
- }
- if (opts.noext !== true) {
- const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
- if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
- isGlob = token.isGlob = true;
- isExtglob = token.isExtglob = true;
- finished = true;
- if (code === CHAR_EXCLAMATION_MARK && index === start) {
- negatedExtglob = true;
- }
- if (scanToEnd === true) {
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- code = advance();
- continue;
- }
- if (code === CHAR_RIGHT_PARENTHESES) {
- isGlob = token.isGlob = true;
- finished = true;
- break;
- }
- }
- continue;
- }
- break;
- }
- }
- if (code === CHAR_ASTERISK) {
- if (prev === CHAR_ASTERISK)
- isGlobstar = token.isGlobstar = true;
- isGlob = token.isGlob = true;
- finished = true;
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
- if (code === CHAR_QUESTION_MARK) {
- isGlob = token.isGlob = true;
- finished = true;
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
- if (code === CHAR_LEFT_SQUARE_BRACKET) {
- while (eos() !== true && (next = advance())) {
- if (next === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- advance();
- continue;
- }
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
- isBracket = token.isBracket = true;
- isGlob = token.isGlob = true;
- finished = true;
- break;
- }
- }
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
- if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
- negated = token.negated = true;
- start++;
- continue;
- }
- if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
- isGlob = token.isGlob = true;
- if (scanToEnd === true) {
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_LEFT_PARENTHESES) {
- backslashes = token.backslashes = true;
- code = advance();
- continue;
- }
- if (code === CHAR_RIGHT_PARENTHESES) {
- finished = true;
- break;
- }
- }
- continue;
- }
- break;
- }
- if (isGlob === true) {
- finished = true;
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
- }
- if (opts.noext === true) {
- isExtglob = false;
- isGlob = false;
- }
- let base = str;
- let prefix = "";
- let glob = "";
- if (start > 0) {
- prefix = str.slice(0, start);
- str = str.slice(start);
- lastIndex -= start;
- }
- if (base && isGlob === true && lastIndex > 0) {
- base = str.slice(0, lastIndex);
- glob = str.slice(lastIndex);
- } else if (isGlob === true) {
- base = "";
- glob = str;
- } else {
- base = str;
- }
- if (base && base !== "" && base !== "/" && base !== str) {
- if (isPathSeparator(base.charCodeAt(base.length - 1))) {
- base = base.slice(0, -1);
- }
- }
- if (opts.unescape === true) {
- if (glob)
- glob = utils.removeBackslashes(glob);
- if (base && backslashes === true) {
- base = utils.removeBackslashes(base);
- }
- }
- const state = {
- prefix,
- input,
- start,
- base,
- glob,
- isBrace,
- isBracket,
- isGlob,
- isExtglob,
- isGlobstar,
- negated,
- negatedExtglob
- };
- if (opts.tokens === true) {
- state.maxDepth = 0;
- if (!isPathSeparator(code)) {
- tokens.push(token);
- }
- state.tokens = tokens;
- }
- if (opts.parts === true || opts.tokens === true) {
- let prevIndex;
- for (let idx = 0; idx < slashes.length; idx++) {
- const n = prevIndex ? prevIndex + 1 : start;
- const i = slashes[idx];
- const value = input.slice(n, i);
- if (opts.tokens) {
- if (idx === 0 && start !== 0) {
- tokens[idx].isPrefix = true;
- tokens[idx].value = prefix;
- } else {
- tokens[idx].value = value;
- }
- depth(tokens[idx]);
- state.maxDepth += tokens[idx].depth;
- }
- if (idx !== 0 || value !== "") {
- parts.push(value);
- }
- prevIndex = i;
- }
- if (prevIndex && prevIndex + 1 < input.length) {
- const value = input.slice(prevIndex + 1);
- parts.push(value);
- if (opts.tokens) {
- tokens[tokens.length - 1].value = value;
- depth(tokens[tokens.length - 1]);
- state.maxDepth += tokens[tokens.length - 1].depth;
- }
- }
- state.slashes = slashes;
- state.parts = parts;
- }
- return state;
- };
- module2.exports = scan;
- }
- });
- var require_parse2 = __commonJS2({
- "node_modules/picomatch/lib/parse.js"(exports2, module2) {
- "use strict";
- var constants = require_constants2();
- var utils = require_utils2();
- var {
- MAX_LENGTH,
- POSIX_REGEX_SOURCE,
- REGEX_NON_SPECIAL_CHARS,
- REGEX_SPECIAL_CHARS_BACKREF,
- REPLACEMENTS
- } = constants;
- var expandRange = (args, options) => {
- if (typeof options.expandRange === "function") {
- return options.expandRange(...args, options);
- }
- args.sort();
- const value = `[${args.join("-")}]`;
- try {
- new RegExp(value);
- } catch (ex) {
- return args.map((v) => utils.escapeRegex(v)).join("..");
- }
- return value;
- };
- var syntaxError = (type, char) => {
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
- };
- var parse = (input, options) => {
- if (typeof input !== "string") {
- throw new TypeError("Expected a string");
- }
- input = REPLACEMENTS[input] || input;
- const opts = Object.assign({}, options);
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
- let len = input.length;
- if (len > max) {
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
- }
- const bos = {
- type: "bos",
- value: "",
- output: opts.prepend || ""
- };
- const tokens = [bos];
- const capture = opts.capture ? "" : "?:";
- const win32 = utils.isWindows(options);
- const PLATFORM_CHARS = constants.globChars(win32);
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
- const {
- DOT_LITERAL,
- PLUS_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOT_SLASH,
- NO_DOTS_SLASH,
- QMARK,
- QMARK_NO_DOT,
- STAR,
- START_ANCHOR
- } = PLATFORM_CHARS;
- const globstar = (opts2) => {
- return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
- };
- const nodot = opts.dot ? "" : NO_DOT;
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
- let star = opts.bash === true ? globstar(opts) : STAR;
- if (opts.capture) {
- star = `(${star})`;
- }
- if (typeof opts.noext === "boolean") {
- opts.noextglob = opts.noext;
- }
- const state = {
- input,
- index: -1,
- start: 0,
- dot: opts.dot === true,
- consumed: "",
- output: "",
- prefix: "",
- backtrack: false,
- negated: false,
- brackets: 0,
- braces: 0,
- parens: 0,
- quotes: 0,
- globstar: false,
- tokens
- };
- input = utils.removePrefix(input, state);
- len = input.length;
- const extglobs = [];
- const braces = [];
- const stack = [];
- let prev = bos;
- let value;
- const eos = () => state.index === len - 1;
- const peek = state.peek = (n = 1) => input[state.index + n];
- const advance = state.advance = () => input[++state.index] || "";
- const remaining = () => input.slice(state.index + 1);
- const consume = (value2 = "", num = 0) => {
- state.consumed += value2;
- state.index += num;
- };
- const append = (token) => {
- state.output += token.output != null ? token.output : token.value;
- consume(token.value);
- };
- const negate = () => {
- let count = 1;
- while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
- advance();
- state.start++;
- count++;
- }
- if (count % 2 === 0) {
- return false;
- }
- state.negated = true;
- state.start++;
- return true;
- };
- const increment = (type) => {
- state[type]++;
- stack.push(type);
- };
- const decrement = (type) => {
- state[type]--;
- stack.pop();
- };
- const push = (tok) => {
- if (prev.type === "globstar") {
- const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
- const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
- if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
- state.output = state.output.slice(0, -prev.output.length);
- prev.type = "star";
- prev.value = "*";
- prev.output = star;
- state.output += prev.output;
- }
- }
- if (extglobs.length && tok.type !== "paren") {
- extglobs[extglobs.length - 1].inner += tok.value;
- }
- if (tok.value || tok.output)
- append(tok);
- if (prev && prev.type === "text" && tok.type === "text") {
- prev.value += tok.value;
- prev.output = (prev.output || "") + tok.value;
- return;
- }
- tok.prev = prev;
- tokens.push(tok);
- prev = tok;
- };
- const extglobOpen = (type, value2) => {
- const token = Object.assign(Object.assign({}, EXTGLOB_CHARS[value2]), {}, {
- conditions: 1,
- inner: ""
- });
- token.prev = prev;
- token.parens = state.parens;
- token.output = state.output;
- const output = (opts.capture ? "(" : "") + token.open;
- increment("parens");
- push({
- type,
- value: value2,
- output: state.output ? "" : ONE_CHAR
- });
- push({
- type: "paren",
- extglob: true,
- value: advance(),
- output
- });
- extglobs.push(token);
- };
- const extglobClose = (token) => {
- let output = token.close + (opts.capture ? ")" : "");
- let rest;
- if (token.type === "negate") {
- let extglobStar = star;
- if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
- extglobStar = globstar(opts);
- }
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
- output = token.close = `)$))${extglobStar}`;
- }
- if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
- const expression = parse(rest, Object.assign(Object.assign({}, options), {}, {
- fastpaths: false
- })).output;
- output = token.close = `)${expression})${extglobStar})`;
- }
- if (token.prev.type === "bos") {
- state.negatedExtglob = true;
- }
- }
- push({
- type: "paren",
- extglob: true,
- value,
- output
- });
- decrement("parens");
- };
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
- let backslashes = false;
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
- if (first === "\\") {
- backslashes = true;
- return m;
- }
- if (first === "?") {
- if (esc) {
- return esc + first + (rest ? QMARK.repeat(rest.length) : "");
- }
- if (index === 0) {
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
- }
- return QMARK.repeat(chars.length);
- }
- if (first === ".") {
- return DOT_LITERAL.repeat(chars.length);
- }
- if (first === "*") {
- if (esc) {
- return esc + first + (rest ? star : "");
- }
- return star;
- }
- return esc ? m : `\\${m}`;
- });
- if (backslashes === true) {
- if (opts.unescape === true) {
- output = output.replace(/\\/g, "");
- } else {
- output = output.replace(/\\+/g, (m) => {
- return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
- });
- }
- }
- if (output === input && opts.contains === true) {
- state.output = input;
- return state;
- }
- state.output = utils.wrapOutput(output, state, options);
- return state;
- }
- while (!eos()) {
- value = advance();
- if (value === "\0") {
- continue;
- }
- if (value === "\\") {
- const next = peek();
- if (next === "/" && opts.bash !== true) {
- continue;
- }
- if (next === "." || next === ";") {
- continue;
- }
- if (!next) {
- value += "\\";
- push({
- type: "text",
- value
- });
- continue;
- }
- const match = /^\\+/.exec(remaining());
- let slashes = 0;
- if (match && match[0].length > 2) {
- slashes = match[0].length;
- state.index += slashes;
- if (slashes % 2 !== 0) {
- value += "\\";
- }
- }
- if (opts.unescape === true) {
- value = advance();
- } else {
- value += advance();
- }
- if (state.brackets === 0) {
- push({
- type: "text",
- value
- });
- continue;
- }
- }
- if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
- if (opts.posix !== false && value === ":") {
- const inner = prev.value.slice(1);
- if (inner.includes("[")) {
- prev.posix = true;
- if (inner.includes(":")) {
- const idx = prev.value.lastIndexOf("[");
- const pre = prev.value.slice(0, idx);
- const rest2 = prev.value.slice(idx + 2);
- const posix = POSIX_REGEX_SOURCE[rest2];
- if (posix) {
- prev.value = pre + posix;
- state.backtrack = true;
- advance();
- if (!bos.output && tokens.indexOf(prev) === 1) {
- bos.output = ONE_CHAR;
- }
- continue;
- }
- }
- }
- }
- if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
- value = `\\${value}`;
- }
- if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
- value = `\\${value}`;
- }
- if (opts.posix === true && value === "!" && prev.value === "[") {
- value = "^";
- }
- prev.value += value;
- append({
- value
- });
- continue;
- }
- if (state.quotes === 1 && value !== '"') {
- value = utils.escapeRegex(value);
- prev.value += value;
- append({
- value
- });
- continue;
- }
- if (value === '"') {
- state.quotes = state.quotes === 1 ? 0 : 1;
- if (opts.keepQuotes === true) {
- push({
- type: "text",
- value
- });
- }
- continue;
- }
- if (value === "(") {
- increment("parens");
- push({
- type: "paren",
- value
- });
- continue;
- }
- if (value === ")") {
- if (state.parens === 0 && opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError("opening", "("));
- }
- const extglob = extglobs[extglobs.length - 1];
- if (extglob && state.parens === extglob.parens + 1) {
- extglobClose(extglobs.pop());
- continue;
- }
- push({
- type: "paren",
- value,
- output: state.parens ? ")" : "\\)"
- });
- decrement("parens");
- continue;
- }
- if (value === "[") {
- if (opts.nobracket === true || !remaining().includes("]")) {
- if (opts.nobracket !== true && opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError("closing", "]"));
- }
- value = `\\${value}`;
- } else {
- increment("brackets");
- }
- push({
- type: "bracket",
- value
- });
- continue;
- }
- if (value === "]") {
- if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
- push({
- type: "text",
- value,
- output: `\\${value}`
- });
- continue;
- }
- if (state.brackets === 0) {
- if (opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError("opening", "["));
- }
- push({
- type: "text",
- value,
- output: `\\${value}`
- });
- continue;
- }
- decrement("brackets");
- const prevValue = prev.value.slice(1);
- if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
- value = `/${value}`;
- }
- prev.value += value;
- append({
- value
- });
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
- continue;
- }
- const escaped = utils.escapeRegex(prev.value);
- state.output = state.output.slice(0, -prev.value.length);
- if (opts.literalBrackets === true) {
- state.output += escaped;
- prev.value = escaped;
- continue;
- }
- prev.value = `(${capture}${escaped}|${prev.value})`;
- state.output += prev.value;
- continue;
- }
- if (value === "{" && opts.nobrace !== true) {
- increment("braces");
- const open = {
- type: "brace",
- value,
- output: "(",
- outputIndex: state.output.length,
- tokensIndex: state.tokens.length
- };
- braces.push(open);
- push(open);
- continue;
- }
- if (value === "}") {
- const brace = braces[braces.length - 1];
- if (opts.nobrace === true || !brace) {
- push({
- type: "text",
- value,
- output: value
- });
- continue;
- }
- let output = ")";
- if (brace.dots === true) {
- const arr = tokens.slice();
- const range = [];
- for (let i = arr.length - 1; i >= 0; i--) {
- tokens.pop();
- if (arr[i].type === "brace") {
- break;
- }
- if (arr[i].type !== "dots") {
- range.unshift(arr[i].value);
- }
- }
- output = expandRange(range, opts);
- state.backtrack = true;
- }
- if (brace.comma !== true && brace.dots !== true) {
- const out = state.output.slice(0, brace.outputIndex);
- const toks = state.tokens.slice(brace.tokensIndex);
- brace.value = brace.output = "\\{";
- value = output = "\\}";
- state.output = out;
- for (const t of toks) {
- state.output += t.output || t.value;
- }
- }
- push({
- type: "brace",
- value,
- output
- });
- decrement("braces");
- braces.pop();
- continue;
- }
- if (value === "|") {
- if (extglobs.length > 0) {
- extglobs[extglobs.length - 1].conditions++;
- }
- push({
- type: "text",
- value
- });
- continue;
- }
- if (value === ",") {
- let output = value;
- const brace = braces[braces.length - 1];
- if (brace && stack[stack.length - 1] === "braces") {
- brace.comma = true;
- output = "|";
- }
- push({
- type: "comma",
- value,
- output
- });
- continue;
- }
- if (value === "/") {
- if (prev.type === "dot" && state.index === state.start + 1) {
- state.start = state.index + 1;
- state.consumed = "";
- state.output = "";
- tokens.pop();
- prev = bos;
- continue;
- }
- push({
- type: "slash",
- value,
- output: SLASH_LITERAL
- });
- continue;
- }
- if (value === ".") {
- if (state.braces > 0 && prev.type === "dot") {
- if (prev.value === ".")
- prev.output = DOT_LITERAL;
- const brace = braces[braces.length - 1];
- prev.type = "dots";
- prev.output += value;
- prev.value += value;
- brace.dots = true;
- continue;
- }
- if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
- push({
- type: "text",
- value,
- output: DOT_LITERAL
- });
- continue;
- }
- push({
- type: "dot",
- value,
- output: DOT_LITERAL
- });
- continue;
- }
- if (value === "?") {
- const isGroup = prev && prev.value === "(";
- if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
- extglobOpen("qmark", value);
- continue;
- }
- if (prev && prev.type === "paren") {
- const next = peek();
- let output = value;
- if (next === "<" && !utils.supportsLookbehinds()) {
- throw new Error("Node.js v10 or higher is required for regex lookbehinds");
- }
- if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
- output = `\\${value}`;
- }
- push({
- type: "text",
- value,
- output
- });
- continue;
- }
- if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
- push({
- type: "qmark",
- value,
- output: QMARK_NO_DOT
- });
- continue;
- }
- push({
- type: "qmark",
- value,
- output: QMARK
- });
- continue;
- }
- if (value === "!") {
- if (opts.noextglob !== true && peek() === "(") {
- if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
- extglobOpen("negate", value);
- continue;
- }
- }
- if (opts.nonegate !== true && state.index === 0) {
- negate();
- continue;
- }
- }
- if (value === "+") {
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
- extglobOpen("plus", value);
- continue;
- }
- if (prev && prev.value === "(" || opts.regex === false) {
- push({
- type: "plus",
- value,
- output: PLUS_LITERAL
- });
- continue;
- }
- if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
- push({
- type: "plus",
- value
- });
- continue;
- }
- push({
- type: "plus",
- value: PLUS_LITERAL
- });
- continue;
- }
- if (value === "@") {
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
- push({
- type: "at",
- extglob: true,
- value,
- output: ""
- });
- continue;
- }
- push({
- type: "text",
- value
- });
- continue;
- }
- if (value !== "*") {
- if (value === "$" || value === "^") {
- value = `\\${value}`;
- }
- const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
- if (match) {
- value += match[0];
- state.index += match[0].length;
- }
- push({
- type: "text",
- value
- });
- continue;
- }
- if (prev && (prev.type === "globstar" || prev.star === true)) {
- prev.type = "star";
- prev.star = true;
- prev.value += value;
- prev.output = star;
- state.backtrack = true;
- state.globstar = true;
- consume(value);
- continue;
- }
- let rest = remaining();
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
- extglobOpen("star", value);
- continue;
- }
- if (prev.type === "star") {
- if (opts.noglobstar === true) {
- consume(value);
- continue;
- }
- const prior = prev.prev;
- const before = prior.prev;
- const isStart = prior.type === "slash" || prior.type === "bos";
- const afterStar = before && (before.type === "star" || before.type === "globstar");
- if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
- push({
- type: "star",
- value,
- output: ""
- });
- continue;
- }
- const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
- const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
- if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
- push({
- type: "star",
- value,
- output: ""
- });
- continue;
- }
- while (rest.slice(0, 3) === "/**") {
- const after = input[state.index + 4];
- if (after && after !== "/") {
- break;
- }
- rest = rest.slice(3);
- consume("/**", 3);
- }
- if (prior.type === "bos" && eos()) {
- prev.type = "globstar";
- prev.value += value;
- prev.output = globstar(opts);
- state.output = prev.output;
- state.globstar = true;
- consume(value);
- continue;
- }
- if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
- prior.output = `(?:${prior.output}`;
- prev.type = "globstar";
- prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
- prev.value += value;
- state.globstar = true;
- state.output += prior.output + prev.output;
- consume(value);
- continue;
- }
- if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
- const end = rest[1] !== void 0 ? "|$" : "";
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
- prior.output = `(?:${prior.output}`;
- prev.type = "globstar";
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
- prev.value += value;
- state.output += prior.output + prev.output;
- state.globstar = true;
- consume(value + advance());
- push({
- type: "slash",
- value: "/",
- output: ""
- });
- continue;
- }
- if (prior.type === "bos" && rest[0] === "/") {
- prev.type = "globstar";
- prev.value += value;
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
- state.output = prev.output;
- state.globstar = true;
- consume(value + advance());
- push({
- type: "slash",
- value: "/",
- output: ""
- });
- continue;
- }
- state.output = state.output.slice(0, -prev.output.length);
- prev.type = "globstar";
- prev.output = globstar(opts);
- prev.value += value;
- state.output += prev.output;
- state.globstar = true;
- consume(value);
- continue;
- }
- const token = {
- type: "star",
- value,
- output: star
- };
- if (opts.bash === true) {
- token.output = ".*?";
- if (prev.type === "bos" || prev.type === "slash") {
- token.output = nodot + token.output;
- }
- push(token);
- continue;
- }
- if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
- token.output = value;
- push(token);
- continue;
- }
- if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
- if (prev.type === "dot") {
- state.output += NO_DOT_SLASH;
- prev.output += NO_DOT_SLASH;
- } else if (opts.dot === true) {
- state.output += NO_DOTS_SLASH;
- prev.output += NO_DOTS_SLASH;
- } else {
- state.output += nodot;
- prev.output += nodot;
- }
- if (peek() !== "*") {
- state.output += ONE_CHAR;
- prev.output += ONE_CHAR;
- }
- }
- push(token);
- }
- while (state.brackets > 0) {
- if (opts.strictBrackets === true)
- throw new SyntaxError(syntaxError("closing", "]"));
- state.output = utils.escapeLast(state.output, "[");
- decrement("brackets");
- }
- while (state.parens > 0) {
- if (opts.strictBrackets === true)
- throw new SyntaxError(syntaxError("closing", ")"));
- state.output = utils.escapeLast(state.output, "(");
- decrement("parens");
- }
- while (state.braces > 0) {
- if (opts.strictBrackets === true)
- throw new SyntaxError(syntaxError("closing", "}"));
- state.output = utils.escapeLast(state.output, "{");
- decrement("braces");
- }
- if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
- push({
- type: "maybe_slash",
- value: "",
- output: `${SLASH_LITERAL}?`
- });
- }
- if (state.backtrack === true) {
- state.output = "";
- for (const token of state.tokens) {
- state.output += token.output != null ? token.output : token.value;
- if (token.suffix) {
- state.output += token.suffix;
- }
- }
- }
- return state;
- };
- parse.fastpaths = (input, options) => {
- const opts = Object.assign({}, options);
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
- const len = input.length;
- if (len > max) {
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
- }
- input = REPLACEMENTS[input] || input;
- const win32 = utils.isWindows(options);
- const {
- DOT_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOTS,
- NO_DOTS_SLASH,
- STAR,
- START_ANCHOR
- } = constants.globChars(win32);
- const nodot = opts.dot ? NO_DOTS : NO_DOT;
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
- const capture = opts.capture ? "" : "?:";
- const state = {
- negated: false,
- prefix: ""
- };
- let star = opts.bash === true ? ".*?" : STAR;
- if (opts.capture) {
- star = `(${star})`;
- }
- const globstar = (opts2) => {
- if (opts2.noglobstar === true)
- return star;
- return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
- };
- const create = (str) => {
- switch (str) {
- case "*":
- return `${nodot}${ONE_CHAR}${star}`;
- case ".*":
- return `${DOT_LITERAL}${ONE_CHAR}${star}`;
- case "*.*":
- return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
- case "*/*":
- return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
- case "**":
- return nodot + globstar(opts);
- case "**/*":
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
- case "**/*.*":
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
- case "**/.*":
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
- default: {
- const match = /^(.*?)\.(\w+)$/.exec(str);
- if (!match)
- return;
- const source2 = create(match[1]);
- if (!source2)
- return;
- return source2 + DOT_LITERAL + match[2];
- }
- }
- };
- const output = utils.removePrefix(input, state);
- let source = create(output);
- if (source && opts.strictSlashes !== true) {
- source += `${SLASH_LITERAL}?`;
- }
- return source;
- };
- module2.exports = parse;
- }
- });
- var require_picomatch = __commonJS2({
- "node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
- "use strict";
- var path = require("path");
- var scan = require_scan();
- var parse = require_parse2();
- var utils = require_utils2();
- var constants = require_constants2();
- var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
- var picomatch = (glob, options, returnState = false) => {
- if (Array.isArray(glob)) {
- const fns = glob.map((input) => picomatch(input, options, returnState));
- const arrayMatcher = (str) => {
- for (const isMatch of fns) {
- const state2 = isMatch(str);
- if (state2)
- return state2;
- }
- return false;
- };
- return arrayMatcher;
- }
- const isState = isObject(glob) && glob.tokens && glob.input;
- if (glob === "" || typeof glob !== "string" && !isState) {
- throw new TypeError("Expected pattern to be a non-empty string");
- }
- const opts = options || {};
- const posix = utils.isWindows(options);
- const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
- const state = regex.state;
- delete regex.state;
- let isIgnored = () => false;
- if (opts.ignore) {
- const ignoreOpts = Object.assign(Object.assign({}, options), {}, {
- ignore: null,
- onMatch: null,
- onResult: null
- });
- isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
- }
- const matcher = (input, returnObject = false) => {
- const {
- isMatch,
- match,
- output
- } = picomatch.test(input, regex, options, {
- glob,
- posix
- });
- const result = {
- glob,
- state,
- regex,
- posix,
- input,
- output,
- match,
- isMatch
- };
- if (typeof opts.onResult === "function") {
- opts.onResult(result);
- }
- if (isMatch === false) {
- result.isMatch = false;
- return returnObject ? result : false;
- }
- if (isIgnored(input)) {
- if (typeof opts.onIgnore === "function") {
- opts.onIgnore(result);
- }
- result.isMatch = false;
- return returnObject ? result : false;
- }
- if (typeof opts.onMatch === "function") {
- opts.onMatch(result);
- }
- return returnObject ? result : true;
- };
- if (returnState) {
- matcher.state = state;
- }
- return matcher;
- };
- picomatch.test = (input, regex, options, {
- glob,
- posix
- } = {}) => {
- if (typeof input !== "string") {
- throw new TypeError("Expected input to be a string");
- }
- if (input === "") {
- return {
- isMatch: false,
- output: ""
- };
- }
- const opts = options || {};
- const format = opts.format || (posix ? utils.toPosixSlashes : null);
- let match = input === glob;
- let output = match && format ? format(input) : input;
- if (match === false) {
- output = format ? format(input) : input;
- match = output === glob;
- }
- if (match === false || opts.capture === true) {
- if (opts.matchBase === true || opts.basename === true) {
- match = picomatch.matchBase(input, regex, options, posix);
- } else {
- match = regex.exec(output);
- }
- }
- return {
- isMatch: Boolean(match),
- match,
- output
- };
- };
- picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
- return regex.test(path.basename(input));
- };
- picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
- picomatch.parse = (pattern, options) => {
- if (Array.isArray(pattern))
- return pattern.map((p) => picomatch.parse(p, options));
- return parse(pattern, Object.assign(Object.assign({}, options), {}, {
- fastpaths: false
- }));
- };
- picomatch.scan = (input, options) => scan(input, options);
- picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
- if (returnOutput === true) {
- return state.output;
- }
- const opts = options || {};
- const prepend = opts.contains ? "" : "^";
- const append = opts.contains ? "" : "$";
- let source = `${prepend}(?:${state.output})${append}`;
- if (state && state.negated === true) {
- source = `^(?!${source}).*$`;
- }
- const regex = picomatch.toRegex(source, options);
- if (returnState === true) {
- regex.state = state;
- }
- return regex;
- };
- picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
- if (!input || typeof input !== "string") {
- throw new TypeError("Expected a non-empty string");
- }
- let parsed = {
- negated: false,
- fastpaths: true
- };
- if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
- parsed.output = parse.fastpaths(input, options);
- }
- if (!parsed.output) {
- parsed = parse(input, options);
- }
- return picomatch.compileRe(parsed, options, returnOutput, returnState);
- };
- picomatch.toRegex = (source, options) => {
- try {
- const opts = options || {};
- return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
- } catch (err) {
- if (options && options.debug === true)
- throw err;
- return /$^/;
- }
- };
- picomatch.constants = constants;
- module2.exports = picomatch;
- }
- });
- var require_picomatch2 = __commonJS2({
- "node_modules/picomatch/index.js"(exports2, module2) {
- "use strict";
- module2.exports = require_picomatch();
- }
- });
- var require_micromatch = __commonJS2({
- "node_modules/micromatch/index.js"(exports2, module2) {
- "use strict";
- var util = require("util");
- var braces = require_braces();
- var picomatch = require_picomatch2();
- var utils = require_utils2();
- var isEmptyString = (val) => val === "" || val === "./";
- var micromatch = (list, patterns, options) => {
- patterns = [].concat(patterns);
- list = [].concat(list);
- let omit = /* @__PURE__ */ new Set();
- let keep = /* @__PURE__ */ new Set();
- let items = /* @__PURE__ */ new Set();
- let negatives = 0;
- let onResult = (state) => {
- items.add(state.output);
- if (options && options.onResult) {
- options.onResult(state);
- }
- };
- for (let i = 0; i < patterns.length; i++) {
- let isMatch = picomatch(String(patterns[i]), Object.assign(Object.assign({}, options), {}, {
- onResult
- }), true);
- let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
- if (negated)
- negatives++;
- for (let item of list) {
- let matched = isMatch(item, true);
- let match = negated ? !matched.isMatch : matched.isMatch;
- if (!match)
- continue;
- if (negated) {
- omit.add(matched.output);
- } else {
- omit.delete(matched.output);
- keep.add(matched.output);
- }
- }
- }
- let result = negatives === patterns.length ? [...items] : [...keep];
- let matches = result.filter((item) => !omit.has(item));
- if (options && matches.length === 0) {
- if (options.failglob === true) {
- throw new Error(`No matches found for "${patterns.join(", ")}"`);
- }
- if (options.nonull === true || options.nullglob === true) {
- return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
- }
- }
- return matches;
- };
- micromatch.match = micromatch;
- micromatch.matcher = (pattern, options) => picomatch(pattern, options);
- micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
- micromatch.any = micromatch.isMatch;
- micromatch.not = (list, patterns, options = {}) => {
- patterns = [].concat(patterns).map(String);
- let result = /* @__PURE__ */ new Set();
- let items = [];
- let onResult = (state) => {
- if (options.onResult)
- options.onResult(state);
- items.push(state.output);
- };
- let matches = new Set(micromatch(list, patterns, Object.assign(Object.assign({}, options), {}, {
- onResult
- })));
- for (let item of items) {
- if (!matches.has(item)) {
- result.add(item);
- }
- }
- return [...result];
- };
- micromatch.contains = (str, pattern, options) => {
- if (typeof str !== "string") {
- throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
- }
- if (Array.isArray(pattern)) {
- return pattern.some((p) => micromatch.contains(str, p, options));
- }
- if (typeof pattern === "string") {
- if (isEmptyString(str) || isEmptyString(pattern)) {
- return false;
- }
- if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
- return true;
- }
- }
- return micromatch.isMatch(str, pattern, Object.assign(Object.assign({}, options), {}, {
- contains: true
- }));
- };
- micromatch.matchKeys = (obj, patterns, options) => {
- if (!utils.isObject(obj)) {
- throw new TypeError("Expected the first argument to be an object");
- }
- let keys = micromatch(Object.keys(obj), patterns, options);
- let res = {};
- for (let key of keys)
- res[key] = obj[key];
- return res;
- };
- micromatch.some = (list, patterns, options) => {
- let items = [].concat(list);
- for (let pattern of [].concat(patterns)) {
- let isMatch = picomatch(String(pattern), options);
- if (items.some((item) => isMatch(item))) {
- return true;
- }
- }
- return false;
- };
- micromatch.every = (list, patterns, options) => {
- let items = [].concat(list);
- for (let pattern of [].concat(patterns)) {
- let isMatch = picomatch(String(pattern), options);
- if (!items.every((item) => isMatch(item))) {
- return false;
- }
- }
- return true;
- };
- micromatch.all = (str, patterns, options) => {
- if (typeof str !== "string") {
- throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
- }
- return [].concat(patterns).every((p) => picomatch(p, options)(str));
- };
- micromatch.capture = (glob, input, options) => {
- let posix = utils.isWindows(options);
- let regex = picomatch.makeRe(String(glob), Object.assign(Object.assign({}, options), {}, {
- capture: true
- }));
- let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
- if (match) {
- return match.slice(1).map((v) => v === void 0 ? "" : v);
- }
- };
- micromatch.makeRe = (...args) => picomatch.makeRe(...args);
- micromatch.scan = (...args) => picomatch.scan(...args);
- micromatch.parse = (patterns, options) => {
- let res = [];
- for (let pattern of [].concat(patterns || [])) {
- for (let str of braces(String(pattern), options)) {
- res.push(picomatch.parse(str, options));
- }
- }
- return res;
- };
- micromatch.braces = (pattern, options) => {
- if (typeof pattern !== "string")
- throw new TypeError("Expected a string");
- if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) {
- return [pattern];
- }
- return braces(pattern, options);
- };
- micromatch.braceExpand = (pattern, options) => {
- if (typeof pattern !== "string")
- throw new TypeError("Expected a string");
- return micromatch.braces(pattern, Object.assign(Object.assign({}, options), {}, {
- expand: true
- }));
- };
- module2.exports = micromatch;
- }
- });
- var require_pattern = __commonJS2({
- "node_modules/fast-glob/out/utils/pattern.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- 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;
- var path = require("path");
- var globParent = require_glob_parent();
- var micromatch = require_micromatch();
- var GLOBSTAR = "**";
- var ESCAPE_SYMBOL = "\\";
- var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
- var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
- var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
- var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
- var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
- function isStaticPattern(pattern, options = {}) {
- return !isDynamicPattern(pattern, options);
- }
- exports2.isStaticPattern = isStaticPattern;
- function isDynamicPattern(pattern, options = {}) {
- if (pattern === "") {
- return false;
- }
- if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
- return true;
- }
- if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
- return true;
- }
- if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
- return true;
- }
- if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
- return true;
- }
- return false;
- }
- exports2.isDynamicPattern = isDynamicPattern;
- function hasBraceExpansion(pattern) {
- const openingBraceIndex = pattern.indexOf("{");
- if (openingBraceIndex === -1) {
- return false;
- }
- const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1);
- if (closingBraceIndex === -1) {
- return false;
- }
- const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
- return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
- }
- function convertToPositivePattern(pattern) {
- return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
- }
- exports2.convertToPositivePattern = convertToPositivePattern;
- function convertToNegativePattern(pattern) {
- return "!" + pattern;
- }
- exports2.convertToNegativePattern = convertToNegativePattern;
- function isNegativePattern(pattern) {
- return pattern.startsWith("!") && pattern[1] !== "(";
- }
- exports2.isNegativePattern = isNegativePattern;
- function isPositivePattern(pattern) {
- return !isNegativePattern(pattern);
- }
- exports2.isPositivePattern = isPositivePattern;
- function getNegativePatterns(patterns) {
- return patterns.filter(isNegativePattern);
- }
- exports2.getNegativePatterns = getNegativePatterns;
- function getPositivePatterns(patterns) {
- return patterns.filter(isPositivePattern);
- }
- exports2.getPositivePatterns = getPositivePatterns;
- function getPatternsInsideCurrentDirectory(patterns) {
- return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
- }
- exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
- function getPatternsOutsideCurrentDirectory(patterns) {
- return patterns.filter(isPatternRelatedToParentDirectory);
- }
- exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
- function isPatternRelatedToParentDirectory(pattern) {
- return pattern.startsWith("..") || pattern.startsWith("./..");
- }
- exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
- function getBaseDirectory(pattern) {
- return globParent(pattern, {
- flipBackslashes: false
- });
- }
- exports2.getBaseDirectory = getBaseDirectory;
- function hasGlobStar(pattern) {
- return pattern.includes(GLOBSTAR);
- }
- exports2.hasGlobStar = hasGlobStar;
- function endsWithSlashGlobStar(pattern) {
- return pattern.endsWith("/" + GLOBSTAR);
- }
- exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
- function isAffectDepthOfReadingPattern(pattern) {
- const basename = path.basename(pattern);
- return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
- }
- exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
- function expandPatternsWithBraceExpansion(patterns) {
- return patterns.reduce((collection, pattern) => {
- return collection.concat(expandBraceExpansion(pattern));
- }, []);
- }
- exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
- function expandBraceExpansion(pattern) {
- return micromatch.braces(pattern, {
- expand: true,
- nodupes: true
- });
- }
- exports2.expandBraceExpansion = expandBraceExpansion;
- function getPatternParts(pattern, options) {
- let {
- parts
- } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), {
- parts: true
- }));
- if (parts.length === 0) {
- parts = [pattern];
- }
- if (parts[0].startsWith("/")) {
- parts[0] = parts[0].slice(1);
- parts.unshift("");
- }
- return parts;
- }
- exports2.getPatternParts = getPatternParts;
- function makeRe(pattern, options) {
- return micromatch.makeRe(pattern, options);
- }
- exports2.makeRe = makeRe;
- function convertPatternsToRe(patterns, options) {
- return patterns.map((pattern) => makeRe(pattern, options));
- }
- exports2.convertPatternsToRe = convertPatternsToRe;
- function matchAny(entry, patternsRe) {
- return patternsRe.some((patternRe) => patternRe.test(entry));
- }
- exports2.matchAny = matchAny;
- }
- });
- var require_merge2 = __commonJS2({
- "node_modules/merge2/index.js"(exports2, module2) {
- "use strict";
- var Stream = require("stream");
- var PassThrough = Stream.PassThrough;
- var slice = Array.prototype.slice;
- module2.exports = merge2;
- function merge2() {
- const streamsQueue = [];
- const args = slice.call(arguments);
- let merging = false;
- let options = args[args.length - 1];
- if (options && !Array.isArray(options) && options.pipe == null) {
- args.pop();
- } else {
- options = {};
- }
- const doEnd = options.end !== false;
- const doPipeError = options.pipeError === true;
- if (options.objectMode == null) {
- options.objectMode = true;
- }
- if (options.highWaterMark == null) {
- options.highWaterMark = 64 * 1024;
- }
- const mergedStream = PassThrough(options);
- function addStream() {
- for (let i = 0, len = arguments.length; i < len; i++) {
- streamsQueue.push(pauseStreams(arguments[i], options));
- }
- mergeStream();
- return this;
- }
- function mergeStream() {
- if (merging) {
- return;
- }
- merging = true;
- let streams = streamsQueue.shift();
- if (!streams) {
- process.nextTick(endStream);
- return;
- }
- if (!Array.isArray(streams)) {
- streams = [streams];
- }
- let pipesCount = streams.length + 1;
- function next() {
- if (--pipesCount > 0) {
- return;
- }
- merging = false;
- mergeStream();
- }
- function pipe(stream) {
- function onend() {
- stream.removeListener("merge2UnpipeEnd", onend);
- stream.removeListener("end", onend);
- if (doPipeError) {
- stream.removeListener("error", onerror);
- }
- next();
- }
- function onerror(err) {
- mergedStream.emit("error", err);
- }
- if (stream._readableState.endEmitted) {
- return next();
- }
- stream.on("merge2UnpipeEnd", onend);
- stream.on("end", onend);
- if (doPipeError) {
- stream.on("error", onerror);
- }
- stream.pipe(mergedStream, {
- end: false
- });
- stream.resume();
- }
- for (let i = 0; i < streams.length; i++) {
- pipe(streams[i]);
- }
- next();
- }
- function endStream() {
- merging = false;
- mergedStream.emit("queueDrain");
- if (doEnd) {
- mergedStream.end();
- }
- }
- mergedStream.setMaxListeners(0);
- mergedStream.add = addStream;
- mergedStream.on("unpipe", function(stream) {
- stream.emit("merge2UnpipeEnd");
- });
- if (args.length) {
- addStream.apply(null, args);
- }
- return mergedStream;
- }
- function pauseStreams(streams, options) {
- if (!Array.isArray(streams)) {
- if (!streams._readableState && streams.pipe) {
- streams = streams.pipe(PassThrough(options));
- }
- if (!streams._readableState || !streams.pause || !streams.pipe) {
- throw new Error("Only readable stream can be merged.");
- }
- streams.pause();
- } else {
- for (let i = 0, len = streams.length; i < len; i++) {
- streams[i] = pauseStreams(streams[i], options);
- }
- }
- return streams;
- }
- }
- });
- var require_stream = __commonJS2({
- "node_modules/fast-glob/out/utils/stream.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.merge = void 0;
- var merge2 = require_merge2();
- function merge(streams) {
- const mergedStream = merge2(streams);
- streams.forEach((stream) => {
- stream.once("error", (error) => mergedStream.emit("error", error));
- });
- mergedStream.once("close", () => propagateCloseEventToSources(streams));
- mergedStream.once("end", () => propagateCloseEventToSources(streams));
- return mergedStream;
- }
- exports2.merge = merge;
- function propagateCloseEventToSources(streams) {
- streams.forEach((stream) => stream.emit("close"));
- }
- }
- });
- var require_string = __commonJS2({
- "node_modules/fast-glob/out/utils/string.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.isEmpty = exports2.isString = void 0;
- function isString(input) {
- return typeof input === "string";
- }
- exports2.isString = isString;
- function isEmpty(input) {
- return input === "";
- }
- exports2.isEmpty = isEmpty;
- }
- });
- var require_utils3 = __commonJS2({
- "node_modules/fast-glob/out/utils/index.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0;
- var array = require_array();
- exports2.array = array;
- var errno = require_errno();
- exports2.errno = errno;
- var fs = require_fs();
- exports2.fs = fs;
- var path = require_path();
- exports2.path = path;
- var pattern = require_pattern();
- exports2.pattern = pattern;
- var stream = require_stream();
- exports2.stream = stream;
- var string = require_string();
- exports2.string = string;
- }
- });
- var require_tasks = __commonJS2({
- "node_modules/fast-glob/out/managers/tasks.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
- var utils = require_utils3();
- function generate(patterns, settings) {
- const positivePatterns = getPositivePatterns(patterns);
- const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
- const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false);
- const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true);
- return staticTasks.concat(dynamicTasks);
- }
- exports2.generate = generate;
- function convertPatternsToTasks(positive, negative, dynamic) {
- const tasks = [];
- const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
- const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);
- const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
- const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
- tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
- if ("." in insideCurrentDirectoryGroup) {
- tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic));
- } else {
- tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
- }
- return tasks;
- }
- exports2.convertPatternsToTasks = convertPatternsToTasks;
- function getPositivePatterns(patterns) {
- return utils.pattern.getPositivePatterns(patterns);
- }
- exports2.getPositivePatterns = getPositivePatterns;
- function getNegativePatternsAsPositive(patterns, ignore) {
- const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
- const positive = negative.map(utils.pattern.convertToPositivePattern);
- return positive;
- }
- exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
- function groupPatternsByBaseDirectory(patterns) {
- const group = {};
- return patterns.reduce((collection, pattern) => {
- const base = utils.pattern.getBaseDirectory(pattern);
- if (base in collection) {
- collection[base].push(pattern);
- } else {
- collection[base] = [pattern];
- }
- return collection;
- }, group);
- }
- exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
- function convertPatternGroupsToTasks(positive, negative, dynamic) {
- return Object.keys(positive).map((base) => {
- return convertPatternGroupToTask(base, positive[base], negative, dynamic);
- });
- }
- exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
- function convertPatternGroupToTask(base, positive, negative, dynamic) {
- return {
- dynamic,
- positive,
- negative,
- base,
- patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
- };
- }
- exports2.convertPatternGroupToTask = convertPatternGroupToTask;
- }
- });
- var require_patterns = __commonJS2({
- "node_modules/fast-glob/out/managers/patterns.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.removeDuplicateSlashes = exports2.transform = void 0;
- var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
- function transform(patterns) {
- return patterns.map((pattern) => removeDuplicateSlashes(pattern));
- }
- exports2.transform = transform;
- function removeDuplicateSlashes(pattern) {
- return pattern.replace(DOUBLE_SLASH_RE, "/");
- }
- exports2.removeDuplicateSlashes = removeDuplicateSlashes;
- }
- });
- var require_async = __commonJS2({
- "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.read = void 0;
- function read(path, settings, callback) {
- settings.fs.lstat(path, (lstatError, lstat) => {
- if (lstatError !== null) {
- callFailureCallback(callback, lstatError);
- return;
- }
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
- callSuccessCallback(callback, lstat);
- return;
- }
- settings.fs.stat(path, (statError, stat) => {
- if (statError !== null) {
- if (settings.throwErrorOnBrokenSymbolicLink) {
- callFailureCallback(callback, statError);
- return;
- }
- callSuccessCallback(callback, lstat);
- return;
- }
- if (settings.markSymbolicLink) {
- stat.isSymbolicLink = () => true;
- }
- callSuccessCallback(callback, stat);
- });
- });
- }
- exports2.read = read;
- function callFailureCallback(callback, error) {
- callback(error);
- }
- function callSuccessCallback(callback, result) {
- callback(null, result);
- }
- }
- });
- var require_sync = __commonJS2({
- "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.read = void 0;
- function read(path, settings) {
- const lstat = settings.fs.lstatSync(path);
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
- return lstat;
- }
- try {
- const stat = settings.fs.statSync(path);
- if (settings.markSymbolicLink) {
- stat.isSymbolicLink = () => true;
- }
- return stat;
- } catch (error) {
- if (!settings.throwErrorOnBrokenSymbolicLink) {
- return lstat;
- }
- throw error;
- }
- }
- exports2.read = read;
- }
- });
- var require_fs2 = __commonJS2({
- "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
- var fs = require("fs");
- exports2.FILE_SYSTEM_ADAPTER = {
- lstat: fs.lstat,
- stat: fs.stat,
- lstatSync: fs.lstatSync,
- statSync: fs.statSync
- };
- function createFileSystemAdapter(fsMethods) {
- if (fsMethods === void 0) {
- return exports2.FILE_SYSTEM_ADAPTER;
- }
- return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
- }
- exports2.createFileSystemAdapter = createFileSystemAdapter;
- }
- });
- var require_settings = __commonJS2({
- "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var fs = require_fs2();
- var Settings = class {
- constructor(_options = {}) {
- this._options = _options;
- this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
- this.fs = fs.createFileSystemAdapter(this._options.fs);
- this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
- this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
- }
- _getValue(option, value) {
- return option !== null && option !== void 0 ? option : value;
- }
- };
- exports2.default = Settings;
- }
- });
- var require_out = __commonJS2({
- "node_modules/@nodelib/fs.stat/out/index.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.statSync = exports2.stat = exports2.Settings = void 0;
- var async = require_async();
- var sync = require_sync();
- var settings_1 = require_settings();
- exports2.Settings = settings_1.default;
- function stat(path, optionsOrSettingsOrCallback, callback) {
- if (typeof optionsOrSettingsOrCallback === "function") {
- async.read(path, getSettings(), optionsOrSettingsOrCallback);
- return;
- }
- async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
- }
- exports2.stat = stat;
- function statSync(path, optionsOrSettings) {
- const settings = getSettings(optionsOrSettings);
- return sync.read(path, settings);
- }
- exports2.statSync = statSync;
- function getSettings(settingsOrOptions = {}) {
- if (settingsOrOptions instanceof settings_1.default) {
- return settingsOrOptions;
- }
- return new settings_1.default(settingsOrOptions);
- }
- }
- });
- var require_queue_microtask = __commonJS2({
- "node_modules/queue-microtask/index.js"(exports2, module2) {
- var promise;
- module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
- throw err;
- }, 0));
- }
- });
- var require_run_parallel = __commonJS2({
- "node_modules/run-parallel/index.js"(exports2, module2) {
- module2.exports = runParallel;
- var queueMicrotask2 = require_queue_microtask();
- function runParallel(tasks, cb) {
- let results, pending, keys;
- let isSync = true;
- if (Array.isArray(tasks)) {
- results = [];
- pending = tasks.length;
- } else {
- keys = Object.keys(tasks);
- results = {};
- pending = keys.length;
- }
- function done(err) {
- function end() {
- if (cb)
- cb(err, results);
- cb = null;
- }
- if (isSync)
- queueMicrotask2(end);
- else
- end();
- }
- function each(i, err, result) {
- results[i] = result;
- if (--pending === 0 || err) {
- done(err);
- }
- }
- if (!pending) {
- done(null);
- } else if (keys) {
- keys.forEach(function(key) {
- tasks[key](function(err, result) {
- each(key, err, result);
- });
- });
- } else {
- tasks.forEach(function(task, i) {
- task(function(err, result) {
- each(i, err, result);
- });
- });
- }
- isSync = false;
- }
- }
- });
- var require_constants3 = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
- var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
- if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) {
- throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
- }
- var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
- var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
- var SUPPORTED_MAJOR_VERSION = 10;
- var SUPPORTED_MINOR_VERSION = 10;
- var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
- var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
- exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
- }
- });
- var require_fs3 = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.createDirentFromStats = void 0;
- var DirentFromStats = class {
- constructor(name, stats) {
- this.name = name;
- this.isBlockDevice = stats.isBlockDevice.bind(stats);
- this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
- this.isDirectory = stats.isDirectory.bind(stats);
- this.isFIFO = stats.isFIFO.bind(stats);
- this.isFile = stats.isFile.bind(stats);
- this.isSocket = stats.isSocket.bind(stats);
- this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
- }
- };
- function createDirentFromStats(name, stats) {
- return new DirentFromStats(name, stats);
- }
- exports2.createDirentFromStats = createDirentFromStats;
- }
- });
- var require_utils4 = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.fs = void 0;
- var fs = require_fs3();
- exports2.fs = fs;
- }
- });
- var require_common = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.joinPathSegments = void 0;
- function joinPathSegments(a, b, separator) {
- if (a.endsWith(separator)) {
- return a + b;
- }
- return a + separator + b;
- }
- exports2.joinPathSegments = joinPathSegments;
- }
- });
- var require_async2 = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
- var fsStat = require_out();
- var rpl = require_run_parallel();
- var constants_1 = require_constants3();
- var utils = require_utils4();
- var common = require_common();
- function read(directory, settings, callback) {
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
- readdirWithFileTypes(directory, settings, callback);
- return;
- }
- readdir(directory, settings, callback);
- }
- exports2.read = read;
- function readdirWithFileTypes(directory, settings, callback) {
- settings.fs.readdir(directory, {
- withFileTypes: true
- }, (readdirError, dirents) => {
- if (readdirError !== null) {
- callFailureCallback(callback, readdirError);
- return;
- }
- const entries = dirents.map((dirent) => ({
- dirent,
- name: dirent.name,
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
- }));
- if (!settings.followSymbolicLinks) {
- callSuccessCallback(callback, entries);
- return;
- }
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
- rpl(tasks, (rplError, rplEntries) => {
- if (rplError !== null) {
- callFailureCallback(callback, rplError);
- return;
- }
- callSuccessCallback(callback, rplEntries);
- });
- });
- }
- exports2.readdirWithFileTypes = readdirWithFileTypes;
- function makeRplTaskEntry(entry, settings) {
- return (done) => {
- if (!entry.dirent.isSymbolicLink()) {
- done(null, entry);
- return;
- }
- settings.fs.stat(entry.path, (statError, stats) => {
- if (statError !== null) {
- if (settings.throwErrorOnBrokenSymbolicLink) {
- done(statError);
- return;
- }
- done(null, entry);
- return;
- }
- entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
- done(null, entry);
- });
- };
- }
- function readdir(directory, settings, callback) {
- settings.fs.readdir(directory, (readdirError, names) => {
- if (readdirError !== null) {
- callFailureCallback(callback, readdirError);
- return;
- }
- const tasks = names.map((name) => {
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
- return (done) => {
- fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
- if (error !== null) {
- done(error);
- return;
- }
- const entry = {
- name,
- path,
- dirent: utils.fs.createDirentFromStats(name, stats)
- };
- if (settings.stats) {
- entry.stats = stats;
- }
- done(null, entry);
- });
- };
- });
- rpl(tasks, (rplError, entries) => {
- if (rplError !== null) {
- callFailureCallback(callback, rplError);
- return;
- }
- callSuccessCallback(callback, entries);
- });
- });
- }
- exports2.readdir = readdir;
- function callFailureCallback(callback, error) {
- callback(error);
- }
- function callSuccessCallback(callback, result) {
- callback(null, result);
- }
- }
- });
- var require_sync2 = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
- var fsStat = require_out();
- var constants_1 = require_constants3();
- var utils = require_utils4();
- var common = require_common();
- function read(directory, settings) {
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
- return readdirWithFileTypes(directory, settings);
- }
- return readdir(directory, settings);
- }
- exports2.read = read;
- function readdirWithFileTypes(directory, settings) {
- const dirents = settings.fs.readdirSync(directory, {
- withFileTypes: true
- });
- return dirents.map((dirent) => {
- const entry = {
- dirent,
- name: dirent.name,
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
- };
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
- try {
- const stats = settings.fs.statSync(entry.path);
- entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
- } catch (error) {
- if (settings.throwErrorOnBrokenSymbolicLink) {
- throw error;
- }
- }
- }
- return entry;
- });
- }
- exports2.readdirWithFileTypes = readdirWithFileTypes;
- function readdir(directory, settings) {
- const names = settings.fs.readdirSync(directory);
- return names.map((name) => {
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
- const entry = {
- name,
- path: entryPath,
- dirent: utils.fs.createDirentFromStats(name, stats)
- };
- if (settings.stats) {
- entry.stats = stats;
- }
- return entry;
- });
- }
- exports2.readdir = readdir;
- }
- });
- var require_fs4 = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
- var fs = require("fs");
- exports2.FILE_SYSTEM_ADAPTER = {
- lstat: fs.lstat,
- stat: fs.stat,
- lstatSync: fs.lstatSync,
- statSync: fs.statSync,
- readdir: fs.readdir,
- readdirSync: fs.readdirSync
- };
- function createFileSystemAdapter(fsMethods) {
- if (fsMethods === void 0) {
- return exports2.FILE_SYSTEM_ADAPTER;
- }
- return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
- }
- exports2.createFileSystemAdapter = createFileSystemAdapter;
- }
- });
- var require_settings2 = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var path = require("path");
- var fsStat = require_out();
- var fs = require_fs4();
- var Settings = class {
- constructor(_options = {}) {
- this._options = _options;
- this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
- this.fs = fs.createFileSystemAdapter(this._options.fs);
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
- this.stats = this._getValue(this._options.stats, false);
- this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
- this.fsStatSettings = new fsStat.Settings({
- followSymbolicLink: this.followSymbolicLinks,
- fs: this.fs,
- throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
- });
- }
- _getValue(option, value) {
- return option !== null && option !== void 0 ? option : value;
- }
- };
- exports2.default = Settings;
- }
- });
- var require_out2 = __commonJS2({
- "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.Settings = exports2.scandirSync = exports2.scandir = void 0;
- var async = require_async2();
- var sync = require_sync2();
- var settings_1 = require_settings2();
- exports2.Settings = settings_1.default;
- function scandir(path, optionsOrSettingsOrCallback, callback) {
- if (typeof optionsOrSettingsOrCallback === "function") {
- async.read(path, getSettings(), optionsOrSettingsOrCallback);
- return;
- }
- async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
- }
- exports2.scandir = scandir;
- function scandirSync(path, optionsOrSettings) {
- const settings = getSettings(optionsOrSettings);
- return sync.read(path, settings);
- }
- exports2.scandirSync = scandirSync;
- function getSettings(settingsOrOptions = {}) {
- if (settingsOrOptions instanceof settings_1.default) {
- return settingsOrOptions;
- }
- return new settings_1.default(settingsOrOptions);
- }
- }
- });
- var require_reusify = __commonJS2({
- "node_modules/reusify/reusify.js"(exports2, module2) {
- "use strict";
- function reusify(Constructor) {
- var head = new Constructor();
- var tail = head;
- function get() {
- var current = head;
- if (current.next) {
- head = current.next;
- } else {
- head = new Constructor();
- tail = head;
- }
- current.next = null;
- return current;
- }
- function release(obj) {
- tail.next = obj;
- tail = obj;
- }
- return {
- get,
- release
- };
- }
- module2.exports = reusify;
- }
- });
- var require_queue = __commonJS2({
- "node_modules/fastq/queue.js"(exports2, module2) {
- "use strict";
- var reusify = require_reusify();
- function fastqueue(context, worker, concurrency) {
- if (typeof context === "function") {
- concurrency = worker;
- worker = context;
- context = null;
- }
- if (concurrency < 1) {
- throw new Error("fastqueue concurrency must be greater than 1");
- }
- var cache = reusify(Task);
- var queueHead = null;
- var queueTail = null;
- var _running = 0;
- var errorHandler = null;
- var self2 = {
- push,
- drain: noop,
- saturated: noop,
- pause,
- paused: false,
- concurrency,
- running,
- resume,
- idle,
- length,
- getQueue,
- unshift,
- empty: noop,
- kill,
- killAndDrain,
- error
- };
- return self2;
- function running() {
- return _running;
- }
- function pause() {
- self2.paused = true;
- }
- function length() {
- var current = queueHead;
- var counter = 0;
- while (current) {
- current = current.next;
- counter++;
- }
- return counter;
- }
- function getQueue() {
- var current = queueHead;
- var tasks = [];
- while (current) {
- tasks.push(current.value);
- current = current.next;
- }
- return tasks;
- }
- function resume() {
- if (!self2.paused)
- return;
- self2.paused = false;
- for (var i = 0; i < self2.concurrency; i++) {
- _running++;
- release();
- }
- }
- function idle() {
- return _running === 0 && self2.length() === 0;
- }
- function push(value, done) {
- var current = cache.get();
- current.context = context;
- current.release = release;
- current.value = value;
- current.callback = done || noop;
- current.errorHandler = errorHandler;
- if (_running === self2.concurrency || self2.paused) {
- if (queueTail) {
- queueTail.next = current;
- queueTail = current;
- } else {
- queueHead = current;
- queueTail = current;
- self2.saturated();
- }
- } else {
- _running++;
- worker.call(context, current.value, current.worked);
- }
- }
- function unshift(value, done) {
- var current = cache.get();
- current.context = context;
- current.release = release;
- current.value = value;
- current.callback = done || noop;
- if (_running === self2.concurrency || self2.paused) {
- if (queueHead) {
- current.next = queueHead;
- queueHead = current;
- } else {
- queueHead = current;
- queueTail = current;
- self2.saturated();
- }
- } else {
- _running++;
- worker.call(context, current.value, current.worked);
- }
- }
- function release(holder) {
- if (holder) {
- cache.release(holder);
- }
- var next = queueHead;
- if (next) {
- if (!self2.paused) {
- if (queueTail === queueHead) {
- queueTail = null;
- }
- queueHead = next.next;
- next.next = null;
- worker.call(context, next.value, next.worked);
- if (queueTail === null) {
- self2.empty();
- }
- } else {
- _running--;
- }
- } else if (--_running === 0) {
- self2.drain();
- }
- }
- function kill() {
- queueHead = null;
- queueTail = null;
- self2.drain = noop;
- }
- function killAndDrain() {
- queueHead = null;
- queueTail = null;
- self2.drain();
- self2.drain = noop;
- }
- function error(handler) {
- errorHandler = handler;
- }
- }
- function noop() {
- }
- function Task() {
- this.value = null;
- this.callback = noop;
- this.next = null;
- this.release = noop;
- this.context = null;
- this.errorHandler = null;
- var self2 = this;
- this.worked = function worked(err, result) {
- var callback = self2.callback;
- var errorHandler = self2.errorHandler;
- var val = self2.value;
- self2.value = null;
- self2.callback = noop;
- if (self2.errorHandler) {
- errorHandler(err, val);
- }
- callback.call(self2.context, err, result);
- self2.release(self2);
- };
- }
- function queueAsPromised(context, worker, concurrency) {
- if (typeof context === "function") {
- concurrency = worker;
- worker = context;
- context = null;
- }
- function asyncWrapper(arg, cb) {
- worker.call(this, arg).then(function(res) {
- cb(null, res);
- }, cb);
- }
- var queue = fastqueue(context, asyncWrapper, concurrency);
- var pushCb = queue.push;
- var unshiftCb = queue.unshift;
- queue.push = push;
- queue.unshift = unshift;
- queue.drained = drained;
- return queue;
- function push(value) {
- var p = new Promise(function(resolve, reject) {
- pushCb(value, function(err, result) {
- if (err) {
- reject(err);
- return;
- }
- resolve(result);
- });
- });
- p.catch(noop);
- return p;
- }
- function unshift(value) {
- var p = new Promise(function(resolve, reject) {
- unshiftCb(value, function(err, result) {
- if (err) {
- reject(err);
- return;
- }
- resolve(result);
- });
- });
- p.catch(noop);
- return p;
- }
- function drained() {
- var previousDrain = queue.drain;
- var p = new Promise(function(resolve) {
- queue.drain = function() {
- previousDrain();
- resolve();
- };
- });
- return p;
- }
- }
- module2.exports = fastqueue;
- module2.exports.promise = queueAsPromised;
- }
- });
- var require_common2 = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0;
- function isFatalError(settings, error) {
- if (settings.errorFilter === null) {
- return true;
- }
- return !settings.errorFilter(error);
- }
- exports2.isFatalError = isFatalError;
- function isAppliedFilter(filter, value) {
- return filter === null || filter(value);
- }
- exports2.isAppliedFilter = isAppliedFilter;
- function replacePathSegmentSeparator(filepath, separator) {
- return filepath.split(/[/\\]/).join(separator);
- }
- exports2.replacePathSegmentSeparator = replacePathSegmentSeparator;
- function joinPathSegments(a, b, separator) {
- if (a === "") {
- return b;
- }
- if (a.endsWith(separator)) {
- return a + b;
- }
- return a + separator + b;
- }
- exports2.joinPathSegments = joinPathSegments;
- }
- });
- var require_reader = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var common = require_common2();
- var Reader = class {
- constructor(_root, _settings) {
- this._root = _root;
- this._settings = _settings;
- this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
- }
- };
- exports2.default = Reader;
- }
- });
- var require_async3 = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var events_1 = require("events");
- var fsScandir = require_out2();
- var fastq = require_queue();
- var common = require_common2();
- var reader_1 = require_reader();
- var AsyncReader = class extends reader_1.default {
- constructor(_root, _settings) {
- super(_root, _settings);
- this._settings = _settings;
- this._scandir = fsScandir.scandir;
- this._emitter = new events_1.EventEmitter();
- this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
- this._isFatalError = false;
- this._isDestroyed = false;
- this._queue.drain = () => {
- if (!this._isFatalError) {
- this._emitter.emit("end");
- }
- };
- }
- read() {
- this._isFatalError = false;
- this._isDestroyed = false;
- setImmediate(() => {
- this._pushToQueue(this._root, this._settings.basePath);
- });
- return this._emitter;
- }
- get isDestroyed() {
- return this._isDestroyed;
- }
- destroy() {
- if (this._isDestroyed) {
- throw new Error("The reader is already destroyed");
- }
- this._isDestroyed = true;
- this._queue.killAndDrain();
- }
- onEntry(callback) {
- this._emitter.on("entry", callback);
- }
- onError(callback) {
- this._emitter.once("error", callback);
- }
- onEnd(callback) {
- this._emitter.once("end", callback);
- }
- _pushToQueue(directory, base) {
- const queueItem = {
- directory,
- base
- };
- this._queue.push(queueItem, (error) => {
- if (error !== null) {
- this._handleError(error);
- }
- });
- }
- _worker(item, done) {
- this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
- if (error !== null) {
- done(error, void 0);
- return;
- }
- for (const entry of entries) {
- this._handleEntry(entry, item.base);
- }
- done(null, void 0);
- });
- }
- _handleError(error) {
- if (this._isDestroyed || !common.isFatalError(this._settings, error)) {
- return;
- }
- this._isFatalError = true;
- this._isDestroyed = true;
- this._emitter.emit("error", error);
- }
- _handleEntry(entry, base) {
- if (this._isDestroyed || this._isFatalError) {
- return;
- }
- const fullpath = entry.path;
- if (base !== void 0) {
- entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
- }
- if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
- this._emitEntry(entry);
- }
- if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
- this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
- }
- }
- _emitEntry(entry) {
- this._emitter.emit("entry", entry);
- }
- };
- exports2.default = AsyncReader;
- }
- });
- var require_async4 = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var async_1 = require_async3();
- var AsyncProvider = class {
- constructor(_root, _settings) {
- this._root = _root;
- this._settings = _settings;
- this._reader = new async_1.default(this._root, this._settings);
- this._storage = [];
- }
- read(callback) {
- this._reader.onError((error) => {
- callFailureCallback(callback, error);
- });
- this._reader.onEntry((entry) => {
- this._storage.push(entry);
- });
- this._reader.onEnd(() => {
- callSuccessCallback(callback, this._storage);
- });
- this._reader.read();
- }
- };
- exports2.default = AsyncProvider;
- function callFailureCallback(callback, error) {
- callback(error);
- }
- function callSuccessCallback(callback, entries) {
- callback(null, entries);
- }
- }
- });
- var require_stream2 = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var stream_1 = require("stream");
- var async_1 = require_async3();
- var StreamProvider = class {
- constructor(_root, _settings) {
- this._root = _root;
- this._settings = _settings;
- this._reader = new async_1.default(this._root, this._settings);
- this._stream = new stream_1.Readable({
- objectMode: true,
- read: () => {
- },
- destroy: () => {
- if (!this._reader.isDestroyed) {
- this._reader.destroy();
- }
- }
- });
- }
- read() {
- this._reader.onError((error) => {
- this._stream.emit("error", error);
- });
- this._reader.onEntry((entry) => {
- this._stream.push(entry);
- });
- this._reader.onEnd(() => {
- this._stream.push(null);
- });
- this._reader.read();
- return this._stream;
- }
- };
- exports2.default = StreamProvider;
- }
- });
- var require_sync3 = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var fsScandir = require_out2();
- var common = require_common2();
- var reader_1 = require_reader();
- var SyncReader = class extends reader_1.default {
- constructor() {
- super(...arguments);
- this._scandir = fsScandir.scandirSync;
- this._storage = [];
- this._queue = /* @__PURE__ */ new Set();
- }
- read() {
- this._pushToQueue(this._root, this._settings.basePath);
- this._handleQueue();
- return this._storage;
- }
- _pushToQueue(directory, base) {
- this._queue.add({
- directory,
- base
- });
- }
- _handleQueue() {
- for (const item of this._queue.values()) {
- this._handleDirectory(item.directory, item.base);
- }
- }
- _handleDirectory(directory, base) {
- try {
- const entries = this._scandir(directory, this._settings.fsScandirSettings);
- for (const entry of entries) {
- this._handleEntry(entry, base);
- }
- } catch (error) {
- this._handleError(error);
- }
- }
- _handleError(error) {
- if (!common.isFatalError(this._settings, error)) {
- return;
- }
- throw error;
- }
- _handleEntry(entry, base) {
- const fullpath = entry.path;
- if (base !== void 0) {
- entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
- }
- if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
- this._pushToStorage(entry);
- }
- if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
- this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
- }
- }
- _pushToStorage(entry) {
- this._storage.push(entry);
- }
- };
- exports2.default = SyncReader;
- }
- });
- var require_sync4 = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var sync_1 = require_sync3();
- var SyncProvider = class {
- constructor(_root, _settings) {
- this._root = _root;
- this._settings = _settings;
- this._reader = new sync_1.default(this._root, this._settings);
- }
- read() {
- return this._reader.read();
- }
- };
- exports2.default = SyncProvider;
- }
- });
- var require_settings3 = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var path = require("path");
- var fsScandir = require_out2();
- var Settings = class {
- constructor(_options = {}) {
- this._options = _options;
- this.basePath = this._getValue(this._options.basePath, void 0);
- this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
- this.deepFilter = this._getValue(this._options.deepFilter, null);
- this.entryFilter = this._getValue(this._options.entryFilter, null);
- this.errorFilter = this._getValue(this._options.errorFilter, null);
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
- this.fsScandirSettings = new fsScandir.Settings({
- followSymbolicLinks: this._options.followSymbolicLinks,
- fs: this._options.fs,
- pathSegmentSeparator: this._options.pathSegmentSeparator,
- stats: this._options.stats,
- throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
- });
- }
- _getValue(option, value) {
- return option !== null && option !== void 0 ? option : value;
- }
- };
- exports2.default = Settings;
- }
- });
- var require_out3 = __commonJS2({
- "node_modules/@nodelib/fs.walk/out/index.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0;
- var async_1 = require_async4();
- var stream_1 = require_stream2();
- var sync_1 = require_sync4();
- var settings_1 = require_settings3();
- exports2.Settings = settings_1.default;
- function walk(directory, optionsOrSettingsOrCallback, callback) {
- if (typeof optionsOrSettingsOrCallback === "function") {
- new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
- return;
- }
- new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
- }
- exports2.walk = walk;
- function walkSync(directory, optionsOrSettings) {
- const settings = getSettings(optionsOrSettings);
- const provider = new sync_1.default(directory, settings);
- return provider.read();
- }
- exports2.walkSync = walkSync;
- function walkStream(directory, optionsOrSettings) {
- const settings = getSettings(optionsOrSettings);
- const provider = new stream_1.default(directory, settings);
- return provider.read();
- }
- exports2.walkStream = walkStream;
- function getSettings(settingsOrOptions = {}) {
- if (settingsOrOptions instanceof settings_1.default) {
- return settingsOrOptions;
- }
- return new settings_1.default(settingsOrOptions);
- }
- }
- });
- var require_reader2 = __commonJS2({
- "node_modules/fast-glob/out/readers/reader.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var path = require("path");
- var fsStat = require_out();
- var utils = require_utils3();
- var Reader = class {
- constructor(_settings) {
- this._settings = _settings;
- this._fsStatSettings = new fsStat.Settings({
- followSymbolicLink: this._settings.followSymbolicLinks,
- fs: this._settings.fs,
- throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
- });
- }
- _getFullEntryPath(filepath) {
- return path.resolve(this._settings.cwd, filepath);
- }
- _makeEntry(stats, pattern) {
- const entry = {
- name: pattern,
- path: pattern,
- dirent: utils.fs.createDirentFromStats(pattern, stats)
- };
- if (this._settings.stats) {
- entry.stats = stats;
- }
- return entry;
- }
- _isFatalError(error) {
- return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
- }
- };
- exports2.default = Reader;
- }
- });
- var require_stream3 = __commonJS2({
- "node_modules/fast-glob/out/readers/stream.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var stream_1 = require("stream");
- var fsStat = require_out();
- var fsWalk = require_out3();
- var reader_1 = require_reader2();
- var ReaderStream = class extends reader_1.default {
- constructor() {
- super(...arguments);
- this._walkStream = fsWalk.walkStream;
- this._stat = fsStat.stat;
- }
- dynamic(root, options) {
- return this._walkStream(root, options);
- }
- static(patterns, options) {
- const filepaths = patterns.map(this._getFullEntryPath, this);
- const stream = new stream_1.PassThrough({
- objectMode: true
- });
- stream._write = (index, _enc, done) => {
- return this._getEntry(filepaths[index], patterns[index], options).then((entry) => {
- if (entry !== null && options.entryFilter(entry)) {
- stream.push(entry);
- }
- if (index === filepaths.length - 1) {
- stream.end();
- }
- done();
- }).catch(done);
- };
- for (let i = 0; i < filepaths.length; i++) {
- stream.write(i);
- }
- return stream;
- }
- _getEntry(filepath, pattern, options) {
- return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => {
- if (options.errorFilter(error)) {
- return null;
- }
- throw error;
- });
- }
- _getStat(filepath) {
- return new Promise((resolve, reject) => {
- this._stat(filepath, this._fsStatSettings, (error, stats) => {
- return error === null ? resolve(stats) : reject(error);
- });
- });
- }
- };
- exports2.default = ReaderStream;
- }
- });
- var require_matcher = __commonJS2({
- "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var utils = require_utils3();
- var Matcher = class {
- constructor(_patterns, _settings, _micromatchOptions) {
- this._patterns = _patterns;
- this._settings = _settings;
- this._micromatchOptions = _micromatchOptions;
- this._storage = [];
- this._fillStorage();
- }
- _fillStorage() {
- const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns);
- for (const pattern of patterns) {
- const segments = this._getPatternSegments(pattern);
- const sections = this._splitSegmentsIntoSections(segments);
- this._storage.push({
- complete: sections.length <= 1,
- pattern,
- segments,
- sections
- });
- }
- }
- _getPatternSegments(pattern) {
- const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
- return parts.map((part) => {
- const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
- if (!dynamic) {
- return {
- dynamic: false,
- pattern: part
- };
- }
- return {
- dynamic: true,
- pattern: part,
- patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
- };
- });
- }
- _splitSegmentsIntoSections(segments) {
- return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
- }
- };
- exports2.default = Matcher;
- }
- });
- var require_partial = __commonJS2({
- "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var matcher_1 = require_matcher();
- var PartialMatcher = class extends matcher_1.default {
- match(filepath) {
- const parts = filepath.split("/");
- const levels = parts.length;
- const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
- for (const pattern of patterns) {
- const section = pattern.sections[0];
- if (!pattern.complete && levels > section.length) {
- return true;
- }
- const match = parts.every((part, index) => {
- const segment = pattern.segments[index];
- if (segment.dynamic && segment.patternRe.test(part)) {
- return true;
- }
- if (!segment.dynamic && segment.pattern === part) {
- return true;
- }
- return false;
- });
- if (match) {
- return true;
- }
- }
- return false;
- }
- };
- exports2.default = PartialMatcher;
- }
- });
- var require_deep = __commonJS2({
- "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var utils = require_utils3();
- var partial_1 = require_partial();
- var DeepFilter = class {
- constructor(_settings, _micromatchOptions) {
- this._settings = _settings;
- this._micromatchOptions = _micromatchOptions;
- }
- getFilter(basePath, positive, negative) {
- const matcher = this._getMatcher(positive);
- const negativeRe = this._getNegativePatternsRe(negative);
- return (entry) => this._filter(basePath, entry, matcher, negativeRe);
- }
- _getMatcher(patterns) {
- return new partial_1.default(patterns, this._settings, this._micromatchOptions);
- }
- _getNegativePatternsRe(patterns) {
- const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
- return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
- }
- _filter(basePath, entry, matcher, negativeRe) {
- if (this._isSkippedByDeep(basePath, entry.path)) {
- return false;
- }
- if (this._isSkippedSymbolicLink(entry)) {
- return false;
- }
- const filepath = utils.path.removeLeadingDotSegment(entry.path);
- if (this._isSkippedByPositivePatterns(filepath, matcher)) {
- return false;
- }
- return this._isSkippedByNegativePatterns(filepath, negativeRe);
- }
- _isSkippedByDeep(basePath, entryPath) {
- if (this._settings.deep === Infinity) {
- return false;
- }
- return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
- }
- _getEntryLevel(basePath, entryPath) {
- const entryPathDepth = entryPath.split("/").length;
- if (basePath === "") {
- return entryPathDepth;
- }
- const basePathDepth = basePath.split("/").length;
- return entryPathDepth - basePathDepth;
- }
- _isSkippedSymbolicLink(entry) {
- return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
- }
- _isSkippedByPositivePatterns(entryPath, matcher) {
- return !this._settings.baseNameMatch && !matcher.match(entryPath);
- }
- _isSkippedByNegativePatterns(entryPath, patternsRe) {
- return !utils.pattern.matchAny(entryPath, patternsRe);
- }
- };
- exports2.default = DeepFilter;
- }
- });
- var require_entry = __commonJS2({
- "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var utils = require_utils3();
- var EntryFilter = class {
- constructor(_settings, _micromatchOptions) {
- this._settings = _settings;
- this._micromatchOptions = _micromatchOptions;
- this.index = /* @__PURE__ */ new Map();
- }
- getFilter(positive, negative) {
- const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
- const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
- return (entry) => this._filter(entry, positiveRe, negativeRe);
- }
- _filter(entry, positiveRe, negativeRe) {
- if (this._settings.unique && this._isDuplicateEntry(entry)) {
- return false;
- }
- if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
- return false;
- }
- if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) {
- return false;
- }
- const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
- const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
- if (this._settings.unique && isMatched) {
- this._createIndexRecord(entry);
- }
- return isMatched;
- }
- _isDuplicateEntry(entry) {
- return this.index.has(entry.path);
- }
- _createIndexRecord(entry) {
- this.index.set(entry.path, void 0);
- }
- _onlyFileFilter(entry) {
- return this._settings.onlyFiles && !entry.dirent.isFile();
- }
- _onlyDirectoryFilter(entry) {
- return this._settings.onlyDirectories && !entry.dirent.isDirectory();
- }
- _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
- if (!this._settings.absolute) {
- return false;
- }
- const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
- return utils.pattern.matchAny(fullpath, patternsRe);
- }
- _isMatchToPatterns(entryPath, patternsRe) {
- const filepath = utils.path.removeLeadingDotSegment(entryPath);
- return utils.pattern.matchAny(filepath, patternsRe) || utils.pattern.matchAny(filepath + "/", patternsRe);
- }
- };
- exports2.default = EntryFilter;
- }
- });
- var require_error = __commonJS2({
- "node_modules/fast-glob/out/providers/filters/error.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var utils = require_utils3();
- var ErrorFilter = class {
- constructor(_settings) {
- this._settings = _settings;
- }
- getFilter() {
- return (error) => this._isNonFatalError(error);
- }
- _isNonFatalError(error) {
- return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
- }
- };
- exports2.default = ErrorFilter;
- }
- });
- var require_entry2 = __commonJS2({
- "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var utils = require_utils3();
- var EntryTransformer = class {
- constructor(_settings) {
- this._settings = _settings;
- }
- getTransformer() {
- return (entry) => this._transform(entry);
- }
- _transform(entry) {
- let filepath = entry.path;
- if (this._settings.absolute) {
- filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
- filepath = utils.path.unixify(filepath);
- }
- if (this._settings.markDirectories && entry.dirent.isDirectory()) {
- filepath += "/";
- }
- if (!this._settings.objectMode) {
- return filepath;
- }
- return Object.assign(Object.assign({}, entry), {
- path: filepath
- });
- }
- };
- exports2.default = EntryTransformer;
- }
- });
- var require_provider = __commonJS2({
- "node_modules/fast-glob/out/providers/provider.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var path = require("path");
- var deep_1 = require_deep();
- var entry_1 = require_entry();
- var error_1 = require_error();
- var entry_2 = require_entry2();
- var Provider = class {
- constructor(_settings) {
- this._settings = _settings;
- this.errorFilter = new error_1.default(this._settings);
- this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
- this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
- this.entryTransformer = new entry_2.default(this._settings);
- }
- _getRootDirectory(task) {
- return path.resolve(this._settings.cwd, task.base);
- }
- _getReaderOptions(task) {
- const basePath = task.base === "." ? "" : task.base;
- return {
- basePath,
- pathSegmentSeparator: "/",
- concurrency: this._settings.concurrency,
- deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
- entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
- errorFilter: this.errorFilter.getFilter(),
- followSymbolicLinks: this._settings.followSymbolicLinks,
- fs: this._settings.fs,
- stats: this._settings.stats,
- throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
- transform: this.entryTransformer.getTransformer()
- };
- }
- _getMicromatchOptions() {
- return {
- dot: this._settings.dot,
- matchBase: this._settings.baseNameMatch,
- nobrace: !this._settings.braceExpansion,
- nocase: !this._settings.caseSensitiveMatch,
- noext: !this._settings.extglob,
- noglobstar: !this._settings.globstar,
- posix: true,
- strictSlashes: false
- };
- }
- };
- exports2.default = Provider;
- }
- });
- var require_async5 = __commonJS2({
- "node_modules/fast-glob/out/providers/async.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var stream_1 = require_stream3();
- var provider_1 = require_provider();
- var ProviderAsync = class extends provider_1.default {
- constructor() {
- super(...arguments);
- this._reader = new stream_1.default(this._settings);
- }
- read(task) {
- const root = this._getRootDirectory(task);
- const options = this._getReaderOptions(task);
- const entries = [];
- return new Promise((resolve, reject) => {
- const stream = this.api(root, task, options);
- stream.once("error", reject);
- stream.on("data", (entry) => entries.push(options.transform(entry)));
- stream.once("end", () => resolve(entries));
- });
- }
- api(root, task, options) {
- if (task.dynamic) {
- return this._reader.dynamic(root, options);
- }
- return this._reader.static(task.patterns, options);
- }
- };
- exports2.default = ProviderAsync;
- }
- });
- var require_stream4 = __commonJS2({
- "node_modules/fast-glob/out/providers/stream.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var stream_1 = require("stream");
- var stream_2 = require_stream3();
- var provider_1 = require_provider();
- var ProviderStream = class extends provider_1.default {
- constructor() {
- super(...arguments);
- this._reader = new stream_2.default(this._settings);
- }
- read(task) {
- const root = this._getRootDirectory(task);
- const options = this._getReaderOptions(task);
- const source = this.api(root, task, options);
- const destination = new stream_1.Readable({
- objectMode: true,
- read: () => {
- }
- });
- source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end"));
- destination.once("close", () => source.destroy());
- return destination;
- }
- api(root, task, options) {
- if (task.dynamic) {
- return this._reader.dynamic(root, options);
- }
- return this._reader.static(task.patterns, options);
- }
- };
- exports2.default = ProviderStream;
- }
- });
- var require_sync5 = __commonJS2({
- "node_modules/fast-glob/out/readers/sync.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var fsStat = require_out();
- var fsWalk = require_out3();
- var reader_1 = require_reader2();
- var ReaderSync = class extends reader_1.default {
- constructor() {
- super(...arguments);
- this._walkSync = fsWalk.walkSync;
- this._statSync = fsStat.statSync;
- }
- dynamic(root, options) {
- return this._walkSync(root, options);
- }
- static(patterns, options) {
- const entries = [];
- for (const pattern of patterns) {
- const filepath = this._getFullEntryPath(pattern);
- const entry = this._getEntry(filepath, pattern, options);
- if (entry === null || !options.entryFilter(entry)) {
- continue;
- }
- entries.push(entry);
- }
- return entries;
- }
- _getEntry(filepath, pattern, options) {
- try {
- const stats = this._getStat(filepath);
- return this._makeEntry(stats, pattern);
- } catch (error) {
- if (options.errorFilter(error)) {
- return null;
- }
- throw error;
- }
- }
- _getStat(filepath) {
- return this._statSync(filepath, this._fsStatSettings);
- }
- };
- exports2.default = ReaderSync;
- }
- });
- var require_sync6 = __commonJS2({
- "node_modules/fast-glob/out/providers/sync.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- var sync_1 = require_sync5();
- var provider_1 = require_provider();
- var ProviderSync = class extends provider_1.default {
- constructor() {
- super(...arguments);
- this._reader = new sync_1.default(this._settings);
- }
- read(task) {
- const root = this._getRootDirectory(task);
- const options = this._getReaderOptions(task);
- const entries = this.api(root, task, options);
- return entries.map(options.transform);
- }
- api(root, task, options) {
- if (task.dynamic) {
- return this._reader.dynamic(root, options);
- }
- return this._reader.static(task.patterns, options);
- }
- };
- exports2.default = ProviderSync;
- }
- });
- var require_settings4 = __commonJS2({
- "node_modules/fast-glob/out/settings.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
- var fs = require("fs");
- var os = require("os");
- var CPU_COUNT = Math.max(os.cpus().length, 1);
- exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
- lstat: fs.lstat,
- lstatSync: fs.lstatSync,
- stat: fs.stat,
- statSync: fs.statSync,
- readdir: fs.readdir,
- readdirSync: fs.readdirSync
- };
- var Settings = class {
- constructor(_options = {}) {
- this._options = _options;
- this.absolute = this._getValue(this._options.absolute, false);
- this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
- this.braceExpansion = this._getValue(this._options.braceExpansion, true);
- this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
- this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
- this.cwd = this._getValue(this._options.cwd, process.cwd());
- this.deep = this._getValue(this._options.deep, Infinity);
- this.dot = this._getValue(this._options.dot, false);
- this.extglob = this._getValue(this._options.extglob, true);
- this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
- this.fs = this._getFileSystemMethods(this._options.fs);
- this.globstar = this._getValue(this._options.globstar, true);
- this.ignore = this._getValue(this._options.ignore, []);
- this.markDirectories = this._getValue(this._options.markDirectories, false);
- this.objectMode = this._getValue(this._options.objectMode, false);
- this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
- this.onlyFiles = this._getValue(this._options.onlyFiles, true);
- this.stats = this._getValue(this._options.stats, false);
- this.suppressErrors = this._getValue(this._options.suppressErrors, false);
- this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
- this.unique = this._getValue(this._options.unique, true);
- if (this.onlyDirectories) {
- this.onlyFiles = false;
- }
- if (this.stats) {
- this.objectMode = true;
- }
- }
- _getValue(option, value) {
- return option === void 0 ? value : option;
- }
- _getFileSystemMethods(methods = {}) {
- return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
- }
- };
- exports2.default = Settings;
- }
- });
- var require_out4 = __commonJS2({
- "node_modules/fast-glob/out/index.js"(exports2, module2) {
- "use strict";
- var taskManager = require_tasks();
- var patternManager = require_patterns();
- var async_1 = require_async5();
- var stream_1 = require_stream4();
- var sync_1 = require_sync6();
- var settings_1 = require_settings4();
- var utils = require_utils3();
- async function FastGlob(source, options) {
- assertPatternsInput(source);
- const works = getWorks(source, async_1.default, options);
- const result = await Promise.all(works);
- return utils.array.flatten(result);
- }
- (function(FastGlob2) {
- function sync(source, options) {
- assertPatternsInput(source);
- const works = getWorks(source, sync_1.default, options);
- return utils.array.flatten(works);
- }
- FastGlob2.sync = sync;
- function stream(source, options) {
- assertPatternsInput(source);
- const works = getWorks(source, stream_1.default, options);
- return utils.stream.merge(works);
- }
- FastGlob2.stream = stream;
- function generateTasks(source, options) {
- assertPatternsInput(source);
- const patterns = patternManager.transform([].concat(source));
- const settings = new settings_1.default(options);
- return taskManager.generate(patterns, settings);
- }
- FastGlob2.generateTasks = generateTasks;
- function isDynamicPattern(source, options) {
- assertPatternsInput(source);
- const settings = new settings_1.default(options);
- return utils.pattern.isDynamicPattern(source, settings);
- }
- FastGlob2.isDynamicPattern = isDynamicPattern;
- function escapePath(source) {
- assertPatternsInput(source);
- return utils.path.escape(source);
- }
- FastGlob2.escapePath = escapePath;
- })(FastGlob || (FastGlob = {}));
- function getWorks(source, _Provider, options) {
- const patterns = patternManager.transform([].concat(source));
- const settings = new settings_1.default(options);
- const tasks = taskManager.generate(patterns, settings);
- const provider = new _Provider(settings);
- return tasks.map(provider.read, provider);
- }
- function assertPatternsInput(input) {
- const source = [].concat(input);
- const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
- if (!isValidSource) {
- throw new TypeError("Patterns must be a string (non empty) or an array of strings");
- }
- }
- module2.exports = FastGlob;
- }
- });
- var require_expand_patterns = __commonJS2({
- "src/cli/expand-patterns.js"(exports2, module2) {
- "use strict";
- var path = require("path");
- var {
- promises: fs
- } = require("fs");
- var fastGlob = require_out4();
- async function* expandPatterns(context) {
- const cwd = process.cwd();
- const seen = /* @__PURE__ */ new Set();
- let noResults = true;
- for await (const pathOrError of expandPatternsInternal(context)) {
- noResults = false;
- if (typeof pathOrError !== "string") {
- yield pathOrError;
- continue;
- }
- const relativePath = path.relative(cwd, pathOrError);
- if (seen.has(relativePath)) {
- continue;
- }
- seen.add(relativePath);
- yield relativePath;
- }
- if (noResults && context.argv.errorOnUnmatchedPattern !== false) {
- yield {
- error: `No matching files. Patterns: ${context.filePatterns.join(" ")}`
- };
- }
- }
- async function* expandPatternsInternal(context) {
- const silentlyIgnoredDirs = [".git", ".svn", ".hg"];
- if (context.argv.withNodeModules !== true) {
- silentlyIgnoredDirs.push("node_modules");
- }
- const globOptions = {
- dot: true,
- ignore: silentlyIgnoredDirs.map((dir) => "**/" + dir)
- };
- let supportedFilesGlob;
- const cwd = process.cwd();
- const entries = [];
- for (const pattern of context.filePatterns) {
- const absolutePath = path.resolve(cwd, pattern);
- if (containsIgnoredPathSegment(absolutePath, cwd, silentlyIgnoredDirs)) {
- continue;
- }
- const stat = await statSafe(absolutePath);
- if (stat) {
- if (stat.isFile()) {
- entries.push({
- type: "file",
- glob: escapePathForGlob(fixWindowsSlashes(pattern)),
- input: pattern
- });
- } else if (stat.isDirectory()) {
- const relativePath = path.relative(cwd, absolutePath) || ".";
- entries.push({
- type: "dir",
- glob: escapePathForGlob(fixWindowsSlashes(relativePath)) + "/" + getSupportedFilesGlob(),
- input: pattern
- });
- }
- } else if (pattern[0] === "!") {
- globOptions.ignore.push(fixWindowsSlashes(pattern.slice(1)));
- } else {
- entries.push({
- type: "glob",
- glob: fixWindowsSlashes(pattern),
- input: pattern
- });
- }
- }
- for (const {
- type,
- glob,
- input
- } of entries) {
- let result;
- try {
- result = await fastGlob(glob, globOptions);
- } catch ({
- message
- }) {
- yield {
- error: `${errorMessages.globError[type]}: ${input}
- ${message}`
- };
- continue;
- }
- if (result.length === 0) {
- if (context.argv.errorOnUnmatchedPattern !== false) {
- yield {
- error: `${errorMessages.emptyResults[type]}: "${input}".`
- };
- }
- } else {
- yield* sortPaths(result);
- }
- }
- function getSupportedFilesGlob() {
- if (!supportedFilesGlob) {
- const extensions = context.languages.flatMap((lang) => lang.extensions || []);
- const filenames = context.languages.flatMap((lang) => lang.filenames || []);
- supportedFilesGlob = `**/{${[...extensions.map((ext) => "*" + (ext[0] === "." ? ext : "." + ext)), ...filenames]}}`;
- }
- return supportedFilesGlob;
- }
- }
- var errorMessages = {
- globError: {
- file: "Unable to resolve file",
- dir: "Unable to expand directory",
- glob: "Unable to expand glob pattern"
- },
- emptyResults: {
- file: "Explicitly specified file was ignored due to negative glob patterns",
- dir: "No supported files were found in the directory",
- glob: "No files matching the pattern were found"
- }
- };
- function containsIgnoredPathSegment(absolutePath, cwd, ignoredDirectories) {
- return path.relative(cwd, absolutePath).split(path.sep).some((dir) => ignoredDirectories.includes(dir));
- }
- function sortPaths(paths) {
- return paths.sort((a, b) => a.localeCompare(b));
- }
- async function statSafe(filePath) {
- try {
- return await fs.stat(filePath);
- } catch (error) {
- if (error.code !== "ENOENT") {
- throw error;
- }
- }
- }
- function escapePathForGlob(path2) {
- return fastGlob.escapePath(path2.replace(/\\/g, "\0")).replace(/\\!/g, "@(!)").replace(/\0/g, "@(\\\\)");
- }
- var isWindows = path.sep === "\\";
- function fixWindowsSlashes(pattern) {
- return isWindows ? pattern.replace(/\\/g, "/") : pattern;
- }
- module2.exports = {
- expandPatterns,
- fixWindowsSlashes
- };
- }
- });
- var require_get_options_for_file = __commonJS2({
- "src/cli/options/get-options-for-file.js"(exports2, module2) {
- "use strict";
- var dashify = require_dashify();
- var prettier2 = require("./index.js");
- var {
- optionsNormalizer
- } = require_prettier_internal();
- var minimist = require_minimist2();
- var createMinimistOptions = require_create_minimist_options();
- var normalizeCliOptions = require_normalize_cli_options();
- function getOptions(argv, detailedOptions) {
- return Object.fromEntries(detailedOptions.filter(({
- forwardToApi
- }) => forwardToApi).map(({
- forwardToApi,
- name
- }) => [forwardToApi, argv[name]]));
- }
- function cliifyOptions(object, apiDetailedOptionMap) {
- return Object.fromEntries(Object.entries(object || {}).map(([key, value]) => {
- const apiOption = apiDetailedOptionMap[key];
- const cliKey = apiOption ? apiOption.name : key;
- return [dashify(cliKey), value];
- }));
- }
- function createApiDetailedOptionMap(detailedOptions) {
- return Object.fromEntries(detailedOptions.filter((option) => option.forwardToApi && option.forwardToApi !== option.name).map((option) => [option.forwardToApi, option]));
- }
- function parseArgsToOptions(context, overrideDefaults) {
- const minimistOptions = createMinimistOptions(context.detailedOptions);
- const apiDetailedOptionMap = createApiDetailedOptionMap(context.detailedOptions);
- return getOptions(normalizeCliOptions(minimist(context.rawArguments, {
- string: minimistOptions.string,
- boolean: minimistOptions.boolean,
- default: cliifyOptions(overrideDefaults, apiDetailedOptionMap)
- }), context.detailedOptions, {
- logger: false
- }), context.detailedOptions);
- }
- async function getOptionsOrDie(context, filePath) {
- try {
- if (context.argv.config === false) {
- context.logger.debug("'--no-config' option found, skip loading config file.");
- return null;
- }
- context.logger.debug(context.argv.config ? `load config file from '${context.argv.config}'` : `resolve config from '${filePath}'`);
- const options = await prettier2.resolveConfig(filePath, {
- editorconfig: context.argv.editorconfig,
- config: context.argv.config
- });
- context.logger.debug("loaded options `" + JSON.stringify(options) + "`");
- return options;
- } catch (error) {
- context.logger.error(`Invalid configuration file \`${filePath}\`: ` + error.message);
- process.exit(2);
- }
- }
- function applyConfigPrecedence(context, options) {
- try {
- switch (context.argv.configPrecedence) {
- case "cli-override":
- return parseArgsToOptions(context, options);
- case "file-override":
- return Object.assign(Object.assign({}, parseArgsToOptions(context)), options);
- case "prefer-file":
- return options || parseArgsToOptions(context);
- }
- } catch (error) {
- context.logger.error(error.toString());
- process.exit(2);
- }
- }
- async function getOptionsForFile(context, filepath) {
- const options = await getOptionsOrDie(context, filepath);
- const hasPlugins = options && options.plugins;
- if (hasPlugins) {
- context.pushContextPlugins(options.plugins);
- }
- const appliedOptions = Object.assign({
- filepath
- }, applyConfigPrecedence(context, options && optionsNormalizer.normalizeApiOptions(options, context.supportOptions, {
- logger: context.logger
- })));
- context.logger.debug(`applied config-precedence (${context.argv.configPrecedence}): ${JSON.stringify(appliedOptions)}`);
- if (hasPlugins) {
- context.popContextPlugins();
- }
- return appliedOptions;
- }
- module2.exports = getOptionsForFile;
- }
- });
- var require_is_tty = __commonJS2({
- "src/cli/is-tty.js"(exports2, module2) {
- "use strict";
- var {
- isCI
- } = require("./third-party.js");
- module2.exports = function isTTY() {
- return process.stdout.isTTY && !isCI();
- };
- }
- });
- var require_base = __commonJS2({
- "node_modules/diff/lib/diff/base.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2["default"] = Diff;
- function Diff() {
- }
- Diff.prototype = {
- diff: function diff(oldString, newString) {
- var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
- var callback = options.callback;
- if (typeof options === "function") {
- callback = options;
- options = {};
- }
- this.options = options;
- var self2 = this;
- function done(value) {
- if (callback) {
- setTimeout(function() {
- callback(void 0, value);
- }, 0);
- return true;
- } else {
- return value;
- }
- }
- oldString = this.castInput(oldString);
- newString = this.castInput(newString);
- oldString = this.removeEmpty(this.tokenize(oldString));
- newString = this.removeEmpty(this.tokenize(newString));
- var newLen = newString.length, oldLen = oldString.length;
- var editLength = 1;
- var maxEditLength = newLen + oldLen;
- var bestPath = [{
- newPos: -1,
- components: []
- }];
- var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
- if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
- return done([{
- value: this.join(newString),
- count: newString.length
- }]);
- }
- function execEditLength() {
- for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
- var basePath = void 0;
- var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
- if (addPath) {
- bestPath[diagonalPath - 1] = void 0;
- }
- var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
- if (!canAdd && !canRemove) {
- bestPath[diagonalPath] = void 0;
- continue;
- }
- if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
- basePath = clonePath(removePath);
- self2.pushComponent(basePath.components, void 0, true);
- } else {
- basePath = addPath;
- basePath.newPos++;
- self2.pushComponent(basePath.components, true, void 0);
- }
- _oldPos = self2.extractCommon(basePath, newString, oldString, diagonalPath);
- if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
- return done(buildValues(self2, basePath.components, newString, oldString, self2.useLongestToken));
- } else {
- bestPath[diagonalPath] = basePath;
- }
- }
- editLength++;
- }
- if (callback) {
- (function exec() {
- setTimeout(function() {
- if (editLength > maxEditLength) {
- return callback();
- }
- if (!execEditLength()) {
- exec();
- }
- }, 0);
- })();
- } else {
- while (editLength <= maxEditLength) {
- var ret = execEditLength();
- if (ret) {
- return ret;
- }
- }
- }
- },
- pushComponent: function pushComponent(components, added, removed) {
- var last = components[components.length - 1];
- if (last && last.added === added && last.removed === removed) {
- components[components.length - 1] = {
- count: last.count + 1,
- added,
- removed
- };
- } else {
- components.push({
- count: 1,
- added,
- removed
- });
- }
- },
- extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
- var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0;
- while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
- newPos++;
- oldPos++;
- commonCount++;
- }
- if (commonCount) {
- basePath.components.push({
- count: commonCount
- });
- }
- basePath.newPos = newPos;
- return oldPos;
- },
- equals: function equals(left, right) {
- if (this.options.comparator) {
- return this.options.comparator(left, right);
- } else {
- return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
- }
- },
- removeEmpty: function removeEmpty(array) {
- var ret = [];
- for (var i = 0; i < array.length; i++) {
- if (array[i]) {
- ret.push(array[i]);
- }
- }
- return ret;
- },
- castInput: function castInput(value) {
- return value;
- },
- tokenize: function tokenize(value) {
- return value.split("");
- },
- join: function join(chars) {
- return chars.join("");
- }
- };
- function buildValues(diff, components, newString, oldString, useLongestToken) {
- var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0;
- for (; componentPos < componentLen; componentPos++) {
- var component = components[componentPos];
- if (!component.removed) {
- if (!component.added && useLongestToken) {
- var value = newString.slice(newPos, newPos + component.count);
- value = value.map(function(value2, i) {
- var oldValue = oldString[oldPos + i];
- return oldValue.length > value2.length ? oldValue : value2;
- });
- component.value = diff.join(value);
- } else {
- component.value = diff.join(newString.slice(newPos, newPos + component.count));
- }
- newPos += component.count;
- if (!component.added) {
- oldPos += component.count;
- }
- } else {
- component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
- oldPos += component.count;
- if (componentPos && components[componentPos - 1].added) {
- var tmp = components[componentPos - 1];
- components[componentPos - 1] = components[componentPos];
- components[componentPos] = tmp;
- }
- }
- }
- var lastComponent = components[componentLen - 1];
- if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) {
- components[componentLen - 2].value += lastComponent.value;
- components.pop();
- }
- return components;
- }
- function clonePath(path) {
- return {
- newPos: path.newPos,
- components: path.components.slice(0)
- };
- }
- }
- });
- var require_params = __commonJS2({
- "node_modules/diff/lib/util/params.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.generateOptions = generateOptions;
- function generateOptions(options, defaults) {
- if (typeof options === "function") {
- defaults.callback = options;
- } else if (options) {
- for (var name in options) {
- if (options.hasOwnProperty(name)) {
- defaults[name] = options[name];
- }
- }
- }
- return defaults;
- }
- }
- });
- var require_line = __commonJS2({
- "node_modules/diff/lib/diff/line.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.diffLines = diffLines;
- exports2.diffTrimmedLines = diffTrimmedLines;
- exports2.lineDiff = void 0;
- var _base = _interopRequireDefault(require_base());
- var _params = require_params();
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- "default": obj
- };
- }
- var lineDiff = new _base["default"]();
- exports2.lineDiff = lineDiff;
- lineDiff.tokenize = function(value) {
- var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
- if (!linesAndNewlines[linesAndNewlines.length - 1]) {
- linesAndNewlines.pop();
- }
- for (var i = 0; i < linesAndNewlines.length; i++) {
- var line = linesAndNewlines[i];
- if (i % 2 && !this.options.newlineIsToken) {
- retLines[retLines.length - 1] += line;
- } else {
- if (this.options.ignoreWhitespace) {
- line = line.trim();
- }
- retLines.push(line);
- }
- }
- return retLines;
- };
- function diffLines(oldStr, newStr, callback) {
- return lineDiff.diff(oldStr, newStr, callback);
- }
- function diffTrimmedLines(oldStr, newStr, callback) {
- var options = (0, _params.generateOptions)(callback, {
- ignoreWhitespace: true
- });
- return lineDiff.diff(oldStr, newStr, options);
- }
- }
- });
- var require_create = __commonJS2({
- "node_modules/diff/lib/patch/create.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", {
- value: true
- });
- exports2.structuredPatch = structuredPatch;
- exports2.formatPatch = formatPatch;
- exports2.createTwoFilesPatch = createTwoFilesPatch;
- exports2.createPatch = createPatch;
- var _line = require_line();
- function _toConsumableArray(arr) {
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
- }
- function _nonIterableSpread() {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
- }
- function _unsupportedIterableToArray(o, minLen) {
- if (!o)
- return;
- if (typeof o === "string")
- return _arrayLikeToArray(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor)
- n = o.constructor.name;
- if (n === "Map" || n === "Set")
- return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray(o, minLen);
- }
- function _iterableToArray(iter) {
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter))
- return Array.from(iter);
- }
- function _arrayWithoutHoles(arr) {
- if (Array.isArray(arr))
- return _arrayLikeToArray(arr);
- }
- function _arrayLikeToArray(arr, len) {
- if (len == null || len > arr.length)
- len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
- arr2[i] = arr[i];
- }
- return arr2;
- }
- function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
- if (!options) {
- options = {};
- }
- if (typeof options.context === "undefined") {
- options.context = 4;
- }
- var diff = (0, _line.diffLines)(oldStr, newStr, options);
- diff.push({
- value: "",
- lines: []
- });
- function contextLines(lines) {
- return lines.map(function(entry) {
- return " " + entry;
- });
- }
- var hunks = [];
- var oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
- var _loop = function _loop2(i2) {
- var current = diff[i2], lines = current.lines || current.value.replace(/\n$/, "").split("\n");
- current.lines = lines;
- if (current.added || current.removed) {
- var _curRange;
- if (!oldRangeStart) {
- var prev = diff[i2 - 1];
- oldRangeStart = oldLine;
- newRangeStart = newLine;
- if (prev) {
- curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
- oldRangeStart -= curRange.length;
- newRangeStart -= curRange.length;
- }
- }
- (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function(entry) {
- return (current.added ? "+" : "-") + entry;
- })));
- if (current.added) {
- newLine += lines.length;
- } else {
- oldLine += lines.length;
- }
- } else {
- if (oldRangeStart) {
- if (lines.length <= options.context * 2 && i2 < diff.length - 2) {
- var _curRange2;
- (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
- } else {
- var _curRange3;
- var contextSize = Math.min(lines.length, options.context);
- (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
- var hunk = {
- oldStart: oldRangeStart,
- oldLines: oldLine - oldRangeStart + contextSize,
- newStart: newRangeStart,
- newLines: newLine - newRangeStart + contextSize,
- lines: curRange
- };
- if (i2 >= diff.length - 2 && lines.length <= options.context) {
- var oldEOFNewline = /\n$/.test(oldStr);
- var newEOFNewline = /\n$/.test(newStr);
- var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
- if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
- curRange.splice(hunk.oldLines, 0, "\\ No newline at end of file");
- }
- if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
- curRange.push("\\ No newline at end of file");
- }
- }
- hunks.push(hunk);
- oldRangeStart = 0;
- newRangeStart = 0;
- curRange = [];
- }
- }
- oldLine += lines.length;
- newLine += lines.length;
- }
- };
- for (var i = 0; i < diff.length; i++) {
- _loop(i);
- }
- return {
- oldFileName,
- newFileName,
- oldHeader,
- newHeader,
- hunks
- };
- }
- function formatPatch(diff) {
- var ret = [];
- if (diff.oldFileName == diff.newFileName) {
- ret.push("Index: " + diff.oldFileName);
- }
- ret.push("===================================================================");
- ret.push("--- " + diff.oldFileName + (typeof diff.oldHeader === "undefined" ? "" : " " + diff.oldHeader));
- ret.push("+++ " + diff.newFileName + (typeof diff.newHeader === "undefined" ? "" : " " + diff.newHeader));
- for (var i = 0; i < diff.hunks.length; i++) {
- var hunk = diff.hunks[i];
- if (hunk.oldLines === 0) {
- hunk.oldStart -= 1;
- }
- if (hunk.newLines === 0) {
- hunk.newStart -= 1;
- }
- ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@");
- ret.push.apply(ret, hunk.lines);
- }
- return ret.join("\n") + "\n";
- }
- function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
- return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
- }
- function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
- return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
- }
- }
- });
- var require_format = __commonJS2({
- "src/cli/format.js"(exports2, module2) {
- "use strict";
- var {
- promises: fs
- } = require("fs");
- var path = require("path");
- var {
- default: chalk
- } = require_chalk();
- var prettier2 = require("./index.js");
- var {
- getStdin
- } = require("./third-party.js");
- var {
- createIgnorer,
- errors
- } = require_prettier_internal();
- var {
- expandPatterns,
- fixWindowsSlashes
- } = require_expand_patterns();
- var getOptionsForFile = require_get_options_for_file();
- var isTTY = require_is_tty();
- function diff(a, b) {
- return require_create().createTwoFilesPatch("", "", a, b, "", "", {
- context: 2
- });
- }
- function handleError(context, filename, error, printedFilename) {
- if (error instanceof errors.UndefinedParserError) {
- if ((context.argv.write || context.argv.ignoreUnknown) && printedFilename) {
- printedFilename.clear();
- }
- if (context.argv.ignoreUnknown) {
- return;
- }
- if (!context.argv.check && !context.argv.listDifferent) {
- process.exitCode = 2;
- }
- context.logger.error(error.message);
- return;
- }
- if (context.argv.write) {
- process.stdout.write("\n");
- }
- const isParseError = Boolean(error && error.loc);
- const isValidationError = /^Invalid \S+ value\./.test(error && error.message);
- if (isParseError) {
- context.logger.error(`${filename}: ${String(error)}`);
- } else if (isValidationError || error instanceof errors.ConfigError) {
- context.logger.error(error.message);
- process.exit(1);
- } else if (error instanceof errors.DebugError) {
- context.logger.error(`${filename}: ${error.message}`);
- } else {
- context.logger.error(filename + ": " + (error.stack || error));
- }
- process.exitCode = 2;
- }
- function writeOutput(context, result, options) {
- process.stdout.write(context.argv.debugCheck ? result.filepath : result.formatted);
- if (options && options.cursorOffset >= 0) {
- process.stderr.write(result.cursorOffset + "\n");
- }
- }
- function listDifferent(context, input, options, filename) {
- if (!context.argv.check && !context.argv.listDifferent) {
- return;
- }
- try {
- if (!options.filepath && !options.parser) {
- throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser.");
- }
- if (!prettier2.check(input, options)) {
- if (!context.argv.write) {
- context.logger.log(filename);
- process.exitCode = 1;
- }
- }
- } catch (error) {
- context.logger.error(error.message);
- }
- return true;
- }
- function format(context, input, opt) {
- if (!opt.parser && !opt.filepath) {
- throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser.");
- }
- if (context.argv.debugPrintDoc) {
- const doc = prettier2.__debug.printToDoc(input, opt);
- return {
- formatted: prettier2.__debug.formatDoc(doc) + "\n"
- };
- }
- if (context.argv.debugPrintComments) {
- return {
- formatted: prettier2.format(JSON.stringify(prettier2.formatWithCursor(input, opt).comments || []), {
- parser: "json"
- })
- };
- }
- if (context.argv.debugPrintAst) {
- const {
- ast
- } = prettier2.__debug.parse(input, opt);
- return {
- formatted: JSON.stringify(ast)
- };
- }
- if (context.argv.debugCheck) {
- const pp = prettier2.format(input, opt);
- const pppp = prettier2.format(pp, opt);
- if (pp !== pppp) {
- throw new errors.DebugError("prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp));
- } else {
- const stringify2 = (obj) => JSON.stringify(obj, null, 2);
- const ast = stringify2(prettier2.__debug.parse(input, opt, true).ast);
- const past = stringify2(prettier2.__debug.parse(pp, opt, true).ast);
- if (ast !== past) {
- const MAX_AST_SIZE = 2097152;
- const astDiff = ast.length > MAX_AST_SIZE || past.length > MAX_AST_SIZE ? "AST diff too large to render" : diff(ast, past);
- throw new errors.DebugError("ast(input) !== ast(prettier(input))\n" + astDiff + "\n" + diff(input, pp));
- }
- }
- return {
- formatted: pp,
- filepath: opt.filepath || "(stdin)\n"
- };
- }
- if (context.argv.debugBenchmark) {
- let benchmark;
- try {
- benchmark = require("benchmark");
- } catch {
- context.logger.debug("'--debug-benchmark' requires the 'benchmark' package to be installed.");
- process.exit(2);
- }
- context.logger.debug("'--debug-benchmark' option found, measuring formatWithCursor with 'benchmark' module.");
- const suite = new benchmark.Suite();
- suite.add("format", () => {
- prettier2.formatWithCursor(input, opt);
- }).on("cycle", (event) => {
- const results = {
- benchmark: String(event.target),
- hz: event.target.hz,
- ms: event.target.times.cycle * 1e3
- };
- context.logger.debug("'--debug-benchmark' measurements for formatWithCursor: " + JSON.stringify(results, null, 2));
- }).run({
- async: false
- });
- } else if (context.argv.debugRepeat > 0) {
- const repeat = context.argv.debugRepeat;
- context.logger.debug("'--debug-repeat' option found, running formatWithCursor " + repeat + " times.");
- let totalMs = 0;
- for (let i = 0; i < repeat; ++i) {
- const startMs = Date.now();
- prettier2.formatWithCursor(input, opt);
- totalMs += Date.now() - startMs;
- }
- const averageMs = totalMs / repeat;
- const results = {
- repeat,
- hz: 1e3 / averageMs,
- ms: averageMs
- };
- context.logger.debug("'--debug-repeat' measurements for formatWithCursor: " + JSON.stringify(results, null, 2));
- }
- return prettier2.formatWithCursor(input, opt);
- }
- async function createIgnorerFromContextOrDie(context) {
- try {
- return await createIgnorer(context.argv.ignorePath, context.argv.withNodeModules);
- } catch (e) {
- context.logger.error(e.message);
- process.exit(2);
- }
- }
- async function formatStdin2(context) {
- const filepath = context.argv.filepath ? path.resolve(process.cwd(), context.argv.filepath) : process.cwd();
- const ignorer = await createIgnorerFromContextOrDie(context);
- const relativeFilepath = context.argv.ignorePath ? path.relative(path.dirname(context.argv.ignorePath), filepath) : path.relative(process.cwd(), filepath);
- try {
- const input = await getStdin();
- if (relativeFilepath && ignorer.ignores(fixWindowsSlashes(relativeFilepath))) {
- writeOutput(context, {
- formatted: input
- });
- return;
- }
- const options = await getOptionsForFile(context, filepath);
- if (listDifferent(context, input, options, "(stdin)")) {
- return;
- }
- writeOutput(context, format(context, input, options), options);
- } catch (error) {
- handleError(context, relativeFilepath || "stdin", error);
- }
- }
- async function formatFiles2(context) {
- const ignorer = await createIgnorerFromContextOrDie(context);
- let numberOfUnformattedFilesFound = 0;
- if (context.argv.check) {
- context.logger.log("Checking formatting...");
- }
- for await (const pathOrError of expandPatterns(context)) {
- if (typeof pathOrError === "object") {
- context.logger.error(pathOrError.error);
- process.exitCode = 2;
- continue;
- }
- const filename = pathOrError;
- const ignoreFilename = context.argv.ignorePath ? path.relative(path.dirname(context.argv.ignorePath), filename) : filename;
- const fileIgnored = ignorer.ignores(fixWindowsSlashes(ignoreFilename));
- if (fileIgnored && (context.argv.debugCheck || context.argv.write || context.argv.check || context.argv.listDifferent)) {
- continue;
- }
- const options = Object.assign(Object.assign({}, await getOptionsForFile(context, filename)), {}, {
- filepath: filename
- });
- let printedFilename;
- if (isTTY()) {
- printedFilename = context.logger.log(filename, {
- newline: false,
- clearable: true
- });
- }
- let input;
- try {
- input = await fs.readFile(filename, "utf8");
- } catch (error) {
- context.logger.log("");
- context.logger.error(`Unable to read file: ${filename}
- ${error.message}`);
- process.exitCode = 2;
- continue;
- }
- if (fileIgnored) {
- writeOutput(context, {
- formatted: input
- }, options);
- continue;
- }
- const start = Date.now();
- let result;
- let output;
- try {
- result = format(context, input, options);
- output = result.formatted;
- } catch (error) {
- handleError(context, filename, error, printedFilename);
- continue;
- }
- const isDifferent = output !== input;
- if (printedFilename) {
- printedFilename.clear();
- }
- if (context.argv.write) {
- if (isDifferent) {
- if (!context.argv.check && !context.argv.listDifferent) {
- context.logger.log(`${filename} ${Date.now() - start}ms`);
- }
- try {
- await fs.writeFile(filename, output, "utf8");
- } catch (error) {
- context.logger.error(`Unable to write file: ${filename}
- ${error.message}`);
- process.exitCode = 2;
- }
- } else if (!context.argv.check && !context.argv.listDifferent) {
- context.logger.log(`${chalk.grey(filename)} ${Date.now() - start}ms`);
- }
- } else if (context.argv.debugCheck) {
- if (result.filepath) {
- context.logger.log(result.filepath);
- } else {
- process.exitCode = 2;
- }
- } else if (!context.argv.check && !context.argv.listDifferent) {
- writeOutput(context, result, options);
- }
- if (isDifferent) {
- if (context.argv.check) {
- context.logger.warn(filename);
- } else if (context.argv.listDifferent) {
- context.logger.log(filename);
- }
- numberOfUnformattedFilesFound += 1;
- }
- }
- if (context.argv.check) {
- if (numberOfUnformattedFilesFound === 0) {
- context.logger.log("All matched files use Prettier code style!");
- } else {
- 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?");
- }
- }
- if ((context.argv.check || context.argv.listDifferent) && numberOfUnformattedFilesFound > 0 && !process.exitCode && !context.argv.write) {
- process.exitCode = 1;
- }
- }
- module2.exports = {
- formatStdin: formatStdin2,
- formatFiles: formatFiles2
- };
- }
- });
- var require_utils5 = __commonJS2({
- "src/cli/utils.js"(exports2, module2) {
- "use strict";
- var printToScreen2 = console.log.bind(console);
- module2.exports = {
- printToScreen: printToScreen2
- };
- }
- });
- var require_file_info = __commonJS2({
- "src/cli/file-info.js"(exports2, module2) {
- "use strict";
- var stringify2 = require_fast_json_stable_stringify();
- var prettier2 = require("./index.js");
- var {
- printToScreen: printToScreen2
- } = require_utils5();
- async function logFileInfoOrDie2(context) {
- const {
- fileInfo: file,
- ignorePath,
- withNodeModules,
- plugins,
- pluginSearchDirs,
- config
- } = context.argv;
- const fileInfo = await prettier2.getFileInfo(file, {
- ignorePath,
- withNodeModules,
- plugins,
- pluginSearchDirs,
- resolveConfig: config !== false
- });
- printToScreen2(prettier2.format(stringify2(fileInfo), {
- parser: "json"
- }));
- }
- module2.exports = logFileInfoOrDie2;
- }
- });
- var require_find_config_path = __commonJS2({
- "src/cli/find-config-path.js"(exports2, module2) {
- "use strict";
- var path = require("path");
- var prettier2 = require("./index.js");
- var {
- printToScreen: printToScreen2
- } = require_utils5();
- async function logResolvedConfigPathOrDie2(context) {
- const file = context.argv.findConfigPath;
- const configFile = await prettier2.resolveConfigFile(file);
- if (configFile) {
- printToScreen2(path.relative(process.cwd(), configFile));
- } else {
- throw new Error(`Can not find configure file for "${file}"`);
- }
- }
- module2.exports = logResolvedConfigPathOrDie2;
- }
- });
- var stringify = require_fast_json_stable_stringify();
- var prettier = require("./index.js");
- var createLogger = require_logger();
- var Context = require_context();
- var {
- parseArgvWithoutPlugins
- } = require_parse_cli_arguments();
- var {
- createDetailedUsage,
- createUsage
- } = require_usage();
- var {
- formatStdin,
- formatFiles
- } = require_format();
- var logFileInfoOrDie = require_file_info();
- var logResolvedConfigPathOrDie = require_find_config_path();
- var {
- utils: {
- isNonEmptyArray
- }
- } = require_prettier_internal();
- var {
- printToScreen
- } = require_utils5();
- async function run(rawArguments) {
- let logger = createLogger();
- try {
- const logLevel = parseArgvWithoutPlugins(rawArguments, logger, "loglevel").loglevel;
- if (logLevel !== logger.logLevel) {
- logger = createLogger(logLevel);
- }
- await main(rawArguments, logger);
- } catch (error) {
- logger.error(error.message);
- process.exitCode = 1;
- }
- }
- async function main(rawArguments, logger) {
- const context = new Context({
- rawArguments,
- logger
- });
- logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`);
- if (context.argv.pluginSearch === false) {
- const rawPluginSearchDirs = context.argv.__raw["plugin-search-dir"];
- if (typeof rawPluginSearchDirs === "string" || isNonEmptyArray(rawPluginSearchDirs)) {
- throw new Error("Cannot use --no-plugin-search and --plugin-search-dir together.");
- }
- }
- if (context.argv.check && context.argv.listDifferent) {
- throw new Error("Cannot use --check and --list-different together.");
- }
- if (context.argv.write && context.argv.debugCheck) {
- throw new Error("Cannot use --write and --debug-check together.");
- }
- if (context.argv.findConfigPath && context.filePatterns.length > 0) {
- throw new Error("Cannot use --find-config-path with multiple files");
- }
- if (context.argv.fileInfo && context.filePatterns.length > 0) {
- throw new Error("Cannot use --file-info with multiple files");
- }
- if (context.argv.version) {
- printToScreen(prettier.version);
- return;
- }
- if (context.argv.help !== void 0) {
- printToScreen(typeof context.argv.help === "string" && context.argv.help !== "" ? createDetailedUsage(context, context.argv.help) : createUsage(context));
- return;
- }
- if (context.argv.supportInfo) {
- printToScreen(prettier.format(stringify(prettier.getSupportInfo()), {
- parser: "json"
- }));
- return;
- }
- const hasFilePatterns = context.filePatterns.length > 0;
- const useStdin = !hasFilePatterns && (!process.stdin.isTTY || context.argv.filePath);
- if (context.argv.findConfigPath) {
- await logResolvedConfigPathOrDie(context);
- } else if (context.argv.fileInfo) {
- await logFileInfoOrDie(context);
- } else if (useStdin) {
- await formatStdin(context);
- } else if (hasFilePatterns) {
- await formatFiles(context);
- } else {
- process.exitCode = 1;
- printToScreen(createUsage(context));
- }
- }
- module.exports = {
- run
- };
|