@claudiolabs/claudin 1.1.33 → 1.1.34

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 (827) hide show
  1. package/dist/chunks/App-1.1.34-5bkzspjw.mjs +1 -0
  2. package/dist/chunks/ApproveApiKey-1.1.34-v9m1h6yf.mjs +1 -0
  3. package/dist/chunks/AutoModeOptInDialog-1.1.34-s8q45b8r.mjs +1 -0
  4. package/dist/chunks/BypassPermissionsModeDialog-1.1.34-za20vma5.mjs +1 -0
  5. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.34-bfqcybrw.mjs +1 -0
  6. package/dist/chunks/ConsoleOAuthFlow-1.1.34-y3y8zaw0.mjs +1 -0
  7. package/dist/chunks/DiffDialog-1.1.34-2c48wrw2.mjs +6 -0
  8. package/dist/chunks/Doctor-1.1.34-5pfk2t4c.mjs +1 -0
  9. package/dist/chunks/ExplorerDialog-1.1.34-jhjx7d79.mjs +6 -0
  10. package/dist/chunks/ITermBackend-1.1.34-fdz2yay1.mjs +1 -0
  11. package/dist/chunks/InvalidConfigDialog-1.1.34-9kn20864.mjs +1 -0
  12. package/dist/chunks/InvalidSettingsDialog-1.1.34-rs0n3tbm.mjs +1 -0
  13. package/dist/chunks/MigrationDialog-1.1.34-mb74003t.mjs +1 -0
  14. package/dist/chunks/Onboarding-1.1.34-bfdfnz31.mjs +1 -0
  15. package/dist/chunks/ProviderManager-1.1.34-mxhsj5pz.mjs +1 -0
  16. package/dist/chunks/REPL-1.1.34-g9xtcxfm.mjs +1 -0
  17. package/dist/chunks/ResumeConversation-1.1.34-wjd1x7s6.mjs +1 -0
  18. package/dist/chunks/TeleportProgress-1.1.34-zpsemk3f.mjs +1 -0
  19. package/dist/chunks/TeleportRepoMismatchDialog-1.1.34-gse2x86w.mjs +1 -0
  20. package/dist/chunks/TeleportResumeWrapper-1.1.34-cp51s05w.mjs +1 -0
  21. package/dist/chunks/TmuxBackend-1.1.34-pcx5e2xc.mjs +9 -0
  22. package/dist/chunks/ToolSearchTool-1.1.34-s3tfzny5.mjs +1 -0
  23. package/dist/chunks/TrustDialog-1.1.34-g8hnps71.mjs +1 -0
  24. package/dist/chunks/activeProvider-1.1.34-a1bg24mk.mjs +1 -0
  25. package/dist/chunks/add-dir-1.1.34-fs7fa841.mjs +1 -0
  26. package/dist/chunks/agentTypes-1.1.34-ybf25dvm.mjs +1 -0
  27. package/dist/chunks/agents-1.1.34-6xhfrt25.mjs +3 -0
  28. package/dist/chunks/agents-1.1.34-wsjsbryq.mjs +110 -0
  29. package/dist/chunks/api-1.1.34-99hm00p0.mjs +1 -0
  30. package/dist/chunks/asciicast-1.1.34-qydk3ezz.mjs +1 -0
  31. package/dist/chunks/auth-1.1.34-32n80bwr.mjs +1 -0
  32. package/dist/chunks/auth-1.1.34-mhmakxvf.mjs +1 -0
  33. package/dist/chunks/autoMode-1.1.34-jyxbmbqd.mjs +52 -0
  34. package/dist/chunks/autoModeSetup-1.1.34-2b10v0j4.mjs +44 -0
  35. package/dist/chunks/autoUpdater-1.1.34-bd3mdsv9.mjs +1 -0
  36. package/dist/chunks/backgroundHousekeeping-1.1.34-v4c2njkh.mjs +1 -0
  37. package/dist/chunks/branch-1.1.34-949t9ara.mjs +4 -0
  38. package/dist/chunks/bridge-1.1.34-8jc0ek6w.mjs +2 -0
  39. package/dist/chunks/bridgeConfig-1.1.34-kgr2qvyz.mjs +1 -0
  40. package/dist/chunks/bridgeEnabled-1.1.34-ygna8r55.mjs +1 -0
  41. package/dist/chunks/bridgeMain-1.1.34-saff9rp6.mjs +88 -0
  42. package/dist/chunks/bridgePointer-1.1.34-5apzxa58.mjs +1 -0
  43. package/dist/chunks/btw-1.1.34-4246e84n.mjs +1 -0
  44. package/dist/chunks/buddy-1.1.34-kj9mygnh.mjs +3 -0
  45. package/dist/chunks/cache-probe-1.1.34-gyemr2df.mjs +21 -0
  46. package/dist/chunks/cacheStats-1.1.34-fqz6k1qv.mjs +4 -0
  47. package/dist/chunks/caches-1.1.34-ebn0bryh.mjs +1 -0
  48. package/dist/chunks/cd-1.1.34-6458ex95.mjs +3 -0
  49. package/dist/chunks/claudeDesktop-1.1.34-4jr3kmkg.mjs +1 -0
  50. package/dist/chunks/clear-1.1.34-da0gwb7n.mjs +1 -0
  51. package/dist/chunks/clearTerminal-1.1.34-410eb173.mjs +1 -0
  52. package/dist/chunks/cli-1.1.34-00hxx56p.mjs +2 -0
  53. package/dist/chunks/cli-1.1.34-0cmmxs6g.mjs +9 -0
  54. package/dist/chunks/cli-1.1.34-0h4whfas.mjs +6 -0
  55. package/dist/chunks/cli-1.1.34-0kkae10p.mjs +2 -0
  56. package/dist/chunks/cli-1.1.34-0mjf3pve.mjs +2 -0
  57. package/dist/chunks/cli-1.1.34-0t1h2v5v.mjs +2 -0
  58. package/dist/chunks/cli-1.1.34-0zqthr52.mjs +2 -0
  59. package/dist/chunks/cli-1.1.34-1229x70a.mjs +2 -0
  60. package/dist/chunks/cli-1.1.34-166q8s04.mjs +24 -0
  61. package/dist/chunks/cli-1.1.34-1a3s3rqs.mjs +3 -0
  62. package/dist/chunks/cli-1.1.34-1ategs07.mjs +2 -0
  63. package/dist/chunks/cli-1.1.34-1m5v3ffj.mjs +2 -0
  64. package/dist/chunks/cli-1.1.34-1nxczs7m.mjs +3 -0
  65. package/dist/chunks/cli-1.1.34-1xg52b7q.mjs +12 -0
  66. package/dist/chunks/cli-1.1.34-20femz8z.mjs +2 -0
  67. package/dist/chunks/cli-1.1.34-20p72tmb.mjs +20 -0
  68. package/dist/chunks/cli-1.1.34-21nzcpj6.mjs +5 -0
  69. package/dist/chunks/cli-1.1.34-24h4yeqf.mjs +2 -0
  70. package/dist/chunks/cli-1.1.34-2tf44a9a.mjs +2 -0
  71. package/dist/chunks/cli-1.1.34-33s2xs9e.mjs +2 -0
  72. package/dist/chunks/cli-1.1.34-372a0qyj.mjs +2 -0
  73. package/dist/chunks/cli-1.1.34-37g65vk7.mjs +2 -0
  74. package/dist/chunks/cli-1.1.34-37mgsk8w.mjs +2 -0
  75. package/dist/chunks/cli-1.1.34-3pr2wgys.mjs +2 -0
  76. package/dist/chunks/cli-1.1.34-3qpxmhy6.mjs +2 -0
  77. package/dist/chunks/cli-1.1.34-3rcacat5.mjs +3 -0
  78. package/dist/chunks/cli-1.1.34-4v8eanby.mjs +2 -0
  79. package/dist/chunks/cli-1.1.34-4x915j9t.mjs +2 -0
  80. package/dist/chunks/cli-1.1.34-4y5bvnfe.mjs +2 -0
  81. package/dist/chunks/cli-1.1.34-4zj4kbw4.mjs +2 -0
  82. package/dist/chunks/cli-1.1.34-58ergrxf.mjs +7 -0
  83. package/dist/chunks/cli-1.1.34-59csbz1a.mjs +60 -0
  84. package/dist/chunks/cli-1.1.34-5ec767fj.mjs +2 -0
  85. package/dist/chunks/cli-1.1.34-5ffnhvmt.mjs +3 -0
  86. package/dist/chunks/cli-1.1.34-5jdjfha3.mjs +2 -0
  87. package/dist/chunks/cli-1.1.34-5jnn83ne.mjs +2 -0
  88. package/dist/chunks/cli-1.1.34-5mg7y1hs.mjs +2 -0
  89. package/dist/chunks/cli-1.1.34-5qzy93s7.mjs +2 -0
  90. package/dist/chunks/cli-1.1.34-5t01yf6x.mjs +2 -0
  91. package/dist/chunks/cli-1.1.34-5vktvncs.mjs +2 -0
  92. package/dist/chunks/cli-1.1.34-5z4epq5b.mjs +4 -0
  93. package/dist/chunks/cli-1.1.34-643n510j.mjs +2 -0
  94. package/dist/chunks/cli-1.1.34-6jkjn6pd.mjs +2 -0
  95. package/dist/chunks/cli-1.1.34-70pxm3rb.mjs +133 -0
  96. package/dist/chunks/cli-1.1.34-79mxk0bc.mjs +2 -0
  97. package/dist/chunks/cli-1.1.34-7ad0dt89.mjs +2 -0
  98. package/dist/chunks/cli-1.1.34-7bcbswdn.mjs +2 -0
  99. package/dist/chunks/cli-1.1.34-7bxexffs.mjs +6 -0
  100. package/dist/chunks/cli-1.1.34-7n5bvchq.mjs +2 -0
  101. package/dist/chunks/cli-1.1.34-7npd3as5.mjs +18 -0
  102. package/dist/chunks/cli-1.1.34-7rd2xv38.mjs +3 -0
  103. package/dist/chunks/cli-1.1.34-80nhtgdq.mjs +2 -0
  104. package/dist/chunks/cli-1.1.34-83s0mm9a.mjs +2 -0
  105. package/dist/chunks/cli-1.1.34-84707tma.mjs +5491 -0
  106. package/dist/chunks/cli-1.1.34-859ap6f7.mjs +2 -0
  107. package/dist/chunks/cli-1.1.34-8r5c91mz.mjs +2 -0
  108. package/dist/chunks/cli-1.1.34-8s2k8jnr.mjs +39 -0
  109. package/dist/chunks/cli-1.1.34-8vfey6b5.mjs +2 -0
  110. package/dist/chunks/cli-1.1.34-92kps6jn.mjs +63 -0
  111. package/dist/chunks/cli-1.1.34-9jn997h8.mjs +2 -0
  112. package/dist/chunks/cli-1.1.34-9tctqya9.mjs +6 -0
  113. package/dist/chunks/cli-1.1.34-9tze8t1x.mjs +2 -0
  114. package/dist/chunks/cli-1.1.34-9z887t80.mjs +2 -0
  115. package/dist/chunks/cli-1.1.34-a6gj1b3g.mjs +2 -0
  116. package/dist/chunks/cli-1.1.34-a7et4z4n.mjs +2 -0
  117. package/dist/chunks/cli-1.1.34-ajqsr81p.mjs +2 -0
  118. package/dist/chunks/cli-1.1.34-ak4sm3t1.mjs +2 -0
  119. package/dist/chunks/cli-1.1.34-axnnzxpw.mjs +2 -0
  120. package/dist/chunks/cli-1.1.34-b9j8be5k.mjs +2 -0
  121. package/dist/chunks/cli-1.1.34-bt9brnrs.mjs +2 -0
  122. package/dist/chunks/cli-1.1.34-c3w48hst.mjs +2 -0
  123. package/dist/chunks/cli-1.1.34-cp457g25.mjs +11 -0
  124. package/dist/chunks/cli-1.1.34-cptp243m.mjs +2 -0
  125. package/dist/chunks/cli-1.1.34-cqxr7fsq.mjs +2 -0
  126. package/dist/chunks/cli-1.1.34-ctjatnq8.mjs +2 -0
  127. package/dist/chunks/cli-1.1.34-czhcyzgw.mjs +2 -0
  128. package/dist/chunks/cli-1.1.34-d0sgyvr1.mjs +4 -0
  129. package/dist/chunks/cli-1.1.34-d5enzbca.mjs +2 -0
  130. package/dist/chunks/cli-1.1.34-d8bccy48.mjs +7 -0
  131. package/dist/chunks/cli-1.1.34-dceap5rk.mjs +4 -0
  132. package/dist/chunks/cli-1.1.34-dj3hwt6m.mjs +3 -0
  133. package/dist/chunks/cli-1.1.34-dvx08sv2.mjs +2 -0
  134. package/dist/chunks/cli-1.1.34-e1vkhvbm.mjs +2 -0
  135. package/dist/chunks/cli-1.1.34-e4f2qw6n.mjs +2 -0
  136. package/dist/chunks/cli-1.1.34-e7fd8zh6.mjs +2 -0
  137. package/dist/chunks/cli-1.1.34-e9rxgan0.mjs +2 -0
  138. package/dist/chunks/cli-1.1.34-ehad4d4f.mjs +2 -0
  139. package/dist/chunks/cli-1.1.34-ev8ffgr9.mjs +2 -0
  140. package/dist/chunks/cli-1.1.34-ew7p2ct8.mjs +2 -0
  141. package/dist/chunks/cli-1.1.34-exsrnr6k.mjs +2 -0
  142. package/dist/chunks/cli-1.1.34-f806gv2e.mjs +7 -0
  143. package/dist/chunks/cli-1.1.34-faavcjnj.mjs +2 -0
  144. package/dist/chunks/cli-1.1.34-fd3cb4wv.mjs +2 -0
  145. package/dist/chunks/cli-1.1.34-ff6hyf5n.mjs +2 -0
  146. package/dist/chunks/cli-1.1.34-ffs3510y.mjs +2 -0
  147. package/dist/chunks/cli-1.1.34-fgbv1rw4.mjs +17 -0
  148. package/dist/chunks/cli-1.1.34-fgx6ej2m.mjs +34 -0
  149. package/dist/chunks/cli-1.1.34-fm4a40ta.mjs +2 -0
  150. package/dist/chunks/cli-1.1.34-fnds3msv.mjs +6 -0
  151. package/dist/chunks/cli-1.1.34-ftd1h34q.mjs +2 -0
  152. package/dist/chunks/cli-1.1.34-g0sqgp9m.mjs +2 -0
  153. package/dist/chunks/cli-1.1.34-g6kkzzxg.mjs +2 -0
  154. package/dist/chunks/cli-1.1.34-g7q1qz3e.mjs +2 -0
  155. package/dist/chunks/cli-1.1.34-g888fgsj.mjs +4 -0
  156. package/dist/chunks/cli-1.1.34-ge8xp99z.mjs +2 -0
  157. package/dist/chunks/cli-1.1.34-gsrndv90.mjs +2 -0
  158. package/dist/chunks/cli-1.1.34-h3ysfavt.mjs +4 -0
  159. package/dist/chunks/cli-1.1.34-h7927ctg.mjs +2 -0
  160. package/dist/chunks/cli-1.1.34-h7bcvee5.mjs +2 -0
  161. package/dist/chunks/cli-1.1.34-hdva7ptv.mjs +10 -0
  162. package/dist/chunks/cli-1.1.34-he92bjvt.mjs +2 -0
  163. package/dist/chunks/cli-1.1.34-hpn89fzn.mjs +2 -0
  164. package/dist/chunks/cli-1.1.34-hpt8kch4.mjs +2 -0
  165. package/dist/chunks/cli-1.1.34-hrw37per.mjs +8 -0
  166. package/dist/chunks/cli-1.1.34-hsngtgbm.mjs +24 -0
  167. package/dist/chunks/cli-1.1.34-hyya784q.mjs +2 -0
  168. package/dist/chunks/cli-1.1.34-j8ab267c.mjs +2 -0
  169. package/dist/chunks/cli-1.1.34-jkdgk3ns.mjs +2 -0
  170. package/dist/chunks/cli-1.1.34-jrxh48kf.mjs +4 -0
  171. package/dist/chunks/cli-1.1.34-jsp1hy0k.mjs +2 -0
  172. package/dist/chunks/cli-1.1.34-k4zd38bd.mjs +15 -0
  173. package/dist/chunks/cli-1.1.34-k761g5m2.mjs +2 -0
  174. package/dist/chunks/cli-1.1.34-k8gmdsqr.mjs +2 -0
  175. package/dist/chunks/cli-1.1.34-mbeaqq0q.mjs +6 -0
  176. package/dist/chunks/cli-1.1.34-mhjjf878.mjs +5 -0
  177. package/dist/chunks/cli-1.1.34-n5t6xk0e.mjs +2 -0
  178. package/dist/chunks/cli-1.1.34-n5zh4wyg.mjs +42 -0
  179. package/dist/chunks/cli-1.1.34-ncz9dava.mjs +2 -0
  180. package/dist/chunks/cli-1.1.34-nr50vg8g.mjs +25 -0
  181. package/dist/chunks/cli-1.1.34-nxeb9r8s.mjs +2 -0
  182. package/dist/chunks/cli-1.1.34-p5v4dwpg.mjs +4 -0
  183. package/dist/chunks/cli-1.1.34-p7yjh2wb.mjs +2 -0
  184. package/dist/chunks/cli-1.1.34-p9rd6dtm.mjs +2 -0
  185. package/dist/chunks/cli-1.1.34-q5stzg7k.mjs +2 -0
  186. package/dist/chunks/cli-1.1.34-q83yydqv.mjs +133 -0
  187. package/dist/chunks/cli-1.1.34-q8chhxkt.mjs +2 -0
  188. package/dist/chunks/cli-1.1.34-qc15bhsg.mjs +10 -0
  189. package/dist/chunks/cli-1.1.34-qef4zhc3.mjs +2 -0
  190. package/dist/chunks/cli-1.1.34-qs805z7n.mjs +9 -0
  191. package/dist/chunks/cli-1.1.34-qwd6k5t4.mjs +2 -0
  192. package/dist/chunks/cli-1.1.34-r222exkd.mjs +2 -0
  193. package/dist/chunks/cli-1.1.34-r3kdjy4e.mjs +2 -0
  194. package/dist/chunks/cli-1.1.34-r5dphbcm.mjs +2 -0
  195. package/dist/chunks/cli-1.1.34-rb7wdjza.mjs +45 -0
  196. package/dist/chunks/cli-1.1.34-rkx3x9f6.mjs +4 -0
  197. package/dist/chunks/cli-1.1.34-rqkzp4n2.mjs +2 -0
  198. package/dist/chunks/cli-1.1.34-rs4xg86x.mjs +2 -0
  199. package/dist/chunks/cli-1.1.34-s4gsmtx9.mjs +21 -0
  200. package/dist/chunks/cli-1.1.34-s8c2c7g3.mjs +3 -0
  201. package/dist/chunks/cli-1.1.34-s9g6mekb.mjs +2 -0
  202. package/dist/chunks/cli-1.1.34-sfxba1xz.mjs +3 -0
  203. package/dist/chunks/cli-1.1.34-shm51n5s.mjs +2 -0
  204. package/dist/chunks/cli-1.1.34-sj1pcnn3.mjs +2 -0
  205. package/dist/chunks/cli-1.1.34-sq51za8b.mjs +2 -0
  206. package/dist/chunks/cli-1.1.34-sxpgdyxm.mjs +2 -0
  207. package/dist/chunks/cli-1.1.34-syx85e6f.mjs +15 -0
  208. package/dist/chunks/cli-1.1.34-t4rp44p7.mjs +2 -0
  209. package/dist/chunks/cli-1.1.34-tj5mvsam.mjs +2 -0
  210. package/dist/chunks/cli-1.1.34-tmwcg7q1.mjs +2 -0
  211. package/dist/chunks/cli-1.1.34-ty06ehzt.mjs +3 -0
  212. package/dist/chunks/cli-1.1.34-v2gbtt59.mjs +50 -0
  213. package/dist/chunks/cli-1.1.34-vdk5kjz7.mjs +15 -0
  214. package/dist/chunks/cli-1.1.34-vdwfqapw.mjs +2 -0
  215. package/dist/chunks/cli-1.1.34-vmnqkma9.mjs +2 -0
  216. package/dist/chunks/cli-1.1.34-vpwwhg8z.mjs +2 -0
  217. package/dist/chunks/cli-1.1.34-vrsb0pea.mjs +2 -0
  218. package/dist/chunks/cli-1.1.34-vz14r55x.mjs +3 -0
  219. package/dist/chunks/cli-1.1.34-w7vjt3vm.mjs +2 -0
  220. package/dist/chunks/cli-1.1.34-w9ek3z9c.mjs +2 -0
  221. package/dist/chunks/cli-1.1.34-webjc1s3.mjs +2 -0
  222. package/dist/chunks/cli-1.1.34-wfb66gsv.mjs +2 -0
  223. package/dist/chunks/cli-1.1.34-wh74w227.mjs +2 -0
  224. package/dist/chunks/cli-1.1.34-whbj9gb8.mjs +24 -0
  225. package/dist/chunks/cli-1.1.34-wqkce8kj.mjs +2 -0
  226. package/dist/chunks/cli-1.1.34-wwjkncsv.mjs +203 -0
  227. package/dist/chunks/cli-1.1.34-wwvcrp2d.mjs +2 -0
  228. package/dist/chunks/cli-1.1.34-xptd4xtb.mjs +2 -0
  229. package/dist/chunks/cli-1.1.34-xwg0x7p4.mjs +5 -0
  230. package/dist/chunks/cli-1.1.34-xx555z7d.mjs +25 -0
  231. package/dist/chunks/cli-1.1.34-yfasvar9.mjs +2 -0
  232. package/dist/chunks/cli-1.1.34-yk56k2na.mjs +2 -0
  233. package/dist/chunks/cli-1.1.34-yqryw36t.mjs +2 -0
  234. package/dist/chunks/cli-1.1.34-yqyrt954.mjs +2 -0
  235. package/dist/chunks/cli-1.1.34-yrk4mxjw.mjs +16 -0
  236. package/dist/chunks/cli-1.1.34-z14xw89f.mjs +2 -0
  237. package/dist/chunks/cli-1.1.34-z1htezxg.mjs +2 -0
  238. package/dist/chunks/cli-1.1.34-z1tmh10g.mjs +2 -0
  239. package/dist/chunks/cli-1.1.34-z84fkt5q.mjs +2 -0
  240. package/dist/chunks/cli-1.1.34-zpsaqq15.mjs +17 -0
  241. package/dist/chunks/client-1.1.34-4exntck8.mjs +1 -0
  242. package/dist/chunks/color-1.1.34-d4199wch.mjs +1 -0
  243. package/dist/chunks/compact-1.1.34-jwr60dt0.mjs +2 -0
  244. package/dist/chunks/config-1.1.34-acewhfv4.mjs +1 -0
  245. package/dist/chunks/config-1.1.34-tqzmnvs7.mjs +1 -0
  246. package/dist/chunks/constants-1.1.34-s2nkrx7g.mjs +1 -0
  247. package/dist/chunks/context-1.1.34-wc822wp5.mjs +1 -0
  248. package/dist/chunks/context-noninteractive-1.1.34-59xb33ys.mjs +1 -0
  249. package/dist/chunks/conversation-1.1.34-5k03q5nt.mjs +1 -0
  250. package/dist/chunks/copilotHeaders-1.1.34-dkmsvh40.mjs +1 -0
  251. package/dist/chunks/copy-1.1.34-efb24nm3.mjs +9 -0
  252. package/dist/chunks/cost-1.1.34-nqqv2xjh.mjs +1 -0
  253. package/dist/chunks/createSession-1.1.34-69d3ep6s.mjs +1 -0
  254. package/dist/chunks/debug-1.1.34-k568mcye.mjs +1 -0
  255. package/dist/chunks/defaultActionDeps-1.1.34-16tn959k.mjs +1480 -0
  256. package/dist/chunks/desktop-1.1.34-p9x626qf.mjs +2 -0
  257. package/dist/chunks/detectRepository-1.1.34-rqyapz8m.mjs +1 -0
  258. package/dist/chunks/detection-1.1.34-5xfznq79.mjs +1 -0
  259. package/dist/chunks/diff-1.1.34-5ggzgzf5.mjs +1 -0
  260. package/dist/chunks/doctor-1.1.34-j6mbdd5g.mjs +1 -0
  261. package/dist/chunks/doctorDiagnostic-1.1.34-spmjpktf.mjs +1 -0
  262. package/dist/chunks/earlyInput-1.1.34-a0ptf6h4.mjs +1 -0
  263. package/dist/chunks/effort-1.1.34-9k8mc8ca.mjs +13 -0
  264. package/dist/chunks/engine-1.1.34-y28mg4na.mjs +1 -0
  265. package/dist/chunks/envLessBridgeConfig-1.1.34-wm7tybv6.mjs +1 -0
  266. package/dist/chunks/envUtils-1.1.34-rmsh5nt5.mjs +1 -0
  267. package/dist/chunks/errors-1.1.34-61fzsrh4.mjs +1 -0
  268. package/dist/chunks/exampleCommands-1.1.34-8x8b7p9t.mjs +1 -0
  269. package/dist/chunks/execFileNoThrow-1.1.34-zemxr8xw.mjs +1 -0
  270. package/dist/chunks/exit-1.1.34-sw6zmmgn.mjs +1 -0
  271. package/dist/chunks/explorer-1.1.34-3apnqz0a.mjs +1 -0
  272. package/dist/chunks/export-1.1.34-1hyv5efm.mjs +2 -0
  273. package/dist/chunks/fast-1.1.34-3d72mbz1.mjs +1 -0
  274. package/dist/chunks/feedback-1.1.34-k74bh5v8.mjs +16 -0
  275. package/dist/chunks/git-1.1.34-p3qv0ed3.mjs +1 -0
  276. package/dist/chunks/githubModelsCredentials-1.1.34-hmjt89m3.mjs +1 -0
  277. package/dist/chunks/goal-1.1.34-m6dge19b.mjs +4 -0
  278. package/dist/chunks/headless-1.1.34-hpaadbg6.mjs +2 -0
  279. package/dist/chunks/heapdump-1.1.34-zc52x1pc.mjs +6 -0
  280. package/dist/chunks/help-1.1.34-0sgw7jbh.mjs +1 -0
  281. package/dist/chunks/hooks-1.1.34-8s6pawxx.mjs +1 -0
  282. package/dist/chunks/hooks-1.1.34-vnm6rywf.mjs +79 -0
  283. package/dist/chunks/ide-1.1.34-jbcf8ma9.mjs +3 -0
  284. package/dist/chunks/image-processor-napi-1.1.34-zrk7wvw2.mjs +1 -0
  285. package/dist/chunks/import-1.1.34-4j35p307.mjs +261 -0
  286. package/dist/chunks/inboundAttachments-1.1.34-pk5t3y0v.mjs +1 -0
  287. package/dist/chunks/index-1.1.34-086aty1n.mjs +1 -0
  288. package/dist/chunks/index-1.1.34-0q46c1bj.mjs +1 -0
  289. package/dist/chunks/index-1.1.34-2j48ar1m.mjs +1 -0
  290. package/dist/chunks/index-1.1.34-427npr7a.mjs +1 -0
  291. package/dist/chunks/index-1.1.34-50d0rg8h.mjs +5 -0
  292. package/dist/chunks/index-1.1.34-50j6q6gr.mjs +1 -0
  293. package/dist/chunks/index-1.1.34-ehvgt047.mjs +1 -0
  294. package/dist/chunks/index-1.1.34-faq1af2v.mjs +1 -0
  295. package/dist/chunks/index-1.1.34-fvrswew9.mjs +2 -0
  296. package/dist/chunks/index-1.1.34-mx39dxjj.mjs +30 -0
  297. package/dist/chunks/index-1.1.34-mxpb8hvr.mjs +9 -0
  298. package/dist/chunks/index-1.1.34-nye63dch.mjs +1 -0
  299. package/dist/chunks/index-1.1.34-qmmg0npy.mjs +2 -0
  300. package/dist/chunks/index-1.1.34-qxa3e3cv.mjs +1 -0
  301. package/dist/chunks/index-1.1.34-snehdv50.mjs +1 -0
  302. package/dist/chunks/index-1.1.34-t7jsxdbk.mjs +1 -0
  303. package/dist/chunks/index-1.1.34-wgm8z1dz.mjs +1 -0
  304. package/dist/chunks/index-1.1.34-wz64a3d4.mjs +9 -0
  305. package/dist/chunks/index-1.1.34-x83gwj6g.mjs +23 -0
  306. package/dist/chunks/index-1.1.34-xa114b8t.mjs +1 -0
  307. package/dist/chunks/index-1.1.34-y10pcdv1.mjs +1 -0
  308. package/dist/chunks/index-1.1.34-yqzmcm9y.mjs +1 -0
  309. package/dist/chunks/index-1.1.34-yxzywg42.mjs +1 -0
  310. package/dist/chunks/init-1.1.34-jdhgqsrc.mjs +2 -0
  311. package/dist/chunks/initReplBridge-1.1.34-b0awafmd.mjs +1 -0
  312. package/dist/chunks/ink-1.1.34-yb3z87en.mjs +1 -0
  313. package/dist/chunks/insights-1.1.34-a321wxgf.mjs +870 -0
  314. package/dist/chunks/install-1.1.34-064wyxwb.mjs +1 -0
  315. package/dist/chunks/install-github-app-1.1.34-smwffy57.mjs +149 -0
  316. package/dist/chunks/install-slack-app-1.1.34-a5bwj8gk.mjs +1 -0
  317. package/dist/chunks/interactiveHelpers-1.1.34-pq1b6btm.mjs +1 -0
  318. package/dist/chunks/keybindings-1.1.34-rq312f3j.mjs +2 -0
  319. package/dist/chunks/latestVersionCache-1.1.34-x006sta9.mjs +1 -0
  320. package/dist/chunks/loadAgentsDir-1.1.34-2w0hm9wz.mjs +1 -0
  321. package/dist/chunks/loadPluginHooks-1.1.34-t9s8mknk.mjs +1 -0
  322. package/dist/chunks/log-1.1.34-n41t6etn.mjs +1 -0
  323. package/dist/chunks/main-1.1.34-gh9n8dgw.mjs +1 -0
  324. package/dist/chunks/managedEnv-1.1.34-qntg5ykr.mjs +1 -0
  325. package/dist/chunks/mcp-1.1.34-5mtgev8d.mjs +17 -0
  326. package/dist/chunks/mcp-1.1.34-61dcjzjk.mjs +4 -0
  327. package/dist/chunks/mcp-1.1.34-9d1py1ez.mjs +1 -0
  328. package/dist/chunks/mcpb-1.1.34-x9mxeryp.mjs +1 -0
  329. package/dist/chunks/memory-1.1.34-sys90hns.mjs +128 -0
  330. package/dist/chunks/model-1.1.34-v1r14fy7.mjs +1 -0
  331. package/dist/chunks/model-1.1.34-vks7w05g.mjs +2 -0
  332. package/dist/chunks/node-1.1.34-5b5b2m9b.mjs +1 -0
  333. package/dist/chunks/node-1.1.34-sdqnj3qm.mjs +15 -0
  334. package/dist/chunks/oauth-1.1.34-bbmwrswg.mjs +1 -0
  335. package/dist/chunks/openaiShim-1.1.34-kj2a4r19.mjs +14 -0
  336. package/dist/chunks/output-style-1.1.34-a4dykckn.mjs +1 -0
  337. package/dist/chunks/package-F6O7J2XI-1.1.34-291qk0fk.mjs +1 -0
  338. package/dist/chunks/permissions-1.1.34-bqhsed60.mjs +1 -0
  339. package/dist/chunks/permissions-1.1.34-xkrhteme.mjs +3 -0
  340. package/dist/chunks/plan-1.1.34-j7qcpv9s.mjs +1 -0
  341. package/dist/chunks/plist-1.1.34-ykta36sg.mjs +1 -0
  342. package/dist/chunks/plugin-1.1.34-vszmzh0r.mjs +29 -0
  343. package/dist/chunks/pluginStartupCheck-1.1.34-5xap799m.mjs +1 -0
  344. package/dist/chunks/plugins-1.1.34-6ea553qa.mjs +9 -0
  345. package/dist/chunks/preActionHook-1.1.34-xy1pecch.mjs +2 -0
  346. package/dist/chunks/print-1.1.34-2gdkw86g.mjs +57 -0
  347. package/dist/chunks/process-1.1.34-fms89mxv.mjs +1 -0
  348. package/dist/chunks/processBashCommand-1.1.34-gcydk2hd.mjs +1 -0
  349. package/dist/chunks/processSlashCommand-1.1.34-a3q257ff.mjs +9 -0
  350. package/dist/chunks/prompt-1.1.34-ctfxsw9h.mjs +1 -0
  351. package/dist/chunks/prompt-1.1.34-wp8mvh7t.mjs +1 -0
  352. package/dist/chunks/prompts-1.1.34-bmq3swzy.mjs +1 -0
  353. package/dist/chunks/provider-1.1.34-00xnjkhs.mjs +2 -0
  354. package/dist/chunks/providerProfiles-1.1.34-psred1pr.mjs +1 -0
  355. package/dist/chunks/providerValidation-1.1.34-0vamj708.mjs +6 -0
  356. package/dist/chunks/registerSubcommands-1.1.34-pmqr2nmf.mjs +26 -0
  357. package/dist/chunks/registry-1.1.34-sapmjhjz.mjs +1 -0
  358. package/dist/chunks/release-notes-1.1.34-p6wg8evp.mjs +5 -0
  359. package/dist/chunks/reload-plugins-1.1.34-cd8e00jp.mjs +2 -0
  360. package/dist/chunks/remote-env-1.1.34-fpepp6cm.mjs +1 -0
  361. package/dist/chunks/remoteBridgeCore-1.1.34-mmxz0ypj.mjs +1 -0
  362. package/dist/chunks/rename-1.1.34-gwdavcb8.mjs +1 -0
  363. package/dist/chunks/replLauncher-1.1.34-5yvyazea.mjs +1 -0
  364. package/dist/chunks/resume-1.1.34-9abwrf3b.mjs +2 -0
  365. package/dist/chunks/rewind-1.1.34-qf51de9x.mjs +1 -0
  366. package/dist/chunks/rootOptions-1.1.34-dkd3s4x5.mjs +1 -0
  367. package/dist/chunks/runWorkflowHeadless-1.1.34-c0j2ym4w.mjs +10 -0
  368. package/dist/chunks/sandbox-adapter-1.1.34-ad556paa.mjs +1 -0
  369. package/dist/chunks/sandbox-toggle-1.1.34-1x2ddxv2.mjs +1 -0
  370. package/dist/chunks/session-1.1.34-h46ywygv.mjs +2 -0
  371. package/dist/chunks/sessionStorage-1.1.34-tc7rwcvm.mjs +1 -0
  372. package/dist/chunks/settings-1.1.34-bk3tb34s.mjs +1 -0
  373. package/dist/chunks/setup-1.1.34-3ddxnk01.mjs +12 -0
  374. package/dist/chunks/sinks-1.1.34-ww0tcz6j.mjs +1 -0
  375. package/dist/chunks/skills-1.1.34-3ybbxgjn.mjs +1 -0
  376. package/dist/chunks/startupProfiler-1.1.34-7z13z7v7.mjs +1 -0
  377. package/dist/chunks/startupUpdateCheck-1.1.34-45fyr9wz.mjs +1 -0
  378. package/dist/chunks/state-1.1.34-pymefs1m.mjs +1 -0
  379. package/dist/chunks/stats-1.1.34-4jw41qjm.mjs +1 -0
  380. package/dist/chunks/status-1.1.34-r120pa8k.mjs +1 -0
  381. package/dist/chunks/stickers-1.1.34-5zsfjhdn.mjs +1 -0
  382. package/dist/chunks/subprocessEnv-1.1.34-44r7jf62.mjs +1 -0
  383. package/dist/chunks/tasks-1.1.34-1mhjk4hs.mjs +1 -0
  384. package/dist/chunks/teamHelpers-1.1.34-jfmrh1r7.mjs +1 -0
  385. package/dist/chunks/teammateModeSnapshot-1.1.34-m47hpvj2.mjs +1 -0
  386. package/dist/chunks/teleport-1.1.34-g7gk9g3q.mjs +1 -0
  387. package/dist/chunks/terminalSetup-1.1.34-8e12gzad.mjs +1 -0
  388. package/dist/chunks/theme-1.1.34-bvmx3zyc.mjs +1 -0
  389. package/dist/chunks/thinkback-1.1.34-bz9h3qn7.mjs +1 -0
  390. package/dist/chunks/thinkback-play-1.1.34-azysb61e.mjs +1 -0
  391. package/dist/chunks/toolPool-1.1.34-tewk9s1e.mjs +1 -0
  392. package/dist/chunks/toolSearch-1.1.34-70r6c6d3.mjs +1 -0
  393. package/dist/chunks/tools-1.1.34-a7jpjvb5.mjs +1 -0
  394. package/dist/chunks/trustedDevice-1.1.34-jhn5330j.mjs +1 -0
  395. package/dist/chunks/turndown.cjs-1.1.34-8ve160tv.mjs +69 -0
  396. package/dist/chunks/types-1.1.34-0as4p0wf.mjs +1 -0
  397. package/dist/chunks/ultrareviewCommand-1.1.34-b7bpj27y.mjs +4 -0
  398. package/dist/chunks/update-1.1.34-wnetpcv6.mjs +72 -0
  399. package/dist/chunks/upload-1.1.34-3cdkjhmm.mjs +7 -0
  400. package/dist/chunks/upstreamproxy-1.1.34-x376823n.mjs +14 -0
  401. package/dist/chunks/usage-1.1.34-h5bv8trt.mjs +1 -0
  402. package/dist/chunks/util-1.1.34-7ctz504f.mjs +1 -0
  403. package/dist/chunks/utils-1.1.34-h9r9ybtj.mjs +1 -0
  404. package/dist/chunks/vim-1.1.34-4y4504z8.mjs +1 -0
  405. package/dist/chunks/watchLoop-1.1.34-tnjnpc05.mjs +13 -0
  406. package/dist/chunks/wiki-1.1.34-53n04tv3.mjs +132 -0
  407. package/dist/chunks/workflows-1.1.34-zefy425g.mjs +1 -0
  408. package/dist/chunks/worktree-1.1.34-gzm7041w.mjs +1 -0
  409. package/dist/chunks/worktreeModeEnabled-1.1.34-x9qxm01a.mjs +1 -0
  410. package/dist/chunks/wrapper-1.1.34-jmcmxyrm.mjs +7 -0
  411. package/dist/cli.mjs +2 -2
  412. package/package.json +9 -9
  413. package/dist/chunks/App-1.1.33-y76d67dw.mjs +0 -1
  414. package/dist/chunks/ApproveApiKey-1.1.33-fz6kxvwx.mjs +0 -1
  415. package/dist/chunks/AutoModeOptInDialog-1.1.33-99ykhjpz.mjs +0 -1
  416. package/dist/chunks/BypassPermissionsModeDialog-1.1.33-tzr7atf1.mjs +0 -1
  417. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.33-3ehzc9bn.mjs +0 -1
  418. package/dist/chunks/ConsoleOAuthFlow-1.1.33-mptzgfxf.mjs +0 -1
  419. package/dist/chunks/DiffDialog-1.1.33-anvv0w3b.mjs +0 -6
  420. package/dist/chunks/Doctor-1.1.33-8m3ek5ex.mjs +0 -1
  421. package/dist/chunks/ExplorerDialog-1.1.33-70aphca6.mjs +0 -6
  422. package/dist/chunks/ITermBackend-1.1.33-0syshawj.mjs +0 -1
  423. package/dist/chunks/InvalidConfigDialog-1.1.33-40sq04vm.mjs +0 -1
  424. package/dist/chunks/InvalidSettingsDialog-1.1.33-tgp186pw.mjs +0 -1
  425. package/dist/chunks/MigrationDialog-1.1.33-9tcy3d33.mjs +0 -1
  426. package/dist/chunks/Onboarding-1.1.33-zjx8xhqz.mjs +0 -1
  427. package/dist/chunks/ProviderManager-1.1.33-zm2tkf0s.mjs +0 -1
  428. package/dist/chunks/REPL-1.1.33-gh2kz8dk.mjs +0 -1
  429. package/dist/chunks/ResumeConversation-1.1.33-v284310j.mjs +0 -1
  430. package/dist/chunks/TeleportProgress-1.1.33-5dqj1qp9.mjs +0 -1
  431. package/dist/chunks/TeleportRepoMismatchDialog-1.1.33-q3p5maex.mjs +0 -1
  432. package/dist/chunks/TeleportResumeWrapper-1.1.33-dhrpj9a6.mjs +0 -1
  433. package/dist/chunks/TmuxBackend-1.1.33-gph2cfsr.mjs +0 -9
  434. package/dist/chunks/ToolSearchTool-1.1.33-qv8tchk3.mjs +0 -1
  435. package/dist/chunks/TrustDialog-1.1.33-bq45cvv6.mjs +0 -1
  436. package/dist/chunks/activeProvider-1.1.33-v055y8f3.mjs +0 -1
  437. package/dist/chunks/add-dir-1.1.33-e811cqdx.mjs +0 -1
  438. package/dist/chunks/agentTypes-1.1.33-t5nvprgp.mjs +0 -1
  439. package/dist/chunks/agents-1.1.33-mbve4trn.mjs +0 -3
  440. package/dist/chunks/agents-1.1.33-nhfb2axy.mjs +0 -110
  441. package/dist/chunks/api-1.1.33-2sg5ga0j.mjs +0 -1
  442. package/dist/chunks/asciicast-1.1.33-xr41erq2.mjs +0 -1
  443. package/dist/chunks/auth-1.1.33-k778a810.mjs +0 -1
  444. package/dist/chunks/auth-1.1.33-xappxyn1.mjs +0 -1
  445. package/dist/chunks/autoMode-1.1.33-wb6nwcf3.mjs +0 -52
  446. package/dist/chunks/autoModeSetup-1.1.33-43tmanjr.mjs +0 -44
  447. package/dist/chunks/autoUpdater-1.1.33-py6amejh.mjs +0 -1
  448. package/dist/chunks/backgroundHousekeeping-1.1.33-zn01axaz.mjs +0 -1
  449. package/dist/chunks/branch-1.1.33-gthrar82.mjs +0 -4
  450. package/dist/chunks/bridge-1.1.33-9s3v1h77.mjs +0 -2
  451. package/dist/chunks/bridgeConfig-1.1.33-183x874k.mjs +0 -1
  452. package/dist/chunks/bridgeEnabled-1.1.33-42yktg6p.mjs +0 -1
  453. package/dist/chunks/bridgeMain-1.1.33-62ytf81q.mjs +0 -88
  454. package/dist/chunks/bridgePointer-1.1.33-weh8egz5.mjs +0 -1
  455. package/dist/chunks/btw-1.1.33-xhjhwhex.mjs +0 -1
  456. package/dist/chunks/buddy-1.1.33-6e4bcghj.mjs +0 -3
  457. package/dist/chunks/cache-probe-1.1.33-65t8nv3y.mjs +0 -21
  458. package/dist/chunks/cacheStats-1.1.33-anfjhga9.mjs +0 -4
  459. package/dist/chunks/caches-1.1.33-ehvfr1c6.mjs +0 -1
  460. package/dist/chunks/cd-1.1.33-xbpsa40s.mjs +0 -3
  461. package/dist/chunks/claudeDesktop-1.1.33-en5r91rv.mjs +0 -1
  462. package/dist/chunks/clear-1.1.33-90jr5w5d.mjs +0 -1
  463. package/dist/chunks/clearTerminal-1.1.33-4ts9jf6w.mjs +0 -1
  464. package/dist/chunks/cli-1.1.33-05291q1a.mjs +0 -2
  465. package/dist/chunks/cli-1.1.33-0bk8mrfh.mjs +0 -15
  466. package/dist/chunks/cli-1.1.33-0ktq50cd.mjs +0 -133
  467. package/dist/chunks/cli-1.1.33-0kvxjey5.mjs +0 -24
  468. package/dist/chunks/cli-1.1.33-0sckqj39.mjs +0 -2
  469. package/dist/chunks/cli-1.1.33-1fpzq80d.mjs +0 -2
  470. package/dist/chunks/cli-1.1.33-20v60hvd.mjs +0 -203
  471. package/dist/chunks/cli-1.1.33-20zqrzzq.mjs +0 -2
  472. package/dist/chunks/cli-1.1.33-22addsh7.mjs +0 -4
  473. package/dist/chunks/cli-1.1.33-231zj4yg.mjs +0 -2
  474. package/dist/chunks/cli-1.1.33-241y9eee.mjs +0 -5
  475. package/dist/chunks/cli-1.1.33-283f43sy.mjs +0 -2
  476. package/dist/chunks/cli-1.1.33-2chamq3v.mjs +0 -2
  477. package/dist/chunks/cli-1.1.33-2xqjkz7r.mjs +0 -2
  478. package/dist/chunks/cli-1.1.33-303jm377.mjs +0 -2
  479. package/dist/chunks/cli-1.1.33-30vd7w1w.mjs +0 -10
  480. package/dist/chunks/cli-1.1.33-39q98nwa.mjs +0 -2
  481. package/dist/chunks/cli-1.1.33-3by7vn1v.mjs +0 -2
  482. package/dist/chunks/cli-1.1.33-3de2dtv6.mjs +0 -2
  483. package/dist/chunks/cli-1.1.33-3kk4en4s.mjs +0 -2
  484. package/dist/chunks/cli-1.1.33-3yjvh7fr.mjs +0 -2
  485. package/dist/chunks/cli-1.1.33-46bkj0rz.mjs +0 -5
  486. package/dist/chunks/cli-1.1.33-4ghpq4rw.mjs +0 -24
  487. package/dist/chunks/cli-1.1.33-4t7b2799.mjs +0 -2
  488. package/dist/chunks/cli-1.1.33-525zf497.mjs +0 -16
  489. package/dist/chunks/cli-1.1.33-56fen5jd.mjs +0 -4
  490. package/dist/chunks/cli-1.1.33-5c19q87v.mjs +0 -2
  491. package/dist/chunks/cli-1.1.33-5ehc9tkd.mjs +0 -2
  492. package/dist/chunks/cli-1.1.33-5fc0dkzm.mjs +0 -2
  493. package/dist/chunks/cli-1.1.33-5pa215hx.mjs +0 -2
  494. package/dist/chunks/cli-1.1.33-6fq5cn5g.mjs +0 -17
  495. package/dist/chunks/cli-1.1.33-726gr74y.mjs +0 -2
  496. package/dist/chunks/cli-1.1.33-7b2yeb1x.mjs +0 -2
  497. package/dist/chunks/cli-1.1.33-7qjhgket.mjs +0 -2
  498. package/dist/chunks/cli-1.1.33-7qr8n3qn.mjs +0 -2
  499. package/dist/chunks/cli-1.1.33-7rd596wq.mjs +0 -2
  500. package/dist/chunks/cli-1.1.33-7shybbdj.mjs +0 -2
  501. package/dist/chunks/cli-1.1.33-7sm3r61g.mjs +0 -50
  502. package/dist/chunks/cli-1.1.33-87p06j57.mjs +0 -2
  503. package/dist/chunks/cli-1.1.33-8dxvf995.mjs +0 -2
  504. package/dist/chunks/cli-1.1.33-8esj8tkg.mjs +0 -18
  505. package/dist/chunks/cli-1.1.33-8p3h818h.mjs +0 -2
  506. package/dist/chunks/cli-1.1.33-8q8sfbe6.mjs +0 -2
  507. package/dist/chunks/cli-1.1.33-8xyzgp13.mjs +0 -2
  508. package/dist/chunks/cli-1.1.33-90w26xxw.mjs +0 -4
  509. package/dist/chunks/cli-1.1.33-94s66kd2.mjs +0 -2
  510. package/dist/chunks/cli-1.1.33-9dt8xzkt.mjs +0 -2
  511. package/dist/chunks/cli-1.1.33-9fetbt6a.mjs +0 -2
  512. package/dist/chunks/cli-1.1.33-9z2gy96d.mjs +0 -2
  513. package/dist/chunks/cli-1.1.33-9zba2a1d.mjs +0 -60
  514. package/dist/chunks/cli-1.1.33-a49fwy5a.mjs +0 -3
  515. package/dist/chunks/cli-1.1.33-a6dvne78.mjs +0 -2
  516. package/dist/chunks/cli-1.1.33-ad43mr1x.mjs +0 -2
  517. package/dist/chunks/cli-1.1.33-ad75ezdj.mjs +0 -2
  518. package/dist/chunks/cli-1.1.33-afsw641c.mjs +0 -2
  519. package/dist/chunks/cli-1.1.33-aj5dy49h.mjs +0 -3
  520. package/dist/chunks/cli-1.1.33-apx2xgzn.mjs +0 -11
  521. package/dist/chunks/cli-1.1.33-bczwyjaq.mjs +0 -2
  522. package/dist/chunks/cli-1.1.33-bfx6z02g.mjs +0 -2
  523. package/dist/chunks/cli-1.1.33-bh8452tq.mjs +0 -2
  524. package/dist/chunks/cli-1.1.33-btd9w5q2.mjs +0 -2
  525. package/dist/chunks/cli-1.1.33-bxw3sz3d.mjs +0 -2
  526. package/dist/chunks/cli-1.1.33-c14msjsc.mjs +0 -2
  527. package/dist/chunks/cli-1.1.33-c37dxjja.mjs +0 -2
  528. package/dist/chunks/cli-1.1.33-c45mt1yq.mjs +0 -2
  529. package/dist/chunks/cli-1.1.33-c5j1t4gd.mjs +0 -2
  530. package/dist/chunks/cli-1.1.33-cdzhbn5g.mjs +0 -15
  531. package/dist/chunks/cli-1.1.33-cfj1bzen.mjs +0 -2
  532. package/dist/chunks/cli-1.1.33-cj2t55an.mjs +0 -2
  533. package/dist/chunks/cli-1.1.33-cjfrq2jz.mjs +0 -4
  534. package/dist/chunks/cli-1.1.33-czpahv90.mjs +0 -25
  535. package/dist/chunks/cli-1.1.33-czrp8ff2.mjs +0 -2
  536. package/dist/chunks/cli-1.1.33-d2jds1x5.mjs +0 -4
  537. package/dist/chunks/cli-1.1.33-d9fea5m8.mjs +0 -2
  538. package/dist/chunks/cli-1.1.33-das1k5jq.mjs +0 -3
  539. package/dist/chunks/cli-1.1.33-dd7gk6d2.mjs +0 -5
  540. package/dist/chunks/cli-1.1.33-df8tggjt.mjs +0 -2
  541. package/dist/chunks/cli-1.1.33-dfb8xrtp.mjs +0 -2
  542. package/dist/chunks/cli-1.1.33-dfbvd02g.mjs +0 -3
  543. package/dist/chunks/cli-1.1.33-dm8nxxnv.mjs +0 -2
  544. package/dist/chunks/cli-1.1.33-dp41gds0.mjs +0 -2
  545. package/dist/chunks/cli-1.1.33-dv29f6yk.mjs +0 -2
  546. package/dist/chunks/cli-1.1.33-e2jx0b65.mjs +0 -2
  547. package/dist/chunks/cli-1.1.33-e4gbaaq5.mjs +0 -3
  548. package/dist/chunks/cli-1.1.33-e87tvy6n.mjs +0 -2
  549. package/dist/chunks/cli-1.1.33-edgxaxbt.mjs +0 -10
  550. package/dist/chunks/cli-1.1.33-effqmrgb.mjs +0 -2
  551. package/dist/chunks/cli-1.1.33-evp1q65w.mjs +0 -2
  552. package/dist/chunks/cli-1.1.33-ezzc0e6x.mjs +0 -2
  553. package/dist/chunks/cli-1.1.33-f4vhy9zk.mjs +0 -2
  554. package/dist/chunks/cli-1.1.33-f83qf2zv.mjs +0 -63
  555. package/dist/chunks/cli-1.1.33-fcfv2vn6.mjs +0 -2
  556. package/dist/chunks/cli-1.1.33-g3wvn6f8.mjs +0 -2
  557. package/dist/chunks/cli-1.1.33-gbjym0yt.mjs +0 -6
  558. package/dist/chunks/cli-1.1.33-gfehnxj8.mjs +0 -2
  559. package/dist/chunks/cli-1.1.33-ggk9m978.mjs +0 -7
  560. package/dist/chunks/cli-1.1.33-ghcxb1ce.mjs +0 -34
  561. package/dist/chunks/cli-1.1.33-gnejtk17.mjs +0 -7
  562. package/dist/chunks/cli-1.1.33-gpp6mbxj.mjs +0 -17
  563. package/dist/chunks/cli-1.1.33-h0mx2ccc.mjs +0 -2
  564. package/dist/chunks/cli-1.1.33-h27b2an0.mjs +0 -2
  565. package/dist/chunks/cli-1.1.33-h75frpfe.mjs +0 -2
  566. package/dist/chunks/cli-1.1.33-heys42qe.mjs +0 -9
  567. package/dist/chunks/cli-1.1.33-hfkfz9g9.mjs +0 -2
  568. package/dist/chunks/cli-1.1.33-hwmqqtqr.mjs +0 -45
  569. package/dist/chunks/cli-1.1.33-j5q2mpwf.mjs +0 -2
  570. package/dist/chunks/cli-1.1.33-j6ep4mfm.mjs +0 -6
  571. package/dist/chunks/cli-1.1.33-j75f13gr.mjs +0 -2
  572. package/dist/chunks/cli-1.1.33-j8ajj3nv.mjs +0 -2
  573. package/dist/chunks/cli-1.1.33-jdtfdqvz.mjs +0 -2
  574. package/dist/chunks/cli-1.1.33-jp2qs3mr.mjs +0 -2
  575. package/dist/chunks/cli-1.1.33-jsyd53zn.mjs +0 -2
  576. package/dist/chunks/cli-1.1.33-jww2z5yy.mjs +0 -2
  577. package/dist/chunks/cli-1.1.33-k1vhqgx4.mjs +0 -2
  578. package/dist/chunks/cli-1.1.33-k466m68a.mjs +0 -2
  579. package/dist/chunks/cli-1.1.33-k51bffb8.mjs +0 -2
  580. package/dist/chunks/cli-1.1.33-kdbb1eq4.mjs +0 -2
  581. package/dist/chunks/cli-1.1.33-kg221c89.mjs +0 -2
  582. package/dist/chunks/cli-1.1.33-kqsskxv0.mjs +0 -133
  583. package/dist/chunks/cli-1.1.33-kth7ttsa.mjs +0 -4
  584. package/dist/chunks/cli-1.1.33-kty1kjfd.mjs +0 -2
  585. package/dist/chunks/cli-1.1.33-kxjb58yw.mjs +0 -2
  586. package/dist/chunks/cli-1.1.33-m06xge1a.mjs +0 -2
  587. package/dist/chunks/cli-1.1.33-m08stm17.mjs +0 -2
  588. package/dist/chunks/cli-1.1.33-m402nk5n.mjs +0 -2
  589. package/dist/chunks/cli-1.1.33-mg60nkfe.mjs +0 -2
  590. package/dist/chunks/cli-1.1.33-mgmqjt4t.mjs +0 -2
  591. package/dist/chunks/cli-1.1.33-mhph00kg.mjs +0 -24
  592. package/dist/chunks/cli-1.1.33-mkzxq2c9.mjs +0 -2
  593. package/dist/chunks/cli-1.1.33-mm3hdty7.mjs +0 -2
  594. package/dist/chunks/cli-1.1.33-n2d1txyn.mjs +0 -4
  595. package/dist/chunks/cli-1.1.33-n55k105y.mjs +0 -2
  596. package/dist/chunks/cli-1.1.33-n7rpkhs4.mjs +0 -2
  597. package/dist/chunks/cli-1.1.33-nd6tv1an.mjs +0 -15
  598. package/dist/chunks/cli-1.1.33-ndste4rf.mjs +0 -39
  599. package/dist/chunks/cli-1.1.33-nq2hxcp4.mjs +0 -9
  600. package/dist/chunks/cli-1.1.33-nvfshp5c.mjs +0 -6
  601. package/dist/chunks/cli-1.1.33-p0fb1k1s.mjs +0 -7
  602. package/dist/chunks/cli-1.1.33-pcsrkgrn.mjs +0 -8
  603. package/dist/chunks/cli-1.1.33-pw7bmns5.mjs +0 -42
  604. package/dist/chunks/cli-1.1.33-q8hq263y.mjs +0 -2
  605. package/dist/chunks/cli-1.1.33-qr675sx2.mjs +0 -2
  606. package/dist/chunks/cli-1.1.33-qss1gs3e.mjs +0 -2
  607. package/dist/chunks/cli-1.1.33-ra054vbq.mjs +0 -2
  608. package/dist/chunks/cli-1.1.33-raynjbkq.mjs +0 -2
  609. package/dist/chunks/cli-1.1.33-rr2q4wq6.mjs +0 -2
  610. package/dist/chunks/cli-1.1.33-rr5sxpa0.mjs +0 -2
  611. package/dist/chunks/cli-1.1.33-rrhe6g9q.mjs +0 -2
  612. package/dist/chunks/cli-1.1.33-rrvgm0jd.mjs +0 -2
  613. package/dist/chunks/cli-1.1.33-rtme70ck.mjs +0 -2
  614. package/dist/chunks/cli-1.1.33-rv2bkx6b.mjs +0 -2
  615. package/dist/chunks/cli-1.1.33-rxe1dmbg.mjs +0 -2
  616. package/dist/chunks/cli-1.1.33-s5kw6064.mjs +0 -3
  617. package/dist/chunks/cli-1.1.33-sbgh2rsy.mjs +0 -2
  618. package/dist/chunks/cli-1.1.33-sf95jk5d.mjs +0 -2
  619. package/dist/chunks/cli-1.1.33-sv5dwqh6.mjs +0 -3
  620. package/dist/chunks/cli-1.1.33-t0fg1hsr.mjs +0 -2
  621. package/dist/chunks/cli-1.1.33-t10xrxez.mjs +0 -2
  622. package/dist/chunks/cli-1.1.33-t26pazs8.mjs +0 -2
  623. package/dist/chunks/cli-1.1.33-t591k29k.mjs +0 -21
  624. package/dist/chunks/cli-1.1.33-t63yat1z.mjs +0 -2
  625. package/dist/chunks/cli-1.1.33-t78313g4.mjs +0 -3
  626. package/dist/chunks/cli-1.1.33-t8cxmf0c.mjs +0 -12
  627. package/dist/chunks/cli-1.1.33-tp6bhara.mjs +0 -4
  628. package/dist/chunks/cli-1.1.33-ts50d9at.mjs +0 -2
  629. package/dist/chunks/cli-1.1.33-ttc7emph.mjs +0 -25
  630. package/dist/chunks/cli-1.1.33-ty6y9kn2.mjs +0 -2
  631. package/dist/chunks/cli-1.1.33-v08vb0sv.mjs +0 -6
  632. package/dist/chunks/cli-1.1.33-v615gn7w.mjs +0 -3
  633. package/dist/chunks/cli-1.1.33-vgynvhys.mjs +0 -5491
  634. package/dist/chunks/cli-1.1.33-vr8cqqar.mjs +0 -2
  635. package/dist/chunks/cli-1.1.33-wfjtjsvq.mjs +0 -6
  636. package/dist/chunks/cli-1.1.33-wrdskpzf.mjs +0 -2
  637. package/dist/chunks/cli-1.1.33-wx8rtpc5.mjs +0 -2
  638. package/dist/chunks/cli-1.1.33-x6zgk4kb.mjs +0 -2
  639. package/dist/chunks/cli-1.1.33-xdqetcyr.mjs +0 -2
  640. package/dist/chunks/cli-1.1.33-xfawy00r.mjs +0 -2
  641. package/dist/chunks/cli-1.1.33-xt2ehzej.mjs +0 -2
  642. package/dist/chunks/cli-1.1.33-yd2b6czv.mjs +0 -2
  643. package/dist/chunks/cli-1.1.33-yd4xhx6x.mjs +0 -20
  644. package/dist/chunks/cli-1.1.33-ypfa1t3b.mjs +0 -2
  645. package/dist/chunks/cli-1.1.33-yqqr1e67.mjs +0 -2
  646. package/dist/chunks/cli-1.1.33-yqxphe1x.mjs +0 -2
  647. package/dist/chunks/cli-1.1.33-yy53bmhe.mjs +0 -2
  648. package/dist/chunks/cli-1.1.33-yygdy86h.mjs +0 -2
  649. package/dist/chunks/cli-1.1.33-z5rv4tr3.mjs +0 -3
  650. package/dist/chunks/cli-1.1.33-z7fa1fgt.mjs +0 -2
  651. package/dist/chunks/cli-1.1.33-zqqj4d1f.mjs +0 -2
  652. package/dist/chunks/cli-1.1.33-zsk851wd.mjs +0 -2
  653. package/dist/chunks/client-1.1.33-qhf9zz8n.mjs +0 -1
  654. package/dist/chunks/color-1.1.33-q69y353w.mjs +0 -1
  655. package/dist/chunks/compact-1.1.33-5vxewt1w.mjs +0 -2
  656. package/dist/chunks/config-1.1.33-h6tzt18x.mjs +0 -1
  657. package/dist/chunks/config-1.1.33-m6rgj5rq.mjs +0 -1
  658. package/dist/chunks/constants-1.1.33-myvdtn6q.mjs +0 -1
  659. package/dist/chunks/context-1.1.33-pm79kmgf.mjs +0 -1
  660. package/dist/chunks/context-noninteractive-1.1.33-6pd4by4q.mjs +0 -1
  661. package/dist/chunks/conversation-1.1.33-acjggjj2.mjs +0 -1
  662. package/dist/chunks/copilotHeaders-1.1.33-s1k9b90v.mjs +0 -1
  663. package/dist/chunks/copy-1.1.33-yynkyja4.mjs +0 -9
  664. package/dist/chunks/cost-1.1.33-sjebbq22.mjs +0 -1
  665. package/dist/chunks/createSession-1.1.33-cw4pppsw.mjs +0 -1
  666. package/dist/chunks/debug-1.1.33-h1ep6bea.mjs +0 -1
  667. package/dist/chunks/defaultActionDeps-1.1.33-t1wa4x2g.mjs +0 -1480
  668. package/dist/chunks/desktop-1.1.33-cgj2ar5t.mjs +0 -2
  669. package/dist/chunks/detectRepository-1.1.33-5yfd53ae.mjs +0 -1
  670. package/dist/chunks/detection-1.1.33-dnyn9hs6.mjs +0 -1
  671. package/dist/chunks/diff-1.1.33-nf6wy43p.mjs +0 -1
  672. package/dist/chunks/doctor-1.1.33-58atgaxs.mjs +0 -1
  673. package/dist/chunks/doctorDiagnostic-1.1.33-v3ht88pf.mjs +0 -1
  674. package/dist/chunks/earlyInput-1.1.33-qff3qk4b.mjs +0 -1
  675. package/dist/chunks/effort-1.1.33-nf63b81y.mjs +0 -13
  676. package/dist/chunks/engine-1.1.33-bqcqevb5.mjs +0 -1
  677. package/dist/chunks/envLessBridgeConfig-1.1.33-1bfctzjp.mjs +0 -1
  678. package/dist/chunks/envUtils-1.1.33-1jg5pqx5.mjs +0 -1
  679. package/dist/chunks/errors-1.1.33-xdf8frps.mjs +0 -1
  680. package/dist/chunks/exampleCommands-1.1.33-br81c33d.mjs +0 -1
  681. package/dist/chunks/execFileNoThrow-1.1.33-mmyfbtpt.mjs +0 -1
  682. package/dist/chunks/exit-1.1.33-s8c549bt.mjs +0 -1
  683. package/dist/chunks/explorer-1.1.33-q2kc2yjm.mjs +0 -1
  684. package/dist/chunks/export-1.1.33-wzsrmyr9.mjs +0 -2
  685. package/dist/chunks/fast-1.1.33-hh2t95cz.mjs +0 -1
  686. package/dist/chunks/feedback-1.1.33-fhamzkxx.mjs +0 -16
  687. package/dist/chunks/git-1.1.33-nb9mf6gs.mjs +0 -1
  688. package/dist/chunks/githubModelsCredentials-1.1.33-zzecd9we.mjs +0 -1
  689. package/dist/chunks/goal-1.1.33-6ptfsbeb.mjs +0 -4
  690. package/dist/chunks/headless-1.1.33-2ks3qpn2.mjs +0 -2
  691. package/dist/chunks/heapdump-1.1.33-48a71a5d.mjs +0 -6
  692. package/dist/chunks/help-1.1.33-65k2zqsp.mjs +0 -1
  693. package/dist/chunks/hooks-1.1.33-7zb4rp07.mjs +0 -1
  694. package/dist/chunks/hooks-1.1.33-87w55gzt.mjs +0 -79
  695. package/dist/chunks/ide-1.1.33-jpbj91cb.mjs +0 -3
  696. package/dist/chunks/image-processor-napi-1.1.33-cb605b4s.mjs +0 -1
  697. package/dist/chunks/import-1.1.33-9vq41kwx.mjs +0 -261
  698. package/dist/chunks/inboundAttachments-1.1.33-pshb9f55.mjs +0 -1
  699. package/dist/chunks/index-1.1.33-0szd959f.mjs +0 -9
  700. package/dist/chunks/index-1.1.33-1cyg72cg.mjs +0 -5
  701. package/dist/chunks/index-1.1.33-20n0wyay.mjs +0 -2
  702. package/dist/chunks/index-1.1.33-37m0wr5f.mjs +0 -1
  703. package/dist/chunks/index-1.1.33-4e6weswv.mjs +0 -2
  704. package/dist/chunks/index-1.1.33-5at6jw86.mjs +0 -9
  705. package/dist/chunks/index-1.1.33-5bb2bqbt.mjs +0 -1
  706. package/dist/chunks/index-1.1.33-6r4xb4kw.mjs +0 -1
  707. package/dist/chunks/index-1.1.33-809kmg0e.mjs +0 -1
  708. package/dist/chunks/index-1.1.33-av56945n.mjs +0 -1
  709. package/dist/chunks/index-1.1.33-ayj1khn3.mjs +0 -1
  710. package/dist/chunks/index-1.1.33-d4h14a2g.mjs +0 -1
  711. package/dist/chunks/index-1.1.33-j01a41jn.mjs +0 -1
  712. package/dist/chunks/index-1.1.33-j3pffnmd.mjs +0 -30
  713. package/dist/chunks/index-1.1.33-nbb1jr6q.mjs +0 -23
  714. package/dist/chunks/index-1.1.33-pdret8nd.mjs +0 -1
  715. package/dist/chunks/index-1.1.33-px65xz19.mjs +0 -1
  716. package/dist/chunks/index-1.1.33-q02fr1yn.mjs +0 -1
  717. package/dist/chunks/index-1.1.33-qckmwfjb.mjs +0 -1
  718. package/dist/chunks/index-1.1.33-sj1fgs0b.mjs +0 -1
  719. package/dist/chunks/index-1.1.33-thfe8yxq.mjs +0 -1
  720. package/dist/chunks/index-1.1.33-vpdejaqk.mjs +0 -1
  721. package/dist/chunks/index-1.1.33-x6vn8g63.mjs +0 -1
  722. package/dist/chunks/init-1.1.33-8jzeqmrh.mjs +0 -2
  723. package/dist/chunks/initReplBridge-1.1.33-xhzad71d.mjs +0 -1
  724. package/dist/chunks/ink-1.1.33-8xkyvv5c.mjs +0 -1
  725. package/dist/chunks/insights-1.1.33-p2xfqqpr.mjs +0 -870
  726. package/dist/chunks/install-1.1.33-yddevjtj.mjs +0 -1
  727. package/dist/chunks/install-github-app-1.1.33-3wksmje2.mjs +0 -149
  728. package/dist/chunks/install-slack-app-1.1.33-mgb365bd.mjs +0 -1
  729. package/dist/chunks/interactiveHelpers-1.1.33-ac7wkzh0.mjs +0 -1
  730. package/dist/chunks/keybindings-1.1.33-pwx8bd0q.mjs +0 -2
  731. package/dist/chunks/latestVersionCache-1.1.33-fqw2q9w0.mjs +0 -1
  732. package/dist/chunks/loadAgentsDir-1.1.33-y4yydpcn.mjs +0 -1
  733. package/dist/chunks/loadPluginHooks-1.1.33-3rxrvf8b.mjs +0 -1
  734. package/dist/chunks/log-1.1.33-pqjf8wsv.mjs +0 -1
  735. package/dist/chunks/main-1.1.33-qvas86jh.mjs +0 -1
  736. package/dist/chunks/managedEnv-1.1.33-67fc5dj7.mjs +0 -1
  737. package/dist/chunks/mcp-1.1.33-88w7d35a.mjs +0 -1
  738. package/dist/chunks/mcp-1.1.33-ewqaq0ms.mjs +0 -4
  739. package/dist/chunks/mcp-1.1.33-v74knj3c.mjs +0 -17
  740. package/dist/chunks/mcpb-1.1.33-dnjbpy7e.mjs +0 -1
  741. package/dist/chunks/memory-1.1.33-9qffk96q.mjs +0 -128
  742. package/dist/chunks/model-1.1.33-h0mjh5z8.mjs +0 -1
  743. package/dist/chunks/model-1.1.33-v4vqzg9w.mjs +0 -2
  744. package/dist/chunks/node-1.1.33-jm7rqpq8.mjs +0 -1
  745. package/dist/chunks/node-1.1.33-qg258pyx.mjs +0 -15
  746. package/dist/chunks/oauth-1.1.33-423q5vp6.mjs +0 -1
  747. package/dist/chunks/openaiShim-1.1.33-dsp1wwgs.mjs +0 -14
  748. package/dist/chunks/output-style-1.1.33-ayj4863v.mjs +0 -1
  749. package/dist/chunks/package-F6O7J2XI-1.1.33-cwk2kcw8.mjs +0 -1
  750. package/dist/chunks/permissions-1.1.33-mtca1vka.mjs +0 -1
  751. package/dist/chunks/permissions-1.1.33-qk86j364.mjs +0 -3
  752. package/dist/chunks/plan-1.1.33-brttkasm.mjs +0 -1
  753. package/dist/chunks/plist-1.1.33-j08fwnf5.mjs +0 -1
  754. package/dist/chunks/plugin-1.1.33-ed5352d9.mjs +0 -29
  755. package/dist/chunks/pluginStartupCheck-1.1.33-w1dcdv7e.mjs +0 -1
  756. package/dist/chunks/plugins-1.1.33-dz0szv60.mjs +0 -9
  757. package/dist/chunks/preActionHook-1.1.33-cyss3q48.mjs +0 -2
  758. package/dist/chunks/print-1.1.33-0an9v6wm.mjs +0 -57
  759. package/dist/chunks/process-1.1.33-34nr1vvf.mjs +0 -1
  760. package/dist/chunks/processBashCommand-1.1.33-c3baefbs.mjs +0 -1
  761. package/dist/chunks/processSlashCommand-1.1.33-7z1q5tgw.mjs +0 -9
  762. package/dist/chunks/prompt-1.1.33-a9nfj0nx.mjs +0 -1
  763. package/dist/chunks/prompt-1.1.33-t1x27qfd.mjs +0 -1
  764. package/dist/chunks/prompts-1.1.33-n8cpfrn6.mjs +0 -1
  765. package/dist/chunks/provider-1.1.33-s17k8dew.mjs +0 -2
  766. package/dist/chunks/providerProfiles-1.1.33-nabanrxj.mjs +0 -1
  767. package/dist/chunks/providerValidation-1.1.33-45rfx8mk.mjs +0 -6
  768. package/dist/chunks/registerSubcommands-1.1.33-drbt7d0n.mjs +0 -26
  769. package/dist/chunks/registry-1.1.33-2rc0g3js.mjs +0 -1
  770. package/dist/chunks/release-notes-1.1.33-azfdj96s.mjs +0 -5
  771. package/dist/chunks/reload-plugins-1.1.33-22m52m4k.mjs +0 -2
  772. package/dist/chunks/remote-env-1.1.33-2zxh4gns.mjs +0 -1
  773. package/dist/chunks/remoteBridgeCore-1.1.33-tvhbeebf.mjs +0 -1
  774. package/dist/chunks/rename-1.1.33-hh0a7vzm.mjs +0 -1
  775. package/dist/chunks/replLauncher-1.1.33-17gj37pg.mjs +0 -1
  776. package/dist/chunks/resume-1.1.33-cxjpjtfg.mjs +0 -2
  777. package/dist/chunks/rewind-1.1.33-gwyc73ty.mjs +0 -1
  778. package/dist/chunks/rootOptions-1.1.33-t9mmhhea.mjs +0 -1
  779. package/dist/chunks/runWorkflowHeadless-1.1.33-9e4hd973.mjs +0 -10
  780. package/dist/chunks/sandbox-adapter-1.1.33-ydzap1ky.mjs +0 -1
  781. package/dist/chunks/sandbox-toggle-1.1.33-vch1t63t.mjs +0 -1
  782. package/dist/chunks/session-1.1.33-aepc1jdx.mjs +0 -2
  783. package/dist/chunks/sessionStorage-1.1.33-170gteyg.mjs +0 -1
  784. package/dist/chunks/settings-1.1.33-16470dd7.mjs +0 -1
  785. package/dist/chunks/setup-1.1.33-nbfqv6x2.mjs +0 -12
  786. package/dist/chunks/sinks-1.1.33-8qav4btz.mjs +0 -1
  787. package/dist/chunks/skills-1.1.33-srydghps.mjs +0 -1
  788. package/dist/chunks/startupProfiler-1.1.33-a97fyetk.mjs +0 -1
  789. package/dist/chunks/startupUpdateCheck-1.1.33-n5x93kr9.mjs +0 -1
  790. package/dist/chunks/state-1.1.33-yr57kw5b.mjs +0 -1
  791. package/dist/chunks/stats-1.1.33-py9web9f.mjs +0 -1
  792. package/dist/chunks/status-1.1.33-rstx4c0p.mjs +0 -1
  793. package/dist/chunks/stickers-1.1.33-bag4g2g6.mjs +0 -1
  794. package/dist/chunks/subprocessEnv-1.1.33-k219nhcm.mjs +0 -1
  795. package/dist/chunks/tasks-1.1.33-170ayzks.mjs +0 -1
  796. package/dist/chunks/teamHelpers-1.1.33-d0etezah.mjs +0 -1
  797. package/dist/chunks/teammateModeSnapshot-1.1.33-wwj36vt2.mjs +0 -1
  798. package/dist/chunks/teleport-1.1.33-zvzb36mc.mjs +0 -1
  799. package/dist/chunks/terminalSetup-1.1.33-6btb4bdr.mjs +0 -1
  800. package/dist/chunks/theme-1.1.33-ht9yrvwn.mjs +0 -1
  801. package/dist/chunks/thinkback-1.1.33-kvaqf5ep.mjs +0 -1
  802. package/dist/chunks/thinkback-play-1.1.33-dfqez4t9.mjs +0 -1
  803. package/dist/chunks/toolPool-1.1.33-fsqgv07g.mjs +0 -1
  804. package/dist/chunks/toolSearch-1.1.33-g3ha7h5f.mjs +0 -1
  805. package/dist/chunks/tools-1.1.33-6qn3rfzr.mjs +0 -1
  806. package/dist/chunks/trustedDevice-1.1.33-f5feh965.mjs +0 -1
  807. package/dist/chunks/turndown.cjs-1.1.33-km66apwr.mjs +0 -69
  808. package/dist/chunks/types-1.1.33-bc49bs3y.mjs +0 -1
  809. package/dist/chunks/ultrareviewCommand-1.1.33-byqccwrh.mjs +0 -4
  810. package/dist/chunks/update-1.1.33-hz986n0w.mjs +0 -72
  811. package/dist/chunks/upload-1.1.33-cc27f6xm.mjs +0 -7
  812. package/dist/chunks/upstreamproxy-1.1.33-k5haaaqa.mjs +0 -14
  813. package/dist/chunks/usage-1.1.33-jspq6593.mjs +0 -1
  814. package/dist/chunks/util-1.1.33-8w7wsk2x.mjs +0 -1
  815. package/dist/chunks/utils-1.1.33-613tmzqb.mjs +0 -1
  816. package/dist/chunks/vim-1.1.33-gamhf412.mjs +0 -1
  817. package/dist/chunks/watchLoop-1.1.33-w4q3ncxj.mjs +0 -13
  818. package/dist/chunks/wiki-1.1.33-qgzy0eh8.mjs +0 -132
  819. package/dist/chunks/workflows-1.1.33-82kzthpb.mjs +0 -1
  820. package/dist/chunks/worktree-1.1.33-7n8nkfht.mjs +0 -1
  821. package/dist/chunks/worktreeModeEnabled-1.1.33-qq22bj1e.mjs +0 -1
  822. package/dist/chunks/wrapper-1.1.33-qgpy796k.mjs +0 -7
  823. /package/dist/chunks/{cli-1.1.33-kx980gfw.mjs → cli-1.1.34-0f5qa0q0.mjs} +0 -0
  824. /package/dist/chunks/{cli-1.1.33-5ff9vmz9.mjs → cli-1.1.34-1426jsf4.mjs} +0 -0
  825. /package/dist/chunks/{cli-1.1.33-xyh0vcv7.mjs → cli-1.1.34-6ndxsqp1.mjs} +0 -0
  826. /package/dist/chunks/{cli-1.1.33-f0vf76a6.mjs → cli-1.1.34-gmaedxb1.mjs} +0 -0
  827. /package/dist/chunks/{cli-1.1.33-1mfasbf1.mjs → cli-1.1.34-h9h6119y.mjs} +0 -0
@@ -1,203 +0,0 @@
1
- import{Fga as U6,Jga as wB}from"./cli-1.1.33-n2d1txyn.mjs";import{Rga as Uq,Sga as Q6,Tga as GN}from"./cli-1.1.33-zqqj4d1f.mjs";import{bha as IX,gha as Gw,hha as KB,jha as K,kha as s0,lha as I,mha as $2}from"./cli-1.1.33-f83qf2zv.mjs";import{Bha as Bz,Tha as DE,pha as r,rha as K1}from"./cli-1.1.33-3de2dtv6.mjs";import{Uha as mU,aia as wL,bia as uU}from"./cli-1.1.33-283f43sy.mjs";import{Aia as Tk,Bia as EW,Cia as jk,Fia as O7,Gia as m,Hia as q0,Iia as Eq,Jia as EL,Lia as L0,Mia as j1,Pia as N,Tia as z0,bja as P,eia as Q4,eja as b0,gia as cU,hia as Qq,iia as xk,jia as HW,kia as eO,lia as H$,mia as sz,nia as AW,oia as Bk,pia as K5,qia as TW,ria as NW,sia as Dk,tia as xW,uia as Ak,via as MW,wia as Jk,xia as z$,yia as q_,zia as PW}from"./cli-1.1.33-241y9eee.mjs";import{Aja as Vz,Cja as B0,Dja as a2,Gja as JG,Ija as i1,vja as a7}from"./cli-1.1.33-90w26xxw.mjs";import{Lja as Z0,Oja as e,Pja as aB,Qja as B6,Wja as i0}from"./cli-1.1.33-ad43mr1x.mjs";import{$la as tz,$na as GV,Ela as H5,Fla as BW,Hoa as QW,Ika as P1,Jka as P4,Qka as CW,Rka as wk,Rna as vq,Sla as B$,Tla as Z_,Tna as yq,Wla as n4,Xla as J$,Yla as Y$,Zla as oz,_la as G$,ala as Xq,ama as U5,ana as pG,bla as _k,bma as lW,cma as L$,dma as X_,foa as bB,fpa as x1,kla as Y5,koa as Gz,lla as VW,mla as qq,moa as Wz,nla as Mk,ola as OW,ona as xB,pla as Rk,pna as PB,qla as l4,qna as EB,rla as $$,rna as vB,sna as yB,tna as CB,una as T4,vna as SB,wla as kW,xla as Fk,yna as JV,zna as iB}from"./cli-1.1.33-87p06j57.mjs";import{Epa as c,Fpa as A1,gpa as J5,hpa as YW,qpa as _W,rpa as $k,spa as r0,tpa as c4,upa as wW,vpa as zk}from"./cli-1.1.33-5ehc9tkd.mjs";import{pqa as jE,qqa as y4,rqa as d,sqa as Kq,tqa as B,uqa as $0,vqa as L2,wqa as z2}from"./cli-1.1.33-cfj1bzen.mjs";var MQ=d((vE,_Q)=>{_Q.exports=zQ;zQ.sync=Rz;var BQ=$0("fs");function Mz(Z,X){var q=X.pathExt!==void 0?X.pathExt:process.env.PATHEXT;if(!q)return!0;if(q=q.split(";"),q.indexOf("")!==-1)return!0;for(var Q=0;Q<q.length;Q++){var $=q[Q].toLowerCase();if($&&Z.substr(-$.length).toLowerCase()===$)return!0}return!1}function LQ(Z,X,q){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return Mz(X,q)}function zQ(Z,X,q){BQ.stat(Z,function(Q,$){q(Q,Q?!1:LQ($,Z,X))})}function Rz(Z,X){return LQ(BQ.statSync(Z),Z,X)}});var TQ=d((yE,AQ)=>{AQ.exports=FQ;FQ.sync=Fz;var RQ=$0("fs");function FQ(Z,X,q){RQ.stat(Z,function(Q,$){q(Q,Q?!1:DQ($,X))})}function Fz(Z,X){return DQ(RQ.statSync(Z),X)}function DQ(Z,X){return Z.isFile()&&Dz(Z,X)}function Dz(Z,X){var{mode:q,uid:Q,gid:$}=Z,J=X.uid!==void 0?X.uid:process.getuid&&process.getuid(),Y=X.gid!==void 0?X.gid:process.getgid&&process.getgid(),H=parseInt("100",8),U=parseInt("010",8),G=parseInt("001",8),W=H|U,V=q&G||q&U&&$===Y||q&H&&Q===J||q&W&&J===0;return V}});var IQ=d((SE,jQ)=>{var CE=$0("fs"),d4;if(process.platform==="win32"||global.TESTING_WINDOWS)d4=MQ();else d4=TQ();jQ.exports=n5;n5.sync=Az;function n5(Z,X,q){if(typeof X==="function")q=X,X={};if(!q){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(Q,$){n5(Z,X||{},function(J,Y){if(J)$(J);else Q(Y)})})}d4(Z,X||{},function(Q,$){if(Q){if(Q.code==="EACCES"||X&&X.ignoreErrors)Q=null,$=!1}q(Q,$)})}function Az(Z,X){try{return d4.sync(Z,X||{})}catch(q){if(X&&X.ignoreErrors||q.code==="EACCES")return!1;else throw q}}});var EQ=d((bE,PQ)=>{var G2=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",wQ=$0("path"),Tz=G2?";":":",OQ=IQ(),kQ=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),NQ=(Z,X)=>{let q=X.colon||Tz,Q=Z.match(/\//)||G2&&Z.match(/\\/)?[""]:[...G2?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(q)],$=G2?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",J=G2?$.split(q):[""];if(G2){if(Z.indexOf(".")!==-1&&J[0]!=="")J.unshift("")}return{pathEnv:Q,pathExt:J,pathExtExe:$}},xQ=(Z,X,q)=>{if(typeof X==="function")q=X,X={};if(!X)X={};let{pathEnv:Q,pathExt:$,pathExtExe:J}=NQ(Z,X),Y=[],H=(G)=>new Promise((W,V)=>{if(G===Q.length)return X.all&&Y.length?W(Y):V(kQ(Z));let L=Q[G],z=/^".*"$/.test(L)?L.slice(1,-1):L,_=wQ.join(z,Z),M=!z&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+_:_;W(U(M,G,0))}),U=(G,W,V)=>new Promise((L,z)=>{if(V===$.length)return L(H(W+1));let _=$[V];OQ(G+_,{pathExt:J},(M,R)=>{if(!M&&R)if(X.all)Y.push(G+_);else return L(G+_);return L(U(G,W,V+1))})});return q?H(0).then((G)=>q(null,G),q):H(0)},jz=(Z,X)=>{X=X||{};let{pathEnv:q,pathExt:Q,pathExtExe:$}=NQ(Z,X),J=[];for(let Y=0;Y<q.length;Y++){let H=q[Y],U=/^".*"$/.test(H)?H.slice(1,-1):H,G=wQ.join(U,Z),W=!U&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+G:G;for(let V=0;V<Q.length;V++){let L=W+Q[V];try{if(OQ.sync(L,{pathExt:$}))if(X.all)J.push(L);else return L}catch(z){}}}if(X.all&&J.length)return J;if(X.nothrow)return null;throw kQ(Z)};PQ.exports=xQ;xQ.sync=jz});var yQ=d((hE,i5)=>{var vQ=(Z={})=>{let X=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(X).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"};i5.exports=vQ;i5.exports.default=vQ});var hQ=d((fE,bQ)=>{var CQ=$0("path"),Iz=EQ(),wz=yQ();function SQ(Z,X){let q=Z.options.env||process.env,Q=process.cwd(),$=Z.options.cwd!=null,J=$&&process.chdir!==void 0&&!process.chdir.disabled;if(J)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=Iz.sync(Z.command,{path:q[wz({env:q})],pathExt:X?CQ.delimiter:void 0})}catch(H){}finally{if(J)process.chdir(Q)}if(Y)Y=CQ.resolve($?Z.options.cwd:"",Y);return Y}function Oz(Z){return SQ(Z)||SQ(Z,!0)}bQ.exports=Oz});var fQ=d((xz,o5)=>{var a5=/([()\][%!^"`<>&|;, *?])/g;function kz(Z){return Z=Z.replace(a5,"^$1"),Z}function Nz(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(a5,"^$1"),X)Z=Z.replace(a5,"^$1");return Z}xz.command=kz;xz.argument=Nz});var mQ=d((gE,gQ)=>{gQ.exports=/^#!(.*)/});var pQ=d((mE,uQ)=>{var vz=mQ();uQ.exports=(Z="")=>{let X=Z.match(vz);if(!X)return null;let[q,Q]=X[0].replace(/#! ?/,"").split(" "),$=q.split("/").pop();if($==="env")return Q;return Q?`${$} ${Q}`:$}});var cQ=d((uE,dQ)=>{var s5=$0("fs"),yz=pQ();function Cz(Z){let q=Buffer.alloc(150),Q;try{Q=s5.openSync(Z,"r"),s5.readSync(Q,q,0,150,0),s5.closeSync(Q)}catch($){}return yz(q.toString())}dQ.exports=Cz});var aQ=d((pE,iQ)=>{var Sz=$0("path"),lQ=hQ(),nQ=fQ(),bz=cQ(),hz=process.platform==="win32",fz=/\.(?:com|exe)$/i,gz=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function mz(Z){Z.file=lQ(Z);let X=Z.file&&bz(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,lQ(Z);return Z.file}function uz(Z){if(!hz)return Z;let X=mz(Z),q=!fz.test(X);if(Z.options.forceShell||q){let Q=gz.test(X);Z.command=Sz.normalize(Z.command),Z.command=nQ.command(Z.command),Z.args=Z.args.map((J)=>nQ.argument(J,Q));let $=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${$}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function pz(Z,X,q){if(X&&!Array.isArray(X))q=X,X=null;X=X?X.slice(0):[],q=Object.assign({},q);let Q={command:Z,args:X,options:q,file:void 0,original:{command:Z,args:X}};return q.shell?Q:uz(Q)}iQ.exports=pz});var rQ=d((dE,sQ)=>{var r5=process.platform==="win32";function t5(Z,X){return Object.assign(Error(`${X} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${X} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function dz(Z,X){if(!r5)return;let q=Z.emit;Z.emit=function(Q,$){if(Q==="exit"){let J=oQ($,X);if(J)return q.call(Z,"error",J)}return q.apply(Z,arguments)}}function oQ(Z,X){if(r5&&Z===1&&!X.file)return t5(X.original,"spawn");return null}function cz(Z,X){if(r5&&Z===1&&!X.file)return t5(X.original,"spawnSync");return null}sQ.exports={hookChildProcess:dz,verifyENOENT:oQ,verifyENOENTSync:cz,notFoundError:t5}});var Z$=d((cE,W2)=>{var tQ=$0("child_process"),e5=aQ(),Z3=rQ();function eQ(Z,X,q){let Q=e5(Z,X,q),$=tQ.spawn(Q.command,Q.args,Q.options);return Z3.hookChildProcess($,Q),$}function lz(Z,X,q){let Q=e5(Z,X,q),$=tQ.spawnSync(Q.command,Q.args,Q.options);return $.error=$.error||Z3.verifyENOENTSync($.status,Q),$}W2.exports=eQ;W2.exports.spawn=eQ;W2.exports.sync=lz;W2.exports._parse=e5;W2.exports._enoent=Z3});var nz;var X$=B(()=>{nz=["off","compact","full"]});function w0(){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 iz(Z){return q$.includes(Z)}function az(Z){return Q$.includes(Z)}var v1,y1,q$,Q$;var z6=B(()=>{v1={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1};y1=w0(),q$=["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"];Q$=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"]});function rz(Z,X,q,Q){if(!r0(Z))return Z;X=n4(X,Z);var $=-1,J=X.length,Y=J-1,H=Z;while(H!=null&&++$<J){var U=Y$(X[$]),G=q;if(U==="__proto__"||U==="constructor"||U==="prototype")return Z;if($!=Y){var W=H[U];if(G=Q?Q(W,U,H):void 0,G===void 0)G=r0(W)?W:l4(X[$+1])?[]:{}}H$(H,U,G),H=H[U]}return Z}var K$;var U$=B(()=>{sz();J$();$$();c4();oz();K$=rz});function ez(Z,X,q){var Q=-1,$=X.length,J={};while(++Q<$){var Y=X[Q],H=G$(Z,Y);if(q(H,Y))K$(J,n4(Y,Z),H)}return J}var W$;var V$=B(()=>{tz();U$();J$();W$=ez});function Q_(Z,X){if(Z==null)return{};var q=B$(z$(Z),function(Q){return[Q]});return X=L$(X),W$(Z,q,function(Q,$){return X(Q,$[0])})}var X3;var _$=B(()=>{Z_();X_();V$();q_();X3=Q_});function M6(Z,X=!1){let q=Z.length,Q=0,$="",J=0,Y=16,H=0,U=0,G=0,W=0,V=0;function L(D,w){let T=0,j=0;while(T<D||!w){let A=Z.charCodeAt(Q);if(A>=48&&A<=57)j=j*16+A-48;else if(A>=65&&A<=70)j=j*16+A-65+10;else if(A>=97&&A<=102)j=j*16+A-97+10;else break;Q++,T++}if(T<D)j=-1;return j}function z(D){Q=D,$="",J=0,Y=16,V=0}function _(){let D=Q;if(Z.charCodeAt(Q)===48)Q++;else{Q++;while(Q<Z.length&&V2(Z.charCodeAt(Q)))Q++}if(Q<Z.length&&Z.charCodeAt(Q)===46)if(Q++,Q<Z.length&&V2(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&V2(Z.charCodeAt(Q)))Q++}else return V=3,Z.substring(D,Q);let w=Q;if(Q<Z.length&&(Z.charCodeAt(Q)===69||Z.charCodeAt(Q)===101)){if(Q++,Q<Z.length&&Z.charCodeAt(Q)===43||Z.charCodeAt(Q)===45)Q++;if(Q<Z.length&&V2(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&V2(Z.charCodeAt(Q)))Q++;w=Q}else V=3}return Z.substring(D,w)}function M(){let D="",w=Q;while(!0){if(Q>=q){D+=Z.substring(w,Q),V=2;break}let T=Z.charCodeAt(Q);if(T===34){D+=Z.substring(w,Q),Q++;break}if(T===92){if(D+=Z.substring(w,Q),Q++,Q>=q){V=2;break}switch(Z.charCodeAt(Q++)){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+=`
2
- `;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}w=Q;continue}if(T>=0&&T<=31)if(_6(T)){D+=Z.substring(w,Q),V=2;break}else V=6;Q++}return D}function R(){if($="",V=0,J=Q,U=H,W=G,Q>=q)return J=q,Y=17;let D=Z.charCodeAt(Q);if(q3(D)){do Q++,$+=String.fromCharCode(D),D=Z.charCodeAt(Q);while(q3(D));return Y=15}if(_6(D)){if(Q++,$+=String.fromCharCode(D),D===13&&Z.charCodeAt(Q)===10)Q++,$+=`
3
- `;return H++,G=Q,Y=14}switch(D){case 123:return Q++,Y=1;case 125:return Q++,Y=2;case 91:return Q++,Y=3;case 93:return Q++,Y=4;case 58:return Q++,Y=6;case 44:return Q++,Y=5;case 34:return Q++,$=M(),Y=10;case 47:let w=Q-1;if(Z.charCodeAt(Q+1)===47){Q+=2;while(Q<q){if(_6(Z.charCodeAt(Q)))break;Q++}return $=Z.substring(w,Q),Y=12}if(Z.charCodeAt(Q+1)===42){Q+=2;let T=q-1,j=!1;while(Q<T){let A=Z.charCodeAt(Q);if(A===42&&Z.charCodeAt(Q+1)===47){Q+=2,j=!0;break}if(Q++,_6(A)){if(A===13&&Z.charCodeAt(Q)===10)Q++;H++,G=Q}}if(!j)Q++,V=1;return $=Z.substring(w,Q),Y=13}return $+=String.fromCharCode(D),Q++,Y=16;case 45:if($+=String.fromCharCode(D),Q++,Q===q||!V2(Z.charCodeAt(Q)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return $+=_(),Y=11;default:while(Q<q&&F(D))Q++,D=Z.charCodeAt(Q);if(J!==Q){switch($=Z.substring(J,Q),$){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return $+=String.fromCharCode(D),Q++,Y=16}}function F(D){if(q3(D)||_6(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=R();while(D>=12&&D<=15);return D}return{setPosition:z,getPosition:()=>Q,scan:X?k:R,getToken:()=>Y,getTokenValue:()=>$,getTokenOffset:()=>J,getTokenLength:()=>Q-J,getTokenStartLine:()=>U,getTokenStartCharacter:()=>J-W,getTokenError:()=>V}}function q3(Z){return Z===32||Z===9}function _6(Z){return Z===10||Z===13}function V2(Z){return Z>=48&&Z<=57}var M$;var i4=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"})(M$||(M$={}))});var M0,Q3,R$;var F$=B(()=>{M0=Array(20).fill(0).map((Z,X)=>{return" ".repeat(X)}),Q3={" ":{"\n":Array(200).fill(0).map((Z,X)=>{return`
4
- `+" ".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+" ".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
5
- `+" ".repeat(X)})},"\t":{"\n":Array(200).fill(0).map((Z,X)=>{return`
6
- `+"\t".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+"\t".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
7
- `+"\t".repeat(X)})}},R$=[`
8
- `,"\r",`\r
9
- `]});function $3(Z,X,q){let Q,$,J,Y,H;if(X){Y=X.offset,H=Y+X.length,J=Y;while(J>0&&!R6(Z,J-1))J--;let T=H;while(T<Z.length&&!R6(Z,T))T++;$=Z.substring(J,T),Q=J_($,q)}else $=Z,Q=0,J=0,Y=0,H=Z.length;let U=Y_(q,Z),G=R$.includes(U),W=0,V=0,L;if(q.insertSpaces)L=M0[q.tabSize||4]??B2(M0[1],q.tabSize||4);else L="\t";let z=L==="\t"?"\t":" ",_=M6($,!1),M=!1;function R(){if(W>1)return B2(U,W)+B2(L,Q+V);let T=L.length*(Q+V);if(!G||T>Q3[z][U].length)return U+B2(L,Q+V);if(T<=0)return U;return Q3[z][U][T]}function F(){let T=_.scan();W=0;while(T===15||T===14){if(T===14&&q.keepLines)W+=1;else if(T===14)W=1;T=_.scan()}return M=T===16||_.getTokenError()!==0,T}let k=[];function D(T,j,A){if(!M&&(!X||j<H&&A>Y)&&Z.substring(j,A)!==T)k.push({offset:j,length:A-j,content:T})}let w=F();if(q.keepLines&&W>0)D(B2(U,W),0,0);if(w!==17){let T=_.getTokenOffset()+J,j=L.length*Q<20&&q.insertSpaces?M0[L.length*Q]:B2(L,Q);D(j,J,T)}while(w!==17){let T=_.getTokenOffset()+_.getTokenLength()+J,j=F(),A="",S=!1;while(W===0&&(j===12||j===13)){let x=_.getTokenOffset()+J;D(M0[1],T,x),T=_.getTokenOffset()+_.getTokenLength()+J,S=j===12,A=S?R():"",j=F()}if(j===2){if(w!==1)V--;if(q.keepLines&&W>0||!q.keepLines&&w!==1)A=R();else if(q.keepLines)A=M0[1]}else if(j===4){if(w!==3)V--;if(q.keepLines&&W>0||!q.keepLines&&w!==3)A=R();else if(q.keepLines)A=M0[1]}else{switch(w){case 3:case 1:if(V++,q.keepLines&&W>0||!q.keepLines)A=R();else A=M0[1];break;case 5:if(q.keepLines&&W>0||!q.keepLines)A=R();else A=M0[1];break;case 12:A=R();break;case 13:if(W>0)A=R();else if(!S)A=M0[1];break;case 6:if(q.keepLines&&W>0)A=R();else if(!S)A=M0[1];break;case 10:if(q.keepLines&&W>0)A=R();else if(j===6&&!S)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(q.keepLines&&W>0)A=R();else if((j===12||j===13)&&!S)A=M0[1];else if(j!==5&&j!==17)M=!0;break;case 16:M=!0;break}if(W>0&&(j===12||j===13))A=R()}if(j===17)if(q.keepLines&&W>0)A=R();else A=q.insertFinalNewline?U:"";let O=_.getTokenOffset()+J;D(A,T,O),w=j}return k}function B2(Z,X){let q="";for(let Q=0;Q<X;Q++)q+=Z;return q}function J_(Z,X){let q=0,Q=0,$=X.tabSize||4;while(q<Z.length){let J=Z.charAt(q);if(J===M0[1])Q++;else if(J==="\t")Q+=$;else break;q++}return Math.floor(Q/$)}function Y_(Z,X){for(let q=0;q<X.length;q++){let Q=X.charAt(q);if(Q==="\r"){if(q+1<X.length&&X.charAt(q+1)===`
10
- `)return`\r
11
- `;return"\r"}else if(Q===`
12
- `)return`
13
- `}return Z&&Z.eol||`
14
- `}function R6(Z,X){return`\r
15
- `.indexOf(Z.charAt(X))!==-1}var J3=B(()=>{i4();F$()});function D$(Z,X=[],q=F6.DEFAULT){let Q=null,$=[],J=[];function Y(U){if(Array.isArray($))$.push(U);else if(Q!==null)$[Q]=U}return H3(Z,{onObjectBegin:()=>{let U={};Y(U),J.push($),$=U,Q=null},onObjectProperty:(U)=>{Q=U},onObjectEnd:()=>{$=J.pop()},onArrayBegin:()=>{let U=[];Y(U),J.push($),$=U,Q=null},onArrayEnd:()=>{$=J.pop()},onLiteralValue:Y,onError:(U,G,W)=>{X.push({error:U,offset:G,length:W})}},q),$[0]}function Y3(Z,X=[],q=F6.DEFAULT){let Q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function $(U){if(Q.type==="property")Q.length=U-Q.offset,Q=Q.parent}function J(U){return Q.children.push(U),U}H3(Z,{onObjectBegin:(U)=>{Q=J({type:"object",offset:U,length:-1,parent:Q,children:[]})},onObjectProperty:(U,G,W)=>{Q=J({type:"property",offset:G,length:-1,parent:Q,children:[]}),Q.children.push({type:"string",value:U,offset:G,length:W,parent:Q})},onObjectEnd:(U,G)=>{$(U+G),Q.length=U+G-Q.offset,Q=Q.parent,$(U+G)},onArrayBegin:(U,G)=>{Q=J({type:"array",offset:U,length:-1,parent:Q,children:[]})},onArrayEnd:(U,G)=>{Q.length=U+G-Q.offset,Q=Q.parent,$(U+G)},onLiteralValue:(U,G,W)=>{J({type:K_(U),offset:G,length:W,parent:Q,value:U}),$(G+W)},onSeparator:(U,G,W)=>{if(Q.type==="property"){if(U===":")Q.colonOffset=G;else if(U===",")$(G)}},onError:(U,G,W)=>{X.push({error:U,offset:G,length:W})}},q);let H=Q.children[0];if(H)delete H.parent;return H}function a4(Z,X){if(!Z)return;let q=Z;for(let Q of X)if(typeof Q==="string"){if(q.type!=="object"||!Array.isArray(q.children))return;let $=!1;for(let J of q.children)if(Array.isArray(J.children)&&J.children[0].value===Q&&J.children.length===2){q=J.children[1],$=!0;break}if(!$)return}else{let $=Q;if(q.type!=="array"||$<0||!Array.isArray(q.children)||$>=q.children.length)return;q=q.children[$]}return q}function H3(Z,X,q=F6.DEFAULT){let Q=M6(Z,!1),$=[],J=0;function Y(v){return v?()=>J===0&&v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function H(v){return v?(y)=>J===0&&v(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function U(v){return v?(y)=>J===0&&v(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>$.slice()):()=>!0}function G(v){return v?()=>{if(J>0)J++;else if(v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>$.slice())===!1)J=1}:()=>!0}function W(v){return v?()=>{if(J>0)J--;if(J===0)v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter())}:()=>!0}let V=G(X.onObjectBegin),L=U(X.onObjectProperty),z=W(X.onObjectEnd),_=G(X.onArrayBegin),M=W(X.onArrayEnd),R=U(X.onLiteralValue),F=H(X.onSeparator),k=Y(X.onComment),D=H(X.onError),w=q&&q.disallowComments,T=q&&q.allowTrailingComma;function j(){while(!0){let v=Q.scan();switch(Q.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!w)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(v){case 12:case 13:if(w)A(10);else k();break;case 16:A(1);break;case 15:case 14:break;default:return v}}}function A(v,y=[],p=[]){if(D(v),y.length+p.length>0){let f=Q.getToken();while(f!==17){if(y.indexOf(f)!==-1){j();break}else if(p.indexOf(f)!==-1)break;f=j()}}}function S(v){let y=Q.getTokenValue();if(v)R(y);else L(y),$.push(y);return j(),!0}function O(){switch(Q.getToken()){case 11:let v=Q.getTokenValue(),y=Number(v);if(isNaN(y))A(2),y=0;R(y);break;case 7:R(null);break;case 8:R(!0);break;case 9:R(!1);break;default:return!1}return j(),!0}function x(){if(Q.getToken()!==10)return A(3,[],[2,5]),!1;if(S(!1),Q.getToken()===6){if(F(":"),j(),!i())A(4,[],[2,5])}else A(5,[],[2,5]);return $.pop(),!0}function E(){V(),j();let v=!1;while(Q.getToken()!==2&&Q.getToken()!==17){if(Q.getToken()===5){if(!v)A(4,[],[]);if(F(","),j(),Q.getToken()===2&&T)break}else if(v)A(6,[],[]);if(!x())A(4,[],[2,5]);v=!0}if(z(),Q.getToken()!==2)A(7,[2],[]);else j();return!0}function h(){_(),j();let v=!0,y=!1;while(Q.getToken()!==4&&Q.getToken()!==17){if(Q.getToken()===5){if(!y)A(4,[],[]);if(F(","),j(),Q.getToken()===4&&T)break}else if(y)A(6,[],[]);if(v)$.push(0),v=!1;else $[$.length-1]++;if(!i())A(4,[],[4,5]);y=!0}if(M(),!v)$.pop();if(Q.getToken()!==4)A(8,[4],[]);else j();return!0}function i(){switch(Q.getToken()){case 3:return h();case 1:return E();case 10:return S(!0);default:return O()}}if(j(),Q.getToken()===17){if(q.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!i())return A(4,[],[]),!1;if(Q.getToken()!==17)A(9,[],[]);return!0}function K_(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 F6;var K3=B(()=>{i4();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(F6||(F6={}))});function A$(Z,X,q,Q){let $=X.slice(),Y=Y3(Z,[]),H=void 0,U=void 0;while($.length>0)if(U=$.pop(),H=a4(Y,$),H===void 0&&q!==void 0)if(typeof U==="string")q={[U]:q};else q=[q];else break;if(!H){if(q===void 0)throw Error("Can not delete in empty document");return C1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(q)},Q)}else if(H.type==="object"&&typeof U==="string"&&Array.isArray(H.children)){let G=a4(H,[U]);if(G!==void 0)if(q===void 0){if(!G.parent)throw Error("Malformed AST");let W=H.children.indexOf(G.parent),V,L=G.parent.offset+G.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 C1(Z,{offset:V,length:L-V,content:""},Q)}else return C1(Z,{offset:G.offset,length:G.length,content:JSON.stringify(q)},Q);else{if(q===void 0)return[];let W=`${JSON.stringify(U)}: ${JSON.stringify(q)}`,V=Q.getInsertionIndex?Q.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 C1(Z,L,Q)}}else if(H.type==="array"&&typeof U==="number"&&Array.isArray(H.children)){let G=U;if(G===-1){let W=`${JSON.stringify(q)}`,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 C1(Z,V,Q)}else if(q===void 0&&H.children.length>=0){let W=U,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,M=H.offset+H.length;L={offset:_,length:M-2-_,content:""}}else L={offset:V.offset,length:H.children[W+1].offset-V.offset,content:""};return C1(Z,L,Q)}else if(q!==void 0){let W,V=`${JSON.stringify(q)}`;if(!Q.isArrayInsertion&&H.children.length>U){let L=H.children[U];W={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||U===0)W={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=U>H.children.length?H.children.length:U,z=H.children[L-1];W={offset:z.offset+z.length,length:0,content:","+V}}return C1(Z,W,Q)}else throw Error(`Can not ${q===void 0?"remove":Q.isArrayInsertion?"insert":"modify"} Array index ${G} as length is not sufficient`)}else throw Error(`Can not add ${typeof U!=="number"?"index":"property"} to parent of type ${H.type}`)}function C1(Z,X,q){if(!q.formattingOptions)return[X];let Q=o4(Z,X),$=X.offset,J=X.offset+X.content.length;if(X.length===0||X.content.length===0){while($>0&&!R6(Q,$-1))$--;while(J<Q.length&&!R6(Q,J))J++}let Y=$3(Q,{offset:$,length:J-$},{...q.formattingOptions,keepLines:!1});for(let U=Y.length-1;U>=0;U--){let G=Y[U];Q=o4(Q,G),$=Math.min($,G.offset),J=Math.max(J,G.offset+G.length),J+=G.content.length-G.length}let H=Z.length-(Q.length-J)-$;return[{offset:$,length:H,content:Q.substring($,J)}]}function o4(Z,X){return Z.substring(0,X.offset)+X.content+Z.substring(X.offset+X.length)}var T$=B(()=>{J3();K3()});function O$(Z,X,q,Q){return A$(Z,X,q,Q)}function k$(Z,X){let q=X.slice(0).sort(($,J)=>{let Y=$.offset-J.offset;if(Y===0)return $.length-J.length;return Y}),Q=Z.length;for(let $=q.length-1;$>=0;$--){let J=q[$];if(J.offset+J.length<=Q)Z=o4(Z,J);else throw Error("Overlapping edit");Q=J.offset}return Z}var j$,I$,U3,w$;var N$=B(()=>{J3();T$();i4();K3();(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"})(j$||(j$={}));(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"})(I$||(I$={}));U3=D$;(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"})(w$||(w$={}))});function R0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var D6=()=>{};import{tracingChannel as W_,channel as V_}from"node:diagnostics_channel";var K0,A6,B_,G3=()=>K0.hasSubscribers||A6.hasSubscribers,P$,x$,L_=(Z,X,q,Q)=>{typeof x$.emitWarning=="function"?x$.emitWarning(Z,X,q,Q):console.error(`[${q}] ${X}: ${Z}`)},z_=(Z)=>!P$.has(Z),L1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),E$=(Z)=>L1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?s4:null:null,s4,__=class Z{heap;length;static#q=!1;static create(X){let q=E$(X);if(!q)return[];Z.#q=!0;let Q=new Z(X,q);return Z.#q=!1,Q}constructor(X,q){if(!Z.#q)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new q(X),this.length=0}push(X){this.heap[this.length++]=X}pop(){return this.heap[--this.length]}},v$;var y$=B(()=>{K0=V_("lru-cache:metrics"),A6=W_("lru-cache"),B_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,P$=new Set,x$=typeof process=="object"&&process?process:{},s4=class extends Array{constructor(Z){super(Z),this.fill(0)}},v$=class Z{#q;#Q;#X;#Y;#K;#V;#A;#_;get perf(){return this.#_}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#T;#U;#J;#Z;#L;#M;#B;#G;#j;#W;#I;#w;#R;#F;#O;#h;#z;#v;static unsafeExposeInternals(X){return{starts:X.#w,ttls:X.#R,autopurgeTimers:X.#F,sizes:X.#I,keyMap:X.#U,keyList:X.#J,valList:X.#Z,next:X.#L,prev:X.#M,get head(){return X.#B},get tail(){return X.#G},free:X.#j,isBackgroundFetch:(q)=>X.#$(q),backgroundFetch:(q,Q,$,J)=>X.#m(q,Q,$,J),moveToTail:(q)=>X.#b(q),indexes:(q)=>X.#k(q),rindexes:(q)=>X.#N(q),isStale:(q)=>X.#D(q)}}get max(){return this.#q}get maxSize(){return this.#Q}get calculatedSize(){return this.#T}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#A}get dispose(){return this.#X}get onInsert(){return this.#Y}get disposeAfter(){return this.#K}constructor(X){let{max:q=0,ttl:Q,ttlResolution:$=1,ttlAutopurge:J,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:U,dispose:G,onInsert:W,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:z,maxSize:_=0,maxEntrySize:M=0,sizeCalculation:R,fetchMethod:F,memoMethod:k,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:j,ignoreFetchAbort:A,backgroundFetchSize:S=1,perf:O}=X;if(this.backgroundFetchSize=S,O!==void 0&&typeof O?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#_=O??B_,q!==0&&!L1(q))throw TypeError("max option must be a nonnegative integer");let x=q?E$(q):Array;if(!x)throw Error("invalid max value: "+q);if(this.#q=q,this.#Q=_,this.maxEntrySize=M||this.#Q,this.sizeCalculation=R,this.sizeCalculation){if(!this.#Q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(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.#U=new Map,this.#J=Array.from({length:q}).fill(void 0),this.#Z=Array.from({length:q}).fill(void 0),this.#L=new x(q),this.#M=new x(q),this.#B=0,this.#G=0,this.#j=__.create(q),this.#H=0,this.#T=0,typeof G=="function"&&(this.#X=G),typeof W=="function"&&(this.#Y=W),typeof V=="function"?(this.#K=V,this.#W=[]):(this.#K=void 0,this.#W=void 0),this.#O=!!this.#X,this.#v=!!this.#Y,this.#z=!!this.#K,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!z,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!j,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#Q!==0&&!L1(this.#Q))throw TypeError("maxSize must be a positive integer if specified");if(!L1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!U,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=L1($)||$===0?$:1,this.ttlAutopurge=!!J,this.ttl=Q||0,this.ttl){if(!L1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#q===0&&this.ttl===0&&this.#Q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#q&&!this.#Q){let E="LRU_CACHE_UNBOUNDED";z_(E)&&(P$.add(E),L_("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,Z))}}getRemainingTTL(X){return this.#U.has(X)?1/0:0}#u(){let X=new s4(this.#q),q=new s4(this.#q);this.#R=X,this.#w=q;let Q=this.ttlAutopurge?Array.from({length:this.#q}):void 0;this.#F=Q,this.#p=(U,G,W=this.#_.now())=>{q[U]=G!==0?W:0,X[U]=G,$(U,G)},this.#y=(U)=>{q[U]=X[U]!==0?this.#_.now():0,$(U,X[U])};let $=this.ttlAutopurge?(U,G)=>{if(Q?.[U]&&(clearTimeout(Q[U]),Q[U]=void 0),G&&G!==0&&Q){let W=setTimeout(()=>{this.#D(U)?(this.#x(this.#J[U],"expire"),Q[U]=void 0):$(U,H(U))},G+1);W.unref&&W.unref(),Q[U]=W}}:()=>{};this.#P=(U,G)=>{if(X[G]){let W=X[G],V=q[G];if(!W||!V)return;U.ttl=W,U.start=V,U.now=J||Y();let L=U.now-V;U.remainingTTL=W-L}};let J=0,Y=()=>{let U=this.#_.now();if(this.ttlResolution>0){J=U;let G=setTimeout(()=>J=0,this.ttlResolution);G.unref&&G.unref()}return U};this.getRemainingTTL=(U)=>{let G=this.#U.get(U);return G===void 0?0:H(G)};let H=(U)=>{let G=X[U],W=q[U];if(!G||!W)return 1/0;let V=(J||Y())-W;return G-V};this.#D=(U)=>{let G=q[U],W=X[U];return!!W&&!!G&&(J||Y())-G>W}}#y=()=>{};#P=()=>{};#p=()=>{};#D=()=>!1;#a(){let X=new s4(this.#q);this.#T=0,this.#I=X,this.#C=(q)=>{this.#T-=X[q],X[q]=0},this.#d=(q,Q,$,J)=>{if(!L1($)){if(this.#$(Q))return this.backgroundFetchSize;if(J){if(typeof J!="function")throw TypeError("sizeCalculation must be a function");if($=J(Q,q),!L1($))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 $},this.#f=(q,Q,$)=>{if(X[q]=Q,this.#Q){let J=this.#Q-X[q];for(;this.#T>J;)this.#g(!0)}this.#T+=X[q],$&&($.entrySize=Q,$.totalCalculatedSize=this.#T)}}#C=(X)=>{};#f=(X,q,Q)=>{};#d=(X,q,Q,$)=>{if(Q||$)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#G;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#B);)q=this.#M[q]}*#N({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#B;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#G);)q=this.#L[q]}#c(X){return X!==void 0&&this.#U.get(this.#J[X])===X}*entries(){for(let X of this.#k())this.#Z[X]!==void 0&&this.#J[X]!==void 0&&!this.#$(this.#Z[X])&&(yield[this.#J[X],this.#Z[X]])}*rentries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#J[X]!==void 0&&!this.#$(this.#Z[X])&&(yield[this.#J[X],this.#Z[X]])}*keys(){for(let X of this.#k()){let q=this.#J[X];q!==void 0&&!this.#$(this.#Z[X])&&(yield q)}}*rkeys(){for(let X of this.#N()){let q=this.#J[X];q!==void 0&&!this.#$(this.#Z[X])&&(yield q)}}*values(){for(let X of this.#k())this.#Z[X]!==void 0&&!this.#$(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#$(this.#Z[X])&&(yield this.#Z[X])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(X,q={}){for(let Q of this.#k()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;if(J!==void 0&&X(J,this.#J[Q],this))return this.#S(this.#J[Q],q)}}forEach(X,q=this){for(let Q of this.#k()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;J!==void 0&&X.call(q,J,this.#J[Q],this)}}rforEach(X,q=this){for(let Q of this.#N()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;J!==void 0&&X.call(q,J,this.#J[Q],this)}}purgeStale(){let X=!1;for(let q of this.#N({allowStale:!0}))this.#D(q)&&(this.#x(this.#J[q],"expire"),X=!0);return X}info(X){let q=this.#U.get(X);if(q===void 0)return;let Q=this.#Z[q],$=this.#$(Q)?Q.__staleWhileFetching:Q;if($===void 0)return;let J={value:$};if(this.#R&&this.#w){let Y=this.#R[q],H=this.#w[q];if(Y&&H){let U=Y-(this.#_.now()-H);J.ttl=U,J.start=Date.now()}}return this.#I&&(J.size=this.#I[q]),J}dump(){let X=[];for(let q of this.#k({allowStale:!0})){let Q=this.#J[q],$=this.#Z[q],J=this.#$($)?$.__staleWhileFetching:$;if(J===void 0||Q===void 0)continue;let Y={value:J};if(this.#R&&this.#w){Y.ttl=this.#R[q];let H=this.#_.now()-this.#w[q];Y.start=Math.floor(Date.now()-H)}this.#I&&(Y.size=this.#I[q]),X.unshift([Q,Y])}return X}load(X){this.clear();for(let[q,Q]of X){if(Q.start){let $=Date.now()-Q.start;Q.start=this.#_.now()-$}this.#E(q,Q.value,Q)}}set(X,q,Q={}){let{status:$=K0.hasSubscribers?{}:void 0}=Q;Q.status=$,$&&($.op="set",$.key=X,q!==void 0&&($.value=q),$.cache=this);let J=this.#E(X,q,Q);return $&&K0.hasSubscribers&&K0.publish($),J}#E(X,q,Q,$){let{ttl:J=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:U=this.sizeCalculation,status:G}=Q,W=this.#$(q);if(q===void 0)return G&&(G.set="deleted"),this.delete(X),this;let{noUpdateTTL:V=this.noUpdateTTL}=Q;G&&!W&&(G.value=q);let L=this.#d(X,q,Q.size||0,U,G);if(this.maxEntrySize&&L>this.maxEntrySize)return this.#x(X,"set"),G&&(G.set="miss",G.maxEntrySizeExceeded=!0),this;let z=this.#H===0?void 0:this.#U.get(X);if(z===void 0)z=this.#H===0?this.#G:this.#j.length!==0?this.#j.pop():this.#H===this.#q?this.#g(!1):this.#H,this.#J[z]=X,this.#Z[z]=q,this.#U.set(X,z),this.#L[this.#G]=z,this.#M[z]=this.#G,this.#G=z,this.#H++,this.#f(z,L,G),G&&(G.set="add"),V=!1,this.#v&&!W&&this.#Y?.(q,X,"add");else{this.#b(z);let _=this.#Z[z];if(q!==_){if(!H)if(this.#$(_)){_!==$&&_.__abortController.abort(Error("replaced"));let{__staleWhileFetching:M}=_;M!==void 0&&M!==q&&(this.#O&&this.#X?.(M,X,"set"),this.#z&&this.#W?.push([M,X,"set"]))}else this.#O&&this.#X?.(_,X,"set"),this.#z&&this.#W?.push([_,X,"set"]);if(this.#C(z),this.#f(z,L,G),this.#Z[z]=q,!W){let M=_&&this.#$(_)?_.__staleWhileFetching:_,R=M===void 0?"add":q!==M?"replace":"update";G&&(G.set=R,M!==void 0&&(G.oldValue=M)),this.#v&&this.onInsert?.(q,X,R)}}else W||(G&&(G.set="update"),this.#v&&this.onInsert?.(q,X,"update"))}if(J!==0&&!this.#R&&this.#u(),this.#R&&(V||this.#p(z,J,Y),G&&this.#P(G,z)),!H&&this.#z&&this.#W){let _=this.#W,M;for(;M=_?.shift();)this.#K?.(...M)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#g(!0),this.#$(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#z&&this.#W){let X=this.#W,q;for(;q=X?.shift();)this.#K?.(...q)}}}#g(X){let q=this.#B,Q=this.#J[q],$=this.#Z[q],J=this.#$($);J&&$.__abortController.abort(Error("evicted"));let Y=J?$.__staleWhileFetching:$;return(this.#O||this.#z)&&Y!==void 0&&(this.#O&&this.#X?.(Y,Q,"evict"),this.#z&&this.#W?.push([Y,Q,"evict"])),this.#C(q),this.#F?.[q]&&(clearTimeout(this.#F[q]),this.#F[q]=void 0),X&&(this.#J[q]=void 0,this.#Z[q]=void 0,this.#j.push(q)),this.#H===1?(this.#B=this.#G=0,this.#j.length=0):this.#B=this.#L[q],this.#U.delete(Q),this.#H--,q}has(X,q={}){let{status:Q=K0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="has",Q.key=X,Q.cache=this);let $=this.#o(X,q);return K0.hasSubscribers&&K0.publish(Q),$}#o(X,q={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:$}=q,J=this.#U.get(X);if(J!==void 0){let Y=this.#Z[J];if(this.#$(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D(J))$&&($.has="stale",this.#P($,J));else return Q&&this.#y(J),$&&($.has="hit",this.#P($,J)),!0}else $&&($.has="miss");return!1}peek(X,q={}){let{status:Q=G3()?{}:void 0}=q;Q&&(Q.op="peek",Q.key=X,Q.cache=this),q.status=Q;let $=this.#s(X,q);return K0.hasSubscribers&&K0.publish(Q),$}#s(X,q){let{status:Q,allowStale:$=this.allowStale}=q,J=this.#U.get(X);if(J===void 0||!$&&this.#D(J)){Q&&(Q.peek=J===void 0?"miss":"stale");return}let Y=this.#Z[J],H=this.#$(Y)?Y.__staleWhileFetching:Y;return Q&&(H!==void 0?(Q.peek="hit",Q.value=H):Q.peek="miss"),H}#m(X,q,Q,$){let J=q===void 0?void 0:this.#Z[q];if(this.#$(J))return J;let Y=new AbortController,{signal:H}=Q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let U={signal:Y.signal,options:Q,context:$},G=(M,R=!1)=>{let{aborted:F}=Y.signal,k=Q.ignoreFetchAbort&&M!==void 0,D=Q.ignoreFetchAbort||!!(Q.allowStaleOnFetchAbort&&M!==void 0);if(Q.status&&(F&&!R?(Q.status.fetchAborted=!0,Q.status.fetchError=Y.signal.reason,k&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),F&&!k&&!R)return V(Y.signal.reason,D);let w=z,T=this.#Z[q];return(T===z||T===void 0&&k&&R)&&(M===void 0?w.__staleWhileFetching!==void 0?this.#Z[q]=w.__staleWhileFetching:this.#x(X,"fetch"):(Q.status&&(Q.status.fetchUpdated=!0),this.#E(X,M,U.options,w))),M},W=(M)=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=M),V(M,!1)),V=(M,R)=>{let{aborted:F}=Y.signal,k=F&&Q.allowStaleOnFetchAbort,D=k||Q.allowStaleOnFetchRejection,w=D||Q.noDeleteOnFetchRejection,T=z;if(this.#Z[q]===z&&(!w||!R&&T.__staleWhileFetching===void 0?this.#x(X,"fetch"):k||(this.#Z[q]=T.__staleWhileFetching)),D)return Q.status&&T.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw M},L=(M,R)=>{let F=this.#V?.(X,J,U);Y.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(M(void 0),Q.allowStaleOnFetchAbort&&(M=(k)=>G(k,!0)))}),F&&F instanceof Promise?F.then((k)=>M(k===void 0?void 0:k),R):F!==void 0&&M(F)};Q.status&&(Q.status.fetchDispatched=!0);let z=new Promise(L).then(G,W),_=Object.assign(z,{__abortController:Y,__staleWhileFetching:J,__returned:void 0});return q===void 0?(this.#E(X,_,{...U.options,status:void 0}),q=this.#U.get(X)):this.#Z[q]=_,_}#$(X){if(!this.#h)return!1;let q=X;return!!q&&q instanceof Promise&&q.hasOwnProperty("__staleWhileFetching")&&q.__abortController instanceof AbortController}fetch(X,q={}){let Q=A6.hasSubscribers,{status:$=G3()?{}:void 0}=q;q.status=$,$&&q.context&&($.context=q.context);let J=this.#l(X,q);return $&&Q&&($.trace=!0,A6.tracePromise(()=>J,$).catch(()=>{})),J}async#l(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:J=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:U=0,sizeCalculation:G=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:z=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:M,forceRefresh:R=!1,status:F,signal:k}=q;if(F&&(F.op="fetch",F.key=X,R&&(F.forceRefresh=!0),F.cache=this),!this.#h)return F&&(F.fetch="get"),this.#S(X,{allowStale:Q,updateAgeOnGet:$,noDeleteOnStaleGet:J,status:F});let D={allowStale:Q,updateAgeOnGet:$,noDeleteOnStaleGet:J,ttl:Y,noDisposeOnSet:H,size:U,sizeCalculation:G,noUpdateTTL:W,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:_,ignoreFetchAbort:z,status:F,signal:k},w=this.#U.get(X);if(w===void 0){F&&(F.fetch="miss");let T=this.#m(X,w,D,M);return T.__returned=T}else{let T=this.#Z[w];if(this.#$(T)){let O=Q&&T.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",O&&(F.returnedStale=!0)),O?T.__staleWhileFetching:T.__returned=T}let j=this.#D(w);if(!R&&!j)return F&&(F.fetch="hit"),this.#b(w),$&&this.#y(w),F&&this.#P(F,w),T;let A=this.#m(X,w,D,M),S=A.__staleWhileFetching!==void 0&&Q;return F&&(F.fetch=j?"stale":"refresh",S&&j&&(F.returnedStale=!0)),S?A.__staleWhileFetching:A.__returned=A}}forceFetch(X,q={}){let Q=A6.hasSubscribers,{status:$=G3()?{}:void 0}=q;q.status=$,$&&q.context&&($.context=q.context);let J=this.#r(X,q);return $&&Q&&($.trace=!0,A6.tracePromise(()=>J,$).catch(()=>{})),J}async#r(X,q={}){let Q=await this.#l(X,q);if(Q===void 0)throw Error("fetch() returned undefined");return Q}memo(X,q={}){let{status:Q=K0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="memo",Q.key=X,q.context&&(Q.context=q.context),Q.cache=this);let $=this.#t(X,q);return Q&&(Q.value=$),K0.hasSubscribers&&K0.publish(Q),$}#t(X,q={}){let Q=this.#A;if(!Q)throw Error("no memoMethod provided to constructor");let{context:$,status:J,forceRefresh:Y,...H}=q;J&&Y&&(J.forceRefresh=!0);let U=this.#S(X,H),G=Y||U===void 0;if(J&&(J.memo=G?"miss":"hit",G||(J.value=U)),!G)return U;let W=Q(X,U,{options:H,context:$});return J&&(J.value=W),this.#E(X,W,H),W}get(X,q={}){let{status:Q=K0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="get",Q.key=X,Q.cache=this);let $=this.#S(X,q);return Q&&($!==void 0&&(Q.value=$),K0.hasSubscribers&&K0.publish(Q)),$}#S(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:J=this.noDeleteOnStaleGet,status:Y}=q,H=this.#U.get(X);if(H===void 0){Y&&(Y.get="miss");return}let U=this.#Z[H],G=this.#$(U);return Y&&this.#P(Y,H),this.#D(H)?G?(Y&&(Y.get="stale-fetching"),Q&&U.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),U.__staleWhileFetching):void 0):(J||this.#x(X,"expire"),Y&&(Y.get="stale"),Q?(Y&&(Y.returnedStale=!0),U):void 0):(Y&&(Y.get=G?"fetching":"hit"),this.#b(H),$&&this.#y(H),G?U.__staleWhileFetching:U)}#n(X,q){this.#M[q]=X,this.#L[X]=q}#b(X){X!==this.#G&&(X===this.#B?this.#B=this.#L[X]:this.#n(this.#M[X],this.#L[X]),this.#n(this.#G,X),this.#G=X)}delete(X){return this.#x(X,"delete")}#x(X,q){K0.hasSubscribers&&K0.publish({op:"delete",delete:q,key:X,cache:this});let Q=!1;if(this.#H!==0){let $=this.#U.get(X);if($!==void 0)if(this.#F?.[$]&&(clearTimeout(this.#F[$]),this.#F[$]=void 0),Q=!0,this.#H===1)this.#i(q);else{this.#C($);let J=this.#Z[$];if(this.#$(J)?J.__abortController.abort(Error("deleted")):(this.#O||this.#z)&&(this.#O&&this.#X?.(J,X,q),this.#z&&this.#W?.push([J,X,q])),this.#U.delete(X),this.#J[$]=void 0,this.#Z[$]=void 0,$===this.#G)this.#G=this.#M[$];else if($===this.#B)this.#B=this.#L[$];else{let Y=this.#M[$];this.#L[Y]=this.#L[$];let H=this.#L[$];this.#M[H]=this.#M[$]}this.#H--,this.#j.push($)}}if(this.#z&&this.#W?.length){let $=this.#W,J;for(;J=$?.shift();)this.#K?.(...J)}return Q}clear(){return this.#i("delete")}#i(X){for(let q of this.#N({allowStale:!0})){let Q=this.#Z[q];if(this.#$(Q))Q.__abortController.abort(Error("deleted"));else{let $=this.#J[q];this.#O&&this.#X?.(Q,$,X),this.#z&&this.#W?.push([Q,$,X])}}if(this.#U.clear(),this.#Z.fill(void 0),this.#J.fill(void 0),this.#R&&this.#w){this.#R.fill(0),this.#w.fill(0);for(let q of this.#F??[])q!==void 0&&clearTimeout(q);this.#F?.fill(void 0)}if(this.#I&&this.#I.fill(0),this.#B=0,this.#G=0,this.#j.length=0,this.#T=0,this.#H=0,this.#z&&this.#W){let q=this.#W,Q;for(;Q=q?.shift();)this.#K?.(...Q)}}}});function kv(Z,X=300000){let q=new Map,Q=new Map,$=async(...J)=>{let Y=m(J),H=q.get(Y),U=Date.now();if(!H){let G=Q.get(Y);if(G)return G;let W=Z(...J);Q.set(Y,W);try{let V=await W;if(Q.get(Y)===W)q.set(Y,{value:V,timestamp:U,refreshing:!1});return V}finally{if(Q.get(Y)===W)Q.delete(Y)}}if(H&&U-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let G=H;return Z(...J).then((W)=>{if(q.get(Y)===G)q.set(Y,{value:W,timestamp:Date.now(),refreshing:!1})}).catch((W)=>{if(g(W),q.get(Y)===G)q.delete(Y)}),H.value}return q.get(Y).value};return $.cache={clear:()=>{q.clear(),Q.clear()}},$}function z1(Z,X,q=100){let Q=new v$({max:q}),$=(...J)=>{let Y=X(...J),H=Q.get(Y);if(H!==void 0)return H;let U=Z(...J);return Q.set(Y,U),U};return $.cache={clear:()=>Q.clear(),size:()=>Q.size,delete:(J)=>Q.delete(J),get:(J)=>Q.peek(J),has:(J)=>Q.has(J)},$}var r4=B(()=>{y$();v0();L0()});import{open as M_,readFile as R_,stat as F_}from"fs/promises";function S$(Z,X){try{return{ok:!0,value:JSON.parse(R0(Z))}}catch(q){if(X)g(q);return{ok:!1}}}function Sv(Z){if(!Z)return null;try{return U3(R0(Z))}catch(X){return g(X),null}}function A_(Z){let X=b$,q=Z.length,Q=X(Z);if(!Q.error||Q.done||Q.read>=q)return Q.values;let{values:$,read:J}=Q;while(J<q){let Y=typeof Z==="string"?Z.indexOf(`
16
- `,J):Z.indexOf(10,J);if(Y===-1)break;J=Y+1;let H=X(Z,J);if(H.values.length>0)$=$.concat(H.values);if(!H.error||H.done||H.read>=q)break;J=H.read}return $}function T_(Z){let X=Z.length,q=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)q=3;let Q=[];while(q<X){let $=Z.indexOf(10,q);if($===-1)$=X;let J=Z.toString("utf8",q,$).trim();if(q=$+1,!J)continue;try{Q.push(JSON.parse(J))}catch{}}return Q}function j_(Z){let X=R0(Z),q=X.length,Q=0,$=[];while(Q<q){let J=X.indexOf(`
17
- `,Q);if(J===-1)J=q;let Y=X.substring(Q,J).trim();if(Q=J+1,!Y)continue;try{$.push(JSON.parse(Y))}catch{}}return $}function W3(Z){if(b$)return A_(Z);if(typeof Z==="string")return j_(Z);return T_(Z)}async function bv(Z){let H=[];try{let{size:X}=await F_(Z);if(X<=T6)return W3(await R_(Z));const q=L2(H,await M_(Z,"r"),1);let Q=Buffer.allocUnsafe(T6);let $=0;let J=X-T6;while($<T6){let{bytesRead:L}=await q.read(Q,$,T6-$,J+$);if(L===0)break;$+=L}let Y=Q.indexOf(10);if(Y!==-1&&Y<$-1)return W3(Q.subarray(Y+1,$));return W3(Q.subarray(0,$))}catch(U){var G=U,W=1}finally{var V=z2(H,G,W);V&&await V}}function hv(Z,X){try{if(!Z||Z.trim()==="")return m([X],null,4);let q=R0(Z),Q=U3(q);if(Array.isArray(Q)){let $=Q.length,H=O$(q,$===0?[0]:[$],X,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let U=[...Q,X];return m(U,null,4)}return k$(q,H)}else return m([X],null,4)}catch(q){return g(q),m([X],null,4)}}var D_=8192,C$,O0,b$,T6=104857600;var j6=B(()=>{N$();D6();v0();r4();L0();C$=z1(S$,(Z)=>Z,50),O0=Object.assign(function(X,q=!0){if(!X)return null;let Q=X.length>D_?S$(X,q):C$(X,q);return Q.ok?Q.value:null},{cache:C$.cache});b$=(()=>{if(typeof Bun>"u")return!1;let X=Bun.JSONL;if(!X?.parseChunk)return!1;return X.parseChunk})()});import{realpathSync as I_}from"fs";function h$(){return process.versions.bun!==void 0}function uv(){let Z=process.argv[1]||"";if(Z&&!w_.test(Z))return Z;let X=process.execPath||"";if(!X)return Z;try{return I_(X)}catch{return X}}function pv(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var w_;var f$=B(()=>{w_=/(^|[/\\])(\$bunfs|~BUN)[/\\]/i});function s(Z){if(typeof Z!=="object"||Z===null)return!1;let X=Object.getPrototypeOf(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var t0=()=>{};import{fileURLToPath as O_}from"node:url";var _2=(Z,X)=>{let q=B3(k_(Z));if(typeof q!=="string")throw TypeError(`${X} must be a string or a file URL: ${q}.`);return q},k_=(Z)=>V3(Z)?Z.toString():Z,V3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,B3=(Z)=>Z instanceof URL?O_(Z):Z;var M2=()=>{};var t4=(Z,X=[],q={})=>{let Q=_2(Z,"First argument"),[$,J]=s(X)?[[],X]:[X,q];if(!Array.isArray($))throw TypeError(`Second argument must be either an array of arguments or an options object: ${$}`);if($.some((U)=>typeof U==="object"&&U!==null))throw TypeError(`Second argument must be an array of strings: ${$}`);let Y=$.map(String),H=Y.find((U)=>U.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!s(J))throw TypeError(`Last argument must be an options object: ${J}`);return[Q,Y,{__proto__:null,...J}]};var L3=B(()=>{t0();M2()});import{StringDecoder as N_}from"node:string_decoder";var g$,m$=(Z)=>g$.call(Z)==="[object ArrayBuffer]",t=(Z)=>g$.call(Z)==="[object Uint8Array]",e0=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),x_,u$=(Z)=>x_.encode(Z),P_,e4=(Z)=>P_.decode(Z),p$=(Z,X)=>{return E_(Z,X).join("")},E_=(Z,X)=>{if(X==="utf8"&&Z.every((J)=>typeof J==="string"))return Z;let q=new N_(X),Q=Z.map((J)=>typeof J==="string"?u$(J):J).map((J)=>q.write(J)),$=q.end();return $===""?Q:[...Q,$]},I6=(Z)=>{if(Z.length===1&&t(Z[0]))return Z[0];return z3(v_(Z))},v_=(Z)=>Z.map((X)=>typeof X==="string"?u$(X):X),z3=(Z)=>{let X=new Uint8Array(y_(Z)),q=0;for(let Q of Z)X.set(Q,q),q+=Q.length;return X},y_=(Z)=>{let X=0;for(let q of Z)X+=q.length;return X};var F0=B(()=>{({toString:g$}=Object.prototype),x_=new TextEncoder,P_=new TextDecoder});import{ChildProcess as C_}from"node:child_process";var n$=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),i$=(Z,X)=>{let q=[];for(let[J,Y]of Z.entries())q=S_({templates:Z,expressions:X,tokens:q,index:J,template:Y});if(q.length===0)throw TypeError("Template script must not be empty");let[Q,...$]=q;return[Q,$,{}]},S_=({templates:Z,expressions:X,tokens:q,index:Q,template:$})=>{if($===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[Q]}`);let{nextTokens:J,leadingWhitespaces:Y,trailingWhitespaces:H}=b_($,Z.raw[Q]),U=c$(q,J,Y);if(Q===X.length)return U;let G=X[Q],W=Array.isArray(G)?G.map((V)=>l$(V)):[l$(G)];return c$(U,W,H)},b_=(Z,X)=>{if(X.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let q=[],Q=0,$=d$.has(X[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let U=X[H];if(d$.has(U)){if(Q!==Y)q.push(Z.slice(Q,Y));Q=Y+1}else if(U==="\\"){let G=X[H+1];if(G===`
18
- `)Y-=1,H+=1;else if(G==="u"&&X[H+2]==="{")H=X.indexOf("}",H+3);else H+=h_[G]??1}}let J=Q===Z.length;if(!J)q.push(Z.slice(Q));return{nextTokens:q,leadingWhitespaces:$,trailingWhitespaces:J}},d$,h_,c$=(Z,X,q)=>q||Z.length===0||X.length===0?[...Z,...X]:[...Z.slice(0,-1),`${Z.at(-1)}${X[0]}`,...X.slice(1)],l$=(Z)=>{let X=typeof Z;if(X==="string")return Z;if(X==="number")return String(Z);if(s(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return f_(Z);if(Z instanceof C_||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${X}" in template expression`)},f_=({stdout:Z})=>{if(typeof Z==="string")return Z;if(t(Z))return e4(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 a$=B(()=>{t0();F0();d$=new Set([" ","\t","\r",`
19
- `]),h_={x:3,u:5}});import _3 from"node:process";var y0=(Z)=>Z8.includes(Z),Z8,k0,X8=(Z)=>k0[Z]??`stdio[${Z}]`;var Z1=B(()=>{Z8=[_3.stdin,_3.stdout,_3.stderr],k0=["stdin","stdout","stderr"]});import{debuglog as g_}from"node:util";var s$=(Z)=>{let X={...Z};for(let q of F3)X[q]=M3(Z,q);return X},M3=(Z,X)=>{let q=m_(Z),Q=Array.from({length:q+1}),$=u_(Z[X],Q,X,q);return n_($,X)},m_=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,k0.length):k0.length,u_=(Z,X,q,Q)=>s(Z)?p_(Z,X,q,Q):X.fill(Z),p_=(Z,X,q,Q)=>{for(let $ of Object.keys(Z).sort(d_))for(let J of c_($,q,Q))X[J]=Z[$];return X},d_=(Z,X)=>o$(Z)<o$(X)?1:-1,o$=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},c_=(Z,X,q)=>{if(Z==="ipc")return[q];let Q=R3(Z);if(Q===void 0||Q===0)throw TypeError(`"${X}.${Z}" is invalid.
20
- It must be "${X}.stdout", "${X}.stderr", "${X}.all", "${X}.ipc", or "${X}.fd3", "${X}.fd4" (and so on).`);if(Q!=="all"&&Q>=q)throw TypeError(`"${X}.${Z}" is invalid: that file descriptor does not exist.
21
- Please set the "stdio" option to ensure that file descriptor exists.`);return Q==="all"?[1,2]:[Q]},R3=(Z)=>{if(Z==="all")return Z;if(k0.includes(Z))return k0.indexOf(Z);let X=l_.exec(Z);if(X!==null)return Number(X.groups.fdNumber)},l_,n_=(Z,X)=>Z.map((q)=>q===void 0?a_[X]:q),i_,a_,F3,X1=(Z,X)=>X==="ipc"?Z.at(-1):Z[X];var q1=B(()=>{t0();Z1();l_=/^fd(?<fdNumber>\d+)$/,i_=g_("execa").enabled?"full":"none",a_={lines:!1,buffer:!0,maxBuffer:1e8,verbose:i_,stripFinalNewline:!0},F3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var R2=({verbose:Z},X)=>D3(Z,X)!=="none",F2=({verbose:Z},X)=>!["none","short"].includes(D3(Z,X)),r$=({verbose:Z},X)=>{let q=D3(Z,X);return q8(q)?q:void 0},D3=(Z,X)=>X===void 0?o_(Z):X1(Z,X),o_=(Z)=>Z.find((X)=>q8(X))??Q8.findLast((X)=>Z.includes(X)),q8=(Z)=>typeof Z==="function",Q8;var _1=B(()=>{q1();Q8=["none","short","full"]});import{platform as s_}from"node:process";import{stripVTControlCharacters as r_}from"node:util";var t$=(Z,X)=>{let q=[Z,...X],Q=q.join(" "),$=q.map((J)=>QM(e$(J))).join(" ");return{command:Q,escapedCommand:$}},w6=(Z)=>r_(Z).split(`
22
- `).map((X)=>e$(X)).join(`
23
- `),e$=(Z)=>Z.replaceAll(ZM,(X)=>t_(X)),t_=(Z)=>{let X=XM[Z];if(X!==void 0)return X;let q=Z.codePointAt(0),Q=q.toString(16);return q<=qM?`\\u${Q.padStart(4,"0")}`:`\\U${Q}`},e_=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},ZM,XM,qM=65535,QM=(Z)=>{if($M.test(Z))return Z;return s_==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},$M;var $8=B(()=>{ZM=e_(),XM={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},$M=/^[\w\-./]+$/});import ZJ from"node:process";function A3(){let{env:Z}=ZJ,{TERM:X,TERM_PROGRAM:q}=Z;if(ZJ.platform!=="win32")return X!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||q==="Terminus-Sublime"||q==="vscode"||X==="xterm-256color"||X==="alacritty"||X==="rxvt-unicode"||X==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var XJ=()=>{};var qJ,QJ,JM,YM,HM,KM,UM,J8,_y;var $J=B(()=>{XJ();qJ={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:"╱"},QJ={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:"⅒"},JM={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"},YM={...qJ,...QJ},HM={...qJ,...JM},KM=A3(),UM=KM?YM:HM,J8=UM,_y=Object.entries(QJ)});import GM from"node:tty";var WM,C=(Z,X)=>{if(!WM)return($)=>$;let q=`\x1B[${Z}m`,Q=`\x1B[${X}m`;return($)=>{let J=$+"",Y=J.indexOf(Q);if(Y===-1)return q+J+Q;let H=q,U=0,W=(X===22?Q:"")+q;while(Y!==-1)H+=J.slice(U,Y)+W,U=Y+Q.length,Y=J.indexOf(Q,U);return H+=J.slice(U)+Q,H}},Fy,JJ,Dy,Ay,Ty,jy,Iy,wy,Oy,ky,Ny,xy,Py,Ey,vy,yy,Cy,Y8,Sy,by,hy,fy,gy,my,uy,py,dy,YJ,cy,HJ,ly,ny,iy,ay,oy,sy,ry,ty,ey,ZC,XC;var KJ=B(()=>{WM=GM?.WriteStream?.prototype?.hasColors?.()??!1,Fy=C(0,0),JJ=C(1,22),Dy=C(2,22),Ay=C(3,23),Ty=C(4,24),jy=C(53,55),Iy=C(7,27),wy=C(8,28),Oy=C(9,29),ky=C(30,39),Ny=C(31,39),xy=C(32,39),Py=C(33,39),Ey=C(34,39),vy=C(35,39),yy=C(36,39),Cy=C(37,39),Y8=C(90,39),Sy=C(40,49),by=C(41,49),hy=C(42,49),fy=C(43,49),gy=C(44,49),my=C(45,49),uy=C(46,49),py=C(47,49),dy=C(100,49),YJ=C(91,39),cy=C(92,39),HJ=C(93,39),ly=C(94,39),ny=C(95,39),iy=C(96,39),ay=C(97,39),oy=C(101,49),sy=C(102,49),ry=C(103,49),ty=C(104,49),ey=C(105,49),ZC=C(106,49),XC=C(107,49)});var UJ=B(()=>{KJ()});var VJ=({type:Z,message:X,timestamp:q,piped:Q,commandId:$,result:{failed:J=!1}={},options:{reject:Y=!0}})=>{let H=VM(q),U=BM[Z]({failed:J,reject:Y,piped:Q}),G=LM[Z]({reject:Y});return`${Y8(`[${H}]`)} ${Y8(`[${$}]`)} ${G(U)} ${G(X)}`},VM=(Z)=>`${H8(Z.getHours(),2)}:${H8(Z.getMinutes(),2)}:${H8(Z.getSeconds(),2)}.${H8(Z.getMilliseconds(),3)}`,H8=(Z,X)=>String(Z).padStart(X,"0"),GJ=({failed:Z,reject:X})=>{if(!Z)return J8.tick;return X?J8.cross:J8.warning},BM,WJ=(Z)=>Z,LM;var BJ=B(()=>{$J();UJ();BM={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:GJ,duration:GJ},LM={command:()=>JJ,output:()=>WJ,ipc:()=>WJ,error:({reject:Z})=>Z?YJ:HJ,duration:()=>Y8}});var LJ=(Z,X,q)=>{let Q=r$(X,q);return Z.map(({verboseLine:$,verboseObject:J})=>zM($,J,Q)).filter(($)=>$!==void 0).map(($)=>_M($)).join("")},zM=(Z,X,q)=>{if(q===void 0)return Z;let Q=q(Z,X);if(typeof Q==="string")return Q},_M=(Z)=>Z.endsWith(`
24
- `)?Z:`${Z}
25
- `;var zJ=B(()=>{_1()});import{inspect as MM}from"node:util";var p0=({type:Z,verboseMessage:X,fdNumber:q,verboseInfo:Q,result:$})=>{let J=RM({type:Z,result:$,verboseInfo:Q}),Y=FM(X,J),H=LJ(Y,Q,q);if(H!=="")console.warn(H.slice(0,-1))},RM=({type:Z,result:X,verboseInfo:q})=>{let{escapedCommand:Q,commandId:$,rawOptions:J}=q,{piped:Y=!1,...H}=J;return{type:Z,escapedCommand:Q,commandId:`${$}`,timestamp:new Date,piped:Y,result:X,options:H}},FM=(Z,X)=>Z.split(`
26
- `).map((q)=>DM({...X,message:q})),DM=(Z)=>{return{verboseLine:VJ(Z),verboseObject:Z}},K8=(Z)=>{let X=typeof Z==="string"?Z:MM(Z);return w6(X).replaceAll("\t",()=>" ".repeat(AM))},AM=2;var D2=B(()=>{$8();BJ();zJ()});var _J=(Z,X)=>{if(!R2(X))return;p0({type:"command",verboseMessage:Z,verboseInfo:X})};var MJ=B(()=>{_1();D2()});var RJ=(Z,X,q)=>{IM(Z);let Q=TM(Z);return{verbose:Z,escapedCommand:X,commandId:Q,rawOptions:q}},TM=(Z)=>R2({verbose:Z})?jM++:void 0,jM=0n,IM=(Z)=>{for(let X of Z){if(X===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(X===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!Q8.includes(X)&&!q8(X)){let q=Q8.map((Q)=>`'${Q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${X}. Allowed values are: ${q} or a function.`)}}};var FJ=B(()=>{_1()});import{hrtime as DJ}from"node:process";var U8=()=>DJ.bigint(),T3=(Z)=>Number(DJ.bigint()-Z)/1e6;var G8=()=>{};var W8=(Z,X,q)=>{let Q=U8(),{command:$,escapedCommand:J}=t$(Z,X),Y=M3(q,"verbose"),H=RJ(Y,J,{...q});return _J(J,H),{command:$,escapedCommand:J,startTime:Q,verboseInfo:H}};var j3=B(()=>{MJ();FJ();G8();$8();q1()});function V8(Z={}){let{env:X=process.env,platform:q=process.platform}=Z;if(q!=="win32")return"PATH";return Object.keys(X).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"}var AJ=()=>{};var TJ=()=>{};import{promisify as wM}from"node:util";import{execFile as OM,execFileSync as yC}from"node:child_process";import jJ from"node:path";import{fileURLToPath as kM}from"node:url";function B8(Z){return Z instanceof URL?kM(Z):Z}function IJ(Z){return{*[Symbol.iterator](){let X=jJ.resolve(B8(Z)),q;while(q!==X)yield X,q=X,X=jJ.resolve(X,"..")}}}var bC;var wJ=B(()=>{TJ();bC=wM(OM)});import L8 from"node:process";import S1 from"node:path";var NM=({cwd:Z=L8.cwd(),path:X=L8.env[V8()],preferLocal:q=!0,execPath:Q=L8.execPath,addExecPath:$=!0}={})=>{let J=S1.resolve(B8(Z)),Y=[],H=X.split(S1.delimiter);if(q)xM(Y,H,J);if($)PM(Y,H,Q,J);return X===""||X===S1.delimiter?`${Y.join(S1.delimiter)}${X}`:[...Y,X].join(S1.delimiter)},xM=(Z,X,q)=>{for(let Q of IJ(q)){let $=S1.join(Q,"node_modules/.bin");if(!X.includes($))Z.push($)}},PM=(Z,X,q,Q)=>{let $=S1.resolve(Q,B8(q),"..");if(!X.includes($))Z.push($)},OJ=({env:Z=L8.env,...X}={})=>{Z={...Z};let q=V8({env:Z});return X.path=Z[q],Z[q]=NM(X),Z};var kJ=B(()=>{AJ();wJ()});var NJ=(Z,X,q)=>{let Q=q?_8:z8,$=Z instanceof d0?{}:{cause:Z};return new Q(X,$)},d0,xJ=(Z,X)=>{Object.defineProperties(Z.prototype,{name:{value:X,writable:!0,enumerable:!1,configurable:!0},[EJ]:{value:!0,writable:!1,enumerable:!1,configurable:!1}})},PJ=(Z)=>M8(Z)&&(EJ in Z),EJ,M8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",z8,_8;var b1=B(()=>{d0=class d0 extends Error{};EJ=Symbol("isExecaError");z8=class z8 extends Error{};xJ(z8,z8.name);_8=class _8 extends Error{};xJ(_8,_8.name)});var vJ=()=>{let Z=I3-yJ+1;return Array.from({length:Z},EM)},EM=(Z,X)=>({name:`SIGRT${X+1}`,number:yJ+X,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),yJ=34,I3=64;var w3=()=>{};var CJ;var SJ=B(()=>{CJ=[{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 vM}from"node:os";var O3=()=>{let Z=vJ();return[...CJ,...Z].map(yM)},yM=({name:Z,number:X,description:q,action:Q,forced:$=!1,standard:J})=>{let{signals:{[Z]:Y}}=vM,H=Y!==void 0;return{name:Z,number:H?Y:X,description:q,supported:H,action:Q,forced:$,standard:J}};var bJ=B(()=>{SJ();w3()});import{constants as CM}from"node:os";var SM=()=>{let Z=O3();return Object.fromEntries(Z.map(bM))},bM=({name:Z,number:X,description:q,supported:Q,action:$,forced:J,standard:Y})=>[Z,{name:Z,number:X,description:q,supported:Q,action:$,forced:J,standard:Y}],hJ,hM=()=>{let Z=O3(),X=I3+1,q=Array.from({length:X},(Q,$)=>fM($,Z));return Object.assign({},...q)},fM=(Z,X)=>{let q=gM(Z,X);if(q===void 0)return{};let{name:Q,description:$,supported:J,action:Y,forced:H,standard:U}=q;return{[Z]:{name:Q,number:Z,description:$,supported:J,action:Y,forced:H,standard:U}}},gM=(Z,X)=>{let q=X.find(({name:Q})=>CM.signals[Q]===Z);if(q!==void 0)return q;return X.find((Q)=>Q.number===Z)},ZS;var fJ=B(()=>{w3();bJ();hJ=SM(),ZS=hM()});import{constants as O6}from"node:os";var mJ=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return pJ(Z,"option `killSignal`")},uJ=(Z)=>Z===0?Z:pJ(Z,"`subprocess.kill()`'s argument"),pJ=(Z,X)=>{if(Number.isInteger(Z))return mM(Z,X);if(typeof Z==="string")return pM(Z,X);throw TypeError(`Invalid ${X} ${String(Z)}: it must be a string or an integer.
27
- ${k3()}`)},mM=(Z,X)=>{if(gJ.has(Z))return gJ.get(Z);throw TypeError(`Invalid ${X} ${Z}: this signal integer does not exist.
28
- ${k3()}`)},uM=()=>new Map(Object.entries(O6.signals).reverse().map(([Z,X])=>[X,Z])),gJ,pM=(Z,X)=>{if(Z in O6.signals)return Z;if(Z.toUpperCase()in O6.signals)throw TypeError(`Invalid ${X} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${X} '${Z}': this signal name does not exist.
29
- ${k3()}`)},k3=()=>`Available signal names: ${dM()}.
30
- Available signal numbers: ${cM()}.`,dM=()=>Object.keys(O6.signals).sort().map((Z)=>`'${Z}'`).join(", "),cM=()=>[...new Set(Object.values(O6.signals).sort((Z,X)=>Z-X))].join(", "),R8=(Z)=>hJ[Z].description;var k6=B(()=>{fJ();gJ=uM()});import{setTimeout as lM}from"node:timers/promises";var dJ=(Z)=>{if(Z===!1)return Z;if(Z===!0)return nM;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},nM=5000,cJ=({kill:Z,options:{forceKillAfterDelay:X,killSignal:q},onInternalError:Q,context:$,controller:J},Y,H)=>{let{signal:U,error:G}=iM(Y,H,q);aM(G,Q);let W=Z(U);return oM({kill:Z,signal:U,forceKillAfterDelay:X,killSignal:q,killResult:W,context:$,controller:J}),W},iM=(Z,X,q)=>{let[Q=q,$]=M8(Z)?[void 0,Z]:[Z,X];if(typeof Q!=="string"&&!Number.isInteger(Q))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(Q)}`);if($!==void 0&&!M8($))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${$}`);return{signal:uJ(Q),error:$}},aM=(Z,X)=>{if(Z!==void 0)X.reject(Z)},oM=async({kill:Z,signal:X,forceKillAfterDelay:q,killSignal:Q,killResult:$,context:J,controller:Y})=>{if(X===Q&&$)N3({kill:Z,forceKillAfterDelay:q,context:J,controllerSignal:Y.signal})},N3=async({kill:Z,forceKillAfterDelay:X,context:q,controllerSignal:Q})=>{if(X===!1)return;try{if(await lM(X,void 0,{signal:Q}),Z("SIGKILL"))q.isForcefullyTerminated??=!0}catch{}};var F8=B(()=>{b1();k6()});import{once as sM}from"node:events";var D8=async(Z,X)=>{if(!Z.aborted)await sM(Z,"abort",{signal:X})};var x3=()=>{};var lJ=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},nJ=({kill:Z,cancelSignal:X,gracefulCancel:q,context:Q,controller:$})=>X===void 0||q?[]:[rM(Z,X,Q,$)],rM=async(Z,X,q,{signal:Q})=>{throw await D8(X,Q),q.terminationReason??="cancel",Z(),X.reason};var P3=B(()=>{x3()});var A2=({methodName:Z,isSubprocess:X,ipc:q,isConnected:Q})=>{tM(Z,X,q),E3(Z,X,Q)},tM=(Z,X,q)=>{if(!q)throw Error(`${C0(Z,X)} can only be used if the \`ipc\` option is \`true\`.`)},E3=(Z,X,q)=>{if(!q)throw Error(`${C0(Z,X)} cannot be used: the ${M1(X)} has already exited or disconnected.`)},iJ=(Z)=>{throw Error(`${C0("getOneMessage",Z)} could not complete: the ${M1(Z)} exited or disconnected.`)},aJ=(Z)=>{throw Error(`${C0("sendMessage",Z)} failed: the ${M1(Z)} is sending a message too, instead of listening to incoming messages.
31
- This can be fixed by both sending a message and listening to incoming messages at the same time:
32
-
33
- const [receivedMessage] = await Promise.all([
34
- ${C0("getOneMessage",Z)},
35
- ${C0("sendMessage",Z,"message, {strict: true}")},
36
- ]);`)},A8=(Z,X)=>Error(`${C0("sendMessage",X)} failed when sending an acknowledgment response to the ${M1(X)}.`,{cause:Z}),oJ=(Z)=>{throw Error(`${C0("sendMessage",Z)} failed: the ${M1(Z)} is not listening to incoming messages.`)},sJ=(Z)=>{throw Error(`${C0("sendMessage",Z)} failed: the ${M1(Z)} exited without listening to incoming messages.`)},rJ=()=>Error(`\`cancelSignal\` aborted: the ${M1(!0)} disconnected.`),tJ=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},eJ=({error:Z,methodName:X,isSubprocess:q})=>{if(Z.code==="EPIPE")throw Error(`${C0(X,q)} cannot be used: the ${M1(q)} is disconnecting.`,{cause:Z})},Z9=({error:Z,methodName:X,isSubprocess:q,message:Q})=>{if(eM(Z))throw Error(`${C0(X,q)}'s argument type is invalid: the message cannot be serialized: ${String(Q)}.`,{cause:Z})},eM=({code:Z,message:X})=>ZR.has(Z)||XR.some((q)=>X.includes(q)),ZR,XR,C0=(Z,X,q="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${qR(X)}${Z}(${q})`,qR=(Z)=>Z?"":"subprocess.",M1=(Z)=>Z?"parent process":"subprocess",T2=(Z)=>{if(Z.connected)Z.disconnect()};var j2=B(()=>{ZR=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),XR=["could not be cloned","circular structure","call stack size exceeded"]});var c0=()=>{let Z={},X=new Promise((q,Q)=>{Object.assign(Z,{resolve:q,reject:Q})});return Object.assign(X,Z)};var I2=()=>{};import{addAbortListener as QR}from"node:events";var h1=(Z,X,q)=>{let Q=Z.getMaxListeners();if(Q===0||Q===1/0)return;Z.setMaxListeners(Q+X),QR(q,()=>{Z.setMaxListeners(Z.getMaxListeners()-X)})};var T8=()=>{};var j8=(Z,X)=>{if(X)v3(Z)},v3=(Z)=>{Z.refCounted()},I8=(Z,X)=>{if(X)y3(Z)},y3=(Z)=>{Z.unrefCounted()},X9=(Z,X)=>{if(!X)return;y3(Z),y3(Z)},q9=(Z,X)=>{if(!X)return;v3(Z),v3(Z)};var N6=()=>{};import{once as $R}from"node:events";import{scheduler as JR}from"node:timers/promises";var Q9=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q},$)=>{if(H9($)||U9($))return;if(!w8.has(Z))w8.set(Z,[]);let J=w8.get(Z);if(J.push($),J.length>1)return;while(J.length>0){await K9(Z,Q,$),await JR.yield();let Y=await Y9({wrappedMessage:J[0],anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q});J.shift(),Q.emit("message",Y),Q.emit("message:done")}},$9=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q,boundOnMessage:$})=>{C3();let J=w8.get(Z);while(J?.length>0)await $R(Q,"message:done");Z.removeListener("message",$),q9(X,q),Q.connected=!1,Q.emit("disconnect")},w8;var J9=B(()=>{x6();N6();O8();k8();w8=new WeakMap});import{EventEmitter as YR}from"node:events";var R1=(Z,X,q)=>{if(N8.has(Z))return N8.get(Z);let Q=new YR;return Q.connected=!0,N8.set(Z,Q),HR({ipcEmitter:Q,anyProcess:Z,channel:X,isSubprocess:q}),Q},N8,HR=({ipcEmitter:Z,anyProcess:X,channel:q,isSubprocess:Q})=>{let $=Q9.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z});X.on("message",$),X.once("disconnect",$9.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z,boundOnMessage:$})),X9(q,Q)},x8=(Z)=>{let X=N8.get(Z);return X===void 0?Z.channel!==void 0&&Z.channel!==null:X.connected};var P6=B(()=>{J9();N6();N8=new WeakMap});import{once as KR}from"node:events";var G9=({anyProcess:Z,channel:X,isSubprocess:q,message:Q,strict:$})=>{if(!$)return Q;let J=R1(Z,X,q),Y=v8(Z,J);return{id:UR++,type:E8,message:Q,hasListeners:Y}},UR=0n,W9=(Z,X)=>{if(X?.type!==E8||X.hasListeners)return;for(let{id:q}of Z)if(q!==void 0)P8[q].resolve({isDeadlock:!0,hasListeners:!1})},Y9=async({wrappedMessage:Z,anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:$})=>{if(Z?.type!==E8||!X.connected)return Z;let{id:J,message:Y}=Z,H={id:J,type:B9,message:v8(X,$)};try{await w2({anyProcess:X,channel:q,isSubprocess:Q,ipc:!0},H)}catch(U){$.emit("strict:error",U)}return Y},H9=(Z)=>{if(Z?.type!==B9)return!1;let{id:X,message:q}=Z;return P8[X]?.resolve({isDeadlock:!1,hasListeners:q}),!0},V9=async(Z,X,q)=>{if(Z?.type!==E8)return;let Q=c0();P8[Z.id]=Q;let $=new AbortController;try{let{isDeadlock:J,hasListeners:Y}=await Promise.race([Q,GR(X,q,$)]);if(J)aJ(q);if(!Y)oJ(q)}finally{$.abort(),delete P8[Z.id]}},P8,GR=async(Z,X,{signal:q})=>{h1(Z,1,q),await KR(Z,"disconnect",{signal:q}),sJ(X)},E8="execa:ipc:request",B9="execa:ipc:response";var O8=B(()=>{I2();T8();E6();j2();P6();x6();P8={}});var z9=(Z,X,q)=>{if(!v6.has(Z))v6.set(Z,new Set);let Q=v6.get(Z),$=c0(),J=q?X.id:void 0,Y={onMessageSent:$,id:J};return Q.add(Y),{outgoingMessages:Q,outgoingMessage:Y}},_9=({outgoingMessages:Z,outgoingMessage:X})=>{Z.delete(X),X.onMessageSent.resolve()},K9=async(Z,X,q)=>{while(!v8(Z,X)&&v6.get(Z)?.size>0){let Q=[...v6.get(Z)];W9(Q,q),await Promise.all(Q.map(({onMessageSent:$})=>$))}},v6,M9,R9=(Z,X)=>{M9.set(Z,X)},v8=(Z,X)=>X.listenerCount("message")>WR(Z),WR=(Z)=>L9(Z)!==void 0&&!X1(L9(Z).buffer,"ipc")?1:0,L9=(Z)=>M9.get(Z);var x6=B(()=>{I2();q1();O8();v6=new WeakMap,M9=new WeakMap});import{promisify as VR}from"node:util";var w2=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},$,{strict:J=!1}={})=>{return A2({methodName:"sendMessage",isSubprocess:q,ipc:Q,isConnected:Z.connected}),BR({anyProcess:Z,channel:X,methodName:"sendMessage",isSubprocess:q,message:$,strict:J})},BR=async({anyProcess:Z,channel:X,methodName:q,isSubprocess:Q,message:$,strict:J})=>{let Y=G9({anyProcess:Z,channel:X,isSubprocess:Q,message:$,strict:J}),H=z9(Z,Y,J);try{await b3({anyProcess:Z,methodName:q,isSubprocess:Q,wrappedMessage:Y,message:$})}catch(U){throw T2(Z),U}finally{_9(H)}},b3=async({anyProcess:Z,methodName:X,isSubprocess:q,wrappedMessage:Q,message:$})=>{let J=LR(Z);try{await Promise.all([V9(Q,Z,q),J(Q)])}catch(Y){throw eJ({error:Y,methodName:X,isSubprocess:q}),Z9({error:Y,methodName:X,isSubprocess:q,message:$}),Y}},LR=(Z)=>{if(S3.has(Z))return S3.get(Z);let X=VR(Z.send.bind(Z));return S3.set(Z,X),X},S3;var E6=B(()=>{j2();x6();O8();S3=new WeakMap});import{scheduler as zR}from"node:timers/promises";var D9=(Z,X)=>{return E3("cancelSignal",!1,Z.connected),b3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:T9,message:X},message:X})},A9=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{return await _R({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q}),h3.signal},_R=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{if(F9)return;if(F9=!0,!Q){tJ();return}if(X===null){C3();return}R1(Z,X,q),await zR.yield()},F9=!1,U9=(Z)=>{if(Z?.type!==T9)return!1;return h3.abort(Z.message),!0},T9="execa:ipc:cancel",C3=()=>{h3.abort(rJ())},h3;var k8=B(()=>{E6();P6();j2();h3=new AbortController});var j9=({gracefulCancel:Z,cancelSignal:X,ipc:q,serialization:Q})=>{if(!Z)return;if(X===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!q)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(Q==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},I9=({subprocess:Z,kill:X,cancelSignal:q,gracefulCancel:Q,forceKillAfterDelay:$,context:J,controller:Y})=>Q?[MR({subprocess:Z,kill:X,cancelSignal:q,forceKillAfterDelay:$,context:J,controller:Y})]:[],MR=async({subprocess:Z,kill:X,cancelSignal:q,forceKillAfterDelay:Q,context:$,controller:{signal:J}})=>{await D8(q,J);let Y=RR(q);throw await D9(Z,Y),N3({kill:X,forceKillAfterDelay:Q,context:$,controllerSignal:J}),$.terminationReason??="gracefulCancel",q.reason},RR=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let X=Error(Z.message);return Object.defineProperty(X,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),X};var f3=B(()=>{x3();k8();F8()});import{setTimeout as FR}from"node:timers/promises";var w9=({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})`)},O9=(Z,X,q,Q)=>X===0||X===void 0?[]:[DR(Z,X,q,Q)],DR=async(Z,X,q,{signal:Q})=>{throw await FR(X,void 0,{signal:Q}),q.terminationReason??="timeout",Z(),new d0};var g3=B(()=>{b1()});import{execPath as AR,execArgv as TR}from"node:process";import k9 from"node:path";var N9=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},x9=(Z,X,{node:q=!1,nodePath:Q=AR,nodeOptions:$=TR.filter((U)=>!U.startsWith("--inspect")),cwd:J,execPath:Y,...H})=>{if(Y!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let U=_2(Q,'The "nodePath" option'),G=k9.resolve(J,U),W={__proto__:null,shell:!1,...H,nodePath:G,node:q,cwd:J};if(!q)return[Z,X,W];if(k9.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[G,[...$,Z,...X],{__proto__:null,ipc:!0,...W,shell:!1}]};var m3=B(()=>{M2()});import{serialize as jR}from"node:v8";var P9=({ipcInput:Z,ipc:X,serialization:q})=>{if(Z===void 0)return;if(!X)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");OR[q](Z)},IR=(Z)=>{try{jR(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:X})}},wR=(Z)=>{try{JSON.stringify(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:X})}},OR,E9=async(Z,X,q)=>{if(X===void 0)return;await w2({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:q},X)};var u3=B(()=>{E6();OR={advanced:IR,json:wR}});var y9=({encoding:Z})=>{if(p3.has(Z))return;let X=NR(Z);if(X!==void 0)throw TypeError(`Invalid option \`encoding: ${y8(Z)}\`.
37
- Please rename it to ${y8(X)}.`);let q=[...p3].map((Q)=>y8(Q)).join(", ");throw TypeError(`Invalid option \`encoding: ${y8(Z)}\`.
38
- Please rename it to one of: ${q}.`)},kR,D0,p3,NR=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let X=Z.toLowerCase();if(X in v9)return v9[X];if(p3.has(X))return X},v9,y8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var f1=B(()=>{kR=new Set(["utf8","utf16le"]),D0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),p3=kR.union(D0),v9={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import d3 from"node:fs";import C6 from"node:path";import y6 from"node:process";function ER(Z,X){if(typeof Z!=="string"||Z.length===0)throw TypeError("Expected a non-empty string.");let{cwd:q=y6.cwd(),path:Q=y6.env.PATH??(g1?y6.env.Path:void 0)??"",pathExt:$=y6.env.PATHEXT||PR}=X;return{cwd:q,searchPath:Q,pathExt:$}}function vR(Z,X){let q=X.split(C6.delimiter).filter(Boolean),Q=C6.extname(Z).toLowerCase();if(Q!==""&&q.some(($)=>$.toLowerCase()===Q))return["",...q];return q}function*yR(Z,{cwd:X,searchPath:q,pathExt:Q}){let $=g1?vR(Z,Q):[""];if(xR.test(Z)){let Y=C6.resolve(X,Z);for(let H of $)yield Y+H;return}let J=[...g1?[X]:[],...q.split(C6.delimiter)];for(let Y of J){let H=g1&&Y.length>1&&Y.startsWith('"')&&Y.endsWith('"')?Y.slice(1,-1):Y;if(H==="")continue;let U=C6.resolve(X,H,Z);for(let G of $)yield U+G}}function CR(Z){let X;try{X=d3.statSync(Z)}catch(q){return g1&&q.code==="EACCES"}if(!X.isFile())return!1;if(g1)return!0;try{return d3.accessSync(Z,d3.constants.X_OK),!0}catch{return!1}}function C8(Z,X={}){let q=ER(Z,X);for(let Q of yR(Z,q))if(CR(Q))return Q;return}var g1,xR,PR=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC";var C9=B(()=>{g1=y6.platform==="win32",xR=g1?/[\/\\]/v:/\//v});import{openSync as SR,readSync as bR,closeSync as hR}from"node:fs";import{Buffer as fR}from"node:buffer";import O2 from"node:path";import k2 from"node:process";var h9=(Z,X,q)=>{let Q={file:Z,commandArguments:[...X],options:q};if(q.shell||k2.platform!=="win32")return Q;return uR(Q)},gR,mR,uR=(Z)=>{let X=pR(Z);if(X!==void 0&&gR.test(X)){if(Z.options.argv0===void 0)Z.options.argv0=Z.file;return Z.file=X,Z}for(let Y of[Z.file,...Z.commandArguments])sR(Y);let q=X!==void 0&&mR.test(X),Q=c3(O2.normalize(X??Z.file)),$=Z.commandArguments.map((Y)=>eR(Y,q)),J=`"${[Q,...$].join(" ")}"`;return Z.options.windowsVerbatimArguments=!0,{file:k2.env.comspec||"cmd.exe",commandArguments:["/d","/s","/c",J],options:Z.options}},pR=(Z)=>{let X=S9(Z),q=X!==void 0&&nR(X);if(!q)return X;return Z.commandArguments.unshift(X),Z.file=q,S9(Z)},S9=(Z)=>{let X=Z.options.env||k2.env,q=Z.options.cwd??k2.cwd(),Q=S6(X,"PATHEXT"),$=O2.extname(Z.file),J=$===""?Q:`${$}${O2.delimiter}${Q??""}`;if(dR(Z.file))return C8(O2.resolve(q,Z.file),{cwd:q,pathExt:J});let Y=S6(X,"PATH")??S6(k2.env,"PATH")??"",H={cwd:q,path:Y,pathExt:J};return cR(X)?C8(Z.file,H):lR(Z.file,H)},dR=(Z)=>Z.includes("/")||Z.includes("\\")||Z.includes(":"),cR=(Z)=>S6(k2.env,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0&&S6(Z,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0,lR=(Z,{cwd:X,path:q,pathExt:Q})=>{for(let $ of q.split(O2.delimiter)){let J=$.length>1&&$.startsWith('"')&&$.endsWith('"')?$.slice(1,-1):$;if(J==="")continue;let Y=C8(O2.resolve(X,J,Z),{cwd:X,pathExt:Q});if(Y!==void 0)return Y}},S6=(Z,X)=>{let q=Object.keys(Z).sort().find((Q)=>Q.toUpperCase()===X);return q===void 0?void 0:Z[q]},b9=150,nR=(Z)=>{let X=fR.alloc(b9);try{let q=SR(Z,"r");try{bR(q,X,0,b9,0)}finally{hR(q)}}catch{return}return aR(X.toString())},iR,aR=(Z)=>{let X=Z.match(iR)?.groups.line.trim();if(!X)return;let[q,Q]=X.split(" "),$=q.split("/").at(-1);if($==="env")return Q;return Q?`${$} ${Q}`:$},oR,sR=(Z)=>{if(oR.test(Z))throw TypeError(`The command and its arguments cannot contain a line break on Windows without a shell.
39
- This would allow a command injection with \`cmd.exe\`.
40
- Invalid value: ${JSON.stringify(`${Z}`)}`)},rR,c3=(Z)=>Z.replaceAll(rR,"^$&"),tR,eR=(Z,X)=>{let q=`${Z}`.replaceAll(tR,($,J,Y)=>{let H=Y[J+$.length];return H==='"'||H===void 0?$.repeat(2):$}).replaceAll('"',"\\\""),Q=c3(`"${q}"`);return X?c3(Q):Q};var f9=B(()=>{C9();gR=/\.(?:com|exe)$/i,mR=/\.(?:bat|cmd)$/i,iR=/^#!(?<line>.*)/,oR=/[\n\r]/,rR=/[()\][%!^"`<>&|;, *?]/g,tR=/\\+/g});import{statSync as ZF}from"node:fs";import XF from"node:path";import qF from"node:process";var g9=(Z=m9())=>{let X=_2(Z,'The "cwd" option');return XF.resolve(X)},m9=()=>{try{return qF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
41
- ${Z.message}`,Z}},u9=(Z,X)=>{if(X===m9())return Z;let q;try{q=ZF(X)}catch(Q){return`The "cwd" option is invalid: ${X}.
42
- ${Q.message}
43
- ${Z}`}if(!q.isDirectory())return`The "cwd" option is not a directory: ${X}.
44
- ${Z}`;return Z};var l3=B(()=>{M2()});import QF from"node:path";import p9 from"node:process";var $F,S8=(Z,X,q)=>{let Q={__proto__:null,...q};Q.cwd=g9(Q.cwd);let[$,J,Y]=x9(Z,X,Q),H=s$(Y),U=JF(H);U.env=YF(U);let{file:G,commandArguments:W}=h9($,J,U);if(w9(U),y9(U),P9(U),lJ(U),j9(U),U.shell=B3(U.shell),U.killSignal=mJ(U.killSignal),U.forceKillAfterDelay=dJ(U.forceKillAfterDelay),U.lines=U.lines.map((V,L)=>V&&!D0.has(U.encoding)&&U.buffer[L]),p9.platform==="win32"&&$F.test(QF.basename(G)))W.unshift("/q");return{file:G,commandArguments:W,options:U}},JF=({extendEnv:Z=!0,preferLocal:X=!1,cwd:q,localDir:Q=q,encoding:$="utf8",reject:J=!0,cleanup:Y=!0,killDescendants:H=!1,all:U=!1,windowsHide:G=!0,killSignal:W="SIGTERM",forceKillAfterDelay:V=!0,gracefulCancel:L=!1,ipcInput:z,ipc:_=z!==void 0||L,serialization:M="advanced",...R})=>({__proto__:null,...R,extendEnv:Z,preferLocal:X,cwd:q,localDirectory:Q,encoding:$,reject:J,cleanup:Y,killDescendants:H,all:U,windowsHide:G,killSignal:W,forceKillAfterDelay:V,gracefulCancel:L,ipcInput:z,ipc:_,serialization:M}),YF=({env:Z,extendEnv:X,preferLocal:q,node:Q,localDirectory:$,nodePath:J})=>{let Y=X?{...p9.env,...Z}:Z;if(q||Q)return OJ({env:Y,cwd:$,execPath:J,preferLocal:q,addExecPath:Q});return Y};var n3=B(()=>{kJ();F8();k6();P3();f3();g3();m3();u3();f1();f9();l3();M2();q1();$F=/^cmd(?:\.exe)?$/i});var b8=(Z,X,q)=>q.shell&&X.length>0?[[Z,...X].join(" "),[],q]:[Z,X,q];var i3=()=>{};function N2(Z){if(typeof Z==="string")return HF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return KF(Z)}var HF=(Z)=>Z.at(-1)===d9?Z.slice(0,Z.at(-2)===c9?-2:-1):Z,KF=(Z)=>Z.at(-1)===UF?Z.subarray(0,Z.at(-2)===GF?-2:-1):Z,d9=`
45
- `,UF,c9="\r",GF;var a3=B(()=>{UF=d9.codePointAt(0),GF=c9.codePointAt(0)});function S0(Z,{checkOpen:X=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!X||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function o3(Z,{checkOpen:X=!0}={}){return S0(Z,{checkOpen:X})&&(Z.writable||!X)&&typeof Z.write==="function"&&typeof Z.end==="function"&&typeof Z.writable==="boolean"&&typeof Z.writableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function m1(Z,{checkOpen:X=!0}={}){return S0(Z,{checkOpen:X})&&(Z.readable||!X)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function s3(Z,X){return o3(Z,X)&&m1(Z,X)}var u1=()=>{};class l9{#q;#Q;#X=!1;#Y=void 0;constructor(Z,X){this.#q=Z,this.#Q=X}next(){let Z=()=>this.#K();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let X=()=>this.#V(Z);return this.#Y?this.#Y.then(X,X):X()}async#K(){if(this.#X)return{done:!0,value:void 0};let Z;try{Z=await this.#q.read()}catch(X){throw this.#Y=void 0,this.#X=!0,this.#q.releaseLock(),X}return Z.done&&(this.#Y=void 0,this.#X=!0,this.#q.releaseLock()),Z}async#V(Z){if(this.#X)return{done:!0,value:Z};if(this.#X=!0,!this.#Q){let X=this.#q.cancel(Z);return this.#q.releaseLock(),await X,{done:!0,value:Z}}return this.#q.releaseLock(),{done:!0,value:Z}}}function n9(){return this[r3].next()}function i9(Z){return this[r3].return(Z)}function t3({preventCancel:Z=!1}={}){let X=this.getReader(),q=new l9(X,Z),Q=Object.create(VF);return Q[r3]=q,Q}var WF,r3,VF;var a9=B(()=>{WF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);r3=Symbol();Object.defineProperty(n9,"name",{value:"next"});Object.defineProperty(i9,"name",{value:"return"});VF=Object.create(WF,{next:{enumerable:!0,configurable:!0,writable:!0,value:n9},return:{enumerable:!0,configurable:!0,writable:!0,value:i9}})});var o9=()=>{};var s9=B(()=>{a9();o9()});var r9=(Z)=>{if(m1(Z,{checkOpen:!1})&&b6.on!==void 0)return LF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(BF.call(Z)==="[object ReadableStream]")return t3.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},BF,LF=async function*(Z){let X=new AbortController,q={};zF(Z,X,q);try{for await(let[Q]of b6.on(Z,"data",{signal:X.signal}))yield Q}catch(Q){if(q.error!==void 0)throw q.error;else if(!X.signal.aborted)throw Q}finally{Z.destroy()}},zF=async(Z,X,q)=>{try{await b6.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(Q){q.error=Q}finally{X.abort()}},b6;var e3=B(()=>{u1();s9();({toString:BF}=Object.prototype),b6={}});var x2=async(Z,{init:X,convertChunk:q,getSize:Q,truncateChunk:$,addChunk:J,getFinalChunk:Y,finalize:H},{maxBuffer:U=Number.POSITIVE_INFINITY}={})=>{let G=r9(Z),W=X();W.length=0;try{for await(let V of G){let L=MF(V),z=q[L](V,W);ZY({convertedChunk:z,state:W,getSize:Q,truncateChunk:$,addChunk:J,maxBuffer:U})}return _F({state:W,convertChunk:q,getSize:Q,truncateChunk:$,addChunk:J,getFinalChunk:Y,maxBuffer:U}),H(W)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(W),L}},_F=({state:Z,getSize:X,truncateChunk:q,addChunk:Q,getFinalChunk:$,maxBuffer:J})=>{let Y=$(Z);if(Y!==void 0)ZY({convertedChunk:Y,state:Z,getSize:X,truncateChunk:q,addChunk:Q,maxBuffer:J})},ZY=({convertedChunk:Z,state:X,getSize:q,truncateChunk:Q,addChunk:$,maxBuffer:J})=>{let Y=q(Z),H=X.length+Y;if(H<=J){t9(Z,X,$,H);return}let U=Q(Z,J-X.length);if(U!==void 0)t9(U,X,$,J);throw new Q1},t9=(Z,X,q,Q)=>{X.contents=q(Z,X,Q),X.length=Q},MF=(Z)=>{let X=typeof Z;if(X==="string")return"string";if(X!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let q=e9.call(Z);if(q==="[object ArrayBuffer]")return"arrayBuffer";if(q==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&e9.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},e9,Q1;var h6=B(()=>{e3();({toString:e9}=Object.prototype);Q1=class Q1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var $1=(Z)=>Z,f6=()=>{return},h8=({contents:Z})=>Z,f8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},g8=(Z)=>Z.length;var m8=()=>{};async function u8(Z,X){return x2(Z,AF,X)}var RF=()=>({contents:[]}),FF=()=>1,DF=(Z,{contents:X})=>{return X.push(Z),X},AF;var XY=B(()=>{h6();m8();AF={init:RF,convertChunk:{string:$1,buffer:$1,arrayBuffer:$1,dataView:$1,typedArray:$1,others:$1},getSize:FF,truncateChunk:f6,addChunk:DF,getFinalChunk:f6,finalize:h8}});async function p8(Z,X){return x2(Z,PF,X)}var TF=()=>({contents:new ArrayBuffer(0)}),jF=(Z)=>IF.encode(Z),IF,qY=(Z)=>new Uint8Array(Z),QY=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),wF=(Z,X)=>Z.slice(0,X),OF=(Z,{contents:X,length:q},Q)=>{let $=YY()?NF(X,Q):kF(X,Q);return new Uint8Array($).set(Z,q),$},kF=(Z,X)=>{if(X<=Z.byteLength)return Z;let q=new ArrayBuffer(JY(X));return new Uint8Array(q).set(new Uint8Array(Z),0),q},NF=(Z,X)=>{if(X<=Z.maxByteLength)return Z.resize(X),Z;let q=new ArrayBuffer(X,{maxByteLength:JY(X)});return new Uint8Array(q).set(new Uint8Array(Z),0),q},JY=(Z)=>$Y**Math.ceil(Math.log(Z)/Math.log($Y)),$Y=2,xF=({contents:Z,length:X})=>YY()?Z:Z.slice(0,X),YY=()=>("resize"in ArrayBuffer.prototype),PF;var HY=B(()=>{h6();m8();IF=new TextEncoder,PF={init:TF,convertChunk:{string:jF,buffer:qY,arrayBuffer:qY,dataView:QY,typedArray:QY,others:f8},getSize:g8,truncateChunk:wF,addChunk:OF,getFinalChunk:f6,finalize:xF}});async function c8(Z,X){return x2(Z,SF,X)}var EF=()=>({contents:"",textDecoder:new TextDecoder}),d8=(Z,{textDecoder:X})=>X.decode(Z,{stream:!0}),vF=(Z,{contents:X})=>X+Z,yF=(Z,X)=>Z.slice(0,X),CF=({textDecoder:Z})=>{let X=Z.decode();return X===""?void 0:X},SF;var KY=B(()=>{h6();m8();SF={init:EF,convertChunk:{string:$1,buffer:d8,arrayBuffer:d8,dataView:d8,typedArray:d8,others:f8},getSize:g8,truncateChunk:yF,addChunk:vF,getFinalChunk:CF,finalize:h8}});var UY=B(()=>{XY();HY();KY();h6()});import{on as bF}from"node:events";import{finished as hF}from"node:stream/promises";var l8=B(()=>{e3();UY();Object.assign(b6,{on:bF,finished:hF})});var GY=({error:Z,stream:X,readableObjectMode:q,lines:Q,encoding:$,fdNumber:J})=>{if(!(Z instanceof Q1))throw Z;if(J==="all")return Z;let Y=fF(q,Q,$);throw Z.maxBufferInfo={fdNumber:J,unit:Y},X.destroy(),Z},fF=(Z,X,q)=>{if(Z)return"objects";if(X)return"lines";if(q==="buffer")return"bytes";return"characters"},WY=(Z,X,q)=>{if(X.length!==q)return;let Q=new Q1;throw Q.maxBufferInfo={fdNumber:"ipc"},Q},VY=(Z,X)=>{let{streamName:q,threshold:Q,unit:$}=gF(Z,X);return`Command's ${q} was larger than ${Q} ${$}`},gF=(Z,X)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:X[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:q,unit:Q}}=Z;delete Z.maxBufferInfo;let $=X1(X,q);if(q==="ipc")return{streamName:"IPC output",threshold:$,unit:"messages"};return{streamName:X8(q),threshold:$,unit:Q}},BY=(Z,X,q)=>Z?.code==="ENOBUFS"&&X!==null&&X.some((Q)=>Q!==null&&Q.length>n8(q)),LY=(Z,X,q)=>{if(!X)return Z;let Q=n8(q);return Z.length>Q?Z.slice(0,Q):Z},n8=([,Z])=>Z;var p1=B(()=>{l8();Z1();q1()});import{inspect as mF}from"node:util";var _Y=({stdio:Z,all:X,ipcOutput:q,originalError:Q,signal:$,signalDescription:J,exitCode:Y,escapedCommand:H,timedOut:U,isCanceled:G,isGracefullyCanceled:W,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_,maxBuffer:M,timeout:R,cwd:F})=>{let k=Q?.code,D=uF({originalError:Q,timedOut:U,timeout:R,isMaxBuffer:V,maxBuffer:M,errorCode:k,signal:$,signalDescription:J,exitCode:Y,isCanceled:G,isGracefullyCanceled:W,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_}),w=dF(Q,F),T=w===void 0?"":`
46
- ${w}`,j=`${D}: ${H}${T}`,A=X===void 0?[Z[2],Z[1]]:[X],S=[j,...A,...Z.slice(3),q.map((O)=>cF(O)).join(`
47
- `)].map((O)=>w6(N2(lF(O)))).filter(Boolean).join(`
48
-
49
- `);return{originalMessage:w,shortMessage:j,message:S}},uF=({originalError:Z,timedOut:X,timeout:q,isMaxBuffer:Q,maxBuffer:$,errorCode:J,signal:Y,signalDescription:H,exitCode:U,isCanceled:G,isGracefullyCanceled:W,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:z})=>{let _=pF(V,L);if(X)return`Command timed out after ${q} milliseconds${_}`;if(W){if(Y===void 0)return`Command was gracefully canceled with exit code ${U}`;return V?`Command was gracefully canceled${_}`:`Command was gracefully canceled with ${Y} (${H})`}if(G)return`Command was canceled${_}`;if(Q)return`${VY(Z,$)}${_}`;if(J!==void 0)return`Command failed with ${J}${_}`;if(V)return`Command was killed with ${z} (${R8(z)})${_}`;if(Y!==void 0)return`Command was killed with ${Y} (${H})`;if(U!==void 0)return`Command failed with exit code ${U}`;return"Command failed"},pF=(Z,X)=>Z?` and was forcefully terminated after ${X} milliseconds`:"",dF=(Z,X)=>{if(Z instanceof d0)return;let q=PJ(Z)?Z.originalMessage:String(Z?.message??Z),Q=w6(u9(q,X));return Q===""?void 0:Q},cF=(Z)=>typeof Z==="string"?Z:mF(Z),lF=(Z)=>Array.isArray(Z)?Z.map((X)=>N2(zY(X))).filter(Boolean).join(`
50
- `):zY(Z),zY=(Z)=>{if(typeof Z==="string")return Z;if(t(Z))return e4(Z);return""};var MY=B(()=>{a3();F0();l3();$8();p1();k6();b1()});var i8=({command:Z,escapedCommand:X,stdio:q,all:Q,ipcOutput:$,options:{cwd:J},startTime:Y})=>RY({command:Z,escapedCommand:X,cwd:J,durationMs:T3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:q[1],stderr:q[2],all:Q,stdio:q,ipcOutput:$,pipedFrom:[]}),P2=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,isSync:Y})=>g6({error:Z,command:X,escapedCommand:q,startTime:J,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:Q.length}),ipcOutput:[],options:$,isSync:Y}),g6=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,stdio:V,all:L,ipcOutput:z,options:{timeoutDuration:_,timeout:M=_,forceKillAfterDelay:R,killSignal:F,cwd:k,maxBuffer:D},isSync:w})=>{let{exitCode:T,signal:j,signalDescription:A}=iF(G,W),{originalMessage:S,shortMessage:O,message:x}=_Y({stdio:V,all:L,ipcOutput:z,originalError:Z,signal:j,signalDescription:A,exitCode:T,escapedCommand:q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,forceKillAfterDelay:R,killSignal:F,maxBuffer:D,timeout:M,cwd:k}),E=NJ(Z,x,w);return Object.assign(E,nF({error:E,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:T,signal:j,signalDescription:A,stdio:V,all:L,ipcOutput:z,cwd:k,originalMessage:S,shortMessage:O})),E},nF=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,signalDescription:V,stdio:L,all:z,ipcOutput:_,cwd:M,originalMessage:R,shortMessage:F})=>RY({shortMessage:F,originalMessage:R,command:X,escapedCommand:q,cwd:M,durationMs:T3(Q),failed:!0,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isTerminated:W!==void 0,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:z,stdio:L,ipcOutput:_,pipedFrom:[]}),RY=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0)),iF=(Z,X)=>{let q=Z===null?void 0:Z,Q=X===null?void 0:X,$=Q===void 0?void 0:R8(X);return{exitCode:q,signal:Q,signalDescription:$}};var m6=B(()=>{k6();G8();b1();MY()});function aF(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(FY(Z*1000)%1000),nanoseconds:Math.trunc(FY(Z*1e6)%1000)}}function oF(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 ZZ(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return aF(Z);break}case"bigint":return oF(Z)}throw TypeError("Expected a finite number or bigint")}var FY=(Z)=>Number.isFinite(Z)?Z:0;var DY=()=>{};function XZ(Z,X){let q=typeof Z==="bigint";if(!q&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");X={...X};let Q=Z<0?"-":"";if(Z=Z<0?-Z:Z,X.colonNotation)X.compact=!1,X.formatSubMilliseconds=!1,X.separateMilliseconds=!1,X.verbose=!1;if(X.compact)X.unitCount=1,X.secondsDecimalDigits=0,X.millisecondsDecimalDigits=0;let $=[],J=(W,V)=>{let L=Math.floor(W*10**V+tF);return(Math.round(L)/10**V).toFixed(V)},Y=(W,V,L,z)=>{if(($.length===0||!X.colonNotation)&&sF(W)&&!(X.colonNotation&&L==="m"))return;if(z??=String(W),X.colonNotation){let _=z.includes(".")?z.split(".")[0].length:z.length,M=$.length>0?2:1;z="0".repeat(Math.max(0,M-_))+z}else z+=X.verbose?" "+rF(V,W):L;$.push(z)},H=ZZ(Z),U=BigInt(H.days);if(X.hideYearAndDays)Y(BigInt(U)*24n+BigInt(H.hours),"hour","h");else{if(X.hideYear)Y(U,"day","d");else Y(U/365n,"year","y"),Y(U%365n,"day","d");Y(Number(H.hours),"hour","h")}if(Y(Number(H.minutes),"minute","m"),!X.hideSeconds)if(X.separateMilliseconds||X.formatSubMilliseconds||!X.colonNotation&&Z<1000&&!X.subSecondsAsDecimals){let W=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),z=Number(H.nanoseconds);if(Y(W,"second","s"),X.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(z,"nanosecond","ns");else{let _=V+L/1000+z/1e6,M=typeof X.millisecondsDecimalDigits==="number"?X.millisecondsDecimalDigits:0,R=_>=1?Math.round(_):Math.ceil(_),F=M?_.toFixed(M):R;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let W=(q?Number(Z%eF):Z)/1000%60,V=typeof X.secondsDecimalDigits==="number"?X.secondsDecimalDigits:1,L=J(W,V),z=X.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(z),"second","s",z)}if($.length===0)return Q+"0"+(X.verbose?" milliseconds":"ms");let G=X.colonNotation?":":" ";if(typeof X.unitCount==="number")$=$.slice(0,Math.max(X.unitCount,1));return Q+$.join(G)}var sF=(Z)=>Z===0||Z===0n,rF=(Z,X)=>X===1||X===1n?Z:`${Z}s`,tF=0.0000001,eF;var AY=B(()=>{DY();eF=24n*60n*60n*1000n});var TY=(Z,X)=>{if(Z.failed)p0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:X,result:Z})};var jY=B(()=>{D2()});var IY=(Z,X)=>{if(!R2(X))return;TY(Z,X),ZD(Z,X)},ZD=(Z,X)=>{let q=`(done in ${XZ(Z.durationMs)})`;p0({type:"duration",verboseMessage:q,verboseInfo:X,result:Z})};var wY=B(()=>{AY();_1();D2();jY()});var E2=(Z,X,{reject:q})=>{if(IY(Z,X),Z.failed&&q)throw Z;return Z};var a8=B(()=>{wY()});var qZ=(Z,X)=>{if(d1(Z))return"asyncGenerator";if(PY(Z))return"generator";if(o8(Z))return"fileUrl";if(JD(Z))return"filePath";if(UD(Z))return"webStream";if(S0(Z,{checkOpen:!1}))return"native";if(t(Z))return"uint8Array";if(GD(Z))return"asyncIterable";if(WD(Z))return"iterable";if($Z(Z))return NY({transform:Z},X);if($D(Z))return XD(Z,X);return"native"},XD=(Z,X)=>{if(s3(Z.transform,{checkOpen:!1}))return qD(Z,X);if($Z(Z.transform))return NY(Z,X);return QD(Z,X)},qD=(Z,X)=>{return xY(Z,X,"Duplex stream"),"duplex"},NY=(Z,X)=>{return xY(Z,X,"web TransformStream"),"webTransform"},xY=({final:Z,binary:X,objectMode:q},Q,$)=>{OY(Z,`${Q}.final`,$),OY(X,`${Q}.binary`,$),u6(q,`${Q}.objectMode`)},OY=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${X}\` option can only be defined when using a generator, not a ${q}.`)},QD=({transform:Z,final:X,binary:q,objectMode:Q},$)=>{if(Z!==void 0&&!kY(Z))throw TypeError(`The \`${$}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(s3(X,{checkOpen:!1}))throw TypeError(`The \`${$}.final\` option must not be a Duplex stream.`);if($Z(X))throw TypeError(`The \`${$}.final\` option must not be a web TransformStream.`);if(X!==void 0&&!kY(X))throw TypeError(`The \`${$}.final\` option must be a generator.`);return u6(q,`${$}.binary`),u6(Q,`${$}.objectMode`),d1(Z)||d1(X)?"asyncGenerator":"generator"},u6=(Z,X)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${X}\` option must use a boolean.`)},kY=(Z)=>d1(Z)||PY(Z),d1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",PY=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",$D=(Z)=>s(Z)&&(Z.transform!==void 0||Z.final!==void 0),o8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",EY=(Z)=>o8(Z)&&Z.protocol!=="file:",JD=(Z)=>s(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>YD.has(X))&&QZ(Z.file),YD,QZ=(Z)=>typeof Z==="string",p6=(Z)=>s(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>HD.has(X))&&("value"in Z),HD,vY=(Z,X)=>Z==="native"&&typeof X==="string"&&!KD.has(X),KD,yY=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",s8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",UD=(Z)=>yY(Z)||s8(Z),$Z=(Z)=>yY(Z?.readable)&&s8(Z?.writable),GD=(Z)=>CY(Z)&&typeof Z[Symbol.asyncIterator]==="function",WD=(Z)=>CY(Z)&&typeof Z[Symbol.iterator]==="function",CY=(Z)=>typeof Z==="object"&&Z!==null,N0,r8,JZ,SY,bY,F1;var W0=B(()=>{u1();t0();F0();YD=new Set(["file","append"]),HD=new Set(["value","input"]),KD=new Set(["ipc","ignore","inherit","overlapped","pipe"]),N0=new Set(["generator","asyncGenerator","duplex","webTransform"]),r8=new Set(["fileUrl","filePath","fileNumber"]),JZ=new Set(["fileUrl","filePath"]),SY=new Set([...JZ,"webStream","nodeStream"]),bY=new Set(["webTransform","duplex"]),F1={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 YZ=(Z,X,q,Q)=>Q==="output"?VD(Z,X,q):BD(Z,X,q),VD=(Z,X,q)=>{let Q=X!==0&&q[X-1].value.readableObjectMode;return{writableObjectMode:Q,readableObjectMode:Z??Q}},BD=(Z,X,q)=>{let Q=X===0?Z===!0:q[X-1].value.readableObjectMode,$=X!==q.length-1&&(Z??Q);return{writableObjectMode:Q,readableObjectMode:$}},hY=(Z,X)=>{let q=Z.findLast(({type:Q})=>N0.has(Q));if(q===void 0)return!1;return X==="input"?q.value.writableObjectMode:q.value.readableObjectMode};var HZ=B(()=>{W0()});var fY=(Z,X,q,Q)=>[...Z.filter(({type:$})=>!N0.has($)),...LD(Z,X,q,Q)],LD=(Z,X,q,{encoding:Q})=>{let $=Z.filter(({type:Y})=>N0.has(Y)),J=Array.from({length:$.length});for(let[Y,H]of Object.entries($))J[Y]=zD({stdioItem:H,index:Number(Y),newTransforms:J,optionName:X,direction:q,encoding:Q});return FD(J,q)},zD=({stdioItem:Z,stdioItem:{type:X},index:q,newTransforms:Q,optionName:$,direction:J,encoding:Y})=>{if(X==="duplex")return _D({stdioItem:Z,optionName:$});if(X==="webTransform")return MD({stdioItem:Z,index:q,newTransforms:Q,direction:J});return RD({stdioItem:Z,index:q,newTransforms:Q,direction:J,encoding:Y})},_D=({stdioItem:Z,optionName:X})=>{let{value:q}=Z,{transform:Q}=q,{writableObjectMode:$,readableObjectMode:J}=Q,{objectMode:Y=J}=q;if(Y&&!J)throw TypeError(`The \`${X}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Y&&J)throw TypeError(`The \`${X}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:Q,writableObjectMode:$,readableObjectMode:J}}},MD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:$})=>{let{transform:J,objectMode:Y}=s(X)?X:{transform:X},{writableObjectMode:H,readableObjectMode:U}=YZ(Y,q,Q,$);return{...Z,value:{transform:J,writableObjectMode:H,readableObjectMode:U}}},RD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:$,encoding:J})=>{let{transform:Y,final:H,binary:U=!1,preserveNewlines:G=!1,objectMode:W}=s(X)?X:{transform:X},V=U||D0.has(J),{writableObjectMode:L,readableObjectMode:z}=YZ(W,q,Q,$);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:G,writableObjectMode:L,readableObjectMode:z}}},FD=(Z,X)=>X==="input"?Z.reverse():Z;var gY=B(()=>{t0();f1();W0();HZ()});import KZ from"node:process";var mY=(Z,X,q)=>{let Q=Z.map(($)=>DD($,X));if(Q.includes("input")&&Q.includes("output"))throw TypeError(`The \`${q}\` option must not be an array of both readable and writable values.`);return Q.find(Boolean)??ID},DD=(Z,X)=>TD[X]??AD(Z),AD=({type:Z,value:X,direction:q,optionName:Q})=>{let $=uY[Z](X);if(q==="input"&&$==="output")throw TypeError(`The \`${Q}\` option is invalid: \`input: true\` cannot be used with a writable value, which is always an output.`);return q??$},TD,v2=()=>{return},UZ=()=>"input",uY,jD=(Z)=>{if([0,KZ.stdin].includes(Z))return"input";if([1,2,KZ.stdout,KZ.stderr].includes(Z))return"output"},ID="output";var pY=B(()=>{u1();W0();TD=["input","output","output"],uY={generator:v2,asyncGenerator:v2,fileUrl:v2,filePath:v2,iterable:UZ,asyncIterable:UZ,uint8Array:UZ,webStream:(Z)=>s8(Z)?"output":"input",nodeStream(Z){if(!m1(Z,{checkOpen:!1}))return"output";return o3(Z,{checkOpen:!1})?void 0:"input"},webTransform:v2,duplex:v2,native(Z){let X=jD(Z);if(X!==void 0)return X;if(S0(Z,{checkOpen:!1}))return uY.nodeStream(Z)}}});var dY=(Z,X)=>X?[...Z,"ipc"]:Z;var cY=()=>{};var iY=({stdio:Z,ipc:X,buffer:q,...Q},$,J)=>{let Y=kD(Z,Q).map((H,U)=>aY(H,U));return wD(Y),J?xD(Y,q,$):dY(Y,X)},wD=(Z)=>{if(Z.some((X)=>OD(X)))throw Error("The `ipc: true` option must be used instead of `stdio: 'ipc'`.")},OD=(Z)=>{if(Array.isArray(Z))return Z.some((X)=>lY(X));return lY(Z)},lY=(Z)=>{if(p6(Z))return Z.value==="ipc";return Z==="ipc"},kD=(Z,X)=>{if(Z===void 0)return k0.map((Q)=>X[Q]);if(ND(X))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${k0.map((Q)=>`\`${Q}\``).join(", ")}`);if(typeof Z==="string")return[Z,Z,Z];if(!Array.isArray(Z))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof Z}\``);let q=Math.max(Z.length,k0.length);return Array.from({length:q},(Q,$)=>Z[$])},ND=(Z)=>k0.some((X)=>Z[X]!==void 0),aY=(Z,X)=>{if(Array.isArray(Z))return Z.map((q)=>aY(q,X));if(Z===null||Z===void 0)return X>=k0.length?"ignore":"pipe";return Z},xD=(Z,X,q)=>Z.map((Q,$)=>!X[$]&&$!==0&&!F2(q,$)&&PD(Q,$)?"ignore":Q),PD=(Z,X)=>nY(Z,X)||Array.isArray(Z)&&Z.every((q)=>nY(q,X)),nY=(Z,X)=>Z==="pipe"||ED(Z,X),ED=(Z,X)=>p6(Z)&&Z.value==="pipe"&&(Z.input===void 0||Z.input===!1||vD(X,Z.input)),vD=(Z,X)=>X===!0&&(Z===1||Z===2);var oY=B(()=>{Z1();cY();_1();W0()});var e8=(Z,X="stdin")=>{let{options:Q,fileDescriptors:$}=l0.get(Z),J=sY($,X,!0),Y=Z.stdio[J];if(Y===null)throw TypeError(rY(J,X,Q,!0));return Y},y2=(Z,X="stdout")=>{let{options:Q,fileDescriptors:$}=l0.get(Z),J=sY($,X,!1),Y=J==="all"?Z.all:Z.stdio[J];if(Y===null||Y===void 0)throw TypeError(rY(J,X,Q,!1));return Y},l0,sY=(Z,X,q)=>{let Q=yD(X,q);return CD(Q,X,q,Z),Q},yD=(Z,X)=>{let q=R3(Z);if(q!==void 0)return q;let{validOptions:Q,defaultValue:$}=X?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${d6(X)}" must not be "${Z}".
51
- It must be ${Q} or "fd3", "fd4" (and so on).
52
- It is optional and defaults to "${$}".`)},CD=(Z,X,q,Q)=>{let $=Q[tY(Z)];if($===void 0)throw TypeError(`"${d6(q)}" must not be ${X}. That file descriptor does not exist.
53
- Please set the "stdio" option to ensure that file descriptor exists.`);if($.direction==="input"&&!q)throw TypeError(`"${d6(q)}" must not be ${X}. It must be a readable stream, not writable.`);if($.direction!=="input"&&q)throw TypeError(`"${d6(q)}" must not be ${X}. It must be a writable stream, not readable.
54
- If you meant to use it as input, please set its "stdio" option to \`{value: 'pipe', input: true}\`.`)},rY=(Z,X,q,Q)=>{if(Z==="all"&&!q.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:$,optionValue:J}=SD(Z,q);return`The "${$}: ${t8(J)}" option is incompatible with using "${d6(Q)}: ${t8(X)}".
55
- Please set this option with "pipe" instead.`},SD=(Z,{stdin:X,stdout:q,stderr:Q,stdio:$})=>{let J=tY(Z);if(J===0&&X!==void 0)return{optionName:"stdin",optionValue:X};if(J===1&&q!==void 0)return{optionName:"stdout",optionValue:q};if(J===2&&Q!==void 0)return{optionName:"stderr",optionValue:Q};return{optionName:`stdio[${J}]`,optionValue:$[J]}},tY=(Z)=>Z==="all"?1:Z,d6=(Z)=>Z?"to":"from",t8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var D1=B(()=>{q1();l0=new WeakMap});import{readFileSync as bD}from"node:fs";import hD from"node:tty";var ZH=({stdioItem:Z,stdioItem:{type:X},isStdioArray:q,fdNumber:Q,direction:$,isSync:J})=>{if(!q||X!=="native")return Z;return J?fD({stdioItem:Z,fdNumber:Q,direction:$}):uD({stdioItem:Z,fdNumber:Q})},fD=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q,direction:$})=>{let J=gD({value:X,optionName:q,fdNumber:Q,direction:$});if(J!==void 0)return J;if(S0(X,{checkOpen:!1}))throw TypeError(`The \`${q}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},gD=({value:Z,optionName:X,fdNumber:q,direction:Q})=>{let $=mD(Z,q);if($===void 0)return;if(Q==="output")return{type:"fileNumber",value:$,optionName:X};if(hD.isatty($))throw TypeError(`The \`${X}: ${t8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:e0(bD($)),optionName:X}},mD=(Z,X)=>{if(Z==="inherit")return X;if(typeof Z==="number")return Z;let q=Z8.indexOf(Z);if(q!==-1)return q},uD=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q})=>{if(X==="inherit")return{type:"nodeStream",value:eY(Q,X,q),optionName:q};if(typeof X==="number")return{type:"nodeStream",value:eY(X,X,q),optionName:q};if(S0(X,{checkOpen:!1}))return{type:"nodeStream",value:X,optionName:q};return Z},eY=(Z,X,q)=>{let Q=Z8[Z];if(Q===void 0)throw TypeError(`The \`${q}: ${X}\` option is invalid: no such standard stream.`);return Q};var XH=B(()=>{u1();Z1();F0();D1()});var qH=({input:Z,inputFile:X},q)=>q===0?[...pD(Z),...cD(X)]:[],pD=(Z)=>Z===void 0?[]:[{type:dD(Z),value:Z,optionName:"input"}],dD=(Z)=>{if(m1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(t(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cD=(Z)=>Z===void 0?[]:[{...lD(Z),optionName:"inputFile"}],lD=(Z)=>{if(o8(Z))return{type:"fileUrl",value:Z};if(QZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var QH=B(()=>{u1();F0();W0()});var $H=(Z)=>Z.filter((X,q)=>Z.every((Q,$)=>!nD(X,Q)||q>=$||X.type==="generator"||X.type==="asyncGenerator")),nD=(Z,X)=>Z.value===X.value&&Z.direction===X.direction,JH=({stdioItem:{type:Z,value:X,optionName:q},direction:Q,fileDescriptors:$,isSync:J})=>{let Y=iD($,Z);if(Y.length===0)return;if(J){aD({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});return}if(SY.has(Z))return YH({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});if(bY.has(Z))sD({otherStdioItems:Y,type:Z,value:X,optionName:q})},iD=(Z,X)=>Z.flatMap(({direction:q,stdioItems:Q})=>Q.filter(($)=>$.type===X).map(($)=>({...$,direction:q}))),aD=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})=>{if(JZ.has(X))YH({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})},YH=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})=>{let J=Z.filter((H)=>oD(H,q));if(J.length===0)return;let Y=J.find((H)=>H.direction!==$);return HH(Y,Q,X),$==="output"?J[0].stream:void 0},oD=({type:Z,value:X},q)=>{if(Z==="filePath")return X.file===q.file;if(Z==="fileUrl")return X.href===q.href;return X===q},sD=({otherStdioItems:Z,type:X,value:q,optionName:Q})=>{let $=Z.find(({value:{transform:J}})=>J===q.transform);HH($,Q,X)},HH=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${X}\` options must not target ${F1[q]} that is the same.`)};var KH=B(()=>{W0()});var Z7=(Z,X,q,Q)=>{let J=iY(X,q,Q).map((H,U)=>rD({stdioOption:H,fdNumber:U,options:X,isSync:Q})),Y=KA({initialFileDescriptors:J,addProperties:Z,options:X,isSync:Q});return X.stdio=Y.map(({stdioItems:H})=>WA(H)),Y},rD=({stdioOption:Z,fdNumber:X,options:q,isSync:Q})=>{let $=X8(X),{stdioItems:J,isStdioArray:Y}=tD({stdioOption:Z,fdNumber:X,options:q,optionName:$}),H=mY(J,X,$),U=J.map((V)=>ZH({stdioItem:V,isStdioArray:Y,fdNumber:X,direction:H,isSync:Q})),G=fY(U,$,H,q),W=hY(G,H);return HA(G,W),{direction:H,objectMode:W,stdioItems:G}},tD=({stdioOption:Z,fdNumber:X,options:q,optionName:Q})=>{let $=Array.isArray(Z)?Z:[Z],J=qH(q,X),Y=[...eD($.map((G)=>XA(G,Q)),J),...J],H=$H(Y),U=H.length>1;return QA(H,U,Q),JA(H),{stdioItems:H,isStdioArray:U}},eD=(Z,X)=>X.length>0&&ZA(Z)?[]:Z,ZA=(Z)=>Z.length===1&&Z[0].type==="native"&&Z[0].value==="inherit",XA=(Z,X)=>{if(p6(Z))return qA(Z,X);return{type:qZ(Z,X),value:Z,optionName:X}},qA=({value:Z,input:X},q)=>{return u6(X,`${q}.input`),{type:qZ(Z,q),value:Z,direction:X?"input":void 0,optionName:q}},QA=(Z,X,q)=>{if(Z.length===0)throw TypeError(`The \`${q}\` option must not be an empty array.`);if(!X)return;for(let{value:Q,optionName:$}of Z)if($A.has(Q))throw Error(`The \`${$}\` option must not include \`${Q}\`.`)},$A,JA=(Z)=>{for(let X of Z)YA(X)},YA=({type:Z,value:X,optionName:q})=>{if(EY(X))throw TypeError(`The \`${q}: URL\` option must use the \`file:\` scheme.
56
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(vY(Z,X))throw TypeError(`The \`${q}: { file: '...' }\` option must be used instead of \`${q}: '...'\`.`)},HA=(Z,X)=>{if(!X)return;let q=Z.find(({type:Q})=>r8.has(Q));if(q!==void 0)throw TypeError(`The \`${q.optionName}\` option cannot use both files and transforms in objectMode.`)},KA=({initialFileDescriptors:Z,addProperties:X,options:q,isSync:Q})=>{let $=[];try{for(let J of Z)$.push(UA({fileDescriptor:J,fileDescriptors:$,addProperties:X,options:q,isSync:Q}));return $}catch(J){throw GZ($),J}},UA=({fileDescriptor:{direction:Z,objectMode:X,stdioItems:q},fileDescriptors:Q,addProperties:$,options:J,isSync:Y})=>{let H=q.map((U)=>GA({stdioItem:U,addProperties:$,direction:Z,options:J,fileDescriptors:Q,isSync:Y}));return{direction:Z,objectMode:X,stdioItems:H}},GA=({stdioItem:Z,addProperties:X,direction:q,options:Q,fileDescriptors:$,isSync:J})=>{let Y=JH({stdioItem:Z,direction:q,fileDescriptors:$,isSync:J});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...X[q][Z.type](Z,Q)}},GZ=(Z)=>{for(let{stdioItems:X}of Z)for(let{stream:q}of X)if(q!==void 0&&!y0(q))q.destroy()},WA=(Z)=>{if(Z.length>1)return Z.some(({value:Q})=>Q==="overlapped")?"overlapped":"pipe";let[{type:X,value:q}]=Z;return X==="native"?q:"pipe"};var X7=B(()=>{Z1();gY();HZ();W0();pY();oY();XH();QH();KH();$A=new Set(["ignore"])});import{readFileSync as UH}from"node:fs";var WH=(Z,X)=>Z7(BA,Z,X,!0),n0=({type:Z,optionName:X})=>{BH(X,F1[Z])},VH=({optionName:Z,value:X})=>{if(X==="overlapped")BH(Z,`"${X}"`);return{}},VA=(Z)=>{let{optionName:X,value:q}=Z;if(q==="pipe"&&X!=="stdin")throw TypeError(`Only the \`stdin\` option, not \`${X}\`, can be an input pipe with synchronous methods.`);return VH(Z)},BH=(Z,X)=>{throw TypeError(`The \`${Z}\` option cannot be ${X} with synchronous methods.`)},GH,BA;var LH=B(()=>{F0();X7();W0();GH={generator(){},asyncGenerator:n0,webStream:n0,nodeStream:n0,webTransform:n0,duplex:n0,asyncIterable:n0,native:VH},BA={input:{...GH,native:VA,fileUrl:({value:Z})=>({contents:[e0(UH(Z))]}),filePath:({value:{file:Z}})=>({contents:[e0(UH(Z))]}),fileNumber:n0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...GH,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:X}})=>({path:Z,append:X}),fileNumber:({value:Z})=>({path:Z}),iterable:n0,string:n0,uint8Array:n0}}});var J1=(Z,{stripFinalNewline:X},q)=>WZ(X,q)&&Z!==void 0&&!Array.isArray(Z)?N2(Z):Z,WZ=(Z,X)=>X==="all"?Z[1]||Z[2]:Z[X];var c6=B(()=>{a3()});var q7=(Z,X,q,Q)=>Z||q?void 0:_H(X,Q),BZ=(Z,X,q)=>q?Z.flatMap((Q)=>zH(Q,X)):zH(Z,X),zH=(Z,X)=>{let{transform:q,final:Q}=_H(X,{});return[...q(Z),...Q()]},_H=(Z,X)=>{return X.previousChunks="",{transform:LA.bind(void 0,X,Z),final:_A.bind(void 0,X)}},LA=function*(Z,X,q){if(typeof q!=="string"){yield q;return}let{previousChunks:Q}=Z,$=-1;for(let J=0;J<q.length;J+=1){if(q[J]!==`
57
- `)continue;let Y=zA(q,J,X,Z),H=q.slice($+1,J+1-Y);if(Q.length>0)H=VZ(Q,H),Q="";yield H,$=J}if($!==q.length-1)Q=VZ(Q,q.slice($+1));Z.previousChunks=Q},zA=(Z,X,q,Q)=>{if(q)return 0;return Q.isWindowsNewline=X!==0&&Z[X-1]==="\r",Q.isWindowsNewline?2:1},_A=function*({previousChunks:Z}){if(Z.length>0)yield Z},MH=({binary:Z,preserveNewlines:X,readableObjectMode:q,state:Q})=>Z||X||q?void 0:{transform:MA.bind(void 0,Q)},MA=function*({isWindowsNewline:Z=!1},X){let{unixNewline:q,windowsNewline:Q,LF:$,concatBytes:J}=typeof X==="string"?RA:DA;if(X.at(-1)===$){yield X;return}yield J(X,Z?Q:q)},VZ=(Z,X)=>`${Z}${X}`,RA,FA=(Z,X)=>{let q=new Uint8Array(Z.length+X.length);return q.set(Z,0),q.set(X,Z.length),q},DA;var Q7=B(()=>{RA={windowsNewline:`\r
58
- `,unixNewline:`
59
- `,LF:`
60
- `,concatBytes:VZ},DA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:FA}});import{Buffer as AA}from"node:buffer";var RH=(Z,X)=>Z?void 0:TA.bind(void 0,X),TA=function*(Z,X){if(typeof X!=="string"&&!t(X)&&!AA.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},FH=(Z,X)=>Z?jA.bind(void 0,X):IA.bind(void 0,X),jA=function*(Z,X){DH(Z,X),yield X},IA=function*(Z,X){if(DH(Z,X),typeof X!=="string"&&!t(X))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof X}.`);yield X},DH=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
61
- Instead, \`yield\` should either be called with a value, or not be called at all. For example:
62
- if (condition) { yield value; }`)};var AH=B(()=>{F0()});import{Buffer as wA}from"node:buffer";import{StringDecoder as OA}from"node:string_decoder";var $7=(Z,X,q)=>{if(q)return;if(Z)return{transform:kA.bind(void 0,new TextEncoder)};let Q=new OA(X);return{transform:NA.bind(void 0,Q),final:xA.bind(void 0,Q)}},kA=function*(Z,X){if(wA.isBuffer(X))yield e0(X);else if(typeof X==="string")yield Z.encode(X);else yield X},NA=function*(Z,X){yield t(X)?Z.write(X):X},xA=function*(Z){let X=Z.end();if(X!=="")yield X};var LZ=B(()=>{F0()});import{callbackify as TH}from"node:util";var zZ,J7=async function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=EA}=X[q];for await(let $ of Q(Z))yield*J7($,X,q+1)},jH=async function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*PA(q,Number(X),Z)},PA=async function*(Z,X,q){if(Z===void 0)return;for await(let Q of Z())yield*J7(Q,q,X+1)},IH,EA=function*(Z){yield Z};var wH=B(()=>{zZ=TH(async(Z,X,q,Q)=>{X.currentIterable=Z(...q);try{for await(let $ of X.currentIterable)Q.push($)}finally{delete X.currentIterable}}),IH=TH(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var _Z=(Z,X,q,Q)=>{try{for(let $ of Z(...X))q.push($);Q()}catch($){Q($)}},OH=(Z,X)=>[...X.flatMap((q)=>[...c1(q,Z,0)]),...l6(Z)],c1=function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=yA}=X[q];for(let $ of Q(Z))yield*c1($,X,q+1)},l6=function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*vA(q,Number(X),Z)},vA=function*(Z,X,q){if(Z===void 0)return;for(let Q of Z())yield*c1(Q,q,X+1)},yA=function*(Z){yield Z};var MZ=()=>{};import{Transform as CA,getDefaultHighWaterMark as kH}from"node:stream";var RZ=({value:Z,value:{transform:X,final:q,writableObjectMode:Q,readableObjectMode:$},optionName:J},{encoding:Y})=>{let H={},U=NH(Z,Y,J),G=d1(X),W=d1(q),V=G?zZ.bind(void 0,J7,H):_Z.bind(void 0,c1),L=G||W?zZ.bind(void 0,jH,H):_Z.bind(void 0,l6),z=G||W?IH.bind(void 0,H):void 0;return{stream:new CA({writableObjectMode:Q,writableHighWaterMark:kH(Q),readableObjectMode:$,readableHighWaterMark:kH($),transform(M,R,F){V([M,U,0],this,F)},flush(M){L([U],this,M)},destroy:z})}},Y7=(Z,X,q,Q)=>{let $=X.filter(({type:Y})=>Y==="generator"),J=Q?$.reverse():$;for(let{value:Y,optionName:H}of J){let U=NH(Y,q,H);Z=OH(U,Z)}return Z},NH=({transform:Z,final:X,binary:q,writableObjectMode:Q,readableObjectMode:$,preserveNewlines:J},Y,H)=>{let U={};return[{transform:RH(Q,H)},$7(q,Y,Q),q7(q,J,Q,U),{transform:Z,final:X},{transform:FH($,H)},MH({binary:q,preserveNewlines:J,readableObjectMode:$,state:U})].filter(Boolean)};var H7=B(()=>{W0();Q7();AH();LZ();wH();MZ()});var xH=(Z,X)=>{for(let q of SA(Z))bA(Z,q,X)},SA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),bA=(Z,X,q)=>{let{stdioItems:Q}=Z[X],$=Q.filter(({contents:H})=>H!==void 0);if($.length===0)return;if(X!==0){let[{type:H,optionName:U}]=$;throw TypeError(`Only the \`stdin\` option, not \`${U}\`, can be ${F1[H]} with synchronous methods.`)}let Y=$.map(({contents:H})=>H).map((H)=>hA(H,Q));q.input=I6(Y)},hA=(Z,X)=>{let q=Y7(Z,X,"utf8",!0);return fA(q),I6(q)},fA=(Z)=>{let X=Z.find((q)=>typeof q!=="string"&&!t(q));if(X!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${X}.`)};var PH=B(()=>{H7();F0();W0()});var K7=({stdioItems:Z,encoding:X,verboseInfo:q,fdNumber:Q})=>Q!=="all"&&F2(q,Q)&&!D0.has(X)&&gA(Q)&&(Z.some(({type:$,value:J})=>$==="native"&&mA.has(J))||Z.every(({type:$})=>N0.has($))),gA=(Z)=>Z===1||Z===2,mA,EH=async(Z,X,q,Q)=>{for await(let $ of Z)if(!uA(X))yH($,q,Q)},vH=(Z,X,q)=>{for(let Q of Z)yH(Q,X,q)},uA=(Z)=>Z._readableState.pipes.length>0,yH=(Z,X,q)=>{let Q=K8(Z);p0({type:"output",verboseMessage:Q,fdNumber:X,verboseInfo:q})};var FZ=B(()=>{f1();W0();D2();_1();mA=new Set(["pipe","overlapped"])});import{writeFileSync as pA,appendFileSync as dA}from"node:fs";var CH=({fileDescriptors:Z,syncResult:{output:X},options:q,isMaxBuffer:Q,verboseInfo:$})=>{if(X===null)return{output:Array.from({length:3})};let J={},Y=new Set;return{output:X.map((U,G)=>cA({result:U,fileDescriptors:Z,fdNumber:G,state:J,outputFiles:Y,isMaxBuffer:Q,verboseInfo:$},q)),...J}},cA=({result:Z,fileDescriptors:X,fdNumber:q,state:Q,outputFiles:$,isMaxBuffer:J,verboseInfo:Y},{buffer:H,encoding:U,lines:G,stripFinalNewline:W,maxBuffer:V})=>{if(Z===null)return;let L=LY(Z,J,V),z=e0(L),{stdioItems:_,objectMode:M}=X[q],R=lA([z],_,U,Q),{serializedResult:F,finalResult:k=F}=nA({chunks:R,objectMode:M,encoding:U,lines:G,stripFinalNewline:W,fdNumber:q});iA({serializedResult:F,fdNumber:q,state:Q,verboseInfo:Y,encoding:U,stdioItems:_,objectMode:M});let D=H[q]?k:void 0;try{if(Q.error===void 0)aA(F,_,$);return D}catch(w){return Q.error=w,D}},lA=(Z,X,q,Q)=>{try{return Y7(Z,X,q,!1)}catch($){return Q.error=$,Z}},nA=({chunks:Z,objectMode:X,encoding:q,lines:Q,stripFinalNewline:$,fdNumber:J})=>{if(X)return{serializedResult:Z};if(q==="buffer")return{serializedResult:I6(Z)};let Y=p$(Z,q);if(Q[J])return{serializedResult:Y,finalResult:BZ(Y,!$[J],X)};return{serializedResult:Y}},iA=({serializedResult:Z,fdNumber:X,state:q,verboseInfo:Q,encoding:$,stdioItems:J,objectMode:Y})=>{if(!K7({stdioItems:J,encoding:$,verboseInfo:Q,fdNumber:X}))return;let H=BZ(Z,!1,Y);try{vH(H,X,Q)}catch(U){q.error??=U}},aA=(Z,X,q)=>{let Q=X.filter(({type:$})=>r8.has($));for(let{path:$,append:J}of Q){let Y=typeof $==="string"?$:$.toString();if(J||q.has(Y))dA($,Z);else q.add(Y),pA($,Z)}};var SH=B(()=>{FZ();H7();Q7();F0();W0();p1()});var bH=([,Z,X],q)=>{if(!q.all)return;if(Z===void 0)return X;if(X===void 0)return Z;if(Array.isArray(Z))return Array.isArray(X)?[...Z,...X]:[...Z,J1(X,q,"all")];if(Array.isArray(X))return[J1(Z,q,"all"),...X];if(t(Z)&&t(X))return z3([Z,X]);return`${Z}${X}`};var hH=B(()=>{F0();c6()});import{once as DZ}from"node:events";var fH=async(Z,X)=>{let[q,Q]=await oA(Z);return X.isForcefullyTerminated??=!1,[q,Q]},oA=async(Z)=>{let[X,q]=await Promise.allSettled([DZ(Z,"spawn"),DZ(Z,"exit")]);if(X.status==="rejected")return[];return q.status==="rejected"?gH(Z):q.value},gH=async(Z)=>{try{return await DZ(Z,"exit")}catch{return gH(Z)}},mH=async(Z)=>{let[X,q]=await Z;if(!sA(X,q)&&AZ(X,q))throw new d0;return[X,q]},sA=(Z,X)=>Z===void 0&&X===void 0,AZ=(Z,X)=>Z!==0||X!==null;var TZ=B(()=>{b1()});var uH=({error:Z,status:X,signal:q,output:Q},{maxBuffer:$})=>{let J=rA(Z,X,q),Y=J?.code==="ETIMEDOUT",H=BY(J,Q,$);return{resultError:J,exitCode:X,signal:q,timedOut:Y,isMaxBuffer:H}},rA=(Z,X,q)=>{if(Z!==void 0)return Z;return AZ(X,q)?new d0:void 0};var pH=B(()=>{b1();p1();TZ()});import{spawnSync as tA}from"node:child_process";var dH=(Z,X,q)=>{let{file:Q,commandArguments:$,command:J,escapedCommand:Y,startTime:H,verboseInfo:U,options:G,fileDescriptors:W}=eA(Z,X,q),V=qT({file:Q,commandArguments:$,options:G,command:J,escapedCommand:Y,verboseInfo:U,fileDescriptors:W,startTime:H});return E2(V,U,G)},eA=(Z,X,q)=>{let{command:Q,escapedCommand:$,startTime:J,verboseInfo:Y}=W8(Z,X,q),H=ZT(q),{file:U,commandArguments:G,options:W}=S8(Z,X,H);XT(W);let V=WH(W,Y);return{file:U,commandArguments:G,command:Q,escapedCommand:$,startTime:J,verboseInfo:Y,options:W,fileDescriptors:V}},ZT=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,XT=({ipc:Z,ipcInput:X,detached:q,cancelSignal:Q,killDescendants:$})=>{if(X)n6("ipcInput");if(Z)n6("ipc: true");if(q)n6("detached: true");if($)n6("killDescendants: true");if(Q)n6("cancelSignal")},n6=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},qT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,verboseInfo:J,fileDescriptors:Y,startTime:H})=>{let U=QT({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,fileDescriptors:Y,startTime:H});if(U.failed)return U;let{resultError:G,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z}=uH(U,q),{output:_,error:M=G}=CH({fileDescriptors:Y,syncResult:U,options:q,isMaxBuffer:z,verboseInfo:J}),R=_.map((k,D)=>J1(k,q,D)),F=J1(bH(_,q),q,"all");return JT({error:M,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z,stdio:R,all:F,options:q,command:Q,escapedCommand:$,startTime:H})},QT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,fileDescriptors:J,startTime:Y})=>{try{xH(J,q);let H=$T(q);return tA(...b8(Z,X,H))}catch(H){return P2({error:H,command:Q,escapedCommand:$,fileDescriptors:J,options:q,startTime:Y,isSync:!0})}},$T=({encoding:Z,maxBuffer:X,...q})=>({...q,encoding:"buffer",maxBuffer:n8(X)}),JT=({error:Z,exitCode:X,signal:q,timedOut:Q,isMaxBuffer:$,stdio:J,all:Y,options:H,command:U,escapedCommand:G,startTime:W})=>Z===void 0?i8({command:U,escapedCommand:G,stdio:J,all:Y,ipcOutput:[],options:H,startTime:W}):g6({error:Z,command:U,escapedCommand:G,timedOut:Q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:$,isForcefullyTerminated:!1,exitCode:X,signal:q,stdio:J,all:Y,ipcOutput:[],options:H,startTime:W,isSync:!0});var cH=B(()=>{j3();n3();i3();m6();a8();LH();c6();PH();SH();p1();hH();pH()});import{once as jZ,on as YT}from"node:events";var IZ,lH=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},$={})=>{let{reference:J=!0,filter:Y}=$,{signal:H}=$[IZ]??{};return A2({methodName:"getOneMessage",isSubprocess:q,ipc:Q,isConnected:x8(Z)}),HT({anyProcess:Z,channel:X,isSubprocess:q,filter:Y,reference:J,signal:H})},HT=async({anyProcess:Z,channel:X,isSubprocess:q,filter:Q,reference:$,signal:J})=>{j8(X,$);let Y=R1(Z,X,q),H=new AbortController;KT(J,H);try{return await Promise.race([UT(Y,Q,H),GT(Y,q,H),WT(Y,q,H)])}catch(U){throw T2(Z),U}finally{H.abort(),I8(X,$)}},KT=(Z,X)=>{if(Z===void 0)return;if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},UT=async(Z,X,{signal:q})=>{if(X===void 0){let[Q]=await jZ(Z,"message",{signal:q});return Q}for await(let[Q]of YT(Z,"message",{signal:q}))if(X(Q))return Q},GT=async(Z,X,{signal:q})=>{await jZ(Z,"disconnect",{signal:q}),iJ(X)},WT=async(Z,X,{signal:q})=>{let[Q]=await jZ(Z,"strict:error",{signal:q});throw A8(Q,X)};var wZ=B(()=>{j2();P6();N6();IZ=Symbol("internalGetOneMessageOptions")});import{once as iH,on as VT}from"node:events";var OZ,aH=(Z,X={})=>{let{reference:q=!0}=X,{signal:Q,shouldAwait:$=!Z.isSubprocess}=X[OZ]??{};return kZ({...Z,shouldAwait:$,reference:q,signal:Q})},kZ=({anyProcess:Z,waitProcess:X=Z,channel:q,isSubprocess:Q,ipc:$,shouldAwait:J,reference:Y,signal:H})=>{A2({methodName:"getEachMessage",isSubprocess:Q,ipc:$,isConnected:x8(Z)}),j8(q,Y);let U=R1(Z,q,Q),G=new AbortController,W={};return BT(H,G),LT(Z,U,G),zT({ipcEmitter:U,isSubprocess:Q,controller:G,state:W}),_T({anyProcess:Z,waitProcess:X,channel:q,ipcEmitter:U,isSubprocess:Q,shouldAwait:J,controller:G,state:W,reference:Y})},BT=(Z,X)=>{if(Z===void 0)return;if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},LT=async(Z,X,q)=>{try{await iH(X,"disconnect",{signal:q.signal}),q.abort()}catch{}},zT=async({ipcEmitter:Z,isSubprocess:X,controller:q,state:Q})=>{try{let[$]=await iH(Z,"strict:error",{signal:q.signal});Q.error=A8($,X),q.abort()}catch{}},_T=async function*({anyProcess:Z,waitProcess:X,channel:q,ipcEmitter:Q,isSubprocess:$,shouldAwait:J,controller:Y,state:H,reference:U}){try{for await(let[G]of VT(Q,"message",{signal:Y.signal}))nH(H),yield G}catch{nH(H)}finally{if(Y.abort(),I8(q,U),!$)T2(Z);if(J)await X}},nH=({error:Z})=>{if(Z)throw Z};var U7=B(()=>{j2();P6();N6();OZ=Symbol("internalGetEachMessageOptions")});import oH from"node:process";var sH=(Z,X,{ipc:q})=>{Object.assign(Z,tH(X,!1,q,Z))},rH=()=>{let Z=oH,X=!0,q=oH.channel!==void 0;return{...tH(Z,!0,q),getCancelSignal:A9.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:q})}},tH=(Z,X,q,Q=Z)=>({sendMessage:w2.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getOneMessage:lH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getEachMessage:aH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q,waitProcess:Q})});var NZ=B(()=>{E6();wZ();U7();k8()});import{ChildProcess as MT}from"node:child_process";import{PassThrough as RT,Readable as ZK,Writable as XK,Duplex as qK}from"node:stream";var QK=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,verboseInfo:Y})=>{GZ(Q);let H=new MT,U=FT(H,Q),G=P2({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,isSync:!1}),W=jT(G,Y,$);return{subprocess:H,promise:W,all:$.all?U:void 0,convertedStreams:{readable:$K,writable:JK,duplex:YK,readableStream:DT,writableStream:AT,transformStream:TT,iterable:eH,[Symbol.asyncIterator]:eH}}},FT=(Z,X)=>{let q=i6(),Q=i6(),$=i6(),J=Array.from({length:X.length-3},i6),Y=i6(),H=[q,Q,$,...J];return Object.assign(Z,{stdin:q,stdout:Q,stderr:$,stdio:H}),Y},i6=()=>{let Z=new RT;return Z.end(),Z},$K=()=>new ZK({read(){}}),JK=()=>new XK({write(){}}),YK=()=>new qK({read(){},write(){}}),DT=()=>ZK.toWeb($K()),AT=()=>XK.toWeb(JK()),TT=()=>qK.toWeb(YK()),eH=async function*(){},jT=async(Z,X,q)=>E2(Z,X,q);var HK=B(()=>{X7();m6();a8()});import{createReadStream as KK,createWriteStream as UK}from"node:fs";import{Buffer as IT}from"node:buffer";import{Readable as a6,Writable as wT,Duplex as OT}from"node:stream";var WK=(Z,X)=>Z7(kT,Z,X,!1),o6=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${F1[Z]}.`)},GK,kT;var VK=B(()=>{H7();X7();W0();GK={fileNumber:o6,generator:RZ,asyncGenerator:RZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:q}}){let Q=X||q;return{stream:OT.fromWeb(Z,{objectMode:Q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},kT={input:{...GK,fileUrl:({value:Z})=>({stream:KK(Z)}),filePath:({value:{file:Z}})=>({stream:KK(Z)}),webStream:({value:Z})=>({stream:a6.fromWeb(Z)}),iterable:({value:Z})=>({stream:a6.from(Z)}),asyncIterable:({value:Z})=>({stream:a6.from(Z)}),string:({value:Z})=>({stream:a6.from(Z)}),uint8Array:({value:Z})=>({stream:a6.from(IT.from(Z))})},output:{...GK,fileUrl:({value:Z})=>({stream:UK(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:UK(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:wT.fromWeb(Z)}),iterable:o6,asyncIterable:o6,string:o6,uint8Array:o6}}});import{on as NT,once as BK}from"node:events";import{PassThrough as xT,getDefaultHighWaterMark as PT}from"node:stream";import{finished as _K}from"node:stream/promises";function l1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let $ of Z)xZ($);let X=Z.some(({readableObjectMode:$})=>$),q=ET(Z,X),Q=new MK({objectMode:X,writableHighWaterMark:q,readableHighWaterMark:q});for(let $ of Z)Q.add($);return Q}var ET=(Z,X)=>{if(Z.length===0)return PT(X);let q=Z.filter(({readableObjectMode:Q})=>Q===X).map(({readableHighWaterMark:Q})=>Q);return Math.max(...q)},MK,vT=async(Z,X,q)=>{G7(Z,LK);let Q=new AbortController;try{await Promise.race([yT(Z,Q),CT(Z,X,q,Q)])}finally{Q.abort(),G7(Z,-LK)}},yT=async(Z,{signal:X})=>{try{await _K(Z,{signal:X,cleanup:!0})}catch(q){throw RK(Z,q),q}},CT=async(Z,X,q,{signal:Q})=>{for await(let[$]of NT(Z,"unpipe",{signal:Q}))if(X.has($))$.emit(q)},xZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},ST=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,onFinished:J,unpipeEvent:Y})=>{G7(Z,zK);let H=new AbortController;try{await Promise.race([bT(J,X,H),hT({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,controller:H}),fT({stream:X,streams:q,ended:Q,aborted:$,unpipeEvent:Y,controller:H})])}finally{H.abort(),G7(Z,-zK)}if(q.size>0&&q.size===Q.size+$.size)if(Q.size===0&&$.size>0)PZ(Z);else gT(Z)},bT=async(Z,X,{signal:q})=>{try{if(await Z,!q.aborted)PZ(X)}catch(Q){if(!q.aborted)RK(X,Q)}},hT=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,controller:{signal:J}})=>{try{if(await _K(X,{signal:J,cleanup:!0,readable:!0,writable:!1}),q.has(X))Q.add(X)}catch(Y){if(J.aborted||!q.has(X))return;if(FK(Y))$.add(X);else DK(Z,Y)}},fT=async({stream:Z,streams:X,ended:q,aborted:Q,unpipeEvent:$,controller:{signal:J}})=>{if(await BK(Z,$,{signal:J}),!Z.readable)return BK(J,"abort",{signal:J});X.delete(Z),q.delete(Z),Q.delete(Z)},gT=(Z)=>{if(Z.writable)Z.end()},RK=(Z,X)=>{if(FK(X))PZ(Z);else DK(Z,X)},FK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",PZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},DK=(Z,X)=>{if(!Z.destroyed)Z.once("error",mT),Z.destroy(X)},mT=()=>{},G7=(Z,X)=>{let q=Z.getMaxListeners();if(q!==0&&q!==Number.POSITIVE_INFINITY)Z.setMaxListeners(q+X)},LK=2,zK=1;var W7=B(()=>{MK=class MK extends xT{#q=new Set([]);#Q=new Set([]);#X=new Set([]);#Y;#K=Symbol("unpipe");#V=new WeakMap;add(Z){if(xZ(Z),this.#q.has(Z))return;this.#q.add(Z),this.#Y??=vT(this,this.#q,this.#K);let X=ST({passThroughStream:this,stream:Z,streams:this.#q,ended:this.#Q,aborted:this.#X,onFinished:this.#Y,unpipeEvent:this.#K});this.#V.set(Z,X),Z.pipe(this,{end:!1})}async remove(Z){if(xZ(Z),!this.#q.has(Z))return!1;let X=this.#V.get(Z);if(X===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await X,!0}}});import{finished as AK}from"node:stream/promises";var C2=(Z,X)=>{Z.pipe(X),uT(Z,X),pT(Z,X)},uT=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await AK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}EZ(X)},EZ=(Z)=>{if(Z.writable)Z.end()},pT=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await AK(X,{cleanup:!0,readable:!1,writable:!0})}catch{}vZ(Z)},vZ=(Z)=>{if(Z.readable)Z.destroy()};var V7=B(()=>{Z1()});var TK=(Z,X,q)=>{let Q=new Map;for(let[$,{stdioItems:J,direction:Y}]of Object.entries(X)){let H=J.filter(({type:G})=>N0.has(G));for(let{stream:G}of H)dT(Z,G,Y,$);let U=J.filter(({type:G})=>!N0.has(G));for(let{stream:G}of U)lT({subprocess:Z,stream:G,direction:Y,fdNumber:$,pipeGroups:Q,controller:q})}for(let[$,J]of Q){let Y=J.length===1?J[0]:l1(J);C2(Y,$)}},dT=(Z,X,q,Q)=>{if(q==="output")C2(Z.stdio[Q],X);else C2(X,Z.stdio[Q]);let $=cT[Q];if($!==void 0)Z[$]=X;Z.stdio[Q]=X},cT,lT=({subprocess:Z,stream:X,direction:q,fdNumber:Q,pipeGroups:$,controller:J})=>{if(X===void 0)return;nT(X,J);let[Y,H]=q==="output"?[X,Z.stdio[Q]]:[Z.stdio[Q],X],U=$.get(Y)??[];$.set(Y,[...U,H])},nT=(Z,{signal:X})=>{if(y0(Z))h1(Z,iT,X)},iT=2;var jK=B(()=>{W7();Z1();T8();W0();V7();cT=["stdin","stdout","stderr"]});import B7 from"node:process";import{execFile as aT}from"node:child_process";import IK from"node:path/win32";var wK,OK=(Z)=>Z.killDescendants&&!wK?{...Z,detached:!0}:Z,kK=(Z,{killDescendants:X})=>{if(!X)return Z.kill.bind(Z);return(wK?sT:oT).bind(void 0,Z)},oT=(Z,X)=>{if(Z.pid===void 0)return!1;try{return B7.kill(-Z.pid,X)}catch{return Z.kill(X)}},sT=(Z,X)=>{if(Z.pid===void 0)return!1;let q=rT();if(q===void 0)return Z.kill(X);return aT(q,["/pid",`${Z.pid}`,"/T","/F"],(Q)=>{if(Q)Z.kill(X)}),!0},rT=()=>{let Z=[B7.env.SystemRoot,B7.env.windir].find((X)=>X&&tT(X));return Z===void 0?void 0:IK.join(Z,"System32","taskkill.exe")},tT=(Z)=>{let{root:X}=IK.parse(Z);return/^[a-z]:[/\\]/i.test(X)};var NK=B(()=>{wK=B7.platform==="win32"});var n1;var xK=B(()=>{n1=[];n1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")n1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")n1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class PK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(CZ[yZ])return CZ[yZ];eT(CZ,yZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let q=this.listeners[Z],Q=q.indexOf(X);if(Q===-1)return;if(Q===0&&q.length===1)q.length=0;else q.splice(Q,1)}emit(Z,X,q){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let Q=!1;for(let $ of this.listeners[Z])Q=$(X,q)===!0||Q;if(Z==="exit")Q=this.emit("afterExit",X,q)||Q;return Q}}class bZ{}var L7=(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",yZ,CZ,eT,Zj=(Z)=>{return{onExit(X,q){return Z.onExit(X,q)},load(){return Z.load()},unload(){return Z.unload()}}},EK,vK,SZ,yK,Zu,Xu;var CK=B(()=>{xK();yZ=Symbol.for("signal-exit emitter"),CZ=globalThis,eT=Object.defineProperty.bind(Object);EK=class EK extends bZ{onExit(){return()=>{}}load(){}unload(){}};vK=class vK extends bZ{#q=SZ.platform==="win32"?"SIGINT":"SIGHUP";#Q=new PK;#X;#Y;#K;#V={};#A=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of n1)this.#V[X]=()=>{let q=this.#X.listeners(X),{count:Q}=this.#Q,$=Z;if(typeof $.__signal_exit_emitter__==="object"&&typeof $.__signal_exit_emitter__.count==="number")Q+=$.__signal_exit_emitter__.count;if(q.length===Q){this.unload();let J=this.#Q.emit("exit",null,X),Y=X==="SIGHUP"?this.#q:X;if(!J)Z.kill(Z.pid,Y)}};this.#K=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!L7(this.#X))return()=>{};if(this.#A===!1)this.load();let q=X?.alwaysLast?"afterExit":"exit";return this.#Q.on(q,Z),()=>{if(this.#Q.removeListener(q,Z),this.#Q.listeners.exit.length===0&&this.#Q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#Q.count+=1;for(let Z of n1)try{let X=this.#V[Z];if(X)this.#X.on(Z,X)}catch(X){}this.#X.emit=(Z,...X)=>{return this.#H(Z,...X)},this.#X.reallyExit=(Z)=>{return this.#_(Z)}}unload(){if(!this.#A)return;this.#A=!1,n1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(q){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#K,this.#Q.count-=1}#_(Z){if(!L7(this.#X))return 0;return this.#X.exitCode=Z||0,this.#Q.emit("exit",this.#X.exitCode,null),this.#K.call(this.#X,this.#X.exitCode)}#H(Z,...X){let q=this.#Y;if(Z==="exit"&&L7(this.#X)){if(typeof X[0]==="number")this.#X.exitCode=X[0];let Q=q.call(this.#X,Z,...X);return this.#Q.emit("exit",this.#X.exitCode,null),Q}else return q.call(this.#X,Z,...X)}};SZ=globalThis.process,{onExit:yK,load:Zu,unload:Xu}=Zj(L7(SZ)?new vK(SZ):new EK)});import{addAbortListener as Xj}from"node:events";var SK=(Z,{cleanup:X,detached:q},{signal:Q})=>{if(!X||q)return;let $=yK(()=>{Z()});Xj(Q,()=>{$()})};var bK=B(()=>{CK()});var z7=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),s6=(Z,X,q)=>{let Q=Z[q];if(!Q.has(X))Q.set(X,[]);let $=Q.get(X),J=c0();return $.push(J),{resolve:J.resolve.bind(J),promises:$}},S2=async({resolve:Z,promises:X},q)=>{Z();let[Q]=await Promise.race([Promise.allSettled([!0,q]),Promise.all([!1,...X])]);return!Q};var r6=B(()=>{I2()});import{on as qj}from"node:events";import{getDefaultHighWaterMark as Qj}from"node:stream";var _7=({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:Q,encoding:$,preserveNewlines:J})=>{let Y=new AbortController;return $j(X,Y),fK({stream:Z,controller:Y,binary:q,shouldEncode:!Z.readableObjectMode&&Q,encoding:$,shouldSplit:!Z.readableObjectMode,preserveNewlines:J})},$j=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},hZ=({stream:Z,onStreamEnd:X,lines:q,encoding:Q,stripFinalNewline:$,allMixed:J})=>{let Y=new AbortController;Jj(X,Y,Z);let H=Z.readableObjectMode&&!J;return fK({stream:Z,controller:Y,binary:Q==="buffer",shouldEncode:!H,encoding:Q,shouldSplit:!H&&q,preserveNewlines:!$})},Jj=async(Z,X,q)=>{try{await Z}catch{q.destroy()}finally{X.abort()}},fK=({stream:Z,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y})=>{let H=qj(Z,"data",{signal:X.signal,highWaterMark:hK,highWatermark:hK});return Yj({onStdoutChunk:H,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y})},fZ,hK,Yj=async function*({onStdoutChunk:Z,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y}){let H=Hj({binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y});try{for await(let[U]of Z)yield*c1(U,H,0)}catch(U){if(!X.signal.aborted)throw U}finally{yield*l6(H)}},Hj=({binary:Z,shouldEncode:X,encoding:q,shouldSplit:Q,preserveNewlines:$})=>[$7(Z,q,!X),q7(Z,$,!Q,{})].filter(Boolean);var M7=B(()=>{LZ();Q7();MZ();fZ=Qj(!0),hK=fZ});var b2=(Z,X,{from:q,binary:Q=!1,preserveNewlines:$=!1}={})=>{let J=Q||D0.has(X),Y=y2(Z,q),H=_7({subprocessStdout:Y,subprocess:Z,binary:J,shouldEncode:!0,encoding:X,preserveNewlines:$});return Kj(H,Y,Z)},Kj=async function*(Z,X,q){try{yield*Z}finally{if(X.readable)X.destroy();await q}};var gZ=B(()=>{f1();D1();M7()});import{finished as Uj}from"node:stream/promises";var t6=async(Z,X,q,{isSameDirection:Q,stopOnExit:$=!1}={})=>{let J=Gj(Z,q),Y=new AbortController;try{await Promise.race([...$?[q.exitPromise]:[],Uj(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!J.stdinCleanedUp)Bj(H,X,q,Q)}finally{Y.abort()}},Gj=(Z,{originalStreams:X,subprocess:q})=>{let[Q]=X,$={stdinCleanedUp:!1};if(Z===Q)Wj(Z,q,$);return $},Wj=(Z,X,q)=>{let{_destroy:Q}=Z;Z._destroy=(...$)=>{Vj(X,q),Q.call(Z,...$)}},Vj=({exitCode:Z,signalCode:X},q)=>{if(Z!==null||X!==null)q.stdinCleanedUp=!0},Bj=(Z,X,q,Q)=>{if(!Lj(Z,X,q,Q))throw Z},Lj=(Z,X,q,Q=!0)=>{if(q.propagating)return gK(Z)||h2(Z);return q.propagating=!0,mZ(q,X)===Q?gK(Z):h2(Z)},mZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",h2=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",gK=(Z)=>Z?.code==="EPIPE";var e6=()=>{};import{finished as mK}from"node:stream/promises";var uZ=async(Z)=>{if(Z===void 0)return;try{await pZ(Z)}catch{}},uK=async(Z)=>{if(Z===void 0)return;try{await dZ(Z)}catch{}},pZ=async(Z)=>{await mK(Z,{cleanup:!0,readable:!1,writable:!0})},dZ=async(Z)=>{await mK(Z,{cleanup:!0,readable:!0,writable:!1})},R7=async(Z,X)=>{if(await Z,X)throw X},F7=(Z,X,q)=>{if(q&&!h2(q))Z.destroy(q);else if(X)Z.destroy()};var cZ=B(()=>{e6()});import{Readable as zj}from"node:stream";import{callbackify as _j}from"node:util";var D7=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,binary:$=!0,preserveNewlines:J=!0}={})=>{let Y=$||D0.has(q),{subprocessStdout:H,waitReadableDestroy:U}=lZ(Z,Q,X),{readableEncoding:G,readableObjectMode:W,readableHighWaterMark:V}=nZ(H,Y),{read:L,onStdoutDataDone:z}=iZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:q,preserveNewlines:J}),_=new zj({read:L,destroy:_j(oZ.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:U})),highWaterMark:V,objectMode:W,encoding:G});return aZ({subprocessStdout:H,onStdoutDataDone:z,readable:_,subprocess:Z}),_},lZ=(Z,X,q)=>{let Q=y2(Z,X),$=s6(q,Q,"readableDestroy");return{subprocessStdout:Q,waitReadableDestroy:$}},nZ=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q},Q)=>Q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:fZ},iZ=({subprocessStdout:Z,subprocess:X,binary:q,encoding:Q,preserveNewlines:$})=>{let J=c0(),Y=_7({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:!q,encoding:Q,preserveNewlines:$});return{read(){Mj(this,Y,J)},onStdoutDataDone:J}},Mj=async(Z,X,q)=>{try{let{value:Q,done:$}=await X.next();if($)q.resolve();else Z.push(Q)}catch{}},aZ=async({subprocessStdout:Z,onStdoutDataDone:X,readable:q,subprocess:Q,subprocessStdin:$})=>{try{if(await dZ(Z),await Q,await uZ($),await X,q.readable)q.push(null)}catch(J){await uZ($),pK(q,await Rj(Q,J))}},Rj=async(Z,X)=>{if(X.code!=="ERR_STREAM_PREMATURE_CLOSE")return X;try{await Z}catch(q){return q}return X},oZ=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:q},Q)=>{if(!await S2(q,X))return;pK(Z,Q),await R7(X,Q)},pK=(Z,X)=>{F7(Z,Z.readable,X)};var A7=B(()=>{f1();D1();M7();I2();r6();cZ()});import{Readable as Fj,Writable as Dj,Duplex as Aj}from"node:stream";var T7=(Z,X)=>Fj.toWeb(Z.readable(X)),dK=(Z,X)=>Dj.toWeb(Z.writable(X)),cK=(Z,X)=>Aj.toWeb(Z.duplex(X));var sZ=()=>{};var nK=({source:Z,sourcePromise:X,boundOptions:q,createNested:Q},...$)=>{let J=U8(),{destination:Y,destinationStream:H,destinationError:U,from:G,unpipeSignal:W}=Tj(q,Q,$),{sourceStream:V,sourceError:L}=Ij(Z,G),{options:z,fileDescriptors:_}=l0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:z,sourceError:L,destination:Y,destinationStream:H,destinationError:U,unpipeSignal:W,fileDescriptors:_,startTime:J}},Tj=(Z,X,q)=>{try{let{destination:Q,pipeOptions:{from:$,to:J,unpipeSignal:Y}={}}=jj(Z,X,...q),H=e8(Q,J);return{destination:Q,destinationStream:H,from:$,unpipeSignal:Y}}catch(Q){return{destinationError:Q}}},jj=(Z,X,q,...Q)=>{if(Array.isArray(q))return{destination:X(lK,Z)(q,...Q),pipeOptions:Z};if(typeof q==="string"||q instanceof URL||V3(q)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[$,J,Y]=t4(q,...Q);return{destination:X(lK)($,J,Y),pipeOptions:Y}}if(l0.has(q)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:q,pipeOptions:Q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${q}`)},lK=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),Ij=(Z,X)=>{try{return{sourceStream:y2(Z,X)}}catch(q){return{sourceError:q}}};var iK=B(()=>{L3();G8();D1();M2()});var oK=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q,fileDescriptors:$,sourceOptions:J,startTime:Y})=>{let H=wj({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q});if(H!==void 0)throw rZ({error:H,fileDescriptors:$,sourceOptions:J,startTime:Y})},wj=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q})=>{if(X!==void 0&&Q!==void 0)return Q;if(Q!==void 0)return vZ(Z),Q;if(X!==void 0)return EZ(q),X},rZ=({error:Z,fileDescriptors:X,sourceOptions:q,startTime:Q})=>P2({error:Z,command:aK,escapedCommand:aK,fileDescriptors:X,options:q,startTime:Q,isSync:!1}),aK="source.pipe(destination)";var tZ=B(()=>{m6();V7()});var sK=async(Z)=>{let[{status:X,reason:q,value:Q=q},{status:$,reason:J,value:Y=J}]=await Z;if(!Y.pipedFrom.includes(Q))Y.pipedFrom.push(Q);if($==="rejected")throw Y;if(X==="rejected")throw Q;return Y};var rK=()=>{};import{finished as Oj}from"node:stream/promises";var tK=(Z,X,q)=>{let Q=j7.has(X)?Nj(Z,X):kj(Z,X);return h1(Z,Pj,q.signal),h1(X,Ej,q.signal),xj(X),Q},kj=(Z,X)=>{let q=l1([Z]);return C2(q,X),j7.set(X,q),q},Nj=(Z,X)=>{let q=j7.get(X);return q.add(Z),q},xj=async(Z)=>{try{await Oj(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}j7.delete(Z)},j7,Pj=2,Ej=1;var eK=B(()=>{W7();T8();V7();j7=new WeakMap});import{aborted as vj}from"node:util";var ZU=(Z,X)=>Z===void 0?[]:[yj(Z,X)],yj=async(Z,{sourceStream:X,mergedStream:q,fileDescriptors:Q,sourceOptions:$,startTime:J})=>{await vj(Z,X),await q.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw rZ({error:Y,fileDescriptors:Q,sourceOptions:$,startTime:J})};var XU=B(()=>{tZ()});var I7=(Z,...X)=>{if(s(X[0]))return I7.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:q,...Q}=nK(Z,...X),$=new AbortController,J=nj({...Q,destination:q,pipeFailureController:$});return J.pipe=I7.bind(void 0,{...Z,source:q,sourcePromise:J,boundOptions:{}}),Cj(J,q,$.signal),J},Cj=(Z,X,q)=>{if(X===void 0)return;Sj(Z,X),gj(Z,X,q)},Sj=(Z,X)=>{let q=l0.get(X);l0.set(Z,q),Z.stdio=X.stdio,Z.all=X.all;let{options:{encoding:Q}}=q,$=z7();Z[Symbol.asyncIterator]=b2.bind(void 0,Z,Q,{}),Z.iterable=b2.bind(void 0,Z,Q),Z.readable=hj.bind(void 0,Z,{subprocess:Z,concurrentStreams:$,encoding:Q}),Z.readableStream=T7.bind(void 0,Z),bj(Z,X)},bj=(Z,X)=>{if(X.all===void 0){Z.all=void 0;return}Object.defineProperty(Z,"all",{get(){qU(Z,X.all);let q=Z.readable({from:"all"});return qU(Z,q),q},enumerable:!0,configurable:!0})},qU=(Z,X)=>{Object.defineProperty(Z,"all",{value:X,writable:!0,enumerable:!0,configurable:!0})},hj=(Z,X,...q)=>{let Q=D7(X,...q);return fj(Z,Q),Q},fj=async(Z,X)=>{try{await Z}catch(q){X.destroy(q)}},gj=(Z,X,q)=>{Z.sendMessage=X.sendMessage,Z.getOneMessage=mj.bind(void 0,X,q),Z.getEachMessage=dj.bind(void 0,Z,X,q)},mj=(Z,X,...q)=>{let Q=new AbortController,$=Z.getOneMessage(...QU(q,Q.signal,IZ));return uj(X,$,Q)},uj=async(Z,X,q)=>{try{return await Promise.race([X,pj(Z,q.signal)])}finally{q.abort()}},pj=(Z,X)=>new Promise((q,Q)=>{if(Z.aborted){Q(Z.reason);return}Z.addEventListener("abort",()=>{Q(Z.reason)},{once:!0,signal:X})}),dj=(Z,X,q,...Q)=>{let $=new AbortController,J=X.getEachMessage(...QU(Q,$.signal,OZ));return lj(q,$),cj(Z,J,$)},cj=async function*(Z,X,q){try{yield*X}finally{q.abort(),await Z}},QU=(Z,X,q)=>{if(Z[0]===null)return Z;let[Q]=Z;return[{...Q,[q]:{signal:X,shouldAwait:!1}}]},lj=(Z,X)=>{if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},nj=async({sourcePromise:Z,sourceStream:X,sourceOptions:q,sourceError:Q,destination:$,destinationStream:J,destinationError:Y,unpipeSignal:H,fileDescriptors:U,startTime:G,pipeFailureController:W})=>{let V=new AbortController;try{let L=ij(Z,$);oK({sourceStream:X,sourceError:Q,destinationStream:J,destinationError:Y,fileDescriptors:U,sourceOptions:q,startTime:G});let z=tK(X,J,V);return await Promise.race([sK(L),...ZU(H,{sourceStream:X,mergedStream:z,sourceOptions:q,fileDescriptors:U,startTime:G})])}catch(L){throw W.abort(L),L}finally{V.abort()}},ij=(Z,X)=>Promise.allSettled([Z,X]);var $U=B(()=>{t0();D1();r6();gZ();A7();sZ();wZ();U7();iK();tZ();rK();eK();XU()});import{setImmediate as aj}from"node:timers/promises";var JU=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,buffer:$,maxBuffer:J,lines:Y,allMixed:H,stripFinalNewline:U,verboseInfo:G,streamInfo:W})=>{let V=oj({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:H,verboseInfo:G,streamInfo:W});if(!$){await Promise.all([sj(Z),V]);return}let L=WZ(U,q),z=hZ({stream:Z,onStreamEnd:X,lines:Y,encoding:Q,stripFinalNewline:L,allMixed:H}),[_]=await Promise.all([rj({stream:Z,iterable:z,fdNumber:q,encoding:Q,maxBuffer:J,lines:Y}),V]);return _},oj=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:$,verboseInfo:J,streamInfo:{fileDescriptors:Y}})=>{if(!K7({stdioItems:Y[q]?.stdioItems,encoding:Q,verboseInfo:J,fdNumber:q}))return;let H=hZ({stream:Z,onStreamEnd:X,lines:!0,encoding:Q,stripFinalNewline:!0,allMixed:$});await EH(H,Z,q,J)},sj=async(Z)=>{if(await aj(),Z.readableFlowing===null)Z.resume()},rj=async({stream:Z,stream:{readableObjectMode:X},iterable:q,fdNumber:Q,encoding:$,maxBuffer:J,lines:Y})=>{try{if(X||Y)return await u8(q,{maxBuffer:J});if($==="buffer")return new Uint8Array(await p8(q,{maxBuffer:J}));return await c8(q,{maxBuffer:J})}catch(H){return YU(GY({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:$,fdNumber:Q}))}},eZ=async(Z)=>{try{return await Z}catch(X){return YU(X)}},YU=({bufferedData:Z})=>m$(Z)?new Uint8Array(Z):Z;var ZX=B(()=>{l8();F0();FZ();M7();p1();c6()});var HU=({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:$,stripFinalNewline:J,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((U,G)=>XX({stream:U,fdNumber:G,encoding:X,buffer:q[G],maxBuffer:Q[G],lines:$[G],allMixed:!1,stripFinalNewline:J,verboseInfo:Y,streamInfo:H})),XX=async({stream:Z,fdNumber:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:G})=>{if(!Z)return;let W=t6(Z,X,G);if(mZ(G,X)){await W;return}let[V]=await Promise.all([JU({stream:Z,onStreamEnd:W,fdNumber:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:G}),W]);return V};var qX=B(()=>{ZX();e6()});var KU=({stdout:Z,stderr:X},{all:q})=>q&&(Z||X)?l1([Z,X].filter(Boolean)):void 0,UU=({subprocess:Z,all:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,stripFinalNewline:Y,verboseInfo:H,streamInfo:U})=>XX({...tj(Z,X,Q),fdNumber:"all",encoding:q,maxBuffer:$[1]+$[2],lines:J[1]||J[2],allMixed:ej(Z,X),stripFinalNewline:Y,verboseInfo:H,streamInfo:U}),tj=({stdout:Z,stderr:X},q,[,Q,$])=>{let J=Q||$;if(!J)return{stream:q,buffer:J};if(!Q)return{stream:X,buffer:J};if(!$)return{stream:Z,buffer:J};return{stream:q,buffer:J}},ej=({stdout:Z,stderr:X},q)=>q&&Z&&X&&Z.readableObjectMode!==X.readableObjectMode;var QX=B(()=>{W7();qX()});var GU=(Z)=>F2(Z,"ipc"),WU=(Z,X)=>{let q=K8(Z);p0({type:"ipc",verboseMessage:q,fdNumber:"ipc",verboseInfo:X})};var VU=B(()=>{D2();_1()});var BU=async({subprocess:Z,buffer:X,maxBuffer:q,ipc:Q,ipcOutput:$,verboseInfo:J})=>{if(!Q)return $;let Y=GU(J),H=X1(X,"ipc"),U=X1(q,"ipc");for await(let G of kZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:Q,shouldAwait:!1,reference:!0})){if(H)WY(Z,$,U),$.push(G);if(Y)WU(G,J)}return $},LU=async(Z,X)=>{return await Promise.allSettled([Z]),X};var zU=B(()=>{p1();VU();q1();U7()});import{once as ZI}from"node:events";var _U=async({subprocess:Z,kill:X,all:q,options:{encoding:Q,buffer:$,maxBuffer:J,lines:Y,timeoutDuration:H,cancelSignal:U,gracefulCancel:G,forceKillAfterDelay:W,stripFinalNewline:V,ipc:L,ipcInput:z},context:_,verboseInfo:M,fileDescriptors:R,originalStreams:F,onInternalError:k,controller:D})=>{let w=fH(Z,_),T={originalStreams:F,fileDescriptors:R,subprocess:Z,exitPromise:w,propagating:!1},j=HU({subprocess:Z,encoding:Q,buffer:$,maxBuffer:J,lines:Y,stripFinalNewline:V,verboseInfo:M,streamInfo:T}),A=UU({subprocess:Z,all:q,encoding:Q,buffer:$,maxBuffer:J,lines:Y,stripFinalNewline:V,verboseInfo:M,streamInfo:T}),S=[],O=BU({subprocess:Z,buffer:$,maxBuffer:J,ipc:L,ipcOutput:S,verboseInfo:M}),x=XI(F,Z,T),E=qI(R,T);try{return await Promise.race([Promise.all([{},mH(w),Promise.all(j),A,O,E9(Z,z,L),...x,...E]),k,QI(Z,D),...O9(X,H,_,D),...nJ({kill:X,cancelSignal:U,gracefulCancel:G,context:_,controller:D}),...I9({subprocess:Z,kill:X,cancelSignal:U,gracefulCancel:G,forceKillAfterDelay:W,context:_,controller:D})])}catch(h){return _.terminationReason??="other",Promise.all([{error:h},w,Promise.all(j.map((i)=>eZ(i))),eZ(A),LU(O,S),Promise.allSettled(x),Promise.allSettled(E)])}},XI=(Z,X,q)=>Z.map((Q,$)=>Q===X.stdio[$]?void 0:t6(Q,$,q)),qI=(Z,X)=>Z.flatMap(({stdioItems:q},Q)=>q.filter(({value:$,stream:J=$})=>S0(J,{checkOpen:!1})&&!y0(J)).map(({type:$,value:J,stream:Y=J})=>t6(Y,Q,X,{isSameDirection:N0.has($),stopOnExit:$==="native"}))),QI=async(Z,{signal:X})=>{let[q]=await ZI(Z,"error",{signal:X});throw q};var MU=B(()=>{u1();g3();P3();f3();Z1();W0();ZX();zU();u3();QX();qX();TZ();e6()});import{Writable as $I}from"node:stream";import{callbackify as RU}from"node:util";var FU=({subprocess:Z,concurrentStreams:X},{to:q}={})=>{let{subprocessStdin:Q,waitWritableFinal:$,waitWritableDestroy:J}=$X(Z,q,X),Y=new $I({...JX(Q,Z,$),destroy:RU(HX.bind(void 0,{subprocessStdin:Q,subprocess:Z,waitWritableFinal:$,waitWritableDestroy:J})),highWaterMark:Q.writableHighWaterMark,objectMode:Q.writableObjectMode});return YX(Q,Y,void 0,Z),Y},$X=(Z,X,q)=>{let Q=e8(Z,X),$=s6(q,Q,"writableFinal"),J=s6(q,Q,"writableDestroy");return{subprocessStdin:Q,waitWritableFinal:$,waitWritableDestroy:J}},JX=(Z,X,q)=>({write:JI.bind(void 0,Z),final:RU(YI.bind(void 0,Z,X,q))}),JI=(Z,X,q,Q)=>{if(Z.write(X,q))Q();else Z.once("drain",Q)},YI=async(Z,X,q)=>{if(!await S2(q,X))return;if(Z.writable)Z.end();await X},YX=async(Z,X,q,Q)=>{try{if(await pZ(Z),await Q,X.writable)X.end()}catch($){await uK(q),DU(X,await HI(Q,$))}},HI=async(Z,X)=>{if(!KI(X))return X;try{await Z}catch(q){return q}return X},KI=(Z)=>Z===void 0||h2(Z),HX=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:q,waitWritableDestroy:Q},$)=>{if(await S2(q,X),await S2(Q,X))DU(Z,$),await R7(X,$)},DU=(Z,X)=>{F7(Z,Z.writable,X)};var KX=B(()=>{D1();e6();r6();cZ()});import{Duplex as UI}from"node:stream";import{callbackify as GI}from"node:util";var AU=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,to:$,binary:J=!0,preserveNewlines:Y=!0}={})=>{let H=J||D0.has(q),{subprocessStdout:U,waitReadableDestroy:G}=lZ(Z,Q,X),{subprocessStdin:W,waitWritableFinal:V,waitWritableDestroy:L}=$X(Z,$,X),{readableEncoding:z,readableObjectMode:_,readableHighWaterMark:M}=nZ(U,H),{read:R,onStdoutDataDone:F}=iZ({subprocessStdout:U,subprocess:Z,binary:H,encoding:q,preserveNewlines:Y}),k=new UI({read:R,...JX(W,Z,V),destroy:GI(WI.bind(void 0,{subprocessStdout:U,subprocessStdin:W,subprocess:Z,waitReadableDestroy:G,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:M,writableHighWaterMark:W.writableHighWaterMark,readableObjectMode:_,writableObjectMode:W.writableObjectMode,encoding:z});return aZ({subprocessStdout:U,onStdoutDataDone:F,readable:k,subprocess:Z,subprocessStdin:W}),YX(W,k,U,Z),k},WI=async({subprocessStdout:Z,subprocessStdin:X,subprocess:q,waitReadableDestroy:Q,waitWritableFinal:$,waitWritableDestroy:J},Y)=>{await Promise.all([oZ({subprocessStdout:Z,subprocess:q,waitReadableDestroy:Q},Y),HX({subprocessStdin:X,subprocess:q,waitWritableFinal:$,waitWritableDestroy:J},Y)])};var TU=B(()=>{f1();A7();KX()});var jU=(Z,{encoding:X})=>{let q=z7();Z.readable=D7.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.writable=FU.bind(void 0,{subprocess:Z,concurrentStreams:q}),Z.duplex=AU.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.readableStream=T7.bind(void 0,Z),Z.writableStream=dK.bind(void 0,Z),Z.transformStream=cK.bind(void 0,Z),Z.iterable=b2.bind(void 0,Z,X),Z[Symbol.asyncIterator]=b2.bind(void 0,Z,X,{})};var IU=B(()=>{r6();A7();KX();TU();sZ();gZ()});var wU=(Z,X)=>Object.assign(Z,X);var OU=()=>{};import{setMaxListeners as VI}from"node:events";import{spawn as BI}from"node:child_process";var kU=(Z,X,q,Q)=>{let{file:$,commandArguments:J,command:Y,escapedCommand:H,startTime:U,verboseInfo:G,options:W,fileDescriptors:V}=LI(Z,X,q),{subprocess:L,promise:z,kill:_,all:M,convertedStreams:R}=_I({file:$,commandArguments:J,options:W,startTime:U,verboseInfo:G,command:Y,escapedCommand:H,fileDescriptors:V}),F=MI({promise:z,nodeChildProcess:L,kill:_,all:M,convertedStreams:R,options:W});return F.pipe=I7.bind(void 0,{source:F,sourcePromise:z,boundOptions:{},createNested:Q}),l0.set(F,{options:W,fileDescriptors:V}),F},LI=(Z,X,q)=>{let{command:Q,escapedCommand:$,startTime:J,verboseInfo:Y}=W8(Z,X,q),{file:H,commandArguments:U,options:G}=S8(Z,X,q),W=zI(G),V=WK(W,Y);return{file:H,commandArguments:U,command:Q,escapedCommand:$,startTime:J,verboseInfo:Y,options:W,fileDescriptors:V}},zI=({timeout:Z,signal:X,...q})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...q,timeoutDuration:Z}},_I=({file:Z,commandArguments:X,options:q,startTime:Q,verboseInfo:$,command:J,escapedCommand:Y,fileDescriptors:H})=>{let U;try{U=BI(...b8(Z,X,OK(q)))}catch(R){return QK({error:R,command:J,escapedCommand:Y,fileDescriptors:H,options:q,startTime:Q,verboseInfo:$})}let G=new AbortController;VI(1/0,G.signal);let W=[...U.stdio];TK(U,H,G),R9(U,q);let V={},L=c0(),z=cJ.bind(void 0,{kill:kK(U,q),options:q,onInternalError:L,context:V,controller:G});SK(z,q,G);let _=KU(U,q),M=FI({subprocess:U,kill:z,all:_,options:q,startTime:Q,verboseInfo:$,fileDescriptors:H,originalStreams:W,command:J,escapedCommand:Y,context:V,onInternalError:L,controller:G});return{subprocess:U,promise:M,kill:z,all:_}},MI=({promise:Z,nodeChildProcess:X,kill:q,all:Q,convertedStreams:$,options:J})=>{let Y=wU(Z,RI(X,Q));if(Y.kill=q??Y.kill,$===void 0)jU(Y,J);else Object.assign(Y,$);return sH(Y,X,J),Y},RI=(Z,X)=>({nodeChildProcess:Z,pid:Z.pid,stdin:Z.stdin,stdout:Z.stdout,stderr:Z.stderr,stdio:Z.stdio,all:X,kill:Z.kill.bind(Z)}),FI=async({subprocess:Z,kill:X,all:q,options:Q,startTime:$,verboseInfo:J,fileDescriptors:Y,originalStreams:H,command:U,escapedCommand:G,context:W,onInternalError:V,controller:L})=>{let[z,[_,M],R,F,k]=await _U({subprocess:Z,kill:X,all:q,options:Q,context:W,verboseInfo:J,fileDescriptors:Y,originalStreams:H,onInternalError:V,controller:L});L.abort(),V.resolve();let D=R.map((j,A)=>J1(j,Q,A)),w=J1(F,Q,"all"),T=DI({errorInfo:z,exitCode:_,signal:M,stdio:D,all:w,ipcOutput:k,context:W,options:Q,command:U,escapedCommand:G,startTime:$});return E2(T,J,Q)},DI=({errorInfo:Z,exitCode:X,signal:q,stdio:Q,all:$,ipcOutput:J,context:Y,options:H,command:U,escapedCommand:G,startTime:W})=>("error"in Z)?g6({error:Z.error,command:U,escapedCommand:G,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof Q1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:q,stdio:Q,all:$,ipcOutput:J,options:H,startTime:W,isSync:!1}):i8({command:U,escapedCommand:G,stdio:Q,all:$,ipcOutput:J,options:H,startTime:W});var NU=B(()=>{l8();j3();n3();D1();i3();NZ();x6();m6();a8();HK();VK();c6();jK();F8();NK();bK();$U();QX();MU();IU();I2();OU()});var w7=(Z,X)=>{let q={__proto__:null,...Z},Q=Object.fromEntries(Object.entries(X).map(([$,J])=>[$,AI($,q[$],J)]));return{...q,...Q}},AI=(Z,X,q)=>{if(TI.has(Z)&&s(X)&&s(q))return{...X,...q};return q},TI;var xU=B(()=>{t0();q1();TI=new Set(["env",...F3])});var f2=(Z,X,q,Q)=>{let $=(Y,H,U)=>f2(Y,H,q,U),J=(...Y)=>jI({mapArguments:Z,deepOptions:q,boundOptions:X,setBoundExeca:Q,createNested:$},...Y);if(Q!==void 0)Q(J,$,X);return J},jI=({mapArguments:Z,deepOptions:X={},boundOptions:q={},setBoundExeca:Q,createNested:$},J,...Y)=>{if(s(J))return $(Z,w7(q,J),Q);let{file:H,commandArguments:U,options:G,isSync:W}=II({mapArguments:Z,firstArgument:J,nextArguments:Y,deepOptions:X,boundOptions:q});return W?dH(H,U,G):kU(H,U,G,$)},II=({mapArguments:Z,firstArgument:X,nextArguments:q,deepOptions:Q,boundOptions:$})=>{let J=n$(X)?i$(X,q):[X,...q],[Y,H,U]=t4(...J),G=w7(w7(Q,$),U),{options:W=G,isSync:V=!1}=Z({options:G});return{file:Y,commandArguments:H,options:W,isSync:V}};var PU=B(()=>{t0();L3();a$();cH();NU();xU()});var EU=(Z,X,q)=>{Z.sync=X(wI,q),Z.s=Z.sync},vU=({options:Z})=>yU(Z),wI=({options:Z})=>({...yU(Z),isSync:!0}),yU=(Z)=>({options:{...OI(Z),...Z}}),OI=({input:Z,inputFile:X,stdio:q})=>Z===void 0&&X===void 0&&q===void 0?{stdin:"inherit"}:{},CU;var SU=B(()=>{CU={preferLocal:!0}});var UX,x0,Xc,qc,Qc,$c,Jc,Yc;var g2=B(()=>{PU();m3();SU();NZ();UX=f2(()=>({})),x0=f2(()=>({isSync:!0})),Xc=f2(N9),qc=f2(vU,{},CU,EU),{sendMessage:Qc,getOneMessage:$c,getEachMessage:Jc,getCancelSignal:Yc}=rH()});import{execSync as kI}from"child_process";function m2(Z,X){let Q=[];try{const q=L2(Q,O7`execSync: ${Z.slice(0,100)}`,0);return kI(Z,X)}catch($){var J=$,Y=1}finally{z2(Q,J,Y)}}var GX=B(()=>{L0()});async function NI(Z){if(process.platform==="win32"){let q=await UX(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim().split(/\r?\n/)[0]||null}let X=await UX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function xI(Z){if(process.platform==="win32")try{return m2(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return m2(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var WX,bU,k7;var N7=B(()=>{g2();GX();WX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,bU=WX?async(Z)=>WX(Z):NI,k7=WX??xI});function hU(Z,X){return{cmd:k7(Z)??Z,args:X}}var fU=B(()=>{N7()});import{dirname as PI,join as gU}from"path";async function u2(Z){try{return!!await bU(Z)}catch{return!1}}function SI(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function hI(){if(process.env.CURSOR_TRACE_ID)return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("cursor"))return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("windsurf"))return"windsurf";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("antigravity"))return"antigravity";let Z=process.env.__CFBundleIdentifier?.toLowerCase();if(Z?.includes("vscodium"))return"codium";if(Z?.includes("windsurf"))return"windsurf";if(Z?.includes("com.google.android.studio"))return"androidstudio";if(Z){for(let X of bI)if(Z.includes(X))return X}if(process.env.VisualStudioVersion)return"visualstudio";if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(process.platform==="darwin")return"pycharm";return"pycharm"}if(process.env.TERM==="xterm-ghostty")return"ghostty";if(process.env.TERM?.includes("kitty"))return"kitty";if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return"tmux";if(process.env.STY)return"screen";if(process.env.KONSOLE_VERSION)return"konsole";if(process.env.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(process.env.XTERM_VERSION)return"xterm";if(process.env.VTE_VERSION)return"vte-based";if(process.env.TERMINATOR_UUID)return"terminator";if(process.env.KITTY_WINDOW_ID)return"kitty";if(process.env.ALACRITTY_LOG)return"alacritty";if(process.env.TILIX_ID)return"tilix";if(process.env.WT_SESSION)return"windows-terminal";if(process.env.SESSIONNAME&&process.env.TERM==="cygwin")return"cygwin";if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return"conemu";if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(dU())return"ssh-session";if(process.env.TERM){let X=process.env.TERM;if(X.includes("alacritty"))return"alacritty";if(X.includes("rxvt"))return"rxvt";if(X.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function dU(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function wc(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return p2.platform}var J0,EI,vI,yI,pU,CI,bI,fI,p2;var Z4=B(()=>{A1();uU();f$();i0();fU();z0();N7();J0=c(()=>{let Z=mU(),X=Z0(),q=gU(X,`config${Z}.json`);if(!N().existsSync(q)){let $=process.env.CLAUDIN_CONFIG_DIR?X:PI(X),J=gU($,`.claudin${Z}.json`);if(N().existsSync(J))return J}return q}),EI=c(async()=>{try{let{default:Z}=await import("./index-1.1.33-pdret8nd.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});vI=c(async()=>{let Z=[];if(await u2("npm"))Z.push("npm");if(await u2("yarn"))Z.push("yarn");if(await u2("pnpm"))Z.push("pnpm");return Z}),yI=c(async()=>{let Z=[];if(await u2("bun"))Z.push("bun");if(await u2("deno"))Z.push("deno");if(await u2("node"))Z.push("node");return Z}),pU=c(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),CI=c(()=>{try{if(!pU())return!1;let{cmd:Z}=hU("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});bI=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];fI=c(()=>{if(e(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(e(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(e(process.env.RENDER))return"render";if(e(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(e(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(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(e(process.env.GITHUB_ACTIONS))return"github-actions";if(e(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(e(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(p2.platform==="darwin")return"unknown-darwin";if(p2.platform==="linux")return"unknown-linux";if(p2.platform==="win32")return"unknown-win32";return"unknown"});p2={hasInternetAccess:EI,isCI:e(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:hI(),isSSH:dU,getPackageManagers:vI,getRuntimes:yI,isRunningWithBun:c(h$),isWslEnvironment:pU,isNpmFromWindowsPath:CI,isConductor:SI,detectDeploymentEnvironment:fI}});import{unwatchFile as gI,watchFile as mI}from"fs";function pI(){return}function d2(Z){let X=a0.config;if(!X)return!1;let q=X.oauthAccount!==void 0&&Z.oauthAccount===void 0,Q=X.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return q||Q}function RX(Z){return BX.add(Z),()=>BX.delete(Z)}function X4(){for(let Z of BX)try{Z()}catch{}}function LX(Z){return{...Z,projects:lI(Z.projects)}}function V0(Z){let X=null;try{if(E7(J0(),w0,(Q)=>{let $=Z(Q);if($===Q)return Q;return X=LX($),X})&&X)q4(X),X4()}catch(q){let Q=B0(q);if(Q==="EACCES"||Q==="EPERM"||Q==="EROFS"){P(`Skipping global config write due to permission error: ${q}`,{level:"error"});return}P(`Failed to save config with lock: ${q}`,{level:"error"});let $=Y1(J0(),w0);if(d2($)){P("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"});return}let J=Z($);if(J===$)return;X=LX(J),P7(J0(),X,y1),q4(X),X4()}}function cI(){let Z=zX+_X;zX=0,_X=0}function MX(Z){if(Z.installMethod!==void 0)return Z;let X=Z,q="unknown",Q=Z.autoUpdates??!0;switch(X.autoUpdaterStatus){case"migrated":q="local";break;case"installed":q="native";break;case"disabled":Q=!1;break;case"enabled":case"no_permissions":case"not_configured":q="global";break;case void 0:break}return{...Z,installMethod:q,autoUpdates:Q}}function lI(Z){if(!Z)return Z;let X={},q=!1;for(let[Q,$]of Object.entries(Z)){let J=$;if(J.history!==void 0){q=!0;let{history:Y,...H}=J;X[Q]=H}else X[Q]=$}return q?X:Z}function iI(){if(VX)return;VX=!0;let Z=J0();mI(Z,{interval:nI,persistent:!1},(X)=>{if(X.mtimeMs<=a0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((q)=>{if(X.mtimeMs<=a0.mtime)return;let Q=O0(R0(q));if(Q===null||typeof Q!=="object")return;a0={config:MX({...w0(),...Q}),mtime:X.mtimeMs},x7({mtime:X.mtimeMs,size:X.size})}).catch(()=>{})}),Q4(async()=>{gI(Z),VX=!1})}function q4(Z){a0={config:Z,mtime:Date.now()},x7(null)}function a(){if(a0.config)return zX++,a0.config;_X++;try{let Z=null;try{Z=N().statSync(J0())}catch{}let X=MX(Y1(J0(),w0));return a0={config:X,mtime:Z?.mtimeMs??Date.now()},x7(Z?{mtime:Z.mtimeMs,size:Z.size}:null),iI(),X}catch{return MX(Y1(J0(),w0))}}function aI(){let Z=a().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function oI(Z){let X=a();if(X.customApiKeyResponses?.approved?.includes(Z))return"approved";if(X.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function eI(Z){a0.config=Z,a0.mtime=Z?Date.now():0}var uI,BX,a0,zX=0,_X=0,dI=20,nI=1000,VX=!1,sI,rI,tI;var c2=B(()=>{z6();v7();cU();j6();D6();b0();Z4();i1();z0();uI={...y1,autoUpdates:!1,knowledgeGraphEnabled:!0};BX=new Set;a0={config:null,mtime:0};Q4(async()=>{cI()});sI=Y1,rI=d2,tI=LX});import{dirname as Zw}from"path";function Y0(Z,X,q){let Q=Xw();if(!Q)return;let $={timestamp:new Date().toISOString(),level:Z,event:X,data:q??{}},J=N(),Y=m($)+`
63
- `;try{J.appendFileSync(Q,Y)}catch{try{J.mkdirSync(Zw(Q)),J.appendFileSync(Q,Y)}catch{}}}function Xw(){return process.env.CLAUDIN_DIAGNOSTICS_FILE}async function uc(Z,X,q){let Q=Date.now();Y0("info",`${Z}_started`);try{let $=await X(),J=q?q($):{};return Y0("info",`${Z}_completed`,{duration_ms:Date.now()-Q,...J}),$}catch($){throw Y0("error",`${Z}_failed`,{duration_ms:Date.now()-Q}),$}}var $4=B(()=>{z0();L0()});import{readFileSync as qw}from"node:fs";import{homedir as Qw}from"node:os";import{join as $w}from"node:path";function Jw(){if(T1!==void 0)return;try{let Z=process.env.CLAUDE_FEATURE_FLAGS_FILE??$w(Qw(),".claudin","feature-flags.json"),X=JSON.parse(qw(Z,"utf-8"));T1=X!==null&&typeof X==="object"&&!Array.isArray(X)?X:null}catch{T1=null}}function a1(Z,X){if(Jw(),Object.hasOwn(nU,Z))return nU[Z];if(T1!==null&&T1!==void 0&&Object.hasOwn(T1,Z))return T1[Z];if(Object.hasOwn(lU,Z))return lU[Z];return X}function o1(Z,X){return a1(Z,X)}function nc(Z,X,q){return a1(Z,X)}async function ic(Z,X){return a1(Z,X)}function ac(Z){return Boolean(a1(Z,!1))}async function oc(Z){return Boolean(a1(Z,!1))}async function sc(Z){return!1}function rc(Z,X){return a1(Z,X)}async function tc(Z,X){return a1(Z,X)}function Zl(){}function Xl(){T1=void 0}function ql(Z){return Yw}var lU,nU,T1,ec=async()=>null,Yw=()=>{};var y7=B(()=>{lU={tengu_sedge_lantern:!0,tengu_passport_quail:!0,tengu_coral_fern:!0,tengu_bramble_lintel:15,tengu_glacier_2xr:!0,tengu_scratch:!0},nU={tengu_disable_bypass_permissions_mode:!1}});function FX(Z){let{buffer:X,bytesRead:q}=N().readSync(Z,{length:4096});if(q===0)return"utf8";if(q>=2){if(X[0]===255&&X[1]===254)return"utf16le"}if(q>=3&&X[0]===239&&X[1]===187&&X[2]===191)return"utf8";return"utf8"}function DX(Z){let X=0,q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===`
64
- `)if(Q>0&&Z[Q-1]==="\r")X++;else q++;return X>q?"CRLF":"LF"}function Hw(Z){let X=N(),{resolvedPath:q,isSymlink:Q}=j1(X,Z);if(Q)P(`Reading through symlink: ${Z} -> ${q}`);let $=FX(q),J=X.readFileSync(q,{encoding:$}),Y=DX(J.slice(0,4096));return{content:J.replaceAll(`\r
65
- `,`
66
- `),encoding:$,lineEndings:Y}}function H1(Z){return Hw(Z).content}var J4=B(()=>{b0();z0()});class iU{cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let X=N(),q;try{q=X.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let Q=this.cache.get(Z);if(Q&&Q.mtime===q.mtimeMs)return{content:Q.content,encoding:Q.encoding};let $=oU(Z),J=X.readFileSync(Z,{encoding:$}).replaceAll(`\r
67
- `,`
68
- `);if(q.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:J,encoding:$,mtime:q.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:J,encoding:$}}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 AX;var aU=B(()=>{C7();z0();AX=new iU});var Bl,A0;var l2=B(()=>{A1();z0();v0();Bl=["macos","wsl"],A0=c(()=>{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){g(Z)}return"linux"}return"unknown"}catch(Z){return g(Z),"unknown"}})});import*as n2 from"path";import*as sU from"path/win32";function TX(Z){try{return m2(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function Kw(Z){if(Z==="git"){let X=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let q of X)if(TX(q))return q}try{let q=m2(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
69
- `).filter(Boolean),Q=r().toLowerCase();for(let $ of q){let J=n2.resolve($).toLowerCase();if(n2.dirname(J).toLowerCase()===Q||J.startsWith(Q+n2.sep)){P(`Skipping potentially malicious executable in current directory: ${$}`);continue}return $}return null}catch{return null}}function Al(){if(A0()==="windows"){let Z=Uw();process.env.SHELL=Z,P(`Using bash path: "${Z}"`)}}var Uw,S7,rU;var tU=B(()=>{A1();K1();b0();GX();r4();l2();Uw=c(()=>{if(process.env.CLAUDIN_GIT_BASH_PATH){if(TX(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=Kw("git");if(Z){let X=sU.join(Z,"..","..","bin","bash.exe");if(TX(X))return X}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)}),S7=z1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let X=Z.match(/^([A-Za-z]):[/\\]/);if(X)return"/"+X[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),rU=z1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let Q=X[1].toUpperCase(),$=Z.slice(("/cygdrive/"+X[1]).length);return Q+":"+($||"\\").replace(/\//g,"\\")}let q=Z.match(/^\/([A-Za-z])(\/|$)/);if(q){let Q=q[1].toUpperCase(),$=Z.slice(2);return Q+":"+($||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as eU}from"os";import{dirname as ZG,isAbsolute as Ww,join as Vw,normalize as jX,posix as XG,relative as Bw,resolve as Lw}from"path";function wX(Z,X){let q=X??r()??N().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof q!=="string")throw TypeError(`Base directory must be a string, received ${typeof q}`);if(Z.includes("\x00")||q.includes("\x00"))throw Error("Path contains null bytes");let Q=Z.trim();if(!Q)return jX(q).normalize("NFC");if(Q==="~")return eU().normalize("NFC");if(Q.startsWith("~/"))return Vw(eU(),Q.slice(2)).normalize("NFC");let $=Q;if(A0()==="windows"&&Q.match(/^\/[a-z]\//i))try{$=rU(Q)}catch{$=Q}if(Ww($))return jX($).normalize("NFC");return Lw(q,$).normalize("NFC")}function xl(Z){let X=Bw(r(),Z);return X.startsWith("..")?Z:X}function Pl(Z,X){if(A0()==="windows"){let q=S7(Z),Q=S7(X);return XG.relative(q,Q)}return XG.relative(Z,X)}function El(Z){if(A0()==="windows")return S7(Z);return Z}function vl(Z){let X=wX(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return ZG(X);try{if(N().statSync(X).isDirectory())return X}catch{}return ZG(X)}function yl(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function I1(Z){return jX(Z).replace(/\\/g,"/")}var Y4=B(()=>{K1();z0();l2();tU();Gw()});import{chmodSync as zw,writeFileSync as qG}from"fs";import{realpath as _w,stat as YG}from"fs/promises";import{homedir as HG}from"os";import{basename as OX,dirname as b7,extname as QG,isAbsolute as Mw,join as i2,normalize as Rw,relative as KG,resolve as Fw,sep as H4}from"path";async function sl(Z){try{return await YG(Z),!0}catch{return!1}}function rl(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(X){return g(X),null}}function tl(Z){let X=N();return Math.floor(X.statSync(Z).mtimeMs)}async function el(Z){let X=await N().stat(Z);return Math.floor(X.mtimeMs)}function Zn(Z,X,q,Q){let $=X;if(Q==="CRLF")$=X.replaceAll(`\r
70
- `,`
71
- `).split(`
72
- `).join(`\r
73
- `);o2(Z,$,{encoding:q}),AX.invalidate(Z)}function oU(Z){try{let X=N(),{resolvedPath:q}=j1(X,Z);return FX(q)}catch(X){if(JG(X))P(`detectFileEncoding failed for expected reason: ${X.code}`,{level:"debug"});else g(X);return"utf8"}}function Xn(Z,X="utf8"){try{let q=N(),{resolvedPath:Q}=j1(q,Z),{buffer:$,bytesRead:J}=q.readSync(Q,{length:4096}),Y=$.toString(X,0,J);return DX(Y)}catch(q){return g(q),"LF"}}function qn(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(X)=>" ".repeat(X.length))}function Aw(Z){let X=Z?wX(Z):void 0,q=X?KG(r(),X):void 0;return{absolutePath:X,relativePath:q}}function Qn(Z){let{relativePath:X}=Aw(Z);if(X&&!X.startsWith(".."))return X;let q=HG();if(Z.startsWith(q+H4))return"~"+Z.slice(q.length);return Z}function $n(Z){let X=N();try{let q=b7(Z),Q=OX(Z,QG(Z)),Y=X.readdirSync(q).filter((H)=>OX(H.name,QG(H.name))===Q&&i2(q,H.name)!==Z)[0];if(Y)return Y.name;return}catch(q){if(!a2(q))g(q);return}}async function Yn(Z){let X=r(),q=b7(X),Q=Z;try{let H=await _w(b7(Z));Q=i2(H,OX(Z))}catch{}let $=q===H4?H4:q+H4;if(!Q.startsWith($)||Q.startsWith(X+H4)||Q===X)return;let J=KG(q,Q),Y=i2(X,J);try{return await YG(Y),Y}catch{return}}function Tw(){return!o1("tengu_compact_line_prefix_killswitch",!1)}function Hn({content:Z,startLine:X}){if(!Z)return"";let q=Z.split(/\r?\n/);if(Tw())return q.map((Q,$)=>`${$+X}→${Q}`).join(`
74
- `);return q.map((Q,$)=>{let J=String($+X);if(J.length>=6)return`${J}→${Q}`;return`${J.padStart(6," ")}→${Q}`}).join(`
75
- `)}function Kn(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function Un(Z){try{return N().isDirEmptySync(Z)}catch(X){return a2(X)}}function Gn(Z){let{content:X}=AX.readFile(Z);return X}function o2(Z,X,q={encoding:"utf-8"}){let Q=N(),$=Z;try{let U=Q.readlinkSync(Z);$=Mw(U)?U:Fw(b7(Z),U),P(`Writing through symlink: ${Z} -> ${$}`)}catch{}let J=`${$}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=Q.statSync($).mode,H=!0,P(`Preserving file permissions: ${Y.toString(8)}`)}catch(U){if(!a2(U))throw U;if(q.mode!==void 0)Y=q.mode,P(`Setting permissions for new file: ${Y.toString(8)}`)}try{P(`Writing to temp file: ${J}`);let U={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)U.mode=q.mode;if(qG(J,X,U),P(`Temp file written successfully, size: ${X.length} bytes`),H&&Y!==void 0)zw(J,Y),P("Applied original permissions to temp file");P(`Renaming ${J} to ${$}`),Q.renameSync(J,$),P(`File ${$} written atomically`)}catch(U){P(`Failed to write file atomically: ${U}`,{level:"error"});try{P(`Cleaning up temp file: ${J}`),Q.unlinkSync(J)}catch(G){P(`Failed to clean up temp file: ${G}`)}P(`Falling back to non-atomic write for ${$}`);try{let G={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)G.mode=q.mode;qG($,X,G),P(`File ${$} written successfully with non-atomic fallback`)}catch(G){throw P(`Non-atomic write also failed: ${G}`),G}}}function Wn(){let Z=A0(),X=HG();if(Z==="macos")return i2(X,"Desktop");if(Z==="windows"){let Q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(Q){let J=`/mnt/c${Q.replace(/^[A-Z]:/,"")}/Desktop`;if(N().existsSync(J))return J}try{let J=N().readdirSync("/mnt/c/Users");for(let Y of J){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($){g($)}}let q=i2(X,"Desktop");if(N().existsSync(q))return q;return X}function Vn(Z,X=Dw){try{return N().statSync(Z).size<=X}catch{return!1}}function $G(Z){let X=Rw(Z);if(A0()==="windows")X=X.replace(/\//g,"\\").toLowerCase();return X}function Bn(Z,X){return $G(Z)===$G(X)}var Dw=262144,Jn="Note: your current working directory is";var C7=B(()=>{y7();K1();b0();i1();J4();aU();z0();v0();Y4();l2()});var GG=d((zn,UG)=>{var w1=$0("constants"),jw=process.cwd,h7=null,Iw=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!h7)h7=jw.call(process);return h7};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(f7=process.chdir,process.chdir=function(Z){h7=null,f7.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,f7)}var f7;UG.exports=ww;function ww(Z){if(w1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)q(Z);if(Z.chown=J(Z.chown),Z.fchown=J(Z.fchown),Z.lchown=J(Z.lchown),Z.chmod=Q(Z.chmod),Z.fchmod=Q(Z.fchmod),Z.lchmod=Q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=$(Z.chmodSync),Z.fchmodSync=$(Z.fchmodSync),Z.lchmodSync=$(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=U(Z.statSync),Z.fstatSync=U(Z.fstatSync),Z.lstatSync=U(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(Iw==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(W){function V(L,z,_){var M=Date.now(),R=0;W(L,z,function F(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-M<60000){if(setTimeout(function(){Z.stat(z,function(D,w){if(D&&D.code==="ENOENT")W(L,z,F);else _(k)})},R),R<100)R+=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,_,M,R,F){var k;if(F&&typeof F==="function"){var D=0;k=function(w,T,j){if(w&&w.code==="EAGAIN"&&D<10)return D++,W.call(Z,L,z,_,M,R,k);F.apply(this,arguments)}}return W.call(Z,L,z,_,M,R,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,_,M){var R=0;while(!0)try{return W.call(Z,V,L,z,_,M)}catch(F){if(F.code==="EAGAIN"&&R<10){R++;continue}throw F}}}(Z.readSync);function X(W){W.lchmod=function(V,L,z){W.open(V,w1.O_WRONLY|w1.O_SYMLINK,L,function(_,M){if(_){if(z)z(_);return}W.fchmod(M,L,function(R){W.close(M,function(F){if(z)z(R||F)})})})},W.lchmodSync=function(V,L){var z=W.openSync(V,w1.O_WRONLY|w1.O_SYMLINK,L),_=!0,M;try{M=W.fchmodSync(z,L),_=!1}finally{if(_)try{W.closeSync(z)}catch(R){}else W.closeSync(z)}return M}}function q(W){if(w1.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(V,L,z,_){W.open(V,w1.O_SYMLINK,function(M,R){if(M){if(_)_(M);return}W.futimes(R,L,z,function(F){W.close(R,function(k){if(_)_(F||k)})})})},W.lutimesSync=function(V,L,z){var _=W.openSync(V,w1.O_SYMLINK),M,R=!0;try{M=W.futimesSync(_,L,z),R=!1}finally{if(R)try{W.closeSync(_)}catch(F){}else W.closeSync(_)}return M};else if(W.futimes)W.lutimes=function(V,L,z,_){if(_)process.nextTick(_)},W.lutimesSync=function(){}}function Q(W){if(!W)return W;return function(V,L,z){return W.call(Z,V,L,function(_){if(G(_))_=null;if(z)z.apply(this,arguments)})}}function $(W){if(!W)return W;return function(V,L){try{return W.call(Z,V,L)}catch(z){if(!G(z))throw z}}}function J(W){if(!W)return W;return function(V,L,z,_){return W.call(Z,V,L,z,function(M){if(G(M))M=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(!G(_))throw _}}}function H(W){if(!W)return W;return function(V,L,z){if(typeof L==="function")z=L,L=null;function _(M,R){if(R){if(R.uid<0)R.uid+=4294967296;if(R.gid<0)R.gid+=4294967296}if(z)z.apply(this,arguments)}return L?W.call(Z,V,L,_):W.call(Z,V,_)}}function U(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 G(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 BG=d((_n,VG)=>{var WG=$0("stream").Stream;VG.exports=Ow;function Ow(Z){return{ReadStream:X,WriteStream:q};function X(Q,$){if(!(this instanceof X))return new X(Q,$);WG.call(this);var J=this;this.path=Q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,$=$||{};var Y=Object.keys($);for(var H=0,U=Y.length;H<U;H++){var G=Y[H];this[G]=$[G]}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(){J._read()});return}Z.open(this.path,this.flags,this.mode,function(W,V){if(W){J.emit("error",W),J.readable=!1;return}J.fd=V,J.emit("open",V),J._read()})}function q(Q,$){if(!(this instanceof q))return new q(Q,$);WG.call(this),this.path=Q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,$=$||{};var J=Object.keys($);for(var Y=0,H=J.length;Y<H;Y++){var U=J[Y];this[U]=$[U]}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 zG=d((Mn,LG)=>{LG.exports=Nw;var kw=Object.getPrototypeOf||function(Z){return Z.__proto__};function Nw(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:kw(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(q){Object.defineProperty(X,q,Object.getOwnPropertyDescriptor(Z,q))}),X}});var EX=d((Rn,PX)=>{var o=$0("fs"),xw=GG(),Pw=BG(),Ew=zG(),g7=$0("util"),U0,u7;if(typeof Symbol==="function"&&typeof Symbol.for==="function")U0=Symbol.for("graceful-fs.queue"),u7=Symbol.for("graceful-fs.previous");else U0="___graceful-fs.queue",u7="___graceful-fs.previous";function vw(){}function MG(Z,X){Object.defineProperty(Z,U0,{get:function(){return X}})}var s1=vw;if(g7.debuglog)s1=g7.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))s1=function(){var Z=g7.format.apply(g7,arguments);Z="GFS4: "+Z.split(/\n/).join(`
76
- GFS4: `),console.error(Z)};if(!o[U0]){if(kX=global[U0]||[],MG(o,kX),o.close=function(Z){function X(q,Q){return Z.call(o,q,function($){if(!$)_G();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty(X,u7,{value:Z}),X}(o.close),o.closeSync=function(Z){function X(q){Z.apply(o,arguments),_G()}return Object.defineProperty(X,u7,{value:Z}),X}(o.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){s1(o[U0]),$0("assert").equal(o[U0].length,0)})}var kX;if(!global[U0])MG(global,o[U0]);PX.exports=NX(Ew(o));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!o.__patched)PX.exports=NX(o),o.__patched=!0;function NX(Z){xw(Z),Z.gracefulify=NX,Z.createReadStream=T,Z.createWriteStream=j;var X=Z.readFile;Z.readFile=q;function q(O,x,E){if(typeof x==="function")E=x,x=null;return h(O,x,E);function h(i,v,y,p){return X(i,v,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))s2([h,[i,v,y],f,p||Date.now(),Date.now()]);else if(typeof y==="function")y.apply(this,arguments)})}}var Q=Z.writeFile;Z.writeFile=$;function $(O,x,E,h){if(typeof E==="function")h=E,E=null;return i(O,x,E,h);function i(v,y,p,f,H0){return Q(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))s2([i,[v,y,p,f],l,H0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var J=Z.appendFile;if(J)Z.appendFile=Y;function Y(O,x,E,h){if(typeof E==="function")h=E,E=null;return i(O,x,E,h);function i(v,y,p,f,H0){return J(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))s2([i,[v,y,p,f],l,H0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=U;function U(O,x,E,h){if(typeof E==="function")h=E,E=0;return i(O,x,E,h);function i(v,y,p,f,H0){return H(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))s2([i,[v,y,p,f],l,H0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var G=Z.readdir;Z.readdir=V;var W=/^v[0-5]\./;function V(O,x,E){if(typeof x==="function")E=x,x=null;var h=W.test(process.version)?function(y,p,f,H0){return G(y,i(y,p,f,H0))}:function(y,p,f,H0){return G(y,p,i(y,p,f,H0))};return h(O,x,E);function i(v,y,p,f){return function(H0,l){if(H0&&(H0.code==="EMFILE"||H0.code==="ENFILE"))s2([h,[v,y,p],H0,f||Date.now(),Date.now()]);else{if(l&&l.sort)l.sort();if(typeof p==="function")p.call(this,H0,l)}}}}if(process.version.substr(0,4)==="v0.8"){var L=Pw(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=w;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(O){F=O},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return D},set:function(O){D=O},enumerable:!0,configurable:!0});var M=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return M},set:function(O){M=O},enumerable:!0,configurable:!0});var R=D;Object.defineProperty(Z,"FileWriteStream",{get:function(){return R},set:function(O){R=O},enumerable:!0,configurable:!0});function F(O,x){if(this instanceof F)return z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function k(){var O=this;S(O.path,O.flags,O.mode,function(x,E){if(x){if(O.autoClose)O.destroy();O.emit("error",x)}else O.fd=E,O.emit("open",E),O.read()})}function D(O,x){if(this instanceof D)return _.apply(this,arguments),this;else return D.apply(Object.create(D.prototype),arguments)}function w(){var O=this;S(O.path,O.flags,O.mode,function(x,E){if(x)O.destroy(),O.emit("error",x);else O.fd=E,O.emit("open",E)})}function T(O,x){return new Z.ReadStream(O,x)}function j(O,x){return new Z.WriteStream(O,x)}var A=Z.open;Z.open=S;function S(O,x,E,h){if(typeof E==="function")h=E,E=null;return i(O,x,E,h);function i(v,y,p,f,H0){return A(v,y,p,function(l,EE){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))s2([i,[v,y,p,f],l,H0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}return Z}function s2(Z){s1("ENQUEUE",Z[0].name,Z[1]),o[U0].push(Z),xX()}var m7;function _G(){var Z=Date.now();for(var X=0;X<o[U0].length;++X)if(o[U0][X].length>2)o[U0][X][3]=Z,o[U0][X][4]=Z;xX()}function xX(){if(clearTimeout(m7),m7=void 0,o[U0].length===0)return;var Z=o[U0].shift(),X=Z[0],q=Z[1],Q=Z[2],$=Z[3],J=Z[4];if($===void 0)s1("RETRY",X.name,q),X.apply(null,q);else if(Date.now()-$>=60000){s1("TIMEOUT",X.name,q);var Y=q.pop();if(typeof Y==="function")Y.call(null,Q)}else{var H=Date.now()-J,U=Math.max(J-$,1),G=Math.min(U*1.2,100);if(H>=G)s1("RETRY",X.name,q),X.apply(null,q.concat([$]));else o[U0].push(Z)}if(m7===void 0)m7=setTimeout(xX,0)}});var FG=d((Fn,RG)=>{function P0(Z,X){if(typeof X==="boolean")X={forever:X};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=X||{},this._maxRetryTime=X&&X.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}RG.exports=P0;P0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};P0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};P0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var X=new Date().getTime();if(Z&&X-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(Z);var q=this._timeouts.shift();if(q===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),q=this._timeouts.shift();else return!1;var Q=this,$=setTimeout(function(){if(Q._attempts++,Q._operationTimeoutCb){if(Q._timeout=setTimeout(function(){Q._operationTimeoutCb(Q._attempts)},Q._operationTimeout),Q._options.unref)Q._timeout.unref()}Q._fn(Q._attempts)},q);if(this._options.unref)$.unref();return!0};P0.prototype.attempt=function(Z,X){if(this._fn=Z,X){if(X.timeout)this._operationTimeout=X.timeout;if(X.cb)this._operationTimeoutCb=X.cb}var q=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){q._operationTimeoutCb()},q._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};P0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};P0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};P0.prototype.start=P0.prototype.try;P0.prototype.errors=function(){return this._errors};P0.prototype.attempts=function(){return this._attempts};P0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},X=null,q=0;for(var Q=0;Q<this._errors.length;Q++){var $=this._errors[Q],J=$.message,Y=(Z[J]||0)+1;if(Z[J]=Y,Y>=q)X=$,q=Y}return X}});var AG=d((Cw)=>{var yw=FG();Cw.operation=function(Z){var X=Cw.timeouts(Z);return new yw(X,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};Cw.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var X={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var q in Z)X[q]=Z[q];if(X.minTimeout>X.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Q=[];for(var $=0;$<X.retries;$++)Q.push(this.createTimeout($,X));if(Z&&Z.forever&&!Q.length)Q.push(this.createTimeout($,X));return Q.sort(function(J,Y){return J-Y}),Q};Cw.createTimeout=function(Z,X){var q=X.randomize?Math.random()+1:1,Q=Math.round(q*X.minTimeout*Math.pow(X.factor,Z));return Q=Math.min(Q,X.maxTimeout),Q};Cw.wrap=function(Z,X,q){if(X instanceof Array)q=X,X=null;if(!q){q=[];for(var Q in Z)if(typeof Z[Q]==="function")q.push(Q)}for(var $=0;$<q.length;$++){var J=q[$],Y=Z[J];Z[J]=function(U){var G=Cw.operation(X),W=Array.prototype.slice.call(arguments,1),V=W.pop();W.push(function(L){if(G.retry(L))return;if(L)arguments[0]=G.mainError();V.apply(this,arguments)}),G.attempt(function(){U.apply(Z,W)})}.bind(Z,Y),Z[J].options=X}}});var TG=d((An,p7)=>{p7.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")p7.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")p7.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var jG=d((Tn,t2)=>{var n=global.process,r1=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(!r1(n))t2.exports=function(){return function(){}};else{if(vX=$0("assert"),t1=TG(),yX=/^win/i.test(n.platform),r2=$0("events"),typeof r2!=="function")r2=r2.EventEmitter;if(n.__signal_exit_emitter__)X0=n.__signal_exit_emitter__;else X0=n.__signal_exit_emitter__=new r2,X0.count=0,X0.emitted={};if(!X0.infinite)X0.setMaxListeners(1/0),X0.infinite=!0;t2.exports=function(Z,X){if(!r1(global.process))return function(){};if(vX.equal(typeof Z,"function","a callback must be provided for exit handler"),e1===!1)d7();var q="exit";if(X&&X.alwaysLast)q="afterexit";var Q=function(){if(X0.removeListener(q,Z),X0.listeners("exit").length===0&&X0.listeners("afterexit").length===0)K4()};return X0.on(q,Z),Q},K4=function(){if(!e1||!r1(global.process))return;e1=!1,t1.forEach(function(X){try{n.removeListener(X,U4[X])}catch(q){}}),n.emit=G4,n.reallyExit=c7,X0.count-=1},t2.exports.unload=K4,O1=function(X,q,Q){if(X0.emitted[X])return;X0.emitted[X]=!0,X0.emit(X,q,Q)},U4={},t1.forEach(function(Z){U4[Z]=function(){if(!r1(global.process))return;var q=n.listeners(Z);if(q.length===X0.count){if(K4(),O1("exit",null,Z),O1("afterexit",null,Z),yX&&Z==="SIGHUP")Z="SIGINT";n.kill(n.pid,Z)}}}),t2.exports.signals=function(){return t1},e1=!1,d7=function(){if(e1||!r1(global.process))return;e1=!0,X0.count+=1,t1=t1.filter(function(X){try{return n.on(X,U4[X]),!0}catch(q){return!1}}),n.emit=SX,n.reallyExit=CX},t2.exports.load=d7,c7=n.reallyExit,CX=function(X){if(!r1(global.process))return;n.exitCode=X||0,O1("exit",n.exitCode,null),O1("afterexit",n.exitCode,null),c7.call(n,n.exitCode)},G4=n.emit,SX=function(X,q){if(X==="exit"&&r1(global.process)){if(q!==void 0)n.exitCode=q;var Q=G4.apply(this,arguments);return O1("exit",n.exitCode,null),O1("afterexit",n.exitCode,null),Q}else return G4.apply(this,arguments)}}var vX,t1,yX,r2,X0,K4,O1,U4,e1,d7,c7,CX,G4,SX});var wG=d((mw,bX)=>{var IG=Symbol();function fw(Z,X,q){let Q=X[IG];if(Q)return X.stat(Z,(J,Y)=>{if(J)return q(J);q(null,Y.mtime,Q)});let $=new Date(Math.ceil(Date.now()/1000)*1000+5);X.utimes(Z,$,$,(J)=>{if(J)return q(J);X.stat(Z,(Y,H)=>{if(Y)return q(Y);let U=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(X,IG,{value:U}),q(null,H.mtime,U)})})}function gw(Z){let X=Date.now();if(Z==="s")X=Math.ceil(X/1000)*1000;return new Date(X)}mw.probe=fw;mw.getMtime=gw});var PG=d((ow,V4)=>{var dw=$0("path"),gX=EX(),cw=AG(),lw=jG(),OG=wG(),U1={};function W4(Z,X){return X.lockfilePath||`${Z}.lock`}function mX(Z,X,q){if(!X.realpath)return q(null,dw.resolve(Z));X.fs.realpath(Z,q)}function fX(Z,X,q){let Q=W4(Z,X);X.fs.mkdir(Q,($)=>{if(!$)return OG.probe(Q,X.fs,(J,Y,H)=>{if(J)return X.fs.rmdir(Q,()=>{}),q(J);q(null,Y,H)});if($.code!=="EEXIST")return q($);if(X.stale<=0)return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));X.fs.stat(Q,(J,Y)=>{if(J){if(J.code==="ENOENT")return fX(Z,{...X,stale:0},q);return q(J)}if(!kG(Y,X))return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));NG(Z,X,(H)=>{if(H)return q(H);fX(Z,{...X,stale:0},q)})})})}function kG(Z,X){return Z.mtime.getTime()<Date.now()-X.stale}function NG(Z,X,q){X.fs.rmdir(W4(Z,X),(Q)=>{if(Q&&Q.code!=="ENOENT")return q(Q);q()})}function l7(Z,X){let q=U1[Z];if(q.updateTimeout)return;if(q.updateDelay=q.updateDelay||X.update,q.updateTimeout=setTimeout(()=>{q.updateTimeout=null,X.fs.stat(q.lockfilePath,(Q,$)=>{let J=q.lastUpdate+X.stale<Date.now();if(Q){if(Q.code==="ENOENT"||J)return hX(Z,q,Object.assign(Q,{code:"ECOMPROMISED"}));return q.updateDelay=1000,l7(Z,X)}if(q.mtime.getTime()!==$.mtime.getTime())return hX(Z,q,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=OG.getMtime(q.mtimePrecision);X.fs.utimes(q.lockfilePath,H,H,(U)=>{let G=q.lastUpdate+X.stale<Date.now();if(q.released)return;if(U){if(U.code==="ENOENT"||G)return hX(Z,q,Object.assign(U,{code:"ECOMPROMISED"}));return q.updateDelay=1000,l7(Z,X)}q.mtime=H,q.lastUpdate=Date.now(),q.updateDelay=null,l7(Z,X)})})},q.updateDelay),q.updateTimeout.unref)q.updateTimeout.unref()}function hX(Z,X,q){if(X.released=!0,X.updateTimeout)clearTimeout(X.updateTimeout);if(U1[Z]===X)delete U1[Z];X.options.onCompromised(q)}function nw(Z,X,q){X={stale:1e4,update:null,realpath:!0,retries:0,fs:gX,onCompromised:(Q)=>{throw Q},...X},X.retries=X.retries||0,X.retries=typeof X.retries==="number"?{retries:X.retries}:X.retries,X.stale=Math.max(X.stale||0,2000),X.update=X.update==null?X.stale/2:X.update||0,X.update=Math.max(Math.min(X.update,X.stale/2),1000),mX(Z,X,(Q,$)=>{if(Q)return q(Q);let J=cw.operation(X.retries);J.attempt(()=>{fX($,X,(Y,H,U)=>{if(J.retry(Y))return;if(Y)return q(J.mainError());let G=U1[$]={lockfilePath:W4($,X),mtime:H,mtimePrecision:U,options:X,lastUpdate:Date.now()};l7($,X),q(null,(W)=>{if(G.released)return W&&W(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));xG($,{...X,realpath:!1},W)})})})})}function xG(Z,X,q){X={fs:gX,realpath:!0,...X},mX(Z,X,(Q,$)=>{if(Q)return q(Q);let J=U1[$];if(!J)return q(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));J.updateTimeout&&clearTimeout(J.updateTimeout),J.released=!0,delete U1[$],NG($,X,q)})}function iw(Z,X,q){X={stale:1e4,realpath:!0,fs:gX,...X},X.stale=Math.max(X.stale||0,2000),mX(Z,X,(Q,$)=>{if(Q)return q(Q);X.fs.stat(W4($,X),(J,Y)=>{if(J)return J.code==="ENOENT"?q(null,!1):q(J);return q(null,!kG(Y,X))})})}function aw(){return U1}lw(()=>{for(let Z in U1){let X=U1[Z].options;try{X.fs.rmdirSync(W4(Z,X))}catch(q){}}});ow.lock=nw;ow.unlock=xG;ow.check=iw;ow.getLocks=aw});var vG=d((jn,EG)=>{var ZO=EX();function XO(Z){let X=["mkdir","realpath","stat","rmdir","utimes"],q={...Z};return X.forEach((Q)=>{q[Q]=(...$)=>{let J=$.pop(),Y;try{Y=Z[`${Q}Sync`](...$)}catch(H){return J(H)}J(null,Y)}}),q}function qO(Z){return(...X)=>new Promise((q,Q)=>{X.push(($,J)=>{if($)Q($);else q(J)}),Z(...X)})}function QO(Z){return(...X)=>{let q,Q;if(X.push(($,J)=>{q=$,Q=J}),Z(...X),q)throw q;return Q}}function $O(Z){if(Z={...Z},Z.fs=XO(Z.fs||ZO),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}EG.exports={toPromise:qO,toSync:QO,toSyncOptions:$O}});var CG=d((In,k1)=>{var e2=PG(),{toPromise:n7,toSync:i7,toSyncOptions:uX}=vG();async function yG(Z,X){let q=await n7(e2.lock)(Z,X);return n7(q)}function JO(Z,X){let q=i7(e2.lock)(Z,uX(X));return i7(q)}function YO(Z,X){return n7(e2.unlock)(Z,X)}function HO(Z,X){return i7(e2.unlock)(Z,uX(X))}function KO(Z,X){return n7(e2.check)(Z,X)}function UO(Z,X){return i7(e2.check)(Z,uX(X))}k1.exports=yG;k1.exports.lock=yG;k1.exports.unlock=YO;k1.exports.lockSync=JO;k1.exports.unlockSync=HO;k1.exports.check=KO;k1.exports.checkSync=UO});function dX(){if(!pX)pX=CG();return pX}function wn(Z,X){return dX().lock(Z,X)}function SG(Z,X){return dX().lockSync(Z,X)}function On(Z,X){return dX().check(Z,X)}var pX;var bG=()=>{};import{basename as s7,dirname as r7,join as N1}from"path";function WO(){return lX}function x7(Z){fG=Z}function P7(Z,X,q){let Q=r7(Z);N().mkdirSync(Q);let J=X3(X,(Y,H)=>m(Y)!==m(q[H]));if(o2(Z,m(J,null,2),{encoding:"utf-8",mode:384}),Z===J0())lX++}function E7(Z,X,q){let Q=X(),$=r7(Z),J=N();J.mkdirSync($);let Y;try{let H=`${Z}.lock`,U=Date.now();if(Y=SG(Z,{lockfilePath:H,onCompromised:(z)=>{P(`Config lock compromised: ${z}`,{level:"error"})}}),Date.now()-U>100)P("Lock acquisition took longer than expected - another Claude instance may be running");if(fG&&Z===J0())try{let z=J.statSync(Z)}catch(z){if(B0(z)!=="ENOENT")throw z}let W=Y1(Z,X);if(Z===J0()&&d2(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"}),!1;let V=q(W);if(V===W)return!1;let L=X3(V,(z,_)=>m(z)!==m(Q[_]));try{let z=s7(Z),_=t7();try{J.mkdirSync(_)}catch(j){if(B0(j)!=="EEXIST")throw j}let M=60000,R=J.readdirStringSync(_).filter((j)=>j.startsWith(`${z}.backup.`)).sort().reverse(),F=R[0],k=F?Number(F.split(".backup.").pop()):0,D=Number.isNaN(k)||Date.now()-k>=M,w=LO(Z),T=D&&w;if(T){let j=N1(_,`${z}.backup.${Date.now()}`);J.copyFileSync(Z,j)}if(w){let A=T?J.readdirStringSync(_).filter((S)=>S.startsWith(`${z}.backup.`)).sort().reverse():R;for(let S of A.slice(5))try{J.unlinkSync(N1(_,S))}catch{}}}catch(z){if(B0(z)!=="ENOENT")P(`Failed to backup config: ${z}`,{level:"error"})}if(o2(Z,m(L,null,2),{encoding:"utf-8",mode:384}),Z===J0())lX++;return!0}finally{if(Y)Y()}}function VO(){return o7}function BO(){if(o7)return;let Z=Date.now();Y0("info","enable_configs_started"),o7=!0,Y1(J0(),w0,!0),Y0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function t7(){return N1(Z0(),"backups")}function hG(Z){let X=N(),q=s7(Z),Q=t7();try{let Y=X.readdirStringSync(Q).filter((H)=>H.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return N1(Q,Y)}catch{}let $=r7(Z);try{let Y=X.readdirStringSync($).filter((U)=>U.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return N1($,Y);let H=`${Z}.backup`;try{return X.statSync(H),H}catch{}}catch{}return null}function LO(Z){let X=N();try{return q0(R0(X.readFileSync(Z,{encoding:"utf-8"}))),!0}catch{return!1}}function zO(Z,X){let q=N(),Q=s7(Z),$=new Set;for(let J of[t7(),r7(Z)]){let Y;try{Y=q.readdirStringSync(J).filter((H)=>H.startsWith(`${Q}.backup.`)).sort().reverse()}catch{continue}for(let H of Y){let U=N1(J,H);if($.has(U))continue;$.add(U);try{let G=q0(R0(q.readFileSync(U,{encoding:"utf-8"})));return{config:{...X(),...G},backupPath:U}}catch{}}}return null}function Y1(Z,X,q){if(!o7)throw Error("Config accessed before allowed.");let Q=N();try{let $=Q.readFileSync(Z,{encoding:"utf-8"});try{let J=q0(R0($));return{...X(),...J}}catch(J){let Y=J instanceof Error?J.message:String(J);throw new a7(Y,Z,X())}}catch($){if(B0($)==="ENOENT"){let Y=hG(Z);if(Y)process.stderr.write(`
77
- Claude configuration file not found at: ${Z}
78
- A backup file exists at: ${Y}
79
- You can manually restore it by running: cp "${Y}" "${Z}"
80
-
81
- `);return X()}if($ instanceof a7&&q)throw $;if($ instanceof a7){if(P(`Config file corrupted, resetting to defaults: ${$.message}`,{level:"error"}),!cX){cX=!0;try{g($);let _=!1;try{Q.statSync(`${Z}.backup`),_=!0}catch{}}finally{cX=!1}}process.stderr.write(`
82
- Claude configuration file at ${Z} is corrupted: ${$.message}
83
- `);let Y=s7(Z),H=t7();try{Q.mkdirSync(H)}catch(_){if(B0(_)!=="EEXIST")throw _}let U=Q.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),G,W=!1,V=Q.readFileSync(Z,{encoding:"utf-8"});for(let _ of U)try{let M=Q.readFileSync(N1(H,_),{encoding:"utf-8"});if(V===M){W=!0;break}}catch{}if(!W){G=N1(H,`${Y}.corrupted.${Date.now()}`);try{Q.copyFileSync(Z,G),P(`Corrupted config backed up to: ${G}`,{level:"error"})}catch{}}let L=zO(Z,X);if(L){if(G)process.stderr.write(`The corrupted file has been backed up to: ${G}
84
- `);let _=!1;try{Q.copyFileSync(L.backupPath,Z),_=!0}catch{}return process.stderr.write(_?`Recovered configuration from backup: ${L.backupPath}
85
-
86
- `:`Recovered configuration from backup (in memory): ${L.backupPath}
87
-
88
- `),L.config}let z=hG(Z);if(G)process.stderr.write(`The corrupted file has been backed up to: ${G}
89
- `);else if(W)process.stderr.write(`The corrupted file has already been backed up.
90
- `);if(z)process.stderr.write(`A backup file exists at: ${z}
91
- You can manually restore it by running: cp "${z}" "${Z}"
92
-
93
- `);else process.stderr.write(`
94
- `)}return X()}}var cX=!1,fG=null,lX=0,o7=!1;var v7=B(()=>{_$();z6();c2();b0();$4();Z4();i0();i1();C7();z0();D6();bG();v0();L0()});import{readFile as _O}from"fs/promises";import{join as MO}from"path";async function B4(Z,X,q,Q){try{let $=await _O(MO(Z,"config"),"utf-8");return RO($,X,q,Q)}catch{return null}}function RO(Z,X,q,Q){let $=Z.split(`
95
- `),J=X.toLowerCase(),Y=Q.toLowerCase(),H=!1;for(let U of $){let G=U.trim();if(G.length===0||G[0]==="#"||G[0]===";")continue;if(G[0]==="["){H=TO(G,J,q);continue}if(!H)continue;let W=FO(G);if(W&&W.key.toLowerCase()===Y)return W.value}return null}function FO(Z){let X=0;while(X<Z.length&&jO(Z[X]))X++;if(X===0)return null;let q=Z.slice(0,X);while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=="=")return null;X++;while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;let Q=DO(Z,X);return{key:q,value:Q}}function DO(Z,X){let q="",Q=!1,$=X;while($<Z.length){let J=Z[$];if(!Q&&(J==="#"||J===";"))break;if(J==='"'){Q=!Q,$++;continue}if(J==="\\"&&$+1<Z.length){let Y=Z[$+1];if(Q){switch(Y){case"n":q+=`
96
- `;break;case"t":q+="\t";break;case"b":q+="\b";break;case'"':q+='"';break;case"\\":q+="\\";break;default:q+=Y;break}$+=2;continue}if(Y==="\\"){q+="\\",$+=2;continue}}q+=J,$++}if(!Q)q=AO(q);return q}function AO(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function TO(Z,X,q){let Q=1;while(Q<Z.length&&Z[Q]!=="]"&&Z[Q]!==" "&&Z[Q]!=="\t"&&Z[Q]!=='"')Q++;if(Z.slice(1,Q).toLowerCase()!==X)return!1;if(q===null)return Q<Z.length&&Z[Q]==="]";while(Q<Z.length&&(Z[Q]===" "||Z[Q]==="\t"))Q++;if(Q>=Z.length||Z[Q]!=='"')return!1;Q++;let J="";while(Q<Z.length&&Z[Q]!=='"'){if(Z[Q]==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(Y==="\\"||Y==='"'){J+=Y,Q+=2;continue}J+=Y,Q+=2;continue}J+=Z[Q],Q++}if(Q>=Z.length||Z[Q]!=='"')return!1;if(Q++,Q>=Z.length||Z[Q]!=="]")return!1;return J===q}function jO(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var gG=()=>{};import{unwatchFile as mG,watchFile as IO}from"fs";import{readdir as wO,readFile as Z2,stat as OO}from"fs/promises";import{join as h0,resolve as e7}from"path";function Zi(){Z6.clear()}async function o0(Z){let X=e7(Z??r()),q=Z6.get(X);if(q!==void 0)return q;let Q=z4(X);if(!Q)return Z6.set(X,null),null;let $=h0(Q,".git");try{if((await OO($)).isFile()){let Y=(await Z2($,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),U=e7(Q,H);return Z6.set(X,U),U}}return Z6.set(X,$),$}catch{return Z6.set(X,null),null}}function Z5(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((X)=>X==="."||X===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function nX(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function L4(Z){try{let X=(await Z2(h0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let q=X.slice(4).trim();if(q.startsWith("refs/heads/")){let $=q.slice(11);if(!Z5($))return null;return{type:"branch",name:$}}if(!Z5(q))return null;let Q=await X6(Z,q);return Q?{type:"detached",sha:Q}:{type:"detached",sha:""}}if(!nX(X))return null;return{type:"detached",sha:X}}catch{return null}}async function X6(Z,X){let q=await uG(Z,X);if(q)return q;let Q=await q6(Z);if(Q&&Q!==Z)return uG(Q,X);return null}async function uG(Z,X){try{let q=(await Z2(h0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(!Z5(Q))return null;return X6(Z,Q)}if(!nX(q))return null;return q}catch{}try{let q=await Z2(h0(Z,"packed-refs"),"utf-8");for(let Q of q.split(`
97
- `)){if(Q.startsWith("#")||Q.startsWith("^"))continue;let $=Q.indexOf(" ");if($===-1)continue;if(Q.slice($+1)===X){let J=Q.slice(0,$);return nX(J)?J:null}}}catch{}return null}async function q6(Z){try{let X=(await Z2(h0(Z,"commondir"),"utf-8")).trim();return e7(Z,X)}catch{return null}}async function kO(Z,X,q){try{let Q=(await Z2(h0(Z,X),"utf-8")).trim();if(Q.startsWith("ref:")){let $=Q.slice(4).trim();if($.startsWith(q)){let J=$.slice(q.length);if(!Z5(J))return null;return J}}}catch{}return null}class dG{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 o0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await q6(this.gitDir),this.watchPath(h0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(h0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Q4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),IO(Z,{interval:NO},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await L4(this.gitDir),X=this.commonDir??this.gitDir,q=Z?.type==="branch"?h0(X,"refs","heads",Z.name):null;if(q===this.branchRefPath)return;if(this.branchRefPath)mG(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((Q)=>Q!==this.branchRefPath);if(this.branchRefPath=q,!q)return;this.watchPath(q,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await pG(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)mG(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let q=this.cache.get(Z);if(q&&!q.dirty)return q.value;if(q)q.dirty=!1;let Q=await X(),$=this.cache.get(Z);if($&&!$.dirty)$.value=Q;if(!$)this.cache.set(Z,{value:Q,dirty:!1,compute:X});return Q}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function xO(){let Z=await o0();if(!Z)return"HEAD";let X=await L4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function PO(){let Z=await o0();if(!Z)return"";let X=await L4(Z);if(!X)return"";if(X.type==="branch")return await X6(Z,`refs/heads/${X.name}`)??"";return X.sha}async function EO(){let Z=await o0();if(!Z)return null;let X=await B4(Z,"remote","origin","url");if(X)return X;let q=await q6(Z);if(q&&q!==Z)return B4(q,"remote","origin","url");return null}async function vO(){let Z=await o0();if(!Z)return"main";let X=await q6(Z)??Z,q=await kO(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let Q of["main","master"])if(await X6(X,`refs/remotes/origin/${Q}`))return Q;return"main"}function cG(){return X5.get("branch",xO)}function lG(){return X5.get("head",PO)}function nG(){return X5.get("remoteUrl",EO)}function iG(){return X5.get("defaultBranch",vO)}async function Xi(Z){let X=await o0(Z);if(!X)return null;let q=await L4(X);if(!q)return null;if(q.type==="branch")return X6(X,`refs/heads/${q.name}`);return q.sha}async function qi(Z){let X;try{let Q=(await Z2(h0(Z,".git"),"utf-8")).trim();if(!Q.startsWith("gitdir:"))return null;X=e7(Z,Q.slice(7).trim())}catch{return null}let q=await L4(X);if(!q)return null;if(q.type==="branch")return X6(X,`refs/heads/${q.name}`);return q.sha}async function Qi(Z){let X=await o0(Z);if(!X)return null;let q=await B4(X,"remote","origin","url");if(q)return q;let Q=await q6(X);if(Q&&Q!==X)return B4(Q,"remote","origin","url");return null}async function aG(){try{let Z=await o0();if(!Z)return 0;let X=await q6(Z)??Z;return(await wO(h0(X,"worktrees"))).length+1}catch{return 1}}var Z6,NO=1000,X5;var oG=B(()=>{x1();cU();K1();_4();gG();Z6=new Map;X5=new dG});import{readFileSync as iX,realpathSync as sG,statSync as rG}from"fs";import{readdir as yO,stat as CO}from"fs/promises";import{basename as SO,dirname as aX,join as _0,resolve as q5,sep as tG}from"path";function bO(){function Z(X){let q=eG(X);return q===ZW?null:q}return Z.cache=eG.cache,Z}function hO(){function Z(X){let q=z4(X);if(!q)return null;return oX(q)}return Z.cache=oX.cache,Z}function fO(Z){let X=new Set,q=[];for(let Q of Z){if(!Q||X.has(Q))continue;X.add(Q),q.push(Q)}return q}function Mi(Z,X){return fO([X2(Z),...X.map((q)=>X2(q))])}async function Ri(Z,X){let q=X?.maxDepth??3,Q=X?.maxDirs??1500,$=[],J=0,Y=async(U)=>{try{return await CO(_0(U,".git")),!0}catch{return!1}},H=async(U,G)=>{if(G>q||J>=Q)return;let W;try{W=await yO(U,{withFileTypes:!0})}catch{return}for(let V of W){if(J>=Q)return;if(!V.isDirectory())continue;if(V.name.startsWith(".")||gO.has(V.name))continue;let L=_0(U,V.name);if(J++,await Y(L)){$.push(oX(L.normalize("NFC")));continue}await H(L,G+1)}};return await H(Z,1),$}function Di(Z){return o0(Z)}async function wi(){try{let[Z,X,q,Q,$,J]=await Promise.all([mO(),uO(),qW(),pO(),dO(),lO()]);return{commitHash:Z,branchName:X,remoteUrl:q,isHeadOnRemote:Q,isClean:$,worktreeCount:J}}catch(Z){return null}}async function Oi(){let{parseGitRemote:Z}=await import("./detectRepository-1.1.33-5yfd53ae.mjs"),X=await qW();if(!X)return P("Local GitHub repo: unknown"),null;let q=Z(X);if(q&&q.host==="github.com"){let Q=`${q.owner}/${q.name}`;return P(`Local GitHub repo: ${Q}`),Q}return P("Local GitHub repo: unknown"),null}async function ki(){let{stdout:Z,code:X}=await T0(j0(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(X===0&&Z.trim())return Z.trim();let{stdout:q,code:Q}=await T0(j0(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(Q===0){let J=q.match(/HEAD branch: (\S+)/);if(J&&J[1])return`origin/${J[1]}`}let $=["origin/main","origin/staging","origin/master"];for(let J of $){let{code:Y}=await T0(j0(),["rev-parse","--verify",J],{preserveOutputOnError:!1});if(Y===0)return J}return null}function Ni(){let Z=N(),X=r(),q=_0(X,".git");try{let Q=Z.statSync(q);if(Q.isFile())return!1;if(Q.isDirectory()){let $=_0(q,"HEAD");try{if(Z.statSync($).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(_0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(_0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(_0(X,"refs")).isDirectory())return!0}catch{}return!1}var ZW,eG,z4,oX,X2,gO,j0,Fi,XW=async(Z)=>{return z4(Z)!==null},mO=async()=>{return lG()},uO=async(Z)=>{if(Z){let{stdout:X,code:q}=await q2(j0(),["--no-optional-locks","rev-parse","--abbrev-ref","HEAD"],{cwd:Z,timeout:5000,preserveOutputOnError:!1});return q===0?X.trim():""}return cG()},Ai=async()=>{return iG()},qW=async()=>{return nG()},pO=async()=>{let{code:Z}=await T0(j0(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},Ti=async(Z)=>{let X=["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{stdout:q,code:Q}=Z?await q2(j0(),X,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await T0(j0(),X,{preserveOutputOnError:!1,useCwd:!0});if(Q!==0)return{ahead:0,behind:0};let $=q.trim().split(/\s+/);if($.length!==2)return{ahead:0,behind:0};let J=parseInt($[0],10),Y=parseInt($[1],10);return{ahead:Number.isFinite(Y)?Y:0,behind:Number.isFinite(J)?J:0}},dO=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:q}=await T0(j0(),X,{preserveOutputOnError:!1});return q.trim().length===0},ji=async()=>{let{stdout:Z}=await T0(j0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
98
- `).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},cO=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"],{stdout:q}=Z?await q2(j0(),X,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await T0(j0(),X,{preserveOutputOnError:!1}),Q=[],$=[];return q.trim().split(`
99
- `).filter((J)=>J.length>0).forEach((J)=>{let Y=J.substring(0,2),H=J.substring(2).trim();if(Y==="??")$.push(H);else if(H)Q.push(H)}),{tracked:Q,untracked:$}},lO=async()=>{return aG()},Ii=async(Z)=>{try{let X=Z||`Claudin auto-stash - ${new Date().toISOString()}`,{untracked:q}=await cO();if(q.length>0){let{code:$}=await T0(j0(),["add",...q],{preserveOutputOnError:!1});if($!==0)return!1}let{code:Q}=await T0(j0(),["stash","push","--message",X],{preserveOutputOnError:!1});return Q===0}catch(X){return!1}};var _4=B(()=>{A1();K1();b0();$4();Q5();z0();oG();r4();N7();ZW=Symbol("git-root-not-found"),eG=z1((Z)=>{let X=Date.now();Y0("info","find_git_root_started");let q=q5(Z),Q=q.substring(0,q.indexOf(tG)+1)||tG,$=0;while(q!==Q){try{let Y=_0(q,".git");$++;let H=rG(Y);if(H.isDirectory()||H.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!0}),q.normalize("NFC")}catch{}let J=aX(q);if(J===q)break;q=J}try{let J=_0(Q,".git");$++;let Y=rG(J);if(Y.isDirectory()||Y.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!0}),Q.normalize("NFC")}catch{}return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!1}),ZW},(Z)=>Z,50),z4=bO();oX=z1((Z)=>{try{let X=iX(_0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let q=q5(Z,X.slice(7).trim()),Q=q5(q,iX(_0(q,"commondir"),"utf-8").trim());if(q5(aX(q))!==_0(Q,"worktrees"))return Z;if(sG(iX(_0(q,"gitdir"),"utf-8").trim())!==_0(sG(Z),".git"))return Z;if(SO(Q)!==".git")return Q.normalize("NFC");return aX(Q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),X2=hO();gO=new Set(["node_modules",".git","dist","build","out","target","vendor","coverage",".next",".turbo",".cache",".venv","venv","__pycache__"]);j0=c(()=>{return k7("git")||"git"}),Fi=c(async()=>{let Z=Date.now();Y0("info","is_git_check_started");let X=z4(r())!==null;return Y0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});import{resolve as nO}from"path";function iO(){return}function M4(){let Z=P1(),X=Q2.get(Z);if(X!==void 0)return Q2.delete(Z),Q2.set(Z,X),X;let q=X2(Z),Q=q?I1(q):I1(nO(Z));if(Q2.size>=aO){let $=Q2.keys().next().value;if($!==void 0)Q2.delete($)}return Q2.set(Z,Q),Q}function R4(){let Z=M4(),X=a();if(!X.projects)return v1;let q=X.projects[Z]??v1;if(typeof q.allowedTools==="string")q.allowedTools=O0(q.allowedTools)??[];return q}function $5(Z){let X=M4(),q=null;try{if(E7(J0(),w0,($)=>{let J=$.projects?.[X]??v1,Y=Z(J);if(Y===J)return $;return q={...$,projects:{...$.projects,[X]:Y}},q})&&q)q4(q),X4()}catch(Q){P(`Failed to save config with lock: ${Q}`,{level:"error"});let $=Y1(J0(),w0);if(d2($)){P("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"});return}let J=$.projects?.[X]??v1,Y=Z(J);if(Y===J)return;q={...$,projects:{...$.projects,[X]:Y}},P7(J0(),q,y1),q4(q),X4()}}var sX,aO=32,Q2;var rX=B(()=>{x1();z6();v7();c2();j6();b0();Z4();Y4();_4();sX={...v1};Q2=new Map});import{resolve as tX}from"path";function oO(){$W=!1}function sO(){return $W||=rO()}function rO(){if(QW())return!0;let Z=a(),X=M4();if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let Q=I1(r());while(!0){if(Z.projects?.[Q]?.hasTrustDialogAccepted)return!0;let J=I1(tX(Q,".."));if(J===Q)break;Q=J}return!1}function tO(Z){let X=a(),q=I1(tX(Z));while(!0){if(X.projects?.[q]?.hasTrustDialogAccepted)return!0;let Q=I1(tX(q,".."));if(Q===q)return!1;q=Q}}var $W=!1;var JW=B(()=>{x1();c2();rX();K1();Y4()});function Zk(Z,X,q){if(q!==void 0&&!J5(Z[X],q)||q===void 0&&!(X in Z))HW(Z,X,q)}var F4;var eX=B(()=>{eO();YW();F4=Zk});function Xk(Z){return function(X,q,Q){var $=-1,J=Object(X),Y=Q(X),H=Y.length;while(H--){var U=Y[Z?H:++$];if(q(J[U],U,J)===!1)break}return X}}var KW;var UW=B(()=>{KW=Xk});var qk,GW;var WW=B(()=>{UW();qk=KW(),GW=qk});function Qk(Z){return Y5(Z)&&H5(Z)}var LW;var zW=B(()=>{BW();VW();LW=Qk});function Wk(Z){if(!Y5(Z)||_W(Z)!=Yk)return!1;var X=MW(Z);if(X===null)return!0;var q=Uk.call(X,"constructor")&&X.constructor;return typeof q=="function"&&q instanceof q&&RW.call(q)==Gk}var Yk="[object Object]",Hk,Kk,RW,Uk,Gk,FW;var DW=B(()=>{$k();Jk();VW();Hk=Function.prototype,Kk=Object.prototype,RW=Hk.toString,Uk=Kk.hasOwnProperty,Gk=RW.call(Object);FW=Wk});function Vk(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var D4;var Zq=B(()=>{D4=Vk});function Lk(Z){return AW(Z,K5(Z))}var jW;var IW=B(()=>{Bk();TW();jW=Lk});function Ik(Z,X,q,Q,$,J,Y){var H=D4(Z,q),U=D4(X,q),G=Y.get(U);if(G){F4(Z,q,G);return}var W=J?J(H,U,q+"",Z,X,Y):void 0,V=W===void 0;if(V){var L=Xq(U),z=!L&&OW(U),_=!L&&!z&&kW(U);if(W=U,L||z||_)if(Xq(H))W=H;else if(LW(H))W=xW(H);else if(z)V=!1,W=NW(U,!0);else if(_)V=!1,W=PW(U,!0);else W=[];else if(FW(U)||qq(U)){if(W=H,qq(H))W=jW(H);else if(!r0(H)||wW(H))W=EW(U)}else V=!1}if(V)Y.set(U,W),$(W,U,Q,J,Y),Y.delete(U);F4(Z,q,W)}var vW;var yW=B(()=>{eX();Dk();Tk();Ak();jk();Mk();_k();zW();Rk();zk();c4();DW();Fk();Zq();IW();vW=Ik});function SW(Z,X,q,Q,$){if(Z===X)return;GW(X,function(J,Y){if($||($=new CW),r0(J))vW(Z,X,Y,q,SW,Q,$);else{var H=Q?Q(D4(Z,Y),J,Y+"",Z,X,$):void 0;if(H===void 0)H=J;F4(Z,Y,H)}},K5)}var bW;var hW=B(()=>{wk();eX();WW();yW();c4();TW();Zq();bW=SW});function Ok(Z,X,q){switch(q.length){case 0:return Z.call(X);case 1:return Z.call(X,q[0]);case 2:return Z.call(X,q[0],q[1]);case 3:return Z.call(X,q[0],q[1],q[2])}return Z.apply(X,q)}var fW;var gW=B(()=>{fW=Ok});function kk(Z,X,q){return X=mW(X===void 0?Z.length-1:X,0),function(){var Q=arguments,$=-1,J=mW(Q.length-X,0),Y=Array(J);while(++$<J)Y[$]=Q[X+$];$=-1;var H=Array(X+1);while(++$<X)H[$]=Q[$];return H[X]=q(Y),fW(Z,this,H)}}var mW,uW;var pW=B(()=>{gW();mW=Math.max;uW=kk});function Nk(Z){return function(){return Z}}var dW;var cW=B(()=>{dW=Nk});var Pk,nW;var iW=B(()=>{cW();xk();lW();Pk=!Qq?U5:function(Z,X){return Qq(Z,"toString",{configurable:!0,enumerable:!1,value:dW(X),writable:!0})},nW=Pk});function Ck(Z){var X=0,q=0;return function(){var Q=yk(),$=vk-(Q-q);if(q=Q,$>0){if(++X>=Ek)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var Ek=800,vk=16,yk,aW;var oW=B(()=>{yk=Date.now;aW=Ck});var Sk,sW;var rW=B(()=>{iW();oW();Sk=aW(nW),sW=Sk});function bk(Z,X){return sW(uW(Z,X,U5),Z+"")}var tW;var eW=B(()=>{lW();pW();rW();tW=bk});function hk(Z,X,q){if(!r0(q))return!1;var Q=typeof X;if(Q=="number"?H5(q)&&l4(X,q.length):Q=="string"&&(X in q))return J5(q[X],Z);return!1}var ZV;var XV=B(()=>{YW();BW();$$();c4();ZV=hk});function fk(Z){return tW(function(X,q){var Q=-1,$=q.length,J=$>1?q[$-1]:void 0,Y=$>2?q[2]:void 0;if(J=Z.length>3&&typeof J=="function"?($--,J):void 0,Y&&ZV(q[0],q[1],Y))J=$<3?void 0:J,$=1;X=Object(X);while(++Q<$){var H=q[Q];if(H)Z(X,H,Q,J)}return X})}var qV;var QV=B(()=>{eW();XV();qV=fk});var gk,G1;var $V=B(()=>{hW();QV();gk=qV(function(Z,X,q,Q){bW(Z,X,q,Q)}),G1=gk});import{join as mk}from"path";function Lo(Z){A4=Z}function zo(){A4=null,$q=void 0}function _o(Z){return $q=Z,Z}function pk(){return mk(Z0(),uk)}function dk(){try{let Z=H1(pk()),X=q0(R0(Z));if(!X||typeof X!=="object"||Array.isArray(X))return null;return X}catch{return null}}function G5(){if($q!==!0)return null;if(A4)return A4;let Z=dk();if(Z)return A4=Z,T4(),Z;return null}var uk="remote-settings.json",A4=null,$q;var YV=B(()=>{i0();J4();D6();JV();L0()});function Ro(Z,X){return Z.flatMap((q,Q)=>Q?[X(Q),q]:[q])}function Jq(Z,X){let q=0;for(let Q of Z)q+=+!!X(Q);return q}function HV(Z){return[...new Set(Z)]}var Yq=()=>{};import{appendFile as ck,mkdir as lk,readFile as nk,writeFile as ik}from"fs/promises";import{homedir as ak}from"os";import{dirname as ok,join as sk}from"path";async function rk(Z,X){let{code:q}=await q2("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:X});return q===0}function tk(){return sk(ak(),".config","git","ignore")}async function KV(Z,X=r()){try{if(!await XW(X))return;let q=`**/${Z}`,Q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await rk(Q,X))return;let $=tk(),J=ok($);await lk(J,{recursive:!0});try{if((await nk($,{encoding:"utf-8"})).includes(q))return;await ck($,`
100
- ${q}
101
- `)}catch(Y){if(B0(Y)==="ENOENT")await ik($,`${q}
102
- `,"utf-8");else throw Y}}catch(q){g(q)}}var UV=B(()=>{K1();i1();Q5();_4();v0()});function Eo(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 vo(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 yo(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 Co(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 So(Z){if(Z==="")return[];let X=Z.split(",").map((Q)=>Q.trim()),q=[];for(let Q of X)switch(Q){case"user":q.push("userSettings");break;case"project":q.push("projectSettings");break;case"local":q.push("localSettings");break;default:throw Error(`Invalid setting source: ${Q}. Valid options are: user, project, local`)}return q}function j4(){let Z=GV(),X=new Set(Z);return X.add("policySettings"),X.add("flagSettings"),Array.from(X)}function bo(Z){return j4().includes(Z)}var Po,ho,WV="https://json.schemastore.org/claude-code-settings.json";var Hq=B(()=>{x1();Po=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];ho=["localSettings","projectSettings","userSettings"]});function VV(Z){W5.set(Z,Date.now())}function go(Z,X){let q=W5.get(Z);if(q!==void 0&&Date.now()-q<X)return W5.delete(Z),!0;return!1}function mo(){W5.clear()}var W5;var BV=B(()=>{W5=new Map});function LV(Z){let X=[],q=[];for(let Q of Z){if(typeof Q!=="string"||Q.trim().length===0){q.push({entry:String(Q??""),reason:"empty"});continue}if(Q.length>1e4){q.push({entry:Q,reason:"too-long"});continue}if(ek.test(Q)){q.push({entry:Q,reason:"control-characters"});continue}if(ZN.test(Q)){q.push({entry:Q,reason:"invisible-characters"});continue}if(XN.test(Q)){q.push({entry:Q,reason:"settings-token"});continue}if(X.length>=200){q.push({entry:Q,reason:"over-entry-cap"});continue}X.push(Q.trim())}return{entries:X,dropped:q}}function co(Z){return Z.some((X)=>X.trim()==="$defaults")}function JN(Z,X){if(Z.length===0)return[...X];let q=[],Q=!1;for(let $ of Z){if($.trim()==="$defaults"){if(!Q)q.push(...X),Q=!0;continue}q.push($)}return q}function lo(Z){let X=[],q=[];for(let Q of Z){let $=Q.trim();if(qN.test($)||QN.test($)||$N.test($)){q.push({entry:Q,reason:"too-broad"});continue}X.push(Q)}return{entries:X,dropped:q}}function YN(Z){return Z.split(`
103
- `).map((X)=>X.trim()).filter((X)=>X.startsWith("- ")).map((X)=>X.slice(2))}function no(Z,X){if(Z.length===0)return X;let q=JN(Z,YN(X));if(q.length===0)return"";return`
104
- ${q.map((Q)=>`- ${Q}`).join(`
105
- `)}
106
- `}function zV(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 po="$defaults",ek,ZN,XN,qN,QN,$N;var _V=B(()=>{ek=/[\u0000-\u001F\u007F-\u009F]/,ZN=/[\p{Cf}\p{Zl}\p{Zp}\u2028\u2029\uFE00-\uFE0F]|[\u{E0100}-\u{E01EF}]/u,XN=/<\/?settings_/i,qN=/^[A-Za-z_][A-Za-z0-9_]*\((\*|:\*|\s*)\)$/,QN=/^(Bash|PowerShell)\(\s*(sh|bash|zsh|dash|ksh|fish|curl|wget|eval|python3?|node|perl|ruby|env|xargs|sudo|doas|pwsh|powershell)\b[^)]*\*[^)]*\)$/i,$N=/^(?: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 HN}from"path";var E1,I4;var V5=B(()=>{A1();l2();E1=c(function(){switch(A0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),I4=c(function(){return HN(E1(),"managed-settings.d")})});var KN,UN,MV;var RV=B(()=>{s0();$2();KN=I(()=>K.object({allowedDomains:K.array(K.string()).optional(),allowManagedDomainsOnly:K.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:K.array(K.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:K.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:K.boolean().optional(),httpProxyPort:K.number().optional(),socksProxyPort:K.number().optional()}).optional()),UN=I(()=>K.object({allowWrite:K.array(K.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:K.array(K.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:K.array(K.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:K.array(K.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:K.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),MV=I(()=>K.object({enabled:K.boolean().optional(),failIfUnavailable:K.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:K.boolean().optional(),allowUnsandboxedCommands:K.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:KN(),filesystem:UN(),ignoreViolations:K.record(K.string(),K.array(K.string())).optional(),enableWeakerNestedSandbox:K.boolean().optional(),enableWeakerNetworkIsolation:K.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:K.array(K.string()).optional(),ripgrep:K.object({command:K.string(),args:K.array(K.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});var qs,Qs="∙",$s="✻",Js="↑",Ys="↓",Hs="↯",Ks="○",Us="◐",Gs="●",Ws="◎",Vs="◉",Bs="◍",Ls="▶",FV="⏸",zs="↻",_s="◇",Ms="◆",Rs="※",Fs="▎",Ds,As="·✔︎·",Ts="×";var DV=B(()=>{Z4();qs=p2.platform==="darwin"?"⏺":"●",Ds=["·|·","·/·","·—·","·\\·"]});var DN={};Kq(DN,{toExternalPermissionMode:()=>LN,permissionModeTitle:()=>_N,permissionModeSymbol:()=>RN,permissionModeSchema:()=>WN,permissionModeFromString:()=>zN,isExternalPermissionMode:()=>BN,isDefaultMode:()=>MN,getModeColor:()=>FN,externalPermissionModeSchema:()=>VN,PERMISSION_MODES:()=>Q6,EXTERNAL_PERMISSION_MODES:()=>Uq});function BN(Z){return Z!=="auto"}function B5(Z){return AV[Z]??AV.default}function LN(Z){return B5(Z).external}function zN(Z){return Q6.includes(Z)?Z:"default"}function _N(Z){return B5(Z).title}function MN(Z){return Z==="default"||Z===void 0}function RN(Z){return B5(Z).symbol}function FN(Z){return B5(Z).color}var WN,VN,AV;var TV=B(()=>{s0();DV();GN();$2();WN=I(()=>K.enum(Q6)),VN=I(()=>K.enum(Uq)),AV={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:FV,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 jV=()=>{};var IV;var wV=B(()=>{jV();IV=["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 OV=()=>{};var kV=()=>{};var NV=B(()=>{wV();OV();kV()});var xV,Cs="bash";var PV=B(()=>{xV=["bash","powershell"]});function AN(){let Z=K.object({type:K.literal("command").describe("Shell command hook type"),command:K.string().describe("Shell command to execute"),if:L5(),shell:K.enum(xV).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:K.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:K.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async."),interactive:K.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.")}),X=K.object({type:K.literal("prompt").describe("LLM prompt hook type"),prompt:K.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:L5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:K.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:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=K.object({type:K.literal("http").describe("HTTP hook type"),url:K.string().url().describe("URL to POST the hook input JSON to"),if:L5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:K.record(K.string(),K.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:K.array(K.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:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),Q=K.object({type:K.literal("agent").describe("Agentic verifier hook type"),prompt:K.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:L5(),timeout:K.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:K.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-5"). If not specified, uses Haiku.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:q,AgentHookSchema:Q}}var L5,TN,jN,J2;var z5=B(()=>{NV();s0();$2();PV();L5=I(()=>K.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.'));TN=I(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:q,HttpHookSchema:Q}=AN();return K.discriminatedUnion("type",[Z,X,q,Q])}),jN=I(()=>K.object({matcher:K.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:K.array(TN()).describe("List of hooks to execute when the matcher matches")})),J2=I(()=>K.partialRecord(K.enum(IV),K.array(jN())))});var ds,cs,IN,EV,wN,ON,kN,NN,xN,PN,EN,_5,ls;var vV=B(()=>{s0();$2();ds=I(()=>K.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),cs=I(()=>K.enum(["stdio","sse","sse-ide","http","ws","sdk"])),IN=I(()=>K.object({type:K.literal("stdio").optional(),command:K.string().min(1,"Command cannot be empty"),args:K.array(K.string()).default([]),env:K.record(K.string(),K.string()).optional()})),EV=I(()=>K.object({clientId:K.string().optional(),callbackPort:K.number().int().positive().optional(),authServerMetadataUrl:K.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional()})),wN=I(()=>K.object({type:K.literal("sse"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:EV().optional()})),ON=I(()=>K.object({type:K.literal("sse-ide"),url:K.string(),ideName:K.string(),ideRunningInWindows:K.boolean().optional()})),kN=I(()=>K.object({type:K.literal("ws-ide"),url:K.string(),ideName:K.string(),authToken:K.string().optional(),ideRunningInWindows:K.boolean().optional()})),NN=I(()=>K.object({type:K.literal("http"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:EV().optional()})),xN=I(()=>K.object({type:K.literal("ws"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional()})),PN=I(()=>K.object({type:K.literal("sdk"),name:K.string()})),EN=I(()=>K.object({type:K.literal("claudeai-proxy"),url:K.string(),id:K.string()})),_5=I(()=>K.union([IN(),wN(),ON(),kN(),NN(),xN(),PN(),EN()])),ls=I(()=>K.object({mcpServers:K.record(K.string(),_5())}))});function rs(Z,X){let q=Z.toLowerCase();return X.autoUpdate??(M5.has(q)&&!vN.has(q))}function SN(Z){if(M5.has(Z.toLowerCase()))return!1;if(CN.test(Z))return!0;return yN.test(Z)}function bN(Z){let X=Z.trim(),q=hN.exec(X);if(q)return q[1].toLowerCase()==="github.com"&&q[2].toLowerCase()===$6;try{let Q=new URL(X);if(Q.protocol!=="https:"&&Q.protocol!=="ssh:")return!1;if(Q.hostname.toLowerCase()!=="github.com")return!1;return Q.pathname.split("/").filter(Boolean)[0]?.toLowerCase()===$6}catch{return!1}}function ts(Z,X){let q=Z.toLowerCase();if(!M5.has(q))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${$6}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${$6}/' can use this name.`;return null}if(X.source==="git"&&X.url){if(bN(X.url))return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${$6}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${$6}' organization.`}function Zr(Z){return typeof Z==="string"&&Z.startsWith("./")}function Xr(Z){return Z.source==="file"||Z.source==="directory"}var M5,vN,yN,CN,$6="anthropics",hN,W1,J6,yV,Wq,Vq,bV,Bq,fN,es,gN,mN,uN,pN,dN,cN,CV,lN,nN,hV,iN,aN,SV,oN,fV,sN,rN,w4,Gq,gV,tN,eN,qr,mV,Zx,Xx,qx,Qr,Qx,$x,$r,Jx,Jr;var uV=B(()=>{s0();z5();vV();$2();M5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),vN=new Set(["knowledge-work-plugins"]);yN=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,CN=/[^\u0020-\u007E]/;hN=/^git@([^:]+):([^/]+)\//i;W1=I(()=>K.string().startsWith("./")),J6=I(()=>W1().endsWith(".json")),yV=I(()=>K.union([W1().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"),K.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),Wq=I(()=>W1().endsWith(".md")),Vq=I(()=>K.union([Wq(),W1()])),bV=I(()=>K.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)=>!SN(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'})),Bq=I(()=>K.object({name:K.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:K.string().optional().describe("Contact email for support or feedback"),url:K.string().optional().describe("Website, GitHub profile, or organization URL")})),fN=I(()=>K.object({name:K.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:K.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:K.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:Bq().optional().describe("Information about the plugin creator or maintainer"),homepage:K.string().url().optional().describe("Plugin homepage or documentation URL"),repository:K.string().optional().describe("Source code repository URL"),license:K.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:K.array(K.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:K.array(Xx()).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.`)})),es=I(()=>K.object({description:K.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:K.lazy(()=>J2()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),gN=I(()=>K.object({hooks:K.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"),K.lazy(()=>J2()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),K.array(K.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"),K.lazy(()=>J2()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),mN=I(()=>K.object({source:Vq().optional().describe("Path to command markdown file, relative to plugin root"),content:K.string().optional().describe("Inline markdown content for the command"),description:K.string().optional().describe("Command description override"),argumentHint:K.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:K.string().optional().describe("Default model for this command"),allowedTools:K.array(K.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'})),uN=I(()=>K.object({commands:K.union([Vq().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"),K.array(Vq().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"),K.record(K.string(),mN()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),pN=I(()=>K.object({agents:K.union([Wq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),K.array(Wq().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")])})),dN=I(()=>K.object({skills:K.union([W1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),K.array(W1().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")])})),cN=I(()=>K.object({outputStyles:K.union([W1().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"),K.array(W1().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")])})),CV=I(()=>K.string().min(1)),lN=I(()=>K.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),nN=I(()=>K.object({mcpServers:K.union([J6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),yV().describe("Path or URL to MCPB file containing MCP server configuration"),K.record(K.string(),_5()).describe("MCP server configurations keyed by server name"),K.array(K.union([J6().describe("Path to MCP servers configuration file"),yV().describe("Path or URL to MCPB file"),K.record(K.string(),_5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),hV=I(()=>K.object({type:K.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:K.string().describe("Human-readable label shown in the config dialog"),description:K.string().describe("Help text shown beneath the field in the config dialog"),required:K.boolean().optional().describe("If true, validation fails when this field is empty"),default:K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]).optional().describe("Default value used when the user provides nothing"),multiple:K.boolean().optional().describe("For string type: allow an array of strings"),sensitive:K.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:K.number().optional().describe("Minimum value (number type only)"),max:K.number().optional().describe("Maximum value (number type only)")}).strict()),iN=I(()=>K.object({userConfig:K.record(K.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"),hV()).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).")})),aN=I(()=>K.object({channels:K.array(K.object({server:K.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:K.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:K.record(K.string(),hV()).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.")})),SV=I(()=>K.strictObject({command:K.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:K.array(CV()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:K.record(lN(),CV()).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:K.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:K.record(K.string(),K.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:K.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:K.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:K.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:K.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:K.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:K.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:K.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),oN=I(()=>K.object({lspServers:K.union([J6().describe("Path to .lsp.json configuration file relative to plugin root"),K.record(K.string(),SV()).describe("LSP server configurations keyed by server name"),K.array(K.union([J6().describe("Path to LSP configuration file"),K.record(K.string(),SV()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),fV=I(()=>K.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let X=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,q=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||q.test(Z)},"Invalid npm package name format")),sN=I(()=>K.object({settings:K.record(K.string(),K.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),rN=I(()=>K.object({...fN().shape,...gN().partial().shape,...uN().partial().shape,...pN().partial().shape,...dN().partial().shape,...cN().partial().shape,...aN().partial().shape,...nN().partial().shape,...oN().partial().shape,...sN().partial().shape,...iN().partial().shape})),w4=I(()=>K.discriminatedUnion("source",[K.object({source:K.literal("url"),url:K.string().url().describe("Direct URL to marketplace.json file"),headers:K.record(K.string(),K.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.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.')}),K.object({source:K.literal("git"),url:K.string().describe("Full git repository URL"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.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.')}),K.object({source:K.literal("npm"),package:fV().describe("NPM package containing marketplace.json")}),K.object({source:K.literal("file"),path:K.string().describe("Local file path to marketplace.json")}),K.object({source:K.literal("directory"),path:K.string().describe("Local directory containing .claude-plugin/marketplace.json")}),K.object({source:K.literal("hostPattern"),hostPattern:K.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$").')}),K.object({source:K.literal("pathPattern"),pathPattern:K.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.')}),K.object({source:K.literal("settings"),name:bV().refine((Z)=>!M5.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:K.array(tN()).describe("Plugin entries declared inline in settings.json"),owner:Bq().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(()=>K.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),gV=I(()=>K.union([W1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),K.object({source:K.literal("npm"),package:fV().or(K.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:K.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:K.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),K.object({source:K.literal("pip"),package:K.string().describe("Python package name as it appears on PyPI"),version:K.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:K.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),K.object({source:K.literal("url"),url:K.string().describe("Full git repository URL (https:// or git@)"),ref:K.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")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.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")}),K.object({source:K.literal("git-subdir"),url:K.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:K.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:K.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.")])),tN=I(()=>K.object({name:K.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:gV().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:K.string().optional(),version:K.string().optional(),strict:K.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.'}));eN=I(()=>rN().partial().extend({name:K.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:gV().describe("Where to fetch the plugin from"),category:K.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:K.array(K.string()).optional().describe("Tags for searchability and discovery"),strict:K.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),qr=I(()=>K.object({name:bV(),owner:Bq().describe("Marketplace maintainer or curator information"),plugins:K.array(eN()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:K.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:K.object({pluginRoot:K.string().optional().describe("Base path for relative plugin sources"),version:K.string().optional().describe("Marketplace version"),description:K.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:K.array(K.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(()=>K.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),Zx=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,Xx=I(()=>K.union([K.string().regex(Zx,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),K.object({name:K.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:K.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),qx=I(()=>K.object({version:K.string().describe("Currently installed version"),installedAt:K.string().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),installPath:K.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),Qr=I(()=>K.object({version:K.literal(1).describe("Schema version 1"),plugins:K.record(mV(),qx()).describe("Map of plugin IDs to their installation metadata")})),Qx=I(()=>K.enum(["managed","user","project","local"])),$x=I(()=>K.object({scope:Qx().describe("Installation scope"),projectPath:K.string().optional().describe("Project path (required for project/local scopes)"),installPath:K.string().describe("Absolute path to the versioned plugin directory"),version:K.string().optional().describe("Currently installed version"),installedAt:K.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins")})),$r=I(()=>K.object({version:K.literal(2).describe("Schema version 2"),plugins:K.record(mV(),K.array($x())).describe("Map of plugin IDs to arrays of installation entries")})),Jx=I(()=>K.object({source:w4().describe("Where to fetch the marketplace from"),installLocation:K.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:K.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Jr=I(()=>K.record(K.string(),Jx()))});function Hr(Z){return Z.startsWith("claude.ai ")}function R5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var pV=()=>{};function dV(Z){let X=Z.split("__"),[q,Q,...$]=X;if(q!=="mcp"||!Q)return null;let J=$.length>0?$.join("__"):void 0;return{serverName:Q,toolName:J}}function Yx(Z){return`mcp__${R5(Z)}__`}function Hx(Z,X){return`${Yx(Z)}${R5(X)}`}function Gr(Z){return Z.mcpInfo?Hx(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function Wr(Z,X){let q=`mcp__${R5(X)}__`;return Z.replace(q,"")}function Vr(Z){let X=Z.replace(/\s*\(MCP\)\s*$/,"");X=X.trim();let q=X.indexOf(" - ");if(q!==-1)return X.substring(q+3).trim();return X}var cV=B(()=>{pV()});var lV="Agent",Lr="Task",zr;var nV=B(()=>{zr=new Set(["Plan","WebResearcher","WebResearcherManager"])});var Lq="TaskOutput";var iV=()=>{};var aV="TaskStop",Rr=`
107
- - Stops a running background task by its ID
108
- - Takes a task_id parameter identifying the task to stop
109
- - Returns a success or failure status
110
- - Use this tool when you need to terminate a long-running task
111
- `;var oV=()=>{};function Y6(Z){return Object.hasOwn(zq,Z)?zq[Z]:Z}function jr(Z){let X=[];for(let[q,Q]of Object.entries(zq))if(Q===Z)X.push(q);return X}function Kx(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function Ux(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function sV(Z){let X=Gx(Z,"(");if(X===-1)return{toolName:Y6(Z)};let q=Wx(Z,")");if(q===-1||q<=X)return{toolName:Y6(Z)};if(q!==Z.length-1)return{toolName:Y6(Z)};let Q=Z.substring(0,X),$=Z.substring(X+1,q);if(!Q)return{toolName:Y6(Z)};if($===""||$==="*")return{toolName:Y6(Q)};let J=Ux($);return{toolName:Y6(Q),ruleContent:J}}function Ir(Z){if(!Z.ruleContent)return Z.toolName;let X=Kx(Z.ruleContent);return`${Z.toolName}(${X})`}function Gx(Z,X){for(let q=0;q<Z.length;q++)if(Z[q]===X){let Q=0,$=q-1;while($>=0&&Z[$]==="\\")Q++,$--;if(Q%2===0)return q}return-1}function Wx(Z,X){for(let q=Z.length-1;q>=0;q--)if(Z[q]===X){let Q=0,$=q-1;while($>=0&&Z[$]==="\\")Q++,$--;if(Q%2===0)return q}return-1}var zq;var rV=B(()=>{nV();iV();oV();zq={Task:lV,KillShell:aV,AgentOutputTool:Lq,BashOutputTool:Lq}});function Or(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tV(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function eV(Z,X,q=X+"s"){return Z===1?X:q}function kr(Z){let X=Z.indexOf(`
112
- `);return X===-1?Z:Z.slice(0,X)}function Nr(Z,X,q=0){let Q=0,$=Z.indexOf(X,q);while($!==-1)Q++,$=Z.indexOf(X,$+1);return Q}function xr(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function Pr(Z){return Z.replace(/\u3000/g," ")}function Er(Z,X=",",q=ZB){let $="";for(let J of Z){let Y=$?X:"",H=Y+J;if($.length+H.length<=q)$+=H;else{let U=q-$.length-Y.length-14;if(U>0)$+=Y+J.slice(0,U)+"...[truncated]";else $+="...[truncated]";return $}}return $}class Vx{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=ZB){this.maxSize=Z}append(Z){let X=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=X.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+X.length>this.maxSize){let q=this.maxSize-this.content.length;if(q>0)this.content+=X.slice(0,q);this.isTruncated=!0}else this.content+=X}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,X=Math.round(Z/1024);return this.content+`
113
- ... [output truncated - ${X}KB removed]`}clear(){this.content="",this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}function vr(Z,X){let q=Z.split(`
114
- `);if(q.length<=X)return Z;return q.slice(0,X).join(`
115
- `)+"…"}var ZB=33554432;var _q=()=>{};function XB(Z){return F5.filePatternTools.includes(Z)}function qB(Z){return F5.bashPrefixTools.includes(Z)}function QB(Z){return Object.hasOwn(F5.customValidation,Z)?F5.customValidation[Z]:void 0}var F5;var $B=B(()=>{F5={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 JB(Z,X){let q=0,Q=X-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;return q%2!==0}function Mq(Z,X){let q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===X&&!JB(Z,Q))q++;return q}function Bx(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!JB(Z,X))return!0}return!1}function Rq(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=Mq(Z,"("),q=Mq(Z,")");if(X!==q)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(Bx(Z)){let Y=Z.substring(0,Z.indexOf("("));if(!Y)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${Y}" without parentheses`,examples:[`${Y}`,`${Y}(some-pattern)`]}}let Q=sV(Z),$=dV(Q.toolName);if($){if(Q.ruleContent!==void 0||Mq(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${Q.toolName}" without parentheses, or use "mcp__${$.serverName}__*" for all tools`,examples:[`mcp__${$.serverName}`,`mcp__${$.serverName}__*`,$.toolName&&$.toolName!=="*"?`mcp__${$.serverName}__${$.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!Q.toolName||Q.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(Q.toolName[0]!==Q.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${tV(String(Q.toolName))}"`};let J=QB(Q.toolName);if(J&&Q.ruleContent!==void 0){let Y=J(Q.ruleContent);if(!Y.valid)return Y}if(qB(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(XB(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${Q.toolName}(*.ts) - matches .ts files`,`${Q.toolName}(src/**) - matches all files in src`,`${Q.toolName}(**/*.test.ts) - matches test files`]};if(Y.includes("*")&&!Y.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!Y.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${Q.toolName}(*.js) - all .js files`,`${Q.toolName}(src/*) - all files directly in src`,`${Q.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var D5;var Fq=B(()=>{s0();cV();$2();rV();_q();$B();D5=I(()=>K.string().superRefine((Z,X)=>{let q=Rq(Z);if(!q.valid){let Q=q.error;if(q.suggestion)Q+=`. ${q.suggestion}`;if(q.examples&&q.examples.length>0)Q+=`. Examples: ${q.examples.join(", ")}`;X.addIssue({code:K.ZodIssueCode.custom,message:Q,params:{received:Z}})}}))});function dr(Z){if(!Z||typeof Z!=="object")return null;let X=Dq.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var Dq;var YB=B(()=>{s0();Dq=K.object({enabled:K.boolean().describe("Whether auto-fix is enabled"),lint:K.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:K.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:K.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:K.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 qt(Z){return"serverName"in Z&&Z.serverName!==void 0}function Qt(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function $t(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var Lx,zx,_x,Mx,Rx,HB,E0;var O4=B(()=>{s0();RV();$2();TV();uV();Hq();Fq();z5();z5();YB();Yq();Lx=I(()=>K.record(K.string(),K.coerce.string())),zx=I(()=>K.object({allow:K.array(D5()).optional().describe("List of permission rules for allowed operations"),deny:K.array(D5()).optional().describe("List of permission rules for denied operations"),ask:K.array(D5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:K.enum(Q6).optional().describe("Default permission mode when Claudin needs access"),disableBypassPermissionsMode:K.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:K.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:K.array(K.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),_x=I(()=>K.object({source:w4().describe("Where to fetch the marketplace from"),installLocation:K.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Mx=I(()=>K.object({serverName:K.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:K.array(K.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:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return Jq([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"'})),Rx=I(()=>K.object({serverName:K.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:K.array(K.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:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return Jq([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"'})),HB=["skills","agents","hooks","mcp"],E0=I(()=>K.object({$schema:K.literal(WV).optional().describe("JSON Schema reference for Claudin settings"),apiKeyHelper:K.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:K.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:K.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:K.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),fileSuggestion:K.object({type:K.literal("command"),command:K.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:K.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:K.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:Lx().optional().describe("Environment variables to set for Claudin sessions"),attribution:K.object({commit:K.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:K.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:K.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:zx().optional().describe("Tool usage permissions configuration"),model:K.string().optional().describe("Override the default model used by Claudin"),availableModels:K.array(K.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:K.record(K.string(),K.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:K.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:K.array(K.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:K.array(K.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:K.array(Mx()).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:K.array(Rx()).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:J2().optional().describe("Custom commands to run before/after tool executions"),autoFix:Dq.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:K.object({symlinkDirectories:K.array(K.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:K.array(K.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:K.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:K.object({enabled:K.boolean().optional(),diagnosticsTimeoutMs:K.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:K.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:K.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:K.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:K.array(K.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:K.array(K.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:K.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:K.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:K.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>HB.includes(X)):Z,K.union([K.boolean(),K.array(K.enum(HB))])).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:K.object({type:K.literal("command"),command:K.string(),padding:K.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:K.record(K.string(),K.union([K.array(K.string()),K.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:K.record(K.string(),_x()).check((Z)=>{for(let[X,q]of Object.entries(Z.value))if(q.source.source==="settings"&&q.source.name!==X)Z.issues.push({code:"custom",input:q.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${q.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:K.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:K.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:K.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:K.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:K.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:K.string().optional().describe("Controls the output style for assistant responses"),language:K.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:K.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:MV().optional(),feedbackSurveyRate:K.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:K.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:K.object({mode:K.enum(["append","replace"]),verbs:K.array(K.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:K.object({excludeDefault:K.boolean().optional(),tips:K.array(K.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:K.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:K.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:K.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:K.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:K.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:K.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:K.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:K.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:K.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:K.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:K.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:K.array(K.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:K.record(K.string(),K.object({mcpServers:K.record(K.string(),K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.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:K.object({defaultEnvironmentId:K.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:K.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),minimumVersion:K.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:K.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to .claudin/plans/ in the project root."),channelsEnabled:K.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:K.array(K.object({marketplace:K.string(),plugin:K.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:K.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:K.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:K.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:K.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:K.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:K.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:K.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:K.object({allow:K.array(K.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:K.array(K.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:K.array(K.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:K.array(K.object({id:K.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:K.string().describe("Display name for the SSH connection"),sshHost:K.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:K.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:K.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:K.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:K.array(K.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:K.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 Aq(){let Z=KB(E0(),{unrepresentable:"any"});return m(Z,null,2)}var UB=B(()=>{s0();L0();O4()});function GB(Z){let X=Fx.find((Q)=>Q.matches(Z));if(!X)return null;let q={...X.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!q.suggestion)q.suggestion=`Valid values: ${Z.enumValues.map((Q)=>`"${Q}"`).join(", ")}`;if(!q.docLink&&Z.path){let Q=Z.path.split(".")[0];if(Q)q.docLink=Dx[Q]}return q}var Fx,Dx;var WB=B(()=>{Fx=[{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'}}],Dx={}});function VB(Z){return Z.code==="invalid_type"}function BB(Z){return Z.code==="invalid_value"}function Ax(Z){return Z.code==="unrecognized_keys"}function LB(Z){return Z.code==="too_small"}function Tq(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function zB(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function H6(Z,X){return Z.issues.map((q)=>{let Q=q.path.map(String).join("."),$=q.message,J,Y,H,U,G;if(BB(q))Y=q.values.map((V)=>String(V)),H=Y.join(" | "),U=void 0,G=void 0;else if(VB(q)){H=q.expected;let V=zB(q.message);U=V??Tq(q.input),G=V??Tq(q.input)}else if(LB(q))H=String(q.minimum);else if(q.code==="custom"&&"params"in q)U=q.params.received,G=U;let W=GB({path:Q,code:q.code,expected:H,received:U,enumValues:Y,message:q.message,value:U});if(BB(q))J=Y?.map((V)=>`"${V}"`).join(", "),$=`Invalid value. Expected one of: ${J}`;else if(VB(q)){let V=zB(q.message)??Tq(q.input);if(q.expected==="object"&&V==="null"&&Q==="")$="Invalid or malformed JSON";else $=`Expected ${q.expected}, but received ${V}`}else if(Ax(q)){let V=q.keys.join(", ");$=`Unrecognized ${eV(q.keys.length,"field")}: ${V}`}else if(LB(q))$=`Number must be greater than or equal to ${q.minimum}`,J=String(q.minimum);return{file:X,path:Q,message:$,expected:J,invalidValue:G,suggestion:W?.suggestion,docLink:W?.docLink}})}function Rt(Z){try{let X=q0(Z),q=E0().strict().safeParse(X);if(q.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
116
- `+H6(q.error,"settings").map((J)=>`- ${J.path}: ${J.message}`).join(`
117
- `),fullSchema:Aq()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:Aq()}}}function A5(Z,X){if(!Z||typeof Z!=="object")return[];let q=Z;if(!q.permissions||typeof q.permissions!=="object")return[];let Q=q.permissions,$=[];for(let J of["allow","deny","ask"]){let Y=Q[J];if(!Array.isArray(Y))continue;Q[J]=Y.filter((H)=>{if(typeof H!=="string")return $.push({file:X,path:`permissions.${J}`,message:`Non-string value in ${J} array was removed`,invalidValue:H}),!1;let U=Rq(H);if(!U.valid){let G=`Invalid permission rule "${H}" was skipped`;if(U.error)G+=`: ${U.error}`;if(U.suggestion)G+=`. ${U.suggestion}`;return $.push({file:X,path:`permissions.${J}`,message:G,invalidValue:H}),!1}return!0})}return $}var jq=B(()=>{L0();_q();Fq();UB();O4();WB()});import{userInfo as Tx}from"os";function DB(){let Z="";try{Z=Tx().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${_B}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${_B}.plist`,label:"device-level managed preferences"}),X}var _B="com.anthropic.claudecode",T5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",j5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",K6="Settings",MB="/usr/bin/plutil",RB,FB=5000;var Iq=B(()=>{RB=["-convert","json","-o","-","--"]});import{execFile as jx}from"child_process";import{existsSync as Ix}from"fs";function wq(Z,X){return new Promise((q)=>{jx(Z,X,{encoding:"utf-8",timeout:FB},(Q,$)=>{q({stdout:$??"",code:Q?1:0})})})}function I5(){return(async()=>{if(process.platform==="darwin"){let Z=DB(),q=(await Promise.all(Z.map(async({path:Q,label:$})=>{if(!Ix(Q))return{stdout:"",label:$,ok:!1};let{stdout:J,code:Y}=await wq(MB,[...RB,Q]);return{stdout:J,label:$,ok:Y===0&&!!J}}))).find((Q)=>Q.ok);return{plistStdouts:q?[{stdout:q.stdout,label:q.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,X]=await Promise.all([wq("reg",["query",T5,"/v",K6]),wq("reg",["query",j5,"/v",K6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:X.code===0?X.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function wt(){if(Oq)return;Oq=I5()}function AB(){return Oq}var Oq=null;var TB=B(()=>{Iq()});import{join as jB}from"path";function wx(){if(w5)return;w5=(async()=>{U6("mdm_load_start");let Z=Date.now(),X=AB()??I5(),{mdm:q,hkcu:Q}=OB(await X);Nq=q,xq=Q,U6("mdm_load_end");let $=Date.now()-Z;if(P(`MDM settings load completed in ${$}ms`),Object.keys(q.settings).length>0){P(`MDM settings found: ${Object.keys(q.settings).join(", ")}`);try{Y0("info","mdm_settings_loaded",{duration_ms:$,key_count:Object.keys(q.settings).length,error_count:q.errors.length})}catch{}}})()}async function gt(){if(!w5)wx();await w5}function O5(){return Nq??V1}function k5(){return xq??V1}function mt(Z,X){Nq=Z,xq=X}async function ut(){let Z=await I5();return OB(Z)}function kq(Z,X){let q=O0(Z,!1);if(!q||typeof q!=="object")return{settings:{},errors:[]};let Q=A5(q,X),$=E0().safeParse(q);if(!$.success){let J=H6($.error,X);return{settings:{},errors:[...Q,...J]}}return{settings:$.data,errors:Q}}function IB(Z,X="Settings"){let q=Z.split(/\r?\n/),Q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),$=new RegExp(`^\\s+${Q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let J of q){let Y=J.match($);if(Y&&Y[1])return Y[1].trimEnd()}return null}function OB(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:q}=Z.plistStdouts[0],Q=kq(X,q);if(Object.keys(Q.settings).length>0)return{mdm:Q,hkcu:V1}}if(Z.hklmStdout){let X=IB(Z.hklmStdout);if(X){let q=kq(X,`Registry: ${T5}\\${K6}`);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:V1}}}if(Ox())return{mdm:V1,hkcu:V1};if(Z.hkcuStdout){let X=IB(Z.hkcuStdout);if(X){let q=kq(X,`Registry: ${j5}\\${K6}`);return{mdm:V1,hkcu:q}}}return{mdm:V1,hkcu:V1}}function Ox(){try{let Z=jB(E1(),"managed-settings.json"),X=H1(Z),q=O0(X,!1);if(q&&typeof q==="object"&&Object.keys(q).length>0)return!0}catch{}try{let Z=I4(),X=N().readdirSync(Z);for(let q of X){if(!(q.isFile()||q.isSymbolicLink())||!q.name.endsWith(".json")||q.name.startsWith("."))continue;try{let Q=H1(jB(Z,q.name)),$=O0(Q,!1);if($&&typeof $==="object"&&Object.keys($).length>0)return!0}catch{}}}catch{}return!1}var V1,Nq=null,xq=null,w5=null;var kB=B(()=>{b0();$4();J4();z0();j6();wB();V5();O4();jq();Iq();TB();V1=Object.freeze({settings:{},errors:[]})});import{dirname as hB,join as N5,resolve as k4}from"path";function Cq(){return N5(E1(),"managed-settings.json")}function Sq(){let Z=[],X={},q=!1,{settings:Q,errors:$}=N4(Cq());if(Z.push(...$),Q&&Object.keys(Q).length>0)X=G1(X,Q,Y2),q=!0;let J=I4();try{let Y=N().readdirSync(J).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:U,errors:G}=N4(N5(J,H));if(Z.push(...G),U&&Object.keys(U).length>0)X=G1(X,U,Y2),q=!0}}catch(Y){let H=B0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")g(Y)}return{settings:q?X:null,errors:Z}}function _e(){let{settings:Z}=N4(Cq()),X=!!Z&&Object.keys(Z).length>0,q=!1,Q=I4();try{q=N().readdirSync(Q).some(($)=>($.isFile()||$.isSymbolicLink())&&$.name.endsWith(".json")&&!$.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:q}}function fB(Z,X){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")P(`Broken symlink or missing file encountered for settings.json at path: ${X}`);else g(Z)}function N4(Z){let X=yB(Z);if(X)return{settings:X.settings?Eq(X.settings):null,errors:X.errors};let q=kx(Z);return CB(Z,q),{settings:q.settings?Eq(q.settings):null,errors:q.errors}}function kx(Z){try{let{resolvedPath:X}=j1(N(),Z),q=H1(X);if(q.trim()==="")return{settings:{},errors:[]};let Q=O0(q,!1),$=A5(Q,Z),J=E0().safeParse(Q);if(!J.success){let Y=H6(J.error,Z);return{settings:null,errors:[...$,...Y]}}return{settings:J.data,errors:$}}catch(X){return fB(X,Z),{settings:null,errors:[]}}}function NB(Z){switch(Z){case"userSettings":return k4(Z0());case"policySettings":case"projectSettings":case"localSettings":return k4(P1());case"flagSettings":{let X=vq();return X?hB(k4(X)):k4(P1())}}}function Nx(){if(bB()||e(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function x5(Z){switch(Z){case"userSettings":return N5(NB(Z),Nx());case"projectSettings":case"localSettings":return N5(NB(Z),gB(Z));case"policySettings":return Cq();case"flagSettings":return vq()}}function gB(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function u(Z){let X=EB(Z);if(X!==void 0)return X;let q=mB(Z);return vB(Z,q),q}function mB(Z){if(Z==="policySettings"){let Q=G5();if(Q&&Object.keys(Q).length>0)return Q;let $=O5();if(Object.keys($.settings).length>0)return $.settings;let{settings:J}=Sq();if(J)return J;let Y=k5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=x5(Z),{settings:q}=X?N4(X):{settings:null};if(Z==="flagSettings"){let Q=yq();if(Q){let $=E0().safeParse(Q);if($.success)return G1(q||{},$.data,Y2)}}return q}function Me(){let Z=G5();if(Z&&Object.keys(Z).length>0)return"remote";let X=O5();if(Object.keys(X.settings).length>0)return A0()==="macos"?"plist":"hklm";let{settings:q}=Sq();if(q)return"file";let Q=k5();if(Object.keys(Q.settings).length>0)return"hkcu";return null}function Re(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let q=x5(Z);if(!q)return{error:null};try{N().mkdirSync(hB(q));let Q=mB(Z);if(!Q){let J=null;try{J=H1(q)}catch(Y){if(!a2(Y))throw Y}if(J!==null){let Y=O0(J);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${q}`)};if(Y&&typeof Y==="object")Q=Y,P(`Using raw settings from ${q} due to validation failure`)}}let $=G1(Q||{},X,(J,Y,H,U)=>{if(Y===void 0&&U&&typeof H==="string"){delete U[H];return}if(Array.isArray(Y))return Y;return});if(VV(q),o2(q,m($,null,2)+`
118
- `),T4(),Z==="localSettings")KV(gB("localSettings"),P1())}catch(Q){let $=Error(`Failed to read raw settings from ${q}: ${Q}`);return g($),{error:$}}return{error:null}}function xx(Z,X){return HV([...Z,...X])}function Y2(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return xx(Z,X);return}function Fe(Z){let X=E0().strip().parse(Z),q=["permissions","sandbox","hooks"],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 J of Object.keys(X))if(q.includes(J)&&X[J]&&typeof X[J]==="object"){let Y=X[J],H=$[J];if(H){for(let U of Object.keys(Y))if(H.has(U))Q.push(`${J}.${U}`)}}else Q.push(J);return Q.sort()}function Px(){if(Pq)return{settings:{},errors:[]};let Z=Date.now();U6("loadSettingsFromDisk_start"),Y0("info","settings_load_started"),Pq=!0;try{let X=SB(),q={};if(X)q=G1(q,X,Y2);let Q=[],$=new Set,J=new Set;for(let Y of j4()){if(Y==="policySettings"){let U=null,G=[],W=G5();if(W&&Object.keys(W).length>0){let V=E0().safeParse(W);if(V.success)U=V.data;else G.push(...H6(V.error,"remote managed settings"))}if(!U){let V=O5();if(Object.keys(V.settings).length>0)U=V.settings;G.push(...V.errors)}if(!U){let{settings:V,errors:L}=Sq();if(V)U=V;G.push(...L)}if(!U){let V=k5();if(Object.keys(V.settings).length>0)U=V.settings;G.push(...V.errors)}if(U)q=G1(q,U,Y2);for(let V of G){let L=`${V.file}:${V.path}:${V.message}`;if(!$.has(L))$.add(L),Q.push(V)}continue}let H=x5(Y);if(H){let U=k4(H);if(!J.has(U)){J.add(U);let{settings:G,errors:W}=N4(H);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!$.has(L))$.add(L),Q.push(V)}if(G)q=G1(q,G,Y2)}}if(Y==="flagSettings"){let U=yq();if(U){let G=E0().safeParse(U);if(G.success)q=G1(q,G.data,Y2)}}}return Y0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:J.size,error_count:Q.length}),{settings:q,errors:Q}}finally{Pq=!1}}function bq(){let{settings:Z}=Ex();return Z||{}}function De(){T4();let Z=[];for(let X of j4()){let q=u(X);if(q&&Object.keys(q).length>0)Z.push({source:X,settings:q})}return{effective:bq(),sources:Z}}function Ex(){let Z=xB();if(Z!==null)return Z;let X=Px();return U6("loadSettingsFromDisk_end"),PB(X),X}function Ae(){return!!(u("userSettings")?.skipDangerousModePermissionPrompt||u("localSettings")?.skipDangerousModePermissionPrompt||u("flagSettings")?.skipDangerousModePermissionPrompt||u("policySettings")?.skipDangerousModePermissionPrompt)}function Te(){return!!(u("userSettings")?.permissions?.allowBypassPermissionsMode||u("localSettings")?.permissions?.allowBypassPermissionsMode||u("flagSettings")?.permissions?.allowBypassPermissionsMode||u("policySettings")?.permissions?.allowBypassPermissionsMode)}function je(){{let Z=u("userSettings")?.skipAutoPermissionPrompt,X=u("localSettings")?.skipAutoPermissionPrompt,q=u("flagSettings")?.skipAutoPermissionPrompt,Q=u("policySettings")?.skipAutoPermissionPrompt,$=!!(Z||X||q||Q);return P(`[auto-mode] hasAutoModeOptIn=${$} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${q} policy=${Q}`),$}return!1}function Ie(){return u("policySettings")?.useAutoModeDuringPlan!==!1&&u("flagSettings")?.useAutoModeDuringPlan!==!1&&u("userSettings")?.useAutoModeDuringPlan!==!1&&u("localSettings")?.useAutoModeDuringPlan!==!1}function we(){return vx().config}function vx(){return bx(u)}function bx(Z){let X=[],q=[],Q=[],$=[],J=(U,G,W)=>{if(!W)return;let V=LV(W);G.push(...V.entries);for(let L of V.dropped)$.push({section:U,entry:L.entry,reason:zV(L.reason)})};for(let U of yx){let G=Z(U);if(!G)continue;let W=Sx.safeParse(G.autoMode);if(W.success)J("allow",X,W.data.allow),J("soft_deny",q,W.data.soft_deny),J("environment",Q,W.data.environment)}let Y=[];for(let U of Cx){let G=Z(U);if(!G)continue;let W=G.autoMode;if(W&&typeof W==="object")Y.push(U)}return{config:X.length>0||q.length>0||Q.length>0?{...X.length>0&&{allow:X},...q.length>0&&{soft_deny:q},...Q.length>0&&{environment:Q}}:void 0,dropped:$,ignoredSources:Y}}function Oe(Z){for(let X of j4()){if(X==="policySettings")continue;let q=x5(X);if(!q)continue;try{let{resolvedPath:Q}=j1(N(),q),$=H1(Q);if(!$.trim())continue;let J=O0($,!1);if(J&&typeof J==="object"&&Z in J)return!0}catch(Q){fB(Q,q)}}return!1}var Pq=!1,yx,Cx,Sx;var uB=B(()=>{$V();s0();x1();YV();Yq();b0();$4();i0();i1();C7();J4();z0();UV();j6();v0();l2();L0();wB();Hq();BV();_V();V5();kB();JV();O4();jq();yx=["userSettings","flagSettings","policySettings"],Cx=["projectSettings","localSettings"],Sx=K.object({allow:K.array(K.string()).optional(),soft_deny:K.array(K.string()).optional(),deny:K.array(K.string()).optional(),environment:K.array(K.string()).optional()})});import{cpSync as hx,readFileSync as fx,readdirSync as gx}from"fs";import{join as mx}from"path";function cB(Z,X){if(Z===X)return;if(dB(X))return;if(!dB(Z))return;try{hx(Z,X,{recursive:!0,force:!1,errorOnExist:!1})}catch(q){g(Error(`Failed to migrate auto-memory from ${Z} to ${X}: ${q instanceof Error?q.message:String(q)}`))}}function dB(Z){try{if(fx(mx(Z,pB),"utf-8").trim())return!0}catch{}try{return gx(Z,{withFileTypes:!0}).some((X)=>X.isFile()&&X.name.endsWith(".md")&&X.name!==pB)}catch{return!1}}var pB="MEMORY.md";var lB=B(()=>{v0()});import{chmodSync as ux}from"fs";import{homedir as px}from"os";import{isAbsolute as dx,join as x4,normalize as hq,sep as P5}from"path";function oB(){let Z=process.env.CLAUDIN_DISABLE_AUTO_MEMORY;if(e(Z))return!1;if(aB(Z))return!0;if(e(process.env.CLAUDIN_SIMPLE))return!1;if(e(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let X=bq();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function le(){if(!o1("tengu_passport_quail",!1))return!1;return!iB()||o1("tengu_slate_thimble",!1)}function cx(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return Z0()}function sB(Z,X){if(!Z)return;let q=Z;if(X&&(q.startsWith("~/")||q.startsWith("~\\"))){let $=q.slice(2),J=hq($||".");if(J==="."||J==="..")return;q=x4(px(),$)}let Q=hq(q).replace(/[/\\]+$/,"");if(!dx(Q)||Q.length<3||/^[A-Za-z]:$/.test(Q)||Q.startsWith("\\\\")||Q.startsWith("//")||Q.includes("\x00"))return;return(Q+P5).normalize("NFC")}function rB(){return sB(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function nx(){let Z=u("policySettings")?.autoMemoryDirectory??u("flagSettings")?.autoMemoryDirectory??u("localSettings")?.autoMemoryDirectory??u("userSettings")?.autoMemoryDirectory;return sB(Z,!0)}function ne(){return rB()!==void 0}function ix(){return(u("policySettings")?.autoMemoryProjectLocal??u("flagSettings")?.autoMemoryProjectLocal??u("localSettings")?.autoMemoryProjectLocal??u("userSettings")?.autoMemoryProjectLocal)!==!1}function ax(){return X2(P4())??P4()}function tB(){return x4(E4(),lx)}function ie(Z){return hq(Z).startsWith(E4())}var nB="memory",lx="MEMORY.md",E4;var fq=B(()=>{A1();x1();y7();i0();_4();v0();Y4();uB();z0();lB();E4=c(()=>{let Z=rB()??nx();if(Z)return Z;let X=x4(cx(),"projects"),q=(x4(X,IX(ax()),nB)+P5).normalize("NFC");if(!ix())return q;let Q=X2(P4());if(!Q)return q;let $=(x4(Q,".claudin",nB)+P5).normalize("NFC");try{N().mkdirSync($,{mode:448})}catch(Y){return g(Y),q}let J=!1;try{let Y=N().realpathSync(Q),H=N().realpathSync($);if(J=H===Y||H.startsWith(Y+P5),!J)g(Error(`Auto-memory directory escapes project root via symlink: ${$} -> ${H}`))}catch(Y){g(Y)}if(!J)return q;try{ux($,448)}catch{}return cB(q,$),$},()=>P4())});function v4(Z){if(Z===void 0)return!1;let X=Z.trim().toLowerCase();return X==="0"||X==="false"||X==="no"||X==="off"||X===""}function ox(){let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC,X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&v4(Z)||X!==void 0&&v4(X)){if(process.env.DISABLE_TELEMETRY&&!v4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function gq(){return ox()==="essential-traffic"}function mq(){if(!gq())return null;let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!v4(Z))return"CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC";let X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(X!==void 0&&!v4(X))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}function eB(){let Z=mq();return Z==="claudin-default"?null:Z}var uq=()=>{};import{dirname as sx,join as ZL}from"path";function qL(Z){return[ZL(Z,E5),ZL(Z,XL)]}function rx(Z,X){let[q,Q]=qL(Z);return X(q)?q:Q}function tx(Z,X){return qL(Z).some((q)=>X(q))}function re(Z,X){let q=Z;while(!0){if(tx(q,X))return rx(q,X);let Q=sx(q);if(Q===q)return null;q=Q}}function te(Z){return Z===E5||Z===XL}var E5="AGENTS.md",XL="CLAUDE.md";var QL=()=>{};var HL={};Kq(HL,{isTeamMemoryEnabled:()=>$L,isTeamMemPath:()=>YL,isTeamMemLikelyGitIgnored:()=>JP,isTeamMemFile:()=>YP,getTeamMemPath:()=>JL,getTeamMemEntrypoint:()=>qP});import{readFileSync as ex}from"fs";import{join as pq,resolve as ZP,sep as XP}from"path";function $L(){if(!oB())return!1;return o1("tengu_herring_clock",!0)}function JL(){return(pq(E4(),"team")+XP).normalize("NFC")}function qP(){return pq(E4(),"team","MEMORY.md")}function YL(Z){let X=ZP(Z),q=JL();return X.startsWith(q)}function YP(Z){return $L()&&YL(Z)}var QP,$P,JP;var KL=B(()=>{A1();y7();fq();QP=/^\/?\.claudin\/?$/,$P=/^!\/?\.claudin\/memory\/team\/?/,JP=c((Z)=>{try{let X=ex(pq(Z,".gitignore"),"utf-8"),q=!1;for(let Q of X.split(`
119
- `)){let $=Q.trim();if(!$||$.startsWith("#"))continue;if(QP.test($))q=!0;else if($P.test($))q=!1}return q}catch{return!1}})});import{randomBytes as HP}from"crypto";import{join as G6}from"path";function UL(){return GL()!==null}function UP(){return UL()&&!e(process.env.FORCE_AUTOUPDATE_PLUGINS)}function GP(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function GL(Z){if(e(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let X=Z?.ignoreClaudinDefaultPrivacy?eB():mq();if(X)return{type:"env",envVar:X};let q=a();if(q.autoUpdates===!1&&(q.installMethod!=="native"||q.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function WP(){let Z=a();if(Z.userID)return Z.userID;let X=HP(32).toString("hex");return V0((q)=>({...q,userID:X})),X}function VP(){if(!a().firstStartTime){let X=new Date().toISOString();V0((q)=>({...q,firstStartTime:q.firstStartTime??X}))}}function BP(Z){let X=P1();switch(Z){case"User":return G6(Z0(),"CLAUDE.md");case"Local":return G6(X,"CLAUDE.local.md");case"Project":return G6(X,E5);case"Managed":return G6(E1(),"CLAUDE.md");case"AutoMem":return tB()}return KP.getTeamMemEntrypoint()}function LP(){return G6(E1(),".claudin","rules")}function zP(){return G6(Z0(),"rules")}var KP;var WL=B(()=>{x1();fq();i0();uq();c2();V5();QL();KP=(KL(),y4(HL))});var _P,MP;var VL=B(()=>{_P=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],MP=["normal","vim"]});var dq=B(()=>{X$();z6();v7();c2();rX();JW();WL();VL()});function v5(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function BL(Z){let X=v5(Z);return X.length>0?X[0]:Z.trim()}var cq=()=>{};import{randomBytes as RP}from"crypto";function W6(Z){return Z?.trim()??""}function G0(Z){let X=W6(Z);return X.length>0?X:void 0}function FP(Z){return W6(Z).replace(/\/+$/,"")}function DP(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function AP(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function TP(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[q,Q]of Object.entries(Z)){let $=W6(q),J=typeof Q==="string"?Q.trim():"";if($.length>0&&J.length>0)X[$]=J}return Object.keys(X).length>0?X:void 0}function jP(Z){if(!Z||typeof Z!=="object")return;let X={},q=G0(Z.codexAuthPath);if(q)X.codexAuthPath=q;let Q=G0(Z.codexAccountId);if(Q)X.codexAccountId=Q;let $=G0(Z.githubToken);if($)X.githubToken=$;let J=G0(Z.awsRegion);if(J)X.awsRegion=J;let Y=G0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=G0(Z.gcpRegion);if(H)X.gcpRegion=H;let U=G0(Z.azureResource);if(U)X.azureResource=U;let G=TP(Z.customHeaders);if(G)X.customHeaders=G;let W=AP(Z.reasoningEffort);if(W)X.reasoningEffort=W;return Object.keys(X).length>0?X:void 0}function RL(Z){let X=W6(Z.id),q=W6(Z.name),Q=DP(Z.provider),$=FP(Z.baseUrl),J=W6(Z.model);if(!X||!q||!$||Q!=="anthropic"&&!J)return null;let H={id:X,name:q,provider:Q,baseUrl:$,model:J,apiKey:G0(Z.apiKey)},U=jP(Z.extras);if(U)H.extras=U;return H}function IP(Z){let X=new Set,q=[];for(let Q of Z??[]){let $=RL(Q);if(!$||X.has($.id))continue;X.add($.id),q.push($)}return q}function wP(){return`provider_${RP(6).toString("hex")}`}function FL(Z,X=wP()){return RL({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function DL(Z,X=a()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function x00(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:LL,model:zL,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:LL,model:zL,apiKey:"",requiresApiKey:!1}}}function f0(Z=a()){return IP(Z.providerProfiles)}function P00(Z=a()){return f0(Z).length>0}function B1(Z=a()){let X=f0(Z);if(X.length===0)return;let q=G0(R4().activeProviderProfileId);if(q){let $=X.find((J)=>J.id===q);if($)return $}let Q=G0(Z.activeProviderProfileId);return X.find(($)=>$.id===Q)??X[0]}function E00(){let Z=G0(R4().activeProviderProfileId);if(!Z)return;return f0().some((q)=>q.id===Z)?Z:void 0}function OP(){return G0(R4().activeProviderProfileId)}function v00(){return OP()!==void 0}function kP(){return G0(a().activeProviderProfileId)}function y00(Z,X){let q=FL(Z);if(!q)return null;let Q=X?.makeActive??!0;if(V0(($)=>{let Y=[...f0($),q],H=G0($.activeProviderProfileId),U=Q||!H||!Y.some((G)=>G.id===H)?q.id:H;return{...$,providerProfiles:Y,activeProviderProfileId:U}}),kP()===q.id)xP(q.id),EP();return q}function C00(Z,X){let q=FL(X,Z);if(!q)return null;let Q=!1;if(V0(($)=>{let J=f0($),Y=J.findIndex((L)=>L.id===Z);if(Y<0)return $;Q=!0;let H=[...J];H[Y]=q;let U={...$.openaiAdditionalModelOptionsCacheByProfile??{}};delete U[Z];let G=G0($.activeProviderProfileId),W=G&&H.some((L)=>L.id===G)?G:H[0]?.id;return{...$,providerProfiles:H,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:W===Z?[]:$.openaiAdditionalModelOptionsCache}}),!Q)return null;return q}function S00(Z){let X=G0(Z);if(!X)return null;let q=B1();if(!q)return null;if(v5(q.model).includes(X))return q;V0((J)=>{let Y=f0(J),H=Y.findIndex((V)=>V.id===q.id);if(H<0)return J;let U=Y[H];if(U.model===X)return J;let G=[...Y];G[H]={...U,model:X};let W={...J.openaiAdditionalModelOptionsCacheByProfile??{}};return delete W[q.id],{...J,providerProfiles:G,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:[]}});let $=B1();if(!$||$.id!==q.id)return null;return $}function b00(){let Z=B1();if(!Z)return;V0((X)=>{let q=f0(X),Q=q.findIndex((H)=>H.id===Z.id);if(Q<0)return X;let $=q[Q];if(!$.model)return X;let J=[...q];J[Q]={...$,model:""};let Y={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete Y[Z.id],{...X,providerProfiles:J,openaiAdditionalModelOptionsCacheByProfile:Y,openaiAdditionalModelOptionsCache:[]}})}function NP(Z){let X=v5(Z.model);if(X.length===0)return[];return X.map((q)=>({value:q,label:q,description:`Provider: ${Z.name}`}))}function lq(Z,X){let q=NP(Z);return{openaiAdditionalModelOptionsCache:q.length>0?q:DL(Z.id,X),openaiAdditionalModelOptionsCacheByProfile:{...X.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:q.length>0?q:X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function xP(Z){let X=a(),Q=f0(X).find(($)=>$.id===Z);if(!Q)return null;return V0(($)=>({...$,activeProviderProfileId:Z,...lq(Q,$)})),Q}function h00(Z){if(Z===null){$5((J)=>({...J,activeProviderProfileId:void 0,activeModelForProject:void 0,activeModelForProjectProfileId:void 0}));let $=B1();if($)_L($);return null}let q=f0().find(($)=>$.id===Z);if(!q)return null;let Q=!1;if($5(($)=>{if(!f0().some((H)=>H.id===Z))return Q=!0,$;let Y={...$,activeProviderProfileId:Z};if($.activeProviderProfileId!==Z)Y.activeModelForProject=void 0,Y.activeModelForProjectProfileId=void 0;return Y}),Q)return null;return _L(q),q}function _L(Z){let X=a(),q=lq(Z,X),Q=X.openaiAdditionalModelOptionsCache??[],$=X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],J=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(ML(Q,q.openaiAdditionalModelOptionsCache??[])&&ML($,J))return;V0((Y)=>({...Y,...lq(Z,Y)}))}function ML(Z,X){if(Z.length!==X.length)return!1;for(let q=0;q<Z.length;q++)if(Z[q]!==X[q])return!1;return!0}function PP(Z,X){if(!Z)return{projects:Z,stripped:[]};let q=(J)=>{let Y=J?.activeProviderProfileId;return Y!=null&&X(Y)?Y:void 0};if(!Object.values(Z).some((J)=>q(J)!==void 0))return{projects:Z,stripped:[]};let Q=[];return{projects:Object.fromEntries(Object.entries(Z).map(([J,Y])=>{let H=q(Y);if(H!==void 0){let{activeProviderProfileId:U,activeModelForProject:G,activeModelForProjectProfileId:W,...V}=Y;return Q.push({path:J,activeProviderProfileId:H,activeModelForProject:G??void 0}),[J,V]}return[J,Y]})),stripped:Q}}function f00(Z){let X=!1,q;return V0((Q)=>{let $=f0(Q);if(!$.find((L)=>L.id===Z))return Q;X=!0;let Y=$.filter((L)=>L.id!==Z),H=G0(Q.activeProviderProfileId),G=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(G)q=Y.find((L)=>L.id===G)??Y[0];let W={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete W[Z];let{projects:V}=PP(Q.projects,(L)=>L===Z);return{...Q,providerProfiles:Y,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:G?DL(G,{...Q,openaiAdditionalModelOptionsCacheByProfile:W}):[],projects:V}}),{removed:X,activeProfileId:q?.id}}function g00(Z=a()){let X=B1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let q=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(q)return q;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function m00(Z){let X=B1();if(!X){V0((q)=>({...q,openaiAdditionalModelOptionsCache:Z}));return}V0((q)=>({...q,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function EP(){let Z=B1();if(!Z){V0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}V0((X)=>{let q={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete q[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:q}})}var LL="http://localhost:11434/v1",zL="llama3.1:8b";var AL=B(()=>{dq();cq()});function y5(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let q=Z.read();if(q!==null&&q!==void 0)return q;return X.read()||{}},async readAsync(){let q=await Z.readAsync();if(q!==null&&q!==void 0)return q;return await X.readAsync()||{}},update(q){let Q=Z.read(),$=Z.update(q);if($.success){if(Q===null)X.delete();return $}let J=X.update(q);if(J.success){if(Q!==null)Z.delete();return{success:!0,warning:J.warning}}return{success:!1}},delete(){let q=Z.delete(),Q=X.delete();return q||Q}}}var TL=()=>{};function C5(Z,X,q=10*IL*jL){let G=[];try{let Q;if(X===void 0)Q={};else if(X instanceof AbortSignal)Q={abortSignal:X,timeout:q};else Q=X;let{abortSignal:$,timeout:J=10*IL*jL,input:Y,stdio:H=["ignore","pipe","pipe"]}=Q;$?.throwIfAborted();const U=L2(G,O7`exec: ${Z.slice(0,200)}`,0);try{let z=x0(Z,{env:process.env,maxBuffer:1e6,timeout:J,cwd:r(),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{z2(G,V,L)}}var jL=1000,IL=60;var nq=B(()=>{g2();K1();L0()});import{createHash as vP}from"crypto";import{userInfo as yP}from"os";function H2(Z=""){let X=Z0(),Q=!process.env.CLAUDIN_CONFIG_DIR?"":`-${vP("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${wL().OAUTH_FILE_SUFFIX}${Z}${Q}`}function C4(Z=""){return H2(Z)}function I0(){try{return process.env.USER||yP().username}catch{return"claude-code-user"}}function aq(){Q0.cache={data:null,cachedAt:0},Q0.generation++,Q0.readInFlight=null}function t00(Z){if(Q0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}Q0.cache={data:X,cachedAt:Date.now()}}var g0="-credentials",iq=30000,Q0;var S5=B(()=>{uU();i0();Q0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function SP(){try{let Z=C4(g0),X=I0(),{stdout:q,code:Q}=await T0("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(Q===0&&q)return q0(q.trim())}catch(Z){}return null}function Y10(){if(V6!==void 0)return V6;if(process.platform!=="darwin")return V6=!1,!1;try{V6=x0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{V6=!1}return V6}var CP=4032,oq,V6;var OL=B(()=>{g2();b0();Q5();nq();L0();S5();oq={name:"keychain",read(){let Z=Q0.cache;if(Date.now()-Z.cachedAt<iq)return Z.data;try{let X=C4(g0),q=I0(),Q=C5(`security find-generic-password -a "${q}" -w -s "${X}"`);if(Q){let $=q0(Q);return Q0.cache={data:$,cachedAt:Date.now()},$}}catch(X){}if(Z.data!==null)return P("[keychain] read failed; serving stale cache",{level:"warn"}),Q0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return Q0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=Q0.cache;if(Date.now()-Z.cachedAt<iq)return Z.data;if(Q0.readInFlight)return Q0.readInFlight;let X=Q0.generation,q=SP().then((Q)=>{if(X===Q0.generation){if(Q===null&&Z.data!==null)P("[keychain] readAsync failed; serving stale cache",{level:"warn"});let $=Q??Z.data;return Q0.cache={data:$,cachedAt:Date.now()},Q0.readInFlight=null,$}return Q});return Q0.readInFlight=q,q},update(Z){aq();try{let X=C4(g0),q=I0(),Q=m(Z),$=Buffer.from(Q,"utf-8").toString("hex"),J=`add-generic-password -U -a "${q}" -s "${X}" -X "${$}"
120
- `,Y;if(J.length<=CP)Y=x0("security",["-i"],{input:J,stdio:["pipe","pipe","pipe"],reject:!1});else P(`Keychain payload (${Q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=x0("security",["add-generic-password","-U","-a",q,"-s",X,"-X",$],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return Q0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){aq();try{let Z=C4(g0),X=I0();return C5(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var sq;var kL=B(()=>{g2();L0();S5();sq={name:"libsecret",read(){try{let Z=I0(),X=H2(g0),q=x0("secret-tool",["lookup","service",X,"account",Z],{reject:!1});if(q.exitCode===0&&q.stdout)return q0(q.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let X=I0(),q=H2(g0),Q=m(Z);return{success:x0("secret-tool",["store","--label",q,"service",q,"account",X],{input:Q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=I0(),X=H2(g0);return x0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as bP}from"path";function S4(Z){return Z.replace(/'/g,"''")}function b5(){return H2(g0)}function NL(){return`${b5()}:${I0()}`}function rq(){let Z=b5().replace(/[^a-zA-Z0-9._-]/g,"_");return bP(Z0(),`${Z}.secure.dpapi`)}function b4(Z,X){try{return x0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function tq(Z){return typeof Z==="string"?Z:""}function hP(Z,X){let q=tq(Z?.stderr).trim();if(q)return q;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function xL(){let Z=b5().replace(/"/g,'`"'),X=I0().replace(/"/g,'`"'),q=`
121
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
122
- try {
123
- $vault = New-Object Windows.Security.Credentials.PasswordVault
124
- $cred = $vault.Retrieve("${Z}", "${X}")
125
- $cred.FillPassword()
126
- [Console]::Out.Write($cred.Password)
127
- } catch {
128
- exit 1
129
- }
130
- `,Q=b4(q);if(Q?.exitCode===0&&Q.stdout)try{return q0(tq(Q.stdout))}catch{return null}return null}var eq;var PL=B(()=>{g2();i0();L0();S5();eq={name:"credential-locker-dpapi",read(){let Z=S4(rq()),X=S4(NL()),q=`
131
- try {
132
- Add-Type -AssemblyName System.Security
133
- $path = '${Z}'
134
- if (!(Test-Path -LiteralPath $path)) {
135
- exit 1
136
- }
137
-
138
- $protectedBase64 = [System.IO.File]::ReadAllText(
139
- $path,
140
- [System.Text.Encoding]::UTF8
141
- ).Trim()
142
- if (-not $protectedBase64) {
143
- exit 1
144
- }
145
-
146
- $protectedBytes = [Convert]::FromBase64String($protectedBase64)
147
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${X}')
148
- $bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
149
- $protectedBytes,
150
- $entropyBytes,
151
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
152
- )
153
- [Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
154
- } catch {
155
- exit 1
156
- }
157
- `,Q=b4(q);if(Q?.exitCode===0&&Q.stdout)try{return q0(tq(Q.stdout))}catch{return xL()}return xL()},async readAsync(){return this.read()},update(Z){let X=S4(rq()),q=S4(NL()),Q=m(Z),$=`
158
- try {
159
- Add-Type -AssemblyName System.Security
160
- $path = '${X}'
161
- $directory = [System.IO.Path]::GetDirectoryName($path)
162
- if ($directory) {
163
- [System.IO.Directory]::CreateDirectory($directory) | Out-Null
164
- }
165
-
166
- $payload = [Console]::In.ReadToEnd()
167
- $bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
168
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
169
- $protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
170
- $bytes,
171
- $entropyBytes,
172
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
173
- )
174
- $protectedBase64 = [Convert]::ToBase64String($protectedBytes)
175
- [System.IO.File]::WriteAllText(
176
- $path,
177
- $protectedBase64,
178
- [System.Text.Encoding]::UTF8
179
- )
180
- } catch {
181
- Write-Error $_.Exception.Message
182
- exit 1
183
- }
184
- `,J=b4($,{input:Q});if(J?.exitCode===0)return{success:!0};return{success:!1,warning:hP(J,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let X=`
185
- try {
186
- $path = '${S4(rq())}'
187
- if (Test-Path -LiteralPath $path) {
188
- Remove-Item -LiteralPath $path -Force
189
- }
190
- } catch {
191
- exit 1
192
- }
193
- `,q=b4(X),Q=b5().replace(/"/g,'`"'),$=I0().replace(/"/g,'`"'),J=`
194
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
195
- try {
196
- $vault = New-Object Windows.Security.Credentials.PasswordVault
197
- $cred = $vault.Retrieve("${Q}", "${$}")
198
- $vault.Remove($cred)
199
- } catch {
200
- exit 0
201
- }
202
- `,Y=b4(J);return(q?.exitCode??1)===0}}});import{chmodSync as fP}from"fs";import{join as gP}from"path";function h5(){let Z=Z0(),X=".credentials.json";return{storageDir:Z,storagePath:gP(Z,".credentials.json")}}var h4;var vL=B(()=>{i0();i1();z0();L0();h4={name:"plaintext",read(){let{storagePath:Z}=h5();try{let X=N().readFileSync(Z,{encoding:"utf8"});return q0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=h5();try{let X=await N().readFile(Z,{encoding:"utf8"});return q0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:q}=h5();try{N().mkdirSync(X)}catch(Q){if(B0(Q)!=="EEXIST")throw Q}return EL(q,m(Z),{encoding:"utf8",flush:!1}),fP(q,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=h5();try{return N().unlinkSync(Z),!0}catch(X){if(B0(X)==="ENOENT")return!0;return!1}}}});function yL(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?y5(oq,h4):oq;if(process.platform==="linux")return X?y5(sq,h4):sq;if(process.platform==="win32")return X?y5(eq,h4):eq;return X?h4:mP}var mP;var CL=B(()=>{TL();OL();kL();PL();vL();mP={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 b(Z){if(typeof Z!=="string")return;let X=Z.trim();return X?X:void 0}function ZQ(Z=process.env){return b(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function C10(Z=process.env){let X=b(Z.CODEX_OAUTH_CALLBACK_PORT);if(!X)return 1455;let q=Number.parseInt(X,10);if(Number.isInteger(q)&&q>=0&&q<=65535)return q;return 1455}function XQ(Z){let X=Z.split(".");if(X.length<2)return;try{let q=X[1].replace(/-/g,"+").replace(/_/g,"/"),Q=q+"=".repeat((4-q.length%4)%4),$=Buffer.from(Q,"base64").toString("utf8"),J=JSON.parse($);return J&&typeof J==="object"?J:void 0}catch{return}}function m0(Z){if(!Z)return;let X=XQ(Z),q=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0,Q=q?.organizations,$=Array.isArray(Q)&&Q.length>0&&typeof Q[0]==="object"?Q[0].id:void 0;return b(q?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id??$)??void 0}function S10(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#39;";default:return X}})}async function bL(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:ZQ(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),q=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!q.ok){let J=await q.text().catch(()=>"");throw Error(J.trim()?`Codex API key exchange failed (${q.status}): ${J.trim()}`:`Codex API key exchange failed with status ${q.status}.`)}let Q=await q.json(),$=b(Q.access_token);if(!$)throw Error("Codex API key exchange completed, but no API key token was returned.");return $}var E10="https://auth.openai.com",SL="https://auth.openai.com/oauth/token",v10="openid profile email offline_access api.connectors.read api.connectors.invoke",y10="codex_cli_rs";var qQ=()=>{};function m5(){return yL({allowPlainTextFallback:!0})}function hL(Z){if(!Z)return;let q=XQ(Z)?.exp;if(typeof q==="number"&&Number.isFinite(q))return q*1000;return}function g4(Z){if(!Z||typeof Z!=="object")return;let X=Z,q=b(X.apiKey),Q=b(X.accessToken);if(!Q)return;let $=b(X.refreshToken),J=b(X.idToken),Y=b(X.accountId)??m0(J)??m0(Q),H=b(X.profileId),U=typeof X.lastRefreshAt==="number"&&Number.isFinite(X.lastRefreshAt)?X.lastRefreshAt:void 0,G=typeof X.lastRefreshFailureAt==="number"&&Number.isFinite(X.lastRefreshFailureAt)?X.lastRefreshFailureAt:void 0;return{apiKey:q,accessToken:Q,refreshToken:$,idToken:J,accountId:Y,profileId:H,lastRefreshAt:U,lastRefreshFailureAt:G}}function dP(Z){let X=hL(Z.accessToken)??hL(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+uP}function fL(Z,X=Date.now()){let q=Math.max(Z.lastRefreshFailureAt??0,g5??0);if(!q)return!1;return X-q<pP}function cP(Z,X){if(!X.trim())return`Codex token refresh failed with status ${Z}.`;try{let q=JSON.parse(X),Q=q.error&&typeof q.error==="object"?q.error:void 0,$=b(Q?.code??q.code),J=b(Q?.message??q.error_description)??X.trim();return $?`Codex token refresh failed (${$}): ${J}`:`Codex token refresh failed with status ${Z}: ${J}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function gL(){if(B6())return;try{let Z=m5().read();return g4(Z?.codex)}catch{return}}async function lP(){if(B6())return;try{let Z=await m5().readAsync();return g4(Z?.codex)}catch{return}}function mL(Z,X=Date.now()){return fL(Z,X)}function uL(Z){if(B6())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=g4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let q=m5(),Q=q.read()||{},$=g4(Q[f5]),J={...Q,[f5]:{...X,profileId:X.profileId??$?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=q.update(J);if(Y.success)g5=g4(J[f5])?.lastRefreshFailureAt??null;return Y}function nP(Z,X){if(!uL({...Z,lastRefreshFailureAt:X}).success)g5=X}function p10(){if(B6())return{success:!0};let Z=m5(),q={...Z.read()||{}};delete q[f5];let Q=Z.update(q);if(Q.success)g5=null;return Q}async function d10(Z){if(B6())return{refreshed:!1};if(m4()?.apiKey?.trim())return{refreshed:!1};let X=await lP();if(!X)return{refreshed:!1};let q=X.refreshToken;if(!q)return{refreshed:!1,credentials:X};if(!Z?.force&&!dP(X))return{refreshed:!1,credentials:X};if(fL(X))return{refreshed:!1,credentials:X};if(f4)return f4;return f4=(async()=>{let Q=Date.now();try{let $=new URLSearchParams({client_id:ZQ(),grant_type:"refresh_token",refresh_token:q}),J=await fetch(SL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:$,signal:AbortSignal.timeout(15000)});if(!J.ok){let V=await J.text().catch(()=>"");throw Error(cP(J.status,V))}let Y=await J.json(),H=b(Y.access_token);if(!H)throw Error("Codex token refresh succeeded without a new access token.");let U={accessToken:H,refreshToken:b(Y.refresh_token)??X.refreshToken,idToken:b(Y.id_token)??X.idToken,accountId:m0(Y.id_token)??m0(Y.access_token)??X.accountId,lastRefreshAt:Date.now()},G=U.idToken??X.idToken;if(G)U.apiKey=await bL(G).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=uL(U);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:U}}catch($){throw nP(X,Q),$}finally{f4=null}})(),f4}var f5="codex",uP=60000,pP=60000,f4=null,g5=null;var pL=B(()=>{K2();b0();i0();CL();qQ()});import{existsSync as iP,readFileSync as aP}from"node:fs";import{isIP as oP}from"node:net";import{homedir as sP}from"node:os";import{join as dL}from"node:path";function t10(Z){if(!Z)return!1;try{let{hostname:X}=new URL(Z);return X==="api.x.ai"}catch{return!1}}function e10(Z){if(!Z)return!1;try{let{hostname:X,pathname:q}=new URL(Z);return X==="api.kimi.com"&&q.startsWith("/coding")}catch{return!1}}function ZE(Z){let X=Z.split(".").map((q)=>Number.parseInt(q,10));if(X.length!==4||X.some((q)=>Number.isNaN(q)))return!1;return X[0]===10||X[0]===172&&X[1]>=16&&X[1]<=31||X[0]===192&&X[1]===168}function XE(Z){let X=Z.split(":",1)[0];if(!X)return!1;let q=Number.parseInt(X,16);if(Number.isNaN(q))return!1;return(q&65024)===64512||(q&65472)===65152}function JQ(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function QQ(Z,X){for(let q of X){let Q=Z,$=!0;for(let Y of q){if(!Q||typeof Q!=="object"||!(Y in Q)){$=!1;break}Q=Q[Y]}if(!$)continue;let J=b(Q);if(J)return J}return}function qE(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh"||X==="max")return X;return}function cL(Z){let X=Z.trim(),q=X.indexOf("?");if(q===-1){let G=X.toLowerCase(),W=p5[G];if(W)return{raw:X,baseModel:W.model,reasoning:W.reasoningEffort?{effort:W.reasoningEffort}:void 0};return{raw:X,baseModel:X}}let Q=X.slice(0,q).trim(),$=new URLSearchParams(X.slice(q+1)),J=Q.toLowerCase(),Y=p5[J],H=Y?.model??Q,U=qE($.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof U==="string"?{effort:U}:U}}function oL(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in p5}function YQ(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return tP.has(q)}function sL(Z){return YQ(Z)}function QE(Z,X){let q=JQ(X);return GE(q)||!q&&oL(Z)}function HE(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let q=$E.exec(X);if(!q)return!1;if(Number(q[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function rL(Z){if(!Z)return!1;try{let X=new URL(Z).hostname.toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);let q=X.indexOf("%25");if(q!==-1)X=X.slice(0,q);if(eP.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let Q=oP(X);if(Q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||ZE(X);if(Q===6)return XE(X);return!1}catch{return!1}}function u5(Z){return Z.replace(HQ,"")}function KE(Z){let X=u5(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function UE(Z){try{let X=new URL(Z),q=X.hostname.toLowerCase(),Q=X.pathname.toLowerCase();if(X.port==="11434")return!0;return q.includes("ollama")||Q.includes("ollama")}catch{return!1}}function Z20(Z){if(!rL(Z))return[];try{let X=new URL(Z),q=u5(X.toString()),Q=new Set([q]),$=[],J=(U,G)=>{let W=new URL(X.toString());W.hostname=U,W.pathname=G,W.search="",W.hash="";let V=u5(W.toString());if(Q.has(V))return;Q.add(V),$.push(V)},Y=KE(X.pathname);if(Y!==u5(X.pathname))J(X.hostname,Y);let H=X.hostname.toLowerCase().replace(YE,"");if(H==="localhost"||H==="::1")J("127.0.0.1",X.pathname||"/"),J("127.0.0.1",Y);return $}catch{return[]}}function X20(Z){if(!Z.hasTools)return!1;if(!rL(Z.baseUrl))return!1;return UE(Z.baseUrl)}function GE(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(HQ,"")==="/backend-api/codex"}catch{return!1}}function WE(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return aL;let Q=q.indexOf("/");if(Q!==-1)return q.slice(Q+1);return q}function lL(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return aL;return q}function iL(Z){if(!Z)return"copilot";try{let X=new URL(Z).hostname.toLowerCase();if(X==="api.githubcopilot.com"||X.endsWith(".githubcopilot.com")||X.startsWith("copilot-api."))return"copilot";if(X==="models.github.ai"||X.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function KQ(Z){let X=tL(),Q=X?.transport==="github_copilot",$=X?.model?.trim(),J=JQ(X?.baseUrl),Y=Z?.model?.trim()||$||Z?.fallbackModel?.trim()||(Q?"github:copilot":"gpt-4o"),H=cL(Y),U=JQ(Z?.baseUrl),G=U??J,V=Q&&oL(Y)&&G&&iL(G)==="custom"?void 0:G,L=U??V,z=$??"",M=YQ(z)?cL(z).baseModel:null,R=Boolean(Z?.model)&&Boolean(M)&&H.baseModel===M,F=YQ(Y)||R,D=!Q&&F&&!(L&&L!==$Q)?rP:L,w=Q?iL(L):"custom",T=Q&&w==="copilot",j=Q&&w==="models",A=Q&&w==="custom",S=Q?lL(Y):Y,O=QE(Y,D)||T&&HE(S)?"codex_responses":"chat_completions",x=T?WE(H.baseModel):j||A?lL(H.baseModel):H.baseModel,E=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:O,requestedModel:Y,resolvedModel:x,baseUrl:(D??(T&&O==="codex_responses"?nL:Q?nL:$Q)).replace(HQ,""),reasoning:E}}function q20(Z){if(KQ({model:Z}).transport==="codex_responses")return!0;return tL()?.transport==="github_copilot"}function tL(){try{let{tryGetActiveProvider:Z}=(K2(),y4(u4));return Z()}catch{return null}}function Q20(){let Z=null;try{let{tryGetActiveProvider:Q}=(K2(),y4(u4));Z=Q()}catch{Z=null}let X=Z?.transport;if(X!=="openai_compat"&&X!=="codex_responses"){if(!X||X==="anthropic")return"firstParty";return null}let q=KQ();if(q.transport!=="chat_completions")return null;return`openai:${q.baseUrl.toLowerCase()}`}function $20(){let Z=KQ();if(Z.transport!=="chat_completions")return!1;let X=Z.baseUrl.toLowerCase();try{return new URL(X).hostname==="api.openai.com"}catch{return X===$Q}}function eL(Z=process.env){let X=UQ();if(X)return X;let q=b(Z.CODEX_AUTH_JSON_PATH);if(q)return q;let Q=b(Z.CODEX_HOME);if(Q)return dL(Q,"auth.json");return dL(sP(),".codex","auth.json")}function UQ(){try{let{tryGetActiveProvider:Z}=(K2(),y4(u4));return b(Z()?.extras?.codexAuthPath)}catch{return}}function GQ(){try{let{tryGetActiveProvider:Z}=(K2(),y4(u4));return b(Z()?.extras?.codexAccountId)}catch{return}}function Zz(Z){if(!iP(Z))return;try{let X=aP(Z,"utf8"),q=JSON.parse(X);return q&&typeof q==="object"?q:void 0}catch{return}}function Xz(Z){let{authJson:X,authPath:q,envAccountId:Q}=Z;if(!X)return{apiKey:"",authPath:q,source:Z.missingSource??"none"};let $=QQ(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),J=QQ(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=Q??QQ(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??m0($)??m0(J);if(!$)return{apiKey:"",accountId:Y,authPath:q,source:Z.missingSource??"none"};return{apiKey:$,accountId:Y,authPath:q,source:"auth.json"}}function qz(Z){let{storedCredentials:X,envAccountId:q}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:q??X.accountId??m0(X.idToken)??m0(X.accessToken),source:"secure-storage"}}function d5(Z,X){let q=b(Z.CODEX_API_KEY),$=GQ()??b(Z.CODEX_ACCOUNT_ID)??b(Z.CHATGPT_ACCOUNT_ID);if(q)return{apiKey:q,accountId:$??m0(q),source:"env"};let J=UQ();if(!Boolean(J??b(Z.CODEX_AUTH_JSON_PATH)??b(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:$,source:"none"};let H=eL(Z),U=Zz(H);return Xz({authJson:U,authPath:H,envAccountId:$})}function J20(Z){let X=Z?.env??process.env,q=d5(X,{explicitAuthPathOnly:!0}),Q=Boolean(UQ()??b(X.CODEX_AUTH_JSON_PATH)??b(X.CODEX_HOME)),$=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(Q||q.source==="env"||q.source==="auth.json")return q;if(Z?.storedCredentials?.accessToken)return qz({storedCredentials:Z.storedCredentials,envAccountId:GQ()??b(X.CODEX_ACCOUNT_ID)??b(X.CHATGPT_ACCOUNT_ID)});if($)return d5(X);return VE(X)}function VE(Z=process.env){let X=GQ()??b(Z.CODEX_ACCOUNT_ID)??b(Z.CHATGPT_ACCOUNT_ID),q=d5(Z,{explicitAuthPathOnly:!0});if(q.source==="env"||q.source==="auth.json"||q.authPath)return q;let Q=gL();if(Q?.accessToken){let $=qz({storedCredentials:Q,envAccountId:X});if(!(!$.accountId||mL(Q)))return $;let Y=eL(Z),H=Zz(Y),U=Xz({authJson:H,authPath:Y,envAccountId:X});if(U.apiKey)return{...U,accountId:U.accountId??$.accountId};return $}return d5(Z)}function BE(Z){let X=Z.trim().toLowerCase(),Q=X.split("?",1)[0]??X;return p5[Q]?.reasoningEffort}function Y20(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;if(q==="gpt-5.3-codex-spark"||q==="codexspark")return!1;if(BE(q)!==void 0)return!0;return JE.test(q)}var $Q="https://api.openai.com/v1",rP="https://chatgpt.com/backend-api/codex",r10="https://api.x.ai/v1",aL="gpt-4o",p5,tP,eP,$E,JE,HQ,YE,nL="https://api.githubcopilot.com";var Qz=B(()=>{pL();qQ();p5={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"}},tP=new Set(["codexplan","codexspark"]),eP=new Set(["localhost","127.0.0.1","::1"]);$E=/^gpt-(\d+)/,JE=/^gpt-5(?:[.-]|$)/,HQ=/\/+$/,YE=/^\[|\]$/g});var u4={};Kq(u4,{tryGetActiveProvider:()=>m4,invalidateActiveProviderCache:()=>ME,getActiveProvider:()=>Jz,_peekActiveProviderCacheForTesting:()=>RE,ActiveProviderNotConfiguredError:()=>c5});function LE(){if($z)return;$z=!0,RX(()=>{U2=null})}function zE(Z,X){switch(Z.provider){case"anthropic":return"anthropic";case"gemini":return"gemini";case"mistral":return"mistral";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai":default:{if(Z.extras?.githubToken)return"github_copilot";if(sL(X))return"codex_responses";return"openai_compat"}}}function _E(Z){let X=BL(Z.model);return{transport:zE(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function Jz(){if(LE(),U2)return U2;let Z=B1(a());if(!Z)throw new c5;return U2=_E(Z),U2}function m4(){try{return Jz()}catch(Z){if(Z instanceof c5)return null;throw Z}}function ME(){U2=null}function RE(){return U2}var c5,U2=null,$z=!1;var K2=B(()=>{dq();AL();cq();Qz();c5=class c5 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function Hz(Z){return Z.replace(Yz,"").trim()||Z}function Kz(Z){return Z.replace(Yz,"").trim()}function V20(Z){return Z.replace(FE,"").trim()}var Yz,FE;var Uz=B(()=>{Yz=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;FE=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function A20(Z,X){let q=Z.firstPrompt?.startsWith(`<${Bz}>`),Q=Z.firstPrompt?Kz(Z.firstPrompt):"",$=Q&&!q,J=Z.agentName||Z.customTitle||Z.summary||($?Q:void 0)||X||(q?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return Hz(J).trim()}function T20(Z){return Z.toISOString().replace(/[:.]/g,"-")}function TE(Z){if(l5.length>=AE)l5.shift();l5.push(Z)}function j20(Z){if(u0!==null)return;if(u0=Z,L6.length>0){let X=[...L6];L6.length=0;for(let q of X)switch(q.type){case"error":u0.logError(q.error);break;case"mcpError":u0.logMCPError(q.serverName,q.error);break;case"mcpDebug":u0.logMCPDebug(q.serverName,q.message);break}}}function g(Z){let X=Vz(Z);try{let q=m4()?.transport;if(q==="bedrock"||q==="vertex"||q==="foundry"||process.env.DISABLE_ERROR_REPORTING||gq())return;let $={error:X.stack||X.message,timestamp:new Date().toISOString()};if(TE($),u0===null){L6.push({type:"error",error:X});return}u0.logError(X)}catch{}}function w20(){return[...l5]}function O20(Z,X){try{if(u0===null){L6.push({type:"mcpError",serverName:Z,error:X});return}u0.logMCPError(Z,X)}catch{}}function k20(Z,X){try{if(u0===null){L6.push({type:"mcpDebug",serverName:Z,message:X});return}u0.logMCPDebug(Z,X)}catch{}}function N20(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:q,...Q}=Z;Gz(Q),Wz(null)}var AE=100,l5,L6,u0=null,I20;var v0=B(()=>{A1();x1();K2();DE();Uz();i1();uq();l5=[];L6=[];I20=c(()=>{return process.argv.includes("--hard-fail")})});import Lz from"node:path";function wE(Z){return Z.includes(Lz.sep)||Z.includes("/")||Lz.isAbsolute(Z)}function OE(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(p4.test(X))return"Unsafe executable: control characters are not allowed";if(!wE(X)&&!IE.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function kE(Z){for(let X of Z)if(p4.test(X))return"Unsafe argument: control characters are not allowed";return null}function NE(Z){if(!Z)return null;if(p4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function xE(Z){if(!Z)return{};for(let[X,q]of Object.entries(Z)){if(p4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof q==="string"&&p4.test(q))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function PE(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function T0(Z,X,q={timeout:10*VQ*WQ,preserveOutputOnError:!0,useCwd:!0}){return q2(Z,X,{abortSignal:q.abortSignal,timeout:q.timeout,preserveOutputOnError:q.preserveOutputOnError,cwd:q.useCwd?r():void 0,env:q.env,stdin:q.stdin,input:q.input})}function q2(Z,X,{abortSignal:q,timeout:Q=10*VQ*WQ,preserveOutputOnError:$=!0,cwd:J,env:Y,maxBuffer:H=zz,stdin:U,input:G}={timeout:10*VQ*WQ,preserveOutputOnError:!0,maxBuffer:zz}){let W=OE(Z);if(W)return Promise.resolve({stdout:"",stderr:"",code:1,error:W});let V=kE(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=NE(J);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let z=xE(Y);if(z.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:z.error});return new Promise((_)=>{let M=G!==void 0?"pipe":U??"pipe",R=_z.spawn(Z,X,{cwd:J,env:z.value,shell:!1,signal:q,stdio:[M,"pipe","pipe"]}),F=!1,k="",D="",w=0,T,j=!1,A=(x)=>{if(F)return;F=!0,_(x)},S=(x,E)=>{let h=typeof x==="string"?x:x.toString("utf8");if(w+=Buffer.byteLength(h,"utf8"),w>H){R.kill(),A({stdout:$?k:"",stderr:$?D:"",code:1,error:"maxBuffer exceeded"});return}if(E==="stdout")k+=h;else D+=h};R.stdout?.on("data",(x)=>S(x,"stdout")),R.stderr?.on("data",(x)=>S(x,"stderr")),R.once("spawn",()=>{if(M==="pipe"&&R.stdin)if(G!==void 0)R.stdin.end(G);else R.stdin.end()}),R.once("error",(x)=>{g(x),A({stdout:"",stderr:"",code:1,error:x.message})});let O=Q>0?setTimeout(()=>{j=!0,R.kill()},Q):void 0;R.once("close",(x,E)=>{if(O)clearTimeout(O);T=E??void 0;let h=x??1;if(j){A({stdout:$?k:"",stderr:$?D:"",code:h,error:`Command timed out after ${Q}ms`});return}if(h!==0){if($)A({stdout:k,stderr:D,code:h,error:PE({signal:T},h)});else A({stdout:"",stderr:"",code:h});return}A({stdout:k,stderr:D,code:0})})})}var _z,WQ=1000,VQ=60,zz=1e6,p4,IE;var Q5=B(()=>{K1();v0();nq();_z=jE(Z$(),1),p4=/[\0\r\n]/,IE=/^[A-Za-z0-9_.-]+$/});
203
- export{wt as n9,TB as o9,g0 as p9,C4 as q9,I0 as r9,aq as s9,t00 as t9,S5 as u9,J8 as v9,$J as w9,yK as x9,CK as y9,UX as z9,g2 as A9,nz as B9,y1 as C9,q$ as D9,iz as E9,Q$ as F9,az as G9,K$ as H9,U$ as I9,X3 as J9,_$ as K9,U3 as L9,N$ as M9,v$ as N9,y$ as O9,kv as P9,z1 as Q9,r4 as R9,O0 as S9,Sv as T9,W3 as U9,bv as V9,hv as W9,j6 as X9,h$ as Y9,uv as Z9,pv as _9,f$ as $9,m2 as a_,GX as b_,bU as c_,k7 as d_,N7 as e_,hU as f_,fU as g_,J0 as h_,bI as i_,p2 as j_,wc as k_,Z4 as l_,pI as m_,RX as n_,V0 as o_,dI as p_,a as q_,aI as r_,oI as s_,sI as t_,rI as u_,tI as v_,eI as w_,Y0 as x_,uc as y_,$4 as z_,o1 as A_,nc as B_,ic as C_,ac as D_,oc as E_,sc as F_,rc as G_,tc as H_,ec as I_,Zl as J_,Xl as K_,ql as L_,y7 as M_,FX as N_,Hw as O_,H1 as P_,J4 as Q_,AX as R_,aU as S_,Bl as T_,A0 as U_,l2 as V_,Al as W_,Uw as X_,S7 as Y_,rU as Z_,tU as __,wX as $_,xl as a$,Pl as b$,El as c$,vl as d$,yl as e$,Y4 as f$,sl as g$,Dw as h$,rl as i$,tl as j$,el as k$,Zn as l$,oU as m$,Xn as n$,qn as o$,Qn as p$,$n as q$,Jn as r$,Yn as s$,Tw as t$,Hn as u$,Kn as v$,Un as w$,Gn as x$,o2 as y$,Wn as z$,Vn as A$,$G as B$,Bn as C$,C7 as D$,wn as E$,On as F$,bG as G$,WO as H$,VO as I$,BO as J$,Z$ as K$,C5 as L$,T0 as M$,q2 as N$,Q5 as O$,B4 as P$,gG as Q$,Zi as R$,o0 as S$,X6 as T$,q6 as U$,Xi as V$,qi as W$,Qi as X$,oG as Y$,z4 as Z$,X2 as _$,fO as $$,Mi as aaa,Ri as baa,j0 as caa,Fi as daa,Di as eaa,XW as faa,mO as gaa,uO as haa,Ai as iaa,qW as jaa,pO as kaa,Ti as laa,dO as maa,ji as naa,cO as oaa,lO as paa,Ii as qaa,wi as raa,Oi as saa,ki as taa,Ni as uaa,_4 as vaa,iO as waa,M4 as xaa,R4 as yaa,$5 as zaa,oO as Aaa,sO as Baa,tO as Caa,GW as Daa,WW as Eaa,FW as Faa,DW as Gaa,uW as Haa,pW as Iaa,sW as Jaa,rW as Kaa,Lo as Laa,zo as Maa,_o as Naa,pk as Oaa,G5 as Paa,YV as Qaa,Ro as Raa,Jq as Saa,HV as Taa,Yq as Uaa,rk as Vaa,KV as Waa,UV as Xaa,Po as Yaa,Eo as Zaa,vo as _aa,yo as $aa,Co as aba,So as bba,j4 as cba,bo as dba,ho as eba,Hq as fba,go as gba,mo as hba,BV as iba,po as jba,LV as kba,co as lba,JN as mba,lo as nba,YN as oba,no as pba,zV as qba,_V as rba,E1 as sba,I4 as tba,V5 as uba,qs as vba,Qs as wba,$s as xba,Js as yba,Ys as zba,Hs as Aba,Ks as Bba,Us as Cba,Gs as Dba,Ws as Eba,Vs as Fba,Bs as Gba,Ls as Hba,FV as Iba,zs as Jba,_s as Kba,Ms as Lba,Rs as Mba,Fs as Nba,Ds as Oba,As as Pba,Ts as Qba,DV as Rba,WN as Sba,VN as Tba,BN as Uba,LN as Vba,zN as Wba,_N as Xba,MN as Yba,RN as Zba,FN as _ba,DN as $ba,TV as aca,IV as bca,wV as cca,NV as dca,Cs as eca,PV as fca,J2 as gca,ds as hca,IN as ica,_5 as jca,ls as kca,vV as lca,M5 as mca,rs as nca,ts as oca,es as pca,SV as qca,rN as rca,Zr as sca,Xr as tca,eN as uca,qr as vca,mV as wca,Qr as xca,$r as yca,Jr as zca,uV as Aca,Hr as Bca,R5 as Cca,pV as Dca,dV as Eca,Yx as Fca,Hx as Gca,Gr as Hca,Wr as Ica,Vr as Jca,cV as Kca,lV as Lca,Lr as Mca,zr as Nca,nV as Oca,Lq as Pca,iV as Qca,aV as Rca,Rr as Sca,oV as Tca,Y6 as Uca,jr as Vca,sV as Wca,Ir as Xca,rV as Yca,Or as Zca,tV as _ca,eV as $ca,kr as ada,Nr as bda,xr as cda,Pr as dda,Er as eda,Vx as fda,vr as gda,_q as hda,dr as ida,YB as jda,HB as kda,E0 as lda,qt as mda,Qt as nda,$t as oda,O4 as pda,Rt as qda,jq as rda,gt as sda,O5 as tda,k5 as uda,mt as vda,ut as wda,kB as xda,Sq as yda,_e as zda,N4 as Ada,NB as Bda,x5 as Cda,gB as Dda,u as Eda,Me as Fda,Re as Gda,Y2 as Hda,Fe as Ida,bq as Jda,De as Kda,Ex as Lda,Ae as Mda,Te as Nda,je as Oda,Ie as Pda,we as Qda,vx as Rda,yx as Sda,Cx as Tda,bx as Uda,Oe as Vda,uB as Wda,oB as Xda,le as Yda,cx as Zda,ne as _da,E4 as $da,tB as aea,ie as bea,fq as cea,gq as dea,eB as eea,uq as fea,E5 as gea,qL as hea,rx as iea,re as jea,te as kea,QL as lea,$L as mea,JL as nea,JP as oea,YL as pea,YP as qea,HL as rea,KL as sea,UL as tea,UP as uea,GP as vea,GL as wea,WP as xea,VP as yea,BP as zea,LP as Aea,zP as Bea,_P as Cea,MP as Dea,dq as Eea,v5 as Fea,BL as Gea,cq as Hea,x00 as Iea,f0 as Jea,P00 as Kea,B1 as Lea,E00 as Mea,OP as Nea,v00 as Oea,kP as Pea,y00 as Qea,C00 as Rea,S00 as Sea,b00 as Tea,NP as Uea,xP as Vea,h00 as Wea,PP as Xea,f00 as Yea,g00 as Zea,m00 as _ea,EP as $ea,AL as afa,Y10 as bfa,OL as cfa,yL as dfa,CL as efa,E10 as ffa,v10 as gfa,y10 as hfa,b as ifa,ZQ as jfa,C10 as kfa,m0 as lfa,S10 as mfa,bL as nfa,qQ as ofa,lP as pfa,uL as qfa,p10 as rfa,d10 as sfa,pL as tfa,$Q as ufa,rP as vfa,r10 as wfa,t10 as xfa,e10 as yfa,rL as zfa,Z20 as Afa,X20 as Bfa,GE as Cfa,iL as Dfa,KQ as Efa,q20 as Ffa,Q20 as Gfa,$20 as Hfa,J20 as Ifa,VE as Jfa,BE as Kfa,Y20 as Lfa,Qz as Mfa,c5 as Nfa,Jz as Ofa,m4 as Pfa,ME as Qfa,RE as Rfa,K2 as Sfa,Hz as Tfa,Kz as Ufa,V20 as Vfa,Uz as Wfa,A20 as Xfa,T20 as Yfa,j20 as Zfa,g as _fa,w20 as $fa,O20 as aga,k20 as bga,N20 as cga,v0 as dga};