scip-query 0.21.1 → 0.23.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 (399) hide show
  1. package/CHANGELOG.md +317 -0
  2. package/README.md +11 -0
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/by-kind-XI2CSWEY.js +2 -0
  5. package/dist/call-graph-UONR6JR5.js +2 -0
  6. package/dist/{chunk-JGMD6JGB.js → chunk-2E7CX53V.js} +2 -2
  7. package/dist/chunk-2GRUZAQF.js +43 -0
  8. package/dist/{chunk-RSUH7G5T.js → chunk-2LDBDR6J.js} +2 -2
  9. package/dist/{chunk-4SZJF4GK.js → chunk-2OOY75BW.js} +2 -2
  10. package/dist/{chunk-3YETOKNO.js → chunk-2R3V3PSD.js} +2 -2
  11. package/dist/chunk-2WC2OEDO.js +4 -0
  12. package/dist/{chunk-O4PZFAXA.js → chunk-3AF4TUFK.js} +2 -2
  13. package/dist/{chunk-I2LY3KN7.js → chunk-3D3QG236.js} +2 -2
  14. package/dist/{chunk-DXEJ4FLZ.js → chunk-3FHOF22C.js} +8 -8
  15. package/dist/{chunk-BCTCADNB.js → chunk-3JKSW6LJ.js} +2 -2
  16. package/dist/chunk-3L2ZBPEX.js +133 -0
  17. package/dist/{chunk-4HQYNZ3P.js → chunk-3PJABJSU.js} +2 -2
  18. package/dist/{chunk-GBZCVYWA.js → chunk-3SVF22I5.js} +2 -2
  19. package/dist/{chunk-TP2X2C2Y.js → chunk-3WR4E3A3.js} +2 -2
  20. package/dist/chunk-4FTZ4P5G.js +2 -0
  21. package/dist/{chunk-LJMWILX6.js → chunk-4ILJCCXV.js} +2 -2
  22. package/dist/chunk-4UX2F3JX.js +2 -0
  23. package/dist/chunk-4WNW27SX.js +2 -0
  24. package/dist/chunk-5ENOG4VP.js +61 -0
  25. package/dist/{chunk-YKHL4J3G.js → chunk-64BFSI5I.js} +2 -2
  26. package/dist/chunk-66DVSJQG.js +455 -0
  27. package/dist/{chunk-BYXWXLKM.js → chunk-6HFCYNYE.js} +2 -2
  28. package/dist/{chunk-UBETC3Q2.js → chunk-6I6L7Z62.js} +2 -2
  29. package/dist/{chunk-IZKJQQCQ.js → chunk-6PQNKL3G.js} +2 -2
  30. package/dist/{chunk-ITF3CWS5.js → chunk-6V5CNXL6.js} +2 -2
  31. package/dist/chunk-6VVV4WRR.js +4 -0
  32. package/dist/{chunk-ZQUNCTEZ.js → chunk-7BWFZPPZ.js} +2 -2
  33. package/dist/{chunk-5QM7QT5B.js → chunk-7CYG22FH.js} +2 -2
  34. package/dist/chunk-7F45LJKI.js +2 -0
  35. package/dist/{chunk-QN2AI3D2.js → chunk-7IWV2EG3.js} +2 -2
  36. package/dist/{chunk-5KIJMEPC.js → chunk-AFHTBORT.js} +2 -2
  37. package/dist/chunk-AVRYW5OZ.js +2 -0
  38. package/dist/chunk-B3PYOSCX.js +2 -0
  39. package/dist/{chunk-YF25RQER.js → chunk-B5D7QPBE.js} +2 -2
  40. package/dist/{chunk-PU6XDQ2X.js → chunk-BBCIS4DX.js} +5 -5
  41. package/dist/chunk-BDUVI7TO.js +3 -0
  42. package/dist/{chunk-UXNXOMXJ.js → chunk-BE7ZZTMC.js} +2 -2
  43. package/dist/{chunk-527HV7JY.js → chunk-BHVUJOCQ.js} +2 -2
  44. package/dist/{chunk-4IASLUOP.js → chunk-BJT7LSPK.js} +2 -2
  45. package/dist/chunk-BKVWUP7Y.js +2 -0
  46. package/dist/{chunk-QZCACNV5.js → chunk-BQGB4HBD.js} +2 -2
  47. package/dist/{chunk-QH5Q6M5C.js → chunk-BRV7PIFF.js} +2 -2
  48. package/dist/chunk-CEEZJXEF.js +2 -0
  49. package/dist/{chunk-X5MWO4DM.js → chunk-CIYLO6SI.js} +2 -2
  50. package/dist/chunk-CJZXN4NU.js +2 -0
  51. package/dist/{chunk-V6XENWOF.js → chunk-CNO7TOKL.js} +2 -2
  52. package/dist/{chunk-FUUDUAKM.js → chunk-COF23M5F.js} +2 -2
  53. package/dist/{chunk-GTZFKDP3.js → chunk-CWFP7GM5.js} +2 -2
  54. package/dist/chunk-D2DHWI3D.js +2 -0
  55. package/dist/{chunk-SBFDPHKH.js → chunk-D4N5SQ2M.js} +2 -2
  56. package/dist/{chunk-FCGMQETU.js → chunk-DBRSYFXR.js} +2 -2
  57. package/dist/{chunk-47WX6UC4.js → chunk-DHUIOLDT.js} +2 -2
  58. package/dist/{chunk-KGKCJFWZ.js → chunk-DIRJWYBM.js} +2 -2
  59. package/dist/{chunk-QGVUPYBC.js → chunk-DIUFNHRJ.js} +2 -2
  60. package/dist/{chunk-YLNCTPOI.js → chunk-DTZCKZEU.js} +2 -2
  61. package/dist/{chunk-O3EX5STE.js → chunk-DULC3QFP.js} +2 -2
  62. package/dist/{chunk-B3AREUQK.js → chunk-DYGHBZ2N.js} +2 -2
  63. package/dist/{chunk-AAOEROT3.js → chunk-E5R6AQ73.js} +2 -2
  64. package/dist/{chunk-UM56ZET4.js → chunk-E73UNJTF.js} +2 -2
  65. package/dist/{chunk-6QN4FYQW.js → chunk-EG2CPZMJ.js} +2 -2
  66. package/dist/{chunk-OMVNRPST.js → chunk-EKV5HX33.js} +2 -2
  67. package/dist/{chunk-27OUNZW5.js → chunk-EQHFIL6T.js} +2 -2
  68. package/dist/{chunk-ZGDHC5AT.js → chunk-ESIQ66Z7.js} +2 -2
  69. package/dist/chunk-EVFUMY4R.js +3 -0
  70. package/dist/{chunk-WZRNEVYC.js → chunk-F7DY272B.js} +2 -2
  71. package/dist/chunk-FBN2FGXG.js +2 -0
  72. package/dist/{chunk-HR5JYLVV.js → chunk-FDLOBR6P.js} +2 -2
  73. package/dist/chunk-FESCRNVV.js +5 -0
  74. package/dist/{chunk-MLTKGHD2.js → chunk-FFRKR4EQ.js} +2 -2
  75. package/dist/chunk-FGA2U4OR.js +8 -0
  76. package/dist/{chunk-3KXFB2FM.js → chunk-FIQRSHVM.js} +2 -2
  77. package/dist/{chunk-ZP2WUVZ5.js → chunk-FPYLNQPT.js} +2 -2
  78. package/dist/{chunk-EPLE5O5O.js → chunk-FRUSVINH.js} +2 -2
  79. package/dist/chunk-GAS2LJMP.js +3 -0
  80. package/dist/{chunk-4TOU7HHQ.js → chunk-GSP44ENC.js} +2 -2
  81. package/dist/{chunk-DXYMTQZ4.js → chunk-GUFSG5TX.js} +2 -2
  82. package/dist/chunk-GYIZ4NXB.js +2 -0
  83. package/dist/{chunk-CQVDALWQ.js → chunk-GZIUDL6G.js} +2 -2
  84. package/dist/chunk-HCXEQRFF.js +18 -0
  85. package/dist/{chunk-2LJLEM5B.js → chunk-HEHOQQKH.js} +2 -2
  86. package/dist/{chunk-RNKRYK6B.js → chunk-HKGFPJ4T.js} +2 -2
  87. package/dist/chunk-HLZTEXRA.js +2 -0
  88. package/dist/{chunk-T2PBOVDI.js → chunk-HOENASQM.js} +2 -2
  89. package/dist/{chunk-PX6QNUYF.js → chunk-HVF5VBG6.js} +2 -2
  90. package/dist/{chunk-K2DZCH2K.js → chunk-HYO3NP5Q.js} +2 -2
  91. package/dist/{chunk-MRXBLYRE.js → chunk-I55I7XXP.js} +2 -2
  92. package/dist/{chunk-AQF35NGT.js → chunk-IDFEUFKS.js} +2 -2
  93. package/dist/{chunk-7G2WIVIX.js → chunk-IHGQTTVW.js} +2 -2
  94. package/dist/{chunk-P3UFF22M.js → chunk-IICPE7B2.js} +2 -2
  95. package/dist/{chunk-NT4NVEHU.js → chunk-IL676XCC.js} +2 -2
  96. package/dist/{chunk-OU6SDWAM.js → chunk-ILTDAWEF.js} +2 -2
  97. package/dist/chunk-IW5XQG5G.js +2 -0
  98. package/dist/chunk-IZDPJ2QI.js +2 -0
  99. package/dist/{chunk-J4HUBIVF.js → chunk-J66VOFW6.js} +2 -2
  100. package/dist/chunk-JFMEXGFE.js +2 -0
  101. package/dist/{chunk-DGM2RJ3I.js → chunk-JGKUET5J.js} +2 -2
  102. package/dist/{chunk-BM4OTGSY.js → chunk-JS4PGXMV.js} +2 -2
  103. package/dist/{chunk-OG5UK2K7.js → chunk-JTQVMR42.js} +2 -2
  104. package/dist/chunk-JWTGMPIT.js +80 -0
  105. package/dist/{chunk-3XQLJG7V.js → chunk-JYR66JN5.js} +2 -2
  106. package/dist/chunk-KLFEXGQA.js +2 -0
  107. package/dist/chunk-KYSDI3GE.js +5 -0
  108. package/dist/{chunk-LIWIV26I.js → chunk-L6PJPETJ.js} +2 -2
  109. package/dist/{chunk-6DO3VBLV.js → chunk-LDVT66YM.js} +2 -2
  110. package/dist/chunk-LEECKFCJ.js +2 -0
  111. package/dist/{chunk-BVR44XXB.js → chunk-LMZ5PRUV.js} +2 -2
  112. package/dist/{chunk-KFFQURUZ.js → chunk-LQRQN2XA.js} +2 -2
  113. package/dist/{chunk-YR7VRWNX.js → chunk-LXABEJX3.js} +2 -2
  114. package/dist/{chunk-ARGPDW2Y.js → chunk-M2O5NY6W.js} +2 -2
  115. package/dist/{chunk-7YZGSLW6.js → chunk-MNV5FSBW.js} +2 -2
  116. package/dist/{chunk-XFRHBAIT.js → chunk-MPQ4OTBM.js} +2 -2
  117. package/dist/{chunk-PJBYDCBQ.js → chunk-MV3CDXPI.js} +2 -2
  118. package/dist/{chunk-DK6MB565.js → chunk-MWN53KRN.js} +2 -2
  119. package/dist/chunk-N2ZSIIGR.js +117 -0
  120. package/dist/chunk-N5B2NILC.js +5 -0
  121. package/dist/{chunk-HW7FASEL.js → chunk-NJITK2GP.js} +2 -2
  122. package/dist/{chunk-DUDUIT5P.js → chunk-NOGJXYFO.js} +2 -2
  123. package/dist/chunk-NOYBFVJA.js +554 -0
  124. package/dist/chunk-NWQXSFFU.js +3 -0
  125. package/dist/chunk-ODDUPDP7.js +13 -0
  126. package/dist/chunk-OLIWTZI3.js +3 -0
  127. package/dist/{chunk-JO6FK3Q5.js → chunk-OLNV6I6U.js} +2 -2
  128. package/dist/{chunk-CXT3GZSQ.js → chunk-OR2E3AGZ.js} +2 -2
  129. package/dist/chunk-OSR2GEHQ.js +2 -0
  130. package/dist/{chunk-7MUHSZGN.js → chunk-OSSESPDX.js} +2 -2
  131. package/dist/{chunk-ND3BWIVN.js → chunk-OWOOWNJ5.js} +2 -2
  132. package/dist/{chunk-UEQORB2A.js → chunk-P42EIXTA.js} +2 -2
  133. package/dist/{chunk-PWEQ6CZZ.js → chunk-PJFGPYTU.js} +2 -2
  134. package/dist/{chunk-CNT4ND5O.js → chunk-PP7KNN7L.js} +2 -2
  135. package/dist/{chunk-C52Q3JEQ.js → chunk-PU7T5QYQ.js} +2 -2
  136. package/dist/{chunk-OY7PCALC.js → chunk-PWWAJSKV.js} +2 -2
  137. package/dist/{chunk-LXMW6ZAX.js → chunk-PZL5T7SU.js} +2 -2
  138. package/dist/{chunk-G47MFF47.js → chunk-QBE3YX64.js} +2 -2
  139. package/dist/{chunk-SGSPCEFC.js → chunk-QGVTFRY2.js} +2 -2
  140. package/dist/chunk-QOJONDS7.js +2 -0
  141. package/dist/chunk-QU5XRYB5.js +4 -0
  142. package/dist/{chunk-4ZCLDH6T.js → chunk-QUU5OBVK.js} +2 -2
  143. package/dist/{chunk-N4EFQIRX.js → chunk-RBLQNW26.js} +2 -2
  144. package/dist/chunk-RTQ7NEKG.js +81 -0
  145. package/dist/{chunk-XNF5T4T2.js → chunk-SQXRS7BG.js} +2 -2
  146. package/dist/chunk-SSK6LDPC.js +2 -0
  147. package/dist/chunk-SZHGTCPP.js +7 -0
  148. package/dist/chunk-T4N4P2K5.js +16 -0
  149. package/dist/{chunk-LFWB7TOJ.js → chunk-TA3QKLLU.js} +2 -2
  150. package/dist/chunk-TEBQMNVI.js +43 -0
  151. package/dist/chunk-TPFHAQ2G.js +2 -0
  152. package/dist/chunk-TQPCBMWT.js +5 -0
  153. package/dist/chunk-TQZV7KV4.js +2 -0
  154. package/dist/{chunk-FOP7HD6H.js → chunk-TRNAEQ6P.js} +2 -2
  155. package/dist/chunk-TY7CRN3Z.js +2 -0
  156. package/dist/{chunk-XDOEHEET.js → chunk-UHFYCMZO.js} +2 -2
  157. package/dist/{chunk-E6N6YTVM.js → chunk-UICY4GTQ.js} +2 -2
  158. package/dist/{chunk-AFRS7WJU.js → chunk-UVGEWT4Y.js} +2 -2
  159. package/dist/{chunk-IHGK3SZ7.js → chunk-UXW33INU.js} +2 -2
  160. package/dist/{chunk-RZWBTKXO.js → chunk-VMPRET3I.js} +2 -2
  161. package/dist/{chunk-DZA7MQMU.js → chunk-VNLGKHS6.js} +2 -2
  162. package/dist/chunk-VQILFTEH.js +2 -0
  163. package/dist/chunk-VUPHCS7Y.js +57 -0
  164. package/dist/{chunk-K63CAPS2.js → chunk-VVZSBTSU.js} +2 -2
  165. package/dist/{chunk-IH3K5J6K.js → chunk-VZRNID6A.js} +2 -2
  166. package/dist/{chunk-NSDPPUDY.js → chunk-W5OXRYGE.js} +2 -2
  167. package/dist/chunk-W6STWDQI.js +57 -0
  168. package/dist/chunk-W7CXK74K.js +2 -0
  169. package/dist/chunk-WB3WYIRE.js +4 -0
  170. package/dist/{chunk-WV6R37XV.js → chunk-WDNVY4E7.js} +2 -2
  171. package/dist/{chunk-Z2QB75BS.js → chunk-WIWY3CRX.js} +2 -2
  172. package/dist/chunk-WK46TNUM.js +3 -0
  173. package/dist/chunk-WNTFFKAX.js +12 -0
  174. package/dist/{chunk-U2MNECDU.js → chunk-WOIKCX6A.js} +2 -2
  175. package/dist/{chunk-5BJPJUXF.js → chunk-WUN6KBHV.js} +2 -2
  176. package/dist/chunk-WYCTJDVR.js +2 -0
  177. package/dist/chunk-WYPL7GF7.js +2 -0
  178. package/dist/{chunk-OFZVFIDF.js → chunk-XBGWL66K.js} +2 -2
  179. package/dist/{chunk-3T5U2EQ2.js → chunk-XDQMU3BT.js} +2 -2
  180. package/dist/{chunk-BZCRHP46.js → chunk-XFA4SSO3.js} +2 -2
  181. package/dist/{chunk-4KIPF45P.js → chunk-XGZEP6GR.js} +2 -2
  182. package/dist/chunk-XPDPNWTQ.js +368 -0
  183. package/dist/chunk-XRYABF57.js +8 -0
  184. package/dist/{chunk-KBIC6JHJ.js → chunk-YBGKCQIS.js} +2 -2
  185. package/dist/{chunk-5J3A6RBZ.js → chunk-YEN6CYC7.js} +2 -2
  186. package/dist/{chunk-OA2BO4DR.js → chunk-YF5IB2LF.js} +2 -2
  187. package/dist/{chunk-Q4MRRB3C.js → chunk-YI2AWIHC.js} +2 -2
  188. package/dist/{chunk-YCXQQ3YB.js → chunk-YPWBKGFU.js} +2 -2
  189. package/dist/{chunk-EJHNTAEE.js → chunk-YPWHBBIS.js} +2 -2
  190. package/dist/{chunk-FIO44MVK.js → chunk-YSH6U3L4.js} +2 -2
  191. package/dist/{chunk-HYU4W353.js → chunk-YU5DZUZI.js} +2 -2
  192. package/dist/chunk-YWO5DDRC.js +16 -0
  193. package/dist/{chunk-5Z2H76VD.js → chunk-YXPUP5G2.js} +2 -2
  194. package/dist/{chunk-H2RBDP5S.js → chunk-Z4CDXYNQ.js} +2 -2
  195. package/dist/{chunk-VJAD5WX5.js → chunk-ZF5KHH7C.js} +2 -2
  196. package/dist/chunk-ZOHS7AQV.js +21 -0
  197. package/dist/{chunk-YT4IQBET.js → chunk-ZTI4SBFV.js} +2 -2
  198. package/dist/cli-main.js +2 -2
  199. package/dist/code-MI6F2TTU.js +2 -0
  200. package/dist/code-result-json-FXALY4HE.js +2 -0
  201. package/dist/{command-descriptors-6INSCKLW.js → command-descriptors-P34VABY5.js} +144 -143
  202. package/dist/dataflow-4KEMJPC6.js +2 -0
  203. package/dist/dependence-slice-R7FPWD5M.js +2 -0
  204. package/dist/deps-7EMQUYUT.js +2 -0
  205. package/dist/direct-navigation-6YO234F2.js +3 -0
  206. package/dist/entry-map-KOOLR26E.js +2 -0
  207. package/dist/files-OPIPJIGZ.js +2 -0
  208. package/dist/hierarchy-QPD2CAER.js +2 -0
  209. package/dist/imports-M6HUXRXC.js +2 -0
  210. package/dist/index.js +1 -1
  211. package/dist/members-I5MEFOCT.js +2 -0
  212. package/dist/methods-5JYGGHXA.js +2 -0
  213. package/dist/output-continuation-command-UPQAAKBP.js +3 -0
  214. package/dist/postinstall.js +1 -1
  215. package/dist/project-reindex-UKKQ5PLS.js +3 -0
  216. package/dist/queries/affected.js +1 -1
  217. package/dist/queries/anchors.js +1 -1
  218. package/dist/queries/architecture.js +1 -1
  219. package/dist/queries/bottlenecks.js +1 -1
  220. package/dist/queries/by-kind.js +1 -1
  221. package/dist/queries/call-graph.js +1 -1
  222. package/dist/queries/change-surface.js +1 -1
  223. package/dist/queries/cleanup-plan.js +1 -1
  224. package/dist/queries/co-change.js +1 -1
  225. package/dist/queries/code.js +1 -1
  226. package/dist/queries/complexity-hotspots.js +1 -1
  227. package/dist/queries/complexity.d.ts +11 -0
  228. package/dist/queries/complexity.js +1 -1
  229. package/dist/queries/context.js +1 -1
  230. package/dist/queries/convergence.js +1 -1
  231. package/dist/queries/coupling.js +1 -1
  232. package/dist/queries/cycles.js +1 -1
  233. package/dist/queries/dataflow.js +1 -1
  234. package/dist/queries/dead.js +1 -1
  235. package/dist/queries/decorative-checkers.js +1 -1
  236. package/dist/queries/deep-chains.js +1 -1
  237. package/dist/queries/dependence-slice.js +1 -1
  238. package/dist/queries/dependency-depth.js +1 -1
  239. package/dist/queries/deps.js +1 -1
  240. package/dist/queries/diff-impact.d.ts +9 -0
  241. package/dist/queries/diff-impact.js +1 -1
  242. package/dist/queries/doc-drift.js +1 -1
  243. package/dist/queries/drift.js +1 -1
  244. package/dist/queries/duplicate-bodies.js +1 -1
  245. package/dist/queries/entry-map.js +1 -1
  246. package/dist/queries/evidence.js +1 -1
  247. package/dist/queries/extract-candidates.js +1 -1
  248. package/dist/queries/fan.js +1 -1
  249. package/dist/queries/files.js +1 -1
  250. package/dist/queries/health.js +1 -1
  251. package/dist/queries/hierarchy.js +1 -1
  252. package/dist/queries/hotspots.js +1 -1
  253. package/dist/queries/imports.js +1 -1
  254. package/dist/queries/incomplete-migration.js +1 -1
  255. package/dist/queries/index.js +1 -1
  256. package/dist/queries/isolated.js +1 -1
  257. package/dist/queries/locality-candidates.js +1 -1
  258. package/dist/queries/members.js +1 -1
  259. package/dist/queries/methods.js +1 -1
  260. package/dist/queries/not-implemented.js +1 -1
  261. package/dist/queries/outline.js +1 -1
  262. package/dist/queries/passthrough-candidates.js +1 -1
  263. package/dist/queries/plan-context.js +1 -1
  264. package/dist/queries/react-component-duplicates.js +1 -1
  265. package/dist/queries/react-hook-candidates.js +1 -1
  266. package/dist/queries/react-large-component-pressure.js +1 -1
  267. package/dist/queries/recent-duplicates.js +1 -1
  268. package/dist/queries/redundant-reexports.js +1 -1
  269. package/dist/queries/reference-neighborhood.js +1 -1
  270. package/dist/queries/reference-reachability.js +1 -1
  271. package/dist/queries/refs.js +1 -1
  272. package/dist/queries/self-audit.js +1 -1
  273. package/dist/queries/similar-chains.js +1 -1
  274. package/dist/queries/similar-files.js +1 -1
  275. package/dist/queries/similar-signatures.js +1 -1
  276. package/dist/queries/similar.js +1 -1
  277. package/dist/queries/slice.js +1 -1
  278. package/dist/queries/source-inspection.js +1 -1
  279. package/dist/queries/source-search.js +1 -1
  280. package/dist/queries/stale-abstractions.js +1 -1
  281. package/dist/queries/surface.js +1 -1
  282. package/dist/queries/symbols.js +1 -1
  283. package/dist/queries/system-map.js +1 -1
  284. package/dist/queries/system.js +1 -1
  285. package/dist/queries/test-quality.js +1 -1
  286. package/dist/queries/trace.js +1 -1
  287. package/dist/queries/twin-ab.js +1 -1
  288. package/dist/queries/twin-drift.js +1 -1
  289. package/dist/queries/unused-imports.js +1 -1
  290. package/dist/queries/unused-params.js +1 -1
  291. package/dist/queries/value-flow.js +1 -1
  292. package/dist/queries/vue-component-duplicates.js +1 -1
  293. package/dist/queries/vue-composable-candidates.js +1 -1
  294. package/dist/queries/vue-large-view-pressure.js +1 -1
  295. package/dist/queries/wrapper-candidates.js +1 -1
  296. package/dist/query-service-fastpath.js +5 -5
  297. package/dist/query-service-server.js +3 -3
  298. package/dist/refs-PSU4JZZW.js +2 -0
  299. package/dist/refs-pagination-JG6CJMRC.js +2 -0
  300. package/dist/reindex-worker.js +64 -22
  301. package/dist/reindex.d.ts +3 -2
  302. package/dist/reindex.js +74 -32
  303. package/dist/runtime.d.ts +34 -2
  304. package/dist/runtime.js +4 -4
  305. package/dist/rust-semantic-session-server.js +1 -1
  306. package/dist/rust-semantic-session-worker.js +1 -1
  307. package/dist/rust-semantic-worker.js +1 -1
  308. package/dist/{scip-cli-H-n59izO.d.ts → scip-cli-DOerTq-R.d.ts} +42 -4
  309. package/dist/slice-HYRATV64.js +2 -0
  310. package/dist/surface-VTGDYWF5.js +2 -0
  311. package/dist/symbol-resolution-WD5EU5JE.js +2 -0
  312. package/dist/system-LRQNFOR2.js +2 -0
  313. package/dist/trace-F4B6OLL4.js +2 -0
  314. package/dist/typescript-mailbox-worker.js +1 -1
  315. package/dist/value-flow-VRPZY72V.js +2 -0
  316. package/dist/watch-server.js +3 -3
  317. package/package.json +1 -1
  318. package/dist/by-kind-XXGZGNZ6.js +0 -2
  319. package/dist/call-graph-VGY3R4L3.js +0 -2
  320. package/dist/chunk-3XZELASU.js +0 -2
  321. package/dist/chunk-63TFRBMB.js +0 -2
  322. package/dist/chunk-67FK5KGV.js +0 -3
  323. package/dist/chunk-6LS3IG2I.js +0 -13
  324. package/dist/chunk-6X4KO5A7.js +0 -11
  325. package/dist/chunk-743MEVFJ.js +0 -8
  326. package/dist/chunk-7Z4GMCHM.js +0 -117
  327. package/dist/chunk-ANCHW2R4.js +0 -57
  328. package/dist/chunk-BMKTDJI6.js +0 -16
  329. package/dist/chunk-BZYSGZRK.js +0 -2
  330. package/dist/chunk-C7WSQA6A.js +0 -21
  331. package/dist/chunk-CTO3TRX7.js +0 -2
  332. package/dist/chunk-DNPETNXT.js +0 -2
  333. package/dist/chunk-DZNWXJN2.js +0 -18
  334. package/dist/chunk-E7CJ6O72.js +0 -2
  335. package/dist/chunk-FLSVYEPL.js +0 -2
  336. package/dist/chunk-FSPENGSU.js +0 -4
  337. package/dist/chunk-FYCH2EYQ.js +0 -2
  338. package/dist/chunk-G6VV7ROY.js +0 -2
  339. package/dist/chunk-GSHTVE56.js +0 -3
  340. package/dist/chunk-IGBQVEHE.js +0 -2
  341. package/dist/chunk-IM23CSG5.js +0 -2
  342. package/dist/chunk-IQMGNIGY.js +0 -2
  343. package/dist/chunk-JLZWYDCZ.js +0 -4
  344. package/dist/chunk-JSHDCVUM.js +0 -81
  345. package/dist/chunk-L7WRUNKJ.js +0 -2
  346. package/dist/chunk-LGVTIZPV.js +0 -61
  347. package/dist/chunk-MFBVUQJZ.js +0 -2
  348. package/dist/chunk-MLTSTKXD.js +0 -5
  349. package/dist/chunk-MR4ZKWO6.js +0 -57
  350. package/dist/chunk-NODZYYGC.js +0 -2
  351. package/dist/chunk-NP4JFCLE.js +0 -133
  352. package/dist/chunk-NQXWWE6S.js +0 -8
  353. package/dist/chunk-O2VY47Y5.js +0 -325
  354. package/dist/chunk-PAZSBPJR.js +0 -3
  355. package/dist/chunk-PRLU3I7G.js +0 -79
  356. package/dist/chunk-QLWZUFDT.js +0 -2
  357. package/dist/chunk-SIGVQT43.js +0 -2
  358. package/dist/chunk-SRIZDEWX.js +0 -4
  359. package/dist/chunk-U7DOYZDH.js +0 -2
  360. package/dist/chunk-UAQQR55F.js +0 -2
  361. package/dist/chunk-VRJG7N3I.js +0 -453
  362. package/dist/chunk-W7HN6V4E.js +0 -7
  363. package/dist/chunk-WCIKJ2E3.js +0 -3
  364. package/dist/chunk-WEXQYJY3.js +0 -5
  365. package/dist/chunk-WOPZX5GM.js +0 -2
  366. package/dist/chunk-WZ7V4BQV.js +0 -2
  367. package/dist/chunk-XDQX6LDT.js +0 -4
  368. package/dist/chunk-XIPGCT3D.js +0 -5
  369. package/dist/chunk-XKM5D2XS.js +0 -16
  370. package/dist/chunk-Y2S4YNLH.js +0 -3
  371. package/dist/chunk-YA72ZUKO.js +0 -2
  372. package/dist/chunk-YBWE6J32.js +0 -43
  373. package/dist/chunk-YDTK77JP.js +0 -43
  374. package/dist/chunk-Z2KGMIL4.js +0 -2
  375. package/dist/chunk-Z67JOKRE.js +0 -554
  376. package/dist/chunk-ZMS4YCY7.js +0 -2
  377. package/dist/chunk-ZNW5A5VX.js +0 -3
  378. package/dist/code-AXLJBZ6T.js +0 -2
  379. package/dist/code-result-json-CTZHAQXJ.js +0 -2
  380. package/dist/dataflow-AFXY423Q.js +0 -2
  381. package/dist/dependence-slice-2G4X6VSJ.js +0 -2
  382. package/dist/deps-LMCAV5DO.js +0 -2
  383. package/dist/direct-navigation-2ONV22Y2.js +0 -3
  384. package/dist/entry-map-ZOC3VXO5.js +0 -2
  385. package/dist/files-WJQJLHMH.js +0 -2
  386. package/dist/hierarchy-ASNIHAX4.js +0 -2
  387. package/dist/imports-JICEKDKK.js +0 -2
  388. package/dist/members-C5H2K3MS.js +0 -2
  389. package/dist/methods-KZOZHSD4.js +0 -2
  390. package/dist/output-continuation-command-NX3RH3TP.js +0 -3
  391. package/dist/project-reindex-A2SXUH2H.js +0 -3
  392. package/dist/refs-ZOORVRQC.js +0 -2
  393. package/dist/refs-pagination-SRCUOYRD.js +0 -2
  394. package/dist/slice-NOTBWA7S.js +0 -2
  395. package/dist/surface-BTBCLKNA.js +0 -2
  396. package/dist/symbol-resolution-SVSMX4RN.js +0 -2
  397. package/dist/system-2EIUFP6B.js +0 -2
  398. package/dist/trace-BB2GHQPG.js +0 -2
  399. package/dist/value-flow-OA7AHSUG.js +0 -2
