@syke1/mcp-server 1.5.6 → 1.6.1
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.
- package/LICENSE +13 -57
- package/README.md +18 -21
- package/dist/ai/analyzer.js +1 -112
- package/dist/ai/context-extractor.js +1 -224
- package/dist/ai/provider.js +1 -186
- package/dist/ai/realtime-analyzer.js +1 -253
- package/dist/config.js +1 -121
- package/dist/git/change-coupling.js +1 -250
- package/dist/graph/incremental.js +1 -319
- package/dist/graph/memo-cache.js +1 -176
- package/dist/graph/scc.js +1 -206
- package/dist/graph.js +1 -137
- package/dist/index.js +1 -852
- package/dist/license/validator.d.ts +3 -0
- package/dist/license/validator.js +1 -328
- package/dist/scoring/pagerank.js +1 -221
- package/dist/scoring/risk-scorer.js +1 -623
- package/dist/tools/analyze-impact.js +1 -378
- package/dist/tools/gate-build.js +1 -409
- package/dist/watcher/file-cache.js +1 -281
- package/dist/web/server.js +1 -925
- package/package.json +53 -68
package/dist/scoring/pagerank.js
CHANGED
|
@@ -1,221 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* PageRank scoring for SYKE dependency graphs.
|
|
4
|
-
*
|
|
5
|
-
* Uses the Power Iteration algorithm to compute recursive importance scores.
|
|
6
|
-
* A file imported by many important files ranks higher than one imported by
|
|
7
|
-
* many leaf files. This provides a more nuanced importance signal than
|
|
8
|
-
* simple reverse dependent count (fan-in).
|
|
9
|
-
*
|
|
10
|
-
* In dependency graph terms:
|
|
11
|
-
* - If A imports B, the forward edge is A -> B.
|
|
12
|
-
* - B receives importance from A (B is important because A depends on it).
|
|
13
|
-
* - So we iterate over graph.reverse to find incoming "importance links".
|
|
14
|
-
*
|
|
15
|
-
* Dangling nodes (files that import nothing) distribute their rank
|
|
16
|
-
* equally to all nodes, preventing rank from leaking out of the graph.
|
|
17
|
-
*/
|
|
18
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
22
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23
|
-
}
|
|
24
|
-
Object.defineProperty(o, k2, desc);
|
|
25
|
-
}) : (function(o, m, k, k2) {
|
|
26
|
-
if (k2 === undefined) k2 = k;
|
|
27
|
-
o[k2] = m[k];
|
|
28
|
-
}));
|
|
29
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
30
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
31
|
-
}) : function(o, v) {
|
|
32
|
-
o["default"] = v;
|
|
33
|
-
});
|
|
34
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
35
|
-
var ownKeys = function(o) {
|
|
36
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
37
|
-
var ar = [];
|
|
38
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
39
|
-
return ar;
|
|
40
|
-
};
|
|
41
|
-
return ownKeys(o);
|
|
42
|
-
};
|
|
43
|
-
return function (mod) {
|
|
44
|
-
if (mod && mod.__esModule) return mod;
|
|
45
|
-
var result = {};
|
|
46
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
47
|
-
__setModuleDefault(result, mod);
|
|
48
|
-
return result;
|
|
49
|
-
};
|
|
50
|
-
})();
|
|
51
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
-
exports.invalidatePageRank = invalidatePageRank;
|
|
53
|
-
exports.computePageRank = computePageRank;
|
|
54
|
-
exports.getFileRank = getFileRank;
|
|
55
|
-
const path = __importStar(require("path"));
|
|
56
|
-
// ── Module-level Cache ──
|
|
57
|
-
let cachedResult = null;
|
|
58
|
-
/**
|
|
59
|
-
* Invalidate the cached PageRank result.
|
|
60
|
-
* Call this when the dependency graph is rebuilt.
|
|
61
|
-
*/
|
|
62
|
-
function invalidatePageRank() {
|
|
63
|
-
cachedResult = null;
|
|
64
|
-
}
|
|
65
|
-
// ── Core Algorithm ──
|
|
66
|
-
/**
|
|
67
|
-
* Compute PageRank scores for all files in the dependency graph
|
|
68
|
-
* using the Power Iteration method.
|
|
69
|
-
*
|
|
70
|
-
* The algorithm:
|
|
71
|
-
* 1. Initialize rank[i] = 1/N for all N files.
|
|
72
|
-
* 2. Repeat until convergence or maxIterations:
|
|
73
|
-
* For each file i:
|
|
74
|
-
* newRank[i] = (1 - d) / N + d * SUM(rank[j] / outDegree[j])
|
|
75
|
-
* for all j that link to i (j imports i -> j is in reverse[i])
|
|
76
|
-
* Handle dangling nodes: files with outDegree=0 distribute rank to all.
|
|
77
|
-
* If max|newRank - rank| < tolerance: break
|
|
78
|
-
* rank = newRank
|
|
79
|
-
*
|
|
80
|
-
* Direction clarification:
|
|
81
|
-
* - forward[A] = [B] means "A imports B" (A -> B).
|
|
82
|
-
* - reverse[B] = [A] means "A imports B" — A gives importance to B.
|
|
83
|
-
* - outDegree of A = forward[A].length (how many files A imports).
|
|
84
|
-
* - When computing rank for B, sum over reverse[B]: each file A that
|
|
85
|
-
* imports B contributes rank[A] / outDegree[A] to B.
|
|
86
|
-
*/
|
|
87
|
-
function computePageRank(graph, options) {
|
|
88
|
-
// Return cached result if available
|
|
89
|
-
if (cachedResult) {
|
|
90
|
-
return cachedResult;
|
|
91
|
-
}
|
|
92
|
-
const d = options?.dampingFactor ?? 0.85;
|
|
93
|
-
const maxIter = options?.maxIterations ?? 100;
|
|
94
|
-
const tol = options?.tolerance ?? 1e-6;
|
|
95
|
-
const files = [...graph.files];
|
|
96
|
-
const N = files.length;
|
|
97
|
-
// Handle empty graph
|
|
98
|
-
if (N === 0) {
|
|
99
|
-
const result = {
|
|
100
|
-
scores: new Map(),
|
|
101
|
-
ranked: [],
|
|
102
|
-
iterations: 0,
|
|
103
|
-
computedAt: Date.now(),
|
|
104
|
-
};
|
|
105
|
-
cachedResult = result;
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
108
|
-
// Build index maps for fast array-based iteration
|
|
109
|
-
const fileToIdx = new Map();
|
|
110
|
-
for (let i = 0; i < N; i++) {
|
|
111
|
-
fileToIdx.set(files[i], i);
|
|
112
|
-
}
|
|
113
|
-
// Compute out-degree for each file (number of files it imports)
|
|
114
|
-
const outDegree = new Float64Array(N);
|
|
115
|
-
for (let i = 0; i < N; i++) {
|
|
116
|
-
const deps = graph.forward.get(files[i]);
|
|
117
|
-
outDegree[i] = deps ? deps.length : 0;
|
|
118
|
-
}
|
|
119
|
-
// Identify dangling nodes (files with no outgoing edges / no imports)
|
|
120
|
-
const danglingNodes = [];
|
|
121
|
-
for (let i = 0; i < N; i++) {
|
|
122
|
-
if (outDegree[i] === 0) {
|
|
123
|
-
danglingNodes.push(i);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
// Build reverse adjacency list as index arrays for performance
|
|
127
|
-
// reverseAdj[i] = list of indices j where file j imports file i
|
|
128
|
-
const reverseAdj = new Array(N);
|
|
129
|
-
for (let i = 0; i < N; i++) {
|
|
130
|
-
reverseAdj[i] = [];
|
|
131
|
-
}
|
|
132
|
-
for (const [target, sources] of graph.reverse) {
|
|
133
|
-
const targetIdx = fileToIdx.get(target);
|
|
134
|
-
if (targetIdx === undefined)
|
|
135
|
-
continue;
|
|
136
|
-
for (const source of sources) {
|
|
137
|
-
const sourceIdx = fileToIdx.get(source);
|
|
138
|
-
if (sourceIdx !== undefined) {
|
|
139
|
-
reverseAdj[targetIdx].push(sourceIdx);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
// Initialize ranks
|
|
144
|
-
let rank = new Float64Array(N);
|
|
145
|
-
const initRank = 1.0 / N;
|
|
146
|
-
for (let i = 0; i < N; i++) {
|
|
147
|
-
rank[i] = initRank;
|
|
148
|
-
}
|
|
149
|
-
let iterations = 0;
|
|
150
|
-
const baseTeleport = (1.0 - d) / N;
|
|
151
|
-
for (let iter = 0; iter < maxIter; iter++) {
|
|
152
|
-
iterations = iter + 1;
|
|
153
|
-
// Compute dangling rank sum: total rank held by dangling nodes
|
|
154
|
-
let danglingSum = 0;
|
|
155
|
-
for (const idx of danglingNodes) {
|
|
156
|
-
danglingSum += rank[idx];
|
|
157
|
-
}
|
|
158
|
-
// Each node gets an equal share of the dangling rank (redistributed)
|
|
159
|
-
const danglingContribution = d * danglingSum / N;
|
|
160
|
-
const newRank = new Float64Array(N);
|
|
161
|
-
for (let i = 0; i < N; i++) {
|
|
162
|
-
// Sum contributions from all files that import file i
|
|
163
|
-
let incomingSum = 0;
|
|
164
|
-
for (const j of reverseAdj[i]) {
|
|
165
|
-
incomingSum += rank[j] / outDegree[j];
|
|
166
|
-
}
|
|
167
|
-
newRank[i] = baseTeleport + danglingContribution + d * incomingSum;
|
|
168
|
-
}
|
|
169
|
-
// Check convergence: max absolute difference
|
|
170
|
-
let maxDiff = 0;
|
|
171
|
-
for (let i = 0; i < N; i++) {
|
|
172
|
-
const diff = Math.abs(newRank[i] - rank[i]);
|
|
173
|
-
if (diff > maxDiff)
|
|
174
|
-
maxDiff = diff;
|
|
175
|
-
}
|
|
176
|
-
rank = newRank;
|
|
177
|
-
if (maxDiff < tol) {
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
// Build scores map
|
|
182
|
-
const scores = new Map();
|
|
183
|
-
for (let i = 0; i < N; i++) {
|
|
184
|
-
scores.set(files[i], rank[i]);
|
|
185
|
-
}
|
|
186
|
-
// Build sorted ranked list
|
|
187
|
-
const indexedScores = [];
|
|
188
|
-
for (let i = 0; i < N; i++) {
|
|
189
|
-
indexedScores.push({ idx: i, score: rank[i] });
|
|
190
|
-
}
|
|
191
|
-
indexedScores.sort((a, b) => b.score - a.score);
|
|
192
|
-
const ranked = indexedScores.map((entry, position) => ({
|
|
193
|
-
filePath: files[entry.idx],
|
|
194
|
-
relativePath: path.relative(graph.sourceDir, files[entry.idx]).replace(/\\/g, "/"),
|
|
195
|
-
score: entry.score,
|
|
196
|
-
rank: position + 1,
|
|
197
|
-
percentile: Math.round(((N - 1 - position) / Math.max(1, N - 1)) * 100),
|
|
198
|
-
}));
|
|
199
|
-
const result = {
|
|
200
|
-
scores,
|
|
201
|
-
ranked,
|
|
202
|
-
iterations,
|
|
203
|
-
computedAt: Date.now(),
|
|
204
|
-
};
|
|
205
|
-
cachedResult = result;
|
|
206
|
-
console.error(`[syke:pagerank] Computed PageRank for ${N} files in ${iterations} iterations`);
|
|
207
|
-
return result;
|
|
208
|
-
}
|
|
209
|
-
// ── Lookup ──
|
|
210
|
-
/**
|
|
211
|
-
* O(1) lookup of a file's PageRank data from a precomputed result.
|
|
212
|
-
* Returns null if the file is not in the result.
|
|
213
|
-
*/
|
|
214
|
-
function getFileRank(filePath, result) {
|
|
215
|
-
const score = result.scores.get(filePath);
|
|
216
|
-
if (score === undefined)
|
|
217
|
-
return null;
|
|
218
|
-
// Find the ranked entry (scores map guarantees it exists in ranked array)
|
|
219
|
-
const entry = result.ranked.find(r => r.filePath === filePath);
|
|
220
|
-
return entry || null;
|
|
221
|
-
}
|
|
1
|
+
'use strict';const _0x31840e=_0x1844;(function(_0x1eb77e,_0x4cc194){const _0x4f2136={_0xdc54a:0xae,_0x4dfbc5:0x92,_0xd89b65:0xb5,_0x663a7a:0x90,_0x2ee6ca:0x9b,_0x422284:0x8b,_0x5c00ef:0xb7},_0x338a51=_0x1844,_0x5ec7cf=_0x1eb77e();while(!![]){try{const _0x26566d=parseInt(_0x338a51(_0x4f2136._0xdc54a))/0x1*(parseInt(_0x338a51(_0x4f2136._0x4dfbc5))/0x2)+parseInt(_0x338a51(_0x4f2136._0xd89b65))/0x3*(-parseInt(_0x338a51(0xb0))/0x4)+-parseInt(_0x338a51(_0x4f2136._0x663a7a))/0x5+parseInt(_0x338a51(0xa3))/0x6+parseInt(_0x338a51(0x9d))/0x7*(-parseInt(_0x338a51(_0x4f2136._0x2ee6ca))/0x8)+-parseInt(_0x338a51(_0x4f2136._0x422284))/0x9+parseInt(_0x338a51(_0x4f2136._0x5c00ef))/0xa*(parseInt(_0x338a51(0xb3))/0xb);if(_0x26566d===_0x4cc194)break;else _0x5ec7cf['push'](_0x5ec7cf['shift']());}catch(_0x5bc011){_0x5ec7cf['push'](_0x5ec7cf['shift']());}}}(_0x4186,0x1c823));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x2f4960,_0x2b7e42,_0x1c7502,_0x1ee1e2){const _0x482ec5={_0x3170dd:0x94,_0xc26808:0xa7,_0x4ef5fa:0x8f,_0xec4979:0xa7,_0x15da04:0x8c,_0x206591:0x93},_0x579079=_0x1844,_0x515e2c={};_0x515e2c[_0x579079(_0x482ec5._0x3170dd)]=function(_0xadb8af,_0x11bf16){return _0xadb8af===_0x11bf16;},_0x515e2c[_0x579079(0x8d)]=function(_0x5121b3,_0x5b5fa6){return _0x5121b3 in _0x5b5fa6;},_0x515e2c[_0x579079(_0x482ec5._0xc26808)]=_0x579079(_0x482ec5._0x4ef5fa);const _0x3af920=_0x515e2c;if(_0x3af920[_0x579079(_0x482ec5._0x3170dd)](_0x1ee1e2,undefined))_0x1ee1e2=_0x1c7502;var _0x2ae5ea=Object['getOwnPropertyDescriptor'](_0x2b7e42,_0x1c7502);if(!_0x2ae5ea||(_0x3af920['PiLbb'](_0x3af920[_0x579079(_0x482ec5._0xec4979)],_0x2ae5ea)?!_0x2b7e42[_0x579079(0xb2)]:_0x2ae5ea[_0x579079(_0x482ec5._0x15da04)]||_0x2ae5ea[_0x579079(_0x482ec5._0x206591)])){const _0x45aae7={};_0x45aae7['enumerable']=!![],_0x45aae7[_0x579079(_0x482ec5._0x4ef5fa)]=function(){return _0x2b7e42[_0x1c7502];},_0x2ae5ea=_0x45aae7;}Object[_0x579079(0x9f)](_0x2f4960,_0x1ee1e2,_0x2ae5ea);}:function(_0x5692b8,_0x4db799,_0x2613da,_0x19f0ac){const _0x389af5={_0x4293ea:0x89},_0x4f7061=_0x1844,_0x21b361={};_0x21b361[_0x4f7061(0x89)]=function(_0x54d1c2,_0x1596c8){return _0x54d1c2===_0x1596c8;};const _0x13bca6=_0x21b361;if(_0x13bca6[_0x4f7061(_0x389af5._0x4293ea)](_0x19f0ac,undefined))_0x19f0ac=_0x2613da;_0x5692b8[_0x19f0ac]=_0x4db799[_0x2613da];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x2115ba,_0x5e442d){const _0x217f0b={_0xe7d744:0x9a},_0x360dd9=_0x1844,_0xcff6e9={};_0xcff6e9['ISTqs']='default';const _0xb67705=_0xcff6e9,_0x511ae9={};_0x511ae9['enumerable']=!![],_0x511ae9[_0x360dd9(_0x217f0b._0xe7d744)]=_0x5e442d,Object[_0x360dd9(0x9f)](_0x2115ba,_0xb67705['ISTqs'],_0x511ae9);}:function(_0x51873e,_0x419e80){const _0x53219d={_0x544792:0x86},_0x1589dc=_0x1844,_0x477ffd={};_0x477ffd[_0x1589dc(0x86)]=_0x1589dc(0xad);const _0x25f325=_0x477ffd;_0x51873e[_0x25f325[_0x1589dc(_0x53219d._0x544792)]]=_0x419e80;}),__importStar=this&&this[_0x31840e(0xa2)]||(function(){const _0x5cf7cc={_0x26eea0:0x88,_0x7e6db0:0xb2},_0x16d26f={_0x26ba21:0xb6},_0xe34067={'AEuBv':function(_0x31825a,_0x25fa6f,_0x42fa47){return _0x31825a(_0x25fa6f,_0x42fa47);},'lgJCv':function(_0x4ef67e,_0x591f8a){return _0x4ef67e(_0x591f8a);}};var _0x2ac3a7=function(_0x2480ea){const _0x17be47=_0x1844;return _0x2ac3a7=Object[_0x17be47(0x95)]||function(_0x551abb){const _0x25f7cc=_0x17be47;var _0x1ad222=[];for(var _0x349810 in _0x551abb)if(Object[_0x25f7cc(0xaf)][_0x25f7cc(_0x16d26f._0x26ba21)]['call'](_0x551abb,_0x349810))_0x1ad222[_0x1ad222[_0x25f7cc(0x8e)]]=_0x349810;return _0x1ad222;},_0x2ac3a7(_0x2480ea);};return function(_0x10d940){const _0x5e13fb=_0x1844,_0x57c6ba=_0x5e13fb(_0x5cf7cc._0x26eea0)[_0x5e13fb(0xbc)]('|');let _0x494811=0x0;while(!![]){switch(_0x57c6ba[_0x494811++]){case'0':if(_0x10d940&&_0x10d940[_0x5e13fb(_0x5cf7cc._0x7e6db0)])return _0x10d940;continue;case'1':_0xe34067['AEuBv'](__setModuleDefault,_0x250f73,_0x10d940);continue;case'2':if(_0x10d940!=null){for(var _0x4c7c49=_0xe34067['lgJCv'](_0x2ac3a7,_0x10d940),_0x9fa0cb=0x0;_0x9fa0cb<_0x4c7c49['length'];_0x9fa0cb++)if(_0x4c7c49[_0x9fa0cb]!==_0x5e13fb(0xad))__createBinding(_0x250f73,_0x10d940,_0x4c7c49[_0x9fa0cb]);}continue;case'3':return _0x250f73;case'4':var _0x250f73={};continue;}break;}};}());function _0x1844(_0x267f2c,_0x1155be){_0x267f2c=_0x267f2c-0x85;const _0x4186ea=_0x4186();let _0x184470=_0x4186ea[_0x267f2c];if(_0x1844['yrUoFZ']===undefined){var _0x2c2fa7=function(_0x1aa710){const _0x20539a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x14cf69='',_0x394f12='';for(let _0x50d783=0x0,_0x5b43d0,_0x15ccc5,_0x4b17cb=0x0;_0x15ccc5=_0x1aa710['charAt'](_0x4b17cb++);~_0x15ccc5&&(_0x5b43d0=_0x50d783%0x4?_0x5b43d0*0x40+_0x15ccc5:_0x15ccc5,_0x50d783++%0x4)?_0x14cf69+=String['fromCharCode'](0xff&_0x5b43d0>>(-0x2*_0x50d783&0x6)):0x0){_0x15ccc5=_0x20539a['indexOf'](_0x15ccc5);}for(let _0x425075=0x0,_0x12e0b5=_0x14cf69['length'];_0x425075<_0x12e0b5;_0x425075++){_0x394f12+='%'+('00'+_0x14cf69['charCodeAt'](_0x425075)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x394f12);};_0x1844['dUceXW']=_0x2c2fa7,_0x1844['MGKaGr']={},_0x1844['yrUoFZ']=!![];}const _0x48b0e9=_0x4186ea[0x0],_0x3eefd1=_0x267f2c+_0x48b0e9,_0x2ece4d=_0x1844['MGKaGr'][_0x3eefd1];return!_0x2ece4d?(_0x184470=_0x1844['dUceXW'](_0x184470),_0x1844['MGKaGr'][_0x3eefd1]=_0x184470):_0x184470=_0x2ece4d,_0x184470;}const _0x87d10f={};_0x87d10f['value']=!![],Object['defineProperty'](exports,_0x31840e(0xb2),_0x87d10f),exports[_0x31840e(0x9e)]=invalidatePageRank,exports['computePageRank']=computePageRank,exports['getFileRank']=getFileRank;const path=__importStar(require(_0x31840e(0xa5)));let cachedResult=null;function _0x4186(){const _0x7ea578=['D3jPDgfIBgu','ugLmyMi','BgvUz3rO','z2v0','ndaWotiWqufmwxD1','igL0zxjHDgLVBNm','mtaYmJjrzKfUCwK','y29UzMLNDxjHyMXL','v1v4t1u','z2v0t3DUuhjVCgvYDhLoyw1LCW','C2nVCMvZ','Cw5xuu4','zgfTCgLUz0zHy3rVCG','EeDmCfu','DMfSDwu','mtC2ntCZnLz0teHhEa','w3n5A2u6CgfNzxjHBMTDienVBxb1DgvKifbHz2vsyw5RigzVCIa','n0rkzeHirq','Aw52ywXPzgf0zvbHz2vsyw5R','zgvMAw5LuhjVCgvYDhK','uw1dqum','Awr4','x19PBxbVCNrtDgfY','ntm2nJiYv2vxC1bd','C2v0','Cgf0Aa','D2rvwxK','DeroCe4','shrcyuG','CMv2zxjZzq','zMLUza','BgzkEuW','zxjYB3i','zgvMyxvSDa','mJnoueTOBNy','ChjVDg90ExbL','oevWyvjoyq','r0DLDNa','x19LC01VzhvSzq','oti4nZndAvHus1m','C2nVCMu','mJC4mdC5CvvjyNPl','AgfZt3DUuhjVCgvYDhK','nZmWy0vZu1vd','zMLSzxm','r3zpt0O','ChvZAa','EfbbtMC','C3bSAxq','Dg9SzxjHBMnL','shnIq3O','zMLSzvbHDgG','mhW0Fdj8mxWZ','Du15rKm','EenbwuW','mtK4mJqZovbswuD3uq'];_0x4186=function(){return _0x7ea578;};return _0x4186();}function invalidatePageRank(){cachedResult=null;}function computePageRank(_0x43359f,_0x1cbad1){const _0x3e41ea={_0x551a70:0x97,_0x5589ac:0xa6,_0x3f2cff:0x98,_0x3197a1:0x8f,_0x530421:0x8e,_0x19f95e:0xba,_0x22f156:0x8f,_0x3a3eb7:0x8a,_0x399dd1:0xb1,_0x261aa8:0xa0,_0x2bc501:0xa4,_0x242081:0xa1,_0x45eab6:0xb4,_0x59dc9c:0xac},_0x5923da=_0x31840e,_0x5b6e5e={};_0x5b6e5e[_0x5923da(_0x3e41ea._0x551a70)]=function(_0x187e7e,_0x1660e6){return _0x187e7e<_0x1660e6;},_0x5b6e5e['xCAYL']=function(_0x38ab1f,_0x10de60){return _0x38ab1f!==_0x10de60;},_0x5b6e5e[_0x5923da(0xb1)]=function(_0x5952f9,_0x4e4f88){return _0x5952f9/_0x4e4f88;},_0x5b6e5e[_0x5923da(0xa0)]=function(_0x334d4b,_0x5afe6a){return _0x334d4b-_0x5afe6a;},_0x5b6e5e['GvOOJ']=function(_0x645b75,_0x7dad8b){return _0x645b75/_0x7dad8b;},_0x5b6e5e['xPANg']=function(_0x2cf5b9,_0x30df8c){return _0x2cf5b9*_0x30df8c;},_0x5b6e5e[_0x5923da(0xab)]=function(_0x1099cd,_0xc4770e){return _0x1099cd/_0xc4770e;},_0x5b6e5e[_0x5923da(_0x3e41ea._0x5589ac)]=function(_0x2c8802,_0xaf1144){return _0x2c8802+_0xaf1144;},_0x5b6e5e['HtBaH']=function(_0x4116ea,_0x450080){return _0x4116ea<_0x450080;};const _0x3a1f50=_0x5b6e5e;if(cachedResult)return cachedResult;const _0x3427a8=_0x1cbad1?.[_0x5923da(_0x3e41ea._0x3f2cff)]??0.85,_0x5ae656=_0x1cbad1?.['maxIterations']??0x64,_0x5bcd89=_0x1cbad1?.[_0x5923da(0x85)]??0.000001,_0x4728bd=[..._0x43359f[_0x5923da(0xb8)]],_0x49814e=_0x4728bd[_0x5923da(0x8e)];if(_0x49814e===0x0){const _0x254779={'scores':new Map(),'ranked':[],'iterations':0x0,'computedAt':Date['now']()};return cachedResult=_0x254779,_0x254779;}const _0x287d06=new Map();for(let _0x58c0f8=0x0;_0x3a1f50['qnWQN'](_0x58c0f8,_0x49814e);_0x58c0f8++){_0x287d06['set'](_0x4728bd[_0x58c0f8],_0x58c0f8);}const _0x520d0d=new Float64Array(_0x49814e);for(let _0x24bbc9=0x0;_0x3a1f50['qnWQN'](_0x24bbc9,_0x49814e);_0x24bbc9++){const _0x117652=_0x43359f['forward'][_0x5923da(_0x3e41ea._0x3197a1)](_0x4728bd[_0x24bbc9]);_0x520d0d[_0x24bbc9]=_0x117652?_0x117652[_0x5923da(_0x3e41ea._0x530421)]:0x0;}const _0x2b63c9=[];for(let _0x23d686=0x0;_0x3a1f50['qnWQN'](_0x23d686,_0x49814e);_0x23d686++){_0x520d0d[_0x23d686]===0x0&&_0x2b63c9[_0x5923da(_0x3e41ea._0x19f95e)](_0x23d686);}const _0x411600=new Array(_0x49814e);for(let _0x17b7a5=0x0;_0x3a1f50[_0x5923da(_0x3e41ea._0x551a70)](_0x17b7a5,_0x49814e);_0x17b7a5++){_0x411600[_0x17b7a5]=[];}for(const [_0x125641,_0x3e53ac]of _0x43359f[_0x5923da(0xa9)]){const _0x1c103d=_0x287d06['get'](_0x125641);if(_0x1c103d===undefined)continue;for(const _0x6667bc of _0x3e53ac){const _0x1b2b2c=_0x287d06[_0x5923da(_0x3e41ea._0x22f156)](_0x6667bc);_0x3a1f50[_0x5923da(_0x3e41ea._0x3a3eb7)](_0x1b2b2c,undefined)&&_0x411600[_0x1c103d]['push'](_0x1b2b2c);}}let _0x53d509=new Float64Array(_0x49814e);const _0x212a97=_0x3a1f50[_0x5923da(_0x3e41ea._0x399dd1)](0x1,_0x49814e);for(let _0x24cb03=0x0;_0x24cb03<_0x49814e;_0x24cb03++){_0x53d509[_0x24cb03]=_0x212a97;}let _0x20f55d=0x0;const _0xf83ddd=_0x3a1f50[_0x5923da(_0x3e41ea._0x261aa8)](0x1,_0x3427a8)/_0x49814e;for(let _0x27fa13=0x0;_0x3a1f50['qnWQN'](_0x27fa13,_0x5ae656);_0x27fa13++){_0x20f55d=_0x27fa13+0x1;let _0x6eba8=0x0;for(const _0x2b9ce3 of _0x2b63c9){_0x6eba8+=_0x53d509[_0x2b9ce3];}const _0x13400a=_0x3a1f50[_0x5923da(0xb9)](_0x3a1f50[_0x5923da(0xbb)](_0x3427a8,_0x6eba8),_0x49814e),_0x270e64=new Float64Array(_0x49814e);for(let _0x1b4b23=0x0;_0x1b4b23<_0x49814e;_0x1b4b23++){let _0x180b9a=0x0;for(const _0x5efdba of _0x411600[_0x1b4b23]){_0x180b9a+=_0x3a1f50['lfJyL'](_0x53d509[_0x5efdba],_0x520d0d[_0x5efdba]);}_0x270e64[_0x1b4b23]=_0x3a1f50['wdUYy'](_0xf83ddd+_0x13400a,_0x3a1f50[_0x5923da(0xbb)](_0x3427a8,_0x180b9a));}let _0x4e1c69=0x0;for(let _0x37cd60=0x0;_0x37cd60<_0x49814e;_0x37cd60++){const _0x400cfe=Math['abs'](_0x3a1f50[_0x5923da(_0x3e41ea._0x261aa8)](_0x270e64[_0x37cd60],_0x53d509[_0x37cd60]));if(_0x400cfe>_0x4e1c69)_0x4e1c69=_0x400cfe;}_0x53d509=_0x270e64;if(_0x4e1c69<_0x5bcd89)break;}const _0x3010c0=new Map();for(let _0x43a45a=0x0;_0x3a1f50['HtBaH'](_0x43a45a,_0x49814e);_0x43a45a++){_0x3010c0[_0x5923da(_0x3e41ea._0x2bc501)](_0x4728bd[_0x43a45a],_0x53d509[_0x43a45a]);}const _0x4d98a5=[];for(let _0x2bf7b2=0x0;_0x3a1f50[_0x5923da(0xa8)](_0x2bf7b2,_0x49814e);_0x2bf7b2++){const _0x4ccc16={};_0x4ccc16[_0x5923da(_0x3e41ea._0x242081)]=_0x2bf7b2,_0x4ccc16[_0x5923da(_0x3e41ea._0x45eab6)]=_0x53d509[_0x2bf7b2],_0x4d98a5['push'](_0x4ccc16);}_0x4d98a5['sort']((_0x35f1e4,_0x45f8fb)=>_0x45f8fb['score']-_0x35f1e4[_0x5923da(0xb4)]);const _0x29e408=_0x4d98a5['map']((_0xf5a528,_0x56a3bb)=>({'filePath':_0x4728bd[_0xf5a528['idx']],'relativePath':path['relative'](_0x43359f['sourceDir'],_0x4728bd[_0xf5a528['idx']])['replace'](/\\/g,'/'),'score':_0xf5a528['score'],'rank':_0x56a3bb+0x1,'percentile':Math['round']((_0x49814e-0x1-_0x56a3bb)/Math['max'](0x1,_0x49814e-0x1)*0x64)})),_0x4a2efb={'scores':_0x3010c0,'ranked':_0x29e408,'iterations':_0x20f55d,'computedAt':Date['now']()};return cachedResult=_0x4a2efb,console[_0x5923da(_0x3e41ea._0x59dc9c)](_0x5923da(0x9c)+_0x49814e+'\x20files\x20in\x20'+_0x20f55d+_0x5923da(0x91)),_0x4a2efb;}function getFileRank(_0x5304bf,_0x3f0ad1){const _0x35ba20={_0x40b92e:0x96},_0x35f264=_0x31840e,_0x54a4c4={};_0x54a4c4[_0x35f264(0x99)]=function(_0x4333a3,_0x3ffa5f){return _0x4333a3===_0x3ffa5f;},_0x54a4c4['RfMRN']=function(_0x477446,_0x389ad5){return _0x477446||_0x389ad5;};const _0x3532d4=_0x54a4c4,_0x45e6a9=_0x3f0ad1[_0x35f264(_0x35ba20._0x40b92e)]['get'](_0x5304bf);if(_0x3532d4['xGLpU'](_0x45e6a9,undefined))return null;const _0x1071b4=_0x3f0ad1['ranked'][_0x35f264(0xaa)](_0x396e79=>_0x396e79[_0x35f264(0x87)]===_0x5304bf);return _0x3532d4['RfMRN'](_0x1071b4,null);}
|