gong-code 0.1.0

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 (374) hide show
  1. package/README.md +38 -0
  2. package/dist/SKILL-22jccbka.md +1 -0
  3. package/dist/chunk-01wdn84e.js +8 -0
  4. package/dist/chunk-04bc74vz.js +243 -0
  5. package/dist/chunk-05t2vqsb.js +490 -0
  6. package/dist/chunk-0727wret.js +159 -0
  7. package/dist/chunk-07rervty.js +200 -0
  8. package/dist/chunk-0b9nxvyg.js +478 -0
  9. package/dist/chunk-0e428b73.js +600 -0
  10. package/dist/chunk-0hqfheht.js +3439 -0
  11. package/dist/chunk-0pnk52c2.js +116 -0
  12. package/dist/chunk-0sbddf6m.js +68 -0
  13. package/dist/chunk-0vf7xb84.js +176 -0
  14. package/dist/chunk-0yz17yjy.js +1061 -0
  15. package/dist/chunk-0zscb6c7.js +10 -0
  16. package/dist/chunk-10p21kq6.js +378 -0
  17. package/dist/chunk-17k78pmz.js +120 -0
  18. package/dist/chunk-19jvvqzp.js +1390 -0
  19. package/dist/chunk-1d5czqnr.js +173 -0
  20. package/dist/chunk-1gjysfnf.js +13876 -0
  21. package/dist/chunk-1jjfv0wd.js +467 -0
  22. package/dist/chunk-1jjzp2pa.js +617 -0
  23. package/dist/chunk-1m38dj2k.js +155 -0
  24. package/dist/chunk-1pgttway.js +211 -0
  25. package/dist/chunk-1vvnx0gb.js +8035 -0
  26. package/dist/chunk-1ztm9yps.js +49145 -0
  27. package/dist/chunk-208x1t0m.js +88 -0
  28. package/dist/chunk-20xqs3yk.js +843 -0
  29. package/dist/chunk-2b2c0wnn.js +584 -0
  30. package/dist/chunk-2g07117j.js +541 -0
  31. package/dist/chunk-2g6p2t3w.js +780 -0
  32. package/dist/chunk-2kjeaeg7.js +28 -0
  33. package/dist/chunk-2n0s2dhc.js +12 -0
  34. package/dist/chunk-2p0hvt8k.js +785 -0
  35. package/dist/chunk-2qmxg9y7.js +40174 -0
  36. package/dist/chunk-2qpy8kne.js +28 -0
  37. package/dist/chunk-2rgbf62a.js +40 -0
  38. package/dist/chunk-2tx0s41y.js +150 -0
  39. package/dist/chunk-2x8zk5cz.js +101 -0
  40. package/dist/chunk-2yqy25z4.js +48 -0
  41. package/dist/chunk-318g78ty.js +552 -0
  42. package/dist/chunk-31gfg8tz.js +290 -0
  43. package/dist/chunk-32n0s532.js +1317 -0
  44. package/dist/chunk-35dw2r9g.js +137 -0
  45. package/dist/chunk-36b5zqvn.js +1865 -0
  46. package/dist/chunk-38kpx69j.js +97 -0
  47. package/dist/chunk-3b01vp8p.js +815 -0
  48. package/dist/chunk-3f76a1ek.js +317 -0
  49. package/dist/chunk-3fd1hkhh.js +4254 -0
  50. package/dist/chunk-3ffxa7zj.js +8 -0
  51. package/dist/chunk-3gcj7w95.js +8 -0
  52. package/dist/chunk-3jf3k40v.js +970 -0
  53. package/dist/chunk-3k51qfp9.js +9301 -0
  54. package/dist/chunk-3mhygd2v.js +1180 -0
  55. package/dist/chunk-3p6y0gvb.js +117 -0
  56. package/dist/chunk-3r60xdt5.js +93 -0
  57. package/dist/chunk-43agf6xv.js +8 -0
  58. package/dist/chunk-46zr418r.js +15 -0
  59. package/dist/chunk-48k2bs4w.js +118 -0
  60. package/dist/chunk-4p987a4z.js +84 -0
  61. package/dist/chunk-4px25pe0.js +776 -0
  62. package/dist/chunk-4s93jyky.js +113 -0
  63. package/dist/chunk-4xv8bedf.js +58 -0
  64. package/dist/chunk-4y382mzd.js +346 -0
  65. package/dist/chunk-52dzw4bc.js +246 -0
  66. package/dist/chunk-52qqmh5g.js +110 -0
  67. package/dist/chunk-53grnhp7.js +8 -0
  68. package/dist/chunk-59craaxx.js +4249 -0
  69. package/dist/chunk-5b833jqs.js +96 -0
  70. package/dist/chunk-5cp2q9sh.js +58 -0
  71. package/dist/chunk-5dbaxmts.js +87 -0
  72. package/dist/chunk-5f5sxgp0.js +96 -0
  73. package/dist/chunk-5mkfderj.js +195 -0
  74. package/dist/chunk-5qw0mpvq.js +389 -0
  75. package/dist/chunk-5rxmszm8.js +48 -0
  76. package/dist/chunk-5ygxa3hr.js +65 -0
  77. package/dist/chunk-61d5dqq2.js +71 -0
  78. package/dist/chunk-6350958y.js +272 -0
  79. package/dist/chunk-65z8hg8j.js +1337 -0
  80. package/dist/chunk-6aq85gdq.js +8 -0
  81. package/dist/chunk-6cjh9exg.js +40751 -0
  82. package/dist/chunk-6e41p5m6.js +187 -0
  83. package/dist/chunk-6jb6xcnq.js +10511 -0
  84. package/dist/chunk-6jta29r1.js +20 -0
  85. package/dist/chunk-6q7f2rrv.js +4757 -0
  86. package/dist/chunk-6sg0ec6v.js +41 -0
  87. package/dist/chunk-6v0rhx4e.js +328 -0
  88. package/dist/chunk-6x5mz95v.js +751 -0
  89. package/dist/chunk-6xqp51qr.js +87 -0
  90. package/dist/chunk-6xvyx1s9.js +6957 -0
  91. package/dist/chunk-6ywh7wgp.js +468 -0
  92. package/dist/chunk-75ne77gm.js +1920 -0
  93. package/dist/chunk-77cb06js.js +602 -0
  94. package/dist/chunk-78n9kfp8.js +1645 -0
  95. package/dist/chunk-7be87rww.js +277 -0
  96. package/dist/chunk-7e1qjk3s.js +125 -0
  97. package/dist/chunk-7e7nxnss.js +360 -0
  98. package/dist/chunk-7g8156qp.js +55 -0
  99. package/dist/chunk-7nz71s42.js +3353 -0
  100. package/dist/chunk-7r078t2x.js +113 -0
  101. package/dist/chunk-7shx41hj.js +3094 -0
  102. package/dist/chunk-7yexhdjs.js +216 -0
  103. package/dist/chunk-83kmfcjv.js +256 -0
  104. package/dist/chunk-846rr9n1.js +107 -0
  105. package/dist/chunk-84ncsm1r.js +183 -0
  106. package/dist/chunk-867x8aq0.js +8936 -0
  107. package/dist/chunk-8byh30kb.js +1947 -0
  108. package/dist/chunk-8c8f6gnt.js +432 -0
  109. package/dist/chunk-8gtdseev.js +454 -0
  110. package/dist/chunk-8jfh9rq6.js +642 -0
  111. package/dist/chunk-8n4n4m67.js +800 -0
  112. package/dist/chunk-8za61tze.js +847 -0
  113. package/dist/chunk-9029sbq1.js +57 -0
  114. package/dist/chunk-94dm5rrm.js +673 -0
  115. package/dist/chunk-9bs8n985.js +329 -0
  116. package/dist/chunk-9c23776j.js +763 -0
  117. package/dist/chunk-9e93g81n.js +298 -0
  118. package/dist/chunk-9f3d61y7.js +548 -0
  119. package/dist/chunk-9gc3andd.js +422 -0
  120. package/dist/chunk-9kn3tgpb.js +130 -0
  121. package/dist/chunk-9m5rn7hk.js +61 -0
  122. package/dist/chunk-9p4hsd6a.js +50 -0
  123. package/dist/chunk-9qasfk8n.js +758 -0
  124. package/dist/chunk-9snp5mn2.js +533 -0
  125. package/dist/chunk-9tcvras3.js +2331 -0
  126. package/dist/chunk-a0186ngk.js +57 -0
  127. package/dist/chunk-a2m8f0aj.js +268 -0
  128. package/dist/chunk-a2rcafav.js +716 -0
  129. package/dist/chunk-a9hjdzar.js +160 -0
  130. package/dist/chunk-aak6ts5n.js +526 -0
  131. package/dist/chunk-aca3w84n.js +267 -0
  132. package/dist/chunk-ae76ded0.js +30 -0
  133. package/dist/chunk-afnjhn3j.js +21933 -0
  134. package/dist/chunk-ahj70tf0.js +880 -0
  135. package/dist/chunk-apjsxssq.js +169 -0
  136. package/dist/chunk-av49wjj1.js +43 -0
  137. package/dist/chunk-axggebfy.js +206 -0
  138. package/dist/chunk-az7jpbv8.js +16 -0
  139. package/dist/chunk-azz7sep6.js +328 -0
  140. package/dist/chunk-b4tpz2g1.js +93 -0
  141. package/dist/chunk-bczf2eyq.js +115 -0
  142. package/dist/chunk-bd95f637.js +208 -0
  143. package/dist/chunk-bdhdmkya.js +10 -0
  144. package/dist/chunk-bp0ynk17.js +32 -0
  145. package/dist/chunk-bq75gxjs.js +90 -0
  146. package/dist/chunk-btk5jaq6.js +10464 -0
  147. package/dist/chunk-bv4c48a5.js +120 -0
  148. package/dist/chunk-byfb105n.js +341 -0
  149. package/dist/chunk-c0bdmy7w.js +4223 -0
  150. package/dist/chunk-c20aqkz8.js +641 -0
  151. package/dist/chunk-c4jg3s2c.js +163 -0
  152. package/dist/chunk-c61q5cer.js +258 -0
  153. package/dist/chunk-c9f761sy.js +386 -0
  154. package/dist/chunk-ca6jkz06.js +157 -0
  155. package/dist/chunk-ccyg9ap9.js +171374 -0
  156. package/dist/chunk-cfej8cc7.js +371 -0
  157. package/dist/chunk-cjqxdnf9.js +23 -0
  158. package/dist/chunk-ckrs789w.js +8 -0
  159. package/dist/chunk-cqeq13wg.js +48 -0
  160. package/dist/chunk-crfj3w5e.js +22821 -0
  161. package/dist/chunk-ct5x6z7g.js +8066 -0
  162. package/dist/chunk-cv5h8n8c.js +101 -0
  163. package/dist/chunk-cwe8h159.js +1563 -0
  164. package/dist/chunk-cwm234zz.js +908 -0
  165. package/dist/chunk-d1jkfp45.js +1580 -0
  166. package/dist/chunk-d3hb1qdr.js +126 -0
  167. package/dist/chunk-d70d0zer.js +713 -0
  168. package/dist/chunk-d91tx29f.js +105 -0
  169. package/dist/chunk-d952pymh.js +20 -0
  170. package/dist/chunk-d9af3z8k.js +720 -0
  171. package/dist/chunk-da1n53c2.js +47 -0
  172. package/dist/chunk-df5c1x8m.js +732 -0
  173. package/dist/chunk-dkv64xys.js +71 -0
  174. package/dist/chunk-dm7166v6.js +251 -0
  175. package/dist/chunk-dr0y5a61.js +258 -0
  176. package/dist/chunk-drzb0rrd.js +306 -0
  177. package/dist/chunk-dw1v1q7w.js +37 -0
  178. package/dist/chunk-e224qet4.js +348 -0
  179. package/dist/chunk-e50ckbv0.js +1099 -0
  180. package/dist/chunk-e5gn6by6.js +1165 -0
  181. package/dist/chunk-e7m3f74m.js +37 -0
  182. package/dist/chunk-e8ghgwaj.js +295 -0
  183. package/dist/chunk-ed8k4ya2.js +41 -0
  184. package/dist/chunk-eh0vnqdz.js +76 -0
  185. package/dist/chunk-epwrzr35.js +4301 -0
  186. package/dist/chunk-er9h6sw5.js +5379 -0
  187. package/dist/chunk-eta5aekm.js +79 -0
  188. package/dist/chunk-ev5gxscq.js +63 -0
  189. package/dist/chunk-evp72hv5.js +212 -0
  190. package/dist/chunk-ex41stfq.js +127 -0
  191. package/dist/chunk-ezpa510h.js +62 -0
  192. package/dist/chunk-f0fm6dey.js +477 -0
  193. package/dist/chunk-f239sbhc.js +152 -0
  194. package/dist/chunk-f2bj47xf.js +109 -0
  195. package/dist/chunk-f4t24rq4.js +258 -0
  196. package/dist/chunk-f9ghvzy8.js +106 -0
  197. package/dist/chunk-f9rahzgr.js +99 -0
  198. package/dist/chunk-ff75qzty.js +521 -0
  199. package/dist/chunk-fj0ctt6q.js +264 -0
  200. package/dist/chunk-fj7wxdt3.js +221 -0
  201. package/dist/chunk-fnnpqv92.js +714 -0
  202. package/dist/chunk-fpd3zzx1.js +26696 -0
  203. package/dist/chunk-fqv2cn76.js +227 -0
  204. package/dist/chunk-fqw9j3bj.js +439 -0
  205. package/dist/chunk-frbcqhz0.js +4984 -0
  206. package/dist/chunk-fzkj59sg.js +174 -0
  207. package/dist/chunk-fzpzbpbw.js +248 -0
  208. package/dist/chunk-g52cpmd1.js +686 -0
  209. package/dist/chunk-g98m2qe6.js +31 -0
  210. package/dist/chunk-g9zgq4vy.js +715 -0
  211. package/dist/chunk-gbpt7tm8.js +687 -0
  212. package/dist/chunk-gg52jka8.js +373 -0
  213. package/dist/chunk-gjttphax.js +5793 -0
  214. package/dist/chunk-gs7vjaas.js +65 -0
  215. package/dist/chunk-gv8n85j2.js +8 -0
  216. package/dist/chunk-gxdwm6pt.js +650 -0
  217. package/dist/chunk-gy8wajg2.js +1014 -0
  218. package/dist/chunk-gz3647m0.js +200 -0
  219. package/dist/chunk-gzg07mqh.js +16 -0
  220. package/dist/chunk-h3zc60tq.js +44 -0
  221. package/dist/chunk-h4p1qt16.js +74 -0
  222. package/dist/chunk-h8219f18.js +282 -0
  223. package/dist/chunk-h9agq92v.js +331 -0
  224. package/dist/chunk-hhjtpwbj.js +16 -0
  225. package/dist/chunk-hpgpwzra.js +548 -0
  226. package/dist/chunk-hsnjvn19.js +80 -0
  227. package/dist/chunk-hsp9qrry.js +417 -0
  228. package/dist/chunk-hwz6aq2m.js +3939 -0
  229. package/dist/chunk-hzph0hbh.js +272 -0
  230. package/dist/chunk-hzqkss6v.js +153 -0
  231. package/dist/chunk-j0t31f39.js +1149 -0
  232. package/dist/chunk-j1qm6n1v.js +30 -0
  233. package/dist/chunk-j6e4b522.js +81 -0
  234. package/dist/chunk-j7qfbvxk.js +84 -0
  235. package/dist/chunk-j7qv3hvm.js +1635 -0
  236. package/dist/chunk-j8mxc6k6.js +213 -0
  237. package/dist/chunk-jevj87jn.js +224 -0
  238. package/dist/chunk-jk2ps88q.js +815 -0
  239. package/dist/chunk-jz7tbdyv.js +1599 -0
  240. package/dist/chunk-k36jpjvh.js +300 -0
  241. package/dist/chunk-k4nmrt3w.js +61 -0
  242. package/dist/chunk-kavn03r9.js +16606 -0
  243. package/dist/chunk-kkgav8dm.js +54 -0
  244. package/dist/chunk-kkq26g5c.js +33 -0
  245. package/dist/chunk-kp6nepx4.js +106 -0
  246. package/dist/chunk-ksefybc8.js +1551 -0
  247. package/dist/chunk-kv147680.js +3436 -0
  248. package/dist/chunk-kya46axt.js +833 -0
  249. package/dist/chunk-kyz233ny.js +227 -0
  250. package/dist/chunk-kzs75xmj.js +143 -0
  251. package/dist/chunk-m0vrez9w.js +266 -0
  252. package/dist/chunk-m1wadav3.js +118 -0
  253. package/dist/chunk-m4rfx3cj.js +221 -0
  254. package/dist/chunk-mc9zaggs.js +6374 -0
  255. package/dist/chunk-mcg5ttj4.js +105 -0
  256. package/dist/chunk-mf4r7918.js +63 -0
  257. package/dist/chunk-mh9khrt4.js +286 -0
  258. package/dist/chunk-mhc4szw7.js +22 -0
  259. package/dist/chunk-mkq0yzp0.js +38 -0
  260. package/dist/chunk-mr58jv4w.js +256 -0
  261. package/dist/chunk-mrrx3bmt.js +168 -0
  262. package/dist/chunk-mtyk3zz6.js +87 -0
  263. package/dist/chunk-mvgxntv6.js +62 -0
  264. package/dist/chunk-mwnjydcm.js +102 -0
  265. package/dist/chunk-mwxt0m3f.js +862 -0
  266. package/dist/chunk-mz1pxck8.js +998 -0
  267. package/dist/chunk-n3agghys.js +214 -0
  268. package/dist/chunk-n6q02ya9.js +442 -0
  269. package/dist/chunk-nt3y91vh.js +443 -0
  270. package/dist/chunk-nt837qt9.js +21 -0
  271. package/dist/chunk-ntgmegfs.js +39 -0
  272. package/dist/chunk-nwk16bbd.js +30 -0
  273. package/dist/chunk-p367ay90.js +672 -0
  274. package/dist/chunk-p7m3x9qk.js +48 -0
  275. package/dist/chunk-pagmjwp5.js +132 -0
  276. package/dist/chunk-pbd4r8ek.js +161 -0
  277. package/dist/chunk-pdkpssgv.js +2422 -0
  278. package/dist/chunk-pf6z1e35.js +32 -0
  279. package/dist/chunk-pfzejvpt.js +213 -0
  280. package/dist/chunk-pktxyhvk.js +400 -0
  281. package/dist/chunk-pp5xhveq.js +124 -0
  282. package/dist/chunk-ppnd7a8x.js +38 -0
  283. package/dist/chunk-pqh2w7dr.js +2202 -0
  284. package/dist/chunk-pr878d0z.js +240 -0
  285. package/dist/chunk-psf0y7hy.js +140 -0
  286. package/dist/chunk-pz2zz2f7.js +1586 -0
  287. package/dist/chunk-q0xkrxy8.js +890 -0
  288. package/dist/chunk-q5b0kpr3.js +14369 -0
  289. package/dist/chunk-q7z3t531.js +334 -0
  290. package/dist/chunk-qdjjtgwt.js +3183 -0
  291. package/dist/chunk-qezv7msv.js +26 -0
  292. package/dist/chunk-qmxn7f86.js +2643 -0
  293. package/dist/chunk-qqc3b97c.js +15 -0
  294. package/dist/chunk-qwrp63wh.js +145 -0
  295. package/dist/chunk-qyvqbst3.js +537 -0
  296. package/dist/chunk-qztvd4hd.js +465 -0
  297. package/dist/chunk-r0bvez4y.js +235 -0
  298. package/dist/chunk-r3z0896k.js +2831 -0
  299. package/dist/chunk-r4cxb6t7.js +32 -0
  300. package/dist/chunk-rb8k68m7.js +118 -0
  301. package/dist/chunk-rdprgm4t.js +42 -0
  302. package/dist/chunk-rex82hys.js +1710 -0
  303. package/dist/chunk-rjjakkw2.js +2560 -0
  304. package/dist/chunk-rka6gcv3.js +304 -0
  305. package/dist/chunk-rkz12ghm.js +144 -0
  306. package/dist/chunk-rnc7m1qs.js +436 -0
  307. package/dist/chunk-rx6z23h0.js +165 -0
  308. package/dist/chunk-s76582j1.js +28 -0
  309. package/dist/chunk-sez03qd9.js +7140 -0
  310. package/dist/chunk-sjvdn2ep.js +130 -0
  311. package/dist/chunk-smwhyy8p.js +115 -0
  312. package/dist/chunk-snw7nh0d.js +695 -0
  313. package/dist/chunk-sqx9c057.js +193 -0
  314. package/dist/chunk-sscms68s.js +16 -0
  315. package/dist/chunk-stknnmsb.js +272 -0
  316. package/dist/chunk-sywdxbs6.js +853 -0
  317. package/dist/chunk-syxy4pf2.js +782 -0
  318. package/dist/chunk-t0hpqsqn.js +6157 -0
  319. package/dist/chunk-tjm70vnw.js +123 -0
  320. package/dist/chunk-trzh0msn.js +154 -0
  321. package/dist/chunk-v1z17cpg.js +723 -0
  322. package/dist/chunk-vsfj449x.js +333 -0
  323. package/dist/chunk-vvkq20tt.js +287 -0
  324. package/dist/chunk-vxgdzx6p.js +338 -0
  325. package/dist/chunk-vxqhjyfz.js +15 -0
  326. package/dist/chunk-vzsstfmb.js +80 -0
  327. package/dist/chunk-w1jew5sn.js +69 -0
  328. package/dist/chunk-w3kwr76v.js +789 -0
  329. package/dist/chunk-w40netr9.js +59 -0
  330. package/dist/chunk-w99cpfdg.js +559 -0
  331. package/dist/chunk-wacn14d2.js +271 -0
  332. package/dist/chunk-wbhrqrq3.js +3033 -0
  333. package/dist/chunk-wfg9g0p7.js +17612 -0
  334. package/dist/chunk-wj3vjsbx.js +93 -0
  335. package/dist/chunk-wjhq855a.js +372 -0
  336. package/dist/chunk-wr06gqxh.js +114 -0
  337. package/dist/chunk-ws0z2y1g.js +195 -0
  338. package/dist/chunk-wt62wqcj.js +98 -0
  339. package/dist/chunk-wx4v7ddx.js +42 -0
  340. package/dist/chunk-wy0t3vb2.js +6101 -0
  341. package/dist/chunk-wysz7qk4.js +280 -0
  342. package/dist/chunk-x63fx1vd.js +192 -0
  343. package/dist/chunk-x8b7vft8.js +132 -0
  344. package/dist/chunk-x8jhkgxb.js +346 -0
  345. package/dist/chunk-x9z4q5k5.js +275 -0
  346. package/dist/chunk-xjd7e9jq.js +126 -0
  347. package/dist/chunk-xjr0n27e.js +42 -0
  348. package/dist/chunk-xpwyw7cd.js +24 -0
  349. package/dist/chunk-xw4ycnyz.js +37 -0
  350. package/dist/chunk-y66bqywr.js +17303 -0
  351. package/dist/chunk-ycarry7d.js +157 -0
  352. package/dist/chunk-ycr0hp6v.js +1486 -0
  353. package/dist/chunk-yqmaw6hf.js +496 -0
  354. package/dist/chunk-yrtm7d23.js +602 -0
  355. package/dist/chunk-yts879rw.js +48 -0
  356. package/dist/chunk-yvmhx96e.js +347 -0
  357. package/dist/chunk-ywq00rg4.js +246 -0
  358. package/dist/chunk-yygeg5mj.js +752 -0
  359. package/dist/chunk-z0exw850.js +726 -0
  360. package/dist/chunk-z2dp53wn.js +17 -0
  361. package/dist/chunk-z4rzc9nd.js +103 -0
  362. package/dist/chunk-zb0akt77.js +684 -0
  363. package/dist/chunk-zb2xrj5t.js +1789 -0
  364. package/dist/chunk-zbptn0ky.js +423 -0
  365. package/dist/chunk-zd45wbmf.js +1090 -0
  366. package/dist/chunk-zjkvspz9.js +2050 -0
  367. package/dist/chunk-zke1sp3x.js +1524 -0
  368. package/dist/chunk-zv2cvfsv.js +58 -0
  369. package/dist/chunk-zy4tmqst.js +644 -0
  370. package/dist/chunk-zygzzzvk.js +192 -0
  371. package/dist/cli-21v3v6ny.md +1 -0
  372. package/dist/cli.js +246 -0
  373. package/dist/server-n5f2q89z.md +1 -0
  374. package/package.json +161 -0
