scip-query 0.21.1 → 0.22.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 (354) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/augment-vue-worker.js +1 -1
  3. package/dist/by-kind-4IYG2SKW.js +2 -0
  4. package/dist/call-graph-WQNXMNNN.js +2 -0
  5. package/dist/{chunk-5QM7QT5B.js → chunk-25GWKRUZ.js} +2 -2
  6. package/dist/chunk-2BTJALUS.js +454 -0
  7. package/dist/{chunk-4ZCLDH6T.js → chunk-2KVU55CW.js} +2 -2
  8. package/dist/{chunk-CQVDALWQ.js → chunk-2OXVP5U5.js} +2 -2
  9. package/dist/{chunk-I2LY3KN7.js → chunk-2RE5OCHZ.js} +2 -2
  10. package/dist/{chunk-5J3A6RBZ.js → chunk-2XCGSDIT.js} +2 -2
  11. package/dist/{chunk-4KIPF45P.js → chunk-2YC7YNKT.js} +2 -2
  12. package/dist/{chunk-ZNW5A5VX.js → chunk-3QXC54FQ.js} +2 -2
  13. package/dist/{chunk-SGSPCEFC.js → chunk-3TJY6M3B.js} +2 -2
  14. package/dist/chunk-42W3LFUK.js +13 -0
  15. package/dist/chunk-44T4DUAA.js +2 -0
  16. package/dist/{chunk-YBWE6J32.js → chunk-4GAQ6FI4.js} +2 -2
  17. package/dist/{chunk-OU6SDWAM.js → chunk-4HE7MVWD.js} +2 -2
  18. package/dist/{chunk-QN2AI3D2.js → chunk-4TQU4TX2.js} +2 -2
  19. package/dist/{chunk-OMVNRPST.js → chunk-56NQAEPJ.js} +2 -2
  20. package/dist/{chunk-O4PZFAXA.js → chunk-57N6LN2A.js} +2 -2
  21. package/dist/{chunk-7MUHSZGN.js → chunk-5H5WTJSD.js} +2 -2
  22. package/dist/{chunk-J4HUBIVF.js → chunk-5YRQIE2B.js} +2 -2
  23. package/dist/{chunk-3XQLJG7V.js → chunk-5ZMBRQFC.js} +2 -2
  24. package/dist/{chunk-H2RBDP5S.js → chunk-6HRZQLOI.js} +2 -2
  25. package/dist/{chunk-PJBYDCBQ.js → chunk-6NC3YSPY.js} +2 -2
  26. package/dist/{chunk-MLTSTKXD.js → chunk-6VEFRPTD.js} +2 -2
  27. package/dist/{chunk-JLZWYDCZ.js → chunk-7C26EKLZ.js} +2 -2
  28. package/dist/{chunk-LXMW6ZAX.js → chunk-7IQXARSQ.js} +2 -2
  29. package/dist/chunk-7JYHQAH2.js +22 -0
  30. package/dist/{chunk-YA72ZUKO.js → chunk-7KSO2OAP.js} +2 -2
  31. package/dist/{chunk-YT4IQBET.js → chunk-7U2YQSDE.js} +2 -2
  32. package/dist/{chunk-XDOEHEET.js → chunk-7XA3OM44.js} +2 -2
  33. package/dist/{chunk-BCTCADNB.js → chunk-7XZGZBSQ.js} +2 -2
  34. package/dist/{chunk-3KXFB2FM.js → chunk-7YQOCABQ.js} +2 -2
  35. package/dist/chunk-A77SCPW2.js +3 -0
  36. package/dist/chunk-AK3PYTIK.js +5 -0
  37. package/dist/{chunk-6X4KO5A7.js → chunk-AMIMMNA4.js} +2 -2
  38. package/dist/{chunk-PWEQ6CZZ.js → chunk-AQ2PORIO.js} +2 -2
  39. package/dist/{chunk-E6N6YTVM.js → chunk-ARVO6TTW.js} +2 -2
  40. package/dist/{chunk-U7DOYZDH.js → chunk-AUY5BL74.js} +2 -2
  41. package/dist/{chunk-B3AREUQK.js → chunk-AYPDH2LU.js} +2 -2
  42. package/dist/{chunk-HR5JYLVV.js → chunk-AZS7YPCB.js} +2 -2
  43. package/dist/{chunk-ZQUNCTEZ.js → chunk-BDGTPN27.js} +2 -2
  44. package/dist/{chunk-DZNWXJN2.js → chunk-BDHFVH2M.js} +2 -2
  45. package/dist/{chunk-743MEVFJ.js → chunk-BECZLYNU.js} +2 -2
  46. package/dist/{chunk-4IASLUOP.js → chunk-BJT7LSPK.js} +2 -2
  47. package/dist/{chunk-X5MWO4DM.js → chunk-BTVKZGWT.js} +2 -2
  48. package/dist/{chunk-HYU4W353.js → chunk-BUTEIZKP.js} +2 -2
  49. package/dist/{chunk-UXNXOMXJ.js → chunk-BVFYEEBH.js} +2 -2
  50. package/dist/{chunk-UM56ZET4.js → chunk-BWVQP3LB.js} +2 -2
  51. package/dist/chunk-BYDAFMSR.js +57 -0
  52. package/dist/{chunk-P3UFF22M.js → chunk-C76O5MDS.js} +2 -2
  53. package/dist/chunk-C7IJMOFP.js +134 -0
  54. package/dist/{chunk-IM23CSG5.js → chunk-CBBHFNLX.js} +2 -2
  55. package/dist/{chunk-IZKJQQCQ.js → chunk-CKRWA452.js} +2 -2
  56. package/dist/{chunk-YLNCTPOI.js → chunk-CLG6DWVS.js} +2 -2
  57. package/dist/{chunk-DXEJ4FLZ.js → chunk-D2MVJSP4.js} +8 -8
  58. package/dist/chunk-D35XIZGN.js +2 -0
  59. package/dist/{chunk-AQF35NGT.js → chunk-DEAB5TGT.js} +2 -2
  60. package/dist/{chunk-7G2WIVIX.js → chunk-DJAO2OZJ.js} +2 -2
  61. package/dist/{chunk-PRLU3I7G.js → chunk-DKM723YF.js} +4 -4
  62. package/dist/{chunk-RSUH7G5T.js → chunk-DPWKKNKI.js} +2 -2
  63. package/dist/chunk-E44IVWIJ.js +367 -0
  64. package/dist/{chunk-W7HN6V4E.js → chunk-EDMB6SSO.js} +2 -2
  65. package/dist/{chunk-YCXQQ3YB.js → chunk-EELG7D3Q.js} +2 -2
  66. package/dist/{chunk-T2PBOVDI.js → chunk-EELPBR7E.js} +2 -2
  67. package/dist/{chunk-PAZSBPJR.js → chunk-EETGXQY7.js} +2 -2
  68. package/dist/{chunk-DUDUIT5P.js → chunk-ENWQWA2R.js} +2 -2
  69. package/dist/{chunk-QH5Q6M5C.js → chunk-ERCYGVAM.js} +2 -2
  70. package/dist/{chunk-ZGDHC5AT.js → chunk-EWWY2ZFL.js} +2 -2
  71. package/dist/{chunk-LJMWILX6.js → chunk-F24G5NBE.js} +2 -2
  72. package/dist/{chunk-XNF5T4T2.js → chunk-F24QUEQP.js} +2 -2
  73. package/dist/{chunk-IH3K5J6K.js → chunk-FBCVASUG.js} +2 -2
  74. package/dist/{chunk-EPLE5O5O.js → chunk-FELGD32K.js} +2 -2
  75. package/dist/{chunk-PU6XDQ2X.js → chunk-FFJQZG6J.js} +5 -5
  76. package/dist/{chunk-JGMD6JGB.js → chunk-FGNCOQUX.js} +2 -2
  77. package/dist/chunk-FKGQOTKD.js +2 -0
  78. package/dist/{chunk-27OUNZW5.js → chunk-GDRJB3SB.js} +2 -2
  79. package/dist/chunk-GH5YSGZL.js +5 -0
  80. package/dist/{chunk-IHGK3SZ7.js → chunk-GIQ6CSL4.js} +2 -2
  81. package/dist/{chunk-ITF3CWS5.js → chunk-GPGRZJ3R.js} +2 -2
  82. package/dist/{chunk-EJHNTAEE.js → chunk-GQIDEID3.js} +2 -2
  83. package/dist/{chunk-UEQORB2A.js → chunk-GRX7JOXQ.js} +2 -2
  84. package/dist/{chunk-6QN4FYQW.js → chunk-GVOMSPGL.js} +2 -2
  85. package/dist/{chunk-NT4NVEHU.js → chunk-GY7CCCEZ.js} +2 -2
  86. package/dist/{chunk-BVR44XXB.js → chunk-H7CG6LOE.js} +2 -2
  87. package/dist/{chunk-67FK5KGV.js → chunk-HCVJR2V4.js} +2 -2
  88. package/dist/{chunk-FOP7HD6H.js → chunk-HG722PO7.js} +2 -2
  89. package/dist/{chunk-YR7VRWNX.js → chunk-HISEUIL2.js} +2 -2
  90. package/dist/{chunk-Y2S4YNLH.js → chunk-HXOU4XNH.js} +2 -2
  91. package/dist/{chunk-DZA7MQMU.js → chunk-I6UTXNHU.js} +2 -2
  92. package/dist/{chunk-QZCACNV5.js → chunk-IJMD6BRI.js} +2 -2
  93. package/dist/{chunk-QGVUPYBC.js → chunk-IKVNEGTW.js} +2 -2
  94. package/dist/chunk-IMKZEXZG.js +2 -0
  95. package/dist/{chunk-LGVTIZPV.js → chunk-ISIQLPJ2.js} +2 -2
  96. package/dist/{chunk-BYXWXLKM.js → chunk-ISWFRGJ6.js} +2 -2
  97. package/dist/chunk-IW5XQG5G.js +2 -0
  98. package/dist/{chunk-ZMS4YCY7.js → chunk-IXESDH3J.js} +2 -2
  99. package/dist/{chunk-K63CAPS2.js → chunk-JAT6C3VX.js} +2 -2
  100. package/dist/{chunk-U2MNECDU.js → chunk-JFQBRL3J.js} +2 -2
  101. package/dist/{chunk-4SZJF4GK.js → chunk-JHH5SCZ3.js} +2 -2
  102. package/dist/{chunk-AAOEROT3.js → chunk-JJ62MTQH.js} +2 -2
  103. package/dist/chunk-JT6XX7QY.js +8 -0
  104. package/dist/{chunk-OY7PCALC.js → chunk-JUN5DOAK.js} +2 -2
  105. package/dist/{chunk-DXYMTQZ4.js → chunk-K3XFWJI2.js} +2 -2
  106. package/dist/{chunk-ZP2WUVZ5.js → chunk-KFVSJX25.js} +2 -2
  107. package/dist/{chunk-ND3BWIVN.js → chunk-KQHJEU6V.js} +2 -2
  108. package/dist/{chunk-KGKCJFWZ.js → chunk-KZYID5KV.js} +2 -2
  109. package/dist/{chunk-2LJLEM5B.js → chunk-LO5JSW2C.js} +2 -2
  110. package/dist/{chunk-CNT4ND5O.js → chunk-LRI5OMPE.js} +2 -2
  111. package/dist/{chunk-FCGMQETU.js → chunk-LXQUF2RP.js} +2 -2
  112. package/dist/{chunk-FSPENGSU.js → chunk-MHIEP7EG.js} +2 -2
  113. package/dist/{chunk-LIWIV26I.js → chunk-MSR2QRUE.js} +2 -2
  114. package/dist/chunk-N7FP5H5U.js +57 -0
  115. package/dist/{chunk-527HV7JY.js → chunk-NEIQPFBI.js} +2 -2
  116. package/dist/chunk-NK3JMP22.js +2 -0
  117. package/dist/{chunk-DK6MB565.js → chunk-NRBNAECH.js} +2 -2
  118. package/dist/{chunk-4HQYNZ3P.js → chunk-NVSZNESQ.js} +2 -2
  119. package/dist/{chunk-QLWZUFDT.js → chunk-OJNK5ALA.js} +2 -2
  120. package/dist/{chunk-MRXBLYRE.js → chunk-OPSAW5DT.js} +2 -2
  121. package/dist/{chunk-4TOU7HHQ.js → chunk-OTSPRVNW.js} +2 -2
  122. package/dist/{chunk-IQMGNIGY.js → chunk-OXYAWIEA.js} +2 -2
  123. package/dist/chunk-OZETODHH.js +2 -0
  124. package/dist/chunk-PBUH2P5S.js +3 -0
  125. package/dist/{chunk-5BJPJUXF.js → chunk-PIFTZEEM.js} +2 -2
  126. package/dist/{chunk-C52Q3JEQ.js → chunk-PLJUQFQN.js} +2 -2
  127. package/dist/{chunk-NODZYYGC.js → chunk-PLYUVM4F.js} +2 -2
  128. package/dist/{chunk-47WX6UC4.js → chunk-PXXYQK55.js} +2 -2
  129. package/dist/{chunk-SBFDPHKH.js → chunk-Q55NF3ZG.js} +2 -2
  130. package/dist/{chunk-N4EFQIRX.js → chunk-Q5TA4OY4.js} +2 -2
  131. package/dist/{chunk-HW7FASEL.js → chunk-Q6T2CAJL.js} +2 -2
  132. package/dist/chunk-Q7GBK5T7.js +81 -0
  133. package/dist/{chunk-CXT3GZSQ.js → chunk-QKT4UI2Y.js} +2 -2
  134. package/dist/{chunk-DGM2RJ3I.js → chunk-QLBSG7U5.js} +2 -2
  135. package/dist/chunk-QWKHW6VZ.js +2 -0
  136. package/dist/{chunk-3T5U2EQ2.js → chunk-R6M456QG.js} +2 -2
  137. package/dist/{chunk-RZWBTKXO.js → chunk-RDULNRSJ.js} +2 -2
  138. package/dist/{chunk-YKHL4J3G.js → chunk-RHHCLWQ6.js} +2 -2
  139. package/dist/{chunk-YF25RQER.js → chunk-RNKPYYYE.js} +2 -2
  140. package/dist/{chunk-XKM5D2XS.js → chunk-RPL3ARU7.js} +2 -2
  141. package/dist/{chunk-XFRHBAIT.js → chunk-RYOYJMGF.js} +2 -2
  142. package/dist/chunk-SB25YMEQ.js +2 -0
  143. package/dist/{chunk-SRIZDEWX.js → chunk-SVHTMVA4.js} +2 -2
  144. package/dist/{chunk-AFRS7WJU.js → chunk-SWK4XPUS.js} +2 -2
  145. package/dist/{chunk-YDTK77JP.js → chunk-T6QD2ZQB.js} +2 -2
  146. package/dist/{chunk-Z2QB75BS.js → chunk-TAYD3AE7.js} +2 -2
  147. package/dist/chunk-TD7VKJ2Y.js +117 -0
  148. package/dist/{chunk-K2DZCH2K.js → chunk-TH6IC56G.js} +2 -2
  149. package/dist/{chunk-FIO44MVK.js → chunk-TKDNDQA7.js} +2 -2
  150. package/dist/{chunk-Q4MRRB3C.js → chunk-TNG2FYS5.js} +2 -2
  151. package/dist/chunk-TQZV7KV4.js +2 -0
  152. package/dist/{chunk-NSDPPUDY.js → chunk-TUQIPUDS.js} +2 -2
  153. package/dist/chunk-TUSPIVZ3.js +4 -0
  154. package/dist/{chunk-RNKRYK6B.js → chunk-U2N2KE7A.js} +2 -2
  155. package/dist/{chunk-G47MFF47.js → chunk-UAQ4T73O.js} +2 -2
  156. package/dist/{chunk-5KIJMEPC.js → chunk-UDY7MIAW.js} +2 -2
  157. package/dist/{chunk-MLTKGHD2.js → chunk-URSGGIZX.js} +2 -2
  158. package/dist/{chunk-IGBQVEHE.js → chunk-UT7TADJX.js} +2 -2
  159. package/dist/{chunk-Z67JOKRE.js → chunk-V4NG5OMS.js} +105 -105
  160. package/dist/{chunk-OA2BO4DR.js → chunk-VMWUV6WB.js} +2 -2
  161. package/dist/{chunk-PX6QNUYF.js → chunk-VTCIYFEK.js} +2 -2
  162. package/dist/{chunk-6DO3VBLV.js → chunk-VU6LIWHT.js} +2 -2
  163. package/dist/{chunk-CTO3TRX7.js → chunk-VUSKPCUB.js} +2 -2
  164. package/dist/{chunk-V6XENWOF.js → chunk-VXJJTQYE.js} +2 -2
  165. package/dist/{chunk-BM4OTGSY.js → chunk-VZ7NXSHV.js} +2 -2
  166. package/dist/{chunk-ARGPDW2Y.js → chunk-WHADK6OS.js} +2 -2
  167. package/dist/chunk-WN3TCGJ4.js +2 -0
  168. package/dist/{chunk-GBZCVYWA.js → chunk-WOOAY3PA.js} +2 -2
  169. package/dist/{chunk-FLSVYEPL.js → chunk-WSLEJSFR.js} +2 -2
  170. package/dist/{chunk-BMKTDJI6.js → chunk-WYZIHUPZ.js} +2 -2
  171. package/dist/{chunk-WZ7V4BQV.js → chunk-XE33FV5W.js} +2 -2
  172. package/dist/{chunk-JO6FK3Q5.js → chunk-XFMVKFSF.js} +2 -2
  173. package/dist/{chunk-3YETOKNO.js → chunk-XGGBK66W.js} +2 -2
  174. package/dist/{chunk-BZCRHP46.js → chunk-XJX6LGHL.js} +2 -2
  175. package/dist/{chunk-OFZVFIDF.js → chunk-XN22RGSR.js} +2 -2
  176. package/dist/{chunk-VJAD5WX5.js → chunk-XSWYJCAK.js} +2 -2
  177. package/dist/{chunk-WV6R37XV.js → chunk-XU75YQN4.js} +2 -2
  178. package/dist/{chunk-UBETC3Q2.js → chunk-Y2VM4CJC.js} +2 -2
  179. package/dist/{chunk-7YZGSLW6.js → chunk-Y334QQU5.js} +2 -2
  180. package/dist/{chunk-TP2X2C2Y.js → chunk-YAGYMBEX.js} +2 -2
  181. package/dist/{chunk-KBIC6JHJ.js → chunk-YIHNPKWD.js} +2 -2
  182. package/dist/{chunk-5Z2H76VD.js → chunk-YXPUP5G2.js} +2 -2
  183. package/dist/{chunk-G6VV7ROY.js → chunk-Z2AWCTN6.js} +2 -2
  184. package/dist/{chunk-O3EX5STE.js → chunk-Z2PZVKPR.js} +2 -2
  185. package/dist/{chunk-OG5UK2K7.js → chunk-ZAZGGSM3.js} +2 -2
  186. package/dist/{chunk-GTZFKDP3.js → chunk-ZGW4HLPD.js} +2 -2
  187. package/dist/chunk-ZOXKSQQB.js +2 -0
  188. package/dist/{chunk-KFFQURUZ.js → chunk-ZPASRBLF.js} +2 -2
  189. package/dist/{chunk-WZRNEVYC.js → chunk-ZYM4HOFA.js} +2 -2
  190. package/dist/{chunk-FUUDUAKM.js → chunk-ZZ3Z7D56.js} +2 -2
  191. package/dist/cli-main.js +2 -2
  192. package/dist/code-EQJFDT6I.js +2 -0
  193. package/dist/code-result-json-7UWIWBOO.js +2 -0
  194. package/dist/{command-descriptors-6INSCKLW.js → command-descriptors-ORNTVNYV.js} +89 -89
  195. package/dist/dataflow-6VL54GX5.js +2 -0
  196. package/dist/dependence-slice-DT2NUHD2.js +2 -0
  197. package/dist/deps-DB7H5IKC.js +2 -0
  198. package/dist/direct-navigation-O3LUAYWQ.js +3 -0
  199. package/dist/entry-map-6K62RV3D.js +2 -0
  200. package/dist/files-MSLD7MO6.js +2 -0
  201. package/dist/hierarchy-IVBXAKFA.js +2 -0
  202. package/dist/imports-FRAVZ3Y2.js +2 -0
  203. package/dist/index.js +1 -1
  204. package/dist/members-KJOJDYGO.js +2 -0
  205. package/dist/methods-2AYABBT3.js +2 -0
  206. package/dist/output-continuation-command-JHMPH6NC.js +3 -0
  207. package/dist/project-reindex-HYO4WD7Z.js +3 -0
  208. package/dist/queries/affected.js +1 -1
  209. package/dist/queries/anchors.js +1 -1
  210. package/dist/queries/architecture.js +1 -1
  211. package/dist/queries/bottlenecks.js +1 -1
  212. package/dist/queries/by-kind.js +1 -1
  213. package/dist/queries/call-graph.js +1 -1
  214. package/dist/queries/change-surface.js +1 -1
  215. package/dist/queries/cleanup-plan.js +1 -1
  216. package/dist/queries/co-change.js +1 -1
  217. package/dist/queries/code.js +1 -1
  218. package/dist/queries/complexity-hotspots.js +1 -1
  219. package/dist/queries/complexity.d.ts +11 -0
  220. package/dist/queries/complexity.js +1 -1
  221. package/dist/queries/context.js +1 -1
  222. package/dist/queries/convergence.js +1 -1
  223. package/dist/queries/coupling.js +1 -1
  224. package/dist/queries/cycles.js +1 -1
  225. package/dist/queries/dataflow.js +1 -1
  226. package/dist/queries/dead.js +1 -1
  227. package/dist/queries/decorative-checkers.js +1 -1
  228. package/dist/queries/deep-chains.js +1 -1
  229. package/dist/queries/dependence-slice.js +1 -1
  230. package/dist/queries/dependency-depth.js +1 -1
  231. package/dist/queries/deps.js +1 -1
  232. package/dist/queries/diff-impact.js +1 -1
  233. package/dist/queries/doc-drift.js +1 -1
  234. package/dist/queries/drift.js +1 -1
  235. package/dist/queries/duplicate-bodies.js +1 -1
  236. package/dist/queries/entry-map.js +1 -1
  237. package/dist/queries/evidence.js +1 -1
  238. package/dist/queries/extract-candidates.js +1 -1
  239. package/dist/queries/fan.js +1 -1
  240. package/dist/queries/files.js +1 -1
  241. package/dist/queries/health.js +1 -1
  242. package/dist/queries/hierarchy.js +1 -1
  243. package/dist/queries/hotspots.js +1 -1
  244. package/dist/queries/imports.js +1 -1
  245. package/dist/queries/incomplete-migration.js +1 -1
  246. package/dist/queries/index.js +1 -1
  247. package/dist/queries/isolated.js +1 -1
  248. package/dist/queries/locality-candidates.js +1 -1
  249. package/dist/queries/members.js +1 -1
  250. package/dist/queries/methods.js +1 -1
  251. package/dist/queries/not-implemented.js +1 -1
  252. package/dist/queries/outline.js +1 -1
  253. package/dist/queries/passthrough-candidates.js +1 -1
  254. package/dist/queries/plan-context.js +1 -1
  255. package/dist/queries/react-component-duplicates.js +1 -1
  256. package/dist/queries/react-hook-candidates.js +1 -1
  257. package/dist/queries/react-large-component-pressure.js +1 -1
  258. package/dist/queries/recent-duplicates.js +1 -1
  259. package/dist/queries/redundant-reexports.js +1 -1
  260. package/dist/queries/reference-neighborhood.js +1 -1
  261. package/dist/queries/reference-reachability.js +1 -1
  262. package/dist/queries/refs.js +1 -1
  263. package/dist/queries/self-audit.js +1 -1
  264. package/dist/queries/similar-chains.js +1 -1
  265. package/dist/queries/similar-files.js +1 -1
  266. package/dist/queries/similar-signatures.js +1 -1
  267. package/dist/queries/similar.js +1 -1
  268. package/dist/queries/slice.js +1 -1
  269. package/dist/queries/source-inspection.js +1 -1
  270. package/dist/queries/source-search.js +1 -1
  271. package/dist/queries/stale-abstractions.js +1 -1
  272. package/dist/queries/surface.js +1 -1
  273. package/dist/queries/symbols.js +1 -1
  274. package/dist/queries/system-map.js +1 -1
  275. package/dist/queries/system.js +1 -1
  276. package/dist/queries/test-quality.js +1 -1
  277. package/dist/queries/trace.js +1 -1
  278. package/dist/queries/twin-ab.js +1 -1
  279. package/dist/queries/twin-drift.js +1 -1
  280. package/dist/queries/unused-imports.js +1 -1
  281. package/dist/queries/unused-params.js +1 -1
  282. package/dist/queries/value-flow.js +1 -1
  283. package/dist/queries/vue-component-duplicates.js +1 -1
  284. package/dist/queries/vue-composable-candidates.js +1 -1
  285. package/dist/queries/vue-large-view-pressure.js +1 -1
  286. package/dist/queries/wrapper-candidates.js +1 -1
  287. package/dist/query-service-fastpath.js +5 -5
  288. package/dist/query-service-server.js +2 -2
  289. package/dist/refs-ARMA6XUJ.js +2 -0
  290. package/dist/{refs-pagination-SRCUOYRD.js → refs-pagination-VUGIWN6U.js} +2 -2
  291. package/dist/reindex-worker.js +64 -22
  292. package/dist/reindex.js +74 -32
  293. package/dist/runtime.js +1 -1
  294. package/dist/rust-semantic-session-server.js +1 -1
  295. package/dist/rust-semantic-session-worker.js +1 -1
  296. package/dist/rust-semantic-worker.js +1 -1
  297. package/dist/slice-YOB5YFAM.js +2 -0
  298. package/dist/surface-VY5EFWTW.js +2 -0
  299. package/dist/{symbol-resolution-SVSMX4RN.js → symbol-resolution-DGQN4XIV.js} +2 -2
  300. package/dist/system-2KQ3QD2P.js +2 -0
  301. package/dist/trace-HTIPTXAE.js +2 -0
  302. package/dist/typescript-mailbox-worker.js +1 -1
  303. package/dist/value-flow-5FV3VQI7.js +2 -0
  304. package/dist/watch-server.js +3 -3
  305. package/package.json +1 -1
  306. package/dist/by-kind-XXGZGNZ6.js +0 -2
  307. package/dist/call-graph-VGY3R4L3.js +0 -2
  308. package/dist/chunk-3XZELASU.js +0 -2
  309. package/dist/chunk-63TFRBMB.js +0 -2
  310. package/dist/chunk-6LS3IG2I.js +0 -13
  311. package/dist/chunk-7Z4GMCHM.js +0 -117
  312. package/dist/chunk-ANCHW2R4.js +0 -57
  313. package/dist/chunk-C7WSQA6A.js +0 -21
  314. package/dist/chunk-DNPETNXT.js +0 -2
  315. package/dist/chunk-E7CJ6O72.js +0 -2
  316. package/dist/chunk-FYCH2EYQ.js +0 -2
  317. package/dist/chunk-GSHTVE56.js +0 -3
  318. package/dist/chunk-JSHDCVUM.js +0 -81
  319. package/dist/chunk-L7WRUNKJ.js +0 -2
  320. package/dist/chunk-LFWB7TOJ.js +0 -2
  321. package/dist/chunk-MFBVUQJZ.js +0 -2
  322. package/dist/chunk-MR4ZKWO6.js +0 -57
  323. package/dist/chunk-NP4JFCLE.js +0 -133
  324. package/dist/chunk-NQXWWE6S.js +0 -8
  325. package/dist/chunk-O2VY47Y5.js +0 -325
  326. package/dist/chunk-SIGVQT43.js +0 -2
  327. package/dist/chunk-UAQQR55F.js +0 -2
  328. package/dist/chunk-VRJG7N3I.js +0 -453
  329. package/dist/chunk-WCIKJ2E3.js +0 -3
  330. package/dist/chunk-WEXQYJY3.js +0 -5
  331. package/dist/chunk-WOPZX5GM.js +0 -2
  332. package/dist/chunk-XDQX6LDT.js +0 -4
  333. package/dist/chunk-XIPGCT3D.js +0 -5
  334. package/dist/chunk-Z2KGMIL4.js +0 -2
  335. package/dist/code-AXLJBZ6T.js +0 -2
  336. package/dist/code-result-json-CTZHAQXJ.js +0 -2
  337. package/dist/dataflow-AFXY423Q.js +0 -2
  338. package/dist/dependence-slice-2G4X6VSJ.js +0 -2
  339. package/dist/deps-LMCAV5DO.js +0 -2
  340. package/dist/direct-navigation-2ONV22Y2.js +0 -3
  341. package/dist/entry-map-ZOC3VXO5.js +0 -2
  342. package/dist/files-WJQJLHMH.js +0 -2
  343. package/dist/hierarchy-ASNIHAX4.js +0 -2
  344. package/dist/imports-JICEKDKK.js +0 -2
  345. package/dist/members-C5H2K3MS.js +0 -2
  346. package/dist/methods-KZOZHSD4.js +0 -2
  347. package/dist/output-continuation-command-NX3RH3TP.js +0 -3
  348. package/dist/project-reindex-A2SXUH2H.js +0 -3
  349. package/dist/refs-ZOORVRQC.js +0 -2
  350. package/dist/slice-NOTBWA7S.js +0 -2
  351. package/dist/surface-BTBCLKNA.js +0 -2
  352. package/dist/system-2EIUFP6B.js +0 -2
  353. package/dist/trace-BB2GHQPG.js +0 -2
  354. package/dist/value-flow-OA7AHSUG.js +0 -2
