scip-query 0.6.6 → 0.6.7

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 (165) hide show
  1. package/README.md +20 -1
  2. package/dist/chunk-2AUZ3PLO.js +2 -0
  3. package/dist/{chunk-PIRXZGV6.js → chunk-2CC7RA6B.js} +2 -2
  4. package/dist/{chunk-OQZF2DQJ.js → chunk-2R7OKZE5.js} +2 -2
  5. package/dist/{chunk-7PRMSA4Z.js → chunk-2YA36CXK.js} +2 -2
  6. package/dist/chunk-3A2M7AF3.js +4 -0
  7. package/dist/chunk-3EJRPTTB.js +2 -0
  8. package/dist/chunk-3SWWYJPB.js +6 -0
  9. package/dist/chunk-4M4FEWBL.js +7 -0
  10. package/dist/{chunk-UUIWMLDX.js → chunk-4Y6KUJDO.js} +2 -2
  11. package/dist/{chunk-MO65UK5V.js → chunk-55ZJ2FCW.js} +2 -2
  12. package/dist/chunk-6FLGPRBR.js +5 -0
  13. package/dist/chunk-6XRB6ATD.js +16 -0
  14. package/dist/{chunk-VEXS3I3N.js → chunk-7EQ4J66C.js} +2 -2
  15. package/dist/{chunk-QFBJZHMV.js → chunk-7TGEXAN5.js} +2 -2
  16. package/dist/chunk-ABLXPGAZ.js +2 -0
  17. package/dist/{chunk-IKQYNTW3.js → chunk-BG7YU4DJ.js} +2 -2
  18. package/dist/chunk-D2R6IIEO.js +2 -0
  19. package/dist/{chunk-YJODB2F5.js → chunk-E47WMJ5F.js} +2 -2
  20. package/dist/chunk-EEA3R37V.js +11 -0
  21. package/dist/chunk-FAN2CVZT.js +2 -0
  22. package/dist/{chunk-HVNVO6UW.js → chunk-FYO3FPFH.js} +2 -2
  23. package/dist/chunk-G47V5V3U.js +90 -0
  24. package/dist/chunk-GS55K4WJ.js +85 -0
  25. package/dist/{chunk-I377UMS2.js → chunk-HADDFTMU.js} +2 -2
  26. package/dist/chunk-HTJ5BOYP.js +10 -0
  27. package/dist/chunk-IARIBTCL.js +2 -0
  28. package/dist/{chunk-E2V5SE6M.js → chunk-IBWYWAWE.js} +2 -2
  29. package/dist/{chunk-DLWRLPKO.js → chunk-ILQSK2KJ.js} +2 -2
  30. package/dist/{chunk-KBGFYKOJ.js → chunk-JVMXNDRU.js} +2 -2
  31. package/dist/{chunk-O6VBAW7P.js → chunk-K345WFTU.js} +2 -2
  32. package/dist/{chunk-GPY33RTH.js → chunk-K6ULLR7M.js} +2 -2
  33. package/dist/chunk-KCC3GMCX.js +2 -0
  34. package/dist/{chunk-7LSCW7NF.js → chunk-KQWFRAQI.js} +2 -2
  35. package/dist/chunk-KRVRD6KZ.js +5 -0
  36. package/dist/{chunk-QFZE73XF.js → chunk-KYGNCIJ6.js} +8 -8
  37. package/dist/chunk-LHLXHH43.js +2 -0
  38. package/dist/{chunk-IZ4KV37N.js → chunk-M7GBLQG4.js} +2 -2
  39. package/dist/{chunk-WFDTS7XL.js → chunk-MEVK6R7N.js} +2 -2
  40. package/dist/{chunk-Q2ALKKSE.js → chunk-OCQN6WF4.js} +2 -2
  41. package/dist/{chunk-ERRUE5G4.js → chunk-PQTGBYXV.js} +2 -2
  42. package/dist/{chunk-ZHHMG4UC.js → chunk-QYWGC7JV.js} +2 -2
  43. package/dist/{chunk-TLRA5TR6.js → chunk-R373SHXM.js} +2 -2
  44. package/dist/{chunk-MXWC53GJ.js → chunk-RRWPHKZA.js} +2 -2
  45. package/dist/{chunk-6GPFHZP3.js → chunk-RUAJV3TN.js} +2 -2
  46. package/dist/{chunk-Q4R2IYA3.js → chunk-S57GUI2T.js} +2 -2
  47. package/dist/chunk-SVUVC5VS.js +2 -0
  48. package/dist/{chunk-4TX5IMMK.js → chunk-T426XELO.js} +2 -2
  49. package/dist/chunk-TX7BHRMT.js +2 -0
  50. package/dist/{chunk-YXMHTJYY.js → chunk-TYRPQE6R.js} +2 -2
  51. package/dist/{chunk-Y4DS3MDC.js → chunk-WPY46NIL.js} +2 -2
  52. package/dist/{chunk-CYJMOTIH.js → chunk-X3Z4KZNX.js} +2 -2
  53. package/dist/{chunk-7X7FLQC5.js → chunk-ZNNCDAYX.js} +2 -2
  54. package/dist/cli.js +156 -145
  55. package/dist/{db-BZPa7dzJ.d.ts → db-DdlToIC-.d.ts} +1 -0
  56. package/dist/index.d.ts +4 -4
  57. package/dist/index.js +2 -2
  58. package/dist/queries/affected.d.ts +1 -1
  59. package/dist/queries/affected.js +1 -1
  60. package/dist/queries/bottlenecks.d.ts +1 -1
  61. package/dist/queries/bottlenecks.js +1 -1
  62. package/dist/queries/by-kind.d.ts +1 -1
  63. package/dist/queries/by-kind.js +1 -1
  64. package/dist/queries/call-graph.d.ts +1 -1
  65. package/dist/queries/call-graph.js +1 -1
  66. package/dist/queries/change-surface.d.ts +1 -1
  67. package/dist/queries/change-surface.js +1 -1
  68. package/dist/queries/code.d.ts +1 -1
  69. package/dist/queries/code.js +1 -1
  70. package/dist/queries/complexity-hotspots.d.ts +2 -1
  71. package/dist/queries/complexity-hotspots.js +1 -1
  72. package/dist/queries/complexity.d.ts +1 -1
  73. package/dist/queries/complexity.js +1 -1
  74. package/dist/queries/convergence.d.ts +1 -1
  75. package/dist/queries/convergence.js +1 -1
  76. package/dist/queries/coupling.d.ts +1 -1
  77. package/dist/queries/coupling.js +1 -1
  78. package/dist/queries/cycles.d.ts +1 -1
  79. package/dist/queries/cycles.js +1 -1
  80. package/dist/queries/dataflow.d.ts +1 -1
  81. package/dist/queries/dataflow.js +1 -1
  82. package/dist/queries/dead.d.ts +1 -1
  83. package/dist/queries/dead.js +1 -1
  84. package/dist/queries/deep-chains.d.ts +1 -1
  85. package/dist/queries/deep-chains.js +1 -1
  86. package/dist/queries/deps.d.ts +1 -1
  87. package/dist/queries/deps.js +1 -1
  88. package/dist/queries/diff-impact.d.ts +20 -2
  89. package/dist/queries/diff-impact.js +1 -1
  90. package/dist/queries/drift.d.ts +1 -1
  91. package/dist/queries/drift.js +1 -1
  92. package/dist/queries/extract-candidates.d.ts +2 -1
  93. package/dist/queries/extract-candidates.js +1 -1
  94. package/dist/queries/fan.d.ts +1 -1
  95. package/dist/queries/fan.js +1 -1
  96. package/dist/queries/files.d.ts +1 -1
  97. package/dist/queries/health-cache-control.d.ts +15 -0
  98. package/dist/queries/health-cache-control.js +2 -0
  99. package/dist/queries/health.d.ts +66 -2
  100. package/dist/queries/health.js +1 -1
  101. package/dist/queries/hierarchy.d.ts +1 -1
  102. package/dist/queries/hierarchy.js +1 -1
  103. package/dist/queries/hotspots.d.ts +1 -1
  104. package/dist/queries/hotspots.js +1 -1
  105. package/dist/queries/imports.d.ts +1 -1
  106. package/dist/queries/imports.js +1 -1
  107. package/dist/queries/index.d.ts +3 -3
  108. package/dist/queries/index.js +1 -1
  109. package/dist/queries/isolated.d.ts +1 -1
  110. package/dist/queries/isolated.js +1 -1
  111. package/dist/queries/members.d.ts +1 -1
  112. package/dist/queries/members.js +1 -1
  113. package/dist/queries/methods.d.ts +1 -1
  114. package/dist/queries/methods.js +1 -1
  115. package/dist/queries/outline.d.ts +1 -1
  116. package/dist/queries/outline.js +1 -1
  117. package/dist/queries/passthrough-candidates.d.ts +2 -1
  118. package/dist/queries/passthrough-candidates.js +1 -1
  119. package/dist/queries/redundant-reexports.d.ts +1 -1
  120. package/dist/queries/redundant-reexports.js +1 -1
  121. package/dist/queries/refs.d.ts +1 -1
  122. package/dist/queries/refs.js +1 -1
  123. package/dist/queries/similar-chains.d.ts +1 -1
  124. package/dist/queries/similar-chains.js +1 -1
  125. package/dist/queries/similar-files.d.ts +1 -1
  126. package/dist/queries/similar-files.js +1 -1
  127. package/dist/queries/similar-signatures.d.ts +1 -1
  128. package/dist/queries/similar-signatures.js +1 -1
  129. package/dist/queries/similar.d.ts +2 -1
  130. package/dist/queries/similar.js +1 -1
  131. package/dist/queries/slice.d.ts +1 -1
  132. package/dist/queries/slice.js +1 -1
  133. package/dist/queries/stale-abstractions.d.ts +4 -2
  134. package/dist/queries/stale-abstractions.js +1 -1
  135. package/dist/queries/stats.d.ts +1 -1
  136. package/dist/queries/surface.d.ts +1 -1
  137. package/dist/queries/surface.js +1 -1
  138. package/dist/queries/symbols.d.ts +1 -1
  139. package/dist/queries/symbols.js +1 -1
  140. package/dist/queries/system.d.ts +1 -1
  141. package/dist/queries/system.js +1 -1
  142. package/dist/queries/trace.d.ts +1 -1
  143. package/dist/queries/trace.js +1 -1
  144. package/dist/queries/wrapper-candidates.d.ts +2 -1
  145. package/dist/queries/wrapper-candidates.js +1 -1
  146. package/package.json +1 -1
  147. package/dist/chunk-25HOGELX.js +0 -2
  148. package/dist/chunk-2TLYCK2L.js +0 -11
  149. package/dist/chunk-3PVIYZ74.js +0 -84
  150. package/dist/chunk-6DVA22YE.js +0 -2
  151. package/dist/chunk-7YI2M2AQ.js +0 -2
  152. package/dist/chunk-AADJ7MCQ.js +0 -2
  153. package/dist/chunk-AV7BOODV.js +0 -4
  154. package/dist/chunk-AXP4H62Q.js +0 -6
  155. package/dist/chunk-C4C3T4K3.js +0 -2
  156. package/dist/chunk-CSRPJCWO.js +0 -2
  157. package/dist/chunk-GBDZY73J.js +0 -2
  158. package/dist/chunk-KW2F3WSV.js +0 -5
  159. package/dist/chunk-NIN762LD.js +0 -5
  160. package/dist/chunk-QPJG6VRT.js +0 -16
  161. package/dist/chunk-TUV2VI7D.js +0 -7
  162. package/dist/chunk-UAPNU7UP.js +0 -2
  163. package/dist/chunk-URCJTFOD.js +0 -2
  164. package/dist/chunk-VRC3WKKE.js +0 -2
  165. package/dist/chunk-Z4AMQWVY.js +0 -90
