@claudiolabs/claudin 1.1.28 → 1.1.30

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 (918) hide show
  1. package/dist/chunks/AgentTool-1.1.30-3wq8zzaa.mjs +1 -0
  2. package/dist/chunks/App-1.1.30-ywb53g2c.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-1.1.30-wtpe9n8e.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-1.1.30-776xks64.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-1.1.30-bjm91hx0.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-1.1.30-rcy7msd9.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.30-bexsqxcb.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-1.1.30-jfhq3h4z.mjs +1 -0
  9. package/dist/chunks/DiffDialog-1.1.30-kqds97f2.mjs +6 -0
  10. package/dist/chunks/Doctor-1.1.30-48qzfckm.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-1.1.30-tfv4wc5m.mjs +6 -0
  12. package/dist/chunks/ITermBackend-1.1.30-z31ecx5v.mjs +1 -0
  13. package/dist/chunks/InvalidConfigDialog-1.1.30-f17w1kzx.mjs +1 -0
  14. package/dist/chunks/InvalidSettingsDialog-1.1.30-fzajgngq.mjs +1 -0
  15. package/dist/chunks/MigrationDialog-1.1.30-15c4h452.mjs +1 -0
  16. package/dist/chunks/Onboarding-1.1.30-xajg2p3r.mjs +1 -0
  17. package/dist/chunks/ProviderManager-1.1.30-8jrhxd1r.mjs +1 -0
  18. package/dist/chunks/REPL-1.1.30-74pzzw1d.mjs +1 -0
  19. package/dist/chunks/ResumeConversation-1.1.30-8bmshptz.mjs +1 -0
  20. package/dist/chunks/SnapshotUpdateDialog-1.1.30-v5fnwt30.mjs +1 -0
  21. package/dist/chunks/TeleportProgress-1.1.30-v55nsv7g.mjs +1 -0
  22. package/dist/chunks/TeleportRepoMismatchDialog-1.1.30-2hg56v1b.mjs +1 -0
  23. package/dist/chunks/TeleportResumeWrapper-1.1.30-r2hwd3a6.mjs +1 -0
  24. package/dist/chunks/TmuxBackend-1.1.30-y6hny4s2.mjs +9 -0
  25. package/dist/chunks/ToolSearchTool-1.1.30-cq18pvam.mjs +1 -0
  26. package/dist/chunks/TrustDialog-1.1.30-qp3cr0fk.mjs +1 -0
  27. package/dist/chunks/activeProvider-1.1.30-ydaqb760.mjs +1 -0
  28. package/dist/chunks/add-dir-1.1.30-gta8twv0.mjs +1 -0
  29. package/dist/chunks/agentTypes-1.1.30-rxcmv28v.mjs +1 -0
  30. package/dist/chunks/agents-1.1.30-d5hxfnnt.mjs +3 -0
  31. package/dist/chunks/agents-1.1.30-q3f25044.mjs +110 -0
  32. package/dist/chunks/api-1.1.30-30hng0e4.mjs +1 -0
  33. package/dist/chunks/asciicast-1.1.30-mhcedd5b.mjs +1 -0
  34. package/dist/chunks/assistant-1.1.30-1zxsr09t.mjs +1 -0
  35. package/dist/chunks/auth-1.1.30-mmymct98.mjs +1 -0
  36. package/dist/chunks/auth-1.1.30-ntfwzwxz.mjs +1 -0
  37. package/dist/chunks/autoMode-1.1.30-9jd1avyj.mjs +52 -0
  38. package/dist/chunks/autoModeSetup-1.1.30-8cnp296z.mjs +44 -0
  39. package/dist/chunks/autoUpdater-1.1.30-f0wbf5ha.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-1.1.30-b7t4y9th.mjs +1 -0
  41. package/dist/chunks/branch-1.1.30-x77nhthz.mjs +4 -0
  42. package/dist/chunks/bridge-1.1.30-scfmh172.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-1.1.30-8hd92b6p.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-1.1.30-n5c6p8kd.mjs +1 -0
  45. package/dist/chunks/bridgeMain-1.1.30-9cpc29zx.mjs +88 -0
  46. package/dist/chunks/bridgePointer-1.1.30-gsa0eerc.mjs +1 -0
  47. package/dist/chunks/btw-1.1.30-gyh84rd1.mjs +1 -0
  48. package/dist/chunks/buddy-1.1.30-vzfs4xt1.mjs +3 -0
  49. package/dist/chunks/cache-probe-1.1.30-qjppzj5p.mjs +21 -0
  50. package/dist/chunks/cacheStats-1.1.30-w1c0ekr4.mjs +4 -0
  51. package/dist/chunks/caches-1.1.30-6rye5cdg.mjs +1 -0
  52. package/dist/chunks/cd-1.1.30-tn402589.mjs +3 -0
  53. package/dist/chunks/claudeDesktop-1.1.30-sm5ncwqz.mjs +1 -0
  54. package/dist/chunks/claudemd-1.1.30-36eyf63s.mjs +1 -0
  55. package/dist/chunks/clear-1.1.30-p5p9kp96.mjs +1 -0
  56. package/dist/chunks/clearTerminal-1.1.30-nrdembs6.mjs +1 -0
  57. package/dist/chunks/cli-1.1.30-053d5ph7.mjs +2 -0
  58. package/dist/chunks/cli-1.1.30-092dkm0p.mjs +2 -0
  59. package/dist/chunks/cli-1.1.30-0e0e9msg.mjs +17 -0
  60. package/dist/chunks/cli-1.1.30-0fz758j0.mjs +2 -0
  61. package/dist/chunks/cli-1.1.30-0qcyzbs1.mjs +2 -0
  62. package/dist/chunks/cli-1.1.30-0yafp3ky.mjs +2 -0
  63. package/dist/chunks/cli-1.1.30-1j4dyr5r.mjs +2 -0
  64. package/dist/chunks/cli-1.1.30-1k2bwved.mjs +3 -0
  65. package/dist/chunks/cli-1.1.30-1qczaqkt.mjs +2 -0
  66. package/dist/chunks/cli-1.1.30-1wfffyq2.mjs +2 -0
  67. package/dist/chunks/cli-1.1.30-1xmhk219.mjs +2 -0
  68. package/dist/chunks/cli-1.1.30-1ybfyckn.mjs +2 -0
  69. package/dist/chunks/cli-1.1.30-1zsgv3yp.mjs +2 -0
  70. package/dist/chunks/cli-1.1.30-2af3eeg6.mjs +2 -0
  71. package/dist/chunks/cli-1.1.30-2hw4vdpg.mjs +2 -0
  72. package/dist/chunks/cli-1.1.30-2pqs37e0.mjs +3 -0
  73. package/dist/chunks/cli-1.1.30-2y4yj9sd.mjs +2 -0
  74. package/dist/chunks/cli-1.1.30-2yd2af56.mjs +50 -0
  75. package/dist/chunks/cli-1.1.30-2zq3aea6.mjs +2 -0
  76. package/dist/chunks/cli-1.1.30-322advqh.mjs +4 -0
  77. package/dist/chunks/cli-1.1.30-3b1nw95m.mjs +2 -0
  78. package/dist/chunks/cli-1.1.30-3c6j35rs.mjs +2 -0
  79. package/dist/chunks/cli-1.1.30-3x86c2pa.mjs +24 -0
  80. package/dist/chunks/cli-1.1.30-489cr054.mjs +2 -0
  81. package/dist/chunks/cli-1.1.30-4d90v0pd.mjs +6 -0
  82. package/dist/chunks/cli-1.1.30-4kytbyxq.mjs +15 -0
  83. package/dist/chunks/cli-1.1.30-4t03vay7.mjs +2 -0
  84. package/dist/chunks/cli-1.1.30-4wqfr0ya.mjs +2 -0
  85. package/dist/chunks/cli-1.1.30-4zrfbe17.mjs +2 -0
  86. package/dist/chunks/cli-1.1.30-51kze0eh.mjs +2 -0
  87. package/dist/chunks/cli-1.1.30-569esepc.mjs +60 -0
  88. package/dist/chunks/cli-1.1.30-57b410qh.mjs +25 -0
  89. package/dist/chunks/cli-1.1.30-5cc6nada.mjs +2 -0
  90. package/dist/chunks/cli-1.1.30-5f76gnk2.mjs +2 -0
  91. package/dist/chunks/cli-1.1.30-5j2mdj81.mjs +2 -0
  92. package/dist/chunks/cli-1.1.30-5pn20fxz.mjs +2 -0
  93. package/dist/chunks/cli-1.1.30-5r9pakw5.mjs +2 -0
  94. package/dist/chunks/cli-1.1.30-63ndyxgm.mjs +2 -0
  95. package/dist/chunks/cli-1.1.30-6eaj3n76.mjs +9 -0
  96. package/dist/chunks/cli-1.1.30-6phpx599.mjs +2 -0
  97. package/dist/chunks/cli-1.1.30-6pp4z5px.mjs +2 -0
  98. package/dist/chunks/cli-1.1.30-7a064pfm.mjs +2 -0
  99. package/dist/chunks/cli-1.1.30-7bdj31x8.mjs +2 -0
  100. package/dist/chunks/cli-1.1.30-7dtpd1ra.mjs +2 -0
  101. package/dist/chunks/cli-1.1.30-7h45a0x6.mjs +6 -0
  102. package/dist/chunks/cli-1.1.30-7ma427qh.mjs +8 -0
  103. package/dist/chunks/cli-1.1.30-7q8f7mp7.mjs +2 -0
  104. package/dist/chunks/cli-1.1.30-84cemtwn.mjs +4 -0
  105. package/dist/chunks/cli-1.1.30-87zsgch6.mjs +21 -0
  106. package/dist/chunks/cli-1.1.30-8a5gwcde.mjs +2 -0
  107. package/dist/chunks/cli-1.1.30-8e36e2c1.mjs +2 -0
  108. package/dist/chunks/cli-1.1.30-8hcc4gax.mjs +15 -0
  109. package/dist/chunks/cli-1.1.30-8t3c3a4k.mjs +20 -0
  110. package/dist/chunks/cli-1.1.30-8vr9ea9g.mjs +2 -0
  111. package/dist/chunks/cli-1.1.30-8zyep40e.mjs +2 -0
  112. package/dist/chunks/cli-1.1.30-902jyjpx.mjs +2 -0
  113. package/dist/chunks/cli-1.1.30-917y0q4m.mjs +2 -0
  114. package/dist/chunks/cli-1.1.30-92t0b3hs.mjs +2 -0
  115. package/dist/chunks/cli-1.1.30-94vhzqcd.mjs +2 -0
  116. package/dist/chunks/cli-1.1.30-9685r12p.mjs +2 -0
  117. package/dist/chunks/cli-1.1.30-9h8mm4pg.mjs +2 -0
  118. package/dist/chunks/cli-1.1.30-9m8jc7as.mjs +4 -0
  119. package/dist/chunks/cli-1.1.30-9rn8qz9x.mjs +2 -0
  120. package/dist/chunks/cli-1.1.30-9s9qp1m7.mjs +2 -0
  121. package/dist/chunks/cli-1.1.30-a1phf5vm.mjs +2 -0
  122. package/dist/chunks/cli-1.1.30-a2ww16zh.mjs +2 -0
  123. package/dist/chunks/cli-1.1.30-a2xctbvc.mjs +18 -0
  124. package/dist/chunks/cli-1.1.30-amecp2v0.mjs +3 -0
  125. package/dist/chunks/cli-1.1.30-aqvjv0jh.mjs +4 -0
  126. package/dist/chunks/cli-1.1.30-aw93z4yt.mjs +2 -0
  127. package/dist/chunks/cli-1.1.30-b1mqmct7.mjs +4 -0
  128. package/dist/chunks/cli-1.1.30-bfqnz691.mjs +2 -0
  129. package/dist/chunks/cli-1.1.30-bgrp9j3q.mjs +2 -0
  130. package/dist/chunks/cli-1.1.30-bwdw42tf.mjs +24 -0
  131. package/dist/chunks/cli-1.1.30-bzjamz5p.mjs +2 -0
  132. package/dist/chunks/cli-1.1.30-c0b5kmhr.mjs +2 -0
  133. package/dist/chunks/cli-1.1.30-c2e2yeaj.mjs +2 -0
  134. package/dist/chunks/cli-1.1.30-c44kpd39.mjs +2 -0
  135. package/dist/chunks/cli-1.1.30-c70p43p6.mjs +133 -0
  136. package/dist/chunks/cli-1.1.30-c9xtenrd.mjs +2 -0
  137. package/dist/chunks/cli-1.1.30-ca1a9ntm.mjs +2 -0
  138. package/dist/chunks/cli-1.1.30-cb34mrvh.mjs +2 -0
  139. package/dist/chunks/cli-1.1.30-cgcdnarw.mjs +2 -0
  140. package/dist/chunks/cli-1.1.30-cjetc80p.mjs +2 -0
  141. package/dist/chunks/cli-1.1.30-cwc68erm.mjs +2 -0
  142. package/dist/chunks/cli-1.1.30-d3n6dp6r.mjs +2 -0
  143. package/dist/chunks/cli-1.1.30-d8chymja.mjs +2 -0
  144. package/dist/chunks/cli-1.1.30-d9sphwgb.mjs +3 -0
  145. package/dist/chunks/cli-1.1.30-dbbhdfn1.mjs +2 -0
  146. package/dist/chunks/cli-1.1.30-dv38qw87.mjs +3 -0
  147. package/dist/chunks/cli-1.1.30-e0fcx44n.mjs +2 -0
  148. package/dist/chunks/cli-1.1.30-e15hq24m.mjs +2 -0
  149. package/dist/chunks/cli-1.1.30-eg5krttf.mjs +2 -0
  150. package/dist/chunks/cli-1.1.30-ehk76t59.mjs +2 -0
  151. package/dist/chunks/cli-1.1.30-em031y3s.mjs +2 -0
  152. package/dist/chunks/cli-1.1.30-endh0hmx.mjs +2 -0
  153. package/dist/chunks/cli-1.1.30-ensp6hjk.mjs +2 -0
  154. package/dist/chunks/cli-1.1.30-erqva8zn.mjs +2 -0
  155. package/dist/chunks/cli-1.1.30-etnn22zf.mjs +2 -0
  156. package/dist/chunks/cli-1.1.30-f6tarbyn.mjs +2 -0
  157. package/dist/chunks/cli-1.1.30-f8qnd0hw.mjs +20 -0
  158. package/dist/chunks/cli-1.1.30-f9cckkn6.mjs +7 -0
  159. package/dist/chunks/cli-1.1.30-f9tp1b8r.mjs +6 -0
  160. package/dist/chunks/cli-1.1.30-facztg9n.mjs +133 -0
  161. package/dist/chunks/cli-1.1.30-fct5wt67.mjs +2 -0
  162. package/dist/chunks/cli-1.1.30-fm4mj7wy.mjs +2 -0
  163. package/dist/chunks/cli-1.1.30-fpa799y4.mjs +3 -0
  164. package/dist/chunks/cli-1.1.30-fzan6qjf.mjs +2 -0
  165. package/dist/chunks/cli-1.1.30-g17zgmea.mjs +3 -0
  166. package/dist/chunks/cli-1.1.30-g3qd3ec3.mjs +2 -0
  167. package/dist/chunks/cli-1.1.30-g4c9mx6r.mjs +2 -0
  168. package/dist/chunks/cli-1.1.30-g9qsgq1r.mjs +2 -0
  169. package/dist/chunks/cli-1.1.30-gdmbygdz.mjs +2 -0
  170. package/dist/chunks/cli-1.1.30-gev0f31f.mjs +24 -0
  171. package/dist/chunks/cli-1.1.30-gk8x7f6m.mjs +2 -0
  172. package/dist/chunks/cli-1.1.30-gncy6j5b.mjs +2 -0
  173. package/dist/chunks/cli-1.1.30-gv4z21b9.mjs +4 -0
  174. package/dist/chunks/cli-1.1.30-gvp1pabq.mjs +2 -0
  175. package/dist/chunks/cli-1.1.30-h5yj1axw.mjs +6 -0
  176. package/dist/chunks/cli-1.1.30-h9pfkdf2.mjs +2 -0
  177. package/dist/chunks/cli-1.1.30-ha9qd4n4.mjs +2 -0
  178. package/dist/chunks/cli-1.1.30-he73pyqy.mjs +2 -0
  179. package/dist/chunks/cli-1.1.30-hncb22wm.mjs +2 -0
  180. package/dist/chunks/cli-1.1.30-hxy861gq.mjs +2 -0
  181. package/dist/chunks/cli-1.1.30-j29r8pgr.mjs +4 -0
  182. package/dist/chunks/cli-1.1.30-j2wahkcp.mjs +6 -0
  183. package/dist/chunks/cli-1.1.30-j46p2me4.mjs +3 -0
  184. package/dist/chunks/cli-1.1.30-jb34rbbt.mjs +7 -0
  185. package/dist/chunks/cli-1.1.30-jevxd0jk.mjs +2 -0
  186. package/dist/chunks/cli-1.1.30-jgxnrbme.mjs +2 -0
  187. package/dist/chunks/cli-1.1.30-jvqc1jfc.mjs +2 -0
  188. package/dist/chunks/cli-1.1.30-jyvb3jrk.mjs +3 -0
  189. package/dist/chunks/cli-1.1.30-kx2svwf6.mjs +2 -0
  190. package/dist/chunks/cli-1.1.30-kzbhw1mf.mjs +2 -0
  191. package/dist/chunks/cli-1.1.30-m5fx6y02.mjs +2 -0
  192. package/dist/chunks/cli-1.1.30-m5ta5zwh.mjs +2 -0
  193. package/dist/chunks/cli-1.1.30-m62yy9h8.mjs +2 -0
  194. package/dist/chunks/cli-1.1.30-mebteknr.mjs +206 -0
  195. package/dist/chunks/cli-1.1.30-mef66hvr.mjs +10 -0
  196. package/dist/chunks/cli-1.1.30-mgj06132.mjs +2 -0
  197. package/dist/chunks/cli-1.1.30-mpmg84pk.mjs +3 -0
  198. package/dist/chunks/cli-1.1.30-mz5a585j.mjs +9 -0
  199. package/dist/chunks/cli-1.1.30-n306djbd.mjs +2 -0
  200. package/dist/chunks/cli-1.1.30-naaxghkh.mjs +2 -0
  201. package/dist/chunks/cli-1.1.30-nhfsct38.mjs +2 -0
  202. package/dist/chunks/cli-1.1.30-p3m6d618.mjs +2 -0
  203. package/dist/chunks/cli-1.1.30-p63h2njx.mjs +42 -0
  204. package/dist/chunks/cli-1.1.30-p6bsj13y.mjs +2 -0
  205. package/dist/chunks/cli-1.1.30-pc2wp50b.mjs +5504 -0
  206. package/dist/chunks/cli-1.1.30-pc6nevmd.mjs +2 -0
  207. package/dist/chunks/cli-1.1.30-pez1sh7w.mjs +2 -0
  208. package/dist/chunks/cli-1.1.30-pg6jbgcq.mjs +12 -0
  209. package/dist/chunks/cli-1.1.30-pgx35gqd.mjs +2 -0
  210. package/dist/chunks/cli-1.1.30-pw08jvvr.mjs +3 -0
  211. package/dist/chunks/cli-1.1.30-pzp496y6.mjs +2 -0
  212. package/dist/chunks/cli-1.1.30-q00wdmf9.mjs +2 -0
  213. package/dist/chunks/cli-1.1.30-q51sf5gk.mjs +2 -0
  214. package/dist/chunks/cli-1.1.30-q8sd13v9.mjs +2 -0
  215. package/dist/chunks/cli-1.1.30-q8xgmv1x.mjs +39 -0
  216. package/dist/chunks/cli-1.1.30-qcwzchrc.mjs +2 -0
  217. package/dist/chunks/cli-1.1.30-qdnzwgr7.mjs +2 -0
  218. package/dist/chunks/cli-1.1.30-qjdmnkfj.mjs +2 -0
  219. package/dist/chunks/cli-1.1.30-qm4vn98q.mjs +2 -0
  220. package/dist/chunks/cli-1.1.30-qn71nvqn.mjs +2 -0
  221. package/dist/chunks/cli-1.1.30-qykdr3bk.mjs +2 -0
  222. package/dist/chunks/cli-1.1.30-r4ap6bq3.mjs +4 -0
  223. package/dist/chunks/cli-1.1.30-rdbwn1xc.mjs +2 -0
  224. package/dist/chunks/cli-1.1.30-rdgv4qpw.mjs +2 -0
  225. package/dist/chunks/cli-1.1.30-s2b0zbj0.mjs +1 -0
  226. package/dist/chunks/cli-1.1.30-s7f7x42j.mjs +2 -0
  227. package/dist/chunks/cli-1.1.30-sdxgwxfm.mjs +2 -0
  228. package/dist/chunks/cli-1.1.30-sgm7bcet.mjs +58 -0
  229. package/dist/chunks/cli-1.1.30-sr3wnzt7.mjs +17 -0
  230. package/dist/chunks/cli-1.1.30-syea4bx7.mjs +2 -0
  231. package/dist/chunks/cli-1.1.30-t27wxks6.mjs +6 -0
  232. package/dist/chunks/cli-1.1.30-tc8vq728.mjs +15 -0
  233. package/dist/chunks/cli-1.1.30-tcz89gqa.mjs +2 -0
  234. package/dist/chunks/cli-1.1.30-tt85hxby.mjs +25 -0
  235. package/dist/chunks/cli-1.1.30-ty0pw373.mjs +24 -0
  236. package/dist/chunks/cli-1.1.30-vcexen3n.mjs +2 -0
  237. package/dist/chunks/cli-1.1.30-vda14n5e.mjs +2 -0
  238. package/dist/chunks/cli-1.1.30-vf6wrqmh.mjs +2 -0
  239. package/dist/chunks/cli-1.1.30-vhh5kt6v.mjs +2 -0
  240. package/dist/chunks/cli-1.1.30-vrgnzjd2.mjs +2 -0
  241. package/dist/chunks/cli-1.1.30-w9wdamqc.mjs +34 -0
  242. package/dist/chunks/cli-1.1.30-wfs29rd9.mjs +12 -0
  243. package/dist/chunks/cli-1.1.30-wgmdrp34.mjs +2 -0
  244. package/dist/chunks/cli-1.1.30-wjx6yhry.mjs +2 -0
  245. package/dist/chunks/cli-1.1.30-wmpgbhw0.mjs +16 -0
  246. package/dist/chunks/cli-1.1.30-x76str7r.mjs +3 -0
  247. package/dist/chunks/cli-1.1.30-x8wzmxay.mjs +2 -0
  248. package/dist/chunks/cli-1.1.30-x960htw5.mjs +2 -0
  249. package/dist/chunks/cli-1.1.30-xhk0n48x.mjs +2 -0
  250. package/dist/chunks/cli-1.1.30-xqb55m51.mjs +2 -0
  251. package/dist/chunks/cli-1.1.30-xrrzhx6s.mjs +5 -0
  252. package/dist/chunks/cli-1.1.30-xxvagrpc.mjs +2 -0
  253. package/dist/chunks/cli-1.1.30-ycv7a9hg.mjs +2 -0
  254. package/dist/chunks/cli-1.1.30-ygdwz4ed.mjs +4 -0
  255. package/dist/chunks/cli-1.1.30-yt59tc1t.mjs +2 -0
  256. package/dist/chunks/cli-1.1.30-yw5qpt76.mjs +2 -0
  257. package/dist/chunks/cli-1.1.30-yy92v8yq.mjs +63 -0
  258. package/dist/chunks/cli-1.1.30-z1e7k65a.mjs +5 -0
  259. package/dist/chunks/cli-1.1.30-z9xfs5zq.mjs +2 -0
  260. package/dist/chunks/cli-1.1.30-zfz29t3v.mjs +3 -0
  261. package/dist/chunks/cli-1.1.30-zj3nk96z.mjs +2 -0
  262. package/dist/chunks/cli-1.1.30-zm2e2zvb.mjs +2 -0
  263. package/dist/chunks/cli-1.1.30-zpss0nht.mjs +3 -0
  264. package/dist/chunks/cli-1.1.30-zxkfqcvj.mjs +2 -0
  265. package/dist/chunks/cli-1.1.30-zych8w4z.mjs +45 -0
  266. package/dist/chunks/client-1.1.30-6xd07jrd.mjs +1 -0
  267. package/dist/chunks/color-1.1.30-yhxh49s0.mjs +1 -0
  268. package/dist/chunks/compact-1.1.30-wxxb111z.mjs +3 -0
  269. package/dist/chunks/config-1.1.30-4gdp5w7v.mjs +1 -0
  270. package/dist/chunks/config-1.1.30-s02sv9vf.mjs +1 -0
  271. package/dist/chunks/constants-1.1.30-g1xm727k.mjs +1 -0
  272. package/dist/chunks/context-1.1.30-pepgc836.mjs +1 -0
  273. package/dist/chunks/context-noninteractive-1.1.30-ahdmm09h.mjs +1 -0
  274. package/dist/chunks/conversation-1.1.30-93marv3a.mjs +1 -0
  275. package/dist/chunks/copilotHeaders-1.1.30-ypx3j03s.mjs +1 -0
  276. package/dist/chunks/copy-1.1.30-bsfx33za.mjs +9 -0
  277. package/dist/chunks/cost-1.1.30-rhgx2a0h.mjs +1 -0
  278. package/dist/chunks/createSSHSession-1.1.30-p5qve4c1.mjs +1 -0
  279. package/dist/chunks/createSession-1.1.30-rwvvv9na.mjs +1 -0
  280. package/dist/chunks/debug-1.1.30-j1zw0q5b.mjs +1 -0
  281. package/dist/chunks/defaultActionDeps-1.1.30-5gkcnqp5.mjs +1481 -0
  282. package/dist/chunks/desktop-1.1.30-rwbfgek7.mjs +1 -0
  283. package/dist/chunks/detectRepository-1.1.30-2xwvggy6.mjs +1 -0
  284. package/dist/chunks/detection-1.1.30-kkar89w6.mjs +1 -0
  285. package/dist/chunks/diff-1.1.30-t1r0x9g4.mjs +1 -0
  286. package/dist/chunks/doctor-1.1.30-cvqts45f.mjs +1 -0
  287. package/dist/chunks/doctorDiagnostic-1.1.30-smg0046q.mjs +1 -0
  288. package/dist/chunks/earlyInput-1.1.30-cpx4e858.mjs +1 -0
  289. package/dist/chunks/effort-1.1.30-jdxyeqz7.mjs +13 -0
  290. package/dist/chunks/engine-1.1.30-8qhtasfe.mjs +1 -0
  291. package/dist/chunks/envLessBridgeConfig-1.1.30-jnz4sy6x.mjs +1 -0
  292. package/dist/chunks/envUtils-1.1.30-y5dyaydm.mjs +1 -0
  293. package/dist/chunks/environmentSelection-1.1.30-w1z47qad.mjs +1 -0
  294. package/dist/chunks/environments-1.1.30-sjscvfn9.mjs +1 -0
  295. package/dist/chunks/errors-1.1.30-7cmbc98j.mjs +1 -0
  296. package/dist/chunks/exampleCommands-1.1.30-jx9hvt2q.mjs +1 -0
  297. package/dist/chunks/execFileNoThrow-1.1.30-dqrsra7k.mjs +1 -0
  298. package/dist/chunks/exit-1.1.30-m2yzbcth.mjs +1 -0
  299. package/dist/chunks/explorer-1.1.30-5tat30es.mjs +1 -0
  300. package/dist/chunks/export-1.1.30-545a0v8x.mjs +2 -0
  301. package/dist/chunks/extra-usage-1.1.30-5k9b4t6b.mjs +1 -0
  302. package/dist/chunks/extra-usage-noninteractive-1.1.30-h5fqbtg3.mjs +1 -0
  303. package/dist/chunks/fast-1.1.30-91wr1vy4.mjs +1 -0
  304. package/dist/chunks/feedback-1.1.30-36xrb399.mjs +14 -0
  305. package/dist/chunks/firstPartyEventLogger-1.1.30-be1ke8r3.mjs +1 -0
  306. package/dist/chunks/git-1.1.30-sxa8xf85.mjs +1 -0
  307. package/dist/chunks/githubModelsCredentials-1.1.30-m7a8kdwg.mjs +1 -0
  308. package/dist/chunks/goal-1.1.30-71sj2735.mjs +4 -0
  309. package/dist/chunks/growthbook-1.1.30-rx44zvrq.mjs +1 -0
  310. package/dist/chunks/headless-1.1.30-h98t9mfb.mjs +2 -0
  311. package/dist/chunks/heapdump-1.1.30-82m1rvjw.mjs +6 -0
  312. package/dist/chunks/help-1.1.30-vnsg1001.mjs +1 -0
  313. package/dist/chunks/hookChains-1.1.30-tc5ff3xr.mjs +3 -0
  314. package/dist/chunks/hooks-1.1.30-2sctf45c.mjs +79 -0
  315. package/dist/chunks/hooks-1.1.30-707b390t.mjs +1 -0
  316. package/dist/chunks/ide-1.1.30-e8neepsj.mjs +3 -0
  317. package/dist/chunks/image-processor-napi-1.1.30-gcqgfeec.mjs +1 -0
  318. package/dist/chunks/import-1.1.30-g0p9rj63.mjs +261 -0
  319. package/dist/chunks/inboundAttachments-1.1.30-a5p4ftqg.mjs +1 -0
  320. package/dist/chunks/index-1.1.30-00d73fwg.mjs +1 -0
  321. package/dist/chunks/index-1.1.30-0sdck5q1.mjs +9 -0
  322. package/dist/chunks/index-1.1.30-38597fv3.mjs +5 -0
  323. package/dist/chunks/index-1.1.30-3z58evcj.mjs +1 -0
  324. package/dist/chunks/index-1.1.30-5k081eyt.mjs +1 -0
  325. package/dist/chunks/index-1.1.30-8n15b4e3.mjs +2 -0
  326. package/dist/chunks/index-1.1.30-9nx8fm72.mjs +1 -0
  327. package/dist/chunks/index-1.1.30-9zfyk995.mjs +23 -0
  328. package/dist/chunks/index-1.1.30-ba27qy75.mjs +1 -0
  329. package/dist/chunks/index-1.1.30-cddndqaa.mjs +1 -0
  330. package/dist/chunks/index-1.1.30-cnbcr7zp.mjs +1 -0
  331. package/dist/chunks/index-1.1.30-f65yg5kz.mjs +9 -0
  332. package/dist/chunks/index-1.1.30-fwvhky1a.mjs +1 -0
  333. package/dist/chunks/index-1.1.30-hmnpjmd5.mjs +1 -0
  334. package/dist/chunks/index-1.1.30-nemv1gaj.mjs +1 -0
  335. package/dist/chunks/index-1.1.30-pnpy7v0s.mjs +1 -0
  336. package/dist/chunks/index-1.1.30-q4x054c8.mjs +2 -0
  337. package/dist/chunks/index-1.1.30-racdqjba.mjs +1 -0
  338. package/dist/chunks/index-1.1.30-scb66j47.mjs +1 -0
  339. package/dist/chunks/index-1.1.30-tfz6950h.mjs +30 -0
  340. package/dist/chunks/index-1.1.30-tx381qq5.mjs +1 -0
  341. package/dist/chunks/index-1.1.30-w4zhj1qd.mjs +1 -0
  342. package/dist/chunks/index-1.1.30-xxh224ea.mjs +1 -0
  343. package/dist/chunks/init-1.1.30-txzpz2vm.mjs +1 -0
  344. package/dist/chunks/initReplBridge-1.1.30-hkrhwfr3.mjs +1 -0
  345. package/dist/chunks/ink-1.1.30-av1t4b54.mjs +1 -0
  346. package/dist/chunks/insights-1.1.30-nbs0zndp.mjs +870 -0
  347. package/dist/chunks/install-1.1.30-kd3vnaat.mjs +1 -0
  348. package/dist/chunks/install-github-app-1.1.30-ea78ytf6.mjs +149 -0
  349. package/dist/chunks/install-slack-app-1.1.30-v2q1py01.mjs +1 -0
  350. package/dist/chunks/instrumentation-1.1.30-20686d7h.mjs +1 -0
  351. package/dist/chunks/interactiveHelpers-1.1.30-rd0zzjyp.mjs +1 -0
  352. package/dist/chunks/keybindings-1.1.30-157aap7w.mjs +2 -0
  353. package/dist/chunks/knowledge-1.1.30-4mcx1txk.mjs +2 -0
  354. package/dist/chunks/latestVersionCache-1.1.30-65qvjpys.mjs +1 -0
  355. package/dist/chunks/loadAgentsDir-1.1.30-nfrca2zv.mjs +1 -0
  356. package/dist/chunks/loadPluginHooks-1.1.30-wa8regkc.mjs +1 -0
  357. package/dist/chunks/log-1.1.30-nh81h0jz.mjs +1 -0
  358. package/dist/chunks/main-1.1.30-87zf4enf.mjs +1 -0
  359. package/dist/chunks/managedEnv-1.1.30-p38nd6r6.mjs +1 -0
  360. package/dist/chunks/mcp-1.1.30-egynhffm.mjs +17 -0
  361. package/dist/chunks/mcp-1.1.30-gaz9mgmq.mjs +4 -0
  362. package/dist/chunks/mcp-1.1.30-r6q89d8c.mjs +1 -0
  363. package/dist/chunks/mcpb-1.1.30-qxpx83j6.mjs +1 -0
  364. package/dist/chunks/memory-1.1.30-72gbfb3b.mjs +77 -0
  365. package/dist/chunks/model-1.1.30-7nsbqqvm.mjs +2 -0
  366. package/dist/chunks/model-1.1.30-f7d6dbt2.mjs +1 -0
  367. package/dist/chunks/node-1.1.30-nbnhkya6.mjs +15 -0
  368. package/dist/chunks/node-1.1.30-vaaf7x0g.mjs +1 -0
  369. package/dist/chunks/oauth-1.1.30-g201gbyg.mjs +1 -0
  370. package/dist/chunks/openaiShim-1.1.30-rz4xax1e.mjs +14 -0
  371. package/dist/chunks/output-style-1.1.30-ms4eck90.mjs +1 -0
  372. package/dist/chunks/package-D2QZMRW7-1.1.30-08c7mgpt.mjs +1 -0
  373. package/dist/chunks/parseConnectUrl-1.1.30-bd7ade4m.mjs +1 -0
  374. package/dist/chunks/parser-1.1.30-qe7n0vnw.mjs +1 -0
  375. package/dist/chunks/passes-1.1.30-3cz64bpa.mjs +1 -0
  376. package/dist/chunks/permissions-1.1.30-28z7ax7g.mjs +3 -0
  377. package/dist/chunks/permissions-1.1.30-vgtb4qf9.mjs +1 -0
  378. package/dist/chunks/plan-1.1.30-s865r5b5.mjs +1 -0
  379. package/dist/chunks/plist-1.1.30-pxa62mce.mjs +1 -0
  380. package/dist/chunks/plugin-1.1.30-6apj9sf8.mjs +29 -0
  381. package/dist/chunks/pluginStartupCheck-1.1.30-gmcab9kx.mjs +1 -0
  382. package/dist/chunks/plugins-1.1.30-40c7sagf.mjs +9 -0
  383. package/dist/chunks/preActionHook-1.1.30-q2g48qsk.mjs +2 -0
  384. package/dist/chunks/print-1.1.30-drvg0v0c.mjs +57 -0
  385. package/dist/chunks/process-1.1.30-f6y2msx6.mjs +1 -0
  386. package/dist/chunks/processBashCommand-1.1.30-5bzgcejg.mjs +1 -0
  387. package/dist/chunks/processSlashCommand-1.1.30-2bwd1kpt.mjs +9 -0
  388. package/dist/chunks/prompt-1.1.30-9rbbx5vr.mjs +1 -0
  389. package/dist/chunks/prompt-1.1.30-phmv317m.mjs +1 -0
  390. package/dist/chunks/prompts-1.1.30-1myv5ewh.mjs +1 -0
  391. package/dist/chunks/protocolHandler-1.1.30-d6jkd0dk.mjs +13 -0
  392. package/dist/chunks/provider-1.1.30-cwkzb2t8.mjs +2 -0
  393. package/dist/chunks/providerProfiles-1.1.30-qe0y7b6e.mjs +1 -0
  394. package/dist/chunks/providerValidation-1.1.30-rzg2nkx3.mjs +6 -0
  395. package/dist/chunks/rate-limit-options-1.1.30-4q04y9f7.mjs +1 -0
  396. package/dist/chunks/registerSubcommands-1.1.30-k3ar1dyg.mjs +26 -0
  397. package/dist/chunks/registry-1.1.30-epdyxcsa.mjs +1 -0
  398. package/dist/chunks/release-notes-1.1.30-k11yp5hh.mjs +5 -0
  399. package/dist/chunks/reload-plugins-1.1.30-n7qhqqr3.mjs +2 -0
  400. package/dist/chunks/remote-env-1.1.30-f8e03jpx.mjs +1 -0
  401. package/dist/chunks/remoteBridgeCore-1.1.30-fqankvvx.mjs +1 -0
  402. package/dist/chunks/remoteSession-1.1.30-fc5x1bz4.mjs +1 -0
  403. package/dist/chunks/rename-1.1.30-vw8eyfha.mjs +1 -0
  404. package/dist/chunks/replBridgeHandle-1.1.30-bagtg7fm.mjs +1 -0
  405. package/dist/chunks/replLauncher-1.1.30-318vaq80.mjs +1 -0
  406. package/dist/chunks/resume-1.1.30-jrj1wpvj.mjs +2 -0
  407. package/dist/chunks/rewind-1.1.30-z97mdn25.mjs +1 -0
  408. package/dist/chunks/rootOptions-1.1.30-ybrgmmyy.mjs +1 -0
  409. package/dist/chunks/runWorkflowHeadless-1.1.30-w3gn8w75.mjs +10 -0
  410. package/dist/chunks/sandbox-adapter-1.1.30-4rd9w5by.mjs +1 -0
  411. package/dist/chunks/sandbox-toggle-1.1.30-zmtfq25w.mjs +1 -0
  412. package/dist/chunks/session-1.1.30-sbykpbav.mjs +2 -0
  413. package/dist/chunks/sessionDiscovery-1.1.30-dd680nx7.mjs +1 -0
  414. package/dist/chunks/sessionFileAccessHooks-1.1.30-4rhdr018.mjs +1 -0
  415. package/dist/chunks/sessionStorage-1.1.30-cwb5a83p.mjs +1 -0
  416. package/dist/chunks/settings-1.1.30-xxee6nzb.mjs +1 -0
  417. package/dist/chunks/setup-1.1.30-p2wwqw6v.mjs +12 -0
  418. package/dist/chunks/sinks-1.1.30-phkc3yep.mjs +1 -0
  419. package/dist/chunks/skills-1.1.30-vsg5twx1.mjs +1 -0
  420. package/dist/chunks/startupProfiler-1.1.30-wa0xbx1z.mjs +1 -0
  421. package/dist/chunks/startupUpdateCheck-1.1.30-9cgnvwtt.mjs +1 -0
  422. package/dist/chunks/state-1.1.30-ge0kb9gr.mjs +1 -0
  423. package/dist/chunks/stats-1.1.30-n5w7ehyg.mjs +1 -0
  424. package/dist/chunks/status-1.1.30-snsvg4xb.mjs +1 -0
  425. package/dist/chunks/stickers-1.1.30-7ffpw08c.mjs +1 -0
  426. package/dist/chunks/subprocessEnv-1.1.30-5efpmhgz.mjs +1 -0
  427. package/dist/chunks/tasks-1.1.30-ykgkx7d8.mjs +1 -0
  428. package/dist/chunks/teamHelpers-1.1.30-cjjzmnj6.mjs +1 -0
  429. package/dist/chunks/teammateModeSnapshot-1.1.30-e2mh88ze.mjs +1 -0
  430. package/dist/chunks/teleport-1.1.30-9y1akw6m.mjs +1 -0
  431. package/dist/chunks/terminalSetup-1.1.30-mwbzfrfc.mjs +1 -0
  432. package/dist/chunks/theme-1.1.30-9dqykgv2.mjs +1 -0
  433. package/dist/chunks/thinkback-1.1.30-3pbzqt97.mjs +1 -0
  434. package/dist/chunks/thinkback-play-1.1.30-83akae4q.mjs +1 -0
  435. package/dist/chunks/toolPool-1.1.30-3kvrwtxa.mjs +1 -0
  436. package/dist/chunks/toolSearch-1.1.30-s60zcj4t.mjs +1 -0
  437. package/dist/chunks/tools-1.1.30-by0ddhf4.mjs +1 -0
  438. package/dist/chunks/trustedDevice-1.1.30-ecq2hfrc.mjs +1 -0
  439. package/dist/chunks/turndown.cjs-1.1.30-m5hyejns.mjs +69 -0
  440. package/dist/chunks/types-1.1.30-mrv5q877.mjs +1 -0
  441. package/dist/chunks/ultrareviewCommand-1.1.30-5etzjedp.mjs +4 -0
  442. package/dist/chunks/update-1.1.30-ax60cy72.mjs +72 -0
  443. package/dist/chunks/upgrade-1.1.30-hrny7f12.mjs +1 -0
  444. package/dist/chunks/upload-1.1.30-s0z8kw2s.mjs +7 -0
  445. package/dist/chunks/upstreamproxy-1.1.30-tkvbafsh.mjs +14 -0
  446. package/dist/chunks/url-handler-napi-1.1.30-enhczdhm.mjs +1 -0
  447. package/dist/chunks/usage-1.1.30-ew9dakf2.mjs +1 -0
  448. package/dist/chunks/util-1.1.30-knp77fm5.mjs +1 -0
  449. package/dist/chunks/utils-1.1.30-74ykpfac.mjs +1 -0
  450. package/dist/chunks/vim-1.1.30-y01vnb23.mjs +1 -0
  451. package/dist/chunks/watchLoop-1.1.30-sjecqqx4.mjs +13 -0
  452. package/dist/chunks/watcher-1.1.30-qnfq5sma.mjs +1 -0
  453. package/dist/chunks/wiki-1.1.30-qddcp6x2.mjs +132 -0
  454. package/dist/chunks/workflows-1.1.30-j5wcb76g.mjs +1 -0
  455. package/dist/chunks/worktree-1.1.30-m6gvqkc9.mjs +1 -0
  456. package/dist/chunks/worktreeModeEnabled-1.1.30-nma5ggmd.mjs +1 -0
  457. package/dist/chunks/wrapper-1.1.30-c8vm3try.mjs +7 -0
  458. package/dist/cli.mjs +2 -2
  459. package/package.json +9 -9
  460. package/dist/chunks/AgentTool-1.1.28-hdgcephe.mjs +0 -1
  461. package/dist/chunks/App-1.1.28-rdhr58j6.mjs +0 -1
  462. package/dist/chunks/ApproveApiKey-1.1.28-dn460p70.mjs +0 -1
  463. package/dist/chunks/AssistantSessionChooser-1.1.28-k16de89c.mjs +0 -1
  464. package/dist/chunks/AutoModeOptInDialog-1.1.28-19td2te8.mjs +0 -1
  465. package/dist/chunks/BypassPermissionsModeDialog-1.1.28-011pgh7b.mjs +0 -1
  466. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.28-ych5693j.mjs +0 -1
  467. package/dist/chunks/ConsoleOAuthFlow-1.1.28-7p5bx0b5.mjs +0 -1
  468. package/dist/chunks/DiffDialog-1.1.28-nkct57y5.mjs +0 -6
  469. package/dist/chunks/Doctor-1.1.28-xerfvzx5.mjs +0 -1
  470. package/dist/chunks/ExplorerDialog-1.1.28-ne9ftnxx.mjs +0 -6
  471. package/dist/chunks/ITermBackend-1.1.28-07enf929.mjs +0 -1
  472. package/dist/chunks/InvalidConfigDialog-1.1.28-mcsd53vd.mjs +0 -1
  473. package/dist/chunks/InvalidSettingsDialog-1.1.28-rmrgfzbv.mjs +0 -1
  474. package/dist/chunks/MigrationDialog-1.1.28-w5mh2w2b.mjs +0 -1
  475. package/dist/chunks/Onboarding-1.1.28-7q9nc8c9.mjs +0 -1
  476. package/dist/chunks/ProviderManager-1.1.28-08ytr6ma.mjs +0 -1
  477. package/dist/chunks/REPL-1.1.28-pxy1ag0k.mjs +0 -1
  478. package/dist/chunks/ResumeConversation-1.1.28-b2pk1nan.mjs +0 -1
  479. package/dist/chunks/SnapshotUpdateDialog-1.1.28-xa772x92.mjs +0 -1
  480. package/dist/chunks/TeleportProgress-1.1.28-6x6ca6kq.mjs +0 -1
  481. package/dist/chunks/TeleportRepoMismatchDialog-1.1.28-vy7p3j3e.mjs +0 -1
  482. package/dist/chunks/TeleportResumeWrapper-1.1.28-egnv67by.mjs +0 -1
  483. package/dist/chunks/TmuxBackend-1.1.28-y1ss2e0h.mjs +0 -9
  484. package/dist/chunks/ToolSearchTool-1.1.28-7w099741.mjs +0 -1
  485. package/dist/chunks/TrustDialog-1.1.28-49aey2f6.mjs +0 -1
  486. package/dist/chunks/activeProvider-1.1.28-gw9e23bc.mjs +0 -1
  487. package/dist/chunks/add-dir-1.1.28-5j989gf2.mjs +0 -1
  488. package/dist/chunks/agentTypes-1.1.28-hxk0wpj5.mjs +0 -1
  489. package/dist/chunks/agents-1.1.28-3yth9sa4.mjs +0 -110
  490. package/dist/chunks/agents-1.1.28-4qdh001q.mjs +0 -3
  491. package/dist/chunks/api-1.1.28-znpy0eyy.mjs +0 -1
  492. package/dist/chunks/asciicast-1.1.28-r6dsend4.mjs +0 -1
  493. package/dist/chunks/assistant-1.1.28-16hn1f6b.mjs +0 -1
  494. package/dist/chunks/auth-1.1.28-bw7dane8.mjs +0 -1
  495. package/dist/chunks/auth-1.1.28-ht6j3ag3.mjs +0 -1
  496. package/dist/chunks/autoMode-1.1.28-nyaf1s0s.mjs +0 -52
  497. package/dist/chunks/autoModeSetup-1.1.28-sjjeha2m.mjs +0 -44
  498. package/dist/chunks/autoUpdater-1.1.28-070wmr6y.mjs +0 -1
  499. package/dist/chunks/backgroundHousekeeping-1.1.28-y5mjznxx.mjs +0 -1
  500. package/dist/chunks/branch-1.1.28-5d97ysjr.mjs +0 -4
  501. package/dist/chunks/bridge-1.1.28-62qv0wgq.mjs +0 -2
  502. package/dist/chunks/bridgeConfig-1.1.28-m986jcxg.mjs +0 -1
  503. package/dist/chunks/bridgeEnabled-1.1.28-0fs5tkxx.mjs +0 -1
  504. package/dist/chunks/bridgeMain-1.1.28-pyr5gvmx.mjs +0 -88
  505. package/dist/chunks/bridgePointer-1.1.28-wpzz2yca.mjs +0 -1
  506. package/dist/chunks/btw-1.1.28-p1tk901s.mjs +0 -1
  507. package/dist/chunks/buddy-1.1.28-thrnzpdp.mjs +0 -3
  508. package/dist/chunks/cache-probe-1.1.28-bb4xsnev.mjs +0 -21
  509. package/dist/chunks/cacheStats-1.1.28-9p9fmxas.mjs +0 -4
  510. package/dist/chunks/caches-1.1.28-t6dq2xtp.mjs +0 -1
  511. package/dist/chunks/cd-1.1.28-84z1kqam.mjs +0 -3
  512. package/dist/chunks/claudeDesktop-1.1.28-3x0y2w87.mjs +0 -1
  513. package/dist/chunks/claudemd-1.1.28-skmb6ar5.mjs +0 -1
  514. package/dist/chunks/clear-1.1.28-78f1rnc5.mjs +0 -1
  515. package/dist/chunks/clearTerminal-1.1.28-sx5qqtxb.mjs +0 -1
  516. package/dist/chunks/cli-1.1.28-01g60h7m.mjs +0 -2
  517. package/dist/chunks/cli-1.1.28-040xb4f8.mjs +0 -2
  518. package/dist/chunks/cli-1.1.28-0c0kb6x2.mjs +0 -24
  519. package/dist/chunks/cli-1.1.28-0njtm2nf.mjs +0 -60
  520. package/dist/chunks/cli-1.1.28-0vgve5rw.mjs +0 -24
  521. package/dist/chunks/cli-1.1.28-12g8qyfk.mjs +0 -58
  522. package/dist/chunks/cli-1.1.28-130w2y17.mjs +0 -50
  523. package/dist/chunks/cli-1.1.28-13j6r7pz.mjs +0 -2
  524. package/dist/chunks/cli-1.1.28-14abe08r.mjs +0 -4
  525. package/dist/chunks/cli-1.1.28-1jd8x2af.mjs +0 -2
  526. package/dist/chunks/cli-1.1.28-1mscaejt.mjs +0 -2
  527. package/dist/chunks/cli-1.1.28-1q409efb.mjs +0 -2
  528. package/dist/chunks/cli-1.1.28-1rrn1mhr.mjs +0 -2
  529. package/dist/chunks/cli-1.1.28-1vrff9a3.mjs +0 -5
  530. package/dist/chunks/cli-1.1.28-2arzkhzs.mjs +0 -2
  531. package/dist/chunks/cli-1.1.28-2dafhgjv.mjs +0 -34
  532. package/dist/chunks/cli-1.1.28-2esp2ssp.mjs +0 -6
  533. package/dist/chunks/cli-1.1.28-2q7dztmb.mjs +0 -2
  534. package/dist/chunks/cli-1.1.28-2wem9fnx.mjs +0 -2
  535. package/dist/chunks/cli-1.1.28-2ykcw73j.mjs +0 -2
  536. package/dist/chunks/cli-1.1.28-2zhmwh7t.mjs +0 -2
  537. package/dist/chunks/cli-1.1.28-30yw5q4z.mjs +0 -4
  538. package/dist/chunks/cli-1.1.28-347ygvzg.mjs +0 -6
  539. package/dist/chunks/cli-1.1.28-36891pwy.mjs +0 -2
  540. package/dist/chunks/cli-1.1.28-36y6830c.mjs +0 -2
  541. package/dist/chunks/cli-1.1.28-37rkgevh.mjs +0 -2
  542. package/dist/chunks/cli-1.1.28-3bj091x6.mjs +0 -2
  543. package/dist/chunks/cli-1.1.28-3fssr567.mjs +0 -2
  544. package/dist/chunks/cli-1.1.28-3p6j7k4a.mjs +0 -2
  545. package/dist/chunks/cli-1.1.28-4kda7s33.mjs +0 -2
  546. package/dist/chunks/cli-1.1.28-4kxqqtpz.mjs +0 -2
  547. package/dist/chunks/cli-1.1.28-4mpm44jj.mjs +0 -9
  548. package/dist/chunks/cli-1.1.28-4qh42y9g.mjs +0 -2
  549. package/dist/chunks/cli-1.1.28-4sx3zr2c.mjs +0 -3
  550. package/dist/chunks/cli-1.1.28-58rs1ja0.mjs +0 -2
  551. package/dist/chunks/cli-1.1.28-5edzsdcr.mjs +0 -6
  552. package/dist/chunks/cli-1.1.28-5y1xeh89.mjs +0 -206
  553. package/dist/chunks/cli-1.1.28-638dshxx.mjs +0 -42
  554. package/dist/chunks/cli-1.1.28-6bc84c0n.mjs +0 -2
  555. package/dist/chunks/cli-1.1.28-6x9c71q9.mjs +0 -2
  556. package/dist/chunks/cli-1.1.28-6y7vtevf.mjs +0 -17
  557. package/dist/chunks/cli-1.1.28-75thpvfa.mjs +0 -2
  558. package/dist/chunks/cli-1.1.28-7amn29ks.mjs +0 -2
  559. package/dist/chunks/cli-1.1.28-7e3nqd5c.mjs +0 -2
  560. package/dist/chunks/cli-1.1.28-7fz4fqgd.mjs +0 -2
  561. package/dist/chunks/cli-1.1.28-7g65bppm.mjs +0 -2
  562. package/dist/chunks/cli-1.1.28-7nye6zs7.mjs +0 -4
  563. package/dist/chunks/cli-1.1.28-7pmtq82j.mjs +0 -2
  564. package/dist/chunks/cli-1.1.28-7vvtkeeh.mjs +0 -25
  565. package/dist/chunks/cli-1.1.28-7x94aewp.mjs +0 -2
  566. package/dist/chunks/cli-1.1.28-7zpfvkxq.mjs +0 -2
  567. package/dist/chunks/cli-1.1.28-81p0zmxc.mjs +0 -2
  568. package/dist/chunks/cli-1.1.28-83k0knzj.mjs +0 -2
  569. package/dist/chunks/cli-1.1.28-8ahmbnjh.mjs +0 -2
  570. package/dist/chunks/cli-1.1.28-8avwqt1z.mjs +0 -4
  571. package/dist/chunks/cli-1.1.28-8jrfznkw.mjs +0 -2
  572. package/dist/chunks/cli-1.1.28-8v2vx373.mjs +0 -2
  573. package/dist/chunks/cli-1.1.28-943993zt.mjs +0 -2
  574. package/dist/chunks/cli-1.1.28-94sk1z8g.mjs +0 -5
  575. package/dist/chunks/cli-1.1.28-95fs05hq.mjs +0 -2
  576. package/dist/chunks/cli-1.1.28-9e74kqtd.mjs +0 -2
  577. package/dist/chunks/cli-1.1.28-9s4pee5a.mjs +0 -2
  578. package/dist/chunks/cli-1.1.28-a00k75hj.mjs +0 -2
  579. package/dist/chunks/cli-1.1.28-a79xcdg3.mjs +0 -2
  580. package/dist/chunks/cli-1.1.28-ad15rvp0.mjs +0 -2
  581. package/dist/chunks/cli-1.1.28-ak2bzv1v.mjs +0 -16
  582. package/dist/chunks/cli-1.1.28-atrbc4s7.mjs +0 -2
  583. package/dist/chunks/cli-1.1.28-avxe0zxq.mjs +0 -15
  584. package/dist/chunks/cli-1.1.28-b2jq83aj.mjs +0 -15
  585. package/dist/chunks/cli-1.1.28-be8cxh1e.mjs +0 -2
  586. package/dist/chunks/cli-1.1.28-bfs5hmfp.mjs +0 -3
  587. package/dist/chunks/cli-1.1.28-bqtpnyqr.mjs +0 -2
  588. package/dist/chunks/cli-1.1.28-brh6rw23.mjs +0 -2
  589. package/dist/chunks/cli-1.1.28-bsqgt8m4.mjs +0 -2
  590. package/dist/chunks/cli-1.1.28-bwbz3v3j.mjs +0 -2
  591. package/dist/chunks/cli-1.1.28-bwgr7j8z.mjs +0 -2
  592. package/dist/chunks/cli-1.1.28-by5acg3a.mjs +0 -2
  593. package/dist/chunks/cli-1.1.28-c9nh8cpr.mjs +0 -2
  594. package/dist/chunks/cli-1.1.28-cb5wemmj.mjs +0 -7
  595. package/dist/chunks/cli-1.1.28-cfq2wwx5.mjs +0 -2
  596. package/dist/chunks/cli-1.1.28-cyrrpdkd.mjs +0 -2
  597. package/dist/chunks/cli-1.1.28-d5h3kve6.mjs +0 -24
  598. package/dist/chunks/cli-1.1.28-davs3ve8.mjs +0 -58
  599. package/dist/chunks/cli-1.1.28-denmqz0s.mjs +0 -2
  600. package/dist/chunks/cli-1.1.28-dqsxqszf.mjs +0 -2
  601. package/dist/chunks/cli-1.1.28-dy3tnnyd.mjs +0 -3
  602. package/dist/chunks/cli-1.1.28-e2mfhtpx.mjs +0 -2
  603. package/dist/chunks/cli-1.1.28-egskcwa5.mjs +0 -2
  604. package/dist/chunks/cli-1.1.28-ek683x01.mjs +0 -2
  605. package/dist/chunks/cli-1.1.28-epzkhgww.mjs +0 -2
  606. package/dist/chunks/cli-1.1.28-erqn7gwg.mjs +0 -6
  607. package/dist/chunks/cli-1.1.28-es8var4t.mjs +0 -2
  608. package/dist/chunks/cli-1.1.28-ev0gfjgf.mjs +0 -24
  609. package/dist/chunks/cli-1.1.28-evvcbjb6.mjs +0 -2
  610. package/dist/chunks/cli-1.1.28-f0vrbk1t.mjs +0 -2
  611. package/dist/chunks/cli-1.1.28-f1n8p9v2.mjs +0 -12
  612. package/dist/chunks/cli-1.1.28-f3rdt4zg.mjs +0 -2
  613. package/dist/chunks/cli-1.1.28-f8av9yzr.mjs +0 -39
  614. package/dist/chunks/cli-1.1.28-fetsedc8.mjs +0 -2
  615. package/dist/chunks/cli-1.1.28-ffy07rnm.mjs +0 -2
  616. package/dist/chunks/cli-1.1.28-fjbefwwe.mjs +0 -2
  617. package/dist/chunks/cli-1.1.28-fnd6z5bq.mjs +0 -2
  618. package/dist/chunks/cli-1.1.28-fv1twt9b.mjs +0 -8
  619. package/dist/chunks/cli-1.1.28-h00s5n5y.mjs +0 -2
  620. package/dist/chunks/cli-1.1.28-h7p3dmnv.mjs +0 -2
  621. package/dist/chunks/cli-1.1.28-hb02sa63.mjs +0 -2
  622. package/dist/chunks/cli-1.1.28-hkfays5k.mjs +0 -2
  623. package/dist/chunks/cli-1.1.28-hx5j3q23.mjs +0 -17
  624. package/dist/chunks/cli-1.1.28-hxbkncxe.mjs +0 -2
  625. package/dist/chunks/cli-1.1.28-hyd7kkyr.mjs +0 -2
  626. package/dist/chunks/cli-1.1.28-j5m0kc75.mjs +0 -3
  627. package/dist/chunks/cli-1.1.28-j6nysca9.mjs +0 -2
  628. package/dist/chunks/cli-1.1.28-jqnzq23v.mjs +0 -3
  629. package/dist/chunks/cli-1.1.28-jr3jtfkf.mjs +0 -2
  630. package/dist/chunks/cli-1.1.28-jwg70mjs.mjs +0 -2
  631. package/dist/chunks/cli-1.1.28-k0ewezmj.mjs +0 -20
  632. package/dist/chunks/cli-1.1.28-k10f3f7z.mjs +0 -3
  633. package/dist/chunks/cli-1.1.28-k7pnt9ba.mjs +0 -2
  634. package/dist/chunks/cli-1.1.28-kaddwxsy.mjs +0 -2
  635. package/dist/chunks/cli-1.1.28-kc8f0nz7.mjs +0 -3
  636. package/dist/chunks/cli-1.1.28-khcgtk4a.mjs +0 -2
  637. package/dist/chunks/cli-1.1.28-knfg26kb.mjs +0 -2
  638. package/dist/chunks/cli-1.1.28-m6k4d2wx.mjs +0 -2
  639. package/dist/chunks/cli-1.1.28-mdexghj2.mjs +0 -2
  640. package/dist/chunks/cli-1.1.28-mk8zwqb2.mjs +0 -4
  641. package/dist/chunks/cli-1.1.28-mkm05wf9.mjs +0 -2
  642. package/dist/chunks/cli-1.1.28-mpjz8znf.mjs +0 -3
  643. package/dist/chunks/cli-1.1.28-mqmy0gy0.mjs +0 -2
  644. package/dist/chunks/cli-1.1.28-mvkxhjmj.mjs +0 -2
  645. package/dist/chunks/cli-1.1.28-mx413hqd.mjs +0 -3
  646. package/dist/chunks/cli-1.1.28-n2jx5w3n.mjs +0 -2
  647. package/dist/chunks/cli-1.1.28-n7v87yyn.mjs +0 -2
  648. package/dist/chunks/cli-1.1.28-n8d1x31e.mjs +0 -2
  649. package/dist/chunks/cli-1.1.28-neqd5cwa.mjs +0 -2
  650. package/dist/chunks/cli-1.1.28-nq2qxnzx.mjs +0 -10
  651. package/dist/chunks/cli-1.1.28-nqjbqqb6.mjs +0 -4
  652. package/dist/chunks/cli-1.1.28-nyvjfkx6.mjs +0 -2
  653. package/dist/chunks/cli-1.1.28-p11zcjmv.mjs +0 -2
  654. package/dist/chunks/cli-1.1.28-pabfwpqr.mjs +0 -2
  655. package/dist/chunks/cli-1.1.28-pdxwmetp.mjs +0 -25
  656. package/dist/chunks/cli-1.1.28-pfnc9p9n.mjs +0 -2
  657. package/dist/chunks/cli-1.1.28-prd0t983.mjs +0 -9
  658. package/dist/chunks/cli-1.1.28-pykx8k1j.mjs +0 -4
  659. package/dist/chunks/cli-1.1.28-q14qmewe.mjs +0 -2
  660. package/dist/chunks/cli-1.1.28-q43r6snq.mjs +0 -2
  661. package/dist/chunks/cli-1.1.28-q6dv65zx.mjs +0 -2
  662. package/dist/chunks/cli-1.1.28-qb921m5a.mjs +0 -3
  663. package/dist/chunks/cli-1.1.28-qf1qq8t0.mjs +0 -3
  664. package/dist/chunks/cli-1.1.28-qhqkr80z.mjs +0 -45
  665. package/dist/chunks/cli-1.1.28-qj312jgw.mjs +0 -2
  666. package/dist/chunks/cli-1.1.28-qjn28vhw.mjs +0 -2
  667. package/dist/chunks/cli-1.1.28-qrx5ata3.mjs +0 -2
  668. package/dist/chunks/cli-1.1.28-qvpamm5s.mjs +0 -4
  669. package/dist/chunks/cli-1.1.28-qvr8rkg2.mjs +0 -2
  670. package/dist/chunks/cli-1.1.28-qzg6n6hj.mjs +0 -2
  671. package/dist/chunks/cli-1.1.28-r81y1681.mjs +0 -3
  672. package/dist/chunks/cli-1.1.28-rbjeq16x.mjs +0 -2
  673. package/dist/chunks/cli-1.1.28-rbne7wtq.mjs +0 -4
  674. package/dist/chunks/cli-1.1.28-rez81jab.mjs +0 -6
  675. package/dist/chunks/cli-1.1.28-rq49kn4q.mjs +0 -2
  676. package/dist/chunks/cli-1.1.28-rt0aect8.mjs +0 -2
  677. package/dist/chunks/cli-1.1.28-rwfwz209.mjs +0 -2
  678. package/dist/chunks/cli-1.1.28-s1pbcd86.mjs +0 -3
  679. package/dist/chunks/cli-1.1.28-s2pcpdyc.mjs +0 -2
  680. package/dist/chunks/cli-1.1.28-s6w8jb6z.mjs +0 -2
  681. package/dist/chunks/cli-1.1.28-smb1frk6.mjs +0 -2
  682. package/dist/chunks/cli-1.1.28-ss8nzmnb.mjs +0 -12
  683. package/dist/chunks/cli-1.1.28-sx3mmc5d.mjs +0 -2
  684. package/dist/chunks/cli-1.1.28-sz8sgxj4.mjs +0 -2
  685. package/dist/chunks/cli-1.1.28-t5yawarz.mjs +0 -2
  686. package/dist/chunks/cli-1.1.28-tt0c354s.mjs +0 -2
  687. package/dist/chunks/cli-1.1.28-v1p12e3g.mjs +0 -2
  688. package/dist/chunks/cli-1.1.28-v5r7bmzh.mjs +0 -2
  689. package/dist/chunks/cli-1.1.28-v5ypq0r2.mjs +0 -2
  690. package/dist/chunks/cli-1.1.28-v6ewa1y0.mjs +0 -2
  691. package/dist/chunks/cli-1.1.28-vctvnrwx.mjs +0 -133
  692. package/dist/chunks/cli-1.1.28-vf3j29kt.mjs +0 -2
  693. package/dist/chunks/cli-1.1.28-vgfss8e4.mjs +0 -2
  694. package/dist/chunks/cli-1.1.28-vje1ac31.mjs +0 -7
  695. package/dist/chunks/cli-1.1.28-vphadsag.mjs +0 -2
  696. package/dist/chunks/cli-1.1.28-vyzp74xh.mjs +0 -3
  697. package/dist/chunks/cli-1.1.28-w0kxa99b.mjs +0 -2
  698. package/dist/chunks/cli-1.1.28-w6cd3j36.mjs +0 -20
  699. package/dist/chunks/cli-1.1.28-wew8jymx.mjs +0 -2
  700. package/dist/chunks/cli-1.1.28-wmyy1pdj.mjs +0 -2
  701. package/dist/chunks/cli-1.1.28-wvj52k91.mjs +0 -2
  702. package/dist/chunks/cli-1.1.28-wze93r29.mjs +0 -2
  703. package/dist/chunks/cli-1.1.28-x04zkwy5.mjs +0 -18
  704. package/dist/chunks/cli-1.1.28-x0ypcq4e.mjs +0 -2
  705. package/dist/chunks/cli-1.1.28-x13sctb2.mjs +0 -2
  706. package/dist/chunks/cli-1.1.28-xv2tg10n.mjs +0 -2
  707. package/dist/chunks/cli-1.1.28-y173v5ak.mjs +0 -133
  708. package/dist/chunks/cli-1.1.28-y4k1f7he.mjs +0 -2
  709. package/dist/chunks/cli-1.1.28-y5w3ev7m.mjs +0 -2
  710. package/dist/chunks/cli-1.1.28-yaa1gft3.mjs +0 -15
  711. package/dist/chunks/cli-1.1.28-ypzyse5q.mjs +0 -2
  712. package/dist/chunks/cli-1.1.28-yv5gzenz.mjs +0 -2
  713. package/dist/chunks/cli-1.1.28-yyk292aq.mjs +0 -6
  714. package/dist/chunks/cli-1.1.28-z4kzjv3v.mjs +0 -21
  715. package/dist/chunks/cli-1.1.28-z5mbbt38.mjs +0 -2
  716. package/dist/chunks/cli-1.1.28-zarbrcn7.mjs +0 -2
  717. package/dist/chunks/cli-1.1.28-ze1j03ww.mjs +0 -1
  718. package/dist/chunks/cli-1.1.28-zhftjycn.mjs +0 -5553
  719. package/dist/chunks/cli-1.1.28-zqpvgqxf.mjs +0 -2
  720. package/dist/chunks/cli-1.1.28-zv9zfwz9.mjs +0 -2
  721. package/dist/chunks/client-1.1.28-59t63af8.mjs +0 -1
  722. package/dist/chunks/color-1.1.28-gmbrq89g.mjs +0 -1
  723. package/dist/chunks/compact-1.1.28-14hmkmd6.mjs +0 -3
  724. package/dist/chunks/config-1.1.28-b69ey9g1.mjs +0 -1
  725. package/dist/chunks/config-1.1.28-cryax439.mjs +0 -1
  726. package/dist/chunks/constants-1.1.28-63cv4s6z.mjs +0 -1
  727. package/dist/chunks/context-1.1.28-09kfp2sa.mjs +0 -1
  728. package/dist/chunks/context-noninteractive-1.1.28-h9279pbh.mjs +0 -1
  729. package/dist/chunks/conversation-1.1.28-qnj7ywxq.mjs +0 -1
  730. package/dist/chunks/copilotHeaders-1.1.28-yjrmx9z1.mjs +0 -1
  731. package/dist/chunks/copy-1.1.28-az1n9y3n.mjs +0 -9
  732. package/dist/chunks/cost-1.1.28-507xt42s.mjs +0 -1
  733. package/dist/chunks/createSSHSession-1.1.28-m9ecjhc1.mjs +0 -1
  734. package/dist/chunks/createSession-1.1.28-gbrmw9ad.mjs +0 -1
  735. package/dist/chunks/debug-1.1.28-k9m06yz6.mjs +0 -1
  736. package/dist/chunks/defaultActionDeps-1.1.28-4sxh2jyw.mjs +0 -1534
  737. package/dist/chunks/desktop-1.1.28-ycc1hv5c.mjs +0 -1
  738. package/dist/chunks/detectRepository-1.1.28-mxrqqjv6.mjs +0 -1
  739. package/dist/chunks/detection-1.1.28-06p2mev8.mjs +0 -1
  740. package/dist/chunks/diff-1.1.28-d9a2n60t.mjs +0 -1
  741. package/dist/chunks/doctor-1.1.28-qef12k2p.mjs +0 -1
  742. package/dist/chunks/doctorDiagnostic-1.1.28-v5rq4x27.mjs +0 -1
  743. package/dist/chunks/earlyInput-1.1.28-xr89w719.mjs +0 -1
  744. package/dist/chunks/effort-1.1.28-yjbwr68r.mjs +0 -13
  745. package/dist/chunks/engine-1.1.28-yv6qdcgp.mjs +0 -1
  746. package/dist/chunks/envLessBridgeConfig-1.1.28-tpjzc2ar.mjs +0 -1
  747. package/dist/chunks/envUtils-1.1.28-n17cxj8h.mjs +0 -1
  748. package/dist/chunks/environmentSelection-1.1.28-c7vj172q.mjs +0 -1
  749. package/dist/chunks/environments-1.1.28-08b7gpg6.mjs +0 -1
  750. package/dist/chunks/errors-1.1.28-eysc80qa.mjs +0 -1
  751. package/dist/chunks/exampleCommands-1.1.28-gk1ma509.mjs +0 -1
  752. package/dist/chunks/execFileNoThrow-1.1.28-4nc53n56.mjs +0 -1
  753. package/dist/chunks/exit-1.1.28-7rjnfzc2.mjs +0 -1
  754. package/dist/chunks/explorer-1.1.28-hf7jvkfg.mjs +0 -1
  755. package/dist/chunks/export-1.1.28-3xgdy7gr.mjs +0 -2
  756. package/dist/chunks/extra-usage-1.1.28-6wkgsscs.mjs +0 -1
  757. package/dist/chunks/extra-usage-noninteractive-1.1.28-03hnqa8n.mjs +0 -1
  758. package/dist/chunks/fast-1.1.28-gf0rb9by.mjs +0 -1
  759. package/dist/chunks/feedback-1.1.28-dvdyq5v7.mjs +0 -14
  760. package/dist/chunks/firstPartyEventLogger-1.1.28-rd6eskzg.mjs +0 -1
  761. package/dist/chunks/git-1.1.28-ktf61jaz.mjs +0 -1
  762. package/dist/chunks/githubModelsCredentials-1.1.28-re8t0b2z.mjs +0 -1
  763. package/dist/chunks/goal-1.1.28-s7n55rqn.mjs +0 -4
  764. package/dist/chunks/growthbook-1.1.28-jcs0qzz8.mjs +0 -1
  765. package/dist/chunks/headless-1.1.28-yzfk04g2.mjs +0 -2
  766. package/dist/chunks/heapdump-1.1.28-hgfac8pe.mjs +0 -6
  767. package/dist/chunks/help-1.1.28-yhrv28x1.mjs +0 -1
  768. package/dist/chunks/hookChains-1.1.28-9y5pz734.mjs +0 -3
  769. package/dist/chunks/hooks-1.1.28-pwy1h39c.mjs +0 -79
  770. package/dist/chunks/hooks-1.1.28-xhtrbwa5.mjs +0 -1
  771. package/dist/chunks/ide-1.1.28-27vb56tk.mjs +0 -3
  772. package/dist/chunks/image-processor-napi-1.1.28-b092deny.mjs +0 -1
  773. package/dist/chunks/import-1.1.28-bqs6ebec.mjs +0 -261
  774. package/dist/chunks/inboundAttachments-1.1.28-0jb4nc2j.mjs +0 -1
  775. package/dist/chunks/index-1.1.28-0p3tfhd7.mjs +0 -23
  776. package/dist/chunks/index-1.1.28-30ges9rx.mjs +0 -1
  777. package/dist/chunks/index-1.1.28-3kg2kmpd.mjs +0 -1
  778. package/dist/chunks/index-1.1.28-76ztpb54.mjs +0 -1
  779. package/dist/chunks/index-1.1.28-a6fzpa8n.mjs +0 -1
  780. package/dist/chunks/index-1.1.28-ac1sbem8.mjs +0 -9
  781. package/dist/chunks/index-1.1.28-axnrgqkq.mjs +0 -1
  782. package/dist/chunks/index-1.1.28-b5b1qact.mjs +0 -1
  783. package/dist/chunks/index-1.1.28-bqm5cnw1.mjs +0 -1
  784. package/dist/chunks/index-1.1.28-bt937784.mjs +0 -1
  785. package/dist/chunks/index-1.1.28-bxtzy977.mjs +0 -2
  786. package/dist/chunks/index-1.1.28-dgnx1m4x.mjs +0 -9
  787. package/dist/chunks/index-1.1.28-dtfxav1q.mjs +0 -1
  788. package/dist/chunks/index-1.1.28-gk3v69b8.mjs +0 -1
  789. package/dist/chunks/index-1.1.28-m2nnkj3d.mjs +0 -1
  790. package/dist/chunks/index-1.1.28-qk8rhq5n.mjs +0 -1
  791. package/dist/chunks/index-1.1.28-vgc6r0g0.mjs +0 -1
  792. package/dist/chunks/index-1.1.28-w2a4k4md.mjs +0 -2
  793. package/dist/chunks/index-1.1.28-wajajmmp.mjs +0 -1
  794. package/dist/chunks/index-1.1.28-xaw4tf13.mjs +0 -30
  795. package/dist/chunks/index-1.1.28-y7jd8m9f.mjs +0 -1
  796. package/dist/chunks/index-1.1.28-ymg3kz4x.mjs +0 -5
  797. package/dist/chunks/index-1.1.28-z85wbmey.mjs +0 -1
  798. package/dist/chunks/init-1.1.28-vt168swt.mjs +0 -1
  799. package/dist/chunks/initReplBridge-1.1.28-vtkc85kf.mjs +0 -1
  800. package/dist/chunks/ink-1.1.28-8bcvzs97.mjs +0 -1
  801. package/dist/chunks/insights-1.1.28-hcccjwbm.mjs +0 -870
  802. package/dist/chunks/install-1.1.28-azeaj14w.mjs +0 -1
  803. package/dist/chunks/install-github-app-1.1.28-jr58yj7c.mjs +0 -149
  804. package/dist/chunks/install-slack-app-1.1.28-ca73e004.mjs +0 -1
  805. package/dist/chunks/instrumentation-1.1.28-v5fj6zfn.mjs +0 -1
  806. package/dist/chunks/interactiveHelpers-1.1.28-k8pjx51r.mjs +0 -1
  807. package/dist/chunks/keybindings-1.1.28-szefym9t.mjs +0 -2
  808. package/dist/chunks/knowledge-1.1.28-twc2bf6q.mjs +0 -2
  809. package/dist/chunks/latestVersionCache-1.1.28-swqk1ppm.mjs +0 -1
  810. package/dist/chunks/loadAgentsDir-1.1.28-gvzkk593.mjs +0 -1
  811. package/dist/chunks/loadPluginHooks-1.1.28-j5fvzh5b.mjs +0 -1
  812. package/dist/chunks/log-1.1.28-744tvnnz.mjs +0 -1
  813. package/dist/chunks/main-1.1.28-ngd4qj24.mjs +0 -1
  814. package/dist/chunks/managedEnv-1.1.28-v3t5y08t.mjs +0 -1
  815. package/dist/chunks/mcp-1.1.28-bjtwbjwv.mjs +0 -17
  816. package/dist/chunks/mcp-1.1.28-k0p4t3rs.mjs +0 -1
  817. package/dist/chunks/mcp-1.1.28-pxxge6kd.mjs +0 -4
  818. package/dist/chunks/mcpb-1.1.28-rjvsf8d4.mjs +0 -1
  819. package/dist/chunks/memory-1.1.28-437zyh3m.mjs +0 -77
  820. package/dist/chunks/model-1.1.28-1weg50dg.mjs +0 -2
  821. package/dist/chunks/model-1.1.28-qbnnaa17.mjs +0 -1
  822. package/dist/chunks/node-1.1.28-f9q7m0bb.mjs +0 -15
  823. package/dist/chunks/node-1.1.28-q18jbvyv.mjs +0 -1
  824. package/dist/chunks/oauth-1.1.28-nv1bmgrh.mjs +0 -1
  825. package/dist/chunks/openaiShim-1.1.28-qt0bgn0p.mjs +0 -14
  826. package/dist/chunks/output-style-1.1.28-xpmnvzvz.mjs +0 -1
  827. package/dist/chunks/package-OS7RONXY-1.1.28-s8fma63p.mjs +0 -1
  828. package/dist/chunks/parseConnectUrl-1.1.28-9e7g8r3q.mjs +0 -1
  829. package/dist/chunks/parser-1.1.28-hahczgmc.mjs +0 -1
  830. package/dist/chunks/passes-1.1.28-73vxd2mh.mjs +0 -1
  831. package/dist/chunks/permissions-1.1.28-4dzfyh6m.mjs +0 -1
  832. package/dist/chunks/permissions-1.1.28-mh27xg9k.mjs +0 -3
  833. package/dist/chunks/plan-1.1.28-awnhzrk0.mjs +0 -1
  834. package/dist/chunks/plist-1.1.28-yf5fjx19.mjs +0 -1
  835. package/dist/chunks/plugin-1.1.28-m9j8cnkz.mjs +0 -29
  836. package/dist/chunks/pluginStartupCheck-1.1.28-w4yvsmat.mjs +0 -1
  837. package/dist/chunks/plugins-1.1.28-rgr19gwa.mjs +0 -9
  838. package/dist/chunks/preActionHook-1.1.28-bq157gz5.mjs +0 -2
  839. package/dist/chunks/print-1.1.28-g8smjzce.mjs +0 -57
  840. package/dist/chunks/process-1.1.28-tk5w2b0a.mjs +0 -1
  841. package/dist/chunks/processBashCommand-1.1.28-0a601ws2.mjs +0 -1
  842. package/dist/chunks/processSlashCommand-1.1.28-2mq2y7nd.mjs +0 -9
  843. package/dist/chunks/prompt-1.1.28-tj8v37yx.mjs +0 -1
  844. package/dist/chunks/prompt-1.1.28-x4mxe7n2.mjs +0 -1
  845. package/dist/chunks/prompts-1.1.28-z2rx5cb6.mjs +0 -1
  846. package/dist/chunks/protocolHandler-1.1.28-cvce24s6.mjs +0 -13
  847. package/dist/chunks/provider-1.1.28-wd0k9dj9.mjs +0 -2
  848. package/dist/chunks/providerProfiles-1.1.28-ansdm0bp.mjs +0 -1
  849. package/dist/chunks/providerValidation-1.1.28-xkpar3nj.mjs +0 -6
  850. package/dist/chunks/rate-limit-options-1.1.28-kv8762wq.mjs +0 -1
  851. package/dist/chunks/registerSubcommands-1.1.28-464hjqs0.mjs +0 -26
  852. package/dist/chunks/registry-1.1.28-a9wz892f.mjs +0 -1
  853. package/dist/chunks/release-notes-1.1.28-3dsn738r.mjs +0 -5
  854. package/dist/chunks/reload-plugins-1.1.28-8kfgxbx6.mjs +0 -2
  855. package/dist/chunks/remote-env-1.1.28-x46beyd7.mjs +0 -1
  856. package/dist/chunks/remoteBridgeCore-1.1.28-1pr9890h.mjs +0 -1
  857. package/dist/chunks/remoteSession-1.1.28-0dbsb9gr.mjs +0 -1
  858. package/dist/chunks/rename-1.1.28-m7z3qe6s.mjs +0 -1
  859. package/dist/chunks/replBridgeHandle-1.1.28-h8cn3e2b.mjs +0 -1
  860. package/dist/chunks/replLauncher-1.1.28-dc94xnm0.mjs +0 -1
  861. package/dist/chunks/resume-1.1.28-mr6necqk.mjs +0 -2
  862. package/dist/chunks/rewind-1.1.28-dk5z09nd.mjs +0 -1
  863. package/dist/chunks/rootOptions-1.1.28-g6c2bc4a.mjs +0 -1
  864. package/dist/chunks/runWorkflowHeadless-1.1.28-2r5z099n.mjs +0 -10
  865. package/dist/chunks/sandbox-adapter-1.1.28-9gkyj8zg.mjs +0 -1
  866. package/dist/chunks/sandbox-toggle-1.1.28-mvyww40e.mjs +0 -1
  867. package/dist/chunks/session-1.1.28-8xwfxnzq.mjs +0 -2
  868. package/dist/chunks/sessionDiscovery-1.1.28-6twnc7gm.mjs +0 -1
  869. package/dist/chunks/sessionFileAccessHooks-1.1.28-w6yt6st1.mjs +0 -1
  870. package/dist/chunks/sessionStorage-1.1.28-rfvff5qy.mjs +0 -1
  871. package/dist/chunks/settings-1.1.28-b3wrgfej.mjs +0 -1
  872. package/dist/chunks/setup-1.1.28-6vt58sg8.mjs +0 -12
  873. package/dist/chunks/sinks-1.1.28-rdvsx829.mjs +0 -1
  874. package/dist/chunks/skills-1.1.28-b53h2c2v.mjs +0 -1
  875. package/dist/chunks/startupProfiler-1.1.28-mk4vmdef.mjs +0 -1
  876. package/dist/chunks/startupUpdateCheck-1.1.28-0p8x3xh5.mjs +0 -1
  877. package/dist/chunks/state-1.1.28-fd27gqw0.mjs +0 -1
  878. package/dist/chunks/stats-1.1.28-fmezsyc4.mjs +0 -1
  879. package/dist/chunks/status-1.1.28-67a4bkc3.mjs +0 -1
  880. package/dist/chunks/stickers-1.1.28-0g68m8nd.mjs +0 -1
  881. package/dist/chunks/subprocessEnv-1.1.28-548a2kyv.mjs +0 -1
  882. package/dist/chunks/tasks-1.1.28-h3xfz4f4.mjs +0 -1
  883. package/dist/chunks/teamHelpers-1.1.28-4twfmqhf.mjs +0 -1
  884. package/dist/chunks/teammateModeSnapshot-1.1.28-7p6f8wg0.mjs +0 -1
  885. package/dist/chunks/teleport-1.1.28-zdrc7v25.mjs +0 -1
  886. package/dist/chunks/terminalSetup-1.1.28-fbkk7v65.mjs +0 -1
  887. package/dist/chunks/theme-1.1.28-tj36fh0f.mjs +0 -1
  888. package/dist/chunks/thinkback-1.1.28-x1bq9k3h.mjs +0 -1
  889. package/dist/chunks/thinkback-play-1.1.28-3jdfk2q7.mjs +0 -1
  890. package/dist/chunks/toolPool-1.1.28-fpt8xrnv.mjs +0 -1
  891. package/dist/chunks/toolSearch-1.1.28-mvqt18a8.mjs +0 -1
  892. package/dist/chunks/tools-1.1.28-a9t3fc6d.mjs +0 -1
  893. package/dist/chunks/trustedDevice-1.1.28-9e0gqehg.mjs +0 -1
  894. package/dist/chunks/turndown.cjs-1.1.28-dhs0afg7.mjs +0 -69
  895. package/dist/chunks/types-1.1.28-51fcbp8c.mjs +0 -1
  896. package/dist/chunks/ultrareviewCommand-1.1.28-d4ca5c58.mjs +0 -4
  897. package/dist/chunks/update-1.1.28-t9v2gpbh.mjs +0 -72
  898. package/dist/chunks/upgrade-1.1.28-12174ed0.mjs +0 -1
  899. package/dist/chunks/upload-1.1.28-whe18m8m.mjs +0 -7
  900. package/dist/chunks/upstreamproxy-1.1.28-bnjrek99.mjs +0 -14
  901. package/dist/chunks/url-handler-napi-1.1.28-0gh9dbnj.mjs +0 -1
  902. package/dist/chunks/usage-1.1.28-6m1bv4x5.mjs +0 -1
  903. package/dist/chunks/util-1.1.28-cvpx898d.mjs +0 -1
  904. package/dist/chunks/utils-1.1.28-ztac8cf7.mjs +0 -1
  905. package/dist/chunks/vim-1.1.28-rrv9qbr2.mjs +0 -1
  906. package/dist/chunks/watchLoop-1.1.28-rtznty0c.mjs +0 -13
  907. package/dist/chunks/watcher-1.1.28-7v4bd9pm.mjs +0 -1
  908. package/dist/chunks/wiki-1.1.28-m0y2n8rc.mjs +0 -132
  909. package/dist/chunks/workflows-1.1.28-k9wt163q.mjs +0 -1
  910. package/dist/chunks/worktree-1.1.28-5bjehwgc.mjs +0 -1
  911. package/dist/chunks/worktreeModeEnabled-1.1.28-d1yy7627.mjs +0 -1
  912. package/dist/chunks/wrapper-1.1.28-qgyry9mh.mjs +0 -7
  913. /package/dist/chunks/{cli-1.1.28-qzdtd4w8.mjs → cli-1.1.30-2cmsx74f.mjs} +0 -0
  914. /package/dist/chunks/{cli-1.1.28-f658tc1w.mjs → cli-1.1.30-dy1jvt4f.mjs} +0 -0
  915. /package/dist/chunks/{cli-1.1.28-m37hk495.mjs → cli-1.1.30-fa5djn9v.mjs} +0 -0
  916. /package/dist/chunks/{cli-1.1.28-7d7hz6b4.mjs → cli-1.1.30-s27erhy7.mjs} +0 -0
  917. /package/dist/chunks/{cli-1.1.28-43p679k7.mjs → cli-1.1.30-vxh27fdj.mjs} +0 -0
  918. /package/dist/chunks/{cli-1.1.28-m7x3ax7z.mjs → cli-1.1.30-y1pn2vb5.mjs} +0 -0
@@ -0,0 +1,206 @@
1
+ import{Aja as Y6,Eja as XB}from"./cli-1.1.30-322advqh.mjs";import{Mja as fq,Nja as Z6,Oja as Ak}from"./cli-1.1.30-0fz758j0.mjs";import{Yja as s1,ika as Oq}from"./cli-1.1.30-d3n6dp6r.mjs";import{Aka as G,Bka as s0,Cka as I,Dka as t1,jka as Oz,mka as EE,ska as Wq,xka as OO,yka as mV}from"./cli-1.1.30-yy92v8yq.mjs";import{Gka as t,Ika as e0,Ska as bz,jla as CE}from"./cli-1.1.30-1ybfyckn.mjs";import{kla as iW,sla as hL,tla as aW}from"./cli-1.1.30-c9xtenrd.mjs";import{ula as o0,xla as WW}from"./cli-1.1.30-pgx35gqd.mjs";import{$la as A7,Ala as M6,Ama as G1,Cla as NQ,Dla as Rq,Ela as Yw,Fla as QU,Gla as PO,Hla as WQ,Ila as __,Jla as MU,Kla as cO,Lla as E7,Mla as FU,Nla as OU,Ola as rO,Pla as wU,Qla as tO,Rla as LU,Sla as bO,Tla as FQ,Ula as j_,Vla as kU,Wla as eO,Xla as NU,Yla as Zw,ama as m,bma as Z0,cma as YJ,dma as dL,fma as R0,gma as O1,jma as N,nma as M0,xma as P}from"./cli-1.1.30-7h45a0x6.mjs";import{Rma as F5,Wma as Sz,Yma as W0,Zma as a2,ana as VW,cna as o1}from"./cli-1.1.30-gv4z21b9.mjs";import{fna as G0,ina as J0,jna as wB,kna as L6,qna as W1}from"./cli-1.1.30-qdnzwgr7.mjs";import{Aoa as z_,Ara as LB,Boa as LQ,Coa as M_,Dna as zq,Doa as v7,Ena as iO,Eoa as pU,Foa as MQ,Goa as A_,Hoa as HB,Ioa as GB,Joa as KB,Koa as UB,Loa as WB,Lqa as OB,Moa as VB,Mra as DL,Nna as x7,Noa as J4,Ona as KU,Ooa as BB,Pna as _q,Qna as aO,Rna as TU,Roa as JW,Sna as oO,Tna as m4,Una as GQ,Vsa as z2,Zna as IU,_na as sO,apa as q2,bpa as _4,bra as HJ,dra as GJ,eqa as kQ,foa as P7,goa as UU,lra as Cz,nra as yz,rna as EU,sna as Jw,toa as RQ,uoa as D_,ura as CW,xoa as u4,yoa as KQ,zoa as UQ}from"./cli-1.1.30-ehk76t59.mjs";import{Wsa as N7,Xsa as XU,eta as BU,fta as SO,gta as t0,hta as g4,ita as jU,jta as nO,sta as u,tta as I1}from"./cli-1.1.30-m62yy9h8.mjs";import{Iua as dE,Jua as k4,Kua as c,Lua as hq,Mua as B,Nua as Y0,Oua as p2,Pua as d2}from"./cli-1.1.30-7dtpd1ra.mjs";var IX=c((tE,TX)=>{TX.exports=jX;jX.sync=uz;var DX=Y0("fs");function mz(Z,q){var J=q.pathExt!==void 0?q.pathExt:process.env.PATHEXT;if(!J)return!0;if(J=J.split(";"),J.indexOf("")!==-1)return!0;for(var X=0;X<J.length;X++){var Q=J[X].toLowerCase();if(Q&&Z.substr(-Q.length).toLowerCase()===Q)return!0}return!1}function AX(Z,q,J){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return mz(q,J)}function jX(Z,q,J){DX.stat(Z,function(X,Q){J(X,X?!1:AX(Q,Z,q))})}function uz(Z,q){return AX(DX.statSync(Z),Z,q)}});var xX=c((eE,NX)=>{NX.exports=wX;wX.sync=pz;var OX=Y0("fs");function wX(Z,q,J){OX.stat(Z,function(X,Q){J(X,X?!1:kX(Q,q))})}function pz(Z,q){return kX(OX.statSync(Z),q)}function kX(Z,q){return Z.isFile()&&dz(Z,q)}function dz(Z,q){var{mode:J,uid:X,gid:Q}=Z,$=q.uid!==void 0?q.uid:process.getuid&&process.getuid(),Y=q.gid!==void 0?q.gid:process.getgid&&process.getgid(),H=parseInt("100",8),K=parseInt("010",8),U=parseInt("001",8),W=H|K,V=J&U||J&K&&Q===Y||J&H&&X===$||J&W&&$===0;return V}});var EX=c((qv,PX)=>{var Zv=Y0("fs"),f4;if(process.platform==="win32"||global.TESTING_WINDOWS)f4=IX();else f4=xX();PX.exports=i5;i5.sync=cz;function i5(Z,q,J){if(typeof q==="function")J=q,q={};if(!J){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(X,Q){i5(Z,q||{},function($,Y){if($)Q($);else X(Y)})})}f4(Z,q||{},function(X,Q){if(X){if(X.code==="EACCES"||q&&q.ignoreErrors)X=null,Q=!1}J(X,Q)})}function cz(Z,q){try{return f4.sync(Z,q||{})}catch(J){if(q&&q.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var fX=c((Jv,hX)=>{var V2=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",vX=Y0("path"),lz=V2?";":":",CX=EX(),yX=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),SX=(Z,q)=>{let J=q.colon||lz,X=Z.match(/\//)||V2&&Z.match(/\\/)?[""]:[...V2?[process.cwd()]:[],...(q.path||process.env.PATH||"").split(J)],Q=V2?q.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=V2?Q.split(J):[""];if(V2){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:X,pathExt:$,pathExtExe:Q}},bX=(Z,q,J)=>{if(typeof q==="function")J=q,q={};if(!q)q={};let{pathEnv:X,pathExt:Q,pathExtExe:$}=SX(Z,q),Y=[],H=(U)=>new Promise((W,V)=>{if(U===X.length)return q.all&&Y.length?W(Y):V(yX(Z));let L=X[U],z=/^".*"$/.test(L)?L.slice(1,-1):L,_=vX.join(z,Z),R=!z&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+_:_;W(K(R,U,0))}),K=(U,W,V)=>new Promise((L,z)=>{if(V===Q.length)return L(H(W+1));let _=Q[V];CX(U+_,{pathExt:$},(R,M)=>{if(!R&&M)if(q.all)Y.push(U+_);else return L(U+_);return L(K(U,W,V+1))})});return J?H(0).then((U)=>J(null,U),J):H(0)},nz=(Z,q)=>{q=q||{};let{pathEnv:J,pathExt:X,pathExtExe:Q}=SX(Z,q),$=[];for(let Y=0;Y<J.length;Y++){let H=J[Y],K=/^".*"$/.test(H)?H.slice(1,-1):H,U=vX.join(K,Z),W=!K&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+U:U;for(let V=0;V<X.length;V++){let L=W+X[V];try{if(CX.sync(L,{pathExt:Q}))if(q.all)$.push(L);else return L}catch(z){}}}if(q.all&&$.length)return $;if(q.nothrow)return null;throw yX(Z)};hX.exports=bX;bX.sync=nz});var mX=c((Xv,a5)=>{var gX=(Z={})=>{let q=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"};a5.exports=gX;a5.exports.default=gX});var cX=c((Qv,dX)=>{var uX=Y0("path"),iz=fX(),az=mX();function pX(Z,q){let J=Z.options.env||process.env,X=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=iz.sync(Z.command,{path:J[az({env:J})],pathExt:q?uX.delimiter:void 0})}catch(H){}finally{if($)process.chdir(X)}if(Y)Y=uX.resolve(Q?Z.options.cwd:"",Y);return Y}function oz(Z){return pX(Z)||pX(Z,!0)}dX.exports=oz});var lX=c((tz,s5)=>{var o5=/([()\][%!^"`<>&|;, *?])/g;function sz(Z){return Z=Z.replace(o5,"^$1"),Z}function rz(Z,q){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(o5,"^$1"),q)Z=Z.replace(o5,"^$1");return Z}tz.command=sz;tz.argument=rz});var iX=c(($v,nX)=>{nX.exports=/^#!(.*)/});var oX=c((Yv,aX)=>{var q_=iX();aX.exports=(Z="")=>{let q=Z.match(q_);if(!q)return null;let[J,X]=q[0].replace(/#! ?/,"").split(" "),Q=J.split("/").pop();if(Q==="env")return X;return X?`${Q} ${X}`:Q}});var rX=c((Hv,sX)=>{var r5=Y0("fs"),J_=oX();function X_(Z){let J=Buffer.alloc(150),X;try{X=r5.openSync(Z,"r"),r5.readSync(X,J,0,150,0),r5.closeSync(X)}catch(Q){}return J_(J.toString())}sX.exports=X_});var qQ=c((Gv,ZQ)=>{var Q_=Y0("path"),tX=cX(),eX=lX(),$_=rX(),Y_=process.platform==="win32",H_=/\.(?:com|exe)$/i,G_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function K_(Z){Z.file=tX(Z);let q=Z.file&&$_(Z.file);if(q)return Z.args.unshift(Z.file),Z.command=q,tX(Z);return Z.file}function U_(Z){if(!Y_)return Z;let q=K_(Z),J=!H_.test(q);if(Z.options.forceShell||J){let X=G_.test(q);Z.command=Q_.normalize(Z.command),Z.command=eX.command(Z.command),Z.args=Z.args.map(($)=>eX.argument($,X));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 W_(Z,q,J){if(q&&!Array.isArray(q))J=q,q=null;q=q?q.slice(0):[],J=Object.assign({},J);let X={command:Z,args:q,options:J,file:void 0,original:{command:Z,args:q}};return J.shell?X:U_(X)}ZQ.exports=W_});var QQ=c((Kv,XQ)=>{var t5=process.platform==="win32";function e5(Z,q){return Object.assign(Error(`${q} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${q} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function V_(Z,q){if(!t5)return;let J=Z.emit;Z.emit=function(X,Q){if(X==="exit"){let $=JQ(Q,q);if($)return J.call(Z,"error",$)}return J.apply(Z,arguments)}}function JQ(Z,q){if(t5&&Z===1&&!q.file)return e5(q.original,"spawn");return null}function B_(Z,q){if(t5&&Z===1&&!q.file)return e5(q.original,"spawnSync");return null}XQ.exports={hookChildProcess:V_,verifyENOENT:JQ,verifyENOENTSync:B_,notFoundError:e5}});var HQ=c((Uv,B2)=>{var $Q=Y0("child_process"),Z3=qQ(),q3=QQ();function YQ(Z,q,J){let X=Z3(Z,q,J),Q=$Q.spawn(X.command,X.args,X.options);return q3.hookChildProcess(Q,X),Q}function L_(Z,q,J){let X=Z3(Z,q,J),Q=$Q.spawnSync(X.command,X.args,X.options);return Q.error=Q.error||q3.verifyENOENTSync(Q.status,X),Q}B2.exports=YQ;B2.exports.spawn=YQ;B2.exports.sync=L_;B2.exports._parse=Z3;B2.exports._enoent=q3});function R_(Z,q,J,X){if(!t0(Z))return Z;q=u4(q,Z);var Q=-1,$=q.length,Y=$-1,H=Z;while(H!=null&&++Q<$){var K=UQ(q[Q]),U=J;if(K==="__proto__"||K==="constructor"||K==="prototype")return Z;if(Q!=Y){var W=H[K];if(U=X?X(W,K,H):void 0,U===void 0)U=t0(W)?W:m4(q[Q+1])?[]:{}}WQ(H,K,U),H=H[K]}return Z}var VQ;var BQ=B(()=>{__();KQ();GQ();g4();z_();VQ=R_});function F_(Z,q,J){var X=-1,Q=q.length,$={};while(++X<Q){var Y=q[X],H=LQ(Z,Y);if(J(H,Y))VQ($,u4(Y,Z),H)}return $}var zQ;var _Q=B(()=>{M_();BQ();KQ();zQ=F_});function T_(Z,q){if(Z==null)return{};var J=RQ(FQ(Z),function(X){return[X]});return q=MQ(q),zQ(Z,J,function(X,Q){return q(X,Q[0])})}var J3;var DQ=B(()=>{D_();A_();_Q();j_();J3=T_});function AQ(Z){let q=Z.slice(Z.lastIndexOf(".")).toLowerCase();return I_.has(q)}function jQ(Z){let q=Math.min(Z.length,O_),J=0;for(let X=0;X<q;X++){let Q=Z[X];if(Q===0)return!0;if(Q<32&&Q!==9&&Q!==10&&Q!==13)J++}return J/q>0.1}var I_,O_=8192;var TQ=B(()=>{I_=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"])});import{dirname as w_}from"path";function H0(Z,q,J){let X=k_();if(!X)return;let Q={timestamp:new Date().toISOString(),level:Z,event:q,data:J??{}},$=N(),Y=m(Q)+`
2
+ `;try{$.appendFileSync(X,Y)}catch{try{$.mkdirSync(w_(X)),$.appendFileSync(X,Y)}catch{}}}function k_(){return process.env.CLAUDIN_DIAGNOSTICS_FILE}async function Pv(Z,q,J){let X=Date.now();H0("info",`${Z}_started`);try{let Q=await q(),$=J?J(Q):{};return H0("info",`${Z}_completed`,{duration_ms:Date.now()-X,...$}),Q}catch(Q){throw H0("error",`${Z}_failed`,{duration_ms:Date.now()-X}),Q}}var _6=B(()=>{M0();R0()});import{readFile as N_}from"fs/promises";import{join as x_}from"path";async function R6(Z,q,J,X){try{let Q=await N_(x_(Z,"config"),"utf-8");return P_(Q,q,J,X)}catch{return null}}function P_(Z,q,J,X){let Q=Z.split(`
3
+ `),$=q.toLowerCase(),Y=X.toLowerCase(),H=!1;for(let K of Q){let U=K.trim();if(U.length===0||U[0]==="#"||U[0]===";")continue;if(U[0]==="["){H=y_(U,$,J);continue}if(!H)continue;let W=E_(U);if(W&&W.key.toLowerCase()===Y)return W.value}return null}function E_(Z){let q=0;while(q<Z.length&&S_(Z[q]))q++;if(q===0)return null;let J=Z.slice(0,q);while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;if(q>=Z.length||Z[q]!=="=")return null;q++;while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;let X=v_(Z,q);return{key:J,value:X}}function v_(Z,q){let J="",X=!1,Q=q;while(Q<Z.length){let $=Z[Q];if(!X&&($==="#"||$===";"))break;if($==='"'){X=!X,Q++;continue}if($==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(X){switch(Y){case"n":J+=`
4
+ `;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(!X)J=C_(J);return J}function C_(Z){let q=Z.length;while(q>0&&(Z[q-1]===" "||Z[q-1]==="\t"))q--;return Z.slice(0,q)}function y_(Z,q,J){let X=1;while(X<Z.length&&Z[X]!=="]"&&Z[X]!==" "&&Z[X]!=="\t"&&Z[X]!=='"')X++;if(Z.slice(1,X).toLowerCase()!==q)return!1;if(J===null)return X<Z.length&&Z[X]==="]";while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=='"')return!1;X++;let $="";while(X<Z.length&&Z[X]!=='"'){if(Z[X]==="\\"&&X+1<Z.length){let Y=Z[X+1];if(Y==="\\"||Y==='"'){$+=Y,X+=2;continue}$+=Y,X+=2;continue}$+=Z[X],X++}if(X>=Z.length||Z[X]!=='"')return!1;if(X++,X>=Z.length||Z[X]!=="]")return!1;return $===J}function S_(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var IQ=()=>{};import{unwatchFile as OQ,watchFile as b_}from"fs";import{readdir as h_,readFile as v1,stat as xQ}from"fs/promises";import{join as w0,resolve as p4}from"path";function dv(){L2.clear()}async function S0(Z){let q=p4(Z??t()),J=L2.get(q);if(J!==void 0)return J;let X=R2(q);if(!X)return L2.set(q,null),null;let Q=w0(X,".git");try{if((await xQ(Q)).isFile()){let Y=(await v1(Q,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),K=p4(X,H);return L2.set(q,K),K}}return L2.set(q,Q),Q}catch{return L2.set(q,null),null}}function d4(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((q)=>q==="."||q===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function X3(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function F6(Z){try{let q=(await v1(w0(Z,"HEAD"),"utf-8")).trim();if(q.startsWith("ref:")){let J=q.slice(4).trim();if(J.startsWith("refs/heads/")){let Q=J.slice(11);if(!d4(Q))return null;return{type:"branch",name:Q}}if(!d4(J))return null;let X=await _2(Z,J);return X?{type:"detached",sha:X}:{type:"detached",sha:""}}if(!X3(q))return null;return{type:"detached",sha:q}}catch{return null}}async function _2(Z,q){let J=await wQ(Z,q);if(J)return J;let X=await C1(Z);if(X&&X!==Z)return wQ(X,q);return null}async function wQ(Z,q){try{let J=(await v1(w0(Z,q),"utf-8")).trim();if(J.startsWith("ref:")){let X=J.slice(4).trim();if(!d4(X))return null;return _2(Z,X)}if(!X3(J))return null;return J}catch{}try{let J=await v1(w0(Z,"packed-refs"),"utf-8");for(let X of J.split(`
5
+ `)){if(X.startsWith("#")||X.startsWith("^"))continue;let Q=X.indexOf(" ");if(Q===-1)continue;if(X.slice(Q+1)===q){let $=X.slice(0,Q);return X3($)?$:null}}}catch{}return null}async function C1(Z){try{let q=(await v1(w0(Z,"commondir"),"utf-8")).trim();return p4(Z,q)}catch{return null}}async function f_(Z,q,J){try{let X=(await v1(w0(Z,q),"utf-8")).trim();if(X.startsWith("ref:")){let Q=X.slice(4).trim();if(Q.startsWith(J)){let $=Q.slice(J.length);if(!d4($))return null;return $}}}catch{}return null}class PQ{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 S0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await C1(this.gitDir),this.watchPath(w0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(w0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),M6(async()=>{this.stopWatching()})}watchPath(Z,q){this.watchedPaths.push(Z),b_(Z,{interval:g_},q)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await F6(this.gitDir),q=this.commonDir??this.gitDir,J=Z?.type==="branch"?w0(q,"refs","heads",Z.name):null;if(J===this.branchRefPath)return;if(this.branchRefPath)OQ(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((X)=>X!==this.branchRefPath);if(this.branchRefPath=J,!J)return;this.watchPath(J,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await kQ(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)OQ(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,q){await this.ensureStarted();let J=this.cache.get(Z);if(J&&!J.dirty)return J.value;if(J)J.dirty=!1;let X=await q(),Q=this.cache.get(Z);if(Q&&!Q.dirty)Q.value=X;if(!Q)this.cache.set(Z,{value:X,dirty:!1,compute:q});return X}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function m_(){let Z=await S0();if(!Z)return"HEAD";let q=await F6(Z);if(!q)return"HEAD";return q.type==="branch"?q.name:"HEAD"}async function u_(){let Z=await S0();if(!Z)return"";let q=await F6(Z);if(!q)return"";if(q.type==="branch")return await _2(Z,`refs/heads/${q.name}`)??"";return q.sha}async function p_(){let Z=await S0();if(!Z)return null;let q=await R6(Z,"remote","origin","url");if(q)return q;let J=await C1(Z);if(J&&J!==Z)return R6(J,"remote","origin","url");return null}async function d_(){let Z=await S0();if(!Z)return"main";let q=await C1(Z)??Z,J=await f_(q,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(J)return J;for(let X of["main","master"])if(await _2(q,`refs/remotes/origin/${X}`))return X;return"main"}function EQ(){return c4.get("branch",m_)}function vQ(){return c4.get("head",u_)}function CQ(){return c4.get("remoteUrl",p_)}function yQ(){return c4.get("defaultBranch",d_)}async function cv(Z){let q=await S0(Z);if(!q)return null;let J=await F6(q);if(!J)return null;if(J.type==="branch")return _2(q,`refs/heads/${J.name}`);return J.sha}async function lv(Z){let q;try{let X=(await v1(w0(Z,".git"),"utf-8")).trim();if(!X.startsWith("gitdir:"))return null;q=p4(Z,X.slice(7).trim())}catch{return null}let J=await F6(q);if(!J)return null;if(J.type==="branch")return _2(q,`refs/heads/${J.name}`);return J.sha}async function nv(Z){let q=await S0(Z);if(!q)return null;let J=await R6(q,"remote","origin","url");if(J)return J;let X=await C1(q);if(X&&X!==q)return R6(X,"remote","origin","url");return null}async function SQ(){let Z=await S0();if(!Z)return!1;let q=await C1(Z)??Z;try{return await xQ(w0(q,"shallow")),!0}catch{return!1}}async function bQ(){try{let Z=await S0();if(!Z)return 0;let q=await C1(Z)??Z;return(await h_(w0(q,"worktrees"))).length+1}catch{return 1}}var L2,g_=1000,c4;var hQ=B(()=>{z2();NQ();e0();D6();IQ();L2=new Map;c4=new PQ});import{tracingChannel as c_,channel as l_}from"node:diagnostics_channel";var U0,A6,n_,Q3=()=>U0.hasSubscribers||A6.hasSubscribers,gQ,fQ,i_=(Z,q,J,X)=>{typeof fQ.emitWarning=="function"?fQ.emitWarning(Z,q,J,X):console.error(`[${J}] ${q}: ${Z}`)},a_=(Z)=>!gQ.has(Z),R1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),mQ=(Z)=>R1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?l4:null:null,l4,o_=class Z{heap;length;static#J=!1;static create(q){let J=mQ(q);if(!J)return[];Z.#J=!0;let X=new Z(q,J);return Z.#J=!1,X}constructor(q,J){if(!Z.#J)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new J(q),this.length=0}push(q){this.heap[this.length++]=q}pop(){return this.heap[--this.length]}},uQ;var pQ=B(()=>{U0=l_("lru-cache:metrics"),A6=c_("lru-cache"),n_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,gQ=new Set,fQ=typeof process=="object"&&process?process:{},l4=class extends Array{constructor(Z){super(Z),this.fill(0)}},uQ=class Z{#J;#X;#q;#Y;#G;#V;#A;#_;get perf(){return this.#_}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#j;#K;#$;#Z;#L;#R;#B;#U;#T;#W;#I;#O;#M;#F;#w;#h;#z;#v;static unsafeExposeInternals(q){return{starts:q.#O,ttls:q.#M,autopurgeTimers:q.#F,sizes:q.#I,keyMap:q.#K,keyList:q.#$,valList:q.#Z,next:q.#L,prev:q.#R,get head(){return q.#B},get tail(){return q.#U},free:q.#T,isBackgroundFetch:(J)=>q.#Q(J),backgroundFetch:(J,X,Q,$)=>q.#m(J,X,Q,$),moveToTail:(J)=>q.#b(J),indexes:(J)=>q.#k(J),rindexes:(J)=>q.#N(J),isStale:(J)=>q.#D(J)}}get max(){return this.#J}get maxSize(){return this.#X}get calculatedSize(){return this.#j}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#A}get dispose(){return this.#q}get onInsert(){return this.#Y}get disposeAfter(){return this.#G}constructor(q){let{max:J=0,ttl:X,ttlResolution:Q=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:K,dispose:U,onInsert:W,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:z,maxSize:_=0,maxEntrySize:R=0,sizeCalculation:M,fetchMethod:F,memoMethod:k,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:j,allowStaleOnFetchAbort:T,ignoreFetchAbort:A,backgroundFetchSize:b=1,perf:w}=q;if(this.backgroundFetchSize=b,w!==void 0&&typeof w?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#_=w??n_,J!==0&&!R1(J))throw TypeError("max option must be a nonnegative integer");let x=J?mQ(J):Array;if(!x)throw Error("invalid max value: "+J);if(this.#J=J,this.#X=_,this.maxEntrySize=R||this.#X,this.sizeCalculation=M,this.sizeCalculation){if(!this.#X&&!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(k!==void 0&&typeof k!="function")throw TypeError("memoMethod must be a function if defined");if(this.#A=k,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#h=!!F,this.#K=new Map,this.#$=Array.from({length:J}).fill(void 0),this.#Z=Array.from({length:J}).fill(void 0),this.#L=new x(J),this.#R=new x(J),this.#B=0,this.#U=0,this.#T=o_.create(J),this.#H=0,this.#j=0,typeof U=="function"&&(this.#q=U),typeof W=="function"&&(this.#Y=W),typeof V=="function"?(this.#G=V,this.#W=[]):(this.#G=void 0,this.#W=void 0),this.#w=!!this.#q,this.#v=!!this.#Y,this.#z=!!this.#G,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!z,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!j,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#X!==0&&!R1(this.#X))throw TypeError("maxSize must be a positive integer if specified");if(!R1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!K,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=R1(Q)||Q===0?Q:1,this.ttlAutopurge=!!$,this.ttl=X||0,this.ttl){if(!R1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#J===0&&this.ttl===0&&this.#X===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#J&&!this.#X){let E="LRU_CACHE_UNBOUNDED";a_(E)&&(gQ.add(E),i_("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,Z))}}getRemainingTTL(q){return this.#K.has(q)?1/0:0}#u(){let q=new l4(this.#J),J=new l4(this.#J);this.#M=q,this.#O=J;let X=this.ttlAutopurge?Array.from({length:this.#J}):void 0;this.#F=X,this.#p=(K,U,W=this.#_.now())=>{J[K]=U!==0?W:0,q[K]=U,Q(K,U)},this.#C=(K)=>{J[K]=q[K]!==0?this.#_.now():0,Q(K,q[K])};let Q=this.ttlAutopurge?(K,U)=>{if(X?.[K]&&(clearTimeout(X[K]),X[K]=void 0),U&&U!==0&&X){let W=setTimeout(()=>{this.#D(K)?(this.#x(this.#$[K],"expire"),X[K]=void 0):Q(K,H(K))},U+1);W.unref&&W.unref(),X[K]=W}}:()=>{};this.#P=(K,U)=>{if(q[U]){let W=q[U],V=J[U];if(!W||!V)return;K.ttl=W,K.start=V,K.now=$||Y();let L=K.now-V;K.remainingTTL=W-L}};let $=0,Y=()=>{let K=this.#_.now();if(this.ttlResolution>0){$=K;let U=setTimeout(()=>$=0,this.ttlResolution);U.unref&&U.unref()}return K};this.getRemainingTTL=(K)=>{let U=this.#K.get(K);return U===void 0?0:H(U)};let H=(K)=>{let U=q[K],W=J[K];if(!U||!W)return 1/0;let V=($||Y())-W;return U-V};this.#D=(K)=>{let U=J[K],W=q[K];return!!W&&!!U&&($||Y())-U>W}}#C=()=>{};#P=()=>{};#p=()=>{};#D=()=>!1;#a(){let q=new l4(this.#J);this.#j=0,this.#I=q,this.#y=(J)=>{this.#j-=q[J],q[J]=0},this.#d=(J,X,Q,$)=>{if(!R1(Q)){if(this.#Q(X))return this.backgroundFetchSize;if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(Q=$(X,J),!R1(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.#f=(J,X,Q)=>{if(q[J]=X,this.#X){let $=this.#X-q[J];for(;this.#j>$;)this.#g(!0)}this.#j+=q[J],Q&&(Q.entrySize=X,Q.totalCalculatedSize=this.#j)}}#y=(q)=>{};#f=(q,J,X)=>{};#d=(q,J,X,Q)=>{if(X||Q)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:q=this.allowStale}={}){if(this.#H)for(let J=this.#U;this.#c(J)&&((q||!this.#D(J))&&(yield J),J!==this.#B);)J=this.#R[J]}*#N({allowStale:q=this.allowStale}={}){if(this.#H)for(let J=this.#B;this.#c(J)&&((q||!this.#D(J))&&(yield J),J!==this.#U);)J=this.#L[J]}#c(q){return q!==void 0&&this.#K.get(this.#$[q])===q}*entries(){for(let q of this.#k())this.#Z[q]!==void 0&&this.#$[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield[this.#$[q],this.#Z[q]])}*rentries(){for(let q of this.#N())this.#Z[q]!==void 0&&this.#$[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield[this.#$[q],this.#Z[q]])}*keys(){for(let q of this.#k()){let J=this.#$[q];J!==void 0&&!this.#Q(this.#Z[q])&&(yield J)}}*rkeys(){for(let q of this.#N()){let J=this.#$[q];J!==void 0&&!this.#Q(this.#Z[q])&&(yield J)}}*values(){for(let q of this.#k())this.#Z[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield this.#Z[q])}*rvalues(){for(let q of this.#N())this.#Z[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield this.#Z[q])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(q,J={}){for(let X of this.#k()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($!==void 0&&q($,this.#$[X],this))return this.#S(this.#$[X],J)}}forEach(q,J=this){for(let X of this.#k()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&q.call(J,$,this.#$[X],this)}}rforEach(q,J=this){for(let X of this.#N()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&q.call(J,$,this.#$[X],this)}}purgeStale(){let q=!1;for(let J of this.#N({allowStale:!0}))this.#D(J)&&(this.#x(this.#$[J],"expire"),q=!0);return q}info(q){let J=this.#K.get(q);if(J===void 0)return;let X=this.#Z[J],Q=this.#Q(X)?X.__staleWhileFetching:X;if(Q===void 0)return;let $={value:Q};if(this.#M&&this.#O){let Y=this.#M[J],H=this.#O[J];if(Y&&H){let K=Y-(this.#_.now()-H);$.ttl=K,$.start=Date.now()}}return this.#I&&($.size=this.#I[J]),$}dump(){let q=[];for(let J of this.#k({allowStale:!0})){let X=this.#$[J],Q=this.#Z[J],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($===void 0||X===void 0)continue;let Y={value:$};if(this.#M&&this.#O){Y.ttl=this.#M[J];let H=this.#_.now()-this.#O[J];Y.start=Math.floor(Date.now()-H)}this.#I&&(Y.size=this.#I[J]),q.unshift([X,Y])}return q}load(q){this.clear();for(let[J,X]of q){if(X.start){let Q=Date.now()-X.start;X.start=this.#_.now()-Q}this.#E(J,X.value,X)}}set(q,J,X={}){let{status:Q=U0.hasSubscribers?{}:void 0}=X;X.status=Q,Q&&(Q.op="set",Q.key=q,J!==void 0&&(Q.value=J),Q.cache=this);let $=this.#E(q,J,X);return Q&&U0.hasSubscribers&&U0.publish(Q),$}#E(q,J,X,Q){let{ttl:$=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:K=this.sizeCalculation,status:U}=X,W=this.#Q(J);if(J===void 0)return U&&(U.set="deleted"),this.delete(q),this;let{noUpdateTTL:V=this.noUpdateTTL}=X;U&&!W&&(U.value=J);let L=this.#d(q,J,X.size||0,K,U);if(this.maxEntrySize&&L>this.maxEntrySize)return this.#x(q,"set"),U&&(U.set="miss",U.maxEntrySizeExceeded=!0),this;let z=this.#H===0?void 0:this.#K.get(q);if(z===void 0)z=this.#H===0?this.#U:this.#T.length!==0?this.#T.pop():this.#H===this.#J?this.#g(!1):this.#H,this.#$[z]=q,this.#Z[z]=J,this.#K.set(q,z),this.#L[this.#U]=z,this.#R[z]=this.#U,this.#U=z,this.#H++,this.#f(z,L,U),U&&(U.set="add"),V=!1,this.#v&&!W&&this.#Y?.(J,q,"add");else{this.#b(z);let _=this.#Z[z];if(J!==_){if(!H)if(this.#Q(_)){_!==Q&&_.__abortController.abort(Error("replaced"));let{__staleWhileFetching:R}=_;R!==void 0&&R!==J&&(this.#w&&this.#q?.(R,q,"set"),this.#z&&this.#W?.push([R,q,"set"]))}else this.#w&&this.#q?.(_,q,"set"),this.#z&&this.#W?.push([_,q,"set"]);if(this.#y(z),this.#f(z,L,U),this.#Z[z]=J,!W){let R=_&&this.#Q(_)?_.__staleWhileFetching:_,M=R===void 0?"add":J!==R?"replace":"update";U&&(U.set=M,R!==void 0&&(U.oldValue=R)),this.#v&&this.onInsert?.(J,q,M)}}else W||(U&&(U.set="update"),this.#v&&this.onInsert?.(J,q,"update"))}if($!==0&&!this.#M&&this.#u(),this.#M&&(V||this.#p(z,$,Y),U&&this.#P(U,z)),!H&&this.#z&&this.#W){let _=this.#W,R;for(;R=_?.shift();)this.#G?.(...R)}return this}pop(){try{for(;this.#H;){let q=this.#Z[this.#B];if(this.#g(!0),this.#Q(q)){if(q.__staleWhileFetching)return q.__staleWhileFetching}else if(q!==void 0)return q}}finally{if(this.#z&&this.#W){let q=this.#W,J;for(;J=q?.shift();)this.#G?.(...J)}}}#g(q){let J=this.#B,X=this.#$[J],Q=this.#Z[J],$=this.#Q(Q);$&&Q.__abortController.abort(Error("evicted"));let Y=$?Q.__staleWhileFetching:Q;return(this.#w||this.#z)&&Y!==void 0&&(this.#w&&this.#q?.(Y,X,"evict"),this.#z&&this.#W?.push([Y,X,"evict"])),this.#y(J),this.#F?.[J]&&(clearTimeout(this.#F[J]),this.#F[J]=void 0),q&&(this.#$[J]=void 0,this.#Z[J]=void 0,this.#T.push(J)),this.#H===1?(this.#B=this.#U=0,this.#T.length=0):this.#B=this.#L[J],this.#K.delete(X),this.#H--,J}has(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="has",X.key=q,X.cache=this);let Q=this.#o(q,J);return U0.hasSubscribers&&U0.publish(X),Q}#o(q,J={}){let{updateAgeOnHas:X=this.updateAgeOnHas,status:Q}=J,$=this.#K.get(q);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.#P(Q,$));else return X&&this.#C($),Q&&(Q.has="hit",this.#P(Q,$)),!0}else Q&&(Q.has="miss");return!1}peek(q,J={}){let{status:X=Q3()?{}:void 0}=J;X&&(X.op="peek",X.key=q,X.cache=this),J.status=X;let Q=this.#s(q,J);return U0.hasSubscribers&&U0.publish(X),Q}#s(q,J){let{status:X,allowStale:Q=this.allowStale}=J,$=this.#K.get(q);if($===void 0||!Q&&this.#D($)){X&&(X.peek=$===void 0?"miss":"stale");return}let Y=this.#Z[$],H=this.#Q(Y)?Y.__staleWhileFetching:Y;return X&&(H!==void 0?(X.peek="hit",X.value=H):X.peek="miss"),H}#m(q,J,X,Q){let $=J===void 0?void 0:this.#Z[J];if(this.#Q($))return $;let Y=new AbortController,{signal:H}=X;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let K={signal:Y.signal,options:X,context:Q},U=(R,M=!1)=>{let{aborted:F}=Y.signal,k=X.ignoreFetchAbort&&R!==void 0,D=X.ignoreFetchAbort||!!(X.allowStaleOnFetchAbort&&R!==void 0);if(X.status&&(F&&!M?(X.status.fetchAborted=!0,X.status.fetchError=Y.signal.reason,k&&(X.status.fetchAbortIgnored=!0)):X.status.fetchResolved=!0),F&&!k&&!M)return V(Y.signal.reason,D);let O=z,j=this.#Z[J];return(j===z||j===void 0&&k&&M)&&(R===void 0?O.__staleWhileFetching!==void 0?this.#Z[J]=O.__staleWhileFetching:this.#x(q,"fetch"):(X.status&&(X.status.fetchUpdated=!0),this.#E(q,R,K.options,O))),R},W=(R)=>(X.status&&(X.status.fetchRejected=!0,X.status.fetchError=R),V(R,!1)),V=(R,M)=>{let{aborted:F}=Y.signal,k=F&&X.allowStaleOnFetchAbort,D=k||X.allowStaleOnFetchRejection,O=D||X.noDeleteOnFetchRejection,j=z;if(this.#Z[J]===z&&(!O||!M&&j.__staleWhileFetching===void 0?this.#x(q,"fetch"):k||(this.#Z[J]=j.__staleWhileFetching)),D)return X.status&&j.__staleWhileFetching!==void 0&&(X.status.returnedStale=!0),j.__staleWhileFetching;if(j.__returned===j)throw R},L=(R,M)=>{let F=this.#V?.(q,$,K);Y.signal.addEventListener("abort",()=>{(!X.ignoreFetchAbort||X.allowStaleOnFetchAbort)&&(R(void 0),X.allowStaleOnFetchAbort&&(R=(k)=>U(k,!0)))}),F&&F instanceof Promise?F.then((k)=>R(k===void 0?void 0:k),M):F!==void 0&&R(F)};X.status&&(X.status.fetchDispatched=!0);let z=new Promise(L).then(U,W),_=Object.assign(z,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return J===void 0?(this.#E(q,_,{...K.options,status:void 0}),J=this.#K.get(q)):this.#Z[J]=_,_}#Q(q){if(!this.#h)return!1;let J=q;return!!J&&J instanceof Promise&&J.hasOwnProperty("__staleWhileFetching")&&J.__abortController instanceof AbortController}fetch(q,J={}){let X=A6.hasSubscribers,{status:Q=Q3()?{}:void 0}=J;J.status=Q,Q&&J.context&&(Q.context=J.context);let $=this.#l(q,J);return Q&&X&&(Q.trace=!0,A6.tracePromise(()=>$,Q).catch(()=>{})),$}async#l(q,J={}){let{allowStale:X=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:K=0,sizeCalculation:U=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:z=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:R,forceRefresh:M=!1,status:F,signal:k}=J;if(F&&(F.op="fetch",F.key=q,M&&(F.forceRefresh=!0),F.cache=this),!this.#h)return F&&(F.fetch="get"),this.#S(q,{allowStale:X,updateAgeOnGet:Q,noDeleteOnStaleGet:$,status:F});let D={allowStale:X,updateAgeOnGet:Q,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:K,sizeCalculation:U,noUpdateTTL:W,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:_,ignoreFetchAbort:z,status:F,signal:k},O=this.#K.get(q);if(O===void 0){F&&(F.fetch="miss");let j=this.#m(q,O,D,R);return j.__returned=j}else{let j=this.#Z[O];if(this.#Q(j)){let w=X&&j.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",w&&(F.returnedStale=!0)),w?j.__staleWhileFetching:j.__returned=j}let T=this.#D(O);if(!M&&!T)return F&&(F.fetch="hit"),this.#b(O),Q&&this.#C(O),F&&this.#P(F,O),j;let A=this.#m(q,O,D,R),b=A.__staleWhileFetching!==void 0&&X;return F&&(F.fetch=T?"stale":"refresh",b&&T&&(F.returnedStale=!0)),b?A.__staleWhileFetching:A.__returned=A}}forceFetch(q,J={}){let X=A6.hasSubscribers,{status:Q=Q3()?{}:void 0}=J;J.status=Q,Q&&J.context&&(Q.context=J.context);let $=this.#r(q,J);return Q&&X&&(Q.trace=!0,A6.tracePromise(()=>$,Q).catch(()=>{})),$}async#r(q,J={}){let X=await this.#l(q,J);if(X===void 0)throw Error("fetch() returned undefined");return X}memo(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="memo",X.key=q,J.context&&(X.context=J.context),X.cache=this);let Q=this.#t(q,J);return X&&(X.value=Q),U0.hasSubscribers&&U0.publish(X),Q}#t(q,J={}){let X=this.#A;if(!X)throw Error("no memoMethod provided to constructor");let{context:Q,status:$,forceRefresh:Y,...H}=J;$&&Y&&($.forceRefresh=!0);let K=this.#S(q,H),U=Y||K===void 0;if($&&($.memo=U?"miss":"hit",U||($.value=K)),!U)return K;let W=X(q,K,{options:H,context:Q});return $&&($.value=W),this.#E(q,W,H),W}get(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="get",X.key=q,X.cache=this);let Q=this.#S(q,J);return X&&(Q!==void 0&&(X.value=Q),U0.hasSubscribers&&U0.publish(X)),Q}#S(q,J={}){let{allowStale:X=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:Y}=J,H=this.#K.get(q);if(H===void 0){Y&&(Y.get="miss");return}let K=this.#Z[H],U=this.#Q(K);return Y&&this.#P(Y,H),this.#D(H)?U?(Y&&(Y.get="stale-fetching"),X&&K.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),K.__staleWhileFetching):void 0):($||this.#x(q,"expire"),Y&&(Y.get="stale"),X?(Y&&(Y.returnedStale=!0),K):void 0):(Y&&(Y.get=U?"fetching":"hit"),this.#b(H),Q&&this.#C(H),U?K.__staleWhileFetching:K)}#n(q,J){this.#R[J]=q,this.#L[q]=J}#b(q){q!==this.#U&&(q===this.#B?this.#B=this.#L[q]:this.#n(this.#R[q],this.#L[q]),this.#n(this.#U,q),this.#U=q)}delete(q){return this.#x(q,"delete")}#x(q,J){U0.hasSubscribers&&U0.publish({op:"delete",delete:J,key:q,cache:this});let X=!1;if(this.#H!==0){let Q=this.#K.get(q);if(Q!==void 0)if(this.#F?.[Q]&&(clearTimeout(this.#F[Q]),this.#F[Q]=void 0),X=!0,this.#H===1)this.#i(J);else{this.#y(Q);let $=this.#Z[Q];if(this.#Q($)?$.__abortController.abort(Error("deleted")):(this.#w||this.#z)&&(this.#w&&this.#q?.($,q,J),this.#z&&this.#W?.push([$,q,J])),this.#K.delete(q),this.#$[Q]=void 0,this.#Z[Q]=void 0,Q===this.#U)this.#U=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.#T.push(Q)}}if(this.#z&&this.#W?.length){let Q=this.#W,$;for(;$=Q?.shift();)this.#G?.(...$)}return X}clear(){return this.#i("delete")}#i(q){for(let J of this.#N({allowStale:!0})){let X=this.#Z[J];if(this.#Q(X))X.__abortController.abort(Error("deleted"));else{let Q=this.#$[J];this.#w&&this.#q?.(X,Q,q),this.#z&&this.#W?.push([X,Q,q])}}if(this.#K.clear(),this.#Z.fill(void 0),this.#$.fill(void 0),this.#M&&this.#O){this.#M.fill(0),this.#O.fill(0);for(let J of this.#F??[])J!==void 0&&clearTimeout(J);this.#F?.fill(void 0)}if(this.#I&&this.#I.fill(0),this.#B=0,this.#U=0,this.#T.length=0,this.#j=0,this.#H=0,this.#z&&this.#W){let J=this.#W,X;for(;X=J?.shift();)this.#G?.(...X)}}}});function ZC(Z,q=300000){let J=new Map,X=new Map,Q=async(...$)=>{let Y=m($),H=J.get(Y),K=Date.now();if(!H){let U=X.get(Y);if(U)return U;let W=Z(...$);X.set(Y,W);try{let V=await W;if(X.get(Y)===W)J.set(Y,{value:V,timestamp:K,refreshing:!1});return V}finally{if(X.get(Y)===W)X.delete(Y)}}if(H&&K-H.timestamp>q&&!H.refreshing){H.refreshing=!0;let U=H;return Z(...$).then((W)=>{if(J.get(Y)===U)J.set(Y,{value:W,timestamp:Date.now(),refreshing:!1})}).catch((W)=>{if(S(W),J.get(Y)===U)J.delete(Y)}),H.value}return J.get(Y).value};return Q.cache={clear:()=>{J.clear(),X.clear()}},Q}function M1(Z,q,J=100){let X=new uQ({max:J}),Q=(...$)=>{let Y=q(...$),H=X.get(Y);if(H!==void 0)return H;let K=Z(...$);return X.set(Y,K),K};return Q.cache={clear:()=>X.clear(),size:()=>X.size,delete:($)=>X.delete($),get:($)=>X.peek($),has:($)=>X.has($)},Q}var n4=B(()=>{pQ();k0();R0()});function e(Z){if(typeof Z!=="object"||Z===null)return!1;let q=Object.getPrototypeOf(Z);return(q===null||q===Object.prototype||Object.getPrototypeOf(q)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var Z1=()=>{};import{fileURLToPath as s_}from"node:url";var M2=(Z,q)=>{let J=Y3(r_(Z));if(typeof J!=="string")throw TypeError(`${q} must be a string or a file URL: ${J}.`);return J},r_=(Z)=>$3(Z)?Z.toString():Z,$3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,Y3=(Z)=>Z instanceof URL?s_(Z):Z;var F2=()=>{};var i4=(Z,q=[],J={})=>{let X=M2(Z,"First argument"),[Q,$]=e(q)?[[],q]:[q,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(!e($))throw TypeError(`Last argument must be an options object: ${$}`);return[X,Y,{__proto__:null,...$}]};var H3=B(()=>{Z1();F2()});import{StringDecoder as t_}from"node:string_decoder";var dQ,cQ=(Z)=>dQ.call(Z)==="[object ArrayBuffer]",q0=(Z)=>dQ.call(Z)==="[object Uint8Array]",q1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),e_,lQ=(Z)=>e_.encode(Z),ZR,a4=(Z)=>ZR.decode(Z),nQ=(Z,q)=>{return qR(Z,q).join("")},qR=(Z,q)=>{if(q==="utf8"&&Z.every(($)=>typeof $==="string"))return Z;let J=new t_(q),X=Z.map(($)=>typeof $==="string"?lQ($):$).map(($)=>J.write($)),Q=J.end();return Q===""?X:[...X,Q]},j6=(Z)=>{if(Z.length===1&&q0(Z[0]))return Z[0];return G3(JR(Z))},JR=(Z)=>Z.map((q)=>typeof q==="string"?lQ(q):q),G3=(Z)=>{let q=new Uint8Array(XR(Z)),J=0;for(let X of Z)q.set(X,J),J+=X.length;return q},XR=(Z)=>{let q=0;for(let J of Z)q+=J.length;return q};var j0=B(()=>{({toString:dQ}=Object.prototype),e_=new TextEncoder,ZR=new TextDecoder});import{ChildProcess as QR}from"node:child_process";var sQ=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),rQ=(Z,q)=>{let J=[];for(let[$,Y]of Z.entries())J=$R({templates:Z,expressions:q,tokens:J,index:$,template:Y});if(J.length===0)throw TypeError("Template script must not be empty");let[X,...Q]=J;return[X,Q,{}]},$R=({templates:Z,expressions:q,tokens:J,index:X,template:Q})=>{if(Q===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[X]}`);let{nextTokens:$,leadingWhitespaces:Y,trailingWhitespaces:H}=YR(Q,Z.raw[X]),K=aQ(J,$,Y);if(X===q.length)return K;let U=q[X],W=Array.isArray(U)?U.map((V)=>oQ(V)):[oQ(U)];return aQ(K,W,H)},YR=(Z,q)=>{if(q.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let J=[],X=0,Q=iQ.has(q[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let K=q[H];if(iQ.has(K)){if(X!==Y)J.push(Z.slice(X,Y));X=Y+1}else if(K==="\\"){let U=q[H+1];if(U===`
6
+ `)Y-=1,H+=1;else if(U==="u"&&q[H+2]==="{")H=q.indexOf("}",H+3);else H+=HR[U]??1}}let $=X===Z.length;if(!$)J.push(Z.slice(X));return{nextTokens:J,leadingWhitespaces:Q,trailingWhitespaces:$}},iQ,HR,aQ=(Z,q,J)=>J||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q[0]}`,...q.slice(1)],oQ=(Z)=>{let q=typeof Z;if(q==="string")return Z;if(q==="number")return String(Z);if(e(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return GR(Z);if(Z instanceof QR||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${q}" in template expression`)},GR=({stdout:Z})=>{if(typeof Z==="string")return Z;if(q0(Z))return a4(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 tQ=B(()=>{Z1();j0();iQ=new Set([" ","\t","\r",`
7
+ `]),HR={x:3,u:5}});import K3 from"node:process";var b0=(Z)=>o4.includes(Z),o4,N0,s4=(Z)=>N0[Z]??`stdio[${Z}]`;var J1=B(()=>{o4=[K3.stdin,K3.stdout,K3.stderr],N0=["stdin","stdout","stderr"]});import{debuglog as KR}from"node:util";var Z$=(Z)=>{let q={...Z};for(let J of V3)q[J]=U3(Z,J);return q},U3=(Z,q)=>{let J=UR(Z),X=Array.from({length:J+1}),Q=WR(Z[q],X,q,J);return _R(Q,q)},UR=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,N0.length):N0.length,WR=(Z,q,J,X)=>e(Z)?VR(Z,q,J,X):q.fill(Z),VR=(Z,q,J,X)=>{for(let Q of Object.keys(Z).sort(BR))for(let $ of LR(Q,J,X))q[$]=Z[Q];return q},BR=(Z,q)=>eQ(Z)<eQ(q)?1:-1,eQ=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},LR=(Z,q,J)=>{if(Z==="ipc")return[J];let X=W3(Z);if(X===void 0||X===0)throw TypeError(`"${q}.${Z}" is invalid.
8
+ It must be "${q}.stdout", "${q}.stderr", "${q}.all", "${q}.ipc", or "${q}.fd3", "${q}.fd4" (and so on).`);if(X!=="all"&&X>=J)throw TypeError(`"${q}.${Z}" is invalid: that file descriptor does not exist.
9
+ Please set the "stdio" option to ensure that file descriptor exists.`);return X==="all"?[1,2]:[X]},W3=(Z)=>{if(Z==="all")return Z;if(N0.includes(Z))return N0.indexOf(Z);let q=zR.exec(Z);if(q!==null)return Number(q.groups.fdNumber)},zR,_R=(Z,q)=>Z.map((J)=>J===void 0?MR[q]:J),RR,MR,V3,X1=(Z,q)=>q==="ipc"?Z.at(-1):Z[q];var Q1=B(()=>{Z1();J1();zR=/^fd(?<fdNumber>\d+)$/,RR=KR("execa").enabled?"full":"none",MR={lines:!1,buffer:!0,maxBuffer:1e8,verbose:RR,stripFinalNewline:!0},V3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var D2=({verbose:Z},q)=>B3(Z,q)!=="none",A2=({verbose:Z},q)=>!["none","short"].includes(B3(Z,q)),q$=({verbose:Z},q)=>{let J=B3(Z,q);return r4(J)?J:void 0},B3=(Z,q)=>q===void 0?FR(Z):X1(Z,q),FR=(Z)=>Z.find((q)=>r4(q))??t4.findLast((q)=>Z.includes(q)),r4=(Z)=>typeof Z==="function",t4;var F1=B(()=>{Q1();t4=["none","short","full"]});import{platform as DR}from"node:process";import{stripVTControlCharacters as AR}from"node:util";var J$=(Z,q)=>{let J=[Z,...q],X=J.join(" "),Q=J.map(($)=>kR(X$($))).join(" ");return{command:X,escapedCommand:Q}},T6=(Z)=>AR(Z).split(`
10
+ `).map((q)=>X$(q)).join(`
11
+ `),X$=(Z)=>Z.replaceAll(IR,(q)=>jR(q)),jR=(Z)=>{let q=OR[Z];if(q!==void 0)return q;let J=Z.codePointAt(0),X=J.toString(16);return J<=wR?`\\u${X.padStart(4,"0")}`:`\\U${X}`},TR=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},IR,OR,wR=65535,kR=(Z)=>{if(NR.test(Z))return Z;return DR==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},NR;var e4=B(()=>{IR=TR(),OR={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},NR=/^[\w\-./]+$/});import Q$ from"node:process";function L3(){let{env:Z}=Q$,{TERM:q,TERM_PROGRAM:J}=Z;if(Q$.platform!=="win32")return q!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||J==="Terminus-Sublime"||J==="vscode"||q==="xterm-256color"||q==="alacritty"||q==="rxvt-unicode"||q==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var $$=()=>{};var Y$,H$,xR,PR,ER,vR,CR,Z8,NC;var G$=B(()=>{$$();Y$={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:"╱"},H$={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:"⅒"},xR={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"},PR={...Y$,...H$},ER={...Y$,...xR},vR=L3(),CR=vR?PR:ER,Z8=CR,NC=Object.entries(H$)});import yR from"node:tty";var SR,y=(Z,q)=>{if(!SR)return(Q)=>Q;let J=`\x1B[${Z}m`,X=`\x1B[${q}m`;return(Q)=>{let $=Q+"",Y=$.indexOf(X);if(Y===-1)return J+$+X;let H=J,K=0,W=(q===22?X:"")+J;while(Y!==-1)H+=$.slice(K,Y)+W,K=Y+X.length,Y=$.indexOf(X,K);return H+=$.slice(K)+X,H}},EC,K$,vC,CC,yC,SC,bC,hC,fC,gC,mC,uC,pC,dC,cC,lC,nC,q8,iC,aC,oC,sC,rC,tC,eC,Zy,qy,U$,Jy,W$,Xy,Qy,$y,Yy,Hy,Gy,Ky,Uy,Wy,Vy,By;var V$=B(()=>{SR=yR?.WriteStream?.prototype?.hasColors?.()??!1,EC=y(0,0),K$=y(1,22),vC=y(2,22),CC=y(3,23),yC=y(4,24),SC=y(53,55),bC=y(7,27),hC=y(8,28),fC=y(9,29),gC=y(30,39),mC=y(31,39),uC=y(32,39),pC=y(33,39),dC=y(34,39),cC=y(35,39),lC=y(36,39),nC=y(37,39),q8=y(90,39),iC=y(40,49),aC=y(41,49),oC=y(42,49),sC=y(43,49),rC=y(44,49),tC=y(45,49),eC=y(46,49),Zy=y(47,49),qy=y(100,49),U$=y(91,39),Jy=y(92,39),W$=y(93,39),Xy=y(94,39),Qy=y(95,39),$y=y(96,39),Yy=y(97,39),Hy=y(101,49),Gy=y(102,49),Ky=y(103,49),Uy=y(104,49),Wy=y(105,49),Vy=y(106,49),By=y(107,49)});var B$=B(()=>{V$()});var _$=({type:Z,message:q,timestamp:J,piped:X,commandId:Q,result:{failed:$=!1}={},options:{reject:Y=!0}})=>{let H=bR(J),K=hR[Z]({failed:$,reject:Y,piped:X}),U=fR[Z]({reject:Y});return`${q8(`[${H}]`)} ${q8(`[${Q}]`)} ${U(K)} ${U(q)}`},bR=(Z)=>`${J8(Z.getHours(),2)}:${J8(Z.getMinutes(),2)}:${J8(Z.getSeconds(),2)}.${J8(Z.getMilliseconds(),3)}`,J8=(Z,q)=>String(Z).padStart(q,"0"),L$=({failed:Z,reject:q})=>{if(!Z)return Z8.tick;return q?Z8.cross:Z8.warning},hR,z$=(Z)=>Z,fR;var R$=B(()=>{G$();B$();hR={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:L$,duration:L$},fR={command:()=>K$,output:()=>z$,ipc:()=>z$,error:({reject:Z})=>Z?U$:W$,duration:()=>q8}});var M$=(Z,q,J)=>{let X=q$(q,J);return Z.map(({verboseLine:Q,verboseObject:$})=>gR(Q,$,X)).filter((Q)=>Q!==void 0).map((Q)=>mR(Q)).join("")},gR=(Z,q,J)=>{if(J===void 0)return Z;let X=J(Z,q);if(typeof X==="string")return X},mR=(Z)=>Z.endsWith(`
12
+ `)?Z:`${Z}
13
+ `;var F$=B(()=>{F1()});import{inspect as uR}from"node:util";var c0=({type:Z,verboseMessage:q,fdNumber:J,verboseInfo:X,result:Q})=>{let $=pR({type:Z,result:Q,verboseInfo:X}),Y=dR(q,$),H=M$(Y,X,J);if(H!=="")console.warn(H.slice(0,-1))},pR=({type:Z,result:q,verboseInfo:J})=>{let{escapedCommand:X,commandId:Q,rawOptions:$}=J,{piped:Y=!1,...H}=$;return{type:Z,escapedCommand:X,commandId:`${Q}`,timestamp:new Date,piped:Y,result:q,options:H}},dR=(Z,q)=>Z.split(`
14
+ `).map((J)=>cR({...q,message:J})),cR=(Z)=>{return{verboseLine:_$(Z),verboseObject:Z}},X8=(Z)=>{let q=typeof Z==="string"?Z:uR(Z);return T6(q).replaceAll("\t",()=>" ".repeat(lR))},lR=2;var j2=B(()=>{e4();R$();F$()});var D$=(Z,q)=>{if(!D2(q))return;c0({type:"command",verboseMessage:Z,verboseInfo:q})};var A$=B(()=>{F1();j2()});var j$=(Z,q,J)=>{aR(Z);let X=nR(Z);return{verbose:Z,escapedCommand:q,commandId:X,rawOptions:J}},nR=(Z)=>D2({verbose:Z})?iR++:void 0,iR=0n,aR=(Z)=>{for(let q of Z){if(q===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(q===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!t4.includes(q)&&!r4(q)){let J=t4.map((X)=>`'${X}'`).join(", ");throw TypeError(`The "verbose" option must not be ${q}. Allowed values are: ${J} or a function.`)}}};var T$=B(()=>{F1()});import{hrtime as I$}from"node:process";var Q8=()=>I$.bigint(),z3=(Z)=>Number(I$.bigint()-Z)/1e6;var $8=()=>{};var Y8=(Z,q,J)=>{let X=Q8(),{command:Q,escapedCommand:$}=J$(Z,q),Y=U3(J,"verbose"),H=j$(Y,$,{...J});return D$($,H),{command:Q,escapedCommand:$,startTime:X,verboseInfo:H}};var _3=B(()=>{A$();T$();$8();e4();Q1()});function H8(Z={}){let{env:q=process.env,platform:J=process.platform}=Z;if(J!=="win32")return"PATH";return Object.keys(q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"}var O$=()=>{};var w$=()=>{};import{promisify as oR}from"node:util";import{execFile as sR,execFileSync as ly}from"node:child_process";import k$ from"node:path";import{fileURLToPath as rR}from"node:url";function G8(Z){return Z instanceof URL?rR(Z):Z}function N$(Z){return{*[Symbol.iterator](){let q=k$.resolve(G8(Z)),J;while(J!==q)yield q,J=q,q=k$.resolve(q,"..")}}}var ay;var x$=B(()=>{w$();ay=oR(sR)});import K8 from"node:process";import y1 from"node:path";var tR=({cwd:Z=K8.cwd(),path:q=K8.env[H8()],preferLocal:J=!0,execPath:X=K8.execPath,addExecPath:Q=!0}={})=>{let $=y1.resolve(G8(Z)),Y=[],H=q.split(y1.delimiter);if(J)eR(Y,H,$);if(Q)ZM(Y,H,X,$);return q===""||q===y1.delimiter?`${Y.join(y1.delimiter)}${q}`:[...Y,q].join(y1.delimiter)},eR=(Z,q,J)=>{for(let X of N$(J)){let Q=y1.join(X,"node_modules/.bin");if(!q.includes(Q))Z.push(Q)}},ZM=(Z,q,J,X)=>{let Q=y1.resolve(X,G8(J),"..");if(!q.includes(Q))Z.push(Q)},P$=({env:Z=K8.env,...q}={})=>{Z={...Z};let J=H8({env:Z});return q.path=Z[J],Z[J]=tR(q),Z};var E$=B(()=>{O$();x$()});var v$=(Z,q,J)=>{let X=J?W8:U8,Q=Z instanceof l0?{}:{cause:Z};return new X(q,Q)},l0,C$=(Z,q)=>{Object.defineProperties(Z.prototype,{name:{value:q,writable:!0,enumerable:!1,configurable:!0},[S$]:{value:!0,writable:!1,enumerable:!1,configurable:!1}})},y$=(Z)=>V8(Z)&&(S$ in Z),S$,V8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",U8,W8;var S1=B(()=>{l0=class l0 extends Error{};S$=Symbol("isExecaError");U8=class U8 extends Error{};C$(U8,U8.name);W8=class W8 extends Error{};C$(W8,W8.name)});var b$=()=>{let Z=R3-h$+1;return Array.from({length:Z},qM)},qM=(Z,q)=>({name:`SIGRT${q+1}`,number:h$+q,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),h$=34,R3=64;var M3=()=>{};var f$;var g$=B(()=>{f$=[{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 JM}from"node:os";var F3=()=>{let Z=b$();return[...f$,...Z].map(XM)},XM=({name:Z,number:q,description:J,action:X,forced:Q=!1,standard:$})=>{let{signals:{[Z]:Y}}=JM,H=Y!==void 0;return{name:Z,number:H?Y:q,description:J,supported:H,action:X,forced:Q,standard:$}};var m$=B(()=>{g$();M3()});import{constants as QM}from"node:os";var $M=()=>{let Z=F3();return Object.fromEntries(Z.map(YM))},YM=({name:Z,number:q,description:J,supported:X,action:Q,forced:$,standard:Y})=>[Z,{name:Z,number:q,description:J,supported:X,action:Q,forced:$,standard:Y}],u$,HM=()=>{let Z=F3(),q=R3+1,J=Array.from({length:q},(X,Q)=>GM(Q,Z));return Object.assign({},...J)},GM=(Z,q)=>{let J=KM(Z,q);if(J===void 0)return{};let{name:X,description:Q,supported:$,action:Y,forced:H,standard:K}=J;return{[Z]:{name:X,number:Z,description:Q,supported:$,action:Y,forced:H,standard:K}}},KM=(Z,q)=>{let J=q.find(({name:X})=>QM.signals[X]===Z);if(J!==void 0)return J;return q.find((X)=>X.number===Z)},VS;var p$=B(()=>{M3();m$();u$=$M(),VS=HM()});import{constants as I6}from"node:os";var c$=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return n$(Z,"option `killSignal`")},l$=(Z)=>Z===0?Z:n$(Z,"`subprocess.kill()`'s argument"),n$=(Z,q)=>{if(Number.isInteger(Z))return UM(Z,q);if(typeof Z==="string")return VM(Z,q);throw TypeError(`Invalid ${q} ${String(Z)}: it must be a string or an integer.
15
+ ${D3()}`)},UM=(Z,q)=>{if(d$.has(Z))return d$.get(Z);throw TypeError(`Invalid ${q} ${Z}: this signal integer does not exist.
16
+ ${D3()}`)},WM=()=>new Map(Object.entries(I6.signals).reverse().map(([Z,q])=>[q,Z])),d$,VM=(Z,q)=>{if(Z in I6.signals)return Z;if(Z.toUpperCase()in I6.signals)throw TypeError(`Invalid ${q} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${q} '${Z}': this signal name does not exist.
17
+ ${D3()}`)},D3=()=>`Available signal names: ${BM()}.
18
+ Available signal numbers: ${LM()}.`,BM=()=>Object.keys(I6.signals).sort().map((Z)=>`'${Z}'`).join(", "),LM=()=>[...new Set(Object.values(I6.signals).sort((Z,q)=>Z-q))].join(", "),B8=(Z)=>u$[Z].description;var O6=B(()=>{p$();d$=WM()});import{setTimeout as zM}from"node:timers/promises";var i$=(Z)=>{if(Z===!1)return Z;if(Z===!0)return _M;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},_M=5000,a$=({kill:Z,options:{forceKillAfterDelay:q,killSignal:J},onInternalError:X,context:Q,controller:$},Y,H)=>{let{signal:K,error:U}=RM(Y,H,J);MM(U,X);let W=Z(K);return FM({kill:Z,signal:K,forceKillAfterDelay:q,killSignal:J,killResult:W,context:Q,controller:$}),W},RM=(Z,q,J)=>{let[X=J,Q]=V8(Z)?[void 0,Z]:[Z,q];if(typeof X!=="string"&&!Number.isInteger(X))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(X)}`);if(Q!==void 0&&!V8(Q))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${Q}`);return{signal:l$(X),error:Q}},MM=(Z,q)=>{if(Z!==void 0)q.reject(Z)},FM=async({kill:Z,signal:q,forceKillAfterDelay:J,killSignal:X,killResult:Q,context:$,controller:Y})=>{if(q===X&&Q)A3({kill:Z,forceKillAfterDelay:J,context:$,controllerSignal:Y.signal})},A3=async({kill:Z,forceKillAfterDelay:q,context:J,controllerSignal:X})=>{if(q===!1)return;try{if(await zM(q,void 0,{signal:X}),Z("SIGKILL"))J.isForcefullyTerminated??=!0}catch{}};var L8=B(()=>{S1();O6()});import{once as DM}from"node:events";var z8=async(Z,q)=>{if(!Z.aborted)await DM(Z,"abort",{signal:q})};var j3=()=>{};var o$=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},s$=({kill:Z,cancelSignal:q,gracefulCancel:J,context:X,controller:Q})=>q===void 0||J?[]:[AM(Z,q,X,Q)],AM=async(Z,q,J,{signal:X})=>{throw await z8(q,X),J.terminationReason??="cancel",Z(),q.reason};var T3=B(()=>{j3()});var T2=({methodName:Z,isSubprocess:q,ipc:J,isConnected:X})=>{jM(Z,q,J),I3(Z,q,X)},jM=(Z,q,J)=>{if(!J)throw Error(`${h0(Z,q)} can only be used if the \`ipc\` option is \`true\`.`)},I3=(Z,q,J)=>{if(!J)throw Error(`${h0(Z,q)} cannot be used: the ${D1(q)} has already exited or disconnected.`)},r$=(Z)=>{throw Error(`${h0("getOneMessage",Z)} could not complete: the ${D1(Z)} exited or disconnected.`)},t$=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} is sending a message too, instead of listening to incoming messages.
19
+ This can be fixed by both sending a message and listening to incoming messages at the same time:
20
+
21
+ const [receivedMessage] = await Promise.all([
22
+ ${h0("getOneMessage",Z)},
23
+ ${h0("sendMessage",Z,"message, {strict: true}")},
24
+ ]);`)},_8=(Z,q)=>Error(`${h0("sendMessage",q)} failed when sending an acknowledgment response to the ${D1(q)}.`,{cause:Z}),e$=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} is not listening to incoming messages.`)},Z9=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} exited without listening to incoming messages.`)},q9=()=>Error(`\`cancelSignal\` aborted: the ${D1(!0)} disconnected.`),J9=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},X9=({error:Z,methodName:q,isSubprocess:J})=>{if(Z.code==="EPIPE")throw Error(`${h0(q,J)} cannot be used: the ${D1(J)} is disconnecting.`,{cause:Z})},Q9=({error:Z,methodName:q,isSubprocess:J,message:X})=>{if(TM(Z))throw Error(`${h0(q,J)}'s argument type is invalid: the message cannot be serialized: ${String(X)}.`,{cause:Z})},TM=({code:Z,message:q})=>IM.has(Z)||OM.some((J)=>q.includes(J)),IM,OM,h0=(Z,q,J="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${wM(q)}${Z}(${J})`,wM=(Z)=>Z?"":"subprocess.",D1=(Z)=>Z?"parent process":"subprocess",I2=(Z)=>{if(Z.connected)Z.disconnect()};var O2=B(()=>{IM=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),OM=["could not be cloned","circular structure","call stack size exceeded"]});var n0=()=>{let Z={},q=new Promise((J,X)=>{Object.assign(Z,{resolve:J,reject:X})});return Object.assign(q,Z)};var w2=()=>{};import{addAbortListener as kM}from"node:events";var b1=(Z,q,J)=>{let X=Z.getMaxListeners();if(X===0||X===1/0)return;Z.setMaxListeners(X+q),kM(J,()=>{Z.setMaxListeners(Z.getMaxListeners()-q)})};var R8=()=>{};var M8=(Z,q)=>{if(q)O3(Z)},O3=(Z)=>{Z.refCounted()},F8=(Z,q)=>{if(q)w3(Z)},w3=(Z)=>{Z.unrefCounted()},$9=(Z,q)=>{if(!q)return;w3(Z),w3(Z)},Y9=(Z,q)=>{if(!q)return;O3(Z),O3(Z)};var w6=()=>{};import{once as NM}from"node:events";import{scheduler as xM}from"node:timers/promises";var H9=async({anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X},Q)=>{if(W9(Q)||B9(Q))return;if(!D8.has(Z))D8.set(Z,[]);let $=D8.get(Z);if($.push(Q),$.length>1)return;while($.length>0){await V9(Z,X,Q),await xM.yield();let Y=await U9({wrappedMessage:$[0],anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X});$.shift(),X.emit("message",Y),X.emit("message:done")}},G9=async({anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X,boundOnMessage:Q})=>{k3();let $=D8.get(Z);while($?.length>0)await NM(X,"message:done");Z.removeListener("message",Q),Y9(q,J),X.connected=!1,X.emit("disconnect")},D8;var K9=B(()=>{k6();w6();A8();j8();D8=new WeakMap});import{EventEmitter as PM}from"node:events";var A1=(Z,q,J)=>{if(T8.has(Z))return T8.get(Z);let X=new PM;return X.connected=!0,T8.set(Z,X),EM({ipcEmitter:X,anyProcess:Z,channel:q,isSubprocess:J}),X},T8,EM=({ipcEmitter:Z,anyProcess:q,channel:J,isSubprocess:X})=>{let Q=H9.bind(void 0,{anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Z});q.on("message",Q),q.once("disconnect",G9.bind(void 0,{anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Z,boundOnMessage:Q})),$9(J,X)},I8=(Z)=>{let q=T8.get(Z);return q===void 0?Z.channel!==void 0&&Z.channel!==null:q.connected};var N6=B(()=>{K9();w6();T8=new WeakMap});import{once as vM}from"node:events";var L9=({anyProcess:Z,channel:q,isSubprocess:J,message:X,strict:Q})=>{if(!Q)return X;let $=A1(Z,q,J),Y=k8(Z,$);return{id:CM++,type:w8,message:X,hasListeners:Y}},CM=0n,z9=(Z,q)=>{if(q?.type!==w8||q.hasListeners)return;for(let{id:J}of Z)if(J!==void 0)O8[J].resolve({isDeadlock:!0,hasListeners:!1})},U9=async({wrappedMessage:Z,anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Q})=>{if(Z?.type!==w8||!q.connected)return Z;let{id:$,message:Y}=Z,H={id:$,type:R9,message:k8(q,Q)};try{await k2({anyProcess:q,channel:J,isSubprocess:X,ipc:!0},H)}catch(K){Q.emit("strict:error",K)}return Y},W9=(Z)=>{if(Z?.type!==R9)return!1;let{id:q,message:J}=Z;return O8[q]?.resolve({isDeadlock:!1,hasListeners:J}),!0},_9=async(Z,q,J)=>{if(Z?.type!==w8)return;let X=n0();O8[Z.id]=X;let Q=new AbortController;try{let{isDeadlock:$,hasListeners:Y}=await Promise.race([X,yM(q,J,Q)]);if($)t$(J);if(!Y)e$(J)}finally{Q.abort(),delete O8[Z.id]}},O8,yM=async(Z,q,{signal:J})=>{b1(Z,1,J),await vM(Z,"disconnect",{signal:J}),Z9(q)},w8="execa:ipc:request",R9="execa:ipc:response";var A8=B(()=>{w2();R8();x6();O2();N6();k6();O8={}});var F9=(Z,q,J)=>{if(!P6.has(Z))P6.set(Z,new Set);let X=P6.get(Z),Q=n0(),$=J?q.id:void 0,Y={onMessageSent:Q,id:$};return X.add(Y),{outgoingMessages:X,outgoingMessage:Y}},D9=({outgoingMessages:Z,outgoingMessage:q})=>{Z.delete(q),q.onMessageSent.resolve()},V9=async(Z,q,J)=>{while(!k8(Z,q)&&P6.get(Z)?.size>0){let X=[...P6.get(Z)];z9(X,J),await Promise.all(X.map(({onMessageSent:Q})=>Q))}},P6,A9,j9=(Z,q)=>{A9.set(Z,q)},k8=(Z,q)=>q.listenerCount("message")>SM(Z),SM=(Z)=>M9(Z)!==void 0&&!X1(M9(Z).buffer,"ipc")?1:0,M9=(Z)=>A9.get(Z);var k6=B(()=>{w2();Q1();A8();P6=new WeakMap,A9=new WeakMap});import{promisify as bM}from"node:util";var k2=({anyProcess:Z,channel:q,isSubprocess:J,ipc:X},Q,{strict:$=!1}={})=>{return T2({methodName:"sendMessage",isSubprocess:J,ipc:X,isConnected:Z.connected}),hM({anyProcess:Z,channel:q,methodName:"sendMessage",isSubprocess:J,message:Q,strict:$})},hM=async({anyProcess:Z,channel:q,methodName:J,isSubprocess:X,message:Q,strict:$})=>{let Y=L9({anyProcess:Z,channel:q,isSubprocess:X,message:Q,strict:$}),H=F9(Z,Y,$);try{await x3({anyProcess:Z,methodName:J,isSubprocess:X,wrappedMessage:Y,message:Q})}catch(K){throw I2(Z),K}finally{D9(H)}},x3=async({anyProcess:Z,methodName:q,isSubprocess:J,wrappedMessage:X,message:Q})=>{let $=fM(Z);try{await Promise.all([_9(X,Z,J),$(X)])}catch(Y){throw X9({error:Y,methodName:q,isSubprocess:J}),Q9({error:Y,methodName:q,isSubprocess:J,message:Q}),Y}},fM=(Z)=>{if(N3.has(Z))return N3.get(Z);let q=bM(Z.send.bind(Z));return N3.set(Z,q),q},N3;var x6=B(()=>{O2();k6();A8();N3=new WeakMap});import{scheduler as gM}from"node:timers/promises";var I9=(Z,q)=>{return I3("cancelSignal",!1,Z.connected),x3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:w9,message:q},message:q})},O9=async({anyProcess:Z,channel:q,isSubprocess:J,ipc:X})=>{return await mM({anyProcess:Z,channel:q,isSubprocess:J,ipc:X}),P3.signal},mM=async({anyProcess:Z,channel:q,isSubprocess:J,ipc:X})=>{if(T9)return;if(T9=!0,!X){J9();return}if(q===null){k3();return}A1(Z,q,J),await gM.yield()},T9=!1,B9=(Z)=>{if(Z?.type!==w9)return!1;return P3.abort(Z.message),!0},w9="execa:ipc:cancel",k3=()=>{P3.abort(q9())},P3;var j8=B(()=>{x6();N6();O2();P3=new AbortController});var k9=({gracefulCancel:Z,cancelSignal:q,ipc:J,serialization:X})=>{if(!Z)return;if(q===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(X==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},N9=({subprocess:Z,kill:q,cancelSignal:J,gracefulCancel:X,forceKillAfterDelay:Q,context:$,controller:Y})=>X?[uM({subprocess:Z,kill:q,cancelSignal:J,forceKillAfterDelay:Q,context:$,controller:Y})]:[],uM=async({subprocess:Z,kill:q,cancelSignal:J,forceKillAfterDelay:X,context:Q,controller:{signal:$}})=>{await z8(J,$);let Y=pM(J);throw await I9(Z,Y),A3({kill:q,forceKillAfterDelay:X,context:Q,controllerSignal:$}),Q.terminationReason??="gracefulCancel",J.reason},pM=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let q=Error(Z.message);return Object.defineProperty(q,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),q};var E3=B(()=>{j3();j8();L8()});import{setTimeout as dM}from"node:timers/promises";var x9=({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})`)},P9=(Z,q,J,X)=>q===0||q===void 0?[]:[cM(Z,q,J,X)],cM=async(Z,q,J,{signal:X})=>{throw await dM(q,void 0,{signal:X}),J.terminationReason??="timeout",Z(),new l0};var v3=B(()=>{S1()});import{execPath as lM,execArgv as nM}from"node:process";import E9 from"node:path";var v9=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},C9=(Z,q,{node:J=!1,nodePath:X=lM,nodeOptions:Q=nM.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=M2(X,'The "nodePath" option'),U=E9.resolve($,K),W={__proto__:null,shell:!1,...H,nodePath:U,node:J,cwd:$};if(!J)return[Z,q,W];if(E9.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[U,[...Q,Z,...q],{__proto__:null,ipc:!0,...W,shell:!1}]};var C3=B(()=>{F2()});import{serialize as iM}from"node:v8";var y9=({ipcInput:Z,ipc:q,serialization:J})=>{if(Z===void 0)return;if(!q)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");sM[J](Z)},aM=(Z)=>{try{iM(Z)}catch(q){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:q})}},oM=(Z)=>{try{JSON.stringify(Z)}catch(q){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:q})}},sM,S9=async(Z,q,J)=>{if(q===void 0)return;await k2({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:J},q)};var y3=B(()=>{x6();sM={advanced:aM,json:oM}});var h9=({encoding:Z})=>{if(S3.has(Z))return;let q=tM(Z);if(q!==void 0)throw TypeError(`Invalid option \`encoding: ${N8(Z)}\`.
25
+ Please rename it to ${N8(q)}.`);let J=[...S3].map((X)=>N8(X)).join(", ");throw TypeError(`Invalid option \`encoding: ${N8(Z)}\`.
26
+ Please rename it to one of: ${J}.`)},rM,T0,S3,tM=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let q=Z.toLowerCase();if(q in b9)return b9[q];if(S3.has(q))return q},b9,N8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var h1=B(()=>{rM=new Set(["utf8","utf16le"]),T0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),S3=rM.union(T0),b9={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import b3 from"node:fs";import v6 from"node:path";import E6 from"node:process";function qF(Z,q){if(typeof Z!=="string"||Z.length===0)throw TypeError("Expected a non-empty string.");let{cwd:J=E6.cwd(),path:X=E6.env.PATH??(f1?E6.env.Path:void 0)??"",pathExt:Q=E6.env.PATHEXT||ZF}=q;return{cwd:J,searchPath:X,pathExt:Q}}function JF(Z,q){let J=q.split(v6.delimiter).filter(Boolean),X=v6.extname(Z).toLowerCase();if(X!==""&&J.some((Q)=>Q.toLowerCase()===X))return["",...J];return J}function*XF(Z,{cwd:q,searchPath:J,pathExt:X}){let Q=f1?JF(Z,X):[""];if(eM.test(Z)){let Y=v6.resolve(q,Z);for(let H of Q)yield Y+H;return}let $=[...f1?[q]:[],...J.split(v6.delimiter)];for(let Y of $){let H=f1&&Y.length>1&&Y.startsWith('"')&&Y.endsWith('"')?Y.slice(1,-1):Y;if(H==="")continue;let K=v6.resolve(q,H,Z);for(let U of Q)yield K+U}}function QF(Z){let q;try{q=b3.statSync(Z)}catch(J){return f1&&J.code==="EACCES"}if(!q.isFile())return!1;if(f1)return!0;try{return b3.accessSync(Z,b3.constants.X_OK),!0}catch{return!1}}function x8(Z,q={}){let J=qF(Z,q);for(let X of XF(Z,J))if(QF(X))return X;return}var f1,eM,ZF=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC";var f9=B(()=>{f1=E6.platform==="win32",eM=f1?/[\/\\]/v:/\//v});import{openSync as $F,readSync as YF,closeSync as HF}from"node:fs";import{Buffer as GF}from"node:buffer";import N2 from"node:path";import x2 from"node:process";var u9=(Z,q,J)=>{let X={file:Z,commandArguments:[...q],options:J};if(J.shell||x2.platform!=="win32")return X;return WF(X)},KF,UF,WF=(Z)=>{let q=VF(Z);if(q!==void 0&&KF.test(q)){if(Z.options.argv0===void 0)Z.options.argv0=Z.file;return Z.file=q,Z}for(let Y of[Z.file,...Z.commandArguments])DF(Y);let J=q!==void 0&&UF.test(q),X=h3(N2.normalize(q??Z.file)),Q=Z.commandArguments.map((Y)=>TF(Y,J)),$=`"${[X,...Q].join(" ")}"`;return Z.options.windowsVerbatimArguments=!0,{file:x2.env.comspec||"cmd.exe",commandArguments:["/d","/s","/c",$],options:Z.options}},VF=(Z)=>{let q=g9(Z),J=q!==void 0&&_F(q);if(!J)return q;return Z.commandArguments.unshift(q),Z.file=J,g9(Z)},g9=(Z)=>{let q=Z.options.env||x2.env,J=Z.options.cwd??x2.cwd(),X=C6(q,"PATHEXT"),Q=N2.extname(Z.file),$=Q===""?X:`${Q}${N2.delimiter}${X??""}`;if(BF(Z.file))return x8(N2.resolve(J,Z.file),{cwd:J,pathExt:$});let Y=C6(q,"PATH")??C6(x2.env,"PATH")??"",H={cwd:J,path:Y,pathExt:$};return LF(q)?x8(Z.file,H):zF(Z.file,H)},BF=(Z)=>Z.includes("/")||Z.includes("\\")||Z.includes(":"),LF=(Z)=>C6(x2.env,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0&&C6(Z,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0,zF=(Z,{cwd:q,path:J,pathExt:X})=>{for(let Q of J.split(N2.delimiter)){let $=Q.length>1&&Q.startsWith('"')&&Q.endsWith('"')?Q.slice(1,-1):Q;if($==="")continue;let Y=x8(N2.resolve(q,$,Z),{cwd:q,pathExt:X});if(Y!==void 0)return Y}},C6=(Z,q)=>{let J=Object.keys(Z).sort().find((X)=>X.toUpperCase()===q);return J===void 0?void 0:Z[J]},m9=150,_F=(Z)=>{let q=GF.alloc(m9);try{let J=$F(Z,"r");try{YF(J,q,0,m9,0)}finally{HF(J)}}catch{return}return MF(q.toString())},RF,MF=(Z)=>{let q=Z.match(RF)?.groups.line.trim();if(!q)return;let[J,X]=q.split(" "),Q=J.split("/").at(-1);if(Q==="env")return X;return X?`${Q} ${X}`:Q},FF,DF=(Z)=>{if(FF.test(Z))throw TypeError(`The command and its arguments cannot contain a line break on Windows without a shell.
27
+ This would allow a command injection with \`cmd.exe\`.
28
+ Invalid value: ${JSON.stringify(`${Z}`)}`)},AF,h3=(Z)=>Z.replaceAll(AF,"^$&"),jF,TF=(Z,q)=>{let J=`${Z}`.replaceAll(jF,(Q,$,Y)=>{let H=Y[$+Q.length];return H==='"'||H===void 0?Q.repeat(2):Q}).replaceAll('"',"\\\""),X=h3(`"${J}"`);return q?h3(X):X};var p9=B(()=>{f9();KF=/\.(?:com|exe)$/i,UF=/\.(?:bat|cmd)$/i,RF=/^#!(?<line>.*)/,FF=/[\n\r]/,AF=/[()\][%!^"`<>&|;, *?]/g,jF=/\\+/g});import{statSync as IF}from"node:fs";import OF from"node:path";import wF from"node:process";var d9=(Z=c9())=>{let q=M2(Z,'The "cwd" option');return OF.resolve(q)},c9=()=>{try{return wF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
29
+ ${Z.message}`,Z}},l9=(Z,q)=>{if(q===c9())return Z;let J;try{J=IF(q)}catch(X){return`The "cwd" option is invalid: ${q}.
30
+ ${X.message}
31
+ ${Z}`}if(!J.isDirectory())return`The "cwd" option is not a directory: ${q}.
32
+ ${Z}`;return Z};var f3=B(()=>{F2()});import kF from"node:path";import n9 from"node:process";var NF,P8=(Z,q,J)=>{let X={__proto__:null,...J};X.cwd=d9(X.cwd);let[Q,$,Y]=C9(Z,q,X),H=Z$(Y),K=xF(H);K.env=PF(K);let{file:U,commandArguments:W}=u9(Q,$,K);if(x9(K),h9(K),y9(K),o$(K),k9(K),K.shell=Y3(K.shell),K.killSignal=c$(K.killSignal),K.forceKillAfterDelay=i$(K.forceKillAfterDelay),K.lines=K.lines.map((V,L)=>V&&!T0.has(K.encoding)&&K.buffer[L]),n9.platform==="win32"&&NF.test(kF.basename(U)))W.unshift("/q");return{file:U,commandArguments:W,options:K}},xF=({extendEnv:Z=!0,preferLocal:q=!1,cwd:J,localDir:X=J,encoding:Q="utf8",reject:$=!0,cleanup:Y=!0,killDescendants:H=!1,all:K=!1,windowsHide:U=!0,killSignal:W="SIGTERM",forceKillAfterDelay:V=!0,gracefulCancel:L=!1,ipcInput:z,ipc:_=z!==void 0||L,serialization:R="advanced",...M})=>({__proto__:null,...M,extendEnv:Z,preferLocal:q,cwd:J,localDirectory:X,encoding:Q,reject:$,cleanup:Y,killDescendants:H,all:K,windowsHide:U,killSignal:W,forceKillAfterDelay:V,gracefulCancel:L,ipcInput:z,ipc:_,serialization:R}),PF=({env:Z,extendEnv:q,preferLocal:J,node:X,localDirectory:Q,nodePath:$})=>{let Y=q?{...n9.env,...Z}:Z;if(J||X)return P$({env:Y,cwd:Q,execPath:$,preferLocal:J,addExecPath:X});return Y};var g3=B(()=>{E$();L8();O6();T3();E3();v3();C3();y3();h1();p9();f3();F2();Q1();NF=/^cmd(?:\.exe)?$/i});var E8=(Z,q,J)=>J.shell&&q.length>0?[[Z,...q].join(" "),[],J]:[Z,q,J];var m3=()=>{};function P2(Z){if(typeof Z==="string")return EF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return vF(Z)}var EF=(Z)=>Z.at(-1)===i9?Z.slice(0,Z.at(-2)===a9?-2:-1):Z,vF=(Z)=>Z.at(-1)===CF?Z.subarray(0,Z.at(-2)===yF?-2:-1):Z,i9=`
33
+ `,CF,a9="\r",yF;var u3=B(()=>{CF=i9.codePointAt(0),yF=a9.codePointAt(0)});function f0(Z,{checkOpen:q=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!q||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function p3(Z,{checkOpen:q=!0}={}){return f0(Z,{checkOpen:q})&&(Z.writable||!q)&&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 g1(Z,{checkOpen:q=!0}={}){return f0(Z,{checkOpen:q})&&(Z.readable||!q)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function d3(Z,q){return p3(Z,q)&&g1(Z,q)}var m1=()=>{};class o9{#J;#X;#q=!1;#Y=void 0;constructor(Z,q){this.#J=Z,this.#X=q}next(){let Z=()=>this.#G();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let q=()=>this.#V(Z);return this.#Y?this.#Y.then(q,q):q()}async#G(){if(this.#q)return{done:!0,value:void 0};let Z;try{Z=await this.#J.read()}catch(q){throw this.#Y=void 0,this.#q=!0,this.#J.releaseLock(),q}return Z.done&&(this.#Y=void 0,this.#q=!0,this.#J.releaseLock()),Z}async#V(Z){if(this.#q)return{done:!0,value:Z};if(this.#q=!0,!this.#X){let q=this.#J.cancel(Z);return this.#J.releaseLock(),await q,{done:!0,value:Z}}return this.#J.releaseLock(),{done:!0,value:Z}}}function s9(){return this[c3].next()}function r9(Z){return this[c3].return(Z)}function l3({preventCancel:Z=!1}={}){let q=this.getReader(),J=new o9(q,Z),X=Object.create(bF);return X[c3]=J,X}var SF,c3,bF;var t9=B(()=>{SF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);c3=Symbol();Object.defineProperty(s9,"name",{value:"next"});Object.defineProperty(r9,"name",{value:"return"});bF=Object.create(SF,{next:{enumerable:!0,configurable:!0,writable:!0,value:s9},return:{enumerable:!0,configurable:!0,writable:!0,value:r9}})});var e9=()=>{};var ZY=B(()=>{t9();e9()});var qY=(Z)=>{if(g1(Z,{checkOpen:!1})&&y6.on!==void 0)return fF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(hF.call(Z)==="[object ReadableStream]")return l3.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},hF,fF=async function*(Z){let q=new AbortController,J={};gF(Z,q,J);try{for await(let[X]of y6.on(Z,"data",{signal:q.signal}))yield X}catch(X){if(J.error!==void 0)throw J.error;else if(!q.signal.aborted)throw X}finally{Z.destroy()}},gF=async(Z,q,J)=>{try{await y6.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(X){J.error=X}finally{q.abort()}},y6;var n3=B(()=>{m1();ZY();({toString:hF}=Object.prototype),y6={}});var E2=async(Z,{init:q,convertChunk:J,getSize:X,truncateChunk:Q,addChunk:$,getFinalChunk:Y,finalize:H},{maxBuffer:K=Number.POSITIVE_INFINITY}={})=>{let U=qY(Z),W=q();W.length=0;try{for await(let V of U){let L=uF(V),z=J[L](V,W);QY({convertedChunk:z,state:W,getSize:X,truncateChunk:Q,addChunk:$,maxBuffer:K})}return mF({state:W,convertChunk:J,getSize:X,truncateChunk:Q,addChunk:$,getFinalChunk:Y,maxBuffer:K}),H(W)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(W),L}},mF=({state:Z,getSize:q,truncateChunk:J,addChunk:X,getFinalChunk:Q,maxBuffer:$})=>{let Y=Q(Z);if(Y!==void 0)QY({convertedChunk:Y,state:Z,getSize:q,truncateChunk:J,addChunk:X,maxBuffer:$})},QY=({convertedChunk:Z,state:q,getSize:J,truncateChunk:X,addChunk:Q,maxBuffer:$})=>{let Y=J(Z),H=q.length+Y;if(H<=$){JY(Z,q,Q,H);return}let K=X(Z,$-q.length);if(K!==void 0)JY(K,q,Q,$);throw new $1},JY=(Z,q,J,X)=>{q.contents=J(Z,q,X),q.length=X},uF=(Z)=>{let q=typeof Z;if(q==="string")return"string";if(q!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let J=XY.call(Z);if(J==="[object ArrayBuffer]")return"arrayBuffer";if(J==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&XY.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},XY,$1;var S6=B(()=>{n3();({toString:XY}=Object.prototype);$1=class $1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var Y1=(Z)=>Z,b6=()=>{return},v8=({contents:Z})=>Z,C8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},y8=(Z)=>Z.length;var S8=()=>{};async function b8(Z,q){return E2(Z,lF,q)}var pF=()=>({contents:[]}),dF=()=>1,cF=(Z,{contents:q})=>{return q.push(Z),q},lF;var $Y=B(()=>{S6();S8();lF={init:pF,convertChunk:{string:Y1,buffer:Y1,arrayBuffer:Y1,dataView:Y1,typedArray:Y1,others:Y1},getSize:dF,truncateChunk:b6,addChunk:cF,getFinalChunk:b6,finalize:v8}});async function h8(Z,q){return E2(Z,ZD,q)}var nF=()=>({contents:new ArrayBuffer(0)}),iF=(Z)=>aF.encode(Z),aF,YY=(Z)=>new Uint8Array(Z),HY=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),oF=(Z,q)=>Z.slice(0,q),sF=(Z,{contents:q,length:J},X)=>{let Q=UY()?tF(q,X):rF(q,X);return new Uint8Array(Q).set(Z,J),Q},rF=(Z,q)=>{if(q<=Z.byteLength)return Z;let J=new ArrayBuffer(KY(q));return new Uint8Array(J).set(new Uint8Array(Z),0),J},tF=(Z,q)=>{if(q<=Z.maxByteLength)return Z.resize(q),Z;let J=new ArrayBuffer(q,{maxByteLength:KY(q)});return new Uint8Array(J).set(new Uint8Array(Z),0),J},KY=(Z)=>GY**Math.ceil(Math.log(Z)/Math.log(GY)),GY=2,eF=({contents:Z,length:q})=>UY()?Z:Z.slice(0,q),UY=()=>("resize"in ArrayBuffer.prototype),ZD;var WY=B(()=>{S6();S8();aF=new TextEncoder,ZD={init:nF,convertChunk:{string:iF,buffer:YY,arrayBuffer:YY,dataView:HY,typedArray:HY,others:C8},getSize:y8,truncateChunk:oF,addChunk:sF,getFinalChunk:b6,finalize:eF}});async function g8(Z,q){return E2(Z,$D,q)}var qD=()=>({contents:"",textDecoder:new TextDecoder}),f8=(Z,{textDecoder:q})=>q.decode(Z,{stream:!0}),JD=(Z,{contents:q})=>q+Z,XD=(Z,q)=>Z.slice(0,q),QD=({textDecoder:Z})=>{let q=Z.decode();return q===""?void 0:q},$D;var VY=B(()=>{S6();S8();$D={init:qD,convertChunk:{string:Y1,buffer:f8,arrayBuffer:f8,dataView:f8,typedArray:f8,others:C8},getSize:y8,truncateChunk:XD,addChunk:JD,getFinalChunk:QD,finalize:v8}});var BY=B(()=>{$Y();WY();VY();S6()});import{on as YD}from"node:events";import{finished as HD}from"node:stream/promises";var m8=B(()=>{n3();BY();Object.assign(y6,{on:YD,finished:HD})});var LY=({error:Z,stream:q,readableObjectMode:J,lines:X,encoding:Q,fdNumber:$})=>{if(!(Z instanceof $1))throw Z;if($==="all")return Z;let Y=GD(J,X,Q);throw Z.maxBufferInfo={fdNumber:$,unit:Y},q.destroy(),Z},GD=(Z,q,J)=>{if(Z)return"objects";if(q)return"lines";if(J==="buffer")return"bytes";return"characters"},zY=(Z,q,J)=>{if(q.length!==J)return;let X=new $1;throw X.maxBufferInfo={fdNumber:"ipc"},X},_Y=(Z,q)=>{let{streamName:J,threshold:X,unit:Q}=KD(Z,q);return`Command's ${J} was larger than ${X} ${Q}`},KD=(Z,q)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:q[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:J,unit:X}}=Z;delete Z.maxBufferInfo;let Q=X1(q,J);if(J==="ipc")return{streamName:"IPC output",threshold:Q,unit:"messages"};return{streamName:s4(J),threshold:Q,unit:X}},RY=(Z,q,J)=>Z?.code==="ENOBUFS"&&q!==null&&q.some((X)=>X!==null&&X.length>u8(J)),MY=(Z,q,J)=>{if(!q)return Z;let X=u8(J);return Z.length>X?Z.slice(0,X):Z},u8=([,Z])=>Z;var u1=B(()=>{m8();J1();Q1()});import{inspect as UD}from"node:util";var DY=({stdio:Z,all:q,ipcOutput:J,originalError:X,signal:Q,signalDescription:$,exitCode:Y,escapedCommand:H,timedOut:K,isCanceled:U,isGracefullyCanceled:W,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_,maxBuffer:R,timeout:M,cwd:F})=>{let k=X?.code,D=WD({originalError:X,timedOut:K,timeout:M,isMaxBuffer:V,maxBuffer:R,errorCode:k,signal:Q,signalDescription:$,exitCode:Y,isCanceled:U,isGracefullyCanceled:W,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_}),O=BD(X,F),j=O===void 0?"":`
34
+ ${O}`,T=`${D}: ${H}${j}`,A=q===void 0?[Z[2],Z[1]]:[q],b=[T,...A,...Z.slice(3),J.map((w)=>LD(w)).join(`
35
+ `)].map((w)=>T6(P2(zD(w)))).filter(Boolean).join(`
36
+
37
+ `);return{originalMessage:O,shortMessage:T,message:b}},WD=({originalError:Z,timedOut:q,timeout:J,isMaxBuffer:X,maxBuffer:Q,errorCode:$,signal:Y,signalDescription:H,exitCode:K,isCanceled:U,isGracefullyCanceled:W,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:z})=>{let _=VD(V,L);if(q)return`Command timed out after ${J} milliseconds${_}`;if(W){if(Y===void 0)return`Command was gracefully canceled with exit code ${K}`;return V?`Command was gracefully canceled${_}`:`Command was gracefully canceled with ${Y} (${H})`}if(U)return`Command was canceled${_}`;if(X)return`${_Y(Z,Q)}${_}`;if($!==void 0)return`Command failed with ${$}${_}`;if(V)return`Command was killed with ${z} (${B8(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"},VD=(Z,q)=>Z?` and was forcefully terminated after ${q} milliseconds`:"",BD=(Z,q)=>{if(Z instanceof l0)return;let J=y$(Z)?Z.originalMessage:String(Z?.message??Z),X=T6(l9(J,q));return X===""?void 0:X},LD=(Z)=>typeof Z==="string"?Z:UD(Z),zD=(Z)=>Array.isArray(Z)?Z.map((q)=>P2(FY(q))).filter(Boolean).join(`
38
+ `):FY(Z),FY=(Z)=>{if(typeof Z==="string")return Z;if(q0(Z))return a4(Z);return""};var AY=B(()=>{u3();j0();f3();e4();u1();O6();S1()});var p8=({command:Z,escapedCommand:q,stdio:J,all:X,ipcOutput:Q,options:{cwd:$},startTime:Y})=>jY({command:Z,escapedCommand:q,cwd:$,durationMs:z3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:J[1],stderr:J[2],all:X,stdio:J,ipcOutput:Q,pipedFrom:[]}),v2=({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,isSync:Y})=>h6({error:Z,command:q,escapedCommand:J,startTime:$,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:X.length}),ipcOutput:[],options:Q,isSync:Y}),h6=({error:Z,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:U,signal:W,stdio:V,all:L,ipcOutput:z,options:{timeoutDuration:_,timeout:R=_,forceKillAfterDelay:M,killSignal:F,cwd:k,maxBuffer:D},isSync:O})=>{let{exitCode:j,signal:T,signalDescription:A}=RD(U,W),{originalMessage:b,shortMessage:w,message:x}=DY({stdio:V,all:L,ipcOutput:z,originalError:Z,signal:T,signalDescription:A,exitCode:j,escapedCommand:J,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,forceKillAfterDelay:M,killSignal:F,maxBuffer:D,timeout:R,cwd:k}),E=v$(Z,x,O);return Object.assign(E,_D({error:E,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:j,signal:T,signalDescription:A,stdio:V,all:L,ipcOutput:z,cwd:k,originalMessage:b,shortMessage:w})),E},_D=({error:Z,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:U,signal:W,signalDescription:V,stdio:L,all:z,ipcOutput:_,cwd:R,originalMessage:M,shortMessage:F})=>jY({shortMessage:F,originalMessage:M,command:q,escapedCommand:J,cwd:R,durationMs:z3(X),failed:!0,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isTerminated:W!==void 0,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:U,signal:W,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:z,stdio:L,ipcOutput:_,pipedFrom:[]}),jY=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,q])=>q!==void 0)),RD=(Z,q)=>{let J=Z===null?void 0:Z,X=q===null?void 0:q,Q=X===void 0?void 0:B8(q);return{exitCode:J,signal:X,signalDescription:Q}};var f6=B(()=>{O6();$8();S1();AY()});function MD(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(TY(Z*1000)%1000),nanoseconds:Math.trunc(TY(Z*1e6)%1000)}}function FD(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 i3(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return MD(Z);break}case"bigint":return FD(Z)}throw TypeError("Expected a finite number or bigint")}var TY=(Z)=>Number.isFinite(Z)?Z:0;var IY=()=>{};function a3(Z,q){let J=typeof Z==="bigint";if(!J&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");q={...q};let X=Z<0?"-":"";if(Z=Z<0?-Z:Z,q.colonNotation)q.compact=!1,q.formatSubMilliseconds=!1,q.separateMilliseconds=!1,q.verbose=!1;if(q.compact)q.unitCount=1,q.secondsDecimalDigits=0,q.millisecondsDecimalDigits=0;let Q=[],$=(W,V)=>{let L=Math.floor(W*10**V+jD);return(Math.round(L)/10**V).toFixed(V)},Y=(W,V,L,z)=>{if((Q.length===0||!q.colonNotation)&&DD(W)&&!(q.colonNotation&&L==="m"))return;if(z??=String(W),q.colonNotation){let _=z.includes(".")?z.split(".")[0].length:z.length,R=Q.length>0?2:1;z="0".repeat(Math.max(0,R-_))+z}else z+=q.verbose?" "+AD(V,W):L;Q.push(z)},H=i3(Z),K=BigInt(H.days);if(q.hideYearAndDays)Y(BigInt(K)*24n+BigInt(H.hours),"hour","h");else{if(q.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"),!q.hideSeconds)if(q.separateMilliseconds||q.formatSubMilliseconds||!q.colonNotation&&Z<1000&&!q.subSecondsAsDecimals){let W=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),z=Number(H.nanoseconds);if(Y(W,"second","s"),q.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(z,"nanosecond","ns");else{let _=V+L/1000+z/1e6,R=typeof q.millisecondsDecimalDigits==="number"?q.millisecondsDecimalDigits:0,M=_>=1?Math.round(_):Math.ceil(_),F=R?_.toFixed(R):M;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let W=(J?Number(Z%TD):Z)/1000%60,V=typeof q.secondsDecimalDigits==="number"?q.secondsDecimalDigits:1,L=$(W,V),z=q.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(z),"second","s",z)}if(Q.length===0)return X+"0"+(q.verbose?" milliseconds":"ms");let U=q.colonNotation?":":" ";if(typeof q.unitCount==="number")Q=Q.slice(0,Math.max(q.unitCount,1));return X+Q.join(U)}var DD=(Z)=>Z===0||Z===0n,AD=(Z,q)=>q===1||q===1n?Z:`${Z}s`,jD=0.0000001,TD;var OY=B(()=>{IY();TD=24n*60n*60n*1000n});var wY=(Z,q)=>{if(Z.failed)c0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:q,result:Z})};var kY=B(()=>{j2()});var NY=(Z,q)=>{if(!D2(q))return;wY(Z,q),ID(Z,q)},ID=(Z,q)=>{let J=`(done in ${a3(Z.durationMs)})`;c0({type:"duration",verboseMessage:J,verboseInfo:q,result:Z})};var xY=B(()=>{OY();F1();j2();kY()});var C2=(Z,q,{reject:J})=>{if(NY(Z,q),Z.failed&&J)throw Z;return Z};var d8=B(()=>{xY()});var o3=(Z,q)=>{if(p1(Z))return"asyncGenerator";if(yY(Z))return"generator";if(c8(Z))return"fileUrl";if(xD(Z))return"filePath";if(CD(Z))return"webStream";if(f0(Z,{checkOpen:!1}))return"native";if(q0(Z))return"uint8Array";if(yD(Z))return"asyncIterable";if(SD(Z))return"iterable";if(r3(Z))return vY({transform:Z},q);if(ND(Z))return OD(Z,q);return"native"},OD=(Z,q)=>{if(d3(Z.transform,{checkOpen:!1}))return wD(Z,q);if(r3(Z.transform))return vY(Z,q);return kD(Z,q)},wD=(Z,q)=>{return CY(Z,q,"Duplex stream"),"duplex"},vY=(Z,q)=>{return CY(Z,q,"web TransformStream"),"webTransform"},CY=({final:Z,binary:q,objectMode:J},X,Q)=>{PY(Z,`${X}.final`,Q),PY(q,`${X}.binary`,Q),g6(J,`${X}.objectMode`)},PY=(Z,q,J)=>{if(Z!==void 0)throw TypeError(`The \`${q}\` option can only be defined when using a generator, not a ${J}.`)},kD=({transform:Z,final:q,binary:J,objectMode:X},Q)=>{if(Z!==void 0&&!EY(Z))throw TypeError(`The \`${Q}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(d3(q,{checkOpen:!1}))throw TypeError(`The \`${Q}.final\` option must not be a Duplex stream.`);if(r3(q))throw TypeError(`The \`${Q}.final\` option must not be a web TransformStream.`);if(q!==void 0&&!EY(q))throw TypeError(`The \`${Q}.final\` option must be a generator.`);return g6(J,`${Q}.binary`),g6(X,`${Q}.objectMode`),p1(Z)||p1(q)?"asyncGenerator":"generator"},g6=(Z,q)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${q}\` option must use a boolean.`)},EY=(Z)=>p1(Z)||yY(Z),p1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",yY=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",ND=(Z)=>e(Z)&&(Z.transform!==void 0||Z.final!==void 0),c8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",SY=(Z)=>c8(Z)&&Z.protocol!=="file:",xD=(Z)=>e(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((q)=>PD.has(q))&&s3(Z.file),PD,s3=(Z)=>typeof Z==="string",m6=(Z)=>e(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((q)=>ED.has(q))&&("value"in Z),ED,bY=(Z,q)=>Z==="native"&&typeof q==="string"&&!vD.has(q),vD,hY=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",l8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",CD=(Z)=>hY(Z)||l8(Z),r3=(Z)=>hY(Z?.readable)&&l8(Z?.writable),yD=(Z)=>fY(Z)&&typeof Z[Symbol.asyncIterator]==="function",SD=(Z)=>fY(Z)&&typeof Z[Symbol.iterator]==="function",fY=(Z)=>typeof Z==="object"&&Z!==null,x0,n8,t3,gY,mY,j1;var L0=B(()=>{m1();Z1();j0();PD=new Set(["file","append"]),ED=new Set(["value","input"]),vD=new Set(["ipc","ignore","inherit","overlapped","pipe"]),x0=new Set(["generator","asyncGenerator","duplex","webTransform"]),n8=new Set(["fileUrl","filePath","fileNumber"]),t3=new Set(["fileUrl","filePath"]),gY=new Set([...t3,"webStream","nodeStream"]),mY=new Set(["webTransform","duplex"]),j1={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 e3=(Z,q,J,X)=>X==="output"?bD(Z,q,J):hD(Z,q,J),bD=(Z,q,J)=>{let X=q!==0&&J[q-1].value.readableObjectMode;return{writableObjectMode:X,readableObjectMode:Z??X}},hD=(Z,q,J)=>{let X=q===0?Z===!0:J[q-1].value.readableObjectMode,Q=q!==J.length-1&&(Z??X);return{writableObjectMode:X,readableObjectMode:Q}},uY=(Z,q)=>{let J=Z.findLast(({type:X})=>x0.has(X));if(J===void 0)return!1;return q==="input"?J.value.writableObjectMode:J.value.readableObjectMode};var ZZ=B(()=>{L0()});var pY=(Z,q,J,X)=>[...Z.filter(({type:Q})=>!x0.has(Q)),...fD(Z,q,J,X)],fD=(Z,q,J,{encoding:X})=>{let Q=Z.filter(({type:Y})=>x0.has(Y)),$=Array.from({length:Q.length});for(let[Y,H]of Object.entries(Q))$[Y]=gD({stdioItem:H,index:Number(Y),newTransforms:$,optionName:q,direction:J,encoding:X});return dD($,J)},gD=({stdioItem:Z,stdioItem:{type:q},index:J,newTransforms:X,optionName:Q,direction:$,encoding:Y})=>{if(q==="duplex")return mD({stdioItem:Z,optionName:Q});if(q==="webTransform")return uD({stdioItem:Z,index:J,newTransforms:X,direction:$});return pD({stdioItem:Z,index:J,newTransforms:X,direction:$,encoding:Y})},mD=({stdioItem:Z,optionName:q})=>{let{value:J}=Z,{transform:X}=J,{writableObjectMode:Q,readableObjectMode:$}=X,{objectMode:Y=$}=J;if(Y&&!$)throw TypeError(`The \`${q}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Y&&$)throw TypeError(`The \`${q}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:X,writableObjectMode:Q,readableObjectMode:$}}},uD=({stdioItem:Z,stdioItem:{value:q},index:J,newTransforms:X,direction:Q})=>{let{transform:$,objectMode:Y}=e(q)?q:{transform:q},{writableObjectMode:H,readableObjectMode:K}=e3(Y,J,X,Q);return{...Z,value:{transform:$,writableObjectMode:H,readableObjectMode:K}}},pD=({stdioItem:Z,stdioItem:{value:q},index:J,newTransforms:X,direction:Q,encoding:$})=>{let{transform:Y,final:H,binary:K=!1,preserveNewlines:U=!1,objectMode:W}=e(q)?q:{transform:q},V=K||T0.has($),{writableObjectMode:L,readableObjectMode:z}=e3(W,J,X,Q);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:U,writableObjectMode:L,readableObjectMode:z}}},dD=(Z,q)=>q==="input"?Z.reverse():Z;var dY=B(()=>{Z1();h1();L0();ZZ()});import qZ from"node:process";var cY=(Z,q,J)=>{let X=Z.map((Q)=>cD(Q,q));if(X.includes("input")&&X.includes("output"))throw TypeError(`The \`${J}\` option must not be an array of both readable and writable values.`);return X.find(Boolean)??aD},cD=(Z,q)=>nD[q]??lD(Z),lD=({type:Z,value:q,direction:J,optionName:X})=>{let Q=lY[Z](q);if(J==="input"&&Q==="output")throw TypeError(`The \`${X}\` option is invalid: \`input: true\` cannot be used with a writable value, which is always an output.`);return J??Q},nD,y2=()=>{return},JZ=()=>"input",lY,iD=(Z)=>{if([0,qZ.stdin].includes(Z))return"input";if([1,2,qZ.stdout,qZ.stderr].includes(Z))return"output"},aD="output";var nY=B(()=>{m1();L0();nD=["input","output","output"],lY={generator:y2,asyncGenerator:y2,fileUrl:y2,filePath:y2,iterable:JZ,asyncIterable:JZ,uint8Array:JZ,webStream:(Z)=>l8(Z)?"output":"input",nodeStream(Z){if(!g1(Z,{checkOpen:!1}))return"output";return p3(Z,{checkOpen:!1})?void 0:"input"},webTransform:y2,duplex:y2,native(Z){let q=iD(Z);if(q!==void 0)return q;if(f0(Z,{checkOpen:!1}))return lY.nodeStream(Z)}}});var iY=(Z,q)=>q?[...Z,"ipc"]:Z;var aY=()=>{};var rY=({stdio:Z,ipc:q,buffer:J,...X},Q,$)=>{let Y=rD(Z,X).map((H,K)=>tY(H,K));return oD(Y),$?eD(Y,J,Q):iY(Y,q)},oD=(Z)=>{if(Z.some((q)=>sD(q)))throw Error("The `ipc: true` option must be used instead of `stdio: 'ipc'`.")},sD=(Z)=>{if(Array.isArray(Z))return Z.some((q)=>oY(q));return oY(Z)},oY=(Z)=>{if(m6(Z))return Z.value==="ipc";return Z==="ipc"},rD=(Z,q)=>{if(Z===void 0)return N0.map((X)=>q[X]);if(tD(q))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${N0.map((X)=>`\`${X}\``).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,N0.length);return Array.from({length:J},(X,Q)=>Z[Q])},tD=(Z)=>N0.some((q)=>Z[q]!==void 0),tY=(Z,q)=>{if(Array.isArray(Z))return Z.map((J)=>tY(J,q));if(Z===null||Z===void 0)return q>=N0.length?"ignore":"pipe";return Z},eD=(Z,q,J)=>Z.map((X,Q)=>!q[Q]&&Q!==0&&!A2(J,Q)&&ZA(X,Q)?"ignore":X),ZA=(Z,q)=>sY(Z,q)||Array.isArray(Z)&&Z.every((J)=>sY(J,q)),sY=(Z,q)=>Z==="pipe"||qA(Z,q),qA=(Z,q)=>m6(Z)&&Z.value==="pipe"&&(Z.input===void 0||Z.input===!1||JA(q,Z.input)),JA=(Z,q)=>q===!0&&(Z===1||Z===2);var eY=B(()=>{J1();aY();F1();L0()});var a8=(Z,q="stdin")=>{let{options:X,fileDescriptors:Q}=i0.get(Z),$=ZH(Q,q,!0),Y=Z.stdio[$];if(Y===null)throw TypeError(qH($,q,X,!0));return Y},S2=(Z,q="stdout")=>{let{options:X,fileDescriptors:Q}=i0.get(Z),$=ZH(Q,q,!1),Y=$==="all"?Z.all:Z.stdio[$];if(Y===null||Y===void 0)throw TypeError(qH($,q,X,!1));return Y},i0,ZH=(Z,q,J)=>{let X=XA(q,J);return QA(X,q,J,Z),X},XA=(Z,q)=>{let J=W3(Z);if(J!==void 0)return J;let{validOptions:X,defaultValue:Q}=q?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${u6(q)}" must not be "${Z}".
39
+ It must be ${X} or "fd3", "fd4" (and so on).
40
+ It is optional and defaults to "${Q}".`)},QA=(Z,q,J,X)=>{let Q=X[JH(Z)];if(Q===void 0)throw TypeError(`"${u6(J)}" must not be ${q}. That file descriptor does not exist.
41
+ Please set the "stdio" option to ensure that file descriptor exists.`);if(Q.direction==="input"&&!J)throw TypeError(`"${u6(J)}" must not be ${q}. It must be a readable stream, not writable.`);if(Q.direction!=="input"&&J)throw TypeError(`"${u6(J)}" must not be ${q}. It must be a writable stream, not readable.
42
+ If you meant to use it as input, please set its "stdio" option to \`{value: 'pipe', input: true}\`.`)},qH=(Z,q,J,X)=>{if(Z==="all"&&!J.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:Q,optionValue:$}=$A(Z,J);return`The "${Q}: ${i8($)}" option is incompatible with using "${u6(X)}: ${i8(q)}".
43
+ Please set this option with "pipe" instead.`},$A=(Z,{stdin:q,stdout:J,stderr:X,stdio:Q})=>{let $=JH(Z);if($===0&&q!==void 0)return{optionName:"stdin",optionValue:q};if($===1&&J!==void 0)return{optionName:"stdout",optionValue:J};if($===2&&X!==void 0)return{optionName:"stderr",optionValue:X};return{optionName:`stdio[${$}]`,optionValue:Q[$]}},JH=(Z)=>Z==="all"?1:Z,u6=(Z)=>Z?"to":"from",i8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var T1=B(()=>{Q1();i0=new WeakMap});import{readFileSync as YA}from"node:fs";import HA from"node:tty";var QH=({stdioItem:Z,stdioItem:{type:q},isStdioArray:J,fdNumber:X,direction:Q,isSync:$})=>{if(!J||q!=="native")return Z;return $?GA({stdioItem:Z,fdNumber:X,direction:Q}):WA({stdioItem:Z,fdNumber:X})},GA=({stdioItem:Z,stdioItem:{value:q,optionName:J},fdNumber:X,direction:Q})=>{let $=KA({value:q,optionName:J,fdNumber:X,direction:Q});if($!==void 0)return $;if(f0(q,{checkOpen:!1}))throw TypeError(`The \`${J}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},KA=({value:Z,optionName:q,fdNumber:J,direction:X})=>{let Q=UA(Z,J);if(Q===void 0)return;if(X==="output")return{type:"fileNumber",value:Q,optionName:q};if(HA.isatty(Q))throw TypeError(`The \`${q}: ${i8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:q1(YA(Q)),optionName:q}},UA=(Z,q)=>{if(Z==="inherit")return q;if(typeof Z==="number")return Z;let J=o4.indexOf(Z);if(J!==-1)return J},WA=({stdioItem:Z,stdioItem:{value:q,optionName:J},fdNumber:X})=>{if(q==="inherit")return{type:"nodeStream",value:XH(X,q,J),optionName:J};if(typeof q==="number")return{type:"nodeStream",value:XH(q,q,J),optionName:J};if(f0(q,{checkOpen:!1}))return{type:"nodeStream",value:q,optionName:J};return Z},XH=(Z,q,J)=>{let X=o4[Z];if(X===void 0)throw TypeError(`The \`${J}: ${q}\` option is invalid: no such standard stream.`);return X};var $H=B(()=>{m1();J1();j0();T1()});var YH=({input:Z,inputFile:q},J)=>J===0?[...VA(Z),...LA(q)]:[],VA=(Z)=>Z===void 0?[]:[{type:BA(Z),value:Z,optionName:"input"}],BA=(Z)=>{if(g1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(q0(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},LA=(Z)=>Z===void 0?[]:[{...zA(Z),optionName:"inputFile"}],zA=(Z)=>{if(c8(Z))return{type:"fileUrl",value:Z};if(s3(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var HH=B(()=>{m1();j0();L0()});var GH=(Z)=>Z.filter((q,J)=>Z.every((X,Q)=>!_A(q,X)||J>=Q||q.type==="generator"||q.type==="asyncGenerator")),_A=(Z,q)=>Z.value===q.value&&Z.direction===q.direction,KH=({stdioItem:{type:Z,value:q,optionName:J},direction:X,fileDescriptors:Q,isSync:$})=>{let Y=RA(Q,Z);if(Y.length===0)return;if($){MA({otherStdioItems:Y,type:Z,value:q,optionName:J,direction:X});return}if(gY.has(Z))return UH({otherStdioItems:Y,type:Z,value:q,optionName:J,direction:X});if(mY.has(Z))DA({otherStdioItems:Y,type:Z,value:q,optionName:J})},RA=(Z,q)=>Z.flatMap(({direction:J,stdioItems:X})=>X.filter((Q)=>Q.type===q).map((Q)=>({...Q,direction:J}))),MA=({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})=>{if(t3.has(q))UH({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})},UH=({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})=>{let $=Z.filter((H)=>FA(H,J));if($.length===0)return;let Y=$.find((H)=>H.direction!==Q);return WH(Y,X,q),Q==="output"?$[0].stream:void 0},FA=({type:Z,value:q},J)=>{if(Z==="filePath")return q.file===J.file;if(Z==="fileUrl")return q.href===J.href;return q===J},DA=({otherStdioItems:Z,type:q,value:J,optionName:X})=>{let Q=Z.find(({value:{transform:$}})=>$===J.transform);WH(Q,X,q)},WH=(Z,q,J)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${q}\` options must not target ${j1[J]} that is the same.`)};var VH=B(()=>{L0()});var o8=(Z,q,J,X)=>{let $=rY(q,J,X).map((H,K)=>AA({stdioOption:H,fdNumber:K,options:q,isSync:X})),Y=vA({initialFileDescriptors:$,addProperties:Z,options:q,isSync:X});return q.stdio=Y.map(({stdioItems:H})=>SA(H)),Y},AA=({stdioOption:Z,fdNumber:q,options:J,isSync:X})=>{let Q=s4(q),{stdioItems:$,isStdioArray:Y}=jA({stdioOption:Z,fdNumber:q,options:J,optionName:Q}),H=cY($,q,Q),K=$.map((V)=>QH({stdioItem:V,isStdioArray:Y,fdNumber:q,direction:H,isSync:X})),U=pY(K,Q,H,J),W=uY(U,H);return EA(U,W),{direction:H,objectMode:W,stdioItems:U}},jA=({stdioOption:Z,fdNumber:q,options:J,optionName:X})=>{let Q=Array.isArray(Z)?Z:[Z],$=YH(J,q),Y=[...TA(Q.map((U)=>OA(U,X)),$),...$],H=GH(Y),K=H.length>1;return kA(H,K,X),xA(H),{stdioItems:H,isStdioArray:K}},TA=(Z,q)=>q.length>0&&IA(Z)?[]:Z,IA=(Z)=>Z.length===1&&Z[0].type==="native"&&Z[0].value==="inherit",OA=(Z,q)=>{if(m6(Z))return wA(Z,q);return{type:o3(Z,q),value:Z,optionName:q}},wA=({value:Z,input:q},J)=>{return g6(q,`${J}.input`),{type:o3(Z,J),value:Z,direction:q?"input":void 0,optionName:J}},kA=(Z,q,J)=>{if(Z.length===0)throw TypeError(`The \`${J}\` option must not be an empty array.`);if(!q)return;for(let{value:X,optionName:Q}of Z)if(NA.has(X))throw Error(`The \`${Q}\` option must not include \`${X}\`.`)},NA,xA=(Z)=>{for(let q of Z)PA(q)},PA=({type:Z,value:q,optionName:J})=>{if(SY(q))throw TypeError(`The \`${J}: URL\` option must use the \`file:\` scheme.
44
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(bY(Z,q))throw TypeError(`The \`${J}: { file: '...' }\` option must be used instead of \`${J}: '...'\`.`)},EA=(Z,q)=>{if(!q)return;let J=Z.find(({type:X})=>n8.has(X));if(J!==void 0)throw TypeError(`The \`${J.optionName}\` option cannot use both files and transforms in objectMode.`)},vA=({initialFileDescriptors:Z,addProperties:q,options:J,isSync:X})=>{let Q=[];try{for(let $ of Z)Q.push(CA({fileDescriptor:$,fileDescriptors:Q,addProperties:q,options:J,isSync:X}));return Q}catch($){throw XZ(Q),$}},CA=({fileDescriptor:{direction:Z,objectMode:q,stdioItems:J},fileDescriptors:X,addProperties:Q,options:$,isSync:Y})=>{let H=J.map((K)=>yA({stdioItem:K,addProperties:Q,direction:Z,options:$,fileDescriptors:X,isSync:Y}));return{direction:Z,objectMode:q,stdioItems:H}},yA=({stdioItem:Z,addProperties:q,direction:J,options:X,fileDescriptors:Q,isSync:$})=>{let Y=KH({stdioItem:Z,direction:J,fileDescriptors:Q,isSync:$});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...q[J][Z.type](Z,X)}},XZ=(Z)=>{for(let{stdioItems:q}of Z)for(let{stream:J}of q)if(J!==void 0&&!b0(J))J.destroy()},SA=(Z)=>{if(Z.length>1)return Z.some(({value:X})=>X==="overlapped")?"overlapped":"pipe";let[{type:q,value:J}]=Z;return q==="native"?J:"pipe"};var s8=B(()=>{J1();dY();ZZ();L0();nY();eY();$H();HH();VH();NA=new Set(["ignore"])});import{readFileSync as BH}from"node:fs";var zH=(Z,q)=>o8(hA,Z,q,!0),a0=({type:Z,optionName:q})=>{RH(q,j1[Z])},_H=({optionName:Z,value:q})=>{if(q==="overlapped")RH(Z,`"${q}"`);return{}},bA=(Z)=>{let{optionName:q,value:J}=Z;if(J==="pipe"&&q!=="stdin")throw TypeError(`Only the \`stdin\` option, not \`${q}\`, can be an input pipe with synchronous methods.`);return _H(Z)},RH=(Z,q)=>{throw TypeError(`The \`${Z}\` option cannot be ${q} with synchronous methods.`)},LH,hA;var MH=B(()=>{j0();s8();L0();LH={generator(){},asyncGenerator:a0,webStream:a0,nodeStream:a0,webTransform:a0,duplex:a0,asyncIterable:a0,native:_H},hA={input:{...LH,native:bA,fileUrl:({value:Z})=>({contents:[q1(BH(Z))]}),filePath:({value:{file:Z}})=>({contents:[q1(BH(Z))]}),fileNumber:a0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...LH,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:q}})=>({path:Z,append:q}),fileNumber:({value:Z})=>({path:Z}),iterable:a0,string:a0,uint8Array:a0}}});var H1=(Z,{stripFinalNewline:q},J)=>QZ(q,J)&&Z!==void 0&&!Array.isArray(Z)?P2(Z):Z,QZ=(Z,q)=>q==="all"?Z[1]||Z[2]:Z[q];var p6=B(()=>{u3()});var r8=(Z,q,J,X)=>Z||J?void 0:DH(q,X),YZ=(Z,q,J)=>J?Z.flatMap((X)=>FH(X,q)):FH(Z,q),FH=(Z,q)=>{let{transform:J,final:X}=DH(q,{});return[...J(Z),...X()]},DH=(Z,q)=>{return q.previousChunks="",{transform:fA.bind(void 0,q,Z),final:mA.bind(void 0,q)}},fA=function*(Z,q,J){if(typeof J!=="string"){yield J;return}let{previousChunks:X}=Z,Q=-1;for(let $=0;$<J.length;$+=1){if(J[$]!==`
45
+ `)continue;let Y=gA(J,$,q,Z),H=J.slice(Q+1,$+1-Y);if(X.length>0)H=$Z(X,H),X="";yield H,Q=$}if(Q!==J.length-1)X=$Z(X,J.slice(Q+1));Z.previousChunks=X},gA=(Z,q,J,X)=>{if(J)return 0;return X.isWindowsNewline=q!==0&&Z[q-1]==="\r",X.isWindowsNewline?2:1},mA=function*({previousChunks:Z}){if(Z.length>0)yield Z},AH=({binary:Z,preserveNewlines:q,readableObjectMode:J,state:X})=>Z||q||J?void 0:{transform:uA.bind(void 0,X)},uA=function*({isWindowsNewline:Z=!1},q){let{unixNewline:J,windowsNewline:X,LF:Q,concatBytes:$}=typeof q==="string"?pA:cA;if(q.at(-1)===Q){yield q;return}yield $(q,Z?X:J)},$Z=(Z,q)=>`${Z}${q}`,pA,dA=(Z,q)=>{let J=new Uint8Array(Z.length+q.length);return J.set(Z,0),J.set(q,Z.length),J},cA;var t8=B(()=>{pA={windowsNewline:`\r
46
+ `,unixNewline:`
47
+ `,LF:`
48
+ `,concatBytes:$Z},cA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:dA}});import{Buffer as lA}from"node:buffer";var jH=(Z,q)=>Z?void 0:nA.bind(void 0,q),nA=function*(Z,q){if(typeof q!=="string"&&!q0(q)&&!lA.isBuffer(q))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof q}.`);yield q},TH=(Z,q)=>Z?iA.bind(void 0,q):aA.bind(void 0,q),iA=function*(Z,q){IH(Z,q),yield q},aA=function*(Z,q){if(IH(Z,q),typeof q!=="string"&&!q0(q))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof q}.`);yield q},IH=(Z,q)=>{if(q===null||q===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${q}\`.
49
+ Instead, \`yield\` should either be called with a value, or not be called at all. For example:
50
+ if (condition) { yield value; }`)};var OH=B(()=>{j0()});import{Buffer as oA}from"node:buffer";import{StringDecoder as sA}from"node:string_decoder";var e8=(Z,q,J)=>{if(J)return;if(Z)return{transform:rA.bind(void 0,new TextEncoder)};let X=new sA(q);return{transform:tA.bind(void 0,X),final:eA.bind(void 0,X)}},rA=function*(Z,q){if(oA.isBuffer(q))yield q1(q);else if(typeof q==="string")yield Z.encode(q);else yield q},tA=function*(Z,q){yield q0(q)?Z.write(q):q},eA=function*(Z){let q=Z.end();if(q!=="")yield q};var HZ=B(()=>{j0()});import{callbackify as wH}from"node:util";var GZ,Z7=async function*(Z,q,J){if(J===q.length){yield Z;return}let{transform:X=qj}=q[J];for await(let Q of X(Z))yield*Z7(Q,q,J+1)},kH=async function*(Z){for(let[q,{final:J}]of Object.entries(Z))yield*Zj(J,Number(q),Z)},Zj=async function*(Z,q,J){if(Z===void 0)return;for await(let X of Z())yield*Z7(X,J,q+1)},NH,qj=function*(Z){yield Z};var xH=B(()=>{GZ=wH(async(Z,q,J,X)=>{q.currentIterable=Z(...J);try{for await(let Q of q.currentIterable)X.push(Q)}finally{delete q.currentIterable}}),NH=wH(async({currentIterable:Z},q)=>{if(Z!==void 0){await(q?Z.throw(q):Z.return());return}if(q)throw q})});var KZ=(Z,q,J,X)=>{try{for(let Q of Z(...q))J.push(Q);X()}catch(Q){X(Q)}},PH=(Z,q)=>[...q.flatMap((J)=>[...d1(J,Z,0)]),...d6(Z)],d1=function*(Z,q,J){if(J===q.length){yield Z;return}let{transform:X=Xj}=q[J];for(let Q of X(Z))yield*d1(Q,q,J+1)},d6=function*(Z){for(let[q,{final:J}]of Object.entries(Z))yield*Jj(J,Number(q),Z)},Jj=function*(Z,q,J){if(Z===void 0)return;for(let X of Z())yield*d1(X,J,q+1)},Xj=function*(Z){yield Z};var UZ=()=>{};import{Transform as Qj,getDefaultHighWaterMark as EH}from"node:stream";var WZ=({value:Z,value:{transform:q,final:J,writableObjectMode:X,readableObjectMode:Q},optionName:$},{encoding:Y})=>{let H={},K=vH(Z,Y,$),U=p1(q),W=p1(J),V=U?GZ.bind(void 0,Z7,H):KZ.bind(void 0,d1),L=U||W?GZ.bind(void 0,kH,H):KZ.bind(void 0,d6),z=U||W?NH.bind(void 0,H):void 0;return{stream:new Qj({writableObjectMode:X,writableHighWaterMark:EH(X),readableObjectMode:Q,readableHighWaterMark:EH(Q),transform(R,M,F){V([R,K,0],this,F)},flush(R){L([K],this,R)},destroy:z})}},q7=(Z,q,J,X)=>{let Q=q.filter(({type:Y})=>Y==="generator"),$=X?Q.reverse():Q;for(let{value:Y,optionName:H}of $){let K=vH(Y,J,H);Z=PH(K,Z)}return Z},vH=({transform:Z,final:q,binary:J,writableObjectMode:X,readableObjectMode:Q,preserveNewlines:$},Y,H)=>{let K={};return[{transform:jH(X,H)},e8(J,Y,X),r8(J,$,X,K),{transform:Z,final:q},{transform:TH(Q,H)},AH({binary:J,preserveNewlines:$,readableObjectMode:Q,state:K})].filter(Boolean)};var J7=B(()=>{L0();t8();OH();HZ();xH();UZ()});var CH=(Z,q)=>{for(let J of $j(Z))Yj(Z,J,q)},$j=(Z)=>new Set(Object.entries(Z).filter(([,{direction:q}])=>q==="input").map(([q])=>Number(q))),Yj=(Z,q,J)=>{let{stdioItems:X}=Z[q],Q=X.filter(({contents:H})=>H!==void 0);if(Q.length===0)return;if(q!==0){let[{type:H,optionName:K}]=Q;throw TypeError(`Only the \`stdin\` option, not \`${K}\`, can be ${j1[H]} with synchronous methods.`)}let Y=Q.map(({contents:H})=>H).map((H)=>Hj(H,X));J.input=j6(Y)},Hj=(Z,q)=>{let J=q7(Z,q,"utf8",!0);return Gj(J),j6(J)},Gj=(Z)=>{let q=Z.find((J)=>typeof J!=="string"&&!q0(J));if(q!==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: ${q}.`)};var yH=B(()=>{J7();j0();L0()});var X7=({stdioItems:Z,encoding:q,verboseInfo:J,fdNumber:X})=>X!=="all"&&A2(J,X)&&!T0.has(q)&&Kj(X)&&(Z.some(({type:Q,value:$})=>Q==="native"&&Uj.has($))||Z.every(({type:Q})=>x0.has(Q))),Kj=(Z)=>Z===1||Z===2,Uj,SH=async(Z,q,J,X)=>{for await(let Q of Z)if(!Wj(q))hH(Q,J,X)},bH=(Z,q,J)=>{for(let X of Z)hH(X,q,J)},Wj=(Z)=>Z._readableState.pipes.length>0,hH=(Z,q,J)=>{let X=X8(Z);c0({type:"output",verboseMessage:X,fdNumber:q,verboseInfo:J})};var VZ=B(()=>{h1();L0();j2();F1();Uj=new Set(["pipe","overlapped"])});import{writeFileSync as Vj,appendFileSync as Bj}from"node:fs";var fH=({fileDescriptors:Z,syncResult:{output:q},options:J,isMaxBuffer:X,verboseInfo:Q})=>{if(q===null)return{output:Array.from({length:3})};let $={},Y=new Set;return{output:q.map((K,U)=>Lj({result:K,fileDescriptors:Z,fdNumber:U,state:$,outputFiles:Y,isMaxBuffer:X,verboseInfo:Q},J)),...$}},Lj=({result:Z,fileDescriptors:q,fdNumber:J,state:X,outputFiles:Q,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:K,lines:U,stripFinalNewline:W,maxBuffer:V})=>{if(Z===null)return;let L=MY(Z,$,V),z=q1(L),{stdioItems:_,objectMode:R}=q[J],M=zj([z],_,K,X),{serializedResult:F,finalResult:k=F}=_j({chunks:M,objectMode:R,encoding:K,lines:U,stripFinalNewline:W,fdNumber:J});Rj({serializedResult:F,fdNumber:J,state:X,verboseInfo:Y,encoding:K,stdioItems:_,objectMode:R});let D=H[J]?k:void 0;try{if(X.error===void 0)Mj(F,_,Q);return D}catch(O){return X.error=O,D}},zj=(Z,q,J,X)=>{try{return q7(Z,q,J,!1)}catch(Q){return X.error=Q,Z}},_j=({chunks:Z,objectMode:q,encoding:J,lines:X,stripFinalNewline:Q,fdNumber:$})=>{if(q)return{serializedResult:Z};if(J==="buffer")return{serializedResult:j6(Z)};let Y=nQ(Z,J);if(X[$])return{serializedResult:Y,finalResult:YZ(Y,!Q[$],q)};return{serializedResult:Y}},Rj=({serializedResult:Z,fdNumber:q,state:J,verboseInfo:X,encoding:Q,stdioItems:$,objectMode:Y})=>{if(!X7({stdioItems:$,encoding:Q,verboseInfo:X,fdNumber:q}))return;let H=YZ(Z,!1,Y);try{bH(H,q,X)}catch(K){J.error??=K}},Mj=(Z,q,J)=>{let X=q.filter(({type:Q})=>n8.has(Q));for(let{path:Q,append:$}of X){let Y=typeof Q==="string"?Q:Q.toString();if($||J.has(Y))Bj(Q,Z);else J.add(Y),Vj(Q,Z)}};var gH=B(()=>{VZ();J7();t8();j0();L0();u1()});var mH=([,Z,q],J)=>{if(!J.all)return;if(Z===void 0)return q;if(q===void 0)return Z;if(Array.isArray(Z))return Array.isArray(q)?[...Z,...q]:[...Z,H1(q,J,"all")];if(Array.isArray(q))return[H1(Z,J,"all"),...q];if(q0(Z)&&q0(q))return G3([Z,q]);return`${Z}${q}`};var uH=B(()=>{j0();p6()});import{once as BZ}from"node:events";var pH=async(Z,q)=>{let[J,X]=await Fj(Z);return q.isForcefullyTerminated??=!1,[J,X]},Fj=async(Z)=>{let[q,J]=await Promise.allSettled([BZ(Z,"spawn"),BZ(Z,"exit")]);if(q.status==="rejected")return[];return J.status==="rejected"?dH(Z):J.value},dH=async(Z)=>{try{return await BZ(Z,"exit")}catch{return dH(Z)}},cH=async(Z)=>{let[q,J]=await Z;if(!Dj(q,J)&&LZ(q,J))throw new l0;return[q,J]},Dj=(Z,q)=>Z===void 0&&q===void 0,LZ=(Z,q)=>Z!==0||q!==null;var zZ=B(()=>{S1()});var lH=({error:Z,status:q,signal:J,output:X},{maxBuffer:Q})=>{let $=Aj(Z,q,J),Y=$?.code==="ETIMEDOUT",H=RY($,X,Q);return{resultError:$,exitCode:q,signal:J,timedOut:Y,isMaxBuffer:H}},Aj=(Z,q,J)=>{if(Z!==void 0)return Z;return LZ(q,J)?new l0:void 0};var nH=B(()=>{S1();u1();zZ()});import{spawnSync as jj}from"node:child_process";var iH=(Z,q,J)=>{let{file:X,commandArguments:Q,command:$,escapedCommand:Y,startTime:H,verboseInfo:K,options:U,fileDescriptors:W}=Tj(Z,q,J),V=wj({file:X,commandArguments:Q,options:U,command:$,escapedCommand:Y,verboseInfo:K,fileDescriptors:W,startTime:H});return C2(V,K,U)},Tj=(Z,q,J)=>{let{command:X,escapedCommand:Q,startTime:$,verboseInfo:Y}=Y8(Z,q,J),H=Ij(J),{file:K,commandArguments:U,options:W}=P8(Z,q,H);Oj(W);let V=zH(W,Y);return{file:K,commandArguments:U,command:X,escapedCommand:Q,startTime:$,verboseInfo:Y,options:W,fileDescriptors:V}},Ij=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,Oj=({ipc:Z,ipcInput:q,detached:J,cancelSignal:X,killDescendants:Q})=>{if(q)c6("ipcInput");if(Z)c6("ipc: true");if(J)c6("detached: true");if(Q)c6("killDescendants: true");if(X)c6("cancelSignal")},c6=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},wj=({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let K=kj({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,fileDescriptors:Y,startTime:H});if(K.failed)return K;let{resultError:U,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z}=lH(K,J),{output:_,error:R=U}=fH({fileDescriptors:Y,syncResult:K,options:J,isMaxBuffer:z,verboseInfo:$}),M=_.map((k,D)=>H1(k,J,D)),F=H1(mH(_,J),J,"all");return xj({error:R,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z,stdio:M,all:F,options:J,command:X,escapedCommand:Q,startTime:H})},kj=({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,fileDescriptors:$,startTime:Y})=>{try{CH($,J);let H=Nj(J);return jj(...E8(Z,q,H))}catch(H){return v2({error:H,command:X,escapedCommand:Q,fileDescriptors:$,options:J,startTime:Y,isSync:!0})}},Nj=({encoding:Z,maxBuffer:q,...J})=>({...J,encoding:"buffer",maxBuffer:u8(q)}),xj=({error:Z,exitCode:q,signal:J,timedOut:X,isMaxBuffer:Q,stdio:$,all:Y,options:H,command:K,escapedCommand:U,startTime:W})=>Z===void 0?p8({command:K,escapedCommand:U,stdio:$,all:Y,ipcOutput:[],options:H,startTime:W}):h6({error:Z,command:K,escapedCommand:U,timedOut:X,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Q,isForcefullyTerminated:!1,exitCode:q,signal:J,stdio:$,all:Y,ipcOutput:[],options:H,startTime:W,isSync:!0});var aH=B(()=>{_3();g3();m3();f6();d8();MH();p6();yH();gH();u1();uH();nH()});import{once as _Z,on as Pj}from"node:events";var RZ,oH=({anyProcess:Z,channel:q,isSubprocess:J,ipc:X},Q={})=>{let{reference:$=!0,filter:Y}=Q,{signal:H}=Q[RZ]??{};return T2({methodName:"getOneMessage",isSubprocess:J,ipc:X,isConnected:I8(Z)}),Ej({anyProcess:Z,channel:q,isSubprocess:J,filter:Y,reference:$,signal:H})},Ej=async({anyProcess:Z,channel:q,isSubprocess:J,filter:X,reference:Q,signal:$})=>{M8(q,Q);let Y=A1(Z,q,J),H=new AbortController;vj($,H);try{return await Promise.race([Cj(Y,X,H),yj(Y,J,H),Sj(Y,J,H)])}catch(K){throw I2(Z),K}finally{H.abort(),F8(q,Q)}},vj=(Z,q)=>{if(Z===void 0)return;if(Z.aborted){q.abort();return}Z.addEventListener("abort",()=>{q.abort()},{once:!0,signal:q.signal})},Cj=async(Z,q,{signal:J})=>{if(q===void 0){let[X]=await _Z(Z,"message",{signal:J});return X}for await(let[X]of Pj(Z,"message",{signal:J}))if(q(X))return X},yj=async(Z,q,{signal:J})=>{await _Z(Z,"disconnect",{signal:J}),r$(q)},Sj=async(Z,q,{signal:J})=>{let[X]=await _Z(Z,"strict:error",{signal:J});throw _8(X,q)};var MZ=B(()=>{O2();N6();w6();RZ=Symbol("internalGetOneMessageOptions")});import{once as rH,on as bj}from"node:events";var FZ,tH=(Z,q={})=>{let{reference:J=!0}=q,{signal:X,shouldAwait:Q=!Z.isSubprocess}=q[FZ]??{};return DZ({...Z,shouldAwait:Q,reference:J,signal:X})},DZ=({anyProcess:Z,waitProcess:q=Z,channel:J,isSubprocess:X,ipc:Q,shouldAwait:$,reference:Y,signal:H})=>{T2({methodName:"getEachMessage",isSubprocess:X,ipc:Q,isConnected:I8(Z)}),M8(J,Y);let K=A1(Z,J,X),U=new AbortController,W={};return hj(H,U),fj(Z,K,U),gj({ipcEmitter:K,isSubprocess:X,controller:U,state:W}),mj({anyProcess:Z,waitProcess:q,channel:J,ipcEmitter:K,isSubprocess:X,shouldAwait:$,controller:U,state:W,reference:Y})},hj=(Z,q)=>{if(Z===void 0)return;if(Z.aborted){q.abort();return}Z.addEventListener("abort",()=>{q.abort()},{once:!0,signal:q.signal})},fj=async(Z,q,J)=>{try{await rH(q,"disconnect",{signal:J.signal}),J.abort()}catch{}},gj=async({ipcEmitter:Z,isSubprocess:q,controller:J,state:X})=>{try{let[Q]=await rH(Z,"strict:error",{signal:J.signal});X.error=_8(Q,q),J.abort()}catch{}},mj=async function*({anyProcess:Z,waitProcess:q,channel:J,ipcEmitter:X,isSubprocess:Q,shouldAwait:$,controller:Y,state:H,reference:K}){try{for await(let[U]of bj(X,"message",{signal:Y.signal}))sH(H),yield U}catch{sH(H)}finally{if(Y.abort(),F8(J,K),!Q)I2(Z);if($)await q}},sH=({error:Z})=>{if(Z)throw Z};var Q7=B(()=>{O2();N6();w6();FZ=Symbol("internalGetEachMessageOptions")});import eH from"node:process";var ZG=(Z,q,{ipc:J})=>{Object.assign(Z,JG(q,!1,J,Z))},qG=()=>{let Z=eH,q=!0,J=eH.channel!==void 0;return{...JG(Z,!0,J),getCancelSignal:O9.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:J})}},JG=(Z,q,J,X=Z)=>({sendMessage:k2.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J}),getOneMessage:oH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J}),getEachMessage:tH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J,waitProcess:X})});var AZ=B(()=>{x6();MZ();Q7();j8()});import{ChildProcess as uj}from"node:child_process";import{PassThrough as pj,Readable as QG,Writable as $G,Duplex as YG}from"node:stream";var HG=({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,verboseInfo:Y})=>{XZ(X);let H=new uj,K=dj(H,X),U=v2({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,isSync:!1}),W=ij(U,Y,Q);return{subprocess:H,promise:W,all:Q.all?K:void 0,convertedStreams:{readable:GG,writable:KG,duplex:UG,readableStream:cj,writableStream:lj,transformStream:nj,iterable:XG,[Symbol.asyncIterator]:XG}}},dj=(Z,q)=>{let J=l6(),X=l6(),Q=l6(),$=Array.from({length:q.length-3},l6),Y=l6(),H=[J,X,Q,...$];return Object.assign(Z,{stdin:J,stdout:X,stderr:Q,stdio:H}),Y},l6=()=>{let Z=new pj;return Z.end(),Z},GG=()=>new QG({read(){}}),KG=()=>new $G({write(){}}),UG=()=>new YG({read(){},write(){}}),cj=()=>QG.toWeb(GG()),lj=()=>$G.toWeb(KG()),nj=()=>YG.toWeb(UG()),XG=async function*(){},ij=async(Z,q,J)=>C2(Z,q,J);var WG=B(()=>{s8();f6();d8()});import{createReadStream as VG,createWriteStream as BG}from"node:fs";import{Buffer as aj}from"node:buffer";import{Readable as n6,Writable as oj,Duplex as sj}from"node:stream";var zG=(Z,q)=>o8(rj,Z,q,!1),i6=({type:Z,optionName:q})=>{throw TypeError(`The \`${q}\` option cannot be ${j1[Z]}.`)},LG,rj;var _G=B(()=>{J7();s8();L0();LG={fileNumber:i6,generator:WZ,asyncGenerator:WZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:q,readableObjectMode:J}}){let X=q||J;return{stream:sj.fromWeb(Z,{objectMode:X})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},rj={input:{...LG,fileUrl:({value:Z})=>({stream:VG(Z)}),filePath:({value:{file:Z}})=>({stream:VG(Z)}),webStream:({value:Z})=>({stream:n6.fromWeb(Z)}),iterable:({value:Z})=>({stream:n6.from(Z)}),asyncIterable:({value:Z})=>({stream:n6.from(Z)}),string:({value:Z})=>({stream:n6.from(Z)}),uint8Array:({value:Z})=>({stream:n6.from(aj.from(Z))})},output:{...LG,fileUrl:({value:Z})=>({stream:BG(Z)}),filePath:({value:{file:Z,append:q}})=>({stream:BG(Z,q?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:oj.fromWeb(Z)}),iterable:i6,asyncIterable:i6,string:i6,uint8Array:i6}}});import{on as tj,once as RG}from"node:events";import{PassThrough as ej,getDefaultHighWaterMark as ZT}from"node:stream";import{finished as DG}from"node:stream/promises";function c1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let Q of Z)jZ(Q);let q=Z.some(({readableObjectMode:Q})=>Q),J=qT(Z,q),X=new AG({objectMode:q,writableHighWaterMark:J,readableHighWaterMark:J});for(let Q of Z)X.add(Q);return X}var qT=(Z,q)=>{if(Z.length===0)return ZT(q);let J=Z.filter(({readableObjectMode:X})=>X===q).map(({readableHighWaterMark:X})=>X);return Math.max(...J)},AG,JT=async(Z,q,J)=>{$7(Z,MG);let X=new AbortController;try{await Promise.race([XT(Z,X),QT(Z,q,J,X)])}finally{X.abort(),$7(Z,-MG)}},XT=async(Z,{signal:q})=>{try{await DG(Z,{signal:q,cleanup:!0})}catch(J){throw jG(Z,J),J}},QT=async(Z,q,J,{signal:X})=>{for await(let[Q]of tj(Z,"unpipe",{signal:X}))if(q.has(Q))Q.emit(J)},jZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},$T=async({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,onFinished:$,unpipeEvent:Y})=>{$7(Z,FG);let H=new AbortController;try{await Promise.race([YT($,q,H),HT({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,controller:H}),GT({stream:q,streams:J,ended:X,aborted:Q,unpipeEvent:Y,controller:H})])}finally{H.abort(),$7(Z,-FG)}if(J.size>0&&J.size===X.size+Q.size)if(X.size===0&&Q.size>0)TZ(Z);else KT(Z)},YT=async(Z,q,{signal:J})=>{try{if(await Z,!J.aborted)TZ(q)}catch(X){if(!J.aborted)jG(q,X)}},HT=async({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,controller:{signal:$}})=>{try{if(await DG(q,{signal:$,cleanup:!0,readable:!0,writable:!1}),J.has(q))X.add(q)}catch(Y){if($.aborted||!J.has(q))return;if(TG(Y))Q.add(q);else IG(Z,Y)}},GT=async({stream:Z,streams:q,ended:J,aborted:X,unpipeEvent:Q,controller:{signal:$}})=>{if(await RG(Z,Q,{signal:$}),!Z.readable)return RG($,"abort",{signal:$});q.delete(Z),J.delete(Z),X.delete(Z)},KT=(Z)=>{if(Z.writable)Z.end()},jG=(Z,q)=>{if(TG(q))TZ(Z);else IG(Z,q)},TG=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",TZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},IG=(Z,q)=>{if(!Z.destroyed)Z.once("error",UT),Z.destroy(q)},UT=()=>{},$7=(Z,q)=>{let J=Z.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)Z.setMaxListeners(J+q)},MG=2,FG=1;var Y7=B(()=>{AG=class AG extends ej{#J=new Set([]);#X=new Set([]);#q=new Set([]);#Y;#G=Symbol("unpipe");#V=new WeakMap;add(Z){if(jZ(Z),this.#J.has(Z))return;this.#J.add(Z),this.#Y??=JT(this,this.#J,this.#G);let q=$T({passThroughStream:this,stream:Z,streams:this.#J,ended:this.#X,aborted:this.#q,onFinished:this.#Y,unpipeEvent:this.#G});this.#V.set(Z,q),Z.pipe(this,{end:!1})}async remove(Z){if(jZ(Z),!this.#J.has(Z))return!1;let q=this.#V.get(Z);if(q===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await q,!0}}});import{finished as OG}from"node:stream/promises";var b2=(Z,q)=>{Z.pipe(q),WT(Z,q),VT(Z,q)},WT=async(Z,q)=>{if(b0(Z)||b0(q))return;try{await OG(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}IZ(q)},IZ=(Z)=>{if(Z.writable)Z.end()},VT=async(Z,q)=>{if(b0(Z)||b0(q))return;try{await OG(q,{cleanup:!0,readable:!1,writable:!0})}catch{}OZ(Z)},OZ=(Z)=>{if(Z.readable)Z.destroy()};var H7=B(()=>{J1()});var wG=(Z,q,J)=>{let X=new Map;for(let[Q,{stdioItems:$,direction:Y}]of Object.entries(q)){let H=$.filter(({type:U})=>x0.has(U));for(let{stream:U}of H)BT(Z,U,Y,Q);let K=$.filter(({type:U})=>!x0.has(U));for(let{stream:U}of K)zT({subprocess:Z,stream:U,direction:Y,fdNumber:Q,pipeGroups:X,controller:J})}for(let[Q,$]of X){let Y=$.length===1?$[0]:c1($);b2(Y,Q)}},BT=(Z,q,J,X)=>{if(J==="output")b2(Z.stdio[X],q);else b2(q,Z.stdio[X]);let Q=LT[X];if(Q!==void 0)Z[Q]=q;Z.stdio[X]=q},LT,zT=({subprocess:Z,stream:q,direction:J,fdNumber:X,pipeGroups:Q,controller:$})=>{if(q===void 0)return;_T(q,$);let[Y,H]=J==="output"?[q,Z.stdio[X]]:[Z.stdio[X],q],K=Q.get(Y)??[];Q.set(Y,[...K,H])},_T=(Z,{signal:q})=>{if(b0(Z))b1(Z,RT,q)},RT=2;var kG=B(()=>{Y7();J1();R8();L0();H7();LT=["stdin","stdout","stderr"]});import G7 from"node:process";import{execFile as MT}from"node:child_process";import NG from"node:path/win32";var xG,PG=(Z)=>Z.killDescendants&&!xG?{...Z,detached:!0}:Z,EG=(Z,{killDescendants:q})=>{if(!q)return Z.kill.bind(Z);return(xG?DT:FT).bind(void 0,Z)},FT=(Z,q)=>{if(Z.pid===void 0)return!1;try{return G7.kill(-Z.pid,q)}catch{return Z.kill(q)}},DT=(Z,q)=>{if(Z.pid===void 0)return!1;let J=AT();if(J===void 0)return Z.kill(q);return MT(J,["/pid",`${Z.pid}`,"/T","/F"],(X)=>{if(X)Z.kill(q)}),!0},AT=()=>{let Z=[G7.env.SystemRoot,G7.env.windir].find((q)=>q&&jT(q));return Z===void 0?void 0:NG.join(Z,"System32","taskkill.exe")},jT=(Z)=>{let{root:q}=NG.parse(Z);return/^[a-z]:[/\\]/i.test(q)};var vG=B(()=>{xG=G7.platform==="win32"});var l1;var CG=B(()=>{l1=[];l1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")l1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")l1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class yG{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(kZ[wZ])return kZ[wZ];TT(kZ,wZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,q){this.listeners[Z].push(q)}removeListener(Z,q){let J=this.listeners[Z],X=J.indexOf(q);if(X===-1)return;if(X===0&&J.length===1)J.length=0;else J.splice(X,1)}emit(Z,q,J){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let X=!1;for(let Q of this.listeners[Z])X=Q(q,J)===!0||X;if(Z==="exit")X=this.emit("afterExit",q,J)||X;return X}}class xZ{}var K7=(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",wZ,kZ,TT,IT=(Z)=>{return{onExit(q,J){return Z.onExit(q,J)},load(){return Z.load()},unload(){return Z.unload()}}},SG,bG,NZ,hG,Vu,Bu;var fG=B(()=>{CG();wZ=Symbol.for("signal-exit emitter"),kZ=globalThis,TT=Object.defineProperty.bind(Object);SG=class SG extends xZ{onExit(){return()=>{}}load(){}unload(){}};bG=class bG extends xZ{#J=NZ.platform==="win32"?"SIGINT":"SIGHUP";#X=new yG;#q;#Y;#G;#V={};#A=!1;constructor(Z){super();this.#q=Z,this.#V={};for(let q of l1)this.#V[q]=()=>{let J=this.#q.listeners(q),{count:X}=this.#X,Q=Z;if(typeof Q.__signal_exit_emitter__==="object"&&typeof Q.__signal_exit_emitter__.count==="number")X+=Q.__signal_exit_emitter__.count;if(J.length===X){this.unload();let $=this.#X.emit("exit",null,q),Y=q==="SIGHUP"?this.#J:q;if(!$)Z.kill(Z.pid,Y)}};this.#G=Z.reallyExit,this.#Y=Z.emit}onExit(Z,q){if(!K7(this.#q))return()=>{};if(this.#A===!1)this.load();let J=q?.alwaysLast?"afterExit":"exit";return this.#X.on(J,Z),()=>{if(this.#X.removeListener(J,Z),this.#X.listeners.exit.length===0&&this.#X.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#X.count+=1;for(let Z of l1)try{let q=this.#V[Z];if(q)this.#q.on(Z,q)}catch(q){}this.#q.emit=(Z,...q)=>{return this.#H(Z,...q)},this.#q.reallyExit=(Z)=>{return this.#_(Z)}}unload(){if(!this.#A)return;this.#A=!1,l1.forEach((Z)=>{let q=this.#V[Z];if(!q)throw Error("Listener not defined for signal: "+Z);try{this.#q.removeListener(Z,q)}catch(J){}}),this.#q.emit=this.#Y,this.#q.reallyExit=this.#G,this.#X.count-=1}#_(Z){if(!K7(this.#q))return 0;return this.#q.exitCode=Z||0,this.#X.emit("exit",this.#q.exitCode,null),this.#G.call(this.#q,this.#q.exitCode)}#H(Z,...q){let J=this.#Y;if(Z==="exit"&&K7(this.#q)){if(typeof q[0]==="number")this.#q.exitCode=q[0];let X=J.call(this.#q,Z,...q);return this.#X.emit("exit",this.#q.exitCode,null),X}else return J.call(this.#q,Z,...q)}};NZ=globalThis.process,{onExit:hG,load:Vu,unload:Bu}=IT(K7(NZ)?new bG(NZ):new SG)});import{addAbortListener as OT}from"node:events";var gG=(Z,{cleanup:q,detached:J},{signal:X})=>{if(!q||J)return;let Q=hG(()=>{Z()});OT(X,()=>{Q()})};var mG=B(()=>{fG()});var U7=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),a6=(Z,q,J)=>{let X=Z[J];if(!X.has(q))X.set(q,[]);let Q=X.get(q),$=n0();return Q.push($),{resolve:$.resolve.bind($),promises:Q}},h2=async({resolve:Z,promises:q},J)=>{Z();let[X]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...q])]);return!X};var o6=B(()=>{w2()});import{on as wT}from"node:events";import{getDefaultHighWaterMark as kT}from"node:stream";var W7=({subprocessStdout:Z,subprocess:q,binary:J,shouldEncode:X,encoding:Q,preserveNewlines:$})=>{let Y=new AbortController;return NT(q,Y),pG({stream:Z,controller:Y,binary:J,shouldEncode:!Z.readableObjectMode&&X,encoding:Q,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},NT=async(Z,q)=>{try{await Z}catch{}finally{q.abort()}},PZ=({stream:Z,onStreamEnd:q,lines:J,encoding:X,stripFinalNewline:Q,allMixed:$})=>{let Y=new AbortController;xT(q,Y,Z);let H=Z.readableObjectMode&&!$;return pG({stream:Z,controller:Y,binary:X==="buffer",shouldEncode:!H,encoding:X,shouldSplit:!H&&J,preserveNewlines:!Q})},xT=async(Z,q,J)=>{try{await Z}catch{J.destroy()}finally{q.abort()}},pG=({stream:Z,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y})=>{let H=wT(Z,"data",{signal:q.signal,highWaterMark:uG,highWatermark:uG});return PT({onStdoutChunk:H,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y})},EZ,uG,PT=async function*({onStdoutChunk:Z,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y}){let H=ET({binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y});try{for await(let[K]of Z)yield*d1(K,H,0)}catch(K){if(!q.signal.aborted)throw K}finally{yield*d6(H)}},ET=({binary:Z,shouldEncode:q,encoding:J,shouldSplit:X,preserveNewlines:Q})=>[e8(Z,J,!q),r8(Z,Q,!X,{})].filter(Boolean);var V7=B(()=>{HZ();t8();UZ();EZ=kT(!0),uG=EZ});var f2=(Z,q,{from:J,binary:X=!1,preserveNewlines:Q=!1}={})=>{let $=X||T0.has(q),Y=S2(Z,J),H=W7({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:q,preserveNewlines:Q});return vT(H,Y,Z)},vT=async function*(Z,q,J){try{yield*Z}finally{if(q.readable)q.destroy();await J}};var vZ=B(()=>{h1();T1();V7()});import{finished as CT}from"node:stream/promises";var s6=async(Z,q,J,{isSameDirection:X,stopOnExit:Q=!1}={})=>{let $=yT(Z,J),Y=new AbortController;try{await Promise.race([...Q?[J.exitPromise]:[],CT(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)hT(H,q,J,X)}finally{Y.abort()}},yT=(Z,{originalStreams:q,subprocess:J})=>{let[X]=q,Q={stdinCleanedUp:!1};if(Z===X)ST(Z,J,Q);return Q},ST=(Z,q,J)=>{let{_destroy:X}=Z;Z._destroy=(...Q)=>{bT(q,J),X.call(Z,...Q)}},bT=({exitCode:Z,signalCode:q},J)=>{if(Z!==null||q!==null)J.stdinCleanedUp=!0},hT=(Z,q,J,X)=>{if(!fT(Z,q,J,X))throw Z},fT=(Z,q,J,X=!0)=>{if(J.propagating)return dG(Z)||g2(Z);return J.propagating=!0,CZ(J,q)===X?dG(Z):g2(Z)},CZ=({fileDescriptors:Z},q)=>q!=="all"&&Z[q].direction==="input",g2=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",dG=(Z)=>Z?.code==="EPIPE";var r6=()=>{};import{finished as cG}from"node:stream/promises";var yZ=async(Z)=>{if(Z===void 0)return;try{await SZ(Z)}catch{}},lG=async(Z)=>{if(Z===void 0)return;try{await bZ(Z)}catch{}},SZ=async(Z)=>{await cG(Z,{cleanup:!0,readable:!1,writable:!0})},bZ=async(Z)=>{await cG(Z,{cleanup:!0,readable:!0,writable:!1})},B7=async(Z,q)=>{if(await Z,q)throw q},L7=(Z,q,J)=>{if(J&&!g2(J))Z.destroy(J);else if(q)Z.destroy()};var hZ=B(()=>{r6()});import{Readable as gT}from"node:stream";import{callbackify as mT}from"node:util";var z7=({subprocess:Z,concurrentStreams:q,encoding:J},{from:X,binary:Q=!0,preserveNewlines:$=!0}={})=>{let Y=Q||T0.has(J),{subprocessStdout:H,waitReadableDestroy:K}=fZ(Z,X,q),{readableEncoding:U,readableObjectMode:W,readableHighWaterMark:V}=gZ(H,Y),{read:L,onStdoutDataDone:z}=mZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:J,preserveNewlines:$}),_=new gT({read:L,destroy:mT(pZ.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:K})),highWaterMark:V,objectMode:W,encoding:U});return uZ({subprocessStdout:H,onStdoutDataDone:z,readable:_,subprocess:Z}),_},fZ=(Z,q,J)=>{let X=S2(Z,q),Q=a6(J,X,"readableDestroy");return{subprocessStdout:X,waitReadableDestroy:Q}},gZ=({readableEncoding:Z,readableObjectMode:q,readableHighWaterMark:J},X)=>X?{readableEncoding:Z,readableObjectMode:q,readableHighWaterMark:J}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:EZ},mZ=({subprocessStdout:Z,subprocess:q,binary:J,encoding:X,preserveNewlines:Q})=>{let $=n0(),Y=W7({subprocessStdout:Z,subprocess:q,binary:J,shouldEncode:!J,encoding:X,preserveNewlines:Q});return{read(){uT(this,Y,$)},onStdoutDataDone:$}},uT=async(Z,q,J)=>{try{let{value:X,done:Q}=await q.next();if(Q)J.resolve();else Z.push(X)}catch{}},uZ=async({subprocessStdout:Z,onStdoutDataDone:q,readable:J,subprocess:X,subprocessStdin:Q})=>{try{if(await bZ(Z),await X,await yZ(Q),await q,J.readable)J.push(null)}catch($){await yZ(Q),nG(J,await pT(X,$))}},pT=async(Z,q)=>{if(q.code!=="ERR_STREAM_PREMATURE_CLOSE")return q;try{await Z}catch(J){return J}return q},pZ=async({subprocessStdout:Z,subprocess:q,waitReadableDestroy:J},X)=>{if(!await h2(J,q))return;nG(Z,X),await B7(q,X)},nG=(Z,q)=>{L7(Z,Z.readable,q)};var _7=B(()=>{h1();T1();V7();w2();o6();hZ()});import{Readable as dT,Writable as cT,Duplex as lT}from"node:stream";var R7=(Z,q)=>dT.toWeb(Z.readable(q)),iG=(Z,q)=>cT.toWeb(Z.writable(q)),aG=(Z,q)=>lT.toWeb(Z.duplex(q));var dZ=()=>{};var sG=({source:Z,sourcePromise:q,boundOptions:J,createNested:X},...Q)=>{let $=Q8(),{destination:Y,destinationStream:H,destinationError:K,from:U,unpipeSignal:W}=nT(J,X,Q),{sourceStream:V,sourceError:L}=aT(Z,U),{options:z,fileDescriptors:_}=i0.get(Z);return{sourcePromise:q,sourceStream:V,sourceOptions:z,sourceError:L,destination:Y,destinationStream:H,destinationError:K,unpipeSignal:W,fileDescriptors:_,startTime:$}},nT=(Z,q,J)=>{try{let{destination:X,pipeOptions:{from:Q,to:$,unpipeSignal:Y}={}}=iT(Z,q,...J),H=a8(X,$);return{destination:X,destinationStream:H,from:Q,unpipeSignal:Y}}catch(X){return{destinationError:X}}},iT=(Z,q,J,...X)=>{if(Array.isArray(J))return{destination:q(oG,Z)(J,...X),pipeOptions:Z};if(typeof J==="string"||J instanceof URL||$3(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]=i4(J,...X);return{destination:q(oG)(Q,$,Y),pipeOptions:Y}}if(i0.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:X[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},oG=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),aT=(Z,q)=>{try{return{sourceStream:S2(Z,q)}}catch(J){return{sourceError:J}}};var rG=B(()=>{H3();$8();T1();F2()});var eG=({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X,fileDescriptors:Q,sourceOptions:$,startTime:Y})=>{let H=oT({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X});if(H!==void 0)throw cZ({error:H,fileDescriptors:Q,sourceOptions:$,startTime:Y})},oT=({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X})=>{if(q!==void 0&&X!==void 0)return X;if(X!==void 0)return OZ(Z),X;if(q!==void 0)return IZ(J),q},cZ=({error:Z,fileDescriptors:q,sourceOptions:J,startTime:X})=>v2({error:Z,command:tG,escapedCommand:tG,fileDescriptors:q,options:J,startTime:X,isSync:!1}),tG="source.pipe(destination)";var lZ=B(()=>{f6();H7()});var ZK=async(Z)=>{let[{status:q,reason:J,value:X=J},{status:Q,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(X))Y.pipedFrom.push(X);if(Q==="rejected")throw Y;if(q==="rejected")throw X;return Y};var qK=()=>{};import{finished as sT}from"node:stream/promises";var JK=(Z,q,J)=>{let X=M7.has(q)?tT(Z,q):rT(Z,q);return b1(Z,ZI,J.signal),b1(q,qI,J.signal),eT(q),X},rT=(Z,q)=>{let J=c1([Z]);return b2(J,q),M7.set(q,J),J},tT=(Z,q)=>{let J=M7.get(q);return J.add(Z),J},eT=async(Z)=>{try{await sT(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}M7.delete(Z)},M7,ZI=2,qI=1;var XK=B(()=>{Y7();R8();H7();M7=new WeakMap});import{aborted as JI}from"node:util";var QK=(Z,q)=>Z===void 0?[]:[XI(Z,q)],XI=async(Z,{sourceStream:q,mergedStream:J,fileDescriptors:X,sourceOptions:Q,startTime:$})=>{await JI(Z,q),await J.remove(q);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw cZ({error:Y,fileDescriptors:X,sourceOptions:Q,startTime:$})};var $K=B(()=>{lZ()});var F7=(Z,...q)=>{if(e(q[0]))return F7.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...q[0]}});let{destination:J,...X}=sG(Z,...q),Q=new AbortController,$=_I({...X,destination:J,pipeFailureController:Q});return $.pipe=F7.bind(void 0,{...Z,source:J,sourcePromise:$,boundOptions:{}}),QI($,J,Q.signal),$},QI=(Z,q,J)=>{if(q===void 0)return;$I(Z,q),KI(Z,q,J)},$I=(Z,q)=>{let J=i0.get(q);i0.set(Z,J),Z.stdio=q.stdio,Z.all=q.all;let{options:{encoding:X}}=J,Q=U7();Z[Symbol.asyncIterator]=f2.bind(void 0,Z,X,{}),Z.iterable=f2.bind(void 0,Z,X),Z.readable=HI.bind(void 0,Z,{subprocess:Z,concurrentStreams:Q,encoding:X}),Z.readableStream=R7.bind(void 0,Z),YI(Z,q)},YI=(Z,q)=>{if(q.all===void 0){Z.all=void 0;return}Object.defineProperty(Z,"all",{get(){YK(Z,q.all);let J=Z.readable({from:"all"});return YK(Z,J),J},enumerable:!0,configurable:!0})},YK=(Z,q)=>{Object.defineProperty(Z,"all",{value:q,writable:!0,enumerable:!0,configurable:!0})},HI=(Z,q,...J)=>{let X=z7(q,...J);return GI(Z,X),X},GI=async(Z,q)=>{try{await Z}catch(J){q.destroy(J)}},KI=(Z,q,J)=>{Z.sendMessage=q.sendMessage,Z.getOneMessage=UI.bind(void 0,q,J),Z.getEachMessage=BI.bind(void 0,Z,q,J)},UI=(Z,q,...J)=>{let X=new AbortController,Q=Z.getOneMessage(...HK(J,X.signal,RZ));return WI(q,Q,X)},WI=async(Z,q,J)=>{try{return await Promise.race([q,VI(Z,J.signal)])}finally{J.abort()}},VI=(Z,q)=>new Promise((J,X)=>{if(Z.aborted){X(Z.reason);return}Z.addEventListener("abort",()=>{X(Z.reason)},{once:!0,signal:q})}),BI=(Z,q,J,...X)=>{let Q=new AbortController,$=q.getEachMessage(...HK(X,Q.signal,FZ));return zI(J,Q),LI(Z,$,Q)},LI=async function*(Z,q,J){try{yield*q}finally{J.abort(),await Z}},HK=(Z,q,J)=>{if(Z[0]===null)return Z;let[X]=Z;return[{...X,[J]:{signal:q,shouldAwait:!1}}]},zI=(Z,q)=>{if(Z.aborted){q.abort();return}Z.addEventListener("abort",()=>{q.abort()},{once:!0,signal:q.signal})},_I=async({sourcePromise:Z,sourceStream:q,sourceOptions:J,sourceError:X,destination:Q,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:K,startTime:U,pipeFailureController:W})=>{let V=new AbortController;try{let L=RI(Z,Q);eG({sourceStream:q,sourceError:X,destinationStream:$,destinationError:Y,fileDescriptors:K,sourceOptions:J,startTime:U});let z=JK(q,$,V);return await Promise.race([ZK(L),...QK(H,{sourceStream:q,mergedStream:z,sourceOptions:J,fileDescriptors:K,startTime:U})])}catch(L){throw W.abort(L),L}finally{V.abort()}},RI=(Z,q)=>Promise.allSettled([Z,q]);var GK=B(()=>{Z1();T1();o6();vZ();_7();dZ();MZ();Q7();rG();lZ();qK();XK();$K()});import{setImmediate as MI}from"node:timers/promises";var KK=async({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,buffer:Q,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:K,verboseInfo:U,streamInfo:W})=>{let V=FI({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,allMixed:H,verboseInfo:U,streamInfo:W});if(!Q){await Promise.all([DI(Z),V]);return}let L=QZ(K,J),z=PZ({stream:Z,onStreamEnd:q,lines:Y,encoding:X,stripFinalNewline:L,allMixed:H}),[_]=await Promise.all([AI({stream:Z,iterable:z,fdNumber:J,encoding:X,maxBuffer:$,lines:Y}),V]);return _},FI=async({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,allMixed:Q,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!X7({stdioItems:Y[J]?.stdioItems,encoding:X,verboseInfo:$,fdNumber:J}))return;let H=PZ({stream:Z,onStreamEnd:q,lines:!0,encoding:X,stripFinalNewline:!0,allMixed:Q});await SH(H,Z,J,$)},DI=async(Z)=>{if(await MI(),Z.readableFlowing===null)Z.resume()},AI=async({stream:Z,stream:{readableObjectMode:q},iterable:J,fdNumber:X,encoding:Q,maxBuffer:$,lines:Y})=>{try{if(q||Y)return await b8(J,{maxBuffer:$});if(Q==="buffer")return new Uint8Array(await h8(J,{maxBuffer:$}));return await g8(J,{maxBuffer:$})}catch(H){return UK(LY({error:H,stream:Z,readableObjectMode:q,lines:Y,encoding:Q,fdNumber:X}))}},nZ=async(Z)=>{try{return await Z}catch(q){return UK(q)}},UK=({bufferedData:Z})=>cQ(Z)?new Uint8Array(Z):Z;var iZ=B(()=>{m8();j0();VZ();V7();u1();p6()});var WK=({subprocess:Z,encoding:q,buffer:J,maxBuffer:X,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((K,U)=>aZ({stream:K,fdNumber:U,encoding:q,buffer:J[U],maxBuffer:X[U],lines:Q[U],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),aZ=async({stream:Z,fdNumber:q,encoding:J,buffer:X,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:U})=>{if(!Z)return;let W=s6(Z,q,U);if(CZ(U,q)){await W;return}let[V]=await Promise.all([KK({stream:Z,onStreamEnd:W,fdNumber:q,encoding:J,buffer:X,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:U}),W]);return V};var oZ=B(()=>{iZ();r6()});var VK=({stdout:Z,stderr:q},{all:J})=>J&&(Z||q)?c1([Z,q].filter(Boolean)):void 0,BK=({subprocess:Z,all:q,encoding:J,buffer:X,maxBuffer:Q,lines:$,stripFinalNewline:Y,verboseInfo:H,streamInfo:K})=>aZ({...jI(Z,q,X),fdNumber:"all",encoding:J,maxBuffer:Q[1]+Q[2],lines:$[1]||$[2],allMixed:TI(Z,q),stripFinalNewline:Y,verboseInfo:H,streamInfo:K}),jI=({stdout:Z,stderr:q},J,[,X,Q])=>{let $=X||Q;if(!$)return{stream:J,buffer:$};if(!X)return{stream:q,buffer:$};if(!Q)return{stream:Z,buffer:$};return{stream:J,buffer:$}},TI=({stdout:Z,stderr:q},J)=>J&&Z&&q&&Z.readableObjectMode!==q.readableObjectMode;var sZ=B(()=>{Y7();oZ()});var LK=(Z)=>A2(Z,"ipc"),zK=(Z,q)=>{let J=X8(Z);c0({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:q})};var _K=B(()=>{j2();F1()});var RK=async({subprocess:Z,buffer:q,maxBuffer:J,ipc:X,ipcOutput:Q,verboseInfo:$})=>{if(!X)return Q;let Y=LK($),H=X1(q,"ipc"),K=X1(J,"ipc");for await(let U of DZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:X,shouldAwait:!1,reference:!0})){if(H)zY(Z,Q,K),Q.push(U);if(Y)zK(U,$)}return Q},MK=async(Z,q)=>{return await Promise.allSettled([Z]),q};var FK=B(()=>{u1();_K();Q1();Q7()});import{once as II}from"node:events";var DK=async({subprocess:Z,kill:q,all:J,options:{encoding:X,buffer:Q,maxBuffer:$,lines:Y,timeoutDuration:H,cancelSignal:K,gracefulCancel:U,forceKillAfterDelay:W,stripFinalNewline:V,ipc:L,ipcInput:z},context:_,verboseInfo:R,fileDescriptors:M,originalStreams:F,onInternalError:k,controller:D})=>{let O=pH(Z,_),j={originalStreams:F,fileDescriptors:M,subprocess:Z,exitPromise:O,propagating:!1},T=WK({subprocess:Z,encoding:X,buffer:Q,maxBuffer:$,lines:Y,stripFinalNewline:V,verboseInfo:R,streamInfo:j}),A=BK({subprocess:Z,all:J,encoding:X,buffer:Q,maxBuffer:$,lines:Y,stripFinalNewline:V,verboseInfo:R,streamInfo:j}),b=[],w=RK({subprocess:Z,buffer:Q,maxBuffer:$,ipc:L,ipcOutput:b,verboseInfo:R}),x=OI(F,Z,j),E=wI(M,j);try{return await Promise.race([Promise.all([{},cH(O),Promise.all(T),A,w,S9(Z,z,L),...x,...E]),k,kI(Z,D),...P9(q,H,_,D),...s$({kill:q,cancelSignal:K,gracefulCancel:U,context:_,controller:D}),...N9({subprocess:Z,kill:q,cancelSignal:K,gracefulCancel:U,forceKillAfterDelay:W,context:_,controller:D})])}catch(f){return _.terminationReason??="other",Promise.all([{error:f},O,Promise.all(T.map((i)=>nZ(i))),nZ(A),MK(w,b),Promise.allSettled(x),Promise.allSettled(E)])}},OI=(Z,q,J)=>Z.map((X,Q)=>X===q.stdio[Q]?void 0:s6(X,Q,J)),wI=(Z,q)=>Z.flatMap(({stdioItems:J},X)=>J.filter(({value:Q,stream:$=Q})=>f0($,{checkOpen:!1})&&!b0($)).map(({type:Q,value:$,stream:Y=$})=>s6(Y,X,q,{isSameDirection:x0.has(Q),stopOnExit:Q==="native"}))),kI=async(Z,{signal:q})=>{let[J]=await II(Z,"error",{signal:q});throw J};var AK=B(()=>{m1();v3();T3();E3();J1();L0();iZ();FK();y3();sZ();oZ();zZ();r6()});import{Writable as NI}from"node:stream";import{callbackify as jK}from"node:util";var TK=({subprocess:Z,concurrentStreams:q},{to:J}={})=>{let{subprocessStdin:X,waitWritableFinal:Q,waitWritableDestroy:$}=rZ(Z,J,q),Y=new NI({...tZ(X,Z,Q),destroy:jK(Zq.bind(void 0,{subprocessStdin:X,subprocess:Z,waitWritableFinal:Q,waitWritableDestroy:$})),highWaterMark:X.writableHighWaterMark,objectMode:X.writableObjectMode});return eZ(X,Y,void 0,Z),Y},rZ=(Z,q,J)=>{let X=a8(Z,q),Q=a6(J,X,"writableFinal"),$=a6(J,X,"writableDestroy");return{subprocessStdin:X,waitWritableFinal:Q,waitWritableDestroy:$}},tZ=(Z,q,J)=>({write:xI.bind(void 0,Z),final:jK(PI.bind(void 0,Z,q,J))}),xI=(Z,q,J,X)=>{if(Z.write(q,J))X();else Z.once("drain",X)},PI=async(Z,q,J)=>{if(!await h2(J,q))return;if(Z.writable)Z.end();await q},eZ=async(Z,q,J,X)=>{try{if(await SZ(Z),await X,q.writable)q.end()}catch(Q){await lG(J),IK(q,await EI(X,Q))}},EI=async(Z,q)=>{if(!vI(q))return q;try{await Z}catch(J){return J}return q},vI=(Z)=>Z===void 0||g2(Z),Zq=async({subprocessStdin:Z,subprocess:q,waitWritableFinal:J,waitWritableDestroy:X},Q)=>{if(await h2(J,q),await h2(X,q))IK(Z,Q),await B7(q,Q)},IK=(Z,q)=>{L7(Z,Z.writable,q)};var qq=B(()=>{T1();r6();o6();hZ()});import{Duplex as CI}from"node:stream";import{callbackify as yI}from"node:util";var OK=({subprocess:Z,concurrentStreams:q,encoding:J},{from:X,to:Q,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||T0.has(J),{subprocessStdout:K,waitReadableDestroy:U}=fZ(Z,X,q),{subprocessStdin:W,waitWritableFinal:V,waitWritableDestroy:L}=rZ(Z,Q,q),{readableEncoding:z,readableObjectMode:_,readableHighWaterMark:R}=gZ(K,H),{read:M,onStdoutDataDone:F}=mZ({subprocessStdout:K,subprocess:Z,binary:H,encoding:J,preserveNewlines:Y}),k=new CI({read:M,...tZ(W,Z,V),destroy:yI(SI.bind(void 0,{subprocessStdout:K,subprocessStdin:W,subprocess:Z,waitReadableDestroy:U,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:R,writableHighWaterMark:W.writableHighWaterMark,readableObjectMode:_,writableObjectMode:W.writableObjectMode,encoding:z});return uZ({subprocessStdout:K,onStdoutDataDone:F,readable:k,subprocess:Z,subprocessStdin:W}),eZ(W,k,K,Z),k},SI=async({subprocessStdout:Z,subprocessStdin:q,subprocess:J,waitReadableDestroy:X,waitWritableFinal:Q,waitWritableDestroy:$},Y)=>{await Promise.all([pZ({subprocessStdout:Z,subprocess:J,waitReadableDestroy:X},Y),Zq({subprocessStdin:q,subprocess:J,waitWritableFinal:Q,waitWritableDestroy:$},Y)])};var wK=B(()=>{h1();_7();qq()});var kK=(Z,{encoding:q})=>{let J=U7();Z.readable=z7.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:q}),Z.writable=TK.bind(void 0,{subprocess:Z,concurrentStreams:J}),Z.duplex=OK.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:q}),Z.readableStream=R7.bind(void 0,Z),Z.writableStream=iG.bind(void 0,Z),Z.transformStream=aG.bind(void 0,Z),Z.iterable=f2.bind(void 0,Z,q),Z[Symbol.asyncIterator]=f2.bind(void 0,Z,q,{})};var NK=B(()=>{o6();_7();qq();wK();dZ();vZ()});var xK=(Z,q)=>Object.assign(Z,q);var PK=()=>{};import{setMaxListeners as bI}from"node:events";import{spawn as hI}from"node:child_process";var EK=(Z,q,J,X)=>{let{file:Q,commandArguments:$,command:Y,escapedCommand:H,startTime:K,verboseInfo:U,options:W,fileDescriptors:V}=fI(Z,q,J),{subprocess:L,promise:z,kill:_,all:R,convertedStreams:M}=mI({file:Q,commandArguments:$,options:W,startTime:K,verboseInfo:U,command:Y,escapedCommand:H,fileDescriptors:V}),F=uI({promise:z,nodeChildProcess:L,kill:_,all:R,convertedStreams:M,options:W});return F.pipe=F7.bind(void 0,{source:F,sourcePromise:z,boundOptions:{},createNested:X}),i0.set(F,{options:W,fileDescriptors:V}),F},fI=(Z,q,J)=>{let{command:X,escapedCommand:Q,startTime:$,verboseInfo:Y}=Y8(Z,q,J),{file:H,commandArguments:K,options:U}=P8(Z,q,J),W=gI(U),V=zG(W,Y);return{file:H,commandArguments:K,command:X,escapedCommand:Q,startTime:$,verboseInfo:Y,options:W,fileDescriptors:V}},gI=({timeout:Z,signal:q,...J})=>{if(q!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:Z}},mI=({file:Z,commandArguments:q,options:J,startTime:X,verboseInfo:Q,command:$,escapedCommand:Y,fileDescriptors:H})=>{let K;try{K=hI(...E8(Z,q,PG(J)))}catch(M){return HG({error:M,command:$,escapedCommand:Y,fileDescriptors:H,options:J,startTime:X,verboseInfo:Q})}let U=new AbortController;bI(1/0,U.signal);let W=[...K.stdio];wG(K,H,U),j9(K,J);let V={},L=n0(),z=a$.bind(void 0,{kill:EG(K,J),options:J,onInternalError:L,context:V,controller:U});gG(z,J,U);let _=VK(K,J),R=dI({subprocess:K,kill:z,all:_,options:J,startTime:X,verboseInfo:Q,fileDescriptors:H,originalStreams:W,command:$,escapedCommand:Y,context:V,onInternalError:L,controller:U});return{subprocess:K,promise:R,kill:z,all:_}},uI=({promise:Z,nodeChildProcess:q,kill:J,all:X,convertedStreams:Q,options:$})=>{let Y=xK(Z,pI(q,X));if(Y.kill=J??Y.kill,Q===void 0)kK(Y,$);else Object.assign(Y,Q);return ZG(Y,q,$),Y},pI=(Z,q)=>({nodeChildProcess:Z,pid:Z.pid,stdin:Z.stdin,stdout:Z.stdout,stderr:Z.stderr,stdio:Z.stdio,all:q,kill:Z.kill.bind(Z)}),dI=async({subprocess:Z,kill:q,all:J,options:X,startTime:Q,verboseInfo:$,fileDescriptors:Y,originalStreams:H,command:K,escapedCommand:U,context:W,onInternalError:V,controller:L})=>{let[z,[_,R],M,F,k]=await DK({subprocess:Z,kill:q,all:J,options:X,context:W,verboseInfo:$,fileDescriptors:Y,originalStreams:H,onInternalError:V,controller:L});L.abort(),V.resolve();let D=M.map((T,A)=>H1(T,X,A)),O=H1(F,X,"all"),j=cI({errorInfo:z,exitCode:_,signal:R,stdio:D,all:O,ipcOutput:k,context:W,options:X,command:K,escapedCommand:U,startTime:Q});return C2(j,$,X)},cI=({errorInfo:Z,exitCode:q,signal:J,stdio:X,all:Q,ipcOutput:$,context:Y,options:H,command:K,escapedCommand:U,startTime:W})=>("error"in Z)?h6({error:Z.error,command:K,escapedCommand:U,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof $1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:q,signal:J,stdio:X,all:Q,ipcOutput:$,options:H,startTime:W,isSync:!1}):p8({command:K,escapedCommand:U,stdio:X,all:Q,ipcOutput:$,options:H,startTime:W});var vK=B(()=>{m8();_3();g3();T1();m3();AZ();k6();f6();d8();WG();_G();p6();kG();L8();vG();mG();GK();sZ();AK();NK();w2();PK()});var D7=(Z,q)=>{let J={__proto__:null,...Z},X=Object.fromEntries(Object.entries(q).map(([Q,$])=>[Q,lI(Q,J[Q],$)]));return{...J,...X}},lI=(Z,q,J)=>{if(nI.has(Z)&&e(q)&&e(J))return{...q,...J};return J},nI;var CK=B(()=>{Z1();Q1();nI=new Set(["env",...V3])});var m2=(Z,q,J,X)=>{let Q=(Y,H,K)=>m2(Y,H,J,K),$=(...Y)=>iI({mapArguments:Z,deepOptions:J,boundOptions:q,setBoundExeca:X,createNested:Q},...Y);if(X!==void 0)X($,Q,q);return $},iI=({mapArguments:Z,deepOptions:q={},boundOptions:J={},setBoundExeca:X,createNested:Q},$,...Y)=>{if(e($))return Q(Z,D7(J,$),X);let{file:H,commandArguments:K,options:U,isSync:W}=aI({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:q,boundOptions:J});return W?iH(H,K,U):EK(H,K,U,Q)},aI=({mapArguments:Z,firstArgument:q,nextArguments:J,deepOptions:X,boundOptions:Q})=>{let $=sQ(q)?rQ(q,J):[q,...J],[Y,H,K]=i4(...$),U=D7(D7(X,Q),K),{options:W=U,isSync:V=!1}=Z({options:U});return{file:Y,commandArguments:H,options:W,isSync:V}};var yK=B(()=>{Z1();H3();tQ();aH();vK();CK()});var SK=(Z,q,J)=>{Z.sync=q(oI,J),Z.s=Z.sync},bK=({options:Z})=>hK(Z),oI=({options:Z})=>({...hK(Z),isSync:!0}),hK=(Z)=>({options:{...sI(Z),...Z}}),sI=({input:Z,inputFile:q,stdio:J})=>Z===void 0&&q===void 0&&J===void 0?{stdin:"inherit"}:{},fK;var gK=B(()=>{fK={preferLocal:!0}});var Jq,P0,Bc,Lc,zc,_c,Rc,Mc;var u2=B(()=>{yK();C3();gK();AZ();Jq=m2(()=>({})),P0=m2(()=>({isSync:!0})),Bc=m2(v9),Lc=m2(bK,{},fK,SK),{sendMessage:zc,getOneMessage:_c,getEachMessage:Rc,getCancelSignal:Mc}=qG()});import{execSync as rI}from"child_process";function c2(Z,q){let X=[];try{const J=p2(X,A7`execSync: ${Z.slice(0,100)}`,0);return rI(Z,q)}catch(Q){var $=Q,Y=1}finally{d2(X,$,Y)}}var Xq=B(()=>{R0()});async function tI(Z){if(process.platform==="win32"){let J=await Jq(`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 q=await Jq(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim()}function eI(Z){if(process.platform==="win32")try{return c2(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return c2(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var Qq,mK,j7;var T7=B(()=>{u2();Xq();Qq=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,mK=Qq?async(Z)=>Qq(Z):tI,j7=Qq??eI});import{createHash as ZO}from"crypto";import{readFileSync as $q,realpathSync as uK,statSync as pK}from"fs";import{open as qO,readdir as JO,readFile as XO,realpath as dK,stat as oK}from"fs/promises";import{basename as QO,dirname as Yq,join as F0,resolve as O7,sep as cK}from"path";function $O(){function Z(q){let J=lK(q);return J===sK?null:J}return Z.cache=lK.cache,Z}function YO(){function Z(q){let J=R2(q);if(!J)return null;return Hq(J)}return Z.cache=Hq.cache,Z}function HO(Z){let q=new Set,J=[];for(let X of Z){if(!X||q.has(X))continue;q.add(X),J.push(X)}return J}function pc(Z,q){return HO([n1(Z),...q.map((J)=>n1(J))])}async function dc(Z,q){let J=q?.maxDepth??3,X=q?.maxDirs??1500,Q=[],$=0,Y=async(K)=>{try{return await oK(F0(K,".git")),!0}catch{return!1}},H=async(K,U)=>{if(U>J||$>=X)return;let W;try{W=await JO(K,{withFileTypes:!0})}catch{return}for(let V of W){if($>=X)return;if(!V.isDirectory())continue;if(V.name.startsWith(".")||GO.has(V.name))continue;let L=F0(K,V.name);if($++,await Y(L)){Q.push(Hq(L.normalize("NFC")));continue}await H(L,U+1)}};return await H(Z,1),Q}function cc(Z){return S0(Z)}async function lc(){let Z=t(),q=R2(Z);if(!q)return!1;try{let[J,X]=await Promise.all([dK(Z),dK(q)]);return J===X}catch{return Z===q}}function VO(Z){let q=Z.trim();if(!q)return null;let J=q.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(J&&J[1]&&J[2])return`${J[1]}/${J[2]}`.toLowerCase();let X=q.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(X&&X[1]&&X[2]){let Q=X[1],$=X[2];if(DO(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 ic(){let Z=await Gq();if(!Z)return null;let q=VO(Z);if(!q)return null;return ZO("sha256").update(q).digest("hex").substring(0,16)}async function tc(){try{let[Z,q,J,X,Q,$]=await Promise.all([UO(),WO(),Gq(),BO(),LO(),_O()]);return{commitHash:Z,branchName:q,remoteUrl:J,isHeadOnRemote:X,isClean:Q,worktreeCount:$}}catch(Z){return null}}async function ec(){let{parseGitRemote:Z}=await import("./detectRepository-1.1.30-2xwvggy6.mjs"),q=await Gq();if(!q)return P("Local GitHub repo: unknown"),null;let J=Z(q);if(J&&J.host==="github.com"){let X=`${J.owner}/${J.name}`;return P(`Local GitHub repo: ${X}`),X}return P("Local GitHub repo: unknown"),null}async function MO(){let{stdout:Z,code:q}=await a(o(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(q===0&&Z.trim())return Z.trim();let{stdout:J,code:X}=await a(o(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(X===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(o(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function FO(){return SQ()}async function I7(){let{stdout:Z,code:q}=await a(o(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),J=Z.trim();if(q!==0||!J)return[];let X=J.split(`
51
+ `).filter(Boolean),Q=[],$=0;for(let Y of X){if(Q.length>=aK){P(`Untracked file capture: reached max file count (${aK})`);break}if(AQ(Y))continue;try{let K=(await oK(Y)).size;if(K>nK){P(`Untracked file capture: skipping ${Y} (exceeds ${nK} bytes)`);continue}if($+K>iK){P(`Untracked file capture: reached total size limit (${iK} bytes)`);break}if(K===0){Q.push({path:Y,content:""});continue}let U=Math.min(RO,K),W=await qO(Y,"r");try{let V=Buffer.alloc(U),{bytesRead:L}=await W.read(V,0,U,0),z=V.subarray(0,L);if(jQ(z))continue;let _;if(K<=U)_=z.toString("utf-8");else _=await XO(Y,"utf-8");Q.push({path:Y,content:_}),$+=K}finally{await W.close()}}catch(H){P(`Failed to read untracked file ${Y}: ${H}`)}}return Q}async function Zl(){try{if(!await KO())return null;if(await FO()){P("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([a(o(),["diff","HEAD"]),I7()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let q=await MO();if(!q){P("No remote found, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([a(o(),["diff","HEAD"]),I7()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let{stdout:J,code:X}=await a(o(),["merge-base","HEAD",q],{preserveOutputOnError:!1});if(X!==0||!J.trim()){P("Merge-base failed, using HEAD-only mode for issue");let[{stdout:z},_]=await Promise.all([a(o(),["diff","HEAD"]),I7()]);return{remote_base_sha:null,remote_base:null,patch:z||"",untracked_files:_,format_patch:null,head_sha:null,branch_name:null}}let Q=J.trim(),[{stdout:$},Y,{stdout:H,code:K},{stdout:U},{stdout:W}]=await Promise.all([a(o(),["diff",Q]),I7(),a(o(),["format-patch",`${Q}..HEAD`,"--stdout"]),a(o(),["rev-parse","HEAD"]),a(o(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(K===0&&H&&H.trim())V=H;let L=W?.trim();return{remote_base_sha:Q,remote_base:q,patch:$||"",untracked_files:Y,format_patch:V,head_sha:U?.trim()||null,branch_name:L&&L!=="HEAD"?L:null}}catch(Z){return S(Z),null}}function DO(Z){let q=Z.split(":")[0]??"";return q==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(q)}function ql(){let Z=N(),q=t(),J=F0(q,".git");try{let X=Z.statSync(J);if(X.isFile())return!1;if(X.isDirectory()){let Q=F0(J,"HEAD");try{if(Z.statSync(Q).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(F0(q,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(F0(q,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(F0(q,"refs")).isDirectory())return!0}catch{}return!1}var sK,lK,R2,Hq,n1,GO,o,KO,rK=async(Z)=>{return R2(Z)!==null},UO=async()=>{return vQ()},WO=async(Z)=>{if(Z){let{stdout:q,code:J}=await i1(o(),["--no-optional-locks","rev-parse","--abbrev-ref","HEAD"],{cwd:Z,timeout:5000,preserveOutputOnError:!1});return J===0?q.trim():""}return EQ()},nc=async()=>{return yQ()},Gq=async()=>{return CQ()},BO=async()=>{let{code:Z}=await a(o(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},ac=async()=>{let{stdout:Z,code:q}=await a(o(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return q===0&&parseInt(Z.trim(),10)>0},oc=async(Z)=>{let q=["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{stdout:J,code:X}=Z?await i1(o(),q,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await a(o(),q,{preserveOutputOnError:!1,useCwd:!0});if(X!==0)return{ahead:0,behind:0};let Q=J.trim().split(/\s+/);if(Q.length!==2)return{ahead:0,behind:0};let $=parseInt(Q[0],10),Y=parseInt(Q[1],10);return{ahead:Number.isFinite(Y)?Y:0,behind:Number.isFinite($)?$:0}},LO=async(Z)=>{let q=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)q.push("-uno");let{stdout:J}=await a(o(),q,{preserveOutputOnError:!1});return J.trim().length===0},sc=async()=>{let{stdout:Z}=await a(o(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
52
+ `).map((q)=>q.trim().split(" ",2)[1]?.trim()).filter((q)=>typeof q==="string")},zO=async(Z)=>{let q=["--no-optional-locks","status","--porcelain"],{stdout:J}=Z?await i1(o(),q,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await a(o(),q,{preserveOutputOnError:!1}),X=[],Q=[];return J.trim().split(`
53
+ `).filter(($)=>$.length>0).forEach(($)=>{let Y=$.substring(0,2),H=$.substring(2).trim();if(Y==="??")Q.push(H);else if(H)X.push(H)}),{tracked:X,untracked:Q}},_O=async()=>{return bQ()},rc=async(Z)=>{try{let q=Z||`Claudin auto-stash - ${new Date().toISOString()}`,{untracked:J}=await zO();if(J.length>0){let{code:Q}=await a(o(),["add",...J],{preserveOutputOnError:!1});if(Q!==0)return!1}let{code:X}=await a(o(),["stash","push","--message",q],{preserveOutputOnError:!1});return X===0}catch(q){return!1}},nK=524288000,iK=5368709120,aK=20000,RO=65536;var D6=B(()=>{I1();TQ();e0();G1();_6();w7();M0();hQ();k0();n4();T7();sK=Symbol("git-root-not-found"),lK=M1((Z)=>{let q=Date.now();H0("info","find_git_root_started");let J=O7(Z),X=J.substring(0,J.indexOf(cK)+1)||cK,Q=0;while(J!==X){try{let Y=F0(J,".git");Q++;let H=pK(Y);if(H.isDirectory()||H.isFile())return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!0}),J.normalize("NFC")}catch{}let $=Yq(J);if($===J)break;J=$}try{let $=F0(X,".git");Q++;let Y=pK($);if(Y.isDirectory()||Y.isFile())return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!0}),X.normalize("NFC")}catch{}return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!1}),sK},(Z)=>Z,50),R2=$O();Hq=M1((Z)=>{try{let q=$q(F0(Z,".git"),"utf-8").trim();if(!q.startsWith("gitdir:"))return Z;let J=O7(Z,q.slice(7).trim()),X=O7(J,$q(F0(J,"commondir"),"utf-8").trim());if(O7(Yq(J))!==F0(X,"worktrees"))return Z;if(uK($q(F0(J,"gitdir"),"utf-8").trim())!==F0(uK(Z),".git"))return Z;if(QO(X)!==".git")return X.normalize("NFC");return Yq(X).normalize("NFC")}catch{return Z}},(Z)=>Z,50),n1=YO();GO=new Set(["node_modules",".git","dist","build","out","target","vendor","coverage",".next",".turbo",".cache",".venv","venv","__pycache__"]);o=u(()=>{return j7("git")||"git"}),KO=u(async()=>{let Z=Date.now();H0("info","is_git_check_started");let q=R2(t())!==null;return H0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:q}),q})});import{readdir as Ql,readFile as AO}from"fs/promises";import{release as jO}from"os";var Kl,g0,Ul,Wl;var l2=B(()=>{I1();M0();k0();Kl=["macos","wsl"],g0=u(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){S(Z)}return"linux"}return"unknown"}catch(Z){return S(Z),"unknown"}}),Ul=u(()=>{if(process.platform!=="linux")return;try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"}),q=Z.match(/WSL(\d+)/i);if(q&&q[1])return q[1];if(Z.toLowerCase().includes("microsoft"))return"1";return}catch(Z){S(Z);return}}),Wl=u(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:jO()};try{let q=await AO("/etc/os-release","utf8");for(let J of q.split(`
54
+ `)){let X=J.match(/^(ID|VERSION_ID)=(.*)$/);if(X&&X[1]&&X[2]){let Q=X[2].replace(/^"|"$/g,"");if(X[1]==="ID")Z.linuxDistroId=Q;else Z.linuxDistroVersion=Q}}}catch{}return Z})});import*as n2 from"path";import*as tK from"path/win32";function Kq(Z){try{return c2(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function TO(Z){if(Z==="git"){let q=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let J of q)if(Kq(J))return J}try{let J=c2(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
55
+ `).filter(Boolean),X=t().toLowerCase();for(let Q of J){let $=n2.resolve(Q).toLowerCase();if(n2.dirname($).toLowerCase()===X||$.startsWith(X+n2.sep)){P(`Skipping potentially malicious executable in current directory: ${Q}`);continue}return Q}return null}catch{return null}}function Fl(){if(g0()==="windows"){let Z=IO();process.env.SHELL=Z,P(`Using bash path: "${Z}"`)}}var IO,Dl,eK;var ZU=B(()=>{I1();e0();G1();Xq();n4();l2();IO=u(()=>{if(process.env.CLAUDIN_GIT_BASH_PATH){if(Kq(process.env.CLAUDIN_GIT_BASH_PATH))return process.env.CLAUDIN_GIT_BASH_PATH;console.error(`Claudin was unable to find CLAUDIN_GIT_BASH_PATH path "${process.env.CLAUDIN_GIT_BASH_PATH}"`),process.exit(1)}let Z=TO("git");if(Z){let q=tK.join(Z,"..","..","bin","bash.exe");if(Kq(q))return q}console.error("Claudin 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: CLAUDIN_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),Dl=M1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let q=Z.match(/^([A-Za-z]):[/\\]/);if(q)return"/"+q[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),eK=M1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let q=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(q){let X=q[1].toUpperCase(),Q=Z.slice(("/cygdrive/"+q[1]).length);return X+":"+(Q||"\\").replace(/\//g,"\\")}let J=Z.match(/^\/([A-Za-z])(\/|$)/);if(J){let X=J[1].toUpperCase(),Q=Z.slice(2);return X+":"+(Q||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as qU}from"os";import{dirname as JU,isAbsolute as wO,join as kO,normalize as Uq,relative as NO,resolve as xO}from"path";function Vq(Z,q){let J=q??t()??N().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 X=Z.trim();if(!X)return Uq(J).normalize("NFC");if(X==="~")return qU().normalize("NFC");if(X.startsWith("~/"))return kO(qU(),X.slice(2)).normalize("NFC");let Q=X;if(g0()==="windows"&&X.match(/^\/[a-z]\//i))try{Q=eK(X)}catch{Q=X}if(wO(Q))return Uq(Q).normalize("NFC");return xO(J,Q).normalize("NFC")}function Nl(Z){let q=NO(t(),Z);return q.startsWith("..")?Z:q}function xl(Z){let q=Vq(Z);if(q.startsWith("\\\\")||q.startsWith("//"))return JU(q);try{if(N().statSync(q).isDirectory())return q}catch{}return JU(q)}function Pl(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function a1(Z){return Uq(Z).replace(/\\/g,"/")}var k7=B(()=>{e0();M0();l2();ZU();OO()});function EO(Z,q,J){if(J!==void 0&&!N7(Z[q],J)||J===void 0&&!(q in Z))QU(Z,q,J)}var t6;var Bq=B(()=>{PO();XU();t6=EO});function vO(Z){return function(q,J,X){var Q=-1,$=Object(q),Y=X(q),H=Y.length;while(H--){var K=Y[Z?H:++Q];if(J($[K],K,$)===!1)break}return q}}var $U;var YU=B(()=>{$U=vO});var CO,HU;var GU=B(()=>{YU();CO=$U(),HU=CO});function yO(Z){return x7(Z)&&P7(Z)}var WU;var VU=B(()=>{UU();KU();WU=yO});function pO(Z){if(!x7(Z)||BU(Z)!=hO)return!1;var q=LU(Z);if(q===null)return!0;var J=mO.call(q,"constructor")&&q.constructor;return typeof J=="function"&&J instanceof J&&zU.call(J)==uO}var hO="[object Object]",fO,gO,zU,mO,uO,_U;var RU=B(()=>{SO();bO();KU();fO=Function.prototype,gO=Object.prototype,zU=fO.toString,mO=gO.hasOwnProperty,uO=zU.call(Object);_U=pO});function dO(Z,q){if(q==="constructor"&&typeof Z[q]==="function")return;if(q=="__proto__")return;return Z[q]}var e6;var Lq=B(()=>{e6=dO});function lO(Z){return MU(Z,E7(Z))}var DU;var AU=B(()=>{cO();FU();DU=lO});function qw(Z,q,J,X,Q,$,Y){var H=e6(Z,J),K=e6(q,J),U=Y.get(K);if(U){t6(Z,J,U);return}var W=$?$(H,K,J+"",Z,q,Y):void 0,V=W===void 0;if(V){var L=zq(K),z=!L&&TU(K),_=!L&&!z&&IU(K);if(W=K,L||z||_)if(zq(H))W=H;else if(WU(H))W=wU(H);else if(z)V=!1,W=OU(K,!0);else if(_)V=!1,W=kU(K,!0);else W=[];else if(_U(K)||_q(K)){if(W=H,_q(H))W=DU(H);else if(!t0(H)||jU(H))W=NU(K)}else V=!1}if(V)Y.set(K,W),Q(W,K,X,$,Y),Y.delete(K);t6(Z,J,W)}var xU;var PU=B(()=>{Bq();rO();eO();tO();Zw();aO();iO();VU();oO();nO();g4();RU();sO();Lq();AU();xU=qw});function vU(Z,q,J,X,Q){if(Z===q)return;HU(q,function($,Y){if(Q||(Q=new EU),t0($))xU(Z,q,Y,J,vU,X,Q);else{var H=X?X(e6(Z,Y),$,Y+"",Z,q,Q):void 0;if(H===void 0)H=$;t6(Z,Y,H)}},E7)}var CU;var yU=B(()=>{Jw();Bq();GU();PU();g4();FU();Lq();CU=vU});function Xw(Z,q,J){switch(J.length){case 0:return Z.call(q);case 1:return Z.call(q,J[0]);case 2:return Z.call(q,J[0],J[1]);case 3:return Z.call(q,J[0],J[1],J[2])}return Z.apply(q,J)}var SU;var bU=B(()=>{SU=Xw});function Qw(Z,q,J){return q=hU(q===void 0?Z.length-1:q,0),function(){var X=arguments,Q=-1,$=hU(X.length-q,0),Y=Array($);while(++Q<$)Y[Q]=X[q+Q];Q=-1;var H=Array(q+1);while(++Q<q)H[Q]=X[Q];return H[q]=J(Y),SU(Z,this,H)}}var hU,fU;var gU=B(()=>{bU();hU=Math.max;fU=Qw});function $w(Z){return function(){return Z}}var mU;var uU=B(()=>{mU=$w});var Hw,dU;var cU=B(()=>{uU();Yw();pU();Hw=!Rq?v7:function(Z,q){return Rq(Z,"toString",{configurable:!0,enumerable:!1,value:mU(q),writable:!0})},dU=Hw});function Ww(Z){var q=0,J=0;return function(){var X=Uw(),Q=Kw-(X-J);if(J=X,Q>0){if(++q>=Gw)return arguments[0]}else q=0;return Z.apply(void 0,arguments)}}var Gw=800,Kw=16,Uw,lU;var nU=B(()=>{Uw=Date.now;lU=Ww});var Vw,iU;var aU=B(()=>{cU();nU();Vw=lU(dU),iU=Vw});function Bw(Z,q){return iU(fU(Z,q,v7),Z+"")}var oU;var sU=B(()=>{pU();gU();aU();oU=Bw});function Lw(Z,q,J){if(!t0(J))return!1;var X=typeof q;if(X=="number"?P7(J)&&m4(q,J.length):X=="string"&&(q in J))return N7(J[q],Z);return!1}var rU;var tU=B(()=>{XU();UU();GQ();g4();rU=Lw});function zw(Z){return oU(function(q,J){var X=-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&&rU(J[0],J[1],Y))$=Q<3?void 0:$,Q=1;q=Object(q);while(++X<Q){var H=J[X];if(H)Z(q,H,X,$)}return q})}var eU;var ZW=B(()=>{sU();tU();eU=zw});var _w,K1;var qW=B(()=>{yU();ZW();_w=eU(function(Z,q,J,X){CU(Z,q,J,X)}),K1=_w});function Mq(Z){let{buffer:q,bytesRead:J}=N().readSync(Z,{length:4096});if(J===0)return"utf8";if(J>=2){if(q[0]===255&&q[1]===254)return"utf16le"}if(J>=3&&q[0]===239&&q[1]===187&&q[2]===191)return"utf8";return"utf8"}function Fq(Z){let q=0,J=0;for(let X=0;X<Z.length;X++)if(Z[X]===`
56
+ `)if(X>0&&Z[X-1]==="\r")q++;else J++;return q>J?"CRLF":"LF"}function Rw(Z){let q=N(),{resolvedPath:J,isSymlink:X}=O1(q,Z);if(X)P(`Reading through symlink: ${Z} -> ${J}`);let Q=Mq(J),$=q.readFileSync(J,{encoding:Q}),Y=Fq($.slice(0,4096));return{content:$.replaceAll(`\r
57
+ `,`
58
+ `),encoding:Q,lineEndings:Y}}function U1(Z){return Rw(Z).content}var Z4=B(()=>{G1();M0()});function E0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var C7=()=>{};import{join as Mw}from"path";function Qi(Z){q4=Z}function $i(){q4=null,Dq=void 0}function Yi(Z){return Dq=Z,Z}function Dw(){return Mw(G0(),Fw)}function Aw(){try{let Z=U1(Dw()),q=Z0(E0(Z));if(!q||typeof q!=="object"||Array.isArray(q))return null;return q}catch{return null}}function y7(){if(Dq!==!0)return null;if(q4)return q4;let Z=Aw();if(Z)return q4=Z,J4(),Z;return null}var Fw="remote-settings.json",q4=null,Dq;var XW=B(()=>{W1();Z4();C7();JW();R0()});function Gi(Z,q){return Z.flatMap((J,X)=>X?[q(X),J]:[J])}function Aq(Z,q){let J=0;for(let X of Z)J+=+!!q(X);return J}function QW(Z){return[...new Set(Z)]}var jq=()=>{};class $W{cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let q=N(),J;try{J=q.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let X=this.cache.get(Z);if(X&&X.mtime===J.mtimeMs)return{content:X.content,encoding:X.encoding};let Q=HW(Z),$=q.readFileSync(Z,{encoding:Q}).replaceAll(`\r
59
+ `,`
60
+ `);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())}}get size(){return this.cache.size}}var Tq;var YW=B(()=>{S7();M0();Tq=new $W});import{chmodSync as jw,writeFileSync as GW}from"fs";import{realpath as Tw,stat as BW}from"fs/promises";import{homedir as LW}from"os";import{basename as Iq,dirname as b7,extname as KW,isAbsolute as Iw,join as i2,normalize as Ow,relative as zW,resolve as ww,sep as X4}from"path";async function Ni(Z){try{return await BW(Z),!0}catch{return!1}}function xi(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(q){return S(q),null}}function Pi(Z){let q=N();return Math.floor(q.statSync(Z).mtimeMs)}async function Ei(Z){let q=await N().stat(Z);return Math.floor(q.mtimeMs)}function vi(Z,q,J,X){let Q=q;if(X==="CRLF")Q=q.replaceAll(`\r
61
+ `,`
62
+ `).split(`
63
+ `).join(`\r
64
+ `);o2(Z,Q,{encoding:J}),Tq.invalidate(Z)}function HW(Z){try{let q=N(),{resolvedPath:J}=O1(q,Z);return Mq(J)}catch(q){if(VW(q))P(`detectFileEncoding failed for expected reason: ${q.code}`,{level:"debug"});else S(q);return"utf8"}}function Ci(Z,q="utf8"){try{let J=N(),{resolvedPath:X}=O1(J,Z),{buffer:Q,bytesRead:$}=J.readSync(X,{length:4096}),Y=Q.toString(q,0,$);return Fq(Y)}catch(J){return S(J),"LF"}}function yi(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(q)=>" ".repeat(q.length))}function Nw(Z){let q=Z?Vq(Z):void 0,J=q?zW(t(),q):void 0;return{absolutePath:q,relativePath:J}}function Si(Z){let{relativePath:q}=Nw(Z);if(q&&!q.startsWith(".."))return q;let J=LW();if(Z.startsWith(J+X4))return"~"+Z.slice(J.length);return Z}function bi(Z){let q=N();try{let J=b7(Z),X=Iq(Z,KW(Z)),Y=q.readdirSync(J).filter((H)=>Iq(H.name,KW(H.name))===X&&i2(J,H.name)!==Z)[0];if(Y)return Y.name;return}catch(J){if(!a2(J))S(J);return}}async function fi(Z){let q=t(),J=b7(q),X=Z;try{let H=await Tw(b7(Z));X=i2(H,Iq(Z))}catch{}let Q=J===X4?X4:J+X4;if(!X.startsWith(Q)||X.startsWith(q+X4)||X===q)return;let $=zW(J,X),Y=i2(q,$);try{return await BW(Y),Y}catch{return}}function xw(){return!s1("tengu_compact_line_prefix_killswitch",!1)}function gi({content:Z,startLine:q}){if(!Z)return"";let J=Z.split(/\r?\n/);if(xw())return J.map((X,Q)=>`${Q+q}→${X}`).join(`
65
+ `);return J.map((X,Q)=>{let $=String(Q+q);if($.length>=6)return`${$}→${X}`;return`${$.padStart(6," ")}→${X}`}).join(`
66
+ `)}function mi(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function ui(Z){try{return N().isDirEmptySync(Z)}catch(q){return a2(q)}}function pi(Z){let{content:q}=Tq.readFile(Z);return q}function o2(Z,q,J={encoding:"utf-8"}){let X=N(),Q=Z;try{let K=X.readlinkSync(Z);Q=Iw(K)?K:ww(b7(Z),K),P(`Writing through symlink: ${Z} -> ${Q}`)}catch{}let $=`${Q}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=X.statSync(Q).mode,H=!0,P(`Preserving file permissions: ${Y.toString(8)}`)}catch(K){if(!a2(K))throw K;if(J.mode!==void 0)Y=J.mode,P(`Setting permissions for new file: ${Y.toString(8)}`)}try{P(`Writing to temp file: ${$}`);let K={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)K.mode=J.mode;if(GW($,q,K),P(`Temp file written successfully, size: ${q.length} bytes`),H&&Y!==void 0)jw($,Y),P("Applied original permissions to temp file");P(`Renaming ${$} to ${Q}`),X.renameSync($,Q),P(`File ${Q} written atomically`)}catch(K){P(`Failed to write file atomically: ${K}`,{level:"error"}),o0("",{});try{P(`Cleaning up temp file: ${$}`),X.unlinkSync($)}catch(U){P(`Failed to clean up temp file: ${U}`)}P(`Falling back to non-atomic write for ${Q}`);try{let U={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)U.mode=J.mode;GW(Q,q,U),P(`File ${Q} written successfully with non-atomic fallback`)}catch(U){throw P(`Non-atomic write also failed: ${U}`),U}}}function di(){let Z=g0(),q=LW();if(Z==="macos")return i2(q,"Desktop");if(Z==="windows"){let X=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(X){let $=`/mnt/c${X.replace(/^[A-Z]:/,"")}/Desktop`;if(N().existsSync($))return $}try{let $=N().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=i2("/mnt/c/Users",Y.name,"Desktop");if(N().existsSync(H))return H}}catch(Q){S(Q)}}let J=i2(q,"Desktop");if(N().existsSync(J))return J;return q}function ci(Z,q=kw){try{return N().statSync(Z).size<=q}catch{return!1}}function UW(Z){let q=Ow(Z);if(g0()==="windows")q=q.replace(/\//g,"\\").toLowerCase();return q}function li(Z,q){return UW(Z)===UW(q)}var kw=262144,hi="Note: your current working directory is";var S7=B(()=>{WW();Oq();e0();G1();o1();Z4();YW();M0();k0();k7();l2()});import{appendFile as Pw,mkdir as Ew,readFile as vw,writeFile as Cw}from"fs/promises";import{homedir as yw}from"os";import{dirname as Sw,join as bw}from"path";async function hw(Z,q){let{code:J}=await i1("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:q});return J===0}function fw(){return bw(yw(),".config","git","ignore")}async function _W(Z,q=t()){try{if(!await rK(q))return;let J=`**/${Z}`,X=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await hw(X,q))return;let Q=fw(),$=Sw(Q);await Ew($,{recursive:!0});try{if((await vw(Q,{encoding:"utf-8"})).includes(J))return;await Pw(Q,`
67
+ ${J}
68
+ `)}catch(Y){if(W0(Y)==="ENOENT")await Cw(Q,`${J}
69
+ `,"utf-8");else throw Y}}catch(J){S(J)}}var RW=B(()=>{e0();o1();w7();D6();k0()});function $4(Z,q=!1){let J=Z.length,X=0,Q="",$=0,Y=16,H=0,K=0,U=0,W=0,V=0;function L(D,O){let j=0,T=0;while(j<D||!O){let A=Z.charCodeAt(X);if(A>=48&&A<=57)T=T*16+A-48;else if(A>=65&&A<=70)T=T*16+A-65+10;else if(A>=97&&A<=102)T=T*16+A-97+10;else break;X++,j++}if(j<D)T=-1;return T}function z(D){X=D,Q="",$=0,Y=16,V=0}function _(){let D=X;if(Z.charCodeAt(X)===48)X++;else{X++;while(X<Z.length&&s2(Z.charCodeAt(X)))X++}if(X<Z.length&&Z.charCodeAt(X)===46)if(X++,X<Z.length&&s2(Z.charCodeAt(X))){X++;while(X<Z.length&&s2(Z.charCodeAt(X)))X++}else return V=3,Z.substring(D,X);let O=X;if(X<Z.length&&(Z.charCodeAt(X)===69||Z.charCodeAt(X)===101)){if(X++,X<Z.length&&Z.charCodeAt(X)===43||Z.charCodeAt(X)===45)X++;if(X<Z.length&&s2(Z.charCodeAt(X))){X++;while(X<Z.length&&s2(Z.charCodeAt(X)))X++;O=X}else V=3}return Z.substring(D,O)}function R(){let D="",O=X;while(!0){if(X>=J){D+=Z.substring(O,X),V=2;break}let j=Z.charCodeAt(X);if(j===34){D+=Z.substring(O,X),X++;break}if(j===92){if(D+=Z.substring(O,X),X++,X>=J){V=2;break}switch(Z.charCodeAt(X++)){case 34:D+='"';break;case 92:D+="\\";break;case 47:D+="/";break;case 98:D+="\b";break;case 102:D+="\f";break;case 110:D+=`
70
+ `;break;case 114:D+="\r";break;case 116:D+="\t";break;case 117:let A=L(4,!0);if(A>=0)D+=String.fromCharCode(A);else V=4;break;default:V=5}O=X;continue}if(j>=0&&j<=31)if(Q4(j)){D+=Z.substring(O,X),V=2;break}else V=6;X++}return D}function M(){if(Q="",V=0,$=X,K=H,W=U,X>=J)return $=J,Y=17;let D=Z.charCodeAt(X);if(wq(D)){do X++,Q+=String.fromCharCode(D),D=Z.charCodeAt(X);while(wq(D));return Y=15}if(Q4(D)){if(X++,Q+=String.fromCharCode(D),D===13&&Z.charCodeAt(X)===10)X++,Q+=`
71
+ `;return H++,U=X,Y=14}switch(D){case 123:return X++,Y=1;case 125:return X++,Y=2;case 91:return X++,Y=3;case 93:return X++,Y=4;case 58:return X++,Y=6;case 44:return X++,Y=5;case 34:return X++,Q=R(),Y=10;case 47:let O=X-1;if(Z.charCodeAt(X+1)===47){X+=2;while(X<J){if(Q4(Z.charCodeAt(X)))break;X++}return Q=Z.substring(O,X),Y=12}if(Z.charCodeAt(X+1)===42){X+=2;let j=J-1,T=!1;while(X<j){let A=Z.charCodeAt(X);if(A===42&&Z.charCodeAt(X+1)===47){X+=2,T=!0;break}if(X++,Q4(A)){if(A===13&&Z.charCodeAt(X)===10)X++;H++,U=X}}if(!T)X++,V=1;return Q=Z.substring(O,X),Y=13}return Q+=String.fromCharCode(D),X++,Y=16;case 45:if(Q+=String.fromCharCode(D),X++,X===J||!s2(Z.charCodeAt(X)))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+=_(),Y=11;default:while(X<J&&F(D))X++,D=Z.charCodeAt(X);if($!==X){switch(Q=Z.substring($,X),Q){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return Q+=String.fromCharCode(D),X++,Y=16}}function F(D){if(wq(D)||Q4(D))return!1;switch(D){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let D;do D=M();while(D>=12&&D<=15);return D}return{setPosition:z,getPosition:()=>X,scan:q?k:M,getToken:()=>Y,getTokenValue:()=>Q,getTokenOffset:()=>$,getTokenLength:()=>X-$,getTokenStartLine:()=>K,getTokenStartCharacter:()=>$-W,getTokenError:()=>V}}function wq(Z){return Z===32||Z===9}function Q4(Z){return Z===10||Z===13}function s2(Z){return Z>=48&&Z<=57}var MW;var h7=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"})(MW||(MW={}))});var I0,kq,FW;var DW=B(()=>{I0=Array(20).fill(0).map((Z,q)=>{return" ".repeat(q)}),kq={" ":{"\n":Array(200).fill(0).map((Z,q)=>{return`
72
+ `+" ".repeat(q)}),"\r":Array(200).fill(0).map((Z,q)=>{return"\r"+" ".repeat(q)}),"\r\n":Array(200).fill(0).map((Z,q)=>{return`\r
73
+ `+" ".repeat(q)})},"\t":{"\n":Array(200).fill(0).map((Z,q)=>{return`
74
+ `+"\t".repeat(q)}),"\r":Array(200).fill(0).map((Z,q)=>{return"\r"+"\t".repeat(q)}),"\r\n":Array(200).fill(0).map((Z,q)=>{return`\r
75
+ `+"\t".repeat(q)})}},FW=[`
76
+ `,"\r",`\r
77
+ `]});function Nq(Z,q,J){let X,Q,$,Y,H;if(q){Y=q.offset,H=Y+q.length,$=Y;while($>0&&!Y4(Z,$-1))$--;let j=H;while(j<Z.length&&!Y4(Z,j))j++;Q=Z.substring($,j),X=mw(Q,J)}else Q=Z,X=0,$=0,Y=0,H=Z.length;let K=uw(J,Z),U=FW.includes(K),W=0,V=0,L;if(J.insertSpaces)L=I0[J.tabSize||4]??r2(I0[1],J.tabSize||4);else L="\t";let z=L==="\t"?"\t":" ",_=$4(Q,!1),R=!1;function M(){if(W>1)return r2(K,W)+r2(L,X+V);let j=L.length*(X+V);if(!U||j>kq[z][K].length)return K+r2(L,X+V);if(j<=0)return K;return kq[z][K][j]}function F(){let j=_.scan();W=0;while(j===15||j===14){if(j===14&&J.keepLines)W+=1;else if(j===14)W=1;j=_.scan()}return R=j===16||_.getTokenError()!==0,j}let k=[];function D(j,T,A){if(!R&&(!q||T<H&&A>Y)&&Z.substring(T,A)!==j)k.push({offset:T,length:A-T,content:j})}let O=F();if(J.keepLines&&W>0)D(r2(K,W),0,0);if(O!==17){let j=_.getTokenOffset()+$,T=L.length*X<20&&J.insertSpaces?I0[L.length*X]:r2(L,X);D(T,$,j)}while(O!==17){let j=_.getTokenOffset()+_.getTokenLength()+$,T=F(),A="",b=!1;while(W===0&&(T===12||T===13)){let x=_.getTokenOffset()+$;D(I0[1],j,x),j=_.getTokenOffset()+_.getTokenLength()+$,b=T===12,A=b?M():"",T=F()}if(T===2){if(O!==1)V--;if(J.keepLines&&W>0||!J.keepLines&&O!==1)A=M();else if(J.keepLines)A=I0[1]}else if(T===4){if(O!==3)V--;if(J.keepLines&&W>0||!J.keepLines&&O!==3)A=M();else if(J.keepLines)A=I0[1]}else{switch(O){case 3:case 1:if(V++,J.keepLines&&W>0||!J.keepLines)A=M();else A=I0[1];break;case 5:if(J.keepLines&&W>0||!J.keepLines)A=M();else A=I0[1];break;case 12:A=M();break;case 13:if(W>0)A=M();else if(!b)A=I0[1];break;case 6:if(J.keepLines&&W>0)A=M();else if(!b)A=I0[1];break;case 10:if(J.keepLines&&W>0)A=M();else if(T===6&&!b)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(J.keepLines&&W>0)A=M();else if((T===12||T===13)&&!b)A=I0[1];else if(T!==5&&T!==17)R=!0;break;case 16:R=!0;break}if(W>0&&(T===12||T===13))A=M()}if(T===17)if(J.keepLines&&W>0)A=M();else A=J.insertFinalNewline?K:"";let w=_.getTokenOffset()+$;D(A,j,w),O=T}return k}function r2(Z,q){let J="";for(let X=0;X<q;X++)J+=Z;return J}function mw(Z,q){let J=0,X=0,Q=q.tabSize||4;while(J<Z.length){let $=Z.charAt(J);if($===I0[1])X++;else if($==="\t")X+=Q;else break;J++}return Math.floor(X/Q)}function uw(Z,q){for(let J=0;J<q.length;J++){let X=q.charAt(J);if(X==="\r"){if(J+1<q.length&&q.charAt(J+1)===`
78
+ `)return`\r
79
+ `;return"\r"}else if(X===`
80
+ `)return`
81
+ `}return Z&&Z.eol||`
82
+ `}function Y4(Z,q){return`\r
83
+ `.indexOf(Z.charAt(q))!==-1}var xq=B(()=>{h7();DW()});function AW(Z,q=[],J=H4.DEFAULT){let X=null,Q=[],$=[];function Y(K){if(Array.isArray(Q))Q.push(K);else if(X!==null)Q[X]=K}return Eq(Z,{onObjectBegin:()=>{let K={};Y(K),$.push(Q),Q=K,X=null},onObjectProperty:(K)=>{X=K},onObjectEnd:()=>{Q=$.pop()},onArrayBegin:()=>{let K=[];Y(K),$.push(Q),Q=K,X=null},onArrayEnd:()=>{Q=$.pop()},onLiteralValue:Y,onError:(K,U,W)=>{q.push({error:K,offset:U,length:W})}},J),Q[0]}function Pq(Z,q=[],J=H4.DEFAULT){let X={type:"array",offset:-1,length:-1,children:[],parent:void 0};function Q(K){if(X.type==="property")X.length=K-X.offset,X=X.parent}function $(K){return X.children.push(K),K}Eq(Z,{onObjectBegin:(K)=>{X=$({type:"object",offset:K,length:-1,parent:X,children:[]})},onObjectProperty:(K,U,W)=>{X=$({type:"property",offset:U,length:-1,parent:X,children:[]}),X.children.push({type:"string",value:K,offset:U,length:W,parent:X})},onObjectEnd:(K,U)=>{Q(K+U),X.length=K+U-X.offset,X=X.parent,Q(K+U)},onArrayBegin:(K,U)=>{X=$({type:"array",offset:K,length:-1,parent:X,children:[]})},onArrayEnd:(K,U)=>{X.length=K+U-X.offset,X=X.parent,Q(K+U)},onLiteralValue:(K,U,W)=>{$({type:dw(K),offset:U,length:W,parent:X,value:K}),Q(U+W)},onSeparator:(K,U,W)=>{if(X.type==="property"){if(K===":")X.colonOffset=U;else if(K===",")Q(U)}},onError:(K,U,W)=>{q.push({error:K,offset:U,length:W})}},J);let H=X.children[0];if(H)delete H.parent;return H}function f7(Z,q){if(!Z)return;let J=Z;for(let X of q)if(typeof X==="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===X&&$.children.length===2){J=$.children[1],Q=!0;break}if(!Q)return}else{let Q=X;if(J.type!=="array"||Q<0||!Array.isArray(J.children)||Q>=J.children.length)return;J=J.children[Q]}return J}function Eq(Z,q,J=H4.DEFAULT){let X=$4(Z,!1),Q=[],$=0;function Y(v){return v?()=>$===0&&v(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter()):()=>!0}function H(v){return v?(C)=>$===0&&v(C,X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter()):()=>!0}function K(v){return v?(C)=>$===0&&v(C,X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter(),()=>Q.slice()):()=>!0}function U(v){return v?()=>{if($>0)$++;else if(v(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter(),()=>Q.slice())===!1)$=1}:()=>!0}function W(v){return v?()=>{if($>0)$--;if($===0)v(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter())}:()=>!0}let V=U(q.onObjectBegin),L=K(q.onObjectProperty),z=W(q.onObjectEnd),_=U(q.onArrayBegin),R=W(q.onArrayEnd),M=K(q.onLiteralValue),F=H(q.onSeparator),k=Y(q.onComment),D=H(q.onError),O=J&&J.disallowComments,j=J&&J.allowTrailingComma;function T(){while(!0){let v=X.scan();switch(X.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!O)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(v){case 12:case 13:if(O)A(10);else k();break;case 16:A(1);break;case 15:case 14:break;default:return v}}}function A(v,C=[],d=[]){if(D(v),C.length+d.length>0){let g=X.getToken();while(g!==17){if(C.indexOf(g)!==-1){T();break}else if(d.indexOf(g)!==-1)break;g=T()}}}function b(v){let C=X.getTokenValue();if(v)M(C);else L(C),Q.push(C);return T(),!0}function w(){switch(X.getToken()){case 11:let v=X.getTokenValue(),C=Number(v);if(isNaN(C))A(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 T(),!0}function x(){if(X.getToken()!==10)return A(3,[],[2,5]),!1;if(b(!1),X.getToken()===6){if(F(":"),T(),!i())A(4,[],[2,5])}else A(5,[],[2,5]);return Q.pop(),!0}function E(){V(),T();let v=!1;while(X.getToken()!==2&&X.getToken()!==17){if(X.getToken()===5){if(!v)A(4,[],[]);if(F(","),T(),X.getToken()===2&&j)break}else if(v)A(6,[],[]);if(!x())A(4,[],[2,5]);v=!0}if(z(),X.getToken()!==2)A(7,[2],[]);else T();return!0}function f(){_(),T();let v=!0,C=!1;while(X.getToken()!==4&&X.getToken()!==17){if(X.getToken()===5){if(!C)A(4,[],[]);if(F(","),T(),X.getToken()===4&&j)break}else if(C)A(6,[],[]);if(v)Q.push(0),v=!1;else Q[Q.length-1]++;if(!i())A(4,[],[4,5]);C=!0}if(R(),!v)Q.pop();if(X.getToken()!==4)A(8,[4],[]);else T();return!0}function i(){switch(X.getToken()){case 3:return f();case 1:return E();case 10:return b(!0);default:return w()}}if(T(),X.getToken()===17){if(J.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!i())return A(4,[],[]),!1;if(X.getToken()!==17)A(9,[],[]);return!0}function dw(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 H4;var vq=B(()=>{h7();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(H4||(H4={}))});function jW(Z,q,J,X){let Q=q.slice(),Y=Pq(Z,[]),H=void 0,K=void 0;while(Q.length>0)if(K=Q.pop(),H=f7(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 r1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(J)},X)}else if(H.type==="object"&&typeof K==="string"&&Array.isArray(H.children)){let U=f7(H,[K]);if(U!==void 0)if(J===void 0){if(!U.parent)throw Error("Malformed AST");let W=H.children.indexOf(U.parent),V,L=U.parent.offset+U.parent.length;if(W>0){let z=H.children[W-1];V=z.offset+z.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return r1(Z,{offset:V,length:L-V,content:""},X)}else return r1(Z,{offset:U.offset,length:U.length,content:JSON.stringify(J)},X);else{if(J===void 0)return[];let W=`${JSON.stringify(K)}: ${JSON.stringify(J)}`,V=X.getInsertionIndex?X.getInsertionIndex(H.children.map((z)=>z.children[0].value)):H.children.length,L;if(V>0){let z=H.children[V-1];L={offset:z.offset+z.length,length:0,content:","+W}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:W};else L={offset:H.offset+1,length:0,content:W+","};return r1(Z,L,X)}}else if(H.type==="array"&&typeof K==="number"&&Array.isArray(H.children)){let U=K;if(U===-1){let W=`${JSON.stringify(J)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:W};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+W}}return r1(Z,V,X)}else if(J===void 0&&H.children.length>=0){let W=K,V=H.children[W],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===W){let z=H.children[W-1],_=z.offset+z.length,R=H.offset+H.length;L={offset:_,length:R-2-_,content:""}}else L={offset:V.offset,length:H.children[W+1].offset-V.offset,content:""};return r1(Z,L,X)}else if(J!==void 0){let W,V=`${JSON.stringify(J)}`;if(!X.isArrayInsertion&&H.children.length>K){let L=H.children[K];W={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||K===0)W={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=K>H.children.length?H.children.length:K,z=H.children[L-1];W={offset:z.offset+z.length,length:0,content:","+V}}return r1(Z,W,X)}else throw Error(`Can not ${J===void 0?"remove":X.isArrayInsertion?"insert":"modify"} Array index ${U} as length is not sufficient`)}else throw Error(`Can not add ${typeof K!=="number"?"index":"property"} to parent of type ${H.type}`)}function r1(Z,q,J){if(!J.formattingOptions)return[q];let X=g7(Z,q),Q=q.offset,$=q.offset+q.content.length;if(q.length===0||q.content.length===0){while(Q>0&&!Y4(X,Q-1))Q--;while($<X.length&&!Y4(X,$))$++}let Y=Nq(X,{offset:Q,length:$-Q},{...J.formattingOptions,keepLines:!1});for(let K=Y.length-1;K>=0;K--){let U=Y[K];X=g7(X,U),Q=Math.min(Q,U.offset),$=Math.max($,U.offset+U.length),$+=U.content.length-U.length}let H=Z.length-(X.length-$)-Q;return[{offset:Q,length:H,content:X.substring(Q,$)}]}function g7(Z,q){return Z.substring(0,q.offset)+q.content+Z.substring(q.offset+q.length)}var TW=B(()=>{xq();vq()});function kW(Z,q,J,X){return jW(Z,q,J,X)}function NW(Z,q){let J=q.slice(0).sort((Q,$)=>{let Y=Q.offset-$.offset;if(Y===0)return Q.length-$.length;return Y}),X=Z.length;for(let Q=J.length-1;Q>=0;Q--){let $=J[Q];if($.offset+$.length<=X)Z=g7(Z,$);else throw Error("Overlapping edit");X=$.offset}return Z}var IW,OW,Cq,wW;var xW=B(()=>{xq();TW();h7();vq();(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"})(IW||(IW={}));(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"})(OW||(OW={}));Cq=AW;(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"})(wW||(wW={}))});import{open as nw,readFile as iw,stat as aw}from"fs/promises";function EW(Z,q){try{return{ok:!0,value:JSON.parse(E0(Z))}}catch(J){if(q)S(J);return{ok:!1}}}function Da(Z){if(!Z)return null;try{return Cq(E0(Z))}catch(q){return S(q),null}}function sw(Z){let q=vW,J=Z.length,X=q(Z);if(!X.error||X.done||X.read>=J)return X.values;let{values:Q,read:$}=X;while($<J){let Y=typeof Z==="string"?Z.indexOf(`
84
+ `,$):Z.indexOf(10,$);if(Y===-1)break;$=Y+1;let H=q(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 rw(Z){let q=Z.length,J=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)J=3;let X=[];while(J<q){let Q=Z.indexOf(10,J);if(Q===-1)Q=q;let $=Z.toString("utf8",J,Q).trim();if(J=Q+1,!$)continue;try{X.push(JSON.parse($))}catch{}}return X}function tw(Z){let q=E0(Z),J=q.length,X=0,Q=[];while(X<J){let $=q.indexOf(`
85
+ `,X);if($===-1)$=J;let Y=q.substring(X,$).trim();if(X=$+1,!Y)continue;try{Q.push(JSON.parse(Y))}catch{}}return Q}function yq(Z){if(vW)return sw(Z);if(typeof Z==="string")return tw(Z);return rw(Z)}async function Aa(Z){let H=[];try{let{size:q}=await aw(Z);if(q<=G4)return yq(await iw(Z));const J=p2(H,await nw(Z,"r"),1);let X=Buffer.allocUnsafe(G4);let Q=0;let $=q-G4;while(Q<G4){let{bytesRead:L}=await J.read(X,Q,G4-Q,$+Q);if(L===0)break;Q+=L}let Y=X.indexOf(10);if(Y!==-1&&Y<Q-1)return yq(X.subarray(Y+1,Q));return yq(X.subarray(0,Q))}catch(K){var U=K,W=1}finally{var V=d2(H,U,W);V&&await V}}function ja(Z,q){try{if(!Z||Z.trim()==="")return m([q],null,4);let J=E0(Z),X=Cq(J);if(Array.isArray(X)){let Q=X.length,H=kW(J,Q===0?[0]:[Q],q,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let K=[...X,q];return m(K,null,4)}return NW(J,H)}else return m([q],null,4)}catch(J){return S(J),m([q],null,4)}}var ow=8192,PW,m0,vW,G4=104857600;var m7=B(()=>{xW();C7();k0();n4();R0();PW=M1(EW,(Z)=>Z,50),m0=Object.assign(function(q,J=!0){if(!q)return null;let X=q.length>ow?EW(q,J):PW(q,J);return X.ok?X.value:null},{cache:PW.cache});vW=(()=>{if(typeof Bun>"u")return!1;let q=Bun.JSONL;if(!q?.parseChunk)return!1;return q.parseChunk})()});function ka(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 Na(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"bundled":case"built-in":return"Built-in"}}function xa(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 Pa(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 Ea(Z){if(Z==="")return[];let q=Z.split(",").map((X)=>X.trim()),J=[];for(let X of q)switch(X){case"user":J.push("userSettings");break;case"project":J.push("projectSettings");break;case"local":J.push("localSettings");break;default:throw Error(`Invalid setting source: ${X}. Valid options are: user, project, local`)}return J}function K4(){let Z=CW(),q=new Set(Z);return q.add("policySettings"),q.add("flagSettings"),Array.from(q)}function va(Z){return K4().includes(Z)}var wa,Ca,yW="https://json.schemastore.org/claude-code-settings.json";var Sq=B(()=>{z2();wa=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];Ca=["localSettings","projectSettings","userSettings"]});function SW(Z){u7.set(Z,Date.now())}function Sa(Z,q){let J=u7.get(Z);if(J!==void 0&&Date.now()-J<q)return u7.delete(Z),!0;return!1}function ba(){u7.clear()}var u7;var bW=B(()=>{u7=new Map});function hW(Z){let q=[],J=[];for(let X of Z){if(typeof X!=="string"||X.trim().length===0){J.push({entry:String(X??""),reason:"empty"});continue}if(X.length>1e4){J.push({entry:X,reason:"too-long"});continue}if(ew.test(X)){J.push({entry:X,reason:"control-characters"});continue}if(Zk.test(X)){J.push({entry:X,reason:"invisible-characters"});continue}if(qk.test(X)){J.push({entry:X,reason:"settings-token"});continue}if(q.length>=200){J.push({entry:X,reason:"over-entry-cap"});continue}q.push(X.trim())}return{entries:q,dropped:J}}function ga(Z){return Z.some((q)=>q.trim()==="$defaults")}function $k(Z,q){if(Z.length===0)return[...q];let J=[],X=!1;for(let Q of Z){if(Q.trim()==="$defaults"){if(!X)J.push(...q),X=!0;continue}J.push(Q)}return J}function ma(Z){let q=[],J=[];for(let X of Z){let Q=X.trim();if(Jk.test(Q)||Xk.test(Q)||Qk.test(Q)){J.push({entry:X,reason:"too-broad"});continue}q.push(X)}return{entries:q,dropped:J}}function Yk(Z){return Z.split(`
86
+ `).map((q)=>q.trim()).filter((q)=>q.startsWith("- ")).map((q)=>q.slice(2))}function ua(Z,q){if(Z.length===0)return q;let J=$k(Z,Yk(q));if(J.length===0)return"";return`
87
+ ${J.map((X)=>`- ${X}`).join(`
88
+ `)}
89
+ `}function fW(Z){switch(Z){case"empty":return"empty entry";case"control-characters":return"contains control characters";case"invisible-characters":return"contains invisible or bidirectional characters";case"settings-token":return"contains a settings delimiter token";case"too-long":return"longer than 10000 characters";case"over-entry-cap":return"beyond the 200-entry limit";case"too-broad":return"too broad for auto mode to honor safely"}}var fa="$defaults",ew,Zk,qk,Jk,Xk,Qk;var gW=B(()=>{ew=/[\u0000-\u001F\u007F-\u009F]/,Zk=/[\p{Cf}\p{Zl}\p{Zp}\u2028\u2029\uFE00-\uFE0F]|[\u{E0100}-\u{E01EF}]/u,qk=/<\/?settings_/i,Jk=/^[A-Za-z_][A-Za-z0-9_]*\((\*|:\*|\s*)\)$/,Xk=/^(Bash|PowerShell)\(\s*(sh|bash|zsh|dash|ksh|fish|curl|wget|eval|python3?|node|perl|ruby|env|xargs|sudo|doas|pwsh|powershell)\b[^)]*\*[^)]*\)$/i,Qk=/^(?:allow\s+)?(?:any|all|every)\s+(?:tool\s+calls?|tool\s+uses?|commands?|bash\s+commands?|shell\s+commands?|actions?|operations?)\b/i});import{join as Hk}from"path";var w1,U4;var p7=B(()=>{I1();l2();w1=u(function(){switch(g0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),U4=u(function(){return Hk(w1(),"managed-settings.d")})});var Gk,Kk,mW;var uW=B(()=>{s0();t1();Gk=I(()=>G.object({allowedDomains:G.array(G.string()).optional(),allowManagedDomainsOnly:G.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:G.array(G.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:G.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:G.boolean().optional(),httpProxyPort:G.number().optional(),socksProxyPort:G.number().optional()}).optional()),Kk=I(()=>G.object({allowWrite:G.array(G.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:G.array(G.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:G.array(G.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:G.array(G.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:G.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),mW=I(()=>G.object({enabled:G.boolean().optional(),failIfUnavailable:G.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:G.boolean().optional(),allowUnsandboxedCommands:G.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:Gk(),filesystem:Kk(),ignoreViolations:G.record(G.string(),G.array(G.string())).optional(),enableWeakerNestedSandbox:G.boolean().optional(),enableWeakerNetworkIsolation:G.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:G.array(G.string()).optional(),ripgrep:G.object({command:G.string(),args:G.array(G.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});import{realpathSync as Uk}from"fs";function pW(){return process.versions.bun!==void 0}function ra(){let Z=process.argv[1]||"";if(Z&&!Wk.test(Z))return Z;let q=process.execPath||"";if(!q)return Z;try{return Uk(q)}catch{return q}}function ta(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var Wk;var dW=B(()=>{Wk=/(^|[/\\])(\$bunfs|~BUN)[/\\]/i});function cW(Z,q){return{cmd:j7(Z)??Z,args:q}}var lW=B(()=>{T7()});import{dirname as Vk,join as nW}from"path";async function t2(Z){try{return!!await mK(Z)}catch{return!1}}function Rk(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function Fk(){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 q of Mk)if(Z.includes(q))return q}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(sW())return"ssh-session";if(process.env.TERM){let q=process.env.TERM;if(q.includes("alacritty"))return"alacritty";if(q.includes("rxvt"))return"rxvt";if(q.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function sW(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function Uo(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return e2.platform}var z0,Bk,Lk,zk,oW,_k,Mk,Dk,e2;var bq=B(()=>{I1();aW();dW();W1();lW();M0();T7();z0=u(()=>{let Z=iW(),q=G0(),J=nW(q,`config${Z}.json`);if(!N().existsSync(J)){let Q=process.env.CLAUDIN_CONFIG_DIR?q:Vk(q),$=nW(Q,`.claudin${Z}.json`);if(N().existsSync($))return $}return J}),Bk=u(async()=>{try{let{default:Z}=await import("./index-1.1.30-racdqjba.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});Lk=u(async()=>{let Z=[];if(await t2("npm"))Z.push("npm");if(await t2("yarn"))Z.push("yarn");if(await t2("pnpm"))Z.push("pnpm");return Z}),zk=u(async()=>{let Z=[];if(await t2("bun"))Z.push("bun");if(await t2("deno"))Z.push("deno");if(await t2("node"))Z.push("node");return Z}),oW=u(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),_k=u(()=>{try{if(!oW())return!1;let{cmd:Z}=cW("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});Mk=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];Dk=u(()=>{if(J0(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(J0(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(J0(process.env.RENDER))return"render";if(J0(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(J0(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(N().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(J0(process.env.GITHUB_ACTIONS))return"github-actions";if(J0(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(J0(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(e2.platform==="darwin")return"unknown-darwin";if(e2.platform==="linux")return"unknown-linux";if(e2.platform==="win32")return"unknown-win32";return"unknown"});e2={hasInternetAccess:Bk,isCI:J0(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:Fk(),isSSH:sW,getPackageManagers:Lk,getRuntimes:zk,isRunningWithBun:u(pW),isWslEnvironment:oW,isNpmFromWindowsPath:_k,isConductor:Rk,detectDeploymentEnvironment:Dk}});var Bo,Lo="∙",zo="✻",_o="↑",Ro="↓",Mo="↯",Fo="○",Do="◐",Ao="●",jo="◎",To="◉",Io="◍",Oo="▶",rW="⏸",wo="↻",ko="◇",No="◆",xo="※",Po="▎",Eo,vo="·✔︎·",Co="×";var tW=B(()=>{bq();Bo=e2.platform==="darwin"?"⏺":"●",Eo=["·|·","·/·","·—·","·\\·"]});var Ek={};hq(Ek,{toExternalPermissionMode:()=>Ok,permissionModeTitle:()=>kk,permissionModeSymbol:()=>xk,permissionModeSchema:()=>jk,permissionModeFromString:()=>wk,isExternalPermissionMode:()=>Ik,isDefaultMode:()=>Nk,getModeColor:()=>Pk,externalPermissionModeSchema:()=>Tk,PERMISSION_MODES:()=>Z6,EXTERNAL_PERMISSION_MODES:()=>fq});function Ik(Z){return Z!=="auto"}function d7(Z){return eW[Z]??eW.default}function Ok(Z){return d7(Z).external}function wk(Z){return Z6.includes(Z)?Z:"default"}function kk(Z){return d7(Z).title}function Nk(Z){return Z==="default"||Z===void 0}function xk(Z){return d7(Z).symbol}function Pk(Z){return d7(Z).color}var jk,Tk,eW;var ZV=B(()=>{s0();tW();Ak();t1();jk=I(()=>G.enum(Z6)),Tk=I(()=>G.enum(fq)),eW={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:rW,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 qV=()=>{};var JV;var XV=B(()=>{qV();JV=["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 QV=()=>{};var $V=()=>{};var YV=B(()=>{XV();QV();$V()});var HV,no="bash";var GV=B(()=>{HV=["bash","powershell"]});function vk(){let Z=G.object({type:G.literal("command").describe("Shell command hook type"),command:G.string().describe("Shell command to execute"),if:c7(),shell:G.enum(HV).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:G.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:G.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async."),interactive:G.boolean().optional().describe("If true, stdin stays open after the input JSON so the hook can ask the user a question (the prompt protocol). Leave it off for an ordinary hook: it reads its input to EOF, and an stdin left open blocks it until its timeout.")}),q=G.object({type:G.literal("prompt").describe("LLM prompt hook type"),prompt:G.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:c7(),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:G.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-5"). If not specified, uses the default small fast model.'),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")}),J=G.object({type:G.literal("http").describe("HTTP hook type"),url:G.string().url().describe("URL to POST the hook input JSON to"),if:c7(),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:G.record(G.string(),G.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:G.array(G.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:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")}),X=G.object({type:G.literal("agent").describe("Agentic verifier hook type"),prompt:G.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:c7(),timeout:G.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:G.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-5"). If not specified, uses Haiku.'),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:q,HttpHookSchema:J,AgentHookSchema:X}}var c7,Ck,yk,e1;var l7=B(()=>{YV();s0();t1();GV();c7=I(()=>G.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.'));Ck=I(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:q,AgentHookSchema:J,HttpHookSchema:X}=vk();return G.discriminatedUnion("type",[Z,q,J,X])}),yk=I(()=>G.object({matcher:G.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:G.array(Ck()).describe("List of hooks to execute when the matcher matches")})),e1=I(()=>G.partialRecord(G.enum(JV),G.array(yk())))});var qs,Js,Sk,KV,bk,hk,fk,gk,mk,uk,pk,n7,Xs;var UV=B(()=>{s0();t1();qs=I(()=>G.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),Js=I(()=>G.enum(["stdio","sse","sse-ide","http","ws","sdk"])),Sk=I(()=>G.object({type:G.literal("stdio").optional(),command:G.string().min(1,"Command cannot be empty"),args:G.array(G.string()).default([]),env:G.record(G.string(),G.string()).optional()})),KV=I(()=>G.object({clientId:G.string().optional(),callbackPort:G.number().int().positive().optional(),authServerMetadataUrl:G.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional()})),bk=I(()=>G.object({type:G.literal("sse"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional(),oauth:KV().optional()})),hk=I(()=>G.object({type:G.literal("sse-ide"),url:G.string(),ideName:G.string(),ideRunningInWindows:G.boolean().optional()})),fk=I(()=>G.object({type:G.literal("ws-ide"),url:G.string(),ideName:G.string(),authToken:G.string().optional(),ideRunningInWindows:G.boolean().optional()})),gk=I(()=>G.object({type:G.literal("http"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional(),oauth:KV().optional()})),mk=I(()=>G.object({type:G.literal("ws"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional()})),uk=I(()=>G.object({type:G.literal("sdk"),name:G.string()})),pk=I(()=>G.object({type:G.literal("claudeai-proxy"),url:G.string(),id:G.string()})),n7=I(()=>G.union([Sk(),bk(),hk(),fk(),gk(),mk(),uk(),pk()])),Xs=I(()=>G.object({mcpServers:G.record(G.string(),n7())}))});function Ks(Z,q){let J=Z.toLowerCase();return q.autoUpdate??(i7.has(J)&&!dk.has(J))}function nk(Z){if(i7.has(Z.toLowerCase()))return!1;if(lk.test(Z))return!0;return ck.test(Z)}function ik(Z){let q=Z.trim(),J=ak.exec(q);if(J)return J[1].toLowerCase()==="github.com"&&J[2].toLowerCase()===q6;try{let X=new URL(q);if(X.protocol!=="https:"&&X.protocol!=="ssh:")return!1;if(X.hostname.toLowerCase()!=="github.com")return!1;return X.pathname.split("/").filter(Boolean)[0]?.toLowerCase()===q6}catch{return!1}}function Us(Z,q){let J=Z.toLowerCase();if(!i7.has(J))return null;if(q.source==="github"){if(!(q.repo||"").toLowerCase().startsWith(`${q6}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${q6}/' can use this name.`;return null}if(q.source==="git"&&q.url){if(ik(q.url))return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${q6}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${q6}' organization.`}function Vs(Z){return typeof Z==="string"&&Z.startsWith("./")}function Bs(Z){return Z.source==="file"||Z.source==="directory"}var i7,dk,ck,lk,q6="anthropics",ak,V1,J6,WV,mq,uq,LV,pq,ok,Ws,sk,rk,tk,ek,ZN,qN,VV,JN,XN,zV,QN,$N,BV,YN,_V,HN,GN,W4,gq,RV,KN,UN,Ls,MV,WN,VN,BN,zs,LN,zN,_s,_N,Rs;var FV=B(()=>{s0();l7();UV();t1();i7=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),dk=new Set(["knowledge-work-plugins"]);ck=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,lk=/[^\u0020-\u007E]/;ak=/^git@([^:]+):([^/]+)\//i;V1=I(()=>G.string().startsWith("./")),J6=I(()=>V1().endsWith(".json")),WV=I(()=>G.union([V1().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"),G.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),mq=I(()=>V1().endsWith(".md")),uq=I(()=>G.union([mq(),V1()])),LV=I(()=>G.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)=>!nk(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'})),pq=I(()=>G.object({name:G.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:G.string().optional().describe("Contact email for support or feedback"),url:G.string().optional().describe("Website, GitHub profile, or organization URL")})),ok=I(()=>G.object({name:G.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:G.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:G.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:pq().optional().describe("Information about the plugin creator or maintainer"),homepage:G.string().url().optional().describe("Plugin homepage or documentation URL"),repository:G.string().optional().describe("Source code repository URL"),license:G.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:G.array(G.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:G.array(VN()).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.`)})),Ws=I(()=>G.object({description:G.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:G.lazy(()=>e1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),sk=I(()=>G.object({hooks:G.union([J6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),G.lazy(()=>e1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),G.array(G.union([J6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),G.lazy(()=>e1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),rk=I(()=>G.object({source:uq().optional().describe("Path to command markdown file, relative to plugin root"),content:G.string().optional().describe("Inline markdown content for the command"),description:G.string().optional().describe("Command description override"),argumentHint:G.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:G.string().optional().describe("Default model for this command"),allowedTools:G.array(G.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'})),tk=I(()=>G.object({commands:G.union([uq().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"),G.array(uq().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"),G.record(G.string(),rk()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),ek=I(()=>G.object({agents:G.union([mq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),G.array(mq().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")])})),ZN=I(()=>G.object({skills:G.union([V1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),G.array(V1().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")])})),qN=I(()=>G.object({outputStyles:G.union([V1().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"),G.array(V1().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")])})),VV=I(()=>G.string().min(1)),JN=I(()=>G.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),XN=I(()=>G.object({mcpServers:G.union([J6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),WV().describe("Path or URL to MCPB file containing MCP server configuration"),G.record(G.string(),n7()).describe("MCP server configurations keyed by server name"),G.array(G.union([J6().describe("Path to MCP servers configuration file"),WV().describe("Path or URL to MCPB file"),G.record(G.string(),n7()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),zV=I(()=>G.object({type:G.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:G.string().describe("Human-readable label shown in the config dialog"),description:G.string().describe("Help text shown beneath the field in the config dialog"),required:G.boolean().optional().describe("If true, validation fails when this field is empty"),default:G.union([G.string(),G.number(),G.boolean(),G.array(G.string())]).optional().describe("Default value used when the user provides nothing"),multiple:G.boolean().optional().describe("For string type: allow an array of strings"),sensitive:G.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:G.number().optional().describe("Minimum value (number type only)"),max:G.number().optional().describe("Maximum value (number type only)")}).strict()),QN=I(()=>G.object({userConfig:G.record(G.string().regex(/^[A-Za-z_]\w*$/,"Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDIN_PLUGIN_OPTION_<KEY> env vars in hooks"),zV()).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).")})),$N=I(()=>G.object({channels:G.array(G.object({server:G.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:G.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:G.record(G.string(),zV()).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.")})),BV=I(()=>G.strictObject({command:G.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:G.array(VV()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:G.record(JN(),VV()).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:G.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:G.record(G.string(),G.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:G.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:G.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:G.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:G.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:G.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:G.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:G.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),YN=I(()=>G.object({lspServers:G.union([J6().describe("Path to .lsp.json configuration file relative to plugin root"),G.record(G.string(),BV()).describe("LSP server configurations keyed by server name"),G.array(G.union([J6().describe("Path to LSP configuration file"),G.record(G.string(),BV()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),_V=I(()=>G.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let q=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,J=/^[a-z0-9][a-z0-9-._]*$/;return q.test(Z)||J.test(Z)},"Invalid npm package name format")),HN=I(()=>G.object({settings:G.record(G.string(),G.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),GN=I(()=>G.object({...ok().shape,...sk().partial().shape,...tk().partial().shape,...ek().partial().shape,...ZN().partial().shape,...qN().partial().shape,...$N().partial().shape,...XN().partial().shape,...YN().partial().shape,...HN().partial().shape,...QN().partial().shape})),W4=I(()=>G.discriminatedUnion("source",[G.object({source:G.literal("url"),url:G.string().url().describe("Direct URL to marketplace.json file"),headers:G.record(G.string(),G.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),G.object({source:G.literal("github"),repo:G.string().describe("GitHub repository in owner/repo format"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:G.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:G.array(G.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.')}),G.object({source:G.literal("git"),url:G.string().describe("Full git repository URL"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:G.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:G.array(G.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.')}),G.object({source:G.literal("npm"),package:_V().describe("NPM package containing marketplace.json")}),G.object({source:G.literal("file"),path:G.string().describe("Local file path to marketplace.json")}),G.object({source:G.literal("directory"),path:G.string().describe("Local directory containing .claude-plugin/marketplace.json")}),G.object({source:G.literal("hostPattern"),hostPattern:G.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$").')}),G.object({source:G.literal("pathPattern"),pathPattern:G.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.')}),G.object({source:G.literal("settings"),name:LV().refine((Z)=>!i7.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:G.array(KN()).describe("Plugin entries declared inline in settings.json"),owner:pq().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).")])),gq=I(()=>G.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),RV=I(()=>G.union([V1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),G.object({source:G.literal("npm"),package:_V().or(G.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:G.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:G.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),G.object({source:G.literal("pip"),package:G.string().describe("Python package name as it appears on PyPI"),version:G.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:G.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),G.object({source:G.literal("url"),url:G.string().describe("Full git repository URL (https:// or git@)"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:gq().optional().describe("Specific commit SHA to use")}),G.object({source:G.literal("github"),repo:G.string().describe("GitHub repository in owner/repo format"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:gq().optional().describe("Specific commit SHA to use")}),G.object({source:G.literal("git-subdir"),url:G.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:G.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:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:gq().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.")])),KN=I(()=>G.object({name:G.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:RV().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:G.string().optional(),version:G.string().optional(),strict:G.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.'}));UN=I(()=>GN().partial().extend({name:G.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:RV().describe("Where to fetch the plugin from"),category:G.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:G.array(G.string()).optional().describe("Tags for searchability and discovery"),strict:G.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),Ls=I(()=>G.object({name:LV(),owner:pq().describe("Marketplace maintainer or curator information"),plugins:G.array(UN()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:G.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:G.object({pluginRoot:G.string().optional().describe("Base path for relative plugin sources"),version:G.string().optional().describe("Marketplace version"),description:G.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:G.array(G.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),MV=I(()=>G.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),WN=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,VN=I(()=>G.union([G.string().regex(WN,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),G.object({name:G.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:G.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),BN=I(()=>G.object({version:G.string().describe("Currently installed version"),installedAt:G.string().describe("ISO 8601 timestamp of installation"),lastUpdated:G.string().optional().describe("ISO 8601 timestamp of last update"),installPath:G.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:G.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),zs=I(()=>G.object({version:G.literal(1).describe("Schema version 1"),plugins:G.record(MV(),BN()).describe("Map of plugin IDs to their installation metadata")})),LN=I(()=>G.enum(["managed","user","project","local"])),zN=I(()=>G.object({scope:LN().describe("Installation scope"),projectPath:G.string().optional().describe("Project path (required for project/local scopes)"),installPath:G.string().describe("Absolute path to the versioned plugin directory"),version:G.string().optional().describe("Currently installed version"),installedAt:G.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:G.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:G.string().optional().describe("Git commit SHA for git-based plugins")})),_s=I(()=>G.object({version:G.literal(2).describe("Schema version 2"),plugins:G.record(MV(),G.array(zN())).describe("Map of plugin IDs to arrays of installation entries")})),_N=I(()=>G.object({source:W4().describe("Where to fetch the marketplace from"),installLocation:G.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:G.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:G.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Rs=I(()=>G.record(G.string(),_N()))});function Fs(Z){return Z.startsWith("claude.ai ")}function a7(Z){let q=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))q=q.replace(/_+/g,"_").replace(/^_|_$/g,"");return q}var DV=()=>{};function AV(Z){let q=Z.split("__"),[J,X,...Q]=q;if(J!=="mcp"||!X)return null;let $=Q.length>0?Q.join("__"):void 0;return{serverName:X,toolName:$}}function RN(Z){return`mcp__${a7(Z)}__`}function MN(Z,q){return`${RN(Z)}${a7(q)}`}function js(Z){return Z.mcpInfo?MN(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function Ts(Z,q){let J=`mcp__${a7(q)}__`;return Z.replace(J,"")}function Is(Z){let q=Z.replace(/\s*\(MCP\)\s*$/,"");q=q.trim();let J=q.indexOf(" - ");if(J!==-1)return q.substring(J+3).trim();return q}var jV=B(()=>{DV()});var TV="Agent",ws="Task",ks;var IV=B(()=>{ks=new Set(["Plan","WebResearcher","WebResearcherManager"])});var dq="TaskOutput";var OV=()=>{};var wV="TaskStop",Ps=`
90
+ - Stops a running background task by its ID
91
+ - Takes a task_id parameter identifying the task to stop
92
+ - Returns a success or failure status
93
+ - Use this tool when you need to terminate a long-running task
94
+ `;var kV=()=>{};function X6(Z){return Object.hasOwn(cq,Z)?cq[Z]:Z}function Ss(Z){let q=[];for(let[J,X]of Object.entries(cq))if(X===Z)q.push(J);return q}function FN(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function DN(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function NV(Z){let q=AN(Z,"(");if(q===-1)return{toolName:X6(Z)};let J=jN(Z,")");if(J===-1||J<=q)return{toolName:X6(Z)};if(J!==Z.length-1)return{toolName:X6(Z)};let X=Z.substring(0,q),Q=Z.substring(q+1,J);if(!X)return{toolName:X6(Z)};if(Q===""||Q==="*")return{toolName:X6(X)};let $=DN(Q);return{toolName:X6(X),ruleContent:$}}function bs(Z){if(!Z.ruleContent)return Z.toolName;let q=FN(Z.ruleContent);return`${Z.toolName}(${q})`}function AN(Z,q){for(let J=0;J<Z.length;J++)if(Z[J]===q){let X=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")X++,Q--;if(X%2===0)return J}return-1}function jN(Z,q){for(let J=Z.length-1;J>=0;J--)if(Z[J]===q){let X=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")X++,Q--;if(X%2===0)return J}return-1}var cq;var xV=B(()=>{IV();OV();kV();cq={Task:TV,KillShell:wV,AgentOutputTool:dq,BashOutputTool:dq,...{}}});function fs(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function PV(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function EV(Z,q,J=q+"s"){return Z===1?q:J}function gs(Z){let q=Z.indexOf(`
95
+ `);return q===-1?Z:Z.slice(0,q)}function ms(Z,q,J=0){let X=0,Q=Z.indexOf(q,J);while(Q!==-1)X++,Q=Z.indexOf(q,Q+1);return X}function us(Z){return Z.replace(/[0-9]/g,(q)=>String.fromCharCode(q.charCodeAt(0)-65248))}function ps(Z){return Z.replace(/\u3000/g," ")}function ds(Z,q=",",J=vV){let Q="";for(let $ of Z){let Y=Q?q:"",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 TN{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=vV){this.maxSize=Z}append(Z){let q=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=q.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+q.length>this.maxSize){let J=this.maxSize-this.content.length;if(J>0)this.content+=q.slice(0,J);this.isTruncated=!0}else this.content+=q}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,q=Math.round(Z/1024);return this.content+`
96
+ ... [output truncated - ${q}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 cs(Z,q){let J=Z.split(`
97
+ `);if(J.length<=q)return Z;return J.slice(0,q).join(`
98
+ `)+"…"}var vV=33554432;var lq=()=>{};function CV(Z){return o7.filePatternTools.includes(Z)}function yV(Z){return o7.bashPrefixTools.includes(Z)}function SV(Z){return Object.hasOwn(o7.customValidation,Z)?o7.customValidation[Z]:void 0}var o7;var bV=B(()=>{o7={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 hV(Z,q){let J=0,X=q-1;while(X>=0&&Z[X]==="\\")J++,X--;return J%2!==0}function nq(Z,q){let J=0;for(let X=0;X<Z.length;X++)if(Z[X]===q&&!hV(Z,X))J++;return J}function IN(Z){for(let q=0;q<Z.length-1;q++)if(Z[q]==="("&&Z[q+1]===")"){if(!hV(Z,q))return!0}return!1}function iq(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let q=nq(Z,"("),J=nq(Z,")");if(q!==J)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(IN(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 X=NV(Z),Q=AV(X.toolName);if(Q){if(X.ruleContent!==void 0||nq(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${X.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(!X.toolName||X.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(X.toolName[0]!==X.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${PV(String(X.toolName))}"`};let $=SV(X.toolName);if($&&X.ruleContent!==void 0){let Y=$(X.ruleContent);if(!Y.valid)return Y}if(yV(X.toolName)&&X.ruleContent!==void 0){let Y=X.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(CV(X.toolName)&&X.ruleContent!==void 0){let Y=X.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:[`${X.toolName}(*.ts) - matches .ts files`,`${X.toolName}(src/**) - matches all files in src`,`${X.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:[`${X.toolName}(*.js) - all .js files`,`${X.toolName}(src/*) - all files directly in src`,`${X.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var s7;var aq=B(()=>{s0();jV();t1();xV();lq();bV();s7=I(()=>G.string().superRefine((Z,q)=>{let J=iq(Z);if(!J.valid){let X=J.error;if(J.suggestion)X+=`. ${J.suggestion}`;if(J.examples&&J.examples.length>0)X+=`. Examples: ${J.examples.join(", ")}`;q.addIssue({code:G.ZodIssueCode.custom,message:X,params:{received:Z}})}}))});function qr(Z){if(!Z||typeof Z!=="object")return null;let q=oq.safeParse(Z);if(!q.success)return null;if(!q.data.enabled)return null;return q.data}var oq;var fV=B(()=>{s0();oq=G.object({enabled:G.boolean().describe("Whether auto-fix is enabled"),lint:G.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:G.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:G.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:G.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 Lr(Z){return"serverName"in Z&&Z.serverName!==void 0}function zr(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function _r(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var ON,wN,kN,NN,xN,gV,v0;var V4=B(()=>{s0();uW();t1();ZV();FV();Sq();aq();l7();l7();fV();jq();ON=I(()=>G.record(G.string(),G.coerce.string())),wN=I(()=>G.object({allow:G.array(s7()).optional().describe("List of permission rules for allowed operations"),deny:G.array(s7()).optional().describe("List of permission rules for denied operations"),ask:G.array(s7()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:G.enum(Z6).optional().describe("Default permission mode when Claudin needs access"),disableBypassPermissionsMode:G.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:G.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:G.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:G.array(G.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),kN=I(()=>G.object({source:W4().describe("Where to fetch the marketplace from"),installLocation:G.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:G.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),NN=I(()=>G.object({serverName:G.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:G.array(G.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:G.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return Aq([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"'})),xN=I(()=>G.object({serverName:G.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:G.array(G.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:G.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return Aq([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"'})),gV=["skills","agents","hooks","mcp"],v0=I(()=>G.object({$schema:G.literal(yW).optional().describe("JSON Schema reference for Claudin settings"),apiKeyHelper:G.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:G.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:G.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:G.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),fileSuggestion:G.object({type:G.literal("command"),command:G.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:G.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:G.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:ON().optional().describe("Environment variables to set for Claudin sessions"),attribution:G.object({commit:G.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:G.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 Claudin attribution if not set."),includeGitInstructions:G.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:wN().optional().describe("Tool usage permissions configuration"),model:G.string().optional().describe("Override the default model used by Claudin"),availableModels:G.array(G.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:G.record(G.string(),G.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:G.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:G.array(G.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:G.array(G.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:G.array(NN()).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:G.array(xN()).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:e1().optional().describe("Custom commands to run before/after tool executions"),autoFix:oq.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:G.object({symlinkDirectories:G.array(G.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:G.array(G.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."),baseRef:G.enum(["fresh","head"]).optional().describe('Base ref for new worktrees. "fresh" (default) branches from origin/<default-branch>; "head" branches from the current local HEAD.')}).optional().describe("Git worktree configuration for --worktree flag."),lsp:G.object({enabled:G.boolean().optional(),diagnosticsTimeoutMs:G.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudin waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).optional().describe("LSP subsystem configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). LSP servers themselves are provided exclusively by enabled plugins (.lsp.json)."),disableAllHooks:G.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:G.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:G.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:G.array(G.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:G.array(G.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:G.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:G.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:G.preprocess((Z)=>Array.isArray(Z)?Z.filter((q)=>gV.includes(q)):Z,G.union([G.boolean(),G.array(G.enum(gV))])).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:G.object({type:G.literal("command"),command:G.string(),padding:G.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:G.record(G.string(),G.union([G.array(G.string()),G.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:G.record(G.string(),kN()).check((Z)=>{for(let[q,J]of Object.entries(Z.value))if(J.source.source==="settings"&&J.source.name!==q)Z.issues.push({code:"custom",input:J.source.name,path:[q,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${q}" but source.name "${J.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claudin/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:G.array(W4()).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:G.array(W4()).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:G.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:G.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:G.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:G.string().optional().describe("Controls the output style for assistant responses"),language:G.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:G.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:mW().optional(),feedbackSurveyRate:G.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:G.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:G.object({mode:G.enum(["append","replace"]),verbs:G.array(G.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:G.object({excludeDefault:G.boolean().optional(),tips:G.array(G.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:G.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:G.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:G.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:G.enum(["low","medium","high","xhigh","max","adaptive"]).optional().catch(void 0).describe("Persisted effort level for supported models. 'adaptive' sends no effort field so the model scales per request."),codingLoopXhighDefault:G.boolean().optional().catch(void 0).describe("When true, defaults effort to xhigh for Opus 4.8 (coding/high-autonomy loops). Overrides the medium default for Pro/Max/Team and ultrathink. Opus 4.8 only; other models are unaffected. Defaults to false."),advisorModel:G.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:G.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:G.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:G.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:G.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:G.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:G.array(G.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:G.record(G.string(),G.object({mcpServers:G.record(G.string(),G.record(G.string(),G.union([G.string(),G.number(),G.boolean(),G.array(G.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:G.record(G.string(),G.union([G.string(),G.number(),G.boolean(),G.array(G.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:G.object({defaultEnvironmentId:G.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:G.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:G.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:G.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to .claudin/plans/ in the project root."),...{},...{},...{},channelsEnabled:G.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:G.array(G.object({marketplace:G.string(),plugin:G.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:G.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:G.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:G.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/."),autoMemoryProjectLocal:G.boolean().optional().describe("When true (the default), auto-memory for a git project defaults to <project>/.claudin/memory/ instead of the global ~/.claudin/projects/<sanitized-cwd>/memory/. Set to false to force the legacy global-only location. Ignored if set in projectSettings for security, same as autoMemoryDirectory."),autoDreamEnabled:G.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:G.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:G.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:G.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:G.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:G.object({allow:G.array(G.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:G.array(G.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:G.array(G.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:G.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:G.array(G.object({id:G.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:G.string().describe("Display name for the SSH connection"),sshHost:G.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:G.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:G.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:G.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:G.array(G.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:G.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 sq(){let Z=mV(v0(),{unrepresentable:"any"});return m(Z,null,2)}var uV=B(()=>{s0();R0();V4()});function pV(Z){let q=PN.find((X)=>X.matches(Z));if(!q)return null;let J={...q.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!J.suggestion)J.suggestion=`Valid values: ${Z.enumValues.map((X)=>`"${X}"`).join(", ")}`;if(!J.docLink&&Z.path){let X=Z.path.split(".")[0];if(X)J.docLink=EN[X]}return J}var PN,EN;var dV=B(()=>{PN=[{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: "includeGitInstructions": 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'}}],EN={}});function cV(Z){return Z.code==="invalid_type"}function lV(Z){return Z.code==="invalid_value"}function vN(Z){return Z.code==="unrecognized_keys"}function nV(Z){return Z.code==="too_small"}function rq(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function iV(Z){let q=Z.match(/received (\w+)/);return q?q[1]:void 0}function Q6(Z,q){return Z.issues.map((J)=>{let X=J.path.map(String).join("."),Q=J.message,$,Y,H,K,U;if(lV(J))Y=J.values.map((V)=>String(V)),H=Y.join(" | "),K=void 0,U=void 0;else if(cV(J)){H=J.expected;let V=iV(J.message);K=V??rq(J.input),U=V??rq(J.input)}else if(nV(J))H=String(J.minimum);else if(J.code==="custom"&&"params"in J)K=J.params.received,U=K;let W=pV({path:X,code:J.code,expected:H,received:K,enumValues:Y,message:J.message,value:K});if(lV(J))$=Y?.map((V)=>`"${V}"`).join(", "),Q=`Invalid value. Expected one of: ${$}`;else if(cV(J)){let V=iV(J.message)??rq(J.input);if(J.expected==="object"&&V==="null"&&X==="")Q="Invalid or malformed JSON";else Q=`Expected ${J.expected}, but received ${V}`}else if(vN(J)){let V=J.keys.join(", ");Q=`Unrecognized ${EV(J.keys.length,"field")}: ${V}`}else if(nV(J))Q=`Number must be greater than or equal to ${J.minimum}`,$=String(J.minimum);return{file:q,path:X,message:Q,expected:$,invalidValue:U,suggestion:W?.suggestion,docLink:W?.docLink}})}function Pr(Z){try{let q=Z0(Z),J=v0().strict().safeParse(q);if(J.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
99
+ `+Q6(J.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
100
+ `),fullSchema:sq()}}catch(q){return{isValid:!1,error:`Invalid JSON: ${q instanceof Error?q.message:"Unknown parsing error"}`,fullSchema:sq()}}}function r7(Z,q){if(!Z||typeof Z!=="object")return[];let J=Z;if(!J.permissions||typeof J.permissions!=="object")return[];let X=J.permissions,Q=[];for(let $ of["allow","deny","ask"]){let Y=X[$];if(!Array.isArray(Y))continue;X[$]=Y.filter((H)=>{if(typeof H!=="string")return Q.push({file:q,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let K=iq(H);if(!K.valid){let U=`Invalid permission rule "${H}" was skipped`;if(K.error)U+=`: ${K.error}`;if(K.suggestion)U+=`. ${K.suggestion}`;return Q.push({file:q,path:`permissions.${$}`,message:U,invalidValue:H}),!1}return!0})}return Q}var tq=B(()=>{R0();lq();aq();uV();V4();dV()});import{userInfo as CN}from"os";function tV(){let Z="";try{Z=CN().username}catch{}let q=[];if(Z)q.push({path:`/Library/Managed Preferences/${Z}/${aV}.plist`,label:"per-user managed preferences"});return q.push({path:`/Library/Managed Preferences/${aV}.plist`,label:"device-level managed preferences"}),q}var aV="com.anthropic.claudecode",t7="HKLM\\SOFTWARE\\Policies\\ClaudeCode",e7="HKCU\\SOFTWARE\\Policies\\ClaudeCode",$6="Settings",oV="/usr/bin/plutil",sV,rV=5000;var eq=B(()=>{sV=["-convert","json","-o","-","--"]});import{execFile as yN}from"child_process";import{existsSync as SN}from"fs";function ZJ(Z,q){return new Promise((J)=>{yN(Z,q,{encoding:"utf-8",timeout:rV},(X,Q)=>{J({stdout:Q??"",code:X?1:0})})})}function Z5(){return(async()=>{if(process.platform==="darwin"){let Z=tV(),J=(await Promise.all(Z.map(async({path:X,label:Q})=>{if(!SN(X))return{stdout:"",label:Q,ok:!1};let{stdout:$,code:Y}=await ZJ(oV,[...sV,X]);return{stdout:$,label:Q,ok:Y===0&&!!$}}))).find((X)=>X.ok);return{plistStdouts:J?[{stdout:J.stdout,label:J.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,q]=await Promise.all([ZJ("reg",["query",t7,"/v",$6]),ZJ("reg",["query",e7,"/v",$6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:q.code===0?q.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function hr(){if(qJ)return;qJ=Z5()}function eV(){return qJ}var qJ=null;var ZB=B(()=>{eq()});import{join as qB}from"path";function bN(){if(q5)return;q5=(async()=>{Y6("mdm_load_start");let Z=Date.now(),q=eV()??Z5(),{mdm:J,hkcu:X}=QB(await q);XJ=J,QJ=X,Y6("mdm_load_end");let Q=Date.now()-Z;if(P(`MDM settings load completed in ${Q}ms`),Object.keys(J.settings).length>0){P(`MDM settings found: ${Object.keys(J.settings).join(", ")}`);try{H0("info","mdm_settings_loaded",{duration_ms:Q,key_count:Object.keys(J.settings).length,error_count:J.errors.length})}catch{}}})()}async function rr(){if(!q5)bN();await q5}function J5(){return XJ??B1}function X5(){return QJ??B1}function tr(Z,q){XJ=Z,QJ=q}async function er(){let Z=await Z5();return QB(Z)}function JJ(Z,q){let J=m0(Z,!1);if(!J||typeof J!=="object")return{settings:{},errors:[]};let X=r7(J,q),Q=v0().safeParse(J);if(!Q.success){let $=Q6(Q.error,q);return{settings:{},errors:[...X,...$]}}return{settings:Q.data,errors:X}}function JB(Z,q="Settings"){let J=Z.split(/\r?\n/),X=q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Q=new RegExp(`^\\s+${X}\\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 QB(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:q,label:J}=Z.plistStdouts[0],X=JJ(q,J);if(Object.keys(X.settings).length>0)return{mdm:X,hkcu:B1}}if(Z.hklmStdout){let q=JB(Z.hklmStdout);if(q){let J=JJ(q,`Registry: ${t7}\\${$6}`);if(Object.keys(J.settings).length>0)return{mdm:J,hkcu:B1}}}if(hN())return{mdm:B1,hkcu:B1};if(Z.hkcuStdout){let q=JB(Z.hkcuStdout);if(q){let J=JJ(q,`Registry: ${e7}\\${$6}`);return{mdm:B1,hkcu:J}}}return{mdm:B1,hkcu:B1}}function hN(){try{let Z=qB(w1(),"managed-settings.json"),q=U1(Z),J=m0(q,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}try{let Z=U4(),q=N().readdirSync(Z);for(let J of q){if(!(J.isFile()||J.isSymbolicLink())||!J.name.endsWith(".json")||J.name.startsWith("."))continue;try{let X=U1(qB(Z,J.name)),Q=m0(X,!1);if(Q&&typeof Q==="object"&&Object.keys(Q).length>0)return!0}catch{}}}catch{}return!1}var B1,XJ=null,QJ=null,q5=null;var $B=B(()=>{G1();_6();Z4();M0();m7();XB();p7();V4();tq();eq();ZB();B1=Object.freeze({settings:{},errors:[]})});import{dirname as zB,join as Q5,resolve as B4}from"path";function KJ(){return Q5(w1(),"managed-settings.json")}function UJ(){let Z=[],q={},J=!1,{settings:X,errors:Q}=L4(KJ());if(Z.push(...Q),X&&Object.keys(X).length>0)q=K1(q,X,Z2),J=!0;let $=U4();try{let Y=N().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:U}=L4(Q5($,H));if(Z.push(...U),K&&Object.keys(K).length>0)q=K1(q,K,Z2),J=!0}}catch(Y){let H=W0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")S(Y)}return{settings:J?q:null,errors:Z}}function Nt(){let{settings:Z}=L4(KJ()),q=!!Z&&Object.keys(Z).length>0,J=!1,X=U4();try{J=N().readdirSync(X).some((Q)=>(Q.isFile()||Q.isSymbolicLink())&&Q.name.endsWith(".json")&&!Q.name.startsWith("."))}catch{}return{hasBase:q,hasDropIns:J}}function _B(Z,q){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")P(`Broken symlink or missing file encountered for settings.json at path: ${q}`);else S(Z)}function L4(Z){let q=WB(Z);if(q)return{settings:q.settings?YJ(q.settings):null,errors:q.errors};let J=fN(Z);return VB(Z,J),{settings:J.settings?YJ(J.settings):null,errors:J.errors}}function fN(Z){try{let{resolvedPath:q}=O1(N(),Z),J=U1(q);if(J.trim()==="")return{settings:{},errors:[]};let X=m0(J,!1),Q=r7(X,Z),$=v0().safeParse(X);if(!$.success){let Y=Q6($.error,Z);return{settings:null,errors:[...Q,...Y]}}return{settings:$.data,errors:Q}}catch(q){return _B(q,Z),{settings:null,errors:[]}}}function YB(Z){switch(Z){case"userSettings":return B4(G0());case"policySettings":case"projectSettings":case"localSettings":return B4(q2());case"flagSettings":{let q=HJ();return q?zB(B4(q)):B4(q2())}}}function gN(){if(LB()||J0(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function $5(Z){switch(Z){case"userSettings":return Q5(YB(Z),gN());case"projectSettings":case"localSettings":return Q5(YB(Z),RB(Z));case"policySettings":return KJ();case"flagSettings":return HJ()}}function RB(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function p(Z){let q=KB(Z);if(q!==void 0)return q;let J=MB(Z);return UB(Z,J),J}function MB(Z){if(Z==="policySettings"){let X=y7();if(X&&Object.keys(X).length>0)return X;let Q=J5();if(Object.keys(Q.settings).length>0)return Q.settings;let{settings:$}=UJ();if($)return $;let Y=X5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let q=$5(Z),{settings:J}=q?L4(q):{settings:null};if(Z==="flagSettings"){let X=GJ();if(X){let Q=v0().safeParse(X);if(Q.success)return K1(J||{},Q.data,Z2)}}return J}function xt(){let Z=y7();if(Z&&Object.keys(Z).length>0)return"remote";let q=J5();if(Object.keys(q.settings).length>0)return g0()==="macos"?"plist":"hklm";let{settings:J}=UJ();if(J)return"file";let X=X5();if(Object.keys(X.settings).length>0)return"hkcu";return null}function Pt(Z,q){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let J=$5(Z);if(!J)return{error:null};try{N().mkdirSync(zB(J));let X=MB(Z);if(!X){let $=null;try{$=U1(J)}catch(Y){if(!a2(Y))throw Y}if($!==null){let Y=m0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${J}`)};if(Y&&typeof Y==="object")X=Y,P(`Using raw settings from ${J} due to validation failure`)}}let Q=K1(X||{},q,($,Y,H,K)=>{if(Y===void 0&&K&&typeof H==="string"){delete K[H];return}if(Array.isArray(Y))return Y;return});if(SW(J),o2(J,m(Q,null,2)+`
101
+ `),J4(),Z==="localSettings")_W(RB("localSettings"),q2())}catch(X){let Q=Error(`Failed to read raw settings from ${J}: ${X}`);return S(Q),{error:Q}}return{error:null}}function mN(Z,q){return QW([...Z,...q])}function Z2(Z,q){if(Array.isArray(Z)&&Array.isArray(q))return mN(Z,q);return}function Et(Z){let q=v0().strip().parse(Z),J=["permissions","sandbox","hooks"],X=[],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(q))if(J.includes($)&&q[$]&&typeof q[$]==="object"){let Y=q[$],H=Q[$];if(H){for(let K of Object.keys(Y))if(H.has(K))X.push(`${$}.${K}`)}}else X.push($);return X.sort()}function uN(){if($J)return{settings:{},errors:[]};let Z=Date.now();Y6("loadSettingsFromDisk_start"),H0("info","settings_load_started"),$J=!0;try{let q=BB(),J={};if(q)J=K1(J,q,Z2);let X=[],Q=new Set,$=new Set;for(let Y of K4()){if(Y==="policySettings"){let K=null,U=[],W=y7();if(W&&Object.keys(W).length>0){let V=v0().safeParse(W);if(V.success)K=V.data;else U.push(...Q6(V.error,"remote managed settings"))}if(!K){let V=J5();if(Object.keys(V.settings).length>0)K=V.settings;U.push(...V.errors)}if(!K){let{settings:V,errors:L}=UJ();if(V)K=V;U.push(...L)}if(!K){let V=X5();if(Object.keys(V.settings).length>0)K=V.settings;U.push(...V.errors)}if(K)J=K1(J,K,Z2);for(let V of U){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),X.push(V)}continue}let H=$5(Y);if(H){let K=B4(H);if(!$.has(K)){$.add(K);let{settings:U,errors:W}=L4(H);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),X.push(V)}if(U)J=K1(J,U,Z2)}}if(Y==="flagSettings"){let K=GJ();if(K){let U=v0().safeParse(K);if(U.success)J=K1(J,U.data,Z2)}}}return H0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:X.length}),{settings:J,errors:X}}finally{$J=!1}}function WJ(){let{settings:Z}=pN();return Z||{}}function vt(){J4();let Z=[];for(let q of K4()){let J=p(q);if(J&&Object.keys(J).length>0)Z.push({source:q,settings:J})}return{effective:WJ(),sources:Z}}function pN(){let Z=HB();if(Z!==null)return Z;let q=uN();return Y6("loadSettingsFromDisk_end"),GB(q),q}function Ct(){return!!(p("userSettings")?.skipDangerousModePermissionPrompt||p("localSettings")?.skipDangerousModePermissionPrompt||p("flagSettings")?.skipDangerousModePermissionPrompt||p("policySettings")?.skipDangerousModePermissionPrompt)}function yt(){return!!(p("userSettings")?.permissions?.allowBypassPermissionsMode||p("localSettings")?.permissions?.allowBypassPermissionsMode||p("flagSettings")?.permissions?.allowBypassPermissionsMode||p("policySettings")?.permissions?.allowBypassPermissionsMode)}function St(){{let Z=p("userSettings")?.skipAutoPermissionPrompt,q=p("localSettings")?.skipAutoPermissionPrompt,J=p("flagSettings")?.skipAutoPermissionPrompt,X=p("policySettings")?.skipAutoPermissionPrompt,Q=!!(Z||q||J||X);return P(`[auto-mode] hasAutoModeOptIn=${Q} skipAutoPermissionPrompt: user=${Z} local=${q} flag=${J} policy=${X}`),Q}return!1}function bt(){return p("policySettings")?.useAutoModeDuringPlan!==!1&&p("flagSettings")?.useAutoModeDuringPlan!==!1&&p("userSettings")?.useAutoModeDuringPlan!==!1&&p("localSettings")?.useAutoModeDuringPlan!==!1}function ht(){return dN().config}function dN(){return iN(p)}function iN(Z){let q=[],J=[],X=[],Q=[],$=(K,U,W)=>{if(!W)return;let V=hW(W);U.push(...V.entries);for(let L of V.dropped)Q.push({section:K,entry:L.entry,reason:fW(L.reason)})};for(let K of cN){let U=Z(K);if(!U)continue;let W=nN.safeParse(U.autoMode);if(W.success)$("allow",q,W.data.allow),$("soft_deny",J,W.data.soft_deny),$("environment",X,W.data.environment)}let Y=[];for(let K of lN){let U=Z(K);if(!U)continue;let W=U.autoMode;if(W&&typeof W==="object")Y.push(K)}return{config:q.length>0||J.length>0||X.length>0?{...q.length>0&&{allow:q},...J.length>0&&{soft_deny:J},...X.length>0&&{environment:X}}:void 0,dropped:Q,ignoredSources:Y}}function ft(Z){for(let q of K4()){if(q==="policySettings")continue;let J=$5(q);if(!J)continue;try{let{resolvedPath:X}=O1(N(),J),Q=U1(X);if(!Q.trim())continue;let $=m0(Q,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(X){_B(X,J)}}return!1}var $J=!1,cN,lN,nN;var FB=B(()=>{qW();s0();z2();XW();jq();G1();_6();W1();o1();S7();Z4();M0();RW();m7();k0();l2();R0();XB();Sq();bW();gW();p7();$B();JW();V4();tq();cN=["userSettings","flagSettings","policySettings"],lN=["projectSettings","localSettings"],nN=G.object({allow:G.array(G.string()).optional(),soft_deny:G.array(G.string()).optional(),deny:G.array(G.string()).optional(),environment:G.array(G.string()).optional()})});import{cpSync as aN,readFileSync as oN,readdirSync as sN}from"fs";import{join as rN}from"path";function jB(Z,q){if(Z===q)return;if(AB(q))return;if(!AB(Z))return;try{aN(Z,q,{recursive:!0,force:!1,errorOnExist:!1})}catch(J){S(Error(`Failed to migrate auto-memory from ${Z} to ${q}: ${J instanceof Error?J.message:String(J)}`))}}function AB(Z){try{if(oN(rN(Z,DB),"utf-8").trim())return!0}catch{}try{return sN(Z,{withFileTypes:!0}).some((q)=>q.isFile()&&q.name.endsWith(".md")&&q.name!==DB)}catch{return!1}}var DB="MEMORY.md";var TB=B(()=>{k0()});import{chmodSync as tN}from"fs";import{homedir as eN}from"os";import{isAbsolute as Zx,join as z4,normalize as VJ,sep as Y5}from"path";function kB(){let Z=process.env.CLAUDIN_DISABLE_AUTO_MEMORY;if(J0(Z))return!1;if(wB(Z))return!0;if(J0(process.env.CLAUDIN_SIMPLE))return!1;if(J0(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let q=WJ();if(q.autoMemoryEnabled!==void 0)return q.autoMemoryEnabled;return!0}function Xe(){if(!s1("tengu_passport_quail",!1))return!1;return!OB()||s1("tengu_slate_thimble",!1)}function qx(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return G0()}function NB(Z,q){if(!Z)return;let J=Z;if(q&&(J.startsWith("~/")||J.startsWith("~\\"))){let Q=J.slice(2),$=VJ(Q||".");if($==="."||$==="..")return;J=z4(eN(),Q)}let X=VJ(J).replace(/[/\\]+$/,"");if(!Zx(X)||X.length<3||/^[A-Za-z]:$/.test(X)||X.startsWith("\\\\")||X.startsWith("//")||X.includes("\x00"))return;return(X+Y5).normalize("NFC")}function xB(){return NB(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function Xx(){let Z=p("policySettings")?.autoMemoryDirectory??p("flagSettings")?.autoMemoryDirectory??p("localSettings")?.autoMemoryDirectory??p("userSettings")?.autoMemoryDirectory;return NB(Z,!0)}function Qe(){return xB()!==void 0}function Qx(){return(p("policySettings")?.autoMemoryProjectLocal??p("flagSettings")?.autoMemoryProjectLocal??p("localSettings")?.autoMemoryProjectLocal??p("userSettings")?.autoMemoryProjectLocal)!==!1}function $x(){return n1(_4())??_4()}function PB(){return z4(R4(),Jx)}function $e(Z){return VJ(Z).startsWith(R4())}var IB="memory",Jx="MEMORY.md",R4;var BJ=B(()=>{I1();z2();Oq();W1();D6();k0();k7();FB();M0();TB();R4=u(()=>{let Z=xB()??Xx();if(Z)return Z;let q=z4(qx(),"projects"),J=(z4(q,Wq($x()),IB)+Y5).normalize("NFC");if(!Qx())return J;let X=n1(_4());if(!X)return J;let Q=(z4(X,".claudin",IB)+Y5).normalize("NFC");try{N().mkdirSync(Q,{mode:448})}catch(Y){return S(Y),J}let $=!1;try{let Y=N().realpathSync(X),H=N().realpathSync(Q);if($=H===Y||H.startsWith(Y+Y5),!$)S(Error(`Auto-memory directory escapes project root via symlink: ${Q} -> ${H}`))}catch(Y){S(Y)}if(!$)return J;try{tN(Q,448)}catch{}return jB(J,Q),Q},()=>_4())});var vB=c((He,EB)=>{var k1=Y0("constants"),Yx=process.cwd,H5=null,Hx=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!H5)H5=Yx.call(process);return H5};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(G5=process.chdir,process.chdir=function(Z){H5=null,G5.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,G5)}var G5;EB.exports=Gx;function Gx(Z){if(k1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))q(Z);if(!Z.lutimes)J(Z);if(Z.chown=$(Z.chown),Z.fchown=$(Z.fchown),Z.lchown=$(Z.lchown),Z.chmod=X(Z.chmod),Z.fchmod=X(Z.fchmod),Z.lchmod=X(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(W,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(W,V,L,z){if(z)process.nextTick(z)},Z.lchownSync=function(){};if(Hx==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(W){function V(L,z,_){var R=Date.now(),M=0;W(L,z,function F(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){Z.stat(z,function(D,O){if(D&&D.code==="ENOENT")W(L,z,F);else _(k)})},M),M<100)M+=10;return}if(_)_(k)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(W){function V(L,z,_,R,M,F){var k;if(F&&typeof F==="function"){var D=0;k=function(O,j,T){if(O&&O.code==="EAGAIN"&&D<10)return D++,W.call(Z,L,z,_,R,M,k);F.apply(this,arguments)}}return W.call(Z,L,z,_,R,M,k)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(W){return function(V,L,z,_,R){var M=0;while(!0)try{return W.call(Z,V,L,z,_,R)}catch(F){if(F.code==="EAGAIN"&&M<10){M++;continue}throw F}}}(Z.readSync);function q(W){W.lchmod=function(V,L,z){W.open(V,k1.O_WRONLY|k1.O_SYMLINK,L,function(_,R){if(_){if(z)z(_);return}W.fchmod(R,L,function(M){W.close(R,function(F){if(z)z(M||F)})})})},W.lchmodSync=function(V,L){var z=W.openSync(V,k1.O_WRONLY|k1.O_SYMLINK,L),_=!0,R;try{R=W.fchmodSync(z,L),_=!1}finally{if(_)try{W.closeSync(z)}catch(M){}else W.closeSync(z)}return R}}function J(W){if(k1.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(V,L,z,_){W.open(V,k1.O_SYMLINK,function(R,M){if(R){if(_)_(R);return}W.futimes(M,L,z,function(F){W.close(M,function(k){if(_)_(F||k)})})})},W.lutimesSync=function(V,L,z){var _=W.openSync(V,k1.O_SYMLINK),R,M=!0;try{R=W.futimesSync(_,L,z),M=!1}finally{if(M)try{W.closeSync(_)}catch(F){}else W.closeSync(_)}return R};else if(W.futimes)W.lutimes=function(V,L,z,_){if(_)process.nextTick(_)},W.lutimesSync=function(){}}function X(W){if(!W)return W;return function(V,L,z){return W.call(Z,V,L,function(_){if(U(_))_=null;if(z)z.apply(this,arguments)})}}function Q(W){if(!W)return W;return function(V,L){try{return W.call(Z,V,L)}catch(z){if(!U(z))throw z}}}function $(W){if(!W)return W;return function(V,L,z,_){return W.call(Z,V,L,z,function(R){if(U(R))R=null;if(_)_.apply(this,arguments)})}}function Y(W){if(!W)return W;return function(V,L,z){try{return W.call(Z,V,L,z)}catch(_){if(!U(_))throw _}}}function H(W){if(!W)return W;return function(V,L,z){if(typeof L==="function")z=L,L=null;function _(R,M){if(M){if(M.uid<0)M.uid+=4294967296;if(M.gid<0)M.gid+=4294967296}if(z)z.apply(this,arguments)}return L?W.call(Z,V,L,_):W.call(Z,V,_)}}function K(W){if(!W)return W;return function(V,L){var z=L?W.call(Z,V,L):W.call(Z,V);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function U(W){if(!W)return!0;if(W.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(W.code==="EINVAL"||W.code==="EPERM")return!0}return!1}}});var SB=c((Ge,yB)=>{var CB=Y0("stream").Stream;yB.exports=Kx;function Kx(Z){return{ReadStream:q,WriteStream:J};function q(X,Q){if(!(this instanceof q))return new q(X,Q);CB.call(this);var $=this;this.path=X,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 U=Y[H];this[U]=Q[U]}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(W,V){if(W){$.emit("error",W),$.readable=!1;return}$.fd=V,$.emit("open",V),$._read()})}function J(X,Q){if(!(this instanceof J))return new J(X,Q);CB.call(this),this.path=X,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 hB=c((Ke,bB)=>{bB.exports=Wx;var Ux=Object.getPrototypeOf||function(Z){return Z.__proto__};function Wx(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var q={__proto__:Ux(Z)};else var q=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(J){Object.defineProperty(q,J,Object.getOwnPropertyDescriptor(Z,J))}),q}});var MJ=c((Ue,RJ)=>{var s=Y0("fs"),Vx=vB(),Bx=SB(),Lx=hB(),K5=Y0("util"),V0,W5;if(typeof Symbol==="function"&&typeof Symbol.for==="function")V0=Symbol.for("graceful-fs.queue"),W5=Symbol.for("graceful-fs.previous");else V0="___graceful-fs.queue",W5="___graceful-fs.previous";function zx(){}function gB(Z,q){Object.defineProperty(Z,V0,{get:function(){return q}})}var J2=zx;if(K5.debuglog)J2=K5.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))J2=function(){var Z=K5.format.apply(K5,arguments);Z="GFS4: "+Z.split(/\n/).join(`
102
+ GFS4: `),console.error(Z)};if(!s[V0]){if(LJ=global[V0]||[],gB(s,LJ),s.close=function(Z){function q(J,X){return Z.call(s,J,function(Q){if(!Q)fB();if(typeof X==="function")X.apply(this,arguments)})}return Object.defineProperty(q,W5,{value:Z}),q}(s.close),s.closeSync=function(Z){function q(J){Z.apply(s,arguments),fB()}return Object.defineProperty(q,W5,{value:Z}),q}(s.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){J2(s[V0]),Y0("assert").equal(s[V0].length,0)})}var LJ;if(!global[V0])gB(global,s[V0]);RJ.exports=zJ(Lx(s));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched)RJ.exports=zJ(s),s.__patched=!0;function zJ(Z){Vx(Z),Z.gracefulify=zJ,Z.createReadStream=j,Z.createWriteStream=T;var q=Z.readFile;Z.readFile=J;function J(w,x,E){if(typeof x==="function")E=x,x=null;return f(w,x,E);function f(i,v,C,d){return q(i,v,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))H6([f,[i,v,C],g,d||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var X=Z.writeFile;Z.writeFile=Q;function Q(w,x,E,f){if(typeof E==="function")f=E,E=null;return i(w,x,E,f);function i(v,C,d,g,K0){return X(v,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))H6([i,[v,C,d,g],l,K0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var $=Z.appendFile;if($)Z.appendFile=Y;function Y(w,x,E,f){if(typeof E==="function")f=E,E=null;return i(w,x,E,f);function i(v,C,d,g,K0){return $(v,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))H6([i,[v,C,d,g],l,K0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=K;function K(w,x,E,f){if(typeof E==="function")f=E,E=0;return i(w,x,E,f);function i(v,C,d,g,K0){return H(v,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))H6([i,[v,C,d,g],l,K0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var U=Z.readdir;Z.readdir=V;var W=/^v[0-5]\./;function V(w,x,E){if(typeof x==="function")E=x,x=null;var f=W.test(process.version)?function(C,d,g,K0){return U(C,i(C,d,g,K0))}:function(C,d,g,K0){return U(C,d,i(C,d,g,K0))};return f(w,x,E);function i(v,C,d,g){return function(K0,l){if(K0&&(K0.code==="EMFILE"||K0.code==="ENFILE"))H6([f,[v,C,d],K0,g||Date.now(),Date.now()]);else{if(l&&l.sort)l.sort();if(typeof d==="function")d.call(this,K0,l)}}}}if(process.version.substr(0,4)==="v0.8"){var L=Bx(Z);F=L.ReadStream,D=L.WriteStream}var z=Z.ReadStream;if(z)F.prototype=Object.create(z.prototype),F.prototype.open=k;var _=Z.WriteStream;if(_)D.prototype=Object.create(_.prototype),D.prototype.open=O;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(w){F=w},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return D},set:function(w){D=w},enumerable:!0,configurable:!0});var R=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return R},set:function(w){R=w},enumerable:!0,configurable:!0});var M=D;Object.defineProperty(Z,"FileWriteStream",{get:function(){return M},set:function(w){M=w},enumerable:!0,configurable:!0});function F(w,x){if(this instanceof F)return z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function k(){var w=this;b(w.path,w.flags,w.mode,function(x,E){if(x){if(w.autoClose)w.destroy();w.emit("error",x)}else w.fd=E,w.emit("open",E),w.read()})}function D(w,x){if(this instanceof D)return _.apply(this,arguments),this;else return D.apply(Object.create(D.prototype),arguments)}function O(){var w=this;b(w.path,w.flags,w.mode,function(x,E){if(x)w.destroy(),w.emit("error",x);else w.fd=E,w.emit("open",E)})}function j(w,x){return new Z.ReadStream(w,x)}function T(w,x){return new Z.WriteStream(w,x)}var A=Z.open;Z.open=b;function b(w,x,E,f){if(typeof E==="function")f=E,E=null;return i(w,x,E,f);function i(v,C,d,g,K0){return A(v,C,d,function(l,rE){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))H6([i,[v,C,d,g],l,K0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}return Z}function H6(Z){J2("ENQUEUE",Z[0].name,Z[1]),s[V0].push(Z),_J()}var U5;function fB(){var Z=Date.now();for(var q=0;q<s[V0].length;++q)if(s[V0][q].length>2)s[V0][q][3]=Z,s[V0][q][4]=Z;_J()}function _J(){if(clearTimeout(U5),U5=void 0,s[V0].length===0)return;var Z=s[V0].shift(),q=Z[0],J=Z[1],X=Z[2],Q=Z[3],$=Z[4];if(Q===void 0)J2("RETRY",q.name,J),q.apply(null,J);else if(Date.now()-Q>=60000){J2("TIMEOUT",q.name,J);var Y=J.pop();if(typeof Y==="function")Y.call(null,X)}else{var H=Date.now()-$,K=Math.max($-Q,1),U=Math.min(K*1.2,100);if(H>=U)J2("RETRY",q.name,J),q.apply(null,J.concat([Q]));else s[V0].push(Z)}if(U5===void 0)U5=setTimeout(_J,0)}});var uB=c((We,mB)=>{function C0(Z,q){if(typeof q==="boolean")q={forever:q};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=q||{},this._maxRetryTime=q&&q.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)}mB.exports=C0;C0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};C0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};C0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var q=new Date().getTime();if(Z&&q-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 X=this,Q=setTimeout(function(){if(X._attempts++,X._operationTimeoutCb){if(X._timeout=setTimeout(function(){X._operationTimeoutCb(X._attempts)},X._operationTimeout),X._options.unref)X._timeout.unref()}X._fn(X._attempts)},J);if(this._options.unref)Q.unref();return!0};C0.prototype.attempt=function(Z,q){if(this._fn=Z,q){if(q.timeout)this._operationTimeout=q.timeout;if(q.cb)this._operationTimeoutCb=q.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};C0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};C0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};C0.prototype.start=C0.prototype.try;C0.prototype.errors=function(){return this._errors};C0.prototype.attempts=function(){return this._attempts};C0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},q=null,J=0;for(var X=0;X<this._errors.length;X++){var Q=this._errors[X],$=Q.message,Y=(Z[$]||0)+1;if(Z[$]=Y,Y>=J)q=Q,J=Y}return q}});var dB=c((Rx)=>{var _x=uB();Rx.operation=function(Z){var q=Rx.timeouts(Z);return new _x(q,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};Rx.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var q={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in Z)q[J]=Z[J];if(q.minTimeout>q.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var X=[];for(var Q=0;Q<q.retries;Q++)X.push(this.createTimeout(Q,q));if(Z&&Z.forever&&!X.length)X.push(this.createTimeout(Q,q));return X.sort(function($,Y){return $-Y}),X};Rx.createTimeout=function(Z,q){var J=q.randomize?Math.random()+1:1,X=Math.round(J*q.minTimeout*Math.pow(q.factor,Z));return X=Math.min(X,q.maxTimeout),X};Rx.wrap=function(Z,q,J){if(q instanceof Array)J=q,q=null;if(!J){J=[];for(var X in Z)if(typeof Z[X]==="function")J.push(X)}for(var Q=0;Q<J.length;Q++){var $=J[Q],Y=Z[$];Z[$]=function(K){var U=Rx.operation(q),W=Array.prototype.slice.call(arguments,1),V=W.pop();W.push(function(L){if(U.retry(L))return;if(L)arguments[0]=U.mainError();V.apply(this,arguments)}),U.attempt(function(){K.apply(Z,W)})}.bind(Z,Y),Z[$].options=q}}});var cB=c((Be,V5)=>{V5.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")V5.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")V5.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var lB=c((Le,K6)=>{var n=global.process,X2=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(!X2(n))K6.exports=function(){return function(){}};else{if(FJ=Y0("assert"),Q2=cB(),DJ=/^win/i.test(n.platform),G6=Y0("events"),typeof G6!=="function")G6=G6.EventEmitter;if(n.__signal_exit_emitter__)X0=n.__signal_exit_emitter__;else X0=n.__signal_exit_emitter__=new G6,X0.count=0,X0.emitted={};if(!X0.infinite)X0.setMaxListeners(1/0),X0.infinite=!0;K6.exports=function(Z,q){if(!X2(global.process))return function(){};if(FJ.equal(typeof Z,"function","a callback must be provided for exit handler"),$2===!1)B5();var J="exit";if(q&&q.alwaysLast)J="afterexit";var X=function(){if(X0.removeListener(J,Z),X0.listeners("exit").length===0&&X0.listeners("afterexit").length===0)M4()};return X0.on(J,Z),X},M4=function(){if(!$2||!X2(global.process))return;$2=!1,Q2.forEach(function(q){try{n.removeListener(q,F4[q])}catch(J){}}),n.emit=D4,n.reallyExit=L5,X0.count-=1},K6.exports.unload=M4,N1=function(q,J,X){if(X0.emitted[q])return;X0.emitted[q]=!0,X0.emit(q,J,X)},F4={},Q2.forEach(function(Z){F4[Z]=function(){if(!X2(global.process))return;var J=n.listeners(Z);if(J.length===X0.count){if(M4(),N1("exit",null,Z),N1("afterexit",null,Z),DJ&&Z==="SIGHUP")Z="SIGINT";n.kill(n.pid,Z)}}}),K6.exports.signals=function(){return Q2},$2=!1,B5=function(){if($2||!X2(global.process))return;$2=!0,X0.count+=1,Q2=Q2.filter(function(q){try{return n.on(q,F4[q]),!0}catch(J){return!1}}),n.emit=jJ,n.reallyExit=AJ},K6.exports.load=B5,L5=n.reallyExit,AJ=function(q){if(!X2(global.process))return;n.exitCode=q||0,N1("exit",n.exitCode,null),N1("afterexit",n.exitCode,null),L5.call(n,n.exitCode)},D4=n.emit,jJ=function(q,J){if(q==="exit"&&X2(global.process)){if(J!==void 0)n.exitCode=J;var X=D4.apply(this,arguments);return N1("exit",n.exitCode,null),N1("afterexit",n.exitCode,null),X}else return D4.apply(this,arguments)}}var FJ,Q2,DJ,G6,X0,M4,N1,F4,$2,B5,L5,AJ,D4,jJ});var iB=c((Tx,TJ)=>{var nB=Symbol();function Ax(Z,q,J){let X=q[nB];if(X)return q.stat(Z,($,Y)=>{if($)return J($);J(null,Y.mtime,X)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);q.utimes(Z,Q,Q,($)=>{if($)return J($);q.stat(Z,(Y,H)=>{if(Y)return J(Y);let K=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(q,nB,{value:K}),J(null,H.mtime,K)})})}function jx(Z){let q=Date.now();if(Z==="s")q=Math.ceil(q/1000)*1000;return new Date(q)}Tx.probe=Ax;Tx.getMtime=jx});var tB=c((vx,j4)=>{var wx=Y0("path"),wJ=MJ(),kx=dB(),Nx=lB(),aB=iB(),L1={};function A4(Z,q){return q.lockfilePath||`${Z}.lock`}function kJ(Z,q,J){if(!q.realpath)return J(null,wx.resolve(Z));q.fs.realpath(Z,J)}function OJ(Z,q,J){let X=A4(Z,q);q.fs.mkdir(X,(Q)=>{if(!Q)return aB.probe(X,q.fs,($,Y,H)=>{if($)return q.fs.rmdir(X,()=>{}),J($);J(null,Y,H)});if(Q.code!=="EEXIST")return J(Q);if(q.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));q.fs.stat(X,($,Y)=>{if($){if($.code==="ENOENT")return OJ(Z,{...q,stale:0},J);return J($)}if(!oB(Y,q))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));sB(Z,q,(H)=>{if(H)return J(H);OJ(Z,{...q,stale:0},J)})})})}function oB(Z,q){return Z.mtime.getTime()<Date.now()-q.stale}function sB(Z,q,J){q.fs.rmdir(A4(Z,q),(X)=>{if(X&&X.code!=="ENOENT")return J(X);J()})}function z5(Z,q){let J=L1[Z];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||q.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,q.fs.stat(J.lockfilePath,(X,Q)=>{let $=J.lastUpdate+q.stale<Date.now();if(X){if(X.code==="ENOENT"||$)return IJ(Z,J,Object.assign(X,{code:"ECOMPROMISED"}));return J.updateDelay=1000,z5(Z,q)}if(J.mtime.getTime()!==Q.mtime.getTime())return IJ(Z,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=aB.getMtime(J.mtimePrecision);q.fs.utimes(J.lockfilePath,H,H,(K)=>{let U=J.lastUpdate+q.stale<Date.now();if(J.released)return;if(K){if(K.code==="ENOENT"||U)return IJ(Z,J,Object.assign(K,{code:"ECOMPROMISED"}));return J.updateDelay=1000,z5(Z,q)}J.mtime=H,J.lastUpdate=Date.now(),J.updateDelay=null,z5(Z,q)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function IJ(Z,q,J){if(q.released=!0,q.updateTimeout)clearTimeout(q.updateTimeout);if(L1[Z]===q)delete L1[Z];q.options.onCompromised(J)}function xx(Z,q,J){q={stale:1e4,update:null,realpath:!0,retries:0,fs:wJ,onCompromised:(X)=>{throw X},...q},q.retries=q.retries||0,q.retries=typeof q.retries==="number"?{retries:q.retries}:q.retries,q.stale=Math.max(q.stale||0,2000),q.update=q.update==null?q.stale/2:q.update||0,q.update=Math.max(Math.min(q.update,q.stale/2),1000),kJ(Z,q,(X,Q)=>{if(X)return J(X);let $=kx.operation(q.retries);$.attempt(()=>{OJ(Q,q,(Y,H,K)=>{if($.retry(Y))return;if(Y)return J($.mainError());let U=L1[Q]={lockfilePath:A4(Q,q),mtime:H,mtimePrecision:K,options:q,lastUpdate:Date.now()};z5(Q,q),J(null,(W)=>{if(U.released)return W&&W(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));rB(Q,{...q,realpath:!1},W)})})})})}function rB(Z,q,J){q={fs:wJ,realpath:!0,...q},kJ(Z,q,(X,Q)=>{if(X)return J(X);let $=L1[Q];if(!$)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));$.updateTimeout&&clearTimeout($.updateTimeout),$.released=!0,delete L1[Q],sB(Q,q,J)})}function Px(Z,q,J){q={stale:1e4,realpath:!0,fs:wJ,...q},q.stale=Math.max(q.stale||0,2000),kJ(Z,q,(X,Q)=>{if(X)return J(X);q.fs.stat(A4(Q,q),($,Y)=>{if($)return $.code==="ENOENT"?J(null,!1):J($);return J(null,!oB(Y,q))})})}function Ex(){return L1}Nx(()=>{for(let Z in L1){let q=L1[Z].options;try{q.fs.rmdirSync(A4(Z,q))}catch(J){}}});vx.lock=xx;vx.unlock=rB;vx.check=Px;vx.getLocks=Ex});var ZL=c((ze,eB)=>{var hx=MJ();function fx(Z){let q=["mkdir","realpath","stat","rmdir","utimes"],J={...Z};return q.forEach((X)=>{J[X]=(...Q)=>{let $=Q.pop(),Y;try{Y=Z[`${X}Sync`](...Q)}catch(H){return $(H)}$(null,Y)}}),J}function gx(Z){return(...q)=>new Promise((J,X)=>{q.push((Q,$)=>{if(Q)X(Q);else J($)}),Z(...q)})}function mx(Z){return(...q)=>{let J,X;if(q.push((Q,$)=>{J=Q,X=$}),Z(...q),J)throw J;return X}}function ux(Z){if(Z={...Z},Z.fs=fx(Z.fs||hx),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}eB.exports={toPromise:gx,toSync:mx,toSyncOptions:ux}});var JL=c((_e,x1)=>{var U6=tB(),{toPromise:_5,toSync:R5,toSyncOptions:NJ}=ZL();async function qL(Z,q){let J=await _5(U6.lock)(Z,q);return _5(J)}function px(Z,q){let J=R5(U6.lock)(Z,NJ(q));return R5(J)}function dx(Z,q){return _5(U6.unlock)(Z,q)}function cx(Z,q){return R5(U6.unlock)(Z,NJ(q))}function lx(Z,q){return _5(U6.check)(Z,q)}function nx(Z,q){return R5(U6.check)(Z,NJ(q))}x1.exports=qL;x1.exports.lock=qL;x1.exports.unlock=dx;x1.exports.lockSync=px;x1.exports.unlockSync=cx;x1.exports.check=lx;x1.exports.checkSync=nx});function PJ(){if(!xJ)xJ=JL();return xJ}function Re(Z,q){return PJ().lock(Z,q)}function XL(Z,q){return PJ().lockSync(Z,q)}function Me(Z,q){return PJ().check(Z,q)}var xJ;var QL=()=>{};function T4(Z){if(Z===void 0)return!1;let q=Z.trim().toLowerCase();return q==="0"||q==="false"||q==="no"||q==="off"||q===""}function ax(){let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC,q=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&T4(Z)||q!==void 0&&T4(q)){if(process.env.DISABLE_TELEMETRY&&!T4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function EJ(){return ax()==="essential-traffic"}function vJ(){if(!EJ())return null;let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!T4(Z))return"CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC";let q=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(q!==void 0&&!T4(q))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}function $L(){let Z=vJ();return Z==="claudin-default"?null:Z}var CJ=()=>{};import{dirname as ox,join as YL}from"path";function GL(Z){return[YL(Z,M5),YL(Z,HL)]}function sx(Z,q){let[J,X]=GL(Z);return q(J)?J:X}function rx(Z,q){return GL(Z).some((J)=>q(J))}function Ae(Z,q){let J=Z;while(!0){if(rx(J,q))return sx(J,q);let X=ox(J);if(X===J)return null;J=X}}function je(Z){return Z===M5||Z===HL}var M5="AGENTS.md",HL="CLAUDE.md";var KL=()=>{};var tx,ex;var UL=B(()=>{tx=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],ex=["normal","vim"]});var RL={};hq(RL,{validateTeamMemWritePath:()=>HP,validateTeamMemKey:()=>GP,isTeamMemoryEnabled:()=>BL,isTeamMemPath:()=>_L,isTeamMemLikelyGitIgnored:()=>YP,isTeamMemFile:()=>KP,getTeamMemPath:()=>O4,getTeamMemEntrypoint:()=>XP,PathTraversalError:()=>_0});import{readFileSync as ZP}from"fs";import{lstat as qP,realpath as VL}from"fs/promises";import{dirname as WL,join as I4,resolve as yJ,sep as SJ}from"path";function JP(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path key: "${Z}"`);let q;try{q=decodeURIComponent(Z)}catch{q=Z}if(q!==Z&&(q.includes("..")||q.includes("/")))throw new _0(`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 _0(`Unicode-normalized traversal in path key: "${Z}"`);if(Z.includes("\\"))throw new _0(`Backslash in path key: "${Z}"`);if(Z.startsWith("/"))throw new _0(`Absolute path key: "${Z}"`);return Z}function BL(){if(!kB())return!1;return s1("tengu_herring_clock",!0)}function O4(){return(I4(R4(),"team")+SJ).normalize("NFC")}function XP(){return I4(R4(),"team","MEMORY.md")}async function LL(Z){let q=[],J=Z;for(let X=WL(J);J!==X;X=WL(J))try{let Q=await VL(J);return q.length===0?Q:I4(Q,...q.reverse())}catch(Q){let $=W0(Q);if($==="ENOENT")try{if((await qP(J)).isSymbolicLink())throw new _0(`Dangling symlink detected (target does not exist): "${J}"`)}catch(Y){if(Y instanceof _0)throw Y}else if($==="ELOOP")throw new _0(`Symlink loop detected in path: "${J}"`);else if($!=="ENOTDIR"&&$!=="ENAMETOOLONG")throw new _0(`Cannot verify path containment (${$}): "${J}"`);q.push(J.slice(X.length+SJ.length)),J=X}return Z}async function zL(Z){let q;try{q=await VL(O4().replace(/[/\\]+$/,""))}catch(J){let X=W0(J);if(X==="ENOENT"||X==="ENOTDIR")return!0;return!1}if(Z===q)return!0;return Z.startsWith(q+SJ)}function _L(Z){let q=yJ(Z),J=O4();return q.startsWith(J)}async function HP(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path: "${Z}"`);let q=yJ(Z),J=O4();if(!q.startsWith(J))throw new _0(`Path escapes team memory directory: "${Z}"`);let X=await LL(q);if(!await zL(X))throw new _0(`Path escapes team memory directory via symlink: "${Z}"`);return q}async function GP(Z){JP(Z);let q=O4(),J=I4(q,Z),X=yJ(J);if(!X.startsWith(q))throw new _0(`Key escapes team memory directory: "${Z}"`);let Q=await LL(X);if(!await zL(Q))throw new _0(`Key escapes team memory directory via symlink: "${Z}"`);return X}function KP(Z){return BL()&&_L(Z)}var _0,QP,$P,YP;var ML=B(()=>{I1();Oq();o1();BJ();_0=class _0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}};QP=/^\/?\.claudin\/?$/,$P=/^!\/?\.claudin\/memory\/team\/?/,YP=u((Z)=>{try{let q=ZP(I4(Z,".gitignore"),"utf-8"),J=!1;for(let X of q.split(`
103
+ `)){let Q=X.trim();if(!Q||Q.startsWith("#"))continue;if(QP.test(Q))J=!0;else if($P.test(Q))J=!1}return J}catch{return!1}})});import{randomBytes as UP}from"crypto";import{unwatchFile as WP,watchFile as VP}from"fs";import{basename as O5,dirname as w5,join as D0,resolve as A5}from"path";function z1(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,collapseSubagentProgress:!0,summarizeSubagentResult:!1,thinkingHistoryRedactionEnabled:!0,narrationHistoryRedactionEnabled:!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,inlineImagesMode:"auto",autoBackgroundAgentsEnabled:!1,workflowsDefaultBackground:!1}}function Q00(Z){return LP.includes(Z)}function $00(){AL=!1}function Y00(){return AL||=_P()}function _P(){if(DL())return!0;let Z=Q0(),q=dJ();if(Z.projects?.[q]?.hasTrustDialogAccepted)return!0;let X=a1(t());while(!0){if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let $=a1(A5(X,".."));if($===X)break;X=$}return!1}function H00(Z){let q=Q0(),J=a1(A5(Z));while(!0){if(q.projects?.[J]?.hasTrustDialogAccepted)return!0;let X=a1(A5(J,".."));if(X===J)return!1;J=X}}function G00(){return}function K00(){return}function U00(Z){return zP.includes(Z)}function N5(Z){let q=r0.config;if(!q)return!1;let J=q.oauthAccount!==void 0&&Z.oauthAccount===void 0,X=q.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return J||X}function jL(Z){return gJ.add(Z),()=>gJ.delete(Z)}function j5(){for(let Z of gJ)try{Z()}catch{}}function mJ(Z){return{...Z,projects:FP(Z.projects)}}function A0(Z){let q=null;try{if(IL(z0(),z1,(X)=>{let Q=Z(X);if(Q===X)return X;return q=mJ(Q),q})&&q)T5(q),j5()}catch(J){let X=W0(J);if(X==="EACCES"||X==="EPERM"||X==="EROFS"){P(`Skipping global config write due to permission error: ${J}`,{level:"error"});return}P(`Failed to save config with lock: ${J}`,{level:"error"});let Q=H2(z0(),z1);if(N5(Q)){P("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),o0("",{});return}let $=Z(Q);if($===Q)return;q=mJ($),TL(z0(),q,k5),T5(q),j5()}}function W00(){return pJ}function MP(){let Z=w4+D5;if(Z>0)o0("",{cache_hits:w4,cache_misses:D5,hit_rate:w4/Z});w4=0,D5=0}function uJ(Z){if(Z.installMethod!==void 0)return Z;let q=Z,J="unknown",X=Z.autoUpdates??!0;switch(q.autoUpdaterStatus){case"migrated":J="local";break;case"installed":J="native";break;case"disabled":X=!1;break;case"enabled":case"no_permissions":case"not_configured":J="global";break;case void 0:break}return{...Z,installMethod:J,autoUpdates:X}}function FP(Z){if(!Z)return Z;let q={},J=!1;for(let[X,Q]of Object.entries(Z)){let $=Q;if($.history!==void 0){J=!0;let{history:Y,...H}=$;q[X]=H}else q[X]=Q}return J?q:Z}function AP(){if(fJ)return;fJ=!0;let Z=z0();VP(Z,{interval:DP,persistent:!1},(q)=>{if(q.mtimeMs<=r0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((J)=>{if(q.mtimeMs<=r0.mtime)return;let X=m0(E0(J));if(X===null||typeof X!=="object")return;r0={config:uJ({...z1(),...X}),mtime:q.mtimeMs},P1={mtime:q.mtimeMs,size:q.size}}).catch(()=>{})}),M6(async()=>{WP(Z),fJ=!1})}function T5(Z){r0={config:Z,mtime:Date.now()},P1=null}function Q0(){if(r0.config)return w4++,r0.config;D5++;try{let Z=null;try{Z=N().statSync(z0())}catch{}let q=uJ(H2(z0(),z1));return r0={config:q,mtime:Z?.mtimeMs??Date.now()},P1=Z?{mtime:Z.mtimeMs,size:Z.size}:null,AP(),q}catch{return uJ(H2(z0(),z1))}}function B00(){let Z=Q0().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function L00(Z){let q=Q0();if(q.customApiKeyResponses?.approved?.includes(Z))return"approved";if(q.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function TL(Z,q,J){let X=w5(Z);N().mkdirSync(X);let $=J3(q,(Y,H)=>m(Y)!==m(J[H]));if(o2(Z,m($,null,2),{encoding:"utf-8",mode:384}),Z===z0())pJ++}function IL(Z,q,J){let X=q(),Q=w5(Z),$=N();$.mkdirSync(Q);let Y;try{let H=`${Z}.lock`,K=Date.now();Y=XL(Z,{lockfilePath:H,onCompromised:(z)=>{P(`Config lock compromised: ${z}`,{level:"error"})}});let U=Date.now()-K;if(U>100)P("Lock acquisition took longer than expected - another Claude instance may be running"),o0("",{lock_time_ms:U});if(P1&&Z===z0())try{let z=$.statSync(Z);if(z.mtimeMs!==P1.mtime||z.size!==P1.size)o0("",{read_mtime:P1.mtime,write_mtime:z.mtimeMs,read_size:P1.size,write_size:z.size})}catch(z){if(W0(z)!=="ENOENT")throw z}let W=H2(Z,q);if(Z===z0()&&N5(W))return P("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudin/config.json. See GH #3117.",{level:"error"}),o0("",{}),!1;let V=J(W);if(V===W)return!1;let L=J3(V,(z,_)=>m(z)!==m(X[_]));try{let z=O5(Z),_=x5();try{$.mkdirSync(_)}catch(T){if(W0(T)!=="EEXIST")throw T}let R=60000,M=$.readdirStringSync(_).filter((T)=>T.startsWith(`${z}.backup.`)).sort().reverse(),F=M[0],k=F?Number(F.split(".backup.").pop()):0,D=Number.isNaN(k)||Date.now()-k>=R,O=jP(Z),j=D&&O;if(j){let T=D0(_,`${z}.backup.${Date.now()}`);$.copyFileSync(Z,T)}if(O){let A=j?$.readdirStringSync(_).filter((b)=>b.startsWith(`${z}.backup.`)).sort().reverse():M;for(let b of A.slice(5))try{$.unlinkSync(D0(_,b))}catch{}}}catch(z){if(W0(z)!=="ENOENT")P(`Failed to backup config: ${z}`,{level:"error"})}if(o2(Z,m(L,null,2),{encoding:"utf-8",mode:384}),Z===z0())pJ++;return!0}finally{if(Y)Y()}}function z00(){return I5}function _00(){if(I5)return;let Z=Date.now();H0("info","enable_configs_started"),I5=!0,H2(z0(),z1,!0),H0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function x5(){return D0(G0(),"backups")}function FL(Z){let q=N(),J=O5(Z),X=x5();try{let Y=q.readdirStringSync(X).filter((H)=>H.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return D0(X,Y)}catch{}let Q=w5(Z);try{let Y=q.readdirStringSync(Q).filter((K)=>K.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return D0(Q,Y);let H=`${Z}.backup`;try{return q.statSync(H),H}catch{}}catch{}return null}function jP(Z){let q=N();try{return Z0(E0(q.readFileSync(Z,{encoding:"utf-8"}))),!0}catch{return!1}}function TP(Z,q){let J=N(),X=O5(Z),Q=new Set;for(let $ of[x5(),w5(Z)]){let Y;try{Y=J.readdirStringSync($).filter((H)=>H.startsWith(`${X}.backup.`)).sort().reverse()}catch{continue}for(let H of Y){let K=D0($,H);if(Q.has(K))continue;Q.add(K);try{let U=Z0(E0(J.readFileSync(K,{encoding:"utf-8"})));return{config:{...q(),...U},backupPath:K}}catch{}}}return null}function H2(Z,q,J){if(!I5)throw Error("Config accessed before allowed.");let X=N();try{let Q=X.readFileSync(Z,{encoding:"utf-8"});try{let $=Z0(E0(Q));return{...q(),...$}}catch($){let Y=$ instanceof Error?$.message:String($);throw new F5(Y,Z,q())}}catch(Q){if(W0(Q)==="ENOENT"){let Y=FL(Z);if(Y)process.stderr.write(`
104
+ Claude configuration file not found at: ${Z}
105
+ A backup file exists at: ${Y}
106
+ You can manually restore it by running: cp "${Y}" "${Z}"
107
+
108
+ `);return q()}if(Q instanceof F5&&J)throw Q;if(Q instanceof F5){if(P(`Config file corrupted, resetting to defaults: ${Q.message}`,{level:"error"}),!bJ){bJ=!0;try{S(Q);let _=!1;try{X.statSync(`${Z}.backup`),_=!0}catch{}o0("",{has_backup:_})}finally{bJ=!1}}process.stderr.write(`
109
+ Claude configuration file at ${Z} is corrupted: ${Q.message}
110
+ `);let Y=O5(Z),H=x5();try{X.mkdirSync(H)}catch(_){if(W0(_)!=="EEXIST")throw _}let K=X.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),U,W=!1,V=X.readFileSync(Z,{encoding:"utf-8"});for(let _ of K)try{let R=X.readFileSync(D0(H,_),{encoding:"utf-8"});if(V===R){W=!0;break}}catch{}if(!W){U=D0(H,`${Y}.corrupted.${Date.now()}`);try{X.copyFileSync(Z,U),P(`Corrupted config backed up to: ${U}`,{level:"error"})}catch{}}let L=TP(Z,q);if(L){if(U)process.stderr.write(`The corrupted file has been backed up to: ${U}
111
+ `);let _=!1;try{X.copyFileSync(L.backupPath,Z),_=!0}catch{}return process.stderr.write(_?`Recovered configuration from backup: ${L.backupPath}
112
+
113
+ `:`Recovered configuration from backup (in memory): ${L.backupPath}
114
+
115
+ `),L.config}let z=FL(Z);if(U)process.stderr.write(`The corrupted file has been backed up to: ${U}
116
+ `);else if(W)process.stderr.write(`The corrupted file has already been backed up.
117
+ `);if(z)process.stderr.write(`A backup file exists at: ${z}
118
+ You can manually restore it by running: cp "${z}" "${Z}"
119
+
120
+ `);else process.stderr.write(`
121
+ `)}return q()}}function dJ(){let Z=q2(),q=Y2.get(Z);if(q!==void 0)return Y2.delete(Z),Y2.set(Z,q),q;let J=n1(Z),X=J?a1(J):a1(A5(Z));if(Y2.size>=IP){let Q=Y2.keys().next().value;if(Q!==void 0)Y2.delete(Q)}return Y2.set(Z,X),X}function P5(){let Z=dJ(),q=Q0();if(!q.projects)return W6;let J=q.projects[Z]??W6;if(typeof J.allowedTools==="string")J.allowedTools=m0(J.allowedTools)??[];return J}function cJ(Z){let q=dJ(),J=null;try{if(IL(z0(),z1,(Q)=>{let $=Q.projects?.[q]??W6,Y=Z($);if(Y===$)return Q;return J={...Q,projects:{...Q.projects,[q]:Y}},J})&&J)T5(J),j5()}catch(X){P(`Failed to save config with lock: ${X}`,{level:"error"});let Q=H2(z0(),z1);if(N5(Q)){P("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),o0("",{});return}let $=Q.projects?.[q]??W6,Y=Z($);if(Y===$)return;J={...Q,projects:{...Q.projects,[q]:Y}},TL(z0(),J,k5),T5(J),j5()}}function OP(){return wP()!==null}function R00(){return OP()&&!J0(process.env.FORCE_AUTOUPDATE_PLUGINS)}function M00(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function wP(Z){if(J0(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let q=Z?.ignoreClaudinDefaultPrivacy?$L():vJ();if(q)return{type:"env",envVar:q};let J=Q0();if(J.autoUpdates===!1&&(J.installMethod!=="native"||J.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function F00(){let Z=Q0();if(Z.userID)return Z.userID;let q=UP(32).toString("hex");return A0((J)=>({...J,userID:q})),q}function D00(){if(!Q0().firstStartTime){let q=new Date().toISOString();A0((J)=>({...J,firstStartTime:J.firstStartTime??q}))}}function A00(Z){let q=q2();switch(Z){case"User":return D0(G0(),"CLAUDE.md");case"Local":return D0(q,"CLAUDE.local.md");case"Project":return D0(q,M5);case"Managed":return D0(w1(),"CLAUDE.md");case"AutoMem":return PB()}return BP.getTeamMemEntrypoint()}function j00(){return D0(w1(),".claudin","rules")}function T00(){return D0(G0(),"rules")}function k00(Z){r0.config=Z,r0.mtime=Z?Date.now():0}var BP,bJ=!1,W6,X00,k5,LP,zP,AL=!1,RP,hJ,gJ,r0,P1=null,w4=0,D5=0,pJ=0,V00=20,DP=1000,fJ=!1,I5=!1,IP=32,Y2,I00,O00,w00;var lJ=B(()=>{DQ();z2();BJ();WW();e0();NQ();G1();_6();bq();W1();o1();S7();M0();D6();m7();C7();QL();k0();k7();CJ();p7();KL();R0();UL();BP=(ML(),k4(RL)),W6={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},X00=["off","compact","full"];k5=z1(),LP=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","narrationHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","copyFullResponse","copyOnSelect","flickerFreeMode","renderFrameRate","permissionExplainerEnabled","prStatusFooterEnabled","prStatusHosts","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","bashOutputFilterCapEnabled","autoBackgroundAgentsEnabled","repeatedFailureHintEnabled","workflowsDefaultBackground","oauthBrowser","inlineImagesMode"];zP=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];RP={...k5,autoUpdates:!1,knowledgeGraphEnabled:!0};hJ={...W6};gJ=new Set;r0={config:null,mtime:0};M6(async()=>{MP()});Y2=new Map;I00=H2,O00=N5,w00=mJ});function E5(Z){return Z.split(/[;,]/).map((q)=>q.trim()).filter((q)=>q.length>0)}function OL(Z){let q=E5(Z);return q.length>0?q[0]:Z.trim()}var nJ=()=>{};import{randomBytes as kP}from"crypto";function V6(Z){return Z?.trim()??""}function B0(Z){let q=V6(Z);return q.length>0?q:void 0}function NP(Z){return V6(Z).replace(/\/+$/,"")}function xP(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function PP(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function EP(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let q={};for(let[J,X]of Object.entries(Z)){let Q=V6(J),$=typeof X==="string"?X.trim():"";if(Q.length>0&&$.length>0)q[Q]=$}return Object.keys(q).length>0?q:void 0}function vP(Z){if(!Z||typeof Z!=="object")return;let q={},J=B0(Z.codexAuthPath);if(J)q.codexAuthPath=J;let X=B0(Z.codexAccountId);if(X)q.codexAccountId=X;let Q=B0(Z.githubToken);if(Q)q.githubToken=Q;let $=B0(Z.awsRegion);if($)q.awsRegion=$;let Y=B0(Z.gcpProject);if(Y)q.gcpProject=Y;let H=B0(Z.gcpRegion);if(H)q.gcpRegion=H;let K=B0(Z.azureResource);if(K)q.azureResource=K;let U=EP(Z.customHeaders);if(U)q.customHeaders=U;let W=PP(Z.reasoningEffort);if(W)q.reasoningEffort=W;return Object.keys(q).length>0?q:void 0}function PL(Z){let q=V6(Z.id),J=V6(Z.name),X=xP(Z.provider),Q=NP(Z.baseUrl),$=V6(Z.model);if(!q||!J||!Q||X!=="anthropic"&&!$)return null;let H={id:q,name:J,provider:X,baseUrl:Q,model:$,apiKey:B0(Z.apiKey)},K=vP(Z.extras);if(K)H.extras=K;return H}function CP(Z){let q=new Set,J=[];for(let X of Z??[]){let Q=PL(X);if(!Q||q.has(Q.id))continue;q.add(Q.id),J.push(Q)}return J}function yP(){return`provider_${kP(6).toString("hex")}`}function EL(Z,q=yP()){return PL({id:q,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function vL(Z,q=Q0()){return q.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function y00(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"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:wL,model:kL,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"opencode-zen":return{provider:"openai",name:"OpenCode Zen",baseUrl:"https://opencode.ai/zen/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"opencode-go":return{provider:"openai",name:"OpenCode GO",baseUrl:"https://opencode.ai/zen/go/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"zai":return{provider:"openai",name:"Z.AI (GLM Coding Plan)",baseUrl:"https://api.z.ai/api/coding/paas/v4",model:"glm-5.2",apiKey:"",requiresApiKey:!0};case"cloudflare-workers-ai":return{provider:"openai",name:"Cloudflare Workers AI",baseUrl:"https://api.cloudflare.com/client/v4/accounts/YOUR-ACCOUNT-ID/ai/v1",model:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"cloudflare-ai-gateway":return{provider:"openai",name:"Cloudflare AI Gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/YOUR-ACCOUNT-ID/default/compat",model:"workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:wL,model:kL,apiKey:"",requiresApiKey:!1}}}function u0(Z=Q0()){return CP(Z.providerProfiles)}function S00(Z=Q0()){return u0(Z).length>0}function _1(Z=Q0()){let q=u0(Z);if(q.length===0)return;let J=B0(P5().activeProviderProfileId);if(J){let Q=q.find(($)=>$.id===J);if(Q)return Q}let X=B0(Z.activeProviderProfileId);return q.find((Q)=>Q.id===X)??q[0]}function b00(){let Z=B0(P5().activeProviderProfileId);if(!Z)return;return u0().some((J)=>J.id===Z)?Z:void 0}function SP(){return B0(P5().activeProviderProfileId)}function h00(){return SP()!==void 0}function bP(){return B0(Q0().activeProviderProfileId)}function f00(Z,q){let J=EL(Z);if(!J)return null;let X=q?.makeActive??!0;if(A0((Q)=>{let Y=[...u0(Q),J],H=B0(Q.activeProviderProfileId),K=X||!H||!Y.some((U)=>U.id===H)?J.id:H;return{...Q,providerProfiles:Y,activeProviderProfileId:K}}),bP()===J.id)fP(J.id),mP();return J}function g00(Z,q){let J=EL(q,Z);if(!J)return null;let X=!1;if(A0((Q)=>{let $=u0(Q),Y=$.findIndex((L)=>L.id===Z);if(Y<0)return Q;X=!0;let H=[...$];H[Y]=J;let K={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete K[Z];let U=B0(Q.activeProviderProfileId),W=U&&H.some((L)=>L.id===U)?U:H[0]?.id;return{...Q,providerProfiles:H,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:K,openaiAdditionalModelOptionsCache:W===Z?[]:Q.openaiAdditionalModelOptionsCache}}),!X)return null;return J}function m00(Z){let q=B0(Z);if(!q)return null;let J=_1();if(!J)return null;if(E5(J.model).includes(q))return J;A0(($)=>{let Y=u0($),H=Y.findIndex((V)=>V.id===J.id);if(H<0)return $;let K=Y[H];if(K.model===q)return $;let U=[...Y];U[H]={...K,model:q};let W={...$.openaiAdditionalModelOptionsCacheByProfile??{}};return delete W[J.id],{...$,providerProfiles:U,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:[]}});let Q=_1();if(!Q||Q.id!==J.id)return null;return Q}function u00(){let Z=_1();if(!Z)return;A0((q)=>{let J=u0(q),X=J.findIndex((H)=>H.id===Z.id);if(X<0)return q;let Q=J[X];if(!Q.model)return q;let $=[...J];$[X]={...Q,model:""};let Y={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete Y[Z.id],{...q,providerProfiles:$,openaiAdditionalModelOptionsCacheByProfile:Y,openaiAdditionalModelOptionsCache:[]}})}function hP(Z){let q=E5(Z.model);if(q.length===0)return[];return q.map((J)=>({value:J,label:J,description:`Provider: ${Z.name}`}))}function iJ(Z,q){let J=hP(Z);return{openaiAdditionalModelOptionsCache:J.length>0?J:vL(Z.id,q),openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:J.length>0?J:q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function fP(Z){let q=Q0(),X=u0(q).find((Q)=>Q.id===Z);if(!X)return null;return A0((Q)=>({...Q,activeProviderProfileId:Z,...iJ(X,Q)})),X}function p00(Z){if(Z===null){cJ(($)=>({...$,activeProviderProfileId:void 0,activeModelForProject:void 0,activeModelForProjectProfileId:void 0}));let Q=_1();if(Q)NL(Q);return null}let J=u0().find((Q)=>Q.id===Z);if(!J)return null;let X=!1;if(cJ((Q)=>{if(!u0().some((H)=>H.id===Z))return X=!0,Q;let Y={...Q,activeProviderProfileId:Z};if(Q.activeProviderProfileId!==Z)Y.activeModelForProject=void 0,Y.activeModelForProjectProfileId=void 0;return Y}),X)return null;return NL(J),J}function NL(Z){let q=Q0(),J=iJ(Z,q),X=q.openaiAdditionalModelOptionsCache??[],Q=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],$=J.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(xL(X,J.openaiAdditionalModelOptionsCache??[])&&xL(Q,$))return;A0((Y)=>({...Y,...iJ(Z,Y)}))}function xL(Z,q){if(Z.length!==q.length)return!1;for(let J=0;J<Z.length;J++)if(Z[J]!==q[J])return!1;return!0}function gP(Z,q){if(!Z)return{projects:Z,stripped:[]};let J=($)=>{let Y=$?.activeProviderProfileId;return Y!=null&&q(Y)?Y:void 0};if(!Object.values(Z).some(($)=>J($)!==void 0))return{projects:Z,stripped:[]};let X=[];return{projects:Object.fromEntries(Object.entries(Z).map(([$,Y])=>{let H=J(Y);if(H!==void 0){let{activeProviderProfileId:K,activeModelForProject:U,activeModelForProjectProfileId:W,...V}=Y;return X.push({path:$,activeProviderProfileId:H,activeModelForProject:U??void 0}),[$,V]}return[$,Y]})),stripped:X}}function d00(Z){let q=!1,J;return A0((X)=>{let Q=u0(X);if(!Q.find((L)=>L.id===Z))return X;q=!0;let Y=Q.filter((L)=>L.id!==Z),H=B0(X.activeProviderProfileId),U=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(U)J=Y.find((L)=>L.id===U)??Y[0];let W={...X.openaiAdditionalModelOptionsCacheByProfile??{}};delete W[Z];let{projects:V}=gP(X.projects,(L)=>L===Z);return{...X,providerProfiles:Y,activeProviderProfileId:U,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:U?vL(U,{...X,openaiAdditionalModelOptionsCacheByProfile:W}):[],projects:V}}),{removed:q,activeProfileId:J?.id}}function c00(Z=Q0()){let q=_1(Z);if(!q)return Z.openaiAdditionalModelOptionsCache??[];let J=Z.openaiAdditionalModelOptionsCacheByProfile?.[q.id];if(J)return J;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function l00(Z){let q=_1();if(!q){A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z}));return}A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...J.openaiAdditionalModelOptionsCacheByProfile??{},[q.id]:Z}}))}function mP(){let Z=_1();if(!Z){A0((q)=>({...q,openaiAdditionalModelOptionsCache:[]}));return}A0((q)=>{let J={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete J[Z.id],{...q,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:J}})}var wL="http://localhost:11434/v1",kL="llama3.1:8b";var CL=B(()=>{lJ();nJ()});function v5(Z,q){return{name:`${Z.name}-with-${q.name}-fallback`,read(){let J=Z.read();if(J!==null&&J!==void 0)return J;return q.read()||{}},async readAsync(){let J=await Z.readAsync();if(J!==null&&J!==void 0)return J;return await q.readAsync()||{}},update(J){let X=Z.read(),Q=Z.update(J);if(Q.success){if(X===null)q.delete();return Q}let $=q.update(J);if($.success){if(X!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let J=Z.delete(),X=q.delete();return J||X}}}var yL=()=>{};function C5(Z,q,J=10*bL*SL){let U=[];try{let X;if(q===void 0)X={};else if(q instanceof AbortSignal)X={abortSignal:q,timeout:J};else X=q;let{abortSignal:Q,timeout:$=10*bL*SL,input:Y,stdio:H=["ignore","pipe","pipe"]}=X;Q?.throwIfAborted();const K=p2(U,A7`exec: ${Z.slice(0,200)}`,0);try{let z=P0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:t(),stdio:H,shell:!0,reject:!1,input:Y});if(!z.stdout)return null;return z.stdout.trim()||null}catch{return null}}catch(W){var V=W,L=1}finally{d2(U,V,L)}}var SL=1000,bL=60;var aJ=B(()=>{u2();e0();R0()});import{createHash as uP}from"crypto";import{userInfo as pP}from"os";function G2(Z=""){let q=G0(),X=!process.env.CLAUDIN_CONFIG_DIR?"":`-${uP("sha256").update(q).digest("hex").substring(0,8)}`;return`Claude Code${hL().OAUTH_FILE_SUFFIX}${Z}${X}`}function N4(Z=""){return G2(Z)}function O0(){try{return process.env.USER||pP().username}catch{return"claude-code-user"}}function sJ(){$0.cache={data:null,cachedAt:0},$0.generation++,$0.readInFlight=null}function X10(Z){if($0.cache.cachedAt!==0)return;let q=null;if(Z)try{q=JSON.parse(Z)}catch{return}$0.cache={data:q,cachedAt:Date.now()}}var p0="-credentials",oJ=30000,$0;var y5=B(()=>{aW();W1();$0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function cP(){try{let Z=N4(p0),q=O0(),{stdout:J,code:X}=await a("security",["find-generic-password","-a",q,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(X===0&&J)return Z0(J.trim())}catch(Z){}return null}function W10(){if(B6!==void 0)return B6;if(process.platform!=="darwin")return B6=!1,!1;try{B6=P0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{B6=!1}return B6}var dP=4032,rJ,B6;var fL=B(()=>{u2();G1();w7();aJ();R0();y5();rJ={name:"keychain",read(){let Z=$0.cache;if(Date.now()-Z.cachedAt<oJ)return Z.data;try{let q=N4(p0),J=O0(),X=C5(`security find-generic-password -a "${J}" -w -s "${q}"`);if(X){let Q=Z0(X);return $0.cache={data:Q,cachedAt:Date.now()},Q}}catch(q){}if(Z.data!==null)return P("[keychain] read failed; serving stale cache",{level:"warn"}),$0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return $0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=$0.cache;if(Date.now()-Z.cachedAt<oJ)return Z.data;if($0.readInFlight)return $0.readInFlight;let q=$0.generation,J=cP().then((X)=>{if(q===$0.generation){if(X===null&&Z.data!==null)P("[keychain] readAsync failed; serving stale cache",{level:"warn"});let Q=X??Z.data;return $0.cache={data:Q,cachedAt:Date.now()},$0.readInFlight=null,Q}return X});return $0.readInFlight=J,J},update(Z){sJ();try{let q=N4(p0),J=O0(),X=m(Z),Q=Buffer.from(X,"utf-8").toString("hex"),$=`add-generic-password -U -a "${J}" -s "${q}" -X "${Q}"
122
+ `,Y;if($.length<=dP)Y=P0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else P(`Keychain payload (${X.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=P0("security",["add-generic-password","-U","-a",J,"-s",q,"-X",Q],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return $0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(q){return{success:!1}}},delete(){sJ();try{let Z=N4(p0),q=O0();return C5(`security delete-generic-password -a "${q}" -s "${Z}"`),!0}catch(Z){return!1}}}});var tJ;var gL=B(()=>{u2();R0();y5();tJ={name:"libsecret",read(){try{let Z=O0(),q=G2(p0),J=P0("secret-tool",["lookup","service",q,"account",Z],{reject:!1});if(J.exitCode===0&&J.stdout)return Z0(J.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let q=O0(),J=G2(p0),X=m(Z);return{success:P0("secret-tool",["store","--label",J,"service",J,"account",q],{input:X,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),q=G2(p0);return P0("secret-tool",["clear","service",q,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as lP}from"path";function x4(Z){return Z.replace(/'/g,"''")}function S5(){return G2(p0)}function mL(){return`${S5()}:${O0()}`}function eJ(){let Z=S5().replace(/[^a-zA-Z0-9._-]/g,"_");return lP(G0(),`${Z}.secure.dpapi`)}function P4(Z,q){try{return P0("powershell.exe",["-Command",Z],{input:q?.input,reject:!1})}catch{return null}}function ZX(Z){return typeof Z==="string"?Z:""}function nP(Z,q){let J=ZX(Z?.stderr).trim();if(J)return J;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${q} (exit code ${Z.exitCode}).`;return q}function uL(){let Z=S5().replace(/"/g,'`"'),q=O0().replace(/"/g,'`"'),J=`
123
+ Add-Type -AssemblyName System.Runtime.WindowsRuntime
124
+ try {
125
+ $vault = New-Object Windows.Security.Credentials.PasswordVault
126
+ $cred = $vault.Retrieve("${Z}", "${q}")
127
+ $cred.FillPassword()
128
+ [Console]::Out.Write($cred.Password)
129
+ } catch {
130
+ exit 1
131
+ }
132
+ `,X=P4(J);if(X?.exitCode===0&&X.stdout)try{return Z0(ZX(X.stdout))}catch{return null}return null}var qX;var pL=B(()=>{u2();W1();R0();y5();qX={name:"credential-locker-dpapi",read(){let Z=x4(eJ()),q=x4(mL()),J=`
133
+ try {
134
+ Add-Type -AssemblyName System.Security
135
+ $path = '${Z}'
136
+ if (!(Test-Path -LiteralPath $path)) {
137
+ exit 1
138
+ }
139
+
140
+ $protectedBase64 = [System.IO.File]::ReadAllText(
141
+ $path,
142
+ [System.Text.Encoding]::UTF8
143
+ ).Trim()
144
+ if (-not $protectedBase64) {
145
+ exit 1
146
+ }
147
+
148
+ $protectedBytes = [Convert]::FromBase64String($protectedBase64)
149
+ $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
150
+ $bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
151
+ $protectedBytes,
152
+ $entropyBytes,
153
+ [System.Security.Cryptography.DataProtectionScope]::CurrentUser
154
+ )
155
+ [Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
156
+ } catch {
157
+ exit 1
158
+ }
159
+ `,X=P4(J);if(X?.exitCode===0&&X.stdout)try{return Z0(ZX(X.stdout))}catch{return uL()}return uL()},async readAsync(){return this.read()},update(Z){let q=x4(eJ()),J=x4(mL()),X=m(Z),Q=`
160
+ try {
161
+ Add-Type -AssemblyName System.Security
162
+ $path = '${q}'
163
+ $directory = [System.IO.Path]::GetDirectoryName($path)
164
+ if ($directory) {
165
+ [System.IO.Directory]::CreateDirectory($directory) | Out-Null
166
+ }
167
+
168
+ $payload = [Console]::In.ReadToEnd()
169
+ $bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
170
+ $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${J}')
171
+ $protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
172
+ $bytes,
173
+ $entropyBytes,
174
+ [System.Security.Cryptography.DataProtectionScope]::CurrentUser
175
+ )
176
+ $protectedBase64 = [Convert]::ToBase64String($protectedBytes)
177
+ [System.IO.File]::WriteAllText(
178
+ $path,
179
+ $protectedBase64,
180
+ [System.Text.Encoding]::UTF8
181
+ )
182
+ } catch {
183
+ Write-Error $_.Exception.Message
184
+ exit 1
185
+ }
186
+ `,$=P4(Q,{input:X});if($?.exitCode===0)return{success:!0};return{success:!1,warning:nP($,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let q=`
187
+ try {
188
+ $path = '${x4(eJ())}'
189
+ if (Test-Path -LiteralPath $path) {
190
+ Remove-Item -LiteralPath $path -Force
191
+ }
192
+ } catch {
193
+ exit 1
194
+ }
195
+ `,J=P4(q),X=S5().replace(/"/g,'`"'),Q=O0().replace(/"/g,'`"'),$=`
196
+ Add-Type -AssemblyName System.Runtime.WindowsRuntime
197
+ try {
198
+ $vault = New-Object Windows.Security.Credentials.PasswordVault
199
+ $cred = $vault.Retrieve("${X}", "${Q}")
200
+ $vault.Remove($cred)
201
+ } catch {
202
+ exit 0
203
+ }
204
+ `,Y=P4($);return(J?.exitCode??1)===0}}});import{chmodSync as iP}from"fs";import{join as aP}from"path";function b5(){let Z=G0(),q=".credentials.json";return{storageDir:Z,storagePath:aP(Z,".credentials.json")}}var E4;var cL=B(()=>{W1();o1();M0();R0();E4={name:"plaintext",read(){let{storagePath:Z}=b5();try{let q=N().readFileSync(Z,{encoding:"utf8"});return Z0(q)}catch{return null}},async readAsync(){let{storagePath:Z}=b5();try{let q=await N().readFile(Z,{encoding:"utf8"});return Z0(q)}catch{return null}},update(Z){try{let{storageDir:q,storagePath:J}=b5();try{N().mkdirSync(q)}catch(X){if(W0(X)!=="EEXIST")throw X}return dL(J,m(Z),{encoding:"utf8",flush:!1}),iP(J,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=b5();try{return N().unlinkSync(Z),!0}catch(q){if(W0(q)==="ENOENT")return!0;return!1}}}});function lL(Z){let q=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return q?v5(rJ,E4):rJ;if(process.platform==="linux")return q?v5(tJ,E4):tJ;if(process.platform==="win32")return q?v5(qX,E4):qX;return q?E4:oP}var oP;var nL=B(()=>{yL();fL();gL();pL();cL();oP={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 h(Z){if(typeof Z!=="string")return;let q=Z.trim();return q?q:void 0}function JX(Z=process.env){return h(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function g10(Z=process.env){let q=h(Z.CODEX_OAUTH_CALLBACK_PORT);if(!q)return 1455;let J=Number.parseInt(q,10);if(Number.isInteger(J)&&J>=0&&J<=65535)return J;return 1455}function XX(Z){let q=Z.split(".");if(q.length<2)return;try{let J=q[1].replace(/-/g,"+").replace(/_/g,"/"),X=J+"=".repeat((4-J.length%4)%4),Q=Buffer.from(X,"base64").toString("utf8"),$=JSON.parse(Q);return $&&typeof $==="object"?$:void 0}catch{return}}function d0(Z){if(!Z)return;let q=XX(Z),J=q?.["https://api.openai.com/auth"]&&typeof q["https://api.openai.com/auth"]==="object"?q["https://api.openai.com/auth"]:void 0,X=J?.organizations,Q=Array.isArray(X)&&X.length>0&&typeof X[0]==="object"?X[0].id:void 0;return h(J?.chatgpt_account_id??q?.["https://api.openai.com/auth.chatgpt_account_id"]??q?.chatgpt_account_id??Q)??void 0}function m10(Z){return Z.replace(/[&<>"']/g,(q)=>{switch(q){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#39;";default:return q}})}async function aL(Z){let q=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:JX(),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:q,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 X=await J.json(),Q=h(X.access_token);if(!Q)throw Error("Codex API key exchange completed, but no API key token was returned.");return Q}var b10="https://auth.openai.com",iL="https://auth.openai.com/oauth/token",h10="openid profile email offline_access api.connectors.read api.connectors.invoke",f10="codex_cli_rs";var QX=()=>{};function g5(){return lL({allowPlainTextFallback:!0})}function oL(Z){if(!Z)return;let J=XX(Z)?.exp;if(typeof J==="number"&&Number.isFinite(J))return J*1000;return}function C4(Z){if(!Z||typeof Z!=="object")return;let q=Z,J=h(q.apiKey),X=h(q.accessToken);if(!X)return;let Q=h(q.refreshToken),$=h(q.idToken),Y=h(q.accountId)??d0($)??d0(X),H=h(q.profileId),K=typeof q.lastRefreshAt==="number"&&Number.isFinite(q.lastRefreshAt)?q.lastRefreshAt:void 0,U=typeof q.lastRefreshFailureAt==="number"&&Number.isFinite(q.lastRefreshFailureAt)?q.lastRefreshFailureAt:void 0;return{apiKey:J,accessToken:X,refreshToken:Q,idToken:$,accountId:Y,profileId:H,lastRefreshAt:K,lastRefreshFailureAt:U}}function tP(Z){let q=oL(Z.accessToken)??oL(Z.idToken);if(q===void 0)return!1;return q<=Date.now()+sP}function sL(Z,q=Date.now()){let J=Math.max(Z.lastRefreshFailureAt??0,f5??0);if(!J)return!1;return q-J<rP}function eP(Z,q){if(!q.trim())return`Codex token refresh failed with status ${Z}.`;try{let J=JSON.parse(q),X=J.error&&typeof J.error==="object"?J.error:void 0,Q=h(X?.code??J.code),$=h(X?.message??J.error_description)??q.trim();return Q?`Codex token refresh failed (${Q}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${q.trim()}`}}function rL(){if(L6())return;try{let Z=g5().read();return C4(Z?.codex)}catch{return}}async function ZE(){if(L6())return;try{let Z=await g5().readAsync();return C4(Z?.codex)}catch{return}}function tL(Z,q=Date.now()){return sL(Z,q)}function eL(Z){if(L6())return{success:!1,warning:"Bare mode: secure storage is disabled."};let q=C4(Z);if(!q)return{success:!1,warning:"Codex credentials are incomplete."};let J=g5(),X=J.read()||{},Q=C4(X[h5]),$={...X,[h5]:{...q,profileId:q.profileId??Q?.profileId,lastRefreshAt:q.lastRefreshAt??Date.now()}},Y=J.update($);if(Y.success)f5=C4($[h5])?.lastRefreshFailureAt??null;return Y}function qE(Z,q){if(!eL({...Z,lastRefreshFailureAt:q}).success)f5=q}function i10(){if(L6())return{success:!0};let Z=g5(),J={...Z.read()||{}};delete J[h5];let X=Z.update(J);if(X.success)f5=null;return X}async function a10(Z){if(L6())return{refreshed:!1};if(y4()?.apiKey?.trim())return{refreshed:!1};let q=await ZE();if(!q)return{refreshed:!1};let J=q.refreshToken;if(!J)return{refreshed:!1,credentials:q};if(!Z?.force&&!tP(q))return{refreshed:!1,credentials:q};if(sL(q))return{refreshed:!1,credentials:q};if(v4)return v4;return v4=(async()=>{let X=Date.now();try{let Q=new URLSearchParams({client_id:JX(),grant_type:"refresh_token",refresh_token:J}),$=await fetch(iL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:Q,signal:AbortSignal.timeout(15000)});if(!$.ok){let V=await $.text().catch(()=>"");throw Error(eP($.status,V))}let Y=await $.json(),H=h(Y.access_token);if(!H)throw Error("Codex token refresh succeeded without a new access token.");let K={accessToken:H,refreshToken:h(Y.refresh_token)??q.refreshToken,idToken:h(Y.id_token)??q.idToken,accountId:d0(Y.id_token)??d0(Y.access_token)??q.accountId,lastRefreshAt:Date.now()},U=K.idToken??q.idToken;if(U)K.apiKey=await aL(U).catch((V)=>{P(`[codex] id-token → API-key exchange failed; falling back to access_token bearer: ${V instanceof Error?V.message:String(V)}`,{level:"warn"});return});let W=eL(K);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:K}}catch(Q){throw qE(q,X),Q}finally{v4=null}})(),v4}var h5="codex",sP=60000,rP=60000,v4=null,f5=null;var Zz=B(()=>{K2();G1();W1();nL();QX()});import{existsSync as JE,readFileSync as XE}from"node:fs";import{isIP as QE}from"node:net";import{homedir as $E}from"node:os";import{join as qz}from"node:path";function X20(Z){if(!Z)return!1;try{let{hostname:q}=new URL(Z);return q==="api.x.ai"}catch{return!1}}function Q20(Z){if(!Z)return!1;try{let{hostname:q,pathname:J}=new URL(Z);return q==="api.kimi.com"&&J.startsWith("/coding")}catch{return!1}}function KE(Z){let q=Z.split(".").map((J)=>Number.parseInt(J,10));if(q.length!==4||q.some((J)=>Number.isNaN(J)))return!1;return q[0]===10||q[0]===172&&q[1]>=16&&q[1]<=31||q[0]===192&&q[1]===168}function UE(Z){let q=Z.split(":",1)[0];if(!q)return!1;let J=Number.parseInt(q,16);if(Number.isNaN(J))return!1;return(J&65024)===64512||(J&65472)===65152}function HX(Z){if(!Z)return;let q=Z.trim();if(!q)return;if(q==="undefined")return;return q}function $X(Z,q){for(let J of q){let X=Z,Q=!0;for(let Y of J){if(!X||typeof X!=="object"||!(Y in X)){Q=!1;break}X=X[Y]}if(!Q)continue;let $=h(X);if($)return $}return}function WE(Z){if(!Z)return;let q=Z.trim().toLowerCase();if(q==="low"||q==="medium"||q==="high"||q==="xhigh"||q==="max")return q;return}function Jz(Z){let q=Z.trim(),J=q.indexOf("?");if(J===-1){let U=q.toLowerCase(),W=u5[U];if(W)return{raw:q,baseModel:W.model,reasoning:W.reasoningEffort?{effort:W.reasoningEffort}:void 0};return{raw:q,baseModel:q}}let X=q.slice(0,J).trim(),Q=new URLSearchParams(q.slice(J+1)),$=X.toLowerCase(),Y=u5[$],H=Y?.model??X,K=WE(Q.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:q,baseModel:H,reasoning:typeof K==="string"?{effort:K}:K}}function Hz(Z){let q=Z.trim().toLowerCase();return(q.split("?",1)[0]??q)in u5}function GX(Z){let q=Z.trim().toLowerCase(),J=q.split("?",1)[0]??q;return HE.has(J)}function Gz(Z){return GX(Z)}function VE(Z,q){let J=HX(q);return FE(J)||!J&&Hz(Z)}function _E(Z){let q=Z.trim().toLowerCase();if(q.includes("codex"))return!0;let J=BE.exec(q);if(!J)return!1;if(Number(J[1])<5)return!1;if(q.startsWith("gpt-5-mini"))return!1;return!0}function Kz(Z){if(!Z)return!1;try{let q=new URL(Z).hostname.toLowerCase();if(q.startsWith("[")&&q.endsWith("]"))q=q.slice(1,-1);let J=q.indexOf("%25");if(J!==-1)q=q.slice(0,J);if(GE.has(q)||q==="0.0.0.0")return!0;if(q.endsWith(".local"))return!0;let X=QE(q);if(X===4)return Number.parseInt(q.split(".",1)[0]??"",10)===127||KE(q);if(X===6)return UE(q);return!1}catch{return!1}}function m5(Z){return Z.replace(KX,"")}function RE(Z){let q=m5(Z);if(!q||q==="/")return"/v1";if(q.toLowerCase().endsWith("/v1"))return q;return`${q}/v1`}function ME(Z){try{let q=new URL(Z),J=q.hostname.toLowerCase(),X=q.pathname.toLowerCase();if(q.port==="11434")return!0;return J.includes("ollama")||X.includes("ollama")}catch{return!1}}function $20(Z){if(!Kz(Z))return[];try{let q=new URL(Z),J=m5(q.toString()),X=new Set([J]),Q=[],$=(K,U)=>{let W=new URL(q.toString());W.hostname=K,W.pathname=U,W.search="",W.hash="";let V=m5(W.toString());if(X.has(V))return;X.add(V),Q.push(V)},Y=RE(q.pathname);if(Y!==m5(q.pathname))$(q.hostname,Y);let H=q.hostname.toLowerCase().replace(zE,"");if(H==="localhost"||H==="::1")$("127.0.0.1",q.pathname||"/"),$("127.0.0.1",Y);return Q}catch{return[]}}function Y20(Z){if(!Z.hasTools)return!1;if(!Kz(Z.baseUrl))return!1;return ME(Z.baseUrl)}function FE(Z){if(!Z)return!1;try{let q=new URL(Z);return q.hostname==="chatgpt.com"&&q.pathname.replace(KX,"")==="/backend-api/codex"}catch{return!1}}function DE(Z){let q=Z.split("?",1)[0]??Z,J=q.includes(":")?q.split(":",2)[1].trim():q.trim();if(!J||J.toLowerCase()==="copilot")return Yz;let X=J.indexOf("/");if(X!==-1)return J.slice(X+1);return J}function Xz(Z){let q=Z.split("?",1)[0]??Z,J=q.includes(":")?q.split(":",2)[1].trim():q.trim();if(!J||J.toLowerCase()==="copilot")return Yz;return J}function $z(Z){if(!Z)return"copilot";try{let q=new URL(Z).hostname.toLowerCase();if(q==="api.githubcopilot.com"||q.endsWith(".githubcopilot.com")||q.startsWith("copilot-api."))return"copilot";if(q==="models.github.ai"||q.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function UX(Z){let q=Uz(),X=q?.transport==="github_copilot",Q=q?.model?.trim(),$=HX(q?.baseUrl),Y=Z?.model?.trim()||Q||Z?.fallbackModel?.trim()||(X?"github:copilot":"gpt-4o"),H=Jz(Y),K=HX(Z?.baseUrl),U=K??$,V=X&&Hz(Y)&&U&&$z(U)==="custom"?void 0:U,L=K??V,z=Q??"",R=GX(z)?Jz(z).baseModel:null,M=Boolean(Z?.model)&&Boolean(R)&&H.baseModel===R,F=GX(Y)||M,D=!X&&F&&!(L&&L!==YX)?YE:L,O=X?$z(L):"custom",j=X&&O==="copilot",T=X&&O==="models",A=X&&O==="custom",b=X?Xz(Y):Y,w=VE(Y,D)||j&&_E(b)?"codex_responses":"chat_completions",x=j?DE(H.baseModel):T||A?Xz(H.baseModel):H.baseModel,E=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(q?.extras?.reasoningEffort?{effort:q.extras.reasoningEffort}:void 0);return{transport:w,requestedModel:Y,resolvedModel:x,baseUrl:(D??(j&&w==="codex_responses"?Qz:X?Qz:YX)).replace(KX,""),reasoning:E}}function H20(Z){if(UX({model:Z}).transport==="codex_responses")return!0;return Uz()?.transport==="github_copilot"}function Uz(){try{let{tryGetActiveProvider:Z}=(K2(),k4(S4));return Z()}catch{return null}}function G20(){let Z=null;try{let{tryGetActiveProvider:X}=(K2(),k4(S4));Z=X()}catch{Z=null}let q=Z?.transport;if(q!=="openai_compat"&&q!=="codex_responses"){if(!q||q==="anthropic")return"firstParty";return null}let J=UX();if(J.transport!=="chat_completions")return null;return`openai:${J.baseUrl.toLowerCase()}`}function K20(){let Z=UX();if(Z.transport!=="chat_completions")return!1;let q=Z.baseUrl.toLowerCase();try{return new URL(q).hostname==="api.openai.com"}catch{return q===YX}}function Wz(Z=process.env){let q=WX();if(q)return q;let J=h(Z.CODEX_AUTH_JSON_PATH);if(J)return J;let X=h(Z.CODEX_HOME);if(X)return qz(X,"auth.json");return qz($E(),".codex","auth.json")}function WX(){try{let{tryGetActiveProvider:Z}=(K2(),k4(S4));return h(Z()?.extras?.codexAuthPath)}catch{return}}function VX(){try{let{tryGetActiveProvider:Z}=(K2(),k4(S4));return h(Z()?.extras?.codexAccountId)}catch{return}}function Vz(Z){if(!JE(Z))return;try{let q=XE(Z,"utf8"),J=JSON.parse(q);return J&&typeof J==="object"?J:void 0}catch{return}}function Bz(Z){let{authJson:q,authPath:J,envAccountId:X}=Z;if(!q)return{apiKey:"",authPath:J,source:Z.missingSource??"none"};let Q=$X(q,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=$X(q,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=X??$X(q,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??d0(Q)??d0($);if(!Q)return{apiKey:"",accountId:Y,authPath:J,source:Z.missingSource??"none"};return{apiKey:Q,accountId:Y,authPath:J,source:"auth.json"}}function Lz(Z){let{storedCredentials:q,envAccountId:J}=Z;return{apiKey:q.apiKey??q.accessToken,accountId:J??q.accountId??d0(q.idToken)??d0(q.accessToken),source:"secure-storage"}}function p5(Z,q){let J=h(Z.CODEX_API_KEY),Q=VX()??h(Z.CODEX_ACCOUNT_ID)??h(Z.CHATGPT_ACCOUNT_ID);if(J)return{apiKey:J,accountId:Q??d0(J),source:"env"};let $=WX();if(!Boolean($??h(Z.CODEX_AUTH_JSON_PATH)??h(Z.CODEX_HOME))&&q?.explicitAuthPathOnly)return{apiKey:"",accountId:Q,source:"none"};let H=Wz(Z),K=Vz(H);return Bz({authJson:K,authPath:H,envAccountId:Q})}function U20(Z){let q=Z?.env??process.env,J=p5(q,{explicitAuthPathOnly:!0}),X=Boolean(WX()??h(q.CODEX_AUTH_JSON_PATH)??h(q.CODEX_HOME)),Q=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(X||J.source==="env"||J.source==="auth.json")return J;if(Z?.storedCredentials?.accessToken)return Lz({storedCredentials:Z.storedCredentials,envAccountId:VX()??h(q.CODEX_ACCOUNT_ID)??h(q.CHATGPT_ACCOUNT_ID)});if(Q)return p5(q);return AE(q)}function AE(Z=process.env){let q=VX()??h(Z.CODEX_ACCOUNT_ID)??h(Z.CHATGPT_ACCOUNT_ID),J=p5(Z,{explicitAuthPathOnly:!0});if(J.source==="env"||J.source==="auth.json"||J.authPath)return J;let X=rL();if(X?.accessToken){let Q=Lz({storedCredentials:X,envAccountId:q});if(!(!Q.accountId||tL(X)))return Q;let Y=Wz(Z),H=Vz(Y),K=Bz({authJson:H,authPath:Y,envAccountId:q});if(K.apiKey)return{...K,accountId:K.accountId??Q.accountId};return Q}return p5(Z)}function jE(Z){let q=Z.trim().toLowerCase(),X=q.split("?",1)[0]??q;return u5[X]?.reasoningEffort}function W20(Z){let q=Z.trim().toLowerCase(),J=q.split("?",1)[0]??q;if(J==="gpt-5.3-codex-spark"||J==="codexspark")return!1;if(jE(J)!==void 0)return!0;return LE.test(J)}var YX="https://api.openai.com/v1",YE="https://chatgpt.com/backend-api/codex",J20="https://api.x.ai/v1",Yz="gpt-4o",u5,HE,GE,BE,LE,KX,zE,Qz="https://api.githubcopilot.com";var zz=B(()=>{Zz();QX();u5={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.6":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-sol":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-terra":{model:"gpt-5.6-terra",reasoningEffort:"high"},"gpt-5.6-luna":{model:"gpt-5.6-luna",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"}},HE=new Set(["codexplan","codexspark"]),GE=new Set(["localhost","127.0.0.1","::1"]);BE=/^gpt-(\d+)/,LE=/^gpt-5(?:[.-]|$)/,KX=/\/+$/,zE=/^\[|\]$/g});var S4={};hq(S4,{tryGetActiveProvider:()=>y4,invalidateActiveProviderCache:()=>wE,getActiveProvider:()=>Rz,_peekActiveProviderCacheForTesting:()=>kE,ActiveProviderNotConfiguredError:()=>d5});function TE(){if(_z)return;_z=!0,jL(()=>{U2=null})}function IE(Z,q){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(Gz(q))return"codex_responses";return"openai_compat"}}}function OE(Z){let q=OL(Z.model);return{transport:IE(Z,q),baseUrl:Z.baseUrl,model:q,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function Rz(){if(TE(),U2)return U2;let Z=_1(Q0());if(!Z)throw new d5;return U2=OE(Z),U2}function y4(){try{return Rz()}catch(Z){if(Z instanceof d5)return null;throw Z}}function wE(){U2=null}function kE(){return U2}var d5,U2=null,_z=!1;var K2=B(()=>{lJ();CL();nJ();zz();d5=class d5 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function Mz(Z){return Z.sort((q,J)=>{let X=J.modified.getTime()-q.modified.getTime();if(X!==0)return X;return J.created.getTime()-q.created.getTime()})}var Fz=()=>{};function Dz(Z){if(typeof Z!=="string")return!1;let q=Z.trim();return q!==""&&q!=="."&&q!==".."&&!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("\x00")}function BX(Z){if(typeof Z!=="string")throw TypeError("Expected a string");if(!Dz(Z))throw Error(`Unsafe filename: ${JSON.stringify(Z)}`)}var M20;var Az=B(()=>{M20=Object.freeze([""," ",".",".."," .",". "," ..",".. ","../","../foo","foo/../bar","foo/bar","foo\\bar","foo\x00bar"])});import r from"node:path";import jz from"node:os";import LX from"node:process";function _X(Z,{suffix:q="nodejs"}={}){if(BX(Z),q)Z+=`-${q}`;if(BX(Z),LX.platform==="darwin")return NE(Z);if(LX.platform==="win32")return xE(Z);return PE(Z)}var E1,zX,z6,NE=(Z)=>{let q=r.join(E1,"Library");return{data:r.join(q,"Application Support",Z),config:r.join(q,"Preferences",Z),cache:r.join(q,"Caches",Z),log:r.join(q,"Logs",Z),temp:r.join(zX,Z)}},xE=(Z)=>{let q=z6.APPDATA||r.join(E1,"AppData","Roaming"),J=z6.LOCALAPPDATA||r.join(E1,"AppData","Local");return{data:r.join(J,Z,"Data"),config:r.join(q,Z,"Config"),cache:r.join(J,Z,"Cache"),log:r.join(J,Z,"Log"),temp:r.join(zX,Z)}},PE=(Z)=>{let q=r.basename(E1);return{data:r.join(z6.XDG_DATA_HOME||r.join(E1,".local","share"),Z),config:r.join(z6.XDG_CONFIG_HOME||r.join(E1,".config"),Z),cache:r.join(z6.XDG_CACHE_HOME||r.join(E1,".cache"),Z),log:r.join(z6.XDG_STATE_HOME||r.join(E1,".local","state"),Z),temp:r.join(zX,q,Z)}};var Tz=B(()=>{Az();E1=jz.homedir(),zX=jz.tmpdir(),{env:z6}=LX});import{join as c5}from"path";function wz(Z){let q=Z.replace(/[^a-zA-Z0-9]/g,"-");if(q.length<=Iz)return q;return`${q.slice(0,Iz)}-${Math.abs(Oz(Z)).toString(36)}`}function n5(Z){return wz(Z)}var l5,Iz=200,kz;var Nz=B(()=>{Tz();M0();EE();l5=_X("claude-cli");kz={baseLogs:()=>c5(l5.cache,n5(N().cwd())),errors:()=>c5(l5.cache,n5(N().cwd()),"errors"),messages:()=>c5(l5.cache,n5(N().cwd()),"messages"),mcpLogs:(Z)=>c5(l5.cache,n5(N().cwd()),`mcp-logs-${wz(Z)}`)}});function Pz(Z){return Z.replace(xz,"").trim()||Z}function Ez(Z){return Z.replace(xz,"").trim()}function P20(Z){return Z.replace(vE,"").trim()}var xz,vE;var vz=B(()=>{xz=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;vE=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});import{readdir as yE,readFile as SE,stat as bE}from"fs/promises";import{join as hE}from"path";function c20(Z,q){let J=Z.firstPrompt?.startsWith(`<${bz}>`),X=Z.firstPrompt?Ez(Z.firstPrompt):"",Q=X&&!J,$=Z.agentName||Z.customTitle||Z.summary||(Q?X:void 0)||q||(J?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return Pz($).trim()}function fE(Z){return Z.toISOString().replace(/[:.]/g,"-")}function mE(Z){if(b4.length>=gE)b4.shift();b4.push(Z)}function l20(Z){if(y0!==null)return;if(y0=Z,W2.length>0){let q=[...W2];W2.length=0;for(let J of q)switch(J.type){case"error":y0.logError(J.error);break;case"mcpError":y0.logMCPError(J.serverName,J.error);break;case"mcpDebug":y0.logMCPDebug(J.serverName,J.message);break}}}function S(Z){let q=Sz(Z);try{let J=y4()?.transport;if(J==="bedrock"||J==="vertex"||J==="foundry"||process.env.DISABLE_ERROR_REPORTING||EJ())return;let Q={error:q.stack||q.message,timestamp:new Date().toISOString()};if(mE(Q),y0===null){W2.push({type:"error",error:q});return}y0.logError(q)}catch{}}function i20(){return[...b4]}function uE(){return pE(kz.errors())}async function a20(Z){return(await uE())[Z]||null}async function pE(Z){let q;try{q=await yE(Z,{withFileTypes:!0})}catch{return S(Error(`No logs found at ${Z}`)),[]}let J=await Promise.all(q.map(async(X,Q)=>{let $=hE(Z,X.name),Y=await SE($,{encoding:"utf8"}),H=Z0(Y),K=H[0],U=H[H.length-1],W=K?.type==="user"&&typeof K?.message?.content==="string"?K?.message?.content:"No prompt",V=await bE($),L=$.includes("sidechain"),z=fE(V.mtime);return{date:z,fullPath:$,messages:H,value:Q,created:RX(K?.timestamp||z),modified:U?.timestamp?RX(U.timestamp):RX(z),firstPrompt:W.split(`
205
+ `)[0]?.slice(0,50)+(W.length>50?"…":"")||"No prompt",messageCount:H.length,isSidechain:L}}));return Mz(J.filter((X)=>X!==null)).map((X,Q)=>({...X,value:Q}))}function RX(Z){let q=Z.split(/\D+/);return new Date(Date.UTC(parseInt(q[0],10),parseInt(q[1],10)-1,parseInt(q[2],10),parseInt(q[3],10),parseInt(q[4],10),parseInt(q[5],10),parseInt(q[6],10)))}function o20(Z,q){try{if(y0===null){W2.push({type:"mcpError",serverName:Z,error:q});return}y0.logMCPError(Z,q)}catch{}}function s20(Z,q){try{if(y0===null){W2.push({type:"mcpDebug",serverName:Z,message:q});return}y0.logMCPDebug(Z,q)}catch{}}function r20(Z,q){if(!q||!q.startsWith("repl_main_thread"))return;let{messages:J,...X}=Z;Cz(X),yz(null)}function t20(){y0=null,W2.length=0,b4=[]}var gE=100,b4,W2,y0=null,n20;var k0=B(()=>{I1();z2();K2();CE();Fz();Nz();vz();o1();CJ();R0();b4=[];W2=[];n20=u(()=>{return process.argv.includes("--hard-fail")})});import hz from"node:path";function lE(Z){return Z.includes(hz.sep)||Z.includes("/")||hz.isAbsolute(Z)}function nE(Z){let q=Z.trim();if(!q)return"Unsafe executable: empty command";if(h4.test(q))return"Unsafe executable: control characters are not allowed";if(!lE(q)&&!cE.test(q))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function iE(Z){for(let q of Z)if(h4.test(q))return"Unsafe argument: control characters are not allowed";return null}function aE(Z){if(!Z)return null;if(h4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function oE(Z){if(!Z)return{};for(let[q,J]of Object.entries(Z)){if(h4.test(q))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof J==="string"&&h4.test(J))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function sE(Z,q){if(typeof Z.signal==="string")return Z.signal;return String(q)}function a(Z,q,J={timeout:10*FX*MX,preserveOutputOnError:!0,useCwd:!0}){return i1(Z,q,{abortSignal:J.abortSignal,timeout:J.timeout,preserveOutputOnError:J.preserveOutputOnError,cwd:J.useCwd?t():void 0,env:J.env,stdin:J.stdin,input:J.input})}function i1(Z,q,{abortSignal:J,timeout:X=10*FX*MX,preserveOutputOnError:Q=!0,cwd:$,env:Y,maxBuffer:H=fz,stdin:K,input:U}={timeout:10*FX*MX,preserveOutputOnError:!0,maxBuffer:fz}){let W=nE(Z);if(W)return Promise.resolve({stdout:"",stderr:"",code:1,error:W});let V=iE(q);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=aE($);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let z=oE(Y);if(z.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:z.error});return new Promise((_)=>{let R=U!==void 0?"pipe":K??"pipe",M=gz.spawn(Z,q,{cwd:$,env:z.value,shell:!1,signal:J,stdio:[R,"pipe","pipe"]}),F=!1,k="",D="",O=0,j,T=!1,A=(x)=>{if(F)return;F=!0,_(x)},b=(x,E)=>{let f=typeof x==="string"?x:x.toString("utf8");if(O+=Buffer.byteLength(f,"utf8"),O>H){M.kill(),A({stdout:Q?k:"",stderr:Q?D:"",code:1,error:"maxBuffer exceeded"});return}if(E==="stdout")k+=f;else D+=f};M.stdout?.on("data",(x)=>b(x,"stdout")),M.stderr?.on("data",(x)=>b(x,"stderr")),M.once("spawn",()=>{if(R==="pipe"&&M.stdin)if(U!==void 0)M.stdin.end(U);else M.stdin.end()}),M.once("error",(x)=>{S(x),A({stdout:"",stderr:"",code:1,error:x.message})});let w=X>0?setTimeout(()=>{T=!0,M.kill()},X):void 0;M.once("close",(x,E)=>{if(w)clearTimeout(w);j=E??void 0;let f=x??1;if(T){A({stdout:Q?k:"",stderr:Q?D:"",code:f,error:`Command timed out after ${X}ms`});return}if(f!==0){if(Q)A({stdout:k,stderr:D,code:f,error:sE({signal:j},f)});else A({stdout:"",stderr:"",code:f});return}A({stdout:k,stderr:D,code:0})})})}var gz,MX=1000,FX=60,fz=1e6,h4,cE;var w7=B(()=>{e0();k0();aJ();gz=dE(HQ(),1),h4=/[\0\r\n]/,cE=/^[A-Za-z0-9_.-]+$/});
206
+ export{hr as haa,ZB as iaa,p0 as jaa,N4 as kaa,O0 as laa,sJ as maa,X10 as naa,y5 as oaa,Z8 as paa,G$ as qaa,hG as raa,fG as saa,Jq as taa,u2 as uaa,VQ as vaa,BQ as waa,J3 as xaa,DQ as yaa,AQ as zaa,TQ as Aaa,H0 as Baa,Pv as Caa,_6 as Daa,HQ as Eaa,C5 as Faa,a as Gaa,i1 as Haa,w7 as Iaa,R6 as Jaa,IQ as Kaa,dv as Laa,S0 as Maa,_2 as Naa,C1 as Oaa,cv as Paa,lv as Qaa,nv as Raa,hQ as Saa,uQ as Taa,pQ as Uaa,ZC as Vaa,M1 as Waa,n4 as Xaa,c2 as Yaa,Xq as Zaa,mK as _aa,j7 as $aa,T7 as aba,R2 as bba,n1 as cba,HO as dba,pc as eba,dc as fba,o as gba,KO as hba,cc as iba,lc as jba,rK as kba,UO as lba,WO as mba,nc as nba,Gq as oba,VO as pba,ic as qba,BO as rba,ac as sba,oc as tba,LO as uba,sc as vba,zO as wba,_O as xba,rc as yba,tc as zba,ec as Aba,MO as Bba,Zl as Cba,ql as Dba,D6 as Eba,Kl as Fba,g0 as Gba,l2 as Hba,Fl as Iba,IO as Jba,Dl as Kba,eK as Lba,ZU as Mba,Vq as Nba,Nl as Oba,xl as Pba,Pl as Qba,k7 as Rba,HU as Sba,GU as Tba,_U as Uba,RU as Vba,fU as Wba,gU as Xba,iU as Yba,aU as Zba,Mq as _ba,Rw as $ba,U1 as aca,Z4 as bca,Qi as cca,$i as dca,Yi as eca,Dw as fca,y7 as gca,XW as hca,Gi as ica,Aq as jca,QW as kca,jq as lca,Tq as mca,YW as nca,Ni as oca,kw as pca,xi as qca,Pi as rca,Ei as sca,vi as tca,HW as uca,Ci as vca,yi as wca,Si as xca,bi as yca,hi as zca,fi as Aca,xw as Bca,gi as Cca,mi as Dca,ui as Eca,pi as Fca,o2 as Gca,di as Hca,ci as Ica,UW as Jca,li as Kca,S7 as Lca,hw as Mca,_W as Nca,RW as Oca,Cq as Pca,xW as Qca,m0 as Rca,Da as Sca,yq as Tca,Aa as Uca,ja as Vca,m7 as Wca,wa as Xca,ka as Yca,Na as Zca,xa as _ca,Pa as $ca,Ea as ada,K4 as bda,va as cda,Ca as dda,Sq as eda,Sa as fda,ba as gda,bW as hda,fa as ida,hW as jda,ga as kda,$k as lda,ma as mda,Yk as nda,ua as oda,fW as pda,gW as qda,w1 as rda,U4 as sda,p7 as tda,pW as uda,ra as vda,ta as wda,dW as xda,cW as yda,lW as zda,z0 as Ada,Mk as Bda,e2 as Cda,Uo as Dda,bq as Eda,Bo as Fda,Lo as Gda,zo as Hda,_o as Ida,Ro as Jda,Mo as Kda,Fo as Lda,Do as Mda,Ao as Nda,jo as Oda,To as Pda,Io as Qda,Oo as Rda,rW as Sda,wo as Tda,ko as Uda,No as Vda,xo as Wda,Po as Xda,Eo as Yda,vo as Zda,Co as _da,tW as $da,jk as aea,Tk as bea,Ik as cea,Ok as dea,wk as eea,kk as fea,Nk as gea,xk as hea,Pk as iea,Ek as jea,ZV as kea,JV as lea,XV as mea,YV as nea,no as oea,GV as pea,e1 as qea,qs as rea,Sk as sea,n7 as tea,Xs as uea,UV as vea,i7 as wea,Ks as xea,Us as yea,Ws as zea,BV as Aea,GN as Bea,Vs as Cea,Bs as Dea,UN as Eea,Ls as Fea,MV as Gea,zs as Hea,_s as Iea,Rs as Jea,FV as Kea,Fs as Lea,a7 as Mea,DV as Nea,AV as Oea,RN as Pea,MN as Qea,js as Rea,Ts as Sea,Is as Tea,jV as Uea,TV as Vea,ws as Wea,ks as Xea,IV as Yea,dq as Zea,OV as _ea,wV as $ea,Ps as afa,kV as bfa,X6 as cfa,Ss as dfa,NV as efa,bs as ffa,xV as gfa,fs as hfa,PV as ifa,EV as jfa,gs as kfa,ms as lfa,us as mfa,ps as nfa,ds as ofa,TN as pfa,cs as qfa,lq as rfa,qr as sfa,fV as tfa,gV as ufa,v0 as vfa,Lr as wfa,zr as xfa,_r as yfa,V4 as zfa,Pr as Afa,tq as Bfa,rr as Cfa,J5 as Dfa,X5 as Efa,tr as Ffa,er as Gfa,$B as Hfa,UJ as Ifa,Nt as Jfa,L4 as Kfa,YB as Lfa,$5 as Mfa,RB as Nfa,p as Ofa,xt as Pfa,Pt as Qfa,Z2 as Rfa,Et as Sfa,WJ as Tfa,vt as Ufa,pN as Vfa,Ct as Wfa,yt as Xfa,St as Yfa,bt as Zfa,ht as _fa,dN as $fa,cN as aga,lN as bga,iN as cga,ft as dga,FB as ega,kB as fga,Xe as gga,qx as hga,Qe as iga,R4 as jga,PB as kga,$e as lga,BJ as mga,Re as nga,Me as oga,QL as pga,EJ as qga,CJ as rga,M5 as sga,GL as tga,sx as uga,Ae as vga,je as wga,KL as xga,tx as yga,ex as zga,_0 as Aga,BL as Bga,O4 as Cga,YP as Dga,GP as Ega,KP as Fga,RL as Gga,ML as Hga,X00 as Iga,k5 as Jga,LP as Kga,Q00 as Lga,zP as Mga,$00 as Nga,Y00 as Oga,H00 as Pga,G00 as Qga,K00 as Rga,U00 as Sga,jL as Tga,A0 as Uga,W00 as Vga,V00 as Wga,Q0 as Xga,B00 as Yga,L00 as Zga,z00 as _ga,_00 as $ga,dJ as aha,P5 as bha,cJ as cha,OP as dha,R00 as eha,M00 as fha,wP as gha,F00 as hha,D00 as iha,A00 as jha,j00 as kha,T00 as lha,I00 as mha,O00 as nha,w00 as oha,k00 as pha,lJ as qha,E5 as rha,OL as sha,nJ as tha,y00 as uha,u0 as vha,S00 as wha,_1 as xha,b00 as yha,SP as zha,h00 as Aha,bP as Bha,f00 as Cha,g00 as Dha,m00 as Eha,u00 as Fha,hP as Gha,fP as Hha,p00 as Iha,gP as Jha,d00 as Kha,c00 as Lha,l00 as Mha,mP as Nha,CL as Oha,W10 as Pha,fL as Qha,lL as Rha,nL as Sha,b10 as Tha,h10 as Uha,f10 as Vha,h as Wha,JX as Xha,g10 as Yha,d0 as Zha,m10 as _ha,aL as $ha,QX as aia,ZE as bia,eL as cia,i10 as dia,a10 as eia,Zz as fia,YX as gia,YE as hia,J20 as iia,X20 as jia,Q20 as kia,Kz as lia,$20 as mia,Y20 as nia,FE as oia,$z as pia,UX as qia,H20 as ria,G20 as sia,K20 as tia,U20 as uia,AE as via,jE as wia,W20 as xia,zz as yia,d5 as zia,Rz as Aia,y4 as Bia,wE as Cia,kE as Dia,K2 as Eia,Mz as Fia,Fz as Gia,kz as Hia,Nz as Iia,Pz as Jia,Ez as Kia,P20 as Lia,vz as Mia,c20 as Nia,fE as Oia,l20 as Pia,S as Qia,i20 as Ria,uE as Sia,a20 as Tia,o20 as Uia,s20 as Via,r20 as Wia,t20 as Xia,k0 as Yia};