@storybook/cli 0.0.0-pr-30309-sha-678fb8fb → 0.0.0-pr-30202-sha-4958640a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.cjs +4 -1
- package/dist/bin/index.js +29 -26
- package/dist/{block-dependencies-versions-MVMTRPKZ.js → block-dependencies-versions-BBF7RPW6.js} +8 -2
- package/dist/{block-node-version-WU2G5Y45.js → block-node-version-GK344KY7.js} +8 -2
- package/dist/{block-storystorev6-YR7CELJP.js → block-storystorev6-EWYS5WUW.js} +8 -2
- package/dist/chunk-EPU2YRDU.js +7 -0
- package/dist/{chunk-3VVDG2YT.js → chunk-YOK5AKLS.js} +7 -0
- package/dist/index.js +6 -0
- package/package.json +13 -5
- package/dist/bin/index.cjs +0 -639
- package/dist/chunk-BYXBJQAS.js +0 -1
- package/dist/index.cjs +0 -1
package/dist/bin/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ESM_COMPAT_Module from 'node:module';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname, join, basename, extname, isAbsolute, normalize } from 'node:path';
|
|
4
|
+
import { __commonJS, __toESM, require_picocolors, __require } from '../chunk-YOK5AKLS.js';
|
|
2
5
|
import { versions, removeAddon, JsPackageManagerFactory, getStorybookInfo, getCoercedStorybookVersion, serverRequire, loadMainConfig, frameworkPackages, temporaryFile, isCorePackage, rendererPackages, commonGlobOptions, extractProperFrameworkName, builderPackages, formatFileContent } from 'storybook/internal/common';
|
|
3
6
|
import { withTelemetry } from 'storybook/internal/core-server';
|
|
4
7
|
import { logger as logger$1 } from 'storybook/internal/node-logger';
|
|
@@ -8,9 +11,8 @@ import envinfo from 'envinfo';
|
|
|
8
11
|
import { findPackageSync } from 'fd-package-json';
|
|
9
12
|
import leven from 'leven';
|
|
10
13
|
import invariant2 from 'tiny-invariant';
|
|
11
|
-
import { join, basename, extname, isAbsolute, normalize } from 'node:path';
|
|
12
14
|
import { readConfig, writeConfig, loadConfig, formatConfig, babelParse } from 'storybook/internal/csf-tools';
|
|
13
|
-
import
|
|
15
|
+
import prompts7 from 'prompts';
|
|
14
16
|
import semver, { prerelease, lt, gt, eq, clean } from 'semver';
|
|
15
17
|
import { dedent } from 'ts-dedent';
|
|
16
18
|
import { types } from 'storybook/internal/babel';
|
|
@@ -28,22 +30,24 @@ import { glob } from 'glob';
|
|
|
28
30
|
import findUp from 'find-up';
|
|
29
31
|
import * as babel from '@babel/core';
|
|
30
32
|
import { sync, spawn } from 'cross-spawn';
|
|
31
|
-
import { initiate } from 'create-storybook';
|
|
32
33
|
import { downloadTemplate } from 'giget';
|
|
33
34
|
import { UpgradeStorybookInWrongWorkingDirectory, UpgradeStorybookToLowerVersionError, UpgradeStorybookToSameVersionError, UpgradeStorybookUnknownCurrentVersionError } from 'storybook/internal/server-errors';
|
|
34
35
|
|
|
35
|
-
var require_eastasianwidth=__commonJS({"../../node_modules/eastasianwidth/eastasianwidth.js"(exports,module){var eaw={};typeof module>"u"?window.eastasianwidth=eaw:module.exports=eaw;eaw.eastAsianWidth=function(character){var x=character.charCodeAt(0),y=character.length==2?character.charCodeAt(1):0,codePoint=x;return 55296<=x&&x<=56319&&56320<=y&&y<=57343&&(x&=1023,y&=1023,codePoint=x<<10|y,codePoint+=65536),codePoint==12288||65281<=codePoint&&codePoint<=65376||65504<=codePoint&&codePoint<=65510?"F":codePoint==8361||65377<=codePoint&&codePoint<=65470||65474<=codePoint&&codePoint<=65479||65482<=codePoint&&codePoint<=65487||65490<=codePoint&&codePoint<=65495||65498<=codePoint&&codePoint<=65500||65512<=codePoint&&codePoint<=65518?"H":4352<=codePoint&&codePoint<=4447||4515<=codePoint&&codePoint<=4519||4602<=codePoint&&codePoint<=4607||9001<=codePoint&&codePoint<=9002||11904<=codePoint&&codePoint<=11929||11931<=codePoint&&codePoint<=12019||12032<=codePoint&&codePoint<=12245||12272<=codePoint&&codePoint<=12283||12289<=codePoint&&codePoint<=12350||12353<=codePoint&&codePoint<=12438||12441<=codePoint&&codePoint<=12543||12549<=codePoint&&codePoint<=12589||12593<=codePoint&&codePoint<=12686||12688<=codePoint&&codePoint<=12730||12736<=codePoint&&codePoint<=12771||12784<=codePoint&&codePoint<=12830||12832<=codePoint&&codePoint<=12871||12880<=codePoint&&codePoint<=13054||13056<=codePoint&&codePoint<=19903||19968<=codePoint&&codePoint<=42124||42128<=codePoint&&codePoint<=42182||43360<=codePoint&&codePoint<=43388||44032<=codePoint&&codePoint<=55203||55216<=codePoint&&codePoint<=55238||55243<=codePoint&&codePoint<=55291||63744<=codePoint&&codePoint<=64255||65040<=codePoint&&codePoint<=65049||65072<=codePoint&&codePoint<=65106||65108<=codePoint&&codePoint<=65126||65128<=codePoint&&codePoint<=65131||110592<=codePoint&&codePoint<=110593||127488<=codePoint&&codePoint<=127490||127504<=codePoint&&codePoint<=127546||127552<=codePoint&&codePoint<=127560||127568<=codePoint&&codePoint<=127569||131072<=codePoint&&codePoint<=194367||177984<=codePoint&&codePoint<=196605||196608<=codePoint&&codePoint<=262141?"W":32<=codePoint&&codePoint<=126||162<=codePoint&&codePoint<=163||165<=codePoint&&codePoint<=166||codePoint==172||codePoint==175||10214<=codePoint&&codePoint<=10221||10629<=codePoint&&codePoint<=10630?"Na":codePoint==161||codePoint==164||167<=codePoint&&codePoint<=168||codePoint==170||173<=codePoint&&codePoint<=174||176<=codePoint&&codePoint<=180||182<=codePoint&&codePoint<=186||188<=codePoint&&codePoint<=191||codePoint==198||codePoint==208||215<=codePoint&&codePoint<=216||222<=codePoint&&codePoint<=225||codePoint==230||232<=codePoint&&codePoint<=234||236<=codePoint&&codePoint<=237||codePoint==240||242<=codePoint&&codePoint<=243||247<=codePoint&&codePoint<=250||codePoint==252||codePoint==254||codePoint==257||codePoint==273||codePoint==275||codePoint==283||294<=codePoint&&codePoint<=295||codePoint==299||305<=codePoint&&codePoint<=307||codePoint==312||319<=codePoint&&codePoint<=322||codePoint==324||328<=codePoint&&codePoint<=331||codePoint==333||338<=codePoint&&codePoint<=339||358<=codePoint&&codePoint<=359||codePoint==363||codePoint==462||codePoint==464||codePoint==466||codePoint==468||codePoint==470||codePoint==472||codePoint==474||codePoint==476||codePoint==593||codePoint==609||codePoint==708||codePoint==711||713<=codePoint&&codePoint<=715||codePoint==717||codePoint==720||728<=codePoint&&codePoint<=731||codePoint==733||codePoint==735||768<=codePoint&&codePoint<=879||913<=codePoint&&codePoint<=929||931<=codePoint&&codePoint<=937||945<=codePoint&&codePoint<=961||963<=codePoint&&codePoint<=969||codePoint==1025||1040<=codePoint&&codePoint<=1103||codePoint==1105||codePoint==8208||8211<=codePoint&&codePoint<=8214||8216<=codePoint&&codePoint<=8217||8220<=codePoint&&codePoint<=8221||8224<=codePoint&&codePoint<=8226||8228<=codePoint&&codePoint<=8231||codePoint==8240||8242<=codePoint&&codePoint<=8243||codePoint==8245||codePoint==8251||codePoint==8254||codePoint==8308||codePoint==8319||8321<=codePoint&&codePoint<=8324||codePoint==8364||codePoint==8451||codePoint==8453||codePoint==8457||codePoint==8467||codePoint==8470||8481<=codePoint&&codePoint<=8482||codePoint==8486||codePoint==8491||8531<=codePoint&&codePoint<=8532||8539<=codePoint&&codePoint<=8542||8544<=codePoint&&codePoint<=8555||8560<=codePoint&&codePoint<=8569||codePoint==8585||8592<=codePoint&&codePoint<=8601||8632<=codePoint&&codePoint<=8633||codePoint==8658||codePoint==8660||codePoint==8679||codePoint==8704||8706<=codePoint&&codePoint<=8707||8711<=codePoint&&codePoint<=8712||codePoint==8715||codePoint==8719||codePoint==8721||codePoint==8725||codePoint==8730||8733<=codePoint&&codePoint<=8736||codePoint==8739||codePoint==8741||8743<=codePoint&&codePoint<=8748||codePoint==8750||8756<=codePoint&&codePoint<=8759||8764<=codePoint&&codePoint<=8765||codePoint==8776||codePoint==8780||codePoint==8786||8800<=codePoint&&codePoint<=8801||8804<=codePoint&&codePoint<=8807||8810<=codePoint&&codePoint<=8811||8814<=codePoint&&codePoint<=8815||8834<=codePoint&&codePoint<=8835||8838<=codePoint&&codePoint<=8839||codePoint==8853||codePoint==8857||codePoint==8869||codePoint==8895||codePoint==8978||9312<=codePoint&&codePoint<=9449||9451<=codePoint&&codePoint<=9547||9552<=codePoint&&codePoint<=9587||9600<=codePoint&&codePoint<=9615||9618<=codePoint&&codePoint<=9621||9632<=codePoint&&codePoint<=9633||9635<=codePoint&&codePoint<=9641||9650<=codePoint&&codePoint<=9651||9654<=codePoint&&codePoint<=9655||9660<=codePoint&&codePoint<=9661||9664<=codePoint&&codePoint<=9665||9670<=codePoint&&codePoint<=9672||codePoint==9675||9678<=codePoint&&codePoint<=9681||9698<=codePoint&&codePoint<=9701||codePoint==9711||9733<=codePoint&&codePoint<=9734||codePoint==9737||9742<=codePoint&&codePoint<=9743||9748<=codePoint&&codePoint<=9749||codePoint==9756||codePoint==9758||codePoint==9792||codePoint==9794||9824<=codePoint&&codePoint<=9825||9827<=codePoint&&codePoint<=9829||9831<=codePoint&&codePoint<=9834||9836<=codePoint&&codePoint<=9837||codePoint==9839||9886<=codePoint&&codePoint<=9887||9918<=codePoint&&codePoint<=9919||9924<=codePoint&&codePoint<=9933||9935<=codePoint&&codePoint<=9953||codePoint==9955||9960<=codePoint&&codePoint<=9983||codePoint==10045||codePoint==10071||10102<=codePoint&&codePoint<=10111||11093<=codePoint&&codePoint<=11097||12872<=codePoint&&codePoint<=12879||57344<=codePoint&&codePoint<=63743||65024<=codePoint&&codePoint<=65039||codePoint==65533||127232<=codePoint&&codePoint<=127242||127248<=codePoint&&codePoint<=127277||127280<=codePoint&&codePoint<=127337||127344<=codePoint&&codePoint<=127386||917760<=codePoint&&codePoint<=917999||983040<=codePoint&&codePoint<=1048573||1048576<=codePoint&&codePoint<=1114109?"A":"N"};eaw.characterLength=function(character){var code=this.eastAsianWidth(character);return code=="F"||code=="W"||code=="A"?2:1};function stringToArray(string){return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}eaw.length=function(string){for(var characters=stringToArray(string),len=0,i=0;i<characters.length;i++)len=len+this.characterLength(characters[i]);return len};eaw.slice=function(text,start,end){textLen=eaw.length(text),start=start||0,end=end||1,start<0&&(start=textLen+start),end<0&&(end=textLen+end);for(var result="",eawLen=0,chars=stringToArray(text),i=0;i<chars.length;i++){var char=chars[i],charLen=eaw.length(char);if(eawLen>=start-(charLen==2?1:0))if(eawLen+charLen<=end)result+=char;else break;eawLen+=charLen;}return result};}});var require_emoji_regex=__commonJS({"../../node_modules/emoji-regex/index.js"(exports,module){module.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\u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uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uD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\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};}});var require_boxes=__commonJS({"../../node_modules/cli-boxes/boxes.json"(exports,module){module.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}};}});var require_cli_boxes=__commonJS({"../../node_modules/cli-boxes/index.js"(exports,module){var cliBoxes2=require_boxes();module.exports=cliBoxes2;module.exports.default=cliBoxes2;}});var require_ansi_regex=__commonJS({"../../node_modules/string-width/node_modules/ansi-regex/index.js"(exports,module){module.exports=({onlyFirst=!1}={})=>{let pattern=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(pattern,onlyFirst?void 0:"g")};}});var require_strip_ansi=__commonJS({"../../node_modules/string-width/node_modules/strip-ansi/index.js"(exports,module){var ansiRegex3=require_ansi_regex();module.exports=string=>typeof string=="string"?string.replace(ansiRegex3(),""):string;}});var require_is_fullwidth_code_point=__commonJS({"../../node_modules/is-fullwidth-code-point/index.js"(exports,module){var isFullwidthCodePoint=codePoint=>Number.isNaN(codePoint)?!1:codePoint>=4352&&(codePoint<=4447||codePoint===9001||codePoint===9002||11904<=codePoint&&codePoint<=12871&&codePoint!==12351||12880<=codePoint&&codePoint<=19903||19968<=codePoint&&codePoint<=42182||43360<=codePoint&&codePoint<=43388||44032<=codePoint&&codePoint<=55203||63744<=codePoint&&codePoint<=64255||65040<=codePoint&&codePoint<=65049||65072<=codePoint&&codePoint<=65131||65281<=codePoint&&codePoint<=65376||65504<=codePoint&&codePoint<=65510||110592<=codePoint&&codePoint<=110593||127488<=codePoint&&codePoint<=127569||131072<=codePoint&&codePoint<=262141);module.exports=isFullwidthCodePoint;module.exports.default=isFullwidthCodePoint;}});var require_emoji_regex2=__commonJS({"../../node_modules/string-width/node_modules/emoji-regex/index.js"(exports,module){module.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83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1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};}});var require_string_width=__commonJS({"../../node_modules/string-width/index.js"(exports,module){var stripAnsi2=require_strip_ansi(),isFullwidthCodePoint=require_is_fullwidth_code_point(),emojiRegex4=require_emoji_regex2(),stringWidth4=string=>{if(typeof string!="string"||string.length===0||(string=stripAnsi2(string),string.length===0))return 0;string=string.replace(emojiRegex4()," ");let width=0;for(let i=0;i<string.length;i++){let code=string.codePointAt(i);code<=31||code>=127&&code<=159||code>=768&&code<=879||(code>65535&&i++,width+=isFullwidthCodePoint(code)?2:1);}return width};module.exports=stringWidth4;module.exports.default=stringWidth4;}});var require_ansi_align=__commonJS({"../../node_modules/ansi-align/index.js"(exports,module){var stringWidth4=require_string_width();function ansiAlign2(text,opts){if(!text)return text;opts=opts||{};let align=opts.align||"center";if(align==="left")return text;let split=opts.split||`
|
|
36
|
-
|
|
36
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
37
|
+
const __dirname = dirname(__filename);
|
|
38
|
+
ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
39
|
+
var require_eastasianwidth=__commonJS({"../../node_modules/eastasianwidth/eastasianwidth.js"(exports,module){var eaw={};typeof module>"u"?window.eastasianwidth=eaw:module.exports=eaw;eaw.eastAsianWidth=function(character){var x=character.charCodeAt(0),y=character.length==2?character.charCodeAt(1):0,codePoint=x;return 55296<=x&&x<=56319&&56320<=y&&y<=57343&&(x&=1023,y&=1023,codePoint=x<<10|y,codePoint+=65536),codePoint==12288||65281<=codePoint&&codePoint<=65376||65504<=codePoint&&codePoint<=65510?"F":codePoint==8361||65377<=codePoint&&codePoint<=65470||65474<=codePoint&&codePoint<=65479||65482<=codePoint&&codePoint<=65487||65490<=codePoint&&codePoint<=65495||65498<=codePoint&&codePoint<=65500||65512<=codePoint&&codePoint<=65518?"H":4352<=codePoint&&codePoint<=4447||4515<=codePoint&&codePoint<=4519||4602<=codePoint&&codePoint<=4607||9001<=codePoint&&codePoint<=9002||11904<=codePoint&&codePoint<=11929||11931<=codePoint&&codePoint<=12019||12032<=codePoint&&codePoint<=12245||12272<=codePoint&&codePoint<=12283||12289<=codePoint&&codePoint<=12350||12353<=codePoint&&codePoint<=12438||12441<=codePoint&&codePoint<=12543||12549<=codePoint&&codePoint<=12589||12593<=codePoint&&codePoint<=12686||12688<=codePoint&&codePoint<=12730||12736<=codePoint&&codePoint<=12771||12784<=codePoint&&codePoint<=12830||12832<=codePoint&&codePoint<=12871||12880<=codePoint&&codePoint<=13054||13056<=codePoint&&codePoint<=19903||19968<=codePoint&&codePoint<=42124||42128<=codePoint&&codePoint<=42182||43360<=codePoint&&codePoint<=43388||44032<=codePoint&&codePoint<=55203||55216<=codePoint&&codePoint<=55238||55243<=codePoint&&codePoint<=55291||63744<=codePoint&&codePoint<=64255||65040<=codePoint&&codePoint<=65049||65072<=codePoint&&codePoint<=65106||65108<=codePoint&&codePoint<=65126||65128<=codePoint&&codePoint<=65131||110592<=codePoint&&codePoint<=110593||127488<=codePoint&&codePoint<=127490||127504<=codePoint&&codePoint<=127546||127552<=codePoint&&codePoint<=127560||127568<=codePoint&&codePoint<=127569||131072<=codePoint&&codePoint<=194367||177984<=codePoint&&codePoint<=196605||196608<=codePoint&&codePoint<=262141?"W":32<=codePoint&&codePoint<=126||162<=codePoint&&codePoint<=163||165<=codePoint&&codePoint<=166||codePoint==172||codePoint==175||10214<=codePoint&&codePoint<=10221||10629<=codePoint&&codePoint<=10630?"Na":codePoint==161||codePoint==164||167<=codePoint&&codePoint<=168||codePoint==170||173<=codePoint&&codePoint<=174||176<=codePoint&&codePoint<=180||182<=codePoint&&codePoint<=186||188<=codePoint&&codePoint<=191||codePoint==198||codePoint==208||215<=codePoint&&codePoint<=216||222<=codePoint&&codePoint<=225||codePoint==230||232<=codePoint&&codePoint<=234||236<=codePoint&&codePoint<=237||codePoint==240||242<=codePoint&&codePoint<=243||247<=codePoint&&codePoint<=250||codePoint==252||codePoint==254||codePoint==257||codePoint==273||codePoint==275||codePoint==283||294<=codePoint&&codePoint<=295||codePoint==299||305<=codePoint&&codePoint<=307||codePoint==312||319<=codePoint&&codePoint<=322||codePoint==324||328<=codePoint&&codePoint<=331||codePoint==333||338<=codePoint&&codePoint<=339||358<=codePoint&&codePoint<=359||codePoint==363||codePoint==462||codePoint==464||codePoint==466||codePoint==468||codePoint==470||codePoint==472||codePoint==474||codePoint==476||codePoint==593||codePoint==609||codePoint==708||codePoint==711||713<=codePoint&&codePoint<=715||codePoint==717||codePoint==720||728<=codePoint&&codePoint<=731||codePoint==733||codePoint==735||768<=codePoint&&codePoint<=879||913<=codePoint&&codePoint<=929||931<=codePoint&&codePoint<=937||945<=codePoint&&codePoint<=961||963<=codePoint&&codePoint<=969||codePoint==1025||1040<=codePoint&&codePoint<=1103||codePoint==1105||codePoint==8208||8211<=codePoint&&codePoint<=8214||8216<=codePoint&&codePoint<=8217||8220<=codePoint&&codePoint<=8221||8224<=codePoint&&codePoint<=8226||8228<=codePoint&&codePoint<=8231||codePoint==8240||8242<=codePoint&&codePoint<=8243||codePoint==8245||codePoint==8251||codePoint==8254||codePoint==8308||codePoint==8319||8321<=codePoint&&codePoint<=8324||codePoint==8364||codePoint==8451||codePoint==8453||codePoint==8457||codePoint==8467||codePoint==8470||8481<=codePoint&&codePoint<=8482||codePoint==8486||codePoint==8491||8531<=codePoint&&codePoint<=8532||8539<=codePoint&&codePoint<=8542||8544<=codePoint&&codePoint<=8555||8560<=codePoint&&codePoint<=8569||codePoint==8585||8592<=codePoint&&codePoint<=8601||8632<=codePoint&&codePoint<=8633||codePoint==8658||codePoint==8660||codePoint==8679||codePoint==8704||8706<=codePoint&&codePoint<=8707||8711<=codePoint&&codePoint<=8712||codePoint==8715||codePoint==8719||codePoint==8721||codePoint==8725||codePoint==8730||8733<=codePoint&&codePoint<=8736||codePoint==8739||codePoint==8741||8743<=codePoint&&codePoint<=8748||codePoint==8750||8756<=codePoint&&codePoint<=8759||8764<=codePoint&&codePoint<=8765||codePoint==8776||codePoint==8780||codePoint==8786||8800<=codePoint&&codePoint<=8801||8804<=codePoint&&codePoint<=8807||8810<=codePoint&&codePoint<=8811||8814<=codePoint&&codePoint<=8815||8834<=codePoint&&codePoint<=8835||8838<=codePoint&&codePoint<=8839||codePoint==8853||codePoint==8857||codePoint==8869||codePoint==8895||codePoint==8978||9312<=codePoint&&codePoint<=9449||9451<=codePoint&&codePoint<=9547||9552<=codePoint&&codePoint<=9587||9600<=codePoint&&codePoint<=9615||9618<=codePoint&&codePoint<=9621||9632<=codePoint&&codePoint<=9633||9635<=codePoint&&codePoint<=9641||9650<=codePoint&&codePoint<=9651||9654<=codePoint&&codePoint<=9655||9660<=codePoint&&codePoint<=9661||9664<=codePoint&&codePoint<=9665||9670<=codePoint&&codePoint<=9672||codePoint==9675||9678<=codePoint&&codePoint<=9681||9698<=codePoint&&codePoint<=9701||codePoint==9711||9733<=codePoint&&codePoint<=9734||codePoint==9737||9742<=codePoint&&codePoint<=9743||9748<=codePoint&&codePoint<=9749||codePoint==9756||codePoint==9758||codePoint==9792||codePoint==9794||9824<=codePoint&&codePoint<=9825||9827<=codePoint&&codePoint<=9829||9831<=codePoint&&codePoint<=9834||9836<=codePoint&&codePoint<=9837||codePoint==9839||9886<=codePoint&&codePoint<=9887||9918<=codePoint&&codePoint<=9919||9924<=codePoint&&codePoint<=9933||9935<=codePoint&&codePoint<=9953||codePoint==9955||9960<=codePoint&&codePoint<=9983||codePoint==10045||codePoint==10071||10102<=codePoint&&codePoint<=10111||11093<=codePoint&&codePoint<=11097||12872<=codePoint&&codePoint<=12879||57344<=codePoint&&codePoint<=63743||65024<=codePoint&&codePoint<=65039||codePoint==65533||127232<=codePoint&&codePoint<=127242||127248<=codePoint&&codePoint<=127277||127280<=codePoint&&codePoint<=127337||127344<=codePoint&&codePoint<=127386||917760<=codePoint&&codePoint<=917999||983040<=codePoint&&codePoint<=1048573||1048576<=codePoint&&codePoint<=1114109?"A":"N"};eaw.characterLength=function(character){var code=this.eastAsianWidth(character);return code=="F"||code=="W"||code=="A"?2:1};function stringToArray(string){return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}eaw.length=function(string){for(var characters=stringToArray(string),len=0,i=0;i<characters.length;i++)len=len+this.characterLength(characters[i]);return len};eaw.slice=function(text,start,end){textLen=eaw.length(text),start=start||0,end=end||1,start<0&&(start=textLen+start),end<0&&(end=textLen+end);for(var result="",eawLen=0,chars=stringToArray(text),i=0;i<chars.length;i++){var char=chars[i],charLen=eaw.length(char);if(eawLen>=start-(charLen==2?1:0))if(eawLen+charLen<=end)result+=char;else break;eawLen+=charLen;}return result};}});var require_emoji_regex=__commonJS({"../../node_modules/emoji-regex/index.js"(exports,module){module.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2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EB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC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D0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1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uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};}});var require_boxes=__commonJS({"../../node_modules/cli-boxes/boxes.json"(exports,module){module.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}};}});var require_cli_boxes=__commonJS({"../../node_modules/cli-boxes/index.js"(exports,module){var cliBoxes2=require_boxes();module.exports=cliBoxes2;module.exports.default=cliBoxes2;}});var require_ansi_regex=__commonJS({"../../node_modules/string-width/node_modules/ansi-regex/index.js"(exports,module){module.exports=({onlyFirst=!1}={})=>{let pattern=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(pattern,onlyFirst?void 0:"g")};}});var require_strip_ansi=__commonJS({"../../node_modules/string-width/node_modules/strip-ansi/index.js"(exports,module){var ansiRegex3=require_ansi_regex();module.exports=string=>typeof string=="string"?string.replace(ansiRegex3(),""):string;}});var require_is_fullwidth_code_point=__commonJS({"../../node_modules/string-width/node_modules/is-fullwidth-code-point/index.js"(exports,module){var isFullwidthCodePoint=codePoint=>Number.isNaN(codePoint)?!1:codePoint>=4352&&(codePoint<=4447||codePoint===9001||codePoint===9002||11904<=codePoint&&codePoint<=12871&&codePoint!==12351||12880<=codePoint&&codePoint<=19903||19968<=codePoint&&codePoint<=42182||43360<=codePoint&&codePoint<=43388||44032<=codePoint&&codePoint<=55203||63744<=codePoint&&codePoint<=64255||65040<=codePoint&&codePoint<=65049||65072<=codePoint&&codePoint<=65131||65281<=codePoint&&codePoint<=65376||65504<=codePoint&&codePoint<=65510||110592<=codePoint&&codePoint<=110593||127488<=codePoint&&codePoint<=127569||131072<=codePoint&&codePoint<=262141);module.exports=isFullwidthCodePoint;module.exports.default=isFullwidthCodePoint;}});var require_emoji_regex2=__commonJS({"../../node_modules/string-width/node_modules/emoji-regex/index.js"(exports,module){module.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD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uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};}});var require_string_width=__commonJS({"../../node_modules/string-width/index.js"(exports,module){var stripAnsi2=require_strip_ansi(),isFullwidthCodePoint=require_is_fullwidth_code_point(),emojiRegex3=require_emoji_regex2(),stringWidth3=string=>{if(typeof string!="string"||string.length===0||(string=stripAnsi2(string),string.length===0))return 0;string=string.replace(emojiRegex3()," ");let width=0;for(let i=0;i<string.length;i++){let code=string.codePointAt(i);code<=31||code>=127&&code<=159||code>=768&&code<=879||(code>65535&&i++,width+=isFullwidthCodePoint(code)?2:1);}return width};module.exports=stringWidth3;module.exports.default=stringWidth3;}});var require_ansi_align=__commonJS({"../../node_modules/ansi-align/index.js"(exports,module){var stringWidth3=require_string_width();function ansiAlign2(text,opts){if(!text)return text;opts=opts||{};let align=opts.align||"center";if(align==="left")return text;let split=opts.split||`
|
|
40
|
+
`,pad=opts.pad||" ",widthDiffFn=align!=="right"?halfDiff:fullDiff,returnString=!1;Array.isArray(text)||(returnString=!0,text=String(text).split(split));let width,maxWidth=0;return text=text.map(function(str){return str=String(str),width=stringWidth3(str),maxWidth=Math.max(width,maxWidth),{str,width}}).map(function(obj){return new Array(widthDiffFn(maxWidth,obj.width)+1).join(pad)+obj.str}),returnString?text.join(split):text}ansiAlign2.left=function(text){return ansiAlign2(text,{align:"left"})};ansiAlign2.center=function(text){return ansiAlign2(text,{align:"center"})};ansiAlign2.right=function(text){return ansiAlign2(text,{align:"right"})};module.exports=ansiAlign2;function halfDiff(maxWidth,curWidth){return Math.floor((maxWidth-curWidth)/2)}function fullDiff(maxWidth,curWidth){return maxWidth-curWidth}}});var import_picocolors41=__toESM(require_picocolors(),1);var defaultRequireWrapperName="getAbsolutePath";function doesVariableOrFunctionDeclarationExist(node,name){return types.isVariableDeclaration(node)&&node.declarations.length===1&&types.isVariableDeclarator(node.declarations[0])&&types.isIdentifier(node.declarations[0].id)&&node.declarations[0].id?.name===name||types.isFunctionDeclaration(node)&&types.isIdentifier(node.id)&&node.id.name===name}function getReferenceToRequireWrapper(config,value){return types.callExpression(types.identifier(getRequireWrapperName(config)??defaultRequireWrapperName),[types.stringLiteral(value)])}function getRequireWrapperName(config){let declarationName=config.getBodyDeclarations().flatMap(node=>doesVariableOrFunctionDeclarationExist(node,"wrapForPnp")?["wrapForPnp"]:doesVariableOrFunctionDeclarationExist(node,defaultRequireWrapperName)?[defaultRequireWrapperName]:[]);return declarationName.length?declarationName[0]:null}function isRequireWrapperNecessary(node,cb=()=>{}){if(types.isStringLiteral(node))return cb(node),!0;if(types.isObjectExpression(node)){let nameProperty=node.properties.find(property=>types.isObjectProperty(property)&&types.isIdentifier(property.key)&&property.key.name==="name");if(nameProperty&&types.isStringLiteral(nameProperty.value))return cb(nameProperty),!0}return types.isArrayExpression(node)&&node.elements.some(element=>element&&isRequireWrapperNecessary(element))?(cb(node),!0):!1}function getFieldsForRequireWrapper(config){let frameworkNode=config.getFieldNode(["framework"]),builderNode=config.getFieldNode(["core","builder"]),rendererNode=config.getFieldNode(["core","renderer"]),addons=config.getFieldNode(["addons"]);return [...frameworkNode?[frameworkNode]:[],...builderNode?[builderNode]:[],...rendererNode?[rendererNode]:[],...addons&&types.isArrayExpression(addons)?[addons]:[]]}function getRequireWrapperAsCallExpression(isConfigTypescript){let functionDeclaration={...types.functionDeclaration(types.identifier(defaultRequireWrapperName),[{...types.identifier("value"),...isConfigTypescript?{typeAnnotation:types.tsTypeAnnotation(types.tSStringKeyword())}:{}}],types.blockStatement([types.returnStatement(types.callExpression(types.identifier("dirname"),[types.callExpression(types.memberExpression(types.identifier("require"),types.identifier("resolve")),[types.callExpression(types.identifier("join"),[types.identifier("value"),types.stringLiteral("package.json")])])]))])),...isConfigTypescript?{returnType:types.tSTypeAnnotation(types.tsAnyKeyword())}:{}};return types.addComment(functionDeclaration,"leading",`*
|
|
37
41
|
* This function is used to resolve the absolute path of a package.
|
|
38
42
|
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
|
|
39
43
|
`),functionDeclaration}function wrapValueWithRequireWrapper(config,node){isRequireWrapperNecessary(node,n=>{if(types.isStringLiteral(n)){let wrapperNode=getReferenceToRequireWrapper(config,n.value);Object.keys(n).forEach(k=>{delete n[k];}),Object.keys(wrapperNode).forEach(k=>{n[k]=wrapperNode[k];});}types.isObjectProperty(n)&&types.isStringLiteral(n.value)&&(n.value=getReferenceToRequireWrapper(config,n.value.value)),types.isArrayExpression(n)&&n.elements.forEach((element,index,elements)=>{types.isStringLiteral(element)&&(elements[index]=getReferenceToRequireWrapper(config,element.value));});});}var postinstallAddon=async(addonName,options)=>{try{let modulePath=__require.resolve(`${addonName}/postinstall`,{paths:[process.cwd()]}),postinstall=__require(modulePath);try{console.log(`Running postinstall script for ${addonName}`),await postinstall(options);}catch(e){console.error(`Error running postinstall script for ${addonName}`),console.error(e);}}catch{}};var getVersionSpecifier=addon=>{let groups=/^(@{0,1}[^@]+)(?:@(.+))?$/.exec(addon);return groups?[groups[1],groups[2]]:[addon,void 0]},requireMain=configDir=>{let absoluteConfigDir=isAbsolute(configDir)?configDir:join(process.cwd(),configDir),mainFile=join(absoluteConfigDir,"main");return serverRequire(mainFile)??{}},checkInstalled=(addonName,main)=>!!main.addons?.find(entry=>(typeof entry=="string"?entry:entry.name)?.endsWith(addonName)),isCoreAddon=addonName=>Object.hasOwn(versions,addonName);async function add(addon,{packageManager:pkgMgr,skipPostinstall,configDir:userSpecifiedConfigDir,yes},logger28=console){let[addonName,inputVersion]=getVersionSpecifier(addon),packageManager=JsPackageManagerFactory.getPackageManager({force:pkgMgr}),packageJson=await packageManager.retrievePackageJson(),{mainConfig,configDir:inferredConfigDir}=getStorybookInfo(packageJson,userSpecifiedConfigDir),configDir=userSpecifiedConfigDir||inferredConfigDir||".storybook";if(typeof configDir>"u")throw new Error(dedent`
|
|
40
44
|
Unable to find storybook config directory. Please specify your Storybook config directory with the --config-dir flag.
|
|
41
|
-
`);if(!mainConfig){logger28.error("Unable to find Storybook main.js config");return}let shouldAddToMain=!0;if(checkInstalled(addonName,requireMain(configDir))&&(shouldAddToMain=!1,!yes)){logger28.log(`The Storybook addon "${addonName}" is already present in ${mainConfig}.`);let{shouldForceInstall}=await
|
|
45
|
+
`);if(!mainConfig){logger28.error("Unable to find Storybook main.js config");return}let shouldAddToMain=!0;if(checkInstalled(addonName,requireMain(configDir))&&(shouldAddToMain=!1,!yes)){logger28.log(`The Storybook addon "${addonName}" is already present in ${mainConfig}.`);let{shouldForceInstall}=await prompts7({type:"confirm",name:"shouldForceInstall",message:"Do you wish to install it again?"});if(!shouldForceInstall)return}let main=await readConfig(mainConfig);logger28.log(`Verifying ${addonName}`);let storybookVersion=await getCoercedStorybookVersion(packageManager),version=inputVersion;!version&&isCoreAddon(addonName)&&storybookVersion&&(version=storybookVersion),version||(version=await packageManager.latestVersion(addonName)),isCoreAddon(addonName)&&version!==storybookVersion&&logger28.warn(`The version of ${addonName} (${version}) you are installing is not the same as the version of Storybook you are using (${storybookVersion}). This may lead to unexpected behavior.`);let addonWithVersion=isValidVersion(version)?`${addonName}@^${version}`:`${addonName}@${version}`;if(logger28.log(`Installing ${addonWithVersion}`),await packageManager.addDependencies({installAsDevDependencies:!0},[addonWithVersion]),shouldAddToMain){if(logger28.log(`Adding '${addon}' to the "addons" field in ${mainConfig}`),main.getFieldNode(["addons"])&&getRequireWrapperName(main)!==null){let addonNode=main.valueToNode(addonName);main.appendNodeToArray(["addons"],addonNode),wrapValueWithRequireWrapper(main,addonNode);}else main.appendValueToArray(["addons"],addonName);await writeConfig(main);}!skipPostinstall&&isCoreAddon(addonName)&&await postinstallAddon(addonName,{packageManager:packageManager.type,configDir,yes});}function isValidVersion(version){return semver.valid(version)||version.match(/^\d+$/)}function ansiRegex({onlyFirst=!1}={}){let pattern=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(pattern,onlyFirst?void 0:"g")}var regex=ansiRegex();function stripAnsi(string){if(typeof string!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);return string.replace(regex,"")}var import_eastasianwidth=__toESM(require_eastasianwidth(),1),import_emoji_regex=__toESM(require_emoji_regex(),1);function stringWidth(string,options={}){if(typeof string!="string"||string.length===0||(options={ambiguousIsNarrow:!0,...options},string=stripAnsi(string),string.length===0))return 0;string=string.replace((0, import_emoji_regex.default)()," ");let ambiguousCharacterWidth=options.ambiguousIsNarrow?1:2,width=0;for(let character of string){let codePoint=character.codePointAt(0);if(codePoint<=31||codePoint>=127&&codePoint<=159||codePoint>=768&&codePoint<=879)continue;switch(import_eastasianwidth.default.eastAsianWidth(character)){case"F":case"W":width+=2;break;case"A":width+=ambiguousCharacterWidth;break;default:width+=1;}}return width}var wrapAnsi16=(offset=0)=>code=>`\x1B[${code+offset}m`,wrapAnsi256=(offset=0)=>code=>`\x1B[${38+offset};5;${code}m`,wrapAnsi16m=(offset=0)=>(red,green,blue)=>`\x1B[${38+offset};2;${red};${green};${blue}m`,styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(styles.modifier);var foregroundColorNames=Object.keys(styles.color),backgroundColorNames=Object.keys(styles.bgColor);[...foregroundColorNames,...backgroundColorNames];function assembleStyles(){let codes=new Map;for(let[groupName,group]of Object.entries(styles)){for(let[styleName,style]of Object.entries(group))styles[styleName]={open:`\x1B[${style[0]}m`,close:`\x1B[${style[1]}m`},group[styleName]=styles[styleName],codes.set(style[0],style[1]);Object.defineProperty(styles,groupName,{value:group,enumerable:!1});}return Object.defineProperty(styles,"codes",{value:codes,enumerable:!1}),styles.color.close="\x1B[39m",styles.bgColor.close="\x1B[49m",styles.color.ansi=wrapAnsi16(),styles.color.ansi256=wrapAnsi256(),styles.color.ansi16m=wrapAnsi16m(),styles.bgColor.ansi=wrapAnsi16(10),styles.bgColor.ansi256=wrapAnsi256(10),styles.bgColor.ansi16m=wrapAnsi16m(10),Object.defineProperties(styles,{rgbToAnsi256:{value(red,green,blue){return red===green&&green===blue?red<8?16:red>248?231:Math.round((red-8)/247*24)+232:16+36*Math.round(red/255*5)+6*Math.round(green/255*5)+Math.round(blue/255*5)},enumerable:!1},hexToRgb:{value(hex){let matches=/[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));if(!matches)return [0,0,0];let[colorString]=matches;colorString.length===3&&(colorString=[...colorString].map(character=>character+character).join(""));let integer=Number.parseInt(colorString,16);return [integer>>16&255,integer>>8&255,integer&255]},enumerable:!1},hexToAnsi256:{value:hex=>styles.rgbToAnsi256(...styles.hexToRgb(hex)),enumerable:!1},ansi256ToAnsi:{value(code){if(code<8)return 30+code;if(code<16)return 90+(code-8);let red,green,blue;if(code>=232)red=((code-232)*10+8)/255,green=red,blue=red;else {code-=16;let remainder=code%36;red=Math.floor(code/36)/5,green=Math.floor(remainder/6)/5,blue=remainder%6/5;}let value=Math.max(red,green,blue)*2;if(value===0)return 30;let result=30+(Math.round(blue)<<2|Math.round(green)<<1|Math.round(red));return value===2&&(result+=60),result},enumerable:!1},rgbToAnsi:{value:(red,green,blue)=>styles.ansi256ToAnsi(styles.rgbToAnsi256(red,green,blue)),enumerable:!1},hexToAnsi:{value:hex=>styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),enumerable:!1}}),styles}var ansiStyles=assembleStyles(),ansi_styles_default=ansiStyles;function hasFlag(flag,argv=globalThis.Deno?globalThis.Deno.args:process3.argv){let prefix=flag.startsWith("-")?"":flag.length===1?"-":"--",position=argv.indexOf(prefix+flag),terminatorPosition=argv.indexOf("--");return position!==-1&&(terminatorPosition===-1||position<terminatorPosition)}var{env}=process3,flagForceColor;hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")?flagForceColor=0:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(flagForceColor=1);function envForceColor(){if("FORCE_COLOR"in env)return env.FORCE_COLOR==="true"?1:env.FORCE_COLOR==="false"?0:env.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(env.FORCE_COLOR,10),3)}function translateLevel(level){return level===0?!1:{level,hasBasic:!0,has256:level>=2,has16m:level>=3}}function _supportsColor(haveStream,{streamIsTTY,sniffFlags=!0}={}){let noFlagForceColor=envForceColor();noFlagForceColor!==void 0&&(flagForceColor=noFlagForceColor);let forceColor=sniffFlags?flagForceColor:noFlagForceColor;if(forceColor===0)return 0;if(sniffFlags){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2}if("TF_BUILD"in env&&"AGENT_NAME"in env)return 1;if(haveStream&&!streamIsTTY&&forceColor===void 0)return 0;let min=forceColor||0;if(env.TERM==="dumb")return min;if(process3.platform==="win32"){let osRelease=os.release().split(".");return Number(osRelease[0])>=10&&Number(osRelease[2])>=10586?Number(osRelease[2])>=14931?3:2:1}if("CI"in env)return "GITHUB_ACTIONS"in env||"GITEA_ACTIONS"in env?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(sign=>sign in env)||env.CI_NAME==="codeship"?1:min;if("TEAMCITY_VERSION"in env)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0;if(env.COLORTERM==="truecolor"||env.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in env){let version=Number.parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(env.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)||"COLORTERM"in env?1:min}function createSupportsColor(stream,options={}){let level=_supportsColor(stream,{streamIsTTY:stream&&stream.isTTY,...options});return translateLevel(level)}var supportsColor={stdout:createSupportsColor({isTTY:tty.isatty(1)}),stderr:createSupportsColor({isTTY:tty.isatty(2)})},supports_color_default=supportsColor;function stringReplaceAll(string,substring,replacer){let index=string.indexOf(substring);if(index===-1)return string;let substringLength=substring.length,endIndex=0,returnValue="";do returnValue+=string.slice(endIndex,index)+substring+replacer,endIndex=index+substringLength,index=string.indexOf(substring,endIndex);while(index!==-1);return returnValue+=string.slice(endIndex),returnValue}function stringEncaseCRLFWithFirstIndex(string,prefix,postfix,index){let endIndex=0,returnValue="";do{let gotCR=string[index-1]==="\r";returnValue+=string.slice(endIndex,gotCR?index-1:index)+prefix+(gotCR?`\r
|
|
42
46
|
`:`
|
|
43
47
|
`)+postfix,endIndex=index+1,index=string.indexOf(`
|
|
44
48
|
`,endIndex);}while(index!==-1);return returnValue+=string.slice(endIndex),returnValue}var{stdout:stdoutColor,stderr:stderrColor}=supports_color_default,GENERATOR=Symbol("GENERATOR"),STYLER=Symbol("STYLER"),IS_EMPTY=Symbol("IS_EMPTY"),levelMapping=["ansi","ansi","ansi256","ansi16m"],styles2=Object.create(null),applyOptions=(object,options={})=>{if(options.level&&!(Number.isInteger(options.level)&&options.level>=0&&options.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let colorLevel=stdoutColor?stdoutColor.level:0;object.level=options.level===void 0?colorLevel:options.level;};var chalkFactory=options=>{let chalk2=(...strings)=>strings.join(" ");return applyOptions(chalk2,options),Object.setPrototypeOf(chalk2,createChalk.prototype),chalk2};function createChalk(options){return chalkFactory(options)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(let[styleName,style]of Object.entries(ansi_styles_default))styles2[styleName]={get(){let builder=createBuilder(this,createStyler(style.open,style.close,this[STYLER]),this[IS_EMPTY]);return Object.defineProperty(this,styleName,{value:builder}),builder}};styles2.visible={get(){let builder=createBuilder(this,this[STYLER],!0);return Object.defineProperty(this,"visible",{value:builder}),builder}};var getModelAnsi=(model,level,type,...arguments_)=>model==="rgb"?level==="ansi16m"?ansi_styles_default[type].ansi16m(...arguments_):level==="ansi256"?ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)):ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_)):model==="hex"?getModelAnsi("rgb",level,type,...ansi_styles_default.hexToRgb(...arguments_)):ansi_styles_default[type][model](...arguments_),usedModels=["rgb","hex","ansi256"];for(let model of usedModels){styles2[model]={get(){let{level}=this;return function(...arguments_){let styler=createStyler(getModelAnsi(model,levelMapping[level],"color",...arguments_),ansi_styles_default.color.close,this[STYLER]);return createBuilder(this,styler,this[IS_EMPTY])}}};let bgModel="bg"+model[0].toUpperCase()+model.slice(1);styles2[bgModel]={get(){let{level}=this;return function(...arguments_){let styler=createStyler(getModelAnsi(model,levelMapping[level],"bgColor",...arguments_),ansi_styles_default.bgColor.close,this[STYLER]);return createBuilder(this,styler,this[IS_EMPTY])}}};}var proto=Object.defineProperties(()=>{},{...styles2,level:{enumerable:!0,get(){return this[GENERATOR].level},set(level){this[GENERATOR].level=level;}}}),createStyler=(open,close,parent)=>{let openAll,closeAll;return parent===void 0?(openAll=open,closeAll=close):(openAll=parent.openAll+open,closeAll=close+parent.closeAll),{open,close,openAll,closeAll,parent}},createBuilder=(self,_styler,_isEmpty)=>{let builder=(...arguments_)=>applyStyle(builder,arguments_.length===1?""+arguments_[0]:arguments_.join(" "));return Object.setPrototypeOf(builder,proto),builder[GENERATOR]=self,builder[STYLER]=_styler,builder[IS_EMPTY]=_isEmpty,builder},applyStyle=(self,string)=>{if(self.level<=0||!string)return self[IS_EMPTY]?"":string;let styler=self[STYLER];if(styler===void 0)return string;let{openAll,closeAll}=styler;if(string.includes("\x1B"))for(;styler!==void 0;)string=stringReplaceAll(string,styler.close,styler.open),styler=styler.parent;let lfIndex=string.indexOf(`
|
|
45
|
-
`);return lfIndex!==-1&&(string=stringEncaseCRLFWithFirstIndex(string,closeAll,openAll,lfIndex)),openAll+string+closeAll};Object.defineProperties(createChalk.prototype,styles2);var chalk=createChalk();createChalk({level:stderrColor?stderrColor.level:0});var source_default=chalk;
|
|
46
|
-
`))lineWidth=Math.max(lineWidth,
|
|
49
|
+
`);return lfIndex!==-1&&(string=stringEncaseCRLFWithFirstIndex(string,closeAll,openAll,lfIndex)),openAll+string+closeAll};Object.defineProperties(createChalk.prototype,styles2);var chalk=createChalk();createChalk({level:stderrColor?stderrColor.level:0});var source_default=chalk;function widestLine(string){let lineWidth=0;for(let line of string.split(`
|
|
50
|
+
`))lineWidth=Math.max(lineWidth,stringWidth(line));return lineWidth}var import_cli_boxes=__toESM(require_cli_boxes(),1);var UPPERCASE=/[\p{Lu}]/u,LOWERCASE=/[\p{Ll}]/u,LEADING_CAPITAL=/^[\p{Lu}](?![\p{Lu}])/gu,IDENTIFIER=/([\p{Alpha}\p{N}_]|$)/u,SEPARATORS=/[_.\- ]+/,LEADING_SEPARATORS=new RegExp("^"+SEPARATORS.source),SEPARATORS_AND_IDENTIFIER=new RegExp(SEPARATORS.source+IDENTIFIER.source,"gu"),NUMBERS_AND_IDENTIFIER=new RegExp("\\d+"+IDENTIFIER.source,"gu"),preserveCamelCase=(string,toLowerCase,toUpperCase,preserveConsecutiveUppercase2)=>{let isLastCharLower=!1,isLastCharUpper=!1,isLastLastCharUpper=!1,isLastLastCharPreserved=!1;for(let index=0;index<string.length;index++){let character=string[index];isLastLastCharPreserved=index>2?string[index-3]==="-":!0,isLastCharLower&&UPPERCASE.test(character)?(string=string.slice(0,index)+"-"+string.slice(index),isLastCharLower=!1,isLastLastCharUpper=isLastCharUpper,isLastCharUpper=!0,index++):isLastCharUpper&&isLastLastCharUpper&&LOWERCASE.test(character)&&(!isLastLastCharPreserved||preserveConsecutiveUppercase2)?(string=string.slice(0,index-1)+"-"+string.slice(index-1),isLastLastCharUpper=isLastCharUpper,isLastCharUpper=!1,isLastCharLower=!0):(isLastCharLower=toLowerCase(character)===character&&toUpperCase(character)!==character,isLastLastCharUpper=isLastCharUpper,isLastCharUpper=toUpperCase(character)===character&&toLowerCase(character)!==character);}return string},preserveConsecutiveUppercase=(input,toLowerCase)=>(LEADING_CAPITAL.lastIndex=0,input.replace(LEADING_CAPITAL,m1=>toLowerCase(m1))),postProcess=(input,toUpperCase)=>(SEPARATORS_AND_IDENTIFIER.lastIndex=0,NUMBERS_AND_IDENTIFIER.lastIndex=0,input.replace(SEPARATORS_AND_IDENTIFIER,(_,identifier)=>toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER,m=>toUpperCase(m)));function camelCase(input,options){if(!(typeof input=="string"||Array.isArray(input)))throw new TypeError("Expected the input to be `string | string[]`");if(options={pascalCase:!1,preserveConsecutiveUppercase:!1,...options},Array.isArray(input)?input=input.map(x=>x.trim()).filter(x=>x.length).join("-"):input=input.trim(),input.length===0)return "";let toLowerCase=options.locale===!1?string=>string.toLowerCase():string=>string.toLocaleLowerCase(options.locale),toUpperCase=options.locale===!1?string=>string.toUpperCase():string=>string.toLocaleUpperCase(options.locale);return input.length===1?SEPARATORS.test(input)?"":options.pascalCase?toUpperCase(input):toLowerCase(input):(input!==toLowerCase(input)&&(input=preserveCamelCase(input,toLowerCase,toUpperCase,options.preserveConsecutiveUppercase)),input=input.replace(LEADING_SEPARATORS,""),input=options.preserveConsecutiveUppercase?preserveConsecutiveUppercase(input,toLowerCase):toLowerCase(input),options.pascalCase&&(input=toUpperCase(input.charAt(0))+input.slice(1)),postProcess(input,toUpperCase))}var import_ansi_align=__toESM(require_ansi_align(),1);var import_eastasianwidth2=__toESM(require_eastasianwidth(),1),import_emoji_regex2=__toESM(require_emoji_regex(),1);function stringWidth2(string,options={}){if(typeof string!="string"||string.length===0||(options={ambiguousIsNarrow:!0,...options},string=stripAnsi(string),string.length===0))return 0;string=string.replace((0, import_emoji_regex2.default)()," ");let ambiguousCharacterWidth=options.ambiguousIsNarrow?1:2,width=0;for(let character of string){let codePoint=character.codePointAt(0);if(codePoint<=31||codePoint>=127&&codePoint<=159||codePoint>=768&&codePoint<=879)continue;switch(import_eastasianwidth2.default.eastAsianWidth(character)){case"F":case"W":width+=2;break;case"A":width+=ambiguousCharacterWidth;break;default:width+=1;}}return width}var wrapAnsi162=(offset=0)=>code=>`\x1B[${code+offset}m`,wrapAnsi2562=(offset=0)=>code=>`\x1B[${38+offset};5;${code}m`,wrapAnsi16m2=(offset=0)=>(red,green,blue)=>`\x1B[${38+offset};2;${red};${green};${blue}m`,styles3={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(styles3.modifier);var foregroundColorNames2=Object.keys(styles3.color),backgroundColorNames2=Object.keys(styles3.bgColor);[...foregroundColorNames2,...backgroundColorNames2];function assembleStyles2(){let codes=new Map;for(let[groupName,group]of Object.entries(styles3)){for(let[styleName,style]of Object.entries(group))styles3[styleName]={open:`\x1B[${style[0]}m`,close:`\x1B[${style[1]}m`},group[styleName]=styles3[styleName],codes.set(style[0],style[1]);Object.defineProperty(styles3,groupName,{value:group,enumerable:!1});}return Object.defineProperty(styles3,"codes",{value:codes,enumerable:!1}),styles3.color.close="\x1B[39m",styles3.bgColor.close="\x1B[49m",styles3.color.ansi=wrapAnsi162(),styles3.color.ansi256=wrapAnsi2562(),styles3.color.ansi16m=wrapAnsi16m2(),styles3.bgColor.ansi=wrapAnsi162(10),styles3.bgColor.ansi256=wrapAnsi2562(10),styles3.bgColor.ansi16m=wrapAnsi16m2(10),Object.defineProperties(styles3,{rgbToAnsi256:{value:(red,green,blue)=>red===green&&green===blue?red<8?16:red>248?231:Math.round((red-8)/247*24)+232:16+36*Math.round(red/255*5)+6*Math.round(green/255*5)+Math.round(blue/255*5),enumerable:!1},hexToRgb:{value:hex=>{let matches=/[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));if(!matches)return [0,0,0];let[colorString]=matches;colorString.length===3&&(colorString=[...colorString].map(character=>character+character).join(""));let integer=Number.parseInt(colorString,16);return [integer>>16&255,integer>>8&255,integer&255]},enumerable:!1},hexToAnsi256:{value:hex=>styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),enumerable:!1},ansi256ToAnsi:{value:code=>{if(code<8)return 30+code;if(code<16)return 90+(code-8);let red,green,blue;if(code>=232)red=((code-232)*10+8)/255,green=red,blue=red;else {code-=16;let remainder=code%36;red=Math.floor(code/36)/5,green=Math.floor(remainder/6)/5,blue=remainder%6/5;}let value=Math.max(red,green,blue)*2;if(value===0)return 30;let result=30+(Math.round(blue)<<2|Math.round(green)<<1|Math.round(red));return value===2&&(result+=60),result},enumerable:!1},rgbToAnsi:{value:(red,green,blue)=>styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red,green,blue)),enumerable:!1},hexToAnsi:{value:hex=>styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),enumerable:!1}}),styles3}var ansiStyles2=assembleStyles2(),ansi_styles_default2=ansiStyles2;var ESCAPES=new Set(["\x1B","\x9B"]),END_CODE=39,ANSI_ESCAPE_BELL="\x07",ANSI_CSI="[",ANSI_OSC="]",ANSI_SGR_TERMINATOR="m",ANSI_ESCAPE_LINK=`${ANSI_OSC}8;;`,wrapAnsiCode=code=>`${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`,wrapAnsiHyperlink=uri=>`${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`,wordLengths=string=>string.split(" ").map(character=>stringWidth2(character)),wrapWord=(rows,word,columns)=>{let characters=[...word],isInsideEscape=!1,isInsideLinkEscape=!1,visible=stringWidth2(stripAnsi(rows[rows.length-1]));for(let[index,character]of characters.entries()){let characterLength=stringWidth2(character);if(visible+characterLength<=columns?rows[rows.length-1]+=character:(rows.push(character),visible=0),ESCAPES.has(character)&&(isInsideEscape=!0,isInsideLinkEscape=characters.slice(index+1).join("").startsWith(ANSI_ESCAPE_LINK)),isInsideEscape){isInsideLinkEscape?character===ANSI_ESCAPE_BELL&&(isInsideEscape=!1,isInsideLinkEscape=!1):character===ANSI_SGR_TERMINATOR&&(isInsideEscape=!1);continue}visible+=characterLength,visible===columns&&index<characters.length-1&&(rows.push(""),visible=0);}!visible&&rows[rows.length-1].length>0&&rows.length>1&&(rows[rows.length-2]+=rows.pop());},stringVisibleTrimSpacesRight=string=>{let words=string.split(" "),last=words.length;for(;last>0&&!(stringWidth2(words[last-1])>0);)last--;return last===words.length?string:words.slice(0,last).join(" ")+words.slice(last).join("")},exec=(string,columns,options={})=>{if(options.trim!==!1&&string.trim()==="")return "";let returnValue="",escapeCode,escapeUrl,lengths=wordLengths(string),rows=[""];for(let[index,word]of string.split(" ").entries()){options.trim!==!1&&(rows[rows.length-1]=rows[rows.length-1].trimStart());let rowLength=stringWidth2(rows[rows.length-1]);if(index!==0&&(rowLength>=columns&&(options.wordWrap===!1||options.trim===!1)&&(rows.push(""),rowLength=0),(rowLength>0||options.trim===!1)&&(rows[rows.length-1]+=" ",rowLength++)),options.hard&&lengths[index]>columns){let remainingColumns=columns-rowLength,breaksStartingThisLine=1+Math.floor((lengths[index]-remainingColumns-1)/columns);Math.floor((lengths[index]-1)/columns)<breaksStartingThisLine&&rows.push(""),wrapWord(rows,word,columns);continue}if(rowLength+lengths[index]>columns&&rowLength>0&&lengths[index]>0){if(options.wordWrap===!1&&rowLength<columns){wrapWord(rows,word,columns);continue}rows.push("");}if(rowLength+lengths[index]>columns&&options.wordWrap===!1){wrapWord(rows,word,columns);continue}rows[rows.length-1]+=word;}options.trim!==!1&&(rows=rows.map(row=>stringVisibleTrimSpacesRight(row)));let pre=[...rows.join(`
|
|
47
51
|
`)];for(let[index,character]of pre.entries()){if(returnValue+=character,ESCAPES.has(character)){let{groups}=new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join(""))||{groups:{}};if(groups.code!==void 0){let code2=Number.parseFloat(groups.code);escapeCode=code2===END_CODE?void 0:code2;}else groups.uri!==void 0&&(escapeUrl=groups.uri.length===0?void 0:groups.uri);}let code=ansi_styles_default2.codes.get(Number(escapeCode));pre[index+1]===`
|
|
48
52
|
`?(escapeUrl&&(returnValue+=wrapAnsiHyperlink("")),escapeCode&&code&&(returnValue+=wrapAnsiCode(code))):character===`
|
|
49
53
|
`&&(escapeCode&&code&&(returnValue+=wrapAnsiCode(escapeCode)),escapeUrl&&(returnValue+=wrapAnsiHyperlink(escapeUrl)));}return returnValue};function wrapAnsi(string,columns,options){return String(string).normalize().replace(/\r\n/g,`
|
|
@@ -84,11 +88,11 @@ ${packageVersions.join(", ")}`),acc},{critical:[],trivial:[]});return critical.l
|
|
|
84
88
|
|
|
85
89
|
`));else {let list=installationMetadata?getDuplicatedDepsWarnings(installationMetadata):getDuplicatedDepsWarnings();Array.isArray(list)&&list.length>0&&logDiagnostic("Duplicated dependencies found",list?.join(`
|
|
86
90
|
`));}}let commandMessage=`You can always recheck the health of your project by running:
|
|
87
|
-
${import_picocolors5.default.cyan("npx storybook doctor")}`;logger2.info(),foundIssues?(logger2.info(commandMessage),logger2.info(),logger2.info(`Full logs are available in ${import_picocolors5.default.cyan(LOG_FILE_PATH)}`),await rename(TEMP_LOG_FILE_PATH,join(process.cwd(),LOG_FILE_NAME))):(logger2.info("\u{1F973} Your Storybook project looks good!"),logger2.info(commandMessage),await rm(TEMP_LOG_FILE_PATH,{recursive:!0,force:!0})),logger2.info(),cleanup();};var import_picocolors6=__toESM(require_picocolors(),1);var SUPPORTED_FRAMEWORKS=["@storybook/nextjs","@storybook/experimental-nextjs-vite","@storybook/sveltekit"],SUPPORTED_RENDERERS=["@storybook/react","@storybook/svelte","@storybook/vue3"];var fileExtensions=[".js",".ts",".cts",".mts",".cjs",".mjs",".jsx",".tsx"],addonA11yAddonTest={id:"addonA11yAddonTest",versionRange:["<8.5.0",">=8.5.0"],promptType(result){return result.setupFile===null&&result.previewFile===null?"manual":"auto"},async check({mainConfig,configDir}){let addons=getAddonNames(mainConfig),frameworkPackageName=getFrameworkPackageName(mainConfig),rendererPackageName=getRendererName(mainConfig),hasA11yAddon=!!addons.find(addon=>addon.includes("@storybook/addon-a11y")),hasTestAddon=!!addons.find(addon=>addon.includes("@storybook/experimental-addon-test"));if(!SUPPORTED_FRAMEWORKS.find(framework=>frameworkPackageName?.includes(framework))&&!SUPPORTED_RENDERERS.find(renderer=>rendererPackageName?.includes(rendererPackages[renderer]))||!hasA11yAddon||!hasTestAddon||!configDir)return null;let vitestSetupFile=fileExtensions.map(ext=>path.join(configDir,`vitest.setup${ext}`)).find(filePath=>existsSync$1(filePath))??null,previewFile=fileExtensions.map(ext=>path.join(configDir,`preview${ext}`)).find(filePath=>existsSync$1(filePath))??null,skipVitestSetupTransformation=!1,skipPreviewTransformation=!
|
|
91
|
+
${import_picocolors5.default.cyan("npx storybook doctor")}`;logger2.info(),foundIssues?(logger2.info(commandMessage),logger2.info(),logger2.info(`Full logs are available in ${import_picocolors5.default.cyan(LOG_FILE_PATH)}`),await rename(TEMP_LOG_FILE_PATH,join(process.cwd(),LOG_FILE_NAME))):(logger2.info("\u{1F973} Your Storybook project looks good!"),logger2.info(commandMessage),await rm(TEMP_LOG_FILE_PATH,{recursive:!0,force:!0})),logger2.info(),cleanup();};var import_picocolors6=__toESM(require_picocolors(),1);var SUPPORTED_FRAMEWORKS=["@storybook/nextjs","@storybook/experimental-nextjs-vite","@storybook/sveltekit"],SUPPORTED_RENDERERS=["@storybook/react","@storybook/svelte","@storybook/vue3"];var fileExtensions=[".js",".ts",".cts",".mts",".cjs",".mjs",".jsx",".tsx"],addonA11yAddonTest={id:"addonA11yAddonTest",versionRange:["<8.5.0",">=8.5.0"],promptType(result){return result.setupFile===null&&result.previewFile===null?"manual":"auto"},async check({mainConfig,configDir}){let addons=getAddonNames(mainConfig),frameworkPackageName=getFrameworkPackageName(mainConfig),rendererPackageName=getRendererName(mainConfig),hasA11yAddon=!!addons.find(addon=>addon.includes("@storybook/addon-a11y")),hasTestAddon=!!addons.find(addon=>addon.includes("@storybook/experimental-addon-test"));if(!SUPPORTED_FRAMEWORKS.find(framework=>frameworkPackageName?.includes(framework))&&!SUPPORTED_RENDERERS.find(renderer=>rendererPackageName?.includes(rendererPackages[renderer]))||!hasA11yAddon||!hasTestAddon||!configDir)return null;let vitestSetupFile=fileExtensions.map(ext=>path.join(configDir,`vitest.setup${ext}`)).find(filePath=>existsSync$1(filePath))??null,previewFile=fileExtensions.map(ext=>path.join(configDir,`preview${ext}`)).find(filePath=>existsSync$1(filePath))??null,skipVitestSetupTransformation=!1,skipPreviewTransformation=!1;if(vitestSetupFile&&previewFile){let vitestSetupSource=readFileSync(vitestSetupFile,"utf8"),previewSetupSource=readFileSync(previewFile,"utf8");if(skipVitestSetupTransformation=vitestSetupSource.includes("@storybook/addon-a11y"),skipPreviewTransformation=previewSetupSource.includes("a11y-test"),skipVitestSetupTransformation&&skipPreviewTransformation)return null}let getTransformedSetupCode=()=>{if(!vitestSetupFile||skipVitestSetupTransformation)return null;try{let vitestSetupSource=readFileSync(vitestSetupFile,"utf8");return transformSetupFile(vitestSetupSource)}catch{return null}},getTransformedPreviewCode=async()=>{if(!previewFile||skipPreviewTransformation)return null;try{let previewSetupSource=readFileSync(previewFile,"utf8");return await transformPreviewFile(previewSetupSource,previewFile)}catch{return null}};return {setupFile:vitestSetupFile,previewFile,transformedSetupCode:getTransformedSetupCode(),transformedPreviewCode:await getTransformedPreviewCode(),skipVitestSetupTransformation,skipPreviewTransformation}},prompt({setupFile,previewFile,transformedSetupCode,transformedPreviewCode,skipPreviewTransformation,skipVitestSetupTransformation}){let prompt=[dedent`
|
|
88
92
|
We have detected that you have ${import_picocolors6.default.magenta("@storybook/addon-a11y")} and ${import_picocolors6.default.magenta("@storybook/experimental-addon-test")} installed.
|
|
89
93
|
|
|
90
94
|
${import_picocolors6.default.magenta("@storybook/addon-a11y")} now integrates with ${import_picocolors6.default.magenta("@storybook/experimental-addon-test")} to provide automatic accessibility checks for your stories, powered by Axe and Vitest.
|
|
91
|
-
`],counter=1;if(!skipVitestSetupTransformation)if(transformedSetupCode===null)
|
|
95
|
+
`],counter=1;if(!skipVitestSetupTransformation)if(transformedSetupCode===null)prompt.push(dedent`
|
|
92
96
|
${counter++}) We couldn't find or automatically update ${import_picocolors6.default.cyan(".storybook/vitest.setup.<ts|js>")} in your project to smoothly set up project annotations from ${import_picocolors6.default.magenta("@storybook/addon-a11y")}.
|
|
93
97
|
Please manually update your ${import_picocolors6.default.cyan("vitest.setup.ts")} file to include the following:
|
|
94
98
|
|
|
@@ -101,7 +105,7 @@ ${import_picocolors5.default.cyan("npx storybook doctor")}`;logger2.info(),found
|
|
|
101
105
|
${import_picocolors6.default.gray("]);")}
|
|
102
106
|
|
|
103
107
|
${import_picocolors6.default.gray("beforeAll(annotations.beforeAll);")}
|
|
104
|
-
`);else {let fileExtensionSetupFile=path.extname(setupFile);
|
|
108
|
+
`);else {let fileExtensionSetupFile=path.extname(setupFile);prompt.push(dedent`${counter++}) We have to update your ${import_picocolors6.default.cyan(`.storybook/vitest.setup${fileExtensionSetupFile}`)} file to set up project annotations from ${import_picocolors6.default.magenta("@storybook/addon-a11y")}.`);}if(!skipPreviewTransformation)if(transformedPreviewCode===null)prompt.push(dedent`
|
|
105
109
|
${counter++}) We couldn't find or automatically update your ${import_picocolors6.default.cyan(".storybook/preview.<ts|js>")} in your project to smoothly set up tags from ${import_picocolors6.default.magenta("@storybook/addon-a11y")}.
|
|
106
110
|
Please manually update your ${import_picocolors6.default.cyan(".storybook/preview.<ts|js>")} file to include the following:
|
|
107
111
|
|
|
@@ -109,17 +113,16 @@ ${import_picocolors5.default.cyan("npx storybook doctor")}`;logger2.info(),found
|
|
|
109
113
|
${import_picocolors6.default.gray("...")}
|
|
110
114
|
${import_picocolors6.default.green('+ tags: ["a11y-test"],')}
|
|
111
115
|
${import_picocolors6.default.gray("}")}
|
|
112
|
-
`);else {let fileExtensionPreviewFile=path.extname(previewFile);
|
|
116
|
+
`);else {let fileExtensionPreviewFile=path.extname(previewFile);prompt.push(dedent`
|
|
113
117
|
${counter++}) We have to update your ${import_picocolors6.default.cyan(`.storybook/preview${fileExtensionPreviewFile}`)} file to set up tags from ${import_picocolors6.default.magenta("@storybook/addon-a11y")}.
|
|
114
|
-
`);}return (transformedPreviewCode===null||transformedSetupCode===null)&&
|
|
118
|
+
`);}return (transformedPreviewCode===null||transformedSetupCode===null)&&prompt.push(dedent`
|
|
115
119
|
For more information, please refer to the accessibility addon documentation:
|
|
116
120
|
${import_picocolors6.default.cyan("https://storybook.js.org/docs/writing-tests/accessibility-testing#test-addon-integration")}
|
|
117
|
-
`),
|
|
121
|
+
`),prompt.join(`
|
|
118
122
|
|
|
119
123
|
`)},async run({result}){let{setupFile,transformedSetupCode,transformedPreviewCode,previewFile}=result;transformedSetupCode&&setupFile&&writeFileSync(setupFile,transformedSetupCode,"utf8"),transformedPreviewCode&&previewFile&&writeFileSync(previewFile,transformedPreviewCode,"utf8");}};function transformSetupFile(source){let j=jscodeshift.withParser("ts"),root=j(source),importDeclaration=j.importDeclaration([j.importNamespaceSpecifier(j.identifier("a11yAddonAnnotations"))],j.literal("@storybook/addon-a11y/preview")),setProjectAnnotationsCall=root.find(j.CallExpression,{callee:{type:"Identifier",name:"setProjectAnnotations"}});if(setProjectAnnotationsCall.length===0)throw new Error("Could not find setProjectAnnotations call in vitest.setup file");return setProjectAnnotationsCall.forEach(p=>{if(p.value.arguments.length===1&&p.value.arguments[0].type==="ArrayExpression")p.value.arguments[0].elements.unshift(j.identifier("a11yAddonAnnotations"));else if(p.value.arguments.length===1&&p.value.arguments[0].type==="Identifier"){let arg=p.value.arguments[0];p.value.arguments[0]=j.arrayExpression([j.identifier("a11yAddonAnnotations"),arg]);}}),root.get().node.program.body.unshift(importDeclaration),root.toSource()}async function transformPreviewFile(source,filePath){let previewConfig=loadConfig(source).parse(),tags=previewConfig.getFieldNode(["tags"]),tagsNode=previewConfig.getFieldNode(["tags"]),tagsValue=previewConfig.getFieldValue(["tags"])??[];if(tags&&tagsValue&&(tagsValue.includes("a11y-test")||tagsValue.includes("!a11y-test")))return source;if(tagsNode){let tagsElementsLength=tagsNode.elements.length,lastTagElement=tagsNode.elements[tagsElementsLength-1];lastTagElement&&(lastTagElement.comments=[{type:"CommentBlock",leading:!1,trailing:!0,value:', "a11y-test"'}],previewConfig.setFieldNode(["tags"],tagsNode));}else previewConfig.setFieldValue(["tags"],["a11y-test"]);let formattedPreviewConfig=formatConfig(previewConfig),lines=formattedPreviewConfig.split(`
|
|
120
124
|
`),tagsLineIndex=lines.findIndex(line=>line.includes("tags: ["));if(tagsLineIndex===-1)return formattedPreviewConfig;lines[tagsLineIndex]=lines[tagsLineIndex].replace("['a11y-test']","[/*'a11y-test'*/]"),lines[tagsLineIndex]=lines[tagsLineIndex].replace('["a11y-test"]','[/*"a11y-test"*/]');let indentation=lines[tagsLineIndex]?.match(/^\s*/)?.[0],comment=`${indentation}// The \`a11y-test\` tag controls whether accessibility tests are run as part of a standalone Vitest test run
|
|
121
|
-
${indentation}//
|
|
122
|
-
${indentation}// For more information please see: https://storybook.js.org/docs/writing-tests/accessibility-testing#configure-accessibility-tests-with-the-test-addon`;return lines.splice(tagsLineIndex,0,comment),formatFileContent(filePath,lines.join(`
|
|
125
|
+
${indentation}// For more information please visit: https://storybook.js.org/docs/writing-tests/accessibility-testing#configure-accessibility-tests-with-the-test-addon`;return lines.splice(tagsLineIndex,0,comment),formatFileContent(filePath,lines.join(`
|
|
123
126
|
`))}var import_picocolors7=__toESM(require_picocolors(),1);var addonPostCSS={id:"addon-postcss",versionRange:["*","*"],promptType:"notification",async check({mainConfig}){return !getAddonNames(mainConfig).find(addon=>addon.includes("@storybook/addon-postcss"))?null:{hasAddonPostcss:!0}},prompt(){return dedent`
|
|
124
127
|
${import_picocolors7.default.bold("Attention")}: We've detected that you're using the following package which is incompatible with Storybook 8 and beyond:
|
|
125
128
|
|
|
@@ -143,7 +146,7 @@ ${indentation}// For more information please see: https://storybook.js.org/docs/
|
|
|
143
146
|
Also feel free to remove the Compodoc script from your package.json file if you don't use it apart from Storybook anymore. Storybook uses Compodoc internally and you don't have to call in separately anymore.
|
|
144
147
|
|
|
145
148
|
Read more about the Angular builder here: ${import_picocolors9.default.yellow("https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular#how-do-i-migrate-to-an-angular-storybook-builder")}
|
|
146
|
-
`},async run({result}){let angularJSON=new AngularJSON,{packageManager}=result,{useCompoDoc}=await
|
|
149
|
+
`},async run({result}){let angularJSON=new AngularJSON,{packageManager}=result,{useCompoDoc}=await prompts7({type:"confirm",name:"useCompoDoc",message:"Have you set up compodoc in Storybook previously?"}),angularProjectName=await angularJSON.getProjectName();angularJSON.addStorybookEntries({angularProjectName,storybookFolder:".storybook",useCompodoc:useCompoDoc,root:"."}),angularJSON.write(),await packageManager.addScripts({storybook:`ng run ${angularProjectName}:storybook`,"build-storybook":`ng run ${angularProjectName}:build-storybook`});}};var import_picocolors10=__toESM(require_picocolors(),1);var angularBuildersMultiproject={id:"angular-builders-multiproject",promptType:"manual",versionRange:["<7",">=7"],async check({packageManager,mainConfig}){let angularVersion=await packageManager.getPackageVersion("@angular/core"),frameworkPackageName=getFrameworkPackageName(mainConfig);if(await isNxProject()||frameworkPackageName!=="@storybook/angular"||!angularVersion||semver.lt(angularVersion,"14.0.0"))return null;let angularJSON=new AngularJSON,{hasStorybookBuilder}=angularJSON;return hasStorybookBuilder||angularJSON.rootProject||Object.keys(angularJSON.projects).length===1?null:{}},prompt(){return dedent`
|
|
147
150
|
In Storybook 6.4 we have deprecated calling Storybook directly (npm run storybook) for Angular. In Storybook 7.0, we've removed it entirely. Instead you have to set up the Storybook builder in your ${import_picocolors10.default.yellow("angular.json")} and execute ${import_picocolors10.default.yellow("ng run <your-project>:storybook")} to start Storybook.
|
|
148
151
|
|
|
149
152
|
❌ Your Angular workspace uses multiple projects defined in the ${import_picocolors10.default.yellow("angular.json")} file and we were not able to detect a root project. Therefore we are not able to automigrate to use Angular Storybook builder. Instead, please visit ${import_picocolors10.default.yellow("https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular")} to do the migration manually.
|
|
@@ -285,7 +288,7 @@ ${indentation}// For more information please see: https://storybook.js.org/docs/
|
|
|
285
288
|
|
|
286
289
|
To learn more about this change, see: ${import_picocolors20.default.yellow("https://storybook.js.org/docs/migration-guide#storiesmdx-to-mdxcsf")}
|
|
287
290
|
`},async run({dryRun,mainConfigPath,result:{nextStoriesEntries}}){if(logger11.info(dedent`✅ Setting 'stories' config:
|
|
288
|
-
${JSON.stringify(nextStoriesEntries,null,2)}`),!dryRun){let{glob:globString}=await prompt({type:"text",name:"glob",message:"Please enter the glob for your MDX stories",initial:"./src/**/*.stories.mdx"});globString&&await runCodemod("mdx-to-csf",{glob:globString,dryRun,logger:logger11}),await updateMainConfig({mainConfigPath,dryRun:!!dryRun},async main=>{main.setFieldValue(["stories"],nextStoriesEntries);}),logger11.info(dedent`
|
|
291
|
+
${JSON.stringify(nextStoriesEntries,null,2)}`),!dryRun){let{glob:globString}=await prompts7.prompt({type:"text",name:"glob",message:"Please enter the glob for your MDX stories",initial:"./src/**/*.stories.mdx"});globString&&await runCodemod("mdx-to-csf",{glob:globString,dryRun,logger:logger11}),await updateMainConfig({mainConfigPath,dryRun:!!dryRun},async main=>{main.setFieldValue(["stories"],nextStoriesEntries);}),logger11.info(dedent`
|
|
289
292
|
The migration successfully updated your 'stories' config to include any .mdx file instead of just .stories.mdx.
|
|
290
293
|
|
|
291
294
|
It also ran the 'mdx-to-csf' codemod to convert your MDX stories to CSF format.
|
|
@@ -298,7 +301,7 @@ ${indentation}// For more information please see: https://storybook.js.org/docs/
|
|
|
298
301
|
Referencing missing packages can cause your project to crash. We can automatically add them to your dependencies.
|
|
299
302
|
|
|
300
303
|
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#failed-to-resolve-import-storybookx-error
|
|
301
|
-
`},async run({result:{packageUsage},dryRun,packageManager}){if(logger12.info(`\u2705 Installing the following packages as devDependencies: ${Object.keys(packageUsage)}`),!dryRun){let dependenciesToInstall=Object.keys(packageUsage),versionToInstall=getStorybookVersionSpecifier(await packageManager.retrievePackageJson()),versionToInstallWithoutModifiers=versionToInstall?.replace(/[\^~]/,"");await packageManager.addDependencies({installAsDevDependencies:!0},dependenciesToInstall.map(pkg2=>`${pkg2}@${versionToInstallWithoutModifiers}`));let packageJson=await packageManager.retrievePackageJson();await packageManager.addDependencies({installAsDevDependencies:!0,skipInstall:!0,packageJson},dependenciesToInstall.map(pkg2=>`${pkg2}@${versionToInstall}`));}}};var import_picocolors22=__toESM(require_picocolors(),1);var detectRenderer=async packageJson=>{let allDependencies={...packageJson.dependencies,...packageJson.devDependencies,...packageJson.peerDependencies},matches=Object.keys(rendererPackages).filter(pkg2=>!!allDependencies[pkg2]),[rendererPackage]=matches;return matches.length>1&&(rendererPackage=(await
|
|
304
|
+
`},async run({result:{packageUsage},dryRun,packageManager}){if(logger12.info(`\u2705 Installing the following packages as devDependencies: ${Object.keys(packageUsage)}`),!dryRun){let dependenciesToInstall=Object.keys(packageUsage),versionToInstall=getStorybookVersionSpecifier(await packageManager.retrievePackageJson()),versionToInstallWithoutModifiers=versionToInstall?.replace(/[\^~]/,"");await packageManager.addDependencies({installAsDevDependencies:!0},dependenciesToInstall.map(pkg2=>`${pkg2}@${versionToInstallWithoutModifiers}`));let packageJson=await packageManager.retrievePackageJson();await packageManager.addDependencies({installAsDevDependencies:!0,skipInstall:!0,packageJson},dependenciesToInstall.map(pkg2=>`${pkg2}@${versionToInstall}`));}}};var import_picocolors22=__toESM(require_picocolors(),1);var detectRenderer=async packageJson=>{let allDependencies={...packageJson.dependencies,...packageJson.devDependencies,...packageJson.peerDependencies},matches=Object.keys(rendererPackages).filter(pkg2=>!!allDependencies[pkg2]),[rendererPackage]=matches;return matches.length>1&&(rendererPackage=(await prompts7([{type:"select",name:"rendererPackage",hint:"> - Use arrow-keys. Return to submit. To automate this next time, you can pass the renderer to the CLI via the --renderer flag",message:"Tried to detect a Storybook renderer in your project but found multiple. This could happen in monorepos, when projects contain multiple Storybook packages in package.json. Please select the correct one:",choices:matches.map(type=>({title:type,value:type}))}])).rendererPackage),rendererPackage};var logger13=console,packagesMap={"@storybook/react":{webpack5:"@storybook/react-webpack5",vite:"@storybook/react-vite"},"@storybook/preact":{webpack5:"@storybook/preact-webpack5",vite:"@storybook/preact-vite"},"@storybook/server":{webpack5:"@storybook/server-webpack5"},"@storybook/ember":{webpack5:"@storybook/ember"},"@storybook/angular":{webpack5:"@storybook/angular"},"@storybook/vue3":{webpack5:"@storybook/vue3-webpack5",vite:"@storybook/vue3-vite"},"@storybook/svelte":{webpack5:"@storybook/svelte-webpack5",vite:"@storybook/svelte-vite"},"@storybook/web-components":{webpack5:"@storybook/web-components-webpack5",vite:"@storybook/web-components-vite"},"@storybook/html":{webpack5:"@storybook/html-webpack5",vite:"@storybook/html-vite"}},communityFrameworks={vite:["storybook-framework-qwik","storybook-solidjs-vite"],webpack5:[]},viteConfigFiles=["vite.config.js","vite.config.cjs","vite.config.mjs","vite.config.ts"],webpackConfigFiles=["webpack.config.js","webpack.config.cjs","webpack.config.mjs","webpack.config.ts"],detectBuilderInfo=async({mainConfig,configDir,packageManager})=>{let builderName,builderOrFrameworkName,{core={},framework}=mainConfig,{builder}=core,builderPackageName=getBuilderPackageName(mainConfig),frameworkPackageName=getFrameworkPackageName(mainConfig),builderOptions=typeof builder!="string"?builder?.options??{}:{};if(builderPackageName?builderOrFrameworkName=builderPackageName:framework&&Object.keys(frameworkPackages).includes(frameworkPackageName)&&(builderOrFrameworkName=frameworkPackageName,builderOptions=typeof framework=="object"?framework.options?.builder??{}:{}),!builderOrFrameworkName){let viteConfigFile2=await findUp(viteConfigFiles,{cwd:configDir});if(viteConfigFile2)logger13.info(`No builder or framework field, detected Storybook builder via: ${viteConfigFile2}`),builderOrFrameworkName="vite";else {let webpackConfigFile=await findUp(webpackConfigFiles,{cwd:configDir});webpackConfigFile&&(logger13.info(`No builder or framework field, detected Storybook builder via: ${webpackConfigFile}`),builderOrFrameworkName="webpack5");}}if(!builderOrFrameworkName){let storybookBuilderViteVersion=await packageManager.getPackageVersion("@storybook/builder-vite"),storybookBuilderVite2Version=await packageManager.getPackageVersion("storybook-builder-vite"),storybookBuilderWebpack5Version=await packageManager.getPackageVersion("@storybook/builder-webpack5"),storybookBuilderManagerWebpack5Version=await packageManager.getPackageVersion("@storybook/manager-webpack5");storybookBuilderViteVersion||storybookBuilderVite2Version?builderOrFrameworkName="vite":(storybookBuilderWebpack5Version||storybookBuilderManagerWebpack5Version)&&(builderOrFrameworkName="webpack5");}return builderOrFrameworkName?.includes("vite")||builderOrFrameworkName&&communityFrameworks.vite.includes(builderOrFrameworkName)?builderName="vite":(builderOrFrameworkName?.includes("webpack")||builderOrFrameworkName&&communityFrameworks.webpack5.includes(builderOrFrameworkName),builderName="webpack5"),{name:builderName,options:builderOptions}},getNextjsAddonOptions=addons=>{let nextjsAddon=addons?.find(addon=>typeof addon=="string"?addon==="storybook-addon-next":addon.name==="storybook-addon-next");return !nextjsAddon||typeof nextjsAddon=="string"?{}:nextjsAddon.options||{}};var logger14=console,newFrameworks={id:"new-frameworks",versionRange:["<7",">=7"],async check({configDir,packageManager,mainConfig,mainConfigPath,rendererPackage}){if(typeof configDir>"u")return null;let packageJson=await packageManager.retrievePackageJson(),frameworkPackageName=getFrameworkPackageName(mainConfig),rendererPackageName=rendererPackage??await getRendererPackageNameFromFramework(frameworkPackageName)??await detectRenderer(packageJson),hasFrameworkInMainConfig=!!frameworkPackageName;frameworkPackageName&&Object.values(rendererPackages).includes(frameworkPackageName)&&(hasFrameworkInMainConfig=!1);let builderConfig=mainConfig.core?.builder;if(!Object.keys(packagesMap).includes(rendererPackageName))return null;let allDependencies=await packageManager.getAllDependencies(),builderInfo=await detectBuilderInfo({mainConfig,configDir,packageManager}),newFrameworkPackage=Object.keys(frameworkPackages).find(pkg2=>pkg2===frameworkPackageName);if(newFrameworkPackage||(newFrameworkPackage=packagesMap[rendererPackageName]?.[builderInfo.name]),!newFrameworkPackage)return null;let renderer=rendererPackages[rendererPackageName],rendererOptions=mainConfig[`${renderer}Options`]||{},frameworkOptions=typeof mainConfig.framework=="string"?{}:mainConfig.framework?.options,dependenciesToRemove=["@storybook/builder-webpack5","@storybook/manager-webpack5","@storybook/builder-webpack4","@storybook/manager-webpack4","@storybook/builder-vite","storybook-builder-vite"],addonsToRemove=[],addonOptions={},metaFramework,nextVersion=await packageManager.getPackageVersion("next"),svelteKitVersion=await packageManager.getPackageVersion("@sveltejs/kit"),viteVersion=await packageManager.getPackageVersion("vite");if(rendererPackageName==="@storybook/react"&&nextVersion){let nextAddonOptions=getNextjsAddonOptions(mainConfig.addons);(nextVersion&&semver.gte(nextVersion,"12.0.0")||Object.keys(nextAddonOptions).length>0)&&(metaFramework="nextjs",(newFrameworkPackage==="@storybook/react-webpack5"||newFrameworkPackage==="@storybook/nextjs")&&(newFrameworkPackage="@storybook/nextjs",addonsToRemove=["storybook-addon-next","storybook-addon-next-router"].filter(dep=>allDependencies[dep]||mainConfig.addons?.find(addon=>typeof addon=="string"?dep===addon:dep===addon.name)),addonOptions=nextAddonOptions,dependenciesToRemove.push("@storybook/react-webpack5","storybook-addon-next","storybook-addon-next-router")));}else rendererPackageName==="@storybook/svelte"&&svelteKitVersion&&semver.gte(svelteKitVersion,"1.0.0")&&(metaFramework="sveltekit",newFrameworkPackage==="@storybook/svelte-vite"&&(newFrameworkPackage="@storybook/sveltekit",rendererOptions={},dependenciesToRemove.push("@storybook/svelte-vite")));let dependenciesToAdd=[newFrameworkPackage].filter(dep=>!allDependencies[dep]).filter(Boolean);if(dependenciesToRemove=dependenciesToRemove.filter(dep=>allDependencies[dep]).filter(Boolean),hasFrameworkInMainConfig&&!builderConfig&&!Object.keys(rendererOptions).length&&!Object.keys(addonOptions).length&&!dependenciesToRemove.length&&!dependenciesToAdd.length)return null;if(viteVersion&&semver.lt(viteVersion,"3.0.0"))throw new Error(dedent`
|
|
302
305
|
❌ Your project should be upgraded to use the framework package ${import_picocolors22.default.bold(newFrameworkPackage)}, but we detected that you are using Vite ${import_picocolors22.default.bold(viteVersion)}, which is unsupported since ${import_picocolors22.default.bold("Storybook 7.0")}. Please upgrade Vite to ${import_picocolors22.default.bold("3.0.0 or higher")} and rerun this migration.
|
|
303
306
|
`);return invariant2(mainConfigPath,"Missing main config path."),{mainConfigPath,dependenciesToAdd,dependenciesToRemove,frameworkPackage:newFrameworkPackage,hasFrameworkInMainConfig,frameworkOptions:{...frameworkOptions,...rendererOptions,...addonOptions},rendererOptions,addonOptions,addonsToRemove,builderInfo,renderer,builderConfig,metaFramework}},prompt({dependenciesToRemove,dependenciesToAdd,hasFrameworkInMainConfig,mainConfigPath,frameworkPackage,addonOptions,renderer,rendererOptions,builderConfig,addonsToRemove,metaFramework}){let disclaimer="",migrationSteps="";return dependenciesToRemove.length>0&&(migrationSteps+=`- Remove the following dependencies:
|
|
304
307
|
${dependenciesToRemove.map(dep=>`- * ${import_picocolors22.default.cyan(dep)}`).join(`
|
|
@@ -427,7 +430,7 @@ ${indentation}// For more information please see: https://storybook.js.org/docs/
|
|
|
427
430
|
We will uninstall them for you and install ${import_picocolors26.default.cyan("@storybook/test")} instead.
|
|
428
431
|
|
|
429
432
|
Also, we can help you migrate your stories to use the new package.
|
|
430
|
-
`},async run({packageManager,dryRun}){if(!dryRun){let packageJson=await packageManager.retrievePackageJson();await packageManager.removeDependencies({skipInstall:!0,packageJson},["@storybook/jest","@storybook/testing-library"]);let versionToInstall=getStorybookVersionSpecifier(packageJson);await packageManager.addDependencies({installAsDevDependencies:!0,packageJson},[`@storybook/test@${versionToInstall}`]);let{glob:globString}=await
|
|
433
|
+
`},async run({packageManager,dryRun}){if(!dryRun){let packageJson=await packageManager.retrievePackageJson();await packageManager.removeDependencies({skipInstall:!0,packageJson},["@storybook/jest","@storybook/testing-library"]);let versionToInstall=getStorybookVersionSpecifier(packageJson);await packageManager.addDependencies({installAsDevDependencies:!0,packageJson},[`@storybook/test@${versionToInstall}`]);let{glob:globString}=await prompts7({type:"text",name:"glob",message:"Please enter the glob for your stories to migrate to @storybook/test",initial:"./src/**/*.stories.*"});globString&&await runCodemod("migrate-to-test-package",{glob:globString,dryRun,logger:logger16});}}};var logger17=console,removeLegacyMDX1={id:"remove-legacy-mdx1",versionRange:["<8.0.0-alpha.0",">=8.0.0-alpha.0"],async check({mainConfig}){return mainConfig.features&&Object.hasOwn(mainConfig.features,"legacyMdx1")?{hasFeature:!0}:null},prompt({}){return dedent`
|
|
431
434
|
You have features.legacyMdx1 in your Storybook main config file. This feature has been removed. Shall we remove it from your Storybook main config file?
|
|
432
435
|
|
|
433
436
|
Link: https://storybook.js.org/docs/8.0/migration-guide
|
|
@@ -528,7 +531,7 @@ ${indentation}// For more information please see: https://storybook.js.org/docs/
|
|
|
528
531
|
You can find more information here: ${import_picocolors33.default.yellow("https://storybook.js.org/docs/builders/webpack#compiler-support")}
|
|
529
532
|
`),message.join(`
|
|
530
533
|
|
|
531
|
-
`)},async run({result,mainConfigPath,packageManager,skipInstall,dryRun}){let{defaultCompiler,shouldRemoveSWCFlag,isNextJs}=result;if(shouldRemoveSWCFlag&&await updateMainConfig({mainConfigPath,dryRun:!!dryRun},main=>{main.removeField(["framework","options","builder","useSWC"]);}),!isNextJs){let compiler=defaultCompiler===CoreWebpackCompilers.Babel?await askUserForCompilerChoice():CoreWebpackCompilers.SWC,compilerPackageName=Object.entries(compilerNameToCoreCompiler).find(([,coreCompiler])=>coreCompiler===compiler)[0];await add(compilerPackageName,{packageManager:packageManager.type,skipPostinstall:!!skipInstall});}}};async function askUserForCompilerChoice(){return (await
|
|
534
|
+
`)},async run({result,mainConfigPath,packageManager,skipInstall,dryRun}){let{defaultCompiler,shouldRemoveSWCFlag,isNextJs}=result;if(shouldRemoveSWCFlag&&await updateMainConfig({mainConfigPath,dryRun:!!dryRun},main=>{main.removeField(["framework","options","builder","useSWC"]);}),!isNextJs){let compiler=defaultCompiler===CoreWebpackCompilers.Babel?await askUserForCompilerChoice():CoreWebpackCompilers.SWC,compilerPackageName=Object.entries(compilerNameToCoreCompiler).find(([,coreCompiler])=>coreCompiler===compiler)[0];await add(compilerPackageName,{packageManager:packageManager.type,skipPostinstall:!!skipInstall});}}};async function askUserForCompilerChoice(){return (await prompts7({type:"select",name:"compiler",message:"Which compiler would you like to use?",choices:[{title:"Babel",description:"Choose Babel for a vast ecosystem and battle-tested reliability.",value:CoreWebpackCompilers.Babel},{title:"SWC",description:"Choose SWC for fast builds and simple configuration.",value:CoreWebpackCompilers.SWC}],initial:0})).compiler}var import_picocolors34=__toESM(require_picocolors(),1);var wrapRequire={id:"wrap-require",versionRange:["*","*"],async check({packageManager,storybookVersion,mainConfigPath}){let isStorybookInMonorepo=await packageManager.isStorybookInMonorepo(),isPnp=await detectPnp();if(!mainConfigPath)return null;let config=await readConfig(mainConfigPath);if(!isStorybookInMonorepo&&!isPnp||!getFieldsForRequireWrapper(config).some(node=>isRequireWrapperNecessary(node)))return null;let isConfigTypescript=mainConfigPath.endsWith(".ts")||mainConfigPath.endsWith(".tsx");return {storybookVersion,isStorybookInMonorepo,isPnp,isConfigTypescript}},prompt({storybookVersion,isStorybookInMonorepo}){let sbFormatted=import_picocolors34.default.cyan(`Storybook ${storybookVersion}`);return dedent`We have detected that you're using ${sbFormatted} in a ${isStorybookInMonorepo?"monorepo":"PnP"} project.
|
|
532
535
|
For Storybook to work correctly, some fields in your main config must be updated. We can do this for you automatically.
|
|
533
536
|
|
|
534
537
|
More info: https://storybook.js.org/docs/faq#how-do-i-fix-module-resolution-in-special-environments`},async run({dryRun,mainConfigPath,result}){return new Promise((resolve,reject)=>{updateMainConfig({dryRun:!!dryRun,mainConfigPath},mainConfig=>{try{getFieldsForRequireWrapper(mainConfig).forEach(node=>{wrapValueWithRequireWrapper(mainConfig,node);}),getRequireWrapperName(mainConfig)===null&&(mainConfig?.fileName?.endsWith(".cjs")||mainConfig?.fileName?.endsWith(".cts")||mainConfig?.fileName?.endsWith(".cjsx")||mainConfig?.fileName?.endsWith(".ctsx")?mainConfig.setRequireImport(["dirname","join"],"path"):mainConfig.setImport(["dirname","join"],"path"),mainConfig.setBodyDeclaration(getRequireWrapperAsCallExpression(result.isConfigTypescript))),resolve();}catch(e){reject(e);}});})}};var allFixes=[missingStorybookDependencies,addonsAPI,newFrameworks,cra5,webpack5,vue3,addonPostCSS,viteConfigFile,eslintPlugin,builderVite,sbBinary,sbScripts,removeJestTestingLibrary,removeArgtypesRegex,removedGlobalClientAPIs,mdxgfm,mdxToCSF,autodocsTrue,angularBuildersMultiproject,angularBuilders,wrapRequire,reactDocgen,storyshotsMigration,removeReactDependency,removeLegacyMDX1,webpack5CompilerSetup,mdx1to3,upgradeStorybookRelatedDependencies,vta,autodocsTags,initialGlobals,addonA11yAddonTest];var import_picocolors35=__toESM(require_picocolors(),1);var messageDivider2=`
|
|
@@ -551,7 +554,7 @@ ${error}`).join(`
|
|
|
551
554
|
${availableFixes}
|
|
552
555
|
`);},doAutomigrate=async options=>{let packageManager=JsPackageManagerFactory.getPackageManager({force:options.packageManager}),[packageJson,storybookVersion]=await Promise.all([packageManager.retrievePackageJson(),getCoercedStorybookVersion(packageManager)]),{configDir:inferredConfigDir,mainConfig:mainConfigPath}=getStorybookInfo(packageJson,options.configDir),configDir=options.configDir||inferredConfigDir||".storybook";if(!storybookVersion)throw new Error("Could not determine Storybook version");if(!mainConfigPath)throw new Error("Could not determine main config path");await automigrate({...options,packageManager,storybookVersion,beforeVersion:storybookVersion,mainConfigPath,configDir,isUpgrade:!1,isLatest:!1})&&await doctor({configDir,packageManager:options.packageManager});},automigrate=async({fixId,fixes:inputFixes,dryRun,yes,packageManager,list,configDir,mainConfigPath,storybookVersion,beforeVersion,renderer:rendererPackage,skipInstall,hideMigrationSummary=!1,isUpgrade,isLatest})=>{if(list)return logAvailableMigrations(),null;let selectedFixes=inputFixes||allFixes.filter(fix=>!(fix.id===upgradeStorybookRelatedDependencies.id&&isLatest===!1&&fixId!==upgradeStorybookRelatedDependencies.id)),fixes=fixId?selectedFixes.filter(f=>f.id===fixId):selectedFixes;if(fixId&&fixes.length===0)return logger21.info(`\u{1F4ED} No migrations found for ${import_picocolors36.default.magenta(fixId)}.`),logAvailableMigrations(),null;await augmentLogsToFile2(),logger21.info("\u{1F50E} checking possible migrations..");let{fixResults,fixSummary,preCheckFailure}=await runFixes({fixes,packageManager,rendererPackage,skipInstall,configDir,mainConfigPath,storybookVersion,beforeVersion,isUpgrade:!!isUpgrade,dryRun,yes});if(Object.values(fixResults).some(r=>r==="failed"||r==="check_failed")?await rename(TEMP_LOG_FILE_PATH2,join(process.cwd(),LOG_FILE_NAME2)):await rm(TEMP_LOG_FILE_PATH2,{recursive:!0,force:!0}),!hideMigrationSummary){let installationMetadata=await packageManager.findInstallations(["@storybook/*","storybook"]);logger21.info(),logger21.info(getMigrationSummary({fixResults,fixSummary,logFile:LOG_FILE_PATH2,installationMetadata})),logger21.info();}return cleanup2(),{fixResults,preCheckFailure}};async function runFixes({fixes,dryRun,yes,rendererPackage,skipInstall,configDir,packageManager,mainConfigPath,storybookVersion,beforeVersion,isUpgrade}){let fixResults={},fixSummary={succeeded:[],failed:{},manual:[],skipped:[]};for(let i=0;i<fixes.length;i+=1){let f=fixes[i],result;try{let{mainConfig,previewConfigPath}=await getStorybookData({configDir,packageManager});(isUpgrade&&semver.satisfies(beforeVersion,f.versionRange[0],{includePrerelease:!0})&&semver.satisfies(storybookVersion,f.versionRange[1],{includePrerelease:!0})||!isUpgrade)&&(result=await f.check({packageManager,configDir,rendererPackage,mainConfig,storybookVersion,previewConfigPath,mainConfigPath}));}catch(error){logger21.info(`\u26A0\uFE0F failed to check fix ${import_picocolors36.default.bold(f.id)}`),error instanceof Error&&(logger21.error(`
|
|
553
556
|
${error.stack}`),fixSummary.failed[f.id]=error.message),fixResults[f.id]="check_failed";}if(result){let promptType=typeof f.promptType=="function"?await f.promptType(result):f.promptType??"auto";logger21.info(`
|
|
554
|
-
\u{1F50E} found a '${import_picocolors36.default.cyan(f.id)}' migration:`);let message=f.prompt(result),getTitle=()=>{switch(promptType){case"auto":return "Automigration detected";case"manual":return "Manual migration detected";case"notification":return "Migration notification"}};logger21.info(boxen(message,{borderStyle:"round",padding:1,borderColor:"#F1618C",title:getTitle()}));let runAnswer;try{if(dryRun)runAnswer={fix:!1};else if(yes)runAnswer={fix:!0},promptType==="manual"&&(fixResults[f.id]="manual_succeeded",fixSummary.manual.push(f.id));else if(promptType==="manual"){fixResults[f.id]="manual_succeeded",fixSummary.manual.push(f.id),logger21.info();let{shouldContinue}=await
|
|
557
|
+
\u{1F50E} found a '${import_picocolors36.default.cyan(f.id)}' migration:`);let message=f.prompt(result),getTitle=()=>{switch(promptType){case"auto":return "Automigration detected";case"manual":return "Manual migration detected";case"notification":return "Migration notification"}};logger21.info(boxen(message,{borderStyle:"round",padding:1,borderColor:"#F1618C",title:getTitle()}));let runAnswer;try{if(dryRun)runAnswer={fix:!1};else if(yes)runAnswer={fix:!0},promptType==="manual"&&(fixResults[f.id]="manual_succeeded",fixSummary.manual.push(f.id));else if(promptType==="manual"){fixResults[f.id]="manual_succeeded",fixSummary.manual.push(f.id),logger21.info();let{shouldContinue}=await prompts7({type:"toggle",name:"shouldContinue",message:"Select continue once you have made the required changes, or quit to exit the migration process",initial:!0,active:"continue",inactive:"quit"},{onCancel:()=>{throw new Error}});if(!shouldContinue){fixResults[f.id]="manual_skipped";break}}else promptType==="auto"?runAnswer=await prompts7({type:"confirm",name:"fix",message:`Do you want to run the '${import_picocolors36.default.cyan(f.id)}' migration on your project?`,initial:f.promptDefaultValue??!0},{onCancel:()=>{throw new Error}}):promptType==="notification"&&(runAnswer=await prompts7({type:"confirm",name:"fix",message:"Do you want to continue?",initial:!0},{onCancel:()=>{throw new Error}}));}catch{break}if(promptType==="auto")if(invariant2(runAnswer,"runAnswer must be defined if not promptOnly"),runAnswer.fix)try{invariant2(typeof f.run=="function","run method should be available in fix."),invariant2(mainConfigPath,"Main config path should be defined to run migration."),await f.run({result,packageManager,dryRun,mainConfigPath,skipInstall}),logger21.info(`\u2705 ran ${import_picocolors36.default.cyan(f.id)} migration`),fixResults[f.id]="succeeded",fixSummary.succeeded.push(f.id);}catch(error){fixResults[f.id]="failed",fixSummary.failed[f.id]=error instanceof Error?error.message:"Failed to run migration",logger21.info(`\u274C error when running ${import_picocolors36.default.cyan(f.id)} migration`),logger21.info(error),logger21.info();}else fixResults[f.id]="skipped",fixSummary.skipped.push(f.id);}else fixResults[f.id]=fixResults[f.id]||"unnecessary";}return {fixResults,fixSummary}}var import_picocolors37=__toESM(require_picocolors(),1);var exec2=async(command2,options={},{startMessage,errorMessage,dryRun}={})=>{if(startMessage&&logger$1.info(startMessage),dryRun){logger$1.info(`
|
|
555
558
|
> ${command2}
|
|
556
559
|
`);return}return logger$1.info(command2),new Promise((resolve,reject)=>{let child=spawn(command2,{...options,shell:!0,stdio:"pipe"});child.stderr.pipe(process.stdout),child.stdout.pipe(process.stdout),child.on("exit",code=>{code===0?resolve(void 0):(logger$1.error(import_picocolors37.default.red(`An error occurred while executing: \`${command2}\``)),errorMessage&&logger$1.info(errorMessage),reject(new Error(`command exited with code: ${code}: `)));});})},link=async({target,local,start})=>{let storybookDir=process.cwd();try{if(JSON.parse(await readFile("package.json",{encoding:"utf8"})).name!=="@storybook/root")throw new Error}catch{throw new Error("Expected to run link from the root of the storybook monorepo")}let reproDir=target,reproName=basename(target);if(!local){let reprosDir=join(storybookDir,"../storybook-repros");logger$1.info(`Ensuring directory ${reprosDir}`),await mkdir(reprosDir,{recursive:!0}),logger$1.info(`Cloning ${target}`),await exec2(`git clone ${target}`,{cwd:reprosDir}),reproName=basename(target,extname(target)),reproDir=join(reprosDir,reproName);}let reproPackageJson=JSON.parse(await readFile(join(reproDir,"package.json"),{encoding:"utf8"})),version=sync("yarn",["--version"],{cwd:reproDir,stdio:"pipe",shell:!0}).stdout.toString();if(!/^[2-4]\./.test(version)){logger$1.warn(`\u{1F6A8} Expected yarn 2 or higher in ${reproDir}!`),logger$1.warn(""),logger$1.warn("Please set it up with `yarn set version berry`,"),logger$1.warn(`then link '${reproDir}' with the '--local' flag.`);return}logger$1.info(`Linking ${reproDir}`),await exec2(`yarn link --all --relative ${storybookDir}`,{cwd:reproDir}),logger$1.info(`Installing ${reproName}`),await exec2("yarn install",{cwd:reproDir}),reproPackageJson.devDependencies?.vite||await exec2("yarn add -D webpack-hot-middleware",{cwd:reproDir}),await exec2("yarn add @types/node@22",{cwd:reproDir}),start&&(logger$1.info(`Running ${reproName} storybook`),await exec2("yarn run storybook",{cwd:reproDir}));};var logger23=console;async function migrate(migration,{glob:glob2,dryRun,list,rename:rename3,parser,configDir:userSpecifiedConfigDir}){if(list)listCodemods().forEach(key=>logger23.log(key));else if(migration){if(migration==="mdx-to-csf"&&!dryRun){let packageManager=JsPackageManagerFactory.getPackageManager(),[packageJson,storybookVersion]=await Promise.all([packageManager.retrievePackageJson(),getCoercedStorybookVersion(packageManager)]),{configDir:inferredConfigDir,mainConfig:mainConfigPath}=getStorybookInfo(packageJson,userSpecifiedConfigDir),configDir=userSpecifiedConfigDir||inferredConfigDir||".storybook";if(!storybookVersion)throw new Error("Could not determine Storybook version");if(!mainConfigPath)throw new Error("Could not determine main config path");await runFixes({fixes:[mdxToCSF],configDir,mainConfigPath,packageManager,storybookVersion,beforeVersion:storybookVersion,isUpgrade:!1}),await addStorybookBlocksPackage();}await runCodemod(migration,{glob:glob2,dryRun,logger:logger23,rename:rename3,parser});}else throw new Error("Migrate: please specify a migration name or --list")}async function addStorybookBlocksPackage(){let packageManager=JsPackageManagerFactory.getPackageManager(),packageJson=await packageManager.retrievePackageJson(),versionToInstall=getStorybookVersionSpecifier(await packageManager.retrievePackageJson());logger23.info('\u2705 Adding "@storybook/blocks" package'),await packageManager.addDependencies({installAsDevDependencies:!0,packageJson},[`@storybook/blocks@${versionToInstall}`]);}var import_picocolors38=__toESM(require_picocolors(),1);var baseTemplates={"cra/default-js":{name:"Create React App Latest (Webpack | JavaScript)",script:`
|
|
557
560
|
npx create-react-app {{beforeDir}} && cd {{beforeDir}} && jq '.browserslist.production[0] = ">0.9%"' package.json > tmp.json && mv tmp.json package.json
|
|
@@ -585,10 +588,10 @@ ${error.stack}`),fixSummary.failed[f.id]=error.message),fixResults[f.id]="check_
|
|
|
585
588
|
2. select a location for the reproduction, outside of your project.
|
|
586
589
|
|
|
587
590
|
After the reproduction is ready, we'll guide you through the next steps.
|
|
588
|
-
`.trim(),{borderStyle:"round",padding:1,borderColor:"#F1618C"})),templateId=await promptSelectedTemplate(choices)),!!!(templateId??null)){logger24.error("Somehow we got no templates. Please rerun this command!");return}if(selectedConfig=templateId?allTemplates[templateId]:void 0,!selectedConfig)throw new Error("\u{1F6A8} Sandbox: please specify a valid template type")}let selectedDirectory=outputDirectory,outputDirectoryName=outputDirectory||templateId;if(selectedDirectory&&existsSync(`${selectedDirectory}`)&&logger24.info(`\u26A0\uFE0F ${selectedDirectory} already exists! Overwriting...`),!selectedDirectory){let{directory}=await
|
|
591
|
+
`.trim(),{borderStyle:"round",padding:1,borderColor:"#F1618C"})),templateId=await promptSelectedTemplate(choices)),!!!(templateId??null)){logger24.error("Somehow we got no templates. Please rerun this command!");return}if(selectedConfig=templateId?allTemplates[templateId]:void 0,!selectedConfig)throw new Error("\u{1F6A8} Sandbox: please specify a valid template type")}let selectedDirectory=outputDirectory,outputDirectoryName=outputDirectory||templateId;if(selectedDirectory&&existsSync(`${selectedDirectory}`)&&logger24.info(`\u26A0\uFE0F ${selectedDirectory} already exists! Overwriting...`),!selectedDirectory){let{directory}=await prompts7({type:"text",message:"Enter the output directory",name:"directory",initial:outputDirectoryName??void 0,validate:async directoryName=>existsSync(directoryName)?`${directoryName} already exists. Please choose another name.`:!0},{onCancel:()=>{logger24.log("Command cancelled by the user. Exiting..."),process.exit(1);}});selectedDirectory=directory;}invariant2(selectedDirectory);try{let templateDestination=isAbsolute(selectedDirectory)?selectedDirectory:join(process.cwd(),selectedDirectory);logger24.info(`\u{1F3C3} Adding ${selectedConfig.name} into ${templateDestination}`),logger24.log(`\u{1F4E6} Downloading sandbox template (${import_picocolors38.default.bold(downloadType)})...`);try{let gitPath=`github:storybookjs/sandboxes/${templateId}/${downloadType}#${branch}`;if(await downloadTemplate(gitPath,{force:!0,dir:templateDestination}),(await readdir(templateDestination)).length===0){let selected=import_picocolors38.default.yellow(templateId);throw new Error(dedent`
|
|
589
592
|
Template downloaded from ${import_picocolors38.default.blue(gitPath)} is empty.
|
|
590
593
|
Are you use it exists? Or did you want to set ${selected} to inDevelopment first?
|
|
591
|
-
`)}if(downloadType==="before-storybook"&&init){let before=process.cwd();process.chdir(templateDestination)
|
|
594
|
+
`)}if(downloadType==="before-storybook"&&init){let before=process.cwd();process.chdir(templateDestination);let{initiate}=await import('create-storybook');await initiate({dev:process.env.CI!=="true"&&process.env.IN_STORYBOOK_SANBOX!=="true",...options}),process.chdir(before);}}catch(err){throw logger24.error(`\u{1F6A8} Failed to download sandbox template: ${String(err)}`),err}let initMessage=init?import_picocolors38.default.yellow(dedent`
|
|
592
595
|
yarn install
|
|
593
596
|
yarn storybook
|
|
594
597
|
`):`Recreate your setup, then ${import_picocolors38.default.yellow("npx storybook@latest init")}`;logger24.info(boxen(dedent`
|
|
@@ -604,7 +607,7 @@ ${error.stack}`),fixSummary.failed[f.id]=error.message),fixResults[f.id]="check_
|
|
|
604
607
|
3. Link to the repro repository in your issue
|
|
605
608
|
|
|
606
609
|
Having a clean repro helps us solve your issue faster! 🙏
|
|
607
|
-
`.trim(),{borderStyle:"round",padding:1,borderColor:"#F1618C"}));}catch(error){throw logger24.error("\u{1F6A8} Failed to create sandbox"),error}};async function promptSelectedTemplate(choices){let{template}=await
|
|
610
|
+
`.trim(),{borderStyle:"round",padding:1,borderColor:"#F1618C"}));}catch(error){throw logger24.error("\u{1F6A8} Failed to create sandbox"),error}};async function promptSelectedTemplate(choices){let{template}=await prompts7({type:"select",message:"\u{1F308} Select the template",name:"template",choices:choices.map(toChoices)},{onCancel:()=>{logger24.log("Command cancelled by the user. Exiting..."),process.exit(1);}});return template||null}var import_picocolors40=__toESM(require_picocolors(),1);var import_picocolors39=__toESM(require_picocolors(),1),excludesFalse=x=>x!==!1,blockers=()=>[import('../block-storystorev6-EWYS5WUW.js'),import('../block-dependencies-versions-BBF7RPW6.js'),import('../block-node-version-GK344KY7.js')],segmentDivider2=`
|
|
608
611
|
|
|
609
612
|
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
610
613
|
|