build2.js 199 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386
  1. import { i as __require, t as __commonJSMin } from "./chunk.js";
  2. import { t as require_lib } from "./lib.js";
  3. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/fs.js
  4. var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.getFileSystem = getFileSystem;
  7. exports.setFileSystem = setFileSystem;
  8. let fileSystem = {
  9. readFile: () => {
  10. throw Error("readFile not implemented");
  11. },
  12. writeFile: () => {
  13. throw Error("writeFile not implemented");
  14. }
  15. };
  16. function setFileSystem(fs) {
  17. fileSystem.readFile = fs.readFile;
  18. fileSystem.writeFile = fs.writeFile;
  19. }
  20. function getFileSystem() {
  21. return fileSystem;
  22. }
  23. }));
  24. //#endregion
  25. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/unquote.js
  26. var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
  27. Object.defineProperty(exports, "__esModule", { value: true });
  28. exports.default = unquote;
  29. const reg = /['"]/;
  30. function unquote(str) {
  31. if (!str) return "";
  32. if (reg.test(str.charAt(0))) str = str.substr(1);
  33. if (reg.test(str.charAt(str.length - 1))) str = str.substr(0, str.length - 1);
  34. return str;
  35. }
  36. }));
  37. //#endregion
  38. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/replaceValueSymbols.js
  39. var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  40. const matchValueName = /[$]?[\w-]+/g;
  41. const replaceValueSymbols = (value, replacements) => {
  42. let matches;
  43. while (matches = matchValueName.exec(value)) {
  44. const replacement = replacements[matches[0]];
  45. if (replacement) {
  46. value = value.slice(0, matches.index) + replacement + value.slice(matchValueName.lastIndex);
  47. matchValueName.lastIndex -= matches[0].length - replacement.length;
  48. }
  49. }
  50. return value;
  51. };
  52. module.exports = replaceValueSymbols;
  53. }));
  54. //#endregion
  55. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/replaceSymbols.js
  56. var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  57. const replaceValueSymbols = require_replaceValueSymbols();
  58. const replaceSymbols = (css, replacements) => {
  59. css.walk((node) => {
  60. if (node.type === "decl" && node.value) node.value = replaceValueSymbols(node.value.toString(), replacements);
  61. else if (node.type === "rule" && node.selector) node.selector = replaceValueSymbols(node.selector.toString(), replacements);
  62. else if (node.type === "atrule" && node.params) node.params = replaceValueSymbols(node.params.toString(), replacements);
  63. });
  64. };
  65. module.exports = replaceSymbols;
  66. }));
  67. //#endregion
  68. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/extractICSS.js
  69. var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  70. const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
  71. const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
  72. const getDeclsObject = (rule) => {
  73. const object = {};
  74. rule.walkDecls((decl) => {
  75. const before = decl.raws.before ? decl.raws.before.trim() : "";
  76. object[before + decl.prop] = decl.value;
  77. });
  78. return object;
  79. };
  80. /**
  81. *
  82. * @param {string} css
  83. * @param {boolean} removeRules
  84. * @param {'auto' | 'rule' | 'at-rule'} mode
  85. */
  86. const extractICSS = (css, removeRules = true, mode = "auto") => {
  87. const icssImports = {};
  88. const icssExports = {};
  89. function addImports(node, path) {
  90. const unquoted = path.replace(/'|"/g, "");
  91. icssImports[unquoted] = Object.assign(icssImports[unquoted] || {}, getDeclsObject(node));
  92. if (removeRules) node.remove();
  93. }
  94. function addExports(node) {
  95. Object.assign(icssExports, getDeclsObject(node));
  96. if (removeRules) node.remove();
  97. }
  98. css.each((node) => {
  99. if (node.type === "rule" && mode !== "at-rule") {
  100. if (node.selector.slice(0, 7) === ":import") {
  101. const matches = importPattern.exec(node.selector);
  102. if (matches) addImports(node, matches[1]);
  103. }
  104. if (node.selector === ":export") addExports(node);
  105. }
  106. if (node.type === "atrule" && mode !== "rule") {
  107. if (node.name === "icss-import") {
  108. const matches = balancedQuotes.exec(node.params);
  109. if (matches) addImports(node, matches[1]);
  110. }
  111. if (node.name === "icss-export") addExports(node);
  112. }
  113. });
  114. return {
  115. icssImports,
  116. icssExports
  117. };
  118. };
  119. module.exports = extractICSS;
  120. }));
  121. //#endregion
  122. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/createICSSRules.js
  123. var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  124. const createImports = (imports, postcss, mode = "rule") => {
  125. return Object.keys(imports).map((path) => {
  126. const aliases = imports[path];
  127. const declarations = Object.keys(aliases).map((key) => postcss.decl({
  128. prop: key,
  129. value: aliases[key],
  130. raws: { before: "\n " }
  131. }));
  132. const hasDeclarations = declarations.length > 0;
  133. const rule = mode === "rule" ? postcss.rule({
  134. selector: `:import('${path}')`,
  135. raws: { after: hasDeclarations ? "\n" : "" }
  136. }) : postcss.atRule({
  137. name: "icss-import",
  138. params: `'${path}'`,
  139. raws: { after: hasDeclarations ? "\n" : "" }
  140. });
  141. if (hasDeclarations) rule.append(declarations);
  142. return rule;
  143. });
  144. };
  145. const createExports = (exports$7, postcss, mode = "rule") => {
  146. const declarations = Object.keys(exports$7).map((key) => postcss.decl({
  147. prop: key,
  148. value: exports$7[key],
  149. raws: { before: "\n " }
  150. }));
  151. if (declarations.length === 0) return [];
  152. const rule = mode === "rule" ? postcss.rule({
  153. selector: `:export`,
  154. raws: { after: "\n" }
  155. }) : postcss.atRule({
  156. name: "icss-export",
  157. raws: { after: "\n" }
  158. });
  159. rule.append(declarations);
  160. return [rule];
  161. };
  162. const createICSSRules = (imports, exports$8, postcss, mode) => [...createImports(imports, postcss, mode), ...createExports(exports$8, postcss, mode)];
  163. module.exports = createICSSRules;
  164. }));
  165. //#endregion
  166. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/index.js
  167. var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  168. module.exports = {
  169. replaceValueSymbols: require_replaceValueSymbols(),
  170. replaceSymbols: require_replaceSymbols(),
  171. extractICSS: require_extractICSS(),
  172. createICSSRules: require_createICSSRules()
  173. };
  174. }));
  175. //#endregion
  176. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/Parser.js
  177. var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
  178. Object.defineProperty(exports, "__esModule", { value: true });
  179. exports.default = void 0;
  180. var _icssUtils = require_src$4();
  181. const importRegexp = /^:import\((.+)\)$/;
  182. var Parser = class {
  183. constructor(pathFetcher, trace) {
  184. this.pathFetcher = pathFetcher;
  185. this.plugin = this.plugin.bind(this);
  186. this.exportTokens = {};
  187. this.translations = {};
  188. this.trace = trace;
  189. }
  190. plugin() {
  191. const parser = this;
  192. return {
  193. postcssPlugin: "css-modules-parser",
  194. async OnceExit(css) {
  195. await Promise.all(parser.fetchAllImports(css));
  196. parser.linkImportedSymbols(css);
  197. return parser.extractExports(css);
  198. }
  199. };
  200. }
  201. fetchAllImports(css) {
  202. let imports = [];
  203. css.each((node) => {
  204. if (node.type == "rule" && node.selector.match(importRegexp)) imports.push(this.fetchImport(node, css.source.input.from, imports.length));
  205. });
  206. return imports;
  207. }
  208. linkImportedSymbols(css) {
  209. (0, _icssUtils.replaceSymbols)(css, this.translations);
  210. }
  211. extractExports(css) {
  212. css.each((node) => {
  213. if (node.type == "rule" && node.selector == ":export") this.handleExport(node);
  214. });
  215. }
  216. handleExport(exportNode) {
  217. exportNode.each((decl) => {
  218. if (decl.type == "decl") {
  219. Object.keys(this.translations).forEach((translation) => {
  220. decl.value = decl.value.replace(translation, this.translations[translation]);
  221. });
  222. this.exportTokens[decl.prop] = decl.value;
  223. }
  224. });
  225. exportNode.remove();
  226. }
  227. async fetchImport(importNode, relativeTo, depNr) {
  228. const file = importNode.selector.match(importRegexp)[1];
  229. const depTrace = this.trace + String.fromCharCode(depNr);
  230. const exports$6 = await this.pathFetcher(file, relativeTo, depTrace);
  231. try {
  232. importNode.each((decl) => {
  233. if (decl.type == "decl") this.translations[decl.prop] = exports$6[decl.value];
  234. });
  235. importNode.remove();
  236. } catch (err) {
  237. console.log(err);
  238. }
  239. }
  240. };
  241. exports.default = Parser;
  242. }));
  243. //#endregion
  244. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/saveJSON.js
  245. var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
  246. Object.defineProperty(exports, "__esModule", { value: true });
  247. exports.default = saveJSON;
  248. var _fs = require_fs();
  249. function saveJSON(cssFile, json) {
  250. return new Promise((resolve, reject) => {
  251. const { writeFile } = (0, _fs.getFileSystem)();
  252. writeFile(`${cssFile}.json`, JSON.stringify(json), (e) => e ? reject(e) : resolve(json));
  253. });
  254. }
  255. }));
  256. //#endregion
  257. //#region ../../node_modules/.pnpm/lodash.camelcase@4.3.0/node_modules/lodash.camelcase/index.js
  258. var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  259. /**
  260. * lodash (Custom Build) <https://lodash.com/>
  261. * Build: `lodash modularize exports="npm" -o ./`
  262. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  263. * Released under MIT license <https://lodash.com/license>
  264. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  265. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  266. */
  267. /** Used as references for various `Number` constants. */
  268. var INFINITY = Infinity;
  269. /** `Object#toString` result references. */
  270. var symbolTag = "[object Symbol]";
  271. /** Used to match words composed of alphanumeric characters. */
  272. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  273. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  274. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  275. /** Used to compose unicode character classes. */
  276. var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  277. /** Used to compose unicode capture groups. */
  278. var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
  279. /** Used to compose unicode regexes. */
  280. var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
  281. rsNonAstral,
  282. rsRegional,
  283. rsSurrPair
  284. ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
  285. rsDingbat,
  286. rsRegional,
  287. rsSurrPair
  288. ].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [
  289. rsNonAstral + rsCombo + "?",
  290. rsCombo,
  291. rsRegional,
  292. rsSurrPair,
  293. rsAstral
  294. ].join("|") + ")";
  295. /** Used to match apostrophes. */
  296. var reApos = RegExp(rsApos, "g");
  297. /**
  298. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  299. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  300. */
  301. var reComboMark = RegExp(rsCombo, "g");
  302. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  303. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  304. /** Used to match complex or compound words. */
  305. var reUnicodeWord = RegExp([
  306. rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [
  307. rsBreak,
  308. rsUpper,
  309. "$"
  310. ].join("|") + ")",
  311. rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [
  312. rsBreak,
  313. rsUpper + rsLowerMisc,
  314. "$"
  315. ].join("|") + ")",
  316. rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr,
  317. rsUpper + "+" + rsOptUpperContr,
  318. rsDigits,
  319. rsEmoji
  320. ].join("|"), "g");
  321. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  322. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + "]");
  323. /** Used to detect strings that need a more robust regexp to match words. */
  324. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  325. /** Used to map Latin Unicode letters to basic Latin letters. */
  326. var deburredLetters = {
  327. "À": "A",
  328. "Á": "A",
  329. "Â": "A",
  330. "Ã": "A",
  331. "Ä": "A",
  332. "Å": "A",
  333. "à": "a",
  334. "á": "a",
  335. "â": "a",
  336. "ã": "a",
  337. "ä": "a",
  338. "å": "a",
  339. "Ç": "C",
  340. "ç": "c",
  341. "Ð": "D",
  342. "ð": "d",
  343. "È": "E",
  344. "É": "E",
  345. "Ê": "E",
  346. "Ë": "E",
  347. "è": "e",
  348. "é": "e",
  349. "ê": "e",
  350. "ë": "e",
  351. "Ì": "I",
  352. "Í": "I",
  353. "Î": "I",
  354. "Ï": "I",
  355. "ì": "i",
  356. "í": "i",
  357. "î": "i",
  358. "ï": "i",
  359. "Ñ": "N",
  360. "ñ": "n",
  361. "Ò": "O",
  362. "Ó": "O",
  363. "Ô": "O",
  364. "Õ": "O",
  365. "Ö": "O",
  366. "Ø": "O",
  367. "ò": "o",
  368. "ó": "o",
  369. "ô": "o",
  370. "õ": "o",
  371. "ö": "o",
  372. "ø": "o",
  373. "Ù": "U",
  374. "Ú": "U",
  375. "Û": "U",
  376. "Ü": "U",
  377. "ù": "u",
  378. "ú": "u",
  379. "û": "u",
  380. "ü": "u",
  381. "Ý": "Y",
  382. "ý": "y",
  383. "ÿ": "y",
  384. "Æ": "Ae",
  385. "æ": "ae",
  386. "Þ": "Th",
  387. "þ": "th",
  388. "ß": "ss",
  389. "Ā": "A",
  390. "Ă": "A",
  391. "Ą": "A",
  392. "ā": "a",
  393. "ă": "a",
  394. "ą": "a",
  395. "Ć": "C",
  396. "Ĉ": "C",
  397. "Ċ": "C",
  398. "Č": "C",
  399. "ć": "c",
  400. "ĉ": "c",
  401. "ċ": "c",
  402. "č": "c",
  403. "Ď": "D",
  404. "Đ": "D",
  405. "ď": "d",
  406. "đ": "d",
  407. "Ē": "E",
  408. "Ĕ": "E",
  409. "Ė": "E",
  410. "Ę": "E",
  411. "Ě": "E",
  412. "ē": "e",
  413. "ĕ": "e",
  414. "ė": "e",
  415. "ę": "e",
  416. "ě": "e",
  417. "Ĝ": "G",
  418. "Ğ": "G",
  419. "Ġ": "G",
  420. "Ģ": "G",
  421. "ĝ": "g",
  422. "ğ": "g",
  423. "ġ": "g",
  424. "ģ": "g",
  425. "Ĥ": "H",
  426. "Ħ": "H",
  427. "ĥ": "h",
  428. "ħ": "h",
  429. "Ĩ": "I",
  430. "Ī": "I",
  431. "Ĭ": "I",
  432. "Į": "I",
  433. "İ": "I",
  434. "ĩ": "i",
  435. "ī": "i",
  436. "ĭ": "i",
  437. "į": "i",
  438. "ı": "i",
  439. "Ĵ": "J",
  440. "ĵ": "j",
  441. "Ķ": "K",
  442. "ķ": "k",
  443. "ĸ": "k",
  444. "Ĺ": "L",
  445. "Ļ": "L",
  446. "Ľ": "L",
  447. "Ŀ": "L",
  448. "Ł": "L",
  449. "ĺ": "l",
  450. "ļ": "l",
  451. "ľ": "l",
  452. "ŀ": "l",
  453. "ł": "l",
  454. "Ń": "N",
  455. "Ņ": "N",
  456. "Ň": "N",
  457. "Ŋ": "N",
  458. "ń": "n",
  459. "ņ": "n",
  460. "ň": "n",
  461. "ŋ": "n",
  462. "Ō": "O",
  463. "Ŏ": "O",
  464. "Ő": "O",
  465. "ō": "o",
  466. "ŏ": "o",
  467. "ő": "o",
  468. "Ŕ": "R",
  469. "Ŗ": "R",
  470. "Ř": "R",
  471. "ŕ": "r",
  472. "ŗ": "r",
  473. "ř": "r",
  474. "Ś": "S",
  475. "Ŝ": "S",
  476. "Ş": "S",
  477. "Š": "S",
  478. "ś": "s",
  479. "ŝ": "s",
  480. "ş": "s",
  481. "š": "s",
  482. "Ţ": "T",
  483. "Ť": "T",
  484. "Ŧ": "T",
  485. "ţ": "t",
  486. "ť": "t",
  487. "ŧ": "t",
  488. "Ũ": "U",
  489. "Ū": "U",
  490. "Ŭ": "U",
  491. "Ů": "U",
  492. "Ű": "U",
  493. "Ų": "U",
  494. "ũ": "u",
  495. "ū": "u",
  496. "ŭ": "u",
  497. "ů": "u",
  498. "ű": "u",
  499. "ų": "u",
  500. "Ŵ": "W",
  501. "ŵ": "w",
  502. "Ŷ": "Y",
  503. "ŷ": "y",
  504. "Ÿ": "Y",
  505. "Ź": "Z",
  506. "Ż": "Z",
  507. "Ž": "Z",
  508. "ź": "z",
  509. "ż": "z",
  510. "ž": "z",
  511. "IJ": "IJ",
  512. "ij": "ij",
  513. "Œ": "Oe",
  514. "œ": "oe",
  515. "ʼn": "'n",
  516. "ſ": "ss"
  517. };
  518. /** Detect free variable `global` from Node.js. */
  519. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  520. /** Detect free variable `self`. */
  521. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  522. /** Used as a reference to the global object. */
  523. var root = freeGlobal || freeSelf || Function("return this")();
  524. /**
  525. * A specialized version of `_.reduce` for arrays without support for
  526. * iteratee shorthands.
  527. *
  528. * @private
  529. * @param {Array} [array] The array to iterate over.
  530. * @param {Function} iteratee The function invoked per iteration.
  531. * @param {*} [accumulator] The initial value.
  532. * @param {boolean} [initAccum] Specify using the first element of `array` as
  533. * the initial value.
  534. * @returns {*} Returns the accumulated value.
  535. */
  536. function arrayReduce(array, iteratee, accumulator, initAccum) {
  537. var index = -1, length = array ? array.length : 0;
  538. if (initAccum && length) accumulator = array[++index];
  539. while (++index < length) accumulator = iteratee(accumulator, array[index], index, array);
  540. return accumulator;
  541. }
  542. /**
  543. * Converts an ASCII `string` to an array.
  544. *
  545. * @private
  546. * @param {string} string The string to convert.
  547. * @returns {Array} Returns the converted array.
  548. */
  549. function asciiToArray(string) {
  550. return string.split("");
  551. }
  552. /**
  553. * Splits an ASCII `string` into an array of its words.
  554. *
  555. * @private
  556. * @param {string} The string to inspect.
  557. * @returns {Array} Returns the words of `string`.
  558. */
  559. function asciiWords(string) {
  560. return string.match(reAsciiWord) || [];
  561. }
  562. /**
  563. * The base implementation of `_.propertyOf` without support for deep paths.
  564. *
  565. * @private
  566. * @param {Object} object The object to query.
  567. * @returns {Function} Returns the new accessor function.
  568. */
  569. function basePropertyOf(object) {
  570. return function(key) {
  571. return object == null ? void 0 : object[key];
  572. };
  573. }
  574. /**
  575. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  576. * letters to basic Latin letters.
  577. *
  578. * @private
  579. * @param {string} letter The matched letter to deburr.
  580. * @returns {string} Returns the deburred letter.
  581. */
  582. var deburrLetter = basePropertyOf(deburredLetters);
  583. /**
  584. * Checks if `string` contains Unicode symbols.
  585. *
  586. * @private
  587. * @param {string} string The string to inspect.
  588. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  589. */
  590. function hasUnicode(string) {
  591. return reHasUnicode.test(string);
  592. }
  593. /**
  594. * Checks if `string` contains a word composed of Unicode symbols.
  595. *
  596. * @private
  597. * @param {string} string The string to inspect.
  598. * @returns {boolean} Returns `true` if a word is found, else `false`.
  599. */
  600. function hasUnicodeWord(string) {
  601. return reHasUnicodeWord.test(string);
  602. }
  603. /**
  604. * Converts `string` to an array.
  605. *
  606. * @private
  607. * @param {string} string The string to convert.
  608. * @returns {Array} Returns the converted array.
  609. */
  610. function stringToArray(string) {
  611. return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
  612. }
  613. /**
  614. * Converts a Unicode `string` to an array.
  615. *
  616. * @private
  617. * @param {string} string The string to convert.
  618. * @returns {Array} Returns the converted array.
  619. */
  620. function unicodeToArray(string) {
  621. return string.match(reUnicode) || [];
  622. }
  623. /**
  624. * Splits a Unicode `string` into an array of its words.
  625. *
  626. * @private
  627. * @param {string} The string to inspect.
  628. * @returns {Array} Returns the words of `string`.
  629. */
  630. function unicodeWords(string) {
  631. return string.match(reUnicodeWord) || [];
  632. }
  633. /**
  634. * Used to resolve the
  635. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  636. * of values.
  637. */
  638. var objectToString = Object.prototype.toString;
  639. /** Built-in value references. */
  640. var Symbol = root.Symbol;
  641. /** Used to convert symbols to primitives and strings. */
  642. var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
  643. /**
  644. * The base implementation of `_.slice` without an iteratee call guard.
  645. *
  646. * @private
  647. * @param {Array} array The array to slice.
  648. * @param {number} [start=0] The start position.
  649. * @param {number} [end=array.length] The end position.
  650. * @returns {Array} Returns the slice of `array`.
  651. */
  652. function baseSlice(array, start, end) {
  653. var index = -1, length = array.length;
  654. if (start < 0) start = -start > length ? 0 : length + start;
  655. end = end > length ? length : end;
  656. if (end < 0) end += length;
  657. length = start > end ? 0 : end - start >>> 0;
  658. start >>>= 0;
  659. var result = Array(length);
  660. while (++index < length) result[index] = array[index + start];
  661. return result;
  662. }
  663. /**
  664. * The base implementation of `_.toString` which doesn't convert nullish
  665. * values to empty strings.
  666. *
  667. * @private
  668. * @param {*} value The value to process.
  669. * @returns {string} Returns the string.
  670. */
  671. function baseToString(value) {
  672. if (typeof value == "string") return value;
  673. if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
  674. var result = value + "";
  675. return result == "0" && 1 / value == -INFINITY ? "-0" : result;
  676. }
  677. /**
  678. * Casts `array` to a slice if it's needed.
  679. *
  680. * @private
  681. * @param {Array} array The array to inspect.
  682. * @param {number} start The start position.
  683. * @param {number} [end=array.length] The end position.
  684. * @returns {Array} Returns the cast slice.
  685. */
  686. function castSlice(array, start, end) {
  687. var length = array.length;
  688. end = end === void 0 ? length : end;
  689. return !start && end >= length ? array : baseSlice(array, start, end);
  690. }
  691. /**
  692. * Creates a function like `_.lowerFirst`.
  693. *
  694. * @private
  695. * @param {string} methodName The name of the `String` case method to use.
  696. * @returns {Function} Returns the new case function.
  697. */
  698. function createCaseFirst(methodName) {
  699. return function(string) {
  700. string = toString(string);
  701. var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
  702. var chr = strSymbols ? strSymbols[0] : string.charAt(0);
  703. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
  704. return chr[methodName]() + trailing;
  705. };
  706. }
  707. /**
  708. * Creates a function like `_.camelCase`.
  709. *
  710. * @private
  711. * @param {Function} callback The function to combine each word.
  712. * @returns {Function} Returns the new compounder function.
  713. */
  714. function createCompounder(callback) {
  715. return function(string) {
  716. return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
  717. };
  718. }
  719. /**
  720. * Checks if `value` is object-like. A value is object-like if it's not `null`
  721. * and has a `typeof` result of "object".
  722. *
  723. * @static
  724. * @memberOf _
  725. * @since 4.0.0
  726. * @category Lang
  727. * @param {*} value The value to check.
  728. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  729. * @example
  730. *
  731. * _.isObjectLike({});
  732. * // => true
  733. *
  734. * _.isObjectLike([1, 2, 3]);
  735. * // => true
  736. *
  737. * _.isObjectLike(_.noop);
  738. * // => false
  739. *
  740. * _.isObjectLike(null);
  741. * // => false
  742. */
  743. function isObjectLike(value) {
  744. return !!value && typeof value == "object";
  745. }
  746. /**
  747. * Checks if `value` is classified as a `Symbol` primitive or object.
  748. *
  749. * @static
  750. * @memberOf _
  751. * @since 4.0.0
  752. * @category Lang
  753. * @param {*} value The value to check.
  754. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  755. * @example
  756. *
  757. * _.isSymbol(Symbol.iterator);
  758. * // => true
  759. *
  760. * _.isSymbol('abc');
  761. * // => false
  762. */
  763. function isSymbol(value) {
  764. return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
  765. }
  766. /**
  767. * Converts `value` to a string. An empty string is returned for `null`
  768. * and `undefined` values. The sign of `-0` is preserved.
  769. *
  770. * @static
  771. * @memberOf _
  772. * @since 4.0.0
  773. * @category Lang
  774. * @param {*} value The value to process.
  775. * @returns {string} Returns the string.
  776. * @example
  777. *
  778. * _.toString(null);
  779. * // => ''
  780. *
  781. * _.toString(-0);
  782. * // => '-0'
  783. *
  784. * _.toString([1, 2, 3]);
  785. * // => '1,2,3'
  786. */
  787. function toString(value) {
  788. return value == null ? "" : baseToString(value);
  789. }
  790. /**
  791. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  792. *
  793. * @static
  794. * @memberOf _
  795. * @since 3.0.0
  796. * @category String
  797. * @param {string} [string=''] The string to convert.
  798. * @returns {string} Returns the camel cased string.
  799. * @example
  800. *
  801. * _.camelCase('Foo Bar');
  802. * // => 'fooBar'
  803. *
  804. * _.camelCase('--foo-bar--');
  805. * // => 'fooBar'
  806. *
  807. * _.camelCase('__FOO_BAR__');
  808. * // => 'fooBar'
  809. */
  810. var camelCase = createCompounder(function(result, word, index) {
  811. word = word.toLowerCase();
  812. return result + (index ? capitalize(word) : word);
  813. });
  814. /**
  815. * Converts the first character of `string` to upper case and the remaining
  816. * to lower case.
  817. *
  818. * @static
  819. * @memberOf _
  820. * @since 3.0.0
  821. * @category String
  822. * @param {string} [string=''] The string to capitalize.
  823. * @returns {string} Returns the capitalized string.
  824. * @example
  825. *
  826. * _.capitalize('FRED');
  827. * // => 'Fred'
  828. */
  829. function capitalize(string) {
  830. return upperFirst(toString(string).toLowerCase());
  831. }
  832. /**
  833. * Deburrs `string` by converting
  834. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  835. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  836. * letters to basic Latin letters and removing
  837. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  838. *
  839. * @static
  840. * @memberOf _
  841. * @since 3.0.0
  842. * @category String
  843. * @param {string} [string=''] The string to deburr.
  844. * @returns {string} Returns the deburred string.
  845. * @example
  846. *
  847. * _.deburr('déjà vu');
  848. * // => 'deja vu'
  849. */
  850. function deburr(string) {
  851. string = toString(string);
  852. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
  853. }
  854. /**
  855. * Converts the first character of `string` to upper case.
  856. *
  857. * @static
  858. * @memberOf _
  859. * @since 4.0.0
  860. * @category String
  861. * @param {string} [string=''] The string to convert.
  862. * @returns {string} Returns the converted string.
  863. * @example
  864. *
  865. * _.upperFirst('fred');
  866. * // => 'Fred'
  867. *
  868. * _.upperFirst('FRED');
  869. * // => 'FRED'
  870. */
  871. var upperFirst = createCaseFirst("toUpperCase");
  872. /**
  873. * Splits `string` into an array of its words.
  874. *
  875. * @static
  876. * @memberOf _
  877. * @since 3.0.0
  878. * @category String
  879. * @param {string} [string=''] The string to inspect.
  880. * @param {RegExp|string} [pattern] The pattern to match words.
  881. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  882. * @returns {Array} Returns the words of `string`.
  883. * @example
  884. *
  885. * _.words('fred, barney, & pebbles');
  886. * // => ['fred', 'barney', 'pebbles']
  887. *
  888. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  889. * // => ['fred', 'barney', '&', 'pebbles']
  890. */
  891. function words(string, pattern, guard) {
  892. string = toString(string);
  893. pattern = guard ? void 0 : pattern;
  894. if (pattern === void 0) return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  895. return string.match(pattern) || [];
  896. }
  897. module.exports = camelCase;
  898. }));
  899. //#endregion
  900. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/localsConvention.js
  901. var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
  902. Object.defineProperty(exports, "__esModule", { value: true });
  903. exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
  904. var _lodash = _interopRequireDefault(require_lodash_camelcase());
  905. function _interopRequireDefault(obj) {
  906. return obj && obj.__esModule ? obj : { default: obj };
  907. }
  908. function dashesCamelCase(string) {
  909. return string.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase());
  910. }
  911. function makeLocalsConventionReducer(localsConvention, inputFile) {
  912. const isFunc = typeof localsConvention === "function";
  913. return (tokens, [className, value]) => {
  914. if (isFunc) {
  915. const convention = localsConvention(className, value, inputFile);
  916. tokens[convention] = value;
  917. return tokens;
  918. }
  919. switch (localsConvention) {
  920. case "camelCase":
  921. tokens[className] = value;
  922. tokens[(0, _lodash.default)(className)] = value;
  923. break;
  924. case "camelCaseOnly":
  925. tokens[(0, _lodash.default)(className)] = value;
  926. break;
  927. case "dashes":
  928. tokens[className] = value;
  929. tokens[dashesCamelCase(className)] = value;
  930. break;
  931. case "dashesOnly":
  932. tokens[dashesCamelCase(className)] = value;
  933. break;
  934. }
  935. return tokens;
  936. };
  937. }
  938. }));
  939. //#endregion
  940. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/FileSystemLoader.js
  941. var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
  942. Object.defineProperty(exports, "__esModule", { value: true });
  943. exports.default = void 0;
  944. var _postcss$1 = _interopRequireDefault(__require("postcss"));
  945. var _path = _interopRequireDefault(__require("path"));
  946. var _Parser = _interopRequireDefault(require_Parser());
  947. var _fs = require_fs();
  948. function _interopRequireDefault(obj) {
  949. return obj && obj.__esModule ? obj : { default: obj };
  950. }
  951. var Core = class Core {
  952. constructor(plugins) {
  953. this.plugins = plugins || Core.defaultPlugins;
  954. }
  955. async load(sourceString, sourcePath, trace, pathFetcher) {
  956. const parser = new _Parser.default(pathFetcher, trace);
  957. const plugins = this.plugins.concat([parser.plugin()]);
  958. return {
  959. injectableSource: (await (0, _postcss$1.default)(plugins).process(sourceString, { from: sourcePath })).css,
  960. exportTokens: parser.exportTokens
  961. };
  962. }
  963. };
  964. const traceKeySorter = (a, b) => {
  965. if (a.length < b.length) return a < b.substring(0, a.length) ? -1 : 1;
  966. if (a.length > b.length) return a.substring(0, b.length) <= b ? -1 : 1;
  967. return a < b ? -1 : 1;
  968. };
  969. var FileSystemLoader = class {
  970. constructor(root, plugins, fileResolve) {
  971. if (root === "/" && process.platform === "win32") {
  972. const cwdDrive = process.cwd().slice(0, 3);
  973. if (!/^[A-Za-z]:\\$/.test(cwdDrive)) throw new Error(`Failed to obtain root from "${process.cwd()}".`);
  974. root = cwdDrive;
  975. }
  976. this.root = root;
  977. this.fileResolve = fileResolve;
  978. this.sources = {};
  979. this.traces = {};
  980. this.importNr = 0;
  981. this.core = new Core(plugins);
  982. this.tokensByFile = {};
  983. this.fs = (0, _fs.getFileSystem)();
  984. }
  985. async fetch(_newPath, relativeTo, _trace) {
  986. const newPath = _newPath.replace(/^["']|["']$/g, "");
  987. const trace = _trace || String.fromCharCode(this.importNr++);
  988. const useFileResolve = typeof this.fileResolve === "function";
  989. const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve();
  990. if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) throw new Error("The returned path from the \"fileResolve\" option must be absolute.");
  991. const relativeDir = _path.default.dirname(relativeTo);
  992. const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath);
  993. let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath);
  994. if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) try {
  995. fileRelativePath = __require.resolve(newPath);
  996. } catch (e) {}
  997. const tokens = this.tokensByFile[fileRelativePath];
  998. if (tokens) return tokens;
  999. return new Promise((resolve, reject) => {
  1000. this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => {
  1001. if (err) reject(err);
  1002. const { injectableSource, exportTokens } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this));
  1003. this.sources[fileRelativePath] = injectableSource;
  1004. this.traces[trace] = fileRelativePath;
  1005. this.tokensByFile[fileRelativePath] = exportTokens;
  1006. resolve(exportTokens);
  1007. });
  1008. });
  1009. }
  1010. get finalSource() {
  1011. const traces = this.traces;
  1012. const sources = this.sources;
  1013. let written = /* @__PURE__ */ new Set();
  1014. return Object.keys(traces).sort(traceKeySorter).map((key) => {
  1015. const filename = traces[key];
  1016. if (written.has(filename)) return null;
  1017. written.add(filename);
  1018. return sources[filename];
  1019. }).join("");
  1020. }
  1021. };
  1022. exports.default = FileSystemLoader;
  1023. }));
  1024. //#endregion
  1025. //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.8/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
  1026. var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1027. const PERMANENT_MARKER = 2;
  1028. const TEMPORARY_MARKER = 1;
  1029. function createError(node, graph) {
  1030. const er = /* @__PURE__ */ new Error("Nondeterministic import's order");
  1031. er.nodes = [node, graph[node].find((relatedNode) => graph[relatedNode].indexOf(node) > -1)];
  1032. return er;
  1033. }
  1034. function walkGraph(node, graph, state, result, strict) {
  1035. if (state[node] === PERMANENT_MARKER) return;
  1036. if (state[node] === TEMPORARY_MARKER) {
  1037. if (strict) return createError(node, graph);
  1038. return;
  1039. }
  1040. state[node] = TEMPORARY_MARKER;
  1041. const children = graph[node];
  1042. const length = children.length;
  1043. for (let i = 0; i < length; ++i) {
  1044. const error = walkGraph(children[i], graph, state, result, strict);
  1045. if (error instanceof Error) return error;
  1046. }
  1047. state[node] = PERMANENT_MARKER;
  1048. result.push(node);
  1049. }
  1050. function topologicalSort(graph, strict) {
  1051. const result = [];
  1052. const state = {};
  1053. const nodes = Object.keys(graph);
  1054. const length = nodes.length;
  1055. for (let i = 0; i < length; ++i) {
  1056. const er = walkGraph(nodes[i], graph, state, result, strict);
  1057. if (er instanceof Error) return er;
  1058. }
  1059. return result;
  1060. }
  1061. module.exports = topologicalSort;
  1062. }));
  1063. //#endregion
  1064. //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.8/node_modules/postcss-modules-extract-imports/src/index.js
  1065. var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1066. const topologicalSort = require_topologicalSort();
  1067. const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
  1068. const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/;
  1069. const VISITED_MARKER = 1;
  1070. /**
  1071. * :import('G') {}
  1072. *
  1073. * Rule
  1074. * composes: ... from 'A'
  1075. * composes: ... from 'B'
  1076. * Rule
  1077. * composes: ... from 'A'
  1078. * composes: ... from 'A'
  1079. * composes: ... from 'C'
  1080. *
  1081. * Results in:
  1082. *
  1083. * graph: {
  1084. * G: [],
  1085. * A: [],
  1086. * B: ['A'],
  1087. * C: ['A'],
  1088. * }
  1089. */
  1090. function addImportToGraph(importId, parentId, graph, visited) {
  1091. const siblingsId = parentId + "_siblings";
  1092. const visitedId = parentId + "_" + importId;
  1093. if (visited[visitedId] !== VISITED_MARKER) {
  1094. if (!Array.isArray(visited[siblingsId])) visited[siblingsId] = [];
  1095. const siblings = visited[siblingsId];
  1096. if (Array.isArray(graph[importId])) graph[importId] = graph[importId].concat(siblings);
  1097. else graph[importId] = siblings.slice();
  1098. visited[visitedId] = VISITED_MARKER;
  1099. siblings.push(importId);
  1100. }
  1101. }
  1102. module.exports = (options = {}) => {
  1103. let importIndex = 0;
  1104. const createImportedName = typeof options.createImportedName !== "function" ? (importName) => `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` : options.createImportedName;
  1105. const failOnWrongOrder = options.failOnWrongOrder;
  1106. return {
  1107. postcssPlugin: "postcss-modules-extract-imports",
  1108. prepare() {
  1109. const graph = {};
  1110. const visited = {};
  1111. const existingImports = {};
  1112. const importDecls = {};
  1113. const imports = {};
  1114. return { Once(root, postcss) {
  1115. root.walkRules((rule) => {
  1116. const matches = icssImport.exec(rule.selector);
  1117. if (matches) {
  1118. const [, doubleQuotePath, singleQuotePath] = matches;
  1119. const importPath = doubleQuotePath || singleQuotePath;
  1120. addImportToGraph(importPath, "root", graph, visited);
  1121. existingImports[importPath] = rule;
  1122. }
  1123. });
  1124. root.walkDecls(/^composes$/, (declaration) => {
  1125. const multiple = declaration.value.split(",");
  1126. const values = [];
  1127. multiple.forEach((value) => {
  1128. const matches = value.trim().match(matchImports);
  1129. if (!matches) {
  1130. values.push(value);
  1131. return;
  1132. }
  1133. let tmpSymbols;
  1134. let [, symbols, doubleQuotePath, singleQuotePath, global] = matches;
  1135. if (global) tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`);
  1136. else {
  1137. const importPath = doubleQuotePath || singleQuotePath;
  1138. let parent = declaration.parent;
  1139. let parentIndexes = "";
  1140. while (parent.type !== "root") {
  1141. parentIndexes = parent.parent.index(parent) + "_" + parentIndexes;
  1142. parent = parent.parent;
  1143. }
  1144. const { selector } = declaration.parent;
  1145. addImportToGraph(importPath, `_${parentIndexes}${selector}`, graph, visited);
  1146. importDecls[importPath] = declaration;
  1147. imports[importPath] = imports[importPath] || {};
  1148. tmpSymbols = symbols.split(/\s+/).map((s) => {
  1149. if (!imports[importPath][s]) imports[importPath][s] = createImportedName(s, importPath);
  1150. return imports[importPath][s];
  1151. });
  1152. }
  1153. values.push(tmpSymbols.join(" "));
  1154. });
  1155. declaration.value = values.join(", ");
  1156. });
  1157. const importsOrder = topologicalSort(graph, failOnWrongOrder);
  1158. if (importsOrder instanceof Error) throw importDecls[importsOrder.nodes.find((importPath) => importDecls.hasOwnProperty(importPath))].error("Failed to resolve order of composed modules " + importsOrder.nodes.map((importPath) => "`" + importPath + "`").join(", ") + ".", {
  1159. plugin: "postcss-modules-extract-imports",
  1160. word: "composes"
  1161. });
  1162. let lastImportRule;
  1163. importsOrder.forEach((path) => {
  1164. const importedSymbols = imports[path];
  1165. let rule = existingImports[path];
  1166. if (!rule && importedSymbols) {
  1167. rule = postcss.rule({
  1168. selector: `:import("${path}")`,
  1169. raws: { after: "\n" }
  1170. });
  1171. if (lastImportRule) root.insertAfter(lastImportRule, rule);
  1172. else root.prepend(rule);
  1173. }
  1174. lastImportRule = rule;
  1175. if (!importedSymbols) return;
  1176. Object.keys(importedSymbols).forEach((importedSymbol) => {
  1177. rule.append(postcss.decl({
  1178. value: importedSymbol,
  1179. prop: importedSymbols[importedSymbol],
  1180. raws: { before: "\n " }
  1181. }));
  1182. });
  1183. });
  1184. } };
  1185. }
  1186. };
  1187. };
  1188. module.exports.postcss = true;
  1189. }));
  1190. //#endregion
  1191. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/wasm-hash.js
  1192. var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1193. const MAX_SHORT_STRING = Math.floor(65472 / 4) & -4;
  1194. var WasmHash = class {
  1195. /**
  1196. * @param {WebAssembly.Instance} instance wasm instance
  1197. * @param {WebAssembly.Instance[]} instancesPool pool of instances
  1198. * @param {number} chunkSize size of data chunks passed to wasm
  1199. * @param {number} digestSize size of digest returned by wasm
  1200. */
  1201. constructor(instance, instancesPool, chunkSize, digestSize) {
  1202. const exports$2 = instance.exports;
  1203. exports$2.init();
  1204. this.exports = exports$2;
  1205. this.mem = Buffer.from(exports$2.memory.buffer, 0, 65536);
  1206. this.buffered = 0;
  1207. this.instancesPool = instancesPool;
  1208. this.chunkSize = chunkSize;
  1209. this.digestSize = digestSize;
  1210. }
  1211. reset() {
  1212. this.buffered = 0;
  1213. this.exports.init();
  1214. }
  1215. /**
  1216. * @param {Buffer | string} data data
  1217. * @param {BufferEncoding=} encoding encoding
  1218. * @returns {this} itself
  1219. */
  1220. update(data, encoding) {
  1221. if (typeof data === "string") {
  1222. while (data.length > MAX_SHORT_STRING) {
  1223. this._updateWithShortString(data.slice(0, MAX_SHORT_STRING), encoding);
  1224. data = data.slice(MAX_SHORT_STRING);
  1225. }
  1226. this._updateWithShortString(data, encoding);
  1227. return this;
  1228. }
  1229. this._updateWithBuffer(data);
  1230. return this;
  1231. }
  1232. /**
  1233. * @param {string} data data
  1234. * @param {BufferEncoding=} encoding encoding
  1235. * @returns {void}
  1236. */
  1237. _updateWithShortString(data, encoding) {
  1238. const { exports: exports$3, buffered, mem, chunkSize } = this;
  1239. let endPos;
  1240. if (data.length < 70) if (!encoding || encoding === "utf-8" || encoding === "utf8") {
  1241. endPos = buffered;
  1242. for (let i = 0; i < data.length; i++) {
  1243. const cc = data.charCodeAt(i);
  1244. if (cc < 128) mem[endPos++] = cc;
  1245. else if (cc < 2048) {
  1246. mem[endPos] = cc >> 6 | 192;
  1247. mem[endPos + 1] = cc & 63 | 128;
  1248. endPos += 2;
  1249. } else {
  1250. endPos += mem.write(data.slice(i), endPos, encoding);
  1251. break;
  1252. }
  1253. }
  1254. } else if (encoding === "latin1") {
  1255. endPos = buffered;
  1256. for (let i = 0; i < data.length; i++) {
  1257. const cc = data.charCodeAt(i);
  1258. mem[endPos++] = cc;
  1259. }
  1260. } else endPos = buffered + mem.write(data, buffered, encoding);
  1261. else endPos = buffered + mem.write(data, buffered, encoding);
  1262. if (endPos < chunkSize) this.buffered = endPos;
  1263. else {
  1264. const l = endPos & ~(this.chunkSize - 1);
  1265. exports$3.update(l);
  1266. const newBuffered = endPos - l;
  1267. this.buffered = newBuffered;
  1268. if (newBuffered > 0) mem.copyWithin(0, l, endPos);
  1269. }
  1270. }
  1271. /**
  1272. * @param {Buffer} data data
  1273. * @returns {void}
  1274. */
  1275. _updateWithBuffer(data) {
  1276. const { exports: exports$4, buffered, mem } = this;
  1277. const length = data.length;
  1278. if (buffered + length < this.chunkSize) {
  1279. data.copy(mem, buffered, 0, length);
  1280. this.buffered += length;
  1281. } else {
  1282. const l = buffered + length & ~(this.chunkSize - 1);
  1283. if (l > 65536) {
  1284. let i = 65536 - buffered;
  1285. data.copy(mem, buffered, 0, i);
  1286. exports$4.update(65536);
  1287. const stop = l - buffered - 65536;
  1288. while (i < stop) {
  1289. data.copy(mem, 0, i, i + 65536);
  1290. exports$4.update(65536);
  1291. i += 65536;
  1292. }
  1293. data.copy(mem, 0, i, l - buffered);
  1294. exports$4.update(l - buffered - i);
  1295. } else {
  1296. data.copy(mem, buffered, 0, l - buffered);
  1297. exports$4.update(l);
  1298. }
  1299. const newBuffered = length + buffered - l;
  1300. this.buffered = newBuffered;
  1301. if (newBuffered > 0) data.copy(mem, 0, length - newBuffered, length);
  1302. }
  1303. }
  1304. digest(type) {
  1305. const { exports: exports$5, buffered, mem, digestSize } = this;
  1306. exports$5.final(buffered);
  1307. this.instancesPool.push(this);
  1308. const hex = mem.toString("latin1", 0, digestSize);
  1309. if (type === "hex") return hex;
  1310. if (type === "binary" || !type) return Buffer.from(hex, "hex");
  1311. return Buffer.from(hex, "hex").toString(type);
  1312. }
  1313. };
  1314. const create = (wasmModule, instancesPool, chunkSize, digestSize) => {
  1315. if (instancesPool.length > 0) {
  1316. const old = instancesPool.pop();
  1317. old.reset();
  1318. return old;
  1319. } else return new WasmHash(new WebAssembly.Instance(wasmModule), instancesPool, chunkSize, digestSize);
  1320. };
  1321. module.exports = create;
  1322. module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING;
  1323. }));
  1324. //#endregion
  1325. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/xxhash64.js
  1326. var require_xxhash64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1327. const create = require_wasm_hash();
  1328. const xxhash64 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", "base64"));
  1329. module.exports = create.bind(null, xxhash64, [], 32, 16);
  1330. }));
  1331. //#endregion
  1332. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BatchedHash.js
  1333. var require_BatchedHash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1334. const MAX_SHORT_STRING = require_wasm_hash().MAX_SHORT_STRING;
  1335. var BatchedHash = class {
  1336. constructor(hash) {
  1337. this.string = void 0;
  1338. this.encoding = void 0;
  1339. this.hash = hash;
  1340. }
  1341. /**
  1342. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  1343. * @param {string|Buffer} data data
  1344. * @param {string=} inputEncoding data encoding
  1345. * @returns {this} updated hash
  1346. */
  1347. update(data, inputEncoding) {
  1348. if (this.string !== void 0) {
  1349. if (typeof data === "string" && inputEncoding === this.encoding && this.string.length + data.length < MAX_SHORT_STRING) {
  1350. this.string += data;
  1351. return this;
  1352. }
  1353. this.hash.update(this.string, this.encoding);
  1354. this.string = void 0;
  1355. }
  1356. if (typeof data === "string") if (data.length < MAX_SHORT_STRING && (!inputEncoding || !inputEncoding.startsWith("ba"))) {
  1357. this.string = data;
  1358. this.encoding = inputEncoding;
  1359. } else this.hash.update(data, inputEncoding);
  1360. else this.hash.update(data);
  1361. return this;
  1362. }
  1363. /**
  1364. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  1365. * @param {string=} encoding encoding of the return value
  1366. * @returns {string|Buffer} digest
  1367. */
  1368. digest(encoding) {
  1369. if (this.string !== void 0) this.hash.update(this.string, this.encoding);
  1370. return this.hash.digest(encoding);
  1371. }
  1372. };
  1373. module.exports = BatchedHash;
  1374. }));
  1375. //#endregion
  1376. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/md4.js
  1377. var require_md4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1378. const create = require_wasm_hash();
  1379. const md4 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGakEPd2ohBiADIAdqIQcgBCAIaiEIIAVBQGshBQwBCwsgCiQBIAYkAiAHJAMgCCQECw0AIAAQASMAIABqJAAL/wQCA38BfiMAIABqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", "base64"));
  1380. module.exports = create.bind(null, md4, [], 64, 32);
  1381. }));
  1382. //#endregion
  1383. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BulkUpdateDecorator.js
  1384. var require_BulkUpdateDecorator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1385. const BULK_SIZE = 2e3;
  1386. const digestCaches = {};
  1387. var BulkUpdateDecorator = class {
  1388. /**
  1389. * @param {Hash | function(): Hash} hashOrFactory function to create a hash
  1390. * @param {string=} hashKey key for caching
  1391. */
  1392. constructor(hashOrFactory, hashKey) {
  1393. this.hashKey = hashKey;
  1394. if (typeof hashOrFactory === "function") {
  1395. this.hashFactory = hashOrFactory;
  1396. this.hash = void 0;
  1397. } else {
  1398. this.hashFactory = void 0;
  1399. this.hash = hashOrFactory;
  1400. }
  1401. this.buffer = "";
  1402. }
  1403. /**
  1404. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  1405. * @param {string|Buffer} data data
  1406. * @param {string=} inputEncoding data encoding
  1407. * @returns {this} updated hash
  1408. */
  1409. update(data, inputEncoding) {
  1410. if (inputEncoding !== void 0 || typeof data !== "string" || data.length > BULK_SIZE) {
  1411. if (this.hash === void 0) this.hash = this.hashFactory();
  1412. if (this.buffer.length > 0) {
  1413. this.hash.update(this.buffer);
  1414. this.buffer = "";
  1415. }
  1416. this.hash.update(data, inputEncoding);
  1417. } else {
  1418. this.buffer += data;
  1419. if (this.buffer.length > BULK_SIZE) {
  1420. if (this.hash === void 0) this.hash = this.hashFactory();
  1421. this.hash.update(this.buffer);
  1422. this.buffer = "";
  1423. }
  1424. }
  1425. return this;
  1426. }
  1427. /**
  1428. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  1429. * @param {string=} encoding encoding of the return value
  1430. * @returns {string|Buffer} digest
  1431. */
  1432. digest(encoding) {
  1433. let digestCache;
  1434. const buffer = this.buffer;
  1435. if (this.hash === void 0) {
  1436. const cacheKey = `${this.hashKey}-${encoding}`;
  1437. digestCache = digestCaches[cacheKey];
  1438. if (digestCache === void 0) digestCache = digestCaches[cacheKey] = /* @__PURE__ */ new Map();
  1439. const cacheEntry = digestCache.get(buffer);
  1440. if (cacheEntry !== void 0) return cacheEntry;
  1441. this.hash = this.hashFactory();
  1442. }
  1443. if (buffer.length > 0) this.hash.update(buffer);
  1444. const digestResult = this.hash.digest(encoding);
  1445. if (digestCache !== void 0) digestCache.set(buffer, digestResult);
  1446. return digestResult;
  1447. }
  1448. };
  1449. module.exports = BulkUpdateDecorator;
  1450. }));
  1451. //#endregion
  1452. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/getHashDigest.js
  1453. var require_getHashDigest = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1454. const baseEncodeTables = {
  1455. 26: "abcdefghijklmnopqrstuvwxyz",
  1456. 32: "123456789abcdefghjkmnpqrstuvwxyz",
  1457. 36: "0123456789abcdefghijklmnopqrstuvwxyz",
  1458. 49: "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
  1459. 52: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
  1460. 58: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
  1461. 62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
  1462. 64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"
  1463. };
  1464. /**
  1465. * @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian
  1466. * @param {number} divisor The divisor
  1467. * @return {number} Modulo (remainder) of the division
  1468. */
  1469. function divmod32(uint32Array, divisor) {
  1470. let carry = 0;
  1471. for (let i = uint32Array.length - 1; i >= 0; i--) {
  1472. const value = carry * 4294967296 + uint32Array[i];
  1473. carry = value % divisor;
  1474. uint32Array[i] = Math.floor(value / divisor);
  1475. }
  1476. return carry;
  1477. }
  1478. function encodeBufferToBase(buffer, base, length) {
  1479. const encodeTable = baseEncodeTables[base];
  1480. if (!encodeTable) throw new Error("Unknown encoding base" + base);
  1481. const limit = Math.ceil(buffer.length * 8 / Math.log2(base));
  1482. length = Math.min(length, limit);
  1483. const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4));
  1484. buffer.copy(Buffer.from(uint32Array.buffer));
  1485. let output = "";
  1486. for (let i = 0; i < length; i++) output = encodeTable[divmod32(uint32Array, base)] + output;
  1487. return output;
  1488. }
  1489. let crypto = void 0;
  1490. let createXXHash64 = void 0;
  1491. let createMd4 = void 0;
  1492. let BatchedHash = void 0;
  1493. let BulkUpdateDecorator = void 0;
  1494. function getHashDigest(buffer, algorithm, digestType, maxLength) {
  1495. algorithm = algorithm || "xxhash64";
  1496. maxLength = maxLength || 9999;
  1497. let hash;
  1498. if (algorithm === "xxhash64") {
  1499. if (createXXHash64 === void 0) {
  1500. createXXHash64 = require_xxhash64();
  1501. if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
  1502. }
  1503. hash = new BatchedHash(createXXHash64());
  1504. } else if (algorithm === "md4") {
  1505. if (createMd4 === void 0) {
  1506. createMd4 = require_md4();
  1507. if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
  1508. }
  1509. hash = new BatchedHash(createMd4());
  1510. } else if (algorithm === "native-md4") {
  1511. if (typeof crypto === "undefined") {
  1512. crypto = __require("crypto");
  1513. if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
  1514. }
  1515. hash = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4");
  1516. } else {
  1517. if (typeof crypto === "undefined") {
  1518. crypto = __require("crypto");
  1519. if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
  1520. }
  1521. hash = new BulkUpdateDecorator(() => crypto.createHash(algorithm), algorithm);
  1522. }
  1523. hash.update(buffer);
  1524. if (digestType === "base26" || digestType === "base32" || digestType === "base36" || digestType === "base49" || digestType === "base52" || digestType === "base58" || digestType === "base62" || digestType === "base64safe") return encodeBufferToBase(hash.digest(), digestType === "base64safe" ? 64 : digestType.substr(4), maxLength);
  1525. return hash.digest(digestType || "hex").substr(0, maxLength);
  1526. }
  1527. module.exports = getHashDigest;
  1528. }));
  1529. //#endregion
  1530. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/interpolateName.js
  1531. var require_interpolateName = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1532. const path$1 = __require("path");
  1533. const getHashDigest = require_getHashDigest();
  1534. function interpolateName(loaderContext, name, options = {}) {
  1535. let filename;
  1536. const hasQuery = loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1;
  1537. if (typeof name === "function") filename = name(loaderContext.resourcePath, hasQuery ? loaderContext.resourceQuery : void 0);
  1538. else filename = name || "[hash].[ext]";
  1539. const context = options.context;
  1540. const content = options.content;
  1541. const regExp = options.regExp;
  1542. let ext = "bin";
  1543. let basename = "file";
  1544. let directory = "";
  1545. let folder = "";
  1546. let query = "";
  1547. if (loaderContext.resourcePath) {
  1548. const parsed = path$1.parse(loaderContext.resourcePath);
  1549. let resourcePath = loaderContext.resourcePath;
  1550. if (parsed.ext) ext = parsed.ext.substr(1);
  1551. if (parsed.dir) {
  1552. basename = parsed.name;
  1553. resourcePath = parsed.dir + path$1.sep;
  1554. }
  1555. if (typeof context !== "undefined") {
  1556. directory = path$1.relative(context, resourcePath + "_").replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1");
  1557. directory = directory.substr(0, directory.length - 1);
  1558. } else directory = resourcePath.replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1");
  1559. if (directory.length <= 1) directory = "";
  1560. else folder = path$1.basename(directory);
  1561. }
  1562. if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) {
  1563. query = loaderContext.resourceQuery;
  1564. const hashIdx = query.indexOf("#");
  1565. if (hashIdx >= 0) query = query.substr(0, hashIdx);
  1566. }
  1567. let url = filename;
  1568. if (content) url = url.replace(/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi, (all, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
  1569. url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
  1570. if (regExp && loaderContext.resourcePath) {
  1571. const match = loaderContext.resourcePath.match(new RegExp(regExp));
  1572. match && match.forEach((matched, i) => {
  1573. url = url.replace(new RegExp("\\[" + i + "\\]", "ig"), matched);
  1574. });
  1575. }
  1576. if (typeof loaderContext.options === "object" && typeof loaderContext.options.customInterpolateName === "function") url = loaderContext.options.customInterpolateName.call(loaderContext, url, name, options);
  1577. return url;
  1578. }
  1579. module.exports = interpolateName;
  1580. }));
  1581. //#endregion
  1582. //#region ../../node_modules/.pnpm/generic-names@4.0.0/node_modules/generic-names/index.js
  1583. var require_generic_names = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1584. var interpolateName = require_interpolateName();
  1585. var path = __require("path");
  1586. /**
  1587. * @param {string} pattern
  1588. * @param {object} options
  1589. * @param {string} options.context
  1590. * @param {string} options.hashPrefix
  1591. * @return {function}
  1592. */
  1593. module.exports = function createGenerator(pattern, options) {
  1594. options = options || {};
  1595. var context = options && typeof options.context === "string" ? options.context : process.cwd();
  1596. var hashPrefix = options && typeof options.hashPrefix === "string" ? options.hashPrefix : "";
  1597. /**
  1598. * @param {string} localName Usually a class name
  1599. * @param {string} filepath Absolute path
  1600. * @return {string}
  1601. */
  1602. return function generate(localName, filepath) {
  1603. var name = pattern.replace(/\[local\]/gi, localName);
  1604. return interpolateName({ resourcePath: filepath }, name, {
  1605. content: hashPrefix + path.relative(context, filepath).replace(/\\/g, "/") + "\0" + localName,
  1606. context
  1607. }).replace(/* @__PURE__ */ new RegExp("[^a-zA-Z0-9\\-_\xA0-￿]", "g"), "-").replace(/^((-?[0-9])|--)/, "_$1");
  1608. };
  1609. };
  1610. }));
  1611. //#endregion
  1612. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/unesc.js
  1613. var require_unesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1614. exports.__esModule = true;
  1615. exports["default"] = unesc;
  1616. /**
  1617. *
  1618. * @param {string} str
  1619. * @returns {[string, number]|undefined}
  1620. */
  1621. function gobbleHex(str) {
  1622. var lower = str.toLowerCase();
  1623. var hex = "";
  1624. var spaceTerminated = false;
  1625. for (var i = 0; i < 6 && lower[i] !== void 0; i++) {
  1626. var code = lower.charCodeAt(i);
  1627. var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
  1628. spaceTerminated = code === 32;
  1629. if (!valid) break;
  1630. hex += lower[i];
  1631. }
  1632. if (hex.length === 0) return;
  1633. var codePoint = parseInt(hex, 16);
  1634. if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", hex.length + (spaceTerminated ? 1 : 0)];
  1635. return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
  1636. }
  1637. var CONTAINS_ESCAPE = /\\/;
  1638. function unesc(str) {
  1639. if (!CONTAINS_ESCAPE.test(str)) return str;
  1640. var ret = "";
  1641. for (var i = 0; i < str.length; i++) {
  1642. if (str[i] === "\\") {
  1643. var gobbled = gobbleHex(str.slice(i + 1, i + 7));
  1644. if (gobbled !== void 0) {
  1645. ret += gobbled[0];
  1646. i += gobbled[1];
  1647. continue;
  1648. }
  1649. if (str[i + 1] === "\\") {
  1650. ret += "\\";
  1651. i++;
  1652. continue;
  1653. }
  1654. if (str.length === i + 1) ret += str[i];
  1655. continue;
  1656. }
  1657. ret += str[i];
  1658. }
  1659. return ret;
  1660. }
  1661. module.exports = exports.default;
  1662. }));
  1663. //#endregion
  1664. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/getProp.js
  1665. var require_getProp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1666. exports.__esModule = true;
  1667. exports["default"] = getProp;
  1668. function getProp(obj) {
  1669. for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
  1670. while (props.length > 0) {
  1671. var prop = props.shift();
  1672. if (!obj[prop]) return;
  1673. obj = obj[prop];
  1674. }
  1675. return obj;
  1676. }
  1677. module.exports = exports.default;
  1678. }));
  1679. //#endregion
  1680. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/ensureObject.js
  1681. var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1682. exports.__esModule = true;
  1683. exports["default"] = ensureObject;
  1684. function ensureObject(obj) {
  1685. for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
  1686. while (props.length > 0) {
  1687. var prop = props.shift();
  1688. if (!obj[prop]) obj[prop] = {};
  1689. obj = obj[prop];
  1690. }
  1691. }
  1692. module.exports = exports.default;
  1693. }));
  1694. //#endregion
  1695. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/stripComments.js
  1696. var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1697. exports.__esModule = true;
  1698. exports["default"] = stripComments;
  1699. function stripComments(str) {
  1700. var s = "";
  1701. var commentStart = str.indexOf("/*");
  1702. var lastEnd = 0;
  1703. while (commentStart >= 0) {
  1704. s = s + str.slice(lastEnd, commentStart);
  1705. var commentEnd = str.indexOf("*/", commentStart + 2);
  1706. if (commentEnd < 0) return s;
  1707. lastEnd = commentEnd + 2;
  1708. commentStart = str.indexOf("/*", lastEnd);
  1709. }
  1710. s = s + str.slice(lastEnd);
  1711. return s;
  1712. }
  1713. module.exports = exports.default;
  1714. }));
  1715. //#endregion
  1716. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/index.js
  1717. var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
  1718. exports.__esModule = true;
  1719. exports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0;
  1720. exports.unesc = _interopRequireDefault(require_unesc())["default"];
  1721. exports.getProp = _interopRequireDefault(require_getProp())["default"];
  1722. exports.ensureObject = _interopRequireDefault(require_ensureObject())["default"];
  1723. exports.stripComments = _interopRequireDefault(require_stripComments())["default"];
  1724. function _interopRequireDefault(obj) {
  1725. return obj && obj.__esModule ? obj : { "default": obj };
  1726. }
  1727. }));
  1728. //#endregion
  1729. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/node.js
  1730. var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1731. exports.__esModule = true;
  1732. exports["default"] = void 0;
  1733. var _util = require_util();
  1734. function _defineProperties(target, props) {
  1735. for (var i = 0; i < props.length; i++) {
  1736. var descriptor = props[i];
  1737. descriptor.enumerable = descriptor.enumerable || false;
  1738. descriptor.configurable = true;
  1739. if ("value" in descriptor) descriptor.writable = true;
  1740. Object.defineProperty(target, descriptor.key, descriptor);
  1741. }
  1742. }
  1743. function _createClass(Constructor, protoProps, staticProps) {
  1744. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  1745. if (staticProps) _defineProperties(Constructor, staticProps);
  1746. Object.defineProperty(Constructor, "prototype", { writable: false });
  1747. return Constructor;
  1748. }
  1749. var cloneNode = function cloneNode(obj, parent) {
  1750. if (typeof obj !== "object" || obj === null) return obj;
  1751. var cloned = new obj.constructor();
  1752. for (var i in obj) {
  1753. if (!obj.hasOwnProperty(i)) continue;
  1754. var value = obj[i];
  1755. if (i === "parent" && typeof value === "object") {
  1756. if (parent) cloned[i] = parent;
  1757. } else if (value instanceof Array) cloned[i] = value.map(function(j) {
  1758. return cloneNode(j, cloned);
  1759. });
  1760. else cloned[i] = cloneNode(value, cloned);
  1761. }
  1762. return cloned;
  1763. };
  1764. exports["default"] = /* @__PURE__ */ function() {
  1765. function Node(opts) {
  1766. if (opts === void 0) opts = {};
  1767. Object.assign(this, opts);
  1768. this.spaces = this.spaces || {};
  1769. this.spaces.before = this.spaces.before || "";
  1770. this.spaces.after = this.spaces.after || "";
  1771. }
  1772. var _proto = Node.prototype;
  1773. _proto.remove = function remove() {
  1774. if (this.parent) this.parent.removeChild(this);
  1775. this.parent = void 0;
  1776. return this;
  1777. };
  1778. _proto.replaceWith = function replaceWith() {
  1779. if (this.parent) {
  1780. for (var index in arguments) this.parent.insertBefore(this, arguments[index]);
  1781. this.remove();
  1782. }
  1783. return this;
  1784. };
  1785. _proto.next = function next() {
  1786. return this.parent.at(this.parent.index(this) + 1);
  1787. };
  1788. _proto.prev = function prev() {
  1789. return this.parent.at(this.parent.index(this) - 1);
  1790. };
  1791. _proto.clone = function clone(overrides) {
  1792. if (overrides === void 0) overrides = {};
  1793. var cloned = cloneNode(this);
  1794. for (var name in overrides) cloned[name] = overrides[name];
  1795. return cloned;
  1796. };
  1797. _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
  1798. if (!this.raws) this.raws = {};
  1799. var originalValue = this[name];
  1800. var originalEscaped = this.raws[name];
  1801. this[name] = originalValue + value;
  1802. if (originalEscaped || valueEscaped !== value) this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
  1803. else delete this.raws[name];
  1804. };
  1805. _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
  1806. if (!this.raws) this.raws = {};
  1807. this[name] = value;
  1808. this.raws[name] = valueEscaped;
  1809. };
  1810. _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
  1811. this[name] = value;
  1812. if (this.raws) delete this.raws[name];
  1813. };
  1814. _proto.isAtPosition = function isAtPosition(line, column) {
  1815. if (this.source && this.source.start && this.source.end) {
  1816. if (this.source.start.line > line) return false;
  1817. if (this.source.end.line < line) return false;
  1818. if (this.source.start.line === line && this.source.start.column > column) return false;
  1819. if (this.source.end.line === line && this.source.end.column < column) return false;
  1820. return true;
  1821. }
  1822. };
  1823. _proto.stringifyProperty = function stringifyProperty(name) {
  1824. return this.raws && this.raws[name] || this[name];
  1825. };
  1826. _proto.valueToString = function valueToString() {
  1827. return String(this.stringifyProperty("value"));
  1828. };
  1829. _proto.toString = function toString() {
  1830. return [
  1831. this.rawSpaceBefore,
  1832. this.valueToString(),
  1833. this.rawSpaceAfter
  1834. ].join("");
  1835. };
  1836. _createClass(Node, [{
  1837. key: "rawSpaceBefore",
  1838. get: function get() {
  1839. var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
  1840. if (rawSpace === void 0) rawSpace = this.spaces && this.spaces.before;
  1841. return rawSpace || "";
  1842. },
  1843. set: function set(raw) {
  1844. (0, _util.ensureObject)(this, "raws", "spaces");
  1845. this.raws.spaces.before = raw;
  1846. }
  1847. }, {
  1848. key: "rawSpaceAfter",
  1849. get: function get() {
  1850. var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
  1851. if (rawSpace === void 0) rawSpace = this.spaces.after;
  1852. return rawSpace || "";
  1853. },
  1854. set: function set(raw) {
  1855. (0, _util.ensureObject)(this, "raws", "spaces");
  1856. this.raws.spaces.after = raw;
  1857. }
  1858. }]);
  1859. return Node;
  1860. }();
  1861. module.exports = exports.default;
  1862. }));
  1863. //#endregion
  1864. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/types.js
  1865. var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
  1866. exports.__esModule = true;
  1867. exports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0;
  1868. exports.TAG = "tag";
  1869. exports.STRING = "string";
  1870. exports.SELECTOR = "selector";
  1871. exports.ROOT = "root";
  1872. exports.PSEUDO = "pseudo";
  1873. exports.NESTING = "nesting";
  1874. exports.ID = "id";
  1875. exports.COMMENT = "comment";
  1876. exports.COMBINATOR = "combinator";
  1877. exports.CLASS = "class";
  1878. exports.ATTRIBUTE = "attribute";
  1879. exports.UNIVERSAL = "universal";
  1880. }));
  1881. //#endregion
  1882. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/container.js
  1883. var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1884. exports.__esModule = true;
  1885. exports["default"] = void 0;
  1886. var _node = _interopRequireDefault(require_node$1());
  1887. var types = _interopRequireWildcard(require_types());
  1888. function _getRequireWildcardCache(nodeInterop) {
  1889. if (typeof WeakMap !== "function") return null;
  1890. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  1891. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  1892. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  1893. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  1894. })(nodeInterop);
  1895. }
  1896. function _interopRequireWildcard(obj, nodeInterop) {
  1897. if (!nodeInterop && obj && obj.__esModule) return obj;
  1898. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  1899. var cache = _getRequireWildcardCache(nodeInterop);
  1900. if (cache && cache.has(obj)) return cache.get(obj);
  1901. var newObj = {};
  1902. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  1903. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  1904. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  1905. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  1906. else newObj[key] = obj[key];
  1907. }
  1908. newObj["default"] = obj;
  1909. if (cache) cache.set(obj, newObj);
  1910. return newObj;
  1911. }
  1912. function _interopRequireDefault(obj) {
  1913. return obj && obj.__esModule ? obj : { "default": obj };
  1914. }
  1915. function _createForOfIteratorHelperLoose(o, allowArrayLike) {
  1916. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  1917. if (it) return (it = it.call(o)).next.bind(it);
  1918. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  1919. if (it) o = it;
  1920. var i = 0;
  1921. return function() {
  1922. if (i >= o.length) return { done: true };
  1923. return {
  1924. done: false,
  1925. value: o[i++]
  1926. };
  1927. };
  1928. }
  1929. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  1930. }
  1931. function _unsupportedIterableToArray(o, minLen) {
  1932. if (!o) return;
  1933. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  1934. var n = Object.prototype.toString.call(o).slice(8, -1);
  1935. if (n === "Object" && o.constructor) n = o.constructor.name;
  1936. if (n === "Map" || n === "Set") return Array.from(o);
  1937. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  1938. }
  1939. function _arrayLikeToArray(arr, len) {
  1940. if (len == null || len > arr.length) len = arr.length;
  1941. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  1942. return arr2;
  1943. }
  1944. function _defineProperties(target, props) {
  1945. for (var i = 0; i < props.length; i++) {
  1946. var descriptor = props[i];
  1947. descriptor.enumerable = descriptor.enumerable || false;
  1948. descriptor.configurable = true;
  1949. if ("value" in descriptor) descriptor.writable = true;
  1950. Object.defineProperty(target, descriptor.key, descriptor);
  1951. }
  1952. }
  1953. function _createClass(Constructor, protoProps, staticProps) {
  1954. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  1955. if (staticProps) _defineProperties(Constructor, staticProps);
  1956. Object.defineProperty(Constructor, "prototype", { writable: false });
  1957. return Constructor;
  1958. }
  1959. function _inheritsLoose(subClass, superClass) {
  1960. subClass.prototype = Object.create(superClass.prototype);
  1961. subClass.prototype.constructor = subClass;
  1962. _setPrototypeOf(subClass, superClass);
  1963. }
  1964. function _setPrototypeOf(o, p) {
  1965. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  1966. o.__proto__ = p;
  1967. return o;
  1968. };
  1969. return _setPrototypeOf(o, p);
  1970. }
  1971. exports["default"] = /* @__PURE__ */ function(_Node) {
  1972. _inheritsLoose(Container, _Node);
  1973. function Container(opts) {
  1974. var _this = _Node.call(this, opts) || this;
  1975. if (!_this.nodes) _this.nodes = [];
  1976. return _this;
  1977. }
  1978. var _proto = Container.prototype;
  1979. _proto.append = function append(selector) {
  1980. selector.parent = this;
  1981. this.nodes.push(selector);
  1982. return this;
  1983. };
  1984. _proto.prepend = function prepend(selector) {
  1985. selector.parent = this;
  1986. this.nodes.unshift(selector);
  1987. for (var id in this.indexes) this.indexes[id]++;
  1988. return this;
  1989. };
  1990. _proto.at = function at(index) {
  1991. return this.nodes[index];
  1992. };
  1993. _proto.index = function index(child) {
  1994. if (typeof child === "number") return child;
  1995. return this.nodes.indexOf(child);
  1996. };
  1997. _proto.removeChild = function removeChild(child) {
  1998. child = this.index(child);
  1999. this.at(child).parent = void 0;
  2000. this.nodes.splice(child, 1);
  2001. var index;
  2002. for (var id in this.indexes) {
  2003. index = this.indexes[id];
  2004. if (index >= child) this.indexes[id] = index - 1;
  2005. }
  2006. return this;
  2007. };
  2008. _proto.removeAll = function removeAll() {
  2009. for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {
  2010. var node = _step.value;
  2011. node.parent = void 0;
  2012. }
  2013. this.nodes = [];
  2014. return this;
  2015. };
  2016. _proto.empty = function empty() {
  2017. return this.removeAll();
  2018. };
  2019. _proto.insertAfter = function insertAfter(oldNode, newNode) {
  2020. var _this$nodes;
  2021. newNode.parent = this;
  2022. var oldIndex = this.index(oldNode);
  2023. var resetNode = [];
  2024. for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
  2025. (_this$nodes = this.nodes).splice.apply(_this$nodes, [
  2026. oldIndex + 1,
  2027. 0,
  2028. newNode
  2029. ].concat(resetNode));
  2030. newNode.parent = this;
  2031. var index;
  2032. for (var id in this.indexes) {
  2033. index = this.indexes[id];
  2034. if (oldIndex < index) this.indexes[id] = index + arguments.length - 1;
  2035. }
  2036. return this;
  2037. };
  2038. _proto.insertBefore = function insertBefore(oldNode, newNode) {
  2039. var _this$nodes2;
  2040. newNode.parent = this;
  2041. var oldIndex = this.index(oldNode);
  2042. var resetNode = [];
  2043. for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
  2044. (_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [
  2045. oldIndex,
  2046. 0,
  2047. newNode
  2048. ].concat(resetNode));
  2049. newNode.parent = this;
  2050. var index;
  2051. for (var id in this.indexes) {
  2052. index = this.indexes[id];
  2053. if (index >= oldIndex) this.indexes[id] = index + arguments.length - 1;
  2054. }
  2055. return this;
  2056. };
  2057. _proto._findChildAtPosition = function _findChildAtPosition(line, col) {
  2058. var found = void 0;
  2059. this.each(function(node) {
  2060. if (node.atPosition) {
  2061. var foundChild = node.atPosition(line, col);
  2062. if (foundChild) {
  2063. found = foundChild;
  2064. return false;
  2065. }
  2066. } else if (node.isAtPosition(line, col)) {
  2067. found = node;
  2068. return false;
  2069. }
  2070. });
  2071. return found;
  2072. };
  2073. _proto.atPosition = function atPosition(line, col) {
  2074. if (this.isAtPosition(line, col)) return this._findChildAtPosition(line, col) || this;
  2075. else return;
  2076. };
  2077. _proto._inferEndPosition = function _inferEndPosition() {
  2078. if (this.last && this.last.source && this.last.source.end) {
  2079. this.source = this.source || {};
  2080. this.source.end = this.source.end || {};
  2081. Object.assign(this.source.end, this.last.source.end);
  2082. }
  2083. };
  2084. _proto.each = function each(callback) {
  2085. if (!this.lastEach) this.lastEach = 0;
  2086. if (!this.indexes) this.indexes = {};
  2087. this.lastEach++;
  2088. var id = this.lastEach;
  2089. this.indexes[id] = 0;
  2090. if (!this.length) return;
  2091. var index, result;
  2092. while (this.indexes[id] < this.length) {
  2093. index = this.indexes[id];
  2094. result = callback(this.at(index), index);
  2095. if (result === false) break;
  2096. this.indexes[id] += 1;
  2097. }
  2098. delete this.indexes[id];
  2099. if (result === false) return false;
  2100. };
  2101. _proto.walk = function walk(callback) {
  2102. return this.each(function(node, i) {
  2103. var result = callback(node, i);
  2104. if (result !== false && node.length) result = node.walk(callback);
  2105. if (result === false) return false;
  2106. });
  2107. };
  2108. _proto.walkAttributes = function walkAttributes(callback) {
  2109. var _this2 = this;
  2110. return this.walk(function(selector) {
  2111. if (selector.type === types.ATTRIBUTE) return callback.call(_this2, selector);
  2112. });
  2113. };
  2114. _proto.walkClasses = function walkClasses(callback) {
  2115. var _this3 = this;
  2116. return this.walk(function(selector) {
  2117. if (selector.type === types.CLASS) return callback.call(_this3, selector);
  2118. });
  2119. };
  2120. _proto.walkCombinators = function walkCombinators(callback) {
  2121. var _this4 = this;
  2122. return this.walk(function(selector) {
  2123. if (selector.type === types.COMBINATOR) return callback.call(_this4, selector);
  2124. });
  2125. };
  2126. _proto.walkComments = function walkComments(callback) {
  2127. var _this5 = this;
  2128. return this.walk(function(selector) {
  2129. if (selector.type === types.COMMENT) return callback.call(_this5, selector);
  2130. });
  2131. };
  2132. _proto.walkIds = function walkIds(callback) {
  2133. var _this6 = this;
  2134. return this.walk(function(selector) {
  2135. if (selector.type === types.ID) return callback.call(_this6, selector);
  2136. });
  2137. };
  2138. _proto.walkNesting = function walkNesting(callback) {
  2139. var _this7 = this;
  2140. return this.walk(function(selector) {
  2141. if (selector.type === types.NESTING) return callback.call(_this7, selector);
  2142. });
  2143. };
  2144. _proto.walkPseudos = function walkPseudos(callback) {
  2145. var _this8 = this;
  2146. return this.walk(function(selector) {
  2147. if (selector.type === types.PSEUDO) return callback.call(_this8, selector);
  2148. });
  2149. };
  2150. _proto.walkTags = function walkTags(callback) {
  2151. var _this9 = this;
  2152. return this.walk(function(selector) {
  2153. if (selector.type === types.TAG) return callback.call(_this9, selector);
  2154. });
  2155. };
  2156. _proto.walkUniversals = function walkUniversals(callback) {
  2157. var _this10 = this;
  2158. return this.walk(function(selector) {
  2159. if (selector.type === types.UNIVERSAL) return callback.call(_this10, selector);
  2160. });
  2161. };
  2162. _proto.split = function split(callback) {
  2163. var _this11 = this;
  2164. var current = [];
  2165. return this.reduce(function(memo, node, index) {
  2166. var split = callback.call(_this11, node);
  2167. current.push(node);
  2168. if (split) {
  2169. memo.push(current);
  2170. current = [];
  2171. } else if (index === _this11.length - 1) memo.push(current);
  2172. return memo;
  2173. }, []);
  2174. };
  2175. _proto.map = function map(callback) {
  2176. return this.nodes.map(callback);
  2177. };
  2178. _proto.reduce = function reduce(callback, memo) {
  2179. return this.nodes.reduce(callback, memo);
  2180. };
  2181. _proto.every = function every(callback) {
  2182. return this.nodes.every(callback);
  2183. };
  2184. _proto.some = function some(callback) {
  2185. return this.nodes.some(callback);
  2186. };
  2187. _proto.filter = function filter(callback) {
  2188. return this.nodes.filter(callback);
  2189. };
  2190. _proto.sort = function sort(callback) {
  2191. return this.nodes.sort(callback);
  2192. };
  2193. _proto.toString = function toString() {
  2194. return this.map(String).join("");
  2195. };
  2196. _createClass(Container, [
  2197. {
  2198. key: "first",
  2199. get: function get() {
  2200. return this.at(0);
  2201. }
  2202. },
  2203. {
  2204. key: "last",
  2205. get: function get() {
  2206. return this.at(this.length - 1);
  2207. }
  2208. },
  2209. {
  2210. key: "length",
  2211. get: function get() {
  2212. return this.nodes.length;
  2213. }
  2214. }
  2215. ]);
  2216. return Container;
  2217. }(_node["default"]);
  2218. module.exports = exports.default;
  2219. }));
  2220. //#endregion
  2221. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/root.js
  2222. var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2223. exports.__esModule = true;
  2224. exports["default"] = void 0;
  2225. var _container = _interopRequireDefault(require_container());
  2226. var _types = require_types();
  2227. function _interopRequireDefault(obj) {
  2228. return obj && obj.__esModule ? obj : { "default": obj };
  2229. }
  2230. function _defineProperties(target, props) {
  2231. for (var i = 0; i < props.length; i++) {
  2232. var descriptor = props[i];
  2233. descriptor.enumerable = descriptor.enumerable || false;
  2234. descriptor.configurable = true;
  2235. if ("value" in descriptor) descriptor.writable = true;
  2236. Object.defineProperty(target, descriptor.key, descriptor);
  2237. }
  2238. }
  2239. function _createClass(Constructor, protoProps, staticProps) {
  2240. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  2241. if (staticProps) _defineProperties(Constructor, staticProps);
  2242. Object.defineProperty(Constructor, "prototype", { writable: false });
  2243. return Constructor;
  2244. }
  2245. function _inheritsLoose(subClass, superClass) {
  2246. subClass.prototype = Object.create(superClass.prototype);
  2247. subClass.prototype.constructor = subClass;
  2248. _setPrototypeOf(subClass, superClass);
  2249. }
  2250. function _setPrototypeOf(o, p) {
  2251. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2252. o.__proto__ = p;
  2253. return o;
  2254. };
  2255. return _setPrototypeOf(o, p);
  2256. }
  2257. exports["default"] = /* @__PURE__ */ function(_Container) {
  2258. _inheritsLoose(Root, _Container);
  2259. function Root(opts) {
  2260. var _this = _Container.call(this, opts) || this;
  2261. _this.type = _types.ROOT;
  2262. return _this;
  2263. }
  2264. var _proto = Root.prototype;
  2265. _proto.toString = function toString() {
  2266. var str = this.reduce(function(memo, selector) {
  2267. memo.push(String(selector));
  2268. return memo;
  2269. }, []).join(",");
  2270. return this.trailingComma ? str + "," : str;
  2271. };
  2272. _proto.error = function error(message, options) {
  2273. if (this._error) return this._error(message, options);
  2274. else return new Error(message);
  2275. };
  2276. _createClass(Root, [{
  2277. key: "errorGenerator",
  2278. set: function set(handler) {
  2279. this._error = handler;
  2280. }
  2281. }]);
  2282. return Root;
  2283. }(_container["default"]);
  2284. module.exports = exports.default;
  2285. }));
  2286. //#endregion
  2287. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/selector.js
  2288. var require_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2289. exports.__esModule = true;
  2290. exports["default"] = void 0;
  2291. var _container = _interopRequireDefault(require_container());
  2292. var _types = require_types();
  2293. function _interopRequireDefault(obj) {
  2294. return obj && obj.__esModule ? obj : { "default": obj };
  2295. }
  2296. function _inheritsLoose(subClass, superClass) {
  2297. subClass.prototype = Object.create(superClass.prototype);
  2298. subClass.prototype.constructor = subClass;
  2299. _setPrototypeOf(subClass, superClass);
  2300. }
  2301. function _setPrototypeOf(o, p) {
  2302. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2303. o.__proto__ = p;
  2304. return o;
  2305. };
  2306. return _setPrototypeOf(o, p);
  2307. }
  2308. exports["default"] = /* @__PURE__ */ function(_Container) {
  2309. _inheritsLoose(Selector, _Container);
  2310. function Selector(opts) {
  2311. var _this = _Container.call(this, opts) || this;
  2312. _this.type = _types.SELECTOR;
  2313. return _this;
  2314. }
  2315. return Selector;
  2316. }(_container["default"]);
  2317. module.exports = exports.default;
  2318. }));
  2319. //#endregion
  2320. //#region ../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js
  2321. /*! https://mths.be/cssesc v3.0.0 by @mathias */
  2322. var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2323. var hasOwnProperty = {}.hasOwnProperty;
  2324. var merge = function merge(options, defaults) {
  2325. if (!options) return defaults;
  2326. var result = {};
  2327. for (var key in defaults) result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
  2328. return result;
  2329. };
  2330. var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
  2331. var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
  2332. var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
  2333. var cssesc = function cssesc(string, options) {
  2334. options = merge(options, cssesc.options);
  2335. if (options.quotes != "single" && options.quotes != "double") options.quotes = "single";
  2336. var quote = options.quotes == "double" ? "\"" : "'";
  2337. var isIdentifier = options.isIdentifier;
  2338. var firstChar = string.charAt(0);
  2339. var output = "";
  2340. var counter = 0;
  2341. var length = string.length;
  2342. while (counter < length) {
  2343. var character = string.charAt(counter++);
  2344. var codePoint = character.charCodeAt();
  2345. var value = void 0;
  2346. if (codePoint < 32 || codePoint > 126) {
  2347. if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
  2348. var extra = string.charCodeAt(counter++);
  2349. if ((extra & 64512) == 56320) codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
  2350. else counter--;
  2351. }
  2352. value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2353. } else if (options.escapeEverything) if (regexAnySingleEscape.test(character)) value = "\\" + character;
  2354. else value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2355. else if (/[\t\n\f\r\x0B]/.test(character)) value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2356. else if (character == "\\" || !isIdentifier && (character == "\"" && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) value = "\\" + character;
  2357. else value = character;
  2358. output += value;
  2359. }
  2360. if (isIdentifier) {
  2361. if (/^-[-\d]/.test(output)) output = "\\-" + output.slice(1);
  2362. else if (/\d/.test(firstChar)) output = "\\3" + firstChar + " " + output.slice(1);
  2363. }
  2364. output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
  2365. if ($1 && $1.length % 2) return $0;
  2366. return ($1 || "") + $2;
  2367. });
  2368. if (!isIdentifier && options.wrap) return quote + output + quote;
  2369. return output;
  2370. };
  2371. cssesc.options = {
  2372. "escapeEverything": false,
  2373. "isIdentifier": false,
  2374. "quotes": "single",
  2375. "wrap": false
  2376. };
  2377. cssesc.version = "3.0.0";
  2378. module.exports = cssesc;
  2379. }));
  2380. //#endregion
  2381. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/className.js
  2382. var require_className = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2383. exports.__esModule = true;
  2384. exports["default"] = void 0;
  2385. var _cssesc = _interopRequireDefault(require_cssesc());
  2386. var _util = require_util();
  2387. var _node = _interopRequireDefault(require_node$1());
  2388. var _types = require_types();
  2389. function _interopRequireDefault(obj) {
  2390. return obj && obj.__esModule ? obj : { "default": obj };
  2391. }
  2392. function _defineProperties(target, props) {
  2393. for (var i = 0; i < props.length; i++) {
  2394. var descriptor = props[i];
  2395. descriptor.enumerable = descriptor.enumerable || false;
  2396. descriptor.configurable = true;
  2397. if ("value" in descriptor) descriptor.writable = true;
  2398. Object.defineProperty(target, descriptor.key, descriptor);
  2399. }
  2400. }
  2401. function _createClass(Constructor, protoProps, staticProps) {
  2402. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  2403. if (staticProps) _defineProperties(Constructor, staticProps);
  2404. Object.defineProperty(Constructor, "prototype", { writable: false });
  2405. return Constructor;
  2406. }
  2407. function _inheritsLoose(subClass, superClass) {
  2408. subClass.prototype = Object.create(superClass.prototype);
  2409. subClass.prototype.constructor = subClass;
  2410. _setPrototypeOf(subClass, superClass);
  2411. }
  2412. function _setPrototypeOf(o, p) {
  2413. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2414. o.__proto__ = p;
  2415. return o;
  2416. };
  2417. return _setPrototypeOf(o, p);
  2418. }
  2419. exports["default"] = /* @__PURE__ */ function(_Node) {
  2420. _inheritsLoose(ClassName, _Node);
  2421. function ClassName(opts) {
  2422. var _this = _Node.call(this, opts) || this;
  2423. _this.type = _types.CLASS;
  2424. _this._constructed = true;
  2425. return _this;
  2426. }
  2427. var _proto = ClassName.prototype;
  2428. _proto.valueToString = function valueToString() {
  2429. return "." + _Node.prototype.valueToString.call(this);
  2430. };
  2431. _createClass(ClassName, [{
  2432. key: "value",
  2433. get: function get() {
  2434. return this._value;
  2435. },
  2436. set: function set(v) {
  2437. if (this._constructed) {
  2438. var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
  2439. if (escaped !== v) {
  2440. (0, _util.ensureObject)(this, "raws");
  2441. this.raws.value = escaped;
  2442. } else if (this.raws) delete this.raws.value;
  2443. }
  2444. this._value = v;
  2445. }
  2446. }]);
  2447. return ClassName;
  2448. }(_node["default"]);
  2449. module.exports = exports.default;
  2450. }));
  2451. //#endregion
  2452. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/comment.js
  2453. var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2454. exports.__esModule = true;
  2455. exports["default"] = void 0;
  2456. var _node = _interopRequireDefault(require_node$1());
  2457. var _types = require_types();
  2458. function _interopRequireDefault(obj) {
  2459. return obj && obj.__esModule ? obj : { "default": obj };
  2460. }
  2461. function _inheritsLoose(subClass, superClass) {
  2462. subClass.prototype = Object.create(superClass.prototype);
  2463. subClass.prototype.constructor = subClass;
  2464. _setPrototypeOf(subClass, superClass);
  2465. }
  2466. function _setPrototypeOf(o, p) {
  2467. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2468. o.__proto__ = p;
  2469. return o;
  2470. };
  2471. return _setPrototypeOf(o, p);
  2472. }
  2473. exports["default"] = /* @__PURE__ */ function(_Node) {
  2474. _inheritsLoose(Comment, _Node);
  2475. function Comment(opts) {
  2476. var _this = _Node.call(this, opts) || this;
  2477. _this.type = _types.COMMENT;
  2478. return _this;
  2479. }
  2480. return Comment;
  2481. }(_node["default"]);
  2482. module.exports = exports.default;
  2483. }));
  2484. //#endregion
  2485. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/id.js
  2486. var require_id = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2487. exports.__esModule = true;
  2488. exports["default"] = void 0;
  2489. var _node = _interopRequireDefault(require_node$1());
  2490. var _types = require_types();
  2491. function _interopRequireDefault(obj) {
  2492. return obj && obj.__esModule ? obj : { "default": obj };
  2493. }
  2494. function _inheritsLoose(subClass, superClass) {
  2495. subClass.prototype = Object.create(superClass.prototype);
  2496. subClass.prototype.constructor = subClass;
  2497. _setPrototypeOf(subClass, superClass);
  2498. }
  2499. function _setPrototypeOf(o, p) {
  2500. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2501. o.__proto__ = p;
  2502. return o;
  2503. };
  2504. return _setPrototypeOf(o, p);
  2505. }
  2506. exports["default"] = /* @__PURE__ */ function(_Node) {
  2507. _inheritsLoose(ID, _Node);
  2508. function ID(opts) {
  2509. var _this = _Node.call(this, opts) || this;
  2510. _this.type = _types.ID;
  2511. return _this;
  2512. }
  2513. var _proto = ID.prototype;
  2514. _proto.valueToString = function valueToString() {
  2515. return "#" + _Node.prototype.valueToString.call(this);
  2516. };
  2517. return ID;
  2518. }(_node["default"]);
  2519. module.exports = exports.default;
  2520. }));
  2521. //#endregion
  2522. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/namespace.js
  2523. var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2524. exports.__esModule = true;
  2525. exports["default"] = void 0;
  2526. var _cssesc = _interopRequireDefault(require_cssesc());
  2527. var _util = require_util();
  2528. var _node = _interopRequireDefault(require_node$1());
  2529. function _interopRequireDefault(obj) {
  2530. return obj && obj.__esModule ? obj : { "default": obj };
  2531. }
  2532. function _defineProperties(target, props) {
  2533. for (var i = 0; i < props.length; i++) {
  2534. var descriptor = props[i];
  2535. descriptor.enumerable = descriptor.enumerable || false;
  2536. descriptor.configurable = true;
  2537. if ("value" in descriptor) descriptor.writable = true;
  2538. Object.defineProperty(target, descriptor.key, descriptor);
  2539. }
  2540. }
  2541. function _createClass(Constructor, protoProps, staticProps) {
  2542. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  2543. if (staticProps) _defineProperties(Constructor, staticProps);
  2544. Object.defineProperty(Constructor, "prototype", { writable: false });
  2545. return Constructor;
  2546. }
  2547. function _inheritsLoose(subClass, superClass) {
  2548. subClass.prototype = Object.create(superClass.prototype);
  2549. subClass.prototype.constructor = subClass;
  2550. _setPrototypeOf(subClass, superClass);
  2551. }
  2552. function _setPrototypeOf(o, p) {
  2553. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2554. o.__proto__ = p;
  2555. return o;
  2556. };
  2557. return _setPrototypeOf(o, p);
  2558. }
  2559. exports["default"] = /* @__PURE__ */ function(_Node) {
  2560. _inheritsLoose(Namespace, _Node);
  2561. function Namespace() {
  2562. return _Node.apply(this, arguments) || this;
  2563. }
  2564. var _proto = Namespace.prototype;
  2565. _proto.qualifiedName = function qualifiedName(value) {
  2566. if (this.namespace) return this.namespaceString + "|" + value;
  2567. else return value;
  2568. };
  2569. _proto.valueToString = function valueToString() {
  2570. return this.qualifiedName(_Node.prototype.valueToString.call(this));
  2571. };
  2572. _createClass(Namespace, [
  2573. {
  2574. key: "namespace",
  2575. get: function get() {
  2576. return this._namespace;
  2577. },
  2578. set: function set(namespace) {
  2579. if (namespace === true || namespace === "*" || namespace === "&") {
  2580. this._namespace = namespace;
  2581. if (this.raws) delete this.raws.namespace;
  2582. return;
  2583. }
  2584. var escaped = (0, _cssesc["default"])(namespace, { isIdentifier: true });
  2585. this._namespace = namespace;
  2586. if (escaped !== namespace) {
  2587. (0, _util.ensureObject)(this, "raws");
  2588. this.raws.namespace = escaped;
  2589. } else if (this.raws) delete this.raws.namespace;
  2590. }
  2591. },
  2592. {
  2593. key: "ns",
  2594. get: function get() {
  2595. return this._namespace;
  2596. },
  2597. set: function set(namespace) {
  2598. this.namespace = namespace;
  2599. }
  2600. },
  2601. {
  2602. key: "namespaceString",
  2603. get: function get() {
  2604. if (this.namespace) {
  2605. var ns = this.stringifyProperty("namespace");
  2606. if (ns === true) return "";
  2607. else return ns;
  2608. } else return "";
  2609. }
  2610. }
  2611. ]);
  2612. return Namespace;
  2613. }(_node["default"]);
  2614. module.exports = exports.default;
  2615. }));
  2616. //#endregion
  2617. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/tag.js
  2618. var require_tag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2619. exports.__esModule = true;
  2620. exports["default"] = void 0;
  2621. var _namespace = _interopRequireDefault(require_namespace());
  2622. var _types = require_types();
  2623. function _interopRequireDefault(obj) {
  2624. return obj && obj.__esModule ? obj : { "default": obj };
  2625. }
  2626. function _inheritsLoose(subClass, superClass) {
  2627. subClass.prototype = Object.create(superClass.prototype);
  2628. subClass.prototype.constructor = subClass;
  2629. _setPrototypeOf(subClass, superClass);
  2630. }
  2631. function _setPrototypeOf(o, p) {
  2632. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2633. o.__proto__ = p;
  2634. return o;
  2635. };
  2636. return _setPrototypeOf(o, p);
  2637. }
  2638. exports["default"] = /* @__PURE__ */ function(_Namespace) {
  2639. _inheritsLoose(Tag, _Namespace);
  2640. function Tag(opts) {
  2641. var _this = _Namespace.call(this, opts) || this;
  2642. _this.type = _types.TAG;
  2643. return _this;
  2644. }
  2645. return Tag;
  2646. }(_namespace["default"]);
  2647. module.exports = exports.default;
  2648. }));
  2649. //#endregion
  2650. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/string.js
  2651. var require_string = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2652. exports.__esModule = true;
  2653. exports["default"] = void 0;
  2654. var _node = _interopRequireDefault(require_node$1());
  2655. var _types = require_types();
  2656. function _interopRequireDefault(obj) {
  2657. return obj && obj.__esModule ? obj : { "default": obj };
  2658. }
  2659. function _inheritsLoose(subClass, superClass) {
  2660. subClass.prototype = Object.create(superClass.prototype);
  2661. subClass.prototype.constructor = subClass;
  2662. _setPrototypeOf(subClass, superClass);
  2663. }
  2664. function _setPrototypeOf(o, p) {
  2665. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2666. o.__proto__ = p;
  2667. return o;
  2668. };
  2669. return _setPrototypeOf(o, p);
  2670. }
  2671. exports["default"] = /* @__PURE__ */ function(_Node) {
  2672. _inheritsLoose(String, _Node);
  2673. function String(opts) {
  2674. var _this = _Node.call(this, opts) || this;
  2675. _this.type = _types.STRING;
  2676. return _this;
  2677. }
  2678. return String;
  2679. }(_node["default"]);
  2680. module.exports = exports.default;
  2681. }));
  2682. //#endregion
  2683. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
  2684. var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2685. exports.__esModule = true;
  2686. exports["default"] = void 0;
  2687. var _container = _interopRequireDefault(require_container());
  2688. var _types = require_types();
  2689. function _interopRequireDefault(obj) {
  2690. return obj && obj.__esModule ? obj : { "default": obj };
  2691. }
  2692. function _inheritsLoose(subClass, superClass) {
  2693. subClass.prototype = Object.create(superClass.prototype);
  2694. subClass.prototype.constructor = subClass;
  2695. _setPrototypeOf(subClass, superClass);
  2696. }
  2697. function _setPrototypeOf(o, p) {
  2698. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2699. o.__proto__ = p;
  2700. return o;
  2701. };
  2702. return _setPrototypeOf(o, p);
  2703. }
  2704. exports["default"] = /* @__PURE__ */ function(_Container) {
  2705. _inheritsLoose(Pseudo, _Container);
  2706. function Pseudo(opts) {
  2707. var _this = _Container.call(this, opts) || this;
  2708. _this.type = _types.PSEUDO;
  2709. return _this;
  2710. }
  2711. var _proto = Pseudo.prototype;
  2712. _proto.toString = function toString() {
  2713. var params = this.length ? "(" + this.map(String).join(",") + ")" : "";
  2714. return [
  2715. this.rawSpaceBefore,
  2716. this.stringifyProperty("value"),
  2717. params,
  2718. this.rawSpaceAfter
  2719. ].join("");
  2720. };
  2721. return Pseudo;
  2722. }(_container["default"]);
  2723. module.exports = exports.default;
  2724. }));
  2725. //#endregion
  2726. //#region ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
  2727. var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2728. /**
  2729. * For Node.js, simply re-export the core `util.deprecate` function.
  2730. */
  2731. module.exports = __require("util").deprecate;
  2732. }));
  2733. //#endregion
  2734. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/attribute.js
  2735. var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
  2736. exports.__esModule = true;
  2737. exports["default"] = void 0;
  2738. exports.unescapeValue = unescapeValue;
  2739. var _cssesc = _interopRequireDefault(require_cssesc());
  2740. var _unesc = _interopRequireDefault(require_unesc());
  2741. var _namespace = _interopRequireDefault(require_namespace());
  2742. var _types = require_types();
  2743. var _CSSESC_QUOTE_OPTIONS;
  2744. function _interopRequireDefault(obj) {
  2745. return obj && obj.__esModule ? obj : { "default": obj };
  2746. }
  2747. function _defineProperties(target, props) {
  2748. for (var i = 0; i < props.length; i++) {
  2749. var descriptor = props[i];
  2750. descriptor.enumerable = descriptor.enumerable || false;
  2751. descriptor.configurable = true;
  2752. if ("value" in descriptor) descriptor.writable = true;
  2753. Object.defineProperty(target, descriptor.key, descriptor);
  2754. }
  2755. }
  2756. function _createClass(Constructor, protoProps, staticProps) {
  2757. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  2758. if (staticProps) _defineProperties(Constructor, staticProps);
  2759. Object.defineProperty(Constructor, "prototype", { writable: false });
  2760. return Constructor;
  2761. }
  2762. function _inheritsLoose(subClass, superClass) {
  2763. subClass.prototype = Object.create(superClass.prototype);
  2764. subClass.prototype.constructor = subClass;
  2765. _setPrototypeOf(subClass, superClass);
  2766. }
  2767. function _setPrototypeOf(o, p) {
  2768. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2769. o.__proto__ = p;
  2770. return o;
  2771. };
  2772. return _setPrototypeOf(o, p);
  2773. }
  2774. var deprecate = require_node();
  2775. var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
  2776. var warnOfDeprecatedValueAssignment = deprecate(function() {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.");
  2777. var warnOfDeprecatedQuotedAssignment = deprecate(function() {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
  2778. var warnOfDeprecatedConstructor = deprecate(function() {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
  2779. function unescapeValue(value) {
  2780. var deprecatedUsage = false;
  2781. var quoteMark = null;
  2782. var unescaped = value;
  2783. var m = unescaped.match(WRAPPED_IN_QUOTES);
  2784. if (m) {
  2785. quoteMark = m[1];
  2786. unescaped = m[2];
  2787. }
  2788. unescaped = (0, _unesc["default"])(unescaped);
  2789. if (unescaped !== value) deprecatedUsage = true;
  2790. return {
  2791. deprecatedUsage,
  2792. unescaped,
  2793. quoteMark
  2794. };
  2795. }
  2796. function handleDeprecatedContructorOpts(opts) {
  2797. if (opts.quoteMark !== void 0) return opts;
  2798. if (opts.value === void 0) return opts;
  2799. warnOfDeprecatedConstructor();
  2800. var _unescapeValue = unescapeValue(opts.value), quoteMark = _unescapeValue.quoteMark, unescaped = _unescapeValue.unescaped;
  2801. if (!opts.raws) opts.raws = {};
  2802. if (opts.raws.value === void 0) opts.raws.value = opts.value;
  2803. opts.value = unescaped;
  2804. opts.quoteMark = quoteMark;
  2805. return opts;
  2806. }
  2807. var Attribute = /* @__PURE__ */ function(_Namespace) {
  2808. _inheritsLoose(Attribute, _Namespace);
  2809. function Attribute(opts) {
  2810. var _this;
  2811. if (opts === void 0) opts = {};
  2812. _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
  2813. _this.type = _types.ATTRIBUTE;
  2814. _this.raws = _this.raws || {};
  2815. Object.defineProperty(_this.raws, "unquoted", {
  2816. get: deprecate(function() {
  2817. return _this.value;
  2818. }, "attr.raws.unquoted is deprecated. Call attr.value instead."),
  2819. set: deprecate(function() {
  2820. return _this.value;
  2821. }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
  2822. });
  2823. _this._constructed = true;
  2824. return _this;
  2825. }
  2826. /**
  2827. * Returns the Attribute's value quoted such that it would be legal to use
  2828. * in the value of a css file. The original value's quotation setting
  2829. * used for stringification is left unchanged. See `setValue(value, options)`
  2830. * if you want to control the quote settings of a new value for the attribute.
  2831. *
  2832. * You can also change the quotation used for the current value by setting quoteMark.
  2833. *
  2834. * Options:
  2835. * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this
  2836. * option is not set, the original value for quoteMark will be used. If
  2837. * indeterminate, a double quote is used. The legal values are:
  2838. * * `null` - the value will be unquoted and characters will be escaped as necessary.
  2839. * * `'` - the value will be quoted with a single quote and single quotes are escaped.
  2840. * * `"` - the value will be quoted with a double quote and double quotes are escaped.
  2841. * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark
  2842. * over the quoteMark option value.
  2843. * * smart {boolean} - if true, will select a quote mark based on the value
  2844. * and the other options specified here. See the `smartQuoteMark()`
  2845. * method.
  2846. **/
  2847. var _proto = Attribute.prototype;
  2848. _proto.getQuotedValue = function getQuotedValue(options) {
  2849. if (options === void 0) options = {};
  2850. var cssescopts = CSSESC_QUOTE_OPTIONS[this._determineQuoteMark(options)];
  2851. return (0, _cssesc["default"])(this._value, cssescopts);
  2852. };
  2853. _proto._determineQuoteMark = function _determineQuoteMark(options) {
  2854. return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
  2855. };
  2856. _proto.setValue = function setValue(value, options) {
  2857. if (options === void 0) options = {};
  2858. this._value = value;
  2859. this._quoteMark = this._determineQuoteMark(options);
  2860. this._syncRawValue();
  2861. };
  2862. _proto.smartQuoteMark = function smartQuoteMark(options) {
  2863. var v = this.value;
  2864. var numSingleQuotes = v.replace(/[^']/g, "").length;
  2865. var numDoubleQuotes = v.replace(/[^"]/g, "").length;
  2866. if (numSingleQuotes + numDoubleQuotes === 0) {
  2867. var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
  2868. if (escaped === v) return Attribute.NO_QUOTE;
  2869. else {
  2870. var pref = this.preferredQuoteMark(options);
  2871. if (pref === Attribute.NO_QUOTE) {
  2872. var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
  2873. var opts = CSSESC_QUOTE_OPTIONS[quote];
  2874. if ((0, _cssesc["default"])(v, opts).length < escaped.length) return quote;
  2875. }
  2876. return pref;
  2877. }
  2878. } else if (numDoubleQuotes === numSingleQuotes) return this.preferredQuoteMark(options);
  2879. else if (numDoubleQuotes < numSingleQuotes) return Attribute.DOUBLE_QUOTE;
  2880. else return Attribute.SINGLE_QUOTE;
  2881. };
  2882. _proto.preferredQuoteMark = function preferredQuoteMark(options) {
  2883. var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
  2884. if (quoteMark === void 0) quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
  2885. if (quoteMark === void 0) quoteMark = Attribute.DOUBLE_QUOTE;
  2886. return quoteMark;
  2887. };
  2888. _proto._syncRawValue = function _syncRawValue() {
  2889. var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
  2890. if (rawValue === this._value) {
  2891. if (this.raws) delete this.raws.value;
  2892. } else this.raws.value = rawValue;
  2893. };
  2894. _proto._handleEscapes = function _handleEscapes(prop, value) {
  2895. if (this._constructed) {
  2896. var escaped = (0, _cssesc["default"])(value, { isIdentifier: true });
  2897. if (escaped !== value) this.raws[prop] = escaped;
  2898. else delete this.raws[prop];
  2899. }
  2900. };
  2901. _proto._spacesFor = function _spacesFor(name) {
  2902. var attrSpaces = {
  2903. before: "",
  2904. after: ""
  2905. };
  2906. var spaces = this.spaces[name] || {};
  2907. var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
  2908. return Object.assign(attrSpaces, spaces, rawSpaces);
  2909. };
  2910. _proto._stringFor = function _stringFor(name, spaceName, concat) {
  2911. if (spaceName === void 0) spaceName = name;
  2912. if (concat === void 0) concat = defaultAttrConcat;
  2913. var attrSpaces = this._spacesFor(spaceName);
  2914. return concat(this.stringifyProperty(name), attrSpaces);
  2915. };
  2916. _proto.offsetOf = function offsetOf(name) {
  2917. var count = 1;
  2918. var attributeSpaces = this._spacesFor("attribute");
  2919. count += attributeSpaces.before.length;
  2920. if (name === "namespace" || name === "ns") return this.namespace ? count : -1;
  2921. if (name === "attributeNS") return count;
  2922. count += this.namespaceString.length;
  2923. if (this.namespace) count += 1;
  2924. if (name === "attribute") return count;
  2925. count += this.stringifyProperty("attribute").length;
  2926. count += attributeSpaces.after.length;
  2927. var operatorSpaces = this._spacesFor("operator");
  2928. count += operatorSpaces.before.length;
  2929. var operator = this.stringifyProperty("operator");
  2930. if (name === "operator") return operator ? count : -1;
  2931. count += operator.length;
  2932. count += operatorSpaces.after.length;
  2933. var valueSpaces = this._spacesFor("value");
  2934. count += valueSpaces.before.length;
  2935. var value = this.stringifyProperty("value");
  2936. if (name === "value") return value ? count : -1;
  2937. count += value.length;
  2938. count += valueSpaces.after.length;
  2939. var insensitiveSpaces = this._spacesFor("insensitive");
  2940. count += insensitiveSpaces.before.length;
  2941. if (name === "insensitive") return this.insensitive ? count : -1;
  2942. return -1;
  2943. };
  2944. _proto.toString = function toString() {
  2945. var _this2 = this;
  2946. var selector = [this.rawSpaceBefore, "["];
  2947. selector.push(this._stringFor("qualifiedAttribute", "attribute"));
  2948. if (this.operator && (this.value || this.value === "")) {
  2949. selector.push(this._stringFor("operator"));
  2950. selector.push(this._stringFor("value"));
  2951. selector.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
  2952. if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) attrSpaces.before = " ";
  2953. return defaultAttrConcat(attrValue, attrSpaces);
  2954. }));
  2955. }
  2956. selector.push("]");
  2957. selector.push(this.rawSpaceAfter);
  2958. return selector.join("");
  2959. };
  2960. _createClass(Attribute, [
  2961. {
  2962. key: "quoted",
  2963. get: function get() {
  2964. var qm = this.quoteMark;
  2965. return qm === "'" || qm === "\"";
  2966. },
  2967. set: function set(value) {
  2968. warnOfDeprecatedQuotedAssignment();
  2969. }
  2970. },
  2971. {
  2972. key: "quoteMark",
  2973. get: function get() {
  2974. return this._quoteMark;
  2975. },
  2976. set: function set(quoteMark) {
  2977. if (!this._constructed) {
  2978. this._quoteMark = quoteMark;
  2979. return;
  2980. }
  2981. if (this._quoteMark !== quoteMark) {
  2982. this._quoteMark = quoteMark;
  2983. this._syncRawValue();
  2984. }
  2985. }
  2986. },
  2987. {
  2988. key: "qualifiedAttribute",
  2989. get: function get() {
  2990. return this.qualifiedName(this.raws.attribute || this.attribute);
  2991. }
  2992. },
  2993. {
  2994. key: "insensitiveFlag",
  2995. get: function get() {
  2996. return this.insensitive ? "i" : "";
  2997. }
  2998. },
  2999. {
  3000. key: "value",
  3001. get: function get() {
  3002. return this._value;
  3003. },
  3004. set: function set(v) {
  3005. if (this._constructed) {
  3006. var _unescapeValue2 = unescapeValue(v), deprecatedUsage = _unescapeValue2.deprecatedUsage, unescaped = _unescapeValue2.unescaped, quoteMark = _unescapeValue2.quoteMark;
  3007. if (deprecatedUsage) warnOfDeprecatedValueAssignment();
  3008. if (unescaped === this._value && quoteMark === this._quoteMark) return;
  3009. this._value = unescaped;
  3010. this._quoteMark = quoteMark;
  3011. this._syncRawValue();
  3012. } else this._value = v;
  3013. }
  3014. },
  3015. {
  3016. key: "insensitive",
  3017. get: function get() {
  3018. return this._insensitive;
  3019. },
  3020. set: function set(insensitive) {
  3021. if (!insensitive) {
  3022. this._insensitive = false;
  3023. if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) this.raws.insensitiveFlag = void 0;
  3024. }
  3025. this._insensitive = insensitive;
  3026. }
  3027. },
  3028. {
  3029. key: "attribute",
  3030. get: function get() {
  3031. return this._attribute;
  3032. },
  3033. set: function set(name) {
  3034. this._handleEscapes("attribute", name);
  3035. this._attribute = name;
  3036. }
  3037. }
  3038. ]);
  3039. return Attribute;
  3040. }(_namespace["default"]);
  3041. exports["default"] = Attribute;
  3042. Attribute.NO_QUOTE = null;
  3043. Attribute.SINGLE_QUOTE = "'";
  3044. Attribute.DOUBLE_QUOTE = "\"";
  3045. var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {
  3046. "'": {
  3047. quotes: "single",
  3048. wrap: true
  3049. },
  3050. "\"": {
  3051. quotes: "double",
  3052. wrap: true
  3053. }
  3054. }, _CSSESC_QUOTE_OPTIONS[null] = { isIdentifier: true }, _CSSESC_QUOTE_OPTIONS);
  3055. function defaultAttrConcat(attrValue, attrSpaces) {
  3056. return "" + attrSpaces.before + attrValue + attrSpaces.after;
  3057. }
  3058. }));
  3059. //#endregion
  3060. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/universal.js
  3061. var require_universal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3062. exports.__esModule = true;
  3063. exports["default"] = void 0;
  3064. var _namespace = _interopRequireDefault(require_namespace());
  3065. var _types = require_types();
  3066. function _interopRequireDefault(obj) {
  3067. return obj && obj.__esModule ? obj : { "default": obj };
  3068. }
  3069. function _inheritsLoose(subClass, superClass) {
  3070. subClass.prototype = Object.create(superClass.prototype);
  3071. subClass.prototype.constructor = subClass;
  3072. _setPrototypeOf(subClass, superClass);
  3073. }
  3074. function _setPrototypeOf(o, p) {
  3075. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  3076. o.__proto__ = p;
  3077. return o;
  3078. };
  3079. return _setPrototypeOf(o, p);
  3080. }
  3081. exports["default"] = /* @__PURE__ */ function(_Namespace) {
  3082. _inheritsLoose(Universal, _Namespace);
  3083. function Universal(opts) {
  3084. var _this = _Namespace.call(this, opts) || this;
  3085. _this.type = _types.UNIVERSAL;
  3086. _this.value = "*";
  3087. return _this;
  3088. }
  3089. return Universal;
  3090. }(_namespace["default"]);
  3091. module.exports = exports.default;
  3092. }));
  3093. //#endregion
  3094. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/combinator.js
  3095. var require_combinator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3096. exports.__esModule = true;
  3097. exports["default"] = void 0;
  3098. var _node = _interopRequireDefault(require_node$1());
  3099. var _types = require_types();
  3100. function _interopRequireDefault(obj) {
  3101. return obj && obj.__esModule ? obj : { "default": obj };
  3102. }
  3103. function _inheritsLoose(subClass, superClass) {
  3104. subClass.prototype = Object.create(superClass.prototype);
  3105. subClass.prototype.constructor = subClass;
  3106. _setPrototypeOf(subClass, superClass);
  3107. }
  3108. function _setPrototypeOf(o, p) {
  3109. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  3110. o.__proto__ = p;
  3111. return o;
  3112. };
  3113. return _setPrototypeOf(o, p);
  3114. }
  3115. exports["default"] = /* @__PURE__ */ function(_Node) {
  3116. _inheritsLoose(Combinator, _Node);
  3117. function Combinator(opts) {
  3118. var _this = _Node.call(this, opts) || this;
  3119. _this.type = _types.COMBINATOR;
  3120. return _this;
  3121. }
  3122. return Combinator;
  3123. }(_node["default"]);
  3124. module.exports = exports.default;
  3125. }));
  3126. //#endregion
  3127. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/nesting.js
  3128. var require_nesting = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3129. exports.__esModule = true;
  3130. exports["default"] = void 0;
  3131. var _node = _interopRequireDefault(require_node$1());
  3132. var _types = require_types();
  3133. function _interopRequireDefault(obj) {
  3134. return obj && obj.__esModule ? obj : { "default": obj };
  3135. }
  3136. function _inheritsLoose(subClass, superClass) {
  3137. subClass.prototype = Object.create(superClass.prototype);
  3138. subClass.prototype.constructor = subClass;
  3139. _setPrototypeOf(subClass, superClass);
  3140. }
  3141. function _setPrototypeOf(o, p) {
  3142. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  3143. o.__proto__ = p;
  3144. return o;
  3145. };
  3146. return _setPrototypeOf(o, p);
  3147. }
  3148. exports["default"] = /* @__PURE__ */ function(_Node) {
  3149. _inheritsLoose(Nesting, _Node);
  3150. function Nesting(opts) {
  3151. var _this = _Node.call(this, opts) || this;
  3152. _this.type = _types.NESTING;
  3153. _this.value = "&";
  3154. return _this;
  3155. }
  3156. return Nesting;
  3157. }(_node["default"]);
  3158. module.exports = exports.default;
  3159. }));
  3160. //#endregion
  3161. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/sortAscending.js
  3162. var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3163. exports.__esModule = true;
  3164. exports["default"] = sortAscending;
  3165. function sortAscending(list) {
  3166. return list.sort(function(a, b) {
  3167. return a - b;
  3168. });
  3169. }
  3170. module.exports = exports.default;
  3171. }));
  3172. //#endregion
  3173. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/tokenTypes.js
  3174. var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
  3175. exports.__esModule = true;
  3176. exports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0;
  3177. exports.ampersand = 38;
  3178. exports.asterisk = 42;
  3179. exports.at = 64;
  3180. exports.comma = 44;
  3181. exports.colon = 58;
  3182. exports.semicolon = 59;
  3183. exports.openParenthesis = 40;
  3184. exports.closeParenthesis = 41;
  3185. exports.openSquare = 91;
  3186. exports.closeSquare = 93;
  3187. exports.dollar = 36;
  3188. exports.tilde = 126;
  3189. exports.caret = 94;
  3190. exports.plus = 43;
  3191. exports.equals = 61;
  3192. exports.pipe = 124;
  3193. exports.greaterThan = 62;
  3194. exports.space = 32;
  3195. var singleQuote = 39;
  3196. exports.singleQuote = singleQuote;
  3197. exports.doubleQuote = 34;
  3198. exports.slash = 47;
  3199. exports.bang = 33;
  3200. exports.backslash = 92;
  3201. exports.cr = 13;
  3202. exports.feed = 12;
  3203. exports.newline = 10;
  3204. exports.tab = 9;
  3205. exports.str = singleQuote;
  3206. exports.comment = -1;
  3207. exports.word = -2;
  3208. exports.combinator = -3;
  3209. }));
  3210. //#endregion
  3211. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/tokenize.js
  3212. var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
  3213. exports.__esModule = true;
  3214. exports.FIELDS = void 0;
  3215. exports["default"] = tokenize;
  3216. var t = _interopRequireWildcard(require_tokenTypes());
  3217. var _unescapable, _wordDelimiters;
  3218. function _getRequireWildcardCache(nodeInterop) {
  3219. if (typeof WeakMap !== "function") return null;
  3220. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  3221. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  3222. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  3223. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  3224. })(nodeInterop);
  3225. }
  3226. function _interopRequireWildcard(obj, nodeInterop) {
  3227. if (!nodeInterop && obj && obj.__esModule) return obj;
  3228. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  3229. var cache = _getRequireWildcardCache(nodeInterop);
  3230. if (cache && cache.has(obj)) return cache.get(obj);
  3231. var newObj = {};
  3232. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3233. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  3234. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3235. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  3236. else newObj[key] = obj[key];
  3237. }
  3238. newObj["default"] = obj;
  3239. if (cache) cache.set(obj, newObj);
  3240. return newObj;
  3241. }
  3242. var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
  3243. var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
  3244. var hex = {};
  3245. var hexChars = "0123456789abcdefABCDEF";
  3246. for (var i = 0; i < hexChars.length; i++) hex[hexChars.charCodeAt(i)] = true;
  3247. /**
  3248. * Returns the last index of the bar css word
  3249. * @param {string} css The string in which the word begins
  3250. * @param {number} start The index into the string where word's first letter occurs
  3251. */
  3252. function consumeWord(css, start) {
  3253. var next = start;
  3254. var code;
  3255. do {
  3256. code = css.charCodeAt(next);
  3257. if (wordDelimiters[code]) return next - 1;
  3258. else if (code === t.backslash) next = consumeEscape(css, next) + 1;
  3259. else next++;
  3260. } while (next < css.length);
  3261. return next - 1;
  3262. }
  3263. /**
  3264. * Returns the last index of the escape sequence
  3265. * @param {string} css The string in which the sequence begins
  3266. * @param {number} start The index into the string where escape character (`\`) occurs.
  3267. */
  3268. function consumeEscape(css, start) {
  3269. var next = start;
  3270. var code = css.charCodeAt(next + 1);
  3271. if (unescapable[code]) {} else if (hex[code]) {
  3272. var hexDigits = 0;
  3273. do {
  3274. next++;
  3275. hexDigits++;
  3276. code = css.charCodeAt(next + 1);
  3277. } while (hex[code] && hexDigits < 6);
  3278. if (hexDigits < 6 && code === t.space) next++;
  3279. } else next++;
  3280. return next;
  3281. }
  3282. exports.FIELDS = {
  3283. TYPE: 0,
  3284. START_LINE: 1,
  3285. START_COL: 2,
  3286. END_LINE: 3,
  3287. END_COL: 4,
  3288. START_POS: 5,
  3289. END_POS: 6
  3290. };
  3291. function tokenize(input) {
  3292. var tokens = [];
  3293. var css = input.css.valueOf();
  3294. var length = css.length;
  3295. var offset = -1;
  3296. var line = 1;
  3297. var start = 0;
  3298. var end = 0;
  3299. var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
  3300. function unclosed(what, fix) {
  3301. if (input.safe) {
  3302. css += fix;
  3303. next = css.length - 1;
  3304. } else throw input.error("Unclosed " + what, line, start - offset, start);
  3305. }
  3306. while (start < length) {
  3307. code = css.charCodeAt(start);
  3308. if (code === t.newline) {
  3309. offset = start;
  3310. line += 1;
  3311. }
  3312. switch (code) {
  3313. case t.space:
  3314. case t.tab:
  3315. case t.newline:
  3316. case t.cr:
  3317. case t.feed:
  3318. next = start;
  3319. do {
  3320. next += 1;
  3321. code = css.charCodeAt(next);
  3322. if (code === t.newline) {
  3323. offset = next;
  3324. line += 1;
  3325. }
  3326. } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
  3327. tokenType = t.space;
  3328. endLine = line;
  3329. endColumn = next - offset - 1;
  3330. end = next;
  3331. break;
  3332. case t.plus:
  3333. case t.greaterThan:
  3334. case t.tilde:
  3335. case t.pipe:
  3336. next = start;
  3337. do {
  3338. next += 1;
  3339. code = css.charCodeAt(next);
  3340. } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
  3341. tokenType = t.combinator;
  3342. endLine = line;
  3343. endColumn = start - offset;
  3344. end = next;
  3345. break;
  3346. case t.asterisk:
  3347. case t.ampersand:
  3348. case t.bang:
  3349. case t.comma:
  3350. case t.equals:
  3351. case t.dollar:
  3352. case t.caret:
  3353. case t.openSquare:
  3354. case t.closeSquare:
  3355. case t.colon:
  3356. case t.semicolon:
  3357. case t.openParenthesis:
  3358. case t.closeParenthesis:
  3359. next = start;
  3360. tokenType = code;
  3361. endLine = line;
  3362. endColumn = start - offset;
  3363. end = next + 1;
  3364. break;
  3365. case t.singleQuote:
  3366. case t.doubleQuote:
  3367. quote = code === t.singleQuote ? "'" : "\"";
  3368. next = start;
  3369. do {
  3370. escaped = false;
  3371. next = css.indexOf(quote, next + 1);
  3372. if (next === -1) unclosed("quote", quote);
  3373. escapePos = next;
  3374. while (css.charCodeAt(escapePos - 1) === t.backslash) {
  3375. escapePos -= 1;
  3376. escaped = !escaped;
  3377. }
  3378. } while (escaped);
  3379. tokenType = t.str;
  3380. endLine = line;
  3381. endColumn = start - offset;
  3382. end = next + 1;
  3383. break;
  3384. default:
  3385. if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
  3386. next = css.indexOf("*/", start + 2) + 1;
  3387. if (next === 0) unclosed("comment", "*/");
  3388. content = css.slice(start, next + 1);
  3389. lines = content.split("\n");
  3390. last = lines.length - 1;
  3391. if (last > 0) {
  3392. nextLine = line + last;
  3393. nextOffset = next - lines[last].length;
  3394. } else {
  3395. nextLine = line;
  3396. nextOffset = offset;
  3397. }
  3398. tokenType = t.comment;
  3399. line = nextLine;
  3400. endLine = nextLine;
  3401. endColumn = next - nextOffset;
  3402. } else if (code === t.slash) {
  3403. next = start;
  3404. tokenType = code;
  3405. endLine = line;
  3406. endColumn = start - offset;
  3407. end = next + 1;
  3408. } else {
  3409. next = consumeWord(css, start);
  3410. tokenType = t.word;
  3411. endLine = line;
  3412. endColumn = next - offset;
  3413. }
  3414. end = next + 1;
  3415. break;
  3416. }
  3417. tokens.push([
  3418. tokenType,
  3419. line,
  3420. start - offset,
  3421. endLine,
  3422. endColumn,
  3423. start,
  3424. end
  3425. ]);
  3426. if (nextOffset) {
  3427. offset = nextOffset;
  3428. nextOffset = null;
  3429. }
  3430. start = end;
  3431. }
  3432. return tokens;
  3433. }
  3434. }));
  3435. //#endregion
  3436. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/parser.js
  3437. var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3438. exports.__esModule = true;
  3439. exports["default"] = void 0;
  3440. var _root = _interopRequireDefault(require_root());
  3441. var _selector = _interopRequireDefault(require_selector());
  3442. var _className = _interopRequireDefault(require_className());
  3443. var _comment = _interopRequireDefault(require_comment());
  3444. var _id = _interopRequireDefault(require_id());
  3445. var _tag = _interopRequireDefault(require_tag());
  3446. var _string = _interopRequireDefault(require_string());
  3447. var _pseudo = _interopRequireDefault(require_pseudo());
  3448. var _attribute = _interopRequireWildcard(require_attribute());
  3449. var _universal = _interopRequireDefault(require_universal());
  3450. var _combinator = _interopRequireDefault(require_combinator());
  3451. var _nesting = _interopRequireDefault(require_nesting());
  3452. var _sortAscending = _interopRequireDefault(require_sortAscending());
  3453. var _tokenize = _interopRequireWildcard(require_tokenize());
  3454. var tokens = _interopRequireWildcard(require_tokenTypes());
  3455. var types = _interopRequireWildcard(require_types());
  3456. var _util = require_util();
  3457. var _WHITESPACE_TOKENS, _Object$assign;
  3458. function _getRequireWildcardCache(nodeInterop) {
  3459. if (typeof WeakMap !== "function") return null;
  3460. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  3461. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  3462. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  3463. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  3464. })(nodeInterop);
  3465. }
  3466. function _interopRequireWildcard(obj, nodeInterop) {
  3467. if (!nodeInterop && obj && obj.__esModule) return obj;
  3468. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  3469. var cache = _getRequireWildcardCache(nodeInterop);
  3470. if (cache && cache.has(obj)) return cache.get(obj);
  3471. var newObj = {};
  3472. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3473. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  3474. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3475. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  3476. else newObj[key] = obj[key];
  3477. }
  3478. newObj["default"] = obj;
  3479. if (cache) cache.set(obj, newObj);
  3480. return newObj;
  3481. }
  3482. function _interopRequireDefault(obj) {
  3483. return obj && obj.__esModule ? obj : { "default": obj };
  3484. }
  3485. function _defineProperties(target, props) {
  3486. for (var i = 0; i < props.length; i++) {
  3487. var descriptor = props[i];
  3488. descriptor.enumerable = descriptor.enumerable || false;
  3489. descriptor.configurable = true;
  3490. if ("value" in descriptor) descriptor.writable = true;
  3491. Object.defineProperty(target, descriptor.key, descriptor);
  3492. }
  3493. }
  3494. function _createClass(Constructor, protoProps, staticProps) {
  3495. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3496. if (staticProps) _defineProperties(Constructor, staticProps);
  3497. Object.defineProperty(Constructor, "prototype", { writable: false });
  3498. return Constructor;
  3499. }
  3500. var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);
  3501. var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));
  3502. function tokenStart(token) {
  3503. return {
  3504. line: token[_tokenize.FIELDS.START_LINE],
  3505. column: token[_tokenize.FIELDS.START_COL]
  3506. };
  3507. }
  3508. function tokenEnd(token) {
  3509. return {
  3510. line: token[_tokenize.FIELDS.END_LINE],
  3511. column: token[_tokenize.FIELDS.END_COL]
  3512. };
  3513. }
  3514. function getSource(startLine, startColumn, endLine, endColumn) {
  3515. return {
  3516. start: {
  3517. line: startLine,
  3518. column: startColumn
  3519. },
  3520. end: {
  3521. line: endLine,
  3522. column: endColumn
  3523. }
  3524. };
  3525. }
  3526. function getTokenSource(token) {
  3527. return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);
  3528. }
  3529. function getTokenSourceSpan(startToken, endToken) {
  3530. if (!startToken) return;
  3531. return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);
  3532. }
  3533. function unescapeProp(node, prop) {
  3534. var value = node[prop];
  3535. if (typeof value !== "string") return;
  3536. if (value.indexOf("\\") !== -1) {
  3537. (0, _util.ensureObject)(node, "raws");
  3538. node[prop] = (0, _util.unesc)(value);
  3539. if (node.raws[prop] === void 0) node.raws[prop] = value;
  3540. }
  3541. return node;
  3542. }
  3543. function indexesOf(array, item) {
  3544. var i = -1;
  3545. var indexes = [];
  3546. while ((i = array.indexOf(item, i + 1)) !== -1) indexes.push(i);
  3547. return indexes;
  3548. }
  3549. function uniqs() {
  3550. var list = Array.prototype.concat.apply([], arguments);
  3551. return list.filter(function(item, i) {
  3552. return i === list.indexOf(item);
  3553. });
  3554. }
  3555. exports["default"] = /* @__PURE__ */ function() {
  3556. function Parser(rule, options) {
  3557. if (options === void 0) options = {};
  3558. this.rule = rule;
  3559. this.options = Object.assign({
  3560. lossy: false,
  3561. safe: false
  3562. }, options);
  3563. this.position = 0;
  3564. this.css = typeof this.rule === "string" ? this.rule : this.rule.selector;
  3565. this.tokens = (0, _tokenize["default"])({
  3566. css: this.css,
  3567. error: this._errorGenerator(),
  3568. safe: this.options.safe
  3569. });
  3570. var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
  3571. this.root = new _root["default"]({ source: rootSource });
  3572. this.root.errorGenerator = this._errorGenerator();
  3573. var selector = new _selector["default"]({
  3574. source: { start: {
  3575. line: 1,
  3576. column: 1
  3577. } },
  3578. sourceIndex: 0
  3579. });
  3580. this.root.append(selector);
  3581. this.current = selector;
  3582. this.loop();
  3583. }
  3584. var _proto = Parser.prototype;
  3585. _proto._errorGenerator = function _errorGenerator() {
  3586. var _this = this;
  3587. return function(message, errorOptions) {
  3588. if (typeof _this.rule === "string") return new Error(message);
  3589. return _this.rule.error(message, errorOptions);
  3590. };
  3591. };
  3592. _proto.attribute = function attribute() {
  3593. var attr = [];
  3594. var startingToken = this.currToken;
  3595. this.position++;
  3596. while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
  3597. attr.push(this.currToken);
  3598. this.position++;
  3599. }
  3600. if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) return this.expected("closing square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
  3601. var len = attr.length;
  3602. var node = {
  3603. source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
  3604. sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
  3605. };
  3606. if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) return this.expected("attribute", attr[0][_tokenize.FIELDS.START_POS]);
  3607. var pos = 0;
  3608. var spaceBefore = "";
  3609. var commentBefore = "";
  3610. var lastAdded = null;
  3611. var spaceAfterMeaningfulToken = false;
  3612. while (pos < len) {
  3613. var token = attr[pos];
  3614. var content = this.content(token);
  3615. var next = attr[pos + 1];
  3616. switch (token[_tokenize.FIELDS.TYPE]) {
  3617. case tokens.space:
  3618. spaceAfterMeaningfulToken = true;
  3619. if (this.options.lossy) break;
  3620. if (lastAdded) {
  3621. (0, _util.ensureObject)(node, "spaces", lastAdded);
  3622. var prevContent = node.spaces[lastAdded].after || "";
  3623. node.spaces[lastAdded].after = prevContent + content;
  3624. var existingComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || null;
  3625. if (existingComment) node.raws.spaces[lastAdded].after = existingComment + content;
  3626. } else {
  3627. spaceBefore = spaceBefore + content;
  3628. commentBefore = commentBefore + content;
  3629. }
  3630. break;
  3631. case tokens.asterisk:
  3632. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3633. node.operator = content;
  3634. lastAdded = "operator";
  3635. } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
  3636. if (spaceBefore) {
  3637. (0, _util.ensureObject)(node, "spaces", "attribute");
  3638. node.spaces.attribute.before = spaceBefore;
  3639. spaceBefore = "";
  3640. }
  3641. if (commentBefore) {
  3642. (0, _util.ensureObject)(node, "raws", "spaces", "attribute");
  3643. node.raws.spaces.attribute.before = spaceBefore;
  3644. commentBefore = "";
  3645. }
  3646. node.namespace = (node.namespace || "") + content;
  3647. if ((0, _util.getProp)(node, "raws", "namespace") || null) node.raws.namespace += content;
  3648. lastAdded = "namespace";
  3649. }
  3650. spaceAfterMeaningfulToken = false;
  3651. break;
  3652. case tokens.dollar: if (lastAdded === "value") {
  3653. var oldRawValue = (0, _util.getProp)(node, "raws", "value");
  3654. node.value += "$";
  3655. if (oldRawValue) node.raws.value = oldRawValue + "$";
  3656. break;
  3657. }
  3658. case tokens.caret:
  3659. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3660. node.operator = content;
  3661. lastAdded = "operator";
  3662. }
  3663. spaceAfterMeaningfulToken = false;
  3664. break;
  3665. case tokens.combinator:
  3666. if (content === "~" && next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3667. node.operator = content;
  3668. lastAdded = "operator";
  3669. }
  3670. if (content !== "|") {
  3671. spaceAfterMeaningfulToken = false;
  3672. break;
  3673. }
  3674. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3675. node.operator = content;
  3676. lastAdded = "operator";
  3677. } else if (!node.namespace && !node.attribute) node.namespace = true;
  3678. spaceAfterMeaningfulToken = false;
  3679. break;
  3680. case tokens.word:
  3681. if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && !node.operator && !node.namespace) {
  3682. node.namespace = content;
  3683. lastAdded = "namespace";
  3684. } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
  3685. if (spaceBefore) {
  3686. (0, _util.ensureObject)(node, "spaces", "attribute");
  3687. node.spaces.attribute.before = spaceBefore;
  3688. spaceBefore = "";
  3689. }
  3690. if (commentBefore) {
  3691. (0, _util.ensureObject)(node, "raws", "spaces", "attribute");
  3692. node.raws.spaces.attribute.before = commentBefore;
  3693. commentBefore = "";
  3694. }
  3695. node.attribute = (node.attribute || "") + content;
  3696. if ((0, _util.getProp)(node, "raws", "attribute") || null) node.raws.attribute += content;
  3697. lastAdded = "attribute";
  3698. } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
  3699. var _unescaped = (0, _util.unesc)(content);
  3700. var _oldRawValue = (0, _util.getProp)(node, "raws", "value") || "";
  3701. var oldValue = node.value || "";
  3702. node.value = oldValue + _unescaped;
  3703. node.quoteMark = null;
  3704. if (_unescaped !== content || _oldRawValue) {
  3705. (0, _util.ensureObject)(node, "raws");
  3706. node.raws.value = (_oldRawValue || oldValue) + content;
  3707. }
  3708. lastAdded = "value";
  3709. } else {
  3710. var insensitive = content === "i" || content === "I";
  3711. if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) {
  3712. node.insensitive = insensitive;
  3713. if (!insensitive || content === "I") {
  3714. (0, _util.ensureObject)(node, "raws");
  3715. node.raws.insensitiveFlag = content;
  3716. }
  3717. lastAdded = "insensitive";
  3718. if (spaceBefore) {
  3719. (0, _util.ensureObject)(node, "spaces", "insensitive");
  3720. node.spaces.insensitive.before = spaceBefore;
  3721. spaceBefore = "";
  3722. }
  3723. if (commentBefore) {
  3724. (0, _util.ensureObject)(node, "raws", "spaces", "insensitive");
  3725. node.raws.spaces.insensitive.before = commentBefore;
  3726. commentBefore = "";
  3727. }
  3728. } else if (node.value || node.value === "") {
  3729. lastAdded = "value";
  3730. node.value += content;
  3731. if (node.raws.value) node.raws.value += content;
  3732. }
  3733. }
  3734. spaceAfterMeaningfulToken = false;
  3735. break;
  3736. case tokens.str:
  3737. if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[_tokenize.FIELDS.START_POS] });
  3738. var _unescapeValue = (0, _attribute.unescapeValue)(content), unescaped = _unescapeValue.unescaped, quoteMark = _unescapeValue.quoteMark;
  3739. node.value = unescaped;
  3740. node.quoteMark = quoteMark;
  3741. lastAdded = "value";
  3742. (0, _util.ensureObject)(node, "raws");
  3743. node.raws.value = content;
  3744. spaceAfterMeaningfulToken = false;
  3745. break;
  3746. case tokens.equals:
  3747. if (!node.attribute) return this.expected("attribute", token[_tokenize.FIELDS.START_POS], content);
  3748. if (node.value) return this.error("Unexpected \"=\" found; an operator was already defined.", { index: token[_tokenize.FIELDS.START_POS] });
  3749. node.operator = node.operator ? node.operator + content : content;
  3750. lastAdded = "operator";
  3751. spaceAfterMeaningfulToken = false;
  3752. break;
  3753. case tokens.comment:
  3754. if (lastAdded) if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") {
  3755. var lastComment = (0, _util.getProp)(node, "spaces", lastAdded, "after") || "";
  3756. var rawLastComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment;
  3757. (0, _util.ensureObject)(node, "raws", "spaces", lastAdded);
  3758. node.raws.spaces[lastAdded].after = rawLastComment + content;
  3759. } else {
  3760. var lastValue = node[lastAdded] || "";
  3761. var rawLastValue = (0, _util.getProp)(node, "raws", lastAdded) || lastValue;
  3762. (0, _util.ensureObject)(node, "raws");
  3763. node.raws[lastAdded] = rawLastValue + content;
  3764. }
  3765. else commentBefore = commentBefore + content;
  3766. break;
  3767. default: return this.error("Unexpected \"" + content + "\" found.", { index: token[_tokenize.FIELDS.START_POS] });
  3768. }
  3769. pos++;
  3770. }
  3771. unescapeProp(node, "attribute");
  3772. unescapeProp(node, "namespace");
  3773. this.newNode(new _attribute["default"](node));
  3774. this.position++;
  3775. };
  3776. _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
  3777. if (stopPosition < 0) stopPosition = this.tokens.length;
  3778. var startPosition = this.position;
  3779. var nodes = [];
  3780. var space = "";
  3781. var lastComment = void 0;
  3782. do
  3783. if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
  3784. if (!this.options.lossy) space += this.content();
  3785. } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
  3786. var spaces = {};
  3787. if (space) {
  3788. spaces.before = space;
  3789. space = "";
  3790. }
  3791. lastComment = new _comment["default"]({
  3792. value: this.content(),
  3793. source: getTokenSource(this.currToken),
  3794. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
  3795. spaces
  3796. });
  3797. nodes.push(lastComment);
  3798. }
  3799. while (++this.position < stopPosition);
  3800. if (space) {
  3801. if (lastComment) lastComment.spaces.after = space;
  3802. else if (!this.options.lossy) {
  3803. var firstToken = this.tokens[startPosition];
  3804. var lastToken = this.tokens[this.position - 1];
  3805. nodes.push(new _string["default"]({
  3806. value: "",
  3807. source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),
  3808. sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
  3809. spaces: {
  3810. before: space,
  3811. after: ""
  3812. }
  3813. }));
  3814. }
  3815. }
  3816. return nodes;
  3817. };
  3818. _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
  3819. var _this2 = this;
  3820. if (requiredSpace === void 0) requiredSpace = false;
  3821. var space = "";
  3822. var rawSpace = "";
  3823. nodes.forEach(function(n) {
  3824. var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
  3825. var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
  3826. space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
  3827. rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
  3828. });
  3829. if (rawSpace === space) rawSpace = void 0;
  3830. return {
  3831. space,
  3832. rawSpace
  3833. };
  3834. };
  3835. _proto.isNamedCombinator = function isNamedCombinator(position) {
  3836. if (position === void 0) position = this.position;
  3837. return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;
  3838. };
  3839. _proto.namedCombinator = function namedCombinator() {
  3840. if (this.isNamedCombinator()) {
  3841. var nameRaw = this.content(this.tokens[this.position + 1]);
  3842. var name = (0, _util.unesc)(nameRaw).toLowerCase();
  3843. var raws = {};
  3844. if (name !== nameRaw) raws.value = "/" + nameRaw + "/";
  3845. var node = new _combinator["default"]({
  3846. value: "/" + name + "/",
  3847. source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
  3848. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
  3849. raws
  3850. });
  3851. this.position = this.position + 3;
  3852. return node;
  3853. } else this.unexpected();
  3854. };
  3855. _proto.combinator = function combinator() {
  3856. var _this3 = this;
  3857. if (this.content() === "|") return this.namespace();
  3858. var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
  3859. if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
  3860. var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
  3861. if (nodes.length > 0) {
  3862. var last = this.current.last;
  3863. if (last) {
  3864. var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), space = _this$convertWhitespa.space, rawSpace = _this$convertWhitespa.rawSpace;
  3865. if (rawSpace !== void 0) last.rawSpaceAfter += rawSpace;
  3866. last.spaces.after += space;
  3867. } else nodes.forEach(function(n) {
  3868. return _this3.newNode(n);
  3869. });
  3870. }
  3871. return;
  3872. }
  3873. var firstToken = this.currToken;
  3874. var spaceOrDescendantSelectorNodes = void 0;
  3875. if (nextSigTokenPos > this.position) spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
  3876. var node;
  3877. if (this.isNamedCombinator()) node = this.namedCombinator();
  3878. else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
  3879. node = new _combinator["default"]({
  3880. value: this.content(),
  3881. source: getTokenSource(this.currToken),
  3882. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]
  3883. });
  3884. this.position++;
  3885. } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {} else if (!spaceOrDescendantSelectorNodes) this.unexpected();
  3886. if (node) {
  3887. if (spaceOrDescendantSelectorNodes) {
  3888. var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), _space = _this$convertWhitespa2.space, _rawSpace = _this$convertWhitespa2.rawSpace;
  3889. node.spaces.before = _space;
  3890. node.rawSpaceBefore = _rawSpace;
  3891. }
  3892. } else {
  3893. var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), _space2 = _this$convertWhitespa3.space, _rawSpace2 = _this$convertWhitespa3.rawSpace;
  3894. if (!_rawSpace2) _rawSpace2 = _space2;
  3895. var spaces = {};
  3896. var raws = { spaces: {} };
  3897. if (_space2.endsWith(" ") && _rawSpace2.endsWith(" ")) {
  3898. spaces.before = _space2.slice(0, _space2.length - 1);
  3899. raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
  3900. } else if (_space2[0] === " " && _rawSpace2[0] === " ") {
  3901. spaces.after = _space2.slice(1);
  3902. raws.spaces.after = _rawSpace2.slice(1);
  3903. } else raws.value = _rawSpace2;
  3904. node = new _combinator["default"]({
  3905. value: " ",
  3906. source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
  3907. sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
  3908. spaces,
  3909. raws
  3910. });
  3911. }
  3912. if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {
  3913. node.spaces.after = this.optionalSpace(this.content());
  3914. this.position++;
  3915. }
  3916. return this.newNode(node);
  3917. };
  3918. _proto.comma = function comma() {
  3919. if (this.position === this.tokens.length - 1) {
  3920. this.root.trailingComma = true;
  3921. this.position++;
  3922. return;
  3923. }
  3924. this.current._inferEndPosition();
  3925. var selector = new _selector["default"]({
  3926. source: { start: tokenStart(this.tokens[this.position + 1]) },
  3927. sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS]
  3928. });
  3929. this.current.parent.append(selector);
  3930. this.current = selector;
  3931. this.position++;
  3932. };
  3933. _proto.comment = function comment() {
  3934. var current = this.currToken;
  3935. this.newNode(new _comment["default"]({
  3936. value: this.content(),
  3937. source: getTokenSource(current),
  3938. sourceIndex: current[_tokenize.FIELDS.START_POS]
  3939. }));
  3940. this.position++;
  3941. };
  3942. _proto.error = function error(message, opts) {
  3943. throw this.root.error(message, opts);
  3944. };
  3945. _proto.missingBackslash = function missingBackslash() {
  3946. return this.error("Expected a backslash preceding the semicolon.", { index: this.currToken[_tokenize.FIELDS.START_POS] });
  3947. };
  3948. _proto.missingParenthesis = function missingParenthesis() {
  3949. return this.expected("opening parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
  3950. };
  3951. _proto.missingSquareBracket = function missingSquareBracket() {
  3952. return this.expected("opening square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
  3953. };
  3954. _proto.unexpected = function unexpected() {
  3955. return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
  3956. };
  3957. _proto.unexpectedPipe = function unexpectedPipe() {
  3958. return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
  3959. };
  3960. _proto.namespace = function namespace() {
  3961. var before = this.prevToken && this.content(this.prevToken) || true;
  3962. if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
  3963. this.position++;
  3964. return this.word(before);
  3965. } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) {
  3966. this.position++;
  3967. return this.universal(before);
  3968. }
  3969. this.unexpectedPipe();
  3970. };
  3971. _proto.nesting = function nesting() {
  3972. if (this.nextToken) {
  3973. if (this.content(this.nextToken) === "|") {
  3974. this.position++;
  3975. return;
  3976. }
  3977. }
  3978. var current = this.currToken;
  3979. this.newNode(new _nesting["default"]({
  3980. value: this.content(),
  3981. source: getTokenSource(current),
  3982. sourceIndex: current[_tokenize.FIELDS.START_POS]
  3983. }));
  3984. this.position++;
  3985. };
  3986. _proto.parentheses = function parentheses() {
  3987. var last = this.current.last;
  3988. var unbalanced = 1;
  3989. this.position++;
  3990. if (last && last.type === types.PSEUDO) {
  3991. var selector = new _selector["default"]({
  3992. source: { start: tokenStart(this.tokens[this.position]) },
  3993. sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS]
  3994. });
  3995. var cache = this.current;
  3996. last.append(selector);
  3997. this.current = selector;
  3998. while (this.position < this.tokens.length && unbalanced) {
  3999. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
  4000. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
  4001. if (unbalanced) this.parse();
  4002. else {
  4003. this.current.source.end = tokenEnd(this.currToken);
  4004. this.current.parent.source.end = tokenEnd(this.currToken);
  4005. this.position++;
  4006. }
  4007. }
  4008. this.current = cache;
  4009. } else {
  4010. var parenStart = this.currToken;
  4011. var parenValue = "(";
  4012. var parenEnd;
  4013. while (this.position < this.tokens.length && unbalanced) {
  4014. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
  4015. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
  4016. parenEnd = this.currToken;
  4017. parenValue += this.parseParenthesisToken(this.currToken);
  4018. this.position++;
  4019. }
  4020. if (last) last.appendToPropertyAndEscape("value", parenValue, parenValue);
  4021. else this.newNode(new _string["default"]({
  4022. value: parenValue,
  4023. source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),
  4024. sourceIndex: parenStart[_tokenize.FIELDS.START_POS]
  4025. }));
  4026. }
  4027. if (unbalanced) return this.expected("closing parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
  4028. };
  4029. _proto.pseudo = function pseudo() {
  4030. var _this4 = this;
  4031. var pseudoStr = "";
  4032. var startingToken = this.currToken;
  4033. while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {
  4034. pseudoStr += this.content();
  4035. this.position++;
  4036. }
  4037. if (!this.currToken) return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
  4038. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) this.splitWord(false, function(first, length) {
  4039. pseudoStr += first;
  4040. _this4.newNode(new _pseudo["default"]({
  4041. value: pseudoStr,
  4042. source: getTokenSourceSpan(startingToken, _this4.currToken),
  4043. sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
  4044. }));
  4045. if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) _this4.error("Misplaced parenthesis.", { index: _this4.nextToken[_tokenize.FIELDS.START_POS] });
  4046. });
  4047. else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[_tokenize.FIELDS.START_POS]);
  4048. };
  4049. _proto.space = function space() {
  4050. var content = this.content();
  4051. if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
  4052. return node.type === "comment";
  4053. })) {
  4054. this.spaces = this.optionalSpace(content);
  4055. this.position++;
  4056. } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
  4057. this.current.last.spaces.after = this.optionalSpace(content);
  4058. this.position++;
  4059. } else this.combinator();
  4060. };
  4061. _proto.string = function string() {
  4062. var current = this.currToken;
  4063. this.newNode(new _string["default"]({
  4064. value: this.content(),
  4065. source: getTokenSource(current),
  4066. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4067. }));
  4068. this.position++;
  4069. };
  4070. _proto.universal = function universal(namespace) {
  4071. var nextToken = this.nextToken;
  4072. if (nextToken && this.content(nextToken) === "|") {
  4073. this.position++;
  4074. return this.namespace();
  4075. }
  4076. var current = this.currToken;
  4077. this.newNode(new _universal["default"]({
  4078. value: this.content(),
  4079. source: getTokenSource(current),
  4080. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4081. }), namespace);
  4082. this.position++;
  4083. };
  4084. _proto.splitWord = function splitWord(namespace, firstCallback) {
  4085. var _this5 = this;
  4086. var nextToken = this.nextToken;
  4087. var word = this.content();
  4088. while (nextToken && ~[
  4089. tokens.dollar,
  4090. tokens.caret,
  4091. tokens.equals,
  4092. tokens.word
  4093. ].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
  4094. this.position++;
  4095. var current = this.content();
  4096. word += current;
  4097. if (current.lastIndexOf("\\") === current.length - 1) {
  4098. var next = this.nextToken;
  4099. if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
  4100. word += this.requiredSpace(this.content(next));
  4101. this.position++;
  4102. }
  4103. }
  4104. nextToken = this.nextToken;
  4105. }
  4106. var hasClass = indexesOf(word, ".").filter(function(i) {
  4107. var escapedDot = word[i - 1] === "\\";
  4108. var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
  4109. return !escapedDot && !isKeyframesPercent;
  4110. });
  4111. var hasId = indexesOf(word, "#").filter(function(i) {
  4112. return word[i - 1] !== "\\";
  4113. });
  4114. var interpolations = indexesOf(word, "#{");
  4115. if (interpolations.length) hasId = hasId.filter(function(hashIndex) {
  4116. return !~interpolations.indexOf(hashIndex);
  4117. });
  4118. var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
  4119. indices.forEach(function(ind, i) {
  4120. var index = indices[i + 1] || word.length;
  4121. var value = word.slice(ind, index);
  4122. if (i === 0 && firstCallback) return firstCallback.call(_this5, value, indices.length);
  4123. var node;
  4124. var current = _this5.currToken;
  4125. var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i];
  4126. var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));
  4127. if (~hasClass.indexOf(ind)) {
  4128. var classNameOpts = {
  4129. value: value.slice(1),
  4130. source,
  4131. sourceIndex
  4132. };
  4133. node = new _className["default"](unescapeProp(classNameOpts, "value"));
  4134. } else if (~hasId.indexOf(ind)) {
  4135. var idOpts = {
  4136. value: value.slice(1),
  4137. source,
  4138. sourceIndex
  4139. };
  4140. node = new _id["default"](unescapeProp(idOpts, "value"));
  4141. } else {
  4142. var tagOpts = {
  4143. value,
  4144. source,
  4145. sourceIndex
  4146. };
  4147. unescapeProp(tagOpts, "value");
  4148. node = new _tag["default"](tagOpts);
  4149. }
  4150. _this5.newNode(node, namespace);
  4151. namespace = null;
  4152. });
  4153. this.position++;
  4154. };
  4155. _proto.word = function word(namespace) {
  4156. var nextToken = this.nextToken;
  4157. if (nextToken && this.content(nextToken) === "|") {
  4158. this.position++;
  4159. return this.namespace();
  4160. }
  4161. return this.splitWord(namespace);
  4162. };
  4163. _proto.loop = function loop() {
  4164. while (this.position < this.tokens.length) this.parse(true);
  4165. this.current._inferEndPosition();
  4166. return this.root;
  4167. };
  4168. _proto.parse = function parse(throwOnParenthesis) {
  4169. switch (this.currToken[_tokenize.FIELDS.TYPE]) {
  4170. case tokens.space:
  4171. this.space();
  4172. break;
  4173. case tokens.comment:
  4174. this.comment();
  4175. break;
  4176. case tokens.openParenthesis:
  4177. this.parentheses();
  4178. break;
  4179. case tokens.closeParenthesis:
  4180. if (throwOnParenthesis) this.missingParenthesis();
  4181. break;
  4182. case tokens.openSquare:
  4183. this.attribute();
  4184. break;
  4185. case tokens.dollar:
  4186. case tokens.caret:
  4187. case tokens.equals:
  4188. case tokens.word:
  4189. this.word();
  4190. break;
  4191. case tokens.colon:
  4192. this.pseudo();
  4193. break;
  4194. case tokens.comma:
  4195. this.comma();
  4196. break;
  4197. case tokens.asterisk:
  4198. this.universal();
  4199. break;
  4200. case tokens.ampersand:
  4201. this.nesting();
  4202. break;
  4203. case tokens.slash:
  4204. case tokens.combinator:
  4205. this.combinator();
  4206. break;
  4207. case tokens.str:
  4208. this.string();
  4209. break;
  4210. case tokens.closeSquare: this.missingSquareBracket();
  4211. case tokens.semicolon: this.missingBackslash();
  4212. default: this.unexpected();
  4213. }
  4214. };
  4215. _proto.expected = function expected(description, index, found) {
  4216. if (Array.isArray(description)) {
  4217. var last = description.pop();
  4218. description = description.join(", ") + " or " + last;
  4219. }
  4220. var an = /^[aeiou]/.test(description[0]) ? "an" : "a";
  4221. if (!found) return this.error("Expected " + an + " " + description + ".", { index });
  4222. return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { index });
  4223. };
  4224. _proto.requiredSpace = function requiredSpace(space) {
  4225. return this.options.lossy ? " " : space;
  4226. };
  4227. _proto.optionalSpace = function optionalSpace(space) {
  4228. return this.options.lossy ? "" : space;
  4229. };
  4230. _proto.lossySpace = function lossySpace(space, required) {
  4231. if (this.options.lossy) return required ? " " : "";
  4232. else return space;
  4233. };
  4234. _proto.parseParenthesisToken = function parseParenthesisToken(token) {
  4235. var content = this.content(token);
  4236. if (token[_tokenize.FIELDS.TYPE] === tokens.space) return this.requiredSpace(content);
  4237. else return content;
  4238. };
  4239. _proto.newNode = function newNode(node, namespace) {
  4240. if (namespace) {
  4241. if (/^ +$/.test(namespace)) {
  4242. if (!this.options.lossy) this.spaces = (this.spaces || "") + namespace;
  4243. namespace = true;
  4244. }
  4245. node.namespace = namespace;
  4246. unescapeProp(node, "namespace");
  4247. }
  4248. if (this.spaces) {
  4249. node.spaces.before = this.spaces;
  4250. this.spaces = "";
  4251. }
  4252. return this.current.append(node);
  4253. };
  4254. _proto.content = function content(token) {
  4255. if (token === void 0) token = this.currToken;
  4256. return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);
  4257. };
  4258. /**
  4259. * returns the index of the next non-whitespace, non-comment token.
  4260. * returns -1 if no meaningful token is found.
  4261. */
  4262. _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) {
  4263. if (startPosition === void 0) startPosition = this.position + 1;
  4264. var searchPosition = startPosition;
  4265. while (searchPosition < this.tokens.length) if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {
  4266. searchPosition++;
  4267. continue;
  4268. } else return searchPosition;
  4269. return -1;
  4270. };
  4271. _createClass(Parser, [
  4272. {
  4273. key: "currToken",
  4274. get: function get() {
  4275. return this.tokens[this.position];
  4276. }
  4277. },
  4278. {
  4279. key: "nextToken",
  4280. get: function get() {
  4281. return this.tokens[this.position + 1];
  4282. }
  4283. },
  4284. {
  4285. key: "prevToken",
  4286. get: function get() {
  4287. return this.tokens[this.position - 1];
  4288. }
  4289. }
  4290. ]);
  4291. return Parser;
  4292. }();
  4293. module.exports = exports.default;
  4294. }));
  4295. //#endregion
  4296. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/processor.js
  4297. var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4298. exports.__esModule = true;
  4299. exports["default"] = void 0;
  4300. var _parser = _interopRequireDefault(require_parser());
  4301. function _interopRequireDefault(obj) {
  4302. return obj && obj.__esModule ? obj : { "default": obj };
  4303. }
  4304. exports["default"] = /* @__PURE__ */ function() {
  4305. function Processor(func, options) {
  4306. this.func = func || function noop() {};
  4307. this.funcRes = null;
  4308. this.options = options;
  4309. }
  4310. var _proto = Processor.prototype;
  4311. _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
  4312. if (options === void 0) options = {};
  4313. if (Object.assign({}, this.options, options).updateSelector === false) return false;
  4314. else return typeof rule !== "string";
  4315. };
  4316. _proto._isLossy = function _isLossy(options) {
  4317. if (options === void 0) options = {};
  4318. if (Object.assign({}, this.options, options).lossless === false) return true;
  4319. else return false;
  4320. };
  4321. _proto._root = function _root(rule, options) {
  4322. if (options === void 0) options = {};
  4323. return new _parser["default"](rule, this._parseOptions(options)).root;
  4324. };
  4325. _proto._parseOptions = function _parseOptions(options) {
  4326. return { lossy: this._isLossy(options) };
  4327. };
  4328. _proto._run = function _run(rule, options) {
  4329. var _this = this;
  4330. if (options === void 0) options = {};
  4331. return new Promise(function(resolve, reject) {
  4332. try {
  4333. var root = _this._root(rule, options);
  4334. Promise.resolve(_this.func(root)).then(function(transform) {
  4335. var string = void 0;
  4336. if (_this._shouldUpdateSelector(rule, options)) {
  4337. string = root.toString();
  4338. rule.selector = string;
  4339. }
  4340. return {
  4341. transform,
  4342. root,
  4343. string
  4344. };
  4345. }).then(resolve, reject);
  4346. } catch (e) {
  4347. reject(e);
  4348. return;
  4349. }
  4350. });
  4351. };
  4352. _proto._runSync = function _runSync(rule, options) {
  4353. if (options === void 0) options = {};
  4354. var root = this._root(rule, options);
  4355. var transform = this.func(root);
  4356. if (transform && typeof transform.then === "function") throw new Error("Selector processor returned a promise to a synchronous call.");
  4357. var string = void 0;
  4358. if (options.updateSelector && typeof rule !== "string") {
  4359. string = root.toString();
  4360. rule.selector = string;
  4361. }
  4362. return {
  4363. transform,
  4364. root,
  4365. string
  4366. };
  4367. };
  4368. _proto.ast = function ast(rule, options) {
  4369. return this._run(rule, options).then(function(result) {
  4370. return result.root;
  4371. });
  4372. };
  4373. _proto.astSync = function astSync(rule, options) {
  4374. return this._runSync(rule, options).root;
  4375. };
  4376. _proto.transform = function transform(rule, options) {
  4377. return this._run(rule, options).then(function(result) {
  4378. return result.transform;
  4379. });
  4380. };
  4381. _proto.transformSync = function transformSync(rule, options) {
  4382. return this._runSync(rule, options).transform;
  4383. };
  4384. _proto.process = function process(rule, options) {
  4385. return this._run(rule, options).then(function(result) {
  4386. return result.string || result.root.toString();
  4387. });
  4388. };
  4389. _proto.processSync = function processSync(rule, options) {
  4390. var result = this._runSync(rule, options);
  4391. return result.string || result.root.toString();
  4392. };
  4393. return Processor;
  4394. }();
  4395. module.exports = exports.default;
  4396. }));
  4397. //#endregion
  4398. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/constructors.js
  4399. var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
  4400. exports.__esModule = true;
  4401. exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
  4402. var _attribute = _interopRequireDefault(require_attribute());
  4403. var _className = _interopRequireDefault(require_className());
  4404. var _combinator = _interopRequireDefault(require_combinator());
  4405. var _comment = _interopRequireDefault(require_comment());
  4406. var _id = _interopRequireDefault(require_id());
  4407. var _nesting = _interopRequireDefault(require_nesting());
  4408. var _pseudo = _interopRequireDefault(require_pseudo());
  4409. var _root = _interopRequireDefault(require_root());
  4410. var _selector = _interopRequireDefault(require_selector());
  4411. var _string = _interopRequireDefault(require_string());
  4412. var _tag = _interopRequireDefault(require_tag());
  4413. var _universal = _interopRequireDefault(require_universal());
  4414. function _interopRequireDefault(obj) {
  4415. return obj && obj.__esModule ? obj : { "default": obj };
  4416. }
  4417. exports.attribute = function attribute(opts) {
  4418. return new _attribute["default"](opts);
  4419. };
  4420. exports.className = function className(opts) {
  4421. return new _className["default"](opts);
  4422. };
  4423. exports.combinator = function combinator(opts) {
  4424. return new _combinator["default"](opts);
  4425. };
  4426. exports.comment = function comment(opts) {
  4427. return new _comment["default"](opts);
  4428. };
  4429. exports.id = function id(opts) {
  4430. return new _id["default"](opts);
  4431. };
  4432. exports.nesting = function nesting(opts) {
  4433. return new _nesting["default"](opts);
  4434. };
  4435. exports.pseudo = function pseudo(opts) {
  4436. return new _pseudo["default"](opts);
  4437. };
  4438. exports.root = function root(opts) {
  4439. return new _root["default"](opts);
  4440. };
  4441. exports.selector = function selector(opts) {
  4442. return new _selector["default"](opts);
  4443. };
  4444. exports.string = function string(opts) {
  4445. return new _string["default"](opts);
  4446. };
  4447. exports.tag = function tag(opts) {
  4448. return new _tag["default"](opts);
  4449. };
  4450. exports.universal = function universal(opts) {
  4451. return new _universal["default"](opts);
  4452. };
  4453. }));
  4454. //#endregion
  4455. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/guards.js
  4456. var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
  4457. exports.__esModule = true;
  4458. exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;
  4459. exports.isContainer = isContainer;
  4460. exports.isIdentifier = void 0;
  4461. exports.isNamespace = isNamespace;
  4462. exports.isNesting = void 0;
  4463. exports.isNode = isNode;
  4464. exports.isPseudo = void 0;
  4465. exports.isPseudoClass = isPseudoClass;
  4466. exports.isPseudoElement = isPseudoElement;
  4467. exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0;
  4468. var _types = require_types();
  4469. var _IS_TYPE;
  4470. var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);
  4471. function isNode(node) {
  4472. return typeof node === "object" && IS_TYPE[node.type];
  4473. }
  4474. function isNodeType(type, node) {
  4475. return isNode(node) && node.type === type;
  4476. }
  4477. var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);
  4478. exports.isAttribute = isAttribute;
  4479. exports.isClassName = isNodeType.bind(null, _types.CLASS);
  4480. exports.isCombinator = isNodeType.bind(null, _types.COMBINATOR);
  4481. exports.isComment = isNodeType.bind(null, _types.COMMENT);
  4482. exports.isIdentifier = isNodeType.bind(null, _types.ID);
  4483. exports.isNesting = isNodeType.bind(null, _types.NESTING);
  4484. var isPseudo = isNodeType.bind(null, _types.PSEUDO);
  4485. exports.isPseudo = isPseudo;
  4486. exports.isRoot = isNodeType.bind(null, _types.ROOT);
  4487. exports.isSelector = isNodeType.bind(null, _types.SELECTOR);
  4488. exports.isString = isNodeType.bind(null, _types.STRING);
  4489. var isTag = isNodeType.bind(null, _types.TAG);
  4490. exports.isTag = isTag;
  4491. exports.isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
  4492. function isPseudoElement(node) {
  4493. return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
  4494. }
  4495. function isPseudoClass(node) {
  4496. return isPseudo(node) && !isPseudoElement(node);
  4497. }
  4498. function isContainer(node) {
  4499. return !!(isNode(node) && node.walk);
  4500. }
  4501. function isNamespace(node) {
  4502. return isAttribute(node) || isTag(node);
  4503. }
  4504. }));
  4505. //#endregion
  4506. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/index.js
  4507. var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
  4508. exports.__esModule = true;
  4509. var _types = require_types();
  4510. Object.keys(_types).forEach(function(key) {
  4511. if (key === "default" || key === "__esModule") return;
  4512. if (key in exports && exports[key] === _types[key]) return;
  4513. exports[key] = _types[key];
  4514. });
  4515. var _constructors = require_constructors();
  4516. Object.keys(_constructors).forEach(function(key) {
  4517. if (key === "default" || key === "__esModule") return;
  4518. if (key in exports && exports[key] === _constructors[key]) return;
  4519. exports[key] = _constructors[key];
  4520. });
  4521. var _guards = require_guards();
  4522. Object.keys(_guards).forEach(function(key) {
  4523. if (key === "default" || key === "__esModule") return;
  4524. if (key in exports && exports[key] === _guards[key]) return;
  4525. exports[key] = _guards[key];
  4526. });
  4527. }));
  4528. //#endregion
  4529. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/index.js
  4530. var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4531. exports.__esModule = true;
  4532. exports["default"] = void 0;
  4533. var _processor = _interopRequireDefault(require_processor());
  4534. var selectors = _interopRequireWildcard(require_selectors());
  4535. function _getRequireWildcardCache(nodeInterop) {
  4536. if (typeof WeakMap !== "function") return null;
  4537. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  4538. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  4539. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  4540. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  4541. })(nodeInterop);
  4542. }
  4543. function _interopRequireWildcard(obj, nodeInterop) {
  4544. if (!nodeInterop && obj && obj.__esModule) return obj;
  4545. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  4546. var cache = _getRequireWildcardCache(nodeInterop);
  4547. if (cache && cache.has(obj)) return cache.get(obj);
  4548. var newObj = {};
  4549. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  4550. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  4551. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  4552. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  4553. else newObj[key] = obj[key];
  4554. }
  4555. newObj["default"] = obj;
  4556. if (cache) cache.set(obj, newObj);
  4557. return newObj;
  4558. }
  4559. function _interopRequireDefault(obj) {
  4560. return obj && obj.__esModule ? obj : { "default": obj };
  4561. }
  4562. var parser = function parser(processor) {
  4563. return new _processor["default"](processor);
  4564. };
  4565. Object.assign(parser, selectors);
  4566. exports["default"] = parser;
  4567. module.exports = exports.default;
  4568. }));
  4569. //#endregion
  4570. //#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.8/node_modules/postcss-modules-local-by-default/src/index.js
  4571. var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4572. const selectorParser = require_dist();
  4573. const valueParser = require_lib();
  4574. const { extractICSS } = require_src$4();
  4575. const IGNORE_FILE_MARKER = "cssmodules-pure-no-check";
  4576. const IGNORE_NEXT_LINE_MARKER = "cssmodules-pure-ignore";
  4577. const isSpacing = (node) => node.type === "combinator" && node.value === " ";
  4578. const isPureCheckDisabled = (root) => {
  4579. for (const node of root.nodes) {
  4580. if (node.type !== "comment") return false;
  4581. if (node.text.trim().startsWith(IGNORE_FILE_MARKER)) return true;
  4582. }
  4583. return false;
  4584. };
  4585. function getIgnoreComment(node) {
  4586. if (!node.parent) return;
  4587. const indexInParent = node.parent.index(node);
  4588. for (let i = indexInParent - 1; i >= 0; i--) {
  4589. const prevNode = node.parent.nodes[i];
  4590. if (prevNode.type === "comment") {
  4591. if (prevNode.text.trimStart().startsWith(IGNORE_NEXT_LINE_MARKER)) return prevNode;
  4592. } else break;
  4593. }
  4594. }
  4595. function normalizeNodeArray(nodes) {
  4596. const array = [];
  4597. nodes.forEach((x) => {
  4598. if (Array.isArray(x)) normalizeNodeArray(x).forEach((item) => {
  4599. array.push(item);
  4600. });
  4601. else if (x) array.push(x);
  4602. });
  4603. if (array.length > 0 && isSpacing(array[array.length - 1])) array.pop();
  4604. return array;
  4605. }
  4606. const isPureSelectorSymbol = Symbol("is-pure-selector");
  4607. function localizeNode(rule, mode, localAliasMap) {
  4608. const transform = (node, context) => {
  4609. if (context.ignoreNextSpacing && !isSpacing(node)) throw new Error("Missing whitespace after " + context.ignoreNextSpacing);
  4610. if (context.enforceNoSpacing && isSpacing(node)) throw new Error("Missing whitespace before " + context.enforceNoSpacing);
  4611. let newNodes;
  4612. switch (node.type) {
  4613. case "root": {
  4614. let resultingGlobal;
  4615. context.hasPureGlobals = false;
  4616. newNodes = node.nodes.map((n) => {
  4617. const nContext = {
  4618. global: context.global,
  4619. lastWasSpacing: true,
  4620. hasLocals: false,
  4621. explicit: false
  4622. };
  4623. n = transform(n, nContext);
  4624. if (typeof resultingGlobal === "undefined") resultingGlobal = nContext.global;
  4625. else if (resultingGlobal !== nContext.global) throw new Error("Inconsistent rule global/local result in rule \"" + node + "\" (multiple selectors must result in the same mode for the rule)");
  4626. if (!nContext.hasLocals) context.hasPureGlobals = true;
  4627. return n;
  4628. });
  4629. context.global = resultingGlobal;
  4630. node.nodes = normalizeNodeArray(newNodes);
  4631. break;
  4632. }
  4633. case "selector":
  4634. newNodes = node.map((childNode) => transform(childNode, context));
  4635. node = node.clone();
  4636. node.nodes = normalizeNodeArray(newNodes);
  4637. break;
  4638. case "combinator":
  4639. if (isSpacing(node)) {
  4640. if (context.ignoreNextSpacing) {
  4641. context.ignoreNextSpacing = false;
  4642. context.lastWasSpacing = false;
  4643. context.enforceNoSpacing = false;
  4644. return null;
  4645. }
  4646. context.lastWasSpacing = true;
  4647. return node;
  4648. }
  4649. break;
  4650. case "pseudo": {
  4651. let childContext;
  4652. const isNested = !!node.length;
  4653. const isScoped = node.value === ":local" || node.value === ":global";
  4654. if (node.value === ":import" || node.value === ":export") context.hasLocals = true;
  4655. else if (isNested) {
  4656. if (isScoped) {
  4657. if (node.nodes.length === 0) throw new Error(`${node.value}() can't be empty`);
  4658. if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`);
  4659. childContext = {
  4660. global: node.value === ":global",
  4661. inside: node.value,
  4662. hasLocals: false,
  4663. explicit: true
  4664. };
  4665. newNodes = node.map((childNode) => transform(childNode, childContext)).reduce((acc, next) => acc.concat(next.nodes), []);
  4666. if (newNodes.length) {
  4667. const { before, after } = node.spaces;
  4668. const first = newNodes[0];
  4669. const last = newNodes[newNodes.length - 1];
  4670. first.spaces = {
  4671. before,
  4672. after: first.spaces.after
  4673. };
  4674. last.spaces = {
  4675. before: last.spaces.before,
  4676. after
  4677. };
  4678. }
  4679. node = newNodes;
  4680. break;
  4681. } else {
  4682. childContext = {
  4683. global: context.global,
  4684. inside: context.inside,
  4685. lastWasSpacing: true,
  4686. hasLocals: false,
  4687. explicit: context.explicit
  4688. };
  4689. newNodes = node.map((childNode) => {
  4690. const newContext = {
  4691. ...childContext,
  4692. enforceNoSpacing: false
  4693. };
  4694. const result = transform(childNode, newContext);
  4695. childContext.global = newContext.global;
  4696. childContext.hasLocals = newContext.hasLocals;
  4697. return result;
  4698. });
  4699. node = node.clone();
  4700. node.nodes = normalizeNodeArray(newNodes);
  4701. if (childContext.hasLocals) context.hasLocals = true;
  4702. }
  4703. break;
  4704. } else if (isScoped) {
  4705. if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`);
  4706. const addBackSpacing = !!node.spaces.before;
  4707. context.ignoreNextSpacing = context.lastWasSpacing ? node.value : false;
  4708. context.enforceNoSpacing = context.lastWasSpacing ? false : node.value;
  4709. context.global = node.value === ":global";
  4710. context.explicit = true;
  4711. return addBackSpacing ? selectorParser.combinator({ value: " " }) : null;
  4712. }
  4713. break;
  4714. }
  4715. case "id":
  4716. case "class": {
  4717. if (!node.value) throw new Error("Invalid class or id selector syntax");
  4718. if (context.global) break;
  4719. const isImportedValue = localAliasMap.has(node.value);
  4720. if (!isImportedValue || isImportedValue && context.explicit) {
  4721. const innerNode = node.clone();
  4722. innerNode.spaces = {
  4723. before: "",
  4724. after: ""
  4725. };
  4726. node = selectorParser.pseudo({
  4727. value: ":local",
  4728. nodes: [innerNode],
  4729. spaces: node.spaces
  4730. });
  4731. context.hasLocals = true;
  4732. }
  4733. break;
  4734. }
  4735. case "nesting": if (node.value === "&") context.hasLocals = rule.parent[isPureSelectorSymbol];
  4736. }
  4737. context.lastWasSpacing = false;
  4738. context.ignoreNextSpacing = false;
  4739. context.enforceNoSpacing = false;
  4740. return node;
  4741. };
  4742. const rootContext = {
  4743. global: mode === "global",
  4744. hasPureGlobals: false
  4745. };
  4746. rootContext.selector = selectorParser((root) => {
  4747. transform(root, rootContext);
  4748. }).processSync(rule, {
  4749. updateSelector: false,
  4750. lossless: true
  4751. });
  4752. return rootContext;
  4753. }
  4754. function localizeDeclNode(node, context) {
  4755. switch (node.type) {
  4756. case "word":
  4757. if (context.localizeNextItem) {
  4758. if (!context.localAliasMap.has(node.value)) {
  4759. node.value = ":local(" + node.value + ")";
  4760. context.localizeNextItem = false;
  4761. }
  4762. }
  4763. break;
  4764. case "function":
  4765. if (context.options && context.options.rewriteUrl && node.value.toLowerCase() === "url") node.nodes.map((nestedNode) => {
  4766. if (nestedNode.type !== "string" && nestedNode.type !== "word") return;
  4767. let newUrl = context.options.rewriteUrl(context.global, nestedNode.value);
  4768. switch (nestedNode.type) {
  4769. case "string":
  4770. if (nestedNode.quote === "'") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/'/g, "\\'");
  4771. if (nestedNode.quote === "\"") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/"/g, "\\\"");
  4772. break;
  4773. case "word":
  4774. newUrl = newUrl.replace(/("|'|\)|\\)/g, "\\$1");
  4775. break;
  4776. }
  4777. nestedNode.value = newUrl;
  4778. });
  4779. break;
  4780. }
  4781. return node;
  4782. }
  4783. const specialKeywords = [
  4784. "none",
  4785. "inherit",
  4786. "initial",
  4787. "revert",
  4788. "revert-layer",
  4789. "unset"
  4790. ];
  4791. function localizeDeclarationValues(localize, declaration, context) {
  4792. const valueNodes = valueParser(declaration.value);
  4793. valueNodes.walk((node, index, nodes) => {
  4794. if (node.type === "function" && (node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env")) return false;
  4795. if (node.type === "word" && specialKeywords.includes(node.value.toLowerCase())) return;
  4796. nodes[index] = localizeDeclNode(node, {
  4797. options: context.options,
  4798. global: context.global,
  4799. localizeNextItem: localize && !context.global,
  4800. localAliasMap: context.localAliasMap
  4801. });
  4802. });
  4803. declaration.value = valueNodes.toString();
  4804. }
  4805. const validIdent = /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-(?![0-9]))((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i;
  4806. const animationKeywords = {
  4807. $normal: 1,
  4808. $reverse: 1,
  4809. $alternate: 1,
  4810. "$alternate-reverse": 1,
  4811. $forwards: 1,
  4812. $backwards: 1,
  4813. $both: 1,
  4814. $infinite: 1,
  4815. $paused: 1,
  4816. $running: 1,
  4817. $ease: 1,
  4818. "$ease-in": 1,
  4819. "$ease-out": 1,
  4820. "$ease-in-out": 1,
  4821. $linear: 1,
  4822. "$step-end": 1,
  4823. "$step-start": 1,
  4824. $none: Infinity,
  4825. $initial: Infinity,
  4826. $inherit: Infinity,
  4827. $unset: Infinity,
  4828. $revert: Infinity,
  4829. "$revert-layer": Infinity
  4830. };
  4831. function localizeDeclaration(declaration, context) {
  4832. if (/animation(-name)?$/i.test(declaration.prop)) {
  4833. let parsedAnimationKeywords = {};
  4834. declaration.value = valueParser(declaration.value).walk((node) => {
  4835. if (node.type === "div") {
  4836. parsedAnimationKeywords = {};
  4837. return;
  4838. } else if (node.type === "function" && node.value.toLowerCase() === "local" && node.nodes.length === 1) {
  4839. node.type = "word";
  4840. node.value = node.nodes[0].value;
  4841. return localizeDeclNode(node, {
  4842. options: context.options,
  4843. global: context.global,
  4844. localizeNextItem: true,
  4845. localAliasMap: context.localAliasMap
  4846. });
  4847. } else if (node.type === "function") {
  4848. if (node.value.toLowerCase() === "global" && node.nodes.length === 1) {
  4849. node.type = "word";
  4850. node.value = node.nodes[0].value;
  4851. }
  4852. return false;
  4853. } else if (node.type !== "word") return;
  4854. const value = node.type === "word" ? node.value.toLowerCase() : null;
  4855. let shouldParseAnimationName = false;
  4856. if (value && validIdent.test(value)) if ("$" + value in animationKeywords) {
  4857. parsedAnimationKeywords["$" + value] = "$" + value in parsedAnimationKeywords ? parsedAnimationKeywords["$" + value] + 1 : 0;
  4858. shouldParseAnimationName = parsedAnimationKeywords["$" + value] >= animationKeywords["$" + value];
  4859. } else shouldParseAnimationName = true;
  4860. return localizeDeclNode(node, {
  4861. options: context.options,
  4862. global: context.global,
  4863. localizeNextItem: shouldParseAnimationName && !context.global,
  4864. localAliasMap: context.localAliasMap
  4865. });
  4866. }).toString();
  4867. return;
  4868. }
  4869. if (/url\(/i.test(declaration.value)) return localizeDeclarationValues(false, declaration, context);
  4870. }
  4871. const isPureSelector = (context, rule) => {
  4872. if (!rule.parent || rule.type === "root") return !context.hasPureGlobals;
  4873. if (rule.type === "rule" && rule[isPureSelectorSymbol]) return rule[isPureSelectorSymbol] || isPureSelector(context, rule.parent);
  4874. return !context.hasPureGlobals || isPureSelector(context, rule.parent);
  4875. };
  4876. const isNodeWithoutDeclarations = (rule) => {
  4877. if (rule.nodes.length > 0) return !rule.nodes.every((item) => item.type === "rule" || item.type === "atrule" && !isNodeWithoutDeclarations(item));
  4878. return true;
  4879. };
  4880. module.exports = (options = {}) => {
  4881. if (options && options.mode && options.mode !== "global" && options.mode !== "local" && options.mode !== "pure") throw new Error("options.mode must be either \"global\", \"local\" or \"pure\" (default \"local\")");
  4882. const pureMode = options && options.mode === "pure";
  4883. const globalMode = options && options.mode === "global";
  4884. return {
  4885. postcssPlugin: "postcss-modules-local-by-default",
  4886. prepare() {
  4887. const localAliasMap = /* @__PURE__ */ new Map();
  4888. return { Once(root) {
  4889. const { icssImports } = extractICSS(root, false);
  4890. const enforcePureMode = pureMode && !isPureCheckDisabled(root);
  4891. Object.keys(icssImports).forEach((key) => {
  4892. Object.keys(icssImports[key]).forEach((prop) => {
  4893. localAliasMap.set(prop, icssImports[key][prop]);
  4894. });
  4895. });
  4896. root.walkAtRules((atRule) => {
  4897. if (/keyframes$/i.test(atRule.name)) {
  4898. const globalMatch = /^\s*:global\s*\((.+)\)\s*$/.exec(atRule.params);
  4899. const localMatch = /^\s*:local\s*\((.+)\)\s*$/.exec(atRule.params);
  4900. let globalKeyframes = globalMode;
  4901. if (globalMatch) {
  4902. if (enforcePureMode) {
  4903. const ignoreComment = getIgnoreComment(atRule);
  4904. if (!ignoreComment) throw atRule.error("@keyframes :global(...) is not allowed in pure mode");
  4905. else ignoreComment.remove();
  4906. }
  4907. atRule.params = globalMatch[1];
  4908. globalKeyframes = true;
  4909. } else if (localMatch) {
  4910. atRule.params = localMatch[0];
  4911. globalKeyframes = false;
  4912. } else if (atRule.params && !globalMode && !localAliasMap.has(atRule.params)) atRule.params = ":local(" + atRule.params + ")";
  4913. atRule.walkDecls((declaration) => {
  4914. localizeDeclaration(declaration, {
  4915. localAliasMap,
  4916. options,
  4917. global: globalKeyframes
  4918. });
  4919. });
  4920. } else if (/scope$/i.test(atRule.name)) {
  4921. if (atRule.params) {
  4922. const ignoreComment = pureMode ? getIgnoreComment(atRule) : void 0;
  4923. if (ignoreComment) ignoreComment.remove();
  4924. atRule.params = atRule.params.split("to").map((item) => {
  4925. const selector = item.trim().slice(1, -1).trim();
  4926. const context = localizeNode(selector, options.mode, localAliasMap);
  4927. context.options = options;
  4928. context.localAliasMap = localAliasMap;
  4929. if (enforcePureMode && context.hasPureGlobals && !ignoreComment) throw atRule.error("Selector in at-rule\"" + selector + "\" is not pure (pure selectors must contain at least one local class or id)");
  4930. return `(${context.selector})`;
  4931. }).join(" to ");
  4932. }
  4933. atRule.nodes.forEach((declaration) => {
  4934. if (declaration.type === "decl") localizeDeclaration(declaration, {
  4935. localAliasMap,
  4936. options,
  4937. global: globalMode
  4938. });
  4939. });
  4940. } else if (atRule.nodes) atRule.nodes.forEach((declaration) => {
  4941. if (declaration.type === "decl") localizeDeclaration(declaration, {
  4942. localAliasMap,
  4943. options,
  4944. global: globalMode
  4945. });
  4946. });
  4947. });
  4948. root.walkRules((rule) => {
  4949. if (rule.parent && rule.parent.type === "atrule" && /keyframes$/i.test(rule.parent.name)) return;
  4950. const context = localizeNode(rule, options.mode, localAliasMap);
  4951. context.options = options;
  4952. context.localAliasMap = localAliasMap;
  4953. const ignoreComment = enforcePureMode ? getIgnoreComment(rule) : void 0;
  4954. const isNotPure = enforcePureMode && !isPureSelector(context, rule);
  4955. if (isNotPure && isNodeWithoutDeclarations(rule) && !ignoreComment) throw rule.error("Selector \"" + rule.selector + "\" is not pure (pure selectors must contain at least one local class or id)");
  4956. else if (ignoreComment) ignoreComment.remove();
  4957. if (pureMode) rule[isPureSelectorSymbol] = !isNotPure;
  4958. rule.selector = context.selector;
  4959. if (rule.nodes) rule.nodes.forEach((declaration) => localizeDeclaration(declaration, context));
  4960. });
  4961. } };
  4962. }
  4963. };
  4964. };
  4965. module.exports.postcss = true;
  4966. }));
  4967. //#endregion
  4968. //#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.8/node_modules/postcss-modules-scope/src/index.js
  4969. var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4970. const selectorParser = require_dist();
  4971. const hasOwnProperty = Object.prototype.hasOwnProperty;
  4972. function isNestedRule(rule) {
  4973. if (!rule.parent || rule.parent.type === "root") return false;
  4974. if (rule.parent.type === "rule") return true;
  4975. return isNestedRule(rule.parent);
  4976. }
  4977. function getSingleLocalNamesForComposes(root, rule) {
  4978. if (isNestedRule(rule)) throw new Error(`composition is not allowed in nested rule \n\n${rule}`);
  4979. return root.nodes.map((node) => {
  4980. if (node.type !== "selector" || node.nodes.length !== 1) throw new Error(`composition is only allowed when selector is single :local class name not in "${root}"`);
  4981. node = node.nodes[0];
  4982. if (node.type !== "pseudo" || node.value !== ":local" || node.nodes.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
  4983. node = node.first;
  4984. if (node.type !== "selector" || node.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
  4985. node = node.first;
  4986. if (node.type !== "class") throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
  4987. return node.value;
  4988. });
  4989. }
  4990. const unescapeRegExp = /* @__PURE__ */ new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)", "ig");
  4991. function unescape(str) {
  4992. return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => {
  4993. const high = "0x" + escaped - 65536;
  4994. return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
  4995. });
  4996. }
  4997. const plugin = (options = {}) => {
  4998. const generateScopedName = options && options.generateScopedName || plugin.generateScopedName;
  4999. const generateExportEntry = options && options.generateExportEntry || plugin.generateExportEntry;
  5000. const exportGlobals = options && options.exportGlobals;
  5001. return {
  5002. postcssPlugin: "postcss-modules-scope",
  5003. Once(root, { rule }) {
  5004. const exports$1 = Object.create(null);
  5005. function exportScopedName(name, rawName, node) {
  5006. const scopedName = generateScopedName(rawName ? rawName : name, root.source.input.from, root.source.input.css, node);
  5007. const { key, value } = generateExportEntry(rawName ? rawName : name, scopedName, root.source.input.from, root.source.input.css, node);
  5008. exports$1[key] = exports$1[key] || [];
  5009. if (exports$1[key].indexOf(value) < 0) exports$1[key].push(value);
  5010. return scopedName;
  5011. }
  5012. function localizeNode(node) {
  5013. switch (node.type) {
  5014. case "selector":
  5015. node.nodes = node.map((item) => localizeNode(item));
  5016. return node;
  5017. case "class": return selectorParser.className({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
  5018. case "id": return selectorParser.id({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
  5019. case "attribute": if (node.attribute === "class" && node.operator === "=") return selectorParser.attribute({
  5020. attribute: node.attribute,
  5021. operator: node.operator,
  5022. quoteMark: "'",
  5023. value: exportScopedName(node.value, null, null)
  5024. });
  5025. }
  5026. throw new Error(`${node.type} ("${node}") is not allowed in a :local block`);
  5027. }
  5028. function traverseNode(node) {
  5029. switch (node.type) {
  5030. case "pseudo": if (node.value === ":local") {
  5031. if (node.nodes.length !== 1) throw new Error("Unexpected comma (\",\") in :local block");
  5032. const selector = localizeNode(node.first);
  5033. selector.first.spaces = node.spaces;
  5034. const nextNode = node.next();
  5035. if (nextNode && nextNode.type === "combinator" && nextNode.value === " " && /\\[A-F0-9]{1,6}$/.test(selector.last.value)) selector.last.spaces.after = " ";
  5036. node.replaceWith(selector);
  5037. return;
  5038. }
  5039. case "root":
  5040. case "selector":
  5041. node.each((item) => traverseNode(item));
  5042. break;
  5043. case "id":
  5044. case "class":
  5045. if (exportGlobals) exports$1[node.value] = [node.value];
  5046. break;
  5047. }
  5048. return node;
  5049. }
  5050. const importedNames = {};
  5051. root.walkRules(/^:import\(.+\)$/, (rule) => {
  5052. rule.walkDecls((decl) => {
  5053. importedNames[decl.prop] = true;
  5054. });
  5055. });
  5056. root.walkRules((rule) => {
  5057. let parsedSelector = selectorParser().astSync(rule);
  5058. rule.selector = traverseNode(parsedSelector.clone()).toString();
  5059. rule.walkDecls(/^(composes|compose-with)$/i, (decl) => {
  5060. const localNames = getSingleLocalNamesForComposes(parsedSelector, decl.parent);
  5061. decl.value.split(",").forEach((value) => {
  5062. value.trim().split(/\s+/).forEach((className) => {
  5063. const global = /^global\(([^)]+)\)$/.exec(className);
  5064. if (global) localNames.forEach((exportedName) => {
  5065. exports$1[exportedName].push(global[1]);
  5066. });
  5067. else if (hasOwnProperty.call(importedNames, className)) localNames.forEach((exportedName) => {
  5068. exports$1[exportedName].push(className);
  5069. });
  5070. else if (hasOwnProperty.call(exports$1, className)) localNames.forEach((exportedName) => {
  5071. exports$1[className].forEach((item) => {
  5072. exports$1[exportedName].push(item);
  5073. });
  5074. });
  5075. else throw decl.error(`referenced class name "${className}" in ${decl.prop} not found`);
  5076. });
  5077. });
  5078. decl.remove();
  5079. });
  5080. rule.walkDecls((decl) => {
  5081. if (!/:local\s*\((.+?)\)/.test(decl.value)) return;
  5082. let tokens = decl.value.split(/(,|'[^']*'|"[^"]*")/);
  5083. tokens = tokens.map((token, idx) => {
  5084. if (idx === 0 || tokens[idx - 1] === ",") {
  5085. let result = token;
  5086. const localMatch = /:local\s*\((.+?)\)/.exec(token);
  5087. if (localMatch) {
  5088. const input = localMatch.input;
  5089. const matchPattern = localMatch[0];
  5090. const matchVal = localMatch[1];
  5091. const newVal = exportScopedName(matchVal);
  5092. result = input.replace(matchPattern, newVal);
  5093. } else return token;
  5094. return result;
  5095. } else return token;
  5096. });
  5097. decl.value = tokens.join("");
  5098. });
  5099. });
  5100. root.walkAtRules(/keyframes$/i, (atRule) => {
  5101. const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params);
  5102. if (!localMatch) return;
  5103. atRule.params = exportScopedName(localMatch[1]);
  5104. });
  5105. root.walkAtRules(/scope$/i, (atRule) => {
  5106. if (atRule.params) atRule.params = atRule.params.split("to").map((item) => {
  5107. const selector = item.trim().slice(1, -1).trim();
  5108. if (!/^\s*:local\s*\((.+?)\)\s*$/.exec(selector)) return `(${selector})`;
  5109. return `(${traverseNode(selectorParser().astSync(selector)).toString()})`;
  5110. }).join(" to ");
  5111. });
  5112. const exportedNames = Object.keys(exports$1);
  5113. if (exportedNames.length > 0) {
  5114. const exportRule = rule({ selector: ":export" });
  5115. exportedNames.forEach((exportedName) => exportRule.append({
  5116. prop: exportedName,
  5117. value: exports$1[exportedName].join(" "),
  5118. raws: { before: "\n " }
  5119. }));
  5120. root.append(exportRule);
  5121. }
  5122. }
  5123. };
  5124. };
  5125. plugin.postcss = true;
  5126. plugin.generateScopedName = function(name, path) {
  5127. return `_${path.replace(/\.[^./\\]+$/, "").replace(/[\W_]+/g, "_").replace(/^_|_$/g, "")}__${name}`.trim();
  5128. };
  5129. plugin.generateExportEntry = function(name, scopedName) {
  5130. return {
  5131. key: unescape(name),
  5132. value: unescape(scopedName)
  5133. };
  5134. };
  5135. module.exports = plugin;
  5136. }));
  5137. //#endregion
  5138. //#region ../../node_modules/.pnpm/string-hash@1.1.3/node_modules/string-hash/index.js
  5139. var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5140. function hash(str) {
  5141. var hash = 5381, i = str.length;
  5142. while (i) hash = hash * 33 ^ str.charCodeAt(--i);
  5143. return hash >>> 0;
  5144. }
  5145. module.exports = hash;
  5146. }));
  5147. //#endregion
  5148. //#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.8/node_modules/postcss-modules-values/src/index.js
  5149. var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5150. const ICSSUtils = require_src$4();
  5151. const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
  5152. const matchValueDefinition = /(?:\s+|^)([\w-]+):?(.*?)$/;
  5153. const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/;
  5154. module.exports = (options) => {
  5155. let importIndex = 0;
  5156. const createImportedName = options && options.createImportedName || ((importName) => `i__const_${importName.replace(/\W/g, "_")}_${importIndex++}`);
  5157. return {
  5158. postcssPlugin: "postcss-modules-values",
  5159. prepare(result) {
  5160. const importAliases = [];
  5161. const definitions = {};
  5162. return { Once(root, postcss) {
  5163. root.walkAtRules(/value/i, (atRule) => {
  5164. const matches = atRule.params.match(matchImports);
  5165. if (matches) {
  5166. let [, aliases, path] = matches;
  5167. if (definitions[path]) path = definitions[path];
  5168. const imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, "$1").split(/\s*,\s*/).map((alias) => {
  5169. const tokens = matchImport.exec(alias);
  5170. if (tokens) {
  5171. const [, theirName, myName = theirName] = tokens;
  5172. const importedName = createImportedName(myName);
  5173. definitions[myName] = importedName;
  5174. return {
  5175. theirName,
  5176. importedName
  5177. };
  5178. } else throw new Error(`@import statement "${alias}" is invalid!`);
  5179. });
  5180. importAliases.push({
  5181. path,
  5182. imports
  5183. });
  5184. atRule.remove();
  5185. return;
  5186. }
  5187. if (atRule.params.indexOf("@value") !== -1) result.warn("Invalid value definition: " + atRule.params);
  5188. let [, key, value] = `${atRule.params}${atRule.raws.between}`.match(matchValueDefinition);
  5189. const normalizedValue = value.replace(/\/\*((?!\*\/).*?)\*\//g, "");
  5190. if (normalizedValue.length === 0) {
  5191. result.warn("Invalid value definition: " + atRule.params);
  5192. atRule.remove();
  5193. return;
  5194. }
  5195. if (!/^\s+$/.test(normalizedValue)) value = value.trim();
  5196. definitions[key] = ICSSUtils.replaceValueSymbols(value, definitions);
  5197. atRule.remove();
  5198. });
  5199. if (!Object.keys(definitions).length) return;
  5200. ICSSUtils.replaceSymbols(root, definitions);
  5201. const exportDeclarations = Object.keys(definitions).map((key) => postcss.decl({
  5202. value: definitions[key],
  5203. prop: key,
  5204. raws: { before: "\n " }
  5205. }));
  5206. if (exportDeclarations.length > 0) {
  5207. const exportRule = postcss.rule({
  5208. selector: ":export",
  5209. raws: { after: "\n" }
  5210. });
  5211. exportRule.append(exportDeclarations);
  5212. root.prepend(exportRule);
  5213. }
  5214. importAliases.reverse().forEach(({ path, imports }) => {
  5215. const importRule = postcss.rule({
  5216. selector: `:import(${path})`,
  5217. raws: { after: "\n" }
  5218. });
  5219. imports.forEach(({ theirName, importedName }) => {
  5220. importRule.append({
  5221. value: theirName,
  5222. prop: importedName,
  5223. raws: { before: "\n " }
  5224. });
  5225. });
  5226. root.prepend(importRule);
  5227. });
  5228. } };
  5229. }
  5230. };
  5231. };
  5232. module.exports.postcss = true;
  5233. }));
  5234. //#endregion
  5235. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/scoping.js
  5236. var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
  5237. Object.defineProperty(exports, "__esModule", { value: true });
  5238. exports.behaviours = void 0;
  5239. exports.getDefaultPlugins = getDefaultPlugins;
  5240. exports.getDefaultScopeBehaviour = getDefaultScopeBehaviour;
  5241. exports.getScopedNameGenerator = getScopedNameGenerator;
  5242. var _postcssModulesExtractImports = _interopRequireDefault(require_src$3());
  5243. var _genericNames = _interopRequireDefault(require_generic_names());
  5244. var _postcssModulesLocalByDefault = _interopRequireDefault(require_src$2());
  5245. var _postcssModulesScope = _interopRequireDefault(require_src$1());
  5246. var _stringHash = _interopRequireDefault(require_string_hash());
  5247. var _postcssModulesValues = _interopRequireDefault(require_src());
  5248. function _interopRequireDefault(obj) {
  5249. return obj && obj.__esModule ? obj : { default: obj };
  5250. }
  5251. const behaviours = {
  5252. LOCAL: "local",
  5253. GLOBAL: "global"
  5254. };
  5255. exports.behaviours = behaviours;
  5256. function getDefaultPlugins({ behaviour, generateScopedName, exportGlobals }) {
  5257. const scope = (0, _postcssModulesScope.default)({
  5258. generateScopedName,
  5259. exportGlobals
  5260. });
  5261. return {
  5262. [behaviours.LOCAL]: [
  5263. _postcssModulesValues.default,
  5264. (0, _postcssModulesLocalByDefault.default)({ mode: "local" }),
  5265. _postcssModulesExtractImports.default,
  5266. scope
  5267. ],
  5268. [behaviours.GLOBAL]: [
  5269. _postcssModulesValues.default,
  5270. (0, _postcssModulesLocalByDefault.default)({ mode: "global" }),
  5271. _postcssModulesExtractImports.default,
  5272. scope
  5273. ]
  5274. }[behaviour];
  5275. }
  5276. function isValidBehaviour(behaviour) {
  5277. return Object.keys(behaviours).map((key) => behaviours[key]).indexOf(behaviour) > -1;
  5278. }
  5279. function getDefaultScopeBehaviour(scopeBehaviour) {
  5280. return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL;
  5281. }
  5282. function generateScopedNameDefault(name, filename, css) {
  5283. const i = css.indexOf(`.${name}`);
  5284. const lineNumber = css.substr(0, i).split(/[\r\n]/).length;
  5285. return `_${name}_${(0, _stringHash.default)(css).toString(36).substr(0, 5)}_${lineNumber}`;
  5286. }
  5287. function getScopedNameGenerator(generateScopedName, hashPrefix) {
  5288. const scopedNameGenerator = generateScopedName || generateScopedNameDefault;
  5289. if (typeof scopedNameGenerator === "function") return scopedNameGenerator;
  5290. return (0, _genericNames.default)(scopedNameGenerator, {
  5291. context: process.cwd(),
  5292. hashPrefix
  5293. });
  5294. }
  5295. }));
  5296. //#endregion
  5297. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/pluginFactory.js
  5298. var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
  5299. Object.defineProperty(exports, "__esModule", { value: true });
  5300. exports.makePlugin = makePlugin;
  5301. var _postcss = _interopRequireDefault(__require("postcss"));
  5302. var _unquote = _interopRequireDefault(require_unquote());
  5303. var _Parser = _interopRequireDefault(require_Parser());
  5304. var _saveJSON = _interopRequireDefault(require_saveJSON());
  5305. var _localsConvention = require_localsConvention();
  5306. var _FileSystemLoader = _interopRequireDefault(require_FileSystemLoader());
  5307. var _scoping = require_scoping();
  5308. function _interopRequireDefault(obj) {
  5309. return obj && obj.__esModule ? obj : { default: obj };
  5310. }
  5311. const PLUGIN_NAME = "postcss-modules";
  5312. function isGlobalModule(globalModules, inputFile) {
  5313. return globalModules.some((regex) => inputFile.match(regex));
  5314. }
  5315. function getDefaultPluginsList(opts, inputFile) {
  5316. const globalModulesList = opts.globalModulePaths || null;
  5317. const exportGlobals = opts.exportGlobals || false;
  5318. const defaultBehaviour = (0, _scoping.getDefaultScopeBehaviour)(opts.scopeBehaviour);
  5319. const generateScopedName = (0, _scoping.getScopedNameGenerator)(opts.generateScopedName, opts.hashPrefix);
  5320. if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) return (0, _scoping.getDefaultPlugins)({
  5321. behaviour: _scoping.behaviours.GLOBAL,
  5322. generateScopedName,
  5323. exportGlobals
  5324. });
  5325. return (0, _scoping.getDefaultPlugins)({
  5326. behaviour: defaultBehaviour,
  5327. generateScopedName,
  5328. exportGlobals
  5329. });
  5330. }
  5331. function getLoader(opts, plugins) {
  5332. const root = typeof opts.root === "undefined" ? "/" : opts.root;
  5333. return typeof opts.Loader === "function" ? new opts.Loader(root, plugins, opts.resolve) : new _FileSystemLoader.default(root, plugins, opts.resolve);
  5334. }
  5335. function isOurPlugin(plugin) {
  5336. return plugin.postcssPlugin === PLUGIN_NAME;
  5337. }
  5338. function makePlugin(opts) {
  5339. return {
  5340. postcssPlugin: PLUGIN_NAME,
  5341. async OnceExit(css, { result }) {
  5342. const getJSON = opts.getJSON || _saveJSON.default;
  5343. const inputFile = css.source.input.file;
  5344. const pluginList = getDefaultPluginsList(opts, inputFile);
  5345. const resultPluginIndex = result.processor.plugins.findIndex((plugin) => isOurPlugin(plugin));
  5346. if (resultPluginIndex === -1) throw new Error("Plugin missing from options.");
  5347. const loader = getLoader(opts, [...result.processor.plugins.slice(0, resultPluginIndex), ...pluginList]);
  5348. const fetcher = async (file, relativeTo, depTrace) => {
  5349. const unquoteFile = (0, _unquote.default)(file);
  5350. return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace);
  5351. };
  5352. const parser = new _Parser.default(fetcher);
  5353. await (0, _postcss.default)([...pluginList, parser.plugin()]).process(css, { from: inputFile });
  5354. const out = loader.finalSource;
  5355. if (out) css.prepend(out);
  5356. if (opts.localsConvention) {
  5357. const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile);
  5358. parser.exportTokens = Object.entries(parser.exportTokens).reduce(reducer, {});
  5359. }
  5360. result.messages.push({
  5361. type: "export",
  5362. plugin: "postcss-modules",
  5363. exportTokens: parser.exportTokens
  5364. });
  5365. return getJSON(css.source.input.file, parser.exportTokens, result.opts.to);
  5366. }
  5367. };
  5368. }
  5369. }));
  5370. //#endregion
  5371. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/index.js
  5372. var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5373. var _fs = __require("fs");
  5374. var _fs2 = require_fs();
  5375. var _pluginFactory = require_pluginFactory();
  5376. (0, _fs2.setFileSystem)({
  5377. readFile: _fs.readFile,
  5378. writeFile: _fs.writeFile
  5379. });
  5380. module.exports = (opts = {}) => (0, _pluginFactory.makePlugin)(opts);
  5381. module.exports.postcss = true;
  5382. }));
  5383. //#endregion
  5384. export default require_build();
  5385. export {};