@evomap/evolver 1.89.9 → 1.89.10
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/README.ja-JP.md +1 -1
- package/README.ko-KR.md +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/package.json +1 -1
- package/src/evolve/guards.js +1 -1
- package/src/evolve/pipeline/collect.js +1 -1
- package/src/evolve/pipeline/dispatch.js +1 -1
- package/src/evolve/pipeline/enrich.js +1 -1
- package/src/evolve/pipeline/hub.js +1 -1
- package/src/evolve/pipeline/select.js +1 -1
- package/src/evolve/pipeline/signals.js +1 -1
- package/src/evolve/utils.js +1 -1
- package/src/evolve.js +1 -1
- package/src/gep/a2aProtocol.js +1 -1
- package/src/gep/antiAbuseTelemetry.js +1 -1
- package/src/gep/autoDistillConv.js +1 -1
- package/src/gep/autoDistillLlm.js +1 -1
- package/src/gep/candidateEval.js +1 -1
- package/src/gep/candidates.js +1 -1
- package/src/gep/contentHash.js +1 -1
- package/src/gep/conversationSniffer.js +1 -1
- package/src/gep/crypto.js +1 -1
- package/src/gep/curriculum.js +1 -1
- package/src/gep/deviceId.js +1 -1
- package/src/gep/envFingerprint.js +1 -1
- package/src/gep/epigenetics.js +1 -1
- package/src/gep/execBridge.js +1 -1
- package/src/gep/explore.js +1 -1
- package/src/gep/hash.js +1 -1
- package/src/gep/hubFetch.js +1 -1
- package/src/gep/hubReview.js +1 -1
- package/src/gep/hubSearch.js +1 -1
- package/src/gep/hubVerify.js +1 -1
- package/src/gep/learningSignals.js +1 -1
- package/src/gep/memoryGraph.js +1 -1
- package/src/gep/memoryGraphAdapter.js +1 -1
- package/src/gep/mutation.js +1 -1
- package/src/gep/narrativeMemory.js +1 -1
- package/src/gep/openPRRegistry.js +1 -1
- package/src/gep/personality.js +1 -1
- package/src/gep/policyCheck.js +1 -1
- package/src/gep/prompt.js +1 -1
- package/src/gep/recallInject.js +1 -1
- package/src/gep/recallVerifier.js +1 -1
- package/src/gep/reflection.js +1 -1
- package/src/gep/savingsCore.js +1 -1
- package/src/gep/selector.js +1 -1
- package/src/gep/skillDistiller.js +1 -1
- package/src/gep/solidify.js +1 -1
- package/src/gep/strategy.js +1 -1
- package/src/gep/tokenSavings.js +1 -1
- package/src/gep/workspaceKeychain.js +1 -1
- package/src/proxy/extensions/traceControl.js +1 -1
- package/src/proxy/index.js +269 -17
- package/src/proxy/inject.js +1 -1
- package/src/proxy/router/models_route.js +52 -0
- package/src/proxy/router/ollama_route.js +103 -0
- package/src/proxy/router/vertex_route.js +110 -0
- package/src/proxy/server/routes.js +20 -0
- package/src/proxy/trace/extractor.js +1 -1
- package/src/proxy/trace/usage.js +1 -1
package/src/proxy/inject.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5a1836=_0x58b4;function _0x40a1(){const _0x16ff5d=['\x46\x6d\x6b\x63\x74\x61','\x57\x35\x39\x5a\x57\x37\x37\x63\x4c\x43\x6f\x47\x6a\x47','\x57\x4f\x47\x55\x57\x51\x6e\x65\x57\x34\x2f\x64\x51\x53\x6f\x47\x57\x51\x4b','\x74\x38\x6b\x72\x57\x37\x4b\x74\x65\x57','\x76\x53\x6b\x4e\x57\x52\x33\x64\x51\x57\x35\x51\x69\x43\x6b\x4e','\x65\x53\x6b\x44\x57\x4f\x31\x73\x57\x50\x5a\x64\x50\x33\x30\x41','\x68\x38\x6f\x4b\x57\x37\x4e\x63\x4c\x71','\x57\x34\x35\x6a\x57\x35\x57\x4c\x57\x52\x74\x63\x51\x57','\x64\x6d\x6b\x71\x57\x50\x30\x4e\x57\x52\x64\x64\x4d\x75\x61','\x65\x78\x68\x64\x4b\x43\x6f\x57','\x57\x36\x34\x5a\x57\x36\x78\x63\x4b\x57\x57','\x6a\x38\x6f\x31\x57\x4f\x7a\x32\x57\x4f\x42\x63\x53\x38\x6b\x4c\x7a\x57','\x57\x34\x57\x77\x57\x4f\x74\x63\x47\x74\x6a\x48\x57\x50\x5a\x63\x55\x47','\x57\x34\x38\x58\x57\x50\x61\x62\x79\x38\x6f\x6f\x45\x6d\x6f\x32','\x78\x53\x6f\x34\x6e\x57\x2f\x64\x55\x53\x6f\x69','\x57\x34\x57\x45\x65\x53\x6b\x4d\x57\x35\x56\x64\x4f\x53\x6f\x37\x76\x71','\x74\x6d\x6b\x2b\x57\x50\x42\x64\x51\x38\x6f\x2b','\x57\x4f\x38\x76\x57\x52\x4e\x64\x52\x38\x6f\x75\x57\x52\x4f\x30\x57\x35\x4b','\x57\x36\x74\x63\x4c\x43\x6f\x4d\x57\x4f\x68\x64\x54\x71','\x41\x6d\x6b\x30\x57\x37\x65\x37\x6c\x71','\x67\x43\x6b\x63\x6d\x4b\x5a\x63\x54\x53\x6b\x74\x45\x74\x4b','\x57\x52\x35\x39\x76\x6d\x6f\x4d\x57\x35\x53','\x57\x51\x64\x63\x47\x4a\x57\x77\x57\x4f\x6c\x64\x55\x49\x61\x4b','\x75\x71\x62\x30\x61\x4c\x4f','\x57\x34\x4b\x54\x57\x51\x5a\x63\x53\x38\x6f\x36\x6e\x62\x64\x64\x49\x38\x6f\x79\x57\x51\x6c\x64\x56\x57','\x41\x38\x6f\x37\x57\x37\x34\x56','\x45\x53\x6b\x56\x57\x52\x74\x64\x4d\x6d\x6f\x6e','\x57\x52\x34\x48\x57\x35\x53\x45\x45\x6d\x6f\x58\x43\x6d\x6f\x75','\x57\x4f\x30\x2f\x57\x51\x75','\x57\x52\x4c\x7a\x62\x58\x58\x79\x57\x34\x6e\x78\x79\x6d\x6f\x5a\x6f\x6d\x6f\x4a\x63\x53\x6f\x70','\x79\x53\x6f\x51\x57\x4f\x53\x51\x6c\x31\x68\x63\x50\x4a\x61','\x45\x38\x6b\x44\x57\x51\x78\x64\x47\x61\x4f','\x57\x50\x39\x54\x57\x37\x4e\x63\x4c\x43\x6f\x63\x64\x43\x6f\x55','\x57\x35\x62\x77\x57\x51\x56\x64\x53\x4b\x33\x64\x4d\x43\x6b\x78','\x57\x50\x31\x47\x63\x77\x30\x34','\x57\x36\x44\x4c\x57\x50\x74\x64\x4b\x32\x33\x64\x51\x53\x6b\x54\x57\x37\x57','\x57\x50\x4b\x34\x57\x51\x50\x66\x57\x34\x78\x64\x50\x43\x6f\x38\x57\x52\x47','\x6c\x43\x6b\x54\x57\x36\x57\x52\x61\x38\x6b\x61\x57\x4f\x61\x58','\x7a\x53\x6b\x63\x57\x4f\x52\x64\x51\x6d\x6f\x71\x57\x52\x6e\x55\x73\x61','\x6c\x66\x48\x34\x57\x35\x58\x75\x61\x74\x4a\x64\x48\x61','\x57\x35\x4c\x36\x72\x53\x6b\x77\x57\x34\x4e\x63\x4e\x53\x6f\x30\x75\x66\x42\x64\x4e\x38\x6f\x67\x64\x75\x38','\x57\x36\x31\x4c\x57\x36\x69\x43\x57\x50\x6c\x63\x4d\x47','\x45\x43\x6b\x79\x77\x53\x6f\x6e\x63\x43\x6f\x2b\x57\x35\x64\x63\x49\x57','\x64\x30\x6a\x79\x57\x35\x50\x44','\x57\x52\x50\x79\x57\x36\x70\x64\x4c\x43\x6b\x2b','\x57\x35\x43\x68\x57\x35\x2f\x63\x4c\x49\x4c\x36\x41\x38\x6b\x30','\x43\x6d\x6b\x44\x57\x34\x53\x61','\x57\x36\x72\x6d\x57\x35\x6c\x63\x54\x71','\x7a\x53\x6f\x57\x57\x4f\x57','\x65\x38\x6f\x68\x62\x53\x6f\x36\x57\x36\x68\x63\x51\x4d\x76\x73','\x57\x36\x57\x4d\x57\x36\x33\x63\x51\x48\x76\x70\x77\x38\x6b\x65','\x42\x53\x6f\x51\x57\x4f\x61\x4c\x6e\x4c\x68\x63\x55\x4a\x65','\x57\x35\x61\x67\x57\x35\x56\x63\x4c\x47','\x57\x51\x61\x68\x61\x6d\x6f\x53\x57\x50\x34','\x57\x51\x2f\x63\x55\x57\x4e\x64\x48\x32\x57','\x57\x50\x50\x61\x70\x65\x34\x36\x6a\x4d\x6c\x63\x4d\x61','\x6c\x61\x5a\x64\x53\x6d\x6f\x5a\x57\x36\x2f\x63\x48\x61\x4e\x64\x4d\x68\x42\x64\x49\x6d\x6f\x49','\x66\x38\x6b\x49\x57\x52\x4c\x73\x57\x51\x4b','\x70\x43\x6b\x47\x57\x52\x34\x46\x57\x50\x37\x64\x54\x33\x52\x63\x47\x61','\x45\x62\x6a\x6f','\x57\x52\x6e\x70\x57\x35\x70\x64\x51\x6d\x6b\x59','\x57\x51\x34\x6e\x57\x52\x66\x64\x57\x37\x75','\x71\x38\x6b\x36\x57\x52\x33\x64\x4d\x6d\x6f\x46','\x67\x43\x6b\x68\x57\x37\x72\x73\x76\x49\x68\x64\x4b\x72\x66\x64\x67\x58\x65\x54\x6e\x61','\x66\x38\x6b\x67\x57\x51\x4b\x49\x57\x51\x6c\x64\x4d\x30\x46\x63\x52\x71','\x7a\x43\x6b\x2f\x6b\x30\x30\x38','\x57\x34\x4f\x31\x57\x35\x46\x63\x53\x47\x31\x44\x57\x4f\x35\x75','\x57\x52\x74\x63\x56\x62\x56\x64\x55\x76\x43','\x57\x50\x72\x37\x57\x37\x78\x64\x50\x43\x6b\x51\x63\x71\x70\x64\x48\x57','\x57\x37\x65\x44\x57\x51\x75\x4d\x44\x57','\x79\x59\x35\x4c\x65\x6d\x6f\x45','\x57\x50\x69\x6a\x57\x52\x52\x64\x50\x57','\x61\x38\x6b\x6e\x57\x50\x44\x6b\x57\x50\x64\x64\x4f\x33\x43\x42','\x57\x4f\x35\x72\x57\x35\x5a\x64\x49\x68\x69\x6f\x57\x35\x2f\x63\x4b\x53\x6b\x62\x57\x36\x2f\x64\x53\x49\x5a\x63\x4d\x61','\x57\x35\x53\x4a\x57\x35\x37\x63\x53\x57\x44\x73\x57\x50\x6a\x66','\x57\x4f\x58\x39\x79\x68\x42\x64\x53\x6d\x6f\x77\x45\x48\x47','\x6b\x43\x6b\x38\x57\x52\x39\x55\x57\x51\x64\x64\x4b\x4e\x47\x38','\x57\x52\x7a\x34\x57\x50\x4b','\x62\x4d\x4b\x4a\x6f\x58\x4f','\x76\x53\x6b\x67\x68\x76\x69\x4a\x57\x37\x4c\x36\x6e\x47','\x57\x50\x47\x79\x57\x37\x4f\x47\x74\x43\x6f\x74\x77\x53\x6f\x4e','\x57\x36\x74\x64\x4c\x4d\x56\x63\x50\x57\x75\x34\x57\x36\x56\x64\x50\x57','\x57\x4f\x6c\x63\x55\x48\x43\x36\x57\x4f\x57','\x57\x37\x44\x64\x57\x35\x69\x48\x57\x52\x4a\x63\x4a\x43\x6b\x45\x57\x50\x4b\x61\x57\x34\x38\x33\x57\x51\x70\x63\x51\x61','\x79\x38\x6f\x48\x57\x4f\x4f\x32\x6b\x4b\x74\x63\x52\x63\x43','\x6c\x53\x6f\x32\x6c\x38\x6f\x41\x57\x34\x33\x63\x4b\x47','\x6f\x53\x6b\x75\x44\x75\x75','\x62\x4d\x72\x4d\x57\x35\x72\x66','\x6b\x71\x42\x64\x55\x53\x6f\x32\x57\x36\x37\x64\x55\x65\x4a\x63\x48\x66\x74\x64\x54\x43\x6f\x67\x57\x50\x54\x42\x71\x47','\x57\x4f\x4e\x63\x51\x61\x5a\x64\x48\x67\x39\x62\x57\x50\x2f\x63\x4e\x47','\x57\x51\x30\x57\x57\x4f\x6c\x64\x50\x6d\x6f\x5a','\x57\x50\x61\x68\x57\x36\x4a\x63\x50\x58\x52\x63\x47\x38\x6f\x65\x57\x34\x56\x64\x49\x71\x71\x72\x57\x51\x50\x49','\x57\x34\x30\x6d\x57\x35\x74\x63\x47\x73\x4c\x4d','\x6c\x58\x48\x39\x57\x35\x64\x64\x47\x71\x50\x44\x75\x61','\x61\x6d\x6b\x7a\x72\x76\x38\x69','\x7a\x71\x75\x54\x57\x35\x79\x71\x44\x67\x4b\x51','\x43\x43\x6f\x52\x57\x36\x57\x38\x57\x37\x56\x63\x4b\x72\x38\x39\x57\x4f\x72\x32\x71\x76\x70\x64\x51\x57','\x57\x37\x47\x56\x57\x34\x68\x63\x55\x49\x4b','\x57\x50\x57\x61\x57\x36\x65\x4c\x78\x53\x6f\x6d\x76\x43\x6f\x2b','\x57\x4f\x76\x6b\x46\x6d\x6f\x36\x57\x35\x71','\x57\x51\x50\x6f\x57\x36\x5a\x63\x48\x74\x62\x37\x57\x51\x6a\x4c','\x68\x38\x6b\x62\x57\x37\x66\x44\x75\x59\x33\x64\x4b\x58\x6a\x67\x62\x4a\x79\x77\x67\x47','\x57\x50\x35\x64\x43\x6d\x6f\x63\x57\x37\x61\x48\x74\x43\x6b\x4f','\x75\x49\x66\x33\x6b\x6d\x6f\x48\x61\x53\x6f\x54\x6b\x61','\x57\x37\x43\x30\x6d\x43\x6b\x64\x57\x35\x57','\x57\x52\x66\x78\x57\x51\x37\x64\x4b\x78\x75\x39\x57\x37\x6a\x43\x57\x50\x76\x35\x79\x38\x6b\x6c\x7a\x57','\x57\x50\x38\x54\x65\x43\x6f\x74\x57\x50\x78\x64\x48\x71','\x69\x43\x6b\x5a\x6d\x4d\x4b\x59\x57\x36\x4c\x69','\x57\x4f\x6e\x7a\x57\x52\x2f\x63\x50\x48\x78\x63\x56\x66\x46\x63\x4b\x47','\x57\x35\x4b\x4a\x41\x68\x71\x2b\x57\x51\x79\x31\x79\x71','\x6d\x64\x74\x64\x48\x47','\x45\x53\x6f\x66\x57\x51\x34\x39\x64\x57','\x72\x38\x6b\x69\x57\x34\x79\x73\x6e\x53\x6b\x35\x57\x52\x65\x67','\x57\x34\x4f\x42\x57\x35\x5a\x63\x4e\x47','\x57\x36\x35\x36\x57\x34\x6d\x53\x74\x38\x6f\x4b\x76\x53\x6f\x49','\x57\x36\x70\x64\x51\x53\x6b\x69\x63\x66\x64\x64\x4d\x66\x2f\x64\x4c\x57','\x57\x51\x5a\x64\x48\x32\x54\x4a\x42\x71\x38','\x73\x68\x33\x63\x4e\x6d\x6b\x6c\x57\x50\x4e\x63\x4c\x61','\x72\x59\x71\x78\x57\x36\x30\x32\x73\x75\x57\x61','\x7a\x38\x6b\x45\x57\x50\x4e\x64\x47\x59\x65','\x6f\x53\x6b\x64\x6e\x61\x35\x6b\x75\x43\x6f\x69\x44\x47','\x62\x43\x6f\x2f\x57\x36\x56\x63\x48\x38\x6b\x39\x57\x35\x6d\x6c\x6d\x61\x69\x52\x69\x74\x56\x64\x50\x67\x79','\x69\x53\x6f\x48\x45\x59\x4e\x64\x55\x61\x42\x64\x55\x38\x6f\x72','\x79\x72\x30\x32\x57\x35\x6d\x64\x41\x32\x79\x49','\x73\x43\x6b\x32\x57\x51\x52\x64\x4c\x4a\x4b','\x57\x52\x4b\x35\x57\x50\x6c\x64\x4d\x43\x6f\x59\x57\x50\x65\x65\x57\x36\x38','\x57\x4f\x6d\x5a\x57\x50\x68\x64\x48\x6d\x6f\x6f','\x57\x50\x6a\x5a\x57\x37\x4b','\x7a\x58\x71\x37\x57\x35\x38\x72\x46\x4d\x79\x32','\x77\x48\x4c\x69\x6e\x65\x2f\x64\x4a\x43\x6b\x39\x57\x35\x75','\x57\x51\x64\x64\x4a\x31\x44\x6d\x77\x57','\x43\x43\x6b\x35\x57\x4f\x62\x79\x57\x52\x46\x63\x4f\x6d\x6b\x66','\x57\x50\x4b\x4e\x69\x38\x6f\x75\x57\x4f\x4a\x64\x47\x53\x6b\x55\x71\x47'];_0x40a1=function(){return _0x16ff5d;};return _0x40a1();}function _0x58b4(_0x21328b,_0x469361){_0x21328b=_0x21328b-(-0xb85+0xc7f*-0x1+0x82b*0x3);const _0x49c43e=_0x40a1();let _0x1bcd0c=_0x49c43e[_0x21328b];if(_0x58b4['\x69\x49\x42\x65\x6c\x54']===undefined){var _0x44fc53=function(_0x2c5f3c){const _0x58c49c='\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 _0x1bc4a1='',_0x15a235='',_0x5c9e33=_0x1bc4a1+_0x44fc53,_0x120550=(''+function(){return-0x72b+0xf37+0x80c*-0x1;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(0x74*-0x3a+0x25*0x9b+-0x1*-0x3e2);for(let _0x2be5c1=0x760+0x1*0x245f+0xe95*-0x3,_0x205dce,_0x3e2457,_0xc1eca2=-0x1*0x1659+-0x297*0x1+0x18f*0x10;_0x3e2457=_0x2c5f3c['\x63\x68\x61\x72\x41\x74'](_0xc1eca2++);~_0x3e2457&&(_0x205dce=_0x2be5c1%(0x9*0x1b5+-0x40f*0x6+0x901)?_0x205dce*(0x2b2+-0x541+0x2cf)+_0x3e2457:_0x3e2457,_0x2be5c1++%(-0x236*-0x1+0xa8f+-0xcc1))?_0x1bc4a1+=_0x120550||_0x5c9e33['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xc1eca2+(0x184+0x1570+-0x1a3*0xe))-(-0x6e3*0x4+-0x334*0x7+0x1*0x3202)!==0x1462+-0x3*0xfe+-0x1168?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x23cb+0x8*0x344+-0x1e76*0x2&_0x205dce>>(-(-0x8e3+0x87*-0x1b+0x1722)*_0x2be5c1&0x26c1+-0x4*-0x79f+-0x4537)):_0x2be5c1:0x1fda+-0x1f3*-0xf+-0x191*0x27){_0x3e2457=_0x58c49c['\x69\x6e\x64\x65\x78\x4f\x66'](_0x3e2457);}for(let _0x5af0b3=0x1aaa+0x1*-0x12b+-0x197f,_0x18d834=_0x1bc4a1['\x6c\x65\x6e\x67\x74\x68'];_0x5af0b3<_0x18d834;_0x5af0b3++){_0x15a235+='\x25'+('\x30\x30'+_0x1bc4a1['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5af0b3)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x139*-0x12+-0x6*0x25c+-0x7ca))['\x73\x6c\x69\x63\x65'](-(0x20ff+-0x29f+-0x256*0xd));}return decodeURIComponent(_0x15a235);};const _0x31c772=function(_0x2441af,_0x24f73d){let _0x1bf480=[],_0x3fa356=0x5*0x6d3+0x126f+-0x348e,_0x40235b,_0x283b68='';_0x2441af=_0x44fc53(_0x2441af);let _0x5c2a03;for(_0x5c2a03=0x1*0x6de+0xe60+-0x153e;_0x5c2a03<-0x7*-0x8f+0xa*0x311+0x6b7*-0x5;_0x5c2a03++){_0x1bf480[_0x5c2a03]=_0x5c2a03;}for(_0x5c2a03=0x1921+-0x364+-0x15bd;_0x5c2a03<-0x4cc+0x198*-0xb+-0xbaa*-0x2;_0x5c2a03++){_0x3fa356=(_0x3fa356+_0x1bf480[_0x5c2a03]+_0x24f73d['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5c2a03%_0x24f73d['\x6c\x65\x6e\x67\x74\x68']))%(0xe3c+0xbe9+-0x1925),_0x40235b=_0x1bf480[_0x5c2a03],_0x1bf480[_0x5c2a03]=_0x1bf480[_0x3fa356],_0x1bf480[_0x3fa356]=_0x40235b;}_0x5c2a03=-0x85*0x25+0x1434+0x1*-0xfb,_0x3fa356=-0x1e7b+0xab3*0x1+0x13c8;for(let _0x8b086a=0x1*-0x1027+0x31*-0x3d+0x1bd4;_0x8b086a<_0x2441af['\x6c\x65\x6e\x67\x74\x68'];_0x8b086a++){_0x5c2a03=(_0x5c2a03+(0xe8e+-0x2331+0x14a4))%(-0xc*0x43+0x27d+0x1a7),_0x3fa356=(_0x3fa356+_0x1bf480[_0x5c2a03])%(-0x1*-0xd9a+-0x7ca*-0x1+-0x1464),_0x40235b=_0x1bf480[_0x5c2a03],_0x1bf480[_0x5c2a03]=_0x1bf480[_0x3fa356],_0x1bf480[_0x3fa356]=_0x40235b,_0x283b68+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x2441af['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x8b086a)^_0x1bf480[(_0x1bf480[_0x5c2a03]+_0x1bf480[_0x3fa356])%(-0x26*-0x71+0xb62+-0x58*0x4f)]);}return _0x283b68;};_0x58b4['\x49\x50\x42\x4e\x51\x4e']=_0x31c772,_0x58b4['\x53\x49\x62\x58\x4a\x76']={},_0x58b4['\x69\x49\x42\x65\x6c\x54']=!![];}const _0x6d6c07=_0x49c43e[0x933+-0xfc3+0x1c*0x3c],_0x4f16ee=_0x21328b+_0x6d6c07,_0x15154f=_0x58b4['\x53\x49\x62\x58\x4a\x76'][_0x4f16ee];if(!_0x15154f){if(_0x58b4['\x61\x43\x72\x56\x79\x61']===undefined){const _0x58f051=function(_0xd5ce28){this['\x4f\x69\x4c\x77\x46\x76']=_0xd5ce28,this['\x6c\x64\x51\x70\x45\x74']=[-0xb74+0x1cd1+0xb*-0x194,0x1*-0x21bd+-0x2*0x25+-0x1*-0x2207,-0x858+0x23e2+-0x1b8a],this['\x55\x48\x4c\x76\x59\x58']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x49\x47\x52\x46\x72\x62']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x4c\x62\x4c\x71\x68\x44']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x58f051['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x69\x73\x53\x4a\x66\x6f']=function(){const _0x29a4c6=new RegExp(this['\x49\x47\x52\x46\x72\x62']+this['\x4c\x62\x4c\x71\x68\x44']),_0x5e86ff=_0x29a4c6['\x74\x65\x73\x74'](this['\x55\x48\x4c\x76\x59\x58']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x6c\x64\x51\x70\x45\x74'][-0x11*0xa1+0x532+0x58*0x10]:--this['\x6c\x64\x51\x70\x45\x74'][0x16d6+-0x262*0x6+-0x88a];return this['\x76\x73\x5a\x53\x54\x44'](_0x5e86ff);},_0x58f051['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x76\x73\x5a\x53\x54\x44']=function(_0x54d6b0){if(!Boolean(~_0x54d6b0))return _0x54d6b0;return this['\x62\x73\x63\x4b\x73\x4c'](this['\x4f\x69\x4c\x77\x46\x76']);},_0x58f051['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x62\x73\x63\x4b\x73\x4c']=function(_0x25997d){for(let _0x3359c3=0x1*0xdbb+0x1283+-0x203e*0x1,_0x221ffb=this['\x6c\x64\x51\x70\x45\x74']['\x6c\x65\x6e\x67\x74\x68'];_0x3359c3<_0x221ffb;_0x3359c3++){this['\x6c\x64\x51\x70\x45\x74']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x221ffb=this['\x6c\x64\x51\x70\x45\x74']['\x6c\x65\x6e\x67\x74\x68'];}return _0x25997d(this['\x6c\x64\x51\x70\x45\x74'][-0xa7+0x866*-0x2+0x1173]);},(''+function(){return-0x128*-0x20+0x1b7f*0x1+0x407f*-0x1;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(-0x1006+-0x6b6+0x16bd)&&new _0x58f051(_0x58b4)['\x69\x73\x53\x4a\x66\x6f'](),_0x58b4['\x61\x43\x72\x56\x79\x61']=!![];}_0x1bcd0c=_0x58b4['\x49\x50\x42\x4e\x51\x4e'](_0x1bcd0c,_0x469361),_0x58b4['\x53\x49\x62\x58\x4a\x76'][_0x4f16ee]=_0x1bcd0c;}else _0x1bcd0c=_0x15154f;return _0x1bcd0c;}(function(_0x2c1554,_0x40c17b){const _0x559eb9=_0x58b4,_0x27ac91=_0x2c1554();while(!![]){try{const _0x44de9c=parseInt(_0x559eb9(0x87,'\x44\x6d\x54\x4b'))/(-0x14e8+-0x2*0xfa3+0x1*0x342f)*(parseInt(_0x559eb9(0xc1,'\x35\x71\x4c\x44'))/(0xc62+0x129d+-0x1efd*0x1))+-parseInt(_0x559eb9(0x98,'\x46\x4c\x64\x6e'))/(0x1b*0xc9+-0xc00+-0x930)+parseInt(_0x559eb9(0xba,'\x59\x44\x51\x5d'))/(-0x197a+-0x24ef+-0x14cf*-0x3)*(-parseInt(_0x559eb9(0xb8,'\x33\x52\x41\x4d'))/(-0x21a+-0x1076+-0x1*-0x1295))+parseInt(_0x559eb9(0x8e,'\x61\x71\x4d\x29'))/(0x68a+-0x1291+0xc0d)+parseInt(_0x559eb9(0xaf,'\x75\x63\x52\x30'))/(0x2400+0x2*-0x916+0x5ef*-0x3)+-parseInt(_0x559eb9(0xb4,'\x61\x71\x4d\x29'))/(0x630+-0xff+-0x529)+parseInt(_0x559eb9(0xc8,'\x35\x56\x69\x5b'))/(0x673+0x303*0x8+-0x1e82);if(_0x44de9c===_0x40c17b)break;else _0x27ac91['push'](_0x27ac91['shift']());}catch(_0x4e38ce){_0x27ac91['push'](_0x27ac91['shift']());}}}(_0x40a1,-0x4479d+-0x6c30b*0x3+-0x276cb4*-0x1));const _0xce52c3=(function(){const _0x502be8=_0x58b4,_0x151f33={};_0x151f33[_0x502be8(0xde,'\x33\x52\x41\x4d')]=_0x502be8(0xf6,'\x2a\x4f\x6e\x77');const _0x2c6b8e=_0x151f33;let _0x5ce2d4=!![];return function(_0x3d5dc9,_0x3877ab){const _0x1493d7=_0x502be8;if(_0x2c6b8e['\x6a\x52\x7a\x73\x4e']===_0x2c6b8e[_0x1493d7(0x8b,'\x6b\x6b\x56\x4b')]){const _0x552073=_0x5ce2d4?function(){const _0xb7503c=_0x1493d7;if(_0x3877ab){const _0x3d1ccb=_0x3877ab[_0xb7503c(0xe9,'\x37\x41\x6d\x42')](_0x3d5dc9,arguments);return _0x3877ab=null,_0x3d1ccb;}}:function(){};return _0x5ce2d4=![],_0x552073;}else _0x3457bc[_0x1493d7(0xca,'\x6a\x46\x46\x25')+_0x1493d7(0xd6,'\x4c\x24\x6d\x4f')+_0x1493d7(0xcc,'\x45\x39\x46\x50')+'\x4c']=_0x321b25;};}()),_0x5089d6=_0xce52c3(this,function(){const _0x4f8b73=_0x58b4,_0x33d460={};_0x33d460[_0x4f8b73(0xe6,'\x48\x55\x42\x52')]='\x28\x28\x28\x2e\x2b\x29\x2b\x29'+_0x4f8b73(0xed,'\x75\x63\x52\x30');const _0xf818fc=_0x33d460;return _0x5089d6[_0x4f8b73(0x9a,'\x21\x56\x49\x7a')]()[_0x4f8b73(0xa4,'\x69\x69\x35\x47')](_0xf818fc[_0x4f8b73(0x100,'\x6b\x6b\x56\x4b')])[_0x4f8b73(0xc9,'\x54\x43\x5a\x43')]()[_0x4f8b73(0xef,'\x35\x71\x4c\x44')+_0x4f8b73(0xbd,'\x4a\x72\x52\x25')](_0x5089d6)[_0x4f8b73(0xab,'\x6f\x6d\x4c\x30')](_0xf818fc[_0x4f8b73(0x85,'\x65\x6a\x30\x52')]);});_0x5089d6();'use strict';const {getProxyToken:_0x2a2c08,getProxyUrl:_0x123f4b}=require(_0x5a1836(0xb3,'\x33\x52\x41\x4d')+_0x5a1836(0xf9,'\x33\x4c\x69\x42')+'\x73');function _0x1f5c61(_0x11f572=process.env){const _0x258ce2=_0x5a1836,_0x3ef5c2={'\x77\x77\x6f\x69\x50':function(_0x327670,_0x544d1c){return _0x327670(_0x544d1c);},'\x6e\x4e\x47\x6c\x77':function(_0x3a6dc8,_0xbd38c4){return _0x3a6dc8===_0xbd38c4;},'\x5a\x6a\x70\x73\x4d':'\x66\x61\x6c\x73\x65','\x4a\x74\x4a\x63\x6a':function(_0x3e6f92,_0x42a2e7){return _0x3e6f92===_0x42a2e7;},'\x78\x42\x58\x70\x79':_0x258ce2(0xce,'\x26\x44\x73\x52'),'\x46\x46\x74\x49\x63':function(_0x56ddc4,_0x1f7902){return _0x56ddc4===_0x1f7902;},'\x48\x4c\x6f\x62\x5a':_0x258ce2(0x83,'\x6f\x6d\x4c\x30'),'\x70\x66\x77\x4a\x4b':function(_0xfc7156,_0x15c45c){return _0xfc7156===_0x15c45c;}},_0x476c82=_0x3ef5c2[_0x258ce2(0x8d,'\x35\x56\x69\x5b')](String,_0x11f572[_0x258ce2(0xc7,'\x49\x54\x72\x6c')+_0x258ce2(0x81,'\x6f\x6d\x4c\x30')+_0x258ce2(0xf2,'\x61\x71\x4d\x29')]||'')[_0x258ce2(0x96,'\x45\x39\x46\x50')]()[_0x258ce2(0xe1,'\x58\x5d\x23\x6a')+_0x258ce2(0xd4,'\x53\x36\x4c\x4d')]();return _0x3ef5c2['\x6e\x4e\x47\x6c\x77'](_0x476c82,'\x30')||_0x3ef5c2[_0x258ce2(0x95,'\x53\x30\x37\x4b')](_0x476c82,_0x3ef5c2['\x5a\x6a\x70\x73\x4d'])||_0x3ef5c2[_0x258ce2(0xff,'\x55\x6b\x70\x26')](_0x476c82,_0x3ef5c2[_0x258ce2(0x92,'\x65\x6a\x30\x52')])||_0x3ef5c2[_0x258ce2(0xb0,'\x6f\x6d\x4c\x30')](_0x476c82,_0x3ef5c2[_0x258ce2(0xeb,'\x21\x39\x68\x71')])||_0x3ef5c2[_0x258ce2(0x90,'\x59\x44\x51\x5d')](_0x476c82,'\x6e\x6f');}function _0x2f126f(_0x2acf2d={},_0x33dcf9=process.env){const _0x2b743d=_0x5a1836,_0x90b4a0={'\x78\x73\x44\x5a\x71':_0x2b743d(0xa0,'\x65\x6a\x30\x52')+_0x2b743d(0xda,'\x35\x56\x69\x5b'),'\x4a\x43\x79\x48\x63':_0x2b743d(0xfe,'\x53\x36\x4c\x4d'),'\x5a\x47\x58\x70\x76':function(_0xc4c088,_0x35f6ff){return _0xc4c088!==_0x35f6ff;},'\x4d\x4f\x70\x4c\x64':function(_0x56e5bd,_0x4edeea){return _0x56e5bd(_0x4edeea);},'\x57\x70\x6c\x59\x6a':function(_0x58aeee){return _0x58aeee();},'\x68\x77\x5a\x55\x75':function(_0x431c49,_0x9a3f9e){return _0x431c49===_0x9a3f9e;},'\x4b\x4b\x51\x6e\x44':_0x2b743d(0xee,'\x35\x56\x69\x5b'),'\x7a\x64\x77\x6d\x55':_0x2b743d(0x86,'\x2a\x4f\x6e\x77')+_0x2b743d(0xe0,'\x46\x4c\x64\x6e')+_0x2b743d(0xd5,'\x32\x67\x61\x74'),'\x75\x46\x75\x54\x65':function(_0x451984,_0x5c9b98){return _0x451984(_0x5c9b98);},'\x61\x67\x6a\x79\x5a':function(_0x274a05,_0x16c68f){return _0x274a05!==_0x16c68f;},'\x43\x52\x74\x6d\x72':function(_0x4cfa12,_0x5a7800){return _0x4cfa12===_0x5a7800;},'\x6e\x48\x48\x48\x63':_0x2b743d(0xf3,'\x6a\x67\x66\x50'),'\x63\x70\x45\x6a\x58':_0x2b743d(0xcd,'\x45\x39\x46\x50'),'\x49\x41\x4a\x6b\x55':_0x2b743d(0xd0,'\x21\x39\x68\x71')+_0x2b743d(0xc4,'\x44\x6d\x54\x4b'),'\x6d\x7a\x71\x69\x58':_0x2b743d(0x9f,'\x35\x71\x4c\x44')+_0x2b743d(0xfa,'\x35\x56\x69\x5b')};if(_0x1f5c61(_0x33dcf9)){const _0x2cc64c={};return _0x2cc64c[_0x2b743d(0xfb,'\x55\x6b\x70\x26')]=![],_0x2cc64c[_0x2b743d(0xb9,'\x28\x39\x6b\x41')]='\x64\x69\x73\x61\x62\x6c\x65\x64',_0x2cc64c;}const _0x207b88=_0x33dcf9===process.env&&_0x90b4a0[_0x2b743d(0xb2,'\x37\x41\x6d\x42')](_0x2acf2d['\x75\x73\x65\x53\x65\x74\x74\x69'+'\x6e\x67\x73'],![]),_0x23ff75=_0x90b4a0[_0x2b743d(0x84,'\x28\x39\x6b\x41')](String,_0x2acf2d['\x75\x72\x6c']||(_0x207b88?_0x90b4a0[_0x2b743d(0x88,'\x75\x63\x52\x30')](_0x123f4b):'')||'')[_0x2b743d(0xf5,'\x38\x62\x65\x4f')](/\/+$/,''),_0x5c53bb=String(_0x2acf2d[_0x2b743d(0xc6,'\x6a\x67\x66\x50')]||(_0x207b88?_0x90b4a0[_0x2b743d(0xbe,'\x61\x71\x4d\x29')](_0x2a2c08):'')||'');if(!_0x23ff75||!_0x5c53bb){if(_0x90b4a0[_0x2b743d(0x8c,'\x4c\x24\x6d\x4f')](_0x90b4a0[_0x2b743d(0xa9,'\x45\x39\x46\x50')],_0x90b4a0['\x4b\x4b\x51\x6e\x44'])){const _0x5c99b7={};return _0x5c99b7[_0x2b743d(0x101,'\x6f\x6d\x4c\x30')]=![],_0x5c99b7['\x72\x65\x61\x73\x6f\x6e']=_0x90b4a0[_0x2b743d(0xb7,'\x79\x34\x4b\x4e')],_0x5c99b7;}else return _0x512307[_0x2b743d(0xd3,'\x28\x39\x6b\x41')]()[_0x2b743d(0xab,'\x6f\x6d\x4c\x30')](HdzZDC[_0x2b743d(0xe4,'\x35\x56\x69\x5b')])['\x74\x6f\x53\x74\x72\x69\x6e\x67']()[_0x2b743d(0xc5,'\x6a\x46\x46\x25')+_0x2b743d(0x9c,'\x53\x6a\x58\x59')](_0x4b128f)[_0x2b743d(0xdb,'\x78\x5d\x5b\x5b')](HdzZDC['\x78\x73\x44\x5a\x71']);}const _0x4100f2=_0x90b4a0[_0x2b743d(0xd7,'\x33\x4c\x69\x42')](String,_0x33dcf9[_0x2b743d(0xae,'\x6a\x46\x46\x25')+_0x2b743d(0x97,'\x75\x63\x52\x30')+'\x52\x4c']||'')['\x74\x72\x69\x6d']()[_0x2b743d(0xdc,'\x6e\x52\x52\x6b')](/\/+$/,'');_0x4100f2&&_0x90b4a0[_0x2b743d(0xcb,'\x6a\x67\x66\x50')](_0x4100f2,_0x23ff75)&&!_0x33dcf9[_0x2b743d(0xd8,'\x6a\x67\x66\x50')+_0x2b743d(0xa3,'\x61\x71\x4d\x29')+_0x2b743d(0xf8,'\x4c\x24\x6d\x4f')+'\x4c']&&(_0x33dcf9[_0x2b743d(0xf7,'\x38\x62\x65\x4f')+'\x4e\x54\x48\x52\x4f\x50\x49\x43'+_0x2b743d(0x99,'\x33\x52\x41\x4d')+'\x4c']=_0x4100f2);const _0x25f5f3=_0x90b4a0[_0x2b743d(0xad,'\x4a\x52\x72\x68')](String,_0x33dcf9[_0x2b743d(0xe3,'\x79\x34\x4b\x4e')+_0x2b743d(0xea,'\x5b\x5b\x67\x49')+_0x2b743d(0xa5,'\x4a\x52\x72\x68')]||'')[_0x2b743d(0xc0,'\x6f\x6d\x4c\x30')]();if(_0x25f5f3&&_0x90b4a0[_0x2b743d(0xa1,'\x5b\x5b\x67\x49')](_0x25f5f3,_0x5c53bb)&&!_0x33dcf9['\x45\x56\x4f\x4d\x41\x50\x5f\x41'+_0x2b743d(0x91,'\x33\x52\x41\x4d')+_0x2b743d(0xb6,'\x53\x30\x37\x4b')+_0x2b743d(0xf0,'\x4c\x24\x6d\x4f')]){if(_0x90b4a0[_0x2b743d(0xa6,'\x55\x6b\x70\x26')](_0x90b4a0[_0x2b743d(0xe7,'\x53\x4a\x54\x5b')],_0x90b4a0[_0x2b743d(0xd1,'\x24\x26\x23\x67')])){const _0x2aa814={};return _0x2aa814[_0x2b743d(0xe5,'\x45\x39\x46\x50')]=![],_0x2aa814[_0x2b743d(0xe2,'\x65\x24\x56\x5a')]=_0x90b4a0[_0x2b743d(0x94,'\x58\x5d\x23\x6a')],_0x2aa814;}else _0x33dcf9[_0x2b743d(0xe8,'\x53\x5d\x5b\x75')+_0x2b743d(0x80,'\x69\x69\x35\x47')+_0x2b743d(0xc2,'\x55\x4b\x5b\x58')+_0x2b743d(0x7f,'\x61\x71\x4d\x29')]=_0x25f5f3;}_0x33dcf9[_0x2b743d(0xbb,'\x53\x6a\x58\x59')+_0x2b743d(0x82,'\x61\x71\x4d\x29')+'\x52\x4c']=_0x23ff75,_0x33dcf9['\x41\x4e\x54\x48\x52\x4f\x50\x49'+_0x2b743d(0x9e,'\x59\x44\x51\x5d')+_0x2b743d(0xdd,'\x59\x4e\x21\x36')]=_0x5c53bb,_0x33dcf9[_0x2b743d(0x89,'\x6e\x52\x52\x6b')+_0x2b743d(0xfd,'\x78\x5d\x5b\x5b')]=_0x5c53bb,_0x33dcf9[_0x2b743d(0xbf,'\x33\x4c\x69\x42')+_0x2b743d(0xbc,'\x52\x49\x47\x44')]=_0x23ff75,_0x33dcf9[_0x2b743d(0xa8,'\x65\x6a\x30\x52')+_0x2b743d(0xd9,'\x75\x63\x52\x30')+'\x4f\x5f\x49\x4e\x4a\x45\x43\x54'+'\x45\x44']='\x31';const _0x41ac27={};return _0x41ac27[_0x2b743d(0x93,'\x26\x44\x73\x52')]=!![],_0x41ac27[_0x2b743d(0x8a,'\x53\x30\x37\x4b')]=_0x23ff75,_0x41ac27[_0x2b743d(0x7d,'\x53\x4a\x54\x5b')]=[_0x2b743d(0xb5,'\x37\x41\x6d\x42')+_0x2b743d(0xcf,'\x6a\x46\x46\x25')+'\x52\x4c',_0x2b743d(0xb1,'\x35\x71\x4c\x44')+_0x2b743d(0xac,'\x53\x31\x63\x25')+_0x2b743d(0x7e,'\x32\x67\x61\x74'),_0x90b4a0['\x49\x41\x4a\x6b\x55'],_0x90b4a0[_0x2b743d(0x9d,'\x30\x44\x32\x73')]],_0x41ac27;}const _0x398f6e={};_0x398f6e[_0x5a1836(0x9b,'\x75\x63\x52\x30')+_0x5a1836(0xc3,'\x24\x26\x23\x67')]=_0x2f126f,_0x398f6e[_0x5a1836(0x8f,'\x6e\x52\x52\x6b')+'\x65\x64']=_0x1f5c61,module[_0x5a1836(0xd2,'\x54\x35\x71\x2a')]=_0x398f6e;
|
|
1
|
+
const _0x147981=_0x10b6;function _0x10b6(_0xe72a5e,_0x34b3bc){_0xe72a5e=_0xe72a5e-(-0x1d0*0x4+0x5*0x599+-0x12f8);const _0x48eab0=_0x46b8();let _0x2b56ac=_0x48eab0[_0xe72a5e];if(_0x10b6['\x65\x69\x51\x74\x52\x72']===undefined){var _0x26cb1e=function(_0x52533e){const _0x40833b='\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 _0x5235e4='',_0x325e59='',_0x2eb814=_0x5235e4+_0x26cb1e,_0x4597e2=(''+function(){return 0xe4f*0x1+-0x1ba0+-0x1e7*-0x7;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(0x2*0xd5b+-0x60*0x16+0x1275*-0x1);for(let _0x6c8be7=-0x1a73+-0x1d*0x85+0x14c2*0x2,_0x3ec30f,_0x2080b3,_0x1fdcd9=0x140d+0xc1*0x2+-0x158f;_0x2080b3=_0x52533e['\x63\x68\x61\x72\x41\x74'](_0x1fdcd9++);~_0x2080b3&&(_0x3ec30f=_0x6c8be7%(-0x8f5+-0x1c2b+0x2524)?_0x3ec30f*(-0x1bb1+-0x1c*0x15c+0x4201*0x1)+_0x2080b3:_0x2080b3,_0x6c8be7++%(-0x10e*0x8+0xa0b*0x1+0x197*-0x1))?_0x5235e4+=_0x4597e2||_0x2eb814['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1fdcd9+(0xe9f+0x3*-0xa1e+0xfc5))-(-0x2484+0x1*-0x17f6+0x3c84)!==0x1008+-0x15*-0xdb+0x3c7*-0x9?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x4*0x757+0x1e*0x71+0x111d&_0x3ec30f>>(-(0x2195+0x2*0x8aa+-0x32e7)*_0x6c8be7&-0x23*-0x1d+0x5f*0x1a+0x47*-0x31)):_0x6c8be7:0x2f*0x1d+-0x2710+0xb3f*0x3){_0x2080b3=_0x40833b['\x69\x6e\x64\x65\x78\x4f\x66'](_0x2080b3);}for(let _0x128ef9=-0x4*0x349+0x2564*0x1+-0x1840,_0x5617da=_0x5235e4['\x6c\x65\x6e\x67\x74\x68'];_0x128ef9<_0x5617da;_0x128ef9++){_0x325e59+='\x25'+('\x30\x30'+_0x5235e4['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x128ef9)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x210d+-0x1281+-0x339e*-0x1))['\x73\x6c\x69\x63\x65'](-(0x1d0a+-0x755+-0x15b3));}return decodeURIComponent(_0x325e59);};const _0x73dca2=function(_0x18f1c1,_0x1e6450){let _0x2611e0=[],_0x370924=0xb*-0x202+-0x1eb0+0x3c5*0xe,_0x2a9831,_0x3cd516='';_0x18f1c1=_0x26cb1e(_0x18f1c1);let _0x34e22a;for(_0x34e22a=0x4*0x1b5+-0xa9e+0x3ca;_0x34e22a<-0x269a+0x2539+0x261;_0x34e22a++){_0x2611e0[_0x34e22a]=_0x34e22a;}for(_0x34e22a=-0x1ec7+-0x49c+0x2363*0x1;_0x34e22a<0xa28+0xaa6+-0x6*0x34d;_0x34e22a++){_0x370924=(_0x370924+_0x2611e0[_0x34e22a]+_0x1e6450['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x34e22a%_0x1e6450['\x6c\x65\x6e\x67\x74\x68']))%(0x1*-0x1675+-0x3*0x2f5+0x2054),_0x2a9831=_0x2611e0[_0x34e22a],_0x2611e0[_0x34e22a]=_0x2611e0[_0x370924],_0x2611e0[_0x370924]=_0x2a9831;}_0x34e22a=0x6b*-0x3e+0x1c38+-0x24e,_0x370924=-0x852+0x1*-0x1efe+0x2750*0x1;for(let _0x5ca674=-0x2397+-0x1728+-0x3*-0x1395;_0x5ca674<_0x18f1c1['\x6c\x65\x6e\x67\x74\x68'];_0x5ca674++){_0x34e22a=(_0x34e22a+(0x11*-0x73+0x1*0x2411+-0x1c6d))%(-0x124e+0xe8d+0x4c1),_0x370924=(_0x370924+_0x2611e0[_0x34e22a])%(-0xd*-0xc+-0x2b4*-0x5+-0xd20),_0x2a9831=_0x2611e0[_0x34e22a],_0x2611e0[_0x34e22a]=_0x2611e0[_0x370924],_0x2611e0[_0x370924]=_0x2a9831,_0x3cd516+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x18f1c1['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5ca674)^_0x2611e0[(_0x2611e0[_0x34e22a]+_0x2611e0[_0x370924])%(0x1*-0x1d8+-0x6bc+0x994)]);}return _0x3cd516;};_0x10b6['\x4d\x46\x74\x68\x74\x42']=_0x73dca2,_0x10b6['\x6c\x45\x52\x45\x65\x59']={},_0x10b6['\x65\x69\x51\x74\x52\x72']=!![];}const _0x3b845f=_0x48eab0[0x22c9*-0x1+0x25a*-0xd+0x415b],_0x27a13a=_0xe72a5e+_0x3b845f,_0x54303e=_0x10b6['\x6c\x45\x52\x45\x65\x59'][_0x27a13a];if(!_0x54303e){if(_0x10b6['\x55\x4e\x59\x72\x7a\x78']===undefined){const _0xcb8836=function(_0x2526a4){this['\x4a\x70\x75\x52\x6f\x42']=_0x2526a4,this['\x58\x73\x46\x55\x74\x54']=[-0x670+-0x17e+-0x1*-0x7ef,-0x383+-0xb5*0x16+0x1311,0x9d0+-0x1*0xc11+0x241],this['\x56\x4f\x67\x78\x65\x66']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x63\x71\x78\x69\x45\x48']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x53\x69\x5a\x58\x69\x6f']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0xcb8836['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x49\x6e\x72\x47\x76\x48']=function(){const _0x4637a5=new RegExp(this['\x63\x71\x78\x69\x45\x48']+this['\x53\x69\x5a\x58\x69\x6f']),_0x217740=_0x4637a5['\x74\x65\x73\x74'](this['\x56\x4f\x67\x78\x65\x66']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x58\x73\x46\x55\x74\x54'][0x15b*-0x13+0x2d6+0x16ec]:--this['\x58\x73\x46\x55\x74\x54'][-0x2f6+-0x6a3*-0x1+-0x3ad];return this['\x4c\x43\x52\x54\x64\x6e'](_0x217740);},_0xcb8836['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x4c\x43\x52\x54\x64\x6e']=function(_0x5ce841){if(!Boolean(~_0x5ce841))return _0x5ce841;return this['\x43\x6d\x53\x72\x64\x48'](this['\x4a\x70\x75\x52\x6f\x42']);},_0xcb8836['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x43\x6d\x53\x72\x64\x48']=function(_0x44d467){for(let _0x2f4505=0x1697+-0x21b5*0x1+-0x1*-0xb1e,_0x3d1d89=this['\x58\x73\x46\x55\x74\x54']['\x6c\x65\x6e\x67\x74\x68'];_0x2f4505<_0x3d1d89;_0x2f4505++){this['\x58\x73\x46\x55\x74\x54']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x3d1d89=this['\x58\x73\x46\x55\x74\x54']['\x6c\x65\x6e\x67\x74\x68'];}return _0x44d467(this['\x58\x73\x46\x55\x74\x54'][0x34d*0x5+-0x1177+0x52*0x3]);},(''+function(){return-0x132d*-0x1+0x5d8+-0x1905;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(0x332*0x4+-0x8d*0x2d+0xc02)&&new _0xcb8836(_0x10b6)['\x49\x6e\x72\x47\x76\x48'](),_0x10b6['\x55\x4e\x59\x72\x7a\x78']=!![];}_0x2b56ac=_0x10b6['\x4d\x46\x74\x68\x74\x42'](_0x2b56ac,_0x34b3bc),_0x10b6['\x6c\x45\x52\x45\x65\x59'][_0x27a13a]=_0x2b56ac;}else _0x2b56ac=_0x54303e;return _0x2b56ac;}(function(_0x199ad5,_0x3e408e){const _0x2a74b3=_0x10b6,_0xbe1b38=_0x199ad5();while(!![]){try{const _0x14d477=parseInt(_0x2a74b3(0x1c9,'\x5a\x26\x36\x54'))/(-0xafb*0x1+-0x16a3*-0x1+-0xba7)+parseInt(_0x2a74b3(0x1c5,'\x4a\x78\x6c\x31'))/(-0x1fe4*0x1+-0x269e+0x4684)+-parseInt(_0x2a74b3(0x242,'\x46\x6c\x43\x4b'))/(-0x2*0xb47+-0x14e8+0x2b79*0x1)+parseInt(_0x2a74b3(0x1f3,'\x21\x51\x62\x4b'))/(0x493+0x1815+0x2*-0xe52)+parseInt(_0x2a74b3(0x1e1,'\x4e\x55\x25\x5a'))/(-0xff8+-0x22db+0x32d8)*(parseInt(_0x2a74b3(0x206,'\x23\x42\x63\x79'))/(-0x8fc+-0x257*-0x1+0x3*0x239))+parseInt(_0x2a74b3(0x1eb,'\x67\x51\x6f\x70'))/(0x1*-0x212a+-0x1e7f+0x3fb0)*(parseInt(_0x2a74b3(0x227,'\x47\x42\x2a\x5b'))/(0x211d+0xf3+-0x2208))+-parseInt(_0x2a74b3(0x1f1,'\x64\x25\x5e\x76'))/(0x7d*-0x41+-0x851*-0x1+0x4b1*0x5)*(parseInt(_0x2a74b3(0x225,'\x71\x4f\x39\x76'))/(-0x3f*-0x27+0x92b+-0x12ba));if(_0x14d477===_0x3e408e)break;else _0xbe1b38['push'](_0xbe1b38['shift']());}catch(_0x51a136){_0xbe1b38['push'](_0xbe1b38['shift']());}}}(_0x46b8,0x1e15+0x3f41*-0x11+0x85025));const _0x1efe54=(function(){const _0x4db44e=_0x10b6,_0x485199={};_0x485199[_0x4db44e(0x215,'\x7a\x29\x2a\x76')]=function(_0x177ad8,_0x4fcba5){return _0x177ad8===_0x4fcba5;},_0x485199[_0x4db44e(0x23b,'\x69\x23\x68\x72')]=_0x4db44e(0x1da,'\x6e\x50\x70\x49');const _0x5cc9f0=_0x485199;let _0x8da605=!![];return function(_0xad10d1,_0x5cd875){const _0x2e6a11=_0x8da605?function(){const _0x6500fb=_0x10b6;if(_0x5cc9f0[_0x6500fb(0x21c,'\x37\x61\x30\x79')](_0x6500fb(0x205,'\x52\x62\x4a\x54'),_0x5cc9f0[_0x6500fb(0x240,'\x64\x25\x5e\x76')]))_0x1fa2ef[_0x6500fb(0x221,'\x46\x6c\x43\x4b')+_0x6500fb(0x21b,'\x5e\x75\x6f\x33')+'\x5f\x42\x41\x53\x45\x5f\x55\x52'+'\x4c']=_0x56a8f7;else{if(_0x5cd875){const _0x1481a6=_0x5cd875[_0x6500fb(0x219,'\x43\x46\x50\x64')](_0xad10d1,arguments);return _0x5cd875=null,_0x1481a6;}}}:function(){};return _0x8da605=![],_0x2e6a11;};}()),_0x44ceb8=_0x1efe54(this,function(){const _0x29ced0=_0x10b6,_0x19c341={};_0x19c341['\x6f\x75\x57\x76\x6c']=_0x29ced0(0x1ec,'\x4a\x78\x6c\x31')+_0x29ced0(0x1e6,'\x4f\x55\x6b\x45');const _0x316153=_0x19c341;return _0x44ceb8[_0x29ced0(0x1df,'\x6e\x50\x70\x49')]()[_0x29ced0(0x1e3,'\x5d\x5b\x53\x6d')](_0x316153[_0x29ced0(0x1f8,'\x69\x23\x68\x72')])[_0x29ced0(0x1e7,'\x43\x46\x50\x64')]()[_0x29ced0(0x210,'\x4a\x78\x6c\x31')+_0x29ced0(0x222,'\x5e\x75\x6f\x33')](_0x44ceb8)[_0x29ced0(0x220,'\x65\x42\x30\x63')](_0x316153[_0x29ced0(0x22d,'\x53\x78\x72\x59')]);});_0x44ceb8();'use strict';const {getProxyToken:_0x37de04,getProxyUrl:_0x563624}=require(_0x147981(0x1f6,'\x7a\x43\x68\x4e')+'\x2f\x73\x65\x74\x74\x69\x6e\x67'+'\x73');function _0x192347(_0x4e4049=process.env){const _0x49bb59=_0x147981,_0xca204b={'\x6a\x57\x47\x54\x5a':function(_0x5252e3,_0x25fd1e){return _0x5252e3(_0x25fd1e);},'\x52\x49\x41\x47\x78':function(_0x3cea11,_0x59c319){return _0x3cea11===_0x59c319;},'\x49\x42\x6d\x53\x69':_0x49bb59(0x238,'\x46\x6c\x43\x4b'),'\x70\x67\x63\x66\x51':_0x49bb59(0x1e5,'\x52\x62\x4a\x54')},_0x1edd31=_0xca204b[_0x49bb59(0x249,'\x4d\x5a\x73\x61')](String,_0x4e4049[_0x49bb59(0x224,'\x49\x4f\x47\x6b')+_0x49bb59(0x22f,'\x43\x46\x50\x64')+_0x49bb59(0x1c7,'\x57\x25\x63\x62')]||'')[_0x49bb59(0x1fd,'\x49\x4f\x47\x6b')]()[_0x49bb59(0x1ef,'\x23\x33\x30\x6b')+'\x61\x73\x65']();return _0xca204b[_0x49bb59(0x1dc,'\x42\x21\x43\x36')](_0x1edd31,'\x30')||_0xca204b[_0x49bb59(0x1fa,'\x70\x63\x46\x35')](_0x1edd31,_0xca204b[_0x49bb59(0x22a,'\x36\x63\x54\x42')])||_0xca204b[_0x49bb59(0x1ce,'\x47\x45\x51\x50')](_0x1edd31,_0xca204b[_0x49bb59(0x23e,'\x21\x51\x62\x4b')])||_0x1edd31===_0x49bb59(0x1e2,'\x4e\x55\x25\x5a')||_0x1edd31==='\x6e\x6f';}function _0xc4ff02(_0x52aa6a={},_0xc94a1c=process.env){const _0x3d49dc=_0x147981,_0x2771df={'\x47\x72\x71\x5a\x7a':_0x3d49dc(0x211,'\x48\x6d\x70\x44'),'\x50\x64\x75\x54\x64':_0x3d49dc(0x20e,'\x43\x46\x50\x64')+_0x3d49dc(0x236,'\x67\x51\x6f\x70'),'\x55\x61\x79\x61\x49':function(_0x27cdf5,_0x587dbf){return _0x27cdf5(_0x587dbf);},'\x52\x4c\x6c\x77\x68':function(_0x559b64,_0x1f193d){return _0x559b64===_0x1f193d;},'\x78\x76\x47\x76\x54':'\x59\x4a\x66\x72\x45','\x6e\x71\x75\x45\x78':function(_0x1ad5f2,_0x457930){return _0x1ad5f2!==_0x457930;},'\x59\x4c\x7a\x48\x6a':function(_0x20001a){return _0x20001a();},'\x69\x64\x4b\x64\x6e':function(_0x952857){return _0x952857();},'\x4e\x46\x4e\x6a\x63':function(_0x413cd2,_0x2192c4){return _0x413cd2||_0x2192c4;},'\x6a\x5a\x4d\x78\x65':function(_0x164e85,_0x22a1b0){return _0x164e85!==_0x22a1b0;},'\x50\x54\x4c\x41\x49':_0x3d49dc(0x204,'\x5a\x26\x36\x54'),'\x53\x4d\x50\x70\x77':'\x61\x42\x47\x77\x43','\x6a\x57\x58\x4f\x53':_0x3d49dc(0x1fb,'\x48\x6d\x70\x44')+_0x3d49dc(0x247,'\x73\x74\x32\x6f')+'\x52\x4c','\x6e\x5a\x57\x76\x48':_0x3d49dc(0x21d,'\x61\x63\x53\x24')+_0x3d49dc(0x1dd,'\x47\x42\x2a\x5b'),'\x6b\x49\x50\x42\x4b':_0x3d49dc(0x1f9,'\x48\x6d\x29\x57')+_0x3d49dc(0x1fc,'\x5e\x75\x6f\x33')};if(_0x2771df[_0x3d49dc(0x1c6,'\x5d\x5b\x53\x6d')](_0x192347,_0xc94a1c)){if(_0x2771df[_0x3d49dc(0x1ee,'\x61\x53\x34\x52')](_0x2771df['\x78\x76\x47\x76\x54'],_0x2771df[_0x3d49dc(0x20b,'\x47\x42\x2a\x5b')])){const _0x552a77={};return _0x552a77[_0x3d49dc(0x1d7,'\x66\x37\x4c\x7a')]=![],_0x552a77[_0x3d49dc(0x1e4,'\x69\x23\x68\x72')]=_0x2771df[_0x3d49dc(0x23f,'\x5a\x26\x36\x54')],_0x552a77;}else{const _0x2bf57d={};return _0x2bf57d[_0x3d49dc(0x1ea,'\x73\x21\x5d\x66')]=![],_0x2bf57d[_0x3d49dc(0x23a,'\x73\x74\x32\x6f')]=_0x2771df[_0x3d49dc(0x1d4,'\x5d\x5b\x53\x6d')],_0x2bf57d;}}const _0x1d15fa=_0x2771df[_0x3d49dc(0x20a,'\x5e\x76\x5a\x4d')](_0xc94a1c,process.env)&&_0x2771df['\x6e\x71\x75\x45\x78'](_0x52aa6a[_0x3d49dc(0x1e0,'\x47\x45\x51\x50')+_0x3d49dc(0x1cc,'\x51\x66\x63\x35')],![]),_0x1da27c=String(_0x52aa6a['\x75\x72\x6c']||(_0x1d15fa?_0x2771df['\x59\x4c\x7a\x48\x6a'](_0x563624):'')||'')[_0x3d49dc(0x23d,'\x46\x6c\x43\x4b')](/\/+$/,''),_0x40745a=String(_0x52aa6a[_0x3d49dc(0x239,'\x75\x57\x32\x72')]||(_0x1d15fa?_0x2771df[_0x3d49dc(0x22c,'\x51\x66\x63\x35')](_0x37de04):'')||'');if(_0x2771df[_0x3d49dc(0x234,'\x47\x45\x51\x50')](!_0x1da27c,!_0x40745a)){const _0x45f4b9={};return _0x45f4b9[_0x3d49dc(0x1ed,'\x70\x63\x46\x35')]=![],_0x45f4b9[_0x3d49dc(0x226,'\x64\x25\x5e\x76')]=_0x3d49dc(0x1f5,'\x73\x74\x32\x6f')+_0x3d49dc(0x201,'\x70\x63\x46\x35')+_0x3d49dc(0x20f,'\x47\x45\x51\x50'),_0x45f4b9;}const _0x17dbfc=String(_0xc94a1c[_0x3d49dc(0x246,'\x32\x2a\x67\x38')+_0x3d49dc(0x207,'\x37\x61\x30\x79')+'\x52\x4c']||'')[_0x3d49dc(0x216,'\x69\x46\x56\x47')]()[_0x3d49dc(0x21e,'\x32\x2a\x67\x38')](/\/+$/,'');if(_0x17dbfc&&_0x2771df['\x6a\x5a\x4d\x78\x65'](_0x17dbfc,_0x1da27c)&&!_0xc94a1c[_0x3d49dc(0x1f2,'\x66\x37\x4c\x7a')+_0x3d49dc(0x1cb,'\x7a\x43\x68\x4e')+_0x3d49dc(0x230,'\x66\x37\x4c\x7a')+'\x4c']){if(_0x2771df[_0x3d49dc(0x1cf,'\x61\x63\x53\x24')]('\x43\x42\x72\x4b\x4c',_0x2771df['\x50\x54\x4c\x41\x49']))_0xc94a1c[_0x3d49dc(0x1f2,'\x66\x37\x4c\x7a')+_0x3d49dc(0x1de,'\x34\x53\x28\x58')+_0x3d49dc(0x1f0,'\x57\x25\x63\x62')+'\x4c']=_0x17dbfc;else return _0x259e83[_0x3d49dc(0x202,'\x64\x25\x5e\x76')]()[_0x3d49dc(0x203,'\x75\x57\x32\x72')](dQuxpa[_0x3d49dc(0x23c,'\x36\x63\x54\x42')])['\x74\x6f\x53\x74\x72\x69\x6e\x67']()[_0x3d49dc(0x244,'\x46\x6c\x43\x4b')+'\x74\x6f\x72'](_0x41b130)[_0x3d49dc(0x20d,'\x53\x40\x61\x65')]('\x28\x28\x28\x2e\x2b\x29\x2b\x29'+_0x3d49dc(0x218,'\x66\x37\x4c\x7a'));}const _0x54edf8=String(_0xc94a1c[_0x3d49dc(0x1e9,'\x64\x29\x41\x5e')+'\x43\x5f\x41\x55\x54\x48\x5f\x54'+_0x3d49dc(0x212,'\x53\x40\x61\x65')]||'')[_0x3d49dc(0x1d5,'\x5d\x5b\x53\x6d')]();_0x54edf8&&_0x2771df[_0x3d49dc(0x20c,'\x7a\x29\x2a\x76')](_0x54edf8,_0x40745a)&&!_0xc94a1c[_0x3d49dc(0x1ff,'\x43\x46\x50\x64')+_0x3d49dc(0x1fe,'\x69\x23\x68\x72')+_0x3d49dc(0x1d3,'\x77\x56\x6e\x23')+_0x3d49dc(0x21f,'\x73\x74\x32\x6f')]&&(_0x2771df[_0x3d49dc(0x209,'\x47\x45\x51\x50')](_0x3d49dc(0x231,'\x61\x63\x53\x24'),_0x2771df[_0x3d49dc(0x22e,'\x77\x56\x6e\x23')])?_0x51cfa5[_0x3d49dc(0x1d1,'\x4a\x78\x6c\x31')+_0x3d49dc(0x233,'\x5d\x5b\x53\x6d')+_0x3d49dc(0x237,'\x70\x63\x46\x35')+'\x4b\x45\x4e']=_0x4828eb:_0xc94a1c[_0x3d49dc(0x208,'\x59\x28\x31\x4a')+'\x4e\x54\x48\x52\x4f\x50\x49\x43'+_0x3d49dc(0x1f4,'\x6e\x50\x70\x49')+_0x3d49dc(0x223,'\x51\x66\x63\x35')]=_0x54edf8);_0xc94a1c[_0x3d49dc(0x1e8,'\x42\x21\x43\x36')+'\x43\x5f\x42\x41\x53\x45\x5f\x55'+'\x52\x4c']=_0x1da27c,_0xc94a1c['\x41\x4e\x54\x48\x52\x4f\x50\x49'+'\x43\x5f\x41\x55\x54\x48\x5f\x54'+_0x3d49dc(0x214,'\x53\x78\x72\x59')]=_0x40745a,_0xc94a1c['\x43\x55\x53\x54\x4f\x4d\x5f\x41'+_0x3d49dc(0x1d2,'\x71\x4f\x39\x76')]=_0x40745a,_0xc94a1c[_0x3d49dc(0x21a,'\x75\x57\x32\x72')+_0x3d49dc(0x245,'\x52\x62\x4a\x54')]=_0x1da27c,_0xc94a1c[_0x3d49dc(0x21a,'\x75\x57\x32\x72')+_0x3d49dc(0x1d0,'\x64\x25\x5e\x76')+'\x4f\x5f\x49\x4e\x4a\x45\x43\x54'+'\x45\x44']='\x31';const _0x1e6020={};return _0x1e6020['\x69\x6e\x6a\x65\x63\x74\x65\x64']=!![],_0x1e6020['\x75\x72\x6c']=_0x1da27c,_0x1e6020[_0x3d49dc(0x200,'\x5a\x26\x36\x54')]=[_0x2771df[_0x3d49dc(0x213,'\x32\x2a\x67\x38')],_0x3d49dc(0x1d6,'\x65\x42\x30\x63')+'\x43\x5f\x41\x55\x54\x48\x5f\x54'+_0x3d49dc(0x232,'\x47\x42\x2a\x5b'),_0x2771df[_0x3d49dc(0x1f7,'\x75\x57\x32\x72')],_0x2771df[_0x3d49dc(0x243,'\x5e\x76\x5a\x4d')]],_0x1e6020;}function _0x46b8(){const _0x9a065f=['\x73\x63\x54\x44\x66\x49\x75','\x57\x51\x46\x64\x4d\x47\x58\x56\x63\x48\x75','\x57\x52\x70\x63\x52\x38\x6f\x34\x69\x6d\x6b\x55\x6d\x43\x6f\x6d\x57\x37\x71','\x79\x6d\x6b\x46\x69\x53\x6f\x6f\x57\x4f\x64\x64\x53\x6d\x6f\x61\x69\x57','\x57\x51\x4e\x63\x47\x53\x6f\x7a\x57\x37\x4a\x63\x56\x6d\x6f\x37\x57\x51\x39\x58','\x62\x43\x6f\x46\x57\x35\x72\x46\x61\x38\x6f\x69\x57\x50\x6a\x31\x71\x43\x6b\x58','\x75\x38\x6b\x62\x57\x4f\x4b\x70','\x57\x4f\x52\x63\x4f\x43\x6b\x77\x57\x34\x53\x4c\x76\x61','\x57\x52\x53\x31\x57\x52\x4a\x63\x52\x63\x2f\x64\x4a\x71','\x57\x34\x71\x6f\x7a\x71','\x46\x53\x6b\x59\x57\x34\x38\x67','\x78\x64\x6d\x65\x69\x4a\x68\x64\x4c\x48\x6d\x4b','\x77\x59\x58\x69\x67\x71\x38\x66\x57\x34\x57\x2f','\x6a\x58\x4a\x64\x47\x53\x6f\x58\x57\x37\x75\x52\x57\x34\x53\x71','\x46\x72\x6a\x45\x43\x38\x6f\x42\x7a\x6d\x6b\x72\x77\x57','\x78\x53\x6f\x4b\x78\x38\x6b\x2f\x79\x6d\x6b\x62\x71\x57','\x43\x61\x4f\x45\x6e\x38\x6b\x6e\x57\x52\x52\x63\x4d\x38\x6b\x63','\x79\x6d\x6b\x30\x57\x50\x68\x64\x4e\x61\x56\x64\x52\x4d\x61\x5a','\x57\x36\x6c\x64\x49\x77\x4e\x63\x53\x5a\x4b','\x57\x35\x33\x64\x4c\x53\x6f\x54\x79\x43\x6f\x7a\x57\x35\x68\x63\x54\x43\x6b\x67','\x57\x50\x66\x50\x43\x6d\x6b\x71\x57\x52\x38\x6a\x6f\x62\x34','\x57\x35\x39\x44\x57\x35\x6a\x45\x69\x38\x6b\x4d\x73\x47','\x57\x34\x48\x4b\x57\x34\x52\x64\x52\x53\x6b\x6d\x57\x50\x68\x63\x4a\x43\x6f\x7a','\x67\x68\x38\x79\x57\x36\x54\x4f\x57\x4f\x4a\x64\x48\x76\x72\x78\x57\x52\x6c\x64\x56\x43\x6b\x4e','\x73\x38\x6b\x58\x6a\x6d\x6f\x55\x57\x52\x52\x64\x48\x53\x6f\x36\x63\x57','\x66\x53\x6f\x30\x74\x6d\x6f\x57\x45\x48\x68\x64\x4e\x6d\x6f\x54','\x66\x43\x6f\x58\x74\x38\x6b\x51\x57\x52\x6c\x64\x52\x4e\x31\x53','\x70\x76\x37\x63\x50\x61\x37\x63\x4c\x57','\x57\x51\x79\x4c\x57\x4f\x37\x63\x51\x73\x57','\x57\x37\x4b\x61\x57\x52\x61\x66\x77\x65\x33\x64\x4c\x38\x6f\x38','\x77\x38\x6b\x74\x57\x52\x52\x64\x56\x48\x61','\x57\x4f\x42\x63\x49\x43\x6b\x30\x57\x52\x2f\x64\x53\x49\x4b\x4d\x78\x61','\x72\x4b\x34\x36\x6b\x68\x6e\x38\x43\x32\x61','\x6f\x53\x6b\x2b\x57\x4f\x50\x49','\x57\x4f\x43\x65\x57\x50\x68\x63\x4a\x71\x2f\x64\x53\x30\x52\x64\x53\x71','\x42\x71\x4f\x79\x67\x57\x6c\x64\x52\x59\x69\x63','\x57\x51\x2f\x64\x4f\x47\x76\x47','\x45\x43\x6b\x4f\x57\x50\x74\x64\x47\x72\x68\x64\x48\x78\x79\x59','\x57\x50\x6a\x57\x57\x35\x6e\x43\x68\x53\x6b\x62\x43\x38\x6f\x2f','\x69\x67\x68\x63\x4b\x47\x52\x63\x56\x63\x53','\x57\x51\x33\x64\x4b\x47\x44\x64\x57\x34\x75','\x57\x35\x34\x61\x44\x68\x61\x54','\x74\x31\x78\x63\x47\x78\x44\x75\x43\x4d\x4e\x63\x50\x78\x30','\x6b\x66\x44\x41\x57\x50\x42\x64\x4b\x38\x6f\x6f\x57\x51\x68\x64\x51\x71','\x75\x43\x6b\x41\x57\x37\x74\x63\x47\x4d\x53\x34\x57\x52\x31\x63','\x57\x4f\x37\x63\x56\x43\x6f\x71\x57\x35\x5a\x63\x53\x71','\x79\x38\x6b\x48\x57\x34\x7a\x71\x57\x34\x53','\x57\x4f\x2f\x64\x50\x72\x72\x73\x67\x57','\x57\x37\x56\x64\x55\x74\x53\x38\x57\x51\x43','\x67\x6d\x6f\x76\x57\x35\x2f\x64\x48\x61\x78\x64\x54\x71','\x61\x68\x72\x2f\x45\x67\x4a\x63\x4c\x4c\x7a\x51','\x57\x51\x4a\x63\x48\x43\x6f\x76\x57\x34\x78\x63\x56\x53\x6f\x38','\x6f\x30\x31\x79\x41\x53\x6f\x73\x57\x36\x68\x64\x48\x43\x6f\x69','\x57\x51\x70\x63\x52\x53\x6b\x74\x57\x50\x42\x64\x47\x47\x4f\x74\x43\x71','\x6a\x6d\x6f\x37\x57\x37\x56\x64\x55\x61','\x6c\x4a\x33\x64\x4e\x43\x6b\x31\x69\x71','\x76\x47\x6a\x4c\x57\x34\x4b','\x57\x37\x2f\x64\x47\x62\x75\x6d\x57\x51\x61','\x57\x37\x2f\x64\x49\x6d\x6f\x64\x57\x51\x34','\x57\x37\x30\x42\x61\x43\x6b\x4e\x57\x51\x38\x48\x63\x48\x4b\x47','\x57\x51\x79\x42\x57\x51\x37\x63\x48\x57','\x73\x73\x57\x4e\x6f\x4a\x4f','\x66\x4c\x6c\x63\x56\x64\x78\x63\x4e\x48\x6d\x67\x57\x34\x38','\x77\x4c\x75\x51\x69\x32\x6e\x35\x41\x67\x38','\x62\x77\x54\x37\x57\x50\x2f\x64\x4f\x47','\x57\x50\x52\x63\x54\x43\x6b\x64\x57\x36\x42\x63\x47\x77\x62\x38\x69\x57','\x6e\x47\x2f\x64\x54\x43\x6b\x77\x65\x57\x78\x64\x4b\x57','\x6d\x6d\x6f\x79\x43\x71','\x6e\x38\x6f\x57\x6b\x43\x6f\x35\x57\x34\x62\x30','\x6e\x48\x6a\x65\x6d\x6d\x6f\x34\x57\x36\x78\x63\x4a\x77\x69','\x79\x67\x34\x71','\x64\x43\x6b\x46\x57\x35\x69','\x63\x38\x6b\x41\x57\x51\x58\x63\x57\x51\x30\x32\x6a\x4e\x65','\x67\x75\x35\x56\x57\x35\x79\x30\x64\x6d\x6b\x4f\x57\x36\x5a\x63\x48\x63\x6d\x63\x71\x68\x4b','\x57\x50\x72\x36\x57\x36\x66\x42\x61\x38\x6b\x67','\x57\x34\x64\x63\x51\x32\x4f\x78\x46\x33\x4a\x64\x4c\x38\x6b\x2f\x57\x35\x38\x6c\x57\x4f\x37\x64\x49\x71','\x57\x34\x70\x63\x51\x32\x69\x73\x45\x33\x52\x63\x4b\x6d\x6b\x58\x57\x34\x47\x6b\x57\x52\x78\x64\x56\x61\x65','\x57\x36\x37\x63\x49\x38\x6b\x7a\x57\x34\x42\x63\x51\x68\x31\x47','\x42\x32\x50\x76\x72\x38\x6b\x4f','\x69\x38\x6f\x69\x73\x6d\x6b\x6a\x57\x34\x6c\x63\x52\x43\x6f\x7a\x68\x53\x6b\x56\x78\x77\x42\x64\x53\x47','\x6c\x38\x6b\x2b\x57\x35\x44\x42\x57\x50\x79','\x44\x4a\x58\x33\x57\x37\x68\x64\x53\x71','\x7a\x43\x6b\x68\x61\x38\x6f\x44\x75\x61','\x45\x48\x6d\x70\x64\x58\x5a\x64\x56\x49\x47\x78','\x57\x35\x6a\x57\x57\x34\x74\x64\x53\x6d\x6b\x69\x57\x50\x37\x63\x48\x38\x6f\x6b','\x57\x4f\x52\x63\x52\x6d\x6b\x32\x57\x36\x78\x63\x47\x47','\x57\x52\x4a\x64\x4d\x62\x7a\x51','\x57\x52\x46\x63\x4b\x6d\x6b\x2f\x57\x36\x53\x6a\x42\x6d\x6b\x33\x57\x52\x75','\x57\x50\x6c\x63\x54\x38\x6f\x59\x57\x34\x68\x63\x55\x47','\x57\x52\x5a\x64\x55\x57\x44\x38\x57\x37\x4e\x63\x4c\x53\x6f\x48','\x71\x53\x6b\x4d\x70\x43\x6f\x56','\x76\x53\x6b\x42\x57\x51\x37\x64\x52\x73\x64\x64\x48\x76\x65\x79','\x66\x73\x76\x4e\x64\x53\x6f\x43','\x6a\x32\x56\x63\x4d\x62\x33\x63\x53\x71','\x63\x43\x6f\x34\x78\x53\x6f\x57\x46\x62\x65','\x57\x52\x61\x4c\x57\x52\x78\x63\x55\x72\x4f','\x44\x4b\x58\x6e\x71\x6d\x6b\x4c','\x61\x73\x66\x37\x65\x43\x6f\x79\x57\x35\x42\x63\x54\x57','\x78\x73\x35\x6f\x57\x52\x75\x6c','\x57\x50\x37\x64\x53\x71\x7a\x6a\x57\x37\x65','\x57\x50\x39\x51\x57\x36\x58\x6f\x6e\x47','\x68\x4b\x62\x50\x57\x35\x61\x31\x78\x53\x6f\x47\x57\x36\x37\x63\x50\x64\x6d\x4b','\x71\x68\x69\x37\x73\x6d\x6b\x6e\x57\x4f\x5a\x63\x55\x67\x43\x61\x68\x59\x64\x63\x50\x57','\x77\x53\x6b\x4b\x57\x37\x50\x4c\x57\x36\x47','\x65\x63\x54\x4c\x64\x53\x6f\x6e\x57\x34\x46\x63\x50\x30\x61','\x57\x37\x4b\x4e\x77\x30\x61\x74\x7a\x53\x6f\x41\x6d\x71','\x62\x73\x74\x64\x4b\x43\x6b\x59\x69\x63\x4e\x64\x50\x53\x6f\x6e','\x6f\x6d\x6f\x63\x46\x43\x6f\x63\x71\x64\x52\x64\x50\x6d\x6f\x4e','\x75\x43\x6b\x2b\x6a\x43\x6f\x2b\x41\x53\x6b\x7a\x75\x58\x48\x42\x57\x50\x79','\x6c\x59\x38\x4c\x6f\x53\x6b\x6d','\x41\x72\x69\x63\x6b\x6d\x6b\x72\x57\x51\x78\x63\x47\x6d\x6f\x45\x44\x75\x6e\x73\x57\x36\x54\x31','\x57\x51\x5a\x63\x50\x43\x6b\x6f\x57\x35\x47\x70','\x57\x4f\x66\x30\x45\x6d\x6b\x6e\x57\x52\x61\x74\x6c\x48\x47','\x72\x59\x71\x55\x65\x59\x33\x64\x49\x71','\x57\x36\x52\x63\x54\x75\x61\x4a\x57\x52\x37\x63\x48\x53\x6f\x51\x57\x36\x50\x34\x57\x50\x6d\x32','\x57\x37\x58\x4d\x57\x36\x5a\x64\x50\x33\x6c\x63\x4c\x30\x6c\x64\x4c\x30\x66\x4a\x70\x64\x79','\x44\x43\x6b\x6b\x44\x6d\x6b\x44\x57\x4f\x2f\x64\x49\x66\x66\x44','\x6b\x6d\x6b\x39\x57\x36\x38','\x66\x58\x47\x6d\x6a\x43\x6f\x32\x6a\x38\x6f\x72\x61\x6d\x6b\x66\x57\x4f\x74\x63\x50\x6d\x6b\x58\x45\x47','\x57\x4f\x37\x63\x55\x6d\x6f\x39\x57\x36\x5a\x63\x4f\x71','\x57\x52\x70\x63\x55\x53\x6b\x44\x57\x34\x52\x63\x51\x57','\x57\x52\x72\x71\x57\x35\x48\x58\x6d\x38\x6b\x50\x73\x6d\x6f\x6d','\x68\x78\x72\x35\x76\x6d\x6f\x4e\x57\x34\x70\x64\x52\x38\x6f\x51','\x46\x74\x38\x62\x57\x51\x54\x66\x79\x57','\x41\x43\x6b\x6c\x62\x53\x6f\x35\x42\x31\x6c\x64\x4f\x53\x6f\x63','\x57\x52\x37\x63\x54\x53\x6b\x67\x57\x36\x6d\x38','\x57\x4f\x33\x63\x54\x53\x6b\x45\x57\x35\x71','\x62\x43\x6f\x42\x68\x6d\x6f\x64\x57\x37\x66\x74\x57\x37\x6d\x6a','\x57\x36\x72\x43\x57\x36\x2f\x64\x48\x53\x6b\x55\x57\x52\x78\x63\x54\x38\x6f\x38','\x57\x4f\x70\x63\x53\x5a\x78\x64\x53\x77\x78\x64\x54\x43\x6f\x51\x71\x6d\x6b\x51\x57\x52\x37\x63\x4e\x53\x6b\x61','\x73\x47\x7a\x7a\x63\x38\x6f\x32\x57\x37\x56\x63\x48\x71','\x46\x6d\x6b\x72\x66\x53\x6f\x31\x57\x4f\x65','\x57\x51\x37\x63\x51\x43\x6b\x6b\x57\x50\x6c\x64\x47\x58\x69\x4d\x7a\x57'];_0x46b8=function(){return _0x9a065f;};return _0x46b8();}const _0x4bc476={};_0x4bc476[_0x147981(0x1db,'\x48\x6d\x70\x44')+_0x147981(0x1c8,'\x43\x46\x50\x64')]=_0xc4ff02,_0x4bc476['\x69\x73\x44\x69\x73\x61\x62\x6c'+'\x65\x64']=_0x192347,module[_0x147981(0x235,'\x5a\x26\x36\x54')]=_0x4bc476;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// GET /v1/models — model-list probe passthrough (format-aware routing, no translation). Many clients (codex,
|
|
4
|
+
// opencode, cursor in OpenAI mode, OpenAI/Anthropic SDKs) hit GET /v1/models on startup to validate the endpoint
|
|
5
|
+
// and list models; without a route they get a 404 and may fail to initialize or fall back. Route by the client's
|
|
6
|
+
// intended provider: Anthropic clients send the `anthropic-version` header → Anthropic /v1/models; everyone else
|
|
7
|
+
// → OpenAI /v1/models (the convention's home). Forwarded verbatim to the native upstream, no body, no translation.
|
|
8
|
+
// Not traced: it is a metadata probe, not an LLM call.
|
|
9
|
+
|
|
10
|
+
function detectModelsProvider(headers = {}) {
|
|
11
|
+
const lower = {};
|
|
12
|
+
for (const [k, v] of Object.entries(headers || {})) lower[String(k).toLowerCase()] = v;
|
|
13
|
+
// anthropic-version (and anthropic-beta) are sent by every Anthropic SDK request and by nothing else.
|
|
14
|
+
if (lower['anthropic-version'] || lower['anthropic-beta']) return 'anthropic';
|
|
15
|
+
return 'openai';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function buildModelsHandler({ anthropicProxy, openAIProxy, logger } = {}) {
|
|
19
|
+
if (typeof anthropicProxy !== 'function' || typeof openAIProxy !== 'function') {
|
|
20
|
+
throw new Error('buildModelsHandler requires anthropicProxy(path,body,opts) + openAIProxy(path,body,opts)');
|
|
21
|
+
}
|
|
22
|
+
const log = logger || console;
|
|
23
|
+
|
|
24
|
+
return async ({ headers }) => {
|
|
25
|
+
const inboundHeaders = headers || {};
|
|
26
|
+
const provider = detectModelsProvider(inboundHeaders);
|
|
27
|
+
const [proxyFn, reqPath, mode] = provider === 'anthropic'
|
|
28
|
+
? [anthropicProxy, '/v1/models', 'anthropic']
|
|
29
|
+
: [openAIProxy, '/models', 'openai'];
|
|
30
|
+
|
|
31
|
+
let up;
|
|
32
|
+
try {
|
|
33
|
+
up = await proxyFn(reqPath, null, { method: 'GET', inboundHeaders, upstreamMode: mode });
|
|
34
|
+
} catch (err) {
|
|
35
|
+
const status = Number(err && err.statusCode) || 502;
|
|
36
|
+
return { status, body: { error: (err && err.message) || 'models upstream request failed' } };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let raw = '';
|
|
40
|
+
try { raw = up.text ? await up.text() : ''; } catch { raw = ''; }
|
|
41
|
+
let body;
|
|
42
|
+
try {
|
|
43
|
+
body = raw ? JSON.parse(raw) : {};
|
|
44
|
+
} catch {
|
|
45
|
+
log.warn?.(JSON.stringify({ event: 'models_fallback', reason: 'upstream_non_json', upstream_status: up.status }));
|
|
46
|
+
body = { error: raw };
|
|
47
|
+
}
|
|
48
|
+
return { status: up.status, body };
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module.exports = { buildModelsHandler, detectModelsProvider };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Ollama native passthrough (local/self-hosted model server). Native paths POST /api/chat and /api/generate are
|
|
4
|
+
// forwarded verbatim to the Ollama upstream (EVOMAP_OLLAMA_BASE_URL, default 127.0.0.1:11434). Format-aware, no
|
|
5
|
+
// translation: an Ollama-shaped request goes to Ollama. Streaming is newline-delimited JSON (NDJSON), not SSE —
|
|
6
|
+
// the trace tee scans it the same way. apiPath is fixed per registration (/api/chat vs /api/generate). Ollama is
|
|
7
|
+
// typically auth-less; an optional bearer (EVOMAP_OLLAMA_API_KEY) covers a remote/protected instance.
|
|
8
|
+
|
|
9
|
+
const { createProxyTrace } = require('../trace/extractor');
|
|
10
|
+
|
|
11
|
+
function upstreamStatus(err, fallback = 502) {
|
|
12
|
+
const status = Number(err && err.statusCode);
|
|
13
|
+
return Number.isFinite(status) ? status : fallback;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function asUpstreamError(err, fallback = 502) {
|
|
17
|
+
if (err && err.statusCode && /^ollama upstream /.test(err.message || '')) return err;
|
|
18
|
+
const out = new Error('ollama upstream request failed');
|
|
19
|
+
out.statusCode = upstreamStatus(err, fallback);
|
|
20
|
+
out.cause = err;
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function responseToBody(raw, status, headers, log) {
|
|
25
|
+
if (!raw) return {};
|
|
26
|
+
try {
|
|
27
|
+
return JSON.parse(raw);
|
|
28
|
+
} catch {
|
|
29
|
+
log.warn?.(JSON.stringify({
|
|
30
|
+
event: 'ollama_fallback',
|
|
31
|
+
reason: 'upstream_non_json',
|
|
32
|
+
upstream_status: status,
|
|
33
|
+
content_type: (headers && headers['content-type']) || '',
|
|
34
|
+
response_bytes: Buffer.byteLength(raw),
|
|
35
|
+
}));
|
|
36
|
+
return { error: raw };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function buildOllamaHandler({ ollamaProxy, logger, traceStore, onTraceQueued, apiPath = '/api/chat' } = {}) {
|
|
41
|
+
if (typeof ollamaProxy !== 'function') {
|
|
42
|
+
throw new Error('buildOllamaHandler requires ollamaProxy(path, body, opts)');
|
|
43
|
+
}
|
|
44
|
+
const log = logger || console;
|
|
45
|
+
|
|
46
|
+
return async ({ body, headers }) => {
|
|
47
|
+
const inboundHeaders = headers || {};
|
|
48
|
+
const originalModel = body && typeof body.model === 'string' ? body.model : null;
|
|
49
|
+
|
|
50
|
+
let trace = null;
|
|
51
|
+
try {
|
|
52
|
+
trace = createProxyTrace({
|
|
53
|
+
route: `POST ${apiPath}`,
|
|
54
|
+
headers: inboundHeaders,
|
|
55
|
+
body,
|
|
56
|
+
upstreamMode: 'ollama',
|
|
57
|
+
originalModel,
|
|
58
|
+
chosenModel: originalModel,
|
|
59
|
+
store: traceStore,
|
|
60
|
+
logger: traceStore ? log : null,
|
|
61
|
+
onTraceQueued,
|
|
62
|
+
});
|
|
63
|
+
} catch (_) { /* best-effort trace; never break the request */ }
|
|
64
|
+
|
|
65
|
+
let upstream;
|
|
66
|
+
try {
|
|
67
|
+
upstream = await ollamaProxy(apiPath, body, { inboundHeaders, upstreamMode: 'ollama' });
|
|
68
|
+
} catch (err) {
|
|
69
|
+
const wrapped = asUpstreamError(err, upstreamStatus(err));
|
|
70
|
+
trace?.record({ status: wrapped.statusCode, error: wrapped, upstreamMode: 'ollama', model: originalModel });
|
|
71
|
+
throw wrapped;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (upstream.stream) {
|
|
75
|
+
const forwardHeaders = {};
|
|
76
|
+
const ct = upstream.headers && upstream.headers['content-type'];
|
|
77
|
+
if (ct) forwardHeaders['Content-Type'] = ct;
|
|
78
|
+
trace?.recordStreamStart({ status: upstream.status, upstreamMode: 'ollama', model: originalModel, headers: forwardHeaders });
|
|
79
|
+
return {
|
|
80
|
+
status: upstream.status,
|
|
81
|
+
// Tee the NDJSON body so the deferred trace captures the final chunk's eval counts + done_reason. Bytes unchanged.
|
|
82
|
+
stream: trace ? trace.observeStream(upstream.stream) : upstream.stream,
|
|
83
|
+
headers: forwardHeaders,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
let raw = '';
|
|
88
|
+
if (upstream.text) {
|
|
89
|
+
try {
|
|
90
|
+
raw = await upstream.text();
|
|
91
|
+
} catch (err) {
|
|
92
|
+
const wrapped = asUpstreamError(err, upstreamStatus(err));
|
|
93
|
+
trace?.record({ status: wrapped.statusCode, error: wrapped, upstreamMode: 'ollama', model: originalModel });
|
|
94
|
+
throw wrapped;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const respBody = responseToBody(raw, upstream.status, upstream.headers, log);
|
|
98
|
+
trace?.record({ status: upstream.status, responseBody: respBody, upstreamMode: 'ollama', model: originalModel, headers: upstream.headers });
|
|
99
|
+
return { status: upstream.status, body: respBody };
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
module.exports = { buildOllamaHandler, responseToBody };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Vertex AI Gemini passthrough (enterprise GCP). Same Gemini request/response body as the AI Studio route, but
|
|
4
|
+
// the native Vertex path — POST /v1/projects/<project>/locations/<location>/publishers/google/models/<model>:
|
|
5
|
+
// generateContent | :streamGenerateContent — a region-specific upstream (<location>-aiplatform.googleapis.com),
|
|
6
|
+
// and OAuth Bearer auth (EVOMAP_VERTEX_ACCESS_TOKEN). Forwarded verbatim, no translation. Trace reuses the Gemini
|
|
7
|
+
// shape (usageMetadata + candidates[].finishReason), so only the path + base + auth differ from the AI Studio route.
|
|
8
|
+
|
|
9
|
+
const { createProxyTrace } = require('../trace/extractor');
|
|
10
|
+
const { parseModelAction } = require('./gemini_route');
|
|
11
|
+
|
|
12
|
+
function upstreamStatus(err, fallback = 502) {
|
|
13
|
+
const status = Number(err && err.statusCode);
|
|
14
|
+
return Number.isFinite(status) ? status : fallback;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function asUpstreamError(err, fallback = 502) {
|
|
18
|
+
if (err && err.statusCode && /^vertex /.test(err.message || '')) return err;
|
|
19
|
+
const out = new Error('vertex upstream request failed');
|
|
20
|
+
out.statusCode = upstreamStatus(err, fallback);
|
|
21
|
+
out.cause = err;
|
|
22
|
+
return out;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function responseToBody(raw, status, headers, log) {
|
|
26
|
+
if (!raw) return {};
|
|
27
|
+
try {
|
|
28
|
+
return JSON.parse(raw);
|
|
29
|
+
} catch {
|
|
30
|
+
log.warn?.(JSON.stringify({
|
|
31
|
+
event: 'vertex_fallback', reason: 'upstream_non_json', upstream_status: status,
|
|
32
|
+
content_type: (headers && headers['content-type']) || '', response_bytes: Buffer.byteLength(raw),
|
|
33
|
+
}));
|
|
34
|
+
return { error: raw };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Region-specific Vertex base. EVOMAP_VERTEX_BASE_URL overrides (e.g. the global aiplatform endpoint); otherwise
|
|
39
|
+
// derive <location>-aiplatform.googleapis.com. `global` uses the un-prefixed host.
|
|
40
|
+
function vertexBaseUrl(location) {
|
|
41
|
+
const override = (process.env.EVOMAP_VERTEX_BASE_URL || '').trim();
|
|
42
|
+
if (override) return override.replace(/\/+$/, '');
|
|
43
|
+
const loc = String(location || '').trim();
|
|
44
|
+
if (!loc || loc === 'global') return 'https://aiplatform.googleapis.com';
|
|
45
|
+
return `https://${loc}-aiplatform.googleapis.com`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function buildVertexHandler({ vertexProxy, logger, traceStore, onTraceQueued } = {}) {
|
|
49
|
+
if (typeof vertexProxy !== 'function') {
|
|
50
|
+
throw new Error('buildVertexHandler requires vertexProxy(path, body, opts)');
|
|
51
|
+
}
|
|
52
|
+
const log = logger || console;
|
|
53
|
+
|
|
54
|
+
return async ({ body, headers, params, query }) => {
|
|
55
|
+
const inboundHeaders = headers || {};
|
|
56
|
+
const project = (params && params.project) || '';
|
|
57
|
+
const location = (params && params.location) || '';
|
|
58
|
+
const modelAction = (params && params.modelAction) || '';
|
|
59
|
+
const { model } = parseModelAction(modelAction);
|
|
60
|
+
const baseUrl = vertexBaseUrl(location);
|
|
61
|
+
const qs = query && Object.keys(query).length ? '?' + new URLSearchParams(query).toString() : '';
|
|
62
|
+
const reqPath = `/v1/projects/${project}/locations/${location}/publishers/google/models/${modelAction}${qs}`;
|
|
63
|
+
|
|
64
|
+
let trace = null;
|
|
65
|
+
try {
|
|
66
|
+
trace = createProxyTrace({
|
|
67
|
+
route: `POST /v1/projects/${project}/locations/${location}/publishers/google/models/${modelAction}`,
|
|
68
|
+
headers: inboundHeaders, body, upstreamMode: 'vertex', originalModel: model, chosenModel: model,
|
|
69
|
+
store: traceStore, logger: traceStore ? log : null, onTraceQueued,
|
|
70
|
+
});
|
|
71
|
+
} catch (_) { /* best-effort trace */ }
|
|
72
|
+
|
|
73
|
+
let upstream;
|
|
74
|
+
try {
|
|
75
|
+
upstream = await vertexProxy(reqPath, body, { baseUrl, inboundHeaders, upstreamMode: 'vertex' });
|
|
76
|
+
} catch (err) {
|
|
77
|
+
const wrapped = asUpstreamError(err, upstreamStatus(err));
|
|
78
|
+
trace?.record({ status: wrapped.statusCode, error: wrapped, upstreamMode: 'vertex', model });
|
|
79
|
+
throw wrapped;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (upstream.stream) {
|
|
83
|
+
const forwardHeaders = {};
|
|
84
|
+
const ct = upstream.headers && upstream.headers['content-type'];
|
|
85
|
+
if (ct) forwardHeaders['Content-Type'] = ct;
|
|
86
|
+
trace?.recordStreamStart({ status: upstream.status, upstreamMode: 'vertex', model, headers: forwardHeaders });
|
|
87
|
+
return {
|
|
88
|
+
status: upstream.status,
|
|
89
|
+
stream: trace ? trace.observeStream(upstream.stream) : upstream.stream,
|
|
90
|
+
headers: forwardHeaders,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
let raw = '';
|
|
95
|
+
if (upstream.text) {
|
|
96
|
+
try {
|
|
97
|
+
raw = await upstream.text();
|
|
98
|
+
} catch (err) {
|
|
99
|
+
const wrapped = asUpstreamError(err, upstreamStatus(err));
|
|
100
|
+
trace?.record({ status: wrapped.statusCode, error: wrapped, upstreamMode: 'vertex', model });
|
|
101
|
+
throw wrapped;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const respBody = responseToBody(raw, upstream.status, upstream.headers, log);
|
|
105
|
+
trace?.record({ status: upstream.status, responseBody: respBody, upstreamMode: 'vertex', model, headers: upstream.headers });
|
|
106
|
+
return { status: upstream.status, body: respBody };
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
module.exports = { buildVertexHandler, vertexBaseUrl };
|
|
@@ -12,6 +12,10 @@ function buildRoutes(store, proxyHandlers, taskMonitor, extensions) {
|
|
|
12
12
|
responsesHandler,
|
|
13
13
|
geminiHandler,
|
|
14
14
|
chatCompletionsHandler,
|
|
15
|
+
modelsHandler,
|
|
16
|
+
ollamaChatHandler,
|
|
17
|
+
ollamaGenerateHandler,
|
|
18
|
+
vertexHandler,
|
|
15
19
|
} = extensions || {};
|
|
16
20
|
const routes = {
|
|
17
21
|
// -- Mailbox --
|
|
@@ -487,6 +491,22 @@ function buildRoutes(store, proxyHandlers, taskMonitor, extensions) {
|
|
|
487
491
|
// OpenAI Chat Completions ingress (cursor's OpenAI mode + generic OpenAI clients) → OpenAI upstream.
|
|
488
492
|
routes['POST /v1/chat/completions'] = chatCompletionsHandler;
|
|
489
493
|
}
|
|
494
|
+
if (modelsHandler) {
|
|
495
|
+
// Model-list probe (codex/opencode/cursor/SDKs hit it on startup) → routed by anthropic-version header to
|
|
496
|
+
// the Anthropic or OpenAI upstream's /v1/models, so the probe never 404s.
|
|
497
|
+
routes['GET /v1/models'] = modelsHandler;
|
|
498
|
+
}
|
|
499
|
+
if (ollamaChatHandler) {
|
|
500
|
+
// Ollama native ingress (local/self-hosted models) → Ollama upstream, NDJSON streaming.
|
|
501
|
+
routes['POST /api/chat'] = ollamaChatHandler;
|
|
502
|
+
}
|
|
503
|
+
if (ollamaGenerateHandler) {
|
|
504
|
+
routes['POST /api/generate'] = ollamaGenerateHandler;
|
|
505
|
+
}
|
|
506
|
+
if (vertexHandler) {
|
|
507
|
+
// Vertex AI Gemini native path: project/location/model:action across fixed segments + :modelAction.
|
|
508
|
+
routes['POST /v1/projects/:project/locations/:location/publishers/google/models/:modelAction'] = vertexHandler;
|
|
509
|
+
}
|
|
490
510
|
|
|
491
511
|
return routes;
|
|
492
512
|
}
|