@@ -0,0 +1,85 @@
1
+ import{a as H,b as $,d as J,f as N}from"./chunk-6FLGPRBR.js";import{p as B,q as j,r as z}from"./chunk-G47V5V3U.js";import{c as W}from"./chunk-QYWGC7JV.js";import{C as M,D as k,G as v,a as h,b as w,d as A,g as y,j as S,k as C,m as x,o as P,r as L,t as G}from"./chunk-KYGNCIJ6.js";var E=new WeakMap;function St(e,t){let n=y(t);return n==="rust"?Se(e,t):n==="typescript"||n==="tsx"||n==="javascript"?ye(e,t):[]}var be=new Set(["describe","it","test","fdescribe","fit","xdescribe","xit","beforeEach","afterEach","beforeAll","afterAll","before","after","suite","bench","benchmark"]);function ye(e,t){let n=S(e,t);if(!n)return[];let s=E.get(n);if(s)return s;let o=/(^|\/)(pages|app)\/.+\.(tsx?|jsx?)$/.test(t)||/(^|\/)(layout|page|loading|error|not-found|head|template|default)\.(tsx?|jsx?)$/.test(t),i=/(^|\/)src\/(pages|views|routes)\/.+\.(tsx?|jsx?|vue)$/.test(t),r=!1,l=n.rootNode;for(let a of l.namedChildren){if(a.type!=="expression_statement")continue;let u=a.namedChild(0);if(!u||u.type!=="call_expression")continue;let d=u.namedChild(0);if(!d)continue;let f=d.type==="member_expression"?d.namedChild(d.namedChildCount-1)?.text:d.text;if(f&&be.has(f)){r=!0;break}}let c=[];r&&c.push({startLine:0,endLine:l.endPosition.row,reason:"TS/JS test file (describe/it/test at top level)"}),(o||i)&&c.push({startLine:0,endLine:l.endPosition.row,reason:o?"Next.js / Remix route file":"Vite/Vue route component"});for(let a of l.namedChildren){let u=null,d=null;if(a.type==="function_declaration")u=a.namedChild(0)?.text??null,d=a;else if(a.type==="export_statement"){let f=a.namedChild(0);f?.type==="function_declaration"&&(u=f.namedChild(0)?.text??null,d=f)}else if(a.type==="lexical_declaration"){let f=a.namedChild(0);if(f?.type==="variable_declarator"){let p=f.namedChild(0)?.text,g=f.namedChild(1);p&&(g?.type==="arrow_function"||g?.type==="function_expression")&&(u=p,d=f)}}u&&/^use[A-Z]/.test(u)&&d&&c.push({startLine:d.startPosition.row,endLine:d.endPosition.row,reason:"React custom hook (use*)"})}return c.push(...V(n,new Set(["function_declaration","method_definition","class_declaration","interface_declaration","type_alias_declaration","enum_declaration","variable_declarator","export_statement"]),new Set(["comment"]))),E.set(n,c),c}var _e=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale)?/i;function he(e){return _e.test(e)}function V(e,t,n){let s=[],o=i=>{if(t.has(i.type)&&i.parent){let l=i.parent.children,c=-1;for(let a=0;a<l.length;a+=1)if(l[a].startIndex===i.startIndex&&l[a].type===i.type){c=a;break}if(c>0)for(let a=c-1;a>=0;a-=1){let u=l[a];if(n.has(u.type)){if(he(u.text)){s.push({startLine:i.startPosition.row,endLine:i.endPosition.row,reason:"scip-query suppression comment"});break}continue}if(!(u.type==="attribute_item"||u.type==="inner_attribute_item"))break}}for(let r of i.namedChildren)o(r)};return o(e.rootNode),s}function Se(e,t){let n=S(e,t);if(!n)return[];let s=E.get(n);if(s)return s;let o=[],i=Ee(n);return i?(E.set(n,i),i):(K(n.rootNode,o,!1,!1),o.push(...V(n,new Set(["function_item","function_signature_item","struct_item","enum_item","union_item","impl_item","mod_item","static_item","const_item"]),new Set(["line_comment","block_comment"]))),o.push(...Ae(n.rootNode)),E.set(n,o),o)}function Ee(e){return xe(e.rootNode)?[{startLine:0,endLine:e.rootNode.endPosition.row,reason:"generated file (@generated header)"}]:null}function K(e,t,n,s){let o=n,i=s;e.type==="trait_item"&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait declaration body (dynamic dispatch)"}),e.type==="impl_item"&&e.childForFieldName("trait")&&(i=!0,t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl block (dynamic dispatch)"})),e.type==="function_item"||e.type==="function_signature_item"?Re(e,t,n,s):s&&we(e)?t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl associated item (dynamic dispatch)"}):e.type==="struct_item"||e.type==="enum_item"||e.type==="union_item"?Ce(e,t,n):e.type==="mod_item"&&D(e).some(r=>/#\[\s*cfg\s*\(\s*test\s*\)/.test(r))&&(o=!0);for(let r of e.namedChildren)K(r,t,o,i)}function Re(e,t,n,s){let o=D(e),i=null;s?i="trait impl method (dynamic dispatch)":n&&(i="inside #[cfg(test)] mod");for(let r of o){let l=Le(r);if(l){i=l;break}if(Z(r)){i="#[allow(dead_code)]";break}}i&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:i})}function Ce(e,t,n){let s=D(e),o=e.namedChildren.find(i=>i.type==="type_identifier")?.text;s.some(Ie)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[derive(<reflective>)] \u2014 fields accessed via macro/reflection",containerName:o}),s.some(Z)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[allow(dead_code)]",containerName:o}),n&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"inside #[cfg(test)] mod",containerName:o})}function D(e){let t=e.parent;if(!t)return[];let n=t.children,s=-1;for(let i=0;i<n.length;i+=1)if(n[i].startIndex===e.startIndex&&n[i].type===e.type){s=i;break}if(s<=0)return[];let o=[];for(let i=s-1;i>=0;i-=1){let r=n[i];if(r.type==="attribute_item"||r.type==="inner_attribute_item")o.push(r.text);else{if(r.type==="line_comment"||r.type==="block_comment")continue;break}}return o}function Le(e){return/#\[\s*tauri::command\b/.test(e)?"#[tauri::command]":/#\[\s*command\b/.test(e)?"#[command]":/#\[\s*test\b/.test(e)?"#[test]":/#\[\s*bench\b/.test(e)?"#[bench]":/#\[\s*tokio::test\b/.test(e)?"#[tokio::test]":/#\[\s*async_std::test\b/.test(e)?"#[async_std::test]":/#\[\s*wasm_bindgen\b/.test(e)?"#[wasm_bindgen]":/#\[\s*no_mangle\b/.test(e)?"#[no_mangle]":/#\[\s*napi\b/.test(e)?"#[napi]":/#\[\s*pyfunction\b/.test(e)?"#[pyfunction]":/#\[\s*pymethod\b/.test(e)?"#[pymethod]":/#\[\s*pyo3\b/.test(e)?"#[pyo3]":/#\[\s*cfg\s*\(\s*test\s*\)/.test(e)?"#[cfg(test)]":/#\[\s*doc\s*\(\s*hidden\s*\)/.test(e)?"#[doc(hidden)]":null}function Ie(e){return/#\[\s*derive\s*\(/.test(e)?/\bSerialize\b/.test(e)||/\bDeserialize\b/.test(e)||/\bFromRow\b/.test(e)||/\bDeriveEntityModel\b/.test(e)||/\bIntoSchema\b/.test(e)||/\bToSchema\b/.test(e)||/\bDeriveValueType\b/.test(e)||/\bsqlx::FromRow\b/.test(e)||/\bError\b/.test(e)||/\bthiserror::Error\b/.test(e):!1}function Z(e){return/#\[\s*allow\s*\(\s*dead_code\s*\)/.test(e)}function we(e){return e.type==="const_item"||e.type==="type_item"||e.type==="static_item"||e.type==="associated_type"}function Ae(e){let t=De(e);if(t.size===0)return[];let n=[];for(let s of e.descendantsOfType("mod_item")){let o=s.childForFieldName("name")?.text;o&&t.has(o)&&n.push({startLine:s.startPosition.row,endLine:s.endPosition.row,reason:'serde `with = "..."` module \u2014 body invoked via reflection',containerName:o})}return n}function xe(e){for(let t=0;t<Math.min(e.namedChildCount,12);t+=1){let n=e.namedChild(t);if(!n||n.type!=="line_comment"&&n.type!=="block_comment")break;if(/@generated\b/.test(n.text)||/This file is .*generated\b/i.test(n.text)||/Code generated by/i.test(n.text)||/Generated by:\s*https?:\/\/openapi-generator/i.test(n.text)||/openapi-generator/i.test(n.text)&&/Generated by/i.test(n.text))return!0}return!1}var Ne=[{key:"default",re:/\bdefault\s*=\s*"([^"]+)"/g},{key:"with",re:/\bwith\s*=\s*"([^"]+)"/g},{key:"serialize_with",re:/\bserialize_with\s*=\s*"([^"]+)"/g},{key:"deserialize_with",re:/\bdeserialize_with\s*=\s*"([^"]+)"/g},{key:"skip_serializing_if",re:/\bskip_serializing_if\s*=\s*"([^"]+)"/g},{key:"getter",re:/\bgetter\s*=\s*"([^"]+)"/g},{key:"rename_all_with",re:/\brename_all_with\s*=\s*"([^"]+)"/g},{key:"schema_with",re:/\bschema_with\s*=\s*"([^"]+)"/g}],q=/^#!?\[\s*serde\s*\(/,Me=/^#!?\[\s*schemars\s*\(/,ke=/^#!?\[\s*validate\s*\(/,U=/\bwith\s*=\s*"([^"]+)"/g;function X(e,t){return x(e,t,ve,()=>new Set,(n,s,o)=>{if(s==="rust"){for(let i of n.rootNode.descendantsOfType("attribute_item"))Y(i.text,o);for(let i of n.rootNode.descendantsOfType("inner_attribute_item"))Y(i.text,o)}})??new Set}var ve=new WeakMap;function Y(e,t){let n=q.test(e),s=Me.test(e),o=ke.test(e);if(!(!n&&!s&&!o))for(let{re:i}of Ne){i.lastIndex=0;let r;for(;(r=i.exec(e))!==null;){let l=r[1],c=l.split("::").pop()??l;c==="is_none"&&/\bOption\b/.test(l)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(l)||c&&t.add(c)}}}function De(e){let t=new Set;for(let n of e.descendantsOfType("attribute_item")){if(!q.test(n.text))continue;U.lastIndex=0;let s;for(;(s=U.exec(n.text))!==null;){let o=s[1],i=o.split("::").pop()??o;i&&t.add(i)}}return t}var Oe=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function Et(e,t){return x(e,t,Te,()=>new Set,(n,s,o)=>{if(!(s!=="typescript"&&s!=="tsx"&&s!=="javascript"))for(let i of n.rootNode.descendantsOfType("call_expression")){let r=i.namedChild(0);if(!r)continue;let l=P(r);if(!l||!Oe.has(l))continue;let c=i.namedChildren.find(d=>d.type==="arguments");if(!c)continue;let a=c.namedChild(0);if(!a||a.type!=="string")continue;let u=a.namedChildren.find(d=>d.type==="string_fragment");u&&o.add(u.text)}})??new Set}var Te=new WeakMap;var Fe=new Set(["identifier","type_identifier","field_identifier"]),Pe=new Set(["identifier"]),He=new Set(["identifier","property_identifier","type_identifier"]),$e=new Set(["rust","python"]),Je=/\{([^{}]*)\}/g,Ge=/\b([A-Za-z_][\w]*)\b/g;function ee(e,t,n,s={}){if(!n)return[];let o=A(e,t);if(!o)return[];if(o.indexOf(n)===-1)return[];if(y(t))return(O(e,t).get(n)??[]).filter(u=>!Q(u,s));let i=$(e,t,o),r=new RegExp(`\\b${J(n)}\\b`),l=[];for(let c=0;c<i.length;c++)Q(c,s)||r.test(i[c]??"")&&l.push(c);return l}function Q(e,t){return typeof t.excludeStartLine=="number"&&typeof t.excludeEndLine=="number"&&e>=t.excludeStartLine&&e<=t.excludeEndLine}var te=h("file-identifiers");function At(e,t){return te.get(e,t,()=>new Set(O(e,t).keys()))}var ne=h("file-ident-lines");function O(e,t){return ne.get(e,t,()=>We(e,t))}var ie=h("file-idents-by-line");function se(e,t){return ie.get(e,t,()=>{let n=O(e,t),s=0;for(let i of n.values()){let r=i[i.length-1];r!==void 0&&r>s&&(s=r)}let o=new Array(s+1);for(let i=0;i<=s;i+=1)o[i]=new Set;for(let[i,r]of n)for(let l of r)o[l].add(i);return o})}function xt(e){te.invalidateAll(e),ne.invalidateAll(e),ie.invalidateAll(e)}function We(e,t){let n=new Map,s=(l,c)=>{let a=n.get(l);if(!a){n.set(l,[c]);return}a[a.length-1]!==c&&a.push(c)};if(y(t)){let l=S(e,t);if(l){let c=y(t),a=c==="rust"?Fe:c==="python"?Pe:He,u=d=>{if(a.has(d.type)&&s(d.text,d.startPosition.row),c&&$e.has(c)&&d.type==="string_content"){let f=d.startPosition.row;for(let p of d.text.matchAll(Je)){let g=p[1]??"";for(let m of g.matchAll(Ge))m[1]&&s(m[1],f)}}for(let f of d.children)u(f)};return u(l.rootNode),n}}let o=A(e,t);if(!o)return n;let i=H(o).split(/\r?\n/),r=/\b([A-Za-z_$][\w$]*)\b/g;for(let l=0;l<i.length;l+=1){let c=i[l]??"";for(let a of c.matchAll(r))a[1]&&s(a[1],l)}return n}var le=h("file-dep-graph");function $t(e){le.invalidateAll(e),ce.invalidate(e),me.invalidate(e)}function Jt(e,t){return le.get(e,t??"",()=>{let n=new Map,s=je(e),o=(i,r)=>ze(e,n,s,i,r);for(let i of Be(e,t))o(i.from_file,i.to_file);for(let i of s)if(!(t&&!i.includes(t)))for(let r of N(e,i))r.sourcePath&&o(i,r.sourcePath);return n})}function Be(e,t){let n=t?`AND d1.relative_path LIKE '%${t}%'`:"";return e.all(`SELECT DISTINCT
2
+ d1.relative_path AS from_file,
3
+ d2.relative_path AS to_file
4
+ FROM mentions m
5
+ JOIN chunks c ON m.chunk_id = c.id
6
+ JOIN documents d1 ON c.document_id = d1.id
7
+ JOIN global_symbols gs ON m.symbol_id = gs.id
8
+ JOIN (
9
+ SELECT m2.symbol_id, c2.document_id
10
+ FROM mentions m2
11
+ JOIN chunks c2 ON m2.chunk_id = c2.id
12
+ WHERE m2.role = 1
13
+ GROUP BY m2.symbol_id
14
+ ) sym_def ON sym_def.symbol_id = gs.id
15
+ JOIN documents d2 ON sym_def.document_id = d2.id
16
+ WHERE d1.id != d2.id
17
+ AND m.role != 1
18
+ ${e.pathExclusionsFor("d1","d2")}
19
+ ${n}`)}function je(e){return new Set(e.all(`SELECT relative_path
20
+ FROM documents
21
+ WHERE 1 = 1
22
+ ${e.pathExclusionsFor("documents")}
23
+ ORDER BY relative_path`).map(t=>t.relative_path).filter(t=>!e.isIgnored(t)))}function ze(e,t,n,s,o){if(s===o||e.isIgnored(s)||e.isIgnored(o)||!n.has(o))return;let i=t.get(s);i||(i=new Set,t.set(s,i)),i.add(o)}function Gt(e,t,n={}){let s=ue(e,[t],{additive:n.additive}),o=n.callableOnly?(s.get(t.symbolId)??[]).filter(i=>G(i.symbol)):s.get(t.symbolId)??[];return typeof n.limit=="number"?o.slice(0,n.limit):o}function Wt(e,t,n={}){let s=Ye(e)?Ke(e,t):Ve(e).get(t.symbolId)??[];return typeof n.limit=="number"?s.slice(0,n.limit):s}var ce=w("caller-rows"),Ue=2e4;function Ye(e){return(e.get("SELECT COUNT(*) AS count FROM global_symbols")?.count??0)>Ue}function Ve(e){return ce.get(e,()=>{let t=k(e),n=ue(e,t),s=new Map;for(let r of t)s.set(r.symbol,r.symbolId);let o=new Map,i=new Map;for(let r of t){let l=n.get(r.symbolId);if(!(!l||l.length===0))for(let c of l){let a=s.get(c.symbol);if(a===void 0||a===r.symbolId)continue;let u=o.get(a);u||(u=[],o.set(a,u),i.set(a,new Set));let d=`${r.symbol}|${r.relativePath}`;i.get(a).has(d)||(i.get(a).add(d),u.push({symbol:r.symbol,file:r.relativePath}))}}return o})}function Ke(e,t){let n=[],s=new Set,o=r=>{if(r.symbol===t.symbol)return;let l=`${r.symbol}|${r.file}`;s.has(l)||(s.add(l),n.push(r))};for(let r of qe(e,t))r.file!==t.relativePath&&o({symbol:r.enclosingSymbol??r.file,file:r.file});let i=Ze(e,t);if(i)for(let r of B(e,i)){if(r.file===t.relativePath||e.isIgnored(r.file))continue;let l=v(M(e,r.file),r.line);o({symbol:l?.symbol??r.file,file:r.file})}return n}function Ze(e,t){return e.get(`SELECT
24
+ d.id AS documentId,
25
+ gs.id AS symbolId,
26
+ gs.symbol,
27
+ d.relative_path AS relativePath,
28
+ COALESCE(der.start_line, c.start_line) AS startLine,
29
+ COALESCE(der.end_line, c.end_line) AS endLine,
30
+ COALESCE(gs.display_name, '') AS leaf,
31
+ NULL AS parentTypeName,
32
+ CASE WHEN gs.kind IN (6, 12, 13) OR gs.symbol LIKE '%().' THEN 1 ELSE 0 END AS isFunctionLike,
33
+ CASE WHEN gs.kind IN (5, 8, 11) THEN 1 ELSE 0 END AS isTypeLike,
34
+ gs.kind AS kind,
35
+ gs.documentation AS documentation,
36
+ gs.enclosing_symbol AS enclosingSymbol
37
+ FROM global_symbols gs
38
+ LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
39
+ LEFT JOIN chunks c ON c.document_id = der.document_id
40
+ JOIN documents d ON d.id = COALESCE(der.document_id, c.document_id)
41
+ WHERE gs.id = ?
42
+ LIMIT 1`,t.symbolId)??null}function qe(e,t){let n=nt(e,t);return n?it(e,Xe(e,n.match,n.identifier)):[]}function Xe(e,t,n){let s=new Map;for(let[o,i]of Qe(e,t.symbolId))s.set(o,et(e,o,i,t,n));return s}function Qe(e,t){let n=new Map,s=e.all(`SELECT DISTINCT d.relative_path, c.start_line, c.end_line
43
+ FROM mentions m
44
+ JOIN chunks c ON m.chunk_id = c.id
45
+ JOIN documents d ON c.document_id = d.id
46
+ WHERE m.symbol_id = ?
47
+ AND m.role != 1
48
+ ${e.pathExclusionsFor("d")}
49
+ ORDER BY d.relative_path, c.start_line`,t);for(let o of s){if(e.isIgnored(o.relative_path))continue;let i=n.get(o.relative_path);i||(i=[],n.set(o.relative_path,i)),i.push({start_line:o.start_line,end_line:o.end_line})}return n}function et(e,t,n,s,o){let i=t===s.relativePath?{excludeStartLine:s.startLine,excludeEndLine:s.endLine}:{},r=o?ee(e,t,o,i):[];return n.flatMap(l=>tt(r,l))}function tt(e,t){let n=e.filter(s=>s>=t.start_line&&s<=t.end_line);return n.length>0?n:[t.start_line]}function nt(e,t){let n=W(e,t);return n?{match:n,identifier:L(n.symbol)||null}:null}function it(e,t){let n=[],s=new Set;for(let[o,i]of t){let r=M(e,o);for(let l of i){let c=v(r,l),a=`${o}|${l}|${c?.symbol??""}`;s.has(a)||(s.add(a),n.push({file:o,line:l,enclosingSymbol:c?.symbol??null}))}}return n}function ue(e,t,n={}){if(t.length===0)return new Map;let s=n.additive??!1,o=[],i=[];for(let u of t)y(u.relativePath)&&C(e,u.relativePath)!==null?o.push(u):i.push(u);let r=new Map,l=new Map,c=u=>{for(let[d,f]of u){let p=r.get(d);p||(p=[],r.set(d,p));let g=l.get(d);g||(g=new Set,l.set(d,g));for(let m of f){let b=`${m.symbol}|${m.chunkId}`;g.has(b)||(g.add(b),p.push(m))}}};o.length>0&&c(st(e,o)),c(yt(z(e,t)));let a=s?t:i;return a.length>0&&c(ct(e,a)),r}function st(e,t){let n=new Map,s=ot(t,n),o=pe(e);for(let[i,r]of s){let l=C(e,i);if(l)for(let c of l){let a=rt(r,c.line);if(!a)continue;let u=at(e,i,o,c.calleeLeaf,c.memberAccess);u&&u.symbol!==a.symbol&&n.get(a.symbolId).push({symbol:u.symbol,file:u.file,chunkId:c.line})}}return n}function ot(e,t){let n=new Map;for(let s of e){let o=n.get(s.relativePath);o?o.push(s):n.set(s.relativePath,[s]),t.set(s.symbolId,[])}for(let s of n.values())s.sort((o,i)=>o.endLine-o.startLine-(i.endLine-i.startLine));return n}function rt(e,t){return e.find(n=>t>=n.startLine&&t<=n.endLine)??null}function at(e,t,n,s,o){let i=de(t,n.get(s)??[]);return i.length===0?null:fe(e,t,i,o)}function de(e,t){let n=oe(e);return n?t.filter(s=>oe(s.file)===n):t}function fe(e,t,n,s){let o=n.find(i=>i.file===t);if(o)return o;if(s){let i=new Set(N(e,t).map(r=>r.sourcePath).filter(r=>!!r));for(let r of n)for(let l of i)if(lt(l,r.file))return r;return null}return n.length===1?n[0]:null}function lt(e,t){let n=s=>s.replace(/\\/g,"/").replace(/^\.\//,"");return n(e)===n(t)}function oe(e){let t=y(e);return t?t==="typescript"||t==="tsx"||t==="javascript"?"javascript-family":t:null}var me=w("global-leaf-index");function pe(e){return me.get(e,()=>{let t=e.all(`SELECT gs.id, gs.symbol,
50
+ COALESCE(der_doc.relative_path, mention_doc.relative_path) AS relative_path
51
+ FROM global_symbols gs
52
+ LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
53
+ LEFT JOIN documents der_doc ON der_doc.id = der.document_id
54
+ LEFT JOIN (
55
+ SELECT m.symbol_id, MIN(d.relative_path) AS relative_path
56
+ FROM mentions m
57
+ JOIN chunks c ON m.chunk_id = c.id
58
+ JOIN documents d ON c.document_id = d.id
59
+ WHERE m.role = 1
60
+ GROUP BY m.symbol_id
61
+ ) mention_doc ON mention_doc.symbol_id = gs.id
62
+ WHERE 1 = 1
63
+ ${e.symbolNoiseFor("gs")}`),n=new Map;for(let s of t){if(!s.relative_path||e.isIgnored(s.relative_path))continue;let o=L(s.symbol);if(!o)continue;let i=n.get(o);i||(i=[],n.set(o,i)),i.some(r=>r.symbolId===s.id)||i.push({symbol:s.symbol,symbolId:s.id,file:s.relative_path})}return n})}function ct(e,t){if(t.length===0)return new Map;let n=e.all(`SELECT c.document_id, c.id AS chunk_id, c.start_line, c.end_line, m.symbol_id
64
+ FROM mentions m
65
+ JOIN chunks c ON m.chunk_id = c.id
66
+ WHERE m.role != 1`),s=new Map;for(let a of n)s.has(a.document_id)||s.set(a.document_id,[]),s.get(a.document_id).push(a);let o=new Map(e.all("SELECT id, relative_path FROM documents").map(a=>[a.id,a.relative_path])),i=new Map,r=e.all(`SELECT gs.id AS symbol_id, gs.symbol,
67
+ COALESCE(der.document_id, def_chunk.document_id) AS document_id
68
+ FROM global_symbols gs
69
+ LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
70
+ LEFT JOIN (
71
+ SELECT m.symbol_id, MIN(c.document_id) AS document_id
72
+ FROM mentions m
73
+ JOIN chunks c ON m.chunk_id = c.id
74
+ WHERE m.role = 1
75
+ GROUP BY m.symbol_id
76
+ ) def_chunk ON def_chunk.symbol_id = gs.id`);for(let a of r)i.has(a.symbol_id)||i.set(a.symbol_id,{symbol:a.symbol,file:a.document_id!==null?o.get(a.document_id)??"":""});let l=new Map,c=o;for(let a of t){let u=s.get(a.documentId)??[],d=new Set,f=[],p=null,g=()=>{if(p)return p;let m=c.get(a.documentId)??"",b=new Set;if(m){let I=se(e,m),R=Math.max(0,a.startLine),F=Math.min(I.length-1,a.endLine);for(let _=R;_<=F;_+=1)for(let ge of I[_])b.add(ge)}return p=b,b};for(let m of u){if(m.symbol_id===a.symbolId)continue;let b=i.get(m.symbol_id);if(!b)continue;if(!(m.start_line>=a.startLine&&m.end_line<=a.endLine)){if(!(m.start_line<=a.endLine&&m.end_line>=a.startLine))continue;let _=L(b.symbol);if(!_||!g().has(_))continue}let R=`${b.symbol}|${m.chunk_id}`;d.has(R)||(d.add(R),f.push({...b,chunkId:m.chunk_id}))}l.set(a.symbolId,f)}return l}function Bt(e,t){let n=new Map;if(t&&t.length===0)return n;let s=e.all(`SELECT relative_path FROM documents
77
+ WHERE 1 = 1 ${e.pathExclusionsFor("documents")}`),o=pe(e),i=t??k(e),r=new Set(i.map(l=>l.symbolId));return ut(e,n,s,o,r),dt(e,n,i,r),gt(e,n,s,o,r),_t(n,j(e,bt(i))),n}function ut(e,t,n,s,o){for(let i of n){if(!y(i.relative_path)||e.isIgnored(i.relative_path))continue;let r=C(e,i.relative_path);if(r)for(let l of r){let c=de(i.relative_path,s.get(l.calleeLeaf)??[]);if(!c||c.length===0)continue;let a=fe(e,i.relative_path,c,l.memberAccess);a&&o.has(a.symbolId)&&a.file!==i.relative_path&&T(t,a.symbolId,i.relative_path)}}}function dt(e,t,n,s){let o=mt(n);for(let i of ft(e,s))e.isIgnored(i.relative_path)||pt(i,o.get(i.symbol_id))||T(t,i.symbol_id,i.relative_path)}function ft(e,t){if(!t)return ae(e);let n=[...t];if(n.length===0)return[];let s=[];for(let o=0;o<n.length;o+=re)s.push(...ae(e,n.slice(o,o+re)));return s}var re=750;function ae(e,t){let n=t&&t.length>0?`AND m.symbol_id IN (${t.map(()=>"?").join(",")})`:"";return e.all(`SELECT DISTINCT m.symbol_id, d.relative_path, c.document_id,
78
+ c.start_line AS chunk_start, c.end_line AS chunk_end
79
+ FROM mentions m
80
+ JOIN chunks c ON m.chunk_id = c.id
81
+ JOIN documents d ON c.document_id = d.id
82
+ WHERE m.role != 1
83
+ ${n}
84
+ ${e.pathExclusionsFor("d")}`,...t??[])}function mt(e){let t=new Map;for(let n of e)t.set(n.symbolId,{docId:n.documentId,startLine:n.startLine,endLine:n.endLine});return t}function pt(e,t){return!!t&&t.docId===e.document_id&&e.chunk_start>=t.startLine&&e.chunk_end<=t.endLine}function gt(e,t,n,s,o){for(let i of n){if(e.isIgnored(i.relative_path)||y(i.relative_path)!=="rust")continue;let r=X(e,i.relative_path);if(r.size!==0)for(let l of r){let c=s.get(l);if(c)for(let a of c)o.has(a.symbolId)&&a.file!==i.relative_path&&T(t,a.symbolId,i.relative_path)}}}function T(e,t,n){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(n)}function bt(e){return e.filter(t=>"relativePath"in t&&"symbol"in t&&"leaf"in t)}function yt(e){let t=new Map;for(let[n,s]of e){let o=[];for(let i of s)o.push({symbol:i.symbol,file:i.file,chunkId:-1});t.set(n,o)}return t}function _t(e,t){for(let[n,s]of t){let o=e.get(n);o||(o=new Set,e.set(n,o));for(let i of s)o.add(i)}}export{St as a,X as b,Et as c,ee as d,At as e,O as f,xt as g,$t as h,Jt as i,Gt as j,Wt as k,qe as l,ue as m,pe as n,Bt as o};
85
+ //# sourceMappingURL=chunk-GS55K4WJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-UAPNU7UP.js";import{c as h}from"./chunk-VEXS3I3N.js";import{h as u,j as p}from"./chunk-3PVIYZ74.js";import{a as d,b as y}from"./chunk-ZHHMG4UC.js";import{E as S,o as f}from"./chunk-QFZE73XF.js";function j(e,o,r={}){let{direction:c="backward",maxDepth:s=3}=r,t=d(e,o);return t?c==="backward"?w(e,t,s):R(e,t):null}function w(e,o,r){let c=[],s=new Set([o.symbol]),t=[o];for(let a=1;a<=r&&t.length!==0;a++){let n=[];for(let l of t){let i=u(e,l);for(let m of i){if(s.has(m.symbol))continue;s.add(m.symbol),c.push({symbol:m.symbol,shortName:f(m.symbol),file:m.file,relationship:a===1?"referenced within definition (callee)":`depth ${a} callee`});let b=y(e,m.symbol);b&&!e.isIgnored(b.relativePath)&&n.push(b)}}t=n}return{symbol:o.symbol,shortName:f(o.symbol),direction:"backward",connectedSymbols:c}}function R(e,o){let r=h(e,o),c=r.length>0?r:p(e,o),s=new Set,t=[],a=new g(e);for(let n of c){if(t.length>=30)break;if(e.isIgnored(n.file))continue;let l=n.enclosingSymbol??S(a.definitionsForFile(n.file),n.line)?.symbol??null;if(!l||l===o.symbol)continue;let i=y(e,l);!i||e.isIgnored(i.relativePath)||s.has(i.symbol)||(s.add(i.symbol),t.push({symbol:i.symbol,shortName:f(i.symbol),file:i.relativePath,relationship:`references target at ${n.file}:${n.line+1}`}))}return t.sort((n,l)=>n.file.localeCompare(l.file)),{symbol:o.symbol,shortName:f(o.symbol),direction:"forward",connectedSymbols:t}}export{j as a};
2
- //# sourceMappingURL=chunk-I377UMS2.js.map
1
+ import{a as g}from"./chunk-SVUVC5VS.js";import{c as h}from"./chunk-7EQ4J66C.js";import{j as u,l as p}from"./chunk-GS55K4WJ.js";import{a as d,b as y}from"./chunk-QYWGC7JV.js";import{G as S,q as f}from"./chunk-KYGNCIJ6.js";function j(e,o,r={}){let{direction:c="backward",maxDepth:s=3}=r,t=d(e,o);return t?c==="backward"?w(e,t,s):R(e,t):null}function w(e,o,r){let c=[],s=new Set([o.symbol]),t=[o];for(let a=1;a<=r&&t.length!==0;a++){let n=[];for(let l of t){let i=u(e,l);for(let m of i){if(s.has(m.symbol))continue;s.add(m.symbol),c.push({symbol:m.symbol,shortName:f(m.symbol),file:m.file,relationship:a===1?"referenced within definition (callee)":`depth ${a} callee`});let b=y(e,m.symbol);b&&!e.isIgnored(b.relativePath)&&n.push(b)}}t=n}return{symbol:o.symbol,shortName:f(o.symbol),direction:"backward",connectedSymbols:c}}function R(e,o){let r=h(e,o),c=r.length>0?r:p(e,o),s=new Set,t=[],a=new g(e);for(let n of c){if(t.length>=30)break;if(e.isIgnored(n.file))continue;let l=n.enclosingSymbol??S(a.definitionsForFile(n.file),n.line)?.symbol??null;if(!l||l===o.symbol)continue;let i=y(e,l);!i||e.isIgnored(i.relativePath)||s.has(i.symbol)||(s.add(i.symbol),t.push({symbol:i.symbol,shortName:f(i.symbol),file:i.relativePath,relationship:`references target at ${n.file}:${n.line+1}`}))}return t.sort((n,l)=>n.file.localeCompare(l.file)),{symbol:o.symbol,shortName:f(o.symbol),direction:"forward",connectedSymbols:t}}export{j as a};
2
+ //# sourceMappingURL=chunk-HADDFTMU.js.map
@@ -0,0 +1,10 @@
1
+ import{k as N}from"./chunk-GS55K4WJ.js";import{a as I,b as S}from"./chunk-QYWGC7JV.js";import{C as p,G as g,q as d,s as b}from"./chunk-KYGNCIJ6.js";function $(o,s,r={}){let{maxDepth:c=5,scope:a}=r,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let i=[];for(let y of t)for(let n of D(o,y,a)){let h=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(h))continue;m.add(h),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&i.push(n.symbolMatch)}t=i}return u.sort((e,i)=>e.depth-i.depth||e.file.localeCompare(i.file)),u}function D(o,s,r){let c=N(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!r||t.file.includes(r)),a=new Set(c.map(t=>t.file)),l=[];for(let t of M(o,s,r)){if(a.has(t))continue;let e=p(o,t),i=e.length>0?g(e,e[0].startLine):null;l.push({symbol:i?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=S(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:d(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!_(e.symbol))continue;let i=`${e.symbolId}|${e.relativePath}`;m.has(i)||(m.add(i),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:d(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function M(o,s,r){let c=r?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return r&&a.push(`%${r}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
2
+ FROM mentions m
3
+ JOIN chunks c ON m.chunk_id = c.id
4
+ JOIN documents consumer_d ON consumer_d.id = c.document_id
5
+ WHERE m.symbol_id = ?
6
+ AND m.role != 1
7
+ AND c.document_id != ?
8
+ ${o.pathExclusionsFor("consumer_d")}
9
+ ${c}`,...a).map(l=>l.relative_path).filter(l=>!o.isIgnored(l)))}function _(o){let s=b(o);return s==="method"||s==="type"||o.endsWith("().")}export{$ as a};
10
+ //# sourceMappingURL=chunk-HTJ5BOYP.js.map
@@ -0,0 +1,2 @@
1
+ import{a as v}from"./chunk-SVUVC5VS.js";import{b as I}from"./chunk-GS55K4WJ.js";import{g as y,q as h,r as L}from"./chunk-KYGNCIJ6.js";function j(o,l={}){let{scope:c,minLoc:d=3}=l,a=new v(o),t=a.productionCallableDefinitions({scope:c,minLoc:d,excludeEntrySurfaces:!0,excludeRustTraitImplMembers:!0,includeSuppressed:!0}),m=a.crossFileCallerMap(t),n=new Set(m.keys()),r=new Map;for(let e of t){let s=L(e.symbol);if(!s)continue;let i=r.get(s)??[];i.push(e.symbolId),r.set(s,i)}let S=o.all(`SELECT relative_path FROM documents WHERE 1 = 1 ${o.pathExclusionsFor("documents")}`);for(let e of S){if(o.isIgnored(e.relative_path)||y(e.relative_path)!=="rust")continue;let s=I(o,e.relative_path);for(let i of s){let f=r.get(i);if(f)for(let x of f)n.add(x)}}let p=C(a,t,{additive:!1}),u=t.filter(e=>!n.has(e.symbolId)).filter(e=>!p.has(e.symbolId)),g=a.sourceFallbackCallerFiles(u);for(let e of g.keys())n.add(e);let b=u.filter(e=>!n.has(e.symbolId)),M=C(a,b,{additive:!0});for(let e of M)p.add(e);return b.filter(e=>!p.has(e.symbolId)).sort((e,s)=>s.endLine-s.startLine-(e.endLine-e.startLine)||e.relativePath.localeCompare(s.relativePath)||e.startLine-s.startLine).map(e=>({symbol:e.symbol,shortName:h(e.symbol),relativePath:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:e.endLine-e.startLine+1}))}function C(o,l,c){if(l.length===0)return new Set;let d=new Map(l.map(t=>[t.symbolId,t.symbol])),a=o.calleeMap(l,{additive:c.additive});return new Set([...a.entries()].filter(([t,m])=>{let n=d.get(t);return m.some(r=>r.symbol!==n)}).map(([t])=>t))}export{j as a};
2
+ //# sourceMappingURL=chunk-IARIBTCL.js.map
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-UAPNU7UP.js";import{c as u}from"./chunk-YXMHTJYY.js";import{e as l,f as a}from"./chunk-KW2F3WSV.js";import{o as d,q as c}from"./chunk-QFZE73XF.js";function C(e,t={}){let{scope:o,limit:r}=t,n=new m(e),i=x([...p(e,o),...f(e,n,o)]);return N(i),r?i.slice(0,r):i}function p(e,t){let o=[];for(let r of R(e,t)){if(e.isIgnored(r.barrel_path)||e.isIgnored(r.original_path)||u(e,r.barrel_path))continue;let n=b(e,r),i=n?.barrel_consumers??0,s=n?.direct_consumers??0;i!==0||s!==0||o.push({barrelFile:r.barrel_path,symbol:r.symbol,shortName:d(r.symbol),originalFile:r.original_path,barrelConsumers:i,directConsumers:s})}return o}function R(e,t){let o=t?`AND barrel_d.relative_path LIKE '%${t}%'`:"";return e.all(`SELECT DISTINCT
1
+ import{a as m}from"./chunk-SVUVC5VS.js";import{c as u}from"./chunk-TYRPQE6R.js";import{f as l,g as a}from"./chunk-6FLGPRBR.js";import{q as d,s as c}from"./chunk-KYGNCIJ6.js";function C(e,t={}){let{scope:o,limit:r}=t,n=new m(e),i=x([...p(e,o),...f(e,n,o)]);return N(i),r?i.slice(0,r):i}function p(e,t){let o=[];for(let r of R(e,t)){if(e.isIgnored(r.barrel_path)||e.isIgnored(r.original_path)||u(e,r.barrel_path))continue;let n=b(e,r),i=n?.barrel_consumers??0,s=n?.direct_consumers??0;i!==0||s!==0||o.push({barrelFile:r.barrel_path,symbol:r.symbol,shortName:d(r.symbol),originalFile:r.original_path,barrelConsumers:i,directConsumers:s})}return o}function R(e,t){let o=t?`AND barrel_d.relative_path LIKE '%${t}%'`:"";return e.all(`SELECT DISTINCT
2
2
  barrel_d.id AS barrel_doc_id,
3
3
  barrel_d.relative_path AS barrel_path,
4
4
  gs.id AS symbol_id,
@@ -67,4 +67,4 @@ import{a as m}from"./chunk-UAPNU7UP.js";import{c as u}from"./chunk-YXMHTJYY.js";
67
67
  WHERE 1 = 1
68
68
  ${e.pathExclusionsFor("documents")}
69
69
  ORDER BY relative_path`),n=new Set;for(let i of r)if(!(e.isIgnored(i.relative_path)||i.relative_path===o))for(let s of l(e,i.relative_path))s.sourcePath===t&&n.add(i.relative_path);return n.size}function S(e,t){let o=e.definitionsForFile(t);return o.find(r=>c(r.symbol)==="method")??o[0]??null}function x(e){let t=new Set,o=[];for(let r of e){let n=`${r.barrelFile}|${r.symbol}|${r.originalFile}`;t.has(n)||(t.add(n),o.push(r))}return o}function N(e){e.sort((t,o)=>o.directConsumers-t.directConsumers||t.barrelFile.localeCompare(o.barrelFile)||t.shortName.localeCompare(o.shortName))}export{C as a};