@@ -1,133 +0,0 @@
1
- import{a as xe}from"./chunk-5Z2H76VD.js";import{b as H,c as Zt,d as en,e as Re,g as ot}from"./chunk-DRENNWRG.js";import{b as Qt,c as U,d as Se,f as Jt,g as Kt,h as Xt,i as Gt,j as Yt,p as pe}from"./chunk-PRLU3I7G.js";import{a as zt,c as b,d as le,e as qt,f as ue}from"./chunk-FYCH2EYQ.js";import{a as rt,b as st,e as it}from"./chunk-HGFDYOVB.js";import{B as x,h as Te,ja as Fe,ka as De}from"./chunk-XIPGCT3D.js";var _r=b("source-text",{clearGroups:["whole-project","source-file"]}),Cr=b("source-lines",{clearGroups:["whole-project","source-file"]});function N(e,t){let n=t.replace(/\\/g,"/");return _r.get(e,n,()=>Er(e,n))}function Er(e,t){let n=t.replace(/\\/g,"/");try{return Fe(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(r){if(De(r))return"";throw r}}function Ma(e){if(e.length===0)return[];let t=e.split(`
2
- `);return e.endsWith(`
3
- `)&&t.pop(),t}function at(e,t){let n=t.replace(/\\/g,"/");return Cr.get(e,n,()=>{let r=N(e,n);return r?r.split(`
4
- `):[]})}var kr=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function Pr(e){let t=kr.exec(e);return t?t[1]??"":null}function $a(e,t,n){return Lr(e,t,n).length>0}function Lr(e,t,n){if(n<=0)return[];let r=at(e,t);if(r.length===0)return[];let s=[];for(let i=n-1;i>=0&&i>=n-5;i-=1){let o=(r[i]??"").trim();if(o==="")continue;let a=Pr(o);if(a!==null){s.push(a);continue}if(!o.startsWith("//")&&!o.startsWith("*")&&!o.startsWith("/*")&&!o.startsWith("@")&&!o.startsWith("#"))return s}return s}import{extname as tn}from"path";var Tr={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb",".clj":"clojure",".cljs":"clojure",".cljc":"clojure"};function z(e){return Tr[tn(e).toLowerCase()]??null}function q(e){return tn(e).toLowerCase()===".vue"}var Fr=[I("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),I("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),I("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),I("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),I("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),I("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),I("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),I("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),I("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),I("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),I("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),I("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),I("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),I("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),I("runtime-boundary-http-roles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/http-summaries.ts"}),ve("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),ve("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),ve("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),ve("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"})];function Y(e){let t=new Map;return{kind:e.kind,read(n,r,s){let i=!1,o=0,a;if(rt()){let c=Se(n);if(c){let l=`${c}\0${r}\0${s}`;a=t.get(l),a||(a=st(["evidence-product-file-read-v1",e.kind,c,r,s]),t.set(l,a))}}return it("evidence-product.file.read",()=>{let c=Jt(n,e.kind,r,s);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return i=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:i,payloadBytes:o}))},write(n,r,s,i){Kt(n,e.kind,r,s,e.serialize(i))},writeBatch(n,r){Xt(n,r.map(s=>({kind:e.kind,relativePath:s.relativePath,contentHash:s.contentHash,payload:e.serialize(s.value)})))}}}function Qa(e){let t=new Map;return{kind:e.kind,read(n,r,s){let i=!1,o=0,a;if(rt()){let c=`${s}\0${r}`;a=t.get(c),a||(a=st(["evidence-product-project-read-v1",e.kind,s,r]),t.set(c,a))}return it("evidence-product.project.read",()=>{let c=Gt(n,e.kind,r,s);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return i=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:i,payloadBytes:o}))},write(n,r,s,i){Yt(n,e.kind,r,s,e.serialize(i))}}}function Z(e){let t=Fr.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function I(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function ve(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}import{createRequire as Dr}from"module";var _=Dr(import.meta.url),we=null,nn=!1;function Rr(){if(nn)return null;if(we)return we;try{return we=_("tree-sitter"),we}catch{return nn=!0,null}}var rn=new Map,Ae=new Set;function vr(e){if(Ae.has(e))return null;let t=rn.get(e);if(t)return t;let n;try{switch(e){case"rust":n=_("tree-sitter-rust");break;case"typescript":n=_("tree-sitter-typescript").typescript;break;case"tsx":n=_("tree-sitter-typescript").tsx;break;case"javascript":n=_("tree-sitter-javascript");break;case"python":n=_("tree-sitter-python");break;case"java":n=_("tree-sitter-java");break;case"kotlin":n=_("tree-sitter-kotlin");break;case"scala":n=_("tree-sitter-scala");break;case"ruby":n=_("tree-sitter-ruby");break;case"c":n=_("tree-sitter-c");break;case"cpp":n=_("tree-sitter-cpp");break;case"csharp":n=_("tree-sitter-c-sharp");break;case"php":n=_("tree-sitter-php").php;break;case"vb":{let r=_("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return Ae.add(e),null}}catch{return Ae.add(e),null}return rn.set(e,n),n}var sn=new Map;function wr(e){let t=sn.get(e);if(t)return t;let n=vr(e);if(!n)return null;let r=Rr();if(!r)return null;let s=new r;try{s.setLanguage(n)}catch{return Ae.add(e),null}return sn.set(e,s),s}function Ar(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function be(e,t){let n=wr(e);if(!n)return null;try{return Ar(n,t)}catch{return null}}import{createRequire as jr}from"module";import{posix as ct}from"path";var tc=qt("vue-sfc-units"),Or=jr(import.meta.url),Mr;function $r(){return Mr??=Or("@vue/compiler-sfc")}function Br(...e){return $r().parse(...e)}function Vr(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function Wr(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function cn(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let s;try{s=Br(n,{filename:t})}catch(o){return r.errors.push(an(o)),r}r.errors.push(...s.errors.map(an));let{descriptor:i}=s;return i.template&&(r.template=je(e,t,"template",i.template)),i.script&&r.scripts.push(on(e,t,i.script,!1)),i.scriptSetup&&r.scripts.push(on(e,t,i.scriptSetup,!0)),r.styles=i.styles.map(o=>je(e,t,"style",o)),r.customBlocks=i.customBlocks.map(o=>je(e,t,"custom",o)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(o=>o?.errors??[])),r}function on(e,t,n,r){let s=je(e,t,"script",n);return{...s,kind:"script",setup:r,astLanguage:Wr(s.lang)}}function je(e,t,n,r){let s=Hr(r.attrs),i=typeof s.lang=="string"?s.lang:null,o=typeof s.src=="string"?s.src:typeof r.src=="string"?r.src:void 0;if(o){let c=Ur(t,o);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:o,attrs:s,lang:i,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${o}`]};let l=N(e,c),u=l?Math.max(0,l.split(`
5
- `).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:o,attrs:s,lang:i,body:l,startLine:0,endLine:u,errors:l?[]:[`Vue ${n} block source not found: ${c}`]}}let a=Math.max(0,r.loc.start.line-1);return{kind:n,ownerPath:t,sourcePath:t,external:!1,attrs:s,lang:i,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function Ur(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=Vr(ct.normalize(ct.join(ct.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function Hr(e){return{...e}}function an(e){return e instanceof Error?e.message:String(e)}function Ne(e,t,n){let s=cn(e,t,n).scripts.filter(o=>o.astLanguage&&o.body.length>0),i=s[0]?.astLanguage;return i?{body:s.map(o=>`${`
6
- `.repeat(o.startLine)}${o.body}`).join(`
7
- `),startLine:0,language:i}:null}var ln=ue("ast-trees",{clearGroups:["whole-project","source-file"]});function O(e,t){if(q(t))return zr(e,t);let n=z(t);if(!n)return null;let r=N(e,t);return r?ln.get(e,t,r,()=>be(n,r)):null}function Ie(e,t,n){if(q(t)){let i=Ne(e,t,n);if(!i)return null;let o=be(i.language,`
8
- `.repeat(i.startLine)+i.body);return o?{tree:o,language:i.language}:null}let r=z(t);if(!r)return null;let s=be(r,n);return s?{tree:s,language:r}:null}function zr(e,t){let n=N(e,t);return n?ln.get(e,t,n,()=>{let r=Ne(e,t,n);if(!r)return null;let s=`
9
- `.repeat(r.startLine)+r.body;return be(r.language,s)}):null}function _e(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var yn=["function_declaration","generator_function_declaration","method_definition","method_signature","function_signature"],qr=new Set(yn),Qr=[...yn,"variable_declarator","public_field_definition"],Jr=["function_item","function_signature_item"],Kr=["function_definition"],Xr=[],un=new Set(["arrow_function","function_expression","generator_function"]);function hn(e){return e==="rust"?Jr:e==="python"?Kr:e==="typescript"||e==="tsx"||e==="javascript"?Qr:Xr}function Oe(e,t){let n=Yr(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:mn(n.functionNode),params:pn(n.functionNode),paramsEndLine:dn(n.functionNode),isLiteralPassthrough:gn(n.functionNode,t)};if(!Gr(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(s=>s.type==="identifier"||s.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:mn(e),params:pn(e),paramsEndLine:dn(e),isLiteralPassthrough:gn(e,t)}:null}function Sn(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function pn(e){let t=Sn(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(_e(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let s=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),i=r.childForFieldName("pattern");if(!s&&i&&i.type==="identifier"){n.push({name:i.text,simple:!0});continue}let o=r.namedChildren.find(a=>a.type==="identifier");n.push({name:i?.type==="identifier"?i.text:o?.text??"",simple:!1})}return n}function dn(e){let t=Sn(e);return t?t.endPosition.row:e.startPosition.row}function Gr(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?qr.has(e):!1}function Yr(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let s=fn(r);return s?{name:n.text,definitionNode:e,functionNode:s}:null}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let s=fn(r);return s?{name:n.text,definitionNode:e,functionNode:s}:null}return null}function fn(e){if(un.has(e.type))return e;if(e.type!=="call_expression"||(e.childForFieldName("function")??e.namedChild(0))?.type!=="call_expression")return null;let r=((e.childForFieldName("arguments")??e.namedChildren.find(s=>s.type==="arguments"))?.namedChildren??[]).filter(s=>un.has(s.type));return r.length===1?r[0]:null}function mn(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return 0;let n=0;for(let r of t.namedChildren)_e(r)||(n+=1);return n}function gn(e,t){let n=e.namedChildren.find(p=>p.type==="block"||p.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(p=>!_e(p));if(r.length!==1)return!1;let s=r[0],i=null;if(s.type==="return_statement"||s.type==="expression_statement"?i=s.namedChild(0)??null:t==="rust"&&(s.type==="call_expression"||s.type==="macro_invocation")&&(i=s),!i)return!1;let o=t==="python"?"call":"call_expression";if(i.type!==o)return!1;let a=i.namedChildren.find(p=>p.type==="arguments"||p.type==="argument_list");if(!a)return!1;let c=a.namedChildren.filter(p=>!_e(p)),l=e.namedChildren.find(p=>p.type==="parameters"||p.type==="formal_parameters");if(!l)return!1;let u=[];for(let p of l.namedChildren){if(p.type==="identifier"){u.push(p.text);continue}let d=p.namedChildren.find(f=>f.type==="identifier");d&&u.push(d.text)}if(c.length!==u.length)return!1;for(let p=0;p<u.length;p+=1){let d=c[p];if(d.type!=="identifier"||d.text!==u[p])return!1}return!0}function fc(e,t){return e.filter(n=>n.startLine<=t&&n.endLine>=t).sort((n,r)=>n.endLine-n.startLine-(r.endLine-r.startLine)||n.startLine-r.startLine)[0]??null}function xn(e,t){let n=es(e,t);if(!n)return null;let r=ee(n);if(!r)return null;let s=ts(n);return{calleeLeaf:r,calleeQualifier:s?Zr(n):void 0,calleeText:n.text,memberAccess:s,line:e.startPosition.row}}function Zr(e){return(e.childForFieldName("object")??e.childForFieldName("value")??e.namedChild(0)??void 0)?.text||void 0}function es(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return e.childForFieldName("function")??e.namedChild(0);if(e.type==="new_expression")return e.childForFieldName("constructor")??e.namedChild(0)}return null}function ts(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function ee(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"private_property_identifier":case"shorthand_property_identifier":return e.text.replace(/^#/u,"");case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?ee(t):null}case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?ee(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?ee(t):null}case"super":case"self":case"this":return null;default:return null}}var ns=new Set(["identifier","type_identifier","field_identifier"]),rs=new Set(["identifier"]),ss=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),is=new Set(["rust","python"]),os=/\{([^{}]*)\}/g,as=/\b([A-Za-z_][\w]*)\b/g;function bn(e,t){return cs(t).has(e.type)}function Nn(e,t){return is.has(t)&&e.type==="string_content"}function lt(e){let t=0;for(let r of e.values()){let s=r[r.length-1];s!==void 0&&s>t&&(t=s)}let n=new Array(t+1);for(let r=0;r<=t;r+=1)n[r]=new Set;for(let[r,s]of e)for(let i of s)n[i].add(r);return n}function cs(e){return e==="rust"?ns:e==="python"?rs:ss}function In(e,t){let n=e.startPosition.row;for(let r of e.text.matchAll(os)){let s=r[1]??"";for(let i of s.matchAll(as))i[1]&&t(i[1],n)}}var ls=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],us=/^#!?\[\s*serde\s*\(/,ps=/^#!?\[\s*schemars\s*\(/,ds=/^#!?\[\s*validate\s*\(/,fs=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function _n(e,t,n){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let r=e.childForFieldName("function")??e.namedChild(0);if(!r)return;let s=ee(r);if(!s||!fs.has(s))return;let i=e.namedChildren.find(c=>c.type==="arguments");if(!i)return;let o=i.namedChild(0);if(!o||o.type!=="string")return;let a=o.namedChildren.find(c=>c.type==="string_fragment");a&&n.add(a.text)}function Cn(e,t){let n=us.test(e),r=ps.test(e),s=ds.test(e);if(!(!n&&!r&&!s))for(let i of ls){i.lastIndex=0;let o;for(;(o=i.exec(e))!==null;){let a=o[1],c=a.split("::").pop()??a;c==="is_none"&&/\bOption\b/.test(a)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(a)||c&&t.add(c)}}}function En(e,t){let n=new Map,r=(o,a)=>{if(o===a)return;let c=n.get(o);c||(c=new Set,n.set(o,c)),c.add(a)},s=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),i=(o,a)=>{let c=l=>{s.has(l.type)&&l.text!==a&&r(l.text,a);for(let u of l.children)c(u)};for(let l of o.children)c(l)};if(t==="rust")for(let o of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let a=o.namedChildren.find(l=>l.type==="type_identifier")?.text;if(!a)continue;let c=o.namedChildren.find(l=>l.type==="field_declaration_list"||l.type==="enum_variant_list"||l.type==="ordered_field_declaration_list");c&&i(c,a),o.type==="type_item"&&i(o,a)}else if(t==="python")for(let o of e.rootNode.descendantsOfType("class_definition")){let a=o.namedChildren.find(u=>u.type==="identifier")?.text;if(!a)continue;let c=o.childForFieldName("superclasses");c&&i(c,a);let l=o.namedChildren.find(u=>u.type==="block");if(l)for(let u of l.descendantsOfType("type"))for(let p of u.descendantsOfType("identifier"))p.text!==a&&r(p.text,a)}else for(let o of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let a=o.namedChildren.find(c=>c.type==="type_identifier")?.text;a&&i(o,a)}return n}var ms=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),ut=new Set(["catch","comment","def","defprotocol","defrecord","deftype","defmethod","defmacro","defmacro-","defn","defn-","do","doseq","dotimes","fn","for","if","let","loop","ns","quote","recur","throw","try","extend-protocol","extend-type","when","when-let","when-not"]);function kn(e){let t=[],n=[],r=[],s=new Map,i=[],o=0,a=0,c=(l,u)=>{let p=s.get(l);if(!p){s.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)};for(;a<e.length;){let l=e[a];if(l===`
10
- `){o+=1,a+=1;continue}if(/\s|,/.test(l)){a+=1;continue}if(l===";"){a=$e(e,a);continue}if(l==='"'){let S=Ee(e,a,o);o=S.line,a=S.index;continue}if(l==="("||l==="["||l==="{"){i.push({kind:l,startLine:o,endLine:o,headTokens:[],tokens:[],children:[]}),a+=1;continue}if(l===")"||l==="]"||l==="}"){let S=i.pop();S&&(S.endLine=o,gs(S,{callables:t,callSites:n,clojureMembers:r,recordIdentifier:c}),i[i.length-1]?.children.push(S)),a+=1;continue}if(pt(l)){a+=1;continue}let u=o,p=a;for(;a<e.length&&!dt(e[a]);)a+=1;let d=e.slice(p,a);if(!d)continue;let f={text:d,line:u};ys(i[i.length-1],f),c(T(d),u)}return{language:"clojure",callables:t,callSites:n,clojureMembers:r,typeContainerMap:new Map,identifierLineMap:s,identifiersByLine:Ns(s),fileIdentifiers:new Set(s.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function gs(e,t){if(e.kind!=="("||e.headTokens.length===0)return;let n=e.headTokens[0],r=T(n.text),s=ms.get(n.text);if(s){let o=e.headTokens[1];if(o){let a=T(o.text);t.recordIdentifier(a,o.line),t.callables.push({name:a,startLine:e.startLine,endLine:e.endLine,paramCount:0,params:[],paramsEndLine:o.line,isLiteralPassthrough:!1,clojureKind:s})}}if(hs(e,t),!r||ut.has(n.text)||ut.has(r)||r.startsWith(":"))return;let i=bs(n.text);t.callSites.push({calleeLeaf:i.leaf,calleeQualifier:i.qualifier,calleeText:i.text,memberAccess:!1,line:n.line})}function ys(e,t){e&&(e.headTokens.length<2&&e.headTokens.push(t),e.tokens.length<200&&e.tokens.push(t))}function hs(e,t){let n=T(e.tokens[0]?.text??"");if(n==="defprotocol"){let r=T(e.tokens[1]?.text??"");if(!r)return;for(let s of Me(e))Ce(t,r,"protocol",s,"protocol-method");return}if(n==="defrecord"||n==="deftype"){let r=T(e.tokens[1]?.text??"");if(!r)return;let s=n==="defrecord"?"record":"type",i=n==="defrecord"?"record-method":"type-method";for(let o of Me(e))Ce(t,r,s,o,i);return}if(n==="extend-type"){let r=T(e.tokens[1]?.text??"");if(!r)return;for(let s of Me(e))Ce(t,r,"extension",s,"extension-method");return}if(n==="extend-protocol"){let r=T(e.tokens[1]?.text??"");for(let s of Me(e)){r&&Ce(t,r,"extension",s,"extension-method");let i=xs(e,s.startLine);i&&i!==r&&Ce(t,i,"extension",s,"extension-method")}}}function Me(e){return e.children.filter(Ss)}function Ss(e){if(e.kind!=="(")return!1;let t=T(e.tokens[0]?.text??"");return!!(t&&!ut.has(t)&&!t.startsWith(":"))}function Ce(e,t,n,r,s){let i=r.tokens[0],o=T(i?.text??"");!i||!o||(e.recordIdentifier(o,i.line),e.clojureMembers.push({ownerName:t,ownerKind:n,memberName:o,memberKind:s,startLine:r.startLine,endLine:r.endLine}))}function xs(e,t){let n=null;for(let r=2;r<e.tokens.length;r+=1){let s=e.tokens[r];if(s.line>t)break;let i=T(s.text);i&&!i.startsWith(":")&&(n=i)}return n}function T(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function bs(e){let t=e.replace(/^#?['`~@]+/,""),n=t.lastIndexOf("/"),r=T(t);if(n<=0)return{leaf:r,text:t};let s=t.slice(0,n);return{leaf:r,qualifier:s,text:t}}function $e(e,t){let n=t;for(;n<e.length&&e[n]!==`
11
- `;)n+=1;return n}function Ee(e,t,n){let r=t+1,s=n;for(;r<e.length;){let i=e[r];if(i==="\\"){r+=2;continue}if(i===`
12
- `&&(s+=1),r+=1,i==='"')break}return{index:r,line:s}}function pt(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function dt(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function Ns(e){let t=[];for(let[n,r]of e)for(let s of r)t[s]??=new Set,t[s].add(n);return t}var Pn=6,Is=ue("source-facts",{clearGroups:["whole-project","source-file"]}),ft=Y({kind:"source-facts",invalidation:Z("source-facts"),serialize:Es,deserialize:ks});function de(e,t){return mt(e,t).facts}function mt(e,t){let n=N(e,t);if(!n)return{facts:null};let r=_s(e,t,n);return r?Is.get(e,t,n,()=>Cs(e,t,r,n)):{facts:null}}function _s(e,t,n){return q(t)?Ne(e,t,n)?.language??null:z(t)}function Cs(e,t,n,r){let s=U(e,t,r),i=ft.read(e,t,s);if(i&&i.language===n)return{facts:i};if(n==="clojure"){let c=kn(r);return ft.write(e,t,s,c),{facts:c}}let o=O(e,t);if(!o)return{facts:null,unavailable:{language:n,reason:"parser-unavailable"}};let a=Ps(o,n);return ft.write(e,t,s,a),{facts:a}}function Es(e){let t={version:Pn,language:e.language,callables:e.callables,callSites:e.callSites,clojureMembers:e.clojureMembers,typeContainerMap:[...e.typeContainerMap.entries()].map(([n,r])=>[n,[...r]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function ks(e){try{let t=JSON.parse(e);if(t.version!==Pn||t.language==="clojure"&&(t.clojureMembers===void 0||t.callSites.some(r=>r.calleeText===void 0)))return null;let n=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,clojureMembers:t.clojureMembers??[],typeContainerMap:new Map(t.typeContainerMap.map(([r,s])=>[r,new Set(s)])),identifierLineMap:n,identifiersByLine:lt(n),fileIdentifiers:new Set(n.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function Ps(e,t){let n=[],r=[],s=new Set,i=new Set,o=new Map,a=(l,u)=>{let p=o.get(l);if(!p){o.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)},c=l=>{let u=Oe(l,t);u&&n.push(u);let p=xn(l,t);p&&r.push(p),_n(l,t,i),t==="rust"&&(l.type==="attribute_item"||l.type==="inner_attribute_item")&&Cn(l.text,s),bn(l,t)&&a(l.text,l.startPosition.row),Nn(l,t)&&In(l,a);for(let d of l.children)c(d)};return c(e.rootNode),{language:t,callables:n,callSites:r,clojureMembers:[],typeContainerMap:En(e,t),identifierLineMap:o,identifiersByLine:lt(o),fileIdentifiers:new Set(o.keys()),rustAttrReferencedNames:s,crossLanguageDispatchNames:i}}function gt(e,t){t(e);for(let n of e.namedChildren)gt(n,t)}function Ls(e,t,n){let r=null;return gt(e,s=>{!/(?:function|method|lambda)/u.test(s.type)&&s.type!=="arrow_function"||s.startPosition.row>t||s.endPosition.row<n||(!r||s.endIndex-s.startIndex<r.endIndex-r.startIndex)&&(r=s)}),r}function Ln(e,t,n){if(e.startPosition.row>t||e.endPosition.row<n)return null;for(let r of e.namedChildren){let s=Ln(r,t,n);if(s)return s}return e}function Ts(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function yt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?yt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function Fs(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(yt)??[]}var Tn=new Set(["rust","typescript","tsx","javascript","python","clojure"]),Ds=new Set(["rust","typescript","tsx","javascript","python"]);function ht(e,t){let n=de(e,t);return!n||!Tn.has(n.language)?null:n.callables.map(r=>({name:r.name,startLine:r.startLine,endLine:r.endLine}))}function Rs(e,t){if(!Ds.has(t))return null;let n=[];for(let r of e.descendantsOfType([...hn(t)])){let s=Oe(r,t);s&&n.push({name:s.name,startLine:s.startLine,endLine:s.endLine})}return n}function vs(e,t){let n=de(e,t);return!n||!Tn.has(n.language)?null:n.callSites}function Fn(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}import{createRequire as Hs}from"module";import{existsSync as re}from"fs";import{basename as Rn,dirname as k,extname as M,join as F,relative as te,resolve as h,sep as zs}from"path";import{existsSync as xt,readdirSync as ws,statSync as As}from"fs";import{join as fe,relative as js}from"path";function Dn(e){let t=Os(e)??Vs(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let s of t)for(let i of Ws(e,s)){if(r.has(i))continue;r.add(i);let o=Us(e,i);o&&n.push(o)}return n}function Os(e){let t=fe(e,"pnpm-workspace.yaml");if(!xt(t))return null;try{return Ms(Te(t,"pnpm workspace manifest"))}catch{return null}}function Ms(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let s=$s(r);if(!n){/^packages\s*:\s*$/.test(s.trim())&&(n=!0);continue}let i=/^\s+-\s*(.+)$/.exec(s);if(i){let o=Bs(i[1].trim());o&&t.push(o);continue}if(s.trim()!=="")break}return t}function $s(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function Bs(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function Vs(e){let t=fe(e,"package.json");if(!xt(t))return null;try{let n=JSON.parse(Te(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function Ws(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let o=fe(e,t);return St(o)?[o]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),s=t.slice(n+1).replace(/^\//,""),i=fe(e,r||".");return St(i)?ws(i).map(o=>fe(i,o,s)).filter(St):[]}function St(e){try{return As(e).isDirectory()}catch{return!1}}function Us(e,t){let n=fe(t,"package.json");if(!xt(n))return null;try{let r=JSON.parse(Te(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:js(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var qs=le("indexed-paths",{clearGroups:[]}),Qs=le("indexed-path-digest",{clearGroups:[]}),Js=b("tsconfig-alias-config",{clearGroups:["whole-project"]}),Ks=b("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),Xs=Hs(import.meta.url),ke;function Gs(){if(ke!==void 0)return ke;try{ke=Xs("typescript")}catch{ke=null}return ke}var Ys=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],Zs=le("workspace-packages",{clearGroups:["whole-project"]}),ne=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],Be=[".py",".pyi"],P=[".java",".scala",".kt",".kts"],Ve=[".rs"],We=[".rb"],Ue=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Q=[".cs",".vb"],He=[".dart"],se=[".php"],me=[".clj",".cljs",".cljc"],ei=new Set(ne),bt=new Set(Be),vn=new Set(P),Nt=new Set(Ve),It=new Set(We),wn=new Set(Ue),An=new Set(Q),_t=new Set(He),jn=new Set(se),On=new Set(me),ti=[{extensions:ne,lookup:ei},{extensions:Be,lookup:bt},{extensions:P,lookup:vn},{extensions:Ve,lookup:Nt},{extensions:We,lookup:It},{extensions:Ue,lookup:wn},{extensions:Q,lookup:An},{extensions:He,lookup:_t},{extensions:se,lookup:jn},{extensions:me,lookup:On}];function $(e,t){return t.has(M(e).toLowerCase())}function ni(e){return $(e,bt)}function ri(e){return $(e,vn)}function si(e){return $(e,Nt)}function ii(e){return $(e,It)}function oi(e){return $(e,wn)}function ai(e){return $(e,An)}function Mn(e){return M(e).toLowerCase()===".vb"}function ci(e){return $(e,_t)}function li(e){return $(e,jn)}function ui(e){return $(e,On)}function Ct(e){let t=M(e).toLowerCase();for(let n of ti)if(n.lookup.has(t))return n.extensions;return ne}function pi(e){return ri(e)||ai(e)||li(e)}function J(e,t,n){return ni(t)?ge(e,t,n):si(t)?B(e,t,n):ii(t)?ze(e,t,n):oi(t)?qe(e,t,n):pi(t)?g(e,n.replace(/\\/g,"."),Ct(t)):ci(t)?Qe(e,t,n):ui(t)?Et(e,n):di(e,t,n)}function di(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return fi(e,t,n)??gi(e,n);let r=k(F(e.config.projectRoot,t)),s=h(r,n),i=V(e);for(let o of Pt(s)){let a=x(te(e.config.projectRoot,o));if(i.has(a)||re(o))return a}return x(te(e.config.projectRoot,s))}function fi(e,t,n){let r=Ni(e,t);if(!r)return null;let s=V(e);for(let i of mi(r,n)){let o=h(r.baseUrl,i);for(let a of Pt(o)){let c=x(te(e.config.projectRoot,a));if(s.has(c)||re(a))return c}}return null}function mi(e,t){let n=[];for(let[r,s]of Object.entries(e.paths)){let i=r.indexOf("*");if(i===-1){if(t!==r)continue;n.push(...s);continue}let o=r.slice(0,i),a=r.slice(i+1);if(!t.startsWith(o)||!t.endsWith(a)||t.length<o.length+a.length)continue;let c=t.slice(o.length,t.length-a.length);for(let l of s)n.push(l.includes("*")?l.replace("*",c):l)}return n}function gi(e,t){let n=hi(yi(e),t);if(!n)return null;let r=V(e);for(let s of Si(n)){let i=h(e.config.projectRoot,n.pkg.relativeDir,s);for(let o of Pt(i)){let a=x(te(e.config.projectRoot,o));if(r.has(a)||re(o))return a}}return null}function yi(e){return Zs.get(e,()=>Dn(e.config.projectRoot))}function hi(e,t){let n=null;for(let r of e){let s=null;t===r.name?s="":t.startsWith(`${r.name}/`)&&(s=t.slice(r.name.length+1)),s!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:s})}return n}function Si(e){let t=[],n=xi(e.pkg.exports,e.subpath);if(n){let r=bi(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function xi(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return $n(e[n])}function $n(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return null;let t=e;for(let n of["types","import","default","require","node"]){let r=$n(t[n]);if(r)return r}return null}function bi(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function Ni(e,t){let n=x(k(t));return Ks.get(e,n,()=>Ii(e,n))}function Ii(e,t){let n=Gs();if(!n)return null;let r=h(e.config.projectRoot),s=h(r,t);for(;s===r||s.startsWith(r+zs);){for(let o of Ys){let a=F(s,o);if(!re(a))continue;let c=Js.get(e,a,()=>_i(n,a));if(c)return c}let i=k(s);if(i===s)break;s=i}return null}function _i(e,t){try{let n=e.readConfigFile(t,e.sys.readFile);if(n.error||!n.config)return null;let r=e.parseJsonConfigFileContent(n.config,e.sys,k(t)),s=r.options.paths;return!s||Object.keys(s).length===0?null:{baseUrl:r.options.baseUrl?h(k(t),r.options.baseUrl):k(t),paths:s}}catch{return null}}function ge(e,t,n){let r=V(e),s;if(n.startsWith(".")){let i=n.match(/^(\.+)(.*)$/);if(!i)return null;let o=i[1].length,a=i[2].replace(/^\./,""),c=k(F(e.config.projectRoot,t));for(let l=1;l<o;l++)c=k(c);s=a?h(c,a.replace(/\./g,"/")):c}else s=h(e.config.projectRoot,n.replace(/\./g,"/"));for(let i of Ci(s)){let o=x(te(e.config.projectRoot,i));if(r.has(o)||re(i))return o}return null}function B(e,t,n){if(!n)return null;let r=n.replace(/\s+as\s+.+$/,"").trim();if(!r.startsWith("crate::")&&!r.startsWith("self::")&&!r.startsWith("super::"))return null;let s=k(F(e.config.projectRoot,t)),i;return r.startsWith("crate::")?i=h(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?i=h(s,r.slice(6).replace(/::/g,"/")):i=h(k(s),r.slice(7).replace(/::/g,"/")),kt(e,Ei(i))}function ze(e,t,n){let r=k(F(e.config.projectRoot,t)),s=h(r,n);return kt(e,ki(s))}function qe(e,t,n){let r=k(F(e.config.projectRoot,t)),s=[h(r,n),h(e.config.projectRoot,n),h(e.config.projectRoot,"include",n),h(e.config.projectRoot,"src",n)];return kt(e,s)}function g(e,t,n){let r=V(e),s=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),i=s.replace(/\./g,"/"),o=s.split(".").pop()??s;for(let c of n){let l=`${i}${c}`,u=[...r].find(p=>p.endsWith(l));if(u)return u}for(let c of n){let l=[...r].find(u=>Rn(u)===`${o}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(M(c).toLowerCase())).filter(c=>c.includes(`/${i}/`)||c.includes(`/${o}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function Qe(e,t,n){let r=V(e);if(n.startsWith("package:")){let o=n.slice(8),a=o.indexOf("/");if(a<0)return null;let c=o.slice(a+1),l=x(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let s=k(F(e.config.projectRoot,t)),i=h(s,n);for(let o of Pi(i)){let a=x(te(e.config.projectRoot,o));if(r.has(a)||re(o))return a}return null}function Et(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=V(e);for(let s of me){let i=`${n}${s}`,o=[...r].find(a=>a.endsWith(i));if(o)return o}for(let s of me){let i=[...r].find(o=>Rn(o)===`${n.split("/").pop()}${s}`);if(i)return i}return null}function Ci(e){let t=M(e);return bt.has(t)?[e]:[`${e}.py`,`${e}.pyi`,F(e,"__init__.py"),F(e,"__init__.pyi")]}function kt(e,t){let n=V(e);for(let r of t){let s=x(te(e.config.projectRoot,r));if(n.has(s)||re(r))return s}return null}function Ei(e){let t=M(e);return Nt.has(t)?[e]:[`${e}.rs`,F(e,"mod.rs")]}function ki(e){let t=M(e);return It.has(t)?[e]:[`${e}.rb`,F(e,"index.rb")]}function Pi(e){let t=M(e);return _t.has(t)?[e]:[`${e}.dart`,e]}function Pt(e){let t=M(e),n=new Set;if(t){n.add(e);for(let r of ne)n.add(e.slice(0,-t.length)+r)}else for(let r of ne)n.add(`${e}${r}`),n.add(F(e,`index${r}`));return[...n]}function V(e){return qs.get(e,()=>new Set(xe(e,{includeIgnored:!1}).map(x)))}function Lt(e){return Qs.get(e,()=>Qt([...V(e)].sort().join(`
13
- `)))}function Li(e,t,n={}){let r=de(e,t);if(!r)return[];let s=[];if(n.includeCrossLanguageDispatchNames)for(let i of r.crossLanguageDispatchNames)s.push({name:i,kind:"cross-language-dispatch",occurrences:1});if(n.includeRustAttributeNames&&r.language==="rust")for(let i of r.rustAttrReferencedNames)s.push({name:i,kind:"rust-attribute",occurrences:1});return s}import{basename as Bn}from"path";function A(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ti(e){return e.replace(/'''[\s\S]*?'''/g,K).replace(/"""[\s\S]*?"""/g,K).replace(/#.*$/gm,K).replace(/\/\/.*$/gm,K).replace(/\/\*[\s\S]*?\*\//g,K).replace(/`(?:\\[\s\S]|[^`])*`/g,K).replace(/'(?:\\.|[^'\\\r\n])*'/g,K).replace(/"(?:\\.|[^"\\\r\n])*"/g,K)}function K(e){return e.replace(/[^\r\n]/g," ")}var Sl=ue("stripped-lines",{clearGroups:["whole-project","source-file"]});zt({name:"stripped-source-singleton",groups:["whole-project","source-file"],clearAll:()=>{Je=null,Pe=""},clearFile:()=>{Je=null,Pe=""}});var Je=null,Pe="";function Fi(e){return Je===e||(Je=e,Pe=Ti(e)),Pe}function X(e,t,n){let r=Fi(e);return`${r.slice(0,t)}${" ".repeat(n-t)}${r.slice(n)}`}function C(e,t){return new RegExp(`\\b${A(t)}\\b`,"m").test(e)}function ye(e,t){let n=new Set,r=new RegExp(`\\b${A(t)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let s of e.matchAll(r)){let i=s[1];i&&n.add(i)}return[...n]}function Tt(e){let t=0;for(let n of e)n==="("&&(t+=1),n===")"&&(t-=1);return t}var Di=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function E(e){let t=[],n=0,r=0;for(let s=0;s<e.length;s++){let i=e[s];(i==="{"||i==="["||i==="(")&&n++,(i==="}"||i==="]"||i===")")&&n--,i===","&&n===0&&(t.push(e.slice(r,s)),r=s+1)}return t.push(e.slice(r)),t}function L(e,t){for(let n of e.namedChildren)if(n.type===t)return n;return null}function y(e,t){let n=new Set,r=(s,i)=>{let o=i||t.has(s.type);!o&&Di.has(s.type)&&n.add(s.text);for(let a of s.children)r(a,o)};return r(e.rootNode,!1),n}function w(e,t,n,r,s,i,o){return{importedName:s,localName:i,sourcePath:o??g(e,r,Ct(t)),kind:"named",used:C(n,i),usedMembers:[]}}function m(e,t,n,r,s="named",i={}){return{importedName:e,localName:t,sourcePath:n,kind:s,used:r.has(t),usedMembers:[],isTypeOnly:i.isTypeOnly}}function W(e,t,n,r,s="named",i=[],o={}){return{importedName:e,localName:t,sourcePath:n,kind:s,used:r,usedMembers:i,isTypeOnly:o.isTypeOnly}}function ie(e,t){return{importedName:e,localName:null,sourcePath:t,kind:"side-effect",used:!0,usedMembers:[]}}function oe(e,t,n={}){return{importedName:e,localName:n.localName??null,sourcePath:t,kind:"namespace",used:n.used??!0,usedMembers:n.usedMembers??[],isTypeOnly:n.isTypeOnly}}function D(e,t,n){let r=[];for(let s of e.matchAll(t)){let i=s[0];if(!i||typeof s.index!="number")continue;let o=X(e,s.index,s.index+i.length);for(let a of n(s,o))r.push(a)}return r}function R(e,t,n,r,s){let i=Ie(e,t,s)?.tree??null;if(i){let o=n(i);if(o)return o}return r()}function Ke(e,t,n,r,s){let i=Ie(e,t,s)?.tree??null,o=z(t),a=o?n[o]:void 0;return i&&a?a(i):r()}function Vn(e,t,n){return R(e,t,r=>vi(e,t,r),()=>Ri(e,t,n),n)}function Ri(e,t,n){return D(n,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(r,s)=>{let i=r[1]?.trim();if(!i)return[];let o=Bn(i).replace(/\.[^.]+$/,"");return[W(i,o,qe(e,t,i),C(s,o))]})}function vi(e,t,n){let r=y(n,new Set(["preproc_include"])),s=[];for(let i of n.rootNode.descendantsOfType("preproc_include")){let o=null;for(let c of i.namedChildren){if(c.type==="system_lib_string"){o=c.text.replace(/^<|>$/g,"");break}if(c.type==="string_literal"){o=c.namedChildren.find(u=>u.type==="string_content")?.text??c.text.replace(/^"|"$/g,"");break}}if(!o)continue;let a=Bn(o).replace(/\.[^.]+$/,"");s.push(m(o,a,qe(e,t,o),r))}return s}var wi=new Set([":require",":require-macros",":use"]),Rt=String.raw`A-Za-z0-9_$*+!?.<>=-`;function Un(e,t,n){let r=zi(n);if(!r)return[];let s=Hi(n,r.start,r.end),i=[];for(let o of r.children.slice(2)){if(o.type!=="list"||o.children.length===0)continue;let a=v(o.children[0]);if(a){if(wi.has(a)){for(let c of Oi(o.children.slice(1)))i.push(...ji(e,c,s));continue}if(a===":import")for(let c of $i(o.children.slice(1)))i.push(c)}}return i}function Ai(e){return e.type==="list"&&v(e.children[0])==="ns"}function ji(e,t,n){let r=Et(e,t.namespace),s=t.alias??t.namespace,i=Vi(n,s),o=[{importedName:t.namespace,localName:s,sourcePath:r,kind:"namespace",used:t.refers.length>0||t.referAll||i.length>0||Wi(n,t.namespace),usedMembers:i}];t.referAll&&o.push({importedName:"*",localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]});for(let a of t.refers)o.push({importedName:a,localName:a,sourcePath:r,kind:"named",used:Ui(n,a),usedMembers:[]});return o}function Oi(e){return e.flatMap(t=>Xe(t,null))}function Xe(e,t){if(e.type==="atom")return e.text.startsWith(":")?[]:[{namespace:Dt(t,e.text),alias:null,refers:[],referAll:!1}];if(e.type==="vector")return e.children.length>0&&v(e.children[0])===null?e.children.flatMap(n=>Xe(n,t)):Mi(e,t);if(e.type==="list"&&e.children.length>0){let n=v(e.children[0]);return n?!n||n.startsWith(":")?[]:e.children.slice(1).flatMap(r=>Xe(r,Dt(t,n))):e.children.flatMap(r=>Xe(r,t))}return[]}function Mi(e,t){let n=v(e.children[0]);if(!n||n.startsWith(":"))return[];let r={namespace:Dt(t,n),alias:null,refers:[],referAll:!1};for(let s=1;s<e.children.length;s+=1){let i=v(e.children[s]);if(!i?.startsWith(":"))continue;let o=e.children[s+1];if((i===":as"||i===":as-alias")&&o){r.alias=v(o),s+=1;continue}i===":refer"&&o&&(v(o)===":all"?r.referAll=!0:(o.type==="vector"||o.type==="list")&&r.refers.push(...o.children.map(v).filter(Bi)),s+=1)}return[r]}function $i(e){let t=[];for(let n of e){if(n.type==="atom"){let s=n.text.split(".").pop()??n.text;t.push(W(s,s,null,!0));continue}if(n.type!=="vector")continue;let r=v(n.children[0]);if(r)for(let s of n.children.slice(1)){let i=v(s);i&&t.push(W(`${r}.${i}`,i,null,!0))}}return t}function Dt(e,t){return e?`${e}.${t}`:t}function v(e){return e?.type==="atom"?e.text:null}function Bi(e){return!!(e&&!e.startsWith(":"))}function Vi(e,t){let n=new Set,r=new RegExp(`${vt()}${A(t)}\\s*/\\s*([${Rt}]+)`,"g");for(let s of e.matchAll(r)){let i=s[1];i&&n.add(i)}return[...n]}function Wi(e,t){return new RegExp(`${vt()}${A(t)}\\s*/`,"m").test(e)}function Ui(e,t){return new RegExp(`${vt()}${A(t)}(?![${Rt}])`,"m").test(e)}function vt(){return`(?<![${Rt}])`}function Hi(e,t,n){let r="",s=0;for(;s<e.length;){if(s>=t&&s<n){r+=e[s]===`
14
- `?`
15
- `:" ",s+=1;continue}let i=e[s];if(i===";"){let o=$e(e,s);r+=Wn(e.slice(s,o)),s=o;continue}if(i==='"'){let o=Ee(e,s,0).index;r+=Wn(e.slice(s,o)),s=o;continue}r+=i,s+=1}return r}function zi(e){let t=0;for(;t<e.length&&(t=wt(e,t),!(t>=e.length));){let n=Ge(e,t);if(!n){t+=1;continue}if(Ai(n.form))return n.form;t=n.index}return null}function Ge(e,t){let n=wt(e,t);if(e.startsWith("#?@",n)||e.startsWith("#?",n))return qi(e,n);if(e.startsWith("#_",n)){let s=Ge(e,n+2);return s?{form:{type:"atom",text:"",start:n,end:s.index},index:s.index}:null}for(;pt(e[n]);)n+=1;let r=e[n];return r?r==="("?Ft(e,n,"list",")"):r==="["?Ft(e,n,"vector","]"):r==="{"?Ft(e,n,"map","}"):r==='"'?{form:{type:"atom",text:"",start:n,end:Ee(e,n,0).index},index:Ee(e,n,0).index}:Ji(e,n):null}function qi(e,t){let n=e.startsWith("#?@",t)?3:2,r=Ge(e,t+n);return r?{form:{type:"list",children:r.form.type==="list"||r.form.type==="vector"||r.form.type==="map"?Qi(r.form.children):[],start:t,end:r.index},index:r.index}:null}function Qi(e){let t=[];for(let n=0;n<e.length;n+=2){let r=v(e[n]),s=e[n+1];r?.startsWith(":")&&s&&t.push(s)}return t}function Ft(e,t,n,r){let s=[],i=t+1;for(;i<e.length;){if(i=wt(e,i),e[i]===r)return{form:{type:n,children:s,start:t,end:i+1},index:i+1};let o=Ge(e,i);if(!o){i+=1;continue}o.form.type==="atom"&&o.form.text===""||s.push(o.form),i=o.index}return{form:{type:n,children:s,start:t,end:e.length},index:e.length}}function Ji(e,t){let n=t;for(;n<e.length&&!dt(e[n]);)n+=1;return{form:{type:"atom",text:e.slice(t,n),start:t,end:n},index:n}}function wt(e,t){let n=t;for(;n<e.length;){let r=e[n];if(/\s|,/.test(r)){n+=1;continue}if(r===";"){n=$e(e,n);continue}break}return n}function Wn(e){return e.replace(/[^\r\n]/g," ")}function Hn(e,t,n){let r=[];for(let s of n.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let i=s[1]?.trim(),o=s[2]?.trim()??null,a=s[0];if(!i||!a||typeof s.index!="number")continue;let c=X(n,s.index,s.index+a.length);r.push({importedName:i,localName:o,sourcePath:Qe(e,t,i),kind:o?"namespace":"side-effect",used:o?C(c,o):!0,usedMembers:o?ye(c,o):[]})}return r}function zn(e,t,n){let r=[];for(let s of n.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let i=s[1]?.trim();i&&r.push({specifier:i,sourcePath:Qe(e,t,i)})}return r}function qn(e,t,n){return Ke(e,t,{csharp:r=>Xi(e,t,r),vb:r=>Ki(e,t,r)},()=>{let r=Mn(t)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return D(n,r,(s,i)=>{let o=s[1]?.trim();if(!o)return[];let[a,c]=o.split(/\s*=\s*/),l=!!c,u=(l?c:a)?.trim()??o,p=u.split(".").pop()??u,d=l?a?.trim()??p:p;return[w(e,t,i,u,p,d,g(e,u,Q))]})},n)}function Ki(e,t,n){let r=y(n,new Set(["imports_statement"])),s=[];for(let i of n.rootNode.descendantsOfType("imports_statement")){let o=i.namedChildren.filter(d=>d.type==="namespace_name");if(o.length===0)continue;let a=o[o.length-1],c=o.length>1?o[0]:null,l=a.text,u=l.split(".").pop()??l,p=c?.text??u;s.push(m(u,p,g(e,l,Q),r,c?"namespace":"named"))}return s}function Xi(e,t,n){let r=y(n,new Set(["using_directive"])),s=[];for(let i of n.rootNode.descendantsOfType("using_directive")){let o=i.namedChildren;if(o.length===0)continue;let a=null,c;o.length>=2&&o[0].type==="identifier"&&(o[1].type==="qualified_name"||o[1].type==="identifier")?(a=o[0],c=o[1]):c=o[o.length-1];let l=c.text,u=l.split(".").pop()??l,p=a?.text??u;s.push(m(u,p,g(e,l,Q),r,a?"namespace":"named"))}return s}var Gi=b("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function Qn(e,t){return Gi.get(e,t,()=>{let n=new Set,r=N(e,t);if(!r)return n;let i=r.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,o=>o.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,o=>o.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,o=>o.replace(/[^\r\n]/g," "));for(let o of i.matchAll(/[A-Za-z_$][\w$]*/g))n.add(o[0]);return n})}function At(e,t,n){return R(e,t,r=>Zi(e,t,r),()=>Yi(e,t,n),n)}function Yi(e,t,n){return uo(n).flatMap(r=>po(e,t,r.clause,r.specifier,r.start,r.end,n))}function Zi(e,t,n){let r=eo(e,t,n),s=[];for(let i of n.rootNode.descendantsOfType("import_statement"))s.push(...to(e,t,n,i,r));return s}function eo(e,t,n){let r=y(n,new Set(["import_statement"]));if(q(t))for(let s of Qn(e,t))r.add(s);return r}function to(e,t,n,r,s){let i=oo(r);if(!i)return[];let o=J(e,t,i),a=L(r,"import_clause");return a?no(n,a,o,s,ao(r.text)):[ie("*",o)]}function no(e,t,n,r,s){let i=[];for(let o of t.namedChildren)if(o.type==="identifier")i.push(ro(o.text,n,r,s));else if(o.type==="namespace_import"){let a=so(e,o,n,r,s);a&&i.push(a)}else o.type==="named_imports"&&i.push(...io(o,n,r,s));return i}function ro(e,t,n,r){return m("default",e,t,n,"default",{isTypeOnly:r})}function so(e,t,n,r,s){let o=L(t,"identifier")?.text??"";if(!o)return null;let a=lo(e,o);return oe("*",n,{localName:o,usedMembers:a,isTypeOnly:s,used:a.length>0||r.has(o)})}function io(e,t,n,r){let s=[];for(let i of e.namedChildren){if(i.type!=="import_specifier")continue;let o=i.namedChild(0),a=i.namedChild(1);if(!o)continue;let c=o.text,l=a?.text??c;s.push(m(c,l,t,n,"named",{isTypeOnly:r||co(i.text)}))}return s}function oo(e){let t=L(e,"string");if(!t)return null;let n=L(t,"string_fragment");return n?n.text:null}function ao(e){return/^\s*import\s+type\b/.test(e)}function co(e){return/^\s*type\b/.test(e.trim())}function lo(e,t){let n=new Set;for(let r of e.rootNode.descendantsOfType("member_expression")){let s=r.namedChild(0),i=r.namedChild(1);!s||!i||s.type!=="identifier"||s.text!==t||(i.type==="property_identifier"||i.type==="identifier")&&n.add(i.text)}return[...n]}function uo(e){let t=[],n=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(n)){let i=s[0],o=s[1],a=s[2];!i||!a||typeof s.index!="number"||t.push({clause:o,specifier:a,start:s.index,end:s.index+i.length})}let r=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(r)){let i=s[0],o=s[1];!i||!o||typeof s.index!="number"||t.push({clause:null,specifier:o,start:s.index,end:s.index+i.length})}return t.sort((s,i)=>s.start-i.start)}function po(e,t,n,r,s,i,o){let a=J(e,t,r),c=X(o,s,i);return n?fo(n).map(u=>({...u,sourcePath:a})).map(u=>{if(u.kind==="namespace"){let p=ye(c,u.localName);return oe(u.importedName,u.sourcePath,{localName:u.localName,usedMembers:p,used:p.length>0||C(c,u.localName),isTypeOnly:u.isTypeOnly})}return u.kind==="side-effect"?ie(u.importedName,u.sourcePath):W(u.importedName,u.localName??"",u.sourcePath,u.localName?C(c,u.localName):!1,u.kind,[],{isTypeOnly:u.isTypeOnly})}):[ie("*",a)]}function fo(e){let t=e.trim(),n=/^type\b/.test(t),r=t.replace(/^type\s+/,""),[s,i]=mo(r),o=[];return s&&o.push(...Jn(s,n)),i&&o.push(...Jn(i,n)),o}function Jn(e,t){let n=e.trim();if(!n)return[];if(n.startsWith("{")){let r=n.slice(1,-1).trim();return r?E(r).map(s=>{let i=s.trim(),o=t||/^type\b/.test(i),a=i.replace(/^type\s+/,""),[c,l]=a.split(/\s+as\s+/);return{importedName:c.trim(),localName:(l??c).trim(),kind:"named",isTypeOnly:o}}):[]}return n.startsWith("* as ")?[{importedName:"*",localName:n.slice(5).trim(),kind:"namespace",isTypeOnly:t}]:[{importedName:"default",localName:n,kind:"default",isTypeOnly:t}]}function mo(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==="{"&&t++,r==="}"&&t--,r===","&&t===0)return[e.slice(0,n).trim(),e.slice(n+1).trim()]}return[e.trim(),null]}function jt(e,t,n){let r=O(e,t);return r?bo(e,t,r):go(e,t,n)}function go(e,t,n){return[...yo(e,t,n),...ho(e,t,n),...So(e,t,n)]}function yo(e,t,n){let r=[],s=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of n.matchAll(s)){if(typeof i.index!="number")continue;let o=i[1]??"",a=i[2]??"",c=E(o).map(p=>xo(p.trim())).filter(p=>!!p),l=he(n,i.index),u=he(n,i.index+i[0].length-1);r.push({kind:"named",sourcePath:J(e,t,a),names:c,startLine:l,endLine:u})}return r}function ho(e,t,n){let r=[],s=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of n.matchAll(s)){if(typeof i.index!="number")continue;let o=i[2]??"",a=he(n,i.index),c=he(n,i.index+i[0].length-1);r.push({kind:"star-as",sourcePath:J(e,t,o),names:i[1]?[i[1]]:[],startLine:a,endLine:c})}return r}function So(e,t,n){let r=[],s=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of n.matchAll(s)){if(typeof i.index!="number")continue;let o=i[1]??"",a=he(n,i.index),c=he(n,i.index+i[0].length-1);r.push({kind:"star",sourcePath:J(e,t,o),names:[],startLine:a,endLine:c})}return r}function xo(e){if(!e)return null;let t=e.replace(/^type\s+/,"").trim();if(!t)return null;let n=t.match(/^(\w+)\s+as\s+(\w+)$/);if(n)return n[2]??null;let r=t.match(/^(\w+)$/);return r?r[1]??null:null}function he(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)e.charCodeAt(r)===10&&n++;return n}function bo(e,t,n){let r=[];for(let s of n.rootNode.descendantsOfType("export_statement")){let i=No(e,t,s);if(i===void 0)continue;let o=s.startPosition.row,a=s.endPosition.row,c=Io(s,i,o,a);r.push(c)}return r}function No(e,t,n){let r=L(n,"string");if(!r)return;let s=L(r,"string_fragment");if(s)return J(e,t,s.text)}function Io(e,t,n,r){let s=L(e,"export_clause");if(s){let o=[];for(let a of s.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),l=a.namedChild(1);c&&o.push((l??c).text)}return{kind:"named",sourcePath:t,names:o,startLine:n,endLine:r}}let i=L(e,"namespace_export");if(i){let o=i.namedChildren.find(a=>a.type==="identifier"||a.type==="type_identifier")?.text;return{kind:"star-as",sourcePath:t,names:o?[o]:[],startLine:n,endLine:r}}return{kind:"star",sourcePath:t,names:[],startLine:n,endLine:r}}function Kn(e,t,n){return Ke(e,t,{java:r=>_o(e,t,r),kotlin:r=>Co(e,t,r),scala:r=>Eo(e,t,r)},()=>D(n,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(r,s)=>{let i=r[1]?.trim();return i?ko(e,t,i,s):[]}),n)}function _o(e,t,n){let r=y(n,new Set(["import_declaration"])),s=[];for(let i of n.rootNode.descendantsOfType("import_declaration")){let o=i.children.some(p=>p.type==="asterisk"),c=i.namedChildren.find(p=>p.type==="scoped_identifier")??i.namedChildren.find(p=>p.type==="identifier");if(!c)continue;let l=c.text;if(o){s.push(oe("*",g(e,l,P)));continue}let u=l.split(".").pop()??l;s.push(m(u,u,g(e,l,P),r))}return s}function Co(e,t,n){let r=y(n,new Set(["import_header","import_list"])),s=[];for(let i of n.rootNode.descendantsOfType("import_header")){let o=i.namedChildren.find(f=>f.type==="identifier");if(!o)continue;let a=i.namedChildren.some(f=>f.type==="wildcard_import"),c=i.namedChildren.find(f=>f.type==="import_alias");if(a){s.push(oe("*",g(e,o.text,P)));continue}let l=o.text,u=l.split(".").pop()??l,d=c?.namedChild(0)?.text??u;s.push(m(u,d,g(e,l,P),r))}return s}function Eo(e,t,n){let r=y(n,new Set(["import_declaration"])),s=[];for(let i of n.rootNode.descendantsOfType("import_declaration")){let o=i.namedChildren.find(p=>p.type==="namespace_selectors"||p.type==="namespace_wildcard"),a=i.namedChildren.filter(p=>p!==o&&(p.type==="identifier"||p.type==="stable_identifier")),c=a.map(p=>p.text).join(".");if(!c)continue;if(o?.type==="namespace_wildcard"){s.push(oe("*",g(e,c,P)));continue}if(o?.type==="namespace_selectors"){for(let p of o.namedChildren)if(p.type==="arrow_renamed_identifier"){let[d,f]=p.namedChildren;if(!d)continue;let S=d.text,ae=f?.text??S;if(S==="_")continue;s.push(m(S,ae,g(e,`${c}.${S}`,P),r))}else if(p.type==="identifier"){let d=p.text;s.push(m(d,d,g(e,`${c}.${d}`,P),r))}continue}let l=a[a.length-1]?.text??c,u=a.slice(0,-1).map(p=>p.text).join(".")||c;s.push(m(l,l,g(e,u&&a.length>1?`${u}.${l}`:c,P),r))}return s}function ko(e,t,n,r){if(n.includes("{")&&n.includes("}")){let s=n.slice(0,n.indexOf("{")).replace(/\.$/,"").trim(),i=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return E(i).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),u=c?.trim();if(!u||u==="_")return[];let p=(l??u.split(".").pop()??u).trim(),d=u==="_"?s:`${s}.${u}`.replace(/\.\./g,".");return[w(e,t,r,d,u,p)]})}return[w(e,t,r,n,n.split(".").pop()??n,n.split(".").pop()??n)]}function Gn(e,t,n){return R(e,t,r=>Po(e,t,r),()=>D(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,s)=>{let i=r[1]?.trim();return i?E(i).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.split(/\s+as\s+/i),u=c?.trim()??a,p=u.split("\\").pop()??u,d=(l??p).trim();return[w(e,t,s,u,p,d,g(e,u.replace(/\\/g,"."),se))]}):[]}),n)}function Po(e,t,n){let r=y(n,new Set(["namespace_use_declaration"])),s=[],i=(o,a,c)=>{s.push(m(a,c,g(e,o.replace(/\\/g,"."),se),r))};for(let o of n.rootNode.descendantsOfType("namespace_use_declaration")){let a=o.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=o.namedChildren.find(l=>l.type==="namespace_name")?.text??"";for(let l of a.namedChildren){if(l.type!=="namespace_use_clause")continue;let{importedName:u,localName:p,qualified:d}=Xn(l,c);u&&i(d,u,p)}continue}for(let c of o.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:l,localName:u,qualified:p}=Xn(c,"");l&&i(p,l,u)}}return s}function Xn(e,t){let n=e.namedChildren.find(l=>l.type==="qualified_name"),r=e.namedChildren.filter(l=>l.type==="name"),s="";n?s=n.text:r.length>=1&&(s=r[0].text);let i=n&&r.length>0?r[r.length-1]:null,o=s.split("\\").pop()??s,a=i?.text??o,c=t?`${t}\\${s}`:s;return{importedName:o,localName:a,qualified:c}}function Zn(e,t,n){return R(e,t,r=>Lo(e,t,r),()=>Fo(n).flatMap(r=>Ro(e,t,r,n)),n)}function Lo(e,t,n){let r=y(n,new Set(["import_statement","import_from_statement"])),s=[];for(let i of n.rootNode.descendantsOfType("import_statement"))for(let o of i.namedChildren){let a=Yn(o);if(!a)continue;let c=ge(e,t,a.qualifiedName);s.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:r.has(a.localName),usedMembers:[]})}for(let i of n.rootNode.descendantsOfType("import_from_statement")){let o=i.namedChild(0);if(!o)continue;let a=To(o);if(a===null)continue;let c=ge(e,t,a);for(let l=1;l<i.namedChildCount;l+=1){let u=i.namedChild(l);if(u.type==="wildcard_import"){s.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let p=Yn(u);p&&s.push({importedName:p.qualifiedName,localName:p.localName,sourcePath:c,kind:"named",used:r.has(p.localName),usedMembers:[]})}}return s}function Yn(e){if(e.type==="aliased_import"){let t=e.namedChild(0),n=e.namedChild(1);return!t||!n?null:{qualifiedName:t.text,localName:n.text}}if(e.type==="dotted_name"){let t=e.text;return{qualifiedName:t,localName:t.split(".")[0]??t}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function To(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let t=L(e,"import_prefix")?.text??"",n=L(e,"dotted_name")?.text??"";return`${t}${n}`}return null}function Fo(e){let t=e.split(`
16
- `),n=[],r=0;for(let s=0;s<t.length;s++){let i=t[s],o=i.trimStart(),a=r;if(r+=i.length+1,!o.startsWith("import ")&&!o.startsWith("from "))continue;let c=i,l=a+i.length,u=Tt(i);for(;s+1<t.length&&(u>0||c.trimEnd().endsWith("\\"));){s++;let d=t[s];c+=`
17
- ${d}`,l+=1+d.length,u+=Tt(d),r+=d.length+1}let p=Do(c);p&&n.push({...p,start:a,end:l})}return n}function Do(e){let t=e.replace(/\\\s*\n/g," ").trim();if(t.startsWith("import "))return{kind:"import",module:null,clause:t.slice(7).trim()};let n=t.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!n)return null;let r=n[2].trim();return r.startsWith("(")&&r.endsWith(")")&&(r=r.slice(1,-1).trim()),{kind:"from",module:n[1],clause:r}}function Ro(e,t,n,r){let s=X(r,n.start,n.end),i=n.clause.replace(/\n/g," ").trim();if(n.kind==="import")return E(i).flatMap(c=>{let l=c.trim().replace(/,$/,"");if(!l)return[];let[u,p]=l.split(/\s+as\s+/),d=u.trim(),f=(p??d.split(".")[0]??d).trim(),S=ge(e,t,d),ae=ye(s,f);return[{importedName:d,localName:f,sourcePath:S,kind:"namespace",used:C(s,f)||ae.length>0,usedMembers:ae}]});let o=n.module?ge(e,t,n.module):null,a=[];for(let c of E(i)){let l=c.trim().replace(/,$/,"");if(!l)continue;if(l==="*"){a.push({importedName:"*",localName:null,sourcePath:o,kind:"side-effect",used:!0,usedMembers:[]});continue}let[u,p]=l.split(/\s+as\s+/),d=(p??u).trim();a.push({importedName:u.trim(),localName:d,sourcePath:o,kind:"named",used:C(s,d),usedMembers:[]})}return a}import{basename as vo}from"path";function er(e,t,n){return R(e,t,r=>Ao(e,t,r),()=>wo(e,t,n),n)}function wo(e,t,n){return D(n,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(r,s)=>{let i=r[1],o=r[2];if(!i||!o)return[];let a=i==="require_relative"?ze(e,t,o):null;if(a){let c=tr(o);return[W(c,c,a,C(s,c))]}return[ie(o,a)]})}function Ao(e,t,n){let r=y(n,new Set([])),s=[],i=new Set(["require","require_relative","load"]);for(let o of n.rootNode.descendantsOfType("call")){let a=o.namedChild(0);if(!a||a.type!=="identifier"||!i.has(a.text))continue;let l=o.namedChildren.find(f=>f.type==="argument_list")?.namedChild(0);if(!l||l.type!=="string")continue;let p=l.namedChildren.find(f=>f.type==="string_content")?.text;if(!p)continue;let d=a.text==="require_relative"?ze(e,t,p):null;if(d){let f=tr(p);s.push(m(f,f,d,r))}else s.push(ie(p,d))}return s}function tr(e){return Fn(vo(e).replace(/\.[^.]+$/,""),/_/)}function nr(e,t,n){return R(e,t,r=>jo(e,t,r),()=>D(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,s)=>{let i=r[1]?.trim();return i?Oo(e,t,i,s):[]}),n)}function jo(e,t,n){let r=y(n,new Set(["use_declaration"])),s=[];for(let i of n.rootNode.descendantsOfType("use_declaration")){let o=i.namedChild(0);if(o)for(let a of Le(o,"")){if(!a.importedName||a.importedName==="*")continue;let c=B(e,t,a.qualifiedName)??B(e,t,a.qualifiedName.split("::").slice(0,-1).join("::"));s.push(m(a.importedName,a.localName,c,r))}}return s}function Le(e,t){switch(e.type){case"identifier":case"super":case"crate":{let n=e.text;return[{qualifiedName:Ye(t,n),importedName:n,localName:n}]}case"self":{let n=t.split("::").filter(Boolean).pop()??"self";return[{qualifiedName:t||"self",importedName:n,localName:n}]}case"scoped_identifier":{let n=e.text,r=n.split("::").pop()??n;return[{qualifiedName:Ye(t,n),importedName:r,localName:r}]}case"scoped_use_list":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let s=Ye(t,n.text),i=[];for(let o of r.namedChildren)i.push(...Le(o,s));return i}case"use_list":{let n=[];for(let r of e.namedChildren)n.push(...Le(r,t));return n}case"use_as_clause":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let s=Le(n,t),i=r.text;return s.map(o=>({...o,localName:i}))}case"use_wildcard":{let n=e.namedChild(0),r=n?n.text:"";return[{qualifiedName:Ye(t,`${r}::*`),importedName:"*",localName:"*"}]}default:return[]}}function Ye(e,t){return e?t?`${e}::${t}`:e:t}function Oo(e,t,n,r){let s=n.trim();if(s.includes("{")&&s.includes("}")){let u=s.slice(0,s.indexOf("{")).replace(/::$/,"").trim(),p=s.slice(s.indexOf("{")+1,s.lastIndexOf("}")).trim();return E(p).flatMap(d=>{let f=d.trim();if(!f)return[];if(f==="self"){let nt=u.split("::").filter(Boolean).pop();return nt?[w(e,t,r,u,nt,nt)]:[]}let[S,ae]=f.split(/\s+as\s+/),ce=S?.trim();if(!ce)return[];let Nr=(ae??ce.split("::").pop()??ce).trim(),Ir=`${u}::${ce}`.replace(/::::/g,"::");return[w(e,t,r,Ir,ce.split("::").pop()??ce,Nr,B(e,t,u))]})}let[i,o]=s.split(/\s+as\s+/),a=i?.trim()??s,c=(o??a.split("::").pop()??a).trim(),l=B(e,t,a)??B(e,t,a.split("::").slice(0,-1).join("::"));return[w(e,t,r,a,a.split("::").pop()??a,c,l)]}function rr(e,t,n){let r=O(e,t);if(r)return Mo(e,t,r);let s=[];for(let i of n.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let o=i[1]?.trim();o&&s.push(...Bo(e,t,o))}return s}function Mo(e,t,n){let r=[];for(let s of n.rootNode.descendantsOfType("use_declaration")){if(!$o(s))continue;let i=s.namedChildren.find(o=>o.type!=="visibility_modifier");if(i)for(let o of Le(i,""))o.importedName&&r.push(Ot(e,t,o.qualifiedName))}return r}function $o(e){for(let t of e.children)if(t.type==="visibility_modifier"&&t.text.startsWith("pub"))return!0;return!1}function Bo(e,t,n){let r=n.trim();if(r.includes("{")&&r.includes("}")){let s=r.slice(0,r.indexOf("{")).replace(/::$/,"").trim(),i=r.slice(r.indexOf("{")+1,r.lastIndexOf("}")).trim();return E(i).flatMap(o=>{let a=o.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),l=`${s}::${c?.trim()??a}`.replace(/::::/g,"::");return[Ot(e,t,l)]})}return[Ot(e,t,r)]}function Ot(e,t,n){return{specifier:n,sourcePath:B(e,t,n)??B(e,t,n.split("::").slice(0,-1).join("::"))}}function G({language:e,extensions:t,imports:n,parseImports:r}){return{language:e,extensions:t,capabilities:{imports:n},parseImports:r}}function sr(e,t){let n=t.toLowerCase();for(let r of e)for(let s of r.extensions)if(n.endsWith(s))return r;return null}var Vo={language:"javascript",extensions:ne,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:At,parseReExports:jt},Wo=G({language:"python",extensions:Be,imports:"ast-with-regex-fallback",parseImports:Zn}),Uo=G({language:"jvm",extensions:P,imports:"ast-dispatch-with-regex-fallback",parseImports:Kn}),Ho={language:"rust",extensions:Ve,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:nr,parseExports:rr},zo=G({language:"ruby",extensions:We,imports:"ast-with-regex-fallback",parseImports:er}),qo=G({language:"c/cpp",extensions:Ue,imports:"ast-with-regex-fallback",parseImports:Vn}),Qo=G({language:"dotnet",extensions:Q,imports:"ast-dispatch-with-regex-fallback",parseImports:qn}),Jo={language:"dart",extensions:He,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:Hn,parseExports:zn},Ko=G({language:"php",extensions:se,imports:"ast-with-regex-fallback",parseImports:Gn}),Xo=G({language:"clojure",extensions:me,imports:"regex-only",parseImports:Un}),Go=[Vo,Wo,Uo,Ho,zo,qo,Qo,Jo,Ko,Xo];function Ze(e){return sr(Go,e)}var Mt={clearGroups:["whole-project","source-file"]},Yo=b("source-imports",Mt),zu=b("source-exports",Mt),Zo=b("source-reexports",Mt),ir=Y({kind:"source-imports",invalidation:Z("source-imports"),serialize:ea,deserialize:ta}),or=Y({kind:"source-reexports",invalidation:Z("source-reexports"),serialize:na,deserialize:ra});function ar(e,t){let n=x(t);return Zo.get(e,n,()=>{let r=Ze(n);if(!r?.parseReExports)return[];let s=N(e,n);if(!s)return[];let i=U(e,n,s),o=Lt(e),a=or.read(e,n,i);if(a?.resolutionFingerprint===o)return a.reExports;let c=r.parseReExports(e,n,s);return or.write(e,n,i,{resolutionFingerprint:o,reExports:c}),c})}function $t(e,t){let n=x(t);return Yo.get(e,n,()=>{let r=Ze(n);if(!r)return[];let s=N(e,n);return s?cr(e,n,s,r):[]})}function qu(e,t){let n=x(t),r=Ze(n);if(!r)return[];let s;try{s=Fe(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(i){if(De(i))return[];throw i}return cr(e,n,s,r)}function cr(e,t,n,r){let s=U(e,t,n),i=Lt(e),o=ir.read(e,t,s);if(o?.resolutionFingerprint===i)return o.imports;let a=r.parseImports(e,t,n);return ir.write(e,t,s,{parserVersion:2,resolutionFingerprint:i,imports:a}),a}function Qu(e,t,n){let r=$t(e,t).filter(s=>s.kind==="named"&&s.isTypeOnly!==!0&&s.localName===n&&s.sourcePath!==null);return r.length===1?r[0]:null}function ea(e){return JSON.stringify(e)}function ta(e){try{let t=JSON.parse(e);return!pe(t)||t.parserVersion!==2||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.imports)?null:{parserVersion:2,resolutionFingerprint:t.resolutionFingerprint,imports:t.imports}}catch{return null}}function na(e){return JSON.stringify(e)}function ra(e){try{let t=JSON.parse(e);return!pe(t)||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.reExports)?null:{resolutionFingerprint:t.resolutionFingerprint,reExports:t.reExports}}catch{return null}}function Ku(e,t){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
18
- FROM global_symbols gs
19
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
20
- JOIN documents d ON der.document_id = d.id
21
- WHERE ${t.where}
22
- ${e.pathExclusionsFor("d")}
23
- ${ur(t.orderBy)}
24
- ${pr(t.limit)}`,...t.params??[])}function Xu(e,t){return e.all(`SELECT
25
- gs.id,
26
- gs.symbol,
27
- c.document_id,
28
- MIN(c.start_line) AS start_line,
29
- 0 AS start_char,
30
- MAX(c.end_line) AS end_line,
31
- 0 AS end_char,
32
- d.relative_path,
33
- gs.display_name,
34
- gs.documentation
35
- FROM global_symbols gs
36
- JOIN mentions m ON m.symbol_id = gs.id
37
- JOIN chunks c ON m.chunk_id = c.id
38
- JOIN documents d ON c.document_id = d.id
39
- WHERE m.role = 1
40
- AND ${t.where}
41
- ${e.pathExclusionsFor("d")}
42
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
43
- ${ur(t.orderBy)}
44
- ${pr(t.limit)}`,...t.params??[])}function ur(e){return e?`ORDER BY ${e}`:""}function pr(e){return typeof e=="number"?`LIMIT ${e}`:""}function dr(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function fr(e){if(!e)return null;let t=lr(e);if(t)return t.replace(/\n/g," ");let n=e.indexOf("|");if(n===-1)return e.replace(/\n/g," ");let r=e.slice(n+1);return(lr(r)??r).replace(/\n/g," ")}function lr(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function et(e){return{forFile(t,n){return mr(e,t,n)},forFiles(t,n){let r=new Map;for(let s of t)r.set(s,mr(e,s,n));return r}}}function mr(e,t,n){let r={file:t},s=n.facts||n.identifiers;if(n.text&&(r.text=N(e,t)),n.lines&&(r.lines=at(e,t)),n.ast&&(r.ast=O(e,t)),n.imports&&(r.imports=$t(e,t)),n.reexports&&(r.reexports=ar(e,t)),s){let i=mt(e,t),o=i.facts;n.facts&&(r.facts=o),i.unavailable&&(r.sourceFactsUnavailable=i.unavailable),n.identifiers&&o&&(r.identifiers=o.fileIdentifiers,r.identifierLineMap=o.identifierLineMap)}return r}function sa(e,t={}){if(H(e.symbol)!==null)return t.includeClassMemberFallbacks===!0;let s=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(s)}function Bt(e,t,n={}){let r=new Map;for(let i of t)e.length>0&&!sa(i,{includeClassMemberFallbacks:n.includeClassMemberFallbacks})||r.set(i.id,i);for(let i of e)r.set(i.id,i);let s=[...r.values()];return n.sort?s.sort((i,o)=>i.start_line-o.start_line||i.end_line-o.end_line||i.symbol.localeCompare(o.symbol)):s}var ia=b("file-definitions",{clearGroups:["definition-catalog"]}),oa=le("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),aa=b("file-function-like-definitions",{clearGroups:["definition-catalog"]}),gr=new WeakMap;function Wt(e,t,n={},r){return n.includeClassMemberFallbacks?Vt(e,t,void 0,{includeClassMemberFallbacks:!0},r):ia.get(e,t,()=>{let s=j(r,"evidence-read",()=>xr(e,t));if(s)return s;let i=Vt(e,t,void 0,n,r);return j(r,"evidence-write",()=>{let o=Se(e),a=et(e).forFile(t,{text:!0}).text;o&&a&&Sr.write(e,t,U(e,t,a),{projectFingerprint:o,definitions:i.map(c=>({...c}))})}),i})}function ca(e,t){return aa.get(e,t,()=>{let n=xr(e,t);return n?n.filter(r=>r.isFunctionLike):Vt(e,t,r=>r.isFunctionLike)})}var Sr=Y({kind:"file-definitions",invalidation:Z("file-definitions"),serialize:la,deserialize:ua});function xr(e,t){let n=Se(e);if(!n)return null;let r=et(e).forFile(t,{text:!0}).text;if(!r)return null;let s=Sr.read(e,t,U(e,t,r));return s?pa(s,n,t):null}function la(e){return JSON.stringify(e)}function ua(e){try{let t=JSON.parse(e);return!pe(t)||typeof t.projectFingerprint!="string"||!Array.isArray(t.definitions)?null:{projectFingerprint:t.projectFingerprint,definitions:t.definitions}}catch{return null}}function pa(e,t,n){if(e.projectFingerprint!==t)return null;let r=[];for(let s of e.definitions){let i=da(s,n);if(!i)return null;r.push(i)}return r}function da(e,t){return!pe(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.startChar!="number"&&e.startChar!==void 0||typeof e.endLine!="number"||typeof e.endChar!="number"&&e.endChar!==void 0||e.relativePath!==t||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function Vt(e,t,n,r={},s){let i=j(s,"primary-rows",()=>fa(e,t)),o=j(s,"fallback-rows",()=>ma(e,t)),a=j(s,"merge-rows",()=>Bt(i,o,{sort:!0,includeClassMemberFallbacks:r.includeClassMemberFallbacks}).map(Ut));return n&&(a=a.filter(n)),j(s,"range-correction",()=>Ht(e,t,a,s,r.rangeCorrectionEvidence))}function j(e,t,n){return e?e(t,n):n()}function fa(e,t){return e.all(`SELECT
45
- gs.id,
46
- gs.symbol,
47
- der.document_id,
48
- der.start_line,
49
- der.start_char,
50
- der.end_line,
51
- der.end_char,
52
- d.relative_path,
53
- gs.display_name,
54
- gs.kind,
55
- gs.documentation,
56
- gs.enclosing_symbol
57
- FROM global_symbols gs
58
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
59
- JOIN documents d ON der.document_id = d.id
60
- WHERE d.relative_path = ?
61
- ${e.symbolNoiseFor("gs")}
62
- ORDER BY der.start_line, der.end_line`,t)}function ma(e,t){return e.all(`SELECT
63
- gs.id,
64
- gs.symbol,
65
- c.document_id,
66
- MIN(c.start_line) AS start_line,
67
- 0 AS start_char,
68
- MAX(c.end_line) AS end_line,
69
- 0 AS end_char,
70
- d.relative_path,
71
- gs.display_name,
72
- gs.kind,
73
- gs.documentation,
74
- gs.enclosing_symbol
75
- FROM global_symbols gs
76
- JOIN mentions m ON m.symbol_id = gs.id
77
- JOIN chunks c ON m.chunk_id = c.id
78
- JOIN documents d ON c.document_id = d.id
79
- WHERE d.relative_path = ?
80
- AND m.role = 1
81
- ${e.symbolNoiseFor("gs")}
82
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
83
- ORDER BY start_line, end_line`,t)}function Ut(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:en(e.symbol),parentTypeName:H(e.symbol),isFunctionLike:ot(e.symbol),isTypeLike:Re(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function hp(e,t={}){return ga(e,t.scope)}function ga(e,t){return xe(e,{scope:t,includeIgnored:!1}).flatMap(n=>Wt(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function Sp(e,t){return xe(e,{scope:t,includeIgnored:!1}).flatMap(n=>ca(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function xp(e,t){let n=oa.get(e,()=>new WeakMap),r=n.get(t.symbolMatches);r||(r=new Map,n.set(t.symbolMatches,r));let s=JSON.stringify({scope:t.scope??null,sqlPrefilter:t.sqlPrefilter??null}),i=r.get(s);if(i)return[...i];let o=yr(ya(e,t.scope,t.sqlPrefilter)),a=yr(ha(e,t.scope,t.sqlPrefilter)),c=new Set([...o.keys(),...a.keys()]),l=[];for(let u of[...c].sort()){if(e.isIgnored(u))continue;let p=Bt(o.get(u)??[],a.get(u)??[],{sort:!0}).filter(d=>t.symbolMatches(d.symbol));p.length!==0&&l.push(...Ht(e,u,p.map(Ut)))}return r.set(s,l),[...l]}function ya(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",s=n?`AND ${br("gs",n)}`:"",i=t?[`%${t}%`]:[];return e.all(`SELECT
84
- gs.id,
85
- gs.symbol,
86
- der.document_id,
87
- der.start_line,
88
- der.start_char,
89
- der.end_line,
90
- der.end_char,
91
- d.relative_path,
92
- gs.display_name,
93
- gs.kind,
94
- gs.documentation,
95
- gs.enclosing_symbol
96
- FROM global_symbols gs
97
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
98
- JOIN documents d ON der.document_id = d.id
99
- WHERE 1 = 1
100
- ${e.pathExclusionsFor("d")}
101
- ${r}
102
- ${s}
103
- ${e.symbolNoiseFor("gs")}
104
- ORDER BY d.relative_path, der.start_line, der.end_line`,...i)}function ha(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",s=n?`AND ${br("gs",n)}`:"",i=t?[`%${t}%`]:[];return e.all(`SELECT
105
- gs.id,
106
- gs.symbol,
107
- c.document_id,
108
- MIN(c.start_line) AS start_line,
109
- 0 AS start_char,
110
- MAX(c.end_line) AS end_line,
111
- 0 AS end_char,
112
- d.relative_path,
113
- gs.display_name,
114
- gs.kind,
115
- gs.documentation,
116
- gs.enclosing_symbol
117
- FROM global_symbols gs
118
- JOIN mentions m ON m.symbol_id = gs.id
119
- JOIN chunks c ON m.chunk_id = c.id
120
- JOIN documents d ON c.document_id = d.id
121
- WHERE m.role = 1
122
- AND NOT EXISTS (
123
- SELECT 1
124
- FROM defn_enclosing_ranges existing_der
125
- WHERE existing_der.symbol_id = gs.id
126
- )
127
- ${e.pathExclusionsFor("d")}
128
- ${r}
129
- ${s}
130
- ${e.symbolNoiseFor("gs")}
131
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
132
- ORDER BY d.relative_path, start_line, end_line`,...i)}function Sa(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function br(e,t){return t==="callable"?Sa(e):xa(e)}function xa(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function yr(e){let t=new Map;for(let n of e){let r=t.get(n.relative_path);r?r.push(n):t.set(n.relative_path,[n])}return t}function bp(e,t,n={}){if(t.length===0)return[];let r=t.flatMap(s=>Wt(e,s)).filter(s=>!e.isIgnored(s.relativePath));return n.onlyDocumented&&(r=r.filter(s=>s.documentation!==null&&s.documentation!=="")),n.sort&&(r=r.sort((s,i)=>s.relativePath.localeCompare(i.relativePath)||s.startLine-i.startLine||s.endLine-i.endLine)),r.map(s=>({startLine:s.startLine,endLine:s.endLine,symbol:s.symbol,shortName:Zt(s.symbol),signature:dr(fr(s.documentation)),relativePath:s.relativePath,enclosingSymbol:s.enclosingSymbol}))}function ba(e){let t=new Map,n=e.map((r,s)=>({definition:r,index:s,span:r.endLine-r.startLine})).sort((r,s)=>r.span-s.span||r.index-s.index);for(let{definition:r}of n)for(let s=r.startLine;s<=r.endLine;s+=1)t.has(s)||t.set(s,r);return t}function Np(e,t){let n=gr.get(e);return n||(n=ba(e),gr.set(e,n)),n.get(t)??null}function Ip(e,t){let n=Wt(e,t.relative_path).find(r=>r.symbolId===t.id)??(H(t.symbol)===null||!ot(t.symbol)?void 0:Ht(e,t.relative_path,[Ut(t)])[0]);return n?{symbolId:n.symbolId,symbol:n.symbol,documentId:n.documentId,startLine:n.startLine,startChar:n.startChar,endLine:n.endLine,endChar:n.endChar,relativePath:n.relativePath}:{symbolId:t.id,symbol:t.symbol,documentId:t.document_id,startLine:t.start_line,startChar:t.start_char??0,endLine:t.end_line,endChar:t.end_char??0,relativePath:t.relative_path}}function Ht(e,t,n,r,s){let i=j(r,"range-correction.source-text",()=>s?s.source:et(e).forFile(t,{text:!0}).text),o=j(r,"range-correction.callable-sites",()=>s?s.callables:ht(e,t));return o?j(r,"range-correction.ast-correction",()=>ka(n,o,i)):i?j(r,"range-correction.regex-fallback",()=>Na(n,i)):n}function Na(e,t){let n=t.split(/\r?\n/),r=Ia(e,n),s=_a(e,r),i=Ca(s,n);return Ea(e,i)}function Ia(e,t){let n=e.some(s=>tt(s.symbol))?va(t):null,r=new Map;for(let s of e)r.set(s.symbolId,Ra(t,n,s));return r}function _a(e,t){return e.filter(n=>tt(n.symbol)).map(n=>({definition:n,startLine:t.get(n.symbolId)??n.startLine})).sort((n,r)=>n.startLine-r.startLine||n.definition.startLine-r.definition.startLine||n.definition.symbol.localeCompare(r.definition.symbol))}function Ca(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let s=e[r],i=e[r+1],o=i?Math.max(s.startLine,i.startLine-1):t.length-1;n.set(s.definition.symbolId,{startLine:s.startLine,endLine:wa(t,s.definition,s.startLine,o)})}return n}function Ea(e,t){return e.map(n=>{let r=t.get(n.symbolId);return r?{...n,startLine:r.startLine,endLine:r.endLine}:n})}function ka(e,t,n=null){let r=new Map;for(let s of t){let i=r.get(s.name);i?i.push(s):r.set(s.name,[s])}return e.map(s=>{if(!Da(s)||!s.leaf)return hr(s,n);let i=r.get(s.leaf);if(!i||i.length===0)return hr(s,n);let o=n?Pa(s,i,n):null;if(o)return{...s,startLine:o.startLine,endLine:o.endLine};let a=i[0],c=Math.abs(a.startLine-s.startLine);for(let l=1;l<i.length;l+=1){let u=i[l],p=Math.abs(u.startLine-s.startLine);p<c&&(a=u,c=p)}return{...s,startLine:a.startLine,endLine:a.endLine}})}function Pa(e,t,n){let r=La(e.symbol);if(!r)return null;let s=n.split(/\r?\n/),i=new RegExp(`\\b${A(r)}\\b`);for(let o of t){let a=Ta(s,o.startLine);if(a&&i.test(a))return o}return null}function La(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function Ta(e,t){for(let n=t;n>=0;n-=1){let r=e[n]?.trim()??"";if(r){if(/^impl\b/.test(r))return Fa(e,n,t);if(/^(?:struct|enum|trait|mod)\b/.test(r))return null}}return null}function Fa(e,t,n){let r=[];for(let s=t;s<=n;s+=1){let i=e[s]??"";if(r.push(i),i.includes("{"))break}return r.join(" ")}function Da(e){return tt(e.symbol)?!0:Re(e.symbol)==="term"&&H(e.symbol)===null}function hr(e,t){if(!t||!e.leaf||Re(e.symbol)!=="term"||H(e.symbol)!==null)return e;let n=A(e.leaf),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${n}\\b`),i=t.split(/\r?\n/).findIndex(o=>r.test(o));return i>=0?{...e,startLine:i,endLine:i}:e}function Ra(e,t,n){if(!tt(n.symbol))return n.startLine;let r=Math.max(0,Math.min(n.startLine,e.length-1));if(!t)return r;let s=t.get(n.leaf);if(!s||s.length===0)return r;let i=null;for(let o of s){let a=Math.abs(o-n.startLine);(!i||a<i.distance)&&(i={line:o,distance:a})}return i?.line??r}function va(e){let t=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,n=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,r=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,s=/\b([A-Za-z_$][\w$]*)\s*\(/g,i=new Map,o=(a,c)=>{let l=i.get(a);if(!l){i.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let u of c.matchAll(t))u[1]&&o(u[1],a);for(let u of c.matchAll(n))u[1]&&o(u[1],a);let l=c.match(r);l?.[1]&&o(l[1],a);for(let u of c.matchAll(s))u[1]&&o(u[1],a)}return i}function wa(e,t,n,r){let s=Math.max(n,Math.min(e.length-1,r)),i=Math.max(n,Math.min(s,t.endLine)),o=0,a=0,c=!1;for(let l=n;l<=s;l+=1){let u=Aa(e[l]??"");for(let p of u)p==="{"?(o+=1,c=!0):p==="}"?o=Math.max(0,o-1):p==="("?a+=1:p===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=i)return l}return i}function Aa(e){let t="",n=null,r=!1;for(let s=0;s<e.length;s+=1){let i=e[s],o=e[s+1];if(!n&&i==="/"&&o==="/"){t+=" ".repeat(e.length-s);break}if(n){if(r){r=!1,t+=" ";continue}if(i==="\\"){r=!0,t+=" ";continue}i===n&&(n=null),t+=" ";continue}if(i==='"'||i==="'"||i==="`"){n=i,t+=" ";continue}t+=i}return t}function tt(e){return e.includes("().")}export{Y as a,Qa as b,Z as c,Dn as d,Ws as e,J as f,N as g,Er as h,Ma as i,at as j,$a as k,A as l,Ti as m,z as n,q as o,gt as p,Ls as q,Ln as r,Ts as s,yt as t,Fs as u,O as v,Ie as w,ee as x,fc as y,de as z,ht as A,Rs as B,vs as C,Li as D,Ye as E,ar as F,$t as G,qu as H,Qu as I,et as J,Ku as K,Xu as L,dr as M,fr as N,Bt as O,Wt as P,hp as Q,ga as R,Sp as S,xp as T,bp as U,ba as V,Np as W,Ip as X};
133
- //# sourceMappingURL=chunk-NP4JFCLE.js.map
@@ -1,8 +0,0 @@
1
- import{a as ee,b as q,d as E}from"./chunk-Z2KGMIL4.js";import{e as Q,g as Z,h as S,t as P,v as te,w as h,x as f,y as p}from"./chunk-XIPGCT3D.js";function it(e){try{return process.kill(e,0),!0}catch(t){return typeof t=="object"&&t!==null&&"code"in t&&t.code==="EPERM"}}import{randomUUID as Ee}from"crypto";import{closeSync as ve,existsSync as Le,fsyncSync as Ne,linkSync as Oe,mkdirSync as ke,openSync as qe,renameSync as Pe,unlinkSync as $e,writeSync as Ce}from"fs";import{dirname as ne}from"path";import{chmodSync as Ie,constants as Be,copyFileSync as Fe}from"fs";import{dirname as Se}from"path";var ie=Object.freeze({...te,copyFile:(e,t)=>Fe(e,t,Be.COPYFILE_FICLONE),chmodFile:(e,t)=>Ie(e,t)});function Re(e,t,i={}){let n=i.runtime??ie,r=Se(t),o=h(r,n);n.copyFile(e,t),i.mode!==void 0&&n.chmodFile(t,i.mode);let s=n.openFile(t,"r");try{n.syncFile(s)}finally{n.closeFile(s)}return p(o,f(r,n))}var re=Object.freeze({platform:process.platform,randomToken:()=>Ee(),pathExists:e=>Le(e),makeDirectory:e=>ke(e,{recursive:!0}),openFile:(e,t,i)=>qe(e,t,i),writeFile:(e,t,i,n)=>Ce(e,t,i,n),syncFile:e=>Ne(e),closeFile:e=>ve(e),renameFile:(e,t)=>Pe(e,t),linkFile:(e,t)=>Oe(e,t),removeFile:e=>$e(e)});function $(e,t,i={}){let n=i.durability??"visibility",r=i.runtime??re,o=ne(e),s=n==="durable"?h(o,r):(r.makeDirectory(o),"not-requested"),a=`${e}.tmp-${r.randomToken()}`,d=typeof t=="string"?Buffer.from(t):t,l,c=!1;try{l=r.openFile(a,"wx",i.mode??384),c=!0,P(l,d,r,"atomic file"),n==="durable"&&r.syncFile(l),r.closeFile(l),l=void 0,r.renameFile(a,e),c=!1;let y=n==="durable"?p(s,f(o,r)):"not-requested";return oe(n,y)}finally{if(l!==void 0)try{r.closeFile(l)}catch{}if(c)try{r.removeFile(a)}catch{}}}function v(e,t,i={}){let n=i.durability??"visibility",r=i.runtime??re;if(!r.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let o=ne(e),s=n==="durable"?h(o,r):(r.makeDirectory(o),"not-requested"),a=`${e}.tmp-${r.randomToken()}`,d=typeof t=="string"?Buffer.from(t):t,l,c=!1;try{l=r.openFile(a,"wx",i.mode??384),c=!0,P(l,d,r,"exclusive atomic file"),n==="durable"&&r.syncFile(l),r.closeFile(l),l=void 0,r.linkFile(a,e);let y=n==="durable"?f(o,r):"not-requested";r.removeFile(a),c=!1;let b=n==="durable"?p(s,y,f(o,r)):"not-requested";return oe(n,b)}finally{if(l!==void 0)try{r.closeFile(l)}catch{}if(c)try{r.removeFile(a)}catch{}}}function oe(e,t){return{requestedDurability:e,achievedDurability:e==="visibility"?"visibility":t==="synced"?"directory-durable":"file-flushed",directorySync:t}}function se(e,t,i={}){$(e,ae(t,i),{durability:"visibility",runtime:i.runtime})}function C(e,t,i={}){return $(e,ae(t,i),{durability:"durable",runtime:i.runtime})}function ae(e,t){let i=JSON.stringify(e,null,t.spacing);return t.trailingNewline?`${i}
2
- `:i}import{createHash as T,randomUUID as fe}from"crypto";import{existsSync as w,lstatSync as B,mkdirSync as _e,readdirSync as A,renameSync as J,rmSync as g}from"fs";import{basename as I,dirname as _,join as m}from"path";function de(e){return L(e,Te)}function xt(e){return L(e,Je)}function L(e,t){return Array.isArray(e)?`[${e.map(i=>L(i,t)).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([i],[n])=>t(i,n)).map(([i,n])=>`${JSON.stringify(i)}:${L(n,t)}`).join(",")}}`:JSON.stringify(e)}function Te(e,t){return e.localeCompare(t)}function Je(e,t){return e<t?-1:e>t?1:0}var j=1,je=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),x=class extends Error{constructor(i,n,r,o){let s=i==="item-too-large"?`request is ${o} bytes; per-item limit is ${r.maxItemBytes}`:i==="item-capacity"?`mailbox has ${n.totalItems} retained items; limit is ${r.maxItems}`:i==="byte-capacity"?`mailbox retains ${n.totalBytes} bytes and the request adds ${o}; limit is ${r.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=i;this.status=n;this.limits=r;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},pe=".owner.json",U={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function Et(e){return{rootDir:e,pendingDir:m(e,"pending"),inflightDir:m(e,"inflight"),responseDir:m(e,"responses"),deadLetterDir:m(e,"dead-letter"),legacyRequestDir:m(e,"requests")}}function F(e={}){let t={...je,...e};for(let[i,n]of Object.entries(t))if(!Number.isFinite(n)||n<=0||!Number.isInteger(n))throw new Error(`Mailbox limit ${i} must be a positive integer.`);return t}function O(e){let t=[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir].map(i=>h(i));return p(...t)}function vt(e,t){return T("sha256").update(de({namespace:e,payload:t})).digest("hex")}function ge(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${e}`}function Lt(e,t,i={}){let n=F(i.limits),r=i.nowMs??Date.now(),o=O(e);return Qe(t),W(e,n,i.admissionLockTimeoutMs??2e3,i.monotonicNow??E,i.durability??"durable",()=>{K(e,r,n);let s=m(e.pendingDir,`${t.id}.json`),a=m(e.responseDir,`${t.id}.json`),d=le(e,t.id);if(d){let b=ce(d,t.operationKey,t.id);return{disposition:"duplicate",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:b.deadlineAtMs??t.deadlineAtMs}}let l=`${JSON.stringify(t)}
3
- `,c=Buffer.byteLength(l),y=k(e);if(c>n.maxItemBytes)throw new x("item-too-large",y,n,c);if(y.totalItems+1>n.maxItems)throw new x("item-capacity",y,n,c);if(y.totalBytes+c>n.maxBytes)throw new x("byte-capacity",y,n,c);i.onBeforePublish?.();try{let b=i.durability??"durable",u=v(s,l,{durability:b}),M=b==="durable"?p(o,u.directorySync):"not-requested";return{disposition:"accepted",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:t.deadlineAtMs,achievedDurability:u.achievedDurability,directorySync:M}}catch(b){if(b.code!=="EEXIST")throw b;let u=le(e,t.id);if(!u)throw b;let M=ce(u,t.operationKey,t.id);return{disposition:"duplicate",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:M.deadlineAtMs??t.deadlineAtMs}}})}function Ue(e,t){if(!t.ownerId.trim())throw new Error("Mailbox claim owner identity is required.");if(t.owner&&(!Number.isSafeInteger(t.owner.pid)||t.owner.pid<=0||t.owner.processIdentity!==void 0&&t.owner.processIdentity.pid!==t.owner.pid))throw new Error("Mailbox claim process identity is invalid.");let i=t.nowMs??Date.now(),n=F(t.limits),r=O(e);try{return W(e,n,2e3,t.monotonicNow??E,t.durability??"durable",()=>Ke(e,t.ownerId,i,n,t.liveness??U,t.owner??{pid:process.pid},r,t.durability??"durable",t.onClaimStage))}catch(o){if(o instanceof x&&o.code==="admission-busy")return[];throw o}}function Nt(e,t){return!ye(e.pendingDir)&&!ye(e.legacyRequestDir)?[]:Ue(e,t)}function Ke(e,t,i,n,r,o,s,a,d){K(e,i,n,r);let l=m(e.inflightDir,N(t)),c=[...ue(e.pendingDir,!1),...ue(e.legacyRequestDir,!0)].sort((u,M)=>u.orderAtMs-M.orderAtMs||u.header.id.localeCompare(M.header.id)||u.path.localeCompare(M.path)),y=a==="durable"?s:"not-requested";c.length>0&&(a==="durable"?y=p(y,h(l)):_e(l,{recursive:!0}),d?.("after-owner-directory-durable"),Ye(l,t,o,a),d?.("after-owner-record-published"));let b=[];for(let u of c){if(b.length>=n.maxBatch)break;let M=m(e.responseDir,`${u.header.id}.json`);if(w(M)){g(u.path,{force:!0});continue}let H=Math.max(i+n.claimLeaseMs,(u.header.deadlineAtMs??i)+5e3),he=`${N(u.originalFile)}.${H}.claim`,V=m(l,he);try{J(u.path,V)}catch(Y){let G=Y.code;if(G==="ENOENT"||G==="EEXIST")continue;throw Y}d?.("after-claim-renamed");let we=a==="durable"?f(_(u.path)):"not-requested";d?.("after-source-directory-synced");let De=a==="durable"?f(l):"not-requested";d?.("after-destination-directory-synced");let Ae=p(y,we,De);b.push({requestId:u.header.id,ownerId:t,path:V,originalFile:u.originalFile,claimedAtMs:i,claimExpiresAtMs:H,byteLength:u.byteLength,...u.header.operationKey?{operationKey:u.header.operationKey}:{},...u.header.clientId?{clientId:u.header.clientId}:{},...u.header.enqueuedAtMs===void 0?{}:{enqueuedAtMs:u.header.enqueuedAtMs},...u.header.deadlineAtMs===void 0?{}:{deadlineAtMs:u.header.deadlineAtMs},legacy:u.legacy,directorySync:Ae})}return b}function Ot(e,t={}){let i=F(t);if(e.byteLength>i.maxItemBytes)throw new x("item-too-large",{pending:0,inflight:1,responses:0,deadLetters:0,invalid:0,totalItems:1,totalBytes:e.byteLength},i,e.byteLength);return Z(e.path,{maxBytes:i.maxItemBytes,inputKind:"bounded mailbox item"})}function We(e,t,i,n={}){let r=n.nowMs??Date.now(),o=F(n.limits),s={...i,mailboxVersion:j,operationKey:t.operationKey??`legacy-${t.requestId}`,clientId:t.clientId??"legacy",...t.deadlineAtMs===void 0?{}:{deadlineAtMs:t.deadlineAtMs},completedAtMs:r,expiresAtMs:r+o.responseRetentionMs},a=Buffer.byteLength(`${JSON.stringify(s)}
4
- `),d=k(e);if(a>o.maxItemBytes)throw new x("item-too-large",d,o,a);let l=Math.max(0,d.totalBytes-t.byteLength)+a;if(l>o.maxBytes&&l>d.totalBytes)throw new x("byte-capacity",d,o,a);let c=n.durability??"durable";if(ze(e,t,s,c),n.onAfterResponsePublished?.(),g(t.path,{force:!0}),c==="durable"){let y=_(t.path);f(w(y)?y:e.inflightDir)}}function kt(e,t,i,n,r={}){let o=r.nowMs??Date.now(),s=F(r.limits);if(We(e,t,i,{...r,nowMs:o,limits:s}),!w(t.path)){let a=m(e.deadLetterDir,`${tt(t.requestId)}.${o}.${T("sha256").update(n).digest("hex").slice(0,12)}.json`),d={mailboxVersion:j,requestId:t.requestId,ownerId:t.ownerId,rejectedAtMs:o,reason:n,originalFile:t.originalFile},l=Buffer.byteLength(`${JSON.stringify(d,null,2)}
5
- `),c=k(e);c.totalItems<s.maxItems&&c.totalBytes+l<=s.maxBytes&&C(a,d,{spacing:2,trailingNewline:!0})}}function qt(e,t={}){let i=t.nowMs??Date.now(),n=F(t.limits);return O(e),W(e,n,2e3,t.monotonicNow??E,"durable",()=>K(e,i,n,t.liveness??U))}function K(e,t,i,n=U){let r={reclaimed:0,completedClaimsRemoved:0,responsesRemoved:0,deadLettersRemoved:0,temporaryFilesRemoved:0},o=i.cleanupBatch;for(let s of X(e.inflightDir)){if(o<=0)break;let a=m(e.responseDir,`${s.requestId}.json`);if(w(a)){g(s.path,{force:!0}),r.completedClaimsRemoved++,o--;continue}if(s.claimExpiresAtMs>t||Ge(e,s.ownerId,n)!=="dead")continue;let d=m(e.pendingDir,s.originalFile);try{J(s.path,d),r.reclaimed++}catch(l){if(l.code!=="EEXIST")throw l;g(s.path,{force:!0})}f(_(s.path)),f(e.pendingDir),o--}o=me(e.responseDir,o,(s,a)=>a+i.responseRetentionMs,t,()=>{r.responsesRemoved++}),o=me(e.deadLetterDir,o,(s,a)=>a+i.deadLetterRetentionMs,t,()=>{r.deadLettersRemoved++});for(let s of[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir]){if(o<=0)break;for(let a of Me(s)){if(o<=0)break;if(!I(a).includes(".tmp-"))continue;let d;try{d=B(a).mtimeMs}catch(l){if(l.code==="ENOENT")continue;throw l}d+i.temporaryRetentionMs>t||(g(a,{force:!0}),r.temporaryFilesRemoved++,o--)}}return Ze(e.inflightDir),r}function k(e){O(e);let t=[...D(e.pendingDir).map(d=>({path:d,pending:!0})),...D(e.legacyRequestDir).map(d=>({path:d,pending:!0}))],i=X(e.inflightDir).map(d=>({path:d.path,pending:!1})),n=D(e.responseDir).map(d=>({path:d,pending:!1})),r=D(e.deadLetterDir).map(d=>({path:d,pending:!1})),o=[...t,...i,...n,...r],s=0,a;for(let d of t){let l=R(d.path);if(!l){s++;continue}let c=l.enqueuedAtMs;if(c===void 0)try{c=B(d.path).mtimeMs}catch(y){if(y.code==="ENOENT")continue;throw y}a=a===void 0?c:Math.min(a,c)}return{pending:t.length,inflight:i.length,responses:n.length,deadLetters:r.length,invalid:s,totalItems:o.length,totalBytes:o.reduce((d,l)=>d+et(l.path),0),...a===void 0?{}:{oldestPendingAt:new Date(a).toISOString()}}}function ze(e,t,i,n){let r=m(e.responseDir,`${t.requestId}.json`),o=`${JSON.stringify(i)}
6
- `;try{v(r,o,{durability:n})}catch(s){if(s.code!=="EEXIST")throw s;let a=R(r),d=t.operationKey??`legacy-${t.requestId}`;if(a?.operationKey!==d)throw new Error(`Mailbox completion ${t.requestId} conflicts with an existing operation.`,{cause:s})}}function W(e,t,i,n,r,o){let s=m(e.rootDir,".admission.lock"),a=`${process.pid}-${fe()}`,d=n()+Math.max(0,i);for(;!Xe(e.rootDir,s,a,r);){if(He(s),n()>=d)throw new x("admission-busy",k(e),t,0);Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,5)}try{return o()}finally{try{z(s).ownerToken===a&&(g(s,{recursive:!0,force:!0}),r==="durable"&&f(e.rootDir))}catch{}}}function Xe(e,t,i,n){let r=`${JSON.stringify({ownerToken:i,pid:process.pid,acquiredAtMs:Date.now()})}
7
- `;try{return v(t,r,{durability:n}),!0}catch(o){if(o.code==="EEXIST")return!1;try{z(t).ownerToken===i&&(g(t,{force:!0}),n==="durable"&&f(e))}catch{}throw o}}function He(e){let t=null;try{let n=z(e);typeof n.ownerToken=="string"&&Number.isSafeInteger(n.pid)&&Number(n.pid)>0&&(t=Number(n.pid))}catch{}if(t===null||Ve(t))return;let i=`${e}.stale-${fe()}`;try{J(e,i)}catch(n){let r=n.code;if(r==="ENOENT"||r==="EEXIST")return;throw n}g(i,{recursive:!0,force:!0})}function z(e){try{return JSON.parse(S(e,"mailbox lock record"))}catch(t){if(t.code!=="EISDIR"&&!(t instanceof Q&&t.reason==="not-regular"))throw t;return JSON.parse(S(m(e,"owner.json"),"mailbox lock owner record"))}}function Ve(e){try{return process.kill(e,0),!0}catch(t){let i=t.code;return i==="EPERM"||i!=="ESRCH"}}function Ye(e,t,i,n){let r=m(e,pe),o=i.processIdentity,s=xe(r);if(s&&s.ownerId===t&&s.pid===i.pid&&(!s.processIdentity&&!o||s.processIdentity&&o&&q(s.processIdentity,o)))return;if(D(e).some(d=>d.endsWith(".claim")))throw new Error(`Mailbox owner identity ${t} collides with retained work from another process instance.`);let a={version:1,ownerId:t,pid:i.pid,...o?{processIdentity:o}:{}};n==="durable"?C(r,a):se(r,a)}function Ge(e,t,i){let n=xe(m(e.inflightDir,N(t),pe));if(!n)return"unknown";if(!i.isProcessAlive(n.pid))return"dead";if(!n.processIdentity)return"live";let r=i.readProcessIdentity(n.pid);return r?q(n.processIdentity,r)?"live":"dead":"unknown"}function xe(e){try{let t=JSON.parse(S(e,"mailbox owner record"));if(t.version!==1||typeof t.ownerId!="string"||!t.ownerId||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0)return null;let i=t.processIdentity===void 0?null:ee(t.processIdentity);return t.processIdentity!==void 0&&(!i||i.pid!==t.pid)?null:{version:1,ownerId:t.ownerId,pid:t.pid,...i?{processIdentity:i}:{}}}catch{return null}}function le(e,t){for(let i of[m(e.pendingDir,`${t}.json`),m(e.legacyRequestDir,`${t}.json`),m(e.responseDir,`${t}.json`)])if(w(i))return i;for(let i of X(e.inflightDir))if(i.requestId===t)return i.path;return null}function ce(e,t,i){let n=R(e);if(n?.operationKey===t)return n;if(I(e)===`${ge(t)}.json`)return{id:i,operationKey:t};throw new Error(`Mailbox operation ${i} conflicts with an existing retained record.`)}function Qe(e){if(e.mailboxVersion!==j||e.id!==ge(e.operationKey)||!e.clientId.trim()||!Number.isFinite(e.enqueuedAtMs)||!Number.isFinite(e.deadlineAtMs)||e.deadlineAtMs<e.enqueuedAtMs)throw new Error("Mailbox request has an invalid lifecycle identity.")}function ue(e,t){return D(e).filter(i=>i.endsWith(".json")).map(i=>{let n=B(i),r=I(i,".json"),o=R(i)??{id:r};return{path:i,originalFile:I(i),header:o,byteLength:n.size,orderAtMs:o.enqueuedAtMs??n.mtimeMs,legacy:t}})}function X(e){if(!w(e))return[];let t=[];for(let i of A(e,{withFileTypes:!0})){if(!i.isDirectory())continue;let n=be(i.name);if(n===null)continue;let r=m(e,i.name);for(let o of A(r,{withFileTypes:!0})){if(!o.isFile()||!o.name.endsWith(".claim"))continue;let s=/^(.*)\.(\d+)\.claim$/.exec(o.name);if(!s)continue;let a=be(s[1]),d=Number(s[2]);if(a===null||I(a)!==a||!a.endsWith(".json")||!Number.isSafeInteger(d))continue;let l=m(r,o.name),c=R(l)??{id:I(a,".json")},y;try{y=B(l)}catch(b){if(b.code==="ENOENT")continue;throw b}t.push({requestId:c.id,ownerId:n,path:l,originalFile:a,claimedAtMs:y.mtimeMs,claimExpiresAtMs:d,byteLength:y.size,...c.operationKey?{operationKey:c.operationKey}:{},...c.clientId?{clientId:c.clientId}:{},...c.enqueuedAtMs===void 0?{}:{enqueuedAtMs:c.enqueuedAtMs},...c.deadlineAtMs===void 0?{}:{deadlineAtMs:c.deadlineAtMs},legacy:c.operationKey===void 0})}}return t.sort((i,n)=>i.claimedAtMs-n.claimedAtMs||i.path.localeCompare(n.path))}function R(e){try{let t=JSON.parse(S(e,"mailbox record"));return typeof t.id!="string"||!t.id?null:{id:t.id,...typeof t.operationKey=="string"?{operationKey:t.operationKey}:{},...typeof t.clientId=="string"?{clientId:t.clientId}:{},...typeof t.enqueuedAtMs=="number"?{enqueuedAtMs:t.enqueuedAtMs}:{},...typeof t.deadlineAtMs=="number"?{deadlineAtMs:t.deadlineAtMs}:{}}}catch{return null}}function me(e,t,i,n,r){for(let o of D(e)){if(t<=0)break;let s;try{s=B(o)}catch(a){if(a.code==="ENOENT")continue;throw a}i(o,s.mtimeMs)>n||(g(o,{force:!0}),r(),t--)}return t}function D(e){return w(e)?A(e,{withFileTypes:!0}).filter(t=>t.isFile()).map(t=>m(e,t.name)).sort():[]}function ye(e){try{return A(e).some(t=>t.endsWith(".json"))}catch{return!1}}function Me(e){if(!w(e))return[];let t=[];for(let i of A(e,{withFileTypes:!0})){let n=m(e,i.name);i.isFile()?t.push(n):i.isDirectory()&&t.push(...Me(n))}return t.sort()}function Ze(e){if(w(e))for(let t of A(e,{withFileTypes:!0})){if(!t.isDirectory())continue;let i=m(e,t.name);A(i).some(n=>n.endsWith(".claim"))||g(i,{recursive:!0,force:!0})}}function et(e){try{return B(e).size}catch{return 0}}function N(e){return Buffer.from(e,"utf8").toString("base64url")}function be(e){try{let t=Buffer.from(e,"base64url").toString("utf8");return N(t)===e?t:null}catch{return null}}function tt(e){return/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)?e:`invalid-${T("sha256").update(e).digest("hex")}`}export{it as a,Re as b,se as c,C as d,de as e,xt as f,j as g,x as h,Et as i,O as j,vt as k,ge as l,Lt as m,Nt as n,Ot as o,We as p,kt as q,qt as r,k as s};
8
- //# sourceMappingURL=chunk-NQXWWE6S.js.map