@visulima/tui 1.0.0-alpha.20 → 1.0.0-alpha.21

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.
Files changed (148) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE.md +113 -287
  3. package/dist/components/accordion.d.ts +1 -1
  4. package/dist/components/approval-prompt.d.ts +1 -1
  5. package/dist/components/area-chart.d.ts +1 -1
  6. package/dist/components/badge.d.ts +1 -1
  7. package/dist/components/bar-chart.d.ts +1 -1
  8. package/dist/components/blink-dot.d.ts +1 -1
  9. package/dist/components/box.d.ts +4 -3
  10. package/dist/components/breadcrumb.d.ts +1 -1
  11. package/dist/components/button.d.ts +1 -1
  12. package/dist/components/calendar.d.ts +1 -1
  13. package/dist/components/canvas.js +1 -1
  14. package/dist/components/card.d.ts +1 -1
  15. package/dist/components/checkbox.d.ts +1 -1
  16. package/dist/components/collapsible.d.ts +1 -1
  17. package/dist/components/command-palette.d.ts +1 -1
  18. package/dist/components/content-switcher.d.ts +1 -1
  19. package/dist/components/controlled-scroll-view.d.ts +4 -3
  20. package/dist/components/cursor.d.ts +4 -3
  21. package/dist/components/date-picker.d.ts +1 -1
  22. package/dist/components/definition-list.d.ts +1 -1
  23. package/dist/components/dialog.d.ts +4 -3
  24. package/dist/components/divider.d.ts +1 -1
  25. package/dist/components/form.d.ts +1 -1
  26. package/dist/components/gauge.d.ts +1 -1
  27. package/dist/components/gradient.d.ts +1 -18
  28. package/dist/components/gradient.js +1 -4
  29. package/dist/components/heading.d.ts +1 -1
  30. package/dist/components/heatmap.d.ts +1 -1
  31. package/dist/components/histogram.d.ts +1 -1
  32. package/dist/components/kbd.d.ts +1 -1
  33. package/dist/components/line-chart.d.ts +1 -1
  34. package/dist/components/link.js +1 -1
  35. package/dist/components/loading-indicator.d.ts +2 -2
  36. package/dist/components/menu.d.ts +1 -1
  37. package/dist/components/message-bubble.d.ts +1 -1
  38. package/dist/components/model-badge.d.ts +1 -1
  39. package/dist/components/multi-select.d.ts +1 -1
  40. package/dist/components/option-list.d.ts +1 -1
  41. package/dist/components/paragraph.d.ts +1 -1
  42. package/dist/components/placeholder.d.ts +1 -1
  43. package/dist/components/progress-bar.d.ts +3 -2
  44. package/dist/components/radio-group.d.ts +1 -1
  45. package/dist/components/scatter-plot.d.ts +1 -1
  46. package/dist/components/scroll-bar-box.d.ts +4 -3
  47. package/dist/components/scroll-bar.d.ts +4 -3
  48. package/dist/components/scroll-list.d.ts +4 -3
  49. package/dist/components/scroll-view.d.ts +4 -3
  50. package/dist/components/search-input.d.ts +1 -1
  51. package/dist/components/select-input-indicator.d.ts +1 -1
  52. package/dist/components/select-input-item.d.ts +1 -1
  53. package/dist/components/select-input.d.ts +1 -1
  54. package/dist/components/shimmer-text.d.ts +1 -1
  55. package/dist/components/slider.d.ts +1 -1
  56. package/dist/components/sparkline.d.ts +1 -1
  57. package/dist/components/spinner.d.ts +1 -1
  58. package/dist/components/spinner.js +1 -1
  59. package/dist/components/static-render.d.ts +4 -3
  60. package/dist/components/static.d.ts +3 -2
  61. package/dist/components/status-line.d.ts +1 -1
  62. package/dist/components/stepper.d.ts +1 -1
  63. package/dist/components/streaming-text.d.ts +1 -1
  64. package/dist/components/switch.d.ts +1 -1
  65. package/dist/components/tabs.d.ts +1 -1
  66. package/dist/components/tag.d.ts +1 -1
  67. package/dist/components/text.d.ts +3 -2
  68. package/dist/components/text.js +1 -1
  69. package/dist/components/tooltip.d.ts +1 -1
  70. package/dist/components/tree-view-entry.d.ts +4 -3
  71. package/dist/core/index.d.ts +2 -1
  72. package/dist/core/index.js +1 -1
  73. package/dist/ink/hooks/use-box-metrics.d.ts +4 -3
  74. package/dist/ink/hooks/use-box-metrics.js +1 -1
  75. package/dist/ink/hooks/use-input.js +1 -1
  76. package/dist/ink/hooks/use-linked-scroll.d.ts +4 -3
  77. package/dist/ink/hooks/use-paste.js +1 -1
  78. package/dist/ink/hooks/use-text-selection.d.ts +5 -4
  79. package/dist/ink/hooks/use-text-selection.js +1 -1
  80. package/dist/ink/hooks/use-window-size.js +1 -1
  81. package/dist/ink/index.d.ts +7 -6
  82. package/dist/ink/index.js +1 -1
  83. package/dist/packem_shared/{DevTools-BR7K-5JX.js → DevTools-ClAYpMVI.js} +1 -1
  84. package/dist/packem_shared/InputParser-B_qZcN3r.js +2 -0
  85. package/dist/packem_shared/{LayoutNode-B0qeT8sl.js → LayoutNode-B8zej4dm.js} +1 -1
  86. package/dist/packem_shared/{MouseProvider-CHU5DuwC.js → MouseProvider-PnIUKURs.js} +1 -1
  87. package/dist/packem_shared/TuiApp-BVDXP0Cv.js +1 -0
  88. package/dist/packem_shared/ansi-parser-B6uXaq65.js +1 -0
  89. package/dist/packem_shared/colorize-DbTZMrJO.js +1 -0
  90. package/dist/packem_shared/{comparePoints-Dez5FkH9.js → comparePoints-YxQfR_zq.js} +1 -1
  91. package/dist/packem_shared/createInlineLoop-DRNZ7jqH.js +2 -0
  92. package/dist/packem_shared/createScreen-CrLrxA6t.js +3 -0
  93. package/dist/packem_shared/dom-BG-LS10p.js +1 -0
  94. package/dist/packem_shared/{dom.d-DgP_exKU.d.ts → dom.d-C1IxuLJ9.d.ts} +3 -1
  95. package/dist/packem_shared/{getPathToRoot-B3q6OlQy.js → getPathToRoot-D5Hns9Er.js} +1 -1
  96. package/dist/packem_shared/input.d-CgxV2e8U.d.ts +90 -0
  97. package/dist/packem_shared/measure-text-DDjHT1jD.js +3 -0
  98. package/dist/packem_shared/parseSgrMouse-Ccj70ijb.js +1 -0
  99. package/dist/packem_shared/reconciler-CUbhOvcr.js +1 -0
  100. package/dist/packem_shared/reconciler-DIfG72R9.js +1 -0
  101. package/dist/packem_shared/render-BFio00DS.js +26 -0
  102. package/dist/packem_shared/{render-BoukeuYD.js → render-Dh7HMhK1.js} +1 -1
  103. package/dist/packem_shared/{render.d-DarVJBG2.d.ts → render.d-DuyG0zip.d.ts} +1 -1
  104. package/dist/packem_shared/{renderToString-nZdqfdWT.js → renderToString-BbQiRHrd.js} +1 -1
  105. package/dist/packem_shared/{renderToString-Cx3DmmMR.js → renderToString-SDrrFvu8.js} +1 -1
  106. package/dist/packem_shared/renderTreeToBuffer-CZilzyhN.js +2 -0
  107. package/dist/packem_shared/renderer-DG986Pcr.js +17 -0
  108. package/dist/packem_shared/{selection.d-WuD_83yQ.d.ts → selection.d-Dbha5bMS.d.ts} +1 -1
  109. package/dist/packem_shared/setEnableStyledLineCache-D2gZbwFM.js +1 -0
  110. package/dist/packem_shared/{styles.d-CLJdt-kg.d.ts → styles.d-cMo36xQz.d.ts} +2 -98
  111. package/dist/packem_shared/text-width-BU2eeTWn.js +2 -0
  112. package/dist/packem_shared/utils-CoviI5Vm.js +1 -0
  113. package/dist/packem_shared/{wrapOrTruncateStyledLine-kyi6yijx.js → wrapOrTruncateStyledLine-BZ00SM8i.js} +1 -1
  114. package/dist/react/index.d.ts +2 -1
  115. package/dist/react/index.js +1 -1
  116. package/dist/testing/index.d.ts +5 -4
  117. package/dist/testing/index.js +1 -1
  118. package/index.js +26 -26
  119. package/package.json +22 -9
  120. package/dist/packem_shared/InputParser-BAqciKJ6.js +0 -2
  121. package/dist/packem_shared/TuiApp-CxBtziW8.js +0 -1
  122. package/dist/packem_shared/_commonjsHelpers-CHNfUHCT.js +0 -1
  123. package/dist/packem_shared/ansi-parser-C5JuL732.js +0 -1
  124. package/dist/packem_shared/boxes-DyY_LXCi.js +0 -1
  125. package/dist/packem_shared/colorize-gy_cY-wC.js +0 -2
  126. package/dist/packem_shared/constants-D12jy2Zh-RSfxu1eM.js +0 -1
  127. package/dist/packem_shared/createInlineLoop-D0JaKX9A.js +0 -2
  128. package/dist/packem_shared/createScreen-87XLHZq6.js +0 -3
  129. package/dist/packem_shared/dom-CW6KYzFK.js +0 -8
  130. package/dist/packem_shared/erase-DKKNxHZ_.js +0 -1
  131. package/dist/packem_shared/get-string-width-CbMPWEJO.js +0 -1
  132. package/dist/packem_shared/index-COPEEDn3.js +0 -9
  133. package/dist/packem_shared/index-CqsHHJkn.js +0 -75
  134. package/dist/packem_shared/index.d-Bk52cbgN.d.ts +0 -14
  135. package/dist/packem_shared/index.server.d-eZWyC2Ku.d.ts +0 -5
  136. package/dist/packem_shared/input.d-D-Yxqha8.d.ts +0 -172
  137. package/dist/packem_shared/measure-text-D-jVetsl.js +0 -3
  138. package/dist/packem_shared/mode-BOIU4Roy.js +0 -1
  139. package/dist/packem_shared/parseSgrMouse-DoBY7MKw.js +0 -1
  140. package/dist/packem_shared/reconciler-CGhHgXXG.js +0 -1
  141. package/dist/packem_shared/reconciler-ClRKkLS4.js +0 -1
  142. package/dist/packem_shared/render-CBFHzIKj.js +0 -27
  143. package/dist/packem_shared/renderTreeToBuffer-LnGZkEUX.js +0 -2
  144. package/dist/packem_shared/renderer-C2ycheBL.js +0 -17
  145. package/dist/packem_shared/setEnableStyledLineCache-Cke6_ZQt.js +0 -1
  146. package/dist/packem_shared/strip-C6HQYmlg.js +0 -1
  147. package/dist/packem_shared/text-width-CI9G0a-z.js +0 -2
  148. package/dist/packem_shared/utils-THUhYKG2.js +0 -1
@@ -1,10 +1,11 @@
1
1
  import { ReactElement } from 'react';
2
- import { R as RenderOptions } from "../packem_shared/render.d-DarVJBG2.js";
3
- import "../packem_shared/dom.d-DgP_exKU.js";
2
+ import { R as RenderOptions } from "../packem_shared/render.d-DuyG0zip.js";
3
+ import "../packem_shared/dom.d-C1IxuLJ9.js";
4
4
  import 'yoga-layout';
5
5
  import "../packem_shared/cursor-helpers.d-BONB9tky.js";
6
- import "../packem_shared/styles.d-CLJdt-kg.js";
7
- import "../packem_shared/index.server.d-eZWyC2Ku.js";
6
+ import '@visulima/colorize';
7
+ import 'cli-boxes';
8
+ import "../packem_shared/styles.d-cMo36xQz.js";
8
9
  import 'type-fest';
9
10
  import 'node:stream';