70
- //# sourceMappingURL=chunk-E2V5SE6M.js.map
70
+ //# sourceMappingURL=chunk-IBWYWAWE.js.map
@@ -1,4 +1,4 @@
1
- import{b as l}from"./chunk-MO65UK5V.js";import{a as n}from"./chunk-UAPNU7UP.js";import{o as i,r as a}from"./chunk-QFZE73XF.js";function _(e,r){let t=l(e,r);return t.length===0?[]:m([...d(e,t),...c(e,t)]).filter(o=>!e.isIgnored(o.relative_path)).map(u)}function d(e,r){let t=r.map(()=>"?").join(", ");return e.all(`SELECT DISTINCT d1.relative_path, gs.symbol
1
+ import{b as l}from"./chunk-55ZJ2FCW.js";import{a as n}from"./chunk-SVUVC5VS.js";import{q as i,t as a}from"./chunk-KYGNCIJ6.js";function _(e,r){let t=l(e,r);return t.length===0?[]:m([...d(e,t),...c(e,t)]).filter(o=>!e.isIgnored(o.relative_path)).map(u)}function d(e,r){let t=r.map(()=>"?").join(", ");return e.all(`SELECT DISTINCT d1.relative_path, gs.symbol
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d1 ON c.document_id = d1.id
@@ -26,4 +26,4 @@ import{b as l}from"./chunk-MO65UK5V.js";import{a as n}from"./chunk-UAPNU7UP.js";
26
26
  AND ${e.localSymbolPredicate}
27
27
  ${e.pathExclusionsFor("d1")}
28
28
  ORDER BY d1.relative_path`,...r,...r,...r)}function c(e,r){let t=new n(e);return r.flatMap(o=>t.definitionsForFile(o).filter(s=>a(s.symbol)).map(s=>({relative_path:o,symbol:s.symbol})))}function m(e){let r=new Set;return e.filter(t=>{let o=`${t.relative_path}|${t.symbol}`;return r.has(o)?!1:(r.add(o),!0)})}function u(e){return{consumer:e.relative_path,symbol:e.symbol,shortName:i(e.symbol)}}export{_ as a};
29
- //# sourceMappingURL=chunk-DLWRLPKO.js.map
29
+ //# sourceMappingURL=chunk-ILQSK2KJ.js.map
@@ -1,2 +1,2 @@
1
- import{c as d}from"./chunk-RKTDEIHF.js";import{g as a}from"./chunk-3PVIYZ74.js";function F(t,i={}){let{minSimilarity:f=.5,limit:n=20,scope:o,filePattern:s}=i,u=i.minDeps??(s?1:3),e=g(t,{scope:o,minDeps:u}),p=[];if(s){let r=e.find(l=>l.file.includes(s));if(!r)return[];for(let l of e){if(l.file===r.file)continue;let c=m(r,l,f);c&&p.push(c)}}else for(let r=0;r<e.length;r++){for(let l=r+1;l<e.length;l++){let c=m(e[r],e[l],f);c&&p.push(c)}if(p.length>n*5)break}return p.sort((r,l)=>l.similarity-r.similarity),p.slice(0,n)}function g(t,i){let{scope:f,minDeps:n}=i,o=a(t,f),s=h(o),u=[];for(let[e,p]of o)p.size>=n&&u.push({file:e,deps:new Set([...p].filter(r=>!s.has(r)))});return u}function h(t){let i=new Set,f=t.size;if(f===0)return i;let n=new Map;for(let o of t.values())for(let s of o)n.set(s,(n.get(s)??0)+1);for(let[o,s]of n)s>=5&&s/f>.3&&i.add(o);return i}function m(t,i,f){let n=new Set;for(let e of t.deps)i.deps.has(e)&&n.add(e);if(n.size<3||t.deps.size<4||i.deps.size<4)return null;let o=d(t.deps,i.deps);if(o<f)return null;let s=[];for(let e of t.deps)i.deps.has(e)||s.push(e);let u=[];for(let e of i.deps)t.deps.has(e)||u.push(e);return{fileA:t.file,fileB:i.file,similarity:o,sharedDeps:[...n],uniqueToA:s,uniqueToB:u}}export{F as a};
2
- //# sourceMappingURL=chunk-KBGFYKOJ.js.map
1
+ import{c as d}from"./chunk-RKTDEIHF.js";import{i as a}from"./chunk-GS55K4WJ.js";function F(t,i={}){let{minSimilarity:f=.5,limit:n=20,scope:o,filePattern:s}=i,u=i.minDeps??(s?1:3),e=g(t,{scope:o,minDeps:u}),p=[];if(s){let r=e.find(l=>l.file.includes(s));if(!r)return[];for(let l of e){if(l.file===r.file)continue;let c=m(r,l,f);c&&p.push(c)}}else for(let r=0;r<e.length;r++){for(let l=r+1;l<e.length;l++){let c=m(e[r],e[l],f);c&&p.push(c)}if(p.length>n*5)break}return p.sort((r,l)=>l.similarity-r.similarity),p.slice(0,n)}function g(t,i){let{scope:f,minDeps:n}=i,o=a(t,f),s=h(o),u=[];for(let[e,p]of o)p.size>=n&&u.push({file:e,deps:new Set([...p].filter(r=>!s.has(r)))});return u}function h(t){let i=new Set,f=t.size;if(f===0)return i;let n=new Map;for(let o of t.values())for(let s of o)n.set(s,(n.get(s)??0)+1);for(let[o,s]of n)s>=5&&s/f>.3&&i.add(o);return i}function m(t,i,f){let n=new Set;for(let e of t.deps)i.deps.has(e)&&n.add(e);if(n.size<3||t.deps.size<4||i.deps.size<4)return null;let o=d(t.deps,i.deps);if(o<f)return null;let s=[];for(let e of t.deps)i.deps.has(e)||s.push(e);let u=[];for(let e of i.deps)t.deps.has(e)||u.push(e);return{fileA:t.file,fileB:i.file,similarity:o,sharedDeps:[...n],uniqueToA:s,uniqueToB:u}}export{F as a};
2
+ //# sourceMappingURL=chunk-JVMXNDRU.js.map
@@ -1,2 +1,2 @@
1
- import{g as y}from"./chunk-3PVIYZ74.js";function L(D,k={}){let{limit:x=10,scope:M,minDepth:j=3}=k,a=y(D,M),u=new Map,o=[],l=new Map,r=new Map,g=new Set,f=[],d=0;for(let t of a.keys()){if(l.has(t))continue;let n=[],s=(a.get(t)??new Set).values();for(l.set(t,d),r.set(t,d),d+=1,f.push(t),g.add(t),n.push({node:t,iter:s,pendingChild:null});n.length>0;){let e=n[n.length-1];if(e.pendingChild!==null){let h=e.pendingChild;e.pendingChild=null,r.set(e.node,Math.min(r.get(e.node),r.get(h)))}let c=e.iter.next();if(c.done){if(r.get(e.node)===l.get(e.node)){let h=[];for(;;){let p=f.pop();if(g.delete(p),h.push(p),u.set(p,o.length),p===e.node)break}o.push(h)}n.pop();continue}let i=c.value;if(l.has(i))g.has(i)&&r.set(e.node,Math.min(r.get(e.node),l.get(i)));else{l.set(i,d),r.set(i,d),d+=1,f.push(i),g.add(i);let h=(a.get(i)??new Set).values();e.pendingChild=i,n.push({node:i,iter:h,pendingChild:null})}}}let m=new Map,b=new Array(o.length);for(let t=0;t<o.length;t++)b[t]=o[t].length,m.set(t,new Set);for(let[t,n]of a){let s=u.get(t);for(let e of n){let c=u.get(e);c!==s&&m.get(s).add(c)}}let S=new Array(o.length),I=new Array(o.length);for(let t=0;t<o.length;t++){let n=[],s=0;for(let e of m.get(t)){let c=I[e];c>s&&(s=c,n=S[e])}S[t]=[t,...n],I[t]=b[t]+s}function v(t){return S[t]}let A=o.map(t=>[...t].sort()),C=new Set,w=[];for(let t=0;t<o.length;t++){let n=v(t),s=[];for(let c of n)s.push(...A[c]);if(s.length<j)continue;let e=s.join(" ");C.has(e)||(C.add(e),w.push({chain:s,depth:s.length}))}return w.sort((t,n)=>n.depth-t.depth),w.slice(0,x)}export{L as a};
2
- //# sourceMappingURL=chunk-O6VBAW7P.js.map
1
+ import{i as y}from"./chunk-GS55K4WJ.js";function L(D,k={}){let{limit:x=10,scope:M,minDepth:j=3}=k,a=y(D,M),u=new Map,o=[],l=new Map,r=new Map,g=new Set,f=[],d=0;for(let t of a.keys()){if(l.has(t))continue;let n=[],s=(a.get(t)??new Set).values();for(l.set(t,d),r.set(t,d),d+=1,f.push(t),g.add(t),n.push({node:t,iter:s,pendingChild:null});n.length>0;){let e=n[n.length-1];if(e.pendingChild!==null){let h=e.pendingChild;e.pendingChild=null,r.set(e.node,Math.min(r.get(e.node),r.get(h)))}let c=e.iter.next();if(c.done){if(r.get(e.node)===l.get(e.node)){let h=[];for(;;){let p=f.pop();if(g.delete(p),h.push(p),u.set(p,o.length),p===e.node)break}o.push(h)}n.pop();continue}let i=c.value;if(l.has(i))g.has(i)&&r.set(e.node,Math.min(r.get(e.node),l.get(i)));else{l.set(i,d),r.set(i,d),d+=1,f.push(i),g.add(i);let h=(a.get(i)??new Set).values();e.pendingChild=i,n.push({node:i,iter:h,pendingChild:null})}}}let m=new Map,b=new Array(o.length);for(let t=0;t<o.length;t++)b[t]=o[t].length,m.set(t,new Set);for(let[t,n]of a){let s=u.get(t);for(let e of n){let c=u.get(e);c!==s&&m.get(s).add(c)}}let S=new Array(o.length),I=new Array(o.length);for(let t=0;t<o.length;t++){let n=[],s=0;for(let e of m.get(t)){let c=I[e];c>s&&(s=c,n=S[e])}S[t]=[t,...n],I[t]=b[t]+s}function v(t){return S[t]}let A=o.map(t=>[...t].sort()),C=new Set,w=[];for(let t=0;t<o.length;t++){let n=v(t),s=[];for(let c of n)s.push(...A[c]);if(s.length<j)continue;let e=s.join(" ");C.has(e)||(C.add(e),w.push({chain:s,depth:s.length}))}return w.sort((t,n)=>n.depth-t.depth),w.slice(0,x)}export{L as a};
2
+ //# sourceMappingURL=chunk-K345WFTU.js.map
@@ -1,4 +1,4 @@
1
- import{a as u,b as g,c as S}from"./chunk-LJ2YWNQF.js";import{a as p}from"./chunk-UAPNU7UP.js";import{a as y}from"./chunk-YXMHTJYY.js";import{e as d}from"./chunk-KW2F3WSV.js";import{n as m}from"./chunk-Z4AMQWVY.js";import l from"path";function q(t,n){let{scope:r,minDeviation:i=5}=n??{},s=new p(t).fileDependencyGraph(r),c=M(t,r);return R([...D(t,s,c),...v(s),...b(s,i)])}function D(t,n,r){let i=[];for(let[e,s]of n){if(a(e))continue;let c=r.get(e)??new Set;for(let o of s)if(!a(o)&&!c.has(o)){if(F(t,e,o)||w(t,e,o)||L(t,e,o)||$(o)||x(t,e,o)||P(o))continue;i.push({file:e,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o})}}return i}function v(t){let n=[],r=N(t);for(let[i,e]of t){if(a(i))continue;let s=u(i);for(let c of e){if(a(c))continue;let o=u(c);if(s===o)continue;(g(s,o)??r.get(`${s}->${o}`))==="violation"&&n.push({file:i,kind:"layer-violation",description:`Imports from ${o}/ (${c}) \u2014 may cross architectural boundary`,dep:c,detail:`${s}/ should not depend on ${o}/`})}}return n}function b(t,n){let r=[];for(let[i,e]of _(t)){let s=e.filter(o=>!a(o));if(s.length<n)continue;let c=k(t,s);for(let o of s)for(let f of t.get(o)??[])a(f)||(c.get(f)??0)===1&&l.dirname(f)!==i&&l.dirname(f)!==l.dirname(i)&&(S(o,f)||r.push({file:o,kind:"pattern-deviation",description:`Only file in ${i}/ that depends on ${f}`,dep:f}))}return r}function R(t){return{results:t,unusedImports:t.filter(n=>n.kind==="unused-import").length,layerViolations:t.filter(n=>n.kind==="layer-violation").length,patternDeviations:t.filter(n=>n.kind==="pattern-deviation").length}}function _(t){let n=new Map;for(let r of t.keys()){let i=l.dirname(r),e=n.get(i);e||(e=[],n.set(i,e)),e.push(r)}return n}function k(t,n){let r=new Map;for(let i of n)for(let e of t.get(i)??[])a(e)||r.set(e,(r.get(e)??0)+1);return r}function M(t,n){let r=new Map;return E(t,r,n),O(t,r),r}function E(t,n,r){for(let i of I(t,r))h(t,n,i.from_file,i.to_file)}function I(t,n){let r=n?`AND d1.relative_path LIKE '%${n}%'`:"";return t.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
1
+ import{a as u,b as g,c as S}from"./chunk-LJ2YWNQF.js";import{a as p}from"./chunk-SVUVC5VS.js";import{a as y}from"./chunk-TYRPQE6R.js";import{f as d}from"./chunk-6FLGPRBR.js";import{o as m}from"./chunk-G47V5V3U.js";import l from"path";function q(t,n){let{scope:r,minDeviation:i=5}=n??{},s=new p(t).fileDependencyGraph(r),c=M(t,r);return R([...D(t,s,c),...v(s),...b(s,i)])}function D(t,n,r){let i=[];for(let[e,s]of n){if(a(e))continue;let c=r.get(e)??new Set;for(let o of s)if(!a(o)&&!c.has(o)){if(F(t,e,o)||w(t,e,o)||L(t,e,o)||$(o)||x(t,e,o)||P(o))continue;i.push({file:e,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o})}}return i}function v(t){let n=[],r=N(t);for(let[i,e]of t){if(a(i))continue;let s=u(i);for(let c of e){if(a(c))continue;let o=u(c);if(s===o)continue;(g(s,o)??r.get(`${s}->${o}`))==="violation"&&n.push({file:i,kind:"layer-violation",description:`Imports from ${o}/ (${c}) \u2014 may cross architectural boundary`,dep:c,detail:`${s}/ should not depend on ${o}/`})}}return n}function b(t,n){let r=[];for(let[i,e]of _(t)){let s=e.filter(o=>!a(o));if(s.length<n)continue;let c=k(t,s);for(let o of s)for(let f of t.get(o)??[])a(f)||(c.get(f)??0)===1&&l.dirname(f)!==i&&l.dirname(f)!==l.dirname(i)&&(S(o,f)||r.push({file:o,kind:"pattern-deviation",description:`Only file in ${i}/ that depends on ${f}`,dep:f}))}return r}function R(t){return{results:t,unusedImports:t.filter(n=>n.kind==="unused-import").length,layerViolations:t.filter(n=>n.kind==="layer-violation").length,patternDeviations:t.filter(n=>n.kind==="pattern-deviation").length}}function _(t){let n=new Map;for(let r of t.keys()){let i=l.dirname(r),e=n.get(i);e||(e=[],n.set(i,e)),e.push(r)}return n}function k(t,n){let r=new Map;for(let i of n)for(let e of t.get(i)??[])a(e)||r.set(e,(r.get(e)??0)+1);return r}function M(t,n){let r=new Map;return E(t,r,n),O(t,r),r}function E(t,n,r){for(let i of I(t,r))h(t,n,i.from_file,i.to_file)}function I(t,n){let r=n?`AND d1.relative_path LIKE '%${n}%'`:"";return t.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d1 ON c.document_id = d1.id
@@ -16,4 +16,4 @@ import{a as u,b as g,c as S}from"./chunk-LJ2YWNQF.js";import{a as p}from"./chunk
16
16
  ${t.pathExclusionsFor("d1","d2")}
17
17
  ${r}`)}function O(t,n){let r=new p(t),i=t.all(`SELECT relative_path FROM documents
18
18
  WHERE 1 = 1 ${t.pathExclusionsFor("documents")}`);r.scanSourceReferences({paths:i.map(e=>e.relative_path),includeRustAttributeNames:!0,identifierResolution:"permissive"},e=>{e.target.relativePath!==e.sourceFile&&(t.isIgnored(e.target.relativePath)||h(t,n,e.sourceFile,e.target.relativePath))})}function h(t,n,r,i){if(t.isIgnored(r)||t.isIgnored(i))return;let e=n.get(r);e||(e=new Set,n.set(r,e)),e.add(i)}function N(t){let n=new Map;for(let[i,e]of t){if(a(i))continue;let s=u(i);for(let c of e){if(a(c))continue;let o=u(c);if(s===o||g(s,o))continue;let f=`${s}->${o}`;n.set(f,(n.get(f)??0)+1)}}let r=new Map;for(let[i,e]of n)r.set(i,e<=2?"violation":"ok");return r}function $(t){return t.includes("types")||t.endsWith(".d.ts")}function F(t,n,r){let i=m(t,n).filter(e=>e.sourcePath===r);return i.length>0&&i.some(e=>e.isUsed)}function w(t,n,r){let i=d(t,n).filter(e=>e.sourcePath===r);return i.length>0&&i.some(e=>e.used)}function L(t,n,r){let i=d(t,n).filter(e=>e.sourcePath===r);return i.length>0&&i.every(e=>e.isTypeOnly===!0)}function P(t){return t.endsWith(".vue")}function x(t,n,r){let i=d(t,n).filter(e=>e.sourcePath===r);return i.length===0?!1:i.every(e=>e.kind==="side-effect"||e.kind==="namespace"&&e.usedMembers.length===0&&!e.used)}function a(t){let n=y(t);return!!(n==="entry"||n==="barrel"||n==="test"||n==="worker"||T(l.basename(t)))}function T(t){return!!(t==="index.ts"||t==="index.js"||t==="cli.ts"||t==="main.ts"||t==="main.rs"||t.includes("worker.")||t.includes("postinstall.")||t==="health.ts"||t==="health.js")}export{q as a};