@@ -0,0 +1,1645 @@
1
+ // @bun
2
+ import {
3
+ init_v4
4
+ } from "./chunk-qezv7msv.js";
5
+ import {
6
+ exports_external,
7
+ lazySchema
8
+ } from "./chunk-1gjysfnf.js";
9
+ import {
10
+ init_memoize,
11
+ memoizeWithLRU
12
+ } from "./chunk-kp6nepx4.js";
13
+ import {
14
+ init_log,
15
+ logError
16
+ } from "./chunk-vsfj449x.js";
17
+ import {
18
+ init_slowOperations,
19
+ jsonStringify
20
+ } from "./chunk-rex82hys.js";
21
+ import {
22
+ __callDispose,
23
+ __esm,
24
+ __using
25
+ } from "./chunk-eta5aekm.js";
26
+ import {
27
+ __INVALID__REF__
28
+ } from "./chunk-ccyg9ap9.js";
29
+
30
+ // src/utils/jsonRead.ts
31
+ function stripBOM(content) {
32
+ return content.startsWith(UTF8_BOM) ? content.slice(1) : content;
33
+ }
34
+ var UTF8_BOM = "\uFEFF";
35
+
36
+ // node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
37
+ function createScanner(text, ignoreTrivia = false) {
38
+ const len = text.length;
39
+ let pos = 0, value = "", tokenOffset = 0, token = 16, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0;
40
+ function scanHexDigits(count, exact) {
41
+ let digits = 0;
42
+ let value2 = 0;
43
+ while (digits < count || !exact) {
44
+ let ch = text.charCodeAt(pos);
45
+ if (ch >= 48 && ch <= 57) {
46
+ value2 = value2 * 16 + ch - 48;
47
+ } else if (ch >= 65 && ch <= 70) {
48
+ value2 = value2 * 16 + ch - 65 + 10;
49
+ } else if (ch >= 97 && ch <= 102) {
50
+ value2 = value2 * 16 + ch - 97 + 10;
51
+ } else {
52
+ break;
53
+ }
54
+ pos++;
55
+ digits++;
56
+ }
57
+ if (digits < count) {
58
+ value2 = -1;
59
+ }
60
+ return value2;
61
+ }
62
+ function setPosition(newPosition) {
63
+ pos = newPosition;
64
+ value = "";
65
+ tokenOffset = 0;
66
+ token = 16;
67
+ scanError = 0;
68
+ }
69
+ function scanNumber() {
70
+ let start = pos;
71
+ if (text.charCodeAt(pos) === 48) {
72
+ pos++;
73
+ } else {
74
+ pos++;
75
+ while (pos < text.length && isDigit(text.charCodeAt(pos))) {
76
+ pos++;
77
+ }
78
+ }
79
+ if (pos < text.length && text.charCodeAt(pos) === 46) {
80
+ pos++;
81
+ if (pos < text.length && isDigit(text.charCodeAt(pos))) {
82
+ pos++;
83
+ while (pos < text.length && isDigit(text.charCodeAt(pos))) {
84
+ pos++;
85
+ }
86
+ } else {
87
+ scanError = 3;
88
+ return text.substring(start, pos);
89
+ }
90
+ }
91
+ let end = pos;
92
+ if (pos < text.length && (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101)) {
93
+ pos++;
94
+ if (pos < text.length && text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45) {
95
+ pos++;
96
+ }
97
+ if (pos < text.length && isDigit(text.charCodeAt(pos))) {
98
+ pos++;
99
+ while (pos < text.length && isDigit(text.charCodeAt(pos))) {
100
+ pos++;
101
+ }
102
+ end = pos;
103
+ } else {
104
+ scanError = 3;
105
+ }
106
+ }
107
+ return text.substring(start, end);
108
+ }
109
+ function scanString() {
110
+ let result = "", start = pos;
111
+ while (true) {
112
+ if (pos >= len) {
113
+ result += text.substring(start, pos);
114
+ scanError = 2;
115
+ break;
116
+ }
117
+ const ch = text.charCodeAt(pos);
118
+ if (ch === 34) {
119
+ result += text.substring(start, pos);
120
+ pos++;
121
+ break;
122
+ }
123
+ if (ch === 92) {
124
+ result += text.substring(start, pos);
125
+ pos++;
126
+ if (pos >= len) {
127
+ scanError = 2;
128
+ break;
129
+ }
130
+ const ch2 = text.charCodeAt(pos++);
131
+ switch (ch2) {
132
+ case 34:
133
+ result += '"';
134
+ break;
135
+ case 92:
136
+ result += "\\";
137
+ break;
138
+ case 47:
139
+ result += "/";
140
+ break;
141
+ case 98:
142
+ result += "\b";
143
+ break;
144
+ case 102:
145
+ result += "\f";
146
+ break;
147
+ case 110:
148
+ result += `
149
+ `;
150
+ break;
151
+ case 114:
152
+ result += "\r";
153
+ break;
154
+ case 116:
155
+ result += "\t";
156
+ break;
157
+ case 117:
158
+ const ch3 = scanHexDigits(4, true);
159
+ if (ch3 >= 0) {
160
+ result += String.fromCharCode(ch3);
161
+ } else {
162
+ scanError = 4;
163
+ }
164
+ break;
165
+ default:
166
+ scanError = 5;
167
+ }
168
+ start = pos;
169
+ continue;
170
+ }
171
+ if (ch >= 0 && ch <= 31) {
172
+ if (isLineBreak(ch)) {
173
+ result += text.substring(start, pos);
174
+ scanError = 2;
175
+ break;
176
+ } else {
177
+ scanError = 6;
178
+ }
179
+ }
180
+ pos++;
181
+ }
182
+ return result;
183
+ }
184
+ function scanNext() {
185
+ value = "";
186
+ scanError = 0;
187
+ tokenOffset = pos;
188
+ lineStartOffset = lineNumber;
189
+ prevTokenLineStartOffset = tokenLineStartOffset;
190
+ if (pos >= len) {
191
+ tokenOffset = len;
192
+ return token = 17;
193
+ }
194
+ let code = text.charCodeAt(pos);
195
+ if (isWhiteSpace(code)) {
196
+ do {
197
+ pos++;
198
+ value += String.fromCharCode(code);
199
+ code = text.charCodeAt(pos);
200
+ } while (isWhiteSpace(code));
201
+ return token = 15;
202
+ }
203
+ if (isLineBreak(code)) {
204
+ pos++;
205
+ value += String.fromCharCode(code);
206
+ if (code === 13 && text.charCodeAt(pos) === 10) {
207
+ pos++;
208
+ value += `
209
+ `;
210
+ }
211
+ lineNumber++;
212
+ tokenLineStartOffset = pos;
213
+ return token = 14;
214
+ }
215
+ switch (code) {
216
+ case 123:
217
+ pos++;
218
+ return token = 1;
219
+ case 125:
220
+ pos++;
221
+ return token = 2;
222
+ case 91:
223
+ pos++;
224
+ return token = 3;
225
+ case 93:
226
+ pos++;
227
+ return token = 4;
228
+ case 58:
229
+ pos++;
230
+ return token = 6;
231
+ case 44:
232
+ pos++;
233
+ return token = 5;
234
+ case 34:
235
+ pos++;
236
+ value = scanString();
237
+ return token = 10;
238
+ case 47:
239
+ const start = pos - 1;
240
+ if (text.charCodeAt(pos + 1) === 47) {
241
+ pos += 2;
242
+ while (pos < len) {
243
+ if (isLineBreak(text.charCodeAt(pos))) {
244
+ break;
245
+ }
246
+ pos++;
247
+ }
248
+ value = text.substring(start, pos);
249
+ return token = 12;
250
+ }
251
+ if (text.charCodeAt(pos + 1) === 42) {
252
+ pos += 2;
253
+ const safeLength = len - 1;
254
+ let commentClosed = false;
255
+ while (pos < safeLength) {
256
+ const ch = text.charCodeAt(pos);
257
+ if (ch === 42 && text.charCodeAt(pos + 1) === 47) {
258
+ pos += 2;
259
+ commentClosed = true;
260
+ break;
261
+ }
262
+ pos++;
263
+ if (isLineBreak(ch)) {
264
+ if (ch === 13 && text.charCodeAt(pos) === 10) {
265
+ pos++;
266
+ }
267
+ lineNumber++;
268
+ tokenLineStartOffset = pos;
269
+ }
270
+ }
271
+ if (!commentClosed) {
272
+ pos++;
273
+ scanError = 1;
274
+ }
275
+ value = text.substring(start, pos);
276
+ return token = 13;
277
+ }
278
+ value += String.fromCharCode(code);
279
+ pos++;
280
+ return token = 16;
281
+ case 45:
282
+ value += String.fromCharCode(code);
283
+ pos++;
284
+ if (pos === len || !isDigit(text.charCodeAt(pos))) {
285
+ return token = 16;
286
+ }
287
+ case 48:
288
+ case 49:
289
+ case 50:
290
+ case 51:
291
+ case 52:
292
+ case 53:
293
+ case 54:
294
+ case 55:
295
+ case 56:
296
+ case 57:
297
+ value += scanNumber();
298
+ return token = 11;
299
+ default:
300
+ while (pos < len && isUnknownContentCharacter(code)) {
301
+ pos++;
302
+ code = text.charCodeAt(pos);
303
+ }
304
+ if (tokenOffset !== pos) {
305
+ value = text.substring(tokenOffset, pos);
306
+ switch (value) {
307
+ case "true":
308
+ return token = 8;
309
+ case "false":
310
+ return token = 9;
311
+ case "null":
312
+ return token = 7;
313
+ }
314
+ return token = 16;
315
+ }
316
+ value += String.fromCharCode(code);
317
+ pos++;
318
+ return token = 16;
319
+ }
320
+ }
321
+ function isUnknownContentCharacter(code) {
322
+ if (isWhiteSpace(code) || isLineBreak(code)) {
323
+ return false;
324
+ }
325
+ switch (code) {
326
+ case 125:
327
+ case 93:
328
+ case 123:
329
+ case 91:
330
+ case 34:
331
+ case 58:
332
+ case 44:
333
+ case 47:
334
+ return false;
335
+ }
336
+ return true;
337
+ }
338
+ function scanNextNonTrivia() {
339
+ let result;
340
+ do {
341
+ result = scanNext();
342
+ } while (result >= 12 && result <= 15);
343
+ return result;
344
+ }
345
+ return {
346
+ setPosition,
347
+ getPosition: () => pos,
348
+ scan: ignoreTrivia ? scanNextNonTrivia : scanNext,
349
+ getToken: () => token,
350
+ getTokenValue: () => value,
351
+ getTokenOffset: () => tokenOffset,
352
+ getTokenLength: () => pos - tokenOffset,
353
+ getTokenStartLine: () => lineStartOffset,
354
+ getTokenStartCharacter: () => tokenOffset - prevTokenLineStartOffset,
355
+ getTokenError: () => scanError
356
+ };
357
+ }
358
+ function isWhiteSpace(ch) {
359
+ return ch === 32 || ch === 9;
360
+ }
361
+ function isLineBreak(ch) {
362
+ return ch === 10 || ch === 13;
363
+ }
364
+ function isDigit(ch) {
365
+ return ch >= 48 && ch <= 57;
366
+ }
367
+ var CharacterCodes;
368
+ var init_scanner = __esm(() => {
369
+ (function(CharacterCodes2) {
370
+ CharacterCodes2[CharacterCodes2["lineFeed"] = 10] = "lineFeed";
371
+ CharacterCodes2[CharacterCodes2["carriageReturn"] = 13] = "carriageReturn";
372
+ CharacterCodes2[CharacterCodes2["space"] = 32] = "space";
373
+ CharacterCodes2[CharacterCodes2["_0"] = 48] = "_0";
374
+ CharacterCodes2[CharacterCodes2["_1"] = 49] = "_1";
375
+ CharacterCodes2[CharacterCodes2["_2"] = 50] = "_2";
376
+ CharacterCodes2[CharacterCodes2["_3"] = 51] = "_3";
377
+ CharacterCodes2[CharacterCodes2["_4"] = 52] = "_4";
378
+ CharacterCodes2[CharacterCodes2["_5"] = 53] = "_5";
379
+ CharacterCodes2[CharacterCodes2["_6"] = 54] = "_6";
380
+ CharacterCodes2[CharacterCodes2["_7"] = 55] = "_7";
381
+ CharacterCodes2[CharacterCodes2["_8"] = 56] = "_8";
382
+ CharacterCodes2[CharacterCodes2["_9"] = 57] = "_9";
383
+ CharacterCodes2[CharacterCodes2["a"] = 97] = "a";
384
+ CharacterCodes2[CharacterCodes2["b"] = 98] = "b";
385
+ CharacterCodes2[CharacterCodes2["c"] = 99] = "c";
386
+ CharacterCodes2[CharacterCodes2["d"] = 100] = "d";
387
+ CharacterCodes2[CharacterCodes2["e"] = 101] = "e";
388
+ CharacterCodes2[CharacterCodes2["f"] = 102] = "f";
389
+ CharacterCodes2[CharacterCodes2["g"] = 103] = "g";
390
+ CharacterCodes2[CharacterCodes2["h"] = 104] = "h";
391
+ CharacterCodes2[CharacterCodes2["i"] = 105] = "i";
392
+ CharacterCodes2[CharacterCodes2["j"] = 106] = "j";
393
+ CharacterCodes2[CharacterCodes2["k"] = 107] = "k";
394
+ CharacterCodes2[CharacterCodes2["l"] = 108] = "l";
395
+ CharacterCodes2[CharacterCodes2["m"] = 109] = "m";
396
+ CharacterCodes2[CharacterCodes2["n"] = 110] = "n";
397
+ CharacterCodes2[CharacterCodes2["o"] = 111] = "o";
398
+ CharacterCodes2[CharacterCodes2["p"] = 112] = "p";
399
+ CharacterCodes2[CharacterCodes2["q"] = 113] = "q";
400
+ CharacterCodes2[CharacterCodes2["r"] = 114] = "r";
401
+ CharacterCodes2[CharacterCodes2["s"] = 115] = "s";
402
+ CharacterCodes2[CharacterCodes2["t"] = 116] = "t";
403
+ CharacterCodes2[CharacterCodes2["u"] = 117] = "u";
404
+ CharacterCodes2[CharacterCodes2["v"] = 118] = "v";
405
+ CharacterCodes2[CharacterCodes2["w"] = 119] = "w";
406
+ CharacterCodes2[CharacterCodes2["x"] = 120] = "x";
407
+ CharacterCodes2[CharacterCodes2["y"] = 121] = "y";
408
+ CharacterCodes2[CharacterCodes2["z"] = 122] = "z";
409
+ CharacterCodes2[CharacterCodes2["A"] = 65] = "A";
410
+ CharacterCodes2[CharacterCodes2["B"] = 66] = "B";
411
+ CharacterCodes2[CharacterCodes2["C"] = 67] = "C";
412
+ CharacterCodes2[CharacterCodes2["D"] = 68] = "D";
413
+ CharacterCodes2[CharacterCodes2["E"] = 69] = "E";
414
+ CharacterCodes2[CharacterCodes2["F"] = 70] = "F";
415
+ CharacterCodes2[CharacterCodes2["G"] = 71] = "G";
416
+ CharacterCodes2[CharacterCodes2["H"] = 72] = "H";
417
+ CharacterCodes2[CharacterCodes2["I"] = 73] = "I";
418
+ CharacterCodes2[CharacterCodes2["J"] = 74] = "J";
419
+ CharacterCodes2[CharacterCodes2["K"] = 75] = "K";
420
+ CharacterCodes2[CharacterCodes2["L"] = 76] = "L";
421
+ CharacterCodes2[CharacterCodes2["M"] = 77] = "M";
422
+ CharacterCodes2[CharacterCodes2["N"] = 78] = "N";
423
+ CharacterCodes2[CharacterCodes2["O"] = 79] = "O";
424
+ CharacterCodes2[CharacterCodes2["P"] = 80] = "P";
425
+ CharacterCodes2[CharacterCodes2["Q"] = 81] = "Q";
426
+ CharacterCodes2[CharacterCodes2["R"] = 82] = "R";
427
+ CharacterCodes2[CharacterCodes2["S"] = 83] = "S";
428
+ CharacterCodes2[CharacterCodes2["T"] = 84] = "T";
429
+ CharacterCodes2[CharacterCodes2["U"] = 85] = "U";
430
+ CharacterCodes2[CharacterCodes2["V"] = 86] = "V";
431
+ CharacterCodes2[CharacterCodes2["W"] = 87] = "W";
432
+ CharacterCodes2[CharacterCodes2["X"] = 88] = "X";
433
+ CharacterCodes2[CharacterCodes2["Y"] = 89] = "Y";
434
+ CharacterCodes2[CharacterCodes2["Z"] = 90] = "Z";
435
+ CharacterCodes2[CharacterCodes2["asterisk"] = 42] = "asterisk";
436
+ CharacterCodes2[CharacterCodes2["backslash"] = 92] = "backslash";
437
+ CharacterCodes2[CharacterCodes2["closeBrace"] = 125] = "closeBrace";
438
+ CharacterCodes2[CharacterCodes2["closeBracket"] = 93] = "closeBracket";
439
+ CharacterCodes2[CharacterCodes2["colon"] = 58] = "colon";
440
+ CharacterCodes2[CharacterCodes2["comma"] = 44] = "comma";
441
+ CharacterCodes2[CharacterCodes2["dot"] = 46] = "dot";
442
+ CharacterCodes2[CharacterCodes2["doubleQuote"] = 34] = "doubleQuote";
443
+ CharacterCodes2[CharacterCodes2["minus"] = 45] = "minus";
444
+ CharacterCodes2[CharacterCodes2["openBrace"] = 123] = "openBrace";
445
+ CharacterCodes2[CharacterCodes2["openBracket"] = 91] = "openBracket";
446
+ CharacterCodes2[CharacterCodes2["plus"] = 43] = "plus";
447
+ CharacterCodes2[CharacterCodes2["slash"] = 47] = "slash";
448
+ CharacterCodes2[CharacterCodes2["formFeed"] = 12] = "formFeed";
449
+ CharacterCodes2[CharacterCodes2["tab"] = 9] = "tab";
450
+ })(CharacterCodes || (CharacterCodes = {}));
451
+ });
452
+
453
+ // node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/string-intern.js
454
+ var cachedSpaces, maxCachedValues = 200, cachedBreakLinesWithSpaces, supportedEols;
455
+ var init_string_intern = __esm(() => {
456
+ cachedSpaces = new Array(20).fill(0).map((_, index) => {
457
+ return " ".repeat(index);
458
+ });
459
+ cachedBreakLinesWithSpaces = {
460
+ " ": {
461
+ "\n": new Array(maxCachedValues).fill(0).map((_, index) => {
462
+ return `
463
+ ` + " ".repeat(index);
464
+ }),
465
+ "\r": new Array(maxCachedValues).fill(0).map((_, index) => {
466
+ return "\r" + " ".repeat(index);
467
+ }),
468
+ "\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
469
+ return `\r
470
+ ` + " ".repeat(index);
471
+ })
472
+ },
473
+ "\t": {
474
+ "\n": new Array(maxCachedValues).fill(0).map((_, index) => {
475
+ return `
476
+ ` + "\t".repeat(index);
477
+ }),
478
+ "\r": new Array(maxCachedValues).fill(0).map((_, index) => {
479
+ return "\r" + "\t".repeat(index);
480
+ }),
481
+ "\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
482
+ return `\r
483
+ ` + "\t".repeat(index);
484
+ })
485
+ }
486
+ };
487
+ supportedEols = [`
488
+ `, "\r", `\r
489
+ `];
490
+ });
491
+
492
+ // node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/format.js
493
+ function format(documentText, range, options) {
494
+ let initialIndentLevel;
495
+ let formatText;
496
+ let formatTextStart;
497
+ let rangeStart;
498
+ let rangeEnd;
499
+ if (range) {
500
+ rangeStart = range.offset;
501
+ rangeEnd = rangeStart + range.length;
502
+ formatTextStart = rangeStart;
503
+ while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) {
504
+ formatTextStart--;
505
+ }
506
+ let endOffset = rangeEnd;
507
+ while (endOffset < documentText.length && !isEOL(documentText, endOffset)) {
508
+ endOffset++;
509
+ }
510
+ formatText = documentText.substring(formatTextStart, endOffset);
511
+ initialIndentLevel = computeIndentLevel(formatText, options);
512
+ } else {
513
+ formatText = documentText;
514
+ initialIndentLevel = 0;
515
+ formatTextStart = 0;
516
+ rangeStart = 0;
517
+ rangeEnd = documentText.length;
518
+ }
519
+ const eol = getEOL(options, documentText);
520
+ const eolFastPathSupported = supportedEols.includes(eol);
521
+ let numberLineBreaks = 0;
522
+ let indentLevel = 0;
523
+ let indentValue;
524
+ if (options.insertSpaces) {
525
+ indentValue = cachedSpaces[options.tabSize || 4] ?? repeat(cachedSpaces[1], options.tabSize || 4);
526
+ } else {
527
+ indentValue = "\t";
528
+ }
529
+ const indentType = indentValue === "\t" ? "\t" : " ";
530
+ let scanner = createScanner(formatText, false);
531
+ let hasError = false;
532
+ function newLinesAndIndent() {
533
+ if (numberLineBreaks > 1) {
534
+ return repeat(eol, numberLineBreaks) + repeat(indentValue, initialIndentLevel + indentLevel);
535
+ }
536
+ const amountOfSpaces = indentValue.length * (initialIndentLevel + indentLevel);
537
+ if (!eolFastPathSupported || amountOfSpaces > cachedBreakLinesWithSpaces[indentType][eol].length) {
538
+ return eol + repeat(indentValue, initialIndentLevel + indentLevel);
539
+ }
540
+ if (amountOfSpaces <= 0) {
541
+ return eol;
542
+ }
543
+ return cachedBreakLinesWithSpaces[indentType][eol][amountOfSpaces];
544
+ }
545
+ function scanNext() {
546
+ let token = scanner.scan();
547
+ numberLineBreaks = 0;
548
+ while (token === 15 || token === 14) {
549
+ if (token === 14 && options.keepLines) {
550
+ numberLineBreaks += 1;
551
+ } else if (token === 14) {
552
+ numberLineBreaks = 1;
553
+ }
554
+ token = scanner.scan();
555
+ }
556
+ hasError = token === 16 || scanner.getTokenError() !== 0;
557
+ return token;
558
+ }
559
+ const editOperations = [];
560
+ function addEdit(text, startOffset, endOffset) {
561
+ if (!hasError && (!range || startOffset < rangeEnd && endOffset > rangeStart) && documentText.substring(startOffset, endOffset) !== text) {
562
+ editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text });
563
+ }
564
+ }
565
+ let firstToken = scanNext();
566
+ if (options.keepLines && numberLineBreaks > 0) {
567
+ addEdit(repeat(eol, numberLineBreaks), 0, 0);
568
+ }
569
+ if (firstToken !== 17) {
570
+ let firstTokenStart = scanner.getTokenOffset() + formatTextStart;
571
+ let initialIndent = indentValue.length * initialIndentLevel < 20 && options.insertSpaces ? cachedSpaces[indentValue.length * initialIndentLevel] : repeat(indentValue, initialIndentLevel);
572
+ addEdit(initialIndent, formatTextStart, firstTokenStart);
573
+ }
574
+ while (firstToken !== 17) {
575
+ let firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;
576
+ let secondToken = scanNext();
577
+ let replaceContent = "";
578
+ let needsLineBreak = false;
579
+ while (numberLineBreaks === 0 && (secondToken === 12 || secondToken === 13)) {
580
+ let commentTokenStart = scanner.getTokenOffset() + formatTextStart;
581
+ addEdit(cachedSpaces[1], firstTokenEnd, commentTokenStart);
582
+ firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;
583
+ needsLineBreak = secondToken === 12;
584
+ replaceContent = needsLineBreak ? newLinesAndIndent() : "";
585
+ secondToken = scanNext();
586
+ }
587
+ if (secondToken === 2) {
588
+ if (firstToken !== 1) {
589
+ indentLevel--;
590
+ }
591
+ if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 1) {
592
+ replaceContent = newLinesAndIndent();
593
+ } else if (options.keepLines) {
594
+ replaceContent = cachedSpaces[1];
595
+ }
596
+ } else if (secondToken === 4) {
597
+ if (firstToken !== 3) {
598
+ indentLevel--;
599
+ }
600
+ if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 3) {
601
+ replaceContent = newLinesAndIndent();
602
+ } else if (options.keepLines) {
603
+ replaceContent = cachedSpaces[1];
604
+ }
605
+ } else {
606
+ switch (firstToken) {
607
+ case 3:
608
+ case 1:
609
+ indentLevel++;
610
+ if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) {
611
+ replaceContent = newLinesAndIndent();
612
+ } else {
613
+ replaceContent = cachedSpaces[1];
614
+ }
615
+ break;
616
+ case 5:
617
+ if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) {
618
+ replaceContent = newLinesAndIndent();
619
+ } else {
620
+ replaceContent = cachedSpaces[1];
621
+ }
622
+ break;
623
+ case 12:
624
+ replaceContent = newLinesAndIndent();
625
+ break;
626
+ case 13:
627
+ if (numberLineBreaks > 0) {
628
+ replaceContent = newLinesAndIndent();
629
+ } else if (!needsLineBreak) {
630
+ replaceContent = cachedSpaces[1];
631
+ }
632
+ break;
633
+ case 6:
634
+ if (options.keepLines && numberLineBreaks > 0) {
635
+ replaceContent = newLinesAndIndent();
636
+ } else if (!needsLineBreak) {
637
+ replaceContent = cachedSpaces[1];
638
+ }
639
+ break;
640
+ case 10:
641
+ if (options.keepLines && numberLineBreaks > 0) {
642
+ replaceContent = newLinesAndIndent();
643
+ } else if (secondToken === 6 && !needsLineBreak) {
644
+ replaceContent = "";
645
+ }
646
+ break;
647
+ case 7:
648
+ case 8:
649
+ case 9:
650
+ case 11:
651
+ case 2:
652
+ case 4:
653
+ if (options.keepLines && numberLineBreaks > 0) {
654
+ replaceContent = newLinesAndIndent();
655
+ } else {
656
+ if ((secondToken === 12 || secondToken === 13) && !needsLineBreak) {
657
+ replaceContent = cachedSpaces[1];
658
+ } else if (secondToken !== 5 && secondToken !== 17) {
659
+ hasError = true;
660
+ }
661
+ }
662
+ break;
663
+ case 16:
664
+ hasError = true;
665
+ break;
666
+ }
667
+ if (numberLineBreaks > 0 && (secondToken === 12 || secondToken === 13)) {
668
+ replaceContent = newLinesAndIndent();
669
+ }
670
+ }
671
+ if (secondToken === 17) {
672
+ if (options.keepLines && numberLineBreaks > 0) {
673
+ replaceContent = newLinesAndIndent();
674
+ } else {
675
+ replaceContent = options.insertFinalNewline ? eol : "";
676
+ }
677
+ }
678
+ const secondTokenStart = scanner.getTokenOffset() + formatTextStart;
679
+ addEdit(replaceContent, firstTokenEnd, secondTokenStart);
680
+ firstToken = secondToken;
681
+ }
682
+ return editOperations;
683
+ }
684
+ function repeat(s, count) {
685
+ let result = "";
686
+ for (let i = 0;i < count; i++) {
687
+ result += s;
688
+ }
689
+ return result;
690
+ }
691
+ function computeIndentLevel(content, options) {
692
+ let i = 0;
693
+ let nChars = 0;
694
+ const tabSize = options.tabSize || 4;
695
+ while (i < content.length) {
696
+ let ch = content.charAt(i);
697
+ if (ch === cachedSpaces[1]) {
698
+ nChars++;
699
+ } else if (ch === "\t") {
700
+ nChars += tabSize;
701
+ } else {
702
+ break;
703
+ }
704
+ i++;
705
+ }
706
+ return Math.floor(nChars / tabSize);
707
+ }
708
+ function getEOL(options, text) {
709
+ for (let i = 0;i < text.length; i++) {
710
+ const ch = text.charAt(i);
711
+ if (ch === "\r") {
712
+ if (i + 1 < text.length && text.charAt(i + 1) === `
713
+ `) {
714
+ return `\r
715
+ `;
716
+ }
717
+ return "\r";
718
+ } else if (ch === `
719
+ `) {
720
+ return `
721
+ `;
722
+ }
723
+ }
724
+ return options && options.eol || `
725
+ `;
726
+ }
727
+ function isEOL(text, offset) {
728
+ return `\r
729
+ `.indexOf(text.charAt(offset)) !== -1;
730
+ }
731
+ var init_format = __esm(() => {
732
+ init_scanner();
733
+ init_string_intern();
734
+ });
735
+
736
+ // node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/parser.js
737
+ function parse(text, errors = [], options = ParseOptions.DEFAULT) {
738
+ let currentProperty = null;
739
+ let currentParent = [];
740
+ const previousParents = [];
741
+ function onValue(value) {
742
+ if (Array.isArray(currentParent)) {
743
+ currentParent.push(value);
744
+ } else if (currentProperty !== null) {
745
+ currentParent[currentProperty] = value;
746
+ }
747
+ }
748
+ const visitor = {
749
+ onObjectBegin: () => {
750
+ const object = {};
751
+ onValue(object);
752
+ previousParents.push(currentParent);
753
+ currentParent = object;
754
+ currentProperty = null;
755
+ },
756
+ onObjectProperty: (name) => {
757
+ currentProperty = name;
758
+ },
759
+ onObjectEnd: () => {
760
+ currentParent = previousParents.pop();
761
+ },
762
+ onArrayBegin: () => {
763
+ const array = [];
764
+ onValue(array);
765
+ previousParents.push(currentParent);
766
+ currentParent = array;
767
+ currentProperty = null;
768
+ },
769
+ onArrayEnd: () => {
770
+ currentParent = previousParents.pop();
771
+ },
772
+ onLiteralValue: onValue,
773
+ onError: (error, offset, length) => {
774
+ errors.push({ error, offset, length });
775
+ }
776
+ };
777
+ visit(text, visitor, options);
778
+ return currentParent[0];
779
+ }
780
+ function parseTree(text, errors = [], options = ParseOptions.DEFAULT) {
781
+ let currentParent = { type: "array", offset: -1, length: -1, children: [], parent: undefined };
782
+ function ensurePropertyComplete(endOffset) {
783
+ if (currentParent.type === "property") {
784
+ currentParent.length = endOffset - currentParent.offset;
785
+ currentParent = currentParent.parent;
786
+ }
787
+ }
788
+ function onValue(valueNode) {
789
+ currentParent.children.push(valueNode);
790
+ return valueNode;
791
+ }
792
+ const visitor = {
793
+ onObjectBegin: (offset) => {
794
+ currentParent = onValue({ type: "object", offset, length: -1, parent: currentParent, children: [] });
795
+ },
796
+ onObjectProperty: (name, offset, length) => {
797
+ currentParent = onValue({ type: "property", offset, length: -1, parent: currentParent, children: [] });
798
+ currentParent.children.push({ type: "string", value: name, offset, length, parent: currentParent });
799
+ },
800
+ onObjectEnd: (offset, length) => {
801
+ ensurePropertyComplete(offset + length);
802
+ currentParent.length = offset + length - currentParent.offset;
803
+ currentParent = currentParent.parent;
804
+ ensurePropertyComplete(offset + length);
805
+ },
806
+ onArrayBegin: (offset, length) => {
807
+ currentParent = onValue({ type: "array", offset, length: -1, parent: currentParent, children: [] });
808
+ },
809
+ onArrayEnd: (offset, length) => {
810
+ currentParent.length = offset + length - currentParent.offset;
811
+ currentParent = currentParent.parent;
812
+ ensurePropertyComplete(offset + length);
813
+ },
814
+ onLiteralValue: (value, offset, length) => {
815
+ onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
816
+ ensurePropertyComplete(offset + length);
817
+ },
818
+ onSeparator: (sep, offset, length) => {
819
+ if (currentParent.type === "property") {
820
+ if (sep === ":") {
821
+ currentParent.colonOffset = offset;
822
+ } else if (sep === ",") {
823
+ ensurePropertyComplete(offset);
824
+ }
825
+ }
826
+ },
827
+ onError: (error, offset, length) => {
828
+ errors.push({ error, offset, length });
829
+ }
830
+ };
831
+ visit(text, visitor, options);
832
+ const result = currentParent.children[0];
833
+ if (result) {
834
+ delete result.parent;
835
+ }
836
+ return result;
837
+ }
838
+ function findNodeAtLocation(root, path) {
839
+ if (!root) {
840
+ return;
841
+ }
842
+ let node = root;
843
+ for (let segment of path) {
844
+ if (typeof segment === "string") {
845
+ if (node.type !== "object" || !Array.isArray(node.children)) {
846
+ return;
847
+ }
848
+ let found = false;
849
+ for (const propertyNode of node.children) {
850
+ if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment && propertyNode.children.length === 2) {
851
+ node = propertyNode.children[1];
852
+ found = true;
853
+ break;
854
+ }
855
+ }
856
+ if (!found) {
857
+ return;
858
+ }
859
+ } else {
860
+ const index = segment;
861
+ if (node.type !== "array" || index < 0 || !Array.isArray(node.children) || index >= node.children.length) {
862
+ return;
863
+ }
864
+ node = node.children[index];
865
+ }
866
+ }
867
+ return node;
868
+ }
869
+ function visit(text, visitor, options = ParseOptions.DEFAULT) {
870
+ const _scanner = createScanner(text, false);
871
+ const _jsonPath = [];
872
+ let suppressedCallbacks = 0;
873
+ function toNoArgVisit(visitFunction) {
874
+ return visitFunction ? () => suppressedCallbacks === 0 && visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
875
+ }
876
+ function toOneArgVisit(visitFunction) {
877
+ return visitFunction ? (arg) => suppressedCallbacks === 0 && visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
878
+ }
879
+ function toOneArgVisitWithPath(visitFunction) {
880
+ return visitFunction ? (arg) => suppressedCallbacks === 0 && visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
881
+ }
882
+ function toBeginVisit(visitFunction) {
883
+ return visitFunction ? () => {
884
+ if (suppressedCallbacks > 0) {
885
+ suppressedCallbacks++;
886
+ } else {
887
+ let cbReturn = visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice());
888
+ if (cbReturn === false) {
889
+ suppressedCallbacks = 1;
890
+ }
891
+ }
892
+ } : () => true;
893
+ }
894
+ function toEndVisit(visitFunction) {
895
+ return visitFunction ? () => {
896
+ if (suppressedCallbacks > 0) {
897
+ suppressedCallbacks--;
898
+ }
899
+ if (suppressedCallbacks === 0) {
900
+ visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter());
901
+ }
902
+ } : () => true;
903
+ }
904
+ const onObjectBegin = toBeginVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toEndVisit(visitor.onObjectEnd), onArrayBegin = toBeginVisit(visitor.onArrayBegin), onArrayEnd = toEndVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
905
+ const disallowComments = options && options.disallowComments;
906
+ const allowTrailingComma = options && options.allowTrailingComma;
907
+ function scanNext() {
908
+ while (true) {
909
+ const token = _scanner.scan();
910
+ switch (_scanner.getTokenError()) {
911
+ case 4:
912
+ handleError(14);
913
+ break;
914
+ case 5:
915
+ handleError(15);
916
+ break;
917
+ case 3:
918
+ handleError(13);
919
+ break;
920
+ case 1:
921
+ if (!disallowComments) {
922
+ handleError(11);
923
+ }
924
+ break;
925
+ case 2:
926
+ handleError(12);
927
+ break;
928
+ case 6:
929
+ handleError(16);
930
+ break;
931
+ }
932
+ switch (token) {
933
+ case 12:
934
+ case 13:
935
+ if (disallowComments) {
936
+ handleError(10);
937
+ } else {
938
+ onComment();
939
+ }
940
+ break;
941
+ case 16:
942
+ handleError(1);
943
+ break;
944
+ case 15:
945
+ case 14:
946
+ break;
947
+ default:
948
+ return token;
949
+ }
950
+ }
951
+ }
952
+ function handleError(error, skipUntilAfter = [], skipUntil = []) {
953
+ onError(error);
954
+ if (skipUntilAfter.length + skipUntil.length > 0) {
955
+ let token = _scanner.getToken();
956
+ while (token !== 17) {
957
+ if (skipUntilAfter.indexOf(token) !== -1) {
958
+ scanNext();
959
+ break;
960
+ } else if (skipUntil.indexOf(token) !== -1) {
961
+ break;
962
+ }
963
+ token = scanNext();
964
+ }
965
+ }
966
+ }
967
+ function parseString(isValue) {
968
+ const value = _scanner.getTokenValue();
969
+ if (isValue) {
970
+ onLiteralValue(value);
971
+ } else {
972
+ onObjectProperty(value);
973
+ _jsonPath.push(value);
974
+ }
975
+ scanNext();
976
+ return true;
977
+ }
978
+ function parseLiteral() {
979
+ switch (_scanner.getToken()) {
980
+ case 11:
981
+ const tokenValue = _scanner.getTokenValue();
982
+ let value = Number(tokenValue);
983
+ if (isNaN(value)) {
984
+ handleError(2);
985
+ value = 0;
986
+ }
987
+ onLiteralValue(value);
988
+ break;
989
+ case 7:
990
+ onLiteralValue(null);
991
+ break;
992
+ case 8:
993
+ onLiteralValue(true);
994
+ break;
995
+ case 9:
996
+ onLiteralValue(false);
997
+ break;
998
+ default:
999
+ return false;
1000
+ }
1001
+ scanNext();
1002
+ return true;
1003
+ }
1004
+ function parseProperty() {
1005
+ if (_scanner.getToken() !== 10) {
1006
+ handleError(3, [], [2, 5]);
1007
+ return false;
1008
+ }
1009
+ parseString(false);
1010
+ if (_scanner.getToken() === 6) {
1011
+ onSeparator(":");
1012
+ scanNext();
1013
+ if (!parseValue()) {
1014
+ handleError(4, [], [2, 5]);
1015
+ }
1016
+ } else {
1017
+ handleError(5, [], [2, 5]);
1018
+ }
1019
+ _jsonPath.pop();
1020
+ return true;
1021
+ }
1022
+ function parseObject() {
1023
+ onObjectBegin();
1024
+ scanNext();
1025
+ let needsComma = false;
1026
+ while (_scanner.getToken() !== 2 && _scanner.getToken() !== 17) {
1027
+ if (_scanner.getToken() === 5) {
1028
+ if (!needsComma) {
1029
+ handleError(4, [], []);
1030
+ }
1031
+ onSeparator(",");
1032
+ scanNext();
1033
+ if (_scanner.getToken() === 2 && allowTrailingComma) {
1034
+ break;
1035
+ }
1036
+ } else if (needsComma) {
1037
+ handleError(6, [], []);
1038
+ }
1039
+ if (!parseProperty()) {
1040
+ handleError(4, [], [2, 5]);
1041
+ }
1042
+ needsComma = true;
1043
+ }
1044
+ onObjectEnd();
1045
+ if (_scanner.getToken() !== 2) {
1046
+ handleError(7, [2], []);
1047
+ } else {
1048
+ scanNext();
1049
+ }
1050
+ return true;
1051
+ }
1052
+ function parseArray() {
1053
+ onArrayBegin();
1054
+ scanNext();
1055
+ let isFirstElement = true;
1056
+ let needsComma = false;
1057
+ while (_scanner.getToken() !== 4 && _scanner.getToken() !== 17) {
1058
+ if (_scanner.getToken() === 5) {
1059
+ if (!needsComma) {
1060
+ handleError(4, [], []);
1061
+ }
1062
+ onSeparator(",");
1063
+ scanNext();
1064
+ if (_scanner.getToken() === 4 && allowTrailingComma) {
1065
+ break;
1066
+ }
1067
+ } else if (needsComma) {
1068
+ handleError(6, [], []);
1069
+ }
1070
+ if (isFirstElement) {
1071
+ _jsonPath.push(0);
1072
+ isFirstElement = false;
1073
+ } else {
1074
+ _jsonPath[_jsonPath.length - 1]++;
1075
+ }
1076
+ if (!parseValue()) {
1077
+ handleError(4, [], [4, 5]);
1078
+ }
1079
+ needsComma = true;
1080
+ }
1081
+ onArrayEnd();
1082
+ if (!isFirstElement) {
1083
+ _jsonPath.pop();
1084
+ }
1085
+ if (_scanner.getToken() !== 4) {
1086
+ handleError(8, [4], []);
1087
+ } else {
1088
+ scanNext();
1089
+ }
1090
+ return true;
1091
+ }
1092
+ function parseValue() {
1093
+ switch (_scanner.getToken()) {
1094
+ case 3:
1095
+ return parseArray();
1096
+ case 1:
1097
+ return parseObject();
1098
+ case 10:
1099
+ return parseString(true);
1100
+ default:
1101
+ return parseLiteral();
1102
+ }
1103
+ }
1104
+ scanNext();
1105
+ if (_scanner.getToken() === 17) {
1106
+ if (options.allowEmptyContent) {
1107
+ return true;
1108
+ }
1109
+ handleError(4, [], []);
1110
+ return false;
1111
+ }
1112
+ if (!parseValue()) {
1113
+ handleError(4, [], []);
1114
+ return false;
1115
+ }
1116
+ if (_scanner.getToken() !== 17) {
1117
+ handleError(9, [], []);
1118
+ }
1119
+ return true;
1120
+ }
1121
+ function getNodeType(value) {
1122
+ switch (typeof value) {
1123
+ case "boolean":
1124
+ return "boolean";
1125
+ case "number":
1126
+ return "number";
1127
+ case "string":
1128
+ return "string";
1129
+ case "object": {
1130
+ if (!value) {
1131
+ return "null";
1132
+ } else if (Array.isArray(value)) {
1133
+ return "array";
1134
+ }
1135
+ return "object";
1136
+ }
1137
+ default:
1138
+ return "null";
1139
+ }
1140
+ }
1141
+ var ParseOptions;
1142
+ var init_parser = __esm(() => {
1143
+ init_scanner();
1144
+ (function(ParseOptions2) {
1145
+ ParseOptions2.DEFAULT = {
1146
+ allowTrailingComma: false
1147
+ };
1148
+ })(ParseOptions || (ParseOptions = {}));
1149
+ });
1150
+
1151
+ // node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js
1152
+ function setProperty(text, originalPath, value, options) {
1153
+ const path = originalPath.slice();
1154
+ const errors = [];
1155
+ const root = parseTree(text, errors);
1156
+ let parent = undefined;
1157
+ let lastSegment = undefined;
1158
+ while (path.length > 0) {
1159
+ lastSegment = path.pop();
1160
+ parent = findNodeAtLocation(root, path);
1161
+ if (parent === undefined && value !== undefined) {
1162
+ if (typeof lastSegment === "string") {
1163
+ value = { [lastSegment]: value };
1164
+ } else {
1165
+ value = [value];
1166
+ }
1167
+ } else {
1168
+ break;
1169
+ }
1170
+ }
1171
+ if (!parent) {
1172
+ if (value === undefined) {
1173
+ throw new Error("Can not delete in empty document");
1174
+ }
1175
+ return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options);
1176
+ } else if (parent.type === "object" && typeof lastSegment === "string" && Array.isArray(parent.children)) {
1177
+ const existing = findNodeAtLocation(parent, [lastSegment]);
1178
+ if (existing !== undefined) {
1179
+ if (value === undefined) {
1180
+ if (!existing.parent) {
1181
+ throw new Error("Malformed AST");
1182
+ }
1183
+ const propertyIndex = parent.children.indexOf(existing.parent);
1184
+ let removeBegin;
1185
+ let removeEnd = existing.parent.offset + existing.parent.length;
1186
+ if (propertyIndex > 0) {
1187
+ let previous = parent.children[propertyIndex - 1];
1188
+ removeBegin = previous.offset + previous.length;
1189
+ } else {
1190
+ removeBegin = parent.offset + 1;
1191
+ if (parent.children.length > 1) {
1192
+ let next = parent.children[1];
1193
+ removeEnd = next.offset;
1194
+ }
1195
+ }
1196
+ return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: "" }, options);
1197
+ } else {
1198
+ return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options);
1199
+ }
1200
+ } else {
1201
+ if (value === undefined) {
1202
+ return [];
1203
+ }
1204
+ const newProperty = `${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`;
1205
+ const index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map((p) => p.children[0].value)) : parent.children.length;
1206
+ let edit;
1207
+ if (index > 0) {
1208
+ let previous = parent.children[index - 1];
1209
+ edit = { offset: previous.offset + previous.length, length: 0, content: "," + newProperty };
1210
+ } else if (parent.children.length === 0) {
1211
+ edit = { offset: parent.offset + 1, length: 0, content: newProperty };
1212
+ } else {
1213
+ edit = { offset: parent.offset + 1, length: 0, content: newProperty + "," };
1214
+ }
1215
+ return withFormatting(text, edit, options);
1216
+ }
1217
+ } else if (parent.type === "array" && typeof lastSegment === "number" && Array.isArray(parent.children)) {
1218
+ const insertIndex = lastSegment;
1219
+ if (insertIndex === -1) {
1220
+ const newProperty = `${JSON.stringify(value)}`;
1221
+ let edit;
1222
+ if (parent.children.length === 0) {
1223
+ edit = { offset: parent.offset + 1, length: 0, content: newProperty };
1224
+ } else {
1225
+ const previous = parent.children[parent.children.length - 1];
1226
+ edit = { offset: previous.offset + previous.length, length: 0, content: "," + newProperty };
1227
+ }
1228
+ return withFormatting(text, edit, options);
1229
+ } else if (value === undefined && parent.children.length >= 0) {
1230
+ const removalIndex = lastSegment;
1231
+ const toRemove = parent.children[removalIndex];
1232
+ let edit;
1233
+ if (parent.children.length === 1) {
1234
+ edit = { offset: parent.offset + 1, length: parent.length - 2, content: "" };
1235
+ } else if (parent.children.length - 1 === removalIndex) {
1236
+ let previous = parent.children[removalIndex - 1];
1237
+ let offset = previous.offset + previous.length;
1238
+ let parentEndOffset = parent.offset + parent.length;
1239
+ edit = { offset, length: parentEndOffset - 2 - offset, content: "" };
1240
+ } else {
1241
+ edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: "" };
1242
+ }
1243
+ return withFormatting(text, edit, options);
1244
+ } else if (value !== undefined) {
1245
+ let edit;
1246
+ const newProperty = `${JSON.stringify(value)}`;
1247
+ if (!options.isArrayInsertion && parent.children.length > lastSegment) {
1248
+ const toModify = parent.children[lastSegment];
1249
+ edit = { offset: toModify.offset, length: toModify.length, content: newProperty };
1250
+ } else if (parent.children.length === 0 || lastSegment === 0) {
1251
+ edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + "," };
1252
+ } else {
1253
+ const index = lastSegment > parent.children.length ? parent.children.length : lastSegment;
1254
+ const previous = parent.children[index - 1];
1255
+ edit = { offset: previous.offset + previous.length, length: 0, content: "," + newProperty };
1256
+ }
1257
+ return withFormatting(text, edit, options);
1258
+ } else {
1259
+ throw new Error(`Can not ${value === undefined ? "remove" : options.isArrayInsertion ? "insert" : "modify"} Array index ${insertIndex} as length is not sufficient`);
1260
+ }
1261
+ } else {
1262
+ throw new Error(`Can not add ${typeof lastSegment !== "number" ? "index" : "property"} to parent of type ${parent.type}`);
1263
+ }
1264
+ }
1265
+ function withFormatting(text, edit, options) {
1266
+ if (!options.formattingOptions) {
1267
+ return [edit];
1268
+ }
1269
+ let newText = applyEdit(text, edit);
1270
+ let begin = edit.offset;
1271
+ let end = edit.offset + edit.content.length;
1272
+ if (edit.length === 0 || edit.content.length === 0) {
1273
+ while (begin > 0 && !isEOL(newText, begin - 1)) {
1274
+ begin--;
1275
+ }
1276
+ while (end < newText.length && !isEOL(newText, end)) {
1277
+ end++;
1278
+ }
1279
+ }
1280
+ const edits = format(newText, { offset: begin, length: end - begin }, { ...options.formattingOptions, keepLines: false });
1281
+ for (let i = edits.length - 1;i >= 0; i--) {
1282
+ const edit2 = edits[i];
1283
+ newText = applyEdit(newText, edit2);
1284
+ begin = Math.min(begin, edit2.offset);
1285
+ end = Math.max(end, edit2.offset + edit2.length);
1286
+ end += edit2.content.length - edit2.length;
1287
+ }
1288
+ const editLength = text.length - (newText.length - end) - begin;
1289
+ return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }];
1290
+ }
1291
+ function applyEdit(text, edit) {
1292
+ return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length);
1293
+ }
1294
+ var init_edit = __esm(() => {
1295
+ init_format();
1296
+ init_parser();
1297
+ });
1298
+
1299
+ // node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js
1300
+ function modify(text, path, value, options) {
1301
+ return setProperty(text, path, value, options);
1302
+ }
1303
+ function applyEdits(text, edits) {
1304
+ let sortedEdits = edits.slice(0).sort((a, b) => {
1305
+ const diff = a.offset - b.offset;
1306
+ if (diff === 0) {
1307
+ return a.length - b.length;
1308
+ }
1309
+ return diff;
1310
+ });
1311
+ let lastModifiedOffset = text.length;
1312
+ for (let i = sortedEdits.length - 1;i >= 0; i--) {
1313
+ let e = sortedEdits[i];
1314
+ if (e.offset + e.length <= lastModifiedOffset) {
1315
+ text = applyEdit(text, e);
1316
+ } else {
1317
+ throw new Error("Overlapping edit");
1318
+ }
1319
+ lastModifiedOffset = e.offset;
1320
+ }
1321
+ return text;
1322
+ }
1323
+ var ScanError, SyntaxKind, parse2, ParseErrorCode;
1324
+ var init_main = __esm(() => {
1325
+ init_format();
1326
+ init_edit();
1327
+ init_scanner();
1328
+ init_parser();
1329
+ (function(ScanError2) {
1330
+ ScanError2[ScanError2["None"] = 0] = "None";
1331
+ ScanError2[ScanError2["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment";
1332
+ ScanError2[ScanError2["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString";
1333
+ ScanError2[ScanError2["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber";
1334
+ ScanError2[ScanError2["InvalidUnicode"] = 4] = "InvalidUnicode";
1335
+ ScanError2[ScanError2["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter";
1336
+ ScanError2[ScanError2["InvalidCharacter"] = 6] = "InvalidCharacter";
1337
+ })(ScanError || (ScanError = {}));
1338
+ (function(SyntaxKind2) {
1339
+ SyntaxKind2[SyntaxKind2["OpenBraceToken"] = 1] = "OpenBraceToken";
1340
+ SyntaxKind2[SyntaxKind2["CloseBraceToken"] = 2] = "CloseBraceToken";
1341
+ SyntaxKind2[SyntaxKind2["OpenBracketToken"] = 3] = "OpenBracketToken";
1342
+ SyntaxKind2[SyntaxKind2["CloseBracketToken"] = 4] = "CloseBracketToken";
1343
+ SyntaxKind2[SyntaxKind2["CommaToken"] = 5] = "CommaToken";
1344
+ SyntaxKind2[SyntaxKind2["ColonToken"] = 6] = "ColonToken";
1345
+ SyntaxKind2[SyntaxKind2["NullKeyword"] = 7] = "NullKeyword";
1346
+ SyntaxKind2[SyntaxKind2["TrueKeyword"] = 8] = "TrueKeyword";
1347
+ SyntaxKind2[SyntaxKind2["FalseKeyword"] = 9] = "FalseKeyword";
1348
+ SyntaxKind2[SyntaxKind2["StringLiteral"] = 10] = "StringLiteral";
1349
+ SyntaxKind2[SyntaxKind2["NumericLiteral"] = 11] = "NumericLiteral";
1350
+ SyntaxKind2[SyntaxKind2["LineCommentTrivia"] = 12] = "LineCommentTrivia";
1351
+ SyntaxKind2[SyntaxKind2["BlockCommentTrivia"] = 13] = "BlockCommentTrivia";
1352
+ SyntaxKind2[SyntaxKind2["LineBreakTrivia"] = 14] = "LineBreakTrivia";
1353
+ SyntaxKind2[SyntaxKind2["Trivia"] = 15] = "Trivia";
1354
+ SyntaxKind2[SyntaxKind2["Unknown"] = 16] = "Unknown";
1355
+ SyntaxKind2[SyntaxKind2["EOF"] = 17] = "EOF";
1356
+ })(SyntaxKind || (SyntaxKind = {}));
1357
+ parse2 = parse;
1358
+ (function(ParseErrorCode2) {
1359
+ ParseErrorCode2[ParseErrorCode2["InvalidSymbol"] = 1] = "InvalidSymbol";
1360
+ ParseErrorCode2[ParseErrorCode2["InvalidNumberFormat"] = 2] = "InvalidNumberFormat";
1361
+ ParseErrorCode2[ParseErrorCode2["PropertyNameExpected"] = 3] = "PropertyNameExpected";
1362
+ ParseErrorCode2[ParseErrorCode2["ValueExpected"] = 4] = "ValueExpected";
1363
+ ParseErrorCode2[ParseErrorCode2["ColonExpected"] = 5] = "ColonExpected";
1364
+ ParseErrorCode2[ParseErrorCode2["CommaExpected"] = 6] = "CommaExpected";
1365
+ ParseErrorCode2[ParseErrorCode2["CloseBraceExpected"] = 7] = "CloseBraceExpected";
1366
+ ParseErrorCode2[ParseErrorCode2["CloseBracketExpected"] = 8] = "CloseBracketExpected";
1367
+ ParseErrorCode2[ParseErrorCode2["EndOfFileExpected"] = 9] = "EndOfFileExpected";
1368
+ ParseErrorCode2[ParseErrorCode2["InvalidCommentToken"] = 10] = "InvalidCommentToken";
1369
+ ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment";
1370
+ ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString";
1371
+ ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber";
1372
+ ParseErrorCode2[ParseErrorCode2["InvalidUnicode"] = 14] = "InvalidUnicode";
1373
+ ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
1374
+ ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
1375
+ })(ParseErrorCode || (ParseErrorCode = {}));
1376
+ });
1377
+
1378
+ // src/utils/json.ts
1379
+ import { open, readFile, stat } from "fs/promises";
1380
+ function parseJSONUncached(json, shouldLogError) {
1381
+ try {
1382
+ return { ok: true, value: JSON.parse(stripBOM(json)) };
1383
+ } catch (e) {
1384
+ if (shouldLogError) {
1385
+ logError(e);
1386
+ }
1387
+ return { ok: false };
1388
+ }
1389
+ }
1390
+ function safeParseJSONC(json) {
1391
+ if (!json) {
1392
+ return null;
1393
+ }
1394
+ try {
1395
+ return parse2(stripBOM(json));
1396
+ } catch (e) {
1397
+ logError(e);
1398
+ return null;
1399
+ }
1400
+ }
1401
+ function parseJSONLBun(data) {
1402
+ const parse3 = bunJSONLParse;
1403
+ const len = data.length;
1404
+ const result = parse3(data);
1405
+ if (!result.error || result.done || result.read >= len) {
1406
+ return result.values;
1407
+ }
1408
+ let values = result.values;
1409
+ let offset = result.read;
1410
+ while (offset < len) {
1411
+ const newlineIndex = typeof data === "string" ? data.indexOf(`
1412
+ `, offset) : data.indexOf(10, offset);
1413
+ if (newlineIndex === -1)
1414
+ break;
1415
+ offset = newlineIndex + 1;
1416
+ const next = parse3(data, offset);
1417
+ if (next.values.length > 0) {
1418
+ values = values.concat(next.values);
1419
+ }
1420
+ if (!next.error || next.done || next.read >= len)
1421
+ break;
1422
+ offset = next.read;
1423
+ }
1424
+ return values;
1425
+ }
1426
+ function parseJSONLBuffer(buf) {
1427
+ const bufLen = buf.length;
1428
+ let start = 0;
1429
+ if (buf[0] === 239 && buf[1] === 187 && buf[2] === 191) {
1430
+ start = 3;
1431
+ }
1432
+ const results = [];
1433
+ while (start < bufLen) {
1434
+ let end = buf.indexOf(10, start);
1435
+ if (end === -1)
1436
+ end = bufLen;
1437
+ const line = buf.toString("utf8", start, end).trim();
1438
+ start = end + 1;
1439
+ if (!line)
1440
+ continue;
1441
+ try {
1442
+ results.push(JSON.parse(line));
1443
+ } catch {}
1444
+ }
1445
+ return results;
1446
+ }
1447
+ function parseJSONLString(data) {
1448
+ const stripped = stripBOM(data);
1449
+ const len = stripped.length;
1450
+ let start = 0;
1451
+ const results = [];
1452
+ while (start < len) {
1453
+ let end = stripped.indexOf(`
1454
+ `, start);
1455
+ if (end === -1)
1456
+ end = len;
1457
+ const line = stripped.substring(start, end).trim();
1458
+ start = end + 1;
1459
+ if (!line)
1460
+ continue;
1461
+ try {
1462
+ results.push(JSON.parse(line));
1463
+ } catch {}
1464
+ }
1465
+ return results;
1466
+ }
1467
+ function parseJSONL(data) {
1468
+ if (bunJSONLParse) {
1469
+ return parseJSONLBun(data);
1470
+ }
1471
+ if (typeof data === "string") {
1472
+ return parseJSONLString(data);
1473
+ }
1474
+ return parseJSONLBuffer(data);
1475
+ }
1476
+ async function readJSONLFile(filePath) {
1477
+ let __stack = [];
1478
+ try {
1479
+ const { size } = await stat(filePath);
1480
+ if (size <= MAX_JSONL_READ_BYTES) {
1481
+ return parseJSONL(await readFile(filePath));
1482
+ }
1483
+ const fd = __using(__stack, await open(filePath, "r"), 1);
1484
+ const buf = Buffer.allocUnsafe(MAX_JSONL_READ_BYTES);
1485
+ let totalRead = 0;
1486
+ const fileOffset = size - MAX_JSONL_READ_BYTES;
1487
+ while (totalRead < MAX_JSONL_READ_BYTES) {
1488
+ const { bytesRead } = await fd.read(buf, totalRead, MAX_JSONL_READ_BYTES - totalRead, fileOffset + totalRead);
1489
+ if (bytesRead === 0)
1490
+ break;
1491
+ totalRead += bytesRead;
1492
+ }
1493
+ const newlineIndex = buf.indexOf(10);
1494
+ if (newlineIndex !== -1 && newlineIndex < totalRead - 1) {
1495
+ return parseJSONL(buf.subarray(newlineIndex + 1, totalRead));
1496
+ }
1497
+ return parseJSONL(buf.subarray(0, totalRead));
1498
+ } catch (_catch) {
1499
+ var _err = _catch, _hasErr = 1;
1500
+ } finally {
1501
+ var _promise = __callDispose(__stack, _err, _hasErr);
1502
+ _promise && await _promise;
1503
+ }
1504
+ }
1505
+ function addItemToJSONCArray(content, newItem) {
1506
+ try {
1507
+ if (!content || content.trim() === "") {
1508
+ return jsonStringify([newItem], null, 4);
1509
+ }
1510
+ const cleanContent = stripBOM(content);
1511
+ const parsedContent = parse2(cleanContent);
1512
+ if (Array.isArray(parsedContent)) {
1513
+ const arrayLength = parsedContent.length;
1514
+ const isEmpty = arrayLength === 0;
1515
+ const insertPath = isEmpty ? [0] : [arrayLength];
1516
+ const edits = modify(cleanContent, insertPath, newItem, {
1517
+ formattingOptions: { insertSpaces: true, tabSize: 4 },
1518
+ isArrayInsertion: true
1519
+ });
1520
+ if (!edits || edits.length === 0) {
1521
+ const copy = [...parsedContent, newItem];
1522
+ return jsonStringify(copy, null, 4);
1523
+ }
1524
+ return applyEdits(cleanContent, edits);
1525
+ } else {
1526
+ return jsonStringify([newItem], null, 4);
1527
+ }
1528
+ } catch (e) {
1529
+ logError(e);
1530
+ return jsonStringify([newItem], null, 4);
1531
+ }
1532
+ }
1533
+ var PARSE_CACHE_MAX_KEY_BYTES, parseJSONCached, safeParseJSON, bunJSONLParse, MAX_JSONL_READ_BYTES;
1534
+ var init_json = __esm(() => {
1535
+ init_main();
1536
+ init_log();
1537
+ init_memoize();
1538
+ init_slowOperations();
1539
+ PARSE_CACHE_MAX_KEY_BYTES = 8 * 1024;
1540
+ parseJSONCached = memoizeWithLRU(parseJSONUncached, (json) => json, 50);
1541
+ safeParseJSON = Object.assign(function safeParseJSON2(json, shouldLogError = true) {
1542
+ if (!json)
1543
+ return null;
1544
+ const result = json.length > PARSE_CACHE_MAX_KEY_BYTES ? parseJSONUncached(json, shouldLogError) : parseJSONCached(json, shouldLogError);
1545
+ return result.ok ? result.value : null;
1546
+ }, { cache: parseJSONCached.cache });
1547
+ bunJSONLParse = (() => {
1548
+ if (typeof Bun === "undefined")
1549
+ return false;
1550
+ const b = Bun;
1551
+ const jsonl = b.JSONL;
1552
+ if (!jsonl?.parseChunk)
1553
+ return false;
1554
+ return jsonl.parseChunk;
1555
+ })();
1556
+ MAX_JSONL_READ_BYTES = 100 * 1024 * 1024;
1557
+ });
1558
+
1559
+ // src/services/mcp/types.ts
1560
+ var ConfigScopeSchema, TransportSchema, McpStdioServerConfigSchema, McpXaaConfigSchema, McpOAuthConfigSchema, McpSSEServerConfigSchema, McpSSEIDEServerConfigSchema, McpWebSocketIDEServerConfigSchema, McpHTTPServerConfigSchema, McpWebSocketServerConfigSchema, McpSdkServerConfigSchema, McpClaudeAIProxyServerConfigSchema, McpServerConfigSchema, McpJsonConfigSchema;
1561
+ var init_types = __esm(() => {
1562
+ init_v4();
1563
+ ConfigScopeSchema = lazySchema(() => exports_external.enum([
1564
+ "local",
1565
+ "user",
1566
+ "project",
1567
+ "dynamic",
1568
+ "enterprise",
1569
+ "claudeai",
1570
+ "managed"
1571
+ ]));
1572
+ TransportSchema = lazySchema(() => exports_external.enum(["stdio", "sse", "sse-ide", "http", "ws", "sdk"]));
1573
+ McpStdioServerConfigSchema = lazySchema(() => exports_external.object({
1574
+ type: exports_external.literal("stdio").optional(),
1575
+ command: exports_external.string().min(1, "Command cannot be empty"),
1576
+ args: exports_external.array(exports_external.string()).default([]),
1577
+ env: exports_external.record(exports_external.string(), exports_external.string()).optional()
1578
+ }));
1579
+ McpXaaConfigSchema = lazySchema(() => exports_external.boolean());
1580
+ McpOAuthConfigSchema = lazySchema(() => exports_external.object({
1581
+ clientId: exports_external.string().optional(),
1582
+ callbackPort: exports_external.number().int().positive().optional(),
1583
+ authServerMetadataUrl: exports_external.string().url().startsWith("https://", {
1584
+ message: "authServerMetadataUrl must use https://"
1585
+ }).optional(),
1586
+ xaa: McpXaaConfigSchema().optional()
1587
+ }));
1588
+ McpSSEServerConfigSchema = lazySchema(() => exports_external.object({
1589
+ type: exports_external.literal("sse"),
1590
+ url: exports_external.string(),
1591
+ headers: exports_external.record(exports_external.string(), exports_external.string()).optional(),
1592
+ headersHelper: exports_external.string().optional(),
1593
+ oauth: McpOAuthConfigSchema().optional()
1594
+ }));
1595
+ McpSSEIDEServerConfigSchema = lazySchema(() => exports_external.object({
1596
+ type: exports_external.literal("sse-ide"),
1597
+ url: exports_external.string(),
1598
+ ideName: exports_external.string(),
1599
+ ideRunningInWindows: exports_external.boolean().optional()
1600
+ }));
1601
+ McpWebSocketIDEServerConfigSchema = lazySchema(() => exports_external.object({
1602
+ type: exports_external.literal("ws-ide"),
1603
+ url: exports_external.string(),
1604
+ ideName: exports_external.string(),
1605
+ authToken: exports_external.string().optional(),
1606
+ ideRunningInWindows: exports_external.boolean().optional()
1607
+ }));
1608
+ McpHTTPServerConfigSchema = lazySchema(() => exports_external.object({
1609
+ type: exports_external.literal("http"),
1610
+ url: exports_external.string(),
1611
+ headers: exports_external.record(exports_external.string(), exports_external.string()).optional(),
1612
+ headersHelper: exports_external.string().optional(),
1613
+ oauth: McpOAuthConfigSchema().optional()
1614
+ }));
1615
+ McpWebSocketServerConfigSchema = lazySchema(() => exports_external.object({
1616
+ type: exports_external.literal("ws"),
1617
+ url: exports_external.string(),
1618
+ headers: exports_external.record(exports_external.string(), exports_external.string()).optional(),
1619
+ headersHelper: exports_external.string().optional()
1620
+ }));
1621
+ McpSdkServerConfigSchema = lazySchema(() => exports_external.object({
1622
+ type: exports_external.literal("sdk"),
1623
+ name: exports_external.string()
1624
+ }));
1625
+ McpClaudeAIProxyServerConfigSchema = lazySchema(() => exports_external.object({
1626
+ type: exports_external.literal("claudeai-proxy"),
1627
+ url: exports_external.string(),
1628
+ id: exports_external.string()
1629
+ }));
1630
+ McpServerConfigSchema = lazySchema(() => exports_external.union([
1631
+ McpStdioServerConfigSchema(),
1632
+ McpSSEServerConfigSchema(),
1633
+ McpSSEIDEServerConfigSchema(),
1634
+ McpWebSocketIDEServerConfigSchema(),
1635
+ McpHTTPServerConfigSchema(),
1636
+ McpWebSocketServerConfigSchema(),
1637
+ McpSdkServerConfigSchema(),
1638
+ McpClaudeAIProxyServerConfigSchema()
1639
+ ]));
1640
+ McpJsonConfigSchema = lazySchema(() => exports_external.object({
1641
+ mcpServers: exports_external.record(exports_external.string(), McpServerConfigSchema())
1642
+ }));
1643
+ });
1644
+
1645
+ export { stripBOM, safeParseJSON, safeParseJSONC, parseJSONL, readJSONLFile, addItemToJSONCArray, init_json, ConfigScopeSchema, McpStdioServerConfigSchema, McpServerConfigSchema, McpJsonConfigSchema, init_types };