10
11
  declare const KEY: {
@@ -1 +1 @@
1
- var w=Object.defineProperty;var a=(t,e)=>w(t,"name",{value:e,configurable:!0});import{createRequire as F}from"node:module";import x from"../packem_shared/render-CBFHzIKj.js";import{createKeySender as y}from"../packem_shared/KEY-Bk8B-3h_.js";import{KEY as $}from"../packem_shared/KEY-Bk8B-3h_.js";import{createScreen as T}from"../packem_shared/createScreen-87XLHZq6.js";import{waitFor as j}from"../packem_shared/waitFor-Dj5zfL5s.js";const b=F(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=a(t=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,i]=o.versions.node.split(".").map(Number);if(e>22||e===22&&i>=3||e===20&&i>=16)return o.getBuiltinModule(t)}return b(t)},"__cjs_getBuiltinModule"),l=v("node:events");var R=Object.defineProperty,r=a((t,e)=>R(t,"name",{value:e,configurable:!0}),"t");class S extends l{static{a(this,"v")}static{r(this,"Stdout")}columns;_lastFrame;_frames=[];constructor(e=100){super(),this.columns=e}get frames(){return this._frames}lastFrame(){return this._lastFrame}write=r(e=>(this._frames.push(e),this._lastFrame=e,!0),"write")}class D extends l{static{a(this,"x")}static{r(this,"Stderr")}columns;_lastFrame;_frames=[];constructor(e=100){super(),this.columns=e}get frames(){return this._frames}lastFrame(){return this._lastFrame}write=r(e=>(this._frames.push(e),this._lastFrame=e,!0),"write")}class P extends l{static{a(this,"R")}static{r(this,"Stdin")}isTTY=!0;pendingData;write=r(e=>(this.pendingData=e,this.emit("readable"),this.emit("data",e),!0),"write");read(){const{pendingData:e}=this;return this.pendingData=void 0,e}setEncoding(){return this}setRawMode(){return this}resume(){return this}pause(){return this}ref(){return this}unref(){return this}}const c=[],O=r((t,e={})=>{const{columns:i,options:p}=e,n=new S(i),d=new D(i),m=new P,u=x(t,{debug:!0,exitOnCtrlC:!1,patchConsole:!1,stderr:d,stdin:m,stdout:n,...p});c.push(u);const f=T(()=>n.lastFrame(),n.frames),h=y(s=>m.write(s)),_=r(async()=>{await new Promise(s=>{setTimeout(s,0)}),await new Promise(s=>{setTimeout(s,0)})},"flush");return{cleanup:u.cleanup,flush:_,get frames(){return n.frames},keys:h,lastFrame:r(()=>n.lastFrame(),"lastFrame"),rerender:u.rerender,screen:f,stderr:d,stdin:m,stdout:n,unmount:u.unmount,async waitFor(s,g){await j(s,()=>f.text(),g)}}},"testRender"),Y=r(()=>{for(const t of c)t.cleanup();c.length=0},"cleanup");export{$ as KEY,Y as cleanup,y as createKeySender,T as createScreen,O as render,j as waitFor};
1
+ var w=Object.defineProperty;var a=(t,e)=>w(t,"name",{value:e,configurable:!0});import{createRequire as F}from"node:module";import x from"../packem_shared/render-BFio00DS.js";import{createKeySender as y}from"../packem_shared/KEY-Bk8B-3h_.js";import{KEY as $}from"../packem_shared/KEY-Bk8B-3h_.js";import{createScreen as T}from"../packem_shared/createScreen-CrLrxA6t.js";import{waitFor as j}from"../packem_shared/waitFor-Dj5zfL5s.js";const b=F(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=a(t=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,i]=o.versions.node.split(".").map(Number);if(e>22||e===22&&i>=3||e===20&&i>=16)return o.getBuiltinModule(t)}return b(t)},"__cjs_getBuiltinModule"),l=v("node:events");var R=Object.defineProperty,r=a((t,e)=>R(t,"name",{value:e,configurable:!0}),"t");class S extends l{static{a(this,"v")}static{r(this,"Stdout")}columns;_lastFrame;_frames=[];constructor(e=100){super(),this.columns=e}get frames(){return this._frames}lastFrame(){return this._lastFrame}write=r(e=>(this._frames.push(e),this._lastFrame=e,!0),"write")}class D extends l{static{a(this,"x")}static{r(this,"Stderr")}columns;_lastFrame;_frames=[];constructor(e=100){super(),this.columns=e}get frames(){return this._frames}lastFrame(){return this._lastFrame}write=r(e=>(this._frames.push(e),this._lastFrame=e,!0),"write")}class P extends l{static{a(this,"R")}static{r(this,"Stdin")}isTTY=!0;pendingData;write=r(e=>(this.pendingData=e,this.emit("readable"),this.emit("data",e),!0),"write");read(){const{pendingData:e}=this;return this.pendingData=void 0,e}setEncoding(){return this}setRawMode(){return this}resume(){return this}pause(){return this}ref(){return this}unref(){return this}}const c=[],O=r((t,e={})=>{const{columns:i,options:p}=e,n=new S(i),d=new D(i),m=new P,u=x(t,{debug:!0,exitOnCtrlC:!1,patchConsole:!1,stderr:d,stdin:m,stdout:n,...p});c.push(u);const f=T(()=>n.lastFrame(),n.frames),h=y(s=>m.write(s)),_=r(async()=>{await new Promise(s=>{setTimeout(s,0)}),await new Promise(s=>{setTimeout(s,0)})},"flush");return{cleanup:u.cleanup,flush:_,get frames(){return n.frames},keys:h,lastFrame:r(()=>n.lastFrame(),"lastFrame"),rerender:u.rerender,screen:f,stderr:d,stdin:m,stdout:n,unmount:u.unmount,async waitFor(s,g){await j(s,()=>f.text(),g)}}},"testRender"),Y=r(()=>{for(const t of c)t.cleanup();c.length=0},"cleanup");export{$ as KEY,Y as cleanup,y as createKeySender,T as createScreen,O as render,j as waitFor};
package/index.js CHANGED
@@ -82,7 +82,7 @@ function requireNative() {
82
82
  const binding = require('@visulima/tui-binding-android-arm64')
83
83
  const bindingPackageVersion = require('@visulima/tui-binding-android-arm64/package.json').version
84
84
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -98,7 +98,7 @@ function requireNative() {
98
98
  const binding = require('@visulima/tui-binding-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@visulima/tui-binding-android-arm-eabi/package.json').version
100
100
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -119,7 +119,7 @@ function requireNative() {
119
119
  const binding = require('@visulima/tui-binding-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@visulima/tui-binding-win32-x64-gnu/package.json').version
121
121
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -135,7 +135,7 @@ function requireNative() {
135
135
  const binding = require('@visulima/tui-binding-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@visulima/tui-binding-win32-x64-msvc/package.json').version
137
137
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
138
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -152,7 +152,7 @@ function requireNative() {
152
152
  const binding = require('@visulima/tui-binding-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@visulima/tui-binding-win32-ia32-msvc/package.json').version
154
154
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
155
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -168,7 +168,7 @@ function requireNative() {
168
168
  const binding = require('@visulima/tui-binding-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@visulima/tui-binding-win32-arm64-msvc/package.json').version
170
170
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
171
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -187,7 +187,7 @@ function requireNative() {
187
187
  const binding = require('@visulima/tui-binding-darwin-universal')
188
188
  const bindingPackageVersion = require('@visulima/tui-binding-darwin-universal/package.json').version
189
189
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
190
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -203,7 +203,7 @@ function requireNative() {
203
203
  const binding = require('@visulima/tui-binding-darwin-x64')
204
204
  const bindingPackageVersion = require('@visulima/tui-binding-darwin-x64/package.json').version
205
205
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
206
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -219,7 +219,7 @@ function requireNative() {
219
219
  const binding = require('@visulima/tui-binding-darwin-arm64')
220
220
  const bindingPackageVersion = require('@visulima/tui-binding-darwin-arm64/package.json').version
221
221
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
222
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -239,7 +239,7 @@ function requireNative() {
239
239
  const binding = require('@visulima/tui-binding-freebsd-x64')
240
240
  const bindingPackageVersion = require('@visulima/tui-binding-freebsd-x64/package.json').version
241
241
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
242
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -255,7 +255,7 @@ function requireNative() {
255
255
  const binding = require('@visulima/tui-binding-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@visulima/tui-binding-freebsd-arm64/package.json').version
257
257
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
258
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -276,7 +276,7 @@ function requireNative() {
276
276
  const binding = require('@visulima/tui-binding-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@visulima/tui-binding-linux-x64-musl/package.json').version
278
278
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
279
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -292,7 +292,7 @@ function requireNative() {
292
292
  const binding = require('@visulima/tui-binding-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@visulima/tui-binding-linux-x64-gnu/package.json').version
294
294
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -310,7 +310,7 @@ function requireNative() {
310
310
  const binding = require('@visulima/tui-binding-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@visulima/tui-binding-linux-arm64-musl/package.json').version
312
312
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
313
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -326,7 +326,7 @@ function requireNative() {
326
326
  const binding = require('@visulima/tui-binding-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@visulima/tui-binding-linux-arm64-gnu/package.json').version
328
328
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -344,7 +344,7 @@ function requireNative() {
344
344
  const binding = require('@visulima/tui-binding-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@visulima/tui-binding-linux-arm-musleabihf/package.json').version
346
346
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
347
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -360,7 +360,7 @@ function requireNative() {
360
360
  const binding = require('@visulima/tui-binding-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@visulima/tui-binding-linux-arm-gnueabihf/package.json').version
362
362
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -378,7 +378,7 @@ function requireNative() {
378
378
  const binding = require('@visulima/tui-binding-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@visulima/tui-binding-linux-loong64-musl/package.json').version
380
380
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
381
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -394,7 +394,7 @@ function requireNative() {
394
394
  const binding = require('@visulima/tui-binding-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@visulima/tui-binding-linux-loong64-gnu/package.json').version
396
396
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
397
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -412,7 +412,7 @@ function requireNative() {
412
412
  const binding = require('@visulima/tui-binding-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@visulima/tui-binding-linux-riscv64-musl/package.json').version
414
414
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
415
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -428,7 +428,7 @@ function requireNative() {
428
428
  const binding = require('@visulima/tui-binding-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@visulima/tui-binding-linux-riscv64-gnu/package.json').version
430
430
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
431
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -445,7 +445,7 @@ function requireNative() {
445
445
  const binding = require('@visulima/tui-binding-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@visulima/tui-binding-linux-ppc64-gnu/package.json').version
447
447
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
448
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -461,7 +461,7 @@ function requireNative() {
461
461
  const binding = require('@visulima/tui-binding-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@visulima/tui-binding-linux-s390x-gnu/package.json').version
463
463
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
464
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -481,7 +481,7 @@ function requireNative() {
481
481
  const binding = require('@visulima/tui-binding-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@visulima/tui-binding-openharmony-arm64/package.json').version
483
483
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
484
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -497,7 +497,7 @@ function requireNative() {
497
497
  const binding = require('@visulima/tui-binding-openharmony-x64')
498
498
  const bindingPackageVersion = require('@visulima/tui-binding-openharmony-x64/package.json').version
499
499
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
500
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -513,7 +513,7 @@ function requireNative() {
513
513
  const binding = require('@visulima/tui-binding-openharmony-arm')
514
514
  const bindingPackageVersion = require('@visulima/tui-binding-openharmony-arm/package.json').version
515
515
  if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
516
+ throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/tui",
3
- "version": "1.0.0-alpha.20",
3
+ "version": "1.0.0-alpha.21",
4
4
  "description": "React-based TUI library powered by a native Rust diff engine, drop-in Ink-compatible API",
5
5
  "keywords": [
6
6
  "cli",
@@ -568,6 +568,19 @@
568
568
  "LICENSE.md"
569
569
  ],
570
570
  "dependencies": {
571
+ "@visulima/ansi": "4.0.0-alpha.15",
572
+ "@visulima/colorize": "2.0.0-alpha.12",
573
+ "@visulima/error": "6.0.0-alpha.31",
574
+ "@visulima/spinner": "1.0.0-alpha.2",
575
+ "@visulima/string": "3.0.0-alpha.14",
576
+ "cli-boxes": "^4.0.1",
577
+ "code-excerpt": "^4.0.0",
578
+ "is-in-ci": "^2.0.0",
579
+ "patch-console": "^2.0.0",
580
+ "scheduler": "^0.27.0",
581
+ "signal-exit": "^4.1.0",
582
+ "terminal-size": "^4.0.1",
583
+ "tseep": "^1.3.1",
571
584
  "yoga-layout": "~3.2.1"
572
585
  },
573
586
  "peerDependencies": {
@@ -613,14 +626,14 @@
613
626
  }
614
627
  },
615
628
  "optionalDependencies": {
616
- "@visulima/tui-binding-darwin-arm64": "1.0.0-alpha.20",
617
- "@visulima/tui-binding-darwin-x64": "1.0.0-alpha.20",
618
- "@visulima/tui-binding-linux-arm64-musl": "1.0.0-alpha.20",
619
- "@visulima/tui-binding-linux-x64-gnu": "1.0.0-alpha.20",
620
- "@visulima/tui-binding-linux-arm64-gnu": "1.0.0-alpha.20",
621
- "@visulima/tui-binding-linux-x64-musl": "1.0.0-alpha.20",
622
- "@visulima/tui-binding-win32-arm64-msvc": "1.0.0-alpha.20",
623
- "@visulima/tui-binding-win32-x64-msvc": "1.0.0-alpha.20"
629
+ "@visulima/tui-binding-linux-arm64-gnu": "1.0.0-alpha.21",
630
+ "@visulima/tui-binding-darwin-arm64": "1.0.0-alpha.21",
631
+ "@visulima/tui-binding-darwin-x64": "1.0.0-alpha.21",
632
+ "@visulima/tui-binding-linux-arm64-musl": "1.0.0-alpha.21",
633
+ "@visulima/tui-binding-linux-x64-gnu": "1.0.0-alpha.21",
634
+ "@visulima/tui-binding-linux-x64-musl": "1.0.0-alpha.21",
635
+ "@visulima/tui-binding-win32-arm64-msvc": "1.0.0-alpha.21",
636
+ "@visulima/tui-binding-win32-x64-msvc": "1.0.0-alpha.21"
624
637
  },
625
638
  "engines": {
626
639
  "node": "^22.14.0 || >=24.10.0"
@@ -1,2 +0,0 @@
1
- var p=Object.defineProperty;var d=(r,t)=>p(r,"name",{value:t,configurable:!0});import{l as c}from"./index-CqsHHJkn.js";var B=Object.defineProperty,x=d((r,t)=>B(r,"name",{value:t,configurable:!0}),"h");class b extends c.EventEmitter{static{d(this,"InputParser")}constructor(t){super(),this.stdin=t}stdin;static{x(this,"InputParser")}_boundHandleData=null;_pasteBuffer=null;start(){typeof this.stdin.setRawMode=="function"&&this.stdin.setRawMode(!0),this.stdin.resume(),this.stdin.setEncoding("utf8"),this._boundHandleData=this.handleData.bind(this),this.stdin.on("data",this._boundHandleData)}stop(){typeof this.stdin.setRawMode=="function"&&this.stdin.setRawMode(!1),this.stdin.pause(),this._boundHandleData&&(this.stdin.removeListener("data",this._boundHandleData),this._boundHandleData=null)}handleData(t){if(t===""){this.emit("exit");return}if(t.includes("\x1B[200~")||this._pasteBuffer!==null){if(this._pasteBuffer===null?this._pasteBuffer=t.replace("\x1B[200~",""):this._pasteBuffer+=t,this._pasteBuffer.includes("\x1B[201~")){const e=this._pasteBuffer.replace("\x1B[201~","");this._pasteBuffer=null,this.emit("paste",e),this.listenerCount("paste")===0&&this.emit("data",e)}return}if(t.length===1){const e=t.charCodeAt(0);if(e>=1&&e<=26&&e!==3&&e!==9&&e!==10&&e!==13){const s=String.fromCharCode(e+96);this.emit("ctrl",s),this.emit("data",t,{ctrl:!0});return}}if(t==="\x1B[A"){this.emit("keydown","up");return}if(t==="\x1B[B"){this.emit("keydown","down");return}if(t==="\x1B[C"){this.emit("keydown","right");return}if(t==="\x1B[D"){this.emit("keydown","left");return}if(t===" "){this.emit("keydown","tab");return}if(t==="\x1B[Z"){this.emit("keydown","shift-tab");return}if(t==="\x1B"){this.emit("keydown","escape");return}if(t==="\r"||t===`
2
- `){this.emit("keydown","enter");return}if(t===""){this.emit("keydown","backspace");return}if(t==="\x1B[3~"){this.emit("keydown","delete");return}if(t==="\x1B[5~"){this.emit("keydown","pageUp");return}if(t==="\x1B[6~"){this.emit("keydown","pageDown");return}if(t==="\x1B[H"||t==="\x1B[1~"){this.emit("keydown","home");return}if(t==="\x1B[F"||t==="\x1B[4~"){this.emit("keydown","end");return}if(t.length===2&&t[0]==="\x1B"){this.emit("meta",t[1]),this.emit("data",t,{meta:!0});return}if(t.startsWith("\x1B[<")){const e=t.match(/\u001B\[<(\d+);(\d+);(\d+)(M)/i);if(e){const s=Number.parseInt(e[1]),u=Number.parseInt(e[2])-1,h=Number.parseInt(e[3])-1,a=e[4]==="m",o=(s&4)!==0,f=(s&8)!==0,l=(s&16)!==0,n=s&-29;let i=null;if(n===0&&!a?i="left":n===1&&!a?i="middle":n===2&&!a?i="right":n===64?i="scrollUp":n===65&&(i="scrollDown"),i){const m={button:i,ctrl:l,meta:f,shift:o,x:u,y:h};this.emit("mouse",m),i==="left"&&this.emit("click",{x:u,y:h})}}return}this.emit("data",t)}}export{b as InputParser};
@@ -1 +0,0 @@
1
- var u=Object.defineProperty;var r=(i,t)=>u(i,"name",{value:t,configurable:!0});import{o as f,h as o,g as d}from"./mode-BOIU4Roy.js";import{l as a}from"./index-CqsHHJkn.js";import{Renderer as s,TerminalGuard as l}from"./Renderer-DJXooAsp.js";var w=Object.defineProperty,g=r((i,t)=>w(i,"name",{value:t,configurable:!0}),"i");const h=f(2026),c=o(h),p=d(h);class k extends a.EventEmitter{static{r(this,"TuiApp")}static{g(this,"TuiApp")}renderer;terminal=null;backBuffer;width;height;isRunning=!1;stdoutBuffer=[];stderrBuffer=[];constructor(){super(),this.width=process.stdout.columns||80,this.height=process.stdout.rows||24,this.renderer=new s(this.width,this.height),this.backBuffer=new Uint32Array(this.width*this.height*2)}start(){this.isRunning||(this.terminal=new l(!0),this.isRunning=!0)}quit(){this.emit("quit")}stop(){this.isRunning=!1,this.terminal?.leave(),this.terminal=null,this.stdoutBuffer.length>0&&(process.stdout.write(this.stdoutBuffer.join("")),this.stdoutBuffer=[]),this.stderrBuffer.length>0&&(process.stderr.write(this.stderrBuffer.join("")),this.stderrBuffer=[])}writeStdout(t){this.isRunning?this.stdoutBuffer.push(t):process.stdout.write(t)}writeStderr(t){this.isRunning?this.stderrBuffer.push(t):process.stderr.write(t)}getBuffer(){return this.backBuffer}getSize(){return{height:this.height,width:this.width}}resize(t,e){this.width=t,this.height=e,this.renderer=new s(t,e),this.backBuffer=new Uint32Array(t*e*2)}beforeFlushListeners=[];onBeforeFlush(t){return this.beforeFlushListeners.push(t),()=>{this.beforeFlushListeners=this.beforeFlushListeners.filter(e=>e!==t)}}paintNow(t,e){if(this.isRunning){t(this.width,this.height),e(this.backBuffer,this.width,this.height);for(const n of this.beforeFlushListeners)n(this.backBuffer,this.width,this.height);this.renderer.writeRaw(c);try{this.renderer.render(this.backBuffer)}finally{this.renderer.writeRaw(p)}}}}export{k as TuiApp};
@@ -1 +0,0 @@
1
- var c=Object.defineProperty;var r=(t,e)=>c(t,"name",{value:e,configurable:!0});var f=Object.defineProperty,a=r((t,e)=>f(t,"name",{value:e,configurable:!0}),"t");function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}r(p,"getDefaultExportFromCjs");a(p,"getDefaultExportFromCjs");function l(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}r(l,"getDefaultExportFromNamespaceIfPresent");a(l,"getDefaultExportFromNamespaceIfPresent");function s(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")&&Object.keys(t).length===1?t.default:t}r(s,"getDefaultExportFromNamespaceIfNotNamed");a(s,"getDefaultExportFromNamespaceIfNotNamed");function m(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var o=a(r(function n(){var u=!1;try{u=this instanceof n}catch{}return u?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a"),"a");o.prototype=e.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var u=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,u.get?u:{enumerable:!0,get:a(function(){return t[n]},"get")})}),o}r(m,"getAugmentedNamespace");a(m,"getAugmentedNamespace");
@@ -1 +0,0 @@
1
- var d=Object.defineProperty;var l=(e,r)=>d(e,"name",{value:r,configurable:!0});import{x as u}from"./constants-D12jy2Zh-RSfxu1eM.js";var E=Object.defineProperty,b=l((e,r)=>E(e,"name",{value:r,configurable:!0}),"l"),g=Object.defineProperty,p=b((e,r)=>g(e,"name",{value:r,configurable:!0}),"l"),S=Object.defineProperty,a=p((e,r)=>S(e,"name",{value:r,configurable:!0}),"s");const y=4,v=8,T=16,B=32,P=64,L=128,R=3,c=32,o={BACKWARD:8,BUTTON_11:11,LEFT:1,RELEASE:0,RIGHT:3,WHEEL_RIGHT:7,WHEEL_UP:4};a((e,r,n={})=>{let t;if(e===o.RELEASE)t=R;else if(e>=o.LEFT&&e<=o.RIGHT)t=e-o.LEFT;else if(e>=o.WHEEL_UP&&e<=o.WHEEL_RIGHT)t=e-o.WHEEL_UP,t|=P;else if(e>=o.BACKWARD&&e<=o.BUTTON_11)t=e-o.BACKWARD,t|=L;else return 255;return n.shift&&(t|=y),n.alt&&(t|=v),n.ctrl&&(t|=T),r&&(t|=B),t},"encodeMouseButtonByte");a((e,r,n)=>{if(e===255)return"";const t=String.fromCodePoint(e+c),i=String.fromCodePoint(r+1+c),f=String.fromCodePoint(n+1+c);return`${u}[M${t}${i}${f}`},"mouseX10Sequence");a((e,r,n,t)=>{if(e===255)return"";const i=t?"m":"M";return`${u}[<${String(e)};${String(r+1)};${String(n+1)}${i}`},"mouseSgrSequence");const h=`${u}[?1000h`,x=`${u}[?1000l`,A=`${u}[?1003h`,H=`${u}[?1003l`,M=`${u}[?1006h`,W=`${u}[?1006l`,D={mouseButton:{off:x,on:h},mouseMotion:{off:H,on:A},mouseMotionOthers:{off:"\x1B[?1015l",on:"\x1B[?1015h"},mouseSGR:{off:W,on:M}},O=/\[<(\d+);(\d+);(\d+)(M)$/i;var _=Object.defineProperty,C=l((e,r)=>_(e,"name",{value:r,configurable:!0}),"i");const N={0:"left",1:"middle",2:"right"},G={32:"left",33:"middle",34:"right"},I=C(e=>{const r=O.exec(e);if(!r)return;const n=Number(r[1]),t=Number(r[2]),i=Number(r[3]),f=r[4]==="m",s=n&-29;if(s===64||s===65)return{direction:s===64?"scrollup":"scrolldown",type:"scroll",x:t,y:i};if(s===35)return{type:"move",x:t,y:i};const m=G[s];if(m)return{action:f?"release":"press",button:m,type:"drag",x:t,y:i};const $=N[s];if($)return{action:f?"release":"press",button:$,type:"click",x:t,y:i}},"parseSgrMouse");export{D as M,I as a};
@@ -1 +0,0 @@
1
- var t={topLeft:"┌",top:"─",topRight:"┐",right:"│",bottomRight:"┘",bottom:"─",bottomLeft:"└",left:"│"},o={topLeft:"╔",top:"═",topRight:"╗",right:"║",bottomRight:"╝",bottom:"═",bottomLeft:"╚",left:"║"},e={topLeft:"╭",top:"─",topRight:"╮",right:"│",bottomRight:"╯",bottom:"─",bottomLeft:"╰",left:"│"},b={topLeft:"┏",top:"━",topRight:"┓",right:"┃",bottomRight:"┛",bottom:"━",bottomLeft:"┗",left:"┃"},i={topLeft:"╓",top:"─",topRight:"╖",right:"║",bottomRight:"╜",bottom:"─",bottomLeft:"╙",left:"║"},g={topLeft:"╒",top:"═",topRight:"╕",right:"│",bottomRight:"╛",bottom:"═",bottomLeft:"╘",left:"│"},p={topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},f={topLeft:"↘",top:"↓",topRight:"↙",right:"←",bottomRight:"↖",bottom:"↑",bottomLeft:"↗",left:"→"};const h={single:t,double:o,round:e,bold:b,singleDouble:i,doubleSingle:g,classic:p,arrow:f};export{h as o};
@@ -1,2 +0,0 @@
1
- var Q=Object.defineProperty;var h=(e,r)=>Q(e,"name",{value:r,configurable:!0});var X=Object.defineProperty,ee=h((e,r)=>X(e,"name",{value:r,configurable:!0}),"p$1"),re=Object.defineProperty,te=ee((e,r)=>re(e,"name",{value:r,configurable:!0}),"C"),ne=Object.defineProperty,T=te((e,r)=>ne(e,"name",{value:r,configurable:!0}),"u");const oe=/^-{1,2}(no-color|no-colors|color=false|color=never)$/,ie=/^-{1,2}(color=256)$/,ce=/^-{1,2}(color=16m|color=full|color=truecolor)$/,ue=/^-{1,2}(color|colors|color=true|color=always)$/,ae=/-mono|dumb/i,se=/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/,le=/-256(color)?$/i,ge=/^screen|^tmux|^xterm|^vt[1-5]\d\d|^ansi|color|mintty|rxvt|cygwin|linux/i,Y=T(e=>{const r=globalThis,t=r.Deno!=null,o=r.process??r.Deno??{},c=o.argv??o.args??[],u=T(g=>{const k=c.indexOf("--"),w=c.findIndex(Z=>g.test(Z));return w!==-1&&(k===-1||w<k)},"oneOfFlags");let i={};try{i=t?o.env.toObject():o.env??{}}catch{}const R="FORCE_COLOR",q=R in i,b=i[R]??void 0,j=Object.prototype.toString.call(b).slice(8,-1)==="String",J=typeof b=="number";let f;if(b==="true"?f=1:b==="false"?f=0:j&&b.length===0?f=1:j&&b.length>0?f=Math.min(Number.parseInt(b,10),3):J&&(f=Math.min(b,3)),b!=="true"&&b!=="false"&&f!==void 0&&f<4)return f;if("NO_COLOR"in i||q&&f===0||u(oe))return 0;if(u(ie))return 2;if(u(ce))return 3;if(u(ue))return 1;const B=f??0;if("TF_BUILD"in i&&"AGENT_NAME"in i)return 1;if(i.TERM&&ae.test(i.TERM))return B;if((t?r.Deno.build.os:o.platform)==="win32")try{const g=(t?r.Deno.osRelease():o.os.release()).split(".");return Number(g[0])>=10&&Number(g[2])>=10586?Number(g[2])>=14931?3:2:1}catch{}if("CI"in i)return["GITEA_ACTIONS","CIRCLECI","GITHUB_WORKFLOW","GITHUB_ACTIONS"].some(g=>g in i)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(g=>g in i)||i.CI_NAME==="codeship"?1:B;if(i.TERMINAL_EMULATOR?.includes("JediTerm"))return 3;if("TEAMCITY_VERSION"in i)return se.test(i.TEAMCITY_VERSION)?1:0;if(i.COLORTERM==="truecolor"||i.TERM==="xterm-kitty"||i.TERM==="xterm-ghostty"||i.TERM==="wezterm")return 3;if("TERM_PROGRAM"in i){const g=Number.parseInt((i.TERM_PROGRAM_VERSION??"").split(".")[0],10);if(i.TERM_PROGRAM==="iTerm.app")return g>=3?3:2;if(i.TERM_PROGRAM==="Apple_Terminal")return 2}if(le.test(i.TERM))return 2;let v;return t?v=e==="out"?r.Deno.stdout.isTerminal():r.Deno.stderr.isTerminal():"PM2_HOME"in i&&"pm_id"in i?v=!0:v=o[`std${e}`]&&"isTTY"in o[`std${e}`],v&&ge.test(i.TERM)||"COLORTERM"in i?1:B},"isColorSupportedFactory"),be=T(()=>Y("out"),"isStdoutColorSupported");T(()=>Y("err"),"isStderrColorSupported");var fe=Object.defineProperty,V=h((e,r)=>fe(e,"name",{value:r,configurable:!0}),"B"),de=Object.defineProperty,m=V((e,r)=>de(e,"name",{value:r,configurable:!0}),"u"),$e=Object.defineProperty,pe=m((e,r)=>$e(e,"name",{value:r,configurable:!0}),"e$1");function M({onlyFirst:e=!1}={}){const r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}h(M,"x");V(M,"N");m(M,"t$1");pe(M,"ansiRegex");var me=Object.defineProperty,he=m((e,r)=>me(e,"name",{value:r,configurable:!0}),"n$1");const $=he((e,r,t)=>r>e?r:Math.min(e,t),"clamp");var Oe=Object.defineProperty,Re=m((e,r)=>Oe(e,"name",{value:r,configurable:!0}),"a$1");const ve=/([a-f\d]{3,6})/i,Te=Re(e=>{let[,r]=ve.exec(e)??[];const t=r?r.length:0;if(t===3){const c=r.charAt(0),u=r.charAt(1),i=r.charAt(2);r=c+c+u+u+i+i}else if(t!==6)return[0,0,0];const o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},"convertHexToRgb");var Se=Object.defineProperty,P=m((e,r)=>Se(e,"name",{value:r,configurable:!0}),"e");const z=P((e,r,t)=>e===r&&r===t?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/51)+6*Math.round(r/51)+Math.round(t/51),"rgbToAnsi256"),C=P(e=>{let r,t,o;if(e<8)return 30+e;if(e<16)return 90+(e-8);if(e>=232)r=t=o=((e-232)*10+8)/255;else{e-=16;const i=e%36;r=Math.floor(e/36)/5,t=Math.floor(i/6)/5,o=i%6/5}const c=Math.max(r,t,o)*2;if(c===0)return 30;const u=30+(Math.round(o)<<2|Math.round(t)<<1|Math.round(r));return c===2?u+60:u},"ansi256To16"),G=P((e,r,t)=>C(z(e,r,t)),"rgbToAnsi16");var ye=Object.defineProperty,l=m((e,r)=>ye(e,"name",{value:r,configurable:!0}),"b");const a=39,s=49,L=10,N=be(),K={close:"",open:""},n=N>0?(e,r)=>({close:`\x1B[${String(r)}m`,open:`\x1B[${String(e)}m`}):()=>K,D=l(e=>(r,t,o)=>e(z(Number(r),Number(t),Number(o))),"createRgbFunction"),F=l(e=>r=>{const[t,o,c]=Te(r);return e(t,o,c)},"createHexFunction");let E=l(e=>n(`38;5;${String(e)}`,a),"createAnsi256"),A=l(e=>n(`48;5;${String(e)}`,s),"createBgAnsi256"),S=l((e,r,t)=>n(`38;2;${String(e)};${String(r)};${String(t)}`,a),"createRgb"),y=l((e,r,t)=>n(`48;2;${String(e)};${String(r)};${String(t)}`,s),"createBgRgb");N===1?(E=l(e=>n(C(Number(e)),a),"createAnsi256"),A=l(e=>n(C(Number(e))+L,s),"createBgAnsi256"),S=l((e,r,t)=>n(G(Number(e),Number(r),Number(t)),a),"createRgb"),y=l((e,r,t)=>n(G(Number(e),Number(r),Number(t))+L,s),"createBgRgb")):N===2&&(S=D(E),y=D(A));const H={bold:n(1,22),dim:n(2,22),hidden:n(8,28),inverse:n(7,27),italic:n(3,23),overline:n(53,55),reset:n(0,0),strike:n(9,29),strikethrough:n(9,29),underline:n(4,24),visible:K},U={bgBlack:n(40,s),bgBlackBright:n(100,s),bgBlue:n(44,s),bgBlueBright:n(104,s),bgCyan:n(46,s),bgCyanBright:n(106,s),bgGray:n(100,s),bgGreen:n(42,s),bgGreenBright:n(102,s),bgGrey:n(100,s),bgMagenta:n(45,s),bgMagentaBright:n(105,s),bgRed:n(41,s),bgRedBright:n(101,s),bgWhite:n(47,s),bgWhiteBright:n(107,s),bgYellow:n(43,s),bgYellowBright:n(103,s),black:n(30,a),blackBright:n(90,a),blue:n(34,a),blueBright:n(94,a),cyan:n(36,a),cyanBright:n(96,a),gray:n(90,a),green:n(32,a),greenBright:n(92,a),grey:n(90,a),magenta:n(35,a),magentaBright:n(95,a),red:n(31,a),redBright:n(91,a),white:n(37,a),whiteBright:n(97,a),yellow:n(33,a),yellowBright:n(93,a)},W={bg:l(e=>A($(e,0,255)),"bg"),bgHex:F(y),bgRgb:l((e,r,t)=>y($(e,0,255),$(r,0,255),$(t,0,255)),"bgRgb"),fg:l(e=>E($(e,0,255)),"fg"),hex:F(S),rgb:l((e,r,t)=>S($(e,0,255),$(r,0,255),$(t,0,255)),"rgb")};var Me=Object.defineProperty,Be=m((e,r)=>Me(e,"name",{value:r,configurable:!0}),"s");const Ce=Be((e,r,t)=>{if(r==="")return e;let o=e.indexOf(r);if(o<0)return e;const c=r.length;let u=0,i="";for(;~o;)i+=e.slice(u,o)+t,u=o+c,o=e.indexOf(r,u);return i+e.slice(u)},"stringReplaceAll");var Ne=Object.defineProperty,O=m((e,r)=>Ne(e,"name",{value:r,configurable:!0}),"a");const p={};let x=null;const Ee=O((e,r,t)=>{if(!e)return"";let o;if(e.raw===void 0?o=String(e):o=String.raw(e,...r),o.includes("\x1B"))for(let c=t;c;c=c.props)o=Ce(o,c.close,c.open);return o.includes(`
2
- `)&&(o=o.replace(/(\r*\n)/g,`${t.closeStack}$1${t.openStack}`)),t.openStack+o+t.closeStack},"wrapText"),_=O(({props:e},{close:r,open:t})=>{const o=(e?.openStack??"")+t,c=r+(e?.closeStack??""),u=O((i,...R)=>Ee(i,R,u.props),"style");return Object.setPrototypeOf(u,x),u.props={close:r,closeStack:c,open:t,openStack:o,props:e},u.open=o,u.close=c,u},"createStyle"),Ae=O(function(){const e=O(r=>String(r),"self");e.strip=r=>r.replaceAll(M(),"");for(const r in U)p[r]={get(){const t=_(this,U[r]);return Object.defineProperty(this,r,{value:t}),t}};for(const r in H)p[r]={get(){const t=_(this,H[r]);return Object.defineProperty(this,r,{value:t}),t}};return x=Object.defineProperties({},p),Object.setPrototypeOf(e,x),e},"Colorize");for(const e in W)p[e]={get(){return(...r)=>_(this,W[e](...r))}};p.ansi256=p.fg;p.bgAnsi256=p.bg;const d=new Ae;var xe=Object.defineProperty,I=h((e,r)=>xe(e,"name",{value:r,configurable:!0}),"i");const _e=/^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,Pe=/^ansi256\(\s?(\d+)\s?\)$/,Ie=I(e=>e in d,"isNamedColor"),je=I((e,r,t)=>{if(!r)return e;if(Ie(r)){if(t==="foreground")return d[r](e);const o=`bg${r[0].toUpperCase()+r.slice(1)}`;return d[o](e)}if(r.startsWith("#"))return t==="foreground"?d.hex(r)(e):d.bgHex(r)(e);if(r.startsWith("ansi256")){const o=Pe.exec(r);if(!o)return e;const c=Number(o[1]);return t==="foreground"?d.ansi256(c)(e):d.bgAnsi256(c)(e)}if(r.startsWith("rgb")){const o=_e.exec(r);if(!o)return e;const c=Number(o[1]),u=Number(o[2]),i=Number(o[3]);return t==="foreground"?d.rgb(c,u,i)(e):d.bgRgb(c,u,i)(e)}return e},"colorize"),we=I(e=>{const r=je("x",e,"background");if(r!=="x")return r.split("x")[0]},"getBackgroundColorEscape");export{be as B,we as a,je as d,d as g};
@@ -1 +0,0 @@
1
- const x="\x1B",B="\x1B[",o="\x1B]",s="\x07",t=";";export{s as B,B as a,t as o,o as s,x};
@@ -1,2 +0,0 @@
1
- var N=Object.defineProperty;var n=(i,r)=>N(i,"name",{value:r,configurable:!0});import{N as O,H as P,P as S,T as Y,G as m,E as A,z as L}from"./erase-DKKNxHZ_.js";import{o as U,h as y,g as M,e as $}from"./mode-BOIU4Roy.js";import{terminalSize as j,Renderer as k}from"./Renderer-DJXooAsp.js";var B=Object.defineProperty,o=n((i,r)=>B(i,"name",{value:r,configurable:!0}),"r");const g=U(2026),D=y(g),H=M(g),q=y($),C=M($);function F(i,r={}){const h=r.rows??10,x=r.fps??60,z=r.onExit??"preserve";let l=null,a=null,p=null,f=80,s=10,E=0,c=1;function e(t){a.writeRaw(t)}n(e,"e"),o(e,"write");function d(){p.fill(0),i(p,f,s,E++),e(D);try{a.render(p)}finally{e(H)}}n(d,"u"),o(d,"tick");function w(t){c=t-s,e(O(s)+P),a.setRowOffset(c),d(),l=setInterval(()=>{d()},Math.round(1e3/x))}n(w,"E$1"),o(w,"startRendering");function I(){const t=j();f=t.cols;const G=t.rows;s=Math.min(h,G),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.setEncoding("utf8"),a=new k(f,s),p=new Uint32Array(f*s*2),e(S),e(q),e(`
2
- `.repeat(s)),e(Y),process.on("SIGINT",u);let v="";const R=o(b=>{v+=b;const T=v.match(/\u001B\[(\d+);(\d+)R/);T&&(process.stdin.off("data",R),w(Number.parseInt(T[1],10)))},"onData");process.stdin.on("data",R)}n(I,"P$1"),o(I,"start");function u(){if(l&&(clearInterval(l),l=null),a){if(z==="destroy"){for(let t=0;t<s;t++)e(m(c+1+t,1)+A);e(m(c+1,1))}else e(m(c+s+1,1));e(C),e(L)}process.stdin.isTTY&&process.stdin.setRawMode(!1),process.stdin.pause(),process.exit(0)}return n(u,"f"),o(u,"stop"),{start:I,stop:u}}n(F,"createInlineLoop");o(F,"createInlineLoop");export{F as createInlineLoop};
@@ -1,3 +0,0 @@
1
- var u=Object.defineProperty;var n=(t,r)=>u(t,"name",{value:r,configurable:!0});import{s}from"./strip-C6HQYmlg.js";var c=Object.defineProperty,i=n((t,r)=>c(t,"name",{value:r,configurable:!0}),"e");const m=i((t,r)=>{const a=i(e=>e===void 0?"":s(e),"clean");return{contains(e){return this.text().includes(e)},frames(){return r.map(e=>s(e))},line(e){return this.text().split(`
2
- `)[e]??""},lines(){return this.text().split(`
3
- `).filter(e=>e.trim()!=="")},matches(e){return e.test(this.text())},rawFrames(){return[...r]},rawText(){return t()??""},text(){return a(t())}}},"createScreen");export{m as createScreen};
@@ -1,8 +0,0 @@
1
- var he=Object.defineProperty;var b=(e,t)=>he(e,"name",{value:t,configurable:!0});import fe from"yoga-layout";import{e as V}from"./measure-text-D-jVetsl.js";import pe from"./squashTextNodesWithMap-DCdi3SZ2.js";import{o as B,k as G,G as q,h as K,N as P,m as me,l as E,i as D,d as H,F as ge,b as xe,s as L,t as ve,a as ye}from"./get-string-width-CbMPWEJO.js";var Be=Object.defineProperty,ee=b((e,t)=>Be(e,"name",{value:t,configurable:!0}),"i"),Ne=Object.defineProperty,te=ee((e,t)=>Ne(e,"name",{value:t,configurable:!0}),"r"),be=Object.defineProperty,we=te((e,t)=>be(e,"name",{value:t,configurable:!0}),"c");class ke{static{b(this,"l")}static{ee(this,"y")}static{te(this,"s")}static{we(this,"LRUCache")}capacity;cache;keyOrder;constructor(t){this.capacity=t,this.cache=new Map,this.keyOrder=[]}get(t){if(this.cache.has(t))return this.keyOrder=this.keyOrder.filter(i=>i!==t),this.keyOrder.push(t),this.cache.get(t)}has(t){return this.cache.has(t)}set(t,i){if(this.cache.has(t))this.keyOrder=this.keyOrder.filter(s=>s!==t);else if(this.cache.size>=this.capacity){const s=this.keyOrder.shift();s!==void 0&&this.cache.delete(s)}this.cache.set(t,i),this.keyOrder.push(t)}delete(t){this.cache.delete(t),this.keyOrder=this.keyOrder.filter(i=>i!==t)}clear(){this.cache.clear(),this.keyOrder=[]}size(){return this.cache.size}}var Se=Object.defineProperty,Ae=b((e,t)=>Se(e,"name",{value:t,configurable:!0}),"S$1"),Ee=Object.defineProperty,$e=Ae((e,t)=>Ee(e,"name",{value:t,configurable:!0}),"w"),We=Object.defineProperty,$=$e((e,t)=>We(e,"name",{value:t,configurable:!0}),"y");const z=new ke(100),Oe=new Intl.Segmenter("en",{granularity:"grapheme"}),Re=/^[\u0000-\u007F]*$/,Te=new Set(["0","22","23","24","27","28","29","39","49"]),Ce=new Set(["1","3","4","7","8","9"]),U=new Map([["22","1"],["23","3"],["24","4"],["27","7"],["28","8"],["29","9"]]),W=$(e=>e>="30"&&e<="37"||e>="90"&&e<="97"||e.startsWith("38;"),"isForegroundColor"),O=$(e=>e>="40"&&e<="47"||e>="100"&&e<="107"||e.startsWith("48;"),"isBackgroundColor"),Fe=[{close:"\x1B[22m",open:"\x1B[1m"},{close:"\x1B[23m",open:"\x1B[3m"},{close:"\x1B[24m",open:"\x1B[4m"},{close:"\x1B[27m",open:"\x1B[7m"},{close:"\x1B[28m",open:"\x1B[8m"},{close:"\x1B[29m",open:"\x1B[9m"}],Y=$((e,t)=>{let i=-1;for(const s of t){const o=e.indexOf(s);o!==-1&&(i===-1||o<i)&&(i=o)}return i},"findFirstPositionOfAny"),_e=$((e,t)=>{if(!e.includes("\x1B"))return[{after:"",before:"",content:e,visibleLength:B(e,t.width)}];const i=z.get(e);if(i)return i;const s=[],o=[];let n=0,a;for(K.lastIndex=0;(a=K.exec(e))!==null;){const c=a[0];s.push(e.slice(n,a.index)),o.push(c),n=a.index+c.length}n<e.length&&s.push(e.slice(n));const l=[];for(const c of o){if(c==="\x1B[0m"||c==="\x1B]8;;\x07"){l.push(c);continue}if(c.startsWith("\x1B[")&&c.endsWith("m")){const u=c.slice(2,-1);if(Te.has(u)){l.push(c);continue}}}const r=new Set,d=[];for(const[c,u]of s.entries()){if(c>0&&o[c-1]){const p=o[c-1];if(p==="\x1B[0m")r.clear();else if(p==="\x1B]8;;\x07"){for(const f of r)if(f.startsWith("\x1B]8;;")&&!f.endsWith("\x1B]8;;\x07")){r.delete(f);break}}else if(p.startsWith("\x1B[")&&p.endsWith("m")){const f=p.slice(2,-1);if(f==="39"){for(const h of r)if(h.startsWith("\x1B[")&&h.endsWith("m")){const g=h.slice(2,-1);if(W(g)){r.delete(h);break}}}else if(f==="49"){for(const h of r)if(h.startsWith("\x1B[")&&h.endsWith("m")){const g=h.slice(2,-1);if(O(g)){r.delete(h);break}}}else if(U.has(f)){const h=U.get(f);for(const g of r)if(g===`\x1B[${h}m`){r.delete(g);break}}else{if(W(f)){for(const h of r)if(h.startsWith("\x1B[")&&h.endsWith("m")){const g=h.slice(2,-1);if(W(g)){r.delete(h);break}}}else if(O(f)){for(const h of r)if(h.startsWith("\x1B[")&&h.endsWith("m")){const g=h.slice(2,-1);if(O(g)){r.delete(h);break}}}else if(Ce.has(f)){const h=`\x1B[${f}m`;r.has(h)&&r.delete(h)}r.add(p)}}else if(p.startsWith("\x1B]8;;")&&!p.endsWith("\x1B]8;;\x07")){for(const f of r)if(f.startsWith("\x1B]8;;")&&!f.endsWith("\x1B]8;;\x07")){r.delete(f);break}r.add(p)}}if(u==="")continue;let m="";if(r.size>0)if(l.includes("\x1B[0m"))m="\x1B[0m";else{const p=[];let f=!1;for(const v of r)if(v.startsWith("\x1B]8;;")&&!v.endsWith("\x1B]8;;\x07")){f=!0;break}f&&l.includes("\x1B]8;;\x07")&&p.push("\x1B]8;;\x07");let h=!1,g=!1;for(const v of r)if(v.startsWith("\x1B[")&&v.endsWith("m")){const N=v.slice(2,-1);W(N)?h=!0:O(N)&&(g=!0)}if(h&&g){const v=Y(e,["\x1B[3","\x1B[9","\x1B[38;"]),N=Y(e,["\x1B[4","\x1B[10","\x1B[48;"]);v>=0&&N>=0?v>N?p.push("\x1B[39m","\x1B[49m"):p.push("\x1B[49m","\x1B[39m"):p.push("\x1B[39m","\x1B[49m")}else h&&p.push("\x1B[39m"),g&&p.push("\x1B[49m");h&&g&&e.includes("\x1B[39m")&&e.includes("\x1B[49m")&&(e.indexOf("\x1B[39m")<e.indexOf("\x1B[49m")?(p.length-=2,p.push("\x1B[39m","\x1B[49m")):e.indexOf("\x1B[49m")<e.indexOf("\x1B[39m")&&(p.length-=2,p.push("\x1B[49m","\x1B[39m")));const j=Fe.filter(v=>r.has(v.open)).map(v=>({position:e.indexOf(v.open),style:v})).filter(v=>v.position>=0).toSorted((v,N)=>N.position-v.position);for(const v of j){const N=v;l.includes(N.style.close)&&p.push(N.style.close)}m=p.join("")}const x=[...r].join("");d.push({after:m,before:x,content:u,visibleLength:B(u,{fullWidth:1,wideWidth:1})})}return z.set(e,d),d},"processIntoStyledSegments"),je=$((e,t,i,s)=>{const o=[...s.segmenter.segment(e)],n=[];let a=0,l=!1;for(const r of o){const d=B(r.segment,s.width),c=a,u=a+d;if(!l)if(c<t){a=u;continue}else l=!0;if(c>=i||u>i)break;n.push(r.segment),a=u}return n.join("")},"fastSlice"),w=$((e,t=0,i=Number.MAX_SAFE_INTEGER,s={})=>{const o={segmenter:Oe,...s};if(t>=i||e==="")return"";const n=B(e,o.width);if(t===0&&i>=n)return e;if(t<0||i<0)throw new RangeError("Negative indices aren't supported");if(!e.includes("\x1B"))return Re.test(e)?e.slice(t,i):je(e,t,i,o);if(G.lastIndex=0,q.lastIndex=0,!G.test(e)&&!q.test(e))return e;const a=_e(e,o);if(a.length===0)return"";let l=0;const r=[];for(const[u,m]of a.entries()){const x=l,p=l+m.visibleLength;if(p>t&&x<i){const f=Math.max(0,t-x),h=Math.min(m.visibleLength,i-x);r.push({end:h,index:u,segment:m,start:f})}l=p}if(r.length===0)return"";const d=[],c=r[0].segment;d.push(c.before);for(let u=0;u<r.length;u++){const{end:m,segment:x,start:p}=r[u];if(p===0&&m===x.visibleLength)d.push(x.content);else{const f=[...o.segmenter.segment(x.content)];d.push(f.slice(p,m).map(h=>h.segment).join(""))}if(u<r.length-1){const f=r[u+1].segment,h=x.after,g=f.before;h!==g&&(h||g)&&d.push(h,g)}}return d.push(r.at(-1).segment.after),d.join("")},"slice");var Ie=Object.defineProperty,Pe=b((e,t)=>Ie(e,"name",{value:t,configurable:!0}),"x"),Le=Object.defineProperty,De=Pe((e,t)=>Le(e,"name",{value:t,configurable:!0}),"T"),He=Object.defineProperty,_=De((e,t)=>He(e,"name",{value:t,configurable:!0}),"f");const X="…",Me=3,R=_((e,t,i=!1)=>{if(e.charAt(t)===" ")return t;const s=i?1:-1,o=Math.min(Me,i?e.length-t:t);for(let n=1;n<=o;n++){const a=t+n*s;if(e.charAt(a)===" ")return a}return t},"findNearestSpace"),T=_((e,t,i)=>P(e,{...i,ellipsis:"",ellipsisWidth:0,limit:t}).index,"widthToIndex"),C=_((e,t,i)=>B(e.slice(0,t),i),"indexToWidth"),Ve=_((e,t,i={})=>{if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`limit\` to be a number, got ${typeof t}`);if(e===""||t<=0)return"";const s=e.normalize("NFC"),{ellipsis:o=X,position:n="end",preferTruncationOnSpace:a=!1}=i;let l=i.ellipsisWidth??o===X?1:void 0;l??=P(o,{...i.width,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width;const{width:r}=P(s,{...i.width,ellipsis:o,ellipsisWidth:l});if(r<=t)return s;switch(n){case"end":{if(a){const d=t-l,c=T(s,d,i.width),u=R(s,c),m=C(s,u,i.width);return w(s,0,m,{width:i.width})+o}return w(s,0,t-l,{width:i.width})+o}case"middle":{const d=Math.floor(t/2),c=Math.max(0,t-l),u=Math.min(d,c),m=Math.max(0,c-u);if(a){const x=T(s,u,i.width),p=R(s,x),f=C(s,p,i.width),h=r-m,g=T(s,h,i.width),j=R(s,g,!0),v=C(s,j,i.width);return w(s,0,f,{width:i.width})+o+w(s,v,r,{width:i.width}).trim()}return w(s,0,u,{width:i.width})+o+w(s,r-m,r,{width:i.width})}case"start":{if(a){const d=r-t+l,c=T(s,d,i.width),u=R(s,c,!0),m=C(s,u,i.width);return o+w(s,m,r,{width:i.width}).trim()}return o+w(s,r-t+l,r,{width:i.width})}default:throw new Error(`Invalid position: expected 'start', 'middle' or 'end', got '${n}'`)}},"truncate");var Ge=Object.defineProperty,ie=b((e,t)=>Ge(e,"name",{value:t,configurable:!0}),"b"),qe=Object.defineProperty,A=ie((e,t)=>qe(e,"name",{value:t,configurable:!0}),"d"),Ke=Object.defineProperty,ze=A((e,t)=>Ke(e,"name",{value:t,configurable:!0}),"a");const Ue=/\x1B\[(\d+)m/;let se=class{static{b(this,"T")}static{ie(this,"T")}static{A(this,"d")}static{ze(this,"AnsiStateTracker")}activeForeground=void 0;activeBackground=void 0;activeFormatting=[];processEscape(t){const i=Ue.exec(t);if(!i)return;const s=Number.parseInt(i[1],10);switch(s){case 0:{this.activeForeground=void 0,this.activeBackground=void 0,this.activeFormatting=[];break}case 39:{this.activeForeground=void 0;break}case 49:{this.activeBackground=void 0;break}default:if(s>=30&&s<=37||s>=90&&s<=97)this.activeForeground=t;else if(s>=40&&s<=47||s>=100&&s<=107)this.activeBackground=t;else if([1,2,3,4,7,8,9].includes(s))this.activeFormatting.push(t);else if([22,23,24,27,28,29].includes(s)){const o={22:"[1m",23:"[3m",24:"[4m",27:"[7m",28:"[8m",29:"[9m"}[s];o&&(this.activeFormatting=this.activeFormatting.filter(n=>!n.includes(o)))}}}getStartEscapesForAllActiveAttributes(){return[this.activeBackground,this.activeForeground,...this.activeFormatting].filter(Boolean).join("")}getEndEscapesForAllActiveAttributes(){const t=[];if(this.activeFormatting.length>0){const i={"\x1B[1m":"\x1B[22m","\x1B[2m":"\x1B[22m","\x1B[3m":"\x1B[23m","\x1B[4m":"\x1B[24m","\x1B[7m":"\x1B[27m","\x1B[8m":"\x1B[28m","\x1B[9m":"\x1B[29m"};[...this.activeFormatting].toReversed().forEach(s=>{const o=i[s];o&&t.push(o)})}return this.activeForeground&&t.push("\x1B[39m"),this.activeBackground&&t.push("\x1B[49m"),t.join("")}};var Ye=Object.defineProperty,re=A((e,t)=>Ye(e,"name",{value:t,configurable:!0}),"o");const ne=re((e,t)=>{if(!E.has(e[t]))return{isInsideEscape:!1,isInsideLinkEscape:!1};const i=!0,s=e.slice(t+1,t+1+L.length).join("")===L;return{isInsideEscape:i,isInsideLinkEscape:s}},"checkEscapeSequence"),Xe=re((e,t={})=>{const i=new se;let s="",o=!1,n="",a="",l=!1;const r=[...e];for(let d=0;d<r.length;d++){const c=r[d];if(c&&E.has(c)){if(s){const f=t.getWidth?.(s)??0,h={isEscapeSequence:!1,isGrapheme:!0,text:s,width:f};if(l&&(h.isHyperlink=!0,h.hyperlinkUrl=a),t.onSegment?.(h,i)===!1)return;s=""}o=!0,n=c;const x=ne(r,d),{isInsideLinkEscape:p}=x;if(p){let f=d+1;for(a="";f<r.length;){const g=r[f];if(g===D)break;a+=g,f+=1}a=a.slice(4);const h={hyperlinkUrl:a,isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkStart:!0,width:0};if(t.onSegment?.(h,i)===!1)return;d=f,l=!0,o=!1,n="";continue}if(d+1<r.length&&r[d+1]==="\\"&&l){const f={isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkEnd:!0,width:0};if(t.onSegment?.(f,i)===!1)return;l=!1,a="",d+=1,o=!1,n="";continue}}if(o){if(n!==c&&(n+=c),c===H){o=!1,i.processEscape(n);const x={isEscapeSequence:!0,isGrapheme:!1,text:n,width:0};if(t.onSegment?.(x,i)===!1)return;n=""}continue}s+=c;const u=t.getWidth?.(s)??0,m={isEscapeSequence:!1,isGrapheme:!0,text:s,width:u};if(l&&(m.isHyperlink=!0,m.hyperlinkUrl=a),t.onSegment?.(m,i)===!1)return;s=""}if(s){const d=t.getWidth?.(s)??0,c={isEscapeSequence:!1,isGrapheme:!0,text:s,width:d};l&&(c.isHyperlink=!0,c.hyperlinkUrl=a),t.onSegment?.(c,i)}if(n){const d={isEscapeSequence:!0,isGrapheme:!1,text:n,width:0};t.onSegment?.(d,i)}},"processAnsiString");var Ze=Object.defineProperty,Je=A((e,t)=>Ze(e,"name",{value:t,configurable:!0}),"t$1");const Z=Je(e=>`${E.values().next().value}${ve}${String(e)}${H}`,"wrapAnsiCode");var Qe=Object.defineProperty,et=A((e,t)=>Qe(e,"name",{value:t,configurable:!0}),"s");const J=et(e=>`${E.values().next().value}${L}${e}${D}`,"wrapAnsiHyperlink");var tt=Object.defineProperty,it=A((e,t)=>tt(e,"name",{value:t,configurable:!0}),"l");const st=it(e=>{if(e.length===0)return"";if(e.length===1)return e[0];let t="",i,s;const o=e.join(`
2
- `),n=[...o];let a=0;for(const[l,r]of n.entries()){if(t+=r,E.has(r)){const c=ge.exec(o.slice(a))?.groups??{};if(c.code!==void 0){const u=Number.parseFloat(c.code);i=u===ye?void 0:u}else c.uri!==void 0&&(s=c.uri.length===0?void 0:c.uri)}const d=xe.get(Number(i));n[l+1]===`
3
- `?(s&&(t+=J("")),i&&d&&(t+=Z(d))):r===`
4
- `&&(i&&d&&(t+=Z(i)),s&&(t+=J(s))),a+=r.length}return t},"preserveAnsi");var rt=Object.defineProperty,k=A((e,t)=>rt(e,"name",{value:t,configurable:!0}),"f");const oe=/(?=\s)|(?<=\s)/,ae=/^\s+$/,I=k(e=>{if(!e.includes("\x1B"))return e;let t=e;return e.includes("\x1B[30m")&&(t+="\x1B[39m"),e.includes("\x1B[42m")&&(t+="\x1B[49m"),t},"resetAnsiAtLineBreak"),S=k(e=>{const t=e.split(" ");let i=t.length;for(;i>0&&B(t[i-1])===0;)i--;return i===t.length?e:t.slice(0,i).join(" ")+t.slice(i).join("")},"stringVisibleTrimSpacesRight"),ce=k((e,t,i)=>{if(e.length===0)return[""];if(t<=0)return[e];const s=[],o=new se;let n="",a=0,l=!1,r=!1,d="",c=0;for(;c<e.length;){const u=e[c];if(E.has(u)){l=!0,d=u,n+=u,r=ne([...e],c).isInsideLinkEscape,c+=1;continue}if(l){d+=u,n+=u,r?u===D&&(l=r=!1):u===H&&(l=!1,o.processEscape(d)),c+=1;continue}const m=B(u),x=u===" ";if(m===0){n+=u,c+=1;continue}if(a+m>t&&(n&&s.push(n+o.getEndEscapesForAllActiveAttributes()),n=o.getStartEscapesForAllActiveAttributes(),a=B(n),x&&i)){for(;c<e.length&&e[c]===" ";)c+=1;continue}if(n+=u,a+=m,a===t&&c<e.length-1&&(s.push(n+o.getEndEscapesForAllActiveAttributes()),n=o.getStartEscapesForAllActiveAttributes(),a=B(n),c+1<e.length&&e[c+1]===" "&&i)){for(c+=1;c<e.length&&e[c]===" ";)c+=1;continue}c+=1}return n&&s.push(n+o.getEndEscapesForAllActiveAttributes()),i?s.map(u=>S(u)):s},"wrapWithBreakAtWidth"),nt=k((e,t,i)=>{if(e.length===0)return[];const s=i?e.trim():e;if(s.length===0)return[];const o=[];let n="",a=0;return Xe(s,{getWidth:B,onSegment:k((l,r)=>{const d=l.text??"";if(l.isEscapeSequence)n+=d;else{const c=d===" ";if(l.width===0)return n+=d,!0;if(a+l.width>t&&(n&&o.push(n),n=r.getStartEscapesForAllActiveAttributes(),a=0,c))return i||o.push(r.getStartEscapesForAllActiveAttributes()+d),!0;n+=d,a+=l.width}return!0},"onSegment")}),n&&o.push(n),i?o.map(l=>S(l)):o},"wrapCharByChar"),ot=k((e,t,i)=>{if(e.length===0)return[];const s=i?e.trim():e;if(s.length===0)return[];const o=s.split(oe),n=[];let a="",l=0,r=0;for(;r<o.length;){const d=o[r],c=ae.test(d),u=B(d);if(d.length===0){r+=1;continue}if(i&&c&&l===0){r+=1;continue}if(l+u>t&&l>0){i?n.push(S(a)):n.push(a),a="",l=0;continue}a+=d,l+=u,r+=1}return a&&(i?n.push(S(a)):n.push(a)),n},"wrapWithWordBoundaries"),at=k((e,t,i)=>{if(e.length===0)return[];const s=i?e.trim():e;if(s.length===0)return[];const o=s.split(oe),n=[];let a="",l=0,r=0;for(;r<o.length;){const d=o[r],c=ae.test(d),u=B(d);if(d.length===0){r+=1;continue}if(i&&c&&l===0){r+=1;continue}if(u>t){a&&n.push(I(i?S(a):a));const m=ce(d,t,i);if(m.length>0){for(let x=0;x<m.length-1;x+=1)n.push(m[x]);a=m.at(-1),l=B(a)}else a="",l=0;r+=1;continue}if(l+u>t&&l>0&&(n.push(I(i?S(a):a)),a="",l=0,i&&c)){r+=1;continue}a+=d,l+=u,r+=1}return a&&n.push(I(i?S(a):a)),n},"wrapAndBreakWords"),F={BREAK_AT_CHARACTERS:"BREAK_AT_CHARACTERS",BREAK_WORDS:"BREAK_WORDS",PRESERVE_WORDS:"PRESERVE_WORDS",STRICT_WIDTH:"STRICT_WIDTH"},ct=k((e,t={})=>{const{removeZeroWidthCharacters:i=!0,trim:s=!0,width:o=80,wrapMode:n=F.PRESERVE_WORDS}=t;if(s&&e.trim()==="")return"";let a=e.normalize("NFC").replaceAll(`\r
5
- `,`
6
- `);return i&&(a=a.replaceAll(me,"")),a.split(`
7
- `).map(l=>{if(s&&l.trim()==="")return"";let r;switch(n){case F.BREAK_AT_CHARACTERS:{r=nt(l,o,s);break}case F.BREAK_WORDS:{r=at(l,o,s);break}case F.STRICT_WIDTH:{r=ce(l,o,s);break}default:r=ot(l,o,s)}return st(r)}).join(`
8
- `)},"wordWrap");var lt=Object.defineProperty,dt=b((e,t)=>lt(e,"name",{value:t,configurable:!0}),"R");const Q={},ut={hard:"STRICT_WIDTH",wrap:"BREAK_WORDS","wrap-anywhere":"BREAK_AT_CHARACTERS","wrap-preserve-words":"PRESERVE_WORDS","wrap-strict":"STRICT_WIDTH"},ht=dt((e,t,i)=>{const s=e+String(t)+String(i),o=Q[s];if(o)return o;let n=e;const a=ut[i];if(a)n=ct(e,{trim:!1,width:t,wrapMode:a}).replace(/\n$/,"");else if(i.startsWith("truncate")){let l="end";i==="truncate-middle"&&(l="middle"),i==="truncate-start"&&(l="start"),n=Ve(e,t,{position:l})}return Q[s]=n,n},"wrapText");var ft=Object.defineProperty,y=b((e,t)=>ft(e,"name",{value:t,configurable:!0}),"n");let pt=0;const wt=y(e=>{const t={attributes:{},childNodes:[],internal_accessibility:{},internal_id:pt++,nodeName:e,parentNode:void 0,style:{},yogaNode:e==="ink-virtual-text"||e==="ink-cursor"?void 0:fe.Node.create()};return e==="ink-text"&&t.yogaNode?.setMeasureFunc(mt.bind(null,t)),t},"createNode"),M=y(e=>{ue(e.nodeName==="ink-static-render"&&e.cachedRender?e.parentNode:e)},"markNodeAndParentIfStaticAsDirty"),kt=y((e,t)=>{t.parentNode&&le(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),M(e)},"appendChildNode"),St=y((e,t,i)=>{t.parentNode&&le(t.parentNode,t),t.parentNode=e;const s=e.childNodes.indexOf(i);if(s===-1)e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount());else if(e.childNodes.splice(s,0,t),t.yogaNode){const o=e.childNodes.slice(0,s).filter(n=>!!n.yogaNode).length;e.yogaNode?.insertChild(t.yogaNode,o)}M(e)},"insertBeforeNode"),le=y((e,t)=>{if(t.yogaNode){const s=t.yogaNode.getParent();s&&s.removeChild(t.yogaNode)}t.parentNode=void 0;const i=e.childNodes.indexOf(t);i!==-1&&e.childNodes.splice(i,1),M(e)},"removeChildNode"),At=y((e,t,i)=>{if(t==="internal_accessibility"){e.internal_accessibility=i;return}e.attributes[t]=i},"setAttribute"),Et=y((e,t)=>{e.style=t??{}},"setStyle"),$t=y(e=>{const t={nodeName:"#text",nodeValue:e,parentNode:void 0,style:{},yogaNode:void 0};return gt(t,e),t},"createTextNode"),mt=y(function(e,t){const i=e.nodeName==="#text"?e.nodeValue:pe(e),s=V(i);if(s.width<=t||s.width>=1&&t>0&&t<1)return s;const o=e.style?.textWrap??"wrap",n=ht(i,Math.floor(t),o);return V(n)},"measureTextNode"),de=y(e=>{if(e?.parentNode)return e.yogaNode??de(e.parentNode)},"findClosestYogaNode"),ue=y(e=>{(e?.nodeName==="#text"||e?.nodeName==="ink-text"||e?.nodeName==="ink-virtual-text")&&de(e)?.markDirty();let t=e;for(;t;){if((t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&(t.internal_textCache=void 0),"childNodes"in t){if(t!==e&&t.nodeName==="ink-static-render"&&t.cachedRender)break;t.cachedRender=void 0}t=t.parentNode}},"markNodeAsDirty"),gt=y((e,t)=>{typeof t!="string"&&(t=String(t)),e.nodeValue=t,ue(e)},"setTextNodeValue"),Wt=y((e,t)=>e.nodeName!=="ink-root"?()=>{}:(e.internal_layoutListeners??=new Set,e.internal_layoutListeners.add(t),()=>{e.internal_layoutListeners?.delete(t)}),"addLayoutListener"),Ot=y(e=>{if(!(e.nodeName!=="ink-root"||!e.internal_layoutListeners))for(const t of e.internal_layoutListeners)t()},"emitLayoutListeners"),Rt=y((e,t)=>{if(e.cachedRender=t,e.yogaNode){for(e.yogaNode.setWidth(t.width),e.yogaNode.setHeight(t.height);e.yogaNode.getChildCount()>0;)e.yogaNode.removeChild(e.yogaNode.getChild(0));e.isYogaTreeDetached=!0}},"setCachedRender"),Tt=y(e=>{const t=[];let i=e;for(;i;)t.unshift(i),i=i.parentNode;return t},"getPathToRoot"),Ct=y(e=>{let t=e;for(;t;){const{userSelect:i}=t.style;if(i==="none")return!1;if(i==="text"||i==="all")return!0;t=t.parentNode}return!0},"isNodeSelectable");export{ht as T,Wt as a,St as b,wt as c,kt as d,Ot as e,$t as f,Tt as g,Et as h,Ct as i,At as j,ct as k,Rt as l,ue as m,le as r,gt as s};
@@ -1 +0,0 @@
1
- var l=Object.defineProperty;var c=(r,e)=>l(r,"name",{value:e,configurable:!0});import{a as n,o as s}from"./constants-D12jy2Zh-RSfxu1eM.js";var g=Object.defineProperty,u=c((r,e)=>g(r,"name",{value:e,configurable:!0}),"t"),S=Object.defineProperty,d=u((r,e)=>S(r,"name",{value:e,configurable:!0}),"t");const b=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,v=/^(?:msys|cygwin)$/,H=!b&&(process.platform==="win32"||v.test(process.env.OSTYPE));var B=Object.defineProperty,t=d((r,e)=>B(r,"name",{value:e,configurable:!0}),"n");const U=`${n}6n`,f=t((r=1)=>`${n}${String(r)}D`,"cursorBackward"),C=t((r=1)=>`${n}${String(r)}B`,"cursorDown");t((r=1)=>`${n}${String(r)}C`,"cursorForward");const F=`${n}?25l`,y=`${n}G`;t((r=1)=>f(r),"cursorLeft");const T=t((r=1)=>`${n}${String(r)}G`,"cursorHorizontalAbsolute");t((r,e)=>{let o="";return r<0?o+=`${n}${String(-r)}D`:r>0&&(o+=`${n}${String(r)}C`),e<0?o+=`${n}${String(-e)}A`:e>0&&(o+=`${n}${String(e)}B`),o},"cursorMove");const z=t((r=1)=>`${n}${String(r)}E`,"cursorNextLine");t((r=1)=>`${n}${String(r)}F`,"cursorPreviousLine");const G=`${n}?25h`,x=t((r,e)=>e===void 0?T(r+1):`${n}${String(e+1)}${s}${String(r+1)}H`,"cursorTo"),I=t((r,e)=>e===void 0?`${n}${String(r)}H`:`${n}${String(r)}${s}${String(e)}H`,"cursorPosition");t((r=1)=>`${n}${String(r)}I`,"cursorHorizontalForwardTab");t((r=1)=>`${n}${String(r)}Z`,"cursorBackwardTab");t((r=1)=>`${n}${String(r)}X`,"eraseCharacter");t((r=1)=>`${n}${String(r)}d`,"cursorVerticalAbsolute");const p=t((r=1)=>`${n}${String(r)}A`,"cursorUp");var k=(r=>(r[r.Default=0]="Default",r[r.BlinkingBlock=1]="BlinkingBlock",r[r.SteadyBlock=2]="SteadyBlock",r[r.BlinkingUnderline=3]="BlinkingUnderline",r[r.SteadyUnderline=4]="SteadyUnderline",r[r.BlinkingBar=5]="BlinkingBar",r[r.SteadyBar=6]="SteadyBar",r))(k||{});const N=t(r=>`${n}${String(r)} q`,"setCursorStyle");var E=Object.defineProperty,m=c((r,e)=>E(r,"name",{value:e,configurable:!0}),"o"),w=Object.defineProperty,P=m((r,e)=>w(r,"name",{value:e,configurable:!0}),"s"),j=Object.defineProperty,$=P((r,e)=>j(r,"name",{value:e,configurable:!0}),"o"),L=(r=>(r[r.ToEnd=0]="ToEnd",r[r.ToBeginning=1]="ToBeginning",r[r.EntireScreen=2]="EntireScreen",r[r.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",r))(L||{});const i=$(r=>{const e=r>=0&&r<=3?r:0;return`${n}${e===0?"":String(e)}J`},"eraseDisplay");var O=(r=>(r[r.ToEnd=0]="ToEnd",r[r.ToBeginning=1]="ToBeginning",r[r.EntireLine=2]="EntireLine",r))(O||{});const a=$(r=>{const e=r>=0&&r<=2?r:0;return`${n}${e===0?"":String(e)}K`},"eraseInLine");i(0);const h=a(2),V=a(0);a(1);const q=$(r=>{if(r<=0)return"";let e="";for(let o=0;o<r;o+=1)e+=h,o<r-1&&(e+=p());return e+=y,e},"eraseLines");i(2);i(1);i(3);export{h as E,x as F,I as G,y as H,p as N,F as P,U as T,N as V,a,H as b,L as c,q as d,z as e,V as f,C as h,O as l,i as r,G as z};
@@ -1 +0,0 @@
1
- var X=Object.defineProperty;var h=(e,i)=>X(e,"name",{value:i,configurable:!0});var e1=Object.defineProperty,C=h((e,i)=>e1(e,"name",{value:i,configurable:!0}),"u$1"),i1=Object.defineProperty,y=C((e,i)=>i1(e,"name",{value:i,configurable:!0}),"l");const r1=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],t1=12288,n1=65510,a1=[12288,12288,65281,65376,65504,65510],u1=8361,l1=65518,o1=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],d1=32,s1=10630,c1=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],h1=4352,f1=262141,q=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var w1=Object.defineProperty,b1=y((e,i)=>w1(e,"name",{value:i,configurable:!0}),"r$1");const p=b1((e,i)=>{let r=0,a=Math.floor(e.length/2)-1;for(;r<=a;){const u=Math.floor((r+a)/2),l=u*2;if(i<e[l])a=u-1;else if(i>e[l+1])r=u+1;else return!0}return!1},"isInRange");var g1=Object.defineProperty,b=y((e,i)=>g1(e,"name",{value:i,configurable:!0}),"r");const _=19968,[m1,p1]=E(q);function E(e){let i=e[0],r=e[1];for(let a=0;a<e.length;a+=2){const u=e[a],l=e[a+1];if(_>=u&&_<=l)return[u,l];l-u>r-i&&(i=u,r=l)}return[i,r]}h(E,"c$1");C(E,"f");y(E,"k");b(E,"findWideFastPathRange");const D=b(e=>e<161||e>1114109?!1:p(r1,e),"isAmbiguous"),G=b(e=>e<t1||e>n1?!1:p(a1,e),"isFullWidth"),$1=b(e=>e<u1||e>l1?!1:p(o1,e),"isHalfWidth"),W1=b(e=>e<d1||e>s1?!1:p(c1,e),"isNarrow"),Z=b(e=>e>=m1&&e<=p1?!0:e<h1||e>f1?!1:p(q,e),"isWide");function O(e){return D(e)?"ambiguous":G(e)?"fullwidth":$1(e)?"halfwidth":W1(e)?"narrow":Z(e)?"wide":"neutral"}h(O,"g$3");C(O,"S");y(O,"getCategory");b(O,"getCategory");var v1=Object.defineProperty,P=h((e,i)=>v1(e,"name",{value:i,configurable:!0}),"i$2"),I1=Object.defineProperty,k=P((e,i)=>I1(e,"name",{value:i,configurable:!0}),"a"),x1=Object.defineProperty,S=k((e,i)=>x1(e,"name",{value:i,configurable:!0}),"e");function $(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}h($,"s$1");P($,"s");k($,"r");S($,"validate");function W(e){return $(e),O(e)}h(W,"r$2");P(W,"p");k(W,"eastAsianWidthType");S(W,"eastAsianWidthType");function T(e,{ambiguousAsWide:i=!1}={}){return $(e),G(e)||Z(e)||i&&D(e)?2:1}h(T,"o$2");P(T,"W");k(T,"eastAsianWidth");S(T,"eastAsianWidth");var j1=Object.defineProperty,y1=h((e,i)=>j1(e,"name",{value:i,configurable:!0}),"p$1"),E1=Object.defineProperty,J=y1((e,i)=>E1(e,"name",{value:i,configurable:!0}),"e"),O1=Object.defineProperty,P1=J((e,i)=>O1(e,"name",{value:i,configurable:!0}),"E");const K=String.raw,H=K`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,k1=P1(()=>new RegExp(K`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${H}(?:\u200D${H})*`,"gu"),"default");var F1=Object.defineProperty,B1=J((e,i)=>F1(e,"name",{value:i,configurable:!0}),"p");const K1=new Set(["\x1B","›"]),M1="\x07",N1="[",L1="m",A1="]8;;",Q1=39,U1=/[\u200B\uFEFF\u2060-\u2064]/g,X1=new RegExp(`(?:\\${N1}(?<code>\\d+)m|\\${A1}(?<uri>.*)${M1})`),e2=Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]])),m=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,i2=/\u001B\[(\d+(?:;\d+)*)?m[^\u001B]*(?:\u001B\[(?:\d+(?:;\d+)*)?m|$)/g,r2=/\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)(.*?)\u001B\]8;;(?:\u0007|\u001B\\)/g,v=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,x=k1();B1(e=>e.replace(x,""),"stripEmoji");var C1=Object.defineProperty,S1=h((e,i)=>C1(e,"name",{value:i,configurable:!0}),"E"),T1=Object.defineProperty,R1=S1((e,i)=>T1(e,"name",{value:i,configurable:!0}),"A"),z1=Object.defineProperty,F=R1((e,i)=>z1(e,"name",{value:i,configurable:!0}),"d");const Y=new Map,I=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,j=F(e=>e>=32&&e<=126?"latin":e===8203||e===8204||e===8205||e===8288?"zero":e<=31||e>=127&&e<=159?"control":e>=160&&e<=255||e>=9472&&e<=9599?"latin":e>=4352&&e<=4607||e>=11904&&e<=40959||e>=44032&&e<=55215||e>=63744&&e<=64255||e>=65280&&e<=65519&&!(e>=65377&&e<=65439)||e>=12352&&e<=12543?"wide":e===8230?"latin":"other","getCharType"),V1=F((e,i)=>{const r=Math.floor(e/65536),a=e%65536;let u=Y.get(r);if(u||(u=new Map,Y.set(r,u)),u.has(a))return u.get(a);let l;if(j(e)==="latin")l=i.width.regular;else if(j(e)==="control")l=i.width.control;else if(j(e)==="wide")l=i.width.wide;else switch(W(e)){case"ambiguous":{l=i.width.ambiguousIsNarrow?i.width.regular:i.width.wide;break}case"fullwidth":{l=i.width.fullWidth;break}case"wide":{l=i.width.wide;break}default:l=i.width.regular}return u.set(a,l),l},"getCachedCharWidth"),_1=F(e=>e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=917760&&e<=917999||e>=65024&&e<=65039||e>=3633&&e<=3642||e>=3655&&e<=3662||e>=3761&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=2304&&e<=2307||e>=2362&&e<=2383||e>=2385&&e<=2391||e>=2402&&e<=2403||e>=2433&&e<=2435||e>=2492&&e<=2500||e>=2509&&e<=2509||e>=2561&&e<=2563||e>=2620&&e<=2637||e>=1611&&e<=1631||e>=1648&&e<=1648||e>=1750&&e<=1773||e>=2276&&e<=2302||e>=1425&&e<=1469||e>=1471&&e<=1471||e>=1473&&e<=1474||e>=1476&&e<=1477||e>=1479&&e<=1479||e>=3893&&e<=3893||e>=3895&&e<=3895||e>=3897&&e<=3897||e>=3953&&e<=3966||e>=3968&&e<=3972||e>=3974&&e<=3975?!0:e>=768&&e<=777||e>=803&&e<=803,"isCombiningCharacter"),A=F((e,i={})=>{if(!e||e.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const r={truncation:{countAnsiEscapeCodes:i.countAnsiEscapeCodes??!1,ellipsis:i.ellipsis??"",ellipsisWidth:i.ellipsisWidth??(i.ellipsis?A(i.ellipsis,{...i,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:i.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:i.ambiguousIsNarrow??!1,ansi:i.ansiWidth??0,control:i.controlWidth??0,emoji:i.emojiWidth??2,fullWidth:i.fullWidth??2,halfWidth:i.halfWidth??1,regular:i.regularWidth??1,tab:i.tabWidth??8,wide:i.wideWidth??2}},a=Math.max(0,r.truncation.limit-r.truncation.ellipsisWidth),{length:u}=e,l=u>1e4;let t=0,n=0,o=u,d=!1;const L=e.includes("\x1B")||e.includes("›");for(;t<u;){if(L&&(e[t]==="\x1B"||e[t]==="›")){if(e.startsWith("\x1B]8;;",t)){const c="\x1B]8;;\x07",w=c.length,B=e.indexOf("\x07",t+5);if(B!==-1){const M=e.indexOf(c,B+1);if(M!==-1){const Q=M+w,U=e.slice(B+1,M).replace(m,""),V=A(U,{ambiguousIsNarrow:r.width.ambiguousIsNarrow,ansiWidth:r.width.ansi,controlWidth:r.width.control,countAnsiEscapeCodes:!1,ellipsis:r.truncation.ellipsis,ellipsisWidth:r.truncation.ellipsisWidth,emojiWidth:r.width.emoji,fullWidth:r.width.fullWidth,halfWidth:r.width.halfWidth,limit:Math.max(0,a-n),regularWidth:r.width.regular,tabWidth:r.width.tab,wideWidth:r.width.wide}),N=V.width;if(V.truncated)d=!0,o=Math.min(o,t);else if(n+N>a&&(o=Math.min(o,t),d=!0,n+N>r.truncation.limit))break;if(n+=N,t=Q,d&&n>=r.truncation.limit)break;continue}}}if(m.lastIndex=t,m.test(e)){const c=m.lastIndex-t,w=r.truncation.countAnsiEscapeCodes?c:r.width.ansi;if(n+w>a&&(o=Math.min(o,t),n+w>r.truncation.limit)){d=!0;break}n+=w,t=m.lastIndex;continue}}const f=e.codePointAt(t);if(f===8203||f===65279||f>=8288&&f<=8292){t+=1;continue}if(f===9){if(n+r.width.tab>a&&(o=Math.min(o,t),n+r.width.tab>r.truncation.limit)){d=!0;break}n+=r.width.tab,t+=1;continue}if(I.lastIndex=t,I.test(e)){const c=(I.lastIndex-t)*r.width.regular;if(n+c>a){const w=Math.floor((a-n)/r.width.regular);if(o=Math.min(o,t+w),n+c>r.truncation.limit){d=!0;break}}n+=c,t=I.lastIndex;continue}if((f<=31||f>=127&&f<=159)&&(v.lastIndex=t,v.test(e))){const c=(v.lastIndex-t)*r.width.control;if(n+c>a&&(o=Math.min(o,t+Math.floor((a-n)/r.width.control)),n+c>r.truncation.limit)){d=!0;break}n+=c,t=v.lastIndex;continue}if(x.lastIndex=t,x.test(e)){if(n+r.width.emoji>a&&(o=Math.min(o,t),n+r.width.emoji>r.truncation.limit)){d=!0;break}n+=r.width.emoji,t=x.lastIndex;continue}const g=e.codePointAt(t)??0;if(_1(g)){t+=g>65535?2:1;continue}let s;if(l)s=V1(g,r);else switch(j(g)){case"control":{s=r.width.control;break}case"latin":{s=r.width.regular;break}case"wide":{s=r.width.wide;break}case"zero":{s=0;break}default:switch(W(g)){case"ambiguous":{s=r.width.ambiguousIsNarrow?r.width.regular:r.width.wide;break}case"fullwidth":{s=r.width.fullWidth;break}case"wide":{s=r.width.wide;break}default:s=r.width.regular}}if(n+s>a&&(o=Math.min(o,t),n+s>r.truncation.limit)){d=!0;break}n+=s,t+=g>65535?2:1}let R=n,z=!1;return d&&r.truncation.limit>=r.truncation.ellipsisWidth&&(R=r.truncation.limit,z=!0),{ellipsed:z,index:d?o:u,truncated:d,width:R}},"getStringTruncatedWidth");var H1=Object.defineProperty,Y1=h((e,i)=>H1(e,"name",{value:i,configurable:!0}),"i"),q1=Object.defineProperty,D1=Y1((e,i)=>q1(e,"name",{value:i,configurable:!0}),"e"),G1=Object.defineProperty,Z1=D1((e,i)=>G1(e,"name",{value:i,configurable:!0}),"r");const t2=Z1((e,i={})=>A(e,{...i,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,"getStringWidth");export{X1 as F,r2 as G,A as N,Q1 as a,e2 as b,Z as c,L1 as d,m as h,M1 as i,i2 as k,K1 as l,U1 as m,t2 as o,A1 as s,N1 as t,G as v};
@@ -1,9 +0,0 @@
1
- var V=Object.defineProperty;var i=(t,q)=>V(t,"name",{value:q,configurable:!0});import"./_commonjsHelpers-CHNfUHCT.js";var M={},O;function X(){return O||(O=1,(function(t){var q=Object.defineProperty,o=i((e,n)=>q(e,"name",{value:n,configurable:!0}),"l");/**
2
- * @license React
3
- * scheduler.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */function w(e,n){var r=e.length;e.push(n);e:for(;0<r;){var l=r-1>>>1,a=e[l];if(0<k(a,n))e[l]=n,e[r]=a,r=l;else break e}}i(w,"push"),o(w,"push");function c(e){return e.length===0?null:e[0]}i(c,"peek"),o(c,"peek");function h(e){if(e.length===0)return null;var n=e[0],r=e.pop();if(r!==n){e[0]=r;e:for(var l=0,a=e.length,C=a>>>1;l<C;){var S=2*(l+1)-1,L=e[S],m=S+1,W=e[m];if(0>k(L,r))m<a&&0>k(W,L)?(e[l]=W,e[m]=r,l=m):(e[l]=L,e[S]=r,l=S);else if(m<a&&0>k(W,r))e[l]=W,e[m]=r,l=m;else break e}}return n}i(h,"pop"),o(h,"pop");function k(e,n){var r=e.sortIndex-n.sortIndex;return r!==0?r:e.id-n.id}if(i(k,"compare"),o(k,"compare"),t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var A=performance;t.unstable_now=function(){return A.now()}}else{var j=Date,G=j.now();t.unstable_now=function(){return j.now()-G}}var f=[],d=[],J=1,s=null,u=3,D=!1,y=!1,p=!1,U=!1,Y=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function T(e){for(var n=c(d);n!==null;){if(n.callback===null)h(d);else if(n.startTime<=e)h(d),n.sortIndex=n.expirationTime,w(f,n);else break;n=c(d)}}i(T,"advanceTimers"),o(T,"advanceTimers");function g(e){if(p=!1,T(e),!y)if(c(f)!==null)y=!0,b||(b=!0,v());else{var n=c(d);n!==null&&I(g,n.startTime-e)}}i(g,"handleTimeout"),o(g,"handleTimeout");var b=!1,_=-1,B=5,E=-1;function H(){return U?!0:!(t.unstable_now()-E<B)}i(H,"shouldYieldToHost"),o(H,"shouldYieldToHost");function P(){if(U=!1,b){var e=t.unstable_now();E=e;var n=!0;try{e:{y=!1,p&&(p=!1,F(_),_=-1),D=!0;var r=u;try{n:{for(T(e),s=c(f);s!==null&&!(s.expirationTime>e&&H());){var l=s.callback;if(typeof l=="function"){s.callback=null,u=s.priorityLevel;var a=l(s.expirationTime<=e);if(e=t.unstable_now(),typeof a=="function"){s.callback=a,T(e),n=!0;break n}s===c(f)&&h(f),T(e)}else h(f);s=c(f)}if(s!==null)n=!0;else{var C=c(d);C!==null&&I(g,C.startTime-e),n=!1}}break e}finally{s=null,u=r,D=!1}n=void 0}}finally{n?v():b=!1}}}i(P,"performWorkUntilDeadline"),o(P,"performWorkUntilDeadline");var v;if(typeof Q=="function")v=o(function(){Q(P)},"schedulePerformWorkUntilDeadline");else if(typeof MessageChannel<"u"){var N=new MessageChannel,K=N.port2;N.port1.onmessage=P,v=o(function(){K.postMessage(null)},"schedulePerformWorkUntilDeadline")}else v=o(function(){Y(P,0)},"schedulePerformWorkUntilDeadline");function I(e,n){_=Y(function(){e(t.unstable_now())},n)}i(I,"requestHostTimeout"),o(I,"requestHostTimeout"),t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return u},t.unstable_next=function(e){switch(u){case 1:case 2:case 3:var n=3;break;default:n=u}var r=u;u=n;try{return e()}finally{u=r}},t.unstable_requestPaint=function(){U=!0},t.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=u;u=e;try{return n()}finally{u=r}},t.unstable_scheduleCallback=function(e,n,r){var l=t.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?l+r:l):r=l,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=r+a,e={id:J++,callback:n,priorityLevel:e,startTime:r,expirationTime:a,sortIndex:-1},r>l?(e.sortIndex=r,w(d,e),c(f)===null&&e===c(d)&&(p?(F(_),_=-1):p=!0,I(g,r-l))):(e.sortIndex=a,w(f,e),y||D||(y=!0,b||(b=!0,v()))),e},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(e){var n=u;return function(){var r=u;u=n;try{return e.apply(this,arguments)}finally{u=r}}}})(M)),M}i(X,"requireScheduler_production");var R,z;function Z(){return z||(z=1,R=X()),R}i(Z,"requireScheduler");var ee=Z();export{ee as s};