@claudiolabs/claudio 0.1.9 → 0.1.11

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 (814) hide show
  1. package/bin/claudio +50 -1
  2. package/dist/chunks/AgentTool-0.1.11-m06x003m.mjs +1 -0
  3. package/dist/chunks/App-0.1.11-z60c27dk.mjs +1 -0
  4. package/dist/chunks/ApproveApiKey-0.1.11-dpm879x7.mjs +1 -0
  5. package/dist/chunks/AssistantSessionChooser-0.1.11-kb5jvw8n.mjs +1 -0
  6. package/dist/chunks/AutoModeOptInDialog-0.1.11-dnqj2p8g.mjs +1 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-0.1.11-h71pmj5p.mjs +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-0.1.11-vjwzqejw.mjs +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.11-0wpjjdn9.mjs +1 -0
  10. package/dist/chunks/ConsoleOAuthFlow-0.1.11-xzbcx3cw.mjs +1 -0
  11. package/dist/chunks/DiffDialog-0.1.11-k3zsm9tz.mjs +3 -0
  12. package/dist/chunks/Doctor-0.1.11-958cxvhj.mjs +1 -0
  13. package/dist/chunks/Grove-0.1.11-93bnbcec.mjs +1 -0
  14. package/dist/chunks/ITermBackend-0.1.11-xbxm144g.mjs +1 -0
  15. package/dist/chunks/InProcessTransport-0.1.11-xecmx0sw.mjs +1 -0
  16. package/dist/chunks/InvalidConfigDialog-0.1.11-vbeef1wb.mjs +1 -0
  17. package/dist/chunks/InvalidSettingsDialog-0.1.11-5bct7bny.mjs +1 -0
  18. package/dist/chunks/MigrationDialog-0.1.11-13kfzmtt.mjs +1 -0
  19. package/dist/chunks/Onboarding-0.1.11-kz5hnpx3.mjs +1 -0
  20. package/dist/chunks/ProviderManager-0.1.11-nggswmdv.mjs +1 -0
  21. package/dist/chunks/REPL-0.1.11-ctxx4039.mjs +1 -0
  22. package/dist/chunks/ResumeConversation-0.1.11-gwxzn4yg.mjs +1 -0
  23. package/dist/chunks/SnapshotUpdateDialog-0.1.11-h881m192.mjs +1 -0
  24. package/dist/chunks/TeleportProgress-0.1.11-z1ez7pce.mjs +1 -0
  25. package/dist/chunks/TeleportRepoMismatchDialog-0.1.11-pjt2g9ss.mjs +1 -0
  26. package/dist/chunks/TeleportResumeWrapper-0.1.11-9y29zset.mjs +1 -0
  27. package/dist/chunks/TmuxBackend-0.1.11-5a4ddj92.mjs +9 -0
  28. package/dist/chunks/ToolSearchTool-0.1.11-w3cgae0s.mjs +1 -0
  29. package/dist/chunks/TrustDialog-0.1.11-3dsrj239.mjs +1 -0
  30. package/dist/chunks/activeProvider-0.1.11-qrn947by.mjs +1 -0
  31. package/dist/chunks/add-dir-0.1.11-9j7tq9gk.mjs +1 -0
  32. package/dist/chunks/agents-0.1.11-26pbss9x.mjs +3 -0
  33. package/dist/chunks/agents-0.1.11-m56gfjmy.mjs +111 -0
  34. package/dist/chunks/api-0.1.11-5ygenb1h.mjs +1 -0
  35. package/dist/chunks/asciicast-0.1.11-7mkaazy8.mjs +1 -0
  36. package/dist/chunks/assistant-0.1.11-5xbar4vv.mjs +1 -0
  37. package/dist/chunks/auth-0.1.11-2363mst5.mjs +1 -0
  38. package/dist/chunks/auth-0.1.11-p47wajra.mjs +1 -0
  39. package/dist/chunks/autoMode-0.1.11-nv8vsag0.mjs +48 -0
  40. package/dist/chunks/backgroundHousekeeping-0.1.11-fy6tykxe.mjs +1 -0
  41. package/dist/chunks/branch-0.1.11-aqhrj1x2.mjs +4 -0
  42. package/dist/chunks/bridgePointer-0.1.11-wr8dfs91.mjs +1 -0
  43. package/dist/chunks/btw-0.1.11-2kks7dfd.mjs +1 -0
  44. package/dist/chunks/buddy-0.1.11-gsj76spy.mjs +3 -0
  45. package/dist/chunks/cacache-0.1.11-wtz0ca19.mjs +1 -0
  46. package/dist/chunks/cache-probe-0.1.11-pgsemwpr.mjs +21 -0
  47. package/dist/chunks/cacheStats-0.1.11-1zqq6pm7.mjs +4 -0
  48. package/dist/chunks/caches-0.1.11-vewfnrya.mjs +1 -0
  49. package/dist/chunks/chrome-0.1.11-0g5459b5.mjs +1 -0
  50. package/dist/chunks/chromeNativeHost-0.1.11-m5kskzjw.mjs +2 -0
  51. package/dist/chunks/claude-for-chrome-mcp-0.1.11-h99xhv8j.mjs +1 -0
  52. package/dist/chunks/claudeDesktop-0.1.11-zpdtj6k8.mjs +1 -0
  53. package/dist/chunks/claudemd-0.1.11-qrr22x5b.mjs +1 -0
  54. package/dist/chunks/clear-0.1.11-c93nbam7.mjs +1 -0
  55. package/dist/chunks/clearTerminal-0.1.11-pdrc3735.mjs +1 -0
  56. package/dist/chunks/cli-0.1.11-036me3yr.mjs +2 -0
  57. package/dist/chunks/cli-0.1.11-05g86mrk.mjs +2 -0
  58. package/dist/chunks/cli-0.1.11-05ngjm8p.mjs +2 -0
  59. package/dist/chunks/cli-0.1.11-0fshz0ak.mjs +2 -0
  60. package/dist/chunks/cli-0.1.11-0n77qn68.mjs +2 -0
  61. package/dist/chunks/cli-0.1.11-0qwee9gy.mjs +2 -0
  62. package/dist/chunks/cli-0.1.11-0tge574q.mjs +2 -0
  63. package/dist/chunks/cli-0.1.11-10nmrfsz.mjs +8 -0
  64. package/dist/chunks/cli-0.1.11-16086k9e.mjs +2 -0
  65. package/dist/chunks/cli-0.1.11-1b48xqbe.mjs +2 -0
  66. package/dist/chunks/cli-0.1.11-1bmswdg3.mjs +2 -0
  67. package/dist/chunks/cli-0.1.11-1bryv90w.mjs +2 -0
  68. package/dist/chunks/cli-0.1.11-1bxwxewq.mjs +833 -0
  69. package/dist/chunks/cli-0.1.11-1e6fgnts.mjs +3 -0
  70. package/dist/chunks/cli-0.1.11-1xr9et85.mjs +2 -0
  71. package/dist/chunks/cli-0.1.11-21epc92q.mjs +2 -0
  72. package/dist/chunks/cli-0.1.11-23qqxmk4.mjs +2 -0
  73. package/dist/chunks/cli-0.1.11-2w8d5vqb.mjs +2 -0
  74. package/dist/chunks/cli-0.1.11-2xf0g9qc.mjs +45 -0
  75. package/dist/chunks/cli-0.1.11-3f5dv6mt.mjs +2 -0
  76. package/dist/chunks/cli-0.1.11-3p2f194m.mjs +2 -0
  77. package/dist/chunks/cli-0.1.11-3tqzgd9f.mjs +2 -0
  78. package/dist/chunks/cli-0.1.11-424zgj5k.mjs +4 -0
  79. package/dist/chunks/cli-0.1.11-4bn5ap1n.mjs +2 -0
  80. package/dist/chunks/cli-0.1.11-4cdyzvxv.mjs +3 -0
  81. package/dist/chunks/cli-0.1.11-4ggr81tw.mjs +2 -0
  82. package/dist/chunks/cli-0.1.11-4px8nt5r.mjs +2 -0
  83. package/dist/chunks/cli-0.1.11-4xsg15d1.mjs +2 -0
  84. package/dist/chunks/cli-0.1.11-50naxqgt.mjs +2 -0
  85. package/dist/chunks/cli-0.1.11-56bdg2vw.mjs +3 -0
  86. package/dist/chunks/cli-0.1.11-56p41bk3.mjs +2 -0
  87. package/dist/chunks/cli-0.1.11-5e45zda5.mjs +2 -0
  88. package/dist/chunks/cli-0.1.11-5hrysrcd.mjs +2 -0
  89. package/dist/chunks/cli-0.1.11-5hs4xyjq.mjs +2 -0
  90. package/dist/chunks/cli-0.1.11-5vqj6k7m.mjs +2 -0
  91. package/dist/chunks/cli-0.1.11-5zqfr92n.mjs +2 -0
  92. package/dist/chunks/cli-0.1.11-6r97rwda.mjs +2 -0
  93. package/dist/chunks/cli-0.1.11-6vqzqsdj.mjs +3 -0
  94. package/dist/chunks/cli-0.1.11-6zkfmcxp.mjs +2 -0
  95. package/dist/chunks/cli-0.1.11-70f778wy.mjs +2 -0
  96. package/dist/chunks/cli-0.1.11-71ewwy7m.mjs +50 -0
  97. package/dist/chunks/cli-0.1.11-7238rfy8.mjs +2 -0
  98. package/dist/chunks/cli-0.1.11-7mmhsc3x.mjs +2 -0
  99. package/dist/chunks/cli-0.1.11-7qpnfx56.mjs +2 -0
  100. package/dist/chunks/cli-0.1.11-7t04gqx2.mjs +3 -0
  101. package/dist/chunks/cli-0.1.11-7tybqg56.mjs +2 -0
  102. package/dist/chunks/cli-0.1.11-7vz357wm.mjs +58 -0
  103. package/dist/chunks/cli-0.1.11-7xr2ermy.mjs +2 -0
  104. package/dist/chunks/cli-0.1.11-84j34n0s.mjs +2 -0
  105. package/dist/chunks/cli-0.1.11-852v06g0.mjs +2 -0
  106. package/dist/chunks/cli-0.1.11-8qrhqvh5.mjs +2 -0
  107. package/dist/chunks/cli-0.1.11-91mf8dfr.mjs +2 -0
  108. package/dist/chunks/cli-0.1.11-96y2d09c.mjs +2 -0
  109. package/dist/chunks/cli-0.1.11-98zcwng9.mjs +2 -0
  110. package/dist/chunks/cli-0.1.11-anegs86e.mjs +7 -0
  111. package/dist/chunks/cli-0.1.11-anvzywg4.mjs +5 -0
  112. package/dist/chunks/cli-0.1.11-at3c85af.mjs +2 -0
  113. package/dist/chunks/cli-0.1.11-b0jasw23.mjs +9 -0
  114. package/dist/chunks/cli-0.1.11-bbx2h4x9.mjs +2 -0
  115. package/dist/chunks/cli-0.1.11-be28ty4m.mjs +2 -0
  116. package/dist/chunks/cli-0.1.11-bhqwqe2w.mjs +2 -0
  117. package/dist/chunks/cli-0.1.11-bqpcwywz.mjs +4 -0
  118. package/dist/chunks/cli-0.1.11-btayz9zj.mjs +2 -0
  119. package/dist/chunks/cli-0.1.11-bvd2r7an.mjs +252 -0
  120. package/dist/chunks/cli-0.1.11-bwn9ehxv.mjs +2 -0
  121. package/dist/chunks/cli-0.1.11-bwpemkht.mjs +2 -0
  122. package/dist/chunks/cli-0.1.11-cdpswj0n.mjs +2 -0
  123. package/dist/chunks/cli-0.1.11-cezypfbt.mjs +2 -0
  124. package/dist/chunks/cli-0.1.11-cf049e4w.mjs +134 -0
  125. package/dist/chunks/cli-0.1.11-chnrb9xx.mjs +10 -0
  126. package/dist/chunks/cli-0.1.11-ctjvkg5k.mjs +2 -0
  127. package/dist/chunks/cli-0.1.11-cw0ss3jw.mjs +4 -0
  128. package/dist/chunks/cli-0.1.11-cwptjaf7.mjs +12 -0
  129. package/dist/chunks/cli-0.1.11-d10nfa6g.mjs +11 -0
  130. package/dist/chunks/cli-0.1.11-d3exw047.mjs +2 -0
  131. package/dist/chunks/cli-0.1.11-d4ahh3jz.mjs +2 -0
  132. package/dist/chunks/cli-0.1.11-da6szcvw.mjs +2 -0
  133. package/dist/chunks/cli-0.1.11-dcswnc8x.mjs +24 -0
  134. package/dist/chunks/cli-0.1.11-dpfxvfty.mjs +2 -0
  135. package/dist/chunks/cli-0.1.11-e5ecf583.mjs +2 -0
  136. package/dist/chunks/cli-0.1.11-e66dak4h.mjs +4 -0
  137. package/dist/chunks/cli-0.1.11-e7gjxknm.mjs +16 -0
  138. package/dist/chunks/cli-0.1.11-egck69w4.mjs +2 -0
  139. package/dist/chunks/cli-0.1.11-eh7tjdab.mjs +18 -0
  140. package/dist/chunks/cli-0.1.11-ek6mck0j.mjs +2 -0
  141. package/dist/chunks/cli-0.1.11-emw2wfff.mjs +3 -0
  142. package/dist/chunks/cli-0.1.11-fag2wtke.mjs +2 -0
  143. package/dist/chunks/cli-0.1.11-fptq9w4t.mjs +2 -0
  144. package/dist/chunks/cli-0.1.11-fs3d0ajf.mjs +2 -0
  145. package/dist/chunks/cli-0.1.11-fstfs72j.mjs +2 -0
  146. package/dist/chunks/cli-0.1.11-ft47r1wq.mjs +2 -0
  147. package/dist/chunks/cli-0.1.11-fveg0t77.mjs +22 -0
  148. package/dist/chunks/cli-0.1.11-fx6ztxrs.mjs +5 -0
  149. package/dist/chunks/cli-0.1.11-g2202evh.mjs +2 -0
  150. package/dist/chunks/cli-0.1.11-g33qp0jz.mjs +2 -0
  151. package/dist/chunks/cli-0.1.11-gc069ne7.mjs +2 -0
  152. package/dist/chunks/cli-0.1.11-gdcvfp9f.mjs +2 -0
  153. package/dist/chunks/cli-0.1.11-ggrme14p.mjs +2 -0
  154. package/dist/chunks/cli-0.1.11-h02tyg8p.mjs +2 -0
  155. package/dist/chunks/cli-0.1.11-h2hxx8ma.mjs +12 -0
  156. package/dist/chunks/cli-0.1.11-h3jatwe1.mjs +2 -0
  157. package/dist/chunks/cli-0.1.11-h762f6hr.mjs +2 -0
  158. package/dist/chunks/cli-0.1.11-h7e4rkwk.mjs +31 -0
  159. package/dist/chunks/cli-0.1.11-h7phna9g.mjs +2 -0
  160. package/dist/chunks/cli-0.1.11-hgsa4nnp.mjs +2 -0
  161. package/dist/chunks/cli-0.1.11-hhs8ke9g.mjs +2 -0
  162. package/dist/chunks/cli-0.1.11-hmfevmz1.mjs +4 -0
  163. package/dist/chunks/cli-0.1.11-hrn726gf.mjs +2 -0
  164. package/dist/chunks/cli-0.1.11-hzezqkew.mjs +2 -0
  165. package/dist/chunks/cli-0.1.11-jj3s3dxd.mjs +15 -0
  166. package/dist/chunks/cli-0.1.11-jjgjkqqv.mjs +2 -0
  167. package/dist/chunks/cli-0.1.11-jkrt4znb.mjs +11 -0
  168. package/dist/chunks/cli-0.1.11-jne21ka1.mjs +2 -0
  169. package/dist/chunks/cli-0.1.11-jr50ahcv.mjs +3 -0
  170. package/dist/chunks/cli-0.1.11-jye250b3.mjs +2 -0
  171. package/dist/chunks/cli-0.1.11-kghg51gb.mjs +6 -0
  172. package/dist/chunks/cli-0.1.11-kk0qqs5v.mjs +7 -0
  173. package/dist/chunks/cli-0.1.11-kndj4a86.mjs +2 -0
  174. package/dist/chunks/cli-0.1.11-kthpxpj3.mjs +24 -0
  175. package/dist/chunks/cli-0.1.11-ktwtyqmp.mjs +2 -0
  176. package/dist/chunks/cli-0.1.11-m0aaey0g.mjs +4 -0
  177. package/dist/chunks/cli-0.1.11-m1dpnkp0.mjs +2 -0
  178. package/dist/chunks/cli-0.1.11-mj78w4sp.mjs +2 -0
  179. package/dist/chunks/cli-0.1.11-mr356stf.mjs +2 -0
  180. package/dist/chunks/cli-0.1.11-mstxxz33.mjs +2 -0
  181. package/dist/chunks/cli-0.1.11-n23d2wej.mjs +2 -0
  182. package/dist/chunks/cli-0.1.11-n24p2y0p.mjs +2 -0
  183. package/dist/chunks/cli-0.1.11-na9tsy21.mjs +2 -0
  184. package/dist/chunks/cli-0.1.11-nesh7dep.mjs +2 -0
  185. package/dist/chunks/cli-0.1.11-nhjbgc7t.mjs +2 -0
  186. package/dist/chunks/cli-0.1.11-nhwmv5g6.mjs +4 -0
  187. package/dist/chunks/cli-0.1.11-nx8a99hz.mjs +4 -0
  188. package/dist/chunks/cli-0.1.11-p22bdjhv.mjs +2 -0
  189. package/dist/chunks/cli-0.1.11-p4eeg584.mjs +5 -0
  190. package/dist/chunks/cli-0.1.11-pfgwwtw9.mjs +2 -0
  191. package/dist/chunks/cli-0.1.11-pr9jdfxt.mjs +3 -0
  192. package/dist/chunks/cli-0.1.11-q58q9jqr.mjs +2 -0
  193. package/dist/chunks/cli-0.1.11-q89t0xzx.mjs +2 -0
  194. package/dist/chunks/cli-0.1.11-qbcfg80y.mjs +16 -0
  195. package/dist/chunks/cli-0.1.11-qheffjft.mjs +2 -0
  196. package/dist/chunks/cli-0.1.11-qpzn4q17.mjs +15 -0
  197. package/dist/chunks/cli-0.1.11-qrq0sw0h.mjs +2 -0
  198. package/dist/chunks/cli-0.1.11-r990p54m.mjs +100 -0
  199. package/dist/chunks/cli-0.1.11-rj68n2kw.mjs +2 -0
  200. package/dist/chunks/cli-0.1.11-rj9ea3zn.mjs +2 -0
  201. package/dist/chunks/cli-0.1.11-rmyvg4yw.mjs +2 -0
  202. package/dist/chunks/cli-0.1.11-rrnr3ab1.mjs +2 -0
  203. package/dist/chunks/cli-0.1.11-rvk3t45h.mjs +2 -0
  204. package/dist/chunks/cli-0.1.11-s6yfjcm5.mjs +6 -0
  205. package/dist/chunks/cli-0.1.11-s8ygndzf.mjs +5036 -0
  206. package/dist/chunks/cli-0.1.11-sma2xhvv.mjs +2 -0
  207. package/dist/chunks/cli-0.1.11-sqqzwx4h.mjs +132 -0
  208. package/dist/chunks/cli-0.1.11-t07hba0z.mjs +2 -0
  209. package/dist/chunks/cli-0.1.11-t7dc7fbj.mjs +2 -0
  210. package/dist/chunks/cli-0.1.11-ta77hm2b.mjs +2 -0
  211. package/dist/chunks/cli-0.1.11-trcf78n1.mjs +2 -0
  212. package/dist/chunks/cli-0.1.11-tvfkn5mh.mjs +2 -0
  213. package/dist/chunks/cli-0.1.11-tyh8gms9.mjs +2 -0
  214. package/dist/chunks/cli-0.1.11-v2s8ey1n.mjs +12 -0
  215. package/dist/chunks/cli-0.1.11-v6kwgrqc.mjs +2 -0
  216. package/dist/chunks/cli-0.1.11-v7bwjqf0.mjs +192 -0
  217. package/dist/chunks/cli-0.1.11-v8j5bkfs.mjs +2 -0
  218. package/dist/chunks/cli-0.1.11-vb5f7c3a.mjs +2 -0
  219. package/dist/chunks/cli-0.1.11-vch8cn95.mjs +2 -0
  220. package/dist/chunks/cli-0.1.11-vq5fvf9m.mjs +44 -0
  221. package/dist/chunks/cli-0.1.11-vzet5m4y.mjs +2 -0
  222. package/dist/chunks/cli-0.1.11-w3fp9par.mjs +39 -0
  223. package/dist/chunks/cli-0.1.11-w3trj52p.mjs +21 -0
  224. package/dist/chunks/cli-0.1.11-w3ydpv9v.mjs +2 -0
  225. package/dist/chunks/cli-0.1.11-wc9bay3d.mjs +34 -0
  226. package/dist/chunks/cli-0.1.11-weav8142.mjs +2 -0
  227. package/dist/chunks/cli-0.1.11-wjxhn7j5.mjs +2 -0
  228. package/dist/chunks/cli-0.1.11-x37jysc0.mjs +14 -0
  229. package/dist/chunks/cli-0.1.11-x5nvafch.mjs +2 -0
  230. package/dist/chunks/cli-0.1.11-xhrk5hr0.mjs +2 -0
  231. package/dist/chunks/cli-0.1.11-xp93fxnp.mjs +2 -0
  232. package/dist/chunks/cli-0.1.11-xwj7cmkj.mjs +2 -0
  233. package/dist/chunks/cli-0.1.11-y4c6y87y.mjs +2 -0
  234. package/dist/chunks/cli-0.1.11-y909w8bb.mjs +2 -0
  235. package/dist/chunks/cli-0.1.11-yd6f29v2.mjs +2 -0
  236. package/dist/chunks/cli-0.1.11-yhk2y3c0.mjs +2 -0
  237. package/dist/chunks/cli-0.1.11-yrfxpjhr.mjs +2 -0
  238. package/dist/chunks/cli-0.1.11-yv5pfq6n.mjs +2 -0
  239. package/dist/chunks/cli-0.1.11-yvnhbsfn.mjs +3 -0
  240. package/dist/chunks/cli-0.1.11-z0thk4h0.mjs +2 -0
  241. package/dist/chunks/cli-0.1.11-z4hb2mcd.mjs +2 -0
  242. package/dist/chunks/cli-0.1.11-z62s8qx1.mjs +2 -0
  243. package/dist/chunks/cli-0.1.11-zb2sa3e2.mjs +13 -0
  244. package/dist/chunks/cli-0.1.11-zdyddegg.mjs +2 -0
  245. package/dist/chunks/cli-0.1.11-zfnmx1ny.mjs +2 -0
  246. package/dist/chunks/cli-0.1.11-zwkjaj0d.mjs +2 -0
  247. package/dist/chunks/client-0.1.11-h38k7vkj.mjs +1 -0
  248. package/dist/chunks/color-0.1.11-b7favzc8.mjs +1 -0
  249. package/dist/chunks/compact-0.1.11-damm234b.mjs +3 -0
  250. package/dist/chunks/config-0.1.11-bb6v0pwv.mjs +1 -0
  251. package/dist/chunks/config-0.1.11-cqy7fnab.mjs +1 -0
  252. package/dist/chunks/context-0.1.11-e2s56h3b.mjs +1 -0
  253. package/dist/chunks/context-noninteractive-0.1.11-s6b9q91h.mjs +1 -0
  254. package/dist/chunks/conversation-0.1.11-d8ejy4b9.mjs +1 -0
  255. package/dist/chunks/copy-0.1.11-aq32vn1b.mjs +9 -0
  256. package/dist/chunks/cost-0.1.11-3z9y6a5a.mjs +1 -0
  257. package/dist/chunks/createSession-0.1.11-rgaw7n2v.mjs +1 -0
  258. package/dist/chunks/desktop-0.1.11-k8ac4bfx.mjs +1 -0
  259. package/dist/chunks/detectRepository-0.1.11-m3chgqa1.mjs +1 -0
  260. package/dist/chunks/detection-0.1.11-aa9k5rxv.mjs +1 -0
  261. package/dist/chunks/devtools-0.1.11-fkz4akhx.mjs +1 -0
  262. package/dist/chunks/diff-0.1.11-tcqh42f6.mjs +1 -0
  263. package/dist/chunks/doctor-0.1.11-6fwwz8hp.mjs +1 -0
  264. package/dist/chunks/earlyInput-0.1.11-94asnfvh.mjs +1 -0
  265. package/dist/chunks/effort-0.1.11-zcxskzrb.mjs +8 -0
  266. package/dist/chunks/environmentSelection-0.1.11-6ngvrt1m.mjs +1 -0
  267. package/dist/chunks/environments-0.1.11-pdsv6dgq.mjs +1 -0
  268. package/dist/chunks/exit-0.1.11-2jab9tfm.mjs +1 -0
  269. package/dist/chunks/export-0.1.11-wv5bd05w.mjs +2 -0
  270. package/dist/chunks/extra-usage-0.1.11-f5rm0265.mjs +1 -0
  271. package/dist/chunks/extra-usage-noninteractive-0.1.11-dt7znwbn.mjs +1 -0
  272. package/dist/chunks/fast-0.1.11-a665n9kz.mjs +1 -0
  273. package/dist/chunks/feedback-0.1.11-q77qty87.mjs +14 -0
  274. package/dist/chunks/firstPartyEventLogger-0.1.11-y7qkhdj6.mjs +1 -0
  275. package/dist/chunks/git-0.1.11-g77ppr52.mjs +1 -0
  276. package/dist/chunks/githubModelsCredentials-0.1.11-9vhs3xqj.mjs +1 -0
  277. package/dist/chunks/growthbook-0.1.11-2w2b1mzd.mjs +1 -0
  278. package/dist/chunks/heapdump-0.1.11-b216wzt7.mjs +6 -0
  279. package/dist/chunks/help-0.1.11-byp88gen.mjs +1 -0
  280. package/dist/chunks/hookChains-0.1.11-jp8f82q7.mjs +3 -0
  281. package/dist/chunks/hooks-0.1.11-v9jan2ss.mjs +1 -0
  282. package/dist/chunks/hooks-0.1.11-vf6vcsgg.mjs +79 -0
  283. package/dist/chunks/ide-0.1.11-7nxbd03r.mjs +3 -0
  284. package/dist/chunks/image-processor-napi-0.1.11-dpg3ygnw.mjs +1 -0
  285. package/dist/chunks/index-0.1.11-3dfjfmc6.mjs +1 -0
  286. package/dist/chunks/index-0.1.11-82wnmfq3.mjs +9 -0
  287. package/dist/chunks/index-0.1.11-8gtaa17w.mjs +1 -0
  288. package/dist/chunks/index-0.1.11-ajdpkanw.mjs +1 -0
  289. package/dist/chunks/index-0.1.11-b2q967nq.mjs +30 -0
  290. package/dist/chunks/index-0.1.11-bhrstsgc.mjs +1 -0
  291. package/dist/chunks/index-0.1.11-d6qbzwah.mjs +1 -0
  292. package/dist/chunks/index-0.1.11-d9ft1b0s.mjs +1 -0
  293. package/dist/chunks/index-0.1.11-e52dzxjz.mjs +5 -0
  294. package/dist/chunks/index-0.1.11-gb3saayk.mjs +2 -0
  295. package/dist/chunks/index-0.1.11-kksxmkwe.mjs +1 -0
  296. package/dist/chunks/index-0.1.11-n564rmwy.mjs +1 -0
  297. package/dist/chunks/index-0.1.11-n90nxjqp.mjs +1 -0
  298. package/dist/chunks/index-0.1.11-p0j3w83p.mjs +1 -0
  299. package/dist/chunks/index-0.1.11-pmkgntay.mjs +7 -0
  300. package/dist/chunks/index-0.1.11-qspcw49p.mjs +1 -0
  301. package/dist/chunks/index-0.1.11-r6p77pf7.mjs +1 -0
  302. package/dist/chunks/index-0.1.11-s0w8xy7q.mjs +9 -0
  303. package/dist/chunks/index-0.1.11-wbhj1ny7.mjs +1 -0
  304. package/dist/chunks/index-0.1.11-wze82293.mjs +1 -0
  305. package/dist/chunks/index-0.1.11-xs4mng75.mjs +1 -0
  306. package/dist/chunks/index-0.1.11-yej3awws.mjs +2 -0
  307. package/dist/chunks/initReplBridge-0.1.11-71963wyw.mjs +1 -0
  308. package/dist/chunks/ink-0.1.11-tzp2q9bd.mjs +1 -0
  309. package/dist/chunks/insights-0.1.11-4yjg2bxs.mjs +870 -0
  310. package/dist/chunks/install-0.1.11-4zfvr6pk.mjs +1 -0
  311. package/dist/chunks/install-github-app-0.1.11-frqzdwsz.mjs +149 -0
  312. package/dist/chunks/install-slack-app-0.1.11-0yyjjvrw.mjs +1 -0
  313. package/dist/chunks/instrumentation-0.1.11-zyp2r390.mjs +12 -0
  314. package/dist/chunks/interactiveHelpers-0.1.11-chnsxp26.mjs +1 -0
  315. package/dist/chunks/keybindings-0.1.11-r2jke9h5.mjs +2 -0
  316. package/dist/chunks/knowledge-0.1.11-wpjw8ybd.mjs +2 -0
  317. package/dist/chunks/loadAgentsDir-0.1.11-bwymseqa.mjs +1 -0
  318. package/dist/chunks/loadPluginHooks-0.1.11-npf49gc4.mjs +1 -0
  319. package/dist/chunks/logout-0.1.11-48ynp610.mjs +1 -0
  320. package/dist/chunks/lsp-0.1.11-e4z6m5t5.mjs +1 -0
  321. package/dist/chunks/main-0.1.11-6sh6xycv.mjs +1 -0
  322. package/dist/chunks/managedEnv-0.1.11-6bnnpsm0.mjs +1 -0
  323. package/dist/chunks/mcp-0.1.11-vjjx8eer.mjs +17 -0
  324. package/dist/chunks/mcp-0.1.11-zf74a6am.mjs +4 -0
  325. package/dist/chunks/mcp-0.1.11-zw22jjqc.mjs +1 -0
  326. package/dist/chunks/mcpServer-0.1.11-czg51mvy.mjs +1 -0
  327. package/dist/chunks/mcpb-0.1.11-czkze48a.mjs +1 -0
  328. package/dist/chunks/memory-0.1.11-k7y98zqn.mjs +3 -0
  329. package/dist/chunks/mobile-0.1.11-2w5py2cb.mjs +2 -0
  330. package/dist/chunks/model-0.1.11-4v166f98.mjs +2 -0
  331. package/dist/chunks/model-0.1.11-qekc9c4w.mjs +1 -0
  332. package/dist/chunks/oauth-0.1.11-jkkd9wzq.mjs +1 -0
  333. package/dist/chunks/openaiShim-0.1.11-b9yqnc9c.mjs +14 -0
  334. package/dist/chunks/output-style-0.1.11-zwxn1knb.mjs +1 -0
  335. package/dist/chunks/package-HMBVQOZ4-0.1.11-n77wqhxr.mjs +1 -0
  336. package/dist/chunks/parser-0.1.11-vvhz2p5h.mjs +1 -0
  337. package/dist/chunks/passes-0.1.11-dgshr9c4.mjs +1 -0
  338. package/dist/chunks/permissions-0.1.11-71fn7rsk.mjs +3 -0
  339. package/dist/chunks/plan-0.1.11-1xyzxjgr.mjs +1 -0
  340. package/dist/chunks/plist-0.1.11-0sn6nqv3.mjs +1 -0
  341. package/dist/chunks/plugin-0.1.11-menj210d.mjs +29 -0
  342. package/dist/chunks/pluginStartupCheck-0.1.11-ytjn1kxg.mjs +1 -0
  343. package/dist/chunks/plugins-0.1.11-t3pgcpcj.mjs +9 -0
  344. package/dist/chunks/print-0.1.11-y9vz77h9.mjs +57 -0
  345. package/dist/chunks/privacy-settings-0.1.11-3ah0v02p.mjs +1 -0
  346. package/dist/chunks/process-0.1.11-s6jnx5xw.mjs +1 -0
  347. package/dist/chunks/processBashCommand-0.1.11-txp79ekj.mjs +1 -0
  348. package/dist/chunks/processSlashCommand-0.1.11-fdvs7etd.mjs +9 -0
  349. package/dist/chunks/prompt-0.1.11-4f7rsvd2.mjs +1 -0
  350. package/dist/chunks/prompt-0.1.11-bzkv3rsd.mjs +1 -0
  351. package/dist/chunks/prompts-0.1.11-xczb1nwa.mjs +1 -0
  352. package/dist/chunks/provider-0.1.11-cqeqqqbt.mjs +2 -0
  353. package/dist/chunks/providerProfiles-0.1.11-ewn8w0f1.mjs +1 -0
  354. package/dist/chunks/rate-limit-options-0.1.11-6bca3g5n.mjs +1 -0
  355. package/dist/chunks/registry-0.1.11-wjnpx9yf.mjs +1 -0
  356. package/dist/chunks/release-notes-0.1.11-dhe37z3c.mjs +5 -0
  357. package/dist/chunks/reload-plugins-0.1.11-gzep3pg3.mjs +2 -0
  358. package/dist/chunks/remote-env-0.1.11-yday97nq.mjs +1 -0
  359. package/dist/chunks/remoteBridgeCore-0.1.11-hn821p07.mjs +1 -0
  360. package/dist/chunks/remoteSession-0.1.11-g3h440pv.mjs +1 -0
  361. package/dist/chunks/rename-0.1.11-ke9btph2.mjs +1 -0
  362. package/dist/chunks/replBridgeHandle-0.1.11-t5njc196.mjs +1 -0
  363. package/dist/chunks/resume-0.1.11-d4bbgty9.mjs +2 -0
  364. package/dist/chunks/rewind-0.1.11-t4mfk815.mjs +1 -0
  365. package/dist/chunks/sandbox-adapter-0.1.11-3czn1nws.mjs +1 -0
  366. package/dist/chunks/sandbox-toggle-0.1.11-qxv2w9n1.mjs +1 -0
  367. package/dist/chunks/session-0.1.11-2z972raf.mjs +2 -0
  368. package/dist/chunks/sessionFileAccessHooks-0.1.11-f3exnspr.mjs +1 -0
  369. package/dist/chunks/sessionStorage-0.1.11-aa2ftdjn.mjs +1 -0
  370. package/dist/chunks/setup-0.1.11-epmpszzf.mjs +5 -0
  371. package/dist/chunks/sinks-0.1.11-q3zcj5me.mjs +1 -0
  372. package/dist/chunks/skills-0.1.11-9xbyp1p5.mjs +1 -0
  373. package/dist/chunks/startupProfiler-0.1.11-5s07826j.mjs +1 -0
  374. package/dist/chunks/state-0.1.11-3fjxywyv.mjs +1 -0
  375. package/dist/chunks/stats-0.1.11-hxzms6gg.mjs +6 -0
  376. package/dist/chunks/status-0.1.11-drvp15n8.mjs +1 -0
  377. package/dist/chunks/stickers-0.1.11-44f4tawn.mjs +1 -0
  378. package/dist/chunks/subprocessEnv-0.1.11-5w00fpez.mjs +1 -0
  379. package/dist/chunks/tasks-0.1.11-dn8h18fk.mjs +1 -0
  380. package/dist/chunks/teamHelpers-0.1.11-ca7kref8.mjs +1 -0
  381. package/dist/chunks/teammateModeSnapshot-0.1.11-an88rdgv.mjs +1 -0
  382. package/dist/chunks/teleport-0.1.11-8e3k0ex6.mjs +1 -0
  383. package/dist/chunks/terminalSetup-0.1.11-gtdwp0an.mjs +1 -0
  384. package/dist/chunks/theme-0.1.11-p447kczd.mjs +1 -0
  385. package/dist/chunks/thinkback-0.1.11-3f1xvkt5.mjs +1 -0
  386. package/dist/chunks/thinkback-play-0.1.11-0ax4h089.mjs +1 -0
  387. package/dist/chunks/toolPool-0.1.11-xrywy61j.mjs +1 -0
  388. package/dist/chunks/toolSearch-0.1.11-7yjvjxhp.mjs +1 -0
  389. package/dist/chunks/trustedDevice-0.1.11-070f1wch.mjs +1 -0
  390. package/dist/chunks/turndown.cjs-0.1.11-brwqmyse.mjs +69 -0
  391. package/dist/chunks/ultrareviewCommand-0.1.11-0m9b3kr5.mjs +4 -0
  392. package/dist/chunks/update-0.1.11-p33kxpg4.mjs +94 -0
  393. package/dist/chunks/upgrade-0.1.11-1aj14cqt.mjs +1 -0
  394. package/dist/chunks/upstreamproxy-0.1.11-vk16qw88.mjs +14 -0
  395. package/dist/chunks/usage-0.1.11-hch4v5jb.mjs +1 -0
  396. package/dist/chunks/util-0.1.11-sjkxad5k.mjs +1 -0
  397. package/dist/chunks/utils-0.1.11-2bk8zn4g.mjs +1 -0
  398. package/dist/chunks/vim-0.1.11-v1rz1d56.mjs +1 -0
  399. package/dist/chunks/watcher-0.1.11-v8mkv1xy.mjs +1 -0
  400. package/dist/chunks/wiki-0.1.11-v0twhcnn.mjs +132 -0
  401. package/dist/chunks/worktree-0.1.11-d7chpamf.mjs +1 -0
  402. package/dist/chunks/worktreeModeEnabled-0.1.11-tsxv6h6g.mjs +1 -0
  403. package/dist/chunks/wrapper-0.1.11-rt9xsnjh.mjs +7 -0
  404. package/dist/claudio-vscode.vsix +0 -0
  405. package/dist/cli.mjs +6 -6
  406. package/package.json +1 -1
  407. package/dist/chunks/AgentTool-0.1.9-e26h2f7z.mjs +0 -1
  408. package/dist/chunks/App-0.1.9-7ttp2eny.mjs +0 -1
  409. package/dist/chunks/ApproveApiKey-0.1.9-pz0jzna9.mjs +0 -1
  410. package/dist/chunks/AssistantSessionChooser-0.1.9-r5wg1yfv.mjs +0 -1
  411. package/dist/chunks/AutoModeOptInDialog-0.1.9-nbnjg2tp.mjs +0 -1
  412. package/dist/chunks/BypassPermissionsModeDialog-0.1.9-wjg6qps3.mjs +0 -1
  413. package/dist/chunks/ClaudeInChromeOnboarding-0.1.9-h46b49p8.mjs +0 -1
  414. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.9-b8em430v.mjs +0 -1
  415. package/dist/chunks/ConsoleOAuthFlow-0.1.9-zb1h6dvy.mjs +0 -1
  416. package/dist/chunks/DiffDialog-0.1.9-09s28v8e.mjs +0 -3
  417. package/dist/chunks/Doctor-0.1.9-9ak6wqtr.mjs +0 -1
  418. package/dist/chunks/Grove-0.1.9-rbrf13rd.mjs +0 -1
  419. package/dist/chunks/ITermBackend-0.1.9-8dgw249h.mjs +0 -1
  420. package/dist/chunks/InProcessTransport-0.1.9-5cp1e7x7.mjs +0 -1
  421. package/dist/chunks/InvalidConfigDialog-0.1.9-6mv9wgt8.mjs +0 -1
  422. package/dist/chunks/InvalidSettingsDialog-0.1.9-d5kkd4yd.mjs +0 -1
  423. package/dist/chunks/MigrationDialog-0.1.9-56807wps.mjs +0 -1
  424. package/dist/chunks/Onboarding-0.1.9-g5nqdh1r.mjs +0 -1
  425. package/dist/chunks/ProviderManager-0.1.9-kj6t8003.mjs +0 -1
  426. package/dist/chunks/REPL-0.1.9-3h2fc9z7.mjs +0 -1
  427. package/dist/chunks/ResumeConversation-0.1.9-k4gv6dx4.mjs +0 -1
  428. package/dist/chunks/SnapshotUpdateDialog-0.1.9-v3h7drc0.mjs +0 -1
  429. package/dist/chunks/StartupScreen-0.1.9-jgk08xvj.mjs +0 -1
  430. package/dist/chunks/TeleportProgress-0.1.9-pnqkmgap.mjs +0 -1
  431. package/dist/chunks/TeleportRepoMismatchDialog-0.1.9-ddtmy43v.mjs +0 -1
  432. package/dist/chunks/TeleportResumeWrapper-0.1.9-vhnyx04e.mjs +0 -1
  433. package/dist/chunks/TmuxBackend-0.1.9-nb2ks1np.mjs +0 -9
  434. package/dist/chunks/ToolSearchTool-0.1.9-n40whaty.mjs +0 -1
  435. package/dist/chunks/TrustDialog-0.1.9-dm2wppgy.mjs +0 -1
  436. package/dist/chunks/activeProvider-0.1.9-kbwwatt3.mjs +0 -1
  437. package/dist/chunks/add-dir-0.1.9-ed53zp9j.mjs +0 -1
  438. package/dist/chunks/agents-0.1.9-4gwb1qtc.mjs +0 -111
  439. package/dist/chunks/agents-0.1.9-yr85gwa8.mjs +0 -3
  440. package/dist/chunks/api-0.1.9-kqwfw6wj.mjs +0 -1
  441. package/dist/chunks/asciicast-0.1.9-ekvsjx76.mjs +0 -1
  442. package/dist/chunks/assistant-0.1.9-h4rgf0xq.mjs +0 -1
  443. package/dist/chunks/auth-0.1.9-1c12xrxs.mjs +0 -1
  444. package/dist/chunks/auth-0.1.9-rqfx3vqa.mjs +0 -1
  445. package/dist/chunks/autoMode-0.1.9-s92asycq.mjs +0 -48
  446. package/dist/chunks/backgroundHousekeeping-0.1.9-jjbqckpm.mjs +0 -1
  447. package/dist/chunks/branch-0.1.9-m7j2aerq.mjs +0 -4
  448. package/dist/chunks/bridgePointer-0.1.9-rv3aq23v.mjs +0 -1
  449. package/dist/chunks/btw-0.1.9-g55x31zp.mjs +0 -1
  450. package/dist/chunks/buddy-0.1.9-fqmk7e4y.mjs +0 -3
  451. package/dist/chunks/cacache-0.1.9-dr1vt8s1.mjs +0 -1
  452. package/dist/chunks/cache-probe-0.1.9-ydmjrch4.mjs +0 -21
  453. package/dist/chunks/cacheStats-0.1.9-pkarrnw9.mjs +0 -4
  454. package/dist/chunks/caches-0.1.9-d6cndrra.mjs +0 -1
  455. package/dist/chunks/chrome-0.1.9-bvwzw157.mjs +0 -1
  456. package/dist/chunks/chromeNativeHost-0.1.9-8a20nscz.mjs +0 -2
  457. package/dist/chunks/claude-for-chrome-mcp-0.1.9-ndknjd3g.mjs +0 -1
  458. package/dist/chunks/claudeDesktop-0.1.9-7xprztbk.mjs +0 -1
  459. package/dist/chunks/claudemd-0.1.9-dqyhgy2v.mjs +0 -1
  460. package/dist/chunks/clear-0.1.9-tb8x7676.mjs +0 -1
  461. package/dist/chunks/cli-0.1.9-001s9kxw.mjs +0 -24
  462. package/dist/chunks/cli-0.1.9-03e1d9dw.mjs +0 -39
  463. package/dist/chunks/cli-0.1.9-04ez73f7.mjs +0 -5084
  464. package/dist/chunks/cli-0.1.9-0dtdhejj.mjs +0 -31
  465. package/dist/chunks/cli-0.1.9-0e6nsh68.mjs +0 -3
  466. package/dist/chunks/cli-0.1.9-0j8n671q.mjs +0 -2
  467. package/dist/chunks/cli-0.1.9-15y0qt1z.mjs +0 -2
  468. package/dist/chunks/cli-0.1.9-1c3qpbdh.mjs +0 -2
  469. package/dist/chunks/cli-0.1.9-1f5gmndb.mjs +0 -2
  470. package/dist/chunks/cli-0.1.9-1ghbcafn.mjs +0 -2
  471. package/dist/chunks/cli-0.1.9-1kaj4v6k.mjs +0 -2
  472. package/dist/chunks/cli-0.1.9-1xmdqqzd.mjs +0 -3
  473. package/dist/chunks/cli-0.1.9-263y2rkc.mjs +0 -3
  474. package/dist/chunks/cli-0.1.9-2dd7h0hn.mjs +0 -15
  475. package/dist/chunks/cli-0.1.9-2prq7peb.mjs +0 -2
  476. package/dist/chunks/cli-0.1.9-2tc83tsz.mjs +0 -2
  477. package/dist/chunks/cli-0.1.9-2thp2z73.mjs +0 -2
  478. package/dist/chunks/cli-0.1.9-2v0y90vz.mjs +0 -2
  479. package/dist/chunks/cli-0.1.9-2v4s8yf9.mjs +0 -7
  480. package/dist/chunks/cli-0.1.9-2x18rhq6.mjs +0 -6
  481. package/dist/chunks/cli-0.1.9-38zb09vp.mjs +0 -2
  482. package/dist/chunks/cli-0.1.9-3g3er8j1.mjs +0 -15
  483. package/dist/chunks/cli-0.1.9-3h4serkj.mjs +0 -58
  484. package/dist/chunks/cli-0.1.9-3rhe87kw.mjs +0 -2
  485. package/dist/chunks/cli-0.1.9-3vfq7jja.mjs +0 -34
  486. package/dist/chunks/cli-0.1.9-3wmbdmrp.mjs +0 -2
  487. package/dist/chunks/cli-0.1.9-3y36913h.mjs +0 -10
  488. package/dist/chunks/cli-0.1.9-3yscrq86.mjs +0 -833
  489. package/dist/chunks/cli-0.1.9-45ggwszg.mjs +0 -2
  490. package/dist/chunks/cli-0.1.9-4a9qwf11.mjs +0 -2
  491. package/dist/chunks/cli-0.1.9-4bg6jxs8.mjs +0 -2
  492. package/dist/chunks/cli-0.1.9-4kk9fmg2.mjs +0 -2
  493. package/dist/chunks/cli-0.1.9-4n4dqg6k.mjs +0 -2
  494. package/dist/chunks/cli-0.1.9-4sqfjw8t.mjs +0 -16
  495. package/dist/chunks/cli-0.1.9-4vmbyj20.mjs +0 -2
  496. package/dist/chunks/cli-0.1.9-4vt296k0.mjs +0 -18
  497. package/dist/chunks/cli-0.1.9-5ryrgdzg.mjs +0 -2
  498. package/dist/chunks/cli-0.1.9-5vgk7wf7.mjs +0 -2
  499. package/dist/chunks/cli-0.1.9-5ygmjsje.mjs +0 -2
  500. package/dist/chunks/cli-0.1.9-5ypg3t0t.mjs +0 -2
  501. package/dist/chunks/cli-0.1.9-5zhhyq4q.mjs +0 -2
  502. package/dist/chunks/cli-0.1.9-61ywjha3.mjs +0 -2
  503. package/dist/chunks/cli-0.1.9-68vwvmkw.mjs +0 -2
  504. package/dist/chunks/cli-0.1.9-6c7qrr4p.mjs +0 -16
  505. package/dist/chunks/cli-0.1.9-6gk46nr9.mjs +0 -2
  506. package/dist/chunks/cli-0.1.9-6j5gxw5r.mjs +0 -5
  507. package/dist/chunks/cli-0.1.9-6ne451jc.mjs +0 -2
  508. package/dist/chunks/cli-0.1.9-6p67vwxh.mjs +0 -2
  509. package/dist/chunks/cli-0.1.9-6pcahrj9.mjs +0 -2
  510. package/dist/chunks/cli-0.1.9-7047sjwh.mjs +0 -2
  511. package/dist/chunks/cli-0.1.9-7bakxr5q.mjs +0 -3
  512. package/dist/chunks/cli-0.1.9-7bthhhpf.mjs +0 -2
  513. package/dist/chunks/cli-0.1.9-7fp0smtp.mjs +0 -2
  514. package/dist/chunks/cli-0.1.9-7ftnjyps.mjs +0 -2
  515. package/dist/chunks/cli-0.1.9-7h5my4fb.mjs +0 -2
  516. package/dist/chunks/cli-0.1.9-7kcaaxvq.mjs +0 -12
  517. package/dist/chunks/cli-0.1.9-7q9461ka.mjs +0 -2
  518. package/dist/chunks/cli-0.1.9-7qhatm3v.mjs +0 -2
  519. package/dist/chunks/cli-0.1.9-86kws2c7.mjs +0 -192
  520. package/dist/chunks/cli-0.1.9-8egwvs85.mjs +0 -2
  521. package/dist/chunks/cli-0.1.9-90h21nv5.mjs +0 -2
  522. package/dist/chunks/cli-0.1.9-9d4sp76k.mjs +0 -2
  523. package/dist/chunks/cli-0.1.9-9hc8gyb7.mjs +0 -2
  524. package/dist/chunks/cli-0.1.9-9nhh15bp.mjs +0 -2
  525. package/dist/chunks/cli-0.1.9-9vab0er5.mjs +0 -2
  526. package/dist/chunks/cli-0.1.9-9vn4ys3c.mjs +0 -22
  527. package/dist/chunks/cli-0.1.9-a1gtww1d.mjs +0 -2
  528. package/dist/chunks/cli-0.1.9-a7zy4vqn.mjs +0 -134
  529. package/dist/chunks/cli-0.1.9-a95nqhbd.mjs +0 -4
  530. package/dist/chunks/cli-0.1.9-ag6a8kqj.mjs +0 -2
  531. package/dist/chunks/cli-0.1.9-ak0b9xfs.mjs +0 -100
  532. package/dist/chunks/cli-0.1.9-aqd7czgr.mjs +0 -3
  533. package/dist/chunks/cli-0.1.9-axg1kbe4.mjs +0 -2
  534. package/dist/chunks/cli-0.1.9-aype6q4y.mjs +0 -2
  535. package/dist/chunks/cli-0.1.9-b3031hmy.mjs +0 -2
  536. package/dist/chunks/cli-0.1.9-b6zp931m.mjs +0 -11
  537. package/dist/chunks/cli-0.1.9-b73n8vzm.mjs +0 -2
  538. package/dist/chunks/cli-0.1.9-b9kbpf6n.mjs +0 -2
  539. package/dist/chunks/cli-0.1.9-bg9xvmav.mjs +0 -2
  540. package/dist/chunks/cli-0.1.9-bn43vpc0.mjs +0 -2
  541. package/dist/chunks/cli-0.1.9-br9jzagb.mjs +0 -2
  542. package/dist/chunks/cli-0.1.9-c2fjeq7k.mjs +0 -2
  543. package/dist/chunks/cli-0.1.9-c38eyh49.mjs +0 -2
  544. package/dist/chunks/cli-0.1.9-cfzmq9k6.mjs +0 -2
  545. package/dist/chunks/cli-0.1.9-cvnkghgh.mjs +0 -3
  546. package/dist/chunks/cli-0.1.9-dmcbsmj4.mjs +0 -2
  547. package/dist/chunks/cli-0.1.9-dsx18zt1.mjs +0 -2
  548. package/dist/chunks/cli-0.1.9-dt31fs16.mjs +0 -2
  549. package/dist/chunks/cli-0.1.9-dzz1me99.mjs +0 -2
  550. package/dist/chunks/cli-0.1.9-e7ewtpew.mjs +0 -2
  551. package/dist/chunks/cli-0.1.9-e96x59hw.mjs +0 -2
  552. package/dist/chunks/cli-0.1.9-ehhkqhbv.mjs +0 -2
  553. package/dist/chunks/cli-0.1.9-eqxc9zxm.mjs +0 -12
  554. package/dist/chunks/cli-0.1.9-ewq9k9mr.mjs +0 -2
  555. package/dist/chunks/cli-0.1.9-ewwxqbvt.mjs +0 -2
  556. package/dist/chunks/cli-0.1.9-f4v4pahc.mjs +0 -4
  557. package/dist/chunks/cli-0.1.9-f643fvt4.mjs +0 -2
  558. package/dist/chunks/cli-0.1.9-f8ga1n8r.mjs +0 -6
  559. package/dist/chunks/cli-0.1.9-fcf313e7.mjs +0 -2
  560. package/dist/chunks/cli-0.1.9-fh5enjw8.mjs +0 -5
  561. package/dist/chunks/cli-0.1.9-fm2yycpj.mjs +0 -2
  562. package/dist/chunks/cli-0.1.9-fwqwgjwb.mjs +0 -2
  563. package/dist/chunks/cli-0.1.9-gandxpzf.mjs +0 -2
  564. package/dist/chunks/cli-0.1.9-gasw7sr9.mjs +0 -2
  565. package/dist/chunks/cli-0.1.9-gdymcvby.mjs +0 -2
  566. package/dist/chunks/cli-0.1.9-gpd1bhnf.mjs +0 -2
  567. package/dist/chunks/cli-0.1.9-gsc0t4gy.mjs +0 -2
  568. package/dist/chunks/cli-0.1.9-gvrtqwe3.mjs +0 -2
  569. package/dist/chunks/cli-0.1.9-h8xne7z8.mjs +0 -2
  570. package/dist/chunks/cli-0.1.9-hjcv9wr7.mjs +0 -50
  571. package/dist/chunks/cli-0.1.9-hva25eg3.mjs +0 -4
  572. package/dist/chunks/cli-0.1.9-hy4peemf.mjs +0 -3
  573. package/dist/chunks/cli-0.1.9-hy9s1fnj.mjs +0 -14
  574. package/dist/chunks/cli-0.1.9-hz8rssz0.mjs +0 -2
  575. package/dist/chunks/cli-0.1.9-j5zz6gbq.mjs +0 -4
  576. package/dist/chunks/cli-0.1.9-jb6af8n8.mjs +0 -2
  577. package/dist/chunks/cli-0.1.9-jchn9hyn.mjs +0 -2
  578. package/dist/chunks/cli-0.1.9-jdpz959j.mjs +0 -2
  579. package/dist/chunks/cli-0.1.9-jv2z42gk.mjs +0 -2
  580. package/dist/chunks/cli-0.1.9-kbrf27z8.mjs +0 -2
  581. package/dist/chunks/cli-0.1.9-krv35v3v.mjs +0 -2
  582. package/dist/chunks/cli-0.1.9-ksv4ntar.mjs +0 -2
  583. package/dist/chunks/cli-0.1.9-kt9xw7bn.mjs +0 -2
  584. package/dist/chunks/cli-0.1.9-m7shtst2.mjs +0 -2
  585. package/dist/chunks/cli-0.1.9-mfyd9h50.mjs +0 -2
  586. package/dist/chunks/cli-0.1.9-mj88t3jf.mjs +0 -2
  587. package/dist/chunks/cli-0.1.9-mjkhzp2c.mjs +0 -3
  588. package/dist/chunks/cli-0.1.9-mkfnnvz7.mjs +0 -4
  589. package/dist/chunks/cli-0.1.9-mme2x7fq.mjs +0 -2
  590. package/dist/chunks/cli-0.1.9-mnegaqr7.mjs +0 -2
  591. package/dist/chunks/cli-0.1.9-mx4ekht0.mjs +0 -2
  592. package/dist/chunks/cli-0.1.9-mz3mbxwb.mjs +0 -12
  593. package/dist/chunks/cli-0.1.9-n445yk6z.mjs +0 -2
  594. package/dist/chunks/cli-0.1.9-n54k4qt3.mjs +0 -2
  595. package/dist/chunks/cli-0.1.9-n8tc0gpm.mjs +0 -2
  596. package/dist/chunks/cli-0.1.9-nsgdz4rd.mjs +0 -2
  597. package/dist/chunks/cli-0.1.9-nw3rpxdd.mjs +0 -252
  598. package/dist/chunks/cli-0.1.9-nz8phj17.mjs +0 -2
  599. package/dist/chunks/cli-0.1.9-p1kdk178.mjs +0 -2
  600. package/dist/chunks/cli-0.1.9-p58rgwkr.mjs +0 -4
  601. package/dist/chunks/cli-0.1.9-p5scdysw.mjs +0 -2
  602. package/dist/chunks/cli-0.1.9-pdbfg3vh.mjs +0 -2
  603. package/dist/chunks/cli-0.1.9-pgwsmwz1.mjs +0 -2
  604. package/dist/chunks/cli-0.1.9-ph3w8t78.mjs +0 -2
  605. package/dist/chunks/cli-0.1.9-psx0e36a.mjs +0 -2
  606. package/dist/chunks/cli-0.1.9-q3e2h88a.mjs +0 -2
  607. package/dist/chunks/cli-0.1.9-q7hve442.mjs +0 -2
  608. package/dist/chunks/cli-0.1.9-qqjp7mpj.mjs +0 -2
  609. package/dist/chunks/cli-0.1.9-qydwhycw.mjs +0 -2
  610. package/dist/chunks/cli-0.1.9-r3ha1332.mjs +0 -7
  611. package/dist/chunks/cli-0.1.9-r7rcv2wm.mjs +0 -8
  612. package/dist/chunks/cli-0.1.9-rd0jctgk.mjs +0 -21
  613. package/dist/chunks/cli-0.1.9-rerthk1j.mjs +0 -2
  614. package/dist/chunks/cli-0.1.9-rft22htm.mjs +0 -2
  615. package/dist/chunks/cli-0.1.9-rp31nc37.mjs +0 -2
  616. package/dist/chunks/cli-0.1.9-rw09xkh7.mjs +0 -2
  617. package/dist/chunks/cli-0.1.9-s0w3y07w.mjs +0 -2
  618. package/dist/chunks/cli-0.1.9-s45y2ndk.mjs +0 -2
  619. package/dist/chunks/cli-0.1.9-s6bk4fbn.mjs +0 -2
  620. package/dist/chunks/cli-0.1.9-scpj6tps.mjs +0 -3
  621. package/dist/chunks/cli-0.1.9-sqja68fn.mjs +0 -2
  622. package/dist/chunks/cli-0.1.9-sv3awdsv.mjs +0 -2
  623. package/dist/chunks/cli-0.1.9-t24n24mw.mjs +0 -2
  624. package/dist/chunks/cli-0.1.9-teaymnrz.mjs +0 -2
  625. package/dist/chunks/cli-0.1.9-tq9z3reg.mjs +0 -2
  626. package/dist/chunks/cli-0.1.9-v32f99vc.mjs +0 -11
  627. package/dist/chunks/cli-0.1.9-v6x9pr1t.mjs +0 -2
  628. package/dist/chunks/cli-0.1.9-v7ajk1nz.mjs +0 -2
  629. package/dist/chunks/cli-0.1.9-vdw09f8y.mjs +0 -44
  630. package/dist/chunks/cli-0.1.9-vm7cggd9.mjs +0 -45
  631. package/dist/chunks/cli-0.1.9-vp3dtntc.mjs +0 -2
  632. package/dist/chunks/cli-0.1.9-vwv31syx.mjs +0 -2
  633. package/dist/chunks/cli-0.1.9-w692zn5c.mjs +0 -2
  634. package/dist/chunks/cli-0.1.9-wn39cz20.mjs +0 -2
  635. package/dist/chunks/cli-0.1.9-wpvrabrk.mjs +0 -2
  636. package/dist/chunks/cli-0.1.9-x0xxr5dh.mjs +0 -13
  637. package/dist/chunks/cli-0.1.9-x13p19zq.mjs +0 -2
  638. package/dist/chunks/cli-0.1.9-x257hapj.mjs +0 -9
  639. package/dist/chunks/cli-0.1.9-x7qrvj9f.mjs +0 -2
  640. package/dist/chunks/cli-0.1.9-xvn37fkk.mjs +0 -2
  641. package/dist/chunks/cli-0.1.9-xvvq2rcd.mjs +0 -4
  642. package/dist/chunks/cli-0.1.9-xws3mhz4.mjs +0 -2
  643. package/dist/chunks/cli-0.1.9-y8n4w5nn.mjs +0 -5
  644. package/dist/chunks/cli-0.1.9-ycvkz1gf.mjs +0 -4
  645. package/dist/chunks/cli-0.1.9-yddanjg2.mjs +0 -132
  646. package/dist/chunks/cli-0.1.9-ymsq31jx.mjs +0 -2
  647. package/dist/chunks/cli-0.1.9-ywf6743k.mjs +0 -2
  648. package/dist/chunks/cli-0.1.9-z5mm21jw.mjs +0 -24
  649. package/dist/chunks/cli-0.1.9-zae1me3j.mjs +0 -2
  650. package/dist/chunks/cli-0.1.9-zck4s4sh.mjs +0 -2
  651. package/dist/chunks/cli-0.1.9-zehsa1kq.mjs +0 -2
  652. package/dist/chunks/cli-0.1.9-zqyxbf50.mjs +0 -2
  653. package/dist/chunks/cli-0.1.9-zstpbdrf.mjs +0 -2
  654. package/dist/chunks/cli-0.1.9-zzp8m503.mjs +0 -3
  655. package/dist/chunks/cliArgs-0.1.9-kckasx4h.mjs +0 -1
  656. package/dist/chunks/client-0.1.9-ys52xz2v.mjs +0 -1
  657. package/dist/chunks/color-0.1.9-nmnytefc.mjs +0 -1
  658. package/dist/chunks/compact-0.1.9-qw915ckh.mjs +0 -3
  659. package/dist/chunks/config-0.1.9-1m69edch.mjs +0 -1
  660. package/dist/chunks/config-0.1.9-6knxc8a2.mjs +0 -1
  661. package/dist/chunks/context-0.1.9-47a3xmqq.mjs +0 -1
  662. package/dist/chunks/context-noninteractive-0.1.9-6s9bm74v.mjs +0 -1
  663. package/dist/chunks/conversation-0.1.9-vebter8y.mjs +0 -1
  664. package/dist/chunks/copy-0.1.9-ae06p3e2.mjs +0 -9
  665. package/dist/chunks/cost-0.1.9-x5zee0z9.mjs +0 -1
  666. package/dist/chunks/createSession-0.1.9-djn7xdsv.mjs +0 -1
  667. package/dist/chunks/desktop-0.1.9-xaecrssd.mjs +0 -1
  668. package/dist/chunks/detectRepository-0.1.9-qqzcce45.mjs +0 -1
  669. package/dist/chunks/detection-0.1.9-ry1q2ym2.mjs +0 -1
  670. package/dist/chunks/devtools-0.1.9-kzs9wq2w.mjs +0 -1
  671. package/dist/chunks/diff-0.1.9-af5n5bzh.mjs +0 -1
  672. package/dist/chunks/doctor-0.1.9-9f6fz2h0.mjs +0 -1
  673. package/dist/chunks/earlyInput-0.1.9-h7yskwvf.mjs +0 -1
  674. package/dist/chunks/effort-0.1.9-spz96zzr.mjs +0 -8
  675. package/dist/chunks/environmentSelection-0.1.9-0va5g53h.mjs +0 -1
  676. package/dist/chunks/environments-0.1.9-2hka6k26.mjs +0 -1
  677. package/dist/chunks/exit-0.1.9-rvk04qa2.mjs +0 -1
  678. package/dist/chunks/export-0.1.9-c3pqjktx.mjs +0 -2
  679. package/dist/chunks/extra-usage-0.1.9-92jjke47.mjs +0 -1
  680. package/dist/chunks/extra-usage-noninteractive-0.1.9-27zjp5q7.mjs +0 -1
  681. package/dist/chunks/fast-0.1.9-60sqqvgd.mjs +0 -1
  682. package/dist/chunks/feedback-0.1.9-anraj53n.mjs +0 -14
  683. package/dist/chunks/firstPartyEventLogger-0.1.9-y55fqx1x.mjs +0 -1
  684. package/dist/chunks/fullscreen-0.1.9-xy9bnpe3.mjs +0 -1
  685. package/dist/chunks/git-0.1.9-09pdaxwd.mjs +0 -1
  686. package/dist/chunks/githubModelsCredentials-0.1.9-bzx6c3bd.mjs +0 -1
  687. package/dist/chunks/growthbook-0.1.9-rqhcy76z.mjs +0 -1
  688. package/dist/chunks/heapdump-0.1.9-qrfce4dp.mjs +0 -6
  689. package/dist/chunks/help-0.1.9-sfn2ed9n.mjs +0 -1
  690. package/dist/chunks/hookChains-0.1.9-5t2mrtyc.mjs +0 -3
  691. package/dist/chunks/hooks-0.1.9-4cebdztn.mjs +0 -1
  692. package/dist/chunks/hooks-0.1.9-y0vtx23k.mjs +0 -79
  693. package/dist/chunks/ide-0.1.9-yxzacgd5.mjs +0 -3
  694. package/dist/chunks/image-processor-napi-0.1.9-fwc1ge47.mjs +0 -1
  695. package/dist/chunks/index-0.1.9-2gv7a7tq.mjs +0 -2
  696. package/dist/chunks/index-0.1.9-31vnb803.mjs +0 -1
  697. package/dist/chunks/index-0.1.9-68aa3hmw.mjs +0 -1
  698. package/dist/chunks/index-0.1.9-7ktx5gez.mjs +0 -1
  699. package/dist/chunks/index-0.1.9-8feamw1f.mjs +0 -1
  700. package/dist/chunks/index-0.1.9-8hzceckr.mjs +0 -5
  701. package/dist/chunks/index-0.1.9-96thm65j.mjs +0 -1
  702. package/dist/chunks/index-0.1.9-c7sexk3f.mjs +0 -2
  703. package/dist/chunks/index-0.1.9-fvtq6thw.mjs +0 -1
  704. package/dist/chunks/index-0.1.9-g2ngvhaf.mjs +0 -1
  705. package/dist/chunks/index-0.1.9-gtn0qcv2.mjs +0 -7
  706. package/dist/chunks/index-0.1.9-h548q4km.mjs +0 -1
  707. package/dist/chunks/index-0.1.9-j6ac60hq.mjs +0 -1
  708. package/dist/chunks/index-0.1.9-jxdymwv4.mjs +0 -1
  709. package/dist/chunks/index-0.1.9-kgdkzpmr.mjs +0 -1
  710. package/dist/chunks/index-0.1.9-mt2y3wyw.mjs +0 -9
  711. package/dist/chunks/index-0.1.9-smem7egb.mjs +0 -30
  712. package/dist/chunks/index-0.1.9-snmdvw2f.mjs +0 -1
  713. package/dist/chunks/index-0.1.9-vwevfx80.mjs +0 -1
  714. package/dist/chunks/index-0.1.9-w21jc8bp.mjs +0 -1
  715. package/dist/chunks/index-0.1.9-wpqaqk4y.mjs +0 -1
  716. package/dist/chunks/index-0.1.9-yjp28h60.mjs +0 -9
  717. package/dist/chunks/initReplBridge-0.1.9-dag95hyf.mjs +0 -1
  718. package/dist/chunks/ink-0.1.9-4n2nvw5p.mjs +0 -1
  719. package/dist/chunks/insights-0.1.9-9hr8tshw.mjs +0 -870
  720. package/dist/chunks/install-0.1.9-km91vvgf.mjs +0 -1
  721. package/dist/chunks/install-github-app-0.1.9-874a2dgj.mjs +0 -149
  722. package/dist/chunks/install-slack-app-0.1.9-q5yyb8vs.mjs +0 -1
  723. package/dist/chunks/instrumentation-0.1.9-raz129aj.mjs +0 -12
  724. package/dist/chunks/interactiveHelpers-0.1.9-21a8r4rv.mjs +0 -1
  725. package/dist/chunks/keybindings-0.1.9-nm8s4x8m.mjs +0 -2
  726. package/dist/chunks/knowledge-0.1.9-zhr6zq80.mjs +0 -2
  727. package/dist/chunks/loadAgentsDir-0.1.9-3m0mzw84.mjs +0 -1
  728. package/dist/chunks/loadPluginHooks-0.1.9-y46g5zj0.mjs +0 -1
  729. package/dist/chunks/logout-0.1.9-hb89bxj8.mjs +0 -1
  730. package/dist/chunks/lsp-0.1.9-2j3y8eqc.mjs +0 -1
  731. package/dist/chunks/main-0.1.9-7cnyr288.mjs +0 -1
  732. package/dist/chunks/managedEnv-0.1.9-y8wax2wz.mjs +0 -1
  733. package/dist/chunks/mcp-0.1.9-14beee71.mjs +0 -17
  734. package/dist/chunks/mcp-0.1.9-qw1n3pzx.mjs +0 -4
  735. package/dist/chunks/mcp-0.1.9-zd92e41j.mjs +0 -1
  736. package/dist/chunks/mcpServer-0.1.9-5p48a2y0.mjs +0 -1
  737. package/dist/chunks/mcpb-0.1.9-t8x1bjwv.mjs +0 -1
  738. package/dist/chunks/memory-0.1.9-mxz6vgsy.mjs +0 -3
  739. package/dist/chunks/mobile-0.1.9-144nwr03.mjs +0 -2
  740. package/dist/chunks/model-0.1.9-ghswdzx2.mjs +0 -1
  741. package/dist/chunks/model-0.1.9-j4vhm4vm.mjs +0 -2
  742. package/dist/chunks/oauth-0.1.9-a7p9ezjx.mjs +0 -1
  743. package/dist/chunks/openaiShim-0.1.9-5bn57rv6.mjs +0 -14
  744. package/dist/chunks/output-style-0.1.9-y8t5c5v3.mjs +0 -1
  745. package/dist/chunks/package-HMBVQOZ4-0.1.9-mbvqe0av.mjs +0 -1
  746. package/dist/chunks/parser-0.1.9-d7vc9q1w.mjs +0 -1
  747. package/dist/chunks/passes-0.1.9-84vsp058.mjs +0 -1
  748. package/dist/chunks/permissions-0.1.9-h0a2312z.mjs +0 -3
  749. package/dist/chunks/plan-0.1.9-k9dx9nwc.mjs +0 -1
  750. package/dist/chunks/plist-0.1.9-f3c6hvca.mjs +0 -1
  751. package/dist/chunks/plugin-0.1.9-z3nwra38.mjs +0 -29
  752. package/dist/chunks/pluginStartupCheck-0.1.9-p68xwmv4.mjs +0 -1
  753. package/dist/chunks/plugins-0.1.9-grc1bgmj.mjs +0 -9
  754. package/dist/chunks/print-0.1.9-z151tvas.mjs +0 -57
  755. package/dist/chunks/privacy-settings-0.1.9-m7xpxtd8.mjs +0 -1
  756. package/dist/chunks/process-0.1.9-anx0dq1a.mjs +0 -1
  757. package/dist/chunks/processBashCommand-0.1.9-bchtybqh.mjs +0 -1
  758. package/dist/chunks/processSlashCommand-0.1.9-ebvc859m.mjs +0 -9
  759. package/dist/chunks/prompt-0.1.9-08fnpwfx.mjs +0 -1
  760. package/dist/chunks/prompt-0.1.9-whqkx3td.mjs +0 -1
  761. package/dist/chunks/prompts-0.1.9-psek69yr.mjs +0 -1
  762. package/dist/chunks/provider-0.1.9-xwmdqr38.mjs +0 -2
  763. package/dist/chunks/providerProfiles-0.1.9-myc8zcfy.mjs +0 -1
  764. package/dist/chunks/rate-limit-options-0.1.9-06twart5.mjs +0 -1
  765. package/dist/chunks/registry-0.1.9-xxrsbce3.mjs +0 -1
  766. package/dist/chunks/release-notes-0.1.9-4r396x7z.mjs +0 -5
  767. package/dist/chunks/reload-plugins-0.1.9-hm09ekrf.mjs +0 -2
  768. package/dist/chunks/remote-env-0.1.9-0peng4np.mjs +0 -1
  769. package/dist/chunks/remoteBridgeCore-0.1.9-4eg0bkck.mjs +0 -1
  770. package/dist/chunks/remoteSession-0.1.9-7jagnaes.mjs +0 -1
  771. package/dist/chunks/rename-0.1.9-3r8bqa1y.mjs +0 -1
  772. package/dist/chunks/replBridgeHandle-0.1.9-1y32h5jq.mjs +0 -1
  773. package/dist/chunks/resume-0.1.9-gayv56qp.mjs +0 -2
  774. package/dist/chunks/rewind-0.1.9-krxjbzeg.mjs +0 -1
  775. package/dist/chunks/sandbox-adapter-0.1.9-b4ze2ex2.mjs +0 -1
  776. package/dist/chunks/sandbox-toggle-0.1.9-6vctxbed.mjs +0 -1
  777. package/dist/chunks/session-0.1.9-jtrr3jje.mjs +0 -2
  778. package/dist/chunks/sessionFileAccessHooks-0.1.9-wpgdva8t.mjs +0 -1
  779. package/dist/chunks/sessionStorage-0.1.9-1v6wyqzw.mjs +0 -1
  780. package/dist/chunks/setup-0.1.9-jc5w6v5s.mjs +0 -5
  781. package/dist/chunks/sinks-0.1.9-49ereb4y.mjs +0 -1
  782. package/dist/chunks/skills-0.1.9-d63w5m27.mjs +0 -1
  783. package/dist/chunks/startupProfiler-0.1.9-gmke65dk.mjs +0 -1
  784. package/dist/chunks/state-0.1.9-m8x0v07d.mjs +0 -1
  785. package/dist/chunks/stats-0.1.9-yvya6xg6.mjs +0 -6
  786. package/dist/chunks/status-0.1.9-sapnwz4b.mjs +0 -1
  787. package/dist/chunks/stickers-0.1.9-ewdagtd4.mjs +0 -1
  788. package/dist/chunks/subprocessEnv-0.1.9-2dqzh55d.mjs +0 -1
  789. package/dist/chunks/tasks-0.1.9-qgqwhse9.mjs +0 -1
  790. package/dist/chunks/teamHelpers-0.1.9-r474ar76.mjs +0 -1
  791. package/dist/chunks/teammateModeSnapshot-0.1.9-nwc11b9m.mjs +0 -1
  792. package/dist/chunks/teleport-0.1.9-xaj204my.mjs +0 -1
  793. package/dist/chunks/terminalSetup-0.1.9-xd5rhh32.mjs +0 -1
  794. package/dist/chunks/theme-0.1.9-f6jzdysz.mjs +0 -1
  795. package/dist/chunks/thinkback-0.1.9-8j25tex7.mjs +0 -1
  796. package/dist/chunks/thinkback-play-0.1.9-tzs2w3mj.mjs +0 -1
  797. package/dist/chunks/toolPool-0.1.9-6b4938vh.mjs +0 -1
  798. package/dist/chunks/toolSearch-0.1.9-7ych6nv7.mjs +0 -1
  799. package/dist/chunks/trustedDevice-0.1.9-xqxt3kmz.mjs +0 -1
  800. package/dist/chunks/turndown.cjs-0.1.9-m1wesrr4.mjs +0 -69
  801. package/dist/chunks/ultrareviewCommand-0.1.9-x09n5pvc.mjs +0 -4
  802. package/dist/chunks/update-0.1.9-8dntd8kh.mjs +0 -94
  803. package/dist/chunks/upgrade-0.1.9-eja31dgt.mjs +0 -1
  804. package/dist/chunks/upstreamproxy-0.1.9-pv2yqh11.mjs +0 -14
  805. package/dist/chunks/usage-0.1.9-neje6dea.mjs +0 -1
  806. package/dist/chunks/util-0.1.9-kdhggd68.mjs +0 -1
  807. package/dist/chunks/utils-0.1.9-bqw30f8b.mjs +0 -1
  808. package/dist/chunks/vim-0.1.9-w4d1qz6f.mjs +0 -1
  809. package/dist/chunks/watcher-0.1.9-ty2r0yxd.mjs +0 -1
  810. package/dist/chunks/wiki-0.1.9-ah646x2k.mjs +0 -132
  811. package/dist/chunks/worktree-0.1.9-d3fbxjwd.mjs +0 -1
  812. package/dist/chunks/worktreeModeEnabled-0.1.9-qbn6b5fs.mjs +0 -1
  813. package/dist/chunks/wrapper-0.1.9-eh46qafm.mjs +0 -7
  814. /package/dist/chunks/{cli-0.1.9-zrdz7st3.mjs → cli-0.1.11-x3q39kf7.mjs} +0 -0
@@ -1,192 +0,0 @@
1
- import{Aca as yL,Dca as tk,Lca as t7,Pca as pz,Tca as XV,pda as U,qda as DX,rda as l0,sda as O,tda as b1}from"./cli-0.1.9-0dtdhejj.mjs";import{$da as Xx,Ida as cL,wda as s,xda as t0}from"./cli-0.1.9-mj88t3jf.mjs";import{aea as YW,iea as sB,jea as HW}from"./cli-0.1.9-7ftnjyps.mjs";import{kea as uW,nea as Uj}from"./cli-0.1.9-45ggwszg.mjs";import{Jea as W3,xea as C1}from"./cli-0.1.9-wpvrabrk.mjs";import{mfa as r6,rfa as MV}from"./cli-0.1.9-mkfnnvz7.mjs";import{Afa as l$,zfa as c0}from"./cli-0.1.9-5ryrgdzg.mjs";import{$fa as A6,Aga as R1,Dfa as Y4,Ffa as SB,Tfa as q7,Yfa as dL,_fa as K0,bga as c$,dga as y1,ega as k4,fga as f,gga as H0,hga as pX,iga as JL,jga as L0,kga as M1,nga as k,rga as R0,xga as E}from"./cli-0.1.9-vdw09f8y.mjs";import{Bga as Y0,Ega as e,Fga as bV,Gga as Q2,Oga as d0}from"./cli-0.1.9-v7ajk1nz.mjs";import{$ha as N4,Bka as dX,Cia as s1,Dha as H$,Dia as u5,Dka as cX,Eha as GR,Eja as rL,Fha as Gq,Gha as E_,Hha as D4,Iha as Hq,Jha as Fq,Kha as b_,Lha as W6,Lka as uL,Mha as C7,Nka as pL,Uka as B9,Vga as vQ,Wga as Pz,Xga as G$,Yga as VR,aia as wQ,ala as xV,bha as b7,bia as jQ,cha as l_,cia as Nz,dia as xQ,eia as xz,fha as Dq,fia as y4,gha as g_,gia as T$,hha as J3,hia as CQ,iha as HR,iia as vz,jha as wq,jia as AV,jka as SV,jla as yB,kha as d_,kia as IV,lia as OV,mia as wV,nha as Tq,nia as jV,oha as f_,oia as NV,pha as Aq,pia as _2,pma as j6,qha as m_,qia as kV,rha as C4,sha as sQ,tha as q3,tia as S$,uha as UR,vha as Y$,wha as KR,xha as j4,yha as OQ}from"./cli-0.1.9-7fp0smtp.mjs";import{Ama as $$,Bma as YR,Ema as Jq,Fma as F_,Gma as K6,Hma as P7,Oma as u,Pma as L1,sma as Lq,tma as v_,wma as eQ,xma as rz,yma as z0,zma as G6}from"./cli-0.1.9-1ghbcafn.mjs";import{hna as FH,ina as $4,jna as d,kna as y7,lna as B,mna as $0,nna as R6,ona as M6}from"./cli-0.1.9-kbrf27z8.mjs";function eJ(Z){let X=Z.slice(Z.lastIndexOf(".")).toLowerCase();return R_.has(X)}function Zq(Z){let X=Math.min(Z.length,M_),J=0;for(let q=0;q<X;q++){let Q=Z[q];if(Q===0)return!0;if(Q<32&&Q!==9&&Q!==10&&Q!==13)J++}return J/X>0.1}var R_,M_=8192;var Xq=B(()=>{R_=new Set([".png",".jpg",".jpeg",".gif",".bmp",".ico",".webp",".tiff",".tif",".mp4",".mov",".avi",".mkv",".webm",".wmv",".flv",".m4v",".mpeg",".mpg",".mp3",".wav",".ogg",".flac",".aac",".m4a",".wma",".aiff",".opus",".zip",".tar",".gz",".bz2",".7z",".rar",".xz",".z",".tgz",".iso",".exe",".dll",".so",".dylib",".bin",".o",".a",".obj",".lib",".app",".msi",".deb",".rpm",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odt",".ods",".odp",".ttf",".otf",".woff",".woff2",".eot",".pyc",".pyo",".class",".jar",".war",".ear",".node",".wasm",".rlib",".sqlite",".sqlite3",".db",".mdb",".idx",".psd",".ai",".eps",".sketch",".fig",".xd",".blend",".3ds",".max",".swf",".fla",".lockb",".dat",".data"])});var D_,H6;var E7=B(()=>{F_();D_=function(){try{var Z=Jq(Object,"defineProperty");return Z({},"",{}),Z}catch(X){}}(),H6=D_});function T_(Z,X,J){if(X=="__proto__"&&H6)H6(Z,X,{configurable:!0,enumerable:!0,value:J,writable:!0});else Z[X]=J}var U6;var M4=B(()=>{E7();U6=T_});function O_(Z,X,J){var q=Z[X];if(!(I_.call(Z,X)&&K6(q,J))||J===void 0&&!(X in Z))U6(Z,X,J)}var A_,I_,F4;var v7=B(()=>{M4();P7();A_=Object.prototype,I_=A_.hasOwnProperty;F4=O_});function w_(Z,X,J,q){var Q=!J;J||(J={});var $=-1,Y=X.length;while(++$<Y){var H=X[$],K=q?q(J[H],Z[H],H,J,Z):void 0;if(K===void 0)K=Z[H];if(Q)U6(J,H,K);else F4(J,H,K)}return J}var qq;var Qq=B(()=>{v7();M4();qq=w_});function j_(Z){var X=[];if(Z!=null)for(var J in Object(Z))X.push(J);return X}var $q;var Yq=B(()=>{$q=j_});function x_(Z){if(!z0(Z))return $q(Z);var X=D4(Z),J=[];for(var q in Z)if(!(q=="constructor"&&(X||!k_.call(Z,q))))J.push(q);return J}var N_,k_,Uq;var Kq=B(()=>{G6();Hq();Yq();N_=Object.prototype,k_=N_.hasOwnProperty;Uq=x_});function P_(Z){return W6(Z)?Gq(Z,!0):Uq(Z)}var V6;var T4=B(()=>{E_();Kq();C7();V6=P_});var I4={};y7(I4,{default:()=>S7});function y_(Z,X){if(X)return Z.slice();var J=Z.length,q=Bq?Bq(J):new Z.constructor(J);return Z.copy(q),q}var _q,Wq,C_,Vq,Bq,S7;var zq=B(()=>{v_();_q=typeof I4=="object"&&I4&&!I4.nodeType&&I4,Wq=_q&&typeof A4=="object"&&A4&&!A4.nodeType&&A4,C_=Wq&&Wq.exports===_q,Vq=C_?Lq.Buffer:void 0,Bq=Vq?Vq.allocUnsafe:void 0;S7=y_});function S_(Z,X){var J=-1,q=Z.length;X||(X=Array(q));while(++J<q)X[J]=Z[J];return X}var Rq;var Mq=B(()=>{Rq=S_});var h_,B6;var O4=B(()=>{b_();h_=Fq(Object.getPrototypeOf,Object),B6=h_});var u_,p_,Iq;var Oq=B(()=>{g_();O4();m_();f_();u_=Object.getOwnPropertySymbols,p_=!u_?Tq:function(Z){var X=[];while(Z)Dq(X,Aq(Z)),Z=B6(Z);return X},Iq=p_});function c_(Z){return wq(Z,V6,Iq)}var jq;var Nq=B(()=>{d_();Oq();T4();jq=c_});function n_(Z){var X=new Z.constructor(Z.byteLength);return new b7(X).set(new b7(Z)),X}var kq;var xq=B(()=>{l_();kq=n_});function i_(Z,X){var J=X?kq(Z.buffer):Z.buffer;return new Z.constructor(J,Z.byteOffset,Z.length)}var Eq;var Pq=B(()=>{xq();Eq=i_});var vq,a_,Cq;var yq=B(()=>{G6();vq=Object.create,a_=function(){function Z(){}return function(X){if(!z0(X))return{};if(vq)return vq(X);Z.prototype=X;var J=new Z;return Z.prototype=void 0,J}}(),Cq=a_});function o_(Z){return typeof Z.constructor=="function"&&!D4(Z)?Cq(B6(Z)):{}}var Sq;var bq=B(()=>{yq();O4();Hq();Sq=o_});import{dirname as s_}from"path";function Q0(Z,X,J){let q=r_();if(!q)return;let Q={timestamp:new Date().toISOString(),level:Z,event:X,data:J??{}},$=k(),Y=f(Q)+`
2
- `;try{$.appendFileSync(q,Y)}catch{try{$.mkdirSync(s_(q)),$.appendFileSync(q,Y)}catch{}}}function r_(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function mE(Z,X,J){let q=Date.now();Q0("info",`${Z}_started`);try{let Q=await X(),$=J?J(Q):{};return Q0("info",`${Z}_completed`,{duration_ms:Date.now()-q,...$}),Q}catch(Q){throw Q0("error",`${Z}_failed`,{duration_ms:Date.now()-q}),Q}}var G2=B(()=>{R0();L0()});var uq=d((pE,mq)=>{mq.exports=fq;fq.sync=e_;var hq=$0("fs");function t_(Z,X){var J=X.pathExt!==void 0?X.pathExt:process.env.PATHEXT;if(!J)return!0;if(J=J.split(";"),J.indexOf("")!==-1)return!0;for(var q=0;q<J.length;q++){var Q=J[q].toLowerCase();if(Q&&Z.substr(-Q.length).toLowerCase()===Q)return!0}return!1}function gq(Z,X,J){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return t_(X,J)}function fq(Z,X,J){hq.stat(Z,function(q,Q){J(q,q?!1:gq(Q,Z,X))})}function e_(Z,X){return gq(hq.statSync(Z),Z,X)}});var nq=d((dE,lq)=>{lq.exports=dq;dq.sync=Zz;var pq=$0("fs");function dq(Z,X,J){pq.stat(Z,function(q,Q){J(q,q?!1:cq(Q,X))})}function Zz(Z,X){return cq(pq.statSync(Z),X)}function cq(Z,X){return Z.isFile()&&Xz(Z,X)}function Xz(Z,X){var{mode:J,uid:q,gid:Q}=Z,$=X.uid!==void 0?X.uid:process.getuid&&process.getuid(),Y=X.gid!==void 0?X.gid:process.getgid&&process.getgid(),H=parseInt("100",8),K=parseInt("010",8),W=parseInt("001",8),G=H|K,V=J&W||J&K&&Q===Y||J&H&&q===$||J&G&&$===0;return V}});var aq=d((lE,iq)=>{var cE=$0("fs"),w4;if(process.platform==="win32"||global.TESTING_WINDOWS)w4=uq();else w4=nq();iq.exports=h7;h7.sync=Jz;function h7(Z,X,J){if(typeof X==="function")J=X,X={};if(!J){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(q,Q){h7(Z,X||{},function($,Y){if($)Q($);else q(Y)})})}w4(Z,X||{},function(q,Q){if(q){if(q.code==="EACCES"||X&&X.ignoreErrors)q=null,Q=!1}J(q,Q)})}function Jz(Z,X){try{return w4.sync(Z,X||{})}catch(J){if(X&&X.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var XQ=d((nE,ZQ)=>{var L6=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",oq=$0("path"),qz=L6?";":":",sq=aq(),rq=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),tq=(Z,X)=>{let J=X.colon||qz,q=Z.match(/\//)||L6&&Z.match(/\\/)?[""]:[...L6?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(J)],Q=L6?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=L6?Q.split(J):[""];if(L6){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:q,pathExt:$,pathExtExe:Q}},eq=(Z,X,J)=>{if(typeof X==="function")J=X,X={};if(!X)X={};let{pathEnv:q,pathExt:Q,pathExtExe:$}=tq(Z,X),Y=[],H=(W)=>new Promise((G,V)=>{if(W===q.length)return X.all&&Y.length?G(Y):V(rq(Z));let L=q[W],_=/^".*"$/.test(L)?L.slice(1,-1):L,z=oq.join(_,Z),D=!_&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+z:z;G(K(D,W,0))}),K=(W,G,V)=>new Promise((L,_)=>{if(V===Q.length)return L(H(G+1));let z=Q[V];sq(W+z,{pathExt:$},(D,M)=>{if(!D&&M)if(X.all)Y.push(W+z);else return L(W+z);return L(K(W,G,V+1))})});return J?H(0).then((W)=>J(null,W),J):H(0)},Qz=(Z,X)=>{X=X||{};let{pathEnv:J,pathExt:q,pathExtExe:Q}=tq(Z,X),$=[];for(let Y=0;Y<J.length;Y++){let H=J[Y],K=/^".*"$/.test(H)?H.slice(1,-1):H,W=oq.join(K,Z),G=!K&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+W:W;for(let V=0;V<q.length;V++){let L=G+q[V];try{if(sq.sync(L,{pathExt:Q}))if(X.all)$.push(L);else return L}catch(_){}}}if(X.all&&$.length)return $;if(X.nothrow)return null;throw rq(Z)};ZQ.exports=eq;eq.sync=Qz});var qQ=d((iE,g7)=>{var JQ=(Z={})=>{let X=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(X).reverse().find((q)=>q.toUpperCase()==="PATH")||"Path"};g7.exports=JQ;g7.exports.default=JQ});var HQ=d((aE,YQ)=>{var QQ=$0("path"),$z=XQ(),Yz=qQ();function $Q(Z,X){let J=Z.options.env||process.env,q=process.cwd(),Q=Z.options.cwd!=null,$=Q&&process.chdir!==void 0&&!process.chdir.disabled;if($)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=$z.sync(Z.command,{path:J[Yz({env:J})],pathExt:X?QQ.delimiter:void 0})}catch(H){}finally{if($)process.chdir(q)}if(Y)Y=QQ.resolve(Q?Z.options.cwd:"",Y);return Y}function Hz(Z){return $Q(Z)||$Q(Z,!0)}YQ.exports=Hz});var UQ=d((Gz,m7)=>{var f7=/([()\][%!^"`<>&|;, *?])/g;function Uz(Z){return Z=Z.replace(f7,"^$1"),Z}function Kz(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(f7,"^$1"),X)Z=Z.replace(f7,"^$1");return Z}Gz.command=Uz;Gz.argument=Kz});var GQ=d((oE,KQ)=>{KQ.exports=/^#!(.*)/});var VQ=d((sE,WQ)=>{var Bz=GQ();WQ.exports=(Z="")=>{let X=Z.match(Bz);if(!X)return null;let[J,q]=X[0].replace(/#! ?/,"").split(" "),Q=J.split("/").pop();if(Q==="env")return q;return q?`${Q} ${q}`:Q}});var LQ=d((rE,BQ)=>{var u7=$0("fs"),Lz=VQ();function _z(Z){let J=Buffer.alloc(150),q;try{q=u7.openSync(Z,"r"),u7.readSync(q,J,0,150,0),u7.closeSync(q)}catch(Q){}return Lz(J.toString())}BQ.exports=_z});var MQ=d((tE,RQ)=>{var zz=$0("path"),_Q=HQ(),zQ=UQ(),Rz=LQ(),Mz=process.platform==="win32",Fz=/\.(?:com|exe)$/i,Dz=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Tz(Z){Z.file=_Q(Z);let X=Z.file&&Rz(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,_Q(Z);return Z.file}function Az(Z){if(!Mz)return Z;let X=Tz(Z),J=!Fz.test(X);if(Z.options.forceShell||J){let q=Dz.test(X);Z.command=zz.normalize(Z.command),Z.command=zQ.command(Z.command),Z.args=Z.args.map(($)=>zQ.argument($,q));let Q=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${Q}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function Iz(Z,X,J){if(X&&!Array.isArray(X))J=X,X=null;X=X?X.slice(0):[],J=Object.assign({},J);let q={command:Z,args:X,options:J,file:void 0,original:{command:Z,args:X}};return J.shell?q:Az(q)}RQ.exports=Iz});var TQ=d((eE,DQ)=>{var p7=process.platform==="win32";function d7(Z,X){return Object.assign(Error(`${X} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${X} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function Oz(Z,X){if(!p7)return;let J=Z.emit;Z.emit=function(q,Q){if(q==="exit"){let $=FQ(Q,X);if($)return J.call(Z,"error",$)}return J.apply(Z,arguments)}}function FQ(Z,X){if(p7&&Z===1&&!X.file)return d7(X.original,"spawn");return null}function wz(Z,X){if(p7&&Z===1&&!X.file)return d7(X.original,"spawnSync");return null}DQ.exports={hookChildProcess:Oz,verifyENOENT:FQ,verifyENOENTSync:wz,notFoundError:d7}});var n7=d((ZP,_6)=>{var AQ=$0("child_process"),c7=MQ(),l7=TQ();function IQ(Z,X,J){let q=c7(Z,X,J),Q=AQ.spawn(q.command,q.args,q.options);return l7.hookChildProcess(Q,q),Q}function jz(Z,X,J){let q=c7(Z,X,J),Q=AQ.spawnSync(q.command,q.args,q.options);return Q.error=Q.error||l7.verifyENOENTSync(Q.status,q),Q}_6.exports=IQ;_6.exports.spawn=IQ;_6.exports.sync=jz;_6.exports._parse=c7;_6.exports._enoent=l7});function kz(Z,X,J,q){if(!z0(Z))return Z;X=N4(X,Z);var Q=-1,$=X.length,Y=$-1,H=Z;while(H!=null&&++Q<$){var K=jQ(X[Q]),W=J;if(K==="__proto__"||K==="constructor"||K==="prototype")return Z;if(Q!=Y){var G=H[K];if(W=q?q(G,K,H):void 0,W===void 0)W=z0(G)?G:j4(X[Q+1])?[]:{}}F4(H,K,W),H=H[K]}return Z}var NQ;var kQ=B(()=>{v7();wQ();OQ();G6();Nz();NQ=kz});function Ez(Z,X,J){var q=-1,Q=X.length,$={};while(++q<Q){var Y=X[q],H=xQ(Z,Y);if(J(H,Y))NQ($,N4(Y,Z),H)}return $}var EQ;var PQ=B(()=>{xz();kQ();wQ();EQ=Ez});function Cz(Z,X){if(Z==null)return{};var J=vQ(jq(Z),function(q){return[q]});return X=CQ(X),EQ(Z,J,function(q,Q){return X(q,Q[0])})}var i7;var yQ=B(()=>{Pz();vz();PQ();Nq();i7=Cz});import{readdir as RP,readFile as yz}from"fs/promises";import{release as Sz}from"os";var AP,v0,IP,OP;var z6=B(()=>{L1();R0();u0();AP=["macos","wsl"],v0=u(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=k().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){m(Z)}return"linux"}return"unknown"}catch(Z){return m(Z),"unknown"}}),IP=u(()=>{if(process.platform!=="linux")return;try{let Z=k().readFileSync("/proc/version",{encoding:"utf8"}),X=Z.match(/WSL(\d+)/i);if(X&&X[1])return X[1];if(Z.toLowerCase().includes("microsoft"))return"1";return}catch(Z){m(Z);return}}),OP=u(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:Sz()};try{let X=await yz("/etc/os-release","utf8");for(let J of X.split(`
3
- `)){let q=J.match(/^(ID|VERSION_ID)=(.*)$/);if(q&&q[1]&&q[2]){let Q=q[2].replace(/^"|"$/g,"");if(q[1]==="ID")Z.linuxDistroId=Q;else Z.linuxDistroVersion=Q}}}catch{}return Z})});import{execSync as bz}from"child_process";function F6(Z,X){let q=[];try{const J=R6(q,k4`execSync: ${Z.slice(0,100)}`,0);return bz(Z,X)}catch(Q){var $=Q,Y=1}finally{M6(q,$,Y)}}var a7=B(()=>{L0()});var hz,bQ,o7,hQ=(Z,X,J,q)=>{typeof o7.emitWarning=="function"?o7.emitWarning(Z,X,J,q):console.error(`[${J}] ${X}: ${Z}`)},E4,SQ,gz=(Z)=>!bQ.has(Z),EP,_1=(Z)=>Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),gQ=(Z)=>_1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?x4:null:null,x4,fz=class Z{heap;length;static#J=!1;static create(X){let J=gQ(X);if(!J)return[];Z.#J=!0;let q=new Z(X,J);return Z.#J=!1,q}constructor(X,J){if(!Z.#J)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new J(X),this.length=0}push(X){this.heap[this.length++]=X}pop(){return this.heap[--this.length]}},fQ;var mQ=B(()=>{hz=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,bQ=new Set,o7=typeof process=="object"&&process?process:{},E4=globalThis.AbortController,SQ=globalThis.AbortSignal;if(typeof E4>"u"){SQ=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(J,q){this._onabort.push(q)}},E4=class{constructor(){X()}signal=new SQ;abort(J){if(!this.signal.aborted){this.signal.reason=J,this.signal.aborted=!0;for(let q of this.signal._onabort)q(J);this.signal.onabort?.(J)}}};let Z=o7.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",X=()=>{Z&&(Z=!1,hQ("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",X))}}EP=Symbol("type"),x4=class extends Array{constructor(Z){super(Z),this.fill(0)}},fQ=class Z{#J;#q;#X;#Y;#U;#V;#T;#z;get perf(){return this.#z}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#H;#A;#K;#$;#Z;#L;#R;#B;#G;#I;#W;#O;#w;#M;#F;#j;#P;#_;#S;static unsafeExposeInternals(X){return{starts:X.#w,ttls:X.#M,autopurgeTimers:X.#F,sizes:X.#O,keyMap:X.#K,keyList:X.#$,valList:X.#Z,next:X.#L,prev:X.#R,get head(){return X.#B},get tail(){return X.#G},free:X.#I,isBackgroundFetch:(J)=>X.#Q(J),backgroundFetch:(J,q,Q,$)=>X.#g(J,q,Q,$),moveToTail:(J)=>X.#y(J),indexes:(J)=>X.#N(J),rindexes:(J)=>X.#k(J),isStale:(J)=>X.#D(J)}}get max(){return this.#J}get maxSize(){return this.#q}get calculatedSize(){return this.#A}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#T}get dispose(){return this.#X}get onInsert(){return this.#Y}get disposeAfter(){return this.#U}constructor(X){let{max:J=0,ttl:q,ttlResolution:Q=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:K,dispose:W,onInsert:G,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:_,maxSize:z=0,maxEntrySize:D=0,sizeCalculation:M,fetchMethod:F,memoMethod:N,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:I,ignoreFetchAbort:T,perf:b}=X;if(b!==void 0&&typeof b?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#z=b??hz,J!==0&&!_1(J))throw TypeError("max option must be a nonnegative integer");let j=J?gQ(J):Array;if(!j)throw Error("invalid max value: "+J);if(this.#J=J,this.#q=z,this.maxEntrySize=D||this.#q,this.sizeCalculation=M,this.sizeCalculation){if(!this.#q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(N!==void 0&&typeof N!="function")throw TypeError("memoMethod must be a function if defined");if(this.#T=N,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#P=!!F,this.#K=new Map,this.#$=Array(J).fill(void 0),this.#Z=Array(J).fill(void 0),this.#L=new j(J),this.#R=new j(J),this.#B=0,this.#G=0,this.#I=fz.create(J),this.#H=0,this.#A=0,typeof W=="function"&&(this.#X=W),typeof G=="function"&&(this.#Y=G),typeof V=="function"?(this.#U=V,this.#W=[]):(this.#U=void 0,this.#W=void 0),this.#j=!!this.#X,this.#S=!!this.#Y,this.#_=!!this.#U,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#q!==0&&!_1(this.#q))throw TypeError("maxSize must be a positive integer if specified");if(!_1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#l()}if(this.allowStale=!!K,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=_1(Q)||Q===0?Q:1,this.ttlAutopurge=!!$,this.ttl=q||0,this.ttl){if(!_1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#f()}if(this.#J===0&&this.ttl===0&&this.#q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#J&&!this.#q){let x="LRU_CACHE_UNBOUNDED";gz(x)&&(bQ.add(x),hQ("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,Z))}}getRemainingTTL(X){return this.#K.has(X)?1/0:0}#f(){let X=new x4(this.#J),J=new x4(this.#J);this.#M=X,this.#w=J;let q=this.ttlAutopurge?Array(this.#J):void 0;this.#F=q,this.#m=(H,K,W=this.#z.now())=>{J[H]=K!==0?W:0,X[H]=K,Q(H,K)},this.#v=(H)=>{J[H]=X[H]!==0?this.#z.now():0,Q(H,X[H])};let Q=this.ttlAutopurge?(H,K)=>{if(q?.[H]&&(clearTimeout(q[H]),q[H]=void 0),K&&K!==0&&q){let W=setTimeout(()=>{this.#D(H)&&this.#x(this.#$[H],"expire")},K+1);W.unref&&W.unref(),q[H]=W}}:()=>{};this.#E=(H,K)=>{if(X[K]){let W=X[K],G=J[K];if(!W||!G)return;H.ttl=W,H.start=G,H.now=$||Y();let V=H.now-G;H.remainingTTL=W-V}};let $=0,Y=()=>{let H=this.#z.now();if(this.ttlResolution>0){$=H;let K=setTimeout(()=>$=0,this.ttlResolution);K.unref&&K.unref()}return H};this.getRemainingTTL=(H)=>{let K=this.#K.get(H);if(K===void 0)return 0;let W=X[K],G=J[K];if(!W||!G)return 1/0;let V=($||Y())-G;return W-V},this.#D=(H)=>{let K=J[H],W=X[H];return!!W&&!!K&&($||Y())-K>W}}#v=()=>{};#E=()=>{};#m=()=>{};#D=()=>!1;#l(){let X=new x4(this.#J);this.#A=0,this.#O=X,this.#C=(J)=>{this.#A-=X[J],X[J]=0},this.#u=(J,q,Q,$)=>{if(this.#Q(q))return 0;if(!_1(Q))if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(Q=$(q,J),!_1(Q))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return Q},this.#b=(J,q,Q)=>{if(X[J]=q,this.#q){let $=this.#q-X[J];for(;this.#A>$;)this.#h(!0)}this.#A+=X[J],Q&&(Q.entrySize=q,Q.totalCalculatedSize=this.#A)}}#C=(X)=>{};#b=(X,J,q)=>{};#u=(X,J,q,Q)=>{if(q||Q)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#N({allowStale:X=this.allowStale}={}){if(this.#H)for(let J=this.#G;!(!this.#p(J)||((X||!this.#D(J))&&(yield J),J===this.#B));)J=this.#R[J]}*#k({allowStale:X=this.allowStale}={}){if(this.#H)for(let J=this.#B;!(!this.#p(J)||((X||!this.#D(J))&&(yield J),J===this.#G));)J=this.#L[J]}#p(X){return X!==void 0&&this.#K.get(this.#$[X])===X}*entries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*rentries(){for(let X of this.#k())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*keys(){for(let X of this.#N()){let J=this.#$[X];J!==void 0&&!this.#Q(this.#Z[X])&&(yield J)}}*rkeys(){for(let X of this.#k()){let J=this.#$[X];J!==void 0&&!this.#Q(this.#Z[X])&&(yield J)}}*values(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#k())this.#Z[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield this.#Z[X])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(X,J={}){for(let q of this.#N()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($!==void 0&&X($,this.#$[q],this))return this.get(this.#$[q],J)}}forEach(X,J=this){for(let q of this.#N()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&X.call(J,$,this.#$[q],this)}}rforEach(X,J=this){for(let q of this.#k()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&X.call(J,$,this.#$[q],this)}}purgeStale(){let X=!1;for(let J of this.#k({allowStale:!0}))this.#D(J)&&(this.#x(this.#$[J],"expire"),X=!0);return X}info(X){let J=this.#K.get(X);if(J===void 0)return;let q=this.#Z[J],Q=this.#Q(q)?q.__staleWhileFetching:q;if(Q===void 0)return;let $={value:Q};if(this.#M&&this.#w){let Y=this.#M[J],H=this.#w[J];if(Y&&H){let K=Y-(this.#z.now()-H);$.ttl=K,$.start=Date.now()}}return this.#O&&($.size=this.#O[J]),$}dump(){let X=[];for(let J of this.#N({allowStale:!0})){let q=this.#$[J],Q=this.#Z[J],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($===void 0||q===void 0)continue;let Y={value:$};if(this.#M&&this.#w){Y.ttl=this.#M[J];let H=this.#z.now()-this.#w[J];Y.start=Math.floor(Date.now()-H)}this.#O&&(Y.size=this.#O[J]),X.unshift([q,Y])}return X}load(X){this.clear();for(let[J,q]of X){if(q.start){let Q=Date.now()-q.start;q.start=this.#z.now()-Q}this.set(J,q.value,q)}}set(X,J,q={}){if(J===void 0)return this.delete(X),this;let{ttl:Q=this.ttl,start:$,noDisposeOnSet:Y=this.noDisposeOnSet,sizeCalculation:H=this.sizeCalculation,status:K}=q,{noUpdateTTL:W=this.noUpdateTTL}=q,G=this.#u(X,J,q.size||0,H);if(this.maxEntrySize&&G>this.maxEntrySize)return K&&(K.set="miss",K.maxEntrySizeExceeded=!0),this.#x(X,"set"),this;let V=this.#H===0?void 0:this.#K.get(X);if(V===void 0)V=this.#H===0?this.#G:this.#I.length!==0?this.#I.pop():this.#H===this.#J?this.#h(!1):this.#H,this.#$[V]=X,this.#Z[V]=J,this.#K.set(X,V),this.#L[this.#G]=V,this.#R[V]=this.#G,this.#G=V,this.#H++,this.#b(V,G,K),K&&(K.set="add"),W=!1,this.#S&&this.#Y?.(J,X,"add");else{this.#y(V);let L=this.#Z[V];if(J!==L){if(this.#P&&this.#Q(L)){L.__abortController.abort(Error("replaced"));let{__staleWhileFetching:_}=L;_!==void 0&&!Y&&(this.#j&&this.#X?.(_,X,"set"),this.#_&&this.#W?.push([_,X,"set"]))}else Y||(this.#j&&this.#X?.(L,X,"set"),this.#_&&this.#W?.push([L,X,"set"]));if(this.#C(V),this.#b(V,G,K),this.#Z[V]=J,K){K.set="replace";let _=L&&this.#Q(L)?L.__staleWhileFetching:L;_!==void 0&&(K.oldValue=_)}}else K&&(K.set="update");this.#S&&this.onInsert?.(J,X,J===L?"update":"replace")}if(Q!==0&&!this.#M&&this.#f(),this.#M&&(W||this.#m(V,Q,$),K&&this.#E(K,V)),!Y&&this.#_&&this.#W){let L=this.#W,_;for(;_=L?.shift();)this.#U?.(..._)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#h(!0),this.#Q(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#_&&this.#W){let X=this.#W,J;for(;J=X?.shift();)this.#U?.(...J)}}}#h(X){let J=this.#B,q=this.#$[J],Q=this.#Z[J];return this.#P&&this.#Q(Q)?Q.__abortController.abort(Error("evicted")):(this.#j||this.#_)&&(this.#j&&this.#X?.(Q,q,"evict"),this.#_&&this.#W?.push([Q,q,"evict"])),this.#C(J),this.#F?.[J]&&(clearTimeout(this.#F[J]),this.#F[J]=void 0),X&&(this.#$[J]=void 0,this.#Z[J]=void 0,this.#I.push(J)),this.#H===1?(this.#B=this.#G=0,this.#I.length=0):this.#B=this.#L[J],this.#K.delete(q),this.#H--,J}has(X,J={}){let{updateAgeOnHas:q=this.updateAgeOnHas,status:Q}=J,$=this.#K.get(X);if($!==void 0){let Y=this.#Z[$];if(this.#Q(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D($))Q&&(Q.has="stale",this.#E(Q,$));else return q&&this.#v($),Q&&(Q.has="hit",this.#E(Q,$)),!0}else Q&&(Q.has="miss");return!1}peek(X,J={}){let{allowStale:q=this.allowStale}=J,Q=this.#K.get(X);if(Q===void 0||!q&&this.#D(Q))return;let $=this.#Z[Q];return this.#Q($)?$.__staleWhileFetching:$}#g(X,J,q,Q){let $=J===void 0?void 0:this.#Z[J];if(this.#Q($))return $;let Y=new E4,{signal:H}=q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let K={signal:Y.signal,options:q,context:Q},W=(D,M=!1)=>{let{aborted:F}=Y.signal,N=q.ignoreFetchAbort&&D!==void 0,R=q.ignoreFetchAbort||!!(q.allowStaleOnFetchAbort&&D!==void 0);if(q.status&&(F&&!M?(q.status.fetchAborted=!0,q.status.fetchError=Y.signal.reason,N&&(q.status.fetchAbortIgnored=!0)):q.status.fetchResolved=!0),F&&!N&&!M)return V(Y.signal.reason,R);let w=_,A=this.#Z[J];return(A===_||N&&M&&A===void 0)&&(D===void 0?w.__staleWhileFetching!==void 0?this.#Z[J]=w.__staleWhileFetching:this.#x(X,"fetch"):(q.status&&(q.status.fetchUpdated=!0),this.set(X,D,K.options))),D},G=(D)=>(q.status&&(q.status.fetchRejected=!0,q.status.fetchError=D),V(D,!1)),V=(D,M)=>{let{aborted:F}=Y.signal,N=F&&q.allowStaleOnFetchAbort,R=N||q.allowStaleOnFetchRejection,w=R||q.noDeleteOnFetchRejection,A=_;if(this.#Z[J]===_&&(!w||!M&&A.__staleWhileFetching===void 0?this.#x(X,"fetch"):N||(this.#Z[J]=A.__staleWhileFetching)),R)return q.status&&A.__staleWhileFetching!==void 0&&(q.status.returnedStale=!0),A.__staleWhileFetching;if(A.__returned===A)throw D},L=(D,M)=>{let F=this.#V?.(X,$,K);F&&F instanceof Promise&&F.then((N)=>D(N===void 0?void 0:N),M),Y.signal.addEventListener("abort",()=>{(!q.ignoreFetchAbort||q.allowStaleOnFetchAbort)&&(D(void 0),q.allowStaleOnFetchAbort&&(D=(N)=>W(N,!0)))})};q.status&&(q.status.fetchDispatched=!0);let _=new Promise(L).then(W,G),z=Object.assign(_,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return J===void 0?(this.set(X,z,{...K.options,status:void 0}),J=this.#K.get(X)):this.#Z[J]=z,z}#Q(X){if(!this.#P)return!1;let J=X;return!!J&&J instanceof Promise&&J.hasOwnProperty("__staleWhileFetching")&&J.__abortController instanceof E4}async fetch(X,J={}){let{allowStale:q=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:K=0,sizeCalculation:W=this.sizeCalculation,noUpdateTTL:G=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:z=this.allowStaleOnFetchAbort,context:D,forceRefresh:M=!1,status:F,signal:N}=J;if(!this.#P)return F&&(F.fetch="get"),this.get(X,{allowStale:q,updateAgeOnGet:Q,noDeleteOnStaleGet:$,status:F});let R={allowStale:q,updateAgeOnGet:Q,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:K,sizeCalculation:W,noUpdateTTL:G,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:z,ignoreFetchAbort:_,status:F,signal:N},w=this.#K.get(X);if(w===void 0){F&&(F.fetch="miss");let A=this.#g(X,w,R,D);return A.__returned=A}else{let A=this.#Z[w];if(this.#Q(A)){let j=q&&A.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",j&&(F.returnedStale=!0)),j?A.__staleWhileFetching:A.__returned=A}let I=this.#D(w);if(!M&&!I)return F&&(F.fetch="hit"),this.#y(w),Q&&this.#v(w),F&&this.#E(F,w),A;let T=this.#g(X,w,R,D),b=T.__staleWhileFetching!==void 0&&q;return F&&(F.fetch=I?"stale":"refresh",b&&I&&(F.returnedStale=!0)),b?T.__staleWhileFetching:T.__returned=T}}async forceFetch(X,J={}){let q=await this.fetch(X,J);if(q===void 0)throw Error("fetch() returned undefined");return q}memo(X,J={}){let q=this.#T;if(!q)throw Error("no memoMethod provided to constructor");let{context:Q,forceRefresh:$,...Y}=J,H=this.get(X,Y);if(!$&&H!==void 0)return H;let K=q(X,H,{options:Y,context:Q});return this.set(X,K,Y),K}get(X,J={}){let{allowStale:q=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:Y}=J,H=this.#K.get(X);if(H!==void 0){let K=this.#Z[H],W=this.#Q(K);return Y&&this.#E(Y,H),this.#D(H)?(Y&&(Y.get="stale"),W?(Y&&q&&K.__staleWhileFetching!==void 0&&(Y.returnedStale=!0),q?K.__staleWhileFetching:void 0):($||this.#x(X,"expire"),Y&&q&&(Y.returnedStale=!0),q?K:void 0)):(Y&&(Y.get="hit"),W?K.__staleWhileFetching:(this.#y(H),Q&&this.#v(H),K))}else Y&&(Y.get="miss")}#d(X,J){this.#R[J]=X,this.#L[X]=J}#y(X){X!==this.#G&&(X===this.#B?this.#B=this.#L[X]:this.#d(this.#R[X],this.#L[X]),this.#d(this.#G,X),this.#G=X)}delete(X){return this.#x(X,"delete")}#x(X,J){let q=!1;if(this.#H!==0){let Q=this.#K.get(X);if(Q!==void 0)if(this.#F?.[Q]&&(clearTimeout(this.#F?.[Q]),this.#F[Q]=void 0),q=!0,this.#H===1)this.#c(J);else{this.#C(Q);let $=this.#Z[Q];if(this.#Q($)?$.__abortController.abort(Error("deleted")):(this.#j||this.#_)&&(this.#j&&this.#X?.($,X,J),this.#_&&this.#W?.push([$,X,J])),this.#K.delete(X),this.#$[Q]=void 0,this.#Z[Q]=void 0,Q===this.#G)this.#G=this.#R[Q];else if(Q===this.#B)this.#B=this.#L[Q];else{let Y=this.#R[Q];this.#L[Y]=this.#L[Q];let H=this.#L[Q];this.#R[H]=this.#R[Q]}this.#H--,this.#I.push(Q)}}if(this.#_&&this.#W?.length){let Q=this.#W,$;for(;$=Q?.shift();)this.#U?.(...$)}return q}clear(){return this.#c("delete")}#c(X){for(let J of this.#k({allowStale:!0})){let q=this.#Z[J];if(this.#Q(q))q.__abortController.abort(Error("deleted"));else{let Q=this.#$[J];this.#j&&this.#X?.(q,Q,X),this.#_&&this.#W?.push([q,Q,X])}}if(this.#K.clear(),this.#Z.fill(void 0),this.#$.fill(void 0),this.#M&&this.#w){this.#M.fill(0),this.#w.fill(0);for(let J of this.#F??[])J!==void 0&&clearTimeout(J);this.#F?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#B=0,this.#G=0,this.#I.length=0,this.#A=0,this.#H=0,this.#_&&this.#W){let J=this.#W,q;for(;q=J?.shift();)this.#U?.(...q)}}}});function gP(Z,X=300000){let J=new Map,q=new Map,Q=async(...$)=>{let Y=f($),H=J.get(Y),K=Date.now();if(!H){let W=q.get(Y);if(W)return W;let G=Z(...$);q.set(Y,G);try{let V=await G;if(q.get(Y)===G)J.set(Y,{value:V,timestamp:K,refreshing:!1});return V}finally{if(q.get(Y)===G)q.delete(Y)}}if(H&&K-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let W=H;return Z(...$).then((G)=>{if(J.get(Y)===W)J.set(Y,{value:G,timestamp:Date.now(),refreshing:!1})}).catch((G)=>{if(m(G),J.get(Y)===W)J.delete(Y)}),H.value}return J.get(Y).value};return Q.cache={clear:()=>{J.clear(),q.clear()}},Q}function z1(Z,X,J=100){let q=new fQ({max:J}),Q=(...$)=>{let Y=X(...$),H=q.get(Y);if(H!==void 0)return H;let K=Z(...$);return q.set(Y,K),K};return Q.cache={clear:()=>q.clear(),size:()=>q.size,delete:($)=>q.delete($),get:($)=>q.peek($),has:($)=>q.has($)},Q}var P4=B(()=>{mQ();u0();L0()});import*as D6 from"path";import*as uQ from"path/win32";function s7(Z){try{return F6(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function mz(Z){if(Z==="git"){let X=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let J of X)if(s7(J))return J}try{let J=F6(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
4
- `).filter(Boolean),q=s().toLowerCase();for(let Q of J){let $=D6.resolve(Q).toLowerCase();if(D6.dirname($).toLowerCase()===q||$.startsWith(q+D6.sep)){E(`Skipping potentially malicious executable in current directory: ${Q}`);continue}return Q}return null}catch{return null}}function nP(){if(v0()==="windows"){let Z=uz();process.env.SHELL=Z,E(`Using bash path: "${Z}"`)}}var uz,iP,pQ;var dQ=B(()=>{L1();t0();R1();a7();P4();z6();uz=u(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(s7(process.env.CLAUDE_CODE_GIT_BASH_PATH))return process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(`Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${process.env.CLAUDE_CODE_GIT_BASH_PATH}"`),process.exit(1)}let Z=mz("git");if(Z){let X=uQ.join(Z,"..","..","bin","bash.exe");if(s7(X))return X}console.error("Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),iP=z1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let X=Z.match(/^([A-Za-z]):[/\\]/);if(X)return"/"+X[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),pQ=z1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let q=X[1].toUpperCase(),Q=Z.slice(("/cygdrive/"+X[1]).length);return q+":"+(Q||"\\").replace(/\//g,"\\")}let J=Z.match(/^\/([A-Za-z])(\/|$)/);if(J){let q=J[1].toUpperCase(),Q=Z.slice(2);return q+":"+(Q||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as cQ}from"os";import{dirname as lQ,isAbsolute as dz,join as cz,normalize as r7,relative as lz,resolve as nz}from"path";function e7(Z,X){let J=X??s()??k().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof J!=="string")throw TypeError(`Base directory must be a string, received ${typeof J}`);if(Z.includes("\x00")||J.includes("\x00"))throw Error("Path contains null bytes");let q=Z.trim();if(!q)return r7(J).normalize("NFC");if(q==="~")return cQ().normalize("NFC");if(q.startsWith("~/"))return cz(cQ(),q.slice(2)).normalize("NFC");let Q=q;if(v0()==="windows"&&q.match(/^\/[a-z]\//i))try{Q=pQ(q)}catch{Q=q}if(dz(Q))return r7(Q).normalize("NFC");return nz(J,Q).normalize("NFC")}function Xv(Z){let X=lz(s(),Z);return X.startsWith("..")?Z:X}function Jv(Z){let X=e7(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return lQ(X);try{if(k().statSync(X).isDirectory())return X}catch{}return lQ(X)}function qv(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function v1(Z){return r7(Z).replace(/\\/g,"/")}var v4=B(()=>{t0();R0();z6();dQ();pz()});function iz(Z,X,J){if(J!==void 0&&!K6(Z[X],J)||J===void 0&&!(X in Z))U6(Z,X,J)}var W2;var Z3=B(()=>{M4();P7();W2=iz});function az(Z){return function(X,J,q){var Q=-1,$=Object(X),Y=q(X),H=Y.length;while(H--){var K=Y[Z?H:++Q];if(J($[K],K,$)===!1)break}return X}}var nQ;var iQ=B(()=>{nQ=az});var oz,aQ;var oQ=B(()=>{iQ();oz=nQ(),aQ=oz});function sz(Z){return C4(Z)&&W6(Z)}var rQ;var tQ=B(()=>{C7();sQ();rQ=sz});function qR(Z){if(!C4(Z)||eQ(Z)!=tz)return!1;var X=B6(Z);if(X===null)return!0;var J=XR.call(X,"constructor")&&X.constructor;return typeof J=="function"&&J instanceof J&&Z$.call(J)==JR}var tz="[object Object]",ez,ZR,Z$,XR,JR,X$;var J$=B(()=>{rz();O4();sQ();ez=Function.prototype,ZR=Object.prototype,Z$=ez.toString,XR=ZR.hasOwnProperty,JR=Z$.call(Object);X$=qR});function QR(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var V2;var X3=B(()=>{V2=QR});function $R(Z){return qq(Z,V6(Z))}var q$;var Q$=B(()=>{Qq();T4();q$=$R});function WR(Z,X,J,q,Q,$,Y){var H=V2(Z,J),K=V2(X,J),W=Y.get(K);if(W){W2(Z,J,W);return}var G=$?$(H,K,J+"",Z,X,Y):void 0,V=G===void 0;if(V){var L=J3(K),_=!L&&Y$(K),z=!L&&!_&&H$(K);if(G=K,L||_||z)if(J3(H))G=H;else if(rQ(H))G=Rq(H);else if(_)V=!1,G=S7(K,!0);else if(z)V=!1,G=Eq(K,!0);else G=[];else if(X$(K)||q3(K)){if(G=H,q3(H))G=q$(H);else if(!z0(H)||$$(H))G=Sq(K)}else V=!1}if(V)Y.set(K,G),Q(G,K,q,$,Y),Y.delete(K);W2(Z,J,G)}var U$;var K$=B(()=>{Z3();zq();Pq();Mq();bq();UR();HR();tQ();KR();YR();G6();J$();GR();X3();Q$();U$=WR});function W$(Z,X,J,q,Q){if(Z===X)return;aQ(X,function($,Y){if(Q||(Q=new G$),z0($))U$(Z,X,Y,J,W$,q,Q);else{var H=q?q(V2(Z,Y),$,Y+"",Z,X,Q):void 0;if(H===void 0)H=$;W2(Z,Y,H)}},V6)}var V$;var B$=B(()=>{VR();Z3();oQ();K$();G6();T4();X3();V$=W$});function BR(Z,X,J){switch(J.length){case 0:return Z.call(X);case 1:return Z.call(X,J[0]);case 2:return Z.call(X,J[0],J[1]);case 3:return Z.call(X,J[0],J[1],J[2])}return Z.apply(X,J)}var L$;var _$=B(()=>{L$=BR});function LR(Z,X,J){return X=z$(X===void 0?Z.length-1:X,0),function(){var q=arguments,Q=-1,$=z$(q.length-X,0),Y=Array($);while(++Q<$)Y[Q]=q[X+Q];Q=-1;var H=Array(X+1);while(++Q<X)H[Q]=q[Q];return H[X]=J(Y),L$(Z,this,H)}}var z$,R$;var M$=B(()=>{_$();z$=Math.max;R$=LR});function _R(Z){return function(){return Z}}var F$;var D$=B(()=>{F$=_R});var zR,A$;var I$=B(()=>{D$();E7();T$();zR=!H6?y4:function(Z,X){return H6(Z,"toString",{configurable:!0,enumerable:!1,value:F$(X),writable:!0})},A$=zR});function DR(Z){var X=0,J=0;return function(){var q=FR(),Q=MR-(q-J);if(J=q,Q>0){if(++X>=RR)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var RR=800,MR=16,FR,O$;var w$=B(()=>{FR=Date.now;O$=DR});var TR,j$;var N$=B(()=>{I$();w$();TR=O$(A$),j$=TR});function AR(Z,X){return j$(R$(Z,X,y4),Z+"")}var k$;var x$=B(()=>{T$();M$();N$();k$=AR});function IR(Z,X,J){if(!z0(J))return!1;var q=typeof X;if(q=="number"?W6(J)&&j4(X,J.length):q=="string"&&(X in J))return K6(J[X],Z);return!1}var E$;var P$=B(()=>{P7();C7();OQ();G6();E$=IR});function OR(Z){return k$(function(X,J){var q=-1,Q=J.length,$=Q>1?J[Q-1]:void 0,Y=Q>2?J[2]:void 0;if($=Z.length>3&&typeof $=="function"?(Q--,$):void 0,Y&&E$(J[0],J[1],Y))$=Q<3?void 0:$,Q=1;X=Object(X);while(++q<Q){var H=J[q];if(H)Z(X,H,q,$)}return X})}var v$;var C$=B(()=>{x$();P$();v$=OR});var wR,e0;var y$=B(()=>{B$();C$();wR=v$(function(Z,X,J,q){V$(Z,X,J,q)}),e0=wR});function Q3(Z){let{buffer:X,bytesRead:J}=k().readSync(Z,{length:4096});if(J===0)return"utf8";if(J>=2){if(X[0]===255&&X[1]===254)return"utf16le"}if(J>=3&&X[0]===239&&X[1]===187&&X[2]===191)return"utf8";return"utf8"}function $3(Z){let X=0,J=0;for(let q=0;q<Z.length;q++)if(Z[q]===`
5
- `)if(q>0&&Z[q-1]==="\r")X++;else J++;return X>J?"CRLF":"LF"}function jR(Z){let X=k(),{resolvedPath:J,isSymlink:q}=M1(X,Z);if(q)E(`Reading through symlink: ${Z} -> ${J}`);let Q=Q3(J),$=X.readFileSync(J,{encoding:Q}),Y=$3($.slice(0,4096));return{content:$.replaceAll(`\r
6
- `,`
7
- `),encoding:Q,lineEndings:Y}}function Z1(Z){return jR(Z).content}var B2=B(()=>{R1();R0()});function p0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var S4=()=>{};import{join as NR}from"path";function EC(Z){L2=Z}function PC(){L2=null,Y3=void 0}function vC(Z){return Y3=Z,Z}function xR(){return NR(Y0(),kR)}function ER(){try{let Z=Z1(xR()),X=H0(p0(Z));if(!X||typeof X!=="object"||Array.isArray(X))return null;return X}catch{return null}}function b4(){if(Y3!==!0)return null;if(L2)return L2;let Z=ER();if(Z)return L2=Z,_2(),Z;return null}var kR="remote-settings.json",L2=null,Y3;var b$=B(()=>{d0();B2();S4();S$();L0()});function yC(Z,X){return Z.flatMap((J,q)=>q?[X(q),J]:[J])}function H3(Z,X){let J=0;for(let q of Z)J+=+!!X(q);return J}function h$(Z){return[...new Set(Z)]}var U3=()=>{};class g${cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let X=k(),J;try{J=X.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let q=this.cache.get(Z);if(q&&q.mtime===J.mtimeMs)return{content:q.content,encoding:q.encoding};let Q=m$(Z),$=X.readFileSync(Z,{encoding:Q}).replaceAll(`\r
8
- `,`
9
- `);if(J.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:$,encoding:Q,mtime:J.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:$,encoding:Q}}clear(){this.cache.clear()}invalidate(Z){this.cache.delete(Z)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}}var K3;var f$=B(()=>{h4();R0();K3=new g$});import{chmodSync as PR,writeFileSync as u$}from"fs";import{realpath as vR,stat as n$}from"fs/promises";import{homedir as i$}from"os";import{basename as G3,dirname as g4,extname as p$,isAbsolute as CR,join as T6,normalize as yR,relative as a$,resolve as SR,sep as z2}from"path";async function Zy(Z){try{return await n$(Z),!0}catch{return!1}}function Xy(Z){try{return k().readFileSync(Z,{encoding:"utf8"})}catch(X){return m(X),null}}function Jy(Z){let X=k();return Math.floor(X.statSync(Z).mtimeMs)}async function qy(Z){let X=await k().stat(Z);return Math.floor(X.mtimeMs)}function Qy(Z,X,J,q){let Q=X;if(q==="CRLF")Q=X.replaceAll(`\r
10
- `,`
11
- `).split(`
12
- `).join(`\r
13
- `);I6(Z,Q,{encoding:J}),K3.invalidate(Z)}function m$(Z){try{let X=k(),{resolvedPath:J}=M1(X,Z);return Q3(J)}catch(X){if(c$(X))E(`detectFileEncoding failed for expected reason: ${X.code}`,{level:"debug"});else m(X);return"utf8"}}function $y(Z,X="utf8"){try{let J=k(),{resolvedPath:q}=M1(J,Z),{buffer:Q,bytesRead:$}=J.readSync(q,{length:4096}),Y=Q.toString(X,0,$);return $3(Y)}catch(J){return m(J),"LF"}}function Yy(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(X)=>" ".repeat(X.length))}function hR(Z){let X=Z?e7(Z):void 0,J=X?a$(s(),X):void 0;return{absolutePath:X,relativePath:J}}function Hy(Z){let{relativePath:X}=hR(Z);if(X&&!X.startsWith(".."))return X;let J=i$();if(Z.startsWith(J+z2))return"~"+Z.slice(J.length);return Z}function Uy(Z){let X=k();try{let J=g4(Z),q=G3(Z,p$(Z)),Y=X.readdirSync(J).filter((H)=>G3(H.name,p$(H.name))===q&&T6(J,H.name)!==Z)[0];if(Y)return Y.name;return}catch(J){if(!A6(J))m(J);return}}async function Gy(Z){let X=s(),J=g4(X),q=Z;try{let H=await vR(g4(Z));q=T6(H,G3(Z))}catch{}let Q=J===z2?z2:J+z2;if(!q.startsWith(Q)||q.startsWith(X+z2)||q===X)return;let $=a$(J,q),Y=T6(X,$);try{return await n$(Y),Y}catch{return}}function gR(){return!C1("tengu_compact_line_prefix_killswitch",!1)}function Wy({content:Z,startLine:X}){if(!Z)return"";let J=Z.split(/\r?\n/);if(gR())return J.map((q,Q)=>`${Q+X}→${q}`).join(`
14
- `);return J.map((q,Q)=>{let $=String(Q+X);if($.length>=6)return`${$}→${q}`;return`${$.padStart(6," ")}→${q}`}).join(`
15
- `)}function Vy(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function By(Z){try{return k().isDirEmptySync(Z)}catch(X){return A6(X)}}function Ly(Z){let{content:X}=K3.readFile(Z);return X}function I6(Z,X,J={encoding:"utf-8"}){let q=k(),Q=Z;try{let K=q.readlinkSync(Z);Q=CR(K)?K:SR(g4(Z),K),E(`Writing through symlink: ${Z} -> ${Q}`)}catch{}let $=`${Q}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=q.statSync(Q).mode,H=!0,E(`Preserving file permissions: ${Y.toString(8)}`)}catch(K){if(!A6(K))throw K;if(J.mode!==void 0)Y=J.mode,E(`Setting permissions for new file: ${Y.toString(8)}`)}try{E(`Writing to temp file: ${$}`);let K={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)K.mode=J.mode;if(u$($,X,K),E(`Temp file written successfully, size: ${X.length} bytes`),H&&Y!==void 0)PR($,Y),E("Applied original permissions to temp file");E(`Renaming ${$} to ${Q}`),q.renameSync($,Q),E(`File ${Q} written atomically`)}catch(K){E(`Failed to write file atomically: ${K}`,{level:"error"}),c0("tengu_atomic_write_error",{});try{E(`Cleaning up temp file: ${$}`),q.unlinkSync($)}catch(W){E(`Failed to clean up temp file: ${W}`)}E(`Falling back to non-atomic write for ${Q}`);try{let W={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)W.mode=J.mode;u$(Q,X,W),E(`File ${Q} written successfully with non-atomic fallback`)}catch(W){throw E(`Non-atomic write also failed: ${W}`),W}}}function _y(){let Z=v0(),X=i$();if(Z==="macos")return T6(X,"Desktop");if(Z==="windows"){let q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(q){let $=`/mnt/c${q.replace(/^[A-Z]:/,"")}/Desktop`;if(k().existsSync($))return $}try{let $=k().readdirSync("/mnt/c/Users");for(let Y of $){if(Y.name==="Public"||Y.name==="Default"||Y.name==="Default User"||Y.name==="All Users")continue;let H=T6("/mnt/c/Users",Y.name,"Desktop");if(k().existsSync(H))return H}}catch(Q){m(Q)}}let J=T6(X,"Desktop");if(k().existsSync(J))return J;return X}function zy(Z,X=bR){try{return k().statSync(Z).size<=X}catch{return!1}}function d$(Z){let X=yR(Z);if(v0()==="windows")X=X.replace(/\//g,"\\").toLowerCase();return X}function Ry(Z,X){return d$(Z)===d$(X)}var bR=262144,Ky="Note: your current working directory is";var h4=B(()=>{l$();W3();t0();R1();y1();B2();f$();R0();u0();v4();z6()});import{appendFile as fR,mkdir as mR,readFile as uR,writeFile as pR}from"fs/promises";import{homedir as dR}from"os";import{dirname as cR,join as lR}from"path";async function nR(Z,X){let{code:J}=await V3("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:X});return J===0}function iR(){return lR(dR(),".config","git","ignore")}async function s$(Z,X=s()){try{if(!await o$(X))return;let J=`**/${Z}`,q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await nR(q,X))return;let Q=iR(),$=cR(Q);await mR($,{recursive:!0});try{if((await uR(Q,{encoding:"utf-8"})).includes(J))return;await fR(Q,`
16
- ${J}
17
- `)}catch(Y){if(K0(Y)==="ENOENT")await pR(Q,`${J}
18
- `,"utf-8");else throw Y}}catch(J){m(J)}}var r$=B(()=>{t0();y1();f4();R2();u0()});function F2(Z,X=!1){let J=Z.length,q=0,Q="",$=0,Y=16,H=0,K=0,W=0,G=0,V=0;function L(R,w){let A=0,I=0;while(A<R||!w){let T=Z.charCodeAt(q);if(T>=48&&T<=57)I=I*16+T-48;else if(T>=65&&T<=70)I=I*16+T-65+10;else if(T>=97&&T<=102)I=I*16+T-97+10;else break;q++,A++}if(A<R)I=-1;return I}function _(R){q=R,Q="",$=0,Y=16,V=0}function z(){let R=q;if(Z.charCodeAt(q)===48)q++;else{q++;while(q<Z.length&&O6(Z.charCodeAt(q)))q++}if(q<Z.length&&Z.charCodeAt(q)===46)if(q++,q<Z.length&&O6(Z.charCodeAt(q))){q++;while(q<Z.length&&O6(Z.charCodeAt(q)))q++}else return V=3,Z.substring(R,q);let w=q;if(q<Z.length&&(Z.charCodeAt(q)===69||Z.charCodeAt(q)===101)){if(q++,q<Z.length&&Z.charCodeAt(q)===43||Z.charCodeAt(q)===45)q++;if(q<Z.length&&O6(Z.charCodeAt(q))){q++;while(q<Z.length&&O6(Z.charCodeAt(q)))q++;w=q}else V=3}return Z.substring(R,w)}function D(){let R="",w=q;while(!0){if(q>=J){R+=Z.substring(w,q),V=2;break}let A=Z.charCodeAt(q);if(A===34){R+=Z.substring(w,q),q++;break}if(A===92){if(R+=Z.substring(w,q),q++,q>=J){V=2;break}switch(Z.charCodeAt(q++)){case 34:R+='"';break;case 92:R+="\\";break;case 47:R+="/";break;case 98:R+="\b";break;case 102:R+="\f";break;case 110:R+=`
19
- `;break;case 114:R+="\r";break;case 116:R+="\t";break;case 117:let T=L(4,!0);if(T>=0)R+=String.fromCharCode(T);else V=4;break;default:V=5}w=q;continue}if(A>=0&&A<=31)if(M2(A)){R+=Z.substring(w,q),V=2;break}else V=6;q++}return R}function M(){if(Q="",V=0,$=q,K=H,G=W,q>=J)return $=J,Y=17;let R=Z.charCodeAt(q);if(B3(R)){do q++,Q+=String.fromCharCode(R),R=Z.charCodeAt(q);while(B3(R));return Y=15}if(M2(R)){if(q++,Q+=String.fromCharCode(R),R===13&&Z.charCodeAt(q)===10)q++,Q+=`
20
- `;return H++,W=q,Y=14}switch(R){case 123:return q++,Y=1;case 125:return q++,Y=2;case 91:return q++,Y=3;case 93:return q++,Y=4;case 58:return q++,Y=6;case 44:return q++,Y=5;case 34:return q++,Q=D(),Y=10;case 47:let w=q-1;if(Z.charCodeAt(q+1)===47){q+=2;while(q<J){if(M2(Z.charCodeAt(q)))break;q++}return Q=Z.substring(w,q),Y=12}if(Z.charCodeAt(q+1)===42){q+=2;let A=J-1,I=!1;while(q<A){let T=Z.charCodeAt(q);if(T===42&&Z.charCodeAt(q+1)===47){q+=2,I=!0;break}if(q++,M2(T)){if(T===13&&Z.charCodeAt(q)===10)q++;H++,W=q}}if(!I)q++,V=1;return Q=Z.substring(w,q),Y=13}return Q+=String.fromCharCode(R),q++,Y=16;case 45:if(Q+=String.fromCharCode(R),q++,q===J||!O6(Z.charCodeAt(q)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Q+=z(),Y=11;default:while(q<J&&F(R))q++,R=Z.charCodeAt(q);if($!==q){switch(Q=Z.substring($,q),Q){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return Q+=String.fromCharCode(R),q++,Y=16}}function F(R){if(B3(R)||M2(R))return!1;switch(R){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function N(){let R;do R=M();while(R>=12&&R<=15);return R}return{setPosition:_,getPosition:()=>q,scan:X?N:M,getToken:()=>Y,getTokenValue:()=>Q,getTokenOffset:()=>$,getTokenLength:()=>q-$,getTokenStartLine:()=>K,getTokenStartCharacter:()=>$-G,getTokenError:()=>V}}function B3(Z){return Z===32||Z===9}function M2(Z){return Z===10||Z===13}function O6(Z){return Z>=48&&Z<=57}var t$;var m4=B(()=>{(function(Z){Z[Z.lineFeed=10]="lineFeed",Z[Z.carriageReturn=13]="carriageReturn",Z[Z.space=32]="space",Z[Z._0=48]="_0",Z[Z._1=49]="_1",Z[Z._2=50]="_2",Z[Z._3=51]="_3",Z[Z._4=52]="_4",Z[Z._5=53]="_5",Z[Z._6=54]="_6",Z[Z._7=55]="_7",Z[Z._8=56]="_8",Z[Z._9=57]="_9",Z[Z.a=97]="a",Z[Z.b=98]="b",Z[Z.c=99]="c",Z[Z.d=100]="d",Z[Z.e=101]="e",Z[Z.f=102]="f",Z[Z.g=103]="g",Z[Z.h=104]="h",Z[Z.i=105]="i",Z[Z.j=106]="j",Z[Z.k=107]="k",Z[Z.l=108]="l",Z[Z.m=109]="m",Z[Z.n=110]="n",Z[Z.o=111]="o",Z[Z.p=112]="p",Z[Z.q=113]="q",Z[Z.r=114]="r",Z[Z.s=115]="s",Z[Z.t=116]="t",Z[Z.u=117]="u",Z[Z.v=118]="v",Z[Z.w=119]="w",Z[Z.x=120]="x",Z[Z.y=121]="y",Z[Z.z=122]="z",Z[Z.A=65]="A",Z[Z.B=66]="B",Z[Z.C=67]="C",Z[Z.D=68]="D",Z[Z.E=69]="E",Z[Z.F=70]="F",Z[Z.G=71]="G",Z[Z.H=72]="H",Z[Z.I=73]="I",Z[Z.J=74]="J",Z[Z.K=75]="K",Z[Z.L=76]="L",Z[Z.M=77]="M",Z[Z.N=78]="N",Z[Z.O=79]="O",Z[Z.P=80]="P",Z[Z.Q=81]="Q",Z[Z.R=82]="R",Z[Z.S=83]="S",Z[Z.T=84]="T",Z[Z.U=85]="U",Z[Z.V=86]="V",Z[Z.W=87]="W",Z[Z.X=88]="X",Z[Z.Y=89]="Y",Z[Z.Z=90]="Z",Z[Z.asterisk=42]="asterisk",Z[Z.backslash=92]="backslash",Z[Z.closeBrace=125]="closeBrace",Z[Z.closeBracket=93]="closeBracket",Z[Z.colon=58]="colon",Z[Z.comma=44]="comma",Z[Z.dot=46]="dot",Z[Z.doubleQuote=34]="doubleQuote",Z[Z.minus=45]="minus",Z[Z.openBrace=123]="openBrace",Z[Z.openBracket=91]="openBracket",Z[Z.plus=43]="plus",Z[Z.slash=47]="slash",Z[Z.formFeed=12]="formFeed",Z[Z.tab=9]="tab"})(t$||(t$={}))});var M0,L3,e$;var Z9=B(()=>{M0=Array(20).fill(0).map((Z,X)=>{return" ".repeat(X)}),L3={" ":{"\n":Array(200).fill(0).map((Z,X)=>{return`
21
- `+" ".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+" ".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
22
- `+" ".repeat(X)})},"\t":{"\n":Array(200).fill(0).map((Z,X)=>{return`
23
- `+"\t".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+"\t".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
24
- `+"\t".repeat(X)})}},e$=[`
25
- `,"\r",`\r
26
- `]});function _3(Z,X,J){let q,Q,$,Y,H;if(X){Y=X.offset,H=Y+X.length,$=Y;while($>0&&!D2(Z,$-1))$--;let A=H;while(A<Z.length&&!D2(Z,A))A++;Q=Z.substring($,A),q=oR(Q,J)}else Q=Z,q=0,$=0,Y=0,H=Z.length;let K=sR(J,Z),W=e$.includes(K),G=0,V=0,L;if(J.insertSpaces)L=M0[J.tabSize||4]??w6(M0[1],J.tabSize||4);else L="\t";let _=L==="\t"?"\t":" ",z=F2(Q,!1),D=!1;function M(){if(G>1)return w6(K,G)+w6(L,q+V);let A=L.length*(q+V);if(!W||A>L3[_][K].length)return K+w6(L,q+V);if(A<=0)return K;return L3[_][K][A]}function F(){let A=z.scan();G=0;while(A===15||A===14){if(A===14&&J.keepLines)G+=1;else if(A===14)G=1;A=z.scan()}return D=A===16||z.getTokenError()!==0,A}let N=[];function R(A,I,T){if(!D&&(!X||I<H&&T>Y)&&Z.substring(I,T)!==A)N.push({offset:I,length:T-I,content:A})}let w=F();if(J.keepLines&&G>0)R(w6(K,G),0,0);if(w!==17){let A=z.getTokenOffset()+$,I=L.length*q<20&&J.insertSpaces?M0[L.length*q]:w6(L,q);R(I,$,A)}while(w!==17){let A=z.getTokenOffset()+z.getTokenLength()+$,I=F(),T="",b=!1;while(G===0&&(I===12||I===13)){let x=z.getTokenOffset()+$;R(M0[1],A,x),A=z.getTokenOffset()+z.getTokenLength()+$,b=I===12,T=b?M():"",I=F()}if(I===2){if(w!==1)V--;if(J.keepLines&&G>0||!J.keepLines&&w!==1)T=M();else if(J.keepLines)T=M0[1]}else if(I===4){if(w!==3)V--;if(J.keepLines&&G>0||!J.keepLines&&w!==3)T=M();else if(J.keepLines)T=M0[1]}else{switch(w){case 3:case 1:if(V++,J.keepLines&&G>0||!J.keepLines)T=M();else T=M0[1];break;case 5:if(J.keepLines&&G>0||!J.keepLines)T=M();else T=M0[1];break;case 12:T=M();break;case 13:if(G>0)T=M();else if(!b)T=M0[1];break;case 6:if(J.keepLines&&G>0)T=M();else if(!b)T=M0[1];break;case 10:if(J.keepLines&&G>0)T=M();else if(I===6&&!b)T="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(J.keepLines&&G>0)T=M();else if((I===12||I===13)&&!b)T=M0[1];else if(I!==5&&I!==17)D=!0;break;case 16:D=!0;break}if(G>0&&(I===12||I===13))T=M()}if(I===17)if(J.keepLines&&G>0)T=M();else T=J.insertFinalNewline?K:"";let j=z.getTokenOffset()+$;R(T,A,j),w=I}return N}function w6(Z,X){let J="";for(let q=0;q<X;q++)J+=Z;return J}function oR(Z,X){let J=0,q=0,Q=X.tabSize||4;while(J<Z.length){let $=Z.charAt(J);if($===M0[1])q++;else if($==="\t")q+=Q;else break;J++}return Math.floor(q/Q)}function sR(Z,X){for(let J=0;J<X.length;J++){let q=X.charAt(J);if(q==="\r"){if(J+1<X.length&&X.charAt(J+1)===`
27
- `)return`\r
28
- `;return"\r"}else if(q===`
29
- `)return`
30
- `}return Z&&Z.eol||`
31
- `}function D2(Z,X){return`\r
32
- `.indexOf(Z.charAt(X))!==-1}var z3=B(()=>{m4();Z9()});function X9(Z,X=[],J=T2.DEFAULT){let q=null,Q=[],$=[];function Y(K){if(Array.isArray(Q))Q.push(K);else if(q!==null)Q[q]=K}return M3(Z,{onObjectBegin:()=>{let K={};Y(K),$.push(Q),Q=K,q=null},onObjectProperty:(K)=>{q=K},onObjectEnd:()=>{Q=$.pop()},onArrayBegin:()=>{let K=[];Y(K),$.push(Q),Q=K,q=null},onArrayEnd:()=>{Q=$.pop()},onLiteralValue:Y,onError:(K,W,G)=>{X.push({error:K,offset:W,length:G})}},J),Q[0]}function R3(Z,X=[],J=T2.DEFAULT){let q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function Q(K){if(q.type==="property")q.length=K-q.offset,q=q.parent}function $(K){return q.children.push(K),K}M3(Z,{onObjectBegin:(K)=>{q=$({type:"object",offset:K,length:-1,parent:q,children:[]})},onObjectProperty:(K,W,G)=>{q=$({type:"property",offset:W,length:-1,parent:q,children:[]}),q.children.push({type:"string",value:K,offset:W,length:G,parent:q})},onObjectEnd:(K,W)=>{Q(K+W),q.length=K+W-q.offset,q=q.parent,Q(K+W)},onArrayBegin:(K,W)=>{q=$({type:"array",offset:K,length:-1,parent:q,children:[]})},onArrayEnd:(K,W)=>{q.length=K+W-q.offset,q=q.parent,Q(K+W)},onLiteralValue:(K,W,G)=>{$({type:tR(K),offset:W,length:G,parent:q,value:K}),Q(W+G)},onSeparator:(K,W,G)=>{if(q.type==="property"){if(K===":")q.colonOffset=W;else if(K===",")Q(W)}},onError:(K,W,G)=>{X.push({error:K,offset:W,length:G})}},J);let H=q.children[0];if(H)delete H.parent;return H}function u4(Z,X){if(!Z)return;let J=Z;for(let q of X)if(typeof q==="string"){if(J.type!=="object"||!Array.isArray(J.children))return;let Q=!1;for(let $ of J.children)if(Array.isArray($.children)&&$.children[0].value===q&&$.children.length===2){J=$.children[1],Q=!0;break}if(!Q)return}else{let Q=q;if(J.type!=="array"||Q<0||!Array.isArray(J.children)||Q>=J.children.length)return;J=J.children[Q]}return J}function M3(Z,X,J=T2.DEFAULT){let q=F2(Z,!1),Q=[],$=0;function Y(P){return P?()=>$===0&&P(q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter()):()=>!0}function H(P){return P?(C)=>$===0&&P(C,q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter()):()=>!0}function K(P){return P?(C)=>$===0&&P(C,q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter(),()=>Q.slice()):()=>!0}function W(P){return P?()=>{if($>0)$++;else if(P(q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter(),()=>Q.slice())===!1)$=1}:()=>!0}function G(P){return P?()=>{if($>0)$--;if($===0)P(q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter())}:()=>!0}let V=W(X.onObjectBegin),L=K(X.onObjectProperty),_=G(X.onObjectEnd),z=W(X.onArrayBegin),D=G(X.onArrayEnd),M=K(X.onLiteralValue),F=H(X.onSeparator),N=Y(X.onComment),R=H(X.onError),w=J&&J.disallowComments,A=J&&J.allowTrailingComma;function I(){while(!0){let P=q.scan();switch(q.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:if(!w)T(11);break;case 2:T(12);break;case 6:T(16);break}switch(P){case 12:case 13:if(w)T(10);else N();break;case 16:T(1);break;case 15:case 14:break;default:return P}}}function T(P,C=[],p=[]){if(R(P),C.length+p.length>0){let g=q.getToken();while(g!==17){if(C.indexOf(g)!==-1){I();break}else if(p.indexOf(g)!==-1)break;g=I()}}}function b(P){let C=q.getTokenValue();if(P)M(C);else L(C),Q.push(C);return I(),!0}function j(){switch(q.getToken()){case 11:let P=q.getTokenValue(),C=Number(P);if(isNaN(C))T(2),C=0;M(C);break;case 7:M(null);break;case 8:M(!0);break;case 9:M(!1);break;default:return!1}return I(),!0}function x(){if(q.getToken()!==10)return T(3,[],[2,5]),!1;if(b(!1),q.getToken()===6){if(F(":"),I(),!r())T(4,[],[2,5])}else T(5,[],[2,5]);return Q.pop(),!0}function v(){V(),I();let P=!1;while(q.getToken()!==2&&q.getToken()!==17){if(q.getToken()===5){if(!P)T(4,[],[]);if(F(","),I(),q.getToken()===2&&A)break}else if(P)T(6,[],[]);if(!x())T(4,[],[2,5]);P=!0}if(_(),q.getToken()!==2)T(7,[2],[]);else I();return!0}function h(){z(),I();let P=!0,C=!1;while(q.getToken()!==4&&q.getToken()!==17){if(q.getToken()===5){if(!C)T(4,[],[]);if(F(","),I(),q.getToken()===4&&A)break}else if(C)T(6,[],[]);if(P)Q.push(0),P=!1;else Q[Q.length-1]++;if(!r())T(4,[],[4,5]);C=!0}if(D(),!P)Q.pop();if(q.getToken()!==4)T(8,[4],[]);else I();return!0}function r(){switch(q.getToken()){case 3:return h();case 1:return v();case 10:return b(!0);default:return j()}}if(I(),q.getToken()===17){if(J.allowEmptyContent)return!0;return T(4,[],[]),!1}if(!r())return T(4,[],[]),!1;if(q.getToken()!==17)T(9,[],[]);return!0}function tR(Z){switch(typeof Z){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!Z)return"null";else if(Array.isArray(Z))return"array";return"object"}default:return"null"}}var T2;var F3=B(()=>{m4();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(T2||(T2={}))});function J9(Z,X,J,q){let Q=X.slice(),Y=R3(Z,[]),H=void 0,K=void 0;while(Q.length>0)if(K=Q.pop(),H=u4(Y,Q),H===void 0&&J!==void 0)if(typeof K==="string")J={[K]:J};else J=[J];else break;if(!H){if(J===void 0)throw Error("Can not delete in empty document");return S1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(J)},q)}else if(H.type==="object"&&typeof K==="string"&&Array.isArray(H.children)){let W=u4(H,[K]);if(W!==void 0)if(J===void 0){if(!W.parent)throw Error("Malformed AST");let G=H.children.indexOf(W.parent),V,L=W.parent.offset+W.parent.length;if(G>0){let _=H.children[G-1];V=_.offset+_.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return S1(Z,{offset:V,length:L-V,content:""},q)}else return S1(Z,{offset:W.offset,length:W.length,content:JSON.stringify(J)},q);else{if(J===void 0)return[];let G=`${JSON.stringify(K)}: ${JSON.stringify(J)}`,V=q.getInsertionIndex?q.getInsertionIndex(H.children.map((_)=>_.children[0].value)):H.children.length,L;if(V>0){let _=H.children[V-1];L={offset:_.offset+_.length,length:0,content:","+G}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:G};else L={offset:H.offset+1,length:0,content:G+","};return S1(Z,L,q)}}else if(H.type==="array"&&typeof K==="number"&&Array.isArray(H.children)){let W=K;if(W===-1){let G=`${JSON.stringify(J)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:G};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+G}}return S1(Z,V,q)}else if(J===void 0&&H.children.length>=0){let G=K,V=H.children[G],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===G){let _=H.children[G-1],z=_.offset+_.length,D=H.offset+H.length;L={offset:z,length:D-2-z,content:""}}else L={offset:V.offset,length:H.children[G+1].offset-V.offset,content:""};return S1(Z,L,q)}else if(J!==void 0){let G,V=`${JSON.stringify(J)}`;if(!q.isArrayInsertion&&H.children.length>K){let L=H.children[K];G={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||K===0)G={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=K>H.children.length?H.children.length:K,_=H.children[L-1];G={offset:_.offset+_.length,length:0,content:","+V}}return S1(Z,G,q)}else throw Error(`Can not ${J===void 0?"remove":q.isArrayInsertion?"insert":"modify"} Array index ${W} as length is not sufficient`)}else throw Error(`Can not add ${typeof K!=="number"?"index":"property"} to parent of type ${H.type}`)}function S1(Z,X,J){if(!J.formattingOptions)return[X];let q=p4(Z,X),Q=X.offset,$=X.offset+X.content.length;if(X.length===0||X.content.length===0){while(Q>0&&!D2(q,Q-1))Q--;while($<q.length&&!D2(q,$))$++}let Y=_3(q,{offset:Q,length:$-Q},{...J.formattingOptions,keepLines:!1});for(let K=Y.length-1;K>=0;K--){let W=Y[K];q=p4(q,W),Q=Math.min(Q,W.offset),$=Math.max($,W.offset+W.length),$+=W.content.length-W.length}let H=Z.length-(q.length-$)-Q;return[{offset:Q,length:H,content:q.substring(Q,$)}]}function p4(Z,X){return Z.substring(0,X.offset)+X.content+Z.substring(X.offset+X.length)}var q9=B(()=>{z3();F3()});function H9(Z,X,J,q){return J9(Z,X,J,q)}function U9(Z,X){let J=X.slice(0).sort((Q,$)=>{let Y=Q.offset-$.offset;if(Y===0)return Q.length-$.length;return Y}),q=Z.length;for(let Q=J.length-1;Q>=0;Q--){let $=J[Q];if($.offset+$.length<=q)Z=p4(Z,$);else throw Error("Overlapping edit");q=$.offset}return Z}var Q9,$9,D3,Y9;var K9=B(()=>{z3();q9();m4();F3();(function(Z){Z[Z.None=0]="None",Z[Z.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=2]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=4]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=6]="InvalidCharacter"})(Q9||(Q9={}));(function(Z){Z[Z.OpenBraceToken=1]="OpenBraceToken",Z[Z.CloseBraceToken=2]="CloseBraceToken",Z[Z.OpenBracketToken=3]="OpenBracketToken",Z[Z.CloseBracketToken=4]="CloseBracketToken",Z[Z.CommaToken=5]="CommaToken",Z[Z.ColonToken=6]="ColonToken",Z[Z.NullKeyword=7]="NullKeyword",Z[Z.TrueKeyword=8]="TrueKeyword",Z[Z.FalseKeyword=9]="FalseKeyword",Z[Z.StringLiteral=10]="StringLiteral",Z[Z.NumericLiteral=11]="NumericLiteral",Z[Z.LineCommentTrivia=12]="LineCommentTrivia",Z[Z.BlockCommentTrivia=13]="BlockCommentTrivia",Z[Z.LineBreakTrivia=14]="LineBreakTrivia",Z[Z.Trivia=15]="Trivia",Z[Z.Unknown=16]="Unknown",Z[Z.EOF=17]="EOF"})($9||($9={}));D3=X9;(function(Z){Z[Z.InvalidSymbol=1]="InvalidSymbol",Z[Z.InvalidNumberFormat=2]="InvalidNumberFormat",Z[Z.PropertyNameExpected=3]="PropertyNameExpected",Z[Z.ValueExpected=4]="ValueExpected",Z[Z.ColonExpected=5]="ColonExpected",Z[Z.CommaExpected=6]="CommaExpected",Z[Z.CloseBraceExpected=7]="CloseBraceExpected",Z[Z.CloseBracketExpected=8]="CloseBracketExpected",Z[Z.EndOfFileExpected=9]="EndOfFileExpected",Z[Z.InvalidCommentToken=10]="InvalidCommentToken",Z[Z.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=12]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=14]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=16]="InvalidCharacter"})(Y9||(Y9={}))});import{open as XM,readFile as JM,stat as qM}from"fs/promises";function W9(Z,X){try{return{ok:!0,value:JSON.parse(p0(Z))}}catch(J){if(X)m(J);return{ok:!1}}}function ny(Z){if(!Z)return null;try{return D3(p0(Z))}catch(X){return m(X),null}}function $M(Z){let X=V9,J=Z.length,q=X(Z);if(!q.error||q.done||q.read>=J)return q.values;let{values:Q,read:$}=q;while($<J){let Y=typeof Z==="string"?Z.indexOf(`
33
- `,$):Z.indexOf(10,$);if(Y===-1)break;$=Y+1;let H=X(Z,$);if(H.values.length>0)Q=Q.concat(H.values);if(!H.error||H.done||H.read>=J)break;$=H.read}return Q}function YM(Z){let X=Z.length,J=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)J=3;let q=[];while(J<X){let Q=Z.indexOf(10,J);if(Q===-1)Q=X;let $=Z.toString("utf8",J,Q).trim();if(J=Q+1,!$)continue;try{q.push(JSON.parse($))}catch{}}return q}function HM(Z){let X=p0(Z),J=X.length,q=0,Q=[];while(q<J){let $=X.indexOf(`
34
- `,q);if($===-1)$=J;let Y=X.substring(q,$).trim();if(q=$+1,!Y)continue;try{Q.push(JSON.parse(Y))}catch{}}return Q}function T3(Z){if(V9)return $M(Z);if(typeof Z==="string")return HM(Z);return YM(Z)}async function iy(Z){let H=[];try{let{size:X}=await qM(Z);if(X<=A2)return T3(await JM(Z));const J=R6(H,await XM(Z,"r"),1);let q=Buffer.allocUnsafe(A2);let Q=0;let $=X-A2;while(Q<A2){let{bytesRead:L}=await J.read(q,Q,A2-Q,$+Q);if(L===0)break;Q+=L}let Y=q.indexOf(10);if(Y!==-1&&Y<Q-1)return T3(q.subarray(Y+1,Q));return T3(q.subarray(0,Q))}catch(K){var W=K,G=1}finally{var V=M6(H,W,G);V&&await V}}function ay(Z,X){try{if(!Z||Z.trim()==="")return f([X],null,4);let J=p0(Z),q=D3(J);if(Array.isArray(q)){let Q=q.length,H=H9(J,Q===0?[0]:[Q],X,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let K=[...q,X];return f(K,null,4)}return U9(J,H)}else return f([X],null,4)}catch(J){return m(J),f([X],null,4)}}var QM=8192,G9,C0,V9,A2=104857600;var d4=B(()=>{K9();S4();u0();P4();L0();G9=z1(W9,(Z)=>Z,50),C0=Object.assign(function(X,J=!0){if(!X)return null;let q=X.length>QM?W9(X,J):G9(X,J);return q.ok?q.value:null},{cache:G9.cache});V9=(()=>{if(typeof Bun>"u")return!1;let X=Bun.JSONL;if(!X?.parseChunk)return!1;return X.parseChunk})()});function ey(Z){switch(Z){case"userSettings":return"user";case"projectSettings":return"project";case"localSettings":return"project, gitignored";case"flagSettings":return"cli flag";case"policySettings":return"managed"}}function ZS(Z){switch(Z){case"userSettings":return"User";case"projectSettings":return"Project";case"localSettings":return"Local";case"flagSettings":return"Flag";case"policySettings":return"Managed";case"plugin":return"Plugin";case"built-in":return"Built-in"}}function XS(Z){switch(Z){case"userSettings":return"user settings";case"projectSettings":return"shared project settings";case"localSettings":return"project local settings";case"flagSettings":return"command line arguments";case"policySettings":return"enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"command configuration";case"session":return"current session"}}function JS(Z){switch(Z){case"userSettings":return"User settings";case"projectSettings":return"Shared project settings";case"localSettings":return"Project local settings";case"flagSettings":return"Command line arguments";case"policySettings":return"Enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"Command configuration";case"session":return"Current session"}}function qS(Z){if(Z==="")return[];let X=Z.split(",").map((q)=>q.trim()),J=[];for(let q of X)switch(q){case"user":J.push("userSettings");break;case"project":J.push("projectSettings");break;case"local":J.push("localSettings");break;default:throw Error(`Invalid setting source: ${q}. Valid options are: user, project, local`)}return J}function I2(){let Z=B9(),X=new Set(Z);return X.add("policySettings"),X.add("flagSettings"),Array.from(X)}function QS(Z){return I2().includes(Z)}var ty,$S,L9="https://json.schemastore.org/claude-code-settings.json";var A3=B(()=>{j6();ty=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];$S=["localSettings","projectSettings","userSettings"]});function _9(Z){c4.set(Z,Date.now())}function HS(Z,X){let J=c4.get(Z);if(J!==void 0&&Date.now()-J<X)return c4.delete(Z),!0;return!1}function US(){c4.clear()}var c4;var z9=B(()=>{c4=new Map});import{join as UM}from"path";var F1,O2;var l4=B(()=>{L1();z6();F1=u(function(){switch(v0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),O2=u(function(){return UM(F1(),"managed-settings.d")})});var KM,GM,R9;var M9=B(()=>{l0();b1();KM=O(()=>U.object({allowedDomains:U.array(U.string()).optional(),allowManagedDomainsOnly:U.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),allowUnixSockets:U.array(U.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:U.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:U.boolean().optional(),httpProxyPort:U.number().optional(),socksProxyPort:U.number().optional()}).optional()),GM=O(()=>U.object({allowWrite:U.array(U.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:U.array(U.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:U.array(U.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:U.array(U.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:U.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),R9=O(()=>U.object({enabled:U.boolean().optional(),failIfUnavailable:U.boolean().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate."),autoAllowBashIfSandboxed:U.boolean().optional(),allowUnsandboxedCommands:U.boolean().optional().describe("Allow trusted, user-initiated commands to run outside the sandbox. When false, sandbox override requests are ignored and all commands must run sandboxed. Default: true."),network:KM(),filesystem:GM(),ignoreViolations:U.record(U.string(),U.array(U.string())).optional(),enableWeakerNestedSandbox:U.boolean().optional(),enableWeakerNetworkIsolation:U.boolean().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. "+"**Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false"),excludedCommands:U.array(U.string()).optional(),ripgrep:U.object({command:U.string(),args:U.array(U.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});function F9(){return process.versions.bun!==void 0}function RS(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var D9=()=>{};function t(Z){if(typeof Z!=="object"||Z===null)return!1;let X=Object.getPrototypeOf(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var X1=()=>{};import{fileURLToPath as WM}from"node:url";var N6=(Z,X)=>{let J=O3(VM(Z));if(typeof J!=="string")throw TypeError(`${X} must be a string or a file URL: ${J}.`);return J},VM=(Z)=>I3(Z)?Z.toString():Z,I3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,O3=(Z)=>Z instanceof URL?WM(Z):Z;var k6=()=>{};var n4=(Z,X=[],J={})=>{let q=N6(Z,"First argument"),[Q,$]=t(X)?[[],X]:[X,J];if(!Array.isArray(Q))throw TypeError(`Second argument must be either an array of arguments or an options object: ${Q}`);if(Q.some((K)=>typeof K==="object"&&K!==null))throw TypeError(`Second argument must be an array of strings: ${Q}`);let Y=Q.map(String),H=Y.find((K)=>K.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!t($))throw TypeError(`Last argument must be an options object: ${$}`);return[q,Y,$]};var w3=B(()=>{X1();k6()});import{StringDecoder as BM}from"node:string_decoder";var T9,A9=(Z)=>T9.call(Z)==="[object ArrayBuffer]",X0=(Z)=>T9.call(Z)==="[object Uint8Array]",J1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),LM,I9=(Z)=>LM.encode(Z),_M,i4=(Z)=>_M.decode(Z),O9=(Z,X)=>{return zM(Z,X).join("")},zM=(Z,X)=>{if(X==="utf8"&&Z.every(($)=>typeof $==="string"))return Z;let J=new BM(X),q=Z.map(($)=>typeof $==="string"?I9($):$).map(($)=>J.write($)),Q=J.end();return Q===""?q:[...q,Q]},w2=(Z)=>{if(Z.length===1&&X0(Z[0]))return Z[0];return j3(RM(Z))},RM=(Z)=>Z.map((X)=>typeof X==="string"?I9(X):X),j3=(Z)=>{let X=new Uint8Array(MM(Z)),J=0;for(let q of Z)X.set(q,J),J+=q.length;return X},MM=(Z)=>{let X=0;for(let J of Z)X+=J.length;return X};var F0=B(()=>{({toString:T9}=Object.prototype),LM=new TextEncoder,_M=new TextDecoder});import{ChildProcess as FM}from"node:child_process";var k9=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),x9=(Z,X)=>{let J=[];for(let[$,Y]of Z.entries())J=DM({templates:Z,expressions:X,tokens:J,index:$,template:Y});if(J.length===0)throw TypeError("Template script must not be empty");let[q,...Q]=J;return[q,Q,{}]},DM=({templates:Z,expressions:X,tokens:J,index:q,template:Q})=>{if(Q===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[q]}`);let{nextTokens:$,leadingWhitespaces:Y,trailingWhitespaces:H}=TM(Q,Z.raw[q]),K=j9(J,$,Y);if(q===X.length)return K;let W=X[q],G=Array.isArray(W)?W.map((V)=>N9(V)):[N9(W)];return j9(K,G,H)},TM=(Z,X)=>{if(X.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let J=[],q=0,Q=w9.has(X[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let K=X[H];if(w9.has(K)){if(q!==Y)J.push(Z.slice(q,Y));q=Y+1}else if(K==="\\"){let W=X[H+1];if(W===`
35
- `)Y-=1,H+=1;else if(W==="u"&&X[H+2]==="{")H=X.indexOf("}",H+3);else H+=AM[W]??1}}let $=q===Z.length;if(!$)J.push(Z.slice(q));return{nextTokens:J,leadingWhitespaces:Q,trailingWhitespaces:$}},w9,AM,j9=(Z,X,J)=>J||Z.length===0||X.length===0?[...Z,...X]:[...Z.slice(0,-1),`${Z.at(-1)}${X[0]}`,...X.slice(1)],N9=(Z)=>{let X=typeof Z;if(X==="string")return Z;if(X==="number")return String(Z);if(t(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return IM(Z);if(Z instanceof FM||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${X}" in template expression`)},IM=({stdout:Z})=>{if(typeof Z==="string")return Z;if(X0(Z))return i4(Z);if(Z===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof Z}" stdout in template expression`)};var E9=B(()=>{X1();F0();w9=new Set([" ","\t","\r",`
36
- `]),AM={x:3,u:5}});import N3 from"node:process";var y0=(Z)=>a4.includes(Z),a4,w0,o4=(Z)=>w0[Z]??`stdio[${Z}]`;var q1=B(()=>{a4=[N3.stdin,N3.stdout,N3.stderr],w0=["stdin","stdout","stderr"]});import{debuglog as OM}from"node:util";var v9=(Z)=>{let X={...Z};for(let J of E3)X[J]=k3(Z,J);return X},k3=(Z,X)=>{let J=Array.from({length:wM(Z)+1}),q=jM(Z[X],J,X);return PM(q,X)},wM=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,w0.length):w0.length,jM=(Z,X,J)=>t(Z)?NM(Z,X,J):X.fill(Z),NM=(Z,X,J)=>{for(let q of Object.keys(Z).sort(kM))for(let Q of xM(q,J,X))X[Q]=Z[q];return X},kM=(Z,X)=>P9(Z)<P9(X)?1:-1,P9=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},xM=(Z,X,J)=>{if(Z==="ipc")return[J.length-1];let q=x3(Z);if(q===void 0||q===0)throw TypeError(`"${X}.${Z}" is invalid.
37
- It must be "${X}.stdout", "${X}.stderr", "${X}.all", "${X}.ipc", or "${X}.fd3", "${X}.fd4" (and so on).`);if(q>=J.length)throw TypeError(`"${X}.${Z}" is invalid: that file descriptor does not exist.
38
- Please set the "stdio" option to ensure that file descriptor exists.`);return q==="all"?[1,2]:[q]},x3=(Z)=>{if(Z==="all")return Z;if(w0.includes(Z))return w0.indexOf(Z);let X=EM.exec(Z);if(X!==null)return Number(X[1])},EM,PM=(Z,X)=>Z.map((J)=>J===void 0?CM[X]:J),vM,CM,E3,Q1=(Z,X)=>X==="ipc"?Z.at(-1):Z[X];var $1=B(()=>{X1();q1();EM=/^fd(\d+)$/,vM=OM("execa").enabled?"full":"none",CM={lines:!1,buffer:!0,maxBuffer:1e8,verbose:vM,stripFinalNewline:!0},E3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var x6=({verbose:Z},X)=>P3(Z,X)!=="none",E6=({verbose:Z},X)=>!["none","short"].includes(P3(Z,X)),C9=({verbose:Z},X)=>{let J=P3(Z,X);return s4(J)?J:void 0},P3=(Z,X)=>X===void 0?yM(Z):Q1(Z,X),yM=(Z)=>Z.find((X)=>s4(X))??r4.findLast((X)=>Z.includes(X)),s4=(Z)=>typeof Z==="function",r4;var D1=B(()=>{$1();r4=["none","short","full"]});import{platform as SM}from"node:process";import{stripVTControlCharacters as bM}from"node:util";var y9=(Z,X)=>{let J=[Z,...X],q=J.join(" "),Q=J.map(($)=>pM(S9($))).join(" ");return{command:q,escapedCommand:Q}},j2=(Z)=>bM(Z).split(`
39
- `).map((X)=>S9(X)).join(`
40
- `),S9=(Z)=>Z.replaceAll(fM,(X)=>hM(X)),hM=(Z)=>{let X=mM[Z];if(X!==void 0)return X;let J=Z.codePointAt(0),q=J.toString(16);return J<=uM?`\\u${q.padStart(4,"0")}`:`\\U${q}`},gM=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},fM,mM,uM=65535,pM=(Z)=>{if(dM.test(Z))return Z;return SM==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},dM;var t4=B(()=>{fM=gM(),mM={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},dM=/^[\w./-]+$/});import b9 from"node:process";function v3(){let{env:Z}=b9,{TERM:X,TERM_PROGRAM:J}=Z;if(b9.platform!=="win32")return X!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||J==="Terminus-Sublime"||J==="vscode"||X==="xterm-256color"||X==="alacritty"||X==="rxvt-unicode"||X==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var h9=()=>{};var g9,f9,cM,lM,nM,iM,aM,e4,lS;var m9=B(()=>{h9();g9={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},f9={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},cM={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},lM={...g9,...f9},nM={...g9,...cM},iM=v3(),aM=iM?lM:nM,e4=aM,lS=Object.entries(f9)});import oM from"node:tty";var sM,y=(Z,X)=>{if(!sM)return(Q)=>Q;let J=`\x1B[${Z}m`,q=`\x1B[${X}m`;return(Q)=>{let $=Q+"",Y=$.indexOf(q);if(Y===-1)return J+$+q;let H=J,K=0,G=(X===22?q:"")+J;while(Y!==-1)H+=$.slice(K,Y)+G,K=Y+q.length,Y=$.indexOf(q,K);return H+=$.slice(K)+q,H}},aS,u9,oS,sS,rS,tS,eS,Zb,Xb,Jb,qb,Qb,$b,Yb,Hb,Ub,Kb,Z8,Gb,Wb,Vb,Bb,Lb,_b,zb,Rb,Mb,p9,Fb,d9,Db,Tb,Ab,Ib,Ob,wb,jb,Nb,kb,xb,Eb;var c9=B(()=>{sM=oM?.WriteStream?.prototype?.hasColors?.()??!1,aS=y(0,0),u9=y(1,22),oS=y(2,22),sS=y(3,23),rS=y(4,24),tS=y(53,55),eS=y(7,27),Zb=y(8,28),Xb=y(9,29),Jb=y(30,39),qb=y(31,39),Qb=y(32,39),$b=y(33,39),Yb=y(34,39),Hb=y(35,39),Ub=y(36,39),Kb=y(37,39),Z8=y(90,39),Gb=y(40,49),Wb=y(41,49),Vb=y(42,49),Bb=y(43,49),Lb=y(44,49),_b=y(45,49),zb=y(46,49),Rb=y(47,49),Mb=y(100,49),p9=y(91,39),Fb=y(92,39),d9=y(93,39),Db=y(94,39),Tb=y(95,39),Ab=y(96,39),Ib=y(97,39),Ob=y(101,49),wb=y(102,49),jb=y(103,49),Nb=y(104,49),kb=y(105,49),xb=y(106,49),Eb=y(107,49)});var l9=B(()=>{c9()});var a9=({type:Z,message:X,timestamp:J,piped:q,commandId:Q,result:{failed:$=!1}={},options:{reject:Y=!0}})=>{let H=rM(J),K=tM[Z]({failed:$,reject:Y,piped:q}),W=eM[Z]({reject:Y});return`${Z8(`[${H}]`)} ${Z8(`[${Q}]`)} ${W(K)} ${W(X)}`},rM=(Z)=>`${X8(Z.getHours(),2)}:${X8(Z.getMinutes(),2)}:${X8(Z.getSeconds(),2)}.${X8(Z.getMilliseconds(),3)}`,X8=(Z,X)=>String(Z).padStart(X,"0"),n9=({failed:Z,reject:X})=>{if(!Z)return e4.tick;return X?e4.cross:e4.warning},tM,i9=(Z)=>Z,eM;var o9=B(()=>{m9();l9();tM={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:n9,duration:n9},eM={command:()=>u9,output:()=>i9,ipc:()=>i9,error:({reject:Z})=>Z?p9:d9,duration:()=>Z8}});var s9=(Z,X,J)=>{let q=C9(X,J);return Z.map(({verboseLine:Q,verboseObject:$})=>ZF(Q,$,q)).filter((Q)=>Q!==void 0).map((Q)=>XF(Q)).join("")},ZF=(Z,X,J)=>{if(J===void 0)return Z;let q=J(Z,X);if(typeof q==="string")return q},XF=(Z)=>Z.endsWith(`
41
- `)?Z:`${Z}
42
- `;var r9=B(()=>{D1()});import{inspect as JF}from"node:util";var n0=({type:Z,verboseMessage:X,fdNumber:J,verboseInfo:q,result:Q})=>{let $=qF({type:Z,result:Q,verboseInfo:q}),Y=QF(X,$),H=s9(Y,q,J);if(H!=="")console.warn(H.slice(0,-1))},qF=({type:Z,result:X,verboseInfo:{escapedCommand:J,commandId:q,rawOptions:{piped:Q=!1,...$}}})=>({type:Z,escapedCommand:J,commandId:`${q}`,timestamp:new Date,piped:Q,result:X,options:$}),QF=(Z,X)=>Z.split(`
43
- `).map((J)=>$F({...X,message:J})),$F=(Z)=>{return{verboseLine:a9(Z),verboseObject:Z}},J8=(Z)=>{let X=typeof Z==="string"?Z:JF(Z);return j2(X).replaceAll("\t"," ".repeat(YF))},YF=2;var P6=B(()=>{t4();o9();r9()});var t9=(Z,X)=>{if(!x6(X))return;n0({type:"command",verboseMessage:Z,verboseInfo:X})};var e9=B(()=>{D1();P6()});var ZY=(Z,X,J)=>{KF(Z);let q=HF(Z);return{verbose:Z,escapedCommand:X,commandId:q,rawOptions:J}},HF=(Z)=>x6({verbose:Z})?UF++:void 0,UF=0n,KF=(Z)=>{for(let X of Z){if(X===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(X===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!r4.includes(X)&&!s4(X)){let J=r4.map((q)=>`'${q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${X}. Allowed values are: ${J} or a function.`)}}};var XY=B(()=>{D1()});import{hrtime as JY}from"node:process";var q8=()=>JY.bigint(),C3=(Z)=>Number(JY.bigint()-Z)/1e6;var Q8=()=>{};var $8=(Z,X,J)=>{let q=q8(),{command:Q,escapedCommand:$}=y9(Z,X),Y=k3(J,"verbose"),H=ZY(Y,$,{...J});return t9($,H),{command:Q,escapedCommand:$,startTime:q,verboseInfo:H}};var y3=B(()=>{e9();XY();Q8();t4();$1()});function Y8(Z={}){let{env:X=process.env,platform:J=process.platform}=Z;if(J!=="win32")return"PATH";return Object.keys(X).reverse().find((q)=>q.toUpperCase()==="PATH")||"Path"}var qY=()=>{};var QY=()=>{};import{promisify as GF}from"node:util";import{execFile as WF,execFileSync as Uh}from"node:child_process";import $Y from"node:path";import{fileURLToPath as VF}from"node:url";function H8(Z){return Z instanceof URL?VF(Z):Z}function YY(Z){return{*[Symbol.iterator](){let X=$Y.resolve(H8(Z)),J;while(J!==X)yield X,J=X,X=$Y.resolve(X,"..")}}}var Wh;var HY=B(()=>{QY();Wh=GF(WF)});import U8 from"node:process";import h1 from"node:path";var BF=({cwd:Z=U8.cwd(),path:X=U8.env[Y8()],preferLocal:J=!0,execPath:q=U8.execPath,addExecPath:Q=!0}={})=>{let $=h1.resolve(H8(Z)),Y=[],H=X.split(h1.delimiter);if(J)LF(Y,H,$);if(Q)_F(Y,H,q,$);return X===""||X===h1.delimiter?`${Y.join(h1.delimiter)}${X}`:[...Y,X].join(h1.delimiter)},LF=(Z,X,J)=>{for(let q of YY(J)){let Q=h1.join(q,"node_modules/.bin");if(!X.includes(Q))Z.push(Q)}},_F=(Z,X,J,q)=>{let Q=h1.resolve(q,H8(J),"..");if(!X.includes(Q))Z.push(Q)},UY=({env:Z=U8.env,...X}={})=>{Z={...Z};let J=Y8({env:Z});return X.path=Z[J],Z[J]=BF(X),Z};var KY=B(()=>{qY();HY()});var GY=(Z,X,J)=>{let q=J?G8:K8,Q=Z instanceof i0?{}:{cause:Z};return new q(X,Q)},i0,WY=(Z,X)=>{Object.defineProperty(Z.prototype,"name",{value:X,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,BY,{value:!0,writable:!1,enumerable:!1,configurable:!1})},VY=(Z)=>W8(Z)&&(BY in Z),BY,W8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",K8,G8;var g1=B(()=>{i0=class i0 extends Error{};BY=Symbol("isExecaError");K8=class K8 extends Error{};WY(K8,K8.name);G8=class G8 extends Error{};WY(G8,G8.name)});var LY=()=>{let Z=S3-_Y+1;return Array.from({length:Z},zF)},zF=(Z,X)=>({name:`SIGRT${X+1}`,number:_Y+X,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),_Y=34,S3=64;var b3=()=>{};var zY;var RY=B(()=>{zY=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]});import{constants as RF}from"node:os";var h3=()=>{let Z=LY();return[...zY,...Z].map(MF)},MF=({name:Z,number:X,description:J,action:q,forced:Q=!1,standard:$})=>{let{signals:{[Z]:Y}}=RF,H=Y!==void 0;return{name:Z,number:H?Y:X,description:J,supported:H,action:q,forced:Q,standard:$}};var MY=B(()=>{RY();b3()});import{constants as FF}from"node:os";var DF=()=>{let Z=h3();return Object.fromEntries(Z.map(TF))},TF=({name:Z,number:X,description:J,supported:q,action:Q,forced:$,standard:Y})=>[Z,{name:Z,number:X,description:J,supported:q,action:Q,forced:$,standard:Y}],FY,AF=()=>{let Z=h3(),X=S3+1,J=Array.from({length:X},(q,Q)=>IF(Q,Z));return Object.assign({},...J)},IF=(Z,X)=>{let J=OF(Z,X);if(J===void 0)return{};let{name:q,description:Q,supported:$,action:Y,forced:H,standard:K}=J;return{[Z]:{name:q,number:Z,description:Q,supported:$,action:Y,forced:H,standard:K}}},OF=(Z,X)=>{let J=X.find(({name:q})=>FF.signals[q]===Z);if(J!==void 0)return J;return X.find((q)=>q.number===Z)},xh;var DY=B(()=>{b3();MY();FY=DF(),xh=AF()});import{constants as N2}from"node:os";var AY=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return OY(Z,"option `killSignal`")},IY=(Z)=>Z===0?Z:OY(Z,"`subprocess.kill()`'s argument"),OY=(Z,X)=>{if(Number.isInteger(Z))return wF(Z,X);if(typeof Z==="string")return NF(Z,X);throw TypeError(`Invalid ${X} ${String(Z)}: it must be a string or an integer.
44
- ${g3()}`)},wF=(Z,X)=>{if(TY.has(Z))return TY.get(Z);throw TypeError(`Invalid ${X} ${Z}: this signal integer does not exist.
45
- ${g3()}`)},jF=()=>new Map(Object.entries(N2.signals).reverse().map(([Z,X])=>[X,Z])),TY,NF=(Z,X)=>{if(Z in N2.signals)return Z;if(Z.toUpperCase()in N2.signals)throw TypeError(`Invalid ${X} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${X} '${Z}': this signal name does not exist.
46
- ${g3()}`)},g3=()=>`Available signal names: ${kF()}.
47
- Available signal numbers: ${xF()}.`,kF=()=>Object.keys(N2.signals).sort().map((Z)=>`'${Z}'`).join(", "),xF=()=>[...new Set(Object.values(N2.signals).sort((Z,X)=>Z-X))].join(", "),V8=(Z)=>FY[Z].description;var k2=B(()=>{DY();TY=jF()});import{setTimeout as EF}from"node:timers/promises";var wY=(Z)=>{if(Z===!1)return Z;if(Z===!0)return PF;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},PF=5000,jY=({kill:Z,options:{forceKillAfterDelay:X,killSignal:J},onInternalError:q,context:Q,controller:$},Y,H)=>{let{signal:K,error:W}=vF(Y,H,J);CF(W,q);let G=Z(K);return yF({kill:Z,signal:K,forceKillAfterDelay:X,killSignal:J,killResult:G,context:Q,controller:$}),G},vF=(Z,X,J)=>{let[q=J,Q]=W8(Z)?[void 0,Z]:[Z,X];if(typeof q!=="string"&&!Number.isInteger(q))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(q)}`);if(Q!==void 0&&!W8(Q))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${Q}`);return{signal:IY(q),error:Q}},CF=(Z,X)=>{if(Z!==void 0)X.reject(Z)},yF=async({kill:Z,signal:X,forceKillAfterDelay:J,killSignal:q,killResult:Q,context:$,controller:Y})=>{if(X===q&&Q)f3({kill:Z,forceKillAfterDelay:J,context:$,controllerSignal:Y.signal})},f3=async({kill:Z,forceKillAfterDelay:X,context:J,controllerSignal:q})=>{if(X===!1)return;try{if(await EF(X,void 0,{signal:q}),Z("SIGKILL"))J.isForcefullyTerminated??=!0}catch{}};var B8=B(()=>{g1();k2()});import{once as SF}from"node:events";var L8=async(Z,X)=>{if(!Z.aborted)await SF(Z,"abort",{signal:X})};var m3=()=>{};var NY=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},kY=({subprocess:Z,cancelSignal:X,gracefulCancel:J,context:q,controller:Q})=>X===void 0||J?[]:[bF(Z,X,q,Q)],bF=async(Z,X,J,{signal:q})=>{throw await L8(X,q),J.terminationReason??="cancel",Z.kill(),X.reason};var u3=B(()=>{m3()});var v6=({methodName:Z,isSubprocess:X,ipc:J,isConnected:q})=>{hF(Z,X,J),p3(Z,X,q)},hF=(Z,X,J)=>{if(!J)throw Error(`${S0(Z,X)} can only be used if the \`ipc\` option is \`true\`.`)},p3=(Z,X,J)=>{if(!J)throw Error(`${S0(Z,X)} cannot be used: the ${T1(X)} has already exited or disconnected.`)},xY=(Z)=>{throw Error(`${S0("getOneMessage",Z)} could not complete: the ${T1(Z)} exited or disconnected.`)},EY=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${T1(Z)} is sending a message too, instead of listening to incoming messages.
48
- This can be fixed by both sending a message and listening to incoming messages at the same time:
49
-
50
- const [receivedMessage] = await Promise.all([
51
- ${S0("getOneMessage",Z)},
52
- ${S0("sendMessage",Z,"message, {strict: true}")},
53
- ]);`)},_8=(Z,X)=>Error(`${S0("sendMessage",X)} failed when sending an acknowledgment response to the ${T1(X)}.`,{cause:Z}),PY=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${T1(Z)} is not listening to incoming messages.`)},vY=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${T1(Z)} exited without listening to incoming messages.`)},CY=()=>Error(`\`cancelSignal\` aborted: the ${T1(!0)} disconnected.`),yY=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},SY=({error:Z,methodName:X,isSubprocess:J})=>{if(Z.code==="EPIPE")throw Error(`${S0(X,J)} cannot be used: the ${T1(J)} is disconnecting.`,{cause:Z})},bY=({error:Z,methodName:X,isSubprocess:J,message:q})=>{if(gF(Z))throw Error(`${S0(X,J)}'s argument type is invalid: the message cannot be serialized: ${String(q)}.`,{cause:Z})},gF=({code:Z,message:X})=>fF.has(Z)||mF.some((J)=>X.includes(J)),fF,mF,S0=(Z,X,J="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${uF(X)}${Z}(${J})`,uF=(Z)=>Z?"":"subprocess.",T1=(Z)=>Z?"parent process":"subprocess",C6=(Z)=>{if(Z.connected)Z.disconnect()};var y6=B(()=>{fF=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),mF=["could not be cloned","circular structure","call stack size exceeded"]});var a0=()=>{let Z={},X=new Promise((J,q)=>{Object.assign(Z,{resolve:J,reject:q})});return Object.assign(X,Z)};var S6=()=>{};var R8=(Z,X="stdin")=>{let{options:q,fileDescriptors:Q}=o0.get(Z),$=hY(Q,X,!0),Y=Z.stdio[$];if(Y===null)throw TypeError(gY($,X,q,!0));return Y},b6=(Z,X="stdout")=>{let{options:q,fileDescriptors:Q}=o0.get(Z),$=hY(Q,X,!1),Y=$==="all"?Z.all:Z.stdio[$];if(Y===null||Y===void 0)throw TypeError(gY($,X,q,!1));return Y},o0,hY=(Z,X,J)=>{let q=pF(X,J);return dF(q,X,J,Z),q},pF=(Z,X)=>{let J=x3(Z);if(J!==void 0)return J;let{validOptions:q,defaultValue:Q}=X?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${x2(X)}" must not be "${Z}".
54
- It must be ${q} or "fd3", "fd4" (and so on).
55
- It is optional and defaults to "${Q}".`)},dF=(Z,X,J,q)=>{let Q=q[fY(Z)];if(Q===void 0)throw TypeError(`"${x2(J)}" must not be ${X}. That file descriptor does not exist.
56
- Please set the "stdio" option to ensure that file descriptor exists.`);if(Q.direction==="input"&&!J)throw TypeError(`"${x2(J)}" must not be ${X}. It must be a readable stream, not writable.`);if(Q.direction!=="input"&&J)throw TypeError(`"${x2(J)}" must not be ${X}. It must be a writable stream, not readable.`)},gY=(Z,X,J,q)=>{if(Z==="all"&&!J.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:Q,optionValue:$}=cF(Z,J);return`The "${Q}: ${z8($)}" option is incompatible with using "${x2(q)}: ${z8(X)}".
57
- Please set this option with "pipe" instead.`},cF=(Z,{stdin:X,stdout:J,stderr:q,stdio:Q})=>{let $=fY(Z);if($===0&&X!==void 0)return{optionName:"stdin",optionValue:X};if($===1&&J!==void 0)return{optionName:"stdout",optionValue:J};if($===2&&q!==void 0)return{optionName:"stderr",optionValue:q};return{optionName:`stdio[${$}]`,optionValue:Q[$]}},fY=(Z)=>Z==="all"?1:Z,x2=(Z)=>Z?"to":"from",z8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var A1=B(()=>{$1();o0=new WeakMap});import{addAbortListener as lF}from"node:events";var f1=(Z,X,J)=>{let q=Z.getMaxListeners();if(q===0||q===Number.POSITIVE_INFINITY)return;Z.setMaxListeners(q+X),lF(J,()=>{Z.setMaxListeners(Z.getMaxListeners()-X)})};var M8=()=>{};var F8=(Z,X)=>{if(X)d3(Z)},d3=(Z)=>{Z.refCounted()},D8=(Z,X)=>{if(X)c3(Z)},c3=(Z)=>{Z.unrefCounted()},mY=(Z,X)=>{if(X)c3(Z),c3(Z)},uY=(Z,X)=>{if(X)d3(Z),d3(Z)};var E2=()=>{};import{once as nF}from"node:events";import{scheduler as iF}from"node:timers/promises";var pY=async({anyProcess:Z,channel:X,isSubprocess:J,ipcEmitter:q},Q)=>{if(nY(Q)||aY(Q))return;if(!T8.has(Z))T8.set(Z,[]);let $=T8.get(Z);if($.push(Q),$.length>1)return;while($.length>0){await iY(Z,q,Q),await iF.yield();let Y=await lY({wrappedMessage:$[0],anyProcess:Z,channel:X,isSubprocess:J,ipcEmitter:q});$.shift(),q.emit("message",Y),q.emit("message:done")}},dY=async({anyProcess:Z,channel:X,isSubprocess:J,ipcEmitter:q,boundOnMessage:Q})=>{l3();let $=T8.get(Z);while($?.length>0)await nF(q,"message:done");Z.removeListener("message",Q),uY(X,J),q.connected=!1,q.emit("disconnect")},T8;var cY=B(()=>{I8();E2();A8();O8();T8=new WeakMap});import{EventEmitter as aF}from"node:events";var I1=(Z,X,J)=>{if(w8.has(Z))return w8.get(Z);let q=new aF;return q.connected=!0,w8.set(Z,q),oF({ipcEmitter:q,anyProcess:Z,channel:X,isSubprocess:J}),q},w8,oF=({ipcEmitter:Z,anyProcess:X,channel:J,isSubprocess:q})=>{let Q=pY.bind(void 0,{anyProcess:X,channel:J,isSubprocess:q,ipcEmitter:Z});X.on("message",Q),X.once("disconnect",dY.bind(void 0,{anyProcess:X,channel:J,isSubprocess:q,ipcEmitter:Z,boundOnMessage:Q})),mY(J,q)},j8=(Z)=>{let X=w8.get(Z);return X===void 0?Z.channel!==null:X.connected};var P2=B(()=>{cY();E2();w8=new WeakMap});import{once as sF}from"node:events";var oY=({anyProcess:Z,channel:X,isSubprocess:J,message:q,strict:Q})=>{if(!Q)return q;let $=I1(Z,X,J),Y=x8(Z,$);return{id:rF++,type:k8,message:q,hasListeners:Y}},rF=0n,sY=(Z,X)=>{if(X?.type!==k8||X.hasListeners)return;for(let{id:J}of Z)if(J!==void 0)N8[J].resolve({isDeadlock:!0,hasListeners:!1})},lY=async({wrappedMessage:Z,anyProcess:X,channel:J,isSubprocess:q,ipcEmitter:Q})=>{if(Z?.type!==k8||!X.connected)return Z;let{id:$,message:Y}=Z,H={id:$,type:tY,message:x8(X,Q)};try{await E8({anyProcess:X,channel:J,isSubprocess:q,ipc:!0},H)}catch(K){Q.emit("strict:error",K)}return Y},nY=(Z)=>{if(Z?.type!==tY)return!1;let{id:X,message:J}=Z;return N8[X]?.resolve({isDeadlock:!1,hasListeners:J}),!0},rY=async(Z,X,J)=>{if(Z?.type!==k8)return;let q=a0();N8[Z.id]=q;let Q=new AbortController;try{let{isDeadlock:$,hasListeners:Y}=await Promise.race([q,tF(X,J,Q)]);if($)EY(J);if(!Y)PY(J)}finally{Q.abort(),delete N8[Z.id]}},N8,tF=async(Z,X,{signal:J})=>{f1(Z,1,J),await sF(Z,"disconnect",{signal:J}),vY(X)},k8="execa:ipc:request",tY="execa:ipc:response";var A8=B(()=>{S6();M8();P8();y6();P2();I8();N8={}});var eY=(Z,X,J)=>{if(!v2.has(Z))v2.set(Z,new Set);let q=v2.get(Z),Q=a0(),$=J?X.id:void 0,Y={onMessageSent:Q,id:$};return q.add(Y),{outgoingMessages:q,outgoingMessage:Y}},ZH=({outgoingMessages:Z,outgoingMessage:X})=>{Z.delete(X),X.onMessageSent.resolve()},iY=async(Z,X,J)=>{while(!x8(Z,X)&&v2.get(Z)?.size>0){let q=[...v2.get(Z)];sY(q,J),await Promise.all(q.map(({onMessageSent:Q})=>Q))}},v2,x8=(Z,X)=>X.listenerCount("message")>eF(Z),eF=(Z)=>o0.has(Z)&&!Q1(o0.get(Z).options.buffer,"ipc")?1:0;var I8=B(()=>{S6();$1();A1();A8();v2=new WeakMap});import{promisify as ZD}from"node:util";var E8=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},Q,{strict:$=!1}={})=>{return v6({methodName:"sendMessage",isSubprocess:J,ipc:q,isConnected:Z.connected}),XD({anyProcess:Z,channel:X,methodName:"sendMessage",isSubprocess:J,message:Q,strict:$})},XD=async({anyProcess:Z,channel:X,methodName:J,isSubprocess:q,message:Q,strict:$})=>{let Y=oY({anyProcess:Z,channel:X,isSubprocess:q,message:Q,strict:$}),H=eY(Z,Y,$);try{await i3({anyProcess:Z,methodName:J,isSubprocess:q,wrappedMessage:Y,message:Q})}catch(K){throw C6(Z),K}finally{ZH(H)}},i3=async({anyProcess:Z,methodName:X,isSubprocess:J,wrappedMessage:q,message:Q})=>{let $=JD(Z);try{await Promise.all([rY(q,Z,J),$(q)])}catch(Y){throw SY({error:Y,methodName:X,isSubprocess:J}),bY({error:Y,methodName:X,isSubprocess:J,message:Q}),Y}},JD=(Z)=>{if(n3.has(Z))return n3.get(Z);let X=ZD(Z.send.bind(Z));return n3.set(Z,X),X},n3;var P8=B(()=>{y6();I8();A8();n3=new WeakMap});import{scheduler as qD}from"node:timers/promises";var JH=(Z,X)=>{return p3("cancelSignal",!1,Z.connected),i3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:QH,message:X},message:X})},qH=async({anyProcess:Z,channel:X,isSubprocess:J,ipc:q})=>{return await QD({anyProcess:Z,channel:X,isSubprocess:J,ipc:q}),a3.signal},QD=async({anyProcess:Z,channel:X,isSubprocess:J,ipc:q})=>{if(XH)return;if(XH=!0,!q){yY();return}if(X===null){l3();return}I1(Z,X,J),await qD.yield()},XH=!1,aY=(Z)=>{if(Z?.type!==QH)return!1;return a3.abort(Z.message),!0},QH="execa:ipc:cancel",l3=()=>{a3.abort(CY())},a3;var O8=B(()=>{P8();P2();y6();a3=new AbortController});var $H=({gracefulCancel:Z,cancelSignal:X,ipc:J,serialization:q})=>{if(!Z)return;if(X===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!J)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(q==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},YH=({subprocess:Z,cancelSignal:X,gracefulCancel:J,forceKillAfterDelay:q,context:Q,controller:$})=>J?[$D({subprocess:Z,cancelSignal:X,forceKillAfterDelay:q,context:Q,controller:$})]:[],$D=async({subprocess:Z,cancelSignal:X,forceKillAfterDelay:J,context:q,controller:{signal:Q}})=>{await L8(X,Q);let $=YD(X);throw await JH(Z,$),f3({kill:Z.kill,forceKillAfterDelay:J,context:q,controllerSignal:Q}),q.terminationReason??="gracefulCancel",X.reason},YD=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let X=Error(Z.message);return Object.defineProperty(X,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),X};var o3=B(()=>{m3();O8();B8()});import{setTimeout as HD}from"node:timers/promises";var HH=({timeout:Z})=>{if(Z!==void 0&&(!Number.isFinite(Z)||Z<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`)},UH=(Z,X,J,q)=>X===0||X===void 0?[]:[UD(Z,X,J,q)],UD=async(Z,X,J,{signal:q})=>{throw await HD(X,void 0,{signal:q}),J.terminationReason??="timeout",Z.kill(),new i0};var s3=B(()=>{g1()});import{execPath as KD,execArgv as GD}from"node:process";import KH from"node:path";var GH=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},WH=(Z,X,{node:J=!1,nodePath:q=KD,nodeOptions:Q=GD.filter((K)=>!K.startsWith("--inspect")),cwd:$,execPath:Y,...H})=>{if(Y!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let K=N6(q,'The "nodePath" option'),W=KH.resolve($,K),G={...H,nodePath:W,node:J,cwd:$};if(!J)return[Z,X,G];if(KH.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[W,[...Q,Z,...X],{ipc:!0,...G,shell:!1}]};var r3=B(()=>{k6()});import{serialize as WD}from"node:v8";var VH=({ipcInput:Z,ipc:X,serialization:J})=>{if(Z===void 0)return;if(!X)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");LD[J](Z)},VD=(Z)=>{try{WD(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:X})}},BD=(Z)=>{try{JSON.stringify(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:X})}},LD,BH=async(Z,X)=>{if(X===void 0)return;await Z.sendMessage(X)};var t3=B(()=>{LD={advanced:VD,json:BD}});var _H=({encoding:Z})=>{if(e3.has(Z))return;let X=zD(Z);if(X!==void 0)throw TypeError(`Invalid option \`encoding: ${v8(Z)}\`.
58
- Please rename it to ${v8(X)}.`);let J=[...e3].map((q)=>v8(q)).join(", ");throw TypeError(`Invalid option \`encoding: ${v8(Z)}\`.
59
- Please rename it to one of: ${J}.`)},_D,D0,e3,zD=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let X=Z.toLowerCase();if(X in LH)return LH[X];if(e3.has(X))return X},LH,v8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var m1=B(()=>{_D=new Set(["utf8","utf16le"]),D0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),e3=new Set([..._D,...D0]),LH={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import{statSync as RD}from"node:fs";import MD from"node:path";import FD from"node:process";var zH=(Z=RH())=>{let X=N6(Z,'The "cwd" option');return MD.resolve(X)},RH=()=>{try{return FD.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
60
- ${Z.message}`,Z}},MH=(Z,X)=>{if(X===RH())return Z;let J;try{J=RD(X)}catch(q){return`The "cwd" option is invalid: ${X}.
61
- ${q.message}
62
- ${Z}`}if(!J.isDirectory())return`The "cwd" option is not a directory: ${X}.
63
- ${Z}`;return Z};var ZZ=B(()=>{k6()});import DD from"node:path";import DH from"node:process";var TH,C8=(Z,X,J)=>{J.cwd=zH(J.cwd);let[q,Q,$]=WH(Z,X,J),{command:Y,args:H,options:K}=TH.default._parse(q,Q,$),W=v9(K),G=TD(W);if(HH(G),_H(G),VH(G),NY(G),$H(G),G.shell=O3(G.shell),G.env=AD(G),G.killSignal=AY(G.killSignal),G.forceKillAfterDelay=wY(G.forceKillAfterDelay),G.lines=G.lines.map((V,L)=>V&&!D0.has(G.encoding)&&G.buffer[L]),DH.platform==="win32"&&DD.basename(Y,".exe")==="cmd")H.unshift("/q");return{file:Y,commandArguments:H,options:G}},TD=({extendEnv:Z=!0,preferLocal:X=!1,cwd:J,localDir:q=J,encoding:Q="utf8",reject:$=!0,cleanup:Y=!0,all:H=!1,windowsHide:K=!0,killSignal:W="SIGTERM",forceKillAfterDelay:G=!0,gracefulCancel:V=!1,ipcInput:L,ipc:_=L!==void 0||V,serialization:z="advanced",...D})=>({...D,extendEnv:Z,preferLocal:X,cwd:J,localDirectory:q,encoding:Q,reject:$,cleanup:Y,all:H,windowsHide:K,killSignal:W,forceKillAfterDelay:G,gracefulCancel:V,ipcInput:L,ipc:_,serialization:z}),AD=({env:Z,extendEnv:X,preferLocal:J,node:q,localDirectory:Q,nodePath:$})=>{let Y=X?{...DH.env,...Z}:Z;if(J||q)return UY({env:Y,cwd:Q,execPath:$,preferLocal:J,addExecPath:q});return Y};var XZ=B(()=>{KY();B8();k2();u3();o3();s3();r3();t3();m1();ZZ();k6();$1();TH=FH(n7(),1)});var y8=(Z,X,J)=>J.shell&&X.length>0?[[Z,...X].join(" "),[],J]:[Z,X,J];var JZ=()=>{};function h6(Z){if(typeof Z==="string")return ID(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return OD(Z)}var ID=(Z)=>Z.at(-1)===AH?Z.slice(0,Z.at(-2)===IH?-2:-1):Z,OD=(Z)=>Z.at(-1)===wD?Z.subarray(0,Z.at(-2)===jD?-2:-1):Z,AH=`
64
- `,wD,IH="\r",jD;var qZ=B(()=>{wD=AH.codePointAt(0),jD=IH.codePointAt(0)});function b0(Z,{checkOpen:X=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!X||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function QZ(Z,{checkOpen:X=!0}={}){return b0(Z,{checkOpen:X})&&(Z.writable||!X)&&typeof Z.write==="function"&&typeof Z.end==="function"&&typeof Z.writable==="boolean"&&typeof Z.writableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function u1(Z,{checkOpen:X=!0}={}){return b0(Z,{checkOpen:X})&&(Z.readable||!X)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function $Z(Z,X){return QZ(Z,X)&&u1(Z,X)}var p1=()=>{};class OH{#J;#q;#X=!1;#Y=void 0;constructor(Z,X){this.#J=Z,this.#q=X}next(){let Z=()=>this.#U();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let X=()=>this.#V(Z);return this.#Y?this.#Y.then(X,X):X()}async#U(){if(this.#X)return{done:!0,value:void 0};let Z;try{Z=await this.#J.read()}catch(X){throw this.#Y=void 0,this.#X=!0,this.#J.releaseLock(),X}return Z.done&&(this.#Y=void 0,this.#X=!0,this.#J.releaseLock()),Z}async#V(Z){if(this.#X)return{done:!0,value:Z};if(this.#X=!0,!this.#q){let X=this.#J.cancel(Z);return this.#J.releaseLock(),await X,{done:!0,value:Z}}return this.#J.releaseLock(),{done:!0,value:Z}}}function wH(){return this[YZ].next()}function jH(Z){return this[YZ].return(Z)}function HZ({preventCancel:Z=!1}={}){let X=this.getReader(),J=new OH(X,Z),q=Object.create(kD);return q[YZ]=J,q}var ND,YZ,kD;var NH=B(()=>{ND=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);YZ=Symbol();Object.defineProperty(wH,"name",{value:"next"});Object.defineProperty(jH,"name",{value:"return"});kD=Object.create(ND,{next:{enumerable:!0,configurable:!0,writable:!0,value:wH},return:{enumerable:!0,configurable:!0,writable:!0,value:jH}})});var kH=()=>{};var xH=B(()=>{NH();kH()});var EH=(Z)=>{if(u1(Z,{checkOpen:!1})&&C2.on!==void 0)return ED(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(xD.call(Z)==="[object ReadableStream]")return HZ.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},xD,ED=async function*(Z){let X=new AbortController,J={};PD(Z,X,J);try{for await(let[q]of C2.on(Z,"data",{signal:X.signal}))yield q}catch(q){if(J.error!==void 0)throw J.error;else if(!X.signal.aborted)throw q}finally{Z.destroy()}},PD=async(Z,X,J)=>{try{await C2.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(q){J.error=q}finally{X.abort()}},C2;var UZ=B(()=>{p1();xH();({toString:xD}=Object.prototype),C2={}});var g6=async(Z,{init:X,convertChunk:J,getSize:q,truncateChunk:Q,addChunk:$,getFinalChunk:Y,finalize:H},{maxBuffer:K=Number.POSITIVE_INFINITY}={})=>{let W=EH(Z),G=X();G.length=0;try{for await(let V of W){let L=CD(V),_=J[L](V,G);CH({convertedChunk:_,state:G,getSize:q,truncateChunk:Q,addChunk:$,maxBuffer:K})}return vD({state:G,convertChunk:J,getSize:q,truncateChunk:Q,addChunk:$,getFinalChunk:Y,maxBuffer:K}),H(G)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(G),L}},vD=({state:Z,getSize:X,truncateChunk:J,addChunk:q,getFinalChunk:Q,maxBuffer:$})=>{let Y=Q(Z);if(Y!==void 0)CH({convertedChunk:Y,state:Z,getSize:X,truncateChunk:J,addChunk:q,maxBuffer:$})},CH=({convertedChunk:Z,state:X,getSize:J,truncateChunk:q,addChunk:Q,maxBuffer:$})=>{let Y=J(Z),H=X.length+Y;if(H<=$){PH(Z,X,Q,H);return}let K=q(Z,$-X.length);if(K!==void 0)PH(K,X,Q,$);throw new Y1},PH=(Z,X,J,q)=>{X.contents=J(Z,X,q),X.length=q},CD=(Z)=>{let X=typeof Z;if(X==="string")return"string";if(X!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let J=vH.call(Z);if(J==="[object ArrayBuffer]")return"arrayBuffer";if(J==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&vH.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},vH,Y1;var y2=B(()=>{UZ();({toString:vH}=Object.prototype);Y1=class Y1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var H1=(Z)=>Z,S2=()=>{return},S8=({contents:Z})=>Z,b8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},h8=(Z)=>Z.length;var g8=()=>{};async function f8(Z,X){return g6(Z,hD,X)}var yD=()=>({contents:[]}),SD=()=>1,bD=(Z,{contents:X})=>{return X.push(Z),X},hD;var yH=B(()=>{y2();g8();hD={init:yD,convertChunk:{string:H1,buffer:H1,arrayBuffer:H1,dataView:H1,typedArray:H1,others:H1},getSize:SD,truncateChunk:S2,addChunk:bD,getFinalChunk:S2,finalize:S8}});async function m8(Z,X){return g6(Z,nD,X)}var gD=()=>({contents:new ArrayBuffer(0)}),fD=(Z)=>mD.encode(Z),mD,SH=(Z)=>new Uint8Array(Z),bH=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),uD=(Z,X)=>Z.slice(0,X),pD=(Z,{contents:X,length:J},q)=>{let Q=fH()?cD(X,q):dD(X,q);return new Uint8Array(Q).set(Z,J),Q},dD=(Z,X)=>{if(X<=Z.byteLength)return Z;let J=new ArrayBuffer(gH(X));return new Uint8Array(J).set(new Uint8Array(Z),0),J},cD=(Z,X)=>{if(X<=Z.maxByteLength)return Z.resize(X),Z;let J=new ArrayBuffer(X,{maxByteLength:gH(X)});return new Uint8Array(J).set(new Uint8Array(Z),0),J},gH=(Z)=>hH**Math.ceil(Math.log(Z)/Math.log(hH)),hH=2,lD=({contents:Z,length:X})=>fH()?Z:Z.slice(0,X),fH=()=>("resize"in ArrayBuffer.prototype),nD;var mH=B(()=>{y2();g8();mD=new TextEncoder,nD={init:gD,convertChunk:{string:fD,buffer:SH,arrayBuffer:SH,dataView:bH,typedArray:bH,others:b8},getSize:h8,truncateChunk:uD,addChunk:pD,getFinalChunk:S2,finalize:lD}});async function p8(Z,X){return g6(Z,rD,X)}var iD=()=>({contents:"",textDecoder:new TextDecoder}),u8=(Z,{textDecoder:X})=>X.decode(Z,{stream:!0}),aD=(Z,{contents:X})=>X+Z,oD=(Z,X)=>Z.slice(0,X),sD=({textDecoder:Z})=>{let X=Z.decode();return X===""?void 0:X},rD;var uH=B(()=>{y2();g8();rD={init:iD,convertChunk:{string:H1,buffer:u8,arrayBuffer:u8,dataView:u8,typedArray:u8,others:b8},getSize:h8,truncateChunk:oD,addChunk:aD,getFinalChunk:sD,finalize:S8}});var pH=B(()=>{yH();mH();uH();y2()});import{on as tD}from"node:events";import{finished as eD}from"node:stream/promises";var d8=B(()=>{UZ();pH();Object.assign(C2,{on:tD,finished:eD})});var dH=({error:Z,stream:X,readableObjectMode:J,lines:q,encoding:Q,fdNumber:$})=>{if(!(Z instanceof Y1))throw Z;if($==="all")return Z;let Y=ZT(J,q,Q);throw Z.maxBufferInfo={fdNumber:$,unit:Y},X.destroy(),Z},ZT=(Z,X,J)=>{if(Z)return"objects";if(X)return"lines";if(J==="buffer")return"bytes";return"characters"},cH=(Z,X,J)=>{if(X.length!==J)return;let q=new Y1;throw q.maxBufferInfo={fdNumber:"ipc"},q},lH=(Z,X)=>{let{streamName:J,threshold:q,unit:Q}=XT(Z,X);return`Command's ${J} was larger than ${q} ${Q}`},XT=(Z,X)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:X[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:J,unit:q}}=Z;delete Z.maxBufferInfo;let Q=Q1(X,J);if(J==="ipc")return{streamName:"IPC output",threshold:Q,unit:"messages"};return{streamName:o4(J),threshold:Q,unit:q}},nH=(Z,X,J)=>Z?.code==="ENOBUFS"&&X!==null&&X.some((q)=>q!==null&&q.length>c8(J)),iH=(Z,X,J)=>{if(!X)return Z;let q=c8(J);return Z.length>q?Z.slice(0,q):Z},c8=([,Z])=>Z;var d1=B(()=>{d8();q1();$1()});import{inspect as JT}from"node:util";var oH=({stdio:Z,all:X,ipcOutput:J,originalError:q,signal:Q,signalDescription:$,exitCode:Y,escapedCommand:H,timedOut:K,isCanceled:W,isGracefullyCanceled:G,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:_,killSignal:z,maxBuffer:D,timeout:M,cwd:F})=>{let N=q?.code,R=qT({originalError:q,timedOut:K,timeout:M,isMaxBuffer:V,maxBuffer:D,errorCode:N,signal:Q,signalDescription:$,exitCode:Y,isCanceled:W,isGracefullyCanceled:G,isForcefullyTerminated:L,forceKillAfterDelay:_,killSignal:z}),w=$T(q,F),A=w===void 0?"":`
65
- ${w}`,I=`${R}: ${H}${A}`,T=X===void 0?[Z[2],Z[1]]:[X],b=[I,...T,...Z.slice(3),J.map((j)=>YT(j)).join(`
66
- `)].map((j)=>j2(h6(HT(j)))).filter(Boolean).join(`
67
-
68
- `);return{originalMessage:w,shortMessage:I,message:b}},qT=({originalError:Z,timedOut:X,timeout:J,isMaxBuffer:q,maxBuffer:Q,errorCode:$,signal:Y,signalDescription:H,exitCode:K,isCanceled:W,isGracefullyCanceled:G,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:_})=>{let z=QT(V,L);if(X)return`Command timed out after ${J} milliseconds${z}`;if(G){if(Y===void 0)return`Command was gracefully canceled with exit code ${K}`;return V?`Command was gracefully canceled${z}`:`Command was gracefully canceled with ${Y} (${H})`}if(W)return`Command was canceled${z}`;if(q)return`${lH(Z,Q)}${z}`;if($!==void 0)return`Command failed with ${$}${z}`;if(V)return`Command was killed with ${_} (${V8(_)})${z}`;if(Y!==void 0)return`Command was killed with ${Y} (${H})`;if(K!==void 0)return`Command failed with exit code ${K}`;return"Command failed"},QT=(Z,X)=>Z?` and was forcefully terminated after ${X} milliseconds`:"",$T=(Z,X)=>{if(Z instanceof i0)return;let J=VY(Z)?Z.originalMessage:String(Z?.message??Z),q=j2(MH(J,X));return q===""?void 0:q},YT=(Z)=>typeof Z==="string"?Z:JT(Z),HT=(Z)=>Array.isArray(Z)?Z.map((X)=>h6(aH(X))).filter(Boolean).join(`
69
- `):aH(Z),aH=(Z)=>{if(typeof Z==="string")return Z;if(X0(Z))return i4(Z);return""};var sH=B(()=>{qZ();F0();ZZ();t4();d1();k2();g1()});var l8=({command:Z,escapedCommand:X,stdio:J,all:q,ipcOutput:Q,options:{cwd:$},startTime:Y})=>rH({command:Z,escapedCommand:X,cwd:$,durationMs:C3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:J[1],stderr:J[2],all:q,stdio:J,ipcOutput:Q,pipedFrom:[]}),f6=({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,isSync:Y})=>b2({error:Z,command:X,escapedCommand:J,startTime:$,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:q.length}),ipcOutput:[],options:Q,isSync:Y}),b2=({error:Z,command:X,escapedCommand:J,startTime:q,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:G,stdio:V,all:L,ipcOutput:_,options:{timeoutDuration:z,timeout:D=z,forceKillAfterDelay:M,killSignal:F,cwd:N,maxBuffer:R},isSync:w})=>{let{exitCode:A,signal:I,signalDescription:T}=KT(W,G),{originalMessage:b,shortMessage:j,message:x}=oH({stdio:V,all:L,ipcOutput:_,originalError:Z,signal:I,signalDescription:T,exitCode:A,escapedCommand:J,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,forceKillAfterDelay:M,killSignal:F,maxBuffer:R,timeout:D,cwd:N}),v=GY(Z,x,w);return Object.assign(v,UT({error:v,command:X,escapedCommand:J,startTime:q,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:A,signal:I,signalDescription:T,stdio:V,all:L,ipcOutput:_,cwd:N,originalMessage:b,shortMessage:j})),v},UT=({error:Z,command:X,escapedCommand:J,startTime:q,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:G,signalDescription:V,stdio:L,all:_,ipcOutput:z,cwd:D,originalMessage:M,shortMessage:F})=>rH({shortMessage:F,originalMessage:M,command:X,escapedCommand:J,cwd:D,durationMs:C3(q),failed:!0,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isTerminated:G!==void 0,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:G,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:_,stdio:L,ipcOutput:z,pipedFrom:[]}),rH=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0)),KT=(Z,X)=>{let J=Z===null?void 0:Z,q=X===null?void 0:X,Q=q===void 0?void 0:V8(X);return{exitCode:J,signal:q,signalDescription:Q}};var h2=B(()=>{k2();Q8();g1();sH()});function GT(Z){return{days:Math.trunc(Z/86400000),hours:Math.trunc(Z/3600000%24),minutes:Math.trunc(Z/60000%60),seconds:Math.trunc(Z/1000%60),milliseconds:Math.trunc(Z%1000),microseconds:Math.trunc(tH(Z*1000)%1000),nanoseconds:Math.trunc(tH(Z*1e6)%1000)}}function WT(Z){return{days:Z/86400000n,hours:Z/3600000n%24n,minutes:Z/60000n%60n,seconds:Z/1000n%60n,milliseconds:Z%1000n,microseconds:0n,nanoseconds:0n}}function KZ(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return GT(Z);break}case"bigint":return WT(Z)}throw TypeError("Expected a finite number or bigint")}var tH=(Z)=>Number.isFinite(Z)?Z:0;var eH=()=>{};function GZ(Z,X){let J=typeof Z==="bigint";if(!J&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");X={...X};let q=Z<0?"-":"";if(Z=Z<0?-Z:Z,X.colonNotation)X.compact=!1,X.formatSubMilliseconds=!1,X.separateMilliseconds=!1,X.verbose=!1;if(X.compact)X.unitCount=1,X.secondsDecimalDigits=0,X.millisecondsDecimalDigits=0;let Q=[],$=(G,V)=>{let L=Math.floor(G*10**V+LT);return(Math.round(L)/10**V).toFixed(V)},Y=(G,V,L,_)=>{if((Q.length===0||!X.colonNotation)&&VT(G)&&!(X.colonNotation&&L==="m"))return;if(_??=String(G),X.colonNotation){let z=_.includes(".")?_.split(".")[0].length:_.length,D=Q.length>0?2:1;_="0".repeat(Math.max(0,D-z))+_}else _+=X.verbose?" "+BT(V,G):L;Q.push(_)},H=KZ(Z),K=BigInt(H.days);if(X.hideYearAndDays)Y(BigInt(K)*24n+BigInt(H.hours),"hour","h");else{if(X.hideYear)Y(K,"day","d");else Y(K/365n,"year","y"),Y(K%365n,"day","d");Y(Number(H.hours),"hour","h")}if(Y(Number(H.minutes),"minute","m"),!X.hideSeconds)if(X.separateMilliseconds||X.formatSubMilliseconds||!X.colonNotation&&Z<1000&&!X.subSecondsAsDecimals){let G=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),_=Number(H.nanoseconds);if(Y(G,"second","s"),X.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(_,"nanosecond","ns");else{let z=V+L/1000+_/1e6,D=typeof X.millisecondsDecimalDigits==="number"?X.millisecondsDecimalDigits:0,M=z>=1?Math.round(z):Math.ceil(z),F=D?z.toFixed(D):M;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let G=(J?Number(Z%_T):Z)/1000%60,V=typeof X.secondsDecimalDigits==="number"?X.secondsDecimalDigits:1,L=$(G,V),_=X.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(_),"second","s",_)}if(Q.length===0)return q+"0"+(X.verbose?" milliseconds":"ms");let W=X.colonNotation?":":" ";if(typeof X.unitCount==="number")Q=Q.slice(0,Math.max(X.unitCount,1));return q+Q.join(W)}var VT=(Z)=>Z===0||Z===0n,BT=(Z,X)=>X===1||X===1n?Z:`${Z}s`,LT=0.0000001,_T;var ZU=B(()=>{eH();_T=24n*60n*60n*1000n});var XU=(Z,X)=>{if(Z.failed)n0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:X,result:Z})};var JU=B(()=>{P6()});var qU=(Z,X)=>{if(!x6(X))return;XU(Z,X),zT(Z,X)},zT=(Z,X)=>{let J=`(done in ${GZ(Z.durationMs)})`;n0({type:"duration",verboseMessage:J,verboseInfo:X,result:Z})};var QU=B(()=>{ZU();D1();P6();JU()});var m6=(Z,X,{reject:J})=>{if(qU(Z,X),Z.failed&&J)throw Z;return Z};var n8=B(()=>{QU()});var HU=(Z,X)=>{if(c1(Z))return"asyncGenerator";if(GU(Z))return"generator";if(i8(Z))return"fileUrl";if(TT(Z))return"filePath";if(OT(Z))return"webStream";if(b0(Z,{checkOpen:!1}))return"native";if(X0(Z))return"uint8Array";if(wT(Z))return"asyncIterable";if(jT(Z))return"iterable";if(BZ(Z))return UU({transform:Z},X);if(DT(Z))return RT(Z,X);return"native"},RT=(Z,X)=>{if($Z(Z.transform,{checkOpen:!1}))return MT(Z,X);if(BZ(Z.transform))return UU(Z,X);return FT(Z,X)},MT=(Z,X)=>{return KU(Z,X,"Duplex stream"),"duplex"},UU=(Z,X)=>{return KU(Z,X,"web TransformStream"),"webTransform"},KU=({final:Z,binary:X,objectMode:J},q,Q)=>{$U(Z,`${q}.final`,Q),$U(X,`${q}.binary`,Q),WZ(J,`${q}.objectMode`)},$U=(Z,X,J)=>{if(Z!==void 0)throw TypeError(`The \`${X}\` option can only be defined when using a generator, not a ${J}.`)},FT=({transform:Z,final:X,binary:J,objectMode:q},Q)=>{if(Z!==void 0&&!YU(Z))throw TypeError(`The \`${Q}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if($Z(X,{checkOpen:!1}))throw TypeError(`The \`${Q}.final\` option must not be a Duplex stream.`);if(BZ(X))throw TypeError(`The \`${Q}.final\` option must not be a web TransformStream.`);if(X!==void 0&&!YU(X))throw TypeError(`The \`${Q}.final\` option must be a generator.`);return WZ(J,`${Q}.binary`),WZ(q,`${Q}.objectMode`),c1(Z)||c1(X)?"asyncGenerator":"generator"},WZ=(Z,X)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${X}\` option must use a boolean.`)},YU=(Z)=>c1(Z)||GU(Z),c1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",GU=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",DT=(Z)=>t(Z)&&(Z.transform!==void 0||Z.final!==void 0),i8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",WU=(Z)=>i8(Z)&&Z.protocol!=="file:",TT=(Z)=>t(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>AT.has(X))&&VZ(Z.file),AT,VZ=(Z)=>typeof Z==="string",VU=(Z,X)=>Z==="native"&&typeof X==="string"&&!IT.has(X),IT,BU=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",a8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",OT=(Z)=>BU(Z)||a8(Z),BZ=(Z)=>BU(Z?.readable)&&a8(Z?.writable),wT=(Z)=>LU(Z)&&typeof Z[Symbol.asyncIterator]==="function",jT=(Z)=>LU(Z)&&typeof Z[Symbol.iterator]==="function",LU=(Z)=>typeof Z==="object"&&Z!==null,j0,o8,LZ,_U,zU,O1;var _0=B(()=>{p1();X1();F0();AT=new Set(["file","append"]),IT=new Set(["ipc","ignore","inherit","overlapped","pipe"]),j0=new Set(["generator","asyncGenerator","duplex","webTransform"]),o8=new Set(["fileUrl","filePath","fileNumber"]),LZ=new Set(["fileUrl","filePath"]),_U=new Set([...LZ,"webStream","nodeStream"]),zU=new Set(["webTransform","duplex"]),O1={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"}});var _Z=(Z,X,J,q)=>q==="output"?NT(Z,X,J):kT(Z,X,J),NT=(Z,X,J)=>{let q=X!==0&&J[X-1].value.readableObjectMode;return{writableObjectMode:q,readableObjectMode:Z??q}},kT=(Z,X,J)=>{let q=X===0?Z===!0:J[X-1].value.readableObjectMode,Q=X!==J.length-1&&(Z??q);return{writableObjectMode:q,readableObjectMode:Q}},RU=(Z,X)=>{let J=Z.findLast(({type:q})=>j0.has(q));if(J===void 0)return!1;return X==="input"?J.value.writableObjectMode:J.value.readableObjectMode};var zZ=B(()=>{_0()});var MU=(Z,X,J,q)=>[...Z.filter(({type:Q})=>!j0.has(Q)),...xT(Z,X,J,q)],xT=(Z,X,J,{encoding:q})=>{let Q=Z.filter(({type:Y})=>j0.has(Y)),$=Array.from({length:Q.length});for(let[Y,H]of Object.entries(Q))$[Y]=ET({stdioItem:H,index:Number(Y),newTransforms:$,optionName:X,direction:J,encoding:q});return yT($,J)},ET=({stdioItem:Z,stdioItem:{type:X},index:J,newTransforms:q,optionName:Q,direction:$,encoding:Y})=>{if(X==="duplex")return PT({stdioItem:Z,optionName:Q});if(X==="webTransform")return vT({stdioItem:Z,index:J,newTransforms:q,direction:$});return CT({stdioItem:Z,index:J,newTransforms:q,direction:$,encoding:Y})},PT=({stdioItem:Z,stdioItem:{value:{transform:X,transform:{writableObjectMode:J,readableObjectMode:q},objectMode:Q=q}},optionName:$})=>{if(Q&&!q)throw TypeError(`The \`${$}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Q&&q)throw TypeError(`The \`${$}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:X,writableObjectMode:J,readableObjectMode:q}}},vT=({stdioItem:Z,stdioItem:{value:X},index:J,newTransforms:q,direction:Q})=>{let{transform:$,objectMode:Y}=t(X)?X:{transform:X},{writableObjectMode:H,readableObjectMode:K}=_Z(Y,J,q,Q);return{...Z,value:{transform:$,writableObjectMode:H,readableObjectMode:K}}},CT=({stdioItem:Z,stdioItem:{value:X},index:J,newTransforms:q,direction:Q,encoding:$})=>{let{transform:Y,final:H,binary:K=!1,preserveNewlines:W=!1,objectMode:G}=t(X)?X:{transform:X},V=K||D0.has($),{writableObjectMode:L,readableObjectMode:_}=_Z(G,J,q,Q);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:W,writableObjectMode:L,readableObjectMode:_}}},yT=(Z,X)=>X==="input"?Z.reverse():Z;var FU=B(()=>{X1();m1();_0();zZ()});import RZ from"node:process";var DU=(Z,X,J)=>{let q=Z.map((Q)=>ST(Q,X));if(q.includes("input")&&q.includes("output"))throw TypeError(`The \`${J}\` option must not be an array of both readable and writable values.`);return q.find(Boolean)??gT},ST=({type:Z,value:X},J)=>bT[J]??TU[Z](X),bT,u6=()=>{return},MZ=()=>"input",TU,hT=(Z)=>{if([0,RZ.stdin].includes(Z))return"input";if([1,2,RZ.stdout,RZ.stderr].includes(Z))return"output"},gT="output";var AU=B(()=>{p1();_0();bT=["input","output","output"],TU={generator:u6,asyncGenerator:u6,fileUrl:u6,filePath:u6,iterable:MZ,asyncIterable:MZ,uint8Array:MZ,webStream:(Z)=>a8(Z)?"output":"input",nodeStream(Z){if(!u1(Z,{checkOpen:!1}))return"output";return QZ(Z,{checkOpen:!1})?void 0:"input"},webTransform:u6,duplex:u6,native(Z){let X=hT(Z);if(X!==void 0)return X;if(b0(Z,{checkOpen:!1}))return TU.nodeStream(Z)}}});var IU=(Z,X)=>X&&!Z.includes("ipc")?[...Z,"ipc"]:Z;var OU=()=>{};var wU=({stdio:Z,ipc:X,buffer:J,...q},Q,$)=>{let Y=fT(Z,q).map((H,K)=>jU(H,K));return $?uT(Y,J,Q):IU(Y,X)},fT=(Z,X)=>{if(Z===void 0)return w0.map((q)=>X[q]);if(mT(X))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${w0.map((q)=>`\`${q}\``).join(", ")}`);if(typeof Z==="string")return[Z,Z,Z];if(!Array.isArray(Z))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof Z}\``);let J=Math.max(Z.length,w0.length);return Array.from({length:J},(q,Q)=>Z[Q])},mT=(Z)=>w0.some((X)=>Z[X]!==void 0),jU=(Z,X)=>{if(Array.isArray(Z))return Z.map((J)=>jU(J,X));if(Z===null||Z===void 0)return X>=w0.length?"ignore":"pipe";return Z},uT=(Z,X,J)=>Z.map((q,Q)=>!X[Q]&&Q!==0&&!E6(J,Q)&&pT(q)?"ignore":q),pT=(Z)=>Z==="pipe"||Array.isArray(Z)&&Z.every((X)=>X==="pipe");var NU=B(()=>{q1();OU();D1()});import{readFileSync as dT}from"node:fs";import cT from"node:tty";var xU=({stdioItem:Z,stdioItem:{type:X},isStdioArray:J,fdNumber:q,direction:Q,isSync:$})=>{if(!J||X!=="native")return Z;return $?lT({stdioItem:Z,fdNumber:q,direction:Q}):aT({stdioItem:Z,fdNumber:q})},lT=({stdioItem:Z,stdioItem:{value:X,optionName:J},fdNumber:q,direction:Q})=>{let $=nT({value:X,optionName:J,fdNumber:q,direction:Q});if($!==void 0)return $;if(b0(X,{checkOpen:!1}))throw TypeError(`The \`${J}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},nT=({value:Z,optionName:X,fdNumber:J,direction:q})=>{let Q=iT(Z,J);if(Q===void 0)return;if(q==="output")return{type:"fileNumber",value:Q,optionName:X};if(cT.isatty(Q))throw TypeError(`The \`${X}: ${z8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:J1(dT(Q)),optionName:X}},iT=(Z,X)=>{if(Z==="inherit")return X;if(typeof Z==="number")return Z;let J=a4.indexOf(Z);if(J!==-1)return J},aT=({stdioItem:Z,stdioItem:{value:X,optionName:J},fdNumber:q})=>{if(X==="inherit")return{type:"nodeStream",value:kU(q,X,J),optionName:J};if(typeof X==="number")return{type:"nodeStream",value:kU(X,X,J),optionName:J};if(b0(X,{checkOpen:!1}))return{type:"nodeStream",value:X,optionName:J};return Z},kU=(Z,X,J)=>{let q=a4[Z];if(q===void 0)throw TypeError(`The \`${J}: ${X}\` option is invalid: no such standard stream.`);return q};var EU=B(()=>{p1();q1();F0();A1()});var PU=({input:Z,inputFile:X},J)=>J===0?[...oT(Z),...rT(X)]:[],oT=(Z)=>Z===void 0?[]:[{type:sT(Z),value:Z,optionName:"input"}],sT=(Z)=>{if(u1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(X0(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},rT=(Z)=>Z===void 0?[]:[{...tT(Z),optionName:"inputFile"}],tT=(Z)=>{if(i8(Z))return{type:"fileUrl",value:Z};if(VZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var vU=B(()=>{p1();F0();_0()});var CU=(Z)=>Z.filter((X,J)=>Z.every((q,Q)=>X.value!==q.value||J>=Q||X.type==="generator"||X.type==="asyncGenerator")),yU=({stdioItem:{type:Z,value:X,optionName:J},direction:q,fileDescriptors:Q,isSync:$})=>{let Y=eT(Q,Z);if(Y.length===0)return;if($){ZA({otherStdioItems:Y,type:Z,value:X,optionName:J,direction:q});return}if(_U.has(Z))return SU({otherStdioItems:Y,type:Z,value:X,optionName:J,direction:q});if(zU.has(Z))JA({otherStdioItems:Y,type:Z,value:X,optionName:J})},eT=(Z,X)=>Z.flatMap(({direction:J,stdioItems:q})=>q.filter((Q)=>Q.type===X).map((Q)=>({...Q,direction:J}))),ZA=({otherStdioItems:Z,type:X,value:J,optionName:q,direction:Q})=>{if(LZ.has(X))SU({otherStdioItems:Z,type:X,value:J,optionName:q,direction:Q})},SU=({otherStdioItems:Z,type:X,value:J,optionName:q,direction:Q})=>{let $=Z.filter((H)=>XA(H,J));if($.length===0)return;let Y=$.find((H)=>H.direction!==Q);return bU(Y,q,X),Q==="output"?$[0].stream:void 0},XA=({type:Z,value:X},J)=>{if(Z==="filePath")return X.file===J.file;if(Z==="fileUrl")return X.href===J.href;return X===J},JA=({otherStdioItems:Z,type:X,value:J,optionName:q})=>{let Q=Z.find(({value:{transform:$}})=>$===J.transform);bU(Q,q,X)},bU=(Z,X,J)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${X}\` options must not target ${O1[J]} that is the same.`)};var hU=B(()=>{_0()});var s8=(Z,X,J,q)=>{let $=wU(X,J,q).map((H,K)=>qA({stdioOption:H,fdNumber:K,options:X,isSync:q})),Y=WA({initialFileDescriptors:$,addProperties:Z,options:X,isSync:q});return X.stdio=Y.map(({stdioItems:H})=>LA(H)),Y},qA=({stdioOption:Z,fdNumber:X,options:J,isSync:q})=>{let Q=o4(X),{stdioItems:$,isStdioArray:Y}=QA({stdioOption:Z,fdNumber:X,options:J,optionName:Q}),H=DU($,X,Q),K=$.map((V)=>xU({stdioItem:V,isStdioArray:Y,fdNumber:X,direction:H,isSync:q})),W=MU(K,Q,H,J),G=RU(W,H);return GA(W,G),{direction:H,objectMode:G,stdioItems:W}},QA=({stdioOption:Z,fdNumber:X,options:J,optionName:q})=>{let $=[...(Array.isArray(Z)?Z:[Z]).map((K)=>$A(K,q)),...PU(J,X)],Y=CU($),H=Y.length>1;return YA(Y,H,q),UA(Y),{stdioItems:Y,isStdioArray:H}},$A=(Z,X)=>({type:HU(Z,X),value:Z,optionName:X}),YA=(Z,X,J)=>{if(Z.length===0)throw TypeError(`The \`${J}\` option must not be an empty array.`);if(!X)return;for(let{value:q,optionName:Q}of Z)if(HA.has(q))throw Error(`The \`${Q}\` option must not include \`${q}\`.`)},HA,UA=(Z)=>{for(let X of Z)KA(X)},KA=({type:Z,value:X,optionName:J})=>{if(WU(X))throw TypeError(`The \`${J}: URL\` option must use the \`file:\` scheme.
70
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(VU(Z,X))throw TypeError(`The \`${J}: { file: '...' }\` option must be used instead of \`${J}: '...'\`.`)},GA=(Z,X)=>{if(!X)return;let J=Z.find(({type:q})=>o8.has(q));if(J!==void 0)throw TypeError(`The \`${J.optionName}\` option cannot use both files and transforms in objectMode.`)},WA=({initialFileDescriptors:Z,addProperties:X,options:J,isSync:q})=>{let Q=[];try{for(let $ of Z)Q.push(VA({fileDescriptor:$,fileDescriptors:Q,addProperties:X,options:J,isSync:q}));return Q}catch($){throw FZ(Q),$}},VA=({fileDescriptor:{direction:Z,objectMode:X,stdioItems:J},fileDescriptors:q,addProperties:Q,options:$,isSync:Y})=>{let H=J.map((K)=>BA({stdioItem:K,addProperties:Q,direction:Z,options:$,fileDescriptors:q,isSync:Y}));return{direction:Z,objectMode:X,stdioItems:H}},BA=({stdioItem:Z,addProperties:X,direction:J,options:q,fileDescriptors:Q,isSync:$})=>{let Y=yU({stdioItem:Z,direction:J,fileDescriptors:Q,isSync:$});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...X[J][Z.type](Z,q)}},FZ=(Z)=>{for(let{stdioItems:X}of Z)for(let{stream:J}of X)if(J!==void 0&&!y0(J))J.destroy()},LA=(Z)=>{if(Z.length>1)return Z.some(({value:q})=>q==="overlapped")?"overlapped":"pipe";let[{type:X,value:J}]=Z;return X==="native"?J:"pipe"};var r8=B(()=>{q1();FU();zZ();_0();AU();NU();EU();vU();hU();HA=new Set(["ignore","ipc"])});import{readFileSync as gU}from"node:fs";var mU=(Z,X)=>s8(zA,Z,X,!0),s0=({type:Z,optionName:X})=>{uU(X,O1[Z])},_A=({optionName:Z,value:X})=>{if(X==="ipc"||X==="overlapped")uU(Z,`"${X}"`);return{}},uU=(Z,X)=>{throw TypeError(`The \`${Z}\` option cannot be ${X} with synchronous methods.`)},fU,zA;var pU=B(()=>{F0();r8();_0();fU={generator(){},asyncGenerator:s0,webStream:s0,nodeStream:s0,webTransform:s0,duplex:s0,asyncIterable:s0,native:_A},zA={input:{...fU,fileUrl:({value:Z})=>({contents:[J1(gU(Z))]}),filePath:({value:{file:Z}})=>({contents:[J1(gU(Z))]}),fileNumber:s0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...fU,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:X}})=>({path:Z,append:X}),fileNumber:({value:Z})=>({path:Z}),iterable:s0,string:s0,uint8Array:s0}}});var U1=(Z,{stripFinalNewline:X},J)=>DZ(X,J)&&Z!==void 0&&!Array.isArray(Z)?h6(Z):Z,DZ=(Z,X)=>X==="all"?Z[1]||Z[2]:Z[X];var g2=B(()=>{qZ()});var t8=(Z,X,J,q)=>Z||J?void 0:cU(X,q),AZ=(Z,X,J)=>J?Z.flatMap((q)=>dU(q,X)):dU(Z,X),dU=(Z,X)=>{let{transform:J,final:q}=cU(X,{});return[...J(Z),...q()]},cU=(Z,X)=>{return X.previousChunks="",{transform:RA.bind(void 0,X,Z),final:FA.bind(void 0,X)}},RA=function*(Z,X,J){if(typeof J!=="string"){yield J;return}let{previousChunks:q}=Z,Q=-1;for(let $=0;$<J.length;$+=1)if(J[$]===`
71
- `){let Y=MA(J,$,X,Z),H=J.slice(Q+1,$+1-Y);if(q.length>0)H=TZ(q,H),q="";yield H,Q=$}if(Q!==J.length-1)q=TZ(q,J.slice(Q+1));Z.previousChunks=q},MA=(Z,X,J,q)=>{if(J)return 0;return q.isWindowsNewline=X!==0&&Z[X-1]==="\r",q.isWindowsNewline?2:1},FA=function*({previousChunks:Z}){if(Z.length>0)yield Z},lU=({binary:Z,preserveNewlines:X,readableObjectMode:J,state:q})=>Z||X||J?void 0:{transform:DA.bind(void 0,q)},DA=function*({isWindowsNewline:Z=!1},X){let{unixNewline:J,windowsNewline:q,LF:Q,concatBytes:$}=typeof X==="string"?TA:IA;if(X.at(-1)===Q){yield X;return}yield $(X,Z?q:J)},TZ=(Z,X)=>`${Z}${X}`,TA,AA=(Z,X)=>{let J=new Uint8Array(Z.length+X.length);return J.set(Z,0),J.set(X,Z.length),J},IA;var e8=B(()=>{TA={windowsNewline:`\r
72
- `,unixNewline:`
73
- `,LF:`
74
- `,concatBytes:TZ},IA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:AA}});import{Buffer as OA}from"node:buffer";var nU=(Z,X)=>Z?void 0:wA.bind(void 0,X),wA=function*(Z,X){if(typeof X!=="string"&&!X0(X)&&!OA.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},iU=(Z,X)=>Z?jA.bind(void 0,X):NA.bind(void 0,X),jA=function*(Z,X){aU(Z,X),yield X},NA=function*(Z,X){if(aU(Z,X),typeof X!=="string"&&!X0(X))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof X}.`);yield X},aU=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
75
- Instead, \`yield\` should either be called with a value, or not be called at all. For example:
76
- if (condition) { yield value; }`)};var oU=B(()=>{F0()});import{Buffer as kA}from"node:buffer";import{StringDecoder as xA}from"node:string_decoder";var Z5=(Z,X,J)=>{if(J)return;if(Z)return{transform:EA.bind(void 0,new TextEncoder)};let q=new xA(X);return{transform:PA.bind(void 0,q),final:vA.bind(void 0,q)}},EA=function*(Z,X){if(kA.isBuffer(X))yield J1(X);else if(typeof X==="string")yield Z.encode(X);else yield X},PA=function*(Z,X){yield X0(X)?Z.write(X):X},vA=function*(Z){let X=Z.end();if(X!=="")yield X};var IZ=B(()=>{F0()});import{callbackify as sU}from"node:util";var OZ,X5=async function*(Z,X,J){if(J===X.length){yield Z;return}let{transform:q=yA}=X[J];for await(let Q of q(Z))yield*X5(Q,X,J+1)},rU=async function*(Z){for(let[X,{final:J}]of Object.entries(Z))yield*CA(J,Number(X),Z)},CA=async function*(Z,X,J){if(Z===void 0)return;for await(let q of Z())yield*X5(q,J,X+1)},tU,yA=function*(Z){yield Z};var eU=B(()=>{OZ=sU(async(Z,X,J,q)=>{X.currentIterable=Z(...J);try{for await(let Q of X.currentIterable)q.push(Q)}finally{delete X.currentIterable}}),tU=sU(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var wZ=(Z,X,J,q)=>{try{for(let Q of Z(...X))J.push(Q);q()}catch(Q){q(Q)}},ZK=(Z,X)=>[...X.flatMap((J)=>[...l1(J,Z,0)]),...f2(Z)],l1=function*(Z,X,J){if(J===X.length){yield Z;return}let{transform:q=bA}=X[J];for(let Q of q(Z))yield*l1(Q,X,J+1)},f2=function*(Z){for(let[X,{final:J}]of Object.entries(Z))yield*SA(J,Number(X),Z)},SA=function*(Z,X,J){if(Z===void 0)return;for(let q of Z())yield*l1(q,J,X+1)},bA=function*(Z){yield Z};var jZ=()=>{};import{Transform as hA,getDefaultHighWaterMark as XK}from"node:stream";var NZ=({value:Z,value:{transform:X,final:J,writableObjectMode:q,readableObjectMode:Q},optionName:$},{encoding:Y})=>{let H={},K=JK(Z,Y,$),W=c1(X),G=c1(J),V=W?OZ.bind(void 0,X5,H):wZ.bind(void 0,l1),L=W||G?OZ.bind(void 0,rU,H):wZ.bind(void 0,f2),_=W||G?tU.bind(void 0,H):void 0;return{stream:new hA({writableObjectMode:q,writableHighWaterMark:XK(q),readableObjectMode:Q,readableHighWaterMark:XK(Q),transform(D,M,F){V([D,K,0],this,F)},flush(D){L([K],this,D)},destroy:_})}},J5=(Z,X,J,q)=>{let Q=X.filter(({type:Y})=>Y==="generator"),$=q?Q.reverse():Q;for(let{value:Y,optionName:H}of $){let K=JK(Y,J,H);Z=ZK(K,Z)}return Z},JK=({transform:Z,final:X,binary:J,writableObjectMode:q,readableObjectMode:Q,preserveNewlines:$},Y,H)=>{let K={};return[{transform:nU(q,H)},Z5(J,Y,q),t8(J,$,q,K),{transform:Z,final:X},{transform:iU(Q,H)},lU({binary:J,preserveNewlines:$,readableObjectMode:Q,state:K})].filter(Boolean)};var q5=B(()=>{_0();e8();oU();IZ();eU();jZ()});var qK=(Z,X)=>{for(let J of gA(Z))fA(Z,J,X)},gA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),fA=(Z,X,J)=>{let{stdioItems:q}=Z[X],Q=q.filter(({contents:H})=>H!==void 0);if(Q.length===0)return;if(X!==0){let[{type:H,optionName:K}]=Q;throw TypeError(`Only the \`stdin\` option, not \`${K}\`, can be ${O1[H]} with synchronous methods.`)}let Y=Q.map(({contents:H})=>H).map((H)=>mA(H,q));J.input=w2(Y)},mA=(Z,X)=>{let J=J5(Z,X,"utf8",!0);return uA(J),w2(J)},uA=(Z)=>{let X=Z.find((J)=>typeof J!=="string"&&!X0(J));if(X!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${X}.`)};var QK=B(()=>{q5();F0();_0()});var Q5=({stdioItems:Z,encoding:X,verboseInfo:J,fdNumber:q})=>q!=="all"&&E6(J,q)&&!D0.has(X)&&pA(q)&&(Z.some(({type:Q,value:$})=>Q==="native"&&dA.has($))||Z.every(({type:Q})=>j0.has(Q))),pA=(Z)=>Z===1||Z===2,dA,$K=async(Z,X,J,q)=>{for await(let Q of Z)if(!cA(X))HK(Q,J,q)},YK=(Z,X,J)=>{for(let q of Z)HK(q,X,J)},cA=(Z)=>Z._readableState.pipes.length>0,HK=(Z,X,J)=>{let q=J8(Z);n0({type:"output",verboseMessage:q,fdNumber:X,verboseInfo:J})};var kZ=B(()=>{m1();_0();P6();D1();dA=new Set(["pipe","overlapped"])});import{writeFileSync as lA,appendFileSync as nA}from"node:fs";var UK=({fileDescriptors:Z,syncResult:{output:X},options:J,isMaxBuffer:q,verboseInfo:Q})=>{if(X===null)return{output:Array.from({length:3})};let $={},Y=new Set([]);return{output:X.map((K,W)=>iA({result:K,fileDescriptors:Z,fdNumber:W,state:$,outputFiles:Y,isMaxBuffer:q,verboseInfo:Q},J)),...$}},iA=({result:Z,fileDescriptors:X,fdNumber:J,state:q,outputFiles:Q,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:K,lines:W,stripFinalNewline:G,maxBuffer:V})=>{if(Z===null)return;let L=iH(Z,$,V),_=J1(L),{stdioItems:z,objectMode:D}=X[J],M=aA([_],z,K,q),{serializedResult:F,finalResult:N=F}=oA({chunks:M,objectMode:D,encoding:K,lines:W,stripFinalNewline:G,fdNumber:J});sA({serializedResult:F,fdNumber:J,state:q,verboseInfo:Y,encoding:K,stdioItems:z,objectMode:D});let R=H[J]?N:void 0;try{if(q.error===void 0)rA(F,z,Q);return R}catch(w){return q.error=w,R}},aA=(Z,X,J,q)=>{try{return J5(Z,X,J,!1)}catch(Q){return q.error=Q,Z}},oA=({chunks:Z,objectMode:X,encoding:J,lines:q,stripFinalNewline:Q,fdNumber:$})=>{if(X)return{serializedResult:Z};if(J==="buffer")return{serializedResult:w2(Z)};let Y=O9(Z,J);if(q[$])return{serializedResult:Y,finalResult:AZ(Y,!Q[$],X)};return{serializedResult:Y}},sA=({serializedResult:Z,fdNumber:X,state:J,verboseInfo:q,encoding:Q,stdioItems:$,objectMode:Y})=>{if(!Q5({stdioItems:$,encoding:Q,verboseInfo:q,fdNumber:X}))return;let H=AZ(Z,!1,Y);try{YK(H,X,q)}catch(K){J.error??=K}},rA=(Z,X,J)=>{for(let{path:q,append:Q}of X.filter(({type:$})=>o8.has($))){let $=typeof q==="string"?q:q.toString();if(Q||J.has($))nA(q,Z);else J.add($),lA(q,Z)}};var KK=B(()=>{kZ();q5();e8();F0();_0();d1()});var GK=([,Z,X],J)=>{if(!J.all)return;if(Z===void 0)return X;if(X===void 0)return Z;if(Array.isArray(Z))return Array.isArray(X)?[...Z,...X]:[...Z,U1(X,J,"all")];if(Array.isArray(X))return[U1(Z,J,"all"),...X];if(X0(Z)&&X0(X))return j3([Z,X]);return`${Z}${X}`};var WK=B(()=>{F0();g2()});import{once as xZ}from"node:events";var VK=async(Z,X)=>{let[J,q]=await tA(Z);return X.isForcefullyTerminated??=!1,[J,q]},tA=async(Z)=>{let[X,J]=await Promise.allSettled([xZ(Z,"spawn"),xZ(Z,"exit")]);if(X.status==="rejected")return[];return J.status==="rejected"?BK(Z):J.value},BK=async(Z)=>{try{return await xZ(Z,"exit")}catch{return BK(Z)}},LK=async(Z)=>{let[X,J]=await Z;if(!eA(X,J)&&EZ(X,J))throw new i0;return[X,J]},eA=(Z,X)=>Z===void 0&&X===void 0,EZ=(Z,X)=>Z!==0||X!==null;var PZ=B(()=>{g1()});var _K=({error:Z,status:X,signal:J,output:q},{maxBuffer:Q})=>{let $=ZI(Z,X,J),Y=$?.code==="ETIMEDOUT",H=nH($,q,Q);return{resultError:$,exitCode:X,signal:J,timedOut:Y,isMaxBuffer:H}},ZI=(Z,X,J)=>{if(Z!==void 0)return Z;return EZ(X,J)?new i0:void 0};var zK=B(()=>{g1();d1();PZ()});import{spawnSync as XI}from"node:child_process";var RK=(Z,X,J)=>{let{file:q,commandArguments:Q,command:$,escapedCommand:Y,startTime:H,verboseInfo:K,options:W,fileDescriptors:G}=JI(Z,X,J),V=$I({file:q,commandArguments:Q,options:W,command:$,escapedCommand:Y,verboseInfo:K,fileDescriptors:G,startTime:H});return m6(V,K,W)},JI=(Z,X,J)=>{let{command:q,escapedCommand:Q,startTime:$,verboseInfo:Y}=$8(Z,X,J),H=qI(J),{file:K,commandArguments:W,options:G}=C8(Z,X,H);QI(G);let V=mU(G,Y);return{file:K,commandArguments:W,command:q,escapedCommand:Q,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},qI=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,QI=({ipc:Z,ipcInput:X,detached:J,cancelSignal:q})=>{if(X)$5("ipcInput");if(Z)$5("ipc: true");if(J)$5("detached: true");if(q)$5("cancelSignal")},$5=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},$I=({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let K=YI({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,fileDescriptors:Y,startTime:H});if(K.failed)return K;let{resultError:W,exitCode:G,signal:V,timedOut:L,isMaxBuffer:_}=_K(K,J),{output:z,error:D=W}=UK({fileDescriptors:Y,syncResult:K,options:J,isMaxBuffer:_,verboseInfo:$}),M=z.map((N,R)=>U1(N,J,R)),F=U1(GK(z,J),J,"all");return UI({error:D,exitCode:G,signal:V,timedOut:L,isMaxBuffer:_,stdio:M,all:F,options:J,command:q,escapedCommand:Q,startTime:H})},YI=({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,fileDescriptors:$,startTime:Y})=>{try{qK($,J);let H=HI(J);return XI(...y8(Z,X,H))}catch(H){return f6({error:H,command:q,escapedCommand:Q,fileDescriptors:$,options:J,startTime:Y,isSync:!0})}},HI=({encoding:Z,maxBuffer:X,...J})=>({...J,encoding:"buffer",maxBuffer:c8(X)}),UI=({error:Z,exitCode:X,signal:J,timedOut:q,isMaxBuffer:Q,stdio:$,all:Y,options:H,command:K,escapedCommand:W,startTime:G})=>Z===void 0?l8({command:K,escapedCommand:W,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G}):b2({error:Z,command:K,escapedCommand:W,timedOut:q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Q,isForcefullyTerminated:!1,exitCode:X,signal:J,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G,isSync:!0});var MK=B(()=>{y3();XZ();JZ();h2();n8();pU();g2();QK();KK();d1();WK();zK()});import{once as vZ,on as KI}from"node:events";var FK=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},{reference:Q=!0,filter:$}={})=>{return v6({methodName:"getOneMessage",isSubprocess:J,ipc:q,isConnected:j8(Z)}),GI({anyProcess:Z,channel:X,isSubprocess:J,filter:$,reference:Q})},GI=async({anyProcess:Z,channel:X,isSubprocess:J,filter:q,reference:Q})=>{F8(X,Q);let $=I1(Z,X,J),Y=new AbortController;try{return await Promise.race([WI($,q,Y),VI($,J,Y),BI($,J,Y)])}catch(H){throw C6(Z),H}finally{Y.abort(),D8(X,Q)}},WI=async(Z,X,{signal:J})=>{if(X===void 0){let[q]=await vZ(Z,"message",{signal:J});return q}for await(let[q]of KI(Z,"message",{signal:J}))if(X(q))return q},VI=async(Z,X,{signal:J})=>{await vZ(Z,"disconnect",{signal:J}),xY(X)},BI=async(Z,X,{signal:J})=>{let[q]=await vZ(Z,"strict:error",{signal:J});throw _8(q,X)};var DK=B(()=>{y6();P2();E2()});import{once as AK,on as LI}from"node:events";var IK=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},{reference:Q=!0}={})=>CZ({anyProcess:Z,channel:X,isSubprocess:J,ipc:q,shouldAwait:!J,reference:Q}),CZ=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q,shouldAwait:Q,reference:$})=>{v6({methodName:"getEachMessage",isSubprocess:J,ipc:q,isConnected:j8(Z)}),F8(X,$);let Y=I1(Z,X,J),H=new AbortController,K={};return _I(Z,Y,H),zI({ipcEmitter:Y,isSubprocess:J,controller:H,state:K}),RI({anyProcess:Z,channel:X,ipcEmitter:Y,isSubprocess:J,shouldAwait:Q,controller:H,state:K,reference:$})},_I=async(Z,X,J)=>{try{await AK(X,"disconnect",{signal:J.signal}),J.abort()}catch{}},zI=async({ipcEmitter:Z,isSubprocess:X,controller:J,state:q})=>{try{let[Q]=await AK(Z,"strict:error",{signal:J.signal});q.error=_8(Q,X),J.abort()}catch{}},RI=async function*({anyProcess:Z,channel:X,ipcEmitter:J,isSubprocess:q,shouldAwait:Q,controller:$,state:Y,reference:H}){try{for await(let[K]of LI(J,"message",{signal:$.signal}))TK(Y),yield K}catch{TK(Y)}finally{if($.abort(),D8(X,H),!q)C6(Z);if(Q)await Z}},TK=({error:Z})=>{if(Z)throw Z};var yZ=B(()=>{y6();P2();E2()});import OK from"node:process";var wK=(Z,{ipc:X})=>{Object.assign(Z,NK(Z,!1,X))},jK=()=>{let Z=OK,X=!0,J=OK.channel!==void 0;return{...NK(Z,!0,J),getCancelSignal:qH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:J})}},NK=(Z,X,J)=>({sendMessage:E8.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J}),getOneMessage:FK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J}),getEachMessage:IK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J})});var SZ=B(()=>{P8();DK();yZ();O8()});import{ChildProcess as MI}from"node:child_process";import{PassThrough as FI,Readable as DI,Writable as TI,Duplex as AI}from"node:stream";var kK=({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,verboseInfo:Y})=>{FZ(q);let H=new MI;II(H,q),Object.assign(H,{readable:OI,writable:wI,duplex:jI});let K=f6({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,isSync:!1}),W=NI(K,Y,Q);return{subprocess:H,promise:W}},II=(Z,X)=>{let J=m2(),q=m2(),Q=m2(),$=Array.from({length:X.length-3},m2),Y=m2(),H=[J,q,Q,...$];Object.assign(Z,{stdin:J,stdout:q,stderr:Q,all:Y,stdio:H})},m2=()=>{let Z=new FI;return Z.end(),Z},OI=()=>new DI({read(){}}),wI=()=>new TI({write(){}}),jI=()=>new AI({read(){},write(){}}),NI=async(Z,X,J)=>m6(Z,X,J);var xK=B(()=>{r8();h2();n8()});import{createReadStream as EK,createWriteStream as PK}from"node:fs";import{Buffer as kI}from"node:buffer";import{Readable as u2,Writable as xI,Duplex as EI}from"node:stream";var CK=(Z,X)=>s8(PI,Z,X,!1),p2=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${O1[Z]}.`)},vK,PI;var yK=B(()=>{q5();r8();_0();vK={fileNumber:p2,generator:NZ,asyncGenerator:NZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:J}}){let q=X||J;return{stream:EI.fromWeb(Z,{objectMode:q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},PI={input:{...vK,fileUrl:({value:Z})=>({stream:EK(Z)}),filePath:({value:{file:Z}})=>({stream:EK(Z)}),webStream:({value:Z})=>({stream:u2.fromWeb(Z)}),iterable:({value:Z})=>({stream:u2.from(Z)}),asyncIterable:({value:Z})=>({stream:u2.from(Z)}),string:({value:Z})=>({stream:u2.from(Z)}),uint8Array:({value:Z})=>({stream:u2.from(kI.from(Z))})},output:{...vK,fileUrl:({value:Z})=>({stream:PK(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:PK(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:xI.fromWeb(Z)}),iterable:p2,asyncIterable:p2,string:p2,uint8Array:p2}}});import{on as vI,once as SK}from"node:events";import{PassThrough as CI,getDefaultHighWaterMark as yI}from"node:stream";import{finished as gK}from"node:stream/promises";function n1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let Q of Z)bZ(Q);let X=Z.some(({readableObjectMode:Q})=>Q),J=SI(Z,X),q=new fK({objectMode:X,writableHighWaterMark:J,readableHighWaterMark:J});for(let Q of Z)q.add(Q);return q}var SI=(Z,X)=>{if(Z.length===0)return yI(X);let J=Z.filter(({readableObjectMode:q})=>q===X).map(({readableHighWaterMark:q})=>q);return Math.max(...J)},fK,bI=async(Z,X,J)=>{Y5(Z,bK);let q=new AbortController;try{await Promise.race([hI(Z,q),gI(Z,X,J,q)])}finally{q.abort(),Y5(Z,-bK)}},hI=async(Z,{signal:X})=>{try{await gK(Z,{signal:X,cleanup:!0})}catch(J){throw mK(Z,J),J}},gI=async(Z,X,J,{signal:q})=>{for await(let[Q]of vI(Z,"unpipe",{signal:q}))if(X.has(Q))Q.emit(J)},bZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},fI=async({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,onFinished:$,unpipeEvent:Y})=>{Y5(Z,hK);let H=new AbortController;try{await Promise.race([mI($,X,H),uI({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,controller:H}),pI({stream:X,streams:J,ended:q,aborted:Q,unpipeEvent:Y,controller:H})])}finally{H.abort(),Y5(Z,-hK)}if(J.size>0&&J.size===q.size+Q.size)if(q.size===0&&Q.size>0)hZ(Z);else dI(Z)},mI=async(Z,X,{signal:J})=>{try{if(await Z,!J.aborted)hZ(X)}catch(q){if(!J.aborted)mK(X,q)}},uI=async({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,controller:{signal:$}})=>{try{if(await gK(X,{signal:$,cleanup:!0,readable:!0,writable:!1}),J.has(X))q.add(X)}catch(Y){if($.aborted||!J.has(X))return;if(uK(Y))Q.add(X);else pK(Z,Y)}},pI=async({stream:Z,streams:X,ended:J,aborted:q,unpipeEvent:Q,controller:{signal:$}})=>{if(await SK(Z,Q,{signal:$}),!Z.readable)return SK($,"abort",{signal:$});X.delete(Z),J.delete(Z),q.delete(Z)},dI=(Z)=>{if(Z.writable)Z.end()},mK=(Z,X)=>{if(uK(X))hZ(Z);else pK(Z,X)},uK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",hZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},pK=(Z,X)=>{if(!Z.destroyed)Z.once("error",cI),Z.destroy(X)},cI=()=>{},Y5=(Z,X)=>{let J=Z.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)Z.setMaxListeners(J+X)},bK=2,hK=1;var H5=B(()=>{fK=class fK extends CI{#J=new Set([]);#q=new Set([]);#X=new Set([]);#Y;#U=Symbol("unpipe");#V=new WeakMap;add(Z){if(bZ(Z),this.#J.has(Z))return;this.#J.add(Z),this.#Y??=bI(this,this.#J,this.#U);let X=fI({passThroughStream:this,stream:Z,streams:this.#J,ended:this.#q,aborted:this.#X,onFinished:this.#Y,unpipeEvent:this.#U});this.#V.set(Z,X),Z.pipe(this,{end:!1})}async remove(Z){if(bZ(Z),!this.#J.has(Z))return!1;let X=this.#V.get(Z);if(X===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await X,!0}}});import{finished as dK}from"node:stream/promises";var p6=(Z,X)=>{Z.pipe(X),lI(Z,X),nI(Z,X)},lI=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await dK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}gZ(X)},gZ=(Z)=>{if(Z.writable)Z.end()},nI=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await dK(X,{cleanup:!0,readable:!1,writable:!0})}catch{}fZ(Z)},fZ=(Z)=>{if(Z.readable)Z.destroy()};var U5=B(()=>{q1()});var cK=(Z,X,J)=>{let q=new Map;for(let[Q,{stdioItems:$,direction:Y}]of Object.entries(X)){for(let{stream:H}of $.filter(({type:K})=>j0.has(K)))iI(Z,H,Y,Q);for(let{stream:H}of $.filter(({type:K})=>!j0.has(K)))oI({subprocess:Z,stream:H,direction:Y,fdNumber:Q,pipeGroups:q,controller:J})}for(let[Q,$]of q.entries()){let Y=$.length===1?$[0]:n1($);p6(Y,Q)}},iI=(Z,X,J,q)=>{if(J==="output")p6(Z.stdio[q],X);else p6(X,Z.stdio[q]);let Q=aI[q];if(Q!==void 0)Z[Q]=X;Z.stdio[q]=X},aI,oI=({subprocess:Z,stream:X,direction:J,fdNumber:q,pipeGroups:Q,controller:$})=>{if(X===void 0)return;sI(X,$);let[Y,H]=J==="output"?[X,Z.stdio[q]]:[Z.stdio[q],X],K=Q.get(Y)??[];Q.set(Y,[...K,H])},sI=(Z,{signal:X})=>{if(y0(Z))f1(Z,rI,X)},rI=2;var lK=B(()=>{H5();q1();M8();_0();U5();aI=["stdin","stdout","stderr"]});var i1;var nK=B(()=>{i1=[];i1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")i1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")i1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class iK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(uZ[mZ])return uZ[mZ];tI(uZ,mZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let J=this.listeners[Z],q=J.indexOf(X);if(q===-1)return;if(q===0&&J.length===1)J.length=0;else J.splice(q,1)}emit(Z,X,J){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let q=!1;for(let Q of this.listeners[Z])q=Q(X,J)===!0||q;if(Z==="exit")q=this.emit("afterExit",X,J)||q;return q}}class dZ{}var K5=(Z)=>!!Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function",mZ,uZ,tI,eI=(Z)=>{return{onExit(X,J){return Z.onExit(X,J)},load(){return Z.load()},unload(){return Z.unload()}}},aK,oK,pZ,sK,Bd,Ld;var rK=B(()=>{nK();mZ=Symbol.for("signal-exit emitter"),uZ=globalThis,tI=Object.defineProperty.bind(Object);aK=class aK extends dZ{onExit(){return()=>{}}load(){}unload(){}};oK=class oK extends dZ{#J=pZ.platform==="win32"?"SIGINT":"SIGHUP";#q=new iK;#X;#Y;#U;#V={};#T=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of i1)this.#V[X]=()=>{let J=this.#X.listeners(X),{count:q}=this.#q,Q=Z;if(typeof Q.__signal_exit_emitter__==="object"&&typeof Q.__signal_exit_emitter__.count==="number")q+=Q.__signal_exit_emitter__.count;if(J.length===q){this.unload();let $=this.#q.emit("exit",null,X),Y=X==="SIGHUP"?this.#J:X;if(!$)Z.kill(Z.pid,Y)}};this.#U=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!K5(this.#X))return()=>{};if(this.#T===!1)this.load();let J=X?.alwaysLast?"afterExit":"exit";return this.#q.on(J,Z),()=>{if(this.#q.removeListener(J,Z),this.#q.listeners.exit.length===0&&this.#q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#T)return;this.#T=!0,this.#q.count+=1;for(let Z of i1)try{let X=this.#V[Z];if(X)this.#X.on(Z,X)}catch(X){}this.#X.emit=(Z,...X)=>{return this.#H(Z,...X)},this.#X.reallyExit=(Z)=>{return this.#z(Z)}}unload(){if(!this.#T)return;this.#T=!1,i1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(J){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#U,this.#q.count-=1}#z(Z){if(!K5(this.#X))return 0;return this.#X.exitCode=Z||0,this.#q.emit("exit",this.#X.exitCode,null),this.#U.call(this.#X,this.#X.exitCode)}#H(Z,...X){let J=this.#Y;if(Z==="exit"&&K5(this.#X)){if(typeof X[0]==="number")this.#X.exitCode=X[0];let q=J.call(this.#X,Z,...X);return this.#q.emit("exit",this.#X.exitCode,null),q}else return J.call(this.#X,Z,...X)}};pZ=globalThis.process,{onExit:sK,load:Bd,unload:Ld}=eI(K5(pZ)?new oK(pZ):new aK)});import{addAbortListener as ZO}from"node:events";var tK=(Z,{cleanup:X,detached:J},{signal:q})=>{if(!X||J)return;let Q=sK(()=>{Z.kill()});ZO(q,()=>{Q()})};var eK=B(()=>{rK()});var XG=({source:Z,sourcePromise:X,boundOptions:J,createNested:q},...Q)=>{let $=q8(),{destination:Y,destinationStream:H,destinationError:K,from:W,unpipeSignal:G}=XO(J,q,Q),{sourceStream:V,sourceError:L}=qO(Z,W),{options:_,fileDescriptors:z}=o0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:_,sourceError:L,destination:Y,destinationStream:H,destinationError:K,unpipeSignal:G,fileDescriptors:z,startTime:$}},XO=(Z,X,J)=>{try{let{destination:q,pipeOptions:{from:Q,to:$,unpipeSignal:Y}={}}=JO(Z,X,...J),H=R8(q,$);return{destination:q,destinationStream:H,from:Q,unpipeSignal:Y}}catch(q){return{destinationError:q}}},JO=(Z,X,J,...q)=>{if(Array.isArray(J))return{destination:X(ZG,Z)(J,...q),pipeOptions:Z};if(typeof J==="string"||J instanceof URL||I3(J)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[Q,$,Y]=n4(J,...q);return{destination:X(ZG)(Q,$,Y),pipeOptions:Y}}if(o0.has(J)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:J,pipeOptions:q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},ZG=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),qO=(Z,X)=>{try{return{sourceStream:b6(Z,X)}}catch(J){return{sourceError:J}}};var JG=B(()=>{w3();Q8();A1();k6()});var QG=({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q,fileDescriptors:Q,sourceOptions:$,startTime:Y})=>{let H=QO({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q});if(H!==void 0)throw cZ({error:H,fileDescriptors:Q,sourceOptions:$,startTime:Y})},QO=({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q})=>{if(X!==void 0&&q!==void 0)return q;if(q!==void 0)return fZ(Z),q;if(X!==void 0)return gZ(J),X},cZ=({error:Z,fileDescriptors:X,sourceOptions:J,startTime:q})=>f6({error:Z,command:qG,escapedCommand:qG,fileDescriptors:X,options:J,startTime:q,isSync:!1}),qG="source.pipe(destination)";var lZ=B(()=>{h2();U5()});var $G=async(Z)=>{let[{status:X,reason:J,value:q=J},{status:Q,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(q))Y.pipedFrom.push(q);if(Q==="rejected")throw Y;if(X==="rejected")throw q;return Y};var YG=()=>{};import{finished as $O}from"node:stream/promises";var HG=(Z,X,J)=>{let q=G5.has(X)?HO(Z,X):YO(Z,X);return f1(Z,KO,J.signal),f1(X,GO,J.signal),UO(X),q},YO=(Z,X)=>{let J=n1([Z]);return p6(J,X),G5.set(X,J),J},HO=(Z,X)=>{let J=G5.get(X);return J.add(Z),J},UO=async(Z)=>{try{await $O(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}G5.delete(Z)},G5,KO=2,GO=1;var UG=B(()=>{H5();M8();U5();G5=new WeakMap});import{aborted as WO}from"node:util";var KG=(Z,X)=>Z===void 0?[]:[VO(Z,X)],VO=async(Z,{sourceStream:X,mergedStream:J,fileDescriptors:q,sourceOptions:Q,startTime:$})=>{await WO(Z,X),await J.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw cZ({error:Y,fileDescriptors:q,sourceOptions:Q,startTime:$})};var GG=B(()=>{lZ()});var W5=(Z,...X)=>{if(t(X[0]))return W5.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:J,...q}=XG(Z,...X),Q=BO({...q,destination:J});return Q.pipe=W5.bind(void 0,{...Z,source:J,sourcePromise:Q,boundOptions:{}}),Q},BO=async({sourcePromise:Z,sourceStream:X,sourceOptions:J,sourceError:q,destination:Q,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:K,startTime:W})=>{let G=LO(Z,Q);QG({sourceStream:X,sourceError:q,destinationStream:$,destinationError:Y,fileDescriptors:K,sourceOptions:J,startTime:W});let V=new AbortController;try{let L=HG(X,$,V);return await Promise.race([$G(G),...KG(H,{sourceStream:X,mergedStream:L,sourceOptions:J,fileDescriptors:K,startTime:W})])}finally{V.abort()}},LO=(Z,X)=>Promise.allSettled([Z,X]);var WG=B(()=>{X1();JG();lZ();YG();UG();GG()});import{on as _O}from"node:events";import{getDefaultHighWaterMark as zO}from"node:stream";var V5=({subprocessStdout:Z,subprocess:X,binary:J,shouldEncode:q,encoding:Q,preserveNewlines:$})=>{let Y=new AbortController;return RO(X,Y),BG({stream:Z,controller:Y,binary:J,shouldEncode:!Z.readableObjectMode&&q,encoding:Q,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},RO=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},nZ=({stream:Z,onStreamEnd:X,lines:J,encoding:q,stripFinalNewline:Q,allMixed:$})=>{let Y=new AbortController;MO(X,Y,Z);let H=Z.readableObjectMode&&!$;return BG({stream:Z,controller:Y,binary:q==="buffer",shouldEncode:!H,encoding:q,shouldSplit:!H&&J,preserveNewlines:!Q})},MO=async(Z,X,J)=>{try{await Z}catch{J.destroy()}finally{X.abort()}},BG=({stream:Z,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y})=>{let H=_O(Z,"data",{signal:X.signal,highWaterMark:VG,highWatermark:VG});return FO({onStdoutChunk:H,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y})},iZ,VG,FO=async function*({onStdoutChunk:Z,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y}){let H=DO({binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y});try{for await(let[K]of Z)yield*l1(K,H,0)}catch(K){if(!X.signal.aborted)throw K}finally{yield*f2(H)}},DO=({binary:Z,shouldEncode:X,encoding:J,shouldSplit:q,preserveNewlines:Q})=>[Z5(Z,J,!X),t8(Z,Q,!q,{})].filter(Boolean);var B5=B(()=>{IZ();e8();jZ();iZ=zO(!0),VG=iZ});import{setImmediate as TO}from"node:timers/promises";var LG=async({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,buffer:Q,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:K,verboseInfo:W,streamInfo:G})=>{let V=AO({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,allMixed:H,verboseInfo:W,streamInfo:G});if(!Q){await Promise.all([IO(Z),V]);return}let L=DZ(K,J),_=nZ({stream:Z,onStreamEnd:X,lines:Y,encoding:q,stripFinalNewline:L,allMixed:H}),[z]=await Promise.all([OO({stream:Z,iterable:_,fdNumber:J,encoding:q,maxBuffer:$,lines:Y}),V]);return z},AO=async({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,allMixed:Q,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!Q5({stdioItems:Y[J]?.stdioItems,encoding:q,verboseInfo:$,fdNumber:J}))return;let H=nZ({stream:Z,onStreamEnd:X,lines:!0,encoding:q,stripFinalNewline:!0,allMixed:Q});await $K(H,Z,J,$)},IO=async(Z)=>{if(await TO(),Z.readableFlowing===null)Z.resume()},OO=async({stream:Z,stream:{readableObjectMode:X},iterable:J,fdNumber:q,encoding:Q,maxBuffer:$,lines:Y})=>{try{if(X||Y)return await f8(J,{maxBuffer:$});if(Q==="buffer")return new Uint8Array(await m8(J,{maxBuffer:$}));return await p8(J,{maxBuffer:$})}catch(H){return _G(dH({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:Q,fdNumber:q}))}},aZ=async(Z)=>{try{return await Z}catch(X){return _G(X)}},_G=({bufferedData:Z})=>A9(Z)?new Uint8Array(Z):Z;var oZ=B(()=>{d8();F0();kZ();B5();d1();g2()});import{finished as wO}from"node:stream/promises";var d2=async(Z,X,J,{isSameDirection:q,stopOnExit:Q=!1}={})=>{let $=jO(Z,J),Y=new AbortController;try{await Promise.race([...Q?[J.exitPromise]:[],wO(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)xO(H,X,J,q)}finally{Y.abort()}},jO=(Z,{originalStreams:[X],subprocess:J})=>{let q={stdinCleanedUp:!1};if(Z===X)NO(Z,J,q);return q},NO=(Z,X,J)=>{let{_destroy:q}=Z;Z._destroy=(...Q)=>{kO(X,J),q.call(Z,...Q)}},kO=({exitCode:Z,signalCode:X},J)=>{if(Z!==null||X!==null)J.stdinCleanedUp=!0},xO=(Z,X,J,q)=>{if(!EO(Z,X,J,q))throw Z},EO=(Z,X,J,q=!0)=>{if(J.propagating)return zG(Z)||L5(Z);return J.propagating=!0,sZ(J,X)===q?zG(Z):L5(Z)},sZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",L5=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",zG=(Z)=>Z?.code==="EPIPE";var _5=()=>{};var RG=({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((K,W)=>rZ({stream:K,fdNumber:W,encoding:X,buffer:J[W],maxBuffer:q[W],lines:Q[W],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),rZ=async({stream:Z,fdNumber:X,encoding:J,buffer:q,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W})=>{if(!Z)return;let G=d2(Z,X,W);if(sZ(W,X)){await G;return}let[V]=await Promise.all([LG({stream:Z,onStreamEnd:G,fdNumber:X,encoding:J,buffer:q,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W}),G]);return V};var tZ=B(()=>{oZ();_5()});var MG=({stdout:Z,stderr:X},{all:J})=>J&&(Z||X)?n1([Z,X].filter(Boolean)):void 0,FG=({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>rZ({...PO(Z,J),fdNumber:"all",encoding:X,maxBuffer:q[1]+q[2],lines:Q[1]||Q[2],allMixed:vO(Z),stripFinalNewline:$,verboseInfo:Y,streamInfo:H}),PO=({stdout:Z,stderr:X,all:J},[,q,Q])=>{let $=q||Q;if(!$)return{stream:J,buffer:$};if(!q)return{stream:X,buffer:$};if(!Q)return{stream:Z,buffer:$};return{stream:J,buffer:$}},vO=({all:Z,stdout:X,stderr:J})=>Z&&X&&J&&X.readableObjectMode!==J.readableObjectMode;var eZ=B(()=>{H5();tZ()});var DG=(Z)=>E6(Z,"ipc"),TG=(Z,X)=>{let J=J8(Z);n0({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:X})};var AG=B(()=>{P6();D1()});var IG=async({subprocess:Z,buffer:X,maxBuffer:J,ipc:q,ipcOutput:Q,verboseInfo:$})=>{if(!q)return Q;let Y=DG($),H=Q1(X,"ipc"),K=Q1(J,"ipc");for await(let W of CZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:q,shouldAwait:!1,reference:!0})){if(H)cH(Z,Q,K),Q.push(W);if(Y)TG(W,$)}return Q},OG=async(Z,X)=>{return await Promise.allSettled([Z]),X};var wG=B(()=>{d1();AG();$1();yZ()});import{once as CO}from"node:events";var jG=async({subprocess:Z,options:{encoding:X,buffer:J,maxBuffer:q,lines:Q,timeoutDuration:$,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,stripFinalNewline:W,ipc:G,ipcInput:V},context:L,verboseInfo:_,fileDescriptors:z,originalStreams:D,onInternalError:M,controller:F})=>{let N=VK(Z,L),R={originalStreams:D,fileDescriptors:z,subprocess:Z,exitPromise:N,propagating:!1},w=RG({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:R}),A=FG({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:R}),I=[],T=IG({subprocess:Z,buffer:J,maxBuffer:q,ipc:G,ipcOutput:I,verboseInfo:_}),b=yO(D,Z,R),j=SO(z,R);try{return await Promise.race([Promise.all([{},LK(N),Promise.all(w),A,T,BH(Z,V),...b,...j]),M,bO(Z,F),...UH(Z,$,L,F),...kY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,context:L,controller:F}),...YH({subprocess:Z,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,context:L,controller:F})])}catch(x){return L.terminationReason??="other",Promise.all([{error:x},N,Promise.all(w.map((v)=>aZ(v))),aZ(A),OG(T,I),Promise.allSettled(b),Promise.allSettled(j)])}},yO=(Z,X,J)=>Z.map((q,Q)=>q===X.stdio[Q]?void 0:d2(q,Q,J)),SO=(Z,X)=>Z.flatMap(({stdioItems:J},q)=>J.filter(({value:Q,stream:$=Q})=>b0($,{checkOpen:!1})&&!y0($)).map(({type:Q,value:$,stream:Y=$})=>d2(Y,q,X,{isSameDirection:j0.has(Q),stopOnExit:Q==="native"}))),bO=async(Z,{signal:X})=>{let[J]=await CO(Z,"error",{signal:X});throw J};var NG=B(()=>{p1();s3();u3();o3();q1();_0();oZ();wG();t3();eZ();tZ();PZ();_5()});var kG=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),c2=(Z,X,J)=>{let q=Z[J];if(!q.has(X))q.set(X,[]);let Q=q.get(X),$=a0();return Q.push($),{resolve:$.resolve.bind($),promises:Q}},d6=async({resolve:Z,promises:X},J)=>{Z();let[q]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...X])]);return!q};var z5=B(()=>{S6()});import{finished as xG}from"node:stream/promises";var ZX=async(Z)=>{if(Z===void 0)return;try{await XX(Z)}catch{}},EG=async(Z)=>{if(Z===void 0)return;try{await JX(Z)}catch{}},XX=async(Z)=>{await xG(Z,{cleanup:!0,readable:!1,writable:!0})},JX=async(Z)=>{await xG(Z,{cleanup:!0,readable:!0,writable:!1})},R5=async(Z,X)=>{if(await Z,X)throw X},M5=(Z,X,J)=>{if(J&&!L5(J))Z.destroy(J);else if(X)Z.destroy()};var qX=B(()=>{_5()});import{Readable as hO}from"node:stream";import{callbackify as gO}from"node:util";var PG=({subprocess:Z,concurrentStreams:X,encoding:J},{from:q,binary:Q=!0,preserveNewlines:$=!0}={})=>{let Y=Q||D0.has(J),{subprocessStdout:H,waitReadableDestroy:K}=QX(Z,q,X),{readableEncoding:W,readableObjectMode:G,readableHighWaterMark:V}=$X(H,Y),{read:L,onStdoutDataDone:_}=YX({subprocessStdout:H,subprocess:Z,binary:Y,encoding:J,preserveNewlines:$}),z=new hO({read:L,destroy:gO(UX.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:K})),highWaterMark:V,objectMode:G,encoding:W});return HX({subprocessStdout:H,onStdoutDataDone:_,readable:z,subprocess:Z}),z},QX=(Z,X,J)=>{let q=b6(Z,X),Q=c2(J,q,"readableDestroy");return{subprocessStdout:q,waitReadableDestroy:Q}},$X=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:J},q)=>q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:J}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:iZ},YX=({subprocessStdout:Z,subprocess:X,binary:J,encoding:q,preserveNewlines:Q})=>{let $=a0(),Y=V5({subprocessStdout:Z,subprocess:X,binary:J,shouldEncode:!J,encoding:q,preserveNewlines:Q});return{read(){fO(this,Y,$)},onStdoutDataDone:$}},fO=async(Z,X,J)=>{try{let{value:q,done:Q}=await X.next();if(Q)J.resolve();else Z.push(q)}catch{}},HX=async({subprocessStdout:Z,onStdoutDataDone:X,readable:J,subprocess:q,subprocessStdin:Q})=>{try{if(await JX(Z),await q,await ZX(Q),await X,J.readable)J.push(null)}catch($){await ZX(Q),vG(J,$)}},UX=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:J},q)=>{if(await d6(J,X))vG(Z,q),await R5(X,q)},vG=(Z,X)=>{M5(Z,Z.readable,X)};var KX=B(()=>{m1();A1();B5();S6();z5();qX()});import{Writable as mO}from"node:stream";import{callbackify as CG}from"node:util";var yG=({subprocess:Z,concurrentStreams:X},{to:J}={})=>{let{subprocessStdin:q,waitWritableFinal:Q,waitWritableDestroy:$}=GX(Z,J,X),Y=new mO({...WX(q,Z,Q),destroy:CG(BX.bind(void 0,{subprocessStdin:q,subprocess:Z,waitWritableFinal:Q,waitWritableDestroy:$})),highWaterMark:q.writableHighWaterMark,objectMode:q.writableObjectMode});return VX(q,Y),Y},GX=(Z,X,J)=>{let q=R8(Z,X),Q=c2(J,q,"writableFinal"),$=c2(J,q,"writableDestroy");return{subprocessStdin:q,waitWritableFinal:Q,waitWritableDestroy:$}},WX=(Z,X,J)=>({write:uO.bind(void 0,Z),final:CG(pO.bind(void 0,Z,X,J))}),uO=(Z,X,J,q)=>{if(Z.write(X,J))q();else Z.once("drain",q)},pO=async(Z,X,J)=>{if(await d6(J,X)){if(Z.writable)Z.end();await X}},VX=async(Z,X,J)=>{try{if(await XX(Z),X.writable)X.end()}catch(q){await EG(J),SG(X,q)}},BX=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:J,waitWritableDestroy:q},Q)=>{if(await d6(J,X),await d6(q,X))SG(Z,Q),await R5(X,Q)},SG=(Z,X)=>{M5(Z,Z.writable,X)};var LX=B(()=>{A1();z5();qX()});import{Duplex as dO}from"node:stream";import{callbackify as cO}from"node:util";var bG=({subprocess:Z,concurrentStreams:X,encoding:J},{from:q,to:Q,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||D0.has(J),{subprocessStdout:K,waitReadableDestroy:W}=QX(Z,q,X),{subprocessStdin:G,waitWritableFinal:V,waitWritableDestroy:L}=GX(Z,Q,X),{readableEncoding:_,readableObjectMode:z,readableHighWaterMark:D}=$X(K,H),{read:M,onStdoutDataDone:F}=YX({subprocessStdout:K,subprocess:Z,binary:H,encoding:J,preserveNewlines:Y}),N=new dO({read:M,...WX(G,Z,V),destroy:cO(lO.bind(void 0,{subprocessStdout:K,subprocessStdin:G,subprocess:Z,waitReadableDestroy:W,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:D,writableHighWaterMark:G.writableHighWaterMark,readableObjectMode:z,writableObjectMode:G.writableObjectMode,encoding:_});return HX({subprocessStdout:K,onStdoutDataDone:F,readable:N,subprocess:Z,subprocessStdin:G}),VX(G,N,K),N},lO=async({subprocessStdout:Z,subprocessStdin:X,subprocess:J,waitReadableDestroy:q,waitWritableFinal:Q,waitWritableDestroy:$},Y)=>{await Promise.all([UX({subprocessStdout:Z,subprocess:J,waitReadableDestroy:q},Y),BX({subprocessStdin:X,subprocess:J,waitWritableFinal:Q,waitWritableDestroy:$},Y)])};var hG=B(()=>{m1();KX();LX()});var _X=(Z,X,{from:J,binary:q=!1,preserveNewlines:Q=!1}={})=>{let $=q||D0.has(X),Y=b6(Z,J),H=V5({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:X,preserveNewlines:Q});return nO(H,Y,Z)},nO=async function*(Z,X,J){try{yield*Z}finally{if(X.readable)X.destroy();await J}};var gG=B(()=>{m1();A1();B5()});var fG=(Z,{encoding:X})=>{let J=kG();Z.readable=PG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:X}),Z.writable=yG.bind(void 0,{subprocess:Z,concurrentStreams:J}),Z.duplex=bG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:X}),Z.iterable=_X.bind(void 0,Z,X),Z[Symbol.asyncIterator]=_X.bind(void 0,Z,X,{})};var mG=B(()=>{z5();KX();LX();hG();gG()});var uG=(Z,X)=>{for(let[J,q]of aO){let Q=q.value.bind(X);Reflect.defineProperty(Z,J,{...q,value:Q})}},iO,aO;var pG=B(()=>{iO=(async()=>{})().constructor.prototype,aO=["then","catch","finally"].map((Z)=>[Z,Reflect.getOwnPropertyDescriptor(iO,Z)])});import{setMaxListeners as oO}from"node:events";import{spawn as sO}from"node:child_process";var dG=(Z,X,J,q)=>{let{file:Q,commandArguments:$,command:Y,escapedCommand:H,startTime:K,verboseInfo:W,options:G,fileDescriptors:V}=rO(Z,X,J),{subprocess:L,promise:_}=eO({file:Q,commandArguments:$,options:G,startTime:K,verboseInfo:W,command:Y,escapedCommand:H,fileDescriptors:V});return L.pipe=W5.bind(void 0,{source:L,sourcePromise:_,boundOptions:{},createNested:q}),uG(L,_),o0.set(L,{options:G,fileDescriptors:V}),L},rO=(Z,X,J)=>{let{command:q,escapedCommand:Q,startTime:$,verboseInfo:Y}=$8(Z,X,J),{file:H,commandArguments:K,options:W}=C8(Z,X,J),G=tO(W),V=CK(G,Y);return{file:H,commandArguments:K,command:q,escapedCommand:Q,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},tO=({timeout:Z,signal:X,...J})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:Z}},eO=({file:Z,commandArguments:X,options:J,startTime:q,verboseInfo:Q,command:$,escapedCommand:Y,fileDescriptors:H})=>{let K;try{K=sO(...y8(Z,X,J))}catch(z){return kK({error:z,command:$,escapedCommand:Y,fileDescriptors:H,options:J,startTime:q,verboseInfo:Q})}let W=new AbortController;oO(Number.POSITIVE_INFINITY,W.signal);let G=[...K.stdio];cK(K,H,W),tK(K,J,W);let V={},L=a0();K.kill=jY.bind(void 0,{kill:K.kill.bind(K),options:J,onInternalError:L,context:V,controller:W}),K.all=MG(K,J),fG(K,J),wK(K,J);let _=Zw({subprocess:K,options:J,startTime:q,verboseInfo:Q,fileDescriptors:H,originalStreams:G,command:$,escapedCommand:Y,context:V,onInternalError:L,controller:W});return{subprocess:K,promise:_}},Zw=async({subprocess:Z,options:X,startTime:J,verboseInfo:q,fileDescriptors:Q,originalStreams:$,command:Y,escapedCommand:H,context:K,onInternalError:W,controller:G})=>{let[V,[L,_],z,D,M]=await jG({subprocess:Z,options:X,context:K,verboseInfo:q,fileDescriptors:Q,originalStreams:$,onInternalError:W,controller:G});G.abort(),W.resolve();let F=z.map((w,A)=>U1(w,X,A)),N=U1(D,X,"all"),R=Xw({errorInfo:V,exitCode:L,signal:_,stdio:F,all:N,ipcOutput:M,context:K,options:X,command:Y,escapedCommand:H,startTime:J});return m6(R,q,X)},Xw=({errorInfo:Z,exitCode:X,signal:J,stdio:q,all:Q,ipcOutput:$,context:Y,options:H,command:K,escapedCommand:W,startTime:G})=>("error"in Z)?b2({error:Z.error,command:K,escapedCommand:W,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof Y1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:J,stdio:q,all:Q,ipcOutput:$,options:H,startTime:G,isSync:!1}):l8({command:K,escapedCommand:W,stdio:q,all:Q,ipcOutput:$,options:H,startTime:G});var cG=B(()=>{d8();y3();XZ();A1();JZ();SZ();h2();n8();xK();yK();g2();lK();B8();eK();WG();eZ();NG();mG();S6();pG()});var F5=(Z,X)=>{let J=Object.fromEntries(Object.entries(X).map(([q,Q])=>[q,Jw(q,Z[q],Q)]));return{...Z,...J}},Jw=(Z,X,J)=>{if(qw.has(Z)&&t(X)&&t(J))return{...X,...J};return J},qw;var lG=B(()=>{X1();$1();qw=new Set(["env",...E3])});var w1=(Z,X,J,q)=>{let Q=(Y,H,K)=>w1(Y,H,J,K),$=(...Y)=>Qw({mapArguments:Z,deepOptions:J,boundOptions:X,setBoundExeca:q,createNested:Q},...Y);if(q!==void 0)q($,Q,X);return $},Qw=({mapArguments:Z,deepOptions:X={},boundOptions:J={},setBoundExeca:q,createNested:Q},$,...Y)=>{if(t($))return Q(Z,F5(J,$),q);let{file:H,commandArguments:K,options:W,isSync:G}=$w({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:X,boundOptions:J});return G?RK(H,K,W):dG(H,K,W,Q)},$w=({mapArguments:Z,firstArgument:X,nextArguments:J,deepOptions:q,boundOptions:Q})=>{let $=k9(X)?x9(X,J):[X,...J],[Y,H,K]=n4(...$),W=F5(F5(q,Q),K),{file:G=Y,commandArguments:V=H,options:L=W,isSync:_=!1}=Z({file:Y,commandArguments:H,options:W});return{file:G,commandArguments:V,options:L,isSync:_}};var nG=B(()=>{X1();w3();E9();MK();cG();lG()});var iG=({file:Z,commandArguments:X})=>oG(Z,X),aG=({file:Z,commandArguments:X})=>({...oG(Z,X),isSync:!0}),oG=(Z,X)=>{if(X.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${Z} ${X}.`);let[J,...q]=Yw(Z);return{file:J,commandArguments:q}},Yw=(Z)=>{if(typeof Z!=="string")throw TypeError(`The command must be a string: ${String(Z)}.`);let X=Z.trim();if(X==="")return[];let J=[];for(let q of X.split(Hw)){let Q=J.at(-1);if(Q&&Q.endsWith("\\"))J[J.length-1]=`${Q.slice(0,-1)} ${q}`;else J.push(q)}return J},Hw;var sG=B(()=>{Hw=/ +/g});var rG=(Z,X,J)=>{Z.sync=X(Uw,J),Z.s=Z.sync},tG=({options:Z})=>eG(Z),Uw=({options:Z})=>({...eG(Z),isSync:!0}),eG=(Z)=>({options:{...Kw(Z),...Z}}),Kw=({input:Z,inputFile:X,stdio:J})=>Z===void 0&&X===void 0&&J===void 0?{stdin:"inherit"}:{},ZW;var XW=B(()=>{ZW={preferLocal:!0}});var zX,N0,qn,Qn,$n,Yn,Hn,Un,Kn,Gn;var c6=B(()=>{nG();sG();r3();XW();SZ();zX=w1(()=>({})),N0=w1(()=>({isSync:!0})),qn=w1(iG),Qn=w1(aG),$n=w1(GH),Yn=w1(tG,{},ZW,rG),{sendMessage:Hn,getOneMessage:Un,getEachMessage:Kn,getCancelSignal:Gn}=jK()});async function Gw(Z){if(process.platform==="win32"){let J=await zX(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(J.exitCode!==0||!J.stdout)return null;return J.stdout.trim().split(/\r?\n/)[0]||null}let X=await zX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function Ww(Z){if(process.platform==="win32")try{return F6(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return F6(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var RX,JW,D5;var T5=B(()=>{c6();a7();RX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,JW=RX?async(Z)=>RX(Z):Gw,D5=RX??Ww});function qW(Z,X){return{cmd:D5(Z)??Z,args:X}}var QW=B(()=>{T5()});import{dirname as Vw,join as $W}from"path";async function l6(Z){try{return!!await JW(Z)}catch{return!1}}function Rw(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function Fw(){if(process.env.CURSOR_TRACE_ID)return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("cursor"))return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("windsurf"))return"windsurf";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("antigravity"))return"antigravity";let Z=process.env.__CFBundleIdentifier?.toLowerCase();if(Z?.includes("vscodium"))return"codium";if(Z?.includes("windsurf"))return"windsurf";if(Z?.includes("com.google.android.studio"))return"androidstudio";if(Z){for(let X of Mw)if(Z.includes(X))return X}if(process.env.VisualStudioVersion)return"visualstudio";if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(process.platform==="darwin")return"pycharm";return"pycharm"}if(process.env.TERM==="xterm-ghostty")return"ghostty";if(process.env.TERM?.includes("kitty"))return"kitty";if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return"tmux";if(process.env.STY)return"screen";if(process.env.KONSOLE_VERSION)return"konsole";if(process.env.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(process.env.XTERM_VERSION)return"xterm";if(process.env.VTE_VERSION)return"vte-based";if(process.env.TERMINATOR_UUID)return"terminator";if(process.env.KITTY_WINDOW_ID)return"kitty";if(process.env.ALACRITTY_LOG)return"alacritty";if(process.env.TILIX_ID)return"tilix";if(process.env.WT_SESSION)return"windows-terminal";if(process.env.SESSIONNAME&&process.env.TERM==="cygwin")return"cygwin";if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return"conemu";if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(KW())return"ssh-session";if(process.env.TERM){let X=process.env.TERM;if(X.includes("alacritty"))return"alacritty";if(X.includes("rxvt"))return"rxvt";if(X.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function KW(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function wn(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return n6.platform}var V0,Bw,Lw,_w,UW,zw,Mw,Dw,n6;var MX=B(()=>{L1();HW();D9();d0();QW();R0();T5();V0=u(()=>{let Z=YW(),X=Y0(),J=$W(X,`config${Z}.json`);if(!k().existsSync(J)){let Q=process.env.CLAUDIO_CONFIG_DIR?X:Vw(X),$=$W(Q,`.claudio${Z}.json`);if(k().existsSync($))return $}return J}),Bw=u(async()=>{try{let{default:Z}=await import("./index-0.1.9-96thm65j.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});Lw=u(async()=>{let Z=[];if(await l6("npm"))Z.push("npm");if(await l6("yarn"))Z.push("yarn");if(await l6("pnpm"))Z.push("pnpm");return Z}),_w=u(async()=>{let Z=[];if(await l6("bun"))Z.push("bun");if(await l6("deno"))Z.push("deno");if(await l6("node"))Z.push("node");return Z}),UW=u(()=>{try{return k().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),zw=u(()=>{try{if(!UW())return!1;let{cmd:Z}=qW("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});Mw=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];Dw=u(()=>{if(e(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(e(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(e(process.env.RENDER))return"render";if(e(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(e(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(k().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(e(process.env.GITHUB_ACTIONS))return"github-actions";if(e(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(e(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(k().existsSync("/.dockerenv"))return"docker"}catch{}if(n6.platform==="darwin")return"unknown-darwin";if(n6.platform==="linux")return"unknown-linux";if(n6.platform==="win32")return"unknown-win32";return"unknown"});n6={hasInternetAccess:Bw,isCI:e(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:Fw(),isSSH:KW,getPackageManagers:Lw,getRuntimes:_w,isRunningWithBun:u(F9),isWslEnvironment:UW,isNpmFromWindowsPath:zw,isConductor:Rw,detectDeploymentEnvironment:Dw}});var kn,xn="∙",En="✻",Pn="↑",vn="↓",Cn="↯",yn="○",Sn="◐",bn="●",hn="◉",GW="⏸",gn="↻",fn="◇",mn="◆",un="※",pn="▎",dn="·✔︎·",cn="×";var WW=B(()=>{MX();kn=n6.platform==="darwin"?"⏺":"●"});var FX,Tw,l2;var VW=B(()=>{FX=["acceptEdits","bypassPermissions","default","dontAsk","plan"],Tw=[...FX,"auto"],l2=Tw});function Zi(Z){return!0}function A5(Z){return BW[Z]??BW.default}function Xi(Z){return A5(Z).external}function Ji(Z){return l2.includes(Z)?Z:"default"}function qi(Z){return A5(Z).title}function Qi(Z){return Z==="default"||Z===void 0}function $i(Z){return A5(Z).symbol}function Yi(Z){return A5(Z).color}var tn,en,BW;var LW=B(()=>{l0();WW();VW();b1();tn=O(()=>DX.enum(l2)),en=O(()=>DX.enum(FX)),BW={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:GW,color:"planMode",external:"plan"},acceptEdits:{title:"Accept edits",shortTitle:"Accept",symbol:"⏵⏵",color:"autoAccept",external:"acceptEdits"},bypassPermissions:{title:"Bypass Permissions",shortTitle:"Bypass",symbol:"⏵⏵",color:"error",external:"bypassPermissions"},dontAsk:{title:"Don't Ask",shortTitle:"DontAsk",symbol:"⏵⏵",color:"error",external:"dontAsk"},...{auto:{title:"Auto mode",shortTitle:"Auto",symbol:"⏵⏵",color:"warning",external:"default"}}}});var _W=()=>{};var zW;var RW=B(()=>{_W();zW=["PreToolUse","PostToolUse","PostToolUseFailure","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","StopFailure","SubagentStart","SubagentStop","PreCompact","PostCompact","PermissionRequest","PermissionDenied","Setup","TeammateIdle","TaskCreated","TaskCompleted","Elicitation","ElicitationResult","ConfigChange","WorktreeCreate","WorktreeRemove","InstructionsLoaded","CwdChanged","FileChanged"]});var MW=()=>{};var FW=()=>{};var DW=B(()=>{RW();MW();FW()});var TW,Li="bash";var AW=B(()=>{TW=["bash","powershell"]});function Aw(){let Z=U.object({type:U.literal("command").describe("Shell command hook type"),command:U.string().describe("Shell command to execute"),if:I5(),shell:U.enum(TW).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:U.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:U.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),X=U.object({type:U.literal("prompt").describe("LLM prompt hook type"),prompt:U.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:U.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-4-6"). If not specified, uses the default small fast model.'),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")}),J=U.object({type:U.literal("http").describe("HTTP hook type"),url:U.string().url().describe("URL to POST the hook input JSON to"),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:U.record(U.string(),U.string()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.'),allowedEnvVars:U.array(U.string()).optional().describe("Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work."),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=U.object({type:U.literal("agent").describe("Agentic verifier hook type"),prompt:U.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:U.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.'),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:J,AgentHookSchema:q}}var I5,IW,OW,a1;var O5=B(()=>{DW();l0();b1();AW();I5=O(()=>U.string().optional().describe('Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.'));IW=O(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:J,HttpHookSchema:q}=Aw();return U.discriminatedUnion("type",[Z,X,J,q])}),OW=O(()=>U.object({matcher:U.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:U.array(IW()).describe("List of hooks to execute when the matcher matches")})),a1=O(()=>U.partialRecord(U.enum(zW),U.array(OW())))});var Ii,Oi,Iw,Ow,wW,ww,jw,Nw,kw,xw,Ew,Pw,w5,wi;var jW=B(()=>{l0();b1();Ii=O(()=>U.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),Oi=O(()=>U.enum(["stdio","sse","sse-ide","http","ws","sdk"])),Iw=O(()=>U.object({type:U.literal("stdio").optional(),command:U.string().min(1,"Command cannot be empty"),args:U.array(U.string()).default([]),env:U.record(U.string(),U.string()).optional()})),Ow=O(()=>U.boolean()),wW=O(()=>U.object({clientId:U.string().optional(),callbackPort:U.number().int().positive().optional(),authServerMetadataUrl:U.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:Ow().optional()})),ww=O(()=>U.object({type:U.literal("sse"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional(),oauth:wW().optional()})),jw=O(()=>U.object({type:U.literal("sse-ide"),url:U.string(),ideName:U.string(),ideRunningInWindows:U.boolean().optional()})),Nw=O(()=>U.object({type:U.literal("ws-ide"),url:U.string(),ideName:U.string(),authToken:U.string().optional(),ideRunningInWindows:U.boolean().optional()})),kw=O(()=>U.object({type:U.literal("http"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional(),oauth:wW().optional()})),xw=O(()=>U.object({type:U.literal("ws"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional()})),Ew=O(()=>U.object({type:U.literal("sdk"),name:U.string()})),Pw=O(()=>U.object({type:U.literal("claudeai-proxy"),url:U.string(),id:U.string()})),w5=O(()=>U.union([Iw(),ww(),jw(),Nw(),kw(),xw(),Ew(),Pw()])),wi=O(()=>U.object({mcpServers:U.record(U.string(),w5())}))});function Pi(Z,X){let J=Z.toLowerCase();return X.autoUpdate??(k5.has(J)&&!vw.has(J))}function Sw(Z){if(k5.has(Z.toLowerCase()))return!1;if(yw.test(Z))return!0;return Cw.test(Z)}function vi(Z,X){let J=Z.toLowerCase();if(!k5.has(J))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${j5}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${j5}/' can use this name.`;return null}if(X.source==="git"&&X.url){let q=X.url.toLowerCase(),Q=q.includes("github.com/anthropics/"),$=q.includes("git@github.com:anthropics/");if(Q||$)return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${j5}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${j5}' organization.`}function yi(Z){return typeof Z==="string"&&Z.startsWith("./")}function Si(Z){return Z.source==="file"||Z.source==="directory"}var k5,vw,Cw,yw,j5="anthropics",K1,i6,NW,AX,IX,EW,OX,bw,Ci,hw,gw,fw,mw,uw,pw,kW,dw,cw,PW,lw,nw,xW,iw,vW,aw,ow,n2,TX,CW,sw,rw,bi,N5,tw,ew,hi,Zj,Xj,Jj,qj,Qj,gi,$j,fi;var yW=B(()=>{l0();O5();jW();b1();k5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),vw=new Set(["knowledge-work-plugins"]);Cw=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,yw=/[^\u0020-\u007E]/;K1=O(()=>U.string().startsWith("./")),i6=O(()=>K1().endsWith(".json")),NW=O(()=>U.union([K1().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB file path must end with .mcpb or .dxt"}).describe("Path to MCPB file relative to plugin root"),U.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),AX=O(()=>K1().endsWith(".md")),IX=O(()=>U.union([AX(),K1()])),EW=O(()=>U.string().min(1,"Marketplace must have a name").refine((Z)=>!Z.includes(" "),{message:'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'}).refine((Z)=>!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("..")&&Z!==".",{message:'Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."'}).refine((Z)=>!Sw(Z),{message:"Marketplace name impersonates an official Anthropic/Claude marketplace"}).refine((Z)=>Z.toLowerCase()!=="inline",{message:'Marketplace name "inline" is reserved for --plugin-dir session plugins'}).refine((Z)=>Z.toLowerCase()!=="builtin",{message:'Marketplace name "builtin" is reserved for built-in plugins'})),OX=O(()=>U.object({name:U.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:U.string().optional().describe("Contact email for support or feedback"),url:U.string().optional().describe("Website, GitHub profile, or organization URL")})),bw=O(()=>U.object({name:U.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),version:U.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:U.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:OX().optional().describe("Information about the plugin creator or maintainer"),homepage:U.string().url().optional().describe("Plugin homepage or documentation URL"),repository:U.string().optional().describe("Source code repository URL"),license:U.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:U.array(U.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:U.array(ew()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`)})),Ci=O(()=>U.object({description:U.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:U.lazy(()=>a1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),hw=O(()=>U.object({hooks:U.union([i6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),U.lazy(()=>a1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),U.array(U.union([i6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),U.lazy(()=>a1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),gw=O(()=>U.object({source:IX().optional().describe("Path to command markdown file, relative to plugin root"),content:U.string().optional().describe("Inline markdown content for the command"),description:U.string().optional().describe("Command description override"),argumentHint:U.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:U.string().optional().describe("Default model for this command"),allowedTools:U.array(U.string()).optional().describe("Tools allowed when command runs")}).refine((Z)=>Z.source&&!Z.content||!Z.source&&Z.content,{message:'Command must have either "source" (file path) or "content" (inline markdown), but not both'})),fw=O(()=>U.object({commands:U.union([IX().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root"),U.array(IX().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional command files or skill directories"),U.record(U.string(),gw()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),mw=O(()=>U.object({agents:U.union([AX().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),U.array(AX().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional agent files")])})),uw=O(()=>U.object({skills:U.union([K1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),U.array(K1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional skill directories")])})),pw=O(()=>U.object({outputStyles:U.union([K1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root"),U.array(K1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional output styles directories or files")])})),kW=O(()=>U.string().min(1)),dw=O(()=>U.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),cw=O(()=>U.object({mcpServers:U.union([i6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),NW().describe("Path or URL to MCPB file containing MCP server configuration"),U.record(U.string(),w5()).describe("MCP server configurations keyed by server name"),U.array(U.union([i6().describe("Path to MCP servers configuration file"),NW().describe("Path or URL to MCPB file"),U.record(U.string(),w5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),PW=O(()=>U.object({type:U.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:U.string().describe("Human-readable label shown in the config dialog"),description:U.string().describe("Help text shown beneath the field in the config dialog"),required:U.boolean().optional().describe("If true, validation fails when this field is empty"),default:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())]).optional().describe("Default value used when the user provides nothing"),multiple:U.boolean().optional().describe("For string type: allow an array of strings"),sensitive:U.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:U.number().optional().describe("Minimum value (number type only)"),max:U.number().optional().describe("Maximum value (number type only)")}).strict()),lw=O(()=>U.object({userConfig:U.record(U.string().regex(/^[A-Za-z_]\w*$/,"Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDE_PLUGIN_OPTION_<KEY> env vars in hooks"),PW()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. Non-sensitive values saved to settings.json; sensitive values to secure storage (macOS keychain or .credentials.json). Available as ${user_config.KEY} in MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. "+"Note: sensitive values share a single keychain entry with OAuth tokens — keep "+"secret counts small to stay under the ~2KB stdin-safe limit (see INC-3028).")})),nw=O(()=>U.object({channels:U.array(U.object({server:U.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:U.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:U.record(U.string(),PW()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.")})),xW=O(()=>U.strictObject({command:U.string().min(1).refine((Z)=>{if(Z.includes(" ")&&!Z.startsWith("/"))return!1;return!0},{message:"Command should not contain spaces. Use args array for arguments."}).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),args:U.array(kW()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:U.record(dw(),kW()).refine((Z)=>Object.keys(Z).length>0,{message:"extensionToLanguage must have at least one mapping"}).describe("Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping."),transport:U.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:U.record(U.string(),U.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:U.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:U.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:U.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:U.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:U.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:U.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:U.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),iw=O(()=>U.object({lspServers:U.union([i6().describe("Path to .lsp.json configuration file relative to plugin root"),U.record(U.string(),xW()).describe("LSP server configurations keyed by server name"),U.array(U.union([i6().describe("Path to LSP configuration file"),U.record(U.string(),xW()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),vW=O(()=>U.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let X=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,J=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||J.test(Z)},"Invalid npm package name format")),aw=O(()=>U.object({settings:U.record(U.string(),U.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),ow=O(()=>U.object({...bw().shape,...hw().partial().shape,...fw().partial().shape,...mw().partial().shape,...uw().partial().shape,...pw().partial().shape,...nw().partial().shape,...cw().partial().shape,...iw().partial().shape,...aw().partial().shape,...lw().partial().shape})),n2=O(()=>U.discriminatedUnion("source",[U.object({source:U.literal("url"),url:U.string().url().describe("Direct URL to marketplace.json file"),headers:U.record(U.string(),U.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),U.object({source:U.literal("github"),repo:U.string().describe("GitHub repository in owner/repo format"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:U.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:U.array(U.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),U.object({source:U.literal("git"),url:U.string().describe("Full git repository URL"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:U.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:U.array(U.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),U.object({source:U.literal("npm"),package:vW().describe("NPM package containing marketplace.json")}),U.object({source:U.literal("file"),path:U.string().describe("Local file path to marketplace.json")}),U.object({source:U.literal("directory"),path:U.string().describe("Local directory containing .claude-plugin/marketplace.json")}),U.object({source:U.literal("hostPattern"),hostPattern:U.string().describe('Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against "github.com". For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").')}),U.object({source:U.literal("pathPattern"),pathPattern:U.string().describe('Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.')}),U.object({source:U.literal("settings"),name:EW().refine((Z)=>!k5.has(Z.toLowerCase()),{message:"Reserved official marketplace names cannot be used with settings sources. validateOfficialNameSource only accepts github/git sources from anthropics/* for these names; a settings source would be rejected after loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."}).describe("Marketplace name. Must match the extraKnownMarketplaces key (enforced); the synthetic manifest is written under this name. Same validation "+"as PluginMarketplaceSchema plus reserved-name rejection — "+"validateOfficialNameSource runs after the disk write, too late to clean up."),plugins:U.array(sw()).describe("Plugin entries declared inline in settings.json"),owner:OX().optional()}).describe("Inline marketplace manifest defined directly in settings.json. The reconciler writes a synthetic marketplace.json to the cache; diffMarketplaces detects edits via isEqual on the stored source (the plugins array is inside this object, so edits surface as sourceChanged).")])),TX=O(()=>U.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),CW=O(()=>U.union([K1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),U.object({source:U.literal("npm"),package:vW().or(U.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:U.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:U.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),U.object({source:U.literal("pip"),package:U.string().describe("Python package name as it appears on PyPI"),version:U.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:U.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),U.object({source:U.literal("url"),url:U.string().describe("Full git repository URL (https:// or git@)"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}),U.object({source:U.literal("github"),repo:U.string().describe("GitHub repository in owner/repo format"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}),U.object({source:U.literal("git-subdir"),url:U.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:U.string().min(1).describe('Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.'),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}).describe("Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded.")])),sw=O(()=>U.object({name:U.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Plugin name as it appears in the target repository"),source:CW().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:U.string().optional(),version:U.string().optional(),strict:U.boolean().optional()}).refine((Z)=>typeof Z.source!=="string",{message:'Plugins in a settings-sourced marketplace must use remote sources (github, git-subdir, npm, url, pip). Relative-path sources like "./foo" have no marketplace repository to resolve against.'}));rw=O(()=>ow().partial().extend({name:U.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier matching the plugin name"),source:CW().describe("Where to fetch the plugin from"),category:U.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:U.array(U.string()).optional().describe("Tags for searchability and discovery"),strict:U.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),bi=O(()=>U.object({name:EW(),owner:OX().describe("Marketplace maintainer or curator information"),plugins:U.array(rw()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:U.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:U.object({pluginRoot:U.string().optional().describe("Base path for relative plugin sources"),version:U.string().optional().describe("Marketplace version"),description:U.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:U.array(U.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),N5=O(()=>U.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),tw=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,ew=O(()=>U.union([U.string().regex(tw,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),U.object({name:U.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:U.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),hi=O(()=>U.union([N5(),U.object({id:N5().describe('Plugin identifier (e.g., "formatter@tools")'),version:U.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:U.boolean().optional().describe("If true, cannot be disabled"),config:U.record(U.string(),U.unknown()).optional().describe("Plugin-specific configuration")})])),Zj=O(()=>U.object({version:U.string().describe("Currently installed version"),installedAt:U.string().describe("ISO 8601 timestamp of installation"),lastUpdated:U.string().optional().describe("ISO 8601 timestamp of last update"),installPath:U.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:U.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),Xj=O(()=>U.object({version:U.literal(1).describe("Schema version 1"),plugins:U.record(N5(),Zj()).describe("Map of plugin IDs to their installation metadata")})),Jj=O(()=>U.enum(["managed","user","project","local"])),qj=O(()=>U.object({scope:Jj().describe("Installation scope"),projectPath:U.string().optional().describe("Project path (required for project/local scopes)"),installPath:U.string().describe("Absolute path to the versioned plugin directory"),version:U.string().optional().describe("Currently installed version"),installedAt:U.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:U.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:U.string().optional().describe("Git commit SHA for git-based plugins")})),Qj=O(()=>U.object({version:U.literal(2).describe("Schema version 2"),plugins:U.record(N5(),U.array(qj())).describe("Map of plugin IDs to arrays of installation entries")})),gi=O(()=>U.union([Xj(),Qj()])),$j=O(()=>U.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:U.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:U.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:U.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),fi=O(()=>U.record(U.string(),$j()))});function x5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var SW=()=>{};function bW(Z){let X=Z.split("__"),[J,q,...Q]=X;if(J!=="mcp"||!q)return null;let $=Q.length>0?Q.join("__"):void 0;return{serverName:q,toolName:$}}function Yj(Z){return`mcp__${x5(Z)}__`}function Hj(Z,X){return`${Yj(Z)}${x5(X)}`}function di(Z){return Z.mcpInfo?Hj(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function ci(Z,X){let J=`mcp__${x5(X)}__`;return Z.replace(J,"")}function li(Z){let X=Z.replace(/\s*\(MCP\)\s*$/,"");X=X.trim();let J=X.indexOf(" - ");if(J!==-1)return X.substring(J+3).trim();return X}var hW=B(()=>{SW()});var wX="TaskOutput";var gW=()=>{};var fW="TaskStop",ai=`
77
- - Stops a running background task by its ID
78
- - Takes a task_id parameter identifying the task to stop
79
- - Returns a success or failure status
80
- - Use this tool when you need to terminate a long-running task
81
- `;var mW=()=>{};function a6(Z){return pW[Z]??Z}function ei(Z){let X=[];for(let[J,q]of Object.entries(pW))if(q===Z)X.push(J);return X}function Kj(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function Gj(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function dW(Z){let X=Wj(Z,"(");if(X===-1)return{toolName:a6(Z)};let J=Vj(Z,")");if(J===-1||J<=X)return{toolName:a6(Z)};if(J!==Z.length-1)return{toolName:a6(Z)};let q=Z.substring(0,X),Q=Z.substring(X+1,J);if(!q)return{toolName:a6(Z)};if(Q===""||Q==="*")return{toolName:a6(q)};let $=Gj(Q);return{toolName:a6(q),ruleContent:$}}function Za(Z){if(!Z.ruleContent)return Z.toolName;let X=Kj(Z.ruleContent);return`${Z.toolName}(${X})`}function Wj(Z,X){for(let J=0;J<Z.length;J++)if(Z[J]===X){let q=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;if(q%2===0)return J}return-1}function Vj(Z,X){for(let J=Z.length-1;J>=0;J--)if(Z[J]===X){let q=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;if(q%2===0)return J}return-1}var pW;var cW=B(()=>{Uj();gW();mW();pW={Task:uW,KillShell:fW,AgentOutputTool:wX,BashOutputTool:wX,...{}}});function Ja(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lW(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function nW(Z,X,J=X+"s"){return Z===1?X:J}function qa(Z){let X=Z.indexOf(`
82
- `);return X===-1?Z:Z.slice(0,X)}function Qa(Z,X,J=0){let q=0,Q=Z.indexOf(X,J);while(Q!==-1)q++,Q=Z.indexOf(X,Q+1);return q}function $a(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function Ya(Z){return Z.replace(/\u3000/g," ")}function Ha(Z,X=",",J=iW){let Q="";for(let $ of Z){let Y=Q?X:"",H=Y+$;if(Q.length+H.length<=J)Q+=H;else{let K=J-Q.length-Y.length-14;if(K>0)Q+=Y+$.slice(0,K)+"...[truncated]";else Q+="...[truncated]";return Q}}return Q}class Bj{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=iW){this.maxSize=Z}append(Z){let X=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=X.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+X.length>this.maxSize){let J=this.maxSize-this.content.length;if(J>0)this.content+=X.slice(0,J);this.isTruncated=!0}else this.content+=X}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,X=Math.round(Z/1024);return this.content+`
83
- ... [output truncated - ${X}KB removed]`}clear(){this.content="",this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}function Ua(Z,X){let J=Z.split(`
84
- `);if(J.length<=X)return Z;return J.slice(0,X).join(`
85
- `)+"…"}var iW=33554432;var jX=()=>{};function aW(Z){return NX.filePatternTools.includes(Z)}function oW(Z){return NX.bashPrefixTools.includes(Z)}function sW(Z){return NX.customValidation[Z]}var NX;var rW=B(()=>{NX={filePatternTools:["Read","Write","Edit","Glob","NotebookRead","NotebookEdit"],bashPrefixTools:["Bash"],customValidation:{WebSearch:(Z)=>{if(Z.includes("*")||Z.includes("?"))return{valid:!1,error:"WebSearch does not support wildcards",suggestion:"Use exact search terms without * or ?",examples:["WebSearch(claude ai)","WebSearch(typescript tutorial)"]};return{valid:!0}},WebFetch:(Z)=>{if(Z.includes("://")||Z.startsWith("http"))return{valid:!1,error:"WebFetch permissions use domain format, not URLs",suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:github.com)"]};if(!Z.startsWith("domain:"))return{valid:!1,error:'WebFetch permissions must use "domain:" prefix',suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:*.google.com)"]};return{valid:!0}}}}});function tW(Z,X){let J=0,q=X-1;while(q>=0&&Z[q]==="\\")J++,q--;return J%2!==0}function kX(Z,X){let J=0;for(let q=0;q<Z.length;q++)if(Z[q]===X&&!tW(Z,q))J++;return J}function Lj(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!tW(Z,X))return!0}return!1}function xX(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=kX(Z,"("),J=kX(Z,")");if(X!==J)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(Lj(Z)){let Y=Z.substring(0,Z.indexOf("("));if(!Y)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${Y}" without parentheses`,examples:[`${Y}`,`${Y}(some-pattern)`]}}let q=dW(Z),Q=bW(q.toolName);if(Q){if(q.ruleContent!==void 0||kX(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${q.toolName}" without parentheses, or use "mcp__${Q.serverName}__*" for all tools`,examples:[`mcp__${Q.serverName}`,`mcp__${Q.serverName}__*`,Q.toolName&&Q.toolName!=="*"?`mcp__${Q.serverName}__${Q.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!q.toolName||q.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(q.toolName[0]!==q.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${lW(String(q.toolName))}"`};let $=sW(q.toolName);if($&&q.ruleContent!==void 0){let Y=$(q.ruleContent);if(!Y.valid)return Y}if(oW(q.toolName)&&q.ruleContent!==void 0){let Y=q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(aW(q.toolName)&&q.ruleContent!==void 0){let Y=q.ruleContent;if(Y.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${q.toolName}(*.ts) - matches .ts files`,`${q.toolName}(src/**) - matches all files in src`,`${q.toolName}(**/*.test.ts) - matches test files`]};if(Y.includes("*")&&!Y.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!Y.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${q.toolName}(*.js) - all .js files`,`${q.toolName}(src/*) - all files directly in src`,`${q.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var E5;var EX=B(()=>{l0();hW();b1();cW();jX();rW();E5=O(()=>U.string().superRefine((Z,X)=>{let J=xX(Z);if(!J.valid){let q=J.error;if(J.suggestion)q+=`. ${J.suggestion}`;if(J.examples&&J.examples.length>0)q+=`. Examples: ${J.examples.join(", ")}`;X.addIssue({code:U.ZodIssueCode.custom,message:q,params:{received:Z}})}}))});function Fa(Z){if(!Z||typeof Z!=="object")return null;let X=PX.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var PX;var eW=B(()=>{l0();PX=U.object({enabled:U.boolean().describe("Whether auto-fix is enabled"),lint:U.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:U.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:U.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:U.number().int().min(1000).max(300000).default(30000).describe("Timeout in ms for each lint/test command (default: 30000)")}).refine((Z)=>!Z.enabled||Z.lint!==void 0||Z.test!==void 0,{message:'At least one of "lint" or "test" must be set when enabled'})});function Ca(Z){return"serverName"in Z&&Z.serverName!==void 0}function ya(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Sa(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var _j,zj,Rj,Mj,Fj,ZV,k0;var i2=B(()=>{l0();M9();d0();b1();LW();yW();A3();EX();O5();O5();eW();U3();_j=O(()=>U.record(U.string(),U.coerce.string())),zj=O(()=>U.object({allow:U.array(E5()).optional().describe("List of permission rules for allowed operations"),deny:U.array(E5()).optional().describe("List of permission rules for denied operations"),ask:U.array(E5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:U.enum(l2).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:U.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:U.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:U.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:U.array(U.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),Rj=O(()=>U.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:U.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:U.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Mj=O(()=>U.object({serverName:U.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that users are allowed to configure"),serverCommand:U.array(U.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for allowed stdio servers"),serverUrl:U.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return H3([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),Fj=O(()=>U.object({serverName:U.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:U.array(U.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),serverUrl:U.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return H3([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),ZV=["skills","agents","hooks","mcp"],k0=O(()=>U.object({$schema:U.literal(L9).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:U.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:U.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:U.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:U.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...e(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:U.object({issuer:U.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:U.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:U.number().int().positive().optional().describe("Fixed loopback callback port for the IdP OIDC login. Only needed if the IdP does not honor RFC 8252 port-any matching.")}).optional().describe("XAA (SEP-990) IdP connection. Configure once; all XAA-enabled MCP servers reuse this.")}:{},fileSuggestion:U.object({type:U.literal("command"),command:U.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:U.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:U.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."),env:_j().optional().describe("Environment variables to set for Claude Code sessions"),attribution:U.object({commit:U.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:U.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution.")}).optional().describe("Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set."),includeCoAuthoredBy:U.boolean().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"),includeGitInstructions:U.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:zj().optional().describe("Tool usage permissions configuration"),model:U.string().optional().describe("Override the default model used by Claude Code"),availableModels:U.array(U.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),modelOverrides:U.record(U.string(),U.string()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'),enableAllProjectMcpServers:U.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:U.array(U.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:U.array(U.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:U.array(Mj()).optional().describe("Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied."),deniedMcpServers:U.array(Fj()).optional().describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:a1().optional().describe("Custom commands to run before/after tool executions"),autoFix:PX.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:U.object({symlinkDirectories:U.array(U.string()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'),sparsePaths:U.array(U.string()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). "+"Dramatically faster in large monorepos — only the listed paths are written to disk.")}).optional().describe("Git worktree configuration for --worktree flag."),lsp:U.object({enabled:U.boolean().optional(),diagnosticsTimeoutMs:U.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudio waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).catchall(U.object({disabled:U.boolean().optional(),command:U.array(U.string()).min(1).optional(),extensions:U.array(U.string()).optional()})).optional().describe("LSP server configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). Other keys = server names. Set disabled:true to disable a built-in server. Set command to override or add a server."),disableAllHooks:U.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:U.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:U.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:U.array(U.string()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'),httpHookAllowedEnvVars:U.array(U.string()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."),allowManagedPermissionRulesOnly:U.boolean().optional().describe("When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored."),allowManagedMcpServersOnly:U.boolean().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),strictPluginOnlyCustomization:U.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>ZV.includes(X)):Z,U.union([U.boolean(),U.array(U.enum(ZV))])).optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. '+"Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by "+"marketplace allowlist, everything else blocked here."),statusLine:U.object({type:U.literal("command"),command:U.string(),padding:U.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:U.record(U.string(),U.union([U.array(U.string()),U.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:U.record(U.string(),Rj()).check((Z)=>{for(let[X,J]of Object.entries(Z.value))if(J.source.source==="settings"&&J.source.name!==X)Z.issues.push({code:"custom",input:J.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${J.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:U.array(n2()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:U.array(n2()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:U.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:U.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:U.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:U.string().optional().describe("Controls the output style for assistant responses"),language:U.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:U.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:R9().optional(),feedbackSurveyRate:U.number().min(0).max(1).optional().describe("Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."),spinnerTipsEnabled:U.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:U.object({mode:U.enum(["append","replace"]),verbs:U.array(U.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:U.object({excludeDefault:U.boolean().optional(),tips:U.array(U.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:U.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:U.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:U.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:U.enum(["low","medium","high","max"]).optional().catch(void 0).describe("Persisted effort level for supported models."),advisorModel:U.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:U.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:U.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:U.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:U.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:U.string().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."),companyAnnouncements:U.array(U.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:U.record(U.string(),U.object({mcpServers:U.record(U.string(),U.record(U.string(),U.union([U.string(),U.number(),U.boolean(),U.array(U.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:U.record(U.string(),U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.")})).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:U.object({defaultEnvironmentId:U.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:U.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:U.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:U.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{},...{},channelsEnabled:U.boolean().optional().describe("Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels."),allowedChannelPlugins:U.array(U.object({marketplace:U.string(),plugin:U.string()})).optional().describe("Teams/Enterprise allowlist of channel plugins. When set, "+"replaces the default Anthropic allowlist — admins decide which "+"plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."),...{},prefersReducedMotion:U.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:U.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:U.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),autoDreamEnabled:U.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:U.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:U.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:U.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:U.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:U.object({allow:U.array(U.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:U.array(U.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:U.array(U.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:U.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:U.array(U.object({id:U.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:U.string().describe("Display name for the SSH connection"),sshHost:U.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:U.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:U.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:U.string().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."),claudeMdExcludes:U.array(U.string()).optional().describe('Glob patterns or absolute paths of AGENTS.md/CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/AGENTS.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),pluginTrustMessage:U.string().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").')}).passthrough())});function vX(){let Z=XV(k0(),{unrepresentable:"any"});return f(Z,null,2)}var JV=B(()=>{l0();L0();i2()});function qV(Z){let X=Dj.find((q)=>q.matches(Z));if(!X)return null;let J={...X.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!J.suggestion)J.suggestion=`Valid values: ${Z.enumValues.map((q)=>`"${q}"`).join(", ")}`;if(!J.docLink&&Z.path){let q=Z.path.split(".")[0];if(q)J.docLink=Tj[q]}return J}var Dj,Tj;var QV=B(()=>{Dj=[{matches:(Z)=>Z.path==="permissions.defaultMode"&&Z.code==="invalid_value",tip:{suggestion:'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)'}},{matches:(Z)=>Z.path==="apiKeyHelper"&&Z.code==="invalid_type",tip:{suggestion:'Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"'}},{matches:(Z)=>Z.path==="cleanupPeriodDays"&&Z.code==="too_small"&&Z.expected==="0",tip:{suggestion:"Must be 0 or greater. Set a positive number for days to retain transcripts (default is 30). Setting 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."}},{matches:(Z)=>Z.path.startsWith("env.")&&Z.code==="invalid_type",tip:{suggestion:'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"'}},{matches:(Z)=>(Z.path==="permissions.allow"||Z.path==="permissions.deny")&&Z.code==="invalid_type"&&Z.expected==="array",tip:{suggestion:'Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.'}},{matches:(Z)=>Z.path.includes("hooks")&&Z.code==="invalid_type",tip:{suggestion:'Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}'}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="boolean",tip:{suggestion:'Use true or false without quotes. Example: "includeCoAuthoredBy": true'}},{matches:(Z)=>Z.code==="unrecognized_keys",tip:{suggestion:"Check for typos or refer to the documentation for valid fields"}},{matches:(Z)=>Z.code==="invalid_value"&&Z.enumValues!==void 0,tip:{suggestion:void 0}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="object"&&Z.received===null&&Z.path==="",tip:{suggestion:"Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error."}},{matches:(Z)=>Z.path==="permissions.additionalDirectories"&&Z.code==="invalid_type",tip:{suggestion:'Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command'}}],Tj={}});function $V(Z){return Z.code==="invalid_type"}function YV(Z){return Z.code==="invalid_value"}function Aj(Z){return Z.code==="unrecognized_keys"}function HV(Z){return Z.code==="too_small"}function CX(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function UV(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function o6(Z,X){return Z.issues.map((J)=>{let q=J.path.map(String).join("."),Q=J.message,$,Y,H,K,W;if(YV(J))Y=J.values.map((V)=>String(V)),H=Y.join(" | "),K=void 0,W=void 0;else if($V(J)){H=J.expected;let V=UV(J.message);K=V??CX(J.input),W=V??CX(J.input)}else if(HV(J))H=String(J.minimum);else if(J.code==="custom"&&"params"in J)K=J.params.received,W=K;let G=qV({path:q,code:J.code,expected:H,received:K,enumValues:Y,message:J.message,value:K});if(YV(J))$=Y?.map((V)=>`"${V}"`).join(", "),Q=`Invalid value. Expected one of: ${$}`;else if($V(J)){let V=UV(J.message)??CX(J.input);if(J.expected==="object"&&V==="null"&&q==="")Q="Invalid or malformed JSON";else Q=`Expected ${J.expected}, but received ${V}`}else if(Aj(J)){let V=J.keys.join(", ");Q=`Unrecognized ${nW(J.keys.length,"field")}: ${V}`}else if(HV(J))Q=`Number must be greater than or equal to ${J.minimum}`,$=String(J.minimum);return{file:X,path:q,message:Q,expected:$,invalidValue:W,suggestion:G?.suggestion,docLink:G?.docLink}})}function oa(Z){try{let X=H0(Z),J=k0().strict().safeParse(X);if(J.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
86
- `+o6(J.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
87
- `),fullSchema:vX()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:vX()}}}function P5(Z,X){if(!Z||typeof Z!=="object")return[];let J=Z;if(!J.permissions||typeof J.permissions!=="object")return[];let q=J.permissions,Q=[];for(let $ of["allow","deny","ask"]){let Y=q[$];if(!Array.isArray(Y))continue;q[$]=Y.filter((H)=>{if(typeof H!=="string")return Q.push({file:X,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let K=xX(H);if(!K.valid){let W=`Invalid permission rule "${H}" was skipped`;if(K.error)W+=`: ${K.error}`;if(K.suggestion)W+=`. ${K.suggestion}`;return Q.push({file:X,path:`permissions.${$}`,message:W,invalidValue:H}),!1}return!0})}return Q}var yX=B(()=>{L0();jX();EX();JV();i2();QV()});import{userInfo as Ij}from"os";function BV(){let Z="";try{Z=Ij().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${KV}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${KV}.plist`,label:"device-level managed preferences"}),X}var KV="com.anthropic.claudecode",v5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",C5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",s6="Settings",GV="/usr/bin/plutil",WV,VV=5000;var SX=B(()=>{WV=["-convert","json","-o","-","--"]});import{execFile as Oj}from"child_process";import{existsSync as wj}from"fs";function bX(Z,X){return new Promise((J)=>{Oj(Z,X,{encoding:"utf-8",timeout:VV},(q,Q)=>{J({stdout:Q??"",code:q?1:0})})})}function y5(){return(async()=>{if(process.platform==="darwin"){let Z=BV(),J=(await Promise.all(Z.map(async({path:q,label:Q})=>{if(!wj(q))return{stdout:"",label:Q,ok:!1};let{stdout:$,code:Y}=await bX(GV,[...WV,q]);return{stdout:$,label:Q,ok:Y===0&&!!$}}))).find((q)=>q.ok);return{plistStdouts:J?[{stdout:J.stdout,label:J.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,X]=await Promise.all([bX("reg",["query",v5,"/v",s6]),bX("reg",["query",C5,"/v",s6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:X.code===0?X.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function Jo(){if(hX)return;hX=y5()}function LV(){return hX}var hX=null;var _V=B(()=>{SX()});import{join as zV}from"path";function jj(){if(S5)return;S5=(async()=>{r6("mdm_load_start");let Z=Date.now(),X=LV()??y5(),{mdm:J,hkcu:q}=FV(await X);fX=J,mX=q,r6("mdm_load_end");let Q=Date.now()-Z;if(E(`MDM settings load completed in ${Q}ms`),Object.keys(J.settings).length>0){E(`MDM settings found: ${Object.keys(J.settings).join(", ")}`);try{Q0("info","mdm_settings_loaded",{duration_ms:Q,key_count:Object.keys(J.settings).length,error_count:J.errors.length})}catch{}}})()}async function zo(){if(!S5)jj();await S5}function b5(){return fX??G1}function h5(){return mX??G1}function Ro(Z,X){fX=Z,mX=X}async function Mo(){let Z=await y5();return FV(Z)}function gX(Z,X){let J=C0(Z,!1);if(!J||typeof J!=="object")return{settings:{},errors:[]};let q=P5(J,X),Q=k0().safeParse(J);if(!Q.success){let $=o6(Q.error,X);return{settings:{},errors:[...q,...$]}}return{settings:Q.data,errors:q}}function RV(Z,X="Settings"){let J=Z.split(/\r?\n/),q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Q=new RegExp(`^\\s+${q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let $ of J){let Y=$.match(Q);if(Y&&Y[1])return Y[1].trimEnd()}return null}function FV(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:J}=Z.plistStdouts[0],q=gX(X,J);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:G1}}if(Z.hklmStdout){let X=RV(Z.hklmStdout);if(X){let J=gX(X,`Registry: ${v5}\\${s6}`);if(Object.keys(J.settings).length>0)return{mdm:J,hkcu:G1}}}if(Nj())return{mdm:G1,hkcu:G1};if(Z.hkcuStdout){let X=RV(Z.hkcuStdout);if(X){let J=gX(X,`Registry: ${C5}\\${s6}`);return{mdm:G1,hkcu:J}}}return{mdm:G1,hkcu:G1}}function Nj(){try{let Z=zV(F1(),"managed-settings.json"),X=Z1(Z),J=C0(X,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}try{let Z=O2(),X=k().readdirSync(Z);for(let J of X){if(!(J.isFile()||J.isSymbolicLink())||!J.name.endsWith(".json")||J.name.startsWith("."))continue;try{let q=Z1(zV(Z,J.name)),Q=C0(q,!1);if(Q&&typeof Q==="object"&&Object.keys(Q).length>0)return!0}catch{}}}catch{}return!1}var G1,fX=null,mX=null,S5=null;var DV=B(()=>{R1();G2();B2();R0();d4();MV();l4();i2();yX();SX();_V();G1=Object.freeze({settings:{},errors:[]})});import{dirname as EV,join as g5,resolve as a2}from"path";function lX(){return g5(F1(),"managed-settings.json")}function nX(){let Z=[],X={},J=!1,{settings:q,errors:Q}=o2(lX());if(Z.push(...Q),q&&Object.keys(q).length>0)X=e0(X,q,o1),J=!0;let $=O2();try{let Y=k().readdirSync($).filter((H)=>(H.isFile()||H.isSymbolicLink())&&H.name.endsWith(".json")&&!H.name.startsWith(".")).map((H)=>H.name).sort();for(let H of Y){let{settings:K,errors:W}=o2(g5($,H));if(Z.push(...W),K&&Object.keys(K).length>0)X=e0(X,K,o1),J=!0}}catch(Y){let H=K0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")m(Y)}return{settings:J?X:null,errors:Z}}function io(){let{settings:Z}=o2(lX()),X=!!Z&&Object.keys(Z).length>0,J=!1,q=O2();try{J=k().readdirSync(q).some((Q)=>(Q.isFile()||Q.isSymbolicLink())&&Q.name.endsWith(".json")&&!Q.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:J}}function PV(Z,X){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")E(`Broken symlink or missing file encountered for settings.json at path: ${X}`);else m(Z)}function o2(Z){let X=jV(Z);if(X)return{settings:X.settings?pX(X.settings):null,errors:X.errors};let J=kj(Z);return NV(Z,J),{settings:J.settings?pX(J.settings):null,errors:J.errors}}function kj(Z){try{let{resolvedPath:X}=M1(k(),Z),J=Z1(X);if(J.trim()==="")return{settings:{},errors:[]};let q=C0(J,!1),Q=P5(q,Z),$=k0().safeParse(q);if(!$.success){let Y=o6($.error,Z);return{settings:null,errors:[...Q,...Y]}}return{settings:$.data,errors:Q}}catch(X){return PV(X,Z),{settings:null,errors:[]}}}function TV(Z){switch(Z){case"userSettings":return a2(Y0());case"policySettings":case"projectSettings":case"localSettings":return a2(s1());case"flagSettings":{let X=dX();return X?EV(a2(X)):a2(s1())}}}function xj(){if(xV()||e(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function f5(Z){switch(Z){case"userSettings":return g5(TV(Z),xj());case"projectSettings":case"localSettings":return g5(TV(Z),vV(Z));case"policySettings":return lX();case"flagSettings":return dX()}}function vV(Z){switch(Z){case"projectSettings":return".claudio/settings.json";case"localSettings":return".claudio/settings.local.json"}}function n(Z){let X=OV(Z);if(X!==void 0)return X;let J=CV(Z);return wV(Z,J),J}function CV(Z){if(Z==="policySettings"){let q=b4();if(q&&Object.keys(q).length>0)return q;let Q=b5();if(Object.keys(Q.settings).length>0)return Q.settings;let{settings:$}=nX();if($)return $;let Y=h5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=f5(Z),{settings:J}=X?o2(X):{settings:null};if(Z==="flagSettings"){let q=cX();if(q){let Q=k0().safeParse(q);if(Q.success)return e0(J||{},Q.data,o1)}}return J}function ao(){let Z=b4();if(Z&&Object.keys(Z).length>0)return"remote";let X=b5();if(Object.keys(X.settings).length>0)return v0()==="macos"?"plist":"hklm";let{settings:J}=nX();if(J)return"file";let q=h5();if(Object.keys(q.settings).length>0)return"hkcu";return null}function oo(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let J=f5(Z);if(!J)return{error:null};try{k().mkdirSync(EV(J));let q=CV(Z);if(!q){let $=null;try{$=Z1(J)}catch(Y){if(!A6(Y))throw Y}if($!==null){let Y=C0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${J}`)};if(Y&&typeof Y==="object")q=Y,E(`Using raw settings from ${J} due to validation failure`)}}let Q=e0(q||{},X,($,Y,H,K)=>{if(Y===void 0&&K&&typeof H==="string"){delete K[H];return}if(Array.isArray(Y))return Y;return});if(_9(J),I6(J,f(Q,null,2)+`
88
- `),_2(),Z==="localSettings")s$(vV("localSettings"),s1())}catch(q){let Q=Error(`Failed to read raw settings from ${J}: ${q}`);return m(Q),{error:Q}}return{error:null}}function Ej(Z,X){return h$([...Z,...X])}function o1(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return Ej(Z,X);return}function so(Z){let X=k0().strip().parse(Z),J=["permissions","sandbox","hooks"],q=[],Q={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","allowBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let $ of Object.keys(X))if(J.includes($)&&X[$]&&typeof X[$]==="object"){let Y=X[$],H=Q[$];if(H){for(let K of Object.keys(Y))if(H.has(K))q.push(`${$}.${K}`)}}else q.push($);return q.sort()}function Pj(){if(uX)return{settings:{},errors:[]};let Z=Date.now();r6("loadSettingsFromDisk_start"),Q0("info","settings_load_started"),uX=!0;try{let X=kV(),J={};if(X)J=e0(J,X,o1);let q=[],Q=new Set,$=new Set;for(let Y of I2()){if(Y==="policySettings"){let K=null,W=[],G=b4();if(G&&Object.keys(G).length>0){let V=k0().safeParse(G);if(V.success)K=V.data;else W.push(...o6(V.error,"remote managed settings"))}if(!K){let V=b5();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(!K){let{settings:V,errors:L}=nX();if(V)K=V;W.push(...L)}if(!K){let V=h5();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(K)J=e0(J,K,o1);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),q.push(V)}continue}let H=f5(Y);if(H){let K=a2(H);if(!$.has(K)){$.add(K);let{settings:W,errors:G}=o2(H);for(let V of G){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),q.push(V)}if(W)J=e0(J,W,o1)}}if(Y==="flagSettings"){let K=cX();if(K){let W=k0().safeParse(K);if(W.success)J=e0(J,W.data,o1)}}}return Q0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:q.length}),{settings:J,errors:q}}finally{uX=!1}}function m5(){let{settings:Z}=vj();return Z||{}}function to(){_2();let Z=[];for(let X of I2()){let J=n(X);if(J&&Object.keys(J).length>0)Z.push({source:X,settings:J})}return{effective:m5(),sources:Z}}function vj(){let Z=AV();if(Z!==null)return Z;let X=Pj();return r6("loadSettingsFromDisk_end"),IV(X),X}function eo(){return!!(n("userSettings")?.skipDangerousModePermissionPrompt||n("localSettings")?.skipDangerousModePermissionPrompt||n("flagSettings")?.skipDangerousModePermissionPrompt||n("policySettings")?.skipDangerousModePermissionPrompt)}function Zs(){return!!(n("userSettings")?.permissions?.allowBypassPermissionsMode||n("localSettings")?.permissions?.allowBypassPermissionsMode||n("flagSettings")?.permissions?.allowBypassPermissionsMode||n("policySettings")?.permissions?.allowBypassPermissionsMode)}function Xs(){{let Z=n("userSettings")?.skipAutoPermissionPrompt,X=n("localSettings")?.skipAutoPermissionPrompt,J=n("flagSettings")?.skipAutoPermissionPrompt,q=n("policySettings")?.skipAutoPermissionPrompt,Q=!!(Z||X||J||q);return E(`[auto-mode] hasAutoModeOptIn=${Q} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${J} policy=${q}`),Q}return!1}function Js(){return n("policySettings")?.useAutoModeDuringPlan!==!1&&n("flagSettings")?.useAutoModeDuringPlan!==!1&&n("userSettings")?.useAutoModeDuringPlan!==!1&&n("localSettings")?.useAutoModeDuringPlan!==!1}function qs(){{let Z=U.object({allow:U.array(U.string()).optional(),soft_deny:U.array(U.string()).optional(),deny:U.array(U.string()).optional(),environment:U.array(U.string()).optional()}),X=[],J=[],q=[];for(let Q of["userSettings","localSettings","flagSettings","policySettings"]){let $=n(Q);if(!$)continue;let Y=Z.safeParse($.autoMode);if(Y.success){if(Y.data.allow)X.push(...Y.data.allow);if(Y.data.soft_deny)J.push(...Y.data.soft_deny);if(Y.data.environment)q.push(...Y.data.environment)}}if(X.length>0||J.length>0||q.length>0)return{...X.length>0&&{allow:X},...J.length>0&&{soft_deny:J},...q.length>0&&{environment:q}}}return}function Qs(Z){for(let X of I2()){if(X==="policySettings")continue;let J=f5(X);if(!J)continue;try{let{resolvedPath:q}=M1(k(),J),Q=Z1(q);if(!Q.trim())continue;let $=C0(Q,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(q){PV(q,J)}}return!1}var uX=!1,ro;var yV=B(()=>{y$();l0();j6();b$();U3();R1();G2();d0();y1();h4();B2();R0();r$();d4();u0();z6();L0();MV();A3();z9();l4();DV();S$();i2();yX();ro=m5});import{homedir as Cj}from"os";import{isAbsolute as yj,join as p5,normalize as iX,sep as hV}from"path";function gV(){let Z=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(e(Z))return!1;if(bV(Z))return!0;if(e(process.env.CLAUDE_CODE_SIMPLE))return!1;if(e(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let X=m5();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function _s(){if(!C1("tengu_passport_quail",!1))return!1;return!SV()||C1("tengu_slate_thimble",!1)}function Sj(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return Y0()}function fV(Z,X){if(!Z)return;let J=Z;if(X&&(J.startsWith("~/")||J.startsWith("~\\"))){let Q=J.slice(2),$=iX(Q||".");if($==="."||$==="..")return;J=p5(Cj(),Q)}let q=iX(J).replace(/[/\\]+$/,"");if(!yj(q)||q.length<3||/^[A-Za-z]:$/.test(q)||q.startsWith("\\\\")||q.startsWith("//")||q.includes("\x00"))return;return(q+hV).normalize("NFC")}function mV(){return fV(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function gj(){let Z=n("policySettings")?.autoMemoryDirectory??n("flagSettings")?.autoMemoryDirectory??n("localSettings")?.autoMemoryDirectory??n("userSettings")?.autoMemoryDirectory;return fV(Z,!0)}function zs(){return mV()!==void 0}function fj(){return d5(u5())??u5()}function uV(){return p5(s2(),hj)}function Rs(Z){return iX(Z).startsWith(s2())}var bj="memory",hj="MEMORY.md",s2;var aX=B(()=>{L1();j6();W3();d0();R2();v4();yV();s2=u(()=>{let Z=mV()??gj();if(Z)return Z;let X=p5(Sj(),"projects");return(p5(X,t7(fj()),bj)+hV).normalize("NFC")},()=>u5())});var dV=d((Fs,pV)=>{var j1=$0("constants"),mj=process.cwd,c5=null,uj=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!c5)c5=mj.call(process);return c5};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(l5=process.chdir,process.chdir=function(Z){c5=null,l5.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,l5)}var l5;pV.exports=pj;function pj(Z){if(j1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)J(Z);if(Z.chown=$(Z.chown),Z.fchown=$(Z.fchown),Z.lchown=$(Z.lchown),Z.chmod=q(Z.chmod),Z.fchmod=q(Z.fchmod),Z.lchmod=q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=Q(Z.chmodSync),Z.fchmodSync=Q(Z.fchmodSync),Z.lchmodSync=Q(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=K(Z.statSync),Z.fstatSync=K(Z.fstatSync),Z.lstatSync=K(Z.lstatSync),Z.chmod&&!Z.lchmod)Z.lchmod=function(G,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(G,V,L,_){if(_)process.nextTick(_)},Z.lchownSync=function(){};if(uj==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(G){function V(L,_,z){var D=Date.now(),M=0;G(L,_,function F(N){if(N&&(N.code==="EACCES"||N.code==="EPERM"||N.code==="EBUSY")&&Date.now()-D<60000){if(setTimeout(function(){Z.stat(_,function(R,w){if(R&&R.code==="ENOENT")G(L,_,F);else z(N)})},M),M<100)M+=10;return}if(z)z(N)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,G);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(G){function V(L,_,z,D,M,F){var N;if(F&&typeof F==="function"){var R=0;N=function(w,A,I){if(w&&w.code==="EAGAIN"&&R<10)return R++,G.call(Z,L,_,z,D,M,N);F.apply(this,arguments)}}return G.call(Z,L,_,z,D,M,N)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,G);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(G){return function(V,L,_,z,D){var M=0;while(!0)try{return G.call(Z,V,L,_,z,D)}catch(F){if(F.code==="EAGAIN"&&M<10){M++;continue}throw F}}}(Z.readSync);function X(G){G.lchmod=function(V,L,_){G.open(V,j1.O_WRONLY|j1.O_SYMLINK,L,function(z,D){if(z){if(_)_(z);return}G.fchmod(D,L,function(M){G.close(D,function(F){if(_)_(M||F)})})})},G.lchmodSync=function(V,L){var _=G.openSync(V,j1.O_WRONLY|j1.O_SYMLINK,L),z=!0,D;try{D=G.fchmodSync(_,L),z=!1}finally{if(z)try{G.closeSync(_)}catch(M){}else G.closeSync(_)}return D}}function J(G){if(j1.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(V,L,_,z){G.open(V,j1.O_SYMLINK,function(D,M){if(D){if(z)z(D);return}G.futimes(M,L,_,function(F){G.close(M,function(N){if(z)z(F||N)})})})},G.lutimesSync=function(V,L,_){var z=G.openSync(V,j1.O_SYMLINK),D,M=!0;try{D=G.futimesSync(z,L,_),M=!1}finally{if(M)try{G.closeSync(z)}catch(F){}else G.closeSync(z)}return D};else if(G.futimes)G.lutimes=function(V,L,_,z){if(z)process.nextTick(z)},G.lutimesSync=function(){}}function q(G){if(!G)return G;return function(V,L,_){return G.call(Z,V,L,function(z){if(W(z))z=null;if(_)_.apply(this,arguments)})}}function Q(G){if(!G)return G;return function(V,L){try{return G.call(Z,V,L)}catch(_){if(!W(_))throw _}}}function $(G){if(!G)return G;return function(V,L,_,z){return G.call(Z,V,L,_,function(D){if(W(D))D=null;if(z)z.apply(this,arguments)})}}function Y(G){if(!G)return G;return function(V,L,_){try{return G.call(Z,V,L,_)}catch(z){if(!W(z))throw z}}}function H(G){if(!G)return G;return function(V,L,_){if(typeof L==="function")_=L,L=null;function z(D,M){if(M){if(M.uid<0)M.uid+=4294967296;if(M.gid<0)M.gid+=4294967296}if(_)_.apply(this,arguments)}return L?G.call(Z,V,L,z):G.call(Z,V,z)}}function K(G){if(!G)return G;return function(V,L){var _=L?G.call(Z,V,L):G.call(Z,V);if(_){if(_.uid<0)_.uid+=4294967296;if(_.gid<0)_.gid+=4294967296}return _}}function W(G){if(!G)return!0;if(G.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(G.code==="EINVAL"||G.code==="EPERM")return!0}return!1}}});var nV=d((Ds,lV)=>{var cV=$0("stream").Stream;lV.exports=dj;function dj(Z){return{ReadStream:X,WriteStream:J};function X(q,Q){if(!(this instanceof X))return new X(q,Q);cV.call(this);var $=this;this.path=q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Q=Q||{};var Y=Object.keys(Q);for(var H=0,K=Y.length;H<K;H++){var W=Y[H];this[W]=Q[W]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){$._read()});return}Z.open(this.path,this.flags,this.mode,function(G,V){if(G){$.emit("error",G),$.readable=!1;return}$.fd=V,$.emit("open",V),$._read()})}function J(q,Q){if(!(this instanceof J))return new J(q,Q);cV.call(this),this.path=q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var $=Object.keys(Q);for(var Y=0,H=$.length;Y<H;Y++){var K=$[Y];this[K]=Q[K]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=Z.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var aV=d((Ts,iV)=>{iV.exports=lj;var cj=Object.getPrototypeOf||function(Z){return Z.__proto__};function lj(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:cj(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(J){Object.defineProperty(X,J,Object.getOwnPropertyDescriptor(Z,J))}),X}});var eX=d((As,tX)=>{var i=$0("fs"),nj=dV(),ij=nV(),aj=aV(),n5=$0("util"),G0,a5;if(typeof Symbol==="function"&&typeof Symbol.for==="function")G0=Symbol.for("graceful-fs.queue"),a5=Symbol.for("graceful-fs.previous");else G0="___graceful-fs.queue",a5="___graceful-fs.previous";function oj(){}function sV(Z,X){Object.defineProperty(Z,G0,{get:function(){return X}})}var r1=oj;if(n5.debuglog)r1=n5.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))r1=function(){var Z=n5.format.apply(n5,arguments);Z="GFS4: "+Z.split(/\n/).join(`
89
- GFS4: `),console.error(Z)};if(!i[G0]){if(oX=global[G0]||[],sV(i,oX),i.close=function(Z){function X(J,q){return Z.call(i,J,function(Q){if(!Q)oV();if(typeof q==="function")q.apply(this,arguments)})}return Object.defineProperty(X,a5,{value:Z}),X}(i.close),i.closeSync=function(Z){function X(J){Z.apply(i,arguments),oV()}return Object.defineProperty(X,a5,{value:Z}),X}(i.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){r1(i[G0]),$0("assert").equal(i[G0].length,0)})}var oX;if(!global[G0])sV(global,i[G0]);tX.exports=sX(aj(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched)tX.exports=sX(i),i.__patched=!0;function sX(Z){nj(Z),Z.gracefulify=sX,Z.createReadStream=A,Z.createWriteStream=I;var X=Z.readFile;Z.readFile=J;function J(j,x,v){if(typeof x==="function")v=x,x=null;return h(j,x,v);function h(r,P,C,p){return X(r,P,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))t6([h,[r,P,C],g,p||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var q=Z.writeFile;Z.writeFile=Q;function Q(j,x,v,h){if(typeof v==="function")h=v,v=null;return r(j,x,v,h);function r(P,C,p,g,U0){return q(P,C,p,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))t6([r,[P,C,p,g],c,U0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var $=Z.appendFile;if($)Z.appendFile=Y;function Y(j,x,v,h){if(typeof v==="function")h=v,v=null;return r(j,x,v,h);function r(P,C,p,g,U0){return $(P,C,p,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))t6([r,[P,C,p,g],c,U0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=K;function K(j,x,v,h){if(typeof v==="function")h=v,v=0;return r(j,x,v,h);function r(P,C,p,g,U0){return H(P,C,p,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))t6([r,[P,C,p,g],c,U0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var W=Z.readdir;Z.readdir=V;var G=/^v[0-5]\./;function V(j,x,v){if(typeof x==="function")v=x,x=null;var h=G.test(process.version)?function(C,p,g,U0){return W(C,r(C,p,g,U0))}:function(C,p,g,U0){return W(C,p,r(C,p,g,U0))};return h(j,x,v);function r(P,C,p,g){return function(U0,c){if(U0&&(U0.code==="EMFILE"||U0.code==="ENFILE"))t6([h,[P,C,p],U0,g||Date.now(),Date.now()]);else{if(c&&c.sort)c.sort();if(typeof p==="function")p.call(this,U0,c)}}}}if(process.version.substr(0,4)==="v0.8"){var L=ij(Z);F=L.ReadStream,R=L.WriteStream}var _=Z.ReadStream;if(_)F.prototype=Object.create(_.prototype),F.prototype.open=N;var z=Z.WriteStream;if(z)R.prototype=Object.create(z.prototype),R.prototype.open=w;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(j){F=j},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return R},set:function(j){R=j},enumerable:!0,configurable:!0});var D=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return D},set:function(j){D=j},enumerable:!0,configurable:!0});var M=R;Object.defineProperty(Z,"FileWriteStream",{get:function(){return M},set:function(j){M=j},enumerable:!0,configurable:!0});function F(j,x){if(this instanceof F)return _.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function N(){var j=this;b(j.path,j.flags,j.mode,function(x,v){if(x){if(j.autoClose)j.destroy();j.emit("error",x)}else j.fd=v,j.emit("open",v),j.read()})}function R(j,x){if(this instanceof R)return z.apply(this,arguments),this;else return R.apply(Object.create(R.prototype),arguments)}function w(){var j=this;b(j.path,j.flags,j.mode,function(x,v){if(x)j.destroy(),j.emit("error",x);else j.fd=v,j.emit("open",v)})}function A(j,x){return new Z.ReadStream(j,x)}function I(j,x){return new Z.WriteStream(j,x)}var T=Z.open;Z.open=b;function b(j,x,v,h){if(typeof v==="function")h=v,v=null;return r(j,x,v,h);function r(P,C,p,g,U0){return T(P,C,p,function(c,nx){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))t6([r,[P,C,p,g],c,U0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}return Z}function t6(Z){r1("ENQUEUE",Z[0].name,Z[1]),i[G0].push(Z),rX()}var i5;function oV(){var Z=Date.now();for(var X=0;X<i[G0].length;++X)if(i[G0][X].length>2)i[G0][X][3]=Z,i[G0][X][4]=Z;rX()}function rX(){if(clearTimeout(i5),i5=void 0,i[G0].length===0)return;var Z=i[G0].shift(),X=Z[0],J=Z[1],q=Z[2],Q=Z[3],$=Z[4];if(Q===void 0)r1("RETRY",X.name,J),X.apply(null,J);else if(Date.now()-Q>=60000){r1("TIMEOUT",X.name,J);var Y=J.pop();if(typeof Y==="function")Y.call(null,q)}else{var H=Date.now()-$,K=Math.max($-Q,1),W=Math.min(K*1.2,100);if(H>=W)r1("RETRY",X.name,J),X.apply(null,J.concat([Q]));else i[G0].push(Z)}if(i5===void 0)i5=setTimeout(rX,0)}});var tV=d((Is,rV)=>{function x0(Z,X){if(typeof X==="boolean")X={forever:X};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=X||{},this._maxRetryTime=X&&X.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}rV.exports=x0;x0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};x0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};x0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var X=new Date().getTime();if(Z&&X-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(Z);var J=this._timeouts.shift();if(J===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),J=this._timeouts.shift();else return!1;var q=this,Q=setTimeout(function(){if(q._attempts++,q._operationTimeoutCb){if(q._timeout=setTimeout(function(){q._operationTimeoutCb(q._attempts)},q._operationTimeout),q._options.unref)q._timeout.unref()}q._fn(q._attempts)},J);if(this._options.unref)Q.unref();return!0};x0.prototype.attempt=function(Z,X){if(this._fn=Z,X){if(X.timeout)this._operationTimeout=X.timeout;if(X.cb)this._operationTimeoutCb=X.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};x0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};x0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};x0.prototype.start=x0.prototype.try;x0.prototype.errors=function(){return this._errors};x0.prototype.attempts=function(){return this._attempts};x0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},X=null,J=0;for(var q=0;q<this._errors.length;q++){var Q=this._errors[q],$=Q.message,Y=(Z[$]||0)+1;if(Z[$]=Y,Y>=J)X=Q,J=Y}return X}});var ZB=d((rj)=>{var sj=tV();rj.operation=function(Z){var X=rj.timeouts(Z);return new sj(X,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};rj.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var X={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in Z)X[J]=Z[J];if(X.minTimeout>X.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var q=[];for(var Q=0;Q<X.retries;Q++)q.push(this.createTimeout(Q,X));if(Z&&Z.forever&&!q.length)q.push(this.createTimeout(Q,X));return q.sort(function($,Y){return $-Y}),q};rj.createTimeout=function(Z,X){var J=X.randomize?Math.random()+1:1,q=Math.round(J*X.minTimeout*Math.pow(X.factor,Z));return q=Math.min(q,X.maxTimeout),q};rj.wrap=function(Z,X,J){if(X instanceof Array)J=X,X=null;if(!J){J=[];for(var q in Z)if(typeof Z[q]==="function")J.push(q)}for(var Q=0;Q<J.length;Q++){var $=J[Q],Y=Z[$];Z[$]=function(K){var W=rj.operation(X),G=Array.prototype.slice.call(arguments,1),V=G.pop();G.push(function(L){if(W.retry(L))return;if(L)arguments[0]=W.mainError();V.apply(this,arguments)}),W.attempt(function(){K.apply(Z,G)})}.bind(Z,Y),Z[$].options=X}}});var XB=d((ws,o5)=>{o5.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")o5.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")o5.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var JB=d((js,Z2)=>{var l=global.process,t1=function(Z){return Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function"};if(!t1(l))Z2.exports=function(){return function(){}};else{if(ZJ=$0("assert"),e1=XB(),XJ=/^win/i.test(l.platform),e6=$0("events"),typeof e6!=="function")e6=e6.EventEmitter;if(l.__signal_exit_emitter__)J0=l.__signal_exit_emitter__;else J0=l.__signal_exit_emitter__=new e6,J0.count=0,J0.emitted={};if(!J0.infinite)J0.setMaxListeners(1/0),J0.infinite=!0;Z2.exports=function(Z,X){if(!t1(global.process))return function(){};if(ZJ.equal(typeof Z,"function","a callback must be provided for exit handler"),Z6===!1)s5();var J="exit";if(X&&X.alwaysLast)J="afterexit";var q=function(){if(J0.removeListener(J,Z),J0.listeners("exit").length===0&&J0.listeners("afterexit").length===0)r2()};return J0.on(J,Z),q},r2=function(){if(!Z6||!t1(global.process))return;Z6=!1,e1.forEach(function(X){try{l.removeListener(X,t2[X])}catch(J){}}),l.emit=e2,l.reallyExit=r5,J0.count-=1},Z2.exports.unload=r2,N1=function(X,J,q){if(J0.emitted[X])return;J0.emitted[X]=!0,J0.emit(X,J,q)},t2={},e1.forEach(function(Z){t2[Z]=function(){if(!t1(global.process))return;var J=l.listeners(Z);if(J.length===J0.count){if(r2(),N1("exit",null,Z),N1("afterexit",null,Z),XJ&&Z==="SIGHUP")Z="SIGINT";l.kill(l.pid,Z)}}}),Z2.exports.signals=function(){return e1},Z6=!1,s5=function(){if(Z6||!t1(global.process))return;Z6=!0,J0.count+=1,e1=e1.filter(function(X){try{return l.on(X,t2[X]),!0}catch(J){return!1}}),l.emit=qJ,l.reallyExit=JJ},Z2.exports.load=s5,r5=l.reallyExit,JJ=function(X){if(!t1(global.process))return;l.exitCode=X||0,N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),r5.call(l,l.exitCode)},e2=l.emit,qJ=function(X,J){if(X==="exit"&&t1(global.process)){if(J!==void 0)l.exitCode=J;var q=e2.apply(this,arguments);return N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),q}else return e2.apply(this,arguments)}}var ZJ,e1,XJ,e6,J0,r2,N1,t2,Z6,s5,r5,JJ,e2,qJ});var QB=d((qN,QJ)=>{var qB=Symbol();function XN(Z,X,J){let q=X[qB];if(q)return X.stat(Z,($,Y)=>{if($)return J($);J(null,Y.mtime,q)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);X.utimes(Z,Q,Q,($)=>{if($)return J($);X.stat(Z,(Y,H)=>{if(Y)return J(Y);let K=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(X,qB,{value:K}),J(null,H.mtime,K)})})}function JN(Z){let X=Date.now();if(Z==="s")X=Math.ceil(X/1000)*1000;return new Date(X)}qN.probe=XN;qN.getMtime=JN});var KB=d((VN,X4)=>{var YN=$0("path"),HJ=eX(),HN=ZB(),UN=JB(),$B=QB(),W1={};function Z4(Z,X){return X.lockfilePath||`${Z}.lock`}function UJ(Z,X,J){if(!X.realpath)return J(null,YN.resolve(Z));X.fs.realpath(Z,J)}function YJ(Z,X,J){let q=Z4(Z,X);X.fs.mkdir(q,(Q)=>{if(!Q)return $B.probe(q,X.fs,($,Y,H)=>{if($)return X.fs.rmdir(q,()=>{}),J($);J(null,Y,H)});if(Q.code!=="EEXIST")return J(Q);if(X.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));X.fs.stat(q,($,Y)=>{if($){if($.code==="ENOENT")return YJ(Z,{...X,stale:0},J);return J($)}if(!YB(Y,X))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));HB(Z,X,(H)=>{if(H)return J(H);YJ(Z,{...X,stale:0},J)})})})}function YB(Z,X){return Z.mtime.getTime()<Date.now()-X.stale}function HB(Z,X,J){X.fs.rmdir(Z4(Z,X),(q)=>{if(q&&q.code!=="ENOENT")return J(q);J()})}function t5(Z,X){let J=W1[Z];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||X.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,X.fs.stat(J.lockfilePath,(q,Q)=>{let $=J.lastUpdate+X.stale<Date.now();if(q){if(q.code==="ENOENT"||$)return $J(Z,J,Object.assign(q,{code:"ECOMPROMISED"}));return J.updateDelay=1000,t5(Z,X)}if(J.mtime.getTime()!==Q.mtime.getTime())return $J(Z,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=$B.getMtime(J.mtimePrecision);X.fs.utimes(J.lockfilePath,H,H,(K)=>{let W=J.lastUpdate+X.stale<Date.now();if(J.released)return;if(K){if(K.code==="ENOENT"||W)return $J(Z,J,Object.assign(K,{code:"ECOMPROMISED"}));return J.updateDelay=1000,t5(Z,X)}J.mtime=H,J.lastUpdate=Date.now(),J.updateDelay=null,t5(Z,X)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function $J(Z,X,J){if(X.released=!0,X.updateTimeout)clearTimeout(X.updateTimeout);if(W1[Z]===X)delete W1[Z];X.options.onCompromised(J)}function KN(Z,X,J){X={stale:1e4,update:null,realpath:!0,retries:0,fs:HJ,onCompromised:(q)=>{throw q},...X},X.retries=X.retries||0,X.retries=typeof X.retries==="number"?{retries:X.retries}:X.retries,X.stale=Math.max(X.stale||0,2000),X.update=X.update==null?X.stale/2:X.update||0,X.update=Math.max(Math.min(X.update,X.stale/2),1000),UJ(Z,X,(q,Q)=>{if(q)return J(q);let $=HN.operation(X.retries);$.attempt(()=>{YJ(Q,X,(Y,H,K)=>{if($.retry(Y))return;if(Y)return J($.mainError());let W=W1[Q]={lockfilePath:Z4(Q,X),mtime:H,mtimePrecision:K,options:X,lastUpdate:Date.now()};t5(Q,X),J(null,(G)=>{if(W.released)return G&&G(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));UB(Q,{...X,realpath:!1},G)})})})})}function UB(Z,X,J){X={fs:HJ,realpath:!0,...X},UJ(Z,X,(q,Q)=>{if(q)return J(q);let $=W1[Q];if(!$)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));$.updateTimeout&&clearTimeout($.updateTimeout),$.released=!0,delete W1[Q],HB(Q,X,J)})}function GN(Z,X,J){X={stale:1e4,realpath:!0,fs:HJ,...X},X.stale=Math.max(X.stale||0,2000),UJ(Z,X,(q,Q)=>{if(q)return J(q);X.fs.stat(Z4(Q,X),($,Y)=>{if($)return $.code==="ENOENT"?J(null,!1):J($);return J(null,!YB(Y,X))})})}function WN(){return W1}UN(()=>{for(let Z in W1){let X=W1[Z].options;try{X.fs.rmdirSync(Z4(Z,X))}catch(J){}}});VN.lock=KN;VN.unlock=UB;VN.check=GN;VN.getLocks=WN});var WB=d((Ns,GB)=>{var RN=eX();function MN(Z){let X=["mkdir","realpath","stat","rmdir","utimes"],J={...Z};return X.forEach((q)=>{J[q]=(...Q)=>{let $=Q.pop(),Y;try{Y=Z[`${q}Sync`](...Q)}catch(H){return $(H)}$(null,Y)}}),J}function FN(Z){return(...X)=>new Promise((J,q)=>{X.push((Q,$)=>{if(Q)q(Q);else J($)}),Z(...X)})}function DN(Z){return(...X)=>{let J,q;if(X.push((Q,$)=>{J=Q,q=$}),Z(...X),J)throw J;return q}}function TN(Z){if(Z={...Z},Z.fs=MN(Z.fs||RN),typeof Z.retries==="number"&&Z.retries>0||Z.retries&&typeof Z.retries.retries==="number"&&Z.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return Z}GB.exports={toPromise:FN,toSync:DN,toSyncOptions:TN}});var BB=d((ks,k1)=>{var X2=KB(),{toPromise:e5,toSync:Z7,toSyncOptions:KJ}=WB();async function VB(Z,X){let J=await e5(X2.lock)(Z,X);return e5(J)}function AN(Z,X){let J=Z7(X2.lock)(Z,KJ(X));return Z7(J)}function IN(Z,X){return e5(X2.unlock)(Z,X)}function ON(Z,X){return Z7(X2.unlock)(Z,KJ(X))}function wN(Z,X){return e5(X2.check)(Z,X)}function jN(Z,X){return Z7(X2.check)(Z,KJ(X))}k1.exports=VB;k1.exports.lock=VB;k1.exports.unlock=IN;k1.exports.lockSync=AN;k1.exports.unlockSync=ON;k1.exports.check=wN;k1.exports.checkSync=jN});function WJ(){if(!GJ)GJ=BB();return GJ}function xs(Z,X){return WJ().lock(Z,X)}function LB(Z,X){return WJ().lockSync(Z,X)}function Es(Z,X){return WJ().check(Z,X)}var GJ;var _B=()=>{};function kN(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"essential-traffic";if(process.env.DISABLE_TELEMETRY)return"no-telemetry";return"default"}function zB(){return kN()==="essential-traffic"}function RB(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";return null}var VJ=()=>{};import{dirname as xN,join as MB}from"path";function DB(Z){return[MB(Z,X7),MB(Z,FB)]}function EN(Z,X){let[J,q]=DB(Z);return X(J)?J:q}function PN(Z,X){return DB(Z).some((J)=>X(J))}function Cs(Z,X){let J=Z;while(!0){if(PN(J,X))return EN(J,X);let q=xN(J);if(q===J)return null;J=q}}function ys(Z){return Z===X7||Z===FB}var X7="AGENTS.md",FB="CLAUDE.md";var TB=()=>{};var vN,CN;var AB=B(()=>{vN=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","notifications_disabled"],CN=["normal","vim"]});var xB={};y7(xB,{validateTeamMemWritePath:()=>hN,validateTeamMemKey:()=>gN,isTeamMemoryEnabled:()=>wB,isTeamMemPath:()=>kB,isTeamMemFile:()=>fN,getTeamMemPath:()=>J4,getTeamMemEntrypoint:()=>bN,PathTraversalError:()=>B0});import{lstat as yN,realpath as OB}from"fs/promises";import{dirname as IB,join as J7,resolve as BJ,sep as LJ}from"path";function SN(Z){if(Z.includes("\x00"))throw new B0(`Null byte in path key: "${Z}"`);let X;try{X=decodeURIComponent(Z)}catch{X=Z}if(X!==Z&&(X.includes("..")||X.includes("/")))throw new B0(`URL-encoded traversal in path key: "${Z}"`);let J=Z.normalize("NFKC");if(J!==Z&&(J.includes("..")||J.includes("/")||J.includes("\\")||J.includes("\x00")))throw new B0(`Unicode-normalized traversal in path key: "${Z}"`);if(Z.includes("\\"))throw new B0(`Backslash in path key: "${Z}"`);if(Z.startsWith("/"))throw new B0(`Absolute path key: "${Z}"`);return Z}function wB(){if(!gV())return!1;return C1("tengu_herring_clock",!0)}function J4(){return(J7(s2(),"team")+LJ).normalize("NFC")}function bN(){return J7(s2(),"team","MEMORY.md")}async function jB(Z){let X=[],J=Z;for(let q=IB(J);J!==q;q=IB(J))try{let Q=await OB(J);return X.length===0?Q:J7(Q,...X.reverse())}catch(Q){let $=K0(Q);if($==="ENOENT")try{if((await yN(J)).isSymbolicLink())throw new B0(`Dangling symlink detected (target does not exist): "${J}"`)}catch(Y){if(Y instanceof B0)throw Y}else if($==="ELOOP")throw new B0(`Symlink loop detected in path: "${J}"`);else if($!=="ENOTDIR"&&$!=="ENAMETOOLONG")throw new B0(`Cannot verify path containment (${$}): "${J}"`);X.push(J.slice(q.length+LJ.length)),J=q}return Z}async function NB(Z){let X;try{X=await OB(J4().replace(/[/\\]+$/,""))}catch(J){let q=K0(J);if(q==="ENOENT"||q==="ENOTDIR")return!0;return!1}if(Z===X)return!0;return Z.startsWith(X+LJ)}function kB(Z){let X=BJ(Z),J=J4();return X.startsWith(J)}async function hN(Z){if(Z.includes("\x00"))throw new B0(`Null byte in path: "${Z}"`);let X=BJ(Z),J=J4();if(!X.startsWith(J))throw new B0(`Path escapes team memory directory: "${Z}"`);let q=await jB(X);if(!await NB(q))throw new B0(`Path escapes team memory directory via symlink: "${Z}"`);return X}async function gN(Z){SN(Z);let X=J4(),J=J7(X,Z),q=BJ(J);if(!q.startsWith(X))throw new B0(`Key escapes team memory directory: "${Z}"`);let Q=await jB(q);if(!await NB(Q))throw new B0(`Key escapes team memory directory via symlink: "${Z}"`);return q}function fN(Z){return wB()&&kB(Z)}var B0;var EB=B(()=>{W3();y1();aX();B0=class B0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}}});import{randomBytes as mN}from"crypto";import{unwatchFile as uN,watchFile as pN}from"fs";import{basename as DJ,dirname as TJ,join as T0,resolve as $7}from"path";function V1(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,thinkingHistoryRedactionEnabled:!0,toolResultSummarizerEnabled:!0,showTurnDuration:!0,showCacheStats:"compact",hasSeenTasksHint:!1,hasUsedStash:!1,hasUsedBackgroundTask:!1,queuedCommandUpHintCount:0,diffTool:"auto",customApiKeyResponses:{approved:[],rejected:[]},env:{},tipsHistory:{},memoryUsageCount:0,promptQueueUseCount:0,btwUseCount:0,todoFeatureEnabled:!0,showExpandedTodos:!1,messageIdleNotifThresholdMs:60000,autoConnectIde:!1,autoInstallIdeExtension:!0,fileCheckpointingEnabled:!0,terminalProgressBarEnabled:!0,cachedStatsigGates:{},cachedDynamicConfigs:{},cachedGrowthBookFeatures:{},respectGitignore:!0,copyFullResponse:!1,providerProfiles:[],openaiAdditionalModelOptionsCacheByProfile:{},knowledgeGraphEnabled:!0}}function _r(Z){return cN.includes(Z)}function zr(){bB=!1}function Rr(){return bB||=nN()}function nN(){if(yB())return!0;let Z=W0(),X=wJ();if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let q=v1(s());while(!0){if(Z.projects?.[q]?.hasTrustDialogAccepted)return!0;let $=v1($7(q,".."));if($===q)break;q=$}return!1}function Mr(Z){let X=W0(),J=v1($7(Z));while(!0){if(X.projects?.[J]?.hasTrustDialogAccepted)return!0;let q=v1($7(J,".."));if(q===J)return!1;J=q}}function Tr(Z){return lN.includes(Z)}function H7(Z){let X=r0.config;if(!X)return!1;let J=X.oauthAccount!==void 0&&Z.oauthAccount===void 0,q=X.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return J||q}function hB(Z){return RJ.add(Z),()=>RJ.delete(Z)}function PB(){for(let Z of RJ)try{Z()}catch{}}function A0(Z){let X=null;try{if(fB(V0(),V1,(q)=>{let Q=Z(q);if(Q===q)return q;return X={...Q,projects:vB(q.projects)},X})&&X)Y7(X),PB()}catch(J){let q=K0(J);if(q==="EACCES"||q==="EPERM"||q==="EROFS"){E(`Skipping global config write due to permission error: ${J}`,{level:"error"});return}E(`Failed to save config with lock: ${J}`,{level:"error"});let Q=X6(V0(),V1);if(H7(Q)){E("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),c0("tengu_config_auth_loss_prevented",{});return}let $=Z(Q);if($===Q)return;X={...$,projects:vB(Q.projects)},gB(V0(),X,AJ),Y7(X),PB()}}function Ar(){return IJ}function iN(){let Z=q4+Q7;if(Z>0)c0("tengu_config_cache_stats",{cache_hits:q4,cache_misses:Q7,hit_rate:q4/Z});q4=0,Q7=0}function MJ(Z){if(Z.installMethod!==void 0)return Z;let X=Z,J="unknown",q=Z.autoUpdates??!0;switch(X.autoUpdaterStatus){case"migrated":J="local";break;case"installed":J="native";break;case"disabled":q=!1;break;case"enabled":case"no_permissions":case"not_configured":J="global";break;case void 0:break}return{...Z,installMethod:J,autoUpdates:q}}function vB(Z){if(!Z)return Z;let X={},J=!1;for(let[q,Q]of Object.entries(Z)){let $=Q;if($.history!==void 0){J=!0;let{history:Y,...H}=$;X[q]=H}else X[q]=Q}return J?X:Z}function oN(){if(zJ)return;zJ=!0;let Z=V0();pN(Z,{interval:aN,persistent:!1},(X)=>{if(X.mtimeMs<=r0.mtime)return;k().readFile(Z,{encoding:"utf-8"}).then((J)=>{if(X.mtimeMs<=r0.mtime)return;let q=C0(p0(J));if(q===null||typeof q!=="object")return;r0={config:MJ({...V1(),...q}),mtime:X.mtimeMs},x1={mtime:X.mtimeMs,size:X.size}}).catch(()=>{})}),Y4(async()=>{uN(Z),zJ=!1})}function Y7(Z){r0={config:Z,mtime:Date.now()},x1=null}function W0(){if(r0.config)return q4++,r0.config;Q7++;try{let Z=null;try{Z=k().statSync(V0())}catch{}let X=MJ(X6(V0(),V1));return r0={config:X,mtime:Z?.mtimeMs??Date.now()},x1=Z?{mtime:Z.mtimeMs,size:Z.size}:null,oN(),X}catch{return MJ(X6(V0(),V1))}}function Or(){let Z=W0().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function wr(Z){let X=W0();if(X.customApiKeyResponses?.approved?.includes(Z))return"approved";if(X.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function gB(Z,X,J){let q=TJ(Z);k().mkdirSync(q);let $=i7(X,(Y,H)=>f(Y)!==f(J[H]));if(I6(Z,f($,null,2),{encoding:"utf-8",mode:384}),Z===V0())IJ++}function fB(Z,X,J){let q=X(),Q=TJ(Z),$=k();$.mkdirSync(Q);let Y;try{let H=`${Z}.lock`,K=Date.now();Y=LB(Z,{lockfilePath:H,onCompromised:(_)=>{E(`Config lock compromised: ${_}`,{level:"error"})}});let W=Date.now()-K;if(W>100)E("Lock acquisition took longer than expected - another Claude instance may be running"),c0("tengu_config_lock_contention",{lock_time_ms:W});if(x1&&Z===V0())try{let _=$.statSync(Z);if(_.mtimeMs!==x1.mtime||_.size!==x1.size)c0("tengu_config_stale_write",{read_mtime:x1.mtime,write_mtime:_.mtimeMs,read_size:x1.size,write_size:_.size})}catch(_){if(K0(_)!=="ENOENT")throw _}let G=X6(Z,X);if(Z===V0()&&H7(G))return E("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudio/config.json. See GH #3117.",{level:"error"}),c0("tengu_config_auth_loss_prevented",{}),!1;let V=J(G);if(V===G)return!1;let L=i7(V,(_,z)=>f(_)!==f(q[z]));try{let _=DJ(Z),z=OJ();try{$.mkdirSync(z)}catch(I){if(K0(I)!=="EEXIST")throw I}let D=60000,M=$.readdirStringSync(z).filter((I)=>I.startsWith(`${_}.backup.`)).sort().reverse(),F=M[0],N=F?Number(F.split(".backup.").pop()):0,R=Number.isNaN(N)||Date.now()-N>=D;if(R){let I=T0(z,`${_}.backup.${Date.now()}`);$.copyFileSync(Z,I)}let w=5,A=R?$.readdirStringSync(z).filter((I)=>I.startsWith(`${_}.backup.`)).sort().reverse():M;for(let I of A.slice(w))try{$.unlinkSync(T0(z,I))}catch{}}catch(_){if(K0(_)!=="ENOENT")E(`Failed to backup config: ${_}`,{level:"error"})}if(I6(Z,f(L,null,2),{encoding:"utf-8",mode:384}),Z===V0())IJ++;return!0}finally{if(Y)Y()}}function jr(){if(FJ)return;let Z=Date.now();Q0("info","enable_configs_started"),FJ=!0,X6(V0(),V1,!0),Q0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function OJ(){return T0(Y0(),"backups")}function CB(Z){let X=k(),J=DJ(Z),q=OJ();try{let Y=X.readdirStringSync(q).filter((H)=>H.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return T0(q,Y)}catch{}let Q=TJ(Z);try{let Y=X.readdirStringSync(Q).filter((K)=>K.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return T0(Q,Y);let H=`${Z}.backup`;try{return X.statSync(H),H}catch{}}catch{}return null}function X6(Z,X,J){if(!FJ)throw Error("Config accessed before allowed.");let q=k();try{let Q=q.readFileSync(Z,{encoding:"utf-8"});try{let $=H0(p0(Q));return{...X(),...$}}catch($){let Y=$ instanceof Error?$.message:String($);throw new q7(Y,Z,X())}}catch(Q){if(K0(Q)==="ENOENT"){let Y=CB(Z);if(Y)process.stderr.write(`
90
- Claude configuration file not found at: ${Z}
91
- A backup file exists at: ${Y}
92
- You can manually restore it by running: cp "${Y}" "${Z}"
93
-
94
- `);return X()}if(Q instanceof q7&&J)throw Q;if(Q instanceof q7){if(E(`Config file corrupted, resetting to defaults: ${Q.message}`,{level:"error"}),!_J){_J=!0;try{m(Q);let _=!1;try{q.statSync(`${Z}.backup`),_=!0}catch{}c0("tengu_config_parse_error",{has_backup:_})}finally{_J=!1}}process.stderr.write(`
95
- Claude configuration file at ${Z} is corrupted: ${Q.message}
96
- `);let Y=DJ(Z),H=OJ();try{q.mkdirSync(H)}catch(_){if(K0(_)!=="EEXIST")throw _}let K=q.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),W,G=!1,V=q.readFileSync(Z,{encoding:"utf-8"});for(let _ of K)try{let z=q.readFileSync(T0(H,_),{encoding:"utf-8"});if(V===z){G=!0;break}}catch{}if(!G){W=T0(H,`${Y}.corrupted.${Date.now()}`);try{q.copyFileSync(Z,W),E(`Corrupted config backed up to: ${W}`,{level:"error"})}catch{}}let L=CB(Z);if(W)process.stderr.write(`The corrupted file has been backed up to: ${W}
97
- `);else if(G)process.stderr.write(`The corrupted file has already been backed up.
98
- `);if(L)process.stderr.write(`A backup file exists at: ${L}
99
- You can manually restore it by running: cp "${L}" "${Z}"
100
-
101
- `);else process.stderr.write(`
102
- `)}return X()}}function Nr(){let Z=wJ(),X=W0();if(!X.projects)return Q4;let J=X.projects[Z]??Q4;if(typeof J.allowedTools==="string")J.allowedTools=C0(J.allowedTools)??[];return J}function kr(Z){let X=wJ(),J=null;try{if(fB(V0(),V1,(Q)=>{let $=Q.projects?.[X]??Q4,Y=Z($);if(Y===$)return Q;return J={...Q,projects:{...Q.projects,[X]:Y}},J})&&J)Y7(J)}catch(q){E(`Failed to save config with lock: ${q}`,{level:"error"});let Q=X6(V0(),V1);if(H7(Q)){E("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),c0("tengu_config_auth_loss_prevented",{});return}let $=Q.projects?.[X]??Q4,Y=Z($);if(Y===$)return;J={...Q,projects:{...Q.projects,[X]:Y}},gB(V0(),J,AJ),Y7(J)}}function sN(){return rN()!==null}function xr(){return sN()&&!e(process.env.FORCE_AUTOUPDATE_PLUGINS)}function Er(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function rN(){return{type:"development"}}function Pr(){let Z=W0();if(Z.userID)return Z.userID;let X=mN(32).toString("hex");return A0((J)=>({...J,userID:X})),X}function vr(){if(!W0().firstStartTime){let X=new Date().toISOString();A0((J)=>({...J,firstStartTime:J.firstStartTime??X}))}}function Cr(Z){let X=s1();switch(Z){case"User":return T0(Y0(),"CLAUDE.md");case"Local":return T0(X,"CLAUDE.local.md");case"Project":return T0(X,X7);case"Managed":return T0(F1(),"CLAUDE.md");case"AutoMem":return uV()}return dN.getTeamMemEntrypoint()}function yr(){return T0(F1(),".claude","rules")}function Sr(){return T0(Y0(),"rules")}function gr(Z){r0.config=Z,r0.mtime=Z?Date.now():0}var dN,_J=!1,Q4,Lr,AJ,cN,lN,bB=!1,Fr,Dr,RJ,r0,x1=null,q4=0,Q7=0,IJ=0,Ir=20,aN=1000,zJ=!1,FJ=!1,wJ,br,hr;var jJ=B(()=>{L1();yQ();j6();aX();l$();t0();SB();R1();G2();MX();d0();y1();h4();R0();R2();d4();S4();_B();u0();v4();VJ();l4();TB();L0();AB();dN=(EB(),$4(xB)),Q4={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},Lr=["off","compact","full"];AJ=V1(),cN=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","claudeInChromeDefaultEnabled","hasCompletedClaudeInChromeOnboarding","lspRecommendationDisabled","lspRecommendationNeverPlugins","lspRecommendationIgnoredCount","copyFullResponse","copyOnSelect","flickerFreeMode","permissionExplainerEnabled","prStatusFooterEnabled","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled"];lN=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];Fr={...AJ,autoUpdates:!1,knowledgeGraphEnabled:!0},Dr={...Q4};RJ=new Set;r0={config:null,mtime:0};Y4(async()=>{iN()});wJ=u(()=>{let Z=s1(),X=d5(Z);if(X)return v1(X);return v1($7(Z))});br=X6,hr=H7});function U7(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function mB(Z){let X=U7(Z);return X.length>0?X[0]:Z.trim()}var NJ=()=>{};import{randomBytes as tN}from"crypto";function J2(Z){return Z?.trim()??""}function I0(Z){let X=J2(Z);return X.length>0?X:void 0}function eN(Z){return J2(Z).replace(/\/+$/,"")}function Zk(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function Xk(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function Jk(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[J,q]of Object.entries(Z)){let Q=J2(J),$=typeof q==="string"?q.trim():"";if(Q.length>0&&$.length>0)X[Q]=$}return Object.keys(X).length>0?X:void 0}function qk(Z){if(!Z||typeof Z!=="object")return;let X={},J=I0(Z.codexAuthPath);if(J)X.codexAuthPath=J;let q=I0(Z.codexAccountId);if(q)X.codexAccountId=q;let Q=I0(Z.githubToken);if(Q)X.githubToken=Q;let $=I0(Z.awsRegion);if($)X.awsRegion=$;let Y=I0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=I0(Z.gcpRegion);if(H)X.gcpRegion=H;let K=I0(Z.azureResource);if(K)X.azureResource=K;let W=Jk(Z.customHeaders);if(W)X.customHeaders=W;let G=Xk(Z.reasoningEffort);if(G)X.reasoningEffort=G;return Object.keys(X).length>0?X:void 0}function dB(Z){let X=J2(Z.id),J=J2(Z.name),q=Zk(Z.provider),Q=eN(Z.baseUrl),$=J2(Z.model);if(!X||!J||!Q||q!=="anthropic"&&!$)return null;let H={id:X,name:J,provider:q,baseUrl:Q,model:$,apiKey:I0(Z.apiKey)},K=qk(Z.extras);if(K)H.extras=K;return H}function Qk(Z){let X=new Set,J=[];for(let q of Z??[]){let Q=dB(q);if(!Q||X.has(Q.id))continue;X.add(Q.id),J.push(Q)}return J}function $k(){return`provider_${tN(6).toString("hex")}`}function cB(Z,X=$k()){return dB({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function lB(Z,X=W0()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function lr(Z){switch(Z){case"anthropic":return{provider:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",model:"",apiKey:"",requiresApiKey:!0};case"openai":return{provider:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-5.4",apiKey:"",requiresApiKey:!0};case"kimi-code":return{provider:"openai",name:"Moonshot AI - Kimi Code",baseUrl:"https://api.kimi.com/coding/v1",model:"kimi-for-coding",apiKey:"",requiresApiKey:!0};case"moonshotai":return{provider:"openai",name:"Moonshot AI - API",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k2.5",apiKey:"",requiresApiKey:!0};case"deepseek":return{provider:"openai",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-v4-flash, deepseek-v4-pro, deepseek-chat, deepseek-reasoner",apiKey:"",requiresApiKey:!0};case"gemini":return{provider:"gemini",name:"Google Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-3-flash-preview",apiKey:"",requiresApiKey:!0};case"mistral":return{provider:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai/v1",model:"devstral-latest",apiKey:"",requiresApiKey:!0};case"together":return{provider:"openai",name:"Together AI",baseUrl:"https://api.together.xyz/v1",model:"Qwen/Qwen3.5-9B",apiKey:"",requiresApiKey:!0};case"groq":return{provider:"openai",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.3-70b-versatile",apiKey:"",requiresApiKey:!0};case"azure-openai":return{provider:"openai",name:"Azure OpenAI",baseUrl:"https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1",model:"YOUR-DEPLOYMENT-NAME",apiKey:"",requiresApiKey:!0};case"openrouter":return{provider:"openai",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"openai/gpt-5-mini",apiKey:"",requiresApiKey:!0};case"lmstudio":return{provider:"openai",name:"LM Studio",baseUrl:"http://localhost:1234/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"dashscope-cn":return{provider:"openai",name:"Alibaba Coding Plan (China)",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"dashscope-intl":return{provider:"openai",name:"Alibaba Coding Plan",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"custom":return{provider:"openai",name:"Custom OpenAI-compatible",baseUrl:uB,model:pB,apiKey:"",requiresApiKey:!1};case"nvidia-nim":return{provider:"openai",name:"NVIDIA NIM",baseUrl:"https://integrate.api.nvidia.com/v1",model:"nvidia/llama-3.1-nemotron-70b-instruct",apiKey:"",requiresApiKey:!0};case"minimax":return{provider:"openai",name:"MiniMax",baseUrl:"https://api.minimax.io/v1",model:"MiniMax-M2.5",apiKey:"",requiresApiKey:!0};case"atomic-chat":return{provider:"openai",name:"Atomic Chat",baseUrl:"http://127.0.0.1:1337/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"bankr":return{provider:"openai",name:"Bankr",baseUrl:"https://llm.bankr.bot/v1",model:"claude-opus-4.6",apiKey:"",requiresApiKey:!0};case"bedrock":return{provider:"bedrock",name:"AWS Bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"vertex":return{provider:"vertex",name:"Google Vertex AI",baseUrl:"https://us-central1-aiplatform.googleapis.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"foundry":return{provider:"foundry",name:"Azure AI Foundry",baseUrl:"https://YOUR-RESOURCE-NAME.services.ai.azure.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:uB,model:pB,apiKey:"",requiresApiKey:!1}}}function E1(Z=W0()){return Qk(Z.providerProfiles)}function nr(Z=W0()){return E1(Z).length>0}function B1(Z=W0()){let X=E1(Z);if(X.length===0)return;let J=I0(Z.activeProviderProfileId);return X.find((q)=>q.id===J)??X[0]}function ir(Z,X){let J=cB(Z);if(!J)return null;let q=X?.makeActive??!0;if(A0(($)=>{let H=[...E1($),J],K=I0($.activeProviderProfileId),W=q||!K||!H.some((G)=>G.id===K)?J.id:K;return{...$,providerProfiles:H,activeProviderProfileId:W}}),B1()?.id===J.id)Hk(J.id),Uk();return J}function ar(Z,X){let J=cB(X,Z);if(!J)return null;let q=!1;if(A0((Q)=>{let $=E1(Q),Y=$.findIndex((L)=>L.id===Z);if(Y<0)return Q;q=!0;let H=[...$];H[Y]=J;let K={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete K[Z];let W=I0(Q.activeProviderProfileId),G=W&&H.some((L)=>L.id===W)?W:H[0]?.id;return{...Q,providerProfiles:H,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:K,openaiAdditionalModelOptionsCache:G===Z?[]:Q.openaiAdditionalModelOptionsCache}}),!q)return null;return J}function or(Z){let X=I0(Z);if(!X)return null;let J=B1();if(!J)return null;if(U7(J.model).includes(X))return J;A0(($)=>{let Y=E1($),H=Y.findIndex((G)=>G.id===J.id);if(H<0)return $;let K=Y[H];if(K.model===X)return $;let W=[...Y];return W[H]={...K,model:X},{...$,providerProfiles:W}});let Q=B1();if(!Q||Q.id!==J.id)return null;return Q}function sr(){let Z=B1();if(!Z)return;A0((X)=>{let J=E1(X),q=J.findIndex((Y)=>Y.id===Z.id);if(q<0)return X;let Q=J[q];if(!Q.model)return X;let $=[...J];return $[q]={...Q,model:""},{...X,providerProfiles:$}})}function Yk(Z){let X=U7(Z.model);if(X.length===0)return[];return X.map((J)=>({value:J,label:J,description:`Provider: ${Z.name}`}))}function Hk(Z){let X=W0(),q=E1(X).find(($)=>$.id===Z);if(!q)return null;let Q=Yk(q);return A0(($)=>({...$,activeProviderProfileId:Z,openaiAdditionalModelOptionsCache:Q.length>0?Q:lB(Z,$),openaiAdditionalModelOptionsCacheByProfile:{...$.openaiAdditionalModelOptionsCacheByProfile??{},[Z]:Q.length>0?Q:$.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}})),q}function rr(Z){let X=!1,J;return A0((q)=>{let Q=E1(q);if(!Q.find((V)=>V.id===Z))return q;X=!0;let Y=Q.filter((V)=>V.id!==Z),H=I0(q.activeProviderProfileId),W=!H||H===Z||!Y.some((V)=>V.id===H)?Y[0]?.id:H;if(W)J=Y.find((V)=>V.id===W)??Y[0];let G={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete G[Z],{...q,providerProfiles:Y,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:G,openaiAdditionalModelOptionsCache:W?lB(W,{...q,openaiAdditionalModelOptionsCacheByProfile:G}):[]}}),{removed:X,activeProfileId:J?.id}}function tr(Z=W0()){let X=B1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let J=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(J)return J;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function er(Z){let X=B1();if(!X){A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z}));return}A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...J.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function Uk(){let Z=B1();if(!Z){A0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}A0((X)=>{let J={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete J[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:J}})}var uB="http://localhost:11434/v1",pB="llama3.1:8b";var nB=B(()=>{jJ();NJ()});function K7(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let J=Z.read();if(J!==null&&J!==void 0)return J;return X.read()||{}},async readAsync(){let J=await Z.readAsync();if(J!==null&&J!==void 0)return J;return await X.readAsync()||{}},update(J){let q=Z.read(),Q=Z.update(J);if(Q.success){if(q===null)X.delete();return Q}let $=X.update(J);if($.success){if(q!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let J=Z.delete(),q=X.delete();return J||q}}}var iB=()=>{};function G7(Z,X,J=10*oB*aB){let W=[];try{let q;if(X===void 0)q={};else if(X instanceof AbortSignal)q={abortSignal:X,timeout:J};else q=X;let{abortSignal:Q,timeout:$=10*oB*aB,input:Y,stdio:H=["ignore","pipe","pipe"]}=q;Q?.throwIfAborted();const K=R6(W,k4`exec: ${Z.slice(0,200)}`,0);try{let _=N0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:s(),stdio:H,shell:!0,reject:!1,input:Y});if(!_.stdout)return null;return _.stdout.trim()||null}catch{return null}}catch(G){var V=G,L=1}finally{M6(W,V,L)}}var aB=1000,oB=60;var kJ=B(()=>{c6();t0();L0()});import{createHash as Kk}from"crypto";import{userInfo as Gk}from"os";function J6(Z=""){let X=Y0(),q=!process.env.CLAUDIO_CONFIG_DIR?"":`-${Kk("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${sB().OAUTH_FILE_SUFFIX}${Z}${q}`}function H4(Z=""){return J6(Z)}function O0(){try{return process.env.USER||Gk().username}catch{return"claude-code-user"}}function EJ(){q0.cache={data:null,cachedAt:0},q0.generation++,q0.readInFlight=null}function Wt(Z){if(q0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}q0.cache={data:X,cachedAt:Date.now()}}var h0="-credentials",xJ=30000,q0;var W7=B(()=>{HW();d0();q0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function Vk(){try{let Z=H4(h0),X=O0(),{stdout:J,code:q}=await a("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(q===0&&J)return H0(J.trim())}catch(Z){}return null}function Ft(){if(q2!==void 0)return q2;if(process.platform!=="darwin")return q2=!1,!1;try{q2=N0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{q2=!1}return q2}var Wk=4032,PJ,q2;var rB=B(()=>{c6();R1();f4();kJ();L0();W7();PJ={name:"keychain",read(){let Z=q0.cache;if(Date.now()-Z.cachedAt<xJ)return Z.data;try{let X=H4(h0),J=O0(),q=G7(`security find-generic-password -a "${J}" -w -s "${X}"`);if(q){let Q=H0(q);return q0.cache={data:Q,cachedAt:Date.now()},Q}}catch(X){}if(Z.data!==null)return E("[keychain] read failed; serving stale cache",{level:"warn"}),q0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return q0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=q0.cache;if(Date.now()-Z.cachedAt<xJ)return Z.data;if(q0.readInFlight)return q0.readInFlight;let X=q0.generation,J=Vk().then((q)=>{if(X===q0.generation){if(q===null&&Z.data!==null)E("[keychain] readAsync failed; serving stale cache",{level:"warn"});let Q=q??Z.data;return q0.cache={data:Q,cachedAt:Date.now()},q0.readInFlight=null,Q}return q});return q0.readInFlight=J,J},update(Z){EJ();try{let X=H4(h0),J=O0(),q=f(Z),Q=Buffer.from(q,"utf-8").toString("hex"),$=`add-generic-password -U -a "${J}" -s "${X}" -X "${Q}"
103
- `,Y;if($.length<=Wk)Y=N0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else E(`Keychain payload (${q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=N0("security",["add-generic-password","-U","-a",J,"-s",X,"-X",Q],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return q0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){EJ();try{let Z=H4(h0),X=O0();return G7(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var vJ;var tB=B(()=>{c6();L0();W7();vJ={name:"libsecret",read(){try{let Z=O0(),X=J6(h0),J=N0("secret-tool",["lookup","service",X,"account",Z],{reject:!1});if(J.exitCode===0&&J.stdout)return H0(J.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let X=O0(),J=J6(h0),q=f(Z);return{success:N0("secret-tool",["store","--label",J,"service",J,"account",X],{input:q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),X=J6(h0);return N0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as Bk}from"path";function U4(Z){return Z.replace(/'/g,"''")}function V7(){return J6(h0)}function eB(){return`${V7()}:${O0()}`}function CJ(){let Z=V7().replace(/[^a-zA-Z0-9._-]/g,"_");return Bk(Y0(),`${Z}.secure.dpapi`)}function K4(Z,X){try{return N0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function Lk(Z,X){let J=Z?.stderr?.trim();if(J)return J;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function ZL(){let Z=V7().replace(/"/g,'`"'),X=O0().replace(/"/g,'`"'),J=`
104
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
105
- try {
106
- $vault = New-Object Windows.Security.Credentials.PasswordVault
107
- $cred = $vault.Retrieve("${Z}", "${X}")
108
- $cred.FillPassword()
109
- [Console]::Out.Write($cred.Password)
110
- } catch {
111
- exit 1
112
- }
113
- `,q=K4(J);if(q?.exitCode===0&&q.stdout)try{return H0(q.stdout)}catch{return null}return null}var yJ;var XL=B(()=>{c6();d0();L0();W7();yJ={name:"credential-locker-dpapi",read(){let Z=U4(CJ()),X=U4(eB()),J=`
114
- try {
115
- Add-Type -AssemblyName System.Security
116
- $path = '${Z}'
117
- if (!(Test-Path -LiteralPath $path)) {
118
- exit 1
119
- }
120
-
121
- $protectedBase64 = [System.IO.File]::ReadAllText(
122
- $path,
123
- [System.Text.Encoding]::UTF8
124
- ).Trim()
125
- if (-not $protectedBase64) {
126
- exit 1
127
- }
128
-
129
- $protectedBytes = [Convert]::FromBase64String($protectedBase64)
130
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${X}')
131
- $bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
132
- $protectedBytes,
133
- $entropyBytes,
134
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
135
- )
136
- [Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
137
- } catch {
138
- exit 1
139
- }
140
- `,q=K4(J);if(q?.exitCode===0&&q.stdout)try{return H0(q.stdout)}catch{return ZL()}return ZL()},async readAsync(){return this.read()},update(Z){let X=U4(CJ()),J=U4(eB()),q=f(Z),Q=`
141
- try {
142
- Add-Type -AssemblyName System.Security
143
- $path = '${X}'
144
- $directory = [System.IO.Path]::GetDirectoryName($path)
145
- if ($directory) {
146
- [System.IO.Directory]::CreateDirectory($directory) | Out-Null
147
- }
148
-
149
- $payload = [Console]::In.ReadToEnd()
150
- $bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
151
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${J}')
152
- $protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
153
- $bytes,
154
- $entropyBytes,
155
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
156
- )
157
- $protectedBase64 = [Convert]::ToBase64String($protectedBytes)
158
- [System.IO.File]::WriteAllText(
159
- $path,
160
- $protectedBase64,
161
- [System.Text.Encoding]::UTF8
162
- )
163
- } catch {
164
- Write-Error $_.Exception.Message
165
- exit 1
166
- }
167
- `,$=K4(Q,{input:q});if($?.exitCode===0)return{success:!0};return{success:!1,warning:Lk($,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let X=`
168
- try {
169
- $path = '${U4(CJ())}'
170
- if (Test-Path -LiteralPath $path) {
171
- Remove-Item -LiteralPath $path -Force
172
- }
173
- } catch {
174
- exit 1
175
- }
176
- `,J=K4(X),q=V7().replace(/"/g,'`"'),Q=O0().replace(/"/g,'`"'),$=`
177
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
178
- try {
179
- $vault = New-Object Windows.Security.Credentials.PasswordVault
180
- $cred = $vault.Retrieve("${q}", "${Q}")
181
- $vault.Remove($cred)
182
- } catch {
183
- exit 0
184
- }
185
- `,Y=K4($);return(J?.exitCode??1)===0}}});import{chmodSync as _k}from"fs";import{join as zk}from"path";function B7(){let Z=Y0(),X=".credentials.json";return{storageDir:Z,storagePath:zk(Z,".credentials.json")}}var G4;var qL=B(()=>{d0();y1();R0();L0();G4={name:"plaintext",read(){let{storagePath:Z}=B7();try{let X=k().readFileSync(Z,{encoding:"utf8"});return H0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=B7();try{let X=await k().readFile(Z,{encoding:"utf8"});return H0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:J}=B7();try{k().mkdirSync(X)}catch(q){if(K0(q)!=="EEXIST")throw q}return JL(J,f(Z),{encoding:"utf8",flush:!1}),_k(J,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=B7();try{return k().unlinkSync(Z),!0}catch(X){if(K0(X)==="ENOENT")return!0;return!1}}}});function QL(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?K7(PJ,G4):PJ;if(process.platform==="linux")return X?K7(vJ,G4):vJ;if(process.platform==="win32")return X?K7(yJ,G4):yJ;return X?G4:Rk}var Rk;var $L=B(()=>{iB();rB();tB();XL();qL();Rk={name:"unavailable-secure-storage",read:()=>null,readAsync:async()=>null,update:()=>({success:!1,warning:"Secure storage is unavailable on this platform without plaintext fallback."}),delete:()=>!0}});function S(Z){if(typeof Z!=="string")return;let X=Z.trim();return X?X:void 0}function SJ(Z=process.env){return S(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function it(Z=process.env){let X=S(Z.CODEX_OAUTH_CALLBACK_PORT);if(!X)return 1455;let J=Number.parseInt(X,10);if(Number.isInteger(J)&&J>=0&&J<=65535)return J;return 1455}function bJ(Z){let X=Z.split(".");if(X.length<2)return;try{let J=X[1].replace(/-/g,"+").replace(/_/g,"/"),q=J+"=".repeat((4-J.length%4)%4),Q=Buffer.from(q,"base64").toString("utf8"),$=JSON.parse(Q);return $&&typeof $==="object"?$:void 0}catch{return}}function g0(Z){if(!Z)return;let X=bJ(Z),J=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0;return S(J?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id)??void 0}function at(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#39;";default:return X}})}async function HL(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:SJ(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),J=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!J.ok){let $=await J.text().catch(()=>"");throw Error($.trim()?`Codex API key exchange failed (${J.status}): ${$.trim()}`:`Codex API key exchange failed with status ${J.status}.`)}let q=await J.json(),Q=S(q.access_token);if(!Q)throw Error("Codex API key exchange completed, but no API key token was returned.");return Q}var ct="https://auth.openai.com",YL="https://auth.openai.com/oauth/token",lt="openid profile email offline_access api.connectors.read api.connectors.invoke",nt="codex_cli_rs";var hJ=()=>{};function z7(){return QL({allowPlainTextFallback:!1})}function UL(Z){if(!Z)return;let J=bJ(Z)?.exp;if(typeof J==="number"&&Number.isFinite(J))return J*1000;return}function V4(Z){if(!Z||typeof Z!=="object")return;let X=Z,J=S(X.apiKey),q=S(X.accessToken);if(!q)return;let Q=S(X.refreshToken),$=S(X.idToken),Y=S(X.accountId)??g0($)??g0(q),H=S(X.profileId),K=typeof X.lastRefreshAt==="number"&&Number.isFinite(X.lastRefreshAt)?X.lastRefreshAt:void 0,W=typeof X.lastRefreshFailureAt==="number"&&Number.isFinite(X.lastRefreshFailureAt)?X.lastRefreshFailureAt:void 0;return{apiKey:J,accessToken:q,refreshToken:Q,idToken:$,accountId:Y,profileId:H,lastRefreshAt:K,lastRefreshFailureAt:W}}function Dk(Z){let X=UL(Z.accessToken)??UL(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+Mk}function KL(Z,X=Date.now()){let J=Math.max(Z.lastRefreshFailureAt??0,_7??0);if(!J)return!1;return X-J<Fk}function Tk(Z,X){if(!X.trim())return`Codex token refresh failed with status ${Z}.`;try{let J=JSON.parse(X),q=J.error&&typeof J.error==="object"?J.error:void 0,Q=S(q?.code??J.code),$=S(q?.message??J.error_description)??X.trim();return Q?`Codex token refresh failed (${Q}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function GL(){if(Q2())return;try{let Z=z7().read();return V4(Z?.codex)}catch{return}}async function Ak(){if(Q2())return;try{let Z=await z7().readAsync();return V4(Z?.codex)}catch{return}}function WL(Z,X=Date.now()){return KL(Z,X)}function VL(Z){if(Q2())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=V4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let J=z7(),q=J.read()||{},Q=V4(q[L7]),$={...q,[L7]:{...X,profileId:X.profileId??Q?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=J.update($);if(Y.success)_7=V4($[L7])?.lastRefreshFailureAt??null;return Y}function Ik(Z,X){if(!VL({...Z,lastRefreshFailureAt:X}).success)_7=X}function Ze(){if(Q2())return{success:!0};let Z=z7(),J={...Z.read()||{}};delete J[L7];let q=Z.update(J);if(q.success)_7=null;return q}async function Xe(Z){if(Q2())return{refreshed:!1};if(B4()?.apiKey?.trim())return{refreshed:!1};let X=await Ak();if(!X)return{refreshed:!1};if(!X.refreshToken)return{refreshed:!1,credentials:X};if(!Z?.force&&!Dk(X))return{refreshed:!1,credentials:X};if(!Z?.force&&KL(X))return{refreshed:!1,credentials:X};if(W4)return W4;return W4=(async()=>{let J=Date.now();try{let q=new URLSearchParams({client_id:SJ(),grant_type:"refresh_token",refresh_token:X.refreshToken}),Q=await fetch(YL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:q,signal:AbortSignal.timeout(15000)});if(!Q.ok){let G=await Q.text().catch(()=>"");throw Error(Tk(Q.status,G))}let $=await Q.json(),Y=S($.access_token);if(!Y)throw Error("Codex token refresh succeeded without a new access token.");let H={accessToken:Y,refreshToken:S($.refresh_token)??X.refreshToken,idToken:S($.id_token)??X.idToken,accountId:g0($.id_token)??g0($.access_token)??X.accountId,lastRefreshAt:Date.now()},K=H.idToken??X.idToken;if(K)H.apiKey=await HL(K).catch(()=>{return});let W=VL(H);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:H}}catch(q){throw Ik(X,J),q}finally{W4=null}})(),W4}var L7="codex",Mk=60000,Fk=60000,W4=null,_7=null;var BL=B(()=>{q6();d0();$L();hJ()});import{existsSync as Ok,readFileSync as wk}from"node:fs";import{isIP as jk}from"node:net";import{homedir as Nk}from"node:os";import{join as LL}from"node:path";function Pk(Z){let X=Z.split(".").map((J)=>Number.parseInt(J,10));if(X.length!==4||X.some((J)=>Number.isNaN(J)))return!1;return X[0]===10||X[0]===172&&X[1]>=16&&X[1]<=31||X[0]===192&&X[1]===168}function vk(Z){let X=Z.split(":",1)[0];if(!X)return!1;let J=Number.parseInt(X,16);if(Number.isNaN(J))return!1;return(J&65024)===64512||(J&65472)===65152}function fJ(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function gJ(Z,X){for(let J of X){let q=Z,Q=!0;for(let Y of J){if(!q||typeof q!=="object"||!(Y in q)){Q=!1;break}q=q[Y]}if(!Q)continue;let $=S(q);if($)return $}return}function Ck(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh")return X;return}function zL(Z){let X=Z.trim(),J=X.indexOf("?");if(J===-1){let W=X.toLowerCase(),G=M7[W];if(G)return{raw:X,baseModel:G.model,reasoning:G.reasoningEffort?{effort:G.reasoningEffort}:void 0};return{raw:X,baseModel:X}}let q=X.slice(0,J).trim(),Q=new URLSearchParams(X.slice(J+1)),$=q.toLowerCase(),Y=M7[$],H=Y?.model??q,K=Ck(Q.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof K==="string"?{effort:K}:K}}function TL(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in M7}function mJ(Z){let X=Z.trim().toLowerCase(),J=X.split("?",1)[0]??X;return xk.has(J)}function AL(Z){return mJ(Z)}function yk(Z,X){let J=fJ(X);return gk(J)||!J&&TL(Z)}function Sk(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let J=/^gpt-(\d+)/.exec(X);if(!J)return!1;if(Number(J[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function uJ(Z){if(!Z)return!1;try{let X=new URL(Z).hostname.toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);let J=X.indexOf("%25");if(J!==-1)X=X.slice(0,J);if(Ek.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let q=jk(X);if(q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||Pk(X);if(q===6)return vk(X);return!1}catch{return!1}}function R7(Z){return Z.replace(/\/+$/,"")}function bk(Z){let X=R7(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function hk(Z){try{let X=new URL(Z),J=X.hostname.toLowerCase(),q=X.pathname.toLowerCase();if(X.port==="11434")return!0;return J.includes("ollama")||q.includes("ollama")}catch{return!1}}function Ke(Z){if(!uJ(Z))return[];try{let X=new URL(Z),J=R7(X.toString()),q=new Set([J]),Q=[],$=(K,W)=>{let G=new URL(X.toString());G.hostname=K,G.pathname=W,G.search="",G.hash="";let V=R7(G.toString());if(q.has(V))return;q.add(V),Q.push(V)},Y=bk(X.pathname);if(Y!==R7(X.pathname))$(X.hostname,Y);let H=X.hostname.toLowerCase().replace(/^\[|\]$/g,"");if(H==="localhost"||H==="::1")$("127.0.0.1",X.pathname||"/"),$("127.0.0.1",Y);return Q}catch{return[]}}function Ge(Z){if(!Z.hasTools)return!1;if(!uJ(Z.baseUrl))return!1;return hk(Z.baseUrl)}function gk(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(/\/+$/,"")==="/backend-api/codex"}catch{return!1}}function fk(Z){let X=Z.split("?",1)[0]??Z,J=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!J||J.toLowerCase()==="copilot")return DL;let q=J.indexOf("/");if(q!==-1)return J.slice(q+1);return J}function RL(Z){let X=Z.split("?",1)[0]??Z,J=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!J||J.toLowerCase()==="copilot")return DL;return J}function FL(Z){if(!Z)return"copilot";try{let X=new URL(Z).hostname.toLowerCase();if(X==="api.githubcopilot.com")return"copilot";if(X==="models.github.ai"||X.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function mk(Z){let X=null;try{let{tryGetActiveProvider:h}=(q6(),$4(L4));X=h()}catch{X=null}let q=X?.transport==="github_copilot",Q=X?.model?.trim(),$=fJ(X?.baseUrl),Y=Z?.model?.trim()||Q||Z?.fallbackModel?.trim()||(q?"github:copilot":"gpt-4o"),H=zL(Y),K=fJ(Z?.baseUrl),W=K??$,V=q&&TL(Y)&&W&&FL(W)==="custom"?void 0:W,L=K??V,_=Q??"",D=mJ(_)?zL(_).baseModel:null,M=Boolean(Z?.model)&&Boolean(D)&&H.baseModel===D,F=mJ(Y)||M,R=!q&&F&&!(L&&L!==_L)?kk:L,w=q?FL(L):"custom",A=q&&w==="copilot",I=q&&w==="models",T=q&&w==="custom",b=q?RL(Y):Y,j=yk(Y,R)||A&&Sk(b)?"codex_responses":"chat_completions",x=A?fk(H.baseModel):I||T?RL(H.baseModel):H.baseModel,v=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:j,requestedModel:Y,resolvedModel:x,baseUrl:(R??(A&&j==="codex_responses"?ML:q?ML:_L)).replace(/\/+$/,""),reasoning:v}}function We(){let Z=null;try{let{tryGetActiveProvider:q}=(q6(),$4(L4));Z=q()}catch{Z=null}let X=Z?.transport;if(X!=="openai_compat"&&X!=="codex_responses"){if(!X||X==="anthropic")return"firstParty";return null}let J=mk();if(J.transport!=="chat_completions")return null;if(!uJ(J.baseUrl))return null;return`openai:${J.baseUrl.toLowerCase()}`}function IL(Z=process.env){let X=pJ();if(X)return X;let J=S(Z.CODEX_AUTH_JSON_PATH);if(J)return J;let q=S(Z.CODEX_HOME);if(q)return LL(q,"auth.json");return LL(Nk(),".codex","auth.json")}function pJ(){try{let{tryGetActiveProvider:Z}=(q6(),$4(L4));return S(Z()?.extras?.codexAuthPath)}catch{return}}function dJ(){try{let{tryGetActiveProvider:Z}=(q6(),$4(L4));return S(Z()?.extras?.codexAccountId)}catch{return}}function OL(Z){if(!Ok(Z))return;try{let X=wk(Z,"utf8"),J=JSON.parse(X);return J&&typeof J==="object"?J:void 0}catch{return}}function wL(Z){let{authJson:X,authPath:J,envAccountId:q}=Z;if(!X)return{apiKey:"",authPath:J,source:Z.missingSource??"none"};let Q=gJ(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=gJ(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=q??gJ(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??g0(Q)??g0($);if(!Q)return{apiKey:"",accountId:Y,authPath:J,source:Z.missingSource??"none"};return{apiKey:Q,accountId:Y,authPath:J,source:"auth.json"}}function jL(Z){let{storedCredentials:X,envAccountId:J}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:J??X.accountId??g0(X.idToken)??g0(X.accessToken),source:"secure-storage"}}function F7(Z,X){let J=S(Z.CODEX_API_KEY),Q=dJ()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID);if(J)return{apiKey:J,accountId:Q??g0(J),source:"env"};let $=pJ();if(!Boolean($??S(Z.CODEX_AUTH_JSON_PATH)??S(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:Q,source:"none"};let H=IL(Z),K=OL(H);return wL({authJson:K,authPath:H,envAccountId:Q})}function Ve(Z){let X=Z?.env??process.env,J=F7(X,{explicitAuthPathOnly:!0}),q=Boolean(pJ()??S(X.CODEX_AUTH_JSON_PATH)??S(X.CODEX_HOME)),Q=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(q||J.source==="env"||J.source==="auth.json")return J;if(Z?.storedCredentials?.accessToken)return jL({storedCredentials:Z.storedCredentials,envAccountId:dJ()??S(X.CODEX_ACCOUNT_ID)??S(X.CHATGPT_ACCOUNT_ID)});if(Q)return F7(X);return uk(X)}function uk(Z=process.env){let X=dJ()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID),J=F7(Z,{explicitAuthPathOnly:!0});if(J.source==="env"||J.source==="auth.json"||J.authPath)return J;let q=GL();if(q?.accessToken){let Q=jL({storedCredentials:q,envAccountId:X});if(!(!Q.accountId||WL(q)))return Q;let Y=IL(Z),H=OL(Y),K=wL({authJson:H,authPath:Y,envAccountId:X});if(K.apiKey)return{...K,accountId:K.accountId??Q.accountId};return Q}return F7(Z)}function pk(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return M7[q]?.reasoningEffort}function Be(Z){let X=Z.trim().toLowerCase(),J=X.split("?",1)[0]??X;if(J==="gpt-5.3-codex-spark"||J==="codexspark")return!1;if(pk(J)!==void 0)return!0;return/^gpt-5(?:[.-]|$)/.test(J)}var _L="https://api.openai.com/v1",kk="https://chatgpt.com/backend-api/codex",DL="gpt-4o",M7,xk,Ek,ML="https://api.githubcopilot.com";var NL=B(()=>{BL();hJ();M7={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.5":{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.4":{model:"gpt-5.4",reasoningEffort:"high"},"gpt-5.3-codex":{model:"gpt-5.3-codex",reasoningEffort:"high"},"gpt-5.3-codex-spark":{model:"gpt-5.3-codex-spark"},codexspark:{model:"gpt-5.3-codex-spark"},"gpt-5.2-codex":{model:"gpt-5.2-codex",reasoningEffort:"high"},"gpt-5.1-codex-max":{model:"gpt-5.1-codex-max",reasoningEffort:"high"},"gpt-5.1-codex-mini":{model:"gpt-5.1-codex-mini"},"gpt-5.5-mini":{model:"gpt-5.5-mini",reasoningEffort:"medium"},"gpt-5.4-mini":{model:"gpt-5.4-mini",reasoningEffort:"medium"},"gpt-5.2":{model:"gpt-5.2",reasoningEffort:"medium"}},xk=new Set(["codexplan","codexspark"]),Ek=new Set(["localhost","127.0.0.1","::1"])});var L4={};y7(L4,{tryGetActiveProvider:()=>B4,invalidateActiveProviderCache:()=>nk,getActiveProvider:()=>xL,_peekActiveProviderCacheForTesting:()=>ik,ActiveProviderNotConfiguredError:()=>D7});function dk(){if(kL)return;kL=!0,hB(()=>{Q6=null})}function ck(Z,X){switch(Z.provider){case"anthropic":return"anthropic";case"gemini":return"gemini";case"mistral":return"mistral";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai":default:{if(Z.extras?.githubToken)return"github_copilot";if(AL(X))return"codex_responses";return"openai_compat"}}}function lk(Z){let X=mB(Z.model);return{transport:ck(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras}}function xL(){if(dk(),Q6)return Q6;let Z=B1(W0());if(!Z)throw new D7;return Q6=lk(Z),Q6}function B4(){try{return xL()}catch(Z){if(Z instanceof D7)return null;throw Z}}function nk(){Q6=null}function ik(){return Q6}var D7,Q6=null,kL=!1;var q6=B(()=>{jJ();nB();NJ();NL();D7=class D7 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function ak(Z){return Z.sort((X,J)=>{let q=J.modified.getTime()-X.modified.getTime();if(q!==0)return q;return J.created.getTime()-X.created.getTime()})}var EL=()=>{};import o from"node:path";import PL from"node:os";import cJ from"node:process";function nJ(Z,{suffix:X="nodejs"}={}){if(typeof Z!=="string")throw TypeError(`Expected a string, got ${typeof Z}`);if(X)Z+=`-${X}`;if(cJ.platform==="darwin")return ok(Z);if(cJ.platform==="win32")return sk(Z);return rk(Z)}var P1,lJ,$2,ok=(Z)=>{let X=o.join(P1,"Library");return{data:o.join(X,"Application Support",Z),config:o.join(X,"Preferences",Z),cache:o.join(X,"Caches",Z),log:o.join(X,"Logs",Z),temp:o.join(lJ,Z)}},sk=(Z)=>{let X=$2.APPDATA||o.join(P1,"AppData","Roaming"),J=$2.LOCALAPPDATA||o.join(P1,"AppData","Local");return{data:o.join(J,Z,"Data"),config:o.join(X,Z,"Config"),cache:o.join(J,Z,"Cache"),log:o.join(J,Z,"Log"),temp:o.join(lJ,Z)}},rk=(Z)=>{let X=o.basename(P1);return{data:o.join($2.XDG_DATA_HOME||o.join(P1,".local","share"),Z),config:o.join($2.XDG_CONFIG_HOME||o.join(P1,".config"),Z),cache:o.join($2.XDG_CACHE_HOME||o.join(P1,".cache"),Z),log:o.join($2.XDG_STATE_HOME||o.join(P1,".local","state"),Z),temp:o.join(lJ,X,Z)}};var vL=B(()=>{P1=PL.homedir(),lJ=PL.tmpdir(),{env:$2}=cJ});import{join as T7}from"path";function SL(Z){let X=Z.replace(/[^a-zA-Z0-9]/g,"-");if(X.length<=CL)return X;return`${X.slice(0,CL)}-${Math.abs(yL(Z)).toString(36)}`}function I7(Z){return SL(Z)}var A7,CL=200,ek;var bL=B(()=>{vL();R0();tk();A7=nJ("claude-cli");ek={baseLogs:()=>T7(A7.cache,I7(k().cwd())),errors:()=>T7(A7.cache,I7(k().cwd()),"errors"),messages:()=>T7(A7.cache,I7(k().cwd()),"messages"),mcpLogs:(Z)=>T7(A7.cache,I7(k().cwd()),`mcp-logs-${SL(Z)}`)}});function gL(Z){return Z.replace(hL,"").trim()||Z}function fL(Z){return Z.replace(hL,"").trim()}function xe(Z){return Z.replace(Zx,"").trim()}var hL,Zx;var mL=B(()=>{hL=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;Zx=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function ue(Z,X){let J=Z.firstPrompt?.startsWith(`<${cL}>`),q=Z.firstPrompt?fL(Z.firstPrompt):"",Q=q&&!J,$=Z.agentName||Z.customTitle||Z.summary||(Q?q:void 0)||X||(J?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return gL($).trim()}function pe(Z){return Z.toISOString().replace(/[:.]/g,"-")}function qx(Z){if(O7.length>=Jx)O7.shift();O7.push(Z)}function de(Z){if(f0!==null)return;if(f0=Z,Y2.length>0){let X=[...Y2];Y2.length=0;for(let J of X)switch(J.type){case"error":f0.logError(J.error);break;case"mcpError":f0.logMCPError(J.serverName,J.error);break;case"mcpDebug":f0.logMCPDebug(J.serverName,J.message);break}}}function m(Z){let X=dL(Z);try{let J=B4()?.transport;if(J==="bedrock"||J==="vertex"||J==="foundry"||process.env.DISABLE_ERROR_REPORTING||zB())return;let Q={error:X.stack||X.message,timestamp:new Date().toISOString()};if(qx(Q),f0===null){Y2.push({type:"error",error:X});return}f0.logError(X)}catch{}}function le(){return[...O7]}function ne(Z,X){try{if(f0===null){Y2.push({type:"mcpError",serverName:Z,error:X});return}f0.logMCPError(Z,X)}catch{}}function ie(Z,X){try{if(f0===null){Y2.push({type:"mcpDebug",serverName:Z,message:X});return}f0.logMCPDebug(Z,X)}catch{}}function ae(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:J,...q}=Z;uL(q),pL(null)}var Jx=100,O7,Y2,f0=null,ce;var u0=B(()=>{L1();j6();q6();Xx();EL();bL();mL();y1();VJ();L0();O7=[];Y2=[];ce=u(()=>{return process.argv.includes("--hard-fail")})});import lL from"node:path";function $x(Z){return Z.includes(lL.sep)||Z.includes("/")||lL.isAbsolute(Z)}function Yx(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(_4.test(X))return"Unsafe executable: control characters are not allowed";if(!$x(X)&&!Qx.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function Hx(Z){for(let X of Z)if(_4.test(X))return"Unsafe argument: control characters are not allowed";return null}function Ux(Z){if(!Z)return null;if(_4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function Kx(Z){if(!Z)return{};for(let[X,J]of Object.entries(Z)){if(_4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof J==="string"&&_4.test(J))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function Gx(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function a(Z,X,J={timeout:10*aJ*iJ,preserveOutputOnError:!0,useCwd:!0}){return V3(Z,X,{abortSignal:J.abortSignal,timeout:J.timeout,preserveOutputOnError:J.preserveOutputOnError,cwd:J.useCwd?s():void 0,env:J.env,stdin:J.stdin,input:J.input})}function V3(Z,X,{abortSignal:J,timeout:q=10*aJ*iJ,preserveOutputOnError:Q=!0,cwd:$,env:Y,maxBuffer:H=nL,stdin:K,input:W}={timeout:10*aJ*iJ,preserveOutputOnError:!0,maxBuffer:nL}){let G=Yx(Z);if(G)return Promise.resolve({stdout:"",stderr:"",code:1,error:G});let V=Hx(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=Ux($);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let _=Kx(Y);if(_.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:_.error});return new Promise((z)=>{let D=W!==void 0?"pipe":K??"pipe",M=iL.spawn(Z,X,{cwd:$,env:_.value,shell:!1,signal:J,stdio:[D,"pipe","pipe"]}),F=!1,N="",R="",w=0,A,I=!1,T=(x)=>{if(F)return;F=!0,z(x)},b=(x,v)=>{let h=typeof x==="string"?x:x.toString("utf8");if(w+=Buffer.byteLength(h,"utf8"),w>H){M.kill(),T({stdout:Q?N:"",stderr:Q?R:"",code:1,error:"maxBuffer exceeded"});return}if(v==="stdout")N+=h;else R+=h};M.stdout?.on("data",(x)=>b(x,"stdout")),M.stderr?.on("data",(x)=>b(x,"stderr")),M.once("spawn",()=>{if(D==="pipe"&&M.stdin)if(W!==void 0)M.stdin.end(W);else M.stdin.end()}),M.once("error",(x)=>{m(x),T({stdout:"",stderr:"",code:1,error:x.message})});let j=q>0?setTimeout(()=>{I=!0,M.kill()},q):void 0;M.once("close",(x,v)=>{if(j)clearTimeout(j);A=v??void 0;let h=x??1;if(I){T({stdout:Q?N:"",stderr:Q?R:"",code:h,error:`Command timed out after ${q}ms`});return}if(h!==0){if(Q)T({stdout:N,stderr:R,code:h,error:Gx({signal:A},h)});else T({stdout:"",stderr:"",code:h});return}T({stdout:N,stderr:R,code:0})})})}var iL,iJ=1000,aJ=60,nL=1e6,_4,Qx;var f4=B(()=>{t0();u0();kJ();iL=FH(n7(),1),_4=/[\0\r\n]/,Qx=/^[A-Za-z0-9_.-]+$/});import{readFile as Wx}from"fs/promises";import{join as Vx}from"path";async function z4(Z,X,J,q){try{let Q=await Wx(Vx(Z,"config"),"utf-8");return Bx(Q,X,J,q)}catch{return null}}function Bx(Z,X,J,q){let Q=Z.split(`
186
- `),$=X.toLowerCase(),Y=q.toLowerCase(),H=!1;for(let K of Q){let W=K.trim();if(W.length===0||W[0]==="#"||W[0]===";")continue;if(W[0]==="["){H=Rx(W,$,J);continue}if(!H)continue;let G=Lx(W);if(G&&G.key.toLowerCase()===Y)return G.value}return null}function Lx(Z){let X=0;while(X<Z.length&&Mx(Z[X]))X++;if(X===0)return null;let J=Z.slice(0,X);while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=="=")return null;X++;while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;let q=_x(Z,X);return{key:J,value:q}}function _x(Z,X){let J="",q=!1,Q=X;while(Q<Z.length){let $=Z[Q];if(!q&&($==="#"||$===";"))break;if($==='"'){q=!q,Q++;continue}if($==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(q){switch(Y){case"n":J+=`
187
- `;break;case"t":J+="\t";break;case"b":J+="\b";break;case'"':J+='"';break;case"\\":J+="\\";break;default:J+=Y;break}Q+=2;continue}if(Y==="\\"){J+="\\",Q+=2;continue}}J+=$,Q++}if(!q)J=zx(J);return J}function zx(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function Rx(Z,X,J){let q=1;while(q<Z.length&&Z[q]!=="]"&&Z[q]!==" "&&Z[q]!=="\t"&&Z[q]!=='"')q++;if(Z.slice(1,q).toLowerCase()!==X)return!1;if(J===null)return q<Z.length&&Z[q]==="]";while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;if(q>=Z.length||Z[q]!=='"')return!1;q++;let $="";while(q<Z.length&&Z[q]!=='"'){if(Z[q]==="\\"&&q+1<Z.length){let Y=Z[q+1];if(Y==="\\"||Y==='"'){$+=Y,q+=2;continue}$+=Y,q+=2;continue}$+=Z[q],q++}if(q>=Z.length||Z[q]!=='"')return!1;if(q++,q>=Z.length||Z[q]!=="]")return!1;return $===J}function Mx(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var aL=()=>{};import{unwatchFile as oL,watchFile as Fx}from"fs";import{readdir as Dx,readFile as $6,stat as tL}from"fs/promises";import{join as E0,resolve as w7}from"path";function V00(){H2.clear()}async function m0(Z){let X=w7(Z??s()),J=H2.get(X);if(J!==void 0)return J;let q=K2(X);if(!q)return H2.set(X,null),null;let Q=E0(q,".git");try{if((await tL(Q)).isFile()){let Y=(await $6(Q,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),K=w7(q,H);return H2.set(X,K),K}}return H2.set(X,Q),Q}catch{return H2.set(X,null),null}}function j7(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((X)=>X==="."||X===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function oJ(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function R4(Z){try{let X=(await $6(E0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let J=X.slice(4).trim();if(J.startsWith("refs/heads/")){let Q=J.slice(11);if(!j7(Q))return null;return{type:"branch",name:Q}}if(!j7(J))return null;let q=await U2(Z,J);return q?{type:"detached",sha:q}:{type:"detached",sha:""}}if(!oJ(X))return null;return{type:"detached",sha:X}}catch{return null}}async function U2(Z,X){let J=await sL(Z,X);if(J)return J;let q=await Y6(Z);if(q&&q!==Z)return sL(q,X);return null}async function sL(Z,X){try{let J=(await $6(E0(Z,X),"utf-8")).trim();if(J.startsWith("ref:")){let q=J.slice(4).trim();if(!j7(q))return null;return U2(Z,q)}if(!oJ(J))return null;return J}catch{}try{let J=await $6(E0(Z,"packed-refs"),"utf-8");for(let q of J.split(`
188
- `)){if(q.startsWith("#")||q.startsWith("^"))continue;let Q=q.indexOf(" ");if(Q===-1)continue;if(q.slice(Q+1)===X){let $=q.slice(0,Q);return oJ($)?$:null}}}catch{}return null}async function Y6(Z){try{let X=(await $6(E0(Z,"commondir"),"utf-8")).trim();return w7(Z,X)}catch{return null}}async function Tx(Z,X,J){try{let q=(await $6(E0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(Q.startsWith(J)){let $=Q.slice(J.length);if(!j7($))return null;return $}}}catch{}return null}class eL{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await m0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await Y6(this.gitDir),this.watchPath(E0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(E0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Y4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),Fx(Z,{interval:Ax},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await R4(this.gitDir),X=this.commonDir??this.gitDir,J=Z?.type==="branch"?E0(X,"refs","heads",Z.name):null;if(J===this.branchRefPath)return;if(this.branchRefPath)oL(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((q)=>q!==this.branchRefPath);if(this.branchRefPath=J,!J)return;this.watchPath(J,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await rL(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)oL(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let J=this.cache.get(Z);if(J&&!J.dirty)return J.value;if(J)J.dirty=!1;let q=await X(),Q=this.cache.get(Z);if(Q&&!Q.dirty)Q.value=q;if(!Q)this.cache.set(Z,{value:q,dirty:!1,compute:X});return q}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function Ix(){let Z=await m0();if(!Z)return"HEAD";let X=await R4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function Ox(){let Z=await m0();if(!Z)return"";let X=await R4(Z);if(!X)return"";if(X.type==="branch")return await U2(Z,`refs/heads/${X.name}`)??"";return X.sha}async function wx(){let Z=await m0();if(!Z)return null;let X=await z4(Z,"remote","origin","url");if(X)return X;let J=await Y6(Z);if(J&&J!==Z)return z4(J,"remote","origin","url");return null}async function jx(){let Z=await m0();if(!Z)return"main";let X=await Y6(Z)??Z,J=await Tx(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(J)return J;for(let q of["main","master"])if(await U2(X,`refs/remotes/origin/${q}`))return q;return"main"}function Z_(){return N7.get("branch",Ix)}function X_(){return N7.get("head",Ox)}function J_(){return N7.get("remoteUrl",wx)}function q_(){return N7.get("defaultBranch",jx)}async function B00(Z){let X=await m0(Z);if(!X)return null;let J=await R4(X);if(!J)return null;if(J.type==="branch")return U2(X,`refs/heads/${J.name}`);return J.sha}async function L00(Z){let X;try{let q=(await $6(E0(Z,".git"),"utf-8")).trim();if(!q.startsWith("gitdir:"))return null;X=w7(Z,q.slice(7).trim())}catch{return null}let J=await R4(X);if(!J)return null;if(J.type==="branch")return U2(X,`refs/heads/${J.name}`);return J.sha}async function _00(Z){let X=await m0(Z);if(!X)return null;let J=await z4(X,"remote","origin","url");if(J)return J;let q=await Y6(X);if(q&&q!==X)return z4(q,"remote","origin","url");return null}async function Q_(){let Z=await m0();if(!Z)return!1;let X=await Y6(Z)??Z;try{return await tL(E0(X,"shallow")),!0}catch{return!1}}async function $_(){try{let Z=await m0();if(!Z)return 0;let X=await Y6(Z)??Z;return(await Dx(E0(X,"worktrees"))).length+1}catch{return 1}}var H2,Ax=1000,N7;var Y_=B(()=>{j6();SB();t0();R2();aL();H2=new Map;N7=new eL});import{createHash as Nx}from"crypto";import{readFileSync as sJ,realpathSync as H_,statSync as U_}from"fs";import{open as kx,readFile as xx,realpath as K_,stat as Ex}from"fs/promises";import{basename as Px,dirname as rJ,join as P0,resolve as x7,sep as G_}from"path";function vx(){function Z(X){let J=W_(X);return J===z_?null:J}return Z.cache=W_.cache,Z}function Cx(){function Z(X){let J=K2(X);if(!J)return null;return V_(J)}return Z.cache=V_.cache,Z}function v00(Z){return m0(Z)}async function C00(){let Z=s(),X=K2(Z);if(!X)return!1;try{let[J,q]=await Promise.all([K_(Z),K_(X)]);return J===q}catch{return Z===X}}function hx(Z){let X=Z.trim();if(!X)return null;let J=X.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(J&&J[1]&&J[2])return`${J[1]}/${J[2]}`.toLowerCase();let q=X.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(q&&q[1]&&q[2]){let Q=q[1],$=q[2];if(lx(Q)&&$.startsWith("git/")){let Y=$.slice(4),H=Y.split("/");if(H.length>=3&&H[0].includes("."))return Y.toLowerCase();return`github.com/${Y}`.toLowerCase()}return`${Q}/${$}`.toLowerCase()}return null}async function S00(){let Z=await tJ();if(!Z)return null;let X=hx(Z);if(!X)return null;return Nx("sha256").update(X).digest("hex").substring(0,16)}async function m00(){try{let[Z,X,J,q,Q,$]=await Promise.all([Sx(),bx(),tJ(),gx(),fx(),ux()]);return{commitHash:Z,branchName:X,remoteUrl:J,isHeadOnRemote:q,isClean:Q,worktreeCount:$}}catch(Z){return null}}async function u00(){let{parseGitRemote:Z}=await import("./detectRepository-0.1.9-qqzcce45.mjs"),X=await tJ();if(!X)return E("Local GitHub repo: unknown"),null;let J=Z(X);if(J&&J.host==="github.com"){let q=`${J.owner}/${J.name}`;return E(`Local GitHub repo: ${q}`),q}return E("Local GitHub repo: unknown"),null}async function dx(){let{stdout:Z,code:X}=await a(Z0(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(X===0&&Z.trim())return Z.trim();let{stdout:J,code:q}=await a(Z0(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(q===0){let $=J.match(/HEAD branch: (\S+)/);if($&&$[1])return`origin/${$[1]}`}let Q=["origin/main","origin/staging","origin/master"];for(let $ of Q){let{code:Y}=await a(Z0(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function cx(){return Q_()}async function k7(){let{stdout:Z,code:X}=await a(Z0(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),J=Z.trim();if(X!==0||!J)return[];let q=J.split(`
189
- `).filter(Boolean),Q=[],$=0;for(let Y of q){if(Q.length>=__){E(`Untracked file capture: reached max file count (${__})`);break}if(eJ(Y))continue;try{let K=(await Ex(Y)).size;if(K>B_){E(`Untracked file capture: skipping ${Y} (exceeds ${B_} bytes)`);continue}if($+K>L_){E(`Untracked file capture: reached total size limit (${L_} bytes)`);break}if(K===0){Q.push({path:Y,content:""});continue}let W=Math.min(px,K),G=await kx(Y,"r");try{let V=Buffer.alloc(W),{bytesRead:L}=await G.read(V,0,W,0),_=V.subarray(0,L);if(Zq(_))continue;let z;if(K<=W)z=_.toString("utf-8");else z=await xx(Y,"utf-8");Q.push({path:Y,content:z}),$+=K}finally{await G.close()}}catch(H){E(`Failed to read untracked file ${Y}: ${H}`)}}return Q}async function p00(){try{if(!await yx())return null;if(await cx()){E("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let X=await dx();if(!X){E("No remote found, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let{stdout:J,code:q}=await a(Z0(),["merge-base","HEAD",X],{preserveOutputOnError:!1});if(q!==0||!J.trim()){E("Merge-base failed, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let Q=J.trim(),[{stdout:$},Y,{stdout:H,code:K},{stdout:W},{stdout:G}]=await Promise.all([a(Z0(),["diff",Q]),k7(),a(Z0(),["format-patch",`${Q}..HEAD`,"--stdout"]),a(Z0(),["rev-parse","HEAD"]),a(Z0(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(K===0&&H&&H.trim())V=H;let L=G?.trim();return{remote_base_sha:Q,remote_base:X,patch:$||"",untracked_files:Y,format_patch:V,head_sha:W?.trim()||null,branch_name:L&&L!=="HEAD"?L:null}}catch(Z){return m(Z),null}}function lx(Z){let X=Z.split(":")[0]??"";return X==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(X)}function d00(){let Z=k(),X=s(),J=P0(X,".git");try{let q=Z.statSync(J);if(q.isFile())return!1;if(q.isDirectory()){let Q=P0(J,"HEAD");try{if(Z.statSync(Q).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(P0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(P0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(P0(X,"refs")).isDirectory())return!0}catch{}return!1}var z_,W_,K2,V_,d5,Z0,yx,o$=async(Z)=>{return K2(Z)!==null},Sx=async()=>{return X_()},bx=async()=>{return Z_()},y00=async()=>{return q_()},tJ=async()=>{return J_()},gx=async()=>{let{code:Z}=await a(Z0(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},b00=async()=>{let{stdout:Z,code:X}=await a(Z0(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return X===0&&parseInt(Z.trim(),10)>0},h00=async()=>{let{stdout:Z,code:X}=await a(Z0(),["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{preserveOutputOnError:!1,useCwd:!0});if(X!==0)return{ahead:0,behind:0};let J=Z.trim().split(/\s+/);if(J.length!==2)return{ahead:0,behind:0};let q=parseInt(J[0],10),Q=parseInt(J[1],10);return{ahead:Number.isFinite(Q)?Q:0,behind:Number.isFinite(q)?q:0}},fx=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:J}=await a(Z0(),X,{preserveOutputOnError:!1});return J.trim().length===0},g00=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
190
- `).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},mx=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1}),X=[],J=[];return Z.trim().split(`
191
- `).filter((q)=>q.length>0).forEach((q)=>{let Q=q.substring(0,2),$=q.substring(2).trim();if(Q==="??")J.push($);else if($)X.push($)}),{tracked:X,untracked:J}},ux=async()=>{return $_()},f00=async(Z)=>{try{let X=Z||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:J}=await mx();if(J.length>0){let{code:Q}=await a(Z0(),["add",...J],{preserveOutputOnError:!1});if(Q!==0)return!1}let{code:q}=await a(Z0(),["stash","push","--message",X],{preserveOutputOnError:!1});return q===0}catch(X){return!1}},B_=524288000,L_=5368709120,__=20000,px=65536;var R2=B(()=>{L1();Xq();t0();R1();G2();f4();R0();Y_();u0();P4();T5();z_=Symbol("git-root-not-found"),W_=z1((Z)=>{let X=Date.now();Q0("info","find_git_root_started");let J=x7(Z),q=J.substring(0,J.indexOf(G_)+1)||G_,Q=0;while(J!==q){try{let Y=P0(J,".git");Q++;let H=U_(Y);if(H.isDirectory()||H.isFile())return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!0}),J.normalize("NFC")}catch{}let $=rJ(J);if($===J)break;J=$}try{let $=P0(q,".git");Q++;let Y=U_($);if(Y.isDirectory()||Y.isFile())return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!0}),q.normalize("NFC")}catch{}return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!1}),z_},(Z)=>Z,50),K2=vx();V_=z1((Z)=>{try{let X=sJ(P0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let J=x7(Z,X.slice(7).trim()),q=x7(J,sJ(P0(J,"commondir"),"utf-8").trim());if(x7(rJ(J))!==P0(q,"worktrees"))return Z;if(H_(sJ(P0(J,"gitdir"),"utf-8").trim())!==P0(H_(Z),".git"))return Z;if(Px(q)!==".git")return q.normalize("NFC");return rJ(q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),d5=Cx();Z0=u(()=>{return D5("git")||"git"}),yx=u(async()=>{let Z=Date.now();Q0("info","is_git_check_started");let X=K2(s())!==null;return Q0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});
192
- export{U6 as j6,M4 as k6,F4 as l6,v7 as m6,NQ as n6,kQ as o6,Iq as p6,Oq as q6,V6 as r6,T4 as s6,jq as t6,Nq as u6,i7 as v6,yQ as w6,eJ as x6,Xq as y6,qq as z6,Qq as A6,S7 as B6,zq as C6,Rq as D6,Mq as E6,kq as F6,xq as G6,Eq as H6,Pq as I6,Sq as J6,bq as K6,Q0 as L6,mE as M6,G2 as N6,n7 as O6,ak as P6,EL as Q6,ek as R6,bL as S6,gL as T6,fL as U6,xe as V6,mL as W6,zB as X6,VJ as Y6,ue as Z6,pe as _6,de as $6,m as a7,le as b7,ne as c7,ie as d7,ae as e7,u0 as f7,e4 as g7,m9 as h7,sK as i7,rK as j7,zX as k7,c6 as l7,G7 as m7,a as n7,V3 as o7,f4 as p7,z4 as q7,aL as r7,V00 as s7,m0 as t7,U2 as u7,Y6 as v7,B00 as w7,L00 as x7,_00 as y7,Y_ as z7,fQ as A7,mQ as B7,gP as C7,z1 as D7,P4 as E7,F6 as F7,a7 as G7,JW as H7,D5 as I7,T5 as J7,K2 as K7,d5 as L7,Z0 as M7,yx as N7,v00 as O7,C00 as P7,o$ as Q7,Sx as R7,bx as S7,y00 as T7,tJ as U7,hx as V7,S00 as W7,gx as X7,b00 as Y7,h00 as Z7,fx as _7,g00 as $7,mx as a8,ux as b8,f00 as c8,m00 as d8,u00 as e8,dx as f8,p00 as g8,d00 as h8,R2 as i8,AP as j8,v0 as k8,IP as l8,z6 as m8,nP as n8,uz as o8,iP as p8,pQ as q8,dQ as r8,e7 as s8,Xv as t8,Jv as u8,qv as v8,v4 as w8,aQ as x8,oQ as y8,X$ as z8,J$ as A8,R$ as B8,M$ as C8,j$ as D8,N$ as E8,Q3 as F8,jR as G8,Z1 as H8,B2 as I8,EC as J8,PC as K8,vC as L8,xR as M8,b4 as N8,b$ as O8,yC as P8,H3 as Q8,h$ as R8,U3 as S8,K3 as T8,f$ as U8,Zy as V8,bR as W8,Xy as X8,Jy as Y8,qy as Z8,Qy as _8,m$ as $8,$y as a9,Yy as b9,Hy as c9,Uy as d9,Ky as e9,Gy as f9,gR as g9,Wy as h9,Vy as i9,By as j9,Ly as k9,_y as l9,zy as m9,d$ as n9,Ry as o9,h4 as p9,nR as q9,r$ as r9,C0 as s9,ny as t9,T3 as u9,iy as v9,ay as w9,d4 as x9,ty as y9,ey as z9,ZS as A9,XS as B9,JS as C9,qS as D9,I2 as E9,QS as F9,$S as G9,A3 as H9,HS as I9,US as J9,z9 as K9,F1 as L9,O2 as M9,l4 as N9,F9 as O9,RS as P9,D9 as Q9,qW as R9,QW as S9,V0 as T9,Mw as U9,n6 as V9,wn as W9,MX as X9,kn as Y9,xn as Z9,En as _9,Pn as $9,vn as a_,Cn as b_,yn as c_,Sn as d_,bn as e_,hn as f_,gn as g_,fn as h_,mn as i_,un as j_,pn as k_,dn as l_,cn as m_,WW as n_,l2 as o_,VW as p_,tn as q_,en as r_,Zi as s_,Xi as t_,Ji as u_,qi as v_,Qi as w_,$i as x_,Yi as y_,LW as z_,zW as A_,RW as B_,DW as C_,Li as D_,AW as E_,a1 as F_,Ii as G_,Iw as H_,w5 as I_,wi as J_,jW as K_,k5 as L_,Pi as M_,vi as N_,Ci as O_,xW as P_,ow as Q_,yi as R_,Si as S_,rw as T_,bi as U_,N5 as V_,Xj as W_,Qj as X_,fi as Y_,yW as Z_,x5 as __,SW as $_,bW as a$,Yj as b$,Hj as c$,di as d$,ci as e$,li as f$,hW as g$,wX as h$,gW as i$,fW as j$,ai as k$,mW as l$,a6 as m$,ei as n$,dW as o$,Za as p$,cW as q$,Ja as r$,lW as s$,nW as t$,qa as u$,Qa as v$,$a as w$,Ya as x$,Ha as y$,Bj as z$,Ua as A$,jX as B$,Fa as C$,eW as D$,ZV as E$,k0 as F$,Ca as G$,ya as H$,Sa as I$,i2 as J$,oa as K$,yX as L$,Jo as M$,_V as N$,zo as O$,b5 as P$,h5 as Q$,Ro as R$,Mo as S$,DV as T$,io as U$,o2 as V$,TV as W$,f5 as X$,vV as Y$,n as Z$,ao as _$,oo as $$,so as aaa,m5 as baa,ro as caa,to as daa,vj as eaa,eo as faa,Zs as gaa,Xs as haa,Js as iaa,qs as jaa,Qs as kaa,yV as laa,gV as maa,_s as naa,Sj as oaa,zs as paa,s2 as qaa,uV as raa,Rs as saa,aX as taa,xs as uaa,Es as vaa,_B as waa,X7 as xaa,DB as yaa,EN as zaa,Cs as Aaa,ys as Baa,TB as Caa,vN as Daa,CN as Eaa,B0 as Faa,wB as Gaa,J4 as Haa,gN as Iaa,fN as Jaa,xB as Kaa,EB as Laa,Lr as Maa,AJ as Naa,cN as Oaa,_r as Paa,lN as Qaa,zr as Raa,Rr as Saa,Mr as Taa,Tr as Uaa,hB as Vaa,A0 as Waa,Ar as Xaa,Ir as Yaa,W0 as Zaa,Or as _aa,wr as $aa,jr as aba,wJ as bba,Nr as cba,kr as dba,sN as eba,xr as fba,Er as gba,rN as hba,Pr as iba,vr as jba,Cr as kba,yr as lba,Sr as mba,br as nba,hr as oba,gr as pba,jJ as qba,U7 as rba,mB as sba,NJ as tba,lr as uba,E1 as vba,nr as wba,B1 as xba,ir as yba,ar as zba,or as Aba,sr as Bba,Yk as Cba,Hk as Dba,rr as Eba,tr as Fba,er as Gba,Uk as Hba,nB as Iba,h0 as Jba,H4 as Kba,O0 as Lba,EJ as Mba,Wt as Nba,W7 as Oba,Ft as Pba,rB as Qba,QL as Rba,$L as Sba,ct as Tba,lt as Uba,nt as Vba,S as Wba,SJ as Xba,it as Yba,g0 as Zba,at as _ba,HL as $ba,hJ as aca,Ak as bca,VL as cca,Ze as dca,Xe as eca,BL as fca,_L as gca,kk as hca,uJ as ica,Ke as jca,Ge as kca,gk as lca,FL as mca,mk as nca,We as oca,Ve as pca,uk as qca,pk as rca,Be as sca,NL as tca,D7 as uca,xL as vca,B4 as wca,nk as xca,ik as yca,q6 as zca};