From 1010b1550c005c204fba279c36292aa361b8f8d8 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 5 Jul 2020 17:28:00 +0200 Subject: [PATCH] chore: update yarn for patch hash fix --- .yarn/releases/yarn-sources.cjs | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.yarn/releases/yarn-sources.cjs b/.yarn/releases/yarn-sources.cjs index fd4a944dff9b..7f4d4db127d9 100755 --- a/.yarn/releases/yarn-sources.cjs +++ b/.yarn/releases/yarn-sources.cjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -module.exports=(()=>{var __webpack_modules__={65379:e=>{"use strict";e.exports={}},25545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=25545,e.exports=t},49775:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-compat"}')},35729:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-dlx"}')},37904:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-essentials"}')},17508:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-file"}')},84779:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-git"}')},88454:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-github"}')},91953:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-http"}')},63756:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-init"}')},23100:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-link"}')},47047:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-node-modules"}')},31880:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-npm-cli"}')},67310:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-npm"}')},74617:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-pack"}')},85458:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-patch"}')},8211:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-pnp"}')},80150:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(84132);const i={optional:!0},o=[["@samverschueren/stream-to-observable@*",{peerDependenciesMeta:{rxjs:i,zenObservable:i}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:i,zenObservable:i}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@*",{peerDependenciesMeta:{"supports-color":i}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":i,"postcss-jsx":i,"postcss-less":i,"postcss-markdown":i,"postcss-scss":i}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}]],s=r(78761).brotliDecompressSync(Buffer.from("G8EIABwHuTnyDkxeQiomXep01zJ90cJ3iFSgGcnN+dVTE5YC1CBsZn0bRMFnq2+/bPJOWLRlcCblbWaytN6yn94lDuHQVXEMzob/mhDOafB/uXcOjPnzEX5TF8I/4H+A7n4PCzSY0xTuWjDfxxV8F1neM4x7jymltl+dnYEp13SxCOpkQxUClagaNItavHVUdwD73pT3+c52oJFtOTmagkX/GAaKFyr1bLfAnKMY+OZmY+0YsC6Sci7AJQI2zADQHhdIcc03Dz+GOC05kpj3M0kiNKsdFu1U3ornmwco/hOeYDp3IUlCIQqaE6eg8ho+SQaBwAeE4PktvsKmDJJy8fXAx0jTz4Oj2wWKVgNnuMz/CR5AZNuo2eZk0HwujkkFQBytGPu+p1RoCpRBYVcTf7REjfuVBUIa+MgTpb+ZaKgASLlmw2dFNlIsdYEsSntc1vhEJfQLSkVdBXXK67OUoZjcjVu8DPd8oSwu1vK52tVmsLNeekvJW3ss4Z1+thxuul1A0bzLBLT7MQMQxaGNFQUpvaAsmmOVo1hZFKHViytsKRvkULx6+VpOghLO9W/tHqSTQkqQkLWIKtzBlsPNUviOym6eOz3jjDM43Jfi2pXbla5apaLf+jR3njZPcG1zp9bxgi6Acg2V4n8rU8+1ANM2CXkW5tkqS6QfhnL1z8/s5G8r/f4omOaXOkzbHh9HdPhfxz9Tftr698n6L7UYF/L089Ch+9QgeDSlUXdaBAyLU3G6bkC5ygWmNqZMBYJHB6iFj4uo0iI9yR5r3KUooI0Zg1IkiYsgqxR8jMug6VgwtyIaxNxP30CqZH3zo/g16/wof1VdCLhd+YIOeBHFhA/D2eAvyld7FIAT8EiOA1Msg41mq8UNYCwZt2Pc519uZYhp9gP6kOwhcU+Ydc0CsPIqfy0ZGgbIKNYGZ+RP4ESfRzdDW6vhSsXuu2VB29YEdri/7CbQ7XCsVevHtY2mms7dVEMb6Wa/Ln6ZokATZTjZ/kMMNoWEp0AqBKG0DaCyBxlBsylqymr/6xM+mxOAAVREIXXGnW4IXuQ5oSGimw0C7BKZb3ZDLEWtkWXM5FB7jjp37QA=","base64")).toString(),A=r(78761).brotliDecompressSync(Buffer.from("G1QTIIzURnVBnGa0VPvr81orV8AFIqdU0sqrdcVgCdukgAZwi8a50gLk9+19Z2NcUILjmzXkzt4dzm5a6Yoys+/9qnKiaApXukOiuoyUaMcynG4X7X4vBaIE/PL30gwG6HSGJkLxb9PnLjfMr+748n7sM6C/NycK6ber/bX1reVVxta6W/31tZIhfrS+upoE/TPRHj0S/l0T59gTGdtKOp1OmMOJt9rhfucDdLJ2tgyfnO+u4YMkQAcYq/nebTcDmbXhqhgo6iQA4M3m4xya4Cos3p6klmkmQT+S4DLDZfwfMF+sUCx36KleOtaHLQfEIz0Bmncj/Ngi3lqOl4391EWEfIss6gVp3oDUGwsSZJKeOVONJWZg+Mue3KUMV3aMqYJ+7b2219D+GFDi8EV5y/Y+5J+He0oNjKAgqLsJziEsS9uIaCu3BHBKSXxNKKa2ShbfglcWoiiVT2kfGI7Gw+YJ/Sqy1H6wdFWtyVUQIa82JPwbeV25YKLzc5ZIFM6GCPSA+J9dTvJbs5LuuKnLP3f09gCu2jxqsAv6CA+ZySVaUJr2d3A70BC/uBCKr2OVrWgC3fSwb7NlfkgSEEiejrMGvhya9lMbVI6lMsFKN330A1/FOaefHQdNGLEZ3IwFF87H3xVlM0Xxsmbi/7A60oymRcIe0tH90alG6ez/yA7jwYotxuHWZdR+1HlMcddGHAV6QD/gXYPV0wnNv47I+5FGevzZFMqWSO8GU4nQ3FjsdgdJcD+c1rvudERKuLyd7bxiBpnsMDHsvPP4nXdXkld/gUNks3GAE1Otmb90bavDyiw4Mrx496Iw+jbLTgsCZGZXSZ9vM55C7KGe4HyJAKXEk0iT/Cj/PFwLJBN7pcP7ZFfYtUApGTWKkYhI9IE2zt/5ByH72wdvH+88b71zuv/FMCX3w6x5nzhY44Cg5IYv9LeKwHuHIWgPbfgrAcUxOlKkPRdQOIDF/aBuLPJAXD+TgxCNXx4jQxeR/qlBWVikFPfEI4rXMUc4kZ2w9KbPKYRvFUag0dVlVoyUP4zfidbTXAdZF88jAckl+NHjLFCNdX7EQ1PbLSOl+P+MqgwEOCi6dxgWZ7NCwJBjWKpk1LaxwKrhZ4aEC/0lMPJYe5S8xAakDcmA2kSS86GjEMTrv3VEu0S0YGZcxToMV524G4WAc4CReePePdipvs4aXRL5p+aeN96yfMGjsiTbQNxgbdRKc+keQ+NxYIEm1mBtEO29WrcbrqNbQRMR66KpGG4aG0NtmRyZ2JhUvu0paCklRlID8PT3gSiwZrqr4XZXoBBzBMrveWCuOg7iTgGDXDdbGi8XHkQf5KXDGFUxWueu5wkSa6gMWY1599g2piQjwBKIAPt4N5cOZdFBidz2feGwEAy1j1UydGxDSCCUsh314cUIIRV/dWCheceubL2gU8CibewmP7UxmN5kN4I7zfQhPxkP0NCcei8GXQpw4c3krEzW7PR2hgi/hqqqR58UJ/ZVfWxfcH5ZKMo4itkmPK0FCGxzzIRP20lK/gz28Y03sY233KvSVWUKl9rcbX6MbHjpUG8MvNlw72p6FwTejv92zgpnCxVJnIHHZhCBxNcHF5RTveRp513hUtTHHq4BIndlytZT5xoTSYfHKqKNr4o9kcGINIz6tZSKRdtbON3Ydr9cgqxHIeisMNIsvPg/IFMZuBbSqqDLeSO5dak1cGr76FtH2PC7hs0S0Oq3GsmF1Ga4YABAMGcdPAWzTk26B7cKV91I2b0V/GYvnsEQ1YGntRqi5EQqTlgZszbV/32GuZtUF49JOA/r4jAdwUOsbPo6mNoBlJPYjM5axrZaWQf33bFsLWqiyvvDOM4x0Ng802T7cuP2a3q98GWq6yiq6q3M77hcZlOUnmryctRYmI4Hb2F5XixFohkBmySCjU+M7/WQVE5YAtnlxiUJDhFN0y1tNeMWY9E0MfZi2rQ4eC72WXjsAA==","base64")).toString(),a=r(78761).brotliDecompressSync(Buffer.from("WyHkE0WwceA9ZGtRBBsHkLD3TaMINg6IjfzbjJYHPBl/o5oAFhHLKuiq8VprTwgEGLvUcyL+J86MkcuI/mc6u3M5PbwFyUWC3Q4RLb1t9woXohTh8f8Jae6VFhCg6hrpZ9Thw2j6JVV+sAbpmVFo6gIU0aqooHrZ9tnnYzCfT6aSgg0Mvp/KprXjWFAnp2gOPGj+C7kWbLvY1OT0/9vPf22RLLCqkR+dqVC9e87MeZCbPEjy1gsVkM6cmfuSl5tPlAKAUGXVGl1j2Vd9p/MZVWWrUFW1QqherZX2QzDzBFMfHRmhCZx87N29DqpUFKoXJj5Vsz0UwPKRQOWjyIsTjpzmDW1w4Z/VXYzJMpa5x973O4UkhAABgVpxJnvVPzV/fWM6C7xDfBLGwvTnz12WSJK5GVbfeqY5mboOZq+jLZTfEPIaL6HbmY+NZWNv7PnRM2vANx/S3UNRo+XBxzl+wtD8a2/l+c31SZIEwUu0RBGSr/gYyYccLZIvmp1uv+Xwjjs5g+1jmab18yEcNRdXggLbUcvr5QjGCkA6LsdNmLJhl+9SwVBufQrvekuJlxbLqCpHPSwtMgFgV0B8R9qLed8XqNsoZ4w/rPg2f3MOGAJqggWxdHhiRifOWZfkX8alzRJTBUvyrbgBxm8AjtW1krpuWW1S38i8VCMfFitJwibdM336VJTN10rCzexaj4KCJb4vjL+9547lSbA4OFWEtQDsJ+U+OoT7X+L1FYIbZSmjDAeCWSd+84Nq1J/yGz/mmMfzNbbLBj2vY3D0rvMlzMeRwFg5vbvcFsSCcf+E1kG+gD/Do5qCzUGCRXrckQ0+tnipNKK7FZLFKzqaeRUFkd+km46aQ4R0aTL8hKoqWzkYF7zkZFqYMU2kktcKjGnsLIXtLa6wt1LH85ERIdABNrL1rdY0C58XPnMFgQUF9CRvJarFviKpLMcHR15rDhA2jIykLr1vFy+1MNddjwNAEgJuz0yQmpQDi8MrD6yPvHTqosi/DIZjZsnDtb9T97e1afLv6dm7O4lml2W6WtrZo5HFApbouDzg0PUZcbN8oQ74jPbkQau1TRURmCKVqmLurvTJu3ym24UGtU+m53shX3SpfCYfVNGzXzKIjHEDpVwsXUayNShF+dsPKjwfGS+c4CQBlie/bbg/UwdtSxM5AkpHrDOTiWMoCDOkTLFQl8FkaXBaa22IblROEP3lkZHTg9XGZ5ZhlWLrOTLasrEvc89GVHjjfAI9v717KAQvR38XQrnFTUm2ShxxCGLstGuGwOknezSUTFs79I2Go7MlqYDILPdDaQx8UsxuXQU0vf2ecFM4bWPSaNPTiCnHy+napATkTo5yVD+dhAfccXX1YxnI6XkYP2nLxRMqoG4TeFSWR0uDZQqSV6HZiGMOWVvj3HDmaF+0WrwLwldtsGrio7Z/476K2+OK2vnm1jlz8i/nWeAyuklNevlB/6iNwNQ4FphWC4llQdGG4epYKneafU8KTizyvk8hofMWmD2yyR6OUA5tg+TlKrpwydw7V4L5jKDlRQ0IKvOdMVUQ8c3XcdSaa3O/IHYZqV5nrdpYS7t/JWNWqklOpmX2uJDmNqfT0ubgDdW0x09iv/Cujt9X6JcvmZCb5Nso9rnL015QPrlggrR4VyZKpscck+ePiHttRlKPwgR5EO94+rMH2+xBdqZdF4Nrh+2zdKH4khufg8ohTQs823ZGYOOwGaZKHl2OSlHvZXRaFbfUT+9RUIOQ7gPHktnti9vxJOh+7LawepqYMMSR4S4CDlY7LcEP5+kgsrisLewVHh56WHlZmzmNnI4XTJlktFkDJZ23lTVGeHlK++svbtDHWVVf1VTlH8jmxe61srsCkWZVlf+q4Di7F4Zkh+q2ELyvTCDfEACSZ6suy0BG2nmkkHtYEWLD+qVPZlFpi01edY22z8IVOSLOh7bgpfq2aRnYdJ62k664kdlrs/V2XZFaWntvGAFNtm3MYJdHcrY8V1lFx9EfD0O+vMT436BFlWouh7LapvjcI5mh4UnSb3LPsxXHEKXScsxGFCgImpOXNgllBHS0DvUx6FgV2R0dlSwJxlant0oO1B5T9dImHTS5vyxjYeWUAcXWWqLkRyC5om0t7xd2nprPY9vsbs1GROApFJUfpGvfCFO0T0gxbTtAljPKIGup4dKWXA5vaxImOPY+wKSLQ5gKD0Z2sQg4OSAe/NYGEYkSE5YJxpBJLnTZiLOZvUwGuB20iIIGPbll8+FChlYjRZn0ZNDPFwqHRDquXJNrEHEIIWaH6CFB7/BNzPGsJzdwVvPsb+phxbOMWh84YCZ6/JspXfJ4UvY78CPqXKbiWzu4nePQ1tBh2HUbQpzIVgId6BtK3nvvUtCbwkoohzA21aeW7BD39lOtguc5EB7v0a0tX6h+2SXTxBNNlOs0Jn78VBxr05vMTv+BhrmfXymiakLrfryrZw+TQbT1dWpFiG/QLnjICgSeZ73dlTnj9SVao6Bb5znJhHEkqZkxktTBqnmSrVqp7tgCiyrz0mejYx3Ywot2dsdrUqpbw4fVkGAHy+wFfTYUa6ki39C/vFhuqjJpJoOkwCqOMkblZBprwbl9p1wp9N5PHFAhF+OE4+YcLW57sEWn7NcdyDV2WQUrd2v1hd07Yc3N0Vs2wqWX674m4X6V0GViUocbqJcK9SeWhjZXH6YKNU3Xhsm44RF557vk37K7wzjf1p7jiwN8BOhyJxq5vFJZY2rzwKPaNwbVUNRp00/Owm4tV2KzOQdGFddkbSomc5SBD5Br9eVbrswSxyjsRzzheCJ9ew5PmvbIAD415mFY/4SFv0lVZanSgGTOYN/ATy0V2J05vsP9JW0kkbe/V+YW94R9a6zlzs1b6z+lmJh8IeNAGlE8qE8QrsRSnbq0/lKz3/U7noxxAYcGhN5jkp8lihlNOziKKameVRzbL7ibFpdmaB+oNcacpDBJm1uIWzsRbJaTvycY5NC6nXoeTebOzXNc74QOI2naJ7ndLfq6FGqCD6acQoOdZ9Dn9eHnUFPD853NUY0mk0yvaTFlqUckB2aHyCfT9yCtXCV8J0ZcER322DePFTIIDB/ZZfW9SDJzIecWABAwOIb5rrgwhVWk2qswKIt5+VkjAFACRaGeTiDyy6EbkVqucAuzz1nqfii2q1Z7A4NGVpm+AwllHsq7BQBCYJlp4XYwZ7odBPPKewQAMMAimSGxrLoTCeYqR4befWV82LXv1ez3BUaBRLPOA6K+CgDCeeHP33/+O/Q83Omy8i4kmytUslccW3of+y4/A6hBR4Df1Xfjd07m3AIAJIY4s1aYcrDsVHsKQzO9USMAMCPoldb4I/d9o2YahSKZe3HGjl5s3lFJeFV6nZEMAIAUinsckJ+NXEmNhTfY+elNQIR5d7KHoSACbd3rAwpUyKNu6dT6HpOdpdcm+B1zEV1WXmf0FgAgFE3WnLAMFN2m1YnuPFKa1goRtFEnO90FwRr+qxEAYIfBaimNK4Q8puTK9z6AzNsbd1HK7gQ2MHNDri0AYMD2iQ03tk9LewmN52Vb/+wSAHA58K31QVrzPkQ6v/dsGSo7ENFQep0RtgAAmTxcYlo4CoyMtdteTOeEsX7WCACYuCidcYVgfi1YN/BgpdTpmeSyM4nyKgDIZrslM+7J/dNBrj1d49+n2HU27xgnGgK8RtkCAJlj81JsOLCdre0espqT7YxuBADE2IXGRXK9TdYtYXNH5ZfE4kfAjMk2MH+KLvjz/49zYeTK+fdXdeEUPL9s4rNgWcsOih99pzLDIETgKdRJKXxJs4qy2Anko/EjVEcqZhq1GEXB5dEQf9wcLP/8zfjpp/QdT9X4WdANUD3UWy5UTkvuUqDf5QhiCtIezljqwrATQdr57pDoJmJtRS1Yc8PqBeW1pbRESzs5LMvOqO8yjWB+Qz6nVopsResFlVAJ0DvMPj0aXRUkiGvzdhCVQXMY+kY/0zfeXk/WhdHIeuE+ZF+ZVB+vo1uPCG/4L2rPtRjn8hmN7rd2MLlzJOSRfmJF7ygXYQQ+RLgmVEybvT+M7J1faDqkn2CstanzeK1PTdL00h0Ya9BNMXc1tYoal8XIKNiF6nkNioId9IVJewuN04XgqkI85GGsJpBZbSlxLLSBa7TkctkkL7QQVdQAX4jGKcfjhaYHcb+xlLiQnrZ86FvDOLoPRuDUOugrGp06XL5+w21BZExlb47ETeM9VjhrYmwGsUm2S4LT8NLjpqlVff/+go0VYZX9tjOezIFnkq1xVwzjn90Em+SQGEx2cWZ95jA4E8QQlrvnm8mL1x2p5v89xiSawVfofc4VBXbYQZEQepbItcORHLWhClRstJ2Ybc8yI7dAhrYdsqNtzBApTMqDjMsMaORqROhd2uxA65/4+8k+nf4RNxoeMyv1z6GjRTAdBx1S2eNDtcbZTyrJBVfXfmjcVU0oBOXZuvbshqZIAgqM5sjoT0/kxmfrwiCNe5sVSnYI0kMJ+U77mNmL0WDznOLNFlP7zd8c44ztI44rcIQ8F6dQe0QaG0n9sa1M7g4Bmutl32/a/4p8v22CodCmJ4o22XXdIDbnO6GX1uFEEvD8tk2dsNkro7D369A28KX+NUo0sKhP4Hg3LAeJDdjWAS/Hlb9Hy5OxLHVluHZReVHvg8v1JRyPuzCtvINinnGhxRiN/WLhWNVcu01rbJc5vaYjDFup9Ew7Xsq3LtW5PeQfY2Amz20MN7CGdvxzAaP7Eyo5/Nj3tVjK1TnBYiAMleF+s8FH1GDZhK16x75KpxV9CaPjTbdU2Z6eFnbwvUCFi/7MllwTtayX9bJODfJFvexQIT2+RPlNGsEHpn+wDrzRoBWKDNL1POJxcC4DdH2PuLTjMVRQwot3PK0g0HzGApTsCCPLV1jUpXzPuZE1z7YjF8in99A6Fv8j2/T/EAjDjhuSMDMokjh1kFIbO9H/rnQfWWmSntv1erIuTveQ2qzlYz5JUNi35hcN5jzuTIEsqCe9sszMhLUfS6yJAWGO2R4PHrFRu1AE48O6444uojN8YnZNCMiSz0COgZvr+2DL8jQOvqOzQSALKSjLMrXpM+wxiHWcaN2SWkMtiRfJo/qiV01btFdpDDlbpUJZCyOs92/WJ8rKspBLI2HaxSy2iZ7eF0w46fOtIs/jUpLrvNjpHEYu+K7q62sqyzKyQhk7I1/C7SfabZGZmSSdrcUi9bNFWWW9/1HNiUOJVhNuASdsDsD8MdfKn3RBxUiDQFaZubPEDkylLonZq6sVX+c6WJlJZwk6uBJvEfWvJOsiuMLjilcyUIPdYwGBcAvOAJuoMmoJFE4Wtor1CiVBG/yImf1DTaKjX7ILdpxv8db+rCjan0ropMQXK1DMSucLwOQZ45B723aX57Yrs8TqNB7xu5hdq1XbvQSgxZS8mAiqUbvq5AzwcZKEFSVqPwYaqAEC2KLIA2wrZ731zazZjDOBRjR7IxLWCITqhiBqGQAQubIJ4sIjksTaW2T5iSYA0MJaSTkFxswSmMA+YLhOX01jEpDWaWov2K4AlSIP783KvT7TGdsCDWb2mhJWE3godxkASECqTJfYsRBrL//wyZKjCQBUX9gwKR8DC88U8EEvO7OPBT6T9WSAowqeKvJvfV/mjpsGNO4k6lIBMKhxV4F9Rb5u+z28fYxp3Aga0uy1SlitwMm8ZQCAg1BlCLYKC0qqHSaS5GgCADJhlUl5J1gxG6AbttzI8olsPwDvAFNv/PzKMyx5kGWiYAEzzRARKWr+R14ZADAhAsZcnYCbh9Ka58KAdDsAgZnumg8FcKVhh8LyP3DkxuB34odr95dAbQrSUtM/OEJYo/ANy8EEhJQ85btxQLwIoC9Ls/1FkhlQ6R/KqB4ytMOHnhg4BMkNQOnvECPi9TsMNb4Vkr5RvQPppUlIjyHwSBRZznuhFOi5ST6fQ/HO4EhzamChqv7efnszIzVsoCDqOlDruL3ICccDxtbl2srmv8MOgpLzwJrMLLLABRaBqyV0w4OQLfcCMXvKrWIVROUw4ns3u+K5pyWeXiQdrD6CF6Od1Zt759TpZ2JvmOTf+mXmc5rvB+FhtloCmZTWFtS2DOX6DsnYV28LoqP1jJ91pHSjt91M36VJ2DdkD6ujeLDIIzTkesLgaEKBYq/5dQcNd+Dydr54IJroOD78QTjysFBirIhQmwvoZjW9kO7QGKiVuth6W5MO1VGvqm0v/1r9R0YQPqzh160P8z5beGPXxeSekxEXGFY+6pzi/vmdVHC4j+d+a46s20ZT4Qn0n2eQBL+4kSun89HxpQD2uYPRgs8Pp0AIezgMCgKU7A/hu4uVNqaN6BGNj/T7lUy4hVcqitcC/WCBFl9o7T0q4mux4KZzG88JPe/E00AlPt6+lrW3HuFX64OHYN/JQANdATNNVRGCBbz+ZBkAoAiV9RphFU7Gtwlp2MleZpGxJuGyMgz+LhMAKKso3EDD2Dz8h5uGkeTQvzZi9hAVrVverjzRxZVcOLkdKbgSd9ZjyyYc0f+uPYVamDUTraKN/j4QP+3y52t4ctt1BUnVjg1SdqZha3K03QDMN7Z2G23gzjZKRh9lrR1wY88Gfz9jRz4hx+lLlY7dxZed8FGBhl0TVIeo2mSPz2Pbc7F/DxxplgIt4X/3EugX9aJvjLwfA5gT9I4RNufY1lB599NlsxHDuWHuvb74k64ypzEIbJ4y09nYukNqI2lnNIjr3ONsGOvdzWcmUwNwUBKbCGZYG4aBkz4dmhuss3BdNHsI4XorXrxtmXpCBgbkbCvjdCf//o2fcdnmM6Mv87bn3IC08GP9krSEFm7C7lgqPlkSZC8fv/8qqnt+9ehwcuBRr8vSIoT0KZGVxZES33YG4PL9yMV332VGuHam1+BYJKxjmUXwqtxlAKAKrCsd3MJkmWe63QnWmacJADTBVevdlwFcszFKAFBuGCFsnclhYJgV6zTJHDY8x1fiZWGxfdf7sPGXb+1NWHUaXxSVA5AxhEUPaX7k49xX51uCVz0Mb8/vmxCnztGMlHIAMo6w6wncEq/mWh/OrYc2zl4RdeHeCbgDDYeZ5qqzIoZTvtEyAJBqDEMVE84G0TEnjJ1ud4AxczQBAAdGqcq6n0FvdL5JAAAC","base64")).toString(),c=new Map([[n.structUtils.makeIdent(null,"fsevents").identHash,s],[n.structUtils.makeIdent(null,"resolve").identHash,A],[n.structUtils.makeIdent(null,"typescript").identHash,a]]),u={hooks:{registerPackageExtensions:async(e,t)=>{for(const[e,r]of o)t(n.structUtils.parseDescriptor(e,!0),r)},getBuiltinPatch:async(e,t)=>{if(!t.startsWith("compat/"))return;const r=n.structUtils.parseIdent(t.slice("compat/".length)),i=c.get(r.identHash);return void 0!==i?i:null},reduceDependency:async(e,t,r,i)=>void 0===c.get(e.identHash)?e:n.structUtils.makeDescriptor(e,n.structUtils.makeRange({protocol:"patch:",source:n.structUtils.stringifyDescriptor(e),selector:`builtin`,params:null}))}}},10420:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(36370),i=r(95397),o=r(84132),s=r(17278);class A extends i.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){const e=[];this.pkg&&e.push("--package",this.pkg),this.quiet&&e.push("--quiet");const t=o.structUtils.parseIdent(this.command),r=o.structUtils.makeIdent(t.scope,"create-"+t.name);return this.cli.run(["dlx",...e,o.structUtils.stringifyIdent(r),...this.args])}}(0,n.gn)([s.Command.String("-p,--package")],A.prototype,"pkg",void 0),(0,n.gn)([s.Command.Boolean("-q,--quiet")],A.prototype,"quiet",void 0),(0,n.gn)([s.Command.String()],A.prototype,"command",void 0),(0,n.gn)([s.Command.Proxy()],A.prototype,"args",void 0),(0,n.gn)([s.Command.Path("create")],A.prototype,"execute",null);var a=r(27122),c=r(40376),u=r(56537),l=r(46009);class h extends i.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){await u.xfs.mktempPromise(async e=>{const t=l.y1.join(e,"dlx-"+process.pid);await u.xfs.mkdirPromise(t),await u.xfs.writeFilePromise(l.y1.join(t,(0,l.Zu)("package.json")),"{}\n"),await u.xfs.writeFilePromise(l.y1.join(t,(0,l.Zu)("yarn.lock")),"");const r=l.y1.join(t,(0,l.Zu)(".yarnrc.yml")),n=await a.VK.findProjectCwd(this.context.cwd,l.QS.lockfile),s=null!==n?l.y1.join(n,(0,l.Zu)(".yarnrc.yml")):null;null!==s&&u.xfs.existsSync(s)?(await u.xfs.copyFilePromise(s,r),await a.VK.updateConfiguration(t,e=>void 0===e.plugins?{enableGlobalCache:!0}:{enableGlobalCache:!0,plugins:e.plugins.map(e=>{const t="string"==typeof e?e:e.path,r=l.cS.isAbsolute(t)?t:l.cS.resolve(l.cS.fromPortablePath(n),t);return"string"==typeof e?r:{path:r,spec:e.spec}})})):await u.xfs.writeFilePromise(r,"enableGlobalCache: true\n");const A=void 0!==this.pkg?[this.pkg]:[this.command],h=o.structUtils.parseDescriptor(this.command).name,g=await this.cli.run(["add","--",...A],{cwd:t,quiet:this.quiet});if(0!==g)return g;this.quiet||this.context.stdout.write("\n");const f=await a.VK.find(t,this.context.plugins),{project:p,workspace:d}=await c.I.find(f,t);if(null===d)throw new i.WorkspaceRequiredError(p.cwd,t);return await p.restoreInstallState(),await o.scriptUtils.executeWorkspaceAccessibleBinary(d,h,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}}h.usage=s.Command.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Also by default Yarn will print the full install logs when installing the given package. This behavior can be disabled by using the `-q,--quiet` flag which will instruct Yarn to only report critical errors.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"]]}),(0,n.gn)([s.Command.String("-p,--package")],h.prototype,"pkg",void 0),(0,n.gn)([s.Command.Boolean("-q,--quiet")],h.prototype,"quiet",void 0),(0,n.gn)([s.Command.String()],h.prototype,"command",void 0),(0,n.gn)([s.Command.Proxy()],h.prototype,"args",void 0),(0,n.gn)([s.Command.Path("dlx")],h.prototype,"execute",null);const g={commands:[A,h]}},72926:(e,t,r)=>{"use strict";r.r(t),r.d(t,{suggestUtils:()=>n,default:()=>Le});var n={};r.r(n),r.d(n,{Modifier:()=>o,Strategy:()=>s,Target:()=>i,applyModifier:()=>b,extractDescriptorFromPath:()=>k,extractRangeModifier:()=>D,fetchDescriptorFrom:()=>F,findProjectDescriptors:()=>S,getModifier:()=>Q,getSuggestedDescriptors:()=>x});var i,o,s,A=r(27122),a=r(36370),c=r(95397),u=r(28148),l=r(62152),h=r(92659),g=r(40376),f=r(15815),p=r(84132),d=r(17278),C=r(9494),E=r.n(C),I=r(33720),m=r(46611),y=r(46009),w=r(10966),B=r.n(w);function Q(e,t){return e.exact?o.EXACT:e.caret?o.CARET:e.tilde?o.TILDE:t.configuration.get("defaultSemverRangePrefix")}!function(e){e.REGULAR="dependencies",e.DEVELOPMENT="devDependencies",e.PEER="peerDependencies"}(i||(i={})),function(e){e.CARET="^",e.TILDE="~",e.EXACT=""}(o||(o={})),function(e){e.KEEP="keep",e.REUSE="reuse",e.PROJECT="project",e.LATEST="latest",e.CACHE="cache"}(s||(s={}));const v=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function D(e,{project:t}){const r=e.match(v);return r?r[1]:t.configuration.get("defaultSemverRangePrefix")}function b(e,t){let{protocol:r,source:n,params:i,selector:o}=p.structUtils.parseRange(e.range);return B().valid(o)&&(o=`${t}${e.range}`),p.structUtils.makeDescriptor(e,p.structUtils.makeRange({protocol:r,source:n,params:i,selector:o}))}async function S(e,{project:t,target:r}){const n=new Map,o=e=>{let t=n.get(e.descriptorHash);return t||n.set(e.descriptorHash,t={descriptor:e,locators:[]}),t};for(const n of t.workspaces)if(r===i.PEER){const t=n.manifest.peerDependencies.get(e.identHash);void 0!==t&&o(t).locators.push(n.locator)}else{const t=n.manifest.dependencies.get(e.identHash),s=n.manifest.devDependencies.get(e.identHash);r===i.DEVELOPMENT?void 0!==s?o(s).locators.push(n.locator):void 0!==t&&o(t).locators.push(n.locator):void 0!==t?o(t).locators.push(n.locator):void 0!==s&&o(s).locators.push(n.locator)}return n}async function k(e,{cache:t,cwd:r,workspace:n}){y.y1.isAbsolute(e)||(e=y.y1.resolve(r,e));const i=n.project,o=await F(p.structUtils.makeIdent(null,"archive"),e,{project:n.project,cache:t});if(!o)throw new Error("Assertion failed: The descriptor should have been found");const s=new I.$,A=i.configuration.makeResolver(),a=i.configuration.makeFetcher(),c={checksums:i.storedChecksums,project:i,cache:t,fetcher:a,report:s,resolver:A},u=A.bindDescriptor(o,n.anchoredLocator,c),l=p.structUtils.convertDescriptorToLocator(u),h=await a.fetch(l,c),g=await m.G.find(h.prefixPath,{baseFs:h.packageFs});if(!g.name)throw new Error("Target path doesn't have a name");return p.structUtils.makeDescriptor(g.name,e)}async function x(e,{project:t,workspace:r,cache:n,target:o,modifier:A,strategies:a,maxResults:c=1/0}){if(!(c>=0))throw new Error(`Invalid maxResults (${c})`);if("unknown"!==e.range)return[{descriptor:e,reason:"Unambiguous explicit request"}];const u=null!=r&&r.manifest[o].get(e.identHash)||null,l=[];for(const h of a){if(l.length>=c)break;switch(h){case s.KEEP:if(u){const e=`Keep ${p.structUtils.prettyDescriptor(t.configuration,u)} (no changes)`;l.push({descriptor:u,reason:e})}break;case s.REUSE:for(const{descriptor:n,locators:i}of(await S(e,{project:t,target:o})).values()){if(1===i.length&&i[0].locatorHash===r.anchoredLocator.locatorHash&&a.includes(s.KEEP))continue;let e=`Reuse ${p.structUtils.prettyDescriptor(t.configuration,n)} (originally used by ${p.structUtils.prettyLocator(t.configuration,i[0])}`;e+=i.length>1?` and ${i.length-1} other${i.length>2?"s":""})`:")",l.push({descriptor:n,reason:e})}break;case s.CACHE:for(const r of t.storedDescriptors.values())if(r.identHash===e.identHash){const e=`Reuse ${p.structUtils.prettyDescriptor(t.configuration,r)} (already used somewhere in the lockfile)`;l.push({descriptor:r,reason:e})}break;case s.PROJECT:{if(null!==r.manifest.name&&e.identHash===r.manifest.name.identHash)continue;const n=t.tryWorkspaceByIdent(e);if(null===n)continue;const i=`Attach ${p.structUtils.prettyWorkspace(t.configuration,n)} (local workspace at ${n.cwd})`;l.push({descriptor:n.anchoredDescriptor,reason:i})}break;case s.LATEST:if("unknown"!==e.range){const r=`Use ${p.structUtils.prettyRange(t.configuration,e.range)} (explicit range requested)`;l.push({descriptor:e,reason:r})}else if(o===i.PEER){const t="Use * (catch-all peer dependency pattern)";l.push({descriptor:p.structUtils.makeDescriptor(e,"*"),reason:t})}else if(t.configuration.get("enableNetwork")){let r;try{r=await F(e,"latest",{project:t,cache:n,preserveModifier:!1})}catch(e){}if(r){r=b(r,A);const e=`Use ${p.structUtils.prettyDescriptor(t.configuration,r)} (resolved from latest)`;l.push({descriptor:r,reason:e})}}else{const e="Resolve from latest "+t.configuration.format("(unavailable because enableNetwork is toggled off)","grey");l.push({descriptor:null,reason:e})}}}return l.slice(0,c)}async function F(e,t,{project:r,cache:n,preserveModifier:i=!0}){const o=p.structUtils.makeDescriptor(e,t),s=new I.$,A=r.configuration.makeFetcher(),a=r.configuration.makeResolver(),c={checksums:r.storedChecksums,project:r,cache:n,fetcher:A,report:s,resolver:a};let u;try{u=await a.getCandidates(o,new Map,c)}catch(e){return null}if(0===u.length)return null;const l=u[0];let{protocol:h,source:g,params:f,selector:d}=p.structUtils.parseRange(p.structUtils.convertToManifestRange(l.reference));if(h===r.configuration.get("defaultProtocol")&&(h=null),B().valid(d)&&!1!==i){d=D("string"==typeof i?i:o.range,{project:r})+d}return p.structUtils.makeDescriptor(l,p.structUtils.makeRange({protocol:h,source:g,params:f,selector:d}))}class M extends c.BaseCommand{constructor(){super(...arguments),this.packages=[],this.json=!1,this.exact=!1,this.tilde=!1,this.caret=!1,this.dev=!1,this.peer=!1,this.optional=!1,this.preferDev=!1,this.interactive=!1,this.cached=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const o=E().createPromptModule({input:this.context.stdin,output:this.context.stdout}),a=Q(this,t),C=[...this.interactive?[s.REUSE]:[],s.PROJECT,...this.cached?[s.CACHE]:[],s.LATEST],I=this.interactive?1/0:1,m=await Promise.all(this.packages.map(async e=>{const o=e.match(/^\.{0,2}\//)?await k(e,{cache:n,cwd:this.context.cwd,workspace:r}):p.structUtils.parseDescriptor(e),s=function(e,t,{dev:r,peer:n,preferDev:o,optional:s}){const A=e.manifest[i.REGULAR].has(t.identHash),a=e.manifest[i.DEVELOPMENT].has(t.identHash),c=e.manifest[i.PEER].has(t.identHash);if((r||n)&&A)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!n&&c)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(s&&a)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(s&&!n&&c)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||o)&&s)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);return n?i.PEER:r||o?i.DEVELOPMENT:A?i.REGULAR:a?i.DEVELOPMENT:i.REGULAR}(r,o,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return[o,await x(o,{project:t,workspace:r,cache:n,target:s,modifier:a,strategies:C,maxResults:I}),s]})),y=await l.h.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async r=>{for(const[n,i]of m){0===i.filter(e=>null!==e.descriptor).length&&(t.configuration.get("enableNetwork")?r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" can't be resolved to a satisfying range"):r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" can't be resolved to a satisfying range (note: network resolution has been disabled)"))}});if(y.hasErrors())return y.exitCode();let w=!1;const B=[],v=[];for(const[,e,n]of m){let i;const s=e.filter(e=>null!==e.descriptor),A=s[0].descriptor,a=s.every(e=>p.structUtils.areDescriptorsEqual(e.descriptor,A));1===s.length||a?i=A:(w=!0,({answer:i}=await o({type:"list",name:"answer",message:"Which range do you want to use?",choices:e.map(({descriptor:e,reason:r})=>e?{name:r,value:e,short:p.structUtils.prettyDescriptor(t.configuration,e)}:{name:r,disabled:()=>!0})})));const c=r.manifest[n].get(i.identHash);void 0!==c&&c.descriptorHash===i.descriptorHash||(r.manifest[n].set(i.identHash,i),this.optional&&("dependencies"===n?r.manifest.ensureDependencyMeta({...i,range:"unknown"}).optional=!0:"peerDependencies"===n&&(r.manifest.ensurePeerDependencyMeta({...i,range:"unknown"}).optional=!0)),void 0===c?B.push([r,n,i,C]):v.push([r,n,c,i]))}await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyAddition,B),await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,v),w&&this.context.stdout.write("\n");return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await t.install({cache:n,report:e})})).exitCode()}}M.usage=d.Command.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `savePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a tag range (such as `latest` or `rc`), Yarn will resolve this tag to a semver version and use that in the resulting package.json entry (meaning that `yarn add foo@latest` will have exactly the same effect as `yarn add foo`).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: .\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]}),(0,a.gn)([d.Command.Rest()],M.prototype,"packages",void 0),(0,a.gn)([d.Command.Boolean("--json")],M.prototype,"json",void 0),(0,a.gn)([d.Command.Boolean("-E,--exact")],M.prototype,"exact",void 0),(0,a.gn)([d.Command.Boolean("-T,--tilde")],M.prototype,"tilde",void 0),(0,a.gn)([d.Command.Boolean("-C,--caret")],M.prototype,"caret",void 0),(0,a.gn)([d.Command.Boolean("-D,--dev")],M.prototype,"dev",void 0),(0,a.gn)([d.Command.Boolean("-P,--peer")],M.prototype,"peer",void 0),(0,a.gn)([d.Command.Boolean("-O,--optional")],M.prototype,"optional",void 0),(0,a.gn)([d.Command.Boolean("--prefer-dev")],M.prototype,"preferDev",void 0),(0,a.gn)([d.Command.Boolean("-i,--interactive")],M.prototype,"interactive",void 0),(0,a.gn)([d.Command.Boolean("--cached")],M.prototype,"cached",void 0),(0,a.gn)([d.Command.Path("add")],M.prototype,"execute",null);class N extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,locator:r}=await g.I.find(e,this.context.cwd);if(await t.restoreInstallState(),this.name){const n=(await p.scriptUtils.getPackageAccessibleBinaries(r,{project:t})).get(this.name);if(!n)throw new d.UsageError(`Couldn't find a binary named "${this.name}" for package "${p.structUtils.prettyLocator(e,r)}"`);const[,i]=n;return this.context.stdout.write(i+"\n"),0}return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async n=>{const i=await p.scriptUtils.getPackageAccessibleBinaries(r,{project:t}),o=Array.from(i.keys()).reduce((e,t)=>Math.max(e,t.length),0);for(const[e,[t,r]]of i)n.reportJson({name:e,source:p.structUtils.stringifyIdent(t),path:r});if(this.verbose)for(const[t,[r]]of i)n.reportInfo(null,`${t.padEnd(o," ")} ${p.structUtils.prettyLocator(e,r)}`);else for(const e of i.keys())n.reportInfo(null,e)})).exitCode()}}N.usage=d.Command.Usage({description:"get the path to a binary script",details:"\n When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the `-v,--verbose` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.\n\n When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n ",examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]}),(0,a.gn)([d.Command.String({required:!1})],N.prototype,"name",void 0),(0,a.gn)([d.Command.Boolean("-v,--verbose")],N.prototype,"verbose",void 0),(0,a.gn)([d.Command.Boolean("--json")],N.prototype,"json",void 0),(0,a.gn)([d.Command.Path("bin")],N.prototype,"execute",null);var R=r(56537);class L extends c.BaseCommand{constructor(){super(...arguments),this.mirror=!1,this.all=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),t=await u.C.find(e);return(await f.P.start({configuration:e,stdout:this.context.stdout},async()=>{const e=(this.all||this.mirror)&&null!==t.mirrorCwd,r=!this.mirror;e&&await R.xfs.removePromise(t.mirrorCwd),r&&await R.xfs.removePromise(t.cwd)})).exitCode()}}L.usage=d.Command.Usage({description:"remove the shared cache files",details:"\n This command will remove all the files from the cache.\n\n By default only the local cache will be cleaned. This behavior can be disabled with the `--mirror`, which will lead to the removal of the global cache files instead, or `--all` (which will remove both the local and global caches for the current project).\n ",examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]}),(0,a.gn)([d.Command.Boolean("--mirror")],L.prototype,"mirror",void 0),(0,a.gn)([d.Command.Boolean("--all")],L.prototype,"all",void 0),(0,a.gn)([d.Command.Path("cache","clean")],L.prototype,"execute",null);var K=r(44674),T=r.n(K),_=r(31669);class P extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.unsafe=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*/,"");if(void 0===e.settings.get(t))throw new d.UsageError(`Couldn't find a configuration settings named "${t}"`);const n=O(e.getSpecial(t,{hideSecrets:!this.unsafe,getNativePaths:!0})),i=r?T()(n,r):n,o=await f.P.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(i)});if(!this.json){if("string"==typeof i)return this.context.stdout.write(i+"\n"),o.exitCode();_.inspect.styles.name="cyan",this.context.stdout.write((0,_.inspect)(i,{depth:1/0,colors:!0,compact:!1})+"\n")}return o.exitCode()}}function O(e){if(e instanceof Map&&(e=Object.fromEntries(e)),"object"==typeof e&&null!==e)for(const t of Object.keys(e)){const r=e[t];"object"==typeof r&&null!==r&&(e[t]=O(r))}return e}P.usage=d.Command.Usage({description:"read a configuration settings",details:"\n This command will print a configuration setting.\n\n Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the `--no-redacted` to get the untransformed value.\n ",examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration","yarn config get 'npmScopes[\"my-company\"].npmRegistryServer'"],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]}),(0,a.gn)([d.Command.String()],P.prototype,"name",void 0),(0,a.gn)([d.Command.Boolean("--json")],P.prototype,"json",void 0),(0,a.gn)([d.Command.Boolean("--no-redacted")],P.prototype,"unsafe",void 0),(0,a.gn)([d.Command.Path("config","get")],P.prototype,"execute",null);var U=r(82558),j=r.n(U),Y=r(81534),G=r.n(Y);class J extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);if(!e.projectCwd)throw new d.UsageError("This command must be run from within a project folder");const t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*/,"");if(void 0===e.settings.get(t))throw new d.UsageError(`Couldn't find a configuration settings named "${t}"`);const n=this.json?JSON.parse(this.value):this.value;await A.VK.updateConfiguration(e.projectCwd,e=>{if(r){const t=j()(e);return G()(t,this.name,n),t}return{...e,[t]:n}});const i=O((await A.VK.find(this.context.cwd,this.context.plugins)).getSpecial(t,{hideSecrets:!0,getNativePaths:!0})),o=r?T()(i,r):i;return(await f.P.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async e=>{_.inspect.styles.name="cyan",e.reportInfo(h.b.UNNAMED,`Successfully set ${this.name} to ${(0,_.inspect)(o,{depth:1/0,colors:!0,compact:!1})}`)})).exitCode()}}J.usage=d.Command.Usage({description:"change a configuration settings",details:"\n This command will set a configuration setting.\n\n When used without the `--json` flag, it can only set a simple configuration setting (a string, a number, or a boolean).\n\n When used with the `--json` flag, it can set both simple and complex configuration settings, including Arrays and Objects.\n ",examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",'yarn config set unsafeHttpWhitelist --json \'["*.example.com", "example.com"]\''],["Set a complex configuration setting (an Object) using the `--json` flag",'yarn config set packageExtensions --json \'{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }\'']]}),(0,a.gn)([d.Command.String()],J.prototype,"name",void 0),(0,a.gn)([d.Command.String()],J.prototype,"value",void 0),(0,a.gn)([d.Command.Boolean("--json")],J.prototype,"json",void 0),(0,a.gn)([d.Command.Path("config","set")],J.prototype,"execute",null);class H extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.why=!1,this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins,{strict:!1});return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{if(e.invalid.size>0&&!this.json){for(const[r,n]of e.invalid)t.reportError(h.b.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${r}" in ${n}`);t.reportSeparator()}if(this.json){const r=p.miscUtils.sortMap(e.settings.keys(),e=>e);for(const n of r){const r=e.settings.get(n),i=e.getSpecial(n,{hideSecrets:!0,getNativePaths:!0}),o=e.sources.get(n);this.verbose?t.reportJson({key:n,effective:i,source:o}):t.reportJson({key:n,effective:i,source:o,...r})}}else{const r=p.miscUtils.sortMap(e.settings.keys(),e=>e),n=r.reduce((e,t)=>Math.max(e,t.length),0),i={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){const o=r.map(t=>{const r=e.settings.get(t);if(!r)throw new Error(`Assertion failed: This settings ("${t}") should have been registered`);return[t,this.why?e.sources.get(t)||"":r.description]}),s=o.reduce((e,[,t])=>Math.max(e,t.length),0);for(const[r,A]of o)t.reportInfo(null,`${r.padEnd(n," ")} ${A.padEnd(s," ")} ${(0,_.inspect)(e.getSpecial(r,{hideSecrets:!0,getNativePaths:!0}),i)}`)}else for(const o of r)t.reportInfo(null,`${o.padEnd(n," ")} ${(0,_.inspect)(e.getSpecial(o,{hideSecrets:!0,getNativePaths:!0}),i)}`)}})).exitCode()}}H.usage=d.Command.Usage({description:"display the current configuration",details:"\n This command prints the current active configuration settings.\n\n When used together with the `-v,--verbose` option, the output will contain the settings description on top of the regular key/value information.\n\n When used together with the `--why` flag, the output will also contain the reason why a settings is set a particular way.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n Note that the paths settings will be normalized - especially on Windows. It means that paths such as `C:\\project` will be transparently shown as `/mnt/c/project`.\n ",examples:[["Print the active configuration settings","$0 config"]]}),(0,a.gn)([d.Command.Boolean("-v,--verbose")],H.prototype,"verbose",void 0),(0,a.gn)([d.Command.Boolean("--why")],H.prototype,"why",void 0),(0,a.gn)([d.Command.Boolean("--json")],H.prototype,"json",void 0),(0,a.gn)([d.Command.Path("config")],H.prototype,"execute",null);class z extends d.Command{async execute(){const{plugins:e}=await A.VK.find(this.context.cwd,this.context.plugins),t=[];for(const r of e){const{commands:e}=r[1];if(e){const n=d.Cli.from(e).definitions();t.push([r[0],n])}}const n=this.cli.definitions(),i=r(60306)["@yarnpkg/builder"].bundles.standard;for(const e of t){const t=e[1];for(const r of t)n.find(e=>{return t=e.path,n=r.path,t.split(" ").slice(1).join()===n.split(" ").slice(1).join();var t,n}).plugin={name:e[0],isDefault:i.includes(e[0])}}this.context.stdout.write(JSON.stringify({commands:n},null,2)+"\n")}}(0,a.gn)([d.Command.Path("--clipanion=definitions")],z.prototype,"execute",null);class q extends d.Command{async execute(){this.context.stdout.write(this.cli.usage(null))}}(0,a.gn)([d.Command.Path("help"),d.Command.Path("--help"),d.Command.Path("-h")],q.prototype,"execute",null);class W extends d.Command{constructor(){super(...arguments),this.args=[]}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!p.structUtils.tryParseIdent(this.leadingArgument)){const e=y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}return await this.cli.run(["run",this.leadingArgument,...this.args])}}(0,a.gn)([d.Command.String()],W.prototype,"leadingArgument",void 0),(0,a.gn)([d.Command.Proxy()],W.prototype,"args",void 0);var V=r(59355);class X extends d.Command{async execute(){this.context.stdout.write((V.o||"")+"\n")}}(0,a.gn)([d.Command.Path("-v"),d.Command.Path("--version")],X.prototype,"execute",null);class Z extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t}=await g.I.find(e,this.context.cwd);return await R.xfs.mktempPromise(async e=>{const{code:r}=await p.execUtils.pipevp(this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await p.scriptUtils.makeScriptEnv({project:t,binFolder:e})});return r})}}Z.usage=d.Command.Usage({description:"execute a shell command",details:"\n This command simply executes a shell binary within the context of the root directory of the active workspace.\n\n It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n ",examples:[["Execute a shell command","$0 exec echo Hello World"]]}),(0,a.gn)([d.Command.String()],Z.prototype,"commandName",void 0),(0,a.gn)([d.Command.Proxy()],Z.prototype,"args",void 0),(0,a.gn)([d.Command.Path("exec")],Z.prototype,"execute",null);var $=r(35691),ee=r(55125);class te extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.checkCache=!1,this.silent=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);void 0!==this.inlineBuilds&&e.useWithSource("",{enableInlineBuilds:this.inlineBuilds},e.startingCwd,{overwrite:!0});const t=!!process.env.NOW_BUILDER,r=!!process.env.NETLIFY,n=async(t,{error:r})=>{const n=await f.P.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async e=>{r?e.reportError(h.b.DEPRECATED_CLI_SETTINGS,t):e.reportWarning(h.b.DEPRECATED_CLI_SETTINGS,t)});return n.hasErrors()?n.exitCode():null};if(void 0!==this.ignoreEngines){const e=await n("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!t});if(null!==e)return e}if(void 0!==this.registry){const e=await n("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(null!==e)return e}if(void 0!==this.preferOffline){const e=await n("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!t});if(null!==e)return e}if(void 0!==this.frozenLockfile){const e=await n("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!0});if(null!==e)return e}if(void 0!==this.cacheFolder){const e=await n("The cache-folder option has been deprecated; use rc settings instead",{error:!r});if(null!==e)return e}const i=void 0===this.immutable&&void 0===this.frozenLockfile?e.get("enableImmutableInstalls"):this.immutable||this.frozenLockfile;if(null!==e.projectCwd){const t=await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout,includeFooter:!1},async t=>{await async function(e,t){if(!e.projectCwd)return!1;const r=y.y1.join(e.projectCwd,e.get("lockfileFilename"));if(!await R.xfs.existsPromise(r))return!1;const n=await R.xfs.readFilePromise(r,"utf8");if(!n.includes("<<<<<<<"))return!1;if(t)throw new $.lk(h.b.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");const[i,o]=function(e){const t=[[],[]],r=e.split(/\r?\n/g);let n=!1;for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith("<<<<<<<")){for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if("======="===e){n=!1;break}n||e.startsWith("|||||||")?n=!0:t[0].push(e)}for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith(">>>>>>>"))break;t[1].push(e)}}else t[0].push(e),t[1].push(e)}return[t[0].join("\n"),t[1].join("\n")]}(n);let s,A;try{s=(0,ee.parseSyml)(i),A=(0,ee.parseSyml)(o)}catch(e){throw new $.lk(h.b.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}const a={...s,...A};for(const[e,t]of Object.entries(a))"string"==typeof t&&delete a[e];return await R.xfs.changeFilePromise(r,(0,ee.stringifySyml)(a),{automaticNewlines:!0}),!0}(e,i)&&t.reportInfo(h.b.AUTOMERGE_SUCCESS,"Automatically fixed merge conflicts 👍")});if(t.hasErrors())return t.exitCode()}const{project:o,workspace:s}=await g.I.find(e,this.context.cwd),a=await u.C.find(e,{immutable:this.immutableCache,check:this.checkCache});if(!s)throw new c.WorkspaceRequiredError(o.cwd,this.context.cwd);return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!0},async e=>{await o.install({cache:a,report:e,immutable:i})})).exitCode()}}te.usage=d.Command.Usage({description:"install the project dependencies",details:"\n This command setup your project if needed. The installation is splitted in four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where are stored the cache files).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked from writing them on the disk in some form (for example by generating the .pnp.js file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.js file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set, Yarn will abort with an error exit code if anything in the install artifacts (`yarn.lock`, `.pnp.js`, ...) was to be modified. For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\n\n If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\n\n If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n ",examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]}),(0,a.gn)([d.Command.Boolean("--json")],te.prototype,"json",void 0),(0,a.gn)([d.Command.Boolean("--immutable")],te.prototype,"immutable",void 0),(0,a.gn)([d.Command.Boolean("--immutable-cache")],te.prototype,"immutableCache",void 0),(0,a.gn)([d.Command.Boolean("--check-cache")],te.prototype,"checkCache",void 0),(0,a.gn)([d.Command.Boolean("--frozen-lockfile",{hidden:!0})],te.prototype,"frozenLockfile",void 0),(0,a.gn)([d.Command.Boolean("--prefer-offline",{hidden:!0})],te.prototype,"preferOffline",void 0),(0,a.gn)([d.Command.Boolean("--ignore-engines",{hidden:!0})],te.prototype,"ignoreEngines",void 0),(0,a.gn)([d.Command.String("--registry",{hidden:!0})],te.prototype,"registry",void 0),(0,a.gn)([d.Command.Boolean("--inline-builds")],te.prototype,"inlineBuilds",void 0),(0,a.gn)([d.Command.String("--cache-folder")],te.prototype,"cacheFolder",void 0),(0,a.gn)([d.Command.Boolean("--silent",{hidden:!0})],te.prototype,"silent",void 0),(0,a.gn)([d.Command.Path(),d.Command.Path("install")],te.prototype,"execute",null);class re extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.private=!1,this.relative=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const i=y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.destination)),o=await A.VK.find(i,this.context.plugins),{project:s,workspace:a}=await g.I.find(o,i);if(!a)throw new c.WorkspaceRequiredError(s.cwd,i);const l=t.topLevelWorkspace,h=[];if(this.all){for(const e of s.workspaces)!e.manifest.name||e.manifest.private&&!this.private||h.push(e);if(0===h.length)throw new d.UsageError("No workspace found to be linked in the target project")}else{if(!a.manifest.name)throw new d.UsageError("The target workspace doesn't have a name and thus cannot be linked");if(a.manifest.private&&!this.private)throw new d.UsageError("The target workspace is marked private - use the --private flag to link it anyway");h.push(a)}for(const e of h){const r=p.structUtils.stringifyIdent(e.locator),n=this.relative?y.y1.relative(t.cwd,e.cwd):e.cwd;l.manifest.resolutions.push({pattern:{descriptor:{fullName:r}},reference:"portal:"+n})}return(await f.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:n,report:e})})).exitCode()}}re.usage=d.Command.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n\n If the `--all` option is set, all workspaces belonging to the target project will be linked to the current one.\n\n There is no `yarn unlink` command. To unlink the workspaces from the current project one must revert the changes made to the `resolutions` field.\n ",examples:[["Register a remote workspace for use in the current project","$0 link ~/ts-loader"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]}),(0,a.gn)([d.Command.String()],re.prototype,"destination",void 0),(0,a.gn)([d.Command.Boolean("--all")],re.prototype,"all",void 0),(0,a.gn)([d.Command.Boolean("-p,--private")],re.prototype,"private",void 0),(0,a.gn)([d.Command.Boolean("-r,--relative")],re.prototype,"relative",void 0),(0,a.gn)([d.Command.Path("link")],re.prototype,"execute",null);class ne extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){return this.cli.run(["exec","node",...this.args])}}ne.usage=d.Command.Usage({description:"run node with the hook already setup",details:"\n This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n\n The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.\n ",examples:[["Run a Node script","$0 node ./my-script.js"]]}),(0,a.gn)([d.Command.Proxy()],ne.prototype,"args",void 0),(0,a.gn)([d.Command.Path("node")],ne.prototype,"execute",null);var ie=r(12087),oe=r(85622),se=r.n(oe);class Ae extends c.BaseCommand{constructor(){super(...arguments),this.onlyIfNeeded=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let t;if("latest"===this.version||"berry"===this.version)t="https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js";else if("classic"===this.version)t="https://nightly.yarnpkg.com/latest.js";else if(p.semverUtils.satisfiesWithPrereleases(this.version,">=2.0.0"))t=`https://github.com/yarnpkg/berry/raw/%40yarnpkg/cli/${this.version}/packages/yarnpkg-cli/bin/yarn.js`;else{if(!p.semverUtils.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))throw B().validRange(this.version)?new d.UsageError("Support for ranges got removed - please use the exact version you want to install, or 'latest' to get the latest build available"):new d.UsageError(`Invalid version descriptor "${this.version}"`);t=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`}return(await f.P.start({configuration:e,stdout:this.context.stdout},async r=>{r.reportInfo(h.b.UNNAMED,"Downloading "+e.format(t,"green"));const n=await p.httpUtils.get(t,{configuration:e});await ae(e,null,n,{report:r})})).exitCode()}}async function ae(e,t,r,{report:n}){const i=e.projectCwd?e.projectCwd:e.startingCwd;null===t&&await R.xfs.mktempPromise(async e=>{const n=y.y1.join(e,"yarn.cjs");await R.xfs.writeFilePromise(n,r);const{stdout:o}=await p.execUtils.execvp(process.execPath,[y.cS.fromPortablePath(n),"--version"],{cwd:i,env:{...process.env,YARN_IGNORE_PATH:"1"}});if(t=o.trim(),!B().valid(t))throw new Error("Invalid semver version")});const o=y.y1.resolve(i,".yarn/releases"),s=y.y1.resolve(o,`yarn-${t}.cjs`),a=y.y1.relative(e.startingCwd,s),c=y.y1.relative(i,s),u=e.get("yarnPath"),l=null===u||u.startsWith(o+"/");n.reportInfo(h.b.UNNAMED,"Saving the new release in "+e.format(a,"magenta")),await R.xfs.removePromise(y.y1.dirname(s)),await R.xfs.mkdirpPromise(y.y1.dirname(s)),await R.xfs.writeFilePromise(s,r),await R.xfs.chmodPromise(s,493),l&&await A.VK.updateConfiguration(i,{yarnPath:c})}Ae.usage=d.Command.Usage({description:"lock the Yarn version used by the project",details:"\n This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will change the `yarnPath` settings from your project `.yarnrc.yml` file to point to the new file.\n\n A very good use case for this command is to enforce the version of Yarn used by the any single member of your team inside a same project - by doing this you ensure that you have control on Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting a different behavior than you.\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"]]}),(0,a.gn)([d.Command.Boolean("--only-if-needed")],Ae.prototype,"onlyIfNeeded",void 0),(0,a.gn)([d.Command.String()],Ae.prototype,"version",void 0),(0,a.gn)([d.Command.Path("policies","set-version"),d.Command.Path("set","version")],Ae.prototype,"execute",null);const ce=/^[0-9]+$/;function ue(e){return ce.test(e)?`pull/${e}/head`:e}class le extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.plugins=[],this.noMinify=!1,this.force=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.installPath)):y.y1.resolve(y.cS.toPortablePath((0,ie.tmpdir)()),"yarnpkg-sources",p.hashUtils.makeHash(this.repository).slice(0,6));return(await f.P.start({configuration:e,stdout:this.context.stdout},async r=>{await ge(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(h.b.UNNAMED,"Building a fresh bundle"),r.reportSeparator(),await he((({plugins:e,noMinify:t},r)=>[["yarn","build:cli",...(new Array).concat(...e.map(e=>["--plugin",se().resolve(r,e)])),...t?["--no-minify"]:[],"|"]])(this,t),{configuration:e,context:this.context,target:t}),r.reportSeparator();const n=y.y1.resolve(t,"packages/yarnpkg-cli/bundles/yarn.js"),i=await R.xfs.readFilePromise(n);await ae(e,"sources",i,{report:r})})).exitCode()}}async function he(e,{configuration:t,context:r,target:n}){for(const[i,...o]of e){const e="|"===o[o.length-1];if(e&&o.pop(),e)await p.execUtils.pipevp(i,o,{cwd:n,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(t.format(" $ "+[i,...o].join(" "),"grey")+"\n");try{await p.execUtils.execvp(i,o,{cwd:n,strict:!0})}catch(e){throw r.stdout.write(e.stdout||e.stack),e}}}}async function ge(e,{configuration:t,report:r,target:n}){let i=!1;if(!e.force&&R.xfs.existsSync(y.y1.join(n,".git"))){r.reportInfo(h.b.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await he((({branch:e})=>[["git","fetch","origin",ue(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]])(e),{configuration:t,context:e.context,target:n}),i=!0}catch(e){r.reportSeparator(),r.reportWarning(h.b.UNNAMED,"Repository update failed; we'll try to regenerate it")}}i||(r.reportInfo(h.b.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await R.xfs.removePromise(n),await R.xfs.mkdirpPromise(n),await he((({repository:e,branch:t},r)=>[["git","init",y.cS.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin",ue(t)],["git","reset","--hard","FETCH_HEAD"]])(e,n),{configuration:t,context:e.context,target:n}))}le.usage=d.Command.Usage({description:"build Yarn from master",details:"\n This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.\n ",examples:[["Build Yarn from master","$0 set version from sources"]]}),(0,a.gn)([d.Command.String("--path")],le.prototype,"installPath",void 0),(0,a.gn)([d.Command.String("--repository")],le.prototype,"repository",void 0),(0,a.gn)([d.Command.String("--branch")],le.prototype,"branch",void 0),(0,a.gn)([d.Command.Array("--plugin")],le.prototype,"plugins",void 0),(0,a.gn)([d.Command.Boolean("--no-minify")],le.prototype,"noMinify",void 0),(0,a.gn)([d.Command.Boolean("-f,--force")],le.prototype,"force",void 0),(0,a.gn)([d.Command.Path("set","version","from","sources")],le.prototype,"execute",null);var fe=r(92184);async function pe(e){const t=await p.httpUtils.get("https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml",{configuration:e});return(0,ee.parseSyml)(t.toString())}class de extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{const r=await pe(e);for(const[e,{experimental:n,...i}]of Object.entries(r)){let r=e;n&&(r+=" [experimental]"),t.reportJson({name:e,experimental:n,...i}),t.reportInfo(null,r)}})).exitCode()}}de.usage=d.Command.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]}),(0,a.gn)([d.Command.Boolean("--json")],de.prototype,"json",void 0),(0,a.gn)([d.Command.Path("plugin","list")],de.prototype,"execute",null);class Ce extends c.BaseCommand{async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);return(await f.P.start({configuration:e,stdout:this.context.stdout},async t=>{const{project:r}=await g.I.find(e,this.context.cwd);let n,i;if(this.name.match(/^\.{0,2}[\\/]/)||y.cS.isAbsolute(this.name)){const o=y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.name));t.reportInfo(h.b.UNNAMED,"Reading "+e.format(o,"green")),n=y.y1.relative(r.cwd,o),i=await R.xfs.readFilePromise(o)}else{let r;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch(e){throw new $.lk(h.b.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}n=this.name,r=this.name}else{const t=p.structUtils.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),i=p.structUtils.stringifyIdent(t),o=await pe(e);if(!Object.prototype.hasOwnProperty.call(o,i))throw new $.lk(h.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${i}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be referenced by their name; any other plugin will have to be referenced through its public url (for example https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js).`);n=i,r=o[i].url}t.reportInfo(h.b.UNNAMED,"Downloading "+e.format(r,"green")),i=await p.httpUtils.get(r,{configuration:e})}await Ee(n,i,{project:r,report:t})})).exitCode()}}async function Ee(e,t,{project:r,report:n}){const{configuration:i}=r,o={},s={exports:o};(0,fe.runInNewContext)(t.toString(),{module:s,exports:o});const a=s.exports.name,c=`.yarn/plugins/${a}.cjs`,u=y.y1.resolve(r.cwd,c);n.reportInfo(h.b.UNNAMED,"Saving the new plugin in "+i.format(c,"magenta")),await R.xfs.mkdirpPromise(y.y1.dirname(u)),await R.xfs.writeFilePromise(u,t);const l={path:c,spec:e};await A.VK.updateConfiguration(r.cwd,e=>{const t=[];let n=!1;for(const i of e.plugins||[]){const e="string"!=typeof i?i.path:i,o=y.y1.resolve(r.cwd,y.cS.toPortablePath(e)),{name:s}=p.miscUtils.dynamicRequire(y.cS.fromPortablePath(o));s!==a?t.push(i):(t.push(l),n=!0)}return n||t.push(l),{plugins:t}})}Ce.usage=d.Command.Usage({category:"Plugin-related commands",description:"download a plugin",details:"\n This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.\n\n Three types of plugin references are accepted:\n\n - If the plugin is stored within the Yarn repository, it can be referenced by name.\n - Third-party plugins can be referenced directly through their public urls.\n - Local plugins can be referenced by their path on the disk.\n\n Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the `@yarnpkg/builder` package).\n ",examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]}),(0,a.gn)([d.Command.String()],Ce.prototype,"name",void 0),(0,a.gn)([d.Command.Path("plugin","import")],Ce.prototype,"execute",null);class Ie extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.noMinify=!1,this.force=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.installPath)):y.y1.resolve(y.cS.toPortablePath((0,ie.tmpdir)()),"yarnpkg-sources",p.hashUtils.makeHash(this.repository).slice(0,6));return(await f.P.start({configuration:e,stdout:this.context.stdout},async r=>{const{project:n}=await g.I.find(e,this.context.cwd),i=p.structUtils.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),o=p.structUtils.stringifyIdent(i),s=await pe(e);if(!Object.prototype.hasOwnProperty.call(s,o))throw new $.lk(h.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${o}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);const A=o,a=A.replace(/@yarnpkg\//,"");await ge(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(h.b.UNNAMED,"Building a fresh "+a),r.reportSeparator(),await he((({pluginName:e,noMinify:t},r)=>[["yarn","build:"+e,...t?["--no-minify"]:[],"|"]])({pluginName:a,noMinify:this.noMinify}),{configuration:e,context:this.context,target:t}),r.reportSeparator();const c=y.y1.resolve(t,`packages/${a}/bundles/${A}.js`),u=await R.xfs.readFilePromise(c);await Ee(A,u,{project:n,report:r})})).exitCode()}}Ie.usage=d.Command.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:"\n This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.\n\n The plugins can be referenced by their short name if sourced from the official Yarn repository.\n ",examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]}),(0,a.gn)([d.Command.String()],Ie.prototype,"name",void 0),(0,a.gn)([d.Command.String("--path")],Ie.prototype,"installPath",void 0),(0,a.gn)([d.Command.String("--repository")],Ie.prototype,"repository",void 0),(0,a.gn)([d.Command.String("--branch")],Ie.prototype,"branch",void 0),(0,a.gn)([d.Command.Boolean("--no-minify")],Ie.prototype,"noMinify",void 0),(0,a.gn)([d.Command.Boolean("-f,--force")],Ie.prototype,"force",void 0),(0,a.gn)([d.Command.Path("plugin","import","from","sources")],Ie.prototype,"execute",null);class me extends c.BaseCommand{async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t}=await g.I.find(e,this.context.cwd);return(await f.P.start({configuration:e,stdout:this.context.stdout},async r=>{const n=this.name,i=p.structUtils.parseIdent(n);if(!e.plugins.has(n))throw new d.UsageError(p.structUtils.prettyIdent(e,i)+" isn't referenced by the current configuration");const o=`.yarn/plugins/${n}.cjs`,s=y.y1.resolve(t.cwd,o);R.xfs.existsSync(s)&&(r.reportInfo(h.b.UNNAMED,`Removing ${e.format(o,A.a5.PATH)}...`),await R.xfs.removePromise(s)),r.reportInfo(h.b.UNNAMED,"Updating the configuration..."),await A.VK.updateConfiguration(t.cwd,e=>{if(!Array.isArray(e.plugins))return{};return{plugins:e.plugins.filter(e=>e.path!==o)}})})).exitCode()}}me.usage=d.Command.Usage({category:"Plugin-related commands",description:"remove a plugin",details:"\n This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.\n\n **Note:** The plugins have to be referenced by their name property, which can be obtained using the `yarn plugin runtime` command. Shorthands are not allowed.\n ",examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]}),(0,a.gn)([d.Command.String()],me.prototype,"name",void 0),(0,a.gn)([d.Command.Path("plugin","remove")],me.prototype,"execute",null);class ye extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{for(const r of e.plugins.keys()){const e=this.context.plugins.plugins.has(r);let n=r;e&&(n+=" [builtin]"),t.reportJson({name:r,builtin:e}),t.reportInfo(null,""+n)}})).exitCode()}}ye.usage=d.Command.Usage({category:"Plugin-related commands",description:"list the active plugins",details:"\n This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.\n ",examples:[["List the currently active plugins","$0 plugin runtime"]]}),(0,a.gn)([d.Command.Boolean("--json")],ye.prototype,"json",void 0),(0,a.gn)([d.Command.Path("plugin","runtime")],ye.prototype,"execute",null);class we extends c.BaseCommand{constructor(){super(...arguments),this.idents=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const i=new Set;for(const e of this.idents)i.add(p.structUtils.parseIdent(e).identHash);await t.resolveEverything({cache:n,report:new I.$});const o=e.get("bstatePath"),s=R.xfs.existsSync(o)?(0,ee.parseSyml)(await R.xfs.readFilePromise(o,"utf8")):{},a=new Map;for(const e of t.storedPackages.values()){if(!Object.prototype.hasOwnProperty.call(s,e.locatorHash))continue;if(0===i.size||i.has(e.identHash))continue;const t=s[e.locatorHash];a.set(e.locatorHash,t)}if(a.size>0){const r=e.get("bstatePath"),n=g.I.generateBuildStateFile(a,t.storedPackages);await R.xfs.mkdirpPromise(y.y1.dirname(r)),await R.xfs.changeFilePromise(r,n,{automaticNewlines:!0})}else await R.xfs.removePromise(o);return(await f.P.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await t.install({cache:n,report:e})})).exitCode()}}we.usage=d.Command.Usage({description:"rebuild the project's native packages",details:"\n This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.\n\n Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).\n\n By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.\n ",examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]}),(0,a.gn)([d.Command.Rest()],we.prototype,"idents",void 0),(0,a.gn)([d.Command.Path("rebuild")],we.prototype,"execute",null);var Be=r(2401),Qe=r.n(Be);class ve extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.patterns=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const o=this.all?t.workspaces:[r],s=[i.REGULAR,i.DEVELOPMENT,i.PEER],a=[];let l=!1;const h=[];for(const e of this.patterns){let t=!1;const r=p.structUtils.parseIdent(e);for(const n of o){const i=[...n.manifest.peerDependenciesMeta.keys()];for(const r of Qe()(i,e))n.manifest.peerDependenciesMeta.delete(r),l=!0,t=!0;for(const e of s){const i=n.manifest.getForScope(e),o=[...i.values()].map(e=>p.structUtils.stringifyIdent(e));for(const s of Qe()(o,p.structUtils.stringifyIdent(r))){const{identHash:r}=p.structUtils.parseIdent(s),o=i.get(r);if(void 0===o)throw new Error("Assertion failed: Expected the descriptor to be registered");n.manifest[e].delete(r),h.push([n,e,o]),l=!0,t=!0}}}t||a.push(e)}const C=a.length>1?"Patterns":"Pattern",E=a.length>1?"don't":"doesn't",I=this.all?"any":"this";if(a.length>0)throw new d.UsageError(`${C} ${a.join(", ")} ${E} match packages referenced by ${I} workspace`);if(l){await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyRemoval,h);return(await f.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:n,report:e})})).exitCode()}return 0}}ve.usage=d.Command.Usage({description:"remove dependencies from the project",details:"\n This command will remove the packages matching the specified patterns from the current workspace.\n\n If the `-A,--all` option is set, the operation will be applied to all workspaces from the current project.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n ",examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]}),(0,a.gn)([d.Command.Boolean("-A,--all")],ve.prototype,"all",void 0),(0,a.gn)([d.Command.Rest()],ve.prototype,"patterns",void 0),(0,a.gn)([d.Command.Path("remove")],ve.prototype,"execute",null);class De extends c.BaseCommand{async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);return(await f.P.start({configuration:e,stdout:this.context.stdout},async t=>{const n=r.manifest.scripts,i=p.miscUtils.sortMap(n.keys(),e=>e),o={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},s=i.reduce((e,t)=>Math.max(e,t.length),0);for(const[e,r]of n.entries())t.reportInfo(null,`${e.padEnd(s," ")} ${(0,_.inspect)(r,o)}`)})).exitCode()}}(0,a.gn)([d.Command.Path("run")],De.prototype,"execute",null);const be=new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["interactive-tools",[["upgrade-interactive"]]],["stage",[["stage"]]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","foreach"],["workspace"]]]]);class Se extends c.BaseCommand{constructor(){super(...arguments),this.inspect=!1,this.inspectBrk=!1,this.topLevel=!1,this.binariesOnly=!1,this.args=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r,locator:n}=await g.I.find(e,this.context.cwd);await t.restoreInstallState();const i=this.topLevel?t.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await p.scriptUtils.hasPackageScript(i,this.scriptName,{project:t}))return await p.scriptUtils.executePackageScript(i,this.scriptName,this.args,{project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if((await p.scriptUtils.getPackageAccessibleBinaries(i,{project:t})).get(this.scriptName)){const e=[];return this.inspect&&("string"==typeof this.inspect?e.push("--inspect="+this.inspect):e.push("--inspect")),this.inspectBrk&&("string"==typeof this.inspectBrk?e.push("--inspect-brk="+this.inspectBrk):e.push("--inspect-brk")),await p.scriptUtils.executePackageAccessibleBinary(i,this.scriptName,this.args,{cwd:this.context.cwd,project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:e})}if(!this.topLevel&&!this.binariesOnly&&r&&this.scriptName.includes(":")){const e=(await Promise.all(t.workspaces.map(async e=>e.manifest.scripts.has(this.scriptName)?e:null))).filter(e=>null!==e);if(1===e.length)return await p.scriptUtils.executeWorkspaceScript(e[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw"node-gyp"===this.scriptName?new d.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${p.structUtils.prettyLocator(e,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new d.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${p.structUtils.prettyLocator(e,n)}).`);{if("global"===this.scriptName)throw new d.UsageError("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");const e=[this.scriptName].concat(this.args);for(const[t,r]of be)for(const n of r)if(e.length>=n.length&&JSON.stringify(e.slice(0,n.length))===JSON.stringify(n))throw new d.UsageError(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${t} plugin. You can install it with "yarn plugin import ${t}".`);throw new d.UsageError(`Couldn't find a script named "${this.scriptName}".`)}}}Se.usage=d.Command.Usage({description:"run a script defined in the package.json",details:"\n This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:\n\n - If the `scripts` field from your local package.json contains a matching script name, its definition will get executed.\n\n - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed (the `--inspect` and `--inspect-brk` options will then be forwarded to the underlying Node process).\n\n - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.\n\n Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).\n ",examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]}),(0,a.gn)([d.Command.String("--inspect",{tolerateBoolean:!0})],Se.prototype,"inspect",void 0),(0,a.gn)([d.Command.String("--inspect-brk",{tolerateBoolean:!0})],Se.prototype,"inspectBrk",void 0),(0,a.gn)([d.Command.Boolean("-T,--top-level",{hidden:!0})],Se.prototype,"topLevel",void 0),(0,a.gn)([d.Command.Boolean("-B,--binaries-only",{hidden:!0})],Se.prototype,"binariesOnly",void 0),(0,a.gn)([d.Command.Boolean("--silent",{hidden:!0})],Se.prototype,"silent",void 0),(0,a.gn)([d.Command.String()],Se.prototype,"scriptName",void 0),(0,a.gn)([d.Command.Proxy()],Se.prototype,"args",void 0),(0,a.gn)([d.Command.Path("run")],Se.prototype,"execute",null);class ke extends c.BaseCommand{constructor(){super(...arguments),this.save=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const i=p.structUtils.parseDescriptor(this.descriptor,!0),o=p.structUtils.makeDescriptor(i,this.resolution);t.storedDescriptors.set(i.descriptorHash,i),t.storedDescriptors.set(o.descriptorHash,o),t.resolutionAliases.set(i.descriptorHash,o.descriptorHash);return(await f.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:n,report:e})})).exitCode()}}ke.usage=d.Command.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@^1.2.3 1.5.0"]]}),(0,a.gn)([d.Command.String()],ke.prototype,"descriptor",void 0),(0,a.gn)([d.Command.String()],ke.prototype,"resolution",void 0),(0,a.gn)([d.Command.Boolean("-s,--save")],ke.prototype,"save",void 0),(0,a.gn)([d.Command.Path("set","resolution")],ke.prototype,"execute",null);class xe extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.interactive=!1,this.verbose=!1,this.exact=!1,this.tilde=!1,this.caret=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const o=E().createPromptModule({input:this.context.stdin,output:this.context.stdout}),a=Q(this,t),C=this.interactive?[s.KEEP,s.REUSE,s.PROJECT,s.LATEST]:[s.PROJECT,s.LATEST],I=[],m=[];for(const e of this.patterns){let r=!1;const o=p.structUtils.parseDescriptor(e);for(const e of t.workspaces)for(const s of[i.REGULAR,i.DEVELOPMENT]){const i=[...e.manifest.getForScope(s).values()].map(e=>p.structUtils.stringifyIdent(e));for(const A of Qe()(i,p.structUtils.stringifyIdent(o))){const i=p.structUtils.parseIdent(A),c=e.manifest[s].get(i.identHash);if(void 0===c)throw new Error("Assertion failed: Expected the descriptor to be registered");const u=p.structUtils.makeDescriptor(i,o.range);I.push(Promise.resolve().then(async()=>[e,s,c,await x(u,{project:t,workspace:e,cache:n,target:s,modifier:a,strategies:C})])),r=!0}}r||m.push(e)}if(m.length>1)throw new d.UsageError(`Patterns ${m.join(", ")} don't match any packages referenced by any workspace`);if(m.length>0)throw new d.UsageError(`Pattern ${m[0]} doesn't match any packages referenced by any workspace`);const y=await Promise.all(I),w=await l.h.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async r=>{for(const[,,n,i]of y){const o=i.filter(e=>null!==e.descriptor);0===o.length?t.configuration.get("enableNetwork")?r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" can't be resolved to a satisfying range"):r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" can't be resolved to a satisfying range (note: network resolution has been disabled)"):o.length>1&&!this.interactive&&r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" has multiple possible upgrade strategies; use -i to disambiguate manually")}});if(w.hasErrors())return w.exitCode();let B=!1;const v=[];for(const[r,n,,i]of y){let s;const A=i.filter(e=>null!==e.descriptor),a=A[0].descriptor,c=A.every(e=>p.structUtils.areDescriptorsEqual(e.descriptor,a));1===A.length||c?s=a:(B=!0,({answer:s}=await o({type:"list",name:"answer",message:`Which range to you want to use in ${p.structUtils.prettyWorkspace(e,r)} ❯ ${n}?`,choices:i.map(({descriptor:e,reason:r})=>e?{name:r,value:e,short:p.structUtils.prettyDescriptor(t.configuration,e)}:{name:r,disabled:()=>!0})})));const u=r.manifest[n].get(s.identHash);if(void 0===u)throw new Error("Assertion failed: This descriptor should have a matching entry");if(u.descriptorHash!==s.descriptorHash)r.manifest[n].set(s.identHash,s),v.push([r,n,u,s]);else{const n=e.makeResolver(),i={project:t,resolver:n},o=n.bindDescriptor(u,r.anchoredLocator,i);t.forgetResolution(o)}}await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,v),B&&this.context.stdout.write("\n");return(await f.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:n,report:e})})).exitCode()}}xe.usage=d.Command.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),(0,a.gn)([d.Command.Rest()],xe.prototype,"patterns",void 0),(0,a.gn)([d.Command.Boolean("-i,--interactive")],xe.prototype,"interactive",void 0),(0,a.gn)([d.Command.Boolean("-v,--verbose")],xe.prototype,"verbose",void 0),(0,a.gn)([d.Command.Boolean("-E,--exact")],xe.prototype,"exact",void 0),(0,a.gn)([d.Command.Boolean("-T,--tilde")],xe.prototype,"tilde",void 0),(0,a.gn)([d.Command.Boolean("-C,--caret")],xe.prototype,"caret",void 0),(0,a.gn)([d.Command.Path("up")],xe.prototype,"execute",null);var Fe=r(5195);class Me extends c.BaseCommand{constructor(){super(...arguments),this.recursive=!1,this.peers=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=p.structUtils.parseIdent(this.package).identHash,i=this.recursive?function(e,t,{configuration:r,peers:n}){const i=p.miscUtils.sortMap(e.workspaces,e=>p.structUtils.stringifyLocator(e.anchoredLocator)),o=new Set,s=new Set,A=r=>{if(o.has(r.locatorHash))return s.has(r.locatorHash);if(o.add(r.locatorHash),r.identHash===t)return s.add(r.locatorHash),!0;let i=!1;r.identHash===t&&(i=!0);for(const t of r.dependencies.values()){if(!n&&r.peerDependencies.has(t.identHash))continue;const o=e.storedResolutions.get(t.descriptorHash);if(!o)throw new Error("Assertion failed: The resolution should have been registered");const s=e.storedPackages.get(o);if(!s)throw new Error("Assertion failed: The package should have been registered");A(s)&&(i=!0)}return i&&s.add(r.locatorHash),i};for(const t of i){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");A(r)}const a=new Set,c={},u=(t,i,o)=>{if(!s.has(t.locatorHash))return;const A={};if(i[null!==o?`${p.structUtils.prettyLocator(r,t)} (via ${p.structUtils.prettyRange(r,o)})`:""+p.structUtils.prettyLocator(r,t)]=A,!a.has(t.locatorHash)&&(a.add(t.locatorHash),null===o||!e.tryWorkspaceByLocator(t)))for(const r of t.dependencies.values()){if(!n&&t.peerDependencies.has(r.identHash))continue;const i=e.storedResolutions.get(r.descriptorHash);if(!i)throw new Error("Assertion failed: The resolution should have been registered");const o=e.storedPackages.get(i);if(!o)throw new Error("Assertion failed: The package should have been registered");u(o,A,r.range)}};for(const t of i){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");u(r,c,null)}return c}(t,n,{configuration:e,peers:this.peers}):function(e,t,{configuration:r,peers:n}){const i=p.miscUtils.sortMap(e.storedPackages.values(),e=>p.structUtils.stringifyLocator(e)),o={};for(const s of i){let i=null;for(const A of s.dependencies.values()){if(!n&&s.peerDependencies.has(A.identHash))continue;const a=e.storedResolutions.get(A.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");const c=e.storedPackages.get(a);if(!c)throw new Error("Assertion failed: The package should have been registered");if(c.identHash!==t)continue;if(null===i){i={};const e=""+p.structUtils.prettyLocator(r,s);o[e]=i}const u=`${p.structUtils.prettyLocator(r,c)} (via ${p.structUtils.prettyRange(r,A.range)})`;i[u]={}}}return o}(t,n,{configuration:e,peers:this.peers});!function(e,t){let r=(0,Fe.asTree)(t,!1,!1);r=r.replace(/^([├└]─)/gm,"│\n$1").replace(/^│\n/,""),e.write(r)}(this.context.stdout,i)}}Me.usage=d.Command.Usage({description:"display the reason why a package is needed",details:'\n This command prints the exact reasons why a package appears in the dependency tree.\n\n If `-R,--recursive` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.\n\n If `--peers` is set, the command will also print the peer dependencies that match the specified name.\n ',examples:[["Explain why lodash is used in your project","$0 why lodash"]]}),(0,a.gn)([d.Command.String()],Me.prototype,"package",void 0),(0,a.gn)([d.Command.Boolean("-R,--recursive")],Me.prototype,"recursive",void 0),(0,a.gn)([d.Command.Boolean("--peers")],Me.prototype,"peers",void 0),(0,a.gn)([d.Command.Path("why")],Me.prototype,"execute",null);class Ne extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t}=await g.I.find(e,this.context.cwd);return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async e=>{for(const r of t.workspaces){const{manifest:n}=r;let i;if(this.verbose){const e=new Set,r=new Set;for(const i of m.G.hardDependencies)for(const[o,s]of n.getForScope(i)){const n=t.tryWorkspaceByDescriptor(s);null===n?t.workspacesByIdent.has(o)&&r.add(s):e.add(n)}i={workspaceDependencies:Array.from(e).map(e=>e.relativeCwd),mismatchedWorkspaceDependencies:Array.from(r).map(e=>p.structUtils.stringifyDescriptor(e))}}e.reportInfo(null,""+r.relativeCwd),e.reportJson({location:r.relativeCwd,name:n.name?p.structUtils.stringifyIdent(n.name):null,...i})}})).exitCode()}}Ne.usage=d.Command.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project. If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n "}),(0,a.gn)([d.Command.Boolean("-v,--verbose")],Ne.prototype,"verbose",void 0),(0,a.gn)([d.Command.Boolean("--json")],Ne.prototype,"json",void 0),(0,a.gn)([d.Command.Path("workspaces","list")],Ne.prototype,"execute",null);class Re extends d.Command{constructor(){super(...arguments),this.args=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=t.workspaces,i=new Map(n.map(e=>{const t=p.structUtils.convertToIdent(e.locator);return[p.structUtils.stringifyIdent(t),e]})),o=i.get(this.workspaceName);if(void 0===o){const e=Array.from(i.keys()).sort();throw new d.UsageError(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:\n - ${e.join("\n - ")}?`)}return this.cli.run([this.commandName,...this.args],{cwd:o.cwd})}}Re.usage=d.Command.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:"\n This command will run a given sub-command on a single workspace.\n ",examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]}),(0,a.gn)([d.Command.String()],Re.prototype,"workspaceName",void 0),(0,a.gn)([d.Command.String()],Re.prototype,"commandName",void 0),(0,a.gn)([d.Command.Proxy()],Re.prototype,"args",void 0),(0,a.gn)([d.Command.Path("workspace")],Re.prototype,"execute",null);const Le={configuration:{enableImmutableInstalls:{description:"If true, prevents the install command from modifying the lockfile",type:A.a2.BOOLEAN,default:!1},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:A.a2.STRING,default:o.CARET}},commands:[L,P,J,ke,le,Ae,Ne,z,q,W,X,M,N,H,Z,te,re,ne,Ie,Ce,me,de,ye,we,ve,De,Se,xe,Me,Re]}},41466:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(84132),i=r(46009),o=r(75448);const s=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,A=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/;var a=r(46611),c=r(32485);const u={fetchers:[class{supports(e,t){return!!A.test(e.reference)&&!!e.reference.startsWith("file:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[i,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:i,releaseFs:o,prefixPath:n.structUtils.getIdentVendorPath(e),checksum:s}}async fetchFromDisk(e,t){const{parentLocator:r,path:s}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"file:"}),A=i.y1.isAbsolute(s)?{packageFs:new o.M(i.LZ.root),prefixPath:i.LZ.dot,localPath:i.LZ.root}:await t.fetcher.fetch(r,t),a=A.localPath?{packageFs:new o.M(i.LZ.root),prefixPath:i.y1.relative(i.LZ.root,A.localPath)}:A;A!==a&&A.releaseFs&&A.releaseFs();const c=a.packageFs,u=i.y1.join(a.prefixPath,s),l=await c.readFilePromise(u);return await n.miscUtils.releaseAfterUseAsync(async()=>await n.tgzUtils.convertToZip(l,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.structUtils.getIdentVendorPath(e),stripComponents:1}),a.releaseFs)}},class{supports(e,t){return!!e.reference.startsWith("file:")}getLocalPath(e,t){const{parentLocator:r,path:o}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"file:"});if(i.y1.isAbsolute(o))return o;const s=t.fetcher.getLocalPath(r,t);return null===s?null:i.y1.resolve(s,o)}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[i,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:i,releaseFs:o,prefixPath:n.structUtils.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:s}}async fetchFromDisk(e,t){const{parentLocator:r,path:s}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"file:"}),A=i.y1.isAbsolute(s)?{packageFs:new o.M(i.LZ.root),prefixPath:i.LZ.dot,localPath:i.LZ.root}:await t.fetcher.fetch(r,t),a=A.localPath?{packageFs:new o.M(i.LZ.root),prefixPath:i.y1.relative(i.LZ.root,A.localPath)}:A;A!==a&&A.releaseFs&&A.releaseFs();const c=a.packageFs,u=i.y1.join(a.prefixPath,s);return await n.miscUtils.releaseAfterUseAsync(async()=>await n.tgzUtils.makeArchiveFromDirectory(u,{baseFs:c,prefixPath:n.structUtils.getIdentVendorPath(e),compressionLevel:t.project.configuration.get("compressionLevel")}),a.releaseFs)}}],resolvers:[class{supportsDescriptor(e,t){return!!A.test(e.range)&&(!!e.range.startsWith("file:")||!!s.test(e.range))}supportsLocator(e,t){return!!A.test(e.reference)&&!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return s.test(e.range)&&(e=n.structUtils.makeDescriptor(e,"file:"+e.range)),n.structUtils.bindDescriptor(e,{locator:n.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let o=e.range;return o.startsWith("file:")&&(o=o.slice("file:".length)),[n.structUtils.makeLocator(e,"file:"+i.cS.toPortablePath(o))]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),i=await n.miscUtils.releaseAfterUseAsync(async()=>await a.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:i.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:c.U.HARD,dependencies:i.dependencies,peerDependencies:i.peerDependencies,dependenciesMeta:i.dependenciesMeta,peerDependenciesMeta:i.peerDependenciesMeta,bin:i.bin}}},class{supportsDescriptor(e,t){return!!e.range.match(s)||!!e.range.startsWith("file:")}supportsLocator(e,t){return!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return s.test(e.range)&&(e=n.structUtils.makeDescriptor(e,"file:"+e.range)),n.structUtils.bindDescriptor(e,{locator:n.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let o=e.range;return o.startsWith("file:")&&(o=o.slice("file:".length)),[n.structUtils.makeLocator(e,"file:"+i.cS.toPortablePath(o))]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),i=await n.miscUtils.releaseAfterUseAsync(async()=>await a.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:i.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:c.U.HARD,dependencies:i.dependencies,peerDependencies:i.peerDependencies,dependenciesMeta:i.dependenciesMeta,peerDependenciesMeta:i.peerDependenciesMeta,bin:i.bin}}}]}},10284:(e,t,r)=>{"use strict";r.r(t),r.d(t,{gitUtils:()=>n,default:()=>B});var n={};r.r(n),r.d(n,{TreeishProtocols:()=>g,clone:()=>m,isGitUrl:()=>f,lsRemote:()=>E,normalizeLocator:()=>C,normalizeRepoUrl:()=>d,resolveUrl:()=>I,splitRepoUrl:()=>p});var i=r(84132),o=r(46009),s=r(56537),A=r(71191),a=r.n(A),c=r(10966),u=r.n(c);function l(){return{...process.env,GIT_SSH_COMMAND:"ssh -o BatchMode=yes"}}const h=[/^ssh:/,/^git(?:\+ssh)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^(?:git\+)https?:[^#]+\/[^#]+(?:\.git)?(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/];var g;function f(e){return!!e&&h.some(t=>!!e.match(t))}function p(e){const t=(e=d(e)).indexOf("#");if(-1===t)return{repo:e,treeish:{protocol:g.Head,request:"master"},extra:{}};const r=e.slice(0,t),n=e.slice(t+1);if(n.match(/^[a-z]+=/)){const e=a().parse(n);for(const[t,r]of Object.entries(e))if("string"!=typeof r)throw new Error(`Assertion failed: The ${t} parameter must be a literal string`);const t=Object.values(g).find(t=>Object.prototype.hasOwnProperty.call(e,t));let i,o;void 0!==t?(i=t,o=e[t]):(i=g.Head,o="master");for(const t of Object.values(g))delete e[t];return{repo:r,treeish:{protocol:i,request:o},extra:e}}{const e=n.indexOf(":");let t,i;return-1===e?(t=null,i=n):(t=n.slice(0,e),i=n.slice(e+1)),{repo:r,treeish:{protocol:t,request:i},extra:{}}}}function d(e){return e=(e=(e=e.replace(/^git\+https:/,"https:")).replace(/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3")).replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3")}function C(e){return i.structUtils.makeLocator(e,d(e.reference))}async function E(e,t){if(!t.get("enableNetwork"))throw new Error(`Network access has been disabled by configuration (${e})`);let r;try{r=await i.execUtils.execvp("git",["ls-remote","--refs",d(e)],{cwd:t.startingCwd,env:l(),strict:!0})}catch(t){throw t.message=`Listing the refs for ${e} failed`,t}const n=new Map,o=/^([a-f0-9]{40})\t(refs\/[^\n]+)/gm;let s;for(;null!==(s=o.exec(r.stdout));)n.set(s[2],s[1]);return n}async function I(e,t){const{repo:r,treeish:{protocol:n,request:i},extra:o}=p(e),s=await E(r,t),A=(e,t)=>{switch(e){case g.Commit:if(!t.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return a().stringify({...o,commit:t});case g.Head:{const e=s.get("refs/heads/"+t);if(void 0===e)throw new Error(`Unknown head ("${t}")`);return a().stringify({...o,commit:e})}case g.Tag:{const e=s.get("refs/tags/"+t);if(void 0===e)throw new Error(`Unknown tag ("${t}")`);return a().stringify({...o,commit:e})}case g.Semver:{if(!u().validRange(t))throw new Error(`Invalid range ("${t}")`);const e=new Map([...s.entries()].filter(([e])=>e.startsWith("refs/tags/")).map(([e,t])=>[u().parse(e.slice(10)),t]).filter(e=>null!==e[0])),r=u().maxSatisfying([...e.keys()],t);if(null===r)throw new Error(`No matching range ("${t}")`);return a().stringify({...o,commit:e.get(r)})}case null:{let e;if(null!==(e=c(g.Commit,t)))return e;if(null!==(e=c(g.Tag,t)))return e;if(null!==(e=c(g.Head,t)))return e;throw t.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${e}")`)}},c=(e,t)=>{try{return A(e,t)}catch(e){return null}};return`${r}#${A(n,i)}`}async function m(e,t){if(!t.get("enableNetwork"))throw new Error(`Network access has been disabled by configuration (${e})`);const{repo:r,treeish:{protocol:n,request:A}}=p(e);if("commit"!==n)throw new Error("Invalid treeish protocol when cloning");const a=await s.xfs.mktempPromise(),c={cwd:a,env:l(),strict:!0};try{await i.execUtils.execvp("git",["clone","-c core.autocrlf=false",""+d(r),o.cS.fromPortablePath(a)],c),await i.execUtils.execvp("git",["checkout",""+A],c)}catch(e){throw e.message="Repository clone failed: "+e.message,e}return a}!function(e){e.Commit="commit",e.Head="head",e.Tag="tag",e.Semver="semver"}(g||(g={}));var y=r(32485),w=r(46611);const B={fetchers:[class{supports(e,t){return f(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,n=C(e),o=new Map(t.checksums);o.set(n.locatorHash,r);const s={...t,checksums:o},A=await this.downloadHosted(n,s);if(null!==A)return A;const[a,c,u]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,i.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote repository"),loader:()=>this.cloneFromRemote(n,s),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:a,releaseFs:c,prefixPath:i.structUtils.getIdentVendorPath(e),checksum:u}}async downloadHosted(e,t){return t.project.configuration.reduceHook(e=>e.fetchHostedRepository,null,e,t)}async cloneFromRemote(e,t){const r=await m(e.reference,t.project.configuration),n=p(e.reference),A=o.y1.join(r,"package.tgz");await i.scriptUtils.prepareExternalProject(r,A,{configuration:t.project.configuration,report:t.report,workspace:n.extra.workspace});const a=await s.xfs.readFilePromise(A);return await i.miscUtils.releaseAfterUseAsync(async()=>await i.tgzUtils.convertToZip(a,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:i.structUtils.getIdentVendorPath(e),stripComponents:1}))}}],resolvers:[class{supportsDescriptor(e,t){return f(e.range)}supportsLocator(e,t){return f(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const n=await I(e.range,r.project.configuration);return[i.structUtils.makeLocator(e,n)]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),n=await i.miscUtils.releaseAfterUseAsync(async()=>await w.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:n.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:y.U.HARD,dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin}}}]}},23599:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(84132),i=r(56537),o=r(75448),s=r(46009),A=r(10284),a=r(71191),c=r.n(a);const u=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];class l{supports(e,t){return!(!(r=e.reference)||!u.some(e=>!!r.match(e)));var r}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[i,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from GitHub"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:i,releaseFs:o,prefixPath:n.structUtils.getIdentVendorPath(e),checksum:s}}async fetchFromNetwork(e,t){const r=await n.httpUtils.get(this.getLocatorUrl(e,t),{configuration:t.project.configuration});return await i.xfs.mktempPromise(async a=>{const c=new o.M(a);await n.tgzUtils.extractArchiveTo(r,c,{stripComponents:1});const u=A.gitUtils.splitRepoUrl(e.reference),l=s.y1.join(a,"package.tgz");await n.scriptUtils.prepareExternalProject(a,l,{configuration:t.project.configuration,report:t.report,workspace:u.extra.workspace});const h=await i.xfs.readFilePromise(l);return await n.tgzUtils.convertToZip(h,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.structUtils.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,t){const{auth:r,username:n,reponame:i,treeish:o}=function(e){let t;for(const r of u)if(t=e.match(r),t)break;if(!t)throw new Error(`Input cannot be parsed as a valid GitHub URL ('${e}').`);let[,r,n,i,o="master"]=t;const{commit:s}=c().parse(o);return o=s||o.replace(/[^:]*:/,""),{auth:r,username:n,reponame:i,treeish:o}}(e.reference);return`https://${r?r+"@":""}github.com/${n}/${i}/archive/${o}.tar.gz`}}const h={hooks:{async fetchHostedRepository(e,t,r){if(null!==e)return e;const n=new l;if(!n.supports(t,r))return null;try{return await n.fetch(t,r)}catch(e){return null}}}}},21754:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r(84132);const i=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,o=/^https?:/;var s=r(46611),A=r(32485);const a={fetchers:[class{supports(e,t){return!!i.test(e.reference)&&!!o.test(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[i,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote server"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:i,releaseFs:o,prefixPath:n.structUtils.getIdentVendorPath(e),checksum:s}}async fetchFromNetwork(e,t){const r=await n.httpUtils.get(e.reference,{configuration:t.project.configuration});return await n.tgzUtils.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.structUtils.getIdentVendorPath(e),stripComponents:1})}}],resolvers:[class{supportsDescriptor(e,t){return!!i.test(e.range)&&!!o.test(e.range)}supportsLocator(e,t){return!!i.test(e.reference)&&!!o.test(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[n.structUtils.convertDescriptorToLocator(e)]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),i=await n.miscUtils.releaseAfterUseAsync(async()=>await s.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:i.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:A.U.HARD,dependencies:i.dependencies,peerDependencies:i.peerDependencies,dependenciesMeta:i.dependenciesMeta,peerDependenciesMeta:i.peerDependenciesMeta,bin:i.bin}}}]}},74230:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var n=r(27122),i=r(36370),o=r(95397),s=r(46611),A=r(40376),a=r(84132),c=r(56537),u=r(46009),l=r(17278),h=r(7564),g=r(31669);class f extends o.BaseCommand{constructor(){super(...arguments),this.usev2=!1,this.assumeFreshProject=!1,this.yes=!1,this.private=!1,this.workspace=!1,this.install=!1}async execute(){if(c.xfs.existsSync(u.y1.join(this.context.cwd,s.G.fileName)))throw new l.UsageError("A package.json already exists in the specified directory");const e=await n.VK.find(this.context.cwd,this.context.plugins),t=this.install?!0===this.install?"latest":this.install:null;return null!==t?await this.executeProxy(e,t):await this.executeRegular(e)}async executeProxy(e,t){if(null!==e.get("yarnPath"))throw new l.UsageError(`Cannot use the --install flag when the current directory already uses yarnPath (from ${e.sources.get("yarnPath")})`);if(null!==e.projectCwd)throw new l.UsageError("Cannot use the --install flag when the current directory is already part of a project");c.xfs.existsSync(this.context.cwd)||await c.xfs.mkdirpPromise(this.context.cwd);const r=u.y1.join(this.context.cwd,e.get("lockfileFilename"));c.xfs.existsSync(r)||await c.xfs.writeFilePromise(r,"");const n=await this.cli.run(["set","version",t]);if(0!==n)return n;this.context.stdout.write("\n");const i=["--assume-fresh-project"];return this.private&&i.push("-p"),this.workspace&&i.push("-w"),this.yes&&i.push("-y"),await c.xfs.mktempPromise(async e=>{const{code:t}=await a.execUtils.pipevp("yarn",["init",...i],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await a.scriptUtils.makeScriptEnv({binFolder:e})});return t})}async executeRegular(e){let t=null;if(!this.assumeFreshProject)try{t=await A.I.find(e,this.context.cwd)}catch(e){t=null}c.xfs.existsSync(this.context.cwd)||await c.xfs.mkdirpPromise(this.context.cwd);const r=new s.G,n=Object.fromEntries(e.get("initFields").entries());r.load(n),r.name=a.structUtils.makeIdent(e.get("initScope"),u.y1.basename(this.context.cwd)),r.version=e.get("initVersion"),r.private=this.private||this.workspace,r.license=e.get("initLicense"),this.workspace&&(await c.xfs.mkdirpPromise(u.y1.join(this.context.cwd,"packages")),r.workspaceDefinitions=[{pattern:"packages/*"}]);const i={};r.exportTo(i),g.inspect.styles.name="cyan",this.context.stdout.write((0,g.inspect)(i,{depth:1/0,colors:!0,compact:!1})+"\n");const o=u.y1.join(this.context.cwd,s.G.fileName);await c.xfs.changeFilePromise(o,JSON.stringify(i,null,2)+"\n");const l=u.y1.join(this.context.cwd,"README.md");if(c.xfs.existsSync(l)||await c.xfs.writeFilePromise(l,`# ${a.structUtils.stringifyIdent(r.name)}\n`),!t){const t=u.y1.join(this.context.cwd,u.QS.lockfile);await c.xfs.writeFilePromise(t,"");const r=["/.yarn/** linguist-vendored"].map(e=>e+"\n").join(""),n=u.y1.join(this.context.cwd,".gitattributes");c.xfs.existsSync(n)||await c.xfs.writeFilePromise(n,r);const i=["/.yarn/*","!/.yarn/releases","!/.yarn/plugins","!/.yarn/sdks","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!/.yarn/cache","#/.pnp.*"].map(e=>e+"\n").join(""),o=u.y1.join(this.context.cwd,".gitignore");c.xfs.existsSync(o)||await c.xfs.writeFilePromise(o,i);const s={"*":{endOfLine:"lf",insertFinalNewline:!0},"*.{js,json,.yml}":{charset:"utf-8",indentStyle:"space",indentSize:2}};(0,h.merge)(s,e.get("initEditorConfig"));let A="root = true\n";for(const[e,t]of Object.entries(s)){A+=`\n[${e}]\n`;for(const[e,r]of Object.entries(t)){A+=`${e.replace(/[A-Z]/g,e=>"_"+e.toLowerCase())} = ${r}\n`}}const l=u.y1.join(this.context.cwd,".editorconfig");c.xfs.existsSync(l)||await c.xfs.writeFilePromise(l,A),await a.execUtils.execvp("git",["init"],{cwd:this.context.cwd})}}}f.usage=l.Command.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]}),(0,i.gn)([l.Command.Boolean("-2",{hidden:!0})],f.prototype,"usev2",void 0),(0,i.gn)([l.Command.Boolean("--assume-fresh-project",{hidden:!0})],f.prototype,"assumeFreshProject",void 0),(0,i.gn)([l.Command.Boolean("-y,--yes",{hidden:!0})],f.prototype,"yes",void 0),(0,i.gn)([l.Command.Boolean("-p,--private")],f.prototype,"private",void 0),(0,i.gn)([l.Command.Boolean("-w,--workspace")],f.prototype,"workspace",void 0),(0,i.gn)([l.Command.String("-i,--install",{tolerateBoolean:!0})],f.prototype,"install",void 0),(0,i.gn)([l.Command.Path("init")],f.prototype,"execute",null);const p={configuration:{initLicense:{description:"License used when creating packages via the init command",type:n.a2.STRING,default:null},initScope:{description:"Scope used when creating packages via the init command",type:n.a2.STRING,default:null},initVersion:{description:"Version used when creating packages via the init command",type:n.a2.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:n.a2.MAP,valueDefinition:{description:"",type:n.a2.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:n.a2.MAP,valueDefinition:{description:"",type:n.a2.ANY}}},commands:[f]}},86161:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(84132),i=r(46009),o=r(75448),s=r(10489);var A=r(46611),a=r(32485);const c={fetchers:[class{supports(e,t){return!!e.reference.startsWith("link:")}getLocalPath(e,t){const{parentLocator:r,path:o}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"link:"});if(i.y1.isAbsolute(o))return o;const s=t.fetcher.getLocalPath(r,t);return null===s?null:i.y1.resolve(s,o)}async fetch(e,t){const{parentLocator:r,path:A}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"link:"}),a=i.y1.isAbsolute(A)?{packageFs:new o.M(i.LZ.root),prefixPath:i.LZ.dot,localPath:i.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(i.LZ.root),prefixPath:i.y1.relative(i.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const u=c.packageFs,l=i.y1.join(c.prefixPath,A);return a.localPath?{packageFs:new o.M(l,{baseFs:u}),releaseFs:c.releaseFs,prefixPath:i.LZ.dot,discardFromLookup:!0,localPath:l}:{packageFs:new s.n(l,{baseFs:u}),releaseFs:c.releaseFs,prefixPath:i.LZ.dot,discardFromLookup:!0}}},class{supports(e,t){return!!e.reference.startsWith("portal:")}getLocalPath(e,t){const{parentLocator:r,path:o}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"portal:"});if(i.y1.isAbsolute(o))return o;const s=t.fetcher.getLocalPath(r,t);return null===s?null:i.y1.resolve(s,o)}async fetch(e,t){const{parentLocator:r,path:A}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"portal:"}),a=i.y1.isAbsolute(A)?{packageFs:new o.M(i.LZ.root),prefixPath:i.LZ.dot,localPath:i.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(i.LZ.root),prefixPath:i.y1.relative(i.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const u=c.packageFs,l=i.y1.join(c.prefixPath,A);return a.localPath?{packageFs:new o.M(l,{baseFs:u}),releaseFs:c.releaseFs,prefixPath:i.LZ.dot,localPath:l}:{packageFs:new s.n(l,{baseFs:u}),releaseFs:c.releaseFs,prefixPath:i.LZ.dot}}}],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("link:")}supportsLocator(e,t){return!!e.reference.startsWith("link:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return n.structUtils.bindDescriptor(e,{locator:n.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("link:".length);return[n.structUtils.makeLocator(e,"link:"+i.cS.toPortablePath(o))]}async resolve(e,t){return{...e,version:"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.U.SOFT,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("portal:")}supportsLocator(e,t){return!!e.reference.startsWith("portal:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return n.structUtils.bindDescriptor(e,{locator:n.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("portal:".length);return[n.structUtils.makeLocator(e,"portal:"+i.cS.toPortablePath(o))]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),i=await n.miscUtils.releaseAfterUseAsync(async()=>await A.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:i.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.U.SOFT,dependencies:new Map([...i.dependencies,...i.devDependencies]),peerDependencies:i.peerDependencies,dependenciesMeta:i.dependenciesMeta,peerDependenciesMeta:i.peerDependenciesMeta,bin:i.bin}}}]}},8149:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getPnpPath:()=>ee,default:()=>te});var n=r(46009),i=r(92659),o=r(32485),s=r(92409),A=r(84132),a=r(46611),c=r(35691),u=r(17674),l=r(53660),h=r(56537),g=r(29486),f=r(55125),p=r(5780);const d=(e,t)=>`${e}@${t}`,C=(e,t)=>{const r=t.indexOf("#"),n=r>=0?t.substring(r+1):t;return d(e,n)},E=(e,t={})=>{const r=t.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),n={check:t.check||r>=9,debugLevel:r};n.debugLevel>=0&&console.time("hoist");const i=Q(e);if(m(i,i,new Set([i.locator]),n),n.debugLevel>=0&&console.timeEnd("hoist"),n.debugLevel>=1){const e=B(i);if(e)throw new Error(`${e}, after hoisting finished:\n${k(i)}`)}return n.debugLevel>=2&&console.log(k(i)),D(i)},I=(e,t)=>{if(t.decoupled)return t;const{name:r,references:n,ident:i,locator:o,dependencies:s,originalDependencies:A,hoistedDependencies:a,peerNames:c,reasons:u}=t,l={name:r,references:new Set(n),ident:i,locator:o,dependencies:new Map(s),originalDependencies:new Map(A),hoistedDependencies:new Map(a),peerNames:new Set(c),reasons:new Map(u),decoupled:!0},h=l.dependencies.get(r);return h&&h.ident==l.ident&&l.dependencies.set(r,l),e.dependencies.set(l.name,l),l},m=(e,t,r,n,i=new Set)=>{if(i.has(t))return;i.add(t);const o=((e,t)=>{const r=new Map([[e.name,[e.ident]]]);for(const t of e.dependencies.values())e.peerNames.has(t.name)||r.set(t.name,[t.ident]);const n=Array.from(t.keys());n.sort((e,r)=>t.get(r).size-t.get(e).size);for(const t of n){const n=t.substring(0,t.indexOf("@",1)),i=t.substring(n.length+1);if(!e.peerNames.has(n)){let e=r.get(n);e||(e=[],r.set(n,e)),e.indexOf(i)<0&&e.push(i)}}return r})(t,b(t)),s=new Set(Array.from(o.values()).map(e=>e[0])),A=t===e?new Map:(e=>{const t=new Map,r=new Set,n=i=>{if(!r.has(i)){r.add(i);for(const r of i.hoistedDependencies.values())e.dependencies.has(r.name)||t.set(r.name,r);for(const e of i.dependencies.values())i.peerNames.has(e.name)||n(e)}};return n(e),t})(t);let a;do{w(e,t,r,A,s,o,n),a=!1;for(const[e,r]of o)r.length>1&&!t.dependencies.has(e)&&(s.delete(r[0]),r.shift(),s.add(r[0]),a=!0)}while(a);for(const i of t.dependencies.values())t.peerNames.has(i.name)||r.has(i.locator)||(r.add(i.locator),m(e,i,r,n),r.delete(i.locator))},y=e=>{const t=new Set,r=(n,i=new Set)=>{if(!i.has(n)){i.add(n);for(const o of n.peerNames)if(!e.peerNames.has(o)){const n=e.dependencies.get(o);n&&!t.has(n)&&r(n,i)}t.add(n)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||r(t);return t},w=(e,t,r,n,i,o,s)=>{const A=new Set,a=(c,u,l,h)=>{if(A.has(l))return;let g,f;s.debugLevel>=2&&(g=""+Array.from(r).map(e=>S(e)).join("→"));let p=i.has(l.ident);if(s.debugLevel>=2&&!p&&(f=`- filled by: ${S(o.get(l.name)[0])} at ${g}`),p){let e=!0;const t=new Set(l.peerNames);for(let r=c.length-1;r>=1;r--){const n=c[r];for(const r of t){if(n.peerNames.has(r)&&n.originalDependencies.has(r))continue;const i=n.dependencies.get(r);if(i){s.debugLevel>=2&&(f=`- peer dependency ${S(i.locator)} from parent ${S(n.locator)} was not hoisted to ${g}`),e=!1;break}t.delete(r)}if(!e)break}p=e}if(p){let e=!1;const t=n.get(l.name);if(e=!t||t.ident===l.ident,s.debugLevel>=2&&!e&&(f=`- filled by: ${S(t.locator)} at ${g}`),e)for(let t=1;t=2&&(f=`- filled by: ${S(n.locator)} at ${S(r.locator)}`);break}}p=e}if(p){const r=c[c.length-1];r.dependencies.delete(l.name),r.hoistedDependencies.set(l.name,l),r.reasons.delete(l.name);const n=t.dependencies.get(l.name);if(n)for(const e of l.references)n.references.add(e);else t.ident!==l.ident&&(t.dependencies.set(l.name,l),h.add(l));if(s.check){const r=B(e);if(r)throw new Error(`${r}, after hoisting ${[t,...c,l].map(e=>S(e.locator)).join("→")}:\n${k(e)}`)}}else if(s.debugLevel>=2){c[c.length-1].reasons.set(l.name,f)}if(!p&&u.indexOf(l.locator)<0){const e=I(c[c.length-1],l);A.add(e);for(const t of y(l))a([...c,e],[...u,l.locator],t,h);A.delete(e)}};let c,u=new Set(t.dependencies.values());do{c=u,u=new Set;for(const e of c){if(t.peerNames.has(e.name)||e.locator===t.locator)continue;const r=I(t,e);A.add(r);for(const n of y(e))n.locator!==e.locator&&a([t,r],[t.locator,e.locator],n,u);A.delete(r)}}while(u.size>0)},B=e=>{const t=[],r=new Set,n=new Set,i=(e,o)=>{if(r.has(e))return;if(r.add(e),n.has(e))return;const s=new Map(o);for(const t of e.dependencies.values())e.peerNames.has(t.name)||s.set(t.name,t);for(const r of e.originalDependencies.values()){const i=s.get(r.name),A=()=>""+Array.from(n).concat([e]).map(e=>S(e.locator)).join("→");if(e.peerNames.has(r.name)){const e=o.get(r.name);e!==i&&t.push(`${A()} - broken peer promise: expected ${i.locator} but found ${e?e.locator:e}`)}else i?i.ident!==r.ident&&t.push(`${A()} - broken require promise for ${r.name}: expected ${r.ident}, but found: ${i.ident}`):t.push(`${A()} - broken require promise: no required dependency ${r.locator} found`)}n.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||i(t,s);n.delete(e)};return i(e,e.dependencies),t.join("\n")},Q=e=>{const{identName:t,name:r,reference:n,peerNames:i}=e,o={name:r,references:new Set([n]),locator:d(t,n),ident:C(t,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(i),reasons:new Map,decoupled:!0},s=new Map([[e,o]]),A=(e,t)=>{let r=s.get(e);const n=!!r;if(!r){const{name:t,identName:n,reference:i,peerNames:o}=e;r={name:t,references:new Set([i]),locator:d(n,i),ident:C(n,i),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(o),reasons:new Map,decoupled:!0},s.set(e,r)}if(t.dependencies.set(e.name,r),t.originalDependencies.set(e.name,r),n){const e=new Set,t=r=>{if(!e.has(r)){e.add(r),r.decoupled=!1;for(const e of r.dependencies.values())r.peerNames.has(e.name)||t(e)}};t(r)}else for(const t of e.dependencies)A(t,r)};for(const t of e.dependencies)A(t,o);return o},v=e=>e.substring(0,e.indexOf("@",1)),D=e=>{const t={name:e.name,identName:v(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),n=(e,t,i)=>{const o=r.has(e);let s;if(t===e)s=i;else{const{name:t,references:r,locator:n}=e;s={name:t,identName:v(n),references:r,dependencies:new Set}}if(i.dependencies.add(s),!o){r.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(t,e,s);r.delete(e)}};for(const r of e.dependencies.values())n(r,e,t);return t},b=e=>{const t=new Map,r=new Set([e]),n=(e,i)=>{const o=!!r.has(i),s=(e=>`${e.name}@${e.ident}`)(i);let A=t.get(s);if(A||(A=new Set,t.set(s,A)),A.add(e.ident),!o){r.add(i);for(const e of i.dependencies.values())i.peerNames.has(e.name)||n(i,e)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(e,t);return t},S=e=>{const t=e.indexOf("@",1),r=e.substring(0,t),n=e.substring(t+1);if("workspace:."===n)return".";if(n){const e=(n.indexOf("#")>0?n.split("#")[1]:n).replace("npm:","");return n.startsWith("virtual")?`v:${r}@${e}`:`${r}@${e}`}return""+r},k=e=>{let t=0;const r=(e,n,i="")=>{if(t>5e4||n.has(e))return"";t++;const o=Array.from(e.dependencies.values());let s="";n.add(e);for(let t=0;t":"")+(c!==A.name?`a:${A.name}:`:"")+S(A.locator)+(a?" "+a:"")}\n`,s+=r(A,n,`${i}${t5e4?"\nTree is too large, part of the tree has been dunped\n":"")};var x;!function(e){e.HARD="HARD",e.SOFT="SOFT"}(x||(x={}));const F=(0,n.Zu)("node_modules"),M=(e,t)=>{const r=R(e,t),n=E(r);return L(e,n,t)},N=e=>`${e.name}@${e.reference}`;const R=(e,t)=>{const r=e.getDependencyTreeRoots(),n=e.getPackageInformation(e.topLevel);if(null===n)throw new Error("Assertion failed: Expected the top-level package to have been registered");const i=e.findPackageLocator(n.packageLocation);if(null===i)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");for(const e of r)e.name===i.name&&e.reference===i.reference||n.packageDependencies.set(e.name+"$wsroot$",e.reference);const o={name:i.name,identName:i.name,reference:i.reference,peerNames:n.packagePeers,dependencies:new Set},s=new Map,a=(r,n,c,u,l)=>{const h=((e,t)=>`${N(t)}:${e}`)(r,c);let g=s.get(h);const f=!!g;f||c.name!==i.name||c.reference!==i.reference||(g=o,s.set(h,o)),g||(g={name:r,identName:c.name,reference:c.reference,dependencies:new Set,peerNames:n.packagePeers},s.set(h,g)),u.dependencies.add(g);const p=t.pnpifyFs||!function(e){let t=A.structUtils.parseDescriptor(e);return A.structUtils.isVirtualDescriptor(t)&&(t=A.structUtils.devirtualizeDescriptor(t)),t.range.startsWith("portal:")}(h);if(!f&&p)for(const[t,r]of n.packageDependencies)if(null!==r&&!g.peerNames.has(t)){const i=e.getLocator(t,r),o=e.getLocator(t.replace("$wsroot$",""),r),s=e.getPackageInformation(o);if(null===s)throw new Error("Assertion failed: Expected the package to have been registered");if(i.name===c.name&&i.reference===c.reference)continue;a(t,s,i,g,n)}};return a(i.name,n,i,o,n),o};const L=(e,t,r)=>{const i=new Map,o=(t,i)=>{const{linkType:o,target:s}=function(e,t,r){const i=t.getLocator(e.name.replace("$wsroot$",""),e.reference),o=t.getPackageInformation(i);if(null===o)throw new Error("Assertion failed: Expected the package to be registered");let s,A;if(r.pnpifyFs)A=n.cS.toPortablePath(o.packageLocation),s=x.SOFT;else{const r=t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(o.packageLocation):o.packageLocation;A=n.cS.toPortablePath(r||o.packageLocation),s=o.linkType}return{linkType:s,target:A}}(t,e,r);return{locator:N(t),target:s,linkType:o,aliases:i}},s=e=>{const[t,r]=e.split("/");return r?{scope:(0,n.Zu)(t),name:(0,n.Zu)(r)}:{scope:null,name:(0,n.Zu)(t)}},a=new Set,c=(e,t)=>{if(!a.has(e)){a.add(e);for(const r of e.dependencies){if(r===e)continue;const a=Array.from(r.references).sort(),u={name:r.identName,reference:a[0]},{name:l,scope:h}=s(r.name),g=h?[h,l]:[l],f=n.y1.join(t,F),p=n.y1.join(f,...g),d=o(u,a.slice(1));if(!r.name.endsWith("$wsroot$")){const e=i.get(p);if(e){if(e.dirList)throw new Error(`Assertion failed: ${p} cannot merge dir node with leaf node`);{const t=A.structUtils.parseLocator(e.locator),r=A.structUtils.parseLocator(d.locator);if(e.linkType!==d.linkType)throw new Error(`Assertion failed: ${p} cannot merge nodes with different link types`);if(t.identHash!==r.identHash)throw new Error(`Assertion failed: ${p} cannot merge nodes with different idents ${A.structUtils.stringifyLocator(t)} and ${A.structUtils.stringifyLocator(r)}`);d.aliases=[...d.aliases,...e.aliases,A.structUtils.parseLocator(e.locator).reference]}}i.set(p,d);const t=p.split("/"),r=t.indexOf(F);let o=t.length-1;for(;r>=0&&o>r;){const e=n.cS.toPortablePath(t.slice(0,o).join(n.y1.sep)),r=(0,n.Zu)(t[o]),s=i.get(e);if(s){if(s.dirList){if(s.dirList.has(r))break;s.dirList.add(r)}}else i.set(e,{dirList:new Set([r])});o--}}c(r,d.linkType===x.SOFT?d.target:p)}}},u=o({name:t.name,reference:Array.from(t.references)[0]},[]),l=u.target;return i.set(l,u),c(t,l),i};var K=r(88563),T=r(58069),_=r.n(T),P=r(17278),O=r(35747),U=r.n(O);const j="node_modules";class Y extends p.AbstractPnpInstaller{constructor(){super(...arguments),this.manifestCache=new Map}async getBuildScripts(e,t,r){return[]}async transformPackage(e,t,r,n,i){return r.packageFs}async finalizeInstallWithPnp(e){if("node-modules"!==this.opts.project.configuration.get("nodeLinker"))return;const t=new u.p({baseFs:new l.A({libzip:await(0,g.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})});let r=await G(this.opts.project);if(null===r){const e=this.opts.project.configuration.get("bstatePath");await h.xfs.existsPromise(e)&&await h.xfs.unlinkPromise(e),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map}}const s=(0,K.oC)(e,this.opts.project.cwd,t),a=(e=>{const t=new Map;for(const[r,n]of e.entries())if(!n.dirList){let e=t.get(n.locator);e||(e={target:n.target,linkType:n.linkType,locations:[],aliases:n.aliases},t.set(n.locator,e)),e.locations.push(r)}for(const e of t.values())e.locations=e.locations.sort((e,t)=>{const r=e.split(n.y1.delimiter).length,i=t.split(n.y1.delimiter).length;return r!==i?i-r:t.localeCompare(e)});return t})(M(s,{pnpifyFs:!1}));await async function(e,t,{baseFs:r,project:i,report:s,loadManifest:A}){const a=n.y1.join(i.cwd,j),{locationTree:u,binSymlinks:l}=function(e,t){const r=new Map([...e]),i=new Map([...t]);for(const[t,r]of e){const e=n.y1.join(t,j);if(!h.xfs.existsSync(e)){r.children.delete(j);for(const t of i.keys())null!==n.y1.contains(e,t)&&i.delete(t)}}return{locationTree:r,binSymlinks:i}}(e.locationTree,e.binSymlinks),g=z(t,{skipPrefix:i.cwd}),f=[],p=async({srcDir:e,dstDir:t,linkType:i})=>{const s=(async()=>{try{i===o.U.SOFT?(await h.xfs.mkdirpPromise(n.y1.dirname(t)),await q(n.y1.resolve(e),t)):await W(t,e,{baseFs:r})}catch(r){throw r.message=`While persisting ${e} -> ${t} ${r.message}`,r}finally{m.tick()}})().then(()=>f.splice(f.indexOf(s),1));f.push(s),f.length>4&&await Promise.race(f)},d=async(e,t,r)=>{const i=(async()=>{const i=async(e,t,r)=>{try{r&&r.innerLoop||await h.xfs.mkdirpPromise(t);const o=await h.xfs.readdirPromise(e,{withFileTypes:!0});for(const s of o){if(!(r&&r.innerLoop||".bin"!==s.name))continue;const o=n.y1.join(e,s.name),A=n.y1.join(t,s.name);s.isDirectory()?(s.name!==j||r&&r.innerLoop)&&(await h.xfs.mkdirpPromise(A),await i(o,A,{innerLoop:!0})):await h.xfs.copyFilePromise(o,A,U().constants.COPYFILE_FICLONE)}}catch(n){throw r&&r.innerLoop||(n.message=`While cloning ${e} -> ${t} ${n.message}`),n}finally{r&&r.innerLoop||m.tick()}};await i(e,t,r)})().then(()=>f.splice(f.indexOf(i),1));f.push(i),f.length>4&&await Promise.race(f)},C=async(e,t,r)=>{if(r)for(const[i,o]of t.children){const t=r.children.get(i);await C(n.y1.join(e,i),o,t)}else t.children.has(j)&&await J(n.y1.join(e,j),{contentsOnly:!1}),await J(e,{contentsOnly:e===a})};for(const[e,t]of u){const r=g.get(e);for(const[i,o]of t.children){if("."===i)continue;const t=r?r.children.get(i):r;await C(n.y1.join(e,i),o,t)}}const E=async(e,t,r)=>{if(r){X(t.locator,r.locator)||await J(e,{contentsOnly:t.linkType===o.U.HARD});for(const[i,o]of t.children){const t=r.children.get(i);await E(n.y1.join(e,i),o,t)}}else t.children.has(j)&&await J(n.y1.join(e,j),{contentsOnly:!0}),await J(e,{contentsOnly:t.linkType===o.U.HARD})};for(const[e,t]of g){const r=u.get(e);for(const[i,o]of t.children){if("."===i)continue;const t=r?r.children.get(i):r;await E(n.y1.join(e,i),o,t)}}const I=[];for(const[r,{locations:o}]of e.locatorMap.entries())for(const e of o){const{locationRoot:o,segments:s}=H(e,{skipPrefix:i.cwd});let A=g.get(o),a=o;if(A){for(const e of s)if(a=n.y1.join(a,e),A=A.children.get(e),!A)break;if(A&&!X(A.locator,r)){const e=t.get(A.locator),r=e.target,n=a,i=e.linkType;r!==n&&I.push({srcDir:r,dstDir:n,linkType:i})}}}for(const[e,{locations:r}]of t.entries())for(const o of r){const{locationRoot:r,segments:s}=H(o,{skipPrefix:i.cwd});let A=u.get(r),a=g.get(r),c=r;const l=t.get(e),h=l.target,f=o;if(h===f)continue;const p=l.linkType;for(const e of s)a=a.children.get(e);if(A){for(const e of s)if(c=n.y1.join(c,e),A=A.children.get(e),!A){I.push({srcDir:h,dstDir:f,linkType:p});break}}else I.push({srcDir:h,dstDir:f,linkType:p})}const m=c.yG.progressViaCounter(I.length),y=s.reportProgress(m);try{const e=new Map;for(const t of I)t.linkType!==o.U.SOFT&&e.has(t.srcDir)||(e.set(t.srcDir,t.dstDir),await p({...t}));await Promise.all(f),f.length=0;for(const t of I){const r=e.get(t.srcDir);t.linkType!==o.U.SOFT&&t.dstDir!==r&&await d(r,t.dstDir)}await Promise.all(f),await h.xfs.mkdirpPromise(a);const r=await async function(e,t,r,{loadManifest:i}){const o=new Map;for(const[t,{locations:r}]of e){const e=V(t)?null:await i(r[0]),s=new Map;if(e)for(const[t,i]of e.bin){const e=n.y1.join(r[0],i);""!==i&&h.xfs.existsSync(e)&&s.set(t,i)}o.set(t,s)}const s=new Map,A=(e,t,i)=>{const a=new Map,c=n.y1.contains(r,e);if(i.locator&&null!==c){const t=o.get(i.locator);for(const[r,i]of t){const t=n.y1.join(e,n.cS.toPortablePath(i));a.set((0,n.Zu)(r),t)}for(const[t,r]of i.children){const i=n.y1.join(e,t),o=A(i,i,r);o.size>0&&s.set(e,new Map([...s.get(e)||new Map,...o]))}}else for(const[r,o]of i.children){const i=A(n.y1.join(e,r),t,o);for(const[e,t]of i)a.set(e,t)}return a};for(const[e,r]of t){const t=A(e,e,r);t.size>0&&s.set(e,new Map([...s.get(e)||new Map,...t]))}return s}(t,g,i.cwd,{loadManifest:A});await async function(e,t){for(const r of e.keys())if(!t.has(r)){const e=n.y1.join(r,j,".bin");await h.xfs.removePromise(e)}for(const[r,i]of t){const t=n.y1.join(r,j,".bin"),o=e.get(r)||new Map;await h.xfs.mkdirpPromise(t);for(const e of o.keys())i.has(e)||(await h.xfs.removePromise(n.y1.join(t,e)),"win32"===process.platform&&await h.xfs.removePromise(n.y1.join(t,(0,n.Zu)(e+".cmd"))));for(const[e,r]of i){const i=o.get(e),s=n.y1.join(t,e);i!==r&&("win32"===process.platform?await _()(n.cS.fromPortablePath(r),n.cS.fromPortablePath(s),{createPwshFile:!1}):(await h.xfs.removePromise(s),await q(r,s),await h.xfs.chmodPromise(r,493)))}}}(l,r),await async function(e,t,r){let i="";i+="# Warning: This file is automatically generated. Removing it is fine, but will\n",i+="# cause your node_modules installation to become invalidated.\n",i+="\n",i+="__metadata:\n",i+=" version: 1\n";const o=Array.from(t.keys()).sort();for(const s of o){const o=t.get(s);i+="\n",i+=JSON.stringify(s)+":\n",i+=" locations:\n";let A=!1;for(const t of o.locations){const r=n.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);i+=` - ${JSON.stringify(r)}\n`,t===e.cwd&&(A=!0)}if(o.aliases.length>0){i+=" aliases:\n";for(const e of o.aliases)i+=` - ${JSON.stringify(e)}\n`}if(A&&r.size>0){i+=" bin:\n";for(const[t,o]of r){const r=n.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);i+=` ${JSON.stringify(r)}:\n`;for(const[e,r]of o){const o=n.y1.relative(n.y1.join(t,j),r);i+=` ${JSON.stringify(e)}: ${JSON.stringify(o)}\n`}}}}const s=e.cwd,A=n.y1.join(s,j,".yarn-state.yml");await h.xfs.changeFilePromise(A,i,{automaticNewlines:!0})}(i,t,r)}finally{y.stop()}}(r,a,{baseFs:t,project:this.opts.project,report:this.opts.report,loadManifest:this.cachedManifestLoad.bind(this)});const f=[];for(const[e,t]of a.entries()){if(V(e))continue;const r=A.structUtils.parseLocator(e),a={name:A.structUtils.stringifyIdent(r),reference:r.reference};if(null===s.getPackageInformation(a))throw new Error(`Assertion failed: Expected the package to be registered (${A.structUtils.prettyLocator(this.opts.project.configuration,r)})`);const c=n.cS.toPortablePath(t.locations[0]),u=await this.cachedManifestLoad(c),l=await this.getSourceBuildScripts(c,u);l.length>0&&!this.opts.project.configuration.get("enableScripts")&&(this.opts.report.reportWarningOnce(i.b.DISABLED_BUILD_SCRIPTS,A.structUtils.prettyLocator(this.opts.project.configuration,r)+" lists build scripts, but all build scripts have been disabled."),l.length=0),l.length>0&&t.linkType!==o.U.HARD&&!this.opts.project.tryWorkspaceByLocator(r)&&(this.opts.report.reportWarningOnce(i.b.SOFT_LINK_BUILD,A.structUtils.prettyLocator(this.opts.project.configuration,r)+" lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored."),l.length=0);const h=this.opts.project.getDependencyMeta(r,u.version);l.length>0&&h&&!1===h.built&&(this.opts.report.reportInfoOnce(i.b.BUILD_DISABLED,A.structUtils.prettyLocator(this.opts.project.configuration,r)+" lists build scripts, but its build has been explicitly disabled through configuration."),l.length=0),l.length>0&&f.push({buildLocations:t.locations,locatorHash:r.locatorHash,buildDirective:l})}return f}async cachedManifestLoad(e){let t=this.manifestCache.get(e);if(t)return t;try{t=await a.G.find(e)}catch(t){throw t.message=`While loading ${e}: ${t.message}`,t}return this.manifestCache.set(e,t),t}async getSourceBuildScripts(e,t){const r=[],{scripts:i}=t;for(const e of["preinstall","install","postinstall"])i.has(e)&&r.push([s.k.SCRIPT,e]);const o=n.y1.resolve(e,(0,n.Zu)("binding.gyp"));return!i.has("install")&&h.xfs.existsSync(o)&&r.push([s.k.SHELLCODE,"node-gyp rebuild"]),r}}async function G(e,{unrollAliases:t=!1}={}){const r=e.cwd,i=n.y1.join(r,j,".yarn-state.yml");if(!h.xfs.existsSync(i))return null;const s=(0,f.parseSyml)(await h.xfs.readFilePromise(i,"utf8"));if(s.__metadata.version>1)return null;const a=new Map,c=new Map;delete s.__metadata;for(const[e,i]of Object.entries(s)){const s=i.locations.map(e=>n.y1.join(r,e)),u=i.bin;if(u)for(const[e,t]of Object.entries(u)){const i=n.y1.join(r,n.cS.toPortablePath(e)),o=A.miscUtils.getMapWithDefault(c,i);for(const[e,r]of Object.entries(t))o.set((0,n.Zu)(e),n.cS.toPortablePath([i,j,r].join(n.y1.delimiter)))}if(a.set(e,{target:n.LZ.dot,linkType:o.U.HARD,locations:s,aliases:i.aliases||[]}),t&&i.aliases)for(const t of i.aliases){const{scope:r,name:i}=A.structUtils.parseLocator(e),c=A.structUtils.makeLocator(A.structUtils.makeIdent(r,i),t),u=A.structUtils.stringifyLocator(c);a.set(u,{target:n.LZ.dot,linkType:o.U.HARD,locations:s,aliases:[]})}}return{locatorMap:a,binSymlinks:c,locationTree:z(a,{skipPrefix:e.cwd})}}const J=async(e,t)=>{if(e.split(n.y1.sep).indexOf(j)<0)throw new Error("Assertion failed: trying to remove dir that doesn't contain node_modules: "+e);try{if(!t.innerLoop){if((await h.xfs.lstatPromise(e)).isSymbolicLink())return void await h.xfs.unlinkPromise(e)}const r=await h.xfs.readdirPromise(e,{withFileTypes:!0});for(const i of r){const r=n.y1.join(e,(0,n.Zu)(i.name));i.isDirectory()?(i.name!==j||t&&t.innerLoop)&&await J(r,{innerLoop:!0,contentsOnly:!1}):await h.xfs.unlinkPromise(r)}t.contentsOnly||await h.xfs.rmdirPromise(e)}catch(e){if("ENOENT"!==e.code&&"ENOTEMPTY"!==e.code)throw e}},H=(e,{skipPrefix:t})=>{const r=n.y1.contains(t,e);if(null===r)throw new Error(`Assertion failed: Cannot process a path that isn't part of the requested prefix (${e} isn't within ${t})`);const i=r.split(n.y1.sep),o=i.indexOf(j),s=i.slice(0,o).join(n.y1.sep);return{locationRoot:n.y1.join(t,s),segments:i.slice(o)}},z=(e,{skipPrefix:t})=>{const r=new Map;if(null===e)return r;const i=()=>({children:new Map,linkType:o.U.HARD});for(const[s,a]of e.entries()){if(a.linkType===o.U.SOFT){if(null!==n.y1.contains(t,a.target)){const e=A.miscUtils.getFactoryWithDefault(r,a.target,i);e.locator=s,e.linkType=a.linkType}}for(const e of a.locations){const{locationRoot:n,segments:o}=H(e,{skipPrefix:t});let c=A.miscUtils.getFactoryWithDefault(r,n,i);for(let e=0;eh.xfs.symlinkPromise("win32"!==process.platform?n.y1.relative(n.y1.dirname(t),e):e,t,"win32"===process.platform?"junction":void 0),W=async(e,t,{baseFs:r,innerLoop:i})=>{await h.xfs.mkdirpPromise(e);const o=await r.readdirPromise(t,{withFileTypes:!0}),s=async(e,t,i)=>{if(i.isFile()){const n=await r.lstatPromise(t);await r.copyFilePromise(t,e);const i=511&n.mode;420!==i&&await h.xfs.chmodPromise(e,i)}else{if(!i.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${await h.xfs.statSync(t).mode.toString(8).padStart(6,"0")})`);{const i=await r.readlinkPromise(t);await q(n.y1.resolve(t,i),e)}}};for(const A of o){const o=n.y1.join(t,(0,n.Zu)(A.name)),a=n.y1.join(e,(0,n.Zu)(A.name));A.isDirectory()?(A.name!==j||i)&&await W(a,o,{baseFs:r,innerLoop:!0}):await s(a,o,A)}};function V(e){let t=A.structUtils.parseDescriptor(e);return A.structUtils.isVirtualDescriptor(t)&&(t=A.structUtils.devirtualizeDescriptor(t)),t.range.startsWith("link:")}const X=(e,t)=>{if(!e||!t)return e===t;let r=A.structUtils.parseLocator(e);A.structUtils.isVirtualLocator(r)&&(r=A.structUtils.devirtualizeLocator(r));let n=A.structUtils.parseLocator(t);return A.structUtils.isVirtualLocator(n)&&(n=A.structUtils.devirtualizeLocator(n)),A.structUtils.areLocatorsEqual(r,n)};class Z extends p.PnpLinker{constructor(){super(...arguments),this.mode="loose"}makeInstaller(e){return new $(e)}}class $ extends p.PnpInstaller{constructor(){super(...arguments),this.mode="loose"}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=new u.p({baseFs:new l.A({libzip:await(0,g.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})}),r=(0,K.oC)(e,this.opts.project.cwd,t),i=M(r,{pnpifyFs:!1}),o=new Map;e.fallbackPool=o;const s=(e,t)=>{const r=A.structUtils.parseLocator(t.locator),n=A.structUtils.stringifyIdent(r);n===e?o.set(e,r.reference):o.set(e,[n,r.reference])},a=n.y1.join(this.opts.project.cwd,n.QS.nodeModules),c=i.get(a);if(void 0===c)throw new Error("Assertion failed: Expected a root junction point");if("target"in c)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(const e of c.dirList){const t=n.y1.join(a,e),r=i.get(t);if(void 0===r)throw new Error("Assertion failed: Expected the child to have been registered");if("target"in r)s(e,r);else for(const o of r.dirList){const r=n.y1.join(t,o),A=i.get(r);if(void 0===A)throw new Error("Assertion failed: Expected the subchild to have been registered");if(!("target"in A))throw new Error("Assertion failed: Expected the leaf junction to be a package");s(`${e}/${o}`,A)}}return super.finalizeInstallWithPnp(e)}}const ee=e=>n.y1.join(e.cwd,".pnp.js"),te={linkers:[class{supportsPackage(e,t){return"node-modules"===t.project.configuration.get("nodeLinker")}async findPackageLocation(e,t){const r=t.project.tryWorkspaceByLocator(e);if(r)return r.cwd;const n=await G(t.project,{unrollAliases:!0});if(null===n)throw new P.UsageError("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");const i=n.locatorMap.get(A.structUtils.stringifyLocator(e));if(!i)throw new P.UsageError(`Couldn't find ${A.structUtils.prettyLocator(t.project.configuration,e)} in the currently installed node_modules map - running an install might help`);return i.locations[0]}async findPackageLocator(e,t){const r=await G(t.project,{unrollAliases:!0});if(null===r)return null;const{locationRoot:i,segments:o}=H(n.y1.resolve(e),{skipPrefix:t.project.cwd});let s=r.locationTree.get(i);if(!s)return null;let a=s.locator;for(const e of o){if(s=s.children.get(e),!s)break;a=s.locator||a}return A.structUtils.parseLocator(a)}makeInstaller(e){return new Y({...e,skipIncompatiblePackageLinking:!0})}},Z]}},94573:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F});var n=r(27122),i=r(36370),o=r(95397),s=r(40376),A=r(84132),a=r(35691),c=r(15815),u=r(92659),l=r(86717),h=r(17278),g=r(85622),f=r.n(g),p=r(10966),d=r.n(p),C=r(31669);class E extends o.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t}=await s.I.find(e,this.context.cwd),r=void 0!==this.fields?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,i=[];let o=!1;const g=await c.P.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async n=>{for(const s of this.packages){let c;if("."===s){const e=t.topLevelWorkspace;if(!e.manifest.name)throw new h.UsageError("Missing 'name' field in "+f().join(e.cwd,"package.json"));c=A.structUtils.makeDescriptor(e.manifest.name,"unknown")}else c=A.structUtils.parseDescriptor(s);const g=l.npmHttpUtils.getIdentUrl(c);let p;try{p=I(await l.npmHttpUtils.get(g,{configuration:e,ident:c,json:!0}))}catch(e){throw"HTTPError"!==e.name?e:404===e.response.statusCode?new a.lk(u.b.EXCEPTION,"Package not found"):new a.lk(u.b.EXCEPTION,e.toString())}const C=Object.keys(p.versions).sort(d().compareLoose);let E=p["dist-tags"].latest||C[C.length-1];if(d().validRange(c.range)){const t=d().maxSatisfying(C,c.range);null!==t?E=t:(n.reportWarning(u.b.UNNAMED,`Unmet range ${A.structUtils.prettyRange(e,c.range)}; falling back to the latest version`),o=!0)}else"unknown"!==c.range&&(n.reportWarning(u.b.UNNAMED,`Invalid range ${A.structUtils.prettyRange(e,c.range)}; falling back to the latest version`),o=!0);const m=p.versions[E],y={...p,...m,version:E,versions:C};let w;if(null!==r){w={};for(const t of r){const r=y[t];void 0!==r?w[t]=r:(n.reportWarning(u.b.EXCEPTION,`The '${t}' field doesn't exist inside ${A.structUtils.prettyIdent(e,c)}'s informations`),o=!0)}}else this.json||(delete y.dist,delete y.readme,delete y.users),w=y;n.reportJson(w),this.json||i.push(w)}});C.inspect.styles.name="cyan";for(const e of i)(e!==i[0]||o)&&this.context.stdout.write("\n"),this.context.stdout.write((0,C.inspect)(e,{depth:1/0,colors:!0,compact:!1})+"\n");return g.exitCode()}}function I(e){if(Array.isArray(e)){const t=[];for(let r of e)r=I(r),r&&t.push(r);return t}if("object"==typeof e&&null!==e){const t={};for(const r of Object.keys(e)){if(r.startsWith("_"))continue;const n=I(e[r]);n&&(t[r]=n)}return t}return e||null}E.usage=h.Command.Usage({description:"show information about a package",details:"\n This command will fetch information about a package from the npm registry, and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@` to the package argument to provide information specific to the latest version that satisfies the range. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package informations.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react 16.12.0","yarn npm info react@16.12.0"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]}),(0,i.gn)([h.Command.Rest()],E.prototype,"packages",void 0),(0,i.gn)([h.Command.String("-f,--fields")],E.prototype,"fields",void 0),(0,i.gn)([h.Command.Boolean("--json")],E.prototype,"json",void 0),(0,i.gn)([h.Command.Path("npm","info")],E.prototype,"execute",null);var m=r(9494),y=r.n(m);class w extends o.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),t=y().createPromptModule({input:this.context.stdin,output:this.context.stdout}),r=await B({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await c.P.start({configuration:e,stdout:this.context.stdout},async i=>{const o=await async function(e,{registry:t,report:r}){if(process.env.TEST_ENV)return{name:process.env.TEST_NPM_USER||"",password:process.env.TEST_NPM_PASSWORD||""};r.reportInfo(u.b.UNNAMED,"Logging in to "+t);let n=!1;t.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(u.b.UNNAMED,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0);r.reportSeparator();const{username:i,password:o}=await e([{type:"input",name:"username",message:"Username:",validate:e=>Q(e,"Username")},{type:"password",name:"password",message:n?"Token:":"Password:",validate:e=>Q(e,"Password")}]);return r.reportSeparator(),{name:i,password:o}}(t,{registry:r,report:i}),s="/-/user/org.couchdb.user:"+encodeURIComponent(o.name),A=await l.npmHttpUtils.put(s,o,{attemptedAs:o.name,configuration:e,registry:r,json:!0,authType:l.npmHttpUtils.AuthType.NO_AUTH});return await async function(e,t,{configuration:r}){return await n.VK.updateHomeConfiguration({npmRegistries:(r={})=>({...r,[e]:{...r[e],npmAuthToken:t}})})}(r,A.token,{configuration:e}),i.reportInfo(u.b.UNNAMED,"Successfully logged in")})).exitCode()}}async function B({scope:e,publish:t,configuration:r,cwd:n}){return e&&t?l.npmConfigUtils.getScopeRegistry(e,{configuration:r,type:l.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):e?l.npmConfigUtils.getScopeRegistry(e,{configuration:r}):t?l.npmConfigUtils.getPublishRegistry((await(0,o.openWorkspace)(r,n)).manifest,{configuration:r}):l.npmConfigUtils.getDefaultRegistry({configuration:r})}function Q(e,t){return e.length>0||t+" is required"}w.usage=h.Command.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]}),(0,i.gn)([h.Command.String("-s,--scope")],w.prototype,"scope",void 0),(0,i.gn)([h.Command.Boolean("--publish")],w.prototype,"publish",void 0),(0,i.gn)([h.Command.Path("npm","login")],w.prototype,"execute",null);class v extends o.BaseCommand{constructor(){super(...arguments),this.publish=!1,this.all=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),t=this.all?null:await B({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await c.P.start({configuration:e,stdout:this.context.stdout},async e=>(await async function(e){return await n.VK.updateHomeConfiguration({npmRegistries:(t={})=>null===e?void 0:{...t,[e]:void 0}})}(t),e.reportInfo(u.b.UNNAMED,"Successfully logged out of "+(null===t?"all registries":t))))).exitCode()}}v.usage=h.Command.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the registry linked to the @my-scope registry","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of the publish registry for the current package linked to the @my-scope registry","yarn npm logout --publish --scope my-scope"],["Logout of all registries","yarn npm logout --all"]]}),(0,i.gn)([h.Command.String("-s,--scope")],v.prototype,"scope",void 0),(0,i.gn)([h.Command.Boolean("--publish")],v.prototype,"publish",void 0),(0,i.gn)([h.Command.Boolean("-A,--all")],v.prototype,"all",void 0),(0,i.gn)([h.Command.Path("npm","logout")],v.prototype,"execute",null);var D=r(5973),b=r(76417),S=r(10129);class k extends o.BaseCommand{constructor(){super(...arguments),this.tag="latest",this.tolerateRepublish=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await s.I.find(e,this.context.cwd);if(!r)throw new o.WorkspaceRequiredError(t.cwd,this.context.cwd);if(r.manifest.private)throw new h.UsageError("Private workspaces cannot be published");if(null===r.manifest.name||null===r.manifest.version)throw new h.UsageError("Workspaces must have valid names and versions to be published on an external registry");await t.restoreInstallState();const i=r.manifest.name,g=r.manifest.version,f=l.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});return(await c.P.start({configuration:e,stdout:this.context.stdout},async t=>{if(this.tolerateRepublish)try{const r=await l.npmHttpUtils.get(l.npmHttpUtils.getIdentUrl(i),{configuration:e,registry:f,ident:i,json:!0});if(!Object.prototype.hasOwnProperty.call(r,"versions"))throw new a.lk(u.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(r.versions,g))return void t.reportWarning(u.b.UNNAMED,`Registry already knows about version ${g}; skipping.`)}catch(e){if("HTTPError"!==e.name)throw e;if(404!==e.response.statusCode)throw new a.lk(u.b.NETWORK_ERROR,`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`)}await D.packUtils.prepareForPack(r,{report:t},async()=>{const n=await D.packUtils.genPackList(r);for(const e of n)t.reportInfo(null,e);const o=await D.packUtils.genPackStream(r,n),s=await A.miscUtils.bufferStream(o),a=await async function(e,t,{access:r,tag:n,registry:i}){const o=e.project.configuration,s=e.manifest.name,a=e.manifest.version,c=A.structUtils.stringifyIdent(s),u=(0,b.createHash)("sha1").update(t).digest("hex"),l=S.Sd(t).toString();void 0===r&&(r=e.manifest.publishConfig&&"string"==typeof e.manifest.publishConfig.access?e.manifest.publishConfig.access:null!==o.get("npmPublishAccess")?o.get("npmPublishAccess"):s.scope?"restricted":"public");const h=await D.packUtils.genPackageManifest(e),g=`${c}-${a}.tgz`,f=new URL(`${c}/-/${g}`,i);return{_id:c,_attachments:{[g]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}},name:c,access:r,"dist-tags":{[n]:a},versions:{[a]:{...h,_id:`${c}@${a}`,name:c,version:a,dist:{shasum:u,integrity:l,tarball:f.toString()}}}}}(r,s,{access:this.access,tag:this.tag,registry:f});try{await l.npmHttpUtils.put(l.npmHttpUtils.getIdentUrl(i),a,{configuration:e,registry:f,ident:i,json:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(u.b.NETWORK_ERROR,r)}}}),t.hasErrors()||t.reportInfo(u.b.UNNAMED,"Package archive published")})).exitCode()}}k.usage=h.Command.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overriden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]}),(0,i.gn)([h.Command.String("--access")],k.prototype,"access",void 0),(0,i.gn)([h.Command.String("--tag")],k.prototype,"tag",void 0),(0,i.gn)([h.Command.Boolean("--tolerate-republish")],k.prototype,"tolerateRepublish",void 0),(0,i.gn)([h.Command.Path("npm","publish")],k.prototype,"execute",null);class x extends o.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins);let t;t=this.scope&&this.publish?l.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e,type:l.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):this.scope?l.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e}):this.publish?l.npmConfigUtils.getPublishRegistry((await(0,o.openWorkspace)(e,this.context.cwd)).manifest,{configuration:e}):l.npmConfigUtils.getDefaultRegistry({configuration:e});return(await c.P.start({configuration:e,stdout:this.context.stdout},async r=>{try{const n=await l.npmHttpUtils.get("/-/whoami",{configuration:e,registry:t,authType:l.npmHttpUtils.AuthType.ALWAYS_AUTH,json:!0});r.reportInfo(u.b.UNNAMED,n.username)}catch(e){if("HTTPError"!==e.name)throw e;401===e.response.statusCode||403===e.response.statusCode?r.reportError(u.b.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired"):r.reportError(u.b.AUTHENTICATION_INVALID,e.toString())}})).exitCode()}}x.usage=h.Command.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]}),(0,i.gn)([h.Command.String("-s,--scope")],x.prototype,"scope",void 0),(0,i.gn)([h.Command.Boolean("--publish")],x.prototype,"publish",void 0),(0,i.gn)([h.Command.Path("npm","whoami")],x.prototype,"execute",null);const F={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:n.a2.STRING,default:null}},commands:[E,w,v,k,x]}},86717:(e,t,r)=>{"use strict";r.r(t),r.d(t,{npmConfigUtils:()=>n,npmHttpUtils:()=>i,default:()=>T});var n={};r.r(n),r.d(n,{RegistryType:()=>c,getAuthConfiguration:()=>y,getDefaultRegistry:()=>E,getPublishRegistry:()=>d,getRegistryConfiguration:()=>I,getScopeConfiguration:()=>m,getScopeRegistry:()=>C,normalizeRegistry:()=>p});var i={};r.r(i),r.d(i,{AuthType:()=>u,get:()=>B,getIdentUrl:()=>w,put:()=>Q});var o=r(27122),s=r(84132),A=r(10966),a=r.n(A);var c,u,l=r(35691),h=r(92659),g=r(9494),f=r.n(g);function p(e){return e.replace(/\/$/,"")}function d(e,{configuration:t}){return e.publishConfig&&e.publishConfig.registry?p(e.publishConfig.registry):e.name?C(e.name.scope,{configuration:t,type:c.PUBLISH_REGISTRY}):E({configuration:t,type:c.PUBLISH_REGISTRY})}function C(e,{configuration:t,type:r=c.FETCH_REGISTRY}){const n=m(e,{configuration:t});if(null===n)return E({configuration:t,type:r});const i=n.get(r);return null===i?E({configuration:t,type:r}):p(i)}function E({configuration:e,type:t=c.FETCH_REGISTRY}){const r=e.get(t);return p(null!==r?r:e.get(c.FETCH_REGISTRY))}function I(e,{configuration:t}){const r=t.get("npmRegistries"),n=r.get(e);if(void 0!==n)return n;const i=r.get(e.replace(/^[a-z]+:/,""));return void 0!==i?i:null}function m(e,{configuration:t}){if(null===e)return null;const r=t.get("npmScopes").get(e);return r||null}function y(e,{configuration:t,ident:r}){const n=r&&m(r.scope,{configuration:t});if((null==n?void 0:n.get("npmAuthIdent"))||(null==n?void 0:n.get("npmAuthToken")))return n;return I(e,{configuration:t})||t}function w(e){return e.scope?`/@${e.scope}%2f${e.name}`:"/"+e.name}async function B(e,{configuration:t,headers:r,ident:n,authType:i,registry:o,...A}){if(n&&void 0===o&&(o=C(n.scope,{configuration:t})),n&&n.scope&&void 0===i&&(i=u.BEST_EFFORT),"string"!=typeof o)throw new Error("Assertion failed: The registry should be a string");const a=v(o,{authType:i,configuration:t,ident:n});let c;a&&(r={...r,authorization:a});try{c=new URL(e)}catch(t){c=new URL(o+e)}try{return await s.httpUtils.get(c.href,{configuration:t,headers:r,...A})}catch(e){throw"HTTPError"!==e.name||401!==e.response.statusCode&&403!==e.response.statusCode?e:new l.lk(h.b.AUTHENTICATION_INVALID,`Invalid authentication (as ${await D(o,r,{configuration:t})})`)}}async function Q(e,t,{attemptedAs:r,configuration:n,headers:i,ident:o,authType:A=u.ALWAYS_AUTH,registry:a,...c}){if(o&&void 0===a&&(a=C(o.scope,{configuration:n})),"string"!=typeof a)throw new Error("Assertion failed: The registry should be a string");const g=v(a,{authType:A,configuration:n,ident:o});g&&(i={...i,authorization:g});try{return await s.httpUtils.put(a+e,t,{configuration:n,headers:i,...c})}catch(o){if(!function(e){if("HTTPError"!==e.name)return!1;try{return e.response.headers["www-authenticate"].split(/,\s*/).map(e=>e.toLowerCase()).includes("otp")}catch(e){return!1}}(o))throw"HTTPError"!==o.name||401!==o.response.statusCode&&403!==o.response.statusCode?o:new l.lk(h.b.AUTHENTICATION_INVALID,`Invalid authentication (${"string"!=typeof r?"as "+await D(a,i,{configuration:n}):"attempted as "+r})`);const A=await async function(){if(process.env.TEST_ENV)return process.env.TEST_NPM_2FA_TOKEN||"";const e=f().createPromptModule(),{otp:t}=await e({type:"input",name:"otp",message:"One-time password:",validate:e=>e.length>0||"One-time password is required"});return t}(),u={...i,...b(A)};try{return await s.httpUtils.put(`${a}${e}`,t,{configuration:n,headers:u,...c})}catch(e){throw"HTTPError"!==e.name||401!==e.response.statusCode&&403!==e.response.statusCode?e:new l.lk(h.b.AUTHENTICATION_INVALID,`Invalid authentication (${"string"!=typeof r?"as "+await D(a,u,{configuration:n}):"attempted as "+r})`)}}}function v(e,{authType:t=u.CONFIGURATION,configuration:r,ident:n}){const i=y(e,{configuration:r,ident:n}),o=function(e,t){switch(t){case u.CONFIGURATION:return e.get("npmAlwaysAuth");case u.BEST_EFFORT:case u.ALWAYS_AUTH:return!0;case u.NO_AUTH:return!1;default:throw new Error("Unreachable")}}(i,t);if(!o)return null;if(i.get("npmAuthToken"))return"Bearer "+i.get("npmAuthToken");if(i.get("npmAuthIdent"))return"Basic "+i.get("npmAuthIdent");if(o&&t!==u.BEST_EFFORT)throw new l.lk(h.b.AUTHENTICATION_NOT_FOUND,"No authentication configured for request");return null}async function D(e,t,{configuration:r}){if(void 0===t||void 0===t.authorization)return"an anonymous user";try{return(await s.httpUtils.get(new URL(e+"/-/whoami").href,{configuration:r,headers:t})).username}catch(e){return"an unknown user"}}function b(e){return{"npm-otp":e}}!function(e){e.FETCH_REGISTRY="npmRegistryServer",e.PUBLISH_REGISTRY="npmPublishRegistry"}(c||(c={})),function(e){e[e.NO_AUTH=0]="NO_AUTH",e[e.BEST_EFFORT=1]="BEST_EFFORT",e[e.CONFIGURATION=2]="CONFIGURATION",e[e.ALWAYS_AUTH=3]="ALWAYS_AUTH"}(u||(u={}));var S=r(78835);class k{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const r=new S.URL(e.reference);return!!a().valid(r.pathname)&&!r.searchParams.has("__archiveUrl")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,i,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote registry"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:i,prefixPath:s.structUtils.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let r;try{r=await B(k.getLocatorUrl(e),{configuration:t.project.configuration,ident:e})}catch(n){r=await B(k.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:t.project.configuration,ident:e})}return await s.tgzUtils.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.structUtils.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,t,{configuration:r}){let n=C(e.scope,{configuration:r});const i=k.getLocatorUrl(e);return t=t.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),n=n.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),(t=t.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"))===n+i||t===n+i.replace(/%2f/g,"/")}static getLocatorUrl(e){const t=a().clean(e.reference.slice("npm:".length));if(null===t)throw new l.lk(h.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");return`${w(e)}/-/${e.name}-${t}.tgz`}}var x=r(46611),F=r(32485);const M=s.structUtils.makeIdent(null,"node-gyp"),N=/\b(node-gyp|prebuild-install)\b/;var R=r(52779);const L={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:o.a2.BOOLEAN,default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:o.a2.SECRET,default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:o.a2.SECRET,default:null}},K={npmPublishRegistry:{description:"Registry to push packages to",type:o.a2.STRING,default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:o.a2.STRING,default:"https://registry.yarnpkg.com"}},T={configuration:{...L,...K,npmScopes:{description:"Settings per package scope",type:o.a2.MAP,valueDefinition:{description:"",type:o.a2.SHAPE,properties:{...L,...K}}},npmRegistries:{description:"Settings per registry",type:o.a2.MAP,normalizeKeys:p,valueDefinition:{description:"",type:o.a2.SHAPE,properties:{...L}}}},fetchers:[class{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r,params:n}=s.structUtils.parseRange(e.reference);return!!a().valid(r)&&(null!==n&&"string"==typeof n.__archiveUrl)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,i,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote server"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:i,prefixPath:s.structUtils.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){const{params:r}=s.structUtils.parseRange(e.reference);if(null===r||"string"!=typeof r.__archiveUrl)throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");const n=await B(r.__archiveUrl,{configuration:t.project.configuration,ident:e});return await s.tgzUtils.convertToZip(n,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.structUtils.getIdentVendorPath(e),stripComponents:1})}},k],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!s.structUtils.tryParseDescriptor(e.range.slice("npm:".length),!0)}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){const r=s.structUtils.parseDescriptor(e.range.slice("npm:".length),!0);return t.resolver.getResolutionDependencies(r,t)}async getCandidates(e,t,r){const n=s.structUtils.parseDescriptor(e.range.slice("npm:".length),!0);return await r.resolver.getCandidates(n,t,r)}resolve(e,t){throw new Error("Unreachable")}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!a().validRange(e.range.slice("npm:".length))}supportsLocator(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r}=s.structUtils.parseRange(e.reference);return!!a().valid(r)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const n=e.range.slice("npm:".length),i=await B(w(e),{configuration:r.project.configuration,ident:e,json:!0}),o=Object.keys(i.versions).filter(e=>a().satisfies(e,n));return o.sort((e,t)=>-a().compare(e,t)),o.map(t=>{const n=s.structUtils.makeLocator(e,"npm:"+t),o=i.versions[t].dist.tarball;return k.isConventionalTarballUrl(n,o,{configuration:r.project.configuration})?n:s.structUtils.bindLocator(n,{__archiveUrl:o})})}async resolve(e,t){const{selector:r}=s.structUtils.parseRange(e.reference),n=a().clean(r);if(null===n)throw new l.lk(h.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");const i=await B(w(e),{configuration:t.project.configuration,ident:e,json:!0});if(!Object.prototype.hasOwnProperty.call(i,"versions"))throw new l.lk(h.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(i.versions,n))throw new l.lk(h.b.REMOTE_NOT_FOUND,`Registry failed to return reference "${n}"`);const o=new x.G;if(o.load(i.versions[n]),!o.dependencies.has(M.identHash)&&!o.peerDependencies.has(M.identHash))for(const r of o.scripts.values())if(r.match(N)){o.dependencies.set(M.identHash,s.structUtils.makeDescriptor(M,"latest")),t.report.reportWarning(h.b.NODE_GYP_INJECTED,s.structUtils.prettyLocator(t.project.configuration,e)+": Implicit dependencies on node-gyp are discouraged");break}return"string"==typeof o.raw.deprecated&&t.report.reportWarning(h.b.DEPRECATED_PACKAGE,`${s.structUtils.prettyLocator(t.project.configuration,e)} is deprecated: ${o.raw.deprecated}`),{...e,version:n,languageName:"node",linkType:F.U.HARD,dependencies:o.dependencies,peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!R.c.test(e.range.slice("npm:".length))}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const n=e.range.slice("npm:".length),i=await B(w(e),{configuration:r.project.configuration,ident:e,json:!0});if(!Object.prototype.hasOwnProperty.call(i,"dist-tags"))throw new l.lk(h.b.REMOTE_INVALID,'Registry returned invalid data - missing "dist-tags" field');const o=i["dist-tags"];if(!Object.prototype.hasOwnProperty.call(o,n))throw new l.lk(h.b.REMOTE_NOT_FOUND,`Registry failed to return tag "${n}"`);const A=o[n],a=s.structUtils.makeLocator(e,"npm:"+A),c=i.versions[A].dist.tarball;return k.isConventionalTarballUrl(a,c,{configuration:r.project.configuration})?[a]:[s.structUtils.bindLocator(a,{__archiveUrl:c})]}async resolve(e,t){throw new Error("Unreachable")}}]}},5973:(e,t,r)=>{"use strict";r.r(t),r.d(t,{packUtils:()=>n,default:()=>T});var n={};r.r(n),r.d(n,{genPackList:()=>k,genPackStream:()=>b,genPackageManifest:()=>S,hasPackScripts:()=>v,prepareForPack:()=>D});var i=r(84132),o=r(35691),s=r(92659),A=r(36370),a=r(95397),c=r(27122),u=r(40376),l=r(28148),h=r(33720),g=r(15815),f=r(46009),p=r(56537),d=r(17278),C=r(10489),E=r(2401),I=r.n(E),m=r(92413),y=r(59938),w=r(78761);const B=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],Q=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function v(e){return!!await i.scriptUtils.hasWorkspaceScript(e,"prepack")||!!await i.scriptUtils.hasWorkspaceScript(e,"postpack")}async function D(e,{report:t},r){const n=new m.PassThrough,A=new m.PassThrough;if(await i.scriptUtils.hasWorkspaceScript(e,"prepack")){t.reportInfo(s.b.LIFECYCLE_SCRIPT,'Calling the "prepack" lifecycle script');if(0!==await i.scriptUtils.executeWorkspaceScript(e,"prepack",[],{stdin:null,stdout:n,stderr:A}))throw new o.lk(s.b.LIFECYCLE_SCRIPT,'Prepack script failed; run "yarn prepack" to investigate')}try{await r()}finally{if(await i.scriptUtils.hasWorkspaceScript(e,"postpack")){t.reportInfo(s.b.LIFECYCLE_SCRIPT,'Calling the "postpack" lifecycle script');0!==await i.scriptUtils.executeWorkspaceScript(e,"postpack",[],{stdin:null,stdout:n,stderr:A})&&t.reportWarning(s.b.LIFECYCLE_SCRIPT,'Postpack script failed; run "yarn postpack" to investigate')}}}async function b(e,t){void 0===t&&(t=await k(e));const r=y.P();process.nextTick(async()=>{for(const n of t){const t=f.y1.resolve(e.cwd,n),i=f.y1.join("package",n),o=await p.xfs.lstatPromise(t),s={name:i,mtime:new Date(315532800)};let A,a;const c=new Promise((e,t)=>{A=e,a=t}),u=e=>{e?a(e):A()};if(o.isFile()){let i;i="package.json"===n?Buffer.from(JSON.stringify(await S(e),null,2)):await p.xfs.readFilePromise(t),r.entry({...s,type:"file"},i,u)}else o.isSymbolicLink()&&r.entry({...s,type:"symlink",linkname:await p.xfs.readlinkPromise(t)},u);await c}r.finalize()});const n=(0,w.createGzip)();return r.pipe(n),n}async function S(e){const t=JSON.parse(JSON.stringify(e.manifest.raw));return await e.project.configuration.triggerHook(e=>e.beforeWorkspacePacking,e,t),t}async function k(e){const t=e.project,r=t.configuration,n={accept:[],reject:[]};for(const e of Q)n.reject.push(e);for(const e of B)n.accept.push(e);n.reject.push(r.get("rcFilename"));const i=t=>{if(null===t||!t.startsWith(e.cwd+"/"))return;const r=f.y1.relative(e.cwd,t),i=f.y1.resolve(f.LZ.root,r);n.reject.push(i)};i(f.y1.resolve(t.cwd,r.get("lockfileFilename"))),i(r.get("bstatePath")),i(r.get("cacheFolder")),i(r.get("globalFolder")),i(r.get("installStatePath")),i(r.get("virtualFolder")),i(r.get("yarnPath")),await r.triggerHook(e=>e.populateYarnPaths,t,e=>{i(e)});for(const r of t.workspaces){const t=f.y1.relative(e.cwd,r.cwd);""===t||t.match(/^(\.\.)?\//)||n.reject.push("/"+t)}const o={accept:[],reject:[]};e.manifest.publishConfig&&e.manifest.publishConfig.main?o.accept.push(f.y1.resolve(f.LZ.root,e.manifest.publishConfig.main)):e.manifest.main&&o.accept.push(f.y1.resolve(f.LZ.root,e.manifest.main)),e.manifest.publishConfig&&e.manifest.publishConfig.module?o.accept.push(f.y1.resolve(f.LZ.root,e.manifest.publishConfig.module)):e.manifest.module&&o.accept.push(f.y1.resolve(f.LZ.root,e.manifest.module));const s=null!==e.manifest.files;if(s){o.reject.push("/*");for(const t of e.manifest.files)F(o.accept,t,{cwd:f.LZ.root})}return await async function(e,{hasExplicitFileList:t,globalList:r,ignoreList:n}){const i=[],o=new C.n(e),s=[[f.LZ.root,[n]]];for(;s.length>0;){const[e,n]=s.pop(),A=await o.lstatPromise(e);if(!M(e,{globalList:r,ignoreLists:A.isDirectory()?null:n}))if(A.isDirectory()){const i=await o.readdirPromise(e);let A=!1,a=!1;if(!t||e!==f.LZ.root)for(const e of i)A=A||".gitignore"===e,a=a||".npmignore"===e;const c=a?await x(o,e,(0,f.Zu)(".npmignore")):A?await x(o,e,(0,f.Zu)(".gitignore")):null;let u=null!==c?[c].concat(n):n;M(e,{globalList:r,ignoreLists:n})&&(u=[...n,{accept:[],reject:["**/*"]}]);for(const t of i)s.push([f.y1.resolve(e,t),u])}else i.push(f.y1.relative(f.LZ.root,e))}return i.sort()}(e.cwd,{hasExplicitFileList:s,globalList:n,ignoreList:o})}async function x(e,t,r){const n={accept:[],reject:[]},i=await e.readFilePromise(f.y1.join(t,r),"utf8");for(const e of i.split(/\n/g))F(n.reject,e,{cwd:t});return n}function F(e,t,{cwd:r}){const n=t.trim();""!==n&&"#"!==n[0]&&e.push(function(e,{cwd:t}){const r="!"===e[0];return r&&(e=e.slice(1)),e.match(/\.{0,1}\//)&&(e=f.y1.resolve(t,e)),r&&(e="!"+e),e}(n,{cwd:r}))}function M(e,{globalList:t,ignoreLists:r}){if(N(e,t.accept))return!1;if(N(e,t.reject))return!0;if(null!==r)for(const t of r){if(N(e,t.accept))return!1;if(N(e,t.reject))return!0}return!1}function N(e,t){let r=t;const n=[];for(let e=0;e{await D(r,{report:t},async()=>{t.reportJson({base:r.cwd});const e=await k(r);for(const r of e)t.reportInfo(null,r),t.reportJson({location:r});if(!this.dryRun){const t=await b(r,e),i=p.xfs.createWriteStream(n);t.pipe(i),await new Promise(e=>{i.on("finish",e)})}}),this.dryRun||(t.reportInfo(s.b.UNNAMED,"Package archive generated in "+e.format(n,"magenta")),t.reportJson({output:n}))})).exitCode()}}L.usage=d.Command.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `--install-if-needed` flag is set Yarn will run a preliminary `yarn install` if the package contains build scripts.\n\n If the `-n,--dry-run` flag is set the command will just print the file paths without actually generating the package archive.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]}),(0,A.gn)([d.Command.Boolean("--install-if-needed")],L.prototype,"installIfNeeded",void 0),(0,A.gn)([d.Command.Boolean("-n,--dry-run")],L.prototype,"dryRun",void 0),(0,A.gn)([d.Command.Boolean("--json")],L.prototype,"json",void 0),(0,A.gn)([d.Command.String("--filename",{hidden:!1}),d.Command.String("-o,--out")],L.prototype,"out",void 0),(0,A.gn)([d.Command.Path("pack")],L.prototype,"execute",null);const K=["dependencies","devDependencies","peerDependencies"],T={hooks:{beforeWorkspacePacking:(e,t)=>{t.publishConfig&&(t.publishConfig.main&&(t.main=t.publishConfig.main),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.module&&(t.module=t.publishConfig.module),t.publishConfig.bin&&(t.bin=t.publishConfig.bin));const r=e.project;for(const n of K)for(const A of e.manifest.getForScope(n).values()){const e=r.tryWorkspaceByDescriptor(A),a=i.structUtils.parseRange(A.range);if("workspace:"===a.protocol)if(null===e){if(null===r.tryWorkspaceByIdent(A))throw new o.lk(s.b.WORKSPACE_NOT_FOUND,i.structUtils.prettyDescriptor(r.configuration,A)+": No local workspace found for this range")}else{let r;r=i.structUtils.areDescriptorsEqual(A,e.anchoredDescriptor)||"*"===a.selector?e.manifest.version:a.selector,t[n][i.structUtils.stringifyIdent(A)]=r}}}},commands:[L]}},77333:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchUtils:()=>n,default:()=>W});var n={};r.r(n),r.d(n,{applyPatchFile:()=>g,diffFolders:()=>K,extractPackageToDisk:()=>L,isParentRequired:()=>N,loadPatchFiles:()=>R,makeDescriptor:()=>x,makeLocator:()=>F,parseDescriptor:()=>b,parseLocator:()=>S,parsePatchFile:()=>B});var i=r(84132),o=r(56537),s=r(46009),A=r(90739),a=r(75448),c=r(29486),u=r(33720),l=r(78420);async function h(e,t,r){const n=await e.lstatPromise(t),i=await r();if(void 0!==i&&(t=i),e.lutimesPromise)await e.lutimesPromise(t,n.atime,n.mtime);else{if(n.isSymbolicLink())throw new Error("Cannot preserve the time values of a symlink");await e.utimesPromise(t,n.atime,n.mtime)}}async function g(e,{baseFs:t=new l.S,dryRun:r=!1,version:n=null}={}){for(const o of e)if(null===o.semverExclusivity||null===n||i.semverUtils.satisfiesWithPrereleases(n,o.semverExclusivity))switch(o.type){case"file deletion":if(r){if(!t.existsSync(o.path))throw new Error("Trying to delete file that doesn't exist: "+o.path)}else await h(t,s.y1.dirname(o.path),async()=>{await t.unlinkPromise(o.path)});break;case"rename":if(r){if(!t.existsSync(o.fromPath))throw new Error("Trying to move file that doesn't exist: "+o.fromPath)}else await h(t,s.y1.dirname(o.fromPath),async()=>{await h(t,s.y1.dirname(o.toPath),async()=>{await h(t,o.fromPath,async()=>(await t.movePromise(o.fromPath,o.toPath),o.toPath))})});break;case"file creation":if(r){if(t.existsSync(o.path))throw new Error("Trying to create file that already exists: "+o.path)}else{const e=o.hunk?o.hunk.parts[0].lines.join("\n")+(o.hunk.parts[0].noNewlineAtEndOfFile?"":"\n"):"";await t.mkdirpPromise(s.y1.dirname(o.path),{chmod:493,utimes:[315532800,315532800]}),await t.writeFilePromise(o.path,e,{mode:o.mode}),await t.utimesPromise(o.path,315532800,315532800)}break;case"patch":await h(t,o.path,async()=>{await d(o,{baseFs:t,dryRun:r})});break;case"mode change":{const e=(await t.statPromise(o.path)).mode;if(f(o.newMode)!==f(e))continue;await h(t,o.path,async()=>{await t.chmodPromise(o.path,o.newMode)})}break;default:i.miscUtils.assertNever(o)}}function f(e){return(64&e)>0}function p(e){return e.replace(/\s+$/,"")}async function d({hunks:e,path:t},{baseFs:r,dryRun:n=!1}){const o=await r.statSync(t).mode,s=(await r.readFileSync(t,"utf8")).split(/\n/),A=[];let a=0,c=0;for(const t of e){const r=Math.max(c,t.header.patched.start+a),n=Math.max(0,r-c),i=Math.max(0,s.length-r-t.header.original.length),o=Math.max(n,i);let u=0,l=0,h=null;for(;u<=o&&!(u<=n&&(l=r-u,h=C(t,s,l),null!==h))&&!(u<=i&&(l=r+u,h=C(t,s,l),null!==h));)u+=1;if(null===h)throw new Error("Cannot apply hunk #"+(e.indexOf(t)+1));A.push(h),a+=u,c=l+t.header.original.length}if(n)return;let u=0;for(const e of A)for(const t of e)switch(t.type){case"splice":{const e=t.index+u;s.splice(e,t.numToDelete,...t.linesToInsert),u+=t.linesToInsert.length-t.numToDelete}break;case"pop":s.pop();break;case"push":s.push(t.line);break;default:i.miscUtils.assertNever(t)}await r.writeFilePromise(t,s.join("\n"),{mode:o})}function C(e,t,r){const n=[];for(const s of e.parts)switch(s.type){case"deletion":case"context":for(const e of s.lines){const n=t[r];if(null==n||(o=e,p(n)!==p(o)))return null;r+=1}"deletion"===s.type&&(n.push({type:"splice",index:r-s.lines.length,numToDelete:s.lines.length,linesToInsert:[]}),s.noNewlineAtEndOfFile&&n.push({type:"push",line:""}));break;case"insertion":n.push({type:"splice",index:r,numToDelete:0,linesToInsert:s.lines}),s.noNewlineAtEndOfFile&&n.push({type:"pop"});break;default:i.miscUtils.assertNever(s.type)}var o;return n}const E=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function I(e){return s.y1.relative(s.LZ.root,s.y1.resolve(s.LZ.root,s.cS.toPortablePath(e)))}function m(e){const t=e.trim().match(E);if(!t)throw new Error(`Bad header line: '${e}'`);return{original:{start:Math.max(Number(t[1]),1),length:Number(t[3]||1)},patched:{start:Math.max(Number(t[4]),1),length:Number(t[6]||1)}}}const y={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function w(e){const t=511&parseInt(e,8);if(420!==t&&493!==t)throw new Error("Unexpected file mode string: "+e);return t}function B(e){const t=e.split(/\n/g);return""===t[t.length-1]&&t.pop(),function(e){const t=[];for(const r of e){const{semverExclusivity:e,diffLineFromPath:n,diffLineToPath:o,oldMode:s,newMode:A,deletedFileMode:a,newFileMode:c,renameFrom:u,renameTo:l,beforeHash:h,afterHash:g,fromPath:f,toPath:p,hunks:d}=r,C=u?"rename":a?"file deletion":c?"file creation":d&&d.length>0?"patch":"mode change";let E=null;switch(C){case"rename":if(!u||!l)throw new Error("Bad parser state: rename from & to not given");t.push({type:"rename",semverExclusivity:e,fromPath:I(u),toPath:I(l)}),E=l;break;case"file deletion":{const r=n||f;if(!r)throw new Error("Bad parse state: no path given for file deletion");t.push({type:"file deletion",semverExclusivity:e,hunk:d&&d[0]||null,path:I(r),mode:w(a),hash:h})}break;case"file creation":{const r=o||p;if(!r)throw new Error("Bad parse state: no path given for file creation");t.push({type:"file creation",semverExclusivity:e,hunk:d&&d[0]||null,path:I(r),mode:w(c),hash:g})}break;case"patch":case"mode change":E=p||o;break;default:i.miscUtils.assertNever(C)}E&&s&&A&&s!==A&&t.push({type:"mode change",semverExclusivity:e,path:I(E),oldMode:w(s),newMode:w(A)}),E&&d&&d.length&&t.push({type:"patch",semverExclusivity:e,path:I(E),hunks:d,beforeHash:h,afterHash:g})}return t}(function(e){const t=[];let r={semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null},n="parsing header",o=null,s=null;function A(){o&&(s&&(o.parts.push(s),s=null),r.hunks.push(o),o=null)}function a(){A(),t.push(r),r={semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}}for(let t=0;te<0?e:"+"+e;throw new Error(`hunk header integrity check failed (expected @@ ${n(e.header.original.length)} ${n(e.header.patched.length)} @@, got @@ ${n(t)} ${n(r)} @@)`)}}const v=/^builtin<([^>]+)>$/;function D(e,t){const{source:r,selector:n,params:o}=i.structUtils.parseRange(e);if(null===r)throw new Error("Patch locators must explicitly define their source");const A=n?n.split(/&/).map(e=>s.cS.toPortablePath(e)):[],a=o&&"string"==typeof o.locator?i.structUtils.parseLocator(o.locator):null,c=o&&"string"==typeof o.version?o.version:null;return{parentLocator:a,sourceItem:t(r),patchPaths:A,sourceVersion:c}}function b(e){const{sourceItem:t,...r}=D(e.range,i.structUtils.parseDescriptor);return{...r,sourceDescriptor:t}}function S(e){const{sourceItem:t,...r}=D(e.reference,i.structUtils.parseLocator);return{...r,sourceLocator:t}}function k({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:n,patchHash:o},s){const A=null!==e?{locator:i.structUtils.stringifyLocator(e)}:{},a=void 0!==n?{version:n}:{},c=void 0!==o?{hash:o}:{};return i.structUtils.makeRange({protocol:"patch:",source:s(t),selector:r.join("&"),params:{...a,...c,...A}})}function x(e,{parentLocator:t,sourceDescriptor:r,patchPaths:n}){return i.structUtils.makeLocator(e,k({parentLocator:t,sourceItem:r,patchPaths:n},i.structUtils.stringifyDescriptor))}function F(e,{parentLocator:t,sourcePackage:r,patchPaths:n,patchHash:o}){return i.structUtils.makeLocator(e,k({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:n,patchHash:o},i.structUtils.stringifyLocator))}function M({onAbsolute:e,onRelative:t,onBuiltin:r},n){const i=n.match(v);return null!==i?r(i[1]):s.y1.isAbsolute(n)?e(n):t(n)}function N(e){return M({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},e)}async function R(e,t,r){const n=null!==e?await r.fetcher.fetch(e,r):null,A=n&&n.localPath?{packageFs:new a.M(s.LZ.root),prefixPath:s.y1.relative(s.LZ.root,n.localPath)}:n;n&&n!==A&&n.releaseFs&&n.releaseFs();return(await i.miscUtils.releaseAfterUseAsync(async()=>await Promise.all(t.map(async e=>M({onAbsolute:async()=>await o.xfs.readFilePromise(e,"utf8"),onRelative:async()=>{if(null===n)throw new Error("Assertion failed: The parent locator should have been fetched");return await n.packageFs.readFilePromise(e,"utf8")},onBuiltin:async e=>await r.project.configuration.firstHook(e=>e.getBuiltinPatch,r.project,e)},e))))).map(e=>"string"==typeof e?e.replace(/\r\n?/g,"\n"):e)}async function L(e,{cache:t,project:r}){const n=r.storedChecksums,A=new u.$,a=r.configuration.makeFetcher(),c=await a.fetch(e,{cache:t,project:r,fetcher:a,checksums:n,report:A}),l=await o.xfs.mktempPromise();return await o.xfs.copyPromise(l,c.prefixPath,{baseFs:c.packageFs}),await o.xfs.writeJsonPromise(s.y1.join(l,".yarn-patch.json"),{locator:i.structUtils.stringifyLocator(e)}),o.xfs.detachTemp(l),l}async function K(e,t){const r=s.cS.fromPortablePath(e).replace(/\\/g,"/"),n=s.cS.fromPortablePath(t).replace(/\\/g,"/"),{stdout:o}=await i.execUtils.execvp("git",["diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index",r,n],{cwd:s.cS.toPortablePath(process.cwd())}),A=r.startsWith("/")?e=>e.slice(1):e=>e;return o.replace(new RegExp(`(a|b)(${i.miscUtils.escapeRegExp(`/${A(r)}/`)})`,"g"),"$1/").replace(new RegExp("(a|b)"+i.miscUtils.escapeRegExp(`/${A(n)}/`),"g"),"$1/").replace(new RegExp(i.miscUtils.escapeRegExp(r+"/"),"g"),"").replace(new RegExp(i.miscUtils.escapeRegExp(n+"/"),"g"),"")}var T=r(36370),_=r(17278);class P extends _.Command{}(0,T.gn)([_.Command.String("--cwd",{hidden:!0})],P.prototype,"cwd",void 0);var O=r(46611);class U extends _.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${s.y1.relative(e,t)} isn't a workspace of ${s.y1.join(e,O.G.fileName)}).`)}}r(65379);r(63129),r(35747);var j=r(27122);(0,T.gn)([_.Command.Path("--welcome")],class extends P{async execute(){const e=await j.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${e.format("Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${e.format("https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${e.format("https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${e.format("https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${e.format("find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${e.format("yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${e.format("yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}.prototype,"execute",null);var Y=r(40376),G=r(28148);class J extends P{async execute(){const e=await j.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await Y.I.find(e,this.context.cwd),n=await G.C.find(e);if(!r)throw new U(t.cwd,this.context.cwd);await t.restoreInstallState();const A=s.y1.resolve(this.context.cwd,s.cS.toPortablePath(this.patchFolder)),a=s.y1.join(A,".yarn-patch.json");if(!o.xfs.existsSync(a))throw new _.UsageError("The argument folder didn't get created by 'yarn patch'");const c=await o.xfs.readJsonPromise(a),u=i.structUtils.parseLocator(c.locator,!0);if(!t.storedPackages.has(u.locatorHash))throw new _.UsageError("No package found in the project for the given locator");const l=await L(u,{cache:n,project:t});this.context.stdout.write(await K(l,A))}}J.usage=_.Command.Usage({description:"\n This will turn the folder passed in parameter into a patchfile suitable for consumption with the `patch:` protocol.\n\n Only folders generated through `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "}),(0,T.gn)([_.Command.String()],J.prototype,"patchFolder",void 0),(0,T.gn)([_.Command.Path("patch-commit")],J.prototype,"execute",null);var H=r(15815),z=r(92659);class q extends P{async execute(){const e=await j.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await Y.I.find(e,this.context.cwd),n=await G.C.find(e);if(!r)throw new U(t.cwd,this.context.cwd);await t.restoreInstallState();let o=i.structUtils.parseLocator(this.package);if("unknown"===o.reference){const r=i.miscUtils.mapAndFilter([...t.storedPackages.values()],e=>e.identHash!==o.identHash||i.structUtils.isVirtualLocator(e)?i.miscUtils.mapAndFilter.skip:e);if(0===r.length)throw new _.UsageError("No package found in the project for the given locator");if(r.length>1)throw new _.UsageError("Multiple candidate packages found; explicitly choose one of them (use `yarn why ` to get more information as to who depends on them):\n"+r.map(t=>"\n- "+i.structUtils.prettyLocator(e,t)).join(""));o=r[0]}if(!t.storedPackages.has(o.locatorHash))throw new _.UsageError("No package found in the project for the given locator");await H.P.start({configuration:e,stdout:this.context.stdout},async r=>{const A=await L(o,{cache:n,project:t});r.reportInfo(z.b.UNNAMED,`Package ${i.structUtils.prettyLocator(e,o)} got extracted with success!`),r.reportInfo(z.b.UNNAMED,"You can now edit the following folder: "+e.format(s.cS.fromPortablePath(A),"magenta")),r.reportInfo(z.b.UNNAMED,`Once you are done run ${e.format("yarn patch-commit "+s.cS.fromPortablePath(A),"cyan")} and Yarn will store a patchfile based on your changes.`)})}}q.usage=_.Command.Usage({description:'\n This command will cause a package to be extracted in a temporary directory (under a folder named "patch-workdir"). This folder will be editable at will; running `yarn patch` inside it will then cause Yarn to generate a patchfile and register it into your top-level manifest (cf the `patch:` protocol).\n '}),(0,T.gn)([_.Command.String()],q.prototype,"package",void 0),(0,T.gn)([_.Command.Path("patch")],q.prototype,"execute",null);const W={commands:[J,q],fetchers:[class{supports(e,t){return!!e.reference.startsWith("patch:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,i.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.patchPackage(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:o,prefixPath:i.structUtils.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:s}}async patchPackage(e,t){const{parentLocator:r,sourceLocator:n,sourceVersion:u,patchPaths:l}=S(e),h=await R(r,l,t),f=await o.xfs.mktempPromise(),p=s.y1.join(f,"patched.zip"),d=await t.fetcher.fetch(n,t),C=i.structUtils.getIdentVendorPath(e),E=await(0,c.getLibzipPromise)(),I=new A.d(p,{libzip:E,create:!0,level:t.project.configuration.get("compressionLevel")});await I.mkdirpPromise(C),await i.miscUtils.releaseAfterUseAsync(async()=>{await I.copyPromise(C,d.prefixPath,{baseFs:d.packageFs,stableSort:!0})},d.releaseFs),I.saveAndClose();const m=new A.d(p,{libzip:E,level:t.project.configuration.get("compressionLevel")}),y=new a.M(s.y1.resolve(s.LZ.root,C),{baseFs:m});for(const e of h)null!==e&&await g(B(e),{baseFs:y,version:u});return m}}],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("patch:")}supportsLocator(e,t){return!!e.reference.startsWith("patch:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){const{patchPaths:n}=b(e);return n.every(e=>!N(e))?e:i.structUtils.bindDescriptor(e,{locator:i.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){const{sourceDescriptor:r}=b(e);return[r]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{parentLocator:n,sourceDescriptor:o,patchPaths:s}=b(e),A=await R(n,s,r.fetchOptions),a=t.get(o.descriptorHash);if(void 0===a)throw new Error("Assertion failed: The dependency should have been resolved");return[F(e,{parentLocator:n,sourcePackage:a,patchPaths:s,patchHash:i.hashUtils.makeHash("2",...A).slice(0,6)})]}async resolve(e,t){const{sourceLocator:r}=S(e);return{...await t.resolver.resolve(r,t),...e}}}]}},5780:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getPnpPath:()=>b,quotePathIfNeeded:()=>S,AbstractPnpInstaller:()=>d,PnpInstaller:()=>m,PnpLinker:()=>I,default:()=>k});var n=r(27122),i=r(46009),o=r(56537),s=r(10966),A=r.n(s),a=r(92659),c=r(92409),u=r(84132),l=r(75448),h=r(88563),g=r(17278),f=r(46611),p=r(32485);class d{constructor(e){this.opts=e,this.packageRegistry=new Map,this.blacklistedPaths=new Set,this.opts=e}checkAndReportManifestIncompatibility(e,t){return e&&!e.isCompatibleWithOS(process.platform)?(this.opts.report.reportWarningOnce(a.b.INCOMPATIBLE_OS,`${u.structUtils.prettyLocator(this.opts.project.configuration,t)} The platform ${process.platform} is incompatible with this module, ${this.opts.skipIncompatiblePackageLinking?"linking":"building"} skipped.`),!1):!(e&&!e.isCompatibleWithCPU(process.arch))||(this.opts.report.reportWarningOnce(a.b.INCOMPATIBLE_CPU,`${u.structUtils.prettyLocator(this.opts.project.configuration,t)} The CPU architecture ${process.arch} is incompatible with this module, ${this.opts.skipIncompatiblePackageLinking?"linking":"building"} skipped.`),!1)}async installPackage(e,t){const r=u.structUtils.requirableIdent(e),n=e.reference,o=e.peerDependencies.size>0&&!u.structUtils.isVirtualLocator(e)&&!this.opts.project.tryWorkspaceByLocator(e),s=!o||this.opts.skipIncompatiblePackageLinking?await f.G.tryFind(t.prefixPath,{baseFs:t.packageFs}):null,A=this.checkAndReportManifestIncompatibility(s,e);if(this.opts.skipIncompatiblePackageLinking&&!A)return{packageLocation:null,buildDirective:null};const c=o?[]:await this.getBuildScripts(e,s,t);c.length>0&&!this.opts.project.configuration.get("enableScripts")&&(this.opts.report.reportWarningOnce(a.b.DISABLED_BUILD_SCRIPTS,u.structUtils.prettyLocator(this.opts.project.configuration,e)+" lists build scripts, but all build scripts have been disabled."),c.length=0),c.length>0&&e.linkType!==p.U.HARD&&!this.opts.project.tryWorkspaceByLocator(e)&&(this.opts.report.reportWarningOnce(a.b.SOFT_LINK_BUILD,u.structUtils.prettyLocator(this.opts.project.configuration,e)+" lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored."),c.length=0);const l=this.opts.project.getDependencyMeta(e,e.version);c.length>0&&l&&!1===l.built&&(this.opts.report.reportInfoOnce(a.b.BUILD_DISABLED,u.structUtils.prettyLocator(this.opts.project.configuration,e)+" lists build scripts, but its build has been explicitly disabled through configuration."),c.length=0);const h=o||e.linkType===p.U.SOFT?t.packageFs:await this.transformPackage(e,s,t,l,{hasBuildScripts:c.length>0});if(i.y1.isAbsolute(t.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${t.prefixPath}) to be relative to the parent`);const g=i.y1.resolve(h.getRealPath(),t.prefixPath),d=this.normalizeDirectoryPath(g),C=new Map,E=new Set;if(u.structUtils.isVirtualLocator(e))for(const t of e.peerDependencies.values())C.set(u.structUtils.requirableIdent(t),null),E.add(u.structUtils.stringifyIdent(t));return u.miscUtils.getMapWithDefault(this.packageRegistry,r).set(n,{packageLocation:d,packageDependencies:C,packagePeers:E,linkType:e.linkType,discardFromLookup:t.discardFromLookup||!1}),o&&this.blacklistedPaths.add(d),{packageLocation:g,buildDirective:c.length>0&&A?c:null}}async attachInternalDependencies(e,t){const r=this.getPackageInformation(e);for(const[e,n]of t){const t=u.structUtils.areIdentsEqual(e,n)?n.reference:[u.structUtils.requirableIdent(n),n.reference];r.packageDependencies.set(u.structUtils.requirableIdent(e),t)}}async attachExternalDependents(e,t){for(const r of t){this.getDiskInformation(r).packageDependencies.set(u.structUtils.requirableIdent(e),e.reference)}}async finalizeInstall(){this.trimBlacklistedPackages(),this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));const e=this.opts.project.configuration.get("pnpFallbackMode"),t=this.blacklistedPaths,r=this.opts.project.workspaces.map(({anchoredLocator:e})=>({name:u.structUtils.requirableIdent(e),reference:e.reference})),n="none"!==e,i=[],o=this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator).packageDependencies,s=u.miscUtils.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),A=this.packageRegistry,a=this.opts.project.configuration.get("pnpShebang");if("dependencies-only"===e)for(const e of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(e)&&i.push({name:u.structUtils.requirableIdent(e),reference:e.reference});return await this.finalizeInstallWithPnp({blacklistedLocations:t,dependencyTreeRoots:r,enableTopLevelFallback:n,fallbackExclusionList:i,fallbackPool:o,ignorePattern:s,packageRegistry:A,shebang:a})}getPackageInformation(e){const t=u.structUtils.requirableIdent(e),r=e.reference,n=this.packageRegistry.get(t);if(!n)throw new Error(`Assertion failed: The package information store should have been available (for ${u.structUtils.prettyIdent(this.opts.project.configuration,e)})`);const i=n.get(r);if(!i)throw new Error(`Assertion failed: The package information should have been available (for ${u.structUtils.prettyLocator(this.opts.project.configuration,e)})`);return i}getDiskInformation(e){const t=u.miscUtils.getMapWithDefault(this.packageRegistry,"@@disk"),r=this.normalizeDirectoryPath(e);return u.miscUtils.getFactoryWithDefault(t,r,()=>({packageLocation:r,packageDependencies:new Map,packagePeers:new Set,linkType:p.U.SOFT,discardFromLookup:!1}))}trimBlacklistedPackages(){for(const e of this.packageRegistry.values())for(const[t,r]of e)r.packageLocation&&this.blacklistedPaths.has(r.packageLocation)&&e.delete(t)}normalizeDirectoryPath(e){let t=i.y1.relative(this.opts.project.cwd,e);return t.match(/^\.{0,2}\//)||(t="./"+t),t.replace(/\/?$/,"/")}}const C=new Set([u.structUtils.makeIdent(null,"nan").identHash,u.structUtils.makeIdent(null,"node-gyp").identHash,u.structUtils.makeIdent(null,"node-pre-gyp").identHash,u.structUtils.makeIdent(null,"node-addon-api").identHash,u.structUtils.makeIdent(null,"fsevents").identHash]),E=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);class I{constructor(){this.mode="strict"}supportsPackage(e,t){return"pnp"===t.project.configuration.get("nodeLinker")&&t.project.configuration.get("pnpMode")===this.mode}async findPackageLocation(e,t){const r=b(t.project).main;if(!o.xfs.existsSync(r))throw new g.UsageError(`The project in ${t.project.cwd}/package.json doesn't seem to have been installed - running an install there might help`);const n=u.miscUtils.dynamicRequireNoCache(r),s={name:u.structUtils.requirableIdent(e),reference:e.reference},A=n.getPackageInformation(s);if(!A)throw new g.UsageError(`Couldn't find ${u.structUtils.prettyLocator(t.project.configuration,e)} in the currently installed PnP map - running an install might help`);return i.cS.toPortablePath(A.packageLocation)}async findPackageLocator(e,t){const n=b(t.project).main;if(!o.xfs.existsSync(n))return null;const s=i.cS.fromPortablePath(n),A=u.miscUtils.dynamicRequire(s);delete r.c[s];const a=A.findPackageLocator(i.cS.fromPortablePath(e));return a?u.structUtils.makeLocator(u.structUtils.parseIdent(a.name),a.reference):null}makeInstaller(e){return new m(e)}}class m extends d{constructor(){super(...arguments),this.mode="strict",this.unpluggedPaths=new Set}async getBuildScripts(e,t,r){if(null===t)return[];const n=[];for(const e of["preinstall","install","postinstall"])t.scripts.has(e)&&n.push([c.k.SCRIPT,e]);const o=i.y1.join(r.prefixPath,(0,i.Zu)("binding.gyp"));return!t.scripts.has("install")&&r.packageFs.existsSync(o)&&n.push([c.k.SHELLCODE,"node-gyp rebuild"]),n}async transformPackage(e,t,r,n,{hasBuildScripts:i}){return this.isUnplugged(e,t,r,n,{hasBuildScripts:i})?this.unplugPackage(e,r.packageFs):r.packageFs}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=b(this.opts.project),r=this.opts.project.configuration.get("pnpDataPath");if(await o.xfs.removePromise(t.other),"pnp"!==this.opts.project.configuration.get("nodeLinker"))return await o.xfs.removePromise(t.main),void await o.xfs.removePromise(r);const n=await this.locateNodeModules();if(n.length>0){this.opts.report.reportWarning(a.b.DANGEROUS_NODE_MODULES,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(const e of n)await o.xfs.removePromise(e)}if(this.opts.project.configuration.get("pnpEnableInlining")){const n=(0,h.gY)(e);await o.xfs.changeFilePromise(t.main,n,{automaticNewlines:!0}),await o.xfs.chmodPromise(t.main,493),await o.xfs.removePromise(r)}else{const n=i.y1.relative(i.y1.dirname(t.main),r),{dataFile:s,loaderFile:A}=(0,h.Q$)({...e,dataLocation:n});await o.xfs.changeFilePromise(t.main,A,{automaticNewlines:!0}),await o.xfs.chmodPromise(t.main,493),await o.xfs.changeFilePromise(r,s,{automaticNewlines:!0}),await o.xfs.chmodPromise(r,420)}const s=this.opts.project.configuration.get("pnpUnpluggedFolder");if(0===this.unpluggedPaths.size)await o.xfs.removePromise(s);else for(const e of await o.xfs.readdirPromise(s)){const t=i.y1.resolve(s,e);this.unpluggedPaths.has(t)||await o.xfs.removePromise(t)}}async locateNodeModules(){const e=[];for(const t of this.opts.project.workspaces){const r=i.y1.join(t.cwd,(0,i.Zu)("node_modules"));if(!o.xfs.existsSync(r))continue;const n=await o.xfs.readdirPromise(r,{withFileTypes:!0}),s=n.filter(e=>!e.isDirectory()||".bin"===e.name||!e.name.startsWith("."));if(s.length===n.length)e.push(r);else for(const t of s)e.push(i.y1.join(r,t.name))}return e}getUnpluggedPath(e){return i.y1.resolve(this.opts.project.configuration.get("pnpUnpluggedFolder"),u.structUtils.slugifyLocator(e))}async unplugPackage(e,t){const r=this.getUnpluggedPath(e);return this.unpluggedPaths.add(r),await o.xfs.mkdirpPromise(r),await o.xfs.copyPromise(r,i.LZ.dot,{baseFs:t,overwrite:!1}),new l.M(r)}isUnplugged(e,t,r,n,{hasBuildScripts:i}){return void 0!==n.unplugged?n.unplugged:!!C.has(e.identHash)||(null!==t&&null!==t.preferUnplugged?t.preferUnplugged:!(!i&&!r.packageFs.getExtractHint({relevantExtensions:E})))}}var y=r(36370),w=r(95397),B=r(40376),Q=r(28148),v=r(15815);class D extends w.BaseCommand{constructor(){super(...arguments),this.patterns=[]}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await B.I.find(e,this.context.cwd),i=await Q.C.find(e);if(!r)throw new w.WorkspaceRequiredError(t.cwd,this.context.cwd);const o=t.topLevelWorkspace;for(const e of this.patterns){const t=u.structUtils.parseDescriptor(e);o.manifest.ensureDependencyMeta(t).unplugged=!0}await o.persistManifest();return(await v.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:i,report:e})})).exitCode()}}D.usage=g.Command.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the specified selectors to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `virtualFolder`.\n\n Unpacking a package isn't advised as a general tool because it makes it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n The unplug command sets a flag that's persisted in your top-level `package.json` through the `dependenciesMeta` field. As such, to undo its effects, just revert the changes made to the manifest and run `yarn install`.\n ",examples:[["Unplug lodash","yarn unplug lodash"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"]]}),(0,y.gn)([g.Command.Rest()],D.prototype,"patterns",void 0),(0,y.gn)([g.Command.Path("unplug")],D.prototype,"execute",null);const b=e=>{let t,r;return"module"===e.topLevelWorkspace.manifest.type?(t=".pnp.cjs",r=".pnp.js"):(t=".pnp.js",r=".pnp.cjs"),{main:i.y1.join(e.cwd,t),other:i.y1.join(e.cwd,r)}},S=e=>/\s/.test(e)?JSON.stringify(e):e;const k={hooks:{populateYarnPaths:async function(e,t){t(b(e).main),t(b(e).other),t(e.configuration.get("pnpDataPath")),t(e.configuration.get("pnpUnpluggedFolder"))},setupScriptEnvironment:async function(e,t,r){const n=b(e).main,s="--require "+S(i.cS.fromPortablePath(n));if(n.includes(" ")&&A().lt(process.versions.node,"12.0.0"))throw new Error(`Expected the build location to not include spaces when using Node < 12.0.0 (${process.versions.node})`);if(o.xfs.existsSync(n)){let e=t.NODE_OPTIONS||"";const r=/\s*--require\s+\S*\.pnp\.c?js\s*/g;e=e.replace(r," ").trim(),e=e?`${s} ${e}`:s,t.NODE_OPTIONS=e}}},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:n.a2.STRING,default:"pnp"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:n.a2.STRING,default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:n.a2.STRING,default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:n.a2.STRING,default:[],isArray:!0},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:n.a2.BOOLEAN,default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:n.a2.STRING,default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:n.a2.ABSOLUTE_PATH,default:"./.yarn/unplugged"},pnpDataPath:{description:"Path of the file where the PnP data (used by the loader) must be written",type:n.a2.ABSOLUTE_PATH,default:"./.pnp.data.json"}},linkers:[I],commands:[D]}},28638:(e,t,r)=>{"use strict";r.r(t);var n=r(50683),i=r.n(n);Object.fromEntries||(Object.fromEntries=i());var o=r(59355),s=r(91058),A=r(45330);(0,s.D)({binaryVersion:o.o||"",pluginConfiguration:(0,A.e)()})},95397:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseCommand:()=>n.F,WorkspaceRequiredError:()=>A,getDynamicLibs:()=>c,getPluginConfiguration:()=>u.e,openWorkspace:()=>h,main:()=>g.D});var n=r(56087),i=r(46611),o=r(46009),s=r(17278);class A extends s.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${o.y1.relative(e,t)} isn't a workspace of ${o.y1.join(e,i.G.fileName)}).`)}}const a=["@yarnpkg/cli","@yarnpkg/core","@yarnpkg/fslib","@yarnpkg/libzip","@yarnpkg/parsers","@yarnpkg/shell","clipanion","semver","yup"],c=()=>new Map(a.map(e=>[e,r(98497)(e)]));var u=r(45330),l=r(40376);async function h(e,t){const{project:r,workspace:n}=await l.I.find(e,t);if(!n)throw new A(r.cwd,t);return n}var g=r(91058)},91058:(e,t,r)=>{"use strict";r.d(t,{D:()=>h});var n=r(27122),i=r(46009),o=r(56537),s=r(63129),A=r(17278),a=r(35747),c=r(36370),u=r(56087);class l extends u.F{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${e.format("Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${e.format("https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${e.format("https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${e.format("https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${e.format("find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${e.format("yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${e.format("yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}async function h({binaryVersion:e,pluginConfiguration:t}){async function r(){const c=new A.Cli({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:e});c.register(l);try{await async function(e){const A=await n.VK.find(i.cS.toPortablePath(process.cwd()),t,{usePath:!0,strict:!1}),c=A.get("yarnPath"),u=A.get("ignorePath"),l=A.get("ignoreCwd");if(null===c||u){u&&delete process.env.YARN_IGNORE_PATH;for(const t of A.plugins.values())for(const r of t.commands||[])e.register(r);const n=e.process(process.argv.slice(2)),o=n.cwd;if(void 0!==o&&!l){const e=(0,a.realpathSync)(process.cwd()),t=(0,a.realpathSync)(o);if(e!==t)return process.chdir(o),void await r()}e.runExit(n,{cwd:i.cS.toPortablePath(process.cwd()),plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr})}else if(o.xfs.existsSync(c))try{!function(e){const t=i.cS.fromPortablePath(e);process.on("SIGINT",()=>{}),t?(0,s.execFileSync)(process.execPath,[t,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,s.execFileSync)(t,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}(c)}catch(e){process.exitCode=e.code||1}else process.stdout.write(e.error(new Error(`The "yarn-path" option has been set (in ${A.sources.get("yarnPath")}), but the specified location doesn't exist (${c}).`))),process.exitCode=1}(c)}catch(e){process.stdout.write(c.error(e)),process.exitCode=1}}return r().catch(e=>{process.stdout.write(e.stack||e.message),process.exitCode=1})}(0,c.gn)([A.Command.Path("--welcome")],l.prototype,"execute",null)},56087:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var n=r(36370),i=r(17278);class o extends i.Command{}(0,n.gn)([i.Command.String("--cwd",{hidden:!0})],o.prototype,"cwd",void 0)},28148:(e,t,r)=>{"use strict";r.d(t,{C:()=>C});var n=r(78420),i=r(90739),o=r(15037),s=r(46009),A=r(56537),a=r(29486),c=r(35747),u=r.n(c),l=r(92659),h=r(35691),g=r(20624),f=r(73632),p=r(54143);const d=4;class C{constructor(e,{configuration:t,immutable:r=t.get("enableImmutableCache"),check:n=!1}){this.markedFiles=new Set,this.mutexes=new Map,this.configuration=t,this.cwd=e,this.immutable=r,this.check=n;const o=t.get("cacheKeyOverride");if(null!==o)this.cacheKey=""+o;else{const e=t.get("compressionLevel"),r=e!==i.k?"c"+e:"";this.cacheKey=[d,r].join("")}}static async find(e,{immutable:t,check:r}={}){const n=new C(e.get("cacheFolder"),{configuration:e,immutable:t,check:r});return await n.setup(),n}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;const e=this.configuration.get("globalFolder")+"/cache";return e!==this.cwd?e:null}getVersionFilename(e){return`${p.slugifyLocator(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,t){const r=function(e){const t=e.indexOf("/");return-1!==t?e.slice(t+1):e}(t).slice(0,10);return`${p.slugifyLocator(e)}-${r}.zip`}getLocatorPath(e,t){if(null===this.mirrorCwd)return s.y1.resolve(this.cwd,this.getVersionFilename(e));if(null===t)return null;return E(t)!==this.cacheKey?null:s.y1.resolve(this.cwd,this.getChecksumFilename(e,t))}getLocatorMirrorPath(e){const t=this.mirrorCwd;return null!==t?s.y1.resolve(t,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache")){await A.xfs.mkdirpPromise(this.cwd);const e=s.y1.resolve(this.cwd,(0,s.Zu)(".gitignore"));await A.xfs.existsPromise(e)||await A.xfs.writeFilePromise(e,"/.gitignore\n*.lock\n")}}async fetchPackageFromCache(e,t,{onHit:r,onMiss:c,loader:d,skipIntegrityCheck:C}){const I=this.getLocatorMirrorPath(e),m=new n.S,y=async(e,r=null)=>{const n=C&&t?t:`${this.cacheKey}/${await g.checksumFile(e)}`;if(null!==r){if(n!==(C&&t?t:`${this.cacheKey}/${await g.checksumFile(r)}`))throw new h.lk(l.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(null!==t&&n!==t){let e;switch(e=this.check?"throw":E(t)!==E(n)?"update":this.configuration.get("checksumBehavior"),e){case"ignore":return t;case"update":return n;default:case"throw":throw new h.lk(l.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return n},w=async t=>{if(!d)throw new Error("Cache check required but no loader configured for "+p.prettyLocator(this.configuration,e));const r=await d(),n=r.getRealPath();return r.saveAndClose(),await A.xfs.chmodPromise(n,420),await y(t,n)},B=async()=>{if(null===I||!A.xfs.existsSync(I))return await d();const t=await A.xfs.mktempPromise(),r=s.y1.join(t,this.getVersionFilename(e));return await A.xfs.copyFilePromise(I,r,u().constants.COPYFILE_FICLONE),new i.d(r,{libzip:await(0,a.getLibzipPromise)()})},Q=async()=>{if(!d)throw new Error("Cache entry required but missing for "+p.prettyLocator(this.configuration,e));if(this.immutable)throw new h.lk(l.b.IMMUTABLE_CACHE,"Cache entry required but missing for "+p.prettyLocator(this.configuration,e));const t=await B(),r=t.getRealPath();t.saveAndClose(),await A.xfs.chmodPromise(r,420);const n=await y(r),i=this.getLocatorPath(e,n);if(!i)throw new Error("Assertion failed: Expected the cache path to be available");return await this.writeFileWithLock(i,async()=>await this.writeFileWithLock(I,async()=>(await A.xfs.movePromise(r,i),null!==I&&await A.xfs.copyFilePromise(i,I,u().constants.COPYFILE_FICLONE),[i,n])))},v=async()=>{const t=Q();this.mutexes.set(e.locatorHash,t);try{return await t}finally{this.mutexes.delete(e.locatorHash)}};for(let t;t=this.mutexes.get(e.locatorHash);)await t;const D=this.getLocatorPath(e,t),b=null!==D&&m.existsSync(D),S=b?r:c;let k,x;S&&S(),b?(k=D,x=this.check?await w(k):await y(k)):[k,x]=await v(),this.markedFiles.add(k);let F=null;const M=await(0,a.getLibzipPromise)();return[new o.v(()=>f.prettifySyncErrors(()=>F=new i.d(k,{baseFs:m,libzip:M,readOnly:!0}),t=>`Failed to open the cache entry for ${p.prettyLocator(this.configuration,e)}: ${t}`),s.y1),()=>{null!==F&&F.discardAndClose()},x]}async writeFileWithLock(e,t){return null===e?await t():(await A.xfs.mkdirpPromise(s.y1.dirname(e)),await A.xfs.lockPromise(e,async()=>await t()))}}function E(e){const t=e.indexOf("/");return-1!==t?e.slice(0,t):null}},27122:(e,t,r)=>{"use strict";r.d(t,{tr:()=>O,nh:()=>U,a2:()=>j,a5:()=>Y,EW:()=>V,VK:()=>X});var n=r(90739),i=r(46009),o=r(56537),s=r(55125),A=r(54738),a=r.n(A),c=r(95882),u=r.n(c),l=r(5864),h=r(17278),g=r(10966),f=r.n(g),p=r(92413),d=r(92659),C=r(54143);const E={hooks:{reduceDependency:(e,t,r,n,{resolver:i,resolveOptions:o})=>{for(const{pattern:n,reference:s}of t.topLevelWorkspace.manifest.resolutions){if(n.from&&n.from.fullName!==C.requirableIdent(r))continue;if(n.from&&n.from.description&&n.from.description!==r.reference)continue;if(n.descriptor.fullName!==C.requirableIdent(e))continue;if(n.descriptor.description&&n.descriptor.description!==e.range)continue;return i.bindDescriptor(C.makeDescriptor(e,s),t.topLevelWorkspace.anchoredLocator,o)}return e},validateProject:async(e,t)=>{for(const r of e.workspaces){const n=C.prettyWorkspace(e.configuration,r);await e.configuration.triggerHook(e=>e.validateWorkspace,r,{reportWarning:(e,r)=>t.reportWarning(e,`${n}: ${r}`),reportError:(e,r)=>t.reportError(e,`${n}: ${r}`)})}},validateWorkspace:async(e,t)=>{const{manifest:r}=e;r.resolutions.length&&e.cwd!==e.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(const e of r.errors)t.reportWarning(d.b.INVALID_MANIFEST,e.message)}}};var I=r(46611),m=r(35691);class y{constructor(e){this.fetchers=e}supports(e,t){return!!this.tryFetcher(e,t)}getLocalPath(e,t){return this.getFetcher(e,t).getLocalPath(e,t)}async fetch(e,t){const r=this.getFetcher(e,t);return await r.fetch(e,t)}tryFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));return r||null}getFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));if(!r)throw new m.lk(d.b.FETCHER_NOT_FOUND,C.prettyLocator(t.project.configuration,e)+" isn't supported by any available fetcher");return r}}var w=r(27092),B=r(52779),Q=r(60895);class v{static isVirtualDescriptor(e){return!!e.range.startsWith(v.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(v.protocol)}supportsDescriptor(e,t){return v.isVirtualDescriptor(e)}supportsLocator(e,t){return v.isVirtualLocator(e)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,t){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,t,r){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async resolve(e,t){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}v.protocol="virtual:";var D=r(75448),b=r(94538);class S{supports(e){return!!e.reference.startsWith(b.d.protocol)}getLocalPath(e,t){return this.getWorkspace(e,t).cwd}async fetch(e,t){const r=this.getWorkspace(e,t).cwd;return{packageFs:new D.M(r),prefixPath:i.LZ.dot,localPath:r}}getWorkspace(e,t){return t.project.getWorkspaceByCwd(e.reference.slice(b.d.protocol.length))}}var k=r(81111),x=r(73632),F=r(32282),M=r.n(F);function N(e){return("undefined"!=typeof require?require:r(32178))(e)}var R=r(36545);const L=process.env.GITHUB_ACTIONS?{level:2}:u().supportsColor?{level:u().supportsColor.level}:{level:0},K=0!==L.level,T=K&&!process.env.GITHUB_ACTIONS,_=new(u().Instance)(L),P=new Set(["binFolder","version","flags","profile","gpg","wrapOutput"]),O=(0,i.Zu)(".yarnrc.yml"),U=(0,i.Zu)("yarn.lock");var j,Y;!function(e){e.ANY="ANY",e.BOOLEAN="BOOLEAN",e.ABSOLUTE_PATH="ABSOLUTE_PATH",e.LOCATOR="LOCATOR",e.LOCATOR_LOOSE="LOCATOR_LOOSE",e.NUMBER="NUMBER",e.STRING="STRING",e.SECRET="SECRET",e.SHAPE="SHAPE",e.MAP="MAP"}(j||(j={})),function(e){e.NAME="NAME",e.NUMBER="NUMBER",e.PATH="PATH",e.RANGE="RANGE",e.REFERENCE="REFERENCE",e.SCOPE="SCOPE",e.ADDED="ADDED",e.REMOVED="REMOVED"}(Y||(Y={}));const G=L.level>=3?new Map([[Y.NAME,"#d7875f"],[Y.RANGE,"#00afaf"],[Y.REFERENCE,"#87afff"],[Y.NUMBER,"#ffd700"],[Y.PATH,"#d75fd7"],[Y.SCOPE,"#d75f00"],[Y.ADDED,"#5faf00"],[Y.REMOVED,"#d70000"]]):new Map([[Y.NAME,173],[Y.RANGE,37],[Y.REFERENCE,111],[Y.NUMBER,220],[Y.PATH,170],[Y.SCOPE,166],[Y.ADDED,70],[Y.REMOVED,160]]),J={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:j.STRING,default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:j.ABSOLUTE_PATH,default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:j.BOOLEAN,default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:j.BOOLEAN,default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:j.STRING,default:null},globalFolder:{description:"Folder where are stored the system-wide settings",type:j.ABSOLUTE_PATH,default:k.getDefaultGlobalFolder()},cacheFolder:{description:"Folder where the cache files must be written",type:j.ABSOLUTE_PATH,default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:j.NUMBER,values:["mixed",0,1,2,3,4,5,6,7,8,9],default:n.k},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named $$virtual)",type:j.ABSOLUTE_PATH,default:"./.yarn/$$virtual"},bstatePath:{description:"Path of the file where the current state of the built packages must be stored",type:j.ABSOLUTE_PATH,default:"./.yarn/build-state.yml"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:j.STRING,default:U},installStatePath:{description:"Path of the file where the install state will be persisted",type:j.ABSOLUTE_PATH,default:"./.yarn/install-state.gz"},rcFilename:{description:"Name of the files where the configuration can be found",type:j.STRING,default:W()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:j.BOOLEAN,default:!1},enableAbsoluteVirtuals:{description:"If true, the virtual symlinks will use absolute paths if required [non portable!!]",type:j.BOOLEAN,default:!1},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:j.BOOLEAN,default:K,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:j.BOOLEAN,default:T,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:j.BOOLEAN,default:l.isCI,defaultText:""},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:j.BOOLEAN,default:!l.isCI&&process.stdout.isTTY&&process.stdout.columns>22,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:j.BOOLEAN,default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:j.BOOLEAN,default:l.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:j.BOOLEAN,default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:j.STRING,default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:j.STRING,default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:j.STRING,default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:j.BOOLEAN,default:!0},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:j.BOOLEAN,default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:j.BOOLEAN,default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:j.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:j.STRING,default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:j.STRING,default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:j.NUMBER,default:6e4},httpRetry:{description:"Retry times on http failure",type:j.NUMBER,default:3},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:j.BOOLEAN,default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:j.BOOLEAN,default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:j.STRING,default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:j.MAP,valueDefinition:{description:"",type:j.ANY}}};function H(e,t,r,n,i){if(n.isArray)return Array.isArray(r)?r.map((r,o)=>z(e,`${t}[${o}]`,r,n,i)):String(r).split(/,/).map(r=>z(e,t,r,n,i));if(Array.isArray(r))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return z(e,t,r,n,i)}function z(e,t,r,n,o){var s;switch(n.type){case j.ANY:return r;case j.SHAPE:return function(e,t,r,n,i){if("object"!=typeof r||Array.isArray(r))throw new h.UsageError(`Object configuration settings "${t}" must be an object`);const o=q(e,n);if(null===r)return o;for(const[s,A]of Object.entries(r)){const r=`${t}.${s}`;if(!n.properties[s])throw new h.UsageError(`Unrecognized configuration settings found: ${t}.${s} - run "yarn config -v" to see the list of settings supported in Yarn`);o.set(s,H(e,r,A,n.properties[s],i))}return o}(e,t,r,n,o);case j.MAP:return function(e,t,r,n,i){const o=new Map;if("object"!=typeof r||Array.isArray(r))throw new h.UsageError(`Map configuration settings "${t}" must be an object`);if(null===r)return o;for(const[s,A]of Object.entries(r)){const r=n.normalizeKeys?n.normalizeKeys(s):s,a=`${t}['${r}']`,c=n.valueDefinition;o.set(r,H(e,a,A,c,i))}return o}(e,t,r,n,o)}if(null===r&&!n.isNullable&&null!==n.default)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if(null===(s=n.values)||void 0===s?void 0:s.includes(r))return r;const A=(()=>{if(n.type===j.BOOLEAN)return function(e){switch(e){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${e}" as a boolean`)}}(r);if("string"!=typeof r)throw new Error(`Expected value (${r}) to be a string`);const e=x.replaceEnvVariables(r,{env:process.env});switch(n.type){case j.ABSOLUTE_PATH:return i.y1.resolve(o,i.cS.toPortablePath(e));case j.LOCATOR_LOOSE:return C.parseLocator(e,!1);case j.NUMBER:return parseInt(e);case j.LOCATOR:return C.parseLocator(e);default:return e}})();if(n.values&&!n.values.includes(A))throw new Error("Invalid value, expected one of "+n.values.join(", "));return A}function q(e,t){switch(t.type){case j.SHAPE:{const r=new Map;for(const[n,i]of Object.entries(t.properties))r.set(n,q(e,i));return r}case j.MAP:return new Map;case j.ABSOLUTE_PATH:return null===t.default?null:null===e.projectCwd?i.y1.isAbsolute(t.default)?i.y1.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(t=>i.y1.resolve(e.projectCwd,t)):i.y1.resolve(e.projectCwd,t.default);default:return t.default}}function W(){for(const[e,t]of Object.entries(process.env))if("yarn_rc_filename"===e.toLowerCase()&&"string"==typeof t)return t;return O}var V;!function(e){e[e.LOCKFILE=0]="LOCKFILE",e[e.MANIFEST=1]="MANIFEST",e[e.NONE=2]="NONE"}(V||(V={}));class X{constructor(e){this.projectCwd=null,this.plugins=new Map,this.settings=new Map,this.values=new Map,this.sources=new Map,this.invalid=new Map,this.packageExtensions=new Map,this.startingCwd=e}static create(e,t,r){const n=new X(e);void 0===t||t instanceof Map||(n.projectCwd=t),n.importSettings(J);const i=void 0!==r?r:t instanceof Map?t:new Map;for(const[e,t]of i)n.activatePlugin(e,t);return n}static async find(e,t,{lookup:r=V.LOCKFILE,strict:n=!0,usePath:s=!1,useRc:A=!0}={}){const c=function(){const e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith("yarn_")&&(t=a()(t.slice("yarn_".length)),e[t]=r);return e}();delete c.rcFilename;const u=await X.findRcFiles(e),l=await X.findHomeRcFile(),g=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:n})=>({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:n}),f=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:n,...i})=>i,p=new X(e);p.importSettings(g(J)),p.useWithSource("",g(c),e,{strict:!1});for(const{path:e,cwd:t,data:r}of u)p.useWithSource(e,g(r),t,{strict:!1});if(l&&p.useWithSource(l.path,g(l.data),l.cwd,{strict:!1}),s){const e=p.get("yarnPath"),t=p.get("ignorePath");if(null!==e&&!t)return p}const d=p.get("lockfileFilename");let C;switch(r){case V.LOCKFILE:C=await X.findProjectCwd(e,d);break;case V.MANIFEST:C=await X.findProjectCwd(e,null);break;case V.NONE:C=o.xfs.existsSync(i.y1.join(e,"package.json"))?i.y1.resolve(e):null}p.startingCwd=e,p.projectCwd=C,p.importSettings(f(J));const I=new Map([["@@core",E]]);if(null!==t){for(const e of t.plugins.keys())I.set(e,(m=t.modules.get(e)).__esModule?m.default:m);const r=new Map;for(const e of new Set(M().builtinModules||Object.keys(process.binding("natives"))))r.set(e,()=>N(e));for(const[e,n]of t.modules)r.set(e,()=>n);const n=new Set,o=e=>e.default||e,s=(e,t)=>{const{factory:s,name:A}=N(i.cS.fromPortablePath(e));if(n.has(A))return;const a=new Map(r),c=e=>{if(a.has(e))return a.get(e)();throw new h.UsageError(`This plugin cannot access the package referenced via ${e} which is neither a builtin, nor an exposed entry`)},u=x.prettifySyncErrors(()=>o(s(c)),e=>`${e} (when initializing ${A}, defined in ${t})`);r.set(A,()=>u),n.add(A),I.set(A,u)};if(c.plugins)for(const t of c.plugins.split(";")){s(i.y1.resolve(e,i.cS.toPortablePath(t)),"")}for(const{path:e,cwd:t,data:r}of u)if(A&&Array.isArray(r.plugins))for(const n of r.plugins){const r="string"!=typeof n?n.path:n;s(i.y1.resolve(t,i.cS.toPortablePath(r)),e)}}var m;for(const[e,t]of I)p.activatePlugin(e,t);p.useWithSource("",f(c),e,{strict:n});for(const{path:e,cwd:t,data:r}of u)p.useWithSource(e,f(r),t,{strict:n});return l&&p.useWithSource(l.path,f(l.data),l.cwd,{strict:n}),p.get("enableGlobalCache")&&(p.values.set("cacheFolder",p.get("globalFolder")+"/cache"),p.sources.set("cacheFolder","")),await p.refreshPackageExtensions(),p}static async findRcFiles(e){const t=W(),r=[];let n=e,A=null;for(;n!==A;){A=n;const e=i.y1.join(A,t);if(o.xfs.existsSync(e)){const t=await o.xfs.readFilePromise(e,"utf8");let n;try{n=(0,s.parseSyml)(t)}catch(r){let n="";throw t.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(n=" (in particular, make sure you list the colons after each key name)"),new h.UsageError(`Parse error when loading ${e}; please check it's proper Yaml${n}`)}r.push({path:e,cwd:A,data:n})}n=i.y1.dirname(A)}return r}static async findHomeRcFile(){const e=W(),t=k.getHomeFolder(),r=i.y1.join(t,e);if(o.xfs.existsSync(r)){const e=await o.xfs.readFilePromise(r,"utf8");return{path:r,cwd:t,data:(0,s.parseSyml)(e)}}return null}static async findProjectCwd(e,t){let r=null,n=e,s=null;for(;n!==s;){if(s=n,o.xfs.existsSync(i.y1.join(s,(0,i.Zu)("package.json")))&&(r=s),null!==t){if(o.xfs.existsSync(i.y1.join(s,t))){r=s;break}}else if(null!==r)break;n=i.y1.dirname(s)}return r}static async updateConfiguration(e,t){const r=W(),n=i.y1.join(e,r),A=o.xfs.existsSync(n)?(0,s.parseSyml)(await o.xfs.readFilePromise(n,"utf8")):{};let a=!1;if("function"==typeof t&&(t=t(A)),"function"==typeof t)throw new Error("Assertion failed: Invalid configuration type");for(const e of Object.keys(t)){const r=A[e],n="function"==typeof t[e]?t[e](r):t[e];r!==n&&(A[e]=n,a=!0)}a&&await o.xfs.changeFilePromise(n,(0,s.stringifySyml)(A),{automaticNewlines:!0})}static async updateHomeConfiguration(e){const t=k.getHomeFolder();return await X.updateConfiguration(t,e)}activatePlugin(e,t){this.plugins.set(e,t),void 0!==t.configuration&&this.importSettings(t.configuration)}importSettings(e){for(const[t,r]of Object.entries(e)){if(this.settings.has(t))throw new Error(`Cannot redefine settings "${t}"`);this.settings.set(t,r),this.values.set(t,q(this,r))}}useWithSource(e,t,r,{strict:n=!0,overwrite:i=!1}){try{this.use(e,t,r,{strict:n,overwrite:i})}catch(t){throw t.message+=` (in ${e})`,t}}use(e,t,r,{strict:n=!0,overwrite:i=!1}){for(const o of Object.keys(t)){if(void 0===t[o])continue;if("plugins"===o)continue;if(""===e&&P.has(o))continue;if("rcFilename"===o)throw new h.UsageError(`The rcFilename settings can only be set via ${"yarn_RC_FILENAME".toUpperCase()}, not via a rc file`);const s=this.settings.get(o);if(!s){if(n)throw new h.UsageError(`Unrecognized or legacy configuration settings found: ${o} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(o,e);continue}if(this.sources.has(o)&&!i)continue;let A;try{A=H(this,o,t[o],s,r)}catch(t){throw t.message+=" in "+e,t}this.values.set(o,A),this.sources.set(o,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:t=!1,getNativePaths:r=!1}){const n=this.get(e),o=this.settings.get(e);if(void 0===o)throw new h.UsageError(`Couldn't find a configuration settings named "${e}"`);return function e(t,r,n){if(r.type===j.SECRET&&"string"==typeof t&&n.hideSecrets)return"********";if(r.type===j.ABSOLUTE_PATH&&"string"==typeof t&&n.getNativePaths)return i.cS.fromPortablePath(t);if(r.isArray&&Array.isArray(t)){const i=[];for(const o of t)i.push(e(o,r,n));return i}if(r.type===j.MAP&&t instanceof Map){const i=new Map;for(const[o,s]of t.entries())i.set(o,e(s,r.valueDefinition,n));return i}if(r.type===j.SHAPE&&t instanceof Map){const i=new Map;for(const[o,s]of t.entries()){const t=r.properties[o];i.set(o,e(s,t,n))}return i}return t}(n,o,{hideSecrets:t,getNativePaths:r})}getSubprocessStreams(e,{header:t,prefix:r,report:n}){let i,s;const A=o.xfs.createWriteStream(e);if(this.get("enableInlineBuilds")){const e=n.createStreamReporter(`${r} ${this.format("STDOUT","green")}`),t=n.createStreamReporter(`${r} ${this.format("STDERR","red")}`);i=new p.PassThrough,i.pipe(e),i.pipe(A),s=new p.PassThrough,s.pipe(t),s.pipe(A)}else i=A,s=A,void 0!==t&&i.write(t+"\n");return{stdout:i,stderr:s}}makeResolver(){const e=[];for(const t of this.plugins.values())for(const r of t.resolvers||[])e.push(new r);return new w.B([new v,new b.d,new B.O,...e])}makeFetcher(){const e=[];for(const t of this.plugins.values())for(const r of t.fetchers||[])e.push(new r);return new y([new Q.N,new S,...e])}getLinkers(){const e=[];for(const t of this.plugins.values())for(const r of t.linkers||[])e.push(new r);return e}async refreshPackageExtensions(){this.packageExtensions=new Map;const e=this.packageExtensions,t=(t,r)=>{if(!f().validRange(t.range))throw new Error("Only semver ranges are allowed as keys for the lockfileExtensions setting");const n=new I.G;n.load(r),x.getArrayWithDefault(e,t.identHash).push({range:t.range,patch:e=>{e.dependencies=new Map([...e.dependencies,...n.dependencies]),e.peerDependencies=new Map([...e.peerDependencies,...n.peerDependencies]),e.dependenciesMeta=new Map([...e.dependenciesMeta,...n.dependenciesMeta]),e.peerDependenciesMeta=new Map([...e.peerDependenciesMeta,...n.peerDependenciesMeta])}})};for(const[e,r]of this.get("packageExtensions"))t(C.parseDescriptor(e,!0),r);await this.triggerHook(e=>e.registerPackageExtensions,this,t)}normalizePackage(e){const t=C.copyPackage(e);if(null==this.packageExtensions)throw new Error("refreshPackageExtensions has to be called before normalizing packages");const r=this.packageExtensions.get(e.identHash);if(void 0!==r){const n=e.version;if(null!==n){const e=r.find(({range:e})=>R.satisfiesWithPrereleases(n,e));void 0!==e&&e.patch(t)}}return t.dependencies=new Map(x.sortMap(t.dependencies,([,e])=>e.name)),t.peerDependencies=new Map(x.sortMap(t.peerDependencies,([,e])=>e.name)),t}async triggerHook(e,...t){for(const r of this.plugins.values()){const n=r.hooks;if(!n)continue;const i=e(n);i&&await i(...t)}}async triggerMultipleHooks(e,t){for(const r of t)await this.triggerHook(e,...r)}async reduceHook(e,t,...r){let n=t;for(const t of this.plugins.values()){const i=t.hooks;if(!i)continue;const o=e(i);o&&(n=await o(n,...r))}return n}async firstHook(e,...t){for(const r of this.plugins.values()){const n=r.hooks;if(!n)continue;const i=e(n);if(!i)continue;const o=await i(...t);if(void 0!==o)return o}return null}format(e,t){if(t===Y.PATH&&(e=i.cS.fromPortablePath(e)),!this.get("enableColors"))return e;let r=G.get(t);void 0===r&&(r=t);return("number"==typeof r?_.ansi256(r):r.startsWith("#")?_.hex(r):_[r])(e)}}},92409:(e,t,r)=>{"use strict";var n;r.d(t,{k:()=>n}),function(e){e[e.SCRIPT=0]="SCRIPT",e[e.SHELLCODE=1]="SHELLCODE"}(n||(n={}))},62152:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(35691);class i extends n.yG{constructor({configuration:e,stdout:t,suggestInstall:r=!0}){super(),this.errorCount=0,this.configuration=e,this.stdout=t,this.suggestInstall=r}static async start(e,t){const r=new this(e);try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize()}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t){return t()}async startTimerPromise(e,t){return await t()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){this.errorCount+=1,this.stdout.write(`${this.configuration.format("➤","redBright")} ${this.formatName(e)}: ${t}\n`)}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(this.configuration.format("➤","redBright")+" Errors happened when preparing the environment required to run this command.\n"),this.suggestInstall&&this.stdout.write(this.configuration.format("➤","redBright")+' This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.\n'))}formatName(e){return"BR"+e.toString(10).padStart(4,"0")}}},46611:(e,t,r)=>{"use strict";r.d(t,{G:()=>u});var n=r(78420),i=r(46009),o=r(55125),s=r(10966),A=r.n(s),a=r(73632),c=r(54143);class u{constructor(){this.indent=" ",this.name=null,this.version=null,this.os=null,this.cpu=null,this.type=null,this.private=!1,this.license=null,this.main=null,this.module=null,this.languageName=null,this.bin=new Map,this.scripts=new Map,this.dependencies=new Map,this.devDependencies=new Map,this.peerDependencies=new Map,this.workspaceDefinitions=[],this.dependenciesMeta=new Map,this.peerDependenciesMeta=new Map,this.resolutions=[],this.files=null,this.publishConfig=null,this.preferUnplugged=null,this.raw={},this.errors=[]}static async tryFind(e,{baseFs:t=new n.S}={}){const r=i.y1.join(e,(0,i.Zu)("package.json"));return await t.existsPromise(r)?await u.fromFile(r,{baseFs:t}):null}static async find(e,{baseFs:t}={}){const r=await u.tryFind(e,{baseFs:t});if(null===r)throw new Error("Manifest not found");return r}static async fromFile(e,{baseFs:t=new n.S}={}){const r=new u;return await r.loadFile(e,{baseFs:t}),r}static fromText(e){const t=new u;return t.loadFromText(e),t}loadFromText(e){let t;try{t=JSON.parse(h(e)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(t),this.indent=l(e)}async loadFile(e,{baseFs:t=new n.S}){const r=await t.readFilePromise(e,"utf8");let i;try{i=JSON.parse(h(r)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(i),this.indent=l(r)}load(e){if("object"!=typeof e||null===e)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;const t=[];if("string"==typeof e.name)try{this.name=c.parseIdent(e.name)}catch(e){t.push(new Error("Parsing failed for the 'name' field"))}if("string"==typeof e.version&&(this.version=e.version),Array.isArray(e.os)){const r=[];this.os=r;for(const n of e.os)"string"!=typeof n?t.push(new Error("Parsing failed for the 'os' field")):r.push(n)}if(Array.isArray(e.cpu)){const r=[];this.cpu=r;for(const n of e.cpu)"string"!=typeof n?t.push(new Error("Parsing failed for the 'cpu' field")):r.push(n)}if("string"==typeof e.type&&(this.type=e.type),"boolean"==typeof e.private&&(this.private=e.private),"string"==typeof e.license&&(this.license=e.license),"string"==typeof e.languageName&&(this.languageName=e.languageName),"string"==typeof e.bin)null!==this.name?this.bin=new Map([[this.name.name,e.bin]]):t.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.bin&&null!==e.bin)for(const[r,n]of Object.entries(e.bin))"string"==typeof n?this.bin.set(r,n):t.push(new Error(`Invalid bin definition for '${r}'`));if("object"==typeof e.scripts&&null!==e.scripts)for(const[r,n]of Object.entries(e.scripts))"string"==typeof n?this.scripts.set(r,n):t.push(new Error(`Invalid script definition for '${r}'`));if("object"==typeof e.dependencies&&null!==e.dependencies)for(const[r,n]of Object.entries(e.dependencies)){if("string"!=typeof n){t.push(new Error(`Invalid dependency range for '${r}'`));continue}let e;try{e=c.parseIdent(r)}catch(e){t.push(new Error(`Parsing failed for the dependency name '${r}'`));continue}const i=c.makeDescriptor(e,n);this.dependencies.set(i.identHash,i)}if("object"==typeof e.devDependencies&&null!==e.devDependencies)for(const[r,n]of Object.entries(e.devDependencies)){if("string"!=typeof n){t.push(new Error(`Invalid dependency range for '${r}'`));continue}let e;try{e=c.parseIdent(r)}catch(e){t.push(new Error(`Parsing failed for the dependency name '${r}'`));continue}const i=c.makeDescriptor(e,n);this.devDependencies.set(i.identHash,i)}if("object"==typeof e.peerDependencies&&null!==e.peerDependencies)for(let[r,n]of Object.entries(e.peerDependencies)){let e;try{e=c.parseIdent(r)}catch(e){t.push(new Error(`Parsing failed for the dependency name '${r}'`));continue}"string"==typeof n&&A().validRange(n)||(t.push(new Error(`Invalid dependency range for '${r}'`)),n="*");const i=c.makeDescriptor(e,n);this.peerDependencies.set(i.identHash,i)}const r=Array.isArray(e.workspaces)?e.workspaces:"object"==typeof e.workspaces&&null!==e.workspaces&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];for(const e of r)"string"==typeof e?this.workspaceDefinitions.push({pattern:e}):t.push(new Error(`Invalid workspace definition for '${e}'`));if("object"==typeof e.dependenciesMeta&&null!==e.dependenciesMeta)for(const[r,n]of Object.entries(e.dependenciesMeta)){if("object"!=typeof n||null===n){t.push(new Error("Invalid meta field for '"+r));continue}const e=c.parseDescriptor(r),i=this.ensureDependencyMeta(e);Object.assign(i,n)}if("object"==typeof e.peerDependenciesMeta&&null!==e.peerDependenciesMeta)for(const[r,n]of Object.entries(e.peerDependenciesMeta)){if("object"!=typeof n||null===n){t.push(new Error("Invalid meta field for '"+r));continue}const e=c.parseDescriptor(r),i=this.ensurePeerDependencyMeta(e);Object.assign(i,n)}if("object"==typeof e.resolutions&&null!==e.resolutions)for(const[r,n]of Object.entries(e.resolutions))if("string"==typeof n)try{this.resolutions.push({pattern:(0,o.parseResolution)(r),reference:n})}catch(e){t.push(e);continue}else t.push(new Error(`Invalid resolution entry for '${r}'`));if(Array.isArray(e.files)&&0!==e.files.length){this.files=new Set;for(const r of e.files)"string"==typeof r?this.files.add(r):t.push(new Error(`Invalid files entry for '${r}'`))}if("object"==typeof e.publishConfig&&null!==e.publishConfig)if(this.publishConfig={},"string"==typeof e.publishConfig.access&&(this.publishConfig.access=e.publishConfig.access),"string"==typeof e.publishConfig.main&&(this.publishConfig.main=e.publishConfig.main),"string"==typeof e.publishConfig.registry&&(this.publishConfig.registry=e.publishConfig.registry),"string"==typeof e.publishConfig.module&&(this.publishConfig.module=e.publishConfig.module),"string"==typeof e.publishConfig.bin)null!==this.name?this.publishConfig.bin=new Map([[this.name.name,e.publishConfig.bin]]):t.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.publishConfig.bin&&null!==e.publishConfig.bin){this.publishConfig.bin=new Map;for(const[r,n]of Object.entries(e.publishConfig.bin))"string"==typeof n?this.publishConfig.bin.set(r,n):t.push(new Error(`Invalid bin definition for '${r}'`))}if("object"==typeof e.optionalDependencies&&null!==e.optionalDependencies)for(const[r,n]of Object.entries(e.optionalDependencies)){if("string"!=typeof n){t.push(new Error(`Invalid dependency range for '${r}'`));continue}let e;try{e=c.parseIdent(r)}catch(e){t.push(new Error(`Parsing failed for the dependency name '${r}'`));continue}const i=c.makeDescriptor(e,n);this.dependencies.set(i.identHash,i);const o=c.makeDescriptor(e,"unknown"),s=this.ensureDependencyMeta(o);Object.assign(s,{optional:!0})}"boolean"==typeof e.preferUnplugged&&(this.preferUnplugged=e.preferUnplugged),this.errors=t}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!this.dependencies.has(e.identHash)||!!this.peerDependencies.has(e.identHash)}hasHardDependency(e){return!!this.dependencies.has(e.identHash)||!!this.devDependencies.has(e.identHash)}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!this.hasHardDependency(e)||!!this.hasSoftDependency(e)}isCompatibleWithOS(e){return null===this.os||g(this.os,e)}isCompatibleWithCPU(e){return null===this.cpu||g(this.cpu,e)}ensureDependencyMeta(e){if("unknown"!==e.range&&!A().valid(e.range))throw new Error(`Invalid meta field range for '${c.stringifyDescriptor(e)}'`);const t=c.stringifyIdent(e),r="unknown"!==e.range?e.range:null;let n=this.dependenciesMeta.get(t);n||this.dependenciesMeta.set(t,n=new Map);let i=n.get(r);return i||n.set(r,i={}),i}ensurePeerDependencyMeta(e){if("unknown"!==e.range)throw new Error(`Invalid meta field range for '${c.stringifyDescriptor(e)}'`);const t=c.stringifyIdent(e);let r=this.peerDependenciesMeta.get(t);return r||this.peerDependenciesMeta.set(t,r={}),this.peerDependencies.has(e.identHash)||this.peerDependencies.set(e.identHash,c.makeDescriptor(e,"*")),r}setRawField(e,t,{after:r=[]}={}){const n=new Set(r.filter(e=>Object.prototype.hasOwnProperty.call(this.raw,e)));if(0===n.size||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=t;else{const r=this.raw,i=this.raw={};let o=!1;for(const s of Object.keys(r))i[s]=r[s],o||(n.delete(s),0===n.size&&(i[e]=t,o=!0))}}exportTo(e,{compatibilityMode:t=!0}={}){Object.assign(e,this.raw),null!==this.name?e.name=c.stringifyIdent(this.name):delete e.name,null!==this.version?e.version=this.version:delete e.version,null!==this.os?e.os=this.os:delete this.os,null!==this.cpu?e.cpu=this.cpu:delete this.cpu,null!==this.type?e.type=this.type:delete e.type,this.private?e.private=!0:delete e.private,null!==this.license?e.license=this.license:delete e.license,null!==this.languageName?e.languageName=this.languageName:delete e.languageName,1===this.bin.size&&null!==this.name&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(e=>({[e]:this.bin.get(e)}))):delete e.bin;const r=[],n=[];for(const e of this.dependencies.values()){const i=this.dependenciesMeta.get(c.stringifyIdent(e));let o=!1;if(t&&i){const e=i.get(null);e&&e.optional&&(o=!0)}o?n.push(e):r.push(e)}r.length>0?e.dependencies=Object.assign({},...c.sortDescriptors(r).map(e=>({[c.stringifyIdent(e)]:e.range}))):delete e.dependencies,n.length>0?e.optionalDependencies=Object.assign({},...c.sortDescriptors(n).map(e=>({[c.stringifyIdent(e)]:e.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...c.sortDescriptors(this.devDependencies.values()).map(e=>({[c.stringifyIdent(e)]:e.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...c.sortDescriptors(this.peerDependencies.values()).map(e=>({[c.stringifyIdent(e)]:e.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(const[r,n]of a.sortMap(this.dependenciesMeta.entries(),([e,t])=>e))for(const[i,o]of a.sortMap(n.entries(),([e,t])=>null!==e?"0"+e:"1")){const n=null!==i?c.stringifyDescriptor(c.makeDescriptor(c.parseIdent(r),i)):r,s={...o};t&&null===i&&delete s.optional,0!==Object.keys(s).length&&(e.dependenciesMeta[n]=s)}return 0===Object.keys(e.dependenciesMeta).length&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...a.sortMap(this.peerDependenciesMeta.entries(),([e,t])=>e).map(([e,t])=>({[e]:t}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:e,reference:t})=>({[(0,o.stringifyResolution)(e)]:t}))):delete e.resolutions,null!==this.files?e.files=Array.from(this.files):delete e.files,null!==this.preferUnplugged?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,e}}function l(e){const t=e.match(/^[ \t]+/m);return t?t[0]:" "}function h(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function g(e,t){let r=!0,n=!1;for(const i of e)if("!"===i[0]){if(n=!0,t===i.slice(1))return!1}else if(r=!1,i===t)return!0;return n&&r}u.fileName="package.json",u.allDependencies=["dependencies","devDependencies","peerDependencies"],u.hardDependencies=["dependencies","devDependencies"]},92659:(e,t,r)=>{"use strict";var n;r.d(t,{b:()=>n}),function(e){e[e.UNNAMED=0]="UNNAMED",e[e.EXCEPTION=1]="EXCEPTION",e[e.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",e[e.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",e[e.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",e[e.BUILD_DISABLED=5]="BUILD_DISABLED",e[e.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",e[e.MUST_BUILD=7]="MUST_BUILD",e[e.MUST_REBUILD=8]="MUST_REBUILD",e[e.BUILD_FAILED=9]="BUILD_FAILED",e[e.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",e[e.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",e[e.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",e[e.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",e[e.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",e[e.REMOTE_INVALID=15]="REMOTE_INVALID",e[e.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",e[e.RESOLUTION_PACK=17]="RESOLUTION_PACK",e[e.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",e[e.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",e[e.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",e[e.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",e[e.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",e[e.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",e[e.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",e[e.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",e[e.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",e[e.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",e[e.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",e[e.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",e[e.FETCH_FAILED=30]="FETCH_FAILED",e[e.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",e[e.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",e[e.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",e[e.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",e[e.NETWORK_ERROR=35]="NETWORK_ERROR",e[e.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",e[e.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",e[e.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",e[e.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",e[e.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",e[e.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",e[e.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",e[e.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",e[e.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",e[e.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",e[e.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",e[e.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",e[e.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",e[e.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",e[e.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",e[e.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",e[e.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",e[e.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",e[e.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",e[e.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",e[e.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",e[e.INVALID_MANIFEST=57]="INVALID_MANIFEST",e[e.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",e[e.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",e[e.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",e[e.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",e[e.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",e[e.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU"}(n||(n={}))},27092:(e,t,r)=>{"use strict";r.d(t,{B:()=>i});var n=r(54143);class i{constructor(e){this.resolvers=e.filter(e=>e)}supportsDescriptor(e,t){return!!this.tryResolverByDescriptor(e,t)}supportsLocator(e,t){return!!this.tryResolverByLocator(e,t)}shouldPersistResolution(e,t){return this.getResolverByLocator(e,t).shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.getResolverByDescriptor(e,r).bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.getResolverByDescriptor(e,t).getResolutionDependencies(e,t)}async getCandidates(e,t,r){const n=this.getResolverByDescriptor(e,r);return await n.getCandidates(e,t,r)}async resolve(e,t){const r=this.getResolverByLocator(e,t);return await r.resolve(e,t)}tryResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));return r||null}getResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));if(!r)throw new Error(n.prettyDescriptor(t.project.configuration,e)+" isn't supported by any available resolver");return r}tryResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));return r||null}getResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));if(!r)throw new Error(n.prettyLocator(t.project.configuration,e)+" isn't supported by any available resolver");return r}}},40376:(e,t,r)=>{"use strict";r.d(t,{I:()=>ne});var n=r(56537),i=r(46009),o=r(35398),s=r(55125),A=r(17278),a=r(76417);function c(){}function u(e,t,r,n,i){for(var o=0,s=t.length,A=0,a=0;oe.length?r:e})),c.value=e.join(l)}else c.value=e.join(r.slice(A,A+c.count));A+=c.count,c.added||(a+=c.count)}}var h=t[s-1];return s>1&&"string"==typeof h.value&&(h.added||h.removed)&&e.equals("",h.value)&&(t[s-2].value+=h.value,t.pop()),t}function l(e){return{newPos:e.newPos,components:e.components.slice(0)}}c.prototype={diff:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.callback;"function"==typeof r&&(n=r,r={}),this.options=r;var i=this;function o(e){return n?(setTimeout((function(){n(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,A=e.length,a=1,c=s+A,h=[{newPos:-1,components:[]}],g=this.extractCommon(h[0],t,e,0);if(h[0].newPos+1>=s&&g+1>=A)return o([{value:this.join(t),count:t.length}]);function f(){for(var r=-1*a;r<=a;r+=2){var n=void 0,c=h[r-1],g=h[r+1],f=(g?g.newPos:0)-r;c&&(h[r-1]=void 0);var p=c&&c.newPos+1=s&&f+1>=A)return o(u(i,n.components,t,e,i.useLongestToken));h[r]=n}else h[r]=void 0}a++}if(n)!function e(){setTimeout((function(){if(a>c)return n();f()||e()}),0)}();else for(;a<=c;){var p=f();if(p)return p}},pushComponent:function(e,t,r){var n=e[e.length-1];n&&n.added===t&&n.removed===r?e[e.length-1]={count:n.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,n){for(var i=t.length,o=r.length,s=e.newPos,A=s-n,a=0;s+10?a(p.lines.slice(-s.context)):[],u-=h.length,l-=h.length)}(o=h).push.apply(o,I(i.map((function(e){return(t.added?"+":"-")+e})))),t.added?f+=i.length:g+=i.length}else{if(u)if(i.length<=2*s.context&&e=A.length-2&&i.length<=s.context){var y=/\n$/.test(r),w=/\n$/.test(n),B=0==i.length&&h.length>m.oldLines;!y&&B&&h.splice(m.oldLines,0,"\\ No newline at end of file"),(y||B)&&w||h.push("\\ No newline at end of file")}c.push(m),u=0,l=0,h=[]}g+=i.length,f+=i.length}},C=0;C`${r}#commit:${n}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",n,i)=>`https://${r}github.com/${n}.git#commit:${i}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",n,i)=>`https://${r}github.com/${n}.git#commit:${i}`],[/^https?:\/\/[^/]+\/(?:@[^/]+\/)?([^/]+)\/-\/\1-[^/]+\.tgz(?:#|$)/,e=>"npm:"+e],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>"npm:"+e]];class O{constructor(){this.resolutions=null}async setup(e,{report:t}){const r=i.y1.join(e.cwd,e.configuration.get("lockfileFilename"));if(!n.xfs.existsSync(r))return;const o=await n.xfs.readFilePromise(r,"utf8"),A=(0,s.parseSyml)(o);if(Object.prototype.hasOwnProperty.call(A,"__metadata"))return;const a=this.resolutions=new Map;for(const r of Object.keys(A)){let n=_.tryParseDescriptor(r);if(!n){t.reportWarning(T.b.YARN_IMPORT_FAILED,`Failed to parse the string "${r}" into a proper descriptor`);continue}k().validRange(n.range)&&(n=_.makeDescriptor(n,"npm:"+n.range));const{version:i,resolved:o}=A[r];if(!o)continue;let s;for(const[e,t]of P){const r=o.match(e);if(r){s=t(i,...r);break}}if(!s){t.reportWarning(T.b.YARN_IMPORT_FAILED,`${_.prettyDescriptor(e.configuration,n)}: Only some patterns can be imported from legacy lockfiles (not "${o}")`);continue}const c=_.makeLocator(n,s);a.set(n.descriptorHash,c)}}supportsDescriptor(e,t){return!!this.resolutions&&this.resolutions.has(e.descriptorHash)}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");const n=this.resolutions.get(e.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");return[n]}async resolve(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}class U{supportsDescriptor(e,t){return!!t.project.storedResolutions.get(e.descriptorHash)||!!t.project.originalPackages.has(_.convertDescriptorToLocator(e).locatorHash)}supportsLocator(e,t){return!!t.project.originalPackages.has(e.locatorHash)}shouldPersistResolution(e,t){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let n=r.project.originalPackages.get(_.convertDescriptorToLocator(e).locatorHash);if(n)return[n];const i=r.project.storedResolutions.get(e.descriptorHash);if(!i)throw new Error("Expected the resolution to have been successful - resolution not found");if(n=r.project.originalPackages.get(i),!n)throw new Error("Expected the resolution to have been successful - package not found");return[n]}async resolve(e,t){const r=t.project.originalPackages.get(e.locatorHash);if(!r)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return r}}var j=r(46611),Y=r(27092),G=r(35691);class J{constructor(e){this.resolver=e}supportsDescriptor(e,t){return this.resolver.supportsDescriptor(e,t)}supportsLocator(e,t){return this.resolver.supportsLocator(e,t)}shouldPersistResolution(e,t){return this.resolver.shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.resolver.bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.resolver.getResolutionDependencies(e,t)}async getCandidates(e,t,r){throw new G.lk(T.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}async resolve(e,t){throw new G.lk(T.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}}var H=r(33720),z=r(17722),q=r(81111),W=r(20624),V=r(73632),X=r(63088),Z=r(36545),$=r(32485);const ee=/ *, */g,te=(0,x.promisify)(R().gzip),re=(0,x.promisify)(R().gunzip);class ne{constructor(e,{configuration:t}){this.resolutionAliases=new Map,this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map,this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.storedChecksums=new Map,this.accessibleLocators=new Set,this.originalPackages=new Map,this.optionalBuilds=new Set,this.lockFileChecksum=null,this.configuration=t,this.cwd=e}static async find(e,t){if(!e.projectCwd)throw new A.UsageError("No project found in "+t);let r=e.projectCwd,o=t,s=null;for(;s!==e.projectCwd;){if(s=o,n.xfs.existsSync(i.y1.join(s,(0,i.Zu)("package.json")))){r=s;break}o=i.y1.dirname(s)}const a=new ne(e.projectCwd,{configuration:e});await a.setupResolutions(),await a.setupWorkspaces();const c=a.tryWorkspaceByCwd(r);if(c)return{project:a,workspace:c,locator:c.anchoredLocator};const u=await a.findLocatorForLocation(r+"/");if(u)return{project:a,locator:u,workspace:null};throw new A.UsageError(`The nearest package directory (${r}) doesn't seem to be part of the project declared at ${a.cwd}. If the project directory is right, it might be that you forgot to list a workspace. If it isn't, it's likely because you have a yarn.lock file at the detected location, confusing the project detection.`)}static generateBuildStateFile(e,t){let r="# Warning: This file is automatically generated. Removing it is fine, but will\n# cause all your builds to become invalidated.\n";const n=[...e].map(([e,r])=>{const n=t.get(e);if(void 0===n)throw new Error("Assertion failed: The locator should have been registered");return[_.stringifyLocator(n),n.locatorHash,r]});for(const[e,t,i]of V.sortMap(n,[e=>e[0],e=>e[1]]))r+="\n",r+=`# ${e}\n`,r+=JSON.stringify(t)+":\n",r+=` ${i}\n`;return r}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;const e=i.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.configuration.get("defaultLanguageName");if(n.xfs.existsSync(e)){const r=await n.xfs.readFilePromise(e,"utf8");this.lockFileChecksum=W.makeHash("1",r);const i=(0,s.parseSyml)(r);if(i.__metadata){const e=i.__metadata.version,r=i.__metadata.cacheKey;for(const n of Object.keys(i)){if("__metadata"===n)continue;const o=i[n];if(void 0===o.resolution)throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${n})`);const s=_.parseLocator(o.resolution,!0),A=new j.G;A.load(o);const a=A.version,c=A.languageName||t,u=o.linkType.toUpperCase(),l=A.dependencies,h=A.peerDependencies,g=A.dependenciesMeta,f=A.peerDependenciesMeta,p=A.bin;if(null!=o.checksum){const e=void 0===r||o.checksum.includes("/")?o.checksum:`${r}/${o.checksum}`;this.storedChecksums.set(s.locatorHash,e)}if(e>=4){const e={...s,version:a,languageName:c,linkType:u,dependencies:l,peerDependencies:h,dependenciesMeta:g,peerDependenciesMeta:f,bin:p};this.originalPackages.set(e.locatorHash,e)}for(const t of n.split(ee)){const r=_.parseDescriptor(t);if(this.storedDescriptors.set(r.descriptorHash,r),e>=4)this.storedResolutions.set(r.descriptorHash,s.locatorHash);else{const e=_.convertLocatorToDescriptor(s);e.descriptorHash!==r.descriptorHash&&(this.storedDescriptors.set(e.descriptorHash,e),this.resolutionAliases.set(r.descriptorHash,e.descriptorHash))}}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){const t=e;e=[];for(const r of t){if(this.workspacesByCwd.has(r))continue;const t=await this.addWorkspace(r),n=this.storedPackages.get(t.anchoredLocator.locatorHash);n&&(t.dependencies=n.dependencies);for(const r of t.workspacesCwds)e.push(r)}}}async addWorkspace(e){const t=new z.j(e,{project:this});await t.setup();const r=this.workspacesByIdent.get(t.locator.identHash);if(void 0!==r)throw new Error(`Duplicate workspace name ${_.prettyIdent(this.configuration,t.locator)}: ${e} conflicts with ${r.cwd}`);return this.workspaces.push(t),this.workspacesByCwd.set(e,t),this.workspacesByIdent.set(t.locator.identHash,t),t}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){i.y1.isAbsolute(e)||(e=i.y1.resolve(this.cwd,e));const t=this.workspacesByCwd.get(e);return t||null}getWorkspaceByCwd(e){const t=this.tryWorkspaceByCwd(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByFilePath(e){let t=null;for(const r of this.workspaces){i.y1.relative(r.cwd,e).startsWith("../")||(t&&t.cwd.length>=r.cwd.length||(t=r))}return t||null}getWorkspaceByFilePath(e){const t=this.tryWorkspaceByFilePath(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByIdent(e){const t=this.workspacesByIdent.get(e.identHash);return void 0===t?null:t}getWorkspaceByIdent(e){const t=this.tryWorkspaceByIdent(e);if(!t)throw new Error(`Workspace not found (${_.prettyIdent(this.configuration,e)})`);return t}tryWorkspaceByDescriptor(e){const t=this.tryWorkspaceByIdent(e);return null!==t&&t.accepts(e.range)?t:null}getWorkspaceByDescriptor(e){const t=this.tryWorkspaceByDescriptor(e);if(null===t)throw new Error(`Workspace not found (${_.prettyDescriptor(this.configuration,e)})`);return t}tryWorkspaceByLocator(e){_.isVirtualLocator(e)&&(e=_.devirtualizeLocator(e));const t=this.tryWorkspaceByIdent(e);return null===t||t.locator.locatorHash!==e.locatorHash&&t.anchoredLocator.locatorHash!==e.locatorHash?null:t}getWorkspaceByLocator(e){const t=this.tryWorkspaceByLocator(e);if(!t)throw new Error(`Workspace not found (${_.prettyLocator(this.configuration,e)})`);return t}refreshWorkspaceDependencies(){for(const e of this.workspaces){const t=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!t)throw new Error("Assertion failed: Expected workspace to have been resolved");e.dependencies=new Map(t.dependencies)}}forgetResolution(e){for(const[t,r]of this.storedResolutions){const n="descriptorHash"in e&&e.descriptorHash===t,i="locatorHash"in e&&e.locatorHash===r;(n||i)&&(this.storedDescriptors.delete(t),this.storedResolutions.delete(t),this.originalPackages.delete(r))}}forgetTransientResolutions(){const e=this.configuration.makeResolver();for(const t of this.originalPackages.values()){let r;try{r=e.shouldPersistResolution(t,{project:this,resolver:e})}catch(e){r=!1}r||this.forgetResolution(t)}}forgetVirtualResolutions(){for(const e of this.storedPackages.values())for(const[t,r]of e.dependencies)_.isVirtualDescriptor(r)&&e.dependencies.set(t,_.devirtualizeDescriptor(r))}getDependencyMeta(e,t){const r={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(_.stringifyIdent(e));if(!n)return r;const i=n.get(null);if(i&&Object.assign(r,i),null===t||!k().valid(t))return r;for(const[e,i]of n)null!==e&&e===t&&Object.assign(r,i);return r}async findLocatorForLocation(e){const t=new H.$,r=this.configuration.getLinkers(),n={project:this,report:t};for(const t of r){const r=await t.findPackageLocator(e,n);if(r)return r}return null}async validateEverything(e){for(const t of e.validationWarnings)e.report.reportWarning(t.name,t.text);for(const t of e.validationErrors)e.report.reportError(t.name,t.text)}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions(),e.lockfileOnly||this.forgetTransientResolutions();const t=e.resolver||this.configuration.makeResolver(),r=new O;await r.setup(this,{report:e.report});const o=e.lockfileOnly?new Y.B([new U,new J(t)]):new Y.B([new U,r,t]),s=this.configuration.makeFetcher(),A=e.lockfileOnly?{project:this,report:e.report,resolver:o}:{project:this,report:e.report,resolver:o,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:s}},a=new Map,c=new Map,u=new Map,l=new Map,h=new Map,g=new Set;let f=new Set;for(const e of this.workspaces){const t=e.anchoredDescriptor;a.set(t.descriptorHash,t),f.add(t.descriptorHash)}const p=b()(10);for(;0!==f.size;){const e=f;f=new Set;for(const t of e)u.has(t)&&e.delete(t);if(0===e.size)break;const t=new Set,r=new Map;for(const n of e){const i=a.get(n);if(!i)throw new Error("Assertion failed: The descriptor should have been registered");let s=h.get(n);if(void 0===s){h.set(n,s=new Set);for(const e of o.getResolutionDependencies(i,A))a.set(e.descriptorHash,e),s.add(e.descriptorHash)}const l=V.getMapWithDefault(r,n);for(const r of s){const i=u.get(r);if(void 0!==i){const e=c.get(i);if(void 0===e)throw new Error("Assertion failed: The package should have been registered");l.set(r,e)}else t.add(n),e.add(r)}}for(const r of t)e.delete(r),f.add(r);if(0===e.size)throw new Error("Assertion failed: Descriptors should not have cyclic dependencies");const n=new Map(await Promise.all(Array.from(e).map(e=>p(async()=>{const t=a.get(e);if(void 0===t)throw new Error("Assertion failed: The descriptor should have been registered");const n=r.get(t.descriptorHash);if(void 0===n)throw new Error("Assertion failed: The descriptor dependencies should have been registered");let i;try{i=await o.getCandidates(t,n,A)}catch(e){throw e.message=`${_.prettyDescriptor(this.configuration,t)}: ${e.message}`,e}if(0===i.length)throw new Error("No candidate found for "+_.prettyDescriptor(this.configuration,t));return[t.descriptorHash,i]})))),i=new Map;for(const[e,t]of n)1===t.length&&(i.set(e,t[0]),n.delete(e));for(const[e,t]of n){const r=t.find(e=>c.has(e.locatorHash));r&&(i.set(e,r),n.delete(e))}if(n.size>0){const e=new(v().Solver);for(const t of n.values())e.require(v().or(...t.map(e=>e.locatorHash)));let t,r=100,o=null,s=1/0;for(;r>0&&null!==(t=e.solve());){const n=t.getTrueVars();e.forbid(t.getFormula()),n.lengthA.has(e.locatorHash));if(!r)throw new Error("Assertion failed: The descriptor should have been solved during the previous step");i.set(e,r),n.delete(e)}}const s=Array.from(i.values()).filter(e=>!c.has(e.locatorHash)),d=new Map(await Promise.all(s.map(async e=>{const t=await V.prettifyAsyncErrors(async()=>await o.resolve(e,A),t=>`${_.prettyLocator(this.configuration,e)}: ${t}`);if(!_.areLocatorsEqual(e,t))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${_.prettyLocator(this.configuration,e)} to ${_.prettyLocator(this.configuration,t)})`);const r=this.configuration.normalizePackage(t);for(const[t,n]of r.dependencies){const i=await this.configuration.reduceHook(e=>e.reduceDependency,n,this,r,n,{resolver:o,resolveOptions:A});if(!_.areIdentsEqual(n,i))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");const s=o.bindDescriptor(i,e,A);r.dependencies.set(t,s)}return[r.locatorHash,{original:t,pkg:r}]})));for(const t of e){const e=i.get(t);if(!e)throw new Error("Assertion failed: The locator should have been registered");u.set(t,e.locatorHash);const r=d.get(e.locatorHash);if(void 0===r)continue;const{original:n,pkg:o}=r;l.set(n.locatorHash,n),c.set(o.locatorHash,o);for(const e of o.dependencies.values()){a.set(e.descriptorHash,e),f.add(e.descriptorHash);const t=this.resolutionAliases.get(e.descriptorHash);if(void 0===t)continue;if(e.descriptorHash===t)continue;const r=this.storedDescriptors.get(t);if(!r)throw new Error("Assertion failed: The alias should have been registered");u.has(e.descriptorHash)||(u.set(e.descriptorHash,"temporary"),f.delete(e.descriptorHash),f.add(t),a.set(t,r),g.add(e.descriptorHash))}}}for(;g.size>0;){let e=!1;for(const t of g){if(!a.get(t))throw new Error("Assertion failed: The descriptor should have been registered");const r=this.resolutionAliases.get(t);if(void 0===r)throw new Error("Assertion failed: The descriptor should have an alias");const n=u.get(r);if(void 0===n)throw new Error("Assertion failed: The resolution should have been registered");"temporary"!==n&&(g.delete(t),u.set(t,n),e=!0)}if(!e)throw new Error("Alias loop detected")}const d=new Set(this.resolutionAliases.values()),C=new Set(c.keys()),E=new Set;!function({project:e,allDescriptors:t,allResolutions:r,allPackages:o,accessibleLocators:s=new Set,optionalBuilds:A=new Set,volatileDescriptors:a=new Set,report:c,tolerateMissingPackages:u=!1}){const l=new Map,h=[],g=new Map,f=new Map,p=new Map(e.workspaces.map(e=>{const t=e.anchoredLocator.locatorHash,r=o.get(t);if(void 0===r){if(u)return[t,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[t,_.copyPackage(r)]})),d=()=>{const e=n.xfs.mktempSync(),t=i.y1.join(e,"stacktrace.log"),r=String(h.length+1).length,o=h.map((e,t)=>`${(t+1+".").padStart(r," ")} ${_.stringifyLocator(e)}\n`).join("");throw n.xfs.writeFileSync(t,o),new G.lk(T.b.STACK_OVERFLOW_RESOLUTION,"Encountered a stack overflow when resolving peer dependencies; cf "+t)},C=e=>{const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: The resolution should have been registered");const n=o.get(t);if(!n)throw new Error("Assertion failed: The package could not be found");return n},E=(e,t,r)=>{h.length>1e3&&d(),h.push(e);const n=I(e,t,r);return h.pop(),n},I=(n,i,h)=>{if(s.has(n.locatorHash))return;s.add(n.locatorHash),h||A.delete(n.locatorHash);const I=o.get(n.locatorHash);if(!I){if(u)return;throw new Error(`Assertion failed: The package (${_.prettyLocator(e.configuration,n)}) should have been registered`)}const m=[],y=[],w=[],B=[],Q=[];for(const s of Array.from(I.dependencies.values())){if(I.peerDependencies.has(s.identHash)&&!i)continue;if(_.isVirtualDescriptor(s))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");a.delete(s.descriptorHash);let A=h;if(!A){const e=I.dependenciesMeta.get(_.stringifyIdent(s));if(void 0!==e){const t=e.get(null);void 0!==t&&t.optional&&(A=!0)}}const g=r.get(s.descriptorHash);if(!g){if(u)continue;throw new Error(`Assertion failed: The resolution (${_.prettyDescriptor(e.configuration,s)}) should have been registered`)}const v=p.get(g)||o.get(g);if(!v)throw new Error(`Assertion failed: The package (${g}, resolved from ${_.prettyDescriptor(e.configuration,s)}) should have been registered`);if(0===v.peerDependencies.size){E(v,!1,A);continue}const D=l.get(v.locatorHash);let b,S;"number"==typeof D&&D>=2&&d();const k=new Set;y.push(()=>{b=_.virtualizeDescriptor(s,n.locatorHash),S=_.virtualizePackage(v,n.locatorHash),I.dependencies.delete(s.identHash),I.dependencies.set(b.identHash,b),r.set(b.descriptorHash,S.locatorHash),t.set(b.descriptorHash,b),o.set(S.locatorHash,S),m.push([v,b,S])}),w.push(()=>{for(const i of S.peerDependencies.values()){let o=I.dependencies.get(i.identHash);if(!o&&_.areIdentsEqual(n,i)&&(o=_.convertLocatorToDescriptor(n),t.set(o.descriptorHash,o),r.set(o.descriptorHash,n.locatorHash),a.delete(o.descriptorHash)),o||!S.dependencies.has(i.identHash)){if(!o){if(!I.peerDependencies.has(i.identHash)){const t=S.peerDependenciesMeta.get(_.stringifyIdent(i));null===c||t&&t.optional||c.reportWarning(T.b.MISSING_PEER_DEPENDENCY,`${_.prettyLocator(e.configuration,n)} doesn't provide ${_.prettyDescriptor(e.configuration,i)} requested by ${_.prettyLocator(e.configuration,v)}`)}o=_.makeDescriptor(i,"missing:")}if(S.dependencies.set(o.identHash,o),_.isVirtualDescriptor(o)){V.getSetWithDefault(f,o.descriptorHash).add(S.locatorHash)}if("missing:"===o.range)k.add(o.identHash);else if(null!==c){const t=C(o);Z.satisfiesWithPrereleases(t.version,i.range)||c.reportWarning(T.b.INCOMPATIBLE_PEER_DEPENDENCY,`${_.prettyLocator(e.configuration,n)} provides ${_.prettyLocator(e.configuration,t)} with version ${t.version} which doesn't satisfy ${_.prettyRange(e.configuration,i.range)} requested by ${_.prettyLocator(e.configuration,v)}`)}}else S.peerDependencies.delete(i.identHash)}S.dependencies=new Map(V.sortMap(S.dependencies,([e,t])=>_.stringifyIdent(t)))}),B.push(()=>{if(!o.has(S.locatorHash))return;const e=l.get(v.locatorHash),t=void 0!==e?e+1:1;l.set(v.locatorHash,t),E(S,!1,A),l.set(v.locatorHash,t-1)}),Q.push(()=>{if(o.has(S.locatorHash))for(const e of k)S.dependencies.delete(e)})}for(const e of[...y,...w])e();let v;do{v=!0;for(const[n,i,A]of m){if(!o.has(A.locatorHash))continue;const a=V.getMapWithDefault(g,n.locatorHash),c=W.makeHash(...[...A.dependencies.values()].map(t=>{const n="missing:"!==t.range?r.get(t.descriptorHash):"missing:";if(void 0===n)throw new Error(`Assertion failed: Expected the resolution for ${_.prettyDescriptor(e.configuration,t)} to have been registered`);return n})),u=a.get(c);if(void 0===u){a.set(c,i);continue}if(u===i)continue;v=!1,o.delete(A.locatorHash),t.delete(i.descriptorHash),r.delete(i.descriptorHash),s.delete(A.locatorHash);const l=f.get(i.descriptorHash)||[],h=[I.locatorHash,...l];for(const e of h){const t=o.get(e);void 0!==t&&t.dependencies.set(i.identHash,u)}}}while(!v);for(const e of[...B,...Q])e()};for(const t of e.workspaces)a.delete(t.anchoredDescriptor.descriptorHash),E(t.anchoredLocator,!0,!1)}({project:this,report:e.report,accessibleLocators:E,volatileDescriptors:d,optionalBuilds:C,allDescriptors:a,allResolutions:u,allPackages:c});for(const e of d)a.delete(e),u.delete(e);this.storedResolutions=u,this.storedDescriptors=a,this.storedPackages=c,this.accessibleLocators=E,this.originalPackages=l,this.optionalBuilds=C,this.refreshWorkspaceDependencies()}async fetchEverything({cache:e,report:t,fetcher:r}){const n=r||this.configuration.makeFetcher(),i={checksums:this.storedChecksums,project:this,cache:e,fetcher:n,report:t},o=V.sortMap(this.storedResolutions.values(),[e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return _.stringifyLocator(t)}]);let s=!1;const A=G.yG.progressViaCounter(o.length);t.reportProgress(A);const a=b()(32);if(await t.startCacheReport(async()=>{await Promise.all(o.map(e=>a(async()=>{const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The locator should have been registered");if(_.isVirtualLocator(r))return;let o;try{o=await n.fetch(r,i)}catch(e){return e.message=`${_.prettyLocator(this.configuration,r)}: ${e.message}`,t.reportExceptionOnce(e),void(s=e)}o.checksum?this.storedChecksums.set(r.locatorHash,o.checksum):this.storedChecksums.delete(r.locatorHash),o.releaseFs&&o.releaseFs()}).finally(()=>{A.tick()})))}),s)throw s}async linkEverything({cache:e,report:t,fetcher:r}){const o=r||this.configuration.makeFetcher(),A={checksums:this.storedChecksums,project:this,cache:e,fetcher:o,report:t,skipIntegrityCheck:!0},c=this.configuration.getLinkers(),u={project:this,report:t},l=new Map(c.map(e=>[e,e.makeInstaller(u)])),h=new Map,g=new Map,f=new Map;for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");const r=await o.fetch(t,A);if(null!==this.tryWorkspaceByLocator(t)){const e=[],{scripts:n}=await j.G.find(r.prefixPath,{baseFs:r.packageFs});for(const t of["preinstall","install","postinstall"])n.has(t)&&e.push([K.k.SCRIPT,t]);try{for(const e of l.values())await e.installPackage(t,r)}finally{r.releaseFs&&r.releaseFs()}const o=i.y1.join(r.packageFs.getRealPath(),r.prefixPath);g.set(t.locatorHash,o),e.length>0&&f.set(t.locatorHash,{directives:e,buildLocations:[o]})}else{const e=c.find(e=>e.supportsPackage(t,u));if(!e)throw new G.lk(T.b.LINKER_NOT_FOUND,_.prettyLocator(this.configuration,t)+" isn't supported by any available linker");const n=l.get(e);if(!n)throw new Error("Assertion failed: The installer should have been registered");let i;try{i=await n.installPackage(t,r)}finally{r.releaseFs&&r.releaseFs()}h.set(t.locatorHash,e),g.set(t.locatorHash,i.packageLocation),i.buildDirective&&i.packageLocation&&f.set(t.locatorHash,{directives:i.buildDirective,buildLocations:[i.packageLocation]})}}const p=new Map;for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");const r=null!==this.tryWorkspaceByLocator(t),n=async(e,n)=>{const i=g.get(t.locatorHash);if(void 0===i)throw new Error(`Assertion failed: The package (${_.prettyLocator(this.configuration,t)}) should have been registered`);const o=[];for(const n of t.dependencies.values()){const s=this.storedResolutions.get(n.descriptorHash);if(void 0===s)throw new Error(`Assertion failed: The resolution (${_.prettyDescriptor(this.configuration,n)}, from ${_.prettyLocator(this.configuration,t)})should have been registered`);const A=this.storedPackages.get(s);if(void 0===A)throw new Error(`Assertion failed: The package (${s}, resolved from ${_.prettyDescriptor(this.configuration,n)}) should have been registered`);const a=null===this.tryWorkspaceByLocator(A)?h.get(s):null;if(void 0===a)throw new Error(`Assertion failed: The package (${s}, resolved from ${_.prettyDescriptor(this.configuration,n)}) should have been registered`);const c=null===a;if(a===e||r||c)null!==g.get(A.locatorHash)&&o.push([n,A]);else if(null!==i){V.getArrayWithDefault(p,s).push(i)}}null!==i&&await n.attachInternalDependencies(t,o)};if(r)for(const[e,t]of l)await n(e,t);else{const e=h.get(t.locatorHash);if(!e)throw new Error("Assertion failed: The linker should have been found");const r=l.get(e);if(!r)throw new Error("Assertion failed: The installer should have been registered");await n(e,r)}}for(const[e,t]of p){const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The package should have been registered");const n=h.get(r.locatorHash);if(!n)throw new Error("Assertion failed: The linker should have been found");const i=l.get(n);if(!i)throw new Error("Assertion failed: The installer should have been registered");await i.attachExternalDependents(r,t)}for(const e of l.values()){const t=await e.finalizeInstall();if(t)for(const e of t)e.buildDirective&&f.set(e.locatorHash,{directives:e.buildDirective,buildLocations:e.buildLocations})}const d=new Set(this.storedPackages.keys()),C=new Set(f.keys());for(const e of C)d.delete(e);const E=(0,a.createHash)("sha512");E.update(process.versions.node),this.configuration.triggerHook(e=>e.globalHashGeneration,this,e=>{E.update("\0"),E.update(e)});const I=E.digest("hex"),m=new Map,y=e=>{let t=m.get(e.locatorHash);if(void 0!==t)return t;const r=this.storedPackages.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");const n=(0,a.createHash)("sha512");n.update(e.locatorHash),m.set(e.locatorHash,"");for(const e of r.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(void 0===t)throw new Error(`Assertion failed: The resolution (${_.prettyDescriptor(this.configuration,e)}) should have been registered`);if(void 0===this.storedPackages.get(t))throw new Error("Assertion failed: The package should have been registered");n.update(y(r))}return t=n.digest("hex"),m.set(e.locatorHash,t),t},w=(e,t)=>{const r=(0,a.createHash)("sha512");r.update(I),r.update(y(e));for(const e of t)r.update(e);return r.digest("hex")},B=this.configuration.get("bstatePath"),Q=n.xfs.existsSync(B)?(0,s.parseSyml)(await n.xfs.readFilePromise(B,"utf8")):{},v=new Map;for(;C.size>0;){const e=C.size,r=[];for(const e of C){const o=this.storedPackages.get(e);if(!o)throw new Error("Assertion failed: The package should have been registered");let s=!0;for(const e of o.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(!t)throw new Error(`Assertion failed: The resolution (${_.prettyDescriptor(this.configuration,e)}) should have been registered`);if(C.has(t)){s=!1;break}}if(!s)continue;C.delete(e);const A=f.get(o.locatorHash);if(!A)throw new Error("Assertion failed: The build directive should have been registered");const a=w(o,A.buildLocations);if(Object.prototype.hasOwnProperty.call(Q,o.locatorHash)&&Q[o.locatorHash]===a)v.set(o.locatorHash,a);else{Object.prototype.hasOwnProperty.call(Q,o.locatorHash)?t.reportInfo(T.b.MUST_REBUILD,_.prettyLocator(this.configuration,o)+" must be rebuilt because its dependency tree changed"):t.reportInfo(T.b.MUST_BUILD,_.prettyLocator(this.configuration,o)+" must be built because it never did before or the last one failed");for(const e of A.buildLocations){if(!i.y1.isAbsolute(e))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${e})`);r.push((async()=>{for(const[r,s]of A.directives){let A=`# This file contains the result of Yarn building a package (${_.stringifyLocator(o)})\n`;switch(r){case K.k.SCRIPT:A+=`# Script name: ${s}\n`;break;case K.k.SHELLCODE:A+=`# Script code: ${s}\n`}const c=null;await n.xfs.mktempPromise(async u=>{const l=i.y1.join(u,"build.log"),{stdout:h,stderr:g}=this.configuration.getSubprocessStreams(l,{header:A,prefix:_.prettyLocator(this.configuration,o),report:t});let f;try{switch(r){case K.k.SCRIPT:f=await X.executePackageScript(o,s,[],{cwd:e,project:this,stdin:c,stdout:h,stderr:g});break;case K.k.SHELLCODE:f=await X.executePackageShellcode(o,s,[],{cwd:e,project:this,stdin:c,stdout:h,stderr:g})}}catch(e){g.write(e.stack),f=1}if(h.end(),g.end(),0===f)return v.set(o.locatorHash,a),!0;n.xfs.detachTemp(u);const p=`${_.prettyLocator(this.configuration,o)} couldn't be built successfully (exit code ${this.configuration.format(String(f),L.a5.NUMBER)}, logs can be found here: ${this.configuration.format(l,L.a5.PATH)})`;return t.reportInfo(T.b.BUILD_FAILED,p),this.optionalBuilds.has(o.locatorHash)?(v.set(o.locatorHash,a),!0):(t.reportError(T.b.BUILD_FAILED,p),!1)})}})())}}}if(await Promise.all(r),e===C.size){const e=Array.from(C).map(e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The package should have been registered");return _.prettyLocator(this.configuration,t)}).join(", ");t.reportError(T.b.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${e})`);break}}if(v.size>0){const e=this.configuration.get("bstatePath"),t=ne.generateBuildStateFile(v,this.storedPackages);await n.xfs.mkdirpPromise(i.y1.dirname(e)),await n.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}else await n.xfs.removePromise(B)}async install(e){const t=[],r=[];await this.configuration.triggerHook(e=>e.validateProject,this,{reportWarning:(e,r)=>t.push({name:e,text:r}),reportError:(e,t)=>r.push({name:e,text:t})});t.length+r.length>0&&await e.report.startTimerPromise("Validation step",async()=>{await this.validateEverything({validationWarnings:t,validationErrors:r,report:e.report})}),await e.report.startTimerPromise("Resolution step",async()=>{const t=i.y1.join(this.cwd,this.configuration.get("lockfileFilename"));let r=null;if(e.immutable)try{r=await n.xfs.readFilePromise(t,"utf8")}catch(e){throw"ENOENT"===e.code?new G.lk(T.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):e}if(await this.resolveEverything(e),null!==r){const n=(0,o.qH)(r,this.generateLockfile());if(n!==r){const i=B(t,t,r,n);e.report.reportSeparator();for(const t of i.hunks){e.report.reportInfo(null,`@@ -${t.oldStart},${t.oldLines} +${t.newStart},${t.newLines} @@`);for(const r of t.lines)r.startsWith("+")?e.report.reportError(T.b.FROZEN_LOCKFILE_EXCEPTION,this.configuration.format(r,L.a5.ADDED)):r.startsWith("-")?e.report.reportError(T.b.FROZEN_LOCKFILE_EXCEPTION,this.configuration.format(r,L.a5.REMOVED)):e.report.reportInfo(null,this.configuration.format(r,"grey"))}throw e.report.reportSeparator(),new G.lk(T.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}}),await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(void 0===e.persistProject||e.persistProject)&&await this.cacheCleanup(e)}),(void 0===e.persistProject||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{await this.linkEverything(e)}),await this.configuration.triggerHook(e=>e.afterAllInstalled,this)}generateLockfile(){const e=new Map;for(const[t,r]of this.storedResolutions.entries()){let n=e.get(r);n||e.set(r,n=new Set),n.add(t)}const t={__metadata:{version:4}};for(const[r,n]of e.entries()){const e=this.originalPackages.get(r);if(!e)continue;const i=[];for(const e of n){const t=this.storedDescriptors.get(e);if(!t)throw new Error("Assertion failed: The descriptor should have been registered");i.push(t)}const o=i.map(e=>_.stringifyDescriptor(e)).sort().join(", "),s=new j.G;let A;s.version=e.linkType===$.U.HARD?e.version:"0.0.0-use.local",s.languageName=e.languageName,s.dependencies=new Map(e.dependencies),s.peerDependencies=new Map(e.peerDependencies),s.dependenciesMeta=new Map(e.dependenciesMeta),s.peerDependenciesMeta=new Map(e.peerDependenciesMeta),s.bin=new Map(e.bin);const a=this.storedChecksums.get(e.locatorHash);if(void 0!==a){const e=a.indexOf("/");if(-1===e)throw new Error("Assertion failed: Expecte the checksum to reference its cache key");const r=a.slice(0,e),n=a.slice(e+1);void 0===t.__metadata.cacheKey&&(t.__metadata.cacheKey=r),A=r===t.__metadata.cacheKey?n:a}t[o]={...s.exportTo({},{compatibilityMode:!1}),linkType:e.linkType.toLowerCase(),resolution:_.stringifyLocator(e),checksum:A}}return['# This file is generated by running "yarn install" inside your project.\n',"# Manual changes might be lost - proceed with caution!\n"].join("")+"\n"+(0,s.stringifySyml)(t)}async persistLockfile(){const e=i.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.generateLockfile();await n.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}async persistInstallStateFile(){const{accessibleLocators:e,optionalBuilds:t,storedDescriptors:r,storedResolutions:o,storedPackages:s,lockFileChecksum:A}=this,a={accessibleLocators:e,optionalBuilds:t,storedDescriptors:r,storedResolutions:o,storedPackages:s,lockFileChecksum:A},c=await te(M().serialize(a)),u=this.configuration.get("installStatePath");await n.xfs.mkdirpPromise(i.y1.dirname(u)),await n.xfs.writeFilePromise(u,c)}async restoreInstallState(){const e=this.configuration.get("installStatePath");if(!n.xfs.existsSync(e))return void await this.applyLightResolution();const t=await n.xfs.readFilePromise(e),r=M().deserialize(await re(t));r.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,r),this.refreshWorkspaceDependencies()):await this.applyLightResolution()}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new H.$}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile(),await this.persistInstallStateFile();for(const e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:t}){const r=new Set([".gitignore"]);if(n.xfs.existsSync(e.cwd)&&(0,q.isFolderInside)(e.cwd,this.cwd)){for(const o of await n.xfs.readdirPromise(e.cwd)){if(r.has(o))continue;const s=i.y1.resolve(e.cwd,o);e.markedFiles.has(s)||(e.immutable?t.reportError(T.b.IMMUTABLE_CACHE,this.configuration.format(i.y1.basename(s),"magenta")+" appears to be unused and would marked for deletion, but the cache is immutable"):(t.reportInfo(T.b.UNUSED_CACHE_ENTRY,this.configuration.format(i.y1.basename(s),"magenta")+" appears to be unused - removing"),await n.xfs.unlinkPromise(s)))}e.markedFiles.clear()}}}},52779:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,O:()=>A});var n=r(10966),i=r.n(n),o=r(54143);const s=/^(?!v)[a-z0-9-.]+$/i;class A{supportsDescriptor(e,t){return!!i().validRange(e.range)||!!s.test(e.range)}supportsLocator(e,t){return!!i().validRange(e.reference)||!!s.test(e.reference)}shouldPersistResolution(e,t){return t.resolver.shouldPersistResolution(this.forwardLocator(e,t),t)}bindDescriptor(e,t,r){return r.resolver.bindDescriptor(this.forwardDescriptor(e,r),t,r)}getResolutionDependencies(e,t){return t.resolver.getResolutionDependencies(this.forwardDescriptor(e,t),t)}async getCandidates(e,t,r){return await r.resolver.getCandidates(this.forwardDescriptor(e,r),t,r)}async resolve(e,t){const r=await t.resolver.resolve(this.forwardLocator(e,t),t);return o.renamePackage(r,e)}forwardDescriptor(e,t){return o.makeDescriptor(e,`${t.project.configuration.get("defaultProtocol")}${e.range}`)}forwardLocator(e,t){return o.makeLocator(e,`${t.project.configuration.get("defaultProtocol")}${e.reference}`)}}},35691:(e,t,r)=>{"use strict";r.d(t,{lk:()=>s,yG:()=>A});var n=r(92413),i=r(24304),o=r(92659);class s extends Error{constructor(e,t){super(t),this.reportCode=e}}class A{constructor(){this.reportedInfos=new Set,this.reportedWarnings=new Set,this.reportedErrors=new Set}static progressViaCounter(e){let t,r=0,n=new Promise(e=>{t=e});const i=e=>{const i=t;n=new Promise(e=>{t=e}),r=e,i()},o=async function*(){for(;ro,set:i,tick:(e=0)=>{i(r+1)}}}reportInfoOnce(e,t,r){const n=r&&r.key?r.key:t;this.reportedInfos.has(n)||(this.reportedInfos.add(n),this.reportInfo(e,t))}reportWarningOnce(e,t,r){const n=r&&r.key?r.key:t;this.reportedWarnings.has(n)||(this.reportedWarnings.add(n),this.reportWarning(e,t))}reportErrorOnce(e,t,r){const n=r&&r.key?r.key:t;this.reportedErrors.has(n)||(this.reportedErrors.add(n),this.reportError(e,t))}reportExceptionOnce(e){!function(e){return void 0!==e.reportCode}(e)?this.reportErrorOnce(o.b.EXCEPTION,e.stack||e.message,{key:e}):this.reportErrorOnce(e.reportCode,e.message,{key:e})}createStreamReporter(e=null){const t=new n.PassThrough,r=new i.StringDecoder;let o="";return t.on("data",t=>{let n,i=r.write(t);do{if(n=i.indexOf("\n"),-1!==n){const t=o+i.substr(0,n);i=i.substr(n+1),o="",null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t)}}while(-1!==n);o+=i}),t.on("end",()=>{const t=r.end();""!==t&&(null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t))}),t}}},15815:(e,t,r)=>{"use strict";r.d(t,{P:()=>h});var n=r(92659),i=r(35691);const o=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],s=new Set([n.b.FETCH_NOT_CACHED,n.b.UNUSED_CACHE_ENTRY]),A=process.env.GITHUB_ACTIONS?{start:e=>`::group::${e}\n`,end:e=>"::endgroup::\n"}:process.env.TRAVIS?{start:e=>`travis_fold:start:${e}\n`,end:e=>`travis_fold:end:${e}\n`}:process.env.GITLAB_CI?{start:e=>`section_start:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r${e}\n`,end:e=>`section_end:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r`}:null,a=new Date,c=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM),u={patrick:{date:[17,3],chars:["🍀","🌱"],size:40},simba:{date:[19,7],chars:["🌟","✨"],size:40},jack:{date:[31,10],chars:["🎃","🦇"],size:40},hogsfather:{date:[31,12],chars:["🎉","🎄"],size:40},default:{chars:["=","-"],size:80}},l=c&&Object.keys(u).find(e=>{const t=u[e];return!t.date||t.date[0]===a.getDate()&&t.date[1]===a.getMonth()+1})||"default";class h extends i.yG{constructor({configuration:e,stdout:t,json:r=!1,includeFooter:n=!0,includeLogs:i=!r,includeInfos:o=i,includeWarnings:A=i,forgettableBufferSize:a=5,forgettableNames:c=new Set}){super(),this.cacheHitCount=0,this.cacheMissCount=0,this.warningCount=0,this.errorCount=0,this.startTime=Date.now(),this.indent=0,this.progress=new Map,this.progressTime=0,this.progressFrame=0,this.progressTimeout=null,this.forgettableLines=[],this.configuration=e,this.forgettableBufferSize=a,this.forgettableNames=new Set([...c,...s]),this.includeFooter=n,this.includeInfos=o,this.includeWarnings=A,this.json=r,this.stdout=t}static async start(e,t){const r=new this(e);try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize()}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,t){this.cacheMissCount+=1,void 0===t||this.configuration.get("preferAggregateCacheInfo")||this.reportInfo(n.b.FETCH_NOT_CACHED,t)}startTimerSync(e,t){this.reportInfo(null,"┌ "+e);const r=Date.now();this.indent+=1;try{return t()}catch(e){throw this.reportExceptionOnce(e),e}finally{const e=Date.now();this.indent-=1,this.configuration.get("enableTimers")&&e-r>200?this.reportInfo(null,"└ Completed in "+this.formatTiming(e-r)):this.reportInfo(null,"└ Completed")}}async startTimerPromise(e,t){this.reportInfo(null,"┌ "+e),null!==A&&this.stdout.write(A.start(e));const r=Date.now();this.indent+=1;try{return await t()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.indent-=1,null!==A&&this.stdout.write(A.end(e)),this.configuration.get("enableTimers")&&t-r>200?this.reportInfo(null,"└ Completed in "+this.formatTiming(t-r)):this.reportInfo(null,"└ Completed")}}async startCacheReport(e){const t=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(e){throw this.reportExceptionOnce(e),e}finally{null!==t&&this.reportCacheChanges(t)}}reportSeparator(){0===this.indent?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(e,t){if(this.includeInfos)if(this.json)this.reportJson({type:"info",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t});else if(this.forgettableNames.has(e))if(this.forgettableLines.push(t),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(e,this.forgettableLines)}else this.writeLine(`${this.configuration.format("➤","blueBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`);else this.writeLineWithForgettableReset(`${this.configuration.format("➤","blueBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`)}reportWarning(e,t){this.warningCount+=1,this.includeWarnings&&(this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${this.configuration.format("➤","yellowBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`))}reportError(e,t){this.errorCount+=1,this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${this.configuration.format("➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`)}reportProgress(e){let t=!1;const r=Promise.resolve().then(async()=>{const r={progress:0,title:void 0};this.progress.set(e,r),this.refreshProgress(-1);for await(const{progress:n,title:i}of e)t||r.progress===n&&r.title===i||(r.progress=n,r.title=i,this.refreshProgress());n()}),n=()=>{t||(t=!0,this.progress.delete(e),this.refreshProgress(1))};return{...r,stop:n}}reportJson(e){this.json&&this.writeLineWithForgettableReset(""+JSON.stringify(e))}async finalize(){if(!this.includeFooter)return;let e="";e=this.errorCount>0?"Failed with errors":this.warningCount>0?"Done with warnings":"Done";const t=this.formatTiming(Date.now()-this.startTime),r=this.configuration.get("enableTimers")?`${e} in ${t}`:e;this.errorCount>0?this.reportError(n.b.UNNAMED,r):this.warningCount>0?this.reportWarning(n.b.UNNAMED,r):this.reportInfo(n.b.UNNAMED,r)}writeLine(e){this.clearProgress({clear:!0}),this.stdout.write(e+"\n"),this.writeProgress()}writeLineWithForgettableReset(e){this.forgettableLines=[],this.writeLine(e)}writeLines(e,t){this.clearProgress({delta:t.length});for(const r of t)this.stdout.write(`${this.configuration.format("➤","blueBright")} ${this.formatName(e)}: ${this.formatIndent()}${r}\n`);this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:t}){const r=this.cacheHitCount-e,i=this.cacheMissCount-t;if(0===r&&0===i)return;let o="";this.cacheHitCount>1?o+=this.cacheHitCount+" packages were already cached":1===this.cacheHitCount?o+=" - one package was already cached":o+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?o+=`, ${this.cacheMissCount} had to be fetched`:1===this.cacheMissCount&&(o+=", one had to be fetched"):this.cacheMissCount>1?o+=` - ${this.cacheMissCount} packages had to be fetched`:1===this.cacheMissCount&&(o+=" - one package had to be fetched"),this.reportInfo(n.b.FETCH_NOT_CACHED,o)}clearProgress({delta:e=0,clear:t=!1}){this.configuration.get("enableProgressBars")&&!this.json&&this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||t)&&this.stdout.write(""))}writeProgress(){if(!this.configuration.get("enableProgressBars")||this.json)return;if(null!==this.progressTimeout&&clearTimeout(this.progressTimeout),this.progressTimeout=null,0===this.progress.size)return;const e=Date.now();e-this.progressTime>80&&(this.progressFrame=(this.progressFrame+1)%o.length,this.progressTime=e);const t=o[this.progressFrame],r=this.configuration.get("progressBarStyle")||l;if(!Object.prototype.hasOwnProperty.call(u,r))throw new Error("Assertion failed: Invalid progress bar style");const n=u[r],i="➤ YN0000: ┌ ".length,s=Math.max(0,Math.min(process.stdout.columns-i,80)),A=Math.floor(n.size*s/80);for(const{progress:e}of this.progress.values()){const r=A*e,i=n.chars[0].repeat(r),o=n.chars[1].repeat(A-r);this.stdout.write(`${this.configuration.format("➤","blueBright")} ${this.formatName(null)}: ${t} ${i}${o}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},1e3/60)}refreshProgress(e=0){this.clearProgress({delta:e}),this.writeProgress()}formatTiming(e){return e<6e4?Math.round(e/10)/100+"s":Math.round(e/600)/100+"m"}formatName(e){const t="YN"+(null===e?0:e).toString(10).padStart(4,"0");return this.json||null!==e?t:this.configuration.format(t,"grey")}formatNameWithHyperlink(e){const t=this.formatName(e);if(!this.configuration.get("enableHyperlinks"))return t;if(null===e||e===n.b.UNNAMED)return t;return`]8;;${`https://yarnpkg.com/advanced/error-codes#${t}---${n.b[e]}`.toLowerCase()}\\${t}]8;;\\`}formatIndent(){return"│ ".repeat(this.indent)}}},33720:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(35691);class i extends n.yG{reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t){return t()}async startTimerPromise(e,t){return await t()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){}}},60895:(e,t,r)=>{"use strict";r.d(t,{N:()=>A});var n=r(17674),i=r(14626),o=r(46009),s=r(54143);class A{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const n=e.reference.slice(r+1),i=s.makeLocator(e,n);return t.fetcher.getLocalPath(i,t)}async fetch(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const n=e.reference.slice(r+1),i=s.makeLocator(e,n),o=await t.fetcher.fetch(i,t);return await this.ensureVirtualLink(e,o,t)}getLocatorFilename(e){return s.slugifyLocator(e)}async ensureVirtualLink(e,t,r){const s=t.packageFs.getRealPath(),A=r.project.configuration.get("virtualFolder"),a=this.getLocatorFilename(e),c=n.p.makeVirtualPath(A,a,s),u=new i.K(c,{baseFs:t.packageFs,pathUtils:o.y1});return{...t,packageFs:u}}}},17722:(e,t,r)=>{"use strict";r.d(t,{j:()=>g});var n=r(56537),i=r(46009),o=r(18710),s=r.n(o),A=r(10966),a=r.n(A),c=r(46611),u=r(94538),l=r(20624),h=r(54143);class g{constructor(e,{project:t}){this.workspacesCwds=new Set,this.dependencies=new Map,this.project=t,this.cwd=e}async setup(){this.manifest=n.xfs.existsSync(i.y1.join(this.cwd,c.G.fileName))?await c.G.find(this.cwd):new c.G,this.relativeCwd=i.y1.relative(this.project.cwd,this.cwd)||i.LZ.dot;const e=this.manifest.name?this.manifest.name:h.makeIdent(null,`${this.computeCandidateName()}-${l.makeHash(this.relativeCwd).substr(0,6)}`),t=this.manifest.version?this.manifest.version:"0.0.0";this.locator=h.makeLocator(e,t),this.anchoredDescriptor=h.makeDescriptor(this.locator,`${u.d.protocol}${this.relativeCwd}`),this.anchoredLocator=h.makeLocator(this.locator,`${u.d.protocol}${this.relativeCwd}`);for(const e of this.manifest.workspaceDefinitions){const t=await s()(e.pattern,{absolute:!0,cwd:i.cS.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});t.sort();for(const e of t){const t=i.y1.resolve(this.cwd,i.cS.toPortablePath(e));n.xfs.existsSync(i.y1.join(t,(0,i.Zu)("package.json")))&&this.workspacesCwds.add(t)}}}accepts(e){const t=e.indexOf(":"),r=-1!==t?e.slice(0,t+1):null,n=-1!==t?e.slice(t+1):e;return r===u.d.protocol&&n===this.relativeCwd||(r===u.d.protocol&&"*"===n||!!a().validRange(n)&&(r===u.d.protocol?a().satisfies(null!==this.manifest.version?this.manifest.version:"0.0.0",n):!!this.project.configuration.get("enableTransparentWorkspaces")&&(null!==this.manifest.version&&a().satisfies(this.manifest.version,n))))}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":""+i.y1.basename(this.cwd)||"unnamed-workspace"}async persistManifest(){const e={};this.manifest.exportTo(e);const t=i.y1.join(this.cwd,c.G.fileName),r=JSON.stringify(e,null,this.manifest.indent)+"\n";await n.xfs.changeFilePromise(t,r,{automaticNewlines:!0})}}},94538:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(32485);class i{supportsDescriptor(e,t){if(e.range.startsWith(i.protocol))return!0;return null!==t.project.tryWorkspaceByDescriptor(e)}supportsLocator(e,t){return!!e.reference.startsWith(i.protocol)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[r.project.getWorkspaceByDescriptor(e).anchoredLocator]}async resolve(e,t){const r=t.project.getWorkspaceByCwd(e.reference.slice(i.protocol.length));return{...e,version:r.manifest.version||"0.0.0",languageName:"unknown",linkType:n.U.SOFT,dependencies:new Map([...r.manifest.dependencies,...r.manifest.devDependencies]),peerDependencies:new Map([...r.manifest.peerDependencies]),dependenciesMeta:r.manifest.dependenciesMeta,peerDependenciesMeta:r.manifest.peerDependenciesMeta,bin:r.manifest.bin}}}i.protocol="workspace:"},59355:(e,t,r)=>{"use strict";r.d(t,{o:()=>n});const n="2.0.0-rc.36.git.20200705.ed2a67e6"},6220:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EndStrategy:()=>n,pipevp:()=>u,execvp:()=>l});var n,i=r(46009),o=r(67566),s=r.n(o);function A(e){return null!==e&&"number"==typeof e.fd}function a(){}!function(e){e[e.Never=0]="Never",e[e.ErrorCode=1]="ErrorCode",e[e.Always=2]="Always"}(n||(n={}));let c=0;async function u(e,t,{cwd:r,env:o=process.env,strict:u=!1,stdin:l=null,stdout:h,stderr:g,end:f=n.Always}){const p=["pipe","pipe","pipe"];null===l?p[0]="ignore":A(l)&&(p[0]=l),A(h)&&(p[1]=h),A(g)&&(p[2]=g),0==c++&&process.on("SIGINT",a);const d=s()(e,t,{cwd:i.cS.fromPortablePath(r),env:{...o,PWD:i.cS.fromPortablePath(r)},stdio:p});A(l)||null===l||l.pipe(d.stdin),A(h)||d.stdout.pipe(h,{end:!1}),A(g)||d.stderr.pipe(g,{end:!1});const C=()=>{for(const e of new Set([h,g]))A(e)||e.end()};return new Promise((t,r)=>{d.on("error",e=>{0==--c&&process.off("SIGINT",a),f!==n.Always&&f!==n.ErrorCode||C(),r(e)}),d.on("close",(i,o)=>{0==--c&&process.off("SIGINT",a),(f===n.Always||f===n.ErrorCode&&i>0)&&C(),0!==i&&u?r(null!==i?new Error(`Child "${e}" exited with exit code ${i}`):new Error(`Child "${e}" exited with signal ${o}`)):t({code:i})})})}async function l(e,t,{cwd:r,env:n=process.env,encoding:o="utf8",strict:A=!1}){const a=["ignore","pipe","pipe"],c=[],u=[],l=i.cS.fromPortablePath(r);void 0!==n.PWD&&(n={...n,PWD:l});const h=s()(e,t,{cwd:l,env:n,stdio:a});return h.stdout.on("data",e=>{c.push(e)}),h.stderr.on("data",e=>{u.push(e)}),await new Promise((t,r)=>{h.on("close",n=>{const i="buffer"===o?Buffer.concat(c):Buffer.concat(c).toString(o),s="buffer"===o?Buffer.concat(u):Buffer.concat(u).toString(o);0!==n&&A?r(Object.assign(new Error(`Child "${e}" exited with exit code ${n}\n\n${s}`),{code:n,stdout:i,stderr:s})):t({code:n,stdout:i,stderr:s})})})}},81111:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDefaultGlobalFolder:()=>o,getHomeFolder:()=>s,isFolderInside:()=>A});var n=r(46009),i=r(12087);function o(){if("win32"===process.platform){const e=n.cS.toPortablePath(process.env.LOCALAPPDATA||n.cS.join((0,i.homedir)(),"AppData","Local"));return n.y1.resolve(e,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){const e=n.cS.toPortablePath(process.env.XDG_DATA_HOME);return n.y1.resolve(e,"yarn/berry")}return n.y1.resolve(s(),".yarn/berry")}function s(){return n.cS.toPortablePath((0,i.homedir)()||"/usr/local/share")}function A(e,t){const r=n.y1.relative(t,e);return r&&!r.startsWith("..")&&!n.y1.isAbsolute(r)}},20624:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeHash:()=>o,checksumFile:()=>s});var n=r(78420),i=r(76417);function o(...e){const t=(0,i.createHash)("sha512");for(const r of e)t.update(r||"");return t.digest("hex")}function s(e){return new Promise((t,r)=>{const o=new n.S,s=(0,i.createHash)("sha512"),A=o.createReadStream(e,{});A.on("data",e=>{s.update(e)}),A.on("error",e=>{r(e)}),A.on("end",()=>{t(s.digest("hex"))})})}},84132:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cache:()=>U.C,DEFAULT_RC_FILENAME:()=>j.tr,DEFAULT_LOCK_FILENAME:()=>j.nh,Configuration:()=>j.VK,FormatType:()=>j.a5,ProjectLookup:()=>j.EW,SettingsType:()=>j.a2,BuildType:()=>Y.k,LightReport:()=>G.h,Manifest:()=>J.G,MessageName:()=>H.b,Project:()=>z.I,TAG_REGEXP:()=>q.c,ReportError:()=>W.lk,Report:()=>W.yG,StreamReport:()=>V.P,ThrowReport:()=>X.$,VirtualFetcher:()=>Z.N,WorkspaceResolver:()=>$.d,Workspace:()=>ee.j,YarnVersion:()=>te.o,LinkType:()=>re.U,hashUtils:()=>A,httpUtils:()=>n,execUtils:()=>o,folderUtils:()=>s,miscUtils:()=>S,scriptUtils:()=>k,semverUtils:()=>x,structUtils:()=>F,tgzUtils:()=>i});var n={};r.r(n),r.d(n,{Method:()=>Q,get:()=>D,put:()=>b,request:()=>v});var i={};r.r(i),r.d(i,{convertToZip:()=>P,extractArchiveTo:()=>O,makeArchiveFromDirectory:()=>_});var o=r(6220),s=r(81111),A=r(20624),a=r(22395),c=r.n(a),u=r(57211),l=r(98605),h=r(2401),g=r.n(h),f=r(61578),p=r.n(f),d=r(98161),C=r.n(d),E=r(78835);const I=p()(8),m=new Map,y=new l.Agent({keepAlive:!0}),w=new u.Agent({keepAlive:!0});function B(e){const t=new E.URL(e),r={host:t.hostname,headers:{}};return t.port&&(r.port=Number(t.port)),{proxy:r}}var Q;async function v(e,t,{configuration:r,headers:n,json:i,method:o=Q.GET}){if(!r.get("enableNetwork"))throw new Error(`Network access have been disabled by configuration (${o} ${e})`);const s=new E.URL(e);if("http:"===s.protocol&&!g().isMatch(s.hostname,r.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${s.hostname})`);const A=r.get("httpProxy"),a=r.get("httpsProxy"),u={agent:{http:A?C().httpOverHttp(B(A)):y,https:a?C().httpsOverHttp(B(a)):w},headers:n,method:o};u.responseType=i?"json":"buffer",null!==t&&("string"==typeof t||Buffer.isBuffer(t)?u.body=t:u.json=t);const l=r.get("httpTimeout"),h=r.get("httpRetry"),f=c().extend({timeout:l,retry:h,...u});return I(()=>f(e))}async function D(e,{configuration:t,json:r,...n}){let i=m.get(e);return i||(i=v(e,null,{configuration:t,...n}).then(t=>(m.set(e,t.body),t.body)),m.set(e,i)),!1===Buffer.isBuffer(i)&&(i=await i),r?JSON.parse(i.toString()):i}async function b(e,t,r){return(await v(e,t,{...r,method:Q.PUT})).body}!function(e){e.GET="GET",e.PUT="PUT"}(Q||(Q={}));var S=r(73632),k=r(63088),x=r(36545),F=r(54143),M=r(78420),N=r(46009),R=r(56537),L=r(90739),K=r(29486),T=r(24541);async function _(e,{baseFs:t=new M.S,prefixPath:r=N.LZ.root,compressionLevel:n}={}){const i=await R.xfs.mktempPromise(),o=N.y1.join(i,"archive.zip"),s=new L.d(o,{create:!0,libzip:await(0,K.getLibzipPromise)(),level:n}),A=N.y1.resolve(N.LZ.root,r);return await s.copyPromise(A,e,{baseFs:t,stableTime:!0,stableSort:!0}),s}async function P(e,t){const r=await R.xfs.mktempPromise(),n=N.y1.join(r,"archive.zip"),{compressionLevel:i,...o}=t;return await O(e,new L.d(n,{create:!0,libzip:await(0,K.getLibzipPromise)(),level:i}),o)}async function O(e,t,{stripComponents:r=0,prefixPath:n=N.LZ.dot}={}){const i=new T.Ze;return i.on("entry",e=>{if(function(e){if("/"===e[0])return!0;const t=e.path.split(/\//g);return!!t.some(e=>".."===e)||t.length<=r}(e))return void e.resume();const i=N.y1.normalize(N.cS.toPortablePath(e.path)).replace(/\/$/,"").split(/\//g);if(i.length<=r)return void e.resume();const o=i.slice(r).join("/"),s=N.y1.join(n,o),A=[];let a=420;"Directory"!==e.type&&0==(73&e.mode)||(a|=73),e.on("data",e=>{A.push(e)}),e.on("end",()=>{var r;switch(e.type){case"Directory":t.mkdirpSync(N.y1.dirname(s),{chmod:493,utimes:[315532800,315532800]}),t.mkdirSync(s),t.chmodSync(s,a),t.utimesSync(s,315532800,315532800);break;case"OldFile":case"File":t.mkdirpSync(N.y1.dirname(s),{chmod:493,utimes:[315532800,315532800]}),t.writeFileSync(s,Buffer.concat(A)),t.chmodSync(s,a),t.utimesSync(s,315532800,315532800);break;case"SymbolicLink":t.mkdirpSync(N.y1.dirname(s),{chmod:493,utimes:[315532800,315532800]}),t.symlinkSync(e.linkpath,s),null===(r=t.lutimesSync)||void 0===r||r.call(t,s,315532800,315532800)}})}),await new Promise((r,n)=>{i.on("error",e=>{n(e)}),i.on("close",()=>{r(t)}),i.end(e)})}var U=r(28148),j=r(27122),Y=r(92409),G=r(62152),J=r(46611),H=r(92659),z=r(40376),q=r(52779),W=r(35691),V=r(15815),X=r(33720),Z=r(60895),$=r(94538),ee=r(17722),te=r(59355),re=r(32485)},73632:(e,t,r)=>{"use strict";r.r(t),r.d(t,{escapeRegExp:()=>a,assertNever:()=>c,mapAndFilter:()=>u,mapAndFind:()=>h,getFactoryWithDefault:()=>f,getArrayWithDefault:()=>p,getSetWithDefault:()=>d,getMapWithDefault:()=>C,releaseAfterUseAsync:()=>E,prettifyAsyncErrors:()=>I,prettifySyncErrors:()=>m,bufferStream:()=>y,BufferStream:()=>w,DefaultStream:()=>B,dynamicRequire:()=>Q,dynamicRequireNoCache:()=>v,sortMap:()=>D,buildIgnorePattern:()=>b,replaceEnvVariables:()=>S});var n=r(46009),i=r(17278),o=r(2401),s=r.n(o),A=r(92413);function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(e){throw new Error(`Assertion failed: Unexpected object '${e}'`)}function u(e,t){const r=[];for(const n of e){const e=t(n);e!==l&&r.push(e)}return r}e=r.hmd(e);const l=Symbol();function h(e,t){for(const r of e){const e=t(r);if(e!==g)return e}}u.skip=l;const g=Symbol();function f(e,t,r){let n=e.get(t);return void 0===n&&e.set(t,n=r()),n}function p(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=[]),r}function d(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Set),r}function C(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Map),r}async function E(e,t){if(null==t)return await e();try{return await e()}finally{await t()}}async function I(e,t){try{return await e()}catch(e){throw e.message=t(e.message),e}}function m(e,t){try{return e()}catch(e){throw e.message=t(e.message),e}}async function y(e){return await new Promise((t,r)=>{const n=[];e.on("error",e=>{r(e)}),e.on("data",e=>{n.push(e)}),e.on("end",()=>{t(Buffer.concat(n))})})}h.skip=g;class w extends A.Transform{constructor(){super(...arguments),this.chunks=[]}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(e),r(null,null)}_flush(e){e(null,Buffer.concat(this.chunks))}}class B extends A.Transform{constructor(e=Buffer.alloc(0)){super(),this.active=!0,this.ifEmpty=e}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,r(null,e)}_flush(e){this.active&&this.ifEmpty.length>0&&e(null,this.ifEmpty)}}function Q(e){return"undefined"!=typeof require?require(e):r(32178)(e)}function v(t){const i=n.cS.fromPortablePath(t),o=r.c[i];let s;delete r.c[i];try{s=Q(i);const t=r.c[i],n=e.children.indexOf(t);-1!==n&&e.children.splice(n,1)}finally{r.c[i]=o}return s}function D(e,t){const r=Array.from(e);Array.isArray(t)||(t=[t]);const n=[];for(const e of t)n.push(r.map(t=>e(t)));const i=r.map((e,t)=>t);return i.sort((e,t)=>{for(const r of n){const n=r[e]r[t]?1:0;if(0!==n)return n}return 0}),i.map(e=>r[e])}function b(e){return 0===e.length?null:e.map(e=>`(${s().makeRe(e,{windows:!1}).source})`).join("|")}function S(e,{env:t}){return e.replace(/\${(?[\d\w_]+)(?:)?-?(?[^}]+)?}/g,(...e)=>{const{variableName:r,colon:n,fallback:o}=e[e.length-1],s=Object.prototype.hasOwnProperty.call(t,r),A=process.env[r];if(A)return A;if(s&&!A&&n)return o;if(s)return A;if(o)return o;throw new i.UsageError(`Environment variable not found (${r})`)})}},63088:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeScriptEnv:()=>m,prepareExternalProject:()=>y,hasPackageScript:()=>w,executePackageScript:()=>B,executePackageShellcode:()=>Q,executeWorkspaceScript:()=>D,hasWorkspaceScript:()=>b,getPackageAccessibleBinaries:()=>S,getWorkspaceAccessibleBinaries:()=>k,executePackageAccessibleBinary:()=>x,executeWorkspaceAccessibleBinary:()=>F});var n,i=r(46009),o=r(53660),s=r(75448),A=r(56537),a=r(29486),c=r(43982),u=r(92413),l=r(46611),h=r(92659),g=r(35691),f=r(15815),p=r(59355),d=r(6220),C=r(73632),E=r(54143);async function I(e,t,r,n=[]){"win32"===process.platform&&await A.xfs.writeFilePromise(i.y1.format({dir:e,name:t,ext:".cmd"}),`@"${r}" ${n.map(e=>`"${e.replace('"','""')}"`).join(" ")} %*\n`),await A.xfs.writeFilePromise(i.y1.join(e,t),`#!/bin/sh\nexec "${r}" ${n.map(e=>`'${e.replace(/'/g,"'\"'\"'")}'`).join(" ")} "$@"\n`),await A.xfs.chmodPromise(i.y1.join(e,t),493)}async function m({project:e,binFolder:t,lifecycleScript:r}){const n={};for(const[e,t]of Object.entries(process.env))void 0!==t&&(n["path"!==e.toLowerCase()?e:"PATH"]=t);const o=i.cS.fromPortablePath(t);n.BERRY_BIN_FOLDER=i.cS.fromPortablePath(o),await I(t,(0,i.Zu)("node"),process.execPath),null!==p.o&&(await I(t,(0,i.Zu)("run"),process.execPath,[process.argv[1],"run"]),await I(t,(0,i.Zu)("yarn"),process.execPath,[process.argv[1]]),await I(t,(0,i.Zu)("yarnpkg"),process.execPath,[process.argv[1]]),await I(t,(0,i.Zu)("node-gyp"),process.execPath,[process.argv[1],"run","--top-level","node-gyp"])),e&&(n.INIT_CWD=i.cS.fromPortablePath(e.configuration.startingCwd)),n.PATH=n.PATH?`${o}${i.cS.delimiter}${n.PATH}`:""+o,n.npm_execpath=`${o}${i.cS.sep}yarn`,n.npm_node_execpath=`${o}${i.cS.sep}node`;const s=null!==p.o?"yarn/"+p.o:`yarn/${C.dynamicRequire("@yarnpkg/core").version}-core`;return n.npm_config_user_agent=`${s} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,r&&(n.npm_lifecycle_event=r),e&&await e.configuration.triggerHook(e=>e.setupScriptEnvironment,e,n,async(e,r,n)=>await I(t,(0,i.Zu)(e),r,n)),n}async function y(e,t,{configuration:r,report:o,workspace:s=null}){await A.xfs.mktempPromise(async a=>{const c=i.y1.join(a,"pack.log"),{stdout:l,stderr:f}=r.getSubprocessStreams(c,{prefix:e,report:o}),p=await async function(e){let t=null;try{t=await A.xfs.readFilePromise(i.y1.join(e,i.QS.lockfile),"utf8")}catch(e){}return null!==t?t.match(/^__metadata:$/m)?n.Yarn2:n.Yarn1:A.xfs.existsSync(i.y1.join(e,"package-lock.json"))?n.Npm:A.xfs.existsSync(i.y1.join(e,"pnpm-lock.yaml"))?n.Pnpm:null}(e);let E;null!==p?(l.write(`Installing the project using ${p}\n\n`),E=p):(l.write("No package manager detected; defaulting to Yarn\n\n"),E=n.Yarn2),await A.xfs.mktempPromise(async r=>{const o=await m({binFolder:r}),p=new Map([[n.Yarn1,async()=>{const r=null!==s?["workspace",s]:[],n=await d.pipevp("yarn",["set","version","classic","--only-if-needed"],{cwd:e,env:o,stdin:null,stdout:l,stderr:f,end:d.EndStrategy.ErrorCode});if(0!==n.code)return n.code;await A.xfs.appendFilePromise(i.y1.join(e,".npmignore"),"/.yarn\n"),l.write("\n");const a=await d.pipevp("yarn",["install"],{cwd:e,env:o,stdin:null,stdout:l,stderr:f,end:d.EndStrategy.ErrorCode});if(0!==a.code)return a.code;l.write("\n");const c=await d.pipevp("yarn",[...r,"pack","--filename",i.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:l,stderr:f});return 0!==c.code?c.code:0}],[n.Yarn2,async()=>{const r=null!==s?["workspace",s]:[],n=await d.pipevp("yarn",[...r,"pack","--install-if-needed","--filename",i.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:l,stderr:f});return 0!==n.code?n.code:0}],[n.Npm,async()=>{if(null!==s)throw new Error("Workspaces aren't supported by npm, which has been detected as the primary package manager for "+e);delete o.npm_config_user_agent;const r=await d.pipevp("npm",["install"],{cwd:e,env:o,stdin:null,stdout:l,stderr:f,end:d.EndStrategy.ErrorCode});if(0!==r.code)return r.code;const n=new u.PassThrough,a=C.bufferStream(n);n.pipe(l);const c=await d.pipevp("npm",["pack","--silent"],{cwd:e,env:o,stdin:null,stdout:n,stderr:f});if(0!==c.code)return c.code;const h=(await a).toString().trim(),g=i.y1.resolve(e,i.cS.toPortablePath(h));return await A.xfs.renamePromise(g,t),0}]]).get(E);if(void 0===p)throw new Error("Assertion failed: Unsupported workflow");const I=await p();if(0!==I&&void 0!==I)throw A.xfs.detachTemp(a),new g.lk(h.b.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${I}, logs can be found here: ${c})`)})})}async function w(e,t,{project:r}){const n=r.storedPackages.get(e.locatorHash);if(!n)throw new Error(`Package for ${E.prettyLocator(r.configuration,e)} not found in the project`);return await o.A.openPromise(async e=>{const o=r.configuration,A=r.configuration.getLinkers(),a={project:r,report:new f.P({stdout:new u.PassThrough,configuration:o})},c=A.find(e=>e.supportsPackage(n,a));if(!c)throw new Error(`The package ${E.prettyLocator(r.configuration,n)} isn't supported by any of the available linkers`);const h=await c.findPackageLocation(n,a),g=new s.M(h,{baseFs:e});return(await l.G.find(i.LZ.dot,{baseFs:g})).scripts.has(t)},{libzip:await(0,a.getLibzipPromise)()})}async function B(e,t,r,{cwd:n,project:i,stdin:o,stdout:s,stderr:a}){return await A.xfs.mktempPromise(async A=>{const{manifest:u,env:l,cwd:h}=await v(e,{project:i,binFolder:A,cwd:n,lifecycleScript:t}),g=u.scripts.get(t);if(void 0===g)return 1;const f=await i.configuration.reduceHook(e=>e.wrapScriptExecution,async()=>await(0,c.execute)(g,r,{cwd:h,env:l,stdin:o,stdout:s,stderr:a}),i,e,t,{script:g,args:r,cwd:h,env:l,stdin:o,stdout:s,stderr:a});return await f()})}async function Q(e,t,r,{cwd:n,project:i,stdin:o,stdout:s,stderr:a}){return await A.xfs.mktempPromise(async A=>{const{env:u,cwd:l}=await v(e,{project:i,binFolder:A,cwd:n});return await(0,c.execute)(t,r,{cwd:l,env:u,stdin:o,stdout:s,stderr:a})})}async function v(e,{project:t,binFolder:r,cwd:n,lifecycleScript:A}){const c=t.storedPackages.get(e.locatorHash);if(!c)throw new Error(`Package for ${E.prettyLocator(t.configuration,e)} not found in the project`);return await o.A.openPromise(async o=>{const a=t.configuration,h=t.configuration.getLinkers(),g={project:t,report:new f.P({stdout:new u.PassThrough,configuration:a})},p=h.find(e=>e.supportsPackage(c,g));if(!p)throw new Error(`The package ${E.prettyLocator(t.configuration,c)} isn't supported by any of the available linkers`);const d=await m({project:t,binFolder:r,lifecycleScript:A});for(const[n,[,o]]of await S(e,{project:t}))await I(r,(0,i.Zu)(n),process.execPath,[o]);const C=await p.findPackageLocation(c,g),y=new s.M(C,{baseFs:o}),w=await l.G.find(i.LZ.dot,{baseFs:y});return void 0===n&&(n=C),{manifest:w,binFolder:r,env:d,cwd:n}},{libzip:await(0,a.getLibzipPromise)()})}async function D(e,t,r,{cwd:n,stdin:i,stdout:o,stderr:s}){return await B(e.anchoredLocator,t,r,{cwd:n,project:e.project,stdin:i,stdout:o,stderr:s})}async function b(e,t){return e.manifest.scripts.has(t)}async function S(e,{project:t}){const r=t.configuration,n=new Map,o=t.storedPackages.get(e.locatorHash);if(!o)throw new Error(`Package for ${E.prettyLocator(r,e)} not found in the project`);const s=new u.Writable,A=r.getLinkers(),a={project:t,report:new f.P({configuration:r,stdout:s})},c=new Set([e.locatorHash]);for(const e of o.dependencies.values()){const n=t.storedResolutions.get(e.descriptorHash);if(!n)throw new Error(`Assertion failed: The resolution (${E.prettyDescriptor(r,e)}) should have been registered`);c.add(n)}for(const e of c){const r=t.storedPackages.get(e);if(!r)throw new Error(`Assertion failed: The package (${e}) should have been registered`);if(0===r.bin.size)continue;const o=A.find(e=>e.supportsPackage(r,a));if(!o)continue;const s=await o.findPackageLocation(r,a);for(const[e,t]of r.bin)n.set(e,[r,i.cS.fromPortablePath(i.y1.resolve(s,t))])}return n}async function k(e){return await S(e.anchoredLocator,{project:e.project})}async function x(e,t,r,{cwd:n,project:o,stdin:s,stdout:a,stderr:c,nodeArgs:u=[]}){const l=await S(e,{project:o}),h=l.get(t);if(!h)throw new Error(`Binary not found (${t}) for ${E.prettyLocator(o.configuration,e)}`);return await A.xfs.mktempPromise(async e=>{const[,t]=h,g=await m({project:o,binFolder:e});for(const[e,[,t]]of l)await I(g.BERRY_BIN_FOLDER,(0,i.Zu)(e),process.execPath,[t]);let f;try{f=await d.pipevp(process.execPath,[...u,t,...r],{cwd:n,env:g,stdin:s,stdout:a,stderr:c})}finally{await A.xfs.removePromise(g.BERRY_BIN_FOLDER)}return f.code})}async function F(e,t,r,{cwd:n,stdin:i,stdout:o,stderr:s}){return await x(e.anchoredLocator,t,r,{project:e.project,cwd:n,stdin:i,stdout:o,stderr:s})}!function(e){e.Yarn1="Yarn Classic",e.Yarn2="Yarn",e.Npm="npm",e.Pnpm="pnpm"}(n||(n={}))},36545:(e,t,r)=>{"use strict";r.r(t),r.d(t,{satisfiesWithPrereleases:()=>o});var n=r(10966),i=r.n(n);function o(e,t,r=!1){let n,o;try{n=new(i().Range)(t,r)}catch(e){return!1}if(!e)return!1;try{o=new(i().SemVer)(e,n.loose),o.prerelease&&(o.prerelease=[])}catch(e){return!1}return n.set.some(e=>{for(const t of e)t.semver.prerelease&&(t.semver.prerelease=[]);return e.every(e=>e.test(o))})}},54143:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeIdent:()=>l,makeDescriptor:()=>h,makeLocator:()=>g,convertToIdent:()=>f,convertDescriptorToLocator:()=>p,convertLocatorToDescriptor:()=>d,convertPackageToLocator:()=>C,renamePackage:()=>E,copyPackage:()=>I,virtualizeDescriptor:()=>m,virtualizePackage:()=>y,isVirtualDescriptor:()=>w,isVirtualLocator:()=>B,devirtualizeDescriptor:()=>Q,devirtualizeLocator:()=>v,bindDescriptor:()=>D,bindLocator:()=>b,areIdentsEqual:()=>S,areDescriptorsEqual:()=>k,areLocatorsEqual:()=>x,areVirtualPackagesEquivalent:()=>F,parseIdent:()=>M,tryParseIdent:()=>N,parseDescriptor:()=>R,tryParseDescriptor:()=>L,parseLocator:()=>K,tryParseLocator:()=>T,parseRange:()=>_,parseFileStyleRange:()=>P,makeRange:()=>U,convertToManifestRange:()=>j,requirableIdent:()=>Y,stringifyIdent:()=>G,stringifyDescriptor:()=>J,stringifyLocator:()=>H,slugifyIdent:()=>z,slugifyLocator:()=>q,prettyIdent:()=>W,prettyRange:()=>X,prettyDescriptor:()=>Z,prettyReference:()=>$,prettyLocator:()=>ee,prettyLocatorNoColors:()=>te,sortDescriptors:()=>re,prettyWorkspace:()=>ne,getIdentVendorPath:()=>ie});var n=r(46009),i=r(71191),o=r.n(i),s=r(10966),A=r.n(s),a=r(27122),c=r(20624),u=r(73632);function l(e,t){return{identHash:c.makeHash(e,t),scope:e,name:t}}function h(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:c.makeHash(e.identHash,t),range:t}}function g(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:c.makeHash(e.identHash,t),reference:t}}function f(e){return{identHash:e.identHash,scope:e.scope,name:e.name}}function p(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.descriptorHash,reference:e.range}}function d(e){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:e.locatorHash,range:e.reference}}function C(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference}}function E(e,t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference,version:e.version,languageName:e.languageName,linkType:e.linkType,dependencies:new Map(e.dependencies),peerDependencies:new Map(e.peerDependencies),dependenciesMeta:new Map(e.dependenciesMeta),peerDependenciesMeta:new Map(e.peerDependenciesMeta),bin:new Map(e.bin)}}function I(e){return E(e,e)}function m(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return h(e,`virtual:${t}#${e.range}`)}function y(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return E(e,g(e,`virtual:${t}#${e.reference}`))}function w(e){return e.range.startsWith("virtual:")}function B(e){return e.reference.startsWith("virtual:")}function Q(e){if(!w(e))throw new Error("Not a virtual descriptor");return h(e,e.range.replace(/^[^#]*#/,""))}function v(e){if(!B(e))throw new Error("Not a virtual descriptor");return g(e,e.reference.replace(/^[^#]*#/,""))}function D(e,t){return e.range.includes("::")?e:h(e,`${e.range}::${o().stringify(t)}`)}function b(e,t){return e.reference.includes("::")?e:g(e,`${e.reference}::${o().stringify(t)}`)}function S(e,t){return e.identHash===t.identHash}function k(e,t){return e.descriptorHash===t.descriptorHash}function x(e,t){return e.locatorHash===t.locatorHash}function F(e,t){if(!B(e))throw new Error("Invalid package type");if(!B(t))throw new Error("Invalid package type");if(!S(e,t))return!1;if(e.dependencies.size!==t.dependencies.size)return!1;for(const r of e.dependencies.values()){const e=t.dependencies.get(r.identHash);if(!e)return!1;if(!k(r,e))return!1}return!0}function M(e){const t=N(e);if(!t)throw new Error(`Invalid ident (${e})`);return t}function N(e){const t=e.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!t)return null;const[,r,n]=t;return l(void 0!==r?r:null,n)}function R(e,t=!1){const r=L(e,t);if(!r)throw new Error(`Invalid descriptor (${e})`);return r}function L(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,n,i,o]=r;if("unknown"===o)throw new Error(`Invalid range (${e})`);const s=void 0!==o?o:"unknown";return h(l(void 0!==n?n:null,i),s)}function K(e,t=!1){const r=T(e,t);if(!r)throw new Error(`Invalid locator (${e})`);return r}function T(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,n,i,o]=r;if("unknown"===o)throw new Error(`Invalid reference (${e})`);const s=void 0!==o?o:"unknown";return g(l(void 0!==n?n:null,i),s)}function _(e,t){const r=e.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(null===r)throw new Error(`Invalid range (${e})`);const n=void 0!==r[1]?r[1]:null;if("string"==typeof(null==t?void 0:t.requireProtocol)&&n!==t.requireProtocol)throw new Error(`Invalid protocol (${n})`);if((null==t?void 0:t.requireProtocol)&&null===n)throw new Error(`Missing protocol (${n})`);const i=void 0!==r[3]?decodeURIComponent(r[2]):null;if((null==t?void 0:t.requireSource)&&null===i)throw new Error(`Missing source (${e})`);const s=void 0!==r[3]?decodeURIComponent(r[3]):decodeURIComponent(r[2]);return{protocol:n,source:i,selector:(null==t?void 0:t.parseSelector)?o().parse(s):s,params:void 0!==r[4]?o().parse(r[4]):null}}function P(e,{protocol:t}){const{selector:r,params:n}=_(e,{requireProtocol:t,requireBindings:!0});if("string"!=typeof n.locator)throw new Error("Assertion failed: Invalid bindings for "+e);return{parentLocator:K(n.locator,!0),path:r}}function O(e){return e=(e=(e=e.replace(/%/g,"%25")).replace(/:/g,"%3A")).replace(/#/g,"%23")}function U({protocol:e,source:t,selector:r,params:n}){let i="";return null!==e&&(i+=""+e),null!==t&&(i+=O(t)+"#"),i+=O(r),function(e){return null!==e&&Object.entries(e).length>0}(n)&&(i+="::"+o().stringify(n)),i}function j(e){const{params:t,protocol:r,source:n,selector:i}=_(e);for(const e in t)e.startsWith("__")&&delete t[e];return U({protocol:r,source:n,params:t,selector:i})}function Y(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function G(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function J(e){return e.scope?`@${e.scope}/${e.name}@${e.range}`:`${e.name}@${e.range}`}function H(e){return e.scope?`@${e.scope}/${e.name}@${e.reference}`:`${e.name}@${e.reference}`}function z(e){return null!==e.scope?`@${e.scope}-${e.name}`:e.name}function q(e){const{protocol:t,selector:r}=_(e.reference),i=null!==t?t.replace(/:$/,""):"exotic",o=A().valid(r),s=null!==o?`${i}-${o}`:""+i,a=(e.scope,`${z(e)}-${s}-${e.locatorHash.slice(0,10)}`);return(0,n.Zu)(a)}function W(e,t){return t.scope?`${e.format(`@${t.scope}/`,a.a5.SCOPE)}${e.format(t.name,a.a5.NAME)}`:""+e.format(t.name,a.a5.NAME)}function V(e){if(e.startsWith("virtual:")){return`${V(e.substr(e.indexOf("#")+1))} [${e.substr("virtual:".length,5)}]`}return e.replace(/\?.*/,"?[...]")}function X(e,t){return""+e.format(V(t),a.a5.RANGE)}function Z(e,t){return`${W(e,t)}${e.format("@",a.a5.RANGE)}${X(e,t.range)}`}function $(e,t){return""+e.format(V(t),a.a5.REFERENCE)}function ee(e,t){return`${W(e,t)}${e.format("@",a.a5.REFERENCE)}${$(e,t.reference)}`}function te(e){return`${G(e)}@${V(e.reference)}`}function re(e){return u.sortMap(e,[e=>G(e),e=>e.range])}function ne(e,t){return W(e,t.locator)}function ie(e){return"node_modules/"+Y(e)}},32485:(e,t,r)=>{"use strict";var n;r.d(t,{U:()=>n}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(n||(n={}))},14626:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var n=r(42096);class i extends n.p{constructor(e,{baseFs:t,pathUtils:r}){super(r),this.target=e,this.baseFs=t}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}},75448:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(78420),i=r(42096),o=r(46009);class s extends i.p{constructor(e,{baseFs:t=new n.S}={}){super(o.y1),this.target=this.pathUtils.normalize(e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?o.y1.normalize(e):this.baseFs.resolve(o.y1.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}},35398:(e,t,r)=>{"use strict";r.d(t,{uY:()=>a,fS:()=>c,qH:()=>u});var n=r(12087),i=r(35747),o=r.n(i),s=r(46009);async function A(e,t,r,n,i,a,c){const u=await async function(e,t){try{return await e.lstatPromise(t)}catch(e){return null}}(r,n),l=await i.lstatPromise(a);switch(c.stableTime?t.push([n,315532800,315532800]):t.push([n,l.atime,l.mtime]),!0){case l.isDirectory():await async function(e,t,r,n,i,o,s,a,c){if(null!==i&&!i.isDirectory()){if(!c.overwrite)return;e.push(async()=>r.removePromise(n)),i=null}null===i&&e.push(async()=>r.mkdirPromise(n,{mode:a.mode}));const u=await o.readdirPromise(s);if(c.stableSort)for(const i of u.sort())await A(e,t,r,r.pathUtils.join(n,i),o,o.pathUtils.join(s,i),c);else await Promise.all(u.map(async i=>{await A(e,t,r,r.pathUtils.join(n,i),o,o.pathUtils.join(s,i),c)}))}(e,t,r,n,u,i,a,l,c);break;case l.isFile():await async function(e,t,r,n,i,s,A,a,c){if(null!==i){if(!c.overwrite)return;e.push(async()=>r.removePromise(n)),i=null}r===s?e.push(async()=>r.copyFilePromise(A,n,o().constants.COPYFILE_FICLONE)):e.push(async()=>r.writeFilePromise(n,await s.readFilePromise(A)))}(e,0,r,n,u,i,a,0,c);break;case l.isSymbolicLink():await async function(e,t,r,n,i,o,A,a,c){if(null!==i){if(!c.overwrite)return;e.push(async()=>r.removePromise(n)),i=null}const u=await o.readlinkPromise(A);e.push(async()=>r.symlinkPromise((0,s.CI)(r.pathUtils,u),n))}(e,0,r,n,u,i,a,0,c);break;default:throw new Error(`Unsupported file type (${l.mode})`)}e.push(async()=>r.chmodPromise(n,511&l.mode))}class a{constructor(e){this.pathUtils=e}async removePromise(e){let t;try{t=await this.lstatPromise(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(t.isDirectory()){for(const t of await this.readdirPromise(e))await this.removePromise(this.pathUtils.resolve(e,t));for(let t=0;t<5;++t)try{await this.rmdirPromise(e);break}catch(e){if("EBUSY"===e.code||"ENOTEMPTY"===e.code){await new Promise(e=>setTimeout(e,100*t));continue}throw e}}else await this.unlinkPromise(e)}removeSync(e){let t;try{t=this.lstatSync(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(t.isDirectory()){for(const t of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,t));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:t,utimes:r}={}){if((e=this.resolve(e))===this.pathUtils.dirname(e))return;const n=e.split(this.pathUtils.sep);for(let e=2;e<=n.length;++e){const i=n.slice(0,e).join(this.pathUtils.sep);if(!this.existsSync(i)){try{await this.mkdirPromise(i)}catch(e){if("EEXIST"===e.code)continue;throw e}if(null!=t&&await this.chmodPromise(i,t),null!=r)await this.utimesPromise(i,r[0],r[1]);else{const e=await this.statPromise(this.pathUtils.dirname(i));await this.utimesPromise(i,e.atime,e.mtime)}}}}mkdirpSync(e,{chmod:t,utimes:r}={}){if((e=this.resolve(e))===this.pathUtils.dirname(e))return;const n=e.split(this.pathUtils.sep);for(let e=2;e<=n.length;++e){const i=n.slice(0,e).join(this.pathUtils.sep);if(!this.existsSync(i)){try{this.mkdirSync(i)}catch(e){if("EEXIST"===e.code)continue;throw e}if(null!=t&&this.chmodSync(i,t),null!=r)this.utimesSync(i,r[0],r[1]);else{const e=this.statSync(this.pathUtils.dirname(i));this.utimesSync(i,e.atime,e.mtime)}}}}async copyPromise(e,t,{baseFs:r=this,overwrite:n=!0,stableSort:i=!1,stableTime:o=!1}={}){return await async function(e,t,r,n,i){const o=e.pathUtils.normalize(t),s=r.pathUtils.normalize(n),a=[],c=[];await e.mkdirpPromise(t),await A(a,c,e,o,r,s,i);for(const e of a)await e();const u="function"==typeof e.lutimesPromise?e.lutimesPromise.bind(e):e.utimesPromise.bind(e);for(const[e,t,r]of c)await u(e,t,r)}(this,e,r,t,{overwrite:n,stableSort:i,stableTime:o})}copySync(e,t,{baseFs:r=this,overwrite:n=!0}={}){const i=r.lstatSync(t),o=this.existsSync(e);if(i.isDirectory()){this.mkdirpSync(e);const i=r.readdirSync(t);for(const o of i)this.copySync(this.pathUtils.join(e,o),r.pathUtils.join(t,o),{baseFs:r,overwrite:n})}else if(i.isFile()){if(!o||n){o&&this.removeSync(e);const n=r.readFileSync(t);this.writeFileSync(e,n)}}else{if(!i.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${i.mode.toString(8).padStart(6,"0")})`);if(!o||n){o&&this.removeSync(e);const n=r.readlinkSync(t);this.symlinkSync((0,s.CI)(this.pathUtils,n),e)}}const A=511&i.mode;this.chmodSync(e,A)}async changeFilePromise(e,t,{automaticNewlines:r}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch(e){}const i=r?u(n,t):t;n!==i&&await this.writeFilePromise(e,i)}changeFileSync(e,t,{automaticNewlines:r=!1}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch(e){}const i=r?u(n,t):t;n!==i&&this.writeFileSync(e,i)}async movePromise(e,t){try{await this.renamePromise(e,t)}catch(r){if("EXDEV"!==r.code)throw r;await this.copyPromise(t,e),await this.removePromise(e)}}moveSync(e,t){try{this.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;this.copySync(t,e),this.removeSync(e)}}async lockPromise(e,t){const r=e+".flock",n=Date.now();let i=null;const o=async()=>{let e;try{[e]=await this.readJsonPromise(r)}catch(e){return Date.now()-n<500}try{return process.kill(e,0),!0}catch(e){return!1}};for(;null===i;)try{i=await this.openPromise(r,"wx")}catch(e){if("EEXIST"!==e.code)throw e;if(!await o())try{await this.unlinkPromise(r);continue}catch(e){}if(!(Date.now()-n<6e4))throw new Error(`Couldn't acquire a lock in a reasonable time (via ${r})`);await new Promise(e=>setTimeout(e,1e3/60))}await this.writePromise(i,JSON.stringify([process.pid]));try{return await t()}finally{try{await this.unlinkPromise(r),await this.closePromise(i)}catch(e){}}}async readJsonPromise(e){const t=await this.readFilePromise(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}async readJsonSync(e){const t=this.readFileSync(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}async writeJsonPromise(e,t){return await this.writeFilePromise(e,JSON.stringify(t,null,2)+"\n")}writeJsonSync(e,t){return this.writeFileSync(e,JSON.stringify(t,null,2)+"\n")}async preserveTimePromise(e,t){const r=await this.lstatPromise(e),n=await t();void 0!==n&&(e=n),this.lutimesPromise?await this.lutimesPromise(e,r.atime,r.mtime):r.isSymbolicLink()||await this.utimesPromise(e,r.atime,r.mtime)}async preserveTimeSync(e,t){const r=this.lstatSync(e),n=t();void 0!==n&&(e=n),this.lutimesSync?this.lutimesSync(e,r.atime,r.mtime):r.isSymbolicLink()||this.utimesSync(e,r.atime,r.mtime)}}a.DEFAULT_TIME=315532800;class c extends a{constructor(){super(s.y1)}}function u(e,t){return t.replace(/\r?\n/g,function(e){const t=e.match(/\r?\n/g);if(null===t)return n.EOL;const r=t.filter(e=>"\r\n"===e).length;return r>t.length-r?"\r\n":"\n"}(e))}},10489:(e,t,r)=>{"use strict";r.d(t,{n:()=>A});var n=r(78420),i=r(42096),o=r(46009);const s=o.LZ.root;class A extends i.p{constructor(e,{baseFs:t=new n.S}={}){super(o.y1),this.target=this.pathUtils.resolve(o.LZ.root,e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(o.LZ.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){const t=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(s,e));if(t.match(/^\.\.\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(s,this.pathUtils.relative(this.target,e))}}},15037:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(42096);class i extends n.p{constructor(e,t){super(t),this.instance=null,this.factory=e}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(e){this.instance=e}mapFromBase(e){return e}mapToBase(e){return e}}},78420:(e,t,r)=>{"use strict";r.d(t,{S:()=>a});var n=r(35747),i=r.n(n),o=r(35398),s=r(26984),A=r(46009);class a extends o.fS{constructor(e=i()){super(),this.realFs=e,void 0!==this.realFs.lutimes&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return A.LZ.root}resolve(e){return A.y1.resolve(e)}async openPromise(e,t,r){return await new Promise((n,i)=>{this.realFs.open(A.cS.fromPortablePath(e),t,r,this.makeCallback(n,i))})}openSync(e,t,r){return this.realFs.openSync(A.cS.fromPortablePath(e),t,r)}async readPromise(e,t,r=0,n=0,i=-1){return await new Promise((o,s)=>{this.realFs.read(e,t,r,n,i,(e,t)=>{e?s(e):o(t)})})}readSync(e,t,r,n,i){return this.realFs.readSync(e,t,r,n,i)}async writePromise(e,t,r,n,i){return await new Promise((o,s)=>"string"==typeof t?this.realFs.write(e,t,r,this.makeCallback(o,s)):this.realFs.write(e,t,r,n,i,this.makeCallback(o,s)))}writeSync(e,t,r,n,i){return"string"==typeof t?this.realFs.writeSync(e,t,r):this.realFs.writeSync(e,t,r,n,i)}async closePromise(e){await new Promise((t,r)=>{this.realFs.close(e,this.makeCallback(t,r))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,t){const r=null!==e?A.cS.fromPortablePath(e):e;return this.realFs.createReadStream(r,t)}createWriteStream(e,t){const r=null!==e?A.cS.fromPortablePath(e):e;return this.realFs.createWriteStream(r,t)}async realpathPromise(e){return await new Promise((t,r)=>{this.realFs.realpath(A.cS.fromPortablePath(e),{},this.makeCallback(t,r))}).then(e=>A.cS.toPortablePath(e))}realpathSync(e){return A.cS.toPortablePath(this.realFs.realpathSync(A.cS.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(t=>{this.realFs.exists(A.cS.fromPortablePath(e),t)})}accessSync(e,t){return this.realFs.accessSync(A.cS.fromPortablePath(e),t)}async accessPromise(e,t){return await new Promise((r,n)=>{this.realFs.access(A.cS.fromPortablePath(e),t,this.makeCallback(r,n))})}existsSync(e){return this.realFs.existsSync(A.cS.fromPortablePath(e))}async statPromise(e){return await new Promise((t,r)=>{this.realFs.stat(A.cS.fromPortablePath(e),this.makeCallback(t,r))})}statSync(e){return this.realFs.statSync(A.cS.fromPortablePath(e))}async lstatPromise(e){return await new Promise((t,r)=>{this.realFs.lstat(A.cS.fromPortablePath(e),this.makeCallback(t,r))})}lstatSync(e){return this.realFs.lstatSync(A.cS.fromPortablePath(e))}async chmodPromise(e,t){return await new Promise((r,n)=>{this.realFs.chmod(A.cS.fromPortablePath(e),t,this.makeCallback(r,n))})}chmodSync(e,t){return this.realFs.chmodSync(A.cS.fromPortablePath(e),t)}async renamePromise(e,t){return await new Promise((r,n)=>{this.realFs.rename(A.cS.fromPortablePath(e),A.cS.fromPortablePath(t),this.makeCallback(r,n))})}renameSync(e,t){return this.realFs.renameSync(A.cS.fromPortablePath(e),A.cS.fromPortablePath(t))}async copyFilePromise(e,t,r=0){return await new Promise((n,i)=>{this.realFs.copyFile(A.cS.fromPortablePath(e),A.cS.fromPortablePath(t),r,this.makeCallback(n,i))})}copyFileSync(e,t,r=0){return this.realFs.copyFileSync(A.cS.fromPortablePath(e),A.cS.fromPortablePath(t),r)}async appendFilePromise(e,t,r){return await new Promise((n,i)=>{const o="string"==typeof e?A.cS.fromPortablePath(e):e;r?this.realFs.appendFile(o,t,r,this.makeCallback(n,i)):this.realFs.appendFile(o,t,this.makeCallback(n,i))})}appendFileSync(e,t,r){const n="string"==typeof e?A.cS.fromPortablePath(e):e;r?this.realFs.appendFileSync(n,t,r):this.realFs.appendFileSync(n,t)}async writeFilePromise(e,t,r){return await new Promise((n,i)=>{const o="string"==typeof e?A.cS.fromPortablePath(e):e;r?this.realFs.writeFile(o,t,r,this.makeCallback(n,i)):this.realFs.writeFile(o,t,this.makeCallback(n,i))})}writeFileSync(e,t,r){const n="string"==typeof e?A.cS.fromPortablePath(e):e;r?this.realFs.writeFileSync(n,t,r):this.realFs.writeFileSync(n,t)}async unlinkPromise(e){return await new Promise((t,r)=>{this.realFs.unlink(A.cS.fromPortablePath(e),this.makeCallback(t,r))})}unlinkSync(e){return this.realFs.unlinkSync(A.cS.fromPortablePath(e))}async utimesPromise(e,t,r){return await new Promise((n,i)=>{this.realFs.utimes(A.cS.fromPortablePath(e),t,r,this.makeCallback(n,i))})}utimesSync(e,t,r){this.realFs.utimesSync(A.cS.fromPortablePath(e),t,r)}async lutimesPromiseImpl(e,t,r){const n=this.realFs.lutimes;if(void 0===n)throw(0,s.bk)("unavailable Node binding",`lutimes '${e}'`);return await new Promise((i,o)=>{n.call(this.realFs,A.cS.fromPortablePath(e),t,r,this.makeCallback(i,o))})}lutimesSyncImpl(e,t,r){const n=this.realFs.lutimesSync;if(void 0===n)throw(0,s.bk)("unavailable Node binding",`lutimes '${e}'`);n.call(this.realFs,A.cS.fromPortablePath(e),t,r)}async mkdirPromise(e,t){return await new Promise((r,n)=>{this.realFs.mkdir(A.cS.fromPortablePath(e),t,this.makeCallback(r,n))})}mkdirSync(e,t){return this.realFs.mkdirSync(A.cS.fromPortablePath(e),t)}async rmdirPromise(e){return await new Promise((t,r)=>{this.realFs.rmdir(A.cS.fromPortablePath(e),this.makeCallback(t,r))})}rmdirSync(e){return this.realFs.rmdirSync(A.cS.fromPortablePath(e))}async symlinkPromise(e,t,r){const n=r||(e.endsWith("/")?"dir":"file");return await new Promise((r,i)=>{this.realFs.symlink(A.cS.fromPortablePath(e.replace(/\/+$/,"")),A.cS.fromPortablePath(t),n,this.makeCallback(r,i))})}symlinkSync(e,t,r){const n=r||(e.endsWith("/")?"dir":"file");return this.realFs.symlinkSync(A.cS.fromPortablePath(e.replace(/\/+$/,"")),A.cS.fromPortablePath(t),n)}async readFilePromise(e,t){return await new Promise((r,n)=>{const i="string"==typeof e?A.cS.fromPortablePath(e):e;this.realFs.readFile(i,t,this.makeCallback(r,n))})}readFileSync(e,t){const r="string"==typeof e?A.cS.fromPortablePath(e):e;return this.realFs.readFileSync(r,t)}async readdirPromise(e,{withFileTypes:t}={}){return await new Promise((r,n)=>{t?this.realFs.readdir(A.cS.fromPortablePath(e),{withFileTypes:!0},this.makeCallback(r,n)):this.realFs.readdir(A.cS.fromPortablePath(e),this.makeCallback(e=>r(e),n))})}readdirSync(e,{withFileTypes:t}={}){return t?this.realFs.readdirSync(A.cS.fromPortablePath(e),{withFileTypes:!0}):this.realFs.readdirSync(A.cS.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((t,r)=>{this.realFs.readlink(A.cS.fromPortablePath(e),this.makeCallback(t,r))}).then(e=>A.cS.toPortablePath(e))}readlinkSync(e){return A.cS.toPortablePath(this.realFs.readlinkSync(A.cS.fromPortablePath(e)))}watch(e,t,r){return this.realFs.watch(A.cS.fromPortablePath(e),t,r)}makeCallback(e,t){return(r,n)=>{r?t(r):e(n)}}}},39725:(e,t,r)=>{"use strict";r.d(t,{i:()=>o});var n=r(42096),i=r(46009);class o extends n.p{constructor(e){super(i.cS),this.baseFs=e}mapFromBase(e){return i.cS.fromPortablePath(e)}mapToBase(e){return i.cS.toPortablePath(e)}}},42096:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var n=r(35398);class i extends n.uY{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}openPromise(e,t,r){return this.baseFs.openPromise(this.mapToBase(e),t,r)}openSync(e,t,r){return this.baseFs.openSync(this.mapToBase(e),t,r)}async readPromise(e,t,r,n,i){return await this.baseFs.readPromise(e,t,r,n,i)}readSync(e,t,r,n,i){return this.baseFs.readSync(e,t,r,n,i)}async writePromise(e,t,r,n,i){return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,n,i)}writeSync(e,t,r,n,i){return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,n,i)}closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,t){return this.baseFs.createReadStream(null!==e?this.mapToBase(e):e,t)}createWriteStream(e,t){return this.baseFs.createWriteStream(null!==e?this.mapToBase(e):e,t)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,t){return this.baseFs.accessSync(this.mapToBase(e),t)}accessPromise(e,t){return this.baseFs.accessPromise(this.mapToBase(e),t)}statPromise(e){return this.baseFs.statPromise(this.mapToBase(e))}statSync(e){return this.baseFs.statSync(this.mapToBase(e))}lstatPromise(e){return this.baseFs.lstatPromise(this.mapToBase(e))}lstatSync(e){return this.baseFs.lstatSync(this.mapToBase(e))}chmodPromise(e,t){return this.baseFs.chmodPromise(this.mapToBase(e),t)}chmodSync(e,t){return this.baseFs.chmodSync(this.mapToBase(e),t)}renamePromise(e,t){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(t))}renameSync(e,t){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(t))}copyFilePromise(e,t,r=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(t),r)}copyFileSync(e,t,r=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(t),r)}appendFilePromise(e,t,r){return this.baseFs.appendFilePromise(this.fsMapToBase(e),t,r)}appendFileSync(e,t,r){return this.baseFs.appendFileSync(this.fsMapToBase(e),t,r)}writeFilePromise(e,t,r){return this.baseFs.writeFilePromise(this.fsMapToBase(e),t,r)}writeFileSync(e,t,r){return this.baseFs.writeFileSync(this.fsMapToBase(e),t,r)}unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}utimesPromise(e,t,r){return this.baseFs.utimesPromise(this.mapToBase(e),t,r)}utimesSync(e,t,r){return this.baseFs.utimesSync(this.mapToBase(e),t,r)}mkdirPromise(e,t){return this.baseFs.mkdirPromise(this.mapToBase(e),t)}mkdirSync(e,t){return this.baseFs.mkdirSync(this.mapToBase(e),t)}rmdirPromise(e){return this.baseFs.rmdirPromise(this.mapToBase(e))}rmdirSync(e){return this.baseFs.rmdirSync(this.mapToBase(e))}symlinkPromise(e,t,r){return this.baseFs.symlinkPromise(this.mapToBase(e),this.mapToBase(t),r)}symlinkSync(e,t,r){return this.baseFs.symlinkSync(this.mapToBase(e),this.mapToBase(t),r)}readFilePromise(e,t){return this.baseFs.readFilePromise(this.fsMapToBase(e),t)}readFileSync(e,t){return this.baseFs.readFileSync(this.fsMapToBase(e),t)}async readdirPromise(e,{withFileTypes:t}={}){return this.baseFs.readdirPromise(this.mapToBase(e),{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){return this.baseFs.readdirSync(this.mapToBase(e),{withFileTypes:t})}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}watch(e,t,r){return this.baseFs.watch(this.mapToBase(e),t,r)}fsMapToBase(e){return"number"==typeof e?e:this.mapToBase(e)}}},17674:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var n=r(78420),i=r(42096),o=r(46009);const s=/^[0-9]+$/,A=/^(\/(?:[^/]+\/)*?\$\$virtual)((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,a=/^([^/]+-)?[a-f0-9]+$/;class c extends i.p{constructor({baseFs:e=new n.S}={}){super(o.y1),this.baseFs=e}static makeVirtualPath(e,t,r){if("$$virtual"!==o.y1.basename(e))throw new Error('Assertion failed: Virtual folders must be named "$$virtual"');if(!o.y1.basename(t).match(a))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");const n=o.y1.relative(o.y1.dirname(e),r).split("/");let i=0;for(;i{"use strict";r.d(t,{k:()=>u,d:()=>g});var n=r(35747),i=r(92413),o=r(31669),s=r(35398),A=r(78420),a=r(26984),c=r(46009);const u="mixed";class l{constructor(){this.dev=0,this.ino=0,this.mode=0,this.nlink=1,this.rdev=0,this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return 16384==(61440&this.mode)}isFIFO(){return!1}isFile(){return 32768==(61440&this.mode)}isSocket(){return!1}isSymbolicLink(){return 40960==(61440&this.mode)}}function h(){return Object.assign(new l,{uid:0,gid:0,size:0,blksize:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date(0),mtime:new Date(0),ctime:new Date(0),birthtime:new Date(0),mode:33188})}class g extends s.fS{constructor(e,t){super(),this.lzSource=null,this.listings=new Map,this.entries=new Map,this.fds=new Map,this.nextFd=0,this.ready=!1,this.readOnly=!1,this.libzip=t.libzip;const r=t;if(this.level=void 0!==r.level?r.level:u,null===e&&(e=Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),"string"==typeof e){const{baseFs:t=new A.S}=r;this.baseFs=t,this.path=e}else this.path=null,this.baseFs=null;if(t.stats)this.stats=t.stats;else if("string"==typeof e)try{this.stats=this.baseFs.statSync(e)}catch(e){if("ENOENT"!==e.code||!r.create)throw e;this.stats=h()}else this.stats=h();const n=this.libzip.malloc(4);try{let i=0;if("string"==typeof e&&r.create&&(i|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE),t.readOnly&&(i|=this.libzip.ZIP_RDONLY,this.readOnly=!0),"string"==typeof e)this.zip=this.libzip.open(c.cS.fromPortablePath(e),i,n);else{const t=this.allocateUnattachedSource(e);try{this.zip=this.libzip.openFromSource(t,i,n),this.lzSource=t}catch(e){throw this.libzip.source.free(t),e}}if(0===this.zip){const e=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(e,this.libzip.getValue(n,"i32")),new Error(this.libzip.error.strerror(e))}}finally{this.libzip.free(n)}this.listings.set(c.LZ.root,new Set);const i=this.libzip.getNumEntries(this.zip,0);for(let e=0;ee)throw new Error("Overread");const n=this.libzip.HEAPU8.subarray(t,t+e);return Buffer.from(n)}finally{this.libzip.free(t)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(!this.ready)throw a.Vw("archive closed, close");if(this.readOnly)return void this.discardAndClose();const e=this.baseFs.existsSync(this.path)?511&this.baseFs.statSync(this.path).mode:null;if(-1===this.libzip.close(this.zip))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));null===e?this.baseFs.chmodSync(this.path,this.stats.mode):e!==(511&this.baseFs.statSync(this.path).mode)&&this.baseFs.chmodSync(this.path,e),this.ready=!1}discardAndClose(){if(!this.ready)throw a.Vw("archive closed, close");this.libzip.discard(this.zip),this.ready=!1}resolve(e){return c.y1.resolve(c.LZ.root,e)}async openPromise(e,t,r){return this.openSync(e,t,r)}openSync(e,t,r){const n=this.nextFd++;return this.fds.set(n,{cursor:0,p:e}),n}async readPromise(e,t,r,n,i){return this.readSync(e,t,r,n,i)}readSync(e,t,r=0,n=0,i=-1){const o=this.fds.get(e);if(void 0===o)throw a.Ch("read");let s;s=-1===i||null===i?o.cursor:i;const A=this.readFileSync(o.p);A.copy(t,r,s,s+n);const c=Math.max(0,Math.min(A.length-s,n));return-1!==i&&null!==i||(o.cursor+=c),c}async writePromise(e,t,r,n,i){return"string"==typeof t?this.writeSync(e,t,i):this.writeSync(e,t,r,n,i)}writeSync(e,t,r,n,i){if(void 0===this.fds.get(e))throw a.Ch("read");throw new Error("Unimplemented")}async closePromise(e){return this.closeSync(e)}closeSync(e){if(void 0===this.fds.get(e))throw a.Ch("read");this.fds.delete(e)}createReadStream(e,{encoding:t}={}){if(null===e)throw new Error("Unimplemented");const r=Object.assign(new i.PassThrough,{bytesRead:0,path:e,close:()=>{clearImmediate(n)}}),n=setImmediate(()=>{try{const n=this.readFileSync(e,t);r.bytesRead=n.length,r.write(n),r.end()}catch(e){r.emit("error",e),r.end()}});return r}createWriteStream(e,{encoding:t}={}){if(this.readOnly)throw a.YW(`open '${e}'`);if(null===e)throw new Error("Unimplemented");const r=Object.assign(new i.PassThrough,{bytesWritten:0,path:e,close:()=>{r.end()}}),n=[];return r.on("data",e=>{const t=Buffer.from(e);r.bytesWritten+=t.length,n.push(t)}),r.on("end",()=>{this.writeFileSync(e,Buffer.concat(n),t)}),r}async realpathPromise(e){return this.realpathSync(e)}realpathSync(e){const t=this.resolveFilename(`lstat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw a.z6(`lstat '${e}'`);return t}async existsPromise(e){return this.existsSync(e)}existsSync(e){let t;try{t=this.resolveFilename(`stat '${e}'`,e)}catch(e){return!1}return this.entries.has(t)||this.listings.has(t)}async accessPromise(e,t){return this.accessSync(e,t)}accessSync(e,t=n.constants.F_OK){const r=this.resolveFilename(`access '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw a.z6(`access '${e}'`);if(this.readOnly&&t&n.constants.W_OK)throw a.YW(`access '${e}'`)}async statPromise(e){return this.statSync(e)}statSync(e){const t=this.resolveFilename(`stat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw a.z6(`stat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw a.Ab(`stat '${e}'`);return this.statImpl(`stat '${e}'`,t)}async lstatPromise(e){return this.lstatSync(e)}lstatSync(e){const t=this.resolveFilename(`lstat '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw a.z6(`lstat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw a.Ab(`lstat '${e}'`);return this.statImpl(`lstat '${e}'`,t)}statImpl(e,t){const r=this.entries.get(t);if(void 0!==r){const e=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,r,0,0,e))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));const n=this.stats.uid,i=this.stats.gid,o=this.libzip.struct.statSize(e)>>>0,s=512,A=Math.ceil(o/s),a=1e3*(this.libzip.struct.statMtime(e)>>>0),c=a,u=a,h=a,g=new Date(c),f=new Date(u),p=new Date(h),d=new Date(a),C=this.listings.has(t)?16384:this.isSymbolicLink(r)?40960:32768,E=16384===C?493:420,I=C|511&this.getUnixMode(r,E);return Object.assign(new l,{uid:n,gid:i,size:o,blksize:s,blocks:A,atime:g,birthtime:f,ctime:p,mtime:d,atimeMs:c,birthtimeMs:u,ctimeMs:h,mtimeMs:a,mode:I})}if(this.listings.has(t)){const e=this.stats.uid,t=this.stats.gid,r=0,n=512,i=0,o=this.stats.mtimeMs,s=this.stats.mtimeMs,A=this.stats.mtimeMs,a=this.stats.mtimeMs,c=new Date(o),u=new Date(s),h=new Date(A),g=new Date(a),f=16877;return Object.assign(new l,{uid:e,gid:t,size:r,blksize:n,blocks:i,atime:c,birthtime:u,ctime:h,mtime:g,atimeMs:o,birthtimeMs:s,ctimeMs:A,mtimeMs:a,mode:f})}throw new Error("Unreachable")}getUnixMode(e,t){if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?t:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(e){let t=this.listings.get(e);if(t)return t;const r=this.registerListing(c.y1.dirname(e));return t=new Set,r.add(c.y1.basename(e)),this.listings.set(e,t),t}registerEntry(e,t){this.registerListing(c.y1.dirname(e)).add(c.y1.basename(e)),this.entries.set(e,t)}resolveFilename(e,t,r=!0){if(!this.ready)throw a.Vw("archive closed, "+e);let n=c.y1.resolve(c.LZ.root,t);if("/"===n)return c.LZ.root;const i=this.entries.get(n);if(r&&void 0!==i){if(this.isSymbolicLink(i)){const t=this.getFileSource(i).toString();return this.resolveFilename(e,c.y1.resolve(c.y1.dirname(n),t),!0)}return n}for(;;){const t=this.resolveFilename(e,c.y1.dirname(n),!0),i=this.listings.has(t),o=this.entries.has(t);if(!i&&!o)throw a.z6(e);if(!i)throw a.Ab(e);if(n=c.y1.resolve(t,c.y1.basename(n)),!r)break;const s=this.libzip.name.locate(this.zip,n.slice(1));if(-1===s)break;if(!this.isSymbolicLink(s))break;{const e=this.getFileSource(s).toString();n=c.y1.resolve(c.y1.dirname(n),e)}}return n}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));const t=this.libzip.malloc(e.byteLength);if(!t)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,t,e.byteLength).set(e),{buffer:t,byteLength:e.byteLength}}allocateUnattachedSource(e){const t=this.libzip.struct.errorS(),{buffer:r,byteLength:n}=this.allocateBuffer(e),i=this.libzip.source.fromUnattachedBuffer(r,n,0,!0,t);if(0===i)throw this.libzip.free(t),new Error(this.libzip.error.strerror(t));return i}allocateSource(e){const{buffer:t,byteLength:r}=this.allocateBuffer(e),n=this.libzip.source.fromBuffer(this.zip,t,r,0,!0);if(0===n)throw this.libzip.free(t),new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));return n}setFileSource(e,t){const r=c.y1.relative(c.LZ.root,e),n=this.allocateSource(t);try{const e=this.libzip.file.add(this.zip,r,n,this.libzip.ZIP_FL_OVERWRITE);if("mixed"!==this.level){let t;t=0===this.level?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(-1===this.libzip.file.setCompression(this.zip,e,0,t,this.level))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)))}return e}catch(e){throw this.libzip.source.free(n),e}}isSymbolicLink(e){if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));if(this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX)return!1;return 40960==(61440&this.libzip.getValue(this.libzip.uint32S,"i32")>>>16)}getFileSource(e){const t=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,e,0,0,t))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));const r=this.libzip.struct.statSize(t),n=this.libzip.malloc(r);try{const t=this.libzip.fopenIndex(this.zip,e,0,0);if(0===t)throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));try{const e=this.libzip.fread(t,n,r,0);if(-1===e)throw new Error(this.libzip.error.strerror(this.libzip.file.getError(t)));if(er)throw new Error("Overread");const i=this.libzip.HEAPU8.subarray(n,n+r);return Buffer.from(i)}finally{this.libzip.fclose(t)}}finally{this.libzip.free(n)}}async chmodPromise(e,t){return this.chmodSync(e,t)}chmodSync(e,t){if(this.readOnly)throw a.YW(`chmod '${e}'`);t&=493;const r=this.resolveFilename(`chmod '${e}'`,e,!1),n=this.entries.get(r);if(void 0===n)throw new Error(`Assertion failed: The entry should have been registered (${r})`);const i=-512&this.getUnixMode(n,32768)|t;if(-1===this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,i<<16))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)))}async renamePromise(e,t){return this.renameSync(e,t)}renameSync(e,t){throw new Error("Unimplemented")}async copyFilePromise(e,t,r){return this.copyFileSync(e,t,r)}copyFileSync(e,t,r=0){if(this.readOnly)throw a.YW(`copyfile '${e} -> '${t}'`);if(0!=(r&n.constants.COPYFILE_FICLONE_FORCE))throw a.bk("unsupported clone operation",`copyfile '${e}' -> ${t}'`);const i=this.resolveFilename(`copyfile '${e} -> ${t}'`,e),o=this.entries.get(i);if(void 0===o)throw a.hq(`copyfile '${e}' -> '${t}'`);const s=this.resolveFilename(`copyfile '${e}' -> ${t}'`,t),A=this.entries.get(s);if(0!=(r&(n.constants.COPYFILE_EXCL|n.constants.COPYFILE_FICLONE_FORCE))&&void 0!==A)throw a.cT(`copyfile '${e}' -> '${t}'`);const c=this.getFileSource(o),u=this.setFileSource(s,c);u!==A&&this.registerEntry(s,u)}async appendFilePromise(e,t,r){return this.appendFileSync(e,t,r)}appendFileSync(e,t,r={}){if(this.readOnly)throw a.YW(`open '${e}'`);return void 0===r?r={flag:"a"}:"string"==typeof r?r={flag:"a",encoding:r}:void 0===r.flag&&(r={flag:"a",...r}),this.writeFileSync(e,t,r)}async writeFilePromise(e,t,r){return this.writeFileSync(e,t,r)}writeFileSync(e,t,r){if("string"!=typeof e)throw a.Ch("read");if(this.readOnly)throw a.YW(`open '${e}'`);const n=this.resolveFilename(`open '${e}'`,e);if(this.listings.has(n))throw a.GA(`open '${e}'`);const i=this.entries.get(n);void 0!==i&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([this.getFileSource(i),Buffer.from(t)]));let o=null;"string"==typeof r?o=r:"object"==typeof r&&r.encoding&&(o=r.encoding),null!==o&&(t=t.toString(o));const s=this.setFileSource(n,t);s!==i&&this.registerEntry(n,s)}async unlinkPromise(e){return this.unlinkSync(e)}unlinkSync(e){throw new Error("Unimplemented")}async utimesPromise(e,t,r){return this.utimesSync(e,t,r)}utimesSync(e,t,r){if(this.readOnly)throw a.YW(`utimes '${e}'`);const n=this.resolveFilename(`utimes '${e}'`,e);this.utimesImpl(n,r)}async lutimesPromise(e,t,r){return this.lutimesSync(e,t,r)}lutimesSync(e,t,r){if(this.readOnly)throw a.YW(`lutimes '${e}'`);const n=this.resolveFilename(`utimes '${e}'`,e,!1);this.utimesImpl(n,r)}utimesImpl(e,t){this.listings.has(e)&&(this.entries.has(e)||this.hydrateDirectory(e));const r=this.entries.get(e);if(void 0===r)throw new Error("Unreachable");if(-1===this.libzip.file.setMtime(this.zip,r,0,function(e){if("string"==typeof e&&String(+e)===e)return+e;if(Number.isFinite(e))return e<0?Date.now()/1e3:e;if((0,o.isDate)(e))return e.getTime()/1e3;throw new Error("Invalid time")}(t),0))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)))}async mkdirPromise(e,t){return this.mkdirSync(e,t)}mkdirSync(e,{mode:t=493,recursive:r=!1}={}){if(r)return void this.mkdirpSync(e,{chmod:t});if(this.readOnly)throw a.YW(`mkdir '${e}'`);const n=this.resolveFilename(`mkdir '${e}'`,e);if(this.entries.has(n)||this.listings.has(n))throw a.cT(`mkdir '${e}'`);this.hydrateDirectory(n),this.chmodSync(n,t)}async rmdirPromise(e){return this.rmdirSync(e)}rmdirSync(e){throw new Error("Unimplemented")}hydrateDirectory(e){const t=this.libzip.dir.add(this.zip,c.y1.relative(c.LZ.root,e));if(-1===t)throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));return this.registerListing(e),this.registerEntry(e,t),t}async symlinkPromise(e,t){return this.symlinkSync(e,t)}symlinkSync(e,t){if(this.readOnly)throw a.YW(`symlink '${e}' -> '${t}'`);const r=this.resolveFilename(`symlink '${e}' -> '${t}'`,t);if(this.listings.has(r))throw a.GA(`symlink '${e}' -> '${t}'`);if(this.entries.has(r))throw a.cT(`symlink '${e}' -> '${t}'`);const n=this.setFileSource(r,e);this.registerEntry(r,n);if(-1===this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,41471<<16))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)))}async readFilePromise(e,t){switch(t){case"utf8":default:return this.readFileSync(e,t)}}readFileSync(e,t){if("string"!=typeof e)throw a.Ch("read");"object"==typeof t&&(t=t?t.encoding:void 0);const r=this.resolveFilename(`open '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw a.z6(`open '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(r))throw a.Ab(`open '${e}'`);if(this.listings.has(r))throw a.GA("read");const n=this.entries.get(r);if(void 0===n)throw new Error("Unreachable");const i=this.getFileSource(n);return t?i.toString(t):i}async readdirPromise(e,{withFileTypes:t}={}){return this.readdirSync(e,{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){const r=this.resolveFilename(`scandir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw a.z6(`scandir '${e}'`);const n=this.listings.get(r);if(!n)throw a.Ab(`scandir '${e}'`);const i=[...n];return t?i.map(t=>Object.assign(this.statImpl("lstat",c.y1.join(e,t)),{name:t})):i}async readlinkPromise(e){return this.readlinkSync(e)}readlinkSync(e){const t=this.resolveFilename(`readlink '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw a.z6(`readlink '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw a.Ab(`open '${e}'`);if(this.listings.has(t))throw a.hq(`readlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw new Error("Unreachable");if(-1===this.libzip.file.getExternalAttributes(this.zip,r,0,0,this.libzip.uint08S,this.libzip.uint32S))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));if(this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX)throw a.hq(`readlink '${e}'`);if(40960!=(61440&this.libzip.getValue(this.libzip.uint32S,"i32")>>>16))throw a.hq(`readlink '${e}'`);return this.getFileSource(r).toString()}watch(e,t,r){let n;switch(typeof t){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=t)}if(!n)return{on:()=>{},close:()=>{}};const i=setInterval(()=>{},864e5);return{on:()=>{},close:()=>{clearInterval(i)}}}}},53660:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(35747),i=r(35398),o=r(78420),s=r(90739),A=r(46009);const a=2147483648,c=/.*?(?await this.baseFs.openPromise(e,t,r),async(e,{subPath:n})=>this.remapFd(e,await e.openPromise(n,t,r)))}openSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.openSync(e,t,r),(e,{subPath:n})=>this.remapFd(e,e.openSync(n,t,r)))}async readPromise(e,t,r,n,i){if(0==(e&a))return await this.baseFs.readPromise(e,t,r,n,i);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[s,A]=o;return await s.readPromise(A,t,r,n,i)}readSync(e,t,r,n,i){if(0==(e&a))return this.baseFs.readSync(e,t,r,n,i);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[s,A]=o;return s.readSync(A,t,r,n,i)}async writePromise(e,t,r,n,i){if(0==(e&a))return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,n,i);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[s,A]=o;return"string"==typeof t?await s.writePromise(A,t,r):await s.writePromise(A,t,r,n,i)}writeSync(e,t,r,n,i){if(0==(e&a))return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,n,i);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[s,A]=o;return"string"==typeof t?s.writeSync(A,t,r):s.writeSync(A,t,r,n,i)}async closePromise(e){if(0==(e&a))return await this.baseFs.closePromise(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,n]=t;return await r.closePromise(n)}closeSync(e){if(0==(e&a))return this.baseFs.closeSync(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,n]=t;return r.closeSync(n)}createReadStream(e,t){return null===e?this.baseFs.createReadStream(e,t):this.makeCallSync(e,()=>this.baseFs.createReadStream(e,t),(e,{subPath:r})=>e.createReadStream(r,t))}createWriteStream(e,t){return null===e?this.baseFs.createWriteStream(e,t):this.makeCallSync(e,()=>this.baseFs.createWriteStream(e,t),(e,{subPath:r})=>e.createWriteStream(r,t))}async realpathPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.realpathPromise(e),async(e,{archivePath:t,subPath:r})=>this.pathUtils.resolve(await this.baseFs.realpathPromise(t),this.pathUtils.relative(A.LZ.root,await e.realpathPromise(r))))}realpathSync(e){return this.makeCallSync(e,()=>this.baseFs.realpathSync(e),(e,{archivePath:t,subPath:r})=>this.pathUtils.resolve(this.baseFs.realpathSync(t),this.pathUtils.relative(A.LZ.root,e.realpathSync(r))))}async existsPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.existsPromise(e),async(e,{subPath:t})=>await e.existsPromise(t))}existsSync(e){return this.makeCallSync(e,()=>this.baseFs.existsSync(e),(e,{subPath:t})=>e.existsSync(t))}async accessPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.accessPromise(e,t),async(e,{subPath:r})=>await e.accessPromise(r,t))}accessSync(e,t){return this.makeCallSync(e,()=>this.baseFs.accessSync(e,t),(e,{subPath:r})=>e.accessSync(r,t))}async statPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.statPromise(e),async(e,{subPath:t})=>await e.statPromise(t))}statSync(e){return this.makeCallSync(e,()=>this.baseFs.statSync(e),(e,{subPath:t})=>e.statSync(t))}async lstatPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.lstatPromise(e),async(e,{subPath:t})=>await e.lstatPromise(t))}lstatSync(e){return this.makeCallSync(e,()=>this.baseFs.lstatSync(e),(e,{subPath:t})=>e.lstatSync(t))}async chmodPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.chmodPromise(e,t),async(e,{subPath:r})=>await e.chmodPromise(r,t))}chmodSync(e,t){return this.makeCallSync(e,()=>this.baseFs.chmodSync(e,t),(e,{subPath:r})=>e.chmodSync(r,t))}async renamePromise(e,t){return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.renamePromise(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(e,{subPath:r})=>await this.makeCallPromise(t,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(t,{subPath:n})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await e.renamePromise(r,n)}))}renameSync(e,t){return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.renameSync(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(e,{subPath:r})=>this.makeCallSync(t,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(t,{subPath:n})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return e.renameSync(r,n)}))}async copyFilePromise(e,t,r=0){const i=async(e,t,i,o)=>{if(0!=(r&n.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&n.constants.COPYFILE_EXCL&&await this.existsPromise(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let s;try{s=await e.readFilePromise(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}await i.writeFilePromise(o,s)};return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.copyFilePromise(e,t,r),async(t,{subPath:r})=>await i(this.baseFs,e,t,r)),async(e,{subPath:n})=>await this.makeCallPromise(t,async()=>await i(e,n,this.baseFs,t),async(t,{subPath:o})=>e!==t?await i(e,n,t,o):await e.copyFilePromise(n,o,r)))}copyFileSync(e,t,r=0){const i=(e,t,i,o)=>{if(0!=(r&n.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&n.constants.COPYFILE_EXCL&&this.existsSync(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let s;try{s=e.readFileSync(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}i.writeFileSync(o,s)};return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.copyFileSync(e,t,r),(t,{subPath:r})=>i(this.baseFs,e,t,r)),(e,{subPath:n})=>this.makeCallSync(t,()=>i(e,n,this.baseFs,t),(t,{subPath:o})=>e!==t?i(e,n,t,o):e.copyFileSync(n,o,r)))}async appendFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.appendFilePromise(e,t,r),async(e,{subPath:n})=>await e.appendFilePromise(n,t,r))}appendFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.appendFileSync(e,t,r),(e,{subPath:n})=>e.appendFileSync(n,t,r))}async writeFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.writeFilePromise(e,t,r),async(e,{subPath:n})=>await e.writeFilePromise(n,t,r))}writeFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.writeFileSync(e,t,r),(e,{subPath:n})=>e.writeFileSync(n,t,r))}async unlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.unlinkPromise(e),async(e,{subPath:t})=>await e.unlinkPromise(t))}unlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.unlinkSync(e),(e,{subPath:t})=>e.unlinkSync(t))}async utimesPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.utimesPromise(e,t,r),async(e,{subPath:n})=>await e.utimesPromise(n,t,r))}utimesSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.utimesSync(e,t,r),(e,{subPath:n})=>e.utimesSync(n,t,r))}async mkdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.mkdirPromise(e,t),async(e,{subPath:r})=>await e.mkdirPromise(r,t))}mkdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.mkdirSync(e,t),(e,{subPath:r})=>e.mkdirSync(r,t))}async rmdirPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.rmdirPromise(e),async(e,{subPath:t})=>await e.rmdirPromise(t))}rmdirSync(e){return this.makeCallSync(e,()=>this.baseFs.rmdirSync(e),(e,{subPath:t})=>e.rmdirSync(t))}async symlinkPromise(e,t,r){return await this.makeCallPromise(t,async()=>await this.baseFs.symlinkPromise(e,t,r),async(t,{subPath:r})=>await t.symlinkPromise(e,r))}symlinkSync(e,t,r){return this.makeCallSync(t,()=>this.baseFs.symlinkSync(e,t,r),(t,{subPath:r})=>t.symlinkSync(e,r))}async readFilePromise(e,t){return this.makeCallPromise(e,async()=>{switch(t){case"utf8":default:return await this.baseFs.readFilePromise(e,t)}},async(e,{subPath:r})=>await e.readFilePromise(r,t))}readFileSync(e,t){return this.makeCallSync(e,()=>{switch(t){case"utf8":default:return this.baseFs.readFileSync(e,t)}},(e,{subPath:r})=>e.readFileSync(r,t))}async readdirPromise(e,{withFileTypes:t}={}){return await this.makeCallPromise(e,async()=>await this.baseFs.readdirPromise(e,{withFileTypes:t}),async(e,{subPath:r})=>await e.readdirPromise(r,{withFileTypes:t}),{requireSubpath:!1})}readdirSync(e,{withFileTypes:t}={}){return this.makeCallSync(e,()=>this.baseFs.readdirSync(e,{withFileTypes:t}),(e,{subPath:r})=>e.readdirSync(r,{withFileTypes:t}),{requireSubpath:!1})}async readlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.readlinkPromise(e),async(e,{subPath:t})=>await e.readlinkPromise(t))}readlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.readlinkSync(e),(e,{subPath:t})=>e.readlinkSync(t))}watch(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watch(e,t,r),(e,{subPath:n})=>e.watch(n,t,r))}async makeCallPromise(e,t,r,{requireSubpath:n=!0}={}){if("string"!=typeof e)return await t();const i=this.resolve(e),o=this.findZip(i);return o?n&&"/"===o.subPath?await t():await this.getZipPromise(o.archivePath,async e=>await r(e,o)):await t()}makeCallSync(e,t,r,{requireSubpath:n=!0}={}){if("string"!=typeof e)return t();const i=this.resolve(e),o=this.findZip(i);return o?n&&"/"===o.subPath?t():this.getZipSync(o.archivePath,e=>r(e,o)):t()}findZip(e){if(this.filter&&!this.filter.test(e))return null;let t="";for(;;){const r=c.exec(e.substr(t.length));if(!r)return null;if(t=this.pathUtils.join(t,r[0]),!1===this.isZip.has(t)){if(this.notZip.has(t))continue;try{if(!this.baseFs.lstatSync(t).isFile()){this.notZip.add(t);continue}}catch(e){return null}this.isZip.add(t)}return{archivePath:t,subPath:this.pathUtils.resolve(A.LZ.root,e.substr(t.length))}}}limitOpenFiles(e){if(null===this.zipInstances)return;let t=this.zipInstances.size-e;for(const[e,r]of this.zipInstances.entries()){if(t<=0)break;r.saveAndClose(),this.zipInstances.delete(e),t-=1}}async getZipPromise(e,t){const r=async()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:await this.baseFs.statPromise(e)});if(this.zipInstances){let n=this.zipInstances.get(e);if(!n){const t=await r();n=this.zipInstances.get(e),n||(n=new s.d(e,t))}return this.zipInstances.delete(e),this.zipInstances.set(e,n),this.limitOpenFiles(this.maxOpenFiles),await t(n)}{const n=new s.d(e,await r());try{return await t(n)}finally{n.saveAndClose()}}}getZipSync(e,t){const r=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(e)});if(this.zipInstances){let n=this.zipInstances.get(e);return n||(n=new s.d(e,r())),this.zipInstances.delete(e),this.zipInstances.set(e,n),this.limitOpenFiles(this.maxOpenFiles),t(n)}{const n=new s.d(e,r());try{return t(n)}finally{n.saveAndClose()}}}}},26984:(e,t,r)=>{"use strict";function n(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function i(e){return n("EBUSY",e)}function o(e,t){return n("ENOSYS",`${e}, ${t}`)}function s(e){return n("EINVAL","invalid argument, "+e)}function A(e){return n("EBADF","bad file descriptor, "+e)}function a(e){return n("ENOENT","no such file or directory, "+e)}function c(e){return n("ENOTDIR","not a directory, "+e)}function u(e){return n("EISDIR","illegal operation on a directory, "+e)}function l(e){return n("EEXIST","file already exists, "+e)}function h(e){return n("EROFS","read-only filesystem, "+e)}r.d(t,{Vw:()=>i,bk:()=>o,hq:()=>s,Ch:()=>A,z6:()=>a,Ab:()=>c,GA:()=>u,cT:()=>l,YW:()=>h})},56537:(e,t,r)=>{"use strict";r.r(t),r.d(t,{normalizeLineEndings:()=>a.qH,DEFAULT_COMPRESSION_LEVEL:()=>c.k,PortablePath:()=>A.LZ,Filename:()=>A.QS,npath:()=>A.cS,ppath:()=>A.y1,toFilename:()=>A.Zu,AliasFS:()=>u.K,FakeFS:()=>a.uY,CwdFS:()=>l.M,JailFS:()=>h.n,LazyFS:()=>g.v,NoFS:()=>p,NodeFS:()=>s.S,PosixFS:()=>d.i,ProxiedFS:()=>C.p,VirtualFS:()=>E.p,ZipFS:()=>c.d,ZipOpenFS:()=>I.A,patchFs:()=>y,extendFs:()=>w,xfs:()=>D});var n=r(12087),i=r.n(n),o=r(31669),s=r(78420),A=r(46009),a=r(35398),c=r(90739),u=r(14626),l=r(75448),h=r(10489),g=r(15037);const f=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"});class p extends a.uY{constructor(){super(A.y1)}getExtractHint(){throw f()}getRealPath(){throw f()}resolve(){throw f()}async openPromise(){throw f()}openSync(){throw f()}async readPromise(){throw f()}readSync(){throw f()}async writePromise(){throw f()}writeSync(){throw f()}async closePromise(){throw f()}closeSync(){throw f()}createWriteStream(){throw f()}createReadStream(){throw f()}async realpathPromise(){throw f()}realpathSync(){throw f()}async readdirPromise(){throw f()}readdirSync(){throw f()}async existsPromise(e){throw f()}existsSync(e){throw f()}async accessPromise(){throw f()}accessSync(){throw f()}async statPromise(){throw f()}statSync(){throw f()}async lstatPromise(e){throw f()}lstatSync(e){throw f()}async chmodPromise(){throw f()}chmodSync(){throw f()}async mkdirPromise(){throw f()}mkdirSync(){throw f()}async rmdirPromise(){throw f()}rmdirSync(){throw f()}async symlinkPromise(){throw f()}symlinkSync(){throw f()}async renamePromise(){throw f()}renameSync(){throw f()}async copyFilePromise(){throw f()}copyFileSync(){throw f()}async appendFilePromise(){throw f()}appendFileSync(){throw f()}async writeFilePromise(){throw f()}writeFileSync(){throw f()}async unlinkPromise(){throw f()}unlinkSync(){throw f()}async utimesPromise(){throw f()}utimesSync(){throw f()}async readFilePromise(){throw f()}readFileSync(){throw f()}async readlinkPromise(){throw f()}readlinkSync(){throw f()}watch(){throw f()}}p.instance=new p;var d=r(39725),C=r(42096),E=r(17674),I=r(53660);function m(e){const t=A.cS.toPortablePath(i().tmpdir()),r=Math.ceil(4294967296*Math.random()).toString(16).padStart(8,"0");return A.y1.join(t,`${e}${r}`)}function y(e,t){const r=new Set(["accessSync","appendFileSync","createReadStream","chmodSync","closeSync","copyFileSync","lstatSync","lutimesSync","mkdirSync","openSync","readSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","unlinkSync","utimesSync","watch","writeFileSync","writeSync"]),n=new Set(["accessPromise","appendFilePromise","chmodPromise","closePromise","copyFilePromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"]),i=(e,t,r)=>{const n=e[t];e[t]=r,void 0!==n[o.promisify.custom]&&(r[o.promisify.custom]=n[o.promisify.custom])};i(e,"exists",(e,...r)=>{const n="function"==typeof r[r.length-1]?r.pop():()=>{};process.nextTick(()=>{t.existsPromise(e).then(e=>{n(e)},()=>{n(!1)})})}),i(e,"read",(e,r,...n)=>{const i="function"==typeof n[n.length-1]?n.pop():()=>{};process.nextTick(()=>{t.readPromise(e,r,...n).then(e=>{i(null,e,r)},e=>{i(e)})})});for(const r of n){const n=r.replace(/Promise$/,"");if(void 0===e[n])continue;const o=t[r];if(void 0===o)continue;i(e,n,(...e)=>{const r="function"==typeof e[e.length-1]?e.pop():()=>{};process.nextTick(()=>{o.apply(t,e).then(e=>{r(null,e)},e=>{r(e)})})})}e.realpath.native=e.realpath,i(e,"existsSync",e=>{try{return t.existsSync(e)}catch(e){return!1}});for(const n of r){const r=n;if(void 0===e[r])continue;const o=t[n];void 0!==o&&i(e,r,o.bind(t))}e.realpathSync.native=e.realpathSync;{const r=e.promises;if(void 0!==r)for(const e of n){const n=e.replace(/Promise$/,"");if(void 0===r[n])continue;const o=t[e];void 0!==o&&i(r,n,o.bind(t))}}}function w(e,t){const r=Object.create(e);return y(r,t),r}const B=new Set;let Q=!1;function v(){if(Q)return;Q=!0;const e=()=>{process.off("exit",e);for(const e of B){B.delete(e);try{D.removeSync(e)}catch(e){}}};process.on("exit",e)}const D=Object.assign(new s.S,{detachTemp(e){B.delete(e)},mktempSync(e){for(v();;){const t=m("xfs-");try{this.mkdirSync(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=this.realpathSync(t);if(B.add(r),void 0===e)return t;try{return e(r)}finally{if(B.has(r)){B.delete(r);try{this.removeSync(r)}catch(e){}}}}},async mktempPromise(e){for(v();;){const t=m("xfs-");try{await this.mkdirPromise(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=await this.realpathPromise(t);if(B.add(r),void 0===e)return r;try{return await e(r)}finally{if(B.has(r)){B.delete(r);try{await this.removePromise(r)}catch(e){}}}}}})},46009:(e,t,r)=>{"use strict";r.d(t,{LZ:()=>s,QS:()=>A,cS:()=>a,y1:()=>c,CI:()=>C,Zu:()=>E});var n,i=r(85622),o=r.n(i);!function(e){e[e.File=0]="File",e[e.Portable=1]="Portable",e[e.Native=2]="Native"}(n||(n={}));const s={root:"/",dot:"."},A={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",rc:".yarnrc.yml"},a=Object.create(o()),c=Object.create(o().posix);a.cwd=()=>process.cwd(),c.cwd=()=>d(process.cwd()),c.resolve=(...e)=>o().posix.resolve(c.cwd(),...e);const u=function(e,t,r){return(t=e.normalize(t))===(r=e.normalize(r))?".":(t.endsWith(e.sep)||(t+=e.sep),r.startsWith(t)?r.slice(t.length):null)};a.fromPortablePath=p,a.toPortablePath=d,a.contains=(e,t)=>u(a,e,t),c.contains=(e,t)=>u(c,e,t);const l=/^([a-zA-Z]:.*)$/,h=/^\\\\(\.\\)?(.*)$/,g=/^\/([a-zA-Z]:.*)$/,f=/^\/unc\/(\.dot\/)?(.*)$/;function p(e){if("win32"!==process.platform)return e;if(e.match(g))e=e.replace(g,"$1");else{if(!e.match(f))return e;e=e.replace(f,(e,t,r)=>`\\\\${t?".\\":""}${r}`)}return e.replace(/\//g,"\\")}function d(e){return"win32"!==process.platform?e:(e.match(l)?e=e.replace(l,"/$1"):e.match(h)&&(e=e.replace(h,(e,t,r)=>`/unc/${t?".dot/":""}${r}`)),e.replace(/\\/g,"/"))}function C(e,t){return e===a?p(t):d(t)}function E(e){if(""!==a.parse(e).dir||""!==c.parse(e).dir)throw new Error(`Invalid filename: "${e}"`);return e}},29486:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getLibzipSync:()=>o,getLibzipPromise:()=>s});const n=["number","number"];let i=null;function o(){var e;return null===i&&(e=r(3368),i={get HEAP8(){return e.HEAP8},get HEAPU8(){return e.HEAPU8},SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_CREATE:1,ZIP_EXCL:2,ZIP_TRUNCATE:8,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:e._malloc(1),uint16S:e._malloc(2),uint32S:e._malloc(4),uint64S:e._malloc(8),malloc:e._malloc,free:e._free,getValue:e.getValue,open:e.cwrap("zip_open","number",["string","number","number"]),openFromSource:e.cwrap("zip_open_from_source","number",["number","number","number"]),close:e.cwrap("zip_close","number",["number"]),discard:e.cwrap("zip_discard",null,["number"]),getError:e.cwrap("zip_get_error","number",["number"]),getName:e.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:e.cwrap("zip_get_num_entries","number",["number","number"]),stat:e.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:e.cwrap("zip_stat_index","number",["number",...n,"number","number"]),fopen:e.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:e.cwrap("zip_fopen_index","number",["number",...n,"number"]),fread:e.cwrap("zip_fread","number",["number","number","number","number"]),fclose:e.cwrap("zip_fclose","number",["number"]),dir:{add:e.cwrap("zip_dir_add","number",["number","string"])},file:{add:e.cwrap("zip_file_add","number",["number","string","number","number"]),getError:e.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:e.cwrap("zip_file_get_external_attributes","number",["number",...n,"number","number","number"]),setExternalAttributes:e.cwrap("zip_file_set_external_attributes","number",["number",...n,"number","number","number"]),setMtime:e.cwrap("zip_file_set_mtime","number",["number",...n,"number","number"]),setCompression:e.cwrap("zip_set_file_compression","number",["number",...n,"number","number"])},error:{initWithCode:e.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:e.cwrap("zip_error_strerror","string",["number"])},name:{locate:e.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:e.cwrap("zip_source_buffer_create","number",["number","number","number","number"]),fromBuffer:e.cwrap("zip_source_buffer","number",["number","number",...n,"number"]),free:e.cwrap("zip_source_free",null,["number"]),keep:e.cwrap("zip_source_keep",null,["number"]),open:e.cwrap("zip_source_open","number",["number"]),close:e.cwrap("zip_source_close","number",["number"]),seek:e.cwrap("zip_source_seek","number",["number",...n,"number"]),tell:e.cwrap("zip_source_tell","number",["number"]),read:e.cwrap("zip_source_read","number",["number","number","number"]),error:e.cwrap("zip_source_error","number",["number"]),setMtime:e.cwrap("zip_source_set_mtime","number",["number","number"])},struct:{stat:e.cwrap("zipstruct_stat","number",[]),statS:e.cwrap("zipstruct_statS","number",[]),statName:e.cwrap("zipstruct_stat_name","string",["number"]),statIndex:e.cwrap("zipstruct_stat_index","number",["number"]),statSize:e.cwrap("zipstruct_stat_size","number",["number"]),statMtime:e.cwrap("zipstruct_stat_mtime","number",["number"]),error:e.cwrap("zipstruct_error","number",[]),errorS:e.cwrap("zipstruct_errorS","number",[])}}),i}async function s(){return o()}},55125:(e,t,r)=>{"use strict";r.r(t),r.d(t,{parseShell:()=>i,parseResolution:()=>s,stringifyResolution:()=>A,parseSyml:()=>C,stringifySyml:()=>f});var n=r(92962);function i(e,t={isGlobPattern:()=>!1}){try{return(0,n.parse)(e,t)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}var o=r(98261);function s(e){const t=e.match(/^\*{1,2}\/(.*)/);if(t)throw new Error(`The override for '${e}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${t[1]}' instead.`);try{return(0,o.parse)(e)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function A(e){let t="";return e.from&&(t+=e.from.fullName,e.from.description&&(t+="@"+e.from.description),t+="/"),t+=e.descriptor.fullName,e.descriptor.description&&(t+="@"+e.descriptor.description),t}var a=r(21194),c=r(85443);const u=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,l=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"];class h{constructor(e){this.data=e}}function g(e){return e.match(u)?e:JSON.stringify(e)}function f(e){try{return function e(t,r,n){if(null===t)return"null\n";if("number"==typeof t||"boolean"==typeof t)return t.toString()+"\n";if("string"==typeof t)return g(t)+"\n";if(Array.isArray(t)){if(0===t.length)return"[]\n";const n=" ".repeat(r);return"\n"+t.map(t=>`${n}- ${e(t,r+1,!1)}`).join("")}if("object"==typeof t&&t){let i,o;t instanceof h?(i=t.data,o=!1):(i=t,o=!0);const s=" ".repeat(r),A=Object.keys(i);o&&A.sort((e,t)=>{const r=l.indexOf(e),n=l.indexOf(t);return-1===r&&-1===n?et?1:0:-1!==r&&-1===n?-1:-1===r&&-1!==n?1:r-n});const a=A.filter(e=>void 0!==i[e]).map((t,o)=>{const A=i[t],a=g(t),c=e(A,r+1,!0),u=o>0||n?s:"";return c.startsWith("\n")?`${u}${a}:${c}`:`${u}${a}: ${c}`}).join(0===r?"\n":"")||"\n";return n?"\n"+a:""+a}throw new Error(`Unsupported value type (${t})`)}(e,0,!1)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}f.PreserveOrdering=h;const p=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function d(e){if(p.test(e))return function(e){return e.endsWith("\n")||(e+="\n"),(0,c.parse)(e)}(e);const t=(0,a.safeLoad)(e,{schema:a.FAILSAFE_SCHEMA});if(null==t)return{};if("object"!=typeof t)throw new Error(`Expected an indexed object, got a ${typeof t} instead. Does your file follow Yaml's rules?`);if(Array.isArray(t))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return t}function C(e){return d(e)}},88563:(e,t,r)=>{"use strict";var n,i;r.d(t,{gY:()=>I,Q$:()=>m,oC:()=>F}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(n||(n={})),function(e){e.DEFAULT="DEFAULT",e.TOP_LEVEL="TOP_LEVEL",e.FALLBACK_EXCLUSION_LIST="FALLBACK_EXCLUSION_LIST",e.FALLBACK_EXCLUSION_ENTRIES="FALLBACK_EXCLUSION_ENTRIES",e.FALLBACK_EXCLUSION_DATA="FALLBACK_EXCLUSION_DATA",e.PACKAGE_REGISTRY_DATA="PACKAGE_REGISTRY_DATA",e.PACKAGE_REGISTRY_ENTRIES="PACKAGE_REGISTRY_ENTRIES",e.PACKAGE_STORE_DATA="PACKAGE_STORE_DATA",e.PACKAGE_STORE_ENTRIES="PACKAGE_STORE_ENTRIES",e.PACKAGE_INFORMATION_DATA="PACKAGE_INFORMATION_DATA",e.PACKAGE_DEPENDENCIES="PACKAGE_DEPENDENCIES",e.PACKAGE_DEPENDENCY="PACKAGE_DEPENDENCY"}(i||(i={}));const o={[i.DEFAULT]:{collapsed:!1,next:{"*":i.DEFAULT}},[i.TOP_LEVEL]:{collapsed:!1,next:{fallbackExclusionList:i.FALLBACK_EXCLUSION_LIST,packageRegistryData:i.PACKAGE_REGISTRY_DATA,"*":i.DEFAULT}},[i.FALLBACK_EXCLUSION_LIST]:{collapsed:!1,next:{"*":i.FALLBACK_EXCLUSION_ENTRIES}},[i.FALLBACK_EXCLUSION_ENTRIES]:{collapsed:!0,next:{"*":i.FALLBACK_EXCLUSION_DATA}},[i.FALLBACK_EXCLUSION_DATA]:{collapsed:!0,next:{"*":i.DEFAULT}},[i.PACKAGE_REGISTRY_DATA]:{collapsed:!1,next:{"*":i.PACKAGE_REGISTRY_ENTRIES}},[i.PACKAGE_REGISTRY_ENTRIES]:{collapsed:!0,next:{"*":i.PACKAGE_STORE_DATA}},[i.PACKAGE_STORE_DATA]:{collapsed:!1,next:{"*":i.PACKAGE_STORE_ENTRIES}},[i.PACKAGE_STORE_ENTRIES]:{collapsed:!0,next:{"*":i.PACKAGE_INFORMATION_DATA}},[i.PACKAGE_INFORMATION_DATA]:{collapsed:!1,next:{packageDependencies:i.PACKAGE_DEPENDENCIES,"*":i.DEFAULT}},[i.PACKAGE_DEPENDENCIES]:{collapsed:!1,next:{"*":i.PACKAGE_DEPENDENCY}},[i.PACKAGE_DEPENDENCY]:{collapsed:!0,next:{"*":i.DEFAULT}}};function s(e,t,r,n){const{next:i}=o[r];return A(t,i[e]||i["*"],n)}function A(e,t,r){const{collapsed:n}=o[t];return Array.isArray(e)?n?function(e,t,r){let n="";n+="[";for(let i=0,o=e.length;ie(t)));const i=r.map((e,t)=>t);return i.sort((e,t)=>{for(const r of n){const n=r[e]r[t]?1:0;if(0!==n)return n}return 0}),i.map(e=>r[e])}function u(e){const t=new Map,r=c(e.fallbackExclusionList||[],[({name:e,reference:t})=>e,({name:e,reference:t})=>t]);for(const{name:e,reference:n}of r){let r=t.get(e);void 0===r&&t.set(e,r=new Set),r.add(n)}return Array.from(t).map(([e,t])=>[e,Array.from(t)])}function l(e){return c(e.fallbackPool||[],([e])=>e)}function h(e){const t=[];for(const[r,n]of c(e.packageRegistry,([e])=>null===e?"0":"1"+e)){const e=[];t.push([r,e]);for(const[t,{packageLocation:i,packageDependencies:o,packagePeers:s,linkType:A,discardFromLookup:a}]of c(n,([e])=>null===e?"0":"1"+e)){const n=[];null===r||null===t||o.has(r)||n.push([r,t]);for(const[e,t]of c(o.entries(),([e])=>e))n.push([e,t]);const u=s&&s.size>0?Array.from(s):void 0,l=a||void 0;e.push([t,{packageLocation:i,packageDependencies:n,packagePeers:u,linkType:A,discardFromLookup:l}])}}return t}function g(e){return c(e.blacklistedLocations||[],e=>e)}function f(e){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost. We also recommend you not to read","it either without using the @yarnpkg/pnp package, as the data layout","is entirely unspecified and WILL change from a version to another."],dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback||!1,ignorePatternData:e.ignorePattern||null,fallbackExclusionList:u(e),fallbackPool:l(e),locationBlacklistData:g(e),packageRegistryData:h(e)}}var p=r(20103),d=r.n(p);function C(e,t){return[e?e+"\n":"","/* eslint-disable */\n\n","try {\n"," Object.freeze({}).detectStrictMode = true;\n","} catch (error) {\n"," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n","}\n","\n","var __non_webpack_module__ = module;\n","\n","function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n",t.replace(/^/gm," "),"}\n","\n",d()].join("")}function E(e){return JSON.stringify(e,null,2)}function I(e){const t=function(e){return[`return hydrateRuntimeState(${a(e)}, {basePath: basePath || __dirname});\n`].join("")}(f(e));return C(e.shebang,t)}function m(e){const t=f(e),r=(n=e.dataLocation,["var path = require('path');\n",`var dataLocation = path.resolve(__dirname, ${JSON.stringify(n)});\n`,"return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)});\n"].join(""));var n;const i=C(e.shebang,r);return{dataFile:E(t),loaderFile:i}}var y=r(35747),w=(r(85622),r(31669)),B=r(46009);function Q(e,{basePath:t}){const r=B.cS.toPortablePath(t),n=null!==e.ignorePatternData?new RegExp(e.ignorePatternData):null,i=new Map(e.packageRegistryData.map(([e,t])=>[e,new Map(t.map(([e,t])=>[e,{packageLocation:B.y1.resolve(r,t.packageLocation),packageDependencies:new Map(t.packageDependencies),packagePeers:new Set(t.packagePeers),linkType:t.linkType,discardFromLookup:t.discardFromLookup||!1}]))])),o=new Map,s=new Set;for(const[t,r]of e.packageRegistryData)for(const[e,n]of r){if(null===t!=(null===e))throw new Error("Assertion failed: The name and reference should be null, or neither should");if(n.discardFromLookup)continue;const r={name:t,reference:e};o.set(n.packageLocation,r),s.add(n.packageLocation.length)}for(const t of e.locationBlacklistData)o.set(t,null);const A=new Map(e.fallbackExclusionList.map(([e,t])=>[e,new Set(t)])),a=new Map(e.fallbackPool),c=e.dependencyTreeRoots,u=e.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:c,enableTopLevelFallback:u,fallbackExclusionList:A,fallbackPool:a,ignorePattern:n,packageLocationLengths:[...s].sort((e,t)=>t-e),packageLocatorsByLocations:o,packageRegistry:i}}var v,D=r(17674),b=r(32282);!function(e){e.API_ERROR="API_ERROR",e.BLACKLISTED="BLACKLISTED",e.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",e.MISSING_DEPENDENCY="MISSING_DEPENDENCY",e.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",e.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",e.INTERNAL="INTERNAL",e.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",e.UNSUPPORTED="UNSUPPORTED"}(v||(v={}));const S=new Set([v.BLACKLISTED,v.BUILTIN_NODE_RESOLUTION_FAILED,v.MISSING_DEPENDENCY,v.MISSING_PEER_DEPENDENCY,v.QUALIFIED_PATH_RESOLUTION_FAILED,v.UNDECLARED_DEPENDENCY]);function k(e,t,r={}){const n=S.has(e)?"MODULE_NOT_FOUND":e,i={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(t),{code:{...i,value:n},pnpCode:{...i,value:e},data:{...i,value:r}})}function x(e,t){const r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,n=Number(process.env.PNP_DEBUG_LEVEL),i=new Set(b.Module.builtinModules||Object.keys(process.binding("natives"))),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/,s=/^\.{0,2}\//,A=/\/$/,a={name:null,reference:null},c=[],u=new Set;if(!0===e.enableTopLevelFallback&&c.push(a),!1!==t.compatibilityMode)for(const t of["react-scripts","gatsby"]){const r=e.packageRegistry.get(t);if(r)for(const e of r.keys()){if(null===e)throw new Error("Assertion failed: This reference shouldn't be null");c.push({name:t,reference:e})}}const{ignorePattern:l,packageRegistry:h,packageLocatorsByLocations:g,packageLocationLengths:f}=e;function p(e,t){return{fn:e,args:t,error:null,result:null}}function d(e,r){if(!1===t.allowDebug)return r;if(Number.isFinite(n)){if(n>=2)return(...t)=>{const n=p(e,t);try{return n.result=r(...t)}catch(e){throw n.error=e}finally{console.trace(n)}};if(n>=1)return(...t)=>{try{return r(...t)}catch(r){const n=p(e,t);throw n.error=r,console.trace(n),r}}}return r}function C(e){const t=m(e);if(!t)throw k(v.INTERNAL,"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return t}function E(t){if(null===t.name)return!0;for(const r of e.dependencyTreeRoots)if(r.name===t.name&&r.reference===t.reference)return!0;return!1}function I(e,t){return t.endsWith("/")&&(t=B.y1.join(t,"internal.js")),b.Module._resolveFilename(e,function(e){const t=new b.Module(e,null);return t.filename=e,t.paths=b.Module._nodeModulePaths(e),t}(B.cS.fromPortablePath(t)),!1,{plugnplay:!1})}function m({name:e,reference:t}){const r=h.get(e);if(!r)return null;const n=r.get(t);return n||null}function y(e,t){const r=new Map,n=t=>{const i=function({name:e,reference:t}){const r=[];for(const[n,i]of h)if(null!==n)for(const[o,s]of i){if(null===o)continue;s.packageDependencies.get(e)===t&&(n===e&&o===t||r.push({name:n,reference:o}))}return r}(t);for(const t of i){if(C(t).packagePeers.has(e))n(t);else{let e=r.get(t.name);void 0===e&&r.set(t.name,e=new Set),e.add(t.reference)}}};n(t);const i=[];for(const e of[...r.keys()].sort())for(const t of[...r.get(e)].sort())i.push({name:e,reference:t});return i}function w(t){let r=(n=B.y1.relative(e.basePath,t),B.cS.toPortablePath(n));var n;r.match(s)||(r="./"+r),t.match(A)&&!r.endsWith("/")&&(r+="/");let i=0;for(;ir.length;)i+=1;for(let e=i;eE(e))?k(v.MISSING_PEER_DEPENDENCY,`${o.name} tried to access ${t} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${n}")\nRequired by: ${o.name}@${o.reference} (via ${s})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:n,issuer:s,issuerLocator:Object.assign({},o),dependencyName:t,brokenAncestors:e}):k(v.MISSING_PEER_DEPENDENCY,`${o.name} tried to access ${t} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${n}")\nRequired by: ${o.name}@${o.reference} (via ${s})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:n,issuer:s,issuerLocator:Object.assign({},o),dependencyName:t,brokenAncestors:e})}else void 0===A&&(l=E(o)?k(v.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${n}")\nRequired by: ${s}\n`,{request:n,issuer:s,dependencyName:t}):k(v.UNDECLARED_DEPENDENCY,`${o.name} tried to access ${t}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${n}")\nRequired by: ${o.name}@${o.reference} (via ${s})\n`,{request:n,issuer:s,issuerLocator:Object.assign({},o),dependencyName:t}));if(null==A){if(null===a||null===l)throw l||new Error("Assertion failed: Expected an error to have been set");A=a;const e=l.message.replace(/\n.*/g,"");l.message=e,u.has(e)||(u.add(e),process.emitWarning(l))}const f=Array.isArray(A)?{name:A[0],reference:A[1]}:{name:t,reference:A},p=C(f);if(!p.packageLocation)throw k(v.MISSING_DEPENDENCY,`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.\n\nRequired package: ${f.name}@${f.reference} (via "${n}")\nRequired by: ${o.name}@${o.reference} (via ${s})\n`,{request:n,issuer:s,dependencyLocator:Object.assign({},f)});const d=B.y1.resolve(e.basePath,p.packageLocation);h=i?B.y1.resolve(d,i):d}else{if(B.y1.isAbsolute(n))h=B.y1.normalize(n);else{if(!s)throw k(v.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:n,issuer:s});h=s.match(A)?B.y1.normalize(B.y1.resolve(s,n)):B.y1.normalize(B.y1.resolve(B.y1.dirname(s),n))}w(h)}return B.y1.normalize(h)}function S(e,{extensions:r=Object.keys(b.Module._extensions)}={}){const n=[],i=function e(r,n,{extensions:i}){let o;try{n.push(r),o=t.fakeFs.statSync(r)}catch(e){}if(o&&!o.isDirectory())return t.fakeFs.realpathSync(r);if(o&&o.isDirectory()){let o,s;try{o=JSON.parse(t.fakeFs.readFileSync(B.y1.join(r,"package.json"),"utf8"))}catch(e){}if(o&&o.main&&(s=B.y1.resolve(r,o.main)),s&&s!==r){const t=e(s,n,{extensions:i});if(null!==t)return t}}for(let e=0,o=i.length;e`Rejected candidate: ${e}\n`).join("")}`,{unqualifiedPath:e})}return{VERSIONS:{std:3,resolveVirtual:1},topLevel:a,getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getPackageInformation:e=>{const t=m(e);if(null===t)return null;const r=B.cS.fromPortablePath(t.packageLocation);return{...t,packageLocation:r}},findPackageLocator:e=>w(B.cS.toPortablePath(e)),resolveToUnqualified:d("resolveToUnqualified",(e,t,r)=>{const n=null!==t?B.cS.toPortablePath(t):null,i=Q(B.cS.toPortablePath(e),n,r);return null===i?null:B.cS.fromPortablePath(i)}),resolveUnqualified:d("resolveUnqualified",(e,t)=>B.cS.fromPortablePath(S(B.cS.toPortablePath(e),t))),resolveRequest:d("resolveRequest",(e,t,r)=>{const n=null!==t?B.cS.toPortablePath(t):null,i=function(e,t,{considerBuiltins:r,extensions:n}={}){const i=Q(e,t,{considerBuiltins:r});if(null===i)return null;try{return S(i,{extensions:n})}catch(r){throw"QUALIFIED_PATH_RESOLUTION_FAILED"===r.pnpCode&&Object.assign(r.data,{request:e,issuer:t}),r}}(B.cS.toPortablePath(e),n,r);return null===i?null:B.cS.fromPortablePath(i)}),resolveVirtual:d("resolveVirtual",e=>{const t=function(e){const t=B.y1.normalize(e),r=D.p.resolveVirtual(t);return r!==t?r:null}(B.cS.toPortablePath(e));return null!==t?B.cS.fromPortablePath(t):null})}}(0,w.promisify)(y.readFile);const F=(e,t,r)=>x(Q(f(e),{basePath:t}),{fakeFs:r,pnpapiResolution:B.cS.join(t,".pnp.js")})},43982:(e,t,r)=>{"use strict";r.r(t),r.d(t,{execute:()=>F});var n,i=r(46009),o=r(56537),s=r(39725),A=r(55125),a=r(19347),c=r.n(a),u=r(92413),l=r(67566),h=r.n(l);function g(){}!function(e){e[e.STDOUT=1]="STDOUT",e[e.STDERR=2]="STDERR"}(n||(n={}));let f=0;class p{constructor(e){this.stream=e}close(){}get(){return this.stream}}class d{constructor(){this.stream=null}close(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");return this.stream}}class C{constructor(e,t){this.stdin=null,this.stdout=null,this.stderr=null,this.pipe=null,this.ancestor=e,this.implementation=t}static start(e,{stdin:t,stdout:r,stderr:n}){const i=new C(null,e);return i.stdin=t,i.stdout=r,i.stderr=n,i}pipeTo(e,t=n.STDOUT){const r=new C(this,e),i=new d;return r.pipe=i,r.stdout=this.stdout,r.stderr=this.stderr,(t&n.STDOUT)===n.STDOUT?this.stdout=i:null!==this.ancestor&&(this.stderr=this.ancestor.stdout),(t&n.STDERR)===n.STDERR?this.stderr=i:null!==this.ancestor&&(this.stderr=this.ancestor.stderr),r}async exec(){const e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(null===this.stdin)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let t,r;if(null===this.stdout)throw new Error("Assertion failed: No output stream registered");if(t=this.stdout,e[1]=t.get(),null===this.stderr)throw new Error("Assertion failed: No error stream registered");r=this.stderr,e[2]=r.get();const n=this.implementation(e);return this.pipe&&this.pipe.attach(n.stdin),await n.promise.then(e=>(t.close(),r.close(),e))}async run(){const e=[];for(let t=this;t;t=t.ancestor)e.push(t.exec());return(await Promise.all(e))[0]}}function E(e,t){return C.start(e,t)}function I(e,t={}){const r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}const m=new Map([["cd",async([e,...t],r,n)=>{const s=i.y1.resolve(n.cwd,i.cS.toPortablePath(e));return(await o.xfs.statPromise(s)).isDirectory()?(n.cwd=s,0):(n.stderr.write("cd: not a directory\n"),1)}],["pwd",async(e,t,r)=>(r.stdout.write(i.cS.fromPortablePath(r.cwd)+"\n"),0)],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,n)=>n.exitCode=parseInt(e,10)],["echo",async(e,t,r)=>(r.stdout.write(e.join(" ")+"\n"),0)],["__ysh_run_procedure",async(e,t,r)=>{const n=r.procedures[e[0]];return await E(n,{stdin:new p(r.stdin),stdout:new p(r.stdout),stderr:new p(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let n=r.stdin,s=r.stdout;const A=r.stderr,a=[],c=[];let l=0;for(;"--"!==e[l];){const t=e[l++],n=Number(e[l++]),s=l+n;for(let n=l;no.xfs.createReadStream(i.y1.resolve(r.cwd,i.cS.toPortablePath(e[n]))));break;case"<<<":a.push(()=>{const t=new u.PassThrough;return process.nextTick(()=>{t.write(e[n]+"\n"),t.end()}),t});break;case">":c.push(o.xfs.createWriteStream(i.y1.resolve(r.cwd,i.cS.toPortablePath(e[n]))));break;case">>":c.push(o.xfs.createWriteStream(i.y1.resolve(r.cwd,i.cS.toPortablePath(e[n])),{flags:"a"}))}}if(a.length>0){const e=new u.PassThrough;n=e;const t=r=>{if(r===a.length)e.end();else{const n=a[r]();n.pipe(e,{end:!1}),n.on("end",()=>{t(r+1)})}};t(0)}if(c.length>0){const e=new u.PassThrough;s=e;for(const t of c)e.pipe(t)}const h=await E(Q(e.slice(l+1),t,r),{stdin:new p(n),stdout:new p(s),stderr:new p(A)}).run();return await Promise.all(c.map(e=>new Promise(t=>{e.on("close",()=>{t()}),e.end()}))),h}]]);async function y(e,t,r){const n=[],i=new u.PassThrough;return i.on("data",e=>n.push(e)),await S(e,t,I(r,{stdout:i})),Buffer.concat(n).toString().replace(/[\r\n]+$/,"")}async function w(e,t,r){const n=e.map(async e=>{const n=await B(e.args,t,r);return{name:e.name,value:n.join(" ")}});return(await Promise.all(n)).reduce((e,t)=>(e[t.name]=t.value,e),{})}async function B(e,t,r){const n=new Map,i=[];let o=[];const s=e=>e.match(/[^ \r\n\t]+/g)||[],A=e=>{o.push(e)},a=()=>{o.length>0&&i.push(o.join("")),o=[]},c=e=>{A(e),a()},u=(e,t)=>{let r=n.get(e);void 0===r&&n.set(e,r=[]),r.push(t)};for(const n of e){switch(n.type){case"redirection":{const e=await B(n.args,t,r);for(const t of e)u(n.subtype,t)}break;case"argument":for(const e of n.segments)switch(e.type){case"text":A(e.text);break;case"glob":{const n=await t.glob.match(e.pattern,{cwd:r.cwd});if(!n.length)throw new Error(`No file matches found: "${e.pattern}". Note: Glob patterns currently only support files that exist on the filesystem (Help Wanted)`);for(const e of n.sort())c(e)}break;case"shell":{const n=await y(e.shell,t,r);if(e.quoted)A(n);else{const e=s(n);for(let t=0;t=0&&n0){const e=[];for(const[t,r]of n.entries())e.splice(e.length,0,t,String(r.length),...r);i.splice(0,0,"__ysh_set_redirects",...e,"--")}return i}function Q(e,t,r){t.builtins.has(e[0])||(e=["command",...e]);const n=i.cS.fromPortablePath(r.cwd);let o=r.environment;void 0!==o.PWD&&(o={...o,PWD:n});const[s,...A]=e;if("command"===s)return function(e,t,r,n){return r=>{const i=r[0]instanceof u.Transform?"pipe":r[0],o=r[1]instanceof u.Transform?"pipe":r[1],s=r[2]instanceof u.Transform?"pipe":r[2],A=h()(e,t,{...n,stdio:[i,o,s]});return 0==f++&&process.on("SIGINT",g),r[0]instanceof u.Transform&&r[0].pipe(A.stdin),r[1]instanceof u.Transform&&A.stdout.pipe(r[1],{end:!1}),r[2]instanceof u.Transform&&A.stderr.pipe(r[2],{end:!1}),{stdin:A.stdin,promise:new Promise(t=>{A.on("error",n=>{switch(0==--f&&process.off("SIGINT",g),n.code){case"ENOENT":r[2].write(`command not found: ${e}\n`),t(127);break;case"EACCESS":r[2].write(`permission denied: ${e}\n`),t(128);break;default:r[2].write(`uncaught error: ${n.message}\n`),t(1)}}),A.on("exit",e=>{0==--f&&process.off("SIGINT",g),t(null!==e?e:129)})})}}}(A[0],A.slice(1),0,{cwd:n,env:o});const a=t.builtins.get(s);if(void 0===a)throw new Error(`Assertion failed: A builtin should exist for "${s}"`);return function(e){return t=>{const r="pipe"===t[0]?new u.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}(async({stdin:e,stdout:n,stderr:i})=>(r.stdin=e,r.stdout=n,r.stderr=i,await a(A,t,r)))}function v(e,t,r){return n=>{const i=new u.PassThrough;return{stdin:i,promise:S(e,t,I(r,{stdin:i}))}}}async function D(e,t,r){let n=e,i=null,o=null;for(;n;){const e=n.then?{...r}:r;let s;switch(n.type){case"command":{const i=await B(n.args,t,r),o=await w(n.envs,t,r);s=n.envs.length?Q(i,t,I(e,{environment:o})):Q(i,t,e)}break;case"subshell":{const i=await B(n.args,t,r),o=v(n.subshell,t,e);if(0===i.length)s=o;else{let r;do{r=String(Math.random())}while(Object.prototype.hasOwnProperty.call(e.procedures,r));e.procedures={...e.procedures},e.procedures[r]=o,s=Q([...i,"__ysh_run_procedure",r],t,e)}}break;case"envs":{const i=await w(n.envs,t,r);e.environment={...e.environment,...i},s=Q(["true"],t,e)}}if(void 0===s)throw new Error("Assertion failed: An action should have been generated");if(null===i)o=E(s,{stdin:new p(e.stdin),stdout:new p(e.stdout),stderr:new p(e.stderr)});else{if(null===o)throw new Error("The execution pipeline should have been setup");switch(i){case"|":case"|&":o=o.pipeTo(s)}}n.then?(i=n.then.type,n=n.then.chain):n=null}if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");return await o.run()}async function b(e,t,r){if(!e.then)return await D(e.chain,t,r);const n=await D(e.chain,t,r);if(null!==r.exitCode)return r.exitCode;switch(r.variables["?"]=String(n),e.then.type){case"&&":return 0===n?await b(e.then.line,t,r):n;case"||":return 0!==n?await b(e.then.line,t,r):n;default:throw new Error(`Unsupported command type: "${e.then.type}"`)}}async function S(e,t,r){let n=0;for(const i of e){if(n=await b(i,t,r),null!==r.exitCode)return r.exitCode;r.variables["?"]=String(n)}return n}function k(e){switch(e.type){case"redirection":return e.args.some(e=>k(e));case"argument":return e.segments.some(e=>function(e){switch(e.type){case"variable":return"@"===e.name||"#"===e.name||"*"===e.name||Number.isFinite(parseInt(e.name,10))||!!e.defaultValue&&e.defaultValue.some(e=>k(e));case"shell":return x(e.shell);default:return!1}}(e));default:throw new Error("Unreacheable")}}function x(e){return e.some(e=>{for(;e;){let t=e.chain;for(;t;){let e;switch(t.type){case"subshell":e=x(t.subshell);break;case"command":e=t.envs.some(e=>e.args.some(e=>k(e)))||t.args.some(e=>k(e))}if(e)return!0;if(!t.then)break;t=t.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function F(e,t=[],{builtins:r={},cwd:n=i.cS.toPortablePath(process.cwd()),env:a=process.env,stdin:l=process.stdin,stdout:h=process.stdout,stderr:g=process.stderr,variables:f={},glob:p={isGlobPattern:c().isDynamicPattern,match:(e,{cwd:t,fs:r=o.xfs})=>c()(e,{cwd:i.cS.fromPortablePath(t),fs:new s.i(r)})}}={}){const d={};for(const[e,t]of Object.entries(a))void 0!==t&&(d[e]=t);const C=new Map(m);for(const[e,t]of Object.entries(r))C.set(e,t);null===l&&(l=new u.PassThrough).end();const E=(0,A.parseShell)(e,p);if(!x(E)&&E.length>0&&t.length>0){let e=E[E.length-1];for(;e.then;)e=e.then.line;let r=e.chain;for(;r.then;)r=r.then.chain;"command"===r.type&&(r.args=r.args.concat(t.map(e=>({type:"argument",segments:[{type:"text",text:e}]}))))}return await S(E,{args:t,builtins:C,initialStdin:l,initialStdout:h,initialStderr:g,glob:p},{cwd:n,environment:d,exitCode:null,procedures:{},stdin:l,stdout:h,stderr:g,variables:Object.assign(Object.create(f),{"?":0})})}},45330:(e,t,r)=>{t.e=()=>({modules:new Map([[r(60306).name,r(95397)],[r(73841).u2,r(84132)],[r(4670).u2,r(56537)],[r(81386).u2,r(29486)],[r(54920).u2,r(55125)],[r(75418).u2,r(43982)],[r(75426).u2,r(17278)],[r(81923).u2,r(10966)],[r(38422).u2,r(15966)],[r(37904).u2,r(72926)],[r(49775).u2,r(80150)],[r(35729).u2,r(10420)],[r(17508).u2,r(41466)],[r(84779).u2,r(10284)],[r(88454).u2,r(23599)],[r(91953).u2,r(21754)],[r(63756).u2,r(74230)],[r(23100).u2,r(86161)],[r(47047).u2,r(8149)],[r(67310).u2,r(86717)],[r(31880).u2,r(94573)],[r(74617).u2,r(5973)],[r(85458).u2,r(77333)],[r(8211).u2,r(5780)]]),plugins:new Set([r(37904).u2,r(49775).u2,r(35729).u2,r(17508).u2,r(84779).u2,r(88454).u2,r(91953).u2,r(63756).u2,r(23100).u2,r(47047).u2,r(67310).u2,r(31880).u2,r(74617).u2,r(85458).u2,r(8211).u2])})},27355:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},48786:e=>{e.exports=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}},51746:e=>{e.exports=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},63446:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}},96117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},79774:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=process.versions.node.split("."),n=parseInt(r[0],10),i=parseInt(r[1],10),o=n>10,s=10===n&&i>=10;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=o||s},85670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(31020),i=r(35516),o=r(38844);function s(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.scandir=function(e,t,r){if("function"==typeof t)return n.read(e,s(),t);n.read(e,s(t),r)},t.scandirSync=function(e,t){const r=s(t);return i.read(e,r)}},31020:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(53403),i=r(69078),o=r(79774),s=r(65225);function A(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,o)=>{if(null!==n)return c(r,n);const A=o.map(r=>({dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`}));if(!t.followSymbolicLinks)return u(r,A);const a=A.map(e=>function(e,t){return r=>{if(!e.dirent.isSymbolicLink())return r(null,e);t.fs.stat(e.path,(n,i)=>null!==n?t.throwErrorOnBrokenSymbolicLink?r(n):r(null,e):(e.dirent=s.fs.createDirentFromStats(e.name,i),r(null,e)))}}(e,t));i(a,(e,t)=>{if(null!==e)return c(r,e);u(r,t)})})}function a(e,t,r){t.fs.readdir(e,(o,A)=>{if(null!==o)return c(r,o);const a=A.map(r=>`${e}${t.pathSegmentSeparator}${r}`),l=a.map(e=>r=>n.stat(e,t.fsStatSettings,r));i(l,(e,n)=>{if(null!==e)return c(r,e);const i=[];A.forEach((e,r)=>{const o=n[r],A={name:e,path:a[r],dirent:s.fs.createDirentFromStats(e,o)};t.stats&&(A.stats=o),i.push(A)}),u(r,i)})})}function c(e,t){e(t)}function u(e,t){e(null,t)}t.read=function(e,t,r){return!t.stats&&o.IS_SUPPORT_READDIR_WITH_FILE_TYPES?A(e,t,r):a(e,t,r)},t.readdirWithFileTypes=A,t.readdir=a},35516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(53403),i=r(79774),o=r(65225);function s(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(r=>{const n={dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`};if(n.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(n.path);n.dirent=o.fs.createDirentFromStats(n.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return n})}function A(e,t){return t.fs.readdirSync(e).map(r=>{const i=`${e}${t.pathSegmentSeparator}${r}`,s=n.statSync(i,t.fsStatSettings),A={name:r,path:i,dirent:o.fs.createDirentFromStats(r,s)};return t.stats&&(A.stats=s),A})}t.read=function(e,t){return!t.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t):A(e,t)},t.readdirWithFileTypes=s,t.readdir=A},38844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(85622),i=r(53403),o=r(96117);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=o.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,n.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},72156:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}t.createDirentFromStats=function(e,t){return new r(e,t)}},65225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72156);t.fs=n},71208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},53403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(17790),i=r(34846),o=r(92687);function s(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.stat=function(e,t,r){if("function"==typeof t)return n.read(e,s(),t);n.read(e,s(t),r)},t.statSync=function(e,t){const r=s(t);return i.read(e,r)}},17790:(e,t)=>{"use strict";function r(e,t){e(t)}function n(e,t){e(null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t,i){t.fs.lstat(e,(o,s)=>null!==o?r(i,o):s.isSymbolicLink()&&t.followSymbolicLink?void t.fs.stat(e,(e,o)=>{if(null!==e)return t.throwErrorOnBrokenSymbolicLink?r(i,e):n(i,s);t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),n(i,o)}):n(i,s))}},34846:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{const r=t.fs.statSync(e);return t.markSymbolicLink&&(r.isSymbolicLink=()=>!0),r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw e}}},92687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(71208);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=n.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return void 0===e?t:e}}},73011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(42369),i=r(27696),o=r(22111),s=r(14954);function A(e={}){return e instanceof s.default?e:new s.default(e)}t.Settings=s.default,t.walk=function(e,t,r){if("function"==typeof t)return new n.default(e,A()).read(t);new n.default(e,A(t)).read(r)},t.walkSync=function(e,t){const r=A(t);return new o.default(e,r).read()},t.walkStream=function(e,t){const r=A(t);return new i.default(e,r).read()}},42369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new n.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.add(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,[...this._storage])}),this._reader.read()}}},27696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(92413),i=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new i.default(this._root,this._settings),this._stream=new n.Readable({objectMode:!0,read:()=>{},destroy:this._reader.destroy.bind(this._reader)})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}},22111:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(97835);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new n.default(this._root,this._settings)}read(){return this._reader.read()}}},98566:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(28614),i=r(85670),o=r(98360),s=r(10750),A=r(75504);class a extends A.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=i.scandir,this._emitter=new n.EventEmitter,this._queue=o(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null!==r)return t(r,void 0);for(const t of n)this._handleEntry(t,e.base);t(null,void 0)})}_handleError(e){s.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=s.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),s.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&s.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}t.default=a},10750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},t.isAppliedFilter=function(e,t){return null===e||e(t)},t.replacePathSegmentSeparator=function(e,t){return e.split(/[\\/]/).join(t)},t.joinPathSegments=function(e,t,r){return""===e?t:e+r+t}},75504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10750);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._root=n.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}}},97835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(85670),i=r(10750),o=r(75504);class s extends o.default{constructor(){super(...arguments),this._scandir=n.scandirSync,this._storage=new Set,this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),[...this._storage]}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(i.isFatalError(this._settings,e))throw e}_handleEntry(e,t){const r=e.path;void 0!==t&&(e.path=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_pushToStorage(e){this._storage.add(e)}}t.default=s},14954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(85622),i=r(85670);t.default=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,1/0),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,n.sep),this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},8189:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{toString:r}=Object.prototype,n=e=>t=>typeof t===e,i=e=>{const t=r.call(e).slice(8,-1);if(t)return t},o=e=>t=>i(t)===e;function s(e){switch(e){case null:return"null";case!0:case!1:return"boolean"}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"symbol":return"symbol"}if(s.function_(e))return"Function";if(s.observable(e))return"Observable";if(s.array(e))return"Array";if(s.buffer(e))return"Buffer";const t=i(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}s.undefined=n("undefined"),s.string=n("string");const A=n("number");s.number=e=>A(e)&&!s.nan(e),s.bigint=n("bigint"),s.function_=n("function"),s.null_=e=>null===e,s.class_=e=>s.function_(e)&&e.toString().startsWith("class "),s.boolean=e=>!0===e||!1===e,s.symbol=n("symbol"),s.numericString=e=>s.string(e)&&!s.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),s.array=Array.isArray,s.buffer=e=>{var t,r,n,i;return null!==(i=null===(n=null===(r=null===(t=e)||void 0===t?void 0:t.constructor)||void 0===r?void 0:r.isBuffer)||void 0===n?void 0:n.call(r,e))&&void 0!==i&&i},s.nullOrUndefined=e=>s.null_(e)||s.undefined(e),s.object=e=>!s.null_(e)&&("object"==typeof e||s.function_(e)),s.iterable=e=>{var t;return s.function_(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},s.asyncIterable=e=>{var t;return s.function_(null===(t=e)||void 0===t?void 0:t[Symbol.asyncIterator])},s.generator=e=>s.iterable(e)&&s.function_(e.next)&&s.function_(e.throw),s.asyncGenerator=e=>s.asyncIterable(e)&&s.function_(e.next)&&s.function_(e.throw),s.nativePromise=e=>o("Promise")(e);s.promise=e=>s.nativePromise(e)||(e=>{var t,r;return s.function_(null===(t=e)||void 0===t?void 0:t.then)&&s.function_(null===(r=e)||void 0===r?void 0:r.catch)})(e),s.generatorFunction=o("GeneratorFunction"),s.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===i(e),s.asyncFunction=e=>"AsyncFunction"===i(e),s.boundFunction=e=>s.function_(e)&&!e.hasOwnProperty("prototype"),s.regExp=o("RegExp"),s.date=o("Date"),s.error=o("Error"),s.map=e=>o("Map")(e),s.set=e=>o("Set")(e),s.weakMap=e=>o("WeakMap")(e),s.weakSet=e=>o("WeakSet")(e),s.int8Array=o("Int8Array"),s.uint8Array=o("Uint8Array"),s.uint8ClampedArray=o("Uint8ClampedArray"),s.int16Array=o("Int16Array"),s.uint16Array=o("Uint16Array"),s.int32Array=o("Int32Array"),s.uint32Array=o("Uint32Array"),s.float32Array=o("Float32Array"),s.float64Array=o("Float64Array"),s.bigInt64Array=o("BigInt64Array"),s.bigUint64Array=o("BigUint64Array"),s.arrayBuffer=o("ArrayBuffer"),s.sharedArrayBuffer=o("SharedArrayBuffer"),s.dataView=o("DataView"),s.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,s.urlInstance=e=>o("URL")(e),s.urlString=e=>{if(!s.string(e))return!1;try{return new URL(e),!0}catch(e){return!1}},s.truthy=e=>Boolean(e),s.falsy=e=>!e,s.nan=e=>Number.isNaN(e);const a=new Set(["undefined","string","number","bigint","boolean","symbol"]);s.primitive=e=>s.null_(e)||a.has(typeof e),s.integer=e=>Number.isInteger(e),s.safeInteger=e=>Number.isSafeInteger(e),s.plainObject=e=>{if("Object"!==i(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})};const c=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);s.typedArray=e=>{const t=i(e);return void 0!==t&&c.has(t)};s.arrayLike=e=>!s.nullOrUndefined(e)&&!s.function_(e)&&(e=>s.safeInteger(e)&&e>=0)(e.length),s.inRange=(e,t)=>{if(s.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(s.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError("Invalid range: "+JSON.stringify(t))};const u=["innerHTML","ownerDocument","style","attributes","nodeValue"];s.domElement=e=>s.object(e)&&1===e.nodeType&&s.string(e.nodeName)&&!s.plainObject(e)&&u.every(t=>t in e),s.observable=e=>{var t,r,n,i;return!!e&&(e===(null===(r=(t=e)[Symbol.observable])||void 0===r?void 0:r.call(t))||e===(null===(i=(n=e)["@@observable"])||void 0===i?void 0:i.call(n)))},s.nodeStream=e=>s.object(e)&&s.function_(e.pipe)&&!s.observable(e),s.infinite=e=>e===1/0||e===-1/0;const l=e=>t=>s.integer(t)&&Math.abs(t%2)===e;s.evenInteger=l(0),s.oddInteger=l(1),s.emptyArray=e=>s.array(e)&&0===e.length,s.nonEmptyArray=e=>s.array(e)&&e.length>0,s.emptyString=e=>s.string(e)&&0===e.length,s.nonEmptyString=e=>s.string(e)&&e.length>0;s.emptyStringOrWhitespace=e=>s.emptyString(e)||(e=>s.string(e)&&!/\S/.test(e))(e),s.emptyObject=e=>s.object(e)&&!s.map(e)&&!s.set(e)&&0===Object.keys(e).length,s.nonEmptyObject=e=>s.object(e)&&!s.map(e)&&!s.set(e)&&Object.keys(e).length>0,s.emptySet=e=>s.set(e)&&0===e.size,s.nonEmptySet=e=>s.set(e)&&e.size>0,s.emptyMap=e=>s.map(e)&&0===e.size,s.nonEmptyMap=e=>s.map(e)&&e.size>0;const h=(e,t,r)=>{if(!s.function_(t))throw new TypeError("Invalid predicate: "+JSON.stringify(t));if(0===r.length)throw new TypeError("Invalid number of values");return e.call(r,t)};s.any=(e,...t)=>(s.array(e)?e:[e]).some(e=>h(Array.prototype.some,e,t)),s.all=(e,...t)=>h(Array.prototype.every,e,t);const g=(e,t,r)=>{if(!e)throw new TypeError(`Expected value which is \`${t}\`, received value of type \`${s(r)}\`.`)};t.assert={undefined:e=>g(s.undefined(e),"undefined",e),string:e=>g(s.string(e),"string",e),number:e=>g(s.number(e),"number",e),bigint:e=>g(s.bigint(e),"bigint",e),function_:e=>g(s.function_(e),"Function",e),null_:e=>g(s.null_(e),"null",e),class_:e=>g(s.class_(e),"Class",e),boolean:e=>g(s.boolean(e),"boolean",e),symbol:e=>g(s.symbol(e),"symbol",e),numericString:e=>g(s.numericString(e),"string with a number",e),array:e=>g(s.array(e),"Array",e),buffer:e=>g(s.buffer(e),"Buffer",e),nullOrUndefined:e=>g(s.nullOrUndefined(e),"null or undefined",e),object:e=>g(s.object(e),"Object",e),iterable:e=>g(s.iterable(e),"Iterable",e),asyncIterable:e=>g(s.asyncIterable(e),"AsyncIterable",e),generator:e=>g(s.generator(e),"Generator",e),asyncGenerator:e=>g(s.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>g(s.nativePromise(e),"native Promise",e),promise:e=>g(s.promise(e),"Promise",e),generatorFunction:e=>g(s.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>g(s.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>g(s.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>g(s.boundFunction(e),"Function",e),regExp:e=>g(s.regExp(e),"RegExp",e),date:e=>g(s.date(e),"Date",e),error:e=>g(s.error(e),"Error",e),map:e=>g(s.map(e),"Map",e),set:e=>g(s.set(e),"Set",e),weakMap:e=>g(s.weakMap(e),"WeakMap",e),weakSet:e=>g(s.weakSet(e),"WeakSet",e),int8Array:e=>g(s.int8Array(e),"Int8Array",e),uint8Array:e=>g(s.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>g(s.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>g(s.int16Array(e),"Int16Array",e),uint16Array:e=>g(s.uint16Array(e),"Uint16Array",e),int32Array:e=>g(s.int32Array(e),"Int32Array",e),uint32Array:e=>g(s.uint32Array(e),"Uint32Array",e),float32Array:e=>g(s.float32Array(e),"Float32Array",e),float64Array:e=>g(s.float64Array(e),"Float64Array",e),bigInt64Array:e=>g(s.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>g(s.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>g(s.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>g(s.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>g(s.dataView(e),"DataView",e),urlInstance:e=>g(s.urlInstance(e),"URL",e),urlString:e=>g(s.urlString(e),"string with a URL",e),truthy:e=>g(s.truthy(e),"truthy",e),falsy:e=>g(s.falsy(e),"falsy",e),nan:e=>g(s.nan(e),"NaN",e),primitive:e=>g(s.primitive(e),"primitive",e),integer:e=>g(s.integer(e),"integer",e),safeInteger:e=>g(s.safeInteger(e),"integer",e),plainObject:e=>g(s.plainObject(e),"plain object",e),typedArray:e=>g(s.typedArray(e),"TypedArray",e),arrayLike:e=>g(s.arrayLike(e),"array-like",e),domElement:e=>g(s.domElement(e),"Element",e),observable:e=>g(s.observable(e),"Observable",e),nodeStream:e=>g(s.nodeStream(e),"Node.js Stream",e),infinite:e=>g(s.infinite(e),"infinite number",e),emptyArray:e=>g(s.emptyArray(e),"empty array",e),nonEmptyArray:e=>g(s.nonEmptyArray(e),"non-empty array",e),emptyString:e=>g(s.emptyString(e),"empty string",e),nonEmptyString:e=>g(s.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>g(s.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>g(s.emptyObject(e),"empty object",e),nonEmptyObject:e=>g(s.nonEmptyObject(e),"non-empty object",e),emptySet:e=>g(s.emptySet(e),"empty set",e),nonEmptySet:e=>g(s.nonEmptySet(e),"non-empty set",e),emptyMap:e=>g(s.emptyMap(e),"empty map",e),nonEmptyMap:e=>g(s.nonEmptyMap(e),"non-empty map",e),evenInteger:e=>g(s.evenInteger(e),"even integer",e),oddInteger:e=>g(s.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>g(s.directInstanceOf(e,t),"T",e),inRange:(e,t)=>g(s.inRange(e,t),"in range",e),any:(e,...t)=>g(s.any(e,...t),"predicate returns truthy for any value",t),all:(e,...t)=>g(s.all(e,...t),"predicate returns truthy for all values",t)},Object.defineProperties(s,{class:{value:s.class_},function:{value:s.function_},null:{value:s.null_}}),Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}}),t.default=s,e.exports=s,e.exports.default=s,e.exports.assert=t.assert},98298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93121),i=Number(process.versions.node.split(".")[0]),o=e=>{const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const r=e=>{const r=e.emit.bind(e);e.emit=(n,...i)=>("error"===n&&(t.error=Date.now(),t.phases.total=t.error-t.start,e.emit=r),r(n,...i))};r(e),e.prependOnceListener("abort",()=>{t.abort=Date.now(),(!t.response||i>=13)&&(t.phases.total=Date.now()-t.start)});const o=e=>{t.socket=Date.now(),t.phases.wait=t.socket-t.start;const r=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",r),n.default(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",r),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?o(e.socket):e.prependOnceListener("socket",o);const s=()=>{var e;t.upload=Date.now(),t.phases.request=t.upload-(null!=(e=t.secureConnect)?e:t.connect)};return("boolean"==typeof e.writableFinished?!e.writableFinished:!e.finished||0!==e.outputSize||e.socket&&0!==e.socket.writableLength)?e.prependOnceListener("finish",s):s(),e.prependOnceListener("response",e=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,e.timings=t,r(e),e.prependOnceListener("end",()=>{t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start})}),t};t.default=o,e.exports=o,e.exports.default=o},58069:(e,t,r)=>{"use strict";l.ifExists=function(e,t,r){return l(e,t,r).catch(()=>{})};const n=r(31669),i=r(56344),o=r(85622),s=r(97369),A=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,a={createPwshFile:!0,createCmdFile:s(),fs:r(35747)},c=new Map([[".js","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function u(e){const t={...a,...e},r=t.fs;return t.fs_={chmod:r.chmod?n.promisify(r.chmod):async()=>{},stat:n.promisify(r.stat),unlink:n.promisify(r.unlink),readFile:n.promisify(r.readFile),writeFile:n.promisify(r.writeFile)},t}async function l(e,t,r){const n=u(r);await n.fs_.stat(e),await async function(e,t,r){const n=await async function(e,t){const r=await t.fs_.readFile(e,"utf8"),n=r.trim().split(/\r*\n/)[0].match(A);if(!n){const t=o.extname(e).toLowerCase();return{program:c.get(t)||null,additionalArgs:""}}return{program:n[1],additionalArgs:n[2]}}(e,r);return await function(e,t){return i(o.dirname(e),{fs:t.fs})}(t,r),function(e,t,r,n){const i=u(n),o=[{generator:g,extension:""}];i.createCmdFile&&o.push({generator:h,extension:".cmd"});i.createPwshFile&&o.push({generator:f,extension:".ps1"});return Promise.all(o.map(n=>async function(e,t,r,n,i){const o=i.preserveSymlinks?"--preserve-symlinks":"",s=[r.additionalArgs,o].filter(e=>e).join(" ");return i=Object.assign({},i,{prog:r.program,args:s}),await function(e,t){return function(e,t){return t.fs_.unlink(e).catch(()=>{})}(e,t)}(t,i),await i.fs_.writeFile(t,n(e,t,i),"utf8"),function(e,t){return function(e,t){return t.fs_.chmod(e,493)}(e,t)}(t,i)}(e,t+n.extension,r,n.generator,i)))}(e,t,n,r)}(e,t,n)}function h(e,t,r){let n=o.relative(o.dirname(t),e).split("/").join("\\");const i=o.isAbsolute(n)?`"${n}"`:`"%~dp0\\${n}"`;let s,A=r.prog,a=r.args||"";const c=p(r.nodePath).win32;A?(s=`"%~dp0\\${A}.exe"`,n=i):(A=i,a="",n="");let u=r.progArgs?r.progArgs.join(" ")+" ":"",l=c?`@SET NODE_PATH=${c}\r\n`:"";return l+=s?`@IF EXIST ${s} (\r\n ${s} ${a} ${n} ${u}%*\r\n) ELSE (\r\n @SETLOCAL\r\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n ${A} ${a} ${n} ${u}%*\r\n)`:`@${A} ${a} ${n} ${u}%*\r\n`,l}function g(e,t,r){let n,i=o.relative(o.dirname(t),e),s=r.prog&&r.prog.split("\\").join("/");i=i.split("\\").join("/");const A=o.isAbsolute(i)?`"${i}"`:`"$basedir/${i}"`;let a=r.args||"";const c=p(r.nodePath).posix;s?(n=`"$basedir/${r.prog}"`,i=A):(s=A,a="",i="");let u=r.progArgs?r.progArgs.join(" ")+" ":"",l="#!/bin/sh\n";l+='basedir=$(dirname "$(echo "$0" | sed -e \'s,\\\\,/,g\')")\n\ncase `uname` in\n *CYGWIN*) basedir=`cygpath -w "$basedir"`;;\nesac\n\n';const h=r.nodePath?`export NODE_PATH="${c}"\n`:"";return l+=n?h+`if [ -x ${n} ]; then\n`+` exec ${n} ${a} ${i} ${u}"$@"\nelse \n`+` exec ${s} ${a} ${i} ${u}"$@"\nfi\n`:`${h}${s} ${a} ${i} ${u}"$@"\nexit $?\n`,l}function f(e,t,r){let n=o.relative(o.dirname(t),e);const i=r.prog&&r.prog.split("\\").join("/");let s,A=i&&`"${i}$exe"`;n=n.split("\\").join("/");const a=o.isAbsolute(n)?`"${n}"`:`"$basedir/${n}"`;let c=r.args||"",u=p(r.nodePath);const l=u.win32,h=u.posix;A?(s=`"$basedir/${r.prog}$exe"`,n=a):(A=a,c="",n="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",f='#!/usr/bin/env pwsh\n$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n\n$exe=""\n'+(r.nodePath?`$env_node_path=$env:NODE_PATH\n$env:NODE_PATH="${l}"\n`:"")+'if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {\n # Fix case when both the Windows and Linux builds of Node\n # are installed in the same directory\n $exe=".exe"\n}';return r.nodePath&&(f=f+" else {\n"+` $env:NODE_PATH="${h}"\n}`),f+="\n",f=s?f+"$ret=0\n"+`if (Test-Path ${s}) {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${s} ${c} ${n} ${g}$args\n } else {\n`+` & ${s} ${c} ${n} ${g}$args\n }\n $ret=$LASTEXITCODE\n} else {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${A} ${c} ${n} ${g}$args\n } else {\n`+` & ${A} ${c} ${n} ${g}$args\n }\n $ret=$LASTEXITCODE\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $ret\n":f+"# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n"+` $input | & ${A} ${c} ${n} ${g}$args\n} else {\n`+` & ${A} ${c} ${n} ${g}$args\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $LASTEXITCODE\n",f}function p(e){if(!e)return{win32:"",posix:""};let t="string"==typeof e?e.split(o.delimiter):Array.from(e),r={};for(let e=0;e"/mnt/"+t.toLowerCase()):t[e];r.win32=r.win32?`${r.win32};${n}`:n,r.posix=r.posix?`${r.posix}:${i}`:i,r[e]={win32:n,posix:i}}return r}e.exports=l},27589:e=>{"use strict";const t=e.exports;e.exports.default=t;const r="[",n="]",i="",o=";",s="Apple_Terminal"===process.env.TERM_PROGRAM;t.cursorTo=(e,t)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");return"number"!=typeof t?r+(e+1)+"G":r+(t+1)+";"+(e+1)+"H"},t.cursorMove=(e,t)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");let n="";return e<0?n+=r+-e+"D":e>0&&(n+=r+e+"C"),t<0?n+=r+-t+"A":t>0&&(n+=r+t+"B"),n},t.cursorUp=(e=1)=>r+e+"A",t.cursorDown=(e=1)=>r+e+"B",t.cursorForward=(e=1)=>r+e+"C",t.cursorBackward=(e=1)=>r+e+"D",t.cursorLeft="",t.cursorSavePosition=s?"7":"",t.cursorRestorePosition=s?"8":"",t.cursorGetPosition="",t.cursorNextLine="",t.cursorPrevLine="",t.cursorHide="[?25l",t.cursorShow="[?25h",t.eraseLines=e=>{let r="";for(let n=0;n[n,"8",o,o,t,i,e,n,"8",o,o,i].join(""),t.image=(e,t={})=>{let r=n+"1337;File=inline=1";return t.width&&(r+=";width="+t.width),t.height&&(r+=";height="+t.height),!1===t.preserveAspectRatio&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+i},t.iTerm={setCwd:(e=process.cwd())=>`${n}50;CurrentDir=${e}${i}`,annotation:(e,t={})=>{let r=n+"1337;";const o=void 0!==t.x,s=void 0!==t.y;if((o||s)&&(!o||!s||void 0===t.length))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(o?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+i}}},81337:e=>{"use strict";e.exports=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},18483:(e,t,r)=>{"use strict";e=r.nmd(e);const n=(e,t)=>(...r)=>`[${e(...r)+t}m`,i=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},o=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},s=e=>e,A=(e,t,r)=>[e,t,r],a=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let c;const u=(e,t,n,i)=>{void 0===c&&(c=r(2744));const o=i?10:0,s={};for(const[r,i]of Object.entries(c)){const A="ansi16"===r?"ansi":r;r===t?s[A]=e(n,o):"object"==typeof i&&(s[A]=e(i[t],o))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,n]of Object.entries(t)){for(const[r,i]of Object.entries(n))t[r]={open:`[${i[0]}m`,close:`[${i[1]}m`},n[r]=t[r],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="",t.bgColor.close="",a(t.color,"ansi",()=>u(n,"ansi16",s,!1)),a(t.color,"ansi256",()=>u(i,"ansi256",s,!1)),a(t.color,"ansi16m",()=>u(o,"rgb",A,!1)),a(t.bgColor,"ansi",()=>u(n,"ansi16",s,!0)),a(t.bgColor,"ansi256",()=>u(i,"ansi256",s,!0)),a(t.bgColor,"ansi16m",()=>u(o,"rgb",A,!0)),t}})},39920:e=>{"use strict";e.exports=(...e)=>[...new Set([].concat(...e))]},86792:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var o=n(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,o,s,A,a=r.indexOf(e),c=r.indexOf(t,a+1),u=a;if(a>=0&&c>0){for(n=[],o=r.length;u>=0&&!A;)u==a?(n.push(u),a=r.indexOf(e,u+1)):1==n.length?A=[n.pop(),c]:((i=n.pop())=0?a:c;n.length&&(A=[o,s])}return A}e.exports=t,t.range=n},73975:(e,t,r)=>{"use strict";var n=r(86897).Duplex;function i(e){if(!(this instanceof i))return new i(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)}))}else this.append(e);n.call(this)}r(31669).inherits(i,n),i.prototype._offset=function(e){var t,r=0,n=0;if(0===e)return[0,0];for(;nthis.length||e<0)){var t=this._offset(e);return this._bufs[t[0]][t[1]]}},i.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},i.prototype.copy=function(e,t,r,n){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof n||n>this.length)&&(n=this.length),r>=this.length)return e||Buffer.alloc(0);if(n<=0)return e||Buffer.alloc(0);var i,o,s=!!e,A=this._offset(r),a=n-r,c=a,u=s&&t||0,l=A[1];if(0===r&&n==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:Buffer.concat(this._bufs,this.length);for(o=0;o(i=this._bufs[o].length-l))){this._bufs[o].copy(e,u,l,l+c);break}this._bufs[o].copy(e,u,l),u+=i,c-=i,l&&(l=0)}return e},i.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return new i;var r=this._offset(e),n=this._offset(t),o=this._bufs.slice(r[0],n[0]+1);return 0==n[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new i(o)},i.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},i.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},i.prototype.duplicate=function(){for(var e=0,t=new i;ethis.length?this.length:t;for(var n=this._offset(t),o=n[0],s=n[1];o=e.length){var a=A.indexOf(e,s);if(-1!==a)return this._reverseOffset([o,a]);s=A.length-e.length+1}else{var c=this._reverseOffset([o,s]);if(this._match(c,e))return c;s++}}s=0}return-1},i.prototype._match=function(e,t){if(this.length-e{var n=r(36547),i=r(86792);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,r){var o=[],s=i("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var a,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),d=c||l,C=s.body.indexOf(",")>=0;if(!d&&!C)return s.post.match(/,.*\}/)?(t=s.pre+"{"+s.body+A+s.post,e(t)):[t];if(d)a=s.body.split(/\.\./);else{if(1===(a=function e(t){if(!t)return[""];var r=[],n=i("{","}",t);if(!n)return t.split(",");var o=n.pre,s=n.body,A=n.post,a=o.split(",");a[a.length-1]+="{"+s+"}";var c=e(A);A.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c));return r.push.apply(r,a),r}(s.body)).length)if(1===(a=e(a[0],!1).map(h)).length)return(m=s.post.length?e(s.post,!1):[""]).map((function(e){return s.pre+a[0]+e}))}var E,I=s.pre,m=s.post.length?e(s.post,!1):[""];if(d){var y=u(a[0]),w=u(a[1]),B=Math.max(a[0].length,a[1].length),Q=3==a.length?Math.abs(u(a[2])):1,v=f;w0){var x=new Array(k+1).join("0");S=b<0?"-"+x+S.slice(1):x+S}}E.push(S)}}else E=n(a,(function(t){return e(t,!1)}));for(var F=0;F=t}},12235:(e,t,r)=>{"use strict";const n=r(54900),i=r(44617),o=r(1495),s=r(425),A=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let e=A.create(n,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(A.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};A.parse=(e,t={})=>s(e,t),A.stringify=(e,t={})=>n("string"==typeof e?A.parse(e,t):e,t),A.compile=(e,t={})=>("string"==typeof e&&(e=A.parse(e,t)),i(e,t)),A.expand=(e,t={})=>{"string"==typeof e&&(e=A.parse(e,t));let r=o(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},A.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?A.compile(e,t):A.expand(e,t),e.exports=A},44617:(e,t,r)=>{"use strict";const n=r(52169),i=r(4542);e.exports=(e,t={})=>{let r=(e,o={})=>{let s=i.isInvalidBrace(o),A=!0===e.invalid&&!0===t.escapeInvalid,a=!0===s||!0===A,c=!0===t.escapeInvalid?"\\":"",u="";if(!0===e.isOpen)return c+e.value;if(!0===e.isClose)return c+e.value;if("open"===e.type)return a?c+e.value:"(";if("close"===e.type)return a?c+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":a?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let r=i.reduce(e.nodes),o=n(...r,{...t,wrap:!1,toRegex:!0});if(0!==o.length)return r.length>1&&o.length>1?`(${o})`:o}if(e.nodes)for(let t of e.nodes)u+=r(t,e);return u};return r(e)}},5384:e=>{"use strict";e.exports={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},1495:(e,t,r)=>{"use strict";const n=r(52169),i=r(54900),o=r(4542),s=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?o.flatten(t).map(e=>`{${e}}`):t;for(let i of e)if(Array.isArray(i))for(let e of i)n.push(s(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),n.push(Array.isArray(e)?s(i,e,r):i+e);return o.flatten(n)};e.exports=(e,t={})=>{let r=void 0===t.rangeLimit?1e3:t.rangeLimit,A=(e,a={})=>{e.queue=[];let c=a,u=a.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,u=c.queue;if(e.invalid||e.dollar)return void u.push(s(u.pop(),i(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void u.push(s(u.pop(),["{}"]));if(e.nodes&&e.ranges>0){let A=o.reduce(e.nodes);if(o.exceedsLimit(...A,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let a=n(...A,t);return 0===a.length&&(a=i(e,t)),u.push(s(u.pop(),a)),void(e.nodes=[])}let l=o.encloseBrace(e),h=e.queue,g=e;for(;"brace"!==g.type&&"root"!==g.type&&g.parent;)g=g.parent,h=g.queue;for(let t=0;t{"use strict";const n=r(54900),{MAX_LENGTH:i,CHAR_BACKSLASH:o,CHAR_BACKTICK:s,CHAR_COMMA:A,CHAR_DOT:a,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:g,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:C,CHAR_ZERO_WIDTH_NOBREAK_SPACE:E}=r(5384);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let r=t||{},I="number"==typeof r.maxLength?Math.min(i,r.maxLength):i;if(e.length>I)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${I})`);let m,y={type:"root",input:e,nodes:[]},w=[y],B=y,Q=y,v=0,D=e.length,b=0,S=0;const k=()=>e[b++],x=e=>{if("text"===e.type&&"dot"===Q.type&&(Q.type="text"),!Q||"text"!==Q.type||"text"!==e.type)return B.nodes.push(e),e.parent=B,e.prev=Q,Q=e,e;Q.value+=e.value};for(x({type:"bos"});b0){if(B.ranges>0){B.ranges=0;let e=B.nodes.shift();B.nodes=[e,{type:"text",value:n(B)}]}x({type:"comma",value:m}),B.commas++}else if(m===a&&S>0&&0===B.commas){let e=B.nodes;if(0===S||0===e.length){x({type:"text",value:m});continue}if("dot"===Q.type){if(B.range=[],Q.value+=m,Q.type="range",3!==B.nodes.length&&5!==B.nodes.length){B.invalid=!0,B.ranges=0,Q.type="text";continue}B.ranges++,B.args=[];continue}if("range"===Q.type){e.pop();let t=e[e.length-1];t.value+=Q.value+m,Q=t,B.ranges--;continue}x({type:"dot",value:m})}else x({type:"text",value:m});else{if("brace"!==B.type){x({type:"text",value:m});continue}let e="close";B=w.pop(),B.close=!0,x({type:e,value:m}),S--,B=w[w.length-1]}else{S++;let e=Q.value&&"$"===Q.value.slice(-1)||!0===B.dollar;B=x({type:"brace",open:!0,close:!1,dollar:e,depth:S,commas:0,ranges:0,nodes:[]}),w.push(B),x({type:"open",value:m})}else{let e,r=m;for(!0!==t.keepQuotes&&(m="");b{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});let e=w[w.length-1],t=e.nodes.indexOf(B);e.nodes.splice(t,1,...B.nodes)}}while(w.length>0);return x({type:"eos"}),y}},54900:(e,t,r)=>{"use strict";const n=r(4542);e.exports=(e,t={})=>{let r=(e,i={})=>{let o=t.escapeInvalid&&n.isInvalidBrace(i),s=!0===e.invalid&&!0===t.escapeInvalid,A="";if(e.value)return(o||s)&&n.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)A+=r(t);return A};return r(e)}},4542:(e,t)=>{"use strict";t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find(e=>e.type===t),t.exceedsLimit=(e,r,n=1,i)=>!1!==i&&(!(!t.isInteger(e)||!t.isInteger(r))&&(Number(r)-Number(e))/Number(n)>=i),t.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||"open"===n.type||"close"===n.type)&&!0!==n.escaped&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),t.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),t.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),t.flatten=(...e)=>{const t=[],r=e=>{for(let n=0;n{"use strict";const n=r(85622),{watch:i}=r(35747),{readFile:o}=r(35747).promises,{isIP:s}=r(11631),A="win32"===process.platform?n.join(process.env.SystemDrive,"Windows\\System32\\drivers\\etc\\hosts"):"/etc/hosts",a=/^(?:(?:[a-zA-Z\d]|[a-zA-Z\d][a-zA-Z\d-]*[a-zA-Z\d])\.)*(?:[A-Za-z\d]|[A-Za-z\d][A-Za-z\d-]*[A-Za-z\d])$/,c=e=>a.test(e),u={encoding:"utf8"},l=/\s+/g;class h{constructor({watching:e,customHostsPath:t=A}){this._hostsPath=t,this._error=null,this._watcher=null,this._watching=e,this._hosts={},this._init()}_init(){"string"==typeof this._hostsPath&&(this._promise=(async()=>{await this._update(),this._promise=null,this._error||this._watching&&(this._watcher=i(this._hostsPath,{persistent:!1},e=>{"change"===e?this._update():this._watcher.close()}),this._watcher.once("error",e=>{this._error=e,this._hosts={}}),this._watcher.once("close",()=>{this._init()}))})())}async _update(){try{let e=await o(this._hostsPath,u);e=e.split("\n"),this._hosts={};for(let t of e){t=t.replace(l," ").trim();const e=t.split(" "),r=s(e[0]);if(!r)continue;const n=e.shift();for(const t of e){if(!c(t))break;if(this._hosts[t]){let e=!1;for(const n of this._hosts[t])if(n.family===r){e=!0;break}if(e)continue}else this._hosts[t]=[],this._hosts[t].expires=1/0;this._hosts[t].push({address:n,family:r,expires:1/0,ttl:1/0})}}}catch(e){this._hosts={},this._error=e}}async get(e){if(this._promise&&await this._promise,this._error)throw this._error;return this._hosts[e]}}const g={};h.getResolver=({customHostsPath:e,watching:t})=>{void 0!==e&&"string"!=typeof e&&(e=!1);const r=`${e}:${t=Boolean(t)}`;let n=g[r];return n||(n=new h({customHostsPath:e,watching:t}),g[r]=n,n)},e.exports=h},43261:(e,t,r)=>{"use strict";const{V4MAPPED:n,ADDRCONFIG:i,promises:{Resolver:o},lookup:s}=r(40881),{promisify:A}=r(31669),a=r(12087),{getResolver:c}=r(76438),u=Symbol("cacheableLookupCreateConnection"),l=Symbol("cacheableLookupInstance"),h=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},g=()=>{let e=!1,t=!1;for(const r of Object.values(a.networkInterfaces()))for(const n of r)if(!n.internal&&("IPv6"===n.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},f={ttl:!0};class p{constructor({customHostsPath:e,watchingHostsFile:t=!1,cache:r=new Map,maxTtl:n=1/0,resolver:i=new o,fallbackTtl:a=1,errorTtl:u=.15}={}){this.maxTtl=n,this.fallbackTtl=a,this.errorTtl=u,this._cache=r,this._resolver=i,this._lookup=A(s),this._resolver instanceof o?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=A(this._resolver.resolve4.bind(this._resolver)),this._resolve6=A(this._resolver.resolve6.bind(this._resolver))),this._iface=g(),this._hostsResolver=c({customHostsPath:e,watching:t}),this._pending={},this._nextRemovalTime=!1,this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.updateInterfaceInfo(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if("function"==typeof t?(r=t,t={}):"number"==typeof t&&(t={family:t}),!r)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(e=>{t.all?r(null,e):r(null,e.address,e.family,e.expires,e.ttl)},r)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let r=await this.query(e);if(6===t.family){const e=r.filter(e=>6===e.family);0===e.length&&t.hints&n?(e=>{for(const t of e)t.address="::ffff:"+t.address,t.family=6})(r):r=e}else 4===t.family&&(r=r.filter(e=>4===e.family));if(t.hints&i){const{_iface:e}=this;r=r.filter(t=>6===t.family?e.has6:e.has4)}if(0===r.length){const t=new Error("ENOTFOUND "+e);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?r:1===r.length?r[0]:this._getEntry(r,e)}async query(e){let t=await this._hostsResolver.get(e)||await this._cache.get(e);if(!t){const r=this._pending[e];if(r)t=await r;else{const r=this.queryAndCache(e);this._pending[e]=r,t=await r}}return t=t.map(e=>({...e})),t}async queryAndCache(e){const[t,r]=await Promise.all([this._resolve4(e,f).catch(()=>[]),this._resolve6(e,f).catch(()=>[])]);let n=0;if(t)for(const e of t)e.family=4,e.expires=Date.now()+1e3*e.ttl,n=Math.max(n,e.ttl);if(r)for(const e of r)e.family=6,e.expires=Date.now()+1e3*e.ttl,n=Math.max(n,e.ttl);let i=[...t||[],...r||[]];if(0===i.length)try{i=await this._lookup(e,{all:!0});for(const e of i)e.ttl=this.fallbackTtl,e.expires=Date.now()+1e3*e.ttl;n=1e3*this.fallbackTtl}catch(t){throw delete this._pending[e],"ENOTFOUND"===t.code&&(n=1e3*this.errorTtl,i.expires=Date.now()+n,await this._cache.set(e,i,n),this._tick(n)),t}else n=1e3*Math.min(this.maxTtl,n);return this.maxTtl>0&&n>0&&(i.expires=Date.now()+n,await this._cache.set(e,i,n),this._tick(n)),delete this._pending[e],i}_getEntry(e,t){return e[0]}tick(){}_tick(e){if(!(this._cache instanceof Map)||void 0===e)return;const t=this._nextRemovalTime;(!t||e{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[r,{expires:n}]of this._cache)t>=n?this._cache.delete(r):n("lookup"in t||(t.lookup=this.lookup),e[u](t,r))}uninstall(e){if(h(e),e[u]){if(e[l]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[u],delete e[u],delete e[l]}}updateInterfaceInfo(){this._iface=g(),this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}e.exports=p,e.exports.default=p},11200:(e,t,r)=>{"use strict";const n=r(28614),i=r(78835),o=r(19793),s=r(58764),A=r(86834),a=r(48491),c=r(55737),u=r(15751),l=r(72515);class h{constructor(e,t){if("function"!=typeof e)throw new TypeError("Parameter `request` must be a function");return this.cache=new l({uri:"string"==typeof t&&t,store:"string"!=typeof t&&t,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let l;if("string"==typeof t)l=f(i.parse(t)),t={};else if(t instanceof i.URL)l=f(i.parse(t.toString())),t={};else{const[e,...r]=(t.path||"").split("?"),n=r.length>0?"?"+r.join("?"):"";l=f({...t,pathname:e,search:n})}(t={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...t,...g(l)}).headers=c(t.headers);const p=new n,d=o(i.format(l),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),C=`${t.method}:${d}`;let E=!1,I=!1;const m=t=>{I=!0;let n,i=!1;const o=new Promise(e=>{n=()=>{i||(i=!0,e())}}),c=e=>{if(E&&!t.forceRefresh){e.status=e.statusCode;const r=A.fromObject(E.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();(e=new a(E.statusCode,t,E.body,E.url)).cachePolicy=r.policy,e.fromCache=!0}}let n;e.fromCache||(e.cachePolicy=new A(t,e,t),e.fromCache=!1),t.cache&&e.cachePolicy.storable()?(n=u(e),(async()=>{try{const r=s.buffer(e);if(await Promise.race([o,new Promise(t=>e.once("end",t))]),i)return;const n=await r,A={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?E.statusCode:e.statusCode,body:n};let a=t.strictTtl?e.cachePolicy.timeToLive():void 0;t.maxTtl&&(a=a?Math.min(a,t.maxTtl):t.maxTtl),await this.cache.set(C,A,a)}catch(e){p.emit("error",new h.CacheError(e))}})()):t.cache&&E&&(async()=>{try{await this.cache.delete(C)}catch(e){p.emit("error",new h.CacheError(e))}})(),p.emit("response",n||e),"function"==typeof r&&r(n||e)};try{const r=e(t,c);r.once("error",n),r.once("abort",n),p.emit("request",r)}catch(e){p.emit("error",new h.RequestError(e))}};return(async()=>{const e=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(C):void 0;if(void 0===t)return m(e);const n=A.fromObject(t.cachePolicy);if(n.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=n.responseHeaders(),i=new a(t.statusCode,e,t.body,t.url);i.cachePolicy=n,i.fromCache=!0,p.emit("response",i),"function"==typeof r&&r(i)}else E=t,e.headers=n.revalidationHeaders(e),m(e)},n=e=>p.emit("error",new h.CacheError(e));this.cache.once("error",n),p.on("response",()=>this.cache.removeListener("error",n));try{await e(t)}catch(e){t.automaticFailover&&!I&&m(t),p.emit("error",new h.CacheError(e))}})(),p}}}function g(e){const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t}function f(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}h.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}},h.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}},e.exports=h},54738:e=>{"use strict";const t=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);if(0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";if(1===e.length)return t.pascalCase?e.toUpperCase():e.toLowerCase();return e!==e.toLowerCase()&&(e=(e=>{let t=!1,r=!1,n=!1;for(let i=0;it.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),r=e,t.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r;var r};e.exports=t,e.exports.default=t},95882:(e,t,r)=>{"use strict";const n=r(18483),{stdout:i,stderr:o}=r(59428),{stringReplaceAll:s,stringEncaseCRLFWithFirstIndex:A}=r(73327),a=["ansi","ansi","ansi256","ansi16m"],c=Object.create(null);class u{constructor(e){return l(e)}}const l=e=>{const t={};return((e,t={})=>{if(t.level>3||t.level<0)throw new Error("The `level` option should be an integer from 0 to 3");const r=i?i.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>I(t.template,...e),Object.setPrototypeOf(t,h.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=u,t.template};function h(e){return l(e)}for(const[e,t]of Object.entries(n))c[e]={get(){const r=d(this,p(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};c.visible={get(){const e=d(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const g=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of g)c[e]={get(){const{level:t}=this;return function(...r){const i=p(n.color[a[t]][e](...r),n.color.close,this._styler);return d(this,i,this._isEmpty)}}};for(const e of g){c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const i=p(n.bgColor[a[t]][e](...r),n.bgColor.close,this._styler);return d(this,i,this._isEmpty)}}}}const f=Object.defineProperties(()=>{},{...c,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),p=(e,t,r)=>{let n,i;return void 0===r?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},d=(e,t,r)=>{const n=(...e)=>C(n,1===e.length?""+e[0]:e.join(" "));return n.__proto__=f,n._generator=e,n._styler=t,n._isEmpty=r,n},C=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:n,closeAll:i}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=s(t,r.close,r.open),r=r.parent;const o=t.indexOf("\n");return-1!==o&&(t=A(t,i,n,o)),n+t+i};let E;const I=(e,...t)=>{const[n]=t;if(!Array.isArray(n))return t.join(" ");const i=t.slice(1),o=[n.raw[0]];for(let e=1;e{"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,i=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function A(e,t){const r=[],o=t.trim().split(/\s*,\s*/g);let A;for(const t of o){const o=Number(t);if(Number.isNaN(o)){if(!(A=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(A[2].replace(i,(e,t,r)=>t?s(t):r))}else r.push(o)}return r}function a(e){r.lastIndex=0;const t=[];let n;for(;null!==(n=r.exec(e));){const e=n[1];if(n[2]){const r=A(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function c(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw new Error("Unknown Chalk style: "+e);n=t.length>0?n[e](...t):n[e]}return n}e.exports=(e,r)=>{const n=[],i=[];let o=[];if(r.replace(t,(t,r,A,u,l,h)=>{if(r)o.push(s(r));else if(u){const t=o.join("");o=[],i.push(0===n.length?t:c(e,n)(t)),n.push({inverse:A,styles:a(u)})}else if(l){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");i.push(c(e,n)(o.join(""))),o=[],n.pop()}else o.push(h)}),i.push(o.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")}},73327:e=>{"use strict";e.exports={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;const i=t.length;let o=0,s="";do{s+=e.substr(o,n-o)+t+r,o=n+i,n=e.indexOf(t,o)}while(-1!==n);return s+=e.substr(o),s},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let i=0,o="";do{const s="\r"===e[n-1];o+=e.substr(i,(s?n-1:n)-i)+t+(s?"\r\n":"\n")+r,i=n+1,n=e.indexOf("\n",i)}while(-1!==n);return o+=e.substr(i),o}}},31059:(e,t,r)=>{var n=r(31669),i=r(24250);function o(){}o.prototype.match=function(e){var t,r,n,o,s=0,A=0,a=0,c=e.fInputBytes,u=e.fInputLen;e:for(t=0;t{var n=r(31669),i=r(24250);function o(){this.charValue=0,this.index=0,this.nextIndex=0,this.error=!1,this.done=!1,this.reset=function(){this.charValue=0,this.index=-1,this.nextIndex=0,this.error=!1,this.done=!1},this.nextByte=function(e){return this.nextIndex>=e.fRawLength?(this.done=!0,-1):255&e.fRawInput[this.nextIndex++]}}function s(){}function A(e,t){e.index=e.nextIndex,e.error=!1;var r=0,n=0,i=0;return(r=e.charValue=e.nextByte(t))<0?e.done=!0:r<=141||(n=e.nextByte(t),e.charValue=e.charValue<<8|n,r>=161&&r<=254?n<161&&(e.error=!0):142!=r?143==r&&(i=e.nextByte(t),e.charValue=e.charValue<<8|i,i<161&&(e.error=!0)):n<161&&(e.error=!0)),0==e.done}s.prototype.match=function(e){var t,r=0,n=0,s=0,A=0,a=0,c=new o;e:{for(c.reset();this.nextChar(c,e);){if(A++,c.error)s++;else{var u=4294967295&c.charValue;u<=255?0:(r++,null!=this.commonChars&&function e(t,r,n,i){if(i>>1);return r>t[o]?e(t,r,o+1,i):r=0&&n++)}if(s>=2&&5*s>=r)break e}if(r<=10&&0==s)a=0==r&&A<10?0:10;else if(r<20*s)a=0;else if(null==this.commonChars)(a=30+r-20*s)>100&&(a=100);else{var l=90/Math.log(parseFloat(r)/4);a=Math.floor(Math.log(n+1)*l+10),a=Math.min(a,100)}}return 0==a?null:new i(e,this,a)},s.prototype.nextChar=function(e,t){},e.exports.sjis=function(){this.name=function(){return"Shift-JIS"},this.language=function(){return"ja"},this.commonChars=[33088,33089,33090,33093,33115,33129,33130,33141,33142,33440,33442,33444,33449,33450,33451,33453,33455,33457,33459,33461,33463,33469,33470,33473,33476,33477,33478,33480,33481,33484,33485,33500,33504,33511,33512,33513,33514,33520,33521,33601,33603,33614,33615,33624,33630,33634,33639,33653,33654,33673,33674,33675,33677,33683,36502,37882,38314],this.nextChar=function(e,t){var r;if(e.index=e.nextIndex,e.error=!1,(r=e.charValue=e.nextByte(t))<0)return!1;if(r<=127||r>160&&r<=223)return!0;var n=e.nextByte(t);return!(n<0)&&(e.charValue=r<<8|n,n>=64&&n<=127||n>=128&&n<=255||(e.error=!0),!0)}},n.inherits(e.exports.sjis,s),e.exports.big5=function(){this.name=function(){return"Big5"},this.language=function(){return"zh"},this.commonChars=[41280,41281,41282,41283,41287,41289,41333,41334,42048,42054,42055,42056,42065,42068,42071,42084,42090,42092,42103,42147,42148,42151,42177,42190,42193,42207,42216,42237,42304,42312,42328,42345,42445,42471,42583,42593,42594,42600,42608,42664,42675,42681,42707,42715,42726,42738,42816,42833,42841,42970,43171,43173,43181,43217,43219,43236,43260,43456,43474,43507,43627,43706,43710,43724,43772,44103,44111,44208,44242,44377,44745,45024,45290,45423,45747,45764,45935,46156,46158,46412,46501,46525,46544,46552,46705,47085,47207,47428,47832,47940,48033,48593,49860,50105,50240,50271],this.nextChar=function(e,t){e.index=e.nextIndex,e.error=!1;var r=e.charValue=e.nextByte(t);if(r<0)return!1;if(r<=127||255==r)return!0;var n=e.nextByte(t);return!(n<0)&&(e.charValue=e.charValue<<8|n,(n<64||127==n||255==n)&&(e.error=!0),!0)}},n.inherits(e.exports.big5,s),e.exports.euc_jp=function(){this.name=function(){return"EUC-JP"},this.language=function(){return"ja"},this.commonChars=[41377,41378,41379,41382,41404,41418,41419,41430,41431,42146,42148,42150,42152,42154,42155,42156,42157,42159,42161,42163,42165,42167,42169,42171,42173,42175,42176,42177,42179,42180,42182,42183,42184,42185,42186,42187,42190,42191,42192,42206,42207,42209,42210,42212,42216,42217,42218,42219,42220,42223,42226,42227,42402,42403,42404,42406,42407,42410,42413,42415,42416,42419,42421,42423,42424,42425,42431,42435,42438,42439,42440,42441,42443,42448,42453,42454,42455,42462,42464,42465,42469,42473,42474,42475,42476,42477,42483,47273,47572,47854,48072,48880,49079,50410,50940,51133,51896,51955,52188,52689],this.nextChar=A},n.inherits(e.exports.euc_jp,s),e.exports.euc_kr=function(){this.name=function(){return"EUC-KR"},this.language=function(){return"ko"},this.commonChars=[45217,45235,45253,45261,45268,45286,45293,45304,45306,45308,45496,45497,45511,45527,45538,45994,46011,46274,46287,46297,46315,46501,46517,46527,46535,46569,46835,47023,47042,47054,47270,47278,47286,47288,47291,47337,47531,47534,47564,47566,47613,47800,47822,47824,47857,48103,48115,48125,48301,48314,48338,48374,48570,48576,48579,48581,48838,48840,48863,48878,48888,48890,49057,49065,49088,49124,49131,49132,49144,49319,49327,49336,49338,49339,49341,49351,49356,49358,49359,49366,49370,49381,49403,49404,49572,49574,49590,49622,49631,49654,49656,50337,50637,50862,51151,51153,51154,51160,51173,51373],this.nextChar=A},n.inherits(e.exports.euc_kr,s),e.exports.gb_18030=function(){this.name=function(){return"GB18030"},this.language=function(){return"zh"},this.nextChar=function(e,t){e.index=e.nextIndex,e.error=!1;var r=0,n=0,i=0,o=0;e:if((r=e.charValue=e.nextByte(t))<0)e.done=!0;else if(!(r<=128))if(n=e.nextByte(t),e.charValue=e.charValue<<8|n,r>=129&&r<=254){if(n>=64&&n<=126||n>=80&&n<=254)break e;if(n>=48&&n<=57&&(i=e.nextByte(t))>=129&&i<=254&&(o=e.nextByte(t))>=48&&o<=57){e.charValue=e.charValue<<16|i<<8|o;break e}e.error=!0}else;return 0==e.done},this.commonChars=[41377,41378,41379,41380,41392,41393,41457,41459,41889,41900,41914,45480,45496,45502,45755,46025,46070,46323,46525,46532,46563,46767,46804,46816,47010,47016,47037,47062,47069,47284,47327,47350,47531,47561,47576,47610,47613,47821,48039,48086,48097,48122,48316,48347,48382,48588,48845,48861,49076,49094,49097,49332,49389,49611,49883,50119,50396,50410,50636,50935,51192,51371,51403,51413,51431,51663,51706,51889,51893,51911,51920,51926,51957,51965,52460,52728,52906,52932,52946,52965,53173,53186,53206,53442,53445,53456,53460,53671,53930,53938,53941,53947,53972,54211,54224,54269,54466,54490,54754,54992]},n.inherits(e.exports.gb_18030,s)},71216:(e,t,r)=>{var n=r(31669),i=r(24250);function o(e,t){this.byteIndex=0,this.ngram=0,this.ngramList=e,this.byteMap=t,this.ngramCount=0,this.hitCount=0,this.spaceChar,this.search=function(e,t){var r=0;return e[r+32]<=t&&(r+=32),e[r+16]<=t&&(r+=16),e[r+8]<=t&&(r+=8),e[r+4]<=t&&(r+=4),e[r+2]<=t&&(r+=2),e[r+1]<=t&&(r+=1),e[r]>t&&(r-=1),r<0||e[r]!=t?-1:r},this.lookup=function(e){this.ngramCount+=1,this.search(this.ngramList,e)>=0&&(this.hitCount+=1)},this.addByte=function(e){this.ngram=(this.ngram<<8)+(255&e)&16777215,this.lookup(this.ngram)},this.nextByte=function(e){return this.byteIndex>=e.fInputLen?-1:255&e.fInputBytes[this.byteIndex++]},this.parse=function(e,t){var r,n=!1;for(this.spaceChar=t;(r=this.nextByte(e))>=0;){var i=this.byteMap[r];0!=i&&(i==this.spaceChar&&n||this.addByte(i),n=i==this.spaceChar)}this.addByte(this.spaceChar);var o=this.hitCount/this.ngramCount;return o>.33?98:Math.floor(300*o)}}function s(e,t){this.fLang=e,this.fNGrams=t}function A(){}A.prototype.spaceChar=32,A.prototype.ngrams=function(){},A.prototype.byteMap=function(){},A.prototype.match=function(e){var t=this.ngrams();if(!(Array.isArray(t)&&t[0]instanceof s))return(a=new o(t,this.byteMap()).parse(e,this.spaceChar))<=0?null:new i(e,this,a);for(var r=-1,n=null,A=t.length-1;A>=0;A--){var a,c=t[A];(a=new o(c.fNGrams,this.byteMap()).parse(e,this.spaceChar))>r&&(r=a,n=c.fLang)}var u=this.name(e);return r<=0?null:new i(e,this,r,u,n)},e.exports.ISO_8859_1=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,186,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[new s("da",[2122086,2122100,2122853,2123118,2123122,2123375,2123873,2124064,2125157,2125671,2126053,2126697,2126708,2126953,2127465,6383136,6385184,6385252,6386208,6386720,6579488,6579566,6579570,6579572,6627443,6644768,6644837,6647328,6647396,6648352,6648421,6648608,6648864,6713202,6776096,6776174,6776178,6907749,6908960,6909543,7038240,7039845,7103858,7104871,7105637,7169380,7234661,7234848,7235360,7235429,7300896,7302432,7303712,7398688,7479396,7479397,7479411,7496992,7566437,7610483,7628064,7628146,7629164,7759218]),new s("de",[2122094,2122101,2122341,2122849,2122853,2122857,2123113,2123621,2123873,2124142,2125161,2126691,2126693,2127214,2127461,2127471,2127717,2128501,6448498,6514720,6514789,6514804,6578547,6579566,6579570,6580581,6627428,6627443,6646126,6646132,6647328,6648352,6648608,6776174,6841710,6845472,6906728,6907168,6909472,6909541,6911008,7104867,7105637,7217249,7217252,7217267,7234592,7234661,7234848,7235360,7235429,7238757,7479396,7496805,7497065,7562088,7566437,7610468,7628064,7628142,7628146,7695972,7695975,7759218]),new s("en",[2122016,2122094,2122341,2122607,2123375,2123873,2123877,2124142,2125153,2125670,2125938,2126437,2126689,2126708,2126952,2126959,2127720,6383972,6384672,6385184,6385252,6386464,6386720,6386789,6386793,6561889,6561908,6627425,6627443,6627444,6644768,6647412,6648352,6648608,6713202,6840692,6841632,6841714,6906912,6909472,6909543,6909806,6910752,7217249,7217268,7234592,7235360,7238688,7300640,7302688,7303712,7496992,7500576,7544929,7544948,7561577,7566368,7610484,7628146,7628897,7628901,7629167,7630624,7631648]),new s("es",[2122016,2122593,2122607,2122853,2123116,2123118,2123123,2124142,2124897,2124911,2125921,2125935,2125938,2126197,2126437,2126693,2127214,2128160,6365283,6365284,6365285,6365292,6365296,6382441,6382703,6384672,6386208,6386464,6515187,6516590,6579488,6579564,6582048,6627428,6627429,6627436,6646816,6647328,6647412,6648608,6648692,6907246,6943598,7102752,7106419,7217253,7238757,7282788,7282789,7302688,7303712,7303968,7364978,7435621,7495968,7497075,7544932,7544933,7544944,7562528,7628064,7630624,7693600,15953440]),new s("fr",[2122101,2122607,2122849,2122853,2122869,2123118,2123124,2124897,2124901,2125921,2125935,2125938,2126197,2126693,2126703,2127214,2154528,6385268,6386793,6513952,6516590,6579488,6579571,6583584,6627425,6627427,6627428,6627429,6627436,6627440,6627443,6647328,6647412,6648352,6648608,6648864,6649202,6909806,6910752,6911008,7102752,7103776,7103859,7169390,7217252,7234848,7238432,7238688,7302688,7302772,7304562,7435621,7479404,7496992,7544929,7544932,7544933,7544940,7544944,7610468,7628064,7629167,7693600,7696928]),new s("it",[2122092,2122600,2122607,2122853,2122857,2123040,2124140,2124142,2124897,2125925,2125938,2127214,6365283,6365284,6365296,6365299,6386799,6514789,6516590,6579564,6580512,6627425,6627427,6627428,6627433,6627436,6627440,6627443,6646816,6646892,6647412,6648352,6841632,6889569,6889571,6889572,6889587,6906144,6908960,6909472,6909806,7102752,7103776,7104800,7105633,7234848,7235872,7237408,7238757,7282785,7282788,7282793,7282803,7302688,7302757,7366002,7495968,7496992,7563552,7627040,7628064,7629088,7630624,8022383]),new s("nl",[2122092,2122341,2122849,2122853,2122857,2123109,2123118,2123621,2123877,2124142,2125153,2125157,2125680,2126949,2127457,2127461,2127471,2127717,2128489,6381934,6381938,6385184,6385252,6386208,6386720,6514804,6579488,6579566,6579570,6627426,6627446,6645102,6645106,6647328,6648352,6648435,6648864,6776174,6841716,6907168,6909472,6909543,6910752,7217250,7217252,7217253,7217256,7217263,7217270,7234661,7235360,7302756,7303026,7303200,7303712,7562088,7566437,7610468,7628064,7628142,7628146,7758190,7759218,7761775]),new s("no",[2122100,2122102,2122853,2123118,2123122,2123375,2123873,2124064,2125157,2125671,2126053,2126693,2126699,2126703,2126708,2126953,2127465,2155808,6385252,6386208,6386720,6579488,6579566,6579572,6627443,6644768,6647328,6647397,6648352,6648421,6648864,6648948,6713202,6776174,6908779,6908960,6909543,7038240,7039845,7103776,7105637,7169380,7169390,7217267,7234848,7235360,7235429,7237221,7300896,7302432,7303712,7398688,7479411,7496992,7565165,7566437,7610483,7628064,7628142,7628146,7629164,7631904,7631973,7759218]),new s("pt",[2122016,2122607,2122849,2122853,2122863,2123040,2123123,2125153,2125423,2125600,2125921,2125935,2125938,2126197,2126437,2126693,2127213,6365281,6365283,6365284,6365296,6382693,6382703,6384672,6386208,6386273,6386464,6516589,6516590,6578464,6579488,6582048,6582131,6627425,6627428,6647072,6647412,6648608,6648692,6906144,6906721,7169390,7238757,7238767,7282785,7282787,7282788,7282789,7282800,7303968,7364978,7435621,7495968,7497075,7544929,7544932,7544933,7544944,7566433,7628064,7630624,7693600,14905120,15197039]),new s("sv",[2122100,2122102,2122853,2123118,2123510,2123873,2124064,2124142,2124655,2125157,2125667,2126053,2126699,2126703,2126708,2126953,2127457,2127465,2155634,6382693,6385184,6385252,6386208,6386804,6514720,6579488,6579566,6579570,6579572,6644768,6647328,6648352,6648864,6747762,6776174,6909036,6909543,7037216,7105568,7169380,7217267,7233824,7234661,7235360,7235429,7235950,7299944,7302432,7302688,7398688,7479393,7479411,7495968,7564129,7565165,7610483,7627040,7628064,7628146,7629164,7631904,7758194,14971424,16151072])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1252":"ISO-8859-1"}},n.inherits(e.exports.ISO_8859_1,A),e.exports.ISO_8859_2=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,177,32,179,32,181,182,32,32,185,186,187,188,32,190,191,32,177,32,179,32,181,182,183,32,185,186,187,188,32,190,191,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,32]},this.ngrams=function(){return[new s("cs",[2122016,2122361,2122863,2124389,2125409,2125413,2125600,2125668,2125935,2125938,2126072,2126447,2126693,2126703,2126708,2126959,2127392,2127481,2128481,6365296,6513952,6514720,6627440,6627443,6627446,6647072,6647533,6844192,6844260,6910836,6972704,7042149,7103776,7104800,7233824,7268640,7269408,7269664,7282800,7300206,7301737,7304052,7304480,7304801,7368548,7368554,7369327,7403621,7562528,7565173,7566433,7566441,7566446,7628146,7630573,7630624,7676016,12477728,14773997,15296623,15540336,15540339,15559968,16278884]),new s("hu",[2122016,2122106,2122341,2123111,2123116,2123365,2123873,2123887,2124147,2124645,2124649,2124790,2124901,2125153,2125157,2125161,2125413,2126714,2126949,2156915,6365281,6365291,6365293,6365299,6384416,6385184,6388256,6447470,6448494,6645625,6646560,6646816,6646885,6647072,6647328,6648421,6648864,6648933,6648948,6781216,6844263,6909556,6910752,7020641,7075450,7169383,7170414,7217249,7233899,7234923,7234925,7238688,7300985,7544929,7567973,7567988,7568097,7596391,7610465,7631904,7659891,8021362,14773792,15299360]),new s("pl",[2122618,2122863,2124064,2124389,2124655,2125153,2125161,2125409,2125417,2125668,2125935,2125938,2126697,2127648,2127721,2127737,2128416,2128481,6365296,6365303,6385257,6514720,6519397,6519417,6582048,6584937,6627440,6627443,6627447,6627450,6645615,6646304,6647072,6647401,6778656,6906144,6907168,6907242,7037216,7039264,7039333,7170405,7233824,7235937,7235941,7282800,7305057,7305065,7368556,7369313,7369327,7369338,7502437,7502457,7563754,7564137,7566433,7825765,7955304,7957792,8021280,8022373,8026400,15955744]),new s("ro",[2122016,2122083,2122593,2122597,2122607,2122613,2122853,2122857,2124897,2125153,2125925,2125938,2126693,2126819,2127214,2144873,2158190,6365283,6365284,6386277,6386720,6386789,6386976,6513010,6516590,6518048,6546208,6579488,6627425,6627427,6627428,6627440,6627443,6644e3,6646048,6646885,6647412,6648692,6889569,6889571,6889572,6889584,6907168,6908192,6909472,7102752,7103776,7106418,7107945,7234848,7238770,7303712,7365998,7496992,7497057,7501088,7594784,7628064,7631477,7660320,7694624,7695392,12216608,15625760])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1250":"ISO-8859-2"}},n.inherits(e.exports.ISO_8859_2,A),e.exports.ISO_8859_5=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,241,242,243,244,245,246,247,248,249,250,251,252,32,254,255,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,32,241,242,243,244,245,246,247,248,249,250,251,252,32,254,255]},this.ngrams=function(){return[2150944,2151134,2151646,2152400,2152480,2153168,2153182,2153936,2153941,2154193,2154462,2154464,2154704,2154974,2154978,2155230,2156514,2158050,13688280,13689580,13884960,14015468,14015960,14016994,14017056,14164191,14210336,14211104,14216992,14407133,14407712,14413021,14536736,14538016,14538965,14538991,14540320,14540498,14557394,14557407,14557409,14602784,14602960,14603230,14604576,14605292,14605344,14606818,14671579,14672085,14672088,14672094,14733522,14734804,14803664,14803666,14803672,14806816,14865883,14868e3,14868192,14871584,15196894,15459616]},this.name=function(e){return"ISO-8859-5"},this.language=function(){return"ru"}},n.inherits(e.exports.ISO_8859_5,A),e.exports.ISO_8859_6=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32]},this.ngrams=function(){return[2148324,2148326,2148551,2152932,2154986,2155748,2156006,2156743,13050055,13091104,13093408,13095200,13100064,13100227,13100231,13100232,13100234,13100236,13100237,13100239,13100243,13100249,13100258,13100261,13100264,13100266,13100320,13100576,13100746,13115591,13181127,13181153,13181156,13181157,13181160,13246663,13574343,13617440,13705415,13748512,13836487,14229703,14279913,14805536,14950599,14993696,15001888,15002144,15016135,15058720,15059232,15066656,15081671,15147207,15189792,15255524,15263264,15278279,15343815,15343845,15343848,15386912,15388960,15394336]},this.name=function(e){return"ISO-8859-6"},this.language=function(){return"ar"}},n.inherits(e.exports.ISO_8859_6,A),e.exports.ISO_8859_7=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,161,162,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,220,32,221,222,223,32,252,32,253,254,192,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,32,243,244,245,246,247,248,249,250,251,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,32]},this.ngrams=function(){return[2154989,2154992,2155497,2155753,2156016,2156320,2157281,2157797,2158049,2158368,2158817,2158831,2158833,2159604,2159605,2159847,2159855,14672160,14754017,14754036,14805280,14806304,14807292,14807584,14936545,15067424,15069728,15147252,15199520,15200800,15278324,15327520,15330014,15331872,15393257,15393268,15525152,15540449,15540453,15540464,15589664,15725088,15725856,15790069,15790575,15793184,15868129,15868133,15868138,15868144,15868148,15983904,15984416,15987951,16048416,16048617,16050157,16050162,16050666,16052e3,16052213,16054765,16379168,16706848]},this.name=function(e){return e&&e.fC1Bytes?"windows-1253":"ISO-8859-7"},this.language=function(){return"el"}},n.inherits(e.exports.ISO_8859_7,A),e.exports.ISO_8859_8=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,32,32,32,32,32]},this.ngrams=function(){return[new s("he",[2154725,2154727,2154729,2154746,2154985,2154990,2155744,2155749,2155753,2155758,2155762,2155769,2155770,2157792,2157796,2158304,2159340,2161132,14744096,14950624,14950625,14950628,14950636,14950638,14950649,15001056,15065120,15068448,15068960,15071264,15071776,15278308,15328288,15328762,15329773,15330592,15331104,15333408,15333920,15474912,15474916,15523872,15524896,15540448,15540449,15540452,15540460,15540462,15540473,15655968,15671524,15787040,15788320,15788525,15920160,16261348,16312813,16378912,16392416,16392417,16392420,16392428,16392430,16392441]),new s("he",[2154725,2154732,2155753,2155756,2155758,2155760,2157040,2157810,2157817,2158053,2158057,2158565,2158569,2160869,2160873,2161376,2161381,2161385,14688484,14688492,14688493,14688506,14738464,14738916,14740512,14741024,14754020,14754029,14754042,14950628,14950633,14950636,14950637,14950639,14950648,14950650,15002656,15065120,15066144,15196192,15327264,15327520,15328288,15474916,15474925,15474938,15528480,15530272,15591913,15591920,15591928,15605988,15605997,15606010,15655200,15655968,15918112,16326884,16326893,16326906,16376864,16441376,16442400,16442857])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1255":"ISO-8859-8"},this.language=function(){return"he"}},n.inherits(e.exports.ISO_8859_8,A),e.exports.ISO_8859_9=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,186,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,105,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[2122337,2122345,2122357,2122849,2122853,2123621,2123873,2124140,2124641,2124655,2125153,2125676,2126689,2126945,2127461,2128225,6365282,6384416,6384737,6384993,6385184,6385405,6386208,6386273,6386429,6386685,6388065,6449522,6578464,6579488,6580512,6627426,6627435,6644841,6647328,6648352,6648425,6648681,6909029,6909472,6909545,6910496,7102830,7102834,7103776,7103858,7217249,7217250,7217259,7234657,7234661,7234848,7235872,7235950,7273760,7498094,7535982,7759136,7954720,7958386,16608800,16608868,16609021,16642301]},this.name=function(e){return e&&e.fC1Bytes?"windows-1254":"ISO-8859-9"},this.language=function(){return"tr"}},n.inherits(e.exports.ISO_8859_9,A),e.exports.windows_1251=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,144,131,32,131,32,32,32,32,32,32,154,32,156,157,158,159,144,32,32,32,32,32,32,32,32,32,154,32,156,157,158,159,32,162,162,188,32,180,32,32,184,32,186,32,32,32,32,191,32,32,179,179,180,181,32,32,184,32,186,32,188,190,190,191,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[2155040,2155246,2155758,2156512,2156576,2157280,2157294,2158048,2158053,2158305,2158574,2158576,2158816,2159086,2159090,2159342,2160626,2162162,14740968,14742268,14937632,15068156,15068648,15069682,15069728,15212783,15263008,15263776,15269664,15459821,15460384,15465709,15589408,15590688,15591653,15591679,15592992,15593186,15605986,15605999,15606001,15655456,15655648,15655918,15657248,15657980,15658016,15659506,15724267,15724773,15724776,15724782,15786210,15787492,15856352,15856354,15856360,15859488,15918571,15920672,15920880,15924256,16249582,16512288]},this.name=function(e){return"windows-1251"},this.language=function(){return"ru"}},n.inherits(e.exports.windows_1251,A),e.exports.windows_1256=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,129,32,131,32,32,32,32,136,32,138,32,156,141,142,143,144,32,32,32,32,32,32,32,152,32,154,32,156,32,32,159,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,32,32,32,32,32,32,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,32,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,32,32,32,32,244,32,32,32,32,249,32,251,252,32,32,255]},this.ngrams=function(){return[2148321,2148324,2148551,2153185,2153965,2154977,2155492,2156231,13050055,13091104,13093408,13095200,13099296,13099459,13099463,13099464,13099466,13099468,13099469,13099471,13099475,13099482,13099486,13099491,13099494,13099501,13099808,13100064,13100234,13115591,13181127,13181149,13181153,13181155,13181158,13246663,13574343,13617440,13705415,13748512,13836487,14295239,14344684,14544160,14753991,14797088,14806048,14806304,14885063,14927648,14928160,14935072,14950599,15016135,15058720,15124449,15131680,15474887,15540423,15540451,15540454,15583520,15585568,15590432]},this.name=function(e){return"windows-1256"},this.language=function(){return"ar"}},n.inherits(e.exports.windows_1256,A),e.exports.KOI8_R=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,163,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,163,32,32,32,32,32,32,32,32,32,32,32,32,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223]},this.ngrams=function(){return[2147535,2148640,2149313,2149327,2150081,2150085,2150338,2150607,2150610,2151105,2151375,2151380,2151631,2152224,2152399,2153153,2153684,2154196,12701385,12702936,12963032,12963529,12964820,12964896,13094688,13181136,13223200,13224224,13226272,13419982,13420832,13424846,13549856,13550880,13552069,13552081,13553440,13553623,13574352,13574355,13574359,13617103,13617696,13618392,13618464,13620180,13621024,13621185,13684684,13685445,13685449,13685455,13812183,13813188,13881632,13882561,13882569,13882583,13944268,13946656,13946834,13948960,14272544,14603471]},this.name=function(e){return"KOI8-R"},this.language=function(){return"ru"}},n.inherits(e.exports.KOI8_R,A)},48794:(e,t,r)=>{"use strict";var n=r(31669),i=r(24250);function o(){}e.exports.UTF_16BE=function(){this.name=function(){return"UTF-16BE"},this.match=function(e){var t=e.fRawInput;return t.length>=2&&254==(255&t[0])&&255==(255&t[1])?new i(e,this,100):null}},e.exports.UTF_16LE=function(){this.name=function(){return"UTF-16LE"},this.match=function(e){var t=e.fRawInput;return t.length>=2&&255==(255&t[0])&&254==(255&t[1])?t.length>=4&&0==t[2]&&0==t[3]?null:new i(e,this,100):null}},o.prototype.match=function(e){var t=e.fRawInput,r=e.fRawLength/4*4,n=0,o=0,s=!1,A=0;if(0==r)return null;65279==this.getChar(t,0)&&(s=!0);for(var a=0;a=1114111||c>=55296&&c<=57343?o+=1:n+=1}return s&&0==o?A=100:s&&n>10*o?A=80:n>3&&0==o?A=100:n>0&&0==o?A=80:n>10*o&&(A=25),0==A?null:new i(e,this,A)},e.exports.UTF_32BE=function(){this.name=function(){return"UTF-32BE"},this.getChar=function(e,t){return(255&e[t+0])<<24|(255&e[t+1])<<16|(255&e[t+2])<<8|255&e[t+3]}},n.inherits(e.exports.UTF_32BE,o),e.exports.UTF_32LE=function(){this.name=function(){return"UTF-32LE"},this.getChar=function(e,t){return(255&e[t+3])<<24|(255&e[t+2])<<16|(255&e[t+1])<<8|255&e[t+0]}},n.inherits(e.exports.UTF_32LE,o)},76023:(e,t,r)=>{var n=r(24250);e.exports=function(){this.name=function(){return"UTF-8"},this.match=function(e){var t,r=!1,i=0,o=0,s=e.fRawInput,A=0;e.fRawLength>=3&&239==(255&s[0])&&187==(255&s[1])&&191==(255&s[2])&&(r=!0);for(var a=0;a5)break;A=0}for(;!(++a>=e.fRawLength);){if(128!=(192&s[a])){o++;break}if(0==--A){i++;break}}}}if(t=0,r&&0==o)t=100;else if(r&&i>10*o)t=80;else if(i>3&&0==o)t=100;else if(i>0&&0==o)t=80;else if(0==i&&0==o)t=10;else{if(!(i>10*o))return null;t=25}return new n(e,this,t)}}},80848:function(e,t,r){var n=r(35747),i=r(76023),o=r(48794),s=r(9044),A=r(71216),a=r(31059),c=this,u=[new i,new o.UTF_16BE,new o.UTF_16LE,new o.UTF_32BE,new o.UTF_32LE,new s.sjis,new s.big5,new s.euc_jp,new s.euc_kr,new s.gb_18030,new a.ISO_2022_JP,new a.ISO_2022_KR,new a.ISO_2022_CN,new A.ISO_8859_1,new A.ISO_8859_2,new A.ISO_8859_5,new A.ISO_8859_6,new A.ISO_8859_7,new A.ISO_8859_8,new A.ISO_8859_9,new A.windows_1251,new A.windows_1256,new A.KOI8_R];e.exports.detect=function(e,t){for(var r=[],n=0;n<256;n++)r[n]=0;for(n=e.length-1;n>=0;n--)r[255&e[n]]++;var i=!1;for(n=128;n<=159;n+=1)if(0!=r[n]){i=!0;break}var o={fByteStats:r,fC1Bytes:i,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},s=u.map((function(e){return e.match(o)})).filter((function(e){return!!e})).sort((function(e,t){return t.confidence-e.confidence}));return t&&!0===t.returnAllMatches?s:s.length>0?s[0].name:null},e.exports.detectFile=function(e,t,r){var i;"function"==typeof t&&(r=t,t=void 0);var o=function(e,o){if(i&&n.closeSync(i),e)return r(e,null);r(null,c.detect(o,t))};if(t&&t.sampleSize)return i=n.openSync(e,"r"),sample=Buffer.allocUnsafe(t.sampleSize),void n.read(i,sample,0,t.sampleSize,null,(function(e){o(e,sample)}));n.readFile(e,o)},e.exports.detectFileSync=function(e,t){if(t&&t.sampleSize){var r=n.openSync(e,"r"),i=Buffer.allocUnsafe(t.sampleSize);return n.readSync(r,i,0,t.sampleSize),n.closeSync(r),c.detect(i,t)}return c.detect(n.readFileSync(e),t)},e.exports.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,c.detect(e,t)},e.exports.detectFileAll=function(e,t,r){"function"==typeof t&&(r=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,c.detectFile(e,t,r)},e.exports.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,c.detectFileSync(e,t)}},24250:e=>{e.exports=function(e,t,r,n,i){this.confidence=r,this.name=n||t.name(e),this.lang=i}},82758:(e,t,r)=>{"use strict";const n=r(35747),i=r(85622),o=n.lchown?"lchown":"chown",s=n.lchownSync?"lchownSync":"chownSync",A=process.version;let a=(e,t,r)=>n.readdir(e,t,r);/^v4\./.test(A)&&(a=(e,t,r)=>n.readdir(e,r));const c=(e,t,r,s,A)=>{if("string"==typeof t)return n.lstat(i.resolve(e,t),(n,i)=>{if(n)return A(n);i.name=t,c(e,i,r,s,A)});t.isDirectory()?u(i.resolve(e,t.name),r,s,a=>{if(a)return A(a);n[o](i.resolve(e,t.name),r,s,A)}):n[o](i.resolve(e,t.name),r,s,A)},u=(e,t,r,i)=>{a(e,{withFileTypes:!0},(s,A)=>{if(s&&"ENOTDIR"!==s.code&&"ENOTSUP"!==s.code)return i(s);if(s||!A.length)return n[o](e,t,r,i);let a=A.length,u=null;const l=s=>{if(!u)return s?i(u=s):0==--a?n[o](e,t,r,i):void 0};A.forEach(n=>c(e,n,t,r,l))})},l=(e,t,r)=>{let o;try{o=((e,t)=>n.readdirSync(e,t))(e,{withFileTypes:!0})}catch(i){if(i&&"ENOTDIR"===i.code&&"ENOTSUP"!==i.code)return n[s](e,t,r);throw i}return o.length&&o.forEach(o=>((e,t,r,o)=>{if("string"==typeof t){const r=n.lstatSync(i.resolve(e,t));r.name=t,t=r}t.isDirectory()&&l(i.resolve(e,t.name),r,o),n[s](i.resolve(e,t.name),r,o)})(e,o,t,r)),n[s](e,t,r)};e.exports=u,u.sync=l},5864:(e,t,r)=>{"use strict";var n=r(85832),i=process.env;function o(e){return"string"==typeof e?!!i[e]:Object.keys(e).every((function(t){return i[t]===e[t]}))}Object.defineProperty(t,"_vendors",{value:n.map((function(e){return e.constant}))}),t.name=null,t.isPR=null,n.forEach((function(e){var r=(Array.isArray(e.env)?e.env:[e.env]).every((function(e){return o(e)}));if(t[e.constant]=r,r)switch(t.name=e.name,typeof e.pr){case"string":t.isPR=!!i[e.pr];break;case"object":"env"in e.pr?t.isPR=e.pr.env in i&&i[e.pr.env]!==e.pr.ne:"any"in e.pr?t.isPR=e.pr.any.some((function(e){return!!i[e]})):t.isPR=o(e.pr);break;default:t.isPR=null}})),t.isCI=!!(i.CI||i.CONTINUOUS_INTEGRATION||i.BUILD_NUMBER||i.RUN_ID||t.name)},85832:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY_BUILD_BASE","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')},61696:(e,t,r)=>{"use strict";const n=r(3390);let i=!1;t.show=(e=process.stderr)=>{e.isTTY&&(i=!1,e.write("[?25h"))},t.hide=(e=process.stderr)=>{e.isTTY&&(n(),i=!0,e.write("[?25l"))},t.toggle=(e,r)=>{void 0!==e&&(i=e),i?t.show(r):t.hide(r)}},17945:(e,t,r)=>{"use strict";e.exports=function(e){var t=function(e){var t={defaultWidth:0,output:process.stdout,tty:r(33867)};return e?(Object.keys(t).forEach((function(r){e[r]||(e[r]=t[r])})),e):t}(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){var n=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(n)&&0!==n)return n}return t.defaultWidth}},17278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){this.help=!1}static getMeta(e){const t=e.constructor;return t.meta=Object.prototype.hasOwnProperty.call(t,"meta")?t.meta:{definitions:[],transformers:[(e,t)=>{for(const{name:r,value:n}of e.options)"-h"!==r&&"--help"!==r||(t.help=n)}]}}static resolveMeta(e){const t=[],n=[];for(let i=e;i instanceof r;i=i.__proto__){const e=this.getMeta(i);for(const r of e.definitions)t.push(r);for(const t of e.transformers)n.push(t)}return{definitions:t,transformers:n}}static registerDefinition(e,t){this.getMeta(e).definitions.push(t)}static registerTransformer(e,t){this.getMeta(e).transformers.push(t)}static addPath(...e){this.Path(...e)(this.prototype,"execute")}static addOption(e,t){t(this.prototype,e)}static Path(...e){return(t,r)=>{this.registerDefinition(t,t=>{t.addPath(e)})}}static Boolean(e,{hidden:t=!1}={}){return(r,n)=>{const i=e.split(",");this.registerDefinition(r,e=>{e.addOption({names:i,arity:0,hidden:t,allowBinding:!1})}),this.registerTransformer(r,(e,t)=>{for(const{name:r,value:o}of e.options)i.includes(r)&&(t[n]=o)})}}static String(e={required:!0},{tolerateBoolean:t=!1,hidden:r=!1}={}){return(n,i)=>{if("string"==typeof e){const o=e.split(",");this.registerDefinition(n,e=>{e.addOption({names:o,arity:t?0:1,hidden:r})}),this.registerTransformer(n,(e,t)=>{for(const{name:r,value:n}of e.options)o.includes(r)&&(t[i]=n)})}else this.registerDefinition(n,t=>{t.addPositional({name:i,required:e.required})}),this.registerTransformer(n,(e,t)=>{e.positionals.length>0&&(t[i]=e.positionals.shift().value)})}}static Array(e,{hidden:t=!1}={}){return(r,n)=>{const i=e.split(",");this.registerDefinition(r,e=>{e.addOption({names:i,arity:1,hidden:t})}),this.registerTransformer(r,(e,t)=>{for(const{name:r,value:o}of e.options)i.includes(r)&&(t[n]=t[n]||[],t[n].push(o))})}}static Rest({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addRest({name:r,required:e})}),this.registerTransformer(t,(e,t)=>{t[r]=e.positionals.map(({value:e})=>e)})}}static Proxy({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addProxy({required:e})}),this.registerTransformer(t,(e,t)=>{t[r]=e.positionals.map(({value:e})=>e)})}}static Usage(e){return e}static Schema(e){return e}async validateAndExecute(){const e=this.constructor.schema;if(void 0!==e)try{await e.validate(this)}catch(e){throw"ValidationError"===e.name&&(e.clipanion={type:"usage"}),e}const t=await this.execute();return void 0!==t?t:0}} +module.exports=(()=>{var __webpack_modules__={65379:e=>{"use strict";e.exports={}},25545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=25545,e.exports=t},49775:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-compat"}')},35729:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-dlx"}')},37904:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-essentials"}')},17508:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-file"}')},84779:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-git"}')},88454:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-github"}')},91953:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-http"}')},63756:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-init"}')},23100:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-link"}')},47047:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-node-modules"}')},31880:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-npm-cli"}')},67310:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-npm"}')},74617:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-pack"}')},85458:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-patch"}')},8211:e=>{"use strict";e.exports=JSON.parse('{"u2":"@yarnpkg/plugin-pnp"}')},80150:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(84132);const i={optional:!0},o=[["@samverschueren/stream-to-observable@*",{peerDependenciesMeta:{rxjs:i,zenObservable:i}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:i,zenObservable:i}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@*",{peerDependenciesMeta:{"supports-color":i}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":i,"postcss-jsx":i,"postcss-less":i,"postcss-markdown":i,"postcss-scss":i}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}]],s=r(78761).brotliDecompressSync(Buffer.from("G8EIABwHuTnyDkxeQiomXep01zJ90cJ3iFSgGcnN+dVTE5YC1CBsZn0bRMFnq2+/bPJOWLRlcCblbWaytN6yn94lDuHQVXEMzob/mhDOafB/uXcOjPnzEX5TF8I/4H+A7n4PCzSY0xTuWjDfxxV8F1neM4x7jymltl+dnYEp13SxCOpkQxUClagaNItavHVUdwD73pT3+c52oJFtOTmagkX/GAaKFyr1bLfAnKMY+OZmY+0YsC6Sci7AJQI2zADQHhdIcc03Dz+GOC05kpj3M0kiNKsdFu1U3ornmwco/hOeYDp3IUlCIQqaE6eg8ho+SQaBwAeE4PktvsKmDJJy8fXAx0jTz4Oj2wWKVgNnuMz/CR5AZNuo2eZk0HwujkkFQBytGPu+p1RoCpRBYVcTf7REjfuVBUIa+MgTpb+ZaKgASLlmw2dFNlIsdYEsSntc1vhEJfQLSkVdBXXK67OUoZjcjVu8DPd8oSwu1vK52tVmsLNeekvJW3ss4Z1+thxuul1A0bzLBLT7MQMQxaGNFQUpvaAsmmOVo1hZFKHViytsKRvkULx6+VpOghLO9W/tHqSTQkqQkLWIKtzBlsPNUviOym6eOz3jjDM43Jfi2pXbla5apaLf+jR3njZPcG1zp9bxgi6Acg2V4n8rU8+1ANM2CXkW5tkqS6QfhnL1z8/s5G8r/f4omOaXOkzbHh9HdPhfxz9Tftr698n6L7UYF/L089Ch+9QgeDSlUXdaBAyLU3G6bkC5ygWmNqZMBYJHB6iFj4uo0iI9yR5r3KUooI0Zg1IkiYsgqxR8jMug6VgwtyIaxNxP30CqZH3zo/g16/wof1VdCLhd+YIOeBHFhA/D2eAvyld7FIAT8EiOA1Msg41mq8UNYCwZt2Pc519uZYhp9gP6kOwhcU+Ydc0CsPIqfy0ZGgbIKNYGZ+RP4ESfRzdDW6vhSsXuu2VB29YEdri/7CbQ7XCsVevHtY2mms7dVEMb6Wa/Ln6ZokATZTjZ/kMMNoWEp0AqBKG0DaCyBxlBsylqymr/6xM+mxOAAVREIXXGnW4IXuQ5oSGimw0C7BKZb3ZDLEWtkWXM5FB7jjp37QA=","base64")).toString(),A=r(78761).brotliDecompressSync(Buffer.from("G1QTIIzURnVBnGa0VPvr81orV8AFIqdU0sqrdcVgCdukgAZwi8a50gLk9+19Z2NcUILjmzXkzt4dzm5a6Yoys+/9qnKiaApXukOiuoyUaMcynG4X7X4vBaIE/PL30gwG6HSGJkLxb9PnLjfMr+748n7sM6C/NycK6ber/bX1reVVxta6W/31tZIhfrS+upoE/TPRHj0S/l0T59gTGdtKOp1OmMOJt9rhfucDdLJ2tgyfnO+u4YMkQAcYq/nebTcDmbXhqhgo6iQA4M3m4xya4Cos3p6klmkmQT+S4DLDZfwfMF+sUCx36KleOtaHLQfEIz0Bmncj/Ngi3lqOl4391EWEfIss6gVp3oDUGwsSZJKeOVONJWZg+Mue3KUMV3aMqYJ+7b2219D+GFDi8EV5y/Y+5J+He0oNjKAgqLsJziEsS9uIaCu3BHBKSXxNKKa2ShbfglcWoiiVT2kfGI7Gw+YJ/Sqy1H6wdFWtyVUQIa82JPwbeV25YKLzc5ZIFM6GCPSA+J9dTvJbs5LuuKnLP3f09gCu2jxqsAv6CA+ZySVaUJr2d3A70BC/uBCKr2OVrWgC3fSwb7NlfkgSEEiejrMGvhya9lMbVI6lMsFKN330A1/FOaefHQdNGLEZ3IwFF87H3xVlM0Xxsmbi/7A60oymRcIe0tH90alG6ez/yA7jwYotxuHWZdR+1HlMcddGHAV6QD/gXYPV0wnNv47I+5FGevzZFMqWSO8GU4nQ3FjsdgdJcD+c1rvudERKuLyd7bxiBpnsMDHsvPP4nXdXkld/gUNks3GAE1Otmb90bavDyiw4Mrx496Iw+jbLTgsCZGZXSZ9vM55C7KGe4HyJAKXEk0iT/Cj/PFwLJBN7pcP7ZFfYtUApGTWKkYhI9IE2zt/5ByH72wdvH+88b71zuv/FMCX3w6x5nzhY44Cg5IYv9LeKwHuHIWgPbfgrAcUxOlKkPRdQOIDF/aBuLPJAXD+TgxCNXx4jQxeR/qlBWVikFPfEI4rXMUc4kZ2w9KbPKYRvFUag0dVlVoyUP4zfidbTXAdZF88jAckl+NHjLFCNdX7EQ1PbLSOl+P+MqgwEOCi6dxgWZ7NCwJBjWKpk1LaxwKrhZ4aEC/0lMPJYe5S8xAakDcmA2kSS86GjEMTrv3VEu0S0YGZcxToMV524G4WAc4CReePePdipvs4aXRL5p+aeN96yfMGjsiTbQNxgbdRKc+keQ+NxYIEm1mBtEO29WrcbrqNbQRMR66KpGG4aG0NtmRyZ2JhUvu0paCklRlID8PT3gSiwZrqr4XZXoBBzBMrveWCuOg7iTgGDXDdbGi8XHkQf5KXDGFUxWueu5wkSa6gMWY1599g2piQjwBKIAPt4N5cOZdFBidz2feGwEAy1j1UydGxDSCCUsh314cUIIRV/dWCheceubL2gU8CibewmP7UxmN5kN4I7zfQhPxkP0NCcei8GXQpw4c3krEzW7PR2hgi/hqqqR58UJ/ZVfWxfcH5ZKMo4itkmPK0FCGxzzIRP20lK/gz28Y03sY233KvSVWUKl9rcbX6MbHjpUG8MvNlw72p6FwTejv92zgpnCxVJnIHHZhCBxNcHF5RTveRp513hUtTHHq4BIndlytZT5xoTSYfHKqKNr4o9kcGINIz6tZSKRdtbON3Ydr9cgqxHIeisMNIsvPg/IFMZuBbSqqDLeSO5dak1cGr76FtH2PC7hs0S0Oq3GsmF1Ga4YABAMGcdPAWzTk26B7cKV91I2b0V/GYvnsEQ1YGntRqi5EQqTlgZszbV/32GuZtUF49JOA/r4jAdwUOsbPo6mNoBlJPYjM5axrZaWQf33bFsLWqiyvvDOM4x0Ng802T7cuP2a3q98GWq6yiq6q3M77hcZlOUnmryctRYmI4Hb2F5XixFohkBmySCjU+M7/WQVE5YAtnlxiUJDhFN0y1tNeMWY9E0MfZi2rQ4eC72WXjsAA==","base64")).toString(),a=r(78761).brotliDecompressSync(Buffer.from("WyHkE0WwceA9ZGtRBBsHkLD3TaMINg6IjfzbjJYHPBl/o5oAFhHLKuiq8VprTwgEGLvUcyL+J86MkcuI/mc6u3M5PbwFyUWC3Q4RLb1t9woXohTh8f8Jae6VFhCg6hrpZ9Thw2j6JVV+sAbpmVFo6gIU0aqooHrZ9tnnYzCfT6aSgg0Mvp/KprXjWFAnp2gOPGj+C7kWbLvY1OT0/9vPf22RLLCqkR+dqVC9e87MeZCbPEjy1gsVkM6cmfuSl5tPlAKAUGXVGl1j2Vd9p/MZVWWrUFW1QqherZX2QzDzBFMfHRmhCZx87N29DqpUFKoXJj5Vsz0UwPKRQOWjyIsTjpzmDW1w4Z/VXYzJMpa5x973O4UkhAABgVpxJnvVPzV/fWM6C7xDfBLGwvTnz12WSJK5GVbfeqY5mboOZq+jLZTfEPIaL6HbmY+NZWNv7PnRM2vANx/S3UNRo+XBxzl+wtD8a2/l+c31SZIEwUu0RBGSr/gYyYccLZIvmp1uv+Xwjjs5g+1jmab18yEcNRdXggLbUcvr5QjGCkA6LsdNmLJhl+9SwVBufQrvekuJlxbLqCpHPSwtMgFgV0B8R9qLed8XqNsoZ4w/rPg2f3MOGAJqggWxdHhiRifOWZfkX8alzRJTBUvyrbgBxm8AjtW1krpuWW1S38i8VCMfFitJwibdM336VJTN10rCzexaj4KCJb4vjL+9547lSbA4OFWEtQDsJ+U+OoT7X+L1FYIbZSmjDAeCWSd+84Nq1J/yGz/mmMfzNbbLBj2vY3D0rvMlzMeRwFg5vbvcFsSCcf+E1kG+gD/Do5qCzUGCRXrckQ0+tnipNKK7FZLFKzqaeRUFkd+km46aQ4R0aTL8hKoqWzkYF7zkZFqYMU2kktcKjGnsLIXtLa6wt1LH85ERIdABNrL1rdY0C58XPnMFgQUF9CRvJarFviKpLMcHR15rDhA2jIykLr1vFy+1MNddjwNAEgJuz0yQmpQDi8MrD6yPvHTqosi/DIZjZsnDtb9T97e1afLv6dm7O4lml2W6WtrZo5HFApbouDzg0PUZcbN8oQ74jPbkQau1TRURmCKVqmLurvTJu3ym24UGtU+m53shX3SpfCYfVNGzXzKIjHEDpVwsXUayNShF+dsPKjwfGS+c4CQBlie/bbg/UwdtSxM5AkpHrDOTiWMoCDOkTLFQl8FkaXBaa22IblROEP3lkZHTg9XGZ5ZhlWLrOTLasrEvc89GVHjjfAI9v717KAQvR38XQrnFTUm2ShxxCGLstGuGwOknezSUTFs79I2Go7MlqYDILPdDaQx8UsxuXQU0vf2ecFM4bWPSaNPTiCnHy+napATkTo5yVD+dhAfccXX1YxnI6XkYP2nLxRMqoG4TeFSWR0uDZQqSV6HZiGMOWVvj3HDmaF+0WrwLwldtsGrio7Z/476K2+OK2vnm1jlz8i/nWeAyuklNevlB/6iNwNQ4FphWC4llQdGG4epYKneafU8KTizyvk8hofMWmD2yyR6OUA5tg+TlKrpwydw7V4L5jKDlRQ0IKvOdMVUQ8c3XcdSaa3O/IHYZqV5nrdpYS7t/JWNWqklOpmX2uJDmNqfT0ubgDdW0x09iv/Cujt9X6JcvmZCb5Nso9rnL015QPrlggrR4VyZKpscck+ePiHttRlKPwgR5EO94+rMH2+xBdqZdF4Nrh+2zdKH4khufg8ohTQs823ZGYOOwGaZKHl2OSlHvZXRaFbfUT+9RUIOQ7gPHktnti9vxJOh+7LawepqYMMSR4S4CDlY7LcEP5+kgsrisLewVHh56WHlZmzmNnI4XTJlktFkDJZ23lTVGeHlK++svbtDHWVVf1VTlH8jmxe61srsCkWZVlf+q4Di7F4Zkh+q2ELyvTCDfEACSZ6suy0BG2nmkkHtYEWLD+qVPZlFpi01edY22z8IVOSLOh7bgpfq2aRnYdJ62k664kdlrs/V2XZFaWntvGAFNtm3MYJdHcrY8V1lFx9EfD0O+vMT436BFlWouh7LapvjcI5mh4UnSb3LPsxXHEKXScsxGFCgImpOXNgllBHS0DvUx6FgV2R0dlSwJxlant0oO1B5T9dImHTS5vyxjYeWUAcXWWqLkRyC5om0t7xd2nprPY9vsbs1GROApFJUfpGvfCFO0T0gxbTtAljPKIGup4dKWXA5vaxImOPY+wKSLQ5gKD0Z2sQg4OSAe/NYGEYkSE5YJxpBJLnTZiLOZvUwGuB20iIIGPbll8+FChlYjRZn0ZNDPFwqHRDquXJNrEHEIIWaH6CFB7/BNzPGsJzdwVvPsb+phxbOMWh84YCZ6/JspXfJ4UvY78CPqXKbiWzu4nePQ1tBh2HUbQpzIVgId6BtK3nvvUtCbwkoohzA21aeW7BD39lOtguc5EB7v0a0tX6h+2SXTxBNNlOs0Jn78VBxr05vMTv+BhrmfXymiakLrfryrZw+TQbT1dWpFiG/QLnjICgSeZ73dlTnj9SVao6Bb5znJhHEkqZkxktTBqnmSrVqp7tgCiyrz0mejYx3Ywot2dsdrUqpbw4fVkGAHy+wFfTYUa6ki39C/vFhuqjJpJoOkwCqOMkblZBprwbl9p1wp9N5PHFAhF+OE4+YcLW57sEWn7NcdyDV2WQUrd2v1hd07Yc3N0Vs2wqWX674m4X6V0GViUocbqJcK9SeWhjZXH6YKNU3Xhsm44RF557vk37K7wzjf1p7jiwN8BOhyJxq5vFJZY2rzwKPaNwbVUNRp00/Owm4tV2KzOQdGFddkbSomc5SBD5Br9eVbrswSxyjsRzzheCJ9ew5PmvbIAD415mFY/4SFv0lVZanSgGTOYN/ATy0V2J05vsP9JW0kkbe/V+YW94R9a6zlzs1b6z+lmJh8IeNAGlE8qE8QrsRSnbq0/lKz3/U7noxxAYcGhN5jkp8lihlNOziKKameVRzbL7ibFpdmaB+oNcacpDBJm1uIWzsRbJaTvycY5NC6nXoeTebOzXNc74QOI2naJ7ndLfq6FGqCD6acQoOdZ9Dn9eHnUFPD853NUY0mk0yvaTFlqUckB2aHyCfT9yCtXCV8J0ZcER322DePFTIIDB/ZZfW9SDJzIecWABAwOIb5rrgwhVWk2qswKIt5+VkjAFACRaGeTiDyy6EbkVqucAuzz1nqfii2q1Z7A4NGVpm+AwllHsq7BQBCYJlp4XYwZ7odBPPKewQAMMAimSGxrLoTCeYqR4befWV82LXv1ez3BUaBRLPOA6K+CgDCeeHP33/+O/Q83Omy8i4kmytUslccW3of+y4/A6hBR4Df1Xfjd07m3AIAJIY4s1aYcrDsVHsKQzO9USMAMCPoldb4I/d9o2YahSKZe3HGjl5s3lFJeFV6nZEMAIAUinsckJ+NXEmNhTfY+elNQIR5d7KHoSACbd3rAwpUyKNu6dT6HpOdpdcm+B1zEV1WXmf0FgAgFE3WnLAMFN2m1YnuPFKa1goRtFEnO90FwRr+qxEAYIfBaimNK4Q8puTK9z6AzNsbd1HK7gQ2MHNDri0AYMD2iQ03tk9LewmN52Vb/+wSAHA58K31QVrzPkQ6v/dsGSo7ENFQep0RtgAAmTxcYlo4CoyMtdteTOeEsX7WCACYuCidcYVgfi1YN/BgpdTpmeSyM4nyKgDIZrslM+7J/dNBrj1d49+n2HU27xgnGgK8RtkCAJlj81JsOLCdre0espqT7YxuBADE2IXGRXK9TdYtYXNH5ZfE4kfAjMk2MH+KLvjz/49zYeTK+fdXdeEUPL9s4rNgWcsOih99pzLDIETgKdRJKXxJs4qy2Anko/EjVEcqZhq1GEXB5dEQf9wcLP/8zfjpp/QdT9X4WdANUD3UWy5UTkvuUqDf5QhiCtIezljqwrATQdr57pDoJmJtRS1Yc8PqBeW1pbRESzs5LMvOqO8yjWB+Qz6nVopsResFlVAJ0DvMPj0aXRUkiGvzdhCVQXMY+kY/0zfeXk/WhdHIeuE+ZF+ZVB+vo1uPCG/4L2rPtRjn8hmN7rd2MLlzJOSRfmJF7ygXYQQ+RLgmVEybvT+M7J1faDqkn2CstanzeK1PTdL00h0Ya9BNMXc1tYoal8XIKNiF6nkNioId9IVJewuN04XgqkI85GGsJpBZbSlxLLSBa7TkctkkL7QQVdQAX4jGKcfjhaYHcb+xlLiQnrZ86FvDOLoPRuDUOugrGp06XL5+w21BZExlb47ETeM9VjhrYmwGsUm2S4LT8NLjpqlVff/+go0VYZX9tjOezIFnkq1xVwzjn90Em+SQGEx2cWZ95jA4E8QQlrvnm8mL1x2p5v89xiSawVfofc4VBXbYQZEQepbItcORHLWhClRstJ2Ybc8yI7dAhrYdsqNtzBApTMqDjMsMaORqROhd2uxA65/4+8k+nf4RNxoeMyv1z6GjRTAdBx1S2eNDtcbZTyrJBVfXfmjcVU0oBOXZuvbshqZIAgqM5sjoT0/kxmfrwiCNe5sVSnYI0kMJ+U77mNmL0WDznOLNFlP7zd8c44ztI44rcIQ8F6dQe0QaG0n9sa1M7g4Bmutl32/a/4p8v22CodCmJ4o22XXdIDbnO6GX1uFEEvD8tk2dsNkro7D369A28KX+NUo0sKhP4Hg3LAeJDdjWAS/Hlb9Hy5OxLHVluHZReVHvg8v1JRyPuzCtvINinnGhxRiN/WLhWNVcu01rbJc5vaYjDFup9Ew7Xsq3LtW5PeQfY2Amz20MN7CGdvxzAaP7Eyo5/Nj3tVjK1TnBYiAMleF+s8FH1GDZhK16x75KpxV9CaPjTbdU2Z6eFnbwvUCFi/7MllwTtayX9bJODfJFvexQIT2+RPlNGsEHpn+wDrzRoBWKDNL1POJxcC4DdH2PuLTjMVRQwot3PK0g0HzGApTsCCPLV1jUpXzPuZE1z7YjF8in99A6Fv8j2/T/EAjDjhuSMDMokjh1kFIbO9H/rnQfWWmSntv1erIuTveQ2qzlYz5JUNi35hcN5jzuTIEsqCe9sszMhLUfS6yJAWGO2R4PHrFRu1AE48O6444uojN8YnZNCMiSz0COgZvr+2DL8jQOvqOzQSALKSjLMrXpM+wxiHWcaN2SWkMtiRfJo/qiV01btFdpDDlbpUJZCyOs92/WJ8rKspBLI2HaxSy2iZ7eF0w46fOtIs/jUpLrvNjpHEYu+K7q62sqyzKyQhk7I1/C7SfabZGZmSSdrcUi9bNFWWW9/1HNiUOJVhNuASdsDsD8MdfKn3RBxUiDQFaZubPEDkylLonZq6sVX+c6WJlJZwk6uBJvEfWvJOsiuMLjilcyUIPdYwGBcAvOAJuoMmoJFE4Wtor1CiVBG/yImf1DTaKjX7ILdpxv8db+rCjan0ropMQXK1DMSucLwOQZ45B723aX57Yrs8TqNB7xu5hdq1XbvQSgxZS8mAiqUbvq5AzwcZKEFSVqPwYaqAEC2KLIA2wrZ731zazZjDOBRjR7IxLWCITqhiBqGQAQubIJ4sIjksTaW2T5iSYA0MJaSTkFxswSmMA+YLhOX01jEpDWaWov2K4AlSIP783KvT7TGdsCDWb2mhJWE3godxkASECqTJfYsRBrL//wyZKjCQBUX9gwKR8DC88U8EEvO7OPBT6T9WSAowqeKvJvfV/mjpsGNO4k6lIBMKhxV4F9Rb5u+z28fYxp3Aga0uy1SlitwMm8ZQCAg1BlCLYKC0qqHSaS5GgCADJhlUl5J1gxG6AbttzI8olsPwDvAFNv/PzKMyx5kGWiYAEzzRARKWr+R14ZADAhAsZcnYCbh9Ka58KAdDsAgZnumg8FcKVhh8LyP3DkxuB34odr95dAbQrSUtM/OEJYo/ANy8EEhJQ85btxQLwIoC9Ls/1FkhlQ6R/KqB4ytMOHnhg4BMkNQOnvECPi9TsMNb4Vkr5RvQPppUlIjyHwSBRZznuhFOi5ST6fQ/HO4EhzamChqv7efnszIzVsoCDqOlDruL3ICccDxtbl2srmv8MOgpLzwJrMLLLABRaBqyV0w4OQLfcCMXvKrWIVROUw4ns3u+K5pyWeXiQdrD6CF6Od1Zt759TpZ2JvmOTf+mXmc5rvB+FhtloCmZTWFtS2DOX6DsnYV28LoqP1jJ91pHSjt91M36VJ2DdkD6ujeLDIIzTkesLgaEKBYq/5dQcNd+Dydr54IJroOD78QTjysFBirIhQmwvoZjW9kO7QGKiVuth6W5MO1VGvqm0v/1r9R0YQPqzh160P8z5beGPXxeSekxEXGFY+6pzi/vmdVHC4j+d+a46s20ZT4Qn0n2eQBL+4kSun89HxpQD2uYPRgs8Pp0AIezgMCgKU7A/hu4uVNqaN6BGNj/T7lUy4hVcqitcC/WCBFl9o7T0q4mux4KZzG88JPe/E00AlPt6+lrW3HuFX64OHYN/JQANdATNNVRGCBbz+ZBkAoAiV9RphFU7Gtwlp2MleZpGxJuGyMgz+LhMAKKso3EDD2Dz8h5uGkeTQvzZi9hAVrVverjzRxZVcOLkdKbgSd9ZjyyYc0f+uPYVamDUTraKN/j4QP+3y52t4ctt1BUnVjg1SdqZha3K03QDMN7Z2G23gzjZKRh9lrR1wY88Gfz9jRz4hx+lLlY7dxZed8FGBhl0TVIeo2mSPz2Pbc7F/DxxplgIt4X/3EugX9aJvjLwfA5gT9I4RNufY1lB599NlsxHDuWHuvb74k64ypzEIbJ4y09nYukNqI2lnNIjr3ONsGOvdzWcmUwNwUBKbCGZYG4aBkz4dmhuss3BdNHsI4XorXrxtmXpCBgbkbCvjdCf//o2fcdnmM6Mv87bn3IC08GP9krSEFm7C7lgqPlkSZC8fv/8qqnt+9ehwcuBRr8vSIoT0KZGVxZES33YG4PL9yMV332VGuHam1+BYJKxjmUXwqtxlAKAKrCsd3MJkmWe63QnWmacJADTBVevdlwFcszFKAFBuGCFsnclhYJgV6zTJHDY8x1fiZWGxfdf7sPGXb+1NWHUaXxSVA5AxhEUPaX7k49xX51uCVz0Mb8/vmxCnztGMlHIAMo6w6wncEq/mWh/OrYc2zl4RdeHeCbgDDYeZ5qqzIoZTvtEyAJBqDEMVE84G0TEnjJ1ud4AxczQBAAdGqcq6n0FvdL5JAAAC","base64")).toString(),c=new Map([[n.structUtils.makeIdent(null,"fsevents").identHash,s],[n.structUtils.makeIdent(null,"resolve").identHash,A],[n.structUtils.makeIdent(null,"typescript").identHash,a]]),u={hooks:{registerPackageExtensions:async(e,t)=>{for(const[e,r]of o)t(n.structUtils.parseDescriptor(e,!0),r)},getBuiltinPatch:async(e,t)=>{if(!t.startsWith("compat/"))return;const r=n.structUtils.parseIdent(t.slice("compat/".length)),i=c.get(r.identHash);return void 0!==i?i:null},reduceDependency:async(e,t,r,i)=>void 0===c.get(e.identHash)?e:n.structUtils.makeDescriptor(e,n.structUtils.makeRange({protocol:"patch:",source:n.structUtils.stringifyDescriptor(e),selector:`builtin`,params:null}))}}},10420:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(36370),i=r(95397),o=r(84132),s=r(17278);class A extends i.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){const e=[];this.pkg&&e.push("--package",this.pkg),this.quiet&&e.push("--quiet");const t=o.structUtils.parseIdent(this.command),r=o.structUtils.makeIdent(t.scope,"create-"+t.name);return this.cli.run(["dlx",...e,o.structUtils.stringifyIdent(r),...this.args])}}(0,n.gn)([s.Command.String("-p,--package")],A.prototype,"pkg",void 0),(0,n.gn)([s.Command.Boolean("-q,--quiet")],A.prototype,"quiet",void 0),(0,n.gn)([s.Command.String()],A.prototype,"command",void 0),(0,n.gn)([s.Command.Proxy()],A.prototype,"args",void 0),(0,n.gn)([s.Command.Path("create")],A.prototype,"execute",null);var a=r(27122),c=r(40376),u=r(56537),l=r(46009);class h extends i.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){await u.xfs.mktempPromise(async e=>{const t=l.y1.join(e,"dlx-"+process.pid);await u.xfs.mkdirPromise(t),await u.xfs.writeFilePromise(l.y1.join(t,(0,l.Zu)("package.json")),"{}\n"),await u.xfs.writeFilePromise(l.y1.join(t,(0,l.Zu)("yarn.lock")),"");const r=l.y1.join(t,(0,l.Zu)(".yarnrc.yml")),n=await a.VK.findProjectCwd(this.context.cwd,l.QS.lockfile),s=null!==n?l.y1.join(n,(0,l.Zu)(".yarnrc.yml")):null;null!==s&&u.xfs.existsSync(s)?(await u.xfs.copyFilePromise(s,r),await a.VK.updateConfiguration(t,e=>void 0===e.plugins?{enableGlobalCache:!0}:{enableGlobalCache:!0,plugins:e.plugins.map(e=>{const t="string"==typeof e?e:e.path,r=l.cS.isAbsolute(t)?t:l.cS.resolve(l.cS.fromPortablePath(n),t);return"string"==typeof e?r:{path:r,spec:e.spec}})})):await u.xfs.writeFilePromise(r,"enableGlobalCache: true\n");const A=void 0!==this.pkg?[this.pkg]:[this.command],h=o.structUtils.parseDescriptor(this.command).name,g=await this.cli.run(["add","--",...A],{cwd:t,quiet:this.quiet});if(0!==g)return g;this.quiet||this.context.stdout.write("\n");const f=await a.VK.find(t,this.context.plugins),{project:p,workspace:d}=await c.I.find(f,t);if(null===d)throw new i.WorkspaceRequiredError(p.cwd,t);return await p.restoreInstallState(),await o.scriptUtils.executeWorkspaceAccessibleBinary(d,h,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}}h.usage=s.Command.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Also by default Yarn will print the full install logs when installing the given package. This behavior can be disabled by using the `-q,--quiet` flag which will instruct Yarn to only report critical errors.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"]]}),(0,n.gn)([s.Command.String("-p,--package")],h.prototype,"pkg",void 0),(0,n.gn)([s.Command.Boolean("-q,--quiet")],h.prototype,"quiet",void 0),(0,n.gn)([s.Command.String()],h.prototype,"command",void 0),(0,n.gn)([s.Command.Proxy()],h.prototype,"args",void 0),(0,n.gn)([s.Command.Path("dlx")],h.prototype,"execute",null);const g={commands:[A,h]}},72926:(e,t,r)=>{"use strict";r.r(t),r.d(t,{suggestUtils:()=>n,default:()=>Le});var n={};r.r(n),r.d(n,{Modifier:()=>o,Strategy:()=>s,Target:()=>i,applyModifier:()=>b,extractDescriptorFromPath:()=>k,extractRangeModifier:()=>D,fetchDescriptorFrom:()=>F,findProjectDescriptors:()=>S,getModifier:()=>Q,getSuggestedDescriptors:()=>x});var i,o,s,A=r(27122),a=r(36370),c=r(95397),u=r(28148),l=r(62152),h=r(92659),g=r(40376),f=r(15815),p=r(84132),d=r(17278),C=r(9494),E=r.n(C),I=r(33720),m=r(46611),y=r(46009),w=r(10966),B=r.n(w);function Q(e,t){return e.exact?o.EXACT:e.caret?o.CARET:e.tilde?o.TILDE:t.configuration.get("defaultSemverRangePrefix")}!function(e){e.REGULAR="dependencies",e.DEVELOPMENT="devDependencies",e.PEER="peerDependencies"}(i||(i={})),function(e){e.CARET="^",e.TILDE="~",e.EXACT=""}(o||(o={})),function(e){e.KEEP="keep",e.REUSE="reuse",e.PROJECT="project",e.LATEST="latest",e.CACHE="cache"}(s||(s={}));const v=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function D(e,{project:t}){const r=e.match(v);return r?r[1]:t.configuration.get("defaultSemverRangePrefix")}function b(e,t){let{protocol:r,source:n,params:i,selector:o}=p.structUtils.parseRange(e.range);return B().valid(o)&&(o=`${t}${e.range}`),p.structUtils.makeDescriptor(e,p.structUtils.makeRange({protocol:r,source:n,params:i,selector:o}))}async function S(e,{project:t,target:r}){const n=new Map,o=e=>{let t=n.get(e.descriptorHash);return t||n.set(e.descriptorHash,t={descriptor:e,locators:[]}),t};for(const n of t.workspaces)if(r===i.PEER){const t=n.manifest.peerDependencies.get(e.identHash);void 0!==t&&o(t).locators.push(n.locator)}else{const t=n.manifest.dependencies.get(e.identHash),s=n.manifest.devDependencies.get(e.identHash);r===i.DEVELOPMENT?void 0!==s?o(s).locators.push(n.locator):void 0!==t&&o(t).locators.push(n.locator):void 0!==t?o(t).locators.push(n.locator):void 0!==s&&o(s).locators.push(n.locator)}return n}async function k(e,{cache:t,cwd:r,workspace:n}){y.y1.isAbsolute(e)||(e=y.y1.resolve(r,e));const i=n.project,o=await F(p.structUtils.makeIdent(null,"archive"),e,{project:n.project,cache:t});if(!o)throw new Error("Assertion failed: The descriptor should have been found");const s=new I.$,A=i.configuration.makeResolver(),a=i.configuration.makeFetcher(),c={checksums:i.storedChecksums,project:i,cache:t,fetcher:a,report:s,resolver:A},u=A.bindDescriptor(o,n.anchoredLocator,c),l=p.structUtils.convertDescriptorToLocator(u),h=await a.fetch(l,c),g=await m.G.find(h.prefixPath,{baseFs:h.packageFs});if(!g.name)throw new Error("Target path doesn't have a name");return p.structUtils.makeDescriptor(g.name,e)}async function x(e,{project:t,workspace:r,cache:n,target:o,modifier:A,strategies:a,maxResults:c=1/0}){if(!(c>=0))throw new Error(`Invalid maxResults (${c})`);if("unknown"!==e.range)return[{descriptor:e,reason:"Unambiguous explicit request"}];const u=null!=r&&r.manifest[o].get(e.identHash)||null,l=[];for(const h of a){if(l.length>=c)break;switch(h){case s.KEEP:if(u){const e=`Keep ${p.structUtils.prettyDescriptor(t.configuration,u)} (no changes)`;l.push({descriptor:u,reason:e})}break;case s.REUSE:for(const{descriptor:n,locators:i}of(await S(e,{project:t,target:o})).values()){if(1===i.length&&i[0].locatorHash===r.anchoredLocator.locatorHash&&a.includes(s.KEEP))continue;let e=`Reuse ${p.structUtils.prettyDescriptor(t.configuration,n)} (originally used by ${p.structUtils.prettyLocator(t.configuration,i[0])}`;e+=i.length>1?` and ${i.length-1} other${i.length>2?"s":""})`:")",l.push({descriptor:n,reason:e})}break;case s.CACHE:for(const r of t.storedDescriptors.values())if(r.identHash===e.identHash){const e=`Reuse ${p.structUtils.prettyDescriptor(t.configuration,r)} (already used somewhere in the lockfile)`;l.push({descriptor:r,reason:e})}break;case s.PROJECT:{if(null!==r.manifest.name&&e.identHash===r.manifest.name.identHash)continue;const n=t.tryWorkspaceByIdent(e);if(null===n)continue;const i=`Attach ${p.structUtils.prettyWorkspace(t.configuration,n)} (local workspace at ${n.cwd})`;l.push({descriptor:n.anchoredDescriptor,reason:i})}break;case s.LATEST:if("unknown"!==e.range){const r=`Use ${p.structUtils.prettyRange(t.configuration,e.range)} (explicit range requested)`;l.push({descriptor:e,reason:r})}else if(o===i.PEER){const t="Use * (catch-all peer dependency pattern)";l.push({descriptor:p.structUtils.makeDescriptor(e,"*"),reason:t})}else if(t.configuration.get("enableNetwork")){let r;try{r=await F(e,"latest",{project:t,cache:n,preserveModifier:!1})}catch(e){}if(r){r=b(r,A);const e=`Use ${p.structUtils.prettyDescriptor(t.configuration,r)} (resolved from latest)`;l.push({descriptor:r,reason:e})}}else{const e="Resolve from latest "+t.configuration.format("(unavailable because enableNetwork is toggled off)","grey");l.push({descriptor:null,reason:e})}}}return l.slice(0,c)}async function F(e,t,{project:r,cache:n,preserveModifier:i=!0}){const o=p.structUtils.makeDescriptor(e,t),s=new I.$,A=r.configuration.makeFetcher(),a=r.configuration.makeResolver(),c={checksums:r.storedChecksums,project:r,cache:n,fetcher:A,report:s,resolver:a};let u;try{u=await a.getCandidates(o,new Map,c)}catch(e){return null}if(0===u.length)return null;const l=u[0];let{protocol:h,source:g,params:f,selector:d}=p.structUtils.parseRange(p.structUtils.convertToManifestRange(l.reference));if(h===r.configuration.get("defaultProtocol")&&(h=null),B().valid(d)&&!1!==i){d=D("string"==typeof i?i:o.range,{project:r})+d}return p.structUtils.makeDescriptor(l,p.structUtils.makeRange({protocol:h,source:g,params:f,selector:d}))}class M extends c.BaseCommand{constructor(){super(...arguments),this.packages=[],this.json=!1,this.exact=!1,this.tilde=!1,this.caret=!1,this.dev=!1,this.peer=!1,this.optional=!1,this.preferDev=!1,this.interactive=!1,this.cached=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const o=E().createPromptModule({input:this.context.stdin,output:this.context.stdout}),a=Q(this,t),C=[...this.interactive?[s.REUSE]:[],s.PROJECT,...this.cached?[s.CACHE]:[],s.LATEST],I=this.interactive?1/0:1,m=await Promise.all(this.packages.map(async e=>{const o=e.match(/^\.{0,2}\//)?await k(e,{cache:n,cwd:this.context.cwd,workspace:r}):p.structUtils.parseDescriptor(e),s=function(e,t,{dev:r,peer:n,preferDev:o,optional:s}){const A=e.manifest[i.REGULAR].has(t.identHash),a=e.manifest[i.DEVELOPMENT].has(t.identHash),c=e.manifest[i.PEER].has(t.identHash);if((r||n)&&A)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!n&&c)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(s&&a)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(s&&!n&&c)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||o)&&s)throw new d.UsageError(`Package "${p.structUtils.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);return n?i.PEER:r||o?i.DEVELOPMENT:A?i.REGULAR:a?i.DEVELOPMENT:i.REGULAR}(r,o,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return[o,await x(o,{project:t,workspace:r,cache:n,target:s,modifier:a,strategies:C,maxResults:I}),s]})),y=await l.h.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async r=>{for(const[n,i]of m){0===i.filter(e=>null!==e.descriptor).length&&(t.configuration.get("enableNetwork")?r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" can't be resolved to a satisfying range"):r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" can't be resolved to a satisfying range (note: network resolution has been disabled)"))}});if(y.hasErrors())return y.exitCode();let w=!1;const B=[],v=[];for(const[,e,n]of m){let i;const s=e.filter(e=>null!==e.descriptor),A=s[0].descriptor,a=s.every(e=>p.structUtils.areDescriptorsEqual(e.descriptor,A));1===s.length||a?i=A:(w=!0,({answer:i}=await o({type:"list",name:"answer",message:"Which range do you want to use?",choices:e.map(({descriptor:e,reason:r})=>e?{name:r,value:e,short:p.structUtils.prettyDescriptor(t.configuration,e)}:{name:r,disabled:()=>!0})})));const c=r.manifest[n].get(i.identHash);void 0!==c&&c.descriptorHash===i.descriptorHash||(r.manifest[n].set(i.identHash,i),this.optional&&("dependencies"===n?r.manifest.ensureDependencyMeta({...i,range:"unknown"}).optional=!0:"peerDependencies"===n&&(r.manifest.ensurePeerDependencyMeta({...i,range:"unknown"}).optional=!0)),void 0===c?B.push([r,n,i,C]):v.push([r,n,c,i]))}await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyAddition,B),await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,v),w&&this.context.stdout.write("\n");return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await t.install({cache:n,report:e})})).exitCode()}}M.usage=d.Command.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `savePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a tag range (such as `latest` or `rc`), Yarn will resolve this tag to a semver version and use that in the resulting package.json entry (meaning that `yarn add foo@latest` will have exactly the same effect as `yarn add foo`).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: .\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]}),(0,a.gn)([d.Command.Rest()],M.prototype,"packages",void 0),(0,a.gn)([d.Command.Boolean("--json")],M.prototype,"json",void 0),(0,a.gn)([d.Command.Boolean("-E,--exact")],M.prototype,"exact",void 0),(0,a.gn)([d.Command.Boolean("-T,--tilde")],M.prototype,"tilde",void 0),(0,a.gn)([d.Command.Boolean("-C,--caret")],M.prototype,"caret",void 0),(0,a.gn)([d.Command.Boolean("-D,--dev")],M.prototype,"dev",void 0),(0,a.gn)([d.Command.Boolean("-P,--peer")],M.prototype,"peer",void 0),(0,a.gn)([d.Command.Boolean("-O,--optional")],M.prototype,"optional",void 0),(0,a.gn)([d.Command.Boolean("--prefer-dev")],M.prototype,"preferDev",void 0),(0,a.gn)([d.Command.Boolean("-i,--interactive")],M.prototype,"interactive",void 0),(0,a.gn)([d.Command.Boolean("--cached")],M.prototype,"cached",void 0),(0,a.gn)([d.Command.Path("add")],M.prototype,"execute",null);class N extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,locator:r}=await g.I.find(e,this.context.cwd);if(await t.restoreInstallState(),this.name){const n=(await p.scriptUtils.getPackageAccessibleBinaries(r,{project:t})).get(this.name);if(!n)throw new d.UsageError(`Couldn't find a binary named "${this.name}" for package "${p.structUtils.prettyLocator(e,r)}"`);const[,i]=n;return this.context.stdout.write(i+"\n"),0}return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async n=>{const i=await p.scriptUtils.getPackageAccessibleBinaries(r,{project:t}),o=Array.from(i.keys()).reduce((e,t)=>Math.max(e,t.length),0);for(const[e,[t,r]]of i)n.reportJson({name:e,source:p.structUtils.stringifyIdent(t),path:r});if(this.verbose)for(const[t,[r]]of i)n.reportInfo(null,`${t.padEnd(o," ")} ${p.structUtils.prettyLocator(e,r)}`);else for(const e of i.keys())n.reportInfo(null,e)})).exitCode()}}N.usage=d.Command.Usage({description:"get the path to a binary script",details:"\n When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the `-v,--verbose` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.\n\n When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n ",examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]}),(0,a.gn)([d.Command.String({required:!1})],N.prototype,"name",void 0),(0,a.gn)([d.Command.Boolean("-v,--verbose")],N.prototype,"verbose",void 0),(0,a.gn)([d.Command.Boolean("--json")],N.prototype,"json",void 0),(0,a.gn)([d.Command.Path("bin")],N.prototype,"execute",null);var R=r(56537);class L extends c.BaseCommand{constructor(){super(...arguments),this.mirror=!1,this.all=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),t=await u.C.find(e);return(await f.P.start({configuration:e,stdout:this.context.stdout},async()=>{const e=(this.all||this.mirror)&&null!==t.mirrorCwd,r=!this.mirror;e&&await R.xfs.removePromise(t.mirrorCwd),r&&await R.xfs.removePromise(t.cwd)})).exitCode()}}L.usage=d.Command.Usage({description:"remove the shared cache files",details:"\n This command will remove all the files from the cache.\n\n By default only the local cache will be cleaned. This behavior can be disabled with the `--mirror`, which will lead to the removal of the global cache files instead, or `--all` (which will remove both the local and global caches for the current project).\n ",examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]}),(0,a.gn)([d.Command.Boolean("--mirror")],L.prototype,"mirror",void 0),(0,a.gn)([d.Command.Boolean("--all")],L.prototype,"all",void 0),(0,a.gn)([d.Command.Path("cache","clean")],L.prototype,"execute",null);var K=r(44674),T=r.n(K),_=r(31669);class P extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.unsafe=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*/,"");if(void 0===e.settings.get(t))throw new d.UsageError(`Couldn't find a configuration settings named "${t}"`);const n=O(e.getSpecial(t,{hideSecrets:!this.unsafe,getNativePaths:!0})),i=r?T()(n,r):n,o=await f.P.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(i)});if(!this.json){if("string"==typeof i)return this.context.stdout.write(i+"\n"),o.exitCode();_.inspect.styles.name="cyan",this.context.stdout.write((0,_.inspect)(i,{depth:1/0,colors:!0,compact:!1})+"\n")}return o.exitCode()}}function O(e){if(e instanceof Map&&(e=Object.fromEntries(e)),"object"==typeof e&&null!==e)for(const t of Object.keys(e)){const r=e[t];"object"==typeof r&&null!==r&&(e[t]=O(r))}return e}P.usage=d.Command.Usage({description:"read a configuration settings",details:"\n This command will print a configuration setting.\n\n Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the `--no-redacted` to get the untransformed value.\n ",examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration","yarn config get 'npmScopes[\"my-company\"].npmRegistryServer'"],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]}),(0,a.gn)([d.Command.String()],P.prototype,"name",void 0),(0,a.gn)([d.Command.Boolean("--json")],P.prototype,"json",void 0),(0,a.gn)([d.Command.Boolean("--no-redacted")],P.prototype,"unsafe",void 0),(0,a.gn)([d.Command.Path("config","get")],P.prototype,"execute",null);var U=r(82558),j=r.n(U),Y=r(81534),G=r.n(Y);class J extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);if(!e.projectCwd)throw new d.UsageError("This command must be run from within a project folder");const t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*/,"");if(void 0===e.settings.get(t))throw new d.UsageError(`Couldn't find a configuration settings named "${t}"`);const n=this.json?JSON.parse(this.value):this.value;await A.VK.updateConfiguration(e.projectCwd,e=>{if(r){const t=j()(e);return G()(t,this.name,n),t}return{...e,[t]:n}});const i=O((await A.VK.find(this.context.cwd,this.context.plugins)).getSpecial(t,{hideSecrets:!0,getNativePaths:!0})),o=r?T()(i,r):i;return(await f.P.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async e=>{_.inspect.styles.name="cyan",e.reportInfo(h.b.UNNAMED,`Successfully set ${this.name} to ${(0,_.inspect)(o,{depth:1/0,colors:!0,compact:!1})}`)})).exitCode()}}J.usage=d.Command.Usage({description:"change a configuration settings",details:"\n This command will set a configuration setting.\n\n When used without the `--json` flag, it can only set a simple configuration setting (a string, a number, or a boolean).\n\n When used with the `--json` flag, it can set both simple and complex configuration settings, including Arrays and Objects.\n ",examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",'yarn config set unsafeHttpWhitelist --json \'["*.example.com", "example.com"]\''],["Set a complex configuration setting (an Object) using the `--json` flag",'yarn config set packageExtensions --json \'{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }\'']]}),(0,a.gn)([d.Command.String()],J.prototype,"name",void 0),(0,a.gn)([d.Command.String()],J.prototype,"value",void 0),(0,a.gn)([d.Command.Boolean("--json")],J.prototype,"json",void 0),(0,a.gn)([d.Command.Path("config","set")],J.prototype,"execute",null);class H extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.why=!1,this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins,{strict:!1});return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{if(e.invalid.size>0&&!this.json){for(const[r,n]of e.invalid)t.reportError(h.b.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${r}" in ${n}`);t.reportSeparator()}if(this.json){const r=p.miscUtils.sortMap(e.settings.keys(),e=>e);for(const n of r){const r=e.settings.get(n),i=e.getSpecial(n,{hideSecrets:!0,getNativePaths:!0}),o=e.sources.get(n);this.verbose?t.reportJson({key:n,effective:i,source:o}):t.reportJson({key:n,effective:i,source:o,...r})}}else{const r=p.miscUtils.sortMap(e.settings.keys(),e=>e),n=r.reduce((e,t)=>Math.max(e,t.length),0),i={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){const o=r.map(t=>{const r=e.settings.get(t);if(!r)throw new Error(`Assertion failed: This settings ("${t}") should have been registered`);return[t,this.why?e.sources.get(t)||"":r.description]}),s=o.reduce((e,[,t])=>Math.max(e,t.length),0);for(const[r,A]of o)t.reportInfo(null,`${r.padEnd(n," ")} ${A.padEnd(s," ")} ${(0,_.inspect)(e.getSpecial(r,{hideSecrets:!0,getNativePaths:!0}),i)}`)}else for(const o of r)t.reportInfo(null,`${o.padEnd(n," ")} ${(0,_.inspect)(e.getSpecial(o,{hideSecrets:!0,getNativePaths:!0}),i)}`)}})).exitCode()}}H.usage=d.Command.Usage({description:"display the current configuration",details:"\n This command prints the current active configuration settings.\n\n When used together with the `-v,--verbose` option, the output will contain the settings description on top of the regular key/value information.\n\n When used together with the `--why` flag, the output will also contain the reason why a settings is set a particular way.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n Note that the paths settings will be normalized - especially on Windows. It means that paths such as `C:\\project` will be transparently shown as `/mnt/c/project`.\n ",examples:[["Print the active configuration settings","$0 config"]]}),(0,a.gn)([d.Command.Boolean("-v,--verbose")],H.prototype,"verbose",void 0),(0,a.gn)([d.Command.Boolean("--why")],H.prototype,"why",void 0),(0,a.gn)([d.Command.Boolean("--json")],H.prototype,"json",void 0),(0,a.gn)([d.Command.Path("config")],H.prototype,"execute",null);class z extends d.Command{async execute(){const{plugins:e}=await A.VK.find(this.context.cwd,this.context.plugins),t=[];for(const r of e){const{commands:e}=r[1];if(e){const n=d.Cli.from(e).definitions();t.push([r[0],n])}}const n=this.cli.definitions(),i=r(60306)["@yarnpkg/builder"].bundles.standard;for(const e of t){const t=e[1];for(const r of t)n.find(e=>{return t=e.path,n=r.path,t.split(" ").slice(1).join()===n.split(" ").slice(1).join();var t,n}).plugin={name:e[0],isDefault:i.includes(e[0])}}this.context.stdout.write(JSON.stringify({commands:n},null,2)+"\n")}}(0,a.gn)([d.Command.Path("--clipanion=definitions")],z.prototype,"execute",null);class q extends d.Command{async execute(){this.context.stdout.write(this.cli.usage(null))}}(0,a.gn)([d.Command.Path("help"),d.Command.Path("--help"),d.Command.Path("-h")],q.prototype,"execute",null);class W extends d.Command{constructor(){super(...arguments),this.args=[]}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!p.structUtils.tryParseIdent(this.leadingArgument)){const e=y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}return await this.cli.run(["run",this.leadingArgument,...this.args])}}(0,a.gn)([d.Command.String()],W.prototype,"leadingArgument",void 0),(0,a.gn)([d.Command.Proxy()],W.prototype,"args",void 0);var V=r(59355);class X extends d.Command{async execute(){this.context.stdout.write((V.o||"")+"\n")}}(0,a.gn)([d.Command.Path("-v"),d.Command.Path("--version")],X.prototype,"execute",null);class Z extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t}=await g.I.find(e,this.context.cwd);return await R.xfs.mktempPromise(async e=>{const{code:r}=await p.execUtils.pipevp(this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await p.scriptUtils.makeScriptEnv({project:t,binFolder:e})});return r})}}Z.usage=d.Command.Usage({description:"execute a shell command",details:"\n This command simply executes a shell binary within the context of the root directory of the active workspace.\n\n It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n ",examples:[["Execute a shell command","$0 exec echo Hello World"]]}),(0,a.gn)([d.Command.String()],Z.prototype,"commandName",void 0),(0,a.gn)([d.Command.Proxy()],Z.prototype,"args",void 0),(0,a.gn)([d.Command.Path("exec")],Z.prototype,"execute",null);var $=r(35691),ee=r(55125);class te extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.checkCache=!1,this.silent=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);void 0!==this.inlineBuilds&&e.useWithSource("",{enableInlineBuilds:this.inlineBuilds},e.startingCwd,{overwrite:!0});const t=!!process.env.NOW_BUILDER,r=!!process.env.NETLIFY,n=async(t,{error:r})=>{const n=await f.P.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async e=>{r?e.reportError(h.b.DEPRECATED_CLI_SETTINGS,t):e.reportWarning(h.b.DEPRECATED_CLI_SETTINGS,t)});return n.hasErrors()?n.exitCode():null};if(void 0!==this.ignoreEngines){const e=await n("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!t});if(null!==e)return e}if(void 0!==this.registry){const e=await n("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(null!==e)return e}if(void 0!==this.preferOffline){const e=await n("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!t});if(null!==e)return e}if(void 0!==this.frozenLockfile){const e=await n("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!0});if(null!==e)return e}if(void 0!==this.cacheFolder){const e=await n("The cache-folder option has been deprecated; use rc settings instead",{error:!r});if(null!==e)return e}const i=void 0===this.immutable&&void 0===this.frozenLockfile?e.get("enableImmutableInstalls"):this.immutable||this.frozenLockfile;if(null!==e.projectCwd){const t=await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout,includeFooter:!1},async t=>{await async function(e,t){if(!e.projectCwd)return!1;const r=y.y1.join(e.projectCwd,e.get("lockfileFilename"));if(!await R.xfs.existsPromise(r))return!1;const n=await R.xfs.readFilePromise(r,"utf8");if(!n.includes("<<<<<<<"))return!1;if(t)throw new $.lk(h.b.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");const[i,o]=function(e){const t=[[],[]],r=e.split(/\r?\n/g);let n=!1;for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith("<<<<<<<")){for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if("======="===e){n=!1;break}n||e.startsWith("|||||||")?n=!0:t[0].push(e)}for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith(">>>>>>>"))break;t[1].push(e)}}else t[0].push(e),t[1].push(e)}return[t[0].join("\n"),t[1].join("\n")]}(n);let s,A;try{s=(0,ee.parseSyml)(i),A=(0,ee.parseSyml)(o)}catch(e){throw new $.lk(h.b.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}const a={...s,...A};for(const[e,t]of Object.entries(a))"string"==typeof t&&delete a[e];return await R.xfs.changeFilePromise(r,(0,ee.stringifySyml)(a),{automaticNewlines:!0}),!0}(e,i)&&t.reportInfo(h.b.AUTOMERGE_SUCCESS,"Automatically fixed merge conflicts 👍")});if(t.hasErrors())return t.exitCode()}const{project:o,workspace:s}=await g.I.find(e,this.context.cwd),a=await u.C.find(e,{immutable:this.immutableCache,check:this.checkCache});if(!s)throw new c.WorkspaceRequiredError(o.cwd,this.context.cwd);return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!0},async e=>{await o.install({cache:a,report:e,immutable:i})})).exitCode()}}te.usage=d.Command.Usage({description:"install the project dependencies",details:"\n This command setup your project if needed. The installation is splitted in four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where are stored the cache files).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked from writing them on the disk in some form (for example by generating the .pnp.js file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.js file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set, Yarn will abort with an error exit code if anything in the install artifacts (`yarn.lock`, `.pnp.js`, ...) was to be modified. For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\n\n If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\n\n If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n ",examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]}),(0,a.gn)([d.Command.Boolean("--json")],te.prototype,"json",void 0),(0,a.gn)([d.Command.Boolean("--immutable")],te.prototype,"immutable",void 0),(0,a.gn)([d.Command.Boolean("--immutable-cache")],te.prototype,"immutableCache",void 0),(0,a.gn)([d.Command.Boolean("--check-cache")],te.prototype,"checkCache",void 0),(0,a.gn)([d.Command.Boolean("--frozen-lockfile",{hidden:!0})],te.prototype,"frozenLockfile",void 0),(0,a.gn)([d.Command.Boolean("--prefer-offline",{hidden:!0})],te.prototype,"preferOffline",void 0),(0,a.gn)([d.Command.Boolean("--ignore-engines",{hidden:!0})],te.prototype,"ignoreEngines",void 0),(0,a.gn)([d.Command.String("--registry",{hidden:!0})],te.prototype,"registry",void 0),(0,a.gn)([d.Command.Boolean("--inline-builds")],te.prototype,"inlineBuilds",void 0),(0,a.gn)([d.Command.String("--cache-folder")],te.prototype,"cacheFolder",void 0),(0,a.gn)([d.Command.Boolean("--silent",{hidden:!0})],te.prototype,"silent",void 0),(0,a.gn)([d.Command.Path(),d.Command.Path("install")],te.prototype,"execute",null);class re extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.private=!1,this.relative=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const i=y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.destination)),o=await A.VK.find(i,this.context.plugins),{project:s,workspace:a}=await g.I.find(o,i);if(!a)throw new c.WorkspaceRequiredError(s.cwd,i);const l=t.topLevelWorkspace,h=[];if(this.all){for(const e of s.workspaces)!e.manifest.name||e.manifest.private&&!this.private||h.push(e);if(0===h.length)throw new d.UsageError("No workspace found to be linked in the target project")}else{if(!a.manifest.name)throw new d.UsageError("The target workspace doesn't have a name and thus cannot be linked");if(a.manifest.private&&!this.private)throw new d.UsageError("The target workspace is marked private - use the --private flag to link it anyway");h.push(a)}for(const e of h){const r=p.structUtils.stringifyIdent(e.locator),n=this.relative?y.y1.relative(t.cwd,e.cwd):e.cwd;l.manifest.resolutions.push({pattern:{descriptor:{fullName:r}},reference:"portal:"+n})}return(await f.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:n,report:e})})).exitCode()}}re.usage=d.Command.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n\n If the `--all` option is set, all workspaces belonging to the target project will be linked to the current one.\n\n There is no `yarn unlink` command. To unlink the workspaces from the current project one must revert the changes made to the `resolutions` field.\n ",examples:[["Register a remote workspace for use in the current project","$0 link ~/ts-loader"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]}),(0,a.gn)([d.Command.String()],re.prototype,"destination",void 0),(0,a.gn)([d.Command.Boolean("--all")],re.prototype,"all",void 0),(0,a.gn)([d.Command.Boolean("-p,--private")],re.prototype,"private",void 0),(0,a.gn)([d.Command.Boolean("-r,--relative")],re.prototype,"relative",void 0),(0,a.gn)([d.Command.Path("link")],re.prototype,"execute",null);class ne extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){return this.cli.run(["exec","node",...this.args])}}ne.usage=d.Command.Usage({description:"run node with the hook already setup",details:"\n This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n\n The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.\n ",examples:[["Run a Node script","$0 node ./my-script.js"]]}),(0,a.gn)([d.Command.Proxy()],ne.prototype,"args",void 0),(0,a.gn)([d.Command.Path("node")],ne.prototype,"execute",null);var ie=r(12087),oe=r(85622),se=r.n(oe);class Ae extends c.BaseCommand{constructor(){super(...arguments),this.onlyIfNeeded=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let t;if("latest"===this.version||"berry"===this.version)t="https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js";else if("classic"===this.version)t="https://nightly.yarnpkg.com/latest.js";else if(p.semverUtils.satisfiesWithPrereleases(this.version,">=2.0.0"))t=`https://github.com/yarnpkg/berry/raw/%40yarnpkg/cli/${this.version}/packages/yarnpkg-cli/bin/yarn.js`;else{if(!p.semverUtils.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))throw B().validRange(this.version)?new d.UsageError("Support for ranges got removed - please use the exact version you want to install, or 'latest' to get the latest build available"):new d.UsageError(`Invalid version descriptor "${this.version}"`);t=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`}return(await f.P.start({configuration:e,stdout:this.context.stdout},async r=>{r.reportInfo(h.b.UNNAMED,"Downloading "+e.format(t,"green"));const n=await p.httpUtils.get(t,{configuration:e});await ae(e,null,n,{report:r})})).exitCode()}}async function ae(e,t,r,{report:n}){const i=e.projectCwd?e.projectCwd:e.startingCwd;null===t&&await R.xfs.mktempPromise(async e=>{const n=y.y1.join(e,"yarn.cjs");await R.xfs.writeFilePromise(n,r);const{stdout:o}=await p.execUtils.execvp(process.execPath,[y.cS.fromPortablePath(n),"--version"],{cwd:i,env:{...process.env,YARN_IGNORE_PATH:"1"}});if(t=o.trim(),!B().valid(t))throw new Error("Invalid semver version")});const o=y.y1.resolve(i,".yarn/releases"),s=y.y1.resolve(o,`yarn-${t}.cjs`),a=y.y1.relative(e.startingCwd,s),c=y.y1.relative(i,s),u=e.get("yarnPath"),l=null===u||u.startsWith(o+"/");n.reportInfo(h.b.UNNAMED,"Saving the new release in "+e.format(a,"magenta")),await R.xfs.removePromise(y.y1.dirname(s)),await R.xfs.mkdirpPromise(y.y1.dirname(s)),await R.xfs.writeFilePromise(s,r),await R.xfs.chmodPromise(s,493),l&&await A.VK.updateConfiguration(i,{yarnPath:c})}Ae.usage=d.Command.Usage({description:"lock the Yarn version used by the project",details:"\n This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will change the `yarnPath` settings from your project `.yarnrc.yml` file to point to the new file.\n\n A very good use case for this command is to enforce the version of Yarn used by the any single member of your team inside a same project - by doing this you ensure that you have control on Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting a different behavior than you.\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"]]}),(0,a.gn)([d.Command.Boolean("--only-if-needed")],Ae.prototype,"onlyIfNeeded",void 0),(0,a.gn)([d.Command.String()],Ae.prototype,"version",void 0),(0,a.gn)([d.Command.Path("policies","set-version"),d.Command.Path("set","version")],Ae.prototype,"execute",null);const ce=/^[0-9]+$/;function ue(e){return ce.test(e)?`pull/${e}/head`:e}class le extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.plugins=[],this.noMinify=!1,this.force=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.installPath)):y.y1.resolve(y.cS.toPortablePath((0,ie.tmpdir)()),"yarnpkg-sources",p.hashUtils.makeHash(this.repository).slice(0,6));return(await f.P.start({configuration:e,stdout:this.context.stdout},async r=>{await ge(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(h.b.UNNAMED,"Building a fresh bundle"),r.reportSeparator(),await he((({plugins:e,noMinify:t},r)=>[["yarn","build:cli",...(new Array).concat(...e.map(e=>["--plugin",se().resolve(r,e)])),...t?["--no-minify"]:[],"|"]])(this,t),{configuration:e,context:this.context,target:t}),r.reportSeparator();const n=y.y1.resolve(t,"packages/yarnpkg-cli/bundles/yarn.js"),i=await R.xfs.readFilePromise(n);await ae(e,"sources",i,{report:r})})).exitCode()}}async function he(e,{configuration:t,context:r,target:n}){for(const[i,...o]of e){const e="|"===o[o.length-1];if(e&&o.pop(),e)await p.execUtils.pipevp(i,o,{cwd:n,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(t.format(" $ "+[i,...o].join(" "),"grey")+"\n");try{await p.execUtils.execvp(i,o,{cwd:n,strict:!0})}catch(e){throw r.stdout.write(e.stdout||e.stack),e}}}}async function ge(e,{configuration:t,report:r,target:n}){let i=!1;if(!e.force&&R.xfs.existsSync(y.y1.join(n,".git"))){r.reportInfo(h.b.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await he((({branch:e})=>[["git","fetch","origin",ue(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]])(e),{configuration:t,context:e.context,target:n}),i=!0}catch(e){r.reportSeparator(),r.reportWarning(h.b.UNNAMED,"Repository update failed; we'll try to regenerate it")}}i||(r.reportInfo(h.b.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await R.xfs.removePromise(n),await R.xfs.mkdirpPromise(n),await he((({repository:e,branch:t},r)=>[["git","init",y.cS.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin",ue(t)],["git","reset","--hard","FETCH_HEAD"]])(e,n),{configuration:t,context:e.context,target:n}))}le.usage=d.Command.Usage({description:"build Yarn from master",details:"\n This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.\n ",examples:[["Build Yarn from master","$0 set version from sources"]]}),(0,a.gn)([d.Command.String("--path")],le.prototype,"installPath",void 0),(0,a.gn)([d.Command.String("--repository")],le.prototype,"repository",void 0),(0,a.gn)([d.Command.String("--branch")],le.prototype,"branch",void 0),(0,a.gn)([d.Command.Array("--plugin")],le.prototype,"plugins",void 0),(0,a.gn)([d.Command.Boolean("--no-minify")],le.prototype,"noMinify",void 0),(0,a.gn)([d.Command.Boolean("-f,--force")],le.prototype,"force",void 0),(0,a.gn)([d.Command.Path("set","version","from","sources")],le.prototype,"execute",null);var fe=r(92184);async function pe(e){const t=await p.httpUtils.get("https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml",{configuration:e});return(0,ee.parseSyml)(t.toString())}class de extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{const r=await pe(e);for(const[e,{experimental:n,...i}]of Object.entries(r)){let r=e;n&&(r+=" [experimental]"),t.reportJson({name:e,experimental:n,...i}),t.reportInfo(null,r)}})).exitCode()}}de.usage=d.Command.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]}),(0,a.gn)([d.Command.Boolean("--json")],de.prototype,"json",void 0),(0,a.gn)([d.Command.Path("plugin","list")],de.prototype,"execute",null);class Ce extends c.BaseCommand{async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);return(await f.P.start({configuration:e,stdout:this.context.stdout},async t=>{const{project:r}=await g.I.find(e,this.context.cwd);let n,i;if(this.name.match(/^\.{0,2}[\\/]/)||y.cS.isAbsolute(this.name)){const o=y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.name));t.reportInfo(h.b.UNNAMED,"Reading "+e.format(o,"green")),n=y.y1.relative(r.cwd,o),i=await R.xfs.readFilePromise(o)}else{let r;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch(e){throw new $.lk(h.b.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}n=this.name,r=this.name}else{const t=p.structUtils.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),i=p.structUtils.stringifyIdent(t),o=await pe(e);if(!Object.prototype.hasOwnProperty.call(o,i))throw new $.lk(h.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${i}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be referenced by their name; any other plugin will have to be referenced through its public url (for example https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js).`);n=i,r=o[i].url}t.reportInfo(h.b.UNNAMED,"Downloading "+e.format(r,"green")),i=await p.httpUtils.get(r,{configuration:e})}await Ee(n,i,{project:r,report:t})})).exitCode()}}async function Ee(e,t,{project:r,report:n}){const{configuration:i}=r,o={},s={exports:o};(0,fe.runInNewContext)(t.toString(),{module:s,exports:o});const a=s.exports.name,c=`.yarn/plugins/${a}.cjs`,u=y.y1.resolve(r.cwd,c);n.reportInfo(h.b.UNNAMED,"Saving the new plugin in "+i.format(c,"magenta")),await R.xfs.mkdirpPromise(y.y1.dirname(u)),await R.xfs.writeFilePromise(u,t);const l={path:c,spec:e};await A.VK.updateConfiguration(r.cwd,e=>{const t=[];let n=!1;for(const i of e.plugins||[]){const e="string"!=typeof i?i.path:i,o=y.y1.resolve(r.cwd,y.cS.toPortablePath(e)),{name:s}=p.miscUtils.dynamicRequire(y.cS.fromPortablePath(o));s!==a?t.push(i):(t.push(l),n=!0)}return n||t.push(l),{plugins:t}})}Ce.usage=d.Command.Usage({category:"Plugin-related commands",description:"download a plugin",details:"\n This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.\n\n Three types of plugin references are accepted:\n\n - If the plugin is stored within the Yarn repository, it can be referenced by name.\n - Third-party plugins can be referenced directly through their public urls.\n - Local plugins can be referenced by their path on the disk.\n\n Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the `@yarnpkg/builder` package).\n ",examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]}),(0,a.gn)([d.Command.String()],Ce.prototype,"name",void 0),(0,a.gn)([d.Command.Path("plugin","import")],Ce.prototype,"execute",null);class Ie extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.noMinify=!1,this.force=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?y.y1.resolve(this.context.cwd,y.cS.toPortablePath(this.installPath)):y.y1.resolve(y.cS.toPortablePath((0,ie.tmpdir)()),"yarnpkg-sources",p.hashUtils.makeHash(this.repository).slice(0,6));return(await f.P.start({configuration:e,stdout:this.context.stdout},async r=>{const{project:n}=await g.I.find(e,this.context.cwd),i=p.structUtils.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),o=p.structUtils.stringifyIdent(i),s=await pe(e);if(!Object.prototype.hasOwnProperty.call(s,o))throw new $.lk(h.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${o}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);const A=o,a=A.replace(/@yarnpkg\//,"");await ge(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(h.b.UNNAMED,"Building a fresh "+a),r.reportSeparator(),await he((({pluginName:e,noMinify:t},r)=>[["yarn","build:"+e,...t?["--no-minify"]:[],"|"]])({pluginName:a,noMinify:this.noMinify}),{configuration:e,context:this.context,target:t}),r.reportSeparator();const c=y.y1.resolve(t,`packages/${a}/bundles/${A}.js`),u=await R.xfs.readFilePromise(c);await Ee(A,u,{project:n,report:r})})).exitCode()}}Ie.usage=d.Command.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:"\n This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.\n\n The plugins can be referenced by their short name if sourced from the official Yarn repository.\n ",examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]}),(0,a.gn)([d.Command.String()],Ie.prototype,"name",void 0),(0,a.gn)([d.Command.String("--path")],Ie.prototype,"installPath",void 0),(0,a.gn)([d.Command.String("--repository")],Ie.prototype,"repository",void 0),(0,a.gn)([d.Command.String("--branch")],Ie.prototype,"branch",void 0),(0,a.gn)([d.Command.Boolean("--no-minify")],Ie.prototype,"noMinify",void 0),(0,a.gn)([d.Command.Boolean("-f,--force")],Ie.prototype,"force",void 0),(0,a.gn)([d.Command.Path("plugin","import","from","sources")],Ie.prototype,"execute",null);class me extends c.BaseCommand{async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t}=await g.I.find(e,this.context.cwd);return(await f.P.start({configuration:e,stdout:this.context.stdout},async r=>{const n=this.name,i=p.structUtils.parseIdent(n);if(!e.plugins.has(n))throw new d.UsageError(p.structUtils.prettyIdent(e,i)+" isn't referenced by the current configuration");const o=`.yarn/plugins/${n}.cjs`,s=y.y1.resolve(t.cwd,o);R.xfs.existsSync(s)&&(r.reportInfo(h.b.UNNAMED,`Removing ${e.format(o,A.a5.PATH)}...`),await R.xfs.removePromise(s)),r.reportInfo(h.b.UNNAMED,"Updating the configuration..."),await A.VK.updateConfiguration(t.cwd,e=>{if(!Array.isArray(e.plugins))return{};return{plugins:e.plugins.filter(e=>e.path!==o)}})})).exitCode()}}me.usage=d.Command.Usage({category:"Plugin-related commands",description:"remove a plugin",details:"\n This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.\n\n **Note:** The plugins have to be referenced by their name property, which can be obtained using the `yarn plugin runtime` command. Shorthands are not allowed.\n ",examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]}),(0,a.gn)([d.Command.String()],me.prototype,"name",void 0),(0,a.gn)([d.Command.Path("plugin","remove")],me.prototype,"execute",null);class ye extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins);return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{for(const r of e.plugins.keys()){const e=this.context.plugins.plugins.has(r);let n=r;e&&(n+=" [builtin]"),t.reportJson({name:r,builtin:e}),t.reportInfo(null,""+n)}})).exitCode()}}ye.usage=d.Command.Usage({category:"Plugin-related commands",description:"list the active plugins",details:"\n This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.\n ",examples:[["List the currently active plugins","$0 plugin runtime"]]}),(0,a.gn)([d.Command.Boolean("--json")],ye.prototype,"json",void 0),(0,a.gn)([d.Command.Path("plugin","runtime")],ye.prototype,"execute",null);class we extends c.BaseCommand{constructor(){super(...arguments),this.idents=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const i=new Set;for(const e of this.idents)i.add(p.structUtils.parseIdent(e).identHash);await t.resolveEverything({cache:n,report:new I.$});const o=e.get("bstatePath"),s=R.xfs.existsSync(o)?(0,ee.parseSyml)(await R.xfs.readFilePromise(o,"utf8")):{},a=new Map;for(const e of t.storedPackages.values()){if(!Object.prototype.hasOwnProperty.call(s,e.locatorHash))continue;if(0===i.size||i.has(e.identHash))continue;const t=s[e.locatorHash];a.set(e.locatorHash,t)}if(a.size>0){const r=e.get("bstatePath"),n=g.I.generateBuildStateFile(a,t.storedPackages);await R.xfs.mkdirpPromise(y.y1.dirname(r)),await R.xfs.changeFilePromise(r,n,{automaticNewlines:!0})}else await R.xfs.removePromise(o);return(await f.P.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await t.install({cache:n,report:e})})).exitCode()}}we.usage=d.Command.Usage({description:"rebuild the project's native packages",details:"\n This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.\n\n Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).\n\n By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.\n ",examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]}),(0,a.gn)([d.Command.Rest()],we.prototype,"idents",void 0),(0,a.gn)([d.Command.Path("rebuild")],we.prototype,"execute",null);var Be=r(2401),Qe=r.n(Be);class ve extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.patterns=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const o=this.all?t.workspaces:[r],s=[i.REGULAR,i.DEVELOPMENT,i.PEER],a=[];let l=!1;const h=[];for(const e of this.patterns){let t=!1;const r=p.structUtils.parseIdent(e);for(const n of o){const i=[...n.manifest.peerDependenciesMeta.keys()];for(const r of Qe()(i,e))n.manifest.peerDependenciesMeta.delete(r),l=!0,t=!0;for(const e of s){const i=n.manifest.getForScope(e),o=[...i.values()].map(e=>p.structUtils.stringifyIdent(e));for(const s of Qe()(o,p.structUtils.stringifyIdent(r))){const{identHash:r}=p.structUtils.parseIdent(s),o=i.get(r);if(void 0===o)throw new Error("Assertion failed: Expected the descriptor to be registered");n.manifest[e].delete(r),h.push([n,e,o]),l=!0,t=!0}}}t||a.push(e)}const C=a.length>1?"Patterns":"Pattern",E=a.length>1?"don't":"doesn't",I=this.all?"any":"this";if(a.length>0)throw new d.UsageError(`${C} ${a.join(", ")} ${E} match packages referenced by ${I} workspace`);if(l){await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyRemoval,h);return(await f.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:n,report:e})})).exitCode()}return 0}}ve.usage=d.Command.Usage({description:"remove dependencies from the project",details:"\n This command will remove the packages matching the specified patterns from the current workspace.\n\n If the `-A,--all` option is set, the operation will be applied to all workspaces from the current project.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n ",examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]}),(0,a.gn)([d.Command.Boolean("-A,--all")],ve.prototype,"all",void 0),(0,a.gn)([d.Command.Rest()],ve.prototype,"patterns",void 0),(0,a.gn)([d.Command.Path("remove")],ve.prototype,"execute",null);class De extends c.BaseCommand{async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);return(await f.P.start({configuration:e,stdout:this.context.stdout},async t=>{const n=r.manifest.scripts,i=p.miscUtils.sortMap(n.keys(),e=>e),o={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},s=i.reduce((e,t)=>Math.max(e,t.length),0);for(const[e,r]of n.entries())t.reportInfo(null,`${e.padEnd(s," ")} ${(0,_.inspect)(r,o)}`)})).exitCode()}}(0,a.gn)([d.Command.Path("run")],De.prototype,"execute",null);const be=new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["interactive-tools",[["upgrade-interactive"]]],["stage",[["stage"]]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","foreach"],["workspace"]]]]);class Se extends c.BaseCommand{constructor(){super(...arguments),this.inspect=!1,this.inspectBrk=!1,this.topLevel=!1,this.binariesOnly=!1,this.args=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r,locator:n}=await g.I.find(e,this.context.cwd);await t.restoreInstallState();const i=this.topLevel?t.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await p.scriptUtils.hasPackageScript(i,this.scriptName,{project:t}))return await p.scriptUtils.executePackageScript(i,this.scriptName,this.args,{project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if((await p.scriptUtils.getPackageAccessibleBinaries(i,{project:t})).get(this.scriptName)){const e=[];return this.inspect&&("string"==typeof this.inspect?e.push("--inspect="+this.inspect):e.push("--inspect")),this.inspectBrk&&("string"==typeof this.inspectBrk?e.push("--inspect-brk="+this.inspectBrk):e.push("--inspect-brk")),await p.scriptUtils.executePackageAccessibleBinary(i,this.scriptName,this.args,{cwd:this.context.cwd,project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:e})}if(!this.topLevel&&!this.binariesOnly&&r&&this.scriptName.includes(":")){const e=(await Promise.all(t.workspaces.map(async e=>e.manifest.scripts.has(this.scriptName)?e:null))).filter(e=>null!==e);if(1===e.length)return await p.scriptUtils.executeWorkspaceScript(e[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw"node-gyp"===this.scriptName?new d.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${p.structUtils.prettyLocator(e,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new d.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${p.structUtils.prettyLocator(e,n)}).`);{if("global"===this.scriptName)throw new d.UsageError("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");const e=[this.scriptName].concat(this.args);for(const[t,r]of be)for(const n of r)if(e.length>=n.length&&JSON.stringify(e.slice(0,n.length))===JSON.stringify(n))throw new d.UsageError(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${t} plugin. You can install it with "yarn plugin import ${t}".`);throw new d.UsageError(`Couldn't find a script named "${this.scriptName}".`)}}}Se.usage=d.Command.Usage({description:"run a script defined in the package.json",details:"\n This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:\n\n - If the `scripts` field from your local package.json contains a matching script name, its definition will get executed.\n\n - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed (the `--inspect` and `--inspect-brk` options will then be forwarded to the underlying Node process).\n\n - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.\n\n Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).\n ",examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]}),(0,a.gn)([d.Command.String("--inspect",{tolerateBoolean:!0})],Se.prototype,"inspect",void 0),(0,a.gn)([d.Command.String("--inspect-brk",{tolerateBoolean:!0})],Se.prototype,"inspectBrk",void 0),(0,a.gn)([d.Command.Boolean("-T,--top-level",{hidden:!0})],Se.prototype,"topLevel",void 0),(0,a.gn)([d.Command.Boolean("-B,--binaries-only",{hidden:!0})],Se.prototype,"binariesOnly",void 0),(0,a.gn)([d.Command.Boolean("--silent",{hidden:!0})],Se.prototype,"silent",void 0),(0,a.gn)([d.Command.String()],Se.prototype,"scriptName",void 0),(0,a.gn)([d.Command.Proxy()],Se.prototype,"args",void 0),(0,a.gn)([d.Command.Path("run")],Se.prototype,"execute",null);class ke extends c.BaseCommand{constructor(){super(...arguments),this.save=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const i=p.structUtils.parseDescriptor(this.descriptor,!0),o=p.structUtils.makeDescriptor(i,this.resolution);t.storedDescriptors.set(i.descriptorHash,i),t.storedDescriptors.set(o.descriptorHash,o),t.resolutionAliases.set(i.descriptorHash,o.descriptorHash);return(await f.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:n,report:e})})).exitCode()}}ke.usage=d.Command.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@^1.2.3 1.5.0"]]}),(0,a.gn)([d.Command.String()],ke.prototype,"descriptor",void 0),(0,a.gn)([d.Command.String()],ke.prototype,"resolution",void 0),(0,a.gn)([d.Command.Boolean("-s,--save")],ke.prototype,"save",void 0),(0,a.gn)([d.Command.Path("set","resolution")],ke.prototype,"execute",null);class xe extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.interactive=!1,this.verbose=!1,this.exact=!1,this.tilde=!1,this.caret=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd),n=await u.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const o=E().createPromptModule({input:this.context.stdin,output:this.context.stdout}),a=Q(this,t),C=this.interactive?[s.KEEP,s.REUSE,s.PROJECT,s.LATEST]:[s.PROJECT,s.LATEST],I=[],m=[];for(const e of this.patterns){let r=!1;const o=p.structUtils.parseDescriptor(e);for(const e of t.workspaces)for(const s of[i.REGULAR,i.DEVELOPMENT]){const i=[...e.manifest.getForScope(s).values()].map(e=>p.structUtils.stringifyIdent(e));for(const A of Qe()(i,p.structUtils.stringifyIdent(o))){const i=p.structUtils.parseIdent(A),c=e.manifest[s].get(i.identHash);if(void 0===c)throw new Error("Assertion failed: Expected the descriptor to be registered");const u=p.structUtils.makeDescriptor(i,o.range);I.push(Promise.resolve().then(async()=>[e,s,c,await x(u,{project:t,workspace:e,cache:n,target:s,modifier:a,strategies:C})])),r=!0}}r||m.push(e)}if(m.length>1)throw new d.UsageError(`Patterns ${m.join(", ")} don't match any packages referenced by any workspace`);if(m.length>0)throw new d.UsageError(`Pattern ${m[0]} doesn't match any packages referenced by any workspace`);const y=await Promise.all(I),w=await l.h.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async r=>{for(const[,,n,i]of y){const o=i.filter(e=>null!==e.descriptor);0===o.length?t.configuration.get("enableNetwork")?r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" can't be resolved to a satisfying range"):r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" can't be resolved to a satisfying range (note: network resolution has been disabled)"):o.length>1&&!this.interactive&&r.reportError(h.b.CANT_SUGGEST_RESOLUTIONS,p.structUtils.prettyDescriptor(e,n)+" has multiple possible upgrade strategies; use -i to disambiguate manually")}});if(w.hasErrors())return w.exitCode();let B=!1;const v=[];for(const[r,n,,i]of y){let s;const A=i.filter(e=>null!==e.descriptor),a=A[0].descriptor,c=A.every(e=>p.structUtils.areDescriptorsEqual(e.descriptor,a));1===A.length||c?s=a:(B=!0,({answer:s}=await o({type:"list",name:"answer",message:`Which range to you want to use in ${p.structUtils.prettyWorkspace(e,r)} ❯ ${n}?`,choices:i.map(({descriptor:e,reason:r})=>e?{name:r,value:e,short:p.structUtils.prettyDescriptor(t.configuration,e)}:{name:r,disabled:()=>!0})})));const u=r.manifest[n].get(s.identHash);if(void 0===u)throw new Error("Assertion failed: This descriptor should have a matching entry");if(u.descriptorHash!==s.descriptorHash)r.manifest[n].set(s.identHash,s),v.push([r,n,u,s]);else{const n=e.makeResolver(),i={project:t,resolver:n},o=n.bindDescriptor(u,r.anchoredLocator,i);t.forgetResolution(o)}}await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,v),B&&this.context.stdout.write("\n");return(await f.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:n,report:e})})).exitCode()}}xe.usage=d.Command.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),(0,a.gn)([d.Command.Rest()],xe.prototype,"patterns",void 0),(0,a.gn)([d.Command.Boolean("-i,--interactive")],xe.prototype,"interactive",void 0),(0,a.gn)([d.Command.Boolean("-v,--verbose")],xe.prototype,"verbose",void 0),(0,a.gn)([d.Command.Boolean("-E,--exact")],xe.prototype,"exact",void 0),(0,a.gn)([d.Command.Boolean("-T,--tilde")],xe.prototype,"tilde",void 0),(0,a.gn)([d.Command.Boolean("-C,--caret")],xe.prototype,"caret",void 0),(0,a.gn)([d.Command.Path("up")],xe.prototype,"execute",null);var Fe=r(5195);class Me extends c.BaseCommand{constructor(){super(...arguments),this.recursive=!1,this.peers=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=p.structUtils.parseIdent(this.package).identHash,i=this.recursive?function(e,t,{configuration:r,peers:n}){const i=p.miscUtils.sortMap(e.workspaces,e=>p.structUtils.stringifyLocator(e.anchoredLocator)),o=new Set,s=new Set,A=r=>{if(o.has(r.locatorHash))return s.has(r.locatorHash);if(o.add(r.locatorHash),r.identHash===t)return s.add(r.locatorHash),!0;let i=!1;r.identHash===t&&(i=!0);for(const t of r.dependencies.values()){if(!n&&r.peerDependencies.has(t.identHash))continue;const o=e.storedResolutions.get(t.descriptorHash);if(!o)throw new Error("Assertion failed: The resolution should have been registered");const s=e.storedPackages.get(o);if(!s)throw new Error("Assertion failed: The package should have been registered");A(s)&&(i=!0)}return i&&s.add(r.locatorHash),i};for(const t of i){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");A(r)}const a=new Set,c={},u=(t,i,o)=>{if(!s.has(t.locatorHash))return;const A={};if(i[null!==o?`${p.structUtils.prettyLocator(r,t)} (via ${p.structUtils.prettyRange(r,o)})`:""+p.structUtils.prettyLocator(r,t)]=A,!a.has(t.locatorHash)&&(a.add(t.locatorHash),null===o||!e.tryWorkspaceByLocator(t)))for(const r of t.dependencies.values()){if(!n&&t.peerDependencies.has(r.identHash))continue;const i=e.storedResolutions.get(r.descriptorHash);if(!i)throw new Error("Assertion failed: The resolution should have been registered");const o=e.storedPackages.get(i);if(!o)throw new Error("Assertion failed: The package should have been registered");u(o,A,r.range)}};for(const t of i){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");u(r,c,null)}return c}(t,n,{configuration:e,peers:this.peers}):function(e,t,{configuration:r,peers:n}){const i=p.miscUtils.sortMap(e.storedPackages.values(),e=>p.structUtils.stringifyLocator(e)),o={};for(const s of i){let i=null;for(const A of s.dependencies.values()){if(!n&&s.peerDependencies.has(A.identHash))continue;const a=e.storedResolutions.get(A.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");const c=e.storedPackages.get(a);if(!c)throw new Error("Assertion failed: The package should have been registered");if(c.identHash!==t)continue;if(null===i){i={};const e=""+p.structUtils.prettyLocator(r,s);o[e]=i}const u=`${p.structUtils.prettyLocator(r,c)} (via ${p.structUtils.prettyRange(r,A.range)})`;i[u]={}}}return o}(t,n,{configuration:e,peers:this.peers});!function(e,t){let r=(0,Fe.asTree)(t,!1,!1);r=r.replace(/^([├└]─)/gm,"│\n$1").replace(/^│\n/,""),e.write(r)}(this.context.stdout,i)}}Me.usage=d.Command.Usage({description:"display the reason why a package is needed",details:'\n This command prints the exact reasons why a package appears in the dependency tree.\n\n If `-R,--recursive` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.\n\n If `--peers` is set, the command will also print the peer dependencies that match the specified name.\n ',examples:[["Explain why lodash is used in your project","$0 why lodash"]]}),(0,a.gn)([d.Command.String()],Me.prototype,"package",void 0),(0,a.gn)([d.Command.Boolean("-R,--recursive")],Me.prototype,"recursive",void 0),(0,a.gn)([d.Command.Boolean("--peers")],Me.prototype,"peers",void 0),(0,a.gn)([d.Command.Path("why")],Me.prototype,"execute",null);class Ne extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t}=await g.I.find(e,this.context.cwd);return(await f.P.start({configuration:e,json:this.json,stdout:this.context.stdout},async e=>{for(const r of t.workspaces){const{manifest:n}=r;let i;if(this.verbose){const e=new Set,r=new Set;for(const i of m.G.hardDependencies)for(const[o,s]of n.getForScope(i)){const n=t.tryWorkspaceByDescriptor(s);null===n?t.workspacesByIdent.has(o)&&r.add(s):e.add(n)}i={workspaceDependencies:Array.from(e).map(e=>e.relativeCwd),mismatchedWorkspaceDependencies:Array.from(r).map(e=>p.structUtils.stringifyDescriptor(e))}}e.reportInfo(null,""+r.relativeCwd),e.reportJson({location:r.relativeCwd,name:n.name?p.structUtils.stringifyIdent(n.name):null,...i})}})).exitCode()}}Ne.usage=d.Command.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project. If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n "}),(0,a.gn)([d.Command.Boolean("-v,--verbose")],Ne.prototype,"verbose",void 0),(0,a.gn)([d.Command.Boolean("--json")],Ne.prototype,"json",void 0),(0,a.gn)([d.Command.Path("workspaces","list")],Ne.prototype,"execute",null);class Re extends d.Command{constructor(){super(...arguments),this.args=[]}async execute(){const e=await A.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await g.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=t.workspaces,i=new Map(n.map(e=>{const t=p.structUtils.convertToIdent(e.locator);return[p.structUtils.stringifyIdent(t),e]})),o=i.get(this.workspaceName);if(void 0===o){const e=Array.from(i.keys()).sort();throw new d.UsageError(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:\n - ${e.join("\n - ")}?`)}return this.cli.run([this.commandName,...this.args],{cwd:o.cwd})}}Re.usage=d.Command.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:"\n This command will run a given sub-command on a single workspace.\n ",examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]}),(0,a.gn)([d.Command.String()],Re.prototype,"workspaceName",void 0),(0,a.gn)([d.Command.String()],Re.prototype,"commandName",void 0),(0,a.gn)([d.Command.Proxy()],Re.prototype,"args",void 0),(0,a.gn)([d.Command.Path("workspace")],Re.prototype,"execute",null);const Le={configuration:{enableImmutableInstalls:{description:"If true, prevents the install command from modifying the lockfile",type:A.a2.BOOLEAN,default:!1},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:A.a2.STRING,default:o.CARET}},commands:[L,P,J,ke,le,Ae,Ne,z,q,W,X,M,N,H,Z,te,re,ne,Ie,Ce,me,de,ye,we,ve,De,Se,xe,Me,Re]}},41466:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(84132),i=r(46009),o=r(75448);const s=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,A=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/;var a=r(46611),c=r(32485);const u={fetchers:[class{supports(e,t){return!!A.test(e.reference)&&!!e.reference.startsWith("file:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[i,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:i,releaseFs:o,prefixPath:n.structUtils.getIdentVendorPath(e),checksum:s}}async fetchFromDisk(e,t){const{parentLocator:r,path:s}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"file:"}),A=i.y1.isAbsolute(s)?{packageFs:new o.M(i.LZ.root),prefixPath:i.LZ.dot,localPath:i.LZ.root}:await t.fetcher.fetch(r,t),a=A.localPath?{packageFs:new o.M(i.LZ.root),prefixPath:i.y1.relative(i.LZ.root,A.localPath)}:A;A!==a&&A.releaseFs&&A.releaseFs();const c=a.packageFs,u=i.y1.join(a.prefixPath,s),l=await c.readFilePromise(u);return await n.miscUtils.releaseAfterUseAsync(async()=>await n.tgzUtils.convertToZip(l,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.structUtils.getIdentVendorPath(e),stripComponents:1}),a.releaseFs)}},class{supports(e,t){return!!e.reference.startsWith("file:")}getLocalPath(e,t){const{parentLocator:r,path:o}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"file:"});if(i.y1.isAbsolute(o))return o;const s=t.fetcher.getLocalPath(r,t);return null===s?null:i.y1.resolve(s,o)}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[i,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:i,releaseFs:o,prefixPath:n.structUtils.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:s}}async fetchFromDisk(e,t){const{parentLocator:r,path:s}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"file:"}),A=i.y1.isAbsolute(s)?{packageFs:new o.M(i.LZ.root),prefixPath:i.LZ.dot,localPath:i.LZ.root}:await t.fetcher.fetch(r,t),a=A.localPath?{packageFs:new o.M(i.LZ.root),prefixPath:i.y1.relative(i.LZ.root,A.localPath)}:A;A!==a&&A.releaseFs&&A.releaseFs();const c=a.packageFs,u=i.y1.join(a.prefixPath,s);return await n.miscUtils.releaseAfterUseAsync(async()=>await n.tgzUtils.makeArchiveFromDirectory(u,{baseFs:c,prefixPath:n.structUtils.getIdentVendorPath(e),compressionLevel:t.project.configuration.get("compressionLevel")}),a.releaseFs)}}],resolvers:[class{supportsDescriptor(e,t){return!!A.test(e.range)&&(!!e.range.startsWith("file:")||!!s.test(e.range))}supportsLocator(e,t){return!!A.test(e.reference)&&!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return s.test(e.range)&&(e=n.structUtils.makeDescriptor(e,"file:"+e.range)),n.structUtils.bindDescriptor(e,{locator:n.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let o=e.range;return o.startsWith("file:")&&(o=o.slice("file:".length)),[n.structUtils.makeLocator(e,"file:"+i.cS.toPortablePath(o))]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),i=await n.miscUtils.releaseAfterUseAsync(async()=>await a.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:i.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:c.U.HARD,dependencies:i.dependencies,peerDependencies:i.peerDependencies,dependenciesMeta:i.dependenciesMeta,peerDependenciesMeta:i.peerDependenciesMeta,bin:i.bin}}},class{supportsDescriptor(e,t){return!!e.range.match(s)||!!e.range.startsWith("file:")}supportsLocator(e,t){return!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return s.test(e.range)&&(e=n.structUtils.makeDescriptor(e,"file:"+e.range)),n.structUtils.bindDescriptor(e,{locator:n.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let o=e.range;return o.startsWith("file:")&&(o=o.slice("file:".length)),[n.structUtils.makeLocator(e,"file:"+i.cS.toPortablePath(o))]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),i=await n.miscUtils.releaseAfterUseAsync(async()=>await a.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:i.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:c.U.HARD,dependencies:i.dependencies,peerDependencies:i.peerDependencies,dependenciesMeta:i.dependenciesMeta,peerDependenciesMeta:i.peerDependenciesMeta,bin:i.bin}}}]}},10284:(e,t,r)=>{"use strict";r.r(t),r.d(t,{gitUtils:()=>n,default:()=>B});var n={};r.r(n),r.d(n,{TreeishProtocols:()=>g,clone:()=>m,isGitUrl:()=>f,lsRemote:()=>E,normalizeLocator:()=>C,normalizeRepoUrl:()=>d,resolveUrl:()=>I,splitRepoUrl:()=>p});var i=r(84132),o=r(46009),s=r(56537),A=r(71191),a=r.n(A),c=r(10966),u=r.n(c);function l(){return{...process.env,GIT_SSH_COMMAND:"ssh -o BatchMode=yes"}}const h=[/^ssh:/,/^git(?:\+ssh)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^(?:git\+)https?:[^#]+\/[^#]+(?:\.git)?(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/];var g;function f(e){return!!e&&h.some(t=>!!e.match(t))}function p(e){const t=(e=d(e)).indexOf("#");if(-1===t)return{repo:e,treeish:{protocol:g.Head,request:"master"},extra:{}};const r=e.slice(0,t),n=e.slice(t+1);if(n.match(/^[a-z]+=/)){const e=a().parse(n);for(const[t,r]of Object.entries(e))if("string"!=typeof r)throw new Error(`Assertion failed: The ${t} parameter must be a literal string`);const t=Object.values(g).find(t=>Object.prototype.hasOwnProperty.call(e,t));let i,o;void 0!==t?(i=t,o=e[t]):(i=g.Head,o="master");for(const t of Object.values(g))delete e[t];return{repo:r,treeish:{protocol:i,request:o},extra:e}}{const e=n.indexOf(":");let t,i;return-1===e?(t=null,i=n):(t=n.slice(0,e),i=n.slice(e+1)),{repo:r,treeish:{protocol:t,request:i},extra:{}}}}function d(e){return e=(e=(e=e.replace(/^git\+https:/,"https:")).replace(/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3")).replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3")}function C(e){return i.structUtils.makeLocator(e,d(e.reference))}async function E(e,t){if(!t.get("enableNetwork"))throw new Error(`Network access has been disabled by configuration (${e})`);let r;try{r=await i.execUtils.execvp("git",["ls-remote","--refs",d(e)],{cwd:t.startingCwd,env:l(),strict:!0})}catch(t){throw t.message=`Listing the refs for ${e} failed`,t}const n=new Map,o=/^([a-f0-9]{40})\t(refs\/[^\n]+)/gm;let s;for(;null!==(s=o.exec(r.stdout));)n.set(s[2],s[1]);return n}async function I(e,t){const{repo:r,treeish:{protocol:n,request:i},extra:o}=p(e),s=await E(r,t),A=(e,t)=>{switch(e){case g.Commit:if(!t.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return a().stringify({...o,commit:t});case g.Head:{const e=s.get("refs/heads/"+t);if(void 0===e)throw new Error(`Unknown head ("${t}")`);return a().stringify({...o,commit:e})}case g.Tag:{const e=s.get("refs/tags/"+t);if(void 0===e)throw new Error(`Unknown tag ("${t}")`);return a().stringify({...o,commit:e})}case g.Semver:{if(!u().validRange(t))throw new Error(`Invalid range ("${t}")`);const e=new Map([...s.entries()].filter(([e])=>e.startsWith("refs/tags/")).map(([e,t])=>[u().parse(e.slice(10)),t]).filter(e=>null!==e[0])),r=u().maxSatisfying([...e.keys()],t);if(null===r)throw new Error(`No matching range ("${t}")`);return a().stringify({...o,commit:e.get(r)})}case null:{let e;if(null!==(e=c(g.Commit,t)))return e;if(null!==(e=c(g.Tag,t)))return e;if(null!==(e=c(g.Head,t)))return e;throw t.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${e}")`)}},c=(e,t)=>{try{return A(e,t)}catch(e){return null}};return`${r}#${A(n,i)}`}async function m(e,t){if(!t.get("enableNetwork"))throw new Error(`Network access has been disabled by configuration (${e})`);const{repo:r,treeish:{protocol:n,request:A}}=p(e);if("commit"!==n)throw new Error("Invalid treeish protocol when cloning");const a=await s.xfs.mktempPromise(),c={cwd:a,env:l(),strict:!0};try{await i.execUtils.execvp("git",["clone","-c core.autocrlf=false",""+d(r),o.cS.fromPortablePath(a)],c),await i.execUtils.execvp("git",["checkout",""+A],c)}catch(e){throw e.message="Repository clone failed: "+e.message,e}return a}!function(e){e.Commit="commit",e.Head="head",e.Tag="tag",e.Semver="semver"}(g||(g={}));var y=r(32485),w=r(46611);const B={fetchers:[class{supports(e,t){return f(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,n=C(e),o=new Map(t.checksums);o.set(n.locatorHash,r);const s={...t,checksums:o},A=await this.downloadHosted(n,s);if(null!==A)return A;const[a,c,u]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,i.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote repository"),loader:()=>this.cloneFromRemote(n,s),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:a,releaseFs:c,prefixPath:i.structUtils.getIdentVendorPath(e),checksum:u}}async downloadHosted(e,t){return t.project.configuration.reduceHook(e=>e.fetchHostedRepository,null,e,t)}async cloneFromRemote(e,t){const r=await m(e.reference,t.project.configuration),n=p(e.reference),A=o.y1.join(r,"package.tgz");await i.scriptUtils.prepareExternalProject(r,A,{configuration:t.project.configuration,report:t.report,workspace:n.extra.workspace});const a=await s.xfs.readFilePromise(A);return await i.miscUtils.releaseAfterUseAsync(async()=>await i.tgzUtils.convertToZip(a,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:i.structUtils.getIdentVendorPath(e),stripComponents:1}))}}],resolvers:[class{supportsDescriptor(e,t){return f(e.range)}supportsLocator(e,t){return f(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const n=await I(e.range,r.project.configuration);return[i.structUtils.makeLocator(e,n)]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),n=await i.miscUtils.releaseAfterUseAsync(async()=>await w.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:n.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:y.U.HARD,dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin}}}]}},23599:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(84132),i=r(56537),o=r(75448),s=r(46009),A=r(10284),a=r(71191),c=r.n(a);const u=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];class l{supports(e,t){return!(!(r=e.reference)||!u.some(e=>!!r.match(e)));var r}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[i,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from GitHub"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:i,releaseFs:o,prefixPath:n.structUtils.getIdentVendorPath(e),checksum:s}}async fetchFromNetwork(e,t){const r=await n.httpUtils.get(this.getLocatorUrl(e,t),{configuration:t.project.configuration});return await i.xfs.mktempPromise(async a=>{const c=new o.M(a);await n.tgzUtils.extractArchiveTo(r,c,{stripComponents:1});const u=A.gitUtils.splitRepoUrl(e.reference),l=s.y1.join(a,"package.tgz");await n.scriptUtils.prepareExternalProject(a,l,{configuration:t.project.configuration,report:t.report,workspace:u.extra.workspace});const h=await i.xfs.readFilePromise(l);return await n.tgzUtils.convertToZip(h,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.structUtils.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,t){const{auth:r,username:n,reponame:i,treeish:o}=function(e){let t;for(const r of u)if(t=e.match(r),t)break;if(!t)throw new Error(`Input cannot be parsed as a valid GitHub URL ('${e}').`);let[,r,n,i,o="master"]=t;const{commit:s}=c().parse(o);return o=s||o.replace(/[^:]*:/,""),{auth:r,username:n,reponame:i,treeish:o}}(e.reference);return`https://${r?r+"@":""}github.com/${n}/${i}/archive/${o}.tar.gz`}}const h={hooks:{async fetchHostedRepository(e,t,r){if(null!==e)return e;const n=new l;if(!n.supports(t,r))return null;try{return await n.fetch(t,r)}catch(e){return null}}}}},21754:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r(84132);const i=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,o=/^https?:/;var s=r(46611),A=r(32485);const a={fetchers:[class{supports(e,t){return!!i.test(e.reference)&&!!o.test(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[i,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote server"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:i,releaseFs:o,prefixPath:n.structUtils.getIdentVendorPath(e),checksum:s}}async fetchFromNetwork(e,t){const r=await n.httpUtils.get(e.reference,{configuration:t.project.configuration});return await n.tgzUtils.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.structUtils.getIdentVendorPath(e),stripComponents:1})}}],resolvers:[class{supportsDescriptor(e,t){return!!i.test(e.range)&&!!o.test(e.range)}supportsLocator(e,t){return!!i.test(e.reference)&&!!o.test(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[n.structUtils.convertDescriptorToLocator(e)]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),i=await n.miscUtils.releaseAfterUseAsync(async()=>await s.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:i.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:A.U.HARD,dependencies:i.dependencies,peerDependencies:i.peerDependencies,dependenciesMeta:i.dependenciesMeta,peerDependenciesMeta:i.peerDependenciesMeta,bin:i.bin}}}]}},74230:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var n=r(27122),i=r(36370),o=r(95397),s=r(46611),A=r(40376),a=r(84132),c=r(56537),u=r(46009),l=r(17278),h=r(7564),g=r(31669);class f extends o.BaseCommand{constructor(){super(...arguments),this.usev2=!1,this.assumeFreshProject=!1,this.yes=!1,this.private=!1,this.workspace=!1,this.install=!1}async execute(){if(c.xfs.existsSync(u.y1.join(this.context.cwd,s.G.fileName)))throw new l.UsageError("A package.json already exists in the specified directory");const e=await n.VK.find(this.context.cwd,this.context.plugins),t=this.install?!0===this.install?"latest":this.install:null;return null!==t?await this.executeProxy(e,t):await this.executeRegular(e)}async executeProxy(e,t){if(null!==e.get("yarnPath"))throw new l.UsageError(`Cannot use the --install flag when the current directory already uses yarnPath (from ${e.sources.get("yarnPath")})`);if(null!==e.projectCwd)throw new l.UsageError("Cannot use the --install flag when the current directory is already part of a project");c.xfs.existsSync(this.context.cwd)||await c.xfs.mkdirpPromise(this.context.cwd);const r=u.y1.join(this.context.cwd,e.get("lockfileFilename"));c.xfs.existsSync(r)||await c.xfs.writeFilePromise(r,"");const n=await this.cli.run(["set","version",t]);if(0!==n)return n;this.context.stdout.write("\n");const i=["--assume-fresh-project"];return this.private&&i.push("-p"),this.workspace&&i.push("-w"),this.yes&&i.push("-y"),await c.xfs.mktempPromise(async e=>{const{code:t}=await a.execUtils.pipevp("yarn",["init",...i],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await a.scriptUtils.makeScriptEnv({binFolder:e})});return t})}async executeRegular(e){let t=null;if(!this.assumeFreshProject)try{t=await A.I.find(e,this.context.cwd)}catch(e){t=null}c.xfs.existsSync(this.context.cwd)||await c.xfs.mkdirpPromise(this.context.cwd);const r=new s.G,n=Object.fromEntries(e.get("initFields").entries());r.load(n),r.name=a.structUtils.makeIdent(e.get("initScope"),u.y1.basename(this.context.cwd)),r.version=e.get("initVersion"),r.private=this.private||this.workspace,r.license=e.get("initLicense"),this.workspace&&(await c.xfs.mkdirpPromise(u.y1.join(this.context.cwd,"packages")),r.workspaceDefinitions=[{pattern:"packages/*"}]);const i={};r.exportTo(i),g.inspect.styles.name="cyan",this.context.stdout.write((0,g.inspect)(i,{depth:1/0,colors:!0,compact:!1})+"\n");const o=u.y1.join(this.context.cwd,s.G.fileName);await c.xfs.changeFilePromise(o,JSON.stringify(i,null,2)+"\n");const l=u.y1.join(this.context.cwd,"README.md");if(c.xfs.existsSync(l)||await c.xfs.writeFilePromise(l,`# ${a.structUtils.stringifyIdent(r.name)}\n`),!t){const t=u.y1.join(this.context.cwd,u.QS.lockfile);await c.xfs.writeFilePromise(t,"");const r=["/.yarn/** linguist-vendored"].map(e=>e+"\n").join(""),n=u.y1.join(this.context.cwd,".gitattributes");c.xfs.existsSync(n)||await c.xfs.writeFilePromise(n,r);const i=["/.yarn/*","!/.yarn/releases","!/.yarn/plugins","!/.yarn/sdks","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!/.yarn/cache","#/.pnp.*"].map(e=>e+"\n").join(""),o=u.y1.join(this.context.cwd,".gitignore");c.xfs.existsSync(o)||await c.xfs.writeFilePromise(o,i);const s={"*":{endOfLine:"lf",insertFinalNewline:!0},"*.{js,json,.yml}":{charset:"utf-8",indentStyle:"space",indentSize:2}};(0,h.merge)(s,e.get("initEditorConfig"));let A="root = true\n";for(const[e,t]of Object.entries(s)){A+=`\n[${e}]\n`;for(const[e,r]of Object.entries(t)){A+=`${e.replace(/[A-Z]/g,e=>"_"+e.toLowerCase())} = ${r}\n`}}const l=u.y1.join(this.context.cwd,".editorconfig");c.xfs.existsSync(l)||await c.xfs.writeFilePromise(l,A),await a.execUtils.execvp("git",["init"],{cwd:this.context.cwd})}}}f.usage=l.Command.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]}),(0,i.gn)([l.Command.Boolean("-2",{hidden:!0})],f.prototype,"usev2",void 0),(0,i.gn)([l.Command.Boolean("--assume-fresh-project",{hidden:!0})],f.prototype,"assumeFreshProject",void 0),(0,i.gn)([l.Command.Boolean("-y,--yes",{hidden:!0})],f.prototype,"yes",void 0),(0,i.gn)([l.Command.Boolean("-p,--private")],f.prototype,"private",void 0),(0,i.gn)([l.Command.Boolean("-w,--workspace")],f.prototype,"workspace",void 0),(0,i.gn)([l.Command.String("-i,--install",{tolerateBoolean:!0})],f.prototype,"install",void 0),(0,i.gn)([l.Command.Path("init")],f.prototype,"execute",null);const p={configuration:{initLicense:{description:"License used when creating packages via the init command",type:n.a2.STRING,default:null},initScope:{description:"Scope used when creating packages via the init command",type:n.a2.STRING,default:null},initVersion:{description:"Version used when creating packages via the init command",type:n.a2.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:n.a2.MAP,valueDefinition:{description:"",type:n.a2.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:n.a2.MAP,valueDefinition:{description:"",type:n.a2.ANY}}},commands:[f]}},86161:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(84132),i=r(46009),o=r(75448),s=r(10489);var A=r(46611),a=r(32485);const c={fetchers:[class{supports(e,t){return!!e.reference.startsWith("link:")}getLocalPath(e,t){const{parentLocator:r,path:o}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"link:"});if(i.y1.isAbsolute(o))return o;const s=t.fetcher.getLocalPath(r,t);return null===s?null:i.y1.resolve(s,o)}async fetch(e,t){const{parentLocator:r,path:A}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"link:"}),a=i.y1.isAbsolute(A)?{packageFs:new o.M(i.LZ.root),prefixPath:i.LZ.dot,localPath:i.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(i.LZ.root),prefixPath:i.y1.relative(i.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const u=c.packageFs,l=i.y1.join(c.prefixPath,A);return a.localPath?{packageFs:new o.M(l,{baseFs:u}),releaseFs:c.releaseFs,prefixPath:i.LZ.dot,discardFromLookup:!0,localPath:l}:{packageFs:new s.n(l,{baseFs:u}),releaseFs:c.releaseFs,prefixPath:i.LZ.dot,discardFromLookup:!0}}},class{supports(e,t){return!!e.reference.startsWith("portal:")}getLocalPath(e,t){const{parentLocator:r,path:o}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"portal:"});if(i.y1.isAbsolute(o))return o;const s=t.fetcher.getLocalPath(r,t);return null===s?null:i.y1.resolve(s,o)}async fetch(e,t){const{parentLocator:r,path:A}=n.structUtils.parseFileStyleRange(e.reference,{protocol:"portal:"}),a=i.y1.isAbsolute(A)?{packageFs:new o.M(i.LZ.root),prefixPath:i.LZ.dot,localPath:i.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(i.LZ.root),prefixPath:i.y1.relative(i.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const u=c.packageFs,l=i.y1.join(c.prefixPath,A);return a.localPath?{packageFs:new o.M(l,{baseFs:u}),releaseFs:c.releaseFs,prefixPath:i.LZ.dot,localPath:l}:{packageFs:new s.n(l,{baseFs:u}),releaseFs:c.releaseFs,prefixPath:i.LZ.dot}}}],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("link:")}supportsLocator(e,t){return!!e.reference.startsWith("link:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return n.structUtils.bindDescriptor(e,{locator:n.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("link:".length);return[n.structUtils.makeLocator(e,"link:"+i.cS.toPortablePath(o))]}async resolve(e,t){return{...e,version:"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.U.SOFT,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("portal:")}supportsLocator(e,t){return!!e.reference.startsWith("portal:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return n.structUtils.bindDescriptor(e,{locator:n.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("portal:".length);return[n.structUtils.makeLocator(e,"portal:"+i.cS.toPortablePath(o))]}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),i=await n.miscUtils.releaseAfterUseAsync(async()=>await A.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:i.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.U.SOFT,dependencies:new Map([...i.dependencies,...i.devDependencies]),peerDependencies:i.peerDependencies,dependenciesMeta:i.dependenciesMeta,peerDependenciesMeta:i.peerDependenciesMeta,bin:i.bin}}}]}},8149:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getPnpPath:()=>ee,default:()=>te});var n=r(46009),i=r(92659),o=r(32485),s=r(92409),A=r(84132),a=r(46611),c=r(35691),u=r(17674),l=r(53660),h=r(56537),g=r(29486),f=r(55125),p=r(5780);const d=(e,t)=>`${e}@${t}`,C=(e,t)=>{const r=t.indexOf("#"),n=r>=0?t.substring(r+1):t;return d(e,n)},E=(e,t={})=>{const r=t.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),n={check:t.check||r>=9,debugLevel:r};n.debugLevel>=0&&console.time("hoist");const i=Q(e);if(m(i,i,new Set([i.locator]),n),n.debugLevel>=0&&console.timeEnd("hoist"),n.debugLevel>=1){const e=B(i);if(e)throw new Error(`${e}, after hoisting finished:\n${k(i)}`)}return n.debugLevel>=2&&console.log(k(i)),D(i)},I=(e,t)=>{if(t.decoupled)return t;const{name:r,references:n,ident:i,locator:o,dependencies:s,originalDependencies:A,hoistedDependencies:a,peerNames:c,reasons:u}=t,l={name:r,references:new Set(n),ident:i,locator:o,dependencies:new Map(s),originalDependencies:new Map(A),hoistedDependencies:new Map(a),peerNames:new Set(c),reasons:new Map(u),decoupled:!0},h=l.dependencies.get(r);return h&&h.ident==l.ident&&l.dependencies.set(r,l),e.dependencies.set(l.name,l),l},m=(e,t,r,n,i=new Set)=>{if(i.has(t))return;i.add(t);const o=((e,t)=>{const r=new Map([[e.name,[e.ident]]]);for(const t of e.dependencies.values())e.peerNames.has(t.name)||r.set(t.name,[t.ident]);const n=Array.from(t.keys());n.sort((e,r)=>t.get(r).size-t.get(e).size);for(const t of n){const n=t.substring(0,t.indexOf("@",1)),i=t.substring(n.length+1);if(!e.peerNames.has(n)){let e=r.get(n);e||(e=[],r.set(n,e)),e.indexOf(i)<0&&e.push(i)}}return r})(t,b(t)),s=new Set(Array.from(o.values()).map(e=>e[0])),A=t===e?new Map:(e=>{const t=new Map,r=new Set,n=i=>{if(!r.has(i)){r.add(i);for(const r of i.hoistedDependencies.values())e.dependencies.has(r.name)||t.set(r.name,r);for(const e of i.dependencies.values())i.peerNames.has(e.name)||n(e)}};return n(e),t})(t);let a;do{w(e,t,r,A,s,o,n),a=!1;for(const[e,r]of o)r.length>1&&!t.dependencies.has(e)&&(s.delete(r[0]),r.shift(),s.add(r[0]),a=!0)}while(a);for(const i of t.dependencies.values())t.peerNames.has(i.name)||r.has(i.locator)||(r.add(i.locator),m(e,i,r,n),r.delete(i.locator))},y=e=>{const t=new Set,r=(n,i=new Set)=>{if(!i.has(n)){i.add(n);for(const o of n.peerNames)if(!e.peerNames.has(o)){const n=e.dependencies.get(o);n&&!t.has(n)&&r(n,i)}t.add(n)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||r(t);return t},w=(e,t,r,n,i,o,s)=>{const A=new Set,a=(c,u,l,h)=>{if(A.has(l))return;let g,f;s.debugLevel>=2&&(g=""+Array.from(r).map(e=>S(e)).join("→"));let p=i.has(l.ident);if(s.debugLevel>=2&&!p&&(f=`- filled by: ${S(o.get(l.name)[0])} at ${g}`),p){let e=!0;const t=new Set(l.peerNames);for(let r=c.length-1;r>=1;r--){const n=c[r];for(const r of t){if(n.peerNames.has(r)&&n.originalDependencies.has(r))continue;const i=n.dependencies.get(r);if(i){s.debugLevel>=2&&(f=`- peer dependency ${S(i.locator)} from parent ${S(n.locator)} was not hoisted to ${g}`),e=!1;break}t.delete(r)}if(!e)break}p=e}if(p){let e=!1;const t=n.get(l.name);if(e=!t||t.ident===l.ident,s.debugLevel>=2&&!e&&(f=`- filled by: ${S(t.locator)} at ${g}`),e)for(let t=1;t=2&&(f=`- filled by: ${S(n.locator)} at ${S(r.locator)}`);break}}p=e}if(p){const r=c[c.length-1];r.dependencies.delete(l.name),r.hoistedDependencies.set(l.name,l),r.reasons.delete(l.name);const n=t.dependencies.get(l.name);if(n)for(const e of l.references)n.references.add(e);else t.ident!==l.ident&&(t.dependencies.set(l.name,l),h.add(l));if(s.check){const r=B(e);if(r)throw new Error(`${r}, after hoisting ${[t,...c,l].map(e=>S(e.locator)).join("→")}:\n${k(e)}`)}}else if(s.debugLevel>=2){c[c.length-1].reasons.set(l.name,f)}if(!p&&u.indexOf(l.locator)<0){const e=I(c[c.length-1],l);A.add(e);for(const t of y(l))a([...c,e],[...u,l.locator],t,h);A.delete(e)}};let c,u=new Set(t.dependencies.values());do{c=u,u=new Set;for(const e of c){if(t.peerNames.has(e.name)||e.locator===t.locator)continue;const r=I(t,e);A.add(r);for(const n of y(e))n.locator!==e.locator&&a([t,r],[t.locator,e.locator],n,u);A.delete(r)}}while(u.size>0)},B=e=>{const t=[],r=new Set,n=new Set,i=(e,o)=>{if(r.has(e))return;if(r.add(e),n.has(e))return;const s=new Map(o);for(const t of e.dependencies.values())e.peerNames.has(t.name)||s.set(t.name,t);for(const r of e.originalDependencies.values()){const i=s.get(r.name),A=()=>""+Array.from(n).concat([e]).map(e=>S(e.locator)).join("→");if(e.peerNames.has(r.name)){const e=o.get(r.name);e!==i&&t.push(`${A()} - broken peer promise: expected ${i.locator} but found ${e?e.locator:e}`)}else i?i.ident!==r.ident&&t.push(`${A()} - broken require promise for ${r.name}: expected ${r.ident}, but found: ${i.ident}`):t.push(`${A()} - broken require promise: no required dependency ${r.locator} found`)}n.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||i(t,s);n.delete(e)};return i(e,e.dependencies),t.join("\n")},Q=e=>{const{identName:t,name:r,reference:n,peerNames:i}=e,o={name:r,references:new Set([n]),locator:d(t,n),ident:C(t,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(i),reasons:new Map,decoupled:!0},s=new Map([[e,o]]),A=(e,t)=>{let r=s.get(e);const n=!!r;if(!r){const{name:t,identName:n,reference:i,peerNames:o}=e;r={name:t,references:new Set([i]),locator:d(n,i),ident:C(n,i),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(o),reasons:new Map,decoupled:!0},s.set(e,r)}if(t.dependencies.set(e.name,r),t.originalDependencies.set(e.name,r),n){const e=new Set,t=r=>{if(!e.has(r)){e.add(r),r.decoupled=!1;for(const e of r.dependencies.values())r.peerNames.has(e.name)||t(e)}};t(r)}else for(const t of e.dependencies)A(t,r)};for(const t of e.dependencies)A(t,o);return o},v=e=>e.substring(0,e.indexOf("@",1)),D=e=>{const t={name:e.name,identName:v(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),n=(e,t,i)=>{const o=r.has(e);let s;if(t===e)s=i;else{const{name:t,references:r,locator:n}=e;s={name:t,identName:v(n),references:r,dependencies:new Set}}if(i.dependencies.add(s),!o){r.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(t,e,s);r.delete(e)}};for(const r of e.dependencies.values())n(r,e,t);return t},b=e=>{const t=new Map,r=new Set([e]),n=(e,i)=>{const o=!!r.has(i),s=(e=>`${e.name}@${e.ident}`)(i);let A=t.get(s);if(A||(A=new Set,t.set(s,A)),A.add(e.ident),!o){r.add(i);for(const e of i.dependencies.values())i.peerNames.has(e.name)||n(i,e)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(e,t);return t},S=e=>{const t=e.indexOf("@",1),r=e.substring(0,t),n=e.substring(t+1);if("workspace:."===n)return".";if(n){const e=(n.indexOf("#")>0?n.split("#")[1]:n).replace("npm:","");return n.startsWith("virtual")?`v:${r}@${e}`:`${r}@${e}`}return""+r},k=e=>{let t=0;const r=(e,n,i="")=>{if(t>5e4||n.has(e))return"";t++;const o=Array.from(e.dependencies.values());let s="";n.add(e);for(let t=0;t":"")+(c!==A.name?`a:${A.name}:`:"")+S(A.locator)+(a?" "+a:"")}\n`,s+=r(A,n,`${i}${t5e4?"\nTree is too large, part of the tree has been dunped\n":"")};var x;!function(e){e.HARD="HARD",e.SOFT="SOFT"}(x||(x={}));const F=(0,n.Zu)("node_modules"),M=(e,t)=>{const r=R(e,t),n=E(r);return L(e,n,t)},N=e=>`${e.name}@${e.reference}`;const R=(e,t)=>{const r=e.getDependencyTreeRoots(),n=e.getPackageInformation(e.topLevel);if(null===n)throw new Error("Assertion failed: Expected the top-level package to have been registered");const i=e.findPackageLocator(n.packageLocation);if(null===i)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");for(const e of r)e.name===i.name&&e.reference===i.reference||n.packageDependencies.set(e.name+"$wsroot$",e.reference);const o={name:i.name,identName:i.name,reference:i.reference,peerNames:n.packagePeers,dependencies:new Set},s=new Map,a=(r,n,c,u,l)=>{const h=((e,t)=>`${N(t)}:${e}`)(r,c);let g=s.get(h);const f=!!g;f||c.name!==i.name||c.reference!==i.reference||(g=o,s.set(h,o)),g||(g={name:r,identName:c.name,reference:c.reference,dependencies:new Set,peerNames:n.packagePeers},s.set(h,g)),u.dependencies.add(g);const p=t.pnpifyFs||!function(e){let t=A.structUtils.parseDescriptor(e);return A.structUtils.isVirtualDescriptor(t)&&(t=A.structUtils.devirtualizeDescriptor(t)),t.range.startsWith("portal:")}(h);if(!f&&p)for(const[t,r]of n.packageDependencies)if(null!==r&&!g.peerNames.has(t)){const i=e.getLocator(t,r),o=e.getLocator(t.replace("$wsroot$",""),r),s=e.getPackageInformation(o);if(null===s)throw new Error("Assertion failed: Expected the package to have been registered");if(i.name===c.name&&i.reference===c.reference)continue;a(t,s,i,g,n)}};return a(i.name,n,i,o,n),o};const L=(e,t,r)=>{const i=new Map,o=(t,i)=>{const{linkType:o,target:s}=function(e,t,r){const i=t.getLocator(e.name.replace("$wsroot$",""),e.reference),o=t.getPackageInformation(i);if(null===o)throw new Error("Assertion failed: Expected the package to be registered");let s,A;if(r.pnpifyFs)A=n.cS.toPortablePath(o.packageLocation),s=x.SOFT;else{const r=t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(o.packageLocation):o.packageLocation;A=n.cS.toPortablePath(r||o.packageLocation),s=o.linkType}return{linkType:s,target:A}}(t,e,r);return{locator:N(t),target:s,linkType:o,aliases:i}},s=e=>{const[t,r]=e.split("/");return r?{scope:(0,n.Zu)(t),name:(0,n.Zu)(r)}:{scope:null,name:(0,n.Zu)(t)}},a=new Set,c=(e,t)=>{if(!a.has(e)){a.add(e);for(const r of e.dependencies){if(r===e)continue;const a=Array.from(r.references).sort(),u={name:r.identName,reference:a[0]},{name:l,scope:h}=s(r.name),g=h?[h,l]:[l],f=n.y1.join(t,F),p=n.y1.join(f,...g),d=o(u,a.slice(1));if(!r.name.endsWith("$wsroot$")){const e=i.get(p);if(e){if(e.dirList)throw new Error(`Assertion failed: ${p} cannot merge dir node with leaf node`);{const t=A.structUtils.parseLocator(e.locator),r=A.structUtils.parseLocator(d.locator);if(e.linkType!==d.linkType)throw new Error(`Assertion failed: ${p} cannot merge nodes with different link types`);if(t.identHash!==r.identHash)throw new Error(`Assertion failed: ${p} cannot merge nodes with different idents ${A.structUtils.stringifyLocator(t)} and ${A.structUtils.stringifyLocator(r)}`);d.aliases=[...d.aliases,...e.aliases,A.structUtils.parseLocator(e.locator).reference]}}i.set(p,d);const t=p.split("/"),r=t.indexOf(F);let o=t.length-1;for(;r>=0&&o>r;){const e=n.cS.toPortablePath(t.slice(0,o).join(n.y1.sep)),r=(0,n.Zu)(t[o]),s=i.get(e);if(s){if(s.dirList){if(s.dirList.has(r))break;s.dirList.add(r)}}else i.set(e,{dirList:new Set([r])});o--}}c(r,d.linkType===x.SOFT?d.target:p)}}},u=o({name:t.name,reference:Array.from(t.references)[0]},[]),l=u.target;return i.set(l,u),c(t,l),i};var K=r(88563),T=r(58069),_=r.n(T),P=r(17278),O=r(35747),U=r.n(O);const j="node_modules";class Y extends p.AbstractPnpInstaller{constructor(){super(...arguments),this.manifestCache=new Map}async getBuildScripts(e,t,r){return[]}async transformPackage(e,t,r,n,i){return r.packageFs}async finalizeInstallWithPnp(e){if("node-modules"!==this.opts.project.configuration.get("nodeLinker"))return;const t=new u.p({baseFs:new l.A({libzip:await(0,g.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})});let r=await G(this.opts.project);if(null===r){const e=this.opts.project.configuration.get("bstatePath");await h.xfs.existsPromise(e)&&await h.xfs.unlinkPromise(e),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map}}const s=(0,K.oC)(e,this.opts.project.cwd,t),a=(e=>{const t=new Map;for(const[r,n]of e.entries())if(!n.dirList){let e=t.get(n.locator);e||(e={target:n.target,linkType:n.linkType,locations:[],aliases:n.aliases},t.set(n.locator,e)),e.locations.push(r)}for(const e of t.values())e.locations=e.locations.sort((e,t)=>{const r=e.split(n.y1.delimiter).length,i=t.split(n.y1.delimiter).length;return r!==i?i-r:t.localeCompare(e)});return t})(M(s,{pnpifyFs:!1}));await async function(e,t,{baseFs:r,project:i,report:s,loadManifest:A}){const a=n.y1.join(i.cwd,j),{locationTree:u,binSymlinks:l}=function(e,t){const r=new Map([...e]),i=new Map([...t]);for(const[t,r]of e){const e=n.y1.join(t,j);if(!h.xfs.existsSync(e)){r.children.delete(j);for(const t of i.keys())null!==n.y1.contains(e,t)&&i.delete(t)}}return{locationTree:r,binSymlinks:i}}(e.locationTree,e.binSymlinks),g=z(t,{skipPrefix:i.cwd}),f=[],p=async({srcDir:e,dstDir:t,linkType:i})=>{const s=(async()=>{try{i===o.U.SOFT?(await h.xfs.mkdirpPromise(n.y1.dirname(t)),await q(n.y1.resolve(e),t)):await W(t,e,{baseFs:r})}catch(r){throw r.message=`While persisting ${e} -> ${t} ${r.message}`,r}finally{m.tick()}})().then(()=>f.splice(f.indexOf(s),1));f.push(s),f.length>4&&await Promise.race(f)},d=async(e,t,r)=>{const i=(async()=>{const i=async(e,t,r)=>{try{r&&r.innerLoop||await h.xfs.mkdirpPromise(t);const o=await h.xfs.readdirPromise(e,{withFileTypes:!0});for(const s of o){if(!(r&&r.innerLoop||".bin"!==s.name))continue;const o=n.y1.join(e,s.name),A=n.y1.join(t,s.name);s.isDirectory()?(s.name!==j||r&&r.innerLoop)&&(await h.xfs.mkdirpPromise(A),await i(o,A,{innerLoop:!0})):await h.xfs.copyFilePromise(o,A,U().constants.COPYFILE_FICLONE)}}catch(n){throw r&&r.innerLoop||(n.message=`While cloning ${e} -> ${t} ${n.message}`),n}finally{r&&r.innerLoop||m.tick()}};await i(e,t,r)})().then(()=>f.splice(f.indexOf(i),1));f.push(i),f.length>4&&await Promise.race(f)},C=async(e,t,r)=>{if(r)for(const[i,o]of t.children){const t=r.children.get(i);await C(n.y1.join(e,i),o,t)}else t.children.has(j)&&await J(n.y1.join(e,j),{contentsOnly:!1}),await J(e,{contentsOnly:e===a})};for(const[e,t]of u){const r=g.get(e);for(const[i,o]of t.children){if("."===i)continue;const t=r?r.children.get(i):r;await C(n.y1.join(e,i),o,t)}}const E=async(e,t,r)=>{if(r){X(t.locator,r.locator)||await J(e,{contentsOnly:t.linkType===o.U.HARD});for(const[i,o]of t.children){const t=r.children.get(i);await E(n.y1.join(e,i),o,t)}}else t.children.has(j)&&await J(n.y1.join(e,j),{contentsOnly:!0}),await J(e,{contentsOnly:t.linkType===o.U.HARD})};for(const[e,t]of g){const r=u.get(e);for(const[i,o]of t.children){if("."===i)continue;const t=r?r.children.get(i):r;await E(n.y1.join(e,i),o,t)}}const I=[];for(const[r,{locations:o}]of e.locatorMap.entries())for(const e of o){const{locationRoot:o,segments:s}=H(e,{skipPrefix:i.cwd});let A=g.get(o),a=o;if(A){for(const e of s)if(a=n.y1.join(a,e),A=A.children.get(e),!A)break;if(A&&!X(A.locator,r)){const e=t.get(A.locator),r=e.target,n=a,i=e.linkType;r!==n&&I.push({srcDir:r,dstDir:n,linkType:i})}}}for(const[e,{locations:r}]of t.entries())for(const o of r){const{locationRoot:r,segments:s}=H(o,{skipPrefix:i.cwd});let A=u.get(r),a=g.get(r),c=r;const l=t.get(e),h=l.target,f=o;if(h===f)continue;const p=l.linkType;for(const e of s)a=a.children.get(e);if(A){for(const e of s)if(c=n.y1.join(c,e),A=A.children.get(e),!A){I.push({srcDir:h,dstDir:f,linkType:p});break}}else I.push({srcDir:h,dstDir:f,linkType:p})}const m=c.yG.progressViaCounter(I.length),y=s.reportProgress(m);try{const e=new Map;for(const t of I)t.linkType!==o.U.SOFT&&e.has(t.srcDir)||(e.set(t.srcDir,t.dstDir),await p({...t}));await Promise.all(f),f.length=0;for(const t of I){const r=e.get(t.srcDir);t.linkType!==o.U.SOFT&&t.dstDir!==r&&await d(r,t.dstDir)}await Promise.all(f),await h.xfs.mkdirpPromise(a);const r=await async function(e,t,r,{loadManifest:i}){const o=new Map;for(const[t,{locations:r}]of e){const e=V(t)?null:await i(r[0]),s=new Map;if(e)for(const[t,i]of e.bin){const e=n.y1.join(r[0],i);""!==i&&h.xfs.existsSync(e)&&s.set(t,i)}o.set(t,s)}const s=new Map,A=(e,t,i)=>{const a=new Map,c=n.y1.contains(r,e);if(i.locator&&null!==c){const t=o.get(i.locator);for(const[r,i]of t){const t=n.y1.join(e,n.cS.toPortablePath(i));a.set((0,n.Zu)(r),t)}for(const[t,r]of i.children){const i=n.y1.join(e,t),o=A(i,i,r);o.size>0&&s.set(e,new Map([...s.get(e)||new Map,...o]))}}else for(const[r,o]of i.children){const i=A(n.y1.join(e,r),t,o);for(const[e,t]of i)a.set(e,t)}return a};for(const[e,r]of t){const t=A(e,e,r);t.size>0&&s.set(e,new Map([...s.get(e)||new Map,...t]))}return s}(t,g,i.cwd,{loadManifest:A});await async function(e,t){for(const r of e.keys())if(!t.has(r)){const e=n.y1.join(r,j,".bin");await h.xfs.removePromise(e)}for(const[r,i]of t){const t=n.y1.join(r,j,".bin"),o=e.get(r)||new Map;await h.xfs.mkdirpPromise(t);for(const e of o.keys())i.has(e)||(await h.xfs.removePromise(n.y1.join(t,e)),"win32"===process.platform&&await h.xfs.removePromise(n.y1.join(t,(0,n.Zu)(e+".cmd"))));for(const[e,r]of i){const i=o.get(e),s=n.y1.join(t,e);i!==r&&("win32"===process.platform?await _()(n.cS.fromPortablePath(r),n.cS.fromPortablePath(s),{createPwshFile:!1}):(await h.xfs.removePromise(s),await q(r,s),await h.xfs.chmodPromise(r,493)))}}}(l,r),await async function(e,t,r){let i="";i+="# Warning: This file is automatically generated. Removing it is fine, but will\n",i+="# cause your node_modules installation to become invalidated.\n",i+="\n",i+="__metadata:\n",i+=" version: 1\n";const o=Array.from(t.keys()).sort();for(const s of o){const o=t.get(s);i+="\n",i+=JSON.stringify(s)+":\n",i+=" locations:\n";let A=!1;for(const t of o.locations){const r=n.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);i+=` - ${JSON.stringify(r)}\n`,t===e.cwd&&(A=!0)}if(o.aliases.length>0){i+=" aliases:\n";for(const e of o.aliases)i+=` - ${JSON.stringify(e)}\n`}if(A&&r.size>0){i+=" bin:\n";for(const[t,o]of r){const r=n.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);i+=` ${JSON.stringify(r)}:\n`;for(const[e,r]of o){const o=n.y1.relative(n.y1.join(t,j),r);i+=` ${JSON.stringify(e)}: ${JSON.stringify(o)}\n`}}}}const s=e.cwd,A=n.y1.join(s,j,".yarn-state.yml");await h.xfs.changeFilePromise(A,i,{automaticNewlines:!0})}(i,t,r)}finally{y.stop()}}(r,a,{baseFs:t,project:this.opts.project,report:this.opts.report,loadManifest:this.cachedManifestLoad.bind(this)});const f=[];for(const[e,t]of a.entries()){if(V(e))continue;const r=A.structUtils.parseLocator(e),a={name:A.structUtils.stringifyIdent(r),reference:r.reference};if(null===s.getPackageInformation(a))throw new Error(`Assertion failed: Expected the package to be registered (${A.structUtils.prettyLocator(this.opts.project.configuration,r)})`);const c=n.cS.toPortablePath(t.locations[0]),u=await this.cachedManifestLoad(c),l=await this.getSourceBuildScripts(c,u);l.length>0&&!this.opts.project.configuration.get("enableScripts")&&(this.opts.report.reportWarningOnce(i.b.DISABLED_BUILD_SCRIPTS,A.structUtils.prettyLocator(this.opts.project.configuration,r)+" lists build scripts, but all build scripts have been disabled."),l.length=0),l.length>0&&t.linkType!==o.U.HARD&&!this.opts.project.tryWorkspaceByLocator(r)&&(this.opts.report.reportWarningOnce(i.b.SOFT_LINK_BUILD,A.structUtils.prettyLocator(this.opts.project.configuration,r)+" lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored."),l.length=0);const h=this.opts.project.getDependencyMeta(r,u.version);l.length>0&&h&&!1===h.built&&(this.opts.report.reportInfoOnce(i.b.BUILD_DISABLED,A.structUtils.prettyLocator(this.opts.project.configuration,r)+" lists build scripts, but its build has been explicitly disabled through configuration."),l.length=0),l.length>0&&f.push({buildLocations:t.locations,locatorHash:r.locatorHash,buildDirective:l})}return f}async cachedManifestLoad(e){let t=this.manifestCache.get(e);if(t)return t;try{t=await a.G.find(e)}catch(t){throw t.message=`While loading ${e}: ${t.message}`,t}return this.manifestCache.set(e,t),t}async getSourceBuildScripts(e,t){const r=[],{scripts:i}=t;for(const e of["preinstall","install","postinstall"])i.has(e)&&r.push([s.k.SCRIPT,e]);const o=n.y1.resolve(e,(0,n.Zu)("binding.gyp"));return!i.has("install")&&h.xfs.existsSync(o)&&r.push([s.k.SHELLCODE,"node-gyp rebuild"]),r}}async function G(e,{unrollAliases:t=!1}={}){const r=e.cwd,i=n.y1.join(r,j,".yarn-state.yml");if(!h.xfs.existsSync(i))return null;const s=(0,f.parseSyml)(await h.xfs.readFilePromise(i,"utf8"));if(s.__metadata.version>1)return null;const a=new Map,c=new Map;delete s.__metadata;for(const[e,i]of Object.entries(s)){const s=i.locations.map(e=>n.y1.join(r,e)),u=i.bin;if(u)for(const[e,t]of Object.entries(u)){const i=n.y1.join(r,n.cS.toPortablePath(e)),o=A.miscUtils.getMapWithDefault(c,i);for(const[e,r]of Object.entries(t))o.set((0,n.Zu)(e),n.cS.toPortablePath([i,j,r].join(n.y1.delimiter)))}if(a.set(e,{target:n.LZ.dot,linkType:o.U.HARD,locations:s,aliases:i.aliases||[]}),t&&i.aliases)for(const t of i.aliases){const{scope:r,name:i}=A.structUtils.parseLocator(e),c=A.structUtils.makeLocator(A.structUtils.makeIdent(r,i),t),u=A.structUtils.stringifyLocator(c);a.set(u,{target:n.LZ.dot,linkType:o.U.HARD,locations:s,aliases:[]})}}return{locatorMap:a,binSymlinks:c,locationTree:z(a,{skipPrefix:e.cwd})}}const J=async(e,t)=>{if(e.split(n.y1.sep).indexOf(j)<0)throw new Error("Assertion failed: trying to remove dir that doesn't contain node_modules: "+e);try{if(!t.innerLoop){if((await h.xfs.lstatPromise(e)).isSymbolicLink())return void await h.xfs.unlinkPromise(e)}const r=await h.xfs.readdirPromise(e,{withFileTypes:!0});for(const i of r){const r=n.y1.join(e,(0,n.Zu)(i.name));i.isDirectory()?(i.name!==j||t&&t.innerLoop)&&await J(r,{innerLoop:!0,contentsOnly:!1}):await h.xfs.unlinkPromise(r)}t.contentsOnly||await h.xfs.rmdirPromise(e)}catch(e){if("ENOENT"!==e.code&&"ENOTEMPTY"!==e.code)throw e}},H=(e,{skipPrefix:t})=>{const r=n.y1.contains(t,e);if(null===r)throw new Error(`Assertion failed: Cannot process a path that isn't part of the requested prefix (${e} isn't within ${t})`);const i=r.split(n.y1.sep),o=i.indexOf(j),s=i.slice(0,o).join(n.y1.sep);return{locationRoot:n.y1.join(t,s),segments:i.slice(o)}},z=(e,{skipPrefix:t})=>{const r=new Map;if(null===e)return r;const i=()=>({children:new Map,linkType:o.U.HARD});for(const[s,a]of e.entries()){if(a.linkType===o.U.SOFT){if(null!==n.y1.contains(t,a.target)){const e=A.miscUtils.getFactoryWithDefault(r,a.target,i);e.locator=s,e.linkType=a.linkType}}for(const e of a.locations){const{locationRoot:n,segments:o}=H(e,{skipPrefix:t});let c=A.miscUtils.getFactoryWithDefault(r,n,i);for(let e=0;eh.xfs.symlinkPromise("win32"!==process.platform?n.y1.relative(n.y1.dirname(t),e):e,t,"win32"===process.platform?"junction":void 0),W=async(e,t,{baseFs:r,innerLoop:i})=>{await h.xfs.mkdirpPromise(e);const o=await r.readdirPromise(t,{withFileTypes:!0}),s=async(e,t,i)=>{if(i.isFile()){const n=await r.lstatPromise(t);await r.copyFilePromise(t,e);const i=511&n.mode;420!==i&&await h.xfs.chmodPromise(e,i)}else{if(!i.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${await h.xfs.statSync(t).mode.toString(8).padStart(6,"0")})`);{const i=await r.readlinkPromise(t);await q(n.y1.resolve(t,i),e)}}};for(const A of o){const o=n.y1.join(t,(0,n.Zu)(A.name)),a=n.y1.join(e,(0,n.Zu)(A.name));A.isDirectory()?(A.name!==j||i)&&await W(a,o,{baseFs:r,innerLoop:!0}):await s(a,o,A)}};function V(e){let t=A.structUtils.parseDescriptor(e);return A.structUtils.isVirtualDescriptor(t)&&(t=A.structUtils.devirtualizeDescriptor(t)),t.range.startsWith("link:")}const X=(e,t)=>{if(!e||!t)return e===t;let r=A.structUtils.parseLocator(e);A.structUtils.isVirtualLocator(r)&&(r=A.structUtils.devirtualizeLocator(r));let n=A.structUtils.parseLocator(t);return A.structUtils.isVirtualLocator(n)&&(n=A.structUtils.devirtualizeLocator(n)),A.structUtils.areLocatorsEqual(r,n)};class Z extends p.PnpLinker{constructor(){super(...arguments),this.mode="loose"}makeInstaller(e){return new $(e)}}class $ extends p.PnpInstaller{constructor(){super(...arguments),this.mode="loose"}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=new u.p({baseFs:new l.A({libzip:await(0,g.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})}),r=(0,K.oC)(e,this.opts.project.cwd,t),i=M(r,{pnpifyFs:!1}),o=new Map;e.fallbackPool=o;const s=(e,t)=>{const r=A.structUtils.parseLocator(t.locator),n=A.structUtils.stringifyIdent(r);n===e?o.set(e,r.reference):o.set(e,[n,r.reference])},a=n.y1.join(this.opts.project.cwd,n.QS.nodeModules),c=i.get(a);if(void 0===c)throw new Error("Assertion failed: Expected a root junction point");if("target"in c)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(const e of c.dirList){const t=n.y1.join(a,e),r=i.get(t);if(void 0===r)throw new Error("Assertion failed: Expected the child to have been registered");if("target"in r)s(e,r);else for(const o of r.dirList){const r=n.y1.join(t,o),A=i.get(r);if(void 0===A)throw new Error("Assertion failed: Expected the subchild to have been registered");if(!("target"in A))throw new Error("Assertion failed: Expected the leaf junction to be a package");s(`${e}/${o}`,A)}}return super.finalizeInstallWithPnp(e)}}const ee=e=>n.y1.join(e.cwd,".pnp.js"),te={linkers:[class{supportsPackage(e,t){return"node-modules"===t.project.configuration.get("nodeLinker")}async findPackageLocation(e,t){const r=t.project.tryWorkspaceByLocator(e);if(r)return r.cwd;const n=await G(t.project,{unrollAliases:!0});if(null===n)throw new P.UsageError("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");const i=n.locatorMap.get(A.structUtils.stringifyLocator(e));if(!i)throw new P.UsageError(`Couldn't find ${A.structUtils.prettyLocator(t.project.configuration,e)} in the currently installed node_modules map - running an install might help`);return i.locations[0]}async findPackageLocator(e,t){const r=await G(t.project,{unrollAliases:!0});if(null===r)return null;const{locationRoot:i,segments:o}=H(n.y1.resolve(e),{skipPrefix:t.project.cwd});let s=r.locationTree.get(i);if(!s)return null;let a=s.locator;for(const e of o){if(s=s.children.get(e),!s)break;a=s.locator||a}return A.structUtils.parseLocator(a)}makeInstaller(e){return new Y({...e,skipIncompatiblePackageLinking:!0})}},Z]}},94573:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F});var n=r(27122),i=r(36370),o=r(95397),s=r(40376),A=r(84132),a=r(35691),c=r(15815),u=r(92659),l=r(86717),h=r(17278),g=r(85622),f=r.n(g),p=r(10966),d=r.n(p),C=r(31669);class E extends o.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t}=await s.I.find(e,this.context.cwd),r=void 0!==this.fields?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,i=[];let o=!1;const g=await c.P.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async n=>{for(const s of this.packages){let c;if("."===s){const e=t.topLevelWorkspace;if(!e.manifest.name)throw new h.UsageError("Missing 'name' field in "+f().join(e.cwd,"package.json"));c=A.structUtils.makeDescriptor(e.manifest.name,"unknown")}else c=A.structUtils.parseDescriptor(s);const g=l.npmHttpUtils.getIdentUrl(c);let p;try{p=I(await l.npmHttpUtils.get(g,{configuration:e,ident:c,json:!0}))}catch(e){throw"HTTPError"!==e.name?e:404===e.response.statusCode?new a.lk(u.b.EXCEPTION,"Package not found"):new a.lk(u.b.EXCEPTION,e.toString())}const C=Object.keys(p.versions).sort(d().compareLoose);let E=p["dist-tags"].latest||C[C.length-1];if(d().validRange(c.range)){const t=d().maxSatisfying(C,c.range);null!==t?E=t:(n.reportWarning(u.b.UNNAMED,`Unmet range ${A.structUtils.prettyRange(e,c.range)}; falling back to the latest version`),o=!0)}else"unknown"!==c.range&&(n.reportWarning(u.b.UNNAMED,`Invalid range ${A.structUtils.prettyRange(e,c.range)}; falling back to the latest version`),o=!0);const m=p.versions[E],y={...p,...m,version:E,versions:C};let w;if(null!==r){w={};for(const t of r){const r=y[t];void 0!==r?w[t]=r:(n.reportWarning(u.b.EXCEPTION,`The '${t}' field doesn't exist inside ${A.structUtils.prettyIdent(e,c)}'s informations`),o=!0)}}else this.json||(delete y.dist,delete y.readme,delete y.users),w=y;n.reportJson(w),this.json||i.push(w)}});C.inspect.styles.name="cyan";for(const e of i)(e!==i[0]||o)&&this.context.stdout.write("\n"),this.context.stdout.write((0,C.inspect)(e,{depth:1/0,colors:!0,compact:!1})+"\n");return g.exitCode()}}function I(e){if(Array.isArray(e)){const t=[];for(let r of e)r=I(r),r&&t.push(r);return t}if("object"==typeof e&&null!==e){const t={};for(const r of Object.keys(e)){if(r.startsWith("_"))continue;const n=I(e[r]);n&&(t[r]=n)}return t}return e||null}E.usage=h.Command.Usage({description:"show information about a package",details:"\n This command will fetch information about a package from the npm registry, and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@` to the package argument to provide information specific to the latest version that satisfies the range. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package informations.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react 16.12.0","yarn npm info react@16.12.0"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]}),(0,i.gn)([h.Command.Rest()],E.prototype,"packages",void 0),(0,i.gn)([h.Command.String("-f,--fields")],E.prototype,"fields",void 0),(0,i.gn)([h.Command.Boolean("--json")],E.prototype,"json",void 0),(0,i.gn)([h.Command.Path("npm","info")],E.prototype,"execute",null);var m=r(9494),y=r.n(m);class w extends o.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),t=y().createPromptModule({input:this.context.stdin,output:this.context.stdout}),r=await B({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await c.P.start({configuration:e,stdout:this.context.stdout},async i=>{const o=await async function(e,{registry:t,report:r}){if(process.env.TEST_ENV)return{name:process.env.TEST_NPM_USER||"",password:process.env.TEST_NPM_PASSWORD||""};r.reportInfo(u.b.UNNAMED,"Logging in to "+t);let n=!1;t.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(u.b.UNNAMED,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0);r.reportSeparator();const{username:i,password:o}=await e([{type:"input",name:"username",message:"Username:",validate:e=>Q(e,"Username")},{type:"password",name:"password",message:n?"Token:":"Password:",validate:e=>Q(e,"Password")}]);return r.reportSeparator(),{name:i,password:o}}(t,{registry:r,report:i}),s="/-/user/org.couchdb.user:"+encodeURIComponent(o.name),A=await l.npmHttpUtils.put(s,o,{attemptedAs:o.name,configuration:e,registry:r,json:!0,authType:l.npmHttpUtils.AuthType.NO_AUTH});return await async function(e,t,{configuration:r}){return await n.VK.updateHomeConfiguration({npmRegistries:(r={})=>({...r,[e]:{...r[e],npmAuthToken:t}})})}(r,A.token,{configuration:e}),i.reportInfo(u.b.UNNAMED,"Successfully logged in")})).exitCode()}}async function B({scope:e,publish:t,configuration:r,cwd:n}){return e&&t?l.npmConfigUtils.getScopeRegistry(e,{configuration:r,type:l.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):e?l.npmConfigUtils.getScopeRegistry(e,{configuration:r}):t?l.npmConfigUtils.getPublishRegistry((await(0,o.openWorkspace)(r,n)).manifest,{configuration:r}):l.npmConfigUtils.getDefaultRegistry({configuration:r})}function Q(e,t){return e.length>0||t+" is required"}w.usage=h.Command.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]}),(0,i.gn)([h.Command.String("-s,--scope")],w.prototype,"scope",void 0),(0,i.gn)([h.Command.Boolean("--publish")],w.prototype,"publish",void 0),(0,i.gn)([h.Command.Path("npm","login")],w.prototype,"execute",null);class v extends o.BaseCommand{constructor(){super(...arguments),this.publish=!1,this.all=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),t=this.all?null:await B({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await c.P.start({configuration:e,stdout:this.context.stdout},async e=>(await async function(e){return await n.VK.updateHomeConfiguration({npmRegistries:(t={})=>null===e?void 0:{...t,[e]:void 0}})}(t),e.reportInfo(u.b.UNNAMED,"Successfully logged out of "+(null===t?"all registries":t))))).exitCode()}}v.usage=h.Command.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the registry linked to the @my-scope registry","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of the publish registry for the current package linked to the @my-scope registry","yarn npm logout --publish --scope my-scope"],["Logout of all registries","yarn npm logout --all"]]}),(0,i.gn)([h.Command.String("-s,--scope")],v.prototype,"scope",void 0),(0,i.gn)([h.Command.Boolean("--publish")],v.prototype,"publish",void 0),(0,i.gn)([h.Command.Boolean("-A,--all")],v.prototype,"all",void 0),(0,i.gn)([h.Command.Path("npm","logout")],v.prototype,"execute",null);var D=r(5973),b=r(76417),S=r(10129);class k extends o.BaseCommand{constructor(){super(...arguments),this.tag="latest",this.tolerateRepublish=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await s.I.find(e,this.context.cwd);if(!r)throw new o.WorkspaceRequiredError(t.cwd,this.context.cwd);if(r.manifest.private)throw new h.UsageError("Private workspaces cannot be published");if(null===r.manifest.name||null===r.manifest.version)throw new h.UsageError("Workspaces must have valid names and versions to be published on an external registry");await t.restoreInstallState();const i=r.manifest.name,g=r.manifest.version,f=l.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});return(await c.P.start({configuration:e,stdout:this.context.stdout},async t=>{if(this.tolerateRepublish)try{const r=await l.npmHttpUtils.get(l.npmHttpUtils.getIdentUrl(i),{configuration:e,registry:f,ident:i,json:!0});if(!Object.prototype.hasOwnProperty.call(r,"versions"))throw new a.lk(u.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(r.versions,g))return void t.reportWarning(u.b.UNNAMED,`Registry already knows about version ${g}; skipping.`)}catch(e){if("HTTPError"!==e.name)throw e;if(404!==e.response.statusCode)throw new a.lk(u.b.NETWORK_ERROR,`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`)}await D.packUtils.prepareForPack(r,{report:t},async()=>{const n=await D.packUtils.genPackList(r);for(const e of n)t.reportInfo(null,e);const o=await D.packUtils.genPackStream(r,n),s=await A.miscUtils.bufferStream(o),a=await async function(e,t,{access:r,tag:n,registry:i}){const o=e.project.configuration,s=e.manifest.name,a=e.manifest.version,c=A.structUtils.stringifyIdent(s),u=(0,b.createHash)("sha1").update(t).digest("hex"),l=S.Sd(t).toString();void 0===r&&(r=e.manifest.publishConfig&&"string"==typeof e.manifest.publishConfig.access?e.manifest.publishConfig.access:null!==o.get("npmPublishAccess")?o.get("npmPublishAccess"):s.scope?"restricted":"public");const h=await D.packUtils.genPackageManifest(e),g=`${c}-${a}.tgz`,f=new URL(`${c}/-/${g}`,i);return{_id:c,_attachments:{[g]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}},name:c,access:r,"dist-tags":{[n]:a},versions:{[a]:{...h,_id:`${c}@${a}`,name:c,version:a,dist:{shasum:u,integrity:l,tarball:f.toString()}}}}}(r,s,{access:this.access,tag:this.tag,registry:f});try{await l.npmHttpUtils.put(l.npmHttpUtils.getIdentUrl(i),a,{configuration:e,registry:f,ident:i,json:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(u.b.NETWORK_ERROR,r)}}}),t.hasErrors()||t.reportInfo(u.b.UNNAMED,"Package archive published")})).exitCode()}}k.usage=h.Command.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overriden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]}),(0,i.gn)([h.Command.String("--access")],k.prototype,"access",void 0),(0,i.gn)([h.Command.String("--tag")],k.prototype,"tag",void 0),(0,i.gn)([h.Command.Boolean("--tolerate-republish")],k.prototype,"tolerateRepublish",void 0),(0,i.gn)([h.Command.Path("npm","publish")],k.prototype,"execute",null);class x extends o.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins);let t;t=this.scope&&this.publish?l.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e,type:l.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):this.scope?l.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e}):this.publish?l.npmConfigUtils.getPublishRegistry((await(0,o.openWorkspace)(e,this.context.cwd)).manifest,{configuration:e}):l.npmConfigUtils.getDefaultRegistry({configuration:e});return(await c.P.start({configuration:e,stdout:this.context.stdout},async r=>{try{const n=await l.npmHttpUtils.get("/-/whoami",{configuration:e,registry:t,authType:l.npmHttpUtils.AuthType.ALWAYS_AUTH,json:!0});r.reportInfo(u.b.UNNAMED,n.username)}catch(e){if("HTTPError"!==e.name)throw e;401===e.response.statusCode||403===e.response.statusCode?r.reportError(u.b.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired"):r.reportError(u.b.AUTHENTICATION_INVALID,e.toString())}})).exitCode()}}x.usage=h.Command.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]}),(0,i.gn)([h.Command.String("-s,--scope")],x.prototype,"scope",void 0),(0,i.gn)([h.Command.Boolean("--publish")],x.prototype,"publish",void 0),(0,i.gn)([h.Command.Path("npm","whoami")],x.prototype,"execute",null);const F={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:n.a2.STRING,default:null}},commands:[E,w,v,k,x]}},86717:(e,t,r)=>{"use strict";r.r(t),r.d(t,{npmConfigUtils:()=>n,npmHttpUtils:()=>i,default:()=>T});var n={};r.r(n),r.d(n,{RegistryType:()=>c,getAuthConfiguration:()=>y,getDefaultRegistry:()=>E,getPublishRegistry:()=>d,getRegistryConfiguration:()=>I,getScopeConfiguration:()=>m,getScopeRegistry:()=>C,normalizeRegistry:()=>p});var i={};r.r(i),r.d(i,{AuthType:()=>u,get:()=>B,getIdentUrl:()=>w,put:()=>Q});var o=r(27122),s=r(84132),A=r(10966),a=r.n(A);var c,u,l=r(35691),h=r(92659),g=r(9494),f=r.n(g);function p(e){return e.replace(/\/$/,"")}function d(e,{configuration:t}){return e.publishConfig&&e.publishConfig.registry?p(e.publishConfig.registry):e.name?C(e.name.scope,{configuration:t,type:c.PUBLISH_REGISTRY}):E({configuration:t,type:c.PUBLISH_REGISTRY})}function C(e,{configuration:t,type:r=c.FETCH_REGISTRY}){const n=m(e,{configuration:t});if(null===n)return E({configuration:t,type:r});const i=n.get(r);return null===i?E({configuration:t,type:r}):p(i)}function E({configuration:e,type:t=c.FETCH_REGISTRY}){const r=e.get(t);return p(null!==r?r:e.get(c.FETCH_REGISTRY))}function I(e,{configuration:t}){const r=t.get("npmRegistries"),n=r.get(e);if(void 0!==n)return n;const i=r.get(e.replace(/^[a-z]+:/,""));return void 0!==i?i:null}function m(e,{configuration:t}){if(null===e)return null;const r=t.get("npmScopes").get(e);return r||null}function y(e,{configuration:t,ident:r}){const n=r&&m(r.scope,{configuration:t});if((null==n?void 0:n.get("npmAuthIdent"))||(null==n?void 0:n.get("npmAuthToken")))return n;return I(e,{configuration:t})||t}function w(e){return e.scope?`/@${e.scope}%2f${e.name}`:"/"+e.name}async function B(e,{configuration:t,headers:r,ident:n,authType:i,registry:o,...A}){if(n&&void 0===o&&(o=C(n.scope,{configuration:t})),n&&n.scope&&void 0===i&&(i=u.BEST_EFFORT),"string"!=typeof o)throw new Error("Assertion failed: The registry should be a string");const a=v(o,{authType:i,configuration:t,ident:n});let c;a&&(r={...r,authorization:a});try{c=new URL(e)}catch(t){c=new URL(o+e)}try{return await s.httpUtils.get(c.href,{configuration:t,headers:r,...A})}catch(e){throw"HTTPError"!==e.name||401!==e.response.statusCode&&403!==e.response.statusCode?e:new l.lk(h.b.AUTHENTICATION_INVALID,`Invalid authentication (as ${await D(o,r,{configuration:t})})`)}}async function Q(e,t,{attemptedAs:r,configuration:n,headers:i,ident:o,authType:A=u.ALWAYS_AUTH,registry:a,...c}){if(o&&void 0===a&&(a=C(o.scope,{configuration:n})),"string"!=typeof a)throw new Error("Assertion failed: The registry should be a string");const g=v(a,{authType:A,configuration:n,ident:o});g&&(i={...i,authorization:g});try{return await s.httpUtils.put(a+e,t,{configuration:n,headers:i,...c})}catch(o){if(!function(e){if("HTTPError"!==e.name)return!1;try{return e.response.headers["www-authenticate"].split(/,\s*/).map(e=>e.toLowerCase()).includes("otp")}catch(e){return!1}}(o))throw"HTTPError"!==o.name||401!==o.response.statusCode&&403!==o.response.statusCode?o:new l.lk(h.b.AUTHENTICATION_INVALID,`Invalid authentication (${"string"!=typeof r?"as "+await D(a,i,{configuration:n}):"attempted as "+r})`);const A=await async function(){if(process.env.TEST_ENV)return process.env.TEST_NPM_2FA_TOKEN||"";const e=f().createPromptModule(),{otp:t}=await e({type:"input",name:"otp",message:"One-time password:",validate:e=>e.length>0||"One-time password is required"});return t}(),u={...i,...b(A)};try{return await s.httpUtils.put(`${a}${e}`,t,{configuration:n,headers:u,...c})}catch(e){throw"HTTPError"!==e.name||401!==e.response.statusCode&&403!==e.response.statusCode?e:new l.lk(h.b.AUTHENTICATION_INVALID,`Invalid authentication (${"string"!=typeof r?"as "+await D(a,u,{configuration:n}):"attempted as "+r})`)}}}function v(e,{authType:t=u.CONFIGURATION,configuration:r,ident:n}){const i=y(e,{configuration:r,ident:n}),o=function(e,t){switch(t){case u.CONFIGURATION:return e.get("npmAlwaysAuth");case u.BEST_EFFORT:case u.ALWAYS_AUTH:return!0;case u.NO_AUTH:return!1;default:throw new Error("Unreachable")}}(i,t);if(!o)return null;if(i.get("npmAuthToken"))return"Bearer "+i.get("npmAuthToken");if(i.get("npmAuthIdent"))return"Basic "+i.get("npmAuthIdent");if(o&&t!==u.BEST_EFFORT)throw new l.lk(h.b.AUTHENTICATION_NOT_FOUND,"No authentication configured for request");return null}async function D(e,t,{configuration:r}){if(void 0===t||void 0===t.authorization)return"an anonymous user";try{return(await s.httpUtils.get(new URL(e+"/-/whoami").href,{configuration:r,headers:t})).username}catch(e){return"an unknown user"}}function b(e){return{"npm-otp":e}}!function(e){e.FETCH_REGISTRY="npmRegistryServer",e.PUBLISH_REGISTRY="npmPublishRegistry"}(c||(c={})),function(e){e[e.NO_AUTH=0]="NO_AUTH",e[e.BEST_EFFORT=1]="BEST_EFFORT",e[e.CONFIGURATION=2]="CONFIGURATION",e[e.ALWAYS_AUTH=3]="ALWAYS_AUTH"}(u||(u={}));var S=r(78835);class k{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const r=new S.URL(e.reference);return!!a().valid(r.pathname)&&!r.searchParams.has("__archiveUrl")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,i,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote registry"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:i,prefixPath:s.structUtils.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let r;try{r=await B(k.getLocatorUrl(e),{configuration:t.project.configuration,ident:e})}catch(n){r=await B(k.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:t.project.configuration,ident:e})}return await s.tgzUtils.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.structUtils.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,t,{configuration:r}){let n=C(e.scope,{configuration:r});const i=k.getLocatorUrl(e);return t=t.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),n=n.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),(t=t.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"))===n+i||t===n+i.replace(/%2f/g,"/")}static getLocatorUrl(e){const t=a().clean(e.reference.slice("npm:".length));if(null===t)throw new l.lk(h.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");return`${w(e)}/-/${e.name}-${t}.tgz`}}var x=r(46611),F=r(32485);const M=s.structUtils.makeIdent(null,"node-gyp"),N=/\b(node-gyp|prebuild-install)\b/;var R=r(52779);const L={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:o.a2.BOOLEAN,default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:o.a2.SECRET,default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:o.a2.SECRET,default:null}},K={npmPublishRegistry:{description:"Registry to push packages to",type:o.a2.STRING,default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:o.a2.STRING,default:"https://registry.yarnpkg.com"}},T={configuration:{...L,...K,npmScopes:{description:"Settings per package scope",type:o.a2.MAP,valueDefinition:{description:"",type:o.a2.SHAPE,properties:{...L,...K}}},npmRegistries:{description:"Settings per registry",type:o.a2.MAP,normalizeKeys:p,valueDefinition:{description:"",type:o.a2.SHAPE,properties:{...L}}}},fetchers:[class{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r,params:n}=s.structUtils.parseRange(e.reference);return!!a().valid(r)&&(null!==n&&"string"==typeof n.__archiveUrl)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,i,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote server"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:i,prefixPath:s.structUtils.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){const{params:r}=s.structUtils.parseRange(e.reference);if(null===r||"string"!=typeof r.__archiveUrl)throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");const n=await B(r.__archiveUrl,{configuration:t.project.configuration,ident:e});return await s.tgzUtils.convertToZip(n,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.structUtils.getIdentVendorPath(e),stripComponents:1})}},k],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!s.structUtils.tryParseDescriptor(e.range.slice("npm:".length),!0)}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){const r=s.structUtils.parseDescriptor(e.range.slice("npm:".length),!0);return t.resolver.getResolutionDependencies(r,t)}async getCandidates(e,t,r){const n=s.structUtils.parseDescriptor(e.range.slice("npm:".length),!0);return await r.resolver.getCandidates(n,t,r)}resolve(e,t){throw new Error("Unreachable")}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!a().validRange(e.range.slice("npm:".length))}supportsLocator(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r}=s.structUtils.parseRange(e.reference);return!!a().valid(r)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const n=e.range.slice("npm:".length),i=await B(w(e),{configuration:r.project.configuration,ident:e,json:!0}),o=Object.keys(i.versions).filter(e=>a().satisfies(e,n));return o.sort((e,t)=>-a().compare(e,t)),o.map(t=>{const n=s.structUtils.makeLocator(e,"npm:"+t),o=i.versions[t].dist.tarball;return k.isConventionalTarballUrl(n,o,{configuration:r.project.configuration})?n:s.structUtils.bindLocator(n,{__archiveUrl:o})})}async resolve(e,t){const{selector:r}=s.structUtils.parseRange(e.reference),n=a().clean(r);if(null===n)throw new l.lk(h.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");const i=await B(w(e),{configuration:t.project.configuration,ident:e,json:!0});if(!Object.prototype.hasOwnProperty.call(i,"versions"))throw new l.lk(h.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(i.versions,n))throw new l.lk(h.b.REMOTE_NOT_FOUND,`Registry failed to return reference "${n}"`);const o=new x.G;if(o.load(i.versions[n]),!o.dependencies.has(M.identHash)&&!o.peerDependencies.has(M.identHash))for(const r of o.scripts.values())if(r.match(N)){o.dependencies.set(M.identHash,s.structUtils.makeDescriptor(M,"latest")),t.report.reportWarning(h.b.NODE_GYP_INJECTED,s.structUtils.prettyLocator(t.project.configuration,e)+": Implicit dependencies on node-gyp are discouraged");break}return"string"==typeof o.raw.deprecated&&t.report.reportWarning(h.b.DEPRECATED_PACKAGE,`${s.structUtils.prettyLocator(t.project.configuration,e)} is deprecated: ${o.raw.deprecated}`),{...e,version:n,languageName:"node",linkType:F.U.HARD,dependencies:o.dependencies,peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!R.c.test(e.range.slice("npm:".length))}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const n=e.range.slice("npm:".length),i=await B(w(e),{configuration:r.project.configuration,ident:e,json:!0});if(!Object.prototype.hasOwnProperty.call(i,"dist-tags"))throw new l.lk(h.b.REMOTE_INVALID,'Registry returned invalid data - missing "dist-tags" field');const o=i["dist-tags"];if(!Object.prototype.hasOwnProperty.call(o,n))throw new l.lk(h.b.REMOTE_NOT_FOUND,`Registry failed to return tag "${n}"`);const A=o[n],a=s.structUtils.makeLocator(e,"npm:"+A),c=i.versions[A].dist.tarball;return k.isConventionalTarballUrl(a,c,{configuration:r.project.configuration})?[a]:[s.structUtils.bindLocator(a,{__archiveUrl:c})]}async resolve(e,t){throw new Error("Unreachable")}}]}},5973:(e,t,r)=>{"use strict";r.r(t),r.d(t,{packUtils:()=>n,default:()=>T});var n={};r.r(n),r.d(n,{genPackList:()=>k,genPackStream:()=>b,genPackageManifest:()=>S,hasPackScripts:()=>v,prepareForPack:()=>D});var i=r(84132),o=r(35691),s=r(92659),A=r(36370),a=r(95397),c=r(27122),u=r(40376),l=r(28148),h=r(33720),g=r(15815),f=r(46009),p=r(56537),d=r(17278),C=r(10489),E=r(2401),I=r.n(E),m=r(92413),y=r(59938),w=r(78761);const B=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],Q=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function v(e){return!!await i.scriptUtils.hasWorkspaceScript(e,"prepack")||!!await i.scriptUtils.hasWorkspaceScript(e,"postpack")}async function D(e,{report:t},r){const n=new m.PassThrough,A=new m.PassThrough;if(await i.scriptUtils.hasWorkspaceScript(e,"prepack")){t.reportInfo(s.b.LIFECYCLE_SCRIPT,'Calling the "prepack" lifecycle script');if(0!==await i.scriptUtils.executeWorkspaceScript(e,"prepack",[],{stdin:null,stdout:n,stderr:A}))throw new o.lk(s.b.LIFECYCLE_SCRIPT,'Prepack script failed; run "yarn prepack" to investigate')}try{await r()}finally{if(await i.scriptUtils.hasWorkspaceScript(e,"postpack")){t.reportInfo(s.b.LIFECYCLE_SCRIPT,'Calling the "postpack" lifecycle script');0!==await i.scriptUtils.executeWorkspaceScript(e,"postpack",[],{stdin:null,stdout:n,stderr:A})&&t.reportWarning(s.b.LIFECYCLE_SCRIPT,'Postpack script failed; run "yarn postpack" to investigate')}}}async function b(e,t){void 0===t&&(t=await k(e));const r=y.P();process.nextTick(async()=>{for(const n of t){const t=f.y1.resolve(e.cwd,n),i=f.y1.join("package",n),o=await p.xfs.lstatPromise(t),s={name:i,mtime:new Date(315532800)};let A,a;const c=new Promise((e,t)=>{A=e,a=t}),u=e=>{e?a(e):A()};if(o.isFile()){let i;i="package.json"===n?Buffer.from(JSON.stringify(await S(e),null,2)):await p.xfs.readFilePromise(t),r.entry({...s,type:"file"},i,u)}else o.isSymbolicLink()&&r.entry({...s,type:"symlink",linkname:await p.xfs.readlinkPromise(t)},u);await c}r.finalize()});const n=(0,w.createGzip)();return r.pipe(n),n}async function S(e){const t=JSON.parse(JSON.stringify(e.manifest.raw));return await e.project.configuration.triggerHook(e=>e.beforeWorkspacePacking,e,t),t}async function k(e){const t=e.project,r=t.configuration,n={accept:[],reject:[]};for(const e of Q)n.reject.push(e);for(const e of B)n.accept.push(e);n.reject.push(r.get("rcFilename"));const i=t=>{if(null===t||!t.startsWith(e.cwd+"/"))return;const r=f.y1.relative(e.cwd,t),i=f.y1.resolve(f.LZ.root,r);n.reject.push(i)};i(f.y1.resolve(t.cwd,r.get("lockfileFilename"))),i(r.get("bstatePath")),i(r.get("cacheFolder")),i(r.get("globalFolder")),i(r.get("installStatePath")),i(r.get("virtualFolder")),i(r.get("yarnPath")),await r.triggerHook(e=>e.populateYarnPaths,t,e=>{i(e)});for(const r of t.workspaces){const t=f.y1.relative(e.cwd,r.cwd);""===t||t.match(/^(\.\.)?\//)||n.reject.push("/"+t)}const o={accept:[],reject:[]};e.manifest.publishConfig&&e.manifest.publishConfig.main?o.accept.push(f.y1.resolve(f.LZ.root,e.manifest.publishConfig.main)):e.manifest.main&&o.accept.push(f.y1.resolve(f.LZ.root,e.manifest.main)),e.manifest.publishConfig&&e.manifest.publishConfig.module?o.accept.push(f.y1.resolve(f.LZ.root,e.manifest.publishConfig.module)):e.manifest.module&&o.accept.push(f.y1.resolve(f.LZ.root,e.manifest.module));const s=null!==e.manifest.files;if(s){o.reject.push("/*");for(const t of e.manifest.files)F(o.accept,t,{cwd:f.LZ.root})}return await async function(e,{hasExplicitFileList:t,globalList:r,ignoreList:n}){const i=[],o=new C.n(e),s=[[f.LZ.root,[n]]];for(;s.length>0;){const[e,n]=s.pop(),A=await o.lstatPromise(e);if(!M(e,{globalList:r,ignoreLists:A.isDirectory()?null:n}))if(A.isDirectory()){const i=await o.readdirPromise(e);let A=!1,a=!1;if(!t||e!==f.LZ.root)for(const e of i)A=A||".gitignore"===e,a=a||".npmignore"===e;const c=a?await x(o,e,(0,f.Zu)(".npmignore")):A?await x(o,e,(0,f.Zu)(".gitignore")):null;let u=null!==c?[c].concat(n):n;M(e,{globalList:r,ignoreLists:n})&&(u=[...n,{accept:[],reject:["**/*"]}]);for(const t of i)s.push([f.y1.resolve(e,t),u])}else i.push(f.y1.relative(f.LZ.root,e))}return i.sort()}(e.cwd,{hasExplicitFileList:s,globalList:n,ignoreList:o})}async function x(e,t,r){const n={accept:[],reject:[]},i=await e.readFilePromise(f.y1.join(t,r),"utf8");for(const e of i.split(/\n/g))F(n.reject,e,{cwd:t});return n}function F(e,t,{cwd:r}){const n=t.trim();""!==n&&"#"!==n[0]&&e.push(function(e,{cwd:t}){const r="!"===e[0];return r&&(e=e.slice(1)),e.match(/\.{0,1}\//)&&(e=f.y1.resolve(t,e)),r&&(e="!"+e),e}(n,{cwd:r}))}function M(e,{globalList:t,ignoreLists:r}){if(N(e,t.accept))return!1;if(N(e,t.reject))return!0;if(null!==r)for(const t of r){if(N(e,t.accept))return!1;if(N(e,t.reject))return!0}return!1}function N(e,t){let r=t;const n=[];for(let e=0;e{await D(r,{report:t},async()=>{t.reportJson({base:r.cwd});const e=await k(r);for(const r of e)t.reportInfo(null,r),t.reportJson({location:r});if(!this.dryRun){const t=await b(r,e),i=p.xfs.createWriteStream(n);t.pipe(i),await new Promise(e=>{i.on("finish",e)})}}),this.dryRun||(t.reportInfo(s.b.UNNAMED,"Package archive generated in "+e.format(n,"magenta")),t.reportJson({output:n}))})).exitCode()}}L.usage=d.Command.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `--install-if-needed` flag is set Yarn will run a preliminary `yarn install` if the package contains build scripts.\n\n If the `-n,--dry-run` flag is set the command will just print the file paths without actually generating the package archive.\n\n If the `--json` flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]}),(0,A.gn)([d.Command.Boolean("--install-if-needed")],L.prototype,"installIfNeeded",void 0),(0,A.gn)([d.Command.Boolean("-n,--dry-run")],L.prototype,"dryRun",void 0),(0,A.gn)([d.Command.Boolean("--json")],L.prototype,"json",void 0),(0,A.gn)([d.Command.String("--filename",{hidden:!1}),d.Command.String("-o,--out")],L.prototype,"out",void 0),(0,A.gn)([d.Command.Path("pack")],L.prototype,"execute",null);const K=["dependencies","devDependencies","peerDependencies"],T={hooks:{beforeWorkspacePacking:(e,t)=>{t.publishConfig&&(t.publishConfig.main&&(t.main=t.publishConfig.main),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.module&&(t.module=t.publishConfig.module),t.publishConfig.bin&&(t.bin=t.publishConfig.bin));const r=e.project;for(const n of K)for(const A of e.manifest.getForScope(n).values()){const e=r.tryWorkspaceByDescriptor(A),a=i.structUtils.parseRange(A.range);if("workspace:"===a.protocol)if(null===e){if(null===r.tryWorkspaceByIdent(A))throw new o.lk(s.b.WORKSPACE_NOT_FOUND,i.structUtils.prettyDescriptor(r.configuration,A)+": No local workspace found for this range")}else{let r;r=i.structUtils.areDescriptorsEqual(A,e.anchoredDescriptor)||"*"===a.selector?e.manifest.version:a.selector,t[n][i.structUtils.stringifyIdent(A)]=r}}}},commands:[L]}},77333:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchUtils:()=>n,default:()=>W});var n={};r.r(n),r.d(n,{applyPatchFile:()=>g,diffFolders:()=>K,extractPackageToDisk:()=>L,isParentRequired:()=>N,loadPatchFiles:()=>R,makeDescriptor:()=>x,makeLocator:()=>F,parseDescriptor:()=>b,parseLocator:()=>S,parsePatchFile:()=>B});var i=r(84132),o=r(56537),s=r(46009),A=r(90739),a=r(75448),c=r(29486),u=r(33720),l=r(78420);async function h(e,t,r){const n=await e.lstatPromise(t),i=await r();if(void 0!==i&&(t=i),e.lutimesPromise)await e.lutimesPromise(t,n.atime,n.mtime);else{if(n.isSymbolicLink())throw new Error("Cannot preserve the time values of a symlink");await e.utimesPromise(t,n.atime,n.mtime)}}async function g(e,{baseFs:t=new l.S,dryRun:r=!1,version:n=null}={}){for(const o of e)if(null===o.semverExclusivity||null===n||i.semverUtils.satisfiesWithPrereleases(n,o.semverExclusivity))switch(o.type){case"file deletion":if(r){if(!t.existsSync(o.path))throw new Error("Trying to delete file that doesn't exist: "+o.path)}else await h(t,s.y1.dirname(o.path),async()=>{await t.unlinkPromise(o.path)});break;case"rename":if(r){if(!t.existsSync(o.fromPath))throw new Error("Trying to move file that doesn't exist: "+o.fromPath)}else await h(t,s.y1.dirname(o.fromPath),async()=>{await h(t,s.y1.dirname(o.toPath),async()=>{await h(t,o.fromPath,async()=>(await t.movePromise(o.fromPath,o.toPath),o.toPath))})});break;case"file creation":if(r){if(t.existsSync(o.path))throw new Error("Trying to create file that already exists: "+o.path)}else{const e=o.hunk?o.hunk.parts[0].lines.join("\n")+(o.hunk.parts[0].noNewlineAtEndOfFile?"":"\n"):"";await t.mkdirpPromise(s.y1.dirname(o.path),{chmod:493,utimes:[315532800,315532800]}),await t.writeFilePromise(o.path,e,{mode:o.mode}),await t.utimesPromise(o.path,315532800,315532800)}break;case"patch":await h(t,o.path,async()=>{await d(o,{baseFs:t,dryRun:r})});break;case"mode change":{const e=(await t.statPromise(o.path)).mode;if(f(o.newMode)!==f(e))continue;await h(t,o.path,async()=>{await t.chmodPromise(o.path,o.newMode)})}break;default:i.miscUtils.assertNever(o)}}function f(e){return(64&e)>0}function p(e){return e.replace(/\s+$/,"")}async function d({hunks:e,path:t},{baseFs:r,dryRun:n=!1}){const o=await r.statSync(t).mode,s=(await r.readFileSync(t,"utf8")).split(/\n/),A=[];let a=0,c=0;for(const t of e){const r=Math.max(c,t.header.patched.start+a),n=Math.max(0,r-c),i=Math.max(0,s.length-r-t.header.original.length),o=Math.max(n,i);let u=0,l=0,h=null;for(;u<=o&&!(u<=n&&(l=r-u,h=C(t,s,l),null!==h))&&!(u<=i&&(l=r+u,h=C(t,s,l),null!==h));)u+=1;if(null===h)throw new Error("Cannot apply hunk #"+(e.indexOf(t)+1));A.push(h),a+=u,c=l+t.header.original.length}if(n)return;let u=0;for(const e of A)for(const t of e)switch(t.type){case"splice":{const e=t.index+u;s.splice(e,t.numToDelete,...t.linesToInsert),u+=t.linesToInsert.length-t.numToDelete}break;case"pop":s.pop();break;case"push":s.push(t.line);break;default:i.miscUtils.assertNever(t)}await r.writeFilePromise(t,s.join("\n"),{mode:o})}function C(e,t,r){const n=[];for(const s of e.parts)switch(s.type){case"deletion":case"context":for(const e of s.lines){const n=t[r];if(null==n||(o=e,p(n)!==p(o)))return null;r+=1}"deletion"===s.type&&(n.push({type:"splice",index:r-s.lines.length,numToDelete:s.lines.length,linesToInsert:[]}),s.noNewlineAtEndOfFile&&n.push({type:"push",line:""}));break;case"insertion":n.push({type:"splice",index:r,numToDelete:0,linesToInsert:s.lines}),s.noNewlineAtEndOfFile&&n.push({type:"pop"});break;default:i.miscUtils.assertNever(s.type)}var o;return n}const E=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function I(e){return s.y1.relative(s.LZ.root,s.y1.resolve(s.LZ.root,s.cS.toPortablePath(e)))}function m(e){const t=e.trim().match(E);if(!t)throw new Error(`Bad header line: '${e}'`);return{original:{start:Math.max(Number(t[1]),1),length:Number(t[3]||1)},patched:{start:Math.max(Number(t[4]),1),length:Number(t[6]||1)}}}const y={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function w(e){const t=511&parseInt(e,8);if(420!==t&&493!==t)throw new Error("Unexpected file mode string: "+e);return t}function B(e){const t=e.split(/\n/g);return""===t[t.length-1]&&t.pop(),function(e){const t=[];for(const r of e){const{semverExclusivity:e,diffLineFromPath:n,diffLineToPath:o,oldMode:s,newMode:A,deletedFileMode:a,newFileMode:c,renameFrom:u,renameTo:l,beforeHash:h,afterHash:g,fromPath:f,toPath:p,hunks:d}=r,C=u?"rename":a?"file deletion":c?"file creation":d&&d.length>0?"patch":"mode change";let E=null;switch(C){case"rename":if(!u||!l)throw new Error("Bad parser state: rename from & to not given");t.push({type:"rename",semverExclusivity:e,fromPath:I(u),toPath:I(l)}),E=l;break;case"file deletion":{const r=n||f;if(!r)throw new Error("Bad parse state: no path given for file deletion");t.push({type:"file deletion",semverExclusivity:e,hunk:d&&d[0]||null,path:I(r),mode:w(a),hash:h})}break;case"file creation":{const r=o||p;if(!r)throw new Error("Bad parse state: no path given for file creation");t.push({type:"file creation",semverExclusivity:e,hunk:d&&d[0]||null,path:I(r),mode:w(c),hash:g})}break;case"patch":case"mode change":E=p||o;break;default:i.miscUtils.assertNever(C)}E&&s&&A&&s!==A&&t.push({type:"mode change",semverExclusivity:e,path:I(E),oldMode:w(s),newMode:w(A)}),E&&d&&d.length&&t.push({type:"patch",semverExclusivity:e,path:I(E),hunks:d,beforeHash:h,afterHash:g})}return t}(function(e){const t=[];let r={semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null},n="parsing header",o=null,s=null;function A(){o&&(s&&(o.parts.push(s),s=null),r.hunks.push(o),o=null)}function a(){A(),t.push(r),r={semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}}for(let t=0;te<0?e:"+"+e;throw new Error(`hunk header integrity check failed (expected @@ ${n(e.header.original.length)} ${n(e.header.patched.length)} @@, got @@ ${n(t)} ${n(r)} @@)`)}}const v=/^builtin<([^>]+)>$/;function D(e,t){const{source:r,selector:n,params:o}=i.structUtils.parseRange(e);if(null===r)throw new Error("Patch locators must explicitly define their source");const A=n?n.split(/&/).map(e=>s.cS.toPortablePath(e)):[],a=o&&"string"==typeof o.locator?i.structUtils.parseLocator(o.locator):null,c=o&&"string"==typeof o.version?o.version:null;return{parentLocator:a,sourceItem:t(r),patchPaths:A,sourceVersion:c}}function b(e){const{sourceItem:t,...r}=D(e.range,i.structUtils.parseDescriptor);return{...r,sourceDescriptor:t}}function S(e){const{sourceItem:t,...r}=D(e.reference,i.structUtils.parseLocator);return{...r,sourceLocator:t}}function k({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:n,patchHash:o},s){const A=null!==e?{locator:i.structUtils.stringifyLocator(e)}:{},a=void 0!==n?{version:n}:{},c=void 0!==o?{hash:o}:{};return i.structUtils.makeRange({protocol:"patch:",source:s(t),selector:r.join("&"),params:{...a,...c,...A}})}function x(e,{parentLocator:t,sourceDescriptor:r,patchPaths:n}){return i.structUtils.makeLocator(e,k({parentLocator:t,sourceItem:r,patchPaths:n},i.structUtils.stringifyDescriptor))}function F(e,{parentLocator:t,sourcePackage:r,patchPaths:n,patchHash:o}){return i.structUtils.makeLocator(e,k({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:n,patchHash:o},i.structUtils.stringifyLocator))}function M({onAbsolute:e,onRelative:t,onBuiltin:r},n){const i=n.match(v);return null!==i?r(i[1]):s.y1.isAbsolute(n)?e(n):t(n)}function N(e){return M({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},e)}async function R(e,t,r){const n=null!==e?await r.fetcher.fetch(e,r):null,A=n&&n.localPath?{packageFs:new a.M(s.LZ.root),prefixPath:s.y1.relative(s.LZ.root,n.localPath)}:n;n&&n!==A&&n.releaseFs&&n.releaseFs();return(await i.miscUtils.releaseAfterUseAsync(async()=>await Promise.all(t.map(async e=>M({onAbsolute:async()=>await o.xfs.readFilePromise(e,"utf8"),onRelative:async()=>{if(null===n)throw new Error("Assertion failed: The parent locator should have been fetched");return await n.packageFs.readFilePromise(e,"utf8")},onBuiltin:async e=>await r.project.configuration.firstHook(e=>e.getBuiltinPatch,r.project,e)},e))))).map(e=>"string"==typeof e?e.replace(/\r\n?/g,"\n"):e)}async function L(e,{cache:t,project:r}){const n=r.storedChecksums,A=new u.$,a=r.configuration.makeFetcher(),c=await a.fetch(e,{cache:t,project:r,fetcher:a,checksums:n,report:A}),l=await o.xfs.mktempPromise();return await o.xfs.copyPromise(l,c.prefixPath,{baseFs:c.packageFs}),await o.xfs.writeJsonPromise(s.y1.join(l,".yarn-patch.json"),{locator:i.structUtils.stringifyLocator(e)}),o.xfs.detachTemp(l),l}async function K(e,t){const r=s.cS.fromPortablePath(e).replace(/\\/g,"/"),n=s.cS.fromPortablePath(t).replace(/\\/g,"/"),{stdout:o}=await i.execUtils.execvp("git",["diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index",r,n],{cwd:s.cS.toPortablePath(process.cwd())}),A=r.startsWith("/")?e=>e.slice(1):e=>e;return o.replace(new RegExp(`(a|b)(${i.miscUtils.escapeRegExp(`/${A(r)}/`)})`,"g"),"$1/").replace(new RegExp("(a|b)"+i.miscUtils.escapeRegExp(`/${A(n)}/`),"g"),"$1/").replace(new RegExp(i.miscUtils.escapeRegExp(r+"/"),"g"),"").replace(new RegExp(i.miscUtils.escapeRegExp(n+"/"),"g"),"")}var T=r(36370),_=r(17278);class P extends _.Command{}(0,T.gn)([_.Command.String("--cwd",{hidden:!0})],P.prototype,"cwd",void 0);var O=r(46611);class U extends _.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${s.y1.relative(e,t)} isn't a workspace of ${s.y1.join(e,O.G.fileName)}).`)}}r(65379);r(63129),r(35747);var j=r(27122);(0,T.gn)([_.Command.Path("--welcome")],class extends P{async execute(){const e=await j.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${e.format("Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${e.format("https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${e.format("https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${e.format("https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${e.format("find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${e.format("yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${e.format("yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}.prototype,"execute",null);var Y=r(40376),G=r(28148);class J extends P{async execute(){const e=await j.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await Y.I.find(e,this.context.cwd),n=await G.C.find(e);if(!r)throw new U(t.cwd,this.context.cwd);await t.restoreInstallState();const A=s.y1.resolve(this.context.cwd,s.cS.toPortablePath(this.patchFolder)),a=s.y1.join(A,".yarn-patch.json");if(!o.xfs.existsSync(a))throw new _.UsageError("The argument folder didn't get created by 'yarn patch'");const c=await o.xfs.readJsonPromise(a),u=i.structUtils.parseLocator(c.locator,!0);if(!t.storedPackages.has(u.locatorHash))throw new _.UsageError("No package found in the project for the given locator");const l=await L(u,{cache:n,project:t});this.context.stdout.write(await K(l,A))}}J.usage=_.Command.Usage({description:"\n This will turn the folder passed in parameter into a patchfile suitable for consumption with the `patch:` protocol.\n\n Only folders generated through `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "}),(0,T.gn)([_.Command.String()],J.prototype,"patchFolder",void 0),(0,T.gn)([_.Command.Path("patch-commit")],J.prototype,"execute",null);var H=r(15815),z=r(92659);class q extends P{async execute(){const e=await j.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await Y.I.find(e,this.context.cwd),n=await G.C.find(e);if(!r)throw new U(t.cwd,this.context.cwd);await t.restoreInstallState();let o=i.structUtils.parseLocator(this.package);if("unknown"===o.reference){const r=i.miscUtils.mapAndFilter([...t.storedPackages.values()],e=>e.identHash!==o.identHash||i.structUtils.isVirtualLocator(e)?i.miscUtils.mapAndFilter.skip:e);if(0===r.length)throw new _.UsageError("No package found in the project for the given locator");if(r.length>1)throw new _.UsageError("Multiple candidate packages found; explicitly choose one of them (use `yarn why ` to get more information as to who depends on them):\n"+r.map(t=>"\n- "+i.structUtils.prettyLocator(e,t)).join(""));o=r[0]}if(!t.storedPackages.has(o.locatorHash))throw new _.UsageError("No package found in the project for the given locator");await H.P.start({configuration:e,stdout:this.context.stdout},async r=>{const A=await L(o,{cache:n,project:t});r.reportInfo(z.b.UNNAMED,`Package ${i.structUtils.prettyLocator(e,o)} got extracted with success!`),r.reportInfo(z.b.UNNAMED,"You can now edit the following folder: "+e.format(s.cS.fromPortablePath(A),"magenta")),r.reportInfo(z.b.UNNAMED,`Once you are done run ${e.format("yarn patch-commit "+s.cS.fromPortablePath(A),"cyan")} and Yarn will store a patchfile based on your changes.`)})}}q.usage=_.Command.Usage({description:'\n This command will cause a package to be extracted in a temporary directory (under a folder named "patch-workdir"). This folder will be editable at will; running `yarn patch` inside it will then cause Yarn to generate a patchfile and register it into your top-level manifest (cf the `patch:` protocol).\n '}),(0,T.gn)([_.Command.String()],q.prototype,"package",void 0),(0,T.gn)([_.Command.Path("patch")],q.prototype,"execute",null);const W={commands:[J,q],fetchers:[class{supports(e,t){return!!e.reference.startsWith("patch:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,s]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,i.structUtils.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.patchPackage(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:o,prefixPath:i.structUtils.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:s}}async patchPackage(e,t){const{parentLocator:r,sourceLocator:n,sourceVersion:u,patchPaths:l}=S(e),h=await R(r,l,t),f=await o.xfs.mktempPromise(),p=s.y1.join(f,"patched.zip"),d=await t.fetcher.fetch(n,t),C=i.structUtils.getIdentVendorPath(e),E=await(0,c.getLibzipPromise)(),I=new A.d(p,{libzip:E,create:!0,level:t.project.configuration.get("compressionLevel")});await I.mkdirpPromise(C),await i.miscUtils.releaseAfterUseAsync(async()=>{await I.copyPromise(C,d.prefixPath,{baseFs:d.packageFs,stableSort:!0})},d.releaseFs),I.saveAndClose();const m=new A.d(p,{libzip:E,level:t.project.configuration.get("compressionLevel")}),y=new a.M(s.y1.resolve(s.LZ.root,C),{baseFs:m});for(const e of h)null!==e&&await g(B(e),{baseFs:y,version:u});return m}}],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("patch:")}supportsLocator(e,t){return!!e.reference.startsWith("patch:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){const{patchPaths:n}=b(e);return n.every(e=>!N(e))?e:i.structUtils.bindDescriptor(e,{locator:i.structUtils.stringifyLocator(t)})}getResolutionDependencies(e,t){const{sourceDescriptor:r}=b(e);return[r]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{parentLocator:n,sourceDescriptor:o,patchPaths:s}=b(e),A=await R(n,s,r.fetchOptions),a=t.get(o.descriptorHash);if(void 0===a)throw new Error("Assertion failed: The dependency should have been resolved");return[F(e,{parentLocator:n,sourcePackage:a,patchPaths:s,patchHash:i.hashUtils.makeHash("3",...A).slice(0,6)})]}async resolve(e,t){const{sourceLocator:r}=S(e);return{...await t.resolver.resolve(r,t),...e}}}]}},5780:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getPnpPath:()=>b,quotePathIfNeeded:()=>S,AbstractPnpInstaller:()=>d,PnpInstaller:()=>m,PnpLinker:()=>I,default:()=>k});var n=r(27122),i=r(46009),o=r(56537),s=r(10966),A=r.n(s),a=r(92659),c=r(92409),u=r(84132),l=r(75448),h=r(88563),g=r(17278),f=r(46611),p=r(32485);class d{constructor(e){this.opts=e,this.packageRegistry=new Map,this.blacklistedPaths=new Set,this.opts=e}checkAndReportManifestIncompatibility(e,t){return e&&!e.isCompatibleWithOS(process.platform)?(this.opts.report.reportWarningOnce(a.b.INCOMPATIBLE_OS,`${u.structUtils.prettyLocator(this.opts.project.configuration,t)} The platform ${process.platform} is incompatible with this module, ${this.opts.skipIncompatiblePackageLinking?"linking":"building"} skipped.`),!1):!(e&&!e.isCompatibleWithCPU(process.arch))||(this.opts.report.reportWarningOnce(a.b.INCOMPATIBLE_CPU,`${u.structUtils.prettyLocator(this.opts.project.configuration,t)} The CPU architecture ${process.arch} is incompatible with this module, ${this.opts.skipIncompatiblePackageLinking?"linking":"building"} skipped.`),!1)}async installPackage(e,t){const r=u.structUtils.requirableIdent(e),n=e.reference,o=e.peerDependencies.size>0&&!u.structUtils.isVirtualLocator(e)&&!this.opts.project.tryWorkspaceByLocator(e),s=!o||this.opts.skipIncompatiblePackageLinking?await f.G.tryFind(t.prefixPath,{baseFs:t.packageFs}):null,A=this.checkAndReportManifestIncompatibility(s,e);if(this.opts.skipIncompatiblePackageLinking&&!A)return{packageLocation:null,buildDirective:null};const c=o?[]:await this.getBuildScripts(e,s,t);c.length>0&&!this.opts.project.configuration.get("enableScripts")&&(this.opts.report.reportWarningOnce(a.b.DISABLED_BUILD_SCRIPTS,u.structUtils.prettyLocator(this.opts.project.configuration,e)+" lists build scripts, but all build scripts have been disabled."),c.length=0),c.length>0&&e.linkType!==p.U.HARD&&!this.opts.project.tryWorkspaceByLocator(e)&&(this.opts.report.reportWarningOnce(a.b.SOFT_LINK_BUILD,u.structUtils.prettyLocator(this.opts.project.configuration,e)+" lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored."),c.length=0);const l=this.opts.project.getDependencyMeta(e,e.version);c.length>0&&l&&!1===l.built&&(this.opts.report.reportInfoOnce(a.b.BUILD_DISABLED,u.structUtils.prettyLocator(this.opts.project.configuration,e)+" lists build scripts, but its build has been explicitly disabled through configuration."),c.length=0);const h=o||e.linkType===p.U.SOFT?t.packageFs:await this.transformPackage(e,s,t,l,{hasBuildScripts:c.length>0});if(i.y1.isAbsolute(t.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${t.prefixPath}) to be relative to the parent`);const g=i.y1.resolve(h.getRealPath(),t.prefixPath),d=this.normalizeDirectoryPath(g),C=new Map,E=new Set;if(u.structUtils.isVirtualLocator(e))for(const t of e.peerDependencies.values())C.set(u.structUtils.requirableIdent(t),null),E.add(u.structUtils.stringifyIdent(t));return u.miscUtils.getMapWithDefault(this.packageRegistry,r).set(n,{packageLocation:d,packageDependencies:C,packagePeers:E,linkType:e.linkType,discardFromLookup:t.discardFromLookup||!1}),o&&this.blacklistedPaths.add(d),{packageLocation:g,buildDirective:c.length>0&&A?c:null}}async attachInternalDependencies(e,t){const r=this.getPackageInformation(e);for(const[e,n]of t){const t=u.structUtils.areIdentsEqual(e,n)?n.reference:[u.structUtils.requirableIdent(n),n.reference];r.packageDependencies.set(u.structUtils.requirableIdent(e),t)}}async attachExternalDependents(e,t){for(const r of t){this.getDiskInformation(r).packageDependencies.set(u.structUtils.requirableIdent(e),e.reference)}}async finalizeInstall(){this.trimBlacklistedPackages(),this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));const e=this.opts.project.configuration.get("pnpFallbackMode"),t=this.blacklistedPaths,r=this.opts.project.workspaces.map(({anchoredLocator:e})=>({name:u.structUtils.requirableIdent(e),reference:e.reference})),n="none"!==e,i=[],o=this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator).packageDependencies,s=u.miscUtils.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),A=this.packageRegistry,a=this.opts.project.configuration.get("pnpShebang");if("dependencies-only"===e)for(const e of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(e)&&i.push({name:u.structUtils.requirableIdent(e),reference:e.reference});return await this.finalizeInstallWithPnp({blacklistedLocations:t,dependencyTreeRoots:r,enableTopLevelFallback:n,fallbackExclusionList:i,fallbackPool:o,ignorePattern:s,packageRegistry:A,shebang:a})}getPackageInformation(e){const t=u.structUtils.requirableIdent(e),r=e.reference,n=this.packageRegistry.get(t);if(!n)throw new Error(`Assertion failed: The package information store should have been available (for ${u.structUtils.prettyIdent(this.opts.project.configuration,e)})`);const i=n.get(r);if(!i)throw new Error(`Assertion failed: The package information should have been available (for ${u.structUtils.prettyLocator(this.opts.project.configuration,e)})`);return i}getDiskInformation(e){const t=u.miscUtils.getMapWithDefault(this.packageRegistry,"@@disk"),r=this.normalizeDirectoryPath(e);return u.miscUtils.getFactoryWithDefault(t,r,()=>({packageLocation:r,packageDependencies:new Map,packagePeers:new Set,linkType:p.U.SOFT,discardFromLookup:!1}))}trimBlacklistedPackages(){for(const e of this.packageRegistry.values())for(const[t,r]of e)r.packageLocation&&this.blacklistedPaths.has(r.packageLocation)&&e.delete(t)}normalizeDirectoryPath(e){let t=i.y1.relative(this.opts.project.cwd,e);return t.match(/^\.{0,2}\//)||(t="./"+t),t.replace(/\/?$/,"/")}}const C=new Set([u.structUtils.makeIdent(null,"nan").identHash,u.structUtils.makeIdent(null,"node-gyp").identHash,u.structUtils.makeIdent(null,"node-pre-gyp").identHash,u.structUtils.makeIdent(null,"node-addon-api").identHash,u.structUtils.makeIdent(null,"fsevents").identHash]),E=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);class I{constructor(){this.mode="strict"}supportsPackage(e,t){return"pnp"===t.project.configuration.get("nodeLinker")&&t.project.configuration.get("pnpMode")===this.mode}async findPackageLocation(e,t){const r=b(t.project).main;if(!o.xfs.existsSync(r))throw new g.UsageError(`The project in ${t.project.cwd}/package.json doesn't seem to have been installed - running an install there might help`);const n=u.miscUtils.dynamicRequireNoCache(r),s={name:u.structUtils.requirableIdent(e),reference:e.reference},A=n.getPackageInformation(s);if(!A)throw new g.UsageError(`Couldn't find ${u.structUtils.prettyLocator(t.project.configuration,e)} in the currently installed PnP map - running an install might help`);return i.cS.toPortablePath(A.packageLocation)}async findPackageLocator(e,t){const n=b(t.project).main;if(!o.xfs.existsSync(n))return null;const s=i.cS.fromPortablePath(n),A=u.miscUtils.dynamicRequire(s);delete r.c[s];const a=A.findPackageLocator(i.cS.fromPortablePath(e));return a?u.structUtils.makeLocator(u.structUtils.parseIdent(a.name),a.reference):null}makeInstaller(e){return new m(e)}}class m extends d{constructor(){super(...arguments),this.mode="strict",this.unpluggedPaths=new Set}async getBuildScripts(e,t,r){if(null===t)return[];const n=[];for(const e of["preinstall","install","postinstall"])t.scripts.has(e)&&n.push([c.k.SCRIPT,e]);const o=i.y1.join(r.prefixPath,(0,i.Zu)("binding.gyp"));return!t.scripts.has("install")&&r.packageFs.existsSync(o)&&n.push([c.k.SHELLCODE,"node-gyp rebuild"]),n}async transformPackage(e,t,r,n,{hasBuildScripts:i}){return this.isUnplugged(e,t,r,n,{hasBuildScripts:i})?this.unplugPackage(e,r.packageFs):r.packageFs}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=b(this.opts.project),r=this.opts.project.configuration.get("pnpDataPath");if(await o.xfs.removePromise(t.other),"pnp"!==this.opts.project.configuration.get("nodeLinker"))return await o.xfs.removePromise(t.main),void await o.xfs.removePromise(r);const n=await this.locateNodeModules();if(n.length>0){this.opts.report.reportWarning(a.b.DANGEROUS_NODE_MODULES,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(const e of n)await o.xfs.removePromise(e)}if(this.opts.project.configuration.get("pnpEnableInlining")){const n=(0,h.gY)(e);await o.xfs.changeFilePromise(t.main,n,{automaticNewlines:!0}),await o.xfs.chmodPromise(t.main,493),await o.xfs.removePromise(r)}else{const n=i.y1.relative(i.y1.dirname(t.main),r),{dataFile:s,loaderFile:A}=(0,h.Q$)({...e,dataLocation:n});await o.xfs.changeFilePromise(t.main,A,{automaticNewlines:!0}),await o.xfs.chmodPromise(t.main,493),await o.xfs.changeFilePromise(r,s,{automaticNewlines:!0}),await o.xfs.chmodPromise(r,420)}const s=this.opts.project.configuration.get("pnpUnpluggedFolder");if(0===this.unpluggedPaths.size)await o.xfs.removePromise(s);else for(const e of await o.xfs.readdirPromise(s)){const t=i.y1.resolve(s,e);this.unpluggedPaths.has(t)||await o.xfs.removePromise(t)}}async locateNodeModules(){const e=[];for(const t of this.opts.project.workspaces){const r=i.y1.join(t.cwd,(0,i.Zu)("node_modules"));if(!o.xfs.existsSync(r))continue;const n=await o.xfs.readdirPromise(r,{withFileTypes:!0}),s=n.filter(e=>!e.isDirectory()||".bin"===e.name||!e.name.startsWith("."));if(s.length===n.length)e.push(r);else for(const t of s)e.push(i.y1.join(r,t.name))}return e}getUnpluggedPath(e){return i.y1.resolve(this.opts.project.configuration.get("pnpUnpluggedFolder"),u.structUtils.slugifyLocator(e))}async unplugPackage(e,t){const r=this.getUnpluggedPath(e);return this.unpluggedPaths.add(r),await o.xfs.mkdirpPromise(r),await o.xfs.copyPromise(r,i.LZ.dot,{baseFs:t,overwrite:!1}),new l.M(r)}isUnplugged(e,t,r,n,{hasBuildScripts:i}){return void 0!==n.unplugged?n.unplugged:!!C.has(e.identHash)||(null!==t&&null!==t.preferUnplugged?t.preferUnplugged:!(!i&&!r.packageFs.getExtractHint({relevantExtensions:E})))}}var y=r(36370),w=r(95397),B=r(40376),Q=r(28148),v=r(15815);class D extends w.BaseCommand{constructor(){super(...arguments),this.patterns=[]}async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await B.I.find(e,this.context.cwd),i=await Q.C.find(e);if(!r)throw new w.WorkspaceRequiredError(t.cwd,this.context.cwd);const o=t.topLevelWorkspace;for(const e of this.patterns){const t=u.structUtils.parseDescriptor(e);o.manifest.ensureDependencyMeta(t).unplugged=!0}await o.persistManifest();return(await v.P.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:i,report:e})})).exitCode()}}D.usage=g.Command.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the specified selectors to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `virtualFolder`.\n\n Unpacking a package isn't advised as a general tool because it makes it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n The unplug command sets a flag that's persisted in your top-level `package.json` through the `dependenciesMeta` field. As such, to undo its effects, just revert the changes made to the manifest and run `yarn install`.\n ",examples:[["Unplug lodash","yarn unplug lodash"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"]]}),(0,y.gn)([g.Command.Rest()],D.prototype,"patterns",void 0),(0,y.gn)([g.Command.Path("unplug")],D.prototype,"execute",null);const b=e=>{let t,r;return"module"===e.topLevelWorkspace.manifest.type?(t=".pnp.cjs",r=".pnp.js"):(t=".pnp.js",r=".pnp.cjs"),{main:i.y1.join(e.cwd,t),other:i.y1.join(e.cwd,r)}},S=e=>/\s/.test(e)?JSON.stringify(e):e;const k={hooks:{populateYarnPaths:async function(e,t){t(b(e).main),t(b(e).other),t(e.configuration.get("pnpDataPath")),t(e.configuration.get("pnpUnpluggedFolder"))},setupScriptEnvironment:async function(e,t,r){const n=b(e).main,s="--require "+S(i.cS.fromPortablePath(n));if(n.includes(" ")&&A().lt(process.versions.node,"12.0.0"))throw new Error(`Expected the build location to not include spaces when using Node < 12.0.0 (${process.versions.node})`);if(o.xfs.existsSync(n)){let e=t.NODE_OPTIONS||"";const r=/\s*--require\s+\S*\.pnp\.c?js\s*/g;e=e.replace(r," ").trim(),e=e?`${s} ${e}`:s,t.NODE_OPTIONS=e}}},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:n.a2.STRING,default:"pnp"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:n.a2.STRING,default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:n.a2.STRING,default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:n.a2.STRING,default:[],isArray:!0},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:n.a2.BOOLEAN,default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:n.a2.STRING,default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:n.a2.ABSOLUTE_PATH,default:"./.yarn/unplugged"},pnpDataPath:{description:"Path of the file where the PnP data (used by the loader) must be written",type:n.a2.ABSOLUTE_PATH,default:"./.pnp.data.json"}},linkers:[I],commands:[D]}},28638:(e,t,r)=>{"use strict";r.r(t);var n=r(50683),i=r.n(n);Object.fromEntries||(Object.fromEntries=i());var o=r(59355),s=r(91058),A=r(45330);(0,s.D)({binaryVersion:o.o||"",pluginConfiguration:(0,A.e)()})},95397:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseCommand:()=>n.F,WorkspaceRequiredError:()=>A,getDynamicLibs:()=>c,getPluginConfiguration:()=>u.e,openWorkspace:()=>h,main:()=>g.D});var n=r(56087),i=r(46611),o=r(46009),s=r(17278);class A extends s.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${o.y1.relative(e,t)} isn't a workspace of ${o.y1.join(e,i.G.fileName)}).`)}}const a=["@yarnpkg/cli","@yarnpkg/core","@yarnpkg/fslib","@yarnpkg/libzip","@yarnpkg/parsers","@yarnpkg/shell","clipanion","semver","yup"],c=()=>new Map(a.map(e=>[e,r(98497)(e)]));var u=r(45330),l=r(40376);async function h(e,t){const{project:r,workspace:n}=await l.I.find(e,t);if(!n)throw new A(r.cwd,t);return n}var g=r(91058)},91058:(e,t,r)=>{"use strict";r.d(t,{D:()=>h});var n=r(27122),i=r(46009),o=r(56537),s=r(63129),A=r(17278),a=r(35747),c=r(36370),u=r(56087);class l extends u.F{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${e.format("Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${e.format("https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${e.format("https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${e.format("https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${e.format("find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${e.format("yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${e.format("yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}async function h({binaryVersion:e,pluginConfiguration:t}){async function r(){const c=new A.Cli({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:e});c.register(l);try{await async function(e){const A=await n.VK.find(i.cS.toPortablePath(process.cwd()),t,{usePath:!0,strict:!1}),c=A.get("yarnPath"),u=A.get("ignorePath"),l=A.get("ignoreCwd");if(null===c||u){u&&delete process.env.YARN_IGNORE_PATH;for(const t of A.plugins.values())for(const r of t.commands||[])e.register(r);const n=e.process(process.argv.slice(2)),o=n.cwd;if(void 0!==o&&!l){const e=(0,a.realpathSync)(process.cwd()),t=(0,a.realpathSync)(o);if(e!==t)return process.chdir(o),void await r()}e.runExit(n,{cwd:i.cS.toPortablePath(process.cwd()),plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr})}else if(o.xfs.existsSync(c))try{!function(e){const t=i.cS.fromPortablePath(e);process.on("SIGINT",()=>{}),t?(0,s.execFileSync)(process.execPath,[t,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,s.execFileSync)(t,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}(c)}catch(e){process.exitCode=e.code||1}else process.stdout.write(e.error(new Error(`The "yarn-path" option has been set (in ${A.sources.get("yarnPath")}), but the specified location doesn't exist (${c}).`))),process.exitCode=1}(c)}catch(e){process.stdout.write(c.error(e)),process.exitCode=1}}return r().catch(e=>{process.stdout.write(e.stack||e.message),process.exitCode=1})}(0,c.gn)([A.Command.Path("--welcome")],l.prototype,"execute",null)},56087:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var n=r(36370),i=r(17278);class o extends i.Command{}(0,n.gn)([i.Command.String("--cwd",{hidden:!0})],o.prototype,"cwd",void 0)},28148:(e,t,r)=>{"use strict";r.d(t,{C:()=>C});var n=r(78420),i=r(90739),o=r(15037),s=r(46009),A=r(56537),a=r(29486),c=r(35747),u=r.n(c),l=r(92659),h=r(35691),g=r(20624),f=r(73632),p=r(54143);const d=4;class C{constructor(e,{configuration:t,immutable:r=t.get("enableImmutableCache"),check:n=!1}){this.markedFiles=new Set,this.mutexes=new Map,this.configuration=t,this.cwd=e,this.immutable=r,this.check=n;const o=t.get("cacheKeyOverride");if(null!==o)this.cacheKey=""+o;else{const e=t.get("compressionLevel"),r=e!==i.k?"c"+e:"";this.cacheKey=[d,r].join("")}}static async find(e,{immutable:t,check:r}={}){const n=new C(e.get("cacheFolder"),{configuration:e,immutable:t,check:r});return await n.setup(),n}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;const e=this.configuration.get("globalFolder")+"/cache";return e!==this.cwd?e:null}getVersionFilename(e){return`${p.slugifyLocator(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,t){const r=function(e){const t=e.indexOf("/");return-1!==t?e.slice(t+1):e}(t).slice(0,10);return`${p.slugifyLocator(e)}-${r}.zip`}getLocatorPath(e,t){if(null===this.mirrorCwd)return s.y1.resolve(this.cwd,this.getVersionFilename(e));if(null===t)return null;return E(t)!==this.cacheKey?null:s.y1.resolve(this.cwd,this.getChecksumFilename(e,t))}getLocatorMirrorPath(e){const t=this.mirrorCwd;return null!==t?s.y1.resolve(t,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache")){await A.xfs.mkdirpPromise(this.cwd);const e=s.y1.resolve(this.cwd,(0,s.Zu)(".gitignore"));await A.xfs.existsPromise(e)||await A.xfs.writeFilePromise(e,"/.gitignore\n*.lock\n")}}async fetchPackageFromCache(e,t,{onHit:r,onMiss:c,loader:d,skipIntegrityCheck:C}){const I=this.getLocatorMirrorPath(e),m=new n.S,y=async(e,r=null)=>{const n=C&&t?t:`${this.cacheKey}/${await g.checksumFile(e)}`;if(null!==r){if(n!==(C&&t?t:`${this.cacheKey}/${await g.checksumFile(r)}`))throw new h.lk(l.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(null!==t&&n!==t){let e;switch(e=this.check?"throw":E(t)!==E(n)?"update":this.configuration.get("checksumBehavior"),e){case"ignore":return t;case"update":return n;default:case"throw":throw new h.lk(l.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return n},w=async t=>{if(!d)throw new Error("Cache check required but no loader configured for "+p.prettyLocator(this.configuration,e));const r=await d(),n=r.getRealPath();return r.saveAndClose(),await A.xfs.chmodPromise(n,420),await y(t,n)},B=async()=>{if(null===I||!A.xfs.existsSync(I))return await d();const t=await A.xfs.mktempPromise(),r=s.y1.join(t,this.getVersionFilename(e));return await A.xfs.copyFilePromise(I,r,u().constants.COPYFILE_FICLONE),new i.d(r,{libzip:await(0,a.getLibzipPromise)()})},Q=async()=>{if(!d)throw new Error("Cache entry required but missing for "+p.prettyLocator(this.configuration,e));if(this.immutable)throw new h.lk(l.b.IMMUTABLE_CACHE,"Cache entry required but missing for "+p.prettyLocator(this.configuration,e));const t=await B(),r=t.getRealPath();t.saveAndClose(),await A.xfs.chmodPromise(r,420);const n=await y(r),i=this.getLocatorPath(e,n);if(!i)throw new Error("Assertion failed: Expected the cache path to be available");return await this.writeFileWithLock(i,async()=>await this.writeFileWithLock(I,async()=>(await A.xfs.movePromise(r,i),null!==I&&await A.xfs.copyFilePromise(i,I,u().constants.COPYFILE_FICLONE),[i,n])))},v=async()=>{const t=Q();this.mutexes.set(e.locatorHash,t);try{return await t}finally{this.mutexes.delete(e.locatorHash)}};for(let t;t=this.mutexes.get(e.locatorHash);)await t;const D=this.getLocatorPath(e,t),b=null!==D&&m.existsSync(D),S=b?r:c;let k,x;S&&S(),b?(k=D,x=this.check?await w(k):await y(k)):[k,x]=await v(),this.markedFiles.add(k);let F=null;const M=await(0,a.getLibzipPromise)();return[new o.v(()=>f.prettifySyncErrors(()=>F=new i.d(k,{baseFs:m,libzip:M,readOnly:!0}),t=>`Failed to open the cache entry for ${p.prettyLocator(this.configuration,e)}: ${t}`),s.y1),()=>{null!==F&&F.discardAndClose()},x]}async writeFileWithLock(e,t){return null===e?await t():(await A.xfs.mkdirpPromise(s.y1.dirname(e)),await A.xfs.lockPromise(e,async()=>await t()))}}function E(e){const t=e.indexOf("/");return-1!==t?e.slice(0,t):null}},27122:(e,t,r)=>{"use strict";r.d(t,{tr:()=>O,nh:()=>U,a2:()=>j,a5:()=>Y,EW:()=>V,VK:()=>X});var n=r(90739),i=r(46009),o=r(56537),s=r(55125),A=r(54738),a=r.n(A),c=r(95882),u=r.n(c),l=r(5864),h=r(17278),g=r(10966),f=r.n(g),p=r(92413),d=r(92659),C=r(54143);const E={hooks:{reduceDependency:(e,t,r,n,{resolver:i,resolveOptions:o})=>{for(const{pattern:n,reference:s}of t.topLevelWorkspace.manifest.resolutions){if(n.from&&n.from.fullName!==C.requirableIdent(r))continue;if(n.from&&n.from.description&&n.from.description!==r.reference)continue;if(n.descriptor.fullName!==C.requirableIdent(e))continue;if(n.descriptor.description&&n.descriptor.description!==e.range)continue;return i.bindDescriptor(C.makeDescriptor(e,s),t.topLevelWorkspace.anchoredLocator,o)}return e},validateProject:async(e,t)=>{for(const r of e.workspaces){const n=C.prettyWorkspace(e.configuration,r);await e.configuration.triggerHook(e=>e.validateWorkspace,r,{reportWarning:(e,r)=>t.reportWarning(e,`${n}: ${r}`),reportError:(e,r)=>t.reportError(e,`${n}: ${r}`)})}},validateWorkspace:async(e,t)=>{const{manifest:r}=e;r.resolutions.length&&e.cwd!==e.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(const e of r.errors)t.reportWarning(d.b.INVALID_MANIFEST,e.message)}}};var I=r(46611),m=r(35691);class y{constructor(e){this.fetchers=e}supports(e,t){return!!this.tryFetcher(e,t)}getLocalPath(e,t){return this.getFetcher(e,t).getLocalPath(e,t)}async fetch(e,t){const r=this.getFetcher(e,t);return await r.fetch(e,t)}tryFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));return r||null}getFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));if(!r)throw new m.lk(d.b.FETCHER_NOT_FOUND,C.prettyLocator(t.project.configuration,e)+" isn't supported by any available fetcher");return r}}var w=r(27092),B=r(52779),Q=r(60895);class v{static isVirtualDescriptor(e){return!!e.range.startsWith(v.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(v.protocol)}supportsDescriptor(e,t){return v.isVirtualDescriptor(e)}supportsLocator(e,t){return v.isVirtualLocator(e)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,t){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,t,r){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async resolve(e,t){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}v.protocol="virtual:";var D=r(75448),b=r(94538);class S{supports(e){return!!e.reference.startsWith(b.d.protocol)}getLocalPath(e,t){return this.getWorkspace(e,t).cwd}async fetch(e,t){const r=this.getWorkspace(e,t).cwd;return{packageFs:new D.M(r),prefixPath:i.LZ.dot,localPath:r}}getWorkspace(e,t){return t.project.getWorkspaceByCwd(e.reference.slice(b.d.protocol.length))}}var k=r(81111),x=r(73632),F=r(32282),M=r.n(F);function N(e){return("undefined"!=typeof require?require:r(32178))(e)}var R=r(36545);const L=process.env.GITHUB_ACTIONS?{level:2}:u().supportsColor?{level:u().supportsColor.level}:{level:0},K=0!==L.level,T=K&&!process.env.GITHUB_ACTIONS,_=new(u().Instance)(L),P=new Set(["binFolder","version","flags","profile","gpg","wrapOutput"]),O=(0,i.Zu)(".yarnrc.yml"),U=(0,i.Zu)("yarn.lock");var j,Y;!function(e){e.ANY="ANY",e.BOOLEAN="BOOLEAN",e.ABSOLUTE_PATH="ABSOLUTE_PATH",e.LOCATOR="LOCATOR",e.LOCATOR_LOOSE="LOCATOR_LOOSE",e.NUMBER="NUMBER",e.STRING="STRING",e.SECRET="SECRET",e.SHAPE="SHAPE",e.MAP="MAP"}(j||(j={})),function(e){e.NAME="NAME",e.NUMBER="NUMBER",e.PATH="PATH",e.RANGE="RANGE",e.REFERENCE="REFERENCE",e.SCOPE="SCOPE",e.ADDED="ADDED",e.REMOVED="REMOVED"}(Y||(Y={}));const G=L.level>=3?new Map([[Y.NAME,"#d7875f"],[Y.RANGE,"#00afaf"],[Y.REFERENCE,"#87afff"],[Y.NUMBER,"#ffd700"],[Y.PATH,"#d75fd7"],[Y.SCOPE,"#d75f00"],[Y.ADDED,"#5faf00"],[Y.REMOVED,"#d70000"]]):new Map([[Y.NAME,173],[Y.RANGE,37],[Y.REFERENCE,111],[Y.NUMBER,220],[Y.PATH,170],[Y.SCOPE,166],[Y.ADDED,70],[Y.REMOVED,160]]),J={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:j.STRING,default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:j.ABSOLUTE_PATH,default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:j.BOOLEAN,default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:j.BOOLEAN,default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:j.STRING,default:null},globalFolder:{description:"Folder where are stored the system-wide settings",type:j.ABSOLUTE_PATH,default:k.getDefaultGlobalFolder()},cacheFolder:{description:"Folder where the cache files must be written",type:j.ABSOLUTE_PATH,default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:j.NUMBER,values:["mixed",0,1,2,3,4,5,6,7,8,9],default:n.k},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named $$virtual)",type:j.ABSOLUTE_PATH,default:"./.yarn/$$virtual"},bstatePath:{description:"Path of the file where the current state of the built packages must be stored",type:j.ABSOLUTE_PATH,default:"./.yarn/build-state.yml"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:j.STRING,default:U},installStatePath:{description:"Path of the file where the install state will be persisted",type:j.ABSOLUTE_PATH,default:"./.yarn/install-state.gz"},rcFilename:{description:"Name of the files where the configuration can be found",type:j.STRING,default:W()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:j.BOOLEAN,default:!1},enableAbsoluteVirtuals:{description:"If true, the virtual symlinks will use absolute paths if required [non portable!!]",type:j.BOOLEAN,default:!1},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:j.BOOLEAN,default:K,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:j.BOOLEAN,default:T,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:j.BOOLEAN,default:l.isCI,defaultText:""},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:j.BOOLEAN,default:!l.isCI&&process.stdout.isTTY&&process.stdout.columns>22,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:j.BOOLEAN,default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:j.BOOLEAN,default:l.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:j.BOOLEAN,default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:j.STRING,default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:j.STRING,default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:j.STRING,default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:j.BOOLEAN,default:!0},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:j.BOOLEAN,default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:j.BOOLEAN,default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:j.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:j.STRING,default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:j.STRING,default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:j.NUMBER,default:6e4},httpRetry:{description:"Retry times on http failure",type:j.NUMBER,default:3},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:j.BOOLEAN,default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:j.BOOLEAN,default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:j.STRING,default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:j.MAP,valueDefinition:{description:"",type:j.ANY}}};function H(e,t,r,n,i){if(n.isArray)return Array.isArray(r)?r.map((r,o)=>z(e,`${t}[${o}]`,r,n,i)):String(r).split(/,/).map(r=>z(e,t,r,n,i));if(Array.isArray(r))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return z(e,t,r,n,i)}function z(e,t,r,n,o){var s;switch(n.type){case j.ANY:return r;case j.SHAPE:return function(e,t,r,n,i){if("object"!=typeof r||Array.isArray(r))throw new h.UsageError(`Object configuration settings "${t}" must be an object`);const o=q(e,n);if(null===r)return o;for(const[s,A]of Object.entries(r)){const r=`${t}.${s}`;if(!n.properties[s])throw new h.UsageError(`Unrecognized configuration settings found: ${t}.${s} - run "yarn config -v" to see the list of settings supported in Yarn`);o.set(s,H(e,r,A,n.properties[s],i))}return o}(e,t,r,n,o);case j.MAP:return function(e,t,r,n,i){const o=new Map;if("object"!=typeof r||Array.isArray(r))throw new h.UsageError(`Map configuration settings "${t}" must be an object`);if(null===r)return o;for(const[s,A]of Object.entries(r)){const r=n.normalizeKeys?n.normalizeKeys(s):s,a=`${t}['${r}']`,c=n.valueDefinition;o.set(r,H(e,a,A,c,i))}return o}(e,t,r,n,o)}if(null===r&&!n.isNullable&&null!==n.default)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if(null===(s=n.values)||void 0===s?void 0:s.includes(r))return r;const A=(()=>{if(n.type===j.BOOLEAN)return function(e){switch(e){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${e}" as a boolean`)}}(r);if("string"!=typeof r)throw new Error(`Expected value (${r}) to be a string`);const e=x.replaceEnvVariables(r,{env:process.env});switch(n.type){case j.ABSOLUTE_PATH:return i.y1.resolve(o,i.cS.toPortablePath(e));case j.LOCATOR_LOOSE:return C.parseLocator(e,!1);case j.NUMBER:return parseInt(e);case j.LOCATOR:return C.parseLocator(e);default:return e}})();if(n.values&&!n.values.includes(A))throw new Error("Invalid value, expected one of "+n.values.join(", "));return A}function q(e,t){switch(t.type){case j.SHAPE:{const r=new Map;for(const[n,i]of Object.entries(t.properties))r.set(n,q(e,i));return r}case j.MAP:return new Map;case j.ABSOLUTE_PATH:return null===t.default?null:null===e.projectCwd?i.y1.isAbsolute(t.default)?i.y1.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(t=>i.y1.resolve(e.projectCwd,t)):i.y1.resolve(e.projectCwd,t.default);default:return t.default}}function W(){for(const[e,t]of Object.entries(process.env))if("yarn_rc_filename"===e.toLowerCase()&&"string"==typeof t)return t;return O}var V;!function(e){e[e.LOCKFILE=0]="LOCKFILE",e[e.MANIFEST=1]="MANIFEST",e[e.NONE=2]="NONE"}(V||(V={}));class X{constructor(e){this.projectCwd=null,this.plugins=new Map,this.settings=new Map,this.values=new Map,this.sources=new Map,this.invalid=new Map,this.packageExtensions=new Map,this.startingCwd=e}static create(e,t,r){const n=new X(e);void 0===t||t instanceof Map||(n.projectCwd=t),n.importSettings(J);const i=void 0!==r?r:t instanceof Map?t:new Map;for(const[e,t]of i)n.activatePlugin(e,t);return n}static async find(e,t,{lookup:r=V.LOCKFILE,strict:n=!0,usePath:s=!1,useRc:A=!0}={}){const c=function(){const e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith("yarn_")&&(t=a()(t.slice("yarn_".length)),e[t]=r);return e}();delete c.rcFilename;const u=await X.findRcFiles(e),l=await X.findHomeRcFile(),g=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:n})=>({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:n}),f=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:n,...i})=>i,p=new X(e);p.importSettings(g(J)),p.useWithSource("",g(c),e,{strict:!1});for(const{path:e,cwd:t,data:r}of u)p.useWithSource(e,g(r),t,{strict:!1});if(l&&p.useWithSource(l.path,g(l.data),l.cwd,{strict:!1}),s){const e=p.get("yarnPath"),t=p.get("ignorePath");if(null!==e&&!t)return p}const d=p.get("lockfileFilename");let C;switch(r){case V.LOCKFILE:C=await X.findProjectCwd(e,d);break;case V.MANIFEST:C=await X.findProjectCwd(e,null);break;case V.NONE:C=o.xfs.existsSync(i.y1.join(e,"package.json"))?i.y1.resolve(e):null}p.startingCwd=e,p.projectCwd=C,p.importSettings(f(J));const I=new Map([["@@core",E]]);if(null!==t){for(const e of t.plugins.keys())I.set(e,(m=t.modules.get(e)).__esModule?m.default:m);const r=new Map;for(const e of new Set(M().builtinModules||Object.keys(process.binding("natives"))))r.set(e,()=>N(e));for(const[e,n]of t.modules)r.set(e,()=>n);const n=new Set,o=e=>e.default||e,s=(e,t)=>{const{factory:s,name:A}=N(i.cS.fromPortablePath(e));if(n.has(A))return;const a=new Map(r),c=e=>{if(a.has(e))return a.get(e)();throw new h.UsageError(`This plugin cannot access the package referenced via ${e} which is neither a builtin, nor an exposed entry`)},u=x.prettifySyncErrors(()=>o(s(c)),e=>`${e} (when initializing ${A}, defined in ${t})`);r.set(A,()=>u),n.add(A),I.set(A,u)};if(c.plugins)for(const t of c.plugins.split(";")){s(i.y1.resolve(e,i.cS.toPortablePath(t)),"")}for(const{path:e,cwd:t,data:r}of u)if(A&&Array.isArray(r.plugins))for(const n of r.plugins){const r="string"!=typeof n?n.path:n;s(i.y1.resolve(t,i.cS.toPortablePath(r)),e)}}var m;for(const[e,t]of I)p.activatePlugin(e,t);p.useWithSource("",f(c),e,{strict:n});for(const{path:e,cwd:t,data:r}of u)p.useWithSource(e,f(r),t,{strict:n});return l&&p.useWithSource(l.path,f(l.data),l.cwd,{strict:n}),p.get("enableGlobalCache")&&(p.values.set("cacheFolder",p.get("globalFolder")+"/cache"),p.sources.set("cacheFolder","")),await p.refreshPackageExtensions(),p}static async findRcFiles(e){const t=W(),r=[];let n=e,A=null;for(;n!==A;){A=n;const e=i.y1.join(A,t);if(o.xfs.existsSync(e)){const t=await o.xfs.readFilePromise(e,"utf8");let n;try{n=(0,s.parseSyml)(t)}catch(r){let n="";throw t.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(n=" (in particular, make sure you list the colons after each key name)"),new h.UsageError(`Parse error when loading ${e}; please check it's proper Yaml${n}`)}r.push({path:e,cwd:A,data:n})}n=i.y1.dirname(A)}return r}static async findHomeRcFile(){const e=W(),t=k.getHomeFolder(),r=i.y1.join(t,e);if(o.xfs.existsSync(r)){const e=await o.xfs.readFilePromise(r,"utf8");return{path:r,cwd:t,data:(0,s.parseSyml)(e)}}return null}static async findProjectCwd(e,t){let r=null,n=e,s=null;for(;n!==s;){if(s=n,o.xfs.existsSync(i.y1.join(s,(0,i.Zu)("package.json")))&&(r=s),null!==t){if(o.xfs.existsSync(i.y1.join(s,t))){r=s;break}}else if(null!==r)break;n=i.y1.dirname(s)}return r}static async updateConfiguration(e,t){const r=W(),n=i.y1.join(e,r),A=o.xfs.existsSync(n)?(0,s.parseSyml)(await o.xfs.readFilePromise(n,"utf8")):{};let a=!1;if("function"==typeof t&&(t=t(A)),"function"==typeof t)throw new Error("Assertion failed: Invalid configuration type");for(const e of Object.keys(t)){const r=A[e],n="function"==typeof t[e]?t[e](r):t[e];r!==n&&(A[e]=n,a=!0)}a&&await o.xfs.changeFilePromise(n,(0,s.stringifySyml)(A),{automaticNewlines:!0})}static async updateHomeConfiguration(e){const t=k.getHomeFolder();return await X.updateConfiguration(t,e)}activatePlugin(e,t){this.plugins.set(e,t),void 0!==t.configuration&&this.importSettings(t.configuration)}importSettings(e){for(const[t,r]of Object.entries(e)){if(this.settings.has(t))throw new Error(`Cannot redefine settings "${t}"`);this.settings.set(t,r),this.values.set(t,q(this,r))}}useWithSource(e,t,r,{strict:n=!0,overwrite:i=!1}){try{this.use(e,t,r,{strict:n,overwrite:i})}catch(t){throw t.message+=` (in ${e})`,t}}use(e,t,r,{strict:n=!0,overwrite:i=!1}){for(const o of Object.keys(t)){if(void 0===t[o])continue;if("plugins"===o)continue;if(""===e&&P.has(o))continue;if("rcFilename"===o)throw new h.UsageError(`The rcFilename settings can only be set via ${"yarn_RC_FILENAME".toUpperCase()}, not via a rc file`);const s=this.settings.get(o);if(!s){if(n)throw new h.UsageError(`Unrecognized or legacy configuration settings found: ${o} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(o,e);continue}if(this.sources.has(o)&&!i)continue;let A;try{A=H(this,o,t[o],s,r)}catch(t){throw t.message+=" in "+e,t}this.values.set(o,A),this.sources.set(o,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:t=!1,getNativePaths:r=!1}){const n=this.get(e),o=this.settings.get(e);if(void 0===o)throw new h.UsageError(`Couldn't find a configuration settings named "${e}"`);return function e(t,r,n){if(r.type===j.SECRET&&"string"==typeof t&&n.hideSecrets)return"********";if(r.type===j.ABSOLUTE_PATH&&"string"==typeof t&&n.getNativePaths)return i.cS.fromPortablePath(t);if(r.isArray&&Array.isArray(t)){const i=[];for(const o of t)i.push(e(o,r,n));return i}if(r.type===j.MAP&&t instanceof Map){const i=new Map;for(const[o,s]of t.entries())i.set(o,e(s,r.valueDefinition,n));return i}if(r.type===j.SHAPE&&t instanceof Map){const i=new Map;for(const[o,s]of t.entries()){const t=r.properties[o];i.set(o,e(s,t,n))}return i}return t}(n,o,{hideSecrets:t,getNativePaths:r})}getSubprocessStreams(e,{header:t,prefix:r,report:n}){let i,s;const A=o.xfs.createWriteStream(e);if(this.get("enableInlineBuilds")){const e=n.createStreamReporter(`${r} ${this.format("STDOUT","green")}`),t=n.createStreamReporter(`${r} ${this.format("STDERR","red")}`);i=new p.PassThrough,i.pipe(e),i.pipe(A),s=new p.PassThrough,s.pipe(t),s.pipe(A)}else i=A,s=A,void 0!==t&&i.write(t+"\n");return{stdout:i,stderr:s}}makeResolver(){const e=[];for(const t of this.plugins.values())for(const r of t.resolvers||[])e.push(new r);return new w.B([new v,new b.d,new B.O,...e])}makeFetcher(){const e=[];for(const t of this.plugins.values())for(const r of t.fetchers||[])e.push(new r);return new y([new Q.N,new S,...e])}getLinkers(){const e=[];for(const t of this.plugins.values())for(const r of t.linkers||[])e.push(new r);return e}async refreshPackageExtensions(){this.packageExtensions=new Map;const e=this.packageExtensions,t=(t,r)=>{if(!f().validRange(t.range))throw new Error("Only semver ranges are allowed as keys for the lockfileExtensions setting");const n=new I.G;n.load(r),x.getArrayWithDefault(e,t.identHash).push({range:t.range,patch:e=>{e.dependencies=new Map([...e.dependencies,...n.dependencies]),e.peerDependencies=new Map([...e.peerDependencies,...n.peerDependencies]),e.dependenciesMeta=new Map([...e.dependenciesMeta,...n.dependenciesMeta]),e.peerDependenciesMeta=new Map([...e.peerDependenciesMeta,...n.peerDependenciesMeta])}})};for(const[e,r]of this.get("packageExtensions"))t(C.parseDescriptor(e,!0),r);await this.triggerHook(e=>e.registerPackageExtensions,this,t)}normalizePackage(e){const t=C.copyPackage(e);if(null==this.packageExtensions)throw new Error("refreshPackageExtensions has to be called before normalizing packages");const r=this.packageExtensions.get(e.identHash);if(void 0!==r){const n=e.version;if(null!==n){const e=r.find(({range:e})=>R.satisfiesWithPrereleases(n,e));void 0!==e&&e.patch(t)}}return t.dependencies=new Map(x.sortMap(t.dependencies,([,e])=>e.name)),t.peerDependencies=new Map(x.sortMap(t.peerDependencies,([,e])=>e.name)),t}async triggerHook(e,...t){for(const r of this.plugins.values()){const n=r.hooks;if(!n)continue;const i=e(n);i&&await i(...t)}}async triggerMultipleHooks(e,t){for(const r of t)await this.triggerHook(e,...r)}async reduceHook(e,t,...r){let n=t;for(const t of this.plugins.values()){const i=t.hooks;if(!i)continue;const o=e(i);o&&(n=await o(n,...r))}return n}async firstHook(e,...t){for(const r of this.plugins.values()){const n=r.hooks;if(!n)continue;const i=e(n);if(!i)continue;const o=await i(...t);if(void 0!==o)return o}return null}format(e,t){if(t===Y.PATH&&(e=i.cS.fromPortablePath(e)),!this.get("enableColors"))return e;let r=G.get(t);void 0===r&&(r=t);return("number"==typeof r?_.ansi256(r):r.startsWith("#")?_.hex(r):_[r])(e)}}},92409:(e,t,r)=>{"use strict";var n;r.d(t,{k:()=>n}),function(e){e[e.SCRIPT=0]="SCRIPT",e[e.SHELLCODE=1]="SHELLCODE"}(n||(n={}))},62152:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r(35691);class i extends n.yG{constructor({configuration:e,stdout:t,suggestInstall:r=!0}){super(),this.errorCount=0,this.configuration=e,this.stdout=t,this.suggestInstall=r}static async start(e,t){const r=new this(e);try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize()}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t){return t()}async startTimerPromise(e,t){return await t()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){this.errorCount+=1,this.stdout.write(`${this.configuration.format("➤","redBright")} ${this.formatName(e)}: ${t}\n`)}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(this.configuration.format("➤","redBright")+" Errors happened when preparing the environment required to run this command.\n"),this.suggestInstall&&this.stdout.write(this.configuration.format("➤","redBright")+' This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.\n'))}formatName(e){return"BR"+e.toString(10).padStart(4,"0")}}},46611:(e,t,r)=>{"use strict";r.d(t,{G:()=>u});var n=r(78420),i=r(46009),o=r(55125),s=r(10966),A=r.n(s),a=r(73632),c=r(54143);class u{constructor(){this.indent=" ",this.name=null,this.version=null,this.os=null,this.cpu=null,this.type=null,this.private=!1,this.license=null,this.main=null,this.module=null,this.languageName=null,this.bin=new Map,this.scripts=new Map,this.dependencies=new Map,this.devDependencies=new Map,this.peerDependencies=new Map,this.workspaceDefinitions=[],this.dependenciesMeta=new Map,this.peerDependenciesMeta=new Map,this.resolutions=[],this.files=null,this.publishConfig=null,this.preferUnplugged=null,this.raw={},this.errors=[]}static async tryFind(e,{baseFs:t=new n.S}={}){const r=i.y1.join(e,(0,i.Zu)("package.json"));return await t.existsPromise(r)?await u.fromFile(r,{baseFs:t}):null}static async find(e,{baseFs:t}={}){const r=await u.tryFind(e,{baseFs:t});if(null===r)throw new Error("Manifest not found");return r}static async fromFile(e,{baseFs:t=new n.S}={}){const r=new u;return await r.loadFile(e,{baseFs:t}),r}static fromText(e){const t=new u;return t.loadFromText(e),t}loadFromText(e){let t;try{t=JSON.parse(h(e)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(t),this.indent=l(e)}async loadFile(e,{baseFs:t=new n.S}){const r=await t.readFilePromise(e,"utf8");let i;try{i=JSON.parse(h(r)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(i),this.indent=l(r)}load(e){if("object"!=typeof e||null===e)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;const t=[];if("string"==typeof e.name)try{this.name=c.parseIdent(e.name)}catch(e){t.push(new Error("Parsing failed for the 'name' field"))}if("string"==typeof e.version&&(this.version=e.version),Array.isArray(e.os)){const r=[];this.os=r;for(const n of e.os)"string"!=typeof n?t.push(new Error("Parsing failed for the 'os' field")):r.push(n)}if(Array.isArray(e.cpu)){const r=[];this.cpu=r;for(const n of e.cpu)"string"!=typeof n?t.push(new Error("Parsing failed for the 'cpu' field")):r.push(n)}if("string"==typeof e.type&&(this.type=e.type),"boolean"==typeof e.private&&(this.private=e.private),"string"==typeof e.license&&(this.license=e.license),"string"==typeof e.languageName&&(this.languageName=e.languageName),"string"==typeof e.bin)null!==this.name?this.bin=new Map([[this.name.name,e.bin]]):t.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.bin&&null!==e.bin)for(const[r,n]of Object.entries(e.bin))"string"==typeof n?this.bin.set(r,n):t.push(new Error(`Invalid bin definition for '${r}'`));if("object"==typeof e.scripts&&null!==e.scripts)for(const[r,n]of Object.entries(e.scripts))"string"==typeof n?this.scripts.set(r,n):t.push(new Error(`Invalid script definition for '${r}'`));if("object"==typeof e.dependencies&&null!==e.dependencies)for(const[r,n]of Object.entries(e.dependencies)){if("string"!=typeof n){t.push(new Error(`Invalid dependency range for '${r}'`));continue}let e;try{e=c.parseIdent(r)}catch(e){t.push(new Error(`Parsing failed for the dependency name '${r}'`));continue}const i=c.makeDescriptor(e,n);this.dependencies.set(i.identHash,i)}if("object"==typeof e.devDependencies&&null!==e.devDependencies)for(const[r,n]of Object.entries(e.devDependencies)){if("string"!=typeof n){t.push(new Error(`Invalid dependency range for '${r}'`));continue}let e;try{e=c.parseIdent(r)}catch(e){t.push(new Error(`Parsing failed for the dependency name '${r}'`));continue}const i=c.makeDescriptor(e,n);this.devDependencies.set(i.identHash,i)}if("object"==typeof e.peerDependencies&&null!==e.peerDependencies)for(let[r,n]of Object.entries(e.peerDependencies)){let e;try{e=c.parseIdent(r)}catch(e){t.push(new Error(`Parsing failed for the dependency name '${r}'`));continue}"string"==typeof n&&A().validRange(n)||(t.push(new Error(`Invalid dependency range for '${r}'`)),n="*");const i=c.makeDescriptor(e,n);this.peerDependencies.set(i.identHash,i)}const r=Array.isArray(e.workspaces)?e.workspaces:"object"==typeof e.workspaces&&null!==e.workspaces&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];for(const e of r)"string"==typeof e?this.workspaceDefinitions.push({pattern:e}):t.push(new Error(`Invalid workspace definition for '${e}'`));if("object"==typeof e.dependenciesMeta&&null!==e.dependenciesMeta)for(const[r,n]of Object.entries(e.dependenciesMeta)){if("object"!=typeof n||null===n){t.push(new Error("Invalid meta field for '"+r));continue}const e=c.parseDescriptor(r),i=this.ensureDependencyMeta(e);Object.assign(i,n)}if("object"==typeof e.peerDependenciesMeta&&null!==e.peerDependenciesMeta)for(const[r,n]of Object.entries(e.peerDependenciesMeta)){if("object"!=typeof n||null===n){t.push(new Error("Invalid meta field for '"+r));continue}const e=c.parseDescriptor(r),i=this.ensurePeerDependencyMeta(e);Object.assign(i,n)}if("object"==typeof e.resolutions&&null!==e.resolutions)for(const[r,n]of Object.entries(e.resolutions))if("string"==typeof n)try{this.resolutions.push({pattern:(0,o.parseResolution)(r),reference:n})}catch(e){t.push(e);continue}else t.push(new Error(`Invalid resolution entry for '${r}'`));if(Array.isArray(e.files)&&0!==e.files.length){this.files=new Set;for(const r of e.files)"string"==typeof r?this.files.add(r):t.push(new Error(`Invalid files entry for '${r}'`))}if("object"==typeof e.publishConfig&&null!==e.publishConfig)if(this.publishConfig={},"string"==typeof e.publishConfig.access&&(this.publishConfig.access=e.publishConfig.access),"string"==typeof e.publishConfig.main&&(this.publishConfig.main=e.publishConfig.main),"string"==typeof e.publishConfig.registry&&(this.publishConfig.registry=e.publishConfig.registry),"string"==typeof e.publishConfig.module&&(this.publishConfig.module=e.publishConfig.module),"string"==typeof e.publishConfig.bin)null!==this.name?this.publishConfig.bin=new Map([[this.name.name,e.publishConfig.bin]]):t.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.publishConfig.bin&&null!==e.publishConfig.bin){this.publishConfig.bin=new Map;for(const[r,n]of Object.entries(e.publishConfig.bin))"string"==typeof n?this.publishConfig.bin.set(r,n):t.push(new Error(`Invalid bin definition for '${r}'`))}if("object"==typeof e.optionalDependencies&&null!==e.optionalDependencies)for(const[r,n]of Object.entries(e.optionalDependencies)){if("string"!=typeof n){t.push(new Error(`Invalid dependency range for '${r}'`));continue}let e;try{e=c.parseIdent(r)}catch(e){t.push(new Error(`Parsing failed for the dependency name '${r}'`));continue}const i=c.makeDescriptor(e,n);this.dependencies.set(i.identHash,i);const o=c.makeDescriptor(e,"unknown"),s=this.ensureDependencyMeta(o);Object.assign(s,{optional:!0})}"boolean"==typeof e.preferUnplugged&&(this.preferUnplugged=e.preferUnplugged),this.errors=t}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!this.dependencies.has(e.identHash)||!!this.peerDependencies.has(e.identHash)}hasHardDependency(e){return!!this.dependencies.has(e.identHash)||!!this.devDependencies.has(e.identHash)}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!this.hasHardDependency(e)||!!this.hasSoftDependency(e)}isCompatibleWithOS(e){return null===this.os||g(this.os,e)}isCompatibleWithCPU(e){return null===this.cpu||g(this.cpu,e)}ensureDependencyMeta(e){if("unknown"!==e.range&&!A().valid(e.range))throw new Error(`Invalid meta field range for '${c.stringifyDescriptor(e)}'`);const t=c.stringifyIdent(e),r="unknown"!==e.range?e.range:null;let n=this.dependenciesMeta.get(t);n||this.dependenciesMeta.set(t,n=new Map);let i=n.get(r);return i||n.set(r,i={}),i}ensurePeerDependencyMeta(e){if("unknown"!==e.range)throw new Error(`Invalid meta field range for '${c.stringifyDescriptor(e)}'`);const t=c.stringifyIdent(e);let r=this.peerDependenciesMeta.get(t);return r||this.peerDependenciesMeta.set(t,r={}),this.peerDependencies.has(e.identHash)||this.peerDependencies.set(e.identHash,c.makeDescriptor(e,"*")),r}setRawField(e,t,{after:r=[]}={}){const n=new Set(r.filter(e=>Object.prototype.hasOwnProperty.call(this.raw,e)));if(0===n.size||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=t;else{const r=this.raw,i=this.raw={};let o=!1;for(const s of Object.keys(r))i[s]=r[s],o||(n.delete(s),0===n.size&&(i[e]=t,o=!0))}}exportTo(e,{compatibilityMode:t=!0}={}){Object.assign(e,this.raw),null!==this.name?e.name=c.stringifyIdent(this.name):delete e.name,null!==this.version?e.version=this.version:delete e.version,null!==this.os?e.os=this.os:delete this.os,null!==this.cpu?e.cpu=this.cpu:delete this.cpu,null!==this.type?e.type=this.type:delete e.type,this.private?e.private=!0:delete e.private,null!==this.license?e.license=this.license:delete e.license,null!==this.languageName?e.languageName=this.languageName:delete e.languageName,1===this.bin.size&&null!==this.name&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(e=>({[e]:this.bin.get(e)}))):delete e.bin;const r=[],n=[];for(const e of this.dependencies.values()){const i=this.dependenciesMeta.get(c.stringifyIdent(e));let o=!1;if(t&&i){const e=i.get(null);e&&e.optional&&(o=!0)}o?n.push(e):r.push(e)}r.length>0?e.dependencies=Object.assign({},...c.sortDescriptors(r).map(e=>({[c.stringifyIdent(e)]:e.range}))):delete e.dependencies,n.length>0?e.optionalDependencies=Object.assign({},...c.sortDescriptors(n).map(e=>({[c.stringifyIdent(e)]:e.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...c.sortDescriptors(this.devDependencies.values()).map(e=>({[c.stringifyIdent(e)]:e.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...c.sortDescriptors(this.peerDependencies.values()).map(e=>({[c.stringifyIdent(e)]:e.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(const[r,n]of a.sortMap(this.dependenciesMeta.entries(),([e,t])=>e))for(const[i,o]of a.sortMap(n.entries(),([e,t])=>null!==e?"0"+e:"1")){const n=null!==i?c.stringifyDescriptor(c.makeDescriptor(c.parseIdent(r),i)):r,s={...o};t&&null===i&&delete s.optional,0!==Object.keys(s).length&&(e.dependenciesMeta[n]=s)}return 0===Object.keys(e.dependenciesMeta).length&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...a.sortMap(this.peerDependenciesMeta.entries(),([e,t])=>e).map(([e,t])=>({[e]:t}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:e,reference:t})=>({[(0,o.stringifyResolution)(e)]:t}))):delete e.resolutions,null!==this.files?e.files=Array.from(this.files):delete e.files,null!==this.preferUnplugged?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,e}}function l(e){const t=e.match(/^[ \t]+/m);return t?t[0]:" "}function h(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function g(e,t){let r=!0,n=!1;for(const i of e)if("!"===i[0]){if(n=!0,t===i.slice(1))return!1}else if(r=!1,i===t)return!0;return n&&r}u.fileName="package.json",u.allDependencies=["dependencies","devDependencies","peerDependencies"],u.hardDependencies=["dependencies","devDependencies"]},92659:(e,t,r)=>{"use strict";var n;r.d(t,{b:()=>n}),function(e){e[e.UNNAMED=0]="UNNAMED",e[e.EXCEPTION=1]="EXCEPTION",e[e.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",e[e.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",e[e.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",e[e.BUILD_DISABLED=5]="BUILD_DISABLED",e[e.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",e[e.MUST_BUILD=7]="MUST_BUILD",e[e.MUST_REBUILD=8]="MUST_REBUILD",e[e.BUILD_FAILED=9]="BUILD_FAILED",e[e.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",e[e.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",e[e.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",e[e.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",e[e.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",e[e.REMOTE_INVALID=15]="REMOTE_INVALID",e[e.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",e[e.RESOLUTION_PACK=17]="RESOLUTION_PACK",e[e.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",e[e.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",e[e.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",e[e.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",e[e.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",e[e.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",e[e.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",e[e.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",e[e.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",e[e.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",e[e.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",e[e.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",e[e.FETCH_FAILED=30]="FETCH_FAILED",e[e.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",e[e.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",e[e.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",e[e.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",e[e.NETWORK_ERROR=35]="NETWORK_ERROR",e[e.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",e[e.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",e[e.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",e[e.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",e[e.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",e[e.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",e[e.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",e[e.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",e[e.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",e[e.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",e[e.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",e[e.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",e[e.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",e[e.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",e[e.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",e[e.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",e[e.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",e[e.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",e[e.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",e[e.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",e[e.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",e[e.INVALID_MANIFEST=57]="INVALID_MANIFEST",e[e.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",e[e.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",e[e.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",e[e.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",e[e.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",e[e.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU"}(n||(n={}))},27092:(e,t,r)=>{"use strict";r.d(t,{B:()=>i});var n=r(54143);class i{constructor(e){this.resolvers=e.filter(e=>e)}supportsDescriptor(e,t){return!!this.tryResolverByDescriptor(e,t)}supportsLocator(e,t){return!!this.tryResolverByLocator(e,t)}shouldPersistResolution(e,t){return this.getResolverByLocator(e,t).shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.getResolverByDescriptor(e,r).bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.getResolverByDescriptor(e,t).getResolutionDependencies(e,t)}async getCandidates(e,t,r){const n=this.getResolverByDescriptor(e,r);return await n.getCandidates(e,t,r)}async resolve(e,t){const r=this.getResolverByLocator(e,t);return await r.resolve(e,t)}tryResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));return r||null}getResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));if(!r)throw new Error(n.prettyDescriptor(t.project.configuration,e)+" isn't supported by any available resolver");return r}tryResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));return r||null}getResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));if(!r)throw new Error(n.prettyLocator(t.project.configuration,e)+" isn't supported by any available resolver");return r}}},40376:(e,t,r)=>{"use strict";r.d(t,{I:()=>ne});var n=r(56537),i=r(46009),o=r(35398),s=r(55125),A=r(17278),a=r(76417);function c(){}function u(e,t,r,n,i){for(var o=0,s=t.length,A=0,a=0;oe.length?r:e})),c.value=e.join(l)}else c.value=e.join(r.slice(A,A+c.count));A+=c.count,c.added||(a+=c.count)}}var h=t[s-1];return s>1&&"string"==typeof h.value&&(h.added||h.removed)&&e.equals("",h.value)&&(t[s-2].value+=h.value,t.pop()),t}function l(e){return{newPos:e.newPos,components:e.components.slice(0)}}c.prototype={diff:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.callback;"function"==typeof r&&(n=r,r={}),this.options=r;var i=this;function o(e){return n?(setTimeout((function(){n(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,A=e.length,a=1,c=s+A,h=[{newPos:-1,components:[]}],g=this.extractCommon(h[0],t,e,0);if(h[0].newPos+1>=s&&g+1>=A)return o([{value:this.join(t),count:t.length}]);function f(){for(var r=-1*a;r<=a;r+=2){var n=void 0,c=h[r-1],g=h[r+1],f=(g?g.newPos:0)-r;c&&(h[r-1]=void 0);var p=c&&c.newPos+1=s&&f+1>=A)return o(u(i,n.components,t,e,i.useLongestToken));h[r]=n}else h[r]=void 0}a++}if(n)!function e(){setTimeout((function(){if(a>c)return n();f()||e()}),0)}();else for(;a<=c;){var p=f();if(p)return p}},pushComponent:function(e,t,r){var n=e[e.length-1];n&&n.added===t&&n.removed===r?e[e.length-1]={count:n.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,n){for(var i=t.length,o=r.length,s=e.newPos,A=s-n,a=0;s+10?a(p.lines.slice(-s.context)):[],u-=h.length,l-=h.length)}(o=h).push.apply(o,I(i.map((function(e){return(t.added?"+":"-")+e})))),t.added?f+=i.length:g+=i.length}else{if(u)if(i.length<=2*s.context&&e=A.length-2&&i.length<=s.context){var y=/\n$/.test(r),w=/\n$/.test(n),B=0==i.length&&h.length>m.oldLines;!y&&B&&h.splice(m.oldLines,0,"\\ No newline at end of file"),(y||B)&&w||h.push("\\ No newline at end of file")}c.push(m),u=0,l=0,h=[]}g+=i.length,f+=i.length}},C=0;C`${r}#commit:${n}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",n,i)=>`https://${r}github.com/${n}.git#commit:${i}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",n,i)=>`https://${r}github.com/${n}.git#commit:${i}`],[/^https?:\/\/[^/]+\/(?:@[^/]+\/)?([^/]+)\/-\/\1-[^/]+\.tgz(?:#|$)/,e=>"npm:"+e],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>"npm:"+e]];class O{constructor(){this.resolutions=null}async setup(e,{report:t}){const r=i.y1.join(e.cwd,e.configuration.get("lockfileFilename"));if(!n.xfs.existsSync(r))return;const o=await n.xfs.readFilePromise(r,"utf8"),A=(0,s.parseSyml)(o);if(Object.prototype.hasOwnProperty.call(A,"__metadata"))return;const a=this.resolutions=new Map;for(const r of Object.keys(A)){let n=_.tryParseDescriptor(r);if(!n){t.reportWarning(T.b.YARN_IMPORT_FAILED,`Failed to parse the string "${r}" into a proper descriptor`);continue}k().validRange(n.range)&&(n=_.makeDescriptor(n,"npm:"+n.range));const{version:i,resolved:o}=A[r];if(!o)continue;let s;for(const[e,t]of P){const r=o.match(e);if(r){s=t(i,...r);break}}if(!s){t.reportWarning(T.b.YARN_IMPORT_FAILED,`${_.prettyDescriptor(e.configuration,n)}: Only some patterns can be imported from legacy lockfiles (not "${o}")`);continue}const c=_.makeLocator(n,s);a.set(n.descriptorHash,c)}}supportsDescriptor(e,t){return!!this.resolutions&&this.resolutions.has(e.descriptorHash)}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");const n=this.resolutions.get(e.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");return[n]}async resolve(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}class U{supportsDescriptor(e,t){return!!t.project.storedResolutions.get(e.descriptorHash)||!!t.project.originalPackages.has(_.convertDescriptorToLocator(e).locatorHash)}supportsLocator(e,t){return!!t.project.originalPackages.has(e.locatorHash)}shouldPersistResolution(e,t){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let n=r.project.originalPackages.get(_.convertDescriptorToLocator(e).locatorHash);if(n)return[n];const i=r.project.storedResolutions.get(e.descriptorHash);if(!i)throw new Error("Expected the resolution to have been successful - resolution not found");if(n=r.project.originalPackages.get(i),!n)throw new Error("Expected the resolution to have been successful - package not found");return[n]}async resolve(e,t){const r=t.project.originalPackages.get(e.locatorHash);if(!r)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return r}}var j=r(46611),Y=r(27092),G=r(35691);class J{constructor(e){this.resolver=e}supportsDescriptor(e,t){return this.resolver.supportsDescriptor(e,t)}supportsLocator(e,t){return this.resolver.supportsLocator(e,t)}shouldPersistResolution(e,t){return this.resolver.shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.resolver.bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.resolver.getResolutionDependencies(e,t)}async getCandidates(e,t,r){throw new G.lk(T.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}async resolve(e,t){throw new G.lk(T.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}}var H=r(33720),z=r(17722),q=r(81111),W=r(20624),V=r(73632),X=r(63088),Z=r(36545),$=r(32485);const ee=/ *, */g,te=(0,x.promisify)(R().gzip),re=(0,x.promisify)(R().gunzip);class ne{constructor(e,{configuration:t}){this.resolutionAliases=new Map,this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map,this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.storedChecksums=new Map,this.accessibleLocators=new Set,this.originalPackages=new Map,this.optionalBuilds=new Set,this.lockFileChecksum=null,this.configuration=t,this.cwd=e}static async find(e,t){if(!e.projectCwd)throw new A.UsageError("No project found in "+t);let r=e.projectCwd,o=t,s=null;for(;s!==e.projectCwd;){if(s=o,n.xfs.existsSync(i.y1.join(s,(0,i.Zu)("package.json")))){r=s;break}o=i.y1.dirname(s)}const a=new ne(e.projectCwd,{configuration:e});await a.setupResolutions(),await a.setupWorkspaces();const c=a.tryWorkspaceByCwd(r);if(c)return{project:a,workspace:c,locator:c.anchoredLocator};const u=await a.findLocatorForLocation(r+"/");if(u)return{project:a,locator:u,workspace:null};throw new A.UsageError(`The nearest package directory (${r}) doesn't seem to be part of the project declared at ${a.cwd}. If the project directory is right, it might be that you forgot to list a workspace. If it isn't, it's likely because you have a yarn.lock file at the detected location, confusing the project detection.`)}static generateBuildStateFile(e,t){let r="# Warning: This file is automatically generated. Removing it is fine, but will\n# cause all your builds to become invalidated.\n";const n=[...e].map(([e,r])=>{const n=t.get(e);if(void 0===n)throw new Error("Assertion failed: The locator should have been registered");return[_.stringifyLocator(n),n.locatorHash,r]});for(const[e,t,i]of V.sortMap(n,[e=>e[0],e=>e[1]]))r+="\n",r+=`# ${e}\n`,r+=JSON.stringify(t)+":\n",r+=` ${i}\n`;return r}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;const e=i.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.configuration.get("defaultLanguageName");if(n.xfs.existsSync(e)){const r=await n.xfs.readFilePromise(e,"utf8");this.lockFileChecksum=W.makeHash("1",r);const i=(0,s.parseSyml)(r);if(i.__metadata){const e=i.__metadata.version,r=i.__metadata.cacheKey;for(const n of Object.keys(i)){if("__metadata"===n)continue;const o=i[n];if(void 0===o.resolution)throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${n})`);const s=_.parseLocator(o.resolution,!0),A=new j.G;A.load(o);const a=A.version,c=A.languageName||t,u=o.linkType.toUpperCase(),l=A.dependencies,h=A.peerDependencies,g=A.dependenciesMeta,f=A.peerDependenciesMeta,p=A.bin;if(null!=o.checksum){const e=void 0===r||o.checksum.includes("/")?o.checksum:`${r}/${o.checksum}`;this.storedChecksums.set(s.locatorHash,e)}if(e>=4){const e={...s,version:a,languageName:c,linkType:u,dependencies:l,peerDependencies:h,dependenciesMeta:g,peerDependenciesMeta:f,bin:p};this.originalPackages.set(e.locatorHash,e)}for(const t of n.split(ee)){const r=_.parseDescriptor(t);if(this.storedDescriptors.set(r.descriptorHash,r),e>=4)this.storedResolutions.set(r.descriptorHash,s.locatorHash);else{const e=_.convertLocatorToDescriptor(s);e.descriptorHash!==r.descriptorHash&&(this.storedDescriptors.set(e.descriptorHash,e),this.resolutionAliases.set(r.descriptorHash,e.descriptorHash))}}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){const t=e;e=[];for(const r of t){if(this.workspacesByCwd.has(r))continue;const t=await this.addWorkspace(r),n=this.storedPackages.get(t.anchoredLocator.locatorHash);n&&(t.dependencies=n.dependencies);for(const r of t.workspacesCwds)e.push(r)}}}async addWorkspace(e){const t=new z.j(e,{project:this});await t.setup();const r=this.workspacesByIdent.get(t.locator.identHash);if(void 0!==r)throw new Error(`Duplicate workspace name ${_.prettyIdent(this.configuration,t.locator)}: ${e} conflicts with ${r.cwd}`);return this.workspaces.push(t),this.workspacesByCwd.set(e,t),this.workspacesByIdent.set(t.locator.identHash,t),t}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){i.y1.isAbsolute(e)||(e=i.y1.resolve(this.cwd,e));const t=this.workspacesByCwd.get(e);return t||null}getWorkspaceByCwd(e){const t=this.tryWorkspaceByCwd(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByFilePath(e){let t=null;for(const r of this.workspaces){i.y1.relative(r.cwd,e).startsWith("../")||(t&&t.cwd.length>=r.cwd.length||(t=r))}return t||null}getWorkspaceByFilePath(e){const t=this.tryWorkspaceByFilePath(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByIdent(e){const t=this.workspacesByIdent.get(e.identHash);return void 0===t?null:t}getWorkspaceByIdent(e){const t=this.tryWorkspaceByIdent(e);if(!t)throw new Error(`Workspace not found (${_.prettyIdent(this.configuration,e)})`);return t}tryWorkspaceByDescriptor(e){const t=this.tryWorkspaceByIdent(e);return null!==t&&t.accepts(e.range)?t:null}getWorkspaceByDescriptor(e){const t=this.tryWorkspaceByDescriptor(e);if(null===t)throw new Error(`Workspace not found (${_.prettyDescriptor(this.configuration,e)})`);return t}tryWorkspaceByLocator(e){_.isVirtualLocator(e)&&(e=_.devirtualizeLocator(e));const t=this.tryWorkspaceByIdent(e);return null===t||t.locator.locatorHash!==e.locatorHash&&t.anchoredLocator.locatorHash!==e.locatorHash?null:t}getWorkspaceByLocator(e){const t=this.tryWorkspaceByLocator(e);if(!t)throw new Error(`Workspace not found (${_.prettyLocator(this.configuration,e)})`);return t}refreshWorkspaceDependencies(){for(const e of this.workspaces){const t=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!t)throw new Error("Assertion failed: Expected workspace to have been resolved");e.dependencies=new Map(t.dependencies)}}forgetResolution(e){for(const[t,r]of this.storedResolutions){const n="descriptorHash"in e&&e.descriptorHash===t,i="locatorHash"in e&&e.locatorHash===r;(n||i)&&(this.storedDescriptors.delete(t),this.storedResolutions.delete(t),this.originalPackages.delete(r))}}forgetTransientResolutions(){const e=this.configuration.makeResolver();for(const t of this.originalPackages.values()){let r;try{r=e.shouldPersistResolution(t,{project:this,resolver:e})}catch(e){r=!1}r||this.forgetResolution(t)}}forgetVirtualResolutions(){for(const e of this.storedPackages.values())for(const[t,r]of e.dependencies)_.isVirtualDescriptor(r)&&e.dependencies.set(t,_.devirtualizeDescriptor(r))}getDependencyMeta(e,t){const r={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(_.stringifyIdent(e));if(!n)return r;const i=n.get(null);if(i&&Object.assign(r,i),null===t||!k().valid(t))return r;for(const[e,i]of n)null!==e&&e===t&&Object.assign(r,i);return r}async findLocatorForLocation(e){const t=new H.$,r=this.configuration.getLinkers(),n={project:this,report:t};for(const t of r){const r=await t.findPackageLocator(e,n);if(r)return r}return null}async validateEverything(e){for(const t of e.validationWarnings)e.report.reportWarning(t.name,t.text);for(const t of e.validationErrors)e.report.reportError(t.name,t.text)}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions(),e.lockfileOnly||this.forgetTransientResolutions();const t=e.resolver||this.configuration.makeResolver(),r=new O;await r.setup(this,{report:e.report});const o=e.lockfileOnly?new Y.B([new U,new J(t)]):new Y.B([new U,r,t]),s=this.configuration.makeFetcher(),A=e.lockfileOnly?{project:this,report:e.report,resolver:o}:{project:this,report:e.report,resolver:o,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:s}},a=new Map,c=new Map,u=new Map,l=new Map,h=new Map,g=new Set;let f=new Set;for(const e of this.workspaces){const t=e.anchoredDescriptor;a.set(t.descriptorHash,t),f.add(t.descriptorHash)}const p=b()(10);for(;0!==f.size;){const e=f;f=new Set;for(const t of e)u.has(t)&&e.delete(t);if(0===e.size)break;const t=new Set,r=new Map;for(const n of e){const i=a.get(n);if(!i)throw new Error("Assertion failed: The descriptor should have been registered");let s=h.get(n);if(void 0===s){h.set(n,s=new Set);for(const e of o.getResolutionDependencies(i,A))a.set(e.descriptorHash,e),s.add(e.descriptorHash)}const l=V.getMapWithDefault(r,n);for(const r of s){const i=u.get(r);if(void 0!==i){const e=c.get(i);if(void 0===e)throw new Error("Assertion failed: The package should have been registered");l.set(r,e)}else t.add(n),e.add(r)}}for(const r of t)e.delete(r),f.add(r);if(0===e.size)throw new Error("Assertion failed: Descriptors should not have cyclic dependencies");const n=new Map(await Promise.all(Array.from(e).map(e=>p(async()=>{const t=a.get(e);if(void 0===t)throw new Error("Assertion failed: The descriptor should have been registered");const n=r.get(t.descriptorHash);if(void 0===n)throw new Error("Assertion failed: The descriptor dependencies should have been registered");let i;try{i=await o.getCandidates(t,n,A)}catch(e){throw e.message=`${_.prettyDescriptor(this.configuration,t)}: ${e.message}`,e}if(0===i.length)throw new Error("No candidate found for "+_.prettyDescriptor(this.configuration,t));return[t.descriptorHash,i]})))),i=new Map;for(const[e,t]of n)1===t.length&&(i.set(e,t[0]),n.delete(e));for(const[e,t]of n){const r=t.find(e=>c.has(e.locatorHash));r&&(i.set(e,r),n.delete(e))}if(n.size>0){const e=new(v().Solver);for(const t of n.values())e.require(v().or(...t.map(e=>e.locatorHash)));let t,r=100,o=null,s=1/0;for(;r>0&&null!==(t=e.solve());){const n=t.getTrueVars();e.forbid(t.getFormula()),n.lengthA.has(e.locatorHash));if(!r)throw new Error("Assertion failed: The descriptor should have been solved during the previous step");i.set(e,r),n.delete(e)}}const s=Array.from(i.values()).filter(e=>!c.has(e.locatorHash)),d=new Map(await Promise.all(s.map(async e=>{const t=await V.prettifyAsyncErrors(async()=>await o.resolve(e,A),t=>`${_.prettyLocator(this.configuration,e)}: ${t}`);if(!_.areLocatorsEqual(e,t))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${_.prettyLocator(this.configuration,e)} to ${_.prettyLocator(this.configuration,t)})`);const r=this.configuration.normalizePackage(t);for(const[t,n]of r.dependencies){const i=await this.configuration.reduceHook(e=>e.reduceDependency,n,this,r,n,{resolver:o,resolveOptions:A});if(!_.areIdentsEqual(n,i))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");const s=o.bindDescriptor(i,e,A);r.dependencies.set(t,s)}return[r.locatorHash,{original:t,pkg:r}]})));for(const t of e){const e=i.get(t);if(!e)throw new Error("Assertion failed: The locator should have been registered");u.set(t,e.locatorHash);const r=d.get(e.locatorHash);if(void 0===r)continue;const{original:n,pkg:o}=r;l.set(n.locatorHash,n),c.set(o.locatorHash,o);for(const e of o.dependencies.values()){a.set(e.descriptorHash,e),f.add(e.descriptorHash);const t=this.resolutionAliases.get(e.descriptorHash);if(void 0===t)continue;if(e.descriptorHash===t)continue;const r=this.storedDescriptors.get(t);if(!r)throw new Error("Assertion failed: The alias should have been registered");u.has(e.descriptorHash)||(u.set(e.descriptorHash,"temporary"),f.delete(e.descriptorHash),f.add(t),a.set(t,r),g.add(e.descriptorHash))}}}for(;g.size>0;){let e=!1;for(const t of g){if(!a.get(t))throw new Error("Assertion failed: The descriptor should have been registered");const r=this.resolutionAliases.get(t);if(void 0===r)throw new Error("Assertion failed: The descriptor should have an alias");const n=u.get(r);if(void 0===n)throw new Error("Assertion failed: The resolution should have been registered");"temporary"!==n&&(g.delete(t),u.set(t,n),e=!0)}if(!e)throw new Error("Alias loop detected")}const d=new Set(this.resolutionAliases.values()),C=new Set(c.keys()),E=new Set;!function({project:e,allDescriptors:t,allResolutions:r,allPackages:o,accessibleLocators:s=new Set,optionalBuilds:A=new Set,volatileDescriptors:a=new Set,report:c,tolerateMissingPackages:u=!1}){const l=new Map,h=[],g=new Map,f=new Map,p=new Map(e.workspaces.map(e=>{const t=e.anchoredLocator.locatorHash,r=o.get(t);if(void 0===r){if(u)return[t,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[t,_.copyPackage(r)]})),d=()=>{const e=n.xfs.mktempSync(),t=i.y1.join(e,"stacktrace.log"),r=String(h.length+1).length,o=h.map((e,t)=>`${(t+1+".").padStart(r," ")} ${_.stringifyLocator(e)}\n`).join("");throw n.xfs.writeFileSync(t,o),new G.lk(T.b.STACK_OVERFLOW_RESOLUTION,"Encountered a stack overflow when resolving peer dependencies; cf "+t)},C=e=>{const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: The resolution should have been registered");const n=o.get(t);if(!n)throw new Error("Assertion failed: The package could not be found");return n},E=(e,t,r)=>{h.length>1e3&&d(),h.push(e);const n=I(e,t,r);return h.pop(),n},I=(n,i,h)=>{if(s.has(n.locatorHash))return;s.add(n.locatorHash),h||A.delete(n.locatorHash);const I=o.get(n.locatorHash);if(!I){if(u)return;throw new Error(`Assertion failed: The package (${_.prettyLocator(e.configuration,n)}) should have been registered`)}const m=[],y=[],w=[],B=[],Q=[];for(const s of Array.from(I.dependencies.values())){if(I.peerDependencies.has(s.identHash)&&!i)continue;if(_.isVirtualDescriptor(s))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");a.delete(s.descriptorHash);let A=h;if(!A){const e=I.dependenciesMeta.get(_.stringifyIdent(s));if(void 0!==e){const t=e.get(null);void 0!==t&&t.optional&&(A=!0)}}const g=r.get(s.descriptorHash);if(!g){if(u)continue;throw new Error(`Assertion failed: The resolution (${_.prettyDescriptor(e.configuration,s)}) should have been registered`)}const v=p.get(g)||o.get(g);if(!v)throw new Error(`Assertion failed: The package (${g}, resolved from ${_.prettyDescriptor(e.configuration,s)}) should have been registered`);if(0===v.peerDependencies.size){E(v,!1,A);continue}const D=l.get(v.locatorHash);let b,S;"number"==typeof D&&D>=2&&d();const k=new Set;y.push(()=>{b=_.virtualizeDescriptor(s,n.locatorHash),S=_.virtualizePackage(v,n.locatorHash),I.dependencies.delete(s.identHash),I.dependencies.set(b.identHash,b),r.set(b.descriptorHash,S.locatorHash),t.set(b.descriptorHash,b),o.set(S.locatorHash,S),m.push([v,b,S])}),w.push(()=>{for(const i of S.peerDependencies.values()){let o=I.dependencies.get(i.identHash);if(!o&&_.areIdentsEqual(n,i)&&(o=_.convertLocatorToDescriptor(n),t.set(o.descriptorHash,o),r.set(o.descriptorHash,n.locatorHash),a.delete(o.descriptorHash)),o||!S.dependencies.has(i.identHash)){if(!o){if(!I.peerDependencies.has(i.identHash)){const t=S.peerDependenciesMeta.get(_.stringifyIdent(i));null===c||t&&t.optional||c.reportWarning(T.b.MISSING_PEER_DEPENDENCY,`${_.prettyLocator(e.configuration,n)} doesn't provide ${_.prettyDescriptor(e.configuration,i)} requested by ${_.prettyLocator(e.configuration,v)}`)}o=_.makeDescriptor(i,"missing:")}if(S.dependencies.set(o.identHash,o),_.isVirtualDescriptor(o)){V.getSetWithDefault(f,o.descriptorHash).add(S.locatorHash)}if("missing:"===o.range)k.add(o.identHash);else if(null!==c){const t=C(o);Z.satisfiesWithPrereleases(t.version,i.range)||c.reportWarning(T.b.INCOMPATIBLE_PEER_DEPENDENCY,`${_.prettyLocator(e.configuration,n)} provides ${_.prettyLocator(e.configuration,t)} with version ${t.version} which doesn't satisfy ${_.prettyRange(e.configuration,i.range)} requested by ${_.prettyLocator(e.configuration,v)}`)}}else S.peerDependencies.delete(i.identHash)}S.dependencies=new Map(V.sortMap(S.dependencies,([e,t])=>_.stringifyIdent(t)))}),B.push(()=>{if(!o.has(S.locatorHash))return;const e=l.get(v.locatorHash),t=void 0!==e?e+1:1;l.set(v.locatorHash,t),E(S,!1,A),l.set(v.locatorHash,t-1)}),Q.push(()=>{if(o.has(S.locatorHash))for(const e of k)S.dependencies.delete(e)})}for(const e of[...y,...w])e();let v;do{v=!0;for(const[n,i,A]of m){if(!o.has(A.locatorHash))continue;const a=V.getMapWithDefault(g,n.locatorHash),c=W.makeHash(...[...A.dependencies.values()].map(t=>{const n="missing:"!==t.range?r.get(t.descriptorHash):"missing:";if(void 0===n)throw new Error(`Assertion failed: Expected the resolution for ${_.prettyDescriptor(e.configuration,t)} to have been registered`);return n})),u=a.get(c);if(void 0===u){a.set(c,i);continue}if(u===i)continue;v=!1,o.delete(A.locatorHash),t.delete(i.descriptorHash),r.delete(i.descriptorHash),s.delete(A.locatorHash);const l=f.get(i.descriptorHash)||[],h=[I.locatorHash,...l];for(const e of h){const t=o.get(e);void 0!==t&&t.dependencies.set(i.identHash,u)}}}while(!v);for(const e of[...B,...Q])e()};for(const t of e.workspaces)a.delete(t.anchoredDescriptor.descriptorHash),E(t.anchoredLocator,!0,!1)}({project:this,report:e.report,accessibleLocators:E,volatileDescriptors:d,optionalBuilds:C,allDescriptors:a,allResolutions:u,allPackages:c});for(const e of d)a.delete(e),u.delete(e);this.storedResolutions=u,this.storedDescriptors=a,this.storedPackages=c,this.accessibleLocators=E,this.originalPackages=l,this.optionalBuilds=C,this.refreshWorkspaceDependencies()}async fetchEverything({cache:e,report:t,fetcher:r}){const n=r||this.configuration.makeFetcher(),i={checksums:this.storedChecksums,project:this,cache:e,fetcher:n,report:t},o=V.sortMap(this.storedResolutions.values(),[e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return _.stringifyLocator(t)}]);let s=!1;const A=G.yG.progressViaCounter(o.length);t.reportProgress(A);const a=b()(32);if(await t.startCacheReport(async()=>{await Promise.all(o.map(e=>a(async()=>{const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The locator should have been registered");if(_.isVirtualLocator(r))return;let o;try{o=await n.fetch(r,i)}catch(e){return e.message=`${_.prettyLocator(this.configuration,r)}: ${e.message}`,t.reportExceptionOnce(e),void(s=e)}o.checksum?this.storedChecksums.set(r.locatorHash,o.checksum):this.storedChecksums.delete(r.locatorHash),o.releaseFs&&o.releaseFs()}).finally(()=>{A.tick()})))}),s)throw s}async linkEverything({cache:e,report:t,fetcher:r}){const o=r||this.configuration.makeFetcher(),A={checksums:this.storedChecksums,project:this,cache:e,fetcher:o,report:t,skipIntegrityCheck:!0},c=this.configuration.getLinkers(),u={project:this,report:t},l=new Map(c.map(e=>[e,e.makeInstaller(u)])),h=new Map,g=new Map,f=new Map;for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");const r=await o.fetch(t,A);if(null!==this.tryWorkspaceByLocator(t)){const e=[],{scripts:n}=await j.G.find(r.prefixPath,{baseFs:r.packageFs});for(const t of["preinstall","install","postinstall"])n.has(t)&&e.push([K.k.SCRIPT,t]);try{for(const e of l.values())await e.installPackage(t,r)}finally{r.releaseFs&&r.releaseFs()}const o=i.y1.join(r.packageFs.getRealPath(),r.prefixPath);g.set(t.locatorHash,o),e.length>0&&f.set(t.locatorHash,{directives:e,buildLocations:[o]})}else{const e=c.find(e=>e.supportsPackage(t,u));if(!e)throw new G.lk(T.b.LINKER_NOT_FOUND,_.prettyLocator(this.configuration,t)+" isn't supported by any available linker");const n=l.get(e);if(!n)throw new Error("Assertion failed: The installer should have been registered");let i;try{i=await n.installPackage(t,r)}finally{r.releaseFs&&r.releaseFs()}h.set(t.locatorHash,e),g.set(t.locatorHash,i.packageLocation),i.buildDirective&&i.packageLocation&&f.set(t.locatorHash,{directives:i.buildDirective,buildLocations:[i.packageLocation]})}}const p=new Map;for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");const r=null!==this.tryWorkspaceByLocator(t),n=async(e,n)=>{const i=g.get(t.locatorHash);if(void 0===i)throw new Error(`Assertion failed: The package (${_.prettyLocator(this.configuration,t)}) should have been registered`);const o=[];for(const n of t.dependencies.values()){const s=this.storedResolutions.get(n.descriptorHash);if(void 0===s)throw new Error(`Assertion failed: The resolution (${_.prettyDescriptor(this.configuration,n)}, from ${_.prettyLocator(this.configuration,t)})should have been registered`);const A=this.storedPackages.get(s);if(void 0===A)throw new Error(`Assertion failed: The package (${s}, resolved from ${_.prettyDescriptor(this.configuration,n)}) should have been registered`);const a=null===this.tryWorkspaceByLocator(A)?h.get(s):null;if(void 0===a)throw new Error(`Assertion failed: The package (${s}, resolved from ${_.prettyDescriptor(this.configuration,n)}) should have been registered`);const c=null===a;if(a===e||r||c)null!==g.get(A.locatorHash)&&o.push([n,A]);else if(null!==i){V.getArrayWithDefault(p,s).push(i)}}null!==i&&await n.attachInternalDependencies(t,o)};if(r)for(const[e,t]of l)await n(e,t);else{const e=h.get(t.locatorHash);if(!e)throw new Error("Assertion failed: The linker should have been found");const r=l.get(e);if(!r)throw new Error("Assertion failed: The installer should have been registered");await n(e,r)}}for(const[e,t]of p){const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The package should have been registered");const n=h.get(r.locatorHash);if(!n)throw new Error("Assertion failed: The linker should have been found");const i=l.get(n);if(!i)throw new Error("Assertion failed: The installer should have been registered");await i.attachExternalDependents(r,t)}for(const e of l.values()){const t=await e.finalizeInstall();if(t)for(const e of t)e.buildDirective&&f.set(e.locatorHash,{directives:e.buildDirective,buildLocations:e.buildLocations})}const d=new Set(this.storedPackages.keys()),C=new Set(f.keys());for(const e of C)d.delete(e);const E=(0,a.createHash)("sha512");E.update(process.versions.node),this.configuration.triggerHook(e=>e.globalHashGeneration,this,e=>{E.update("\0"),E.update(e)});const I=E.digest("hex"),m=new Map,y=e=>{let t=m.get(e.locatorHash);if(void 0!==t)return t;const r=this.storedPackages.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");const n=(0,a.createHash)("sha512");n.update(e.locatorHash),m.set(e.locatorHash,"");for(const e of r.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(void 0===t)throw new Error(`Assertion failed: The resolution (${_.prettyDescriptor(this.configuration,e)}) should have been registered`);if(void 0===this.storedPackages.get(t))throw new Error("Assertion failed: The package should have been registered");n.update(y(r))}return t=n.digest("hex"),m.set(e.locatorHash,t),t},w=(e,t)=>{const r=(0,a.createHash)("sha512");r.update(I),r.update(y(e));for(const e of t)r.update(e);return r.digest("hex")},B=this.configuration.get("bstatePath"),Q=n.xfs.existsSync(B)?(0,s.parseSyml)(await n.xfs.readFilePromise(B,"utf8")):{},v=new Map;for(;C.size>0;){const e=C.size,r=[];for(const e of C){const o=this.storedPackages.get(e);if(!o)throw new Error("Assertion failed: The package should have been registered");let s=!0;for(const e of o.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(!t)throw new Error(`Assertion failed: The resolution (${_.prettyDescriptor(this.configuration,e)}) should have been registered`);if(C.has(t)){s=!1;break}}if(!s)continue;C.delete(e);const A=f.get(o.locatorHash);if(!A)throw new Error("Assertion failed: The build directive should have been registered");const a=w(o,A.buildLocations);if(Object.prototype.hasOwnProperty.call(Q,o.locatorHash)&&Q[o.locatorHash]===a)v.set(o.locatorHash,a);else{Object.prototype.hasOwnProperty.call(Q,o.locatorHash)?t.reportInfo(T.b.MUST_REBUILD,_.prettyLocator(this.configuration,o)+" must be rebuilt because its dependency tree changed"):t.reportInfo(T.b.MUST_BUILD,_.prettyLocator(this.configuration,o)+" must be built because it never did before or the last one failed");for(const e of A.buildLocations){if(!i.y1.isAbsolute(e))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${e})`);r.push((async()=>{for(const[r,s]of A.directives){let A=`# This file contains the result of Yarn building a package (${_.stringifyLocator(o)})\n`;switch(r){case K.k.SCRIPT:A+=`# Script name: ${s}\n`;break;case K.k.SHELLCODE:A+=`# Script code: ${s}\n`}const c=null;await n.xfs.mktempPromise(async u=>{const l=i.y1.join(u,"build.log"),{stdout:h,stderr:g}=this.configuration.getSubprocessStreams(l,{header:A,prefix:_.prettyLocator(this.configuration,o),report:t});let f;try{switch(r){case K.k.SCRIPT:f=await X.executePackageScript(o,s,[],{cwd:e,project:this,stdin:c,stdout:h,stderr:g});break;case K.k.SHELLCODE:f=await X.executePackageShellcode(o,s,[],{cwd:e,project:this,stdin:c,stdout:h,stderr:g})}}catch(e){g.write(e.stack),f=1}if(h.end(),g.end(),0===f)return v.set(o.locatorHash,a),!0;n.xfs.detachTemp(u);const p=`${_.prettyLocator(this.configuration,o)} couldn't be built successfully (exit code ${this.configuration.format(String(f),L.a5.NUMBER)}, logs can be found here: ${this.configuration.format(l,L.a5.PATH)})`;return t.reportInfo(T.b.BUILD_FAILED,p),this.optionalBuilds.has(o.locatorHash)?(v.set(o.locatorHash,a),!0):(t.reportError(T.b.BUILD_FAILED,p),!1)})}})())}}}if(await Promise.all(r),e===C.size){const e=Array.from(C).map(e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The package should have been registered");return _.prettyLocator(this.configuration,t)}).join(", ");t.reportError(T.b.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${e})`);break}}if(v.size>0){const e=this.configuration.get("bstatePath"),t=ne.generateBuildStateFile(v,this.storedPackages);await n.xfs.mkdirpPromise(i.y1.dirname(e)),await n.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}else await n.xfs.removePromise(B)}async install(e){const t=[],r=[];await this.configuration.triggerHook(e=>e.validateProject,this,{reportWarning:(e,r)=>t.push({name:e,text:r}),reportError:(e,t)=>r.push({name:e,text:t})});t.length+r.length>0&&await e.report.startTimerPromise("Validation step",async()=>{await this.validateEverything({validationWarnings:t,validationErrors:r,report:e.report})}),await e.report.startTimerPromise("Resolution step",async()=>{const t=i.y1.join(this.cwd,this.configuration.get("lockfileFilename"));let r=null;if(e.immutable)try{r=await n.xfs.readFilePromise(t,"utf8")}catch(e){throw"ENOENT"===e.code?new G.lk(T.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):e}if(await this.resolveEverything(e),null!==r){const n=(0,o.qH)(r,this.generateLockfile());if(n!==r){const i=B(t,t,r,n);e.report.reportSeparator();for(const t of i.hunks){e.report.reportInfo(null,`@@ -${t.oldStart},${t.oldLines} +${t.newStart},${t.newLines} @@`);for(const r of t.lines)r.startsWith("+")?e.report.reportError(T.b.FROZEN_LOCKFILE_EXCEPTION,this.configuration.format(r,L.a5.ADDED)):r.startsWith("-")?e.report.reportError(T.b.FROZEN_LOCKFILE_EXCEPTION,this.configuration.format(r,L.a5.REMOVED)):e.report.reportInfo(null,this.configuration.format(r,"grey"))}throw e.report.reportSeparator(),new G.lk(T.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}}),await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(void 0===e.persistProject||e.persistProject)&&await this.cacheCleanup(e)}),(void 0===e.persistProject||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{await this.linkEverything(e)}),await this.configuration.triggerHook(e=>e.afterAllInstalled,this)}generateLockfile(){const e=new Map;for(const[t,r]of this.storedResolutions.entries()){let n=e.get(r);n||e.set(r,n=new Set),n.add(t)}const t={__metadata:{version:4}};for(const[r,n]of e.entries()){const e=this.originalPackages.get(r);if(!e)continue;const i=[];for(const e of n){const t=this.storedDescriptors.get(e);if(!t)throw new Error("Assertion failed: The descriptor should have been registered");i.push(t)}const o=i.map(e=>_.stringifyDescriptor(e)).sort().join(", "),s=new j.G;let A;s.version=e.linkType===$.U.HARD?e.version:"0.0.0-use.local",s.languageName=e.languageName,s.dependencies=new Map(e.dependencies),s.peerDependencies=new Map(e.peerDependencies),s.dependenciesMeta=new Map(e.dependenciesMeta),s.peerDependenciesMeta=new Map(e.peerDependenciesMeta),s.bin=new Map(e.bin);const a=this.storedChecksums.get(e.locatorHash);if(void 0!==a){const e=a.indexOf("/");if(-1===e)throw new Error("Assertion failed: Expecte the checksum to reference its cache key");const r=a.slice(0,e),n=a.slice(e+1);void 0===t.__metadata.cacheKey&&(t.__metadata.cacheKey=r),A=r===t.__metadata.cacheKey?n:a}t[o]={...s.exportTo({},{compatibilityMode:!1}),linkType:e.linkType.toLowerCase(),resolution:_.stringifyLocator(e),checksum:A}}return['# This file is generated by running "yarn install" inside your project.\n',"# Manual changes might be lost - proceed with caution!\n"].join("")+"\n"+(0,s.stringifySyml)(t)}async persistLockfile(){const e=i.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.generateLockfile();await n.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}async persistInstallStateFile(){const{accessibleLocators:e,optionalBuilds:t,storedDescriptors:r,storedResolutions:o,storedPackages:s,lockFileChecksum:A}=this,a={accessibleLocators:e,optionalBuilds:t,storedDescriptors:r,storedResolutions:o,storedPackages:s,lockFileChecksum:A},c=await te(M().serialize(a)),u=this.configuration.get("installStatePath");await n.xfs.mkdirpPromise(i.y1.dirname(u)),await n.xfs.writeFilePromise(u,c)}async restoreInstallState(){const e=this.configuration.get("installStatePath");if(!n.xfs.existsSync(e))return void await this.applyLightResolution();const t=await n.xfs.readFilePromise(e),r=M().deserialize(await re(t));r.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,r),this.refreshWorkspaceDependencies()):await this.applyLightResolution()}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new H.$}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile(),await this.persistInstallStateFile();for(const e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:t}){const r=new Set([".gitignore"]);if(n.xfs.existsSync(e.cwd)&&(0,q.isFolderInside)(e.cwd,this.cwd)){for(const o of await n.xfs.readdirPromise(e.cwd)){if(r.has(o))continue;const s=i.y1.resolve(e.cwd,o);e.markedFiles.has(s)||(e.immutable?t.reportError(T.b.IMMUTABLE_CACHE,this.configuration.format(i.y1.basename(s),"magenta")+" appears to be unused and would marked for deletion, but the cache is immutable"):(t.reportInfo(T.b.UNUSED_CACHE_ENTRY,this.configuration.format(i.y1.basename(s),"magenta")+" appears to be unused - removing"),await n.xfs.unlinkPromise(s)))}e.markedFiles.clear()}}}},52779:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,O:()=>A});var n=r(10966),i=r.n(n),o=r(54143);const s=/^(?!v)[a-z0-9-.]+$/i;class A{supportsDescriptor(e,t){return!!i().validRange(e.range)||!!s.test(e.range)}supportsLocator(e,t){return!!i().validRange(e.reference)||!!s.test(e.reference)}shouldPersistResolution(e,t){return t.resolver.shouldPersistResolution(this.forwardLocator(e,t),t)}bindDescriptor(e,t,r){return r.resolver.bindDescriptor(this.forwardDescriptor(e,r),t,r)}getResolutionDependencies(e,t){return t.resolver.getResolutionDependencies(this.forwardDescriptor(e,t),t)}async getCandidates(e,t,r){return await r.resolver.getCandidates(this.forwardDescriptor(e,r),t,r)}async resolve(e,t){const r=await t.resolver.resolve(this.forwardLocator(e,t),t);return o.renamePackage(r,e)}forwardDescriptor(e,t){return o.makeDescriptor(e,`${t.project.configuration.get("defaultProtocol")}${e.range}`)}forwardLocator(e,t){return o.makeLocator(e,`${t.project.configuration.get("defaultProtocol")}${e.reference}`)}}},35691:(e,t,r)=>{"use strict";r.d(t,{lk:()=>s,yG:()=>A});var n=r(92413),i=r(24304),o=r(92659);class s extends Error{constructor(e,t){super(t),this.reportCode=e}}class A{constructor(){this.reportedInfos=new Set,this.reportedWarnings=new Set,this.reportedErrors=new Set}static progressViaCounter(e){let t,r=0,n=new Promise(e=>{t=e});const i=e=>{const i=t;n=new Promise(e=>{t=e}),r=e,i()},o=async function*(){for(;ro,set:i,tick:(e=0)=>{i(r+1)}}}reportInfoOnce(e,t,r){const n=r&&r.key?r.key:t;this.reportedInfos.has(n)||(this.reportedInfos.add(n),this.reportInfo(e,t))}reportWarningOnce(e,t,r){const n=r&&r.key?r.key:t;this.reportedWarnings.has(n)||(this.reportedWarnings.add(n),this.reportWarning(e,t))}reportErrorOnce(e,t,r){const n=r&&r.key?r.key:t;this.reportedErrors.has(n)||(this.reportedErrors.add(n),this.reportError(e,t))}reportExceptionOnce(e){!function(e){return void 0!==e.reportCode}(e)?this.reportErrorOnce(o.b.EXCEPTION,e.stack||e.message,{key:e}):this.reportErrorOnce(e.reportCode,e.message,{key:e})}createStreamReporter(e=null){const t=new n.PassThrough,r=new i.StringDecoder;let o="";return t.on("data",t=>{let n,i=r.write(t);do{if(n=i.indexOf("\n"),-1!==n){const t=o+i.substr(0,n);i=i.substr(n+1),o="",null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t)}}while(-1!==n);o+=i}),t.on("end",()=>{const t=r.end();""!==t&&(null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t))}),t}}},15815:(e,t,r)=>{"use strict";r.d(t,{P:()=>h});var n=r(92659),i=r(35691);const o=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],s=new Set([n.b.FETCH_NOT_CACHED,n.b.UNUSED_CACHE_ENTRY]),A=process.env.GITHUB_ACTIONS?{start:e=>`::group::${e}\n`,end:e=>"::endgroup::\n"}:process.env.TRAVIS?{start:e=>`travis_fold:start:${e}\n`,end:e=>`travis_fold:end:${e}\n`}:process.env.GITLAB_CI?{start:e=>`section_start:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r${e}\n`,end:e=>`section_end:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r`}:null,a=new Date,c=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM),u={patrick:{date:[17,3],chars:["🍀","🌱"],size:40},simba:{date:[19,7],chars:["🌟","✨"],size:40},jack:{date:[31,10],chars:["🎃","🦇"],size:40},hogsfather:{date:[31,12],chars:["🎉","🎄"],size:40},default:{chars:["=","-"],size:80}},l=c&&Object.keys(u).find(e=>{const t=u[e];return!t.date||t.date[0]===a.getDate()&&t.date[1]===a.getMonth()+1})||"default";class h extends i.yG{constructor({configuration:e,stdout:t,json:r=!1,includeFooter:n=!0,includeLogs:i=!r,includeInfos:o=i,includeWarnings:A=i,forgettableBufferSize:a=5,forgettableNames:c=new Set}){super(),this.cacheHitCount=0,this.cacheMissCount=0,this.warningCount=0,this.errorCount=0,this.startTime=Date.now(),this.indent=0,this.progress=new Map,this.progressTime=0,this.progressFrame=0,this.progressTimeout=null,this.forgettableLines=[],this.configuration=e,this.forgettableBufferSize=a,this.forgettableNames=new Set([...c,...s]),this.includeFooter=n,this.includeInfos=o,this.includeWarnings=A,this.json=r,this.stdout=t}static async start(e,t){const r=new this(e);try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize()}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,t){this.cacheMissCount+=1,void 0===t||this.configuration.get("preferAggregateCacheInfo")||this.reportInfo(n.b.FETCH_NOT_CACHED,t)}startTimerSync(e,t){this.reportInfo(null,"┌ "+e);const r=Date.now();this.indent+=1;try{return t()}catch(e){throw this.reportExceptionOnce(e),e}finally{const e=Date.now();this.indent-=1,this.configuration.get("enableTimers")&&e-r>200?this.reportInfo(null,"└ Completed in "+this.formatTiming(e-r)):this.reportInfo(null,"└ Completed")}}async startTimerPromise(e,t){this.reportInfo(null,"┌ "+e),null!==A&&this.stdout.write(A.start(e));const r=Date.now();this.indent+=1;try{return await t()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.indent-=1,null!==A&&this.stdout.write(A.end(e)),this.configuration.get("enableTimers")&&t-r>200?this.reportInfo(null,"└ Completed in "+this.formatTiming(t-r)):this.reportInfo(null,"└ Completed")}}async startCacheReport(e){const t=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(e){throw this.reportExceptionOnce(e),e}finally{null!==t&&this.reportCacheChanges(t)}}reportSeparator(){0===this.indent?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(e,t){if(this.includeInfos)if(this.json)this.reportJson({type:"info",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t});else if(this.forgettableNames.has(e))if(this.forgettableLines.push(t),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(e,this.forgettableLines)}else this.writeLine(`${this.configuration.format("➤","blueBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`);else this.writeLineWithForgettableReset(`${this.configuration.format("➤","blueBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`)}reportWarning(e,t){this.warningCount+=1,this.includeWarnings&&(this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${this.configuration.format("➤","yellowBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`))}reportError(e,t){this.errorCount+=1,this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${this.configuration.format("➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`)}reportProgress(e){let t=!1;const r=Promise.resolve().then(async()=>{const r={progress:0,title:void 0};this.progress.set(e,r),this.refreshProgress(-1);for await(const{progress:n,title:i}of e)t||r.progress===n&&r.title===i||(r.progress=n,r.title=i,this.refreshProgress());n()}),n=()=>{t||(t=!0,this.progress.delete(e),this.refreshProgress(1))};return{...r,stop:n}}reportJson(e){this.json&&this.writeLineWithForgettableReset(""+JSON.stringify(e))}async finalize(){if(!this.includeFooter)return;let e="";e=this.errorCount>0?"Failed with errors":this.warningCount>0?"Done with warnings":"Done";const t=this.formatTiming(Date.now()-this.startTime),r=this.configuration.get("enableTimers")?`${e} in ${t}`:e;this.errorCount>0?this.reportError(n.b.UNNAMED,r):this.warningCount>0?this.reportWarning(n.b.UNNAMED,r):this.reportInfo(n.b.UNNAMED,r)}writeLine(e){this.clearProgress({clear:!0}),this.stdout.write(e+"\n"),this.writeProgress()}writeLineWithForgettableReset(e){this.forgettableLines=[],this.writeLine(e)}writeLines(e,t){this.clearProgress({delta:t.length});for(const r of t)this.stdout.write(`${this.configuration.format("➤","blueBright")} ${this.formatName(e)}: ${this.formatIndent()}${r}\n`);this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:t}){const r=this.cacheHitCount-e,i=this.cacheMissCount-t;if(0===r&&0===i)return;let o="";this.cacheHitCount>1?o+=this.cacheHitCount+" packages were already cached":1===this.cacheHitCount?o+=" - one package was already cached":o+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?o+=`, ${this.cacheMissCount} had to be fetched`:1===this.cacheMissCount&&(o+=", one had to be fetched"):this.cacheMissCount>1?o+=` - ${this.cacheMissCount} packages had to be fetched`:1===this.cacheMissCount&&(o+=" - one package had to be fetched"),this.reportInfo(n.b.FETCH_NOT_CACHED,o)}clearProgress({delta:e=0,clear:t=!1}){this.configuration.get("enableProgressBars")&&!this.json&&this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||t)&&this.stdout.write(""))}writeProgress(){if(!this.configuration.get("enableProgressBars")||this.json)return;if(null!==this.progressTimeout&&clearTimeout(this.progressTimeout),this.progressTimeout=null,0===this.progress.size)return;const e=Date.now();e-this.progressTime>80&&(this.progressFrame=(this.progressFrame+1)%o.length,this.progressTime=e);const t=o[this.progressFrame],r=this.configuration.get("progressBarStyle")||l;if(!Object.prototype.hasOwnProperty.call(u,r))throw new Error("Assertion failed: Invalid progress bar style");const n=u[r],i="➤ YN0000: ┌ ".length,s=Math.max(0,Math.min(process.stdout.columns-i,80)),A=Math.floor(n.size*s/80);for(const{progress:e}of this.progress.values()){const r=A*e,i=n.chars[0].repeat(r),o=n.chars[1].repeat(A-r);this.stdout.write(`${this.configuration.format("➤","blueBright")} ${this.formatName(null)}: ${t} ${i}${o}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},1e3/60)}refreshProgress(e=0){this.clearProgress({delta:e}),this.writeProgress()}formatTiming(e){return e<6e4?Math.round(e/10)/100+"s":Math.round(e/600)/100+"m"}formatName(e){const t="YN"+(null===e?0:e).toString(10).padStart(4,"0");return this.json||null!==e?t:this.configuration.format(t,"grey")}formatNameWithHyperlink(e){const t=this.formatName(e);if(!this.configuration.get("enableHyperlinks"))return t;if(null===e||e===n.b.UNNAMED)return t;return`]8;;${`https://yarnpkg.com/advanced/error-codes#${t}---${n.b[e]}`.toLowerCase()}\\${t}]8;;\\`}formatIndent(){return"│ ".repeat(this.indent)}}},33720:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(35691);class i extends n.yG{reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t){return t()}async startTimerPromise(e,t){return await t()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){}}},60895:(e,t,r)=>{"use strict";r.d(t,{N:()=>A});var n=r(17674),i=r(14626),o=r(46009),s=r(54143);class A{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const n=e.reference.slice(r+1),i=s.makeLocator(e,n);return t.fetcher.getLocalPath(i,t)}async fetch(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const n=e.reference.slice(r+1),i=s.makeLocator(e,n),o=await t.fetcher.fetch(i,t);return await this.ensureVirtualLink(e,o,t)}getLocatorFilename(e){return s.slugifyLocator(e)}async ensureVirtualLink(e,t,r){const s=t.packageFs.getRealPath(),A=r.project.configuration.get("virtualFolder"),a=this.getLocatorFilename(e),c=n.p.makeVirtualPath(A,a,s),u=new i.K(c,{baseFs:t.packageFs,pathUtils:o.y1});return{...t,packageFs:u}}}},17722:(e,t,r)=>{"use strict";r.d(t,{j:()=>g});var n=r(56537),i=r(46009),o=r(18710),s=r.n(o),A=r(10966),a=r.n(A),c=r(46611),u=r(94538),l=r(20624),h=r(54143);class g{constructor(e,{project:t}){this.workspacesCwds=new Set,this.dependencies=new Map,this.project=t,this.cwd=e}async setup(){this.manifest=n.xfs.existsSync(i.y1.join(this.cwd,c.G.fileName))?await c.G.find(this.cwd):new c.G,this.relativeCwd=i.y1.relative(this.project.cwd,this.cwd)||i.LZ.dot;const e=this.manifest.name?this.manifest.name:h.makeIdent(null,`${this.computeCandidateName()}-${l.makeHash(this.relativeCwd).substr(0,6)}`),t=this.manifest.version?this.manifest.version:"0.0.0";this.locator=h.makeLocator(e,t),this.anchoredDescriptor=h.makeDescriptor(this.locator,`${u.d.protocol}${this.relativeCwd}`),this.anchoredLocator=h.makeLocator(this.locator,`${u.d.protocol}${this.relativeCwd}`);for(const e of this.manifest.workspaceDefinitions){const t=await s()(e.pattern,{absolute:!0,cwd:i.cS.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});t.sort();for(const e of t){const t=i.y1.resolve(this.cwd,i.cS.toPortablePath(e));n.xfs.existsSync(i.y1.join(t,(0,i.Zu)("package.json")))&&this.workspacesCwds.add(t)}}}accepts(e){const t=e.indexOf(":"),r=-1!==t?e.slice(0,t+1):null,n=-1!==t?e.slice(t+1):e;return r===u.d.protocol&&n===this.relativeCwd||(r===u.d.protocol&&"*"===n||!!a().validRange(n)&&(r===u.d.protocol?a().satisfies(null!==this.manifest.version?this.manifest.version:"0.0.0",n):!!this.project.configuration.get("enableTransparentWorkspaces")&&(null!==this.manifest.version&&a().satisfies(this.manifest.version,n))))}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":""+i.y1.basename(this.cwd)||"unnamed-workspace"}async persistManifest(){const e={};this.manifest.exportTo(e);const t=i.y1.join(this.cwd,c.G.fileName),r=JSON.stringify(e,null,this.manifest.indent)+"\n";await n.xfs.changeFilePromise(t,r,{automaticNewlines:!0})}}},94538:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(32485);class i{supportsDescriptor(e,t){if(e.range.startsWith(i.protocol))return!0;return null!==t.project.tryWorkspaceByDescriptor(e)}supportsLocator(e,t){return!!e.reference.startsWith(i.protocol)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[r.project.getWorkspaceByDescriptor(e).anchoredLocator]}async resolve(e,t){const r=t.project.getWorkspaceByCwd(e.reference.slice(i.protocol.length));return{...e,version:r.manifest.version||"0.0.0",languageName:"unknown",linkType:n.U.SOFT,dependencies:new Map([...r.manifest.dependencies,...r.manifest.devDependencies]),peerDependencies:new Map([...r.manifest.peerDependencies]),dependenciesMeta:r.manifest.dependenciesMeta,peerDependenciesMeta:r.manifest.peerDependenciesMeta,bin:r.manifest.bin}}}i.protocol="workspace:"},59355:(e,t,r)=>{"use strict";r.d(t,{o:()=>n});const n="2.0.0-rc.36.git.20200705.abbf4531"},6220:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EndStrategy:()=>n,pipevp:()=>u,execvp:()=>l});var n,i=r(46009),o=r(67566),s=r.n(o);function A(e){return null!==e&&"number"==typeof e.fd}function a(){}!function(e){e[e.Never=0]="Never",e[e.ErrorCode=1]="ErrorCode",e[e.Always=2]="Always"}(n||(n={}));let c=0;async function u(e,t,{cwd:r,env:o=process.env,strict:u=!1,stdin:l=null,stdout:h,stderr:g,end:f=n.Always}){const p=["pipe","pipe","pipe"];null===l?p[0]="ignore":A(l)&&(p[0]=l),A(h)&&(p[1]=h),A(g)&&(p[2]=g),0==c++&&process.on("SIGINT",a);const d=s()(e,t,{cwd:i.cS.fromPortablePath(r),env:{...o,PWD:i.cS.fromPortablePath(r)},stdio:p});A(l)||null===l||l.pipe(d.stdin),A(h)||d.stdout.pipe(h,{end:!1}),A(g)||d.stderr.pipe(g,{end:!1});const C=()=>{for(const e of new Set([h,g]))A(e)||e.end()};return new Promise((t,r)=>{d.on("error",e=>{0==--c&&process.off("SIGINT",a),f!==n.Always&&f!==n.ErrorCode||C(),r(e)}),d.on("close",(i,o)=>{0==--c&&process.off("SIGINT",a),(f===n.Always||f===n.ErrorCode&&i>0)&&C(),0!==i&&u?r(null!==i?new Error(`Child "${e}" exited with exit code ${i}`):new Error(`Child "${e}" exited with signal ${o}`)):t({code:i})})})}async function l(e,t,{cwd:r,env:n=process.env,encoding:o="utf8",strict:A=!1}){const a=["ignore","pipe","pipe"],c=[],u=[],l=i.cS.fromPortablePath(r);void 0!==n.PWD&&(n={...n,PWD:l});const h=s()(e,t,{cwd:l,env:n,stdio:a});return h.stdout.on("data",e=>{c.push(e)}),h.stderr.on("data",e=>{u.push(e)}),await new Promise((t,r)=>{h.on("close",n=>{const i="buffer"===o?Buffer.concat(c):Buffer.concat(c).toString(o),s="buffer"===o?Buffer.concat(u):Buffer.concat(u).toString(o);0!==n&&A?r(Object.assign(new Error(`Child "${e}" exited with exit code ${n}\n\n${s}`),{code:n,stdout:i,stderr:s})):t({code:n,stdout:i,stderr:s})})})}},81111:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDefaultGlobalFolder:()=>o,getHomeFolder:()=>s,isFolderInside:()=>A});var n=r(46009),i=r(12087);function o(){if("win32"===process.platform){const e=n.cS.toPortablePath(process.env.LOCALAPPDATA||n.cS.join((0,i.homedir)(),"AppData","Local"));return n.y1.resolve(e,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){const e=n.cS.toPortablePath(process.env.XDG_DATA_HOME);return n.y1.resolve(e,"yarn/berry")}return n.y1.resolve(s(),".yarn/berry")}function s(){return n.cS.toPortablePath((0,i.homedir)()||"/usr/local/share")}function A(e,t){const r=n.y1.relative(t,e);return r&&!r.startsWith("..")&&!n.y1.isAbsolute(r)}},20624:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeHash:()=>o,checksumFile:()=>s});var n=r(78420),i=r(76417);function o(...e){const t=(0,i.createHash)("sha512");for(const r of e)t.update(r||"");return t.digest("hex")}function s(e){return new Promise((t,r)=>{const o=new n.S,s=(0,i.createHash)("sha512"),A=o.createReadStream(e,{});A.on("data",e=>{s.update(e)}),A.on("error",e=>{r(e)}),A.on("end",()=>{t(s.digest("hex"))})})}},84132:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cache:()=>U.C,DEFAULT_RC_FILENAME:()=>j.tr,DEFAULT_LOCK_FILENAME:()=>j.nh,Configuration:()=>j.VK,FormatType:()=>j.a5,ProjectLookup:()=>j.EW,SettingsType:()=>j.a2,BuildType:()=>Y.k,LightReport:()=>G.h,Manifest:()=>J.G,MessageName:()=>H.b,Project:()=>z.I,TAG_REGEXP:()=>q.c,ReportError:()=>W.lk,Report:()=>W.yG,StreamReport:()=>V.P,ThrowReport:()=>X.$,VirtualFetcher:()=>Z.N,WorkspaceResolver:()=>$.d,Workspace:()=>ee.j,YarnVersion:()=>te.o,LinkType:()=>re.U,hashUtils:()=>A,httpUtils:()=>n,execUtils:()=>o,folderUtils:()=>s,miscUtils:()=>S,scriptUtils:()=>k,semverUtils:()=>x,structUtils:()=>F,tgzUtils:()=>i});var n={};r.r(n),r.d(n,{Method:()=>Q,get:()=>D,put:()=>b,request:()=>v});var i={};r.r(i),r.d(i,{convertToZip:()=>P,extractArchiveTo:()=>O,makeArchiveFromDirectory:()=>_});var o=r(6220),s=r(81111),A=r(20624),a=r(22395),c=r.n(a),u=r(57211),l=r(98605),h=r(2401),g=r.n(h),f=r(61578),p=r.n(f),d=r(98161),C=r.n(d),E=r(78835);const I=p()(8),m=new Map,y=new l.Agent({keepAlive:!0}),w=new u.Agent({keepAlive:!0});function B(e){const t=new E.URL(e),r={host:t.hostname,headers:{}};return t.port&&(r.port=Number(t.port)),{proxy:r}}var Q;async function v(e,t,{configuration:r,headers:n,json:i,method:o=Q.GET}){if(!r.get("enableNetwork"))throw new Error(`Network access have been disabled by configuration (${o} ${e})`);const s=new E.URL(e);if("http:"===s.protocol&&!g().isMatch(s.hostname,r.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${s.hostname})`);const A=r.get("httpProxy"),a=r.get("httpsProxy"),u={agent:{http:A?C().httpOverHttp(B(A)):y,https:a?C().httpsOverHttp(B(a)):w},headers:n,method:o};u.responseType=i?"json":"buffer",null!==t&&("string"==typeof t||Buffer.isBuffer(t)?u.body=t:u.json=t);const l=r.get("httpTimeout"),h=r.get("httpRetry"),f=c().extend({timeout:l,retry:h,...u});return I(()=>f(e))}async function D(e,{configuration:t,json:r,...n}){let i=m.get(e);return i||(i=v(e,null,{configuration:t,...n}).then(t=>(m.set(e,t.body),t.body)),m.set(e,i)),!1===Buffer.isBuffer(i)&&(i=await i),r?JSON.parse(i.toString()):i}async function b(e,t,r){return(await v(e,t,{...r,method:Q.PUT})).body}!function(e){e.GET="GET",e.PUT="PUT"}(Q||(Q={}));var S=r(73632),k=r(63088),x=r(36545),F=r(54143),M=r(78420),N=r(46009),R=r(56537),L=r(90739),K=r(29486),T=r(24541);async function _(e,{baseFs:t=new M.S,prefixPath:r=N.LZ.root,compressionLevel:n}={}){const i=await R.xfs.mktempPromise(),o=N.y1.join(i,"archive.zip"),s=new L.d(o,{create:!0,libzip:await(0,K.getLibzipPromise)(),level:n}),A=N.y1.resolve(N.LZ.root,r);return await s.copyPromise(A,e,{baseFs:t,stableTime:!0,stableSort:!0}),s}async function P(e,t){const r=await R.xfs.mktempPromise(),n=N.y1.join(r,"archive.zip"),{compressionLevel:i,...o}=t;return await O(e,new L.d(n,{create:!0,libzip:await(0,K.getLibzipPromise)(),level:i}),o)}async function O(e,t,{stripComponents:r=0,prefixPath:n=N.LZ.dot}={}){const i=new T.Ze;return i.on("entry",e=>{if(function(e){if("/"===e[0])return!0;const t=e.path.split(/\//g);return!!t.some(e=>".."===e)||t.length<=r}(e))return void e.resume();const i=N.y1.normalize(N.cS.toPortablePath(e.path)).replace(/\/$/,"").split(/\//g);if(i.length<=r)return void e.resume();const o=i.slice(r).join("/"),s=N.y1.join(n,o),A=[];let a=420;"Directory"!==e.type&&0==(73&e.mode)||(a|=73),e.on("data",e=>{A.push(e)}),e.on("end",()=>{var r;switch(e.type){case"Directory":t.mkdirpSync(N.y1.dirname(s),{chmod:493,utimes:[315532800,315532800]}),t.mkdirSync(s),t.chmodSync(s,a),t.utimesSync(s,315532800,315532800);break;case"OldFile":case"File":t.mkdirpSync(N.y1.dirname(s),{chmod:493,utimes:[315532800,315532800]}),t.writeFileSync(s,Buffer.concat(A)),t.chmodSync(s,a),t.utimesSync(s,315532800,315532800);break;case"SymbolicLink":t.mkdirpSync(N.y1.dirname(s),{chmod:493,utimes:[315532800,315532800]}),t.symlinkSync(e.linkpath,s),null===(r=t.lutimesSync)||void 0===r||r.call(t,s,315532800,315532800)}})}),await new Promise((r,n)=>{i.on("error",e=>{n(e)}),i.on("close",()=>{r(t)}),i.end(e)})}var U=r(28148),j=r(27122),Y=r(92409),G=r(62152),J=r(46611),H=r(92659),z=r(40376),q=r(52779),W=r(35691),V=r(15815),X=r(33720),Z=r(60895),$=r(94538),ee=r(17722),te=r(59355),re=r(32485)},73632:(e,t,r)=>{"use strict";r.r(t),r.d(t,{escapeRegExp:()=>a,assertNever:()=>c,mapAndFilter:()=>u,mapAndFind:()=>h,getFactoryWithDefault:()=>f,getArrayWithDefault:()=>p,getSetWithDefault:()=>d,getMapWithDefault:()=>C,releaseAfterUseAsync:()=>E,prettifyAsyncErrors:()=>I,prettifySyncErrors:()=>m,bufferStream:()=>y,BufferStream:()=>w,DefaultStream:()=>B,dynamicRequire:()=>Q,dynamicRequireNoCache:()=>v,sortMap:()=>D,buildIgnorePattern:()=>b,replaceEnvVariables:()=>S});var n=r(46009),i=r(17278),o=r(2401),s=r.n(o),A=r(92413);function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(e){throw new Error(`Assertion failed: Unexpected object '${e}'`)}function u(e,t){const r=[];for(const n of e){const e=t(n);e!==l&&r.push(e)}return r}e=r.hmd(e);const l=Symbol();function h(e,t){for(const r of e){const e=t(r);if(e!==g)return e}}u.skip=l;const g=Symbol();function f(e,t,r){let n=e.get(t);return void 0===n&&e.set(t,n=r()),n}function p(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=[]),r}function d(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Set),r}function C(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Map),r}async function E(e,t){if(null==t)return await e();try{return await e()}finally{await t()}}async function I(e,t){try{return await e()}catch(e){throw e.message=t(e.message),e}}function m(e,t){try{return e()}catch(e){throw e.message=t(e.message),e}}async function y(e){return await new Promise((t,r)=>{const n=[];e.on("error",e=>{r(e)}),e.on("data",e=>{n.push(e)}),e.on("end",()=>{t(Buffer.concat(n))})})}h.skip=g;class w extends A.Transform{constructor(){super(...arguments),this.chunks=[]}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(e),r(null,null)}_flush(e){e(null,Buffer.concat(this.chunks))}}class B extends A.Transform{constructor(e=Buffer.alloc(0)){super(),this.active=!0,this.ifEmpty=e}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,r(null,e)}_flush(e){this.active&&this.ifEmpty.length>0&&e(null,this.ifEmpty)}}function Q(e){return"undefined"!=typeof require?require(e):r(32178)(e)}function v(t){const i=n.cS.fromPortablePath(t),o=r.c[i];let s;delete r.c[i];try{s=Q(i);const t=r.c[i],n=e.children.indexOf(t);-1!==n&&e.children.splice(n,1)}finally{r.c[i]=o}return s}function D(e,t){const r=Array.from(e);Array.isArray(t)||(t=[t]);const n=[];for(const e of t)n.push(r.map(t=>e(t)));const i=r.map((e,t)=>t);return i.sort((e,t)=>{for(const r of n){const n=r[e]r[t]?1:0;if(0!==n)return n}return 0}),i.map(e=>r[e])}function b(e){return 0===e.length?null:e.map(e=>`(${s().makeRe(e,{windows:!1}).source})`).join("|")}function S(e,{env:t}){return e.replace(/\${(?[\d\w_]+)(?:)?-?(?[^}]+)?}/g,(...e)=>{const{variableName:r,colon:n,fallback:o}=e[e.length-1],s=Object.prototype.hasOwnProperty.call(t,r),A=process.env[r];if(A)return A;if(s&&!A&&n)return o;if(s)return A;if(o)return o;throw new i.UsageError(`Environment variable not found (${r})`)})}},63088:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeScriptEnv:()=>m,prepareExternalProject:()=>y,hasPackageScript:()=>w,executePackageScript:()=>B,executePackageShellcode:()=>Q,executeWorkspaceScript:()=>D,hasWorkspaceScript:()=>b,getPackageAccessibleBinaries:()=>S,getWorkspaceAccessibleBinaries:()=>k,executePackageAccessibleBinary:()=>x,executeWorkspaceAccessibleBinary:()=>F});var n,i=r(46009),o=r(53660),s=r(75448),A=r(56537),a=r(29486),c=r(43982),u=r(92413),l=r(46611),h=r(92659),g=r(35691),f=r(15815),p=r(59355),d=r(6220),C=r(73632),E=r(54143);async function I(e,t,r,n=[]){"win32"===process.platform&&await A.xfs.writeFilePromise(i.y1.format({dir:e,name:t,ext:".cmd"}),`@"${r}" ${n.map(e=>`"${e.replace('"','""')}"`).join(" ")} %*\n`),await A.xfs.writeFilePromise(i.y1.join(e,t),`#!/bin/sh\nexec "${r}" ${n.map(e=>`'${e.replace(/'/g,"'\"'\"'")}'`).join(" ")} "$@"\n`),await A.xfs.chmodPromise(i.y1.join(e,t),493)}async function m({project:e,binFolder:t,lifecycleScript:r}){const n={};for(const[e,t]of Object.entries(process.env))void 0!==t&&(n["path"!==e.toLowerCase()?e:"PATH"]=t);const o=i.cS.fromPortablePath(t);n.BERRY_BIN_FOLDER=i.cS.fromPortablePath(o),await I(t,(0,i.Zu)("node"),process.execPath),null!==p.o&&(await I(t,(0,i.Zu)("run"),process.execPath,[process.argv[1],"run"]),await I(t,(0,i.Zu)("yarn"),process.execPath,[process.argv[1]]),await I(t,(0,i.Zu)("yarnpkg"),process.execPath,[process.argv[1]]),await I(t,(0,i.Zu)("node-gyp"),process.execPath,[process.argv[1],"run","--top-level","node-gyp"])),e&&(n.INIT_CWD=i.cS.fromPortablePath(e.configuration.startingCwd)),n.PATH=n.PATH?`${o}${i.cS.delimiter}${n.PATH}`:""+o,n.npm_execpath=`${o}${i.cS.sep}yarn`,n.npm_node_execpath=`${o}${i.cS.sep}node`;const s=null!==p.o?"yarn/"+p.o:`yarn/${C.dynamicRequire("@yarnpkg/core").version}-core`;return n.npm_config_user_agent=`${s} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,r&&(n.npm_lifecycle_event=r),e&&await e.configuration.triggerHook(e=>e.setupScriptEnvironment,e,n,async(e,r,n)=>await I(t,(0,i.Zu)(e),r,n)),n}async function y(e,t,{configuration:r,report:o,workspace:s=null}){await A.xfs.mktempPromise(async a=>{const c=i.y1.join(a,"pack.log"),{stdout:l,stderr:f}=r.getSubprocessStreams(c,{prefix:e,report:o}),p=await async function(e){let t=null;try{t=await A.xfs.readFilePromise(i.y1.join(e,i.QS.lockfile),"utf8")}catch(e){}return null!==t?t.match(/^__metadata:$/m)?n.Yarn2:n.Yarn1:A.xfs.existsSync(i.y1.join(e,"package-lock.json"))?n.Npm:A.xfs.existsSync(i.y1.join(e,"pnpm-lock.yaml"))?n.Pnpm:null}(e);let E;null!==p?(l.write(`Installing the project using ${p}\n\n`),E=p):(l.write("No package manager detected; defaulting to Yarn\n\n"),E=n.Yarn2),await A.xfs.mktempPromise(async r=>{const o=await m({binFolder:r}),p=new Map([[n.Yarn1,async()=>{const r=null!==s?["workspace",s]:[],n=await d.pipevp("yarn",["set","version","classic","--only-if-needed"],{cwd:e,env:o,stdin:null,stdout:l,stderr:f,end:d.EndStrategy.ErrorCode});if(0!==n.code)return n.code;await A.xfs.appendFilePromise(i.y1.join(e,".npmignore"),"/.yarn\n"),l.write("\n");const a=await d.pipevp("yarn",["install"],{cwd:e,env:o,stdin:null,stdout:l,stderr:f,end:d.EndStrategy.ErrorCode});if(0!==a.code)return a.code;l.write("\n");const c=await d.pipevp("yarn",[...r,"pack","--filename",i.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:l,stderr:f});return 0!==c.code?c.code:0}],[n.Yarn2,async()=>{const r=null!==s?["workspace",s]:[],n=await d.pipevp("yarn",[...r,"pack","--install-if-needed","--filename",i.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:l,stderr:f});return 0!==n.code?n.code:0}],[n.Npm,async()=>{if(null!==s)throw new Error("Workspaces aren't supported by npm, which has been detected as the primary package manager for "+e);delete o.npm_config_user_agent;const r=await d.pipevp("npm",["install"],{cwd:e,env:o,stdin:null,stdout:l,stderr:f,end:d.EndStrategy.ErrorCode});if(0!==r.code)return r.code;const n=new u.PassThrough,a=C.bufferStream(n);n.pipe(l);const c=await d.pipevp("npm",["pack","--silent"],{cwd:e,env:o,stdin:null,stdout:n,stderr:f});if(0!==c.code)return c.code;const h=(await a).toString().trim(),g=i.y1.resolve(e,i.cS.toPortablePath(h));return await A.xfs.renamePromise(g,t),0}]]).get(E);if(void 0===p)throw new Error("Assertion failed: Unsupported workflow");const I=await p();if(0!==I&&void 0!==I)throw A.xfs.detachTemp(a),new g.lk(h.b.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${I}, logs can be found here: ${c})`)})})}async function w(e,t,{project:r}){const n=r.storedPackages.get(e.locatorHash);if(!n)throw new Error(`Package for ${E.prettyLocator(r.configuration,e)} not found in the project`);return await o.A.openPromise(async e=>{const o=r.configuration,A=r.configuration.getLinkers(),a={project:r,report:new f.P({stdout:new u.PassThrough,configuration:o})},c=A.find(e=>e.supportsPackage(n,a));if(!c)throw new Error(`The package ${E.prettyLocator(r.configuration,n)} isn't supported by any of the available linkers`);const h=await c.findPackageLocation(n,a),g=new s.M(h,{baseFs:e});return(await l.G.find(i.LZ.dot,{baseFs:g})).scripts.has(t)},{libzip:await(0,a.getLibzipPromise)()})}async function B(e,t,r,{cwd:n,project:i,stdin:o,stdout:s,stderr:a}){return await A.xfs.mktempPromise(async A=>{const{manifest:u,env:l,cwd:h}=await v(e,{project:i,binFolder:A,cwd:n,lifecycleScript:t}),g=u.scripts.get(t);if(void 0===g)return 1;const f=await i.configuration.reduceHook(e=>e.wrapScriptExecution,async()=>await(0,c.execute)(g,r,{cwd:h,env:l,stdin:o,stdout:s,stderr:a}),i,e,t,{script:g,args:r,cwd:h,env:l,stdin:o,stdout:s,stderr:a});return await f()})}async function Q(e,t,r,{cwd:n,project:i,stdin:o,stdout:s,stderr:a}){return await A.xfs.mktempPromise(async A=>{const{env:u,cwd:l}=await v(e,{project:i,binFolder:A,cwd:n});return await(0,c.execute)(t,r,{cwd:l,env:u,stdin:o,stdout:s,stderr:a})})}async function v(e,{project:t,binFolder:r,cwd:n,lifecycleScript:A}){const c=t.storedPackages.get(e.locatorHash);if(!c)throw new Error(`Package for ${E.prettyLocator(t.configuration,e)} not found in the project`);return await o.A.openPromise(async o=>{const a=t.configuration,h=t.configuration.getLinkers(),g={project:t,report:new f.P({stdout:new u.PassThrough,configuration:a})},p=h.find(e=>e.supportsPackage(c,g));if(!p)throw new Error(`The package ${E.prettyLocator(t.configuration,c)} isn't supported by any of the available linkers`);const d=await m({project:t,binFolder:r,lifecycleScript:A});for(const[n,[,o]]of await S(e,{project:t}))await I(r,(0,i.Zu)(n),process.execPath,[o]);const C=await p.findPackageLocation(c,g),y=new s.M(C,{baseFs:o}),w=await l.G.find(i.LZ.dot,{baseFs:y});return void 0===n&&(n=C),{manifest:w,binFolder:r,env:d,cwd:n}},{libzip:await(0,a.getLibzipPromise)()})}async function D(e,t,r,{cwd:n,stdin:i,stdout:o,stderr:s}){return await B(e.anchoredLocator,t,r,{cwd:n,project:e.project,stdin:i,stdout:o,stderr:s})}async function b(e,t){return e.manifest.scripts.has(t)}async function S(e,{project:t}){const r=t.configuration,n=new Map,o=t.storedPackages.get(e.locatorHash);if(!o)throw new Error(`Package for ${E.prettyLocator(r,e)} not found in the project`);const s=new u.Writable,A=r.getLinkers(),a={project:t,report:new f.P({configuration:r,stdout:s})},c=new Set([e.locatorHash]);for(const e of o.dependencies.values()){const n=t.storedResolutions.get(e.descriptorHash);if(!n)throw new Error(`Assertion failed: The resolution (${E.prettyDescriptor(r,e)}) should have been registered`);c.add(n)}for(const e of c){const r=t.storedPackages.get(e);if(!r)throw new Error(`Assertion failed: The package (${e}) should have been registered`);if(0===r.bin.size)continue;const o=A.find(e=>e.supportsPackage(r,a));if(!o)continue;const s=await o.findPackageLocation(r,a);for(const[e,t]of r.bin)n.set(e,[r,i.cS.fromPortablePath(i.y1.resolve(s,t))])}return n}async function k(e){return await S(e.anchoredLocator,{project:e.project})}async function x(e,t,r,{cwd:n,project:o,stdin:s,stdout:a,stderr:c,nodeArgs:u=[]}){const l=await S(e,{project:o}),h=l.get(t);if(!h)throw new Error(`Binary not found (${t}) for ${E.prettyLocator(o.configuration,e)}`);return await A.xfs.mktempPromise(async e=>{const[,t]=h,g=await m({project:o,binFolder:e});for(const[e,[,t]]of l)await I(g.BERRY_BIN_FOLDER,(0,i.Zu)(e),process.execPath,[t]);let f;try{f=await d.pipevp(process.execPath,[...u,t,...r],{cwd:n,env:g,stdin:s,stdout:a,stderr:c})}finally{await A.xfs.removePromise(g.BERRY_BIN_FOLDER)}return f.code})}async function F(e,t,r,{cwd:n,stdin:i,stdout:o,stderr:s}){return await x(e.anchoredLocator,t,r,{project:e.project,cwd:n,stdin:i,stdout:o,stderr:s})}!function(e){e.Yarn1="Yarn Classic",e.Yarn2="Yarn",e.Npm="npm",e.Pnpm="pnpm"}(n||(n={}))},36545:(e,t,r)=>{"use strict";r.r(t),r.d(t,{satisfiesWithPrereleases:()=>o});var n=r(10966),i=r.n(n);function o(e,t,r=!1){let n,o;try{n=new(i().Range)(t,r)}catch(e){return!1}if(!e)return!1;try{o=new(i().SemVer)(e,n.loose),o.prerelease&&(o.prerelease=[])}catch(e){return!1}return n.set.some(e=>{for(const t of e)t.semver.prerelease&&(t.semver.prerelease=[]);return e.every(e=>e.test(o))})}},54143:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeIdent:()=>l,makeDescriptor:()=>h,makeLocator:()=>g,convertToIdent:()=>f,convertDescriptorToLocator:()=>p,convertLocatorToDescriptor:()=>d,convertPackageToLocator:()=>C,renamePackage:()=>E,copyPackage:()=>I,virtualizeDescriptor:()=>m,virtualizePackage:()=>y,isVirtualDescriptor:()=>w,isVirtualLocator:()=>B,devirtualizeDescriptor:()=>Q,devirtualizeLocator:()=>v,bindDescriptor:()=>D,bindLocator:()=>b,areIdentsEqual:()=>S,areDescriptorsEqual:()=>k,areLocatorsEqual:()=>x,areVirtualPackagesEquivalent:()=>F,parseIdent:()=>M,tryParseIdent:()=>N,parseDescriptor:()=>R,tryParseDescriptor:()=>L,parseLocator:()=>K,tryParseLocator:()=>T,parseRange:()=>_,parseFileStyleRange:()=>P,makeRange:()=>U,convertToManifestRange:()=>j,requirableIdent:()=>Y,stringifyIdent:()=>G,stringifyDescriptor:()=>J,stringifyLocator:()=>H,slugifyIdent:()=>z,slugifyLocator:()=>q,prettyIdent:()=>W,prettyRange:()=>X,prettyDescriptor:()=>Z,prettyReference:()=>$,prettyLocator:()=>ee,prettyLocatorNoColors:()=>te,sortDescriptors:()=>re,prettyWorkspace:()=>ne,getIdentVendorPath:()=>ie});var n=r(46009),i=r(71191),o=r.n(i),s=r(10966),A=r.n(s),a=r(27122),c=r(20624),u=r(73632);function l(e,t){return{identHash:c.makeHash(e,t),scope:e,name:t}}function h(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:c.makeHash(e.identHash,t),range:t}}function g(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:c.makeHash(e.identHash,t),reference:t}}function f(e){return{identHash:e.identHash,scope:e.scope,name:e.name}}function p(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.descriptorHash,reference:e.range}}function d(e){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:e.locatorHash,range:e.reference}}function C(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference}}function E(e,t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference,version:e.version,languageName:e.languageName,linkType:e.linkType,dependencies:new Map(e.dependencies),peerDependencies:new Map(e.peerDependencies),dependenciesMeta:new Map(e.dependenciesMeta),peerDependenciesMeta:new Map(e.peerDependenciesMeta),bin:new Map(e.bin)}}function I(e){return E(e,e)}function m(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return h(e,`virtual:${t}#${e.range}`)}function y(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return E(e,g(e,`virtual:${t}#${e.reference}`))}function w(e){return e.range.startsWith("virtual:")}function B(e){return e.reference.startsWith("virtual:")}function Q(e){if(!w(e))throw new Error("Not a virtual descriptor");return h(e,e.range.replace(/^[^#]*#/,""))}function v(e){if(!B(e))throw new Error("Not a virtual descriptor");return g(e,e.reference.replace(/^[^#]*#/,""))}function D(e,t){return e.range.includes("::")?e:h(e,`${e.range}::${o().stringify(t)}`)}function b(e,t){return e.reference.includes("::")?e:g(e,`${e.reference}::${o().stringify(t)}`)}function S(e,t){return e.identHash===t.identHash}function k(e,t){return e.descriptorHash===t.descriptorHash}function x(e,t){return e.locatorHash===t.locatorHash}function F(e,t){if(!B(e))throw new Error("Invalid package type");if(!B(t))throw new Error("Invalid package type");if(!S(e,t))return!1;if(e.dependencies.size!==t.dependencies.size)return!1;for(const r of e.dependencies.values()){const e=t.dependencies.get(r.identHash);if(!e)return!1;if(!k(r,e))return!1}return!0}function M(e){const t=N(e);if(!t)throw new Error(`Invalid ident (${e})`);return t}function N(e){const t=e.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!t)return null;const[,r,n]=t;return l(void 0!==r?r:null,n)}function R(e,t=!1){const r=L(e,t);if(!r)throw new Error(`Invalid descriptor (${e})`);return r}function L(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,n,i,o]=r;if("unknown"===o)throw new Error(`Invalid range (${e})`);const s=void 0!==o?o:"unknown";return h(l(void 0!==n?n:null,i),s)}function K(e,t=!1){const r=T(e,t);if(!r)throw new Error(`Invalid locator (${e})`);return r}function T(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,n,i,o]=r;if("unknown"===o)throw new Error(`Invalid reference (${e})`);const s=void 0!==o?o:"unknown";return g(l(void 0!==n?n:null,i),s)}function _(e,t){const r=e.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(null===r)throw new Error(`Invalid range (${e})`);const n=void 0!==r[1]?r[1]:null;if("string"==typeof(null==t?void 0:t.requireProtocol)&&n!==t.requireProtocol)throw new Error(`Invalid protocol (${n})`);if((null==t?void 0:t.requireProtocol)&&null===n)throw new Error(`Missing protocol (${n})`);const i=void 0!==r[3]?decodeURIComponent(r[2]):null;if((null==t?void 0:t.requireSource)&&null===i)throw new Error(`Missing source (${e})`);const s=void 0!==r[3]?decodeURIComponent(r[3]):decodeURIComponent(r[2]);return{protocol:n,source:i,selector:(null==t?void 0:t.parseSelector)?o().parse(s):s,params:void 0!==r[4]?o().parse(r[4]):null}}function P(e,{protocol:t}){const{selector:r,params:n}=_(e,{requireProtocol:t,requireBindings:!0});if("string"!=typeof n.locator)throw new Error("Assertion failed: Invalid bindings for "+e);return{parentLocator:K(n.locator,!0),path:r}}function O(e){return e=(e=(e=e.replace(/%/g,"%25")).replace(/:/g,"%3A")).replace(/#/g,"%23")}function U({protocol:e,source:t,selector:r,params:n}){let i="";return null!==e&&(i+=""+e),null!==t&&(i+=O(t)+"#"),i+=O(r),function(e){return null!==e&&Object.entries(e).length>0}(n)&&(i+="::"+o().stringify(n)),i}function j(e){const{params:t,protocol:r,source:n,selector:i}=_(e);for(const e in t)e.startsWith("__")&&delete t[e];return U({protocol:r,source:n,params:t,selector:i})}function Y(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function G(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function J(e){return e.scope?`@${e.scope}/${e.name}@${e.range}`:`${e.name}@${e.range}`}function H(e){return e.scope?`@${e.scope}/${e.name}@${e.reference}`:`${e.name}@${e.reference}`}function z(e){return null!==e.scope?`@${e.scope}-${e.name}`:e.name}function q(e){const{protocol:t,selector:r}=_(e.reference),i=null!==t?t.replace(/:$/,""):"exotic",o=A().valid(r),s=null!==o?`${i}-${o}`:""+i,a=(e.scope,`${z(e)}-${s}-${e.locatorHash.slice(0,10)}`);return(0,n.Zu)(a)}function W(e,t){return t.scope?`${e.format(`@${t.scope}/`,a.a5.SCOPE)}${e.format(t.name,a.a5.NAME)}`:""+e.format(t.name,a.a5.NAME)}function V(e){if(e.startsWith("virtual:")){return`${V(e.substr(e.indexOf("#")+1))} [${e.substr("virtual:".length,5)}]`}return e.replace(/\?.*/,"?[...]")}function X(e,t){return""+e.format(V(t),a.a5.RANGE)}function Z(e,t){return`${W(e,t)}${e.format("@",a.a5.RANGE)}${X(e,t.range)}`}function $(e,t){return""+e.format(V(t),a.a5.REFERENCE)}function ee(e,t){return`${W(e,t)}${e.format("@",a.a5.REFERENCE)}${$(e,t.reference)}`}function te(e){return`${G(e)}@${V(e.reference)}`}function re(e){return u.sortMap(e,[e=>G(e),e=>e.range])}function ne(e,t){return W(e,t.locator)}function ie(e){return"node_modules/"+Y(e)}},32485:(e,t,r)=>{"use strict";var n;r.d(t,{U:()=>n}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(n||(n={}))},14626:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var n=r(42096);class i extends n.p{constructor(e,{baseFs:t,pathUtils:r}){super(r),this.target=e,this.baseFs=t}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}},75448:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(78420),i=r(42096),o=r(46009);class s extends i.p{constructor(e,{baseFs:t=new n.S}={}){super(o.y1),this.target=this.pathUtils.normalize(e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?o.y1.normalize(e):this.baseFs.resolve(o.y1.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}},35398:(e,t,r)=>{"use strict";r.d(t,{uY:()=>a,fS:()=>c,qH:()=>u});var n=r(12087),i=r(35747),o=r.n(i),s=r(46009);async function A(e,t,r,n,i,a,c){const u=await async function(e,t){try{return await e.lstatPromise(t)}catch(e){return null}}(r,n),l=await i.lstatPromise(a);switch(c.stableTime?t.push([n,315532800,315532800]):t.push([n,l.atime,l.mtime]),!0){case l.isDirectory():await async function(e,t,r,n,i,o,s,a,c){if(null!==i&&!i.isDirectory()){if(!c.overwrite)return;e.push(async()=>r.removePromise(n)),i=null}null===i&&e.push(async()=>r.mkdirPromise(n,{mode:a.mode}));const u=await o.readdirPromise(s);if(c.stableSort)for(const i of u.sort())await A(e,t,r,r.pathUtils.join(n,i),o,o.pathUtils.join(s,i),c);else await Promise.all(u.map(async i=>{await A(e,t,r,r.pathUtils.join(n,i),o,o.pathUtils.join(s,i),c)}))}(e,t,r,n,u,i,a,l,c);break;case l.isFile():await async function(e,t,r,n,i,s,A,a,c){if(null!==i){if(!c.overwrite)return;e.push(async()=>r.removePromise(n)),i=null}r===s?e.push(async()=>r.copyFilePromise(A,n,o().constants.COPYFILE_FICLONE)):e.push(async()=>r.writeFilePromise(n,await s.readFilePromise(A)))}(e,0,r,n,u,i,a,0,c);break;case l.isSymbolicLink():await async function(e,t,r,n,i,o,A,a,c){if(null!==i){if(!c.overwrite)return;e.push(async()=>r.removePromise(n)),i=null}const u=await o.readlinkPromise(A);e.push(async()=>r.symlinkPromise((0,s.CI)(r.pathUtils,u),n))}(e,0,r,n,u,i,a,0,c);break;default:throw new Error(`Unsupported file type (${l.mode})`)}e.push(async()=>r.chmodPromise(n,511&l.mode))}class a{constructor(e){this.pathUtils=e}async removePromise(e){let t;try{t=await this.lstatPromise(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(t.isDirectory()){for(const t of await this.readdirPromise(e))await this.removePromise(this.pathUtils.resolve(e,t));for(let t=0;t<5;++t)try{await this.rmdirPromise(e);break}catch(e){if("EBUSY"===e.code||"ENOTEMPTY"===e.code){await new Promise(e=>setTimeout(e,100*t));continue}throw e}}else await this.unlinkPromise(e)}removeSync(e){let t;try{t=this.lstatSync(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(t.isDirectory()){for(const t of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,t));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:t,utimes:r}={}){if((e=this.resolve(e))===this.pathUtils.dirname(e))return;const n=e.split(this.pathUtils.sep);for(let e=2;e<=n.length;++e){const i=n.slice(0,e).join(this.pathUtils.sep);if(!this.existsSync(i)){try{await this.mkdirPromise(i)}catch(e){if("EEXIST"===e.code)continue;throw e}if(null!=t&&await this.chmodPromise(i,t),null!=r)await this.utimesPromise(i,r[0],r[1]);else{const e=await this.statPromise(this.pathUtils.dirname(i));await this.utimesPromise(i,e.atime,e.mtime)}}}}mkdirpSync(e,{chmod:t,utimes:r}={}){if((e=this.resolve(e))===this.pathUtils.dirname(e))return;const n=e.split(this.pathUtils.sep);for(let e=2;e<=n.length;++e){const i=n.slice(0,e).join(this.pathUtils.sep);if(!this.existsSync(i)){try{this.mkdirSync(i)}catch(e){if("EEXIST"===e.code)continue;throw e}if(null!=t&&this.chmodSync(i,t),null!=r)this.utimesSync(i,r[0],r[1]);else{const e=this.statSync(this.pathUtils.dirname(i));this.utimesSync(i,e.atime,e.mtime)}}}}async copyPromise(e,t,{baseFs:r=this,overwrite:n=!0,stableSort:i=!1,stableTime:o=!1}={}){return await async function(e,t,r,n,i){const o=e.pathUtils.normalize(t),s=r.pathUtils.normalize(n),a=[],c=[];await e.mkdirpPromise(t),await A(a,c,e,o,r,s,i);for(const e of a)await e();const u="function"==typeof e.lutimesPromise?e.lutimesPromise.bind(e):e.utimesPromise.bind(e);for(const[e,t,r]of c)await u(e,t,r)}(this,e,r,t,{overwrite:n,stableSort:i,stableTime:o})}copySync(e,t,{baseFs:r=this,overwrite:n=!0}={}){const i=r.lstatSync(t),o=this.existsSync(e);if(i.isDirectory()){this.mkdirpSync(e);const i=r.readdirSync(t);for(const o of i)this.copySync(this.pathUtils.join(e,o),r.pathUtils.join(t,o),{baseFs:r,overwrite:n})}else if(i.isFile()){if(!o||n){o&&this.removeSync(e);const n=r.readFileSync(t);this.writeFileSync(e,n)}}else{if(!i.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${i.mode.toString(8).padStart(6,"0")})`);if(!o||n){o&&this.removeSync(e);const n=r.readlinkSync(t);this.symlinkSync((0,s.CI)(this.pathUtils,n),e)}}const A=511&i.mode;this.chmodSync(e,A)}async changeFilePromise(e,t,{automaticNewlines:r}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch(e){}const i=r?u(n,t):t;n!==i&&await this.writeFilePromise(e,i)}changeFileSync(e,t,{automaticNewlines:r=!1}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch(e){}const i=r?u(n,t):t;n!==i&&this.writeFileSync(e,i)}async movePromise(e,t){try{await this.renamePromise(e,t)}catch(r){if("EXDEV"!==r.code)throw r;await this.copyPromise(t,e),await this.removePromise(e)}}moveSync(e,t){try{this.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;this.copySync(t,e),this.removeSync(e)}}async lockPromise(e,t){const r=e+".flock",n=Date.now();let i=null;const o=async()=>{let e;try{[e]=await this.readJsonPromise(r)}catch(e){return Date.now()-n<500}try{return process.kill(e,0),!0}catch(e){return!1}};for(;null===i;)try{i=await this.openPromise(r,"wx")}catch(e){if("EEXIST"!==e.code)throw e;if(!await o())try{await this.unlinkPromise(r);continue}catch(e){}if(!(Date.now()-n<6e4))throw new Error(`Couldn't acquire a lock in a reasonable time (via ${r})`);await new Promise(e=>setTimeout(e,1e3/60))}await this.writePromise(i,JSON.stringify([process.pid]));try{return await t()}finally{try{await this.unlinkPromise(r),await this.closePromise(i)}catch(e){}}}async readJsonPromise(e){const t=await this.readFilePromise(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}async readJsonSync(e){const t=this.readFileSync(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}async writeJsonPromise(e,t){return await this.writeFilePromise(e,JSON.stringify(t,null,2)+"\n")}writeJsonSync(e,t){return this.writeFileSync(e,JSON.stringify(t,null,2)+"\n")}async preserveTimePromise(e,t){const r=await this.lstatPromise(e),n=await t();void 0!==n&&(e=n),this.lutimesPromise?await this.lutimesPromise(e,r.atime,r.mtime):r.isSymbolicLink()||await this.utimesPromise(e,r.atime,r.mtime)}async preserveTimeSync(e,t){const r=this.lstatSync(e),n=t();void 0!==n&&(e=n),this.lutimesSync?this.lutimesSync(e,r.atime,r.mtime):r.isSymbolicLink()||this.utimesSync(e,r.atime,r.mtime)}}a.DEFAULT_TIME=315532800;class c extends a{constructor(){super(s.y1)}}function u(e,t){return t.replace(/\r?\n/g,function(e){const t=e.match(/\r?\n/g);if(null===t)return n.EOL;const r=t.filter(e=>"\r\n"===e).length;return r>t.length-r?"\r\n":"\n"}(e))}},10489:(e,t,r)=>{"use strict";r.d(t,{n:()=>A});var n=r(78420),i=r(42096),o=r(46009);const s=o.LZ.root;class A extends i.p{constructor(e,{baseFs:t=new n.S}={}){super(o.y1),this.target=this.pathUtils.resolve(o.LZ.root,e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(o.LZ.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){const t=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(s,e));if(t.match(/^\.\.\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(s,this.pathUtils.relative(this.target,e))}}},15037:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(42096);class i extends n.p{constructor(e,t){super(t),this.instance=null,this.factory=e}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(e){this.instance=e}mapFromBase(e){return e}mapToBase(e){return e}}},78420:(e,t,r)=>{"use strict";r.d(t,{S:()=>a});var n=r(35747),i=r.n(n),o=r(35398),s=r(26984),A=r(46009);class a extends o.fS{constructor(e=i()){super(),this.realFs=e,void 0!==this.realFs.lutimes&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return A.LZ.root}resolve(e){return A.y1.resolve(e)}async openPromise(e,t,r){return await new Promise((n,i)=>{this.realFs.open(A.cS.fromPortablePath(e),t,r,this.makeCallback(n,i))})}openSync(e,t,r){return this.realFs.openSync(A.cS.fromPortablePath(e),t,r)}async readPromise(e,t,r=0,n=0,i=-1){return await new Promise((o,s)=>{this.realFs.read(e,t,r,n,i,(e,t)=>{e?s(e):o(t)})})}readSync(e,t,r,n,i){return this.realFs.readSync(e,t,r,n,i)}async writePromise(e,t,r,n,i){return await new Promise((o,s)=>"string"==typeof t?this.realFs.write(e,t,r,this.makeCallback(o,s)):this.realFs.write(e,t,r,n,i,this.makeCallback(o,s)))}writeSync(e,t,r,n,i){return"string"==typeof t?this.realFs.writeSync(e,t,r):this.realFs.writeSync(e,t,r,n,i)}async closePromise(e){await new Promise((t,r)=>{this.realFs.close(e,this.makeCallback(t,r))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,t){const r=null!==e?A.cS.fromPortablePath(e):e;return this.realFs.createReadStream(r,t)}createWriteStream(e,t){const r=null!==e?A.cS.fromPortablePath(e):e;return this.realFs.createWriteStream(r,t)}async realpathPromise(e){return await new Promise((t,r)=>{this.realFs.realpath(A.cS.fromPortablePath(e),{},this.makeCallback(t,r))}).then(e=>A.cS.toPortablePath(e))}realpathSync(e){return A.cS.toPortablePath(this.realFs.realpathSync(A.cS.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(t=>{this.realFs.exists(A.cS.fromPortablePath(e),t)})}accessSync(e,t){return this.realFs.accessSync(A.cS.fromPortablePath(e),t)}async accessPromise(e,t){return await new Promise((r,n)=>{this.realFs.access(A.cS.fromPortablePath(e),t,this.makeCallback(r,n))})}existsSync(e){return this.realFs.existsSync(A.cS.fromPortablePath(e))}async statPromise(e){return await new Promise((t,r)=>{this.realFs.stat(A.cS.fromPortablePath(e),this.makeCallback(t,r))})}statSync(e){return this.realFs.statSync(A.cS.fromPortablePath(e))}async lstatPromise(e){return await new Promise((t,r)=>{this.realFs.lstat(A.cS.fromPortablePath(e),this.makeCallback(t,r))})}lstatSync(e){return this.realFs.lstatSync(A.cS.fromPortablePath(e))}async chmodPromise(e,t){return await new Promise((r,n)=>{this.realFs.chmod(A.cS.fromPortablePath(e),t,this.makeCallback(r,n))})}chmodSync(e,t){return this.realFs.chmodSync(A.cS.fromPortablePath(e),t)}async renamePromise(e,t){return await new Promise((r,n)=>{this.realFs.rename(A.cS.fromPortablePath(e),A.cS.fromPortablePath(t),this.makeCallback(r,n))})}renameSync(e,t){return this.realFs.renameSync(A.cS.fromPortablePath(e),A.cS.fromPortablePath(t))}async copyFilePromise(e,t,r=0){return await new Promise((n,i)=>{this.realFs.copyFile(A.cS.fromPortablePath(e),A.cS.fromPortablePath(t),r,this.makeCallback(n,i))})}copyFileSync(e,t,r=0){return this.realFs.copyFileSync(A.cS.fromPortablePath(e),A.cS.fromPortablePath(t),r)}async appendFilePromise(e,t,r){return await new Promise((n,i)=>{const o="string"==typeof e?A.cS.fromPortablePath(e):e;r?this.realFs.appendFile(o,t,r,this.makeCallback(n,i)):this.realFs.appendFile(o,t,this.makeCallback(n,i))})}appendFileSync(e,t,r){const n="string"==typeof e?A.cS.fromPortablePath(e):e;r?this.realFs.appendFileSync(n,t,r):this.realFs.appendFileSync(n,t)}async writeFilePromise(e,t,r){return await new Promise((n,i)=>{const o="string"==typeof e?A.cS.fromPortablePath(e):e;r?this.realFs.writeFile(o,t,r,this.makeCallback(n,i)):this.realFs.writeFile(o,t,this.makeCallback(n,i))})}writeFileSync(e,t,r){const n="string"==typeof e?A.cS.fromPortablePath(e):e;r?this.realFs.writeFileSync(n,t,r):this.realFs.writeFileSync(n,t)}async unlinkPromise(e){return await new Promise((t,r)=>{this.realFs.unlink(A.cS.fromPortablePath(e),this.makeCallback(t,r))})}unlinkSync(e){return this.realFs.unlinkSync(A.cS.fromPortablePath(e))}async utimesPromise(e,t,r){return await new Promise((n,i)=>{this.realFs.utimes(A.cS.fromPortablePath(e),t,r,this.makeCallback(n,i))})}utimesSync(e,t,r){this.realFs.utimesSync(A.cS.fromPortablePath(e),t,r)}async lutimesPromiseImpl(e,t,r){const n=this.realFs.lutimes;if(void 0===n)throw(0,s.bk)("unavailable Node binding",`lutimes '${e}'`);return await new Promise((i,o)=>{n.call(this.realFs,A.cS.fromPortablePath(e),t,r,this.makeCallback(i,o))})}lutimesSyncImpl(e,t,r){const n=this.realFs.lutimesSync;if(void 0===n)throw(0,s.bk)("unavailable Node binding",`lutimes '${e}'`);n.call(this.realFs,A.cS.fromPortablePath(e),t,r)}async mkdirPromise(e,t){return await new Promise((r,n)=>{this.realFs.mkdir(A.cS.fromPortablePath(e),t,this.makeCallback(r,n))})}mkdirSync(e,t){return this.realFs.mkdirSync(A.cS.fromPortablePath(e),t)}async rmdirPromise(e){return await new Promise((t,r)=>{this.realFs.rmdir(A.cS.fromPortablePath(e),this.makeCallback(t,r))})}rmdirSync(e){return this.realFs.rmdirSync(A.cS.fromPortablePath(e))}async symlinkPromise(e,t,r){const n=r||(e.endsWith("/")?"dir":"file");return await new Promise((r,i)=>{this.realFs.symlink(A.cS.fromPortablePath(e.replace(/\/+$/,"")),A.cS.fromPortablePath(t),n,this.makeCallback(r,i))})}symlinkSync(e,t,r){const n=r||(e.endsWith("/")?"dir":"file");return this.realFs.symlinkSync(A.cS.fromPortablePath(e.replace(/\/+$/,"")),A.cS.fromPortablePath(t),n)}async readFilePromise(e,t){return await new Promise((r,n)=>{const i="string"==typeof e?A.cS.fromPortablePath(e):e;this.realFs.readFile(i,t,this.makeCallback(r,n))})}readFileSync(e,t){const r="string"==typeof e?A.cS.fromPortablePath(e):e;return this.realFs.readFileSync(r,t)}async readdirPromise(e,{withFileTypes:t}={}){return await new Promise((r,n)=>{t?this.realFs.readdir(A.cS.fromPortablePath(e),{withFileTypes:!0},this.makeCallback(r,n)):this.realFs.readdir(A.cS.fromPortablePath(e),this.makeCallback(e=>r(e),n))})}readdirSync(e,{withFileTypes:t}={}){return t?this.realFs.readdirSync(A.cS.fromPortablePath(e),{withFileTypes:!0}):this.realFs.readdirSync(A.cS.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((t,r)=>{this.realFs.readlink(A.cS.fromPortablePath(e),this.makeCallback(t,r))}).then(e=>A.cS.toPortablePath(e))}readlinkSync(e){return A.cS.toPortablePath(this.realFs.readlinkSync(A.cS.fromPortablePath(e)))}watch(e,t,r){return this.realFs.watch(A.cS.fromPortablePath(e),t,r)}makeCallback(e,t){return(r,n)=>{r?t(r):e(n)}}}},39725:(e,t,r)=>{"use strict";r.d(t,{i:()=>o});var n=r(42096),i=r(46009);class o extends n.p{constructor(e){super(i.cS),this.baseFs=e}mapFromBase(e){return i.cS.fromPortablePath(e)}mapToBase(e){return i.cS.toPortablePath(e)}}},42096:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var n=r(35398);class i extends n.uY{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}openPromise(e,t,r){return this.baseFs.openPromise(this.mapToBase(e),t,r)}openSync(e,t,r){return this.baseFs.openSync(this.mapToBase(e),t,r)}async readPromise(e,t,r,n,i){return await this.baseFs.readPromise(e,t,r,n,i)}readSync(e,t,r,n,i){return this.baseFs.readSync(e,t,r,n,i)}async writePromise(e,t,r,n,i){return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,n,i)}writeSync(e,t,r,n,i){return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,n,i)}closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,t){return this.baseFs.createReadStream(null!==e?this.mapToBase(e):e,t)}createWriteStream(e,t){return this.baseFs.createWriteStream(null!==e?this.mapToBase(e):e,t)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,t){return this.baseFs.accessSync(this.mapToBase(e),t)}accessPromise(e,t){return this.baseFs.accessPromise(this.mapToBase(e),t)}statPromise(e){return this.baseFs.statPromise(this.mapToBase(e))}statSync(e){return this.baseFs.statSync(this.mapToBase(e))}lstatPromise(e){return this.baseFs.lstatPromise(this.mapToBase(e))}lstatSync(e){return this.baseFs.lstatSync(this.mapToBase(e))}chmodPromise(e,t){return this.baseFs.chmodPromise(this.mapToBase(e),t)}chmodSync(e,t){return this.baseFs.chmodSync(this.mapToBase(e),t)}renamePromise(e,t){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(t))}renameSync(e,t){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(t))}copyFilePromise(e,t,r=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(t),r)}copyFileSync(e,t,r=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(t),r)}appendFilePromise(e,t,r){return this.baseFs.appendFilePromise(this.fsMapToBase(e),t,r)}appendFileSync(e,t,r){return this.baseFs.appendFileSync(this.fsMapToBase(e),t,r)}writeFilePromise(e,t,r){return this.baseFs.writeFilePromise(this.fsMapToBase(e),t,r)}writeFileSync(e,t,r){return this.baseFs.writeFileSync(this.fsMapToBase(e),t,r)}unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}utimesPromise(e,t,r){return this.baseFs.utimesPromise(this.mapToBase(e),t,r)}utimesSync(e,t,r){return this.baseFs.utimesSync(this.mapToBase(e),t,r)}mkdirPromise(e,t){return this.baseFs.mkdirPromise(this.mapToBase(e),t)}mkdirSync(e,t){return this.baseFs.mkdirSync(this.mapToBase(e),t)}rmdirPromise(e){return this.baseFs.rmdirPromise(this.mapToBase(e))}rmdirSync(e){return this.baseFs.rmdirSync(this.mapToBase(e))}symlinkPromise(e,t,r){return this.baseFs.symlinkPromise(this.mapToBase(e),this.mapToBase(t),r)}symlinkSync(e,t,r){return this.baseFs.symlinkSync(this.mapToBase(e),this.mapToBase(t),r)}readFilePromise(e,t){return this.baseFs.readFilePromise(this.fsMapToBase(e),t)}readFileSync(e,t){return this.baseFs.readFileSync(this.fsMapToBase(e),t)}async readdirPromise(e,{withFileTypes:t}={}){return this.baseFs.readdirPromise(this.mapToBase(e),{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){return this.baseFs.readdirSync(this.mapToBase(e),{withFileTypes:t})}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}watch(e,t,r){return this.baseFs.watch(this.mapToBase(e),t,r)}fsMapToBase(e){return"number"==typeof e?e:this.mapToBase(e)}}},17674:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var n=r(78420),i=r(42096),o=r(46009);const s=/^[0-9]+$/,A=/^(\/(?:[^/]+\/)*?\$\$virtual)((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,a=/^([^/]+-)?[a-f0-9]+$/;class c extends i.p{constructor({baseFs:e=new n.S}={}){super(o.y1),this.baseFs=e}static makeVirtualPath(e,t,r){if("$$virtual"!==o.y1.basename(e))throw new Error('Assertion failed: Virtual folders must be named "$$virtual"');if(!o.y1.basename(t).match(a))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");const n=o.y1.relative(o.y1.dirname(e),r).split("/");let i=0;for(;i{"use strict";r.d(t,{k:()=>u,d:()=>g});var n=r(35747),i=r(92413),o=r(31669),s=r(35398),A=r(78420),a=r(26984),c=r(46009);const u="mixed";class l{constructor(){this.dev=0,this.ino=0,this.mode=0,this.nlink=1,this.rdev=0,this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return 16384==(61440&this.mode)}isFIFO(){return!1}isFile(){return 32768==(61440&this.mode)}isSocket(){return!1}isSymbolicLink(){return 40960==(61440&this.mode)}}function h(){return Object.assign(new l,{uid:0,gid:0,size:0,blksize:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date(0),mtime:new Date(0),ctime:new Date(0),birthtime:new Date(0),mode:33188})}class g extends s.fS{constructor(e,t){super(),this.lzSource=null,this.listings=new Map,this.entries=new Map,this.fds=new Map,this.nextFd=0,this.ready=!1,this.readOnly=!1,this.libzip=t.libzip;const r=t;if(this.level=void 0!==r.level?r.level:u,null===e&&(e=Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),"string"==typeof e){const{baseFs:t=new A.S}=r;this.baseFs=t,this.path=e}else this.path=null,this.baseFs=null;if(t.stats)this.stats=t.stats;else if("string"==typeof e)try{this.stats=this.baseFs.statSync(e)}catch(e){if("ENOENT"!==e.code||!r.create)throw e;this.stats=h()}else this.stats=h();const n=this.libzip.malloc(4);try{let i=0;if("string"==typeof e&&r.create&&(i|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE),t.readOnly&&(i|=this.libzip.ZIP_RDONLY,this.readOnly=!0),"string"==typeof e)this.zip=this.libzip.open(c.cS.fromPortablePath(e),i,n);else{const t=this.allocateUnattachedSource(e);try{this.zip=this.libzip.openFromSource(t,i,n),this.lzSource=t}catch(e){throw this.libzip.source.free(t),e}}if(0===this.zip){const e=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(e,this.libzip.getValue(n,"i32")),new Error(this.libzip.error.strerror(e))}}finally{this.libzip.free(n)}this.listings.set(c.LZ.root,new Set);const i=this.libzip.getNumEntries(this.zip,0);for(let e=0;ee)throw new Error("Overread");const n=this.libzip.HEAPU8.subarray(t,t+e);return Buffer.from(n)}finally{this.libzip.free(t)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(!this.ready)throw a.Vw("archive closed, close");if(this.readOnly)return void this.discardAndClose();const e=this.baseFs.existsSync(this.path)?511&this.baseFs.statSync(this.path).mode:null;if(-1===this.libzip.close(this.zip))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));null===e?this.baseFs.chmodSync(this.path,this.stats.mode):e!==(511&this.baseFs.statSync(this.path).mode)&&this.baseFs.chmodSync(this.path,e),this.ready=!1}discardAndClose(){if(!this.ready)throw a.Vw("archive closed, close");this.libzip.discard(this.zip),this.ready=!1}resolve(e){return c.y1.resolve(c.LZ.root,e)}async openPromise(e,t,r){return this.openSync(e,t,r)}openSync(e,t,r){const n=this.nextFd++;return this.fds.set(n,{cursor:0,p:e}),n}async readPromise(e,t,r,n,i){return this.readSync(e,t,r,n,i)}readSync(e,t,r=0,n=0,i=-1){const o=this.fds.get(e);if(void 0===o)throw a.Ch("read");let s;s=-1===i||null===i?o.cursor:i;const A=this.readFileSync(o.p);A.copy(t,r,s,s+n);const c=Math.max(0,Math.min(A.length-s,n));return-1!==i&&null!==i||(o.cursor+=c),c}async writePromise(e,t,r,n,i){return"string"==typeof t?this.writeSync(e,t,i):this.writeSync(e,t,r,n,i)}writeSync(e,t,r,n,i){if(void 0===this.fds.get(e))throw a.Ch("read");throw new Error("Unimplemented")}async closePromise(e){return this.closeSync(e)}closeSync(e){if(void 0===this.fds.get(e))throw a.Ch("read");this.fds.delete(e)}createReadStream(e,{encoding:t}={}){if(null===e)throw new Error("Unimplemented");const r=Object.assign(new i.PassThrough,{bytesRead:0,path:e,close:()=>{clearImmediate(n)}}),n=setImmediate(()=>{try{const n=this.readFileSync(e,t);r.bytesRead=n.length,r.write(n),r.end()}catch(e){r.emit("error",e),r.end()}});return r}createWriteStream(e,{encoding:t}={}){if(this.readOnly)throw a.YW(`open '${e}'`);if(null===e)throw new Error("Unimplemented");const r=Object.assign(new i.PassThrough,{bytesWritten:0,path:e,close:()=>{r.end()}}),n=[];return r.on("data",e=>{const t=Buffer.from(e);r.bytesWritten+=t.length,n.push(t)}),r.on("end",()=>{this.writeFileSync(e,Buffer.concat(n),t)}),r}async realpathPromise(e){return this.realpathSync(e)}realpathSync(e){const t=this.resolveFilename(`lstat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw a.z6(`lstat '${e}'`);return t}async existsPromise(e){return this.existsSync(e)}existsSync(e){let t;try{t=this.resolveFilename(`stat '${e}'`,e)}catch(e){return!1}return this.entries.has(t)||this.listings.has(t)}async accessPromise(e,t){return this.accessSync(e,t)}accessSync(e,t=n.constants.F_OK){const r=this.resolveFilename(`access '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw a.z6(`access '${e}'`);if(this.readOnly&&t&n.constants.W_OK)throw a.YW(`access '${e}'`)}async statPromise(e){return this.statSync(e)}statSync(e){const t=this.resolveFilename(`stat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw a.z6(`stat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw a.Ab(`stat '${e}'`);return this.statImpl(`stat '${e}'`,t)}async lstatPromise(e){return this.lstatSync(e)}lstatSync(e){const t=this.resolveFilename(`lstat '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw a.z6(`lstat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw a.Ab(`lstat '${e}'`);return this.statImpl(`lstat '${e}'`,t)}statImpl(e,t){const r=this.entries.get(t);if(void 0!==r){const e=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,r,0,0,e))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));const n=this.stats.uid,i=this.stats.gid,o=this.libzip.struct.statSize(e)>>>0,s=512,A=Math.ceil(o/s),a=1e3*(this.libzip.struct.statMtime(e)>>>0),c=a,u=a,h=a,g=new Date(c),f=new Date(u),p=new Date(h),d=new Date(a),C=this.listings.has(t)?16384:this.isSymbolicLink(r)?40960:32768,E=16384===C?493:420,I=C|511&this.getUnixMode(r,E);return Object.assign(new l,{uid:n,gid:i,size:o,blksize:s,blocks:A,atime:g,birthtime:f,ctime:p,mtime:d,atimeMs:c,birthtimeMs:u,ctimeMs:h,mtimeMs:a,mode:I})}if(this.listings.has(t)){const e=this.stats.uid,t=this.stats.gid,r=0,n=512,i=0,o=this.stats.mtimeMs,s=this.stats.mtimeMs,A=this.stats.mtimeMs,a=this.stats.mtimeMs,c=new Date(o),u=new Date(s),h=new Date(A),g=new Date(a),f=16877;return Object.assign(new l,{uid:e,gid:t,size:r,blksize:n,blocks:i,atime:c,birthtime:u,ctime:h,mtime:g,atimeMs:o,birthtimeMs:s,ctimeMs:A,mtimeMs:a,mode:f})}throw new Error("Unreachable")}getUnixMode(e,t){if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?t:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(e){let t=this.listings.get(e);if(t)return t;const r=this.registerListing(c.y1.dirname(e));return t=new Set,r.add(c.y1.basename(e)),this.listings.set(e,t),t}registerEntry(e,t){this.registerListing(c.y1.dirname(e)).add(c.y1.basename(e)),this.entries.set(e,t)}resolveFilename(e,t,r=!0){if(!this.ready)throw a.Vw("archive closed, "+e);let n=c.y1.resolve(c.LZ.root,t);if("/"===n)return c.LZ.root;const i=this.entries.get(n);if(r&&void 0!==i){if(this.isSymbolicLink(i)){const t=this.getFileSource(i).toString();return this.resolveFilename(e,c.y1.resolve(c.y1.dirname(n),t),!0)}return n}for(;;){const t=this.resolveFilename(e,c.y1.dirname(n),!0),i=this.listings.has(t),o=this.entries.has(t);if(!i&&!o)throw a.z6(e);if(!i)throw a.Ab(e);if(n=c.y1.resolve(t,c.y1.basename(n)),!r)break;const s=this.libzip.name.locate(this.zip,n.slice(1));if(-1===s)break;if(!this.isSymbolicLink(s))break;{const e=this.getFileSource(s).toString();n=c.y1.resolve(c.y1.dirname(n),e)}}return n}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));const t=this.libzip.malloc(e.byteLength);if(!t)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,t,e.byteLength).set(e),{buffer:t,byteLength:e.byteLength}}allocateUnattachedSource(e){const t=this.libzip.struct.errorS(),{buffer:r,byteLength:n}=this.allocateBuffer(e),i=this.libzip.source.fromUnattachedBuffer(r,n,0,!0,t);if(0===i)throw this.libzip.free(t),new Error(this.libzip.error.strerror(t));return i}allocateSource(e){const{buffer:t,byteLength:r}=this.allocateBuffer(e),n=this.libzip.source.fromBuffer(this.zip,t,r,0,!0);if(0===n)throw this.libzip.free(t),new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));return n}setFileSource(e,t){const r=c.y1.relative(c.LZ.root,e),n=this.allocateSource(t);try{const e=this.libzip.file.add(this.zip,r,n,this.libzip.ZIP_FL_OVERWRITE);if("mixed"!==this.level){let t;t=0===this.level?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(-1===this.libzip.file.setCompression(this.zip,e,0,t,this.level))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)))}return e}catch(e){throw this.libzip.source.free(n),e}}isSymbolicLink(e){if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));if(this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX)return!1;return 40960==(61440&this.libzip.getValue(this.libzip.uint32S,"i32")>>>16)}getFileSource(e){const t=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,e,0,0,t))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));const r=this.libzip.struct.statSize(t),n=this.libzip.malloc(r);try{const t=this.libzip.fopenIndex(this.zip,e,0,0);if(0===t)throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));try{const e=this.libzip.fread(t,n,r,0);if(-1===e)throw new Error(this.libzip.error.strerror(this.libzip.file.getError(t)));if(er)throw new Error("Overread");const i=this.libzip.HEAPU8.subarray(n,n+r);return Buffer.from(i)}finally{this.libzip.fclose(t)}}finally{this.libzip.free(n)}}async chmodPromise(e,t){return this.chmodSync(e,t)}chmodSync(e,t){if(this.readOnly)throw a.YW(`chmod '${e}'`);t&=493;const r=this.resolveFilename(`chmod '${e}'`,e,!1),n=this.entries.get(r);if(void 0===n)throw new Error(`Assertion failed: The entry should have been registered (${r})`);const i=-512&this.getUnixMode(n,32768)|t;if(-1===this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,i<<16))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)))}async renamePromise(e,t){return this.renameSync(e,t)}renameSync(e,t){throw new Error("Unimplemented")}async copyFilePromise(e,t,r){return this.copyFileSync(e,t,r)}copyFileSync(e,t,r=0){if(this.readOnly)throw a.YW(`copyfile '${e} -> '${t}'`);if(0!=(r&n.constants.COPYFILE_FICLONE_FORCE))throw a.bk("unsupported clone operation",`copyfile '${e}' -> ${t}'`);const i=this.resolveFilename(`copyfile '${e} -> ${t}'`,e),o=this.entries.get(i);if(void 0===o)throw a.hq(`copyfile '${e}' -> '${t}'`);const s=this.resolveFilename(`copyfile '${e}' -> ${t}'`,t),A=this.entries.get(s);if(0!=(r&(n.constants.COPYFILE_EXCL|n.constants.COPYFILE_FICLONE_FORCE))&&void 0!==A)throw a.cT(`copyfile '${e}' -> '${t}'`);const c=this.getFileSource(o),u=this.setFileSource(s,c);u!==A&&this.registerEntry(s,u)}async appendFilePromise(e,t,r){return this.appendFileSync(e,t,r)}appendFileSync(e,t,r={}){if(this.readOnly)throw a.YW(`open '${e}'`);return void 0===r?r={flag:"a"}:"string"==typeof r?r={flag:"a",encoding:r}:void 0===r.flag&&(r={flag:"a",...r}),this.writeFileSync(e,t,r)}async writeFilePromise(e,t,r){return this.writeFileSync(e,t,r)}writeFileSync(e,t,r){if("string"!=typeof e)throw a.Ch("read");if(this.readOnly)throw a.YW(`open '${e}'`);const n=this.resolveFilename(`open '${e}'`,e);if(this.listings.has(n))throw a.GA(`open '${e}'`);const i=this.entries.get(n);void 0!==i&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([this.getFileSource(i),Buffer.from(t)]));let o=null;"string"==typeof r?o=r:"object"==typeof r&&r.encoding&&(o=r.encoding),null!==o&&(t=t.toString(o));const s=this.setFileSource(n,t);s!==i&&this.registerEntry(n,s)}async unlinkPromise(e){return this.unlinkSync(e)}unlinkSync(e){throw new Error("Unimplemented")}async utimesPromise(e,t,r){return this.utimesSync(e,t,r)}utimesSync(e,t,r){if(this.readOnly)throw a.YW(`utimes '${e}'`);const n=this.resolveFilename(`utimes '${e}'`,e);this.utimesImpl(n,r)}async lutimesPromise(e,t,r){return this.lutimesSync(e,t,r)}lutimesSync(e,t,r){if(this.readOnly)throw a.YW(`lutimes '${e}'`);const n=this.resolveFilename(`utimes '${e}'`,e,!1);this.utimesImpl(n,r)}utimesImpl(e,t){this.listings.has(e)&&(this.entries.has(e)||this.hydrateDirectory(e));const r=this.entries.get(e);if(void 0===r)throw new Error("Unreachable");if(-1===this.libzip.file.setMtime(this.zip,r,0,function(e){if("string"==typeof e&&String(+e)===e)return+e;if(Number.isFinite(e))return e<0?Date.now()/1e3:e;if((0,o.isDate)(e))return e.getTime()/1e3;throw new Error("Invalid time")}(t),0))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)))}async mkdirPromise(e,t){return this.mkdirSync(e,t)}mkdirSync(e,{mode:t=493,recursive:r=!1}={}){if(r)return void this.mkdirpSync(e,{chmod:t});if(this.readOnly)throw a.YW(`mkdir '${e}'`);const n=this.resolveFilename(`mkdir '${e}'`,e);if(this.entries.has(n)||this.listings.has(n))throw a.cT(`mkdir '${e}'`);this.hydrateDirectory(n),this.chmodSync(n,t)}async rmdirPromise(e){return this.rmdirSync(e)}rmdirSync(e){throw new Error("Unimplemented")}hydrateDirectory(e){const t=this.libzip.dir.add(this.zip,c.y1.relative(c.LZ.root,e));if(-1===t)throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));return this.registerListing(e),this.registerEntry(e,t),t}async symlinkPromise(e,t){return this.symlinkSync(e,t)}symlinkSync(e,t){if(this.readOnly)throw a.YW(`symlink '${e}' -> '${t}'`);const r=this.resolveFilename(`symlink '${e}' -> '${t}'`,t);if(this.listings.has(r))throw a.GA(`symlink '${e}' -> '${t}'`);if(this.entries.has(r))throw a.cT(`symlink '${e}' -> '${t}'`);const n=this.setFileSource(r,e);this.registerEntry(r,n);if(-1===this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,41471<<16))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)))}async readFilePromise(e,t){switch(t){case"utf8":default:return this.readFileSync(e,t)}}readFileSync(e,t){if("string"!=typeof e)throw a.Ch("read");"object"==typeof t&&(t=t?t.encoding:void 0);const r=this.resolveFilename(`open '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw a.z6(`open '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(r))throw a.Ab(`open '${e}'`);if(this.listings.has(r))throw a.GA("read");const n=this.entries.get(r);if(void 0===n)throw new Error("Unreachable");const i=this.getFileSource(n);return t?i.toString(t):i}async readdirPromise(e,{withFileTypes:t}={}){return this.readdirSync(e,{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){const r=this.resolveFilename(`scandir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw a.z6(`scandir '${e}'`);const n=this.listings.get(r);if(!n)throw a.Ab(`scandir '${e}'`);const i=[...n];return t?i.map(t=>Object.assign(this.statImpl("lstat",c.y1.join(e,t)),{name:t})):i}async readlinkPromise(e){return this.readlinkSync(e)}readlinkSync(e){const t=this.resolveFilename(`readlink '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw a.z6(`readlink '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw a.Ab(`open '${e}'`);if(this.listings.has(t))throw a.hq(`readlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw new Error("Unreachable");if(-1===this.libzip.file.getExternalAttributes(this.zip,r,0,0,this.libzip.uint08S,this.libzip.uint32S))throw new Error(this.libzip.error.strerror(this.libzip.getError(this.zip)));if(this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX)throw a.hq(`readlink '${e}'`);if(40960!=(61440&this.libzip.getValue(this.libzip.uint32S,"i32")>>>16))throw a.hq(`readlink '${e}'`);return this.getFileSource(r).toString()}watch(e,t,r){let n;switch(typeof t){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=t)}if(!n)return{on:()=>{},close:()=>{}};const i=setInterval(()=>{},864e5);return{on:()=>{},close:()=>{clearInterval(i)}}}}},53660:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(35747),i=r(35398),o=r(78420),s=r(90739),A=r(46009);const a=2147483648,c=/.*?(?await this.baseFs.openPromise(e,t,r),async(e,{subPath:n})=>this.remapFd(e,await e.openPromise(n,t,r)))}openSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.openSync(e,t,r),(e,{subPath:n})=>this.remapFd(e,e.openSync(n,t,r)))}async readPromise(e,t,r,n,i){if(0==(e&a))return await this.baseFs.readPromise(e,t,r,n,i);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[s,A]=o;return await s.readPromise(A,t,r,n,i)}readSync(e,t,r,n,i){if(0==(e&a))return this.baseFs.readSync(e,t,r,n,i);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[s,A]=o;return s.readSync(A,t,r,n,i)}async writePromise(e,t,r,n,i){if(0==(e&a))return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,n,i);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[s,A]=o;return"string"==typeof t?await s.writePromise(A,t,r):await s.writePromise(A,t,r,n,i)}writeSync(e,t,r,n,i){if(0==(e&a))return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,n,i);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[s,A]=o;return"string"==typeof t?s.writeSync(A,t,r):s.writeSync(A,t,r,n,i)}async closePromise(e){if(0==(e&a))return await this.baseFs.closePromise(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,n]=t;return await r.closePromise(n)}closeSync(e){if(0==(e&a))return this.baseFs.closeSync(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,n]=t;return r.closeSync(n)}createReadStream(e,t){return null===e?this.baseFs.createReadStream(e,t):this.makeCallSync(e,()=>this.baseFs.createReadStream(e,t),(e,{subPath:r})=>e.createReadStream(r,t))}createWriteStream(e,t){return null===e?this.baseFs.createWriteStream(e,t):this.makeCallSync(e,()=>this.baseFs.createWriteStream(e,t),(e,{subPath:r})=>e.createWriteStream(r,t))}async realpathPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.realpathPromise(e),async(e,{archivePath:t,subPath:r})=>this.pathUtils.resolve(await this.baseFs.realpathPromise(t),this.pathUtils.relative(A.LZ.root,await e.realpathPromise(r))))}realpathSync(e){return this.makeCallSync(e,()=>this.baseFs.realpathSync(e),(e,{archivePath:t,subPath:r})=>this.pathUtils.resolve(this.baseFs.realpathSync(t),this.pathUtils.relative(A.LZ.root,e.realpathSync(r))))}async existsPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.existsPromise(e),async(e,{subPath:t})=>await e.existsPromise(t))}existsSync(e){return this.makeCallSync(e,()=>this.baseFs.existsSync(e),(e,{subPath:t})=>e.existsSync(t))}async accessPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.accessPromise(e,t),async(e,{subPath:r})=>await e.accessPromise(r,t))}accessSync(e,t){return this.makeCallSync(e,()=>this.baseFs.accessSync(e,t),(e,{subPath:r})=>e.accessSync(r,t))}async statPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.statPromise(e),async(e,{subPath:t})=>await e.statPromise(t))}statSync(e){return this.makeCallSync(e,()=>this.baseFs.statSync(e),(e,{subPath:t})=>e.statSync(t))}async lstatPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.lstatPromise(e),async(e,{subPath:t})=>await e.lstatPromise(t))}lstatSync(e){return this.makeCallSync(e,()=>this.baseFs.lstatSync(e),(e,{subPath:t})=>e.lstatSync(t))}async chmodPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.chmodPromise(e,t),async(e,{subPath:r})=>await e.chmodPromise(r,t))}chmodSync(e,t){return this.makeCallSync(e,()=>this.baseFs.chmodSync(e,t),(e,{subPath:r})=>e.chmodSync(r,t))}async renamePromise(e,t){return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.renamePromise(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(e,{subPath:r})=>await this.makeCallPromise(t,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(t,{subPath:n})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await e.renamePromise(r,n)}))}renameSync(e,t){return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.renameSync(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(e,{subPath:r})=>this.makeCallSync(t,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(t,{subPath:n})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return e.renameSync(r,n)}))}async copyFilePromise(e,t,r=0){const i=async(e,t,i,o)=>{if(0!=(r&n.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&n.constants.COPYFILE_EXCL&&await this.existsPromise(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let s;try{s=await e.readFilePromise(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}await i.writeFilePromise(o,s)};return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.copyFilePromise(e,t,r),async(t,{subPath:r})=>await i(this.baseFs,e,t,r)),async(e,{subPath:n})=>await this.makeCallPromise(t,async()=>await i(e,n,this.baseFs,t),async(t,{subPath:o})=>e!==t?await i(e,n,t,o):await e.copyFilePromise(n,o,r)))}copyFileSync(e,t,r=0){const i=(e,t,i,o)=>{if(0!=(r&n.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&n.constants.COPYFILE_EXCL&&this.existsSync(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let s;try{s=e.readFileSync(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}i.writeFileSync(o,s)};return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.copyFileSync(e,t,r),(t,{subPath:r})=>i(this.baseFs,e,t,r)),(e,{subPath:n})=>this.makeCallSync(t,()=>i(e,n,this.baseFs,t),(t,{subPath:o})=>e!==t?i(e,n,t,o):e.copyFileSync(n,o,r)))}async appendFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.appendFilePromise(e,t,r),async(e,{subPath:n})=>await e.appendFilePromise(n,t,r))}appendFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.appendFileSync(e,t,r),(e,{subPath:n})=>e.appendFileSync(n,t,r))}async writeFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.writeFilePromise(e,t,r),async(e,{subPath:n})=>await e.writeFilePromise(n,t,r))}writeFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.writeFileSync(e,t,r),(e,{subPath:n})=>e.writeFileSync(n,t,r))}async unlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.unlinkPromise(e),async(e,{subPath:t})=>await e.unlinkPromise(t))}unlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.unlinkSync(e),(e,{subPath:t})=>e.unlinkSync(t))}async utimesPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.utimesPromise(e,t,r),async(e,{subPath:n})=>await e.utimesPromise(n,t,r))}utimesSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.utimesSync(e,t,r),(e,{subPath:n})=>e.utimesSync(n,t,r))}async mkdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.mkdirPromise(e,t),async(e,{subPath:r})=>await e.mkdirPromise(r,t))}mkdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.mkdirSync(e,t),(e,{subPath:r})=>e.mkdirSync(r,t))}async rmdirPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.rmdirPromise(e),async(e,{subPath:t})=>await e.rmdirPromise(t))}rmdirSync(e){return this.makeCallSync(e,()=>this.baseFs.rmdirSync(e),(e,{subPath:t})=>e.rmdirSync(t))}async symlinkPromise(e,t,r){return await this.makeCallPromise(t,async()=>await this.baseFs.symlinkPromise(e,t,r),async(t,{subPath:r})=>await t.symlinkPromise(e,r))}symlinkSync(e,t,r){return this.makeCallSync(t,()=>this.baseFs.symlinkSync(e,t,r),(t,{subPath:r})=>t.symlinkSync(e,r))}async readFilePromise(e,t){return this.makeCallPromise(e,async()=>{switch(t){case"utf8":default:return await this.baseFs.readFilePromise(e,t)}},async(e,{subPath:r})=>await e.readFilePromise(r,t))}readFileSync(e,t){return this.makeCallSync(e,()=>{switch(t){case"utf8":default:return this.baseFs.readFileSync(e,t)}},(e,{subPath:r})=>e.readFileSync(r,t))}async readdirPromise(e,{withFileTypes:t}={}){return await this.makeCallPromise(e,async()=>await this.baseFs.readdirPromise(e,{withFileTypes:t}),async(e,{subPath:r})=>await e.readdirPromise(r,{withFileTypes:t}),{requireSubpath:!1})}readdirSync(e,{withFileTypes:t}={}){return this.makeCallSync(e,()=>this.baseFs.readdirSync(e,{withFileTypes:t}),(e,{subPath:r})=>e.readdirSync(r,{withFileTypes:t}),{requireSubpath:!1})}async readlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.readlinkPromise(e),async(e,{subPath:t})=>await e.readlinkPromise(t))}readlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.readlinkSync(e),(e,{subPath:t})=>e.readlinkSync(t))}watch(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watch(e,t,r),(e,{subPath:n})=>e.watch(n,t,r))}async makeCallPromise(e,t,r,{requireSubpath:n=!0}={}){if("string"!=typeof e)return await t();const i=this.resolve(e),o=this.findZip(i);return o?n&&"/"===o.subPath?await t():await this.getZipPromise(o.archivePath,async e=>await r(e,o)):await t()}makeCallSync(e,t,r,{requireSubpath:n=!0}={}){if("string"!=typeof e)return t();const i=this.resolve(e),o=this.findZip(i);return o?n&&"/"===o.subPath?t():this.getZipSync(o.archivePath,e=>r(e,o)):t()}findZip(e){if(this.filter&&!this.filter.test(e))return null;let t="";for(;;){const r=c.exec(e.substr(t.length));if(!r)return null;if(t=this.pathUtils.join(t,r[0]),!1===this.isZip.has(t)){if(this.notZip.has(t))continue;try{if(!this.baseFs.lstatSync(t).isFile()){this.notZip.add(t);continue}}catch(e){return null}this.isZip.add(t)}return{archivePath:t,subPath:this.pathUtils.resolve(A.LZ.root,e.substr(t.length))}}}limitOpenFiles(e){if(null===this.zipInstances)return;let t=this.zipInstances.size-e;for(const[e,r]of this.zipInstances.entries()){if(t<=0)break;r.saveAndClose(),this.zipInstances.delete(e),t-=1}}async getZipPromise(e,t){const r=async()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:await this.baseFs.statPromise(e)});if(this.zipInstances){let n=this.zipInstances.get(e);if(!n){const t=await r();n=this.zipInstances.get(e),n||(n=new s.d(e,t))}return this.zipInstances.delete(e),this.zipInstances.set(e,n),this.limitOpenFiles(this.maxOpenFiles),await t(n)}{const n=new s.d(e,await r());try{return await t(n)}finally{n.saveAndClose()}}}getZipSync(e,t){const r=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(e)});if(this.zipInstances){let n=this.zipInstances.get(e);return n||(n=new s.d(e,r())),this.zipInstances.delete(e),this.zipInstances.set(e,n),this.limitOpenFiles(this.maxOpenFiles),t(n)}{const n=new s.d(e,r());try{return t(n)}finally{n.saveAndClose()}}}}},26984:(e,t,r)=>{"use strict";function n(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function i(e){return n("EBUSY",e)}function o(e,t){return n("ENOSYS",`${e}, ${t}`)}function s(e){return n("EINVAL","invalid argument, "+e)}function A(e){return n("EBADF","bad file descriptor, "+e)}function a(e){return n("ENOENT","no such file or directory, "+e)}function c(e){return n("ENOTDIR","not a directory, "+e)}function u(e){return n("EISDIR","illegal operation on a directory, "+e)}function l(e){return n("EEXIST","file already exists, "+e)}function h(e){return n("EROFS","read-only filesystem, "+e)}r.d(t,{Vw:()=>i,bk:()=>o,hq:()=>s,Ch:()=>A,z6:()=>a,Ab:()=>c,GA:()=>u,cT:()=>l,YW:()=>h})},56537:(e,t,r)=>{"use strict";r.r(t),r.d(t,{normalizeLineEndings:()=>a.qH,DEFAULT_COMPRESSION_LEVEL:()=>c.k,PortablePath:()=>A.LZ,Filename:()=>A.QS,npath:()=>A.cS,ppath:()=>A.y1,toFilename:()=>A.Zu,AliasFS:()=>u.K,FakeFS:()=>a.uY,CwdFS:()=>l.M,JailFS:()=>h.n,LazyFS:()=>g.v,NoFS:()=>p,NodeFS:()=>s.S,PosixFS:()=>d.i,ProxiedFS:()=>C.p,VirtualFS:()=>E.p,ZipFS:()=>c.d,ZipOpenFS:()=>I.A,patchFs:()=>y,extendFs:()=>w,xfs:()=>D});var n=r(12087),i=r.n(n),o=r(31669),s=r(78420),A=r(46009),a=r(35398),c=r(90739),u=r(14626),l=r(75448),h=r(10489),g=r(15037);const f=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"});class p extends a.uY{constructor(){super(A.y1)}getExtractHint(){throw f()}getRealPath(){throw f()}resolve(){throw f()}async openPromise(){throw f()}openSync(){throw f()}async readPromise(){throw f()}readSync(){throw f()}async writePromise(){throw f()}writeSync(){throw f()}async closePromise(){throw f()}closeSync(){throw f()}createWriteStream(){throw f()}createReadStream(){throw f()}async realpathPromise(){throw f()}realpathSync(){throw f()}async readdirPromise(){throw f()}readdirSync(){throw f()}async existsPromise(e){throw f()}existsSync(e){throw f()}async accessPromise(){throw f()}accessSync(){throw f()}async statPromise(){throw f()}statSync(){throw f()}async lstatPromise(e){throw f()}lstatSync(e){throw f()}async chmodPromise(){throw f()}chmodSync(){throw f()}async mkdirPromise(){throw f()}mkdirSync(){throw f()}async rmdirPromise(){throw f()}rmdirSync(){throw f()}async symlinkPromise(){throw f()}symlinkSync(){throw f()}async renamePromise(){throw f()}renameSync(){throw f()}async copyFilePromise(){throw f()}copyFileSync(){throw f()}async appendFilePromise(){throw f()}appendFileSync(){throw f()}async writeFilePromise(){throw f()}writeFileSync(){throw f()}async unlinkPromise(){throw f()}unlinkSync(){throw f()}async utimesPromise(){throw f()}utimesSync(){throw f()}async readFilePromise(){throw f()}readFileSync(){throw f()}async readlinkPromise(){throw f()}readlinkSync(){throw f()}watch(){throw f()}}p.instance=new p;var d=r(39725),C=r(42096),E=r(17674),I=r(53660);function m(e){const t=A.cS.toPortablePath(i().tmpdir()),r=Math.ceil(4294967296*Math.random()).toString(16).padStart(8,"0");return A.y1.join(t,`${e}${r}`)}function y(e,t){const r=new Set(["accessSync","appendFileSync","createReadStream","chmodSync","closeSync","copyFileSync","lstatSync","lutimesSync","mkdirSync","openSync","readSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","unlinkSync","utimesSync","watch","writeFileSync","writeSync"]),n=new Set(["accessPromise","appendFilePromise","chmodPromise","closePromise","copyFilePromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"]),i=(e,t,r)=>{const n=e[t];e[t]=r,void 0!==n[o.promisify.custom]&&(r[o.promisify.custom]=n[o.promisify.custom])};i(e,"exists",(e,...r)=>{const n="function"==typeof r[r.length-1]?r.pop():()=>{};process.nextTick(()=>{t.existsPromise(e).then(e=>{n(e)},()=>{n(!1)})})}),i(e,"read",(e,r,...n)=>{const i="function"==typeof n[n.length-1]?n.pop():()=>{};process.nextTick(()=>{t.readPromise(e,r,...n).then(e=>{i(null,e,r)},e=>{i(e)})})});for(const r of n){const n=r.replace(/Promise$/,"");if(void 0===e[n])continue;const o=t[r];if(void 0===o)continue;i(e,n,(...e)=>{const r="function"==typeof e[e.length-1]?e.pop():()=>{};process.nextTick(()=>{o.apply(t,e).then(e=>{r(null,e)},e=>{r(e)})})})}e.realpath.native=e.realpath,i(e,"existsSync",e=>{try{return t.existsSync(e)}catch(e){return!1}});for(const n of r){const r=n;if(void 0===e[r])continue;const o=t[n];void 0!==o&&i(e,r,o.bind(t))}e.realpathSync.native=e.realpathSync;{const r=e.promises;if(void 0!==r)for(const e of n){const n=e.replace(/Promise$/,"");if(void 0===r[n])continue;const o=t[e];void 0!==o&&i(r,n,o.bind(t))}}}function w(e,t){const r=Object.create(e);return y(r,t),r}const B=new Set;let Q=!1;function v(){if(Q)return;Q=!0;const e=()=>{process.off("exit",e);for(const e of B){B.delete(e);try{D.removeSync(e)}catch(e){}}};process.on("exit",e)}const D=Object.assign(new s.S,{detachTemp(e){B.delete(e)},mktempSync(e){for(v();;){const t=m("xfs-");try{this.mkdirSync(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=this.realpathSync(t);if(B.add(r),void 0===e)return t;try{return e(r)}finally{if(B.has(r)){B.delete(r);try{this.removeSync(r)}catch(e){}}}}},async mktempPromise(e){for(v();;){const t=m("xfs-");try{await this.mkdirPromise(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=await this.realpathPromise(t);if(B.add(r),void 0===e)return r;try{return await e(r)}finally{if(B.has(r)){B.delete(r);try{await this.removePromise(r)}catch(e){}}}}}})},46009:(e,t,r)=>{"use strict";r.d(t,{LZ:()=>s,QS:()=>A,cS:()=>a,y1:()=>c,CI:()=>C,Zu:()=>E});var n,i=r(85622),o=r.n(i);!function(e){e[e.File=0]="File",e[e.Portable=1]="Portable",e[e.Native=2]="Native"}(n||(n={}));const s={root:"/",dot:"."},A={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",rc:".yarnrc.yml"},a=Object.create(o()),c=Object.create(o().posix);a.cwd=()=>process.cwd(),c.cwd=()=>d(process.cwd()),c.resolve=(...e)=>o().posix.resolve(c.cwd(),...e);const u=function(e,t,r){return(t=e.normalize(t))===(r=e.normalize(r))?".":(t.endsWith(e.sep)||(t+=e.sep),r.startsWith(t)?r.slice(t.length):null)};a.fromPortablePath=p,a.toPortablePath=d,a.contains=(e,t)=>u(a,e,t),c.contains=(e,t)=>u(c,e,t);const l=/^([a-zA-Z]:.*)$/,h=/^\\\\(\.\\)?(.*)$/,g=/^\/([a-zA-Z]:.*)$/,f=/^\/unc\/(\.dot\/)?(.*)$/;function p(e){if("win32"!==process.platform)return e;if(e.match(g))e=e.replace(g,"$1");else{if(!e.match(f))return e;e=e.replace(f,(e,t,r)=>`\\\\${t?".\\":""}${r}`)}return e.replace(/\//g,"\\")}function d(e){return"win32"!==process.platform?e:(e.match(l)?e=e.replace(l,"/$1"):e.match(h)&&(e=e.replace(h,(e,t,r)=>`/unc/${t?".dot/":""}${r}`)),e.replace(/\\/g,"/"))}function C(e,t){return e===a?p(t):d(t)}function E(e){if(""!==a.parse(e).dir||""!==c.parse(e).dir)throw new Error(`Invalid filename: "${e}"`);return e}},29486:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getLibzipSync:()=>o,getLibzipPromise:()=>s});const n=["number","number"];let i=null;function o(){var e;return null===i&&(e=r(3368),i={get HEAP8(){return e.HEAP8},get HEAPU8(){return e.HEAPU8},SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_CREATE:1,ZIP_EXCL:2,ZIP_TRUNCATE:8,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:e._malloc(1),uint16S:e._malloc(2),uint32S:e._malloc(4),uint64S:e._malloc(8),malloc:e._malloc,free:e._free,getValue:e.getValue,open:e.cwrap("zip_open","number",["string","number","number"]),openFromSource:e.cwrap("zip_open_from_source","number",["number","number","number"]),close:e.cwrap("zip_close","number",["number"]),discard:e.cwrap("zip_discard",null,["number"]),getError:e.cwrap("zip_get_error","number",["number"]),getName:e.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:e.cwrap("zip_get_num_entries","number",["number","number"]),stat:e.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:e.cwrap("zip_stat_index","number",["number",...n,"number","number"]),fopen:e.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:e.cwrap("zip_fopen_index","number",["number",...n,"number"]),fread:e.cwrap("zip_fread","number",["number","number","number","number"]),fclose:e.cwrap("zip_fclose","number",["number"]),dir:{add:e.cwrap("zip_dir_add","number",["number","string"])},file:{add:e.cwrap("zip_file_add","number",["number","string","number","number"]),getError:e.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:e.cwrap("zip_file_get_external_attributes","number",["number",...n,"number","number","number"]),setExternalAttributes:e.cwrap("zip_file_set_external_attributes","number",["number",...n,"number","number","number"]),setMtime:e.cwrap("zip_file_set_mtime","number",["number",...n,"number","number"]),setCompression:e.cwrap("zip_set_file_compression","number",["number",...n,"number","number"])},error:{initWithCode:e.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:e.cwrap("zip_error_strerror","string",["number"])},name:{locate:e.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:e.cwrap("zip_source_buffer_create","number",["number","number","number","number"]),fromBuffer:e.cwrap("zip_source_buffer","number",["number","number",...n,"number"]),free:e.cwrap("zip_source_free",null,["number"]),keep:e.cwrap("zip_source_keep",null,["number"]),open:e.cwrap("zip_source_open","number",["number"]),close:e.cwrap("zip_source_close","number",["number"]),seek:e.cwrap("zip_source_seek","number",["number",...n,"number"]),tell:e.cwrap("zip_source_tell","number",["number"]),read:e.cwrap("zip_source_read","number",["number","number","number"]),error:e.cwrap("zip_source_error","number",["number"]),setMtime:e.cwrap("zip_source_set_mtime","number",["number","number"])},struct:{stat:e.cwrap("zipstruct_stat","number",[]),statS:e.cwrap("zipstruct_statS","number",[]),statName:e.cwrap("zipstruct_stat_name","string",["number"]),statIndex:e.cwrap("zipstruct_stat_index","number",["number"]),statSize:e.cwrap("zipstruct_stat_size","number",["number"]),statMtime:e.cwrap("zipstruct_stat_mtime","number",["number"]),error:e.cwrap("zipstruct_error","number",[]),errorS:e.cwrap("zipstruct_errorS","number",[])}}),i}async function s(){return o()}},55125:(e,t,r)=>{"use strict";r.r(t),r.d(t,{parseShell:()=>i,parseResolution:()=>s,stringifyResolution:()=>A,parseSyml:()=>C,stringifySyml:()=>f});var n=r(92962);function i(e,t={isGlobPattern:()=>!1}){try{return(0,n.parse)(e,t)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}var o=r(98261);function s(e){const t=e.match(/^\*{1,2}\/(.*)/);if(t)throw new Error(`The override for '${e}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${t[1]}' instead.`);try{return(0,o.parse)(e)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function A(e){let t="";return e.from&&(t+=e.from.fullName,e.from.description&&(t+="@"+e.from.description),t+="/"),t+=e.descriptor.fullName,e.descriptor.description&&(t+="@"+e.descriptor.description),t}var a=r(21194),c=r(85443);const u=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,l=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"];class h{constructor(e){this.data=e}}function g(e){return e.match(u)?e:JSON.stringify(e)}function f(e){try{return function e(t,r,n){if(null===t)return"null\n";if("number"==typeof t||"boolean"==typeof t)return t.toString()+"\n";if("string"==typeof t)return g(t)+"\n";if(Array.isArray(t)){if(0===t.length)return"[]\n";const n=" ".repeat(r);return"\n"+t.map(t=>`${n}- ${e(t,r+1,!1)}`).join("")}if("object"==typeof t&&t){let i,o;t instanceof h?(i=t.data,o=!1):(i=t,o=!0);const s=" ".repeat(r),A=Object.keys(i);o&&A.sort((e,t)=>{const r=l.indexOf(e),n=l.indexOf(t);return-1===r&&-1===n?et?1:0:-1!==r&&-1===n?-1:-1===r&&-1!==n?1:r-n});const a=A.filter(e=>void 0!==i[e]).map((t,o)=>{const A=i[t],a=g(t),c=e(A,r+1,!0),u=o>0||n?s:"";return c.startsWith("\n")?`${u}${a}:${c}`:`${u}${a}: ${c}`}).join(0===r?"\n":"")||"\n";return n?"\n"+a:""+a}throw new Error(`Unsupported value type (${t})`)}(e,0,!1)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}f.PreserveOrdering=h;const p=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function d(e){if(p.test(e))return function(e){return e.endsWith("\n")||(e+="\n"),(0,c.parse)(e)}(e);const t=(0,a.safeLoad)(e,{schema:a.FAILSAFE_SCHEMA});if(null==t)return{};if("object"!=typeof t)throw new Error(`Expected an indexed object, got a ${typeof t} instead. Does your file follow Yaml's rules?`);if(Array.isArray(t))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return t}function C(e){return d(e)}},88563:(e,t,r)=>{"use strict";var n,i;r.d(t,{gY:()=>I,Q$:()=>m,oC:()=>F}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(n||(n={})),function(e){e.DEFAULT="DEFAULT",e.TOP_LEVEL="TOP_LEVEL",e.FALLBACK_EXCLUSION_LIST="FALLBACK_EXCLUSION_LIST",e.FALLBACK_EXCLUSION_ENTRIES="FALLBACK_EXCLUSION_ENTRIES",e.FALLBACK_EXCLUSION_DATA="FALLBACK_EXCLUSION_DATA",e.PACKAGE_REGISTRY_DATA="PACKAGE_REGISTRY_DATA",e.PACKAGE_REGISTRY_ENTRIES="PACKAGE_REGISTRY_ENTRIES",e.PACKAGE_STORE_DATA="PACKAGE_STORE_DATA",e.PACKAGE_STORE_ENTRIES="PACKAGE_STORE_ENTRIES",e.PACKAGE_INFORMATION_DATA="PACKAGE_INFORMATION_DATA",e.PACKAGE_DEPENDENCIES="PACKAGE_DEPENDENCIES",e.PACKAGE_DEPENDENCY="PACKAGE_DEPENDENCY"}(i||(i={}));const o={[i.DEFAULT]:{collapsed:!1,next:{"*":i.DEFAULT}},[i.TOP_LEVEL]:{collapsed:!1,next:{fallbackExclusionList:i.FALLBACK_EXCLUSION_LIST,packageRegistryData:i.PACKAGE_REGISTRY_DATA,"*":i.DEFAULT}},[i.FALLBACK_EXCLUSION_LIST]:{collapsed:!1,next:{"*":i.FALLBACK_EXCLUSION_ENTRIES}},[i.FALLBACK_EXCLUSION_ENTRIES]:{collapsed:!0,next:{"*":i.FALLBACK_EXCLUSION_DATA}},[i.FALLBACK_EXCLUSION_DATA]:{collapsed:!0,next:{"*":i.DEFAULT}},[i.PACKAGE_REGISTRY_DATA]:{collapsed:!1,next:{"*":i.PACKAGE_REGISTRY_ENTRIES}},[i.PACKAGE_REGISTRY_ENTRIES]:{collapsed:!0,next:{"*":i.PACKAGE_STORE_DATA}},[i.PACKAGE_STORE_DATA]:{collapsed:!1,next:{"*":i.PACKAGE_STORE_ENTRIES}},[i.PACKAGE_STORE_ENTRIES]:{collapsed:!0,next:{"*":i.PACKAGE_INFORMATION_DATA}},[i.PACKAGE_INFORMATION_DATA]:{collapsed:!1,next:{packageDependencies:i.PACKAGE_DEPENDENCIES,"*":i.DEFAULT}},[i.PACKAGE_DEPENDENCIES]:{collapsed:!1,next:{"*":i.PACKAGE_DEPENDENCY}},[i.PACKAGE_DEPENDENCY]:{collapsed:!0,next:{"*":i.DEFAULT}}};function s(e,t,r,n){const{next:i}=o[r];return A(t,i[e]||i["*"],n)}function A(e,t,r){const{collapsed:n}=o[t];return Array.isArray(e)?n?function(e,t,r){let n="";n+="[";for(let i=0,o=e.length;ie(t)));const i=r.map((e,t)=>t);return i.sort((e,t)=>{for(const r of n){const n=r[e]r[t]?1:0;if(0!==n)return n}return 0}),i.map(e=>r[e])}function u(e){const t=new Map,r=c(e.fallbackExclusionList||[],[({name:e,reference:t})=>e,({name:e,reference:t})=>t]);for(const{name:e,reference:n}of r){let r=t.get(e);void 0===r&&t.set(e,r=new Set),r.add(n)}return Array.from(t).map(([e,t])=>[e,Array.from(t)])}function l(e){return c(e.fallbackPool||[],([e])=>e)}function h(e){const t=[];for(const[r,n]of c(e.packageRegistry,([e])=>null===e?"0":"1"+e)){const e=[];t.push([r,e]);for(const[t,{packageLocation:i,packageDependencies:o,packagePeers:s,linkType:A,discardFromLookup:a}]of c(n,([e])=>null===e?"0":"1"+e)){const n=[];null===r||null===t||o.has(r)||n.push([r,t]);for(const[e,t]of c(o.entries(),([e])=>e))n.push([e,t]);const u=s&&s.size>0?Array.from(s):void 0,l=a||void 0;e.push([t,{packageLocation:i,packageDependencies:n,packagePeers:u,linkType:A,discardFromLookup:l}])}}return t}function g(e){return c(e.blacklistedLocations||[],e=>e)}function f(e){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost. We also recommend you not to read","it either without using the @yarnpkg/pnp package, as the data layout","is entirely unspecified and WILL change from a version to another."],dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback||!1,ignorePatternData:e.ignorePattern||null,fallbackExclusionList:u(e),fallbackPool:l(e),locationBlacklistData:g(e),packageRegistryData:h(e)}}var p=r(20103),d=r.n(p);function C(e,t){return[e?e+"\n":"","/* eslint-disable */\n\n","try {\n"," Object.freeze({}).detectStrictMode = true;\n","} catch (error) {\n"," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n","}\n","\n","var __non_webpack_module__ = module;\n","\n","function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n",t.replace(/^/gm," "),"}\n","\n",d()].join("")}function E(e){return JSON.stringify(e,null,2)}function I(e){const t=function(e){return[`return hydrateRuntimeState(${a(e)}, {basePath: basePath || __dirname});\n`].join("")}(f(e));return C(e.shebang,t)}function m(e){const t=f(e),r=(n=e.dataLocation,["var path = require('path');\n",`var dataLocation = path.resolve(__dirname, ${JSON.stringify(n)});\n`,"return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)});\n"].join(""));var n;const i=C(e.shebang,r);return{dataFile:E(t),loaderFile:i}}var y=r(35747),w=(r(85622),r(31669)),B=r(46009);function Q(e,{basePath:t}){const r=B.cS.toPortablePath(t),n=null!==e.ignorePatternData?new RegExp(e.ignorePatternData):null,i=new Map(e.packageRegistryData.map(([e,t])=>[e,new Map(t.map(([e,t])=>[e,{packageLocation:B.y1.resolve(r,t.packageLocation),packageDependencies:new Map(t.packageDependencies),packagePeers:new Set(t.packagePeers),linkType:t.linkType,discardFromLookup:t.discardFromLookup||!1}]))])),o=new Map,s=new Set;for(const[t,r]of e.packageRegistryData)for(const[e,n]of r){if(null===t!=(null===e))throw new Error("Assertion failed: The name and reference should be null, or neither should");if(n.discardFromLookup)continue;const r={name:t,reference:e};o.set(n.packageLocation,r),s.add(n.packageLocation.length)}for(const t of e.locationBlacklistData)o.set(t,null);const A=new Map(e.fallbackExclusionList.map(([e,t])=>[e,new Set(t)])),a=new Map(e.fallbackPool),c=e.dependencyTreeRoots,u=e.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:c,enableTopLevelFallback:u,fallbackExclusionList:A,fallbackPool:a,ignorePattern:n,packageLocationLengths:[...s].sort((e,t)=>t-e),packageLocatorsByLocations:o,packageRegistry:i}}var v,D=r(17674),b=r(32282);!function(e){e.API_ERROR="API_ERROR",e.BLACKLISTED="BLACKLISTED",e.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",e.MISSING_DEPENDENCY="MISSING_DEPENDENCY",e.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",e.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",e.INTERNAL="INTERNAL",e.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",e.UNSUPPORTED="UNSUPPORTED"}(v||(v={}));const S=new Set([v.BLACKLISTED,v.BUILTIN_NODE_RESOLUTION_FAILED,v.MISSING_DEPENDENCY,v.MISSING_PEER_DEPENDENCY,v.QUALIFIED_PATH_RESOLUTION_FAILED,v.UNDECLARED_DEPENDENCY]);function k(e,t,r={}){const n=S.has(e)?"MODULE_NOT_FOUND":e,i={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(t),{code:{...i,value:n},pnpCode:{...i,value:e},data:{...i,value:r}})}function x(e,t){const r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,n=Number(process.env.PNP_DEBUG_LEVEL),i=new Set(b.Module.builtinModules||Object.keys(process.binding("natives"))),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/,s=/^\.{0,2}\//,A=/\/$/,a={name:null,reference:null},c=[],u=new Set;if(!0===e.enableTopLevelFallback&&c.push(a),!1!==t.compatibilityMode)for(const t of["react-scripts","gatsby"]){const r=e.packageRegistry.get(t);if(r)for(const e of r.keys()){if(null===e)throw new Error("Assertion failed: This reference shouldn't be null");c.push({name:t,reference:e})}}const{ignorePattern:l,packageRegistry:h,packageLocatorsByLocations:g,packageLocationLengths:f}=e;function p(e,t){return{fn:e,args:t,error:null,result:null}}function d(e,r){if(!1===t.allowDebug)return r;if(Number.isFinite(n)){if(n>=2)return(...t)=>{const n=p(e,t);try{return n.result=r(...t)}catch(e){throw n.error=e}finally{console.trace(n)}};if(n>=1)return(...t)=>{try{return r(...t)}catch(r){const n=p(e,t);throw n.error=r,console.trace(n),r}}}return r}function C(e){const t=m(e);if(!t)throw k(v.INTERNAL,"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return t}function E(t){if(null===t.name)return!0;for(const r of e.dependencyTreeRoots)if(r.name===t.name&&r.reference===t.reference)return!0;return!1}function I(e,t){return t.endsWith("/")&&(t=B.y1.join(t,"internal.js")),b.Module._resolveFilename(e,function(e){const t=new b.Module(e,null);return t.filename=e,t.paths=b.Module._nodeModulePaths(e),t}(B.cS.fromPortablePath(t)),!1,{plugnplay:!1})}function m({name:e,reference:t}){const r=h.get(e);if(!r)return null;const n=r.get(t);return n||null}function y(e,t){const r=new Map,n=t=>{const i=function({name:e,reference:t}){const r=[];for(const[n,i]of h)if(null!==n)for(const[o,s]of i){if(null===o)continue;s.packageDependencies.get(e)===t&&(n===e&&o===t||r.push({name:n,reference:o}))}return r}(t);for(const t of i){if(C(t).packagePeers.has(e))n(t);else{let e=r.get(t.name);void 0===e&&r.set(t.name,e=new Set),e.add(t.reference)}}};n(t);const i=[];for(const e of[...r.keys()].sort())for(const t of[...r.get(e)].sort())i.push({name:e,reference:t});return i}function w(t){let r=(n=B.y1.relative(e.basePath,t),B.cS.toPortablePath(n));var n;r.match(s)||(r="./"+r),t.match(A)&&!r.endsWith("/")&&(r+="/");let i=0;for(;ir.length;)i+=1;for(let e=i;eE(e))?k(v.MISSING_PEER_DEPENDENCY,`${o.name} tried to access ${t} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${n}")\nRequired by: ${o.name}@${o.reference} (via ${s})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:n,issuer:s,issuerLocator:Object.assign({},o),dependencyName:t,brokenAncestors:e}):k(v.MISSING_PEER_DEPENDENCY,`${o.name} tried to access ${t} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${n}")\nRequired by: ${o.name}@${o.reference} (via ${s})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:n,issuer:s,issuerLocator:Object.assign({},o),dependencyName:t,brokenAncestors:e})}else void 0===A&&(l=E(o)?k(v.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${n}")\nRequired by: ${s}\n`,{request:n,issuer:s,dependencyName:t}):k(v.UNDECLARED_DEPENDENCY,`${o.name} tried to access ${t}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${n}")\nRequired by: ${o.name}@${o.reference} (via ${s})\n`,{request:n,issuer:s,issuerLocator:Object.assign({},o),dependencyName:t}));if(null==A){if(null===a||null===l)throw l||new Error("Assertion failed: Expected an error to have been set");A=a;const e=l.message.replace(/\n.*/g,"");l.message=e,u.has(e)||(u.add(e),process.emitWarning(l))}const f=Array.isArray(A)?{name:A[0],reference:A[1]}:{name:t,reference:A},p=C(f);if(!p.packageLocation)throw k(v.MISSING_DEPENDENCY,`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.\n\nRequired package: ${f.name}@${f.reference} (via "${n}")\nRequired by: ${o.name}@${o.reference} (via ${s})\n`,{request:n,issuer:s,dependencyLocator:Object.assign({},f)});const d=B.y1.resolve(e.basePath,p.packageLocation);h=i?B.y1.resolve(d,i):d}else{if(B.y1.isAbsolute(n))h=B.y1.normalize(n);else{if(!s)throw k(v.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:n,issuer:s});h=s.match(A)?B.y1.normalize(B.y1.resolve(s,n)):B.y1.normalize(B.y1.resolve(B.y1.dirname(s),n))}w(h)}return B.y1.normalize(h)}function S(e,{extensions:r=Object.keys(b.Module._extensions)}={}){const n=[],i=function e(r,n,{extensions:i}){let o;try{n.push(r),o=t.fakeFs.statSync(r)}catch(e){}if(o&&!o.isDirectory())return t.fakeFs.realpathSync(r);if(o&&o.isDirectory()){let o,s;try{o=JSON.parse(t.fakeFs.readFileSync(B.y1.join(r,"package.json"),"utf8"))}catch(e){}if(o&&o.main&&(s=B.y1.resolve(r,o.main)),s&&s!==r){const t=e(s,n,{extensions:i});if(null!==t)return t}}for(let e=0,o=i.length;e`Rejected candidate: ${e}\n`).join("")}`,{unqualifiedPath:e})}return{VERSIONS:{std:3,resolveVirtual:1},topLevel:a,getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getPackageInformation:e=>{const t=m(e);if(null===t)return null;const r=B.cS.fromPortablePath(t.packageLocation);return{...t,packageLocation:r}},findPackageLocator:e=>w(B.cS.toPortablePath(e)),resolveToUnqualified:d("resolveToUnqualified",(e,t,r)=>{const n=null!==t?B.cS.toPortablePath(t):null,i=Q(B.cS.toPortablePath(e),n,r);return null===i?null:B.cS.fromPortablePath(i)}),resolveUnqualified:d("resolveUnqualified",(e,t)=>B.cS.fromPortablePath(S(B.cS.toPortablePath(e),t))),resolveRequest:d("resolveRequest",(e,t,r)=>{const n=null!==t?B.cS.toPortablePath(t):null,i=function(e,t,{considerBuiltins:r,extensions:n}={}){const i=Q(e,t,{considerBuiltins:r});if(null===i)return null;try{return S(i,{extensions:n})}catch(r){throw"QUALIFIED_PATH_RESOLUTION_FAILED"===r.pnpCode&&Object.assign(r.data,{request:e,issuer:t}),r}}(B.cS.toPortablePath(e),n,r);return null===i?null:B.cS.fromPortablePath(i)}),resolveVirtual:d("resolveVirtual",e=>{const t=function(e){const t=B.y1.normalize(e),r=D.p.resolveVirtual(t);return r!==t?r:null}(B.cS.toPortablePath(e));return null!==t?B.cS.fromPortablePath(t):null})}}(0,w.promisify)(y.readFile);const F=(e,t,r)=>x(Q(f(e),{basePath:t}),{fakeFs:r,pnpapiResolution:B.cS.join(t,".pnp.js")})},43982:(e,t,r)=>{"use strict";r.r(t),r.d(t,{execute:()=>F});var n,i=r(46009),o=r(56537),s=r(39725),A=r(55125),a=r(19347),c=r.n(a),u=r(92413),l=r(67566),h=r.n(l);function g(){}!function(e){e[e.STDOUT=1]="STDOUT",e[e.STDERR=2]="STDERR"}(n||(n={}));let f=0;class p{constructor(e){this.stream=e}close(){}get(){return this.stream}}class d{constructor(){this.stream=null}close(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");return this.stream}}class C{constructor(e,t){this.stdin=null,this.stdout=null,this.stderr=null,this.pipe=null,this.ancestor=e,this.implementation=t}static start(e,{stdin:t,stdout:r,stderr:n}){const i=new C(null,e);return i.stdin=t,i.stdout=r,i.stderr=n,i}pipeTo(e,t=n.STDOUT){const r=new C(this,e),i=new d;return r.pipe=i,r.stdout=this.stdout,r.stderr=this.stderr,(t&n.STDOUT)===n.STDOUT?this.stdout=i:null!==this.ancestor&&(this.stderr=this.ancestor.stdout),(t&n.STDERR)===n.STDERR?this.stderr=i:null!==this.ancestor&&(this.stderr=this.ancestor.stderr),r}async exec(){const e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(null===this.stdin)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let t,r;if(null===this.stdout)throw new Error("Assertion failed: No output stream registered");if(t=this.stdout,e[1]=t.get(),null===this.stderr)throw new Error("Assertion failed: No error stream registered");r=this.stderr,e[2]=r.get();const n=this.implementation(e);return this.pipe&&this.pipe.attach(n.stdin),await n.promise.then(e=>(t.close(),r.close(),e))}async run(){const e=[];for(let t=this;t;t=t.ancestor)e.push(t.exec());return(await Promise.all(e))[0]}}function E(e,t){return C.start(e,t)}function I(e,t={}){const r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}const m=new Map([["cd",async([e,...t],r,n)=>{const s=i.y1.resolve(n.cwd,i.cS.toPortablePath(e));return(await o.xfs.statPromise(s)).isDirectory()?(n.cwd=s,0):(n.stderr.write("cd: not a directory\n"),1)}],["pwd",async(e,t,r)=>(r.stdout.write(i.cS.fromPortablePath(r.cwd)+"\n"),0)],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,n)=>n.exitCode=parseInt(e,10)],["echo",async(e,t,r)=>(r.stdout.write(e.join(" ")+"\n"),0)],["__ysh_run_procedure",async(e,t,r)=>{const n=r.procedures[e[0]];return await E(n,{stdin:new p(r.stdin),stdout:new p(r.stdout),stderr:new p(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let n=r.stdin,s=r.stdout;const A=r.stderr,a=[],c=[];let l=0;for(;"--"!==e[l];){const t=e[l++],n=Number(e[l++]),s=l+n;for(let n=l;no.xfs.createReadStream(i.y1.resolve(r.cwd,i.cS.toPortablePath(e[n]))));break;case"<<<":a.push(()=>{const t=new u.PassThrough;return process.nextTick(()=>{t.write(e[n]+"\n"),t.end()}),t});break;case">":c.push(o.xfs.createWriteStream(i.y1.resolve(r.cwd,i.cS.toPortablePath(e[n]))));break;case">>":c.push(o.xfs.createWriteStream(i.y1.resolve(r.cwd,i.cS.toPortablePath(e[n])),{flags:"a"}))}}if(a.length>0){const e=new u.PassThrough;n=e;const t=r=>{if(r===a.length)e.end();else{const n=a[r]();n.pipe(e,{end:!1}),n.on("end",()=>{t(r+1)})}};t(0)}if(c.length>0){const e=new u.PassThrough;s=e;for(const t of c)e.pipe(t)}const h=await E(Q(e.slice(l+1),t,r),{stdin:new p(n),stdout:new p(s),stderr:new p(A)}).run();return await Promise.all(c.map(e=>new Promise(t=>{e.on("close",()=>{t()}),e.end()}))),h}]]);async function y(e,t,r){const n=[],i=new u.PassThrough;return i.on("data",e=>n.push(e)),await S(e,t,I(r,{stdout:i})),Buffer.concat(n).toString().replace(/[\r\n]+$/,"")}async function w(e,t,r){const n=e.map(async e=>{const n=await B(e.args,t,r);return{name:e.name,value:n.join(" ")}});return(await Promise.all(n)).reduce((e,t)=>(e[t.name]=t.value,e),{})}async function B(e,t,r){const n=new Map,i=[];let o=[];const s=e=>e.match(/[^ \r\n\t]+/g)||[],A=e=>{o.push(e)},a=()=>{o.length>0&&i.push(o.join("")),o=[]},c=e=>{A(e),a()},u=(e,t)=>{let r=n.get(e);void 0===r&&n.set(e,r=[]),r.push(t)};for(const n of e){switch(n.type){case"redirection":{const e=await B(n.args,t,r);for(const t of e)u(n.subtype,t)}break;case"argument":for(const e of n.segments)switch(e.type){case"text":A(e.text);break;case"glob":{const n=await t.glob.match(e.pattern,{cwd:r.cwd});if(!n.length)throw new Error(`No file matches found: "${e.pattern}". Note: Glob patterns currently only support files that exist on the filesystem (Help Wanted)`);for(const e of n.sort())c(e)}break;case"shell":{const n=await y(e.shell,t,r);if(e.quoted)A(n);else{const e=s(n);for(let t=0;t=0&&n0){const e=[];for(const[t,r]of n.entries())e.splice(e.length,0,t,String(r.length),...r);i.splice(0,0,"__ysh_set_redirects",...e,"--")}return i}function Q(e,t,r){t.builtins.has(e[0])||(e=["command",...e]);const n=i.cS.fromPortablePath(r.cwd);let o=r.environment;void 0!==o.PWD&&(o={...o,PWD:n});const[s,...A]=e;if("command"===s)return function(e,t,r,n){return r=>{const i=r[0]instanceof u.Transform?"pipe":r[0],o=r[1]instanceof u.Transform?"pipe":r[1],s=r[2]instanceof u.Transform?"pipe":r[2],A=h()(e,t,{...n,stdio:[i,o,s]});return 0==f++&&process.on("SIGINT",g),r[0]instanceof u.Transform&&r[0].pipe(A.stdin),r[1]instanceof u.Transform&&A.stdout.pipe(r[1],{end:!1}),r[2]instanceof u.Transform&&A.stderr.pipe(r[2],{end:!1}),{stdin:A.stdin,promise:new Promise(t=>{A.on("error",n=>{switch(0==--f&&process.off("SIGINT",g),n.code){case"ENOENT":r[2].write(`command not found: ${e}\n`),t(127);break;case"EACCESS":r[2].write(`permission denied: ${e}\n`),t(128);break;default:r[2].write(`uncaught error: ${n.message}\n`),t(1)}}),A.on("exit",e=>{0==--f&&process.off("SIGINT",g),t(null!==e?e:129)})})}}}(A[0],A.slice(1),0,{cwd:n,env:o});const a=t.builtins.get(s);if(void 0===a)throw new Error(`Assertion failed: A builtin should exist for "${s}"`);return function(e){return t=>{const r="pipe"===t[0]?new u.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}(async({stdin:e,stdout:n,stderr:i})=>(r.stdin=e,r.stdout=n,r.stderr=i,await a(A,t,r)))}function v(e,t,r){return n=>{const i=new u.PassThrough;return{stdin:i,promise:S(e,t,I(r,{stdin:i}))}}}async function D(e,t,r){let n=e,i=null,o=null;for(;n;){const e=n.then?{...r}:r;let s;switch(n.type){case"command":{const i=await B(n.args,t,r),o=await w(n.envs,t,r);s=n.envs.length?Q(i,t,I(e,{environment:o})):Q(i,t,e)}break;case"subshell":{const i=await B(n.args,t,r),o=v(n.subshell,t,e);if(0===i.length)s=o;else{let r;do{r=String(Math.random())}while(Object.prototype.hasOwnProperty.call(e.procedures,r));e.procedures={...e.procedures},e.procedures[r]=o,s=Q([...i,"__ysh_run_procedure",r],t,e)}}break;case"envs":{const i=await w(n.envs,t,r);e.environment={...e.environment,...i},s=Q(["true"],t,e)}}if(void 0===s)throw new Error("Assertion failed: An action should have been generated");if(null===i)o=E(s,{stdin:new p(e.stdin),stdout:new p(e.stdout),stderr:new p(e.stderr)});else{if(null===o)throw new Error("The execution pipeline should have been setup");switch(i){case"|":case"|&":o=o.pipeTo(s)}}n.then?(i=n.then.type,n=n.then.chain):n=null}if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");return await o.run()}async function b(e,t,r){if(!e.then)return await D(e.chain,t,r);const n=await D(e.chain,t,r);if(null!==r.exitCode)return r.exitCode;switch(r.variables["?"]=String(n),e.then.type){case"&&":return 0===n?await b(e.then.line,t,r):n;case"||":return 0!==n?await b(e.then.line,t,r):n;default:throw new Error(`Unsupported command type: "${e.then.type}"`)}}async function S(e,t,r){let n=0;for(const i of e){if(n=await b(i,t,r),null!==r.exitCode)return r.exitCode;r.variables["?"]=String(n)}return n}function k(e){switch(e.type){case"redirection":return e.args.some(e=>k(e));case"argument":return e.segments.some(e=>function(e){switch(e.type){case"variable":return"@"===e.name||"#"===e.name||"*"===e.name||Number.isFinite(parseInt(e.name,10))||!!e.defaultValue&&e.defaultValue.some(e=>k(e));case"shell":return x(e.shell);default:return!1}}(e));default:throw new Error("Unreacheable")}}function x(e){return e.some(e=>{for(;e;){let t=e.chain;for(;t;){let e;switch(t.type){case"subshell":e=x(t.subshell);break;case"command":e=t.envs.some(e=>e.args.some(e=>k(e)))||t.args.some(e=>k(e))}if(e)return!0;if(!t.then)break;t=t.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function F(e,t=[],{builtins:r={},cwd:n=i.cS.toPortablePath(process.cwd()),env:a=process.env,stdin:l=process.stdin,stdout:h=process.stdout,stderr:g=process.stderr,variables:f={},glob:p={isGlobPattern:c().isDynamicPattern,match:(e,{cwd:t,fs:r=o.xfs})=>c()(e,{cwd:i.cS.fromPortablePath(t),fs:new s.i(r)})}}={}){const d={};for(const[e,t]of Object.entries(a))void 0!==t&&(d[e]=t);const C=new Map(m);for(const[e,t]of Object.entries(r))C.set(e,t);null===l&&(l=new u.PassThrough).end();const E=(0,A.parseShell)(e,p);if(!x(E)&&E.length>0&&t.length>0){let e=E[E.length-1];for(;e.then;)e=e.then.line;let r=e.chain;for(;r.then;)r=r.then.chain;"command"===r.type&&(r.args=r.args.concat(t.map(e=>({type:"argument",segments:[{type:"text",text:e}]}))))}return await S(E,{args:t,builtins:C,initialStdin:l,initialStdout:h,initialStderr:g,glob:p},{cwd:n,environment:d,exitCode:null,procedures:{},stdin:l,stdout:h,stderr:g,variables:Object.assign(Object.create(f),{"?":0})})}},45330:(e,t,r)=>{t.e=()=>({modules:new Map([[r(60306).name,r(95397)],[r(73841).u2,r(84132)],[r(4670).u2,r(56537)],[r(81386).u2,r(29486)],[r(54920).u2,r(55125)],[r(75418).u2,r(43982)],[r(75426).u2,r(17278)],[r(81923).u2,r(10966)],[r(38422).u2,r(15966)],[r(37904).u2,r(72926)],[r(49775).u2,r(80150)],[r(35729).u2,r(10420)],[r(17508).u2,r(41466)],[r(84779).u2,r(10284)],[r(88454).u2,r(23599)],[r(91953).u2,r(21754)],[r(63756).u2,r(74230)],[r(23100).u2,r(86161)],[r(47047).u2,r(8149)],[r(67310).u2,r(86717)],[r(31880).u2,r(94573)],[r(74617).u2,r(5973)],[r(85458).u2,r(77333)],[r(8211).u2,r(5780)]]),plugins:new Set([r(37904).u2,r(49775).u2,r(35729).u2,r(17508).u2,r(84779).u2,r(88454).u2,r(91953).u2,r(63756).u2,r(23100).u2,r(47047).u2,r(67310).u2,r(31880).u2,r(74617).u2,r(85458).u2,r(8211).u2])})},27355:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},48786:e=>{e.exports=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}},51746:e=>{e.exports=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},63446:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}},96117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},79774:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=process.versions.node.split("."),n=parseInt(r[0],10),i=parseInt(r[1],10),o=n>10,s=10===n&&i>=10;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=o||s},85670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(31020),i=r(35516),o=r(38844);function s(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.scandir=function(e,t,r){if("function"==typeof t)return n.read(e,s(),t);n.read(e,s(t),r)},t.scandirSync=function(e,t){const r=s(t);return i.read(e,r)}},31020:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(53403),i=r(69078),o=r(79774),s=r(65225);function A(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,o)=>{if(null!==n)return c(r,n);const A=o.map(r=>({dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`}));if(!t.followSymbolicLinks)return u(r,A);const a=A.map(e=>function(e,t){return r=>{if(!e.dirent.isSymbolicLink())return r(null,e);t.fs.stat(e.path,(n,i)=>null!==n?t.throwErrorOnBrokenSymbolicLink?r(n):r(null,e):(e.dirent=s.fs.createDirentFromStats(e.name,i),r(null,e)))}}(e,t));i(a,(e,t)=>{if(null!==e)return c(r,e);u(r,t)})})}function a(e,t,r){t.fs.readdir(e,(o,A)=>{if(null!==o)return c(r,o);const a=A.map(r=>`${e}${t.pathSegmentSeparator}${r}`),l=a.map(e=>r=>n.stat(e,t.fsStatSettings,r));i(l,(e,n)=>{if(null!==e)return c(r,e);const i=[];A.forEach((e,r)=>{const o=n[r],A={name:e,path:a[r],dirent:s.fs.createDirentFromStats(e,o)};t.stats&&(A.stats=o),i.push(A)}),u(r,i)})})}function c(e,t){e(t)}function u(e,t){e(null,t)}t.read=function(e,t,r){return!t.stats&&o.IS_SUPPORT_READDIR_WITH_FILE_TYPES?A(e,t,r):a(e,t,r)},t.readdirWithFileTypes=A,t.readdir=a},35516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(53403),i=r(79774),o=r(65225);function s(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(r=>{const n={dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`};if(n.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(n.path);n.dirent=o.fs.createDirentFromStats(n.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return n})}function A(e,t){return t.fs.readdirSync(e).map(r=>{const i=`${e}${t.pathSegmentSeparator}${r}`,s=n.statSync(i,t.fsStatSettings),A={name:r,path:i,dirent:o.fs.createDirentFromStats(r,s)};return t.stats&&(A.stats=s),A})}t.read=function(e,t){return!t.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t):A(e,t)},t.readdirWithFileTypes=s,t.readdir=A},38844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(85622),i=r(53403),o=r(96117);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=o.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,n.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},72156:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}t.createDirentFromStats=function(e,t){return new r(e,t)}},65225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72156);t.fs=n},71208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},53403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(17790),i=r(34846),o=r(92687);function s(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.stat=function(e,t,r){if("function"==typeof t)return n.read(e,s(),t);n.read(e,s(t),r)},t.statSync=function(e,t){const r=s(t);return i.read(e,r)}},17790:(e,t)=>{"use strict";function r(e,t){e(t)}function n(e,t){e(null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t,i){t.fs.lstat(e,(o,s)=>null!==o?r(i,o):s.isSymbolicLink()&&t.followSymbolicLink?void t.fs.stat(e,(e,o)=>{if(null!==e)return t.throwErrorOnBrokenSymbolicLink?r(i,e):n(i,s);t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),n(i,o)}):n(i,s))}},34846:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{const r=t.fs.statSync(e);return t.markSymbolicLink&&(r.isSymbolicLink=()=>!0),r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw e}}},92687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(71208);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=n.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return void 0===e?t:e}}},73011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(42369),i=r(27696),o=r(22111),s=r(14954);function A(e={}){return e instanceof s.default?e:new s.default(e)}t.Settings=s.default,t.walk=function(e,t,r){if("function"==typeof t)return new n.default(e,A()).read(t);new n.default(e,A(t)).read(r)},t.walkSync=function(e,t){const r=A(t);return new o.default(e,r).read()},t.walkStream=function(e,t){const r=A(t);return new i.default(e,r).read()}},42369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new n.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.add(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,[...this._storage])}),this._reader.read()}}},27696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(92413),i=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new i.default(this._root,this._settings),this._stream=new n.Readable({objectMode:!0,read:()=>{},destroy:this._reader.destroy.bind(this._reader)})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}},22111:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(97835);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new n.default(this._root,this._settings)}read(){return this._reader.read()}}},98566:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(28614),i=r(85670),o=r(98360),s=r(10750),A=r(75504);class a extends A.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=i.scandir,this._emitter=new n.EventEmitter,this._queue=o(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null!==r)return t(r,void 0);for(const t of n)this._handleEntry(t,e.base);t(null,void 0)})}_handleError(e){s.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=s.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),s.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&s.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}t.default=a},10750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},t.isAppliedFilter=function(e,t){return null===e||e(t)},t.replacePathSegmentSeparator=function(e,t){return e.split(/[\\/]/).join(t)},t.joinPathSegments=function(e,t,r){return""===e?t:e+r+t}},75504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10750);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._root=n.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}}},97835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(85670),i=r(10750),o=r(75504);class s extends o.default{constructor(){super(...arguments),this._scandir=n.scandirSync,this._storage=new Set,this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),[...this._storage]}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(i.isFatalError(this._settings,e))throw e}_handleEntry(e,t){const r=e.path;void 0!==t&&(e.path=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_pushToStorage(e){this._storage.add(e)}}t.default=s},14954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(85622),i=r(85670);t.default=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,1/0),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,n.sep),this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},8189:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{toString:r}=Object.prototype,n=e=>t=>typeof t===e,i=e=>{const t=r.call(e).slice(8,-1);if(t)return t},o=e=>t=>i(t)===e;function s(e){switch(e){case null:return"null";case!0:case!1:return"boolean"}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"symbol":return"symbol"}if(s.function_(e))return"Function";if(s.observable(e))return"Observable";if(s.array(e))return"Array";if(s.buffer(e))return"Buffer";const t=i(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}s.undefined=n("undefined"),s.string=n("string");const A=n("number");s.number=e=>A(e)&&!s.nan(e),s.bigint=n("bigint"),s.function_=n("function"),s.null_=e=>null===e,s.class_=e=>s.function_(e)&&e.toString().startsWith("class "),s.boolean=e=>!0===e||!1===e,s.symbol=n("symbol"),s.numericString=e=>s.string(e)&&!s.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),s.array=Array.isArray,s.buffer=e=>{var t,r,n,i;return null!==(i=null===(n=null===(r=null===(t=e)||void 0===t?void 0:t.constructor)||void 0===r?void 0:r.isBuffer)||void 0===n?void 0:n.call(r,e))&&void 0!==i&&i},s.nullOrUndefined=e=>s.null_(e)||s.undefined(e),s.object=e=>!s.null_(e)&&("object"==typeof e||s.function_(e)),s.iterable=e=>{var t;return s.function_(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},s.asyncIterable=e=>{var t;return s.function_(null===(t=e)||void 0===t?void 0:t[Symbol.asyncIterator])},s.generator=e=>s.iterable(e)&&s.function_(e.next)&&s.function_(e.throw),s.asyncGenerator=e=>s.asyncIterable(e)&&s.function_(e.next)&&s.function_(e.throw),s.nativePromise=e=>o("Promise")(e);s.promise=e=>s.nativePromise(e)||(e=>{var t,r;return s.function_(null===(t=e)||void 0===t?void 0:t.then)&&s.function_(null===(r=e)||void 0===r?void 0:r.catch)})(e),s.generatorFunction=o("GeneratorFunction"),s.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===i(e),s.asyncFunction=e=>"AsyncFunction"===i(e),s.boundFunction=e=>s.function_(e)&&!e.hasOwnProperty("prototype"),s.regExp=o("RegExp"),s.date=o("Date"),s.error=o("Error"),s.map=e=>o("Map")(e),s.set=e=>o("Set")(e),s.weakMap=e=>o("WeakMap")(e),s.weakSet=e=>o("WeakSet")(e),s.int8Array=o("Int8Array"),s.uint8Array=o("Uint8Array"),s.uint8ClampedArray=o("Uint8ClampedArray"),s.int16Array=o("Int16Array"),s.uint16Array=o("Uint16Array"),s.int32Array=o("Int32Array"),s.uint32Array=o("Uint32Array"),s.float32Array=o("Float32Array"),s.float64Array=o("Float64Array"),s.bigInt64Array=o("BigInt64Array"),s.bigUint64Array=o("BigUint64Array"),s.arrayBuffer=o("ArrayBuffer"),s.sharedArrayBuffer=o("SharedArrayBuffer"),s.dataView=o("DataView"),s.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,s.urlInstance=e=>o("URL")(e),s.urlString=e=>{if(!s.string(e))return!1;try{return new URL(e),!0}catch(e){return!1}},s.truthy=e=>Boolean(e),s.falsy=e=>!e,s.nan=e=>Number.isNaN(e);const a=new Set(["undefined","string","number","bigint","boolean","symbol"]);s.primitive=e=>s.null_(e)||a.has(typeof e),s.integer=e=>Number.isInteger(e),s.safeInteger=e=>Number.isSafeInteger(e),s.plainObject=e=>{if("Object"!==i(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})};const c=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);s.typedArray=e=>{const t=i(e);return void 0!==t&&c.has(t)};s.arrayLike=e=>!s.nullOrUndefined(e)&&!s.function_(e)&&(e=>s.safeInteger(e)&&e>=0)(e.length),s.inRange=(e,t)=>{if(s.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(s.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError("Invalid range: "+JSON.stringify(t))};const u=["innerHTML","ownerDocument","style","attributes","nodeValue"];s.domElement=e=>s.object(e)&&1===e.nodeType&&s.string(e.nodeName)&&!s.plainObject(e)&&u.every(t=>t in e),s.observable=e=>{var t,r,n,i;return!!e&&(e===(null===(r=(t=e)[Symbol.observable])||void 0===r?void 0:r.call(t))||e===(null===(i=(n=e)["@@observable"])||void 0===i?void 0:i.call(n)))},s.nodeStream=e=>s.object(e)&&s.function_(e.pipe)&&!s.observable(e),s.infinite=e=>e===1/0||e===-1/0;const l=e=>t=>s.integer(t)&&Math.abs(t%2)===e;s.evenInteger=l(0),s.oddInteger=l(1),s.emptyArray=e=>s.array(e)&&0===e.length,s.nonEmptyArray=e=>s.array(e)&&e.length>0,s.emptyString=e=>s.string(e)&&0===e.length,s.nonEmptyString=e=>s.string(e)&&e.length>0;s.emptyStringOrWhitespace=e=>s.emptyString(e)||(e=>s.string(e)&&!/\S/.test(e))(e),s.emptyObject=e=>s.object(e)&&!s.map(e)&&!s.set(e)&&0===Object.keys(e).length,s.nonEmptyObject=e=>s.object(e)&&!s.map(e)&&!s.set(e)&&Object.keys(e).length>0,s.emptySet=e=>s.set(e)&&0===e.size,s.nonEmptySet=e=>s.set(e)&&e.size>0,s.emptyMap=e=>s.map(e)&&0===e.size,s.nonEmptyMap=e=>s.map(e)&&e.size>0;const h=(e,t,r)=>{if(!s.function_(t))throw new TypeError("Invalid predicate: "+JSON.stringify(t));if(0===r.length)throw new TypeError("Invalid number of values");return e.call(r,t)};s.any=(e,...t)=>(s.array(e)?e:[e]).some(e=>h(Array.prototype.some,e,t)),s.all=(e,...t)=>h(Array.prototype.every,e,t);const g=(e,t,r)=>{if(!e)throw new TypeError(`Expected value which is \`${t}\`, received value of type \`${s(r)}\`.`)};t.assert={undefined:e=>g(s.undefined(e),"undefined",e),string:e=>g(s.string(e),"string",e),number:e=>g(s.number(e),"number",e),bigint:e=>g(s.bigint(e),"bigint",e),function_:e=>g(s.function_(e),"Function",e),null_:e=>g(s.null_(e),"null",e),class_:e=>g(s.class_(e),"Class",e),boolean:e=>g(s.boolean(e),"boolean",e),symbol:e=>g(s.symbol(e),"symbol",e),numericString:e=>g(s.numericString(e),"string with a number",e),array:e=>g(s.array(e),"Array",e),buffer:e=>g(s.buffer(e),"Buffer",e),nullOrUndefined:e=>g(s.nullOrUndefined(e),"null or undefined",e),object:e=>g(s.object(e),"Object",e),iterable:e=>g(s.iterable(e),"Iterable",e),asyncIterable:e=>g(s.asyncIterable(e),"AsyncIterable",e),generator:e=>g(s.generator(e),"Generator",e),asyncGenerator:e=>g(s.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>g(s.nativePromise(e),"native Promise",e),promise:e=>g(s.promise(e),"Promise",e),generatorFunction:e=>g(s.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>g(s.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>g(s.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>g(s.boundFunction(e),"Function",e),regExp:e=>g(s.regExp(e),"RegExp",e),date:e=>g(s.date(e),"Date",e),error:e=>g(s.error(e),"Error",e),map:e=>g(s.map(e),"Map",e),set:e=>g(s.set(e),"Set",e),weakMap:e=>g(s.weakMap(e),"WeakMap",e),weakSet:e=>g(s.weakSet(e),"WeakSet",e),int8Array:e=>g(s.int8Array(e),"Int8Array",e),uint8Array:e=>g(s.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>g(s.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>g(s.int16Array(e),"Int16Array",e),uint16Array:e=>g(s.uint16Array(e),"Uint16Array",e),int32Array:e=>g(s.int32Array(e),"Int32Array",e),uint32Array:e=>g(s.uint32Array(e),"Uint32Array",e),float32Array:e=>g(s.float32Array(e),"Float32Array",e),float64Array:e=>g(s.float64Array(e),"Float64Array",e),bigInt64Array:e=>g(s.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>g(s.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>g(s.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>g(s.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>g(s.dataView(e),"DataView",e),urlInstance:e=>g(s.urlInstance(e),"URL",e),urlString:e=>g(s.urlString(e),"string with a URL",e),truthy:e=>g(s.truthy(e),"truthy",e),falsy:e=>g(s.falsy(e),"falsy",e),nan:e=>g(s.nan(e),"NaN",e),primitive:e=>g(s.primitive(e),"primitive",e),integer:e=>g(s.integer(e),"integer",e),safeInteger:e=>g(s.safeInteger(e),"integer",e),plainObject:e=>g(s.plainObject(e),"plain object",e),typedArray:e=>g(s.typedArray(e),"TypedArray",e),arrayLike:e=>g(s.arrayLike(e),"array-like",e),domElement:e=>g(s.domElement(e),"Element",e),observable:e=>g(s.observable(e),"Observable",e),nodeStream:e=>g(s.nodeStream(e),"Node.js Stream",e),infinite:e=>g(s.infinite(e),"infinite number",e),emptyArray:e=>g(s.emptyArray(e),"empty array",e),nonEmptyArray:e=>g(s.nonEmptyArray(e),"non-empty array",e),emptyString:e=>g(s.emptyString(e),"empty string",e),nonEmptyString:e=>g(s.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>g(s.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>g(s.emptyObject(e),"empty object",e),nonEmptyObject:e=>g(s.nonEmptyObject(e),"non-empty object",e),emptySet:e=>g(s.emptySet(e),"empty set",e),nonEmptySet:e=>g(s.nonEmptySet(e),"non-empty set",e),emptyMap:e=>g(s.emptyMap(e),"empty map",e),nonEmptyMap:e=>g(s.nonEmptyMap(e),"non-empty map",e),evenInteger:e=>g(s.evenInteger(e),"even integer",e),oddInteger:e=>g(s.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>g(s.directInstanceOf(e,t),"T",e),inRange:(e,t)=>g(s.inRange(e,t),"in range",e),any:(e,...t)=>g(s.any(e,...t),"predicate returns truthy for any value",t),all:(e,...t)=>g(s.all(e,...t),"predicate returns truthy for all values",t)},Object.defineProperties(s,{class:{value:s.class_},function:{value:s.function_},null:{value:s.null_}}),Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}}),t.default=s,e.exports=s,e.exports.default=s,e.exports.assert=t.assert},98298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93121),i=Number(process.versions.node.split(".")[0]),o=e=>{const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const r=e=>{const r=e.emit.bind(e);e.emit=(n,...i)=>("error"===n&&(t.error=Date.now(),t.phases.total=t.error-t.start,e.emit=r),r(n,...i))};r(e),e.prependOnceListener("abort",()=>{t.abort=Date.now(),(!t.response||i>=13)&&(t.phases.total=Date.now()-t.start)});const o=e=>{t.socket=Date.now(),t.phases.wait=t.socket-t.start;const r=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",r),n.default(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",r),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?o(e.socket):e.prependOnceListener("socket",o);const s=()=>{var e;t.upload=Date.now(),t.phases.request=t.upload-(null!=(e=t.secureConnect)?e:t.connect)};return("boolean"==typeof e.writableFinished?!e.writableFinished:!e.finished||0!==e.outputSize||e.socket&&0!==e.socket.writableLength)?e.prependOnceListener("finish",s):s(),e.prependOnceListener("response",e=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,e.timings=t,r(e),e.prependOnceListener("end",()=>{t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start})}),t};t.default=o,e.exports=o,e.exports.default=o},58069:(e,t,r)=>{"use strict";l.ifExists=function(e,t,r){return l(e,t,r).catch(()=>{})};const n=r(31669),i=r(56344),o=r(85622),s=r(97369),A=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,a={createPwshFile:!0,createCmdFile:s(),fs:r(35747)},c=new Map([[".js","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function u(e){const t={...a,...e},r=t.fs;return t.fs_={chmod:r.chmod?n.promisify(r.chmod):async()=>{},stat:n.promisify(r.stat),unlink:n.promisify(r.unlink),readFile:n.promisify(r.readFile),writeFile:n.promisify(r.writeFile)},t}async function l(e,t,r){const n=u(r);await n.fs_.stat(e),await async function(e,t,r){const n=await async function(e,t){const r=await t.fs_.readFile(e,"utf8"),n=r.trim().split(/\r*\n/)[0].match(A);if(!n){const t=o.extname(e).toLowerCase();return{program:c.get(t)||null,additionalArgs:""}}return{program:n[1],additionalArgs:n[2]}}(e,r);return await function(e,t){return i(o.dirname(e),{fs:t.fs})}(t,r),function(e,t,r,n){const i=u(n),o=[{generator:g,extension:""}];i.createCmdFile&&o.push({generator:h,extension:".cmd"});i.createPwshFile&&o.push({generator:f,extension:".ps1"});return Promise.all(o.map(n=>async function(e,t,r,n,i){const o=i.preserveSymlinks?"--preserve-symlinks":"",s=[r.additionalArgs,o].filter(e=>e).join(" ");return i=Object.assign({},i,{prog:r.program,args:s}),await function(e,t){return function(e,t){return t.fs_.unlink(e).catch(()=>{})}(e,t)}(t,i),await i.fs_.writeFile(t,n(e,t,i),"utf8"),function(e,t){return function(e,t){return t.fs_.chmod(e,493)}(e,t)}(t,i)}(e,t+n.extension,r,n.generator,i)))}(e,t,n,r)}(e,t,n)}function h(e,t,r){let n=o.relative(o.dirname(t),e).split("/").join("\\");const i=o.isAbsolute(n)?`"${n}"`:`"%~dp0\\${n}"`;let s,A=r.prog,a=r.args||"";const c=p(r.nodePath).win32;A?(s=`"%~dp0\\${A}.exe"`,n=i):(A=i,a="",n="");let u=r.progArgs?r.progArgs.join(" ")+" ":"",l=c?`@SET NODE_PATH=${c}\r\n`:"";return l+=s?`@IF EXIST ${s} (\r\n ${s} ${a} ${n} ${u}%*\r\n) ELSE (\r\n @SETLOCAL\r\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n ${A} ${a} ${n} ${u}%*\r\n)`:`@${A} ${a} ${n} ${u}%*\r\n`,l}function g(e,t,r){let n,i=o.relative(o.dirname(t),e),s=r.prog&&r.prog.split("\\").join("/");i=i.split("\\").join("/");const A=o.isAbsolute(i)?`"${i}"`:`"$basedir/${i}"`;let a=r.args||"";const c=p(r.nodePath).posix;s?(n=`"$basedir/${r.prog}"`,i=A):(s=A,a="",i="");let u=r.progArgs?r.progArgs.join(" ")+" ":"",l="#!/bin/sh\n";l+='basedir=$(dirname "$(echo "$0" | sed -e \'s,\\\\,/,g\')")\n\ncase `uname` in\n *CYGWIN*) basedir=`cygpath -w "$basedir"`;;\nesac\n\n';const h=r.nodePath?`export NODE_PATH="${c}"\n`:"";return l+=n?h+`if [ -x ${n} ]; then\n`+` exec ${n} ${a} ${i} ${u}"$@"\nelse \n`+` exec ${s} ${a} ${i} ${u}"$@"\nfi\n`:`${h}${s} ${a} ${i} ${u}"$@"\nexit $?\n`,l}function f(e,t,r){let n=o.relative(o.dirname(t),e);const i=r.prog&&r.prog.split("\\").join("/");let s,A=i&&`"${i}$exe"`;n=n.split("\\").join("/");const a=o.isAbsolute(n)?`"${n}"`:`"$basedir/${n}"`;let c=r.args||"",u=p(r.nodePath);const l=u.win32,h=u.posix;A?(s=`"$basedir/${r.prog}$exe"`,n=a):(A=a,c="",n="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",f='#!/usr/bin/env pwsh\n$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n\n$exe=""\n'+(r.nodePath?`$env_node_path=$env:NODE_PATH\n$env:NODE_PATH="${l}"\n`:"")+'if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {\n # Fix case when both the Windows and Linux builds of Node\n # are installed in the same directory\n $exe=".exe"\n}';return r.nodePath&&(f=f+" else {\n"+` $env:NODE_PATH="${h}"\n}`),f+="\n",f=s?f+"$ret=0\n"+`if (Test-Path ${s}) {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${s} ${c} ${n} ${g}$args\n } else {\n`+` & ${s} ${c} ${n} ${g}$args\n }\n $ret=$LASTEXITCODE\n} else {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${A} ${c} ${n} ${g}$args\n } else {\n`+` & ${A} ${c} ${n} ${g}$args\n }\n $ret=$LASTEXITCODE\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $ret\n":f+"# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n"+` $input | & ${A} ${c} ${n} ${g}$args\n} else {\n`+` & ${A} ${c} ${n} ${g}$args\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $LASTEXITCODE\n",f}function p(e){if(!e)return{win32:"",posix:""};let t="string"==typeof e?e.split(o.delimiter):Array.from(e),r={};for(let e=0;e"/mnt/"+t.toLowerCase()):t[e];r.win32=r.win32?`${r.win32};${n}`:n,r.posix=r.posix?`${r.posix}:${i}`:i,r[e]={win32:n,posix:i}}return r}e.exports=l},27589:e=>{"use strict";const t=e.exports;e.exports.default=t;const r="[",n="]",i="",o=";",s="Apple_Terminal"===process.env.TERM_PROGRAM;t.cursorTo=(e,t)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");return"number"!=typeof t?r+(e+1)+"G":r+(t+1)+";"+(e+1)+"H"},t.cursorMove=(e,t)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");let n="";return e<0?n+=r+-e+"D":e>0&&(n+=r+e+"C"),t<0?n+=r+-t+"A":t>0&&(n+=r+t+"B"),n},t.cursorUp=(e=1)=>r+e+"A",t.cursorDown=(e=1)=>r+e+"B",t.cursorForward=(e=1)=>r+e+"C",t.cursorBackward=(e=1)=>r+e+"D",t.cursorLeft="",t.cursorSavePosition=s?"7":"",t.cursorRestorePosition=s?"8":"",t.cursorGetPosition="",t.cursorNextLine="",t.cursorPrevLine="",t.cursorHide="[?25l",t.cursorShow="[?25h",t.eraseLines=e=>{let r="";for(let n=0;n[n,"8",o,o,t,i,e,n,"8",o,o,i].join(""),t.image=(e,t={})=>{let r=n+"1337;File=inline=1";return t.width&&(r+=";width="+t.width),t.height&&(r+=";height="+t.height),!1===t.preserveAspectRatio&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+i},t.iTerm={setCwd:(e=process.cwd())=>`${n}50;CurrentDir=${e}${i}`,annotation:(e,t={})=>{let r=n+"1337;";const o=void 0!==t.x,s=void 0!==t.y;if((o||s)&&(!o||!s||void 0===t.length))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(o?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+i}}},81337:e=>{"use strict";e.exports=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},18483:(e,t,r)=>{"use strict";e=r.nmd(e);const n=(e,t)=>(...r)=>`[${e(...r)+t}m`,i=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},o=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},s=e=>e,A=(e,t,r)=>[e,t,r],a=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let c;const u=(e,t,n,i)=>{void 0===c&&(c=r(2744));const o=i?10:0,s={};for(const[r,i]of Object.entries(c)){const A="ansi16"===r?"ansi":r;r===t?s[A]=e(n,o):"object"==typeof i&&(s[A]=e(i[t],o))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,n]of Object.entries(t)){for(const[r,i]of Object.entries(n))t[r]={open:`[${i[0]}m`,close:`[${i[1]}m`},n[r]=t[r],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="",t.bgColor.close="",a(t.color,"ansi",()=>u(n,"ansi16",s,!1)),a(t.color,"ansi256",()=>u(i,"ansi256",s,!1)),a(t.color,"ansi16m",()=>u(o,"rgb",A,!1)),a(t.bgColor,"ansi",()=>u(n,"ansi16",s,!0)),a(t.bgColor,"ansi256",()=>u(i,"ansi256",s,!0)),a(t.bgColor,"ansi16m",()=>u(o,"rgb",A,!0)),t}})},39920:e=>{"use strict";e.exports=(...e)=>[...new Set([].concat(...e))]},86792:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var o=n(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,o,s,A,a=r.indexOf(e),c=r.indexOf(t,a+1),u=a;if(a>=0&&c>0){for(n=[],o=r.length;u>=0&&!A;)u==a?(n.push(u),a=r.indexOf(e,u+1)):1==n.length?A=[n.pop(),c]:((i=n.pop())=0?a:c;n.length&&(A=[o,s])}return A}e.exports=t,t.range=n},73975:(e,t,r)=>{"use strict";var n=r(86897).Duplex;function i(e){if(!(this instanceof i))return new i(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)}))}else this.append(e);n.call(this)}r(31669).inherits(i,n),i.prototype._offset=function(e){var t,r=0,n=0;if(0===e)return[0,0];for(;nthis.length||e<0)){var t=this._offset(e);return this._bufs[t[0]][t[1]]}},i.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},i.prototype.copy=function(e,t,r,n){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof n||n>this.length)&&(n=this.length),r>=this.length)return e||Buffer.alloc(0);if(n<=0)return e||Buffer.alloc(0);var i,o,s=!!e,A=this._offset(r),a=n-r,c=a,u=s&&t||0,l=A[1];if(0===r&&n==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:Buffer.concat(this._bufs,this.length);for(o=0;o(i=this._bufs[o].length-l))){this._bufs[o].copy(e,u,l,l+c);break}this._bufs[o].copy(e,u,l),u+=i,c-=i,l&&(l=0)}return e},i.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return new i;var r=this._offset(e),n=this._offset(t),o=this._bufs.slice(r[0],n[0]+1);return 0==n[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new i(o)},i.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},i.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},i.prototype.duplicate=function(){for(var e=0,t=new i;ethis.length?this.length:t;for(var n=this._offset(t),o=n[0],s=n[1];o=e.length){var a=A.indexOf(e,s);if(-1!==a)return this._reverseOffset([o,a]);s=A.length-e.length+1}else{var c=this._reverseOffset([o,s]);if(this._match(c,e))return c;s++}}s=0}return-1},i.prototype._match=function(e,t){if(this.length-e{var n=r(36547),i=r(86792);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,r){var o=[],s=i("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var a,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),d=c||l,C=s.body.indexOf(",")>=0;if(!d&&!C)return s.post.match(/,.*\}/)?(t=s.pre+"{"+s.body+A+s.post,e(t)):[t];if(d)a=s.body.split(/\.\./);else{if(1===(a=function e(t){if(!t)return[""];var r=[],n=i("{","}",t);if(!n)return t.split(",");var o=n.pre,s=n.body,A=n.post,a=o.split(",");a[a.length-1]+="{"+s+"}";var c=e(A);A.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c));return r.push.apply(r,a),r}(s.body)).length)if(1===(a=e(a[0],!1).map(h)).length)return(m=s.post.length?e(s.post,!1):[""]).map((function(e){return s.pre+a[0]+e}))}var E,I=s.pre,m=s.post.length?e(s.post,!1):[""];if(d){var y=u(a[0]),w=u(a[1]),B=Math.max(a[0].length,a[1].length),Q=3==a.length?Math.abs(u(a[2])):1,v=f;w0){var x=new Array(k+1).join("0");S=b<0?"-"+x+S.slice(1):x+S}}E.push(S)}}else E=n(a,(function(t){return e(t,!1)}));for(var F=0;F=t}},12235:(e,t,r)=>{"use strict";const n=r(54900),i=r(44617),o=r(1495),s=r(425),A=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let e=A.create(n,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(A.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};A.parse=(e,t={})=>s(e,t),A.stringify=(e,t={})=>n("string"==typeof e?A.parse(e,t):e,t),A.compile=(e,t={})=>("string"==typeof e&&(e=A.parse(e,t)),i(e,t)),A.expand=(e,t={})=>{"string"==typeof e&&(e=A.parse(e,t));let r=o(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},A.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?A.compile(e,t):A.expand(e,t),e.exports=A},44617:(e,t,r)=>{"use strict";const n=r(52169),i=r(4542);e.exports=(e,t={})=>{let r=(e,o={})=>{let s=i.isInvalidBrace(o),A=!0===e.invalid&&!0===t.escapeInvalid,a=!0===s||!0===A,c=!0===t.escapeInvalid?"\\":"",u="";if(!0===e.isOpen)return c+e.value;if(!0===e.isClose)return c+e.value;if("open"===e.type)return a?c+e.value:"(";if("close"===e.type)return a?c+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":a?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let r=i.reduce(e.nodes),o=n(...r,{...t,wrap:!1,toRegex:!0});if(0!==o.length)return r.length>1&&o.length>1?`(${o})`:o}if(e.nodes)for(let t of e.nodes)u+=r(t,e);return u};return r(e)}},5384:e=>{"use strict";e.exports={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},1495:(e,t,r)=>{"use strict";const n=r(52169),i=r(54900),o=r(4542),s=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?o.flatten(t).map(e=>`{${e}}`):t;for(let i of e)if(Array.isArray(i))for(let e of i)n.push(s(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),n.push(Array.isArray(e)?s(i,e,r):i+e);return o.flatten(n)};e.exports=(e,t={})=>{let r=void 0===t.rangeLimit?1e3:t.rangeLimit,A=(e,a={})=>{e.queue=[];let c=a,u=a.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,u=c.queue;if(e.invalid||e.dollar)return void u.push(s(u.pop(),i(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void u.push(s(u.pop(),["{}"]));if(e.nodes&&e.ranges>0){let A=o.reduce(e.nodes);if(o.exceedsLimit(...A,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let a=n(...A,t);return 0===a.length&&(a=i(e,t)),u.push(s(u.pop(),a)),void(e.nodes=[])}let l=o.encloseBrace(e),h=e.queue,g=e;for(;"brace"!==g.type&&"root"!==g.type&&g.parent;)g=g.parent,h=g.queue;for(let t=0;t{"use strict";const n=r(54900),{MAX_LENGTH:i,CHAR_BACKSLASH:o,CHAR_BACKTICK:s,CHAR_COMMA:A,CHAR_DOT:a,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:g,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:C,CHAR_ZERO_WIDTH_NOBREAK_SPACE:E}=r(5384);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let r=t||{},I="number"==typeof r.maxLength?Math.min(i,r.maxLength):i;if(e.length>I)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${I})`);let m,y={type:"root",input:e,nodes:[]},w=[y],B=y,Q=y,v=0,D=e.length,b=0,S=0;const k=()=>e[b++],x=e=>{if("text"===e.type&&"dot"===Q.type&&(Q.type="text"),!Q||"text"!==Q.type||"text"!==e.type)return B.nodes.push(e),e.parent=B,e.prev=Q,Q=e,e;Q.value+=e.value};for(x({type:"bos"});b0){if(B.ranges>0){B.ranges=0;let e=B.nodes.shift();B.nodes=[e,{type:"text",value:n(B)}]}x({type:"comma",value:m}),B.commas++}else if(m===a&&S>0&&0===B.commas){let e=B.nodes;if(0===S||0===e.length){x({type:"text",value:m});continue}if("dot"===Q.type){if(B.range=[],Q.value+=m,Q.type="range",3!==B.nodes.length&&5!==B.nodes.length){B.invalid=!0,B.ranges=0,Q.type="text";continue}B.ranges++,B.args=[];continue}if("range"===Q.type){e.pop();let t=e[e.length-1];t.value+=Q.value+m,Q=t,B.ranges--;continue}x({type:"dot",value:m})}else x({type:"text",value:m});else{if("brace"!==B.type){x({type:"text",value:m});continue}let e="close";B=w.pop(),B.close=!0,x({type:e,value:m}),S--,B=w[w.length-1]}else{S++;let e=Q.value&&"$"===Q.value.slice(-1)||!0===B.dollar;B=x({type:"brace",open:!0,close:!1,dollar:e,depth:S,commas:0,ranges:0,nodes:[]}),w.push(B),x({type:"open",value:m})}else{let e,r=m;for(!0!==t.keepQuotes&&(m="");b{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});let e=w[w.length-1],t=e.nodes.indexOf(B);e.nodes.splice(t,1,...B.nodes)}}while(w.length>0);return x({type:"eos"}),y}},54900:(e,t,r)=>{"use strict";const n=r(4542);e.exports=(e,t={})=>{let r=(e,i={})=>{let o=t.escapeInvalid&&n.isInvalidBrace(i),s=!0===e.invalid&&!0===t.escapeInvalid,A="";if(e.value)return(o||s)&&n.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)A+=r(t);return A};return r(e)}},4542:(e,t)=>{"use strict";t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find(e=>e.type===t),t.exceedsLimit=(e,r,n=1,i)=>!1!==i&&(!(!t.isInteger(e)||!t.isInteger(r))&&(Number(r)-Number(e))/Number(n)>=i),t.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||"open"===n.type||"close"===n.type)&&!0!==n.escaped&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),t.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),t.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),t.flatten=(...e)=>{const t=[],r=e=>{for(let n=0;n{"use strict";const n=r(85622),{watch:i}=r(35747),{readFile:o}=r(35747).promises,{isIP:s}=r(11631),A="win32"===process.platform?n.join(process.env.SystemDrive,"Windows\\System32\\drivers\\etc\\hosts"):"/etc/hosts",a=/^(?:(?:[a-zA-Z\d]|[a-zA-Z\d][a-zA-Z\d-]*[a-zA-Z\d])\.)*(?:[A-Za-z\d]|[A-Za-z\d][A-Za-z\d-]*[A-Za-z\d])$/,c=e=>a.test(e),u={encoding:"utf8"},l=/\s+/g;class h{constructor({watching:e,customHostsPath:t=A}){this._hostsPath=t,this._error=null,this._watcher=null,this._watching=e,this._hosts={},this._init()}_init(){"string"==typeof this._hostsPath&&(this._promise=(async()=>{await this._update(),this._promise=null,this._error||this._watching&&(this._watcher=i(this._hostsPath,{persistent:!1},e=>{"change"===e?this._update():this._watcher.close()}),this._watcher.once("error",e=>{this._error=e,this._hosts={}}),this._watcher.once("close",()=>{this._init()}))})())}async _update(){try{let e=await o(this._hostsPath,u);e=e.split("\n"),this._hosts={};for(let t of e){t=t.replace(l," ").trim();const e=t.split(" "),r=s(e[0]);if(!r)continue;const n=e.shift();for(const t of e){if(!c(t))break;if(this._hosts[t]){let e=!1;for(const n of this._hosts[t])if(n.family===r){e=!0;break}if(e)continue}else this._hosts[t]=[],this._hosts[t].expires=1/0;this._hosts[t].push({address:n,family:r,expires:1/0,ttl:1/0})}}}catch(e){this._hosts={},this._error=e}}async get(e){if(this._promise&&await this._promise,this._error)throw this._error;return this._hosts[e]}}const g={};h.getResolver=({customHostsPath:e,watching:t})=>{void 0!==e&&"string"!=typeof e&&(e=!1);const r=`${e}:${t=Boolean(t)}`;let n=g[r];return n||(n=new h({customHostsPath:e,watching:t}),g[r]=n,n)},e.exports=h},43261:(e,t,r)=>{"use strict";const{V4MAPPED:n,ADDRCONFIG:i,promises:{Resolver:o},lookup:s}=r(40881),{promisify:A}=r(31669),a=r(12087),{getResolver:c}=r(76438),u=Symbol("cacheableLookupCreateConnection"),l=Symbol("cacheableLookupInstance"),h=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},g=()=>{let e=!1,t=!1;for(const r of Object.values(a.networkInterfaces()))for(const n of r)if(!n.internal&&("IPv6"===n.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},f={ttl:!0};class p{constructor({customHostsPath:e,watchingHostsFile:t=!1,cache:r=new Map,maxTtl:n=1/0,resolver:i=new o,fallbackTtl:a=1,errorTtl:u=.15}={}){this.maxTtl=n,this.fallbackTtl=a,this.errorTtl=u,this._cache=r,this._resolver=i,this._lookup=A(s),this._resolver instanceof o?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=A(this._resolver.resolve4.bind(this._resolver)),this._resolve6=A(this._resolver.resolve6.bind(this._resolver))),this._iface=g(),this._hostsResolver=c({customHostsPath:e,watching:t}),this._pending={},this._nextRemovalTime=!1,this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.updateInterfaceInfo(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if("function"==typeof t?(r=t,t={}):"number"==typeof t&&(t={family:t}),!r)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(e=>{t.all?r(null,e):r(null,e.address,e.family,e.expires,e.ttl)},r)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let r=await this.query(e);if(6===t.family){const e=r.filter(e=>6===e.family);0===e.length&&t.hints&n?(e=>{for(const t of e)t.address="::ffff:"+t.address,t.family=6})(r):r=e}else 4===t.family&&(r=r.filter(e=>4===e.family));if(t.hints&i){const{_iface:e}=this;r=r.filter(t=>6===t.family?e.has6:e.has4)}if(0===r.length){const t=new Error("ENOTFOUND "+e);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?r:1===r.length?r[0]:this._getEntry(r,e)}async query(e){let t=await this._hostsResolver.get(e)||await this._cache.get(e);if(!t){const r=this._pending[e];if(r)t=await r;else{const r=this.queryAndCache(e);this._pending[e]=r,t=await r}}return t=t.map(e=>({...e})),t}async queryAndCache(e){const[t,r]=await Promise.all([this._resolve4(e,f).catch(()=>[]),this._resolve6(e,f).catch(()=>[])]);let n=0;if(t)for(const e of t)e.family=4,e.expires=Date.now()+1e3*e.ttl,n=Math.max(n,e.ttl);if(r)for(const e of r)e.family=6,e.expires=Date.now()+1e3*e.ttl,n=Math.max(n,e.ttl);let i=[...t||[],...r||[]];if(0===i.length)try{i=await this._lookup(e,{all:!0});for(const e of i)e.ttl=this.fallbackTtl,e.expires=Date.now()+1e3*e.ttl;n=1e3*this.fallbackTtl}catch(t){throw delete this._pending[e],"ENOTFOUND"===t.code&&(n=1e3*this.errorTtl,i.expires=Date.now()+n,await this._cache.set(e,i,n),this._tick(n)),t}else n=1e3*Math.min(this.maxTtl,n);return this.maxTtl>0&&n>0&&(i.expires=Date.now()+n,await this._cache.set(e,i,n),this._tick(n)),delete this._pending[e],i}_getEntry(e,t){return e[0]}tick(){}_tick(e){if(!(this._cache instanceof Map)||void 0===e)return;const t=this._nextRemovalTime;(!t||e{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[r,{expires:n}]of this._cache)t>=n?this._cache.delete(r):n("lookup"in t||(t.lookup=this.lookup),e[u](t,r))}uninstall(e){if(h(e),e[u]){if(e[l]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[u],delete e[u],delete e[l]}}updateInterfaceInfo(){this._iface=g(),this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}e.exports=p,e.exports.default=p},11200:(e,t,r)=>{"use strict";const n=r(28614),i=r(78835),o=r(19793),s=r(58764),A=r(86834),a=r(48491),c=r(55737),u=r(15751),l=r(72515);class h{constructor(e,t){if("function"!=typeof e)throw new TypeError("Parameter `request` must be a function");return this.cache=new l({uri:"string"==typeof t&&t,store:"string"!=typeof t&&t,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let l;if("string"==typeof t)l=f(i.parse(t)),t={};else if(t instanceof i.URL)l=f(i.parse(t.toString())),t={};else{const[e,...r]=(t.path||"").split("?"),n=r.length>0?"?"+r.join("?"):"";l=f({...t,pathname:e,search:n})}(t={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...t,...g(l)}).headers=c(t.headers);const p=new n,d=o(i.format(l),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),C=`${t.method}:${d}`;let E=!1,I=!1;const m=t=>{I=!0;let n,i=!1;const o=new Promise(e=>{n=()=>{i||(i=!0,e())}}),c=e=>{if(E&&!t.forceRefresh){e.status=e.statusCode;const r=A.fromObject(E.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();(e=new a(E.statusCode,t,E.body,E.url)).cachePolicy=r.policy,e.fromCache=!0}}let n;e.fromCache||(e.cachePolicy=new A(t,e,t),e.fromCache=!1),t.cache&&e.cachePolicy.storable()?(n=u(e),(async()=>{try{const r=s.buffer(e);if(await Promise.race([o,new Promise(t=>e.once("end",t))]),i)return;const n=await r,A={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?E.statusCode:e.statusCode,body:n};let a=t.strictTtl?e.cachePolicy.timeToLive():void 0;t.maxTtl&&(a=a?Math.min(a,t.maxTtl):t.maxTtl),await this.cache.set(C,A,a)}catch(e){p.emit("error",new h.CacheError(e))}})()):t.cache&&E&&(async()=>{try{await this.cache.delete(C)}catch(e){p.emit("error",new h.CacheError(e))}})(),p.emit("response",n||e),"function"==typeof r&&r(n||e)};try{const r=e(t,c);r.once("error",n),r.once("abort",n),p.emit("request",r)}catch(e){p.emit("error",new h.RequestError(e))}};return(async()=>{const e=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(C):void 0;if(void 0===t)return m(e);const n=A.fromObject(t.cachePolicy);if(n.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=n.responseHeaders(),i=new a(t.statusCode,e,t.body,t.url);i.cachePolicy=n,i.fromCache=!0,p.emit("response",i),"function"==typeof r&&r(i)}else E=t,e.headers=n.revalidationHeaders(e),m(e)},n=e=>p.emit("error",new h.CacheError(e));this.cache.once("error",n),p.on("response",()=>this.cache.removeListener("error",n));try{await e(t)}catch(e){t.automaticFailover&&!I&&m(t),p.emit("error",new h.CacheError(e))}})(),p}}}function g(e){const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t}function f(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}h.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}},h.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}},e.exports=h},54738:e=>{"use strict";const t=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);if(0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";if(1===e.length)return t.pascalCase?e.toUpperCase():e.toLowerCase();return e!==e.toLowerCase()&&(e=(e=>{let t=!1,r=!1,n=!1;for(let i=0;it.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),r=e,t.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r;var r};e.exports=t,e.exports.default=t},95882:(e,t,r)=>{"use strict";const n=r(18483),{stdout:i,stderr:o}=r(59428),{stringReplaceAll:s,stringEncaseCRLFWithFirstIndex:A}=r(73327),a=["ansi","ansi","ansi256","ansi16m"],c=Object.create(null);class u{constructor(e){return l(e)}}const l=e=>{const t={};return((e,t={})=>{if(t.level>3||t.level<0)throw new Error("The `level` option should be an integer from 0 to 3");const r=i?i.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>I(t.template,...e),Object.setPrototypeOf(t,h.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=u,t.template};function h(e){return l(e)}for(const[e,t]of Object.entries(n))c[e]={get(){const r=d(this,p(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};c.visible={get(){const e=d(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const g=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of g)c[e]={get(){const{level:t}=this;return function(...r){const i=p(n.color[a[t]][e](...r),n.color.close,this._styler);return d(this,i,this._isEmpty)}}};for(const e of g){c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const i=p(n.bgColor[a[t]][e](...r),n.bgColor.close,this._styler);return d(this,i,this._isEmpty)}}}}const f=Object.defineProperties(()=>{},{...c,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),p=(e,t,r)=>{let n,i;return void 0===r?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},d=(e,t,r)=>{const n=(...e)=>C(n,1===e.length?""+e[0]:e.join(" "));return n.__proto__=f,n._generator=e,n._styler=t,n._isEmpty=r,n},C=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:n,closeAll:i}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=s(t,r.close,r.open),r=r.parent;const o=t.indexOf("\n");return-1!==o&&(t=A(t,i,n,o)),n+t+i};let E;const I=(e,...t)=>{const[n]=t;if(!Array.isArray(n))return t.join(" ");const i=t.slice(1),o=[n.raw[0]];for(let e=1;e{"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,i=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function A(e,t){const r=[],o=t.trim().split(/\s*,\s*/g);let A;for(const t of o){const o=Number(t);if(Number.isNaN(o)){if(!(A=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(A[2].replace(i,(e,t,r)=>t?s(t):r))}else r.push(o)}return r}function a(e){r.lastIndex=0;const t=[];let n;for(;null!==(n=r.exec(e));){const e=n[1];if(n[2]){const r=A(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function c(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw new Error("Unknown Chalk style: "+e);n=t.length>0?n[e](...t):n[e]}return n}e.exports=(e,r)=>{const n=[],i=[];let o=[];if(r.replace(t,(t,r,A,u,l,h)=>{if(r)o.push(s(r));else if(u){const t=o.join("");o=[],i.push(0===n.length?t:c(e,n)(t)),n.push({inverse:A,styles:a(u)})}else if(l){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");i.push(c(e,n)(o.join(""))),o=[],n.pop()}else o.push(h)}),i.push(o.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")}},73327:e=>{"use strict";e.exports={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;const i=t.length;let o=0,s="";do{s+=e.substr(o,n-o)+t+r,o=n+i,n=e.indexOf(t,o)}while(-1!==n);return s+=e.substr(o),s},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let i=0,o="";do{const s="\r"===e[n-1];o+=e.substr(i,(s?n-1:n)-i)+t+(s?"\r\n":"\n")+r,i=n+1,n=e.indexOf("\n",i)}while(-1!==n);return o+=e.substr(i),o}}},31059:(e,t,r)=>{var n=r(31669),i=r(24250);function o(){}o.prototype.match=function(e){var t,r,n,o,s=0,A=0,a=0,c=e.fInputBytes,u=e.fInputLen;e:for(t=0;t{var n=r(31669),i=r(24250);function o(){this.charValue=0,this.index=0,this.nextIndex=0,this.error=!1,this.done=!1,this.reset=function(){this.charValue=0,this.index=-1,this.nextIndex=0,this.error=!1,this.done=!1},this.nextByte=function(e){return this.nextIndex>=e.fRawLength?(this.done=!0,-1):255&e.fRawInput[this.nextIndex++]}}function s(){}function A(e,t){e.index=e.nextIndex,e.error=!1;var r=0,n=0,i=0;return(r=e.charValue=e.nextByte(t))<0?e.done=!0:r<=141||(n=e.nextByte(t),e.charValue=e.charValue<<8|n,r>=161&&r<=254?n<161&&(e.error=!0):142!=r?143==r&&(i=e.nextByte(t),e.charValue=e.charValue<<8|i,i<161&&(e.error=!0)):n<161&&(e.error=!0)),0==e.done}s.prototype.match=function(e){var t,r=0,n=0,s=0,A=0,a=0,c=new o;e:{for(c.reset();this.nextChar(c,e);){if(A++,c.error)s++;else{var u=4294967295&c.charValue;u<=255?0:(r++,null!=this.commonChars&&function e(t,r,n,i){if(i>>1);return r>t[o]?e(t,r,o+1,i):r=0&&n++)}if(s>=2&&5*s>=r)break e}if(r<=10&&0==s)a=0==r&&A<10?0:10;else if(r<20*s)a=0;else if(null==this.commonChars)(a=30+r-20*s)>100&&(a=100);else{var l=90/Math.log(parseFloat(r)/4);a=Math.floor(Math.log(n+1)*l+10),a=Math.min(a,100)}}return 0==a?null:new i(e,this,a)},s.prototype.nextChar=function(e,t){},e.exports.sjis=function(){this.name=function(){return"Shift-JIS"},this.language=function(){return"ja"},this.commonChars=[33088,33089,33090,33093,33115,33129,33130,33141,33142,33440,33442,33444,33449,33450,33451,33453,33455,33457,33459,33461,33463,33469,33470,33473,33476,33477,33478,33480,33481,33484,33485,33500,33504,33511,33512,33513,33514,33520,33521,33601,33603,33614,33615,33624,33630,33634,33639,33653,33654,33673,33674,33675,33677,33683,36502,37882,38314],this.nextChar=function(e,t){var r;if(e.index=e.nextIndex,e.error=!1,(r=e.charValue=e.nextByte(t))<0)return!1;if(r<=127||r>160&&r<=223)return!0;var n=e.nextByte(t);return!(n<0)&&(e.charValue=r<<8|n,n>=64&&n<=127||n>=128&&n<=255||(e.error=!0),!0)}},n.inherits(e.exports.sjis,s),e.exports.big5=function(){this.name=function(){return"Big5"},this.language=function(){return"zh"},this.commonChars=[41280,41281,41282,41283,41287,41289,41333,41334,42048,42054,42055,42056,42065,42068,42071,42084,42090,42092,42103,42147,42148,42151,42177,42190,42193,42207,42216,42237,42304,42312,42328,42345,42445,42471,42583,42593,42594,42600,42608,42664,42675,42681,42707,42715,42726,42738,42816,42833,42841,42970,43171,43173,43181,43217,43219,43236,43260,43456,43474,43507,43627,43706,43710,43724,43772,44103,44111,44208,44242,44377,44745,45024,45290,45423,45747,45764,45935,46156,46158,46412,46501,46525,46544,46552,46705,47085,47207,47428,47832,47940,48033,48593,49860,50105,50240,50271],this.nextChar=function(e,t){e.index=e.nextIndex,e.error=!1;var r=e.charValue=e.nextByte(t);if(r<0)return!1;if(r<=127||255==r)return!0;var n=e.nextByte(t);return!(n<0)&&(e.charValue=e.charValue<<8|n,(n<64||127==n||255==n)&&(e.error=!0),!0)}},n.inherits(e.exports.big5,s),e.exports.euc_jp=function(){this.name=function(){return"EUC-JP"},this.language=function(){return"ja"},this.commonChars=[41377,41378,41379,41382,41404,41418,41419,41430,41431,42146,42148,42150,42152,42154,42155,42156,42157,42159,42161,42163,42165,42167,42169,42171,42173,42175,42176,42177,42179,42180,42182,42183,42184,42185,42186,42187,42190,42191,42192,42206,42207,42209,42210,42212,42216,42217,42218,42219,42220,42223,42226,42227,42402,42403,42404,42406,42407,42410,42413,42415,42416,42419,42421,42423,42424,42425,42431,42435,42438,42439,42440,42441,42443,42448,42453,42454,42455,42462,42464,42465,42469,42473,42474,42475,42476,42477,42483,47273,47572,47854,48072,48880,49079,50410,50940,51133,51896,51955,52188,52689],this.nextChar=A},n.inherits(e.exports.euc_jp,s),e.exports.euc_kr=function(){this.name=function(){return"EUC-KR"},this.language=function(){return"ko"},this.commonChars=[45217,45235,45253,45261,45268,45286,45293,45304,45306,45308,45496,45497,45511,45527,45538,45994,46011,46274,46287,46297,46315,46501,46517,46527,46535,46569,46835,47023,47042,47054,47270,47278,47286,47288,47291,47337,47531,47534,47564,47566,47613,47800,47822,47824,47857,48103,48115,48125,48301,48314,48338,48374,48570,48576,48579,48581,48838,48840,48863,48878,48888,48890,49057,49065,49088,49124,49131,49132,49144,49319,49327,49336,49338,49339,49341,49351,49356,49358,49359,49366,49370,49381,49403,49404,49572,49574,49590,49622,49631,49654,49656,50337,50637,50862,51151,51153,51154,51160,51173,51373],this.nextChar=A},n.inherits(e.exports.euc_kr,s),e.exports.gb_18030=function(){this.name=function(){return"GB18030"},this.language=function(){return"zh"},this.nextChar=function(e,t){e.index=e.nextIndex,e.error=!1;var r=0,n=0,i=0,o=0;e:if((r=e.charValue=e.nextByte(t))<0)e.done=!0;else if(!(r<=128))if(n=e.nextByte(t),e.charValue=e.charValue<<8|n,r>=129&&r<=254){if(n>=64&&n<=126||n>=80&&n<=254)break e;if(n>=48&&n<=57&&(i=e.nextByte(t))>=129&&i<=254&&(o=e.nextByte(t))>=48&&o<=57){e.charValue=e.charValue<<16|i<<8|o;break e}e.error=!0}else;return 0==e.done},this.commonChars=[41377,41378,41379,41380,41392,41393,41457,41459,41889,41900,41914,45480,45496,45502,45755,46025,46070,46323,46525,46532,46563,46767,46804,46816,47010,47016,47037,47062,47069,47284,47327,47350,47531,47561,47576,47610,47613,47821,48039,48086,48097,48122,48316,48347,48382,48588,48845,48861,49076,49094,49097,49332,49389,49611,49883,50119,50396,50410,50636,50935,51192,51371,51403,51413,51431,51663,51706,51889,51893,51911,51920,51926,51957,51965,52460,52728,52906,52932,52946,52965,53173,53186,53206,53442,53445,53456,53460,53671,53930,53938,53941,53947,53972,54211,54224,54269,54466,54490,54754,54992]},n.inherits(e.exports.gb_18030,s)},71216:(e,t,r)=>{var n=r(31669),i=r(24250);function o(e,t){this.byteIndex=0,this.ngram=0,this.ngramList=e,this.byteMap=t,this.ngramCount=0,this.hitCount=0,this.spaceChar,this.search=function(e,t){var r=0;return e[r+32]<=t&&(r+=32),e[r+16]<=t&&(r+=16),e[r+8]<=t&&(r+=8),e[r+4]<=t&&(r+=4),e[r+2]<=t&&(r+=2),e[r+1]<=t&&(r+=1),e[r]>t&&(r-=1),r<0||e[r]!=t?-1:r},this.lookup=function(e){this.ngramCount+=1,this.search(this.ngramList,e)>=0&&(this.hitCount+=1)},this.addByte=function(e){this.ngram=(this.ngram<<8)+(255&e)&16777215,this.lookup(this.ngram)},this.nextByte=function(e){return this.byteIndex>=e.fInputLen?-1:255&e.fInputBytes[this.byteIndex++]},this.parse=function(e,t){var r,n=!1;for(this.spaceChar=t;(r=this.nextByte(e))>=0;){var i=this.byteMap[r];0!=i&&(i==this.spaceChar&&n||this.addByte(i),n=i==this.spaceChar)}this.addByte(this.spaceChar);var o=this.hitCount/this.ngramCount;return o>.33?98:Math.floor(300*o)}}function s(e,t){this.fLang=e,this.fNGrams=t}function A(){}A.prototype.spaceChar=32,A.prototype.ngrams=function(){},A.prototype.byteMap=function(){},A.prototype.match=function(e){var t=this.ngrams();if(!(Array.isArray(t)&&t[0]instanceof s))return(a=new o(t,this.byteMap()).parse(e,this.spaceChar))<=0?null:new i(e,this,a);for(var r=-1,n=null,A=t.length-1;A>=0;A--){var a,c=t[A];(a=new o(c.fNGrams,this.byteMap()).parse(e,this.spaceChar))>r&&(r=a,n=c.fLang)}var u=this.name(e);return r<=0?null:new i(e,this,r,u,n)},e.exports.ISO_8859_1=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,186,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[new s("da",[2122086,2122100,2122853,2123118,2123122,2123375,2123873,2124064,2125157,2125671,2126053,2126697,2126708,2126953,2127465,6383136,6385184,6385252,6386208,6386720,6579488,6579566,6579570,6579572,6627443,6644768,6644837,6647328,6647396,6648352,6648421,6648608,6648864,6713202,6776096,6776174,6776178,6907749,6908960,6909543,7038240,7039845,7103858,7104871,7105637,7169380,7234661,7234848,7235360,7235429,7300896,7302432,7303712,7398688,7479396,7479397,7479411,7496992,7566437,7610483,7628064,7628146,7629164,7759218]),new s("de",[2122094,2122101,2122341,2122849,2122853,2122857,2123113,2123621,2123873,2124142,2125161,2126691,2126693,2127214,2127461,2127471,2127717,2128501,6448498,6514720,6514789,6514804,6578547,6579566,6579570,6580581,6627428,6627443,6646126,6646132,6647328,6648352,6648608,6776174,6841710,6845472,6906728,6907168,6909472,6909541,6911008,7104867,7105637,7217249,7217252,7217267,7234592,7234661,7234848,7235360,7235429,7238757,7479396,7496805,7497065,7562088,7566437,7610468,7628064,7628142,7628146,7695972,7695975,7759218]),new s("en",[2122016,2122094,2122341,2122607,2123375,2123873,2123877,2124142,2125153,2125670,2125938,2126437,2126689,2126708,2126952,2126959,2127720,6383972,6384672,6385184,6385252,6386464,6386720,6386789,6386793,6561889,6561908,6627425,6627443,6627444,6644768,6647412,6648352,6648608,6713202,6840692,6841632,6841714,6906912,6909472,6909543,6909806,6910752,7217249,7217268,7234592,7235360,7238688,7300640,7302688,7303712,7496992,7500576,7544929,7544948,7561577,7566368,7610484,7628146,7628897,7628901,7629167,7630624,7631648]),new s("es",[2122016,2122593,2122607,2122853,2123116,2123118,2123123,2124142,2124897,2124911,2125921,2125935,2125938,2126197,2126437,2126693,2127214,2128160,6365283,6365284,6365285,6365292,6365296,6382441,6382703,6384672,6386208,6386464,6515187,6516590,6579488,6579564,6582048,6627428,6627429,6627436,6646816,6647328,6647412,6648608,6648692,6907246,6943598,7102752,7106419,7217253,7238757,7282788,7282789,7302688,7303712,7303968,7364978,7435621,7495968,7497075,7544932,7544933,7544944,7562528,7628064,7630624,7693600,15953440]),new s("fr",[2122101,2122607,2122849,2122853,2122869,2123118,2123124,2124897,2124901,2125921,2125935,2125938,2126197,2126693,2126703,2127214,2154528,6385268,6386793,6513952,6516590,6579488,6579571,6583584,6627425,6627427,6627428,6627429,6627436,6627440,6627443,6647328,6647412,6648352,6648608,6648864,6649202,6909806,6910752,6911008,7102752,7103776,7103859,7169390,7217252,7234848,7238432,7238688,7302688,7302772,7304562,7435621,7479404,7496992,7544929,7544932,7544933,7544940,7544944,7610468,7628064,7629167,7693600,7696928]),new s("it",[2122092,2122600,2122607,2122853,2122857,2123040,2124140,2124142,2124897,2125925,2125938,2127214,6365283,6365284,6365296,6365299,6386799,6514789,6516590,6579564,6580512,6627425,6627427,6627428,6627433,6627436,6627440,6627443,6646816,6646892,6647412,6648352,6841632,6889569,6889571,6889572,6889587,6906144,6908960,6909472,6909806,7102752,7103776,7104800,7105633,7234848,7235872,7237408,7238757,7282785,7282788,7282793,7282803,7302688,7302757,7366002,7495968,7496992,7563552,7627040,7628064,7629088,7630624,8022383]),new s("nl",[2122092,2122341,2122849,2122853,2122857,2123109,2123118,2123621,2123877,2124142,2125153,2125157,2125680,2126949,2127457,2127461,2127471,2127717,2128489,6381934,6381938,6385184,6385252,6386208,6386720,6514804,6579488,6579566,6579570,6627426,6627446,6645102,6645106,6647328,6648352,6648435,6648864,6776174,6841716,6907168,6909472,6909543,6910752,7217250,7217252,7217253,7217256,7217263,7217270,7234661,7235360,7302756,7303026,7303200,7303712,7562088,7566437,7610468,7628064,7628142,7628146,7758190,7759218,7761775]),new s("no",[2122100,2122102,2122853,2123118,2123122,2123375,2123873,2124064,2125157,2125671,2126053,2126693,2126699,2126703,2126708,2126953,2127465,2155808,6385252,6386208,6386720,6579488,6579566,6579572,6627443,6644768,6647328,6647397,6648352,6648421,6648864,6648948,6713202,6776174,6908779,6908960,6909543,7038240,7039845,7103776,7105637,7169380,7169390,7217267,7234848,7235360,7235429,7237221,7300896,7302432,7303712,7398688,7479411,7496992,7565165,7566437,7610483,7628064,7628142,7628146,7629164,7631904,7631973,7759218]),new s("pt",[2122016,2122607,2122849,2122853,2122863,2123040,2123123,2125153,2125423,2125600,2125921,2125935,2125938,2126197,2126437,2126693,2127213,6365281,6365283,6365284,6365296,6382693,6382703,6384672,6386208,6386273,6386464,6516589,6516590,6578464,6579488,6582048,6582131,6627425,6627428,6647072,6647412,6648608,6648692,6906144,6906721,7169390,7238757,7238767,7282785,7282787,7282788,7282789,7282800,7303968,7364978,7435621,7495968,7497075,7544929,7544932,7544933,7544944,7566433,7628064,7630624,7693600,14905120,15197039]),new s("sv",[2122100,2122102,2122853,2123118,2123510,2123873,2124064,2124142,2124655,2125157,2125667,2126053,2126699,2126703,2126708,2126953,2127457,2127465,2155634,6382693,6385184,6385252,6386208,6386804,6514720,6579488,6579566,6579570,6579572,6644768,6647328,6648352,6648864,6747762,6776174,6909036,6909543,7037216,7105568,7169380,7217267,7233824,7234661,7235360,7235429,7235950,7299944,7302432,7302688,7398688,7479393,7479411,7495968,7564129,7565165,7610483,7627040,7628064,7628146,7629164,7631904,7758194,14971424,16151072])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1252":"ISO-8859-1"}},n.inherits(e.exports.ISO_8859_1,A),e.exports.ISO_8859_2=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,177,32,179,32,181,182,32,32,185,186,187,188,32,190,191,32,177,32,179,32,181,182,183,32,185,186,187,188,32,190,191,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,32]},this.ngrams=function(){return[new s("cs",[2122016,2122361,2122863,2124389,2125409,2125413,2125600,2125668,2125935,2125938,2126072,2126447,2126693,2126703,2126708,2126959,2127392,2127481,2128481,6365296,6513952,6514720,6627440,6627443,6627446,6647072,6647533,6844192,6844260,6910836,6972704,7042149,7103776,7104800,7233824,7268640,7269408,7269664,7282800,7300206,7301737,7304052,7304480,7304801,7368548,7368554,7369327,7403621,7562528,7565173,7566433,7566441,7566446,7628146,7630573,7630624,7676016,12477728,14773997,15296623,15540336,15540339,15559968,16278884]),new s("hu",[2122016,2122106,2122341,2123111,2123116,2123365,2123873,2123887,2124147,2124645,2124649,2124790,2124901,2125153,2125157,2125161,2125413,2126714,2126949,2156915,6365281,6365291,6365293,6365299,6384416,6385184,6388256,6447470,6448494,6645625,6646560,6646816,6646885,6647072,6647328,6648421,6648864,6648933,6648948,6781216,6844263,6909556,6910752,7020641,7075450,7169383,7170414,7217249,7233899,7234923,7234925,7238688,7300985,7544929,7567973,7567988,7568097,7596391,7610465,7631904,7659891,8021362,14773792,15299360]),new s("pl",[2122618,2122863,2124064,2124389,2124655,2125153,2125161,2125409,2125417,2125668,2125935,2125938,2126697,2127648,2127721,2127737,2128416,2128481,6365296,6365303,6385257,6514720,6519397,6519417,6582048,6584937,6627440,6627443,6627447,6627450,6645615,6646304,6647072,6647401,6778656,6906144,6907168,6907242,7037216,7039264,7039333,7170405,7233824,7235937,7235941,7282800,7305057,7305065,7368556,7369313,7369327,7369338,7502437,7502457,7563754,7564137,7566433,7825765,7955304,7957792,8021280,8022373,8026400,15955744]),new s("ro",[2122016,2122083,2122593,2122597,2122607,2122613,2122853,2122857,2124897,2125153,2125925,2125938,2126693,2126819,2127214,2144873,2158190,6365283,6365284,6386277,6386720,6386789,6386976,6513010,6516590,6518048,6546208,6579488,6627425,6627427,6627428,6627440,6627443,6644e3,6646048,6646885,6647412,6648692,6889569,6889571,6889572,6889584,6907168,6908192,6909472,7102752,7103776,7106418,7107945,7234848,7238770,7303712,7365998,7496992,7497057,7501088,7594784,7628064,7631477,7660320,7694624,7695392,12216608,15625760])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1250":"ISO-8859-2"}},n.inherits(e.exports.ISO_8859_2,A),e.exports.ISO_8859_5=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,241,242,243,244,245,246,247,248,249,250,251,252,32,254,255,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,32,241,242,243,244,245,246,247,248,249,250,251,252,32,254,255]},this.ngrams=function(){return[2150944,2151134,2151646,2152400,2152480,2153168,2153182,2153936,2153941,2154193,2154462,2154464,2154704,2154974,2154978,2155230,2156514,2158050,13688280,13689580,13884960,14015468,14015960,14016994,14017056,14164191,14210336,14211104,14216992,14407133,14407712,14413021,14536736,14538016,14538965,14538991,14540320,14540498,14557394,14557407,14557409,14602784,14602960,14603230,14604576,14605292,14605344,14606818,14671579,14672085,14672088,14672094,14733522,14734804,14803664,14803666,14803672,14806816,14865883,14868e3,14868192,14871584,15196894,15459616]},this.name=function(e){return"ISO-8859-5"},this.language=function(){return"ru"}},n.inherits(e.exports.ISO_8859_5,A),e.exports.ISO_8859_6=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32]},this.ngrams=function(){return[2148324,2148326,2148551,2152932,2154986,2155748,2156006,2156743,13050055,13091104,13093408,13095200,13100064,13100227,13100231,13100232,13100234,13100236,13100237,13100239,13100243,13100249,13100258,13100261,13100264,13100266,13100320,13100576,13100746,13115591,13181127,13181153,13181156,13181157,13181160,13246663,13574343,13617440,13705415,13748512,13836487,14229703,14279913,14805536,14950599,14993696,15001888,15002144,15016135,15058720,15059232,15066656,15081671,15147207,15189792,15255524,15263264,15278279,15343815,15343845,15343848,15386912,15388960,15394336]},this.name=function(e){return"ISO-8859-6"},this.language=function(){return"ar"}},n.inherits(e.exports.ISO_8859_6,A),e.exports.ISO_8859_7=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,161,162,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,220,32,221,222,223,32,252,32,253,254,192,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,32,243,244,245,246,247,248,249,250,251,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,32]},this.ngrams=function(){return[2154989,2154992,2155497,2155753,2156016,2156320,2157281,2157797,2158049,2158368,2158817,2158831,2158833,2159604,2159605,2159847,2159855,14672160,14754017,14754036,14805280,14806304,14807292,14807584,14936545,15067424,15069728,15147252,15199520,15200800,15278324,15327520,15330014,15331872,15393257,15393268,15525152,15540449,15540453,15540464,15589664,15725088,15725856,15790069,15790575,15793184,15868129,15868133,15868138,15868144,15868148,15983904,15984416,15987951,16048416,16048617,16050157,16050162,16050666,16052e3,16052213,16054765,16379168,16706848]},this.name=function(e){return e&&e.fC1Bytes?"windows-1253":"ISO-8859-7"},this.language=function(){return"el"}},n.inherits(e.exports.ISO_8859_7,A),e.exports.ISO_8859_8=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,32,32,32,32,32]},this.ngrams=function(){return[new s("he",[2154725,2154727,2154729,2154746,2154985,2154990,2155744,2155749,2155753,2155758,2155762,2155769,2155770,2157792,2157796,2158304,2159340,2161132,14744096,14950624,14950625,14950628,14950636,14950638,14950649,15001056,15065120,15068448,15068960,15071264,15071776,15278308,15328288,15328762,15329773,15330592,15331104,15333408,15333920,15474912,15474916,15523872,15524896,15540448,15540449,15540452,15540460,15540462,15540473,15655968,15671524,15787040,15788320,15788525,15920160,16261348,16312813,16378912,16392416,16392417,16392420,16392428,16392430,16392441]),new s("he",[2154725,2154732,2155753,2155756,2155758,2155760,2157040,2157810,2157817,2158053,2158057,2158565,2158569,2160869,2160873,2161376,2161381,2161385,14688484,14688492,14688493,14688506,14738464,14738916,14740512,14741024,14754020,14754029,14754042,14950628,14950633,14950636,14950637,14950639,14950648,14950650,15002656,15065120,15066144,15196192,15327264,15327520,15328288,15474916,15474925,15474938,15528480,15530272,15591913,15591920,15591928,15605988,15605997,15606010,15655200,15655968,15918112,16326884,16326893,16326906,16376864,16441376,16442400,16442857])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1255":"ISO-8859-8"},this.language=function(){return"he"}},n.inherits(e.exports.ISO_8859_8,A),e.exports.ISO_8859_9=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,186,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,105,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[2122337,2122345,2122357,2122849,2122853,2123621,2123873,2124140,2124641,2124655,2125153,2125676,2126689,2126945,2127461,2128225,6365282,6384416,6384737,6384993,6385184,6385405,6386208,6386273,6386429,6386685,6388065,6449522,6578464,6579488,6580512,6627426,6627435,6644841,6647328,6648352,6648425,6648681,6909029,6909472,6909545,6910496,7102830,7102834,7103776,7103858,7217249,7217250,7217259,7234657,7234661,7234848,7235872,7235950,7273760,7498094,7535982,7759136,7954720,7958386,16608800,16608868,16609021,16642301]},this.name=function(e){return e&&e.fC1Bytes?"windows-1254":"ISO-8859-9"},this.language=function(){return"tr"}},n.inherits(e.exports.ISO_8859_9,A),e.exports.windows_1251=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,144,131,32,131,32,32,32,32,32,32,154,32,156,157,158,159,144,32,32,32,32,32,32,32,32,32,154,32,156,157,158,159,32,162,162,188,32,180,32,32,184,32,186,32,32,32,32,191,32,32,179,179,180,181,32,32,184,32,186,32,188,190,190,191,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[2155040,2155246,2155758,2156512,2156576,2157280,2157294,2158048,2158053,2158305,2158574,2158576,2158816,2159086,2159090,2159342,2160626,2162162,14740968,14742268,14937632,15068156,15068648,15069682,15069728,15212783,15263008,15263776,15269664,15459821,15460384,15465709,15589408,15590688,15591653,15591679,15592992,15593186,15605986,15605999,15606001,15655456,15655648,15655918,15657248,15657980,15658016,15659506,15724267,15724773,15724776,15724782,15786210,15787492,15856352,15856354,15856360,15859488,15918571,15920672,15920880,15924256,16249582,16512288]},this.name=function(e){return"windows-1251"},this.language=function(){return"ru"}},n.inherits(e.exports.windows_1251,A),e.exports.windows_1256=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,129,32,131,32,32,32,32,136,32,138,32,156,141,142,143,144,32,32,32,32,32,32,32,152,32,154,32,156,32,32,159,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,32,32,32,32,32,32,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,32,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,32,32,32,32,244,32,32,32,32,249,32,251,252,32,32,255]},this.ngrams=function(){return[2148321,2148324,2148551,2153185,2153965,2154977,2155492,2156231,13050055,13091104,13093408,13095200,13099296,13099459,13099463,13099464,13099466,13099468,13099469,13099471,13099475,13099482,13099486,13099491,13099494,13099501,13099808,13100064,13100234,13115591,13181127,13181149,13181153,13181155,13181158,13246663,13574343,13617440,13705415,13748512,13836487,14295239,14344684,14544160,14753991,14797088,14806048,14806304,14885063,14927648,14928160,14935072,14950599,15016135,15058720,15124449,15131680,15474887,15540423,15540451,15540454,15583520,15585568,15590432]},this.name=function(e){return"windows-1256"},this.language=function(){return"ar"}},n.inherits(e.exports.windows_1256,A),e.exports.KOI8_R=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,163,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,163,32,32,32,32,32,32,32,32,32,32,32,32,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223]},this.ngrams=function(){return[2147535,2148640,2149313,2149327,2150081,2150085,2150338,2150607,2150610,2151105,2151375,2151380,2151631,2152224,2152399,2153153,2153684,2154196,12701385,12702936,12963032,12963529,12964820,12964896,13094688,13181136,13223200,13224224,13226272,13419982,13420832,13424846,13549856,13550880,13552069,13552081,13553440,13553623,13574352,13574355,13574359,13617103,13617696,13618392,13618464,13620180,13621024,13621185,13684684,13685445,13685449,13685455,13812183,13813188,13881632,13882561,13882569,13882583,13944268,13946656,13946834,13948960,14272544,14603471]},this.name=function(e){return"KOI8-R"},this.language=function(){return"ru"}},n.inherits(e.exports.KOI8_R,A)},48794:(e,t,r)=>{"use strict";var n=r(31669),i=r(24250);function o(){}e.exports.UTF_16BE=function(){this.name=function(){return"UTF-16BE"},this.match=function(e){var t=e.fRawInput;return t.length>=2&&254==(255&t[0])&&255==(255&t[1])?new i(e,this,100):null}},e.exports.UTF_16LE=function(){this.name=function(){return"UTF-16LE"},this.match=function(e){var t=e.fRawInput;return t.length>=2&&255==(255&t[0])&&254==(255&t[1])?t.length>=4&&0==t[2]&&0==t[3]?null:new i(e,this,100):null}},o.prototype.match=function(e){var t=e.fRawInput,r=e.fRawLength/4*4,n=0,o=0,s=!1,A=0;if(0==r)return null;65279==this.getChar(t,0)&&(s=!0);for(var a=0;a=1114111||c>=55296&&c<=57343?o+=1:n+=1}return s&&0==o?A=100:s&&n>10*o?A=80:n>3&&0==o?A=100:n>0&&0==o?A=80:n>10*o&&(A=25),0==A?null:new i(e,this,A)},e.exports.UTF_32BE=function(){this.name=function(){return"UTF-32BE"},this.getChar=function(e,t){return(255&e[t+0])<<24|(255&e[t+1])<<16|(255&e[t+2])<<8|255&e[t+3]}},n.inherits(e.exports.UTF_32BE,o),e.exports.UTF_32LE=function(){this.name=function(){return"UTF-32LE"},this.getChar=function(e,t){return(255&e[t+3])<<24|(255&e[t+2])<<16|(255&e[t+1])<<8|255&e[t+0]}},n.inherits(e.exports.UTF_32LE,o)},76023:(e,t,r)=>{var n=r(24250);e.exports=function(){this.name=function(){return"UTF-8"},this.match=function(e){var t,r=!1,i=0,o=0,s=e.fRawInput,A=0;e.fRawLength>=3&&239==(255&s[0])&&187==(255&s[1])&&191==(255&s[2])&&(r=!0);for(var a=0;a5)break;A=0}for(;!(++a>=e.fRawLength);){if(128!=(192&s[a])){o++;break}if(0==--A){i++;break}}}}if(t=0,r&&0==o)t=100;else if(r&&i>10*o)t=80;else if(i>3&&0==o)t=100;else if(i>0&&0==o)t=80;else if(0==i&&0==o)t=10;else{if(!(i>10*o))return null;t=25}return new n(e,this,t)}}},80848:function(e,t,r){var n=r(35747),i=r(76023),o=r(48794),s=r(9044),A=r(71216),a=r(31059),c=this,u=[new i,new o.UTF_16BE,new o.UTF_16LE,new o.UTF_32BE,new o.UTF_32LE,new s.sjis,new s.big5,new s.euc_jp,new s.euc_kr,new s.gb_18030,new a.ISO_2022_JP,new a.ISO_2022_KR,new a.ISO_2022_CN,new A.ISO_8859_1,new A.ISO_8859_2,new A.ISO_8859_5,new A.ISO_8859_6,new A.ISO_8859_7,new A.ISO_8859_8,new A.ISO_8859_9,new A.windows_1251,new A.windows_1256,new A.KOI8_R];e.exports.detect=function(e,t){for(var r=[],n=0;n<256;n++)r[n]=0;for(n=e.length-1;n>=0;n--)r[255&e[n]]++;var i=!1;for(n=128;n<=159;n+=1)if(0!=r[n]){i=!0;break}var o={fByteStats:r,fC1Bytes:i,fRawInput:e,fRawLength:e.length,fInputBytes:e,fInputLen:e.length},s=u.map((function(e){return e.match(o)})).filter((function(e){return!!e})).sort((function(e,t){return t.confidence-e.confidence}));return t&&!0===t.returnAllMatches?s:s.length>0?s[0].name:null},e.exports.detectFile=function(e,t,r){var i;"function"==typeof t&&(r=t,t=void 0);var o=function(e,o){if(i&&n.closeSync(i),e)return r(e,null);r(null,c.detect(o,t))};if(t&&t.sampleSize)return i=n.openSync(e,"r"),sample=Buffer.allocUnsafe(t.sampleSize),void n.read(i,sample,0,t.sampleSize,null,(function(e){o(e,sample)}));n.readFile(e,o)},e.exports.detectFileSync=function(e,t){if(t&&t.sampleSize){var r=n.openSync(e,"r"),i=Buffer.allocUnsafe(t.sampleSize);return n.readSync(r,i,0,t.sampleSize),n.closeSync(r),c.detect(i,t)}return c.detect(n.readFileSync(e),t)},e.exports.detectAll=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,c.detect(e,t)},e.exports.detectFileAll=function(e,t,r){"function"==typeof t&&(r=t,t=void 0),"object"!=typeof t&&(t={}),t.returnAllMatches=!0,c.detectFile(e,t,r)},e.exports.detectFileAllSync=function(e,t){return"object"!=typeof t&&(t={}),t.returnAllMatches=!0,c.detectFileSync(e,t)}},24250:e=>{e.exports=function(e,t,r,n,i){this.confidence=r,this.name=n||t.name(e),this.lang=i}},82758:(e,t,r)=>{"use strict";const n=r(35747),i=r(85622),o=n.lchown?"lchown":"chown",s=n.lchownSync?"lchownSync":"chownSync",A=process.version;let a=(e,t,r)=>n.readdir(e,t,r);/^v4\./.test(A)&&(a=(e,t,r)=>n.readdir(e,r));const c=(e,t,r,s,A)=>{if("string"==typeof t)return n.lstat(i.resolve(e,t),(n,i)=>{if(n)return A(n);i.name=t,c(e,i,r,s,A)});t.isDirectory()?u(i.resolve(e,t.name),r,s,a=>{if(a)return A(a);n[o](i.resolve(e,t.name),r,s,A)}):n[o](i.resolve(e,t.name),r,s,A)},u=(e,t,r,i)=>{a(e,{withFileTypes:!0},(s,A)=>{if(s&&"ENOTDIR"!==s.code&&"ENOTSUP"!==s.code)return i(s);if(s||!A.length)return n[o](e,t,r,i);let a=A.length,u=null;const l=s=>{if(!u)return s?i(u=s):0==--a?n[o](e,t,r,i):void 0};A.forEach(n=>c(e,n,t,r,l))})},l=(e,t,r)=>{let o;try{o=((e,t)=>n.readdirSync(e,t))(e,{withFileTypes:!0})}catch(i){if(i&&"ENOTDIR"===i.code&&"ENOTSUP"!==i.code)return n[s](e,t,r);throw i}return o.length&&o.forEach(o=>((e,t,r,o)=>{if("string"==typeof t){const r=n.lstatSync(i.resolve(e,t));r.name=t,t=r}t.isDirectory()&&l(i.resolve(e,t.name),r,o),n[s](i.resolve(e,t.name),r,o)})(e,o,t,r)),n[s](e,t,r)};e.exports=u,u.sync=l},5864:(e,t,r)=>{"use strict";var n=r(85832),i=process.env;function o(e){return"string"==typeof e?!!i[e]:Object.keys(e).every((function(t){return i[t]===e[t]}))}Object.defineProperty(t,"_vendors",{value:n.map((function(e){return e.constant}))}),t.name=null,t.isPR=null,n.forEach((function(e){var r=(Array.isArray(e.env)?e.env:[e.env]).every((function(e){return o(e)}));if(t[e.constant]=r,r)switch(t.name=e.name,typeof e.pr){case"string":t.isPR=!!i[e.pr];break;case"object":"env"in e.pr?t.isPR=e.pr.env in i&&i[e.pr.env]!==e.pr.ne:"any"in e.pr?t.isPR=e.pr.any.some((function(e){return!!i[e]})):t.isPR=o(e.pr);break;default:t.isPR=null}})),t.isCI=!!(i.CI||i.CONTINUOUS_INTEGRATION||i.BUILD_NUMBER||i.RUN_ID||t.name)},85832:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY_BUILD_BASE","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')},61696:(e,t,r)=>{"use strict";const n=r(3390);let i=!1;t.show=(e=process.stderr)=>{e.isTTY&&(i=!1,e.write("[?25h"))},t.hide=(e=process.stderr)=>{e.isTTY&&(n(),i=!0,e.write("[?25l"))},t.toggle=(e,r)=>{void 0!==e&&(i=e),i?t.show(r):t.hide(r)}},17945:(e,t,r)=>{"use strict";e.exports=function(e){var t=function(e){var t={defaultWidth:0,output:process.stdout,tty:r(33867)};return e?(Object.keys(t).forEach((function(r){e[r]||(e[r]=t[r])})),e):t}(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){var n=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(n)&&0!==n)return n}return t.defaultWidth}},17278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){this.help=!1}static getMeta(e){const t=e.constructor;return t.meta=Object.prototype.hasOwnProperty.call(t,"meta")?t.meta:{definitions:[],transformers:[(e,t)=>{for(const{name:r,value:n}of e.options)"-h"!==r&&"--help"!==r||(t.help=n)}]}}static resolveMeta(e){const t=[],n=[];for(let i=e;i instanceof r;i=i.__proto__){const e=this.getMeta(i);for(const r of e.definitions)t.push(r);for(const t of e.transformers)n.push(t)}return{definitions:t,transformers:n}}static registerDefinition(e,t){this.getMeta(e).definitions.push(t)}static registerTransformer(e,t){this.getMeta(e).transformers.push(t)}static addPath(...e){this.Path(...e)(this.prototype,"execute")}static addOption(e,t){t(this.prototype,e)}static Path(...e){return(t,r)=>{this.registerDefinition(t,t=>{t.addPath(e)})}}static Boolean(e,{hidden:t=!1}={}){return(r,n)=>{const i=e.split(",");this.registerDefinition(r,e=>{e.addOption({names:i,arity:0,hidden:t,allowBinding:!1})}),this.registerTransformer(r,(e,t)=>{for(const{name:r,value:o}of e.options)i.includes(r)&&(t[n]=o)})}}static String(e={required:!0},{tolerateBoolean:t=!1,hidden:r=!1}={}){return(n,i)=>{if("string"==typeof e){const o=e.split(",");this.registerDefinition(n,e=>{e.addOption({names:o,arity:t?0:1,hidden:r})}),this.registerTransformer(n,(e,t)=>{for(const{name:r,value:n}of e.options)o.includes(r)&&(t[i]=n)})}else this.registerDefinition(n,t=>{t.addPositional({name:i,required:e.required})}),this.registerTransformer(n,(e,t)=>{e.positionals.length>0&&(t[i]=e.positionals.shift().value)})}}static Array(e,{hidden:t=!1}={}){return(r,n)=>{const i=e.split(",");this.registerDefinition(r,e=>{e.addOption({names:i,arity:1,hidden:t})}),this.registerTransformer(r,(e,t)=>{for(const{name:r,value:o}of e.options)i.includes(r)&&(t[n]=t[n]||[],t[n].push(o))})}}static Rest({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addRest({name:r,required:e})}),this.registerTransformer(t,(e,t)=>{t[r]=e.positionals.map(({value:e})=>e)})}}static Proxy({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addProxy({required:e})}),this.registerTransformer(t,(e,t)=>{t[r]=e.positionals.map(({value:e})=>e)})}}static Usage(e){return e}static Schema(e){return e}async validateAndExecute(){const e=this.constructor.schema;if(void 0!==e)try{await e.validate(this)}catch(e){throw"ValidationError"===e.name&&(e.clipanion={type:"usage"}),e}const t=await this.execute();return void 0!==t?t:0}} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. diff --git a/yarn.lock b/yarn.lock index ff8bd296cb43..9a626e75e49c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8985,7 +8985,7 @@ fsevents@^1.2.7: "fsevents@patch:fsevents@^1.2.7#builtin": version: 1.2.12 - resolution: "fsevents@patch:fsevents@npm%3A1.2.12#builtin::version=1.2.12&hash=495457" + resolution: "fsevents@patch:fsevents@npm%3A1.2.12#builtin::version=1.2.12&hash=a7b829" dependencies: bindings: ^1.5.0 nan: ^2.12.1 @@ -8997,7 +8997,7 @@ fsevents@^1.2.7: "fsevents@patch:fsevents@^2.1.2#builtin, fsevents@patch:fsevents@~2.1.2#builtin": version: 2.1.3 - resolution: "fsevents@patch:fsevents@npm%3A2.1.3#builtin::version=2.1.3&hash=495457" + resolution: "fsevents@patch:fsevents@npm%3A2.1.3#builtin::version=2.1.3&hash=a7b829" dependencies: node-gyp: latest checksum: 0005677b72f38a129a3cbe8c3794bdc83081a2bec53dfc03b085c2e5e4ca7a33a861a779d623313652df89746d97f79d24e4fef3b101c11c39ce1ea8a9690e18 @@ -16398,7 +16398,7 @@ fsevents@^1.2.7: "resolve@patch:resolve@^1.1.6#builtin, resolve@patch:resolve@^1.10.0#builtin, resolve@patch:resolve@^1.12.0#builtin, resolve@patch:resolve@^1.13.1#builtin, resolve@patch:resolve@^1.15.0#builtin, resolve@patch:resolve@^1.15.1#builtin, resolve@patch:resolve@^1.17.0#builtin, resolve@patch:resolve@^1.3.2#builtin, resolve@patch:resolve@^1.5.0#builtin, resolve@patch:resolve@^1.8.1#builtin": version: 1.17.0 - resolution: "resolve@patch:resolve@npm%3A1.17.0#builtin::version=1.17.0&hash=3388aa" + resolution: "resolve@patch:resolve@npm%3A1.17.0#builtin::version=1.17.0&hash=bdb249" dependencies: path-parse: ^1.0.6 checksum: 4bcfb568860d0c361fd16c26b6fce429711138ff0de7dd353bdd73fcb5c7eede2f4602d40ccfa08ff45ec7ef9830845eab2021a46036af0a6e5b58bab1ff6399 @@ -18530,7 +18530,7 @@ fsevents@^1.2.7: "typescript@patch:typescript@*#builtin, typescript@patch:typescript@^3.9.2#builtin": version: 3.9.2 - resolution: "typescript@patch:typescript@npm%3A3.9.2#builtin::version=3.9.2&hash=64df9d" + resolution: "typescript@patch:typescript@npm%3A3.9.2#builtin::version=3.9.2&hash=6b7dba" bin: tsc: bin/tsc tsserver: bin/tsserver