19
- //# sourceMappingURL=chunk-GPY33RTH.js.map
19
+ //# sourceMappingURL=chunk-K6ULLR7M.js.map
@@ -0,0 +1,2 @@
1
+ import{a as c}from"./chunk-SVUVC5VS.js";import{j as a,k as i}from"./chunk-GS55K4WJ.js";import{q as m}from"./chunk-KYGNCIJ6.js";function d(o,e={}){let{limit:r=20,scope:s,minFanIn:t=2,minFanOut:p=2}=e;return new c(o).productionCallableDefinitions({scope:s,requireCallableSymbol:!0,includeSuppressed:!0}).map(n=>u(o,n)).filter(n=>n.fanIn>=t&&n.fanOut>=p).sort((n,l)=>l.score-n.score||l.fanIn-n.fanIn).slice(0,r)}function u(o,e){let r=new Set(i(o,e,{limit:500}).map(t=>t.file)).size,s=new Set(a(o,e,{limit:500}).filter(t=>t.file!==e.relativePath).map(t=>`${t.symbol}|${t.file}`)).size;return{symbol:e.symbol,shortName:m(e.symbol),fanIn:r,fanOut:s,score:r*s,definedIn:e.relativePath}}export{d as a};
2
+ //# sourceMappingURL=chunk-KCC3GMCX.js.map
@@ -1,6 +1,6 @@
1
- import{a as m}from"./chunk-MO65UK5V.js";import{a as h}from"./chunk-ZHHMG4UC.js";import{o as g}from"./chunk-QFZE73XF.js";import{readFileSync as f}from"fs";import{extname as b,join as d}from"path";function M(t,e,a={}){let{context:s=0}=a,r=R(e);if(r)return L(t,r.filePath,r.startLine,r.endLine,s);let l=h(t,e);return l?j(t,l,s):null}function R(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);return e?{filePath:e[1],startLine:parseInt(e[2],10),endLine:parseInt(e[3],10)}:null}function j(t,e,a){let s=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),r=d(t.config.projectRoot,e.relativePath),l;try{l=f(r,"utf-8")}catch{return null}let n=l.split(`
1
+ import{a as m}from"./chunk-55ZJ2FCW.js";import{a as h}from"./chunk-QYWGC7JV.js";import{q as g}from"./chunk-KYGNCIJ6.js";import{readFileSync as f}from"fs";import{extname as b,join as d}from"path";function M(t,e,a={}){let{context:s=0}=a,r=R(e);if(r)return L(t,r.filePath,r.startLine,r.endLine,s);let l=h(t,e);return l?j(t,l,s):null}function R(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);return e?{filePath:e[1],startLine:parseInt(e[2],10),endLine:parseInt(e[3],10)}:null}function j(t,e,a){let s=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),r=d(t.config.projectRoot,e.relativePath),l;try{l=f(r,"utf-8")}catch{return null}let n=l.split(`
2
2
  `),c=Math.max(0,e.startLine-a),i=Math.min(n.length-1,e.endLine+a),o=n.slice(c,i+1).join(`
3
3
  `);return{symbol:e.symbol,shortName:g(e.symbol),relativePath:e.relativePath,startLine:c,endLine:i,language:s?.language??v(e.relativePath),source:o}}function L(t,e,a,s,r){let l=m(t,e);if(!l)return null;let n=t.get("SELECT relative_path, language FROM documents WHERE relative_path = ?",l);if(!n)return null;let c=d(t.config.projectRoot,n.relative_path),i;try{i=f(c,"utf-8")}catch{return null}let o=i.split(`
4
4
  `),u=Math.max(0,a-1-r),p=Math.min(o.length-1,s-1+r),y=o.slice(u,p+1).join(`
5
5
  `);return{symbol:`${n.relative_path}:${a}-${s}`,shortName:`${n.relative_path}:${a}-${s}`,relativePath:n.relative_path,startLine:u,endLine:p,language:n.language??v(n.relative_path),source:y}}function v(t){switch(b(t).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{M as a};
6
- //# sourceMappingURL=chunk-7LSCW7NF.js.map
6
+ //# sourceMappingURL=chunk-KQWFRAQI.js.map
@@ -0,0 +1,5 @@
1
+ import{a as P}from"./chunk-SVUVC5VS.js";import{e as D}from"./chunk-6FLGPRBR.js";import{a as S,d as g,g as C,j as x,l as I,p as L,q as v,r as m}from"./chunk-KYGNCIJ6.js";function fe(n,e){let{scope:t,minLoc:r=3,maxLoc:s=80,limit:i=30,includeLowConfidence:l=!1,scanLimit:o}=e??{},a=new P(n),f=a.scopedDefinitions(t),u=W(a,t),d=X(_(n,a,f,{minLoc:r,maxLoc:s}).sort((c,p)=>b(p)-b(c)||c.relativePath.localeCompare(p.relativePath)),o),y=B(a,d),A=O(n,a,f,d),$=N(d);return E(n,d,y,$).filter(c=>!A.has(c.definition.symbolId)).filter(c=>!c.transitivelyReachable).filter(c=>c.realConsumers.length<=1).filter(c=>!(c.realConsumers.length===0&&c.barrelConsumers>0)).filter(c=>Z(c.definition,c.realConsumers.length,u)).map(c=>j(n,c)).filter(c=>l||c.confidence!=="low").sort((c,p)=>{let h={high:0,medium:1,low:2};return h[c.confidence]-h[p.confidence]||p.loc-c.loc||c.file.localeCompare(p.file)||c.startLine-p.startLine}).slice(0,i)}function _(n,e,t,r){return t.filter(s=>s.isTypeLike&&b(s)>=r.minLoc).filter(s=>b(s)<=r.maxLoc).filter(s=>!n.isIgnored(s.relativePath)).filter(s=>!G(s.symbol)).filter(s=>!e.hasSuppressionComment(s))}function B(n,e){return R(n.crossFileCallerMap(e),n.sourceFallbackCallerFiles(e))}function N(n){let e=new Map;for(let t of n){let r=e.get(t.relativePath);r||(r=new Map,e.set(t.relativePath,r));let s=m(t.symbol);s&&r.set(s,t)}return e}function E(n,e,t,r){return e.map(s=>{let l=[...t.get(s.symbolId)??new Set].filter(u=>u!==s.relativePath&&!n.isIgnored(u)),{realConsumers:o,barrelConsumers:a}=q(n,s.relativePath,s.symbol,l),f=J(n,s,t,r);return{definition:s,realConsumers:o,barrelConsumers:a,transitivelyReachable:f}})}function j(n,e){let t=k(n,e.definition.relativePath,e.definition.startLine),r=M(e.definition.relativePath)?!0:ee(n,e.definition),{confidence:s,reason:i}=ne(e.realConsumers.length,t,r);return{symbol:e.definition.symbol,shortName:v(e.definition.symbol),file:e.definition.relativePath,startLine:e.definition.startLine,endLine:e.definition.endLine,loc:b(e.definition),consumers:e.realConsumers.length,barrelConsumers:e.barrelConsumers,kind:t,definerUsesType:r,confidence:s,reason:i}}function O(n,e,t,r){let s=z(n,U(t),r),i=s.map(a=>a.singleton);if(s.length===0)return new Set;let l=R(e.crossFileCallerMap(i),e.sourceFallbackCallerFiles(i)),o=new Set;for(let{singleton:a,classId:f}of s)K(n,a,l)&&o.add(f);return o}function U(n){let e=new Map;for(let t of n){let r=m(t.symbol);r&&e.set(w(t.relativePath,r),t)}return e}function z(n,e,t){let r=[];for(let s of t){let i=H(n,e,s);i&&r.push({singleton:i,classId:s.symbolId})}return r}function H(n,e,t){if(k(n,t.relativePath,t.startLine)!=="class")return null;let r=m(t.symbol);if(!r)return null;let s=V(n,t.relativePath,r);return s?e.get(w(t.relativePath,s))??null:null}function K(n,e,t){let r=m(e.symbol),s=t.get(e.symbolId);return!r||!s?!1:[...s].some(i=>i!==e.relativePath&&!n.isIgnored(i)&&!T(n,i,r))}function w(n,e){return`${n}\0${e}`}function V(n,e,t){let r=g(n,e);if(!r)return null;let s=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`\\bexport\\s+const\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*new\\s+${s}\\s*\\(`);return r.match(i)?.[1]??null}function W(n,e){return new Set(n.scopedDefinitions(e).filter(t=>t.isFunctionLike).map(t=>t.relativePath))}function G(n){let e=L(n);if("kind"in e)return!1;let t=e.descriptors;if(t.length<2)return!1;let r=t[t.length-1],s=t[t.length-2];return r?.suffix==="type"&&s?.suffix==="type"}function M(n){let t=(n.split("/").pop()??"").replace(/\.[^.]+$/,"");return!!(t==="types"||t==="models"||t==="schema"||t==="common"||t==="protocol"||t==="proto"||t==="dto"||t==="mod"||/(^|\/)types(\/|\.)/.test(n)||/(^|\/)models?(\/|\.)/.test(n)||/(^|\/)proto(?:col)?(\/|\.)/.test(n)||/(^|\/)schema(\/|\.)/.test(n))}function Z(n,e,t){return!(M(n.relativePath)&&e>0||e===0&&t.has(n.relativePath))}function q(n,e,t,r){let s=[],i=0,l=m(t);for(let o of r)Y(n,o,e,l)||T(n,o,l)?i++:s.push(o);return{realConsumers:s,barrelConsumers:i}}function J(n,e,t,r){let s=I(n,e.relativePath),i=m(e.symbol);if(!i)return!1;let l=s.get(i);if(!l||l.size===0)return!1;let o=r.get(e.relativePath);if(!o)return!1;for(let a of l){let f=o.get(a);if(!f)continue;let u=t.get(f.symbolId);if(u){for(let d of u)if(d!==e.relativePath&&!n.isIgnored(d))return!0}}return!1}var F=S("stale-abs-file-usage");function T(n,e,t){if(!t)return!1;let r=C(e);if(!r)return!1;let s=F.get(n,e,()=>Q(n,e,r));return s.importedLeaves.has(t)&&!s.usedLeaves.has(t)}function Q(n,e,t){let r=new Set,s=new Set,i=x(n,e);if(!i)return{importedLeaves:r,usedLeaves:s};let l=t==="rust"?new Set(["use_declaration"]):t==="python"?new Set(["import_statement","import_from_statement"]):new Set(["import_statement"]),o=(a,f)=>{let u=f||l.has(a.type);(a.type==="identifier"||a.type==="type_identifier"||a.type==="property_identifier"||a.type==="field_identifier")&&(u?r.add(a.text):s.add(a.text));for(let d of a.children)o(d,u)};return o(i.rootNode,!1),{importedLeaves:r,usedLeaves:s}}function X(n,e){return typeof e!="number"||e<=0||n.length<=e?n:n.slice(0,e)}function ue(n){F.invalidateAll(n)}function Y(n,e,t,r){if(!r)return!1;let s=g(n,e);if(!s)return!1;let i=D(n,e);if(i.length===0)return!1;let l=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`\\b${l}\\b`),a=s.split(`
2
+ `),f=0;for(let u=0;u<a.length;u++){if(!o.test(a[u]??""))continue;if(f++,!i.find(y=>y.startLine<=u&&u<=y.endLine))return!1}return f>0}function k(n,e,t){let r=g(n,e);if(!r)return"other";let s=r.split(`
3
+ `),i=Math.max(0,t-2),l=Math.min(s.length-1,t+2);for(let o=i;o<=l;o++){let f=(s[o]??"").replace(/^\s*\/\/.*$/g,"");if(/\b(?:export\s+)?(?:abstract\s+)?class\s+\w/.test(f))return"class";if(/\b(?:export\s+)?interface\s+\w/.test(f))return"interface";if(/\b(?:export\s+)?type\s+\w/.test(f))return"type";if(/\b(?:export\s+)?(?:const\s+)?enum\s+\w/.test(f))return"enum"}return"other"}function ee(n,e){let t=g(n,e.relativePath);if(!t)return!1;let r=m(e.symbol);if(!r)return!1;let s=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`\\b${s}\\b`),l=t.split(`
4
+ `);for(let o=0;o<l.length;o++)if(!(o>=e.startLine&&o<=e.endLine)&&i.test(l[o]??""))return!0;return!1}function ne(n,e,t){return n===0?{confidence:"high",reason:"unused \u2014 no consumers and defining file has no real usage"}:n===1&&e==="class"?{confidence:"low",reason:"1 consumer + class kind \u2014 likely 1:1 encapsulation, not over-abstraction"}:n===1&&!t?{confidence:"high",reason:"1 consumer + defining file never uses it \u2014 type belongs with its consumer"}:{confidence:"medium",reason:"1 consumer \u2014 single-use abstraction"}}function b(n){return n.endLine-n.startLine+1}function R(...n){let e=new Map;for(let t of n)for(let[r,s]of t){let i=e.get(r);i||(i=new Set,e.set(r,i));for(let l of s)i.add(l)}return e}export{fe as a,ue as b};
5
+ //# sourceMappingURL=chunk-KRVRD6KZ.js.map
@@ -1,6 +1,6 @@
1
- function h(e){let n=new WeakMap,t=r=>{let i=n.get(r);return i||(i=new Map,n.set(r,i)),i};return{get(r,i,a){let s=t(r);if(s.has(i))return s.get(i);let c=a();return s.set(i,c),c},invalidate(r,i){n.get(r)?.delete(i)},invalidateAll(r){n.delete(r)},size(r){return n.get(r)?.size??0}}}function Fe(e){let n=new WeakMap;return{get(t,r){let i=n.get(t);if(i)return i.value;let a=r();return n.set(t,{value:a}),a},invalidate(t){n.delete(t)},has(t){return n.has(t)}}}function I(e){let n=new WeakMap,t=r=>{let i=n.get(r);return i||(i=new Map,n.set(r,i)),i};return{get(r,i,a,s){let c=t(r),o=c.get(i);if(o&&o.source===a)return o.value;let l=s();return c.set(i,{source:a,value:l}),l},invalidate(r,i){n.get(r)?.delete(i)},invalidateAll(r){n.delete(r)}}}import{existsSync as K,readFileSync as G}from"fs";import{join as q}from"path";var J=h("source-text");function m(e,n){let t=n.replace(/\\/g,"/");return J.get(e,t,()=>{let r=q(e.config.projectRoot,t);return K(r)?G(r,"utf-8"):""})}var X=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale|wrapper|passthrough|drift|extract)?/i;function Be(e,n,t){if(t<=0)return!1;let r=m(e,n);if(!r)return!1;let i=r.split(`
2
- `);for(let a=t-1;a>=0&&a>=t-5;a-=1){let s=(i[a]??"").trim();if(s!==""){if(X.test(s))return!0;if(!s.startsWith("//")&&!s.startsWith("*")&&!s.startsWith("/*")&&!s.startsWith("@")&&!s.startsWith("#"))return!1}}return!1}import{extname as N}from"path";import{createRequire as Z}from"module";var f=Z(import.meta.url),x=null,M=!1;function T(){if(M)return null;if(x)return x;try{return x=f("tree-sitter"),x}catch{return M=!0,null}}var ee={".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"},A=new Map,L=new Set;function E(e){if(L.has(e))return null;let n=A.get(e);if(n)return n;let t;try{switch(e){case"rust":t=f("tree-sitter-rust");break;case"typescript":t=f("tree-sitter-typescript").typescript;break;case"tsx":t=f("tree-sitter-typescript").tsx;break;case"javascript":t=f("tree-sitter-javascript");break;case"python":t=f("tree-sitter-python");break;case"java":t=f("tree-sitter-java");break;case"kotlin":t=f("tree-sitter-kotlin");break;case"scala":t=f("tree-sitter-scala");break;case"ruby":t=f("tree-sitter-ruby");break;case"c":t=f("tree-sitter-c");break;case"cpp":t=f("tree-sitter-cpp");break;case"csharp":t=f("tree-sitter-c-sharp");break;case"php":t=f("tree-sitter-php").php;break;case"vb":{let r=f("tree-sitter-vb-dotnet");t=r.language??r;break}}}catch{return L.add(e),null}return A.set(e,t),t}var w=new Map;function P(e){let n=w.get(e);if(n)return n;let t=E(e);if(!t)return null;let r=T();if(!r)return null;let i=new r;try{i.setLanguage(t)}catch{return L.add(e),null}return w.set(e,i),i}function S(e){return ee[N(e).toLowerCase()]??null}function te(e){return N(e).toLowerCase()===".vue"}var O=I("ast-trees");function C(e,n){if(te(n))return ne(e,n);let t=S(n);if(!t)return null;let r=m(e,n);return r?O.get(e,n,r,()=>{let i=P(t);if(!i)return null;try{return $(i,r)}catch{return null}}):null}function ne(e,n){let t=m(e,n);return t?O.get(e,n,t,()=>{let r=re(t);if(!r)return null;let i=P(r.language);if(!i)return null;let a=`
3
- `.repeat(r.startLine)+r.body;try{return $(i,a)}catch{return null}}):null}function $(e,n){return e.parse(r=>r>=n.length?null:n.slice(r,Math.min(n.length,r+16384)))}function re(e){let n=[],t=/<script\b([^>]*)>([\s\S]*?)<\/script>/g;for(let o of e.matchAll(t))typeof o.index=="number"&&n.push({tagOpen:o[1]??"",body:o[2]??"",openIdx:o.index+(o[0].length-(o[2]?.length??0)-9)});if(n.length===0)return null;let r=n.find(o=>/\bsetup\b/.test(o.tagOpen))??n[0],a=r.tagOpen.match(/\blang\s*=\s*["']?([\w-]+)/)?.[1]?.toLowerCase(),s=a==="ts"||a==="typescript"?"typescript":a==="tsx"?"tsx":"javascript",c=ie(e,r.openIdx);return{body:r.body,startLine:c,language:s}}function ie(e,n){let t=0;for(let r=0;r<n&&r<e.length;r++)e.charCodeAt(r)===10&&t++;return t}var g=new Map;function ae(e,n){let t=`${e}::${n}`;if(g.has(t))return g.get(t)??null;let r=E(e);if(!r)return g.set(t,null),null;let i=T();if(!i)return g.set(t,null),null;try{let a=new i.Query(r,n);return g.set(t,a),a}catch{return g.set(t,null),null}}var se={rust:`
1
+ function h(e){let n=new WeakMap,t=r=>{let i=n.get(r);return i||(i=new Map,n.set(r,i)),i};return{get(r,i,a){let s=t(r);if(s.has(i))return s.get(i);let c=a();return s.set(i,c),c},invalidate(r,i){n.get(r)?.delete(i)},invalidateAll(r){n.delete(r)},size(r){return n.get(r)?.size??0}}}function Fe(e){let n=new WeakMap;return{get(t,r){let i=n.get(t);if(i)return i.value;let a=r();return n.set(t,{value:a}),a},invalidate(t){n.delete(t)},has(t){return n.has(t)}}}function A(e){let n=new WeakMap,t=r=>{let i=n.get(r);return i||(i=new Map,n.set(r,i)),i};return{get(r,i,a,s){let c=t(r),o=c.get(i);if(o&&o.source===a)return o.value;let l=s();return c.set(i,{source:a,value:l}),l},invalidate(r,i){n.get(r)?.delete(i)},invalidateAll(r){n.delete(r)}}}import{existsSync as G,readFileSync as q}from"fs";import{join as J}from"path";var M=h("source-text");function m(e,n){let t=n.replace(/\\/g,"/");return M.get(e,t,()=>{let r=J(e.config.projectRoot,t);return G(r)?q(r,"utf-8"):""})}function Be(e){M.invalidateAll(e)}var X=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale|wrapper|passthrough|drift|extract)?/i;function He(e,n,t){if(t<=0)return!1;let r=m(e,n);if(!r)return!1;let i=r.split(`
2
+ `);for(let a=t-1;a>=0&&a>=t-5;a-=1){let s=(i[a]??"").trim();if(s!==""){if(X.test(s))return!0;if(!s.startsWith("//")&&!s.startsWith("*")&&!s.startsWith("/*")&&!s.startsWith("@")&&!s.startsWith("#"))return!1}}return!1}import{extname as E}from"path";import{createRequire as Z}from"module";var f=Z(import.meta.url),x=null,w=!1;function P(){if(w)return null;if(x)return x;try{return x=f("tree-sitter"),x}catch{return w=!0,null}}var ee={".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"},R=new Map,L=new Set;function O(e){if(L.has(e))return null;let n=R.get(e);if(n)return n;let t;try{switch(e){case"rust":t=f("tree-sitter-rust");break;case"typescript":t=f("tree-sitter-typescript").typescript;break;case"tsx":t=f("tree-sitter-typescript").tsx;break;case"javascript":t=f("tree-sitter-javascript");break;case"python":t=f("tree-sitter-python");break;case"java":t=f("tree-sitter-java");break;case"kotlin":t=f("tree-sitter-kotlin");break;case"scala":t=f("tree-sitter-scala");break;case"ruby":t=f("tree-sitter-ruby");break;case"c":t=f("tree-sitter-c");break;case"cpp":t=f("tree-sitter-cpp");break;case"csharp":t=f("tree-sitter-c-sharp");break;case"php":t=f("tree-sitter-php").php;break;case"vb":{let r=f("tree-sitter-vb-dotnet");t=r.language??r;break}}}catch{return L.add(e),null}return R.set(e,t),t}var N=new Map;function $(e){let n=N.get(e);if(n)return n;let t=O(e);if(!t)return null;let r=P();if(!r)return null;let i=new r;try{i.setLanguage(t)}catch{return L.add(e),null}return N.set(e,i),i}function S(e){return ee[E(e).toLowerCase()]??null}function te(e){return E(e).toLowerCase()===".vue"}var C=A("ast-trees");function qe(e){C.invalidateAll(e)}function k(e,n){if(te(n))return ne(e,n);let t=S(n);if(!t)return null;let r=m(e,n);return r?C.get(e,n,r,()=>{let i=$(t);if(!i)return null;try{return F(i,r)}catch{return null}}):null}function ne(e,n){let t=m(e,n);return t?C.get(e,n,t,()=>{let r=re(t);if(!r)return null;let i=$(r.language);if(!i)return null;let a=`
3
+ `.repeat(r.startLine)+r.body;try{return F(i,a)}catch{return null}}):null}function F(e,n){return e.parse(r=>r>=n.length?null:n.slice(r,Math.min(n.length,r+16384)))}function re(e){let n=[],t=/<script\b([^>]*)>([\s\S]*?)<\/script>/g;for(let o of e.matchAll(t))typeof o.index=="number"&&n.push({tagOpen:o[1]??"",body:o[2]??"",openIdx:o.index+(o[0].length-(o[2]?.length??0)-9)});if(n.length===0)return null;let r=n.find(o=>/\bsetup\b/.test(o.tagOpen))??n[0],a=r.tagOpen.match(/\blang\s*=\s*["']?([\w-]+)/)?.[1]?.toLowerCase(),s=a==="ts"||a==="typescript"?"typescript":a==="tsx"?"tsx":"javascript",c=ie(e,r.openIdx);return{body:r.body,startLine:c,language:s}}function ie(e,n){let t=0;for(let r=0;r<n&&r<e.length;r++)e.charCodeAt(r)===10&&t++;return t}var g=new Map;function ae(e,n){let t=`${e}::${n}`;if(g.has(t))return g.get(t)??null;let r=O(e);if(!r)return g.set(t,null),null;let i=P();if(!i)return g.set(t,null),null;try{let a=new i.Query(r,n);return g.set(t,a),a}catch{return g.set(t,null),null}}var se={rust:`
4
4
  (function_item name: (identifier) @name) @def
5
5
  (function_signature_item name: (identifier) @name) @def
6
6
  `,typescript:`
@@ -26,7 +26,7 @@ function h(e){let n=new WeakMap,t=r=>{let i=n.get(r);return i||(i=new Map,n.set(
26
26
  (variable_declarator name: (identifier) @name value: (function_expression)) @def
27
27
  `,python:`
28
28
  (function_definition name: (identifier) @name) @def
29
- `},oe=new WeakMap;function F(e,n){return j(e,n,oe,se,t=>{let r=[];for(let i of t){let a=null,s=null;for(let c of i.captures)c.name==="name"?a=c.node.text:c.name==="def"&&(s={startLine:c.node.startPosition.row,endLine:c.node.endPosition.row});a&&s&&r.push({name:a,startLine:s.startLine,endLine:s.endLine})}return r})}var ce={rust:`
29
+ `},oe=new WeakMap;function j(e,n){return Q(e,n,oe,se,t=>{let r=[];for(let i of t){let a=null,s=null;for(let c of i.captures)c.name==="name"?a=c.node.text:c.name==="def"&&(s={startLine:c.node.startPosition.row,endLine:c.node.endPosition.row});a&&s&&r.push({name:a,startLine:s.startLine,endLine:s.endLine})}return r})}var ce={rust:`
30
30
  (call_expression function: (_) @target) @call
31
31
  (macro_invocation macro: (_) @target) @call
32
32
  `,typescript:`
@@ -40,7 +40,7 @@ function h(e){let n=new WeakMap,t=r=>{let i=n.get(r);return i||(i=new Map,n.set(
40
40
  (new_expression constructor: (_) @target) @call
41
41
  `,python:`
42
42
  (call function: (_) @target) @call
43
- `},le=new WeakMap;function Ge(e,n){return j(e,n,le,ce,t=>{let r=[];for(let i of t){let a=null,s=null;for(let o of i.captures)o.name==="target"?a=o.node:o.name==="call"&&(s=o.node);if(!a||!s)continue;let c=D(a);c&&r.push({calleeLeaf:c,memberAccess:ue(a),line:s.startPosition.row})}return r})}function ue(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function qe(e,n){return de(e,n,fe,()=>new Map,(t,r,i)=>{let a=(o,l)=>{if(o===l)return;let u=i.get(o);u||(u=new Set,i.set(o,u)),u.add(l)},s=r==="python"?new Set(["identifier"]):new Set(["type_identifier"]),c=(o,l)=>{let u=d=>{s.has(d.type)&&d.text!==l&&a(d.text,l);for(let y of d.children)u(y)};for(let d of o.children)u(d)};if(r==="rust")for(let o of t.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let l=o.namedChildren.find(d=>d.type==="type_identifier")?.text;if(!l)continue;let u=o.namedChildren.find(d=>d.type==="field_declaration_list"||d.type==="enum_variant_list"||d.type==="ordered_field_declaration_list");u&&c(u,l),o.type==="type_item"&&c(o,l)}else if(r==="python")for(let o of t.rootNode.descendantsOfType("class_definition")){let l=o.namedChildren.find(d=>d.type==="identifier")?.text;if(!l)continue;let u=o.namedChildren.find(d=>d.type==="block");if(u)for(let d of u.descendantsOfType("type"))for(let y of d.descendantsOfType("identifier"))y.text!==l&&a(y.text,l)}else for(let o of t.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let l=o.namedChildren.find(u=>u.type==="type_identifier")?.text;l&&c(o,l)}})??new Map}function de(e,n,t,r,i){let a=S(n);if(!a)return null;let s=C(e,n);if(!s)return null;let c=t.get(s);if(c)return c;let o=r();return i(s,a,o),t.set(s,o),o}function j(e,n,t,r,i){let a=S(n);if(!a)return null;let s=r[a];if(!s)return null;let c=C(e,n);if(!c)return null;let o=t.get(c);if(o)return o;let l=ae(a,s);if(!l)return null;let u=i(l.matches(c.rootNode));return t.set(c,u),u}var fe=new WeakMap,R=new WeakMap;function Je(e,n,t,r){let i=S(n);if(!i)return null;let a=C(e,n);if(!a)return null;let s=R.get(a);return s||(s=pe(a,i),R.set(a,s)),s.get(`${t}:${r}`)??null}function pe(e,n){let t=n==="rust"?new Set(["function_item","function_signature_item"]):n==="python"?new Set(["function_definition"]):new Set(["function_declaration","method_definition","arrow_function","function_expression"]),r=new Map,i=a=>{if(t.has(a.type)){let s=a.namedChildren.find(o=>o.type==="parameters"||o.type==="formal_parameters"),c=0;if(s)for(let o of s.namedChildren)o.type==="comment"||o.type==="line_comment"||o.type==="block_comment"||(c+=1);r.set(`${a.startPosition.row}:${a.endPosition.row}`,{paramCount:c})}for(let s of a.children)i(s)};return i(e.rootNode),r}function D(e){switch(e.type){case"identifier":case"type_identifier":case"property_identifier":case"shorthand_property_identifier":return e.text;case"field_expression":case"member_expression":case"attribute":{let n=e.namedChild(e.namedChildCount-1);return n?D(n):null}case"scoped_identifier":{let n=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return n?D(n):null}case"super":case"self":case"this":return null;default:return null}}var me={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function p(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],r=n[1],i=e.slice(t.length+1+r.length+1),a;if(i.startsWith("`")){let l=i.indexOf("`",1);l===-1?(a=i.slice(1),i=""):(a=i.slice(1,l),i=i.slice(l+2))}else{let l=i.indexOf(" ");l===-1?(a=i,i=""):(a=i.slice(0,l),i=i.slice(l+1))}let s,c=i.indexOf(" ");c===-1?(s=i,i=""):(s=i.slice(0,c),i=i.slice(c+1));let o=ge(i);return{scheme:t,manager:r,packageName:a,version:s,descriptors:o,raw:e}}function ge(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let a=e.indexOf("]",t+1);if(a===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,a),suffix:"type-param"}),t=a+1;continue}if(e[t]==="("&&(n.length===0||t===0||Q(e[t-1]))){let a=e.indexOf(")",t+1);if(a!==-1&&e[a+1]!=="."){n.push({name:e.slice(t+1,a),suffix:"parameter"}),t=a+1;continue}}let r;if(e[t]==="`"){let a=e.indexOf("`",t+1);if(a===-1){r=e.slice(t+1),n.push({name:r,suffix:"term"});break}r=e.slice(t+1,a),t=a+1}else{let a=t;for(;t<e.length&&!Q(e[t]);)t++;r=e.slice(a,t)}if(t>=e.length){r&&n.push({name:r,suffix:"term"});break}let i=e[t];if(i==="("){let a=e.indexOf(")",t+1);a!==-1&&e[a+1]==="."?(n.push({name:r,suffix:"method"}),t=a+2):a!==-1?(n.push({name:r,suffix:"method"}),t=a+1):(n.push({name:r,suffix:"term"}),t++)}else{let a=me[i];a&&n.push({name:r,suffix:a}),t+=1}}return n}function Q(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function V(e){let n=p(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let r=[];for(let i of t.descriptors){let a=be(i);a&&r.push(a)}return r.join(":")}function be(e){let n=e.suffix==="namespace"?ye(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function ye(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=p(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 b(e){let n=p(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function Ze(e){return e.endsWith("().")||b(e)==="method"}function B(e){let n=b(e);return n==="method"||n==="term"}function et(e){return b(e)==="namespace"}var he=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function tt(e){return he.test(e)}var xe=new Set(["test","tests","_tests"]);function nt(e){let n=p(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let r=n.descriptors[t];if(r?.suffix==="namespace"&&r.name&&xe.has(r.name))return!0}return!1}function rt(e,n){let t=p(e),r=p(n);if("kind"in t||"kind"in r)return!1;let i=t.descriptors,a=r.descriptors;if(a.length!==i.length+1)return!1;for(let s=0;s<i.length;s++){let c=i[s],o=a[s];if(c.name!==o.name||c.suffix!==o.suffix)return!1}return!0}function it(e,n){let t=p(e),r=p(n);if("kind"in t||"kind"in r)return!1;let i=t.descriptors,a=r.descriptors;if(a.length<=i.length)return!1;for(let s=0;s<i.length;s++){let c=i[s],o=a[s];if(c.name!==o.name||c.suffix!==o.suffix)return!1}return!0}function z(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=H(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let r=e.slice(t+1);return(H(r)??r).replace(/\n/g," ")}function H(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}var Se=h("file-definitions");function k(e,n){return Se.get(e,n,()=>{let t=Ce(_e(e,n),Le(e,n));return Ie(e,n,t.map(De))})}function _e(e,n){return e.all(`SELECT
43
+ `},le=new WeakMap;function Je(e,n){return Q(e,n,le,ce,t=>{let r=[];for(let i of t){let a=null,s=null;for(let o of i.captures)o.name==="target"?a=o.node:o.name==="call"&&(s=o.node);if(!a||!s)continue;let c=D(a);c&&r.push({calleeLeaf:c,memberAccess:ue(a),line:s.startPosition.row})}return r})}function ue(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function Xe(e,n){return de(e,n,fe,()=>new Map,(t,r,i)=>{let a=(o,l)=>{if(o===l)return;let u=i.get(o);u||(u=new Set,i.set(o,u)),u.add(l)},s=r==="python"?new Set(["identifier"]):new Set(["type_identifier"]),c=(o,l)=>{let u=d=>{s.has(d.type)&&d.text!==l&&a(d.text,l);for(let y of d.children)u(y)};for(let d of o.children)u(d)};if(r==="rust")for(let o of t.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let l=o.namedChildren.find(d=>d.type==="type_identifier")?.text;if(!l)continue;let u=o.namedChildren.find(d=>d.type==="field_declaration_list"||d.type==="enum_variant_list"||d.type==="ordered_field_declaration_list");u&&c(u,l),o.type==="type_item"&&c(o,l)}else if(r==="python")for(let o of t.rootNode.descendantsOfType("class_definition")){let l=o.namedChildren.find(d=>d.type==="identifier")?.text;if(!l)continue;let u=o.namedChildren.find(d=>d.type==="block");if(u)for(let d of u.descendantsOfType("type"))for(let y of d.descendantsOfType("identifier"))y.text!==l&&a(y.text,l)}else for(let o of t.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let l=o.namedChildren.find(u=>u.type==="type_identifier")?.text;l&&c(o,l)}})??new Map}function de(e,n,t,r,i){let a=S(n);if(!a)return null;let s=k(e,n);if(!s)return null;let c=t.get(s);if(c)return c;let o=r();return i(s,a,o),t.set(s,o),o}function Q(e,n,t,r,i){let a=S(n);if(!a)return null;let s=r[a];if(!s)return null;let c=k(e,n);if(!c)return null;let o=t.get(c);if(o)return o;let l=ae(a,s);if(!l)return null;let u=i(l.matches(c.rootNode));return t.set(c,u),u}var fe=new WeakMap,T=new WeakMap;function Ze(e,n,t,r){let i=S(n);if(!i)return null;let a=k(e,n);if(!a)return null;let s=T.get(a);return s||(s=pe(a,i),T.set(a,s)),s.get(`${t}:${r}`)??null}function pe(e,n){let t=n==="rust"?new Set(["function_item","function_signature_item"]):n==="python"?new Set(["function_definition"]):new Set(["function_declaration","method_definition","arrow_function","function_expression"]),r=new Map,i=a=>{if(t.has(a.type)){let s=a.namedChildren.find(o=>o.type==="parameters"||o.type==="formal_parameters"),c=0;if(s)for(let o of s.namedChildren)o.type==="comment"||o.type==="line_comment"||o.type==="block_comment"||(c+=1);r.set(`${a.startPosition.row}:${a.endPosition.row}`,{paramCount:c})}for(let s of a.children)i(s)};return i(e.rootNode),r}function D(e){switch(e.type){case"identifier":case"type_identifier":case"property_identifier":case"shorthand_property_identifier":return e.text;case"field_expression":case"member_expression":case"attribute":{let n=e.namedChild(e.namedChildCount-1);return n?D(n):null}case"scoped_identifier":{let n=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return n?D(n):null}case"super":case"self":case"this":return null;default:return null}}var me={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function p(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],r=n[1],i=e.slice(t.length+1+r.length+1),a;if(i.startsWith("`")){let l=i.indexOf("`",1);l===-1?(a=i.slice(1),i=""):(a=i.slice(1,l),i=i.slice(l+2))}else{let l=i.indexOf(" ");l===-1?(a=i,i=""):(a=i.slice(0,l),i=i.slice(l+1))}let s,c=i.indexOf(" ");c===-1?(s=i,i=""):(s=i.slice(0,c),i=i.slice(c+1));let o=ge(i);return{scheme:t,manager:r,packageName:a,version:s,descriptors:o,raw:e}}function ge(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let a=e.indexOf("]",t+1);if(a===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,a),suffix:"type-param"}),t=a+1;continue}if(e[t]==="("&&(n.length===0||t===0||V(e[t-1]))){let a=e.indexOf(")",t+1);if(a!==-1&&e[a+1]!=="."){n.push({name:e.slice(t+1,a),suffix:"parameter"}),t=a+1;continue}}let r;if(e[t]==="`"){let a=e.indexOf("`",t+1);if(a===-1){r=e.slice(t+1),n.push({name:r,suffix:"term"});break}r=e.slice(t+1,a),t=a+1}else{let a=t;for(;t<e.length&&!V(e[t]);)t++;r=e.slice(a,t)}if(t>=e.length){r&&n.push({name:r,suffix:"term"});break}let i=e[t];if(i==="("){let a=e.indexOf(")",t+1);a!==-1&&e[a+1]==="."?(n.push({name:r,suffix:"method"}),t=a+2):a!==-1?(n.push({name:r,suffix:"method"}),t=a+1):(n.push({name:r,suffix:"term"}),t++)}else{let a=me[i];a&&n.push({name:r,suffix:a}),t+=1}}return n}function V(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function W(e){let n=p(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let r=[];for(let i of t.descriptors){let a=be(i);a&&r.push(a)}return r.join(":")}function be(e){let n=e.suffix==="namespace"?ye(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function ye(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 B(e){let n=p(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 b(e){let n=p(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function tt(e){return e.endsWith("().")||b(e)==="method"}function H(e){let n=b(e);return n==="method"||n==="term"}function nt(e){return b(e)==="namespace"}var he=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function rt(e){return he.test(e)}var xe=new Set(["test","tests","_tests"]);function it(e){let n=p(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let r=n.descriptors[t];if(r?.suffix==="namespace"&&r.name&&xe.has(r.name))return!0}return!1}function at(e,n){let t=p(e),r=p(n);if("kind"in t||"kind"in r)return!1;let i=t.descriptors,a=r.descriptors;if(a.length!==i.length+1)return!1;for(let s=0;s<i.length;s++){let c=i[s],o=a[s];if(c.name!==o.name||c.suffix!==o.suffix)return!1}return!0}function st(e,n){let t=p(e),r=p(n);if("kind"in t||"kind"in r)return!1;let i=t.descriptors,a=r.descriptors;if(a.length<=i.length)return!1;for(let s=0;s<i.length;s++){let c=i[s],o=a[s];if(c.name!==o.name||c.suffix!==o.suffix)return!1}return!0}function U(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 Y(e){if(!e)return null;let n=z(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let r=e.slice(t+1);return(z(r)??r).replace(/\n/g," ")}function z(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}var Se=h("file-definitions");function v(e,n){return Se.get(e,n,()=>{let t=Ce(_e(e,n),Le(e,n));return Ie(e,n,t.map(De))})}function _e(e,n){return e.all(`SELECT
44
44
  gs.id,
45
45
  gs.symbol,
46
46
  der.document_id,
@@ -75,10 +75,10 @@ function h(e){let n=new WeakMap,t=r=>{let i=n.get(r);return i||(i=new Map,n.set(
75
75
  AND m.role = 1
76
76
  ${e.symbolNoiseFor("gs")}
77
77
  GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
78
- ORDER BY start_line, end_line`,n)}function De(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,endLine:e.end_line,relativePath:e.relative_path,leaf:W(e.symbol),parentTypeName:v(e.symbol),isFunctionLike:B(e.symbol),isTypeLike:b(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function Ce(e,n){let t=new Map;for(let r of n)e.length>0&&!ke(r)||t.set(r.id,r);for(let r of e)t.set(r.id,r);return[...t.values()].sort((r,i)=>r.start_line-i.start_line||r.end_line-i.end_line||r.symbol.localeCompare(i.symbol))}function ke(e){if(v(e.symbol)!==null)return!1;let t=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(t)}function ft(e,n={}){return ve(e,n.scope)}function ve(e,n){let t=n?`AND relative_path LIKE '%${n}%'`:"";return e.all(`SELECT relative_path
78
+ ORDER BY start_line, end_line`,n)}function De(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,endLine:e.end_line,relativePath:e.relative_path,leaf:B(e.symbol),parentTypeName:I(e.symbol),isFunctionLike:H(e.symbol),isTypeLike:b(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function Ce(e,n){let t=new Map;for(let r of n)e.length>0&&!ke(r)||t.set(r.id,r);for(let r of e)t.set(r.id,r);return[...t.values()].sort((r,i)=>r.start_line-i.start_line||r.end_line-i.end_line||r.symbol.localeCompare(i.symbol))}function ke(e){if(I(e.symbol)!==null)return!1;let t=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(t)}function mt(e,n={}){return ve(e,n.scope)}function ve(e,n){let t=n?`AND relative_path LIKE '%${n}%'`:"";return e.all(`SELECT relative_path
79
79
  FROM documents
80
80
  WHERE 1 = 1
81
81
  ${e.pathExclusionsFor("documents")}
82
82
  ${t}
83
- ORDER BY relative_path`).flatMap(r=>k(e,r.relative_path)).filter(r=>!e.isIgnored(r.relativePath))}function pt(e,n,t={}){if(n.length===0)return[];let r=n.flatMap(i=>k(e,i)).filter(i=>!e.isIgnored(i.relativePath));return t.onlyDocumented&&(r=r.filter(i=>i.documentation!==null&&i.documentation!=="")),t.sort&&(r=r.sort((i,a)=>i.relativePath.localeCompare(a.relativePath)||i.startLine-a.startLine||i.endLine-a.endLine)),r.map(i=>({startLine:i.startLine,endLine:i.endLine,symbol:i.symbol,shortName:V(i.symbol),signature:z(U(i.documentation)),relativePath:i.relativePath,enclosingSymbol:i.enclosingSymbol}))}function mt(e,n){let t=null;for(let r of e)r.startLine>n||r.endLine<n||(!t||r.endLine-r.startLine<t.endLine-t.startLine)&&(t=r);return t}function gt(e,n){let t=k(e,n.relative_path).find(r=>r.symbolId===n.id);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,endLine:t.endLine,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,endLine:n.end_line,relativePath:n.relative_path}}function Ie(e,n,t){let r=m(e,n),i=F(e,n);return i?Te(t,i,r):r?Me(t,r):t}function Me(e,n){let t=n.split(/\r?\n/),r=Ae(e,t),i=we(e,r),a=Re(i,t);return Ne(e,a)}function Ae(e,n){let t=e.some(i=>_(i.symbol))?Pe(n):null,r=new Map;for(let i of e)r.set(i.symbolId,Ee(n,t,i));return r}function we(e,n){return e.filter(t=>_(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,r)=>t.startLine-r.startLine||t.definition.startLine-r.definition.startLine||t.definition.symbol.localeCompare(r.definition.symbol))}function Re(e,n){let t=new Map;for(let r=0;r<e.length;r+=1){let i=e[r],a=e[r+1],s=a?Math.max(i.startLine,a.startLine-1):n.length-1;t.set(i.definition.symbolId,{startLine:i.startLine,endLine:Oe(n,i.definition,i.startLine,s)})}return t}function Ne(e,n){return e.map(t=>{let r=n.get(t.symbolId);return r?{...t,startLine:r.startLine,endLine:r.endLine}:t})}function Te(e,n,t=null){let r=new Map;for(let i of n){let a=r.get(i.name);a?a.push(i):r.set(i.name,[i])}return e.map(i=>{if(!_(i.symbol)||!i.leaf)return Y(i,t);let a=r.get(i.leaf);if(!a||a.length===0)return Y(i,t);let s=a[0],c=Math.abs(s.startLine-i.startLine);for(let o=1;o<a.length;o+=1){let l=a[o],u=Math.abs(l.startLine-i.startLine);u<c&&(s=l,c=u)}return{...i,startLine:s.startLine,endLine:s.endLine}})}function Y(e,n){if(!n||!e.leaf||b(e.symbol)!=="term"||v(e.symbol)!==null)return e;let t=e.leaf.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),a=n.split(/\r?\n/).findIndex(s=>r.test(s));return a>=0?{...e,startLine:a,endLine:a}:e}function Ee(e,n,t){if(!_(t.symbol))return t.startLine;let r=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return r;let i=n.get(t.leaf);if(!i||i.length===0)return r;let a=null;for(let s of i){let c=Math.abs(s-t.startLine);(!a||c<a.distance)&&(a={line:s,distance:c})}return a?.line??r}function Pe(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,r=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,i=/\b([A-Za-z_$][\w$]*)\s*\(/g,a=new Map,s=(c,o)=>{let l=a.get(c);if(!l){a.set(c,[o]);return}l[l.length-1]!==o&&l.push(o)};for(let c=0;c<e.length;c+=1){let o=e[c]??"";for(let u of o.matchAll(n))u[1]&&s(u[1],c);for(let u of o.matchAll(t))u[1]&&s(u[1],c);let l=o.match(r);l?.[1]&&s(l[1],c);for(let u of o.matchAll(i))u[1]&&s(u[1],c)}return a}function Oe(e,n,t,r){let i=Math.max(t,Math.min(e.length-1,r)),a=Math.max(t,Math.min(i,n.endLine)),s=0,c=0,o=!1;for(let l=t;l<=i;l+=1){let u=$e(e[l]??"");for(let d of u)d==="{"?(s+=1,o=!0):d==="}"?s=Math.max(0,s-1):d==="("?c+=1:d===")"&&(c=Math.max(0,c-1));if(o&&s===0||!o&&c===0&&l>=a)return l}return a}function $e(e){let n="",t=null,r=!1;for(let i=0;i<e.length;i+=1){let a=e[i],s=e[i+1];if(!t&&a==="/"&&s==="/"){n+=" ".repeat(e.length-i);break}if(t){if(r){r=!1,n+=" ";continue}if(a==="\\"){r=!0,n+=" ";continue}a===t&&(t=null),n+=" ";continue}if(a==='"'||a==="'"||a==="`"){t=a,n+=" ";continue}n+=a}return n}function _(e){return e.includes("().")}function v(e){let n=p(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let r=n.descriptors[t];if(r?.suffix==="type")return r.name}return null}function bt(e){let n=p(e);if("kind"in n)return[];let t=[];for(let r=n.descriptors.length-2;r>=0;r-=1){let i=n.descriptors[r];i?.suffix==="type"&&i.name&&t.push(i.name)}return t}export{h as a,Fe as b,I as c,m as d,Be as e,S as f,te as g,C as h,Ge as i,qe as j,de as k,Je as l,D as m,p as n,V as o,W as p,b as q,Ze as r,B as s,et as t,tt as u,nt as v,rt as w,it as x,z as y,U as z,k as A,ft as B,ve as C,pt as D,mt as E,gt as F,v as G,bt as H};
84
- //# sourceMappingURL=chunk-QFZE73XF.js.map
83
+ ORDER BY relative_path`).flatMap(r=>v(e,r.relative_path)).filter(r=>!e.isIgnored(r.relativePath))}function gt(e,n,t={}){if(n.length===0)return[];let r=n.flatMap(i=>v(e,i)).filter(i=>!e.isIgnored(i.relativePath));return t.onlyDocumented&&(r=r.filter(i=>i.documentation!==null&&i.documentation!=="")),t.sort&&(r=r.sort((i,a)=>i.relativePath.localeCompare(a.relativePath)||i.startLine-a.startLine||i.endLine-a.endLine)),r.map(i=>({startLine:i.startLine,endLine:i.endLine,symbol:i.symbol,shortName:W(i.symbol),signature:U(Y(i.documentation)),relativePath:i.relativePath,enclosingSymbol:i.enclosingSymbol}))}function bt(e,n){let t=null;for(let r of e)r.startLine>n||r.endLine<n||(!t||r.endLine-r.startLine<t.endLine-t.startLine)&&(t=r);return t}function yt(e,n){let t=v(e,n.relative_path).find(r=>r.symbolId===n.id);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,endLine:t.endLine,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,endLine:n.end_line,relativePath:n.relative_path}}function Ie(e,n,t){let r=m(e,n),i=j(e,n);return i?Te(t,i,r):r?Ae(t,r):t}function Ae(e,n){let t=n.split(/\r?\n/),r=Me(e,t),i=we(e,r),a=Re(i,t);return Ne(e,a)}function Me(e,n){let t=e.some(i=>_(i.symbol))?Pe(n):null,r=new Map;for(let i of e)r.set(i.symbolId,Ee(n,t,i));return r}function we(e,n){return e.filter(t=>_(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,r)=>t.startLine-r.startLine||t.definition.startLine-r.definition.startLine||t.definition.symbol.localeCompare(r.definition.symbol))}function Re(e,n){let t=new Map;for(let r=0;r<e.length;r+=1){let i=e[r],a=e[r+1],s=a?Math.max(i.startLine,a.startLine-1):n.length-1;t.set(i.definition.symbolId,{startLine:i.startLine,endLine:Oe(n,i.definition,i.startLine,s)})}return t}function Ne(e,n){return e.map(t=>{let r=n.get(t.symbolId);return r?{...t,startLine:r.startLine,endLine:r.endLine}:t})}function Te(e,n,t=null){let r=new Map;for(let i of n){let a=r.get(i.name);a?a.push(i):r.set(i.name,[i])}return e.map(i=>{if(!_(i.symbol)||!i.leaf)return K(i,t);let a=r.get(i.leaf);if(!a||a.length===0)return K(i,t);let s=a[0],c=Math.abs(s.startLine-i.startLine);for(let o=1;o<a.length;o+=1){let l=a[o],u=Math.abs(l.startLine-i.startLine);u<c&&(s=l,c=u)}return{...i,startLine:s.startLine,endLine:s.endLine}})}function K(e,n){if(!n||!e.leaf||b(e.symbol)!=="term"||I(e.symbol)!==null)return e;let t=e.leaf.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),a=n.split(/\r?\n/).findIndex(s=>r.test(s));return a>=0?{...e,startLine:a,endLine:a}:e}function Ee(e,n,t){if(!_(t.symbol))return t.startLine;let r=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return r;let i=n.get(t.leaf);if(!i||i.length===0)return r;let a=null;for(let s of i){let c=Math.abs(s-t.startLine);(!a||c<a.distance)&&(a={line:s,distance:c})}return a?.line??r}function Pe(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,r=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,i=/\b([A-Za-z_$][\w$]*)\s*\(/g,a=new Map,s=(c,o)=>{let l=a.get(c);if(!l){a.set(c,[o]);return}l[l.length-1]!==o&&l.push(o)};for(let c=0;c<e.length;c+=1){let o=e[c]??"";for(let u of o.matchAll(n))u[1]&&s(u[1],c);for(let u of o.matchAll(t))u[1]&&s(u[1],c);let l=o.match(r);l?.[1]&&s(l[1],c);for(let u of o.matchAll(i))u[1]&&s(u[1],c)}return a}function Oe(e,n,t,r){let i=Math.max(t,Math.min(e.length-1,r)),a=Math.max(t,Math.min(i,n.endLine)),s=0,c=0,o=!1;for(let l=t;l<=i;l+=1){let u=$e(e[l]??"");for(let d of u)d==="{"?(s+=1,o=!0):d==="}"?s=Math.max(0,s-1):d==="("?c+=1:d===")"&&(c=Math.max(0,c-1));if(o&&s===0||!o&&c===0&&l>=a)return l}return a}function $e(e){let n="",t=null,r=!1;for(let i=0;i<e.length;i+=1){let a=e[i],s=e[i+1];if(!t&&a==="/"&&s==="/"){n+=" ".repeat(e.length-i);break}if(t){if(r){r=!1,n+=" ";continue}if(a==="\\"){r=!0,n+=" ";continue}a===t&&(t=null),n+=" ";continue}if(a==='"'||a==="'"||a==="`"){t=a,n+=" ";continue}n+=a}return n}function _(e){return e.includes("().")}function I(e){let n=p(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let r=n.descriptors[t];if(r?.suffix==="type")return r.name}return null}function ht(e){let n=p(e);if("kind"in n)return[];let t=[];for(let r=n.descriptors.length-2;r>=0;r-=1){let i=n.descriptors[r];i?.suffix==="type"&&i.name&&t.push(i.name)}return t}export{h as a,Fe as b,A as c,m as d,Be as e,He as f,S as g,te as h,qe as i,k as j,Je as k,Xe as l,de as m,Ze as n,D as o,p,W as q,B as r,b as s,tt as t,H as u,nt as v,rt as w,it as x,at as y,st as z,U as A,Y as B,v as C,mt as D,ve as E,gt as F,bt as G,yt as H,I,ht as J};
84
+ //# sourceMappingURL=chunk-KYGNCIJ6.js.map
@@ -0,0 +1,2 @@
1
+ import{a as m}from"./chunk-SVUVC5VS.js";import{a as l}from"./chunk-QYWGC7JV.js";import{r,t as a}from"./chunk-KYGNCIJ6.js";import{basename as d}from"path";function g(t,c){let o=l(t,c);if(!o)return[];let s=r(o.symbol),i=new m(t).definitionsForFile(o.relativePath).filter(e=>a(e.symbol)),n=i.filter(e=>e.parentTypeName===s||e.symbol.includes(s));return(n.length>0?n:p(d(o.relativePath))===s?i.filter(e=>e.symbol.includes("<invalid-global-code>")):[]).map(e=>({startLine:e.startLine,endLine:e.endLine,name:r(e.symbol)}))}function p(t){return t.replace(/\.[^.]+$/,"")}export{g as a};
2
+ //# sourceMappingURL=chunk-LHLXHH43.js.map
@@ -1,7 +1,7 @@
1
- import{c as m}from"./chunk-VEXS3I3N.js";import{j as g}from"./chunk-3PVIYZ74.js";import{a as R}from"./chunk-ZHHMG4UC.js";import{d as u,s as h}from"./chunk-QFZE73XF.js";function $(t,a){let e=R(t,a);if(!e)return[];let i=!h(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],r=m(t,e),l=(r.length>0?r:g(t,e)).filter(n=>!t.isIgnored(n.file)).map(n=>({relativePath:n.file,line:n.line})),c=S(t,e),s=new Set,f=[];for(let n of[...i,...l,...c]){let p=`${n.relativePath}:${n.line}`;s.has(p)||(s.add(p),f.push(n))}return f}function S(t,a){if(!a.relativePath.endsWith(".rb"))return[];let e=d(a.symbol);if(e.length===0)return[];let o=t.all(`SELECT relative_path
1
+ import{c as m}from"./chunk-7EQ4J66C.js";import{l as g}from"./chunk-GS55K4WJ.js";import{a as R}from"./chunk-QYWGC7JV.js";import{d as u,u as h}from"./chunk-KYGNCIJ6.js";function $(t,a){let e=R(t,a);if(!e)return[];let i=!h(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],r=m(t,e),l=(r.length>0?r:g(t,e)).filter(n=>!t.isIgnored(n.file)).map(n=>({relativePath:n.file,line:n.line})),c=S(t,e),s=new Set,f=[];for(let n of[...i,...l,...c]){let p=`${n.relativePath}:${n.line}`;s.has(p)||(s.add(p),f.push(n))}return f}function S(t,a){if(!a.relativePath.endsWith(".rb"))return[];let e=d(a.symbol);if(e.length===0)return[];let o=t.all(`SELECT relative_path
2
2
  FROM documents
3
3
  WHERE relative_path LIKE '%.rb'
4
4
  ${t.pathExclusionsFor("documents")}
5
5
  ORDER BY relative_path`),i=[];for(let r of o){if(t.isIgnored(r.relative_path))continue;let l=u(t,r.relative_path);if(!l)continue;let c=l.split(`
6
6
  `);for(let s=0;s<c.length;s++){let f=c[s]??"";e.some(n=>new RegExp(`@${n}\\b|\\b${n}:`).test(f))&&i.push({relativePath:r.relative_path,line:s})}}return i}function d(t){let e=(t.split(":").pop()??t).replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^A-Za-z0-9_]+/g,"_").toLowerCase().replace(/^_+|_+$/g,""),o=e.split("_").filter(Boolean),i=new Set;return e&&i.add(e),o.length>=1&&i.add(o[o.length-1]),o.length>=2&&i.add(o.slice(-2).join("_")),[...i]}export{$ as a};
7
- //# sourceMappingURL=chunk-IZ4KV37N.js.map
7
+ //# sourceMappingURL=chunk-M7GBLQG4.js.map
@@ -1,2 +1,2 @@
1
- import{r as S}from"./chunk-Z4AMQWVY.js";import{B as x,d as g,o as d,y as h,z as b}from"./chunk-QFZE73XF.js";function B(t,e={}){let{scope:s,minLoc:o=1,limit:i}=e,c=new Map;for(let r of x(t,{scope:s})){if(!r.isFunctionLike||t.isIgnored(r.relativePath))continue;let n=r.endLine-r.startLine+1;if(n<o)continue;let m=L(t,r);if(!m)continue;let u={symbol:r.symbol,shortName:d(r.symbol),file:r.relativePath,startLine:r.startLine,endLine:r.endLine,loc:n},l=c.get(m);l?l.push(u):c.set(m,[u])}let a=[];for(let[r,n]of c)n.length<2||a.push({signature:r,functions:n});return a.sort((r,n)=>{let m=n.functions.length-r.functions.length;if(m!==0)return m;let u=r.functions.reduce((f,p)=>f+p.loc,0);return n.functions.reduce((f,p)=>f+p.loc,0)-u}),i?a.slice(0,i):a}function L(t,e){let s=S(t,e);if(s)return s;let o=$(e.documentation),i=o?v(o):null;return i||w(D(t,e.relativePath,e.startLine,e.endLine,e.leaf),e.leaf)}function $(t){return h(b(t))}function D(t,e,s,o,i){let c=g(t,e);if(!c)return null;let a=c.split(/\r?\n/),r=I(a,s,o,i);for(let n of r){let m=Math.min(a.length-1,Math.max(n,n+4)),u="";for(let l=n;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,M(u)))return u}if(u&&u.includes("("))return u}return null}function M(t){let e=t.replace(/\s+/g," ").trim();return!e.includes("(")||P(e)>0?!1:/[;{]$/.test(e)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(e)||/\)\s*As\s+.+$/i.test(e)}function v(t){if(!t||!t.trim())return null;let e=t.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(),s=e.indexOf("(");return s===-1||(e=e.slice(s),e=e.replace(/\s+/g,"").toLowerCase(),e.length<3)?null:e}function w(t,e){if(!t||!t.trim())return null;let s=t.replace(/\s+/g," ").trim(),o=s.indexOf("(");if(o===-1)return null;let i=s.slice(0,o),a=new RegExp(`\\b${y(e)}\\b`,"i").exec(i);a&&typeof a.index=="number"&&(i=i.slice(0,a.index)),i=i.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let r=z(s.slice(o)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!r.startsWith("("))return null;let n=`${i?`${i} `:""}${r}`.replace(/\s+/g,"").toLowerCase();return n.length>=3?n:null}function z(t){let e=0,s=0,o=0,i=0,c=null,a=!1;for(let r=0;r<t.length;r+=1){let n=t[r];if(c){if(a){a=!1;continue}if(n==="\\"){a=!0;continue}n===c&&(c=null);continue}if(n==='"'||n==="'"||n==="`"){c=n;continue}if(n==="(")e+=1;else if(n===")")e=Math.max(0,e-1);else if(n==="[")o+=1;else if(n==="]")o=Math.max(0,o-1);else if(n==="<")i+=1;else if(n===">")i=Math.max(0,i-1);else if(n==="{"){if(e===0&&o===0&&i===0)return t.slice(0,r);s+=1}else if(n==="}")s=Math.max(0,s-1);else if(n==="="&&t[r+1]===">"&&e===0&&s===0&&o===0&&i===0)return t.slice(0,r)}return t}function I(t,e,s,o){let i=y(o),c=new RegExp(`\\b${i}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${i}\\b`,"i"),r=[],n=new Set,m=Math.max(0,Math.min(e,t.length-1)),u=Math.max(m,Math.min(t.length-1,Math.max(s,e+4)));for(let l=m;l<=u;l+=1){let f=t[l]??"";(c.test(f)||a.test(f))&&!n.has(l)&&(n.add(l),r.push(l))}for(let l=0;l<t.length;l+=1){let f=t[l]??"";(c.test(f)||a.test(f))&&!n.has(l)&&(n.add(l),r.push(l))}return r}function P(t){let e=0;for(let s of t)s==="("&&(e+=1),s===")"&&(e-=1);return e}function y(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{B as a};
2
- //# sourceMappingURL=chunk-WFDTS7XL.js.map
1
+ import{s as S}from"./chunk-G47V5V3U.js";import{A as h,B as b,D as x,d as g,q as d}from"./chunk-KYGNCIJ6.js";function B(t,e={}){let{scope:s,minLoc:o=1,limit:i}=e,c=new Map;for(let r of x(t,{scope:s})){if(!r.isFunctionLike||t.isIgnored(r.relativePath))continue;let n=r.endLine-r.startLine+1;if(n<o)continue;let m=L(t,r);if(!m)continue;let u={symbol:r.symbol,shortName:d(r.symbol),file:r.relativePath,startLine:r.startLine,endLine:r.endLine,loc:n},l=c.get(m);l?l.push(u):c.set(m,[u])}let a=[];for(let[r,n]of c)n.length<2||a.push({signature:r,functions:n});return a.sort((r,n)=>{let m=n.functions.length-r.functions.length;if(m!==0)return m;let u=r.functions.reduce((f,p)=>f+p.loc,0);return n.functions.reduce((f,p)=>f+p.loc,0)-u}),i?a.slice(0,i):a}function L(t,e){let s=S(t,e);if(s)return s;let o=$(e.documentation),i=o?v(o):null;return i||w(D(t,e.relativePath,e.startLine,e.endLine,e.leaf),e.leaf)}function $(t){return h(b(t))}function D(t,e,s,o,i){let c=g(t,e);if(!c)return null;let a=c.split(/\r?\n/),r=I(a,s,o,i);for(let n of r){let m=Math.min(a.length-1,Math.max(n,n+4)),u="";for(let l=n;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,M(u)))return u}if(u&&u.includes("("))return u}return null}function M(t){let e=t.replace(/\s+/g," ").trim();return!e.includes("(")||P(e)>0?!1:/[;{]$/.test(e)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(e)||/\)\s*As\s+.+$/i.test(e)}function v(t){if(!t||!t.trim())return null;let e=t.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(),s=e.indexOf("(");return s===-1||(e=e.slice(s),e=e.replace(/\s+/g,"").toLowerCase(),e.length<3)?null:e}function w(t,e){if(!t||!t.trim())return null;let s=t.replace(/\s+/g," ").trim(),o=s.indexOf("(");if(o===-1)return null;let i=s.slice(0,o),a=new RegExp(`\\b${y(e)}\\b`,"i").exec(i);a&&typeof a.index=="number"&&(i=i.slice(0,a.index)),i=i.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let r=z(s.slice(o)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!r.startsWith("("))return null;let n=`${i?`${i} `:""}${r}`.replace(/\s+/g,"").toLowerCase();return n.length>=3?n:null}function z(t){let e=0,s=0,o=0,i=0,c=null,a=!1;for(let r=0;r<t.length;r+=1){let n=t[r];if(c){if(a){a=!1;continue}if(n==="\\"){a=!0;continue}n===c&&(c=null);continue}if(n==='"'||n==="'"||n==="`"){c=n;continue}if(n==="(")e+=1;else if(n===")")e=Math.max(0,e-1);else if(n==="[")o+=1;else if(n==="]")o=Math.max(0,o-1);else if(n==="<")i+=1;else if(n===">")i=Math.max(0,i-1);else if(n==="{"){if(e===0&&o===0&&i===0)return t.slice(0,r);s+=1}else if(n==="}")s=Math.max(0,s-1);else if(n==="="&&t[r+1]===">"&&e===0&&s===0&&o===0&&i===0)return t.slice(0,r)}return t}function I(t,e,s,o){let i=y(o),c=new RegExp(`\\b${i}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${i}\\b`,"i"),r=[],n=new Set,m=Math.max(0,Math.min(e,t.length-1)),u=Math.max(m,Math.min(t.length-1,Math.max(s,e+4)));for(let l=m;l<=u;l+=1){let f=t[l]??"";(c.test(f)||a.test(f))&&!n.has(l)&&(n.add(l),r.push(l))}for(let l=0;l<t.length;l+=1){let f=t[l]??"";(c.test(f)||a.test(f))&&!n.has(l)&&(n.add(l),r.push(l))}return r}function P(t){let e=0;for(let s of t)s==="("&&(e+=1),s===")"&&(e-=1);return e}function y(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{B as a};
2
+ //# sourceMappingURL=chunk-MEVK6R7N.js.map
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-MO65UK5V.js";function r(e,o,n){let d=m(e,o)??o,s=m(e,n)??n,t=e.get(`SELECT COUNT(DISTINCT gs.id) AS shared
1
+ import{a as m}from"./chunk-55ZJ2FCW.js";function r(e,o,n){let d=m(e,o)??o,s=m(e,n)??n,t=e.get(`SELECT COUNT(DISTINCT gs.id) AS shared
2
2
  FROM global_symbols gs
3
3
  WHERE (
4
4
  -- Defined in file1, referenced in file2
@@ -53,4 +53,4 @@ import{a as m}from"./chunk-MO65UK5V.js";function r(e,o,n){let d=m(e,o)??o,s=m(e,
53
53
  GROUP BY def_d.id, ref_d.id
54
54
  ORDER BY shared DESC
55
55
  LIMIT ?`,n).filter(i=>!e.isIgnored(i.file1)&&!e.isIgnored(i.file2)).map(i=>({file1:i.file1,file2:i.file2,sharedSymbols:i.shared}))}export{r as a,c as b};
56
- //# sourceMappingURL=chunk-Q2ALKKSE.js.map
56
+ //# sourceMappingURL=chunk-OCQN6WF4.js.map
@@ -1,4 +1,4 @@
1
- import{a as s}from"./chunk-MO65UK5V.js";function a(e,d){let i=s(e,d);return i?e.all(`SELECT DISTINCT d2.relative_path
1
+ import{a as s}from"./chunk-55ZJ2FCW.js";function a(e,d){let i=s(e,d);return i?e.all(`SELECT DISTINCT d2.relative_path
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d1 ON c.document_id = d1.id
@@ -30,4 +30,4 @@ import{a as s}from"./chunk-MO65UK5V.js";function a(e,d){let i=s(e,d);return i?e.
30
30
  WHERE d2.relative_path = ?
31
31
  AND d1.relative_path != ?
32
32
  ORDER BY d1.relative_path`,i,i).filter(t=>!e.isIgnored(t.relative_path)).map(t=>({relativePath:t.relative_path})):[]}export{a,r as b};
33
- //# sourceMappingURL=chunk-ERRUE5G4.js.map
33
+ //# sourceMappingURL=chunk-PQTGBYXV.js.map
@@ -1,4 +1,4 @@
1
- import{F as y,G as S,o as E,p as I,r as L,s as $,t as v}from"./chunk-QFZE73XF.js";function ne(e,t){let n=K(e,t.trim());if(n)return n;let s=B(e,t);if(s)return s;let a=F(e,t);return a||W(e,t)}function F(e,t){let n=C(t),s=w(n);if(!s)return null;let a=`%${s.path}%`,i=s.leaf,r=k(e,a,i,n)[0];return r?y(e,r):null}function k(e,t,n,s){let a=M([],[...J(e,t,n),...T(e,t,n)]).filter(i=>!e.isIgnored(i.relative_path)).filter(i=>_(i,s)>1);return a.sort((i,o)=>_(o,s)-_(i,s)||i.end_line-i.start_line-(o.end_line-o.start_line)||i.start_line-o.start_line||i.symbol.localeCompare(o.symbol)),a}function J(e,t,n){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.end_line, d.relative_path, gs.display_name, gs.documentation
1
+ import{H as y,I as S,q as E,r as I,t as L,u as $,v}from"./chunk-KYGNCIJ6.js";function ne(e,t){let n=K(e,t.trim());if(n)return n;let s=B(e,t);if(s)return s;let a=F(e,t);return a||W(e,t)}function F(e,t){let n=C(t),s=w(n);if(!s)return null;let a=`%${s.path}%`,i=s.leaf,r=k(e,a,i,n)[0];return r?y(e,r):null}function k(e,t,n,s){let a=M([],[...J(e,t,n),...T(e,t,n)]).filter(i=>!e.isIgnored(i.relative_path)).filter(i=>_(i,s)>1);return a.sort((i,o)=>_(o,s)-_(i,s)||i.end_line-i.start_line-(o.end_line-o.start_line)||i.start_line-o.start_line||i.symbol.localeCompare(o.symbol)),a}function J(e,t,n){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.end_line, d.relative_path, gs.display_name, gs.documentation
2
2
  FROM global_symbols gs
3
3
  JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
4
4
  JOIN documents d ON der.document_id = d.id
@@ -111,4 +111,4 @@ import{F as y,G as S,o as E,p as I,r as L,s as $,t as v}from"./chunk-QFZE73XF.js
111
111
  ${e.pathExclusionsFor("d")}
112
112
  GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
113
113
  LIMIT 200`,...s);return M(a,i)}function M(e,t){let n=new Map;for(let s of t)e.length>0&&!G(s)||n.set(s.id,s);for(let s of e)n.set(s.id,s);return[...n.values()]}function G(e){if(S(e.symbol)!==null)return!1;let n=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(n)}function U(e,t,n,s){let a=t.trim(),i=n,o=i.replace(/\(\)$/,""),r=t.toLowerCase(),d=n.toLowerCase(),g=d.replace(/\(\)$/,""),D=e.symbol,R=E(e.symbol),p=I(e.symbol),Q=e.display_name??"",f=e.symbol.toLowerCase(),c=R.toLowerCase(),m=p.toLowerCase(),O=Q.toLowerCase(),u=e.relative_path.toLowerCase(),A=/[/:.]/.test(n),N=w(n),b=N?.leaf.toLowerCase(),l=0;return(D===a||D===i)&&(l+=1150),(R===a||R===i)&&(l+=1100),Q===o&&(l+=1180),p===o&&(l+=1160),(`${p}()`===a||`${p}()`===i)&&(l+=955),(f===r||f===d)&&(l+=1e3),(c===r||c===d)&&(l+=950),(u===r||u===d)&&(l+=925),(u.endsWith(`/${d}`)||u.endsWith(`/${r}`))&&(l+=875),O===g&&(l+=850),m===g&&(l+=825),(`${m}()`===r||`${m}()`===d)&&(l+=820),(c.endsWith(`:${d}`)||c.endsWith(`:${g}`)||c.endsWith(`:${g}()`))&&(l+=800),f.includes(d)&&(l+=120),c.includes(d)&&(l+=140),u.includes(d)&&(l+=140),O.includes(d)&&(l+=110),s.every(x=>{let h=x.toLowerCase();return f.includes(h)||c.includes(h)||u.includes(h)||O.includes(h)})&&(l+=100+s.length*15),N&&u.includes(N.path.toLowerCase())&&(l+=360,b&&(m===b||`${m}()`===b||`${m}()`==`${b}()`)&&(l+=700),L(e.symbol)&&(l+=180)),$(e.symbol)&&m===g&&(l+=60),!A&&v(e.symbol)&&(l-=160),l-=Math.min(50,Math.max(0,e.end_line-e.start_line)),l}function w(e){let t=e.trim().replace(/\\/g,"/"),n=t.lastIndexOf("/");if(n<=0||n===t.length-1)return null;let s=t.slice(n+1).replace(/\(\)$/,"");return!s||s.includes(".")?null:{path:t.slice(0,n),leaf:s}}function C(e){return e.trim().replace(/\(\)$/,"").replace(/\(.*$/,"")}function j(e){let t=C(e),n=t.split(/[^A-Za-z0-9_]+/).map(s=>s.trim()).filter(s=>s.length>0);return n.length>0?[...new Set(n)]:[t]}function q(e,t,n){let s=t.trim(),a=e.filter(i=>{let o=E(i.symbol),r=(i.display_name??"").trim();return i.symbol===s||o===s||o===n||r===s||r===n||`${r}()`===s||_(i,n)>1||i.relative_path===s});return a.length===0?null:(a.sort((i,o)=>_(o,n)-_(i,n)||i.end_line-i.start_line-(o.end_line-o.start_line)||i.relative_path.localeCompare(o.relative_path)||i.symbol.localeCompare(o.symbol)),a[0]??null)}function _(e,t){let n=w(t);if(!n)return 0;let s=e.relative_path.toLowerCase(),a=I(e.symbol).toLowerCase(),i=n.path.toLowerCase(),o=n.leaf.toLowerCase();return s.includes(i)?a!==o?1:L(e.symbol)?S(e.symbol)===null?5:4:S(e.symbol)===null?3:2:0}export{ne as a,K as b,te as c};
114
- //# sourceMappingURL=chunk-ZHHMG4UC.js.map
114
+ //# sourceMappingURL=chunk-QYWGC7JV.js.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-MO65UK5V.js";import{D as u,x as f}from"./chunk-QFZE73XF.js";function S(a,b){let y=p(a,b),o=u(a,y,{sort:!0});if(o.length===0)return[];let i=o.map(e=>({symbol:e.symbol,shortName:e.shortName,startLine:e.startLine,endLine:e.endLine,children:[]})),s=new Map;for(let e of i)s.set(e.symbol,e);let m=[];for(let e=0;e<o.length;e++){let r=o[e],n=i[e];if(r.enclosingSymbol&&s.has(r.enclosingSymbol)){s.get(r.enclosingSymbol).children.push(n);continue}let l=null,c=1/0;for(let t of i)if(t!==n&&t.startLine<=n.startLine&&t.endLine>=n.endLine){if(t.startLine===n.startLine&&t.endLine===n.endLine&&!f(t.symbol,n.symbol))continue;let d=t.endLine-t.startLine;d<c&&(c=d,l=t)}l?l.children.push(n):m.push(n)}return m}export{S as a};
2
- //# sourceMappingURL=chunk-TLRA5TR6.js.map
1
+ import{b as p}from"./chunk-55ZJ2FCW.js";import{F as u,z as f}from"./chunk-KYGNCIJ6.js";function S(a,b){let y=p(a,b),o=u(a,y,{sort:!0});if(o.length===0)return[];let i=o.map(e=>({symbol:e.symbol,shortName:e.shortName,startLine:e.startLine,endLine:e.endLine,children:[]})),s=new Map;for(let e of i)s.set(e.symbol,e);let m=[];for(let e=0;e<o.length;e++){let r=o[e],n=i[e];if(r.enclosingSymbol&&s.has(r.enclosingSymbol)){s.get(r.enclosingSymbol).children.push(n);continue}let l=null,c=1/0;for(let t of i)if(t!==n&&t.startLine<=n.startLine&&t.endLine>=n.endLine){if(t.startLine===n.startLine&&t.endLine===n.endLine&&!f(t.symbol,n.symbol))continue;let d=t.endLine-t.startLine;d<c&&(c=d,l=t)}l?l.children.push(n):m.push(n)}return m}export{S as a};
2
+ //# sourceMappingURL=chunk-R373SHXM.js.map
@@ -1,4 +1,4 @@
1
- import{b as m}from"./chunk-MO65UK5V.js";import{D as o}from"./chunk-QFZE73XF.js";function y(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
1
+ import{b as m}from"./chunk-55ZJ2FCW.js";import{F as o}from"./chunk-KYGNCIJ6.js";function y(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
2
2
  WHERE relative_path IN (${d})
3
3
  ORDER BY relative_path`,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e)),a=o(t,i,{onlyDocumented:!0,sort:!0}).map(({relativePath:e,...c})=>c),n=t.all(`SELECT DISTINCT d2.relative_path
4
4
  FROM mentions m
@@ -32,4 +32,4 @@ import{b as m}from"./chunk-MO65UK5V.js";import{D as o}from"./chunk-QFZE73XF.js";
32
32
  WHERE d2.relative_path IN (${d})
33
33
  AND d1.relative_path NOT IN (${d})
34
34
  ORDER BY d1.relative_path`,...s,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e));return{files:i,symbols:a,dependsOn:n,dependedOnBy:r}}export{y as a};
35
- //# sourceMappingURL=chunk-MXWC53GJ.js.map
35
+ //# sourceMappingURL=chunk-RRWPHKZA.js.map
@@ -1,2 +1,2 @@
1
- import{c as S}from"./chunk-VEXS3I3N.js";import{h as c,i as y,j as g}from"./chunk-3PVIYZ74.js";import{a}from"./chunk-ZHHMG4UC.js";import{o as r}from"./chunk-QFZE73XF.js";function v(l,i){let o=a(l,i);if(!o)return null;let n=[{file:o.relativePath,line:o.startLine}],t=S(l,o),s=(t.length>0?t:g(l,o)).filter(e=>!l.isIgnored(e.file)).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{producers:u,consumers:b}=p(l,o,s);return{symbol:o.symbol,shortName:r(o.symbol),relativePath:o.relativePath,definitionSites:n.filter(e=>!l.isIgnored(e.file)),usageSites:s,producers:u.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),consumers:b.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function p(l,i,o){let n=m(c(l,i,{limit:30}).map(s=>({symbol:s.symbol,file:s.file}))),t=m(y(l,i,{limit:30})),f=t.length>0?t:m(o.map(s=>({symbol:s.enclosingSymbol==="(top-level)"?s.file:s.enclosingSymbol,file:s.file})));return{producers:n,consumers:f}}function m(l){let i=new Set,o=[];for(let n of l){let t=`${n.symbol}|${n.file}`;i.has(t)||(i.add(t),o.push(n))}return o}export{v as a};
2
- //# sourceMappingURL=chunk-6GPFHZP3.js.map
1
+ import{c as S}from"./chunk-7EQ4J66C.js";import{j as c,k as y,l as g}from"./chunk-GS55K4WJ.js";import{a}from"./chunk-QYWGC7JV.js";import{q as r}from"./chunk-KYGNCIJ6.js";function v(l,i){let o=a(l,i);if(!o)return null;let n=[{file:o.relativePath,line:o.startLine}],t=S(l,o),s=(t.length>0?t:g(l,o)).filter(e=>!l.isIgnored(e.file)).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{producers:u,consumers:b}=p(l,o,s);return{symbol:o.symbol,shortName:r(o.symbol),relativePath:o.relativePath,definitionSites:n.filter(e=>!l.isIgnored(e.file)),usageSites:s,producers:u.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),consumers:b.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function p(l,i,o){let n=m(c(l,i,{limit:30}).map(s=>({symbol:s.symbol,file:s.file}))),t=m(y(l,i,{limit:30})),f=t.length>0?t:m(o.map(s=>({symbol:s.enclosingSymbol==="(top-level)"?s.file:s.enclosingSymbol,file:s.file})));return{producers:n,consumers:f}}function m(l){let i=new Set,o=[];for(let n of l){let t=`${n.symbol}|${n.file}`;i.has(t)||(i.add(t),o.push(n))}return o}export{v as a};
2
+ //# sourceMappingURL=chunk-RUAJV3TN.js.map
@@ -1,7 +1,7 @@
1
- import{a as m}from"./chunk-UAPNU7UP.js";import{a as l}from"./chunk-ZHHMG4UC.js";import{o as a}from"./chunk-QFZE73XF.js";import{readFileSync as f}from"fs";import{join as u}from"path";function I(e,n){let t=l(e,n);if(!t)return null;let i=new m(e),c=S(h(e,t.relativePath,t.startLine,t.endLine),p(e,t.relativePath)),o=t.endLine-t.startLine+1,r=i.calleeMap([t],{additive:!0}).get(t.symbolId)??[],b=new Set(r.map(g=>g.symbol));return{symbol:t.symbol,shortName:a(t.symbol),relativePath:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:o,branches:c,cyclomaticEstimate:c+1,calleeCount:b.size,fanIn:y(e,t.symbolId),fanOut:d(r,t.relativePath)}}function p(e,n){return e.get("SELECT language FROM documents WHERE relative_path = ?",n)?.language??"unknown"}function h(e,n,t,i){try{return f(u(e.config.projectRoot,n),"utf-8").split(`
1
+ import{a as m}from"./chunk-SVUVC5VS.js";import{a as l}from"./chunk-QYWGC7JV.js";import{q as a}from"./chunk-KYGNCIJ6.js";import{readFileSync as f}from"fs";import{join as u}from"path";function I(e,n){let t=l(e,n);if(!t)return null;let i=new m(e),c=S(h(e,t.relativePath,t.startLine,t.endLine),p(e,t.relativePath)),o=t.endLine-t.startLine+1,r=i.calleeMap([t],{additive:!0}).get(t.symbolId)??[],b=new Set(r.map(g=>g.symbol));return{symbol:t.symbol,shortName:a(t.symbol),relativePath:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:o,branches:c,cyclomaticEstimate:c+1,calleeCount:b.size,fanIn:y(e,t.symbolId),fanOut:d(r,t.relativePath)}}function p(e,n){return e.get("SELECT language FROM documents WHERE relative_path = ?",n)?.language??"unknown"}function h(e,n,t,i){try{return f(u(e.config.projectRoot,n),"utf-8").split(`
2
2
  `).slice(t,i+1).join(`
3
3
  `)}catch{return""}}function y(e,n){return e.get(`SELECT COUNT(DISTINCT c.document_id) AS c
4
4
  FROM mentions m
5
5
  JOIN chunks c ON m.chunk_id = c.id
6
6
  WHERE m.symbol_id = ? AND m.role != 1`,n)?.c??0}function d(e,n){return new Set(e.filter(t=>t.file!==n).map(t=>t.symbol)).size}function S(e,n){let t=P(e),i=0,c=[/\bif\b/g,/\belse\s+if\b/g,/\belse\b/g,/\bfor\b/g,/\bwhile\b/g,/\bswitch\b/g,/\bcase\b/g,/\bcatch\b/g,/\?\s*[^?]/g,/&&/g,/\|\|/g];for(let o of c){let s=t.match(o);s&&(i+=s.length)}if(n==="python"){let o=[/\belif\b/g,/\bexcept\b/g,/\bfinally\b/g];for(let s of o){let r=t.match(s);r&&(i+=r.length)}}else if(n==="rust"){let o=[/\bmatch\b/g,/=>/g,/\bloop\b/g];for(let s of o){let r=t.match(s);r&&(i+=r.length)}}else if(n==="ruby"){let o=[/\belsif\b/g,/\bunless\b/g,/\brescue\b/g,/\bwhen\b/g];for(let s of o){let r=t.match(s);r&&(i+=r.length)}}else if(n==="go"){let o=[/\bselect\b/g,/\bdefer\b/g];for(let s of o){let r=t.match(s);r&&(i+=r.length)}}return i}function P(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*/g,"").replace(/#.*/g,"").replace(/"(?:[^"\\]|\\.)*"/g,'""').replace(/'(?:[^'\\]|\\.)*'/g,"''").replace(/`(?:[^`\\]|\\.)*`/g,"``")}export{I as a};
7
- //# sourceMappingURL=chunk-Q4R2IYA3.js.map
7
+ //# sourceMappingURL=chunk-S57GUI2T.js.map