You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/usr/bin/env node
module.exports=(()=>{var e={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},44692:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143);const n={optional:!0},o=[["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":n}}],["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":n,"postcss-jsx":n,"postcss-less":n,"postcss-markdown":n,"postcss-scss":n}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:n}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@*",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@*",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4"},peerDependenciesMeta:{eslint:n}}],["rc-animate@*",{peerDependencies:{react:"^15.0.0 || ^16.0.0","react-dom":"^15.0.0 || ^16.0.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:n,"utf-8-validate":n}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}]];let i,s,a;const c=new Map([[A.makeIdent(null,"fsevents").identHash,function(){return void 0===i&&(i=r(78761).brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),i}],[A.makeIdent(null,"resolve").identHash,function(){return void 0===s&&(s=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()),s}],[A.makeIdent(null,"typescript").identHash,function(){return void 0===a&&(a=r(78761).brotliDecompressSync(Buffer.from("W1w+GkWwcQCPbZnUKPI4CFN/7EyEjZic7gS0LuAO0yfO0XnBUqmjRfsndcrEHKBP46+kNRcXE9T69UCzOMQD2EWA28SPiEUXz6UxaKl+dNhtngmN0KaY5gpIi1/+TP/v5+ul7zo6uRXScKu4Va6wcMpgwWjlQmZyLR397/MiXMMwmQ2WvoleaS23WLFmcLXTID0zCnXDyL3LdHSWRzWaZNoLpQ9ftzCssvn5UUSQrkz2sjzf3FK1NFu+8MED3YPNhfn/v5/12R4CVF9IQuGG7fgP2feee7pDDUmqVieV+oB0zrn3vaTyUtWAVR8A1BCrGaPH2BFy2OkUfQTXowAdqflCqJlUTVednHQBLhT0zgNplLM1/LC3YUtdVskGoP/n5IyllimTGsG0NiyeBsnDvH4hH244pgDEQlJuVFqDssvZiI4GfTjk18cws931bs/fNgZQUYmiSRwdZE7xvHTIs32JGu2uwAFKZKNm70VPRJNCpGAyptX+XMo0EYIMW+yfv/zpskSSzFwETa/caJp1bP8q7M9KD+vPBeP7ltn/S/T63wuZer7nGibzgC/N86sEdD34FbrYIfv5F55+7bVf/STBcAM9rTWWnzIYiKTay4uuRz9aDz1HiI/TeSXrj01C7+4FeNlKohYUwh1qXjemQMsA7KWH4IRDSrz8UaMQ5e6niK87ZFzvWB+6cn6IpWkrDPYI+LccLeGDX/DjRmmXLSGqSbu/WWcMAapgUUR9G3oqqY9mKz+GXe1HPlxFqBRbdhzQbxghtNtlE5TL2qkf5+arA/5VdO5ZrOH+kWjf6tx/bbXyNntYEVEl+ucEeht+7F++iVCO3lpE64CAVx7+6FNBcAO3m1AB0mTOMwIUDj1x5S+ma30rDtHMWY+KOF6d3arYY4j+tx008aAsS5fNfP1+ykdDDgYoJD9pHr+K2Wh5m1MFc/Vap0k8uXi1iivbu2CuV+oLD00s3gdd7XTaHBIYzGLjy5SjHbYO6IkbTFtHzlwfqdIsdb8CjpaChourHi63UT1gaCFBIvQr/kKbKcUX4sdOFDKI8N/kaaISAVtiu356imQHboaw4apcePacaTwFAXdejxkgicEn0wRpVzhZd1W/sUByw4X7rqPMIVlhS+3o+8I9djctba2396mLfpdNnSzoN2QyZ2A9PzEPmLs+x3EUNH4EPic+KYDtCNNEYKJMwupjr9W6GNPhTs877JpSFYGxiAzFfKZINCng6GQoGbMHX3gxgznmtgDV+apTCz9MzBpe7pUioV6Ckv4bpmXPikXOg2pfxpNn+RhLxQwsU0Y0ILkRGUFsbWdIc3MPVC9Kyp+aRSH7ufRUV5irDZgCzr4oF+ZQpAwLv3hrwX+/c/cqxIsw6oUQcXFCySTK+ZACOwcZm4FwOcoRDlGTdERvi5xePFkjoBz0OrUmoCAB7eRjBm93fmb4Fi/jmDrfAFXG2ryCdGVfkJzOap1qqXsmQgAFjf3UMIyX60yCl5nrZ4RA6PYYoDKP/gabiPKtkHDEzEO2N389febkiCRZPiTlI7Z5fXzo/E+8tKZXrtDRd+fozGKAfMg8l9FbZhHMX+w/2rlggkIouL4LpXxB1PzweCqhj5rdeIremOt1ZKHAU8+547LJnpRQG02p8tMmMeGSuOvsqP6O1KVyB6SWvcw5rFKW87N42c2myjca3Vjt2LMkPrbz9FfYmJJLlI18upFczbc51+dTdxUx0cpNkFIMiBjru9+tXzGHQ+HMT7nsNVfkJjW/asI0WVmvLJzcuDluyz8h+8UGZTQXExSCw9O9kD3lZk+1eXswBd0jthuq+4hm3vQtqQIMtbejHjQCISfPOGFyjjlaEo41utZWunTOz3N1DRK7ho8np0bv4fCTIAOy9+JiaumSo8+7H0Cg4CIICjqp15L84qMQ477qLQeW5Zed2Xn+9DKSxHFYu4UQ1rnFbCIX12+1NScfCujiTVYtcppJAPj2DB27ctiNSLf1bRSbEHmzLwqM7HW7Kn9vzUf+hTRQ6iQ2y3RGUnoanyvESLRxOVNTWrcCY9dXv1/bq+GkwMXbo5PGVYnb9Q/sOq+tpVsOvJnt2nBnq4LIHT6EBYTZXoUHez41cJszqbPoyz4pJMX8nhKFI5dbWls7fpPbVaIrqhkgvkkvuK3oqTbQkKv6RXiUULEgyC6NHvFlAgL0EdVIbMQG+1byGiYRtq31I5U77Cpc7VonG7oPgiYbfuXCAZXXVrmk85BCObe1DRj3obm9xwDY69ZKCemnOlGBkB6+LbAIoGBk34KATc8ktyyoxmtdCjnJ7Uhgihw+QWZzRJwQBSY7Z0R8HeEQ/pUvl6RzCrMFI0lmjTh7pK2cvW4G6APAhAoHu8TlVeL1DJOBqW66oRjtC5VEoig3xg7ybQmx9h3fSCQaefhZbunZbf1DS/YZFSuHZlh+aMb8x5C5uUcv8YLJpUlnNB79aJPt771o4XlpExDHD04Rsfgk/SUwiL5rllcbL9XpCrHVOBZhNNfXqMlDOJjL9sbALIiYV02uk14sOY/JoPnJx8sxIIY+iFouatS7AU//Cw17qSa2uWodwFjeY1/Ouw2iv29QLUKWg77BKwnwPHPf45VFu9dPABATrZ2P/YEYy33tjHJfD6u90W/bqk3fX67VYKbktMpAGbZ6VdPuu4lUg/63irWRiCMtozcM3sCql/Vxdf/mjGFVpYgmoXp4LacW0hWoYnW4sBOVw/FbgOLMCvl4Thg9D21xyqGHeHgQ2H0YPnZTi+7u1P0Lx3nCKpyVVZtEkJs7Mpri/iRBd18aEFdTbzQF37AgVmn9PNUUNNblFpPzuTnvfRrqz9mF1OV9Eu/Ncj7DlxeIc69Q/r53Wdfn5rwffHYx/HsU9ZMIFbra7eRKVJ4zPP8v2ESdKxoFDoYPwNt++y4sU9TJCmvc61y8ecV7Bil1/BWMH2hsRJDvsPXnVtVkKwb6fg20IT9+DLzTx/y3SJrsLIlt/LONXfOiOMjG9riLVagboHG8mPzmewlQWLFvL6NciWO+hcP2lyr+gXx8c70MGCBwKmelr67I0cUzYBlnu2J90JEhPDtT0E57XgAxYO0fVdJSS/MtxQONPfnPBMNY424/sGnpB12aa/FdB3E+7XdOTvtHn61T0MwHh0GtgdgGg18//zwFDcQ9Y6rFZnuyndmycJnWnEz9D7lV2V7IjcvT6GSgxx9E4VjoowXhIEAQtDGPdhA0NcPQhQsAhJnxrsiFLmyBhdW+i5cCJ60RAFiJKq3ePwMDl3ng+8BgpoXv2c3QozfwvNiPvuC3A295+FxgK0PEiQsAIIAZW1gNaNvtNKDX9QgA8AgSmo2yl4P5wGamA6hHL+DYgRemwp8KnjGO3RzcowQrAGznF3/586f/XkYv2IN55GxgOdNm+uBCxtHal2+dmeFPCMboO4IBbRcuAGDT9F1R2GnAyGqf4N2Ji7RGACAaL8IxfVUod2J3/D1eh1/Ulq++EBXu3el1SgYAQJshkP+f67/+7Pz/Y3Rj3KKrny0TjGpV2VFcMKiaXw8G0B5S8pOcbh/N5gvu8IQvrK3tdeotAEDDjLJ4IrIxlir5hDRvTpOsEHZdquzuDth7/rlMAMBCQdNCjD9U08CcebX5TOUISzQxw6LTFgAoctVpw+KqS7RHNeZcqbRLAKBFleRw5DMVOO2/2l6HNoLCYqbXKWwBADsZbWwLYwG21l6bmDKAN60RAChFEdGYhvcCel+cBttJND32cnSl8ioA7Ga50Yxr9No07X0tHwX9N4GPbETVbzNfTZUtALA4Ntxow+AqJ9uPyopxldWNAIDGimRM4+ERcf463QkjY5fMa2K+KsaoSa9TMgAA2pUeqHGzZ4qfreJJbCUzttt3ANkM+xz0Nn4I6yvTOxeLcn9g9IQf2OXudeotAEAxy3kaN9tbDEYNT1ob0Nhq1+FdLxepmQBARO8gIuBv0vaTCeqJtxztcRrDsgsXACjTdLsgbBSetbxo7SfvejkplwDAaemzDxdf44S/VM/f1/5yFBesdeECALV4bvGiCUeeRY7WbnnX5KRsAgAWbQmbrngnXi01Kb39aXSXEqwAcJ3laonKN6Hx3plriPuM0J+oz9LYK5V4pMYFAFbMvlLWcIerqLmbq5jWCACY0PqYQkV37mmlpNS9KjFXIz4uCdxPqgTTUXqcYZu8waKpOxLI6JuC/V5ksD0JpWyHgyT1poEBU9LhF8KTrthVERadLLToCjoSr958kVOhYyzBcDVw5Ndnl0fn5/E7Uu1lV2uJv/V6oe8Tr7qIGZ/FXyhwbF0IGcm+PWuvDt43oObzo4dN3gbiB9M4AOe3H/NxCh7619L5VVqzxfL2JmJ5fXXv4zJ3IY0ErqSfJ7PtGEktqiboa5y/Q52IEn0P8mYMFxAe3t4u3ax2+SY5p5obSRj3F+6kvjC9qstmdnG7T+TjF7+r5nWaYxkFSAEDL3fLK/8bzW6MQwOFhyLVtdnHxsg+EIYpRuoyY6edsN2djKfaEzMckzlI95n3WEGyGlfHyFw4JOw9rTtLtN+bxrAGyEVDdGnVWK8YSwreubXAB1qsoatSBnTTKcv456EvBhSCO17tehk/PyuIBT4gaucnrjhnAPp7DuQisGahq4p0/CRE/HG1qLo0Q7iA0XvTHate9Dh29ogluynBd/gx5I7DbX3w4L2QsEMuP+XCF6UNYcnOuVsGRukgCilp3TSNNF4kUQURoktlSM6Dj9DSUGOUWiwwpKGyzHE//CxgDPBxPyUCGZrxW4ZlkdRgBUIWbF9mG00rsSUy1obI/qbMIZGfjC9yukfd9UhoYUpvDaHjO7hG44Udz7OeR/Zrp5E8nwR3/1mnSuXjfgHEl4mcT17VGU0cOniN9XdALACmBu18UycBEU5/pPKjLXL8Q0E6pTHlrFbyiFBtlJgNfKzYJzHay9Kc+s2DGBwIvDCqj8cn5nS8lm1cXyBfd3l18QmRuiyQWmQPMjmfJRBeP9rxQv8T6fhQUanWZstFi3aNN3DO+9TBG6bDVxnspz4XBtWiwsbVN6cwY0K9j4kJbMPLcTQMP1xKAgAb9mZcea1MX1oXNVeNS882t2HwumNLuGhFk375yWps2MeYtH3cXRYuWv21UwDEy3Jjr+sURkgo45Os3/LkY77VdRKARZNJS1UOZlJH1uwIMIM7bNKYPM9JOMaFgmZh1nSG8aZRChKaLItYBTyOWP8iMV0NWwf1Z7ZMxoZMphQGQkIO6Fp0Xe7ye5npMRFVjzaN5ETLVKiKQzHBu3ocLSODGbF6kZHa7SO+jsz7aO3+EV/zf4/VlfCSRx7ICP5hxjqU7DgTq1gktzOL777yk/gmO5RjY62fRfif39YGBi2J1YKBiTkT14Mh6Ncog6LCearFt3pYpJMTu2QXxjvdtlVY8J4HxBG2V1f2QOKHq5OFB7xo2WT34wIQ0esyQTjlkE/HgAypV1iiWWLHxW/iiB3m6+y+IS3LoAZ+mOEa2qatUK+ZFFyxJj0Wk1E2ZTr16UcSEvwn+rjUyN0k48p8Xm/0iPXaCbDSJTZuDcWySeTCid67IarLslDs7ZpwAC6hcs8eFiZe+um1sdkTCpNjdHG3N1f23j4UwxkLWmaTLbLxSTGDnktFEdfkVKrzmol49ZZRVnafOxvtjROKpRG3N1N2Cnjahr6K09GoGG8UzjazD6J3ZJS7JHKls5Wuex1VarJDBWNdiV8Jelgy9BIChq3EbTUCjo6UBRzCO7Dn86RqagkXvhYr1sMyo0wb/byZo8QspZN/ZOft1AjjBv90LL0vKNKpidcs+MzVW39s44JVOZ6yV4iPPVimkIuasd+2lBNGNXu/RACmVL64PGoiuNbUZjVaz2R1xq4zoVEy9Jiq7kyHJ+g+JVP3mkUMdaVpAIYVYKDGZ5TMAID6i4ZGFz71SWuX+pWiCQBIQDHlDsCTJXDgJvJc0rcnbiSTkib1IrmQjbqDrcdknqx7tSO6zTQqhrUCRNzMAMCQvqJI0o6D1r7B5OuXQxMAWH0DZ1N+BUBnCvSx38rs8wLvsp6KRFOoW92ZnCF68OpeuygxFQCzmsgKEa47efretdO61yaBOU2j1rDWAm0nMwDgY6Co5ZLCCmS1s9QnhyYAkBLYMeUawDobQEJWbFmWkvaP2a93BezvXbyp5e7g/7U4LIj7cYjwxOHKaQYAHIRZnnyCXXlnjs8FSLudBPNOc/MZED4dsVaP5cXApLp9EGJw2OvAmIBdscLuuemG2cHCyKyx7Bml78kupF8cDgybmXnIHz0cVVRUjK803dX5Qab7hSkmaMmHycio6VxwM4+I5V2nzLNXMi0r0EAliMp584sZIc1b8hU7xR8Z5qMzAZGlBdy/OvvIhJWYF1P9mDSjL7LsmKaBIBWXs1+1n1CDTmvK8DKnx4KmYSIVJBK3pMLgUPn/ngu4ZW+Y4jBBKYUSvZ0qe5CDUHn06sFL8eqdg92tKUkezfWR+WzUPH7wZSbPmcCWIsOwqjOiWR43yt6uFtUsq6HBLMXzruosfbKTmCCT5jiW6em5ojGzigzj0oFo9x/sEb00a1t7+t9DeBZ1x5lPQEnvWNfMCgnzM42+1LxOp6+yONAw7UUF7rycap14bp13FpBEoolDn+3wHW09u3jUYHjEQW8ac8ucd8F91GHZRkBlXxDWRJey0sKrL4+ITdBdNYMUXts+Doyeh8gjxYWJ70HIMAgthBhd4xga0pScg+PBlG+zeGSHNTv25Jqym85XIsVBOmSQ46+2Fp+Fu2vIZ8v2JVsaiGQOguhiLD2gfXqasd/I4Qd94PCE8rTg61hVOCyIR2nMAICFs6WCcJZBL15MzlX2qYKvTX+Kx7/LBACmFsuLXTzzB8wXcXfxEr7A8QJmGtEC6LF62dN8hmNO7hjesDCeHePYrMNzr6u7wVU7IRjU6S44B9TP8r4zJ0vbx4iy7VjcGgfccHKY7U31SwutCUfun0NboOw/mgDxuaG+f9W+Hrn1Kv2kNEnthUWP+6SbG1/YjQ5U2X3v+vPZ1HWvT8BhCxUICv93H0bp0SbhVbQPR9A59CMjYSnHzMYvCH/tOEEo4Ggr7Vcx+rHXmmn72aUpi52FNlpSC6TJ0Si+2H2pnh8vepfOrKdGYG0lFgkWWfPD1sl+VHSfNb7fOkWDC6vIXPFzuFvw7ZihgY/FlVuMG30lC5+d2dKZ/Zd7z+c9k10vqUNscuBoxaO1VLfeCbIvOL9+RWpHhzU7G46TgHv5C6aAiCIqK8snWuHnTH/e5Olj1ZcAniIilXcFw3rlNwLuupkBgF2AVhNWopRenOqR3d4GaFyaAIAMzJbdbxGYm40SAGwXLbNKJs8AeVHSlGpkRJePDkDheS3TB9dfK+n2FhFeyioHwEeExFBq0mP+Vuzk5B/I+G/cZ0R0Uk85AD4k5MYNlw71J4f3Jh8Pbyfi+o+IWIfEFvfj1XhGoEnPZAYAJgIxqwlPqSgygGW3NwEehyYA0GTB2az7O/ZDbpMAgEZWNKvpPcz3yNR5aW3w+hzi/7UqfUhscT8GUXtqRfEzzQwAsPwp7fGIKYqMOzY/8KcLx81i18ifpptRmr8VPT6opL9wU3grbmrhz7c9Skaj4AYhpJbH1j5Xgm14ZN0rKEvY7j75ESj9xY8aAdMJFADdy8sMjR2FL8BpN84vrWIUPvdrgpMraslLa2oK+QJETX712brJqogh0j8EtyjJzUOGHIGyn9ONBdIBkD0BkWTfWgkdwItmjaZopqn2P9rRgLXpYFr6RIEr0+4aybofbaud725r7sB7F6TqGUa1BwLjuqjw6wo69En03bIjqOVFnXP9RwgSYaoNnNrWVHfQ9Rph7tqP0pAce+xDXDruL+rHcz6ln2lhl2aY0mE0yb0Byz7yjnVtQw+pv/TcR9ZePJqQKjl3lazZAaKI9TxKhwWhzxbISAmnQzsBiJNtGE3ApmUYUzfA4KaTxK71l3dnVnW9OkwBAF+rnZnUF/dOqbMOYZRMX9tXHlYn16QjrVItvUoPkuGpvqf0YWgPXOSO0IzQod5ofO2O/gzdmk94YAlD/CqD/o1pCP2JNhhFftGwLUaBvNlL+tdJBLOhBUZCOpik6IMamqdK3AnDxBg+16WKa3WE02KzpCC3msVpuGGKnY5zNGVToAc3sZUVgevfZuhzOhfprO0AHJ0ck2kxSE2c2GKlwUhxyZGUmc7JpFh/ZktxOQ47vAAh7I4fD0MRKW6Fk1QYOGhFfVPDUZXawarezdJtWzwpZ2WiQYZfiKDvuwmupCjWqyp2R+hCRtw9DG0ww0EEXEuCUsgexlgwF/05fhIOXAA6/Int1cvu7ni0ptzkn7hi2hQ72CFrpPVG9U7XVPc8bJIVFtuFStUC0Ymw4AsLcrJiqp9gcYoDYrgLHJqRPHcrms4maIQ1Ket4RBgu17M2T0pASvSFthi87RJuDpVEkH6k5dR1ykArccYr+bmFoKY8u8rVz/dMjfe8VwRsMq/5qPLvTKso5B1mV9NptFcJkKAoJ9EiP3/sxVrsVB6MdUuoQxMwIs3Rl21sjpABsWWwbJBBLogFg/UivowbwTjhd6fo7NDhjO/dVML5RAY/PMSSuqOKxtSguJnAG7PYzbuN/CVMlWvz15VfTe5hWjGp4IwZpDQRJcKcsMok0p86BrSMgQrLGaKLgeI+o6Xjs1xw3FXuyxJtM+ZzOco2b8YwxBTw/NHPM8tVu06TiCisjAdElQ3cRxb8Trca+MyL+QbicxmYkVlZZoAtlkVzfEgfak67uNLjxaIdXQFD5ibCBfPpNVHq8Jj250wV7DKILjsePNvIR4x+TD6WWFC5nsNoXj3H7sr7fhYfh3WO8meCv95w2CaVcEXiw0VaCeWhWUWnbirbtKcqlO3nKeFnv45hIvQTRBuGFDvkn7MGDNjoQm50f+la/j5Tkaei+bBnTEzfouLBTeLwIlrIw3saHYRowtRo9P4QDl+NIumkebp5/WnSzE2+xjPAwl+rmqvkwfOkUfXcus1IjdfiLxUzADDgGtk8Yor/17hExdmvqXO5ae2oVI3FbIYrEwDA3BnrbCaLmQ/4a5BLp45+5XsSWD0A1wpoLe769NGrL+CGokfiPiDqMBDP0RVPkuU84euRruOvPSFAdbmsjljUNAWgVh378jd1xZRmqsJPRKODdwKhPiDBBatW7DAMEUoCRQ+HAEqSWPj9XN+/ijxXTFXzt+T0EW0BIN2yZZubSxwHwAddxl1j67kDpzgDjSDSdQlj7YhkxQ62PZsu2rnIbW8BkUaraxON7yZRTwDb00LdMfFa2hmtBjGWzfVm/GOC5LSE0RLHsp8enD811dvrof79paGjqn0SLX8t5TVb0gUQ6MOu2lwJfP+O6d2Vh2ULJSDp+5HB54V5H+CNN25tXvrIM3Exe1jX2WMCJrldyxiIItGuRwvlg1K89N+AyTkg9k0TW1QxO+2ZBH2aNKpNmxxrUvtQUn9AcLo3cNgbDru8mfxwvHPaDHr6k/EvS84yT+8fzP5FpFn75MLfj8EwbhZ8XA2o10BzmE8XWhCsO+vYNg9pGFPWbki0+dipJBpAh3FlZ13n0OzgVbBypRzreqSsdapRzjR+kT8ajyv/wxlufqwztJpldU2HbjTrhHeSBKPhjLO5fveAbAx8KJxm/dl5vaSbdVSNw8xWrmjS4dKOb0LE+bGtct751nCJR/6aieShrRLXiGlk2NTevGkUKt0Jm+XC1TSjbYqQsmK6rtHecJfAVDbEyxvTF1jFp/DAASds88fYKuhmMbWiuZnYTJOWEfXjTsIZrqGZ/fFOBg+ux2bAat12KYxskoRoUeTH6ZLThB/f0+eCqfasE1AxXaAFA20ihHk4cEJsZdaYAVHoQUlLCq4pa4mCAM2NNN5vsDgfLS0jvSP38yfaxiYoOHUmJisj9kr05cPOnh4+9rSPbNJ9Vs/BjnqB/8qr6Y+rew1G+9xsMFWSe4gJ85kz7rpMZ3RGTrM6LbCQAmf1TaWzYGIdqGpcmzyJKaElwibK/S5MK6w5JHjfTNxXohxKX0hlsQy85UphZQbeCA0s+6+nxOzKL3hCyO/j9Ra2d4RN2W0p9OF4xBfEubmu7Mi1Zd5mJ4G+ctkiV67Hv3zUB6IjPW1CW9M01FTYpeP0w42u+I2r1QZVvE2JsSf/Y1X3MHUbJXROEw7yryYQIun3d21drZ5J2ZKUQNcBPkssPg7x2jSqgpgtgtc+1BE7rfDKGKnn3I8ZMx09ZKkxYhdXorKgaZs3St6TuEx5Ejj9CBgsuHyKsWtaZt5hwMAXyYlo0kd6KcxJMyKxGxpItyH/bLPStYdIF6tC05vTSPQEJ5g54kVuqyolx5yEFa6BHUWJdBLHrQWmXZfTEqZbHbtlmeQpmu/NvVITfcb1Um5EIi0dEGJ7cOMls9vbPIamwpPF6qLiUEbvqh06xsT5bk2LQoa9aV9KiiJ2CAEC5iH271UUxo8HDcMN+47Woypfh1IKCFsxV3Bp4+pShdFt5CoVNj5hMn3stg30e5U+9e8WVeM9nsVuw19bcbjRQ1yJ++h0dtPd7ne8E86JIs3uOm8MvvYmbIprFoID8dIBKroQMIaGHclF8KscsOD468XQYSpYMAZhRyd0tBtfvxxeg8g1OFErQaPUIXEmYXnvyt/vnqNY2qkI9wxepu0m0IEVwOLLmOxipZaba2SQlSwwLeZQSGxYbsA7PxY9CpLQnwjsjWwFnJwZuL8pBT4J//q4Gjwi5Lgfp67KUnt8TfEzhRkAiPxx+nicm9h5UyhhMepDcxKbndNje4zmRc5MACBTz8gcdGHBJmeQUyV6d0vremf1AwCZBZEqQq0HtJ2cT9ugHebFcoGWW/jTAWSOTXC3OJsc5D3znTrcEEpqviR7DGEV5imxJZDucrMzQHPMLVYBsbqYvWcQ4fxbPaDhlhXtDDIS30bX0uq8tCmsuteHMM5DeCkNJADP/VujPSY+lNbfxbyZ2ew6+W3396KTckECcJEoN22p9LN+dod6CprLZHcjehyxvHSMarrVYchYxVUaMwDQwmM3Dz2Y8uc6ZNjsmM0jx5tzSkf42KEJAAxo6WLbHIC3WXpX7O9y9gMAU0C2FaUDNk0fBUSMsRbIsv9s4Jxl4AXs5N6KkJWVY7rNaf29153LRy/seL1XA4vkga/jkP5yItMgn6lmAMAKTw956J+WP+0Wx2Lflj/oDSczP9YTlNMcXHGheVk5xrF4YeU4CEl895GLY+G5BERrPEm0Gxe8uYPlguiNi9N5N37A3GXImFDHf/w4vMgTxIvgYogpSQR3zPG1p36WjntvYm3fRYd5LTWqGxOFJwq5OfZThLmbvBn5KRKMXHgXeinFfcqwxjTyU8IxUSDwRG+mxHn6shNUou2su5PoFtDT/gU/xq7htejanGN1k8K259gQj1TMAEChWuK5bR6a8Aqnqhg6+7Ttoj9hjjE7EwDYybeHZoL7W60Zbo/eTwKbZIztZey/exyzXwRLsqz9urZiHo53r14X3urKVNNuHA7h03UPlcUAQK6Ot7mPkhe7knFZWS0+lXYM/3ZXdbNq9Jp+SkSUEugfzw3rUPAGHFt+5hj+7S7MslogGEOCw+CW8c6o97Tz5uxC+RqYL7nyQHbnMpLW03FTT+3tW/1RtigWZHZ9uWJMQGbNSvZYBRlVXfYenyBcYF4R3YX8DB3T4i3/6Kw7SQvS7r96rzkOaS3ux1aiLfZewfPJSes9ovV0El6Lxo54i1VFTiU2XcwAQLfwuSufOHNx+JIVwulQc89aG9ayD7UoNAGAmiwis4uKzYg79gOiu1RuJVpbPbsgABCa27p6YEFhK7OIgVBr9mbEQEAZ4lkxEKZtv5EYiIhVsBIDkTTle2qpUjIpEKSuEiVBvLmoLeVmGIK8nVtkBLKumJ0lyGH+nSuQW2VFKSIjT8f03O2T89sl9uCvL+u9elAgSAD++7dGto5pyfCen2R3VI/Ll07qvXZQNEgAjhIlb9YhqPiIfLpoik+qk9AxQpD/7wUXL/LHhpUHrE5jBgCqzXA5oFYPpt6Yy0VWe6E+yxng7NIEAHBA2rZhAaVMOTULiJwGAUALCFtRS2CV6RsAe43xNhCy/zRA0DJQAyfG+4CszB3TdqxPx3jnd7SK4aOyknbcEMyIAHJmBgkA4IhP+HiRp34/RpwXf9p9ijQeN+9sJoJZEj8+FwZUhXYgky4YhmsuqjBb0lIbY4qSbU8ihKM9yLZIJFhcsscsD7J7vL7jD7O594DyiT+sEsxGCB3Wv1B6/VXeifOVXMtmwBY2O/F4jBs4uClZ+IRem24kbxL38eY+dODEHrfT5/17HQAgHQ8YG52fUA7J7Sy4w6f0OHaIjV4kyTzGkHipCbsY4yNGoRrseJxrHd1cxyN/jnEjRqXvGEM3+TCctjrGgVIdC67AwalQEKQXQZ4P7pSDZ+q/fNHZA2n5rPP4x7cB/cjP3HEDNKsgODUtHinnAIAx/Me1YI4p9mpAXpj0jOpfEE4bFLXNrgWzurnQPnaLBhfnGc7vlfiNLEsVgmWOD/yRf3/4690FmNn84un1rxEc2XDHH82fo6/lwf/WhP6Eyv/2kjxpYw8jcGN4A9Ty7duef514wvg/uTXr/cUvA/cf6Xblhu6DTk32Du+d4+2ek+Mjja2qtkAYByMhh94nWO/lNbjgS0REIgn/8RwxSmSs3VBt1a/hod24mkpBI0O7cX1MmZOsviPEkXbaTATTzlxYtDeeJvMlz9eQ0/YcpbuuTAyQ3cHFZd3NQKPy7k5b5fiA4TovKuYWy3i8Hjq+6H6Vf/vomBh3F0NTx46fzwD5OuUeTp2Hc24PxNPEZrj9EJ3G5XTTsZxeMx681t1EDx6vzC7re1p+IYfM4aN3+fsjFiqNdyz/S7Z3wMwOJGqb7DjsFsqVOhn/WNXp+JmMs/tlY2aGG6RZJSEB9meiAYBgyrd/cxA7eLRRyWc0r0drv9IHZDSne4YmADALkKpsAqW6hre30HlKyCKDUvOz/wAACgVSWPi5NshK7nYRyHd5cTogJ4W/TNNMXCSYRmUgMshUIz+Z3sPdi24M6komM5thYRKgypQy5sU1pDwutSCK+YxIEA/FbAmgrSs26A7Ec2mPFGSkaZh2mbwe73R+Jhb0xys1Q8MK/QjAj//WyLQwrQX+vUXqPNQ369S/kSZZWPEfAfg6lJssYTouITR7ncdIrxdR9HkSbmDMKgaSQrnnAIDUrEUZy8RZuAHGFfucJkkLgTqdnVvoYw4oOTQBAJrWZBMFE8DCNhfUZZAJLCjn/AcAemnxYv80AGL+pjTwxhQ3aW1o/UG0HFgGILBs+rkA","base64")).toString()),a}]]),g={hooks:{registerPackageExtensions:async(e,t)=>{for(const[e,r]of o)t(A.parseDescriptor(e,!0),r)},getBuiltinPatch:async(e,t)=>{var r;if(!t.startsWith("compat/"))return;const n=A.parseIdent(t.slice("compat/".length)),o=null===(r=c.get(n.identHash))||void 0===r?void 0:r();return void 0!==o?o:null},reduceDependency:async(e,t,r,n)=>void 0===c.get(e.identHash)?e:A.makeDescriptor(e,A.makeRange({protocol:"patch:",source:A.stringifyDescriptor(e),selector:`builtin<compat/${A.stringifyIdent(e)}>`,params:null}))}}},10189:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var A=r(36370),n=r(25413),o=r(54143),i=r(40822);class s extends n.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.parseIdent(this.command),r=o.makeIdent(t.scope,"create-"+t.name);return this.cli.run(["dlx",...e,o.stringifyIdent(r),...this.args])}}(0,A.gn)([i.Command.String("-p,--package",{description:"The package to run the provided command from"})],s.prototype,"pkg",void 0),(0,A.gn)([i.Command.Boolean("-q,--quiet",{description:"Only report critical errors instead of printing the full install logs"})],s.prototype,"quiet",void 0),(0,A.gn)([i.Command.String()],s.prototype,"command",void 0),(0,A.gn)([i.Command.Proxy()],s.prototype,"args",void 0),(0,A.gn)([i.Command.Path("create")],s.prototype,"execute",null);var a=r(39922),c=r(85824),g=r(63088),l=r(43896),u=r(46009);class h extends n.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){return a.VK.telemetry=null,await l.xfs.mktempPromise(async e=>{const t=u.y1.join(e,"dlx-"+process.pid);await l.xfs.mkdirPromise(t),await l.xfs.writeFilePromise(u.y1.join(t,"package.json"),"{}\n"),await l.xfs.writeFilePromise(u.y1.join(t,"yarn.lock"),"");const r=u.y1.join(t,".yarnrc.yml"),A=await a.VK.findProjectCwd(this.context.cwd,u.QS.lockfile),i=null!==A?u.y1.join(A,".yarnrc.yml"):null;null!==i&&l.xfs.existsSync(i)?(await l.xfs.copyFilePromise(i,r),await a.VK.updateConfiguration(t,e=>{const t={...e,enableGlobalCache:!0,enableTelemetry:!1};return Array.isArray(e.plugins)&&(t.plugins=e.plugins.map(e=>{const t="string"==typeof e?e:e.path,r=u.cS.isAbsolute(t)?t:u.cS.resolve(u.cS.fromPortablePath(A),t);return"string"==typeof e?r:{path:r,spec:e.spec}})),t})):await l.xfs.writeFilePromise(r,"enableGlobalCache: true\nenableTelemetry: false\n");const s=void 0!==this.pkg?[this.pkg]:[this.command],h=o.parseDescriptor(this.command).name,p=await this.cli.run(["add","--",...s],{cwd:t,quiet:this.quiet});if(0!==p)return p;this.quiet||this.context.stdout.write("\n");const d=await a.VK.find(t,this.context.plugins),{project:C,workspace:f}=await c.I.find(d,t);if(null===f)throw new n.WorkspaceRequiredError(C.cwd,t);return await C.restoreInstallState(),await g.executeWorkspaceAccessibleBinary(f,h,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}}h.usage=i.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 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,A.gn)([i.Command.String("-p,--package",{description:"The package to run the provided command from"})],h.prototype,"pkg",void 0),(0,A.gn)([i.Command.Boolean("-q,--quiet",{description:"Only report critical errors instead of printing the full install logs"})],h.prototype,"quiet",void 0),(0,A.gn)([i.Command.String()],h.prototype,"command",void 0),(0,A.gn)([i.Command.Proxy()],h.prototype,"args",void 0),(0,A.gn)([i.Command.Path("dlx")],h.prototype,"execute",null);const p={commands:[s,h]}},34777:(e,t,r)=>{"use strict";r.r(t),r.d(t,{dedupeUtils:()=>A,default:()=>We,suggestUtils:()=>A});var A={};r.r(A),r.d(A,{Modifier:()=>o,Strategy:()=>i,Target:()=>n,applyModifier:()=>S,extractDescriptorFromPath:()=>N,extractRangeModifier:()=>v,fetchDescriptorFrom:()=>K,findProjectDescriptors:()=>k,getModifier:()=>D,getSuggestedDescriptors:()=>F});var n,o,i,s=r(39922),a=r(36370),c=r(25413),g=r(28148),l=r(62152),u=r(92659),h=r(85824),p=r(15815),d=r(54143),C=r(40822),f=r(61899),I=r(33720),E=r(46611),B=r(71643),y=r(43896),m=r(46009),w=r(53887),Q=r.n(w);function D(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"}(n||(n={})),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"}(i||(i={}));const b=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function v(e,{project:t}){const r=e.match(b);return r?r[1]:t.configuration.get("defaultSemverRangePrefix")}function S(e,t){let{protocol:r,source:A,params:n,selector:o}=d.parseRange(e.range);return Q().valid(o)&&(o=`${t}${e.range}`),d.makeDescriptor(e,d.makeRange({protocol:r,source:A,params:n,selector:o}))}async function k(e,{project:t,target:r}){const A=new Map,o=e=>{let t=A.get(e.descriptorHash);return t||A.set(e.descriptorHash,t={descriptor:e,locators:[]}),t};for(const A of t.workspaces)if(r===n.PEER){const t=A.manifest.peerDependencies.get(e.identHash);void 0!==t&&o(t).locators.push(A.locator)}else{const t=A.manifest.dependencies.get(e.identHash),i=A.manifest.devDependencies.get(e.identHash);r===n.DEVELOPMENT?void 0!==i?o(i).locators.push(A.locator):void 0!==t&&o(t).locators.push(A.locator):void 0!==t?o(t).locators.push(A.locator):void 0!==i&&o(i).locators.push(A.locator)}return A}async function N(e,{cwd:t,workspace:r}){return await async function(e){return await y.xfs.mktempPromise(async t=>{const r=s.VK.create(t);return r.useWithSource(t,{enableMirror:!1,compressionLevel:0},t,{overwrite:!0}),await e(new g.C(t,{configuration:r,check:!1,immutable:!1}))})}(async A=>{m.y1.isAbsolute(e)||(e=m.y1.relative(r.cwd,m.y1.resolve(t,e))).match(/^\.{0,2}\//)||(e="./"+e);const{project:n}=r,o=await K(d.makeIdent(null,"archive"),e,{project:r.project,cache:A,workspace:r});if(!o)throw new Error("Assertion failed: The descriptor should have been found");const i=new I.$,s=n.configuration.makeResolver(),a=n.configuration.makeFetcher(),c={checksums:n.storedChecksums,project:n,cache:A,fetcher:a,report:i,resolver:s},g=s.bindDescriptor(o,r.anchoredLocator,c),l=d.convertDescriptorToLocator(g),u=await a.fetch(l,c),h=await E.G.find(u.prefixPath,{baseFs:u.packageFs});if(!h.name)throw new Error("Target path doesn't have a name");return d.makeDescriptor(h.name,e)})}async function F(e,{project:t,workspace:r,cache:A,target:o,modifier:s,strategies:a,maxResults:c=1/0}){if(!(c>=0))throw new Error(`Invalid maxResults (${c})`);if("unknown"!==e.range)return{suggestions:[{descriptor:e,name:"Use "+d.prettyDescriptor(t.configuration,e),reason:"(unambiguous explicit request)"}],rejections:[]};const g=null!=r&&r.manifest[o].get(e.identHash)||null,l=[],u=[],h=async e=>{try{await e()}catch(e){u.push(e)}};for(const u of a){if(l.length>=c)break;switch(u){case i.KEEP:await h(async()=>{g&&l.push({descriptor:g,name:"Keep "+d.prettyDescriptor(t.configuration,g),reason:"(no changes)"})});break;case i.REUSE:await h(async()=>{for(const{descriptor:A,locators:n}of(await k(e,{project:t,target:o})).values()){if(1===n.length&&n[0].locatorHash===r.anchoredLocator.locatorHash&&a.includes(i.KEEP))continue;let e="(originally used by "+d.prettyLocator(t.configuration,n[0]);e+=n.length>1?` and ${n.length-1} other${n.length>2?"s":""})`:")",l.push({descriptor:A,name:"Reuse "+d.prettyDescriptor(t.configuration,A),reason:e})}});break;case i.CACHE:await h(async()=>{for(const r of t.storedDescriptors.values())r.identHash===e.identHash&&l.push({descriptor:r,name:"Reuse "+d.prettyDescriptor(t.configuration,r),reason:"(already used somewhere in the lockfile)"})});break;case i.PROJECT:await h(async()=>{if(null!==r.manifest.name&&e.identHash===r.manifest.name.identHash)return;const A=t.tryWorkspaceByIdent(e);null!==A&&l.push({descriptor:A.anchoredDescriptor,name:"Attach "+d.prettyWorkspace(t.configuration,A),reason:`(local workspace at ${A.cwd})`})});break;case i.LATEST:await h(async()=>{if("unknown"!==e.range)l.push({descriptor:e,name:"Use "+d.prettyRange(t.configuration,e.range),reason:"(explicit range requested)"});else if(o===n.PEER)l.push({descriptor:d.makeDescriptor(e,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(t.configuration.get("enableNetwork")){let n=await K(e,"latest",{project:t,cache:A,workspace:r,preserveModifier:!1});n&&(n=S(n,s),l.push({descriptor:n,name:"Use "+d.prettyDescriptor(t.configuration,n),reason:"(resolved from latest)"}))}else l.push({descriptor:null,name:"Resolve from latest",reason:B.pretty(t.configuration,"(unavailable because enableNetwork is toggled off)","grey")})})}}return{suggestions:l.slice(0,c),rejections:u.slice(0,c)}}async function K(e,t,{project:r,cache:A,workspace:n,preserveModifier:o=!0}){const i=d.makeDescriptor(e,t),s=new I.$,a=r.configuration.makeFetcher(),c=r.configuration.makeResolver(),g={project:r,fetcher:a,cache:A,checksums:r.storedChecksums,report:s,skipIntegrityCheck:!0},l={...g,resolver:c,fetchOptions:g},u=c.bindDescriptor(i,n.anchoredLocator,l),h=await c.getCandidates(u,new Map,l);if(0===h.length)return null;const p=h[0];let{protocol:C,source:f,params:E,selector:B}=d.parseRange(d.convertToManifestRange(p.reference));if(C===r.configuration.get("defaultProtocol")&&(C=null),Q().valid(B)&&!1!==o){B=v("string"==typeof o?o:i.range,{project:r})+B}return d.makeDescriptor(p,d.makeRange({protocol:C,source:f,params:E,selector:B}))}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=null,this.cached=!1}async execute(){var e;const t=await s.VK.find(this.context.cwd,this.context.plugins),{project:r,workspace:A}=await h.I.find(t,this.context.cwd),o=await g.C.find(t);if(!A)throw new c.WorkspaceRequiredError(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});const a=null!==(e=this.interactive)&&void 0!==e?e:t.get("preferInteractive"),I=D(this,r),E=[...a?[i.REUSE]:[],i.PROJECT,...this.cached?[i.CACHE]:[],i.LATEST],B=a?1/0:1,y=await Promise.all(this.packages.map(async e=>{const t=e.match(/^\.{0,2}\//)?await N(e,{cwd:this.context.cwd,workspace:A}):d.parseDescriptor(e),i=function(e,t,{dev:r,peer:A,preferDev:o,optional:i}){const s=e.manifest[n.REGULAR].has(t.identHash),a=e.manifest[n.DEVELOPMENT].has(t.identHash),c=e.manifest[n.PEER].has(t.identHash);if((r||A)&&s)throw new C.UsageError(`Package "${d.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&&!A&&c)throw new C.UsageError(`Package "${d.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(i&&a)throw new C.UsageError(`Package "${d.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(i&&!A&&c)throw new C.UsageError(`Package "${d.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)&&i)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);return A?n.PEER:r||o?n.DEVELOPMENT:s?n.REGULAR:a?n.DEVELOPMENT:n.REGULAR}(A,t,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return[t,await F(t,{project:r,workspace:A,cache:o,target:i,modifier:I,strategies:E,maxResults:B}),i]})),m=await l.h.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async e=>{for(const[A,{suggestions:n,rejections:o}]of y){if(0===n.filter(e=>null!==e.descriptor).length){const[n]=o;if(void 0===n)throw new Error("Assertion failed: Expected an error to have been set");const i=this.cli.error(n);r.configuration.get("enableNetwork")?e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range:\n\n${i}`):e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range (note: network resolution has been disabled):\n\n${i}`)}}});if(m.hasErrors())return m.exitCode();let w=!1;const Q=[],b=[];for(const[,{suggestions:e},t]of y){let r;const n=e.filter(e=>null!==e.descriptor),o=n[0].descriptor,i=n.every(e=>d.areDescriptorsEqual(e.descriptor,o));1===n.length||i?r=o:(w=!0,({answer:r}=await(0,f.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:e.map(({descriptor:e,name:t,reason:r})=>e?{name:t,hint:r,descriptor:e}:{name:t,hint:r,disabled:!0}),onCancel:()=>process.exit(130),result(e){return this.find(e,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout})));const s=A.manifest[t].get(r.identHash);void 0!==s&&s.descriptorHash===r.descriptorHash||(A.manifest[t].set(r.identHash,r),this.optional&&("dependencies"===t?A.manifest.ensureDependencyMeta({...r,range:"unknown"}).optional=!0:"peerDependencies"===t&&(A.manifest.ensurePeerDependencyMeta({...r,range:"unknown"}).optional=!0)),void 0===s?Q.push([A,t,r,E]):b.push([A,t,s,r]))}await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyAddition,Q),await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,b),w&&this.context.stdout.write("\n");return(await p.Pk.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await r.install({cache:o,report:e})})).exitCode()}}M.usage=C.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\": { \"<package>\": { \"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 `defaultSemverRangePrefix` 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 range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\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 For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\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)([C.Command.Rest()],M.prototype,"packages",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],M.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("-E,--exact",{description:"Don't use any semver modifier on the resolved range"})],M.prototype,"exact",void 0),(0,a.gn)([C.Command.Boolean("-T,--tilde",{description:"Use the `~` semver modifier on the resolved range"})],M.prototype,"tilde",void 0),(0,a.gn)([C.Command.Boolean("-C,--caret",{description:"Use the `^` semver modifier on the resolved range"})],M.prototype,"caret",void 0),(0,a.gn)([C.Command.Boolean("-D,--dev",{description:"Add a package as a dev dependency"})],M.prototype,"dev",void 0),(0,a.gn)([C.Command.Boolean("-P,--peer",{description:"Add a package as a peer dependency"})],M.prototype,"peer",void 0),(0,a.gn)([C.Command.Boolean("-O,--optional",{description:"Add / upgrade a package to an optional regular / peer dependency"})],M.prototype,"optional",void 0),(0,a.gn)([C.Command.Boolean("--prefer-dev",{description:"Add / upgrade a package to a dev dependency"})],M.prototype,"preferDev",void 0),(0,a.gn)([C.Command.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"})],M.prototype,"interactive",void 0),(0,a.gn)([C.Command.Boolean("--cached",{description:"Reuse the highest version already used somewhere within the project"})],M.prototype,"cached",void 0),(0,a.gn)([C.Command.Path("add")],M.prototype,"execute",null);var R=r(63088);class x extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,locator:r}=await h.I.find(e,this.context.cwd);if(await t.restoreInstallState(),this.name){const A=(await R.getPackageAccessibleBinaries(r,{project:t})).get(this.name);if(!A)throw new C.UsageError(`Couldn't find a binary named "${this.name}" for package "${d.prettyLocator(e,r)}"`);const[,n]=A;return this.context.stdout.write(n+"\n"),0}return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async A=>{const n=await R.getPackageAccessibleBinaries(r,{project:t}),o=Array.from(n.keys()).reduce((e,t)=>Math.max(e,t.length),0);for(const[e,[t,r]]of n)A.reportJson({name:e,source:d.stringifyIdent(t),path:r});if(this.verbose)for(const[t,[r]]of n)A.reportInfo(null,`${t.padEnd(o," ")} ${d.prettyLocator(e,r)}`);else for(const e of n.keys())A.reportInfo(null,e)})).exitCode()}}x.usage=C.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 ",examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]}),(0,a.gn)([C.Command.String({required:!1})],x.prototype,"name",void 0),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Print both the binary name and the locator of the package that provides the binary"})],x.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],x.prototype,"json",void 0),(0,a.gn)([C.Command.Path("bin")],x.prototype,"execute",null);class L extends c.BaseCommand{constructor(){super(...arguments),this.mirror=!1,this.all=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=await g.C.find(e);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async()=>{const e=(this.all||this.mirror)&&null!==t.mirrorCwd,r=!this.mirror;e&&await y.xfs.removePromise(t.mirrorCwd),r&&await y.xfs.removePromise(t.cwd)})).exitCode()}}L.usage=C.Command.Usage({description:"remove the shared cache files",details:"\n This command will remove all the files from the cache.\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)([C.Command.Boolean("--mirror",{description:"Remove the global cache files instead of the local cache files"})],L.prototype,"mirror",void 0),(0,a.gn)([C.Command.Boolean("--all",{description:"Remove both the global cache files and the local cache files of the current project"})],L.prototype,"all",void 0),(0,a.gn)([C.Command.Path("cache","clean")],L.prototype,"execute",null);var P=r(73632),O=r(44674),U=r.n(O),T=r(31669);class j extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.unsafe=!1}async execute(){const e=await s.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 C.UsageError(`Couldn't find a configuration settings named "${t}"`);const A=e.getSpecial(t,{hideSecrets:!this.unsafe,getNativePaths:!0}),n=P.convertMapsToIndexableObjects(A),o=r?U()(n,r):n,i=await p.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(o)});if(!this.json){if("string"==typeof o)return this.context.stdout.write(o+"\n"),i.exitCode();T.inspect.styles.name="cyan",this.context.stdout.write((0,T.inspect)(o,{depth:1/0,colors:e.get("enableColors"),compact:!1})+"\n")}return i.exitCode()}}j.usage=C.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)([C.Command.String()],j.prototype,"name",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],j.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--no-redacted",{description:"Don't redact secrets (such as tokens) from the output"})],j.prototype,"unsafe",void 0),(0,a.gn)([C.Command.Path("config","get")],j.prototype,"execute",null);var Y=r(82558),G=r.n(Y),H=r(81534),J=r.n(H);class q extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.home=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);if(!e.projectCwd)throw new C.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 C.UsageError(`Couldn't find a configuration settings named "${t}"`);const A=this.json?JSON.parse(this.value):this.value,n=this.home?e=>s.VK.updateHomeConfiguration(e):t=>s.VK.updateConfiguration(e.projectCwd,t);await n(e=>{if(r){const t=G()(e);return J()(t,this.name,A),t}return{...e,[t]:A}});const o=(await s.VK.find(this.context.cwd,this.context.plugins)).getSpecial(t,{hideSecrets:!0,getNativePaths:!0}),i=P.convertMapsToIndexableObjects(o),a=r?U()(i,r):i;return(await p.Pk.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async t=>{T.inspect.styles.name="cyan",t.reportInfo(u.b.UNNAMED,`Successfully set ${this.name} to ${(0,T.inspect)(a,{depth:1/0,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}}q.usage=C.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": "*" } } }\''],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",'yarn config set \'npmRegistries["//npm.example.com"].npmAuthToken\' "ffffffff-ffff-ffff-ffff-ffffffffffff"']]}),(0,a.gn)([C.Command.String()],q.prototype,"name",void 0),(0,a.gn)([C.Command.String()],q.prototype,"value",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Set complex configuration settings to JSON values"})],q.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("-H,--home",{description:"Update the home configuration instead of the project configuration"})],q.prototype,"home",void 0),(0,a.gn)([C.Command.Path("config","set")],q.prototype,"execute",null);class z extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.why=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins,{strict:!1});return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{if(e.invalid.size>0&&!this.json){for(const[r,A]of e.invalid)t.reportError(u.b.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${r}" in ${A}`);t.reportSeparator()}if(this.json){const r=P.sortMap(e.settings.keys(),e=>e);for(const A of r){const r=e.settings.get(A),n=e.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),o=e.sources.get(A);this.verbose?t.reportJson({key:A,effective:n,source:o}):t.reportJson({key:A,effective:n,source:o,...r})}}else{const r=P.sortMap(e.settings.keys(),e=>e),A=r.reduce((e,t)=>Math.max(e,t.length),0),n={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)||"<default>":r.description]}),i=o.reduce((e,[,t])=>Math.max(e,t.length),0);for(const[r,s]of o)t.reportInfo(null,`${r.padEnd(A," ")} ${s.padEnd(i," ")} ${(0,T.inspect)(e.getSpecial(r,{hideSecrets:!0,getNativePaths:!0}),n)}`)}else for(const o of r)t.reportInfo(null,`${o.padEnd(A," ")} ${(0,T.inspect)(e.getSpecial(o,{hideSecrets:!0,getNativePaths:!0}),n)}`)}})).exitCode()}}z.usage=C.Command.Usage({description:"display the current configuration",details:"\n This command prints the current active configuration settings.\n ",examples:[["Print the active configuration settings","$0 config"]]}),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Print the setting description on top of the regular key/value information"})],z.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--why",{description:"Print the reason why a setting is set a particular way"})],z.prototype,"why",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],z.prototype,"json",void 0),(0,a.gn)([C.Command.Path("config")],z.prototype,"execute",null);var W,V=r(15966),X=r(35691),_=r(2401),Z=r.n(_);!function(e){e.HIGHEST="highest"}(W||(W={}));const $=new Set(Object.values(W)),ee={highest:async(e,t,{resolver:r,fetcher:A,resolveOptions:n,fetchOptions:o})=>{const i=new Map;for(const[t,r]of e.storedResolutions){const A=e.storedDescriptors.get(t);if(void 0===A)throw new Error(`Assertion failed: The descriptor (${t}) should have been registered`);P.getSetWithDefault(i,A.identHash).add(r)}return Array.from(e.storedDescriptors.values(),async A=>{if(t.length&&!Z().isMatch(d.stringifyIdent(A),t))return null;const o=e.storedResolutions.get(A.descriptorHash);if(void 0===o)throw new Error(`Assertion failed: The resolution (${A.descriptorHash}) should have been registered`);const s=e.originalPackages.get(o);if(void 0===s)return null;if(!r.shouldPersistResolution(s,n))return null;const a=i.get(A.identHash);if(void 0===a)throw new Error(`Assertion failed: The resolutions (${A.identHash}) should have been registered`);if(1===a.size)return null;const c=[...a].map(t=>{const r=e.originalPackages.get(t);if(void 0===r)throw new Error(`Assertion failed: The package (${t}) should have been registered`);return r.reference}),g=await r.getSatisfying(A,c,n),l=null==g?void 0:g[0];if(void 0===l)return null;const u=l.locatorHash,h=e.originalPackages.get(u);if(void 0===h)throw new Error(`Assertion failed: The package (${u}) should have been registered`);return u===o?null:{descriptor:A,currentPackage:s,updatedPackage:h}})}};class te extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.strategy=W.HIGHEST,this.check=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd),r=await g.C.find(e);let A=0;const n=await p.Pk.start({configuration:e,includeFooter:!1,stdout:this.context.stdout,json:this.json},async e=>{A=await async function(e,{strategy:t,patterns:r,cache:A,report:n}){const{configuration:o}=e,i=new I.$,s=o.makeResolver(),a=o.makeFetcher(),c={cache:A,checksums:e.storedChecksums,fetcher:a,project:e,report:i,skipIntegrityCheck:!0},g={project:e,resolver:s,report:i,fetchOptions:c};return await n.startTimerPromise("Deduplication step",async()=>{const A=ee[t],i=await A(e,r,{resolver:s,resolveOptions:g,fetcher:a,fetchOptions:c}),l=X.yG.progressViaCounter(i.length);n.reportProgress(l);let h,p=0;switch(await Promise.all(i.map(t=>t.then(t=>{if(null===t)return;p++;const{descriptor:r,currentPackage:A,updatedPackage:i}=t;n.reportInfo(u.b.UNNAMED,`${d.prettyDescriptor(o,r)} can be deduped from ${d.prettyLocator(o,A)} to ${d.prettyLocator(o,i)}`),n.reportJson({descriptor:d.stringifyDescriptor(r),currentResolution:d.stringifyLocator(A),updatedResolution:d.stringifyLocator(i)}),e.storedResolutions.set(r.descriptorHash,i.locatorHash)}).finally(()=>l.tick()))),p){case 0:h="No packages";break;case 1:h="One package";break;default:h=p+" packages"}const C=B.pretty(o,t,B.Type.CODE);return n.reportInfo(u.b.UNNAMED,`${h} can be deduped using the ${C} strategy`),p})}(t,{strategy:this.strategy,patterns:this.patterns,cache:r,report:e})});if(n.hasErrors())return n.exitCode();if(this.check)return A?1:0;return(await p.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async e=>{await t.install({cache:r,report:e})})).exitCode()}}te.schema=V.object().shape({strategy:V.string().test({name:"strategy",message:"${path} must be one of ${strategies}",params:{strategies:[...$].join(", ")},test:e=>$.has(e)})}),te.usage=C.Command.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\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\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]}),(0,a.gn)([C.Command.Rest()],te.prototype,"patterns",void 0),(0,a.gn)([C.Command.String("-s,--strategy",{description:"The strategy to use when deduping dependencies"})],te.prototype,"strategy",void 0),(0,a.gn)([C.Command.Boolean("-c,--check",{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"})],te.prototype,"check",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],te.prototype,"json",void 0),(0,a.gn)([C.Command.Path("dedupe")],te.prototype,"execute",null);class re extends C.Command{async execute(){const{plugins:e}=await s.VK.find(this.context.cwd,this.context.plugins),t=[];for(const r of e){const{commands:e}=r[1];if(e){const A=C.Cli.from(e).definitions();t.push([r[0],A])}}const A=this.cli.definitions(),n=r(60306)["@yarnpkg/builder"].bundles.standard;for(const e of t){const t=e[1];for(const r of t)A.find(e=>{return t=e.path,A=r.path,t.split(" ").slice(1).join()===A.split(" ").slice(1).join();var t,A}).plugin={name:e[0],isDefault:n.includes(e[0])}}this.context.stdout.write(JSON.stringify({commands:A},null,2)+"\n")}}(0,a.gn)([C.Command.Path("--clipanion=definitions")],re.prototype,"execute",null);class Ae extends C.Command{async execute(){this.context.stdout.write(this.cli.usage(null))}}(0,a.gn)([C.Command.Path("help"),C.Command.Path("--help"),C.Command.Path("-h")],Ae.prototype,"execute",null);class ne extends C.Command{constructor(){super(...arguments),this.args=[]}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!d.tryParseIdent(this.leadingArgument)){const e=m.y1.resolve(this.context.cwd,m.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)([C.Command.String()],ne.prototype,"leadingArgument",void 0),(0,a.gn)([C.Command.Proxy()],ne.prototype,"args",void 0);var oe=r(59355);class ie extends C.Command{async execute(){this.context.stdout.write((oe.o||"<unknown>")+"\n")}}(0,a.gn)([C.Command.Path("-v"),C.Command.Path("--version")],ie.prototype,"execute",null);var se=r(6220);class ae extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return await y.xfs.mktempPromise(async e=>{const{code:r}=await se.pipevp(this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await R.makeScriptEnv({project:t,binFolder:e})});return r})}}ae.usage=C.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)([C.Command.String()],ae.prototype,"commandName",void 0),(0,a.gn)([C.Command.Proxy()],ae.prototype,"args",void 0),(0,a.gn)([C.Command.Path("exec")],ae.prototype,"execute",null);var ce=r(36545);class ge extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);if(await t.applyLightResolution(),void 0!==this.hash)return await async function(e,t,r){const{configuration:A}=t,n=t.peerRequirements.get(e);if(void 0===n)throw new Error(`No peerDependency requirements found for hash: "${e}"`);return(await p.Pk.start({configuration:A,stdout:r.stdout,includeFooter:!1},async e=>{var r,o;const i=t.storedPackages.get(n.subject);if(void 0===i)throw new Error("Assertion failed: Expected the subject package to have been registered");const s=t.storedPackages.get(n.rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!==(r=i.dependencies.get(n.requested.identHash))&&void 0!==r?r:null,c=null!==a?t.storedResolutions.get(a.descriptorHash):null;if(void 0===c)throw new Error("Assertion failed: Expected the resolution to have been registered");const g=null!==c?t.storedPackages.get(c):null;if(void 0===g)throw new Error("Assertion failed: Expected the provided package to have been registered");const l=[...n.allRequesters.values()].map(e=>{const r=t.storedPackages.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the package to be registered");const A=d.devirtualizeLocator(r),o=t.storedPackages.get(A.locatorHash);if(void 0===o)throw new Error("Assertion failed: Expected the package to be registered");const i=o.peerDependencies.get(n.requested.identHash);if(void 0===i)throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:r,peerDependency:i}});if(null!==g){const t=l.every(({peerDependency:e})=>ce.satisfiesWithPrereleases(g.version,e.range));e.reportInfo(u.b.UNNAMED,`${d.prettyLocator(A,i)} provides ${d.prettyLocator(A,g)} with version ${d.prettyReference(A,null!==(o=g.version)&&void 0!==o?o:"<missing>")}, which ${t?"satisfies":"doesn't satisfy"} the following requirements:`)}else e.reportInfo(u.b.UNNAMED,`${d.prettyLocator(A,i)} doesn't provide ${d.prettyIdent(A,n.requested)}, breaking the following requirements:`);e.reportSeparator();const h=B.mark(A),p=[];for(const{pkg:e,peerDependency:t}of P.sortMap(l,e=>d.stringifyLocator(e.pkg))){const r=null!==g&&ce.satisfiesWithPrereleases(g.version,t.range)?h.Check:h.Cross;p.push({stringifiedLocator:d.stringifyLocator(e),prettyLocator:d.prettyLocator(A,e),prettyRange:d.prettyRange(A,t.range),mark:r})}const C=Math.max(...p.map(({stringifiedLocator:e})=>e.length)),f=Math.max(...p.map(({prettyRange:e})=>e.length));for(const{stringifiedLocator:t,prettyLocator:r,prettyRange:A,mark:n}of P.sortMap(p,({stringifiedLocator:e})=>e))e.reportInfo(null,`${r.padEnd(C+(r.length-t.length)," ")} → ${A.padEnd(f," ")} ${n}`);p.length>1&&(e.reportSeparator(),e.reportInfo(u.b.UNNAMED,"Note: these requirements start with "+d.prettyLocator(t.configuration,s)))})).exitCode()}(this.hash,t,{stdout:this.context.stdout});return(await p.Pk.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async r=>{var A;const n=[([,e])=>d.stringifyLocator(t.storedPackages.get(e.subject)),([,e])=>d.stringifyIdent(e.requested)];for(const[o,i]of P.sortMap(t.peerRequirements,n)){const n=t.storedPackages.get(i.subject);if(void 0===n)throw new Error("Assertion failed: Expected the subject package to have been registered");const s=t.storedPackages.get(i.rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!==(A=n.dependencies.get(i.requested.identHash))&&void 0!==A?A:null,c=B.pretty(e,o,B.Type.CODE),g=d.prettyLocator(e,n),l=d.prettyIdent(e,i.requested),u=d.prettyIdent(e,s),h=i.allRequesters.length-1,p="descendant"+(1===h?"":"s"),C=h>0?` and ${h} ${p}`:"",f=null!==a?"provides":"doesn't provide";r.reportInfo(null,`${c} → ${g} ${f} ${l} to ${u}${C}`)}})).exitCode()}}ge.schema=V.object().shape({hash:V.string().matches(/^p[0-9a-f]{5}$/)}),ge.usage=C.Command.Usage({description:"explain a set of peer requirements",details:"\n A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.\n\n When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.\n\n When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.\n\n **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (`yarn explain peer-requirements`).\n ",examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]}),(0,a.gn)([C.Command.String({required:!1})],ge.prototype,"hash",void 0),(0,a.gn)([C.Command.Path("explain","peer-requirements")],ge.prototype,"execute",null);var le=r(85875);class ue extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.recursive=!1,this.extra=[],this.cache=!1,this.dependents=!1,this.manifest=!1,this.nameOnly=!1,this.virtuals=!1,this.json=!1,this.patterns=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r&&!this.all)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=new Set(this.extra);this.cache&&n.add("cache"),this.dependents&&n.add("dependents"),this.manifest&&n.add("manifest");const o=(e,{recursive:r})=>{const A=e.anchoredLocator.locatorHash,n=new Map,o=[A];for(;o.length>0;){const e=o.shift();if(n.has(e))continue;const i=t.storedPackages.get(e);if(void 0===i)throw new Error("Assertion failed: Expected the package to be registered");if(n.set(e,i),d.isVirtualLocator(i)&&o.push(d.devirtualizeLocator(i).locatorHash),r||e===A)for(const e of i.dependencies.values()){const r=t.storedResolutions.get(e.descriptorHash);if(void 0===r)throw new Error("Assertion failed: Expected the resolution to be registered");o.push(r)}}return n.values()},i=({all:e,recursive:A})=>e&&A?t.storedPackages.values():e?(({recursive:e})=>{const r=new Map;for(const A of t.workspaces)for(const t of o(A,{recursive:e}))r.set(t.locatorHash,t);return r.values()})({recursive:A}):o(r,{recursive:A}),{selection:a,sortedLookup:l}=(({all:e,recursive:t})=>{const r=i({all:e,recursive:t}),A=this.patterns.map(e=>{const t=d.parseLocator(e),r=Z().makeRe(d.stringifyIdent(t)),A=d.isVirtualLocator(t),n=A?d.devirtualizeLocator(t):t;return e=>{const o=d.stringifyIdent(e);if(!r.test(o))return!1;if("unknown"===t.reference)return!0;const i=d.isVirtualLocator(e),s=i?d.devirtualizeLocator(e):e;return(!A||!i||t.reference===e.reference)&&n.reference===s.reference}}),n=P.sortMap([...r],e=>d.stringifyLocator(e));return{selection:n.filter(e=>0===A.length||A.some(t=>t(e))),sortedLookup:n}})({all:this.all,recursive:this.recursive});if(0===a.length)throw new C.UsageError("No package matched your request");const u=new Map;if(this.dependents)for(const e of l)for(const r of e.dependencies.values()){const A=t.storedResolutions.get(r.descriptorHash);if(void 0===A)throw new Error("Assertion failed: Expected the resolution to be registered");P.getArrayWithDefault(u,A).push(e)}const p=new Map;for(const e of l){if(!d.isVirtualLocator(e))continue;const t=d.devirtualizeLocator(e);P.getArrayWithDefault(p,t.locatorHash).push(e)}const f={},m={children:f},w=e.makeFetcher(),Q={project:t,fetcher:w,cache:A,checksums:t.storedChecksums,report:new I.$,skipIntegrityCheck:!0},D=[async(e,t,r)=>{var A,n;if(!t.has("manifest"))return;const o=await w.fetch(e,Q);let i;try{i=await E.G.find(o.prefixPath,{baseFs:o.packageFs})}finally{null===(A=o.releaseFs)||void 0===A||A.call(o)}r("Manifest",{License:B.tuple(B.Type.NO_HINT,i.license),Homepage:B.tuple(B.Type.URL,null!==(n=i.raw.homepage)&&void 0!==n?n:null)})},async(e,r,n)=>{var o;if(!r.has("cache"))return;const i=null!==(o=t.storedChecksums.get(e.locatorHash))&&void 0!==o?o:null,s=A.getLocatorPath(e,i);let a;if(null!==s)try{a=y.xfs.statSync(s)}catch(e){}const c=void 0!==a?[a.size,B.Type.SIZE]:void 0;n("Cache",{Checksum:B.tuple(B.Type.NO_HINT,i),Path:B.tuple(B.Type.PATH,s),Size:c})}];for(const r of a){const A=d.isVirtualLocator(r);if(!this.virtuals&&A)continue;const o={},i={value:[r,B.Type.LOCATOR],children:o};if(f[d.stringifyLocator(r)]=i,this.nameOnly){delete i.children;continue}const s=p.get(r.locatorHash);void 0!==s&&(o.Instances={label:"Instances",value:B.tuple(B.Type.NUMBER,s.length)}),o.Version={label:"Version",value:B.tuple(B.Type.NO_HINT,r.version)};const a=(e,t)=>{const r={};if(o[e]=r,Array.isArray(t))r.children=t.map(e=>({value:e}));else{const e={};r.children=e;for(const[r,A]of Object.entries(t))void 0!==A&&(e[r]={label:r,value:A})}};if(!A){for(const e of D)await e(r,n,a);await e.triggerHook(e=>e.fetchPackageInfo,r,n,a)}r.bin.size>0&&!A&&a("Exported Binaries",[...r.bin.keys()].map(e=>B.tuple(B.Type.PATH,e)));const c=u.get(r.locatorHash);void 0!==c&&c.length>0&&a("Dependents",c.map(e=>B.tuple(B.Type.LOCATOR,e))),r.dependencies.size>0&&!A&&a("Dependencies",[...r.dependencies.values()].map(e=>{var r;const A=t.storedResolutions.get(e.descriptorHash),n=void 0!==A&&null!==(r=t.storedPackages.get(A))&&void 0!==r?r:null;return B.tuple(B.Type.RESOLUTION,{descriptor:e,locator:n})})),r.peerDependencies.size>0&&A&&a("Peer dependencies",[...r.peerDependencies.values()].map(e=>{var A,n;const o=r.dependencies.get(e.identHash),i=void 0!==o&&null!==(A=t.storedResolutions.get(o.descriptorHash))&&void 0!==A?A:null,s=null!==i&&null!==(n=t.storedPackages.get(i))&&void 0!==n?n:null;return B.tuple(B.Type.RESOLUTION,{descriptor:e,locator:s})}))}le.emitTree(m,{configuration:e,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}}ue.usage=C.Command.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]}),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Print versions of a package from the whole project"})],ue.prototype,"all",void 0),(0,a.gn)([C.Command.Boolean("-R,--recursive",{description:"Print information for all packages, including transitive dependencies"})],ue.prototype,"recursive",void 0),(0,a.gn)([C.Command.Array("-X,--extra",{description:"An array of requests of extra data provided by plugins"})],ue.prototype,"extra",void 0),(0,a.gn)([C.Command.Boolean("--cache",{description:"Print information about the cache entry of a package (path, size, checksum)"})],ue.prototype,"cache",void 0),(0,a.gn)([C.Command.Boolean("--dependents",{description:"Print all dependents for each matching package"})],ue.prototype,"dependents",void 0),(0,a.gn)([C.Command.Boolean("--manifest",{description:"Print data obtained by looking at the package archive (license, homepage, ...)"})],ue.prototype,"manifest",void 0),(0,a.gn)([C.Command.Boolean("--name-only",{description:"Only print the name for the matching packages"})],ue.prototype,"nameOnly",void 0),(0,a.gn)([C.Command.Boolean("--virtuals",{description:"Print each instance of the virtual packages"})],ue.prototype,"virtuals",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],ue.prototype,"json",void 0),(0,a.gn)([C.Command.Rest()],ue.prototype,"patterns",void 0),(0,a.gn)([C.Command.Path("info")],ue.prototype,"execute",null);var he=r(11640),pe=r(5864);class de extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.checkCache=!1,this.skipBuilds=!1,this.silent=!1}async execute(){var e,t,r;const A=await s.VK.find(this.context.cwd,this.context.plugins);void 0!==this.inlineBuilds&&A.useWithSource("<cli>",{enableInlineBuilds:this.inlineBuilds},A.startingCwd,{overwrite:!0});const n=!!process.env.NOW_BUILDER,o=!!process.env.NETLIFY,i=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=async(e,{error:t})=>{const r=await p.Pk.start({configuration:A,stdout:this.context.stdout,includeFooter:!1},async r=>{t?r.reportError(u.b.DEPRECATED_CLI_SETTINGS,e):r.reportWarning(u.b.DEPRECATED_CLI_SETTINGS,e)});return r.hasErrors()?r.exitCode():null};if(void 0!==this.ignoreEngines){const e=await a("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!n});if(null!==e)return e}if(void 0!==this.registry){const e=await a("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 a("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!n});if(null!==e)return e}if(void 0!==this.production){const e=await a("The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",{error:!0});if(null!==e)return e}if(void 0!==this.nonInteractive){const e=await a("The --non-interactive option is deprecated",{error:!i});if(null!==e)return e}if(void 0!==this.frozenLockfile){const e=await a("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!i&&!pe.TRAVIS});if(null!==e)return e}if(void 0!==this.cacheFolder){const e=await a("The cache-folder option has been deprecated; use rc settings instead",{error:!o});if(null!==e)return e}const l=void 0===this.immutable&&void 0===this.frozenLockfile?null!==(e=A.get("enableImmutableInstalls"))&&void 0!==e&&e:null!==(r=null!==(t=this.immutable)&&void 0!==t?t:this.frozenLockfile)&&void 0!==r&&r;if(null!==A.projectCwd){const e=await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeFooter:!1},async e=>{await async function(e,t){if(!e.projectCwd)return!1;const r=m.y1.join(e.projectCwd,e.get("lockfileFilename"));if(!await y.xfs.existsPromise(r))return!1;const A=await y.xfs.readFilePromise(r,"utf8");if(!A.includes("<<<<<<<"))return!1;if(t)throw new X.lk(u.b.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");const[n,o]=function(e){const t=[[],[]],r=e.split(/\r?\n/g);let A=!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){A=!1;break}A||e.startsWith("|||||||")?A=!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")]}(A);let i,s;try{i=(0,he.parseSyml)(n),s=(0,he.parseSyml)(o)}catch(e){throw new X.lk(u.b.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}const a={...i,...s};for(const[e,t]of Object.entries(a))"string"==typeof t&&delete a[e];return await y.xfs.changeFilePromise(r,(0,he.stringifySyml)(a),{automaticNewlines:!0}),!0}(A,l)&&(e.reportInfo(u.b.AUTOMERGE_SUCCESS,"Automatically fixed merge conflicts 👍"),e.reportSeparator())});if(e.hasErrors())return e.exitCode()}if(null!==A.projectCwd){const e=await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeFooter:!1},async e=>{var t;(null===(t=s.VK.telemetry)||void 0===t?void 0:t.isNew)&&(e.reportInfo(u.b.TELEMETRY_NOTICE,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),e.reportInfo(u.b.TELEMETRY_NOTICE,`Run ${B.pretty(A,"yarn config set --home enableTelemetry 0",B.Type.CODE)} to disable`),e.reportSeparator())});if(e.hasErrors())return e.exitCode()}const{project:d,workspace:C}=await h.I.find(A,this.context.cwd),f=await g.C.find(A,{immutable:this.immutableCache,check:this.checkCache});if(!C)throw new c.WorkspaceRequiredError(d.cwd,this.context.cwd);await d.restoreInstallState({restoreResolutions:!1});return(await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeLogs:!0},async e=>{await d.install({cache:f,report:e,immutable:l,skipBuild:this.skipBuilds})})).exitCode()}}de.usage=C.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 the lockfile was to be modified (other paths can be added using the `immutablePaths` configuration setting). 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 `--skip-builds` option is set, Yarn will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\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)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],de.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"})],de.prototype,"immutable",void 0),(0,a.gn)([C.Command.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"})],de.prototype,"immutableCache",void 0),(0,a.gn)([C.Command.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"})],de.prototype,"checkCache",void 0),(0,a.gn)([C.Command.Boolean("--production",{hidden:!0})],de.prototype,"production",void 0),(0,a.gn)([C.Command.Boolean("--non-interactive",{hidden:!0})],de.prototype,"nonInteractive",void 0),(0,a.gn)([C.Command.Boolean("--frozen-lockfile",{hidden:!0})],de.prototype,"frozenLockfile",void 0),(0,a.gn)([C.Command.Boolean("--prefer-offline",{hidden:!0})],de.prototype,"preferOffline",void 0),(0,a.gn)([C.Command.Boolean("--ignore-engines",{hidden:!0})],de.prototype,"ignoreEngines",void 0),(0,a.gn)([C.Command.String("--registry",{hidden:!0})],de.prototype,"registry",void 0),(0,a.gn)([C.Command.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"})],de.prototype,"inlineBuilds",void 0),(0,a.gn)([C.Command.Boolean("--skip-builds",{description:"Skip the build step altogether"})],de.prototype,"skipBuilds",void 0),(0,a.gn)([C.Command.String("--cache-folder",{hidden:!0})],de.prototype,"cacheFolder",void 0),(0,a.gn)([C.Command.Boolean("--silent",{hidden:!0})],de.prototype,"silent",void 0),(0,a.gn)([C.Command.Path(),C.Command.Path("install")],de.prototype,"execute",null);class Ce extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.private=!1,this.relative=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.destination)),o=await s.VK.find(n,this.context.plugins),{project:i,workspace:a}=await h.I.find(o,n);if(!a)throw new c.WorkspaceRequiredError(i.cwd,n);const l=t.topLevelWorkspace,u=[];if(this.all){for(const e of i.workspaces)!e.manifest.name||e.manifest.private&&!this.private||u.push(e);if(0===u.length)throw new C.UsageError("No workspace found to be linked in the target project")}else{if(!a.manifest.name)throw new C.UsageError("The target workspace doesn't have a name and thus cannot be linked");if(a.manifest.private&&!this.private)throw new C.UsageError("The target workspace is marked private - use the --private flag to link it anyway");u.push(a)}for(const e of u){const r=d.stringifyIdent(e.locator),A=this.relative?m.y1.relative(t.cwd,e.cwd):e.cwd;l.manifest.resolutions.push({pattern:{descriptor:{fullName:r}},reference:"portal:"+A})}return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ce.usage=C.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 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)([C.Command.String()],Ce.prototype,"destination",void 0),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Link all workspaces belonging to the target project to the current one"})],Ce.prototype,"all",void 0),(0,a.gn)([C.Command.Boolean("-p,--private",{description:"Also link private workspaces belonging to the target project to the current one"})],Ce.prototype,"private",void 0),(0,a.gn)([C.Command.Boolean("-r,--relative",{description:"Link workspaces using relative paths instead of absolute paths"})],Ce.prototype,"relative",void 0),(0,a.gn)([C.Command.Path("link")],Ce.prototype,"execute",null);class fe extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){return this.cli.run(["exec","node",...this.args])}}fe.usage=C.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)([C.Command.Proxy()],fe.prototype,"args",void 0),(0,a.gn)([C.Command.Path("node")],fe.prototype,"execute",null);var Ie=r(20624),Ee=r(12087),Be=r(85622),ye=r.n(Be),me=r(79669);class we extends c.BaseCommand{constructor(){super(...arguments),this.onlyIfNeeded=!1}async execute(){const e=await s.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(ce.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(!ce.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))throw Q().validRange(this.version)?new C.UsageError("Support for ranges got removed - please use the exact version you want to install, or 'latest' to get the latest build available"):new C.UsageError(`Invalid version descriptor "${this.version}"`);t=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`}return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{r.reportInfo(u.b.UNNAMED,"Downloading "+B.pretty(e,t,"green"));const A=await me.get(t,{configuration:e});await Qe(e,null,A,{report:r})})).exitCode()}}async function Qe(e,t,r,{report:A}){const n=e.projectCwd?e.projectCwd:e.startingCwd;null===t&&await y.xfs.mktempPromise(async e=>{const A=m.y1.join(e,"yarn.cjs");await y.xfs.writeFilePromise(A,r);const{stdout:o}=await se.execvp(process.execPath,[m.cS.fromPortablePath(A),"--version"],{cwd:n,env:{...process.env,YARN_IGNORE_PATH:"1"}});if(t=o.trim(),!Q().valid(t))throw new Error("Invalid semver version")});const o=m.y1.resolve(n,".yarn/releases"),i=m.y1.resolve(o,`yarn-${t}.cjs`),a=m.y1.relative(e.startingCwd,i),c=m.y1.relative(n,i),g=e.get("yarnPath"),l=null===g||g.startsWith(o+"/");A.reportInfo(u.b.UNNAMED,"Saving the new release in "+B.pretty(e,a,"magenta")),await y.xfs.removePromise(m.y1.dirname(i)),await y.xfs.mkdirPromise(m.y1.dirname(i),{recursive:!0}),await y.xfs.writeFilePromise(i,r),await y.xfs.chmodPromise(i,493),l&&await s.VK.updateConfiguration(n,{yarnPath:c})}we.usage=C.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)([C.Command.Boolean("--only-if-needed",{description:"Only lock the Yarn version if it isn't already locked"})],we.prototype,"onlyIfNeeded",void 0),(0,a.gn)([C.Command.String()],we.prototype,"version",void 0),(0,a.gn)([C.Command.Path("policies","set-version"),C.Command.Path("set","version")],we.prototype,"execute",null);const De=/^[0-9]+$/;function be(e){return De.test(e)?`pull/${e}/head`:e}class ve 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 s.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.installPath)):m.y1.resolve(m.cS.toPortablePath((0,Ee.tmpdir)()),"yarnpkg-sources",Ie.makeHash(this.repository).slice(0,6));return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{await ke(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(u.b.UNNAMED,"Building a fresh bundle"),r.reportSeparator(),await Se((({plugins:e,noMinify:t},r)=>[["yarn","build:cli",...(new Array).concat(...e.map(e=>["--plugin",ye().resolve(r,e)])),...t?["--no-minify"]:[],"|"]])(this,t),{configuration:e,context:this.context,target:t}),r.reportSeparator();const A=m.y1.resolve(t,"packages/yarnpkg-cli/bundles/yarn.js"),n=await y.xfs.readFilePromise(A);await Qe(e,"sources",n,{report:r})})).exitCode()}}async function Se(e,{configuration:t,context:r,target:A}){for(const[n,...o]of e){const e="|"===o[o.length-1];if(e&&o.pop(),e)await se.pipevp(n,o,{cwd:A,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(B.pretty(t," $ "+[n,...o].join(" "),"grey")+"\n");try{await se.execvp(n,o,{cwd:A,strict:!0})}catch(e){throw r.stdout.write(e.stdout||e.stack),e}}}}async function ke(e,{configuration:t,report:r,target:A}){let n=!1;if(!e.force&&y.xfs.existsSync(m.y1.join(A,".git"))){r.reportInfo(u.b.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await Se((({branch:e})=>[["git","fetch","origin",be(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]])(e),{configuration:t,context:e.context,target:A}),n=!0}catch(e){r.reportSeparator(),r.reportWarning(u.b.UNNAMED,"Repository update failed; we'll try to regenerate it")}}n||(r.reportInfo(u.b.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await y.xfs.removePromise(A),await y.xfs.mkdirPromise(A,{recursive:!0}),await Se((({repository:e,branch:t},r)=>[["git","init",m.cS.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin",be(t)],["git","reset","--hard","FETCH_HEAD"]])(e,A),{configuration:t,context:e.context,target:A}))}ve.usage=C.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)([C.Command.String("--path",{description:"The path where the repository should be cloned to"})],ve.prototype,"installPath",void 0),(0,a.gn)([C.Command.String("--repository",{description:"The repository that should be cloned"})],ve.prototype,"repository",void 0),(0,a.gn)([C.Command.String("--branch",{description:"The branch of the repository that should be cloned"})],ve.prototype,"branch",void 0),(0,a.gn)([C.Command.Array("--plugin",{description:"An array of additional plugins that should be included in the bundle"})],ve.prototype,"plugins",void 0),(0,a.gn)([C.Command.Boolean("--no-minify",{description:"Build a bundle for development (debugging) - non-minified and non-mangled"})],ve.prototype,"noMinify",void 0),(0,a.gn)([C.Command.Boolean("-f,--force",{description:"Always clone the repository instead of trying to fetch the latest commits"})],ve.prototype,"force",void 0),(0,a.gn)([C.Command.Path("set","version","from","sources")],ve.prototype,"execute",null);var Ne=r(78835);const Fe=require("vm");async function Ke(e){const t=await me.get("https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml",{configuration:e});return(0,he.parseSyml)(t.toString())}class Me extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{const r=await Ke(e);for(const[e,{experimental:A,...n}]of Object.entries(r)){let r=e;A&&(r+=" [experimental]"),t.reportJson({name:e,experimental:A,...n}),t.reportInfo(null,r)}})).exitCode()}}Me.usage=C.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)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Me.prototype,"json",void 0),(0,a.gn)([C.Command.Path("plugin","list")],Me.prototype,"execute",null);class Re extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const{project:r}=await h.I.find(e,this.context.cwd);let A,n;if(this.name.match(/^\.{0,2}[\\/]/)||m.cS.isAbsolute(this.name)){const o=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.name));t.reportInfo(u.b.UNNAMED,"Reading "+B.pretty(e,o,B.Type.PATH)),A=m.y1.relative(r.cwd,o),n=await y.xfs.readFilePromise(o)}else{let r;if(this.name.match(/^https?:/)){try{new Ne.URL(this.name)}catch(e){throw new X.lk(u.b.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}A=this.name,r=this.name}else{const t=d.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),n=d.stringifyIdent(t),o=await Ke(e);if(!Object.prototype.hasOwnProperty.call(o,n))throw new X.lk(u.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${n}" 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).`);A=n,r=o[n].url}t.reportInfo(u.b.UNNAMED,"Downloading "+B.pretty(e,r,"green")),n=await me.get(r,{configuration:e})}await xe(A,n,{project:r,report:t})})).exitCode()}}async function xe(e,t,{project:r,report:A}){const{configuration:n}=r,o={},i={exports:o};(0,Fe.runInNewContext)(t.toString(),{module:i,exports:o});const a=i.exports.name,c=`.yarn/plugins/${a}.cjs`,g=m.y1.resolve(r.cwd,c);A.reportInfo(u.b.UNNAMED,"Saving the new plugin in "+B.pretty(n,c,"magenta")),await y.xfs.mkdirPromise(m.y1.dirname(g),{recursive:!0}),await y.xfs.writeFilePromise(g,t);const l={path:c,spec:e};await s.VK.updateConfiguration(r.cwd,e=>{const t=[];let A=!1;for(const n of e.plugins||[]){const e="string"!=typeof n?n.path:n,o=m.y1.resolve(r.cwd,m.cS.toPortablePath(e)),{name:i}=P.dynamicRequire(m.cS.fromPortablePath(o));i!==a?t.push(n):(t.push(l),A=!0)}return A||t.push(l),{...e,plugins:t}})}Re.usage=C.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)([C.Command.String()],Re.prototype,"name",void 0),(0,a.gn)([C.Command.Path("plugin","import")],Re.prototype,"execute",null);class Le 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 s.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.installPath)):m.y1.resolve(m.cS.toPortablePath((0,Ee.tmpdir)()),"yarnpkg-sources",Ie.makeHash(this.repository).slice(0,6));return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const{project:A}=await h.I.find(e,this.context.cwd),n=d.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),o=d.stringifyIdent(n),i=await Ke(e);if(!Object.prototype.hasOwnProperty.call(i,o))throw new X.lk(u.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 s=o,a=s.replace(/@yarnpkg\//,"");await ke(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(u.b.UNNAMED,"Building a fresh "+a),r.reportSeparator(),await Se((({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=m.y1.resolve(t,`packages/${a}/bundles/${s}.js`),g=await y.xfs.readFilePromise(c);await xe(s,g,{project:A,report:r})})).exitCode()}}Le.usage=C.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)([C.Command.String()],Le.prototype,"name",void 0),(0,a.gn)([C.Command.String("--path",{description:"The path where the repository should be cloned to"})],Le.prototype,"installPath",void 0),(0,a.gn)([C.Command.String("--repository",{description:"The repository that should be cloned"})],Le.prototype,"repository",void 0),(0,a.gn)([C.Command.String("--branch",{description:"The branch of the repository that should be cloned"})],Le.prototype,"branch",void 0),(0,a.gn)([C.Command.Boolean("--no-minify",{description:"Build a plugin for development (debugging) - non-minified and non-mangled"})],Le.prototype,"noMinify",void 0),(0,a.gn)([C.Command.Boolean("-f,--force",{description:"Always clone the repository instead of trying to fetch the latest commits"})],Le.prototype,"force",void 0),(0,a.gn)([C.Command.Path("plugin","import","from","sources")],Le.prototype,"execute",null);class Pe extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const A=this.name,n=d.parseIdent(A);if(!e.plugins.has(A))throw new C.UsageError(d.prettyIdent(e,n)+" isn't referenced by the current configuration");const o=`.yarn/plugins/${A}.cjs`,i=m.y1.resolve(t.cwd,o);y.xfs.existsSync(i)&&(r.reportInfo(u.b.UNNAMED,`Removing ${B.pretty(e,o,B.Type.PATH)}...`),await y.xfs.removePromise(i)),r.reportInfo(u.b.UNNAMED,"Updating the configuration..."),await s.VK.updateConfiguration(t.cwd,e=>{if(!Array.isArray(e.plugins))return e;const t=e.plugins.filter(e=>e.path!==o);return e.plugins.length===t.length?e:{...e,plugins:t}})})).exitCode()}}Pe.usage=C.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)([C.Command.String()],Pe.prototype,"name",void 0),(0,a.gn)([C.Command.Path("plugin","remove")],Pe.prototype,"execute",null);class Oe extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.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 A=r;e&&(A+=" [builtin]"),t.reportJson({name:r,builtin:e}),t.reportInfo(null,""+A)}})).exitCode()}}Oe.usage=C.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)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Oe.prototype,"json",void 0),(0,a.gn)([C.Command.Path("plugin","runtime")],Oe.prototype,"execute",null);class Ue extends c.BaseCommand{constructor(){super(...arguments),this.idents=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=new Set;for(const e of this.idents)n.add(d.parseIdent(e).identHash);await t.resolveEverything({cache:A,report:new I.$});const o=e.get("bstatePath"),i=y.xfs.existsSync(o)?(0,he.parseSyml)(await y.xfs.readFilePromise(o,"utf8")):{},a=new Map;for(const e of t.storedPackages.values()){if(!Object.prototype.hasOwnProperty.call(i,e.locatorHash))continue;if(0===n.size||n.has(e.identHash))continue;const t=i[e.locatorHash];a.set(e.locatorHash,t)}if(a.size>0){const r=e.get("bstatePath"),A=h.I.generateBuildStateFile(a,t.storedPackages);await y.xfs.mkdirPromise(m.y1.dirname(r),{recursive:!0}),await y.xfs.changeFilePromise(r,A,{automaticNewlines:!0})}else await y.xfs.removePromise(o);return(await p.Pk.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ue.usage=C.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)([C.Command.Rest()],Ue.prototype,"idents",void 0),(0,a.gn)([C.Command.Path("rebuild")],Ue.prototype,"execute",null);class Te extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.patterns=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});const o=this.all?t.workspaces:[r],i=[n.REGULAR,n.DEVELOPMENT,n.PEER],a=[];let l=!1;const u=[];for(const e of this.patterns){let t=!1;const r=d.parseIdent(e);for(const A of o){const n=[...A.manifest.peerDependenciesMeta.keys()];for(const r of Z()(n,e))A.manifest.peerDependenciesMeta.delete(r),l=!0,t=!0;for(const e of i){const n=A.manifest.getForScope(e),o=[...n.values()].map(e=>d.stringifyIdent(e));for(const i of Z()(o,d.stringifyIdent(r))){const{identHash:r}=d.parseIdent(i),o=n.get(r);if(void 0===o)throw new Error("Assertion failed: Expected the descriptor to be registered");A.manifest[e].delete(r),u.push([A,e,o]),l=!0,t=!0}}}t||a.push(e)}const f=a.length>1?"Patterns":"Pattern",I=a.length>1?"don't":"doesn't",E=this.all?"any":"this";if(a.length>0)throw new C.UsageError(`${f} ${B.prettyList(e,a,s.a5.CODE)} ${I} match any packages referenced by ${E} workspace`);if(l){await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyRemoval,u);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}return 0}}Te.usage=C.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 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)([C.Command.Boolean("-A,--all",{description:"Apply the operation to all workspaces from the current project"})],Te.prototype,"all",void 0),(0,a.gn)([C.Command.Rest()],Te.prototype,"patterns",void 0),(0,a.gn)([C.Command.Path("remove")],Te.prototype,"execute",null);class je extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const A=r.manifest.scripts,n=P.sortMap(A.keys(),e=>e),o={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},i=n.reduce((e,t)=>Math.max(e,t.length),0);for(const[e,r]of A.entries())t.reportInfo(null,`${e.padEnd(i," ")} ${(0,T.inspect)(r,o)}`)})).exitCode()}}(0,a.gn)([C.Command.Path("run")],je.prototype,"execute",null);class Ye 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 s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r,locator:A}=await h.I.find(e,this.context.cwd);await t.restoreInstallState();const n=this.topLevel?t.topLevelWorkspace.anchoredLocator:A;if(!this.binariesOnly&&await R.hasPackageScript(n,this.scriptName,{project:t}))return await R.executePackageScript(n,this.scriptName,this.args,{project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if((await R.getPackageAccessibleBinaries(n,{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 R.executePackageAccessibleBinary(n,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 R.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 C.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${d.prettyLocator(e,A)}). 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 C.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${d.prettyLocator(e,A)}).`);{if("global"===this.scriptName)throw new C.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 c.pluginCommands)for(const A of r)if(e.length>=A.length&&JSON.stringify(e.slice(0,A.length))===JSON.stringify(A))throw new C.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 C.UsageError(`Couldn't find a script named "${this.scriptName}".`)}}}Ye.usage=C.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.\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)([C.Command.String("--inspect",{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"})],Ye.prototype,"inspect",void 0),(0,a.gn)([C.Command.String("--inspect-brk",{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"})],Ye.prototype,"inspectBrk",void 0),(0,a.gn)([C.Command.Boolean("-T,--top-level",{hidden:!0})],Ye.prototype,"topLevel",void 0),(0,a.gn)([C.Command.Boolean("-B,--binaries-only",{hidden:!0})],Ye.prototype,"binariesOnly",void 0),(0,a.gn)([C.Command.Boolean("--silent",{hidden:!0})],Ye.prototype,"silent",void 0),(0,a.gn)([C.Command.String()],Ye.prototype,"scriptName",void 0),(0,a.gn)([C.Command.Proxy()],Ye.prototype,"args",void 0),(0,a.gn)([C.Command.Path("run")],Ye.prototype,"execute",null);class Ge extends c.BaseCommand{constructor(){super(...arguments),this.save=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=d.parseDescriptor(this.descriptor,!0),o=d.makeDescriptor(n,this.resolution);t.storedDescriptors.set(n.descriptorHash,n),t.storedDescriptors.set(o.descriptorHash,o),t.resolutionAliases.set(n.descriptorHash,o.descriptorHash);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ge.usage=C.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@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]}),(0,a.gn)([C.Command.String()],Ge.prototype,"descriptor",void 0),(0,a.gn)([C.Command.String()],Ge.prototype,"resolution",void 0),(0,a.gn)([C.Command.Boolean("-s,--save",{description:"Persist the resolution inside the top-level manifest"})],Ge.prototype,"save",void 0),(0,a.gn)([C.Command.Path("set","resolution")],Ge.prototype,"execute",null);class He extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.interactive=null,this.exact=!1,this.tilde=!1,this.caret=!1}async execute(){var e;const t=await s.VK.find(this.context.cwd,this.context.plugins),{project:r,workspace:A}=await h.I.find(t,this.context.cwd),o=await g.C.find(t);if(!A)throw new c.WorkspaceRequiredError(r.cwd,this.context.cwd);const a=null!==(e=this.interactive)&&void 0!==e?e:t.get("preferInteractive"),I=D(this,r),E=a?[i.KEEP,i.REUSE,i.PROJECT,i.LATEST]:[i.PROJECT,i.LATEST],y=[],m=[];for(const e of this.patterns){let t=!1;const A=d.parseDescriptor(e);for(const e of r.workspaces)for(const i of[n.REGULAR,n.DEVELOPMENT]){const n=[...e.manifest.getForScope(i).values()].map(e=>d.stringifyIdent(e));for(const s of Z()(n,d.stringifyIdent(A))){const n=d.parseIdent(s),a=e.manifest[i].get(n.identHash);if(void 0===a)throw new Error("Assertion failed: Expected the descriptor to be registered");const c=d.makeDescriptor(n,A.range);y.push(Promise.resolve().then(async()=>[e,i,a,await F(c,{project:r,workspace:e,cache:o,target:i,modifier:I,strategies:E})])),t=!0}}t||m.push(e)}if(m.length>1)throw new C.UsageError(`Patterns ${B.prettyList(t,m,s.a5.CODE)} don't match any packages referenced by any workspace`);if(m.length>0)throw new C.UsageError(`Pattern ${B.prettyList(t,m,s.a5.CODE)} doesn't match any packages referenced by any workspace`);const w=await Promise.all(y),Q=await l.h.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async e=>{for(const[,,A,{suggestions:n,rejections:o}]of w){const i=n.filter(e=>null!==e.descriptor);if(0===i.length){const[n]=o;if(void 0===n)throw new Error("Assertion failed: Expected an error to have been set");const i=this.cli.error(n);r.configuration.get("enableNetwork")?e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range\n\n${i}`):e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range (note: network resolution has been disabled)\n\n${i}`)}else i.length>1&&!a&&e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,d.prettyDescriptor(t,A)+" has multiple possible upgrade strategies; use -i to disambiguate manually")}});if(Q.hasErrors())return Q.exitCode();let b=!1;const v=[];for(const[e,A,,{suggestions:n}]of w){let o;const i=n.filter(e=>null!==e.descriptor),s=i[0].descriptor,a=i.every(e=>d.areDescriptorsEqual(e.descriptor,s));1===i.length||a?o=s:(b=!0,({answer:o}=await(0,f.prompt)({type:"select",name:"answer",message:`Which range to you want to use in ${d.prettyWorkspace(t,e)} ❯ ${A}?`,choices:n.map(({descriptor:e,name:t,reason:r})=>e?{name:t,hint:r,descriptor:e}:{name:t,hint:r,disabled:!0}),onCancel:()=>process.exit(130),result(e){return this.find(e,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout})));const c=e.manifest[A].get(o.identHash);if(void 0===c)throw new Error("Assertion failed: This descriptor should have a matching entry");if(c.descriptorHash!==o.descriptorHash)e.manifest[A].set(o.identHash,o),v.push([e,A,c,o]);else{const A=t.makeResolver(),n={project:r,resolver:A},o=A.bindDescriptor(c,e.anchoredLocator,n);r.forgetResolution(o)}}await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,v),b&&this.context.stdout.write("\n");return(await p.Pk.start({configuration:t,stdout:this.context.stdout},async e=>{await r.install({cache:o,report:e})})).exitCode()}}He.usage=C.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 Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\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)([C.Command.Rest()],He.prototype,"patterns",void 0),(0,a.gn)([C.Command.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"})],He.prototype,"interactive",void 0),(0,a.gn)([C.Command.Boolean("-E,--exact",{description:"Don't use any semver modifier on the resolved range"})],He.prototype,"exact",void 0),(0,a.gn)([C.Command.Boolean("-T,--tilde",{description:"Use the `~` semver modifier on the resolved range"})],He.prototype,"tilde",void 0),(0,a.gn)([C.Command.Boolean("-C,--caret",{description:"Use the `^` semver modifier on the resolved range"})],He.prototype,"caret",void 0),(0,a.gn)([C.Command.Path("up")],He.prototype,"execute",null);class Je extends c.BaseCommand{constructor(){super(...arguments),this.recursive=!1,this.json=!1,this.peers=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const A=d.parseIdent(this.package).identHash,n=this.recursive?function(e,t,{configuration:r,peers:A}){const n=P.sortMap(e.workspaces,e=>d.stringifyLocator(e.anchoredLocator)),o=new Set,i=new Set,s=r=>{if(o.has(r.locatorHash))return i.has(r.locatorHash);if(o.add(r.locatorHash),r.identHash===t)return i.add(r.locatorHash),!0;let n=!1;r.identHash===t&&(n=!0);for(const t of r.dependencies.values()){if(!A&&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 i=e.storedPackages.get(o);if(!i)throw new Error("Assertion failed: The package should have been registered");s(i)&&(n=!0)}return n&&i.add(r.locatorHash),n};for(const t of n){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");s(r)}const a=new Set,c={},g={children:c},l=(t,r,n)=>{if(!i.has(t.locatorHash))return;const o={},s={value:null!==n?B.tuple(B.Type.DEPENDENT,{locator:t,descriptor:n}):B.tuple(B.Type.LOCATOR,t),children:o};if(r[d.stringifyLocator(t)]=s,!a.has(t.locatorHash)&&(a.add(t.locatorHash),null===n||!e.tryWorkspaceByLocator(t)))for(const r of t.dependencies.values()){if(!A&&t.peerDependencies.has(r.identHash))continue;const n=e.storedResolutions.get(r.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");const i=e.storedPackages.get(n);if(!i)throw new Error("Assertion failed: The package should have been registered");l(i,o,r)}};for(const t of n){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");l(r,c,null)}return g}(t,A,{configuration:e,peers:this.peers}):function(e,t,{configuration:r,peers:A}){const n=P.sortMap(e.storedPackages.values(),e=>d.stringifyLocator(e)),o={},i={children:o};for(const r of n){const n={},i=null;for(const s of r.dependencies.values()){if(!A&&r.peerDependencies.has(s.identHash))continue;const a=e.storedResolutions.get(s.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){const e=d.stringifyLocator(r);o[e]={value:[r,B.Type.LOCATOR],children:n}}const g=d.stringifyLocator(c);n[g]={value:[{descriptor:s,locator:c},B.Type.DEPENDENT]}}}return i}(t,A,{configuration:e,peers:this.peers});le.emitTree(n,{configuration:e,stdout:this.context.stdout,json:this.json,separators:1})}}Je.usage=C.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 ',examples:[["Explain why lodash is used in your project","$0 why lodash"]]}),(0,a.gn)([C.Command.String()],Je.prototype,"package",void 0),(0,a.gn)([C.Command.Boolean("-R,--recursive",{description:"List, for each workspace, what are all the paths that lead to the dependency"})],Je.prototype,"recursive",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Je.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--peers",{description:"Also print the peer dependencies that match the specified name"})],Je.prototype,"peers",void 0),(0,a.gn)([C.Command.Path("why")],Je.prototype,"execute",null);class qe extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async e=>{for(const r of t.workspaces){const{manifest:A}=r;let n;if(this.verbose){const e=new Set,r=new Set;for(const n of E.G.hardDependencies)for(const[o,i]of A.getForScope(n)){const A=t.tryWorkspaceByDescriptor(i);null===A?t.workspacesByIdent.has(o)&&r.add(i):e.add(A)}n={workspaceDependencies:Array.from(e).map(e=>e.relativeCwd),mismatchedWorkspaceDependencies:Array.from(r).map(e=>d.stringifyDescriptor(e))}}e.reportInfo(null,""+r.relativeCwd),e.reportJson({location:r.relativeCwd,name:A.name?d.stringifyIdent(A.name):null,...n})}})).exitCode()}}qe.usage=C.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 "}),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Also return the cross-dependencies between workspaces"})],qe.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],qe.prototype,"json",void 0),(0,a.gn)([C.Command.Path("workspaces","list")],qe.prototype,"execute",null);class ze extends C.Command{constructor(){super(...arguments),this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=t.workspaces,n=new Map(A.map(e=>{const t=d.convertToIdent(e.locator);return[d.stringifyIdent(t),e]})),o=n.get(this.workspaceName);if(void 0===o){const e=Array.from(n.keys()).sort();throw new C.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})}}ze.usage=C.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)([C.Command.String()],ze.prototype,"workspaceName",void 0),(0,a.gn)([C.Command.String()],ze.prototype,"commandName",void 0),(0,a.gn)([C.Command.Proxy()],ze.prototype,"args",void 0),(0,a.gn)([C.Command.Path("workspace")],ze.prototype,"execute",null);const We={configuration:{enableImmutableInstalls:{description:"If true, prevents the install command from modifying the lockfile",type:s.a2.BOOLEAN,default:!1},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:s.a2.STRING,values:["^","~",""],default:o.CARET}},commands:[L,j,q,Ge,ve,we,qe,re,Ae,ne,ie,M,x,z,te,ae,ge,ue,de,Ce,fe,Le,Re,Pe,Me,Oe,Ue,Te,je,Ye,He,Je,ze]}},68023:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E,fileUtils:()=>A});var A={};r.r(A),r.d(A,{makeArchiveFromLocator:()=>p,makeBufferFromLocator:()=>d,makeLocator:()=>h,makeSpec:()=>u,parseSpec:()=>l});var n=r(54143),o=r(46009);const i=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,s=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/;var a=r(73632),c=r(72785),g=r(75448);function l(e){const{params:t,selector:r}=n.parseRange(e),A=o.cS.toPortablePath(r);return{parentLocator:t&&"string"==typeof t.locator?n.parseLocator(t.locator):null,path:A}}function u({parentLocator:e,path:t,folderHash:r,protocol:A}){const o=null!==e?{locator:n.stringifyLocator(e)}:{},i=void 0!==r?{hash:r}:{};return n.makeRange({protocol:A,source:t,selector:t,params:{...i,...o}})}function h(e,{parentLocator:t,path:r,folderHash:A,protocol:o}){return n.makeLocator(e,u({parentLocator:t,path:r,folderHash:A,protocol:o}))}async function p(e,{protocol:t,fetchOptions:r,inMemory:A=!1}){const{parentLocator:i,path:s}=n.parseFileStyleRange(e.reference,{protocol:t}),l=o.y1.isAbsolute(s)?{packageFs:new g.M(o.LZ.root),prefixPath:o.LZ.dot,localPath:o.LZ.root}:await r.fetcher.fetch(i,r),u=l.localPath?{packageFs:new g.M(o.LZ.root),prefixPath:o.y1.relative(o.LZ.root,l.localPath)}:l;l!==u&&l.releaseFs&&l.releaseFs();const h=u.packageFs,p=o.y1.join(u.prefixPath,s);return await a.releaseAfterUseAsync(async()=>await c.makeArchiveFromDirectory(p,{baseFs:h,prefixPath:n.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:A}),u.releaseFs)}async function d(e,{protocol:t,fetchOptions:r}){return(await p(e,{protocol:t,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var C=r(20624),f=r(32485),I=r(46611);const E={fetchers:[class{supports(e,t){return!!s.test(e.reference)&&!!e.reference.startsWith("file:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.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:A,releaseFs:o,prefixPath:n.getIdentVendorPath(e),checksum:i}}async fetchFromDisk(e,t){const{parentLocator:r,path:A}=n.parseFileStyleRange(e.reference,{protocol:"file:"}),i=o.y1.isAbsolute(A)?{packageFs:new g.M(o.LZ.root),prefixPath:o.LZ.dot,localPath:o.LZ.root}:await t.fetcher.fetch(r,t),s=i.localPath?{packageFs:new g.M(o.LZ.root),prefixPath:o.y1.relative(o.LZ.root,i.localPath)}:i;i!==s&&i.releaseFs&&i.releaseFs();const l=s.packageFs,u=o.y1.join(s.prefixPath,A),h=await l.readFilePromise(u);return await a.releaseAfterUseAsync(async()=>await c.convertToZip(h,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.getIdentVendorPath(e),stripComponents:1}),s.releaseFs)}},class{supports(e,t){return!!e.reference.startsWith("file:")}getLocalPath(e,t){const{parentLocator:r,path:A}=n.parseFileStyleRange(e.reference,{protocol:"file:"});if(o.y1.isAbsolute(A))return A;const i=t.fetcher.getLocalPath(r,t);return null===i?null:o.y1.resolve(i,A)}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.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:A,releaseFs:o,prefixPath:n.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:i}}async fetchFromDisk(e,t){return p(e,{protocol:"file:",fetchOptions:t})}}],resolvers:[class{supportsDescriptor(e,t){return!!s.test(e.range)&&(!!e.range.startsWith("file:")||!!i.test(e.range))}supportsLocator(e,t){return!!s.test(e.reference)&&!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return i.test(e.range)&&(e=n.makeDescriptor(e,"file:"+e.range)),n.bindDescriptor(e,{locator:n.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let A=e.range;return A.startsWith("file:")&&(A=A.slice("file:".length)),[n.makeLocator(e,"file:"+o.cS.toPortablePath(A))]}async getSatisfying(e,t,r){return null}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),A=await a.releaseAfterUseAsync(async()=>await I.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:f.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}},class{supportsDescriptor(e,t){return!!e.range.match(i)||!!e.range.startsWith("file:")}supportsLocator(e,t){return!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return i.test(e.range)&&(e=n.makeDescriptor(e,"file:"+e.range)),n.bindDescriptor(e,{locator:n.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{path:A,parentLocator:o}=l(e.range);if(null===o)throw new Error("Assertion failed: The descriptor should have been bound");const i=await d(n.makeLocator(e,n.makeRange({protocol:"file:",source:A,selector:A,params:{locator:n.stringifyLocator(o)}})),{protocol:"file:",fetchOptions:r.fetchOptions});return[h(e,{parentLocator:o,path:A,folderHash:C.makeHash("1",i).slice(0,6),protocol:"file:"})]}async getSatisfying(e,t,r){return null}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),A=await a.releaseAfterUseAsync(async()=>await I.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:f.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},75641:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F,gitUtils:()=>A});var A={};r.r(A),r.d(A,{TreeishProtocols:()=>y,clone:()=>S,isGitUrl:()=>m,lsRemote:()=>b,normalizeLocator:()=>D,normalizeRepoUrl:()=>Q,resolveUrl:()=>v,splitRepoUrl:()=>w});var n=r(39922),o=r(54143),i=r(63088),s=r(73632),a=r(72785),c=r(43896),g=r(46009),l=r(79669),u=r(6220),h=r(71191),p=r.n(h),d=r(53887),C=r.n(d),f=r(78835),I=r.n(f);function E(){return{...process.env,GIT_SSH_COMMAND:"ssh -o BatchMode=yes"}}const B=[/^ssh:/,/^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 y;function m(e){return!!e&&B.some(t=>!!e.match(t))}function w(e){const t=(e=Q(e)).indexOf("#");if(-1===t)return{repo:e,treeish:{protocol:y.Head,request:"master"},extra:{}};const r=e.slice(0,t),A=e.slice(t+1);if(A.match(/^[a-z]+=/)){const e=p().parse(A);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(y).find(t=>Object.prototype.hasOwnProperty.call(e,t));let n,o;void 0!==t?(n=t,o=e[t]):(n=y.Head,o="master");for(const t of Object.values(y))delete e[t];return{repo:r,treeish:{protocol:n,request:o},extra:e}}{const e=A.indexOf(":");let t,n;return-1===e?(t=null,n=A):(t=A.slice(0,e),n=A.slice(e+1)),{repo:r,treeish:{protocol:t,request:n},extra:{}}}}function Q(e,{git:t=!1}={}){var r;if(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"),t){let t;e=e.replace(/^git\+([^:]+):/,"$1:");try{t=I().parse(e)}catch(e){t=null}t&&"ssh:"===t.protocol&&(null===(r=t.path)||void 0===r?void 0:r.startsWith("/:"))&&(e=e.replace(/^ssh:\/\//,""))}return e}function D(e){return o.makeLocator(e,Q(e.reference))}async function b(e,t){const r=Q(e,{git:!0});if(!l.getNetworkSettings(r,{configuration:t}).enableNetwork)throw new Error(`Request to '${r}' has been blocked because of your configuration settings`);let A;try{A=await u.execvp("git",["ls-remote","--refs",r],{cwd:t.startingCwd,env:E(),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 i;for(;null!==(i=o.exec(A.stdout));)n.set(i[2],i[1]);return n}async function v(e,t){const{repo:r,treeish:{protocol:A,request:n},extra:o}=w(e),i=await b(r,t),s=(e,t)=>{switch(e){case y.Commit:if(!t.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return p().stringify({...o,commit:t});case y.Head:{const e=i.get("refs/heads/"+t);if(void 0===e)throw new Error(`Unknown head ("${t}")`);return p().stringify({...o,commit:e})}case y.Tag:{const e=i.get("refs/tags/"+t);if(void 0===e)throw new Error(`Unknown tag ("${t}")`);return p().stringify({...o,commit:e})}case y.Semver:{if(!C().validRange(t))throw new Error(`Invalid range ("${t}")`);const e=new Map([...i.entries()].filter(([e])=>e.startsWith("refs/tags/")).map(([e,t])=>[C().parse(e.slice(10)),t]).filter(e=>null!==e[0])),r=C().maxSatisfying([...e.keys()],t);if(null===r)throw new Error(`No matching range ("${t}")`);return p().stringify({...o,commit:e.get(r)})}case null:{let e;if(null!==(e=a(y.Commit,t)))return e;if(null!==(e=a(y.Tag,t)))return e;if(null!==(e=a(y.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}")`)}},a=(e,t)=>{try{return s(e,t)}catch(e){return null}};return`${r}#${s(A,n)}`}async function S(e,t){return await t.getLimit("cloneConcurrency")(async()=>{const{repo:r,treeish:{protocol:A,request:n}}=w(e);if("commit"!==A)throw new Error("Invalid treeish protocol when cloning");const o=Q(r,{git:!0});if(!1===l.getNetworkSettings(o,{configuration:t}).enableNetwork)throw new Error(`Request to '${o}' has been blocked because of your configuration settings`);const i=await c.xfs.mktempPromise(),s={cwd:i,env:E(),strict:!0};try{await u.execvp("git",["clone","-c core.autocrlf=false",o,g.cS.fromPortablePath(i)],s),await u.execvp("git",["checkout",""+n],s)}catch(e){throw e.message="Repository clone failed: "+e.message,e}return i})}!function(e){e.Commit="commit",e.Head="head",e.Tag="tag",e.Semver="semver"}(y||(y={}));var k=r(32485),N=r(46611);const F={configuration:{cloneConcurrency:{description:"Maximal number of concurrent clones",type:n.a2.NUMBER,default:2}},fetchers:[class{supports(e,t){return m(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,A=D(e),n=new Map(t.checksums);n.set(A.locatorHash,r);const i={...t,checksums:n},s=await this.downloadHosted(A,i);if(null!==s)return s;const[a,c,g]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,o.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote repository"),loader:()=>this.cloneFromRemote(A,i),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:a,releaseFs:c,prefixPath:o.getIdentVendorPath(e),checksum:g}}async downloadHosted(e,t){return t.project.configuration.reduceHook(e=>e.fetchHostedRepository,null,e,t)}async cloneFromRemote(e,t){const r=await S(e.reference,t.project.configuration),A=w(e.reference),n=g.y1.join(r,"package.tgz");await i.prepareExternalProject(r,n,{configuration:t.project.configuration,report:t.report,workspace:A.extra.workspace});const l=await c.xfs.readFilePromise(n);return await s.releaseAfterUseAsync(async()=>await a.convertToZip(l,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:o.getIdentVendorPath(e),stripComponents:1}))}}],resolvers:[class{supportsDescriptor(e,t){return m(e.range)}supportsLocator(e,t){return m(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=await v(e.range,r.project.configuration);return[o.makeLocator(e,A)]}async getSatisfying(e,t,r){return null}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),A=await s.releaseAfterUseAsync(async()=>await N.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:k.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},68126:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var A=r(54143),n=r(79669),o=r(72785),i=r(63088),s=r(43896),a=r(75448),c=r(46009),g=r(75641),l=r(71191),u=r.n(l);const h=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];class p{supports(e,t){return!(!(r=e.reference)||!h.some(e=>!!r.match(e)));var r}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,A.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:n,releaseFs:o,prefixPath:A.getIdentVendorPath(e),checksum:i}}async fetchFromNetwork(e,t){const r=await n.get(this.getLocatorUrl(e,t),{configuration:t.project.configuration});return await s.xfs.mktempPromise(async n=>{const l=new a.M(n);await o.extractArchiveTo(r,l,{stripComponents:1});const u=g.gitUtils.splitRepoUrl(e.reference),h=c.y1.join(n,"package.tgz");await i.prepareExternalProject(n,h,{configuration:t.project.configuration,report:t.report,workspace:u.extra.workspace});const p=await s.xfs.readFilePromise(h);return await o.convertToZip(p,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:A.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,t){const{auth:r,username:A,reponame:n,treeish:o}=function(e){let t;for(const r of h)if(t=e.match(r),t)break;if(!t)throw new Error(`Input cannot be parsed as a valid GitHub URL ('${e}').`);let[,r,A,n,o="master"]=t;const{commit:i}=u().parse(o);return o=i||o.replace(/[^:]*:/,""),{auth:r,username:A,reponame:n,treeish:o}}(e.reference);return`https://${r?r+"@":""}github.com/${A}/${n}/archive/${o}.tar.gz`}}const d={hooks:{async fetchHostedRepository(e,t,r){if(null!==e)return e;const A=new p;if(!A.supports(t,r))return null;try{return await A.fetch(t,r)}catch(e){return null}}}}},99148:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var A=r(54143),n=r(79669),o=r(72785);const i=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,s=/^https?:/;var a=r(46611),c=r(32485),g=r(73632);const l={fetchers:[class{supports(e,t){return!!i.test(e.reference)&&!!s.test(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,A.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:o,prefixPath:A.getIdentVendorPath(e),checksum:i}}async fetchFromNetwork(e,t){const r=await n.get(e.reference,{configuration:t.project.configuration});return await o.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:A.getIdentVendorPath(e),stripComponents:1})}}],resolvers:[class{supportsDescriptor(e,t){return!!i.test(e.range)&&!!s.test(e.range)}supportsLocator(e,t){return!!i.test(e.reference)&&!!s.test(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[A.convertDescriptorToLocator(e)]}async getSatisfying(e,t,r){return null}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),A=await g.releaseAfterUseAsync(async()=>await a.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:c.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},64314:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>I});var A=r(39922),n=r(36370),o=r(25413),i=r(46611),s=r(85824),a=r(6220),c=r(63088),g=r(54143),l=r(43896),u=r(46009),h=r(40822),p=r(80305),d=r.n(p),C=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(l.xfs.existsSync(u.y1.join(this.context.cwd,i.G.fileName)))throw new h.UsageError("A package.json already exists in the specified directory");const e=await A.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 h.UsageError(`Cannot use the --install flag when the current directory already uses yarnPath (from ${e.sources.get("yarnPath")})`);if(null!==e.projectCwd)throw new h.UsageError("Cannot use the --install flag when the current directory is already part of a project");l.xfs.existsSync(this.context.cwd)||await l.xfs.mkdirPromise(this.context.cwd,{recursive:!0});const r=u.y1.join(this.context.cwd,e.get("lockfileFilename"));l.xfs.existsSync(r)||await l.xfs.writeFilePromise(r,"");const A=await this.cli.run(["set","version",t]);if(0!==A)return A;this.context.stdout.write("\n");const n=["--assume-fresh-project"];return this.private&&n.push("-p"),this.workspace&&n.push("-w"),this.yes&&n.push("-y"),await l.xfs.mktempPromise(async e=>{const{code:t}=await a.pipevp("yarn",["init",...n],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await c.makeScriptEnv({binFolder:e})});return t})}async executeRegular(e){let t=null;if(!this.assumeFreshProject)try{t=await s.I.find(e,this.context.cwd)}catch(e){t=null}l.xfs.existsSync(this.context.cwd)||await l.xfs.mkdirPromise(this.context.cwd,{recursive:!0});const r=new i.G,A=Object.fromEntries(e.get("initFields").entries());r.load(A),r.name=g.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 l.xfs.mkdirPromise(u.y1.join(this.context.cwd,"packages"),{recursive:!0}),r.workspaceDefinitions=[{pattern:"packages/*"}]);const n={};r.exportTo(n),C.inspect.styles.name="cyan",this.context.stdout.write((0,C.inspect)(n,{depth:1/0,colors:!0,compact:!1})+"\n");const o=u.y1.join(this.context.cwd,i.G.fileName);await l.xfs.changeFilePromise(o,JSON.stringify(n,null,2)+"\n");const c=u.y1.join(this.context.cwd,"README.md");if(l.xfs.existsSync(c)||await l.xfs.writeFilePromise(c,`# ${g.stringifyIdent(r.name)}\n`),!t){const t=u.y1.join(this.context.cwd,u.QS.lockfile);await l.xfs.writeFilePromise(t,"");const r=["/.yarn/** linguist-vendored"].map(e=>e+"\n").join(""),A=u.y1.join(this.context.cwd,".gitattributes");l.xfs.existsSync(A)||await l.xfs.writeFilePromise(A,r);const n=["/.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");l.xfs.existsSync(o)||await l.xfs.writeFilePromise(o,n);const i={"*":{endOfLine:"lf",insertFinalNewline:!0},"*.{js,json,.yml}":{charset:"utf-8",indentStyle:"space",indentSize:2}};d()(i,e.get("initEditorConfig"));let s="root = true\n";for(const[e,t]of Object.entries(i)){s+=`\n[${e}]\n`;for(const[e,r]of Object.entries(t)){s+=`${e.replace(/[A-Z]/g,e=>"_"+e.toLowerCase())} = ${r}\n`}}const c=u.y1.join(this.context.cwd,".editorconfig");l.xfs.existsSync(c)||await l.xfs.writeFilePromise(c,s),await a.execvp("git",["init"],{cwd:this.context.cwd})}}}f.usage=h.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,n.gn)([h.Command.Boolean("-2",{hidden:!0})],f.prototype,"usev2",void 0),(0,n.gn)([h.Command.Boolean("--assume-fresh-project",{hidden:!0})],f.prototype,"assumeFreshProject",void 0),(0,n.gn)([h.Command.Boolean("-y,--yes",{hidden:!0})],f.prototype,"yes",void 0),(0,n.gn)([h.Command.Boolean("-p,--private",{description:"Initialize a private package"})],f.prototype,"private",void 0),(0,n.gn)([h.Command.Boolean("-w,--workspace",{description:"Initialize a private workspace root with a `packages/` directory"})],f.prototype,"workspace",void 0),(0,n.gn)([h.Command.String("-i,--install",{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"})],f.prototype,"install",void 0),(0,n.gn)([h.Command.Path("init")],f.prototype,"execute",null);const I={configuration:{initLicense:{description:"License used when creating packages via the init command",type:A.a2.STRING,default:null},initScope:{description:"Scope used when creating packages via the init command",type:A.a2.STRING,default:null},initVersion:{description:"Version used when creating packages via the init command",type:A.a2.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:A.a2.MAP,valueDefinition:{description:"",type:A.a2.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:A.a2.MAP,valueDefinition:{description:"",type:A.a2.ANY}}},commands:[f]}},92994:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143),n=r(46009),o=r(75448),i=r(10489);var s=r(46611),a=r(32485),c=r(73632);const g={fetchers:[class{supports(e,t){return!!e.reference.startsWith("link:")}getLocalPath(e,t){const{parentLocator:r,path:o}=A.parseFileStyleRange(e.reference,{protocol:"link:"});if(n.y1.isAbsolute(o))return o;const i=t.fetcher.getLocalPath(r,t);return null===i?null:n.y1.resolve(i,o)}async fetch(e,t){const{parentLocator:r,path:s}=A.parseFileStyleRange(e.reference,{protocol:"link:"}),a=n.y1.isAbsolute(s)?{packageFs:new o.M(n.LZ.root),prefixPath:n.LZ.dot,localPath:n.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(n.LZ.root),prefixPath:n.y1.relative(n.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const g=c.packageFs,l=n.y1.join(c.prefixPath,s);return a.localPath?{packageFs:new o.M(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,discardFromLookup:!0,localPath:l}:{packageFs:new i.n(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,discardFromLookup:!0}}},class{supports(e,t){return!!e.reference.startsWith("portal:")}getLocalPath(e,t){const{parentLocator:r,path:o}=A.parseFileStyleRange(e.reference,{protocol:"portal:"});if(n.y1.isAbsolute(o))return o;const i=t.fetcher.getLocalPath(r,t);return null===i?null:n.y1.resolve(i,o)}async fetch(e,t){const{parentLocator:r,path:s}=A.parseFileStyleRange(e.reference,{protocol:"portal:"}),a=n.y1.isAbsolute(s)?{packageFs:new o.M(n.LZ.root),prefixPath:n.LZ.dot,localPath:n.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(n.LZ.root),prefixPath:n.y1.relative(n.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const g=c.packageFs,l=n.y1.join(c.prefixPath,s);return a.localPath?{packageFs:new o.M(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,localPath:l}:{packageFs:new i.n(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.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 A.bindDescriptor(e,{locator:A.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("link:".length);return[A.makeLocator(e,"link:"+n.cS.toPortablePath(o))]}async getSatisfying(e,t,r){return null}async resolve(e,t){return{...e,version:"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.Un.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 A.bindDescriptor(e,{locator:A.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("portal:".length);return[A.makeLocator(e,"portal:"+n.cS.toPortablePath(o))]}async getSatisfying(e,t,r){return null}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),A=await c.releaseAfterUseAsync(async()=>await s.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.Un.SOFT,dependencies:new Map([...A.dependencies,...A.devDependencies]),peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},8375:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ne,getPnpPath:()=>Ae});var A,n=r(39922),o=r(46009),i=r(54143);!function(e){e[e.YES=0]="YES",e[e.NO=1]="NO",e[e.DEPENDS=2]="DEPENDS"}(A||(A={}));const s=(e,t)=>`${e}@${t}`,a=(e,t)=>{const r=t.indexOf("#"),A=r>=0?t.substring(r+1):t;return s(e,A)};var c;!function(e){e[e.NONE=-1]="NONE",e[e.PERF=0]="PERF",e[e.CHECK=1]="CHECK",e[e.REASONS=2]="REASONS",e[e.INTENSIVE_CHECK=9]="INTENSIVE_CHECK"}(c||(c={}));const g=(e,t)=>{if(t.decoupled)return t;const{name:r,references:A,ident:n,locator:o,dependencies:i,originalDependencies:s,hoistedDependencies:a,peerNames:c,reasons:g,isHoistBorder:l}=t,u={name:r,references:new Set(A),ident:n,locator:o,dependencies:new Map(i),originalDependencies:new Map(s),hoistedDependencies:new Map(a),peerNames:new Set(c),reasons:new Map(g),decoupled:!0,isHoistBorder:l},h=u.dependencies.get(r);return h&&h.ident==u.ident&&u.dependencies.set(r,u),e.dependencies.set(u.name,u),u},l=e=>{const t=new Set,r=(A,n=new Set)=>{if(!n.has(A)){n.add(A);for(const o of A.peerNames)if(!e.peerNames.has(o)){const A=e.dependencies.get(o);A&&!t.has(A)&&r(A,n)}t.add(A)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||r(t);return t},u=(e,t,r,A,n=new Set)=>{const o=t[t.length-1];if(n.has(o))return;n.add(o);const i=((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 A=Array.from(t.keys());A.sort((e,r)=>{const A=t.get(e),n=t.get(r);return n.peerDependents.size!==A.peerDependents.size?n.peerDependents.size-A.peerDependents.size:n.dependents.size-A.dependents.size});for(const t of A){const A=t.substring(0,t.indexOf("@",1)),n=t.substring(A.length+1);if(!e.peerNames.has(A)){let e=r.get(A);e||(e=[],r.set(A,e)),e.indexOf(n)<0&&e.push(n)}}return r})(o,E(o)),s=new Map(Array.from(i.entries()).map(([e,t])=>[e,t[0]])),a=o===e?new Map:(e=>{const t=new Map,r=new Set,A=n=>{if(!r.has(n)){r.add(n);for(const r of n.hoistedDependencies.values())e.dependencies.has(r.name)||t.set(r.name,r);for(const e of n.dependencies.values())n.peerNames.has(e.name)||A(e)}};return A(e),t})(o);let c;do{p(e,t,r,a,s,i,A),c=!1;for(const[e,t]of i)t.length>1&&!o.dependencies.has(e)&&(s.delete(e),t.shift(),s.set(e,t[0]),c=!0)}while(c);for(const n of o.dependencies.values())o.peerNames.has(n.name)||r.has(n.locator)||(r.add(n.locator),u(e,[...t,n],r,A),r.delete(n.locator))},h=(e,t,r,n,o,i,{outputReason:s})=>{let a,c=null,g=new Set;s&&(a=""+Array.from(e).map(e=>B(e)).join("→"));const l=t[t.length-1],u=r.ident===l.ident,h=o.get(r.name);let p=h===r.ident&&!u;if(s&&!p&&h&&!u&&(c=`- filled by: ${B(i.get(r.name)[0])} at ${a}`),p){let e=!1;const A=n.get(r.name);if(e=!A||A.ident===r.ident,s&&!e&&(c=`- filled by: ${B(A.locator)} at ${a}`),e)for(let A=1;A<t.length-1;A++){const n=t[A],o=n.dependencies.get(r.name);if(o&&o.ident!==r.ident){e=!1,s&&(c=`- filled by: ${B(o.locator)} at ${B(n.locator)}`);break}}p=e}if(p){let e=!0;const A=new Set(r.peerNames);for(let r=t.length-1;r>=1;r--){const n=t[r];for(const o of A){if(n.peerNames.has(o)&&n.originalDependencies.has(o))continue;const i=n.dependencies.get(o);i&&(r===t.length-1?g.add(i):(g=null,e=!1,s&&(c=`- peer dependency ${B(i.locator)} from parent ${B(n.locator)} was not hoisted to ${a}`))),A.delete(o)}if(!e)break}p=e}return null!==g&&g.size>0?{isHoistable:A.DEPENDS,dependsOn:g,reason:c}:{isHoistable:p?A.YES:A.NO,reason:c}},p=(e,t,r,n,o,i,s)=>{const a=t[t.length-1],u=new Set,p=(t,C,I,E)=>{if(u.has(I))return;const m=[...C,I.locator],w=new Map,Q=new Map;for(const e of l(I)){let g=null;if(g||(g=h(r,[a,...t,I],e,n,o,i,{outputReason:s.debugLevel>=c.REASONS})),Q.set(e,g),g.isHoistable===A.DEPENDS)for(const t of g.dependsOn){const r=w.get(t.name)||new Set;r.add(e.name),w.set(t.name,r)}}const D=new Set,b=(e,t,r)=>{if(!D.has(e)){D.add(e),e.ident!==I.ident&&Q.set(e,{isHoistable:A.NO,reason:r});for(const A of w.get(e.name)||[])b(I.dependencies.get(A),t,r)}};let v;s.debugLevel>=c.REASONS&&(v=""+Array.from(r).map(e=>B(e)).join("→"));for(const[e,t]of Q)t.isHoistable===A.NO&&b(e,t,`- peer dependency ${B(e.locator)} from parent ${B(I.locator)} was not hoisted to ${v}`);for(const e of Q.keys())if(!D.has(e)){I.dependencies.delete(e.name),I.hoistedDependencies.set(e.name,e),I.reasons.delete(e.name);const t=a.dependencies.get(e.name);if(t)for(const r of e.references)t.references.add(r);else a.ident!==e.ident&&(a.dependencies.set(e.name,e),E.add(e))}if(s.check){const r=d(e);if(r)throw new Error(`${r}, after hoisting dependencies of ${[a,...t,I].map(e=>B(e.locator)).join("→")}:\n${y(e)}`)}const S=l(I);for(const e of S)if(D.has(e)&&m.indexOf(e.locator)<0){const r=Q.get(e);if(r.isHoistable!==A.YES&&I.reasons.set(e.name,r.reason),!e.isHoistBorder){u.add(I);const r=g(I,e);p([...t,I],[...C,I.locator],r,f),u.delete(I)}}};let C,f=new Set(l(a));do{C=f,f=new Set;for(const e of C){if(e.locator===a.locator||e.isHoistBorder)continue;const t=g(a,e);p([],Array.from(r),t,f)}}while(f.size>0)},d=e=>{const t=[],r=new Set,A=new Set,n=(e,o)=>{if(r.has(e))return;if(r.add(e),A.has(e))return;const i=new Map(o);for(const t of e.dependencies.values())e.peerNames.has(t.name)||i.set(t.name,t);for(const r of e.originalDependencies.values()){const n=i.get(r.name),s=()=>""+Array.from(A).concat([e]).map(e=>B(e.locator)).join("→");if(e.peerNames.has(r.name)){const e=o.get(r.name);e===n&&e&&e.ident===r.ident||t.push(`${s()} - broken peer promise: expected ${r.ident} but found ${e?e.ident:e}`)}else n?n.ident!==r.ident&&t.push(`${s()} - broken require promise for ${r.name}: expected ${r.ident}, but found: ${n.ident}`):t.push(`${s()} - broken require promise: no required dependency ${r.locator} found`)}A.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(t,i);A.delete(e)};return n(e,e.dependencies),t.join("\n")},C=(e,t)=>{const{identName:r,name:A,reference:n,peerNames:o}=e,i={name:A,references:new Set([n]),locator:s(r,n),ident:a(r,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(o),reasons:new Map,decoupled:!0,isHoistBorder:!0},c=new Map([[e,i]]),g=(e,r)=>{let A=c.get(e);const n=!!A;if(!A){const{name:n,identName:o,reference:i,peerNames:g}=e,l=t.hoistingLimits.get(r.locator);A={name:n,references:new Set([i]),locator:s(o,i),ident:a(o,i),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(g),reasons:new Map,decoupled:!0,isHoistBorder:!!l&&l.has(n)},c.set(e,A)}if(r.dependencies.set(e.name,A),r.originalDependencies.set(e.name,A),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(A)}else for(const t of e.dependencies)g(t,A)};for(const t of e.dependencies)g(t,i);return i},f=e=>e.substring(0,e.indexOf("@",1)),I=e=>{const t={name:e.name,identName:f(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),A=(e,t,n)=>{const o=r.has(e);let i;if(t===e)i=n;else{const{name:t,references:r,locator:A}=e;i={name:t,identName:f(A),references:r,dependencies:new Set}}if(n.dependencies.add(i),!o){r.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||A(t,e,i);r.delete(e)}};for(const r of e.dependencies.values())A(r,e,t);return t},E=e=>{const t=new Map,r=new Set([e]),A=e=>{const r=(e=>`${e.name}@${e.ident}`)(e);let A=t.get(r);return A||(A={dependents:new Set,peerDependents:new Set},t.set(r,A)),A},n=(e,t)=>{const o=!!r.has(t);if(A(t).dependents.add(e.ident),!o){r.add(t);for(const e of t.dependencies.values())if(t.peerNames.has(e.name)){A(e).peerDependents.add(t.ident)}else n(t,e)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(e,t);return t},B=e=>{const t=e.indexOf("@",1),r=e.substring(0,t),A=e.substring(t+1);if("workspace:."===A)return".";if(A){const e=(A.indexOf("#")>0?A.split("#")[1]:A).replace("npm:","");return A.startsWith("virtual")?`v:${r}@${e}`:`${r}@${e}`}return""+r},y=e=>{let t=0;const r=(e,A,n="")=>{if(t>5e4||A.has(e))return"";t++;const o=Array.from(e.dependencies.values());let i="";A.add(e);for(let t=0;t<o.length;t++){const s=o[t];if(!e.peerNames.has(s.name)){const a=e.reasons.get(s.name),c=f(s.locator);i+=`${n}${t<o.length-1?"├─":"└─"}${(A.has(s)?">":"")+(c!==s.name?`a:${s.name}:`:"")+B(s.locator)+(a?" "+a:"")}\n`,i+=r(s,A,`${n}${t<o.length-1?"│ ":" "}`)}}return A.delete(e),i};return r(e,new Set)+(t>5e4?"\nTree is too large, part of the tree has been dunped\n":"")};var m,w;!function(e){e.HARD="HARD",e.SOFT="SOFT"}(m||(m={})),function(e){e.WORKSPACES="workspaces",e.DEPENDENCIES="dependencies",e.NONE="none"}(w||(w={}));const Q=(e,t)=>{const{packageTree:r,hoistingLimits:A}=b(e,t),n=((e,t={})=>{const r=t.debugLevel||Number(process.env.NM_DEBUG_LEVEL||c.NONE),A={check:t.check||r>=c.INTENSIVE_CHECK,debugLevel:r,hoistingLimits:t.hoistingLimits||new Map};A.debugLevel>=c.PERF&&console.time("hoist");const n=C(e,A);if(u(n,[n],new Set([n.locator]),A),A.debugLevel>=c.PERF&&console.timeEnd("hoist"),A.debugLevel>=c.CHECK){const e=d(n);if(e)throw new Error(`${e}, after hoisting finished:\n${y(n)}`)}return A.debugLevel>=c.REASONS&&console.log(y(n)),I(n)})(r,{hoistingLimits:A});return v(e,n,t)},D=e=>`${e.name}@${e.reference}`;const b=(e,t)=>{const r=e.getDependencyTreeRoots(),A=new Map,n=new Map,s=e.getPackageInformation(e.topLevel);if(null===s)throw new Error("Assertion failed: Expected the top-level package to have been registered");const a=e.findPackageLocator(s.packageLocation);if(null===a)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");const c=o.cS.toPortablePath(s.packageLocation),g=D(a);if(t.project){const e={children:new Map},r=t.project.cwd.split(o.y1.sep);for(const[A,n]of t.project.workspacesByCwd){const t=A.split(o.y1.sep).slice(r.length);let s=e;for(const e of t){let t=s.children.get(e);t||(t={children:new Map},s.children.set(e,t)),s=t}s.workspaceLocator={name:i.stringifyIdent(n.anchoredLocator),reference:n.anchoredLocator.reference}}const A=(e,t)=>{if(e.workspaceLocator){const r=D(t);let A=n.get(r);A||(A=new Set,n.set(r,A)),A.add(e.workspaceLocator)}for(const r of e.children.values())A(r,e.workspaceLocator||t)};for(const t of e.children.values())A(t,e.workspaceLocator)}else for(const e of r)if(e.name!==a.name||e.reference!==a.reference){let t=n.get(g);t||(t=new Set,n.set(g,t)),t.add(e)}const l={name:a.name,identName:a.name,reference:a.reference,peerNames:s.packagePeers,dependencies:new Set},u=new Map,h=(r,s,g,p,d,C,f)=>{var I,E;const B=((e,t)=>`${D(t)}:${e}`)(r,g);let y=u.get(B);const m=!!y;if(m||g.name!==a.name||g.reference!==a.reference||(y=l,u.set(B,l)),y||(y={name:r,identName:g.name,reference:g.reference,dependencies:new Set,peerNames:s.packagePeers},u.set(B,y)),f){const e=D({name:p.identName,reference:p.reference}),t=A.get(e)||new Set;A.set(e,t),t.add(y.name)}const Q=new Map(s.packageDependencies);if(t.project){const e=t.project.workspacesByCwd.get(o.cS.toPortablePath(s.packageLocation.slice(0,-1)));if(e){const t=new Set([...Array.from(e.manifest.peerDependencies.values(),e=>i.stringifyIdent(e)),...Array.from(e.manifest.peerDependenciesMeta.keys())]);for(const e of t)Q.has(e)||(Q.set(e,d.get(e)||null),y.peerNames.add(e))}}const b=D(g),v=n.get(b);if(v)for(const e of v)Q.set(e.name+"$wsroot$",e.reference);p.dependencies.add(y);const S=t.pnpifyFs||!function(e){let t=i.parseDescriptor(e);return i.isVirtualDescriptor(t)&&(t=i.devirtualizeDescriptor(t)),t.range.startsWith("portal:")}(B);if(!m&&S)for(const[r,A]of Q)if(null!==A){const n=e.getLocator(r,A),i=e.getLocator(r.replace("$wsroot$",""),A),s=e.getPackageInformation(i);if(null===s)throw new Error("Assertion failed: Expected the package to have been registered");const a=null===(I=t.hoistingLimitsByCwd)||void 0===I?void 0:I.get(C),g=o.y1.relative(c,o.cS.toPortablePath(s.packageLocation))||o.LZ.dot,l=null===(E=t.hoistingLimitsByCwd)||void 0===E?void 0:E.get(g),u=a===w.DEPENDENCIES||l===w.DEPENDENCIES||l===w.WORKSPACES;h(r,s,n,y,Q,g,u)}};return h(a.name,s,a,l,s.packageDependencies,o.LZ.dot,!1),{packageTree:l,hoistingLimits:A}};const v=(e,t,r)=>{const A=new Map,n=(t,A)=>{const{linkType:n,target:i}=function(e,t,r){const A=t.getLocator(e.name.replace("$wsroot$",""),e.reference),n=t.getPackageInformation(A);if(null===n)throw new Error("Assertion failed: Expected the package to be registered");let i,s;if(r.pnpifyFs)s=o.cS.toPortablePath(n.packageLocation),i=m.SOFT;else{const r=t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(n.packageLocation):n.packageLocation;s=o.cS.toPortablePath(r||n.packageLocation),i=n.linkType}return{linkType:i,target:s}}(t,e,r);return{locator:D(t),target:i,linkType:n,aliases:A}},s=e=>{const[t,r]=e.split("/");return r?{scope:(0,o.Zu)(t),name:(0,o.Zu)(r)}:{scope:null,name:(0,o.Zu)(t)}},a=new Set,c=(e,t)=>{if(!a.has(e)){a.add(e);for(const r of e.dependencies){if(r===e||e.identName.endsWith("$wsroot$")&&r.identName===e.identName.replace("$wsroot$",""))continue;const a=Array.from(r.references).sort(),g={name:r.identName,reference:a[0]},{name:l,scope:u}=s(r.name),h=u?[u,l]:[l],p=o.y1.join(t,"node_modules"),d=o.y1.join(p,...h),C=n(g,a.slice(1));if(!r.name.endsWith("$wsroot$")){const e=A.get(d);if(e){if(e.dirList)throw new Error(`Assertion failed: ${d} cannot merge dir node with leaf node`);{const t=i.parseLocator(e.locator),r=i.parseLocator(C.locator);if(e.linkType!==C.linkType)throw new Error(`Assertion failed: ${d} cannot merge nodes with different link types`);if(t.identHash!==r.identHash)throw new Error(`Assertion failed: ${d} cannot merge nodes with different idents ${i.stringifyLocator(t)} and ${i.stringifyLocator(r)}`);C.aliases=[...C.aliases,...e.aliases,i.parseLocator(e.locator).reference]}}A.set(d,C);const t=d.split("/"),r=t.indexOf("node_modules");let n=t.length-1;for(;r>=0&&n>r;){const e=o.cS.toPortablePath(t.slice(0,n).join(o.y1.sep)),r=(0,o.Zu)(t[n]),i=A.get(e);if(i){if(i.dirList){if(i.dirList.has(r))break;i.dirList.add(r)}}else A.set(e,{dirList:new Set([r])});n--}}c(r,C.linkType===m.SOFT?C.target:d)}}},g=n({name:t.name,reference:Array.from(t.references)[0]},[]),l=g.target;return A.set(l,g),c(t,l),A};var S=r(92659),k=r(32485),N=r(73632),F=r(46611),K=r(35691),M=r(43896),R=r(17674),x=r(53660),L=r(65281),P=r(11640),O=r(83228),U=r(58069),T=r.n(U),j=r(40822),Y=r(35747),G=r.n(Y);const H="node_modules";class J{constructor(e){this.opts=e,this.localStore=new Map,this.customData={store:new Map}}getCustomDataKey(){return JSON.stringify({name:"NodeModulesInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,t){var r;const A=o.y1.resolve(t.packageFs.getRealPath(),t.prefixPath);let n=this.customData.store.get(e.locatorHash);if(void 0===n&&(n=await async function(e,t){var r;const A=null!==(r=await F.G.tryFind(t.prefixPath,{baseFs:t.packageFs}))&&void 0!==r?r:new F.G,n=new Set(["preinstall","install","postinstall"]);for(const e of A.scripts.keys())n.has(e)||A.scripts.delete(e);return{manifest:{bin:A.bin,os:A.os,cpu:A.cpu,scripts:A.scripts},misc:{extractHint:O.jsInstallUtils.getExtractHint(t),hasBindingGyp:O.jsInstallUtils.hasBindingGyp(t)}}}(0,t),e.linkType===k.Un.HARD&&this.customData.store.set(e.locatorHash,n)),!O.jsInstallUtils.checkAndReportManifestCompatibility(e,n,"link",{configuration:this.opts.project.configuration,report:this.opts.report}))return{packageLocation:null,buildDirective:null};const s=new Map,a=new Set;if(s.has(i.stringifyIdent(e))||s.set(i.stringifyIdent(e),e.reference),i.isVirtualLocator(e))for(const t of e.peerDependencies.values())s.set(i.stringifyIdent(t),null),a.add(i.stringifyIdent(t));const c={packageLocation:o.cS.fromPortablePath(A)+"/",packageDependencies:s,packagePeers:a,linkType:e.linkType,discardFromLookup:null!==(r=t.discardFromLookup)&&void 0!==r&&r};return this.localStore.set(e.locatorHash,{pkg:e,customPackageData:n,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:c}),{packageLocation:A,buildDirective:null}}async attachInternalDependencies(e,t){const r=this.localStore.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected information object to have been registered");for(const[e,A]of t){const t=i.areIdentsEqual(e,A)?A.reference:[i.requirableIdent(A),A.reference];r.pnpNode.packageDependencies.set(i.requirableIdent(e),t)}}async attachExternalDependents(e,t){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if("node-modules"!==this.opts.project.configuration.get("nodeLinker"))return;const e=new R.p({baseFs:new x.A({libzip:await(0,L.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})});let t=await q(this.opts.project);if(null===t){const e=this.opts.project.configuration.get("bstatePath");await M.xfs.existsPromise(e)&&await M.xfs.unlinkPromise(e),t={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map}}const r=new Map(this.opts.project.workspaces.map(e=>{var t,r;let A=this.opts.project.configuration.get("nmHoistingLimits");try{A=N.validateEnum(w,null!==(r=null===(t=e.manifest.installConfig)||void 0===t?void 0:t.hoistingLimits)&&void 0!==r?r:A)}catch(t){const r=i.prettyWorkspace(this.opts.project.configuration,e);this.opts.report.reportWarning(S.b.INVALID_MANIFEST,`${r}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(w).join(", ")}, using default: "${A}"`)}return[e.relativeCwd,A]})),A=(e=>{const t=new Map;for(const[r,A]of e.entries())if(!A.dirList){let e=t.get(A.locator);e||(e={target:A.target,linkType:A.linkType,locations:[],aliases:A.aliases},t.set(A.locator,e)),e.locations.push(r)}for(const e of t.values())e.locations=e.locations.sort((e,t)=>{const r=e.split(o.y1.delimiter).length,A=t.split(o.y1.delimiter).length;return r!==A?A-r:t.localeCompare(e)});return t})(Q({VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(e=>{const t=e.anchoredLocator;return{name:i.stringifyIdent(e.locator),reference:t.reference}}),getPackageInformation:e=>{const t=null===e.reference?this.opts.project.topLevelWorkspace.anchoredLocator:i.makeLocator(i.parseIdent(e.name),e.reference),r=this.localStore.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected the package reference to have been registered");return r.pnpNode},findPackageLocator:e=>{const t=this.opts.project.tryWorkspaceByCwd(o.cS.toPortablePath(e));if(null!==t){const e=t.anchoredLocator;return{name:i.stringifyIdent(e),reference:e.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:e=>o.cS.fromPortablePath(R.p.resolveVirtual(o.cS.toPortablePath(e)))},{pnpifyFs:!1,hoistingLimitsByCwd:r,project:this.opts.project}));await async function(e,t,{baseFs:r,project:A,report:n,loadManifest:s}){const a=o.y1.join(A.cwd,H),{locationTree:c,binSymlinks:g}=function(e,t){const r=new Map([...e]),A=new Map([...t]);for(const[t,r]of e){const e=o.y1.join(t,H);if(!M.xfs.existsSync(e)){r.children.delete(H);for(const t of A.keys())null!==o.y1.contains(e,t)&&A.delete(t)}}return{locationTree:r,binSymlinks:A}}(e.locationTree,e.binSymlinks),l=V(t,{skipPrefix:A.cwd}),u=[],h=async({srcDir:e,dstDir:t,linkType:A})=>{const n=(async()=>{try{A===k.Un.SOFT?(await M.xfs.mkdirPromise(o.y1.dirname(t),{recursive:!0}),await X(o.y1.resolve(e),t)):await _(t,e,{baseFs:r})}catch(r){throw r.message=`While persisting ${e} -> ${t} ${r.message}`,r}finally{I.tick()}})().then(()=>u.splice(u.indexOf(n),1));u.push(n),u.length>4&&await Promise.race(u)},p=async(e,t,r)=>{const A=(async()=>{const A=async(e,t,r)=>{try{r&&r.innerLoop||await M.xfs.mkdirPromise(t,{recursive:!0});const n=await M.xfs.readdirPromise(e,{withFileTypes:!0});for(const i of n){if(!(r&&r.innerLoop||".bin"!==i.name))continue;const n=o.y1.join(e,i.name),s=o.y1.join(t,i.name);i.isDirectory()?(i.name!==H||r&&r.innerLoop)&&(await M.xfs.mkdirPromise(s,{recursive:!0}),await A(n,s,{innerLoop:!0})):await M.xfs.copyFilePromise(n,s,G().constants.COPYFILE_FICLONE)}}catch(A){throw r&&r.innerLoop||(A.message=`While cloning ${e} -> ${t} ${A.message}`),A}finally{r&&r.innerLoop||I.tick()}};await A(e,t,r)})().then(()=>u.splice(u.indexOf(A),1));u.push(A),u.length>4&&await Promise.race(u)},d=async(e,t,r)=>{if(r)for(const[A,n]of t.children){const t=r.children.get(A);await d(o.y1.join(e,A),n,t)}else t.children.has(H)&&await z(o.y1.join(e,H),{contentsOnly:!1}),await z(e,{contentsOnly:e===a})};for(const[e,t]of c){const r=l.get(e);for(const[A,n]of t.children){if("."===A)continue;const t=r?r.children.get(A):r;await d(o.y1.join(e,A),n,t)}}const C=async(e,t,r)=>{if(r){$(t.locator,r.locator)||await z(e,{contentsOnly:t.linkType===k.Un.HARD});for(const[A,n]of t.children){const t=r.children.get(A);await C(o.y1.join(e,A),n,t)}}else t.children.has(H)&&await z(o.y1.join(e,H),{contentsOnly:!0}),await z(e,{contentsOnly:t.linkType===k.Un.HARD})};for(const[e,t]of l){const r=c.get(e);for(const[A,n]of t.children){if("."===A)continue;const t=r?r.children.get(A):r;await C(o.y1.join(e,A),n,t)}}const f=[];for(const[r,{locations:n}]of e.locatorMap.entries())for(const e of n){const{locationRoot:n,segments:i}=W(e,{skipPrefix:A.cwd});let s=l.get(n),a=n;if(s){for(const e of i)if(a=o.y1.join(a,e),s=s.children.get(e),!s)break;if(s&&!$(s.locator,r)){const e=t.get(s.locator),r=e.target,A=a,n=e.linkType;r!==A&&f.push({srcDir:r,dstDir:A,linkType:n})}}}for(const[e,{locations:r}]of t.entries())for(const n of r){const{locationRoot:r,segments:i}=W(n,{skipPrefix:A.cwd});let s=c.get(r),a=l.get(r),g=r;const u=t.get(e),h=u.target,p=n;if(h===p)continue;const d=u.linkType;for(const e of i)a=a.children.get(e);if(s){for(const e of i)if(g=o.y1.join(g,e),s=s.children.get(e),!s){f.push({srcDir:h,dstDir:p,linkType:d});break}}else f.push({srcDir:h,dstDir:p,linkType:d})}const I=K.yG.progressViaCounter(f.length),E=n.reportProgress(I);try{const e=new Map;for(const t of f)t.linkType!==k.Un.SOFT&&e.has(t.srcDir)||(e.set(t.srcDir,t.dstDir),await h({...t}));await Promise.all(u),u.length=0;for(const t of f){const r=e.get(t.srcDir);t.linkType!==k.Un.SOFT&&t.dstDir!==r&&await p(r,t.dstDir)}await Promise.all(u),await M.xfs.mkdirPromise(a,{recursive:!0});const r=await async function(e,t,r,{loadManifest:A}){const n=new Map;for(const[t,{locations:r}]of e){const e=Z(t)?null:await A(t,r[0]),i=new Map;if(e)for(const[t,A]of e.bin){const e=o.y1.join(r[0],A);""!==A&&M.xfs.existsSync(e)&&i.set(t,A)}n.set(t,i)}const i=new Map,s=(e,t,A)=>{const a=new Map,c=o.y1.contains(r,e);if(A.locator&&null!==c){const t=n.get(A.locator);for(const[r,A]of t){const t=o.y1.join(e,o.cS.toPortablePath(A));a.set((0,o.Zu)(r),t)}for(const[t,r]of A.children){const A=o.y1.join(e,t),n=s(A,A,r);n.size>0&&i.set(e,new Map([...i.get(e)||new Map,...n]))}}else for(const[r,n]of A.children){const A=s(o.y1.join(e,r),t,n);for(const[e,t]of A)a.set(e,t)}return a};for(const[e,r]of t){const t=s(e,e,r);t.size>0&&i.set(e,new Map([...i.get(e)||new Map,...t]))}return i}(t,l,A.cwd,{loadManifest:s});await async function(e,t){for(const r of e.keys())if(!t.has(r)){const e=o.y1.join(r,H,".bin");await M.xfs.removePromise(e)}for(const[r,A]of t){const t=o.y1.join(r,H,".bin"),n=e.get(r)||new Map;await M.xfs.mkdirPromise(t,{recursive:!0});for(const e of n.keys())A.has(e)||(await M.xfs.removePromise(o.y1.join(t,e)),"win32"===process.platform&&await M.xfs.removePromise(o.y1.join(t,(0,o.Zu)(e+".cmd"))));for(const[e,r]of A){const A=n.get(e),i=o.y1.join(t,e);A!==r&&("win32"===process.platform?await T()(o.cS.fromPortablePath(r),o.cS.fromPortablePath(i),{createPwshFile:!1}):(await M.xfs.removePromise(i),await X(r,i),await M.xfs.chmodPromise(r,493)))}}}(g,r),await async function(e,t,r){let A="";A+="# Warning: This file is automatically generated. Removing it is fine, but will\n",A+="# cause your node_modules installation to become invalidated.\n",A+="\n",A+="__metadata:\n",A+=" version: 1\n";const n=Array.from(t.keys()).sort(),s=i.stringifyLocator(e.topLevelWorkspace.anchoredLocator);for(const i of n){const n=t.get(i);A+="\n",A+=JSON.stringify(i)+":\n",A+=" locations:\n";for(const t of n.locations){const r=o.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);A+=` - ${JSON.stringify(r)}\n`}if(n.aliases.length>0){A+=" aliases:\n";for(const e of n.aliases)A+=` - ${JSON.stringify(e)}\n`}if(i===s&&r.size>0){A+=" bin:\n";for(const[t,n]of r){const r=o.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);A+=` ${JSON.stringify(r)}:\n`;for(const[e,r]of n){const n=o.y1.relative(o.y1.join(t,H),r);A+=` ${JSON.stringify(e)}: ${JSON.stringify(n)}\n`}}}}const a=e.cwd,c=o.y1.join(a,H,".yarn-state.yml");await M.xfs.changeFilePromise(c,A,{automaticNewlines:!0})}(A,t,r)}finally{E.stop()}}(t,A,{baseFs:e,project:this.opts.project,report:this.opts.report,loadManifest:async e=>{const t=i.parseLocator(e),r=this.localStore.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected the slot to exist");return r.customPackageData.manifest}});const n=[];for(const[e,t]of A.entries()){if(Z(e))continue;const r=i.parseLocator(e),A=this.localStore.get(r.locatorHash);if(void 0===A)throw new Error("Assertion failed: Expected the slot to exist");const o=O.jsInstallUtils.extractBuildScripts(A.pkg,A.customPackageData,A.dependencyMeta,{configuration:this.opts.project.configuration,report:this.opts.report});0!==o.length&&n.push({buildLocations:t.locations,locatorHash:r.locatorHash,buildDirective:o})}return{customData:this.customData,records:n}}}async function q(e,{unrollAliases:t=!1}={}){const r=e.cwd,A=o.y1.join(r,H,".yarn-state.yml");if(!M.xfs.existsSync(A))return null;const n=(0,P.parseSyml)(await M.xfs.readFilePromise(A,"utf8"));if(n.__metadata.version>1)return null;const s=new Map,a=new Map;delete n.__metadata;for(const[e,A]of Object.entries(n)){const n=A.locations.map(e=>o.y1.join(r,e)),c=A.bin;if(c)for(const[e,t]of Object.entries(c)){const A=o.y1.join(r,o.cS.toPortablePath(e)),n=N.getMapWithDefault(a,A);for(const[e,r]of Object.entries(t))n.set((0,o.Zu)(e),o.cS.toPortablePath([A,H,r].join(o.y1.delimiter)))}if(s.set(e,{target:o.LZ.dot,linkType:k.Un.HARD,locations:n,aliases:A.aliases||[]}),t&&A.aliases)for(const t of A.aliases){const{scope:r,name:A}=i.parseLocator(e),a=i.makeLocator(i.makeIdent(r,A),t),c=i.stringifyLocator(a);s.set(c,{target:o.LZ.dot,linkType:k.Un.HARD,locations:n,aliases:[]})}}return{locatorMap:s,binSymlinks:a,locationTree:V(s,{skipPrefix:e.cwd})}}const z=async(e,t)=>{if(e.split(o.y1.sep).indexOf(H)<0)throw new Error("Assertion failed: trying to remove dir that doesn't contain node_modules: "+e);try{if(!t.innerLoop){if((await M.xfs.lstatPromise(e)).isSymbolicLink())return void await M.xfs.unlinkPromise(e)}const r=await M.xfs.readdirPromise(e,{withFileTypes:!0});for(const A of r){const r=o.y1.join(e,(0,o.Zu)(A.name));A.isDirectory()?(A.name!==H||t&&t.innerLoop)&&await z(r,{innerLoop:!0,contentsOnly:!1}):await M.xfs.unlinkPromise(r)}t.contentsOnly||await M.xfs.rmdirPromise(e)}catch(e){if("ENOENT"!==e.code&&"ENOTEMPTY"!==e.code)throw e}},W=(e,{skipPrefix:t})=>{const r=o.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 A=r.split(o.y1.sep).filter(e=>""!==e),n=A.indexOf(H),i=A.slice(0,n).join(o.y1.sep);return{locationRoot:o.y1.join(t,i),segments:A.slice(n)}},V=(e,{skipPrefix:t})=>{const r=new Map;if(null===e)return r;const A=()=>({children:new Map,linkType:k.Un.HARD});for(const[n,i]of e.entries()){if(i.linkType===k.Un.SOFT){if(null!==o.y1.contains(t,i.target)){const e=N.getFactoryWithDefault(r,i.target,A);e.locator=n,e.linkType=i.linkType}}for(const e of i.locations){const{locationRoot:o,segments:s}=W(e,{skipPrefix:t});let a=N.getFactoryWithDefault(r,o,A);for(let e=0;e<s.length;++e){const t=s[e];if("."!==t){const e=N.getFactoryWithDefault(a.children,t,A);a.children.set(t,e),a=e}e===s.length-1&&(a.locator=n,a.linkType=i.linkType)}}}return r},X=async(e,t)=>{let r;try{"win32"===process.platform&&(r=M.xfs.lstatSync(e))}catch(e){}"win32"!=process.platform||r&&!r.isDirectory()?M.xfs.symlinkPromise(o.y1.relative(o.y1.dirname(t),e),t):M.xfs.symlinkPromise(e,t,"junction")},_=async(e,t,{baseFs:r,innerLoop:A})=>{await M.xfs.mkdirPromise(e,{recursive:!0});const n=await r.readdirPromise(t,{withFileTypes:!0}),i=async(e,t,A)=>{if(A.isFile()){const A=await r.lstatPromise(t);await r.copyFilePromise(t,e);const n=511&A.mode;420!==n&&await M.xfs.chmodPromise(e,n)}else{if(!A.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${await M.xfs.statSync(t).mode.toString(8).padStart(6,"0")})`);{const A=await r.readlinkPromise(t);await X(o.y1.resolve(o.y1.dirname(e),A),e)}}};for(const s of n){const n=o.y1.join(t,(0,o.Zu)(s.name)),a=o.y1.join(e,(0,o.Zu)(s.name));s.isDirectory()?(s.name!==H||A)&&await _(a,n,{baseFs:r,innerLoop:!0}):await i(a,n,s)}};function Z(e){let t=i.parseDescriptor(e);return i.isVirtualDescriptor(t)&&(t=i.devirtualizeDescriptor(t)),t.range.startsWith("link:")}const $=(e,t)=>{if(!e||!t)return e===t;let r=i.parseLocator(e);i.isVirtualLocator(r)&&(r=i.devirtualizeLocator(r));let A=i.parseLocator(t);return i.isVirtualLocator(A)&&(A=i.devirtualizeLocator(A)),i.areLocatorsEqual(r,A)};var ee=r(34432);class te extends O.PnpLinker{constructor(){super(...arguments),this.mode="loose"}makeInstaller(e){return new re(e)}}class re extends O.PnpInstaller{constructor(){super(...arguments),this.mode="loose"}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=new R.p({baseFs:new x.A({libzip:await(0,L.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})}),r=(0,ee.oC)(e,this.opts.project.cwd,t),A=Q(r,{pnpifyFs:!1,project:this.opts.project}),n=new Map;e.fallbackPool=n;const s=(e,t)=>{const r=i.parseLocator(t.locator),A=i.stringifyIdent(r);A===e?n.set(e,r.reference):n.set(e,[A,r.reference])},a=o.y1.join(this.opts.project.cwd,o.QS.nodeModules),c=A.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=o.y1.join(a,e),r=A.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 n of r.dirList){const r=o.y1.join(t,n),i=A.get(r);if(void 0===i)throw new Error("Assertion failed: Expected the subchild to have been registered");if(!("target"in i))throw new Error("Assertion failed: Expected the leaf junction to be a package");s(`${e}/${n}`,i)}}return super.finalizeInstallWithPnp(e)}}const Ae=e=>o.y1.join(e.cwd,".pnp.js"),ne={configuration:{nmHoistingLimits:{description:"Prevent packages can be hoisted past specific levels",type:n.a2.STRING,values:[w.WORKSPACES,w.DEPENDENCIES,w.NONE],default:"none"}},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 A=await q(t.project,{unrollAliases:!0});if(null===A)throw new j.UsageError("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");const n=A.locatorMap.get(i.stringifyLocator(e));if(!n){const r=new j.UsageError(`Couldn't find ${i.prettyLocator(t.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw r.code="LOCATOR_NOT_INSTALLED",r}return n.locations[0]}async findPackageLocator(e,t){const r=await q(t.project,{unrollAliases:!0});if(null===r)return null;const{locationRoot:A,segments:n}=W(o.y1.resolve(e),{skipPrefix:t.project.cwd});let s=r.locationTree.get(A);if(!s)return null;let a=s.locator;for(const e of n){if(s=s.children.get(e),!s)break;a=s.locator||a}return i.parseLocator(a)}makeInstaller(e){return new J(e)}},te]}},8190:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>X});var A,n,o=r(39922),i=r(36370),s=r(25413),a=r(85824),c=r(62152),g=r(35691),l=r(92659),u=r(85875),h=r(15815),p=r(14224),d=r(40822);!function(e){e.All="all",e.Production="production",e.Development="development"}(A||(A={})),function(e){e.Info="info",e.Low="low",e.Moderate="moderate",e.High="high",e.Critical="critical"}(n||(n={}));var C=r(54143),f=r(73632),I=r(71643);const E=[n.Info,n.Low,n.Moderate,n.High,n.Critical];function B(e,t){const r=[],A=new Set,n=e=>{A.has(e)||(A.add(e),r.push(e))};for(const e of t)n(e);const o=new Set;for(;r.length>0;){const t=r.shift(),A=e.storedResolutions.get(t);if(void 0===A)throw new Error("Assertion failed: Expected the resolution to have been registered");const i=e.storedPackages.get(A);if(i){o.add(t);for(const e of i.dependencies.values())n(e.descriptorHash)}}return o}function y(e,t,{all:r}){const A=r?e.workspaces:[t],n=A.map(e=>e.manifest),o=new Set(n.map(e=>[...e.dependencies].map(([e,t])=>e)).flat()),i=new Set(n.map(e=>[...e.devDependencies].map(([e,t])=>e)).flat()),s=A.map(e=>[...e.dependencies.values()]).flat(),a=s.filter(e=>o.has(e.identHash)).map(e=>e.descriptorHash),c=s.filter(e=>i.has(e.identHash)).map(e=>e.descriptorHash),g=B(e,a),l=B(e,c);return u=l,h=g,new Set([...u].filter(e=>!h.has(e)));var u,h}function m(e){const t={};for(const r of e)t[C.stringifyIdent(r)]=C.parseRange(r.range).selector;return t}function w(e){if(void 0===e)return new Set;const t=E.indexOf(e),r=E.slice(t);return new Set(r)}function Q(e,t){var r;const A=function(e,t){const r=w(t),A={};for(const t of r)A[t]=e[t];return A}(e,t);for(const e of Object.keys(A))if(null!==(r=A[e])&&void 0!==r&&r)return!0;return!1}class D extends s.BaseCommand{constructor(){super(...arguments),this.all=!1,this.recursive=!1,this.environment=A.All,this.json=!1,this.severity=n.Info}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=function(e,t,{all:r,environment:n}){const o=r?e.workspaces:[t],i=[];if([A.All,A.Production].includes(n))for(const e of o)for(const t of e.manifest.dependencies.values())i.push(t);const s=[];if([A.All,A.Development].includes(n))for(const e of o)for(const t of e.manifest.devDependencies.values())s.push(t);return m([...i,...s].filter(e=>null===C.parseRange(e.range).protocol))}(t,r,{all:this.all,environment:this.environment}),i=function(e,t,{all:r}){var A;const n=y(e,t,{all:r}),o={};for(const t of e.storedPackages.values())o[C.stringifyIdent(t)]={version:null!==(A=t.version)&&void 0!==A?A:"0.0.0",integrity:t.identHash,requires:m(t.dependencies.values()),dev:n.has(C.convertLocatorToDescriptor(t).descriptorHash)};return o}(t,r,{all:this.all});if(!this.recursive)for(const e of Object.keys(i))Object.prototype.hasOwnProperty.call(n,e)?i[e].requires={}:delete i[e];const d={requires:n,dependencies:i},E=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});let B;const D=await c.h.start({configuration:e,stdout:this.context.stdout},async()=>{try{B=await p.npmHttpUtils.post("/-/npm/v1/security/audits/quick",d,{authType:p.npmHttpUtils.AuthType.NO_AUTH,configuration:e,jsonResponse:!0,registry:E})}catch(e){throw"HTTPError"!==e.name?e:new g.lk(l.b.EXCEPTION,e.toString())}});if(D.hasErrors())return D.exitCode();const b=Q(B.metadata.vulnerabilities,this.severity);if(!this.json&&b)return u.emitTree(function(e,t){const r={},A={children:r};let n=Object.values(e.advisories);if(null!=t){const e=w(t);n=n.filter(t=>e.has(t.severity))}for(const e of f.sortMap(n,e=>e.module_name))r[e.module_name]={label:e.module_name,value:I.tuple(I.Type.RANGE,e.findings.map(e=>e.version).join(", ")),children:{Issue:{label:"Issue",value:I.tuple(I.Type.NO_HINT,e.title)},URL:{label:"URL",value:I.tuple(I.Type.URL,e.url)},Severity:{label:"Severity",value:I.tuple(I.Type.NO_HINT,e.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:I.tuple(I.Type.RANGE,e.vulnerable_versions)},"Patched Versions":{label:"Patched Versions",value:I.tuple(I.Type.RANGE,e.patched_versions)},Via:{label:"Via",value:I.tuple(I.Type.NO_HINT,Array.from(new Set(e.findings.map(e=>e.paths).flat().map(e=>e.split(">")[0]))).join(", "))},Recommendation:{label:"Recommendation",value:I.tuple(I.Type.NO_HINT,e.recommendation.replace(/\n/g," "))}}};return A}(B,this.severity),{configuration:e,json:this.json,stdout:this.context.stdout,separators:2}),1;return(await h.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(B),b||e.reportInfo(l.b.EXCEPTION,"No audit suggestions")})).exitCode()}}D.usage=d.Command.Usage({description:"perform a vulnerability audit against the installed packages",details:`\n This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).\n\n For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.\n\n Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${E.map(e=>`\`${e}\``).join(", ")}.\n\n If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.\n\n To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why <package>\` to get more information as to who depends on them.\n `,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"]]}),(0,i.gn)([d.Command.Boolean("-A,--all")],D.prototype,"all",void 0),(0,i.gn)([d.Command.Boolean("-R,--recursive")],D.prototype,"recursive",void 0),(0,i.gn)([d.Command.String("--environment")],D.prototype,"environment",void 0),(0,i.gn)([d.Command.Boolean("--json")],D.prototype,"json",void 0),(0,i.gn)([d.Command.String("--severity")],D.prototype,"severity",void 0),(0,i.gn)([d.Command.Path("npm","audit")],D.prototype,"execute",null);var b=r(85622),v=r.n(b),S=r(53887),k=r.n(S),N=r(31669);class F extends s.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t}=await a.I.find(e,this.context.cwd),r=void 0!==this.fields?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,A=[];let n=!1;const i=await h.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async o=>{for(const i of this.packages){let s;if("."===i){const e=t.topLevelWorkspace;if(!e.manifest.name)throw new d.UsageError("Missing 'name' field in "+v().join(e.cwd,"package.json"));s=C.makeDescriptor(e.manifest.name,"unknown")}else s=C.parseDescriptor(i);const a=p.npmHttpUtils.getIdentUrl(s);let c;try{c=K(await p.npmHttpUtils.get(a,{configuration:e,ident:s,jsonResponse:!0}))}catch(e){throw"HTTPError"!==e.name?e:404===e.response.statusCode?new g.lk(l.b.EXCEPTION,"Package not found"):new g.lk(l.b.EXCEPTION,e.toString())}const u=Object.keys(c.versions).sort(k().compareLoose);let h=c["dist-tags"].latest||u[u.length-1];if(k().validRange(s.range)){const t=k().maxSatisfying(u,s.range);null!==t?h=t:(o.reportWarning(l.b.UNNAMED,`Unmet range ${C.prettyRange(e,s.range)}; falling back to the latest version`),n=!0)}else"unknown"!==s.range&&(o.reportWarning(l.b.UNNAMED,`Invalid range ${C.prettyRange(e,s.range)}; falling back to the latest version`),n=!0);const f=c.versions[h],I={...c,...f,version:h,versions:u};let E;if(null!==r){E={};for(const t of r){const r=I[t];void 0!==r?E[t]=r:(o.reportWarning(l.b.EXCEPTION,`The '${t}' field doesn't exist inside ${C.prettyIdent(e,s)}'s informations`),n=!0)}}else this.json||(delete I.dist,delete I.readme,delete I.users),E=I;o.reportJson(E),this.json||A.push(E)}});N.inspect.styles.name="cyan";for(const e of A)(e!==A[0]||n)&&this.context.stdout.write("\n"),this.context.stdout.write((0,N.inspect)(e,{depth:1/0,colors:!0,compact:!1})+"\n");return i.exitCode()}}function K(e){if(Array.isArray(e)){const t=[];for(let r of e)r=K(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 A=K(e[r]);A&&(t[r]=A)}return t}return e||null}F.usage=d.Command.Usage({category:"Npm-related commands",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 `@<range>` 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 ",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)([d.Command.Rest()],F.prototype,"packages",void 0),(0,i.gn)([d.Command.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"})],F.prototype,"fields",void 0),(0,i.gn)([d.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],F.prototype,"json",void 0),(0,i.gn)([d.Command.Path("npm","info")],F.prototype,"execute",null);var M=r(61899);class R extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),t=await x({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const A=await async function({registry:e,report:t,stdin:r,stdout:A}){if(process.env.TEST_ENV)return{name:process.env.TEST_NPM_USER||"",password:process.env.TEST_NPM_PASSWORD||""};t.reportInfo(l.b.UNNAMED,"Logging in to "+e);let n=!1;e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(t.reportInfo(l.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);t.reportSeparator();const{username:o,password:i}=await(0,M.prompt)([{type:"input",name:"username",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:A},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:A}]);return t.reportSeparator(),{name:o,password:i}}({registry:t,report:r,stdin:this.context.stdin,stdout:this.context.stdout}),n="/-/user/org.couchdb.user:"+encodeURIComponent(A.name),i=await p.npmHttpUtils.put(n,A,{attemptedAs:A.name,configuration:e,registry:t,jsonResponse:!0,authType:p.npmHttpUtils.AuthType.NO_AUTH});return await async function(e,t,{configuration:r,scope:A}){const n=e=>r=>{const A=f.isIndexableObject(r)?r:{},n=A[e],o=f.isIndexableObject(n)?n:{};return{...A,[e]:{...o,npmAuthToken:t}}},i=A?{npmScopes:n(A)}:{npmRegistries:n(e)};return await o.VK.updateHomeConfiguration(i)}(t,i.token,{configuration:e,scope:this.scope}),r.reportInfo(l.b.UNNAMED,"Successfully logged in")})).exitCode()}}async function x({scope:e,publish:t,configuration:r,cwd:A}){return e&&t?p.npmConfigUtils.getScopeRegistry(e,{configuration:r,type:p.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):e?p.npmConfigUtils.getScopeRegistry(e,{configuration:r}):t?p.npmConfigUtils.getPublishRegistry((await(0,s.openWorkspace)(r,A)).manifest,{configuration:r}):p.npmConfigUtils.getDefaultRegistry({configuration:r})}R.usage=d.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)([d.Command.String("-s,--scope",{description:"Login to the registry configured for a given scope"})],R.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Login to the publish registry"})],R.prototype,"publish",void 0),(0,i.gn)([d.Command.Path("npm","login")],R.prototype,"execute",null);const L=new Set(["npmAuthIdent","npmAuthToken"]);class P extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1,this.all=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),t=async()=>{var t;const r=await x({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),A=await o.VK.find(this.context.cwd,this.context.plugins),n=C.makeIdent(null!==(t=this.scope)&&void 0!==t?t:null,"pkg");return!p.npmConfigUtils.getAuthConfiguration(r,{configuration:A,ident:n}).get("npmAuthToken")};return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{if(this.all&&(await async function(){const e=e=>{let t=!1;const r=f.isIndexableObject(e)?{...e}:{};r.npmAuthToken&&(delete r.npmAuthToken,t=!0);for(const e of Object.keys(r))O(r,e)&&(t=!0);if(0!==Object.keys(r).length)return t?r:e};return await o.VK.updateHomeConfiguration({npmRegistries:e,npmScopes:e})}(),r.reportInfo(l.b.UNNAMED,"Successfully logged out from everything")),this.scope)return await U("npmScopes",this.scope),void(await t()?r.reportInfo(l.b.UNNAMED,"Successfully logged out from "+this.scope):r.reportWarning(l.b.UNNAMED,"Scope authentication settings removed, but some other ones settings still apply to it"));const A=await x({configuration:e,cwd:this.context.cwd,publish:this.publish});await U("npmRegistries",A),await t()?r.reportInfo(l.b.UNNAMED,"Successfully logged out from "+A):r.reportWarning(l.b.UNNAMED,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}}function O(e,t){const r=e[t];if(!f.isIndexableObject(r))return!1;const A=new Set(Object.keys(r));if([...L].every(e=>!A.has(e)))return!1;for(const e of L)A.delete(e);if(0===A.size)return e[t]=void 0,!0;const n={...r};for(const e of L)delete n[e];return e[t]=n,!0}async function U(e,t){return await o.VK.updateHomeConfiguration({[e]:e=>{const r=f.isIndexableObject(e)?e:{};if(!Object.prototype.hasOwnProperty.call(r,t))return e;const A=r[t],n=f.isIndexableObject(A)?A:{},o=new Set(Object.keys(n));if([...L].every(e=>!o.has(e)))return e;for(const e of L)o.delete(e);if(0===o.size){if(1===Object.keys(r).length)return;return{...r,[t]:void 0}}const i={};for(const e of L)i[e]=void 0;return{...r,[t]:{...n,...i}}}})}P.usage=d.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 and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Logout of the registry configured for a given scope"})],P.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Logout of the publish registry"})],P.prototype,"publish",void 0),(0,i.gn)([d.Command.Boolean("-A,--all",{description:"Logout of all registries"})],P.prototype,"all",void 0),(0,i.gn)([d.Command.Path("npm","logout")],P.prototype,"execute",null);var T=r(63088),j=r(49881);class Y extends s.BaseCommand{constructor(){super(...arguments),this.tag="latest",this.tolerateRepublish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);if(r.manifest.private)throw new d.UsageError("Private workspaces cannot be published");if(null===r.manifest.name||null===r.manifest.version)throw new d.UsageError("Workspaces must have valid names and versions to be published on an external registry");await t.restoreInstallState();const A=r.manifest.name,n=r.manifest.version,i=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{if(this.tolerateRepublish)try{const r=await p.npmHttpUtils.get(p.npmHttpUtils.getIdentUrl(A),{configuration:e,registry:i,ident:A,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(r,"versions"))throw new g.lk(l.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(r.versions,n))return void t.reportWarning(l.b.UNNAMED,`Registry already knows about version ${n}; skipping.`)}catch(e){if("HTTPError"!==e.name)throw e;if(404!==e.response.statusCode)throw new g.lk(l.b.NETWORK_ERROR,`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`)}await T.maybeExecuteWorkspaceLifecycleScript(r,"prepublish",{report:t}),await j.packUtils.prepareForPack(r,{report:t},async()=>{const n=await j.packUtils.genPackList(r);for(const e of n)t.reportInfo(null,e);const o=await j.packUtils.genPackStream(r,n),s=await f.bufferStream(o),a=await p.npmPublishUtils.makePublishBody(r,s,{access:this.access,tag:this.tag,registry:i});try{await p.npmHttpUtils.put(p.npmHttpUtils.getIdentUrl(A),a,{configuration:e,registry:i,ident:A,jsonResponse:!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(l.b.NETWORK_ERROR,r)}}}),t.hasErrors()||t.reportInfo(l.b.UNNAMED,"Package archive published")})).exitCode()}}Y.usage=d.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)([d.Command.String("--access",{description:"The access for the published package (public or restricted)"})],Y.prototype,"access",void 0),(0,i.gn)([d.Command.String("--tag",{description:"The tag on the registry that the package should be attached to"})],Y.prototype,"tag",void 0),(0,i.gn)([d.Command.Boolean("--tolerate-republish",{description:"Warn and exit when republishing an already existing version of a package"})],Y.prototype,"tolerateRepublish",void 0),(0,i.gn)([d.Command.Path("npm","publish")],Y.prototype,"execute",null);var G=r(46009);class H extends s.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);let A;if(void 0!==this.package)A=C.parseIdent(this.package);else{if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);if(!r.manifest.name)throw new d.UsageError("Missing 'name' field in "+G.y1.join(r.cwd,G.QS.manifest));A=r.manifest.name}const n=await J(A,e),i={children:f.sortMap(Object.entries(n),([e])=>e).map(([e,t])=>({value:I.tuple(I.Type.RESOLUTION,{descriptor:C.makeDescriptor(A,e),locator:C.makeLocator(A,t)})}))};return u.emitTree(i,{configuration:e,json:this.json,stdout:this.context.stdout})}}async function J(e,t){const r=`/-/package${p.npmHttpUtils.getIdentUrl(e)}/dist-tags`;return p.npmHttpUtils.get(r,{configuration:t,ident:e,jsonResponse:!0}).catch(e=>{throw"HTTPError"!==e.name?e:404===e.response.statusCode?new g.lk(l.b.EXCEPTION,"Package not found"):new g.lk(l.b.EXCEPTION,e.toString())})}H.usage=d.Command.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:"\n This command will list all tags of a package from the npm registry.\n\n If the package is not specified, Yarn will default to the current workspace.\n ",examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]}),(0,i.gn)([d.Command.String({required:!1})],H.prototype,"package",void 0),(0,i.gn)([d.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],H.prototype,"json",void 0),(0,i.gn)([d.Command.Path("npm","tag","list")],H.prototype,"execute",null);class q extends s.BaseCommand{async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=C.parseDescriptor(this.package,!0),n=A.range;if(!k().valid(n))throw new d.UsageError(`The range ${I.pretty(e,A.range,I.Type.RANGE)} must be a valid semver version`);const i=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e}),c=I.pretty(e,A,I.Type.IDENT),g=I.pretty(e,n,I.Type.RANGE),u=I.pretty(e,this.tag,I.Type.CODE);return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const r=await J(A,e);Object.prototype.hasOwnProperty.call(r,this.tag)&&r[this.tag]===n&&t.reportWarning(l.b.UNNAMED,`Tag ${u} is already set to version ${g}`);try{const t=`/-/package${p.npmHttpUtils.getIdentUrl(A)}/dist-tags/${encodeURIComponent(this.tag)}`;await p.npmHttpUtils.put(t,n,{configuration:e,registry:i,ident:A,jsonRequest:!0,jsonResponse:!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(l.b.NETWORK_ERROR,r)}}t.hasErrors()||t.reportInfo(l.b.UNNAMED,`Tag ${u} added to version ${g} of package ${c}`)})).exitCode()}}q.usage=d.Command.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:"\n This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.\n ",examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]}),(0,i.gn)([d.Command.String()],q.prototype,"package",void 0),(0,i.gn)([d.Command.String()],q.prototype,"tag",void 0),(0,i.gn)([d.Command.Path("npm","tag","add")],q.prototype,"execute",null);var z=r(15966);class W extends s.BaseCommand{async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=C.parseIdent(this.package),n=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e}),i=I.pretty(e,this.tag,I.Type.CODE),c=I.pretty(e,A,I.Type.IDENT),g=await J(A,e);if(!Object.prototype.hasOwnProperty.call(g,this.tag))throw new d.UsageError(`${i} is not a tag of package ${c}`);return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{try{const t=`/-/package${p.npmHttpUtils.getIdentUrl(A)}/dist-tags/${encodeURIComponent(this.tag)}`;await p.npmHttpUtils.del(t,{configuration:e,registry:n,ident:A,jsonResponse:!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(l.b.NETWORK_ERROR,r)}}t.hasErrors()||t.reportInfo(l.b.UNNAMED,`Tag ${i} removed from package ${c}`)})).exitCode()}}W.schema=z.object().shape({tag:z.string().notOneOf(["latest"])}),W.usage=d.Command.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:"\n This command will remove a tag from a package from the npm registry.\n ",examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]}),(0,i.gn)([d.Command.String()],W.prototype,"package",void 0),(0,i.gn)([d.Command.String()],W.prototype,"tag",void 0),(0,i.gn)([d.Command.Path("npm","tag","remove")],W.prototype,"execute",null);class V extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins);let t;t=this.scope&&this.publish?p.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e,type:p.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):this.scope?p.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e}):this.publish?p.npmConfigUtils.getPublishRegistry((await(0,s.openWorkspace)(e,this.context.cwd)).manifest,{configuration:e}):p.npmConfigUtils.getDefaultRegistry({configuration:e});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{try{const A=await p.npmHttpUtils.get("/-/whoami",{configuration:e,registry:t,authType:p.npmHttpUtils.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?C.makeIdent(this.scope,""):void 0});r.reportInfo(l.b.UNNAMED,A.username)}catch(e){if("HTTPError"!==e.name)throw e;401===e.response.statusCode||403===e.response.statusCode?r.reportError(l.b.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired"):r.reportError(l.b.AUTHENTICATION_INVALID,e.toString())}})).exitCode()}}V.usage=d.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)([d.Command.String("-s,--scope",{description:"Print username for the registry configured for a given scope"})],V.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Print username for the publish registry"})],V.prototype,"publish",void 0),(0,i.gn)([d.Command.Path("npm","whoami")],V.prototype,"execute",null);const X={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:o.a2.STRING,default:null}},commands:[D,F,R,P,Y,q,H,W,V]}},14224:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>W,npmConfigUtils:()=>A,npmHttpUtils:()=>n,npmPublishUtils:()=>o});var A={};r.r(A),r.d(A,{RegistryType:()=>l,getAuthConfiguration:()=>Q,getDefaultRegistry:()=>y,getPublishRegistry:()=>E,getRegistryConfiguration:()=>m,getScopeConfiguration:()=>w,getScopeRegistry:()=>B,normalizeRegistry:()=>I});var n={};r.r(n),r.d(n,{AuthType:()=>u,del:()=>N,get:()=>v,getIdentUrl:()=>b,handleInvalidAuthenticationError:()=>D,post:()=>S,put:()=>k});var o={};r.r(o),r.d(o,{makePublishBody:()=>J});var i=r(39922),s=r(54143),a=r(72785),c=r(53887),g=r.n(c);var l,u,h=r(79669),p=r(35691),d=r(92659),C=r(61899),f=r(78835);function I(e){return e.replace(/\/$/,"")}function E(e,{configuration:t}){return e.publishConfig&&e.publishConfig.registry?I(e.publishConfig.registry):e.name?B(e.name.scope,{configuration:t,type:l.PUBLISH_REGISTRY}):y({configuration:t,type:l.PUBLISH_REGISTRY})}function B(e,{configuration:t,type:r=l.FETCH_REGISTRY}){const A=w(e,{configuration:t});if(null===A)return y({configuration:t,type:r});const n=A.get(r);return null===n?y({configuration:t,type:r}):I(n)}function y({configuration:e,type:t=l.FETCH_REGISTRY}){const r=e.get(t);return I(null!==r?r:e.get(l.FETCH_REGISTRY))}function m(e,{configuration:t}){const r=t.get("npmRegistries"),A=r.get(e);if(void 0!==A)return A;const n=r.get(e.replace(/^[a-z]+:/,""));return void 0!==n?n:null}function w(e,{configuration:t}){if(null===e)return null;const r=t.get("npmScopes").get(e);return r||null}function Q(e,{configuration:t,ident:r}){const A=r&&w(r.scope,{configuration:t});if((null==A?void 0:A.get("npmAuthIdent"))||(null==A?void 0:A.get("npmAuthToken")))return A;return m(e,{configuration:t})||t}async function D(e,{attemptedAs:t,registry:r,headers:A,configuration:n}){if("HTTPError"===e.name&&401===e.response.statusCode)throw new p.lk(d.b.AUTHENTICATION_INVALID,`Invalid authentication (${"string"!=typeof t?"as "+await async function(e,t,{configuration:r}){var A;if(void 0===t||void 0===t.authorization)return"an anonymous user";try{const n=await h.get(new f.URL(e+"/-/whoami").href,{configuration:r,headers:t,jsonResponse:!0});return null!==(A=n.username)&&void 0!==A?A:"an unknown user"}catch(e){return"an unknown user"}}(r,A,{configuration:n}):"attempted as "+t})`)}function b(e){return e.scope?`/@${e.scope}%2f${e.name}`:"/"+e.name}async function v(e,{configuration:t,headers:r,ident:A,authType:n,registry:o,...i}){if(A&&void 0===o&&(o=B(A.scope,{configuration:t})),A&&A.scope&&void 0===n&&(n=u.BEST_EFFORT),"string"!=typeof o)throw new Error("Assertion failed: The registry should be a string");const s=F(o,{authType:n,configuration:t,ident:A});let a;s&&(r={...r,authorization:s});try{a=new f.URL(e)}catch(t){a=new f.URL(o+e)}try{return await h.get(a.href,{configuration:t,headers:r,...i})}catch(e){throw await D(e,{registry:o,configuration:t,headers:r}),e}}async function S(e,t,{attemptedAs:r,configuration:A,headers:n,ident:o,authType:i=u.ALWAYS_AUTH,registry:s,...a}){if(o&&void 0===s&&(s=B(o.scope,{configuration:A})),"string"!=typeof s)throw new Error("Assertion failed: The registry should be a string");const c=F(s,{authType:i,configuration:A,ident:o});c&&(n={...n,authorization:c});try{return await h.post(s+e,t,{configuration:A,headers:n,...a})}catch(o){if(!M(o))throw await D(o,{attemptedAs:r,registry:s,configuration:A,headers:n}),o;const i=await K(),c={...n,...R(i)};try{return await h.post(`${s}${e}`,t,{configuration:A,headers:c,...a})}catch(e){throw await D(e,{attemptedAs:r,registry:s,configuration:A,headers:n}),e}}}async function k(e,t,{attemptedAs:r,configuration:A,headers:n,ident:o,authType:i=u.ALWAYS_AUTH,registry:s,...a}){if(o&&void 0===s&&(s=B(o.scope,{configuration:A})),"string"!=typeof s)throw new Error("Assertion failed: The registry should be a string");const c=F(s,{authType:i,configuration:A,ident:o});c&&(n={...n,authorization:c});try{return await h.put(s+e,t,{configuration:A,headers:n,...a})}catch(o){if(!M(o))throw await D(o,{attemptedAs:r,registry:s,configuration:A,headers:n}),o;const i=await K(),c={...n,...R(i)};try{return await h.put(`${s}${e}`,t,{configuration:A,headers:c,...a})}catch(e){throw await D(e,{attemptedAs:r,registry:s,configuration:A,headers:n}),e}}}async function N(e,{attemptedAs:t,configuration:r,headers:A,ident:n,authType:o=u.ALWAYS_AUTH,registry:i,...s}){if(n&&void 0===i&&(i=B(n.scope,{configuration:r})),"string"!=typeof i)throw new Error("Assertion failed: The registry should be a string");const a=F(i,{authType:o,configuration:r,ident:n});a&&(A={...A,authorization:a});try{return await h.del(i+e,{configuration:r,headers:A,...s})}catch(n){if(!M(n))throw await D(n,{attemptedAs:t,registry:i,configuration:r,headers:A}),n;const o=await K(),a={...A,...R(o)};try{return await h.del(`${i}${e}`,{configuration:r,headers:a,...s})}catch(e){throw await D(e,{attemptedAs:t,registry:i,configuration:r,headers:A}),e}}}function F(e,{authType:t=u.CONFIGURATION,configuration:r,ident:A}){const n=Q(e,{configuration:r,ident:A}),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")}}(n,t);if(!o)return null;if(n.get("npmAuthToken"))return"Bearer "+n.get("npmAuthToken");if(n.get("npmAuthIdent"))return"Basic "+n.get("npmAuthIdent");if(o&&t!==u.BEST_EFFORT)throw new p.lk(d.b.AUTHENTICATION_NOT_FOUND,"No authentication configured for request");return null}async function K(){if(process.env.TEST_ENV)return process.env.TEST_NPM_2FA_TOKEN||"";const{otp:e}=await(0,C.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return e}function M(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}}function R(e){return{"npm-otp":e}}!function(e){e.FETCH_REGISTRY="npmRegistryServer",e.PUBLISH_REGISTRY="npmPublishRegistry"}(l||(l={})),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={}));class x{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const r=new f.URL(e.reference);return!!g().valid(r.pathname)&&!r.searchParams.has("__archiveUrl")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.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:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let r;try{r=await v(x.getLocatorUrl(e),{configuration:t.project.configuration,ident:e})}catch(A){r=await v(x.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:t.project.configuration,ident:e})}return await a.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,t,{configuration:r}){let A=B(e.scope,{configuration:r});const n=x.getLocatorUrl(e);return t=t.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),A=A.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),(t=t.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"))===A+n||t===A+n.replace(/%2f/g,"/")}static getLocatorUrl(e){const t=g().clean(e.reference.slice("npm:".length));if(null===t)throw new p.lk(d.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");return`${b(e)}/-/${e.name}-${t}.tgz`}}var L=r(46611),P=r(36545),O=r(32485);const U=s.makeIdent(null,"node-gyp"),T=/\b(node-gyp|prebuild-install)\b/;var j=r(52779);var Y=r(49881),G=r(76417),H=r(10129);async function J(e,t,{access:r,tag:A,registry:n}){const o=e.project.configuration,i=e.manifest.name,a=e.manifest.version,c=s.stringifyIdent(i),g=(0,G.createHash)("sha1").update(t).digest("hex"),l=H.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"):i.scope?"restricted":"public");const u=await Y.packUtils.genPackageManifest(e),h=`${c}-${a}.tgz`,p=new f.URL(`${c}/-/${h}`,n);return{_id:c,_attachments:{[h]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}},name:c,access:r,"dist-tags":{[A]:a},versions:{[a]:{...u,_id:`${c}@${a}`,name:c,version:a,dist:{shasum:g,integrity:l,tarball:p.toString()}}}}}const q={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:i.a2.BOOLEAN,default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:i.a2.SECRET,default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:i.a2.SECRET,default:null}},z={npmPublishRegistry:{description:"Registry to push packages to",type:i.a2.STRING,default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:i.a2.STRING,default:"https://registry.yarnpkg.com"}},W={configuration:{...q,...z,npmScopes:{description:"Settings per package scope",type:i.a2.MAP,valueDefinition:{description:"",type:i.a2.SHAPE,properties:{...q,...z}}},npmRegistries:{description:"Settings per registry",type:i.a2.MAP,normalizeKeys:I,valueDefinition:{description:"",type:i.a2.SHAPE,properties:{...q}}}},fetchers:[class{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r,params:A}=s.parseRange(e.reference);return!!g().valid(r)&&(null!==A&&"string"==typeof A.__archiveUrl)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.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:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){const{params:r}=s.parseRange(e.reference);if(null===r||"string"!=typeof r.__archiveUrl)throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");const A=await v(r.__archiveUrl,{configuration:t.project.configuration,ident:e});return await a.convertToZip(A,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.getIdentVendorPath(e),stripComponents:1})}},x],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!s.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.parseDescriptor(e.range.slice("npm:".length),!0);return t.resolver.getResolutionDependencies(r,t)}async getCandidates(e,t,r){const A=s.parseDescriptor(e.range.slice("npm:".length),!0);return await r.resolver.getCandidates(A,t,r)}async getSatisfying(e,t,r){const A=s.parseDescriptor(e.range.slice("npm:".length),!0);return r.resolver.getSatisfying(A,t,r)}resolve(e,t){throw new Error("Unreachable")}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!P.validRange(e.range.slice("npm:".length))}supportsLocator(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r}=s.parseRange(e.reference);return!!g().valid(r)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=P.validRange(e.range.slice("npm:".length));if(null===A)throw new Error("Expected a valid range, got "+e.range.slice("npm:".length));const n=await v(b(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0}),o=Object.keys(n.versions).map(e=>new(g().SemVer)(e)).filter(e=>A.test(e)),i=o.filter(e=>!n.versions[e.raw].deprecated),a=i.length>0?i:o;return a.sort((e,t)=>-e.compare(t)),a.map(t=>{const A=s.makeLocator(e,"npm:"+t.raw),o=n.versions[t.raw].dist.tarball;return x.isConventionalTarballUrl(A,o,{configuration:r.project.configuration})?A:s.bindLocator(A,{__archiveUrl:o})})}async getSatisfying(e,t,r){const A=P.validRange(e.range.slice("npm:".length));if(null===A)throw new Error("Expected a valid range, got "+e.range.slice("npm:".length));return t.map(e=>{try{return new(g().SemVer)(e.slice("npm:".length))}catch(e){return null}}).filter(e=>null!==e).filter(e=>A.test(e)).sort((e,t)=>-e.compare(t)).map(t=>s.makeLocator(e,"npm:"+t.raw))}async resolve(e,t){const{selector:r}=s.parseRange(e.reference),A=g().clean(r);if(null===A)throw new p.lk(d.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");const n=await v(b(e),{configuration:t.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"versions"))throw new p.lk(d.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(n.versions,A))throw new p.lk(d.b.REMOTE_NOT_FOUND,`Registry failed to return reference "${A}"`);const o=new L.G;if(o.load(n.versions[A]),!o.dependencies.has(U.identHash)&&!o.peerDependencies.has(U.identHash))for(const r of o.scripts.values())if(r.match(T)){o.dependencies.set(U.identHash,s.makeDescriptor(U,"latest")),t.report.reportWarning(d.b.NODE_GYP_INJECTED,s.prettyLocator(t.project.configuration,e)+": Implicit dependencies on node-gyp are discouraged");break}return"string"==typeof o.raw.deprecated&&t.report.reportWarning(d.b.DEPRECATED_PACKAGE,`${s.prettyLocator(t.project.configuration,e)} is deprecated: ${o.raw.deprecated}`),{...e,version:A,languageName:"node",linkType:O.Un.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:")&&!!j.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 A=e.range.slice("npm:".length),n=await v(b(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"dist-tags"))throw new p.lk(d.b.REMOTE_INVALID,'Registry returned invalid data - missing "dist-tags" field');const o=n["dist-tags"];if(!Object.prototype.hasOwnProperty.call(o,A))throw new p.lk(d.b.REMOTE_NOT_FOUND,`Registry failed to return tag "${A}"`);const i=o[A],a=s.makeLocator(e,"npm:"+i),c=n.versions[i].dist.tarball;return x.isConventionalTarballUrl(a,c,{configuration:r.project.configuration})?[a]:[s.bindLocator(a,{__archiveUrl:c})]}async getSatisfying(e,t,r){return null}async resolve(e,t){throw new Error("Unreachable")}}]}},49881:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T,packUtils:()=>A});var A={};r.r(A),r.d(A,{genPackList:()=>K,genPackStream:()=>N,genPackageManifest:()=>F,hasPackScripts:()=>S,prepareForPack:()=>k});var n=r(54143),o=r(35691),i=r(92659),s=r(36370),a=r(40822);class c extends a.Command{}(0,s.gn)([a.Command.String("--cwd",{hidden:!0})],c.prototype,"cwd",void 0);var g=r(46611),l=r(46009);class u extends a.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${l.y1.relative(e,t)} isn't a workspace of ${l.y1.join(e,g.G.fileName)}).`)}}r(63129),r(5864),r(35747);new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]]);var h=r(71643),p=r(39922);(0,s.gn)([a.Command.Path("--welcome")],class extends c{async execute(){const e=await p.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${h.pretty(e,"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 ${h.pretty(e,"https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${h.pretty(e,"https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${h.pretty(e,"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 ${h.pretty(e,"find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${h.pretty(e,"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 ${h.pretty(e,"yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}.prototype,"execute",null);var d=r(85824),C=r(28148),f=r(33720),I=r(15815),E=r(43896),B=r(63088),y=r(10489),m=r(2401),w=r.n(m),Q=r(59938),D=r(78761);const b=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],v=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function S(e){return!!B.hasWorkspaceScript(e,"prepack")||!!B.hasWorkspaceScript(e,"postpack")}async function k(e,{report:t},r){await B.maybeExecuteWorkspaceLifecycleScript(e,"prepack",{report:t});try{await r()}finally{await B.maybeExecuteWorkspaceLifecycleScript(e,"postpack",{report:t})}}async function N(e,t){var r,A;void 0===t&&(t=await K(e));const n=new Set;for(const t of null!==(A=null===(r=e.manifest.publishConfig)||void 0===r?void 0:r.executableFiles)&&void 0!==A?A:new Set)n.add(l.y1.normalize(t));for(const t of e.manifest.bin.values())n.add(l.y1.normalize(t));const o=Q.pack();process.nextTick(async()=>{for(const r of t){const t=l.y1.normalize(r),A=l.y1.resolve(e.cwd,t),i=l.y1.join("package",t),s=await E.xfs.lstatPromise(A),a={name:i,mtime:new Date(3155328e5)},c=n.has(t)?493:420;let g,u;const h=new Promise((e,t)=>{g=e,u=t}),p=e=>{e?u(e):g()};if(s.isFile()){let r;r="package.json"===t?Buffer.from(JSON.stringify(await F(e),null,2)):await E.xfs.readFilePromise(A),o.entry({...a,mode:c,type:"file"},r,p)}else s.isSymbolicLink()?o.entry({...a,mode:c,type:"symlink",linkname:await E.xfs.readlinkPromise(A)},p):p(new Error(`Unsupported file type ${s.mode} for ${l.cS.fromPortablePath(t)}`));await h}o.finalize()});const i=(0,D.createGzip)();return o.pipe(i),i}async function F(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){var t,r,A,n,o,i,s,a;const c=e.project,g=c.configuration,u={accept:[],reject:[]};for(const e of v)u.reject.push(e);for(const e of b)u.accept.push(e);u.reject.push(g.get("rcFilename"));const h=t=>{if(null===t||!t.startsWith(e.cwd+"/"))return;const r=l.y1.relative(e.cwd,t),A=l.y1.resolve(l.LZ.root,r);u.reject.push(A)};h(l.y1.resolve(c.cwd,g.get("lockfileFilename"))),h(g.get("bstatePath")),h(g.get("cacheFolder")),h(g.get("globalFolder")),h(g.get("installStatePath")),h(g.get("virtualFolder")),h(g.get("yarnPath")),await g.triggerHook(e=>e.populateYarnPaths,c,e=>{h(e)});for(const t of c.workspaces){const r=l.y1.relative(e.cwd,t.cwd);""===r||r.match(/^(\.\.)?\//)||u.reject.push("/"+r)}const p={accept:[],reject:[]},d=null!==(r=null===(t=e.manifest.publishConfig)||void 0===t?void 0:t.main)&&void 0!==r?r:e.manifest.main,C=null!==(n=null===(A=e.manifest.publishConfig)||void 0===A?void 0:A.module)&&void 0!==n?n:e.manifest.module,f=null!==(i=null===(o=e.manifest.publishConfig)||void 0===o?void 0:o.browser)&&void 0!==i?i:e.manifest.browser,I=null!==(a=null===(s=e.manifest.publishConfig)||void 0===s?void 0:s.bin)&&void 0!==a?a:e.manifest.bin;null!=d&&p.accept.push(l.y1.resolve(l.LZ.root,d)),null!=C&&p.accept.push(l.y1.resolve(l.LZ.root,C)),"string"==typeof f&&p.accept.push(l.y1.resolve(l.LZ.root,f));for(const e of I.values())p.accept.push(l.y1.resolve(l.LZ.root,e));if(f instanceof Map)for(const[e,t]of f.entries())p.accept.push(l.y1.resolve(l.LZ.root,e)),"string"==typeof t&&p.accept.push(l.y1.resolve(l.LZ.root,t));const E=null!==e.manifest.files;if(E){p.reject.push("/*");for(const t of e.manifest.files)R(p.accept,t,{cwd:l.LZ.root})}return await async function(e,{hasExplicitFileList:t,globalList:r,ignoreList:A}){const n=[],o=new y.n(e),i=[[l.LZ.root,[A]]];for(;i.length>0;){const[e,A]=i.pop(),s=await o.lstatPromise(e);if(!x(e,{globalList:r,ignoreLists:s.isDirectory()?null:A}))if(s.isDirectory()){const n=await o.readdirPromise(e);let s=!1,a=!1;if(!t||e!==l.LZ.root)for(const e of n)s=s||".gitignore"===e,a=a||".npmignore"===e;const c=a?await M(o,e,".npmignore"):s?await M(o,e,".gitignore"):null;let g=null!==c?[c].concat(A):A;x(e,{globalList:r,ignoreLists:A})&&(g=[...A,{accept:[],reject:["**/*"]}]);for(const t of n)i.push([l.y1.resolve(e,t),g])}else(s.isFile()||s.isSymbolicLink())&&n.push(l.y1.relative(l.LZ.root,e))}return n.sort()}(e.cwd,{hasExplicitFileList:E,globalList:u,ignoreList:p})}async function M(e,t,r){const A={accept:[],reject:[]},n=await e.readFilePromise(l.y1.join(t,r),"utf8");for(const e of n.split(/\n/g))R(A.reject,e,{cwd:t});return A}function R(e,t,{cwd:r}){const A=t.trim();""!==A&&"#"!==A[0]&&e.push(function(e,{cwd:t}){const r="!"===e[0];return r&&(e=e.slice(1)),e.match(/\.{0,1}\//)&&(e=l.y1.resolve(t,e)),r&&(e="!"+e),e}(A,{cwd:r}))}function x(e,{globalList:t,ignoreLists:r}){if(L(e,t.accept))return!1;if(L(e,t.reject))return!0;if(null!==r)for(const t of r){if(L(e,t.accept))return!1;if(L(e,t.reject))return!0}return!1}function L(e,t){let r=t;const A=[];for(let e=0;e<t.length;++e)"!"!==t[e][0]?r!==t&&r.push(t[e]):(r===t&&(r=t.slice(0,e)),A.push(t[e].slice(1)));return!P(e,A)&&!!P(e,r)}function P(e,t){let r=t;const A=[];for(let e=0;e<t.length;++e)t[e].includes("/")?r!==t&&r.push(t[e]):(r===t&&(r=t.slice(0,e)),A.push(t[e]));return!!w().isMatch(e,r,{dot:!0,nocase:!0})||!!w().isMatch(e,A,{dot:!0,basename:!0,nocase:!0})}class O extends c{constructor(){super(...arguments),this.installIfNeeded=!1,this.dryRun=!1,this.json=!1}async execute(){const e=await p.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await d.I.find(e,this.context.cwd);if(!r)throw new u(t.cwd,this.context.cwd);await S(r)&&(this.installIfNeeded?await t.install({cache:await C.C.find(e),report:new f.$}):await t.restoreInstallState());const A=void 0!==this.out?l.y1.resolve(this.context.cwd,function(e,{workspace:t}){const r=e.replace("%s",function(e){return null!==e.manifest.name?n.slugifyIdent(e.manifest.name):"package"}(t)).replace("%v",function(e){return null!==e.manifest.version?e.manifest.version:"unknown"}(t));return l.cS.toPortablePath(r)}(this.out,{workspace:r})):l.y1.resolve(r.cwd,"package.tgz");return(await I.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async t=>{await k(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 N(r,e),n=E.xfs.createWriteStream(A);t.pipe(n),await new Promise(e=>{n.on("finish",e)})}}),this.dryRun||(t.reportInfo(i.b.UNNAMED,"Package archive generated in "+h.pretty(e,A,h.Type.PATH)),t.reportJson({output:A}))})).exitCode()}}O.usage=a.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 `-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,s.gn)([a.Command.Boolean("--install-if-needed",{description:"Run a preliminary `yarn install` if the package contains build scripts"})],O.prototype,"installIfNeeded",void 0),(0,s.gn)([a.Command.Boolean("-n,--dry-run",{description:"Print the file paths without actually generating the package archive"})],O.prototype,"dryRun",void 0),(0,s.gn)([a.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],O.prototype,"json",void 0),(0,s.gn)([a.Command.String("--filename",{hidden:!1,description:"Create the archive at the specified path"}),a.Command.String("-o,--out",{description:"Create the archive at the specified path"})],O.prototype,"out",void 0),(0,s.gn)([a.Command.Path("pack")],O.prototype,"execute",null);const U=["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.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.bin&&(t.bin=t.publishConfig.bin));const r=e.project;for(const A of U)for(const s of e.manifest.getForScope(A).values()){const e=r.tryWorkspaceByDescriptor(s),a=n.parseRange(s.range);if("workspace:"===a.protocol)if(null===e){if(null===r.tryWorkspaceByIdent(s))throw new o.lk(i.b.WORKSPACE_NOT_FOUND,n.prettyDescriptor(r.configuration,s)+": No local workspace found for this range")}else{let r;r=n.areDescriptorsEqual(s,e.anchoredDescriptor)||"*"===a.selector?e.manifest.version:a.selector,t[A][n.stringifyIdent(s)]=r}}}},commands:[O]}},29936:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>re,patchUtils:()=>A});var A={};r.r(A),r.d(A,{applyPatchFile:()=>S,diffFolders:()=>H,extractPackageToDisk:()=>G,isParentRequired:()=>j,loadPatchFiles:()=>Y,makeDescriptor:()=>O,makeLocator:()=>U,parseDescriptor:()=>x,parseLocator:()=>L,parsePatchFile:()=>D});var n=r(39922),o=r(35691),i=r(92659),s=r(54143),a=r(73632),c=r(43896),g=r(46009),l=r(90739),u=r(75448),h=r(65281),p=r(33720),d=r(6220),C=r(36545),f=r(78420);class I extends Error{constructor(e,t){super("Cannot apply hunk #"+(e+1)),this.hunk=t}}const E=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function B(e){return g.y1.relative(g.LZ.root,g.y1.resolve(g.LZ.root,g.cS.toPortablePath(e)))}function y(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)}}}var m;!function(e){e.Context="context",e.Insertion="insertion",e.Deletion="deletion"}(m||(m={}));const w={"@":"header","-":m.Deletion,"+":m.Insertion," ":m.Context,"\\":"pragma",undefined:m.Context};function Q(e){const t=511&parseInt(e,8);if(420!==t&&493!==t)throw new Error("Unexpected file mode string: "+e);return t}function D(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:A,diffLineToPath:n,oldMode:o,newMode:i,deletedFileMode:s,newFileMode:c,renameFrom:g,renameTo:l,beforeHash:u,afterHash:h,fromPath:p,toPath:d,hunks:C}=r,f=g?"rename":s?"file deletion":c?"file creation":C&&C.length>0?"patch":"mode change";let I=null;switch(f){case"rename":if(!g||!l)throw new Error("Bad parser state: rename from & to not given");t.push({type:"rename",semverExclusivity:e,fromPath:B(g),toPath:B(l)}),I=l;break;case"file deletion":{const r=A||p;if(!r)throw new Error("Bad parse state: no path given for file deletion");t.push({type:"file deletion",semverExclusivity:e,hunk:C&&C[0]||null,path:B(r),mode:Q(s),hash:u})}break;case"file creation":{const r=n||d;if(!r)throw new Error("Bad parse state: no path given for file creation");t.push({type:"file creation",semverExclusivity:e,hunk:C&&C[0]||null,path:B(r),mode:Q(c),hash:h})}break;case"patch":case"mode change":I=d||n;break;default:a.assertNever(f)}I&&o&&i&&o!==i&&t.push({type:"mode change",semverExclusivity:e,path:B(I),oldMode:Q(o),newMode:Q(i)}),I&&C&&C.length&&t.push({type:"patch",semverExclusivity:e,path:B(I),hunks:C,beforeHash:u,afterHash:h})}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},A="parsing header",n=null,o=null;function i(){n&&(o&&(n.parts.push(o),o=null),r.hunks.push(n),n=null)}function s(){i(),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;t<e.length;t++){const c=e[t];if("parsing header"===A)if(c.startsWith("@@"))A="parsing hunks",r.hunks=[],t-=1;else if(c.startsWith("diff --git ")){r&&r.diffLineFromPath&&s();const e=c.match(/^diff --git a\/(.*?) b\/(.*?)\s*$/);if(!e)throw new Error("Bad diff line: "+c);r.diffLineFromPath=e[1],r.diffLineToPath=e[2]}else if(c.startsWith("old mode "))r.oldMode=c.slice("old mode ".length).trim();else if(c.startsWith("new mode "))r.newMode=c.slice("new mode ".length).trim();else if(c.startsWith("deleted file mode "))r.deletedFileMode=c.slice("deleted file mode ".length).trim();else if(c.startsWith("new file mode "))r.newFileMode=c.slice("new file mode ".length).trim();else if(c.startsWith("rename from "))r.renameFrom=c.slice("rename from ".length).trim();else if(c.startsWith("rename to "))r.renameTo=c.slice("rename to ".length).trim();else if(c.startsWith("index ")){const e=c.match(/(\w+)\.\.(\w+)/);if(!e)continue;r.beforeHash=e[1],r.afterHash=e[2]}else c.startsWith("semver exclusivity ")?r.semverExclusivity=c.slice("semver exclusivity ".length).trim():c.startsWith("--- ")?r.fromPath=c.slice("--- a/".length).trim():c.startsWith("+++ ")&&(r.toPath=c.slice("+++ b/".length).trim());else{const e=w[c[0]]||null;switch(e){case"header":i(),n={header:y(c),parts:[]};break;case null:A="parsing header",s(),t-=1;break;case"pragma":if(!c.startsWith("\\ No newline at end of file"))throw new Error("Unrecognized pragma in patch file: "+c);if(!o)throw new Error("Bad parser state: No newline at EOF pragma encountered without context");o.noNewlineAtEndOfFile=!0;break;case m.Context:case m.Deletion:case m.Insertion:if(!n)throw new Error("Bad parser state: Hunk lines encountered before hunk header");o&&o.type!==e&&(n.parts.push(o),o=null),o||(o={type:e,lines:[],noNewlineAtEndOfFile:!1}),o.lines.push(c.slice(1));break;default:a.assertNever(e)}}}s();for(const{hunks:e}of t)if(e)for(const t of e)b(t);return t}(t))}function b(e){let t=0,r=0;for(const{type:A,lines:n}of e.parts)switch(A){case m.Context:r+=n.length,t+=n.length;break;case m.Deletion:t+=n.length;break;case m.Insertion:r+=n.length;break;default:a.assertNever(A)}if(t!==e.header.original.length||r!==e.header.patched.length){const A=e=>e<0?e:"+"+e;throw new Error(`hunk header integrity check failed (expected @@ ${A(e.header.original.length)} ${A(e.header.patched.length)} @@, got @@ ${A(t)} ${A(r)} @@)`)}}async function v(e,t,r){const A=await e.lstatPromise(t),n=await r();if(void 0!==n&&(t=n),e.lutimesPromise)await e.lutimesPromise(t,A.atime,A.mtime);else{if(A.isSymbolicLink())throw new Error("Cannot preserve the time values of a symlink");await e.utimesPromise(t,A.atime,A.mtime)}}async function S(e,{baseFs:t=new f.S,dryRun:r=!1,version:A=null}={}){for(const n of e)if(null===n.semverExclusivity||null===A||C.satisfiesWithPrereleases(A,n.semverExclusivity))switch(n.type){case"file deletion":if(r){if(!t.existsSync(n.path))throw new Error("Trying to delete a file that doesn't exist: "+n.path)}else await v(t,g.y1.dirname(n.path),async()=>{await t.unlinkPromise(n.path)});break;case"rename":if(r){if(!t.existsSync(n.fromPath))throw new Error("Trying to move a file that doesn't exist: "+n.fromPath)}else await v(t,g.y1.dirname(n.fromPath),async()=>{await v(t,g.y1.dirname(n.toPath),async()=>{await v(t,n.fromPath,async()=>(await t.movePromise(n.fromPath,n.toPath),n.toPath))})});break;case"file creation":if(r){if(t.existsSync(n.path))throw new Error("Trying to create a file that already exists: "+n.path)}else{const e=n.hunk?n.hunk.parts[0].lines.join("\n")+(n.hunk.parts[0].noNewlineAtEndOfFile?"":"\n"):"";await t.mkdirpPromise(g.y1.dirname(n.path),{chmod:493,utimes:[315532800,315532800]}),await t.writeFilePromise(n.path,e,{mode:n.mode}),await t.utimesPromise(n.path,315532800,315532800)}break;case"patch":await v(t,n.path,async()=>{await F(n,{baseFs:t,dryRun:r})});break;case"mode change":{const e=(await t.statPromise(n.path)).mode;if(k(n.newMode)!==k(e))continue;await v(t,n.path,async()=>{await t.chmodPromise(n.path,n.newMode)})}break;default:a.assertNever(n)}}function k(e){return(64&e)>0}function N(e){return e.replace(/\s+$/,"")}async function F({hunks:e,path:t},{baseFs:r,dryRun:A=!1}){const n=await r.statSync(t).mode,o=(await r.readFileSync(t,"utf8")).split(/\n/),i=[];let s=0,c=0;for(const t of e){const r=Math.max(c,t.header.patched.start+s),A=Math.max(0,r-c),n=Math.max(0,o.length-r-t.header.original.length),a=Math.max(A,n);let g=0,l=0,u=null;for(;g<=a;){if(g<=A&&(l=r-g,u=K(t,o,l),null!==u)){g=-g;break}if(g<=n&&(l=r+g,u=K(t,o,l),null!==u))break;g+=1}if(null===u)throw new I(e.indexOf(t),t);i.push(u),s+=g,c=l+t.header.original.length}if(A)return;let g=0;for(const e of i)for(const t of e)switch(t.type){case"splice":{const e=t.index+g;o.splice(e,t.numToDelete,...t.linesToInsert),g+=t.linesToInsert.length-t.numToDelete}break;case"pop":o.pop();break;case"push":o.push(t.line);break;default:a.assertNever(t)}await r.writeFilePromise(t,o.join("\n"),{mode:n})}function K(e,t,r){const A=[];for(const o of e.parts)switch(o.type){case m.Context:case m.Deletion:for(const e of o.lines){const A=t[r];if(null==A||(n=e,N(A)!==N(n)))return null;r+=1}o.type===m.Deletion&&(A.push({type:"splice",index:r-o.lines.length,numToDelete:o.lines.length,linesToInsert:[]}),o.noNewlineAtEndOfFile&&A.push({type:"push",line:""}));break;case m.Insertion:A.push({type:"splice",index:r,numToDelete:0,linesToInsert:o.lines}),o.noNewlineAtEndOfFile&&A.push({type:"pop"});break;default:a.assertNever(o.type)}var n;return A}const M=/^builtin<([^>]+)>$/;function R(e,t){const{source:r,selector:A,params:n}=s.parseRange(e);if(null===r)throw new Error("Patch locators must explicitly define their source");const o=A?A.split(/&/).map(e=>g.cS.toPortablePath(e)):[],i=n&&"string"==typeof n.locator?s.parseLocator(n.locator):null,a=n&&"string"==typeof n.version?n.version:null;return{parentLocator:i,sourceItem:t(r),patchPaths:o,sourceVersion:a}}function x(e){const{sourceItem:t,...r}=R(e.range,s.parseDescriptor);return{...r,sourceDescriptor:t}}function L(e){const{sourceItem:t,...r}=R(e.reference,s.parseLocator);return{...r,sourceLocator:t}}function P({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:A,patchHash:n},o){const i=null!==e?{locator:s.stringifyLocator(e)}:{},a=void 0!==A?{version:A}:{},c=void 0!==n?{hash:n}:{};return s.makeRange({protocol:"patch:",source:o(t),selector:r.join("&"),params:{...a,...c,...i}})}function O(e,{parentLocator:t,sourceDescriptor:r,patchPaths:A}){return s.makeLocator(e,P({parentLocator:t,sourceItem:r,patchPaths:A},s.stringifyDescriptor))}function U(e,{parentLocator:t,sourcePackage:r,patchPaths:A,patchHash:n}){return s.makeLocator(e,P({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:A,patchHash:n},s.stringifyLocator))}function T({onAbsolute:e,onRelative:t,onBuiltin:r},A){const n=A.match(M);return null!==n?r(n[1]):g.y1.isAbsolute(A)?e(A):t(A)}function j(e){return T({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},e)}async function Y(e,t,r){const A=null!==e?await r.fetcher.fetch(e,r):null,n=A&&A.localPath?{packageFs:new u.M(g.LZ.root),prefixPath:g.y1.relative(g.LZ.root,A.localPath)}:A;A&&A!==n&&A.releaseFs&&A.releaseFs();return(await a.releaseAfterUseAsync(async()=>await Promise.all(t.map(async e=>T({onAbsolute:async()=>await c.xfs.readFilePromise(e,"utf8"),onRelative:async()=>{if(null===A)throw new Error("Assertion failed: The parent locator should have been fetched");return await A.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 G(e,{cache:t,project:r}){const A=r.storedChecksums,n=new p.$,o=r.configuration.makeFetcher(),i=await o.fetch(e,{cache:t,project:r,fetcher:o,checksums:A,report:n}),a=await c.xfs.mktempPromise();return await c.xfs.copyPromise(a,i.prefixPath,{baseFs:i.packageFs}),await c.xfs.writeJsonPromise(g.y1.join(a,".yarn-patch.json"),{locator:s.stringifyLocator(e)}),c.xfs.detachTemp(a),a}async function H(e,t){const r=g.cS.fromPortablePath(e).replace(/\\/g,"/"),A=g.cS.fromPortablePath(t).replace(/\\/g,"/"),{stdout:n}=await d.execvp("git",["diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index",r,A],{cwd:g.cS.toPortablePath(process.cwd())}),o=r.startsWith("/")?e=>e.slice(1):e=>e;return n.replace(new RegExp(`(a|b)(${a.escapeRegExp(`/${o(r)}/`)})`,"g"),"$1/").replace(new RegExp("(a|b)"+a.escapeRegExp(`/${o(A)}/`),"g"),"$1/").replace(new RegExp(a.escapeRegExp(r+"/"),"g"),"").replace(new RegExp(a.escapeRegExp(A+"/"),"g"),"")}var J=r(71643);function q(e,{configuration:t,report:r}){for(const A of e.parts)for(const e of A.lines)switch(A.type){case m.Context:r.reportInfo(null," "+J.pretty(t,e,"grey"));break;case m.Deletion:r.reportError(i.b.FROZEN_LOCKFILE_EXCEPTION,"- "+J.pretty(t,e,J.Type.REMOVED));break;case m.Insertion:r.reportError(i.b.FROZEN_LOCKFILE_EXCEPTION,"+ "+J.pretty(t,e,J.Type.ADDED));break;default:a.assertNever(A.type)}}var z=r(20624);var W=r(36370),V=r(25413),X=r(85824),_=r(28148),Z=r(40822);class $ extends V.BaseCommand{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await X.I.find(e,this.context.cwd),A=await _.C.find(e);if(!r)throw new V.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const o=g.y1.resolve(this.context.cwd,g.cS.toPortablePath(this.patchFolder)),i=g.y1.join(o,".yarn-patch.json");if(!c.xfs.existsSync(i))throw new Z.UsageError("The argument folder didn't get created by 'yarn patch'");const a=await c.xfs.readJsonPromise(i),l=s.parseLocator(a.locator,!0);if(!t.storedPackages.has(l.locatorHash))throw new Z.UsageError("No package found in the project for the given locator");const u=await G(l,{cache:A,project:t});this.context.stdout.write(await H(u,o))}}$.usage=Z.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,W.gn)([Z.Command.String()],$.prototype,"patchFolder",void 0),(0,W.gn)([Z.Command.Path("patch-commit")],$.prototype,"execute",null);var ee=r(15815);class te extends V.BaseCommand{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await X.I.find(e,this.context.cwd),A=await _.C.find(e);if(!r)throw new V.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();let o=s.parseLocator(this.package);if("unknown"===o.reference){const r=a.mapAndFilter([...t.storedPackages.values()],e=>e.identHash!==o.identHash||s.isVirtualLocator(e)?a.mapAndFilter.skip:e);if(0===r.length)throw new Z.UsageError("No package found in the project for the given locator");if(r.length>1)throw new Z.UsageError("Multiple candidate packages found; explicitly choose one of them (use `yarn why <package>` to get more information as to who depends on them):\n"+r.map(t=>"\n- "+s.prettyLocator(e,t)).join(""));o=r[0]}if(!t.storedPackages.has(o.locatorHash))throw new Z.UsageError("No package found in the project for the given locator");await ee.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const n=await G(o,{cache:A,project:t});r.reportInfo(i.b.UNNAMED,`Package ${s.prettyLocator(e,o)} got extracted with success!`),r.reportInfo(i.b.UNNAMED,"You can now edit the following folder: "+J.pretty(e,g.cS.fromPortablePath(n),"magenta")),r.reportInfo(i.b.UNNAMED,`Once you are done run ${J.pretty(e,"yarn patch-commit "+g.cS.fromPortablePath(n),"cyan")} and Yarn will store a patchfile based on your changes.`)})}}te.usage=Z.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,W.gn)([Z.Command.String()],te.prototype,"package",void 0),(0,W.gn)([Z.Command.Path("patch")],te.prototype,"execute",null);const re={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:n.a2.BOOLEAN,default:!1}},commands:[$,te],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,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.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:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:o}}async patchPackage(e,t){const{parentLocator:r,sourceLocator:A,sourceVersion:n,patchPaths:p}=L(e),d=await Y(r,p,t),C=await c.xfs.mktempPromise(),f=g.y1.join(C,"patched.zip"),E=await t.fetcher.fetch(A,t),B=s.getIdentVendorPath(e),y=await(0,h.getLibzipPromise)(),m=new l.d(f,{libzip:y,create:!0,level:t.project.configuration.get("compressionLevel")});await m.mkdirpPromise(B),await a.releaseAfterUseAsync(async()=>{await m.copyPromise(B,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs);const w=new u.M(g.y1.resolve(g.LZ.root,B),{baseFs:m});for(const e of d)if(null!==e)try{await S(D(e),{baseFs:w,version:n})}catch(e){if(!(e instanceof I))throw e;const r=t.project.configuration.get("enableInlineHunks"),A=r?"":" (set enableInlineHunks for details)";throw new o.lk(i.b.PATCH_HUNK_FAILED,e.message+A,A=>{r&&q(e.hunk,{configuration:t.project.configuration,report:A})})}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:A}=x(e);return A.every(e=>!j(e))?e:s.bindDescriptor(e,{locator:s.stringifyLocator(t)})}getResolutionDependencies(e,t){const{sourceDescriptor:r}=x(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:A,sourceDescriptor:n,patchPaths:o}=x(e),i=await Y(A,o,r.fetchOptions),s=t.get(n.descriptorHash);if(void 0===s)throw new Error("Assertion failed: The dependency should have been resolved");return[U(e,{parentLocator:A,sourcePackage:s,patchPaths:o,patchHash:z.makeHash("2",...i).slice(0,6)})]}async getSatisfying(e,t,r){return null}async resolve(e,t){const{sourceLocator:r}=L(e);return{...await t.resolver.resolve(r,t),...e}}}]}},83228:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PnpInstaller:()=>k,PnpLinker:()=>S,default:()=>Y,getPnpPath:()=>T,jsInstallUtils:()=>A,pnpUtils:()=>n,quotePathIfNeeded:()=>j});var A={};r.r(A),r.d(A,{checkAndReportManifestCompatibility:()=>y,extractBuildScripts:()=>m,getExtractHint:()=>Q,hasBindingGyp:()=>D});var n={};r.r(n),r.d(n,{getUnpluggedPath:()=>b});var o=r(39922),i=r(43896),s=r(46009),a=r(53887),c=r.n(a),g=r(54143),l=r(71643),u=r(73632),h=r(32485),p=r(92659),d=r(46611),C=r(17674),f=r(75448),I=r(34432),E=r(40822),B=r(92409);function y(e,t,r,{configuration:A,report:n}){return d.G.isManifestFieldCompatible(t.manifest.os,process.platform)?!!d.G.isManifestFieldCompatible(t.manifest.cpu,process.arch)||(null==n||n.reportWarningOnce(p.b.INCOMPATIBLE_CPU,`${g.prettyLocator(A,e)} The CPU architecture ${process.arch} is incompatible with this module, ${r} skipped.`),!1):(null==n||n.reportWarningOnce(p.b.INCOMPATIBLE_OS,`${g.prettyLocator(A,e)} The platform ${process.platform} is incompatible with this module, ${r} skipped.`),!1)}function m(e,t,r,{configuration:A,report:n}){const o=[];for(const e of["preinstall","install","postinstall"])t.manifest.scripts.has(e)&&o.push([B.k.SCRIPT,e]);if(!t.manifest.scripts.has("install")&&t.misc.hasBindingGyp&&o.push([B.k.SHELLCODE,"node-gyp rebuild"]),0===o.length)return[];if(!A.get("enableScripts")&&!r.built)return null==n||n.reportWarningOnce(p.b.DISABLED_BUILD_SCRIPTS,g.prettyLocator(A,e)+" lists build scripts, but all build scripts have been disabled."),[];if(e.linkType!==h.Un.HARD)return null==n||n.reportWarningOnce(p.b.SOFT_LINK_BUILD,g.prettyLocator(A,e)+" lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored."),[];if(r&&!1===r.built)return null==n||n.reportInfoOnce(p.b.BUILD_DISABLED,g.prettyLocator(A,e)+" lists build scripts, but its build has been explicitly disabled through configuration."),[];return y(e,t,"build",{configuration:A,report:n})?o:[]}const w=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function Q(e){return e.packageFs.getExtractHint({relevantExtensions:w})}function D(e){const t=s.y1.join(e.prefixPath,"binding.gyp");return e.packageFs.existsSync(t)}function b(e,{configuration:t}){return s.y1.resolve(t.get("pnpUnpluggedFolder"),g.slugifyLocator(e))}const v=new Set([g.makeIdent(null,"nan").identHash,g.makeIdent(null,"node-gyp").identHash,g.makeIdent(null,"node-pre-gyp").identHash,g.makeIdent(null,"node-addon-api").identHash,g.makeIdent(null,"fsevents").identHash]);class S{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=T(t.project).main;if(!i.xfs.existsSync(r))throw new E.UsageError(`The project in ${l.pretty(t.project.configuration,t.project.cwd+"/package.json",l.Type.PATH)} doesn't seem to have been installed - running an install there might help`);const A=u.dynamicRequireNoCache(r),n={name:g.requirableIdent(e),reference:e.reference},o=A.getPackageInformation(n);if(!o)throw new E.UsageError(`Couldn't find ${g.prettyLocator(t.project.configuration,e)} in the currently installed PnP map - running an install might help`);return s.cS.toPortablePath(o.packageLocation)}async findPackageLocator(e,t){const A=T(t.project).main;if(!i.xfs.existsSync(A))return null;const n=s.cS.fromPortablePath(A),o=u.dynamicRequire(n);delete r.c[n];const a=o.findPackageLocator(s.cS.fromPortablePath(e));return a?g.makeLocator(g.parseIdent(a.name),a.reference):null}makeInstaller(e){return new k(e)}}class k{constructor(e){this.opts=e,this.mode="strict",this.packageRegistry=new Map,this.virtualTemplates=new Map,this.customData={store:new Map},this.unpluggedPaths=new Set,this.opts=e}getCustomDataKey(){return JSON.stringify({name:"PnpInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,t){const r=g.requirableIdent(e),A=e.reference,n=!!this.opts.project.tryWorkspaceByLocator(e),o=e.peerDependencies.size>0&&!g.isVirtualLocator(e),i=!o&&!n,a=!o&&e.linkType!==h.Un.SOFT;let c=this.customData.store.get(e.locatorHash);void 0===c&&(c=await async function(e,t){var r;const A=null!==(r=await d.G.tryFind(t.prefixPath,{baseFs:t.packageFs}))&&void 0!==r?r:new d.G,n=new Set(["preinstall","install","postinstall"]);for(const e of A.scripts.keys())n.has(e)||A.scripts.delete(e);return{manifest:{os:A.os,cpu:A.cpu,scripts:A.scripts,preferUnplugged:A.preferUnplugged},misc:{extractHint:Q(t),hasBindingGyp:D(t)}}}(0,t),e.linkType===h.Un.HARD&&this.customData.store.set(e.locatorHash,c));const l=this.opts.project.getDependencyMeta(e,e.version),p=i?m(e,c,l,{configuration:this.opts.project.configuration,report:this.opts.report}):[],f=a?await this.unplugPackageIfNeeded(e,c,t,l):t.packageFs;if(s.y1.isAbsolute(t.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${t.prefixPath}) to be relative to the parent`);const I=s.y1.resolve(f.getRealPath(),t.prefixPath),E=N(this.opts.project.cwd,I),B=new Map,y=new Set;if(g.isVirtualLocator(e)){for(const t of e.peerDependencies.values())B.set(g.requirableIdent(t),null),y.add(g.stringifyIdent(t));if(!this.opts.project.tryWorkspaceByLocator(e)){const t=g.devirtualizeLocator(e);this.virtualTemplates.set(t.locatorHash,{location:N(this.opts.project.cwd,C.p.resolveVirtual(I)),locator:t})}}return u.getMapWithDefault(this.packageRegistry,r).set(A,{packageLocation:E,packageDependencies:B,packagePeers:y,linkType:e.linkType,discardFromLookup:t.discardFromLookup||!1}),{packageLocation:I,buildDirective:p.length>0?p:null}}async attachInternalDependencies(e,t){const r=this.getPackageInformation(e);for(const[e,A]of t){const t=g.areIdentsEqual(e,A)?A.reference:[g.requirableIdent(A),A.reference];r.packageDependencies.set(g.requirableIdent(e),t)}}async attachExternalDependents(e,t){for(const r of t){this.getDiskInformation(r).packageDependencies.set(g.requirableIdent(e),e.reference)}}async finalizeInstall(){const e=new Set;for(const{locator:e,location:t}of this.virtualTemplates.values())u.getMapWithDefault(this.packageRegistry,g.stringifyIdent(e)).set(e.reference,{packageLocation:t,packageDependencies:new Map,packagePeers:new Set,linkType:h.Un.SOFT,discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));const t=this.opts.project.configuration.get("pnpFallbackMode"),r=e,A=this.opts.project.workspaces.map(({anchoredLocator:e})=>({name:g.requirableIdent(e),reference:e.reference})),n="none"!==t,o=[],i=new Map,s=u.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),a=this.packageRegistry,c=this.opts.project.configuration.get("pnpShebang");if("dependencies-only"===t)for(const e of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(e)&&o.push({name:g.requirableIdent(e),reference:e.reference});return await this.finalizeInstallWithPnp({blacklistedLocations:r,dependencyTreeRoots:A,enableTopLevelFallback:n,fallbackExclusionList:o,fallbackPool:i,ignorePattern:s,packageRegistry:a,shebang:c}),{customData:this.customData}}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=T(this.opts.project),r=this.opts.project.configuration.get("pnpDataPath");if(await i.xfs.removePromise(t.other),"pnp"!==this.opts.project.configuration.get("nodeLinker"))return await i.xfs.removePromise(t.main),void await i.xfs.removePromise(r);const A=await this.locateNodeModules(e.ignorePattern);if(A.length>0){this.opts.report.reportWarning(p.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 A)await i.xfs.removePromise(e)}if(this.opts.project.configuration.get("pnpEnableInlining")){const A=(0,I.gY)(e);await i.xfs.changeFilePromise(t.main,A,{automaticNewlines:!0}),await i.xfs.chmodPromise(t.main,493),await i.xfs.removePromise(r)}else{const A=s.y1.relative(s.y1.dirname(t.main),r),{dataFile:n,loaderFile:o}=(0,I.Q$)({...e,dataLocation:A});await i.xfs.changeFilePromise(t.main,o,{automaticNewlines:!0}),await i.xfs.chmodPromise(t.main,493),await i.xfs.changeFilePromise(r,n,{automaticNewlines:!0}),await i.xfs.chmodPromise(r,420)}const n=this.opts.project.configuration.get("pnpUnpluggedFolder");if(0===this.unpluggedPaths.size)await i.xfs.removePromise(n);else for(const e of await i.xfs.readdirPromise(n)){const t=s.y1.resolve(n,e);this.unpluggedPaths.has(t)||await i.xfs.removePromise(t)}}async locateNodeModules(e){const t=[],r=e?new RegExp(e):null;for(const e of this.opts.project.workspaces){const A=s.y1.join(e.cwd,"node_modules");if(r&&r.test(s.y1.relative(this.opts.project.cwd,e.cwd))||!i.xfs.existsSync(A))continue;const n=await i.xfs.readdirPromise(A,{withFileTypes:!0}),o=n.filter(e=>!e.isDirectory()||".bin"===e.name||!e.name.startsWith("."));if(o.length===n.length)t.push(A);else for(const e of o)t.push(s.y1.join(A,e.name))}return t}async unplugPackageIfNeeded(e,t,r,A){return this.shouldBeUnplugged(e,t,A)?this.unplugPackage(e,r):r.packageFs}shouldBeUnplugged(e,t,r){return void 0!==r.unplugged?r.unplugged:!!v.has(e.identHash)||(null!==t.manifest.preferUnplugged?t.manifest.preferUnplugged:!!(m(e,t,r,{configuration:this.opts.project.configuration}).length>0||t.misc.extractHint))}async unplugPackage(e,t){const r=b(e,{configuration:this.opts.project.configuration});this.unpluggedPaths.add(r);const A=s.y1.join(r,t.prefixPath,".ready");return await i.xfs.existsPromise(A)||(await i.xfs.mkdirPromise(r,{recursive:!0}),await i.xfs.copyPromise(r,s.LZ.dot,{baseFs:t.packageFs,overwrite:!1}),await i.xfs.writeFilePromise(A,"")),new f.M(r)}getPackageInformation(e){const t=g.requirableIdent(e),r=e.reference,A=this.packageRegistry.get(t);if(!A)throw new Error(`Assertion failed: The package information store should have been available (for ${g.prettyIdent(this.opts.project.configuration,e)})`);const n=A.get(r);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${g.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){const t=u.getMapWithDefault(this.packageRegistry,"@@disk"),r=N(this.opts.project.cwd,e);return u.getFactoryWithDefault(t,r,()=>({packageLocation:r,packageDependencies:new Map,packagePeers:new Set,linkType:h.Un.SOFT,discardFromLookup:!1}))}}function N(e,t){let r=s.y1.relative(e,t);return r.match(/^\.{0,2}\//)||(r="./"+r),r.replace(/\/?$/,"/")}var F=r(36370),K=r(25413),M=r(85824),R=r(28148),x=r(15815),L=r(36545),P=r(2401),O=r.n(P);class U extends K.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.all=!1,this.recursive=!1,this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await M.I.find(e,this.context.cwd),A=await R.C.find(e);if(!r)throw new K.WorkspaceRequiredError(t.cwd,this.context.cwd);if("pnp"!==e.get("nodeLinker"))throw new E.UsageError("This command can only be used if the `nodeLinker` option is set to `pnp`");await t.restoreInstallState();const n=new Set(this.patterns),i=this.patterns.map(t=>{const r=g.parseDescriptor(t),A="unknown"!==r.range?r:g.makeDescriptor(r,"*");if(!c().validRange(A.range))throw new E.UsageError(`The range of the descriptor patterns must be a valid semver range (${g.prettyDescriptor(e,A)})`);return e=>{const r=g.stringifyIdent(e);return!!O().isMatch(r,g.stringifyIdent(A))&&(!(e.version&&!L.satisfiesWithPrereleases(e.version,A.range))&&(n.delete(t),!0))}}),s=e=>{const r=new Set,A=[],n=(e,o)=>{if(!r.has(e.locatorHash)&&(r.add(e.locatorHash),!t.tryWorkspaceByLocator(e)&&i.some(t=>t(e))&&A.push(e),!(o>0)||this.recursive))for(const r of e.dependencies.values()){const e=t.storedResolutions.get(r.descriptorHash);if(!e)throw new Error("Assertion failed: The resolution should have been registered");const A=t.storedPackages.get(e);if(!A)throw new Error("Assertion failed: The package should have been registered");n(A,o+1)}};for(const r of e){const e=t.storedPackages.get(r.anchoredLocator.locatorHash);if(!e)throw new Error("Assertion failed: The package should have been registered");n(e,0)}return A};let a,h;if(this.all&&this.recursive?(a=(()=>{const e=[];for(const r of t.storedPackages.values())t.tryWorkspaceByLocator(r)||g.isVirtualLocator(r)||!i.some(e=>e(r))||e.push(r);return e})(),h="the project"):this.all?(a=s(t.workspaces),h="any workspace"):(a=s([r]),h="this workspace"),n.size>1)throw new E.UsageError(`Patterns ${l.prettyList(e,n,l.Type.CODE)} don't match any packages referenced by ${h}`);if(n.size>0)throw new E.UsageError(`Pattern ${l.prettyList(e,n,l.Type.CODE)} doesn't match any packages referenced by ${h}`);a=u.sortMap(a,e=>g.stringifyLocator(e));return(await x.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async r=>{var n;for(const A of a){const o=null!==(n=A.version)&&void 0!==n?n:"unknown";t.topLevelWorkspace.manifest.ensureDependencyMeta(g.makeDescriptor(A,o)).unplugged=!0,r.reportInfo(p.b.UNNAMED,`Will unpack ${g.prettyLocator(e,A)} to ${l.pretty(e,b(A,{configuration:e}),l.Type.PATH)}`),r.reportJson({locator:g.stringifyLocator(A),version:o})}await t.topLevelWorkspace.persistManifest(),r.reportSeparator(),await t.install({cache:A,report:r})})).exitCode()}}U.usage=E.Command.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns 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 `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make 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 Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]}),(0,F.gn)([E.Command.Rest()],U.prototype,"patterns",void 0),(0,F.gn)([E.Command.Boolean("-A,--all",{description:"Unplug direct dependencies from the entire project"})],U.prototype,"all",void 0),(0,F.gn)([E.Command.Boolean("-R,--recursive",{description:"Unplug both direct and transitive dependencies"})],U.prototype,"recursive",void 0),(0,F.gn)([E.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],U.prototype,"json",void 0),(0,F.gn)([E.Command.Path("unplug")],U.prototype,"execute",null);const T=e=>{let t,r;return"module"===e.topLevelWorkspace.manifest.type?(t=".pnp.cjs",r=".pnp.js"):(t=".pnp.js",r=".pnp.cjs"),{main:s.y1.join(e.cwd,t),other:s.y1.join(e.cwd,r)}},j=e=>/\s/.test(e)?JSON.stringify(e):e;const Y={hooks:{populateYarnPaths:async function(e,t){t(T(e).main),t(T(e).other),t(e.configuration.get("pnpDataPath")),t(e.configuration.get("pnpUnpluggedFolder"))},setupScriptEnvironment:async function(e,t,r){const A=T(e).main,n="--require "+j(s.cS.fromPortablePath(A));if(A.includes(" ")&&c().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(i.xfs.existsSync(A)){let e=t.NODE_OPTIONS||"";const r=/\s*--require\s+\S*\.pnp\.c?js\s*/g;e=e.replace(r," ").trim(),e=e?`${n} ${e}`:n,t.NODE_OPTIONS=e}}},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:o.a2.STRING,default:"pnp"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:o.a2.STRING,default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:o.a2.STRING,default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:o.a2.STRING,default:[],isArray:!0},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:o.a2.BOOLEAN,default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:o.a2.STRING,default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:o.a2.ABSOLUTE_PATH,default:"./.yarn/unplugged"},pnpDataPath:{description:"Path of the file where the PnP data (used by the loader) must be written",type:o.a2.ABSOLUTE_PATH,default:"./.pnp.data.json"}},linkers:[S],commands:[U]}},43418:(e,t,r)=>{"use strict";r.r(t);var A=r(50683),n=r.n(A);Object.fromEntries||(Object.fromEntries=n());var o=r(59355),i=r(10419),s=r(45330);(0,i.D)({binaryVersion:o.o||"<unknown>",pluginConfiguration:(0,s.e)()})},25413:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseCommand:()=>A.F,WorkspaceRequiredError:()=>s,getDynamicLibs:()=>c,getPluginConfiguration:()=>g.e,main:()=>h.D,openWorkspace:()=>u,pluginCommands:()=>p.f});var A=r(56087),n=r(46611),o=r(46009),i=r(40822);class s extends i.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,n.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 g=r(45330),l=r(85824);async function u(e,t){const{project:r,workspace:A}=await l.I.find(e,t);if(!A)throw new s(r.cwd,t);return A}var h=r(10419),p=r(15683)},10419:(e,t,r)=>{"use strict";r.d(t,{D:()=>f});var A=r(36545),n=r(39922),o=r(81832),i=r(43896),s=r(46009),a=r(63129),c=r(5864),g=r(40822),l=r(35747),u=r(15683),h=r(36370),p=r(71643),d=r(56087);class C extends d.F{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${p.pretty(e,"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 ${p.pretty(e,"https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${p.pretty(e,"https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${p.pretty(e,"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 ${p.pretty(e,"find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${p.pretty(e,"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 ${p.pretty(e,"yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}async function f({binaryVersion:e,pluginConfiguration:t}){async function r(){const h=new g.Cli({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:e});h.register(C);try{await async function h(p){var d,C,f,I,E;const B=process.versions.node,y=">=10.17 <14 || >14.1";if("1"!==process.env.YARN_IGNORE_NODE&&!A.satisfiesWithPrereleases(B,y))throw new g.UsageError(`This tool requires a Node version compatible with ${y} (got ${B}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);const m=await n.VK.find(s.cS.toPortablePath(process.cwd()),t,{usePath:!0,strict:!1}),w=m.get("yarnPath"),Q=m.get("ignorePath"),D=m.get("ignoreCwd");if(!Q&&!D&&w===s.cS.toPortablePath(s.cS.resolve(process.argv[1])))return process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",void await h(p);if(null===w||Q){Q&&delete process.env.YARN_IGNORE_PATH;m.get("enableTelemetry")&&!c.isCI&&process.stdout.isTTY&&(n.VK.telemetry=new o.E(m,"puba9cdc10ec5790a2cf4969dd413a47270")),null===(d=n.VK.telemetry)||void 0===d||d.reportVersion(e);for(const[e,t]of m.plugins.entries()){u.f.has(null!==(f=null===(C=e.match(/^@yarnpkg\/plugin-(.*)$/))||void 0===C?void 0:C[1])&&void 0!==f?f:"")&&(null===(I=n.VK.telemetry)||void 0===I||I.reportPluginName(e));for(const e of t.commands||[])p.register(e)}const A=p.process(process.argv.slice(2));A.help||null===(E=n.VK.telemetry)||void 0===E||E.reportCommandName(A.path.join(" "));const i=A.cwd;if(void 0!==i&&!D){const e=(0,l.realpathSync)(process.cwd()),t=(0,l.realpathSync)(i);if(e!==t)return process.chdir(i),void await r()}await p.runExit(A,{cwd:s.cS.toPortablePath(process.cwd()),plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr})}else if(i.xfs.existsSync(w))try{!function(e){const t=s.cS.fromPortablePath(e);process.on("SIGINT",()=>{}),t?(0,a.execFileSync)(process.execPath,[t,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,a.execFileSync)(t,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}(w)}catch(e){process.exitCode=e.code||1}else process.stdout.write(p.error(new Error(`The "yarn-path" option has been set (in ${m.sources.get("yarnPath")}), but the specified location doesn't exist (${w}).`))),process.exitCode=1}(h)}catch(e){process.stdout.write(h.error(e)),process.exitCode=1}}return r().catch(e=>{process.stdout.write(e.stack||e.message),process.exitCode=1}).finally(()=>i.xfs.rmtempPromise())}(0,h.gn)([g.Command.Path("--welcome")],C.prototype,"execute",null)},15683:(e,t,r)=>{"use strict";r.d(t,{f:()=>A});const A=new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]])},56087:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var A=r(36370),n=r(40822);class o extends n.Command{}(0,A.gn)([n.Command.String("--cwd",{hidden:!0})],o.prototype,"cwd",void 0)},28148:(e,t,r)=>{"use strict";r.d(t,{C:()=>I});var A=r(78420),n=r(15037),o=r(90739),i=r(14626),s=r(46009),a=r(43896),c=r(65281),g=r(35747),l=r.n(g),u=r(92659),h=r(35691),p=r(20624),d=r(73632),C=r(54143);const f=7;class I{constructor(e,{configuration:t,immutable:r=t.get("enableImmutableCache"),check:A=!1}){this.markedFiles=new Set,this.mutexes=new Map,this.configuration=t,this.cwd=e,this.immutable=r,this.check=A;const n=t.get("cacheKeyOverride");if(null!==n)this.cacheKey=""+n;else{const e=t.get("compressionLevel"),r=e!==o.k?"c"+e:"";this.cacheKey=[f,r].join("")}}static async find(e,{immutable:t,check:r}={}){const A=new I(e.get("cacheFolder"),{configuration:e,immutable:t,check:r});return await A.setup(),A}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`${C.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`${C.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.mkdirPromise(this.cwd,{recursive:!0});const e=s.y1.resolve(this.cwd,".gitignore");await a.xfs.changeFilePromise(e,"/.gitignore\n*.flock\n")}}async fetchPackageFromCache(e,t,{onHit:r,onMiss:g,loader:f,skipIntegrityCheck:I}){const B=this.getLocatorMirrorPath(e),y=new A.S,m=async(e,r=null)=>{const A=I&&t?t:`${this.cacheKey}/${await p.checksumFile(e)}`;if(null!==r){if(A!==(I&&t?t:`${this.cacheKey}/${await p.checksumFile(r)}`))throw new h.lk(u.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(null!==t&&A!==t){let e;switch(e=this.check?"throw":E(t)!==E(A)?"update":this.configuration.get("checksumBehavior"),e){case"ignore":return t;case"update":return A;default:case"throw":throw new h.lk(u.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return A},w=async t=>{if(!f)throw new Error("Cache check required but no loader configured for "+C.prettyLocator(this.configuration,e));const r=await f(),A=r.getRealPath();return r.saveAndClose(),await a.xfs.chmodPromise(A,420),await m(t,A)},Q=async()=>{if(null===B||!await a.xfs.existsPromise(B)){const e=await f(),t=e.getRealPath();return e.saveAndClose(),t}const t=await a.xfs.mktempPromise(),r=s.y1.join(t,this.getVersionFilename(e));return await a.xfs.copyFilePromise(B,r,l().constants.COPYFILE_FICLONE),r},D=async()=>{if(!f)throw new Error("Cache entry required but missing for "+C.prettyLocator(this.configuration,e));if(this.immutable)throw new h.lk(u.b.IMMUTABLE_CACHE,"Cache entry required but missing for "+C.prettyLocator(this.configuration,e));const t=await Q();await a.xfs.chmodPromise(t,420);const r=await m(t),A=this.getLocatorPath(e,r);if(!A)throw new Error("Assertion failed: Expected the cache path to be available");return await this.writeFileWithLock(A,async()=>await this.writeFileWithLock(B,async()=>(await a.xfs.movePromise(t,A),null!==B&&await a.xfs.copyFilePromise(A,B,l().constants.COPYFILE_FICLONE),[A,r])))};for(let t;t=this.mutexes.get(e.locatorHash);)await t;const[b,v]=await(async()=>{const A=(async()=>{const A=this.getLocatorPath(e,t),n=null!==A&&await y.existsPromise(A),o=n?r:g;if(o&&o(),n){let e=null;const t=A;return e=this.check?await w(t):await m(t),[t,e]}return D()})();this.mutexes.set(e.locatorHash,A);try{return await A}finally{this.mutexes.delete(e.locatorHash)}})();this.markedFiles.add(b);let S=null;const k=await(0,c.getLibzipPromise)(),N=new n.v(()=>d.prettifySyncErrors(()=>S=new o.d(b,{baseFs:y,libzip:k,readOnly:!0}),t=>`Failed to open the cache entry for ${C.prettyLocator(this.configuration,e)}: ${t}`),s.y1);return[new i.K(b,{baseFs:N,pathUtils:s.y1}),()=>{null!==S&&S.discardAndClose()},v]}async writeFileWithLock(e,t){return null===e?await t():(await a.xfs.mkdirPromise(s.y1.dirname(e),{recursive:!0}),await a.xfs.lockPromise(e,async()=>await t()))}}function E(e){const t=e.indexOf("/");return-1!==t?e.slice(0,t):null}},39922:(e,t,r)=>{"use strict";r.d(t,{VK:()=>W,nh:()=>U,tr:()=>O,a5:()=>j,EW:()=>z,a2:()=>T});var A=r(43896),n=r(46009),o=r(90739),i=r(11640),s=r(54738),a=r.n(s),c=r(5864),g=r(40822),l=r(61578),u=r.n(l),h=r(53887),p=r.n(h),d=r(92413),C=r(92659),f=r(54143);const I={hooks:{reduceDependency:(e,t,r,A,{resolver:n,resolveOptions:o})=>{for(const{pattern:A,reference:i}of t.topLevelWorkspace.manifest.resolutions){if(A.from&&A.from.fullName!==f.requirableIdent(r))continue;if(A.from&&A.from.description&&A.from.description!==r.reference)continue;if(A.descriptor.fullName!==f.requirableIdent(e))continue;if(A.descriptor.description&&A.descriptor.description!==e.range)continue;return n.bindDescriptor(f.makeDescriptor(e,i),t.topLevelWorkspace.anchoredLocator,o)}return e},validateProject:async(e,t)=>{for(const r of e.workspaces){const A=f.prettyWorkspace(e.configuration,r);await e.configuration.triggerHook(e=>e.validateWorkspace,r,{reportWarning:(e,r)=>t.reportWarning(e,`${A}: ${r}`),reportError:(e,r)=>t.reportError(e,`${A}: ${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(C.b.INVALID_MANIFEST,e.message)}}};var E=r(46611),B=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 B.lk(C.b.FETCHER_NOT_FOUND,f.prettyLocator(t.project.configuration,e)+" isn't supported by any available fetcher");return r}}var m=r(27092),w=r(52779),Q=r(60895);class D{static isVirtualDescriptor(e){return!!e.range.startsWith(D.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(D.protocol)}supportsDescriptor(e,t){return D.isVirtualDescriptor(e)}supportsLocator(e,t){return D.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 getSatisfying(e,t,r){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,t){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}D.protocol="virtual:";var b=r(75448),v=r(94538);class S{supports(e){return!!e.reference.startsWith(v.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 b.M(r),prefixPath:n.LZ.dot,localPath:r}}getWorkspace(e,t){return t.project.getWorkspaceByCwd(e.reference.slice(v.d.protocol.length))}}var k=r(81111),N=r(71643),F=r(73632),K=r(32282),M=r.n(K);function R(e){return("undefined"!=typeof require?require:r(32178))(e)}var x=r(36545),L=r(32485);const P=new Set(["binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput"]),O=".yarnrc.yml",U="yarn.lock";var T;!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"}(T||(T={}));const j=N.Type,Y={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:T.STRING,default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:T.ABSOLUTE_PATH,default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:T.BOOLEAN,default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:T.BOOLEAN,default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:T.STRING,default:null},globalFolder:{description:"Folder where are stored the system-wide settings",type:T.ABSOLUTE_PATH,default:k.getDefaultGlobalFolder()},cacheFolder:{description:"Folder where the cache files must be written",type:T.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:T.NUMBER,values:["mixed",0,1,2,3,4,5,6,7,8,9],default:o.k},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named $$virtual)",type:T.ABSOLUTE_PATH,default:"./.yarn/$$virtual"},bstatePath:{description:"Path of the file where the current state of the built packages must be stored",type:T.ABSOLUTE_PATH,default:"./.yarn/build-state.yml"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:T.STRING,default:U},installStatePath:{description:"Path of the file where the install state will be persisted",type:T.ABSOLUTE_PATH,default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:T.STRING,default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:T.STRING,default:q()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:T.BOOLEAN,default:!1},enableAbsoluteVirtuals:{description:"If true, the virtual symlinks will use absolute paths if required [non portable!!]",type:T.BOOLEAN,default:!1},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:T.BOOLEAN,default:N.supportsColor,defaultText:"<dynamic>"},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:T.BOOLEAN,default:N.supportsHyperlinks,defaultText:"<dynamic>"},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:T.BOOLEAN,default:c.isCI,defaultText:"<dynamic>"},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:T.BOOLEAN,default:!c.isCI&&process.stdout.isTTY&&process.stdout.columns>22,defaultText:"<dynamic>"},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:T.BOOLEAN,default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:T.BOOLEAN,default:c.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:T.BOOLEAN,default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:T.BOOLEAN,default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:T.STRING,default:void 0,defaultText:"<dynamic>"},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:T.STRING,default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:T.STRING,default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:T.BOOLEAN,default:!0},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:T.BOOLEAN,default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:T.BOOLEAN,default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:T.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:T.STRING,default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:T.STRING,default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:T.NUMBER,default:6e4},httpRetry:{description:"Retry times on http failure",type:T.NUMBER,default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:T.NUMBER,default:1/0},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:T.MAP,valueDefinition:{description:"",type:T.SHAPE,properties:{caFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:T.ABSOLUTE_PATH,default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:T.BOOLEAN,default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:T.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:T.STRING,default:null}}}},caFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:T.ABSOLUTE_PATH,default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:T.BOOLEAN,default:!0},logFilters:{description:"Overrides for log levels",type:T.SHAPE,isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:T.STRING,default:void 0},text:{description:"Code of the texts covered by this override",type:T.STRING,default:void 0},level:{description:"Log level override, set to null to remove override",type:T.STRING,values:Object.values(N.LogLevel),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:T.BOOLEAN,default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:T.NUMBER,default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:T.STRING,default:null},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:T.BOOLEAN,default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:T.BOOLEAN,default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:T.STRING,default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:T.MAP,valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:T.SHAPE,properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:T.MAP,valueDefinition:{description:"A range",type:T.STRING}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:T.MAP,valueDefinition:{description:"A semver range",type:T.STRING}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:T.MAP,valueDefinition:{description:"The peerDependency meta",type:T.SHAPE,properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:T.BOOLEAN,default:!1}}}}}}}};function G(e,t,r,A,n){if(A.isArray)return Array.isArray(r)?r.map((r,o)=>H(e,`${t}[${o}]`,r,A,n)):String(r).split(/,/).map(r=>H(e,t,r,A,n));if(Array.isArray(r))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return H(e,t,r,A,n)}function H(e,t,r,A,o){var i;switch(A.type){case T.ANY:return r;case T.SHAPE:return function(e,t,r,A,n){if("object"!=typeof r||Array.isArray(r))throw new g.UsageError(`Object configuration settings "${t}" must be an object`);const o=J(e,A,{ignoreArrays:!0});if(null===r)return o;for(const[i,s]of Object.entries(r)){const r=`${t}.${i}`;if(!A.properties[i])throw new g.UsageError(`Unrecognized configuration settings found: ${t}.${i} - run "yarn config -v" to see the list of settings supported in Yarn`);o.set(i,G(e,r,s,A.properties[i],n))}return o}(e,t,r,A,o);case T.MAP:return function(e,t,r,A,n){const o=new Map;if("object"!=typeof r||Array.isArray(r))throw new g.UsageError(`Map configuration settings "${t}" must be an object`);if(null===r)return o;for(const[i,s]of Object.entries(r)){const r=A.normalizeKeys?A.normalizeKeys(i):i,a=`${t}['${r}']`,c=A.valueDefinition;o.set(r,G(e,a,s,c,n))}return o}(e,t,r,A,o)}if(null===r&&!A.isNullable&&null!==A.default)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if(null===(i=A.values)||void 0===i?void 0:i.includes(r))return r;const s=(()=>{if(A.type===T.BOOLEAN)return F.parseBoolean(r);if("string"!=typeof r)throw new Error(`Expected value (${r}) to be a string`);const e=F.replaceEnvVariables(r,{env:process.env});switch(A.type){case T.ABSOLUTE_PATH:return n.y1.resolve(o,n.cS.toPortablePath(e));case T.LOCATOR_LOOSE:return f.parseLocator(e,!1);case T.NUMBER:return parseInt(e);case T.LOCATOR:return f.parseLocator(e);default:return e}})();if(A.values&&!A.values.includes(s))throw new Error("Invalid value, expected one of "+A.values.join(", "));return s}function J(e,t,{ignoreArrays:r=!1}={}){switch(t.type){case T.SHAPE:{if(t.isArray&&!r)return[];const A=new Map;for(const[r,n]of Object.entries(t.properties))A.set(r,J(e,n));return A}case T.MAP:return t.isArray&&!r?[]:new Map;case T.ABSOLUTE_PATH:return null===t.default?null:null===e.projectCwd?n.y1.isAbsolute(t.default)?n.y1.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(t=>n.y1.resolve(e.projectCwd,t)):n.y1.resolve(e.projectCwd,t.default);default:return t.default}}function q(){for(const[e,t]of Object.entries(process.env))if("yarn_rc_filename"===e.toLowerCase()&&"string"==typeof t)return t;return O}var z;!function(e){e[e.LOCKFILE=0]="LOCKFILE",e[e.MANIFEST=1]="MANIFEST",e[e.NONE=2]="NONE"}(z||(z={}));class W{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.limits=new Map,this.startingCwd=e}static create(e,t,r){const A=new W(e);void 0===t||t instanceof Map||(A.projectCwd=t),A.importSettings(Y);const n=void 0!==r?r:t instanceof Map?t:new Map;for(const[e,t]of n)A.activatePlugin(e,t);return A}static async find(e,t,{lookup:r=z.LOCKFILE,strict:o=!0,usePath:i=!1,useRc:s=!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 l=await W.findRcFiles(e),u=await W.findHomeRcFile(),h=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A})=>({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A}),p=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A,...n})=>n,d=new W(e);d.importSettings(h(Y)),d.useWithSource("<environment>",h(c),e,{strict:!1});for(const{path:e,cwd:t,data:r}of l)d.useWithSource(e,h(r),t,{strict:!1});if(u&&d.useWithSource(u.path,h(u.data),u.cwd,{strict:!1}),i){const e=d.get("yarnPath"),t=d.get("ignorePath");if(null!==e&&!t)return d}const C=d.get("lockfileFilename");let f;switch(r){case z.LOCKFILE:f=await W.findProjectCwd(e,C);break;case z.MANIFEST:f=await W.findProjectCwd(e,null);break;case z.NONE:f=A.xfs.existsSync(n.y1.join(e,"package.json"))?n.y1.resolve(e):null}d.startingCwd=e,d.projectCwd=f,d.importSettings(p(Y));const E=new Map([["@@core",I]]);if(null!==t){for(const e of t.plugins.keys())E.set(e,(B=t.modules.get(e)).__esModule?B.default:B);const r=new Map;for(const e of new Set(M().builtinModules||Object.keys(process.binding("natives"))))r.set(e,()=>R(e));for(const[e,A]of t.modules)r.set(e,()=>A);const A=new Set,o=e=>e.default||e,i=(e,t)=>{const{factory:i,name:s}=R(n.cS.fromPortablePath(e));if(A.has(s))return;const a=new Map(r),c=e=>{if(a.has(e))return a.get(e)();throw new g.UsageError(`This plugin cannot access the package referenced via ${e} which is neither a builtin, nor an exposed entry`)},l=F.prettifySyncErrors(()=>o(i(c)),e=>`${e} (when initializing ${s}, defined in ${t})`);r.set(s,()=>l),A.add(s),E.set(s,l)};if(c.plugins)for(const t of c.plugins.split(";")){i(n.y1.resolve(e,n.cS.toPortablePath(t)),"<environment>")}for(const{path:e,cwd:t,data:r}of l)if(s&&Array.isArray(r.plugins))for(const A of r.plugins){const r="string"!=typeof A?A.path:A;i(n.y1.resolve(t,n.cS.toPortablePath(r)),e)}}var B;for(const[e,t]of E)d.activatePlugin(e,t);d.useWithSource("<environment>",p(c),e,{strict:o});for(const{path:e,cwd:t,data:r}of l)d.useWithSource(e,p(r),t,{strict:o});return u&&d.useWithSource(u.path,p(u.data),u.cwd,{strict:!1}),d.get("enableGlobalCache")&&(d.values.set("cacheFolder",d.get("globalFolder")+"/cache"),d.sources.set("cacheFolder","<internal>")),await d.refreshPackageExtensions(),d}static async findRcFiles(e){const t=q(),r=[];let o=e,s=null;for(;o!==s;){s=o;const e=n.y1.join(s,t);if(A.xfs.existsSync(e)){const t=await A.xfs.readFilePromise(e,"utf8");let n;try{n=(0,i.parseSyml)(t)}catch(r){let A="";throw t.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(A=" (in particular, make sure you list the colons after each key name)"),new g.UsageError(`Parse error when loading ${e}; please check it's proper Yaml${A}`)}r.push({path:e,cwd:s,data:n})}o=n.y1.dirname(s)}return r}static async findHomeRcFile(){const e=q(),t=k.getHomeFolder(),r=n.y1.join(t,e);if(A.xfs.existsSync(r)){const e=await A.xfs.readFilePromise(r,"utf8");return{path:r,cwd:t,data:(0,i.parseSyml)(e)}}return null}static async findProjectCwd(e,t){let r=null,o=e,i=null;for(;o!==i;){if(i=o,A.xfs.existsSync(n.y1.join(i,"package.json"))&&(r=i),null!==t){if(A.xfs.existsSync(n.y1.join(i,t))){r=i;break}}else if(null!==r)break;o=n.y1.dirname(i)}return r}static async updateConfiguration(e,t){const r=q(),o=n.y1.join(e,r),s=A.xfs.existsSync(o)?(0,i.parseSyml)(await A.xfs.readFilePromise(o,"utf8")):{};let a,c=!1;if("function"==typeof t){try{a=t(s)}catch(e){a=t({})}if(a===s)return}else{a=s;for(const e of Object.keys(t)){const r=s[e],A=t[e];let n;if("function"==typeof A)try{n=A(r)}catch(e){n=A(void 0)}else n=A;r!==n&&(a[e]=n,c=!0)}if(!c)return}await A.xfs.changeFilePromise(o,(0,i.stringifySyml)(a),{automaticNewlines:!0})}static async updateHomeConfiguration(e){const t=k.getHomeFolder();return await W.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(null!=r){if(this.settings.has(t))throw new Error(`Cannot redefine settings "${t}"`);this.settings.set(t,r),this.values.set(t,J(this,r))}}useWithSource(e,t,r,A){try{this.use(e,t,r,A)}catch(t){throw t.message+=` (in ${N.pretty(this,e,N.Type.PATH)})`,t}}use(e,t,r,{strict:A=!0,overwrite:n=!1}={}){for(const o of Object.keys(t)){if(void 0===t[o])continue;if("plugins"===o)continue;if("<environment>"===e&&P.has(o))continue;if("rcFilename"===o)throw new g.UsageError(`The rcFilename settings can only be set via ${"yarn_RC_FILENAME".toUpperCase()}, not via a rc file`);const i=this.settings.get(o);if(!i){if(A)throw new g.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)&&!(n||i.type===T.MAP||i.isArray&&i.concatenateValues))continue;let s;try{s=G(this,o,t[o],i,r)}catch(t){throw t.message+=" in "+N.pretty(this,e,N.Type.PATH),t}if(i.type===T.MAP){const t=this.values.get(o);this.values.set(o,new Map(n?[...t,...s]:[...s,...t])),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else if(i.isArray&&i.concatenateValues){const t=this.values.get(o);this.values.set(o,n?[...t,...s]:[...s,...t]),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else this.values.set(o,s),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 A=this.get(e),o=this.settings.get(e);if(void 0===o)throw new g.UsageError(`Couldn't find a configuration settings named "${e}"`);return function e(t,r,A){if(r.type===T.SECRET&&"string"==typeof t&&A.hideSecrets)return"********";if(r.type===T.ABSOLUTE_PATH&&"string"==typeof t&&A.getNativePaths)return n.cS.fromPortablePath(t);if(r.isArray&&Array.isArray(t)){const n=[];for(const o of t)n.push(e(o,r,A));return n}if(r.type===T.MAP&&t instanceof Map){const n=new Map;for(const[o,i]of t.entries())n.set(o,e(i,r.valueDefinition,A));return n}if(r.type===T.SHAPE&&t instanceof Map){const n=new Map;for(const[o,i]of t.entries()){const t=r.properties[o];n.set(o,e(i,t,A))}return n}return t}(A,o,{hideSecrets:t,getNativePaths:r})}getSubprocessStreams(e,{header:t,prefix:r,report:n}){let o,i;const s=A.xfs.createWriteStream(e);if(this.get("enableInlineBuilds")){const e=n.createStreamReporter(`${r} ${N.pretty(this,"STDOUT","green")}`),t=n.createStreamReporter(`${r} ${N.pretty(this,"STDERR","red")}`);o=new d.PassThrough,o.pipe(e),o.pipe(s),i=new d.PassThrough,i.pipe(t),i.pipe(s)}else o=s,i=s,void 0!==t&&o.write(t+"\n");return{stdout:o,stderr:i}}makeResolver(){const e=[];for(const t of this.plugins.values())for(const r of t.resolvers||[])e.push(new r);return new m.B([new D,new v.d,new w.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,{userProvided:A=!1}={})=>{if(!p().validRange(t.range))throw new Error("Only semver ranges are allowed as keys for the lockfileExtensions setting");const n=new E.G;n.load(r,{yamlCompatibilityMode:!0});const o=[];F.getArrayWithDefault(e,t.identHash).push([t.range,o]);const i={status:L._u.Inactive,userProvided:A,parentDescriptor:t};for(const e of n.dependencies.values())o.push({...i,type:L.HN.Dependency,descriptor:e,description:`${f.stringifyIdent(t)} > ${f.stringifyIdent(e)}`});for(const e of n.peerDependencies.values())o.push({...i,type:L.HN.PeerDependency,descriptor:e,description:`${f.stringifyIdent(t)} >> ${f.stringifyIdent(e)}`});for(const[e,r]of n.peerDependenciesMeta)for(const[A,n]of Object.entries(r))o.push({...i,type:L.HN.PeerDependencyMeta,selector:e,key:A,value:n,description:`${f.stringifyIdent(t)} >> ${e} / ${A}`})};await this.triggerHook(e=>e.registerPackageExtensions,this,t);for(const[e,r]of this.get("packageExtensions"))t(f.parseDescriptor(e,!0),F.convertMapsToIndexableObjects(r),{userProvided:!0})}normalizePackage(e){const t=f.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 A=e.version;if(null!==A)for(const[e,n]of r)if(x.satisfiesWithPrereleases(A,e))for(const e of n)switch(e.status===L._u.Inactive&&(e.status=L._u.Redundant),e.type){case L.HN.Dependency:void 0===t.dependencies.get(e.descriptor.identHash)&&(e.status=L._u.Active,t.dependencies.set(e.descriptor.identHash,e.descriptor));break;case L.HN.PeerDependency:void 0===t.peerDependencies.get(e.descriptor.identHash)&&(e.status=L._u.Active,t.peerDependencies.set(e.descriptor.identHash,e.descriptor));break;case L.HN.PeerDependencyMeta:{const r=t.peerDependenciesMeta.get(e.selector);void 0!==r&&Object.prototype.hasOwnProperty.call(r,e.key)&&r[e.key]===e.value||(e.status=L._u.Active,F.getFactoryWithDefault(t.peerDependenciesMeta,e.selector,()=>({}))[e.key]=e.value)}break;default:F.assertNever(e)}}const A=e=>e.scope?`${e.scope}__${e.name}`:""+e.name;for(const e of t.peerDependencies.values()){if("@types"===e.scope)continue;const r=A(e),n=f.makeIdent("types",r);t.peerDependencies.has(n.identHash)||t.peerDependenciesMeta.has(n.identHash)||t.peerDependenciesMeta.set(f.stringifyIdent(n),{optional:!0})}for(const e of t.peerDependenciesMeta.keys()){const r=f.parseIdent(e);t.peerDependencies.has(r.identHash)||t.peerDependencies.set(r.identHash,f.makeDescriptor(r,"*"))}return t.dependencies=new Map(F.sortMap(t.dependencies,([,e])=>f.stringifyDescriptor(e))),t.peerDependencies=new Map(F.sortMap(t.peerDependencies,([,e])=>f.stringifyDescriptor(e))),t}getLimit(e){return F.getFactoryWithDefault(this.limits,e,()=>u()(this.get(e)))}async triggerHook(e,...t){for(const r of this.plugins.values()){const A=r.hooks;if(!A)continue;const n=e(A);n&&await n(...t)}}async triggerMultipleHooks(e,t){for(const r of t)await this.triggerHook(e,...r)}async reduceHook(e,t,...r){let A=t;for(const t of this.plugins.values()){const n=t.hooks;if(!n)continue;const o=e(n);o&&(A=await o(A,...r))}return A}async firstHook(e,...t){for(const r of this.plugins.values()){const A=r.hooks;if(!A)continue;const n=e(A);if(!n)continue;const o=await n(...t);if(void 0!==o)return o}return null}format(e,t){return N.pretty(this,e,t)}}W.telemetry=null},92409:(e,t,r)=>{"use strict";var A;r.d(t,{k:()=>A}),function(e){e[e.SCRIPT=0]="SCRIPT",e[e.SHELLCODE=1]="SHELLCODE"}(A||(A={}))},62152:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var A=r(35691),n=r(15815),o=r(71643);class i extends A.yG{constructor({configuration:e,stdout:t,suggestInstall:r=!0}){super(),this.errorCount=0,o.addLogFilterSupport(this,{configuration:e}),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,r){return("function"==typeof t?t:r)()}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r;return await A()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){this.errorCount+=1,this.stdout.write(`${o.pretty(this.configuration,"➤","redBright")} ${this.formatNameWithHyperlink(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(o.pretty(this.configuration,"➤","redBright")+" Errors happened when preparing the environment required to run this command.\n"),this.suggestInstall&&this.stdout.write(o.pretty(this.configuration,"➤","redBright")+' This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.\n'))}formatNameWithHyperlink(e){return(0,n.Qw)(e,{configuration:this.configuration,json:!1})}}},46611:(e,t,r)=>{"use strict";r.d(t,{G:()=>l});var A=r(78420),n=r(46009),o=r(11640),i=r(53887),s=r.n(i),a=r(73632),c=r(36545),g=r(54143);class l{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.browser=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.installConfig=null,this.preferUnplugged=null,this.raw={},this.errors=[]}static async tryFind(e,{baseFs:t=new A.S}={}){const r=n.y1.join(e,"package.json");return await t.existsPromise(r)?await l.fromFile(r,{baseFs:t}):null}static async find(e,{baseFs:t}={}){const r=await l.tryFind(e,{baseFs:t});if(null===r)throw new Error("Manifest not found");return r}static async fromFile(e,{baseFs:t=new A.S}={}){const r=new l;return await r.loadFile(e,{baseFs:t}),r}static fromText(e){const t=new l;return t.loadFromText(e),t}static isManifestFieldCompatible(e,t){if(null===e)return!0;let r=!0,A=!1;for(const n of e)if("!"===n[0]){if(A=!0,t===n.slice(1))return!1}else if(r=!1,n===t)return!0;return A&&r}loadFromText(e){let t;try{t=JSON.parse(h(e)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(t),this.indent=u(e)}async loadFile(e,{baseFs:t=new A.S}){const r=await t.readFilePromise(e,"utf8");let n;try{n=JSON.parse(h(r)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(n),this.indent=u(r)}load(e,{yamlCompatibilityMode:t=!1}={}){if("object"!=typeof e||null===e)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;const r=[];if("string"==typeof e.name)try{this.name=g.parseIdent(e.name)}catch(e){r.push(new Error("Parsing failed for the 'name' field"))}if("string"==typeof e.version&&(this.version=e.version),Array.isArray(e.os)){const t=[];this.os=t;for(const A of e.os)"string"!=typeof A?r.push(new Error("Parsing failed for the 'os' field")):t.push(A)}if(Array.isArray(e.cpu)){const t=[];this.cpu=t;for(const A of e.cpu)"string"!=typeof A?r.push(new Error("Parsing failed for the 'cpu' field")):t.push(A)}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.main&&(this.main=p(e.main)),"string"==typeof e.module&&(this.module=p(e.module)),null!=e.browser)if("string"==typeof e.browser)this.browser=p(e.browser);else{this.browser=new Map;for(const[t,r]of Object.entries(e.browser))this.browser.set(p(t),"string"==typeof r?p(r):r)}if("string"==typeof e.bin)null!==this.name?this.bin=new Map([[this.name.name,p(e.bin)]]):r.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.bin&&null!==e.bin)for(const[t,A]of Object.entries(e.bin))"string"==typeof A?this.bin.set(t,p(A)):r.push(new Error(`Invalid bin definition for '${t}'`));if("object"==typeof e.scripts&&null!==e.scripts)for(const[t,A]of Object.entries(e.scripts))"string"==typeof A?this.scripts.set(t,A):r.push(new Error(`Invalid script definition for '${t}'`));if("object"==typeof e.dependencies&&null!==e.dependencies)for(const[t,A]of Object.entries(e.dependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.dependencies.set(n.identHash,n)}if("object"==typeof e.devDependencies&&null!==e.devDependencies)for(const[t,A]of Object.entries(e.devDependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.devDependencies.set(n.identHash,n)}if("object"==typeof e.peerDependencies&&null!==e.peerDependencies)for(let[t,A]of Object.entries(e.peerDependencies)){let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}"string"==typeof A&&c.validRange(A)||(r.push(new Error(`Invalid dependency range for '${t}'`)),A="*");const n=g.makeDescriptor(e,A);this.peerDependencies.set(n.identHash,n)}"object"==typeof e.workspaces&&e.workspaces.nohoist&&r.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));const A=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 A)"string"==typeof e?this.workspaceDefinitions.push({pattern:e}):r.push(new Error(`Invalid workspace definition for '${e}'`));if("object"==typeof e.dependenciesMeta&&null!==e.dependenciesMeta)for(const[A,n]of Object.entries(e.dependenciesMeta)){if("object"!=typeof n||null===n){r.push(new Error("Invalid meta field for '"+A));continue}const e=g.parseDescriptor(A),o=this.ensureDependencyMeta(e),i=d(n.built,{yamlCompatibilityMode:t});if(null===i){r.push(new Error(`Invalid built meta field for '${A}'`));continue}const s=d(n.optional,{yamlCompatibilityMode:t});if(null===s){r.push(new Error(`Invalid optional meta field for '${A}'`));continue}const a=d(n.unplugged,{yamlCompatibilityMode:t});null!==a?Object.assign(o,{built:i,optional:s,unplugged:a}):r.push(new Error(`Invalid unplugged meta field for '${A}'`))}if("object"==typeof e.peerDependenciesMeta&&null!==e.peerDependenciesMeta)for(const[A,n]of Object.entries(e.peerDependenciesMeta)){if("object"!=typeof n||null===n){r.push(new Error(`Invalid meta field for '${A}'`));continue}const e=g.parseDescriptor(A),o=this.ensurePeerDependencyMeta(e),i=d(n.optional,{yamlCompatibilityMode:t});null!==i?Object.assign(o,{optional:i}):r.push(new Error(`Invalid optional meta field for '${A}'`))}if("object"==typeof e.resolutions&&null!==e.resolutions)for(const[t,A]of Object.entries(e.resolutions))if("string"==typeof A)try{this.resolutions.push({pattern:(0,o.parseResolution)(t),reference:A})}catch(e){r.push(e);continue}else r.push(new Error(`Invalid resolution entry for '${t}'`));if(Array.isArray(e.files)){this.files=new Set;for(const t of e.files)"string"==typeof t?this.files.add(t):r.push(new Error(`Invalid files entry for '${t}'`))}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=p(e.publishConfig.main)),"string"==typeof e.publishConfig.module&&(this.publishConfig.module=p(e.publishConfig.module)),null!=e.publishConfig.browser)if("string"==typeof e.publishConfig.browser)this.publishConfig.browser=p(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(const[t,r]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(p(t),"string"==typeof r?p(r):r)}if("string"==typeof e.publishConfig.registry&&(this.publishConfig.registry=e.publishConfig.registry),"string"==typeof e.publishConfig.bin)null!==this.name?this.publishConfig.bin=new Map([[this.name.name,p(e.publishConfig.bin)]]):r.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[t,A]of Object.entries(e.publishConfig.bin))"string"==typeof A?this.publishConfig.bin.set(t,p(A)):r.push(new Error(`Invalid bin definition for '${t}'`))}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(const t of e.publishConfig.executableFiles)"string"==typeof t?this.publishConfig.executableFiles.add(p(t)):r.push(new Error("Invalid executable file definition"))}}if("object"==typeof e.installConfig&&null!==e.installConfig){this.installConfig={};for(const t of Object.keys(e.installConfig))"hoistingLimits"===t?"string"==typeof e.installConfig.hoistingLimits?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:r.push(new Error("Invalid hoisting limits definition")):r.push(new Error("Unrecognized installConfig key: "+t))}if("object"==typeof e.optionalDependencies&&null!==e.optionalDependencies)for(const[t,A]of Object.entries(e.optionalDependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.dependencies.set(n.identHash,n);const o=g.makeDescriptor(e,"unknown"),i=this.ensureDependencyMeta(o);Object.assign(i,{optional:!0})}"boolean"==typeof e.preferUnplugged&&(this.preferUnplugged=e.preferUnplugged),this.errors=r}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 l.isManifestFieldCompatible(this.os,e)}isCompatibleWithCPU(e){return l.isManifestFieldCompatible(this.cpu,e)}ensureDependencyMeta(e){if("unknown"!==e.range&&!s().valid(e.range))throw new Error(`Invalid meta field range for '${g.stringifyDescriptor(e)}'`);const t=g.stringifyIdent(e),r="unknown"!==e.range?e.range:null;let A=this.dependenciesMeta.get(t);A||this.dependenciesMeta.set(t,A=new Map);let n=A.get(r);return n||A.set(r,n={}),n}ensurePeerDependencyMeta(e){if("unknown"!==e.range)throw new Error(`Invalid meta field range for '${g.stringifyDescriptor(e)}'`);const t=g.stringifyIdent(e);let r=this.peerDependenciesMeta.get(t);return r||this.peerDependenciesMeta.set(t,r={}),r}setRawField(e,t,{after:r=[]}={}){const A=new Set(r.filter(e=>Object.prototype.hasOwnProperty.call(this.raw,e)));if(0===A.size||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=t;else{const r=this.raw,n=this.raw={};let o=!1;for(const i of Object.keys(r))n[i]=r[i],o||(A.delete(i),0===A.size&&(n[e]=t,o=!0))}}exportTo(e,{compatibilityMode:t=!0}={}){if(Object.assign(e,this.raw),null!==this.name?e.name=g.stringifyIdent(this.name):delete e.name,null!==this.version?e.version=this.version:delete e.version,null!==this.os?e.os=this.os:delete e.os,null!==this.cpu?e.cpu=this.cpu:delete e.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,null!==this.main?e.main=this.main:delete e.main,null!==this.module?e.module=this.module:delete e.module,null!==this.browser){const t=this.browser;"string"==typeof t?e.browser=t:t instanceof Map&&(e.browser=Object.assign({},...Array.from(t.keys()).sort().map(e=>({[e]:t.get(e)}))))}else delete e.browser;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,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:e})=>e)}:e.workspaces=this.workspaceDefinitions.map(({pattern:e})=>e):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;const r=[],A=[];for(const e of this.dependencies.values()){const n=this.dependenciesMeta.get(g.stringifyIdent(e));let o=!1;if(t&&n){const e=n.get(null);e&&e.optional&&(o=!0)}o?A.push(e):r.push(e)}r.length>0?e.dependencies=Object.assign({},...g.sortDescriptors(r).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.dependencies,A.length>0?e.optionalDependencies=Object.assign({},...g.sortDescriptors(A).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...g.sortDescriptors(this.devDependencies.values()).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...g.sortDescriptors(this.peerDependencies.values()).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(const[r,A]of a.sortMap(this.dependenciesMeta.entries(),([e,t])=>e))for(const[n,o]of a.sortMap(A.entries(),([e,t])=>null!==e?"0"+e:"1")){const A=null!==n?g.stringifyDescriptor(g.makeDescriptor(g.parseIdent(r),n)):r,i={...o};t&&null===n&&delete i.optional,0!==Object.keys(i).length&&(e.dependenciesMeta[A]=i)}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 u(e){const t=e.match(/^[ \t]+/m);return t?t[0]:" "}function h(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function p(e){return e.replace(/\\/g,"/")}function d(e,{yamlCompatibilityMode:t}){return t?a.tryParseOptionalBoolean(e):void 0===e||"boolean"==typeof e?e:null}l.fileName="package.json",l.allDependencies=["dependencies","devDependencies","peerDependencies"],l.hardDependencies=["dependencies","devDependencies"]},92659:(e,t,r)=>{"use strict";var A;function n(e){return"YN"+e.toString(10).padStart(4,"0")}r.d(t,{b:()=>A,i:()=>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",e[e.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",e[e.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",e[e.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",e[e.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",e[e.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",e[e.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION"}(A||(A={}))},27092:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});var A=r(54143);class n{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 A=this.getResolverByDescriptor(e,r);return await A.getCandidates(e,t,r)}async getSatisfying(e,t,r){return this.getResolverByDescriptor(e,r).getSatisfying(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(A.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(A.prettyLocator(t.project.configuration,e)+" isn't supported by any available resolver");return r}}},85824:(e,t,r)=>{"use strict";r.d(t,{I:()=>ie});var A=r(43896),n=r(46009),o=r(5944),i=r(11640),s=r(40822),a=r(76417);function c(){}function g(e,t,r,A,n){for(var o=0,i=t.length,s=0,a=0;o<i;o++){var c=t[o];if(c.removed){if(c.value=e.join(A.slice(a,a+c.count)),a+=c.count,o&&t[o-1].added){var g=t[o-1];t[o-1]=t[o],t[o]=g}}else{if(!c.added&&n){var l=r.slice(s,s+c.count);l=l.map((function(e,t){var r=A[a+t];return r.length>e.length?r:e})),c.value=e.join(l)}else c.value=e.join(r.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var u=t[i-1];return i>1&&"string"==typeof u.value&&(u.added||u.removed)&&e.equals("",u.value)&&(t[i-2].value+=u.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]:{},A=r.callback;"function"==typeof r&&(A=r,r={}),this.options=r;var n=this;function o(e){return A?(setTimeout((function(){A(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var i=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,a=1,c=i+s,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],t,e,0);if(u[0].newPos+1>=i&&h+1>=s)return o([{value:this.join(t),count:t.length}]);function p(){for(var r=-1*a;r<=a;r+=2){var A=void 0,c=u[r-1],h=u[r+1],p=(h?h.newPos:0)-r;c&&(u[r-1]=void 0);var d=c&&c.newPos+1<i,C=h&&0<=p&&p<s;if(d||C){if(!d||C&&c.newPos<h.newPos?(A=l(h),n.pushComponent(A.components,void 0,!0)):((A=c).newPos++,n.pushComponent(A.components,!0,void 0)),p=n.extractCommon(A,t,e,r),A.newPos+1>=i&&p+1>=s)return o(g(n,A.components,t,e,n.useLongestToken));u[r]=A}else u[r]=void 0}a++}if(A)!function e(){setTimeout((function(){if(a>c)return A();p()||e()}),0)}();else for(;a<=c;){var d=p();if(d)return d}},pushComponent:function(e,t,r){var A=e[e.length-1];A&&A.added===t&&A.removed===r?e[e.length-1]={count:A.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,A){for(var n=t.length,o=r.length,i=e.newPos,s=i-A,a=0;i+1<n&&s+1<o&&this.equals(t[i+1],r[s+1]);)i++,s++,a++;return a&&e.components.push({count:a}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};new c;var u=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,h=/\S/,p=new c;p.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!h.test(e)&&!h.test(t)},p.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&u.test(t[r])&&u.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var d=new c;d.tokenize=function(e){var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var A=0;A<r.length;A++){var n=r[A];A%2&&!this.options.newlineIsToken?t[t.length-1]+=n:(this.options.ignoreWhitespace&&(n=n.trim()),t.push(n))}return t};var C=new c;C.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var f=new c;function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}f.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var B=Object.prototype.toString,y=new c;y.useLongestToken=!0,y.tokenize=d.tokenize,y.castInput=function(e){var t=this.options,r=t.undefinedReplacement,A=t.stringifyReplacer,n=void 0===A?function(e,t){return void 0===t?r:t}:A;return"string"==typeof e?e:JSON.stringify(function e(t,r,A,n,o){r=r||[],A=A||[],n&&(t=n(o,t));var i,s;for(i=0;i<r.length;i+=1)if(r[i]===t)return A[i];if("[object Array]"===B.call(t)){for(r.push(t),s=new Array(t.length),A.push(s),i=0;i<t.length;i+=1)s[i]=e(t[i],r,A,n,o);return r.pop(),A.pop(),s}t&&t.toJSON&&(t=t.toJSON());if("object"===I(t)&&null!==t){r.push(t),s={},A.push(s);var a,c=[];for(a in t)t.hasOwnProperty(a)&&c.push(a);for(c.sort(),i=0;i<c.length;i+=1)a=c[i],s[a]=e(t[a],r,A,n,a);r.pop(),A.pop()}else s=t;return s}(e,null,null,n),n," ")},y.equals=function(e,t){return c.prototype.equals.call(y,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var m=new c;function w(e,t,r,A,n,o,i){i||(i={}),void 0===i.context&&(i.context=4);var s=function(e,t,r){return d.diff(e,t,r)}(r,A,i);function a(e){return e.map((function(e){return" "+e}))}s.push({value:"",lines:[]});for(var c=[],g=0,l=0,u=[],h=1,p=1,C=function(e){var t=s[e],n=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=n,t.added||t.removed){var o;if(!g){var d=s[e-1];g=h,l=p,d&&(u=i.context>0?a(d.lines.slice(-i.context)):[],g-=u.length,l-=u.length)}(o=u).push.apply(o,E(n.map((function(e){return(t.added?"+":"-")+e})))),t.added?p+=n.length:h+=n.length}else{if(g)if(n.length<=2*i.context&&e<s.length-2){var C;(C=u).push.apply(C,E(a(n)))}else{var f,I=Math.min(n.length,i.context);(f=u).push.apply(f,E(a(n.slice(0,I))));var B={oldStart:g,oldLines:h-g+I,newStart:l,newLines:p-l+I,lines:u};if(e>=s.length-2&&n.length<=i.context){var y=/\n$/.test(r),m=/\n$/.test(A),w=0==n.length&&u.length>B.oldLines;!y&&w&&u.splice(B.oldLines,0,"\\ No newline at end of file"),(y||w)&&m||u.push("\\ No newline at end of file")}c.push(B),g=0,l=0,u=[]}h+=n.length,p+=n.length}},f=0;f<s.length;f++)C(f);return{oldFileName:e,newFileName:t,oldHeader:n,newHeader:o,hunks:c}}m.tokenize=function(e){return e.slice()},m.join=m.removeEmpty=function(e){return e};var Q=r(75130),D=r.n(Q),b=r(61578),v=r.n(b),S=r(53887),k=r.n(S),N=r(31669);const F=require("v8");var K=r.n(F),M=r(78761),R=r.n(M),x=r(39922),L=r(92409),P=r(92659),O=r(54143);const U=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(e,t,r,A)=>`${r}#commit=${A}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",A,n)=>`https://${r}github.com/${A}.git#commit=${n}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",A,n)=>`https://${r}github.com/${A}.git#commit=${n}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@[^/]+\/)?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,e=>"npm:"+e],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)$/,e=>"npm:"+e],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,e=>"npm:"+e],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>"npm:"+e]];class T{constructor(){this.resolutions=null}async setup(e,{report:t}){const r=n.y1.join(e.cwd,e.configuration.get("lockfileFilename"));if(!A.xfs.existsSync(r))return;const o=await A.xfs.readFilePromise(r,"utf8"),s=(0,i.parseSyml)(o);if(Object.prototype.hasOwnProperty.call(s,"__metadata"))return;const a=this.resolutions=new Map;for(const r of Object.keys(s)){let A=O.tryParseDescriptor(r);if(!A){t.reportWarning(P.b.YARN_IMPORT_FAILED,`Failed to parse the string "${r}" into a proper descriptor`);continue}k().validRange(A.range)&&(A=O.makeDescriptor(A,"npm:"+A.range));const{version:n,resolved:o}=s[r];if(!o)continue;let i;for(const[e,t]of U){const r=o.match(e);if(r){i=t(n,...r);break}}if(!i){t.reportWarning(P.b.YARN_IMPORT_FAILED,`${O.prettyDescriptor(e.configuration,A)}: Only some patterns can be imported from legacy lockfiles (not "${o}")`);continue}const c=O.makeLocator(A,i);a.set(A.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 A=this.resolutions.get(e.descriptorHash);if(!A)throw new Error("Assertion failed: The resolution should have been registered");return[A]}async getSatisfying(e,t,r){return null}async resolve(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}class j{supportsDescriptor(e,t){return!!t.project.storedResolutions.get(e.descriptorHash)||!!t.project.originalPackages.has(O.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 A=r.project.originalPackages.get(O.convertDescriptorToLocator(e).locatorHash);if(A)return[A];const n=r.project.storedResolutions.get(e.descriptorHash);if(!n)throw new Error("Expected the resolution to have been successful - resolution not found");if(A=r.project.originalPackages.get(n),!A)throw new Error("Expected the resolution to have been successful - package not found");return[A]}async getSatisfying(e,t,r){return null}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 Y=r(46611),G=r(27092),H=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 H.lk(P.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 getSatisfying(e,t,r){throw new H.lk(P.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 H.lk(P.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 q=r(33720),z=r(17722),W=r(81111),V=r(71643),X=r(20624),_=r(73632),Z=r(63088),$=r(36545),ee=r(32485);const te=/ *, */g,re=/\/$/,Ae=(0,N.promisify)(R().gzip),ne=(0,N.promisify)(R().gunzip),oe={restoreInstallersCustomData:["installersCustomData"],restoreResolutions:["accessibleLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"]};class ie{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.peerRequirements=new Map,this.installersCustomData=new Map,this.lockFileChecksum=null,this.configuration=t,this.cwd=e}static async find(e,t){var r,o,i;if(!e.projectCwd)throw new s.UsageError("No project found in "+t);let a=e.projectCwd,c=t,g=null;for(;g!==e.projectCwd;){if(g=c,A.xfs.existsSync(n.y1.join(g,n.QS.manifest))){a=g;break}c=n.y1.dirname(g)}const l=new ie(e.projectCwd,{configuration:e});null===(r=x.VK.telemetry)||void 0===r||r.reportProject(l.cwd),await l.setupResolutions(),await l.setupWorkspaces(),null===(o=x.VK.telemetry)||void 0===o||o.reportWorkspaceCount(l.workspaces.length),null===(i=x.VK.telemetry)||void 0===i||i.reportDependencyCount(l.workspaces.reduce((e,t)=>e+t.manifest.dependencies.size+t.manifest.devDependencies.size,0));const u=l.tryWorkspaceByCwd(a);if(u)return{project:l,workspace:u,locator:u.anchoredLocator};const h=await l.findLocatorForLocation(a+"/",{strict:!0});if(h)return{project:l,locator:h,workspace:null};throw new s.UsageError(`The nearest package directory (${V.pretty(e,a,V.Type.PATH)}) doesn't seem to be part of the project declared in ${V.pretty(e,l.cwd,V.Type.PATH)}.\n\n- If the project directory is right, it might be that you forgot to list ${V.pretty(e,n.y1.relative(l.cwd,a),V.Type.PATH)} as a workspace.\n- If it isn't, it's likely because you have a yarn.lock or package.json file there, confusing the project root 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 A=[...e].map(([e,r])=>{const A=t.get(e);if(void 0===A)throw new Error("Assertion failed: The locator should have been registered");return[O.stringifyLocator(A),A.locatorHash,r]});for(const[e,t,n]of _.sortMap(A,[e=>e[0],e=>e[1]]))r+="\n",r+=`# ${e}\n`,r+=JSON.stringify(t)+":\n",r+=` ${n}\n`;return r}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;const e=n.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.configuration.get("defaultLanguageName");if(A.xfs.existsSync(e)){const r=await A.xfs.readFilePromise(e,"utf8");this.lockFileChecksum=X.makeHash("1",r);const n=(0,i.parseSyml)(r);if(n.__metadata){const e=n.__metadata.version,r=n.__metadata.cacheKey;for(const A of Object.keys(n)){if("__metadata"===A)continue;const o=n[A];if(void 0===o.resolution)throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);const i=O.parseLocator(o.resolution,!0),s=new Y.G;s.load(o,{yamlCompatibilityMode:!0});const a=s.version,c=s.languageName||t,g=o.linkType.toUpperCase(),l=s.dependencies,u=s.peerDependencies,h=s.dependenciesMeta,p=s.peerDependenciesMeta,d=s.bin;if(null!=o.checksum){const e=void 0===r||o.checksum.includes("/")?o.checksum:`${r}/${o.checksum}`;this.storedChecksums.set(i.locatorHash,e)}if(e>=4){const e={...i,version:a,languageName:c,linkType:g,dependencies:l,peerDependencies:u,dependenciesMeta:h,peerDependenciesMeta:p,bin:d};this.originalPackages.set(e.locatorHash,e)}for(const t of A.split(te)){const r=O.parseDescriptor(t);if(this.storedDescriptors.set(r.descriptorHash,r),e>=4)this.storedResolutions.set(r.descriptorHash,i.locatorHash);else{const e=O.convertLocatorToDescriptor(i);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),A=this.storedPackages.get(t.anchoredLocator.locatorHash);A&&(t.dependencies=A.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 ${O.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){n.y1.isAbsolute(e)||(e=n.y1.resolve(this.cwd,e)),e=n.y1.normalize(e).replace(/\/+$/,"");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){n.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 (${O.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 (${O.prettyDescriptor(this.configuration,e)})`);return t}tryWorkspaceByLocator(e){O.isVirtualLocator(e)&&(e=O.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 (${O.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){const t=e=>{this.storedResolutions.delete(e),this.storedDescriptors.delete(e)},r=e=>{this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)};if("descriptorHash"in e){const A=this.storedResolutions.get(e.descriptorHash);t(e.descriptorHash);const n=new Set(this.storedResolutions.values());void 0===A||n.has(A)||r(A)}if("locatorHash"in e){r(e.locatorHash);for(const[r,A]of this.storedResolutions)A===e.locatorHash&&t(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)O.isVirtualDescriptor(r)&&e.dependencies.set(t,O.devirtualizeDescriptor(r))}getDependencyMeta(e,t){const r={},A=this.topLevelWorkspace.manifest.dependenciesMeta.get(O.stringifyIdent(e));if(!A)return r;const n=A.get(null);if(n&&Object.assign(r,n),null===t||!k().valid(t))return r;for(const[e,n]of A)null!==e&&e===t&&Object.assign(r,n);return r}async findLocatorForLocation(e,{strict:t=!1}={}){const r=new q.$,A=this.configuration.getLinkers(),n={project:this,report:r};for(const r of A){const A=await r.findPackageLocator(e,n);if(A){if(t){if((await r.findPackageLocation(A,n)).replace(re,"")!==e.replace(re,""))continue}return A}}return null}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 T;await r.setup(this,{report:e.report});const o=e.lockfileOnly?new G.B([new j,new J(t)]):new G.B([new j,r,t]),i=this.configuration.makeFetcher(),s=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:i}},a=new Map,c=new Map,g=new Map,l=new Map,u=new Map,h=new Map,p=[],d=async e=>{const t=await _.prettifyAsyncErrors(async()=>await o.resolve(e,s),t=>`${O.prettyLocator(this.configuration,e)}: ${t}`);if(!O.areLocatorsEqual(e,t))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${O.prettyLocator(this.configuration,e)} to ${O.prettyLocator(this.configuration,t)})`);l.set(t.locatorHash,t);const r=this.configuration.normalizePackage(t);for(const[t,A]of r.dependencies){const n=await this.configuration.reduceHook(e=>e.reduceDependency,A,this,r,A,{resolver:o,resolveOptions:s});if(!O.areIdentsEqual(A,n))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");const i=o.bindDescriptor(n,e,s);r.dependencies.set(t,i)}return p.push(Promise.all([...r.dependencies.values()].map(e=>f(e)))),c.set(r.locatorHash,r),r},C=async e=>{const t=this.resolutionAliases.get(e.descriptorHash);if(void 0!==t)return(async(e,t)=>{const r=await f(t);return a.set(e.descriptorHash,e),g.set(e.descriptorHash,r.locatorHash),r})(e,this.storedDescriptors.get(t));const r=o.getResolutionDependencies(e,s),A=new Map(await Promise.all(r.map(async e=>[e.descriptorHash,await f(e)]))),n=(await _.prettifyAsyncErrors(async()=>await o.getCandidates(e,A,s),t=>`${O.prettyDescriptor(this.configuration,e)}: ${t}`))[0];if(void 0===n)throw new Error(O.prettyDescriptor(this.configuration,e)+": No candidates found");return a.set(e.descriptorHash,e),g.set(e.descriptorHash,n.locatorHash),(async e=>{const t=u.get(e.locatorHash);if(void 0!==t)return t;const r=Promise.resolve().then(()=>d(e));return u.set(e.locatorHash,r),r})(n)},f=e=>{const t=h.get(e.descriptorHash);if(void 0!==t)return t;a.set(e.descriptorHash,e);const r=Promise.resolve().then(()=>C(e));return h.set(e.descriptorHash,r),r};for(const e of this.workspaces){const t=e.anchoredDescriptor;p.push(f(t))}for(;p.length>0;){const e=[...p];p.length=0,await Promise.all(e)}const I=new Set(this.resolutionAliases.values()),E=new Set(c.keys()),B=new Set,y=new Map;!function({project:e,allDescriptors:t,allResolutions:r,allPackages:o,accessibleLocators:i=new Set,optionalBuilds:s=new Set,volatileDescriptors:a=new Set,peerRequirements:c=new Map,report:g,tolerateMissingPackages:l=!1}){var u;const h=new Map,p=[],d=new Map,C=new Map,f=new Map,I=new Map,E=new Map,B=new Map(e.workspaces.map(e=>{const t=e.anchoredLocator.locatorHash,r=o.get(t);if(void 0===r){if(l)return[t,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[t,O.copyPackage(r)]})),y=()=>{const e=A.xfs.mktempSync(),t=n.y1.join(e,"stacktrace.log"),r=String(p.length+1).length,o=p.map((e,t)=>`${(t+1+".").padStart(r," ")} ${O.stringifyLocator(e)}\n`).join("");throw A.xfs.writeFileSync(t,o),new H.lk(P.b.STACK_OVERFLOW_RESOLUTION,"Encountered a stack overflow when resolving peer dependencies; cf "+t)},m=e=>{const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: The resolution should have been registered");const A=o.get(t);if(!A)throw new Error("Assertion failed: The package could not be found");return A},w=(e,t,{first:r,optional:A})=>{p.length>1e3&&y(),p.push(e);const n=Q(e,t,{first:r,optional:A});return p.pop(),n},Q=(A,n,{first:c,optional:g})=>{if(i.has(A.locatorHash))return;i.add(A.locatorHash),g||s.delete(A.locatorHash);const u=o.get(A.locatorHash);if(!u){if(l)return;throw new Error(`Assertion failed: The package (${O.prettyLocator(e.configuration,A)}) should have been registered`)}const p=[],m=[],Q=[],D=[],b=[];for(const i of Array.from(u.dependencies.values())){if(u.peerDependencies.has(i.identHash)&&!c)continue;if(O.isVirtualDescriptor(i))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");a.delete(i.descriptorHash);let s=g;if(!s){const e=u.dependenciesMeta.get(O.stringifyIdent(i));if(void 0!==e){const t=e.get(null);void 0!==t&&t.optional&&(s=!0)}}const C=r.get(i.descriptorHash);if(!C){if(l)continue;throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(e.configuration,i)}) should have been registered`)}const v=B.get(C)||o.get(C);if(!v)throw new Error(`Assertion failed: The package (${C}, resolved from ${O.prettyDescriptor(e.configuration,i)}) should have been registered`);if(0===v.peerDependencies.size){w(v,new Map,{first:!1,optional:s});continue}const S=h.get(v.locatorHash);let k,N;"number"==typeof S&&S>=2&&y();const F=new Set;let K;m.push(()=>{k=O.virtualizeDescriptor(i,A.locatorHash),N=O.virtualizePackage(v,A.locatorHash),u.dependencies.delete(i.identHash),u.dependencies.set(k.identHash,k),r.set(k.descriptorHash,N.locatorHash),t.set(k.descriptorHash,k),o.set(N.locatorHash,N),p.push([v,k,N])}),Q.push(()=>{var e;K=new Map;for(const o of N.peerDependencies.values()){let i=u.dependencies.get(o.identHash);if(!i&&O.areIdentsEqual(A,o)&&(i=O.convertLocatorToDescriptor(A),t.set(i.descriptorHash,i),r.set(i.descriptorHash,A.locatorHash),a.delete(i.descriptorHash)),i||!N.dependencies.has(o.identHash)){if(i||(i=O.makeDescriptor(o,"missing:")),N.dependencies.set(i.identHash,i),O.isVirtualDescriptor(i)){_.getSetWithDefault(f,i.descriptorHash).add(N.locatorHash)}d.set(i.identHash,i),"missing:"===i.range&&F.add(i.identHash),K.set(o.identHash,null!==(e=n.get(o.identHash))&&void 0!==e?e:N.locatorHash)}else N.peerDependencies.delete(o.identHash)}N.dependencies=new Map(_.sortMap(N.dependencies,([e,t])=>O.stringifyIdent(t)))}),D.push(()=>{if(!o.has(N.locatorHash))return;const e=h.get(v.locatorHash),t=void 0!==e?e+1:1;h.set(v.locatorHash,t),w(N,K,{first:!1,optional:s}),h.set(v.locatorHash,t-1)}),b.push(()=>{const e=u.dependencies.get(i.identHash);if(void 0===e)throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: Expected the descriptor to be registered");if(_.getSetWithDefault(E,t).add(A.locatorHash),o.has(N.locatorHash)){for(const e of N.peerDependencies.values()){const t=K.get(e.identHash);if(void 0===t)throw new Error("Assertion failed: Expected the peer dependency ident to be registered");_.getArrayWithDefault(_.getMapWithDefault(I,t),O.stringifyIdent(e)).push(N.locatorHash)}for(const e of F)N.dependencies.delete(e)}})}for(const e of[...m,...Q])e();let v;do{v=!0;for(const[A,n,s]of p){if(!o.has(s.locatorHash))continue;const a=_.getMapWithDefault(C,A.locatorHash),c=X.makeHash(...[...s.dependencies.values()].map(t=>{const A="missing:"!==t.range?r.get(t.descriptorHash):"missing:";if(void 0===A)throw new Error(`Assertion failed: Expected the resolution for ${O.prettyDescriptor(e.configuration,t)} to have been registered`);return A}),n.identHash),g=a.get(c);if(void 0===g){a.set(c,n);continue}if(g===n)continue;v=!1,o.delete(s.locatorHash),t.delete(n.descriptorHash),r.delete(n.descriptorHash),i.delete(s.locatorHash);const l=f.get(n.descriptorHash)||[],h=[u.locatorHash,...l];f.delete(n.descriptorHash);for(const e of h){const t=o.get(e);void 0!==t&&t.dependencies.set(n.identHash,g)}}}while(!v);for(const e of[...D,...b])e()};for(const t of e.workspaces)a.delete(t.anchoredDescriptor.descriptorHash),w(t.anchoredLocator,new Map,{first:!0,optional:!1});let D;!function(e){e[e.NotProvided=0]="NotProvided",e[e.NotCompatible=1]="NotCompatible"}(D||(D={}));const b=[];for(const[e,t]of E){const r=o.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the root to be registered");const A=I.get(e);if(void 0!==A)for(const n of t){const t=o.get(n);if(void 0!==t)for(const[i,s]of A){const A=O.parseIdent(i);if(t.peerDependencies.has(A.identHash))continue;const a="p"+X.makeHash(n,i,e).slice(0,5);c.set(a,{subject:n,requested:A,rootRequester:e,allRequesters:s});const g=r.dependencies.get(A.identHash);if(void 0!==g){const e=m(g),n=null!==(u=e.version)&&void 0!==u?u:"0.0.0",i=new Set;for(const e of s){const t=o.get(e);if(void 0===t)throw new Error("Assertion failed: Expected the link to be registered");const r=t.peerDependencies.get(A.identHash);if(void 0===r)throw new Error("Assertion failed: Expected the ident to be registered");i.add(r.range)}[...i].every(e=>$.satisfiesWithPrereleases(n,e))||b.push({type:D.NotCompatible,subject:t,requested:A,requester:r,version:n,hash:a,requirementCount:s.length})}else{const e=r.peerDependenciesMeta.get(i);(null==e?void 0:e.optional)||b.push({type:D.NotProvided,subject:t,requested:A,requester:r,hash:a})}}}}const v=[e=>O.prettyLocatorNoColors(e.subject),e=>O.stringifyIdent(e.requested),e=>""+e.type];for(const t of _.sortMap(b,v))switch(t.type){case D.NotProvided:null==g||g.reportWarning(P.b.MISSING_PEER_DEPENDENCY,`${O.prettyLocator(e.configuration,t.subject)} doesn't provide ${O.prettyIdent(e.configuration,t.requested)} (${V.pretty(e.configuration,t.hash,V.Type.CODE)}), requested by ${O.prettyIdent(e.configuration,t.requester)}`);break;case D.NotCompatible:{const r=t.requirementCount>1?"and some of its descendants request":"requests";null==g||g.reportWarning(P.b.INCOMPATIBLE_PEER_DEPENDENCY,`${O.prettyLocator(e.configuration,t.subject)} provides ${O.prettyIdent(e.configuration,t.requested)} (${V.pretty(e.configuration,t.hash,V.Type.CODE)}) with version ${O.prettyReference(e.configuration,t.version)}, which doesn't satisfy what ${O.prettyIdent(e.configuration,t.requester)} ${r}`)}}b.length>0&&(null==g||g.reportWarning(P.b.UNNAMED,`Some peer dependencies are incorrectly met; run ${V.pretty(e.configuration,"yarn explain peer-requirements <hash>",V.Type.CODE)} for details, where ${V.pretty(e.configuration,"<hash>",V.Type.CODE)} is the six-letter p-prefixed code`))}({project:this,report:e.report,accessibleLocators:B,volatileDescriptors:I,optionalBuilds:E,peerRequirements:y,allDescriptors:a,allResolutions:g,allPackages:c});for(const e of I)a.delete(e),g.delete(e);this.storedResolutions=g,this.storedDescriptors=a,this.storedPackages=c,this.accessibleLocators=B,this.originalPackages=l,this.optionalBuilds=E,this.peerRequirements=y,this.refreshWorkspaceDependencies()}async fetchEverything({cache:e,report:t,fetcher:r}){const A=r||this.configuration.makeFetcher(),n={checksums:this.storedChecksums,project:this,cache:e,fetcher:A,report:t},o=Array.from(new Set(_.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 O.stringifyLocator(t)}])));let i=!1;const s=H.yG.progressViaCounter(o.length);t.reportProgress(s);const a=v()(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(O.isVirtualLocator(r))return;let o;try{o=await A.fetch(r,n)}catch(e){return e.message=`${O.prettyLocator(this.configuration,r)}: ${e.message}`,t.reportExceptionOnce(e),void(i=e)}o.checksum?this.storedChecksums.set(r.locatorHash,o.checksum):this.storedChecksums.delete(r.locatorHash),o.releaseFs&&o.releaseFs()}).finally(()=>{s.tick()})))}),i)throw i}async linkEverything({cache:e,report:t,fetcher:r,skipBuild:o}){var s;const c=r||this.configuration.makeFetcher(),g={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:t,skipIntegrityCheck:!0},l=this.configuration.getLinkers(),u={project:this,report:t},h=new Map(l.map(e=>{const t=e.makeInstaller(u),r=t.getCustomDataKey(),A=this.installersCustomData.get(r);return void 0!==A&&t.attachCustomData(A),[e,t]})),p=new Map,d=new Map,C=new Map,f=new Map(await Promise.all([...this.accessibleLocators].map(async e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return[e,await c.fetch(t,g)]})));for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(void 0===t)throw new Error("Assertion failed: The locator should have been registered");const r=f.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: The fetch result should have been registered");const A=this.tryWorkspaceByLocator(t);if(null!==A){const e=[],{scripts:o}=A.manifest;for(const t of["preinstall","install","postinstall"])o.has(t)&&e.push([L.k.SCRIPT,t]);try{for(const e of h.values()){if(null!==(await e.installPackage(t,r)).buildDirective)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}}finally{r.releaseFs&&r.releaseFs()}const i=n.y1.join(r.packageFs.getRealPath(),r.prefixPath);d.set(t.locatorHash,i),e.length>0&&C.set(t.locatorHash,{directives:e,buildLocations:[i]})}else{const e=l.find(e=>e.supportsPackage(t,u));if(!e)throw new H.lk(P.b.LINKER_NOT_FOUND,O.prettyLocator(this.configuration,t)+" isn't supported by any available linker");const A=h.get(e);if(!A)throw new Error("Assertion failed: The installer should have been registered");let n;try{n=await A.installPackage(t,r)}finally{r.releaseFs&&r.releaseFs()}p.set(t.locatorHash,e),d.set(t.locatorHash,n.packageLocation),n.buildDirective&&n.packageLocation&&C.set(t.locatorHash,{directives:n.buildDirective,buildLocations:[n.packageLocation]})}}const I=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),A=async(e,A)=>{const n=d.get(t.locatorHash);if(void 0===n)throw new Error(`Assertion failed: The package (${O.prettyLocator(this.configuration,t)}) should have been registered`);const o=[];for(const A of t.dependencies.values()){const i=this.storedResolutions.get(A.descriptorHash);if(void 0===i)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,A)}, from ${O.prettyLocator(this.configuration,t)})should have been registered`);const s=this.storedPackages.get(i);if(void 0===s)throw new Error(`Assertion failed: The package (${i}, resolved from ${O.prettyDescriptor(this.configuration,A)}) should have been registered`);const a=null===this.tryWorkspaceByLocator(s)?p.get(i):null;if(void 0===a)throw new Error(`Assertion failed: The package (${i}, resolved from ${O.prettyDescriptor(this.configuration,A)}) should have been registered`);const c=null===a;if(a===e||r||c)null!==d.get(s.locatorHash)&&o.push([A,s]);else if(null!==n){_.getArrayWithDefault(I,i).push(n)}}null!==n&&await A.attachInternalDependencies(t,o)};if(r)for(const[e,t]of h)await A(e,t);else{const e=p.get(t.locatorHash);if(!e)throw new Error("Assertion failed: The linker should have been found");const r=h.get(e);if(!r)throw new Error("Assertion failed: The installer should have been registered");await A(e,r)}}for(const[e,t]of I){const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The package should have been registered");const A=p.get(r.locatorHash);if(!A)throw new Error("Assertion failed: The linker should have been found");const n=h.get(A);if(!n)throw new Error("Assertion failed: The installer should have been registered");await n.attachExternalDependents(r,t)}const E=new Map;for(const e of h.values()){const t=await e.finalizeInstall();for(const e of null!==(s=null==t?void 0:t.records)&&void 0!==s?s:[])C.set(e.locatorHash,{directives:e.buildDirective,buildLocations:e.buildLocations});void 0!==(null==t?void 0:t.customData)&&E.set(e.getCustomDataKey(),t.customData)}if(this.installersCustomData=E,await this.persistInstallStateFile(),o)return;const B=new Set(this.storedPackages.keys()),y=new Set(C.keys());for(const e of y)B.delete(e);const m=(0,a.createHash)("sha512");m.update(process.versions.node),this.configuration.triggerHook(e=>e.globalHashGeneration,this,e=>{m.update("\0"),m.update(e)});const w=m.digest("hex"),Q=new Map,D=e=>{let t=Q.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 A=(0,a.createHash)("sha512");A.update(e.locatorHash),Q.set(e.locatorHash,"<recursive>");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 (${O.prettyDescriptor(this.configuration,e)}) should have been registered`);const r=this.storedPackages.get(t);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");A.update(D(r))}return t=A.digest("hex"),Q.set(e.locatorHash,t),t},b=(e,t)=>{const r=(0,a.createHash)("sha512");r.update(w),r.update(D(e));for(const e of t)r.update(e);return r.digest("hex")},v=this.configuration.get("bstatePath"),S=A.xfs.existsSync(v)?(0,i.parseSyml)(await A.xfs.readFilePromise(v,"utf8")):{},k=new Map;for(;y.size>0;){const e=y.size,r=[];for(const e of y){const o=this.storedPackages.get(e);if(!o)throw new Error("Assertion failed: The package should have been registered");let i=!0;for(const e of o.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(!t)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,e)}) should have been registered`);if(y.has(t)){i=!1;break}}if(!i)continue;y.delete(e);const s=C.get(o.locatorHash);if(!s)throw new Error("Assertion failed: The build directive should have been registered");const a=b(o,s.buildLocations);if(Object.prototype.hasOwnProperty.call(S,o.locatorHash)&&S[o.locatorHash]===a)k.set(o.locatorHash,a);else{Object.prototype.hasOwnProperty.call(S,o.locatorHash)?t.reportInfo(P.b.MUST_REBUILD,O.prettyLocator(this.configuration,o)+" must be rebuilt because its dependency tree changed"):t.reportInfo(P.b.MUST_BUILD,O.prettyLocator(this.configuration,o)+" must be built because it never did before or the last one failed");for(const e of s.buildLocations){if(!n.y1.isAbsolute(e))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${e})`);r.push((async()=>{for(const[r,i]of s.directives){let s=`# This file contains the result of Yarn building a package (${O.stringifyLocator(o)})\n`;switch(r){case L.k.SCRIPT:s+=`# Script name: ${i}\n`;break;case L.k.SHELLCODE:s+=`# Script code: ${i}\n`}const c=null;await A.xfs.mktempPromise(async g=>{const l=n.y1.join(g,"build.log"),{stdout:u,stderr:h}=this.configuration.getSubprocessStreams(l,{header:s,prefix:O.prettyLocator(this.configuration,o),report:t});let p;try{switch(r){case L.k.SCRIPT:p=await Z.executePackageScript(o,i,[],{cwd:e,project:this,stdin:c,stdout:u,stderr:h});break;case L.k.SHELLCODE:p=await Z.executePackageShellcode(o,i,[],{cwd:e,project:this,stdin:c,stdout:u,stderr:h})}}catch(e){h.write(e.stack),p=1}if(u.end(),h.end(),0===p)return k.set(o.locatorHash,a),!0;A.xfs.detachTemp(g);const d=`${O.prettyLocator(this.configuration,o)} couldn't be built successfully (exit code ${V.pretty(this.configuration,p,V.Type.NUMBER)}, logs can be found here: ${V.pretty(this.configuration,l,V.Type.PATH)})`;return t.reportInfo(P.b.BUILD_FAILED,d),this.optionalBuilds.has(o.locatorHash)?(k.set(o.locatorHash,a),!0):(t.reportError(P.b.BUILD_FAILED,d),!1)})}})())}}}if(await Promise.all(r),e===y.size){const e=Array.from(y).map(e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The package should have been registered");return O.prettyLocator(this.configuration,t)}).join(", ");t.reportError(P.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(k.size>0){const e=this.configuration.get("bstatePath"),t=ie.generateBuildStateFile(k,this.storedPackages);await A.xfs.mkdirPromise(n.y1.dirname(e),{recursive:!0}),await A.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}else await A.xfs.removePromise(v)}async install(e){var t,r;const i=this.configuration.get("nodeLinker");null===(t=x.VK.telemetry)||void 0===t||t.reportInstall(i),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(e=>e.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(const e of this.configuration.packageExtensions.values())for(const[,t]of e)for(const e of t)e.status=ee._u.Inactive;const s=n.y1.join(this.cwd,this.configuration.get("lockfileFilename"));let a=null;if(e.immutable)try{a=await A.xfs.readFilePromise(s,"utf8")}catch(e){throw"ENOENT"===e.code?new H.lk(P.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):e}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(const[,t]of this.configuration.packageExtensions)for(const[,r]of t)for(const t of r)if(t.userProvided){const r=V.pretty(this.configuration,t,V.Type.PACKAGE_EXTENSION);switch(t.status){case ee._u.Inactive:e.report.reportWarning(P.b.UNUSED_PACKAGE_EXTENSION,r+": No matching package in the dependency tree; you may not need this rule anymore.");break;case ee._u.Redundant:e.report.reportWarning(P.b.REDUNDANT_PACKAGE_EXTENSION,r+": This rule seems redundant when applied on the original package; the extension may have been applied upstream.")}}if(null!==a){const t=(0,o.qH)(a,this.generateLockfile());if(t!==a){const r=w(s,s,a,t);e.report.reportSeparator();for(const t of r.hunks){e.report.reportInfo(null,`@@ -${t.oldStart},${t.oldLines} +${t.newStart},${t.newLines} @@`);for(const r of t.lines)r.startsWith("+")?e.report.reportError(P.b.FROZEN_LOCKFILE_EXCEPTION,V.pretty(this.configuration,r,V.Type.ADDED)):r.startsWith("-")?e.report.reportError(P.b.FROZEN_LOCKFILE_EXCEPTION,V.pretty(this.configuration,r,V.Type.REMOVED)):e.report.reportInfo(null,V.pretty(this.configuration,r,"grey"))}throw e.report.reportSeparator(),new H.lk(P.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(const e of this.configuration.packageExtensions.values())for(const[,t]of e)for(const e of t)e.userProvided&&e.status===ee._u.Active&&(null===(r=x.VK.telemetry)||void 0===r||r.reportPackageExtension(V.json(e,V.Type.PACKAGE_EXTENSION)));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()=>{const t=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],r=await Promise.all(t.map(async e=>X.checksumPattern(e,{cwd:this.cwd})));await this.linkEverything(e);const A=await Promise.all(t.map(async e=>X.checksumPattern(e,{cwd:this.cwd})));for(let n=0;n<t.length;++n)r[n]!==A[n]&&e.report.reportError(P.b.FROZEN_ARTIFACT_EXCEPTION,`The checksum for ${t[n]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile(),await this.configuration.triggerHook(e=>e.afterAllInstalled,this,e)}generateLockfile(){const e=new Map;for(const[t,r]of this.storedResolutions.entries()){let A=e.get(r);A||e.set(r,A=new Set),A.add(t)}const t={__metadata:{version:4}};for(const[r,A]of e.entries()){const e=this.originalPackages.get(r);if(!e)continue;const n=[];for(const e of A){const t=this.storedDescriptors.get(e);if(!t)throw new Error("Assertion failed: The descriptor should have been registered");n.push(t)}const o=n.map(e=>O.stringifyDescriptor(e)).sort().join(", "),i=new Y.G;let s;i.version=e.linkType===ee.Un.HARD?e.version:"0.0.0-use.local",i.languageName=e.languageName,i.dependencies=new Map(e.dependencies),i.peerDependencies=new Map(e.peerDependencies),i.dependenciesMeta=new Map(e.dependenciesMeta),i.peerDependenciesMeta=new Map(e.peerDependenciesMeta),i.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),A=a.slice(e+1);void 0===t.__metadata.cacheKey&&(t.__metadata.cacheKey=r),s=r===t.__metadata.cacheKey?A:a}t[o]={...i.exportTo({},{compatibilityMode:!1}),linkType:e.linkType.toLowerCase(),resolution:O.stringifyLocator(e),checksum:s}}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,i.stringifySyml)(t)}async persistLockfile(){const e=n.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.generateLockfile();await A.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}async persistInstallStateFile(){const e=[];for(const t of Object.values(oe))e.push(...t);const t=D()(this,e),r=await Ae(K().serialize(t)),o=this.configuration.get("installStatePath");await A.xfs.mkdirPromise(n.y1.dirname(o),{recursive:!0}),await A.xfs.changeFilePromise(o,r)}async restoreInstallState({restoreInstallersCustomData:e=!0,restoreResolutions:t=!0}={}){const r=this.configuration.get("installStatePath");if(!A.xfs.existsSync(r))return void(t&&await this.applyLightResolution());const n=await A.xfs.readFilePromise(r),o=K().deserialize(await ne(n));e&&void 0!==o.installersCustomData&&(this.installersCustomData=o.installersCustomData),t&&(o.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,D()(o,oe.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new q.$}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(const e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:t}){const r=new Set([".gitignore"]);if(A.xfs.existsSync(e.cwd)&&(0,W.isFolderInside)(e.cwd,this.cwd)){for(const o of await A.xfs.readdirPromise(e.cwd)){if(r.has(o))continue;const i=n.y1.resolve(e.cwd,o);e.markedFiles.has(i)||(e.immutable?t.reportError(P.b.IMMUTABLE_CACHE,V.pretty(this.configuration,n.y1.basename(i),"magenta")+" appears to be unused and would marked for deletion, but the cache is immutable"):(t.reportInfo(P.b.UNUSED_CACHE_ENTRY,V.pretty(this.configuration,n.y1.basename(i),"magenta")+" appears to be unused - removing"),await A.xfs.removePromise(i)))}e.markedFiles.clear()}}}},52779:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,O:()=>a});var A=r(53887),n=r.n(A),o=r(36545),i=r(54143);const s=/^(?!v)[a-z0-9-.]+$/i;class a{supportsDescriptor(e,t){return!!o.validRange(e.range)||!!s.test(e.range)}supportsLocator(e,t){return!!n().valid(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 getSatisfying(e,t,r){return await r.resolver.getSatisfying(this.forwardDescriptor(e,r),t,r)}async resolve(e,t){const r=await t.resolver.resolve(this.forwardLocator(e,t),t);return i.renamePackage(r,e)}forwardDescriptor(e,t){return i.makeDescriptor(e,`${t.project.configuration.get("defaultProtocol")}${e.range}`)}forwardLocator(e,t){return i.makeLocator(e,`${t.project.configuration.get("defaultProtocol")}${e.reference}`)}}},35691:(e,t,r)=>{"use strict";r.d(t,{lk:()=>i,yG:()=>s});var A=r(92413),n=r(24304),o=r(92659);class i extends Error{constructor(e,t,r){super(t),this.reportExtra=r,this.reportCode=e}}class s{constructor(){this.reportedInfos=new Set,this.reportedWarnings=new Set,this.reportedErrors=new Set}static progressViaCounter(e){let t,r=0,A=new Promise(e=>{t=e});const n=e=>{const n=t;A=new Promise(e=>{t=e}),r=e,n()},o=async function*(){for(;r<e;)await A,yield{progress:r/e}}();return{[Symbol.asyncIterator]:()=>o,set:n,tick:(e=0)=>{n(r+1)}}}reportInfoOnce(e,t,r){const A=r&&r.key?r.key:t;this.reportedInfos.has(A)||(this.reportedInfos.add(A),this.reportInfo(e,t))}reportWarningOnce(e,t,r){const A=r&&r.key?r.key:t;this.reportedWarnings.has(A)||(this.reportedWarnings.add(A),this.reportWarning(e,t))}reportErrorOnce(e,t,r){var A;const n=r&&r.key?r.key:t;this.reportedErrors.has(n)||(this.reportedErrors.add(n),this.reportError(e,t),null===(A=null==r?void 0:r.reportExtra)||void 0===A||A.call(r,this))}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,reportExtra:e.reportExtra})}createStreamReporter(e=null){const t=new A.PassThrough,r=new n.StringDecoder;let o="";return t.on("data",t=>{let A,n=r.write(t);do{if(A=n.indexOf("\n"),-1!==A){const t=o+n.substr(0,A);n=n.substr(A+1),o="",null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t)}}while(-1!==A);o+=n}),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,{Qw:()=>C,Pk:()=>f});var A=r(29148),n=r.n(A),o=r(92659),i=r(35691),s=r(71643);const a=["⠋","⠙","â š","â ¸","â ŧ","â ´","â Ļ","â §","⠇","⠏"],c=new Set([o.b.FETCH_NOT_CACHED,o.b.UNUSED_CACHE_ENTRY]),g=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,l=new Date,u=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,h={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}},p=u&&Object.keys(h).find(e=>{const t=h[e];return!t.date||t.date[0]===l.getDate()&&t.date[1]===l.getMonth()+1})||"default";function d(e,{configuration:t,json:r}){const A=null===e?0:e,n=(0,o.i)(A);return r||null!==e?n:s.pretty(t,n,"grey")}function C(e,{configuration:t,json:r}){const A=d(e,{configuration:t,json:r});if(!t.get("enableHyperlinks"))return A;if(null===e||e===o.b.UNNAMED)return A;return`]8;;${`https://yarnpkg.com/advanced/error-codes#${A}---${o.b[e]}`.toLowerCase()}${A}]8;;`}class f extends i.yG{constructor({configuration:e,stdout:t,json:r=!1,includeFooter:A=!0,includeLogs:n=!r,includeInfos:o=n,includeWarnings:i=n,forgettableBufferSize:a=5,forgettableNames:g=new Set}){super(),this.uncommitted=new Set,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=[],s.addLogFilterSupport(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=a,this.forgettableNames=new Set([...g,...c]),this.includeFooter=A,this.includeInfos=o,this.includeWarnings=i,this.json=r,this.stdout=t;const l=this.configuration.get("progressBarStyle")||p;if(!Object.prototype.hasOwnProperty.call(h,l))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=h[l];const u="➤ YN0000: ┌ ".length,d=Math.max(0,Math.min(process.stdout.columns-u,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*d/80)}static async start(e,t){const r=new this(e),A=process.emitWarning;process.emitWarning=(e,t)=>{if("string"!=typeof e){const r=e;e=r.message,t=null!=t?t:r.name}const A=void 0!==t?`${t}: ${e}`:e;r.reportWarning(o.b.UNNAMED,A)};try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize(),process.emitWarning=A}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(o.b.FETCH_NOT_CACHED,t)}startTimerSync(e,t,r){const A="function"==typeof t?t:r,n={committed:!1,action:()=>{this.reportInfo(null,"┌ "+e),this.indent+=1,null!==g&&this.stdout.write(g.start(e))}};("function"==typeof t?{}:t).skipIfEmpty?this.uncommitted.add(n):(n.action(),n.committed=!0);const o=Date.now();try{return A()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.uncommitted.delete(n),n.committed&&(this.indent-=1,null!==g&&this.stdout.write(g.end(e)),this.configuration.get("enableTimers")&&t-o>200?this.reportInfo(null,"└ Completed in "+s.pretty(this.configuration,t-o,s.Type.DURATION)):this.reportInfo(null,"└ Completed"))}}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r,n={committed:!1,action:()=>{this.reportInfo(null,"┌ "+e),this.indent+=1,null!==g&&this.stdout.write(g.start(e))}};("function"==typeof t?{}:t).skipIfEmpty?this.uncommitted.add(n):(n.action(),n.committed=!0);const o=Date.now();try{return await A()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.uncommitted.delete(n),n.committed&&(this.indent-=1,null!==g&&this.stdout.write(g.end(e)),this.configuration.get("enableTimers")&&t-o>200?this.reportInfo(null,"└ Completed in "+s.pretty(this.configuration,t-o,s.Type.DURATION)):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)return;this.commit();const r=`${s.pretty(this.configuration,"➤","blueBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`;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(r),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(r,{truncate:!0});else this.writeLineWithForgettableReset(r)}reportWarning(e,t){this.warningCount+=1,this.includeWarnings&&(this.commit(),this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${s.pretty(this.configuration,"➤","yellowBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`))}reportError(e,t){this.errorCount+=1,this.commit(),this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${s.pretty(this.configuration,"➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`,{truncate:!1})}reportProgress(e){let t=!1;const r=Promise.resolve().then(async()=>{const r={progress:0,title:void 0};this.progress.set(e,{definition:r,lastScaledSize:-1}),this.refreshProgress(-1);for await(const{progress:A,title:n}of e)t||r.progress===A&&r.title===n||(r.progress=A,r.title=n,this.refreshProgress());A()}),A=()=>{t||(t=!0,this.progress.delete(e),this.refreshProgress(1))};return{...r,stop:A}}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=s.pretty(this.configuration,Date.now()-this.startTime,s.Type.DURATION),r=this.configuration.get("enableTimers")?`${e} in ${t}`:e;this.errorCount>0?this.reportError(o.b.UNNAMED,r):this.warningCount>0?this.reportWarning(o.b.UNNAMED,r):this.reportInfo(o.b.UNNAMED,r)}writeLine(e,{truncate:t}={}){this.clearProgress({clear:!0}),this.stdout.write(this.truncate(e,{truncate:t})+"\n"),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:t}={}){this.forgettableLines=[],this.writeLine(e,{truncate:t})}writeLines(e,{truncate:t}={}){this.clearProgress({delta:e.length});for(const r of e)this.stdout.write(this.truncate(r,{truncate:t})+"\n");this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:t}){const r=this.cacheHitCount-e,A=this.cacheMissCount-t;if(0===r&&0===A)return;let n="";this.cacheHitCount>1?n+=this.cacheHitCount+" packages were already cached":1===this.cacheHitCount?n+=" - one package was already cached":n+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?n+=`, ${this.cacheMissCount} had to be fetched`:1===this.cacheMissCount&&(n+=", one had to be fetched"):this.cacheMissCount>1?n+=` - ${this.cacheMissCount} packages had to be fetched`:1===this.cacheMissCount&&(n+=" - one package had to be fetched"),this.reportInfo(o.b.FETCH_NOT_CACHED,n)}commit(){const e=this.uncommitted;this.uncommitted=new Set;for(const t of e)t.committed=!0,t.action()}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)%a.length,this.progressTime=e);const t=a[this.progressFrame];for(const e of this.progress.values()){const r=this.progressStyle.chars[0].repeat(e.lastScaledSize),A=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-e.lastScaledSize);this.stdout.write(`${s.pretty(this.configuration,"➤","blueBright")} ${this.formatName(null)}: ${t} ${r}${A}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},80)}refreshProgress(e=0){let t=!1;if(0===this.progress.size)t=!0;else for(const e of this.progress.values()){const r=Math.trunc(this.progressMaxScaledSize*e.definition.progress),A=e.lastScaledSize;if(e.lastScaledSize=r,r!==A){t=!0;break}}t&&(this.clearProgress({delta:e}),this.writeProgress())}truncate(e,{truncate:t}={}){return this.configuration.get("enableProgressBars")||(t=!1),void 0===t&&(t=this.configuration.get("preferTruncatedLines")),t&&(e=n()(e,0,process.stdout.columns-1)),e}formatName(e){return d(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return C(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"│ ".repeat(this.indent)}}},81832:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var A,n=r(43896),o=r(46009),i=r(79669),s=r(73632);!function(e){e.VERSION="version",e.COMMAND_NAME="commandName",e.PLUGIN_NAME="pluginName",e.INSTALL_COUNT="installCount",e.PROJECT_COUNT="projectCount",e.WORKSPACE_COUNT="workspaceCount",e.DEPENDENCY_COUNT="dependencyCount",e.EXTENSION="packageExtension"}(A||(A={}));class a{constructor(e,t){this.values=new Map,this.hits=new Map,this.enumerators=new Map,this.configuration=e;const r=this.getRegistryPath();this.isNew=!n.xfs.existsSync(r),this.sendReport(t),this.startBuffer()}reportVersion(e){this.reportValue(A.VERSION,e)}reportCommandName(e){this.reportValue(A.COMMAND_NAME,e||"<none>")}reportPluginName(e){this.reportValue(A.PLUGIN_NAME,e)}reportProject(e){this.reportEnumerator(A.PROJECT_COUNT,e)}reportInstall(e){this.reportHit(A.INSTALL_COUNT,e)}reportPackageExtension(e){this.reportValue(A.EXTENSION,e)}reportWorkspaceCount(e){this.reportValue(A.WORKSPACE_COUNT,String(e))}reportDependencyCount(e){this.reportValue(A.DEPENDENCY_COUNT,String(e))}reportValue(e,t){s.getSetWithDefault(this.values,e).add(t)}reportEnumerator(e,t){s.getSetWithDefault(this.enumerators,e).add(t)}reportHit(e,t="*"){const r=s.getMapWithDefault(this.hits,e),A=s.getFactoryWithDefault(r,t,()=>0);r.set(t,A+1)}getRegistryPath(){const e=this.configuration.get("globalFolder");return o.y1.join(e,"telemetry.json")}sendReport(e){var t,r,A;const s=this.getRegistryPath();let a;try{a=n.xfs.readJsonSync(s)}catch(e){a={}}const c=Date.now(),g=24*this.configuration.get("telemetryInterval")*60*60*1e3,l=(null!==(t=a.lastUpdate)&&void 0!==t?t:c+g+Math.floor(g*Math.random()))+g;if(!(l>c&&null!=a.lastUpdate)){try{n.xfs.mkdirSync(o.y1.dirname(s),{recursive:!0}),n.xfs.writeJsonSync(s,{lastUpdate:c})}catch(e){return}if(!(l>c)&&a.blocks)for(const[t,n]of Object.entries(null!==(r=a.blocks)&&void 0!==r?r:{})){if(0===Object.keys(n).length)continue;const r=n;r.userId=t;for(const e of Object.keys(null!==(A=r.enumerators)&&void 0!==A?A:{}))r.enumerators[e]=r.enumerators[e].length;const o=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`;i.post(o,r,{configuration:this.configuration}).catch(()=>{})}}}applyChanges(){var e,t,r,A,i,s,a,c,g;const l=this.getRegistryPath();let u;try{u=n.xfs.readJsonSync(l)}catch(e){u={}}const h=null!==(e=this.configuration.get("telemetryUserId"))&&void 0!==e?e:"*",p=u.blocks=null!==(t=u.blocks)&&void 0!==t?t:{},d=p[h]=null!==(r=p[h])&&void 0!==r?r:{};for(const e of this.hits.keys()){const t=d.hits=null!==(A=d.hits)&&void 0!==A?A:{},r=t[e]=null!==(i=t[e])&&void 0!==i?i:{};for(const[t,A]of this.hits.get(e))r[t]=(null!==(s=r[t])&&void 0!==s?s:0)+A}for(const e of["values","enumerators"])for(const t of this[e].keys()){const r=d[e]=null!==(a=d[e])&&void 0!==a?a:{};r[t]=[...new Set([...null!==(c=r[t])&&void 0!==c?c:[],...null!==(g=this[e].get(t))&&void 0!==g?g:[]])]}n.xfs.mkdirSync(o.y1.dirname(l),{recursive:!0}),n.xfs.writeJsonSync(l,u)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch(e){}})}}},33720:(e,t,r)=>{"use strict";r.d(t,{$:()=>n});var A=r(35691);class n extends A.yG{reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t,r){return("function"==typeof t?t:r)()}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r;return await A()}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:()=>s});var A=r(17674),n=r(14626),o=r(46009),i=r(54143);class s{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 A=e.reference.slice(r+1),n=i.makeLocator(e,A);return t.fetcher.getLocalPath(n,t)}async fetch(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const A=e.reference.slice(r+1),n=i.makeLocator(e,A),o=await t.fetcher.fetch(n,t);return await this.ensureVirtualLink(e,o,t)}getLocatorFilename(e){return i.slugifyLocator(e)}async ensureVirtualLink(e,t,r){const i=t.packageFs.getRealPath(),s=r.project.configuration.get("virtualFolder"),a=this.getLocatorFilename(e),c=A.p.makeVirtualPath(s,a,i),g=new n.K(c,{baseFs:t.packageFs,pathUtils:o.y1});return{...t,packageFs:g}}}},17722:(e,t,r)=>{"use strict";r.d(t,{j:()=>h});var A=r(43896),n=r(46009),o=r(58592),i=r.n(o),s=r(53887),a=r.n(s),c=r(46611),g=r(94538),l=r(20624),u=r(54143);class h{constructor(e,{project:t}){this.workspacesCwds=new Set,this.dependencies=new Map,this.project=t,this.cwd=e}async setup(){this.manifest=A.xfs.existsSync(n.y1.join(this.cwd,c.G.fileName))?await c.G.find(this.cwd):new c.G,this.relativeCwd=n.y1.relative(this.project.cwd,this.cwd)||n.LZ.dot;const e=this.manifest.name?this.manifest.name:u.makeIdent(null,`${this.computeCandidateName()}-${l.makeHash(this.relativeCwd).substr(0,6)}`),t=this.manifest.version?this.manifest.version:"0.0.0";this.locator=u.makeLocator(e,t),this.anchoredDescriptor=u.makeDescriptor(this.locator,`${g.d.protocol}${this.relativeCwd}`),this.anchoredLocator=u.makeLocator(this.locator,`${g.d.protocol}${this.relativeCwd}`);const r=this.manifest.workspaceDefinitions.map(({pattern:e})=>e),o=await i()(r,{absolute:!0,cwd:n.cS.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});o.sort();for(const e of o){const t=n.y1.resolve(this.cwd,n.cS.toPortablePath(e));A.xfs.existsSync(n.y1.join(t,"package.json"))&&this.workspacesCwds.add(t)}}accepts(e){const t=e.indexOf(":"),r=-1!==t?e.slice(0,t+1):null,A=-1!==t?e.slice(t+1):e;return r===g.d.protocol&&n.y1.normalize(A)===this.relativeCwd||(r===g.d.protocol&&"*"===A||!!a().validRange(A)&&(r===g.d.protocol?a().satisfies(null!==this.manifest.version?this.manifest.version:"0.0.0",A):!!this.project.configuration.get("enableTransparentWorkspaces")&&(null!==this.manifest.version&&a().satisfies(this.manifest.version,A))))}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":""+n.y1.basename(this.cwd)||"unnamed-workspace"}async persistManifest(){const e={};this.manifest.exportTo(e);const t=n.y1.join(this.cwd,c.G.fileName),r=JSON.stringify(e,null,this.manifest.indent)+"\n";await A.xfs.changeFilePromise(t,r,{automaticNewlines:!0})}}},94538:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});var A=r(32485);class n{supportsDescriptor(e,t){if(e.range.startsWith(n.protocol))return!0;return null!==t.project.tryWorkspaceByDescriptor(e)}supportsLocator(e,t){return!!e.reference.startsWith(n.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 getSatisfying(e,t,r){return null}async resolve(e,t){const r=t.project.getWorkspaceByCwd(e.reference.slice(n.protocol.length));return{...e,version:r.manifest.version||"0.0.0",languageName:"unknown",linkType:A.Un.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}}}n.protocol="workspace:"},59355:(e,t,r)=>{"use strict";r.d(t,{o:()=>A});const A="2.4.1"},6220:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EndStrategy:()=>A,pipevp:()=>g,execvp:()=>l});var A,n=r(46009),o=r(67566),i=r.n(o);function s(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"}(A||(A={}));let c=0;async function g(e,t,{cwd:r,env:o=process.env,strict:g=!1,stdin:l=null,stdout:u,stderr:p,end:d=A.Always}){const C=["pipe","pipe","pipe"];null===l?C[0]="ignore":s(l)&&(C[0]=l),s(u)&&(C[1]=u),s(p)&&(C[2]=p),0==c++&&process.on("SIGINT",a);const f=i()(e,t,{cwd:n.cS.fromPortablePath(r),env:{...o,PWD:n.cS.fromPortablePath(r)},stdio:C});s(l)||null===l||l.pipe(f.stdin),s(u)||f.stdout.pipe(u,{end:!1}),s(p)||f.stderr.pipe(p,{end:!1});const I=()=>{for(const e of new Set([u,p]))s(e)||e.end()};return new Promise((t,r)=>{f.on("error",e=>{0==--c&&process.off("SIGINT",a),d!==A.Always&&d!==A.ErrorCode||I(),r(e)}),f.on("close",(n,o)=>{0==--c&&process.off("SIGINT",a),(d===A.Always||d===A.ErrorCode&&n>0)&&I(),0!==n&&g?r(null!==n?new Error(`Child "${e}" exited with exit code ${n}`):new Error(`Child "${e}" exited with signal ${o}`)):t({code:h(n,o)})})})}async function l(e,t,{cwd:r,env:A=process.env,encoding:o="utf8",strict:s=!1}){const a=["ignore","pipe","pipe"],c=[],g=[],l=n.cS.fromPortablePath(r);void 0!==A.PWD&&(A={...A,PWD:l});const u=i()(e,t,{cwd:l,env:A,stdio:a});return u.stdout.on("data",e=>{c.push(e)}),u.stderr.on("data",e=>{g.push(e)}),await new Promise((t,r)=>{u.on("error",r),u.on("close",(A,n)=>{const i="buffer"===o?Buffer.concat(c):Buffer.concat(c).toString(o),a="buffer"===o?Buffer.concat(g):Buffer.concat(g).toString(o);0!==A&&s?r(Object.assign(new Error(`Child "${e}" exited with exit code ${A}\n\n${a}`),{code:h(A,n),stdout:i,stderr:a})):t({code:h(A,n),stdout:i,stderr:a})})})}const u=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]]);function h(e,t){const r=u.get(t);return void 0!==r?128+r:null!=e?e:1}},81111:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDefaultGlobalFolder:()=>o,getHomeFolder:()=>i,isFolderInside:()=>s});var A=r(46009),n=r(12087);function o(){if("win32"===process.platform){const e=A.cS.toPortablePath(process.env.LOCALAPPDATA||A.cS.join((0,n.homedir)(),"AppData","Local"));return A.y1.resolve(e,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){const e=A.cS.toPortablePath(process.env.XDG_DATA_HOME);return A.y1.resolve(e,"yarn/berry")}return A.y1.resolve(i(),".yarn/berry")}function i(){return A.cS.toPortablePath((0,n.homedir)()||"/usr/local/share")}function s(e,t){const r=A.y1.relative(t,e);return r&&!r.startsWith("..")&&!A.y1.isAbsolute(r)}},71643:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Type:()=>A,Style:()=>n,supportsColor:()=>h,supportsHyperlinks:()=>p,tuple:()=>I,applyStyle:()=>E,applyColor:()=>B,pretty:()=>y,prettyList:()=>m,json:()=>w,mark:()=>Q,LogLevel:()=>D,addLogFilterSupport:()=>b});var A,n,o=r(46009),i=r(95882),s=r.n(i),a=r(92659),c=r(73632),g=r(54143),l=r(32485);!function(e){e.NO_HINT="NO_HINT",e.NULL="NULL",e.SCOPE="SCOPE",e.NAME="NAME",e.RANGE="RANGE",e.REFERENCE="REFERENCE",e.NUMBER="NUMBER",e.PATH="PATH",e.URL="URL",e.ADDED="ADDED",e.REMOVED="REMOVED",e.CODE="CODE",e.DURATION="DURATION",e.SIZE="SIZE",e.IDENT="IDENT",e.DESCRIPTOR="DESCRIPTOR",e.LOCATOR="LOCATOR",e.RESOLUTION="RESOLUTION",e.DEPENDENT="DEPENDENT",e.PACKAGE_EXTENSION="PACKAGE_EXTENSION"}(A||(A={})),function(e){e[e.BOLD=2]="BOLD"}(n||(n={}));const u=process.env.GITHUB_ACTIONS?{level:2}:s().supportsColor?{level:s().supportsColor.level}:{level:0},h=0!==u.level,p=h&&!process.env.GITHUB_ACTIONS,d=new(s().Instance)(u),C=new Map([[A.NO_HINT,null],[A.NULL,["#a853b5",129]],[A.SCOPE,["#d75f00",166]],[A.NAME,["#d7875f",173]],[A.RANGE,["#00afaf",37]],[A.REFERENCE,["#87afff",111]],[A.NUMBER,["#ffd700",220]],[A.PATH,["#d75fd7",170]],[A.URL,["#d75fd7",170]],[A.ADDED,["#5faf00",70]],[A.REMOVED,["#d70000",160]],[A.CODE,["#87afff",111]],[A.SIZE,["#ffd700",220]]]),f={[A.NUMBER]:{pretty:(e,t)=>""+t,json:e=>e},[A.IDENT]:{pretty:(e,t)=>g.prettyIdent(e,t),json:e=>g.stringifyIdent(e)},[A.LOCATOR]:{pretty:(e,t)=>g.prettyLocator(e,t),json:e=>g.stringifyLocator(e)},[A.DESCRIPTOR]:{pretty:(e,t)=>g.prettyDescriptor(e,t),json:e=>g.stringifyDescriptor(e)},[A.RESOLUTION]:{pretty:(e,{descriptor:t,locator:r})=>g.prettyResolution(e,t,r),json:({descriptor:e,locator:t})=>({descriptor:g.stringifyDescriptor(e),locator:null!==t?g.stringifyLocator(t):null})},[A.DEPENDENT]:{pretty:(e,{locator:t,descriptor:r})=>g.prettyDependent(e,t,r),json:({locator:e,descriptor:t})=>({locator:g.stringifyLocator(e),descriptor:g.stringifyDescriptor(t)})},[A.PACKAGE_EXTENSION]:{pretty:(e,t)=>{switch(t.type){case l.HN.Dependency:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"dependencies",A.CODE)} ➤ ${g.prettyIdent(e,t.descriptor)}`;case l.HN.PeerDependency:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"peerDependencies",A.CODE)} ➤ ${g.prettyIdent(e,t.descriptor)}`;case l.HN.PeerDependencyMeta:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"peerDependenciesMeta",A.CODE)} ➤ ${g.prettyIdent(e,g.parseIdent(t.selector))} ➤ ${B(e,t.key,A.CODE)}`;default:throw new Error("Assertion failed: Unsupported package extension type: "+t.type)}},json:e=>{switch(e.type){case l.HN.Dependency:return`${g.stringifyIdent(e.parentDescriptor)} > ${g.stringifyIdent(e.descriptor)}`;case l.HN.PeerDependency:return`${g.stringifyIdent(e.parentDescriptor)} >> ${g.stringifyIdent(e.descriptor)}`;case l.HN.PeerDependencyMeta:return`${g.stringifyIdent(e.parentDescriptor)} >> ${e.selector} / ${e.key}`;default:throw new Error("Assertion failed: Unsupported package extension type: "+e.type)}}},[A.DURATION]:{pretty:(e,t)=>{if(t>6e4){const e=Math.floor(t/1e3/60),r=Math.ceil((t-60*e*1e3)/1e3);return 0===r?e+"m":`${e}m ${r}s`}{const e=Math.floor(t/1e3),r=t-1e3*e;return 0===r?e+"s":`${e}s ${r}ms`}},json:e=>e},[A.SIZE]:{pretty:(e,t)=>{const r=["KB","MB","GB","TB"];let n=r.length;for(;n>1&&t<1024**n;)n-=1;const o=1024**n;return B(e,`${Math.floor(100*t/o)/100} ${r[n-1]}`,A.NUMBER)},json:e=>e},[A.PATH]:{pretty:(e,t)=>B(e,o.cS.fromPortablePath(t),A.PATH),json:e=>o.cS.fromPortablePath(e)}};function I(e,t){return[t,e]}function E(e,t,r){return e.get("enableColors")?(r&n.BOLD&&(t=s().bold(t)),t):t}function B(e,t,r){if(!e.get("enableColors"))return t;const A=C.get(r);if(null===A)return t;const n=void 0===A?r:u.level>=3?A[0]:A[1],o="number"==typeof n?d.ansi256(n):n.startsWith("#")?d.hex(n):d[n];if("function"!=typeof o)throw new Error("Invalid format type "+n);return o(t)}function y(e,t,r){if(null===t)return B(e,"null",A.NULL);if(Object.prototype.hasOwnProperty.call(f,r)){return f[r].pretty(e,t)}if("string"!=typeof t)throw new Error("Assertion failed: Expected the value to be a string, got "+typeof t);return B(e,t,r)}function m(e,t,r,{separator:A=", "}={}){return[...t].map(t=>y(e,t,r)).join(A)}function w(e,t){if(null===e)return null;if(Object.prototype.hasOwnProperty.call(f,t))return c.overrideType(t),f[t].json(e);if("string"!=typeof e)throw new Error("Assertion failed: Expected the value to be a string, got "+typeof e);return e}function Q(e){return{Check:B(e,"✓","green"),Cross:B(e,"✘","red"),Question:B(e,"?","cyan")}}var D;function b(e,{configuration:t}){const r=t.get("logFilters"),A=new Map,n=new Map;for(const e of r){const t=e.get("level");if(void 0===t)continue;const r=e.get("code");void 0!==r&&A.set(r,t);const o=e.get("text");void 0!==o&&n.set(o,t)}const o=e.reportInfo,i=e.reportWarning,c=e.reportError,g=function(e,t,r,g){switch(((e,t,r)=>{if(null===e||e===a.b.UNNAMED)return r;if(n.size>0){const e=n.get(s().reset(t));if(void 0!==e)return null!=e?e:r}if(A.size>0){const t=A.get((0,a.i)(e));if(void 0!==t)return null!=t?t:r}return r})(t,r,g)){case D.Info:o.call(e,t,r);break;case D.Warning:i.call(e,null!=t?t:a.b.UNNAMED,r);break;case D.Error:c.call(e,null!=t?t:a.b.UNNAMED,r)}};e.reportInfo=function(...e){return g(this,...e,D.Info)},e.reportWarning=function(...e){return g(this,...e,D.Warning)},e.reportError=function(...e){return g(this,...e,D.Error)}}!function(e){e.Error="error",e.Warning="warning",e.Info="info",e.Discard="discard"}(D||(D={}))},20624:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeHash:()=>a,checksumFile:()=>c,checksumPattern:()=>g});var A=r(43896),n=r(46009),o=r(76417),i=r(58592),s=r.n(i);function a(...e){const t=(0,o.createHash)("sha512");for(const r of e)t.update(r||"");return t.digest("hex")}function c(e){return new Promise((t,r)=>{const n=(0,o.createHash)("sha512"),i=A.xfs.createReadStream(e);i.on("data",e=>{n.update(e)}),i.on("error",e=>{r(e)}),i.on("end",()=>{t(n.digest("hex"))})})}async function g(e,{cwd:t}){const r=(await s()(e,{cwd:n.cS.fromPortablePath(t),expandDirectories:!1,onlyDirectories:!0,unique:!0})).map(e=>e+"/**/*"),i=await s()([e,...r],{cwd:n.cS.fromPortablePath(t),expandDirectories:!1,onlyFiles:!1,unique:!0});i.sort();const a=await Promise.all(i.map(async e=>{const t=[Buffer.from(e)],r=n.cS.toPortablePath(e),o=await A.xfs.lstatPromise(r);return o.isSymbolicLink()?t.push(Buffer.from(await A.xfs.readlinkPromise(r))):o.isFile()&&t.push(await A.xfs.readFilePromise(r)),t.join("\0")})),c=(0,o.createHash)("sha512");for(const e of a)c.update(e);return c.digest("hex")}},79669:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getNetworkSettings:()=>d,Method:()=>C,request:()=>f,get:()=>I,put:()=>E,post:()=>B,del:()=>y});var A=r(43896),n=r(57211),o=r(98605),i=r(2401),s=r.n(i),a=r(98161),c=r(78835);const g=new Map,l=new Map,u=new o.Agent({keepAlive:!0}),h=new n.Agent({keepAlive:!0});function p(e){const t=new c.URL(e),r={host:t.hostname,headers:{}};return t.port&&(r.port=Number(t.port)),{proxy:r}}function d(e,t){const r=[...t.configuration.get("networkSettings")].sort(([e],[t])=>t.length-e.length),A={enableNetwork:void 0,caFilePath:void 0,httpProxy:void 0,httpsProxy:void 0},n=Object.keys(A),o=new c.URL(e);for(const[e,t]of r)if(s().isMatch(o.hostname,e))for(const e of n){const r=t.get(e);null!==r&&void 0===A[e]&&(A[e]=r)}for(const e of n)void 0===A[e]&&(A[e]=t.configuration.get(e));return A}var C;async function f(e,t,{configuration:n,headers:o,json:i,jsonRequest:g=i,jsonResponse:f=i,method:I=C.GET}){const E=d(e,{configuration:n});if(!1===E.enableNetwork)throw new Error(`Request to '${e}' has been blocked because of your configuration settings`);const B=new c.URL(e);if("http:"===B.protocol&&!s().isMatch(B.hostname,n.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${B.hostname})`);const y={agent:{http:E.httpProxy?a.httpOverHttp(p(E.httpProxy)):u,https:E.httpsProxy?a.httpsOverHttp(p(E.httpsProxy)):h},headers:o,method:I};y.responseType=f?"json":"buffer",null!==t&&(Buffer.isBuffer(t)||!g&&"string"==typeof t?y.body=t:y.json=t);const m=n.get("httpTimeout"),w=n.get("httpRetry"),Q=n.get("enableStrictSsl"),D=E.caFilePath,{default:b}=await Promise.resolve().then(r.t.bind(r,48722,7)),v=D?await async function(e){let t=l.get(e);return t||(t=A.xfs.readFilePromise(e).then(t=>(l.set(e,t),t)),l.set(e,t)),t}(D):void 0,S=b.extend({timeout:{socket:m},retry:w,https:{rejectUnauthorized:Q,certificateAuthority:v},...y});return n.getLimit("networkConcurrency")(()=>S(e))}async function I(e,{configuration:t,json:r,jsonResponse:A=r,...n}){let o=g.get(e);return o||(o=f(e,null,{configuration:t,...n}).then(t=>(g.set(e,t.body),t.body)),g.set(e,o)),!1===Buffer.isBuffer(o)&&(o=await o),A?JSON.parse(o.toString()):o}async function E(e,t,r){return(await f(e,t,{...r,method:C.PUT})).body}async function B(e,t,r){return(await f(e,t,{...r,method:C.POST})).body}async function y(e,t){return(await f(e,null,{...t,method:C.DELETE})).body}!function(e){e.GET="GET",e.PUT="PUT",e.POST="POST",e.DELETE="DELETE"}(C||(C={}))},53836:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cache:()=>p.C,DEFAULT_RC_FILENAME:()=>d.tr,DEFAULT_LOCK_FILENAME:()=>d.nh,Configuration:()=>d.VK,FormatType:()=>d.a5,ProjectLookup:()=>d.EW,SettingsType:()=>d.a2,BuildType:()=>C.k,LightReport:()=>f.h,Manifest:()=>I.G,MessageName:()=>E.b,Project:()=>B.I,TAG_REGEXP:()=>y.c,ReportError:()=>m.lk,Report:()=>m.yG,StreamReport:()=>w.Pk,TelemetryManager:()=>Q.E,ThrowReport:()=>D.$,VirtualFetcher:()=>b.N,WorkspaceResolver:()=>v.d,Workspace:()=>S.j,YarnVersion:()=>k.o,LinkType:()=>N.Un,PackageExtensionType:()=>N.HN,PackageExtensionStatus:()=>N._u,hashUtils:()=>i,httpUtils:()=>s,execUtils:()=>A,folderUtils:()=>n,formatUtils:()=>o,miscUtils:()=>a,scriptUtils:()=>c,semverUtils:()=>g,structUtils:()=>l,tgzUtils:()=>u,treeUtils:()=>h});var A=r(6220),n=r(81111),o=r(71643),i=r(20624),s=r(79669),a=r(73632),c=r(63088),g=r(36545),l=r(54143),u=r(72785),h=r(85875),p=r(28148),d=r(39922),C=r(92409),f=r(62152),I=r(46611),E=r(92659),B=r(85824),y=r(52779),m=r(35691),w=r(15815),Q=r(81832),D=r(33720),b=r(60895),v=r(94538),S=r(17722),k=r(59355),N=r(32485)},73632:(e,t,r)=>{"use strict";r.r(t),r.d(t,{escapeRegExp:()=>a,overrideType:()=>c,assertNever:()=>g,validateEnum:()=>l,mapAndFilter:()=>u,mapAndFind:()=>p,isIndexableObject:()=>C,convertMapsToIndexableObjects:()=>f,getFactoryWithDefault:()=>I,getArrayWithDefault:()=>E,getSetWithDefault:()=>B,getMapWithDefault:()=>y,releaseAfterUseAsync:()=>m,prettifyAsyncErrors:()=>w,prettifySyncErrors:()=>Q,bufferStream:()=>D,BufferStream:()=>b,DefaultStream:()=>v,dynamicRequire:()=>S,dynamicRequireNoCache:()=>k,sortMap:()=>N,buildIgnorePattern:()=>F,replaceEnvVariables:()=>K,parseBoolean:()=>M,parseOptionalBoolean:()=>R,tryParseOptionalBoolean:()=>x});var A=r(46009),n=r(40822),o=r(2401),i=r.n(o),s=r(92413);function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(e){}function g(e){throw new Error(`Assertion failed: Unexpected object '${e}'`)}function l(e,t){if(!Object.values(e).includes(t))throw new Error("Assertion failed: Invalid value for enumeration");return t}function u(e,t){const r=[];for(const A of e){const e=t(A);e!==h&&r.push(e)}return r}e=r.hmd(e);const h=Symbol();function p(e,t){for(const r of e){const e=t(r);if(e!==d)return e}}u.skip=h;const d=Symbol();function C(e){return"object"==typeof e&&null!==e}function f(e){if(e instanceof Map&&(e=Object.fromEntries(e)),C(e))for(const t of Object.keys(e)){const r=e[t];C(r)&&(e[t]=f(r))}return e}function I(e,t,r){let A=e.get(t);return void 0===A&&e.set(t,A=r()),A}function E(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=[]),r}function B(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Set),r}function y(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Map),r}async function m(e,t){if(null==t)return await e();try{return await e()}finally{await t()}}async function w(e,t){try{return await e()}catch(e){throw e.message=t(e.message),e}}function Q(e,t){try{return e()}catch(e){throw e.message=t(e.message),e}}async function D(e){return await new Promise((t,r)=>{const A=[];e.on("error",e=>{r(e)}),e.on("data",e=>{A.push(e)}),e.on("end",()=>{t(Buffer.concat(A))})})}p.skip=d;class b extends s.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 v extends s.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 S(e){return"undefined"!=typeof require?require(e):r(32178)(e)}function k(t){const n=A.cS.fromPortablePath(t),o=r.c[n];let i;delete r.c[n];try{i=S(n);const t=r.c[n],A=e.children.indexOf(t);-1!==A&&e.children.splice(A,1)}finally{r.c[n]=o}return i}function N(e,t){const r=Array.from(e);Array.isArray(t)||(t=[t]);const A=[];for(const e of t)A.push(r.map(t=>e(t)));const n=r.map((e,t)=>t);return n.sort((e,t)=>{for(const r of A){const A=r[e]<r[t]?-1:r[e]>r[t]?1:0;if(0!==A)return A}return 0}),n.map(e=>r[e])}function F(e){return 0===e.length?null:e.map(e=>`(${i().makeRe(e,{windows:!1}).source})`).join("|")}function K(e,{env:t}){return e.replace(/\${(?<variableName>[\d\w_]+)(?<colon>:)?(?:-(?<fallback>[^}]*))?}/g,(...e)=>{const{variableName:r,colon:A,fallback:o}=e[e.length-1],i=Object.prototype.hasOwnProperty.call(t,r),s=t[r];if(s)return s;if(i&&!A)return s;if(null!=o)return o;throw new n.UsageError(`Environment variable not found (${r})`)})}function M(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`)}}function R(e){return void 0===e?e:M(e)}function x(e){try{return R(e)}catch(e){return null}}},63088:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeScriptEnv:()=>b,prepareExternalProject:()=>S,hasPackageScript:()=>k,executePackageScript:()=>N,executePackageShellcode:()=>F,executeWorkspaceScript:()=>M,hasWorkspaceScript:()=>R,executeWorkspaceLifecycleScript:()=>x,maybeExecuteWorkspaceLifecycleScript:()=>L,getPackageAccessibleBinaries:()=>P,getWorkspaceAccessibleBinaries:()=>O,executePackageAccessibleBinary:()=>U,executeWorkspaceAccessibleBinary:()=>T});var A,n=r(46009),o=r(53660),i=r(75448),s=r(43896),a=r(65281),c=r(76756),g=r(50730),l=r(61814),u=r.n(l),h=r(61578),p=r.n(h),d=r(92413),C=r(46611),f=r(92659),I=r(35691),E=r(15815),B=r(59355),y=r(6220),m=r(71643),w=r(73632),Q=r(54143);async function D(e,t,r,A=[]){"win32"===process.platform&&await Promise.all([s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".exe"}),(0,g.O9)()),s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".exe.info"}),[r,...A].join("\n")),s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".cmd"}),`@"${r}" ${A.map(e=>`"${e.replace('"','""')}"`).join(" ")} %*\n`)]),await s.xfs.writeFilePromise(n.y1.join(e,t),`#!/bin/sh\nexec "${r}" ${A.map(e=>`'${e.replace(/'/g,"'\"'\"'")}'`).join(" ")} "$@"\n`),await s.xfs.chmodPromise(n.y1.join(e,t),493)}async function b({project:e,binFolder:t,lifecycleScript:r}){const A={};for(const[e,t]of Object.entries(process.env))void 0!==t&&(A["path"!==e.toLowerCase()?e:"PATH"]=t);const o=n.cS.fromPortablePath(t);A.BERRY_BIN_FOLDER=n.cS.fromPortablePath(o),await D(t,"node",process.execPath),null!==B.o&&(await D(t,"run",process.execPath,[process.argv[1],"run"]),await D(t,"yarn",process.execPath,[process.argv[1]]),await D(t,"yarnpkg",process.execPath,[process.argv[1]]),await D(t,"node-gyp",process.execPath,[process.argv[1],"run","--top-level","node-gyp"])),e&&(A.INIT_CWD=n.cS.fromPortablePath(e.configuration.startingCwd)),A.PATH=A.PATH?`${o}${n.cS.delimiter}${A.PATH}`:""+o,A.npm_execpath=`${o}${n.cS.sep}yarn`,A.npm_node_execpath=`${o}${n.cS.sep}node`;const i=null!==B.o?"yarn/"+B.o:`yarn/${w.dynamicRequire("@yarnpkg/core").version}-core`;return A.npm_config_user_agent=`${i} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,r&&(A.npm_lifecycle_event=r),e&&await e.configuration.triggerHook(e=>e.setupScriptEnvironment,e,A,async(e,r,A)=>await D(t,(0,n.Zu)(e),r,A)),A}!function(e){e.Yarn1="Yarn Classic",e.Yarn2="Yarn",e.Npm="npm",e.Pnpm="pnpm"}(A||(A={}));const v=p()(2);async function S(e,t,{configuration:r,report:o,workspace:i=null}){await v(async()=>{await s.xfs.mktempPromise(async a=>{const c=n.y1.join(a,"pack.log"),{stdout:g,stderr:l}=r.getSubprocessStreams(c,{prefix:e,report:o}),u=await async function(e){let t=null;try{t=await s.xfs.readFilePromise(n.y1.join(e,n.QS.lockfile),"utf8")}catch(e){}return null!==t?t.match(/^__metadata:$/m)?A.Yarn2:A.Yarn1:s.xfs.existsSync(n.y1.join(e,"package-lock.json"))?A.Npm:s.xfs.existsSync(n.y1.join(e,"pnpm-lock.yaml"))?A.Pnpm:null}(e);let h;null!==u?(g.write(`Installing the project using ${u}\n\n`),h=u):(g.write("No package manager detected; defaulting to Yarn\n\n"),h=A.Yarn2),await s.xfs.mktempPromise(async r=>{const o=await b({binFolder:r}),u=new Map([[A.Yarn1,async()=>{const r=null!==i?["workspace",i]:[],A=await y.pipevp("yarn",["set","version","classic","--only-if-needed"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==A.code)return A.code;await s.xfs.appendFilePromise(n.y1.join(e,".npmignore"),"/.yarn\n"),g.write("\n");const a=await y.pipevp("yarn",["install"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==a.code)return a.code;g.write("\n");const c=await y.pipevp("yarn",[...r,"pack","--filename",n.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:g,stderr:l});return 0!==c.code?c.code:0}],[A.Yarn2,async()=>{const r=null!==i?["workspace",i]:[];o.YARN_ENABLE_INLINE_BUILDS="1";const A=n.y1.join(e,n.QS.lockfile);await s.xfs.existsPromise(A)||await s.xfs.writeFilePromise(A,"");const a=await y.pipevp("yarn",[...r,"pack","--install-if-needed","--filename",n.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:g,stderr:l});return 0!==a.code?a.code:0}],[A.Npm,async()=>{if(null!==i)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 y.pipevp("npm",["install"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==r.code)return r.code;const A=new d.PassThrough,a=w.bufferStream(A);A.pipe(g);const c=await y.pipevp("npm",["pack","--silent"],{cwd:e,env:o,stdin:null,stdout:A,stderr:l});if(0!==c.code)return c.code;const u=(await a).toString().trim(),h=n.y1.resolve(e,n.cS.toPortablePath(u));return await s.xfs.renamePromise(h,t),0}]]).get(h);if(void 0===u)throw new Error("Assertion failed: Unsupported workflow");const p=await u();if(0!==p&&void 0!==p)throw s.xfs.detachTemp(a),new I.lk(f.b.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${p}, logs can be found here: ${c})`)})})})}async function k(e,t,{project:r}){const A=r.storedPackages.get(e.locatorHash);if(!A)throw new Error(`Package for ${Q.prettyLocator(r.configuration,e)} not found in the project`);return await o.A.openPromise(async e=>{const o=r.configuration,s=r.configuration.getLinkers(),a={project:r,report:new E.Pk({stdout:new d.PassThrough,configuration:o})},c=s.find(e=>e.supportsPackage(A,a));if(!c)throw new Error(`The package ${Q.prettyLocator(r.configuration,A)} isn't supported by any of the available linkers`);const g=await c.findPackageLocation(A,a),l=new i.M(g,{baseFs:e});return(await C.G.find(n.LZ.dot,{baseFs:l})).scripts.has(t)},{libzip:await(0,a.getLibzipPromise)()})}async function N(e,t,r,{cwd:A,project:n,stdin:o,stdout:i,stderr:a}){return await s.xfs.mktempPromise(async s=>{const{manifest:g,env:l,cwd:u}=await K(e,{project:n,binFolder:s,cwd:A,lifecycleScript:t}),h=g.scripts.get(t);if(void 0===h)return 1;const p=await n.configuration.reduceHook(e=>e.wrapScriptExecution,async()=>await(0,c.execute)(h,r,{cwd:u,env:l,stdin:o,stdout:i,stderr:a}),n,e,t,{script:h,args:r,cwd:u,env:l,stdin:o,stdout:i,stderr:a});return await p()})}async function F(e,t,r,{cwd:A,project:n,stdin:o,stdout:i,stderr:a}){return await s.xfs.mktempPromise(async s=>{const{env:g,cwd:l}=await K(e,{project:n,binFolder:s,cwd:A});return await(0,c.execute)(t,r,{cwd:l,env:g,stdin:o,stdout:i,stderr:a})})}async function K(e,{project:t,binFolder:r,cwd:A,lifecycleScript:s}){const c=t.storedPackages.get(e.locatorHash);if(!c)throw new Error(`Package for ${Q.prettyLocator(t.configuration,e)} not found in the project`);return await o.A.openPromise(async o=>{const a=t.configuration,g=t.configuration.getLinkers(),l={project:t,report:new E.Pk({stdout:new d.PassThrough,configuration:a})},u=g.find(e=>e.supportsPackage(c,l));if(!u)throw new Error(`The package ${Q.prettyLocator(t.configuration,c)} isn't supported by any of the available linkers`);const h=await b({project:t,binFolder:r,lifecycleScript:s});await Promise.all(Array.from(await P(e,{project:t}),([e,[,t]])=>D(r,(0,n.Zu)(e),process.execPath,[t])));const p=await u.findPackageLocation(c,l),f=new i.M(p,{baseFs:o}),I=await C.G.find(n.LZ.dot,{baseFs:f});return void 0===A&&(A=p),{manifest:I,binFolder:r,env:h,cwd:A}},{libzip:await(0,a.getLibzipPromise)()})}async function M(e,t,r,{cwd:A,stdin:n,stdout:o,stderr:i}){return await N(e.anchoredLocator,t,r,{cwd:A,project:e.project,stdin:n,stdout:o,stderr:i})}function R(e,t){return e.manifest.scripts.has(t)}async function x(e,t,{cwd:r,report:A}){const{configuration:o}=e.project;await s.xfs.mktempPromise(async i=>{const a=n.y1.join(i,t+".log"),c=`# This file contains the result of Yarn calling the "${t}" lifecycle script inside a workspace ("${e.cwd}")\n`,{stdout:g,stderr:l}=o.getSubprocessStreams(a,{report:A,prefix:Q.prettyLocator(o,e.anchoredLocator),header:c});A.reportInfo(f.b.LIFECYCLE_SCRIPT,`Calling the "${t}" lifecycle script`);const h=await M(e,t,[],{cwd:r,stdin:null,stdout:g,stderr:l});if(g.end(),l.end(),0!==h)throw s.xfs.detachTemp(i),new I.lk(f.b.LIFECYCLE_SCRIPT,`${u()(t)} script failed (exit code ${m.pretty(o,h,m.Type.NUMBER)}, logs can be found here: ${m.pretty(o,a,m.Type.PATH)}); run ${m.pretty(o,"yarn "+t,m.Type.CODE)} to investigate`)})}async function L(e,t,r){R(e,t)&&await x(e,t,r)}async function P(e,{project:t}){const r=t.configuration,A=new Map,o=t.storedPackages.get(e.locatorHash);if(!o)throw new Error(`Package for ${Q.prettyLocator(r,e)} not found in the project`);const i=new d.Writable,s=r.getLinkers(),a={project:t,report:new E.Pk({configuration:r,stdout:i})},c=new Set([e.locatorHash]);for(const e of o.dependencies.values()){const A=t.storedResolutions.get(e.descriptorHash);if(!A)throw new Error(`Assertion failed: The resolution (${Q.prettyDescriptor(r,e)}) should have been registered`);c.add(A)}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=s.find(e=>e.supportsPackage(r,a));if(!o)continue;let i=null;try{i=await o.findPackageLocation(r,a)}catch(e){if("LOCATOR_NOT_INSTALLED"===e.code)continue;throw e}for(const[e,t]of r.bin)A.set(e,[r,n.cS.fromPortablePath(n.y1.resolve(i,t))])}return A}async function O(e){return await P(e.anchoredLocator,{project:e.project})}async function U(e,t,r,{cwd:A,project:o,stdin:i,stdout:a,stderr:c,nodeArgs:g=[]}){const l=await P(e,{project:o}),u=l.get(t);if(!u)throw new Error(`Binary not found (${t}) for ${Q.prettyLocator(o.configuration,e)}`);return await s.xfs.mktempPromise(async e=>{const[,t]=u,h=await b({project:o,binFolder:e});let p;await Promise.all(Array.from(l,([e,[,t]])=>D(h.BERRY_BIN_FOLDER,(0,n.Zu)(e),process.execPath,[t])));try{p=await y.pipevp(process.execPath,[...g,t,...r],{cwd:A,env:h,stdin:i,stdout:a,stderr:c})}finally{await s.xfs.removePromise(h.BERRY_BIN_FOLDER)}return p.code})}async function T(e,t,r,{cwd:A,stdin:n,stdout:o,stderr:i}){return await U(e.anchoredLocator,t,r,{project:e.project,cwd:A,stdin:n,stdout:o,stderr:i})}},36545:(e,t,r)=>{"use strict";r.r(t),r.d(t,{satisfiesWithPrereleases:()=>o,validRange:()=>s});var A=r(53887),n=r.n(A);function o(e,t,r=!1){let A,o;try{A=new(n().Range)(t,{includePrerelease:!0,loose:r})}catch(e){return!1}if(!e)return!1;try{o=new(n().SemVer)(e,A),o.prerelease&&(o.prerelease=[])}catch(e){return!1}return A.set.some(e=>{for(const t of e)t.semver.prerelease&&(t.semver.prerelease=[]);return e.every(e=>e.test(o))})}const i=new Map;function s(e){if(-1!==e.indexOf(":"))return null;let t=i.get(e);if(void 0!==t)return t;try{t=new(n().Range)(e)}catch(e){t=null}return i.set(e,t),t}},54143:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeIdent:()=>u,makeDescriptor:()=>h,makeLocator:()=>p,convertToIdent:()=>d,convertDescriptorToLocator:()=>C,convertLocatorToDescriptor:()=>f,convertPackageToLocator:()=>I,renamePackage:()=>E,copyPackage:()=>B,virtualizeDescriptor:()=>y,virtualizePackage:()=>m,isVirtualDescriptor:()=>w,isVirtualLocator:()=>Q,devirtualizeDescriptor:()=>D,devirtualizeLocator:()=>b,bindDescriptor:()=>v,bindLocator:()=>S,areIdentsEqual:()=>k,areDescriptorsEqual:()=>N,areLocatorsEqual:()=>F,areVirtualPackagesEquivalent:()=>K,parseIdent:()=>M,tryParseIdent:()=>R,parseDescriptor:()=>x,tryParseDescriptor:()=>L,parseLocator:()=>P,tryParseLocator:()=>O,parseRange:()=>U,parseFileStyleRange:()=>T,makeRange:()=>Y,convertToManifestRange:()=>G,requirableIdent:()=>H,stringifyIdent:()=>J,stringifyDescriptor:()=>q,stringifyLocator:()=>z,slugifyIdent:()=>W,slugifyLocator:()=>V,prettyIdent:()=>X,prettyRange:()=>Z,prettyDescriptor:()=>$,prettyReference:()=>ee,prettyLocator:()=>te,prettyLocatorNoColors:()=>re,sortDescriptors:()=>Ae,prettyWorkspace:()=>ne,prettyResolution:()=>oe,prettyDependent:()=>ie,getIdentVendorPath:()=>se});var A=r(46009),n=r(71191),o=r.n(n),i=r(53887),s=r.n(i),a=r(71643),c=r(20624),g=r(73632),l=r(54143);function u(e,t){if(null==e?void 0:e.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");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 p(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:c.makeHash(e.identHash,t),reference:t}}function d(e){return{identHash:e.identHash,scope:e.scope,name:e.name}}function C(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.descriptorHash,reference:e.range}}function f(e){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:e.locatorHash,range:e.reference}}function I(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 B(e){return E(e,e)}function y(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return h(e,`virtual:${t}#${e.range}`)}function m(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return E(e,p(e,`virtual:${t}#${e.reference}`))}function w(e){return e.range.startsWith("virtual:")}function Q(e){return e.reference.startsWith("virtual:")}function D(e){if(!w(e))throw new Error("Not a virtual descriptor");return h(e,e.range.replace(/^[^#]*#/,""))}function b(e){if(!Q(e))throw new Error("Not a virtual descriptor");return p(e,e.reference.replace(/^[^#]*#/,""))}function v(e,t){return e.range.includes("::")?e:h(e,`${e.range}::${o().stringify(t)}`)}function S(e,t){return e.reference.includes("::")?e:p(e,`${e.reference}::${o().stringify(t)}`)}function k(e,t){return e.identHash===t.identHash}function N(e,t){return e.descriptorHash===t.descriptorHash}function F(e,t){return e.locatorHash===t.locatorHash}function K(e,t){if(!Q(e))throw new Error("Invalid package type");if(!Q(t))throw new Error("Invalid package type");if(!k(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(!N(r,e))return!1}return!0}function M(e){const t=R(e);if(!t)throw new Error(`Invalid ident (${e})`);return t}function R(e){const t=e.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!t)return null;const[,r,A]=t;return u(void 0!==r?r:null,A)}function x(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[,A,n,o]=r;if("unknown"===o)throw new Error(`Invalid range (${e})`);const i=void 0!==o?o:"unknown";return h(u(void 0!==A?A:null,n),i)}function P(e,t=!1){const r=O(e,t);if(!r)throw new Error(`Invalid locator (${e})`);return r}function O(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,A,n,o]=r;if("unknown"===o)throw new Error(`Invalid reference (${e})`);const i=void 0!==o?o:"unknown";return p(u(void 0!==A?A:null,n),i)}function U(e,t){const r=e.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(null===r)throw new Error(`Invalid range (${e})`);const A=void 0!==r[1]?r[1]:null;if("string"==typeof(null==t?void 0:t.requireProtocol)&&A!==t.requireProtocol)throw new Error(`Invalid protocol (${A})`);if((null==t?void 0:t.requireProtocol)&&null===A)throw new Error(`Missing protocol (${A})`);const n=void 0!==r[3]?decodeURIComponent(r[2]):null;if((null==t?void 0:t.requireSource)&&null===n)throw new Error(`Missing source (${e})`);const i=void 0!==r[3]?decodeURIComponent(r[3]):decodeURIComponent(r[2]);return{protocol:A,source:n,selector:(null==t?void 0:t.parseSelector)?o().parse(i):i,params:void 0!==r[4]?o().parse(r[4]):null}}function T(e,{protocol:t}){const{selector:r,params:A}=U(e,{requireProtocol:t,requireBindings:!0});if("string"!=typeof A.locator)throw new Error("Assertion failed: Invalid bindings for "+e);return{parentLocator:P(A.locator,!0),path:r}}function j(e){return e=(e=(e=e.replace(/%/g,"%25")).replace(/:/g,"%3A")).replace(/#/g,"%23")}function Y({protocol:e,source:t,selector:r,params:A}){let n="";return null!==e&&(n+=""+e),null!==t&&(n+=j(t)+"#"),n+=j(r),function(e){return null!==e&&Object.entries(e).length>0}(A)&&(n+="::"+o().stringify(A)),n}function G(e){const{params:t,protocol:r,source:A,selector:n}=U(e);for(const e in t)e.startsWith("__")&&delete t[e];return Y({protocol:r,source:A,params:t,selector:n})}function H(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function J(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function q(e){return e.scope?`@${e.scope}/${e.name}@${e.range}`:`${e.name}@${e.range}`}function z(e){return e.scope?`@${e.scope}/${e.name}@${e.reference}`:`${e.name}@${e.reference}`}function W(e){return null!==e.scope?`@${e.scope}-${e.name}`:e.name}function V(e){const{protocol:t,selector:r}=U(e.reference),n=null!==t?t.replace(/:$/,""):"exotic",o=s().valid(r),i=null!==o?`${n}-${o}`:""+n,a=(e.scope,`${W(e)}-${i}-${e.locatorHash.slice(0,10)}`);return(0,A.Zu)(a)}function X(e,t){return t.scope?`${a.pretty(e,`@${t.scope}/`,a.Type.SCOPE)}${a.pretty(e,t.name,a.Type.NAME)}`:""+a.pretty(e,t.name,a.Type.NAME)}function _(e){if(e.startsWith("virtual:")){return`${_(e.substr(e.indexOf("#")+1))} [${e.substr("virtual:".length,5)}]`}return e.replace(/\?.*/,"?[...]")}function Z(e,t){return""+a.pretty(e,_(t),a.Type.RANGE)}function $(e,t){return`${X(e,t)}${a.pretty(e,"@",a.Type.RANGE)}${Z(e,t.range)}`}function ee(e,t){return""+a.pretty(e,_(t),a.Type.REFERENCE)}function te(e,t){return`${X(e,t)}${a.pretty(e,"@",a.Type.REFERENCE)}${ee(e,t.reference)}`}function re(e){return`${J(e)}@${_(e.reference)}`}function Ae(e){return g.sortMap(e,[e=>J(e),e=>e.range])}function ne(e,t){return X(e,t.locator)}function oe(e,t,r){const A=w(t)?D(t):t;return null===r?`${l.prettyDescriptor(e,A)} → ${a.mark(e).Cross}`:A.identHash===r.identHash?`${l.prettyDescriptor(e,A)} → ${ee(e,r.reference)}`:`${l.prettyDescriptor(e,A)} → ${te(e,r)}`}function ie(e,t,r){return null===r?""+te(e,t):`${te(e,t)} (via ${l.prettyRange(e,r.range)})`}function se(e){return"node_modules/"+H(e)}},72785:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeArchiveFromDirectory:()=>h,convertToZip:()=>p,extractArchiveTo:()=>d});var A=r(78420),n=r(46009),o=r(90739),i=r(43896),s=r(65281),a=r(59938),c=r(31669),g=r(78761),l=r.n(g);const u=(0,c.promisify)(l().gunzip);async function h(e,{baseFs:t=new A.S,prefixPath:r=n.LZ.root,compressionLevel:a,inMemory:c=!1}={}){const g=await(0,s.getLibzipPromise)();let l;if(c)l=new o.d(null,{libzip:g,level:a});else{const e=await i.xfs.mktempPromise(),t=n.y1.join(e,"archive.zip");l=new o.d(t,{create:!0,libzip:g,level:a})}const u=n.y1.resolve(n.LZ.root,r);return await l.copyPromise(u,e,{baseFs:t,stableTime:!0,stableSort:!0}),l}async function p(e,t){const r=await i.xfs.mktempPromise(),A=n.y1.join(r,"archive.zip"),{compressionLevel:a,...c}=t;return await d(e,new o.d(A,{create:!0,libzip:await(0,s.getLibzipPromise)(),level:a}),c)}async function d(e,t,{stripComponents:r=0,prefixPath:A=n.LZ.dot}={}){const o=a.extract();o.on("entry",(e,o,i)=>{var s,a;if(function(e){if("/"===e.name[0])return!0;const t=e.name.split(/\//g);return!!t.some(e=>".."===e)||t.length<=r}(e))return void i();const c=n.y1.normalize(n.cS.toPortablePath(e.name)).replace(/\/$/,"").split(/\//g);if(c.length<=r)return o.resume(),void i();const g=c.slice(r).join("/"),l=n.y1.join(A,g);let u=420;switch("directory"!==e.type&&0==(73&(null!==(s=e.mode)&&void 0!==s?s:0))||(u|=73),e.type){case"directory":t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]}),t.mkdirSync(l),t.chmodSync(l,u),t.utimesSync(l,315532800,315532800),i();break;case"file":{t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]});const e=[];o.on("data",t=>e.push(t)),o.on("end",()=>{t.writeFileSync(l,Buffer.concat(e)),t.chmodSync(l,u),t.utimesSync(l,315532800,315532800),i()})}break;case"symlink":t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]}),t.symlinkSync(e.linkname,l),null===(a=t.lutimesSync)||void 0===a||a.call(t,l,315532800,315532800),i();break;default:o.resume(),i()}});const i=await u(e);return await new Promise((e,r)=>{o.on("error",e=>{r(e)}),o.on("finish",()=>{e(t)}),o.end(i)})}},85875:(e,t,r)=>{"use strict";r.r(t),r.d(t,{treeNodeToTreeify:()=>o,treeNodeToJson:()=>i,emitList:()=>s,emitTree:()=>a});var A=r(94682),n=r(71643);function o(e,{configuration:t}){const r={},A=(e,r)=>{const o=Array.isArray(e)?e.entries():Object.entries(e);for(const[e,{label:i,value:s,children:a}]of o){const o=[];void 0!==i&&o.push(n.applyStyle(t,i,n.Style.BOLD)),void 0!==s&&o.push(n.pretty(t,s[0],s[1])),0===o.length&&o.push(n.applyStyle(t,""+e,n.Style.BOLD));const c=r[o.join(": ")]={};void 0!==a&&A(a,c)}};if(void 0===e.children)throw new Error("The root node must only contain children");return A(e.children,r),r}function i(e){const t=e=>{var r;if(void 0===e.children){if(void 0===e.value)throw new Error("Assertion failed: Expected a value to be set if the children are missing");return n.json(e.value[0],e.value[1])}const A=Array.isArray(e.children)?e.children.entries():Object.entries(null!==(r=e.children)&&void 0!==r?r:{}),o=Array.isArray(e.children)?[]:{};for(const[e,r]of A)o[e]=t(r);return void 0===e.value?o:{value:n.json(e.value[0],e.value[1]),children:o}};return t(e)}function s(e,{configuration:t,stdout:r,json:A}){a({children:e.map(e=>({value:e}))},{configuration:t,stdout:r,json:A})}function a(e,{configuration:t,stdout:r,json:n,separators:s=0}){var a;if(n){const t=Array.isArray(e.children)?e.children.values():Object.values(null!==(a=e.children)&&void 0!==a?a:{});for(const e of t)r.write(JSON.stringify(i(e))+"\n");return}let c=(0,A.asTree)(o(e,{configuration:t}),!1,!1);if(s>=1&&(c=c.replace(/^([├└]─)/gm,"│\n$1").replace(/^│\n/,"")),s>=2)for(let e=0;e<2;++e)c=c.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,"$1$3 │\n$2").replace(/^│\n/,"");if(s>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(c)}},32485:(e,t,r)=>{"use strict";var A,n,o;r.d(t,{Un:()=>A,HN:()=>n,_u:()=>o}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(A||(A={})),function(e){e.Dependency="Dependency",e.PeerDependency="PeerDependency",e.PeerDependencyMeta="PeerDependencyMeta"}(n||(n={})),function(e){e.Inactive="inactive",e.Redundant="redundant",e.Active="active"}(o||(o={}))},14626:(e,t,r)=>{"use strict";r.d(t,{K:()=>n});var A=r(42096);class n extends A.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:()=>i});var A=r(78420),n=r(42096),o=r(46009);class i extends n.p{constructor(e,{baseFs:t=new A.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)}}},5944:(e,t,r)=>{"use strict";r.d(t,{fS:()=>g,uY:()=>c,qH:()=>l});var A=r(12087),n=r(35747),o=r.n(n),i=r(46009);const s=new Date(3155328e5);async function a(e,t,r,A,n,c,g,l){var u,h;const p=await async function(e,t){try{return await e.lstatPromise(t)}catch(e){return null}}(A,n),d=await c.lstatPromise(g),C=l.stableTime?{mtime:s,atime:s}:d;let f;switch(!0){case d.isDirectory():f=await async function(e,t,r,A,n,o,i,s,c,g){if(null!==o&&!o.isDirectory()){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),o=null}let l=!1;null===o&&(e.push(async()=>A.mkdirPromise(n,{mode:c.mode})),l=!0);const u=await i.readdirPromise(s);if(g.stableSort)for(const o of u.sort())await a(e,t,r,A,A.pathUtils.join(n,o),i,i.pathUtils.join(s,o),g)&&(l=!0);else{(await Promise.all(u.map(async o=>{await a(e,t,r,A,A.pathUtils.join(n,o),i,i.pathUtils.join(s,o),g)}))).some(e=>e)&&(l=!0)}return l}(e,t,r,A,n,p,c,g,d,l);break;case d.isFile():f=await async function(e,t,r,A,n,i,s,a,c,g){if(null!==i){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),i=null}const l=A===s?async()=>A.copyFilePromise(a,n,o().constants.COPYFILE_FICLONE):async()=>A.writeFilePromise(n,await s.readFilePromise(a));return e.push(async()=>l()),!0}(e,0,0,A,n,p,c,g,0,l);break;case d.isSymbolicLink():f=await async function(e,t,r,A,n,o,s,a,c,g){if(null!==o){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),o=null}return e.push(async()=>{await A.symlinkPromise((0,i.CI)(A.pathUtils,await s.readlinkPromise(a)),n)}),!0}(e,0,0,A,n,p,c,g,0,l);break;default:throw new Error(`Unsupported file type (${d.mode})`)}return(f||(null===(u=null==p?void 0:p.mtime)||void 0===u?void 0:u.getTime())!==C.mtime.getTime()||(null===(h=null==p?void 0:p.atime)||void 0===h?void 0:h.getTime())!==C.atime.getTime())&&(t.push(()=>r(n,C.atime,C.mtime)),f=!0),null!==p&&(511&p.mode)==(511&d.mode)||(t.push(()=>A.chmodPromise(n,511&d.mode)),f=!0),f}class c{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:t=!1}={}){const r=[e];for(;r.length>0;){const e=r.shift();if((await this.lstatPromise(e)).isDirectory()){const A=await this.readdirPromise(e);if(!t)throw new Error("Not supported");for(const t of A.sort())r.push(this.pathUtils.join(e,t))}else yield e}}async removePromise(e,{recursive:t=!0,maxRetries:r=5}={}){let A;try{A=await this.lstatPromise(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(A.isDirectory()){if(t)for(const t of await this.readdirPromise(e))await this.removePromise(this.pathUtils.resolve(e,t));let A=0;do{try{await this.rmdirPromise(e);break}catch(e){if("EBUSY"===e.code||"ENOTEMPTY"===e.code){if(0===r)break;await new Promise(e=>setTimeout(e,100*A));continue}throw e}}while(A++<r)}else await this.unlinkPromise(e)}removeSync(e,{recursive:t=!0}={}){let r;try{r=this.lstatSync(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(r.isDirectory()){if(t)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 A=e.split(this.pathUtils.sep);for(let e=2;e<=A.length;++e){const n=A.slice(0,e).join(this.pathUtils.sep);if(!this.existsSync(n)){try{await this.mkdirPromise(n)}catch(e){if("EEXIST"===e.code)continue;throw e}if(null!=t&&await this.chmodPromise(n,t),null!=r)await this.utimesPromise(n,r[0],r[1]);else{const e=await this.statPromise(this.pathUtils.dirname(n));await this.utimesPromise(n,e.atime,e.mtime)}}}}mkdirpSync(e,{chmod:t,utimes:r}={}){if((e=this.resolve(e))===this.pathUtils.dirname(e))return;const A=e.split(this.pathUtils.sep);for(let e=2;e<=A.length;++e){const n=A.slice(0,e).join(this.pathUtils.sep);if(!this.existsSync(n)){try{this.mkdirSync(n)}catch(e){if("EEXIST"===e.code)continue;throw e}if(null!=t&&this.chmodSync(n,t),null!=r)this.utimesSync(n,r[0],r[1]);else{const e=this.statSync(this.pathUtils.dirname(n));this.utimesSync(n,e.atime,e.mtime)}}}}async copyPromise(e,t,{baseFs:r=this,overwrite:A=!0,stableSort:n=!1,stableTime:o=!1}={}){return await async function(e,t,r,A,n){const o=e.pathUtils.normalize(t),i=r.pathUtils.normalize(A),s=[],c=[];await e.mkdirPromise(e.pathUtils.dirname(t),{recursive:!0});const g="function"==typeof e.lutimesPromise?e.lutimesPromise.bind(e):e.utimesPromise.bind(e);await a(s,c,g,e,o,r,i,n);for(const e of s)await e();await Promise.all(c.map(e=>e()))}(this,e,r,t,{overwrite:A,stableSort:n,stableTime:o})}copySync(e,t,{baseFs:r=this,overwrite:A=!0}={}){const n=r.lstatSync(t),o=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);const n=r.readdirSync(t);for(const o of n)this.copySync(this.pathUtils.join(e,o),r.pathUtils.join(t,o),{baseFs:r,overwrite:A})}else if(n.isFile()){if(!o||A){o&&this.removeSync(e);const A=r.readFileSync(t);this.writeFileSync(e,A)}}else{if(!n.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);if(!o||A){o&&this.removeSync(e);const A=r.readlinkSync(t);this.symlinkSync((0,i.CI)(this.pathUtils,A),e)}}const s=511&n.mode;this.chmodSync(e,s)}async changeFilePromise(e,t,r={}){return Buffer.isBuffer(t)?this.changeFileBufferPromise(e,t):this.changeFileTextPromise(e,t,r)}async changeFileBufferPromise(e,t){let r=Buffer.alloc(0);try{r=await this.readFilePromise(e)}catch(e){}0!==Buffer.compare(r,t)&&await this.writeFilePromise(e,t)}async changeFileTextPromise(e,t,{automaticNewlines:r}={}){let A="";try{A=await this.readFilePromise(e,"utf8")}catch(e){}const n=r?l(A,t):t;A!==n&&await this.writeFilePromise(e,n)}changeFileSync(e,t,r={}){return Buffer.isBuffer(t)?this.changeFileBufferSync(e,t):this.changeFileTextSync(e,t,r)}changeFileBufferSync(e,t){let r=Buffer.alloc(0);try{r=this.readFileSync(e)}catch(e){}0!==Buffer.compare(r,t)&&this.writeFileSync(e,t)}changeFileTextSync(e,t,{automaticNewlines:r=!1}={}){let A="";try{A=this.readFileSync(e,"utf8")}catch(e){}const n=r?l(A,t):t;A!==n&&this.writeFileSync(e,n)}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",A=Date.now();let n=null;const o=async()=>{let e;try{[e]=await this.readJsonPromise(r)}catch(e){return Date.now()-A<500}try{return process.kill(e,0),!0}catch(e){return!1}};for(;null===n;)try{n=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()-A<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(n,JSON.stringify([process.pid]));try{return await t()}finally{try{await this.closePromise(n),await this.unlinkPromise(r)}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}}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),A=await t();void 0!==A&&(e=A),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),A=t();void 0!==A&&(e=A),this.lutimesSync?this.lutimesSync(e,r.atime,r.mtime):r.isSymbolicLink()||this.utimesSync(e,r.atime,r.mtime)}}c.DEFAULT_TIME=315532800;class g extends c{constructor(){super(i.y1)}}function l(e,t){return t.replace(/\r?\n/g,function(e){const t=e.match(/\r?\n/g);if(null===t)return A.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:()=>s});var A=r(78420),n=r(42096),o=r(46009);const i=o.LZ.root;class s extends n.p{constructor(e,{baseFs:t=new A.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(i,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(i,this.pathUtils.relative(this.target,e))}}},15037:(e,t,r)=>{"use strict";r.d(t,{v:()=>n});var A=r(42096);class n extends A.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 A=r(35747),n=r.n(A),o=r(5944),i=r(26984),s=r(46009);class a extends o.fS{constructor(e=n()){super(),this.realFs=e,void 0!==this.realFs.lutimes&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return s.LZ.root}resolve(e){return s.y1.resolve(e)}async openPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.open(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}openSync(e,t,r){return this.realFs.openSync(s.cS.fromPortablePath(e),t,r)}async opendirPromise(e,t){return await new Promise((r,A)=>{void 0!==t?this.realFs.opendir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A)):this.realFs.opendir(s.cS.fromPortablePath(e),this.makeCallback(r,A))}).then(t=>Object.defineProperty(t,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,t){const r=void 0!==t?this.realFs.opendirSync(s.cS.fromPortablePath(e),t):this.realFs.opendirSync(s.cS.fromPortablePath(e));return Object.defineProperty(r,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,t,r=0,A=0,n=-1){return await new Promise((o,i)=>{this.realFs.read(e,t,r,A,n,(e,t)=>{e?i(e):o(t)})})}readSync(e,t,r,A,n){return this.realFs.readSync(e,t,r,A,n)}async writePromise(e,t,r,A,n){return await new Promise((o,i)=>"string"==typeof t?this.realFs.write(e,t,r,this.makeCallback(o,i)):this.realFs.write(e,t,r,A,n,this.makeCallback(o,i)))}writeSync(e,t,r,A,n){return"string"==typeof t?this.realFs.writeSync(e,t,r):this.realFs.writeSync(e,t,r,A,n)}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?s.cS.fromPortablePath(e):e;return this.realFs.createReadStream(r,t)}createWriteStream(e,t){const r=null!==e?s.cS.fromPortablePath(e):e;return this.realFs.createWriteStream(r,t)}async realpathPromise(e){return await new Promise((t,r)=>{this.realFs.realpath(s.cS.fromPortablePath(e),{},this.makeCallback(t,r))}).then(e=>s.cS.toPortablePath(e))}realpathSync(e){return s.cS.toPortablePath(this.realFs.realpathSync(s.cS.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(t=>{this.realFs.exists(s.cS.fromPortablePath(e),t)})}accessSync(e,t){return this.realFs.accessSync(s.cS.fromPortablePath(e),t)}async accessPromise(e,t){return await new Promise((r,A)=>{this.realFs.access(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}existsSync(e){return this.realFs.existsSync(s.cS.fromPortablePath(e))}async statPromise(e){return await new Promise((t,r)=>{this.realFs.stat(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}statSync(e){return this.realFs.statSync(s.cS.fromPortablePath(e))}async lstatPromise(e){return await new Promise((t,r)=>{this.realFs.lstat(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}lstatSync(e){return this.realFs.lstatSync(s.cS.fromPortablePath(e))}async chmodPromise(e,t){return await new Promise((r,A)=>{this.realFs.chmod(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}chmodSync(e,t){return this.realFs.chmodSync(s.cS.fromPortablePath(e),t)}async chownPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.chown(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}chownSync(e,t,r){return this.realFs.chownSync(s.cS.fromPortablePath(e),t,r)}async renamePromise(e,t){return await new Promise((r,A)=>{this.realFs.rename(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),this.makeCallback(r,A))})}renameSync(e,t){return this.realFs.renameSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t))}async copyFilePromise(e,t,r=0){return await new Promise((A,n)=>{this.realFs.copyFile(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),r,this.makeCallback(A,n))})}copyFileSync(e,t,r=0){return this.realFs.copyFileSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),r)}async appendFilePromise(e,t,r){return await new Promise((A,n)=>{const o="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.appendFile(o,t,r,this.makeCallback(A,n)):this.realFs.appendFile(o,t,this.makeCallback(A,n))})}appendFileSync(e,t,r){const A="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.appendFileSync(A,t,r):this.realFs.appendFileSync(A,t)}async writeFilePromise(e,t,r){return await new Promise((A,n)=>{const o="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.writeFile(o,t,r,this.makeCallback(A,n)):this.realFs.writeFile(o,t,this.makeCallback(A,n))})}writeFileSync(e,t,r){const A="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.writeFileSync(A,t,r):this.realFs.writeFileSync(A,t)}async unlinkPromise(e){return await new Promise((t,r)=>{this.realFs.unlink(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}unlinkSync(e){return this.realFs.unlinkSync(s.cS.fromPortablePath(e))}async utimesPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.utimes(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}utimesSync(e,t,r){this.realFs.utimesSync(s.cS.fromPortablePath(e),t,r)}async lutimesPromiseImpl(e,t,r){const A=this.realFs.lutimes;if(void 0===A)throw(0,i.bk)("unavailable Node binding",`lutimes '${e}'`);return await new Promise((n,o)=>{A.call(this.realFs,s.cS.fromPortablePath(e),t,r,this.makeCallback(n,o))})}lutimesSyncImpl(e,t,r){const A=this.realFs.lutimesSync;if(void 0===A)throw(0,i.bk)("unavailable Node binding",`lutimes '${e}'`);A.call(this.realFs,s.cS.fromPortablePath(e),t,r)}async mkdirPromise(e,t){return await new Promise((r,A)=>{this.realFs.mkdir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}mkdirSync(e,t){return this.realFs.mkdirSync(s.cS.fromPortablePath(e),t)}async rmdirPromise(e,t){return await new Promise((r,A)=>{t?this.realFs.rmdir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A)):this.realFs.rmdir(s.cS.fromPortablePath(e),this.makeCallback(r,A))})}rmdirSync(e,t){return this.realFs.rmdirSync(s.cS.fromPortablePath(e),t)}async linkPromise(e,t){return await new Promise((r,A)=>{this.realFs.link(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),this.makeCallback(r,A))})}linkSync(e,t){return this.realFs.linkSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t))}async symlinkPromise(e,t,r){const A=r||(e.endsWith("/")?"dir":"file");return await new Promise((r,n)=>{this.realFs.symlink(s.cS.fromPortablePath(e.replace(/\/+$/,"")),s.cS.fromPortablePath(t),A,this.makeCallback(r,n))})}symlinkSync(e,t,r){const A=r||(e.endsWith("/")?"dir":"file");return this.realFs.symlinkSync(s.cS.fromPortablePath(e.replace(/\/+$/,"")),s.cS.fromPortablePath(t),A)}async readFilePromise(e,t){return await new Promise((r,A)=>{const n="string"==typeof e?s.cS.fromPortablePath(e):e;this.realFs.readFile(n,t,this.makeCallback(r,A))})}readFileSync(e,t){const r="string"==typeof e?s.cS.fromPortablePath(e):e;return this.realFs.readFileSync(r,t)}async readdirPromise(e,{withFileTypes:t}={}){return await new Promise((r,A)=>{t?this.realFs.readdir(s.cS.fromPortablePath(e),{withFileTypes:!0},this.makeCallback(r,A)):this.realFs.readdir(s.cS.fromPortablePath(e),this.makeCallback(e=>r(e),A))})}readdirSync(e,{withFileTypes:t}={}){return t?this.realFs.readdirSync(s.cS.fromPortablePath(e),{withFileTypes:!0}):this.realFs.readdirSync(s.cS.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((t,r)=>{this.realFs.readlink(s.cS.fromPortablePath(e),this.makeCallback(t,r))}).then(e=>s.cS.toPortablePath(e))}readlinkSync(e){return s.cS.toPortablePath(this.realFs.readlinkSync(s.cS.fromPortablePath(e)))}async truncatePromise(e,t){return await new Promise((r,A)=>{this.realFs.truncate(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}truncateSync(e,t){return this.realFs.truncateSync(s.cS.fromPortablePath(e),t)}watch(e,t,r){return this.realFs.watch(s.cS.fromPortablePath(e),t,r)}watchFile(e,t,r){return this.realFs.watchFile(s.cS.fromPortablePath(e),t,r)}unwatchFile(e,t){return this.realFs.unwatchFile(s.cS.fromPortablePath(e),t)}makeCallback(e,t){return(r,A)=>{r?t(r):e(A)}}}},39725:(e,t,r)=>{"use strict";r.d(t,{i:()=>o});var A=r(42096),n=r(46009);class o extends A.p{constructor(e){super(n.cS),this.baseFs=e}mapFromBase(e){return n.cS.fromPortablePath(e)}mapToBase(e){return n.cS.toPortablePath(e)}}},42096:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var A=r(5944);class n extends A.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())}async 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 opendirPromise(e,t){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),t),{path:e})}opendirSync(e,t){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),t),{path:e})}async readPromise(e,t,r,A,n){return await this.baseFs.readPromise(e,t,r,A,n)}readSync(e,t,r,A,n){return this.baseFs.readSync(e,t,r,A,n)}async writePromise(e,t,r,A,n){return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,A,n)}writeSync(e,t,r,A,n){return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,A,n)}async 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)))}async 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)}async accessPromise(e,t){return this.baseFs.accessPromise(this.mapToBase(e),t)}async statPromise(e){return this.baseFs.statPromise(this.mapToBase(e))}statSync(e){return this.baseFs.statSync(this.mapToBase(e))}async lstatPromise(e){return this.baseFs.lstatPromise(this.mapToBase(e))}lstatSync(e){return this.baseFs.lstatSync(this.mapToBase(e))}async chmodPromise(e,t){return this.baseFs.chmodPromise(this.mapToBase(e),t)}chmodSync(e,t){return this.baseFs.chmodSync(this.mapToBase(e),t)}async chownPromise(e,t,r){return this.baseFs.chownPromise(this.mapToBase(e),t,r)}chownSync(e,t,r){return this.baseFs.chownSync(this.mapToBase(e),t,r)}async 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))}async 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)}async 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)}async 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)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async 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)}async mkdirPromise(e,t){return this.baseFs.mkdirPromise(this.mapToBase(e),t)}mkdirSync(e,t){return this.baseFs.mkdirSync(this.mapToBase(e),t)}async rmdirPromise(e,t){return this.baseFs.rmdirPromise(this.mapToBase(e),t)}rmdirSync(e,t){return this.baseFs.rmdirSync(this.mapToBase(e),t)}async linkPromise(e,t){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(t))}linkSync(e,t){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(t))}async 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)}async 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)))}async truncatePromise(e,t){return this.baseFs.truncatePromise(this.mapToBase(e),t)}truncateSync(e,t){return this.baseFs.truncateSync(this.mapToBase(e),t)}watch(e,t,r){return this.baseFs.watch(this.mapToBase(e),t,r)}watchFile(e,t,r){return this.baseFs.watchFile(this.mapToBase(e),t,r)}unwatchFile(e,t){return this.baseFs.unwatchFile(this.mapToBase(e),t)}fsMapToBase(e){return"number"==typeof e?e:this.mapToBase(e)}}},17674:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var A=r(78420),n=r(42096),o=r(46009);const i=/^[0-9]+$/,s=/^(\/(?:[^/]+\/)*?\$\$virtual)((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,a=/^([^/]+-)?[a-f0-9]+$/;class c extends n.p{constructor({baseFs:e=new A.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 A=o.y1.relative(o.y1.dirname(e),r).split("/");let n=0;for(;n<A.length&&".."===A[n];)n+=1;const i=A.slice(n);return o.y1.join(e,t,String(n),...i)}static resolveVirtual(e){const t=e.match(s);if(!t||!t[3]&&t[5])return e;const r=o.y1.dirname(t[1]);if(!t[3]||!t[4])return r;if(!i.test(t[4]))return e;const A=Number(t[4]),n="../".repeat(A),a=t[5]||".";return c.resolveVirtual(o.y1.join(r,n,a))}getExtractHint(e){return this.baseFs.getExtractHint(e)}getRealPath(){return this.baseFs.getRealPath()}realpathSync(e){const t=e.match(s);if(!t)return this.baseFs.realpathSync(e);if(!t[5])return e;const r=this.baseFs.realpathSync(this.mapToBase(e));return c.makeVirtualPath(t[1],t[3],r)}async realpathPromise(e){const t=e.match(s);if(!t)return await this.baseFs.realpathPromise(e);if(!t[5])return e;const r=await this.baseFs.realpathPromise(this.mapToBase(e));return c.makeVirtualPath(t[1],t[3],r)}mapToBase(e){return c.resolveVirtual(e)}mapFromBase(e){return e}}},90739:(e,t,r)=>{"use strict";r.d(t,{k:()=>C,d:()=>f});var A=r(35747),n=r(92413),o=r(31669),i=r(78761),s=r.n(i),a=r(5944),c=r(78420),g=r(19697),l=r(38783),u=r(22004),h=r(26984),p=r(46009),d=r(65760);const C="mixed";class f extends a.fS{constructor(e,t){super(),this.lzSource=null,this.listings=new Map,this.entries=new Map,this.fileSources=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:C,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 c.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=d.makeDefaultStats()}else this.stats=d.makeDefaultStats();const A=this.libzip.malloc(4);try{let n=0;if("string"==typeof e&&r.create&&(n|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE),t.readOnly&&(n|=this.libzip.ZIP_RDONLY,this.readOnly=!0),"string"==typeof e)this.zip=this.libzip.open(p.cS.fromPortablePath(e),n,A);else{const t=this.allocateUnattachedSource(e);try{this.zip=this.libzip.openFromSource(t,n,A),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(A,"i32")),this.makeLibzipError(e)}}finally{this.libzip.free(A)}this.listings.set(p.LZ.root,new Set);const n=this.libzip.getNumEntries(this.zip,0);for(let e=0;e<n;++e){const t=this.libzip.getName(this.zip,e,0);if(p.y1.isAbsolute(t))continue;const r=p.y1.resolve(p.LZ.root,t);this.registerEntry(r,e),t.endsWith("/")&&this.registerListing(r)}if(this.symlinkCount=this.libzip.ext.countSymlinks(this.zip),-1===this.symlinkCount)throw this.makeLibzipError(this.libzip.getError(this.zip));this.ready=!0}makeLibzipError(e){const t=this.libzip.struct.errorCodeZip(e),r=this.libzip.error.strerror(e),A=new h.Yn(r,this.libzip.errors[t]);if(t===this.libzip.errors.ZIP_ER_CHANGED)throw new Error("Assertion failed: Unexpected libzip error: "+A.message);return A}getExtractHint(e){for(const t of this.entries.keys()){const r=this.pathUtils.extname(t);if(e.relevantExtensions.has(r))return!0}return!1}getAllFiles(){return Array.from(this.entries.keys())}getRealPath(){if(!this.path)throw new Error("ZipFS don't have real paths when loaded from a buffer");return this.path}getBufferAndClose(){if(this.prepareClose(),!this.lzSource)throw new Error("ZipFS was not created from a Buffer");try{if(this.libzip.source.keep(this.lzSource),-1===this.libzip.close(this.zip))throw this.makeLibzipError(this.libzip.getError(this.zip));if(-1===this.libzip.source.open(this.lzSource))throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(-1===this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END))throw this.makeLibzipError(this.libzip.source.error(this.lzSource));const e=this.libzip.source.tell(this.lzSource);if(-1===e)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(-1===this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET))throw this.makeLibzipError(this.libzip.source.error(this.lzSource));const t=this.libzip.malloc(e);if(!t)throw new Error("Couldn't allocate enough memory");try{const r=this.libzip.source.read(this.lzSource,t,e);if(-1===r)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(r<e)throw new Error("Incomplete read");if(r>e)throw new Error("Overread");const A=this.libzip.HEAPU8.subarray(t,t+e);return Buffer.from(A)}finally{this.libzip.free(t)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}prepareClose(){if(!this.ready)throw h.Vw("archive closed, close");(0,l.L)(this)}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.prepareClose(),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 this.makeLibzipError(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(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}resolve(e){return p.y1.resolve(p.LZ.root,e)}async openPromise(e,t,r){return this.openSync(e,t,r)}openSync(e,t,r){const A=this.nextFd++;return this.fds.set(A,{cursor:0,p:e}),A}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(e,t){return this.opendirSync(e,t)}opendirSync(e,t={}){const r=this.resolveFilename(`opendir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`opendir '${e}'`);const A=this.listings.get(r);if(!A)throw h.Ab(`opendir '${e}'`);const n=[...A],o=this.openSync(r,"r");return(0,g.a)(this,r,n,{onClose:()=>{this.closeSync(o)}})}async readPromise(e,t,r,A,n){return this.readSync(e,t,r,A,n)}readSync(e,t,r=0,A=0,n=-1){const o=this.fds.get(e);if(void 0===o)throw h.Ch("read");let i;i=-1===n||null===n?o.cursor:n;const s=this.readFileSync(o.p);s.copy(t,r,i,i+A);const a=Math.max(0,Math.min(s.length-i,A));return-1!==n&&null!==n||(o.cursor+=a),a}async writePromise(e,t,r,A,n){return"string"==typeof t?this.writeSync(e,t,n):this.writeSync(e,t,r,A,n)}writeSync(e,t,r,A,n){if(void 0===this.fds.get(e))throw h.Ch("read");throw new Error("Unimplemented")}async closePromise(e){return this.closeSync(e)}closeSync(e){if(void 0===this.fds.get(e))throw h.Ch("read");this.fds.delete(e)}createReadStream(e,{encoding:t}={}){if(null===e)throw new Error("Unimplemented");const r=this.openSync(e,"r"),A=Object.assign(new n.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(e,t)=>{clearImmediate(o),this.closeSync(r),t(e)}}),{close(){A.destroy()},bytesRead:0,path:e}),o=setImmediate(async()=>{try{const r=await this.readFilePromise(e,t);A.bytesRead=r.length,A.end(r)}catch(e){A.destroy(e)}});return A}createWriteStream(e,{encoding:t}={}){if(this.readOnly)throw h.YW(`open '${e}'`);if(null===e)throw new Error("Unimplemented");const r=[],A=this.openSync(e,"w"),o=Object.assign(new n.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(n,o)=>{try{n?o(n):(this.writeFileSync(e,Buffer.concat(r),t),o(null))}catch(e){o(e)}finally{this.closeSync(A)}}}),{bytesWritten:0,path:e,close(){o.destroy()}});return o.on("data",e=>{const t=Buffer.from(e);o.bytesWritten+=t.length,r.push(t)}),o}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 h.z6(`lstat '${e}'`);return t}async existsPromise(e){return this.existsSync(e)}existsSync(e){if(!this.ready)throw h.Vw(`archive closed, existsSync '${e}'`);if(0===this.symlinkCount){const t=p.y1.resolve(p.LZ.root,e);return this.entries.has(t)||this.listings.has(t)}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=A.constants.F_OK){const r=this.resolveFilename(`access '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`access '${e}'`);if(this.readOnly&&t&A.constants.W_OK)throw h.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 h.z6(`stat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.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 h.z6(`lstat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.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 this.makeLibzipError(this.libzip.getError(this.zip));const A=this.stats.uid,n=this.stats.gid,o=this.libzip.struct.statSize(e)>>>0,i=512,s=Math.ceil(o/i),a=1e3*(this.libzip.struct.statMtime(e)>>>0),c=a,g=a,l=a,h=new Date(c),p=new Date(g),C=new Date(l),f=new Date(a),I=this.listings.has(t)?u.QB:this.isSymbolicLink(r)?u.Zv:u.Pe,E=I===u.QB?493:420,B=I|511&this.getUnixMode(r,E);return Object.assign(new d.StatEntry,{uid:A,gid:n,size:o,blksize:i,blocks:s,atime:h,birthtime:p,ctime:C,mtime:f,atimeMs:c,birthtimeMs:g,ctimeMs:l,mtimeMs:a,mode:B})}if(this.listings.has(t)){const e=this.stats.uid,t=this.stats.gid,r=0,A=512,n=0,o=this.stats.mtimeMs,i=this.stats.mtimeMs,s=this.stats.mtimeMs,a=this.stats.mtimeMs,c=new Date(o),g=new Date(i),l=new Date(s),h=new Date(a),p=493|u.QB;return Object.assign(new d.StatEntry,{uid:e,gid:t,size:r,blksize:A,blocks:n,atime:c,birthtime:g,ctime:l,mtime:h,atimeMs:o,birthtimeMs:i,ctimeMs:s,mtimeMs:a,mode:p})}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 this.makeLibzipError(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(p.y1.dirname(e));return t=new Set,r.add(p.y1.basename(e)),this.listings.set(e,t),t}registerEntry(e,t){this.registerListing(p.y1.dirname(e)).add(p.y1.basename(e)),this.entries.set(e,t)}unregisterListing(e){this.listings.delete(e);const t=this.listings.get(p.y1.dirname(e));null==t||t.delete(p.y1.basename(e))}unregisterEntry(e){this.unregisterListing(e);const t=this.entries.get(e);this.entries.delete(e),void 0!==t&&(this.fileSources.delete(t),this.isSymbolicLink(t)&&this.symlinkCount--)}deleteEntry(e,t){this.unregisterEntry(e);if(-1===this.libzip.delete(this.zip,t))throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(e,t,r=!0){if(!this.ready)throw h.Vw("archive closed, "+e);let A=p.y1.resolve(p.LZ.root,t);if("/"===A)return p.LZ.root;const n=this.entries.get(A);if(r&&void 0!==n){if(0!==this.symlinkCount&&this.isSymbolicLink(n)){const t=this.getFileSource(n).toString();return this.resolveFilename(e,p.y1.resolve(p.y1.dirname(A),t),!0)}return A}for(;;){const t=this.resolveFilename(e,p.y1.dirname(A),!0),n=this.listings.has(t),o=this.entries.has(t);if(!n&&!o)throw h.z6(e);if(!n)throw h.Ab(e);if(A=p.y1.resolve(t,p.y1.basename(A)),!r||0===this.symlinkCount)break;const i=this.libzip.name.locate(this.zip,A.slice(1));if(-1===i)break;if(!this.isSymbolicLink(i))break;{const e=this.getFileSource(i).toString();A=p.y1.resolve(p.y1.dirname(A),e)}}return A}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:A}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(r,A,0,!0,t);if(0===n)throw this.libzip.free(t),this.makeLibzipError(t);return n}allocateSource(e){const{buffer:t,byteLength:r}=this.allocateBuffer(e),A=this.libzip.source.fromBuffer(this.zip,t,r,0,!0);if(0===A)throw this.libzip.free(t),this.makeLibzipError(this.libzip.getError(this.zip));return A}setFileSource(e,t){const r=Buffer.isBuffer(t)?t:Buffer.from(t),A=p.y1.relative(p.LZ.root,e),n=this.allocateSource(t);try{const e=this.libzip.file.add(this.zip,A,n,this.libzip.ZIP_FL_OVERWRITE);if(-1===e)throw this.makeLibzipError(this.libzip.getError(this.zip));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 this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(e,r),e}catch(e){throw this.libzip.source.free(n),e}}isSymbolicLink(e){if(0===this.symlinkCount)return!1;if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX)return!1;return(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&u.wK)===u.Zv}getFileSource(e,t={asyncDecompress:!1}){const r=this.fileSources.get(e);if(void 0!==r)return r;const A=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,e,0,0,A))throw this.makeLibzipError(this.libzip.getError(this.zip));const n=this.libzip.struct.statCompSize(A),o=this.libzip.struct.statCompMethod(A),i=this.libzip.malloc(n);try{const r=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(0===r)throw this.makeLibzipError(this.libzip.getError(this.zip));try{const A=this.libzip.fread(r,i,n,0);if(-1===A)throw this.makeLibzipError(this.libzip.file.getError(r));if(A<n)throw new Error("Incomplete read");if(A>n)throw new Error("Overread");const a=this.libzip.HEAPU8.subarray(i,i+n),c=Buffer.from(a);if(0===o)return this.fileSources.set(e,c),c;if(t.asyncDecompress)return new Promise((t,r)=>{s().inflateRaw(c,(A,n)=>{A?r(A):(this.fileSources.set(e,n),t(n))})});{const t=s().inflateRawSync(c);return this.fileSources.set(e,t),t}}finally{this.libzip.fclose(r)}}finally{this.libzip.free(i)}}async chmodPromise(e,t){return this.chmodSync(e,t)}chmodSync(e,t){if(this.readOnly)throw h.YW(`chmod '${e}'`);t&=493;const r=this.resolveFilename(`chmod '${e}'`,e,!1),A=this.entries.get(r);if(void 0===A)throw new Error(`Assertion failed: The entry should have been registered (${r})`);const n=-512&this.getUnixMode(A,0|u.Pe)|t;if(-1===this.libzip.file.setExternalAttributes(this.zip,A,0,0,this.libzip.ZIP_OPSYS_UNIX,n<<16))throw this.makeLibzipError(this.libzip.getError(this.zip))}async chownPromise(e,t,r){return this.chownSync(e,t,r)}chownSync(e,t,r){throw new Error("Unimplemented")}async renamePromise(e,t){return this.renameSync(e,t)}renameSync(e,t){throw new Error("Unimplemented")}async copyFilePromise(e,t,r){const{indexSource:A,indexDest:n,resolvedDestP:o}=this.prepareCopyFile(e,t,r),i=await this.getFileSource(A,{asyncDecompress:!0}),s=this.setFileSource(o,i);s!==n&&this.registerEntry(o,s)}copyFileSync(e,t,r=0){const{indexSource:A,indexDest:n,resolvedDestP:o}=this.prepareCopyFile(e,t,r),i=this.getFileSource(A),s=this.setFileSource(o,i);s!==n&&this.registerEntry(o,s)}prepareCopyFile(e,t,r=0){if(this.readOnly)throw h.YW(`copyfile '${e} -> '${t}'`);if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw h.bk("unsupported clone operation",`copyfile '${e}' -> ${t}'`);const n=this.resolveFilename(`copyfile '${e} -> ${t}'`,e),o=this.entries.get(n);if(void 0===o)throw h.hq(`copyfile '${e}' -> '${t}'`);const i=this.resolveFilename(`copyfile '${e}' -> ${t}'`,t),s=this.entries.get(i);if(0!=(r&(A.constants.COPYFILE_EXCL|A.constants.COPYFILE_FICLONE_FORCE))&&void 0!==s)throw h.cT(`copyfile '${e}' -> '${t}'`);return{indexSource:o,resolvedDestP:i,indexDest:s}}async appendFilePromise(e,t,r){if(this.readOnly)throw h.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.writeFilePromise(e,t,r)}appendFileSync(e,t,r={}){if(this.readOnly)throw h.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){const{encoding:A,index:n,resolvedP:o}=this.prepareWriteFile(e,r);void 0!==n&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([await this.getFileSource(n,{asyncDecompress:!0}),Buffer.from(t)])),null!==A&&(t=t.toString(A));const i=this.setFileSource(o,t);i!==n&&this.registerEntry(o,i)}writeFileSync(e,t,r){const{encoding:A,index:n,resolvedP:o}=this.prepareWriteFile(e,r);void 0!==n&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([this.getFileSource(n),Buffer.from(t)])),null!==A&&(t=t.toString(A));const i=this.setFileSource(o,t);i!==n&&this.registerEntry(o,i)}prepareWriteFile(e,t){if("string"!=typeof e)throw h.Ch("read");if(this.readOnly)throw h.YW(`open '${e}'`);const r=this.resolveFilename(`open '${e}'`,e);if(this.listings.has(r))throw h.GA(`open '${e}'`);let A=null;"string"==typeof t?A=t:"object"==typeof t&&t.encoding&&(A=t.encoding);return{encoding:A,resolvedP:r,index:this.entries.get(r)}}async unlinkPromise(e){return this.unlinkSync(e)}unlinkSync(e){if(this.readOnly)throw h.YW(`unlink '${e}'`);const t=this.resolveFilename(`unlink '${e}'`,e);if(this.listings.has(t))throw h.GA(`unlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw h.hq(`unlink '${e}'`);this.deleteEntry(t,r)}async utimesPromise(e,t,r){return this.utimesSync(e,t,r)}utimesSync(e,t,r){if(this.readOnly)throw h.YW(`utimes '${e}'`);const A=this.resolveFilename(`utimes '${e}'`,e);this.utimesImpl(A,r)}async lutimesPromise(e,t,r){return this.lutimesSync(e,t,r)}lutimesSync(e,t,r){if(this.readOnly)throw h.YW(`lutimes '${e}'`);const A=this.resolveFilename(`utimes '${e}'`,e,!1);this.utimesImpl(A,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 this.makeLibzipError(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 h.YW(`mkdir '${e}'`);const A=this.resolveFilename(`mkdir '${e}'`,e);if(this.entries.has(A)||this.listings.has(A))throw h.cT(`mkdir '${e}'`);this.hydrateDirectory(A),this.chmodSync(A,t)}async rmdirPromise(e,t){return this.rmdirSync(e,t)}rmdirSync(e,{recursive:t=!1}={}){if(this.readOnly)throw h.YW(`rmdir '${e}'`);if(t)return void this.removeSync(e);const r=this.resolveFilename(`rmdir '${e}'`,e),A=this.listings.get(r);if(!A)throw h.Ab(`rmdir '${e}'`);if(A.size>0)throw h.re(`rmdir '${e}'`);const n=this.entries.get(r);if(void 0===n)throw h.hq(`rmdir '${e}'`);this.deleteEntry(e,n)}hydrateDirectory(e){const t=this.libzip.dir.add(this.zip,p.y1.relative(p.LZ.root,e));if(-1===t)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(e),this.registerEntry(e,t),t}async linkPromise(e,t){return this.linkSync(e,t)}linkSync(e,t){throw h.Hs(`link '${e}' -> '${t}'`)}async symlinkPromise(e,t){return this.symlinkSync(e,t)}symlinkSync(e,t){if(this.readOnly)throw h.YW(`symlink '${e}' -> '${t}'`);const r=this.resolveFilename(`symlink '${e}' -> '${t}'`,t);if(this.listings.has(r))throw h.GA(`symlink '${e}' -> '${t}'`);if(this.entries.has(r))throw h.cT(`symlink '${e}' -> '${t}'`);const A=this.setFileSource(r,e);this.registerEntry(r,A);if(-1===this.libzip.file.setExternalAttributes(this.zip,A,0,0,this.libzip.ZIP_OPSYS_UNIX,(511|u.Zv)<<16))throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(e,t){"object"==typeof t&&(t=t?t.encoding:void 0);const r=await this.readFileBuffer(e,{asyncDecompress:!0});return t?r.toString(t):r}readFileSync(e,t){"object"==typeof t&&(t=t?t.encoding:void 0);const r=this.readFileBuffer(e);return t?r.toString(t):r}readFileBuffer(e,t={asyncDecompress:!1}){if("string"!=typeof e)throw h.Ch("read");const r=this.resolveFilename(`open '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`open '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(r))throw h.Ab(`open '${e}'`);if(this.listings.has(r))throw h.GA("read");const A=this.entries.get(r);if(void 0===A)throw new Error("Unreachable");return this.getFileSource(A,t)}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 h.z6(`scandir '${e}'`);const A=this.listings.get(r);if(!A)throw h.Ab(`scandir '${e}'`);const n=[...A];return t?n.map(t=>Object.assign(this.statImpl("lstat",p.y1.join(e,t)),{name:t})):n}async readlinkPromise(e){const t=this.prepareReadlink(e);return(await this.getFileSource(t,{asyncDecompress:!0})).toString()}readlinkSync(e){const t=this.prepareReadlink(e);return this.getFileSource(t).toString()}prepareReadlink(e){const t=this.resolveFilename(`readlink '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`readlink '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`open '${e}'`);if(this.listings.has(t))throw h.hq(`readlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw new Error("Unreachable");if(!this.isSymbolicLink(r))throw h.hq(`readlink '${e}'`);return r}async truncatePromise(e,t=0){const r=this.resolveFilename(`open '${e}'`,e),A=this.entries.get(r);if(void 0===A)throw h.hq(`open '${e}'`);const n=await this.getFileSource(A,{asyncDecompress:!0}),o=Buffer.alloc(t,0);return n.copy(o),await this.writeFilePromise(e,o)}truncateSync(e,t=0){const r=this.resolveFilename(`open '${e}'`,e),A=this.entries.get(r);if(void 0===A)throw h.hq(`open '${e}'`);const n=this.getFileSource(A),o=Buffer.alloc(t,0);return n.copy(o),this.writeFileSync(e,o)}watch(e,t,r){let A;switch(typeof t){case"function":case"string":case"undefined":A=!0;break;default:({persistent:A=!0}=t)}if(!A)return{on:()=>{},close:()=>{}};const n=setInterval(()=>{},864e5);return{on:()=>{},close:()=>{clearInterval(n)}}}watchFile(e,t,r){const A=this.resolveFilename(`open '${e}'`,e);return(0,l._x)(this,A,t,r)}unwatchFile(e,t){const r=this.resolveFilename(`open '${e}'`,e);return(0,l.nd)(this,r,t)}}},53660:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var A=r(35747),n=r(5944),o=r(78420),i=r(90739),s=r(38783),a=r(46009);const c=2147483648,g=/.*?(?<!\/)\.zip(?=\/|$)/;class l extends n.fS{constructor({libzip:e,baseFs:t=new o.S,filter:r=null,maxOpenFiles:A=1/0,readOnlyArchives:n=!1,useCache:i=!0,maxAge:s=5e3}){super(),this.fdMap=new Map,this.nextFd=3,this.isZip=new Set,this.notZip=new Set,this.realPaths=new Map,this.limitOpenFilesTimeout=null,this.libzip=e,this.baseFs=t,this.zipInstances=i?new Map:null,this.filter=r,this.maxOpenFiles=A,this.readOnlyArchives=n,this.maxAge=s}static async openPromise(e,t){const r=new l(t);try{return await e(r)}finally{r.saveAndClose()}}getExtractHint(e){return this.baseFs.getExtractHint(e)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if((0,s.L)(this),this.zipInstances)for(const[e,{zipFs:t}]of this.zipInstances.entries())t.saveAndClose(),this.zipInstances.delete(e)}discardAndClose(){if((0,s.L)(this),this.zipInstances)for(const[e,{zipFs:t}]of this.zipInstances.entries())t.discardAndClose(),this.zipInstances.delete(e)}resolve(e){return this.baseFs.resolve(e)}remapFd(e,t){const r=this.nextFd++|c;return this.fdMap.set(r,[e,t]),r}async openPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.openPromise(e,t,r),async(e,{subPath:A})=>this.remapFd(e,await e.openPromise(A,t,r)))}openSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.openSync(e,t,r),(e,{subPath:A})=>this.remapFd(e,e.openSync(A,t,r)))}async opendirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.opendirPromise(e,t),async(e,{subPath:r})=>await e.opendirPromise(r,t),{requireSubpath:!1})}opendirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.opendirSync(e,t),(e,{subPath:r})=>e.opendirSync(r,t),{requireSubpath:!1})}async readPromise(e,t,r,A,n){if(0==(e&c))return await this.baseFs.readPromise(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[i,s]=o;return await i.readPromise(s,t,r,A,n)}readSync(e,t,r,A,n){if(0==(e&c))return this.baseFs.readSync(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[i,s]=o;return i.readSync(s,t,r,A,n)}async writePromise(e,t,r,A,n){if(0==(e&c))return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[i,s]=o;return"string"==typeof t?await i.writePromise(s,t,r):await i.writePromise(s,t,r,A,n)}writeSync(e,t,r,A,n){if(0==(e&c))return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[i,s]=o;return"string"==typeof t?i.writeSync(s,t,r):i.writeSync(s,t,r,A,n)}async closePromise(e){if(0==(e&c))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,A]=t;return await r.closePromise(A)}closeSync(e){if(0==(e&c))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,A]=t;return r.closeSync(A)}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})=>{let A=this.realPaths.get(t);return void 0===A&&(A=await this.baseFs.realpathPromise(t),this.realPaths.set(t,A)),this.pathUtils.join(A,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})=>{let A=this.realPaths.get(t);return void 0===A&&(A=this.baseFs.realpathSync(t),this.realPaths.set(t,A)),this.pathUtils.join(A,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 chownPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.chownPromise(e,t,r),async(e,{subPath:A})=>await e.chownPromise(A,t,r))}chownSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.chownSync(e,t,r),(e,{subPath:A})=>e.chownSync(A,t,r))}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:A})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await e.renamePromise(r,A)}))}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:A})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return e.renameSync(r,A)}))}async copyFilePromise(e,t,r=0){const n=async(e,t,n,o)=>{if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&A.constants.COPYFILE_EXCL&&await this.existsPromise(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let i;try{i=await e.readFilePromise(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}await n.writeFilePromise(o,i)};return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.copyFilePromise(e,t,r),async(t,{subPath:r})=>await n(this.baseFs,e,t,r)),async(e,{subPath:A})=>await this.makeCallPromise(t,async()=>await n(e,A,this.baseFs,t),async(t,{subPath:o})=>e!==t?await n(e,A,t,o):await e.copyFilePromise(A,o,r)))}copyFileSync(e,t,r=0){const n=(e,t,n,o)=>{if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&A.constants.COPYFILE_EXCL&&this.existsSync(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let i;try{i=e.readFileSync(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}n.writeFileSync(o,i)};return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.copyFileSync(e,t,r),(t,{subPath:r})=>n(this.baseFs,e,t,r)),(e,{subPath:A})=>this.makeCallSync(t,()=>n(e,A,this.baseFs,t),(t,{subPath:o})=>e!==t?n(e,A,t,o):e.copyFileSync(A,o,r)))}async appendFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.appendFilePromise(e,t,r),async(e,{subPath:A})=>await e.appendFilePromise(A,t,r))}appendFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.appendFileSync(e,t,r),(e,{subPath:A})=>e.appendFileSync(A,t,r))}async writeFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.writeFilePromise(e,t,r),async(e,{subPath:A})=>await e.writeFilePromise(A,t,r))}writeFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.writeFileSync(e,t,r),(e,{subPath:A})=>e.writeFileSync(A,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:A})=>await e.utimesPromise(A,t,r))}utimesSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.utimesSync(e,t,r),(e,{subPath:A})=>e.utimesSync(A,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,t){return await this.makeCallPromise(e,async()=>await this.baseFs.rmdirPromise(e,t),async(e,{subPath:r})=>await e.rmdirPromise(r,t))}rmdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.rmdirSync(e,t),(e,{subPath:r})=>e.rmdirSync(r,t))}async linkPromise(e,t){return await this.makeCallPromise(t,async()=>await this.baseFs.linkPromise(e,t),async(t,{subPath:r})=>await t.linkPromise(e,r))}linkSync(e,t){return this.makeCallSync(t,()=>this.baseFs.linkSync(e,t),(t,{subPath:r})=>t.linkSync(e,r))}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))}async truncatePromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.truncatePromise(e,t),async(e,{subPath:r})=>await e.truncatePromise(r,t))}truncateSync(e,t){return this.makeCallSync(e,()=>this.baseFs.truncateSync(e,t),(e,{subPath:r})=>e.truncateSync(r,t))}watch(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watch(e,t,r),(e,{subPath:A})=>e.watch(A,t,r))}watchFile(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watchFile(e,t,r),()=>(0,s._x)(this,e,t,r))}unwatchFile(e,t){return this.makeCallSync(e,()=>this.baseFs.unwatchFile(e,t),()=>(0,s.nd)(this,e,t))}async makeCallPromise(e,t,r,{requireSubpath:A=!0}={}){if("string"!=typeof e)return await t();const n=this.resolve(e),o=this.findZip(n);return o?A&&"/"===o.subPath?await t():await this.getZipPromise(o.archivePath,async e=>await r(e,o)):await t()}makeCallSync(e,t,r,{requireSubpath:A=!0}={}){if("string"!=typeof e)return t();const n=this.resolve(e),o=this.findZip(n);return o?A&&"/"===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=g.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.join(a.LZ.root,e.substr(t.length))}}}limitOpenFiles(e){if(null===this.zipInstances)return;const t=Date.now();let r=t+this.maxAge,A=null===e?0:this.zipInstances.size-e;for(const[n,{zipFs:o,expiresAt:i,refCount:s}]of this.zipInstances.entries())if(0===s&&!o.hasOpenFileHandles())if(t>=i)o.saveAndClose(),this.zipInstances.delete(n),A-=1;else{if(null===e||A<=0){r=i;break}o.saveAndClose(),this.zipInstances.delete(n),A-=1}null===this.limitOpenFilesTimeout&&(null===e&&this.zipInstances.size>0||null!==e)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},r-t).unref())}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 A=this.zipInstances.get(e);if(!A){const t=await r();A=this.zipInstances.get(e),A||(A={zipFs:new i.d(e,t),expiresAt:0,refCount:0})}this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,A),A.expiresAt=Date.now()+this.maxAge,A.refCount+=1;try{return await t(A.zipFs)}finally{A.refCount-=1}}else{const A=new i.d(e,await r());try{return await t(A)}finally{A.saveAndClose()}}}getZipSync(e,t){const r=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(e)});if(this.zipInstances){let A=this.zipInstances.get(e);return A||(A={zipFs:new i.d(e,r()),expiresAt:0,refCount:0}),this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,A),A.expiresAt=Date.now()+this.maxAge,t(A.zipFs)}{const A=new i.d(e,r());try{return t(A)}finally{A.saveAndClose()}}}}},19697:(e,t,r)=>{"use strict";r.d(t,{a:()=>o});var A=r(26984);class n{constructor(e,t,r={}){this.path=e,this.nextDirent=t,this.opts=r,this.closed=!1}throwIfClosed(){if(this.closed)throw A.Xh()}async*[Symbol.asyncIterator](){try{let e;for(;null!==(e=await this.read());)yield e}finally{await this.close()}}read(e){const t=this.readSync();return void 0!==e?e(null,t):Promise.resolve(t)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),void 0!==e?e(null):Promise.resolve()}closeSync(){var e,t;this.throwIfClosed(),null===(t=(e=this.opts).onClose)||void 0===t||t.call(e),this.closed=!0}}function o(e,t,r,A){return new n(t,()=>{const A=r.shift();return void 0===A?null:Object.assign(e.statSync(e.pathUtils.join(t,A)),{name:A})},A)}},38783:(e,t,r)=>{"use strict";r.d(t,{L:()=>u,nd:()=>l,_x:()=>g});var A,n,o=r(28614),i=r(65760);function s(e,t){if(e!==t)throw new Error(`Invalid StatWatcher status: expected '${t}', got '${e}'`)}!function(e){e.Change="change",e.Stop="stop"}(A||(A={})),function(e){e.Ready="ready",e.Running="running",e.Stopped="stopped"}(n||(n={}));class a extends o.EventEmitter{constructor(e,t,{bigint:r=!1}={}){super(),this.status=n.Ready,this.changeListeners=new Map,this.startTimeout=null,this.fakeFs=e,this.path=t,this.bigint=r,this.lastStats=this.stat()}static create(e,t,r){const A=new a(e,t,r);return A.start(),A}start(){s(this.status,n.Ready),this.status=n.Running,this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(A.Change,this.lastStats,this.lastStats)},3)}stop(){s(this.status,n.Running),this.status=n.Stopped,null!==this.startTimeout&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(A.Stop)}stat(){try{return this.fakeFs.statSync(this.path)}catch(e){if("ENOENT"===e.code)return i.makeEmptyStats();throw e}}makeInterval(e){const t=setInterval(()=>{const e=this.stat(),t=this.lastStats;i.areStatsEqual(e,t)||(this.lastStats=e,this.emit(A.Change,e,t))},e.interval);return e.persistent?t:t.unref()}registerChangeListener(e,t){this.addListener(A.Change,e),this.changeListeners.set(e,this.makeInterval(t))}unregisterChangeListener(e){this.removeListener(A.Change,e);const t=this.changeListeners.get(e);void 0!==t&&clearInterval(t),this.changeListeners.delete(e)}unregisterAllChangeListeners(){for(const e of this.changeListeners.keys())this.unregisterChangeListener(e)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(const e of this.changeListeners.values())e.ref();return this}unref(){for(const e of this.changeListeners.values())e.unref();return this}}const c=new WeakMap;function g(e,t,r,A){let n,o,i,s;switch(typeof r){case"function":n=!1,o=!0,i=5007,s=r;break;default:({bigint:n=!1,persistent:o=!0,interval:i=5007}=r),s=A}let g=c.get(e);void 0===g&&c.set(e,g=new Map);let l=g.get(t);return void 0===l&&(l=a.create(e,t,{bigint:n}),g.set(t,l)),l.registerChangeListener(s,{persistent:o,interval:i}),l}function l(e,t,r){const A=c.get(e);if(void 0===A)return;const n=A.get(t);void 0!==n&&(void 0===r?n.unregisterAllChangeListeners():n.unregisterChangeListener(r),n.hasChangeListeners()||(n.stop(),A.delete(t)))}function u(e){const t=c.get(e);if(void 0!==t)for(const r of t.keys())l(e,r)}},22004:(e,t,r)=>{"use strict";r.d(t,{wK:()=>A,QB:()=>n,Pe:()=>o,Zv:()=>i});const A=61440,n=16384,o=32768,i=40960},26984:(e,t,r)=>{"use strict";function A(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function n(e){return A("EBUSY",e)}function o(e,t){return A("ENOSYS",`${e}, ${t}`)}function i(e){return A("EINVAL","invalid argument, "+e)}function s(e){return A("EBADF","bad file descriptor, "+e)}function a(e){return A("ENOENT","no such file or directory, "+e)}function c(e){return A("ENOTDIR","not a directory, "+e)}function g(e){return A("EISDIR","illegal operation on a directory, "+e)}function l(e){return A("EEXIST","file already exists, "+e)}function u(e){return A("EROFS","read-only filesystem, "+e)}function h(e){return A("ENOTEMPTY","directory not empty, "+e)}function p(e){return A("EOPNOTSUPP","operation not supported, "+e)}function d(){return A("ERR_DIR_CLOSED","Directory handle was closed")}r.d(t,{Vw:()=>n,bk:()=>o,hq:()=>i,Ch:()=>s,z6:()=>a,Ab:()=>c,GA:()=>g,cT:()=>l,YW:()=>u,re:()=>h,Hs:()=>p,Xh:()=>d,Yn:()=>C});class C extends Error{constructor(e,t){super(e),this.name="Libzip Error",this.code=t}}},43896:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AliasFS:()=>u.K,CwdFS:()=>h.M,DEFAULT_COMPRESSION_LEVEL:()=>l.k,FakeFS:()=>g.uY,Filename:()=>s.QS,JailFS:()=>p.n,LazyFS:()=>d.v,NoFS:()=>f,NodeFS:()=>i.S,PortablePath:()=>s.LZ,PosixFS:()=>I.i,ProxiedFS:()=>E.p,VirtualFS:()=>B.p,ZipFS:()=>l.d,ZipOpenFS:()=>y.A,extendFs:()=>Q,normalizeLineEndings:()=>g.qH,npath:()=>s.cS,opendir:()=>c.a,patchFs:()=>w,ppath:()=>s.y1,statUtils:()=>a,toFilename:()=>s.Zu,xfs:()=>S});var A=r(12087),n=r.n(A),o=r(31669),i=r(78420),s=r(46009),a=r(65760),c=r(19697),g=r(5944),l=r(90739),u=r(14626),h=r(75448),p=r(10489),d=r(15037);const C=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"});class f extends g.uY{constructor(){super(s.y1)}getExtractHint(){throw C()}getRealPath(){throw C()}resolve(){throw C()}async openPromise(){throw C()}openSync(){throw C()}async opendirPromise(){throw C()}opendirSync(){throw C()}async readPromise(){throw C()}readSync(){throw C()}async writePromise(){throw C()}writeSync(){throw C()}async closePromise(){throw C()}closeSync(){throw C()}createWriteStream(){throw C()}createReadStream(){throw C()}async realpathPromise(){throw C()}realpathSync(){throw C()}async readdirPromise(){throw C()}readdirSync(){throw C()}async existsPromise(e){throw C()}existsSync(e){throw C()}async accessPromise(){throw C()}accessSync(){throw C()}async statPromise(){throw C()}statSync(){throw C()}async lstatPromise(e){throw C()}lstatSync(e){throw C()}async chmodPromise(){throw C()}chmodSync(){throw C()}async chownPromise(){throw C()}chownSync(){throw C()}async mkdirPromise(){throw C()}mkdirSync(){throw C()}async rmdirPromise(){throw C()}rmdirSync(){throw C()}async linkPromise(){throw C()}linkSync(){throw C()}async symlinkPromise(){throw C()}symlinkSync(){throw C()}async renamePromise(){throw C()}renameSync(){throw C()}async copyFilePromise(){throw C()}copyFileSync(){throw C()}async appendFilePromise(){throw C()}appendFileSync(){throw C()}async writeFilePromise(){throw C()}writeFileSync(){throw C()}async unlinkPromise(){throw C()}unlinkSync(){throw C()}async utimesPromise(){throw C()}utimesSync(){throw C()}async readFilePromise(){throw C()}readFileSync(){throw C()}async readlinkPromise(){throw C()}readlinkSync(){throw C()}async truncatePromise(){throw C()}truncateSync(){throw C()}watch(){throw C()}watchFile(){throw C()}unwatchFile(){throw C()}}f.instance=new f;var I=r(39725),E=r(42096),B=r(17674),y=r(53660);function m(e){const t=s.cS.toPortablePath(n().tmpdir()),r=Math.ceil(4294967296*Math.random()).toString(16).padStart(8,"0");return s.y1.join(t,`${e}${r}`)}function w(e,t){const r=new Set(["accessSync","appendFileSync","createReadStream","chmodSync","chownSync","closeSync","copyFileSync","linkSync","lstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),A=new Set(["accessPromise","appendFilePromise","chmodPromise","chownPromise","closePromise","copyFilePromise","linkPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","truncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"]),n=new Set(["appendFilePromise","chmodPromise","chownPromise","closePromise","readPromise","readFilePromise","statPromise","truncatePromise","utimesPromise","writePromise","writeFilePromise"]),i=(e,t,r)=>{const A=e[t];e[t]=r,void 0!==(null==A?void 0:A[o.promisify.custom])&&(r[o.promisify.custom]=A[o.promisify.custom])};i(e,"exists",(e,...r)=>{const A="function"==typeof r[r.length-1]?r.pop():()=>{};process.nextTick(()=>{t.existsPromise(e).then(e=>{A(e)},()=>{A(!1)})})}),i(e,"read",(e,r,...A)=>{const n="function"==typeof A[A.length-1]?A.pop():()=>{};process.nextTick(()=>{t.readPromise(e,r,...A).then(e=>{n(null,e,r)},e=>{n(e)})})});for(const r of A){const A=r.replace(/Promise$/,"");if(void 0===e[A])continue;const n=t[r];if(void 0===n)continue;i(e,A,(...e)=>{const r="function"==typeof e[e.length-1]?e.pop():()=>{};process.nextTick(()=>{n.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 A of r){const r=A;if(void 0===e[r])continue;const n=t[A];void 0!==n&&i(e,r,n.bind(t))}e.realpathSync.native=e.realpathSync;{const r=process.emitWarning;let o;process.emitWarning=()=>{};try{o=e.promises}finally{process.emitWarning=r}if(void 0!==o){for(const e of A){const r=e.replace(/Promise$/,"");if(void 0===o[r])continue;const A=t[e];void 0!==A&&("open"!==e&&i(o,r,A.bind(t)))}class e{constructor(e){this.fd=e}}for(const r of n){const A=r.replace(/Promise$/,""),n=t[r];void 0!==n&&i(e.prototype,A,(function(...e){return n.call(t,this.fd,...e)}))}i(o,"open",async(...r)=>{const A=await t.openPromise(...r);return new e(A)})}}e.read[o.promisify.custom]=async(e,r,...A)=>{const n=t.readPromise(e,r,...A);return{bytesRead:await n,buffer:r}}}function Q(e,t){const r=Object.create(e);return w(r,t),r}const D=new Set;let b=!1;function v(){b||(b=!0,process.once("exit",()=>{S.rmtempSync()}))}const S=Object.assign(new i.S,{detachTemp(e){D.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(D.add(r),void 0===e)return t;try{return e(r)}finally{if(D.has(r)){D.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(D.add(r),void 0===e)return r;try{return await e(r)}finally{if(D.has(r)){D.delete(r);try{await this.removePromise(r)}catch(e){}}}}},async rmtempPromise(){await Promise.all(Array.from(D.values()).map(async e=>{try{await S.removePromise(e,{maxRetries:0}),D.delete(e)}catch(e){}}))},rmtempSync(){for(const e of D)try{S.removeSync(e),D.delete(e)}catch(e){}}})},46009:(e,t,r)=>{"use strict";r.d(t,{LZ:()=>i,QS:()=>s,cS:()=>a,y1:()=>c,CI:()=>f,Zu:()=>I});var A,n=r(85622),o=r.n(n);!function(e){e[e.File=0]="File",e[e.Portable=1]="Portable",e[e.Native=2]="Native"}(A||(A={}));const i={root:"/",dot:"."},s={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",pnpJs:".pnp.js",rc:".yarnrc.yml"},a=Object.create(o()),c=Object.create(o().posix);a.cwd=()=>process.cwd(),c.cwd=()=>C(process.cwd()),c.resolve=(...e)=>e.length>0&&c.isAbsolute(e[0])?o().posix.resolve(...e):o().posix.resolve(c.cwd(),...e);const g=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=d,a.toPortablePath=C,a.contains=(e,t)=>g(a,e,t),c.contains=(e,t)=>g(c,e,t);const l=/^([a-zA-Z]:.*)$/,u=/^\\\\(\.\\)?(.*)$/,h=/^\/([a-zA-Z]:.*)$/,p=/^\/unc\/(\.dot\/)?(.*)$/;function d(e){if("win32"!==process.platform)return e;if(e.match(h))e=e.replace(h,"$1");else{if(!e.match(p))return e;e=e.replace(p,(e,t,r)=>`\\\\${t?".\\":""}${r}`)}return e.replace(/\//g,"\\")}function C(e){return"win32"!==process.platform?e:(e.match(l)?e=e.replace(l,"/$1"):e.match(u)&&(e=e.replace(u,(e,t,r)=>`/unc/${t?".dot/":""}${r}`)),e.replace(/\\/g,"/"))}function f(e,t){return e===a?d(t):C(t)}function I(e){if(""!==a.parse(e).dir||""!==c.parse(e).dir)throw new Error(`Invalid filename: "${e}"`);return e}},65760:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DirEntry:()=>n,StatEntry:()=>o,makeDefaultStats:()=>i,makeEmptyStats:()=>s,areStatsEqual:()=>a});var A=r(22004);class n{constructor(){this.name="",this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&A.wK)===A.QB}isFIFO(){return!1}isFile(){return(this.mode&A.wK)===A.Pe}isSocket(){return!1}isSymbolicLink(){return(this.mode&A.wK)===A.Zv}}class o{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(this.mode&A.wK)===A.QB}isFIFO(){return!1}isFile(){return(this.mode&A.wK)===A.Pe}isSocket(){return!1}isSymbolicLink(){return(this.mode&A.wK)===A.Zv}}function i(){return Object.assign(new o,{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:420|A.Pe})}function s(){return Object.assign(i(),{nlink:0,blocks:0,mode:0})}function a(e,t){return e.atimeMs===t.atimeMs&&(e.birthtimeMs===t.birthtimeMs&&(e.blksize===t.blksize&&(e.blocks===t.blocks&&(e.ctimeMs===t.ctimeMs&&(e.dev===t.dev&&(e.gid===t.gid&&(e.ino===t.ino&&(e.isBlockDevice()===t.isBlockDevice()&&(e.isCharacterDevice()===t.isCharacterDevice()&&(e.isDirectory()===t.isDirectory()&&(e.isFIFO()===t.isFIFO()&&(e.isFile()===t.isFile()&&(e.isSocket()===t.isSocket()&&(e.isSymbolicLink()===t.isSymbolicLink()&&(e.mode===t.mode&&(e.mtimeMs===t.mtimeMs&&(e.nlink===t.nlink&&(e.rdev===t.rdev&&(e.size===t.size&&e.uid===t.uid)))))))))))))))))))}},65281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getLibzipPromise:()=>s,getLibzipSync:()=>i});const A=["number","number"];var n;!function(e){e[e.ZIP_ER_OK=0]="ZIP_ER_OK",e[e.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",e[e.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",e[e.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",e[e.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",e[e.ZIP_ER_READ=5]="ZIP_ER_READ",e[e.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",e[e.ZIP_ER_CRC=7]="ZIP_ER_CRC",e[e.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",e[e.ZIP_ER_NOENT=9]="ZIP_ER_NOENT",e[e.ZIP_ER_EXISTS=10]="ZIP_ER_EXISTS",e[e.ZIP_ER_OPEN=11]="ZIP_ER_OPEN",e[e.ZIP_ER_TMPOPEN=12]="ZIP_ER_TMPOPEN",e[e.ZIP_ER_ZLIB=13]="ZIP_ER_ZLIB",e[e.ZIP_ER_MEMORY=14]="ZIP_ER_MEMORY",e[e.ZIP_ER_CHANGED=15]="ZIP_ER_CHANGED",e[e.ZIP_ER_COMPNOTSUPP=16]="ZIP_ER_COMPNOTSUPP",e[e.ZIP_ER_EOF=17]="ZIP_ER_EOF",e[e.ZIP_ER_INVAL=18]="ZIP_ER_INVAL",e[e.ZIP_ER_NOZIP=19]="ZIP_ER_NOZIP",e[e.ZIP_ER_INTERNAL=20]="ZIP_ER_INTERNAL",e[e.ZIP_ER_INCONS=21]="ZIP_ER_INCONS",e[e.ZIP_ER_REMOVE=22]="ZIP_ER_REMOVE",e[e.ZIP_ER_DELETED=23]="ZIP_ER_DELETED",e[e.ZIP_ER_ENCRNOTSUPP=24]="ZIP_ER_ENCRNOTSUPP",e[e.ZIP_ER_RDONLY=25]="ZIP_ER_RDONLY",e[e.ZIP_ER_NOPASSWD=26]="ZIP_ER_NOPASSWD",e[e.ZIP_ER_WRONGPASSWD=27]="ZIP_ER_WRONGPASSWD",e[e.ZIP_ER_OPNOTSUPP=28]="ZIP_ER_OPNOTSUPP",e[e.ZIP_ER_INUSE=29]="ZIP_ER_INUSE",e[e.ZIP_ER_TELL=30]="ZIP_ER_TELL",e[e.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA"}(n||(n={}));let o=null;function i(){var e;return null===o&&(e=r(3368),o={get HEAP8(){return e.HEAP8},get HEAPU8(){return e.HEAPU8},errors:n,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_FL_COMPRESSED:4,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"]),delete:e.cwrap("zip_delete","number",["number","number"]),stat:e.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:e.cwrap("zip_stat_index","number",["number",...A,"number","number"]),fopen:e.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:e.cwrap("zip_fopen_index","number",["number",...A,"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",...A,"number","number","number"]),setExternalAttributes:e.cwrap("zip_file_set_external_attributes","number",["number",...A,"number","number","number"]),setMtime:e.cwrap("zip_file_set_mtime","number",["number",...A,"number","number"]),setCompression:e.cwrap("zip_set_file_compression","number",["number",...A,"number","number"])},ext:{countSymlinks:e.cwrap("zip_ext_count_symlinks","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",...A,"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",...A,"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"]),statCompSize:e.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:e.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:e.cwrap("zipstruct_stat_mtime","number",["number"]),error:e.cwrap("zipstruct_error","number",[]),errorS:e.cwrap("zipstruct_errorS","number",[]),errorCodeZip:e.cwrap("zipstruct_error_code_zip","number",["number"])}}),o}async function s(){return i()}},11640:(e,t,r)=>{"use strict";r.r(t),r.d(t,{parseResolution:()=>i,parseShell:()=>n,parseSyml:()=>I,stringifyResolution:()=>s,stringifySyml:()=>d});var A=r(92962);function n(e,t={isGlobPattern:()=>!1}){try{return(0,A.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 i(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 s(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 g=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,l=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"];class u{constructor(e){this.data=e}}function h(e){return e.match(g)?e:JSON.stringify(e)}function p(e,t,r){if(null===e)return"null\n";if("number"==typeof e||"boolean"==typeof e)return e.toString()+"\n";if("string"==typeof e)return h(e)+"\n";if(Array.isArray(e)){if(0===e.length)return"[]\n";const r=" ".repeat(t);return"\n"+e.map(e=>`${r}- ${p(e,t+1,!1)}`).join("")}if("object"==typeof e&&e){let A,n;e instanceof u?(A=e.data,n=!1):(A=e,n=!0);const o=" ".repeat(t),i=Object.keys(A);n&&i.sort((e,t)=>{const r=l.indexOf(e),A=l.indexOf(t);return-1===r&&-1===A?e<t?-1:e>t?1:0:-1!==r&&-1===A?-1:-1===r&&-1!==A?1:r-A});const s=i.filter(e=>!function e(t){return void 0===t||"object"==typeof t&&null!==t&&Object.keys(t).every(r=>e(t[r]))}(A[e])).map((e,n)=>{const i=A[e],s=h(e),a=p(i,t+1,!0),c=n>0||r?o:"";return a.startsWith("\n")?`${c}${s}:${a}`:`${c}${s}: ${a}`}).join(0===t?"\n":"")||"\n";return r?"\n"+s:""+s}throw new Error(`Unsupported value type (${e})`)}function d(e){try{const t=p(e,0,!1);return"\n"!==t?t:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}d.PreserveOrdering=u;const C=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function f(e){if(C.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 I(e){return f(e)}},34432:(e,t,r)=>{"use strict";var A,n;r.d(t,{gY:()=>E,Q$:()=>B,oC:()=>F}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(A||(A={})),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"}(n||(n={}));const o={[n.DEFAULT]:{collapsed:!1,next:{"*":n.DEFAULT}},[n.TOP_LEVEL]:{collapsed:!1,next:{fallbackExclusionList:n.FALLBACK_EXCLUSION_LIST,packageRegistryData:n.PACKAGE_REGISTRY_DATA,"*":n.DEFAULT}},[n.FALLBACK_EXCLUSION_LIST]:{collapsed:!1,next:{"*":n.FALLBACK_EXCLUSION_ENTRIES}},[n.FALLBACK_EXCLUSION_ENTRIES]:{collapsed:!0,next:{"*":n.FALLBACK_EXCLUSION_DATA}},[n.FALLBACK_EXCLUSION_DATA]:{collapsed:!0,next:{"*":n.DEFAULT}},[n.PACKAGE_REGISTRY_DATA]:{collapsed:!1,next:{"*":n.PACKAGE_REGISTRY_ENTRIES}},[n.PACKAGE_REGISTRY_ENTRIES]:{collapsed:!0,next:{"*":n.PACKAGE_STORE_DATA}},[n.PACKAGE_STORE_DATA]:{collapsed:!1,next:{"*":n.PACKAGE_STORE_ENTRIES}},[n.PACKAGE_STORE_ENTRIES]:{collapsed:!0,next:{"*":n.PACKAGE_INFORMATION_DATA}},[n.PACKAGE_INFORMATION_DATA]:{collapsed:!1,next:{packageDependencies:n.PACKAGE_DEPENDENCIES,"*":n.DEFAULT}},[n.PACKAGE_DEPENDENCIES]:{collapsed:!1,next:{"*":n.PACKAGE_DEPENDENCY}},[n.PACKAGE_DEPENDENCY]:{collapsed:!0,next:{"*":n.DEFAULT}}};function i(e,t,r,A){const{next:n}=o[r];return s(t,n[e]||n["*"],A)}function s(e,t,r){const{collapsed:A}=o[t];return Array.isArray(e)?A?function(e,t,r){let A="";A+="[";for(let n=0,o=e.length;n<o;++n)A+=i(String(n),e[n],t,r).replace(/^ +/g,""),n+1<o&&(A+=", ");return A+="]",A}(e,t,r):function(e,t,r){const A=r+" ";let n="";n+=r,n+="[\n";for(let r=0,o=e.length;r<o;++r)n+=A+i(String(r),e[r],t,A).replace(/^ +/,""),r+1<o&&(n+=","),n+="\n";return n+=r,n+="]",n}(e,t,r):"object"==typeof e&&null!==e?A?function(e,t,r){const A=Object.keys(e);let n="";n+="{";for(let o=0,s=A.length;o<s;++o){const a=A[o],c=e[a];void 0!==c&&(n+=JSON.stringify(a),n+=": ",n+=i(a,c,t,r).replace(/^ +/g,""),o+1<s&&(n+=", "))}return n+="}",n}(e,t,r):function(e,t,r){const A=Object.keys(e),n=r+" ";let o="";o+=r,o+="{\n";for(let r=0,s=A.length;r<s;++r){const a=A[r],c=e[a];void 0!==c&&(o+=n,o+=JSON.stringify(a),o+=": ",o+=i(a,c,t,n).replace(/^ +/g,""),r+1<s&&(o+=","),o+="\n")}return o+=r,o+="}",o}(e,t,r):JSON.stringify(e)}function a(e){return s(e,n.TOP_LEVEL,"")}function c(e,t){const r=Array.from(e);Array.isArray(t)||(t=[t]);const A=[];for(const e of t)A.push(r.map(t=>e(t)));const n=r.map((e,t)=>t);return n.sort((e,t)=>{for(const r of A){const A=r[e]<r[t]?-1:r[e]>r[t]?1:0;if(0!==A)return A}return 0}),n.map(e=>r[e])}function g(e){const t=new Map,r=c(e.fallbackExclusionList||[],[({name:e,reference:t})=>e,({name:e,reference:t})=>t]);for(const{name:e,reference:A}of r){let r=t.get(e);void 0===r&&t.set(e,r=new Set),r.add(A)}return Array.from(t).map(([e,t])=>[e,Array.from(t)])}function l(e){return c(e.fallbackPool||[],([e])=>e)}function u(e){const t=[];for(const[r,A]of c(e.packageRegistry,([e])=>null===e?"0":"1"+e)){const e=[];t.push([r,e]);for(const[t,{packageLocation:n,packageDependencies:o,packagePeers:i,linkType:s,discardFromLookup:a}]of c(A,([e])=>null===e?"0":"1"+e)){const A=[];null===r||null===t||o.has(r)||A.push([r,t]);for(const[e,t]of c(o.entries(),([e])=>e))A.push([e,t]);const g=i&&i.size>0?Array.from(i):void 0,l=a||void 0;e.push([t,{packageLocation:n,packageDependencies:A,packagePeers:g,linkType:s,discardFromLookup:l}])}}return t}function h(e){return c(e.blacklistedLocations||[],e=>e)}function p(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:g(e),fallbackPool:l(e),locationBlacklistData:h(e),packageRegistryData:u(e)}}var d=r(20103),C=r.n(d);function f(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",C()()].join("")}function I(e){return JSON.stringify(e,null,2)}function E(e){const t=function(e){return[`return hydrateRuntimeState(${a(e)}, {basePath: basePath || __dirname});\n`].join("")}(p(e));return f(e.shebang,t)}function B(e){const t=p(e),r=(A=e.dataLocation,["var path = require('path');\n",`var dataLocation = path.resolve(__dirname, ${JSON.stringify(A)});\n`,"return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)});\n"].join(""));var A;const n=f(e.shebang,r);return{dataFile:I(t),loaderFile:n}}var y=r(35747),m=(r(85622),r(31669)),w=r(46009);var Q,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"}(Q||(Q={}));const v=new Set([Q.BLACKLISTED,Q.BUILTIN_NODE_RESOLUTION_FAILED,Q.MISSING_DEPENDENCY,Q.MISSING_PEER_DEPENDENCY,Q.QUALIFIED_PATH_RESOLUTION_FAILED,Q.UNDECLARED_DEPENDENCY]);function S(e,t,r={}){const A=v.has(e)?"MODULE_NOT_FOUND":e,n={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(t),{code:{...n,value:A},pnpCode:{...n,value:e},data:{...n,value:r}})}function k(e){return w.cS.normalize(w.cS.fromPortablePath(e))}function N(e,t){const r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,A=Number(process.env.PNP_DEBUG_LEVEL),n=new Set(b.Module.builtinModules||Object.keys(process.binding("natives"))),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/,i=/^(\/|\.{1,2}(\/|$))/,s=/\/$/,a={name:null,reference:null},c=[],g=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:u,packageLocatorsByLocations:h,packageLocationLengths:p}=e;function d(e,t){return{fn:e,args:t,error:null,result:null}}function C(e,r){if(!1===t.allowDebug)return r;if(Number.isFinite(A)){if(A>=2)return(...t)=>{const A=d(e,t);try{return A.result=r(...t)}catch(e){throw A.error=e}finally{console.trace(A)}};if(A>=1)return(...t)=>{try{return r(...t)}catch(r){const A=d(e,t);throw A.error=r,console.trace(A),r}}}return r}function f(e){const t=y(e);if(!t)throw S(Q.INTERNAL,"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return t}function I(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 E(e,t){return t.endsWith("/")&&(t=w.y1.join(t,"internal.js")),b.Module._resolveFilename(w.cS.fromPortablePath(e),function(e){const t=new b.Module(e,null);return t.filename=e,t.paths=b.Module._nodeModulePaths(e),t}(w.cS.fromPortablePath(t)),!1,{plugnplay:!1})}function B(t){if(null===l)return!1;const r=w.y1.contains(e.basePath,t);return null!==r&&!!l.test(r.replace(/\/$/,""))}function y({name:e,reference:t}){const r=u.get(e);if(!r)return null;const A=r.get(t);return A||null}function m(e,t){const r=new Map,A=new Set,n=t=>{const o=JSON.stringify(t.name);if(A.has(o))return;A.add(o);const i=function({name:e,reference:t}){const r=[];for(const[A,n]of u)if(null!==A)for(const[o,i]of n){if(null===o)continue;i.packageDependencies.get(e)===t&&(A===e&&o===t||r.push({name:A,reference:o}))}return r}(t);for(const t of i){if(f(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 o=[];for(const e of[...r.keys()].sort())for(const t of[...r.get(e)].sort())o.push({name:e,reference:t});return o}function v(t){if(B(t))return null;let r=(A=w.y1.relative(e.basePath,t),w.cS.toPortablePath(A));var A;r.match(i)||(r="./"+r),t.match(s)&&!r.endsWith("/")&&(r+="/");let n=0;for(;n<p.length&&p[n]>r.length;)n+=1;for(let e=n;e<p.length;++e){const A=h.get(r.substr(0,p[e]));if(void 0!==A){if(null===A){const e=k(t);throw S(Q.BLACKLISTED,"A forbidden path has been used in the package resolution process - this is usually caused by one of your tools calling 'fs.realpath' on the return value of 'require.resolve'. Since we need to use symlinks to simultaneously provide valid filesystem paths and disambiguate peer dependencies, they must be passed untransformed to 'require'.\n\nForbidden path: "+e,{location:e})}return A}}return null}function N(A,i,{considerBuiltins:a=!0}={}){if("pnpapi"===A)return w.cS.toPortablePath(t.pnpapiResolution);if(a&&n.has(A))return null;const l=k(A),u=i&&k(i);if(i&&B(i)&&(!w.y1.isAbsolute(A)||null===v(A))){const e=E(A,i);if(!1===e)throw S(Q.BUILTIN_NODE_RESOLUTION_FAILED,`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp)\n\nRequire request: "${l}"\nRequired by: ${u}\n`,{request:l,issuer:u});return w.cS.toPortablePath(e)}let h;const p=A.match(o);if(p){if(!i)throw S(Q.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:l,issuer:u});const[,t,o]=p,s=v(i);if(!s){const e=E(A,i);if(!1===e)throw S(Q.BUILTIN_NODE_RESOLUTION_FAILED,`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).\n\nRequire path: "${l}"\nRequired by: ${u}\n`,{request:l,issuer:u});return w.cS.toPortablePath(e)}let d=f(s).packageDependencies.get(t),C=null;if(null==d&&null!==s.name){const A=e.fallbackExclusionList.get(s.name);if(!A||!A.has(s.reference)){for(let e=0,A=c.length;e<A;++e){const A=f(c[e]).packageDependencies.get(t);if(null!=A){r?C=A:d=A;break}}if(e.enableTopLevelFallback&&null==d&&null===C){const r=e.fallbackPool.get(t);null!=r&&(C=r)}}}let B=null;if(null===d)if(I(s))B=S(Q.MISSING_PEER_DEPENDENCY,`Your application tried to access ${t} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t});else{const e=m(t,s);B=e.every(e=>I(e))?S(Q.MISSING_PEER_DEPENDENCY,`${s.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 "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t,brokenAncestors:e}):S(Q.MISSING_PEER_DEPENDENCY,`${s.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 "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t,brokenAncestors:e})}else void 0===d&&(B=!a&&n.has(A)?I(s)?S(Q.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${t} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t}):S(Q.UNDECLARED_DEPENDENCY,`${s.name} tried to access ${t}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${t} isn't otherwise declared in ${s.name}'s dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t}):I(s)?S(Q.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 "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t}):S(Q.UNDECLARED_DEPENDENCY,`${s.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 "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t}));if(null==d){if(null===C||null===B)throw B||new Error("Assertion failed: Expected an error to have been set");d=C;const e=B.message.replace(/\n.*/g,"");B.message=e,g.has(e)||(g.add(e),process.emitWarning(B))}const y=Array.isArray(d)?{name:d[0],reference:d[1]}:{name:t,reference:d},D=f(y);if(!D.packageLocation)throw S(Q.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: ${y.name}@${y.reference} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n`,{request:l,issuer:u,dependencyLocator:Object.assign({},y)});const b=D.packageLocation;h=o?w.y1.join(b,o):b}else{if(w.y1.isAbsolute(A))h=w.y1.normalize(A);else{if(!i)throw S(Q.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:l,issuer:u});const e=w.y1.resolve(i);h=i.match(s)?w.y1.normalize(w.y1.join(e,A)):w.y1.normalize(w.y1.join(w.y1.dirname(e),A))}v(h)}return w.y1.normalize(h)}function F(e,{extensions:r=Object.keys(b.Module._extensions)}={}){const A=[],n=function e(r,A,{extensions:n}){let o;try{A.push(r),o=t.fakeFs.statSync(r)}catch(e){}if(o&&!o.isDirectory())return t.fakeFs.realpathSync(r);if(o&&o.isDirectory()){let o,i;try{o=JSON.parse(t.fakeFs.readFileSync(w.y1.join(r,"package.json"),"utf8"))}catch(e){}if(o&&o.main&&(i=w.y1.resolve(r,o.main)),i&&i!==r){const t=e(i,A,{extensions:n});if(null!==t)return t}}for(let e=0,o=n.length;e<o;e++){const o=`${r}${n[e]}`;if(A.push(o),t.fakeFs.existsSync(o))return o}if(o&&o.isDirectory())for(let e=0,o=n.length;e<o;e++){const o=w.y1.format({dir:r,name:"index",ext:n[e]});if(A.push(o),t.fakeFs.existsSync(o))return o}return null}(e,A,{extensions:r});if(n)return w.y1.normalize(n);{const t=k(e);throw S(Q.QUALIFIED_PATH_RESOLUTION_FAILED,`Qualified path resolution failed - none of the candidates can be found on the disk.\n\nSource path: ${t}\n${A.map(e=>`Rejected candidate: ${k(e)}\n`).join("")}`,{unqualifiedPath:t})}}return{VERSIONS:{std:3,resolveVirtual:1,getAllLocators:1},topLevel:a,getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getAllLocators(){const e=[];for(const[t,r]of u)for(const A of r.keys())null!==t&&null!==A&&e.push({name:t,reference:A});return e},getPackageInformation:e=>{const t=y(e);if(null===t)return null;const r=w.cS.fromPortablePath(t.packageLocation);return{...t,packageLocation:r}},findPackageLocator:e=>v(w.cS.toPortablePath(e)),resolveToUnqualified:C("resolveToUnqualified",(e,t,r)=>{const A=null!==t?w.cS.toPortablePath(t):null,n=N(w.cS.toPortablePath(e),A,r);return null===n?null:w.cS.fromPortablePath(n)}),resolveUnqualified:C("resolveUnqualified",(e,t)=>w.cS.fromPortablePath(F(w.cS.toPortablePath(e),t))),resolveRequest:C("resolveRequest",(e,t,r)=>{const A=null!==t?w.cS.toPortablePath(t):null,n=function(e,t,{considerBuiltins:r,extensions:A}={}){const n=N(e,t,{considerBuiltins:r});if(null===n)return null;try{return F(n,{extensions:A})}catch(r){throw"QUALIFIED_PATH_RESOLUTION_FAILED"===r.pnpCode&&Object.assign(r.data,{request:k(e),issuer:t&&k(t)}),r}}(w.cS.toPortablePath(e),A,r);return null===n?null:w.cS.fromPortablePath(n)}),resolveVirtual:C("resolveVirtual",e=>{const t=function(e){const t=w.y1.normalize(e),r=D.p.resolveVirtual(t);return r!==t?r:null}(w.cS.toPortablePath(e));return null!==t?w.cS.fromPortablePath(t):null})}}(0,m.promisify)(y.readFile);const F=(e,t,r)=>N(function(e,{basePath:t}){const r=w.cS.toPortablePath(t),A=w.y1.resolve(r),n=null!==e.ignorePatternData?new RegExp(e.ignorePatternData):null,o=new Map(e.packageRegistryData.map(([e,t])=>[e,new Map(t.map(([e,t])=>[e,{packageLocation:w.y1.join(A,t.packageLocation),packageDependencies:new Map(t.packageDependencies),packagePeers:new Set(t.packagePeers),linkType:t.linkType,discardFromLookup:t.discardFromLookup||!1}]))])),i=new Map,s=new Set;for(const[t,r]of e.packageRegistryData)for(const[e,A]of r){if(null===t!=(null===e))throw new Error("Assertion failed: The name and reference should be null, or neither should");if(A.discardFromLookup)continue;const r={name:t,reference:e};i.set(A.packageLocation,r),s.add(A.packageLocation.length)}for(const t of e.locationBlacklistData)i.set(t,null);const a=new Map(e.fallbackExclusionList.map(([e,t])=>[e,new Set(t)])),c=new Map(e.fallbackPool);return{basePath:r,dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback,fallbackExclusionList:a,fallbackPool:c,ignorePattern:n,packageLocationLengths:[...s].sort((e,t)=>t-e),packageLocatorsByLocations:i,packageRegistry:o}}(p(e),{basePath:t}),{fakeFs:r,pnpapiResolution:w.cS.join(t,".pnp.js")})},76756:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShellError:()=>c,execute:()=>Z,globUtils:()=>A});var A={};r.r(A),r.d(A,{fastGlobOptions:()=>E,isBraceExpansion:()=>m,isGlobPattern:()=>B,match:()=>y,micromatchOptions:()=>I});var n=r(46009),o=r(78420),i=r(11640),s=r(12087),a=r(92413);class c extends Error{constructor(e){super(e),this.name="ShellError"}}var g=r(43896),l=r(39725),u=r(19347),h=r.n(u),p=r(35747),d=r.n(p),C=r(2401),f=r.n(C);const I={strictBrackets:!0},E={onlyDirectories:!1,onlyFiles:!1};function B(e){if(!f().scan(e,I).isGlob)return!1;try{f().parse(e,I)}catch(e){return!1}return!0}function y(e,{cwd:t,baseFs:r}){return h()(e,{...E,cwd:n.cS.fromPortablePath(t),fs:(0,g.extendFs)(d(),new l.i(r))})}function m(e){return f().scan(e,I).isBrace}var w,Q=r(67566),D=r.n(Q);function b(){}!function(e){e[e.STDIN=0]="STDIN",e[e.STDOUT=1]="STDOUT",e[e.STDERR=2]="STDERR"}(w||(w={}));let v=0;class S{constructor(e){this.stream=e}close(){}get(){return this.stream}}class k{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 N{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:A}){const n=new N(null,e);return n.stdin=t,n.stdout=r,n.stderr=A,n}pipeTo(e,t=w.STDOUT){const r=new N(this,e),A=new k;return r.pipe=A,r.stdout=this.stdout,r.stderr=this.stderr,(t&w.STDOUT)===w.STDOUT?this.stdout=A:null!==this.ancestor&&(this.stderr=this.ancestor.stdout),(t&w.STDERR)===w.STDERR?this.stderr=A: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 A=this.implementation(e);return this.pipe&&this.pipe.attach(A.stdin),await A.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 F(e,t){return N.start(e,t)}var K;function M(e,t,r){const A=new a.PassThrough({autoDestroy:!0});switch(e){case w.STDIN:(t&K.Readable)===K.Readable&&r.stdin.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&r.stdin instanceof a.Writable&&A.pipe(r.stdin,{end:!1});break;case w.STDOUT:(t&K.Readable)===K.Readable&&r.stdout.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&A.pipe(r.stdout,{end:!1});break;case w.STDERR:(t&K.Readable)===K.Readable&&r.stderr.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&A.pipe(r.stderr,{end:!1});break;default:throw new c(`Bad file descriptor: "${e}"`)}return A}function R(e,t={}){const r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}!function(e){e[e.Readable=1]="Readable",e[e.Writable=2]="Writable"}(K||(K={}));const x=new Map([["cd",async([e=(0,s.homedir)(),...t],r,A)=>{const o=n.y1.resolve(A.cwd,n.cS.toPortablePath(e));return(await r.baseFs.statPromise(o)).isDirectory()?(A.cwd=o,0):(A.stderr.write("cd: not a directory\n"),1)}],["pwd",async(e,t,r)=>(r.stdout.write(n.cS.fromPortablePath(r.cwd)+"\n"),0)],[":",async(e,t,r)=>0],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,A)=>A.exitCode=parseInt(null!=e?e:A.variables["?"],10)],["echo",async(e,t,r)=>(r.stdout.write(e.join(" ")+"\n"),0)],["__ysh_run_procedure",async(e,t,r)=>{const A=r.procedures[e[0]];return await F(A,{stdin:new S(r.stdin),stdout:new S(r.stdout),stderr:new S(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let A=r.stdin,o=r.stdout;const i=r.stderr,s=[],c=[];let g=0;for(;"--"!==e[g];){const A=e[g++],o=Number(e[g++]),i=g+o;for(let o=g;o<i;++g,++o)switch(A){case"<":s.push(()=>t.baseFs.createReadStream(n.y1.resolve(r.cwd,n.cS.toPortablePath(e[o]))));break;case"<<<":s.push(()=>{const t=new a.PassThrough;return process.nextTick(()=>{t.write(e[o]+"\n"),t.end()}),t});break;case"<&":s.push(()=>M(Number(e[o]),K.Readable,r));break;case">":case">>":{const i=n.y1.resolve(r.cwd,n.cS.toPortablePath(e[o]));"/dev/null"===i?c.push(new a.Writable({autoDestroy:!0,emitClose:!0,write(e,t,r){setImmediate(r)}})):c.push(t.baseFs.createWriteStream(i,">>"===A?{flags:"a"}:void 0))}break;case">&":c.push(M(Number(e[o]),K.Writable,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${A}"`)}}if(s.length>0){const e=new a.PassThrough;A=e;const t=r=>{if(r===s.length)e.end();else{const A=s[r]();A.pipe(e,{end:!1}),A.on("end",()=>{t(r+1)})}};t(0)}if(c.length>0){const e=new a.PassThrough;o=e;for(const t of c)e.pipe(t)}const l=await F(G(e.slice(g+1),t,r),{stdin:new S(A),stdout:new S(o),stderr:new S(i)}).run();return await Promise.all(c.map(e=>new Promise(t=>{e.on("close",()=>{t()}),e.end()}))),l}]]);async function L(e,t,r){const A=[],n=new a.PassThrough;return n.on("data",e=>A.push(e)),await W(e,t,R(r,{stdout:n})),Buffer.concat(A).toString().replace(/[\r\n]+$/,"")}async function P(e,t,r){const A=e.map(async e=>{const A=await Y(e.args,t,r);return{name:e.name,value:A.join(" ")}});return(await Promise.all(A)).reduce((e,t)=>(e[t.name]=t.value,e),{})}function O(e){return e.match(/[^ \r\n\t]+/g)||[]}async function U(e,t,r,A,n=A){switch(e.name){case"$":A(String(process.pid));break;case"#":A(String(t.args.length));break;case"@":if(e.quoted)for(const e of t.args)n(e);else for(const e of t.args){const t=O(e);for(let e=0;e<t.length-1;++e)n(t[e]);A(t[t.length-1])}break;case"*":{const r=t.args.join(" ");if(e.quoted)A(r);else for(const e of O(r))n(e)}break;case"PPID":A(String(process.ppid));break;case"RANDOM":A(String(Math.floor(32768*Math.random())));break;default:{const n=parseInt(e.name,10);if(Number.isFinite(n))if(n>=0&&n<t.args.length)A(t.args[n]);else{if(!e.defaultValue)throw new c("Unbound argument #"+n);A((await Y(e.defaultValue,t,r)).join(" "))}else if(Object.prototype.hasOwnProperty.call(r.variables,e.name))A(r.variables[e.name]);else if(Object.prototype.hasOwnProperty.call(r.environment,e.name))A(r.environment[e.name]);else{if(!e.defaultValue)throw new c(`Unbound variable "${e.name}"`);A((await Y(e.defaultValue,t,r)).join(" "))}}}}const T={addition:(e,t)=>e+t,subtraction:(e,t)=>e-t,multiplication:(e,t)=>e*t,division:(e,t)=>Math.trunc(e/t)};async function j(e,t,r){if("number"===e.type){if(Number.isInteger(e.value))return e.value;throw new Error(`Invalid number: "${e.value}", only integers are allowed`)}if("variable"===e.type){const A=[];await U({...e,quoted:!0},t,r,e=>A.push(e));const n=Number(A.join(" "));return Number.isNaN(n)?j({type:"variable",name:A.join(" ")},t,r):j({type:"number",value:n},t,r)}return T[e.type](await j(e.left,t,r),await j(e.right,t,r))}async function Y(e,t,r){const A=new Map,n=[];let o=[];const i=e=>{o.push(e)},s=()=>{o.length>0&&n.push(o.join("")),o=[]},a=e=>{i(e),s()},g=(e,t)=>{let r=A.get(e);void 0===r&&A.set(e,r=[]),r.push(t)};for(const A of e){let e=!1;switch(A.type){case"redirection":{const e=await Y(A.args,t,r);for(const t of e)g(A.subtype,t)}break;case"argument":for(const n of A.segments)switch(n.type){case"text":i(n.text);break;case"glob":i(n.pattern),e=!0;break;case"shell":{const e=await L(n.shell,t,r);if(n.quoted)i(e);else{const t=O(e);for(let e=0;e<t.length-1;++e)a(t[e]);i(t[t.length-1])}}break;case"variable":await U(n,t,r,i,a);break;case"arithmetic":i(String(await j(n.arithmetic,t,r)))}}if(s(),e){const e=n.pop();if(void 0===e)throw new Error("Assertion failed: Expected a glob pattern to have been set");const A=await t.glob.match(e,{cwd:r.cwd,baseFs:t.baseFs});if(0===A.length){const t=m(e)?". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22":"";throw new c(`No matches found: "${e}"${t}`)}for(const e of A.sort())a(e)}}if(A.size>0){const e=[];for(const[t,r]of A.entries())e.splice(e.length,0,t,String(r.length),...r);n.splice(0,0,"__ysh_set_redirects",...e,"--")}return n}function G(e,t,r){t.builtins.has(e[0])||(e=["command",...e]);const A=n.cS.fromPortablePath(r.cwd);let o=r.environment;void 0!==o.PWD&&(o={...o,PWD:A});const[i,...s]=e;if("command"===i)return function(e,t,r,A){return r=>{const n=r[0]instanceof a.Transform?"pipe":r[0],o=r[1]instanceof a.Transform?"pipe":r[1],i=r[2]instanceof a.Transform?"pipe":r[2],s=D()(e,t,{...A,stdio:[n,o,i]});return 0==v++&&process.on("SIGINT",b),r[0]instanceof a.Transform&&r[0].pipe(s.stdin),r[1]instanceof a.Transform&&s.stdout.pipe(r[1],{end:!1}),r[2]instanceof a.Transform&&s.stderr.pipe(r[2],{end:!1}),{stdin:s.stdin,promise:new Promise(t=>{s.on("error",A=>{switch(0==--v&&process.off("SIGINT",b),A.code){case"ENOENT":r[2].write(`command not found: ${e}\n`),t(127);break;case"EACCES":r[2].write(`permission denied: ${e}\n`),t(128);break;default:r[2].write(`uncaught error: ${A.message}\n`),t(1)}}),s.on("exit",e=>{0==--v&&process.off("SIGINT",b),t(null!==e?e:129)})})}}}(s[0],s.slice(1),0,{cwd:A,env:o});const c=t.builtins.get(i);if(void 0===c)throw new Error(`Assertion failed: A builtin should exist for "${i}"`);return function(e){return t=>{const r="pipe"===t[0]?new a.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}(async({stdin:e,stdout:A,stderr:n})=>(r.stdin=e,r.stdout=A,r.stderr=n,await c(s,t,r)))}function H(e,t,r){return A=>{const n=new a.PassThrough;return{stdin:n,promise:W(e,t,R(r,{stdin:n}))}}}function J(e,t,r){return A=>({stdin:new a.PassThrough,promise:W(e,t,r)})}function q(e,t,r,A){if(0===t.length)return e;{let n;do{n=String(Math.random())}while(Object.prototype.hasOwnProperty.call(A.procedures,n));return A.procedures={...A.procedures},A.procedures[n]=e,G([...t,"__ysh_run_procedure",n],r,A)}}async function z(e,t,r){let A;const n=e=>{A=e,r.variables["?"]=String(e)},o=async e=>{try{return await async function(e,t,r){let A=e,n=null,o=null;for(;A;){const e=A.then?{...r}:r;let i;switch(A.type){case"command":{const n=await Y(A.args,t,r),o=await P(A.envs,t,r);i=A.envs.length?G(n,t,R(e,{environment:o})):G(n,t,e)}break;case"subshell":{const n=await Y(A.args,t,r);i=q(H(A.subshell,t,e),n,t,e)}break;case"group":{const n=await Y(A.args,t,r);i=q(J(A.group,t,e),n,t,e)}break;case"envs":{const n=await P(A.envs,t,r);e.environment={...e.environment,...n},i=G(["true"],t,e)}}if(void 0===i)throw new Error("Assertion failed: An action should have been generated");if(null===n)o=F(i,{stdin:new S(e.stdin),stdout:new S(e.stdout),stderr:new S(e.stderr)});else{if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(n){case"|":o=o.pipeTo(i,w.STDOUT);break;case"|&":o=o.pipeTo(i,w.STDOUT|w.STDERR)}}A.then?(n=A.then.type,A=A.then.chain):A=null}if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");return await o.run()}(e,t,r)}catch(e){if(!(e instanceof c))throw e;return r.stderr.write(e.message+"\n"),1}};for(n(await o(e.chain));e.then;){if(null!==r.exitCode)return r.exitCode;switch(e.then.type){case"&&":0===A&&n(await o(e.then.line.chain));break;case"||":0!==A&&n(await o(e.then.line.chain));break;default:throw new Error(`Assertion failed: Unsupported command type: "${e.then.type}"`)}e=e.then.line}return A}async function W(e,t,r){let A=0;for(const n of e){if(A=await z(n,t,r),null!==r.exitCode)return r.exitCode;r.variables["?"]=String(A)}return A}function V(e){switch(e.type){case"variable":return"@"===e.name||"#"===e.name||"*"===e.name||Number.isFinite(parseInt(e.name,10))||"defaultValue"in e&&!!e.defaultValue&&e.defaultValue.some(e=>X(e));case"arithmetic":return function e(t){switch(t.type){case"variable":return V(t);case"number":return!1;default:return e(t.left)||e(t.right)}}(e.arithmetic);case"shell":return _(e.shell);default:return!1}}function X(e){switch(e.type){case"redirection":return e.args.some(e=>X(e));case"argument":return e.segments.some(e=>V(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${e.type}"`)}}function _(e){return e.some(e=>{for(;e;){let t=e.chain;for(;t;){let e;switch(t.type){case"subshell":e=_(t.subshell);break;case"command":e=t.envs.some(e=>e.args.some(e=>X(e)))||t.args.some(e=>X(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 Z(e,t=[],{baseFs:r=new o.S,builtins:s={},cwd:c=n.cS.toPortablePath(process.cwd()),env:g=process.env,stdin:l=process.stdin,stdout:u=process.stdout,stderr:h=process.stderr,variables:p={},glob:d=A}={}){const C={};for(const[e,t]of Object.entries(g))void 0!==t&&(C[e]=t);const f=new Map(x);for(const[e,t]of Object.entries(s))f.set(e,t);null===l&&(l=new a.PassThrough).end();const I=(0,i.parseShell)(e,d);if(!_(I)&&I.length>0&&t.length>0){let e=I[I.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 W(I,{args:t,baseFs:r,builtins:f,initialStdin:l,initialStdout:u,initialStderr:h,glob:d},{cwd:c,environment:C,exitCode:null,procedures:{},stdin:l,stdout:u,stderr:h,variables:Object.assign({},p,{"?":0})})}},45330:(e,t,r)=>{t.e=()=>({modules:new Map([["@yarnpkg/cli",r(25413)],["@yarnpkg/core",r(53836)],["@yarnpkg/fslib",r(43896)],["@yarnpkg/libzip",r(65281)],["@yarnpkg/parsers",r(11640)],["@yarnpkg/shell",r(76756)],["clipanion",r(40822)],["semver",r(53887)],["yup",r(15966)],["@yarnpkg/plugin-essentials",r(34777)],["@yarnpkg/plugin-compat",r(44692)],["@yarnpkg/plugin-dlx",r(10189)],["@yarnpkg/plugin-file",r(68023)],["@yarnpkg/plugin-git",r(75641)],["@yarnpkg/plugin-github",r(68126)],["@yarnpkg/plugin-http",r(99148)],["@yarnpkg/plugin-init",r(64314)],["@yarnpkg/plugin-link",r(92994)],["@yarnpkg/plugin-node-modules",r(8375)],["@yarnpkg/plugin-npm",r(14224)],["@yarnpkg/plugin-npm-cli",r(8190)],["@yarnpkg/plugin-pack",r(49881)],["@yarnpkg/plugin-patch",r(29936)],["@yarnpkg/plugin-pnp",r(83228)]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-link","@yarnpkg/plugin-node-modules","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp"])})},29148:(e,t,r)=>{const A=r(74988),n=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,o=new A;e.exports=(e,t=0,r=e.length)=>{if(t<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");const A=r-t;let i="",s=0,a=0;for(;e.length>0;){const r=e.match(n)||[e,e,void 0];let c=o.splitGraphemes(r[1]);const g=Math.min(t-s,c.length);c=c.slice(g);const l=Math.min(A-a,c.length);i+=c.slice(0,l).join(""),s+=g,a+=l,void 0!==r[2]&&(i+=r[2]),e=e.slice(r[0].length)}return i}},72912:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var A in r)Object.prototype.hasOwnProperty.call(r,A)&&(e[A]=r[A])}return e},t.apply(this,arguments)}e.exports=t},60087:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},19228:(e,t,r)=>{var A=r(54694);function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==A(e)&&"function"!=typeof e)return{default:e};var t=n();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}},74943:e=>{e.exports=function(e,t){if(null==e)return{};var r,A,n={},o=Object.keys(e);for(A=0;A<o.length;A++)r=o[A],t.indexOf(r)>=0||(n[r]=e[r]);return n}},62407:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}},54694:e=>{function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t},96117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:A.lstat,stat:A.stat,lstatSync:A.lstatSync,statSync:A.statSync,readdir:A.readdir,readdirSync:A.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("."),A=parseInt(r[0],10),n=parseInt(r[1],10),o=A>10,i=10===A&&n>=10;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=o||i},85670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(31020),n=r(35516),o=r(38844);function i(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 A.read(e,i(),t);A.read(e,i(t),r)},t.scandirSync=function(e,t){const r=i(t);return n.read(e,r)}},31020:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(69078),o=r(79774),i=r(65225);function s(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(A,o)=>{if(null!==A)return c(r,A);const s=o.map(r=>({dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`}));if(!t.followSymbolicLinks)return g(r,s);const a=s.map(e=>function(e,t){return r=>{if(!e.dirent.isSymbolicLink())return r(null,e);t.fs.stat(e.path,(A,n)=>null!==A?t.throwErrorOnBrokenSymbolicLink?r(A):r(null,e):(e.dirent=i.fs.createDirentFromStats(e.name,n),r(null,e)))}}(e,t));n(a,(e,t)=>{if(null!==e)return c(r,e);g(r,t)})})}function a(e,t,r){t.fs.readdir(e,(o,s)=>{if(null!==o)return c(r,o);const a=s.map(r=>`${e}${t.pathSegmentSeparator}${r}`),l=a.map(e=>r=>A.stat(e,t.fsStatSettings,r));n(l,(e,A)=>{if(null!==e)return c(r,e);const n=[];s.forEach((e,r)=>{const o=A[r],s={name:e,path:a[r],dirent:i.fs.createDirentFromStats(e,o)};t.stats&&(s.stats=o),n.push(s)}),g(r,n)})})}function c(e,t){e(t)}function g(e,t){e(null,t)}t.read=function(e,t,r){return!t.stats&&o.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,r):a(e,t,r)},t.readdirWithFileTypes=s,t.readdir=a},35516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(79774),o=r(65225);function i(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(r=>{const A={dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`};if(A.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(A.path);A.dirent=o.fs.createDirentFromStats(A.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return A})}function s(e,t){return t.fs.readdirSync(e).map(r=>{const n=`${e}${t.pathSegmentSeparator}${r}`,i=A.statSync(n,t.fsStatSettings),s={name:r,path:n,dirent:o.fs.createDirentFromStats(r,i)};return t.stats&&(s.stats=i),s})}t.read=function(e,t){return!t.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?i(e,t):s(e,t)},t.readdirWithFileTypes=i,t.readdir=s},38844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=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,A.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new n.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 A=r(72156);t.fs=A},71208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:A.lstat,stat:A.stat,lstatSync:A.lstatSync,statSync:A.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 A=r(17790),n=r(34846),o=r(92687);function i(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 A.read(e,i(),t);A.read(e,i(t),r)},t.statSync=function(e,t){const r=i(t);return n.read(e,r)}},17790:(e,t)=>{"use strict";function r(e,t){e(t)}function A(e,t){e(null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t,n){t.fs.lstat(e,(o,i)=>null!==o?r(n,o):i.isSymbolicLink()&&t.followSymbolicLink?void t.fs.stat(e,(e,o)=>{if(null!==e)return t.throwErrorOnBrokenSymbolicLink?r(n,e):A(n,i);t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),A(n,o)}):A(n,i))}},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 A=r(71208);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=A.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}}},72897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(42369),n=r(27696),o=r(22111),i=r(14954);function s(e={}){return e instanceof i.default?e:new i.default(e)}t.Settings=i.default,t.walk=function(e,t,r){if("function"==typeof t)return new A.default(e,s()).read(t);new A.default(e,s(t)).read(r)},t.walkSync=function(e,t){const r=s(t);return new o.default(e,r).read()},t.walkStream=function(e,t){const r=s(t);return new n.default(e,r).read()}},42369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new A.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 A=r(92413),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._stream=new A.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 A=r(97835);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new A.default(this._root,this._settings)}read(){return this._reader.read()}}},98566:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(28614),n=r(85670),o=r(98360),i=r(10750),s=r(75504);class a extends s.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=n.scandir,this._emitter=new A.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,A)=>{if(null!==r)return t(r,void 0);for(const t of A)this._handleEntry(t,e.base);t(null,void 0)})}_handleError(e){i.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=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&i.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 A=r(10750);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._root=A.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}}},97835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85670),n=r(10750),o=r(75504);class i extends o.default{constructor(){super(...arguments),this._scandir=A.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(n.isFatalError(this._settings,e))throw e}_handleEntry(e,t){const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_pushToStorage(e){this._storage.add(e)}}t.default=i},14954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=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,A.sep),this.fsScandirSettings=new n.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}}},7966:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];const A=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement",...r];const n=["null","undefined","string","number","bigint","boolean","symbol"];function o(e){return t=>typeof t===e}const{toString:i}=Object.prototype,s=e=>{const t=i.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&c.domElement(e)?"HTMLElement":(r=t,A.includes(r)?t:void 0);var r},a=e=>t=>s(t)===e;function c(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(c.observable(e))return"Observable";if(c.array(e))return"Array";if(c.buffer(e))return"Buffer";const t=s(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"}c.undefined=o("undefined"),c.string=o("string");const g=o("number");c.number=e=>g(e)&&!c.nan(e),c.bigint=o("bigint"),c.function_=o("function"),c.null_=e=>null===e,c.class_=e=>c.function_(e)&&e.toString().startsWith("class "),c.boolean=e=>!0===e||!1===e,c.symbol=o("symbol"),c.numericString=e=>c.string(e)&&!c.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),c.array=(e,t)=>!!Array.isArray(e)&&(!c.function_(t)||e.every(t)),c.buffer=e=>{var t,r,A,n;return null!==(n=null===(A=null===(r=null===(t=e)||void 0===t?void 0:t.constructor)||void 0===r?void 0:r.isBuffer)||void 0===A?void 0:A.call(r,e))&&void 0!==n&&n},c.nullOrUndefined=e=>c.null_(e)||c.undefined(e),c.object=e=>!c.null_(e)&&("object"==typeof e||c.function_(e)),c.iterable=e=>{var t;return c.function_(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},c.asyncIterable=e=>{var t;return c.function_(null===(t=e)||void 0===t?void 0:t[Symbol.asyncIterator])},c.generator=e=>c.iterable(e)&&c.function_(e.next)&&c.function_(e.throw),c.asyncGenerator=e=>c.asyncIterable(e)&&c.function_(e.next)&&c.function_(e.throw),c.nativePromise=e=>a("Promise")(e);c.promise=e=>c.nativePromise(e)||(e=>{var t,r;return c.function_(null===(t=e)||void 0===t?void 0:t.then)&&c.function_(null===(r=e)||void 0===r?void 0:r.catch)})(e),c.generatorFunction=a("GeneratorFunction"),c.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===s(e),c.asyncFunction=e=>"AsyncFunction"===s(e),c.boundFunction=e=>c.function_(e)&&!e.hasOwnProperty("prototype"),c.regExp=a("RegExp"),c.date=a("Date"),c.error=a("Error"),c.map=e=>a("Map")(e),c.set=e=>a("Set")(e),c.weakMap=e=>a("WeakMap")(e),c.weakSet=e=>a("WeakSet")(e),c.int8Array=a("Int8Array"),c.uint8Array=a("Uint8Array"),c.uint8ClampedArray=a("Uint8ClampedArray"),c.int16Array=a("Int16Array"),c.uint16Array=a("Uint16Array"),c.int32Array=a("Int32Array"),c.uint32Array=a("Uint32Array"),c.float32Array=a("Float32Array"),c.float64Array=a("Float64Array"),c.bigInt64Array=a("BigInt64Array"),c.bigUint64Array=a("BigUint64Array"),c.arrayBuffer=a("ArrayBuffer"),c.sharedArrayBuffer=a("SharedArrayBuffer"),c.dataView=a("DataView"),c.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,c.urlInstance=e=>a("URL")(e),c.urlString=e=>{if(!c.string(e))return!1;try{return new URL(e),!0}catch(e){return!1}},c.truthy=e=>Boolean(e),c.falsy=e=>!e,c.nan=e=>Number.isNaN(e),c.primitive=e=>{return c.null_(e)||(t=typeof e,n.includes(t));var t},c.integer=e=>Number.isInteger(e),c.safeInteger=e=>Number.isSafeInteger(e),c.plainObject=e=>{if("[object Object]"!==i.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},c.typedArray=e=>{return t=s(e),r.includes(t);var t};c.arrayLike=e=>!c.nullOrUndefined(e)&&!c.function_(e)&&(e=>c.safeInteger(e)&&e>=0)(e.length),c.inRange=(e,t)=>{if(c.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(c.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError("Invalid range: "+JSON.stringify(t))};const l=["innerHTML","ownerDocument","style","attributes","nodeValue"];c.domElement=e=>c.object(e)&&1===e.nodeType&&c.string(e.nodeName)&&!c.plainObject(e)&&l.every(t=>t in e),c.observable=e=>{var t,r,A,n;return!!e&&(e===(null===(r=(t=e)[Symbol.observable])||void 0===r?void 0:r.call(t))||e===(null===(n=(A=e)["@@observable"])||void 0===n?void 0:n.call(A)))},c.nodeStream=e=>c.object(e)&&c.function_(e.pipe)&&!c.observable(e),c.infinite=e=>e===1/0||e===-1/0;const u=e=>t=>c.integer(t)&&Math.abs(t%2)===e;c.evenInteger=u(0),c.oddInteger=u(1),c.emptyArray=e=>c.array(e)&&0===e.length,c.nonEmptyArray=e=>c.array(e)&&e.length>0,c.emptyString=e=>c.string(e)&&0===e.length,c.nonEmptyString=e=>c.string(e)&&e.length>0;c.emptyStringOrWhitespace=e=>c.emptyString(e)||(e=>c.string(e)&&!/\S/.test(e))(e),c.emptyObject=e=>c.object(e)&&!c.map(e)&&!c.set(e)&&0===Object.keys(e).length,c.nonEmptyObject=e=>c.object(e)&&!c.map(e)&&!c.set(e)&&Object.keys(e).length>0,c.emptySet=e=>c.set(e)&&0===e.size,c.nonEmptySet=e=>c.set(e)&&e.size>0,c.emptyMap=e=>c.map(e)&&0===e.size,c.nonEmptyMap=e=>c.map(e)&&e.size>0;const h=(e,t,r)=>{if(!c.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)};c.any=(e,...t)=>(c.array(e)?e:[e]).some(e=>h(Array.prototype.some,e,t)),c.all=(e,...t)=>h(Array.prototype.every,e,t);const p=(e,t,r)=>{if(!e)throw new TypeError(`Expected value which is \`${t}\`, received value of type \`${c(r)}\`.`)};t.assert={undefined:e=>p(c.undefined(e),"undefined",e),string:e=>p(c.string(e),"string",e),number:e=>p(c.number(e),"number",e),bigint:e=>p(c.bigint(e),"bigint",e),function_:e=>p(c.function_(e),"Function",e),null_:e=>p(c.null_(e),"null",e),class_:e=>p(c.class_(e),"Class",e),boolean:e=>p(c.boolean(e),"boolean",e),symbol:e=>p(c.symbol(e),"symbol",e),numericString:e=>p(c.numericString(e),"string with a number",e),array:(e,t)=>{p(c.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>p(c.buffer(e),"Buffer",e),nullOrUndefined:e=>p(c.nullOrUndefined(e),"null or undefined",e),object:e=>p(c.object(e),"Object",e),iterable:e=>p(c.iterable(e),"Iterable",e),asyncIterable:e=>p(c.asyncIterable(e),"AsyncIterable",e),generator:e=>p(c.generator(e),"Generator",e),asyncGenerator:e=>p(c.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>p(c.nativePromise(e),"native Promise",e),promise:e=>p(c.promise(e),"Promise",e),generatorFunction:e=>p(c.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>p(c.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>p(c.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>p(c.boundFunction(e),"Function",e),regExp:e=>p(c.regExp(e),"RegExp",e),date:e=>p(c.date(e),"Date",e),error:e=>p(c.error(e),"Error",e),map:e=>p(c.map(e),"Map",e),set:e=>p(c.set(e),"Set",e),weakMap:e=>p(c.weakMap(e),"WeakMap",e),weakSet:e=>p(c.weakSet(e),"WeakSet",e),int8Array:e=>p(c.int8Array(e),"Int8Array",e),uint8Array:e=>p(c.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>p(c.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>p(c.int16Array(e),"Int16Array",e),uint16Array:e=>p(c.uint16Array(e),"Uint16Array",e),int32Array:e=>p(c.int32Array(e),"Int32Array",e),uint32Array:e=>p(c.uint32Array(e),"Uint32Array",e),float32Array:e=>p(c.float32Array(e),"Float32Array",e),float64Array:e=>p(c.float64Array(e),"Float64Array",e),bigInt64Array:e=>p(c.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>p(c.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>p(c.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>p(c.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>p(c.dataView(e),"DataView",e),urlInstance:e=>p(c.urlInstance(e),"URL",e),urlString:e=>p(c.urlString(e),"string with a URL",e),truthy:e=>p(c.truthy(e),"truthy",e),falsy:e=>p(c.falsy(e),"falsy",e),nan:e=>p(c.nan(e),"NaN",e),primitive:e=>p(c.primitive(e),"primitive",e),integer:e=>p(c.integer(e),"integer",e),safeInteger:e=>p(c.safeInteger(e),"integer",e),plainObject:e=>p(c.plainObject(e),"plain object",e),typedArray:e=>p(c.typedArray(e),"TypedArray",e),arrayLike:e=>p(c.arrayLike(e),"array-like",e),domElement:e=>p(c.domElement(e),"HTMLElement",e),observable:e=>p(c.observable(e),"Observable",e),nodeStream:e=>p(c.nodeStream(e),"Node.js Stream",e),infinite:e=>p(c.infinite(e),"infinite number",e),emptyArray:e=>p(c.emptyArray(e),"empty array",e),nonEmptyArray:e=>p(c.nonEmptyArray(e),"non-empty array",e),emptyString:e=>p(c.emptyString(e),"empty string",e),nonEmptyString:e=>p(c.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>p(c.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>p(c.emptyObject(e),"empty object",e),nonEmptyObject:e=>p(c.nonEmptyObject(e),"non-empty object",e),emptySet:e=>p(c.emptySet(e),"empty set",e),nonEmptySet:e=>p(c.nonEmptySet(e),"non-empty set",e),emptyMap:e=>p(c.emptyMap(e),"empty map",e),nonEmptyMap:e=>p(c.nonEmptyMap(e),"non-empty map",e),evenInteger:e=>p(c.evenInteger(e),"even integer",e),oddInteger:e=>p(c.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>p(c.directInstanceOf(e,t),"T",e),inRange:(e,t)=>p(c.inRange(e,t),"in range",e),any:(e,...t)=>p(c.any(e,...t),"predicate returns truthy for any value",t),all:(e,...t)=>p(c.all(e,...t),"predicate returns truthy for all values",t)},Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}}),Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}}),t.default=c,e.exports=c,e.exports.default=c,e.exports.assert=t.assert},98298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(93121),n=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=(A,...n)=>("error"===A&&(t.error=Date.now(),t.phases.total=t.error-t.start,e.emit=r),r(A,...n))};r(e),e.prependOnceListener("abort",()=>{t.abort=Date.now(),(!t.response||n>=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),A.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 i=()=>{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",i):i(),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 A=r(31669),n=r(46227),o=r(85622),i=r(97369),s=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,a={createPwshFile:!0,createCmdFile:i(),fs:r(35747)},c=new Map([[".js","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function g(e){const t={...a,...e},r=t.fs;return t.fs_={chmod:r.chmod?A.promisify(r.chmod):async()=>{},stat:A.promisify(r.stat),unlink:A.promisify(r.unlink),readFile:A.promisify(r.readFile),writeFile:A.promisify(r.writeFile)},t}async function l(e,t,r){const A=g(r);await A.fs_.stat(e),await async function(e,t,r){const A=await async function(e,t){const r=await t.fs_.readFile(e,"utf8"),A=r.trim().split(/\r*\n/)[0].match(s);if(!A){const t=o.extname(e).toLowerCase();return{program:c.get(t)||null,additionalArgs:""}}return{program:A[1],additionalArgs:A[2]}}(e,r);return await function(e,t){return n(o.dirname(e),{fs:t.fs})}(t,r),function(e,t,r,A){const n=g(A),o=[{generator:h,extension:""}];n.createCmdFile&&o.push({generator:u,extension:".cmd"});n.createPwshFile&&o.push({generator:p,extension:".ps1"});return Promise.all(o.map(A=>async function(e,t,r,A,n){const o=n.preserveSymlinks?"--preserve-symlinks":"",i=[r.additionalArgs,o].filter(e=>e).join(" ");return n=Object.assign({},n,{prog:r.program,args:i}),await function(e,t){return function(e,t){return t.fs_.unlink(e).catch(()=>{})}(e,t)}(t,n),await n.fs_.writeFile(t,A(e,t,n),"utf8"),function(e,t){return function(e,t){return t.fs_.chmod(e,493)}(e,t)}(t,n)}(e,t+A.extension,r,A.generator,n)))}(e,t,A,r)}(e,t,A)}function u(e,t,r){let A=o.relative(o.dirname(t),e).split("/").join("\\");const n=o.isAbsolute(A)?`"${A}"`:`"%~dp0\\${A}"`;let i,s=r.prog,a=r.args||"";const c=d(r.nodePath).win32;s?(i=`"%~dp0\\${s}.exe"`,A=n):(s=n,a="",A="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",l=c?`@SET NODE_PATH=${c}\r\n`:"";return l+=i?`@IF EXIST ${i} (\r\n ${i} ${a} ${A} ${g}%*\r\n) ELSE (\r\n @SETLOCAL\r\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n ${s} ${a} ${A} ${g}%*\r\n)`:`@${s} ${a} ${A} ${g}%*\r\n`,l}function h(e,t,r){let A,n=o.relative(o.dirname(t),e),i=r.prog&&r.prog.split("\\").join("/");n=n.split("\\").join("/");const s=o.isAbsolute(n)?`"${n}"`:`"$basedir/${n}"`;let a=r.args||"";const c=d(r.nodePath).posix;i?(A=`"$basedir/${r.prog}"`,n=s):(i=s,a="",n="");let g=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 u=r.nodePath?`export NODE_PATH="${c}"\n`:"";return l+=A?u+`if [ -x ${A} ]; then\n`+` exec ${A} ${a} ${n} ${g}"$@"\nelse \n`+` exec ${i} ${a} ${n} ${g}"$@"\nfi\n`:`${u}${i} ${a} ${n} ${g}"$@"\nexit $?\n`,l}function p(e,t,r){let A=o.relative(o.dirname(t),e);const n=r.prog&&r.prog.split("\\").join("/");let i,s=n&&`"${n}$exe"`;A=A.split("\\").join("/");const a=o.isAbsolute(A)?`"${A}"`:`"$basedir/${A}"`;let c=r.args||"",g=d(r.nodePath);const l=g.win32,u=g.posix;s?(i=`"$basedir/${r.prog}$exe"`,A=a):(s=a,c="",A="");let h=r.progArgs?r.progArgs.join(" ")+" ":"",p='#!/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&&(p=p+" else {\n"+` $env:NODE_PATH="${u}"\n}`),p+="\n",p=i?p+"$ret=0\n"+`if (Test-Path ${i}) {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${i} ${c} ${A} ${h}$args\n } else {\n`+` & ${i} ${c} ${A} ${h}$args\n }\n $ret=$LASTEXITCODE\n} else {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${s} ${c} ${A} ${h}$args\n } else {\n`+` & ${s} ${c} ${A} ${h}$args\n }\n $ret=$LASTEXITCODE\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $ret\n":p+"# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n"+` $input | & ${s} ${c} ${A} ${h}$args\n} else {\n`+` & ${s} ${c} ${A} ${h}$args\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $LASTEXITCODE\n",p}function d(e){if(!e)return{win32:"",posix:""};let t="string"==typeof e?e.split(o.delimiter):Array.from(e),r={};for(let e=0;e<t.length;e++){const A=t[e].split("/").join("\\"),n=i()?t[e].split("\\").join("/").replace(/^([^:\\/]*):/,(e,t)=>"/mnt/"+t.toLowerCase()):t[e];r.win32=r.win32?`${r.win32};${A}`:A,r.posix=r.posix?`${r.posix}:${n}`:n,r[e]={win32:A,posix:n}}return r}e.exports=l},97991:(e,t,r)=>{"use strict";const A=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,n=()=>{const e={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(e.enabled="0"!==process.env.FORCE_COLOR);const t=(e,t,r)=>"function"==typeof e?e(t):e.wrap(t,r),n=(r,A)=>{if(""===r||null==r)return"";if(!1===e.enabled)return r;if(!1===e.visible)return"";let n=""+r,o=n.includes("\n"),i=A.length;for(i>0&&A.includes("unstyle")&&(A=[...new Set(["unstyle",...A])].reverse());i-- >0;)n=t(e.styles[A[i]],n,o);return n},o=(t,r,A)=>{e.styles[t]=(e=>{let t=e.open=`[${e.codes[0]}m`,r=e.close=`[${e.codes[1]}m`,A=e.regex=new RegExp(`\\u001b\\[${e.codes[1]}m`,"g");return e.wrap=(e,n)=>{e.includes(r)&&(e=e.replace(A,r+t));let o=t+e+r;return n?o.replace(/\r*\n/g,`${r}$&${t}`):o},e})({name:t,codes:r}),(e.keys[A]||(e.keys[A]=[])).push(t),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let r=e=>n(e,r.stack);return Reflect.setPrototypeOf(r,e),r.stack=this.stack?this.stack.concat(t):[t],r}})};return o("reset",[0,0],"modifier"),o("bold",[1,22],"modifier"),o("dim",[2,22],"modifier"),o("italic",[3,23],"modifier"),o("underline",[4,24],"modifier"),o("inverse",[7,27],"modifier"),o("hidden",[8,28],"modifier"),o("strikethrough",[9,29],"modifier"),o("black",[30,39],"color"),o("red",[31,39],"color"),o("green",[32,39],"color"),o("yellow",[33,39],"color"),o("blue",[34,39],"color"),o("magenta",[35,39],"color"),o("cyan",[36,39],"color"),o("white",[37,39],"color"),o("gray",[90,39],"color"),o("grey",[90,39],"color"),o("bgBlack",[40,49],"bg"),o("bgRed",[41,49],"bg"),o("bgGreen",[42,49],"bg"),o("bgYellow",[43,49],"bg"),o("bgBlue",[44,49],"bg"),o("bgMagenta",[45,49],"bg"),o("bgCyan",[46,49],"bg"),o("bgWhite",[47,49],"bg"),o("blackBright",[90,39],"bright"),o("redBright",[91,39],"bright"),o("greenBright",[92,39],"bright"),o("yellowBright",[93,39],"bright"),o("blueBright",[94,39],"bright"),o("magentaBright",[95,39],"bright"),o("cyanBright",[96,39],"bright"),o("whiteBright",[97,39],"bright"),o("bgBlackBright",[100,49],"bgBright"),o("bgRedBright",[101,49],"bgBright"),o("bgGreenBright",[102,49],"bgBright"),o("bgYellowBright",[103,49],"bgBright"),o("bgBlueBright",[104,49],"bgBright"),o("bgMagentaBright",[105,49],"bgBright"),o("bgCyanBright",[106,49],"bgBright"),o("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=A,e.hasColor=e.hasAnsi=t=>(e.ansiRegex.lastIndex=0,"string"==typeof t&&""!==t&&e.ansiRegex.test(t)),e.alias=(t,r)=>{let A="string"==typeof r?e[r]:r;if("function"!=typeof A)throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:t}),e.styles[t]=A,A.stack=[t]),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let t=e=>n(e,t.stack);return Reflect.setPrototypeOf(t,e),t.stack=this.stack?this.stack.concat(A.stack):A.stack,t}})},e.theme=t=>{if(null===(r=t)||"object"!=typeof r||Array.isArray(r))throw new TypeError("Expected theme to be an object");var r;for(let r of Object.keys(t))e.alias(r,t[r]);return e},e.alias("unstyle",t=>"string"==typeof t&&""!==t?(e.ansiRegex.lastIndex=0,t.replace(e.ansiRegex,"")):""),e.alias("noop",e=>e),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=r(31283),e.define=o,e};e.exports=n(),e.exports.create=n},31283:e=>{"use strict";const t="Hyper"===process.env.TERM_PROGRAM,r="win32"===process.platform,A="linux"===process.platform,n={ballotDisabled:"☒",ballotOff:"☐",ballotOn:"☑",bullet:"â€ĸ",bulletWhite:"â—Ļ",fullBlock:"█",heart:"❤",identicalTo:"≡",line:"─",mark:"â€ģ",middot:"¡",minus:"īŧ",multiplication:"×",obelus:"Ãˇ",pencilDownRight:"✎",pencilRight:"✏",pencilUpRight:"✐",percent:"%",pilcrow2:"❡",pilcrow:"Âļ",plusMinus:"Âą",section:"§",starsOff:"☆",starsOn:"★",upDownArrow:"↕"},o=Object.assign({},n,{check:"√",cross:"×",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"Âģ",radioOff:"( )",radioOn:"(*)",warning:"â€ŧ"}),i=Object.assign({},n,{ballotCross:"✘",check:"✔",cross:"✖",ellipsisLarge:"⋯",ellipsis:"â€Ļ",info:"ℹ",question:"?",questionFull:"īŧŸ",questionSmall:"īš–",pointer:A?"▸":"❯",pointerSmall:A?"â€Ŗ":"â€ē",radioOff:"◯",radioOn:"◉",warning:"⚠"});e.exports=r&&!t?o:i,Reflect.defineProperty(e.exports,"common",{enumerable:!1,value:n}),Reflect.defineProperty(e.exports,"windows",{enumerable:!1,value:o}),Reflect.defineProperty(e.exports,"other",{enumerable:!1,value:i})},18483:(e,t,r)=>{"use strict";e=r.nmd(e);const A=(e,t)=>(...r)=>`[${e(...r)+t}m`,n=(e,t)=>(...r)=>{const A=e(...r);return`[${38+t};5;${A}m`},o=(e,t)=>(...r)=>{const A=e(...r);return`[${38+t};2;${A[0]};${A[1]};${A[2]}m`},i=e=>e,s=(e,t,r)=>[e,t,r],a=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const A=r();return Object.defineProperty(e,t,{value:A,enumerable:!0,configurable:!0}),A},enumerable:!0,configurable:!0})};let c;const g=(e,t,A,n)=>{void 0===c&&(c=r(2744));const o=n?10:0,i={};for(const[r,n]of Object.entries(c)){const s="ansi16"===r?"ansi":r;r===t?i[s]=e(A,o):"object"==typeof n&&(i[s]=e(n[t],o))}return i};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,A]of Object.entries(t)){for(const[r,n]of Object.entries(A))t[r]={open:`[${n[0]}m`,close:`[${n[1]}m`},A[r]=t[r],e.set(n[0],n[1]);Object.defineProperty(t,r,{value:A,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="",t.bgColor.close="",a(t.color,"ansi",()=>g(A,"ansi16",i,!1)),a(t.color,"ansi256",()=>g(n,"ansi256",i,!1)),a(t.color,"ansi16m",()=>g(o,"rgb",s,!1)),a(t.bgColor,"ansi",()=>g(A,"ansi16",i,!0)),a(t.bgColor,"ansi256",()=>g(n,"ansi256",i,!0)),a(t.bgColor,"ansi16m",()=>g(o,"rgb",s,!0)),t}})},39920:e=>{"use strict";e.exports=(...e)=>[...new Set([].concat(...e))]},67648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBinjumper=void 0;const A=r(78761);let n=null;t.getBinjumper=function(){return n||(n=A.gunzipSync(Buffer.from("H4sIAAAAAAAACu18DXgU1dXwzOwkLMmaWTUgYtQlXRRKCASwJRh0Q7IBJdHwE0BJCCHZhejmx91ZCELM4uxqpuPWaG1rW3wV0YqVT7GlCf4U80cSLNKIgAhUUWmdZdFGsCEhkP3OuXM32fBT+/Tp+3zv99bNc/f+nb977rnnnntnsjn31jE6hmF4SKEQw+xgtI+F+faPB1LcjW/GMduHvzdmB5v93piFq0pdpkpnxUpnUZmpuKi8vEI0rbCZnO5yU2m5KfPuBaayihJb8hVXxJgpjVwrw2Szw5lP214sDNM9xgi6WJYzMdOgsgQSxzCdV0FuRAQqnVFrR7lZKj/5dGqVxVNYMi6GMWmw+GXUQIyRg6hjmFHDIG8EVPafGPQFH34b4F+iffkTwOcf0EsWbVUi5OapVKBpkYOgNJjc5cklRWIRlOOxAccOY2amD4WzMJMbk50aYOYwgsgwekgzLoKzJNtWFdphdipjoaESkgHSrEvArXC5sFyFX55Lj8GDfEs1vkSHdZTvXZeQL2P+QiwTXT1Hx7HoEnCig/A14dc2CrfkUuN1OYsZOmeNFO7ei+EuLfl3n/BHOpmgZJpNCqMwM38CmhSvW5M983ooCN490L26JsoVCt2esk/q4dfc3J5pJibazptxmtWlyUCghxW8B6HmaxR8/ZCn7JM7pdaEZp7xizcxM58CWu61F2KO0TDd72IHG9Ghh443Q/AJvoHodTOjEP+VCHw0XPXTiZTzs4Sz+CPaEeokyIG18KXh/wzH4lsJ9QgamKvPaDTEdSC5NwsBtI4wjVvgq+5C+VZNJGWkoz4nUFkDMciuPmKAYRpf92t82QjZxyLfd0OBA0P7iEzDad8b/VT+BdLJUZu2FFlwkAkArSdMAItjBgQJdUonDVg2Whj1NaRwkldbohlmE59rYWTerHbHAe0rwR9uMnuQlPtO9W6AU0boEcCo/hW8gHS8S70NyKszsYeRgdcmBqChwG/iPRqhAPTJLWoMZglm9bcIen3XExrUZqSmZBgRsDGJMsMOJWMytm0d2paLbU9DW6AC1bf9Js0e0/yZ5iQyVxqkcZMJCqggyKRjLHQlISR0GQB0HAqqPgFNUmtaSx3YM4CiSkMjjoJc6lv9A7RRoVo/N9j/q6H9obGGJy1MuGE11M8BVN3AJ0/+yyKYEyOqezmgr0oi6obZcdMmUM9UrXGziILDSK7GZlCX1q6X27BxPG28ARo3M6A56PF1i1din14bcUelhQkdhMKxq4FVEWrJ1rN0WUHLoHztUYiKn534FfxDuEvLUF60IAQCGYeHiXZuEokhiLE4CX+cQOTd3ULGt3iR/w/HQSsLNpxMAkXK6808Gh7aadjyHyQIBrnFb4kOmzASevP7GjyU5Tb2tPr97xM7QZBM1NZoqPtt38hdS5cVFrQQXgvmK9Z4Jc8gW7sUq/FHBV0K4z3i5tt4LlFx6y0/ivP0xohjPL2J4lTvbn8V677NU93FUACrUZ6+hNACnDhsasvkWBN8cYlSoy54HTQPh+Z8bIYWLjgcWnS1Bk7uyQpurqPjhQnN7o5CM+Pccera86jnbwjZOvUlHIKtEUfUos4fD/JnMlc2qXzTMV792ziGGd+q2af1OGpG2HmrXzQbxzKZgOXukDqMsrXVn8HKfbJ1vy+kOdV26x5iwF0p+9qtnRGzBfPp6btdeHwx2Kenb4zw+DJQrH+a0bdP8O7jSL/UyLZZQvmpXe6/Kzmdvt2CrxkQN3WCkUrTWcH3GNYYMGGF6earLIIXnDqT6u4QHt4HBSVvD9DytQ8VIvAIFpqJv0nN63AOU6x7wDTMfuuhNo6ss7DjUaytZO1aO3C2u0Zjy9HNuDAV67HNuGAVW2NYd4QeTj3ap5xmVt8ep+0SZWDIUmi44C0ZXPe1N/izWNhmrPtZpXq/sLMmJPeBvnwnwRBx+AUAyjbb68Lj73T/PZCL6CBj9FAZ3a2yCDJWd0h7WWR7x2ici1a5B9VNBh18mnK11/nnfuzpvV549GfAR6jfHTL7N4Kh+p0gYI3wVJP8J03LP20a3otiLMAJWTiZHcCPkEc+6N0teKeCUG1cjd/JBsZBUTMro+C9BRjI77/fK3ivBxpsU9jfUfwO99+l6s5Ecbj0Gexq70NPG3uzP50lMuPyCnw6QOAAQwjUX4x/s7gG8N1Oyd2ZKHcM4r7YH96fPH33Cj9+GS187oueXrPw6DPnwwOPh12G0JgrNbMBJ6I4qfwmbSLeQGJoQL0oS3MgfnD+2tjEIdJOpRtYG5MPIgbMUAWhbo4UyohE2gK3nCe0dmKtKfDDEMm6oEb87caNS+TmWzAezH1m45JnUjpfxrLgDQCFBSmNwvO4eR+Byg6kKTyf0tjdxoo6qYPt3mUSo67A0LW7zYMt3JlmjFmxyGORYcUyqUMPHmDDSQwfYQMUXuXNykZzB3Ru2E6yjxuvZoRXDWZZa0WAR8NFg3mqVty9oQ/h3DcQshxyMJIij0VTdxORyLJ5HKgSD1ge4fmZmK0ei1J7UGrfvrVRO/AkQ/AsIDmKNDwKUZaebhnYfzYZcI9Fzz0WHLC9Djw5tvhzecXCyyMMxM+7A1KrQVt/LRfsBxhPKNcbM2Cq+0LieN8R8UoCF4p/hjQGWfc34OW3XQveuqsHJq111NIW8DspjZr9yC0wnUq8D4F9+9xdF244m5K0fWVYC42HorAB5yboRfm1eNMs9ejEeAAzkmnDcNFAtt864l4WmsdhUCovNOvRz8zh6PRSOMqQ0EffHS/NXIW+GwmLMe1RpILgPZx4DUZ486XWeEJg6bIwnx3xz1mYifgltzX1c77Gh46kHIFxKvwz2AiicRBWtbCpH9ecHIqtcQde4wZ2PvA8RF6QdSOLYl4MH9Z/SuPgXOKHyA8KnwMyq/ebMZyyYJwDIcURcaK9TtEh1X3fIxu03KbqzehD3QaIFPRKBi9PM4c6laV63xH3gTCVP2jAIMXSZS2bMrWALzwfOP8ot0ELH1FMlf8ezisM2YKjoGRkHapTzuDVA9C9CYWSw6KFQTL0ai50pjQSdmAoUkco2D1kfkj8ijIo+WYTyCEAXErj0rBZ1oWFrgwz0YKpcSm7gwacKLnJt08cLXcqxtTDSq7e/TffbnGCPI/YxXM8GQPB70iMlGNwP5VHINFgZ5jfgP2xYjwaYSEwmxA2rhZ7HdWXWNMelUkNd6AX5QnrczYp4BGmmYqgIZDw6JVEMgPBlwbpbVSvApc2SCq8f6h94P7CtASfE08+r2JcR8fVM4aQCuCeOWAvmzDixv3uGhykaDb7l1gGjDHfjGeBreDM1T4TMVQT7Id6CMNwbak10KaOHhOen7zF8oeL5L0LYF2TyDseySZoRs1jeDqbCGBAN/sCtXupB/wTHAjdiWCFRnDC9YZhtQYdOIbULucpCMO17b+erhOT32E2IlkSBzjMBrLGgRWJIUxI3qhkm8cRYvuEev6aWv5q2IJSTwGxXov4qtTLiy8DgpEia4stgsgrGpEwZ1CBHtWRoNl4K6qile5Hm5Zf6J+Wh6c5cyV4BPySeoY9dIxEhSZlhNYQKzz+JMC8hTXcAGcABiw/jGYmkaKeTF8VG9ar1GLY0IfQrmxFp8zlhfoFev8OvJPwv47fige/pbMQGcgIftbkLhnfo4t+g9eQYXgJ/oXmBLlLvQdE12g5t0utJhhihH2jMFvQ786Bfrk9dmY25ILvL6j6EblQfgu/AnPC52HprF6cC44V13DSCmJFCcRmN2NMsJoRGp5AweywH0VveBfvBMeffQOdKdtJxMkkIrUBcOBaNEmhPs67G0B3A2RofC/CsB1vUK+IoL9C0K8G4g+iQW00gpQ8GD8oC3hFRwev1z1MFPVb8j3INff8gCI6qSLqCL2AiMFDJhlUD872wXM0fKDr3QTDNHhuxC3hvJgt9ZwTJ4ENLJB6QuIcqadfnPCRSWiwIB9DN9lyjWKU8OpCswFcCq5WPGcZYWvtx0P9CBVWX/DDsP1gOzYf+TyI/gOrwV8P+HfpZJIfLVezVnIM/sVoclgKjSiBMF1qTRqyIeQRu0sTdo6TceCwLOSgdH6iFuPIzdL5AsHbSdfhWLwHlXEtqPIB+bDcEoytkw9OEM0JsJRK/NWs/LHUR+GlPqDRgOHbEcH7Djb0TxK89aSQL3j/DwY0O2+Uz8unUF3g4OrleDOIYFYXgX3IbQpOAe7FUIP92Ty+zdft3ih/BG59nHxC+tzkn8V6egvEUk9vjXiNd7e4TKi/k4VDhdY8H5rdAWwC/r4b8Szj5ORmuSu4X9OjUD+H9eeytzrMCYL3JRalCQSuGbQPYWcB6+krEK8Rdp4GziacmEg/I59/cyIGlbdRQ/dXc+AtzKCX9eYk+Ywimk1BI+4HwQn55gRpF8gh3px6vroGiAXlJDO0qI7rcB8Mj3QZ1Ma3wMb6EY4XHZQCpIT6+Zz0qck/m/WcBdWuAXaeszXijV44HKwKYSi9mJXbw91LtG73p9iMh7U/4Kot5OR2+VBwD9nf+uUTSFdBYddDOiMfBMGxbgoK9jr5NJH3K5R3Qmq/8OMgzuGX7i9g54dWdcfoSJl/M5rKfABkTqIymy+QuaU/Qubt/RfK/EL/BTLLkTLL7QFmcFYgPoH5H5h9wbsSkXuRNhyFlhDag1YgeOdo3UgbLcF9ZdgKBvZnuTn4O6KX5sBvYLnXyf04gsBd56n/Av7TIvnnybsWL5IPwpqBqZkh7DTCSbvT05cseKegLy5g8dTWiwbyJ+kLE2g4Xj6Tdrvg/Qaa0pYK3o2Yf19c2t1kcg+XztYI3lnE+KK9jaIbb5+6d1kEH95v4nrIBjUvNI9SZ10L9V1kSwKtT4Ma6DoBdD5q/C7fl9qt5ISFZmNwCoSQQr0OOHSn7AOSifLeDXvxiYX8tXxWPqTOhLHgvYzUznpqQoxbhSXemiR3DhyghZ0jcQQ4GE81O0askQ+BFEZ1fx94vF24K+tQ3noUwCjs7IQRS204aF88scYaVu6B5jOHgy8R/Xlug8PTYbLgdPKfg+/JB8bvCtwxqFHP2WRx6ZkmFBGsFU9tJ5IDpYP9/gIO+YPo80ECZCo3C/VWDqK0JPnPgQfD+4ywM4+o/rfo+Qu4wG/o/gvyBR6AclqB2wB4On+BjsD772fTCsQRaTXi9aCmKUJ9BisHSaM7iJWAKUT2J9BxPNbh7DHcv4CTg/KB4F45GHznzQJc/u8A6Tdvx9LvsbQUS6/0R9jLYv8cdhFEO8JOjAKKmk5EpYTkg1I3K/2VDX4PzvM93xfvl3puF+1Sz1L5j8JTEN00yu3CTp3UxALGJKmnxh0tn/Lucyf5QmKnFGIfglioQPyB/EepZ4x4ELJ2FmABA7zo+2S3hgF61rGMfy4njgKkF4OHB+RZSkJCAEppDH4A4wNjblsgf4Ah0SyDbhbv5316Go0ps0jUO3oEufG+CYIKZYEBYnD/WpZ9nz0rr4PTQG07X0fCj1aIy5A3FOhZRJMD1wrGevHkDBmlngS1QvQCZR484RgS04jD5FPqB3gQh/jv1l48BOJRQlt/p9R7MEY9SEeA4iI1i8G/hPXzzxBfDFJWjYQ8C+mOac8i1+6+Iw/FgX6DbDv/NNbd36APR8I78EFd8DShH76Pc8jWVjmvU87p8PyVF3wzMciqbpVtb+ONzh9BBbBZSI1GehFnH4EXcbDRGsiZUbuBVI+P0GTZMpwJ38/JVphMv/WQmonDs+7HAG4DsIdZuUoBdj3qkfO4IgVfbxReJTXKn4OjVe8dgTctYW498chNPuVfD/x6YVvBe+UmVj5Vmx4C471OqOf8Tjatxn1CqJ+FtiA1c6TL/ReU/st4FGc/iZGO4grGB5X+vEMqhhcgk5KzH93uCdgklYJWNPY02KqnAlAa7NQTdHjp1uiZngz7KJQ9VbhSR0Cp29ppFHyvRTNMm/XZ/HYrefYVuEunnYNsO+Q2VMbj8ZFDmRiPnuAG0B2Opfpt/12wy9aIiZ6+dWJm7Y2wJ3ghXvgFh1DLWHkvKI9AuD/GetuwGu8Rt8GfxYHNQ2dTcE9tIfgfDkhK7VzwdXsdQTslgyJz9oNStMjwULt1D97hp60TJ1A7qvmBFzRxA3SnJYEj7mUF75WE6ywOFA3aXOc+ihWi5+BXA+snrVrwjcIzd4B175Oq96yDOQMFUpddvV+p7lSs+99EtiC24H2aoc8B2li5ydNXLZZ7+pIE3+9JDA4R/FZEO/UWS8HqYOeC7ZPF/TIh8Ddm4CAv1OdyUiMH7YLvEKNNg/tEGxueWcW2A/gOXIUOxOvSCRgZ3r+2sdX+dBbVg3L5HMRbL+PamBr/HK52CehdvB8adFKbLrAwIk7O2d82bJ28FxQeuBsdWzrgr3Pr29h1cGQKvlZ7LczIy8Fp4f00DWg3kH14Focafo1c68EEzdLJpwKbB+LyNgsXFj1gGWRX5zm7TlznOVsteJ+HKkYMo0Lkvu7zfuKP5S449uG5od6Iht7I1s4LgW/sUqx6+az0JxZMTsnpUKxvq4kQk+Ox+xee20DhT1KTCizT6ICyFNvbl9BXC4QPgdUDcuI4wHrWkWkKfA6LFTQd+LQv3A/+RfCWaiJaAAuWCom5ryT+Q8lr9ScMg60v9RPXNWR+0yaJCWn5YgziQfNh91fQEgMt0biIglcT/riDTxK/gdau2rxnlepjoCk8EynDcPn+ABdqTqdcsEPu2/ApPiyXc1qD2Zo8sCjhnKxUd4CHSVTfvZI+WuPJvU7oQ/CPBu2enJqNTmohvqv1NMiuQ/JfoHVX72fFo+QZWgw6MbyefxGG1m7dTlxro3iFdlH0uhG7tyvW7e3WbUQfjZxsfW5Qn4p1D8LZDBjUI/nJmmcF8aKlh/RG98f+hwwwGsW6Qz6r/lc3OkP3u0LDXdGK9TnZttWfyQrUd3wtoIfcDr4DDkpy3ha509ct+G5HcWGR5r0AcYLmir9AjouN+PjhBYiiVIMx0gX9hpDZQt239QWIAEdGzH8zOJbaWdSvRoP30fxqFjhV9DSky/0XBfCAyZNASz6nDWw6Tkv1fthkQhxs45LKjmkHhwATYhG8n6Gu8/QYJ+EzFsW2NfCZ5n0Ds86Rpwq4G1DbbfTs9ajFvVr3srNoVESJ+A6FYt2GzDLR1PL0UFN/2QMH3mlIDDYOVtCcvGgm3MTrIVNH9SCJYxBQw25w5Gs04bcDe/toYzAASoXZzHkaI068ucGbmLwX1BECmn/mtFhQo5LzNG4KrzPapvAyQ6YCAqpna/kp/swpbKAKJarehs+cQthrBQPdop0YW4I3Dt4/PR4HnYKyGPb9Gk5+F2S8Rv5Qma0H6ZExBOlH1akAEzysFGyRrVvgiI13h+rPES9vCw6eXN1X6tst2uN1hpjkvofGyLP5wPOaYuD0nngG9PITsiS3s52BQ3jtPyzwMBGzVdt7C7vppizqYecL3IIqTzPLn6uHr4i0mKoryP7b6xfBYE4FjXIv2AIxBMH7KPF1LMREYCd/FerTYf/lgp+Epf70ClwfZMr0RJRtFwoe6ALBYDViTBI4fn4w8NWycHySpLjjlQK9Uk1uYs+0ozsQZ2y4bckKCyNeAcP9HMbSHo1V0KSSYyTh/g1n8OkG3kvfiI9BOyKek2WhfIPPb6UvjLDgrUdl23GMwj4yRCpgjQE9zlGyZHgZjKY5eHUYD9ZL38B60fnX0fWSQdZLy+B6OSbnEIdSiLRsx4EcKsWOnvOUnHNcdf0d1JNzPHLvQUHJ4I14nKZjjYMIM+JKSnmIV5YZfKGHrmM/QXglS6/wT6MXBV5/+yoUSv3EHYRGvLbQMAMffRW+rIl4HpsU8bYG6lY9E0svqWOQ0sukhjCOFZYBmA9wQebofbvBfqx6z3TGXRX5ykS5BopVsnb9lSw+KdzkoC83NEKcuJlURO0CERGwIyOW3KvyYT73x2qvP9wIkiu3IMbgQ22qB9l2dPChqZ5yJRewi2LJw9bBp8gvxxBzhsAVIEkclqZd1SbF4ts0sGfK1kN2OX620DBs9e1yk122fiY0zObk6uN2qRe8gB6EghL4gX4WSz0z3BC5gWEcBzAewYNCeD/HGkGs/oxxX6XYjgYOR7wAgfsDIOV9BqHctVq832aXzuaL3xMaFmG8Ywf/MA1aJsHaajCSgvb8CPpog/gNwfgKMAF4GFDC+7PUnOPCw4/jBt5g/QxEnCReCd/5YiwwfCMZXZEMwz+ess8u53JhzZFXD+iEvTOcxPx4dalNWN5xnBqDHt3QcW3a2iKj/x8PHzpp9cO1SbvvJDrco4E7YNz2OrlDCnAonJSD5+gGlsgWILJ9ntJol9NhXMPkXtJ8FTYLvvcG3UGd0DAPYlKODPw0GfiX8rvjz0pneeHHL+IQeu24rjAWlwuOy+8GzTSOabgXDgkcIej9OQmK5VMEFO+ZkaKc3o9M3QeEhtF2qS9fNMiHIJ/k/ojcCzRALNzMEbFOE2m/DDaCnu2pYBy+63FsUg0PJwN87BCphtf0mhqKg6AGt568oWRPnc0JvnkYgjawgbmR9yvgXx8m67jguGI9lNJtl1PwBh6VjCEe6PkmnAG3XuqBneYxINbGRzMBCd2w7238bnDDfPdDUGXHm0bflnBb6gPA85ekNo9H/WnoqEPB+7D2NHhdf4RroM/L5A82nFxIHsOT2xc0CHX0cPpiDd7oiimN/rkGu5wRDbulOa02wwDO8GY4Xw8j99sZ0RClYq99Js8KDXC+z+TTpPeZWhYc4zG80zEvkXqMa0bA0XpDK3LClR1e1+0ZenyFMbKDzKdaoSdvRqnDIBsl9elEs3oUyhumxwIgVP4EFWk6J25Vdw3DvWYkevtn1R2kgjMTfFJ9hVTwVc+gL3y+vuR4E/V0vPje0aWGOw6Gq9fs5L9pvDU4np6rxD3q36PDQ7gYndxna+8RKV6zhSUvgHhfw9us6YzgfYQlz68Swu8XkVAHwqZfAknPenMCxPhijhIjNfP+DaH+/v4z74/pGOuBj3jiZQ8E2oJ3GmK1MC3SYd34U0J9dvx1fn6kp3eSaPH05ou3vpGvuRZ/5kg2OBH92z8i9iGjEZM7pUM6fJeJkU/bZaMCpwDe/zDB2TemMxLHHd2kGmFblZuYJumIbvxpv5TAarcOq6PwjpBE8Ogv5rJ+Dzmo9vLO+cpCw6imIF6pLtSfkz86/aJ8Qk3EgMiH7wyTpbQZkHZgrd1K4pJ2Xzx9nRhcOL+hlbyapQ4EELDnvSXUj6w1djdx4utCw8K4fjsQ7w++qM0XitnMBW4I38/RelP4PUN1Eoib8mV4HiOpa/Mt0H5it55B/5BkTvlSHfkFxHZ4/a2q+EyWvFQcwMtvfN8AH9cZwVCnKXXxZLb8d7JyLRYhSBypeHCQ8mH1qvPkfHht45nOMS1Sq14+tLQF4tOfA8GUI+3McOSrau8v4KPkIxBSS0aq68So8Ft4Avq2R/8aCuHl0qilLepiIhBi7yCvlQaGxnMR9EYM0tvHU3rua9SRAwSGPFqWRmli348XsRKdNvFouxSeJgJdJ5000OHHKJ548nKAoUVt1g0V6sSAPsnzXQivzESo7qq7cTyL8Za4W/yh9BbyCbmvCyaF1xeV+bD6QR+5Sb5aIQLAkpdJIbVr/VF6fafN42xd2PtozUPdK33+hFOWgKYrYfxySyU+M+0W1/oX6VOb1zj9ueeU9RC+fXZOuUr+QH5f+lwnfXpOLuRlIXXvmgX+yp7Ur9dkw/GP725mYf2myuf9a4ad+TPYCj7WkKv10mecGOtfwDad4JT4J9j3SXOeAdymW+dfE6skmdmvx7w3/kCq6sbHZjyYA7FFO74vAKen0E44CzHvYJAQ3DpEfvrYNt88GZQ4DWZ1BkRURnz4DTuWiuaf2iLeBIO5IRX8jnOy+kNuUB8m7c6U7Hf5gCWSR+ChEavIgzrywJEcyNZrj8aNGhJ5DjlUfwnIXIlGU3oHXd8ivdyuZPH+e4dJx3RSD47y3lgY2HT2ELkMiCbPA5GNMjK1Gfwig4sNpvMeJRtGMhEnYPz7vi/dSzZjUSnndcsMbMvwXWyHnKyU68/8eUxwwjKD/GcYXMKEhebJ7Ie3rjdPX5MCourDT/IxbFGipSAvfX5O1kmtCRHuoy511+qXg8/b62Bipwd3R8SDDvNkAF26TFbxdci6ebkz8d8V/Nlmg3PEhgCWpeHMRMxJx5rg+CZoWHIPwIbGtpJ3Z0NjG2m+/Ektz6f5EpovpHkuzbNpPofmmTS30DyN5tNpPo3mk2meRPNxNDfT3ETzBJqPonk8zY0019Ocp3kPlf8bmp+k+XGaH6P5IZrvp/kemu+g+Xaab6P5VppvofkLNH+O5htp/jTNn6J5Hc0fo3ktzb0099B8Pc2raC7SvJLmDpqvonlJeJ5IDpPMS8e7Qg+c005l8zacxFcNFFZZC4cLr2o8POQFdhJe4hM+teEDrePO5eT8JFs9ah25B/CAR70Cr4BSoRq4miPnMjy+0MMcCfoB4afrcS/J7tceQaRpeeRRjgAC2fFINscTlsKfTs6ZU7VWua2N1zPkGiqfvB868J7y2fOEor+gVg3hFSLhh3LlHMNLAS/EIPjGAH2fRj9nkGWtmvUBfY/nVqu3elwkWBhKiX8UZENyoz9Ach5L8APFWhsWwIIS1JFbhscI0RbobON1jN/6GImtNeaMRpVXD+wjd0k7ybtaWz9Bio/d6vZWTwAcExyJAG0APpOMlVf4hiw57zFk9HPADr6n5NWmNovXox4IjPYCSDa+k/3rczAVtai8vC0QSrpfeAP9mvyhP++pdusLmVA+/Yr8IXk1AwoLzXgnZQq/NgL5KJrH09xIcwPN9eGBhE9yP8WN/uQ4MIUENfU8+beLmuXaPwWo156jyg1mK9anUGO4P+I4GqAnN9dv1d4QtD6FbTqcO+tT8+djJYtUnp6H5RlQXoSmU/0xNtb5bV33oK/zF50Dv2SP+AtM6BxyxEB2TIb2Hhcp/wd8zuM4YcimDMt/zJi/+2gfR+mKlcXFha7CkjVTJqYklzgcTGGh07ay1CXanOQ/BW2FpeX2CmgtsV2qHT7JpOBkcoucrtLylSZ7UanDVpJkslVV2opFW4lpLFRWVoiQxySZEMpWMsN081jXzUyG01Yk2nKdFcU2l4simsaNLRmfHMMwr15jYZ4fMTQtj2gbec3Q/N+RkNb1oyyMMOrfR/NfkeHCvHG0hckB5a7Bf6YVS8tsRFlup21GDGMyLSp1iu4ixzy3zbk2rEV7hRMUblqxVrS5TEWiqaikxIlKHov/9Qk4eeX3l1esKTdVumzukgqT0+aoKC4SSyvK8R94xYriCodptQ0mFBrGluB0/EOcFaWiyVX6oC0Mu9JRsQLsafLEMhR66hTN2pLJ9+yMjBmmcTCa2YuTK5wrTRnOCpdrIrSaZrlLHSUTp0yeMnnyLVNTJqaMN6UmT0me/G/CiYAeAPp/Jct3ON/hfIfzvwPn/+dPPM3ZB+cz7Ho9e52B52tZ7f/0McI/9mwo9CsMyDPiTNyimDh+diwzjtF+gqBkE5wcEDk9Ti9xALAiLh6+s+MSEPi+mLiEWEK/BNK450MhfC8P6FjWxfHkJw/WQ8qF9hFauwnb8O21/Ava8P8OVkFbNJUV2/DfqEoi2i43jnF0HHMAdhOV1cfNuiLK+ohO4rl1MS3pbem7AHhurAYHaQ/AJkfC3ocAl+eRRHm0Ap4jEm/Wo7pH+BwpiluEXNrTNTIEPhvhNodCGyLhMxEewNNjBuHTY8lvcaCuKveGQgfxsJwJR87ZxijOzWQJOndltHEY515vjObcVUYd5xZ1f+CaACKdEslArpeTPY3K3gOy/0oXIUuWJsv8CFFmxep+yEbUs2IvrxMzpWv5dSg0DO2nAG2Em2OIMvh0HKLrucKWOP5y+PEU3/hSKJSCAHfFGfPBbvB3IfCnMqZD+/xI26uIidOnA8HMWGIf+JMRIsAkfIt9JFA+qwA2g9pcHpj5nNjlcThXeP5FHT390qD9PMKlxxkkHUCWxMQZslqAcRtiVETU7owtHKxQm/Ui/pZQSPctMk2nMh0Hnssv4gnL6444Uy5ZZPeR74w4Q3qYUxIdux74kB/SmEf144pLuCvOdHdcghUQqK7AtpAXHv6XAHxtpD5zASYDYO6IBYZz4kxVQzDn4i8ZoO9rhbQVcN+mursXdJcRuxS+rbGlRDpsuTO2hJS/fR5ML4dCd140Zs2H4DzkQv/JgTUD/Y9Cv/ERPiMuXoqyxuUuicvMiMsti4mLBzGNoBJDejuIvAsdV0mcBfq4WSTLuAQI6APXP/qbQ8DnBNrtfXH6R5HPI7r0OKMEfCZzP4kBtBZAawO0dlQG13dB06zYfzC/Yd9a8kootIbqDdY8sd1vWw/bAMes4UxGC/22dY3wN+uG6Csd9ZWO+gI16G5iL6krxMdnZ8+9CvhcGD9jAD9Dw7dw7wJ6xgXo1ljCH9+tr9sWCj1D5+tRLnNAj9z9MRHqssbeg9UsWoV5wHV3FFIX4OcP4JN5yEB8sEXOAkrPiKCSHgtdWRENjOb/8b8c9a+HQncM2FUG2pWVOI2BpZMVi7C56M8Bdu5QWJihByNg04l+1gNsLsA+qWcu8pu63VyEp5wbq0tkh9Rxnb4N+NveCIX+zlyMz2UNdbS4B5zEx6ZvhkKLh+qD2qXp7gtsEBzS0IZv27+8QPsq/hKybI+QZc7lbdRC6eTvHIwL6BqeE3eMy407BMo8xnGLQZMZA14zJ6I2Oxb3RfLzRe+EQjv+RRpLBysM/ugQvghZ9Q7+gMBl1kFWXCOnW8Be0pK5BZdonh2L+5Ae6JmaQqG7I/ymcTX1mxlanIQPUrMBZlakb11EnOG8QS+szcESgK0E2MKLYedT2DmxNq2APgR1/hzA36z5AyMQJMRwf3wB+rZD3wMX+VJufoQhz469a7Dybb7kOND7HXMZHWbEJXBPXsKVZFzeXhZSutnN1A9eZNOTqy5Y4tbYhRdYeXrsgqENl/e7uWH7BH4fX34ck7kXLzHlWbChDwwugzZqfC7Hz0j5bWwPhaKY/5mf3LrB8pyfab9bti2ibTn+fhK0vR3RZvg5xMhPXJpe5ZMM8xCkOkhbIDVC2gvpMKSTkM5BivkJ6AXSFEizIC2B5ID0EKRfQvotpGZIxyB9hb9f8hTo8imN/k2QT6blNMizIeVDckB6ENJjkH4G6TlIWyHtwN+fgrQH0kFIxyCdgNQNqR+S/qcMcxWkBEhmSEmQpkFKg5QFKRdSPiQ7pEpID0LyQqqD9EtIL0B6FdIOSM2Q9kI6DOmzn36nj0vpYwGT4ahw2eYUlZc4bBBpDbkATsef78u0OWyiLcNZKpYWFzkW2IrxfpH5krGWizbnhc3MKNZaVSpSfGYim1VaXkI4MCmknFXqdIlZpQ4b0J5FWu6yVdGGIjbLabNll65wFjnXMj52tk3MqCgrA9GyS8uh/2NsQfIZFSVhERkmhK3ZRS7R6nRWOGEmOKjnVJS4HTYke1dRGfK6arBVGyvyxzakk65dxTLMJ9wd5TCgIkfpgxeNeJIu21a0+qJmZoouu6KohEoNVB38ApuYV76KcCmxVhXbKhEQZAF9MX5+ocMFbBcVOdw25vc8vSkGKUQgyDANfOTdMcO8wy8uKhWzKpwLSstXOmx3r7gPweYxhS7RWeKuhPnDUmlxhcPB3MMUFq60iWVFpeVFzpUupgrqZSsKi93OwrKiKjzvFBZWFhbayleXOlHyR7S6HX8DEqwFai6bWFhUWVkorq2Elg+ZwmIbqBtntdDmdJZXMMztbKG9EpRlg9Z7oOx2OCqLxFXMRrawtGIFw2yC3FWs4b/MFZbhHTRYOldYUU5I/Z4rrNS6T3LITuP9A75oRYVTZG7jwfgIRysPOnZUFDPMfN5eTAyIKeDtFZW2csbG28FKS0DTdpfNdj9TzttFG4z/Ad6+BmYHIP+LL6PYL/JlK1xixZpimN3f8GW2suJK0OpWLJVVrLYxr/OVNs1ufsdXOkvLRTvDtPEgGN6kw4ro4F2lK8uLHAxzgAdFEz0fJCWkcxRLDhCJ6eHFCkfFGpjhEL/aHqY0LgoYixUgAqxQlNqGMwrCa8KhD/9vSnOt8++yZk+dQp4gwSe+TktlrtXFTlFrHVf3PztFyvqf9MFnS5Wj/5lffP3u87/xw26zMAmQ0jwWhn/uOzv4z/2w5G5q1EW/+MuSX8iZfIn24bx2Z76kkWEeYAd70m6vKht4gDwzMSV5cqLJVl5cUQJhxczEvIVZE6cnmlwiBC1FDtiqZyautbkSb78tJq3I5bKVrXCsNQF+uWtmottZPsNVvMpWVuSaWFZa7KxwVdjFicUVZTOKXGXJq1MSTRCwldptLnFRJLPbYkymNNHpdol3lNsr/kliUwkaILpsEMSUimu1KjQ4bQ+4gYWtJNdZuhqivJU2V7gvstdaBYgYfWXbVtscJgd+z0wsct1Rvrrifpsz0eQuTS/GMHJmor3I4bIlThrgMOmyLNImRYqTNmlgVKCtSWF13fYvzvj/BUaIzSoAXAAA","base64"))),n}},50730:(e,t,r)=>{"use strict";t.O9=void 0;const A=r(85622),n=r(35747),o=r(31669),i=r(67648);Object.defineProperty(t,"O9",{enumerable:!0,get:function(){return i.getBinjumper}})},73975:(e,t,r)=>{"use strict";var A=r(86897).Duplex;function n(e){if(!(this instanceof n))return new n(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);A.call(this)}r(31669).inherits(n,A),n.prototype._offset=function(e){var t,r=0,A=0;if(0===e)return[0,0];for(;A<this._bufs.length;A++){if(e<(t=r+this._bufs[A].length)||A==this._bufs.length-1)return[A,e-r];r=t}},n.prototype._reverseOffset=function(e){for(var t=e[0],r=e[1],A=0;A<t;A++)r+=this._bufs[A].length;return r},n.prototype.append=function(e){var t=0;if(Buffer.isBuffer(e))this._appendBuffer(e);else if(Array.isArray(e))for(;t<e.length;t++)this.append(e[t]);else if(e instanceof n)for(;t<e._bufs.length;t++)this.append(e._bufs[t]);else null!=e&&("number"==typeof e&&(e=e.toString()),this._appendBuffer(Buffer.from(e)));return this},n.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},n.prototype._write=function(e,t,r){this._appendBuffer(e),"function"==typeof r&&r()},n.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},n.prototype.end=function(e){A.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},n.prototype.get=function(e){if(!(e>this.length||e<0)){var t=this._offset(e);return this._bufs[t[0]][t[1]]}},n.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)},n.prototype.copy=function(e,t,r,A){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof A||A>this.length)&&(A=this.length),r>=this.length)return e||Buffer.alloc(0);if(A<=0)return e||Buffer.alloc(0);var n,o,i=!!e,s=this._offset(r),a=A-r,c=a,g=i&&t||0,l=s[1];if(0===r&&A==this.length){if(!i)return 1===this._bufs.length?this._bufs[0]:Buffer.concat(this._bufs,this.length);for(o=0;o<this._bufs.length;o++)this._bufs[o].copy(e,g),g+=this._bufs[o].length;return e}if(c<=this._bufs[s[0]].length-l)return i?this._bufs[s[0]].copy(e,t,l,l+c):this._bufs[s[0]].slice(l,l+c);for(i||(e=Buffer.allocUnsafe(a)),o=s[0];o<this._bufs.length;o++){if(!(c>(n=this._bufs[o].length-l))){this._bufs[o].copy(e,g,l,l+c);break}this._bufs[o].copy(e,g,l),g+=n,c-=n,l&&(l=0)}return e},n.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 n;var r=this._offset(e),A=this._offset(t),o=this._bufs.slice(r[0],A[0]+1);return 0==A[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,A[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new n(o)},n.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},n.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},n.prototype.duplicate=function(){for(var e=0,t=new n;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},n.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},n.prototype.indexOf=function(e,t,r){if(void 0===r&&"string"==typeof t&&(r=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=Buffer.from([e]):"string"==typeof e?e=Buffer.from(e,r):e instanceof n?e=e.slice():Buffer.isBuffer(e)||(e=Buffer.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;for(var A=this._offset(t),o=A[0],i=A[1];o<this._bufs.length;o++){for(var s=this._bufs[o];i<s.length;){if(s.length-i>=e.length){var a=s.indexOf(e,i);if(-1!==a)return this._reverseOffset([o,a]);i=s.length-e.length+1}else{var c=this._reverseOffset([o,i]);if(this._match(c,e))return c;i++}}i=0}return-1},n.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(var r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(var t in e)!function(t){n.prototype[t]=null===e[t]?function(e,r){return this.slice(e,e+r)[t](0,r)}:function(r){return this.slice(r,r+e[t])[t](0)}}(t)}(),e.exports=n},12235:(e,t,r)=>{"use strict";const A=r(54900),n=r(44617),o=r(1495),i=r(425),s=(e,t={})=>{let r=[];if(Array.isArray(e))for(let A of e){let e=s.create(A,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(s.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};s.parse=(e,t={})=>i(e,t),s.stringify=(e,t={})=>A("string"==typeof e?s.parse(e,t):e,t),s.compile=(e,t={})=>("string"==typeof e&&(e=s.parse(e,t)),n(e,t)),s.expand=(e,t={})=>{"string"==typeof e&&(e=s.parse(e,t));let r=o(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},s.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?s.compile(e,t):s.expand(e,t),e.exports=s},44617:(e,t,r)=>{"use strict";const A=r(52169),n=r(4542);e.exports=(e,t={})=>{let r=(e,o={})=>{let i=n.isInvalidBrace(o),s=!0===e.invalid&&!0===t.escapeInvalid,a=!0===i||!0===s,c=!0===t.escapeInvalid?"\\":"",g="";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=n.reduce(e.nodes),o=A(...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)g+=r(t,e);return g};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 A=r(52169),n=r(54900),o=r(4542),i=(e="",t="",r=!1)=>{let A=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?o.flatten(t).map(e=>`{${e}}`):t;for(let n of e)if(Array.isArray(n))for(let e of n)A.push(i(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),A.push(Array.isArray(e)?i(n,e,r):n+e);return o.flatten(A)};e.exports=(e,t={})=>{let r=void 0===t.rangeLimit?1e3:t.rangeLimit,s=(e,a={})=>{e.queue=[];let c=a,g=a.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,g=c.queue;if(e.invalid||e.dollar)return void g.push(i(g.pop(),n(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void g.push(i(g.pop(),["{}"]));if(e.nodes&&e.ranges>0){let s=o.reduce(e.nodes);if(o.exceedsLimit(...s,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let a=A(...s,t);return 0===a.length&&(a=n(e,t)),g.push(i(g.pop(),a)),void(e.nodes=[])}let l=o.encloseBrace(e),u=e.queue,h=e;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,u=h.queue;for(let t=0;t<e.nodes.length;t++){let r=e.nodes[t];"comma"!==r.type||"brace"!==e.type?"close"!==r.type?r.value&&"open"!==r.type?u.push(i(u.pop(),r.value)):r.nodes&&s(r,e):g.push(i(g.pop(),u,l)):(1===t&&u.push(""),u.push(""))}return u};return o.flatten(s(e))}},425:(e,t,r)=>{"use strict";const A=r(54900),{MAX_LENGTH:n,CHAR_BACKSLASH:o,CHAR_BACKTICK:i,CHAR_COMMA:s,CHAR_DOT:a,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:g,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:d,CHAR_SINGLE_QUOTE:C,CHAR_NO_BREAK_SPACE:f,CHAR_ZERO_WIDTH_NOBREAK_SPACE:I}=r(5384);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let r=t||{},E="number"==typeof r.maxLength?Math.min(n,r.maxLength):n;if(e.length>E)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${E})`);let B,y={type:"root",input:e,nodes:[]},m=[y],w=y,Q=y,D=0,b=e.length,v=0,S=0;const k=()=>e[v++],N=e=>{if("text"===e.type&&"dot"===Q.type&&(Q.type="text"),!Q||"text"!==Q.type||"text"!==e.type)return w.nodes.push(e),e.parent=w,e.prev=Q,Q=e,e;Q.value+=e.value};for(N({type:"bos"});v<b;)if(w=m[m.length-1],B=k(),B!==I&&B!==f)if(B!==o)if(B!==p)if(B!==h)if(B!==c)if(B!==g)if(B!==d&&B!==C&&B!==i)if(B!==l)if(B!==u)if(B===s&&S>0){if(w.ranges>0){w.ranges=0;let e=w.nodes.shift();w.nodes=[e,{type:"text",value:A(w)}]}N({type:"comma",value:B}),w.commas++}else if(B===a&&S>0&&0===w.commas){let e=w.nodes;if(0===S||0===e.length){N({type:"text",value:B});continue}if("dot"===Q.type){if(w.range=[],Q.value+=B,Q.type="range",3!==w.nodes.length&&5!==w.nodes.length){w.invalid=!0,w.ranges=0,Q.type="text";continue}w.ranges++,w.args=[];continue}if("range"===Q.type){e.pop();let t=e[e.length-1];t.value+=Q.value+B,Q=t,w.ranges--;continue}N({type:"dot",value:B})}else N({type:"text",value:B});else{if("brace"!==w.type){N({type:"text",value:B});continue}let e="close";w=m.pop(),w.close=!0,N({type:e,value:B}),S--,w=m[m.length-1]}else{S++;let e=Q.value&&"$"===Q.value.slice(-1)||!0===w.dollar;w=N({type:"brace",open:!0,close:!1,dollar:e,depth:S,commas:0,ranges:0,nodes:[]}),m.push(w),N({type:"open",value:B})}else{let e,r=B;for(!0!==t.keepQuotes&&(B="");v<b&&(e=k());)if(e!==o){if(e===r){!0===t.keepQuotes&&(B+=e);break}B+=e}else B+=e+k();N({type:"text",value:B})}else{if("paren"!==w.type){N({type:"text",value:B});continue}w=m.pop(),N({type:"text",value:B}),w=m[m.length-1]}else w=N({type:"paren",nodes:[]}),m.push(w),N({type:"text",value:B});else{D++;let e;for(;v<b&&(e=k());)if(B+=e,e!==h)if(e!==o){if(e===p&&(D--,0===D))break}else B+=k();else D++;N({type:"text",value:B})}else N({type:"text",value:"\\"+B});else N({type:"text",value:(t.keepEscaping?B:"")+k()});do{if(w=m.pop(),"root"!==w.type){w.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});let e=m[m.length-1],t=e.nodes.indexOf(w);e.nodes.splice(t,1,...w.nodes)}}while(m.length>0);return N({type:"eos"}),y}},54900:(e,t,r)=>{"use strict";const A=r(4542);e.exports=(e,t={})=>{let r=(e,n={})=>{let o=t.escapeInvalid&&A.isInvalidBrace(n),i=!0===e.invalid&&!0===t.escapeInvalid,s="";if(e.value)return(o||i)&&A.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)s+=r(t);return s};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,A=1,n)=>!1!==n&&(!(!t.isInteger(e)||!t.isInteger(r))&&(Number(r)-Number(e))/Number(A)>=n),t.escapeNode=(e,t=0,r)=>{let A=e.nodes[t];A&&(r&&A.type===r||"open"===A.type||"close"===A.type)&&!0!==A.escaped&&(A.value="\\"+A.value,A.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 A=0;A<e.length;A++){let n=e[A];Array.isArray(n)?r(n,t):void 0!==n&&t.push(n)}return t};return r(e),t}},30093:(e,t,r)=>{"use strict";const{V4MAPPED:A,ADDRCONFIG:n,ALL:o,promises:{Resolver:i},lookup:s}=r(40881),{promisify:a}=r(31669),c=r(12087),g=Symbol("cacheableLookupCreateConnection"),l=Symbol("cacheableLookupInstance"),u=Symbol("expires"),h="number"==typeof o,p=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},d=()=>{let e=!1,t=!1;for(const r of Object.values(c.networkInterfaces()))for(const A of r)if(!A.internal&&("IPv6"===A.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},C={ttl:!0},f={all:!0};class I{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:r=3600,errorTtl:A=.15,resolver:n=new i,lookup:o=s}={}){if(this.maxTtl=t,this.errorTtl=A,this._cache=e,this._resolver=n,this._dnsLookup=a(o),this._resolver instanceof i?(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=d(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,r<1)this._fallback=!1;else{this._fallback=!0;const e=setInterval(()=>{this._hostnamesToFallback.clear()},1e3*r);e.unref&&e.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),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);t.hints&A&&(h&&t.hints&o||0===e.length)?(e=>{for(const t of e)6!==t.family&&(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&n){const{_iface:e}=this;r=r.filter(t=>6===t.family?e.has6:e.has4)}if(0===r.length){const t=new Error("cacheableLookup ENOTFOUND "+e);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?r:r[0]}async query(e){let t=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 _resolve(e){const[t,r]=await Promise.all([this._resolve4(e,C),this._resolve6(e,C)].map(e=>(async e=>{try{return await e}catch(e){if("ENODATA"===e.code||"ENOTFOUND"===e.code)return[];throw e}})(e)));let A=0,n=0,o=0;const i=Date.now();for(const e of t)e.family=4,e.expires=i+1e3*e.ttl,A=Math.max(A,e.ttl);for(const e of r)e.family=6,e.expires=i+1e3*e.ttl,n=Math.max(n,e.ttl);return o=t.length>0?r.length>0?Math.min(A,n):A:n,{entries:[...t,...r],cacheTtl:o}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch(e){return{entries:[],cacheTtl:0}}}async _set(e,t,r){if(this.maxTtl>0&&r>0){r=1e3*Math.min(r,this.maxTtl),t[u]=Date.now()+r;try{await this._cache.set(e,t,r)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw t.cause=e,t}}A=this._cache,Symbol.iterator in A&&this._tick(r)}var A}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,f);try{let t=await this._resolve(e);0===t.entries.length&&this._fallback&&(t=await this._lookup(e),0!==t.entries.length&&this._hostnamesToFallback.add(e));const r=0===t.entries.length?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,r),delete this._pending[e],t.entries}catch(t){throw delete this._pending[e],t}}_tick(e){const t=this._nextRemovalTime;(!t||e<t)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[r,A]of this._cache){const n=A[u];t>=n?this._cache.delete(r):n<e&&(e=n)}e!==1/0&&this._tick(e-t)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(p(e),g in e)throw new Error("CacheableLookup has been already installed");e[g]=e.createConnection,e[l]=this,e.createConnection=(t,r)=>("lookup"in t||(t.lookup=this.lookup),e[g](t,r))}uninstall(e){if(p(e),e[g]){if(e[l]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[g],delete e[g],delete e[l]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=d(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}e.exports=I,e.exports.default=I},11200:(e,t,r)=>{"use strict";const A=r(28614),n=r(78835),o=r(19793),i=r(58764),s=r(86834),a=r(48491),c=r(55737),g=r(15751),l=r(72515);class u{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=p(n.parse(t)),t={};else if(t instanceof n.URL)l=p(n.parse(t.toString())),t={};else{const[e,...r]=(t.path||"").split("?"),A=r.length>0?"?"+r.join("?"):"";l=p({...t,pathname:e,search:A})}(t={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...t,...h(l)}).headers=c(t.headers);const d=new A,C=o(n.format(l),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${t.method}:${C}`;let I=!1,E=!1;const B=t=>{E=!0;let A,n=!1;const o=new Promise(e=>{A=()=>{n||(n=!0,e())}}),c=e=>{if(I&&!t.forceRefresh){e.status=e.statusCode;const r=s.fromObject(I.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();(e=new a(I.statusCode,t,I.body,I.url)).cachePolicy=r.policy,e.fromCache=!0}}let A;e.fromCache||(e.cachePolicy=new s(t,e,t),e.fromCache=!1),t.cache&&e.cachePolicy.storable()?(A=g(e),(async()=>{try{const r=i.buffer(e);if(await Promise.race([o,new Promise(t=>e.once("end",t))]),n)return;const A=await r,s={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?I.statusCode:e.statusCode,body:A};let a=t.strictTtl?e.cachePolicy.timeToLive():void 0;t.maxTtl&&(a=a?Math.min(a,t.maxTtl):t.maxTtl),await this.cache.set(f,s,a)}catch(e){d.emit("error",new u.CacheError(e))}})()):t.cache&&I&&(async()=>{try{await this.cache.delete(f)}catch(e){d.emit("error",new u.CacheError(e))}})(),d.emit("response",A||e),"function"==typeof r&&r(A||e)};try{const r=e(t,c);r.once("error",A),r.once("abort",A),d.emit("request",r)}catch(e){d.emit("error",new u.RequestError(e))}};return(async()=>{const e=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(f):void 0;if(void 0===t)return B(e);const A=s.fromObject(t.cachePolicy);if(A.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=A.responseHeaders(),n=new a(t.statusCode,e,t.body,t.url);n.cachePolicy=A,n.fromCache=!0,d.emit("response",n),"function"==typeof r&&r(n)}else I=t,e.headers=A.revalidationHeaders(e),B(e)},A=e=>d.emit("error",new u.CacheError(e));this.cache.once("error",A),d.on("response",()=>this.cache.removeListener("error",A));try{await e(t)}catch(e){t.automaticFailover&&!E&&B(t),d.emit("error",new u.CacheError(e))}})(),d}}}function h(e){const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t}function p(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}u.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}},u.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}},e.exports=u},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,A=!1;for(let n=0;n<e.length;n++){const o=e[n];t&&/[a-zA-Z]/.test(o)&&o.toUpperCase()===o?(e=e.slice(0,n)+"-"+e.slice(n),t=!1,A=r,r=!0,n++):r&&A&&/[a-zA-Z]/.test(o)&&o.toLowerCase()===o?(e=e.slice(0,n-1)+"-"+e.slice(n-1),A=r,r=!1,t=!0):(t=o.toLowerCase()===o&&o.toUpperCase()!==o,A=r,r=o.toUpperCase()===o&&o.toLowerCase()!==o)}return e})(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.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 A=r(18483),{stdout:n,stderr:o}=r(59428),{stringReplaceAll:i,stringEncaseCRLFWithFirstIndex:s}=r(73327),a=["ansi","ansi","ansi256","ansi16m"],c=Object.create(null);class g{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=n?n.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>E(t.template,...e),Object.setPrototypeOf(t,u.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=g,t.template};function u(e){return l(e)}for(const[e,t]of Object.entries(A))c[e]={get(){const r=C(this,d(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};c.visible={get(){const e=C(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h)c[e]={get(){const{level:t}=this;return function(...r){const n=d(A.color[a[t]][e](...r),A.color.close,this._styler);return C(this,n,this._isEmpty)}}};for(const e of h){c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=d(A.bgColor[a[t]][e](...r),A.bgColor.close,this._styler);return C(this,n,this._isEmpty)}}}}const p=Object.defineProperties(()=>{},{...c,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),d=(e,t,r)=>{let A,n;return void 0===r?(A=e,n=t):(A=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:A,closeAll:n,parent:r}},C=(e,t,r)=>{const A=(...e)=>f(A,1===e.length?""+e[0]:e.join(" "));return A.__proto__=p,A._generator=e,A._styler=t,A._isEmpty=r,A},f=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:A,closeAll:n}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=i(t,r.close,r.open),r=r.parent;const o=t.indexOf("\n");return-1!==o&&(t=s(t,n,A,o)),A+t+n};let I;const E=(e,...t)=>{const[A]=t;if(!Array.isArray(A))return t.join(" ");const n=t.slice(1),o=[A.raw[0]];for(let e=1;e<A.length;e++)o.push(String(n[e-1]).replace(/[{}\\]/g,"\\$&"),String(A.raw[e]));return void 0===I&&(I=r(80690)),I(e,o.join(""))};Object.defineProperties(u.prototype,c);const B=u();B.supportsColor=n,B.stderr=u({level:o?o.level:0}),B.stderr.supportsColor=o,B.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"},e.exports=B},80690: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,A=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(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 i(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 s(e,t){const r=[],o=t.trim().split(/\s*,\s*/g);let s;for(const t of o){const o=Number(t);if(Number.isNaN(o)){if(!(s=t.match(A)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(s[2].replace(n,(e,t,r)=>t?i(t):r))}else r.push(o)}return r}function a(e){r.lastIndex=0;const t=[];let A;for(;null!==(A=r.exec(e));){const e=A[1];if(A[2]){const r=s(e,A[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 A=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in A))throw new Error("Unknown Chalk style: "+e);A=t.length>0?A[e](...t):A[e]}return A}e.exports=(e,r)=>{const A=[],n=[];let o=[];if(r.replace(t,(t,r,s,g,l,u)=>{if(r)o.push(i(r));else if(g){const t=o.join("");o=[],n.push(0===A.length?t:c(e,A)(t)),A.push({inverse:s,styles:a(g)})}else if(l){if(0===A.length)throw new Error("Found extraneous } in Chalk template literal");n.push(c(e,A)(o.join(""))),o=[],A.pop()}else o.push(u)}),n.push(o.join("")),A.length>0){const e=`Chalk template literal is missing ${A.length} closing bracket${1===A.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")}},73327:e=>{"use strict";e.exports={stringReplaceAll:(e,t,r)=>{let A=e.indexOf(t);if(-1===A)return e;const n=t.length;let o=0,i="";do{i+=e.substr(o,A-o)+t+r,o=A+n,A=e.indexOf(t,o)}while(-1!==A);return i+=e.substr(o),i},stringEncaseCRLFWithFirstIndex:(e,t,r,A)=>{let n=0,o="";do{const i="\r"===e[A-1];o+=e.substr(n,(i?A-1:A)-n)+t+(i?"\r\n":"\n")+r,n=A+1,A=e.indexOf("\n",n)}while(-1!==A);return o+=e.substr(n),o}}},5864:(e,t,r)=>{"use strict";var A=r(85832),n=process.env;function o(e){return"string"==typeof e?!!n[e]:Object.keys(e).every((function(t){return n[t]===e[t]}))}Object.defineProperty(t,"_vendors",{value:A.map((function(e){return e.constant}))}),t.name=null,t.isPR=null,A.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=!!n[e.pr];break;case"object":"env"in e.pr?t.isPR=e.pr.env in n&&n[e.pr.env]!==e.pr.ne:"any"in e.pr?t.isPR=e.pr.any.some((function(e){return!!n[e]})):t.isPR=o(e.pr);break;default:t.isPR=null}})),t.isCI=!!(n.CI||n.CONTINUOUS_INTEGRATION||n.BUILD_NUMBER||n.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"}}]')},40822:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cli:()=>Y,Command:()=>M,UsageError:()=>a});const A=/^(-h|--help)(?:=([0-9]+))?$/,n=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,o=/^-[a-zA-Z]{2,}$/,i=/^([^=]+)=([\s\S]*)$/,s="1"===process.env.DEBUG_CLI;class a extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}}class c extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",0===this.candidates.length)this.message="Command not found, but we're not sure what's the alternative.";else if(1===this.candidates.length&&null!==this.candidates[0].reason){const[{usage:e,reason:t}]=this.candidates;this.message=`${t}\n\n$ ${e}`}else if(1===this.candidates.length){const[{usage:t}]=this.candidates;this.message=`Command not found; did you mean:\n\n$ ${t}\n${l(e)}`}else this.message=`Command not found; did you mean one of:\n\n${this.candidates.map(({usage:e},t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${l(e)}`}}class g extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find who to pick amongst the following alternatives:\n\n${this.usages.map((e,t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${l(e)}`}}const l=e=>"While running "+e.filter(e=>"\0"!==e).map(e=>{const t=JSON.stringify(e);return e.match(/\s/)||0===e.length||t!==`"${e}"`?t:e}).join(" ");function u(e){s&&console.log(e)}const h={candidateUsage:null,errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:-1};function p(e,t){return e.nodes.push(t),e.nodes.length-1}function d(e,t,r=!1){u("Running a vm on "+JSON.stringify(t));let A=[{node:0,state:{candidateUsage:null,errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];!function(e,{prefix:t=""}={}){u(t+"Nodes are:");for(let r=0;r<e.nodes.length;++r)u(`${t} ${r}: ${JSON.stringify(e.nodes[r])}`)}(e,{prefix:" "});const n=["",...t];for(let o=0;o<n.length;++o){const i=n[o];u(" Processing "+JSON.stringify(i));const s=[];for(const{node:t,state:a}of A){u(" Current node is "+t);const A=e.nodes[t];if(2===t){s.push({node:t,state:a});continue}console.assert(0===A.shortcuts.length,"Shortcuts should have been eliminated by now");const c=Object.prototype.hasOwnProperty.call(A.statics,i);if(!r||o<n.length-1||c)if(c){const e=A.statics[i];for(const{to:t,reducer:r}of e)s.push({node:t,state:void 0!==r?b(k,r,a,i):a}),u(` Static transition to ${t} found`)}else u(" No static transition found");else{let e=!1;for(const t of Object.keys(A.statics))if(t.startsWith(i)){if(i===t)for(const{to:e,reducer:r}of A.statics[t])s.push({node:e,state:void 0!==r?b(k,r,a,i):a}),u(` Static transition to ${e} found`);else for(const{to:e,reducer:r}of A.statics[t])s.push({node:e,state:Object.assign(Object.assign({},a),{remainder:t.slice(i.length)})}),u(` Static transition to ${e} found (partial match)`);e=!0}e||u(" No partial static transition found")}if("\0"!==i)for(const[e,{to:t,reducer:r}]of A.dynamics)b(S,e,a,i)&&(s.push({node:t,state:void 0!==r?b(k,r,a,i):a}),u(` Dynamic transition to ${t} found (via ${e})`))}if(0===s.length&&"\0"===i&&1===t.length)return[{node:0,state:h}];if(0===s.length)throw new c(t,A.filter(({node:e})=>2!==e).map(({state:e})=>({usage:e.candidateUsage,reason:null})));if(s.every(({node:e})=>2===e))throw new c(t,s.map(({state:e})=>({usage:e.candidateUsage,reason:e.errorMessage})));A=I(s)}if(A.length>0){u(" Results:");for(const e of A)u(` - ${e.node} -> ${JSON.stringify(e.state)}`)}else u(" No results");return A}function C(e,t){if(null!==t.selectedIndex)return!0;if(Object.prototype.hasOwnProperty.call(e.statics,"\0"))for(const{to:t}of e.statics["\0"])if(1===t)return!0;return!1}function f(e,t){return function(e,t){const r=t.filter(e=>null!==e.selectedIndex);if(0===r.length)throw new Error;let A=0;for(const e of r)e.path.length>A&&(A=e.path.length);const n=r.filter(e=>e.path.length===A),o=e=>e.positionals.filter(({extra:e})=>!e).length+e.options.length,i=n.map(e=>({state:e,positionalCount:o(e)}));let s=0;for(const{positionalCount:e}of i)e>s&&(s=e);const a=function(e){const t=[],r=[];for(const A of e)-1===A.selectedIndex?r.push(A):t.push(A);r.length>0&&t.push(Object.assign(Object.assign({},h),{path:E(...r.map(e=>e.path)),options:r.reduce((e,t)=>e.concat(t.options),[])}));return t}(i.filter(({positionalCount:e})=>e===s).map(({state:e})=>e));if(a.length>1)throw new g(e,a.map(e=>e.candidateUsage));return a[0]}(t,d(e,[...t,"\0"]).map(({state:e})=>e))}function I(e){let t=0;for(const{state:r}of e)r.path.length>t&&(t=r.path.length);return e.filter(({state:e})=>e.path.length===t)}function E(e,t,...r){return void 0===t?Array.from(e):E(e.filter((e,r)=>e===t[r]),...r)}function B(e){return 1===e||2===e}function y(e,t=0){return{to:B(e.to)?e.to:e.to>2?e.to+t-2:e.to+t,reducer:e.reducer}}function m(e,t=0){const r={dynamics:[],shortcuts:[],statics:{}};for(const[A,n]of e.dynamics)r.dynamics.push([A,y(n,t)]);for(const A of e.shortcuts)r.shortcuts.push(y(A,t));for(const[A,n]of Object.entries(e.statics))r.statics[A]=n.map(e=>y(e,t));return r}function w(e,t,r,A,n){e.nodes[t].dynamics.push([r,{to:A,reducer:n}])}function Q(e,t,r,A){e.nodes[t].shortcuts.push({to:r,reducer:A})}function D(e,t,r,A,n){(Object.prototype.hasOwnProperty.call(e.nodes[t].statics,r)?e.nodes[t].statics[r]:e.nodes[t].statics[r]=[]).push({to:A,reducer:n})}function b(e,t,r,A){if(Array.isArray(t)){const[n,...o]=t;return e[n](r,A,...o)}return e[t](r,A)}function v(e,t){const r=Array.isArray(e)?S[e[0]]:S[e];if(void 0===r.suggest)return null;const A=Array.isArray(e)?e.slice(1):[];return r.suggest(t,...A)}const S={always:()=>!0,isOptionLike:(e,t)=>!e.ignoreOptions&&t.startsWith("-"),isNotOptionLike:(e,t)=>e.ignoreOptions||!t.startsWith("-"),isOption:(e,t,r,A)=>!e.ignoreOptions&&t===r,isBatchOption:(e,t,r)=>!e.ignoreOptions&&o.test(t)&&[...t.slice(1)].every(e=>r.includes("-"+e)),isBoundOption:(e,t,r,A)=>{const o=t.match(i);return!e.ignoreOptions&&!!o&&n.test(o[1])&&r.includes(o[1])&&A.filter(e=>e.names.includes(o[1])).every(e=>e.allowBinding)},isNegatedOption:(e,t,r)=>!e.ignoreOptions&&t==="--no-"+r.slice(2),isHelp:(e,t)=>!e.ignoreOptions&&A.test(t),isUnsupportedOption:(e,t,r)=>!e.ignoreOptions&&t.startsWith("-")&&n.test(t)&&!r.includes(t),isInvalidOption:(e,t)=>!e.ignoreOptions&&t.startsWith("-")&&!n.test(t)};S.isOption.suggest=(e,t,r=!0)=>r?null:[t];const k={setCandidateUsage:(e,t,r)=>Object.assign(Object.assign({},e),{candidateUsage:r}),setSelectedIndex:(e,t,r)=>Object.assign(Object.assign({},e),{selectedIndex:r}),pushBatch:(e,t)=>Object.assign(Object.assign({},e),{options:e.options.concat([...t.slice(1)].map(e=>({name:"-"+e,value:!0})))}),pushBound:(e,t)=>{const[,r,A]=t.match(i);return Object.assign(Object.assign({},e),{options:e.options.concat({name:r,value:A})})},pushPath:(e,t)=>Object.assign(Object.assign({},e),{path:e.path.concat(t)}),pushPositional:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:!1})}),pushExtra:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:!0})}),pushExtraNoLimits:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:N})}),pushTrue:(e,t,r=t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:t,value:!0})}),pushFalse:(e,t,r=t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:r,value:!1})}),pushUndefined:(e,t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:t,value:void 0})}),pushStringValue:(e,t)=>{var r;const A=Object.assign(Object.assign({},e),{options:[...e.options]}),n=e.options[e.options.length-1];return n.value=(null!==(r=n.value)&&void 0!==r?r:[]).concat([t]),A},setStringValue:(e,t)=>{const r=Object.assign(Object.assign({},e),{options:[...e.options]});return e.options[e.options.length-1].value=t,r},inhibateOptions:e=>Object.assign(Object.assign({},e),{ignoreOptions:!0}),useHelp:(e,t,r)=>{const[,n,o]=t.match(A);return void 0!==o?Object.assign(Object.assign({},e),{options:[{name:"-c",value:String(r)},{name:"-i",value:o}]}):Object.assign(Object.assign({},e),{options:[{name:"-c",value:String(r)}]})},setError:(e,t,r)=>"\0"===t?Object.assign(Object.assign({},e),{errorMessage:r+"."}):Object.assign(Object.assign({},e),{errorMessage:`${r} ("${t}").`}),setOptionArityError:(e,t)=>{const r=e.options[e.options.length-1];return Object.assign(Object.assign({},e),{errorMessage:`Not enough arguments to option ${r.name}.`})}},N=Symbol();class F{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:r=this.arity.extra,proxy:A=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:r,proxy:A})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===N)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");t||this.arity.extra===N?this.arity.extra!==N&&0===this.arity.extra.length?this.arity.leading.push(e):this.arity.trailing.push(e):this.arity.extra.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===N)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let r=0;r<t;++r)this.addPositional({name:e});this.arity.extra=N}addProxy({required:e=0}={}){this.addRest({required:e}),this.arity.proxy=!0}addOption({names:e,description:t,arity:r=0,hidden:A=!1,allowBinding:n=!0}){if(!n&&r>1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(r))throw new Error("The arity must be an integer, got "+r);if(r<0)throw new Error("The arity must be positive, got "+r);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:r,hidden:A,allowBinding:n})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){const r=[this.cliOpts.binaryName],A=[];if(this.paths.length>0&&r.push(...this.paths[0]),e){for(const{names:e,arity:n,hidden:o,description:i}of this.options){if(o)continue;const s=[];for(let e=0;e<n;++e)s.push(" #"+e);const a=`${e.join(",")}${s.join("")}`;!t&&i?A.push({definition:a,description:i}):r.push(`[${a}]`)}r.push(...this.arity.leading.map(e=>`<${e}>`)),this.arity.extra===N?r.push("..."):r.push(...this.arity.extra.map(e=>`[${e}]`)),r.push(...this.arity.trailing.map(e=>`<${e}>`))}return{usage:r.join(" "),options:A}}compile(){if(void 0===this.context)throw new Error("Assertion failed: No context attached");const e={nodes:[{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}}]};let t=0;t=p(e,{dynamics:[],shortcuts:[],statics:{}}),D(e,0,"",t,["setCandidateUsage",this.usage().usage]);const r=this.arity.proxy?"always":"isNotOptionLike",A=this.paths.length>0?this.paths:[[]];for(const n of A){let A=t;if(n.length>0){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});Q(e,A,t),this.registerOptions(e,t),A=t}for(let t=0;t<n.length;++t){const r=p(e,{dynamics:[],shortcuts:[],statics:{}});D(e,A,n[t],r,"pushPath"),A=r}if(this.arity.leading.length>0||!this.arity.proxy){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});w(e,A,"isHelp",t,["useHelp",this.cliIndex]),D(e,t,"\0",1,["setSelectedIndex",-1]),this.registerOptions(e,A)}this.arity.leading.length>0&&D(e,A,"\0",2,["setError","Not enough positional arguments"]);let o=A;for(let t=0;t<this.arity.leading.length;++t){const r=p(e,{dynamics:[],shortcuts:[],statics:{}});this.arity.proxy||this.registerOptions(e,r),(this.arity.trailing.length>0||t+1!==this.arity.leading.length)&&D(e,r,"\0",2,["setError","Not enough positional arguments"]),w(e,o,"isNotOptionLike",r,"pushPositional"),o=r}let i=o;if(this.arity.extra===N||this.arity.extra.length>0){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});if(Q(e,o,t),this.arity.extra===N){const A=p(e,{dynamics:[],shortcuts:[],statics:{}});this.arity.proxy||this.registerOptions(e,A),w(e,o,r,A,"pushExtraNoLimits"),w(e,A,r,A,"pushExtraNoLimits"),Q(e,A,t)}else for(let A=0;A<this.arity.extra.length;++A){const A=p(e,{dynamics:[],shortcuts:[],statics:{}});this.arity.proxy||this.registerOptions(e,A),w(e,i,r,A,"pushExtra"),Q(e,A,t),i=A}i=t}this.arity.trailing.length>0&&D(e,i,"\0",2,["setError","Not enough positional arguments"]);let s=i;for(let t=0;t<this.arity.trailing.length;++t){const r=p(e,{dynamics:[],shortcuts:[],statics:{}});this.arity.proxy||this.registerOptions(e,r),t+1<this.arity.trailing.length&&D(e,r,"\0",2,["setError","Not enough positional arguments"]),w(e,s,"isNotOptionLike",r,"pushPositional"),s=r}w(e,s,r,2,["setError","Extraneous positional argument"]),D(e,s,"\0",1,["setSelectedIndex",this.cliIndex])}return{machine:e,context:this.context}}registerOptions(e,t){w(e,t,["isOption","--"],t,"inhibateOptions"),w(e,t,["isBatchOption",this.allOptionNames],t,"pushBatch"),w(e,t,["isBoundOption",this.allOptionNames,this.options],t,"pushBound"),w(e,t,["isUnsupportedOption",this.allOptionNames],2,["setError","Unsupported option name"]),w(e,t,["isInvalidOption"],2,["setError","Invalid option name"]);for(const r of this.options){const A=r.names.reduce((e,t)=>t.length>e.length?t:e,"");if(0===r.arity)for(const n of r.names)w(e,t,["isOption",n,r.hidden||n!==A],t,"pushTrue"),n.startsWith("--")&&!n.startsWith("--no-")&&w(e,t,["isNegatedOption",n],t,["pushFalse",n]);else{let n=p(e,{dynamics:[],shortcuts:[],statics:{}});for(const o of r.names)w(e,t,["isOption",o,r.hidden||o!==A],n,"pushUndefined");for(let t=0;t<r.arity;++t){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});D(e,n,"\0",2,"setOptionArityError"),w(e,n,"isOptionLike",2,"setOptionArityError");w(e,n,"isNotOptionLike",t,1===r.arity?"setStringValue":"pushStringValue"),n=t}Q(e,n,t)}}}}class K{constructor({binaryName:e="..."}={}){this.builders=[],this.opts={binaryName:e}}static build(e,t={}){return new K(t).commands(e).compile()}getBuilderByIndex(e){if(!(e>=0&&e<this.builders.length))throw new Error(`Assertion failed: Out-of-bound command index (${e})`);return this.builders[e]}commands(e){for(const t of e)t(this.command());return this}command(){const e=new F(this.builders.length,this.opts);return this.builders.push(e),e}compile(){const e=[],t=[];for(const r of this.builders){const{machine:A,context:n}=r.compile();e.push(A),t.push(n)}const r=function(e){const t={nodes:[{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}}]},r=[];let A=t.nodes.length;for(const n of e){r.push(A);for(let e=0;e<n.nodes.length;++e)B(e)||t.nodes.push(m(n.nodes[e],A));A+=n.nodes.length-2}for(const e of r)Q(t,0,e);return t}(e);return function(e){const t=new Set,r=A=>{if(t.has(A))return;t.add(A);const n=e.nodes[A];for(const e of Object.values(n.statics))for(const{to:t}of e)r(t);for(const[,{to:e}]of n.dynamics)r(e);for(const{to:e}of n.shortcuts)r(e);const o=new Set(n.shortcuts.map(({to:e})=>e));for(;n.shortcuts.length>0;){const{to:t}=n.shortcuts.shift(),r=e.nodes[t];for(const[e,t]of Object.entries(r.statics)){let r=Object.prototype.hasOwnProperty.call(n.statics,e)?n.statics[e]:n.statics[e]=[];for(const e of t)r.some(({to:t})=>e.to===t)||r.push(e)}for(const[e,t]of r.dynamics)n.dynamics.some(([r,{to:A}])=>e===r&&t.to===A)||n.dynamics.push([e,t]);for(const e of r.shortcuts)o.has(e.to)||(n.shortcuts.push(e),o.add(e.to))}};r(0)}(r),{machine:r,contexts:t,process:e=>f(r,e),suggest:(e,t)=>function(e,t,r){const A=r&&t.length>0?[""]:[],n=d(e,t,r),o=[],i=new Set,s=(t,r,A=!0)=>{let n=[r];for(;n.length>0;){const r=n;n=[];for(const o of r){const r=e.nodes[o],i=Object.keys(r.statics);for(const e of Object.keys(r.statics)){const e=i[0];for(const{to:o,reducer:i}of r.statics[e])"pushPath"===i&&(A||t.push(e),n.push(o))}}A=!1}const s=JSON.stringify(t);i.has(s)||(o.push(t),i.add(s))};for(const{node:t,state:r}of n){if(null!==r.remainder){s([r.remainder],t);continue}const n=e.nodes[t],o=C(n,r);for(const[e,r]of Object.entries(n.statics))(o&&"\0"!==e||!e.startsWith("-")&&r.some(({reducer:e})=>"pushPath"===e))&&s([...A,e],t);if(o)for(const[e,{to:o}]of n.dynamics){if(2===o)continue;const n=v(e,r);if(null!==n)for(const e of n)s([...A,e],t)}}return[...o].sort()}(r,e,t)}}}class M{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:A}of e.options)"-h"!==r&&"--help"!==r||(t.help=A)}]}}static resolveMeta(e){const t=[],r=[];for(let A=e;A instanceof M;A=A.__proto__){const e=this.getMeta(A);for(const r of e.definitions)t.push(r);for(const t of e.transformers)r.push(t)}return{definitions:t,transformers:r}}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,description:r}={}){return(A,n)=>{const o=e.split(",");this.registerDefinition(A,e=>{e.addOption({names:o,arity:0,hidden:t,allowBinding:!1,description:r})}),this.registerTransformer(A,(e,t)=>{for(const{name:r,value:A}of e.options)o.includes(r)&&(t[n]=A)})}}static Counter(e,{hidden:t=!1,description:r}={}){return(A,n)=>{const o=e.split(",");this.registerDefinition(A,e=>{e.addOption({names:o,arity:0,hidden:t,allowBinding:!1,description:r})}),this.registerTransformer(A,(e,t)=>{var r;for(const{name:A,value:i}of e.options)o.includes(A)&&(null!==(r=t[n])&&void 0!==r||(t[n]=0),i?t[n]++:t[n]=0)})}}static String(e={},{arity:t=1,tolerateBoolean:r=!1,hidden:A=!1,description:n}={}){return(o,i)=>{if("string"==typeof e){const s=e.split(",");this.registerDefinition(o,e=>{e.addOption({names:s,arity:r?0:t,hidden:A,description:n})}),this.registerTransformer(o,(e,t)=>{for(const{name:r,value:A}of e.options)s.includes(r)&&(t[i]=A)})}else{const{name:t=i,required:r=!0}=e;this.registerDefinition(o,e=>{e.addPositional({name:t,required:r})}),this.registerTransformer(o,(e,t)=>{for(let A=0;A<e.positionals.length;++A){if(e.positionals[A].extra===N)continue;if(r&&!0===e.positionals[A].extra)continue;if(!r&&!1===e.positionals[A].extra)continue;const[n]=e.positionals.splice(A,1);t[i]=n.value;break}})}}}static Array(e,{arity:t=1,hidden:r=!1,description:A}={}){return(n,o)=>{if(0===t)throw new Error("Array options are expected to have at least an arity of 1");const i=e.split(",");this.registerDefinition(n,e=>{e.addOption({names:i,arity:t,hidden:r,description:A})}),this.registerTransformer(n,(e,t)=>{for(const{name:r,value:A}of e.options)i.includes(r)&&(t[o]=t[o]||[],t[o].push(A))})}}static Rest({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addRest({name:r,required:e})}),this.registerTransformer(t,(e,t,A)=>{const n=t=>{const r=e.positionals[t];return r.extra===N||!1===r.extra&&t<A.arity.leading.length};let o=0;for(;o<e.positionals.length&&n(o);)o+=1;t[r]=e.positionals.splice(0,o).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 catch(e){throw 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.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function R(e,t,r,A){var n,o=arguments.length,i=o<3?t:null===A?A=Object.getOwnPropertyDescriptor(t,r):A;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,A);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}M.Entries={};class x extends M{async execute(){this.context.stdout.write(this.cli.usage(null))}}R([M.Path("--help"),M.Path("-h")],x.prototype,"execute",null);class L extends M{async execute(){var e;this.context.stdout.write((null!==(e=this.cli.binaryVersion)&&void 0!==e?e:"<unknown>")+"\n")}}R([M.Path("--version"),M.Path("-v")],L.prototype,"execute",null);const P={bold:e=>`${e}`,error:e=>`${e}`,code:e=>`${e}`},O={bold:e=>e,error:e=>e,code:e=>e};function U(e,{format:t,paragraphs:r}){return e=(e=(e=(e=(e=e.replace(/\r\n?/g,"\n")).replace(/^[\t ]+|[\t ]+$/gm,"")).replace(/^\n+|\n+$/g,"")).replace(/^-([^\n]*?)\n+/gm,"-$1\n\n")).replace(/\n(\n)?\n*/g,"$1"),r&&(e=e.split(/\n/).map((function(e){let t=e.match(/^[*-][\t ]+(.*)/);return t?t[1].match(/(.{1,78})(?: |$)/g).map((e,t)=>(0===t?"- ":" ")+e).join("\n"):e.match(/(.{1,80})(?: |$)/g).join("\n")})).join("\n\n")),(e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(function(e,r,A){return t.code(r+A+r)})))?e+"\n":""}class T extends M{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,t){const r=new T(t);r.path=e.path;for(const t of e.options)switch(t.name){case"-c":r.commands.push(Number(t.value));break;case"-i":r.index=Number(t.value)}return r}async execute(){let e=this.commands;if(void 0!==this.index&&this.index>=0&&this.index<e.length&&(e=[e[this.index]]),0===e.length)this.context.stdout.write(this.cli.usage());else if(1===e.length)this.context.stdout.write(this.cli.usage(this.contexts[e[0]].commandClass,{detailed:!0}));else if(e.length>1){this.context.stdout.write("Multiple commands match your selection:\n"),this.context.stdout.write("\n");let e=0;for(const t of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[t].commandClass,{prefix:(e+++". ").padStart(5)}));this.context.stdout.write("\n"),this.context.stdout.write("Run again with -h=<index> to see the longer details of any of those commands.\n")}}}function j(){return"0"!==process.env.FORCE_COLOR&&("1"===process.env.FORCE_COLOR||!(void 0===process.stdout||!process.stdout.isTTY))}class Y{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:r,enableColors:A=j()}={}){this.registrations=new Map,this.builder=new K({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=r,this.enableColors=A}static from(e,t={}){const r=new Y(t);for(const t of e)r.register(t);return r}register(e){const t=this.builder.command();this.registrations.set(e,t.cliIndex);const{definitions:r}=e.resolveMeta(e.prototype);for(const e of r)e(t);t.setContext({commandClass:e})}process(e){const{contexts:t,process:r}=this.builder.compile(),A=r(e);switch(A.selectedIndex){case-1:return T.from(A,t);default:{const{commandClass:e}=t[A.selectedIndex],r=this.registrations.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the command class to have been registered.");const n=this.builder.getBuilderByIndex(r),o=new e;o.path=A.path;const{transformers:i}=e.resolveMeta(e.prototype);for(const e of i)e(A,o,n);return o}}}async run(e,t){let r,A;if(Array.isArray(e))try{r=this.process(e)}catch(e){return t.stdout.write(this.error(e)),1}else r=e;if(r.help)return t.stdout.write(this.usage(r,{detailed:!0})),0;r.context=t,r.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(e,t)=>this.error(e,t),process:e=>this.process(e),run:(e,r)=>this.run(e,Object.assign(Object.assign({},t),r)),usage:(e,t)=>this.usage(e,t)};try{A=await r.validateAndExecute().catch(e=>r.catch(e).then(()=>0))}catch(e){return t.stdout.write(this.error(e,{command:r})),1}return A}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){const{contexts:r,process:A,suggest:n}=this.builder.compile();return n(e,t)}definitions({colored:e=!1}={}){const t=[];for(const[r,A]of this.registrations){if(void 0===r.usage)continue;const{usage:n}=this.getUsageByIndex(A,{detailed:!1}),{usage:o,options:i}=this.getUsageByIndex(A,{detailed:!0,inlineOptions:!1}),s=void 0!==r.usage.category?U(r.usage.category,{format:this.format(e),paragraphs:!1}):void 0,a=void 0!==r.usage.description?U(r.usage.description,{format:this.format(e),paragraphs:!1}):void 0,c=void 0!==r.usage.details?U(r.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=void 0!==r.usage.examples?r.usage.examples.map(([t,r])=>[U(t,{format:this.format(e),paragraphs:!1}),r.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:n,usage:o,category:s,description:a,details:c,examples:g,options:i})}return t}usage(e=null,{colored:t,detailed:r=!1,prefix:A="$ "}={}){const n=null!==e&&void 0===e.getMeta?e.constructor:e;let o="";if(n)if(r){const{description:e="",details:r="",examples:i=[]}=n.usage||{};""!==e&&(o+=U(e,{format:this.format(t),paragraphs:!1}).replace(/^./,e=>e.toUpperCase()),o+="\n"),(""!==r||i.length>0)&&(o+=this.format(t).bold("Usage:")+"\n",o+="\n");const{usage:s,options:a}=this.getUsageByRegistration(n,{inlineOptions:!1});if(o+=`${this.format(t).bold(A)}${s}\n`,a.length>0){o+="\n",o+=P.bold("Options:")+"\n";const e=a.reduce((e,t)=>Math.max(e,t.definition.length),0);o+="\n";for(const{definition:r,description:A}of a)o+=` ${r.padEnd(e)} ${U(A,{format:this.format(t),paragraphs:!1})}`}if(""!==r&&(o+="\n",o+=this.format(t).bold("Details:")+"\n",o+="\n",o+=U(r,{format:this.format(t),paragraphs:!0})),i.length>0){o+="\n",o+=this.format(t).bold("Examples:")+"\n";for(let[e,r]of i)o+="\n",o+=U(e,{format:this.format(t),paragraphs:!1}),o+=r.replace(/^/m," "+this.format(t).bold(A)).replace(/\$0/g,this.binaryName)+"\n"}}else{const{usage:e}=this.getUsageByRegistration(n);o+=`${this.format(t).bold(A)}${e}\n`}else{const e=new Map;for(const[r,A]of this.registrations.entries()){if(void 0===r.usage)continue;const n=void 0!==r.usage.category?U(r.usage.category,{format:this.format(t),paragraphs:!1}):null;let o=e.get(n);void 0===o&&e.set(n,o=[]);const{usage:i}=this.getUsageByIndex(A);o.push({commandClass:r,usage:i})}const r=Array.from(e.keys()).sort((e,t)=>null===e?-1:null===t?1:e.localeCompare(t,"en",{usage:"sort",caseFirst:"upper"})),n=void 0!==this.binaryLabel,i=void 0!==this.binaryVersion;n||i?(o+=n&&i?this.format(t).bold(`${this.binaryLabel} - ${this.binaryVersion}`)+"\n\n":n?this.format(t).bold(""+this.binaryLabel)+"\n":this.format(t).bold(""+this.binaryVersion)+"\n",o+=` ${this.format(t).bold(A)}${this.binaryName} <command>\n`):o+=`${this.format(t).bold(A)}${this.binaryName} <command>\n`;for(let A of r){const r=e.get(A).slice().sort((e,t)=>e.usage.localeCompare(t.usage,"en",{usage:"sort",caseFirst:"upper"})),n=null!==A?A.trim():"Where <command> is one of";o+="\n",o+=this.format(t).bold(n+":")+"\n";for(let{commandClass:e,usage:A}of r){const r=e.usage.description||"undocumented";o+="\n",o+=` ${this.format(t).bold(A)}\n`,o+=" "+U(r,{format:this.format(t),paragraphs:!1})}}o+="\n",o+=U("You can also print more details about any of these commands by calling them after adding the `-h,--help` flag right after the command name.",{format:this.format(t),paragraphs:!0})}return o}error(e,{colored:t,command:r=null}={}){e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let A="",n=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");"Error"===n&&(n="Internal Error"),A+=`${this.format(t).error(n)}: ${e.message}\n`;const o=e.clipanion;return void 0!==o?"usage"===o.type&&(A+="\n",A+=this.usage(r)):e.stack&&(A+=e.stack.replace(/^.*\n/,"")+"\n"),A}getUsageByRegistration(e,t){const r=this.registrations.get(e);if(void 0===r)throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(r,t)}getUsageByIndex(e,t){return this.builder.getBuilderByIndex(e).usage(t)}format(e=this.enableColors){return e?P:O}}Y.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr},M.Entries.Help=x,M.Entries.Version=L},15751:(e,t,r)=>{"use strict";const A=r(92413).PassThrough,n=r(65007);e.exports=e=>{if(!e||!e.pipe)throw new TypeError("Parameter `response` must be a response stream.");const t=new A;return n(e,t),e.pipe(t)}},15311:(e,t,r)=>{const A=r(93300),n={};for(const e of Object.keys(A))n[A[e]]=e;const o={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=o;for(const e of Object.keys(o)){if(!("channels"in o[e]))throw new Error("missing channels property: "+e);if(!("labels"in o[e]))throw new Error("missing channel labels property: "+e);if(o[e].labels.length!==o[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=o[e];delete o[e].channels,delete o[e].labels,Object.defineProperty(o[e],"channels",{value:t}),Object.defineProperty(o[e],"labels",{value:r})}o.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,A=e[2]/255,n=Math.min(t,r,A),o=Math.max(t,r,A),i=o-n;let s,a;o===n?s=0:t===o?s=(r-A)/i:r===o?s=2+(A-t)/i:A===o&&(s=4+(t-r)/i),s=Math.min(60*s,360),s<0&&(s+=360);const c=(n+o)/2;return a=o===n?0:c<=.5?i/(o+n):i/(2-o-n),[s,100*a,100*c]},o.rgb.hsv=function(e){let t,r,A,n,o;const i=e[0]/255,s=e[1]/255,a=e[2]/255,c=Math.max(i,s,a),g=c-Math.min(i,s,a),l=function(e){return(c-e)/6/g+.5};return 0===g?(n=0,o=0):(o=g/c,t=l(i),r=l(s),A=l(a),i===c?n=A-r:s===c?n=1/3+t-A:a===c&&(n=2/3+r-t),n<0?n+=1:n>1&&(n-=1)),[360*n,100*o,100*c]},o.rgb.hwb=function(e){const t=e[0],r=e[1];let A=e[2];const n=o.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,A));return A=1-1/255*Math.max(t,Math.max(r,A)),[n,100*i,100*A]},o.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,A=e[2]/255,n=Math.min(1-t,1-r,1-A);return[100*((1-t-n)/(1-n)||0),100*((1-r-n)/(1-n)||0),100*((1-A-n)/(1-n)||0),100*n]},o.rgb.keyword=function(e){const t=n[e];if(t)return t;let r,o=1/0;for(const t of Object.keys(A)){const n=A[t],a=(s=n,((i=e)[0]-s[0])**2+(i[1]-s[1])**2+(i[2]-s[2])**2);a<o&&(o=a,r=t)}var i,s;return r},o.keyword.rgb=function(e){return A[e]},o.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,A=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,A=A>.04045?((A+.055)/1.055)**2.4:A/12.92;return[100*(.4124*t+.3576*r+.1805*A),100*(.2126*t+.7152*r+.0722*A),100*(.0193*t+.1192*r+.9505*A)]},o.rgb.lab=function(e){const t=o.rgb.xyz(e);let r=t[0],A=t[1],n=t[2];r/=95.047,A/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,A=A>.008856?A**(1/3):7.787*A+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*A-16,500*(r-A),200*(A-n)]},o.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,A=e[2]/100;let n,o,i;if(0===r)return i=255*A,[i,i,i];n=A<.5?A*(1+r):A+r-A*r;const s=2*A-n,a=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,i=6*o<1?s+6*(n-s)*o:2*o<1?n:3*o<2?s+(n-s)*(2/3-o)*6:s,a[e]=255*i;return a},o.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,A=e[2]/100,n=r;const o=Math.max(A,.01);A*=2,r*=A<=1?A:2-A,n*=o<=1?o:2-o;return[t,100*(0===A?2*n/(o+n):2*r/(A+r)),100*((A+r)/2)]},o.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let A=e[2]/100;const n=Math.floor(t)%6,o=t-Math.floor(t),i=255*A*(1-r),s=255*A*(1-r*o),a=255*A*(1-r*(1-o));switch(A*=255,n){case 0:return[A,a,i];case 1:return[s,A,i];case 2:return[i,A,a];case 3:return[i,s,A];case 4:return[a,i,A];case 5:return[A,i,s]}},o.hsv.hsl=function(e){const t=e[0],r=e[1]/100,A=e[2]/100,n=Math.max(A,.01);let o,i;i=(2-r)*A;const s=(2-r)*n;return o=r*n,o/=s<=1?s:2-s,o=o||0,i/=2,[t,100*o,100*i]},o.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,A=e[2]/100;const n=r+A;let o;n>1&&(r/=n,A/=n);const i=Math.floor(6*t),s=1-A;o=6*t-i,0!=(1&i)&&(o=1-o);const a=r+o*(s-r);let c,g,l;switch(i){default:case 6:case 0:c=s,g=a,l=r;break;case 1:c=a,g=s,l=r;break;case 2:c=r,g=s,l=a;break;case 3:c=r,g=a,l=s;break;case 4:c=a,g=r,l=s;break;case 5:c=s,g=r,l=a}return[255*c,255*g,255*l]},o.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,A=e[2]/100,n=e[3]/100;return[255*(1-Math.min(1,t*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n)),255*(1-Math.min(1,A*(1-n)+n))]},o.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,A=e[2]/100;let n,o,i;return n=3.2406*t+-1.5372*r+-.4986*A,o=-.9689*t+1.8758*r+.0415*A,i=.0557*t+-.204*r+1.057*A,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,n=Math.min(Math.max(0,n),1),o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),[255*n,255*o,255*i]},o.xyz.lab=function(e){let t=e[0],r=e[1],A=e[2];t/=95.047,r/=100,A/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,A=A>.008856?A**(1/3):7.787*A+16/116;return[116*r-16,500*(t-r),200*(r-A)]},o.lab.xyz=function(e){let t,r,A;r=(e[0]+16)/116,t=e[1]/500+r,A=r-e[2]/200;const n=r**3,o=t**3,i=A**3;return r=n>.008856?n:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,A=i>.008856?i:(A-16/116)/7.787,t*=95.047,r*=100,A*=108.883,[t,r,A]},o.lab.lch=function(e){const t=e[0],r=e[1],A=e[2];let n;n=360*Math.atan2(A,r)/2/Math.PI,n<0&&(n+=360);return[t,Math.sqrt(r*r+A*A),n]},o.lch.lab=function(e){const t=e[0],r=e[1],A=e[2]/360*2*Math.PI;return[t,r*Math.cos(A),r*Math.sin(A)]},o.rgb.ansi16=function(e,t=null){const[r,A,n]=e;let i=null===t?o.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let s=30+(Math.round(n/255)<<2|Math.round(A/255)<<1|Math.round(r/255));return 2===i&&(s+=60),s},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){const t=e[0],r=e[1],A=e[2];if(t===r&&r===A)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(A/255*5)},o.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},o.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},o.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));const A=parseInt(r,16);return[A>>16&255,A>>8&255,255&A]},o.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,A=e[2]/255,n=Math.max(Math.max(t,r),A),o=Math.min(Math.min(t,r),A),i=n-o;let s,a;return s=i<1?o/(1-i):0,a=i<=0?0:n===t?(r-A)/i%6:n===r?2+(A-t)/i:4+(t-r)/i,a/=6,a%=1,[360*a,100*i,100*s]},o.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,A=r<.5?2*t*r:2*t*(1-r);let n=0;return A<1&&(n=(r-.5*A)/(1-A)),[e[0],100*A,100*n]},o.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,A=t*r;let n=0;return A<1&&(n=(r-A)/(1-A)),[e[0],100*A,100*n]},o.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,A=e[2]/100;if(0===r)return[255*A,255*A,255*A];const n=[0,0,0],o=t%1*6,i=o%1,s=1-i;let a=0;switch(Math.floor(o)){case 0:n[0]=1,n[1]=i,n[2]=0;break;case 1:n[0]=s,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=i;break;case 3:n[0]=0,n[1]=s,n[2]=1;break;case 4:n[0]=i,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=s}return a=(1-r)*A,[255*(r*n[0]+a),255*(r*n[1]+a),255*(r*n[2]+a)]},o.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let A=0;return r>0&&(A=t/r),[e[0],100*A,100*r]},o.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let A=0;return r>0&&r<.5?A=t/(2*r):r>=.5&&r<1&&(A=t/(2*(1-r))),[e[0],100*A,100*r]},o.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},o.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,A=r-t;let n=0;return A<1&&(n=(r-A)/(1-A)),[e[0],100*A,100*n]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=function(e){return[0,0,e[0]]},o.gray.hsv=o.gray.hsl,o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},2744:(e,t,r)=>{const A=r(15311),n=r(78577),o={};Object.keys(A).forEach(e=>{o[e]={},Object.defineProperty(o[e],"channels",{value:A[e].channels}),Object.defineProperty(o[e],"labels",{value:A[e].labels});const t=n(e);Object.keys(t).forEach(r=>{const A=t[r];o[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const A=e(t);if("object"==typeof A)for(let e=A.length,t=0;t<e;t++)A[t]=Math.round(A[t]);return A};return"conversion"in e&&(t.conversion=e.conversion),t}(A),o[e][r].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(A)})}),e.exports=o},78577:(e,t,r)=>{const A=r(15311);function n(e){const t=function(){const e={},t=Object.keys(A);for(let r=t.length,A=0;A<r;A++)e[t[A]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),n=Object.keys(A[e]);for(let A=n.length,o=0;o<A;o++){const A=n[o],i=t[A];-1===i.distance&&(i.distance=t[e].distance+1,i.parent=e,r.unshift(A))}}return t}function o(e,t){return function(r){return t(e(r))}}function i(e,t){const r=[t[e].parent,e];let n=A[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)r.unshift(t[i].parent),n=o(A[t[i].parent][i],n),i=t[i].parent;return n.conversion=r,n}e.exports=function(e){const t=n(e),r={},A=Object.keys(t);for(let e=A.length,n=0;n<e;n++){const e=A[n];null!==t[e].parent&&(r[e]=i(e,t))}return r}},93300:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},67566:(e,t,r)=>{"use strict";const A=r(63129),n=r(14951),o=r(10779);function i(e,t,r){const i=n(e,t,r),s=A.spawn(i.command,i.args,i.options);return o.hookChildProcess(s,i),s}e.exports=i,e.exports.spawn=i,e.exports.sync=function(e,t,r){const i=n(e,t,r),s=A.spawnSync(i.command,i.args,i.options);return s.error=s.error||o.verifyENOENTSync(s.status,i),s},e.exports._parse=n,e.exports._enoent=o},10779:e=>{"use strict";const t="win32"===process.platform;function r(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function A(e,A){return t&&1===e&&!A.file?r(A.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;const n=e.emit;e.emit=function(t,o){if("exit"===t){const t=A(o,r);if(t)return n.call(e,"error",t)}return n.apply(e,arguments)}},verifyENOENT:A,verifyENOENTSync:function(e,A){return t&&1===e&&!A.file?r(A.original,"spawnSync"):null},notFoundError:r}},14951:(e,t,r)=>{"use strict";const A=r(85622),n=r(47447),o=r(27066),i=r(35187),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function g(e){if(!s)return e;const t=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(e),r=!a.test(t);if(e.options.forceShell||r){const r=c.test(t);e.command=A.normalize(e.command),e.command=o.command(e.command),e.args=e.args.map(e=>o.argument(e,r));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const A={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?A:g(A)}},27066:e=>{"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e=e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},35187:(e,t,r)=>{"use strict";const A=r(35747),n=r(91470);e.exports=function(e){const t=Buffer.alloc(150);let r;try{r=A.openSync(e,"r"),A.readSync(r,t,0,150,0),A.closeSync(r)}catch(e){}return n(t.toString())}},47447:(e,t,r)=>{"use strict";const A=r(85622),n=r(87945),o=r(37127);function i(e,t){const r=e.options.env||process.env,i=process.cwd(),s=null!=e.options.cwd,a=s&&void 0!==process.chdir&&!process.chdir.disabled;if(a)try{process.chdir(e.options.cwd)}catch(e){}let c;try{c=n.sync(e.command,{path:r[o({env:r})],pathExt:t?A.delimiter:void 0})}catch(e){}finally{a&&process.chdir(i)}return c&&(c=A.resolve(s?e.options.cwd:"",c)),c}e.exports=function(e){return i(e)||i(e,!0)}},93868:(e,t,r)=>{"use strict";const{Transform:A,PassThrough:n}=r(92413),o=r(78761),i=r(33527);e.exports=e=>{const t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t))return e;const r="br"===t;if(r&&"function"!=typeof o.createBrotliDecompress)return e.destroy(new Error("Brotli is not supported on Node.js < 12")),e;let s=!0;const a=new A({transform(e,t,r){s=!1,r(null,e)},flush(e){e()}}),c=new n({autoDestroy:!1,destroy(t,r){e.destroy(),r(t)}}),g=r?o.createBrotliDecompress():o.createUnzip();return g.once("error",t=>{!s||e.readable?c.destroy(t):c.end()}),i(e,c),e.pipe(a).pipe(g).pipe(c),c}},93121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(4016),n=(e,t)=>{let r;if("function"==typeof t){r={connect:t}}else r=t;const n="function"==typeof r.connect,o="function"==typeof r.secureConnect,i="function"==typeof r.close,s=()=>{n&&r.connect(),e instanceof A.TLSSocket&&o&&(e.authorized?r.secureConnect():e.authorizationError||e.once("secureConnect",r.secureConnect)),i&&e.once("close",r.close)};e.writable&&!e.connecting?s():e.connecting?e.once("connect",s):e.destroyed&&i&&r.close(e._hadError)};t.default=n,e.exports=n,e.exports.default=n},66241:(e,t,r)=>{"use strict";const A=r(85622),n=r(5763),o=e=>e.length>1?`{${e.join(",")}}`:e[0],i=(e,t)=>{const r="!"===e[0]?e.slice(1):e;return A.isAbsolute(r)?r:A.join(t,r)},s=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>{return A.posix.join(e,(n=r,i=t.extensions,A.extname(n)?"**/"+n:`**/${n}.${o(i)}`));var n,i}):t.files?t.files.map(t=>A.posix.join(e,"**/"+t)):t.extensions?[A.posix.join(e,"**/*."+o(t.extensions))]:[A.posix.join(e,"**")]};e.exports=async(e,t)=>{if("string"!=typeof(t={cwd:process.cwd(),...t}).cwd)throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);const r=await Promise.all([].concat(e).map(async e=>await n.isDirectory(i(e,t.cwd))?s(e,t):e));return[].concat.apply([],r)},e.exports.sync=(e,t)=>{if("string"!=typeof(t={cwd:process.cwd(),...t}).cwd)throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);const r=[].concat(e).map(e=>n.isDirectorySync(i(e,t.cwd))?s(e,t):e);return[].concat.apply([],r)}},97681:(e,t,r)=>{var A=r(91162),n=function(){},o=function(e,t,r){if("function"==typeof t)return o(e,null,t);t||(t={}),r=A(r||n);var i=e._writableState,s=e._readableState,a=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,g=function(){e.writable||l()},l=function(){c=!1,a||r()},u=function(){a=!1,c||r()},h=function(e){r(e?new Error("exited with error code: "+e):null)},p=function(){return(!a||s&&s.ended)&&(!c||i&&i.ended)?void 0:r(new Error("premature close"))},d=function(){e.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?c&&!i&&(e.on("end",g),e.on("close",g)):(e.on("complete",l),e.on("abort",p),e.req?d():e.on("request",d)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",h),e.on("end",u),e.on("finish",l),!1!==t.error&&e.on("error",r),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",d),e.req&&e.req.removeListener("finish",l),e.removeListener("end",g),e.removeListener("close",g),e.removeListener("finish",l),e.removeListener("exit",h),e.removeListener("end",u),e.removeListener("error",r),e.removeListener("close",p)}};e.exports=o},17067:(e,t,r)=>{var A=r(27180),n=function(){},o=function(e,t,r){if("function"==typeof t)return o(e,null,t);t||(t={}),r=A(r||n);var i=e._writableState,s=e._readableState,a=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,g=function(){e.writable||l()},l=function(){c=!1,a||r.call(e)},u=function(){a=!1,c||r.call(e)},h=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},p=function(t){r.call(e,t)},d=function(){return(!a||s&&s.ended)&&(!c||i&&i.ended)?void 0:r.call(e,new Error("premature close"))},C=function(){e.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?c&&!i&&(e.on("end",g),e.on("close",g)):(e.on("complete",l),e.on("abort",d),e.req?C():e.on("request",C)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",h),e.on("end",u),e.on("finish",l),!1!==t.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",l),e.removeListener("abort",d),e.removeListener("request",C),e.req&&e.req.removeListener("finish",l),e.removeListener("end",g),e.removeListener("close",g),e.removeListener("finish",l),e.removeListener("exit",h),e.removeListener("end",u),e.removeListener("error",p),e.removeListener("close",d)}};e.exports=o},61899:(e,t,r)=>{"use strict";const A=r(42357),n=r(28614),o=r(10278);class i extends n{constructor(e,t){super(),this.options=o.merge({},e),this.answers={...t}}register(e,t){if(o.isObject(e)){for(let t of Object.keys(e))this.register(t,e[t]);return this}A.equal(typeof t,"function","expected a function");let r=e.toLowerCase();return t.prototype instanceof this.Prompt?this.prompts[r]=t:this.prompts[r]=t(this.Prompt,this),this}async prompt(e=[]){for(let t of[].concat(e))try{"function"==typeof t&&(t=await t.call(this)),await this.ask(o.merge({},this.options,t))}catch(e){return Promise.reject(e)}return this.answers}async ask(e){"function"==typeof e&&(e=await e.call(this));let t=o.merge({},this.options,e),{type:r,name:n}=e,{set:i,get:s}=o;if("function"==typeof r&&(r=await r.call(this,e,this.answers)),!r)return this.answers[n];A(this.prompts[r],`Prompt "${r}" is not registered`);let a=new this.prompts[r](t),c=s(this.answers,n);a.state.answers=this.answers,a.enquirer=this,n&&a.on("submit",e=>{this.emit("answer",n,e,a),i(this.answers,n,e)});let g=a.emit.bind(a);return a.emit=(...e)=>(this.emit.call(this,...e),g(...e)),this.emit("prompt",a,this),t.autofill&&null!=c?(a.value=a.input=c,"show"===t.autofill&&await a.submit()):c=a.value=await a.run(),c}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||r(58386)}static get prompts(){return r(53609)}static get types(){return r(13235)}static get prompt(){const e=(t,...r)=>{let A=new this(...r),n=A.emit.bind(A);return A.emit=(...t)=>(e.emit(...t),n(...t)),A.prompt(t)};return o.mixinEmitter(e,new n),e}}o.mixinEmitter(i,new n);const s=i.prompts;for(let e of Object.keys(s)){let t=e.toLowerCase(),r=t=>new s[e](t).run();i.prompt[t]=r,i[t]=r,i[e]||Reflect.defineProperty(i,e,{get:()=>s[e]})}const a=e=>{o.defineExport(i,e,()=>i.types[e])};a("ArrayPrompt"),a("AuthPrompt"),a("BooleanPrompt"),a("NumberPrompt"),a("StringPrompt"),e.exports=i},72380:(e,t,r)=>{"use strict";const A="Apple_Terminal"===process.env.TERM_PROGRAM,n=r(97991),o=r(10278),i=e.exports=t,s="[";let a=!1;const c=i.code={bell:"",beep:"",beginning:"",down:"",esc:s,getPosition:"",hide:"[?25l",line:"",lineEnd:"",lineStart:"",restorePosition:s+(A?"8":"u"),savePosition:s+(A?"7":"s"),screen:"",show:"[?25h",up:""},g=i.cursor={get hidden(){return a},hide:()=>(a=!0,c.hide),show:()=>(a=!1,c.show),forward:(e=1)=>`[${e}C`,backward:(e=1)=>`[${e}D`,nextLine:(e=1)=>"".repeat(e),prevLine:(e=1)=>"".repeat(e),up:(e=1)=>e?`[${e}A`:"",down:(e=1)=>e?`[${e}B`:"",right:(e=1)=>e?`[${e}C`:"",left:(e=1)=>e?`[${e}D`:"",to:(e,t)=>t?`[${t+1};${e+1}H`:`[${e+1}G`,move(e=0,t=0){let r="";return r+=e<0?g.left(-e):e>0?g.right(e):"",r+=t<0?g.up(-t):t>0?g.down(t):"",r},restore(e={}){let{after:t,cursor:r,initial:A,input:n,prompt:s,size:a,value:c}=e;if(A=o.isPrimitive(A)?String(A):"",n=o.isPrimitive(n)?String(n):"",c=o.isPrimitive(c)?String(c):"",a){let e=i.cursor.up(a)+i.cursor.to(s.length),t=n.length-r;return t>0&&(e+=i.cursor.left(t)),e}if(c||t){let e=!n&&A?-A.length:-n.length+r;return t&&(e-=t.length),""===n&&A&&!s.includes(A)&&(e+=A.length),i.cursor.move(e)}}},l=i.erase={screen:c.screen,up:c.up,down:c.down,line:c.line,lineEnd:c.lineEnd,lineStart:c.lineStart,lines(e){let t="";for(let r=0;r<e;r++)t+=i.erase.line+(r<e-1?i.cursor.up(1):"");return e&&(t+=i.code.beginning),t}};i.clear=(e="",t=process.stdout.columns)=>{if(!t)return l.line+g.to(0);let r=e.split(/\r?\n/),A=0;for(let e of r)A+=1+Math.floor(Math.max((o=e,[...n.unstyle(o)].length-1),0)/t);var o;return(l.line+g.prevLine()).repeat(A-1)+l.line+g.to(0)}},62475:(e,t)=>{"use strict";t.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"},t.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"},t.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"},t.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"},t.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}},64083:e=>{"use strict";const t=e=>(e=>e.filter((t,r)=>e.lastIndexOf(t)===r))(e).filter(Boolean);e.exports=(e,r={},A="")=>{let n,o,{past:i=[],present:s=""}=r;switch(e){case"prev":case"undo":return n=i.slice(0,i.length-1),o=i[i.length-1]||"",{past:t([A,...n]),present:o};case"next":case"redo":return n=i.slice(1),o=i[0]||"",{past:t([...n,A]),present:o};case"save":return{past:t([...i,A]),present:""};case"remove":return o=t(i.filter(e=>e!==A)),s="",o.length&&(s=o.pop()),{past:o,present:s};default:throw new Error(`Invalid action: "${e}"`)}}},84368:(e,t,r)=>{"use strict";const A=r(97991);class n{constructor(e){this.name=e.key,this.field=e.field||{},this.value=((e="")=>"string"==typeof e?e.replace(/^['"]|['"]$/g,""):"")(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}}function o(e,t,r,A){return(r,n,o,i)=>"function"==typeof o.field[e]?o.field[e].call(t,r,n,o,i):[A,r].find(e=>t.isValue(e))}e.exports=async e=>{let t=e.options,r=new Set(!0===t.required?[]:t.required||[]),i={...t.values,...t.initial},{tabstops:s,items:a,keys:c}=await(async(e={},t={},r=(e=>e))=>{let A=new Set,o=e.fields||[],i=e.template,s=[],a=[],c=[],g=1;"function"==typeof i&&(i=await i());let l=-1,u=()=>i[++l],h=()=>i[l+1],p=e=>{e.line=g,s.push(e)};for(p({type:"bos",value:""});l<i.length-1;){let e=u();if(/^[^\S\n ]$/.test(e)){p({type:"text",value:e});continue}if("\n"===e){p({type:"newline",value:e}),g++;continue}if("\\"===e){e+=u(),p({type:"text",value:e});continue}if(("$"===e||"#"===e||"{"===e)&&"{"===h()){e+=u();let i,s={type:"template",open:e,inner:"",close:"",value:e};for(;i=u();){if("}"===i){"}"===h()&&(i+=u()),s.value+=i,s.close=i;break}":"===i?(s.initial="",s.key=s.inner):void 0!==s.initial&&(s.initial+=i),s.value+=i,s.inner+=i}s.template=s.open+(s.initial||s.inner)+s.close,s.key=s.key||s.inner,t.hasOwnProperty(s.key)&&(s.initial=t[s.key]),s=r(s),p(s),c.push(s.key),A.add(s.key);let g=a.find(e=>e.name===s.key);s.field=o.find(e=>e.name===s.key),g||(g=new n(s),a.push(g)),g.lines.push(s.line-1);continue}let i=s[s.length-1];"text"===i.type&&i.line===g?i.value+=e:p({type:"text",value:e})}return p({type:"eos",value:""}),{input:i,tabstops:s,unique:A,keys:c,items:a}})(t,i),g=o("result",e,t),l=o("format",e,t),u=o("validate",e,t,!0),h=e.isValue.bind(e);return async(n={},o=!1)=>{let i=0;n.required=r,n.items=a,n.keys=c,n.output="";let p=async(e,t,r,A)=>{let n=await u(e,t,r,A);return!1===n?"Invalid field "+r.name:n};for(let r of s){let s=r.value,c=r.key;if("template"===r.type){if("template"===r.type){let u=a.find(e=>e.name===c);!0===t.required&&n.required.add(u.name);let d=[u.input,n.values[u.value],u.value,s].find(h),C=(u.field||{}).message||r.inner;if(o){let e=await p(n.values[c],n,u,i);if(e&&"string"==typeof e||!1===e){n.invalid.set(c,e);continue}n.invalid.delete(c);let t=await g(n.values[c],n,u,i);n.output+=A.unstyle(t);continue}u.placeholder=!1;let f=s;s=await l(s,n,u,i),d!==s?(n.values[c]=d,s=e.styles.typing(d),n.missing.delete(C)):(n.values[c]=void 0,d=`<${C}>`,s=e.styles.primary(d),u.placeholder=!0,n.required.has(c)&&n.missing.add(C)),n.missing.has(C)&&n.validating&&(s=e.styles.warning(d)),n.invalid.has(c)&&n.validating&&(s=e.styles.danger(d)),i===n.index&&(s=f!==s?e.styles.underline(s):e.styles.heading(A.unstyle(s))),i++}s&&(n.output+=s)}else s&&(n.output+=s)}let d=n.output.split("\n").map(e=>" "+e),C=a.length,f=0;for(let t of a)n.invalid.has(t.name)&&t.lines.forEach(e=>{" "===d[e][0]&&(d[e]=n.styles.danger(n.symbols.bullet)+d[e].slice(1))}),e.isValue(n.values[t.name])&&f++;return n.completed=(f/C*100).toFixed(0),n.output=d.join("\n"),n.output}}},30650:(e,t,r)=>{"use strict";const A=r(51058),n=r(62475),o=/^(?:\x1b)([a-zA-Z0-9])$/,i=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,s={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};const a=(e="",t={})=>{let r,A={name:t.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:e,raw:e,...t};if(Buffer.isBuffer(e)?e[0]>127&&void 0===e[1]?(e[0]-=128,e=""+String(e)):e=String(e):void 0!==e&&"string"!=typeof e?e=String(e):e||(e=A.sequence||""),A.sequence=A.sequence||e||A.name,"\r"===e)A.raw=void 0,A.name="return";else if("\n"===e)A.name="enter";else if("\t"===e)A.name="tab";else if("\b"===e||""===e||""===e||"\b"===e)A.name="backspace",A.meta=""===e.charAt(0);else if(""===e||""===e)A.name="escape",A.meta=2===e.length;else if(" "===e||" "===e)A.name="space",A.meta=2===e.length;else if(e<="")A.name=String.fromCharCode(e.charCodeAt(0)+"a".charCodeAt(0)-1),A.ctrl=!0;else if(1===e.length&&e>="0"&&e<="9")A.name="number";else if(1===e.length&&e>="a"&&e<="z")A.name=e;else if(1===e.length&&e>="A"&&e<="Z")A.name=e.toLowerCase(),A.shift=!0;else if(r=o.exec(e))A.meta=!0,A.shift=/^[A-Z]$/.test(r[1]);else if(r=i.exec(e)){let t=[...e];""===t[0]&&""===t[1]&&(A.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),o=(r[3]||r[5]||1)-1;A.ctrl=!!(4&o),A.meta=!!(10&o),A.shift=!!(1&o),A.code=n,A.name=s[n],A.shift=function(e){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(e)}(n)||A.shift,A.ctrl=function(e){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(e)}(n)||A.ctrl}return A};a.listen=(e={},t)=>{let{stdin:r}=e;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let n=A.createInterface({terminal:!0,input:r});A.emitKeypressEvents(r,n);let o=(e,r)=>t(e,a(e,r),n),i=r.isRaw;r.isTTY&&r.setRawMode(!0),r.on("keypress",o),n.resume();return()=>{r.isTTY&&r.setRawMode(i),r.removeListener("keypress",o),n.pause(),n.close()}},a.action=(e,t,r)=>{let A={...n,...r};return t.ctrl?(t.action=A.ctrl[t.name],t):t.option&&A.option?(t.action=A.option[t.name],t):t.shift?(t.action=A.shift[t.name],t):(t.action=A.keys[t.name],t)},e.exports=a},96496:(e,t,r)=>{"use strict";const A=r(10278);e.exports=(e,t={})=>{e.cursorHide();let{input:r="",initial:n="",pos:o,showCursor:i=!0,color:s}=t,a=s||e.styles.placeholder,c=A.inverse(e.styles.primary),g=t=>c(e.styles.black(t)),l=r,u=g(" ");if(e.blink&&!0===e.blink.off&&(g=e=>e,u=""),i&&0===o&&""===n&&""===r)return g(" ");if(i&&0===o&&(r===n||""===r))return g(n[0])+a(n.slice(1));n=A.isPrimitive(n)?""+n:"",r=A.isPrimitive(r)?""+r:"";let h=n&&n.startsWith(r)&&n!==r,p=h?g(n[r.length]):u;if(o!==r.length&&!0===i&&(l=r.slice(0,o)+g(r[o])+r.slice(o+1),p=""),!1===i&&(p=""),h){let t=e.styles.unstyle(l+p);return l+p+a(n.slice(t.length))}return l+p}},58386:(e,t,r)=>{"use strict";const A=r(28614),n=r(97991),o=r(30650),i=r(47159),s=r(61807),a=r(26205),c=r(10278),g=r(72380);class l extends A{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,a(this),i(this),this.state=new s(this),this.initial=[e.initial,e.default].find(e=>null!=e),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=function(e){"number"==typeof e&&(e=[e,e,e,e]);let t=[].concat(e||[]),r=e=>e%2==0?"\n":" ",A=[];for(let e=0;e<4;e++){let n=r(e);t[e]?A.push(n.repeat(t[e])):A.push("")}return A}(this.options.margin),this.setMaxListeners(0),function(e){let t=t=>void 0===e[t]||"function"==typeof e[t],r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],A=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let n of Object.keys(e.options)){if(r.includes(n))continue;if(/^on[A-Z]/.test(n))continue;let o=e.options[n];"function"==typeof o&&t(n)?A.includes(n)||(e[n]=o.bind(e)):"function"!=typeof e[n]&&(e[n]=o)}}(this)}async keypress(e,t={}){this.keypressed=!0;let r=o.action(e,o(e,t),this.options.actions);this.state.keypress=r,this.emit("keypress",e,r),this.emit("state",this.state.clone());let A=this.options[r.action]||this[r.action]||this.dispatch;if("function"==typeof A)return await A.call(this,e,r);this.alert()}alert(){delete this.state.alert,!1===this.options.show?this.emit("alert"):this.stdout.write(g.code.beep)}cursorHide(){this.stdout.write(g.cursor.hide()),c.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(g.cursor.show())}write(e){e&&(this.stdout&&!1!==this.state.show&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let t=this.state.buffer;this.state.buffer="",(t||e)&&!1!==this.options.show&&this.stdout.write(g.cursor.down(e)+g.clear(t,this.width))}restore(){if(this.state.closed||!1===this.options.show)return;let{prompt:e,after:t,rest:r}=this.sections(),{cursor:A,initial:n="",input:o="",value:i=""}=this,s={after:t,cursor:A,initial:n,input:o,prompt:e,size:this.state.size=r.length,value:i},a=g.cursor.restore(s);a&&this.stdout.write(a)}sections(){let{buffer:e,input:t,prompt:r}=this.state;r=n.unstyle(r);let A=n.unstyle(e),o=A.indexOf(r),i=A.slice(0,o),s=A.slice(o).split("\n"),a=s[0],c=s[s.length-1],g=(r+(t?" "+t:"")).length,l=g<a.length?a.slice(g+1):"";return{header:i,prompt:a,after:l,rest:s.slice(1),last:c}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(!0!==e){let t="\n"+this.symbols.pointer+" ";return t+="string"==typeof e?e.trim():"Invalid input",this.state.error="\n"+this.styles.danger(t),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,void(this.state.error=void 0)}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),"function"==typeof this.options.onCancel&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),t=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(g.cursor.down(e.rest.length)),this.write("\n".repeat(t))}catch(e){}this.emit("close")}start(){this.stop||!1===this.options.show||(this.stop=o.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=!0===this.options.skip,"function"==typeof this.options.skip&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:t,result:r}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>r.call(this,this.value),"function"==typeof t.initial&&(this.initial=await t.initial.call(this,this)),"function"==typeof t.onRun&&await t.onRun.call(this,this),"function"==typeof t.onSubmit){let e=t.onSubmit.bind(this),r=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await e(this.name,this.value,this),r())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,t)=>{if(this.once("submit",e),this.once("cancel",t),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,t,r){let{options:A,state:n,symbols:o,timers:i}=this,s=i&&i[e];n.timer=s;let a=A[e]||n[e]||o[e],c=t&&null!=t[e]?t[e]:await a;if(""===c)return c;let g=await this.resolve(c,n,t,r);return!g&&t&&t[e]?this.resolve(a,n,t,r):g}async prefix(){let e=await this.element("prefix")||this.symbols,t=this.timers&&this.timers.prefix,r=this.state;if(r.timer=t,c.isObject(e)&&(e=e[r.status]||e.pending),!c.hasColor(e)){return(this.styles[r.status]||this.styles.pending)(e)}return e}async message(){let e=await this.element("message");return c.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,t=this.timers&&this.timers.separator,r=this.state;r.timer=t;let A=e[r.status]||e.pending||r.separator,n=await this.resolve(A,r);return c.isObject(n)&&(n=n[r.status]||n.pending),c.hasColor(n)?n:this.styles.muted(n)}async pointer(e,t){let r=await this.element("pointer",e,t);if("string"==typeof r&&c.hasColor(r))return r;if(r){let e=this.styles,A=this.index===t,n=A?e.primary:e=>e,o=await this.resolve(r[A?"on":"off"]||r,this.state),i=c.hasColor(o)?o:n(o);return A?i:" ".repeat(o.length)}}async indicator(e,t){let r=await this.element("indicator",e,t);if("string"==typeof r&&c.hasColor(r))return r;if(r){let t=this.styles,A=!0===e.enabled,n=A?t.success:t.dark,o=r[A?"on":"off"]||r;return c.hasColor(o)?o:n(o)}return""}body(){return null}footer(){if("pending"===this.state.status)return this.element("footer")}header(){if("pending"===this.state.status)return this.element("header")}async hint(){if("pending"===this.state.status&&!this.isValue(this.state.input)){let e=await this.element("hint");return c.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return!0!==this.options.required||this.isValue(e)}isValue(e){return null!=e&&""!==e}resolve(e,...t){return c.resolve(this,e,...t)}get base(){return l.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||c.height(this.stdout,25)}get width(){return this.options.columns||c.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:t}=this.state,r=[t,e].find(this.isValue.bind(this));return this.isValue(r)?r:this.initial}static get prompt(){return e=>new this(e).run()}}e.exports=l},63310:(e,t,r)=>{"use strict";const A=r(31557);e.exports=class extends A{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:t,input:r}=this.state;return this.input=r.slice(0,t)+e+r.slice(t),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:t}=this.state;return t?(this.input=t.slice(0,e-1)+t.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:t}=this.state;return void 0===t[e]?this.alert():(this.input=(""+t).slice(0,e)+(""+t).slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,t=this.state._choices){if("function"==typeof this.options.suggest)return this.options.suggest.call(this,e,t);let r=e.toLowerCase();return t.filter(e=>e.message.toLowerCase().includes(r))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if("pending"!==this.state.status)return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,t=((e,t)=>{let r=e.toLowerCase();return e=>{let A=e.toLowerCase().indexOf(r),n=t(e.slice(A,A+r.length));return A>=0?e.slice(0,A)+n+e.slice(A+r.length):e}})(this.input,e),r=this.choices;this.choices=r.map(e=>({...e,message:t(e.message)})),await super.render(),this.choices=r}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}}},52810:(e,t,r)=>{"use strict";const A=r(46614);function n(e,t){return e.username===this.options.username&&e.password===this.options.password}const o=(e=n)=>{const t=[{name:"username",message:"username"},{name:"password",message:"password",format(e){if(this.options.showPassword)return e;return(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length))}}];class r extends(A.create(e)){constructor(e){super({...e,choices:t})}static create(e){return o(e)}}return r};e.exports=o()},65742:(e,t,r)=>{"use strict";const A=r(82710);e.exports=class extends A{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}}},24570:(e,t,r)=>{"use strict";const A=r(31557),n=r(71447).prototype;e.exports=class extends A{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(e=>null!=e),this.emptyError="",this.values={}}dispatch(e,t){let r=this.focused,A=r.parent||{};return r.editable||A.editable||"a"!==e&&"i"!==e?n.dispatch.call(this,e,t):super[e]()}append(e,t){return n.append.call(this,e,t)}delete(e,t){return n.delete.call(this,e,t)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?n.next.call(this):super.next()}prev(){return this.focused.editable?n.prev.call(this):super.prev()}async indicator(e,t){let r=e.indicator||"",A=e.editable?r:super.indicator(e,t);return await this.resolve(A,this.state,e,t)||""}indent(e){return"heading"===e.role?"":e.editable?" ":" "}async renderChoice(e,t){return e.indent="",e.editable?n.renderChoice.call(this,e,t):super.renderChoice(e,t)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let t of this.choices){if("function"!=typeof t.validate)continue;if("heading"===t.role)continue;let r=t.parent?this.value[t.parent.name]:this.value;if(t.editable?r=t.value===t.name?t.initial||"":t.value:this.isDisabled(t)||(r=!0===t.enabled),e=await t.validate(r,this.state),!0!==e)break}return!0!==e&&(this.state.error="string"==typeof e?e:"Invalid Input"),e}submit(){if(!0===this.focused.newChoice)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let t=e.parent?this.value[e.parent.name]:this.value;"heading"!==e.role?e.editable?t[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(t[e.name]=!0===e.enabled):this.value[e.name]={}}return this.base.submit.call(this)}}},71447:(e,t,r)=>{"use strict";const A=r(97991),n=r(31557),o=r(96496);e.exports=class extends n{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(e=>null!=e),this.emptyError="",this.values={}}async reset(e){return await super.reset(),!0===e&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(e=>e.reset&&e.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let t=this.focused;if(!t)return this.alert();let{cursor:r,input:A}=t;return t.value=t.input=A.slice(0,r)+e+A.slice(r),t.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:t,input:r}=e;return e.value=e.input=r.slice(0,t-1)+r.slice(t),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:t,input:r}=e;if(void 0===r[t])return this.alert();let A=(""+r).slice(0,t)+(""+r).slice(t+1);return e.value=e.input=A,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,t){return this.dispatch(e,t)}number(e,t){return this.dispatch(e,t)}next(){let e=this.focused;if(!e)return this.alert();let{initial:t,input:r}=e;return t&&t.startsWith(r)&&r!==t?(e.value=e.input=t,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?0===e.cursor?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"âĻŋ":"⊙"}async choiceSeparator(e,t){let r=await this.resolve(e.separator,this.state,e,t)||":";return r?" "+this.styles.disabled(r):""}async renderChoice(e,t){await this.onChoice(e,t);let{state:r,styles:n}=this,{cursor:i,initial:s="",name:a,hint:c,input:g=""}=e,{muted:l,submitted:u,primary:h,danger:p}=n,d=c,C=this.index===t,f=e.validate||(()=>!0),I=await this.choiceSeparator(e,t),E=e.message;"right"===this.align&&(E=E.padStart(this.longest+1," ")),"left"===this.align&&(E=E.padEnd(this.longest+1," "));let B=this.values[a]=g||s,y=g?"success":"dark";!0!==await f.call(e,B,this.state)&&(y="danger");let m=(0,n[y])(await this.indicator(e,t))+(e.pad||""),w=this.indent(e),Q=()=>[w,m,E+I,g,d].filter(Boolean).join(" ");if(r.submitted)return E=A.unstyle(E),g=u(g),d="",Q();if(e.format)g=await e.format.call(this,g,e,t);else{let e=this.styles.muted;g=o(this,{input:g,initial:s,pos:i,showCursor:C,color:e})}return this.isValue(g)||(g=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[a]=await e.result.call(this,B,e,t)),C&&(E=h(E)),e.error?g+=(g?" ":"")+p(e.error.trim()):e.hint&&(g+=(g?" ":"")+l(e.hint.trim())),Q()}async submit(){return this.value=this.values,super.base.submit.call(this)}}},53609:(e,t,r)=>{"use strict";const A=r(10278),n=(e,r)=>{A.defineExport(t,e,r),A.defineExport(t,e.toLowerCase(),r)};n("AutoComplete",()=>r(63310)),n("BasicAuth",()=>r(52810)),n("Confirm",()=>r(65742)),n("Editable",()=>r(24570)),n("Form",()=>r(71447)),n("Input",()=>r(12372)),n("Invisible",()=>r(32684)),n("List",()=>r(40876)),n("MultiSelect",()=>r(42293)),n("Numeral",()=>r(42126)),n("Password",()=>r(84697)),n("Scale",()=>r(99580)),n("Select",()=>r(31557)),n("Snippet",()=>r(98094)),n("Sort",()=>r(60042)),n("Survey",()=>r(25223)),n("Text",()=>r(97298)),n("Toggle",()=>r(41817)),n("Quiz",()=>r(88677))},12372:(e,t,r)=>{"use strict";const A=r(45853),n=r(64083);e.exports=class extends A{constructor(e){super(e);let t=this.options.history;if(t&&t.store){let e=t.values||this.initial;this.autosave=!!t.autosave,this.store=t.store,this.data=this.store.get("values")||{past:[],present:e},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=n(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=n("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&!0===this.autosave&&this.save(),super.submit()}}},32684:(e,t,r)=>{"use strict";const A=r(45853);e.exports=class extends A{format(){return""}}},40876:(e,t,r)=>{"use strict";const A=r(45853);e.exports=class extends A{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:e=>e;return this.list.map(e).join(", ")}async submit(e){let t=this.state.error||await this.validate(this.list,this.state);return!0!==t?(this.state.error=t,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}}},42293:(e,t,r)=>{"use strict";const A=r(31557);e.exports=class extends A{constructor(e){super({...e,multiple:!0})}}},42126:(e,t,r)=>{e.exports=r(64987)},84697:(e,t,r)=>{"use strict";const A=r(45853);e.exports=class extends A{constructor(e){super(e),this.cursorShow()}format(e=this.input){if(!this.keypressed)return"";return(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length))}}},88677:(e,t,r)=>{"use strict";const A=r(31557);e.exports=class extends A{constructor(e){if(super(e),"number"!=typeof this.options.correctChoice||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,t){let r=await super.toChoices(e,t);if(r.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>r.length)throw new Error("Please specify the index of the correct answer from the list of choices");return r}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}}},99580:(e,t,r)=>{"use strict";const A=r(97991),n=r(14723),o=r(10278);e.exports=class extends n{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||"\n ";let t=e.startNumber||1;"number"==typeof this.scale&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((e,r)=>({name:r+t})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(!0===this.tableized)return;this.tableized=!0;let e=0;for(let t of this.choices){e=Math.max(e,t.message.length),t.scaleIndex=t.initial||2,t.scale=[];for(let e=0;e<this.scale.length;e++)t.scale.push({index:e})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,t){if(this.multiple)return this[t.name]?await this[t.name](e,t):await super.dispatch(e,t);this.alert()}heading(e,t,r){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){if(this.state.submitted){return this.choices.map(e=>this.styles.info(e.index)).join(", ")}return""}pointer(){return""}renderScaleKey(){if(!1===this.scaleKey)return"";if(this.state.submitted)return"";return["",...this.scale.map(e=>` ${e.name} - ${e.message}`)].map(e=>this.styles.muted(e)).join("\n")}renderScaleHeading(e){let t=this.scale.map(e=>e.name);"function"==typeof this.options.renderScaleHeading&&(t=this.options.renderScaleHeading.call(this,e));let r=this.scaleLength-t.join("").length,A=Math.round(r/(t.length-1)),n=t.map(e=>this.styles.strong(e)).join(" ".repeat(A)),o=" ".repeat(this.widths[0]);return this.margin[3]+o+this.margin[1]+n}scaleIndicator(e,t,r){if("function"==typeof this.options.scaleIndicator)return this.options.scaleIndicator.call(this,e,t,r);let A=e.scaleIndex===t.index;return t.disabled?this.styles.hint(this.symbols.radio.disabled):A?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,t){let r=e.scale.map(r=>this.scaleIndicator(e,r,t)),A="Hyper"===this.term?"":" ";return r.join(A+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,t){await this.onChoice(e,t);let r=this.index===t,n=await this.pointer(e,t),i=await e.hint;i&&!o.hasColor(i)&&(i=this.styles.muted(i));let s=e=>this.margin[3]+e.replace(/\s+$/,"").padEnd(this.widths[0]," "),a=this.newline,c=this.indent(e),g=await this.resolve(e.message,this.state,e,t),l=await this.renderScale(e,t),u=this.margin[1]+this.margin[3];this.scaleLength=A.unstyle(l).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-u.length);let h=o.wordWrap(g,{width:this.widths[0],newline:a}).split("\n").map(e=>s(e)+this.margin[1]);return r&&(l=this.styles.info(l),h=h.map(e=>this.styles.info(e))),h[0]+=l,this.linebreak&&h.push(""),[c+n,h.join("\n")].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(e,t)=>await this.renderChoice(e,t)),t=await Promise.all(e),r=await this.renderScaleHeading();return this.margin[0]+[r,...t.map(e=>e.join(" "))].join("\n")}async render(){let{submitted:e,size:t}=this.state,r=await this.prefix(),A=await this.separator(),n=await this.message(),o="";!1!==this.options.promptLine&&(o=[r,n,A,""].join(" "),this.state.prompt=o);let i=await this.header(),s=await this.format(),a=await this.renderScaleKey(),c=await this.error()||await this.hint(),g=await this.renderChoices(),l=await this.footer(),u=this.emptyError;s&&(o+=s),c&&!o.includes(c)&&(o+=" "+c),e&&!s&&!g.trim()&&this.multiple&&null!=u&&(o+=this.styles.danger(u)),this.clear(t),this.write([i,o,a,g,l].filter(Boolean).join("\n")),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}}},31557:(e,t,r)=>{"use strict";const A=r(14723),n=r(10278);e.exports=class extends A{constructor(e){super(e),this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,t){if(this.multiple)return this[t.name]?await this[t.name](e,t):await super.dispatch(e,t);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,t){return!this.multiple||this.options.pointer?super.pointer(e,t):""}indicator(e,t){return this.multiple?super.indicator(e,t):""}choiceMessage(e,t){let r=this.resolve(e.message,this.state,e,t);return"heading"!==e.role||n.hasColor(r)||(r=this.styles.strong(r)),this.resolve(r,this.state,e,t)}choiceSeparator(){return":"}async renderChoice(e,t){await this.onChoice(e,t);let r=this.index===t,A=await this.pointer(e,t),o=await this.indicator(e,t)+(e.pad||""),i=await this.resolve(e.hint,this.state,e,t);i&&!n.hasColor(i)&&(i=this.styles.muted(i));let s=this.indent(e),a=await this.choiceMessage(e,t),c=()=>[this.margin[3],s+A+o,a,this.margin[1],i].filter(Boolean).join(" ");return"heading"===e.role?c():e.disabled?(n.hasColor(a)||(a=this.styles.disabled(a)),c()):(r&&(a=this.styles.em(a)),c())}async renderChoices(){if("choices"===this.state.loading)return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(e,t)=>await this.renderChoice(e,t)),t=await Promise.all(e);t.length||t.push(this.styles.danger("No matching choices"));let r,A=this.margin[0]+t.join("\n");return this.options.choicesHeader&&(r=await this.resolve(this.options.choicesHeader,this.state)),[r,A].filter(Boolean).join("\n")}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:t}=this.state,r="",A=await this.header(),n=await this.prefix(),o=await this.separator(),i=await this.message();!1!==this.options.promptLine&&(r=[n,i,o,""].join(" "),this.state.prompt=r);let s=await this.format(),a=await this.error()||await this.hint(),c=await this.renderChoices(),g=await this.footer();s&&(r+=s),a&&!r.includes(a)&&(r+=" "+a),e&&!s&&!c.trim()&&this.multiple&&null!=this.emptyError&&(r+=this.styles.danger(this.emptyError)),this.clear(t),this.write([A,r,c,g].filter(Boolean).join("\n")),this.write(this.margin[2]),this.restore()}}},98094:(e,t,r)=>{"use strict";const A=r(97991),n=r(84368),o=r(58386);e.exports=class extends o{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await n(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},!0!==e&&(await this.initialize(),await this.render())}moveCursor(e){let t=this.getItem();this.cursor+=e,t.cursor+=e}dispatch(e,t){t.code||t.ctrl||null==e||!this.getItem()?this.alert():this.append(e,t)}append(e,t){let r=this.getItem(),A=r.input.slice(0,this.cursor),n=r.input.slice(this.cursor);this.input=r.input=`${A}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let t=e.input.slice(this.cursor),r=e.input.slice(0,this.cursor-1);this.input=e.input=`${r}${t}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let t=this.state.completed<100?this.styles.warning:this.styles.success;return!0===this.state.submitted&&100!==this.state.completed&&(t=this.styles.danger),t(this.state.completed+"% completed")}async render(){let{index:e,keys:t=[],submitted:r,size:A}=this.state,n=[this.options.newline,"\n"].find(e=>null!=e),o=await this.prefix(),i=await this.separator(),s=[o,await this.message(),i].filter(Boolean).join(" ");this.state.prompt=s;let a=await this.header(),c=await this.error()||"",g=await this.hint()||"",l=r?"":await this.interpolate(this.state),u=this.state.key=t[e]||"",h=await this.format(u),p=await this.footer();h&&(s+=" "+h),g&&!h&&0===this.state.completed&&(s+=" "+g),this.clear(A);let d=[a,s,l,p,c.trim()];this.write(d.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:t,keys:r,index:A}=this.state,n=t.find(e=>e.name===r[A]);return n&&null!=n.input&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){"function"!=typeof this.interpolate&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:t,output:r,values:n}=this.state;if(e.size){let t="";for(let[r,A]of e)t+=`Invalid ${r}: ${A}\n`;return this.state.error=t,super.submit()}if(t.size)return this.state.error="Required: "+[...t.keys()].join(", "),super.submit();let o=A.unstyle(r).split("\n").map(e=>e.slice(1)).join("\n");return this.value={values:n,result:o},super.submit()}}},60042:(e,t,r)=>{"use strict";const A="(Use <shift>+<up/down> to sort)",n=r(31557);e.exports=class extends n{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,A].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,t){let r=await super.renderChoice(e,t),A=this.symbols.identicalTo+" ",n=this.index===t&&this.sorting?this.styles.muted(A):" ";return!1===this.options.drag&&(n=""),!0===this.options.numbered?n+(t+1+" - ")+r:n+r}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}}},25223:(e,t,r)=>{"use strict";const A=r(14723);function n(e,t={}){if(Array.isArray(t.scale))return t.scale.map(e=>({...e}));let r=[];for(let t=1;t<e+1;t++)r.push({i:t,selected:!1});return r}e.exports=class extends A{constructor(e={}){if(super(e),this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let e=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];e=e.map(e=>this.styles.muted(e)),this.state.header=e.join("\n ")}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let t=await super.toChoices(...e);for(let e of t)e.scale=n(5,this.options),e.scaleIdx=2;return t}dispatch(){this.alert()}space(){let e=this.focused,t=e.scale[e.scaleIdx],r=t.selected;return e.scale.forEach(e=>e.selected=!1),t.selected=!r,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,t){await this.onChoice(e,t);let r=this.index===t,A="Hyper"===this.term,n=A?9:8,o=A?"":" ",i=this.symbols.line.repeat(n),s=" ".repeat(n+(A?0:1)),a=e=>(e?this.styles.success("◉"):"◯")+o,c=t+1+".",g=r?this.styles.heading:this.styles.noop,l=await this.resolve(e.message,this.state,e,t),u=this.indent(e),h=u+e.scale.map((t,r)=>a(r===e.scaleIdx)).join(i),p=u+e.scale.map((t,r)=>(t=>t===e.scaleIdx?g(t):t)(r)).join(s);return r&&(h=this.styles.cyan(h),p=this.styles.cyan(p)),[[c,l].filter(Boolean).join(" "),h,p," "].filter(Boolean).join("\n")}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(e,t)=>await this.renderChoice(e,t)),t=await Promise.all(e);return t.length||t.push(this.styles.danger("No matching choices")),t.join("\n")}format(){if(this.state.submitted){return this.choices.map(e=>this.styles.info(e.scaleIdx)).join(", ")}return""}async render(){let{submitted:e,size:t}=this.state,r=await this.prefix(),A=await this.separator(),n=[r,await this.message(),A].filter(Boolean).join(" ");this.state.prompt=n;let o=await this.header(),i=await this.format(),s=await this.error()||await this.hint(),a=await this.renderChoices(),c=await this.footer();!i&&s||(n+=" "+i),s&&!n.includes(s)&&(n+=" "+s),e&&!i&&!a&&this.multiple&&"form"!==this.type&&(n+=this.styles.danger(this.emptyError)),this.clear(t),this.write([n,o,a,c].filter(Boolean).join("\n")),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}}},97298:(e,t,r)=>{e.exports=r(12372)},41817:(e,t,r)=>{"use strict";const A=r(82710);e.exports=class extends A{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(!0===this.value)return this.alert();this.value=!0,this.render()}disable(){if(!1===this.value)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",t){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=e=>this.styles.primary.underline(e);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,t=await this.header(),r=await this.prefix(),A=await this.separator(),n=await this.message(),o=await this.format(),i=await this.error()||await this.hint(),s=await this.footer(),a=[r,n,A,o].join(" ");this.state.prompt=a,i&&!a.includes(i)&&(a+=" "+i),this.clear(e),this.write([t,a,s].filter(Boolean).join("\n")),this.write(this.margin[2]),this.restore()}}},27011:(e,t,r)=>{"use strict";const A=r(10278),n={default:(e,t)=>t,checkbox(e,t){throw new Error("checkbox role is not implemented yet")},editable(e,t){throw new Error("editable role is not implemented yet")},expandable(e,t){throw new Error("expandable role is not implemented yet")},heading:(e,t)=>(t.disabled="",t.indicator=[t.indicator," "].find(e=>null!=e),t.message=t.message||"",t),input(e,t){throw new Error("input role is not implemented yet")},option:(e,t)=>n.default(e,t),radio(e,t){throw new Error("radio role is not implemented yet")},separator:(e,t)=>(t.disabled="",t.indicator=[t.indicator," "].find(e=>null!=e),t.message=t.message||e.symbols.line.repeat(5),t),spacer:(e,t)=>t};e.exports=(e,t={})=>{let r=A.merge({},n,t.roles);return r[e]||r.default}},61807:(e,t,r)=>{"use strict";const{define:A,width:n}=r(10278);e.exports=class{constructor(e){let t=e.options;A(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=n(t.stdout||process.stdout),Object.assign(this,t),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let t=this._color||e[this.status];return"function"==typeof t?t:e.pending}set loading(e){this._loading=e}get loading(){return"boolean"==typeof this._loading?this._loading:!!this.loadingChoices&&"choices"}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}}},64402:(e,t,r)=>{"use strict";const A=r(10278),n=r(97991),o={default:n.noop,noop:n.noop,set inverse(e){this._inverse=e},get inverse(){return this._inverse||A.inverse(this.primary)},set complement(e){this._complement=e},get complement(){return this._complement||A.complement(this.primary)},primary:n.cyan,success:n.green,danger:n.magenta,strong:n.bold,warning:n.yellow,muted:n.dim,disabled:n.gray,dark:n.dim.gray,underline:n.underline,set info(e){this._info=e},get info(){return this._info||this.primary},set em(e){this._em=e},get em(){return this._em||this.primary.underline},set heading(e){this._heading=e},get heading(){return this._heading||this.muted.underline},set pending(e){this._pending=e},get pending(){return this._pending||this.primary},set submitted(e){this._submitted=e},get submitted(){return this._submitted||this.success},set cancelled(e){this._cancelled=e},get cancelled(){return this._cancelled||this.danger},set typing(e){this._typing=e},get typing(){return this._typing||this.dim},set placeholder(e){this._placeholder=e},get placeholder(){return this._placeholder||this.primary.dim},set highlight(e){this._highlight=e},get highlight(){return this._highlight||this.inverse},merge:(e={})=>{e.styles&&"boolean"==typeof e.styles.enabled&&(n.enabled=e.styles.enabled),e.styles&&"boolean"==typeof e.styles.visible&&(n.visible=e.styles.visible);let t=A.merge({},o,e.styles);delete t.merge;for(let e of Object.keys(n))t.hasOwnProperty(e)||Reflect.defineProperty(t,e,{get:()=>n[e]});for(let e of Object.keys(n.styles))t.hasOwnProperty(e)||Reflect.defineProperty(t,e,{get:()=>n[e]});return t}};e.exports=o},50511:(e,t,r)=>{"use strict";const A="win32"===process.platform,n=r(97991),o=r(10278),i={...n.symbols,upDownDoubleArrow:"⇕",upDownDoubleArrow2:"âŦ",upDownArrow:"↕",asterisk:"*",asterism:"⁂",bulletWhite:"â—Ļ",electricArrow:"⌁",ellipsisLarge:"⋯",ellipsisSmall:"â€Ļ",fullBlock:"█",identicalTo:"≡",indicator:n.symbols.check,leftAngle:"‹",mark:"â€ģ",minus:"−",multiplication:"×",obelus:"Ãˇ",percent:"%",pilcrow:"Âļ",pilcrow2:"❡",pencilUpRight:"✐",pencilDownRight:"✎",pencilRight:"✏",plus:"+",plusMinus:"Âą",pointRight:"☞",rightAngle:"â€ē",section:"§",hexagon:{off:"âŦĄ",on:"âŦĸ",disabled:"âŦĸ"},ballot:{on:"☑",off:"☐",disabled:"☒"},stars:{on:"★",off:"☆",disabled:"☆"},folder:{on:"â–ŧ",off:"â–ļ",disabled:"â–ļ"},prefix:{pending:n.symbols.question,submitted:n.symbols.check,cancelled:n.symbols.cross},separator:{pending:n.symbols.pointerSmall,submitted:n.symbols.middot,cancelled:n.symbols.middot},radio:{off:A?"( )":"◯",on:A?"(*)":"◉",disabled:A?"(|)":"Ⓘ"},numbers:["â“Ē","①","②","â‘ĸ","â‘Ŗ","⑤","â‘Ĩ","â‘Ļ","⑧","⑨","⑩","â‘Ē","â‘Ģ","â‘Ŧ","⑭","⑮","⑯","⑰","⑱","⑲","â‘ŗ","㉑","㉒","㉓","㉔","㉕","㉖","㉗","㉘","㉙","㉚","㉛","㉜","㉝","㉞","㉟","ãŠą","ãŠ˛","ãŠŗ","㊴","ãŠĩ","ãŠļ","ãŠˇ","㊸","㊚","ãŠē","ãŠģ","ãŠŧ","ãŠŊ","㊞","ãŠŋ"]};i.merge=e=>{let t=o.merge({},n.symbols,i,e.symbols);return delete t.merge,t},e.exports=i},26205:(e,t,r)=>{"use strict";const A=r(64402),n=r(50511),o=r(10278);e.exports=e=>{e.options=o.merge({},e.options.theme,e.options),e.symbols=n.merge(e.options),e.styles=A.merge(e.options)}},47159:e=>{"use strict";function t(e,t,r={}){let A=e.timers[t]={name:t,start:Date.now(),ms:0,tick:0},n=r.interval||120;A.frames=r.frames||[],A.loading=!0;let o=setInterval(()=>{A.ms=Date.now()-A.start,A.tick++,e.render()},n);return A.stop=()=>{A.loading=!1,clearInterval(o)},Reflect.defineProperty(A,"interval",{value:o}),e.once("close",()=>A.stop()),A.stop}e.exports=e=>{e.timers=e.timers||{};let r=e.options.timers;if(r)for(let A of Object.keys(r)){let n=r[A];"number"==typeof n&&(n={interval:n}),t(e,A,n)}}},14723:(e,t,r)=>{"use strict";const A=r(97991),n=r(58386),o=r(27011),i=r(10278),{reorder:s,scrollUp:a,scrollDown:c,isObject:g,swap:l}=i;function u(e,t){if(t instanceof Promise)return t;if("function"==typeof t){if(i.isAsyncFn(t))return t;t=t.call(e,e)}for(let r of t){if(Array.isArray(r.choices)){let t=r.choices.filter(t=>!e.isDisabled(t));r.enabled=t.every(e=>!0===e.enabled)}!0===e.isDisabled(r)&&delete r.enabled}return t}e.exports=class extends n{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){"function"==typeof this.options.initial&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:t,autofocus:r,suggest:A}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(e=>e.enabled=!1),"function"!=typeof A&&0===this.selectable.length)throw new Error("At least one choice must be selectable");g(t)&&(t=Object.keys(t)),Array.isArray(t)?(null!=r&&(this.index=this.findIndex(r)),t.forEach(e=>this.enable(this.find(e))),await this.render()):(null!=r&&(t=r),"string"==typeof t&&(t=this.findIndex(t)),"number"==typeof t&&t>-1&&(this.index=Math.max(0,Math.min(t,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,t){this.state.loadingChoices=!0;let r=[],A=0,n=async(e,t)=>{"function"==typeof e&&(e=await e.call(this)),e instanceof Promise&&(e=await e);for(let o=0;o<e.length;o++){let i=e[o]=await this.toChoice(e[o],A++,t);r.push(i),i.choices&&await n(i.choices,i)}return r};return n(e,t).then(e=>(this.state.loadingChoices=!1,e))}async toChoice(e,t,r){if("function"==typeof e&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),"string"==typeof e&&(e={name:e}),e.normalized)return e;e.normalized=!0;let n=e.value,s=o(e.role,this.options);if("string"!=typeof(e=s(this,e)).disabled||e.hint||(e.hint=e.disabled,e.disabled=!0),!0===e.disabled&&null==e.hint&&(e.hint="(disabled)"),null!=e.index)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=t,e.cursor=0,i.define(e,"parent",r),e.level=r?r.level+1:1,null==e.indent&&(e.indent=r?r.indent+" ":e.indent||""),e.path=r?r.path+"."+e.name:e.name,e.enabled=!(!this.multiple||this.isDisabled(e)||!e.enabled&&!this.isSelected(e)),this.isDisabled(e)||(this.longest=Math.max(this.longest,A.unstyle(e.message).length));let a={...e};return e.reset=(t=a.input,r=a.value)=>{for(let t of Object.keys(a))e[t]=a[t];e.input=t,e.value=r},null==n&&"function"==typeof e.initial&&(e.input=await e.initial.call(this,this.state,e,t)),e}async onChoice(e,t){this.emit("choice",e,t,this),"function"==typeof e.onChoice&&await e.onChoice.call(this,this.state,e,t)}async addChoice(e,t,r){let A=await this.toChoice(e,t,r);return this.choices.push(A),this.index=this.choices.length-1,this.limit=this.choices.length,A}async newItem(e,t,r){let A={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(A,t,r);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return null==e.indent?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,t){if(this.multiple&&this[t.name])return this[t.name]();this.alert()}focus(e,t){return"boolean"!=typeof t&&(t=e.enabled),t&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=t&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(e=>e.enabled);return this.choices.forEach(t=>t.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(e=>!!e.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,t){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();"boolean"!=typeof t&&(t=!e.enabled),e.enabled=t,e.choices&&e.choices.forEach(e=>this.toggle(e,t));let r=e.parent;for(;r;){let e=r.choices.filter(e=>this.isDisabled(e));r.enabled=e.every(e=>!0===e.enabled),r=r.parent}return u(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let t=e=>{let t=Number(e);if(t>this.choices.length-1)return this.alert();let r=this.focused,A=this.choices.find(e=>t===e.index);if(!A.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(-1===this.visible.indexOf(A)){let e=s(this.choices),t=e.indexOf(A);if(r.index>t){let r=e.slice(t,t+this.limit),A=e.filter(e=>!r.includes(e));this.choices=r.concat(A)}else{let r=t-this.limit+1;this.choices=e.slice(r).concat(e.slice(0,r))}}return this.index=this.choices.indexOf(A),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(e=>{let r=this.choices.length,A=this.num,n=(r=!1,n)=>{clearTimeout(this.numberTimeout),r&&(n=t(A)),this.num="",e(n)};return"0"===A||1===A.length&&Number(A+"0")>r?n(!0):Number(A)>r?n(!1,this.alert()):void(this.numberTimeout=setTimeout(()=>n(!0),this.delay))})}home(){return this.choices=s(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,t=s(this.choices);return this.choices=t.slice(e).concat(t.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,t=this.visible.length,r=this.index;return!1===this.options.scroll&&0===r?this.alert():e>t&&0===r?this.scrollUp():(this.index=(r-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,t=this.visible.length,r=this.index;return!1===this.options.scroll&&r===t-1?this.alert():e>t&&r===t-1?this.scrollDown():(this.index=(r+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=a(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=c(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){return!0===this.options.sort?(this.sorting=!0,this.swap(this.index-1),await this.up(),void(this.sorting=!1)):this.scrollUp(this.index)}async shiftDown(){return!0===this.options.sort?(this.sorting=!0,this.swap(this.index+1),await this.down(),void(this.sorting=!1)):this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){l(this.choices,this.index,e)}isDisabled(e=this.focused){return!(!e||!["disabled","collapsed","hidden","completing","readonly"].some(t=>!0===e[t]))||e&&"heading"===e.role}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(e=>this.isEnabled(e));if(e.choices){let t=e.choices.filter(e=>!this.isDisabled(e));return e.enabled&&t.every(e=>this.isEnabled(e))}return e.enabled&&!this.isDisabled(e)}isChoice(e,t){return e.name===t||e.index===Number(t)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(t=>this.isChoice(e,t)):this.isChoice(e,this.initial)}map(e=[],t="value"){return[].concat(e||[]).reduce((e,r)=>(e[r]=this.find(r,t),e),{})}filter(e,t){let r="function"==typeof e?e:(t,r)=>[t.name,r].includes(e),A=(this.options.multiple?this.state._choices:this.choices).filter(r);return t?A.map(e=>e[t]):A}find(e,t){if(g(e))return t?e[t]:e;let r="function"==typeof e?e:(t,r)=>[t.name,r].includes(e),A=this.choices.find(r);return A?t?A[t]:A:void 0}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(e=>e.newChoice))return this.alert();let{reorder:t,sort:r}=this.options,A=!0===this.multiple,n=this.selected;return void 0===n?this.alert():(Array.isArray(n)&&!1!==t&&!0!==r&&(n=i.reorder(n)),this.value=A?n.map(e=>e.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let t of e)this.state._choices.some(e=>e.name===t.name)||this.state._choices.push(t);if(!this._initial&&this.options.initial){this._initial=!0;let e=this.initial;if("string"==typeof e||"number"==typeof e){let t=this.find(e);t&&(this.initial=t.index,this.focus(t,!0))}}}get choices(){return u(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:t,choices:r}=this,A=e.limit||this._limit||t.limit||r.length;return Math.min(A,this.height)}set value(e){super.value=e}get value(){return"string"!=typeof super.value&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&!0!==this.multiple&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}}},46614:(e,t,r)=>{"use strict";const A=r(71447),n=()=>{throw new Error("expected prompt to have a custom authenticate method")},o=(e=n)=>class extends A{constructor(e){super(e)}async submit(){this.value=await e.call(this,this.values,this.state),super.base.submit.call(this)}static create(e){return o(e)}};e.exports=o()},82710:(e,t,r)=>{"use strict";const A=r(58386),{isPrimitive:n,hasColor:o}=r(10278);e.exports=class extends A{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:t,state:r}=this;return r.submitted?t.success(e):t.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return n(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if("pending"===this.state.status){let e=await this.element("hint");return o(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:t}=this.state,r=await this.prefix(),A=await this.separator(),n=[r,await this.message(),this.styles.muted(this.default),A].filter(Boolean).join(" ");this.state.prompt=n;let o=await this.header(),i=this.value=this.cast(e),s=await this.format(i),a=await this.error()||await this.hint(),c=await this.footer();a&&!n.includes(a)&&(s+=" "+a),n+=" "+s,this.clear(t),this.write([o,n,c].filter(Boolean).join("\n")),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}}},13235:(e,t,r)=>{e.exports={ArrayPrompt:r(14723),AuthPrompt:r(46614),BooleanPrompt:r(82710),NumberPrompt:r(64987),StringPrompt:r(45853)}},64987:(e,t,r)=>{"use strict";const A=r(45853);e.exports=class extends A{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=null!=e.delay?e.delay:1e3,this.float=!1!==e.float,this.round=!0===e.round||!1===e.float,this.major=e.major||10,this.minor=e.minor||1,this.initial=null!=e.initial?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||"."===e&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let t=e||this.minor,r=this.toNumber(this.input);return r>this.max+t?this.alert():(this.input=""+(r+t),this.render())}down(e){let t=e||this.minor,r=this.toNumber(this.input);return r<this.min-t?this.alert():(this.input=""+(r-t),this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return"function"==typeof this.options.format?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(e=>this.isValue(e));return this.value=this.toNumber(e||0),super.submit()}}},45853:(e,t,r)=>{"use strict";const A=r(58386),n=r(96496),{isPrimitive:o}=r(10278);e.exports=class extends A{constructor(e){super(e),this.initial=o(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,t={}){let r=this.state.prevKeypress;return this.state.prevKeypress=t,!0!==this.options.multiline||"return"!==t.name||r&&"return"===r.name?super.keypress(e,t):this.append("\n",t)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,t){if(!e||t.ctrl||t.code)return this.alert();this.append(e)}append(e){let{cursor:t,input:r}=this.state;this.input=(""+r).slice(0,t)+e+(""+r).slice(t),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:t}=this.state;if(e<=0)return this.alert();this.input=(""+t).slice(0,e-1)+(""+t).slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:t}=this.state;if(void 0===t[e])return this.alert();this.input=(""+t).slice(0,e)+(""+t).slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(0===e)return this.alert();let t=this.input.slice(0,e),r=this.input.slice(e),A=t.split(" ");this.state.clipboard.push(A.pop()),this.input=A.join(" "),this.cursor=this.input.length,this.input+=r,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=null!=this.initial?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let t=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||t):n(this,{input:e,initial:t,pos:this.cursor})}async render(){let e=this.state.size,t=await this.prefix(),r=await this.separator(),A=[t,await this.message(),r].filter(Boolean).join(" ");this.state.prompt=A;let n=await this.header(),o=await this.format(),i=await this.error()||await this.hint(),s=await this.footer();i&&!o.includes(i)&&(o+=" "+i),A+=" "+o,this.clear(e),this.write([n,A,s].filter(Boolean).join("\n")),this.restore()}}},10278:(e,t,r)=>{"use strict";const A=Object.prototype.toString,n=r(97991);let o=!1,i=[];const s={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};t.longest=(e,t)=>e.reduce((e,r)=>Math.max(e,t?r[t].length:r.length),0),t.hasColor=e=>!!e&&n.hasColor(e);const a=t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);t.nativeType=e=>A.call(e).slice(8,-1).toLowerCase().replace(/\s/g,""),t.isAsyncFn=e=>"asyncfunction"===t.nativeType(e),t.isPrimitive=e=>null!=e&&"object"!=typeof e&&"function"!=typeof e,t.resolve=(e,t,...r)=>"function"==typeof t?t.call(e,...r):t,t.scrollDown=(e=[])=>[...e.slice(1),e[0]],t.scrollUp=(e=[])=>[e.pop(),...e],t.reorder=(e=[])=>{let t=e.slice();return t.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0),t},t.swap=(e,t,r)=>{let A=e.length,n=r===A?0:r<0?A-1:r,o=e[t];e[t]=e[n],e[n]=o},t.width=(e,t=80)=>{let r=e&&e.columns?e.columns:t;return e&&"function"==typeof e.getWindowSize&&(r=e.getWindowSize()[0]),"win32"===process.platform?r-1:r},t.height=(e,t=20)=>{let r=e&&e.rows?e.rows:t;return e&&"function"==typeof e.getWindowSize&&(r=e.getWindowSize()[1]),r},t.wordWrap=(e,t={})=>{if(!e)return e;"number"==typeof t&&(t={width:t});let{indent:r="",newline:A="\n"+r,width:n=80}=t,o=(A+r).match(/[^\S\n]/g)||[];n-=o.length;let i=`.{1,${n}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,s=e.trim(),a=new RegExp(i,"g"),c=s.match(a)||[];return c=c.map(e=>e.replace(/\n$/,"")),t.padEnd&&(c=c.map(e=>e.padEnd(n," "))),t.padStart&&(c=c.map(e=>e.padStart(n," "))),r+c.join(A)},t.unmute=e=>{let t=e.stack.find(e=>n.keys.color.includes(e));return t?n[t]:e.stack.find(e=>"bg"===e.slice(2))?n[t.slice(2)]:e=>e},t.pascal=e=>e?e[0].toUpperCase()+e.slice(1):"",t.inverse=e=>{if(!e||!e.stack)return e;let r=e.stack.find(e=>n.keys.color.includes(e));if(r){let A=n["bg"+t.pascal(r)];return A?A.black:e}let A=e.stack.find(e=>"bg"===e.slice(0,2));return A?n[A.slice(2).toLowerCase()]||e:n.none},t.complement=e=>{if(!e||!e.stack)return e;let r=e.stack.find(e=>n.keys.color.includes(e)),A=e.stack.find(e=>"bg"===e.slice(0,2));if(r&&!A)return n[s[r]||r];if(A){let r=A.slice(2).toLowerCase(),o=s[r];return o&&n["bg"+t.pascal(o)]||e}return n.none},t.meridiem=e=>{let t=e.getHours(),r=e.getMinutes(),A=t>=12?"pm":"am";return t%=12,(0===t?12:t)+":"+(r<10?"0"+r:r)+" "+A},t.set=(e={},r="",A)=>r.split(".").reduce((e,r,n,o)=>{let i=o.length-1>n?e[r]||{}:A;return!t.isObject(i)&&n<o.length-1&&(i={}),e[r]=i},e),t.get=(e={},t="",r)=>{let A=null==e[t]?t.split(".").reduce((e,t)=>e&&e[t],e):e[t];return null==A?r:A},t.mixin=(e,r)=>{if(!a(e))return r;if(!a(r))return e;for(let A of Object.keys(r)){let n=Object.getOwnPropertyDescriptor(r,A);if(n.hasOwnProperty("value"))if(e.hasOwnProperty(A)&&a(n.value)){let o=Object.getOwnPropertyDescriptor(e,A);a(o.value)?e[A]=t.merge({},e[A],r[A]):Reflect.defineProperty(e,A,n)}else Reflect.defineProperty(e,A,n);else Reflect.defineProperty(e,A,n)}return e},t.merge=(...e)=>{let r={};for(let A of e)t.mixin(r,A);return r},t.mixinEmitter=(e,r)=>{let A=r.constructor.prototype;for(let n of Object.keys(A)){let o=A[n];"function"==typeof o?t.define(e,n,o.bind(r)):t.define(e,n,o)}},t.onExit=e=>{const t=(e,t)=>{o||(o=!0,i.forEach(e=>e()),!0===e&&process.exit(128+t))};0===i.length&&(process.once("SIGTERM",t.bind(null,!0,15)),process.once("SIGINT",t.bind(null,!0,2)),process.once("exit",t)),i.push(e)},t.define=(e,t,r)=>{Reflect.defineProperty(e,t,{value:r})},t.defineExport=(e,t,r)=>{let A;Reflect.defineProperty(e,t,{enumerable:!0,configurable:!0,set(e){A=e},get:()=>A?A():r()})}},19347:(e,t,r)=>{"use strict";const A=r(80598),n=r(58182),o=r(67652),i=r(81340),s=r(43754),a=r(16777);async function c(e,t){l(e);const r=g(e,n.default,t),A=await Promise.all(r);return a.array.flatten(A)}function g(e,t,r){const n=[].concat(e),o=new s.default(r),i=A.generate(n,o),a=new t(o);return i.map(a.read,a)}function l(e){if(![].concat(e).every(e=>a.string.isString(e)&&!a.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}!function(e){e.sync=function(e,t){l(e);const r=g(e,i.default,t);return a.array.flatten(r)},e.stream=function(e,t){l(e);const r=g(e,o.default,t);return a.stream.merge(r)},e.generateTasks=function(e,t){l(e);const r=[].concat(e),n=new s.default(t);return A.generate(r,n)},e.isDynamicPattern=function(e,t){l(e);const r=new s.default(t);return a.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return l(e),a.path.escape(e)}}(c||(c={})),e.exports=c},80598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);function n(e,t,r){const A=s(e);if("."in A){return[c(".",e,t,r)]}return a(A,t,r)}function o(e){return A.pattern.getPositivePatterns(e)}function i(e,t){return A.pattern.getNegativePatterns(e).concat(t).map(A.pattern.convertToPositivePattern)}function s(e){return e.reduce((e,t)=>{const r=A.pattern.getBaseDirectory(t);return r in e?e[r].push(t):e[r]=[t],e},{})}function a(e,t,r){return Object.keys(e).map(A=>c(A,e[A],t,r))}function c(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(A.pattern.convertToNegativePattern))}}t.generate=function(e,t){const r=o(e),s=i(e,t.ignore),a=r.filter(e=>A.pattern.isStaticPattern(e,t)),c=r.filter(e=>A.pattern.isDynamicPattern(e,t)),g=n(a,s,!1),l=n(c,s,!0);return g.concat(l)},t.convertPatternsToTasks=n,t.getPositivePatterns=o,t.getNegativePatternsAsPositive=i,t.groupPatternsByBaseDirectory=s,t.convertPatternGroupsToTasks=a,t.convertPatternGroupToTask=c},58182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(82774),n=r(40545);class o extends n.default{constructor(){super(...arguments),this._reader=new A.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e),A=[];return new Promise((n,o)=>{const i=this.api(t,e,r);i.once("error",o),i.on("data",e=>A.push(r.transform(e))),i.once("end",()=>n(A))})}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}t.default=o},65989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777),n=r(42585);t.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const A=this._getMatcher(t),n=this._getNegativePatternsRe(r);return t=>this._filter(e,t,A,n)}_getMatcher(e){return new n.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const t=e.filter(A.pattern.isAffectDepthOfReadingPattern);return A.pattern.convertPatternsToRe(t,this._micromatchOptions)}_filter(e,t,r,n){const o=this._getEntryLevel(e,t.path);if(this._isSkippedByDeep(o))return!1;if(this._isSkippedSymbolicLink(t))return!1;const i=A.path.removeLeadingDotSegment(t.path);return!this._isSkippedByPositivePatterns(i,r)&&this._isSkippedByNegativePatterns(i,n)}_isSkippedByDeep(e){return e>=this._settings.deep}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_getEntryLevel(e,t){const r=e.split("/").length;return t.split("/").length-(""===e?0:r)}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,t){return!A.pattern.matchAny(e,t)}}},37338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);t.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(e,t){const r=A.pattern.convertPatternsToRe(e,this._micromatchOptions),n=A.pattern.convertPatternsToRe(t,this._micromatchOptions);return e=>this._filter(e,r,n)}_filter(e,t,r){if(this._settings.unique){if(this._isDuplicateEntry(e))return!1;this._createIndexRecord(e)}if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;if(this._isSkippedByAbsoluteNegativePatterns(e,r))return!1;const A=this._settings.baseNameMatch?e.name:e.path;return this._isMatchToPatterns(A,t)&&!this._isMatchToPatterns(e.path,r)}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,t){if(!this._settings.absolute)return!1;const r=A.path.makeAbsolute(this._settings.cwd,e.path);return this._isMatchToPatterns(r,t)}_isMatchToPatterns(e,t){const r=A.path.removeLeadingDotSegment(e);return A.pattern.matchAny(r,t)}}},54345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);t.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return A.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}},34789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);t.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){const e=A.pattern.expandPatternsWithBraceExpansion(this._patterns);for(const t of e){const e=this._getPatternSegments(t),r=this._splitSegmentsIntoSections(e);this._storage.push({complete:r.length<=1,pattern:t,segments:e,sections:r})}}_getPatternSegments(e){return A.pattern.getPatternParts(e,this._micromatchOptions).map(e=>A.pattern.isDynamicPattern(e,this._settings)?{dynamic:!0,pattern:e,patternRe:A.pattern.makeRe(e,this._micromatchOptions)}:{dynamic:!1,pattern:e})}_splitSegmentsIntoSections(e){return A.array.splitWhen(e,e=>e.dynamic&&A.pattern.hasGlobStar(e.pattern))}}},42585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(34789);class n extends A.default{match(e){const t=e.split("/"),r=t.length,A=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of A){const A=e.sections[0];if(!e.complete&&r>A.length)return!0;if(t.every((t,r)=>{const A=e.segments[r];return!(!A.dynamic||!A.patternRe.test(t))||!A.dynamic&&A.pattern===t}))return!0}return!1}}t.default=n},40545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(65989),o=r(37338),i=r(54345),s=r(77541);t.default=class{constructor(e){this._settings=e,this.errorFilter=new i.default(this._settings),this.entryFilter=new o.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new n.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(e){return A.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}}},67652:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(92413),n=r(82774),o=r(40545);class i extends o.default{constructor(){super(...arguments),this._reader=new n.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e),n=this.api(t,e,r),o=new A.Readable({objectMode:!0,read:()=>{}});return n.once("error",e=>o.emit("error",e)).on("data",e=>o.emit("data",r.transform(e))).once("end",()=>o.emit("end")),o.once("close",()=>n.destroy()),o}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}t.default=i},81340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(29543),n=r(40545);class o extends n.default{constructor(){super(...arguments),this._reader=new A.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}t.default=o},77541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);t.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let t=e.path;return this._settings.absolute&&(t=A.path.makeAbsolute(this._settings.cwd,t),t=A.path.unixify(t)),this._settings.markDirectories&&e.dirent.isDirectory()&&(t+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:t}):t}}},99458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(53403),o=r(16777);t.default=class{constructor(e){this._settings=e,this._fsStatSettings=new n.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return A.resolve(this._settings.cwd,e)}_makeEntry(e,t){const r={name:t,path:t,dirent:o.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!o.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}},82774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(92413),n=r(53403),o=r(72897),i=r(99458);class s extends i.default{constructor(){super(...arguments),this._walkStream=o.walkStream,this._stat=n.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,t){const r=e.map(this._getFullEntryPath,this),n=new A.PassThrough({objectMode:!0});n._write=(A,o,i)=>this._getEntry(r[A],e[A],t).then(e=>{null!==e&&t.entryFilter(e)&&n.push(e),A===r.length-1&&n.end(),i()}).catch(i);for(let e=0;e<r.length;e++)n.write(e);return n}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,A)=>null===e?t(A):r(e))})}}t.default=s},29543:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(72897),o=r(99458);class i extends o.default{constructor(){super(...arguments),this._walkSync=n.walkSync,this._statSync=A.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const A of e){const e=this._getFullEntryPath(A),n=this._getEntry(e,A,t);null!==n&&t.entryFilter(n)&&r.push(n)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}t.default=i},43754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747),n=r(12087).cpus().length;t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:A.lstat,lstatSync:A.lstatSync,stat:A.stat,statSync:A.statSync,readdir:A.readdir,readdirSync:A.readdirSync};t.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,n),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}},60919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},t.splitWhen=function(e,t){const r=[[]];let A=0;for(const n of e)t(n)?(A++,r[A]=[]):r[A].push(n);return r}},35525:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEnoentCodeError=function(e){return"ENOENT"===e.code}},62524:(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)}},16777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(60919);t.array=A;const n=r(35525);t.errno=n;const o=r(62524);t.fs=o;const i=r(71462);t.path=i;const s=r(14659);t.pattern=s;const a=r(2042);t.stream=a;const c=r(10217);t.string=c},71462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;t.unixify=function(e){return e.replace(/\\/g,"/")},t.makeAbsolute=function(e,t){return A.resolve(e,t)},t.escape=function(e){return e.replace(n,"\\$2")},t.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e}},14659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(97098),o=r(2401),i=r(54722),s=/[*?]|^!/,a=/\[.*]/,c=/(?:^|[^!*+?@])\(.*\|.*\)/,g=/[!*+?@]\(.*\)/,l=/{.*(?:,|\.\.).*}/;function u(e,t={}){return!h(e,t)}function h(e,t={}){return!(!1!==t.caseSensitiveMatch&&!e.includes("\\"))||(!!(s.test(e)||a.test(e)||c.test(e))||(!(!1===t.extglob||!g.test(e))||!(!1===t.braceExpansion||!l.test(e))))}function p(e){return e.startsWith("!")&&"("!==e[1]}function d(e){return!p(e)}function C(e){return e.endsWith("/**")}function f(e){return o.braces(e,{expand:!0,nodupes:!0})}function I(e,t){return o.makeRe(e,t)}t.isStaticPattern=u,t.isDynamicPattern=h,t.convertToPositivePattern=function(e){return p(e)?e.slice(1):e},t.convertToNegativePattern=function(e){return"!"+e},t.isNegativePattern=p,t.isPositivePattern=d,t.getNegativePatterns=function(e){return e.filter(p)},t.getPositivePatterns=function(e){return e.filter(d)},t.getBaseDirectory=function(e){return n(e,{flipBackslashes:!1})},t.hasGlobStar=function(e){return e.includes("**")},t.endsWithSlashGlobStar=C,t.isAffectDepthOfReadingPattern=function(e){const t=A.basename(e);return C(e)||u(t)},t.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(f(t)),[])},t.expandBraceExpansion=f,t.getPatternParts=function(e,t){const r=i.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.parts.length?[e]:r.parts},t.makeRe=I,t.convertPatternsToRe=function(e,t){return e.map(e=>I(e,t))},t.matchAny=function(e,t){return t.some(t=>t.test(e))}},2042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(55598);function n(e){e.forEach(e=>e.emit("close"))}t.merge=function(e){const t=A(e);return e.forEach(e=>{e.once("error",e=>t.emit("error",e))}),t.once("close",()=>n(e)),t.once("end",()=>n(e)),t}},10217:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=function(e){return"string"==typeof e},t.isEmpty=function(e){return""===e}},98360:(e,t,r)=>{"use strict";var A=r(2383);function n(){}function o(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null;var e=this;this.worked=function(t,r){var A=e.callback;e.value=null,e.callback=n,A.call(e.context,t,r),e.release(e)}}e.exports=function(e,t,r){"function"==typeof e&&(r=t,t=e,e=null);var i=A(o),s=null,a=null,c=0,g={push:function(r,A){var o=i.get();o.context=e,o.release=l,o.value=r,o.callback=A||n,c===g.concurrency||g.paused?a?(a.next=o,a=o):(s=o,a=o,g.saturated()):(c++,t.call(e,o.value,o.worked))},drain:n,saturated:n,pause:function(){g.paused=!0},paused:!1,concurrency:r,running:function(){return c},resume:function(){if(!g.paused)return;g.paused=!1;for(var e=0;e<g.concurrency;e++)c++,l()},idle:function(){return 0===c&&0===g.length()},length:function(){var e=s,t=0;for(;e;)e=e.next,t++;return t},unshift:function(r,A){var o=i.get();o.context=e,o.release=l,o.value=r,o.callback=A||n,c===g.concurrency||g.paused?s?(o.next=s,s=o):(s=o,a=o,g.saturated()):(c++,t.call(e,o.value,o.worked))},empty:n,kill:function(){s=null,a=null,g.drain=n},killAndDrain:function(){s=null,a=null,g.drain(),g.drain=n}};return g;function l(r){r&&i.release(r);var A=s;A?g.paused?c--:(a===s&&(a=null),s=A.next,A.next=null,t.call(e,A.value,A.worked),null===a&&g.empty()):0==--c&&g.drain()}}},19184:(e,t,r)=>{"use strict";class A{constructor(e,t,r){this.__specs=e||{},Object.keys(this.__specs).forEach(e=>{if("string"==typeof this.__specs[e]){const t=this.__specs[e],r=this.__specs[t];if(!r)throw new Error(`Alias refers to invalid key: ${t} -> ${e}`);{const A=r.aliases||[];A.push(e,t),r.aliases=[...new Set(A)],this.__specs[e]=r}}}),this.__opts=t||{},this.__providers=s(r.filter(e=>null!=e&&"object"==typeof e)),this.__isFiggyPudding=!0}get(e){return n(this,e,!0)}get[Symbol.toStringTag](){return"FiggyPudding"}forEach(e,t=this){for(let[r,A]of this.entries())e.call(t,A,r,this)}toJSON(){const e={};return this.forEach((t,r)=>{e[r]=t}),e}*entries(e){for(let e of Object.keys(this.__specs))yield[e,this.get(e)];const t=e||this.__opts.other;if(t){const e=new Set;for(let r of this.__providers){const A=r.entries?r.entries(t):a(r);for(let[r,n]of A)t(r)&&!e.has(r)&&(e.add(r),yield[r,n])}}}*[Symbol.iterator](){for(let[e,t]of this.entries())yield[e,t]}*keys(){for(let[e]of this.entries())yield e}*values(){for(let[,e]of this.entries())yield e}concat(...e){return new Proxy(new A(this.__specs,this.__opts,s(this.__providers).concat(e)),i)}}try{const e=r(31669);A.prototype[e.inspect.custom]=function(t,r){return this[Symbol.toStringTag]+" "+e.inspect(this.toJSON(),r)}}catch(e){}function n(e,t,r){let A=e.__specs[t];if(!r||A||e.__opts.other&&e.__opts.other(t)){let r;A||(A={});for(let n of e.__providers){if(r=o(t,n),void 0===r&&A.aliases&&A.aliases.length)for(let e of A.aliases)if(e!==t&&(r=o(e,n),void 0!==r))break;if(void 0!==r)break}return void 0===r&&void 0!==A.default?"function"==typeof A.default?A.default(e):A.default:r}!function(e){throw Object.assign(new Error("invalid config key requested: "+e),{code:"EBADKEY"})}(t)}function o(e,t){let r;return r=t.__isFiggyPudding?n(t,e,!1):"function"==typeof t.get?t.get(e):t[e],r}const i={has:(e,t)=>t in e.__specs&&void 0!==n(e,t,!1),ownKeys:e=>Object.keys(e.__specs),get:(e,t)=>"symbol"==typeof t||"__"===t.slice(0,2)||t in A.prototype?e[t]:e.get(t),set(e,t,r){if("symbol"==typeof t||"__"===t.slice(0,2))return e[t]=r,!0;throw new Error("figgyPudding options cannot be modified. Use .concat() instead.")},deleteProperty(){throw new Error("figgyPudding options cannot be deleted. Use .concat() and shadow them instead.")}};function s(e){const t=[];return e.forEach(e=>t.unshift(e)),t}function a(e){return Object.keys(e).map(t=>[t,e[t]])}e.exports=function(e,t){return function(...r){return new Proxy(new A(e,t,r),i)}}},52169:(e,t,r)=>{"use strict";
/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*/const A=r(31669),n=r(84615),o=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),i=e=>"number"==typeof e||"string"==typeof e&&""!==e,s=e=>Number.isInteger(+e),a=e=>{let t=""+e,r=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++r];);return r>0},c=(e,t,r)=>{if(t>0){let r="-"===e[0]?"-":"";r&&(e=e.slice(1)),e=r+e.padStart(r?t-1:t,"0")}return!1===r?String(e):e},g=(e,t)=>{let r="-"===e[0]?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},l=(e,t,r,A)=>{if(r)return n(e,t,{wrap:!1,...A});let o=String.fromCharCode(e);return e===t?o:`[${o}-${String.fromCharCode(t)}]`},u=(e,t,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,A=r.capture?"":"?:";return t?`(${A}${e.join("|")})`:e.join("|")}return n(e,t,r)},h=(...e)=>new RangeError("Invalid range arguments: "+A.inspect(...e)),p=(e,t,r)=>{if(!0===r.strictRanges)throw h([e,t]);return[]},d=(e,t,r=1,A={})=>{let n=Number(e),o=Number(t);if(!Number.isInteger(n)||!Number.isInteger(o)){if(!0===A.strictRanges)throw h([e,t]);return[]}0===n&&(n=0),0===o&&(o=0);let i=n>o,s=String(e),p=String(t),d=String(r);r=Math.max(Math.abs(r),1);let C=a(s)||a(p)||a(d),f=C?Math.max(s.length,p.length,d.length):0,I=!1===C&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,A),E=A.transform||(e=>t=>!0===e?Number(t):String(t))(I);if(A.toRegex&&1===r)return l(g(e,f),g(t,f),!0,A);let B={negatives:[],positives:[]},y=[],m=0;for(;i?n>=o:n<=o;)!0===A.toRegex&&r>1?B[(w=n)<0?"negatives":"positives"].push(Math.abs(w)):y.push(c(E(n,m),f,I)),n=i?n-r:n+r,m++;var w;return!0===A.toRegex?r>1?((e,t)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r,A=t.capture?"":"?:",n="",o="";return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(o=`-(${A}${e.negatives.join("|")})`),r=n&&o?`${n}|${o}`:n||o,t.wrap?`(${A}${r})`:r})(B,A):u(y,null,{wrap:!1,...A}):y},C=(e,t,r,A={})=>{if(null==t&&i(e))return[e];if(!i(e)||!i(t))return p(e,t,A);if("function"==typeof r)return C(e,t,1,{transform:r});if(o(r))return C(e,t,0,r);let n={...A};return!0===n.capture&&(n.wrap=!0),r=r||n.step||1,s(r)?s(e)&&s(t)?d(e,t,r,n):((e,t,r=1,A={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return p(e,t,A);let n=A.transform||(e=>String.fromCharCode(e)),o=(""+e).charCodeAt(0),i=(""+t).charCodeAt(0),a=o>i,c=Math.min(o,i),g=Math.max(o,i);if(A.toRegex&&1===r)return l(c,g,!1,A);let h=[],d=0;for(;a?o>=i:o<=i;)h.push(n(o,d)),o=a?o-r:o+r,d++;return!0===A.toRegex?u(h,null,{wrap:!1,options:A}):h})(e,t,Math.max(Math.abs(r),1),n):null==r||o(r)?C(e,t,1,r):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(r,n)};e.exports=C},50683:e=>{e.exports=function(e){return[...e].reduce((e,[t,r])=>(e[t]=r,e),{})}},13302:(e,t,r)=>{e.exports=r(35747).constants||r(27619)},72137:(e,t,r)=>{"use strict";const{PassThrough:A}=r(92413);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n="buffer"===r;let o=!1;t?o=!(r||n):r=r||"utf8",n&&(r=null);const i=new A({objectMode:o});r&&i.setEncoding(r);let s=0;const a=[];return i.on("data",e=>{a.push(e),o?s=a.length:s+=e.length}),i.getBufferedValue=()=>t?a:n?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i}},58764:(e,t,r)=>{"use strict";const A=r(50372),n=r(72137);class o extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function i(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:r}=t;let i;return await new Promise((s,a)=>{const c=e=>{e&&(e.bufferedData=i.getBufferedValue()),a(e)};i=A(e,n(t),e=>{e?c(e):s()}),i.on("data",()=>{i.getBufferedLength()>r&&c(new o)})}),i.getBufferedValue()}e.exports=i,e.exports.default=i,e.exports.buffer=(e,t)=>i(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>i(e,{...t,array:!0}),e.exports.MaxBufferError=o},97098:(e,t,r)=>{"use strict";var A=r(18193),n=r(85622).posix.dirname,o="win32"===r(12087).platform(),i=/\\/g,s=/[\{\[].*[\/]*.*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,c=/\\([\*\?\|\[\]\(\)\{\}])/g;e.exports=function(e,t){Object.assign({flipBackslashes:!0},t).flipBackslashes&&o&&e.indexOf("/")<0&&(e=e.replace(i,"/")),s.test(e)&&(e+="/"),e+="a";do{e=n(e)}while(A(e)||a.test(e));return e.replace(c,"$1")}},90734:(e,t,r)=>{"use strict";const{promisify:A}=r(31669),n=r(35747),o=r(85622),i=r(19347),s=r(46458),a=r(17234),c=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],g=A(n.readFile),l=(e,t)=>{const r=a(o.relative(t.cwd,o.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(e=>!e.startsWith("#")).map((e=>t=>t.startsWith("!")?"!"+o.posix.join(e,t.slice(1)):o.posix.join(e,t))(r))},u=e=>e.reduce((e,t)=>(e.add(l(t.content,{cwd:t.cwd,fileName:t.filePath})),e),s()),h=(e,t)=>r=>e.ignores(a(o.relative(t,((e,t)=>{if(e=a(e),o.isAbsolute(t)){if(t.startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return o.join(e,t)})(t,r)))),p=({ignore:e=[],cwd:t=a(process.cwd())}={})=>({ignore:e,cwd:t});e.exports=async e=>{e=p(e);const t=await i("**/.gitignore",{ignore:c.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(t=>(async(e,t)=>{const r=o.join(t,e);return{cwd:t,filePath:r,content:await g(r,"utf8")}})(t,e.cwd))),A=u(r);return h(A,e.cwd)},e.exports.sync=e=>{e=p(e);const t=i.sync("**/.gitignore",{ignore:c.concat(e.ignore),cwd:e.cwd}).map(t=>((e,t)=>{const r=o.join(t,e);return{cwd:t,filePath:r,content:n.readFileSync(r,"utf8")}})(t,e.cwd)),r=u(t);return h(r,e.cwd)}},58592:(e,t,r)=>{"use strict";const A=r(35747),n=r(39920),o=r(55598),i=r(19347),s=r(66241),a=r(90734),{FilterStream:c,UniqueStream:g}=r(66160),l=()=>!1,u=e=>"!"===e[0],h=(e,t)=>{(e=>{if(!e.every(e=>"string"==typeof e))throw new TypeError("Patterns must be a string or an array of strings")})(e=n([].concat(e))),((e={})=>{if(!e.cwd)return;let t;try{t=A.statSync(e.cwd)}catch(e){return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")})(t);const r=[];t={ignore:[],expandDirectories:!0,...t};for(const[A,n]of e.entries()){if(u(n))continue;const o=e.slice(A).filter(u).map(e=>e.slice(1)),i={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:i})}return r},p=(e,t)=>e.options.expandDirectories?((e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:"object"==typeof e.options.expandDirectories&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)})(e,t):[e.pattern],d=e=>e&&e.gitignore?a.sync({cwd:e.cwd,ignore:e.ignore}):l,C=e=>t=>{const{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=s.sync(r.ignore)),{pattern:t,options:r}};e.exports=async(e,t)=>{const r=h(e,t),[o,c]=await Promise.all([(async()=>t&&t.gitignore?a({cwd:t.cwd,ignore:t.ignore}):l)(),(async()=>{const e=await Promise.all(r.map(async e=>{const t=await p(e,s);return Promise.all(t.map(C(e)))}));return n(...e)})()]),g=await Promise.all(c.map(e=>i(e.pattern,e.options)));return n(...g).filter(e=>{return!o((t=e,t.stats instanceof A.Stats?t.path:t));var t})},e.exports.sync=(e,t)=>{const r=h(e,t).reduce((e,t)=>{const r=p(t,s.sync).map(C(t));return e.concat(r)},[]),A=d(t);return r.reduce((e,t)=>n(e,i.sync(t.pattern,t.options)),[]).filter(e=>!A(e))},e.exports.stream=(e,t)=>{const r=h(e,t).reduce((e,t)=>{const r=p(t,s.sync).map(C(t));return e.concat(r)},[]),A=d(t),n=new c(e=>!A(e)),a=new g;return o(r.map(e=>i.stream(e.pattern,e.options))).pipe(n).pipe(a)},e.exports.generateGlobTasks=h,e.exports.hasMagic=(e,t)=>[].concat(e).some(e=>i.isDynamicPattern(e,t)),e.exports.gitignore=a},66160:(e,t,r)=>{"use strict";const{Transform:A}=r(92413);class n extends A{constructor(){super({objectMode:!0})}}e.exports={FilterStream:class extends n{constructor(e){super(),this._filter=e}_transform(e,t,r){this._filter(e)&&this.push(e),r()}},UniqueStream:class extends n{constructor(){super(),this._pushed=new Set}_transform(e,t,r){this._pushed.has(e)||(this.push(e),this._pushed.add(e)),r()}}}},93576:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(14756);t.default=function(e,...t){const r=(async()=>{if(e instanceof A.RequestError)try{for(const r of t)if(r)for(const t of r)e=await t(e)}catch(t){e=t}throw e})(),n=()=>r;return r.json=n,r.text=n,r.buffer=n,r.on=n,r}},81588:function(e,t,r){"use strict";var A=this&&this.__createBinding||(Object.create?function(e,t,r,A){void 0===A&&(A=r),Object.defineProperty(e,A,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,A){void 0===A&&(A=r),e[A]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(28614),i=r(7966),s=r(59351),a=r(14756),c=r(54718),g=r(9048),l=r(51743),u=r(57854),h=r(38206),p=["request","response","redirect","uploadProgress","downloadProgress"];t.default=function e(t){let r,A;const n=new o.EventEmitter,d=new s((o,s,C)=>{const f=I=>{const E=new g.default(void 0,t);E.retryCount=I,E._noPipe=!0,C(()=>E.destroy()),C.shouldReject=!1,C(()=>s(new a.CancelError(E))),r=E,E.once("response",async t=>{var r;if(t.retryCount=I,t.request.aborted)return;let n;try{n=await u.default(E),t.rawBody=n}catch(e){return}if(E._isAboutToError)return;const i=(null!==(r=t.headers["content-encoding"])&&void 0!==r?r:"").toLowerCase(),s=["gzip","deflate","br"].includes(i),{options:l}=E;if(s&&!l.decompress)t.body=n;else try{t.body=c.default(t,l.responseType,l.parseJson,l.encoding)}catch(e){if(t.body=n.toString(),h.isResponseOk(t))return void E._beforeError(e)}try{for(const[r,A]of l.hooks.afterResponse.entries())t=await A(t,async t=>{const A=g.default.normalizeArguments(void 0,{...t,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},l);A.hooks.afterResponse=A.hooks.afterResponse.slice(0,r);for(const e of A.hooks.beforeRetry)await e(A);const n=e(A);return C(()=>{n.catch(()=>{}),n.cancel()}),n})}catch(e){return void E._beforeError(new a.RequestError(e.message,e,E))}h.isResponseOk(t)?(A=t,o(E.options.resolveBodyOnly?t.body:t)):E._beforeError(new a.HTTPError(t))});const B=e=>{if(d.isCanceled)return;const{options:t}=E;if(e instanceof a.HTTPError&&!t.throwHttpErrors){const{response:t}=e;o(E.options.resolveBodyOnly?t.body:t)}else s(e)};E.once("error",B),E.once("retry",(e,t)=>{var r;i.default.nodeStream(null===(r=t.request)||void 0===r?void 0:r.options.body)?B(t):f(e)}),l.default(E,n,p)};f(0)});d.on=(e,t)=>(n.on(e,t),d);const C=e=>{const t=(async()=>{await d;const{options:t}=A.request;return c.default(A,e,t.parseJson,t.encoding)})();return Object.defineProperties(t,Object.getOwnPropertyDescriptors(d)),t};return d.json=()=>{const{headers:e}=r.options;return r.writableFinished||void 0!==e.accept||(e.accept="application/json"),C("json")},d.buffer=()=>C("buffer"),d.text=()=>C("text"),d},n(r(14756),t)},41514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(7966);t.default=(e,t)=>{if(A.default.null_(e.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");A.assert.any([A.default.string,A.default.undefined],e.encoding),A.assert.any([A.default.boolean,A.default.undefined],e.resolveBodyOnly),A.assert.any([A.default.boolean,A.default.undefined],e.methodRewriting),A.assert.any([A.default.boolean,A.default.undefined],e.isStream),A.assert.any([A.default.string,A.default.undefined],e.responseType),void 0===e.responseType&&(e.responseType="text");const{retry:r}=e;if(e.retry=t?{...t.retry}:{calculateDelay:e=>e.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},A.default.object(r)?(e.retry={...e.retry,...r},e.retry.methods=[...new Set(e.retry.methods.map(e=>e.toUpperCase()))],e.retry.statusCodes=[...new Set(e.retry.statusCodes)],e.retry.errorCodes=[...new Set(e.retry.errorCodes)]):A.default.number(r)&&(e.retry.limit=r),A.default.undefined(e.retry.maxRetryAfter)&&(e.retry.maxRetryAfter=Math.min(...[e.timeout.request,e.timeout.connect].filter(A.default.number))),A.default.object(e.pagination)){t&&(e.pagination={...t.pagination,...e.pagination});const{pagination:r}=e;if(!A.default.function_(r.transform))throw new Error("`options.pagination.transform` must be implemented");if(!A.default.function_(r.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!A.default.function_(r.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!A.default.function_(r.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return"json"===e.responseType&&void 0===e.headers.accept&&(e.headers.accept="application/json"),e}},54718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(14756);t.default=(e,t,r,n)=>{const{rawBody:o}=e;try{if("text"===t)return o.toString(n);if("json"===t)return 0===o.length?"":r(o.toString());if("buffer"===t)return o;throw new A.ParseError({message:`Unknown body type '${t}'`,name:"Error"},e)}catch(t){throw new A.ParseError(t,e)}}},14756:function(e,t,r){"use strict";var A=this&&this.__createBinding||(Object.create?function(e,t,r,A){void 0===A&&(A=r),Object.defineProperty(e,A,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,A){void 0===A&&(A=r),e[A]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.CancelError=t.ParseError=void 0;const o=r(9048);class i extends o.RequestError{constructor(e,t){const{options:r}=t.request;super(`${e.message} in "${r.url.toString()}"`,e,t.request),this.name="ParseError"}}t.ParseError=i;class s extends o.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError"}get isCanceled(){return!0}}t.CancelError=s,n(r(9048),t)},53843:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryAfterStatusCodes=void 0,t.retryAfterStatusCodes=new Set([413,429,503]);t.default=({attemptCount:e,retryOptions:t,error:r,retryAfter:A})=>{if(e>t.limit)return 0;const n=t.methods.includes(r.options.method),o=t.errorCodes.includes(r.code),i=r.response&&t.statusCodes.includes(r.response.statusCode);if(!n||!o&&!i)return 0;if(r.response){if(A)return void 0===t.maxRetryAfter||A>t.maxRetryAfter?0:A;if(413===r.response.statusCode)return 0}return 2**(e-1)*1e3+100*Math.random()}},9048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedProtocolError=t.ReadError=t.TimeoutError=t.UploadError=t.CacheError=t.HTTPError=t.MaxRedirectsError=t.RequestError=t.setNonEnumerableProperties=t.knownHookEvents=t.withoutBody=t.kIsNormalizedAlready=void 0;const A=r(31669),n=r(92413),o=r(35747),i=r(78835),s=r(98605),a=r(98605),c=r(57211),g=r(98298),l=r(30093),u=r(11200),h=r(93868),p=r(92353),d=r(55737),C=r(7966),f=r(78586),I=r(2920),E=r(51743),B=r(44947),y=r(50116),m=r(82524),w=r(85551),Q=r(57854),D=r(11338),b=r(38206),v=r(54595),S=r(41514),k=r(53843),N=new l.default,F=Symbol("request"),K=Symbol("response"),M=Symbol("responseSize"),R=Symbol("downloadedSize"),x=Symbol("bodySize"),L=Symbol("uploadedSize"),P=Symbol("serverResponsesPiped"),O=Symbol("unproxyEvents"),U=Symbol("isFromCache"),T=Symbol("cancelTimeouts"),j=Symbol("startedReading"),Y=Symbol("stopReading"),G=Symbol("triggerRead"),H=Symbol("body"),J=Symbol("jobs"),q=Symbol("originalResponse"),z=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const W=C.default.string(process.versions.brotli);t.withoutBody=new Set(["GET","HEAD"]),t.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];const V=new w.default,X=new Set([300,301,302,303,304,307,308]),_=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e)if(t)for(const e of _)e in t&&(r[e]={writable:!0,configurable:!0,enumerable:!1,value:t[e]});Object.defineProperties(t,r)};class Z extends Error{constructor(e,t,r){var A;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=t.code,r instanceof se?(Object.defineProperty(this,"request",{enumerable:!1,value:r}),Object.defineProperty(this,"response",{enumerable:!1,value:r[K]}),Object.defineProperty(this,"options",{enumerable:!1,value:r.options})):Object.defineProperty(this,"options",{enumerable:!1,value:r}),this.timings=null===(A=this.request)||void 0===A?void 0:A.timings,!C.default.undefined(t.stack)){const e=this.stack.indexOf(this.message)+this.message.length,r=this.stack.slice(e).split("\n").reverse(),A=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();for(;0!==A.length&&A[0]===r[0];)r.shift();this.stack=`${this.stack.slice(0,e)}${r.reverse().join("\n")}${A.reverse().join("\n")}`}}}t.RequestError=Z;class $ extends Z{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}}t.MaxRedirectsError=$;class ee extends Z{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}}t.HTTPError=ee;class te extends Z{constructor(e,t){super(e.message,e,t),this.name="CacheError"}}t.CacheError=te;class re extends Z{constructor(e,t){super(e.message,e,t),this.name="UploadError"}}t.UploadError=re;class Ae extends Z{constructor(e,t,r){super(e.message,e,r),this.name="TimeoutError",this.event=e.event,this.timings=t}}t.TimeoutError=Ae;class ne extends Z{constructor(e,t){super(e.message,e,t),this.name="ReadError"}}t.ReadError=ne;class oe extends Z{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}}t.UnsupportedProtocolError=oe;const ie=["socket","connect","continue","information","upgrade","timeout"];class se extends n.Duplex{constructor(e,r={},A){super({autoDestroy:!1,highWaterMark:0}),this[R]=0,this[L]=0,this.requestInitialized=!1,this[P]=new Set,this.redirects=[],this[Y]=!1,this[G]=!1,this[J]=[],this.retryCount=0,this._progressCallbacks=[];const n=()=>this._unlockWrite(),i=()=>this._lockWrite();this.on("pipe",e=>{e.prependListener("data",n),e.on("data",i),e.prependListener("end",n),e.on("end",i)}),this.on("unpipe",e=>{e.off("data",n),e.off("data",i),e.off("end",n),e.off("end",i)}),this.on("pipe",e=>{e instanceof a.IncomingMessage&&(this.options.headers={...e.headers,...this.options.headers})});const{json:s,body:c,form:g}=r;if((s||c||g)&&this._lockWrite(),t.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,A)}catch(e){return C.default.nodeStream(r.body)&&r.body.destroy(),void this.destroy(e)}(async()=>{var e;try{this.options.body instanceof o.ReadStream&&await(async e=>new Promise((t,r)=>{const A=e=>{r(e)};e.pending||t(),e.once("error",A),e.once("ready",()=>{e.off("error",A),t()})}))(this.options.body);const{url:t}=this.options;if(!t)throw new TypeError("Missing `url` property");if(this.requestUrl=t.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed)return void(null===(e=this[F])||void 0===e||e.destroy());for(const e of this[J])e();this[J].length=0,this.requestInitialized=!0}catch(e){if(e instanceof Z)return void this._beforeError(e);this.destroyed||this.destroy(e)}})()}static normalizeArguments(e,r,n){var o,s,a,c,g;const l=r;if(C.default.object(e)&&!C.default.urlInstance(e))r={...n,...e,...r};else{if(e&&r&&void 0!==r.url)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...n,...r},void 0!==e&&(r.url=e),C.default.urlInstance(r.url)&&(r.url=new i.URL(r.url.toString()))}if(!1===r.cache&&(r.cache=void 0),!1===r.dnsCache&&(r.dnsCache=void 0),C.assert.any([C.default.string,C.default.undefined],r.method),C.assert.any([C.default.object,C.default.undefined],r.headers),C.assert.any([C.default.string,C.default.urlInstance,C.default.undefined],r.prefixUrl),C.assert.any([C.default.object,C.default.undefined],r.cookieJar),C.assert.any([C.default.object,C.default.string,C.default.undefined],r.searchParams),C.assert.any([C.default.object,C.default.string,C.default.undefined],r.cache),C.assert.any([C.default.object,C.default.number,C.default.undefined],r.timeout),C.assert.any([C.default.object,C.default.undefined],r.context),C.assert.any([C.default.object,C.default.undefined],r.hooks),C.assert.any([C.default.boolean,C.default.undefined],r.decompress),C.assert.any([C.default.boolean,C.default.undefined],r.ignoreInvalidCookies),C.assert.any([C.default.boolean,C.default.undefined],r.followRedirect),C.assert.any([C.default.number,C.default.undefined],r.maxRedirects),C.assert.any([C.default.boolean,C.default.undefined],r.throwHttpErrors),C.assert.any([C.default.boolean,C.default.undefined],r.http2),C.assert.any([C.default.boolean,C.default.undefined],r.allowGetBody),C.assert.any([C.default.string,C.default.undefined],r.localAddress),C.assert.any([D.isDnsLookupIpVersion,C.default.undefined],r.dnsLookupIpVersion),C.assert.any([C.default.object,C.default.undefined],r.https),C.assert.any([C.default.boolean,C.default.undefined],r.rejectUnauthorized),r.https&&(C.assert.any([C.default.boolean,C.default.undefined],r.https.rejectUnauthorized),C.assert.any([C.default.function_,C.default.undefined],r.https.checkServerIdentity),C.assert.any([C.default.string,C.default.object,C.default.array,C.default.undefined],r.https.certificateAuthority),C.assert.any([C.default.string,C.default.object,C.default.array,C.default.undefined],r.https.key),C.assert.any([C.default.string,C.default.object,C.default.array,C.default.undefined],r.https.certificate),C.assert.any([C.default.string,C.default.undefined],r.https.passphrase),C.assert.any([C.default.string,C.default.buffer,C.default.array,C.default.undefined],r.https.pfx)),C.assert.any([C.default.object,C.default.undefined],r.cacheOptions),C.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===(null==n?void 0:n.headers)?r.headers={...r.headers}:r.headers=d({...null==n?void 0:n.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==(null==n?void 0:n.searchParams)){let e;if(C.default.string(r.searchParams)||r.searchParams instanceof i.URLSearchParams)e=new i.URLSearchParams(r.searchParams);else{!function(e){for(const t in e){const r=e[t];if(!(C.default.string(r)||C.default.number(r)||C.default.boolean(r)||C.default.null_(r)||C.default.undefined(r)))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}(r.searchParams),e=new i.URLSearchParams;for(const t in r.searchParams){const A=r.searchParams[t];null===A?e.append(t,""):void 0!==A&&e.append(t,A)}}null===(o=null==n?void 0:n.searchParams)||void 0===o||o.forEach((t,r)=>{e.has(r)||e.append(r,t)}),r.searchParams=e}if(r.username=null!==(s=r.username)&&void 0!==s?s:"",r.password=null!==(a=r.password)&&void 0!==a?a:"",C.default.undefined(r.prefixUrl)?r.prefixUrl=null!==(c=null==n?void 0:n.prefixUrl)&&void 0!==c?c:"":(r.prefixUrl=r.prefixUrl.toString(),""===r.prefixUrl||r.prefixUrl.endsWith("/")||(r.prefixUrl+="/")),C.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=m.default(r.prefixUrl+r.url,r)}else(C.default.undefined(r.url)&&""!==r.prefixUrl||r.protocol)&&(r.url=m.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:e}=r;Object.defineProperty(r,"prefixUrl",{set:t=>{const A=r.url;if(!A.href.startsWith(t))throw new Error(`Cannot change \`prefixUrl\` from ${e} to ${t}: ${A.href}`);r.url=new i.URL(t+A.href.slice(e.length)),e=t},get:()=>e});let{protocol:t}=r.url;if("unix:"===t&&(t="http:",r.url=new i.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),"http:"!==t&&"https:"!==t)throw new oe(r);""===r.username?r.username=r.url.username:r.url.username=r.username,""===r.password?r.password=r.url.password:r.url.password=r.password}const{cookieJar:h}=r;if(h){let{setCookie:e,getCookieString:t}=h;C.assert.function_(e),C.assert.function_(t),4===e.length&&0===t.length&&(e=A.promisify(e.bind(r.cookieJar)),t=A.promisify(t.bind(r.cookieJar)),r.cookieJar={setCookie:e,getCookieString:t})}const{cache:p}=r;if(p&&(V.has(p)||V.set(p,new u((e,t)=>{const r=e[F](e,t);return C.default.promise(r)&&(r.once=(e,t)=>{if("error"===e)r.catch(t);else{if("abort"!==e)throw new Error("Unknown HTTP2 promise event: "+e);(async()=>{try{(await r).once("abort",t)}catch(e){}})()}return r}),r},p))),r.cacheOptions={...r.cacheOptions},!0===r.dnsCache)r.dnsCache=N;else if(!C.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError("Parameter `dnsCache` must be a CacheableLookup instance or a boolean, got "+C.default(r.dnsCache));C.default.number(r.timeout)?r.timeout={request:r.timeout}:n&&r.timeout!==n.timeout?r.timeout={...n.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});const f=r.hooks===(null==n?void 0:n.hooks);r.hooks={...r.hooks};for(const e of t.knownHookEvents)if(e in r.hooks){if(!C.default.array(r.hooks[e]))throw new TypeError(`Parameter \`${e}\` must be an Array, got ${C.default(r.hooks[e])}`);r.hooks[e]=[...r.hooks[e]]}else r.hooks[e]=[];if(n&&!f)for(const e of t.knownHookEvents){0!==n.hooks[e].length&&(r.hooks[e]=[...n.hooks[e],...r.hooks[e]])}if("family"in r&&v.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),(null==n?void 0:n.https)&&(r.https={...n.https,...r.https}),"rejectUnauthorized"in r&&v.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&v.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&v.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&v.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&v.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&v.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&v.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent)for(const e in r.agent)if("http"!==e&&"https"!==e&&"http2"!==e)throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${e}\``);return r.maxRedirects=null!==(g=r.maxRedirects)&&void 0!==g?g:0,t.setNonEnumerableProperties([n,l],r),S.default(r,n)}_lockWrite(){const e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){const{options:e}=this,{headers:r}=e,A=!C.default.undefined(e.form),o=!C.default.undefined(e.json),s=!C.default.undefined(e.body),a=A||o||s,c=t.withoutBody.has(e.method)&&!("GET"===e.method&&e.allowGetBody);if(this._cannotHaveBody=c,a){if(c)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([s,A,o].filter(e=>e).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(s&&!(e.body instanceof n.Readable)&&!C.default.string(e.body)&&!C.default.buffer(e.body)&&!I.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(A&&!C.default.object(e.form))throw new TypeError("The `form` option must be an Object");{const t=!C.default.string(r["content-type"]);s?(I.default(e.body)&&t&&(r["content-type"]="multipart/form-data; boundary="+e.body.getBoundary()),this[H]=e.body):A?(t&&(r["content-type"]="application/x-www-form-urlencoded"),this[H]=new i.URLSearchParams(e.form).toString()):(t&&(r["content-type"]="application/json"),this[H]=e.stringifyJson(e.json));const n=await f.default(this[H],e.headers);C.default.undefined(r["content-length"])&&C.default.undefined(r["transfer-encoding"])&&(c||C.default.undefined(n)||(r["content-length"]=String(n)))}}else c?this._lockWrite():this._unlockWrite();this[x]=Number(r["content-length"])||void 0}async _onResponseBase(e){const{options:t}=this,{url:r}=t;this[q]=e,t.decompress&&(e=h(e));const A=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:s.STATUS_CODES[A],n.url=t.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[U]=n.isFromCache,this[M]=Number(e.headers["content-length"])||void 0,this[K]=e,e.once("end",()=>{this[M]=this[R],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",t=>{e.destroy(),this._beforeError(new ne(t,this))}),e.once("aborted",()=>{this._beforeError(new ne({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const o=e.headers["set-cookie"];if(C.default.object(t.cookieJar)&&o){let e=o.map(async e=>t.cookieJar.setCookie(e,r.toString()));t.ignoreInvalidCookies&&(e=e.map(async e=>e.catch(()=>{})));try{await Promise.all(e)}catch(e){return void this._beforeError(e)}}if(t.followRedirect&&e.headers.location&&X.has(A)){e.resume(),this[F]&&(this[T](),delete this[F],this[O]());if(!(303===A&&"GET"!==t.method&&"HEAD"!==t.method)&&t.methodRewriting||(t.method="GET","body"in t&&delete t.body,"json"in t&&delete t.json,"form"in t&&delete t.form,this[H]=void 0,delete t.headers["content-length"]),this.redirects.length>=t.maxRedirects)return void this._beforeError(new $(this));try{const A=Buffer.from(e.headers.location,"binary").toString(),o=new i.URL(A,r),s=o.toString();decodeURI(s),o.hostname!==r.hostname||o.port!==r.port?("host"in t.headers&&delete t.headers.host,"cookie"in t.headers&&delete t.headers.cookie,"authorization"in t.headers&&delete t.headers.authorization,(t.username||t.password)&&(t.username="",t.password="")):(o.username=t.username,o.password=t.password),this.redirects.push(s),t.url=o;for(const e of t.hooks.beforeRedirect)await e(t,n);this.emit("redirect",n,t),await this._makeRequest()}catch(e){return void this._beforeError(e)}}else if(t.isStream&&t.throwHttpErrors&&!b.isResponseOk(n))this._beforeError(new ee(n));else{e.on("readable",()=>{this[G]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(const r of this[P])if(!r.headersSent){for(const A in e.headers){const n=!t.decompress||"content-encoding"!==A,o=e.headers[A];n&&r.setHeader(A,o)}r.statusCode=A}}}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this,{timeout:r,url:A}=t;g.default(e),this[T]=B.default(e,r,A);const n=t.cache?"cacheableResponse":"response";e.once(n,e=>{this._onResponse(e)}),e.once("error",t=>{var r;e.destroy(),null===(r=e.res)||void 0===r||r.removeAllListeners("end"),t=t instanceof B.TimeoutError?new Ae(t,this.timings,this):new Z(t.message,t,this),this._beforeError(t)}),this[O]=E.default(e,this,ie),this[F]=e,this.emit("uploadProgress",this.uploadProgress);const o=this[H],i=0===this.redirects.length?this:e;C.default.nodeStream(o)?(o.pipe(i),o.once("error",e=>{this._beforeError(new re(e,this))})):(this._unlockWrite(),C.default.undefined(o)?(this._cannotHaveBody||this._noPipe)&&(i.end(),this._lockWrite()):(this._writeRequest(o,void 0,()=>{}),i.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,t){return new Promise((r,A)=>{let n;Object.assign(t,y.default(e)),delete t.url;const o=V.get(t.cache)(t,async e=>{e._readableState.autoDestroy=!1,n&&(await n).emit("cacheableResponse",e),r(e)});t.url=e,o.once("error",A),o.once("request",async e=>{n=e,r(n)})})}async _makeRequest(){var e,t,r,A,n;const{options:o}=this,{headers:i}=o;for(const e in i)if(C.default.undefined(i[e]))delete i[e];else if(C.default.null_(i[e]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`);if(o.decompress&&C.default.undefined(i["accept-encoding"])&&(i["accept-encoding"]=W?"gzip, deflate, br":"gzip, deflate"),o.cookieJar){const e=await o.cookieJar.getCookieString(o.url.toString());C.default.nonEmptyString(e)&&(o.headers.cookie=e)}for(const e of o.hooks.beforeRequest){const t=await e(o);if(!C.default.undefined(t)){o.request=()=>t;break}}o.body&&this[H]!==o.body&&(this[H]=o.body);const{agent:a,request:g,timeout:l,url:h}=o;if(o.dnsCache&&!("lookup"in o)&&(o.lookup=o.dnsCache.lookup),"unix"===h.hostname){const e=/(?<socketPath>.+?):(?<path>.+)/.exec(`${h.pathname}${h.search}`);if(null==e?void 0:e.groups){const{socketPath:t,path:r}=e.groups;Object.assign(o,{socketPath:t,path:r,host:""})}}const d="https:"===h.protocol;let f;f=o.http2?p.auto:d?c.request:s.request;const I=null!==(e=o.request)&&void 0!==e?e:f,E=o.cache?this._createCacheableRequest:I;a&&!o.http2&&(o.agent=a[d?"https":"http"]),o[F]=I,delete o.request,delete o.timeout;const B=o;if(B.shared=null===(t=o.cacheOptions)||void 0===t?void 0:t.shared,B.cacheHeuristic=null===(r=o.cacheOptions)||void 0===r?void 0:r.cacheHeuristic,B.immutableMinTimeToLive=null===(A=o.cacheOptions)||void 0===A?void 0:A.immutableMinTimeToLive,B.ignoreCargoCult=null===(n=o.cacheOptions)||void 0===n?void 0:n.ignoreCargoCult,void 0!==o.dnsLookupIpVersion)try{B.family=D.dnsLookupIpVersionToFamily(o.dnsLookupIpVersion)}catch(e){throw new Error("Invalid `dnsLookupIpVersion` option value")}o.https&&("rejectUnauthorized"in o.https&&(B.rejectUnauthorized=o.https.rejectUnauthorized),o.https.checkServerIdentity&&(B.checkServerIdentity=o.https.checkServerIdentity),o.https.certificateAuthority&&(B.ca=o.https.certificateAuthority),o.https.certificate&&(B.cert=o.https.certificate),o.https.key&&(B.key=o.https.key),o.https.passphrase&&(B.passphrase=o.https.passphrase),o.https.pfx&&(B.pfx=o.https.pfx));try{let e=await E(h,B);C.default.undefined(e)&&(e=f(h,B)),o.request=g,o.timeout=l,o.agent=a,o.https&&("rejectUnauthorized"in o.https&&delete B.rejectUnauthorized,o.https.checkServerIdentity&&delete B.checkServerIdentity,o.https.certificateAuthority&&delete B.ca,o.https.certificate&&delete B.cert,o.https.key&&delete B.key,o.https.passphrase&&delete B.passphrase,o.https.pfx&&delete B.pfx),y=e,C.default.object(y)&&!("statusCode"in y)?this._onRequest(e):this.writable?(this.once("finish",()=>{this._onResponse(e)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(e)}catch(e){if(e instanceof u.CacheError)throw new te(e,this);throw new Z(e.message,e,this)}var y}async _error(e){try{for(const t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new Z(t.message,t,this)}this.destroy(e)}_beforeError(e){if(this[Y])return;const{options:t}=this,r=this.retryCount+1;this[Y]=!0,e instanceof Z||(e=new Z(e.message,e,this));const A=e,{response:n}=A;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await Q.default(n),n.body=n.rawBody.toString()}catch(e){}}if(0!==this.listenerCount("retry")){let o;try{let e;n&&"retry-after"in n.headers&&(e=Number(n.headers["retry-after"]),Number.isNaN(e)?(e=Date.parse(n.headers["retry-after"])-Date.now(),e<=0&&(e=1)):e*=1e3),o=await t.retry.calculateDelay({attemptCount:r,retryOptions:t.retry,error:A,retryAfter:e,computedValue:k.default({attemptCount:r,retryOptions:t.retry,error:A,retryAfter:e,computedValue:0})})}catch(e){return void this._error(new Z(e.message,e,this))}if(o){const t=async()=>{try{for(const e of this.options.hooks.beforeRetry)await e(this.options,A,r)}catch(t){return void this._error(new Z(t.message,e,this))}this.destroyed||(this.destroy(),this.emit("retry",r,e))};return void(this[z]=setTimeout(t,o))}}this._error(A)})()}_read(){this[G]=!0;const e=this[K];if(e&&!this[Y]){let t;for(e.readableLength&&(this[G]=!1);null!==(t=e.read());){this[R]+=t.length,this[j]=!0;const e=this.downloadProgress;e.percent<1&&this.emit("downloadProgress",e),this.push(t)}}}_write(e,t,r){const A=()=>{this._writeRequest(e,t,r)};this.requestInitialized?A():this[J].push(A)}_writeRequest(e,t,r){this[F].destroyed||(this._progressCallbacks.push(()=>{this[L]+=Buffer.byteLength(e,t);const r=this.uploadProgress;r.percent<1&&this.emit("uploadProgress",r)}),this[F].write(e,t,e=>{e||0===this._progressCallbacks.length||this._progressCallbacks.shift()(),r(e)}))}_final(e){const t=()=>{for(;0!==this._progressCallbacks.length;)this._progressCallbacks.shift()();F in this?this[F].destroyed?e():this[F].end(t=>{t||(this[x]=this[L],this.emit("uploadProgress",this.uploadProgress),this[F].emit("upload-complete")),e(t)}):e()};this.requestInitialized?t():this[J].push(t)}_destroy(e,t){var r;this[Y]=!0,clearTimeout(this[z]),F in this&&(this[T](),(null===(r=this[K])||void 0===r?void 0:r.complete)||this[F].destroy()),null===e||C.default.undefined(e)||e instanceof Z||(e=new Z(e.message,e,this)),t(e)}get _isAboutToError(){return this[Y]}get ip(){var e;return null===(e=this[F])||void 0===e?void 0:e.socket.remoteAddress}get aborted(){var e,t,r;return(null!==(t=null===(e=this[F])||void 0===e?void 0:e.destroyed)&&void 0!==t?t:this.destroyed)&&!(null===(r=this[q])||void 0===r?void 0:r.complete)}get socket(){var e;return null===(e=this[F])||void 0===e?void 0:e.socket}get downloadProgress(){let e;return e=this[M]?this[R]/this[M]:this[M]===this[R]?1:0,{percent:e,transferred:this[R],total:this[M]}}get uploadProgress(){let e;return e=this[x]?this[L]/this[x]:this[x]===this[L]?1:0,{percent:e,transferred:this[L],total:this[x]}}get timings(){var e;return null===(e=this[F])||void 0===e?void 0:e.timings}get isFromCache(){return this[U]}pipe(e,t){if(this[j])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof a.ServerResponse&&this[P].add(e),super.pipe(e,t)}unpipe(e){return e instanceof a.ServerResponse&&this[P].delete(e),super.unpipe(e),this}}t.default=se},11338:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsLookupIpVersionToFamily=t.isDnsLookupIpVersion=void 0;const r={auto:0,ipv4:4,ipv6:6};t.isDnsLookupIpVersion=e=>e in r,t.dnsLookupIpVersionToFamily=e=>{if(t.isDnsLookupIpVersion(e))return r[e];throw new Error("Invalid DNS lookup IP version")}},78586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747),n=r(31669),o=r(7966),i=r(2920),s=n.promisify(A.stat);t.default=async(e,t)=>{if(t&&"content-length"in t)return Number(t["content-length"]);if(!e)return 0;if(o.default.string(e))return Buffer.byteLength(e);if(o.default.buffer(e))return e.length;if(i.default(e))return n.promisify(e.getLength.bind(e))();if(e instanceof A.ReadStream){const{size:t}=await s(e.path);return t}}},57854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=async e=>{const t=[];let r=0;for await(const A of e)t.push(A),r+=Buffer.byteLength(A);return Buffer.isBuffer(t[0])?Buffer.concat(t,r):Buffer.from(t.join(""))}},2920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(7966);t.default=e=>A.default.nodeStream(e)&&A.default.function_(e.getBoundary)},38206:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isResponseOk=void 0,t.isResponseOk=e=>{const{statusCode:t}=e,r=e.request.options.followRedirect?299:399;return t>=200&&t<=r||304===t}},82524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(78835),n=["protocol","host","hostname","port","pathname","search"];t.default=(e,t)=>{var r,o;if(t.path){if(t.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(t.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(t.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(t.search&&t.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!e){if(!t.protocol)throw new TypeError("No URL protocol specified");e=`${t.protocol}//${null!==(o=null!==(r=t.hostname)&&void 0!==r?r:t.host)&&void 0!==o?o:""}`}const i=new A.URL(e);if(t.path){const e=t.path.indexOf("?");-1===e?t.pathname=t.path:(t.pathname=t.path.slice(0,e),t.search=t.path.slice(e+1)),delete t.path}for(const e of n)t[e]&&(i[e]=t[e].toString());return i}},51743:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const A={};for(const n of r)A[n]=(...e)=>{t.emit(n,...e)},e.on(n,A[n]);return()=>{for(const t of r)e.off(t,A[t])}}},44947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=void 0;const A=r(11631),n=r(70148),o=Symbol("reentry"),i=()=>{};class s extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),this.event=t,this.name="TimeoutError",this.code="ETIMEDOUT"}}t.TimeoutError=s,t.default=(e,t,r)=>{if(o in e)return i;e[o]=!0;const a=[],{once:c,unhandleAll:g}=n.default(),l=(e,t,r)=>{var A;const n=setTimeout(t,e,e,r);null===(A=n.unref)||void 0===A||A.call(n);const o=()=>{clearTimeout(n)};return a.push(o),o},{host:u,hostname:h}=r,p=(t,r)=>{e.destroy(new s(t,r))},d=()=>{for(const e of a)e();g()};if(e.once("error",t=>{if(d(),0===e.listenerCount("error"))throw t}),e.once("close",d),c(e,"response",e=>{c(e,"end",d)}),void 0!==t.request&&l(t.request,p,"request"),void 0!==t.socket){const r=()=>{p(t.socket,"socket")};e.setTimeout(t.socket,r),a.push(()=>{e.removeListener("timeout",r)})}return c(e,"socket",n=>{var o;const{socketPath:i}=e;if(n.connecting){const e=Boolean(null!=i?i:0!==A.isIP(null!==(o=null!=h?h:u)&&void 0!==o?o:""));if(void 0!==t.lookup&&!e&&void 0===n.address().address){const e=l(t.lookup,p,"lookup");c(n,"lookup",e)}if(void 0!==t.connect){const r=()=>l(t.connect,p,"connect");e?c(n,"connect",r()):c(n,"lookup",e=>{null===e&&c(n,"connect",r())})}void 0!==t.secureConnect&&"https:"===r.protocol&&c(n,"connect",()=>{const e=l(t.secureConnect,p,"secureConnect");c(n,"secureConnect",e)})}if(void 0!==t.send){const r=()=>l(t.send,p,"send");n.connecting?c(n,"connect",()=>{c(e,"upload-complete",r())}):c(e,"upload-complete",r())}}),void 0!==t.response&&c(e,"upload-complete",()=>{const r=l(t.response,p,"response");c(e,"response",r)}),d}},70148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=()=>{const e=[];return{once(t,r,A){t.once(r,A),e.push({origin:t,event:r,fn:A})},unhandleAll(){for(const t of e){const{origin:e,event:r,fn:A}=t;e.removeListener(r,A)}e.length=0}}}},50116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(7966);t.default=e=>{const t={protocol:(e=e).protocol,hostname:A.default.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return A.default.string(e.port)&&0!==e.port.length&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}},85551:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,t){"object"==typeof e?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return"object"==typeof e?this.weakMap.get(e):this.map.get(e)}has(e){return"object"==typeof e?this.weakMap.has(e):this.map.has(e)}}},39226:function(e,t,r){"use strict";var A=this&&this.__createBinding||(Object.create?function(e,t,r,A){void 0===A&&(A=r),Object.defineProperty(e,A,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,A){void 0===A&&(A=r),e[A]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHandler=void 0;const o=r(7966),i=r(81588),s=r(93576),a=r(9048),c=r(9743),g={RequestError:i.RequestError,CacheError:i.CacheError,ReadError:i.ReadError,HTTPError:i.HTTPError,MaxRedirectsError:i.MaxRedirectsError,TimeoutError:i.TimeoutError,ParseError:i.ParseError,CancelError:i.CancelError,UnsupportedProtocolError:i.UnsupportedProtocolError,UploadError:i.UploadError},l=async e=>new Promise(t=>{setTimeout(t,e)}),{normalizeArguments:u}=a.default,h=(...e)=>{let t;for(const r of e)t=u(void 0,r,t);return t},p=e=>e.isStream?new a.default(void 0,e):i.default(e),d=e=>"defaults"in e&&"options"in e.defaults,C=["get","post","put","patch","head","delete"];t.defaultHandler=(e,t)=>t(e);const f=(e,t)=>{if(e)for(const r of e)r(t)},I=e=>{e._rawHandlers=e.handlers,e.handlers=e.handlers.map(e=>(t,r)=>{let A;const n=e(t,e=>(A=r(e),A));if(n!==A&&!t.isStream&&A){const e=n,{then:t,catch:r,finally:o}=e;Object.setPrototypeOf(e,Object.getPrototypeOf(A)),Object.defineProperties(e,Object.getOwnPropertyDescriptors(A)),e.then=t,e.catch=r,e.finally=o}return n});const r=(t,r,A)=>{var n,c;let g=0;const l=t=>e.handlers[g++](t,g===e.handlers.length?p:l);if(o.default.plainObject(t)){const e={...t,...r};a.setNonEnumerableProperties([t,r],e),r=e,t=void 0}try{let o;try{f(e.options.hooks.init,r),f(null===(n=null==r?void 0:r.hooks)||void 0===n?void 0:n.init,r)}catch(e){o=e}const s=u(t,r,null!=A?A:e.options);if(s[a.kIsNormalizedAlready]=!0,o)throw new i.RequestError(o.message,o,s);return l(s)}catch(t){if(null==r?void 0:r.isStream)throw t;return s.default(t,e.options.hooks.beforeError,null===(c=null==r?void 0:r.hooks)||void 0===c?void 0:c.beforeError)}};r.extend=(...r)=>{const A=[e.options];let n,o=[...e._rawHandlers];for(const e of r)d(e)?(A.push(e.defaults.options),o.push(...e.defaults._rawHandlers),n=e.defaults.mutableDefaults):(A.push(e),"handlers"in e&&o.push(...e.handlers),n=e.mutableDefaults);return o=o.filter(e=>e!==t.defaultHandler),0===o.length&&o.push(t.defaultHandler),I({options:h(...A),handlers:o,mutableDefaults:Boolean(n)})};const A=async function*(t,A){let n=u(t,A,e.options);n.resolveBodyOnly=!1;const i=n.pagination;if(!o.default.object(i))throw new TypeError("`options.pagination` must be implemented");const s=[];let{countLimit:a}=i,c=0;for(;c<i.requestLimit;){0!==c&&await l(i.backoff);const e=await r(void 0,void 0,n),t=await i.transform(e),A=[];for(const e of t)if(i.filter(e,s,A)){if(!i.shouldContinue(e,s,A))return;if(yield e,i.stackAllItems&&s.push(e),A.push(e),--a<=0)return}const o=i.paginate(e,s,A);if(!1===o)return;o===e.request.options?n=e.request.options:void 0!==o&&(n=u(void 0,o,n)),c++}};(r.paginate=A).all=async(e,t)=>{const r=[];for await(const n of A(e,t))r.push(n);return r},r.paginate.each=A,r.stream=(e,t)=>r(e,{...t,isStream:!0});for(const e of C)r[e]=(t,A)=>r(t,{...A,method:e}),r.stream[e]=(t,A)=>r(t,{...A,method:e,isStream:!0});return Object.assign(r,g),Object.defineProperty(r,"defaults",{value:e.mutableDefaults?e:c.default(e),writable:e.mutableDefaults,configurable:e.mutableDefaults,enumerable:!0}),r.mergeOptions=h,r};t.default=I,n(r(69022),t)},48722:function(e,t,r){"use strict";var A=this&&this.__createBinding||(Object.create?function(e,t,r,A){void 0===A&&(A=r),Object.defineProperty(e,A,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,A){void 0===A&&(A=r),e[A]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(78835),i=r(39226),s={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:e})=>e},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:e=>"json"===e.request.options.responseType?e.body:JSON.parse(e.body),paginate:e=>{if(!Reflect.has(e.headers,"link"))return!1;const t=e.headers.link.split(",");let r;for(const e of t){const t=e.split(";");if(t[1].includes("next")){r=t[0].trimStart().trim(),r=r.slice(1,-1);break}}if(r){return{url:new o.URL(r)}}return!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:e=>JSON.parse(e),stringifyJson:e=>JSON.stringify(e),cacheOptions:{}},handlers:[i.defaultHandler],mutableDefaults:!1},a=i.default(s);t.default=a,e.exports=a,e.exports.default=a,e.exports.__esModule=!0,n(r(39226),t),n(r(81588),t)},69022:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9743:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(7966);t.default=function e(t){for(const r of Object.values(t))(A.default.plainObject(r)||A.default.array(r))&&e(r);return Object.freeze(t)}},54595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=new Set;t.default=e=>{r.has(e)||(r.add(e),process.emitWarning("Got: "+e,{type:"DeprecationWarning"}))}},74988:e=>{e.exports&&(e.exports=function(){var e=3,t=4,r=12,A=13,n=16,o=17;function i(e,t){void 0===t&&(t=0);var r=e.charCodeAt(t);if(55296<=r&&r<=56319&&t<e.length-1){var A=r;return 56320<=(n=e.charCodeAt(t+1))&&n<=57343?1024*(A-55296)+(n-56320)+65536:A}if(56320<=r&&r<=57343&&t>=1){var n=r;return 55296<=(A=e.charCodeAt(t-1))&&A<=56319?1024*(A-55296)+(n-56320)+65536:n}return r}function s(i,s,a){var c=[i].concat(s).concat([a]),g=c[c.length-2],l=a,u=c.lastIndexOf(14);if(u>1&&c.slice(1,u).every((function(t){return t==e}))&&-1==[e,A,o].indexOf(i))return 2;var h=c.lastIndexOf(t);if(h>0&&c.slice(1,h).every((function(e){return e==t}))&&-1==[r,t].indexOf(g))return c.filter((function(e){return e==t})).length%2==1?3:4;if(0==g&&1==l)return 0;if(2==g||0==g||1==g)return 14==l&&s.every((function(t){return t==e}))?2:1;if(2==l||0==l||1==l)return 1;if(6==g&&(6==l||7==l||9==l||10==l))return 0;if(!(9!=g&&7!=g||7!=l&&8!=l))return 0;if((10==g||8==g)&&8==l)return 0;if(l==e||15==l)return 0;if(5==l)return 0;if(g==r)return 0;var p=-1!=c.indexOf(e)?c.lastIndexOf(e)-1:c.length-2;return-1!=[A,o].indexOf(c[p])&&c.slice(p+1,-1).every((function(t){return t==e}))&&14==l||15==g&&-1!=[n,o].indexOf(l)?0:-1!=s.indexOf(t)?2:g==t&&l==t?0:1}function a(i){return 1536<=i&&i<=1541||1757==i||1807==i||2274==i||3406==i||69821==i||70082<=i&&i<=70083||72250==i||72326<=i&&i<=72329||73030==i?r:13==i?0:10==i?1:0<=i&&i<=9||11<=i&&i<=12||14<=i&&i<=31||127<=i&&i<=159||173==i||1564==i||6158==i||8203==i||8206<=i&&i<=8207||8232==i||8233==i||8234<=i&&i<=8238||8288<=i&&i<=8292||8293==i||8294<=i&&i<=8303||55296<=i&&i<=57343||65279==i||65520<=i&&i<=65528||65529<=i&&i<=65531||113824<=i&&i<=113827||119155<=i&&i<=119162||917504==i||917505==i||917506<=i&&i<=917535||917632<=i&&i<=917759||918e3<=i&&i<=921599?2:768<=i&&i<=879||1155<=i&&i<=1159||1160<=i&&i<=1161||1425<=i&&i<=1469||1471==i||1473<=i&&i<=1474||1476<=i&&i<=1477||1479==i||1552<=i&&i<=1562||1611<=i&&i<=1631||1648==i||1750<=i&&i<=1756||1759<=i&&i<=1764||1767<=i&&i<=1768||1770<=i&&i<=1773||1809==i||1840<=i&&i<=1866||1958<=i&&i<=1968||2027<=i&&i<=2035||2070<=i&&i<=2073||2075<=i&&i<=2083||2085<=i&&i<=2087||2089<=i&&i<=2093||2137<=i&&i<=2139||2260<=i&&i<=2273||2275<=i&&i<=2306||2362==i||2364==i||2369<=i&&i<=2376||2381==i||2385<=i&&i<=2391||2402<=i&&i<=2403||2433==i||2492==i||2494==i||2497<=i&&i<=2500||2509==i||2519==i||2530<=i&&i<=2531||2561<=i&&i<=2562||2620==i||2625<=i&&i<=2626||2631<=i&&i<=2632||2635<=i&&i<=2637||2641==i||2672<=i&&i<=2673||2677==i||2689<=i&&i<=2690||2748==i||2753<=i&&i<=2757||2759<=i&&i<=2760||2765==i||2786<=i&&i<=2787||2810<=i&&i<=2815||2817==i||2876==i||2878==i||2879==i||2881<=i&&i<=2884||2893==i||2902==i||2903==i||2914<=i&&i<=2915||2946==i||3006==i||3008==i||3021==i||3031==i||3072==i||3134<=i&&i<=3136||3142<=i&&i<=3144||3146<=i&&i<=3149||3157<=i&&i<=3158||3170<=i&&i<=3171||3201==i||3260==i||3263==i||3266==i||3270==i||3276<=i&&i<=3277||3285<=i&&i<=3286||3298<=i&&i<=3299||3328<=i&&i<=3329||3387<=i&&i<=3388||3390==i||3393<=i&&i<=3396||3405==i||3415==i||3426<=i&&i<=3427||3530==i||3535==i||3538<=i&&i<=3540||3542==i||3551==i||3633==i||3636<=i&&i<=3642||3655<=i&&i<=3662||3761==i||3764<=i&&i<=3769||3771<=i&&i<=3772||3784<=i&&i<=3789||3864<=i&&i<=3865||3893==i||3895==i||3897==i||3953<=i&&i<=3966||3968<=i&&i<=3972||3974<=i&&i<=3975||3981<=i&&i<=3991||3993<=i&&i<=4028||4038==i||4141<=i&&i<=4144||4146<=i&&i<=4151||4153<=i&&i<=4154||4157<=i&&i<=4158||4184<=i&&i<=4185||4190<=i&&i<=4192||4209<=i&&i<=4212||4226==i||4229<=i&&i<=4230||4237==i||4253==i||4957<=i&&i<=4959||5906<=i&&i<=5908||5938<=i&&i<=5940||5970<=i&&i<=5971||6002<=i&&i<=6003||6068<=i&&i<=6069||6071<=i&&i<=6077||6086==i||6089<=i&&i<=6099||6109==i||6155<=i&&i<=6157||6277<=i&&i<=6278||6313==i||6432<=i&&i<=6434||6439<=i&&i<=6440||6450==i||6457<=i&&i<=6459||6679<=i&&i<=6680||6683==i||6742==i||6744<=i&&i<=6750||6752==i||6754==i||6757<=i&&i<=6764||6771<=i&&i<=6780||6783==i||6832<=i&&i<=6845||6846==i||6912<=i&&i<=6915||6964==i||6966<=i&&i<=6970||6972==i||6978==i||7019<=i&&i<=7027||7040<=i&&i<=7041||7074<=i&&i<=7077||7080<=i&&i<=7081||7083<=i&&i<=7085||7142==i||7144<=i&&i<=7145||7149==i||7151<=i&&i<=7153||7212<=i&&i<=7219||7222<=i&&i<=7223||7376<=i&&i<=7378||7380<=i&&i<=7392||7394<=i&&i<=7400||7405==i||7412==i||7416<=i&&i<=7417||7616<=i&&i<=7673||7675<=i&&i<=7679||8204==i||8400<=i&&i<=8412||8413<=i&&i<=8416||8417==i||8418<=i&&i<=8420||8421<=i&&i<=8432||11503<=i&&i<=11505||11647==i||11744<=i&&i<=11775||12330<=i&&i<=12333||12334<=i&&i<=12335||12441<=i&&i<=12442||42607==i||42608<=i&&i<=42610||42612<=i&&i<=42621||42654<=i&&i<=42655||42736<=i&&i<=42737||43010==i||43014==i||43019==i||43045<=i&&i<=43046||43204<=i&&i<=43205||43232<=i&&i<=43249||43302<=i&&i<=43309||43335<=i&&i<=43345||43392<=i&&i<=43394||43443==i||43446<=i&&i<=43449||43452==i||43493==i||43561<=i&&i<=43566||43569<=i&&i<=43570||43573<=i&&i<=43574||43587==i||43596==i||43644==i||43696==i||43698<=i&&i<=43700||43703<=i&&i<=43704||43710<=i&&i<=43711||43713==i||43756<=i&&i<=43757||43766==i||44005==i||44008==i||44013==i||64286==i||65024<=i&&i<=65039||65056<=i&&i<=65071||65438<=i&&i<=65439||66045==i||66272==i||66422<=i&&i<=66426||68097<=i&&i<=68099||68101<=i&&i<=68102||68108<=i&&i<=68111||68152<=i&&i<=68154||68159==i||68325<=i&&i<=68326||69633==i||69688<=i&&i<=69702||69759<=i&&i<=69761||69811<=i&&i<=69814||69817<=i&&i<=69818||69888<=i&&i<=69890||69927<=i&&i<=69931||69933<=i&&i<=69940||70003==i||70016<=i&&i<=70017||70070<=i&&i<=70078||70090<=i&&i<=70092||70191<=i&&i<=70193||70196==i||70198<=i&&i<=70199||70206==i||70367==i||70371<=i&&i<=70378||70400<=i&&i<=70401||70460==i||70462==i||70464==i||70487==i||70502<=i&&i<=70508||70512<=i&&i<=70516||70712<=i&&i<=70719||70722<=i&&i<=70724||70726==i||70832==i||70835<=i&&i<=70840||70842==i||70845==i||70847<=i&&i<=70848||70850<=i&&i<=70851||71087==i||71090<=i&&i<=71093||71100<=i&&i<=71101||71103<=i&&i<=71104||71132<=i&&i<=71133||71219<=i&&i<=71226||71229==i||71231<=i&&i<=71232||71339==i||71341==i||71344<=i&&i<=71349||71351==i||71453<=i&&i<=71455||71458<=i&&i<=71461||71463<=i&&i<=71467||72193<=i&&i<=72198||72201<=i&&i<=72202||72243<=i&&i<=72248||72251<=i&&i<=72254||72263==i||72273<=i&&i<=72278||72281<=i&&i<=72283||72330<=i&&i<=72342||72344<=i&&i<=72345||72752<=i&&i<=72758||72760<=i&&i<=72765||72767==i||72850<=i&&i<=72871||72874<=i&&i<=72880||72882<=i&&i<=72883||72885<=i&&i<=72886||73009<=i&&i<=73014||73018==i||73020<=i&&i<=73021||73023<=i&&i<=73029||73031==i||92912<=i&&i<=92916||92976<=i&&i<=92982||94095<=i&&i<=94098||113821<=i&&i<=113822||119141==i||119143<=i&&i<=119145||119150<=i&&i<=119154||119163<=i&&i<=119170||119173<=i&&i<=119179||119210<=i&&i<=119213||119362<=i&&i<=119364||121344<=i&&i<=121398||121403<=i&&i<=121452||121461==i||121476==i||121499<=i&&i<=121503||121505<=i&&i<=121519||122880<=i&&i<=122886||122888<=i&&i<=122904||122907<=i&&i<=122913||122915<=i&&i<=122916||122918<=i&&i<=122922||125136<=i&&i<=125142||125252<=i&&i<=125258||917536<=i&&i<=917631||917760<=i&&i<=917999?e:127462<=i&&i<=127487?t:2307==i||2363==i||2366<=i&&i<=2368||2377<=i&&i<=2380||2382<=i&&i<=2383||2434<=i&&i<=2435||2495<=i&&i<=2496||2503<=i&&i<=2504||2507<=i&&i<=2508||2563==i||2622<=i&&i<=2624||2691==i||2750<=i&&i<=2752||2761==i||2763<=i&&i<=2764||2818<=i&&i<=2819||2880==i||2887<=i&&i<=2888||2891<=i&&i<=2892||3007==i||3009<=i&&i<=3010||3014<=i&&i<=3016||3018<=i&&i<=3020||3073<=i&&i<=3075||3137<=i&&i<=3140||3202<=i&&i<=3203||3262==i||3264<=i&&i<=3265||3267<=i&&i<=3268||3271<=i&&i<=3272||3274<=i&&i<=3275||3330<=i&&i<=3331||3391<=i&&i<=3392||3398<=i&&i<=3400||3402<=i&&i<=3404||3458<=i&&i<=3459||3536<=i&&i<=3537||3544<=i&&i<=3550||3570<=i&&i<=3571||3635==i||3763==i||3902<=i&&i<=3903||3967==i||4145==i||4155<=i&&i<=4156||4182<=i&&i<=4183||4228==i||6070==i||6078<=i&&i<=6085||6087<=i&&i<=6088||6435<=i&&i<=6438||6441<=i&&i<=6443||6448<=i&&i<=6449||6451<=i&&i<=6456||6681<=i&&i<=6682||6741==i||6743==i||6765<=i&&i<=6770||6916==i||6965==i||6971==i||6973<=i&&i<=6977||6979<=i&&i<=6980||7042==i||7073==i||7078<=i&&i<=7079||7082==i||7143==i||7146<=i&&i<=7148||7150==i||7154<=i&&i<=7155||7204<=i&&i<=7211||7220<=i&&i<=7221||7393==i||7410<=i&&i<=7411||7415==i||43043<=i&&i<=43044||43047==i||43136<=i&&i<=43137||43188<=i&&i<=43203||43346<=i&&i<=43347||43395==i||43444<=i&&i<=43445||43450<=i&&i<=43451||43453<=i&&i<=43456||43567<=i&&i<=43568||43571<=i&&i<=43572||43597==i||43755==i||43758<=i&&i<=43759||43765==i||44003<=i&&i<=44004||44006<=i&&i<=44007||44009<=i&&i<=44010||44012==i||69632==i||69634==i||69762==i||69808<=i&&i<=69810||69815<=i&&i<=69816||69932==i||70018==i||70067<=i&&i<=70069||70079<=i&&i<=70080||70188<=i&&i<=70190||70194<=i&&i<=70195||70197==i||70368<=i&&i<=70370||70402<=i&&i<=70403||70463==i||70465<=i&&i<=70468||70471<=i&&i<=70472||70475<=i&&i<=70477||70498<=i&&i<=70499||70709<=i&&i<=70711||70720<=i&&i<=70721||70725==i||70833<=i&&i<=70834||70841==i||70843<=i&&i<=70844||70846==i||70849==i||71088<=i&&i<=71089||71096<=i&&i<=71099||71102==i||71216<=i&&i<=71218||71227<=i&&i<=71228||71230==i||71340==i||71342<=i&&i<=71343||71350==i||71456<=i&&i<=71457||71462==i||72199<=i&&i<=72200||72249==i||72279<=i&&i<=72280||72343==i||72751==i||72766==i||72873==i||72881==i||72884==i||94033<=i&&i<=94078||119142==i||119149==i?5:4352<=i&&i<=4447||43360<=i&&i<=43388?6:4448<=i&&i<=4519||55216<=i&&i<=55238?7:4520<=i&&i<=4607||55243<=i&&i<=55291?8:44032==i||44060==i||44088==i||44116==i||44144==i||44172==i||44200==i||44228==i||44256==i||44284==i||44312==i||44340==i||44368==i||44396==i||44424==i||44452==i||44480==i||44508==i||44536==i||44564==i||44592==i||44620==i||44648==i||44676==i||44704==i||44732==i||44760==i||44788==i||44816==i||44844==i||44872==i||44900==i||44928==i||44956==i||44984==i||45012==i||45040==i||45068==i||45096==i||45124==i||45152==i||45180==i||45208==i||45236==i||45264==i||45292==i||45320==i||45348==i||45376==i||45404==i||45432==i||45460==i||45488==i||45516==i||45544==i||45572==i||45600==i||45628==i||45656==i||45684==i||45712==i||45740==i||45768==i||45796==i||45824==i||45852==i||45880==i||45908==i||45936==i||45964==i||45992==i||46020==i||46048==i||46076==i||46104==i||46132==i||46160==i||46188==i||46216==i||46244==i||46272==i||46300==i||46328==i||46356==i||46384==i||46412==i||46440==i||46468==i||46496==i||46524==i||46552==i||46580==i||46608==i||46636==i||46664==i||46692==i||46720==i||46748==i||46776==i||46804==i||46832==i||46860==i||46888==i||46916==i||46944==i||46972==i||47e3==i||47028==i||47056==i||47084==i||47112==i||47140==i||47168==i||47196==i||47224==i||47252==i||47280==i||47308==i||47336==i||47364==i||47392==i||47420==i||47448==i||47476==i||47504==i||47532==i||47560==i||47588==i||47616==i||47644==i||47672==i||47700==i||47728==i||47756==i||47784==i||47812==i||47840==i||47868==i||47896==i||47924==i||47952==i||47980==i||48008==i||48036==i||48064==i||48092==i||48120==i||48148==i||48176==i||48204==i||48232==i||48260==i||48288==i||48316==i||48344==i||48372==i||48400==i||48428==i||48456==i||48484==i||48512==i||48540==i||48568==i||48596==i||48624==i||48652==i||48680==i||48708==i||48736==i||48764==i||48792==i||48820==i||48848==i||48876==i||48904==i||48932==i||48960==i||48988==i||49016==i||49044==i||49072==i||49100==i||49128==i||49156==i||49184==i||49212==i||49240==i||49268==i||49296==i||49324==i||49352==i||49380==i||49408==i||49436==i||49464==i||49492==i||49520==i||49548==i||49576==i||49604==i||49632==i||49660==i||49688==i||49716==i||49744==i||49772==i||49800==i||49828==i||49856==i||49884==i||49912==i||49940==i||49968==i||49996==i||50024==i||50052==i||50080==i||50108==i||50136==i||50164==i||50192==i||50220==i||50248==i||50276==i||50304==i||50332==i||50360==i||50388==i||50416==i||50444==i||50472==i||50500==i||50528==i||50556==i||50584==i||50612==i||50640==i||50668==i||50696==i||50724==i||50752==i||50780==i||50808==i||50836==i||50864==i||50892==i||50920==i||50948==i||50976==i||51004==i||51032==i||51060==i||51088==i||51116==i||51144==i||51172==i||51200==i||51228==i||51256==i||51284==i||51312==i||51340==i||51368==i||51396==i||51424==i||51452==i||51480==i||51508==i||51536==i||51564==i||51592==i||51620==i||51648==i||51676==i||51704==i||51732==i||51760==i||51788==i||51816==i||51844==i||51872==i||51900==i||51928==i||51956==i||51984==i||52012==i||52040==i||52068==i||52096==i||52124==i||52152==i||52180==i||52208==i||52236==i||52264==i||52292==i||52320==i||52348==i||52376==i||52404==i||52432==i||52460==i||52488==i||52516==i||52544==i||52572==i||52600==i||52628==i||52656==i||52684==i||52712==i||52740==i||52768==i||52796==i||52824==i||52852==i||52880==i||52908==i||52936==i||52964==i||52992==i||53020==i||53048==i||53076==i||53104==i||53132==i||53160==i||53188==i||53216==i||53244==i||53272==i||53300==i||53328==i||53356==i||53384==i||53412==i||53440==i||53468==i||53496==i||53524==i||53552==i||53580==i||53608==i||53636==i||53664==i||53692==i||53720==i||53748==i||53776==i||53804==i||53832==i||53860==i||53888==i||53916==i||53944==i||53972==i||54e3==i||54028==i||54056==i||54084==i||54112==i||54140==i||54168==i||54196==i||54224==i||54252==i||54280==i||54308==i||54336==i||54364==i||54392==i||54420==i||54448==i||54476==i||54504==i||54532==i||54560==i||54588==i||54616==i||54644==i||54672==i||54700==i||54728==i||54756==i||54784==i||54812==i||54840==i||54868==i||54896==i||54924==i||54952==i||54980==i||55008==i||55036==i||55064==i||55092==i||55120==i||55148==i||55176==i?9:44033<=i&&i<=44059||44061<=i&&i<=44087||44089<=i&&i<=44115||44117<=i&&i<=44143||44145<=i&&i<=44171||44173<=i&&i<=44199||44201<=i&&i<=44227||44229<=i&&i<=44255||44257<=i&&i<=44283||44285<=i&&i<=44311||44313<=i&&i<=44339||44341<=i&&i<=44367||44369<=i&&i<=44395||44397<=i&&i<=44423||44425<=i&&i<=44451||44453<=i&&i<=44479||44481<=i&&i<=44507||44509<=i&&i<=44535||44537<=i&&i<=44563||44565<=i&&i<=44591||44593<=i&&i<=44619||44621<=i&&i<=44647||44649<=i&&i<=44675||44677<=i&&i<=44703||44705<=i&&i<=44731||44733<=i&&i<=44759||44761<=i&&i<=44787||44789<=i&&i<=44815||44817<=i&&i<=44843||44845<=i&&i<=44871||44873<=i&&i<=44899||44901<=i&&i<=44927||44929<=i&&i<=44955||44957<=i&&i<=44983||44985<=i&&i<=45011||45013<=i&&i<=45039||45041<=i&&i<=45067||45069<=i&&i<=45095||45097<=i&&i<=45123||45125<=i&&i<=45151||45153<=i&&i<=45179||45181<=i&&i<=45207||45209<=i&&i<=45235||45237<=i&&i<=45263||45265<=i&&i<=45291||45293<=i&&i<=45319||45321<=i&&i<=45347||45349<=i&&i<=45375||45377<=i&&i<=45403||45405<=i&&i<=45431||45433<=i&&i<=45459||45461<=i&&i<=45487||45489<=i&&i<=45515||45517<=i&&i<=45543||45545<=i&&i<=45571||45573<=i&&i<=45599||45601<=i&&i<=45627||45629<=i&&i<=45655||45657<=i&&i<=45683||45685<=i&&i<=45711||45713<=i&&i<=45739||45741<=i&&i<=45767||45769<=i&&i<=45795||45797<=i&&i<=45823||45825<=i&&i<=45851||45853<=i&&i<=45879||45881<=i&&i<=45907||45909<=i&&i<=45935||45937<=i&&i<=45963||45965<=i&&i<=45991||45993<=i&&i<=46019||46021<=i&&i<=46047||46049<=i&&i<=46075||46077<=i&&i<=46103||46105<=i&&i<=46131||46133<=i&&i<=46159||46161<=i&&i<=46187||46189<=i&&i<=46215||46217<=i&&i<=46243||46245<=i&&i<=46271||46273<=i&&i<=46299||46301<=i&&i<=46327||46329<=i&&i<=46355||46357<=i&&i<=46383||46385<=i&&i<=46411||46413<=i&&i<=46439||46441<=i&&i<=46467||46469<=i&&i<=46495||46497<=i&&i<=46523||46525<=i&&i<=46551||46553<=i&&i<=46579||46581<=i&&i<=46607||46609<=i&&i<=46635||46637<=i&&i<=46663||46665<=i&&i<=46691||46693<=i&&i<=46719||46721<=i&&i<=46747||46749<=i&&i<=46775||46777<=i&&i<=46803||46805<=i&&i<=46831||46833<=i&&i<=46859||46861<=i&&i<=46887||46889<=i&&i<=46915||46917<=i&&i<=46943||46945<=i&&i<=46971||46973<=i&&i<=46999||47001<=i&&i<=47027||47029<=i&&i<=47055||47057<=i&&i<=47083||47085<=i&&i<=47111||47113<=i&&i<=47139||47141<=i&&i<=47167||47169<=i&&i<=47195||47197<=i&&i<=47223||47225<=i&&i<=47251||47253<=i&&i<=47279||47281<=i&&i<=47307||47309<=i&&i<=47335||47337<=i&&i<=47363||47365<=i&&i<=47391||47393<=i&&i<=47419||47421<=i&&i<=47447||47449<=i&&i<=47475||47477<=i&&i<=47503||47505<=i&&i<=47531||47533<=i&&i<=47559||47561<=i&&i<=47587||47589<=i&&i<=47615||47617<=i&&i<=47643||47645<=i&&i<=47671||47673<=i&&i<=47699||47701<=i&&i<=47727||47729<=i&&i<=47755||47757<=i&&i<=47783||47785<=i&&i<=47811||47813<=i&&i<=47839||47841<=i&&i<=47867||47869<=i&&i<=47895||47897<=i&&i<=47923||47925<=i&&i<=47951||47953<=i&&i<=47979||47981<=i&&i<=48007||48009<=i&&i<=48035||48037<=i&&i<=48063||48065<=i&&i<=48091||48093<=i&&i<=48119||48121<=i&&i<=48147||48149<=i&&i<=48175||48177<=i&&i<=48203||48205<=i&&i<=48231||48233<=i&&i<=48259||48261<=i&&i<=48287||48289<=i&&i<=48315||48317<=i&&i<=48343||48345<=i&&i<=48371||48373<=i&&i<=48399||48401<=i&&i<=48427||48429<=i&&i<=48455||48457<=i&&i<=48483||48485<=i&&i<=48511||48513<=i&&i<=48539||48541<=i&&i<=48567||48569<=i&&i<=48595||48597<=i&&i<=48623||48625<=i&&i<=48651||48653<=i&&i<=48679||48681<=i&&i<=48707||48709<=i&&i<=48735||48737<=i&&i<=48763||48765<=i&&i<=48791||48793<=i&&i<=48819||48821<=i&&i<=48847||48849<=i&&i<=48875||48877<=i&&i<=48903||48905<=i&&i<=48931||48933<=i&&i<=48959||48961<=i&&i<=48987||48989<=i&&i<=49015||49017<=i&&i<=49043||49045<=i&&i<=49071||49073<=i&&i<=49099||49101<=i&&i<=49127||49129<=i&&i<=49155||49157<=i&&i<=49183||49185<=i&&i<=49211||49213<=i&&i<=49239||49241<=i&&i<=49267||49269<=i&&i<=49295||49297<=i&&i<=49323||49325<=i&&i<=49351||49353<=i&&i<=49379||49381<=i&&i<=49407||49409<=i&&i<=49435||49437<=i&&i<=49463||49465<=i&&i<=49491||49493<=i&&i<=49519||49521<=i&&i<=49547||49549<=i&&i<=49575||49577<=i&&i<=49603||49605<=i&&i<=49631||49633<=i&&i<=49659||49661<=i&&i<=49687||49689<=i&&i<=49715||49717<=i&&i<=49743||49745<=i&&i<=49771||49773<=i&&i<=49799||49801<=i&&i<=49827||49829<=i&&i<=49855||49857<=i&&i<=49883||49885<=i&&i<=49911||49913<=i&&i<=49939||49941<=i&&i<=49967||49969<=i&&i<=49995||49997<=i&&i<=50023||50025<=i&&i<=50051||50053<=i&&i<=50079||50081<=i&&i<=50107||50109<=i&&i<=50135||50137<=i&&i<=50163||50165<=i&&i<=50191||50193<=i&&i<=50219||50221<=i&&i<=50247||50249<=i&&i<=50275||50277<=i&&i<=50303||50305<=i&&i<=50331||50333<=i&&i<=50359||50361<=i&&i<=50387||50389<=i&&i<=50415||50417<=i&&i<=50443||50445<=i&&i<=50471||50473<=i&&i<=50499||50501<=i&&i<=50527||50529<=i&&i<=50555||50557<=i&&i<=50583||50585<=i&&i<=50611||50613<=i&&i<=50639||50641<=i&&i<=50667||50669<=i&&i<=50695||50697<=i&&i<=50723||50725<=i&&i<=50751||50753<=i&&i<=50779||50781<=i&&i<=50807||50809<=i&&i<=50835||50837<=i&&i<=50863||50865<=i&&i<=50891||50893<=i&&i<=50919||50921<=i&&i<=50947||50949<=i&&i<=50975||50977<=i&&i<=51003||51005<=i&&i<=51031||51033<=i&&i<=51059||51061<=i&&i<=51087||51089<=i&&i<=51115||51117<=i&&i<=51143||51145<=i&&i<=51171||51173<=i&&i<=51199||51201<=i&&i<=51227||51229<=i&&i<=51255||51257<=i&&i<=51283||51285<=i&&i<=51311||51313<=i&&i<=51339||51341<=i&&i<=51367||51369<=i&&i<=51395||51397<=i&&i<=51423||51425<=i&&i<=51451||51453<=i&&i<=51479||51481<=i&&i<=51507||51509<=i&&i<=51535||51537<=i&&i<=51563||51565<=i&&i<=51591||51593<=i&&i<=51619||51621<=i&&i<=51647||51649<=i&&i<=51675||51677<=i&&i<=51703||51705<=i&&i<=51731||51733<=i&&i<=51759||51761<=i&&i<=51787||51789<=i&&i<=51815||51817<=i&&i<=51843||51845<=i&&i<=51871||51873<=i&&i<=51899||51901<=i&&i<=51927||51929<=i&&i<=51955||51957<=i&&i<=51983||51985<=i&&i<=52011||52013<=i&&i<=52039||52041<=i&&i<=52067||52069<=i&&i<=52095||52097<=i&&i<=52123||52125<=i&&i<=52151||52153<=i&&i<=52179||52181<=i&&i<=52207||52209<=i&&i<=52235||52237<=i&&i<=52263||52265<=i&&i<=52291||52293<=i&&i<=52319||52321<=i&&i<=52347||52349<=i&&i<=52375||52377<=i&&i<=52403||52405<=i&&i<=52431||52433<=i&&i<=52459||52461<=i&&i<=52487||52489<=i&&i<=52515||52517<=i&&i<=52543||52545<=i&&i<=52571||52573<=i&&i<=52599||52601<=i&&i<=52627||52629<=i&&i<=52655||52657<=i&&i<=52683||52685<=i&&i<=52711||52713<=i&&i<=52739||52741<=i&&i<=52767||52769<=i&&i<=52795||52797<=i&&i<=52823||52825<=i&&i<=52851||52853<=i&&i<=52879||52881<=i&&i<=52907||52909<=i&&i<=52935||52937<=i&&i<=52963||52965<=i&&i<=52991||52993<=i&&i<=53019||53021<=i&&i<=53047||53049<=i&&i<=53075||53077<=i&&i<=53103||53105<=i&&i<=53131||53133<=i&&i<=53159||53161<=i&&i<=53187||53189<=i&&i<=53215||53217<=i&&i<=53243||53245<=i&&i<=53271||53273<=i&&i<=53299||53301<=i&&i<=53327||53329<=i&&i<=53355||53357<=i&&i<=53383||53385<=i&&i<=53411||53413<=i&&i<=53439||53441<=i&&i<=53467||53469<=i&&i<=53495||53497<=i&&i<=53523||53525<=i&&i<=53551||53553<=i&&i<=53579||53581<=i&&i<=53607||53609<=i&&i<=53635||53637<=i&&i<=53663||53665<=i&&i<=53691||53693<=i&&i<=53719||53721<=i&&i<=53747||53749<=i&&i<=53775||53777<=i&&i<=53803||53805<=i&&i<=53831||53833<=i&&i<=53859||53861<=i&&i<=53887||53889<=i&&i<=53915||53917<=i&&i<=53943||53945<=i&&i<=53971||53973<=i&&i<=53999||54001<=i&&i<=54027||54029<=i&&i<=54055||54057<=i&&i<=54083||54085<=i&&i<=54111||54113<=i&&i<=54139||54141<=i&&i<=54167||54169<=i&&i<=54195||54197<=i&&i<=54223||54225<=i&&i<=54251||54253<=i&&i<=54279||54281<=i&&i<=54307||54309<=i&&i<=54335||54337<=i&&i<=54363||54365<=i&&i<=54391||54393<=i&&i<=54419||54421<=i&&i<=54447||54449<=i&&i<=54475||54477<=i&&i<=54503||54505<=i&&i<=54531||54533<=i&&i<=54559||54561<=i&&i<=54587||54589<=i&&i<=54615||54617<=i&&i<=54643||54645<=i&&i<=54671||54673<=i&&i<=54699||54701<=i&&i<=54727||54729<=i&&i<=54755||54757<=i&&i<=54783||54785<=i&&i<=54811||54813<=i&&i<=54839||54841<=i&&i<=54867||54869<=i&&i<=54895||54897<=i&&i<=54923||54925<=i&&i<=54951||54953<=i&&i<=54979||54981<=i&&i<=55007||55009<=i&&i<=55035||55037<=i&&i<=55063||55065<=i&&i<=55091||55093<=i&&i<=55119||55121<=i&&i<=55147||55149<=i&&i<=55175||55177<=i&&i<=55203?10:9757==i||9977==i||9994<=i&&i<=9997||127877==i||127938<=i&&i<=127940||127943==i||127946<=i&&i<=127948||128066<=i&&i<=128067||128070<=i&&i<=128080||128110==i||128112<=i&&i<=128120||128124==i||128129<=i&&i<=128131||128133<=i&&i<=128135||128170==i||128372<=i&&i<=128373||128378==i||128400==i||128405<=i&&i<=128406||128581<=i&&i<=128583||128587<=i&&i<=128591||128675==i||128692<=i&&i<=128694||128704==i||128716==i||129304<=i&&i<=129308||129310<=i&&i<=129311||129318==i||129328<=i&&i<=129337||129341<=i&&i<=129342||129489<=i&&i<=129501?A:127995<=i&&i<=127999?14:8205==i?15:9792==i||9794==i||9877<=i&&i<=9878||9992==i||10084==i||127752==i||127806==i||127859==i||127891==i||127908==i||127912==i||127979==i||127981==i||128139==i||128187<=i&&i<=128188||128295==i||128300==i||128488==i||128640==i||128658==i?n:128102<=i&&i<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var r,A,n=a(i(e,t)),o=[],c=t+1;c<e.length;c++)if(A=c-1,!(55296<=(r=e).charCodeAt(A)&&r.charCodeAt(A)<=56319&&56320<=r.charCodeAt(A+1)&&r.charCodeAt(A+1)<=57343)){var g=a(i(e,c));if(s(n,o,g))return c;o.push(g)}return e.length},this.splitGraphemes=function(e){for(var t,r=[],A=0;(t=this.nextBreak(e,A))<e.length;)r.push(e.slice(A,t)),A=t;return A<e.length&&r.push(e.slice(A)),r},this.iterateGraphemes=function(e){var t=0,r={next:function(){var r,A;return(A=this.nextBreak(e,t))<e.length?(r=e.slice(t,A),t=A,{value:r,done:!1}):t<e.length?(r=e.slice(t),t=e.length,{value:r,done:!1}):{value:void 0,done:!0}}.bind(this)};return"undefined"!=typeof Symbol&&Symbol.iterator&&(r[Symbol.iterator]=function(){return r}),r},this.countGraphemes=function(e){for(var t,r=0,A=0;(t=this.nextBreak(e,A))<e.length;)A=t,r++;return A<e.length&&r++,r},this})},72918:e=>{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",A=t.indexOf(r+e),n=t.indexOf("--");return-1!==A&&(-1===n||A<n)}},86834:e=>{"use strict";const t=[200,203,204,206,300,301,404,405,410,414,501],r=[200,203,204,300,301,302,303,307,308,404,405,410,414,501],A={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},n={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function o(e){const t={};if(!e)return t;const r=e.trim().split(/\s*,\s*/);for(const e of r){const[r,A]=e.split(/\s*=\s*/,2);t[r]=void 0===A||A.replace(/^"|"$/g,"")}return t}function i(e){let t=[];for(const r in e){const A=e[r];t.push(!0===A?r:r+"="+A)}if(t.length)return t.join(", ")}e.exports=class{constructor(e,t,{shared:r,cacheHeuristic:A,immutableMinTimeToLive:n,ignoreCargoCult:s,trustServerDate:a,_fromObject:c}={}){if(c)this._fromObject(c);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==r,this._trustServerDate=void 0===a||a,this._cacheHeuristic=void 0!==A?A:.1,this._immutableMinTtl=void 0!==n?n:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=o(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=o(e.headers["cache-control"]),s&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":i(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),!t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||-1===r.indexOf(this._status)||this._rescc["no-store"]||this._isShared&&this._rescc.private||this._isShared&&!this._noAuthorization&&!this._allowsStoringAuthenticated()||!(this._resHeaders.expires||this._rescc.public||this._rescc["max-age"]||this._rescc["s-maxage"]||-1!==t.indexOf(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=o(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma))return!1;if(t["max-age"]&&this.age()>t["max-age"])return!1;if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"])return!1;if(this.stale()){if(!(t["max-stale"]&&!this._rescc["must-revalidate"]&&(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())))return!1}return this._requestMatches(e,!1)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e)A[r]||(t[r]=e[r]);if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter(e=>!/^\s*1[0-9][0-9]/.test(e));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?e.warning+", ":"")+'113 - "rfc7234 5.5.4"'),e.age=""+Math.round(t),e.date=new Date(this.now()).toUTCString(),e}date(){return this._trustServerDate?this._serverDate():this._responseTime}_serverDate(){const e=Date.parse(this._resHeaders.date);if(isFinite(e)){const t=288e5;if(Math.abs(this._responseTime-e)<t)return e}return this._responseTime}age(){let e=Math.max(0,(this._responseTime-this.date())/1e3);if(this._resHeaders.age){let t=this._ageValue();t>e&&(e=t)}return e+(this.now()-this._responseTime)/1e3}_ageValue(){const e=parseInt(this._resHeaders.age);return isFinite(e)?e:0}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return parseInt(this._rescc["s-maxage"],10)}if(this._rescc["max-age"])return parseInt(this._rescc["max-age"],10);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this._serverDate();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||r<t?0:Math.max(e,(r-t)/1e3)}if(this._resHeaders["last-modified"]){const r=Date.parse(this._resHeaders["last-modified"]);if(isFinite(r)&&t>r)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){return 1e3*Math.max(0,this.maxAge()-this.age())}stale(){return this.maxAge()<=this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag);if(t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter(e=>!/^\s*W\//.test(e));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),!t||!t.headers)throw Error("Response headers missing");let r=!1;if(void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0),!r)return{policy:new this.constructor(e,t),modified:304!=t.status,matches:!1};const A={};for(const e in this._resHeaders)A[e]=e in t.headers&&!n[e]?t.headers[e]:this._resHeaders[e];const o=Object.assign({},t,{status:this._status,method:this._method,headers:A});return{policy:new this.constructor(e,o,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,trustServerDate:this._trustServerDate}),modified:!1,matches:!0}}}},94935:(e,t,r)=>{"use strict";const A=r(28614),n=r(4016),o=r(97565),i=r(49601),s=Symbol("currentStreamsCount"),a=Symbol("request"),c=Symbol("cachedOriginSet"),g=Symbol("gracefullyClosing"),l=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],u=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,h=(e,t)=>{for(const r of e)r[c].length<t[c].length&&r[c].every(e=>t[c].includes(e))&&r[s]+t[s]<=t.remoteSettings.maxConcurrentStreams&&d(r)},p=({agent:e,isFree:t})=>{const r={};for(const A in e.sessions){const n=e.sessions[A].filter(e=>{const r=e[C.kCurrentStreamsCount]<e.remoteSettings.maxConcurrentStreams;return t?r:!r});0!==n.length&&(r[A]=n)}return r},d=e=>{e[g]=!0,0===e[s]&&e.close()};class C extends A{constructor({timeout:e=6e4,maxSessions:t=1/0,maxFreeSessions:r=10,maxCachedTlsSessions:A=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxFreeSessions=r,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new i({maxSize:A})}static normalizeOrigin(e,t){return"string"==typeof e&&(e=new URL(e)),t&&e.hostname!==t&&(e.hostname=t),e.origin}normalizeOptions(e){let t="";if(e)for(const r of l)e[r]&&(t+=":"+e[r]);return t}_tryToCreateNewSession(e,t){if(!(e in this.queue)||!(t in this.queue[e]))return;const r=this.queue[e][t];this._sessionsCount<this.maxSessions&&!r.completed&&(r.completed=!0,r())}getSession(e,t,r){return new Promise((A,n)=>{Array.isArray(r)?(r=[...r],A()):r=[{resolve:A,reject:n}];const i=this.normalizeOptions(t),l=C.normalizeOrigin(e,t&&t.servername);if(void 0===l){for(const{reject:e}of r)e(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(i in this.sessions){const e=this.sessions[i];let t,A=-1,n=-1;for(const r of e){const e=r.remoteSettings.maxConcurrentStreams;if(e<A)break;if(r[c].includes(l)){const o=r[s];if(o>=e||r[g]||r.destroyed)continue;t||(A=e),o>n&&(t=r,n=o)}}if(t){if(1!==r.length){for(const{reject:e}of r){e(new Error(`Expected the length of listeners to be 1, got ${r.length}.\nPlease report this to https://github.com/szmarczak/http2-wrapper/`))}return}return void r[0].resolve(t)}}if(i in this.queue){if(l in this.queue[i])return this.queue[i][l].listeners.push(...r),void this._tryToCreateNewSession(i,l)}else this.queue[i]={};const p=()=>{i in this.queue&&this.queue[i][l]===f&&(delete this.queue[i][l],0===Object.keys(this.queue[i]).length&&delete this.queue[i])},f=()=>{const A=`${l}:${i}`;let n=!1;try{const C=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(A),...t});C[s]=0,C[g]=!1;const I=()=>C[s]<C.remoteSettings.maxConcurrentStreams;let E=!0;C.socket.once("session",e=>{this.tlsSessionCache.set(A,e)}),C.once("error",e=>{for(const{reject:t}of r)t(e);this.tlsSessionCache.delete(A)}),C.setTimeout(this.timeout,()=>{C.destroy()}),C.once("close",()=>{if(n){E&&this._freeSessionsCount--,this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(C),1),0===e.length&&delete this.sessions[i]}else{const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(const{reject:t}of r)t(e);p()}this._tryToCreateNewSession(i,l)});const B=()=>{if(i in this.queue&&I())for(const e of C[c])if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];for(;0!==t.length&&I();)t.shift().resolve(C);const r=this.queue[i];if(0===r[e].listeners.length&&(delete r[e],0===Object.keys(r).length)){delete this.queue[i];break}if(!I())break}};C.on("origin",()=>{C[c]=C.originSet,I()&&(B(),h(this.sessions[i],C))}),C.once("remoteSettings",()=>{if(C.ref(),C.unref(),this._sessionsCount++,f.destroyed){const e=new Error("Agent has been destroyed");for(const t of r)t.reject(e);C.destroy()}else{C[c]=C.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(((e,t,r)=>{let A=0,n=e.length;for(;A<n;){const o=A+n>>>1;r(e[o],t)?A=o+1:n=o}return A})(t,C,u),0,C)}else e[i]=[C]}this._freeSessionsCount+=1,n=!0,this.emit("session",C),B(),p(),0===C[s]&&this._freeSessionsCount>this.maxFreeSessions&&C.close(),0!==r.length&&(this.getSession(l,t,r),r.length=0),C.on("remoteSettings",()=>{B(),h(this.sessions[i],C)})}}),C[a]=C.request,C.request=(e,t)=>{if(C[g])throw new Error("The session is gracefully closing. No new streams are allowed.");const r=C[a](e,t);return C.ref(),++C[s],C[s]===C.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,r.once("close",()=>{if(E=I(),--C[s],!C.destroyed&&!C.closed&&(((e,t)=>{for(const r of e)t[c].length<r[c].length&&t[c].every(e=>r[c].includes(e))&&t[s]+r[s]<=r.remoteSettings.maxConcurrentStreams&&d(t)})(this.sessions[i],C),I()&&!C.closed)){E||(this._freeSessionsCount++,E=!0);const e=0===C[s];e&&C.unref(),e&&(this._freeSessionsCount>this.maxFreeSessions||C[g])?C.close():(h(this.sessions[i],C),B())}}),r}}catch(e){for(const t of r)t.reject(e);p()}};f.listeners=r,f.completed=!1,f.destroyed=!1,this.queue[i][l]=f,this._tryToCreateNewSession(i,l)})}request(e,t,r,A){return new Promise((n,o)=>{this.getSession(e,t,[{reject:o,resolve:e=>{try{n(e.request(r,A))}catch(e){o(e)}}}])})}createConnection(e,t){return C.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443,A=e.hostname||e.host;return void 0===t.servername&&(t.servername=A),n.connect(r,A,t)}closeFreeSessions(){for(const e of Object.values(this.sessions))for(const t of e)0===t[s]&&t.close()}destroy(e){for(const t of Object.values(this.sessions))for(const r of t)r.destroy(e);for(const e of Object.values(this.queue))for(const t of Object.values(e))t.destroyed=!0;this.queue={}}get freeSessions(){return p({agent:this,isFree:!0})}get busySessions(){return p({agent:this,isFree:!1})}}C.kCurrentStreamsCount=s,C.kGracefullyClosing=g,e.exports={Agent:C,globalAgent:new C}},2398:(e,t,r)=>{"use strict";const A=r(98605),n=r(57211),o=r(19476),i=r(49601),s=r(33134),a=r(5209),c=r(50075),g=new i({maxSize:100}),l=new Map,u=(e,t,r)=>{t._httpMessage={shouldKeepAlive:!0};const A=()=>{e.emit("free",t,r)};t.on("free",A);const n=()=>{e.removeSocket(t,r)};t.on("close",n);const o=()=>{e.removeSocket(t,r),t.off("close",n),t.off("free",A),t.off("agentRemove",o)};t.on("agentRemove",o),e.emit("free",t,r)};e.exports=async(e,t,r)=>{if(("string"==typeof e||e instanceof URL)&&(e=c(new URL(e))),"function"==typeof t&&(r=t,t=void 0),t={ALPNProtocols:["h2","http/1.1"],...e,...t,resolveSocket:!0},!Array.isArray(t.ALPNProtocols)||0===t.ALPNProtocols.length)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");t.protocol=t.protocol||"https:";const i="https:"===t.protocol;t.host=t.hostname||t.host||"localhost",t.session=t.tlsSession,t.servername=t.servername||a(t),t.port=t.port||(i?443:80),t._defaultAgent=i?n.globalAgent:A.globalAgent;const h=t.agent;if(h){if(h.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");t.agent=h[i?"https":"http"]}if(i){if("h2"===await(async e=>{const t=`${e.host}:${e.port}:${e.ALPNProtocols.sort()}`;if(!g.has(t)){if(l.has(t)){return(await l.get(t)).alpnProtocol}const{path:r,agent:A}=e;e.path=e.socketPath;const i=o(e);l.set(t,i);try{const{socket:o,alpnProtocol:s}=await i;if(g.set(t,s),e.path=r,"h2"===s)o.destroy();else{const{globalAgent:t}=n,r=n.Agent.prototype.createConnection;A?A.createConnection===r?u(A,o,e):o.destroy():t.createConnection===r?u(t,o,e):o.destroy()}return l.delete(t),s}catch(e){throw l.delete(t),e}}return g.get(t)})(t))return h&&(t.agent=h.http2),new s(t,r)}return A.request(t,r)},e.exports.protocolCache=g},33134:(e,t,r)=>{"use strict";const A=r(97565),{Writable:n}=r(92413),{Agent:o,globalAgent:i}=r(94935),s=r(53433),a=r(50075),c=r(66192),g=r(50978),{ERR_INVALID_ARG_TYPE:l,ERR_INVALID_PROTOCOL:u,ERR_HTTP_HEADERS_SENT:h,ERR_INVALID_HTTP_TOKEN:p,ERR_HTTP_INVALID_HEADER_VALUE:d,ERR_INVALID_CHAR:C}=r(64080),{HTTP2_HEADER_STATUS:f,HTTP2_HEADER_METHOD:I,HTTP2_HEADER_PATH:E,HTTP2_METHOD_CONNECT:B}=A.constants,y=Symbol("headers"),m=Symbol("origin"),w=Symbol("session"),Q=Symbol("options"),D=Symbol("flushedHeaders"),b=Symbol("jobs"),v=/^[\^`\-\w!#$%&*+.|~]+$/,S=/[^\t\u0020-\u007E\u0080-\u00FF]/;e.exports=class extends n{constructor(e,t,r){super({autoDestroy:!1});const A="string"==typeof e||e instanceof URL;if(A&&(e=a(e instanceof URL?e:new URL(e))),"function"==typeof t||void 0===t?(r=t,t=A?e:{...e}):t={...e,...t},t.h2session)this[w]=t.h2session;else if(!1===t.agent)this.agent=new o({maxFreeSessions:0});else if(void 0===t.agent||null===t.agent)"function"==typeof t.createConnection?(this.agent=new o({maxFreeSessions:0}),this.agent.createConnection=t.createConnection):this.agent=i;else{if("function"!=typeof t.agent.request)throw new l("options.agent",["Agent-like Object","undefined","false"],t.agent);this.agent=t.agent}if(t.protocol&&"https:"!==t.protocol)throw new u(t.protocol,"https:");const n=t.port||t.defaultPort||this.agent&&this.agent.defaultPort||443,s=t.hostname||t.host||"localhost";delete t.hostname,delete t.host,delete t.port;const{timeout:c}=t;if(t.timeout=void 0,this[y]=Object.create(null),this[b]=[],this.socket=null,this.connection=null,this.method=t.method||"GET",this.path=t.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,t.headers)for(const[e,r]of Object.entries(t.headers))this.setHeader(e,r);t.auth&&!("authorization"in this[y])&&(this[y].authorization="Basic "+Buffer.from(t.auth).toString("base64")),t.session=t.tlsSession,t.path=t.socketPath,this[Q]=t,443===n?(this[m]="https://"+s,":authority"in this[y]||(this[y][":authority"]=s)):(this[m]=`https://${s}:${n}`,":authority"in this[y]||(this[y][":authority"]=`${s}:${n}`)),c&&this.setTimeout(c),r&&this.once("response",r),this[D]=!1}get method(){return this[y][I]}set method(e){e&&(this[y][I]=e.toUpperCase())}get path(){return this[y][E]}set path(e){e&&(this[y][E]=e)}get _mustNotHaveABody(){return"GET"===this.method||"HEAD"===this.method||"DELETE"===this.method}_write(e,t,r){if(this._mustNotHaveABody)return void r(new Error("The GET, HEAD and DELETE methods must NOT have a body"));this.flushHeaders();const A=()=>this._request.write(e,t,r);this._request?A():this[b].push(A)}_final(e){if(this.destroyed)return;this.flushHeaders();const t=()=>{this._mustNotHaveABody?e():this._request.end(e)};this._request?t():this[b].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,t){this.res&&this.res._dump(),this._request&&this._request.destroy(),t(e)}async flushHeaders(){if(this[D]||this.destroyed)return;this[D]=!0;const e=this.method===B,t=t=>{if(this._request=t,this.destroyed)return void t.destroy();e||c(t,this,["timeout","continue","close","error"]);const r=e=>(...t)=>{this.writable||this.destroyed?this.once("finish",()=>{e(...t)}):e(...t)};t.once("response",r((r,A,n)=>{const o=new s(this.socket,t.readableHighWaterMark);this.res=o,o.req=this,o.statusCode=r[f],o.headers=r,o.rawHeaders=n,o.once("end",()=>{this.aborted?(o.aborted=!0,o.emit("aborted")):(o.complete=!0,o.socket=null,o.connection=null)}),e?(o.upgrade=!0,this.emit("connect",o,t,Buffer.alloc(0))?this.emit("close"):t.destroy()):(t.on("data",e=>{o._dumped||o.push(e)||t.pause()}),t.once("end",()=>{o.push(null)}),this.emit("response",o)||o._dump())})),t.once("headers",r(e=>this.emit("information",{statusCode:e[f]}))),t.once("trailers",r((e,t,r)=>{const{res:A}=this;A.trailers=e,A.rawTrailers=r}));const{socket:A}=t.session;this.socket=A,this.connection=A;for(const e of this[b])e();this.emit("socket",this.socket)};if(this[w])try{t(this[w].request(this[y]))}catch(e){this.emit("error",e)}else{this.reusedSocket=!0;try{t(await this.agent.request(this[m],this[Q],this[y]))}catch(e){this.emit("error",e)}}}getHeader(e){if("string"!=typeof e)throw new l("name","string",e);return this[y][e.toLowerCase()]}get headersSent(){return this[D]}removeHeader(e){if("string"!=typeof e)throw new l("name","string",e);if(this.headersSent)throw new h("remove");delete this[y][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new h("set");if("string"!=typeof e||!v.test(e)&&!g(e))throw new p("Header name",e);if(void 0===t)throw new d(t,e);if(S.test(t))throw new C("header content",e);this[y][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const r=()=>this._request.setTimeout(e,t);return this._request?r():this[b].push(r),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}}},53433:(e,t,r)=>{"use strict";const{Readable:A}=r(92413);e.exports=class extends A{constructor(e,t){super({highWaterMark:t,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}}},92353:(e,t,r)=>{"use strict";const A=r(97565),n=r(94935),o=r(33134),i=r(53433),s=r(2398);e.exports={...A,ClientRequest:o,IncomingMessage:i,...n,request:(e,t,r)=>new o(e,t,r),get:(e,t,r)=>{const A=new o(e,t,r);return A.end(),A},auto:s}},5209:(e,t,r)=>{"use strict";const A=r(11631);e.exports=e=>{let t=e.host;const r=e.headers&&e.headers.host;if(r)if(r.startsWith("[")){t=-1===r.indexOf("]")?r:r.slice(1,-1)}else t=r.split(":",1)[0];return A.isIP(t)?"":t}},64080:e=>{"use strict";const t=(t,r,A)=>{e.exports[r]=class extends t{constructor(...e){super("string"==typeof A?A:A(e)),this.name=`${super.name} [${r}]`,this.code=r}}};t(TypeError,"ERR_INVALID_ARG_TYPE",e=>{const t=e[0].includes(".")?"property":"argument";let r=e[1];const A=Array.isArray(r);return A&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${e[0]}" ${t} must be ${A?"one of":"of"} type ${r}. Received ${typeof e[2]}`}),t(TypeError,"ERR_INVALID_PROTOCOL",e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`),t(Error,"ERR_HTTP_HEADERS_SENT",e=>`Cannot ${e[0]} headers after they are sent to the client`),t(TypeError,"ERR_INVALID_HTTP_TOKEN",e=>`${e[0]} must be a valid HTTP token [${e[1]}]`),t(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",e=>`Invalid value "${e[0]} for header "${e[1]}"`),t(TypeError,"ERR_INVALID_CHAR",e=>`Invalid character in ${e[0]} [${e[1]}]`)},50978:e=>{"use strict";e.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}},66192:e=>{"use strict";e.exports=(e,t,r)=>{for(const A of r)e.on(A,(...e)=>t.emit(A,...e))}},50075:e=>{"use strict";e.exports=e=>{const t={protocol:e.protocol,hostname:"string"==typeof e.hostname&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return"string"==typeof e.port&&0!==e.port.length&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}},46458:e=>{function t(e){return Array.isArray(e)?e:[e]}const r=/^\s+$/,A=/^\\!/,n=/^\\#/,o=/\r?\n/g,i=/^\.*\/|^\.+$/,s="undefined"!=typeof Symbol?Symbol.for("node-ignore"):"node-ignore",a=/([0-z])-([0-z])/g,c=[[/\\?\s+$/,e=>0===e.indexOf("\\")?" ":""],[/\\\s/g,()=>" "],[/[\\^$.|*+(){]/g,e=>"\\"+e],[/\[([^\]/]*)($|\])/g,(e,t,r)=>{return"]"===r?`[${A=t,A.replace(a,(e,t,r)=>t.charCodeAt(0)<=r.charCodeAt(0)?e:"")}]`:"\\"+e;var A}],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/(?:[^*])$/,e=>/\/$/.test(e)?e+"$":e+"(?=$|\\/$)"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)\\\*(?=.+)/g,(e,t)=>t+"[^\\/]*"],[/(\^|\\\/)?\\\*$/,(e,t)=>(t?t+"[^/]+":"[^/]*")+"(?=$|\\/$)"],[/\\\\\\/g,()=>"\\"]],g=Object.create(null),l=e=>"string"==typeof e;class u{constructor(e,t,r,A){this.origin=e,this.pattern=t,this.negative=r,this.regex=A}}const h=(e,t)=>{const r=e;let o=!1;0===e.indexOf("!")&&(o=!0,e=e.substr(1));const i=((e,t,r)=>{const A=g[e];if(A)return A;const n=c.reduce((t,r)=>t.replace(r[0],r[1].bind(e)),e);return g[e]=r?new RegExp(n,"i"):new RegExp(n)})(e=e.replace(A,"!").replace(n,"#"),0,t);return new u(r,e,o,i)},p=(e,t)=>{throw new t(e)},d=(e,t,r)=>{if(!l(e))return r(`path must be a string, but got \`${t}\``,TypeError);if(!e)return r("path must not be empty",TypeError);if(d.isNotRelative(e)){return r(`path should be a ${"`path.relative()`d"} string, but got "${t}"`,RangeError)}return!0},C=e=>i.test(e);d.isNotRelative=C,d.convert=e=>e;class f{constructor({ignorecase:e=!0}={}){var t,r,A;this._rules=[],this._ignorecase=e,t=this,r=s,A=!0,Object.defineProperty(t,r,{value:A}),this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[s])return this._rules=this._rules.concat(e._rules),void(this._added=!0);if((e=>e&&l(e)&&!r.test(e)&&0!==e.indexOf("#"))(e)){const t=h(e,this._ignorecase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(l(e)?(e=>e.split(o))(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let r=!1,A=!1;return this._rules.forEach(n=>{const{negative:o}=n;if(A===o&&r!==A||o&&!r&&!A&&!t)return;n.regex.test(e)&&(r=!o,A=o)}),{ignored:r,unignored:A}}_test(e,t,r,A){const n=e&&d.convert(e);return d(n,e,p),this._t(n,t,r,A)}_t(e,t,r,A){if(e in t)return t[e];if(A||(A=e.split("/")),A.pop(),!A.length)return t[e]=this._testOne(e,r);const n=this._t(A.join("/")+"/",t,r,A);return t[e]=n.ignored?n:this._testOne(e,r)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return t(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const I=e=>new f(e),E=()=>!1;if(I.isPathValid=e=>d(e&&d.convert(e),e,E),I.default=I,e.exports=I,"undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const e=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");d.convert=e;const t=/^[a-z]:\//i;d.isNotRelative=e=>t.test(e)||C(e)}},85870:(e,t,r)=>{try{var A=r(31669);if("function"!=typeof A.inherits)throw"";e.exports=A.inherits}catch(t){e.exports=r(48145)}},48145:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},44486:e=>{
/*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*/
e.exports=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}},18193:(e,t,r)=>{
/*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
var A=r(44486),n={"{":"}","(":")","[":"]"},o=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,i=/\\(.)|(^!|[*?{}()[\]]|\(\?)/;e.exports=function(e,t){if("string"!=typeof e||""===e)return!1;if(A(e))return!0;var r,s=o;for(t&&!1===t.strict&&(s=i);r=s.exec(e);){if(r[2])return!0;var a=r.index+r[0].length,c=r[1],g=c?n[c]:null;if(c&&g){var l=e.indexOf(g,a);-1!==l&&(a=l+1)}e=e.slice(a)}return!1}},59235:e=>{"use strict";
/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/e.exports=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}},97369:(e,t)=>{var r,A,n,o;
/*!
* is-windows <https://github.com/jonschlinkert/is-windows>
*
* Copyright Š 2015-2018, Jon Schlinkert.
* Released under the MIT License.
*/o=function(){"use strict";return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}},t&&"object"==typeof t?e.exports=o():(A=[],void 0===(n="function"==typeof(r=o)?r.apply(t,A):r)||(e.exports=n))},64151:(e,t,r)=>{var A;r(35747);function n(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,A){n(e,t||{},(function(e,t){e?A(e):r(t)}))}))}A(e,t||{},(function(e,A){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,A=!1),r(e,A)}))}A="win32"===process.platform||global.TESTING_WINDOWS?r(3202):r(2151),e.exports=n,n.sync=function(e,t){try{return A.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},2151:(e,t,r)=>{e.exports=n,n.sync=function(e,t){return o(A.statSync(e),t)};var A=r(35747);function n(e,t,r){A.stat(e,(function(e,A){r(e,!e&&o(A,t))}))}function o(e,t){return e.isFile()&&function(e,t){var r=e.mode,A=e.uid,n=e.gid,o=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),i=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),s=parseInt("100",8),a=parseInt("010",8),c=parseInt("001",8),g=s|a;return r&c||r&a&&n===i||r&s&&A===o||r&g&&0===o}(e,t)}},3202:(e,t,r)=>{e.exports=o,o.sync=function(e,t){return n(A.statSync(e),e,t)};var A=r(35747);function n(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var A=0;A<r.length;A++){var n=r[A].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}(t,r)}function o(e,t,r){A.stat(e,(function(A,o){r(A,!A&&n(o,e,t))}))}},21194:(e,t,r)=>{"use strict";var A=r(40744);e.exports=A},40744:(e,t,r)=>{"use strict";var A=r(55384),n=r(24129);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=r(81704),e.exports.Schema=r(8212),e.exports.FAILSAFE_SCHEMA=r(44413),e.exports.JSON_SCHEMA=r(45247),e.exports.CORE_SCHEMA=r(8769),e.exports.DEFAULT_SAFE_SCHEMA=r(65483),e.exports.DEFAULT_FULL_SCHEMA=r(5235),e.exports.load=A.load,e.exports.loadAll=A.loadAll,e.exports.safeLoad=A.safeLoad,e.exports.safeLoadAll=A.safeLoadAll,e.exports.dump=n.dump,e.exports.safeDump=n.safeDump,e.exports.YAMLException=r(17345),e.exports.MINIMAL_SCHEMA=r(44413),e.exports.SAFE_SCHEMA=r(65483),e.exports.DEFAULT_SCHEMA=r(5235),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},28149:e=>{"use strict";function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var r,A="";for(r=0;r<t;r+=1)A+=e;return A},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var r,A,n,o;if(t)for(r=0,A=(o=Object.keys(t)).length;r<A;r+=1)e[n=o[r]]=t[n];return e}},24129:(e,t,r)=>{"use strict";var A=r(28149),n=r(17345),o=r(5235),i=r(65483),s=Object.prototype.toString,a=Object.prototype.hasOwnProperty,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},g=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function l(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else{if(!(e<=4294967295))throw new n("code point within a string may not be greater than 0xFFFFFFFF");r="U",o=8}return"\\"+r+A.repeat("0",o-t.length)+t}function u(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=A.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,A,n,o,i,s,c;if(null===t)return{};for(r={},n=0,o=(A=Object.keys(t)).length;n<o;n+=1)i=A[n],s=String(t[i]),"!!"===i.slice(0,2)&&(i="tag:yaml.org,2002:"+i.slice(2)),(c=e.compiledTypeMap.fallback[i])&&a.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[i]=s;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function h(e,t){for(var r,n=A.repeat(" ",t),o=0,i=-1,s="",a=e.length;o<a;)-1===(i=e.indexOf("\n",o))?(r=e.slice(o),o=a):(r=e.slice(o,i+1),o=i+1),r.length&&"\n"!==r&&(s+=n),s+=r;return s}function p(e,t){return"\n"+A.repeat(" ",e.indent*t)}function d(e){return 32===e||9===e}function C(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function f(e){return C(e)&&65279!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&58!==e&&35!==e}function I(e){return/^\n* /.test(e)}function E(e,t,r,A,n){var o,i,s,a=!1,c=!1,g=-1!==A,l=-1,u=C(s=e.charCodeAt(0))&&65279!==s&&!d(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&!d(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(!C(i=e.charCodeAt(o)))return 5;u=u&&f(i)}else{for(o=0;o<e.length;o++){if(10===(i=e.charCodeAt(o)))a=!0,g&&(c=c||o-l-1>A&&" "!==e[l+1],l=o);else if(!C(i))return 5;u=u&&f(i)}c=c||g&&o-l-1>A&&" "!==e[l+1]}return a||c?r>9&&I(e)?5:c?4:3:u&&!n(e)?1:2}function B(e,t,r,A){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==g.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,r),i=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=A||e.flowLevel>-1&&r>=e.flowLevel;switch(E(t,s,e.indent,i,(function(t){return function(e,t){var r,A;for(r=0,A=e.implicitTypes.length;r<A;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)}))){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+y(t,e.indent)+m(h(t,o));case 4:return">"+y(t,e.indent)+m(h(function(e,t){var r,A,n=/(\n+)([^\n]*)/g,o=(s=e.indexOf("\n"),s=-1!==s?s:e.length,n.lastIndex=s,w(e.slice(0,s),t)),i="\n"===e[0]||" "===e[0];var s;for(;A=n.exec(e);){var a=A[1],c=A[2];r=" "===c[0],o+=a+(i||r||""===c?"":"\n")+w(c,t),i=r}return o}(t,i),o));case 5:return'"'+function(e){for(var t,r,A,n="",o=0;o<e.length;o++)(t=e.charCodeAt(o))>=55296&&t<=56319&&(r=e.charCodeAt(o+1))>=56320&&r<=57343?(n+=l(1024*(t-55296)+r-56320+65536),o++):(A=c[t],n+=!A&&C(t)?e[o]:A||l(t));return n}(t)+'"';default:throw new n("impossible error: invalid scalar style")}}()}function y(e,t){var r=I(e)?String(t):"",A="\n"===e[e.length-1];return r+(A&&("\n"===e[e.length-2]||"\n"===e)?"+":A?"":"-")+"\n"}function m(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function w(e,t){if(""===e||" "===e[0])return e;for(var r,A,n=/ [^ ]/g,o=0,i=0,s=0,a="";r=n.exec(e);)(s=r.index)-o>t&&(A=i>o?i:s,a+="\n"+e.slice(o,A),o=A+1),i=s;return a+="\n",e.length-o>t&&i>o?a+=e.slice(o,i)+"\n"+e.slice(i+1):a+=e.slice(o),a.slice(1)}function Q(e,t,r){var A,o,i,c,g,l;for(i=0,c=(o=r?e.explicitTypes:e.implicitTypes).length;i<c;i+=1)if(((g=o[i]).instanceOf||g.predicate)&&(!g.instanceOf||"object"==typeof t&&t instanceof g.instanceOf)&&(!g.predicate||g.predicate(t))){if(e.tag=r?g.tag:"?",g.represent){if(l=e.styleMap[g.tag]||g.defaultStyle,"[object Function]"===s.call(g.represent))A=g.represent(t,l);else{if(!a.call(g.represent,l))throw new n("!<"+g.tag+'> tag resolver accepts not "'+l+'" style');A=g.represent[l](t,l)}e.dump=A}return!0}return!1}function D(e,t,r,A,o,i){e.tag=null,e.dump=r,Q(e,r,!1)||Q(e,r,!0);var a=s.call(e.dump);A&&(A=e.flowLevel<0||e.flowLevel>t);var c,g,l="[object Object]"===a||"[object Array]"===a;if(l&&(g=-1!==(c=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||g||2!==e.indent&&t>0)&&(o=!1),g&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(l&&g&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===a)A&&0!==Object.keys(e.dump).length?(!function(e,t,r,A){var o,i,s,a,c,g,l="",u=e.tag,h=Object.keys(r);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new n("sortKeys must be a boolean or a function");for(o=0,i=h.length;o<i;o+=1)g="",A&&0===o||(g+=p(e,t)),a=r[s=h[o]],D(e,t+1,s,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,c&&(g+=p(e,t)),D(e,t+1,a,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?g+=":":g+=": ",l+=g+=e.dump));e.tag=u,e.dump=l||"{}"}(e,t,e.dump,o),g&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,r){var A,n,o,i,s,a="",c=e.tag,g=Object.keys(r);for(A=0,n=g.length;A<n;A+=1)s=e.condenseFlow?'"':"",0!==A&&(s+=", "),i=r[o=g[A]],D(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),D(e,t,i,!1,!1)&&(a+=s+=e.dump));e.tag=c,e.dump="{"+a+"}"}(e,t,e.dump),g&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===a){var u=e.noArrayIndent&&t>0?t-1:t;A&&0!==e.dump.length?(!function(e,t,r,A){var n,o,i="",s=e.tag;for(n=0,o=r.length;n<o;n+=1)D(e,t+1,r[n],!0,!0)&&(A&&0===n||(i+=p(e,t)),e.dump&&10===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}(e,u,e.dump,o),g&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,r){var A,n,o="",i=e.tag;for(A=0,n=r.length;A<n;A+=1)D(e,t,r[A],!1,!1)&&(0!==A&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=i,e.dump="["+o+"]"}(e,u,e.dump),g&&(e.dump="&ref_"+c+" "+e.dump))}else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&B(e,e.dump,t,i)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function b(e,t){var r,A,n=[],o=[];for(function e(t,r,A){var n,o,i;if(null!==t&&"object"==typeof t)if(-1!==(o=r.indexOf(t)))-1===A.indexOf(o)&&A.push(o);else if(r.push(t),Array.isArray(t))for(o=0,i=t.length;o<i;o+=1)e(t[o],r,A);else for(n=Object.keys(t),o=0,i=n.length;o<i;o+=1)e(t[n[o]],r,A)}(e,n,o),r=0,A=o.length;r<A;r+=1)t.duplicates.push(n[o[r]]);t.usedDuplicates=new Array(A)}function v(e,t){var r=new u(t=t||{});return r.noRefs||b(e,r),D(r,0,e,!0,!0)?r.dump+"\n":""}e.exports.dump=v,e.exports.safeDump=function(e,t){return v(e,A.extend({schema:i},t))}},17345:e=>{"use strict";function t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=t},55384:(e,t,r)=>{"use strict";var A=r(28149),n=r(17345),o=r(30399),i=r(65483),s=r(5235),a=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,l=/[,\[\]\{\}]/,u=/^(?:!|!!|![a-z\-]+!)$/i,h=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function p(e){return 10===e||13===e}function d(e){return 9===e||32===e}function C(e){return 9===e||32===e||10===e||13===e}function f(e){return 44===e||91===e||93===e||123===e||125===e}function I(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function E(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function B(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var y=new Array(256),m=new Array(256),w=0;w<256;w++)y[w]=E(w)?1:0,m[w]=E(w);function Q(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function D(e,t){return new n(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function b(e,t){throw D(e,t)}function v(e,t){e.onWarning&&e.onWarning.call(null,D(e,t))}var S={YAML:function(e,t,r){var A,n,o;null!==e.version&&b(e,"duplication of %YAML directive"),1!==r.length&&b(e,"YAML directive accepts exactly one argument"),null===(A=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&b(e,"ill-formed argument of the YAML directive"),n=parseInt(A[1],10),o=parseInt(A[2],10),1!==n&&b(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&v(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var A,n;2!==r.length&&b(e,"TAG directive accepts exactly two arguments"),A=r[0],n=r[1],u.test(A)||b(e,"ill-formed tag handle (first argument) of the TAG directive"),a.call(e.tagMap,A)&&b(e,'there is a previously declared suffix for "'+A+'" tag handle'),h.test(n)||b(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[A]=n}};function k(e,t,r,A){var n,o,i,s;if(t<r){if(s=e.input.slice(t,r),A)for(n=0,o=s.length;n<o;n+=1)9===(i=s.charCodeAt(n))||32<=i&&i<=1114111||b(e,"expected valid JSON character");else c.test(s)&&b(e,"the stream contains non-printable characters");e.result+=s}}function N(e,t,r,n){var o,i,s,c;for(A.isObject(r)||b(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,c=(o=Object.keys(r)).length;s<c;s+=1)i=o[s],a.call(t,i)||(t[i]=r[i],n[i]=!0)}function F(e,t,r,A,n,o,i,s){var c,g;if(n=String(n),null===t&&(t={}),"tag:yaml.org,2002:merge"===A)if(Array.isArray(o))for(c=0,g=o.length;c<g;c+=1)N(e,t,o[c],r);else N(e,t,o,r);else e.json||a.call(r,n)||!a.call(t,n)||(e.line=i||e.line,e.position=s||e.position,b(e,"duplicated mapping key")),t[n]=o,delete r[n];return t}function K(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):b(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function M(e,t,r){for(var A=0,n=e.input.charCodeAt(e.position);0!==n;){for(;d(n);)n=e.input.charCodeAt(++e.position);if(t&&35===n)do{n=e.input.charCodeAt(++e.position)}while(10!==n&&13!==n&&0!==n);if(!p(n))break;for(K(e),n=e.input.charCodeAt(e.position),A++,e.lineIndent=0;32===n;)e.lineIndent++,n=e.input.charCodeAt(++e.position)}return-1!==r&&0!==A&&e.lineIndent<r&&v(e,"deficient indentation"),A}function R(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!C(t)))}function x(e,t){1===t?e.result+=" ":t>1&&(e.result+=A.repeat("\n",t-1))}function L(e,t){var r,A,n=e.tag,o=e.anchor,i=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),A=e.input.charCodeAt(e.position);0!==A&&45===A&&C(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t)i.push(null),A=e.input.charCodeAt(e.position);else if(r=e.line,U(e,t,3,!1,!0),i.push(e.result),M(e,!0,-1),A=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==A)b(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=n,e.anchor=o,e.kind="sequence",e.result=i,!0)}function P(e){var t,r,A,n,o=!1,i=!1;if(33!==(