@mintlify/cli 4.1.79 → 4.1.81
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/dist/{build-DF0EjyfW.js → build-B-oc3MuD.js} +1 -1
- package/dist/{build-Nkr-5oHQ.js → build-dp785b-C.js} +10 -10
- package/dist/{cli-DziAQRrh.js → cli-F5_520xC.js} +138 -148
- package/dist/{config-Bl8bCVjS.js → config-DLwNRkEH.js} +8 -8
- package/dist/{config-CLPKBsM0.js → config-o7H193Xj.js} +1 -1
- package/dist/{converter-D-xOhkG2.js → converter-D-AXgjro.js} +1 -1
- package/dist/{currencyMath-JTNtcXni.js → currencyMath-DWVndHDc.js} +1 -1
- package/dist/dist-B9Tpyt5G.js +7 -0
- package/dist/dist-BVY4bzYW.js +7 -0
- package/dist/{dist-DM6gzXTY.js → dist-Cgbskz5I.js} +120 -120
- package/dist/{dist-BZO00XVw.js → dist-Ds9rgRXa.js} +273 -273
- package/dist/{esm-BtDK7B-d.js → esm-Bzf2rZuk.js} +3 -3
- package/dist/{lib-5Y5r5XbK.js → lib-B_P28NMU.js} +1 -1
- package/dist/live-BR7YGuvT.js +19 -0
- package/dist/live-C37won3z.js +7 -0
- package/dist/{multi-repo-cache-BXVYZO0d.js → multi-repo-cache-DQ4-qH_V.js} +1 -1
- package/dist/multi-repo-command-DmTEZuwj.js +101 -0
- package/dist/{multi-repo-command-BvmMS6Mn.js → multi-repo-command-jpsmcxmw.js} +1 -1
- package/dist/{multi-repo-config-B0iQPfHD.js → multi-repo-config-fDV9HAT5.js} +1 -1
- package/dist/multi-repo-preview-C-LdbybQ.js +12 -0
- package/dist/{multi-repo-setup-D5E45UWW.js → multi-repo-setup-CRaAzjLQ.js} +3 -3
- package/dist/{remark-utils-snuBUKxh.js → remark-utils-FAwkaMKD.js} +1 -1
- package/dist/start.js +1 -1
- package/dist/{utils-D9fHH3a7.js → utils-B1yewEzF.js} +2 -2
- package/package.json +9 -9
- package/dist/dist-AJImR0IV.js +0 -7
- package/dist/dist-C6IwWwv9.js +0 -7
- package/dist/multi-repo-command-LiEtu41m.js +0 -101
- package/dist/multi-repo-preview-0rxIuj2v.js +0 -12
|
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
4
4
|
const require = __mintCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __mintDirname(__filename);
|
|
7
|
-
export{g as Box,d as Newline,u as Spacer,p as Static,h as Text,f as Transform,t as measureElement,m as render,s as useApp,i as useFocus,r as useFocusManager,c as useInput,n as useIsScreenReaderEnabled,a as useStderr,l as useStdin,o as useStdout}from"./build-
|
|
7
|
+
export{g as Box,d as Newline,u as Spacer,p as Static,h as Text,f as Transform,t as measureElement,m as render,s as useApp,i as useFocus,r as useFocusManager,c as useInput,n as useIsScreenReaderEnabled,a as useStderr,l as useStdin,o as useStdout}from"./build-dp785b-C.js";
|
|
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
|
|
|
4
4
|
const require = __mintCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = __mintFileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __mintDirname(__filename);
|
|
7
|
-
import{i as e,o as t,t as n}from"./rolldown-runtime-CEAe2Uac.js";import{t as r}from"./react-CocJQ9gk.js";import*as i from"node:fs";import{
|
|
7
|
+
import{i as e,o as t,t as n}from"./rolldown-runtime-CEAe2Uac.js";import{t as r}from"./react-CocJQ9gk.js";import*as i from"node:fs";import{EventEmitter as a}from"node:events";import o from"node:os";import{PassThrough as s,Stream as c}from"node:stream";import l,{cwd as u,env as d}from"node:process";import f from"node:tty";import{Buffer as p}from"node:buffer";function m(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function h(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=m(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function g(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return h(e,t,{leading:r,maxWait:t,trailing:i})}const _=globalThis.window?.document!==void 0;globalThis.process?.versions?.node,globalThis.process?.versions?.bun,globalThis.Deno?.version?.deno,globalThis.process?.versions?.electron,globalThis.navigator?.userAgent?.includes(`jsdom`),typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,typeof DedicatedWorkerGlobalScope<`u`&&globalThis instanceof DedicatedWorkerGlobalScope,typeof SharedWorkerGlobalScope<`u`&&globalThis instanceof SharedWorkerGlobalScope,typeof ServiceWorkerGlobalScope<`u`&&globalThis instanceof ServiceWorkerGlobalScope;const v=globalThis.navigator?.userAgentData?.platform;v===`macOS`||globalThis.navigator?.platform===`MacIntel`||globalThis.navigator?.userAgent?.includes(` Mac `)===!0||globalThis.process?.platform,v===`Windows`||globalThis.navigator?.platform===`Win32`||globalThis.process?.platform,v===`Linux`||globalThis.navigator?.platform?.startsWith(`Linux`)===!0||globalThis.navigator?.userAgent?.includes(` Linux `)===!0||globalThis.process?.platform,v===`iOS`||globalThis.navigator?.platform===`MacIntel`&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),v===`Android`||globalThis.navigator?.platform===`Android`||globalThis.navigator?.userAgent?.includes(` Android `)===!0||globalThis.process?.platform,!_&&l.env.TERM_PROGRAM;const y=!_&&l.platform===`win32`;_||l.cwd;const ee=(e=1)=>`\x1B[`+e+`A`,te=e=>{let t=``;for(let n=0;n<e;n++)t+=ne+(n<e-1?ee():``);return e&&(t+=`\x1B[G`),t},ne=`\x1B[2K`,re=`\x1B[2J`,ie=y?`${re}[0f`:`${re}[3J[H`;var b=/* @__PURE__ */ t(r(),1);const ae=e=>e in d&&d[e]!==`0`&&d[e]!==`false`,oe=ae(`CI`)||ae(`CONTINUOUS_INTEGRATION`),se=e=>{let t=/* @__PURE__ */ new Set;do for(let n of Reflect.ownKeys(e))t.add([e,n]);while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t};function ce(e,{include:t,exclude:n}={}){let r=e=>{let r=t=>typeof t==`string`?e===t:t.test(e);return t?t.some(r):!n||!n.some(r)};for(let[t,n]of se(e.constructor.prototype)){if(n===`constructor`||!r(n))continue;let i=Reflect.getOwnPropertyDescriptor(t,n);i&&typeof i.value==`function`&&(e[n]=e[n].bind(e))}return e}var le=/* @__PURE__ */ n(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),ue=/* @__PURE__ */ t((/* @__PURE__ */ n(((t,n)=>{var r=global.process;let i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};
|
|
8
8
|
/* istanbul ignore if */
|
|
9
9
|
if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=le(),s=/^win/i.test(r.platform),c=e(`events`);
|
|
10
10
|
/* istanbul ignore if */
|
|
@@ -24,7 +24,7 @@ i(global.process)&&
|
|
|
24
24
|
/* istanbul ignore else */
|
|
25
25
|
t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);
|
|
26
26
|
/* istanbul ignore next */
|
|
27
|
-
return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}return _.apply(this,arguments)}}})))(),1);const de=[`assert`,`count`,`countReset`,`debug`,`dir`,`dirxml`,`error`,`group`,`groupCollapsed`,`groupEnd`,`info`,`log`,`table`,`time`,`timeEnd`,`timeLog`,`trace`,`warn`];let fe={};const pe=e=>{let t=new
|
|
27
|
+
return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}return _.apply(this,arguments)}}})))(),1);const de=[`assert`,`count`,`countReset`,`debug`,`dir`,`dirxml`,`error`,`group`,`groupCollapsed`,`groupEnd`,`info`,`log`,`table`,`time`,`timeEnd`,`timeLog`,`trace`,`warn`];let fe={};const pe=e=>{let t=new s,n=new s;t.write=t=>{e(`stdout`,t)},n.write=t=>{e(`stderr`,t)};let r=new console.Console(t,n);for(let e of de)fe[e]=console[e],console[e]=r[e];return()=>{for(let e of de)console[e]=fe[e];fe={}}};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-reconciler-constants.production.js
|
|
@@ -75,13 +75,13 @@ Error generating stack: `+e.message+`
|
|
|
75
75
|
No matching component was found for:
|
|
76
76
|
`)+e.join(` > `)}return null},L.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 27:case 5:return Xa(e.child.stateNode);default:return e.child.stateNode}},L.injectIntoDevTools=function(){var e={bundleType:0,version:qa,rendererPackageName:Ja,currentDispatcherRef:R,reconcilerVersion:`19.1.0`};if(Ya!==null&&(e.rendererConfig=Ya),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{_c=t.inject(e),vc=t}catch{}e=!!t.checkDCE}}return e},L.isAlreadyRendering=function(){return!!(J&6)},L.observeVisibleRects=function(e,t,n,r){if(!jo)throw Error(i(363));e=Ti(e,t);var a=Ro(e,n,r).disconnect;return{disconnect:function(){a()}}},L.shouldError=function(){return null},L.shouldSuspend=function(){return!1},L.startHostTransition=function(e,t,r,a){if(e.tag!==5)throw Error(i(476));var o=Cn(e).queue;Sn(e,o,t,Eo,r===null?n:function(){var t=Cn(e).next.queue;return kn(e,t,{},Ei()),r(a)})},L.updateContainer=function(e,t,n,r){var i=t.current,a=Ei();return Sa(i,a,e,t,n,r),a},L.updateContainerSync=function(e,t,n,r){return Sa(t.current,2,e,t,n,r),2},L},t.exports.default=t.exports,Object.defineProperty(t.exports,"__esModule",{value:!0})})),dt=/* @__PURE__ */ t((/* @__PURE__ */ n(((e,t)=>{t.exports=ut()})))(),1);function ft({onlyFirst:e=!1}={}){return RegExp(`[\\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=><~]))`,e?void 0:`g`)}const pt=ft();function mt(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(pt,``)}function ht(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function gt(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function _t(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function vt(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function yt(e,{ambiguousAsWide:t=!1}={}){return vt(e),gt(e)||_t(e)||t&&ht(e)?2:1}var bt=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\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?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;const xt=new Intl.Segmenter,St=/^\p{Default_Ignorable_Code_Point}$/u;function Ct(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=mt(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of xt.segment(e)){let e=t.codePointAt(0);e<=31||e>=127&&e<=159||e>=8203&&e<=8207||e===65279||e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=55296&&e<=57343||e>=65024&&e<=65039||St.test(t)||(bt().test(t)?i+=2:i+=yt(e,a))}return i}function E(e){let t=0;for(let n of e.split(`
|
|
77
77
|
`))t=Math.max(t,Ct(n));return t}const wt=/* @__PURE__ */ new Map,Tt=e=>{if(e.length===0)return{width:0,height:0};let t=wt.get(e);if(t)return t;let n={width:E(e),height:e.split(`
|
|
78
|
-
`).length};return wt.set(e,n),n};function Et(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}const Dt=(e=0)=>t=>`\u001B[${t+e}m`,Ot=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,kt=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,D={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(D.modifier);const At=Object.keys(D.color),jt=Object.keys(D.bgColor);[...At,...jt];function O(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(D)){for(let[t,r]of Object.entries(n))D[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=D[t],e.set(r[0],r[1]);Object.defineProperty(D,t,{value:n,enumerable:!1})}return Object.defineProperty(D,"codes",{value:e,enumerable:!1}),D.color.close=`\x1B[39m`,D.bgColor.close=`\x1B[49m`,D.color.ansi=Dt(),D.color.ansi256=Ot(),D.color.ansi16m=kt(),D.bgColor.ansi=Dt(10),D.bgColor.ansi256=Ot(10),D.bgColor.ansi16m=kt(10),Object.defineProperties(D,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>D.rgbToAnsi256(...D.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>D.ansi256ToAnsi(D.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>D.ansi256ToAnsi(D.hexToAnsi256(e)),enumerable:!1}}),D}const Mt=O(),Nt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,Pt=[`\x1B`,``],Ft=e=>`${Pt[0]}[${e}m`,It=(e,t,n)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(`;`)&&(n=n.split(`;`)[0][0]+`0`);let a=Mt.codes.get(Number.parseInt(n,10));if(a){let n=e.indexOf(a.toString());n===-1?r.push(Ft(t?a:i)):e.splice(n,1)}else if(t){r.push(Ft(0));break}else r.push(Ft(i))}if(t&&(r=r.filter((e,t)=>r.indexOf(e)===t),n!==void 0)){let e=Ft(Mt.codes.get(Number.parseInt(n,10)));r=r.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return r.join(``)};function Lt(e,t,n){let r=[...e],i=[],a=typeof n==`number`?n:r.length,o=!1,s,c=0,l=``;for(let[u,d]of r.entries()){let r=!1;if(Pt.includes(d)){let t=/\d[^m]*/.exec(e.slice(u,u+18));s=t&&t.length>0?t[0]:void 0,c<a&&(o=!0,s!==void 0&&i.push(s))}else o&&d===`m`&&(o=!1,r=!0);if(!o&&!r&&c++,!Nt.test(d)&&Et(d.codePointAt())&&(c++,typeof n!=`number`&&a++),c>t&&c<=a)l+=d;else if(c===t&&!o&&s!==void 0)l=It(i);else if(c>=a){l+=It(i,!0,s);break}}return l}function Rt(e,t,n){if(e.charAt(t)===` `)return t;let r=n?1:-1;for(let n=0;n<=3;n++){let i=t+n*r;if(e.charAt(i)===` `)return i}return t}function zt(e,t,n={}){let{position:r=`end`,space:i=!1,preferTruncationOnSpace:a=!1}=n,{truncationCharacter:o=`…`}=n;if(typeof e!=`string`)throw TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!=`number`)throw TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return``;if(t===1)return o;let s=Ge(e);if(s<=t)return e;if(r===`start`){if(a){let n=Rt(e,s-t+1,!0);return o+Lt(e,n,s).trim()}return i===!0&&(o+=` `),o+Lt(e,s-t+Ge(o),s)}if(r===`middle`){i===!0&&(o=` ${o} `);let n=Math.floor(t/2);if(a){let r=Rt(e,n),i=Rt(e,s-(t-n)+1,!0);return Lt(e,0,r)+o+Lt(e,i,s).trim()}return Lt(e,0,n)+o+Lt(e,s-(t-n)+Ge(o),s)}if(r===`end`)return a?Lt(e,0,Rt(e,t-1))+o:(i===!0&&(o=` ${o}`),Lt(e,0,t-Ge(o))+o);throw Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${r}`)}const Bt={},Vt=(e,t,n)=>{let r=e+String(t)+String(n),i=Bt[r];if(i)return i;let a=e;if(n===`wrap`&&(a=st(e,t,{trim:!1,hard:!0})),n.startsWith(`truncate`)){let r=`end`;n===`truncate-middle`&&(r=`middle`),n===`truncate-start`&&(r=`start`),a=zt(e,t,{position:r})}return Bt[r]=a,a},Ht=e=>{let t=``;for(let n=0;n<e.childNodes.length;n++){let r=e.childNodes[n];if(r===void 0)continue;let i=``;r.nodeName===`#text`?i=r.nodeValue:((r.nodeName===`ink-text`||r.nodeName===`ink-virtual-text`)&&(i=Ht(r)),i.length>0&&typeof r.internal_transform==`function`&&(i=r.internal_transform(i,n))),t+=i}return t},Ut=e=>{let t={nodeName:e,style:{},attributes:{},childNodes:[],parentNode:void 0,yogaNode:e===`ink-virtual-text`?void 0:w.Node.create(),internal_accessibility:{}};return e===`ink-text`&&t.yogaNode?.setMeasureFunc(Xt.bind(null,t)),t},Wt=(e,t)=>{t.parentNode&&Kt(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),(e.nodeName===`ink-text`||e.nodeName===`ink-virtual-text`)&&Qt(e)},Gt=(e,t,n)=>{t.parentNode&&Kt(t.parentNode,t),t.parentNode=e;let r=e.childNodes.indexOf(n);r>=0?(e.childNodes.splice(r,0,t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,r)):(e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),(e.nodeName===`ink-text`||e.nodeName===`ink-virtual-text`)&&Qt(e))},Kt=(e,t)=>{t.yogaNode&&t.parentNode?.yogaNode?.removeChild(t.yogaNode),t.parentNode=void 0;let n=e.childNodes.indexOf(t);n>=0&&e.childNodes.splice(n,1),(e.nodeName===`ink-text`||e.nodeName===`ink-virtual-text`)&&Qt(e)},qt=(e,t,n)=>{t===`internal_accessibility`?e.internal_accessibility=n:e.attributes[t]=n},Jt=(e,t)=>{e.style=t},Yt=e=>{let t={nodeName:`#text`,nodeValue:e,yogaNode:void 0,parentNode:void 0,style:{}};return $t(t,e),t},Xt=function(e,t){let n=e.nodeName===`#text`?e.nodeValue:Ht(e),r=Tt(n);if(r.width<=t||r.width>=1&&t>0&&t<1)return r;let i=e.style?.textWrap??`wrap`,a=Vt(n,t,i);return Tt(a)},Zt=e=>{if(e?.parentNode)return e.yogaNode??Zt(e.parentNode)},Qt=e=>{Zt(e)?.markDirty()},$t=(e,t)=>{typeof t!=`string`&&(t=String(t)),e.nodeValue=t,Qt(e)},en=(e,t)=>{`position`in t&&e.setPositionType(t.position===`absolute`?w.POSITION_TYPE_ABSOLUTE:w.POSITION_TYPE_RELATIVE)},tn=(e,t)=>{`margin`in t&&e.setMargin(w.EDGE_ALL,t.margin??0),`marginX`in t&&e.setMargin(w.EDGE_HORIZONTAL,t.marginX??0),`marginY`in t&&e.setMargin(w.EDGE_VERTICAL,t.marginY??0),`marginLeft`in t&&e.setMargin(w.EDGE_START,t.marginLeft||0),`marginRight`in t&&e.setMargin(w.EDGE_END,t.marginRight||0),`marginTop`in t&&e.setMargin(w.EDGE_TOP,t.marginTop||0),`marginBottom`in t&&e.setMargin(w.EDGE_BOTTOM,t.marginBottom||0)},nn=(e,t)=>{`padding`in t&&e.setPadding(w.EDGE_ALL,t.padding??0),`paddingX`in t&&e.setPadding(w.EDGE_HORIZONTAL,t.paddingX??0),`paddingY`in t&&e.setPadding(w.EDGE_VERTICAL,t.paddingY??0),`paddingLeft`in t&&e.setPadding(w.EDGE_LEFT,t.paddingLeft||0),`paddingRight`in t&&e.setPadding(w.EDGE_RIGHT,t.paddingRight||0),`paddingTop`in t&&e.setPadding(w.EDGE_TOP,t.paddingTop||0),`paddingBottom`in t&&e.setPadding(w.EDGE_BOTTOM,t.paddingBottom||0)},rn=(e,t)=>{`flexGrow`in t&&e.setFlexGrow(t.flexGrow??0),`flexShrink`in t&&e.setFlexShrink(typeof t.flexShrink==`number`?t.flexShrink:1),`flexWrap`in t&&(t.flexWrap===`nowrap`&&e.setFlexWrap(w.WRAP_NO_WRAP),t.flexWrap===`wrap`&&e.setFlexWrap(w.WRAP_WRAP),t.flexWrap===`wrap-reverse`&&e.setFlexWrap(w.WRAP_WRAP_REVERSE)),`flexDirection`in t&&(t.flexDirection===`row`&&e.setFlexDirection(w.FLEX_DIRECTION_ROW),t.flexDirection===`row-reverse`&&e.setFlexDirection(w.FLEX_DIRECTION_ROW_REVERSE),t.flexDirection===`column`&&e.setFlexDirection(w.FLEX_DIRECTION_COLUMN),t.flexDirection===`column-reverse`&&e.setFlexDirection(w.FLEX_DIRECTION_COLUMN_REVERSE)),`flexBasis`in t&&(typeof t.flexBasis==`number`?e.setFlexBasis(t.flexBasis):typeof t.flexBasis==`string`?e.setFlexBasisPercent(Number.parseInt(t.flexBasis,10)):e.setFlexBasis(NaN)),`alignItems`in t&&(t.alignItems!==`stretch`&&t.alignItems||e.setAlignItems(w.ALIGN_STRETCH),t.alignItems===`flex-start`&&e.setAlignItems(w.ALIGN_FLEX_START),t.alignItems===`center`&&e.setAlignItems(w.ALIGN_CENTER),t.alignItems===`flex-end`&&e.setAlignItems(w.ALIGN_FLEX_END)),`alignSelf`in t&&(t.alignSelf!==`auto`&&t.alignSelf||e.setAlignSelf(w.ALIGN_AUTO),t.alignSelf===`flex-start`&&e.setAlignSelf(w.ALIGN_FLEX_START),t.alignSelf===`center`&&e.setAlignSelf(w.ALIGN_CENTER),t.alignSelf===`flex-end`&&e.setAlignSelf(w.ALIGN_FLEX_END)),`justifyContent`in t&&(t.justifyContent!==`flex-start`&&t.justifyContent||e.setJustifyContent(w.JUSTIFY_FLEX_START),t.justifyContent===`center`&&e.setJustifyContent(w.JUSTIFY_CENTER),t.justifyContent===`flex-end`&&e.setJustifyContent(w.JUSTIFY_FLEX_END),t.justifyContent===`space-between`&&e.setJustifyContent(w.JUSTIFY_SPACE_BETWEEN),t.justifyContent===`space-around`&&e.setJustifyContent(w.JUSTIFY_SPACE_AROUND),t.justifyContent===`space-evenly`&&e.setJustifyContent(w.JUSTIFY_SPACE_EVENLY))},an=(e,t)=>{`width`in t&&(typeof t.width==`number`?e.setWidth(t.width):typeof t.width==`string`?e.setWidthPercent(Number.parseInt(t.width,10)):e.setWidthAuto()),`height`in t&&(typeof t.height==`number`?e.setHeight(t.height):typeof t.height==`string`?e.setHeightPercent(Number.parseInt(t.height,10)):e.setHeightAuto()),`minWidth`in t&&(typeof t.minWidth==`string`?e.setMinWidthPercent(Number.parseInt(t.minWidth,10)):e.setMinWidth(t.minWidth??0)),`minHeight`in t&&(typeof t.minHeight==`string`?e.setMinHeightPercent(Number.parseInt(t.minHeight,10)):e.setMinHeight(t.minHeight??0))},on=(e,t)=>{`display`in t&&e.setDisplay(t.display===`flex`?w.DISPLAY_FLEX:w.DISPLAY_NONE)},sn=(e,t)=>{if(`borderStyle`in t){let n=+!!t.borderStyle;t.borderTop!==!1&&e.setBorder(w.EDGE_TOP,n),t.borderBottom!==!1&&e.setBorder(w.EDGE_BOTTOM,n),t.borderLeft!==!1&&e.setBorder(w.EDGE_LEFT,n),t.borderRight!==!1&&e.setBorder(w.EDGE_RIGHT,n)}},cn=(e,t)=>{`gap`in t&&e.setGap(w.GUTTER_ALL,t.gap??0),`columnGap`in t&&e.setGap(w.GUTTER_COLUMN,t.columnGap??0),`rowGap`in t&&e.setGap(w.GUTTER_ROW,t.rowGap??0)},ln=(e,t={})=>{en(e,t),tn(e,t),nn(e,t),rn(e,t),an(e,t),on(e,t),sn(e,t),cn(e,t)};if(s.env.DEV===`true`)try{await import(`./devtools-DiRNY4u8.js`)}catch(e){if(e.code===`ERR_MODULE_NOT_FOUND`)console.warn(`The environment variable DEV is set to true, so Ink tried to import \`react-devtools-core\`,
|
|
78
|
+
`).length};return wt.set(e,n),n};function Et(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}const Dt=(e=0)=>t=>`\u001B[${t+e}m`,Ot=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,kt=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,D={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(D.modifier);const At=Object.keys(D.color),jt=Object.keys(D.bgColor);[...At,...jt];function O(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(D)){for(let[t,r]of Object.entries(n))D[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=D[t],e.set(r[0],r[1]);Object.defineProperty(D,t,{value:n,enumerable:!1})}return Object.defineProperty(D,"codes",{value:e,enumerable:!1}),D.color.close=`\x1B[39m`,D.bgColor.close=`\x1B[49m`,D.color.ansi=Dt(),D.color.ansi256=Ot(),D.color.ansi16m=kt(),D.bgColor.ansi=Dt(10),D.bgColor.ansi256=Ot(10),D.bgColor.ansi16m=kt(10),Object.defineProperties(D,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>D.rgbToAnsi256(...D.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>D.ansi256ToAnsi(D.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>D.ansi256ToAnsi(D.hexToAnsi256(e)),enumerable:!1}}),D}const Mt=O(),Nt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,Pt=[`\x1B`,``],Ft=e=>`${Pt[0]}[${e}m`,It=(e,t,n)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(`;`)&&(n=n.split(`;`)[0][0]+`0`);let a=Mt.codes.get(Number.parseInt(n,10));if(a){let n=e.indexOf(a.toString());n===-1?r.push(Ft(t?a:i)):e.splice(n,1)}else if(t){r.push(Ft(0));break}else r.push(Ft(i))}if(t&&(r=r.filter((e,t)=>r.indexOf(e)===t),n!==void 0)){let e=Ft(Mt.codes.get(Number.parseInt(n,10)));r=r.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return r.join(``)};function Lt(e,t,n){let r=[...e],i=[],a=typeof n==`number`?n:r.length,o=!1,s,c=0,l=``;for(let[u,d]of r.entries()){let r=!1;if(Pt.includes(d)){let t=/\d[^m]*/.exec(e.slice(u,u+18));s=t&&t.length>0?t[0]:void 0,c<a&&(o=!0,s!==void 0&&i.push(s))}else o&&d===`m`&&(o=!1,r=!0);if(!o&&!r&&c++,!Nt.test(d)&&Et(d.codePointAt())&&(c++,typeof n!=`number`&&a++),c>t&&c<=a)l+=d;else if(c===t&&!o&&s!==void 0)l=It(i);else if(c>=a){l+=It(i,!0,s);break}}return l}function Rt(e,t,n){if(e.charAt(t)===` `)return t;let r=n?1:-1;for(let n=0;n<=3;n++){let i=t+n*r;if(e.charAt(i)===` `)return i}return t}function zt(e,t,n={}){let{position:r=`end`,space:i=!1,preferTruncationOnSpace:a=!1}=n,{truncationCharacter:o=`…`}=n;if(typeof e!=`string`)throw TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!=`number`)throw TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return``;if(t===1)return o;let s=Ge(e);if(s<=t)return e;if(r===`start`){if(a){let n=Rt(e,s-t+1,!0);return o+Lt(e,n,s).trim()}return i===!0&&(o+=` `),o+Lt(e,s-t+Ge(o),s)}if(r===`middle`){i===!0&&(o=` ${o} `);let n=Math.floor(t/2);if(a){let r=Rt(e,n),i=Rt(e,s-(t-n)+1,!0);return Lt(e,0,r)+o+Lt(e,i,s).trim()}return Lt(e,0,n)+o+Lt(e,s-(t-n)+Ge(o),s)}if(r===`end`)return a?Lt(e,0,Rt(e,t-1))+o:(i===!0&&(o=` ${o}`),Lt(e,0,t-Ge(o))+o);throw Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${r}`)}const Bt={},Vt=(e,t,n)=>{let r=e+String(t)+String(n),i=Bt[r];if(i)return i;let a=e;if(n===`wrap`&&(a=st(e,t,{trim:!1,hard:!0})),n.startsWith(`truncate`)){let r=`end`;n===`truncate-middle`&&(r=`middle`),n===`truncate-start`&&(r=`start`),a=zt(e,t,{position:r})}return Bt[r]=a,a},Ht=e=>{let t=``;for(let n=0;n<e.childNodes.length;n++){let r=e.childNodes[n];if(r===void 0)continue;let i=``;r.nodeName===`#text`?i=r.nodeValue:((r.nodeName===`ink-text`||r.nodeName===`ink-virtual-text`)&&(i=Ht(r)),i.length>0&&typeof r.internal_transform==`function`&&(i=r.internal_transform(i,n))),t+=i}return t},Ut=e=>{let t={nodeName:e,style:{},attributes:{},childNodes:[],parentNode:void 0,yogaNode:e===`ink-virtual-text`?void 0:w.Node.create(),internal_accessibility:{}};return e===`ink-text`&&t.yogaNode?.setMeasureFunc(Xt.bind(null,t)),t},Wt=(e,t)=>{t.parentNode&&Kt(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),(e.nodeName===`ink-text`||e.nodeName===`ink-virtual-text`)&&Qt(e)},Gt=(e,t,n)=>{t.parentNode&&Kt(t.parentNode,t),t.parentNode=e;let r=e.childNodes.indexOf(n);r>=0?(e.childNodes.splice(r,0,t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,r)):(e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),(e.nodeName===`ink-text`||e.nodeName===`ink-virtual-text`)&&Qt(e))},Kt=(e,t)=>{t.yogaNode&&t.parentNode?.yogaNode?.removeChild(t.yogaNode),t.parentNode=void 0;let n=e.childNodes.indexOf(t);n>=0&&e.childNodes.splice(n,1),(e.nodeName===`ink-text`||e.nodeName===`ink-virtual-text`)&&Qt(e)},qt=(e,t,n)=>{t===`internal_accessibility`?e.internal_accessibility=n:e.attributes[t]=n},Jt=(e,t)=>{e.style=t},Yt=e=>{let t={nodeName:`#text`,nodeValue:e,yogaNode:void 0,parentNode:void 0,style:{}};return $t(t,e),t},Xt=function(e,t){let n=e.nodeName===`#text`?e.nodeValue:Ht(e),r=Tt(n);if(r.width<=t||r.width>=1&&t>0&&t<1)return r;let i=e.style?.textWrap??`wrap`,a=Vt(n,t,i);return Tt(a)},Zt=e=>{if(e?.parentNode)return e.yogaNode??Zt(e.parentNode)},Qt=e=>{Zt(e)?.markDirty()},$t=(e,t)=>{typeof t!=`string`&&(t=String(t)),e.nodeValue=t,Qt(e)},en=(e,t)=>{`position`in t&&e.setPositionType(t.position===`absolute`?w.POSITION_TYPE_ABSOLUTE:w.POSITION_TYPE_RELATIVE)},tn=(e,t)=>{`margin`in t&&e.setMargin(w.EDGE_ALL,t.margin??0),`marginX`in t&&e.setMargin(w.EDGE_HORIZONTAL,t.marginX??0),`marginY`in t&&e.setMargin(w.EDGE_VERTICAL,t.marginY??0),`marginLeft`in t&&e.setMargin(w.EDGE_START,t.marginLeft||0),`marginRight`in t&&e.setMargin(w.EDGE_END,t.marginRight||0),`marginTop`in t&&e.setMargin(w.EDGE_TOP,t.marginTop||0),`marginBottom`in t&&e.setMargin(w.EDGE_BOTTOM,t.marginBottom||0)},nn=(e,t)=>{`padding`in t&&e.setPadding(w.EDGE_ALL,t.padding??0),`paddingX`in t&&e.setPadding(w.EDGE_HORIZONTAL,t.paddingX??0),`paddingY`in t&&e.setPadding(w.EDGE_VERTICAL,t.paddingY??0),`paddingLeft`in t&&e.setPadding(w.EDGE_LEFT,t.paddingLeft||0),`paddingRight`in t&&e.setPadding(w.EDGE_RIGHT,t.paddingRight||0),`paddingTop`in t&&e.setPadding(w.EDGE_TOP,t.paddingTop||0),`paddingBottom`in t&&e.setPadding(w.EDGE_BOTTOM,t.paddingBottom||0)},rn=(e,t)=>{`flexGrow`in t&&e.setFlexGrow(t.flexGrow??0),`flexShrink`in t&&e.setFlexShrink(typeof t.flexShrink==`number`?t.flexShrink:1),`flexWrap`in t&&(t.flexWrap===`nowrap`&&e.setFlexWrap(w.WRAP_NO_WRAP),t.flexWrap===`wrap`&&e.setFlexWrap(w.WRAP_WRAP),t.flexWrap===`wrap-reverse`&&e.setFlexWrap(w.WRAP_WRAP_REVERSE)),`flexDirection`in t&&(t.flexDirection===`row`&&e.setFlexDirection(w.FLEX_DIRECTION_ROW),t.flexDirection===`row-reverse`&&e.setFlexDirection(w.FLEX_DIRECTION_ROW_REVERSE),t.flexDirection===`column`&&e.setFlexDirection(w.FLEX_DIRECTION_COLUMN),t.flexDirection===`column-reverse`&&e.setFlexDirection(w.FLEX_DIRECTION_COLUMN_REVERSE)),`flexBasis`in t&&(typeof t.flexBasis==`number`?e.setFlexBasis(t.flexBasis):typeof t.flexBasis==`string`?e.setFlexBasisPercent(Number.parseInt(t.flexBasis,10)):e.setFlexBasis(NaN)),`alignItems`in t&&(t.alignItems!==`stretch`&&t.alignItems||e.setAlignItems(w.ALIGN_STRETCH),t.alignItems===`flex-start`&&e.setAlignItems(w.ALIGN_FLEX_START),t.alignItems===`center`&&e.setAlignItems(w.ALIGN_CENTER),t.alignItems===`flex-end`&&e.setAlignItems(w.ALIGN_FLEX_END)),`alignSelf`in t&&(t.alignSelf!==`auto`&&t.alignSelf||e.setAlignSelf(w.ALIGN_AUTO),t.alignSelf===`flex-start`&&e.setAlignSelf(w.ALIGN_FLEX_START),t.alignSelf===`center`&&e.setAlignSelf(w.ALIGN_CENTER),t.alignSelf===`flex-end`&&e.setAlignSelf(w.ALIGN_FLEX_END)),`justifyContent`in t&&(t.justifyContent!==`flex-start`&&t.justifyContent||e.setJustifyContent(w.JUSTIFY_FLEX_START),t.justifyContent===`center`&&e.setJustifyContent(w.JUSTIFY_CENTER),t.justifyContent===`flex-end`&&e.setJustifyContent(w.JUSTIFY_FLEX_END),t.justifyContent===`space-between`&&e.setJustifyContent(w.JUSTIFY_SPACE_BETWEEN),t.justifyContent===`space-around`&&e.setJustifyContent(w.JUSTIFY_SPACE_AROUND),t.justifyContent===`space-evenly`&&e.setJustifyContent(w.JUSTIFY_SPACE_EVENLY))},an=(e,t)=>{`width`in t&&(typeof t.width==`number`?e.setWidth(t.width):typeof t.width==`string`?e.setWidthPercent(Number.parseInt(t.width,10)):e.setWidthAuto()),`height`in t&&(typeof t.height==`number`?e.setHeight(t.height):typeof t.height==`string`?e.setHeightPercent(Number.parseInt(t.height,10)):e.setHeightAuto()),`minWidth`in t&&(typeof t.minWidth==`string`?e.setMinWidthPercent(Number.parseInt(t.minWidth,10)):e.setMinWidth(t.minWidth??0)),`minHeight`in t&&(typeof t.minHeight==`string`?e.setMinHeightPercent(Number.parseInt(t.minHeight,10)):e.setMinHeight(t.minHeight??0))},on=(e,t)=>{`display`in t&&e.setDisplay(t.display===`flex`?w.DISPLAY_FLEX:w.DISPLAY_NONE)},sn=(e,t)=>{if(`borderStyle`in t){let n=+!!t.borderStyle;t.borderTop!==!1&&e.setBorder(w.EDGE_TOP,n),t.borderBottom!==!1&&e.setBorder(w.EDGE_BOTTOM,n),t.borderLeft!==!1&&e.setBorder(w.EDGE_LEFT,n),t.borderRight!==!1&&e.setBorder(w.EDGE_RIGHT,n)}},cn=(e,t)=>{`gap`in t&&e.setGap(w.GUTTER_ALL,t.gap??0),`columnGap`in t&&e.setGap(w.GUTTER_COLUMN,t.columnGap??0),`rowGap`in t&&e.setGap(w.GUTTER_ROW,t.rowGap??0)},ln=(e,t={})=>{en(e,t),tn(e,t),nn(e,t),rn(e,t),an(e,t),on(e,t),sn(e,t),cn(e,t)};if(l.env.DEV===`true`)try{await import(`./devtools-DiRNY4u8.js`)}catch(e){if(e.code===`ERR_MODULE_NOT_FOUND`)console.warn(`The environment variable DEV is set to true, so Ink tried to import \`react-devtools-core\`,
|
|
79
79
|
but this failed as it was not installed. Debugging with React Devtools requires it.
|
|
80
80
|
|
|
81
81
|
To install use this command:
|
|
82
82
|
|
|
83
83
|
$ npm install --save-dev react-devtools-core
|
|
84
|
-
`);else throw e}const un=(e,t)=>{if(e===t)return;if(!e)return t;let n={},r=!1;for(let i of Object.keys(e))t&&Object.hasOwn(t,i)||(n[i]=void 0,r=!0);if(t)for(let i of Object.keys(t))t[i]!==e[i]&&(n[i]=t[i],r=!0);return r?n:void 0},dn=e=>{e?.unsetMeasureFunc(),e?.freeRecursive()};let fn=he.NoEventPriority,pn;var mn=(0,dt.default)({getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,resetAfterCommit(e){typeof e.onComputeLayout==`function`&&e.onComputeLayout(),e.isStaticDirty?(e.isStaticDirty=!1,typeof e.onImmediateRender==`function`&&e.onImmediateRender()):typeof e.onRender==`function`&&e.onRender()},getChildHostContext(e,t){let n=e.isInsideText,r=t===`ink-text`||t===`ink-virtual-text`;return n===r?e:{isInsideText:r}},shouldSetTextContent:()=>!1,createInstance(e,t,n,r){if(r.isInsideText&&e===`ink-box`)throw Error(`<Box> can’t be nested inside <Text> component`);let i=e===`ink-text`&&r.isInsideText?`ink-virtual-text`:e,a=Ut(i);for(let[e,r]of Object.entries(t))e!==`children`&&(e===`style`?(Jt(a,r),a.yogaNode&&ln(a.yogaNode,r)):e===`internal_transform`?a.internal_transform=r:e===`internal_static`?(pn=n,a.internal_static=!0,n.isStaticDirty=!0,n.staticNode=a):qt(a,e,r));return a},createTextInstance(e,t,n){if(!n.isInsideText)throw Error(`Text string "${e}" must be rendered inside <Text> component`);return Yt(e)},resetTextContent(){},hideTextInstance(e){$t(e,``)},unhideTextInstance(e,t){$t(e,t)},getPublicInstance:e=>e,hideInstance(e){e.yogaNode?.setDisplay(w.DISPLAY_NONE)},unhideInstance(e){e.yogaNode?.setDisplay(w.DISPLAY_FLEX)},appendInitialChild:Wt,appendChild:Wt,insertBefore:Gt,finalizeInitialChildren(){return!1},isPrimaryRenderer:!0,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},getInstanceFromNode:()=>null,prepareScopeUpdate(){},getInstanceFromScope:()=>null,appendChildToContainer:Wt,insertInContainerBefore:Gt,removeChildFromContainer(e,t){Kt(e,t),dn(t.yogaNode)},commitUpdate(e,t,n,r){pn&&e.internal_static&&(pn.isStaticDirty=!0);let i=un(n,r),a=un(n.style,r.style);if(i||a){if(i)for(let[t,n]of Object.entries(i))t===`style`?Jt(e,n):t===`internal_transform`?e.internal_transform=n:t===`internal_static`?e.internal_static=!0:qt(e,t,n);a&&e.yogaNode&&ln(e.yogaNode,a)}},commitTextUpdate(e,t,n){$t(e,n)},removeChild(e,t){Kt(e,t),dn(t.yogaNode)},setCurrentUpdatePriority(e){fn=e},getCurrentUpdatePriority:()=>fn,resolveUpdatePriority(){return fn===0?he.DefaultEventPriority:fn},maySuspendCommit(){return!1},NotPendingTransition:void 0,HostTransitionContext:(0,b.createContext)(null),resetFormInstance(){},requestPostPaintCallback(){},shouldAttemptEagerTransition(){return!1},trackSchedulerEvent(){},resolveEventType(){return null},resolveEventTimeStamp(){return-1.1},preloadInstance(){return!0},startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady(){return null}});function hn(e,t=1,n={}){let{indent:r=` `,includeEmptyLines:i=!1}=n;if(typeof e!=`string`)throw TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!=`number`)throw TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!=`string`)throw TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let a=i?/^/gm:/^(?!\s*$)/gm;return e.replace(a,r.repeat(t))}const gn=e=>e.getComputedWidth()-e.getComputedPadding(w.EDGE_LEFT)-e.getComputedPadding(w.EDGE_RIGHT)-e.getComputedBorder(w.EDGE_LEFT)-e.getComputedBorder(w.EDGE_RIGHT);var _n=/* @__PURE__ */ n(((e,t)=>{t.exports={single:{topLeft:`┌`,top:`─`,topRight:`┐`,right:`│`,bottomRight:`┘`,bottom:`─`,bottomLeft:`└`,left:`│`},double:{topLeft:`╔`,top:`═`,topRight:`╗`,right:`║`,bottomRight:`╝`,bottom:`═`,bottomLeft:`╚`,left:`║`},round:{topLeft:`╭`,top:`─`,topRight:`╮`,right:`│`,bottomRight:`╯`,bottom:`─`,bottomLeft:`╰`,left:`│`},bold:{topLeft:`┏`,top:`━`,topRight:`┓`,right:`┃`,bottomRight:`┛`,bottom:`━`,bottomLeft:`┗`,left:`┃`},singleDouble:{topLeft:`╓`,top:`─`,topRight:`╖`,right:`║`,bottomRight:`╜`,bottom:`─`,bottomLeft:`╙`,left:`║`},doubleSingle:{topLeft:`╒`,top:`═`,topRight:`╕`,right:`│`,bottomRight:`╛`,bottom:`═`,bottomLeft:`╘`,left:`│`},classic:{topLeft:`+`,top:`-`,topRight:`+`,right:`|`,bottomRight:`+`,bottom:`-`,bottomLeft:`+`,left:`|`},arrow:{topLeft:`↘`,top:`↓`,topRight:`↙`,right:`←`,bottomRight:`↖`,bottom:`↑`,bottomLeft:`↗`,left:`→`}}})),vn=/* @__PURE__ */ t((/* @__PURE__ */ n(((e,t)=>{let n=_n();t.exports=n,t.exports.default=n})))(),1);const yn=(e=0)=>t=>`\u001B[${t+e}m`,bn=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,xn=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,k={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(k.modifier);const Sn=Object.keys(k.color),Cn=Object.keys(k.bgColor);[...Sn,...Cn];function wn(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(k)){for(let[t,r]of Object.entries(n))k[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=k[t],e.set(r[0],r[1]);Object.defineProperty(k,t,{value:n,enumerable:!1})}return Object.defineProperty(k,"codes",{value:e,enumerable:!1}),k.color.close=`\x1B[39m`,k.bgColor.close=`\x1B[49m`,k.color.ansi=yn(),k.color.ansi256=bn(),k.color.ansi16m=xn(),k.bgColor.ansi=yn(10),k.bgColor.ansi256=bn(10),k.bgColor.ansi16m=xn(10),Object.defineProperties(k,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>k.rgbToAnsi256(...k.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>k.ansi256ToAnsi(k.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>k.ansi256ToAnsi(k.hexToAnsi256(e)),enumerable:!1}}),k}const Tn=wn();function En(e,t=globalThis.Deno?globalThis.Deno.args:
|
|
84
|
+
`);else throw e}const un=(e,t)=>{if(e===t)return;if(!e)return t;let n={},r=!1;for(let i of Object.keys(e))t&&Object.hasOwn(t,i)||(n[i]=void 0,r=!0);if(t)for(let i of Object.keys(t))t[i]!==e[i]&&(n[i]=t[i],r=!0);return r?n:void 0},dn=e=>{e?.unsetMeasureFunc(),e?.freeRecursive()};let fn=he.NoEventPriority,pn;var mn=(0,dt.default)({getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,resetAfterCommit(e){typeof e.onComputeLayout==`function`&&e.onComputeLayout(),e.isStaticDirty?(e.isStaticDirty=!1,typeof e.onImmediateRender==`function`&&e.onImmediateRender()):typeof e.onRender==`function`&&e.onRender()},getChildHostContext(e,t){let n=e.isInsideText,r=t===`ink-text`||t===`ink-virtual-text`;return n===r?e:{isInsideText:r}},shouldSetTextContent:()=>!1,createInstance(e,t,n,r){if(r.isInsideText&&e===`ink-box`)throw Error(`<Box> can’t be nested inside <Text> component`);let i=e===`ink-text`&&r.isInsideText?`ink-virtual-text`:e,a=Ut(i);for(let[e,r]of Object.entries(t))e!==`children`&&(e===`style`?(Jt(a,r),a.yogaNode&&ln(a.yogaNode,r)):e===`internal_transform`?a.internal_transform=r:e===`internal_static`?(pn=n,a.internal_static=!0,n.isStaticDirty=!0,n.staticNode=a):qt(a,e,r));return a},createTextInstance(e,t,n){if(!n.isInsideText)throw Error(`Text string "${e}" must be rendered inside <Text> component`);return Yt(e)},resetTextContent(){},hideTextInstance(e){$t(e,``)},unhideTextInstance(e,t){$t(e,t)},getPublicInstance:e=>e,hideInstance(e){e.yogaNode?.setDisplay(w.DISPLAY_NONE)},unhideInstance(e){e.yogaNode?.setDisplay(w.DISPLAY_FLEX)},appendInitialChild:Wt,appendChild:Wt,insertBefore:Gt,finalizeInitialChildren(){return!1},isPrimaryRenderer:!0,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},getInstanceFromNode:()=>null,prepareScopeUpdate(){},getInstanceFromScope:()=>null,appendChildToContainer:Wt,insertInContainerBefore:Gt,removeChildFromContainer(e,t){Kt(e,t),dn(t.yogaNode)},commitUpdate(e,t,n,r){pn&&e.internal_static&&(pn.isStaticDirty=!0);let i=un(n,r),a=un(n.style,r.style);if(i||a){if(i)for(let[t,n]of Object.entries(i))t===`style`?Jt(e,n):t===`internal_transform`?e.internal_transform=n:t===`internal_static`?e.internal_static=!0:qt(e,t,n);a&&e.yogaNode&&ln(e.yogaNode,a)}},commitTextUpdate(e,t,n){$t(e,n)},removeChild(e,t){Kt(e,t),dn(t.yogaNode)},setCurrentUpdatePriority(e){fn=e},getCurrentUpdatePriority:()=>fn,resolveUpdatePriority(){return fn===0?he.DefaultEventPriority:fn},maySuspendCommit(){return!1},NotPendingTransition:void 0,HostTransitionContext:(0,b.createContext)(null),resetFormInstance(){},requestPostPaintCallback(){},shouldAttemptEagerTransition(){return!1},trackSchedulerEvent(){},resolveEventType(){return null},resolveEventTimeStamp(){return-1.1},preloadInstance(){return!0},startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady(){return null}});function hn(e,t=1,n={}){let{indent:r=` `,includeEmptyLines:i=!1}=n;if(typeof e!=`string`)throw TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!=`number`)throw TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!=`string`)throw TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let a=i?/^/gm:/^(?!\s*$)/gm;return e.replace(a,r.repeat(t))}const gn=e=>e.getComputedWidth()-e.getComputedPadding(w.EDGE_LEFT)-e.getComputedPadding(w.EDGE_RIGHT)-e.getComputedBorder(w.EDGE_LEFT)-e.getComputedBorder(w.EDGE_RIGHT);var _n=/* @__PURE__ */ n(((e,t)=>{t.exports={single:{topLeft:`┌`,top:`─`,topRight:`┐`,right:`│`,bottomRight:`┘`,bottom:`─`,bottomLeft:`└`,left:`│`},double:{topLeft:`╔`,top:`═`,topRight:`╗`,right:`║`,bottomRight:`╝`,bottom:`═`,bottomLeft:`╚`,left:`║`},round:{topLeft:`╭`,top:`─`,topRight:`╮`,right:`│`,bottomRight:`╯`,bottom:`─`,bottomLeft:`╰`,left:`│`},bold:{topLeft:`┏`,top:`━`,topRight:`┓`,right:`┃`,bottomRight:`┛`,bottom:`━`,bottomLeft:`┗`,left:`┃`},singleDouble:{topLeft:`╓`,top:`─`,topRight:`╖`,right:`║`,bottomRight:`╜`,bottom:`─`,bottomLeft:`╙`,left:`║`},doubleSingle:{topLeft:`╒`,top:`═`,topRight:`╕`,right:`│`,bottomRight:`╛`,bottom:`═`,bottomLeft:`╘`,left:`│`},classic:{topLeft:`+`,top:`-`,topRight:`+`,right:`|`,bottomRight:`+`,bottom:`-`,bottomLeft:`+`,left:`|`},arrow:{topLeft:`↘`,top:`↓`,topRight:`↙`,right:`←`,bottomRight:`↖`,bottom:`↑`,bottomLeft:`↗`,left:`→`}}})),vn=/* @__PURE__ */ t((/* @__PURE__ */ n(((e,t)=>{let n=_n();t.exports=n,t.exports.default=n})))(),1);const yn=(e=0)=>t=>`\u001B[${t+e}m`,bn=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,xn=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,k={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(k.modifier);const Sn=Object.keys(k.color),Cn=Object.keys(k.bgColor);[...Sn,...Cn];function wn(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(k)){for(let[t,r]of Object.entries(n))k[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=k[t],e.set(r[0],r[1]);Object.defineProperty(k,t,{value:n,enumerable:!1})}return Object.defineProperty(k,"codes",{value:e,enumerable:!1}),k.color.close=`\x1B[39m`,k.bgColor.close=`\x1B[49m`,k.color.ansi=yn(),k.color.ansi256=bn(),k.color.ansi16m=xn(),k.bgColor.ansi=yn(10),k.bgColor.ansi256=bn(10),k.bgColor.ansi16m=xn(10),Object.defineProperties(k,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>k.rgbToAnsi256(...k.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>k.ansi256ToAnsi(k.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>k.ansi256ToAnsi(k.hexToAnsi256(e)),enumerable:!1}}),k}const Tn=wn();function En(e,t=globalThis.Deno?globalThis.Deno.args:l.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}const{env:A}=l;let Dn;En(`no-color`)||En(`no-colors`)||En(`color=false`)||En(`color=never`)?Dn=0:(En(`color`)||En(`colors`)||En(`color=true`)||En(`color=always`))&&(Dn=1);function On(){if(`FORCE_COLOR`in A)return A.FORCE_COLOR===`true`?1:A.FORCE_COLOR===`false`?0:A.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(A.FORCE_COLOR,10),3)}function kn(e){return e!==0&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function An(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=On();r!==void 0&&(Dn=r);let i=n?Dn:r;if(i===0)return 0;if(n){if(En(`color=16m`)||En(`color=full`)||En(`color=truecolor`))return 3;if(En(`color=256`))return 2}if(`TF_BUILD`in A&&`AGENT_NAME`in A)return 1;if(e&&!t&&i===void 0)return 0;let a=i||0;if(A.TERM===`dumb`)return a;if(l.platform===`win32`){let e=o.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in A)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(e=>e in A)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in A)||A.CI_NAME===`codeship`?1:a;if(`TEAMCITY_VERSION`in A)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(A.TEAMCITY_VERSION);if(A.COLORTERM===`truecolor`||A.TERM===`xterm-kitty`||A.TERM===`xterm-ghostty`||A.TERM===`wezterm`)return 3;if(`TERM_PROGRAM`in A){let e=Number.parseInt((A.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(A.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(A.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(A.TERM)||`COLORTERM`in A?1:a}function jn(e,t={}){return kn(An(e,{streamIsTTY:e&&e.isTTY,...t}))}const Mn={stdout:jn({isTTY:f.isatty(1)}),stderr:jn({isTTY:f.isatty(2)})};function Nn(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function Pn(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
|
|
85
85
|
`:`
|
|
86
86
|
`)+n,i=r+1,r=e.indexOf(`
|
|
87
87
|
`,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:Fn,stderr:In}=Mn,Ln=Symbol(`GENERATOR`),Rn=Symbol(`STYLER`),zn=Symbol(`IS_EMPTY`),Bn=[`ansi`,`ansi`,`ansi256`,`ansi16m`],Vn=Object.create(null),Hn=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=Fn?Fn.level:0;e.level=t.level===void 0?n:t.level},Un=e=>{let t=(...e)=>e.join(` `);return Hn(t,e),Object.setPrototypeOf(t,Wn.prototype),t};function Wn(e){return Un(e)}Object.setPrototypeOf(Wn.prototype,Function.prototype);for(let[e,t]of Object.entries(Tn))Vn[e]={get(){let n=Jn(this,qn(t.open,t.close,this[Rn]),this[zn]);return Object.defineProperty(this,e,{value:n}),n}};Vn.visible={get(){let e=Jn(this,this[Rn],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const Gn=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?Tn[n].ansi16m(...r):t===`ansi256`?Tn[n].ansi256(Tn.rgbToAnsi256(...r)):Tn[n].ansi(Tn.rgbToAnsi(...r)):e===`hex`?Gn(`rgb`,t,n,...Tn.hexToRgb(...r)):Tn[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){Vn[e]={get(){let{level:t}=this;return function(...n){let r=qn(Gn(e,Bn[t],`color`,...n),Tn.color.close,this[Rn]);return Jn(this,r,this[zn])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);Vn[t]={get(){let{level:t}=this;return function(...n){let r=qn(Gn(e,Bn[t],`bgColor`,...n),Tn.bgColor.close,this[Rn]);return Jn(this,r,this[zn])}}}}const Kn=Object.defineProperties(()=>{},{...Vn,level:{enumerable:!0,get(){return this[Ln].level},set(e){this[Ln].level=e}}}),qn=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},Jn=(e,t,n)=>{let r=(...e)=>Yn(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,Kn),r[Ln]=e,r[Rn]=t,r[zn]=n,r},Yn=(e,t)=>{if(e.level<=0||!t)return e[zn]?``:t;let n=e[Rn];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=Nn(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
|
|
@@ -92,21 +92,21 @@ $ npm install --save-dev react-devtools-core
|
|
|
92
92
|
`;n=(e.style.flexDirection===`row-reverse`||e.style.flexDirection===`column-reverse`?[...e.childNodes].reverse():[...e.childNodes]).map(n=>nr(n,{parentRole:e.internal_accessibility?.role,skipStaticElements:t.skipStaticElements})).filter(Boolean).join(r)}if(e.internal_accessibility){let{role:r,state:i}=e.internal_accessibility;if(i){let e=Object.keys(i).filter(e=>i[e]).join(`, `);e&&(n=`(${e}) ${n}`)}r&&r!==t.parentRole&&(n=`${r}: ${n}`)}return n},rr=(e,t,n)=>{let{offsetX:r=0,offsetY:i=0,transformers:a=[],skipStaticElements:o}=n;if(o&&e.internal_static)return;let{yogaNode:s}=e;if(s){if(s.getDisplay()===w.DISPLAY_NONE)return;let n=r+s.getComputedLeft(),c=i+s.getComputedTop(),l=a;if(typeof e.internal_transform==`function`&&(l=[e.internal_transform,...a]),e.nodeName===`ink-text`){let r=Ht(e);if(r.length>0){let i=E(r),a=gn(s);if(i>a){let t=e.style.textWrap??`wrap`;r=Vt(r,a,t)}r=tr(e,r),t.write(n,c,r,{transformers:l})}return}let u=!1;if(e.nodeName===`ink-box`){er(n,c,e,t),$n(n,c,e,t);let r=e.style.overflowX===`hidden`||e.style.overflow===`hidden`,i=e.style.overflowY===`hidden`||e.style.overflow===`hidden`;if(r||i){let e=r?n+s.getComputedBorder(w.EDGE_LEFT):void 0,a=r?n+s.getComputedWidth()-s.getComputedBorder(w.EDGE_RIGHT):void 0,o=i?c+s.getComputedBorder(w.EDGE_TOP):void 0,l=i?c+s.getComputedHeight()-s.getComputedBorder(w.EDGE_BOTTOM):void 0;t.clip({x1:e,x2:a,y1:o,y2:l}),u=!0}}if(e.nodeName===`ink-root`||e.nodeName===`ink-box`){for(let r of e.childNodes)rr(r,t,{offsetX:n,offsetY:c,transformers:l,skipStaticElements:o});u&&t.unclip()}}};function ir(e){return Number.isInteger(e)?Ve(e)===2:!1}const ar=/* @__PURE__ */ new Set([27,155]),or=`0`.codePointAt(0),sr=`9`.codePointAt(0),cr=/* @__PURE__ */ new Set,lr=/* @__PURE__ */ new Map;for(let[e,t]of Qe.codes)cr.add(Qe.color.ansi(t)),lr.set(Qe.color.ansi(e),Qe.color.ansi(t));function ur(e){if(cr.has(e))return e;if(lr.has(e))return lr.get(e);e=e.slice(2),e.includes(`;`)&&(e=e[0]+`0`);let t=Qe.codes.get(Number.parseInt(e,10));return t?Qe.color.ansi(t):Qe.reset.open}function dr(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(n>=or&&n<=sr)return t}return-1}function fr(e,t){e=e.slice(t,t+19);let n=dr(e);if(n!==-1){let t=e.indexOf(`m`,n);return t===-1&&(t=e.length),e.slice(0,t+1)}}function pr(e,t=1/0){let n=[],r=0,i=0;for(;r<e.length;){let a=e.codePointAt(r);if(ar.has(a)){let t=fr(e,r);if(t){n.push({type:`ansi`,code:t,endCode:ur(t)}),r+=t.length;continue}}let o=ir(a),s=String.fromCodePoint(a);if(n.push({type:`character`,value:s,isFullWidth:o}),r+=s.length,i+=o?2:s.length,i>=t)break}return n}function mr(e){let t=[];for(let n of e)n.code===Qe.reset.open?t=[]:cr.has(n.code)?t=t.filter(e=>e.endCode!==n.code):(t=t.filter(e=>e.endCode!==n.endCode),t.push(n));return t}function hr(e){return mr(e).map(({endCode:e})=>e).reverse().join(``)}function gr(e,t,n){let r=pr(e,n),i=[],a=0,o=``,s=!1;for(let e of r){if(n!==void 0&&a>=n)break;e.type===`ansi`?(i.push(e),s&&(o+=e.code)):(!s&&a>=t&&(s=!0,i=mr(i),o=i.map(({code:e})=>e).join(``)),s&&(o+=e.value),a+=e.isFullWidth?2:e.value.length)}return o+=hr(i),o}const _r=(e=0)=>t=>`\u001B[${t+e}m`,vr=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,yr=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,N={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(N.modifier);const br=Object.keys(N.color),xr=Object.keys(N.bgColor);[...br,...xr];function Sr(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(N)){for(let[t,r]of Object.entries(n))N[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=N[t],e.set(r[0],r[1]);Object.defineProperty(N,t,{value:n,enumerable:!1})}return Object.defineProperty(N,"codes",{value:e,enumerable:!1}),N.color.close=`\x1B[39m`,N.bgColor.close=`\x1B[49m`,N.color.ansi=_r(),N.color.ansi256=vr(),N.color.ansi16m=yr(),N.bgColor.ansi=_r(10),N.bgColor.ansi256=vr(10),N.bgColor.ansi16m=yr(10),Object.defineProperties(N,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>N.rgbToAnsi256(...N.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>N.ansi256ToAnsi(N.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>N.ansi256ToAnsi(N.hexToAnsi256(e)),enumerable:!1}}),N}const Cr=Sr(),wr=/* @__PURE__ */ new Set([27,155]),Tr=/* @__PURE__ */ new Set,Er=/* @__PURE__ */ new Map;for(let[e,t]of Cr.codes)Tr.add(Cr.color.ansi(t)),Er.set(Cr.color.ansi(e),Cr.color.ansi(t));const Dr=`\x1B]8;;`.split(``).map(e=>e.charCodeAt(0));function Or(e){if(Tr.has(e))return e;if(Er.has(e))return Er.get(e);if(e.startsWith(`\x1B]8;;`))return`\x1B]8;;\x07`;e=e.slice(2),e.includes(`;`)&&(e=e[0]+`0`);let t=Cr.codes.get(parseInt(e,10));return t?Cr.color.ansi(t):Cr.reset.open}function kr(e){return e.map(e=>e.code).join(``)}function Ar(e){return P([],e)}function P(e,t){let n=[...e];for(let e of t)e.code===Cr.reset.open?n=[]:Tr.has(e.code)?n=n.filter(t=>t.endCode!==e.code):(n=n.filter(t=>t.endCode!==e.endCode),n.push(e));return n}function jr(e){return Ar(e).reverse().map(e=>({...e,code:e.endCode}))}function Mr(e,t){let n=new Set(t.map(e=>e.endCode)),r=new Set(e.map(e=>e.code));return[...jr(e.filter(e=>!n.has(e.endCode))),...t.filter(e=>!r.has(e.code))]}function Nr(e){let t=[],n=[];for(let r of e)r.type===`ansi`?t=P(t,[r]):r.type===`char`&&n.push({...r,styles:[...t]});return n}function Pr(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];t+=kr(n===0?r.styles:Mr(e[n-1].styles,r.styles)),t+=r.value,n===e.length-1&&(t+=kr(Mr(r.styles,[])))}return t}function Fr(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Ir(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Lr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Rr(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function zr(e,{ambiguousAsWide:t=!1}={}){return Rr(e),Ir(e)||Lr(e)||t&&Fr(e)?2:1}function Br(e){return Number.isInteger(e)?zr(e)===2:!1}function Vr(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=48&&n<=57)return t}return-1}function Hr(e,t){e=e.slice(t);for(let t=1;t<Dr.length;t++)if(e.charCodeAt(t)!==Dr[t])return;let n=e.indexOf(`\x07`,5);if(n!==-1)return e.slice(0,n+1)}function Ur(e,t){e=e.slice(t,t+19);let n=Vr(e);if(n!==-1){let t=e.indexOf(`m`,n);return t===-1&&(t=e.length),e.slice(0,t+1)}}function Wr(e,t=1/0){let n=[],r=0,i=0;for(;r<e.length;){let a=e.codePointAt(r);if(wr.has(a)){let t=Hr(e,r)||Ur(e,r);if(t){n.push({type:`ansi`,code:t,endCode:Or(t)}),r+=t.length;continue}}let o=Br(a),s=String.fromCodePoint(a);if(n.push({type:`char`,value:s,fullWidth:o}),r+=s.length,i+=o?2:s.length,i>=t)break}return n}var Gr=class{width;height;operations=[];constructor(e){let{width:t,height:n}=e;this.width=t,this.height=n}write(e,t,n,r){let{transformers:i}=r;n&&this.operations.push({type:`write`,x:e,y:t,text:n,transformers:i})}clip(e){this.operations.push({type:`clip`,clip:e})}unclip(){this.operations.push({type:`unclip`})}get(){let e=[];for(let t=0;t<this.height;t++){let t=[];for(let e=0;e<this.width;e++)t.push({type:`char`,value:` `,fullWidth:!1,styles:[]});e.push(t)}let t=[];for(let n of this.operations)if(n.type===`clip`&&t.push(n.clip),n.type===`unclip`&&t.pop(),n.type===`write`){let{text:r,transformers:i}=n,{x:a,y:o}=n,s=r.split(`
|
|
93
93
|
`),c=t.at(-1);if(c){let e=typeof c?.x1==`number`&&typeof c?.x2==`number`,t=typeof c?.y1==`number`&&typeof c?.y2==`number`;if(e){let e=E(r);if(a+e<c.x1||a>c.x2)continue}if(t){let e=s.length;if(o+e<c.y1||o>c.y2)continue}if(e&&(s=s.map(e=>{let t=a<c.x1?c.x1-a:0,n=Ge(e);return gr(e,t,a+n>c.x2?c.x2-a:n)}),a<c.x1&&(a=c.x1)),t){let e=o<c.y1?c.y1-o:0,t=s.length,n=o+t>c.y2?c.y2-o:t;s=s.slice(e,n),o<c.y1&&(o=c.y1)}}let l=0;for(let[t,n]of s.entries()){let r=e[o+l];if(!r)continue;for(let e of i)n=e(n,t);let s=Nr(Wr(n)),c=a;for(let e of s){r[c]=e;let t=Math.max(1,Ge(e.value));if(t>1)for(let n=1;n<t;n++)r[c+n]={type:`char`,value:``,fullWidth:!1,styles:e.styles};c+=t}l++}}return{output:e.map(e=>Pr(e.filter(e=>e!==void 0)).trimEnd()).join(`
|
|
94
94
|
`),height:e.length}}};const Kr=(e,t)=>{if(e.yogaNode){if(t){let t=nr(e,{skipStaticElements:!0}),n=t===``?0:t.split(`
|
|
95
|
-
`).length,r=``;return e.staticNode&&(r=nr(e.staticNode,{skipStaticElements:!1})),{output:t,outputHeight:n,staticOutput:r?`${r}\n`:``}}let n=new Gr({width:e.yogaNode.getComputedWidth(),height:e.yogaNode.getComputedHeight()});rr(e,n,{skipStaticElements:!0});let r;e.staticNode?.yogaNode&&(r=new Gr({width:e.staticNode.yogaNode.getComputedWidth(),height:e.staticNode.yogaNode.getComputedHeight()}),rr(e.staticNode,r,{skipStaticElements:!1}));let{output:i,height:a}=n.get();return{output:i,outputHeight:a,staticOutput:r?`${r.get().output}\n`:``}}return{output:``,outputHeight:0,staticOutput:``}};var qr=/* @__PURE__ */ n(((e,t)=>{let n=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};t.exports=n,t.exports.default=n}));const Jr=(0,(/* @__PURE__ */ t((/* @__PURE__ */ n(((e,t)=>{let n=qr(),r=/* @__PURE__ */ new WeakMap,i=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let i,a=0,o=e.displayName||e.name||`<anonymous>`,s=function(...n){if(r.set(s,++a),a===1)i=e.apply(this,n),e=null;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return i};return n(s,e),r.set(s,a),s};t.exports=i,t.exports.default=i,t.exports.callCount=e=>{if(!r.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return r.get(e)}})))(),1)).default)(()=>{(0,ue.default)(()=>{
|
|
95
|
+
`).length,r=``;return e.staticNode&&(r=nr(e.staticNode,{skipStaticElements:!1})),{output:t,outputHeight:n,staticOutput:r?`${r}\n`:``}}let n=new Gr({width:e.yogaNode.getComputedWidth(),height:e.yogaNode.getComputedHeight()});rr(e,n,{skipStaticElements:!0});let r;e.staticNode?.yogaNode&&(r=new Gr({width:e.staticNode.yogaNode.getComputedWidth(),height:e.staticNode.yogaNode.getComputedHeight()}),rr(e.staticNode,r,{skipStaticElements:!1}));let{output:i,height:a}=n.get();return{output:i,outputHeight:a,staticOutput:r?`${r.get().output}\n`:``}}return{output:``,outputHeight:0,staticOutput:``}};var qr=/* @__PURE__ */ n(((e,t)=>{let n=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};t.exports=n,t.exports.default=n}));const Jr=(0,(/* @__PURE__ */ t((/* @__PURE__ */ n(((e,t)=>{let n=qr(),r=/* @__PURE__ */ new WeakMap,i=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let i,a=0,o=e.displayName||e.name||`<anonymous>`,s=function(...n){if(r.set(s,++a),a===1)i=e.apply(this,n),e=null;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return i};return n(s,e),r.set(s,a),s};t.exports=i,t.exports.default=i,t.exports.callCount=e=>{if(!r.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return r.get(e)}})))(),1)).default)(()=>{(0,ue.default)(()=>{l.stderr.write(`\x1B[?25h`)},{alwaysLast:!0})});let Yr=!1;const Xr={};Xr.show=(e=l.stderr)=>{e.isTTY&&(Yr=!1,e.write(`\x1B[?25h`))},Xr.hide=(e=l.stderr)=>{e.isTTY&&(Jr(),Yr=!0,e.write(`\x1B[?25l`))},Xr.toggle=(e,t)=>{e!==void 0&&(Yr=e),Yr?Xr.show(t):Xr.hide(t)};const Zr={create:(e,{showCursor:t=!1}={})=>{let n=0,r=``,i=!1,a=a=>{!t&&!i&&(Xr.hide(),i=!0);let o=a+`
|
|
96
96
|
`;o!==r&&(r=o,e.write(te(n)+o),n=o.split(`
|
|
97
97
|
`).length)};return a.clear=()=>{e.write(te(n)),r=``,n=0},a.done=()=>{r=``,n=0,t||(Xr.show(),i=!1)},a.sync=e=>{let t=e+`
|
|
98
98
|
`;r=t,n=t.split(`
|
|
99
|
-
`).length},a}},Qr=/* @__PURE__ */ new WeakMap,$r=(0,b.createContext)({exit(){}});$r.displayName=`InternalAppContext`;const ei=(0,b.createContext)({stdin:
|
|
99
|
+
`).length},a}},Qr=/* @__PURE__ */ new WeakMap,$r=(0,b.createContext)({exit(){}});$r.displayName=`InternalAppContext`;const ei=(0,b.createContext)({stdin:l.stdin,internal_eventEmitter:new a,setRawMode(){},isRawModeSupported:!1,internal_exitOnCtrlC:!0});ei.displayName=`InternalStdinContext`;const ti=(0,b.createContext)({stdout:l.stdout,write(){}});ti.displayName=`InternalStdoutContext`;const ni=(0,b.createContext)({stderr:l.stderr,write(){}});ni.displayName=`InternalStderrContext`;const ri=(0,b.createContext)({activeId:void 0,add(){},remove(){},activate(){},deactivate(){},enableFocus(){},disableFocus(){},focusNext(){},focusPrevious(){},focus(){}});ri.displayName=`InternalFocusContext`;var ii=/* @__PURE__ */ n(((e,t)=>{let n=/[|\\{}()[\]^$+*?.-]/g;t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(n,`\\$&`)}})),ai=/* @__PURE__ */ t((/* @__PURE__ */ n(((t,n)=>{let r=ii(),i=typeof process==`object`&&process&&typeof process.cwd==`function`?process.cwd():`.`,a=[].concat(e(`module`).builtinModules,`bootstrap_node`,`node`).map(e=>RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));a.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var o=class e{constructor(t){t={ignoredPackages:[],...t},`internals`in t||(t.internals=e.nodeInternals()),`cwd`in t||(t.cwd=i),this._cwd=t.cwd.replace(/\\/g,`/`),this._internals=[].concat(t.internals,c(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...a]}clean(e,t=0){t=` `.repeat(t),Array.isArray(e)||(e=e.split(`
|
|
100
100
|
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let n=!1,r=null,i=[];return e.forEach(e=>{if(e=e.replace(/\\/g,`/`),this._internals.some(t=>t.test(e)))return;let t=/^\s*at /.test(e);n?e=e.trimEnd().replace(/^(\s+)at /,`$1`):(e=e.trim(),t&&(e=e.slice(3))),e=e.replace(`${this._cwd}/`,``),e&&(t?(r&&=(i.push(r),null),i.push(e)):(n=!0,r=e))}),i.map(e=>`${t}${e}\n`).join(``)}captureString(e,t=this.captureString){typeof e==`function`&&(t=e,e=1/0);let{stackTraceLimit:n}=Error;e&&(Error.stackTraceLimit=e);let r={};Error.captureStackTrace(r,t);let{stack:i}=r;return Error.stackTraceLimit=n,this.clean(i)}capture(e,t=this.capture){typeof e==`function`&&(t=e,e=1/0);let{prepareStackTrace:n,stackTraceLimit:r}=Error;Error.prepareStackTrace=(e,t)=>this._wrapCallSite?t.map(this._wrapCallSite):t,e&&(Error.stackTraceLimit=e);let i={};Error.captureStackTrace(i,t);let{stack:a}=i;return Object.assign(Error,{prepareStackTrace:n,stackTraceLimit:r}),a}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let n={line:t.getLineNumber(),column:t.getColumnNumber()};
|
|
101
101
|
/* istanbul ignore next */
|
|
102
|
-
s(n,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(n,"constructor",{value:!0,configurable:!0}),t.isEval()&&(n.evalOrigin=t.getEvalOrigin()),t.isNative()&&(n.native=!0);let r;try{r=t.getTypeName()}catch{}r&&r!==`Object`&&r!==`[object Object]`&&(n.type=r);let i=t.getFunctionName();i&&(n.function=i);let a=t.getMethodName();return a&&i!==a&&(n.method=a),n}parseLine(e){let t=e&&e.match(l);if(!t)return null;let n=t[1]===`new`,r=t[2],i=t[3],a=t[4],o=Number(t[5]),c=Number(t[6]),d=t[7],f=t[8],p=t[9],m=t[10]===`native`,h=t[11]===`)`,g,_={};if(f&&(_.line=Number(f)),p&&(_.column=Number(p)),h&&d){let e=0;for(let t=d.length-1;t>0;t--)if(d.charAt(t)===`)`)e++;else if(d.charAt(t)===`(`&&d.charAt(t-1)===` `&&(e--,e===-1&&d.charAt(t-1)===` `)){let e=d.slice(0,t-1);d=d.slice(t+1),r+=` (${e}`;break}}if(r){let e=r.match(u);e&&(r=e[1],g=e[2])}return s(_,d,this._cwd),n&&Object.defineProperty(_,"constructor",{value:!0,configurable:!0}),i&&(_.evalOrigin=i,_.evalLine=o,_.evalColumn=c,_.evalFile=a&&a.replace(/\\/g,`/`)),m&&(_.native=!0),r&&(_.function=r),g&&r!==g&&(_.method=g),_}};function s(e,t,n){t&&(t=t.replace(/\\/g,`/`),t.startsWith(`${n}/`)&&(t=t.slice(n.length+1)),e.file=t)}function c(e){if(e.length===0)return[];let t=e.map(e=>r(e));return RegExp(`[\/\\\\]node_modules[\/\\\\](?:${t.join(`|`)})[\/\\\\][^:]+:\\d+:\\d+`)}let l=/* @__PURE__ */ RegExp(`^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$`),u=/^(.*?) \[as (.*?)\]$/;n.exports=o})))(),1);const oi=(e,t=2)=>e.replace(/^\t+/gm,e=>` `.repeat(e.length*t)),si=(e,t)=>{let n=[],r=e-t,i=e+t;for(let e=r;e<=i;e++)n.push(e);return n},ci=(e,t,n={})=>{if(typeof e!=`string`)throw TypeError(`Source code is missing.`);if(!t||t<1)throw TypeError("Line number must start from `1`.");let r=oi(e).split(/\r?\n/);if(!(t>r.length))return si(t,n.around??3).filter(e=>r[e-1]!==void 0).map(e=>({line:e,value:r[e-1]}))},li=(0,b.createContext)({isScreenReaderEnabled:!1}),ui=(0,b.createContext)(void 0),F=(0,b.forwardRef)(({children:e,backgroundColor:t,"aria-label":n,"aria-hidden":r,"aria-role":i,"aria-state":a,...o},s)=>{let{isScreenReaderEnabled:c}=(0,b.useContext)(li),l=n?b.createElement(`ink-text`,null,n):void 0;if(c&&r)return null;let u=b.createElement(`ink-box`,{ref:s,style:{flexWrap:`nowrap`,flexDirection:`row`,flexGrow:0,flexShrink:1,...o,backgroundColor:t,overflowX:o.overflowX??o.overflow??`visible`,overflowY:o.overflowY??o.overflow??`visible`},internal_accessibility:{role:i,state:a}},c&&l?l:e);return t?b.createElement(ui.Provider,{value:t},u):u});F.displayName=`Box`;function di({color:e,backgroundColor:t,dimColor:n=!1,bold:r=!1,italic:i=!1,underline:a=!1,strikethrough:o=!1,inverse:s=!1,wrap:c=`wrap`,children:l,"aria-label":u,"aria-hidden":d=!1}){let{isScreenReaderEnabled:f}=(0,b.useContext)(li),p=(0,b.useContext)(ui);return(f&&u?u:l)==null||f&&d?null:b.createElement(`ink-text`,{style:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:c},internal_transform:c=>{n&&(c=j.dim(c)),e&&(c=M(c,e,`foreground`));let l=t??p;return l&&(c=M(c,l,`background`)),r&&(c=j.bold(c)),i&&(c=j.italic(c)),a&&(c=j.underline(c)),o&&(c=j.strikethrough(c)),s&&(c=j.inverse(c)),c}},f&&u?u:l)}const fi=e=>e?.replace(`file://${
|
|
102
|
+
s(n,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(n,"constructor",{value:!0,configurable:!0}),t.isEval()&&(n.evalOrigin=t.getEvalOrigin()),t.isNative()&&(n.native=!0);let r;try{r=t.getTypeName()}catch{}r&&r!==`Object`&&r!==`[object Object]`&&(n.type=r);let i=t.getFunctionName();i&&(n.function=i);let a=t.getMethodName();return a&&i!==a&&(n.method=a),n}parseLine(e){let t=e&&e.match(l);if(!t)return null;let n=t[1]===`new`,r=t[2],i=t[3],a=t[4],o=Number(t[5]),c=Number(t[6]),d=t[7],f=t[8],p=t[9],m=t[10]===`native`,h=t[11]===`)`,g,_={};if(f&&(_.line=Number(f)),p&&(_.column=Number(p)),h&&d){let e=0;for(let t=d.length-1;t>0;t--)if(d.charAt(t)===`)`)e++;else if(d.charAt(t)===`(`&&d.charAt(t-1)===` `&&(e--,e===-1&&d.charAt(t-1)===` `)){let e=d.slice(0,t-1);d=d.slice(t+1),r+=` (${e}`;break}}if(r){let e=r.match(u);e&&(r=e[1],g=e[2])}return s(_,d,this._cwd),n&&Object.defineProperty(_,"constructor",{value:!0,configurable:!0}),i&&(_.evalOrigin=i,_.evalLine=o,_.evalColumn=c,_.evalFile=a&&a.replace(/\\/g,`/`)),m&&(_.native=!0),r&&(_.function=r),g&&r!==g&&(_.method=g),_}};function s(e,t,n){t&&(t=t.replace(/\\/g,`/`),t.startsWith(`${n}/`)&&(t=t.slice(n.length+1)),e.file=t)}function c(e){if(e.length===0)return[];let t=e.map(e=>r(e));return RegExp(`[\/\\\\]node_modules[\/\\\\](?:${t.join(`|`)})[\/\\\\][^:]+:\\d+:\\d+`)}let l=/* @__PURE__ */ RegExp(`^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$`),u=/^(.*?) \[as (.*?)\]$/;n.exports=o})))(),1);const oi=(e,t=2)=>e.replace(/^\t+/gm,e=>` `.repeat(e.length*t)),si=(e,t)=>{let n=[],r=e-t,i=e+t;for(let e=r;e<=i;e++)n.push(e);return n},ci=(e,t,n={})=>{if(typeof e!=`string`)throw TypeError(`Source code is missing.`);if(!t||t<1)throw TypeError("Line number must start from `1`.");let r=oi(e).split(/\r?\n/);if(!(t>r.length))return si(t,n.around??3).filter(e=>r[e-1]!==void 0).map(e=>({line:e,value:r[e-1]}))},li=(0,b.createContext)({isScreenReaderEnabled:!1}),ui=(0,b.createContext)(void 0),F=(0,b.forwardRef)(({children:e,backgroundColor:t,"aria-label":n,"aria-hidden":r,"aria-role":i,"aria-state":a,...o},s)=>{let{isScreenReaderEnabled:c}=(0,b.useContext)(li),l=n?b.createElement(`ink-text`,null,n):void 0;if(c&&r)return null;let u=b.createElement(`ink-box`,{ref:s,style:{flexWrap:`nowrap`,flexDirection:`row`,flexGrow:0,flexShrink:1,...o,backgroundColor:t,overflowX:o.overflowX??o.overflow??`visible`,overflowY:o.overflowY??o.overflow??`visible`},internal_accessibility:{role:i,state:a}},c&&l?l:e);return t?b.createElement(ui.Provider,{value:t},u):u});F.displayName=`Box`;function di({color:e,backgroundColor:t,dimColor:n=!1,bold:r=!1,italic:i=!1,underline:a=!1,strikethrough:o=!1,inverse:s=!1,wrap:c=`wrap`,children:l,"aria-label":u,"aria-hidden":d=!1}){let{isScreenReaderEnabled:f}=(0,b.useContext)(li),p=(0,b.useContext)(ui);return(f&&u?u:l)==null||f&&d?null:b.createElement(`ink-text`,{style:{flexGrow:0,flexShrink:1,flexDirection:`row`,textWrap:c},internal_transform:c=>{n&&(c=j.dim(c)),e&&(c=M(c,e,`foreground`));let l=t??p;return l&&(c=M(c,l,`background`)),r&&(c=j.bold(c)),i&&(c=j.italic(c)),a&&(c=j.underline(c)),o&&(c=j.strikethrough(c)),s&&(c=j.inverse(c)),c}},f&&u?u:l)}const fi=e=>e?.replace(`file://${u()}/`,``),pi=new ai.default({cwd:u(),internals:ai.default.nodeInternals()});function mi({error:e}){let t=e.stack?e.stack.split(`
|
|
103
103
|
`).slice(1):void 0,n=t?pi.parseLine(t[0]):void 0,r=fi(n?.file),a,o=0;if(r&&n?.line&&i.existsSync(r)){let e=i.readFileSync(r,`utf8`);if(a=ci(e,n.line),a)for(let{line:e}of a)o=Math.max(o,String(e).length)}return b.createElement(F,{flexDirection:`column`,padding:1},b.createElement(F,null,b.createElement(di,{backgroundColor:`red`,color:`white`},` `,`ERROR`,` `),b.createElement(di,null,` `,e.message)),n&&r&&b.createElement(F,{marginTop:1},b.createElement(di,{dimColor:!0},r,`:`,n.line,`:`,n.column)),n&&a&&b.createElement(F,{marginTop:1,flexDirection:`column`},a.map(({line:e,value:t})=>b.createElement(F,{key:e},b.createElement(F,{width:o+1},b.createElement(di,{dimColor:e!==n.line,backgroundColor:e===n.line?`red`:void 0,color:e===n.line?`white`:void 0,"aria-label":e===n.line?`Line ${e}, error`:`Line ${e}`},String(e).padStart(o,` `),`:`)),b.createElement(di,{key:e,backgroundColor:e===n.line?`red`:void 0,color:e===n.line?`white`:void 0},` `+t)))),e.stack&&b.createElement(F,{marginTop:1,flexDirection:`column`},e.stack.split(`
|
|
104
|
-
`).slice(1).map(e=>{let t=pi.parseLine(e);return t?b.createElement(F,{key:e},b.createElement(di,{dimColor:!0},`- `),b.createElement(di,{dimColor:!0,bold:!0},t.function),b.createElement(di,{dimColor:!0,color:`gray`,"aria-label":`at ${fi(t.file)??``} line ${t.line} column ${t.column}`},` `,`(`,fi(t.file)??``,`:`,t.line,`:`,t.column,`)`)):b.createElement(F,{key:e},b.createElement(di,{dimColor:!0},`- `),b.createElement(di,{dimColor:!0,bold:!0},e,`\\t`,` `))})))}var hi=class extends b.PureComponent{static displayName=`InternalApp`;static getDerivedStateFromError(e){return{error:e}}state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0};rawModeEnabledCount=0;internal_eventEmitter=new
|
|
104
|
+
`).slice(1).map(e=>{let t=pi.parseLine(e);return t?b.createElement(F,{key:e},b.createElement(di,{dimColor:!0},`- `),b.createElement(di,{dimColor:!0,bold:!0},t.function),b.createElement(di,{dimColor:!0,color:`gray`,"aria-label":`at ${fi(t.file)??``} line ${t.line} column ${t.column}`},` `,`(`,fi(t.file)??``,`:`,t.line,`:`,t.column,`)`)):b.createElement(F,{key:e},b.createElement(di,{dimColor:!0},`- `),b.createElement(di,{dimColor:!0,bold:!0},e,`\\t`,` `))})))}var hi=class extends b.PureComponent{static displayName=`InternalApp`;static getDerivedStateFromError(e){return{error:e}}state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0};rawModeEnabledCount=0;internal_eventEmitter=new a;isRawModeSupported(){return this.props.stdin.isTTY}render(){return b.createElement($r.Provider,{value:{exit:this.handleExit}},b.createElement(ei.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC,internal_eventEmitter:this.internal_eventEmitter}},b.createElement(ti.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},b.createElement(ni.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},b.createElement(ri.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?b.createElement(mi,{error:this.state.error}):this.props.children)))))}componentDidMount(){Xr.hide(this.props.stdout)}componentWillUnmount(){Xr.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}handleSetRawMode=e=>{let{stdin:t}=this.props;if(!this.isRawModeSupported())throw t===l.stdin?Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
|
105
105
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):Error(`Raw mode is not supported on the stdin provided to Ink.
|
|
106
|
-
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);t.setEncoding(`utf8`),e?(this.rawModeEnabledCount===0&&(t.ref(),t.setRawMode(!0),t.addListener(`readable`,this.handleReadable)),this.rawModeEnabledCount++):--this.rawModeEnabledCount===0&&(t.setRawMode(!1),t.removeListener(`readable`,this.handleReadable),t.unref())};handleReadable=()=>{let e;for(;(e=this.props.stdin.read())!==null;)this.handleInput(e),this.internal_eventEmitter.emit(`input`,e)};handleInput=e=>{e===``&&this.props.exitOnCtrlC&&this.handleExit(),e===`\x1B`&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===` `&&this.focusNext(),e===`\x1B[Z`&&this.focusPrevious())};handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)};enableFocus=()=>{this.setState({isFocusEnabled:!0})};disableFocus=()=>{this.setState({isFocusEnabled:!1})};focus=e=>{this.setState(t=>t.focusables.some(t=>t?.id===e)?{activeFocusId:e}:t)};focusNext=()=>{this.setState(e=>{let t=e.focusables.find(e=>e.isActive)?.id;return{activeFocusId:this.findNextFocusable(e)??t}})};focusPrevious=()=>{this.setState(e=>{let t=e.focusables.findLast(e=>e.isActive)?.id;return{activeFocusId:this.findPreviousFocusable(e)??t}})};addFocusable=(e,{autoFocus:t})=>{this.setState(n=>{let r=n.activeFocusId;return!r&&t&&(r=e),{activeFocusId:r,focusables:[...n.focusables,{id:e,isActive:!0}]}})};removeFocusable=e=>{this.setState(t=>({activeFocusId:t.activeFocusId===e?void 0:t.activeFocusId,focusables:t.focusables.filter(t=>t.id!==e)}))};activateFocusable=e=>{this.setState(t=>({focusables:t.focusables.map(t=>t.id===e?{id:e,isActive:!0}:t)}))};deactivateFocusable=e=>{this.setState(t=>({activeFocusId:t.activeFocusId===e?void 0:t.activeFocusId,focusables:t.focusables.map(t=>t.id===e?{id:e,isActive:!1}:t)}))};findNextFocusable=e=>{let t=e.focusables.findIndex(t=>t.id===e.activeFocusId);for(let n=t+1;n<e.focusables.length;n++){let t=e.focusables[n];if(t?.isActive)return t.id}};findPreviousFocusable=e=>{let t=e.focusables.findIndex(t=>t.id===e.activeFocusId);for(let n=t-1;n>=0;n--){let t=e.focusables[n];if(t?.isActive)return t.id}}};const gi=()=>{};var _i=class{options;log;throttledLog;isScreenReaderEnabled;isUnmounted;lastOutput;lastOutputHeight;container;rootNode;fullStaticOutput;exitPromise;restoreConsole;unsubscribeResize;constructor(e){ce(this),this.options=e,this.rootNode=Ut(`ink-root`),this.rootNode.onComputeLayout=this.calculateLayout,this.isScreenReaderEnabled=e.isScreenReaderEnabled??
|
|
106
|
+
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);t.setEncoding(`utf8`),e?(this.rawModeEnabledCount===0&&(t.ref(),t.setRawMode(!0),t.addListener(`readable`,this.handleReadable)),this.rawModeEnabledCount++):--this.rawModeEnabledCount===0&&(t.setRawMode(!1),t.removeListener(`readable`,this.handleReadable),t.unref())};handleReadable=()=>{let e;for(;(e=this.props.stdin.read())!==null;)this.handleInput(e),this.internal_eventEmitter.emit(`input`,e)};handleInput=e=>{e===``&&this.props.exitOnCtrlC&&this.handleExit(),e===`\x1B`&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===` `&&this.focusNext(),e===`\x1B[Z`&&this.focusPrevious())};handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)};enableFocus=()=>{this.setState({isFocusEnabled:!0})};disableFocus=()=>{this.setState({isFocusEnabled:!1})};focus=e=>{this.setState(t=>t.focusables.some(t=>t?.id===e)?{activeFocusId:e}:t)};focusNext=()=>{this.setState(e=>{let t=e.focusables.find(e=>e.isActive)?.id;return{activeFocusId:this.findNextFocusable(e)??t}})};focusPrevious=()=>{this.setState(e=>{let t=e.focusables.findLast(e=>e.isActive)?.id;return{activeFocusId:this.findPreviousFocusable(e)??t}})};addFocusable=(e,{autoFocus:t})=>{this.setState(n=>{let r=n.activeFocusId;return!r&&t&&(r=e),{activeFocusId:r,focusables:[...n.focusables,{id:e,isActive:!0}]}})};removeFocusable=e=>{this.setState(t=>({activeFocusId:t.activeFocusId===e?void 0:t.activeFocusId,focusables:t.focusables.filter(t=>t.id!==e)}))};activateFocusable=e=>{this.setState(t=>({focusables:t.focusables.map(t=>t.id===e?{id:e,isActive:!0}:t)}))};deactivateFocusable=e=>{this.setState(t=>({activeFocusId:t.activeFocusId===e?void 0:t.activeFocusId,focusables:t.focusables.map(t=>t.id===e?{id:e,isActive:!1}:t)}))};findNextFocusable=e=>{let t=e.focusables.findIndex(t=>t.id===e.activeFocusId);for(let n=t+1;n<e.focusables.length;n++){let t=e.focusables[n];if(t?.isActive)return t.id}};findPreviousFocusable=e=>{let t=e.focusables.findIndex(t=>t.id===e.activeFocusId);for(let n=t-1;n>=0;n--){let t=e.focusables[n];if(t?.isActive)return t.id}}};const gi=()=>{};var _i=class{options;log;throttledLog;isScreenReaderEnabled;isUnmounted;lastOutput;lastOutputHeight;container;rootNode;fullStaticOutput;exitPromise;restoreConsole;unsubscribeResize;constructor(e){ce(this),this.options=e,this.rootNode=Ut(`ink-root`),this.rootNode.onComputeLayout=this.calculateLayout,this.isScreenReaderEnabled=e.isScreenReaderEnabled??l.env.INK_SCREEN_READER===`true`;let t=e.debug||this.isScreenReaderEnabled,n=e.maxFps??30,r=n>0?Math.max(1,Math.ceil(1e3/n)):0;this.rootNode.onRender=t?this.onRender:g(this.onRender,r,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=Zr.create(e.stdout),this.throttledLog=t?this.log:g(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput=``,this.lastOutputHeight=0,this.fullStaticOutput=``,this.container=mn.createContainer(this.rootNode,he.LegacyRoot,null,!1,null,`id`,()=>{},()=>{},()=>{},()=>{},null),this.unsubscribeExit=(0,ue.default)(this.unmount,{alwaysLast:!1}),l.env.DEV===`true`&&mn.injectIntoDevTools({bundleType:0,version:`16.13.1`,rendererPackageName:`ink`}),e.patchConsole&&this.patchConsole(),oe||(e.stdout.on(`resize`,this.resized),this.unsubscribeResize=()=>{e.stdout.off(`resize`,this.resized)})}resized=()=>{this.calculateLayout(),this.onRender()};resolveExitPromise=()=>{};rejectExitPromise=()=>{};unsubscribeExit=()=>{};calculateLayout=()=>{let e=this.options.stdout.columns||80;this.rootNode.yogaNode.setWidth(e),this.rootNode.yogaNode.calculateLayout(void 0,void 0,w.DIRECTION_LTR)};onRender=()=>{if(this.isUnmounted)return;let{output:e,outputHeight:t,staticOutput:n}=Kr(this.rootNode,this.isScreenReaderEnabled),r=n&&n!==`
|
|
107
107
|
`;if(this.options.debug)r&&(this.fullStaticOutput+=n),this.options.stdout.write(this.fullStaticOutput+e);else if(oe)r&&this.options.stdout.write(n),this.lastOutput=e,this.lastOutputHeight=t;else if(this.isScreenReaderEnabled){if(r){let e=this.lastOutputHeight>0?te(this.lastOutputHeight):``;this.options.stdout.write(e+n),this.lastOutputHeight=0}if(e===this.lastOutput&&!r)return;let t=st(e,this.options.stdout.columns||80,{trim:!1,hard:!0});if(r)this.options.stdout.write(t);else{let e=this.lastOutputHeight>0?te(this.lastOutputHeight):``;this.options.stdout.write(e+t)}this.lastOutput=e,this.lastOutputHeight=t===``?0:t.split(`
|
|
108
108
|
`).length}else r&&(this.fullStaticOutput+=n),this.lastOutputHeight>=this.options.stdout.rows?(this.options.stdout.write(ie+this.fullStaticOutput+e+`
|
|
109
109
|
`),this.lastOutput=e,this.lastOutputHeight=t,this.log.sync(e)):(r&&(this.log.clear(),this.options.stdout.write(n),this.log(e)),!r&&e!==this.lastOutput&&this.throttledLog(e),this.lastOutput=e,this.lastOutputHeight=t)};render(e){let t=b.createElement(li.Provider,{value:{isScreenReaderEnabled:this.isScreenReaderEnabled}},b.createElement(hi,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e));mn.updateContainerSync(t,this.container,null,gi),mn.flushSyncWork()}writeToStdout(e){this.isUnmounted||(this.options.debug?this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput):oe?this.options.stdout.write(e):(this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)))}writeToStderr(e){this.isUnmounted||(this.options.debug?(this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput)):oe?this.options.stderr.write(e):(this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)))}unmount(e){this.isUnmounted||(this.calculateLayout(),this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole==`function`&&this.restoreConsole(),typeof this.unsubscribeResize==`function`&&this.unsubscribeResize(),oe?this.options.stdout.write(this.lastOutput+`
|
|
110
|
-
`):this.options.debug||this.log.done(),this.isUnmounted=!0,mn.updateContainerSync(null,this.container,null,gi),mn.flushSyncWork(),Qr.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}async waitUntilExit(){return this.exitPromise||=new Promise((e,t)=>{this.resolveExitPromise=e,this.rejectExitPromise=t}),this.exitPromise}clear(){!oe&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=pe((e,t)=>{e===`stdout`&&this.writeToStdout(t),e===`stderr`&&(t.startsWith(`The above error occurred`)||this.writeToStderr(t))}))}};const vi=(e,t)=>{let n={stdout:
|
|
110
|
+
`):this.options.debug||this.log.done(),this.isUnmounted=!0,mn.updateContainerSync(null,this.container,null,gi),mn.flushSyncWork(),Qr.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}async waitUntilExit(){return this.exitPromise||=new Promise((e,t)=>{this.resolveExitPromise=e,this.rejectExitPromise=t}),this.exitPromise}clear(){!oe&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=pe((e,t)=>{e===`stdout`&&this.writeToStdout(t),e===`stderr`&&(t.startsWith(`The above error occurred`)||this.writeToStderr(t))}))}};const vi=(e,t)=>{let n={stdout:l.stdout,stdin:l.stdin,stderr:l.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0,maxFps:30,...yi(t)},r=bi(n.stdout,()=>new _i(n));return r.render(e),{rerender:r.render,unmount(){r.unmount()},waitUntilExit:r.waitUntilExit,cleanup:()=>Qr.delete(n.stdout),clear:r.clear}},yi=(e={})=>e instanceof c?{stdout:e,stdin:l.stdin}:e,bi=(e,t)=>{let n=Qr.get(e);return n||(n=t(),Qr.set(e,n)),n};function xi(e){let{items:t,children:n,style:r}=e,[i,a]=(0,b.useState)(0),o=(0,b.useMemo)(()=>t.slice(i),[t,i]);(0,b.useLayoutEffect)(()=>{a(t.length)},[t.length]);let s=o.map((e,t)=>n(e,i+t)),c=(0,b.useMemo)(()=>({position:`absolute`,flexDirection:`column`,...r}),[r]);return b.createElement(`ink-box`,{internal_static:!0,style:c},s)}function Si({children:e,transform:t,accessibilityLabel:n}){let{isScreenReaderEnabled:r}=(0,b.useContext)(li);return e==null?null:b.createElement(`ink-text`,{style:{flexGrow:0,flexShrink:1,flexDirection:`row`},internal_transform:t},r&&n?n:e)}function Ci({count:e=1}){return b.createElement(`ink-text`,null,`
|
|
111
111
|
`.repeat(e))}function wi(){return b.createElement(F,{flexGrow:1})}const Ti=/^(?:\x1b)([a-zA-Z0-9])$/,Ei=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,Di={OP:`f1`,OQ:`f2`,OR:`f3`,OS:`f4`,"[11~":`f1`,"[12~":`f2`,"[13~":`f3`,"[14~":`f4`,"[[A":`f1`,"[[B":`f2`,"[[C":`f3`,"[[D":`f4`,"[[E":`f5`,"[15~":`f5`,"[17~":`f6`,"[18~":`f7`,"[19~":`f8`,"[20~":`f9`,"[21~":`f10`,"[23~":`f11`,"[24~":`f12`,"[A":`up`,"[B":`down`,"[C":`right`,"[D":`left`,"[E":`clear`,"[F":`end`,"[H":`home`,OA:`up`,OB:`down`,OC:`right`,OD:`left`,OE:`clear`,OF:`end`,OH:`home`,"[1~":`home`,"[2~":`insert`,"[3~":`delete`,"[4~":`end`,"[5~":`pageup`,"[6~":`pagedown`,"[[5~":`pageup`,"[[6~":`pagedown`,"[7~":`home`,"[8~":`end`,"[a":`up`,"[b":`down`,"[c":`right`,"[d":`left`,"[e":`clear`,"[2$":`insert`,"[3$":`delete`,"[5$":`pageup`,"[6$":`pagedown`,"[7$":`home`,"[8$":`end`,Oa:`up`,Ob:`down`,Oc:`right`,Od:`left`,Oe:`clear`,"[2^":`insert`,"[3^":`delete`,"[5^":`pageup`,"[6^":`pagedown`,"[7^":`home`,"[8^":`end`,"[Z":`tab`},Oi=[...Object.values(Di),`backspace`],ki=e=>[`[a`,`[b`,`[c`,`[d`,`[e`,`[2$`,`[3$`,`[5$`,`[6$`,`[7$`,`[8$`,`[Z`].includes(e),Ai=e=>[`Oa`,`Ob`,`Oc`,`Od`,`Oe`,`[2^`,`[3^`,`[5^`,`[6^`,`[7^`,`[8^`].includes(e),ji=(e=``)=>{let t;p.isBuffer(e)?e[0]>127&&e[1]===void 0?(e[0]-=128,e=`\x1B`+String(e)):e=String(e):e!==void 0&&typeof e!=`string`?e=String(e):e||=``;let n={name:``,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:e,raw:e};if(n.sequence=n.sequence||e||n.name,e===`\r`)n.raw=void 0,n.name=`return`;else if(e===`
|
|
112
112
|
`)n.name=`enter`;else if(e===` `)n.name=`tab`;else if(e===`\b`||e===`\x1B\b`)n.name=`backspace`,n.meta=e.charAt(0)===`\x1B`;else if(e===``||e===`\x1B`)n.name=`delete`,n.meta=e.charAt(0)===`\x1B`;else if(e===`\x1B`||e===`\x1B\x1B`)n.name=`escape`,n.meta=e.length===2;else if(e===` `||e===`\x1B `)n.name=`space`,n.meta=e.length===2;else if(e.length===1&&e<=``)n.name=String.fromCharCode(e.charCodeAt(0)+97-1),n.ctrl=!0;else if(e.length===1&&e>=`0`&&e<=`9`)n.name=`number`;else if(e.length===1&&e>=`a`&&e<=`z`)n.name=e;else if(e.length===1&&e>=`A`&&e<=`Z`)n.name=e.toLowerCase(),n.shift=!0;else if(t=Ti.exec(e))n.meta=!0,n.shift=/^[A-Z]$/.test(t[1]);else if(t=Ei.exec(e)){let r=[...e];r[0]===`\x1B`&&r[1]===`\x1B`&&(n.option=!0);let i=[t[1],t[2],t[4],t[6]].filter(Boolean).join(``),a=(t[3]||t[5]||1)-1;n.ctrl=!!(a&4),n.meta=!!(a&10),n.shift=!!(a&1),n.code=i,n.name=Di[i],n.shift=ki(i)||n.shift,n.ctrl=Ai(i)||n.ctrl}return n},Mi=()=>(0,b.useContext)(ei),Ni=(e,t={})=>{let{stdin:n,setRawMode:r,internal_exitOnCtrlC:i,internal_eventEmitter:a}=Mi();(0,b.useEffect)(()=>{if(t.isActive!==!1)return r(!0),()=>{r(!1)}},[t.isActive,r]),(0,b.useEffect)(()=>{if(t.isActive===!1)return;let n=t=>{let n=ji(t),r={upArrow:n.name===`up`,downArrow:n.name===`down`,leftArrow:n.name===`left`,rightArrow:n.name===`right`,pageDown:n.name===`pagedown`,pageUp:n.name===`pageup`,return:n.name===`return`,escape:n.name===`escape`,ctrl:n.ctrl,shift:n.shift,tab:n.name===`tab`,backspace:n.name===`backspace`,delete:n.name===`delete`,meta:n.meta||n.name===`escape`||n.option},a=n.ctrl?n.name:n.sequence;Oi.includes(n.name)&&(a=``),a.startsWith(`\x1B`)&&(a=a.slice(1)),a.length===1&&typeof a[0]==`string`&&/[A-Z]/.test(a[0])&&(r.shift=!0),a===`c`&&r.ctrl&&i||mn.batchedUpdates(()=>{e(a,r)})};return a?.on(`input`,n),()=>{a?.removeListener(`input`,n)}},[t.isActive,n,i,e])},Pi=()=>(0,b.useContext)($r),Fi=()=>(0,b.useContext)(ti),Ii=()=>(0,b.useContext)(ni),Li=({isActive:e=!0,autoFocus:t=!1,id:n}={})=>{let{isRawModeSupported:r,setRawMode:i}=Mi(),{activeId:a,add:o,remove:s,activate:c,deactivate:l,focus:u}=(0,b.useContext)(ri),d=(0,b.useMemo)(()=>n??Math.random().toString().slice(2,7),[n]);return(0,b.useEffect)(()=>(o(d,{autoFocus:t}),()=>{s(d)}),[d,t]),(0,b.useEffect)(()=>{e?c(d):l(d)},[e,d]),(0,b.useEffect)(()=>{if(r&&e)return i(!0),()=>{i(!1)}},[e]),{isFocused:!!d&&a===d,focus:u}},Ri=()=>{let e=(0,b.useContext)(ri);return{enableFocus:e.enableFocus,disableFocus:e.disableFocus,focusNext:e.focusNext,focusPrevious:e.focusPrevious,focus:e.focus}},zi=()=>{let{isScreenReaderEnabled:e}=(0,b.useContext)(li);return e},Bi=e=>({width:e.yogaNode?.getComputedWidth()??0,height:e.yogaNode?.getComputedHeight()??0});export{Ii as a,Ni as c,Ci as d,Si as f,F as g,di as h,Li as i,Mi as l,vi as m,zi as n,Fi as o,xi as p,Ri as r,Pi as s,Bi as t,wi as u};
|