@@ -1,117 +0,0 @@
1
- import{a as I,m as A,p as v,v as P,w as Q}from"./chunk-6LS3IG2I.js";import{C as w,a as D}from"./chunk-C7WSQA6A.js";import{C as $,c as S,d as N,i as h,j as x,p as _,w as C,y as O,z as T}from"./chunk-JSHDCVUM.js";var te={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function u(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let n=e.split(" ");if(n.length<4)return{scheme:n[0]??"",manager:n[1]??"",packageName:n[2]??"",version:"",descriptors:[],raw:e};let t=n[0],i=n[1],r=e.slice(t.length+1+i.length+1),s;if(r.startsWith("`")){let l=r.indexOf("`",1);l===-1?(s=r.slice(1),r=""):(s=r.slice(1,l),r=r.slice(l+2))}else{let l=r.indexOf(" ");l===-1?(s=r,r=""):(s=r.slice(0,l),r=r.slice(l+1))}let o,a=r.indexOf(" ");a===-1?(o=r,r=""):(o=r.slice(0,a),r=r.slice(a+1));let c=ie(r);return{scheme:t,manager:i,packageName:s,version:o,descriptors:c,raw:e}}function p(e){let n=u(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let i=n.descriptors[t];if(i?.suffix==="type")return i.name}return null}function ie(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let s=e.indexOf("]",t+1);if(s===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,s),suffix:"type-param"}),t=s+1;continue}if(e[t]==="("&&(n.length===0||t===0||j(e[t-1]))){let s=e.indexOf(")",t+1);if(s!==-1&&e[s+1]!=="."){n.push({name:e.slice(t+1,s),suffix:"parameter"}),t=s+1;continue}}let i;if(e[t]==="`"){let s=e.indexOf("`",t+1);if(s===-1){i=e.slice(t+1),n.push({name:i,suffix:"term"});break}i=e.slice(t+1,s),t=s+1}else{let s=t;for(;t<e.length&&!j(e[t]);)t++;i=e.slice(s,t)}if(t>=e.length){i&&n.push({name:i,suffix:"term"});break}let r=e[t];if(r==="("){let s=e.indexOf(")",t+1);s!==-1&&e[s+1]==="."?(n.push({name:i,suffix:"method"}),t=s+2):s!==-1?(n.push({name:i,suffix:"method"}),t=s+1):(n.push({name:i,suffix:"term"}),t++)}else{let s=te[r];s&&n.push({name:i,suffix:s}),t+=1}}return n}function j(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function B(e){let n=u(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let i=[];for(let r of t.descriptors){let s=re(r);s&&i.push(s)}return i.join(":")}function re(e){let n=e.suffix==="namespace"?se(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function se(e){return e.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/,"").replace(/\.(py|pyi)$/,"").replace(/\.(rs)$/,"").replace(/\.(java|scala|kt|kts)$/,"").replace(/\.(rb)$/,"").replace(/\.(go)$/,"").replace(/\.(cs|vb)$/,"").replace(/\.(dart)$/,"").replace(/\.(php)$/,"").replace(/\.(c|cc|cpp|cxx|h|hpp)$/,"")}function W(e){let n=u(e);if("kind"in n&&n.kind==="local")return n.id;let t=n;return t.descriptors.length===0?"":t.descriptors[t.descriptors.length-1].name}function g(e){let n=u(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function je(e){return e.endsWith("().")||g(e)==="method"}function L(e){let n=g(e);return n==="method"?!0:n!=="term"?!1:e.endsWith("().")?!0:e.startsWith("rust-analyzer ")&&e.includes("#")?!1:e.startsWith("scip-typescript ")?!/#[A-Za-z0-9_$]+\.$/.test(e):!0}function Be(e){return g(e)==="namespace"}var oe=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function We(e){return oe.test(e)}var ae=new Set(["test","tests","_tests"]);function Je(e){let n=u(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let i=n.descriptors[t];if(i?.suffix==="namespace"&&i.name&&ae.has(i.name))return!0}return!1}function ze(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length!==r.length+1)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function He(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length<=r.length)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Ue(e,n){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
2
- FROM global_symbols gs
3
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
4
- JOIN documents d ON der.document_id = d.id
5
- WHERE ${n.where}
6
- ${e.pathExclusionsFor("d")}
7
- ${z(n.orderBy)}
8
- ${H(n.limit)}`,...n.params??[])}function Ke(e,n){return e.all(`SELECT
9
- gs.id,
10
- gs.symbol,
11
- c.document_id,
12
- MIN(c.start_line) AS start_line,
13
- 0 AS start_char,
14
- MAX(c.end_line) AS end_line,
15
- 0 AS end_char,
16
- d.relative_path,
17
- gs.display_name,
18
- gs.documentation
19
- FROM global_symbols gs
20
- JOIN mentions m ON m.symbol_id = gs.id
21
- JOIN chunks c ON m.chunk_id = c.id
22
- JOIN documents d ON c.document_id = d.id
23
- WHERE m.role = 1
24
- AND ${n.where}
25
- ${e.pathExclusionsFor("d")}
26
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
27
- ${z(n.orderBy)}
28
- ${H(n.limit)}`,...n.params??[])}function z(e){return e?`ORDER BY ${e}`:""}function H(e){return typeof e=="number"?`LIMIT ${e}`:""}function G(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 U(e){if(!e)return null;let n=J(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let i=e.slice(t+1);return(J(i)??i).replace(/\n/g," ")}function J(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function b(e){return{forFile(n,t){return K(e,n,t)},forFiles(n,t){let i=new Map;for(let r of n)i.set(r,K(e,r,t));return i}}}function K(e,n,t){let i={file:n},r=t.facts||t.identifiers;if(t.text&&(i.text=T(e,n)),t.lines&&(i.lines=$(e,n)),t.ast&&(i.ast=w(e,n)),t.imports&&(i.imports=Q(e,n)),t.reexports&&(i.reexports=P(e,n)),r){let s=A(e,n),o=s.facts;t.facts&&(i.facts=o),s.unavailable&&(i.sourceFactsUnavailable=s.unavailable),t.identifiers&&o&&(i.identifiers=o.fileIdentifiers,i.identifierLineMap=o.identifierLineMap)}return i}function le(e,n={}){if(p(e.symbol)!==null)return n.includeClassMemberFallbacks===!0;let r=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(r)}function F(e,n,t={}){let i=new Map;for(let s of n)e.length>0&&!le(s,{includeClassMemberFallbacks:t.includeClassMemberFallbacks})||i.set(s.id,s);for(let s of e)i.set(s.id,s);let r=[...i.values()];return t.sort?r.sort((s,o)=>s.start_line-o.start_line||s.end_line-o.end_line||s.symbol.localeCompare(o.symbol)):r}function gn(e){let n=new Map;for(let t of e){if(!t.leaf)continue;let i=n.get(t.leaf)??[];i.push(t),n.set(t.leaf,i)}return n}var ce=S("file-definitions",{clearGroups:["definition-catalog"]}),de=N("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),ue=S("file-function-like-definitions",{clearGroups:["definition-catalog"]}),Y=new WeakMap;function E(e,n,t={},i){return t.includeClassMemberFallbacks?R(e,n,void 0,{includeClassMemberFallbacks:!0},i):ce.get(e,n,()=>{let r=m(i,"evidence-read",()=>V(e,n));if(r)return r;let s=R(e,n,void 0,t,i);return m(i,"evidence-write",()=>{let o=x(e),a=b(e).forFile(n,{text:!0}).text;o&&a&&q.write(e,n,h(e,n,a),{projectFingerprint:o,definitions:s.map(c=>({...c}))})}),s})}function fe(e,n){return ue.get(e,n,()=>{let t=V(e,n);return t?t.filter(i=>i.isFunctionLike):R(e,n,i=>i.isFunctionLike)})}var q=C({kind:"file-definitions",invalidation:O("file-definitions"),serialize:me,deserialize:pe});function V(e,n){let t=x(e);if(!t)return null;let i=b(e).forFile(n,{text:!0}).text;if(!i)return null;let r=q.read(e,n,h(e,n,i));return r?ge(r,t,n):null}function me(e){return JSON.stringify(e)}function pe(e){try{let n=JSON.parse(e);return!_(n)||typeof n.projectFingerprint!="string"||!Array.isArray(n.definitions)?null:{projectFingerprint:n.projectFingerprint,definitions:n.definitions}}catch{return null}}function ge(e,n,t){if(e.projectFingerprint!==n)return null;let i=[];for(let r of e.definitions){let s=be(r,t);if(!s)return null;i.push(s)}return i}function be(e,n){return!_(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!==n||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 R(e,n,t,i={},r){let s=m(r,"primary-rows",()=>ye(e,n)),o=m(r,"fallback-rows",()=>Se(e,n)),a=m(r,"merge-rows",()=>F(s,o,{sort:!0,includeClassMemberFallbacks:i.includeClassMemberFallbacks}).map(k));return t&&(a=a.filter(t)),m(r,"range-correction",()=>M(e,n,a,r,i.rangeCorrectionEvidence))}function m(e,n,t){return e?e(n,t):t()}function ye(e,n){return e.all(`SELECT
29
- gs.id,
30
- gs.symbol,
31
- der.document_id,
32
- der.start_line,
33
- der.start_char,
34
- der.end_line,
35
- der.end_char,
36
- d.relative_path,
37
- gs.display_name,
38
- gs.kind,
39
- gs.documentation,
40
- gs.enclosing_symbol
41
- FROM global_symbols gs
42
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
43
- JOIN documents d ON der.document_id = d.id
44
- WHERE d.relative_path = ?
45
- ${e.symbolNoiseFor("gs")}
46
- ORDER BY der.start_line, der.end_line`,n)}function Se(e,n){return e.all(`SELECT
47
- gs.id,
48
- gs.symbol,
49
- c.document_id,
50
- MIN(c.start_line) AS start_line,
51
- 0 AS start_char,
52
- MAX(c.end_line) AS end_line,
53
- 0 AS end_char,
54
- d.relative_path,
55
- gs.display_name,
56
- gs.kind,
57
- gs.documentation,
58
- gs.enclosing_symbol
59
- FROM global_symbols gs
60
- JOIN mentions m ON m.symbol_id = gs.id
61
- JOIN chunks c ON m.chunk_id = c.id
62
- JOIN documents d ON c.document_id = d.id
63
- WHERE d.relative_path = ?
64
- AND m.role = 1
65
- ${e.symbolNoiseFor("gs")}
66
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
67
- ORDER BY start_line, end_line`,n)}function k(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:W(e.symbol),parentTypeName:p(e.symbol),isFunctionLike:L(e.symbol),isTypeLike:g(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function bn(e,n={}){return he(e,n.scope)}function he(e,n){return D(e,{scope:n,includeIgnored:!1}).flatMap(t=>E(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function yn(e,n){return D(e,{scope:n,includeIgnored:!1}).flatMap(t=>fe(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function Sn(e,n){let t=de.get(e,()=>new WeakMap),i=t.get(n.symbolMatches);i||(i=new Map,t.set(n.symbolMatches,i));let r=JSON.stringify({scope:n.scope??null,sqlPrefilter:n.sqlPrefilter??null}),s=i.get(r);if(s)return[...s];let o=X(xe(e,n.scope,n.sqlPrefilter)),a=X(De(e,n.scope,n.sqlPrefilter)),c=new Set([...o.keys(),...a.keys()]),l=[];for(let d of[...c].sort()){if(e.isIgnored(d))continue;let f=F(o.get(d)??[],a.get(d)??[],{sort:!0}).filter(ne=>n.symbolMatches(ne.symbol));f.length!==0&&l.push(...M(e,d,f.map(k)))}return i.set(r,l),[...l]}function xe(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${ee("gs",t)}`:"",s=n?[`%${n}%`]:[];return e.all(`SELECT
68
- gs.id,
69
- gs.symbol,
70
- der.document_id,
71
- der.start_line,
72
- der.start_char,
73
- der.end_line,
74
- der.end_char,
75
- d.relative_path,
76
- gs.display_name,
77
- gs.kind,
78
- gs.documentation,
79
- gs.enclosing_symbol
80
- FROM global_symbols gs
81
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
82
- JOIN documents d ON der.document_id = d.id
83
- WHERE 1 = 1
84
- ${e.pathExclusionsFor("d")}
85
- ${i}
86
- ${r}
87
- ${e.symbolNoiseFor("gs")}
88
- ORDER BY d.relative_path, der.start_line, der.end_line`,...s)}function De(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${ee("gs",t)}`:"",s=n?[`%${n}%`]:[];return e.all(`SELECT
89
- gs.id,
90
- gs.symbol,
91
- c.document_id,
92
- MIN(c.start_line) AS start_line,
93
- 0 AS start_char,
94
- MAX(c.end_line) AS end_line,
95
- 0 AS end_char,
96
- d.relative_path,
97
- gs.display_name,
98
- gs.kind,
99
- gs.documentation,
100
- gs.enclosing_symbol
101
- FROM global_symbols gs
102
- JOIN mentions m ON m.symbol_id = gs.id
103
- JOIN chunks c ON m.chunk_id = c.id
104
- JOIN documents d ON c.document_id = d.id
105
- WHERE m.role = 1
106
- AND NOT EXISTS (
107
- SELECT 1
108
- FROM defn_enclosing_ranges existing_der
109
- WHERE existing_der.symbol_id = gs.id
110
- )
111
- ${e.pathExclusionsFor("d")}
112
- ${i}
113
- ${r}
114
- ${e.symbolNoiseFor("gs")}
115
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
116
- ORDER BY d.relative_path, start_line, end_line`,...s)}function _e(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function ee(e,n){return n==="callable"?_e(e):Ie(e)}function Ie(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function X(e){let n=new Map;for(let t of e){let i=n.get(t.relative_path);i?i.push(t):n.set(t.relative_path,[t])}return n}function hn(e,n,t={}){if(n.length===0)return[];let i=n.flatMap(r=>E(e,r)).filter(r=>!e.isIgnored(r.relativePath));return t.onlyDocumented&&(i=i.filter(r=>r.documentation!==null&&r.documentation!=="")),t.sort&&(i=i.sort((r,s)=>r.relativePath.localeCompare(s.relativePath)||r.startLine-s.startLine||r.endLine-s.endLine)),i.map(r=>({startLine:r.startLine,endLine:r.endLine,symbol:r.symbol,shortName:B(r.symbol),signature:G(U(r.documentation)),relativePath:r.relativePath,enclosingSymbol:r.enclosingSymbol}))}function Le(e){let n=new Map,t=e.map((i,r)=>({definition:i,index:r,span:i.endLine-i.startLine})).sort((i,r)=>i.span-r.span||i.index-r.index);for(let{definition:i}of t)for(let r=i.startLine;r<=i.endLine;r+=1)n.has(r)||n.set(r,i);return n}function xn(e,n){let t=Y.get(e);return t||(t=Le(e),Y.set(e,t)),t.get(n)??null}function Dn(e,n){let t=E(e,n.relative_path).find(i=>i.symbolId===n.id)??(p(n.symbol)===null||!L(n.symbol)?void 0:M(e,n.relative_path,[k(n)])[0]);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,startChar:t.startChar,endLine:t.endLine,endChar:t.endChar,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,startChar:n.start_char??0,endLine:n.end_line,endChar:n.end_char??0,relativePath:n.relative_path}}function M(e,n,t,i,r){let s=m(i,"range-correction.source-text",()=>r?r.source:b(e).forFile(n,{text:!0}).text),o=m(i,"range-correction.callable-sites",()=>r?r.callables:v(e,n));return o?m(i,"range-correction.ast-correction",()=>Ne(t,o,s)):s?m(i,"range-correction.regex-fallback",()=>Fe(t,s)):t}function Fe(e,n){let t=n.split(/\r?\n/),i=Re(e,t),r=Ee(e,i),s=ke(r,t);return Me(e,s)}function Re(e,n){let t=e.some(r=>y(r.symbol))?ve(n):null,i=new Map;for(let r of e)i.set(r.symbolId,Ae(n,t,r));return i}function Ee(e,n){return e.filter(t=>y(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,i)=>t.startLine-i.startLine||t.definition.startLine-i.definition.startLine||t.definition.symbol.localeCompare(i.definition.symbol))}function ke(e,n){let t=new Map;for(let i=0;i<e.length;i+=1){let r=e[i],s=e[i+1],o=s?Math.max(r.startLine,s.startLine-1):n.length-1;t.set(r.definition.symbolId,{startLine:r.startLine,endLine:Pe(n,r.definition,r.startLine,o)})}return t}function Me(e,n){return e.map(t=>{let i=n.get(t.symbolId);return i?{...t,startLine:i.startLine,endLine:i.endLine}:t})}function Ne(e,n,t=null){let i=new Map;for(let r of n){let s=i.get(r.name);s?s.push(r):i.set(r.name,[r])}return e.map(r=>{if(!we(r)||!r.leaf)return Z(r,t);let s=i.get(r.leaf);if(!s||s.length===0)return Z(r,t);let o=t?Ce(r,s,t):null;if(o)return{...r,startLine:o.startLine,endLine:o.endLine};let a=s[0],c=Math.abs(a.startLine-r.startLine);for(let l=1;l<s.length;l+=1){let d=s[l],f=Math.abs(d.startLine-r.startLine);f<c&&(a=d,c=f)}return{...r,startLine:a.startLine,endLine:a.endLine}})}function Ce(e,n,t){let i=Oe(e.symbol);if(!i)return null;let r=t.split(/\r?\n/),s=new RegExp(`\\b${I(i)}\\b`);for(let o of n){let a=Te(r,o.startLine);if(a&&s.test(a))return o}return null}function Oe(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function Te(e,n){for(let t=n;t>=0;t-=1){let i=e[t]?.trim()??"";if(i){if(/^impl\b/.test(i))return $e(e,t,n);if(/^(?:struct|enum|trait|mod)\b/.test(i))return null}}return null}function $e(e,n,t){let i=[];for(let r=n;r<=t;r+=1){let s=e[r]??"";if(i.push(s),s.includes("{"))break}return i.join(" ")}function we(e){return y(e.symbol)?!0:g(e.symbol)==="term"&&p(e.symbol)===null}function Z(e,n){if(!n||!e.leaf||g(e.symbol)!=="term"||p(e.symbol)!==null)return e;let t=I(e.leaf),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),s=n.split(/\r?\n/).findIndex(o=>i.test(o));return s>=0?{...e,startLine:s,endLine:s}:e}function Ae(e,n,t){if(!y(t.symbol))return t.startLine;let i=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return i;let r=n.get(t.leaf);if(!r||r.length===0)return i;let s=null;for(let o of r){let a=Math.abs(o-t.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??i}function ve(e){let n=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,t=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,i=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,r=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,o=(a,c)=>{let l=s.get(a);if(!l){s.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 d of c.matchAll(n))d[1]&&o(d[1],a);for(let d of c.matchAll(t))d[1]&&o(d[1],a);let l=c.match(i);l?.[1]&&o(l[1],a);for(let d of c.matchAll(r))d[1]&&o(d[1],a)}return s}function Pe(e,n,t,i){let r=Math.max(t,Math.min(e.length-1,i)),s=Math.max(t,Math.min(r,n.endLine)),o=0,a=0,c=!1;for(let l=t;l<=r;l+=1){let d=Qe(e[l]??"");for(let f of d)f==="{"?(o+=1,c=!0):f==="}"?o=Math.max(0,o-1):f==="("?a+=1:f===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=s)return l}return s}function Qe(e){let n="",t=null,i=!1;for(let r=0;r<e.length;r+=1){let s=e[r],o=e[r+1];if(!t&&s==="/"&&o==="/"){n+=" ".repeat(e.length-r);break}if(t){if(i){i=!1,n+=" ";continue}if(s==="\\"){i=!0,n+=" ";continue}s===t&&(t=null),n+=" ";continue}if(s==='"'||s==="'"||s==="`"){t=s,n+=" ";continue}n+=s}return n}function y(e){return e.includes("().")}function _n(e){let n=u(e);if("kind"in n)return[];let t=[];for(let i=n.descriptors.length-2;i>=0;i-=1){let r=n.descriptors[i];r?.suffix==="type"&&r.name&&t.push(r.name)}return t}export{b as a,u as b,p as c,B as d,W as e,g as f,je as g,L as h,Be as i,We as j,Je as k,ze as l,He as m,Ue as n,Ke as o,G as p,U as q,F as r,gn as s,E as t,bn as u,he as v,yn as w,Sn as x,hn as y,Le as z,xn as A,Dn as B,_n as C};
117
- //# sourceMappingURL=chunk-7Z4GMCHM.js.map
@@ -1,57 +0,0 @@
1
- import{a as Z}from"./chunk-U2MNECDU.js";import{p as yt}from"./chunk-B3AREUQK.js";import{d as ft}from"./chunk-KK7GPALL.js";import{b as mt}from"./chunk-HW7FASEL.js";import{A as he,t as T}from"./chunk-7Z4GMCHM.js";import{a as me,f as k,g as D,i as M,j as ot,k as X,l as ut,p as ct,q as dt,v as pt,w as j}from"./chunk-6LS3IG2I.js";import{A as at,C as O,D as st,F as lt,M as ye,z as fe}from"./chunk-C7WSQA6A.js";import{A as it,c as Q,i as tt,w as nt,y as rt,z as pe}from"./chunk-JSHDCVUM.js";function ge(e){let t=e.replaceAll("\\","/");return mt(t)==="test"?/(?:^|\/)__fixtures__\//iu.test(t)?"fixture":"test":/(?:^|\/)(?:fixtures?|testdata)\//iu.test(t)?"fixture":/(?:^|\/)(?:examples?|demos?|previews?)\//iu.test(t)?"example":/(?:^|\/)(?:generated|dist|build|coverage)\//iu.test(t)||/\.generated\./iu.test(t)?"generated":/^(?:scripts?|tools?)\//iu.test(t)?"script":"production"}import cn from"better-sqlite3";var be="scip_query_runtime_boundaries",W="scip_query_runtime_observations",Se="scip_query_runtime_relation_groups",xe="scip_query_runtime_relation_participants";function dn(e,t){let n=new cn(e);try{n.exec(`
2
- CREATE TABLE IF NOT EXISTS ${be} (
3
- singleton INTEGER PRIMARY KEY CHECK (singleton = 1),
4
- schema_version INTEGER NOT NULL,
5
- extractor_version TEXT NOT NULL,
6
- payload TEXT NOT NULL
7
- )
8
- `),mn(n),n.transaction(()=>{n.prepare(`INSERT OR REPLACE INTO ${be} (singleton, schema_version, extractor_version, payload) VALUES (1, ?, ?, ?)`).run(t.schemaVersion,t.extractorVersion,JSON.stringify(t)),n.prepare(`DELETE FROM ${W}`).run(),n.prepare(`DELETE FROM ${xe}`).run(),n.prepare(`DELETE FROM ${Se}`).run();let r=n.prepare(`INSERT INTO ${W}
9
- (id, protocol, action, role, strength, source_scope, resolution, file, start_line, end_line, owner_symbol, payload)
10
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);for(let s of t.observations)r.run(s.id,s.protocol,s.action,s.role,s.strength,s.sourceScope,s.resolution,s.source.file,s.source.startLine,s.source.endLine,s.owner.symbol,JSON.stringify(s));let i=n.prepare(`INSERT INTO ${Se} (id, protocol, join_rule, normalized_key, payload) VALUES (?, ?, ?, ?, ?)`),a=n.prepare(`INSERT INTO ${xe} (group_id, observation_id, participant_role) VALUES (?, ?, ?)`);for(let s of t.relationGroups){i.run(s.id,s.protocol,s.joinRule,s.normalizedKey,JSON.stringify(s));for(let o of s.producerIds)a.run(s.id,o,"producer");for(let o of s.consumerIds)a.run(s.id,o,"consumer");for(let o of s.declarationIds)a.run(s.id,o,"declaration")}})()}finally{n.close()}}function pn(e,t={}){if(!fn(e,W))return ht(e)?.observations??[];let n=[],r=[];return ve(n,r,"protocol",t.protocols),ve(n,r,"action",t.actions),ve(n,r,"source_scope",t.sourceScopes),ve(n,r,"file",t.files),e.all(`SELECT payload FROM ${W}${n.length>0?` WHERE ${n.join(" AND ")}`:""} ORDER BY file, start_line, id`,...r).flatMap(a=>yn(a.payload))}function mn(e){e.exec(`
11
- CREATE TABLE IF NOT EXISTS ${W} (
12
- id TEXT PRIMARY KEY,
13
- protocol TEXT NOT NULL,
14
- action TEXT NOT NULL,
15
- role TEXT NOT NULL,
16
- strength TEXT NOT NULL,
17
- source_scope TEXT NOT NULL,
18
- resolution TEXT NOT NULL,
19
- file TEXT NOT NULL,
20
- start_line INTEGER NOT NULL,
21
- end_line INTEGER NOT NULL,
22
- owner_symbol TEXT,
23
- payload TEXT NOT NULL
24
- );
25
- CREATE INDEX IF NOT EXISTS idx_runtime_observations_protocol_action_scope
26
- ON ${W}(protocol, action, source_scope);
27
- CREATE INDEX IF NOT EXISTS idx_runtime_observations_file_line
28
- ON ${W}(file, start_line);
29
-
30
- CREATE TABLE IF NOT EXISTS ${Se} (
31
- id TEXT PRIMARY KEY,
32
- protocol TEXT NOT NULL,
33
- join_rule TEXT NOT NULL,
34
- normalized_key TEXT NOT NULL,
35
- payload TEXT NOT NULL
36
- );
37
- CREATE INDEX IF NOT EXISTS idx_runtime_groups_protocol_key
38
- ON ${Se}(protocol, join_rule, normalized_key);
39
-
40
- CREATE TABLE IF NOT EXISTS ${xe} (
41
- group_id TEXT NOT NULL,
42
- observation_id TEXT NOT NULL,
43
- participant_role TEXT NOT NULL,
44
- PRIMARY KEY (group_id, observation_id, participant_role)
45
- );
46
- CREATE INDEX IF NOT EXISTS idx_runtime_participants_observation
47
- ON ${xe}(observation_id, participant_role);
48
- `)}function fn(e,t){return!!e.get("SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?",t)}function ve(e,t,n,r){!r||r.length===0||(e.push(`${n} IN (${r.map(()=>"?").join(", ")})`),t.push(...r))}function yn(e){try{return[JSON.parse(e)]}catch{return[]}}function ht(e){if(!e.get("SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?",be))return null;let n=e.get(`SELECT schema_version, payload FROM ${be} WHERE singleton = 1`);if(!n||n.schema_version!==2)return null;try{let r=JSON.parse(n.payload);return r.schemaVersion===2&&Array.isArray(r.observations)&&Array.isArray(r.relationGroups)&&Array.isArray(r.links)?r:null}catch{return null}}import{createHash as de}from"crypto";import{createRequire as zr}from"module";import{createHash as $n}from"crypto";var Re=8;function ee(e,t,n){return De(gt(e,t,Oe(n),0,new Set))}function Ae(e,t,n){return Le(e,t,n,0,new Set)}function gt(e,t,n,r,i){if(r>Re)return[];let a=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(n);return a?vt(e,t,a[1],a[2],r,i):/^[A-Za-z_$][\w$]*$/u.test(n)?bt(e,t,n,r,i):[]}function vt(e,t,n,r,i,a){let s=[];for(let o of Le(e,t,n,i+1,new Set(a))){let l=M(o.initializer);for(let u of l.namedChildren){if(u.type==="pair"){let c=u.childForFieldName("key")??u.namedChild(0);if(Sn(c)!==r)continue;let d=u.childForFieldName("value")??u.namedChild(1);d&&s.push(...gt(e,o.definition.relativePath,Oe(d.text),i+1,new Set(a)));continue}if(/(?:method|function)/u.test(u.type)){if((u.childForFieldName("name")??u.namedChild(0))?.text!==r)continue;let d=vn(e,o.definition.relativePath,r,u);s.push(...d.length>0?d:[hn(o.definition,r,u)]);continue}if(u.type==="spread_element"){let c=u.namedChild(0);if(!c)continue;for(let d of Le(e,o.definition.relativePath,Oe(c.text),i+1,new Set(a)))s.push(...vt(e,d.definition.relativePath,d.definition.leaf,r,i+1,new Set(a)))}}}return De(s)}function hn(e,t,n){return{documentId:e.documentId,symbolId:-1,symbol:`source-callable:${e.relativePath}:${n.startPosition.row}:${t}`,relativePath:e.relativePath,startLine:n.startPosition.row,startChar:n.startPosition.column,endLine:n.endPosition.row,endChar:n.endPosition.column,leaf:t,parentTypeName:e.leaf,isFunctionLike:!0,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:e.symbol}}function Le(e,t,n,r,i){return r>Re||!/^[A-Za-z_$][\w$]*$/u.test(n)?[]:bt(e,t,n,r,i).flatMap(a=>{let s=O(e,a.relativePath)?.rootNode,o=s?bn(s,a.leaf):null;return o?[{definition:a,initializer:o}]:[]})}function bt(e,t,n,r,i){if(r>Re)return[];let a=`${t}\0${n}`;if(i.has(a))return[];i.add(a);let s=T(e,t).filter(u=>u.leaf===n);if(s.length>0)return s;let o=gn(e,t,n);if(o.length>0)return o;let l=j(e,t).find(u=>u.localName===n&&u.sourcePath);if(l?.sourcePath){let u=l.kind==="namespace"||l.importedName==="default"?n:l.importedName;return ke(e,l.sourcePath,u,r+1,new Set(i))}return ke(e,t,n,r+1,new Set(i))}function gn(e,t,n){let r=e.get("SELECT id FROM documents WHERE relative_path = ?",t)?.id;return r===void 0?[]:(ut(e,t)?.callables??[]).filter(i=>i.name===n).map(i=>({documentId:r,symbolId:-1,symbol:`source-callable:${t}:${i.startLine}:${n}`,relativePath:t,startLine:i.startLine,startChar:0,endLine:i.endLine,endChar:0,leaf:n,parentTypeName:null,isFunctionLike:!0,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null}))}function ke(e,t,n,r,i){if(r>Re)return[];let a=T(e,t).filter(s=>s.leaf===n);return a.length>0?a:De(pt(e,t).flatMap(s=>s.sourcePath?s.kind==="named"&&!s.names.includes(n)?[]:ke(e,s.sourcePath,n,r+1,new Set(i)):[]))}function vn(e,t,n,r){return T(e,t).filter(i=>i.leaf===n&&i.startLine<=r.startPosition.row&&i.endLine>=r.endPosition.row)}function bn(e,t){let n=null;return k(e,r=>{n||r.type!=="variable_declarator"||(r.childForFieldName("name")??r.namedChild(0))?.text.trim()!==t||(n=r.childForFieldName("value")??r.namedChild(1))}),n}function Sn(e){return e?.text.replace(/^['"`]|['"`]$/gu,"")??null}function Oe(e){return e.replace(/\s+/gu,"").replace(/^\.\.\./u,"")}function De(e){return[...new Map(e.map(t=>[t.symbol,t])).values()]}var xn=8;function V(e,t){return t?te(e,t,0,new Set):null}function te(e,t,n,r){if(n>xn)return U(t,"value-evaluation-depth");let i=M(t),a=Pn(i);if(a)return wn(e.file,i,a.term,a.value,a.precision);if(i.type==="binary_expression"&&/\+/u.test(i.text)){let l=i.namedChildren.map(u=>te(e,u,n+1,new Set(r)));if(l.length>=2&&l.every(u=>u!==null)){let u={kind:"concat",parts:l.map(d=>d.term)},c=l.map(d=>d.value).join("");return En(e.file,i,u,c,l.some(d=>d.precision!=="literal")?"constrained-pattern":"literal",l)}}let s=i.text.trim();if(/^[A-Za-z_$][\w$]*$/u.test(s))return Bn(e,s,i,n,r);let o=Fn(i);return o?In(e,o.base,o.properties,i,n,r):i.type==="call_expression"||i.type==="call"?Rn(e,i,n,r):U(i,`unsupported-expression:${i.type}`)}function Rn(e,t,n,r){let a=(t.childForFieldName("function")??t.namedChild(0))?.text.replace(/\s+/gu,"").replace(/<.*>$/u,"")??"",s=Cn(e,a);if(s.length!==1)return U(t,s.length===0?"call-target-unresolved":"call-target-ambiguous");let o=s[0],l=`${o.relativePath}\0${o.symbol}`;if(r.has(l))return U(t,"call-return-cycle");let u=O(e.db,o.relativePath)?.rootNode;if(!u)return U(t,"call-target-unparsed");let c=D(u,o.startLine,o.endLine);if(!c)return U(t,"call-target-syntax-unavailable");let d=Nn(c);if(!d)return U(t,"call-return-not-single-expression");let p=new Set(r);p.add(l);let m=te({db:e.db,file:o.relativePath,root:u},d,n+1,p);return m?Ce(t,"bounded-call-return",m,o.symbol):U(t,"call-return-unresolved")}function Cn(e,t){if(/^[A-Za-z_$][\w$]*$/u.test(t)){let i=T(e.db,e.file).filter(s=>s.isFunctionLike&&s.leaf===t);if(i.length>0)return i;let a=j(e.db,e.file).find(s=>s.localName===t&&s.sourcePath&&s.kind!=="namespace");return a?.sourcePath?Z(e.db,a.sourcePath,a.importedName==="default"?t:a.importedName).filter(s=>s.isFunctionLike):[]}let n=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(t);if(!n)return[];let r=j(e.db,e.file).find(i=>i.kind==="namespace"&&i.localName===n[1]&&i.sourcePath);return r?.sourcePath?Z(e.db,r.sourcePath,n[2]).filter(i=>i.isFunctionLike):[]}function Nn(e){let t=e.childForFieldName("body");if(e.type==="arrow_function"&&t&&t.type!=="statement_block")return t;let n=[];return St(t??e,t??e,n),n.length!==1?null:n[0].childForFieldName("argument")??n[0].namedChild(0)}function St(e,t,n){if(!(t!==e&&(/(?:function|method|lambda)/u.test(t.type)||t.type==="arrow_function"))){if(t.type==="return_statement"){n.push(t);return}for(let r of t.namedChildren)St(e,r,n)}}function Bn(e,t,n,r,i){let a=`${e.file}\0${t}`;if(i.has(a))return U(n,"value-cycle");i.add(a);let s=Me(e.root,t);if(s){let y=te(e,s,r+1,i);return y?Ce(n,"local-constant",y):U(n,"non-foldable-local")}let o=j(e.db,e.file).find(y=>y.localName===t&&y.sourcePath);if(!o?.sourcePath)return H(n,t,"unresolved-identifier");if(o.kind==="namespace")return H(n,t,"namespace-import-requires-property");let l=o.importedName==="default"?t:o.importedName,u=Z(e.db,o.sourcePath,l);if(u.length!==1)return H(n,t,u.length===0?"import-definition-missing":"import-definition-ambiguous");let c=u[0],d=O(e.db,c.relativePath)?.rootNode;if(!d)return H(n,c.symbol,"import-definition-unparsed");let p=Me(d,c.leaf);if(!p)return H(n,c.symbol,"import-definition-non-value");let m=te({db:e.db,file:c.relativePath,root:d},p,r+1,i);return m?Ce(n,"imported-constant",m,c.symbol):H(n,c.symbol,"import-value-unresolved")}function In(e,t,n,r,i,a){let s=j(e.db,e.file).find(m=>m.localName===t&&m.sourcePath),o=e.file,l=t,u;if(s?.sourcePath){s.kind==="namespace"?(l=n[0]??"",n=n.slice(1)):l=s.importedName==="default"?t:s.importedName;let m=Z(e.db,s.sourcePath,l);if(m.length!==1)return H(r,`${t}.${n.join(".")}`,m.length===0?"member-definition-missing":"member-definition-ambiguous");o=m[0].relativePath,l=m[0].leaf,u=m[0].symbol}let c=o===e.file?e.root:O(e.db,o)?.rootNode;if(!c)return H(r,u??t,"member-definition-unparsed");let d=Me(c,l);if(!d)return H(r,u??t,"member-base-non-value");for(let m of n){let y=M(d);if(d=Tn(y,m),!d)return H(r,u??`${t}.${n.join(".")}`,`member-property-missing:${m}`)}let p=te({db:e.db,file:o,root:c},d,i+1,a);return p?Ce(r,"member-constant",p,u):H(r,u??t,"member-value-unresolved")}function Pn(e){let t=e.text.trim(),n=t[0];if(n!=="'"&&n!=='"'&&n!=="`"||t.at(-1)!==n)return null;let r=t.slice(1,-1);if(n!=="`"||!r.includes("${"))return{term:{kind:"literal",value:r},value:r,precision:"literal"};let i=[],a=0,s=/\$\{([^}]*)\}/gu;for(let o of r.matchAll(s)){let l=o.index??0;l>a&&i.push({kind:"literal",value:r.slice(a,l)}),i.push({kind:"unknown",reason:`template-hole:${o[1]?.trim()||"expression"}`}),a=l+o[0].length}return a<r.length&&i.push({kind:"literal",value:r.slice(a)}),{term:{kind:"pattern",language:"template",value:r.replace(s,"{}")},value:r.replace(s,"{}"),precision:"constrained-pattern"}}function wn(e,t,n,r,i){return{value:r,evidence:"literal",term:n,precision:i,derivation:Ne("direct-literal","direct",e,t)}}function En(e,t,n,r,i,a){return{value:r,evidence:"constant",term:n,precision:i,derivation:{...Ne("constant-concatenation","mechanically-derived",e,t),inputFactIds:a.flatMap(s=>s.derivation.inputFactIds),sourceSpans:a.flatMap(s=>s.derivation.sourceSpans)}}}function Ce(e,t,n,r){return n.evidence==="expression"?{...n,derivation:{kind:"heuristic",rule:t,ruleVersion:"1",inputFactIds:[...n.derivation.inputFactIds,...r?[r]:[]],sourceSpans:n.derivation.sourceSpans}}:{...n,evidence:"constant",derivation:{kind:"mechanically-derived",rule:t,ruleVersion:"1",inputFactIds:[...n.derivation.inputFactIds,...r?[r]:[]],sourceSpans:n.derivation.sourceSpans}}}function H(e,t,n){return{value:e.text.trim(),evidence:"expression",term:{kind:"symbol",symbol:t},precision:"symbolic",derivation:Ne(n,"heuristic","",e)}}function U(e,t){return{value:e.text.trim(),evidence:"expression",term:{kind:"unknown",reason:t},precision:"unknown",derivation:Ne(t,"heuristic","",e)}}function Ne(e,t,n,r){return{kind:t,rule:e,ruleVersion:"1",inputFactIds:[],sourceSpans:n?[{file:n,startLine:r.startPosition.row,endLine:r.endPosition.row}]:[]}}function Fn(e){let t=e.text.replace(/\s+/gu,"");if(!/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+$/u.test(t))return null;let[n,...r]=t.split(".");return n?{base:n,properties:r}:null}function Me(e,t){let n=null;return k(e,r=>{if(n||r.type!=="variable_declarator"||(r.childForFieldName("name")??r.namedChild(0))?.text.trim()!==t)return;let a=r.parent;!a||a.type!=="lexical_declaration"||!/^\s*(?:export\s+)?const\b/u.test(a.text)||(n=r.childForFieldName("value")??r.namedChild(1))}),n}function Tn(e,t){for(let n of e.namedChildren)if(!(n.type!=="pair"||(n.childForFieldName("key")??n.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")!==t))return n.childForFieldName("value")??n.namedChild(1);return null}var _n=new WeakMap,wt=new Set(["delete","get","head","options","patch","post","put"]),Ln=/(?:^|\.)(?:app|router|server)$/u,kn=new Set(["findFirst","findMany","findUnique","from","get","select"]),On=new Set(["create","delete","insert","remove","update","upsert"]),An=new Set(["execute","query","raw"]),xt=/(?:\b(?:name|id)|['"`](?:name|id)['"`])\s*:/u,Rt=/(?:^\s*|[,{]\s*)(?:async\s+)?['"`]?(?:execute|handler|invoke|run)['"`]?\s*(?::|\([^)]*\)\s*\{)/mu,Ct=/\b[A-Za-z_$][\w$-]*[_-][\w$-]*\s*\(/u,Nt=/\b(?:use|call|invoke|run|via|with|read|stop)(?:\s+the)?(?:\s+(?:tool|capability|command))?\s+[A-Za-z_$][\w$-]*\s*\(/iu,Ue=[Vn(),Hn(),Dn(),Un(),jn(),zn(),Kn()],Ve=new Set(["exec","execFile","execFileSync","execSync","fork","spawn","spawnSync"]);function Dn(){return{id:"builtin.node-child-process",supports:e=>/(?:from\s*|require\s*\(\s*)['"](?:node:)?child_process['"]/u.test(e)&&/\b(?:exec|execFile|execFileSync|execSync|fork|spawn|spawnSync)\s*\(/u.test(e),extract:e=>{let t=Mn(e.source),n=[];return q(e.root,"call_expression",r=>{let i=oe(r);if(!i)return;let a=t.direct.get(i),s=/^(.*?)\.([A-Za-z_$][\w$]*)$/u.exec(i),o=s&&t.namespaces.has(s[1])?s[2]:null,l=a??o;if(!l||!Ve.has(l))return;let u=Y(r),c=A(u[0],e)??{value:u[0]?.text.trim()||"<missing>",evidence:"expression"},d=["exec","execFile","execFileSync","execSync"].includes(l)?"process.exec":"process.spawn";n.push(E(e,r,"builtin.node-child-process",d,[{name:"operation",value:l,evidence:"literal"},{name:"executable",...c}],"exact","node-child-process-import"))}),n}}}function Mn(e){let t=new Map,n=new Set,r=String.raw`['"](?:node:)?child_process['"]`,i=new RegExp(String.raw`\bimport\s*\{([^}]*)\}\s*from\s*${r}`,"gu");for(let l of e.matchAll(i))for(let u of(l[1]??"").split(",")){let c=/^\s*([A-Za-z_$][\w$]*)(?:\s+as\s+([A-Za-z_$][\w$]*))?\s*$/u.exec(u);c&&Ve.has(c[1])&&t.set(c[2]??c[1],c[1])}let a=new RegExp(String.raw`\b(?:const|let)\s*\{([^}]*)\}\s*=\s*require\s*\(\s*${r}\s*\)`,"gu");for(let l of e.matchAll(a))for(let u of(l[1]??"").split(",")){let c=/^\s*([A-Za-z_$][\w$]*)(?:\s*:\s*([A-Za-z_$][\w$]*))?\s*$/u.exec(u);c&&Ve.has(c[1])&&t.set(c[2]??c[1],c[1])}let s=new RegExp(String.raw`\bimport\s*\*\s*as\s*([A-Za-z_$][\w$]*)\s*from\s*${r}`,"gu");for(let l of e.matchAll(s))n.add(l[1]);let o=new RegExp(String.raw`\b(?:const|let)\s+([A-Za-z_$][\w$]*)\s*=\s*require\s*\(\s*${r}\s*\)`,"gu");for(let l of e.matchAll(o))n.add(l[1]);return{direct:t,namespaces:n}}function L(e,t,n,r){let i=re(r,"runtime-boundaries.context.ast",t,()=>n===void 0?O(e,t):st(e,t,n)?.tree);if(!i)return null;let a=i.rootNode;n!==void 0&&_n.set(a,i);let s=n??pe(e,t),o,l,u,c=()=>(l!==void 0||(l=re(r,"runtime-boundaries.context.callable-sites",t,()=>{let d=fe(t);return(d?dt(a,d):null)??ct(e,t)})),l);return{db:e,file:t,source:s,root:a,get constants(){return u??=re(r,"runtime-boundaries.context.constants",t,()=>Qn(a)),u},ownerAt:d=>{let m=(o??=re(r,"runtime-boundaries.context.definitions",t,()=>T(e,t,{rangeCorrectionEvidence:{source:s,callables:c()}},(f,h)=>re(r,`runtime-boundaries.context.definitions.${f}`,t,h)))).filter(f=>f.startLine<=d&&f.endLine>=d).sort((f,h)=>f.endLine-f.startLine-(h.endLine-h.startLine)||f.startLine-h.startLine)[0];if(m)return{file:t,symbol:m.symbol,name:m.leaf,startLine:m.startLine,endLine:m.endLine};let v=(c()??[]).filter(f=>f.startLine<=d&&f.endLine>=d).sort((f,h)=>f.endLine-f.startLine-(h.endLine-h.startLine)||f.startLine-h.startLine)[0];return{file:t,symbol:null,name:v?.name??null,startLine:v?.startLine??d,endLine:v?.endLine??d}}}}function re(e,t,n,r){return e?e(t,r,{file:n}):r()}function Hn(){return{id:"builtin.effect-httpapi",supports:e=>ie(e,"HttpApiEndpoint").size>0||ie(e,"HttpApiBuilder").size>0,extract:e=>{let t=[],n=ie(e.source,"HttpApiEndpoint"),r=ie(e.source,"HttpApiGroup"),i=ie(e.source,"HttpApiBuilder");return q(e.root,"call_expression",a=>{let s=Et(a);if(!s)return;let o=Y(a);if(n.has(s.receiver)&&wt.has(s.member)){let v=A(o[0],e),f=A(o[1],e),h=It(a,r,"make",0,e);if(!v||!f||!h)return;let g=s.member.toUpperCase();t.push(E(e,a,"builtin.effect-httpapi","http.handle",[{name:"method",value:g,evidence:"literal"},{name:"path",...f}],G([{name:"path",...f}]),"effect-httpapi-endpoint-declaration")),t.push(E(e,a,"builtin.effect-httpapi","framework.declare",He(h,v),G(He(h,v)),"effect-httpapi-operation-declaration"));return}if(!["handle","handleRaw"].includes(s.member))return;let l=It(a,i,"group",1,e),u=A(o[0],e),c=o[1];if(!l||!u||!c)return;let d=He(l,u),p=ee(e.db,e.file,c.text),m=E(e,a,"builtin.effect-httpapi","framework.handle",d,p.length===1?G(d):"candidate","effect-httpapi-handler-registration"),y=p[0];p.length===1&&y&&(m.owner={file:y.relativePath,symbol:y.symbol,name:y.leaf,startLine:y.startLine,endLine:y.endLine}),t.push(m)}),t}}}function He(e,t){return[{name:"adapter",value:"effect-httpapi",evidence:"literal"},{name:"group",...e},{name:"operation",...t}]}function ie(e,t){let n=new Set,r=/\bimport\s*\{([\s\S]*?)\}\s*from\s*['"]([^'"]+)['"]/gu;for(let a of e.matchAll(r)){let s=a[2]??"";if(Bt(s))for(let o of(a[1]??"").split(",")){let l=o.trim().replace(/^type\s+/u,""),u=/^([A-Za-z_$][\w$]*)(?:\s+as\s+([A-Za-z_$][\w$]*))?$/u.exec(l);u?.[1]===t&&n.add(u[2]??u[1])}}let i=/\bimport\s*\*\s*as\s*([A-Za-z_$][\w$]*)\s*from\s*['"]([^'"]+)['"]/gu;for(let a of e.matchAll(i)){let s=a[2]??"";s.endsWith(`/${t}`)&&Bt(s)&&n.add(a[1])}return n}function Bt(e){return e==="effect/unstable/httpapi"||e==="@effect/platform"||e.startsWith("@effect/platform/HttpApi")}function It(e,t,n,r,i){let a=e.parent;for(;a;){if(a.type==="call_expression"){let s=Pt(a,t,n,r,i);if(s)return s;let o=a.childForFieldName("function")??a.namedChild(0),l=null;if(o&&je(o,u=>{!l&&u.type==="call_expression"&&(l=Pt(u,t,n,r,i))}),l)return l}a=a.parent}return null}function Pt(e,t,n,r,i){let a=Et(e);return!a||a.member!==n||!t.has(a.receiver)?null:A(Y(e)[r],i)}function Et(e){let t=e.childForFieldName("function")??e.namedChild(0);if(!t||!["member_expression","subscript_expression"].includes(t.type))return null;let n=t.childForFieldName("object")??t.namedChild(0),r=t.childForFieldName("property")??t.childForFieldName("index")??t.namedChild(1);return!n||!r?null:{receiver:n.text.replace(/\s+/gu,""),member:r.text.replace(/^['"`]|['"`]$/gu,"")}}function Vn(){return{id:"builtin.http",supports:e=>/\bfetch\s*\(|\baxios\b|\b(?:app|router|server)\s*\.\s*(?:get|post|put|patch|delete|options|head)\s*\(/u.test(e)||ae(e,["axios"])||/\b(?:FastAPI|Flask|APIRouter|axum|Router::new)\b/u.test(e),extract:e=>{let t=[];return q(e.root,["decorator","call_expression"],n=>{if(n.type==="decorator"){let p=/^@[^\s(]+\.(get|post|put|patch|delete|options|head)\s*\(\s*(['"`])([^'"`]+)\2/iu.exec(n.text.trim());if(!p||!ae(e.source,["fastapi","flask"]))return;t.push(E(e,n,"builtin.http","http.handle",[{name:"method",value:p[1].toUpperCase(),evidence:"literal"},{name:"path",value:p[3],evidence:"literal"}],"exact","framework-decorator"));return}if(n.type!=="call_expression")return;let r=oe(n);if(!r)return;let i=r.split(".").at(-1)?.toLowerCase()??"",a=r.includes(".")?r.slice(0,r.lastIndexOf(".")):"",s=Y(n);if(i==="route"&&ae(e.source,["axum"])){let p=A(s[0],e),m=/^\s*(get|post|put|patch|delete|options|head)\s*\(/iu.exec(s[1]?.text??"")?.[1];if(!p||!m)return;t.push(E(e,n,"builtin.http","http.handle",[{name:"method",value:m.toUpperCase(),evidence:"literal"},{name:"path",...p}],G([{name:"path",...p}]),"framework-adapter"));return}if(r==="fetch"||r.endsWith(".fetch")){let p=A(s[0],e);if(!p)return;let y=/\bmethod\s*:\s*['"`]([A-Za-z]+)['"`]/u.exec(s[1]?.text??"")?.[1]?.toUpperCase()??(s[1]?null:"GET"),v=[...y?[{name:"method",value:y,evidence:"literal"}]:[],{name:"path",...p}];t.push(E(e,n,"builtin.http","http.request",v,y?G(v):"candidate","call-expression"));return}if(!wt.has(i))return;let o=A(s[0],e);if(!o)return;let l=i.toUpperCase();if(Ln.test(a)&&ae(e.source,["express","fastify","hono","koa-router","@koa/router"])){t.push(E(e,n,"builtin.http","http.handle",[{name:"method",value:l,evidence:"literal"},{name:"path",...o}],G([{name:"path",...o}]),"framework-adapter"));return}let c=Wn(e.source,["axios"]),d=a.split(".")[0]??"";c.has(d)&&t.push(E(e,n,"builtin.http","http.request",[{name:"method",value:l,evidence:"literal"},{name:"path",...o}],G([{name:"path",...o}]),"client-adapter"))}),t}}}function Un(){return{id:"builtin.capability-registry",supports:e=>xt.test(e)&&Rt.test(e)||Ct.test(e)||Nt.test(e),extract:e=>{let t=[],n=new Set,r=[];return xt.test(e.source)&&Rt.test(e.source)&&r.push("pair"),(Ct.test(e.source)||Nt.test(e.source))&&r.push("string","string_literal","template_string"),q(e.root,r,i=>{if(i.type==="pair"){let s=i.childForFieldName("key")??i.namedChild(0),o=i.childForFieldName("value")??i.namedChild(1),l=s?.text.replace(/^['"`]|['"`]$/gu,"");if(l!=="name"&&l!=="id")return;let u=Ft(o,e),c=tr(i);if(!u||u.evidence!=="literal"||!c)return;let d=`handle\0${u.value}\0${c.startPosition.row}`;if(n.has(d))return;n.add(d),t.push(E(e,c,"builtin.capability-registry","registry.handle",[{name:"key",...u}],"exact","capability-descriptor"));return}if(!["string","string_literal","template_string"].includes(i.type))return;let a=i.text.replace(/^['"`]|['"`]$/gu,"");for(let s of a.matchAll(/\b([A-Za-z_$][\w$-]*)\s*\(/gu)){let o=s[1];if(!Gn(a,o,s.index))continue;let l=`reference\0${o}\0${i.startPosition.row}`;n.has(l)||(n.add(l),t.push(E(e,i,"builtin.capability-registry","registry.reference",[{name:"key",value:o,evidence:"literal"}],"exact","capability-instruction-reference")))}}),t}}}function Gn(e,t,n){if(t.includes("_")||t.includes("-"))return!0;let r=e.slice(Math.max(0,n-64),n);return/\b(?:use|call|invoke|run|via|with|read|stop)(?:\s+the)?(?:\s+(?:tool|capability|command))?\s*$/iu.test(r)}function jn(){return{id:"builtin.registry",supports:e=>/(?:Handlers?|Registry|Routes?)\b/iu.test(e),extract:e=>{let t=[];return q(e.root,["pair","call_expression"],n=>{if(n.type==="pair"){let a=er(n);if(!a)return;let s=n.childForFieldName("key")??n.namedChild(0),o=n.childForFieldName("value")??n.namedChild(1),l=Ft(s,e);if(!l||!o||!Tt(o))return;let u=Ge(o)?"exact":"candidate";t.push(E(e,n,"builtin.registry","registry.handle",[{name:"registry",value:a,evidence:"identifier"},{name:"key",...l}],G([{name:"key",...l}],u),"object-member"));return}if(n.type!=="call_expression")return;let r=n.childForFieldName("function")??n.namedChild(0);if(!r)return;let i=/^([A-Za-z_$][\w$]*)\s*\[\s*(['"`])([^'"`]+)\2\s*\]$/u.exec(r.text.trim());i&&t.push(E(e,n,"builtin.registry","registry.dispatch",[{name:"registry",value:i[1],evidence:"identifier"},{name:"key",value:i[3],evidence:"literal"}],"exact","indexed-access-call"))}),t}}}function zn(){return{id:"builtin.persistence",supports:e=>/\b(?:db|database|prisma|drizzle|[A-Za-z_$][\w$]*(?:Repository|Repo))\b[^;]{0,1024}?\.\s*(?:findFirst|findMany|findUnique|from|get|select|create|delete|insert|remove|update|upsert|execute|query|raw|transaction)(?:\s*<[^()]{1,512}>)?\s*\(/iu.test(e),extract:e=>{let t=[],n=rr(e.root);return q(e.root,"call_expression",r=>{let i=oe(r);if(!i)return;let a=i.split("."),s=a.at(-1)??"",o=Y(r),l=o[0]?.text??"",u=nr(s,l);if(!u)return;let c=$t(a,n);if(!c)return;let d=qn(o[0],e)??ir(l),p=ar(c,a,s,d);if(!p)return;let m=s==="insert"?"persistence-insert":u==="database.read"&&/\bFOR\s+UPDATE\s+SKIP\s+LOCKED\b/iu.test(l)?"persistence-skip-locked-claim":"persistence-adapter";t.push(E(e,r,"builtin.persistence",u,[{name:"resource",...p}],G([{name:"resource",...p}]),m))}),t}}}function qn(e,t){if(!e)return null;let n=e.text.replace(/\s+/gu,"");return/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/u.test(n)?{value:n.split(".").at(-1),evidence:"identifier",term:{kind:"symbol",symbol:n}}:A(e,t)}function Kn(){return{id:"builtin.queue",supports:e=>ae(e,["amqplib","bullmq","kafkajs","@aws-sdk/client-sqs","rabbitmq"])&&/\.(?:sendToQueue|consume|send|subscribe)\s*\(/u.test(e),extract:e=>{let t=[];return q(e.root,"call_expression",n=>{let r=oe(n);if(!r)return;let i=r.split(".").at(-1)??"",a=Y(n),s=i==="sendToQueue"||i==="send"?"queue.send":i==="consume"||i==="subscribe"?"queue.consume":null;if(!s)return;let o=i==="send"||i==="subscribe"?Yn(a[0],"topic",e):A(a[0],e);o&&t.push(E(e,n,"builtin.queue",s,[{name:"address",...o}],G([{name:"address",...o}]),"framework-adapter"))}),t}}}function E(e,t,n,r,i,a,s){let o=e.ownerAt(t.startPosition.row),l=JSON.stringify({extractor:n,action:r,file:e.file,line:t.startPosition.row,keyParts:i});return{id:`boundary:${$n("sha256").update(l).digest("hex").slice(0,16)}`,extractor:n,action:r,owner:o,source:{file:e.file,startLine:t.startPosition.row,endLine:t.endPosition.row},keyParts:i,evidence:s,strength:a,protocol:r.split(".")[0]??r,role:Xn(r),executionDomain:Zn(e.file),derivation:{kind:a==="candidate"?"heuristic":a==="derived"?"mechanically-derived":"direct",rule:s,ruleVersion:"1",inputFactIds:i.flatMap(u=>u.derivation?.inputFactIds??[]),sourceSpans:[{file:e.file,startLine:t.startPosition.row,endLine:t.endPosition.row},...i.flatMap(u=>u.derivation?.sourceSpans??[])]},valuePrecision:i.some(u=>u.evidence==="expression")?"unknown":i.some(u=>u.evidence==="identifier")?"symbolic":"literal",modality:"may",resolution:"unresolved",sourceScope:ge(e.file)}}function Xn(e){let t=e.split(".").at(-1)??e;return["handle","subscribe","consume","read"].includes(t)?"consumer":["request","publish","send","write","dispatch","reference","invoke","spawn","exec"].includes(t)?"producer":"observe"}function Zn(e){let t=e.replaceAll("\\","/"),n=/^(apps|services|packages)\/([^/]+)/u.exec(t);return n?`${n[1]}/${n[2]}`:null}function ae(e,t){return t.some(n=>{let r=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`(?:\\bfrom\\s+${r}\\b|\\buse\\s+${r}\\b|(?:\\bfrom\\s*|\\brequire\\s*\\(\\s*)['"]${r}(?:[/']|"))`,"u").test(e)})}function Wn(e,t){let n=new Set;for(let r of t){let i=r.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),a=new RegExp(`(?:import\\s+([A-Za-z_$][\\w$]*)[^;]*?\\sfrom\\s*|(?:const|let)\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*require\\s*\\(\\s*)['"]${i}(?:[/']|")`,"gu");for(let s of e.matchAll(a)){let o=s[1]??s[2];o&&n.add(o)}}return n}function Be(e,t,n,r,i,a,s){return E(e,t,n,r,i,a,s)}function oe(e){return(e.childForFieldName("function")??e.namedChild(0))?.text.replace(/\s+/gu,"")??null}function Y(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function A(e,t){let n=V(t,e);return n?{value:n.value,evidence:n.evidence,term:n.term,derivation:n.derivation}:null}function Yn(e,t,n){if(!e)return null;let r=e.namedChildren.find(a=>a.type!=="pair"?!1:(a.childForFieldName("key")??a.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")===t),i=r?.childForFieldName("value")??r?.namedChild(1);return A(i,n)}function Ft(e,t){if(!e)return null;let n=A(e,t);if(n?.evidence==="literal"||n?.evidence==="constant")return n;let r=e.text.trim();return/^[A-Za-z_$][\w$]*$/u.test(r)?{value:r,evidence:"identifier",term:{kind:"symbol",symbol:r}}:n}function G(e,t="exact"){return t==="candidate"||e.some(n=>n.evidence==="expression")?"candidate":t==="derived"||e.some(n=>n.evidence==="constant")?"derived":"exact"}function Jn(e){let t=e.text.trim(),n=t[0];if(n!=="'"&&n!=='"'&&n!=="`"||t.at(-1)!==n)return null;let r=t.slice(1,-1);return n==="`"&&r.includes("${")?null:r}function Qn(e){let t=new Map;return je(e,n=>{if(n.type!=="variable_declarator")return;let r=n.childForFieldName("name")??n.namedChild(0),i=n.childForFieldName("value")??n.namedChild(1);if(!r||!i||!/^[A-Za-z_$][\w$]*$/u.test(r.text))return;let a=Jn(i);a!==null&&t.set(r.text,a)}),t}function er(e){let t=e.parent,n=t?.parent??null;for(;n&&["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(n.type);)n=n.parent;if(!t||!n||n.type!=="variable_declarator")return null;let i=(n.childForFieldName("name")??n.namedChild(0))?.text??"";return/(?:handlers?|registry|routes?)$/iu.test(i)?i:null}function Ge(e){return/(?:function|lambda|method)/u.test(e.type)||e.type==="arrow_function"}function Tt(e){return Ge(e)||e.type==="member_expression"?!0:e.type==="identifier"&&/(?:command|controller|dispatch|handle|handler)/iu.test(e.text)}function tr(e){let t=e.parent;for(;t&&t.type!=="variable_declarator";){if(["object","object_literal","dictionary"].includes(t.type))for(let n of t.namedChildren){if(n.type==="pair"){let i=n.childForFieldName("key")??n.namedChild(0),a=n.childForFieldName("value")??n.namedChild(1),s=i?.text.replace(/^['"`]|['"`]$/gu,"");if(s&&["execute","handler","invoke","run"].includes(s)&&a&&Tt(a))return t}let r=n.childForFieldName("name")??n.namedChild(0);if(r&&["execute","handler","invoke","run"].includes(r.text.replace(/^['"`]|['"`]$/gu,""))&&/(?:function|method)/u.test(n.type))return t}t=t.parent}return null}function $t(e,t=new Set){let n=e.slice(0,-1).map(r=>r.replace(/\([^)]*\)/gu,""));return n.some(r=>/^(?:prisma|drizzle)$/iu.test(r))?"orm":n.some(r=>/(?:Repository|Repo)$/u.test(r))?"repository":n.some(r=>/^(?:db|database)$/iu.test(r)||t.has(r))?"database":null}function nr(e,t){if(kn.has(e))return"database.read";if(On.has(e))return"database.write";if(!An.has(e))return null;let n=/\b(SELECT|INSERT|UPDATE|DELETE)\b/iu.exec(t)?.[1]?.toUpperCase();return n==="SELECT"?"database.read":n?"database.write":null}function rr(e){let t=new Set;return q(e,"call_expression",n=>{let r=oe(n);if(!r)return;let i=r.split(".");if(!(i.at(-1)!=="transaction"||!$t(i)))for(let a of Y(n)){if(!Ge(a))continue;let o=(a.childForFieldName("parameters")??a.namedChildren.find(u=>/parameters/u.test(u.type)))?.namedChildren[0],l=o?ot(o):null;l&&t.add(l)}}),t}function ir(e){let t=_t(e);return t?{value:t,evidence:"identifier",term:{kind:"symbol",symbol:t}}:null}function ar(e,t,n,r){if(e==="orm"&&t.length>=3)return{value:t.at(-2).replace(/\([^)]*\)/gu,""),evidence:"identifier"};if(e==="repository"){let a=t.at(-2)?.replace(/(?:Repository|Repo)$/u,"");return a?{value:a,evidence:"identifier"}:null}if(!r)return null;if(n==="from"||n==="insert")return r;let i=_t(r.value);return i?{value:i,evidence:r.evidence}:null}function _t(e){return/\b(?:from|into|update|table)\s+(?:\$\{\s*)?['"`]?([A-Za-z_$][\w$.-]*)/iu.exec(e)?.[1]??null}function je(e,t){t(e);for(let n of e.namedChildren)je(n,t)}function q(e,t,n){for(let r of e.descendantsOfType(t))n(r)}var or=Q("resolved-call-syntax",{clearGroups:[]}),ze=Q("resolved-call-sites",{clearGroups:[]}),sr=Q("resolved-call-sites-reference-evidence",{clearGroups:[]});function qe(e,t){return ze.get(e,t.symbolId,()=>kt(e,t,lr(e,t)))}function Lt(e,t){let n=[...new Map(t.map(a=>[a.symbolId,a])).values()],r=n.filter(a=>!ze.has(e,a.symbolId)),i=Ot(e,r);return new Map(n.map(a=>[a.symbolId,ze.get(e,a.symbolId,()=>kt(e,a,i.get(a.symbolId)??[]))]))}function kt(e,t,n){let r=[],i=[],a=new Set,s=new Set;for(let o of n){a.add(o.file);let l=or.get(e,o.file,()=>cr(e,o.file));if(!l){i.push({callee:t,file:o.file,line:o.startLine,reason:"ast-unavailable",candidates:0,referenceProvenance:o.provenance});continue}let u=(l.byLeaf.get(t.leaf)??[]).filter(({callNode:p})=>p.startPosition.row<=o.endLine&&p.endPosition.row>=o.startLine);if(u.length!==1){i.push({callee:t,file:o.file,line:o.startLine,reason:u.length===0?"call-not-found":"ambiguous-call",candidates:u.length,referenceProvenance:o.provenance});continue}let c=u[0],d=`${o.file}\0${c.callNode.startIndex}\0${c.callNode.endIndex}`;s.has(d)||(s.add(d),r.push({callee:t,caller:he(T(e,o.file),c.callNode.startPosition.row),file:o.file,line:c.callNode.startPosition.row,startLine:c.callNode.startPosition.row,endLine:c.callNode.endPosition.row,targetText:c.targetNode.text,callNode:c.callNode,targetNode:c.targetNode,arguments:c.arguments,referenceProvenance:o.provenance}))}return{sites:r,unresolved:i,filesVisited:a.size}}function lr(e,t){return Ot(e,[t]).get(t.symbolId)??[]}function Ot(e,t){if(!ur(e))return new Map(t.map(r=>[r.symbolId,yt(e,r,{semantic:!1}).map(i=>({file:i.file,startLine:i.line,endLine:i.line,provenance:i.provenance}))]));let n=new Map;for(let r of ft(e,t.map(i=>i.symbolId))){let i=n.get(r.symbol_id)??[];i.push({file:r.relative_path,startLine:r.chunk_start,endLine:r.chunk_end,provenance:"scip-reference-chunk"}),n.set(r.symbol_id,i)}return new Map(t.map(r=>[r.symbolId,n.get(r.symbolId)??[]]))}function ur(e){return sr.get(e,"project",()=>!!e.get("SELECT 1 AS present FROM mentions WHERE role != 1 LIMIT 1"))}function cr(e,t){let n=O(e,t)?.rootNode;if(!n)return null;let r=new Map;return At(n,i=>{if(i.type!=="call_expression"&&i.type!=="call")return;let a=i.childForFieldName("function")??i.namedChild(0);if(!a)return;let s=lt(a);if(!s)return;let o=i.childForFieldName("arguments")??i.namedChildren.find(c=>c.type==="arguments"),l={callNode:i,targetNode:a,arguments:o?.namedChildren??[]},u=r.get(s);u?u.push(l):r.set(s,[l])}),{byLeaf:r}}function At(e,t){t(e);for(let n of e.namedChildren)At(n,t)}var dr=Q("call-parameter-value-flow",{clearGroups:[]});function se(e,t){let n=`${t.callee.symbolId}\0${t.file}\0${t.callNode.startIndex}\0${t.callNode.endIndex}`;return dr.get(e,n,()=>pr(e,t))}function le(e,t){let n=new Set(t);return[...new Set(e.transfers.flatMap(r=>n.has(r.calleePosition)?[r.callerPosition]:[]))].sort((r,i)=>r-i)}function pr(e,t){let n={file:t.file,startLine:t.startLine,endLine:t.endLine};if(!t.caller)return{callee:t.callee,caller:null,call:n,transfers:[],unknown:t.arguments.map((l,u)=>({calleePosition:u,argumentText:l.text.trim(),reason:"caller-unavailable",proof:n}))};let r=O(e,t.caller.relativePath)?.rootNode,i=r?D(r,t.caller.startLine,t.caller.endLine):null;if(!i)return{callee:t.callee,caller:t.caller,call:n,transfers:[],unknown:t.arguments.map((l,u)=>({calleePosition:u,argumentText:l.text.trim(),reason:"caller-syntax-unavailable",proof:n}))};let a=X(i),s=[],o=[];return t.arguments.forEach((l,u)=>{let c=l.text.trim(),d=a.indexOf(c);d>=0?s.push({calleePosition:u,callerPosition:d,argumentText:c,proof:n}):o.push({calleePosition:u,argumentText:c,reason:"argument-not-direct-parameter",proof:n})}),{callee:t.callee,caller:t.caller,call:n,transfers:s,unknown:o}}var mr=8,fr=8;function Mt(e,t,n=[]){let r=[],i=yr(e,n,r),a=i.summaries,s=hr(e,t,a,r),o=gr(e,t,r);return{observations:Pr([...s.observations,...o]),bodySummaries:a.size,discriminatorSummaries:s.summaries,filesInspected:i.filesInspected,errors:r}}function yr(e,t,n){let r=new Map,i=[],a=new Map,s=o=>{if(a.has(o))return a.get(o)??null;let l=L(e,o);return a.set(o,l),l};for(let o of t){let l={...o,depth:0,proofSpans:[{file:o.definition.relativePath,startLine:o.definition.startLine,endLine:o.definition.endLine}]};r.set(o.definition.symbol,l),i.push(l)}for(;i.length>0;){let o=i.shift();if(!(o.depth>=mr))try{for(let l of qe(e,o.definition).sites){if(!s(l.file))continue;let c=l.caller;if(!c)continue;let d=le(se(e,l),o.parameterIndexes);if(d.length===0)continue;let p={definition:c,parameterIndexes:zt(d),depth:o.depth+1,proofSpans:[...o.proofSpans,{file:l.file,startLine:l.startLine,endLine:l.endLine}]};xr(r,p)&&i.push(r.get(c.symbol))}}catch(l){n.push(`builtin.carrier body summary failed for ${o.definition.relativePath}: ${Ze(l)}`)}}return{summaries:r,filesInspected:new Set(t.map(o=>o.definition.relativePath)).size}}function hr(e,t,n,r){let i=new Map,a=[],s=[];for(let o of t){if(o.action!=="http.request"||o.strength==="candidate"||o.sourceScope!=="production")continue;let l=Vt(o);if(!l)continue;let u=L(e,o.source.file);if(!u)continue;let c=Ut(u.root,o.source.startLine),d=c.find(g=>g.startPosition.row===o.source.startLine)??c[0];if(!d)continue;let p=Xe(d);if(!p)continue;let m=ee(e,o.source.file,p.text);if(m.length!==1)continue;let y=n.get(m[0].symbol);if(!y)continue;let v=o.owner.symbol?T(e,o.owner.file).find(g=>g.symbol===o.owner.symbol):null;if(!v)continue;let f=Rr(u,v),h=Ie(d);for(let g of y.parameterIndexes){let R=Nr(u,h[g]);if(R)for(let x of Br(R)){let b=Gt(x),C=jt(x);if(!b||!C)continue;let P=f.indexOf(C.text.trim());if(P>=0){let F={definition:v,carrier:l,field:b,parameterIndex:P,depth:0,proofObservationIds:[o.id],proofSpans:[o.source,{file:o.source.file,startLine:x.startPosition.row,endLine:x.endPosition.row}]},$=Dt(F);i.has($)||(i.set($,F),a.push(F));continue}let w=V(u,C);!w||w.evidence==="expression"||s.push(Ke(u,x,"carrier.publish",l,b,w.value,[o.id]))}}}for(;a.length>0;){let o=a.shift();if(!(o.depth>=fr))try{for(let l of qe(e,o.definition).sites){let u=L(e,l.file);if(!u)continue;let c=l.callNode,d=Ie(c)[o.parameterIndex];if(!d)continue;let p=V(u,d);p&&p.evidence!=="expression"&&s.push(Ke(u,c,"carrier.publish",o.carrier,o.field,p.value,o.proofObservationIds));let m=l.caller;if(!m)continue;let y=se(e,l).transfers.find(h=>h.calleePosition===o.parameterIndex)?.callerPosition;if(y===void 0)continue;let v={...o,definition:m,parameterIndex:y,depth:o.depth+1,proofSpans:[...o.proofSpans,{file:l.file,startLine:l.startLine,endLine:l.endLine}]},f=Dt(v);i.has(f)||(i.set(f,v),a.push(v))}}catch(l){r.push(`builtin.carrier discriminator summary failed for ${o.definition.relativePath}: ${Ze(l)}`)}}return{observations:s,summaries:i.size}}function gr(e,t,n){let r=[],i=t.filter(a=>a.action==="registry.handle"&&a.strength!=="candidate"&&a.sourceScope==="production");for(let a of t){if(a.action!=="http.handle"||a.strength==="candidate"||a.sourceScope!=="production")continue;let s=Vt(a);if(!s)continue;let o=L(e,a.source.file);if(!o)continue;let l=Ut(o.root,a.source.startLine)[0];if(l)for(let u of Ie(l).slice(1)){let c=ee(e,a.source.file,u.text);for(let d of c)try{let p=L(e,d.relativePath);if(!p)continue;let m=D(p.root,d.startLine,d.endLine);if(!m)continue;k(m,y=>{if(y.type!=="call_expression")return;let v=Xe(y);if(!v)return;let f=/^([A-Za-z_$][\w$]*)\s*\[\s*([A-Za-z_$][\w$]*)\s*\]$/u.exec(v.text.trim());if(!f)return;let h=f[1],g=f[2],R=br(e,p,d,g);if(!R)return;let x=Sr(e,d.relativePath,h);for(let b of i){let C=b.keyParts.find($=>$.name==="registry")?.value,P=b.keyParts.find($=>$.name==="key")?.value;if(!C||!P||!x.some($=>$.file===b.source.file&&$.binding===C))continue;let w=L(e,b.source.file),F=w?Cr(w.root,b.source.startLine):null;!w||!F||r.push(Ke(w,F,"carrier.consume",s,R,P,[a.id,b.id]))}})}catch(p){n.push(`builtin.carrier consumer analysis failed for ${d.relativePath}: ${Ze(p)}`)}}}return r}function Ht(e){let t=T(e.db,e.file),n=new Map;return k(e.root,r=>{if(r.type!=="pair"||Gt(r)?.toLowerCase()!=="body")return;let i=jt(r);if(!i||!/\bJSON\.stringify\s*\(/u.test(i.text))return;let a=he(t,r.startPosition.row),s=vr(r);if(!a||!s)return;let o=X(s),l=new Set;Ir(i,o,l);let u=n.get(a.symbol)??new Set;o.forEach((c,d)=>{c&&l.has(c)&&u.add(d)}),u.size>0&&n.set(a.symbol,u)}),t.flatMap(r=>{let i=n.get(r.symbol);return i?[{definition:r,parameterIndexes:[...i].sort((a,s)=>a-s)}]:[]})}function vr(e){let t=e.parent;for(;t;){if(/(?:function|method|lambda)/u.test(t.type)||t.type==="arrow_function")return t;t=t.parent}return null}function br(e,t,n,r){let i=D(t.root,n.startLine,n.endLine);if(!i)return null;let a=new RegExp(`\\.body\\??\\.${me(r)}\\b`,"u");if(a.test(i.text))return r;let s=null;if(k(i,c=>{if(s||c.type!=="variable_declarator")return;let d=c.childForFieldName("name")??c.namedChild(0),p=c.childForFieldName("value")??c.namedChild(1);!d||!p||!new RegExp(`(?:^|[,{}])\\s*${me(r)}\\s*(?:[,}]|$)`,"u").test(d.text)||p.type==="call_expression"&&(s=Xe(p)?.text??null)}),!s)return null;let o=ee(e,n.relativePath,s);if(o.length!==1)return null;let l=L(e,o[0].relativePath),u=l?D(l.root,o[0].startLine,o[0].endLine):null;return u&&a.test(u.text)&&new RegExp(`\\b${me(r)}\\s*[,}]`,"u").test(u.text)?r:null}function Sr(e,t,n){let r=[];for(let i of Ae(e,t,n)){let a=M(i.initializer);if(a.type==="call_expression")for(let s of Ie(a)){let o=s.text.trim();if(/^[A-Za-z_$][\w$]*$/u.test(o))for(let l of Ae(e,i.definition.relativePath,o))r.push({file:l.definition.relativePath,binding:l.definition.leaf})}}return[...new Map(r.map(i=>[`${i.file}\0${i.binding}`,i])).values()]}function Ke(e,t,n,r,i,a,s){let l=Be(e,t,"builtin.carrier",n,[{name:"carrier",value:r,evidence:"constant",term:{kind:"literal",value:r}},{name:"field",value:i,evidence:"literal",term:{kind:"literal",value:i}},{name:"value",value:a,evidence:"constant",term:{kind:"literal",value:a}}],"derived","http-body-registry-discriminator");return l.derivation={kind:"mechanically-derived",rule:"http-body-registry-discriminator",ruleVersion:"1",inputFactIds:[...s],sourceSpans:[l.source]},l}function Vt(e){let t=e.keyParts.find(r=>r.name==="method"&&r.evidence!=="expression")?.value,n=e.keyParts.find(r=>r.name==="path"&&r.evidence!=="expression")?.value;return t&&n?`${t.toUpperCase()} ${n}`:null}function xr(e,t){let n=e.get(t.definition.symbol);if(!n)return e.set(t.definition.symbol,t),!0;let r=zt([...n.parameterIndexes,...t.parameterIndexes]);return r.length===n.parameterIndexes.length&&t.depth>=n.depth?!1:(e.set(t.definition.symbol,{...n,parameterIndexes:r,depth:Math.min(n.depth,t.depth),proofSpans:[...n.proofSpans,...t.proofSpans]}),!0)}function Dt(e){return`${e.definition.symbol}\0${e.carrier}\0${e.field}\0${e.parameterIndex}`}function Rr(e,t){let n=D(e.root,t.startLine,t.endLine);return n?X(n):[]}function Cr(e,t){let n=null;return k(e,r=>{r.startPosition.row>t||r.endPosition.row<t||(!n||r.endIndex-r.startIndex<n.endIndex-n.startIndex)&&(n=r)}),n}function Ut(e,t){let n=[];return k(e,r=>{r.type==="call_expression"&&r.startPosition.row<=t&&r.endPosition.row>=t&&n.push(r)}),n.sort((r,i)=>r.endIndex-r.startIndex-(i.endIndex-i.startIndex))}function Xe(e){return e.childForFieldName("function")??e.namedChild(0)}function Ie(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function Nr(e,t){if(!t)return null;let n=t.text.trim();if(!/^[A-Za-z_$][\w$]*$/u.test(n))return M(t);let r=null;return k(e.root,i=>{r||i.type!=="variable_declarator"||(i.childForFieldName("name")??i.namedChild(0))?.text.trim()!==n||(r=i.childForFieldName("value")??i.namedChild(1))}),r?M(r):M(t)}function Br(e){let t=M(e);return t.type==="object"?t.namedChildren.filter(n=>n.type==="pair"||n.type==="shorthand_property_identifier"):[]}function Gt(e){return e.type==="shorthand_property_identifier"?e.text:(e.childForFieldName("key")??e.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"")??null}function jt(e){return e.type==="shorthand_property_identifier"?e:e.childForFieldName("value")??e.namedChild(1)}function Ir(e,t,n){let r=new Set(e.text.match(/[A-Za-z_$][\w$]*/gu)??[]);for(let i of t)i&&r.has(i)&&n.add(i)}function zt(e){return[...new Set(e)].sort((t,n)=>t-n)}function Pr(e){return[...new Map(e.map(t=>[t.id,t])).values()]}function Ze(e){return e instanceof Error?e.message:String(e)}import{createHash as wr}from"crypto";function qt(e,t){let n=new Map;for(let a of t){if(a.action!=="http.handle"||a.sourceScope!=="production")continue;let s=n.get(a.source.file)??[];s.push(a),n.set(a.source.file,s)}let r=[],i=Er(e);for(let a of i.mounts)for(let s of a.targetFiles)for(let o of n.get(s)??[]){let l=o.keyParts.find(p=>p.name==="path");if(!l||l.evidence==="expression")continue;let u=Tr(a.prefix.value,l.value),c=o.keyParts.map(p=>p.name==="path"?{name:"path",value:u,evidence:"constant",term:{kind:"concat",parts:[a.prefix.term??{kind:"literal",value:a.prefix.value},l.term??{kind:"literal",value:l.value}]},derivation:{kind:"mechanically-derived",rule:"http.mount-prefix",ruleVersion:"1",inputFactIds:[o.id],sourceSpans:[o.source,{file:a.file,startLine:a.line,endLine:a.line},...a.prefix.derivation?.sourceSpans??[],...l.derivation?.sourceSpans??[]]}}:p),d=`${o.id}\0${a.file}\0${a.line}\0${u}`;r.push({...o,id:`boundary:${wr("sha256").update(d).digest("hex").slice(0,16)}`,keyParts:c,strength:"derived",evidence:"framework-mount-composition",derivation:{kind:"mechanically-derived",rule:"http.mount-prefix",ruleVersion:"1",inputFactIds:[o.id],sourceSpans:[o.source,{file:a.file,startLine:a.line,endLine:a.line}]},resolution:"unresolved"}),o.strength="candidate",o.resolution="unresolved"}return{observations:r,filesInspected:i.filesInspected,mounts:i.mounts.length}}function Er(e){let t=[],n=ye(e);for(let r of n){let i=pe(e,r);if(!$r(i))continue;let a=L(e,r);a&&Kt(a.root,s=>{if(s.type!=="call_expression")return;let o=s.childForFieldName("function")??s.namedChild(0);if(!o||!o.text.replace(/\s+/gu,"").endsWith(".use"))return;let l=_r(s);if(l.length<2)return;let u=V(a,l[0]);if(!u||u.evidence==="expression")return;let c=Fr(e,r,l[1]);c.length!==0&&t.push({file:r,line:s.startPosition.row,prefix:{value:u.value,evidence:u.evidence,term:u.term,derivation:u.derivation},targetFiles:c})})}return{mounts:t,filesInspected:n.length}}function Fr(e,t,n){let r=n.text.replace(/\s+/gu,""),i=/^([A-Za-z_$][\w$]*)/u.exec(r)?.[1];if(!i)return[];let a=j(e,t).find(l=>l.localName===i&&l.sourcePath);if(!a?.sourcePath)return[t];if(a.kind==="namespace")return[a.sourcePath];let s=a.importedName==="default"?i:a.importedName,o=Z(e,a.sourcePath,s);return[...new Set(o.map(l=>l.relativePath))]}function Tr(e,t){let n=e==="/"?"":e.replace(/\/+$/u,""),r=t.startsWith("/")?t:`/${t}`;return`${n}${r}`||"/"}function $r(e){return/(?:\bfrom\s*|\brequire\s*\(\s*)['"](?:express|fastify|hono|koa-router|@koa\/router)(?:[/']|")/u.test(e)}function _r(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function Kt(e,t){t(e);for(let n of e.namedChildren)Kt(n,t)}import{createHash as Lr}from"crypto";function Pe(e){return[...new Map(e.map(t=>[t.observationId,t])).values()].sort((t,n)=>t.observationId.localeCompare(n.observationId))}var Ee=new Set(["DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT"]),kr=8,Xt=nt({kind:"runtime-boundary-http-roles",invalidation:rt("runtime-boundary-http-roles"),serialize:Mr,deserialize:Hr});function Yt(e,t,n){let r=n??((f,h)=>h()),i=new Map,a=[],s=[],o=new Set,l=[],u=[],c=new Map,d=new Map,p=new Map,m=f=>{if(c.has(f))return c.get(f)??null;let h=L(e,f);return c.set(f,h),h},y=f=>{let h=d.get(f);if(h)return h;let g=T(e,f);return d.set(f,g),g},v=(f,h)=>{let g=p.get(f.file);if(!g){let b=tt(e,f.file,f.source),C=Xt.read(e,f.file,b)??[];g={contentHash:b,roles:new Map(C.map(P=>[P.symbol,P])),dirty:!1},p.set(f.file,g)}let R=g.roles.get(h.symbol);if(R)return R;let x=Dr(f,h);return g.roles.set(h.symbol,{symbol:h.symbol,...x}),g.dirty=!0,x};for(r("runtime-boundaries.http-summary.seed",()=>{for(let f of t){if(f.action!=="http.request"||!f.owner.symbol||f.evidence!=="call-expression"&&f.evidence!=="client-adapter")continue;let h=y(f.owner.file).find(b=>b.symbol===f.owner.symbol);if(!h)continue;let g=m(h.relativePath);if(!g)continue;let R=v(g,h),x={definition:h,...R,constantMethods:f.keyParts.flatMap(b=>b.name==="method"&&b.evidence!=="expression"&&Ee.has(b.value.toUpperCase())?[b.value.toUpperCase()]:[]),depth:0,proofObservationIds:[f.id],proofSpans:[f.source]};Wt(i,x)&&a.push(i.get(h.symbol))}});a.length>0;){let f=a.splice(0,a.length),h=r("runtime-boundaries.http-summary.resolve-call-sites",()=>Lt(e,f.map(g=>g.definition)),{batchSize:f.length});r("runtime-boundaries.http-summary.process-call-sites",()=>{for(let g of f)if(!(g.depth>=kr))try{let R=h.get(g.definition.symbolId);if(!R)continue;u.push(...R.unresolved.map(x=>Or(g,x)));for(let x of R.sites){let b=m(x.file);if(!b)continue;o.add(x.file);let C=x.callNode,P=Ar(g,C,b);P&&s.push(P);let w=x.caller;if(!w)continue;let F=v(b,w),$=Vr(e,g,x),_={definition:w,pathParameterIndexes:we([...F.pathParameterIndexes,...$.pathParameterIndexes]),methodParameterIndexes:we([...F.methodParameterIndexes,...$.methodParameterIndexes]),constantMethods:ne([...g.constantMethods,...F.constantMethods]),depth:g.depth+1,proofObservationIds:ne([...g.proofObservationIds,...P?[P.id]:[]]),proofSpans:[...g.proofSpans,{file:x.file,startLine:x.startLine,endLine:x.endLine}]};Wt(i,_)&&a.push(i.get(w.symbol))}}catch(R){l.push(`builtin.http-summary failed for ${g.definition.relativePath}:${g.definition.startLine+1}: ${R instanceof Error?R.message:String(R)}`)}},{batchSize:f.length})}return Xt.writeBatch(e,[...p.entries()].flatMap(([f,h])=>h.dirty?[{relativePath:f,contentHash:h.contentHash,value:[...h.roles.values()].sort((g,R)=>g.symbol.localeCompare(R.symbol))}]:[])),{observations:s,frontiers:Pe(u),summaries:i.size,filesInspected:o.size,errors:l}}function Or(e,t){let n=ne([...e.pathParameterIndexes.length>0?["path"]:[],...e.methodParameterIndexes.length>0&&e.constantMethods.length!==1?["method"]:[]]),r=e.constantMethods.length===1?e.constantMethods[0]:"?",i=`${e.definition.symbol}\0${t.file}\0${t.line}\0${t.reason}`;return{observationId:`frontier:${Lr("sha256").update(i).digest("hex").slice(0,16)}`,kind:"call-resolution",action:"http.request",strength:"candidate",source:{file:t.file,startLine:t.line,endLine:t.line},ownerShortName:null,address:`method=${r??"?"} path=?`,reason:`Compiler identity found a reference to ${e.definition.leaf}, but exact call recovery stopped with ${t.reason} (${t.candidates} syntax candidate(s)); HTTP value propagation did not cross this site.`,missingKeyParts:n.length>0?n:["call"],sourceScope:ge(t.file)}}function Ar(e,t,n){let r=Jt(t),i=e.pathParameterIndexes.flatMap(d=>{let p=V(n,r[d]);return p&&p.evidence!=="expression"&&Gr(p.value)?[{index:d,value:p}]:[]}),a=e.methodParameterIndexes.flatMap(d=>{let p=V(n,r[d]),m=p?.value.toUpperCase();return p&&m&&p.evidence!=="expression"&&Ee.has(m)?[{index:d,value:{...p,value:m}}]:[]}),s=ne([...e.constantMethods,...a.map(d=>d.value.value)]);if(i.length!==1||s.length!==1)return null;let o=i[0].value,l=a.find(d=>d.value.value===s[0])?.value,u=[{name:"method",value:s[0],evidence:l?"constant":"literal",term:l?.term??{kind:"literal",value:s[0]},derivation:l?.derivation},{name:"path",value:o.value,evidence:"constant",term:o.term,derivation:o.derivation}],c=Be(n,t,"builtin.http-summary","http.request",u,"derived","compiler-resolved-http-summary");return c.derivation={kind:"mechanically-derived",rule:"compiler-resolved-http-summary",ruleVersion:"1",inputFactIds:e.proofObservationIds,sourceSpans:[...e.proofSpans,c.source]},c}function Dr(e,t){let n=D(e.root,t.startLine,t.endLine);if(!n)return{pathParameterIndexes:[],methodParameterIndexes:[],constantMethods:[]};let r=X(n),i=new Set,a=new Set,s=new Set;return k(n,o=>{if(o.type==="call_expression"&&((o.childForFieldName("function")??o.namedChild(0))?.text.replace(/\s+/gu,"").split(".").at(-1)??"")==="fetch"){let m=Jt(o);ue(m[0],r,i);let y=Ur(m[1],"method");if(y){ue(y,r,a);let v=V(e,y),f=v?.value.toUpperCase();f&&v?.evidence!=="expression"&&Ee.has(f)&&s.add(f)}else ue(m[1],r,a)}if(o.type!=="pair")return;let l=o.childForFieldName("key")??o.namedChild(0),u=o.childForFieldName("value")??o.namedChild(1),c=l?.text.replace(/^['"`]|['"`]$/gu,"").toLowerCase();(c==="url"||c==="path"||c==="endpoint")&&ue(u,r,i),(c==="init"||c==="requestinit"||c==="options")&&ue(u,r,a)}),{pathParameterIndexes:r.flatMap((o,l)=>o&&i.has(o)?[l]:[]),methodParameterIndexes:r.flatMap((o,l)=>o&&a.has(o)?[l]:[]),constantMethods:[...s].sort()}}function Mr(e){return e.map(t=>[encodeURIComponent(t.symbol),t.pathParameterIndexes.join(","),t.methodParameterIndexes.join(","),t.constantMethods.join(",")].join(" ")).join(`
49
- `)}function Hr(e){if(!e)return[];let t=[];for(let n of e.split(`
50
- `)){let r=n.split(" ");if(r.length!==4)return null;let i=Zt(r[1]),a=Zt(r[2]),s=r[3]?r[3].split(","):[];if(i===null||a===null||s.some(o=>!Ee.has(o)))return null;t.push({symbol:decodeURIComponent(r[0]),pathParameterIndexes:i,methodParameterIndexes:a,constantMethods:s})}return t}function Zt(e){if(!e)return[];let t=e.split(",").map(Number);return t.every(n=>Number.isSafeInteger(n)&&n>=0)?t:null}function Vr(e,t,n){let r=se(e,n);return{pathParameterIndexes:le(r,t.pathParameterIndexes),methodParameterIndexes:le(r,t.methodParameterIndexes)}}function Wt(e,t){let n=e.get(t.definition.symbol);if(!n)return e.set(t.definition.symbol,t),!0;let r=we([...n.pathParameterIndexes,...t.pathParameterIndexes]),i=we([...n.methodParameterIndexes,...t.methodParameterIndexes]),a=ne([...n.constantMethods,...t.constantMethods]);return r.length!==n.pathParameterIndexes.length||i.length!==n.methodParameterIndexes.length||a.length!==n.constantMethods.length||t.depth<n.depth?(e.set(t.definition.symbol,{...n,pathParameterIndexes:r,methodParameterIndexes:i,constantMethods:a,depth:Math.min(n.depth,t.depth),proofObservationIds:ne([...n.proofObservationIds,...t.proofObservationIds]),proofSpans:[...n.proofSpans,...t.proofSpans]}),!0):!1}function Ur(e,t){if(!e)return null;for(let n of e.namedChildren)if(!(n.type!=="pair"||(n.childForFieldName("key")??n.namedChild(0))?.text.replace(/^['"`]|['"`]$/gu,"").toLowerCase()!==t))return n.childForFieldName("value")??n.namedChild(1);return null}function ue(e,t,n){if(!e)return;let r=new Set(e.text.match(/[A-Za-z_$][\w$]*/gu)??[]);for(let i of t)i&&r.has(i)&&n.add(i)}function Jt(e){return(e.childForFieldName("arguments")??e.namedChildren.find(n=>n.type==="arguments"))?.namedChildren??[]}function Gr(e){return e.startsWith("/")||/^https?:\/\//iu.test(e)}function we(e){return[...new Set(e)].sort((t,n)=>t-n)}function ne(e){return[...new Set(e)].sort()}import{createHash as jr}from"crypto";function tn(e){let t=Qt(e.filter(r=>r.action==="database.read"&&r.evidence==="persistence-skip-locked-claim")),n=Qt(e.filter(r=>r.action==="database.write"&&r.evidence==="persistence-insert"));return e.flatMap(r=>r.action==="database.write"&&r.evidence==="persistence-insert"?We(r).flatMap(i=>{let a=t.get(i)?.[0];return a?[en(r,a,i,"queue.send")]:[]}):r.action==="database.read"&&r.evidence==="persistence-skip-locked-claim"?We(r).flatMap(i=>{let a=n.get(i)?.[0];return a?[en(r,a,i,"queue.consume")]:[]}):[])}function Qt(e){let t=new Map;for(let n of e)for(let r of We(n)){let i=t.get(r);i?i.push(n):t.set(r,[n])}for(let n of t.values())n.sort((r,i)=>r.id.localeCompare(i.id));return t}function We(e){return e.keyParts.filter(t=>t.name==="resource").map(t=>t.value)}function en(e,t,n,r){let i=`database:${n}`,a=r==="queue.send"?"database-queue-insert":"database-queue-skip-locked-claim",s=[e.id,r,i,a].join("\0");return{...e,id:`boundary:${jr("sha256").update(s).digest("hex").slice(0,16)}`,extractor:"builtin.database-queue",action:r,keyParts:[{name:"address",value:i,evidence:"identifier",term:{kind:"symbol",symbol:n},derivation:{kind:"mechanically-derived",rule:"database-work-queue.resource",ruleVersion:"1",inputFactIds:[e.id,t.id],sourceSpans:[e.source,t.source]}}],evidence:a,strength:"derived",protocol:"queue",role:r==="queue.send"?"producer":"consumer",derivation:{kind:"mechanically-derived",rule:"database-work-queue.insert-skip-locked",ruleVersion:"1",inputFactIds:[e.id,t.id],sourceSpans:[e.source,t.source]},valuePrecision:"symbolic",resolution:"unresolved"}}var Ye="runtime-boundaries-v19",qr=zr(import.meta.url),B=qr("typescript"),Kr=new Set([B.SyntaxKind.WhitespaceTrivia,B.SyntaxKind.NewLineTrivia,B.SyntaxKind.SingleLineCommentTrivia,B.SyntaxKind.MultiLineCommentTrivia]),Xr=new Set([B.SyntaxKind.NoSubstitutionTemplateLiteral,B.SyntaxKind.TemplateHead,B.SyntaxKind.TemplateMiddle,B.SyntaxKind.TemplateTail]),$e=[{id:"http.method-path",protocol:"http",producerActions:["http.request"],consumerActions:["http.handle"],keyNames:["method","path"],traversable:!0},{id:"registry.identity-key",protocol:"registry",producerActions:["registry.dispatch"],consumerActions:["registry.handle"],keyNames:["registry","key"],traversable:!0},{id:"registry.capability-key",protocol:"registry",producerActions:["registry.reference"],consumerActions:["registry.handle"],keyNames:["key"],traversable:!0,requireUniqueConsumer:!0},{id:"queue.address",protocol:"queue",producerActions:["queue.send"],consumerActions:["queue.consume"],keyNames:["address"],traversable:!0},{id:"carrier.discriminator",protocol:"carrier",producerActions:["carrier.publish"],consumerActions:["carrier.consume"],keyNames:["carrier","field","value"],traversable:!0},{id:"resource.identity",protocol:"database",producerActions:["database.write"],consumerActions:["database.read"],keyNames:["resource"],traversable:!1},{id:"framework.effect-httpapi-operation",protocol:"framework",producerActions:[],consumerActions:["framework.handle"],declarationActions:["framework.declare"],keyNames:["adapter","group","operation"],traversable:!0,linkFrom:"declaration",requireUniquePair:!0}],Zr=64,on="builtin.http-summary",_e={HTTP_HANDLE:"http.handle",HTTP_REQUEST:"http.request",REGISTRY_HANDLE:"registry.handle"},Je=new Set(Object.values(_e));function Wr(e,t={}){let n=ye(e),r=new Set(n),i=new Set((t.affectedFiles??[]).map(hi)),a=t.previousGraph?.fileCoverage,s=i.size>0&&t.previousGraph?.extractorVersion===Ye&&a!==void 0&&a.length===t.previousGraph.coverage.filesScanned,o=s?a.filter(S=>r.has(S.file)&&!i.has(S.file)):[],l=new Set(o.flatMap(S=>S.observationIds)),u=s?t.previousGraph.observations.filter(S=>l.has(S.id)&&r.has(S.source.file)):[],c=s?n.filter(S=>i.has(S)):n,d=[],p=a?.reduce((S,N)=>S+N.observationIds.length,0)??0,m=performance.now(),y=ci(e,c,t.profileSpan);z(d,"direct-extraction",m,c.length,y.observations.length,{filesVisited:c.length,filesReused:o.length,factsReused:u.length,factsInvalidated:Math.max(0,p-u.length)});let v=[...o,...y.fileCoverage].sort((S,N)=>S.file.localeCompare(N.file)),f=yi(v),h=v.flatMap(S=>S.extractionErrors),g=ce([...u,...y.observations]);if(s&&!t.forceDerivedRebuild&&t.previousGraph&&Yr(a,y.fileCoverage,i)&&(!ri(e,t.previousGraph,i)||oi(a,y.fileCoverage,i)&&!si(t.previousGraph,i))){for(let N of t.previousGraph.coverage.extractors)f.has(N.id)||f.set(N.id,N);let S=ui(t.previousGraph.coverage.phases);return d.push(...S),{...t.previousGraph,observations:t.previousGraph.observations,relationGroups:t.previousGraph.relationGroups,links:t.previousGraph.links,frontiers:t.previousGraph.frontiers,coverage:{filesScanned:n.length,filesWithAst:v.filter(N=>N.hasAst).length,filesWithoutAst:v.filter(N=>!N.hasAst).length,filesReused:o.length,extractors:[...f.values()],extractionErrors:t.previousGraph.coverage.extractionErrors,phases:d},fileCoverage:v}}let R=ce([...g,...tn(g)]),x=s&&t.previousGraph!==void 0?Jr(t.previousGraph,a,y.fileCoverage,i,g):{reuse:!1,shapeUnchanged:!1,proofFilesUnchanged:!1,seedUnchanged:!1},b=x.reuse;t.profileSpan?.("runtime-boundaries.http-summary.reuse-decision",()=>{},x),m=performance.now();let C;if(b){let S=t.previousGraph.coverage.phases?.find(I=>I.id==="http-summary"),N=t.previousGraph.coverage.extractors.find(I=>I.id==="builtin.wrapper");C={observations:t.previousGraph.observations.filter(I=>I.extractor===on),frontiers:t.previousGraph.frontiers.filter(I=>I.kind==="call-resolution"&&I.action===_e.HTTP_REQUEST),summaries:0,filesInspected:S?.filesVisited??N?.applicableFiles??0,errors:t.previousGraph.coverage.extractionErrors.filter(I=>I.startsWith("builtin.http-summary failed"))},z(d,"http-summary",m,R.length,C.observations.length,{filesVisited:0,filesReused:C.filesInspected,factsReused:C.observations.length+C.frontiers.length,factsInvalidated:0}),N&&f.set(N.id,N)}else C=Yt(e,R,t.profileSpan),z(d,"http-summary",m,R.length,C.observations.length,{filesVisited:C.filesInspected}),f.set("builtin.wrapper",{id:"builtin.wrapper",applicableFiles:C.filesInspected,observations:C.observations.length,errors:C.errors.length});h.push(...C.errors);let P=ce([...R,...C.observations]);m=performance.now();let w=qt(e,P);z(d,"http-mount",m,P.length,w.observations.length,{filesVisited:w.filesInspected});let F=ce([...P,...w.observations]);m=performance.now();let $=b&&t.previousGraph!==void 0&&Qr(t.previousGraph,a,y.fileCoverage,i),_;if($){let S=t.previousGraph.coverage.phases?.find(I=>I.id==="carrier"),N=t.previousGraph.coverage.extractors.find(I=>I.id==="builtin.carrier");_={observations:t.previousGraph.observations.filter(I=>I.extractor==="builtin.carrier"),bodySummaries:N?.applicableFiles??0,discriminatorSummaries:0,filesInspected:S?.filesVisited??0,errors:t.previousGraph.coverage.extractionErrors.filter(I=>I.startsWith("builtin.carrier"))},z(d,"carrier",m,F.length,_.observations.length,{filesVisited:0,filesReused:_.filesInspected,factsReused:_.observations.length,factsInvalidated:0}),N&&f.set(N.id,N)}else _=Mt(e,F,v.flatMap(S=>S.bodySummaries??[])),z(d,"carrier",m,F.length,_.observations.length,{filesVisited:_.filesInspected}),f.set("builtin.carrier",{id:"builtin.carrier",applicableFiles:_.bodySummaries,observations:_.observations.length,errors:_.errors.length});h.push(..._.errors);let K=ce([...F,..._.observations]);m=performance.now();let J=gi(K);z(d,"relations",m,K.length,J.length),m=performance.now();let Qe=bi(K,J);z(d,"links",m,J.length,Qe.length),Si(K,J),m=performance.now();let et=Pe([...xi(K,J),...C.frontiers]);return z(d,"frontiers",m,K.length,et.length),{schemaVersion:2,extractorVersion:Ye,observations:K,relationGroups:J,links:Qe,frontiers:et,coverage:{filesScanned:n.length,filesWithAst:v.filter(S=>S.hasAst).length,filesWithoutAst:v.filter(S=>!S.hasAst).length,...s?{filesReused:o.length}:{},extractors:[...f.values()],extractionErrors:h,phases:d},fileCoverage:v}}function Yr(e,t,n){if(!e)return!1;let r=e.filter(a=>n.has(a.file)).filter(nn).map(rn).sort((a,s)=>a.file.localeCompare(s.file)),i=t.filter(nn).map(rn).sort((a,s)=>a.file.localeCompare(s.file));return JSON.stringify(r)===JSON.stringify(i)}function nn(e){return e.observationIds.length>0||e.extractionErrors.length>0}function rn(e){let{syntaxHash:t,shapeHash:n,bodySummaries:r,...i}=e;return i}function Jr(e,t,n,r,i){let a=ti(t,n,r),s=ni(e),l=![...sn(t,n)].some(p=>s.has(p)),u=new Set((t??[]).filter(p=>r.has(p.file)).flatMap(p=>p.observationIds)),c=new Set(n.flatMap(p=>p.observationIds)),d=an(e.observations,u)===an(i,c);return{reuse:a&&l&&d,shapeUnchanged:a,proofFilesUnchanged:l,seedUnchanged:d}}function sn(e,t){let n=new Map(e?.map(r=>[r.file,r.syntaxHash])??[]);return new Set(t.filter(r=>r.syntaxHash===void 0||n.get(r.file)!==r.syntaxHash).map(r=>r.file))}function Qr(e,t,n,r){if(!t)return!1;let i=t.filter(l=>r.has(l.file)).map(({file:l,bodySummaries:u})=>({file:l,bodySummaries:u??[]})).sort((l,u)=>l.file.localeCompare(u.file)),a=n.map(({file:l,bodySummaries:u})=>({file:l,bodySummaries:u??[]})).sort((l,u)=>l.file.localeCompare(u.file));if(JSON.stringify(i)!==JSON.stringify(a))return!1;let s=sn(t,n),o=ei(e,"builtin.carrier");return![...s].some(l=>o.has(l))}function ei(e,t){let n=new Set;for(let r of e.observations)if(r.extractor===t){n.add(r.source.file);for(let i of r.derivation.sourceSpans)n.add(i.file)}return n}function ti(e,t,n){if(!e)return!1;let r=new Map(e.filter(i=>n.has(i.file)).map(i=>[i.file,i.shapeHash]));return t.length===n.size&&t.every(i=>i.shapeHash!==void 0&&r.get(i.file)===i.shapeHash)}function ni(e){let t=new Set;for(let n of e.observations)if(n.extractor===on){t.add(n.source.file);for(let r of n.derivation.sourceSpans)t.add(r.file)}for(let n of e.frontiers)n.kind==="call-resolution"&&n.action===_e.HTTP_REQUEST&&n.source&&t.add(n.source.file);return t}function an(e,t){return JSON.stringify(e.filter(n=>t.has(n.id)&&n.action===_e.HTTP_REQUEST&&n.owner.symbol!==null&&(n.evidence==="call-expression"||n.evidence==="client-adapter")).map(n=>({ownerSymbol:n.owner.symbol,evidence:n.evidence,methods:n.keyParts.filter(r=>r.name==="method"&&r.evidence!=="expression").map(r=>r.value.toUpperCase()).sort()})).sort((n,r)=>`${n.ownerSymbol}\0${n.evidence}\0${n.methods.join(",")}`.localeCompare(`${r.ownerSymbol}\0${r.evidence}\0${r.methods.join(",")}`)))}function ri(e,t,n){let r=ii(t),i=ai(t);if([...n].some(o=>r.has(o)))return!0;if(i.size===0||n.size===0)return!1;if(!!!e.get("SELECT 1 AS present FROM mentions WHERE role != 1 LIMIT 1"))return!0;let s=[...n];for(let o=0;o<s.length;o+=750){let l=s.slice(o,o+750),u=l.map(()=>"?").join(",");if(e.all(`SELECT DISTINCT global_symbol.symbol
51
- FROM mentions mention
52
- JOIN chunks reference_chunk ON reference_chunk.id = mention.chunk_id
53
- JOIN documents reference_document ON reference_document.id = reference_chunk.document_id
54
- JOIN global_symbols global_symbol ON global_symbol.id = mention.symbol_id
55
- WHERE mention.role != 1
56
- AND reference_document.relative_path IN (${u})`,...l).some(d=>i.has(d.symbol)))return!0}return!1}function ii(e){let t=new Set;for(let n of e.observations)if(Je.has(n.action)){t.add(n.source.file);for(let r of n.derivation?.sourceSpans??[])t.add(r.file)}for(let n of e.frontiers)!n.action||!Je.has(n.action)||!n.source||t.add(n.source.file);return t}function ai(e){return new Set(e.observations.flatMap(t=>Je.has(t.action)&&t.owner.symbol?[t.owner.symbol]:[]))}function oi(e,t,n){if(!e)return!1;let r=new Map(e.filter(i=>n.has(i.file)).map(i=>[i.file,i.syntaxHash]));return t.length===n.size&&t.every(i=>i.syntaxHash!==void 0&&r.get(i.file)===i.syntaxHash)}function si(e,t){let n=li(e);return[...t].some(r=>n.has(r))}function li(e){let t=new Set;for(let n of e.observations){t.add(n.source.file);for(let r of n.derivation?.sourceSpans??[])t.add(r.file)}for(let n of e.frontiers)n.source&&t.add(n.source.file);return t}function ui(e){return(e??[]).filter(t=>t.id!=="direct-extraction").map(t=>({...t,durationMs:0,filesVisited:0,filesReused:t.filesVisited??0,factsReused:t.outputFacts,factsInvalidated:0}))}function z(e,t,n,r,i,a={}){e.push({id:t,durationMs:Math.max(0,performance.now()-n),inputFacts:r,outputFacts:i,...a})}function ci(e,t,n){let r=[],i=[];for(let a of t){let s=it(e,a),o=Ue.filter(p=>p.supports(s)),l=/\bJSON\.stringify\s*\(/u.test(s)&&/\bbody\s*:/u.test(s),u=o.length>0||l?L(e,a,s,n):null,c=di(a,s),d={file:a,hasAst:u!==null||fi(a,s),syntaxHash:c.syntaxHash,shapeHash:c.shapeHash,bodySummaries:u&&l?Ht(u):[],observationIds:[],extractors:[],extractionErrors:[]};if(u)for(let p of o){let m={id:p.id,applicableFiles:1,observations:0,errors:0};try{let y=mi(n,`runtime-boundaries.extractor.${p.id}`,a,()=>p.extract(u));m.observations=y.length,r.push(...y),d.observationIds.push(...y.map(v=>v.id))}catch(y){m.errors=1,d.extractionErrors.push(`${p.id} failed for ${a}: ${y instanceof Error?y.message:String(y)}`)}d.extractors.push(m)}i.push(d)}return{observations:r,fileCoverage:i}}function di(e,t){if(!/\.(?:[cm]?[jt]sx?)$/iu.test(e)){let u=de("sha256").update(t).digest("hex");return{syntaxHash:u,shapeHash:u}}let n=/\.[jt]sx$/iu.test(e)?B.LanguageVariant.JSX:B.LanguageVariant.Standard,r=B.createScanner(B.ScriptTarget.Latest,!1,n,t),i=de("sha256"),a=de("sha256"),s=[],o=[0];for(let u=0;u<t.length;u+=1)t.charCodeAt(u)===10&&o.push(u+1);let l=0;for(let u=r.scan();u!==B.SyntaxKind.EndOfFileToken;u=r.scan()){if(u===B.SyntaxKind.CloseBraceToken&&s.length>0&&s.at(-1)===0&&(u=r.reScanTemplateToken(!1)),Kr.has(u))continue;let c=r.getTokenText();for(;o[l+1]!==void 0&&o[l+1]<=r.getTokenPos();)l+=1;i.update(String(u)),i.update("\0"),i.update(c),i.update("\0"),i.update(String(l)),i.update("\0"),a.update(String(u)),a.update("\0"),!Xr.has(u)&&!pi(u,c)&&a.update(c),a.update("\0"),a.update(String(l)),a.update("\0"),u===B.SyntaxKind.TemplateHead?s.push(0):u===B.SyntaxKind.TemplateTail?s.pop():u===B.SyntaxKind.OpenBraceToken&&s.length>0?s[s.length-1]+=1:u===B.SyntaxKind.CloseBraceToken&&s.length>0&&s.at(-1)>0&&(s[s.length-1]-=1)}return{syntaxHash:i.digest("hex"),shapeHash:a.digest("hex")}}function pi(e,t){if(e!==B.SyntaxKind.StringLiteral||t.length<2)return!1;let n=t.slice(1,-1);return n.startsWith("/")||n.includes("://")}function mi(e,t,n,r){return e?e(t,r,{file:n}):r()}function fi(e,t){return t?at(e)?/<script\b/iu.test(t):fe(e)!==null:!1}function yi(e){let t=new Map(Ue.map(n=>[n.id,{id:n.id,applicableFiles:0,observations:0,errors:0}]));for(let n of e)for(let r of n.extractors){let i=t.get(r.id);i&&(i.applicableFiles+=r.applicableFiles,i.observations+=r.observations,i.errors+=r.errors)}return t}function hi(e){return e.replaceAll("\\","/").replace(/^\.\//u,"")}function gi(e){let t=new Map;for(let n of $e){let r=new Set([...n.producerActions,...n.consumerActions,...n.declarationActions??[]]);for(let i of e){if(!r.has(i.action)||i.strength==="candidate")continue;let a=Ci(i,n.keyNames);if(!a)continue;let s=a.map(d=>`${d.name}=${un(d.name,d.value)}`).join("\0"),o=i.sourceScope==="production"?"production":i.sourceScope,l=`${n.id}\0${o}\0${s}`,u=`boundary-group:${de("sha256").update(l).digest("hex").slice(0,16)}`,c=t.get(u)??{id:u,protocol:n.protocol,joinRule:n.id,normalizedKey:s,keyParts:a,producerIds:[],consumerIds:[],declarationIds:[],derivation:{kind:"mechanically-derived",rule:n.id,ruleVersion:"2",inputFactIds:[],sourceSpans:[]}};n.producerActions.includes(i.action)&&c.producerIds.push(i.id),n.consumerActions.includes(i.action)&&c.consumerIds.push(i.id),n.declarationActions?.includes(i.action)&&c.declarationIds.push(i.id),c.derivation.inputFactIds.push(i.id),c.derivation.sourceSpans.push(i.source),t.set(u,c)}}return[...t.values()].map(vi).sort(Bi)}function vi(e){return{...e,producerIds:Fe(e.producerIds),consumerIds:Fe(e.consumerIds),declarationIds:Fe(e.declarationIds),derivation:{...e.derivation,inputFactIds:Fe(e.derivation.inputFactIds),sourceSpans:[...new Map(e.derivation.sourceSpans.map(t=>[`${t.file}:${t.startLine}:${t.endLine}`,t])).values()]}}}function bi(e,t){let n=new Map(e.map(i=>[i.id,i])),r=new Map;for(let i of t){let a=$e.find(o=>o.id===i.joinRule);if(!a?.traversable)continue;let s=a.linkFrom==="declaration"?i.declarationIds:i.producerIds;if(!(s.length===0||i.consumerIds.length===0)&&!(a.requireUniquePair&&(s.length!==1||i.consumerIds.length!==1))&&!(a.requireUniqueConsumer&&i.consumerIds.length!==1)&&!(s.length*i.consumerIds.length>Zr))for(let o of s)for(let l of i.consumerIds){let u=n.get(o),c=n.get(l);if(!u||!c||Ni(u,c))continue;let d=u.strength==="derived"||c.strength==="derived"?"derived":"exact",p=`${i.joinRule}\0${o}\0${l}`,m={id:`boundary-link:${de("sha256").update(p).digest("hex").slice(0,16)}`,from:o,to:l,joinRule:i.joinRule,matchedKeyParts:i.keyParts,strength:d,derivation:{kind:"mechanically-derived",rule:i.joinRule,ruleVersion:"2",inputFactIds:[o,l],sourceSpans:[u.source,c.source]}};r.set(m.id,m)}}return[...r.values()].sort(Ii)}function Si(e,t){let n=new Set(t.filter(ln).flatMap(Te)),r=new Set(t.filter(Ri).flatMap(Te));for(let i of e)i.resolution=n.has(i.id)?"locally-linked":r.has(i.id)?"ambiguous":"unresolved"}function xi(e,t){let n=new Set(e.filter(a=>a.strength!=="candidate").map(a=>`${a.action}\0${a.source.file}\0${a.source.startLine}\0${a.source.endLine}`)),r=new Set(t.flatMap(Te)),i=new Set(t.filter(ln).flatMap(Te));return e.filter(a=>a.sourceScope==="production").filter(a=>a.strength!=="candidate"||!n.has(`${a.action}\0${a.source.file}\0${a.source.startLine}\0${a.source.endLine}`)).filter(a=>!i.has(a.id)).map(a=>{let s=a.keyParts.filter(l=>l.evidence==="expression"||l.value.length===0).map(l=>l.name),o=s.length>0?`${a.extractor} observed ${a.action}, but ${s.join(", ")} remained symbolic or unknown.`:a.resolution==="ambiguous"?`${a.extractor} established the address for ${a.action}, but more than one indexed peer has the same runtime key.`:r.has(a.id)?`${a.extractor} established the address for ${a.action}, but the indexed production scope contains no counterpart role in that relation group.`:`${a.extractor} observed ${a.action}, but no supported factorization rule could establish its addressed relation.`;return{observationId:a.id,reason:o,missingKeyParts:s,sourceScope:a.sourceScope}}).sort((a,s)=>a.observationId.localeCompare(s.observationId))}function Te(e){return[...e.producerIds,...e.consumerIds,...e.declarationIds]}function ln(e){let t=$e.find(r=>r.id===e.joinRule);if(!t)return!1;let n=t.linkFrom==="declaration"?e.declarationIds:e.producerIds;return n.length===0||e.consumerIds.length===0?!1:!t.requireUniquePair||n.length===1&&e.consumerIds.length===1}function Ri(e){let t=$e.find(r=>r.id===e.joinRule);if(!t?.requireUniquePair)return!1;let n=t.linkFrom==="declaration"?e.declarationIds:e.producerIds;return n.length>0&&e.consumerIds.length>0&&(n.length!==1||e.consumerIds.length!==1)}function Ci(e,t){let n=[];for(let r of t){let i=e.keyParts.find(a=>a.name===r);if(!i||i.evidence==="expression"||i.value.length===0)return null;n.push({...i,value:un(r,i.value)})}return n}function un(e,t){if(e==="method")return t.toUpperCase();if(e!=="path")return t;let n=t.startsWith("/")?t:`/${t}`;return n.length>1?n.replace(/\/+$/u,""):n}function Ni(e,t){return e.source.file===t.source.file&&e.source.startLine===t.source.startLine}function ce(e){return[...new Map(e.map(t=>[t.id,t])).values()].sort((t,n)=>t.source.file.localeCompare(n.source.file)||t.source.startLine-n.source.startLine||t.action.localeCompare(n.action))}function Fe(e){return[...new Set(e)].sort()}function Bi(e,t){return e.joinRule.localeCompare(t.joinRule)||e.normalizedKey.localeCompare(t.normalizedKey)}function Ii(e,t){return e.joinRule.localeCompare(t.joinRule)||e.from.localeCompare(t.from)||e.to.localeCompare(t.to)}export{ge as a,V as b,qe as c,se as d,Ye as e,Wr as f,dn as g,pn as h,ht as i};
57
- //# sourceMappingURL=chunk-ANCHW2R4.js.map
@@ -1,21 +0,0 @@
1
- import{C as we,c as F,d as J,e as L,f as _e,h as Le,i as Fe,p as Pe,q as y,w as Ee,y as Ae,z as g}from"./chunk-JSHDCVUM.js";import{J as X,c as v}from"./chunk-WEXQYJY3.js";import{basename as Ve}from"path";var Dt=F("indexed-document-paths",{clearGroups:["whole-project"]});function $(e,t={}){let n=Wt(t);return[...Dt.get(e,n,()=>{let o=t.scope?"AND relative_path LIKE ?":"",s=t.like?"AND relative_path LIKE ?":"",i=[...t.scope?[`%${t.scope}%`]:[],...t.like?[t.like]:[]],a=e.all(`SELECT relative_path
2
- FROM documents
3
- WHERE 1 = 1
4
- ${e.pathExclusionsFor("documents")}
5
- ${o}
6
- ${s}
7
- ORDER BY relative_path`,...i).map(l=>l.relative_path),c=t.extensions?a.filter(l=>t.extensions.some(p=>l.toLowerCase().endsWith(p.toLowerCase()))):a;return t.includeIgnored===!1?c.filter(l=>!e.isIgnored(l)):c})]}function Wt(e){let t=e.extensions?[...new Set(e.extensions.map(n=>n.toLowerCase()))].sort():null;return JSON.stringify({scope:e.scope??null,like:e.like??null,extensions:t,includeIgnored:e.includeIgnored!==!1})}function Qo(e,t,n){let r=Ie(t);if(!r)return[];let o=e.all(`SELECT relative_path
8
- FROM documents
9
- WHERE relative_path = ?
10
- ${e.pathExclusionsFor("documents")}`,r).filter(c=>!e.isIgnored(c.relative_path)).map(c=>({relativePath:c.relative_path,score:Re(c.relative_path,r)}));if(o.length>0)return o;let s=$(e,{includeIgnored:!1}).map(c=>({relativePath:c,score:Re(c,r)})).filter(c=>c.score>0).sort((c,l)=>l.score-c.score||c.relativePath.localeCompare(l.relativePath)),i=s.filter(c=>c.score>=1100);if(i.length>0)return n.allowMultiple?i:[i[0]];if(n.requirePathMatch)return[];let a=s.filter(c=>c.score>=800);return a.length>0?n.allowMultiple?a:[a[0]]:n.allowMultiple?s:s.slice(0,1)}function Re(e,t){let n=Ie(e),r=Ve(n),o=Ve(t),s=0;return n===t&&(s+=1200),n.endsWith(`/${t}`)&&(s+=1100),r===o&&(s+=900),n.startsWith(`${t}/`)&&(s+=850),n.includes(t)&&(s+=250),s}function Ie(e){return e.trim().replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}import{extname as je}from"path";var Ut={".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 D(e){return Ut[je(e).toLowerCase()]??null}function le(e){return je(e).toLowerCase()===".vue"}import{createRequire as Mt}from"module";var d=Mt(import.meta.url),Z=null,Be=!1;function zt(){if(Be)return null;if(Z)return Z;try{return Z=d("tree-sitter"),Z}catch{return Be=!0,null}}var Oe=new Map,G=new Set;function qt(e){if(G.has(e))return null;let t=Oe.get(e);if(t)return t;let n;try{switch(e){case"rust":n=d("tree-sitter-rust");break;case"typescript":n=d("tree-sitter-typescript").typescript;break;case"tsx":n=d("tree-sitter-typescript").tsx;break;case"javascript":n=d("tree-sitter-javascript");break;case"python":n=d("tree-sitter-python");break;case"java":n=d("tree-sitter-java");break;case"kotlin":n=d("tree-sitter-kotlin");break;case"scala":n=d("tree-sitter-scala");break;case"ruby":n=d("tree-sitter-ruby");break;case"c":n=d("tree-sitter-c");break;case"cpp":n=d("tree-sitter-cpp");break;case"csharp":n=d("tree-sitter-c-sharp");break;case"php":n=d("tree-sitter-php").php;break;case"vb":{let r=d("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return G.add(e),null}}catch{return G.add(e),null}return Oe.set(e,n),n}var $e=new Map;function Ht(e){let t=$e.get(e);if(t)return t;let n=qt(e);if(!n)return null;let r=zt();if(!r)return null;let o=new r;try{o.setLanguage(n)}catch{return G.add(e),null}return $e.set(e,o),o}function Xt(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function P(e,t){let n=Ht(e);if(!n)return null;try{return Xt(n,t)}catch{return null}}import{createRequire as Jt}from"module";import{posix as ue}from"path";var Zt=L("vue-sfc-units"),Gt=Jt(import.meta.url),Kt;function Qt(){return Kt??=Gt("@vue/compiler-sfc")}function Ue(...e){return Qt().parse(...e)}function V(e,t){let n=Me(t),r=g(e,n);return Zt.get(e,n,r,()=>pe(e,n,r))}function Me(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function Yt(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function E(e){return!e||e.body.length===0?0:e.body.split(`
11
- `).length}function pe(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let o;try{o=Ue(n,{filename:t})}catch(i){return r.errors.push(We(i)),r}r.errors.push(...o.errors.map(We));let{descriptor:s}=o;return s.template&&(r.template=K(e,t,"template",s.template)),s.script&&r.scripts.push(De(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push(De(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(i=>K(e,t,"style",i)),r.customBlocks=s.customBlocks.map(i=>K(e,t,"custom",i)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(i=>i?.errors??[])),r}function De(e,t,n,r){let o=K(e,t,"script",n);return{...o,kind:"script",setup:r,astLanguage:Yt(o.lang)}}function K(e,t,n,r){let o=tn(r.attrs),s=typeof o.lang=="string"?o.lang:null,i=typeof o.src=="string"?o.src:typeof r.src=="string"?r.src:void 0;if(i){let c=en(t,i);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:i,attrs:o,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${i}`]};let l=g(e,c),p=l?Math.max(0,l.split(`
12
- `).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:i,attrs:o,lang:s,body:l,startLine:0,endLine:p,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:o,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function en(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=Me(ue.normalize(ue.join(ue.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function tn(e){return{...e}}function We(e){return e instanceof Error?e.message:String(e)}function fe(e,t,n){let o=pe(e,t,n).scripts.filter(i=>i.astLanguage&&i.body.length>0),s=o[0]?.astLanguage;return s?{body:o.map(i=>`${`
13
- `.repeat(i.startLine)}${i.body}`).join(`
14
- `),startLine:0,language:s}:null}var ze=_e("ast-trees",{clearGroups:["whole-project","source-file"]});function qe(e,t){if(le(t))return nn(e,t);let n=D(t);if(!n)return null;let r=g(e,t);return r?ze.get(e,t,r,()=>P(n,r)):null}function hs(e,t,n){if(le(t)){let s=fe(e,t,n);if(!s)return null;let i=P(s.language,`
15
- `.repeat(s.startLine)+s.body);return i?{tree:i,language:s.language}:null}let r=D(t);if(!r)return null;let o=P(r,n);return o?{tree:o,language:r}:null}function nn(e,t){let n=g(e,t);return n?ze.get(e,t,n,()=>{let r=fe(e,t,n);if(!r)return null;let o=`
16
- `.repeat(r.startLine)+r.body;return P(r.language,o)}):null}function W(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var Qe=["function_declaration","generator_function_declaration","method_definition","method_signature","function_signature"],rn=new Set(Qe),on=[...Qe,"variable_declarator","public_field_definition"],sn=["function_item","function_signature_item"],an=["function_definition"],cn=[],He=new Set(["arrow_function","function_expression","generator_function"]);function vs(e){return e==="rust"?sn:e==="python"?an:e==="typescript"||e==="tsx"||e==="javascript"?on:cn}function Ye(e,t){let n=un(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:Ge(n.functionNode),params:Xe(n.functionNode),paramsEndLine:Je(n.functionNode),isLiteralPassthrough:Ke(n.functionNode,t)};if(!ln(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(o=>o.type==="identifier"||o.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:Ge(e),params:Xe(e),paramsEndLine:Je(e),isLiteralPassthrough:Ke(e,t)}:null}function et(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function Xe(e){let t=et(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(W(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let o=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),s=r.childForFieldName("pattern");if(!o&&s&&s.type==="identifier"){n.push({name:s.text,simple:!0});continue}let i=r.namedChildren.find(a=>a.type==="identifier");n.push({name:s?.type==="identifier"?s.text:i?.text??"",simple:!1})}return n}function Je(e){let t=et(e);return t?t.endPosition.row:e.startPosition.row}function ln(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?rn.has(e):!1}function un(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 o=Ze(r);return o?{name:n.text,definitionNode:e,functionNode:o}: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 o=Ze(r);return o?{name:n.text,definitionNode:e,functionNode:o}:null}return null}function Ze(e){if(He.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(o=>o.type==="arguments"))?.namedChildren??[]).filter(o=>He.has(o.type));return r.length===1?r[0]:null}function Ge(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)W(r)||(n+=1);return n}function Ke(e,t){let n=e.namedChildren.find(u=>u.type==="block"||u.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(u=>!W(u));if(r.length!==1)return!1;let o=r[0],s=null;if(o.type==="return_statement"||o.type==="expression_statement"?s=o.namedChild(0)??null:t==="rust"&&(o.type==="call_expression"||o.type==="macro_invocation")&&(s=o),!s)return!1;let i=t==="python"?"call":"call_expression";if(s.type!==i)return!1;let a=s.namedChildren.find(u=>u.type==="arguments"||u.type==="argument_list");if(!a)return!1;let c=a.namedChildren.filter(u=>!W(u)),l=e.namedChildren.find(u=>u.type==="parameters"||u.type==="formal_parameters");if(!l)return!1;let p=[];for(let u of l.namedChildren){if(u.type==="identifier"){p.push(u.text);continue}let N=u.namedChildren.find(B=>B.type==="identifier");N&&p.push(N.text)}if(c.length!==p.length)return!1;for(let u=0;u<p.length;u+=1){let N=c[u];if(N.type!=="identifier"||N.text!==p[u])return!1}return!0}function Ns(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}import{readdirSync as pn}from"fs";import{execFileSync as fn}from"child_process";import{extname as Q,join as mn}from"path";var dn=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".clj",".cljs",".cljc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],Fs=[".vue"],tt=[".tsx",".jsx"],nt=[".vue"],gn=[...tt,...nt],hn=new Set(tt),Sn=new Set(nt),rt=new Set(dn.map(e=>e.toLowerCase())),yn=[...rt].sort().join(","),ot=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);function U(e,t={}){let n=t.includeIndexed??!0,r=t.includeAuxiliary??!0,o=t.extensions?.map(c=>c.toLowerCase()),s=o?new Set(o):rt,i=o?[...s].sort().join(","):yn,a=`${n?"1":"0"}|${r?"1":"0"}|${i}`;return xn.get(e,a,()=>{let c=new Set;if(n)for(let l of $(e,{includeIgnored:!1}))s.has(Q(l).toLowerCase())&&c.add(l);if(r)for(let l of vn(e.config.projectRoot,s))e.isIgnored(l)||n&&c.has(l)||c.add(l);return[...c].sort()})}function Ps(e,t={}){let n=!1,r=!1;for(let o of U(e,{extensions:gn})){if(t.scope&&!o.includes(t.scope))continue;let s=Q(o).toLowerCase();if(n||=hn.has(s),r||=Sn.has(s),n&&r)break}return{react:n,vue:r}}var xn=F("source-files",{clearGroups:[]});function vn(e,t){return Nn(e,t)??bn(e,t)}function Nn(e,t){try{let n=fn("git",["ls-files","--cached","--others","--exclude-standard"],{cwd:e,encoding:"utf-8",timeout:1e4,killSignal:"SIGKILL",stdio:["ignore","pipe","ignore"]}),r=new Set;for(let o of n.split(`
17
- `)){let s=o.trim();s&&(Cn(s)||t.has(Q(s).toLowerCase())&&r.add(s))}return r}catch{return null}}function Cn(e){return e.split("/").some(t=>ot.has(t))}function bn(e,t){let n=new Set,r=o=>{let s=o?mn(e,o):e,i;try{i=pn(s,{withFileTypes:!0})}catch{return}for(let a of i)if(!ot.has(a.name)){if(a.isDirectory()){r(o?`${o}/${a.name}`:a.name);continue}t.has(Q(a.name).toLowerCase())&&n.add(o?`${o}/${a.name}`:a.name)}};return r(""),n}import{extname as Fn}from"path";function ee(e,t){let n=kn(e,t);if(!n)return null;let r=Y(n);if(!r)return null;let o=_n(n);return{calleeLeaf:r,calleeQualifier:o?Tn(n):void 0,calleeText:n.text,memberAccess:o,line:e.startPosition.row}}function Tn(e){return(e.childForFieldName("object")??e.childForFieldName("value")??e.namedChild(0)??void 0)?.text||void 0}function kn(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 _n(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function Y(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?Y(t):null}case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?Y(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?Y(t):null}case"super":case"self":case"this":return null;default:return null}}var Ln=new Set(["children","className","data","e","err","error","ev","event","false","id","idx","index","item","key","null","props","res","result","state","style","true","undefined","val","value"]);function te(e){return e.length<=2||Ln.has(e)}var Pn=[".tsx",".jsx"],st=new Set(["useActionState","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useOptimistic","useReducer","useRef","useState","useSyncExternalStore","useTransition"]),En=new Set(["useEffect","useInsertionEffect","useLayoutEffect"]),An=new Set(["useActionState","useOptimistic","useReducer","useRef","useState"]),wn=new Set(["useLocation","useNavigate","useParams","useSearchParams","useTranslation"]),Vn=new Set(["axios","fetch","gql","graphql","mutate","query","request","useMutation","useQuery","useSuspenseQuery"]),Rn=new Set(["add","apply","cancel","change","clear","close","create","delete","fetch","filter","handle","load","open","refresh","remove","render","reset","save","select","submit","toggle","update"]),In=new Set(["aria-hidden","className","clipRule","d","fill","fillRule","height","role","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","viewBox","width","xmlns"]),jn=L("react-component-behavior-profiles"),it=Ee({kind:"react-component-behavior-profiles",invalidation:Ae("react-component-behavior-profiles"),serialize:Dn,deserialize:Wn});function ut(e,t={}){let n=U(e,{extensions:Pn}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).flatMap(o=>de(e,o)).filter(o=>(t.minJsxTokens===void 0||o.jsxTokens.size>=t.minJsxTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function de(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return jn.get(e,n,r,()=>Bn(e,n,r)).map($n)}function Bn(e,t,n){let r=Fe(e,t,n),o=it.read(e,t,r);if(o)return o;let s=On(e,t);return it.write(e,t,r,s),s}function On(e,t){let n=Mn(t);if(!n)return[];let r=qe(e,t);if(!r)return[];let o=we(e,t).length;return zn(r.rootNode,n).filter(i=>i.kind==="hook"||ge(i.bodyNode)).map(i=>{let a=Kn(i.bodyNode),c=nr(i.bodyNode,n);return{file:t,name:i.name,kind:i.kind,startLine:i.node.startPosition.row,endLine:i.node.endPosition.row,loc:Math.max(1,i.node.endPosition.row-i.node.startPosition.row+1),fileLines:o,jsxTokens:a.tokens,behaviorTokens:c.tokens,componentNames:b(a.componentNames),nativeTags:b(a.nativeTags),propNames:b(a.propNames),eventNames:b(a.eventNames),hookNames:b(c.hookNames),requestNames:b(c.requestNames),stateNames:b(c.stateNames),effectNames:b(c.effectNames),handlerNames:b(c.handlerNames)}})}function $n(e){return{...e,jsxTokens:new Set(e.jsxTokens),behaviorTokens:new Set(e.behaviorTokens),componentNames:[...e.componentNames],nativeTags:[...e.nativeTags],propNames:[...e.propNames],eventNames:[...e.eventNames],hookNames:[...e.hookNames],requestNames:[...e.requestNames],stateNames:[...e.stateNames],effectNames:[...e.effectNames],handlerNames:[...e.handlerNames]}}function Dn(e){return JSON.stringify(e.map(t=>({...t,jsxTokens:[...t.jsxTokens],behaviorTokens:[...t.behaviorTokens]})))}function Wn(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=[];for(let r of t){let o=Un(r);if(!o)return null;n.push(o)}return n}catch{return null}}function Un(e){if(!Pe(e))return null;let{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:c,behaviorTokens:l,componentNames:p,nativeTags:u,propNames:N,eventNames:B,hookNames:ae,requestNames:ce,stateNames:m,effectNames:C,handlerNames:O}=e;if(typeof t!="string"||typeof n!="string"||r!=="component"&&r!=="hook"||!ne(o)||!ne(s)||!ne(i)||!ne(a))return null;let S={jsxTokens:y(c),behaviorTokens:y(l),componentNames:y(p),nativeTags:y(u),propNames:y(N),eventNames:y(B),hookNames:y(ae),requestNames:y(ce),stateNames:y(m),effectNames:y(C),handlerNames:y(O)};return Object.values(S).some($t=>$t===null)?null:{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:new Set(S.jsxTokens),behaviorTokens:new Set(S.behaviorTokens),componentNames:S.componentNames,nativeTags:S.nativeTags,propNames:S.propNames,eventNames:S.eventNames,hookNames:S.hookNames,requestNames:S.requestNames,stateNames:S.stateNames,effectNames:S.effectNames,handlerNames:S.handlerNames}}function ne(e){return typeof e=="number"&&Number.isFinite(e)}function Mn(e){let t=Fn(e).toLowerCase();return t!==".tsx"&&t!==".jsx"?null:D(e)}function zn(e,t){let n=[],r=new Set,o=s=>{let i=qn(s);if(i&&(!Zn(s)||i.kind==="component")){let a=`${i.name}:${i.node.startIndex}:${i.node.endIndex}`;r.has(a)||(r.add(a),n.push(i))}for(let a of s.namedChildren)o(a)};return(t==="tsx"||t==="javascript")&&o(e),n}function qn(e){if(e.type==="class_declaration"){let s=me(e);if(!s||!/^[A-Z]/.test(s))return null;let i=Hn(e);return!i||!Xn(e)&&!ge(i)?null:{name:s,kind:"component",node:e,bodyNode:i}}if(e.type==="function_declaration"){let s=me(e);return!s||!at(s)?null:{name:s,kind:ct(s),node:e,bodyNode:e}}if(e.type!=="variable_declarator")return null;let t=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1),r=M(t);if(!r||!n||!at(r))return null;let o=Jn(n);return o?{name:r,kind:ct(r),node:e,bodyNode:o}:null}function Hn(e){for(let t of e.namedChildren)if(t.type==="class_body")for(let n of t.namedChildren){if(n.type!=="method_definition")continue;if((n.childForFieldName("name")??n.namedChild(0))?.text==="render")return n}return null}function Xn(e){return/\b(?:React\.)?(?:Pure)?Component\b/.test(e.text)}function at(e){return/^[A-Z]/.test(e)||/^use[A-Z0-9_]/.test(e)}function ct(e){return/^use[A-Z0-9_]/.test(e)?"hook":"component"}function Jn(e){if(e.type==="arrow_function"||e.type==="function_expression")return e;if(e.type!=="call_expression")return null;let t=Gn(e);return t!=="memo"&&t!=="forwardRef"?null:e.namedChildren.find(o=>o.type==="arguments")?.namedChildren.find(o=>o.type==="arrow_function"||o.type==="function_expression")??null}function Zn(e){let t=e.parent;for(;t;){if(t.type==="function_declaration"||t.type==="function_expression"||t.type==="arrow_function"||t.type==="method_definition")return!0;t=t.parent}return!1}function me(e){return M(e.childForFieldName("name")??e.namedChild(0))}function Gn(e){let t=e.childForFieldName("function")??e.namedChild(0);return t?t.text.split(".").pop()??t.text:null}function ge(e){return e.type.startsWith("jsx_")?!0:e.namedChildren.some(ge)}function Kn(e){let t={tokens:new Set,componentNames:new Set,nativeTags:new Set,propNames:new Set,eventNames:new Set},n=r=>{r.type==="jsx_opening_element"||r.type==="jsx_self_closing_element"?Qn(r,t):r.type==="jsx_element"&&r.text.trimStart().startsWith("<>")?t.tokens.add("jsx:fragment"):r.type==="jsx_expression"?Yn(r,t):r.type==="jsx_fragment"&&t.tokens.add("jsx:fragment");for(let o of r.children)n(o)};return n(e),t}function Qn(e,t){let n=er(e),r=!1;if(n){let o=lt(n),s=o==="Fragment"||o==="React.Fragment";r=ar(o)&&!s,s?t.tokens.add("jsx:fragment"):r?(t.componentNames.add(o),t.tokens.add(`component:${o}`)):(t.nativeTags.add(o),t.tokens.add(`native:${o}`))}for(let o of e.namedChildren)if(o.type==="jsx_attribute"){let s=tr(o);if(!s)continue;let i=lt(s);if(i.startsWith("on")&&i.length>2){let a=i.slice(2).replace(/^[A-Z]/,c=>c.toLowerCase());t.eventNames.add(a),t.tokens.add(`event:${a}`)}else In.has(i)||(t.propNames.add(i),t.tokens.add(`${r?"prop":"native-prop"}:${i}`))}else o.type==="jsx_spread_attribute"&&t.tokens.add(pt(o))}function Yn(e,t){let n=e.text;/^\{\s*\.\.\./.test(n)&&t.tokens.add(pt(e)),ft(e)&&t.tokens.add("jsx:conditional"),(n.includes(".map(")||n.includes(".flatMap("))&&t.tokens.add("jsx:list");for(let r of cr(n))te(r)||t.tokens.add(`binding:${r}`)}function pt(e){let t=/^\{\s*\.\.\.\s*([^}]+)\s*\}$/.exec(e.text)?.[1],n=e.namedChildren.find(s=>s.type!=="comment"),r=t??n?.text??"",o=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.exec(r.trim())?.[0];return o?`prop:spread:${o}`:"prop:spread"}function ft(e){return e.type==="ternary_expression"||e.type==="conditional_expression"?!0:e.namedChildren.some(ft)}function er(e){for(let t of e.namedChildren)if(t.type==="identifier"||t.type==="jsx_identifier"||t.type==="property_identifier"||t.type==="member_expression"||t.type==="jsx_member_expression")return t.text;return/^<\s*([A-Za-z][\w$.]*)/.exec(e.text)?.[1]??null}function tr(e){for(let t of e.namedChildren)if(t.type==="property_identifier"||t.type==="identifier"||t.type==="jsx_identifier")return t.text;return/^([A-Za-z_$][\w$:-]*)/.exec(e.text)?.[1]??null}function nr(e,t){let n={tokens:new Set,hookNames:new Set,requestNames:new Set,stateNames:new Set,effectNames:new Set,handlerNames:new Set},r=o=>{if(o.type==="call_expression"){let s=ee(o,t);s&&rr(s.calleeLeaf,n)}else if(o.type==="variable_declarator")sr(o,n);else if(o.type==="function_declaration"){let s=me(o);s&&mt(s,n)}for(let s of o.namedChildren)r(s)};return r(e),n}function rr(e,t){/^use[A-Z0-9_]/.test(e)&&(t.hookNames.add(e),!st.has(e)&&!wn.has(e)&&t.tokens.add(`hook:${e}`)),st.has(e)&&t.tokens.add(`react-hook:${e}`),En.has(e)&&(t.effectNames.add(e),t.tokens.add(`effect:${e}`)),An.has(e)&&t.tokens.add(`state-hook:${e}`),or(e)&&(t.requestNames.add(e),t.tokens.add(`request:${e}`))}function or(e){if(Vn.has(e))return!0;let t=/^use([A-Z0-9_].*)$/.exec(e)?.[1];return t?/(Query|Mutation|Fetch|Resource)$/.test(t):!1}function sr(e,t){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(n?.type==="array_pattern"&&r?.text.includes("useState")){let s=n.namedChildren.find(a=>M(a)),i=M(s);i&&(t.stateNames.add(i),t.tokens.add(`state:${i}`))}let o=M(n);o&&mt(o,t)}function mt(e,t){let n=ir(e);!n||!Rn.has(n)||(t.handlerNames.add(e),t.tokens.add(`handler:${e}`),t.tokens.add(`handler-verb:${n}`))}function ir(e){let t=e.startsWith("handle")&&e.length>6?e.slice(6).replace(/^[A-Z]/,n=>n.toLowerCase()):e;return/^[a-z]+/.exec(t)?.[0]??null}function ar(e){return/^[A-Z]/.test(e)||e.includes(".")}function lt(e){return e.replace(/^this\./,"").replace(/\$/g,".")}function M(e){return e&&(e.type==="identifier"||e.type==="property_identifier"||e.type==="shorthand_property_identifier"||/^[A-Za-z_$][\w$]*$/.test(e.text))?e.text:null}function cr(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];t.includes(r)||t.push(r)}return t}function b(e){return[...e].sort()}var lr=new Set(["ref","shallowRef","reactive","computed","watch","watchEffect"]),ur=new Set(["onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","onActivated","onDeactivated","onErrorCaptured"]),pr=new Set(["axios","fetch","runRequest","useAsyncData","useFetch","useResource"]),fr=new Set(["defineEmits","defineExpose","defineModel","defineOptions","defineProps","withDefaults"]),mr=new Set(["catch","for","function","if","return","switch","while"]);function oe(e){let t={imports:[],functions:[],calls:[],composables:[],stores:[],reactivity:[],lifecycle:[],requests:[],macros:[],lineCount:0,externalLineCount:0,externalScriptPaths:[],unresolvedScripts:[]};for(let n of e.scripts){t.lineCount+=E(n),n.external&&(t.externalLineCount+=E(n),t.externalScriptPaths.push(n.sourcePath));for(let o of n.errors)t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:o});if(!n.body||!n.astLanguage){n.astLanguage||t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:`Unsupported Vue script language: ${n.lang??"unknown"}`});continue}t.imports.push(...Sr(n));let r=P(n.astLanguage,n.body);r?gr(n,r.rootNode,t):hr(n,t)}return dr(t),t.externalScriptPaths=gt(t.externalScriptPaths),t}function dr(e){e.composables=R(e,"composable"),e.stores=R(e,"store"),e.reactivity=R(e,"reactivity"),e.lifecycle=R(e,"lifecycle"),e.requests=R(e,"request"),e.macros=R(e,"macro")}function R(e,t){return gt(e.calls.filter(n=>n.categories.includes(t)).map(n=>n.name))}function gr(e,t,n){let r=new Set,o=new Set,s=i=>{let a=Ye(i,e.astLanguage);if(a){let l=`${a.name}:${a.startLine}:${a.endLine}`;o.has(l)||(o.add(l),n.functions.push({name:a.name,sourcePath:e.sourcePath,startLine:e.startLine+a.startLine,endLine:e.startLine+a.endLine,setup:e.setup}))}let c=ee(i,e.astLanguage);if(c){let l=`${c.calleeLeaf}:${c.line}`;r.has(l)||(r.add(l),n.calls.push({name:c.calleeLeaf,sourcePath:e.sourcePath,line:e.startLine+c.line,categories:dt(c.calleeLeaf),setup:e.setup}))}for(let l of i.children)s(l)};s(t)}function hr(e,t){for(let n of e.body.matchAll(/\b([A-Za-z_$][\w$]*)\s*\(/g)){let r=n[1];!r||mr.has(r)||t.calls.push({name:r,sourcePath:e.sourcePath,line:e.startLine+re(e.body,n.index??0),categories:dt(r),setup:e.setup})}for(let n of e.body.matchAll(/\bfunction\s+([A-Za-z_$][\w$]*)\b/g)){let r=n[1];if(!r)continue;let o=e.startLine+re(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}for(let n of e.body.matchAll(/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/g)){let r=n[1];if(!r)continue;let o=e.startLine+re(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}}function Sr(e){let t=[];for(let n of e.body.matchAll(/\bimport\s+(?:type\s+)?([^'";]+?)\s+from\s+['"]([^'"]+)['"]/g)){let r=n[1]?.trim(),o=n[2];if(!r||!o)continue;let s=e.startLine+re(e.body,n.index??0);for(let i of yr(r))t.push({local:i,source:o,sourcePath:e.sourcePath,line:s,setup:e.setup})}return t}function yr(e){let t=[],r=e.split(",").map(i=>i.trim()).filter(Boolean)[0];r&&!r.startsWith("{")&&!r.startsWith("*")&&t.push(r);let o=/\{([^}]*)\}/.exec(e)?.[1];if(o)for(let i of o.split(",")){let a=i.trim();if(!a)continue;let c=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(a)?.[1];t.push(c??a.replace(/^type\s+/,"").trim())}let s=/\*\s+as\s+([A-Za-z_$][\w$]*)/.exec(e)?.[1];return s&&t.push(s),t.filter(i=>/^[A-Za-z_$][\w$]*$/.test(i))}function dt(e){let t=["call"];return/^use[A-Z0-9_]/.test(e)&&t.push("composable"),/^use[A-Z0-9_].*Store$/.test(e)&&t.push("store"),lr.has(e)&&t.push("reactivity"),ur.has(e)&&t.push("lifecycle"),pr.has(e)&&t.push("request"),fr.has(e)&&t.push("macro"),t}function re(e,t){let n=0;for(let r=0;r<t&&r<e.length;r+=1)e.charCodeAt(r)===10&&(n+=1);return n}function gt(e){return[...new Set(e)].sort()}import{createRequire as xr}from"module";function ht(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}var vr=L("vue-template-facts"),Nr=xr(import.meta.url),Cr;function z(){return Cr??=Nr("@vue/compiler-dom")}var br=new Set(["component","keep-alive","slot","suspense","teleport","template","transition","transition-group"]),Tr=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),kr=new Set(["div","span","template"]),_r=new Set(["as","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function se(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return vr.get(e,n,r,()=>Lr(n,V(e,n).template))}function Lr(e,t){let n={relativePath:e,template:t?{startLine:t.startLine,endLine:t.endLine}:null,componentTags:[],nativeTags:[],builtinTags:[],props:[],events:[],directives:[],slots:[],expressionIdentifiers:[],structuralTokens:[]};if(!t)return n;let r;try{r=z().parse(t.body,{comments:!1})}catch{return n}let o=new Set,s=i=>{i.trim()&&o.add(i)};return yt(r.children,t.startLine,n,s),n.structuralTokens=[...o].sort(),n}function yt(e,t,n,r){for(let o of e)if(o.type===z().NodeTypes.ELEMENT)Fr(o,t,n,r),yt(o.children,t,n,r);else if(o.type===z().NodeTypes.INTERPOLATION){r("interpolation");let s=he(o.content);s&&xt(s,t,o.loc.start.line,n,r)}}function Fr(e,t,n,r){let o=Ir(e.tag),s={tag:e.tag,normalized:o,kind:Rr(e),startLine:I(t,e.loc.start.line),endLine:I(t,e.loc.end.line)};s.kind==="component"?(n.componentTags.push(s),r(`component:${o}`)):s.kind==="builtin"?(n.builtinTags.push(s),r(`builtin:${o}`)):(n.nativeTags.push(s),kr.has(e.tag)||r(`native:${e.tag}`));for(let i of e.props)Pr(i,t,n,r)}function Pr(e,t,n,r){if(e.type===z().NodeTypes.ATTRIBUTE){let a=e.value?.content??null,c=St("prop",e.name,a,t,e.loc.start.line,e.loc.end.line);n.props.push(c),r(`prop:${e.name}`);return}let o=Ar(e),s=he(e.exp),i=St(Er(e.name),o,s,t,e.loc.start.line,e.loc.end.line);switch(i.kind){case"prop":n.props.push(i),r(`prop:${o}`);break;case"event":n.events.push(i),r(`event:${o}`);break;case"slot":n.slots.push(i),r(`slot:${o}`);break;case"directive":n.directives.push(i),r(`directive:${o}`);break}s&&xt(s,t,e.loc.start.line,n,r)}function St(e,t,n,r,o,s){return{kind:e,name:t,value:n,startLine:I(r,o),endLine:I(r,s)}}function Er(e){switch(e){case"bind":case"model":return"prop";case"on":return"event";case"slot":return"slot";default:return"directive"}}function Ar(e){let t=he(e.arg);return t||e.name}function he(e){if(!e)return null;let t=("content"in e&&typeof e.content=="string"?e.content:e.loc.source).trim();return t||null}function xt(e,t,n,r,o){for(let s of wr(e)){let i={name:s,startLine:I(t,n),endLine:I(t,n)};r.expressionIdentifiers.push(i),o(`id:${s}`)}}function wr(e){let t=new Set,n=Vr(e),r=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,o;for(;o=r.exec(n);){let s=o[0];_r.has(s)||te(s)||/^[A-Z_]+$/.test(s)||t.add(s)}return[...t].sort()}function Vr(e){return e.replace(/\/\*[\s\S]*?\*\//g," ").replace(/\/\/.*$/gm," ").replace(/`(?:\\[\s\S]|\$\{([^}]*)\}|[^`\\])*`/g,(t,n)=>n??" ").replace(/'(?:\\[\s\S]|[^'\\])*'/g," ").replace(/"(?:\\[\s\S]|[^"\\])*"/g," ")}function Rr(e){let t=e.tag;return e.tagType===z().ElementTypes.COMPONENT?"component":br.has(t)?"builtin":Tr.has(t)?"native":/^[A-Z]/.test(t)||t.includes("-")?"component":"native"}function Ir(e){return ht(e,/[-_:]/)}function I(e,t){return e+Math.max(0,t-1)}import{createRequire as Hr}from"module";import{existsSync as w}from"fs";import{basename as Nt,dirname as h,extname as T,join as x,relative as A,resolve as f,sep as Xr}from"path";import{existsSync as ye,readdirSync as jr,statSync as Br}from"fs";import{join as j,relative as Or}from"path";function vt(e){let t=$r(e)??Mr(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let o of t)for(let s of zr(e,o)){if(r.has(s))continue;r.add(s);let i=qr(e,s);i&&n.push(i)}return n}function $r(e){let t=j(e,"pnpm-workspace.yaml");if(!ye(t))return null;try{return Dr(X(t,"pnpm workspace manifest"))}catch{return null}}function Dr(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let o=Wr(r);if(!n){/^packages\s*:\s*$/.test(o.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(o);if(s){let i=Ur(s[1].trim());i&&t.push(i);continue}if(o.trim()!=="")break}return t}function Wr(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function Ur(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function Mr(e){let t=j(e,"package.json");if(!ye(t))return null;try{let n=JSON.parse(X(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function zr(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let i=j(e,t);return Se(i)?[i]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),o=t.slice(n+1).replace(/^\//,""),s=j(e,r||".");return Se(s)?jr(s).map(i=>j(s,i,o)).filter(Se):[]}function Se(e){try{return Br(e).isDirectory()}catch{return!1}}function qr(e,t){let n=j(t,"package.json");if(!ye(n))return null;try{let r=JSON.parse(X(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:Or(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var Jr=J("indexed-paths",{clearGroups:[]}),Zr=J("indexed-path-digest",{clearGroups:[]}),Gr=F("tsconfig-alias-config",{clearGroups:["whole-project"]}),Kr=F("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),Qr=Hr(import.meta.url),q;function Yr(){if(q!==void 0)return q;try{q=Qr("typescript")}catch{q=null}return q}var eo=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],to=J("workspace-packages",{clearGroups:["whole-project"]}),H=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],Ct=[".py",".pyi"],bt=[".java",".scala",".kt",".kts"],Tt=[".rs"],kt=[".rb"],_t=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Lt=[".cs",".vb"],Ft=[".dart"],Pt=[".php"],ie=[".clj",".cljs",".cljc"],no=new Set(H),xe=new Set(Ct),Et=new Set(bt),ve=new Set(Tt),Ne=new Set(kt),At=new Set(_t),wt=new Set(Lt),Ce=new Set(Ft),Vt=new Set(Pt),Rt=new Set(ie),ro=[{extensions:H,lookup:no},{extensions:Ct,lookup:xe},{extensions:bt,lookup:Et},{extensions:Tt,lookup:ve},{extensions:kt,lookup:Ne},{extensions:_t,lookup:At},{extensions:Lt,lookup:wt},{extensions:Ft,lookup:Ce},{extensions:Pt,lookup:Vt},{extensions:ie,lookup:Rt}];function k(e,t){return t.has(T(e).toLowerCase())}function oo(e){return k(e,xe)}function so(e){return k(e,Et)}function io(e){return k(e,ve)}function ao(e){return k(e,Ne)}function co(e){return k(e,At)}function lo(e){return k(e,wt)}function hi(e){return T(e).toLowerCase()===".vb"}function uo(e){return k(e,Ce)}function po(e){return k(e,Vt)}function fo(e){return k(e,Rt)}function mo(e){let t=T(e).toLowerCase();for(let n of ro)if(n.lookup.has(t))return n.extensions;return H}function go(e){return so(e)||lo(e)||po(e)}function It(e,t,n){return oo(t)?Fo(e,t,n):io(t)?Po(e,t,n):ao(t)?Eo(e,t,n):co(t)?Ao(e,t,n):go(t)?wo(e,n.replace(/\\/g,"."),mo(t)):uo(t)?Vo(e,t,n):fo(t)?Ro(e,n):ho(e,t,n)}function ho(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return So(e,t,n)??xo(e,n);let r=h(x(e.config.projectRoot,t)),o=f(r,n),s=_(e);for(let i of Te(o)){let a=v(A(e.config.projectRoot,i));if(s.has(a)||w(i))return a}return v(A(e.config.projectRoot,o))}function So(e,t,n){let r=ko(e,t);if(!r)return null;let o=_(e);for(let s of yo(r,n)){let i=f(r.baseUrl,s);for(let a of Te(i)){let c=v(A(e.config.projectRoot,a));if(o.has(c)||w(a))return c}}return null}function yo(e,t){let n=[];for(let[r,o]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...o);continue}let i=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(i)||!t.endsWith(a)||t.length<i.length+a.length)continue;let c=t.slice(i.length,t.length-a.length);for(let l of o)n.push(l.includes("*")?l.replace("*",c):l)}return n}function xo(e,t){let n=No(vo(e),t);if(!n)return null;let r=_(e);for(let o of Co(n)){let s=f(e.config.projectRoot,n.pkg.relativeDir,o);for(let i of Te(s)){let a=v(A(e.config.projectRoot,i));if(r.has(a)||w(i))return a}}return null}function vo(e){return to.get(e,()=>vt(e.config.projectRoot))}function No(e,t){let n=null;for(let r of e){let o=null;t===r.name?o="":t.startsWith(`${r.name}/`)&&(o=t.slice(r.name.length+1)),o!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:o})}return n}function Co(e){let t=[],n=bo(e.pkg.exports,e.subpath);if(n){let r=To(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function bo(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return jt(e[n])}function jt(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=jt(t[n]);if(r)return r}return null}function To(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function ko(e,t){let n=v(h(t));return Kr.get(e,n,()=>_o(e,n))}function _o(e,t){let n=Yr();if(!n)return null;let r=f(e.config.projectRoot),o=f(r,t);for(;o===r||o.startsWith(r+Xr);){for(let i of eo){let a=x(o,i);if(!w(a))continue;let c=Gr.get(e,a,()=>Lo(n,a));if(c)return c}let s=h(o);if(s===o)break;o=s}return null}function Lo(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,h(t)),o=r.options.paths;return!o||Object.keys(o).length===0?null:{baseUrl:r.options.baseUrl?f(h(t),r.options.baseUrl):h(t),paths:o}}catch{return null}}function Fo(e,t,n){let r=_(e),o;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let i=s[1].length,a=s[2].replace(/^\./,""),c=h(x(e.config.projectRoot,t));for(let l=1;l<i;l++)c=h(c);o=a?f(c,a.replace(/\./g,"/")):c}else o=f(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of Io(o)){let i=v(A(e.config.projectRoot,s));if(r.has(i)||w(s))return i}return null}function Po(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 o=h(x(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=f(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=f(o,r.slice(6).replace(/::/g,"/")):s=f(h(o),r.slice(7).replace(/::/g,"/")),be(e,jo(s))}function Eo(e,t,n){let r=h(x(e.config.projectRoot,t)),o=f(r,n);return be(e,Bo(o))}function Ao(e,t,n){let r=h(x(e.config.projectRoot,t)),o=[f(r,n),f(e.config.projectRoot,n),f(e.config.projectRoot,"include",n),f(e.config.projectRoot,"src",n)];return be(e,o)}function wo(e,t,n){let r=_(e),o=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=o.replace(/\./g,"/"),i=o.split(".").pop()??o;for(let c of n){let l=`${s}${c}`,p=[...r].find(u=>u.endsWith(l));if(p)return p}for(let c of n){let l=[...r].find(p=>Nt(p)===`${i}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(T(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${i}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function Vo(e,t,n){let r=_(e);if(n.startsWith("package:")){let i=n.slice(8),a=i.indexOf("/");if(a<0)return null;let c=i.slice(a+1),l=v(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let o=h(x(e.config.projectRoot,t)),s=f(o,n);for(let i of Oo(s)){let a=v(A(e.config.projectRoot,i));if(r.has(a)||w(i))return a}return null}function Ro(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=_(e);for(let o of ie){let s=`${n}${o}`,i=[...r].find(a=>a.endsWith(s));if(i)return i}for(let o of ie){let s=[...r].find(i=>Nt(i)===`${n.split("/").pop()}${o}`);if(s)return s}return null}function Io(e){let t=T(e);return xe.has(t)?[e]:[`${e}.py`,`${e}.pyi`,x(e,"__init__.py"),x(e,"__init__.pyi")]}function be(e,t){let n=_(e);for(let r of t){let o=v(A(e.config.projectRoot,r));if(n.has(o)||w(r))return o}return null}function jo(e){let t=T(e);return ve.has(t)?[e]:[`${e}.rs`,x(e,"mod.rs")]}function Bo(e){let t=T(e);return Ne.has(t)?[e]:[`${e}.rb`,x(e,"index.rb")]}function Oo(e){let t=T(e);return Ce.has(t)?[e]:[`${e}.dart`,e]}function Te(e){let t=T(e),n=new Set;if(t){n.add(e);for(let r of H)n.add(e.slice(0,-t.length)+r)}else for(let r of H)n.add(`${e}${r}`),n.add(x(e,`index${r}`));return[...n]}function _(e){return Jr.get(e,()=>new Set($(e,{includeIgnored:!1}).map(v)))}function Si(e){return Zr.get(e,()=>Le([..._(e)].sort().join(`
18
- `)))}var $o=new Set(["in","key","of"]),Do=new Set(["computed","defineEmits","defineProps","reactive","ref","watch","watchEffect"]),Wo=L("vue-component-behavior-profiles");function Bt(e,t={}){let n=U(e,{extensions:[".vue"]}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).map(o=>ke(e,o)).filter(o=>(t.minTemplateTokens===void 0||o.templateTokens.size>=t.minTemplateTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function ke(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n),o=Wo.get(e,n,r,()=>Uo(e,n,r));return zo(o)}function Uo(e,t,n){let r=V(e,t),o=se(e,t),s=oe(r),i=Xo(o),a=o.expressionIdentifiers.map(m=>m.name).filter(m=>!i.includes(m)).filter((m,C,O)=>O.indexOf(m)===C).sort(),c=o.componentTags.map(m=>m.normalized).filter((m,C,O)=>O.indexOf(m)===C).sort(),l=n?n.split(`
19
- `).length:0,p=E(r.template),u=s.lineCount,N=r.styles.reduce((m,C)=>m+E(C),0),B=r.customBlocks.reduce((m,C)=>m+E(C),0),{lines:ae,paths:ce}=Mo(e,t,s);return{file:t,sfc:r,templateFacts:o,scriptFacts:s,templateTokens:new Set(o.structuralTokens),behaviorTokens:Ho(o,s,a),templateBindingNames:a,templateLocalNames:i,componentNames:c,sfcLines:l,totalLines:l+s.externalLineCount,templateLines:p,scriptLines:u,styleLines:N,externalScriptLines:s.externalLineCount,externalScriptPaths:s.externalScriptPaths,customBlockLines:B,delegatedComposableLines:ae,delegatedComposablePaths:ce}}function Mo(e,t,n){let r=new Set;for(let i of n.composables){let a=n.imports.find(l=>l.local===i);if(!a)continue;let c=It(e,a.sourcePath,a.source);!c||c===t||r.add(c)}let o=[...r].sort();return{lines:o.reduce((i,a)=>{let c=g(e,a);return i+(c?c.split(`
20
- `).length:0)},0),paths:o}}function zo(e){let t=qo(e.scriptFacts);return{...e,scriptFacts:t,templateTokens:new Set(e.templateTokens),behaviorTokens:new Set(e.behaviorTokens),templateBindingNames:[...e.templateBindingNames],templateLocalNames:[...e.templateLocalNames],componentNames:[...e.componentNames],externalScriptPaths:t.externalScriptPaths,delegatedComposablePaths:[...e.delegatedComposablePaths]}}function qo(e){return{...e,imports:e.imports.map(t=>({...t})),functions:e.functions.map(t=>({...t})),calls:e.calls.map(t=>({...t,categories:[...t.categories]})),composables:[...e.composables],stores:[...e.stores],reactivity:[...e.reactivity],lifecycle:[...e.lifecycle],requests:[...e.requests],macros:[...e.macros],externalScriptPaths:[...e.externalScriptPaths],unresolvedScripts:e.unresolvedScripts.map(t=>({...t}))}}function Ho(e,t,n){let r=new Set;for(let o of t.composables)r.add(`composable:${o}`);for(let o of t.stores)r.add(`store:${o}`);for(let o of t.reactivity)r.add(`reactivity:${o}`);for(let o of t.lifecycle)r.add(`lifecycle:${o}`);for(let o of t.requests)r.add(`request:${o}`);for(let o of t.macros)r.add(`macro:${o}`);for(let o of t.functions){if(Do.has(o.name))continue;r.add(`function:${o.name}`);let s=/^[a-z]+/.exec(o.name)?.[0]??null;s&&s.length>2&&s!==o.name&&r.add(`function-verb:${s}`)}for(let o of e.events)r.add(`template-event:${o.name}`);for(let o of n)r.add(`template-binding:${o}`);return r}function Xo(e){let t=new Set;for(let n of e.directives)if(n.name==="for"&&n.value)for(let r of Jo(n.value))t.add(r);for(let n of e.slots)if(n.value)for(let r of Ot(n.value))t.add(r);return[...t].sort()}function Jo(e){let t=/^(.*?)\s+(?:in|of)\s+/.exec(e.trim());return t?Ot(t[1]??""):[]}function Ot(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];$o.has(r)||t.push(r)}return t}function wi(e){return{capability:(t,n)=>Zo(t,n),reactProfiles:(t={})=>ut(e,t),reactProfilesForFile:t=>de(e,t),vueProfiles:(t={})=>Bt(e,t),vueProfileForFile:t=>ke(e,t),vueTemplateFacts:t=>se(e,t),vueScriptFacts:t=>oe(V(e,t))}}function Zo(e,t){let n=e.startsWith("react-")?"react":"vue";if(t===void 0)return{slot:e,available:!0,framework:n};let r=t.replace(/\\/g,"/").toLowerCase();return n==="react"&&!r.endsWith(".tsx")&&!r.endsWith(".jsx")?{slot:e,available:!1,framework:n,reason:"React behavior profiles are only available for .tsx and .jsx files"}:n==="vue"&&!r.endsWith(".vue")?{slot:e,available:!1,framework:n,reason:"Vue behavior facts are only available for .vue files"}:{slot:e,available:!0,framework:n}}export{$ as a,Qo as b,vt as c,zr as d,H as e,Ct as f,bt as g,Tt as h,kt as i,_t as j,Lt as k,Ft as l,Pt as m,ie as n,hi as o,mo as p,It as q,Fo as r,Po as s,Eo as t,Ao as u,wo as v,Vo as w,Ro as x,Si as y,D as z,le as A,fe as B,qe as C,hs as D,ee as E,Y as F,vs as G,Ye as H,Ns as I,ht as J,Fs as K,ot as L,U as M,Ps as N,wi as O};
21
- //# sourceMappingURL=chunk-C7WSQA6A.js.map
@@ -1,2 +0,0 @@
1
- import{c as f}from"./chunk-NODZYYGC.js";import{a as L}from"./chunk-7MUHSZGN.js";import{d as i,e as b,f as u,l as c}from"./chunk-7Z4GMCHM.js";import{l}from"./chunk-6LS3IG2I.js";import{z as a}from"./chunk-C7WSQA6A.js";function S(o,s){let t=L(o,s);if(!t)return[];let e=new f(o).definitionsForFile(t.relativePath).filter(r=>r.symbol!==t.symbol).filter(r=>c(t.symbol,r.symbol)).sort((r,m)=>r.startLine-m.startLine||r.endLine-m.endLine).map(r=>({symbol:r.symbol,shortName:i(r.symbol),startLine:r.startLine,endLine:r.endLine,kind:u(r.symbol)??"unknown"}));return a(t.relativePath)!=="clojure"?e:d(e,y(o,t))}function y(o,s){let t=b(s.symbol);if(!t)return[];let n=i(s.symbol);return(l(o,s.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===t).map(e=>({symbol:`${s.symbol}${e.memberName}().`,shortName:`${n}:${e.memberName}()`,startLine:e.startLine,endLine:e.endLine,kind:e.memberKind}))}function d(o,s){let t=new Map;for(let n of[...o,...s])t.set(`${n.shortName}:${n.startLine}:${n.endLine}`,n);return[...t.values()].sort((n,e)=>n.startLine-e.startLine||n.endLine-e.endLine)}export{S as a};
2
- //# sourceMappingURL=chunk-DNPETNXT.js.map
@@ -1,2 +0,0 @@
1
- import{a as t}from"./chunk-DZA7MQMU.js";var e=t;export{e as a};
2
- //# sourceMappingURL=chunk-E7CJ6O72.js.map
@@ -1,2 +0,0 @@
1
- var d=[];function p(i){i.groups.length>0&&d.push(i)}function D(i,c){let a=new Set(c.groups);for(let n of d)n.groups.some(r=>a.has(r))&&(c.file!==void 0&&n.clearFile?n.clearFile(i,c.file):n.clearAll(i))}function h(){let i=new WeakMap;return{cache:i,ensure(c){let a=i.get(c);return a||(a=new Map,i.set(c,a)),a}}}function v(i,c){let{cache:a,ensure:n}=h(),r={get(e,t,o){let s=n(e);if(s.has(t))return s.get(t);let l=o();return s.set(t,l),l},has(e,t){return a.get(e)?.has(t)??!1},invalidate(e,t){a.get(e)?.delete(t)},invalidateAll(e){a.delete(e)},size(e){return a.get(e)?.size??0}};return p({name:i,groups:c.clearGroups,clearAll:e=>r.invalidateAll(e),clearFile:(e,t)=>r.invalidate(e,t)}),r}function S(i,c){let a=new WeakMap,n={get(r,e){let t=a.get(r);if(t)return t.value;let o=e();return a.set(r,{value:o}),o},invalidate(r){a.delete(r)},has(r){return a.has(r)}};return p({name:i,groups:c.clearGroups,clearAll:r=>n.invalidate(r)}),n}var g={clearGroups:["whole-project","source-file"]};function P(i){return C(i,g)}function C(i,c){let{cache:a,ensure:n}=h(),r={get(e,t,o,s){let l=n(e),u=l.get(t);if(u&&u.source===o)return u.value;let b=s();return l.set(t,{source:o,value:b}),b},invalidate(e,t){a.get(e)?.delete(t)},invalidateAll(e){a.delete(e)}};return p({name:i,groups:c.clearGroups,clearAll:e=>r.invalidateAll(e),clearFile:(e,t)=>r.invalidate(e,t)}),r}export{p as a,D as b,v as c,S as d,P as e,C as f};
2
- //# sourceMappingURL=chunk-FYCH2EYQ.js.map