@evomap/evolver-proxy 2.0.0 → 2.0.2
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/dist/lifecycle/claimNudge.js +1 -124
- package/dist/lifecycle/deployGuard.js +1 -53
- package/dist/lifecycle/legacyNodeId.js +1 -178
- package/dist/lifecycle/manager.js +1 -403
- package/dist/llm/bodyCapture.js +1 -293
- package/dist/llm/index.js +1 -3
- package/dist/llm/server.js +1 -379
- package/dist/llm/traceBackfill.js +1 -525
- package/dist/llm/traceConfig.js +1 -44
- package/dist/llm/traceControl.js +1 -85
- package/dist/llm/traceEnvelope.js +1 -286
- package/dist/llm/traceSink.js +1 -278
- package/dist/llm/traceUploadPayload.js +1 -27
- package/dist/llm/upstream.js +1 -514
- package/dist/router/cachePassthrough.js +1 -13
- package/dist/router/features.js +1 -52
- package/dist/router/index.js +1 -6
- package/dist/router/messagesRoute.js +1 -809
- package/dist/router/modelRouter.js +1 -66
- package/dist/router/providerRoutes.js +1 -1579
- package/dist/router/sseScan.js +1 -543
- package/dist/sync/engine.js +1 -696
- package/package.json +3 -3
|
@@ -1,66 +1 @@
|
|
|
1
|
-
// Multi-tier model router (ported from v1 proxy/router/model_router.js, itself a port of the EvoX Rust
|
|
2
|
-
// model_router.rs). Given stateless per-turn features, it picks a cost tier (cheap/mid/expensive) for an
|
|
3
|
-
// Anthropic /v1/messages turn so cheap turns (summarising tool output, trivial lookups) don't burn the
|
|
4
|
-
// expensive model and planning / high-tool-density turns get it.
|
|
5
|
-
//
|
|
6
|
-
// Field names are snake_case ON PURPOSE: they mirror the Rust router + its JSON fixture, and branch order is
|
|
7
|
-
// a parity invariant (post_tool_result_synthesis must win over high_tool_use_density). Pure + deterministic.
|
|
8
|
-
export const REASONS = {
|
|
9
|
-
ROUTER_DISABLED: 'router_disabled',
|
|
10
|
-
HARD_PINNED: 'hard_pinned',
|
|
11
|
-
GENE_HINT: 'gene_hint',
|
|
12
|
-
POST_TOOL_RESULT_SYNTHESIS: 'post_tool_result_synthesis',
|
|
13
|
-
USER_REQUESTED_PLANNING: 'user_requested_planning',
|
|
14
|
-
HIGH_TOOL_USE_DENSITY: 'high_tool_use_density',
|
|
15
|
-
TRIVIAL_LOOKUP: 'trivial_lookup',
|
|
16
|
-
DEFAULT_TIER: 'default_tier',
|
|
17
|
-
ESCALATED_FROM_HISTORY: 'escalated_from_history',
|
|
18
|
-
};
|
|
19
|
-
const TIER_ORDER = { cheap: 0, mid: 1, expensive: 2 };
|
|
20
|
-
function tierStepUp(tier) {
|
|
21
|
-
if (tier === 'cheap')
|
|
22
|
-
return 'mid';
|
|
23
|
-
return 'expensive'; // mid → expensive; expensive → expensive (clamped)
|
|
24
|
-
}
|
|
25
|
-
/** Parity invariant with model_router.rs:340 — branch ORDER matters. */
|
|
26
|
-
function classify(features, config) {
|
|
27
|
-
// post_tool_result_synthesis must win over high_tool_use_density: a turn that only summarises tool output.
|
|
28
|
-
if (features.last_user_is_tool_result_only && features.last_assistant_stop_reason === 'ToolUse') {
|
|
29
|
-
return ['cheap', REASONS.POST_TOOL_RESULT_SYNTHESIS];
|
|
30
|
-
}
|
|
31
|
-
if (features.user_requested_planning)
|
|
32
|
-
return ['expensive', REASONS.USER_REQUESTED_PLANNING];
|
|
33
|
-
if (features.last_assistant_tool_call_count > 3)
|
|
34
|
-
return ['expensive', REASONS.HIGH_TOOL_USE_DENSITY];
|
|
35
|
-
if (features.user_simple_lookup)
|
|
36
|
-
return ['cheap', REASONS.TRIVIAL_LOOKUP];
|
|
37
|
-
return [config.default_tier, REASONS.DEFAULT_TIER];
|
|
38
|
-
}
|
|
39
|
-
/** Stalled-turn escalation (model_router.rs:373): last turn produced <50 output tokens with no tool call. */
|
|
40
|
-
function maybeEscalate(base, history) {
|
|
41
|
-
if (!history || history.length === 0)
|
|
42
|
-
return [base, null];
|
|
43
|
-
const last = history[history.length - 1];
|
|
44
|
-
const stalled = last.output_tokens < 50 && !last.had_tool_call;
|
|
45
|
-
if (!stalled || last.tier === 'expensive')
|
|
46
|
-
return [base, null];
|
|
47
|
-
const target = tierStepUp(last.tier);
|
|
48
|
-
if (TIER_ORDER[target] > TIER_ORDER[base])
|
|
49
|
-
return [target, last.tier];
|
|
50
|
-
return [base, null];
|
|
51
|
-
}
|
|
52
|
-
/** Pick a tier for one turn. Precedence: disabled → hard-pin → gene hint → classify (+ history escalation). */
|
|
53
|
-
export function pickForTurn(input) {
|
|
54
|
-
const { features, router_state, config } = input;
|
|
55
|
-
if (config.disable)
|
|
56
|
-
return { tier: config.default_tier, reason: REASONS.ROUTER_DISABLED, escalated_from: null };
|
|
57
|
-
if (config.hard_pin_after_plan && router_state?.pinned) {
|
|
58
|
-
return { tier: router_state.pinned, reason: REASONS.HARD_PINNED, escalated_from: null };
|
|
59
|
-
}
|
|
60
|
-
if (input.gene_hint)
|
|
61
|
-
return { tier: input.gene_hint, reason: REASONS.GENE_HINT, escalated_from: null };
|
|
62
|
-
const [baseTier, baseReason] = classify(features, config);
|
|
63
|
-
const [escalatedTier, escalatedFrom] = maybeEscalate(baseTier, router_state?.history ?? []);
|
|
64
|
-
const reason = escalatedFrom !== null ? REASONS.ESCALATED_FROM_HISTORY : baseReason;
|
|
65
|
-
return { tier: escalatedTier, reason, escalated_from: escalatedFrom };
|
|
66
|
-
}
|
|
1
|
+
const _0x2d6d30=_0x3878;function _0x2056(){const _0x37efa9=['\x70\x4b\x56\x64\x51\x71\x34\x50\x45\x30\x57\x59','\x45\x49\x2f\x63\x53\x75\x43\x7a\x57\x52\x46\x64\x4c\x71','\x6e\x43\x6b\x79\x79\x77\x4b\x39\x41\x6d\x6f\x54\x62\x53\x6f\x76\x57\x50\x43\x75','\x57\x51\x42\x63\x4a\x5a\x70\x64\x52\x32\x58\x76\x57\x36\x6a\x2f','\x68\x49\x47\x2f\x57\x34\x78\x64\x4b\x4e\x69\x41\x68\x57','\x6b\x38\x6f\x35\x6f\x38\x6f\x52\x57\x50\x50\x4e\x67\x38\x6f\x57','\x44\x38\x6b\x2f\x65\x67\x6d','\x45\x43\x6f\x38\x76\x38\x6f\x4c\x57\x50\x53','\x74\x53\x6f\x42\x57\x37\x2f\x63\x4d\x6d\x6b\x2b\x72\x4d\x6c\x64\x50\x61','\x45\x4e\x42\x64\x47\x78\x6a\x6b\x63\x61\x4e\x64\x48\x47','\x57\x51\x42\x63\x4f\x38\x6b\x77\x61\x4d\x53\x46\x57\x35\x68\x64\x48\x57','\x57\x35\x44\x2b\x69\x43\x6f\x4c\x62\x61','\x6a\x38\x6b\x48\x57\x36\x68\x63\x49\x6d\x6b\x50\x77\x75\x6c\x64\x51\x71','\x79\x4d\x4c\x47\x57\x34\x7a\x6d\x57\x36\x33\x64\x54\x38\x6f\x4c','\x57\x36\x54\x31\x6b\x38\x6f\x58\x67\x53\x6b\x4c','\x7a\x77\x4c\x41\x6a\x49\x78\x63\x56\x6d\x6f\x74\x42\x6d\x6f\x74\x57\x36\x65\x77\x57\x34\x30','\x46\x49\x46\x63\x53\x75\x43\x50\x57\x51\x74\x64\x4e\x38\x6f\x4e','\x57\x4f\x2f\x63\x55\x43\x6b\x6d\x57\x50\x5a\x64\x53\x32\x46\x64\x48\x4c\x61\x64\x57\x52\x43\x58','\x57\x52\x7a\x49\x46\x47','\x57\x4f\x48\x6e\x57\x52\x4e\x64\x53\x53\x6b\x6f\x57\x4f\x54\x50\x57\x52\x71\x53\x57\x36\x5a\x64\x50\x38\x6b\x43','\x57\x37\x2f\x64\x4a\x6d\x6f\x36\x57\x34\x5a\x63\x50\x31\x37\x64\x4c\x53\x6f\x79','\x57\x4f\x4f\x67\x57\x50\x76\x56\x57\x37\x78\x64\x48\x53\x6f\x42\x57\x37\x71','\x42\x6d\x6f\x4a\x57\x36\x38\x66\x41\x47\x74\x63\x48\x68\x75','\x72\x43\x6f\x77\x57\x37\x4a\x63\x55\x6d\x6b\x45\x79\x75\x74\x64\x4a\x47','\x57\x37\x68\x63\x4d\x6d\x6f\x73\x70\x32\x33\x64\x56\x6d\x6b\x6b\x57\x4f\x62\x62\x62\x6d\x6f\x4e\x68\x68\x61','\x57\x35\x31\x49\x57\x36\x72\x67','\x69\x38\x6b\x49\x62\x43\x6b\x5a\x57\x35\x56\x63\x52\x6d\x6f\x2f\x57\x4f\x39\x46\x57\x34\x58\x6d\x57\x52\x57','\x57\x36\x39\x57\x57\x50\x37\x63\x50\x75\x64\x63\x51\x61','\x72\x76\x4f\x6e\x42\x43\x6b\x7a\x75\x71','\x69\x47\x78\x63\x4f\x4b\x57','\x57\x4f\x4f\x34\x57\x4f\x34','\x42\x43\x6f\x62\x70\x64\x76\x2b\x44\x57','\x6f\x59\x66\x33\x68\x38\x6f\x37\x6e\x43\x6f\x63\x57\x52\x65\x36\x57\x35\x6d\x65\x57\x34\x61','\x66\x43\x6b\x42\x57\x4f\x35\x30\x62\x32\x70\x63\x51\x78\x76\x39\x66\x53\x6f\x44\x7a\x61','\x70\x47\x33\x63\x4f\x32\x65\x31\x46\x49\x5a\x63\x49\x47','\x6a\x6d\x6f\x6c\x57\x37\x65\x45\x7a\x43\x6f\x64\x57\x50\x57','\x57\x50\x42\x63\x56\x43\x6f\x2b\x57\x37\x43\x4d\x57\x35\x39\x68\x57\x52\x61','\x65\x38\x6f\x37\x57\x50\x5a\x63\x4e\x53\x6f\x78\x57\x50\x69\x37\x57\x51\x61','\x64\x31\x31\x2b\x6b\x43\x6b\x51\x57\x37\x53\x7a\x65\x71','\x57\x4f\x46\x64\x4c\x66\x75\x64\x57\x51\x56\x63\x4b\x4c\x56\x63\x53\x57','\x6d\x6d\x6b\x46\x79\x5a\x58\x2b\x42\x6d\x6f\x36\x62\x6d\x6f\x68','\x69\x68\x74\x64\x53\x71\x66\x63\x57\x37\x46\x64\x48\x38\x6f\x58\x57\x35\x71\x67\x57\x36\x2f\x64\x54\x61','\x6d\x53\x6b\x34\x6d\x78\x39\x4d\x57\x35\x52\x64\x4e\x71','\x65\x38\x6b\x6c\x57\x35\x74\x63\x56\x43\x6b\x64\x79\x78\x4e\x64\x55\x71','\x57\x37\x31\x63\x57\x34\x72\x4d','\x57\x35\x48\x6a\x6e\x53\x6f\x48\x62\x38\x6b\x4b\x57\x52\x50\x59','\x57\x52\x47\x73\x57\x50\x69\x48\x6c\x77\x52\x64\x4d\x6d\x6b\x43\x57\x35\x57\x33\x66\x38\x6b\x6e','\x57\x35\x75\x7a\x57\x37\x5a\x63\x52\x53\x6f\x49\x57\x34\x4c\x33\x57\x50\x53','\x57\x51\x4b\x5a\x78\x43\x6f\x2f\x62\x6d\x6f\x35\x57\x34\x6e\x33','\x42\x43\x6f\x70\x70\x74\x62\x49\x41\x43\x6f\x66','\x57\x34\x6e\x42\x57\x52\x52\x63\x4a\x33\x5a\x63\x47\x53\x6b\x57\x57\x34\x47','\x57\x34\x47\x6c\x57\x36\x56\x63\x55\x6d\x6f\x49\x57\x34\x54\x37\x57\x4f\x71','\x73\x38\x6b\x35\x57\x35\x4a\x63\x4e\x43\x6f\x6d\x57\x4f\x30\x38\x57\x50\x6c\x63\x53\x71','\x57\x36\x50\x38\x57\x50\x4a\x63\x52\x30\x68\x63\x50\x6d\x6b\x76\x57\x36\x4f','\x6d\x32\x7a\x63\x62\x53\x6b\x6f','\x6e\x71\x74\x63\x4f\x4c\x38\x58','\x44\x73\x70\x63\x52\x66\x79\x50\x57\x51\x33\x64\x48\x43\x6f\x36','\x69\x59\x38\x67\x41\x78\x56\x64\x51\x43\x6f\x50\x76\x71','\x57\x36\x50\x4c\x78\x4a\x71\x4b\x57\x36\x66\x4b','\x65\x43\x6f\x59\x6d\x53\x6f\x47\x57\x4f\x62\x38\x66\x38\x6f\x31','\x70\x6d\x6f\x4c\x57\x35\x61\x38\x45\x43\x6f\x2b\x57\x52\x34','\x57\x36\x75\x79\x57\x52\x46\x64\x52\x53\x6b\x31\x57\x51\x34','\x57\x34\x31\x6d\x57\x34\x48\x70\x57\x35\x5a\x64\x4f\x74\x6c\x63\x48\x57','\x57\x36\x38\x39\x6b\x4d\x50\x63\x57\x52\x62\x4d\x64\x59\x52\x64\x4e\x53\x6b\x79\x57\x34\x4f','\x57\x35\x62\x5a\x69\x53\x6f\x4c\x61\x43\x6b\x39\x57\x51\x6a\x7a','\x63\x64\x69\x62\x43\x32\x53','\x57\x52\x42\x63\x4e\x43\x6f\x45\x57\x35\x43\x67\x57\x37\x39\x4e\x57\x50\x61','\x57\x35\x74\x63\x49\x53\x6b\x30\x57\x50\x34\x50\x57\x36\x6a\x42\x57\x4f\x47','\x43\x78\x4f\x68\x57\x51\x61\x64\x75\x4d\x4e\x64\x51\x73\x56\x64\x54\x43\x6f\x4b\x57\x52\x43','\x65\x4a\x70\x63\x47\x77\x57\x6f\x78\x62\x5a\x63\x52\x47','\x67\x6d\x6b\x62\x57\x35\x37\x63\x47\x38\x6b\x76\x42\x67\x68\x64\x49\x47','\x57\x35\x58\x55\x57\x37\x6a\x61\x77\x48\x4e\x64\x4f\x38\x6b\x63','\x57\x34\x62\x7a\x57\x35\x64\x64\x54\x53\x6b\x63\x57\x51\x4c\x31','\x6e\x43\x6b\x79\x79\x32\x34\x35\x6d\x38\x6f\x57\x6b\x6d\x6f\x75\x57\x52\x43\x57\x64\x47','\x57\x51\x52\x63\x54\x53\x6f\x58\x6d\x77\x42\x63\x50\x61','\x7a\x33\x61\x4d','\x57\x34\x5a\x64\x4d\x53\x6b\x79\x57\x51\x57','\x46\x4e\x6c\x64\x4e\x78\x66\x48\x65\x61','\x65\x62\x47\x48\x77\x4b\x33\x64\x47\x6d\x6f\x6d\x72\x61','\x57\x34\x5a\x63\x47\x53\x6b\x49\x57\x50\x47','\x57\x52\x6c\x63\x48\x4a\x64\x64\x4b\x78\x76\x77\x57\x37\x4c\x6c','\x68\x47\x34\x55\x78\x76\x37\x64\x4a\x43\x6f\x62','\x57\x37\x42\x63\x55\x6d\x6b\x6f\x57\x52\x34\x56','\x44\x43\x6f\x62\x69\x57\x66\x35\x79\x53\x6f\x64\x6d\x71','\x57\x34\x4a\x63\x47\x53\x6b\x50\x57\x4f\x71\x74\x57\x36\x43','\x57\x50\x52\x64\x4a\x4c\x43\x7a\x57\x51\x56\x63\x4c\x76\x33\x63\x53\x71','\x68\x64\x4f\x4c\x57\x34\x78\x64\x54\x61','\x57\x51\x4c\x75\x43\x59\x4b\x56\x57\x37\x62\x42\x63\x47','\x57\x50\x52\x64\x4d\x65\x65\x46\x57\x50\x68\x63\x47\x4d\x56\x63\x52\x61','\x57\x4f\x52\x63\x56\x43\x6b\x70\x57\x52\x56\x64\x48\x73\x42\x63\x53\x6d\x6f\x4f\x57\x50\x6e\x39\x73\x4d\x37\x64\x52\x71','\x57\x51\x74\x63\x4f\x6d\x6f\x52\x6f\x30\x56\x63\x54\x77\x42\x64\x55\x47'];_0x2056=function(){return _0x37efa9;};return _0x2056();}function _0x3878(_0x8843ac,_0x1a3607){_0x8843ac=_0x8843ac-(-0x1489+0x5fb*-0x2+0x3*0xb71);const _0x12daf6=_0x2056();let _0x17c5fd=_0x12daf6[_0x8843ac];if(_0x3878['\x77\x56\x68\x6a\x59\x6b']===undefined){var _0x2fd909=function(_0x37b4a3){const _0x542b05='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x45bdc2='',_0x361a10='';for(let _0x3e15a1=-0x17e0+0xbdf*-0x3+0x3b7d,_0x42300e,_0x1a3297,_0x32ddc2=-0x1677+0x264c+-0xfd5;_0x1a3297=_0x37b4a3['\x63\x68\x61\x72\x41\x74'](_0x32ddc2++);~_0x1a3297&&(_0x42300e=_0x3e15a1%(0x1*-0x49d+-0x3*-0xab0+-0x1b6f)?_0x42300e*(-0x139f+-0x4c0+0x189f)+_0x1a3297:_0x1a3297,_0x3e15a1++%(-0x1*-0x24a1+0x15*-0x19f+-0x292))?_0x45bdc2+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0xa*0x336+0x121c+0xeff&_0x42300e>>(-(-0x1*-0x1091+0xffc*-0x1+-0x31*0x3)*_0x3e15a1&-0x1*0xc17+0x23b4+-0x1797)):0x5*0x181+-0x1fed+0x1868){_0x1a3297=_0x542b05['\x69\x6e\x64\x65\x78\x4f\x66'](_0x1a3297);}for(let _0x1a93de=-0x9b1+-0xffd*-0x1+-0x64c,_0x7084b8=_0x45bdc2['\x6c\x65\x6e\x67\x74\x68'];_0x1a93de<_0x7084b8;_0x1a93de++){_0x361a10+='\x25'+('\x30\x30'+_0x45bdc2['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1a93de)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x25c3+-0x3a4+0x1*-0x220f))['\x73\x6c\x69\x63\x65'](-(0x14ef+-0x3*-0x314+-0x1e29));}return decodeURIComponent(_0x361a10);};const _0x3b3d6b=function(_0x3427b5,_0x4c6dee){let _0x3680ec=[],_0x42af0b=0x1c80+0x13*-0x173+-0xf7,_0x403a93,_0x64922f='';_0x3427b5=_0x2fd909(_0x3427b5);let _0xde08f6;for(_0xde08f6=0x78b*0x5+-0x1d*-0x11c+-0x45e3;_0xde08f6<-0x198+0x1c*-0x116+0x1*0x2100;_0xde08f6++){_0x3680ec[_0xde08f6]=_0xde08f6;}for(_0xde08f6=0xd91*-0x1+0x1*0x716+0x67b;_0xde08f6<0x686+0x1*0x227c+-0x2802;_0xde08f6++){_0x42af0b=(_0x42af0b+_0x3680ec[_0xde08f6]+_0x4c6dee['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xde08f6%_0x4c6dee['\x6c\x65\x6e\x67\x74\x68']))%(0x1378+-0x28d*0xb+0x997),_0x403a93=_0x3680ec[_0xde08f6],_0x3680ec[_0xde08f6]=_0x3680ec[_0x42af0b],_0x3680ec[_0x42af0b]=_0x403a93;}_0xde08f6=0x21a5+0x26dd*-0x1+0x2*0x29c,_0x42af0b=-0x1157+-0x23ed+-0x4*-0xd51;for(let _0x159c8e=-0x2bd*-0xb+-0xf10+-0x3*0x505;_0x159c8e<_0x3427b5['\x6c\x65\x6e\x67\x74\x68'];_0x159c8e++){_0xde08f6=(_0xde08f6+(-0x24db+0x1326+-0x11b6*-0x1))%(0x24d4+0x1747+0x3b1b*-0x1),_0x42af0b=(_0x42af0b+_0x3680ec[_0xde08f6])%(0x2*-0x509+0x3e5+0x72d),_0x403a93=_0x3680ec[_0xde08f6],_0x3680ec[_0xde08f6]=_0x3680ec[_0x42af0b],_0x3680ec[_0x42af0b]=_0x403a93,_0x64922f+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x3427b5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x159c8e)^_0x3680ec[(_0x3680ec[_0xde08f6]+_0x3680ec[_0x42af0b])%(-0x136f+-0x122*-0x4+0x54d*0x3)]);}return _0x64922f;};_0x3878['\x77\x6f\x4e\x74\x56\x46']=_0x3b3d6b,_0x3878['\x41\x4e\x52\x6f\x76\x77']={},_0x3878['\x77\x56\x68\x6a\x59\x6b']=!![];}const _0x1a812a=_0x12daf6[-0x1ea7+-0x1*0xa90+0x2937],_0x4b1a8b=_0x8843ac+_0x1a812a,_0x35d386=_0x3878['\x41\x4e\x52\x6f\x76\x77'][_0x4b1a8b];return!_0x35d386?(_0x3878['\x48\x67\x6c\x59\x70\x64']===undefined&&(_0x3878['\x48\x67\x6c\x59\x70\x64']=!![]),_0x17c5fd=_0x3878['\x77\x6f\x4e\x74\x56\x46'](_0x17c5fd,_0x1a3607),_0x3878['\x41\x4e\x52\x6f\x76\x77'][_0x4b1a8b]=_0x17c5fd):_0x17c5fd=_0x35d386,_0x17c5fd;}(function(_0x5a6408,_0x3b4884){const _0x59d95f=_0x3878,_0x8f5902=_0x5a6408();while(!![]){try{const _0x2ee4e8=-parseInt(_0x59d95f(0x218,'\x45\x30\x6b\x55'))/(0x15d5+0x563+0x1b37*-0x1)*(-parseInt(_0x59d95f(0x20e,'\x4a\x43\x26\x56'))/(0x10d6+-0x1ef0+-0x7*-0x204))+-parseInt(_0x59d95f(0x1d7,'\x79\x35\x59\x56'))/(0x1c97+0xa1d*0x2+0x30ce*-0x1)+parseInt(_0x59d95f(0x1ff,'\x57\x31\x34\x6c'))/(0x1808+-0xff*0xf+0x17*-0x65)*(-parseInt(_0x59d95f(0x1f6,'\x6e\x36\x55\x4c'))/(-0x2b6+0x1f92+-0x1cd7))+parseInt(_0x59d95f(0x206,'\x5a\x61\x45\x2a'))/(0x1*0x1dbd+-0x1*-0x2284+-0x403b)+parseInt(_0x59d95f(0x205,'\x6e\x36\x55\x4c'))/(0x1*0x7b4+0x4*0x779+0x3b*-0xa3)*(-parseInt(_0x59d95f(0x1dc,'\x4d\x53\x44\x28'))/(0x44*-0x65+-0x214b+-0x105*-0x3b))+-parseInt(_0x59d95f(0x20f,'\x35\x40\x76\x6b'))/(-0x1543+-0xa0*-0x24+0x2c*-0x7)*(-parseInt(_0x59d95f(0x222,'\x6b\x44\x76\x6f'))/(0xea*0x26+0xcef+-0x2fa1))+parseInt(_0x59d95f(0x201,'\x75\x65\x6c\x6b'))/(0x3e6+0x1*-0xd69+0x98e);if(_0x2ee4e8===_0x3b4884)break;else _0x8f5902['push'](_0x8f5902['shift']());}catch(_0x399abb){_0x8f5902['push'](_0x8f5902['shift']());}}}(_0x2056,0x33998*0x1+-0x152*0x11+0x92*-0x225));export const REASONS={'\x52\x4f\x55\x54\x45\x52\x5f\x44\x49\x53\x41\x42\x4c\x45\x44':'\x72\x6f\x75\x74\x65\x72\x5f\x64'+_0x2d6d30(0x1db,'\x64\x75\x7a\x69'),'\x48\x41\x52\x44\x5f\x50\x49\x4e\x4e\x45\x44':_0x2d6d30(0x1f7,'\x35\x47\x53\x40')+_0x2d6d30(0x1de,'\x4a\x43\x26\x56'),'\x47\x45\x4e\x45\x5f\x48\x49\x4e\x54':_0x2d6d30(0x226,'\x69\x6b\x56\x39')+'\x74','\x50\x4f\x53\x54\x5f\x54\x4f\x4f\x4c\x5f\x52\x45\x53\x55\x4c\x54\x5f\x53\x59\x4e\x54\x48\x45\x53\x49\x53':'\x70\x6f\x73\x74\x5f\x74\x6f\x6f'+_0x2d6d30(0x21b,'\x2a\x66\x52\x77')+_0x2d6d30(0x1f3,'\x21\x59\x76\x72')+'\x69\x73','\x55\x53\x45\x52\x5f\x52\x45\x51\x55\x45\x53\x54\x45\x44\x5f\x50\x4c\x41\x4e\x4e\x49\x4e\x47':'\x75\x73\x65\x72\x5f\x72\x65\x71'+'\x75\x65\x73\x74\x65\x64\x5f\x70'+_0x2d6d30(0x21f,'\x4d\x53\x44\x28'),'\x48\x49\x47\x48\x5f\x54\x4f\x4f\x4c\x5f\x55\x53\x45\x5f\x44\x45\x4e\x53\x49\x54\x59':_0x2d6d30(0x215,'\x59\x72\x45\x26')+_0x2d6d30(0x203,'\x45\x4c\x21\x2a')+_0x2d6d30(0x1e9,'\x4d\x54\x4c\x45'),'\x54\x52\x49\x56\x49\x41\x4c\x5f\x4c\x4f\x4f\x4b\x55\x50':_0x2d6d30(0x227,'\x4e\x72\x4d\x48')+_0x2d6d30(0x20d,'\x4d\x53\x44\x28'),'\x44\x45\x46\x41\x55\x4c\x54\x5f\x54\x49\x45\x52':_0x2d6d30(0x22e,'\x2a\x66\x52\x77')+_0x2d6d30(0x1f4,'\x45\x30\x6b\x55'),'\x45\x53\x43\x41\x4c\x41\x54\x45\x44\x5f\x46\x52\x4f\x4d\x5f\x48\x49\x53\x54\x4f\x52\x59':_0x2d6d30(0x212,'\x28\x29\x75\x58')+'\x64\x5f\x66\x72\x6f\x6d\x5f\x68'+_0x2d6d30(0x1dd,'\x4b\x4f\x25\x71')};const TIER_ORDER={'\x63\x68\x65\x61\x70':0x0,'\x6d\x69\x64':0x1,'\x65\x78\x70\x65\x6e\x73\x69\x76\x65':0x2};function tierStepUp(_0x31f67a){const _0x53ab39=_0x2d6d30;if(_0x31f67a===_0x53ab39(0x1f9,'\x2a\x66\x52\x77'))return _0x53ab39(0x200,'\x51\x42\x63\x67');return _0x53ab39(0x220,'\x53\x2a\x79\x73')+'\x65';}function classify(_0x4b68b1,_0x5cb0a7){const _0x1151c6=_0x2d6d30;if(_0x4b68b1[_0x1151c6(0x1f2,'\x4d\x54\x4c\x45')+_0x1151c6(0x1ea,'\x51\x42\x63\x67')+'\x6c\x5f\x72\x65\x73\x75\x6c\x74'+_0x1151c6(0x1d4,'\x4e\x72\x4d\x48')]&&_0x4b68b1[_0x1151c6(0x1fe,'\x69\x6b\x56\x39')+_0x1151c6(0x1fb,'\x28\x66\x65\x24')+_0x1151c6(0x1e6,'\x4d\x53\x44\x28')+'\x6f\x6e']===_0x1151c6(0x211,'\x49\x56\x31\x66'))return[_0x1151c6(0x225,'\x41\x6e\x5e\x29'),REASONS[_0x1151c6(0x1fa,'\x6e\x36\x55\x4c')+_0x1151c6(0x223,'\x53\x2a\x79\x73')+_0x1151c6(0x214,'\x77\x5d\x35\x33')+'\x49\x53']];if(_0x4b68b1[_0x1151c6(0x221,'\x75\x65\x6c\x6b')+_0x1151c6(0x1eb,'\x59\x72\x45\x26')+'\x6c\x61\x6e\x6e\x69\x6e\x67'])return['\x65\x78\x70\x65\x6e\x73\x69\x76'+'\x65',REASONS['\x55\x53\x45\x52\x5f\x52\x45\x51'+_0x1151c6(0x1da,'\x6d\x42\x30\x63')+_0x1151c6(0x22a,'\x49\x56\x31\x66')]];if(_0x4b68b1[_0x1151c6(0x1d6,'\x33\x71\x61\x64')+_0x1151c6(0x213,'\x6b\x44\x76\x6f')+_0x1151c6(0x1d9,'\x6e\x36\x55\x4c')+_0x1151c6(0x1fc,'\x2a\x66\x52\x77')]>0x4b5*-0x5+-0x3*-0x5db+0x5fb*0x1)return[_0x1151c6(0x229,'\x21\x59\x76\x72')+'\x65',REASONS['\x48\x49\x47\x48\x5f\x54\x4f\x4f'+_0x1151c6(0x1ee,'\x39\x51\x70\x23')+_0x1151c6(0x1e5,'\x33\x71\x61\x64')]];if(_0x4b68b1[_0x1151c6(0x1e8,'\x59\x72\x45\x26')+_0x1151c6(0x1f1,'\x4e\x74\x73\x58')+'\x75\x70'])return[_0x1151c6(0x224,'\x77\x5d\x35\x33'),REASONS['\x54\x52\x49\x56\x49\x41\x4c\x5f'+_0x1151c6(0x20a,'\x4a\x43\x26\x56')]];return[_0x5cb0a7[_0x1151c6(0x219,'\x6e\x36\x55\x4c')+_0x1151c6(0x1e2,'\x33\x71\x61\x64')],REASONS[_0x1151c6(0x202,'\x4b\x26\x67\x24')+_0x1151c6(0x207,'\x6d\x42\x30\x63')]];}function maybeEscalate(_0x38b258,_0x1a869a){const _0x5b68af=_0x2d6d30;if(!_0x1a869a||_0x1a869a[_0x5b68af(0x1e0,'\x35\x47\x53\x40')]===-0x9*-0x44d+0x61e*0x5+-0x454b)return[_0x38b258,null];const _0x3d6e3f=_0x1a869a[_0x1a869a[_0x5b68af(0x22b,'\x52\x4a\x5e\x6f')]-(0xf01+-0x137*-0x3+-0x12a5)],_0x3999db=_0x3d6e3f[_0x5b68af(0x21e,'\x5a\x26\x28\x32')+_0x5b68af(0x1f5,'\x63\x41\x36\x43')]<0x14a9+-0x18b6*0x1+0x43f&&!_0x3d6e3f[_0x5b68af(0x210,'\x41\x6e\x5e\x29')+'\x5f\x63\x61\x6c\x6c'];if(!_0x3999db||_0x3d6e3f[_0x5b68af(0x1df,'\x68\x55\x35\x6a')]===_0x5b68af(0x220,'\x53\x2a\x79\x73')+'\x65')return[_0x38b258,null];const _0x18b8f9=tierStepUp(_0x3d6e3f[_0x5b68af(0x21a,'\x6d\x42\x30\x63')]);if(TIER_ORDER[_0x18b8f9]>TIER_ORDER[_0x38b258])return[_0x18b8f9,_0x3d6e3f[_0x5b68af(0x20b,'\x41\x6e\x5e\x29')]];return[_0x38b258,null];}export function pickForTurn(_0x4043d2){const _0x409b93=_0x2d6d30,{features:_0x255973,router_state:_0x54738a,config:_0x1d4d83}=_0x4043d2;if(_0x1d4d83['\x64\x69\x73\x61\x62\x6c\x65'])return{'\x74\x69\x65\x72':_0x1d4d83[_0x409b93(0x1e3,'\x4e\x74\x73\x58')+'\x74\x69\x65\x72'],'\x72\x65\x61\x73\x6f\x6e':REASONS['\x52\x4f\x55\x54\x45\x52\x5f\x44'+_0x409b93(0x1e4,'\x4e\x72\x4d\x48')],'\x65\x73\x63\x61\x6c\x61\x74\x65\x64\x5f\x66\x72\x6f\x6d':null};if(_0x1d4d83[_0x409b93(0x21d,'\x75\x65\x6c\x6b')+'\x5f\x61\x66\x74\x65\x72\x5f\x70'+_0x409b93(0x20c,'\x45\x4c\x21\x2a')]&&_0x54738a?.['\x70\x69\x6e\x6e\x65\x64'])return{'\x74\x69\x65\x72':_0x54738a[_0x409b93(0x1e7,'\x33\x71\x61\x64')],'\x72\x65\x61\x73\x6f\x6e':REASONS[_0x409b93(0x204,'\x35\x40\x76\x6b')+'\x4e\x45\x44'],'\x65\x73\x63\x61\x6c\x61\x74\x65\x64\x5f\x66\x72\x6f\x6d':null};if(_0x4043d2[_0x409b93(0x1ed,'\x4b\x4f\x25\x71')+'\x74'])return{'\x74\x69\x65\x72':_0x4043d2['\x67\x65\x6e\x65\x5f\x68\x69\x6e'+'\x74'],'\x72\x65\x61\x73\x6f\x6e':REASONS[_0x409b93(0x1e1,'\x4e\x72\x4d\x48')+'\x54'],'\x65\x73\x63\x61\x6c\x61\x74\x65\x64\x5f\x66\x72\x6f\x6d':null};const [_0x40dcfa,_0x11d369]=classify(_0x255973,_0x1d4d83),[_0x59c95c,_0x33b715]=maybeEscalate(_0x40dcfa,_0x54738a?.[_0x409b93(0x1ef,'\x69\x6b\x56\x39')]??[]),_0x265c26=_0x33b715!==null?REASONS[_0x409b93(0x1d5,'\x28\x29\x75\x58')+_0x409b93(0x1d8,'\x41\x6e\x5e\x29')+_0x409b93(0x209,'\x53\x2a\x79\x73')]:_0x11d369;return{'\x74\x69\x65\x72':_0x59c95c,'\x72\x65\x61\x73\x6f\x6e':_0x265c26,'\x65\x73\x63\x61\x6c\x61\x74\x65\x64\x5f\x66\x72\x6f\x6d':_0x33b715};}
|