@evomap/evolver 1.90.0 → 2.0.0-beta.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/README.md +27 -564
- package/bin/evolver-llm-proxy.js +3 -0
- package/bin/evolver-mcp.js +2 -0
- package/bin/evolver-proxy.js +3 -0
- package/bin/evolver.js +4 -0
- package/index.js +1 -3670
- package/package.json +32 -62
- package/CONTRIBUTING.md +0 -19
- package/LICENSE +0 -641
- package/README.ja-JP.md +0 -521
- package/README.ko-KR.md +0 -520
- package/README.zh-CN.md +0 -531
- package/SKILL.md +0 -365
- package/assets/cover.png +0 -0
- package/assets/gep/genes.seed.json +0 -496
- package/conformance/savings-core/constants.json +0 -30
- package/conformance/savings-core/golden-vectors.json +0 -333
- package/scripts/a2a_export.js +0 -63
- package/scripts/a2a_ingest.js +0 -79
- package/scripts/a2a_promote.js +0 -118
- package/scripts/analyze_by_skill.js +0 -121
- package/scripts/build_binaries.js +0 -479
- package/scripts/check-changelog.js +0 -166
- package/scripts/extract_log.js +0 -85
- package/scripts/generate_history.js +0 -75
- package/scripts/gep_append_event.js +0 -96
- package/scripts/gep_personality_report.js +0 -234
- package/scripts/human_report.js +0 -147
- package/scripts/recall-verify-report.js +0 -234
- package/scripts/recover_loop.js +0 -61
- package/scripts/refresh_stars_badge.js +0 -168
- package/scripts/seed-merchants.js +0 -91
- package/scripts/skill2recipes.js +0 -118
- package/scripts/suggest_version.js +0 -89
- package/scripts/validate-modules.js +0 -38
- package/scripts/validate-suite.js +0 -78
- package/src/adapters/claudeCode.js +0 -194
- package/src/adapters/codex.js +0 -216
- package/src/adapters/cursor.js +0 -91
- package/src/adapters/hookAdapter.js +0 -469
- package/src/adapters/kiro.js +0 -195
- package/src/adapters/opencode.js +0 -326
- package/src/adapters/scripts/_lockPaths.js +0 -74
- package/src/adapters/scripts/_memoryFiltering.js +0 -35
- package/src/adapters/scripts/_runtimePaths.js +0 -440
- package/src/adapters/scripts/evolver-session-end.js +0 -321
- package/src/adapters/scripts/evolver-session-start.js +0 -587
- package/src/adapters/scripts/evolver-signal-detect.js +0 -98
- package/src/adapters/scripts/evolver-task-recall.js +0 -173
- package/src/atp/atpExecute.js +0 -283
- package/src/atp/atpTaskPickup.js +0 -233
- package/src/atp/autoBuyer.js +0 -382
- package/src/atp/autoDeliver.js +0 -215
- package/src/atp/cli.js +0 -354
- package/src/atp/cliAutobuyPrompt.js +0 -154
- package/src/atp/consumerAgent.js +0 -157
- package/src/atp/defaultHandler.js +0 -69
- package/src/atp/heartbeatSignalsHandler.js +0 -254
- package/src/atp/hubClient.js +0 -317
- package/src/atp/index.js +0 -38
- package/src/atp/merchantAgent.js +0 -118
- package/src/atp/protocol.js +0 -41
- package/src/atp/questionComposer.js +0 -133
- package/src/atp/serviceHelper.js +0 -92
- package/src/canary.js +0 -13
- package/src/config.js +0 -351
- package/src/evolve/guards.js +0 -1
- package/src/evolve/pipeline/collect.js +0 -1
- package/src/evolve/pipeline/dispatch.js +0 -1
- package/src/evolve/pipeline/enrich.js +0 -1
- package/src/evolve/pipeline/hub.js +0 -1
- package/src/evolve/pipeline/select.js +0 -1
- package/src/evolve/pipeline/signals.js +0 -1
- package/src/evolve/utils.js +0 -1
- package/src/evolve.js +0 -1
- package/src/experiment/agentRunner.js +0 -229
- package/src/experiment/cli.js +0 -159
- package/src/experiment/comparison.js +0 -233
- package/src/experiment/metrics.js +0 -75
- package/src/forceUpdate.js +0 -991
- package/src/gep/a2a.js +0 -173
- package/src/gep/a2aProtocol.js +0 -1
- package/src/gep/analyzer.js +0 -35
- package/src/gep/antiAbuseTelemetry.js +0 -1
- package/src/gep/assetCallLog.js +0 -197
- package/src/gep/assetStore.js +0 -723
- package/src/gep/assets.js +0 -36
- package/src/gep/autoDistillConv.js +0 -1
- package/src/gep/autoDistillLlm.js +0 -1
- package/src/gep/bridge.js +0 -138
- package/src/gep/candidateEval.js +0 -1
- package/src/gep/candidates.js +0 -1
- package/src/gep/claimNudge.js +0 -121
- package/src/gep/cliContracts.js +0 -1190
- package/src/gep/contentHash.js +0 -1
- package/src/gep/conversationDistiller.js +0 -1
- package/src/gep/conversationSniffer.js +0 -1
- package/src/gep/crypto.js +0 -1
- package/src/gep/curriculum.js +0 -1
- package/src/gep/deviceId.js +0 -1
- package/src/gep/directoryClient.js +0 -115
- package/src/gep/envFingerprint.js +0 -1
- package/src/gep/epigenetics.js +0 -1
- package/src/gep/execBridge.js +0 -1
- package/src/gep/executionTrace.js +0 -291
- package/src/gep/explore.js +0 -1
- package/src/gep/featureFlags.js +0 -121
- package/src/gep/gitOps.js +0 -265
- package/src/gep/hash.js +0 -1
- package/src/gep/hostErrorClassifier.js +0 -34
- package/src/gep/hubFetch.js +0 -1
- package/src/gep/hubReview.js +0 -1
- package/src/gep/hubSearch.js +0 -1
- package/src/gep/hubVerify.js +0 -1
- package/src/gep/idleScheduler.js +0 -400
- package/src/gep/issueReporter.js +0 -416
- package/src/gep/learningSignals.js +0 -1
- package/src/gep/llmReview.js +0 -92
- package/src/gep/localStateAwareness.js +0 -243
- package/src/gep/mailboxTransport.js +0 -119
- package/src/gep/memoryGraph.js +0 -1
- package/src/gep/memoryGraphAdapter.js +0 -1
- package/src/gep/mutation.js +0 -1
- package/src/gep/narrativeMemory.js +0 -1
- package/src/gep/oauthLogin.js +0 -181
- package/src/gep/openPRRegistry.js +0 -1
- package/src/gep/paths.js +0 -522
- package/src/gep/personality.js +0 -1
- package/src/gep/policyCheck.js +0 -1
- package/src/gep/portable.js +0 -103
- package/src/gep/privacyClient.js +0 -235
- package/src/gep/prompt.js +0 -1
- package/src/gep/questionGenerator.js +0 -518
- package/src/gep/recallInject.js +0 -1
- package/src/gep/recallVerifier.js +0 -1
- package/src/gep/reflection.js +0 -1
- package/src/gep/sanitize.js +0 -264
- package/src/gep/savingsCore.js +0 -1
- package/src/gep/schemas/capsule.js +0 -170
- package/src/gep/schemas/gene.js +0 -154
- package/src/gep/schemas/index.js +0 -8
- package/src/gep/schemas/protocol.js +0 -51
- package/src/gep/schemas/task.js +0 -74
- package/src/gep/selector.js +0 -1
- package/src/gep/selfPR.js +0 -469
- package/src/gep/signals.js +0 -776
- package/src/gep/skill2gep.js +0 -1056
- package/src/gep/skill2gepAudit.js +0 -303
- package/src/gep/skill2recipes.js +0 -511
- package/src/gep/skillDistiller.js +0 -1
- package/src/gep/skillPublisher.js +0 -358
- package/src/gep/solidify.js +0 -1
- package/src/gep/strategy.js +0 -1
- package/src/gep/taskReceiver.js +0 -575
- package/src/gep/tokenSavings.js +0 -1
- package/src/gep/trajectoryExport.js +0 -1
- package/src/gep/validationReport.js +0 -55
- package/src/gep/validator/index.js +0 -411
- package/src/gep/validator/reporter.js +0 -210
- package/src/gep/validator/sandboxExecutor.js +0 -480
- package/src/gep/validator/stakeBootstrap.js +0 -357
- package/src/gep/workspaceKeychain.js +0 -1
- package/src/ops/cleanup.js +0 -80
- package/src/ops/commentary.js +0 -60
- package/src/ops/health_check.js +0 -104
- package/src/ops/index.js +0 -11
- package/src/ops/innovation.js +0 -67
- package/src/ops/lifecycle.js +0 -798
- package/src/ops/self_repair.js +0 -76
- package/src/ops/skills_monitor.js +0 -147
- package/src/ops/trigger.js +0 -33
- package/src/proxy/clientSettings.js +0 -405
- package/src/proxy/envelope.js +0 -59
- package/src/proxy/extensions/dmHandler.js +0 -45
- package/src/proxy/extensions/sessionHandler.js +0 -141
- package/src/proxy/extensions/skillUpdater.js +0 -64
- package/src/proxy/extensions/traceControl.js +0 -1
- package/src/proxy/index.js +0 -1395
- package/src/proxy/inject.js +0 -1
- package/src/proxy/lifecycle/manager.js +0 -1568
- package/src/proxy/mailbox/state.js +0 -207
- package/src/proxy/mailbox/store.js +0 -602
- package/src/proxy/router/cache_passthrough.js +0 -26
- package/src/proxy/router/features.js +0 -84
- package/src/proxy/router/gemini_route.js +0 -154
- package/src/proxy/router/messages_route.js +0 -535
- package/src/proxy/router/model_router.js +0 -113
- package/src/proxy/router/models_route.js +0 -52
- package/src/proxy/router/ollama_route.js +0 -103
- package/src/proxy/router/responses_route.js +0 -170
- package/src/proxy/router/vertex_route.js +0 -110
- package/src/proxy/server/http.js +0 -363
- package/src/proxy/server/routes.js +0 -558
- package/src/proxy/server/settings.js +0 -115
- package/src/proxy/sync/engine.js +0 -179
- package/src/proxy/sync/inbound.js +0 -211
- package/src/proxy/sync/outbound.js +0 -361
- package/src/proxy/task/monitor.js +0 -131
- package/src/proxy/trace/extractor.js +0 -1
- package/src/proxy/trace/usage.js +0 -1
- package/src/solo/breaker.js +0 -25
- package/src/solo/gitGuard.js +0 -65
- package/src/webui/client/clientJs/assets.js +0 -111
- package/src/webui/client/clientJs/bootstrap.js +0 -92
- package/src/webui/client/clientJs/common.js +0 -77
- package/src/webui/client/clientJs/i18n.js +0 -366
- package/src/webui/client/clientJs/index.js +0 -35
- package/src/webui/client/clientJs/interactions.js +0 -351
- package/src/webui/client/clientJs/overview.js +0 -152
- package/src/webui/client/clientJs/personality.js +0 -285
- package/src/webui/client/clientJs/pipelines.js +0 -330
- package/src/webui/client/indexHtml.js +0 -221
- package/src/webui/client/static.js +0 -23
- package/src/webui/client/stylesCss.js +0 -639
- package/src/webui/client/vendor/README.md +0 -15
- package/src/webui/client/vendor/echarts.min.js +0 -45
- package/src/webui/index.js +0 -14
- package/src/webui/observer/assets.js +0 -146
- package/src/webui/observer/index.js +0 -37
- package/src/webui/observer/interactions.js +0 -127
- package/src/webui/observer/jsonl.js +0 -75
- package/src/webui/observer/paths.js +0 -46
- package/src/webui/observer/personality.js +0 -43
- package/src/webui/observer/pipelineEvents.js +0 -58
- package/src/webui/observer/redact.js +0 -63
- package/src/webui/observer/runs.js +0 -356
- package/src/webui/observer/safety.js +0 -57
- package/src/webui/observer/skills.js +0 -70
- package/src/webui/observer/status.js +0 -71
- package/src/webui/server/http.js +0 -138
- package/src/webui/server/routes.js +0 -41
package/src/proxy/trace/usage.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const _0x57e99d=_0x2380;function _0x2380(_0x303e5e,_0x14fbf8){_0x303e5e=_0x303e5e-(-0x6b*0xc+0x22b1+-0xd*0x232);const _0x2c9a87=_0x404b();let _0x55bcb2=_0x2c9a87[_0x303e5e];if(_0x2380['\x62\x6a\x66\x46\x45\x4c']===undefined){var _0x35423d=function(_0x1393ab){const _0x4b72e1='\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 _0x3be0a8='',_0x548732='',_0x5b3069=_0x3be0a8+_0x35423d,_0x341dc4=(''+function(){return 0xfce+0x1064+-0x2032;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(0x1*-0xd4c+0x1db+0x125*0xa);for(let _0x11905c=0xcc8+0x14*0x27+-0xfd4,_0x32888e,_0x2b94cf,_0x107050=-0x146e*0x1+-0x223e+0x36ac;_0x2b94cf=_0x1393ab['\x63\x68\x61\x72\x41\x74'](_0x107050++);~_0x2b94cf&&(_0x32888e=_0x11905c%(-0x4*0x6c8+0x1*-0x161e+-0x1*-0x3142)?_0x32888e*(0x1158+0x1*0x1e7f+-0x2f97)+_0x2b94cf:_0x2b94cf,_0x11905c++%(-0x26d8+-0x9b0+-0x1a*-0x1de))?_0x3be0a8+=_0x341dc4||_0x5b3069['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x107050+(0x162e*-0x1+0x1650+-0x18))-(-0xb9e+0x20c+-0x1*-0x99c)!==0x3*0x557+-0x262a+0x1625*0x1?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x5c8+-0x7*-0x1ab+-0x1076&_0x32888e>>(-(-0x233f+-0x3f9*0x1+-0x139d*-0x2)*_0x11905c&-0x1d59+0x4*0x50b+0x5*0x1d7)):_0x11905c:-0x5e9*0x1+0x1f2d*0x1+0x3*-0x86c){_0x2b94cf=_0x4b72e1['\x69\x6e\x64\x65\x78\x4f\x66'](_0x2b94cf);}for(let _0x1706ca=-0x3*-0xc43+-0xffe+0x1*-0x14cb,_0x5ccb07=_0x3be0a8['\x6c\x65\x6e\x67\x74\x68'];_0x1706ca<_0x5ccb07;_0x1706ca++){_0x548732+='\x25'+('\x30\x30'+_0x3be0a8['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1706ca)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x821+-0x1*-0xc31+-0x1442))['\x73\x6c\x69\x63\x65'](-(0x5*0x34d+0x1814*0x1+0x263*-0x11));}return decodeURIComponent(_0x548732);};const _0x5c8d98=function(_0x52430f,_0x30b6b9){let _0x1d7765=[],_0x24e343=-0x1063*-0x1+-0x2540+-0x31*-0x6d,_0x29b68c,_0x4e7029='';_0x52430f=_0x35423d(_0x52430f);let _0x47cc3c;for(_0x47cc3c=0xbb+-0x25b8+0x22d*0x11;_0x47cc3c<-0x89*0x5+-0xd3+0x480;_0x47cc3c++){_0x1d7765[_0x47cc3c]=_0x47cc3c;}for(_0x47cc3c=0x10b8+-0x17f0+-0x84*-0xe;_0x47cc3c<-0x1*-0x17d0+0x37*0x4d+-0x275b;_0x47cc3c++){_0x24e343=(_0x24e343+_0x1d7765[_0x47cc3c]+_0x30b6b9['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x47cc3c%_0x30b6b9['\x6c\x65\x6e\x67\x74\x68']))%(-0x1a78+0x8db+0x129d),_0x29b68c=_0x1d7765[_0x47cc3c],_0x1d7765[_0x47cc3c]=_0x1d7765[_0x24e343],_0x1d7765[_0x24e343]=_0x29b68c;}_0x47cc3c=-0xa4f+0x217d+-0xb97*0x2,_0x24e343=-0x1*-0x1079+0x1272+-0x4fd*0x7;for(let _0x19a0de=-0x3*0x2db+0x30b+0x586;_0x19a0de<_0x52430f['\x6c\x65\x6e\x67\x74\x68'];_0x19a0de++){_0x47cc3c=(_0x47cc3c+(-0x9b*-0xe+-0xef1+-0x228*-0x3))%(0x1*-0x1d75+-0x34*-0x14+0x1a65*0x1),_0x24e343=(_0x24e343+_0x1d7765[_0x47cc3c])%(-0x2592+-0x1*0x163+0x1*0x27f5),_0x29b68c=_0x1d7765[_0x47cc3c],_0x1d7765[_0x47cc3c]=_0x1d7765[_0x24e343],_0x1d7765[_0x24e343]=_0x29b68c,_0x4e7029+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x52430f['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x19a0de)^_0x1d7765[(_0x1d7765[_0x47cc3c]+_0x1d7765[_0x24e343])%(0x114e*-0x1+-0x91f+0x1b6d)]);}return _0x4e7029;};_0x2380['\x7a\x59\x58\x4f\x79\x65']=_0x5c8d98,_0x2380['\x79\x6d\x57\x47\x45\x46']={},_0x2380['\x62\x6a\x66\x46\x45\x4c']=!![];}const _0x372603=_0x2c9a87[-0x970*-0x1+0xd*0x26e+-0x2906],_0x819d01=_0x303e5e+_0x372603,_0x5bdb6a=_0x2380['\x79\x6d\x57\x47\x45\x46'][_0x819d01];if(!_0x5bdb6a){if(_0x2380['\x4a\x6f\x76\x57\x6f\x71']===undefined){const _0x18eb38=function(_0x5b18c9){this['\x75\x6e\x7a\x48\x46\x47']=_0x5b18c9,this['\x6b\x73\x4b\x4a\x46\x4e']=[0xb*0x24b+-0x412+-0xa93*0x2,-0x6*-0x3d5+0x1*-0x223+-0x14db,-0x269d+0x43+0x265a],this['\x4c\x59\x45\x5a\x5a\x70']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x50\x71\x69\x66\x4f\x4b']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x68\x68\x74\x74\x6d\x6c']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x18eb38['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x43\x4c\x42\x71\x48\x70']=function(){const _0x10a29b=new RegExp(this['\x50\x71\x69\x66\x4f\x4b']+this['\x68\x68\x74\x74\x6d\x6c']),_0x32dc0e=_0x10a29b['\x74\x65\x73\x74'](this['\x4c\x59\x45\x5a\x5a\x70']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x6b\x73\x4b\x4a\x46\x4e'][-0x23e8+0x601*0x1+-0xef4*-0x2]:--this['\x6b\x73\x4b\x4a\x46\x4e'][0x2*-0x504+-0x2150*-0x1+0x4*-0x5d2];return this['\x4f\x58\x79\x4c\x51\x77'](_0x32dc0e);},_0x18eb38['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x4f\x58\x79\x4c\x51\x77']=function(_0x151adf){if(!Boolean(~_0x151adf))return _0x151adf;return this['\x66\x77\x66\x79\x76\x42'](this['\x75\x6e\x7a\x48\x46\x47']);},_0x18eb38['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x66\x77\x66\x79\x76\x42']=function(_0x51c85c){for(let _0x4b836d=-0x1eec+-0x2a6*-0xa+-0x11c*-0x4,_0x44569c=this['\x6b\x73\x4b\x4a\x46\x4e']['\x6c\x65\x6e\x67\x74\x68'];_0x4b836d<_0x44569c;_0x4b836d++){this['\x6b\x73\x4b\x4a\x46\x4e']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x44569c=this['\x6b\x73\x4b\x4a\x46\x4e']['\x6c\x65\x6e\x67\x74\x68'];}return _0x51c85c(this['\x6b\x73\x4b\x4a\x46\x4e'][0x16fa+-0x2b3*0x7+-0x415]);},(''+function(){return-0x1bed*-0x1+0x31*0x7f+0x1*-0x343c;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(0x26df+0x10d*0x21+-0x119*0x43)&&new _0x18eb38(_0x2380)['\x43\x4c\x42\x71\x48\x70'](),_0x2380['\x4a\x6f\x76\x57\x6f\x71']=!![];}_0x55bcb2=_0x2380['\x7a\x59\x58\x4f\x79\x65'](_0x55bcb2,_0x14fbf8),_0x2380['\x79\x6d\x57\x47\x45\x46'][_0x819d01]=_0x55bcb2;}else _0x55bcb2=_0x5bdb6a;return _0x55bcb2;}(function(_0x2cb84a,_0x150ffc){const _0x2edfb3=_0x2380,_0x2cbd06=_0x2cb84a();while(!![]){try{const _0x42a4ac=parseInt(_0x2edfb3(0x132,'\x40\x4a\x30\x6a'))/(-0x10a5+0x1*-0x26f6+0x379c)*(-parseInt(_0x2edfb3(0x182,'\x42\x63\x49\x57'))/(0x863*-0x3+-0x1491+0x2dbc))+-parseInt(_0x2edfb3(0x12d,'\x6b\x58\x71\x43'))/(-0x2162*0x1+-0x3d6+-0x161*-0x1b)+parseInt(_0x2edfb3(0x16d,'\x4f\x2a\x57\x34'))/(0x249f+-0x23fa+-0xa1)+-parseInt(_0x2edfb3(0x17f,'\x4c\x41\x54\x29'))/(0x22d3+0x4d4+0x13*-0x216)*(-parseInt(_0x2edfb3(0x123,'\x6f\x5a\x50\x33'))/(0x1f7*-0x9+-0x3eb+0x15a0))+-parseInt(_0x2edfb3(0x144,'\x4f\x33\x38\x49'))/(-0x9a3*0x1+0x1556+-0x2eb*0x4)+-parseInt(_0x2edfb3(0x17a,'\x25\x5b\x40\x61'))/(0x1bf4+-0x1*-0x203+-0x1def)+parseInt(_0x2edfb3(0x184,'\x39\x5b\x59\x36'))/(0x1184+-0x115a+0x1*-0x21)*(parseInt(_0x2edfb3(0x126,'\x6f\x5a\x50\x33'))/(-0x46d*-0x1+-0x22c0+0x1e5d));if(_0x42a4ac===_0x150ffc)break;else _0x2cbd06['push'](_0x2cbd06['shift']());}catch(_0x2cb4f0){_0x2cbd06['push'](_0x2cbd06['shift']());}}}(_0x404b,-0x4*0x1e963+0x1*0x730a3+0x4a001));const _0x2661ed=(function(){const _0x123cc4=_0x2380,_0x3ea51f={};_0x3ea51f[_0x123cc4(0x140,'\x6e\x51\x75\x4c')]=function(_0x29f4ce,_0x16a5dc){return _0x29f4ce!==_0x16a5dc;},_0x3ea51f[_0x123cc4(0x159,'\x4c\x6d\x77\x42')]=_0x123cc4(0x17d,'\x6a\x5b\x44\x77');const _0x1ca9e5=_0x3ea51f;let _0x848826=!![];return function(_0xc36337,_0x3c8fa1){const _0x3a62dc=_0x848826?function(){const _0x2ef129=_0x2380;if(_0x3c8fa1){if(_0x1ca9e5[_0x2ef129(0x175,'\x23\x42\x67\x4f')](_0x1ca9e5[_0x2ef129(0x14e,'\x4a\x75\x4f\x59')],_0x1ca9e5[_0x2ef129(0x17b,'\x68\x57\x70\x52')]))_0x3808c3=null;else{const _0x438b51=_0x3c8fa1[_0x2ef129(0x151,'\x40\x6c\x5e\x75')](_0xc36337,arguments);return _0x3c8fa1=null,_0x438b51;}}}:function(){};return _0x848826=![],_0x3a62dc;};}()),_0x1ec9f6=_0x2661ed(this,function(){const _0x5ba72a=_0x2380,_0x122d70={};_0x122d70[_0x5ba72a(0x15e,'\x25\x56\x59\x32')]=_0x5ba72a(0x12f,'\x40\x62\x58\x57')+_0x5ba72a(0x14f,'\x4f\x6c\x38\x26');const _0x331050=_0x122d70;return _0x1ec9f6[_0x5ba72a(0x13b,'\x40\x62\x58\x57')]()[_0x5ba72a(0x150,'\x75\x4d\x6a\x72')](_0x5ba72a(0x13d,'\x68\x57\x70\x52')+'\x2b\x29\x2b\x24')[_0x5ba72a(0x141,'\x67\x50\x5b\x48')]()[_0x5ba72a(0x153,'\x75\x4d\x6a\x72')+_0x5ba72a(0x16b,'\x6f\x6d\x75\x4e')](_0x1ec9f6)[_0x5ba72a(0x187,'\x50\x2a\x73\x34')](_0x331050[_0x5ba72a(0x13f,'\x4a\x36\x6f\x4a')]);});_0x1ec9f6();'use strict';const _0x4c69db=require('\x66\x73'),{resolveTraceFile:_0x544f8a,resolveEvomapNodeSecret:_0x253b1e,decryptTraceEnvelope:_0x10f7e2}=require(_0x57e99d(0x154,'\x39\x5b\x59\x36')+_0x57e99d(0x156,'\x4b\x7a\x30\x76')),_0x5bfe0e={};function _0x404b(){const _0x2ad60b=['\x57\x36\x4a\x63\x4f\x4b\x69\x36\x63\x53\x6b\x77\x78\x38\x6f\x2b','\x46\x65\x54\x34','\x79\x6d\x6b\x4a\x72\x30\x75\x72','\x57\x50\x30\x33\x62\x43\x6b\x6e\x57\x35\x56\x64\x56\x6d\x6f\x75\x57\x35\x6e\x61\x57\x36\x38\x43\x57\x37\x4b','\x57\x35\x64\x64\x48\x63\x37\x64\x52\x57','\x76\x6d\x6f\x75\x57\x35\x74\x63\x4b\x67\x31\x42\x77\x63\x4f','\x57\x51\x64\x63\x4e\x53\x6b\x63\x57\x4f\x6e\x54','\x57\x35\x43\x67\x6f\x53\x6f\x42\x57\x50\x47\x58\x57\x50\x5a\x64\x56\x47','\x57\x35\x6c\x64\x4c\x38\x6f\x43\x57\x37\x62\x7a','\x57\x37\x74\x64\x53\x68\x46\x64\x54\x63\x38','\x78\x53\x6f\x2f\x6e\x72\x68\x63\x4c\x57','\x77\x53\x6f\x71\x75\x38\x6b\x49\x57\x4f\x68\x64\x4d\x38\x6b\x70\x44\x71','\x62\x53\x6f\x49\x57\x37\x74\x64\x4b\x59\x6e\x33\x57\x52\x5a\x64\x56\x71','\x64\x43\x6b\x39\x6b\x47\x46\x63\x4b\x43\x6b\x34\x63\x6d\x6f\x37','\x57\x50\x46\x64\x4d\x53\x6b\x46\x57\x51\x68\x64\x4e\x49\x37\x63\x55\x53\x6b\x71\x6c\x73\x30\x6b','\x57\x4f\x39\x70\x79\x6d\x6b\x67\x57\x35\x79','\x57\x37\x33\x64\x49\x66\x5a\x64\x4a\x58\x75','\x57\x50\x78\x63\x52\x53\x6f\x52\x57\x36\x54\x6f\x42\x6d\x6b\x68\x79\x61','\x67\x78\x46\x64\x50\x53\x6f\x6b\x6c\x47','\x6b\x53\x6f\x52\x57\x50\x4a\x63\x4b\x31\x6d\x34\x42\x77\x6d','\x57\x35\x74\x64\x48\x48\x64\x64\x50\x53\x6b\x35','\x61\x4c\x58\x42\x6d\x43\x6b\x4d\x57\x4f\x43\x57\x64\x61','\x57\x51\x52\x63\x55\x62\x5a\x64\x4c\x53\x6f\x70','\x57\x50\x42\x64\x4b\x4b\x48\x72\x6a\x61','\x62\x53\x6f\x50\x57\x34\x64\x64\x4e\x63\x75','\x57\x4f\x5a\x63\x54\x38\x6b\x4c\x57\x51\x30','\x64\x53\x6b\x4f\x57\x34\x6d\x44\x57\x36\x78\x63\x4b\x47','\x57\x51\x46\x64\x4c\x30\x39\x32\x64\x61','\x57\x50\x70\x64\x51\x61\x56\x63\x4f\x4c\x39\x72\x57\x34\x4a\x64\x4f\x6d\x6b\x6b\x57\x52\x69','\x68\x53\x6b\x49\x57\x34\x57\x43\x57\x37\x6c\x63\x49\x67\x58\x55','\x70\x38\x6b\x68\x57\x50\x6a\x36\x57\x34\x6c\x64\x50\x53\x6f\x33\x6e\x61','\x62\x4b\x6a\x59\x57\x4f\x53','\x71\x72\x7a\x67','\x57\x4f\x54\x62\x7a\x53\x6b\x75\x57\x35\x39\x68\x57\x34\x70\x63\x55\x61','\x6f\x4b\x35\x4f\x57\x50\x4a\x64\x53\x43\x6f\x65\x62\x68\x38','\x6c\x57\x6c\x64\x50\x48\x6c\x63\x4f\x57','\x46\x4b\x71\x38\x57\x37\x2f\x64\x51\x61','\x67\x38\x6f\x4c\x57\x36\x4e\x64\x47\x59\x72\x43\x57\x51\x4e\x64\x56\x57','\x71\x62\x44\x61\x57\x37\x61\x75\x57\x52\x62\x53\x6f\x61','\x62\x43\x6f\x2f\x57\x37\x66\x45\x78\x32\x56\x64\x4c\x57\x43','\x41\x48\x56\x63\x55\x75\x43\x78','\x57\x36\x33\x64\x55\x38\x6b\x53\x57\x35\x48\x61','\x76\x43\x6f\x76\x57\x37\x70\x63\x4a\x78\x6e\x37\x72\x73\x69','\x57\x52\x78\x64\x4c\x31\x6e\x5a\x61\x71','\x57\x52\x70\x63\x4a\x43\x6b\x76\x57\x50\x66\x38\x57\x35\x56\x64\x47\x4d\x75','\x66\x43\x6f\x4e\x57\x52\x56\x63\x56\x4c\x53','\x6b\x6d\x6f\x47\x57\x36\x74\x64\x56\x43\x6f\x54','\x6e\x32\x6d\x75\x57\x4f\x64\x63\x55\x47','\x57\x35\x5a\x64\x52\x33\x70\x63\x4f\x71\x38','\x46\x53\x6f\x6e\x57\x36\x38\x55\x57\x4f\x6d','\x7a\x30\x76\x7a\x70\x4c\x61','\x68\x75\x58\x66\x42\x4d\x6e\x61\x61\x76\x38','\x6d\x77\x74\x63\x54\x53\x6f\x76\x57\x35\x33\x64\x56\x72\x7a\x73','\x6c\x68\x4a\x63\x47\x47','\x57\x35\x56\x64\x4c\x53\x6b\x62\x57\x35\x50\x59\x70\x74\x52\x63\x53\x61','\x77\x63\x78\x63\x50\x43\x6b\x61\x43\x38\x6f\x44\x57\x37\x79\x70\x57\x50\x43\x4e\x57\x50\x5a\x64\x4d\x74\x4f','\x6b\x68\x42\x63\x47\x53\x6f\x70\x57\x35\x79','\x46\x38\x6b\x4d\x69\x38\x6f\x48','\x57\x37\x5a\x63\x51\x43\x6f\x39\x57\x36\x56\x63\x4f\x71','\x74\x78\x7a\x53\x57\x52\x6d\x38','\x57\x52\x78\x64\x47\x4d\x33\x64\x56\x4b\x53','\x57\x35\x4a\x64\x4e\x53\x6b\x44\x57\x34\x50\x59','\x61\x75\x35\x67\x74\x4e\x6d','\x42\x6d\x6f\x68\x57\x52\x37\x64\x47\x53\x6b\x51','\x57\x34\x7a\x5a\x43\x53\x6f\x77\x57\x4f\x68\x63\x52\x43\x6f\x30\x57\x37\x57','\x43\x6d\x6b\x66\x72\x77\x4b\x41\x74\x58\x75\x61','\x57\x34\x4c\x59\x75\x43\x6f\x41\x57\x50\x78\x63\x4f\x71','\x57\x52\x4e\x64\x4d\x32\x33\x64\x53\x75\x5a\x63\x4f\x31\x78\x64\x4f\x57','\x73\x72\x61\x77\x6a\x76\x72\x57\x69\x30\x68\x63\x4e\x32\x4b','\x57\x4f\x54\x6d\x73\x38\x6b\x46\x57\x34\x79','\x78\x53\x6f\x30\x57\x36\x69\x4a\x57\x4f\x68\x64\x54\x53\x6b\x79\x73\x47','\x57\x36\x70\x64\x51\x43\x6b\x4c\x57\x34\x35\x63','\x74\x65\x71\x54\x57\x37\x5a\x64\x4a\x61','\x43\x38\x6b\x6f\x57\x4f\x46\x63\x49\x32\x34\x7a\x46\x43\x6b\x70','\x79\x6d\x6b\x77\x57\x50\x4f\x37','\x73\x64\x78\x63\x4a\x65\x53\x31\x62\x53\x6b\x4d','\x57\x36\x4e\x63\x4b\x74\x2f\x63\x51\x61\x52\x64\x53\x66\x78\x64\x52\x4b\x54\x4b\x67\x63\x38','\x74\x4c\x6d\x6d\x57\x36\x70\x64\x4d\x43\x6f\x2b\x57\x37\x4e\x64\x49\x47','\x69\x6d\x6b\x44\x57\x34\x43\x37\x57\x4f\x37\x63\x4f\x43\x6b\x55\x65\x43\x6f\x6e\x57\x37\x42\x63\x4d\x68\x34\x34','\x57\x36\x46\x64\x49\x78\x6c\x63\x48\x61\x47','\x6e\x33\x78\x63\x4d\x53\x6f\x7a\x57\x35\x64\x64\x4f\x61','\x57\x35\x4e\x63\x54\x66\x4a\x64\x51\x68\x35\x37','\x69\x62\x6d\x2b\x74\x74\x68\x64\x53\x4a\x65\x56\x57\x50\x31\x57\x46\x31\x38','\x72\x53\x6f\x47\x57\x52\x50\x4f\x57\x35\x75','\x75\x38\x6f\x6f\x57\x36\x52\x63\x54\x4d\x50\x43\x79\x5a\x34','\x69\x62\x72\x51\x68\x77\x4a\x63\x4a\x59\x47\x39','\x57\x36\x4a\x63\x55\x4e\x52\x64\x49\x30\x4b','\x72\x43\x6f\x41\x42\x53\x6b\x4c','\x57\x51\x5a\x64\x4a\x78\x4a\x64\x55\x67\x30','\x78\x53\x6f\x51\x67\x61','\x57\x35\x37\x64\x4a\x4d\x37\x63\x52\x38\x6b\x6e\x57\x34\x42\x64\x55\x4a\x2f\x64\x52\x4b\x64\x64\x53\x61','\x76\x49\x54\x49\x57\x35\x4e\x64\x52\x43\x6b\x56\x57\x4f\x37\x64\x4e\x6d\x6f\x55\x76\x53\x6f\x2b\x57\x4f\x6d','\x45\x38\x6f\x33\x57\x35\x33\x63\x53\x53\x6b\x6e\x57\x51\x6d\x6a\x57\x52\x71\x4e\x57\x50\x52\x63\x51\x59\x79\x6c','\x67\x53\x6f\x51\x57\x51\x68\x63\x4a\x77\x30','\x63\x6d\x6b\x74\x57\x51\x2f\x64\x49\x4a\x71\x42\x68\x77\x71','\x57\x50\x35\x4c\x74\x6d\x6f\x35\x57\x51\x4a\x63\x51\x6d\x6f\x35','\x6a\x6d\x6b\x45\x57\x36\x6d\x45\x57\x37\x6d','\x79\x43\x6f\x7a\x6c\x6d\x6f\x49\x57\x36\x53\x39\x41\x71','\x57\x52\x6a\x53\x74\x4d\x47\x47\x70\x53\x6f\x54\x73\x57','\x6b\x6d\x6f\x66\x6d\x4a\x4c\x6d\x66\x76\x6d\x46\x57\x37\x35\x55\x57\x34\x44\x2b\x57\x35\x57','\x57\x50\x6a\x50\x72\x38\x6b\x47\x57\x35\x65'];_0x404b=function(){return _0x2ad60b;};return _0x404b();}_0x5bfe0e[_0x57e99d(0x15b,'\x4a\x75\x4f\x59')+'\x6b\x65\x6e\x73']=0x0,_0x5bfe0e[_0x57e99d(0x14b,'\x48\x69\x25\x28')+_0x57e99d(0x172,'\x42\x63\x49\x57')]=0x0,_0x5bfe0e[_0x57e99d(0x157,'\x68\x57\x70\x52')+_0x57e99d(0x13a,'\x77\x21\x41\x61')]=0x0,_0x5bfe0e['\x63\x61\x6c\x6c\x73']=0x0,_0x5bfe0e[_0x57e99d(0x169,'\x25\x5b\x40\x61')]=![];const _0x54cea0=Object[_0x57e99d(0x178,'\x43\x74\x43\x4d')](_0x5bfe0e);function _0x31d480(_0x2f7ce9){const _0x36cfd2=_0x57e99d,_0x4928b2={'\x61\x41\x6b\x61\x68':function(_0x2bd38f,_0x346052){return _0x2bd38f(_0x346052);},'\x6d\x47\x55\x55\x62':function(_0x4d2391,_0x5033d2){return _0x4d2391*_0x5033d2;},'\x45\x44\x43\x61\x57':function(_0x2fbf02,_0x12da2d){return _0x2fbf02(_0x12da2d);}},_0xb64662=_0x2f7ce9&&(_0x2f7ce9[_0x36cfd2(0x142,'\x4a\x75\x4f\x59')+'\x70']||_0x2f7ce9[_0x36cfd2(0x162,'\x68\x6b\x45\x50')+_0x36cfd2(0x16f,'\x48\x70\x55\x45')]);if(_0xb64662){const _0x49f8a3=Date[_0x36cfd2(0x13c,'\x68\x6b\x45\x50')](_0xb64662);if(Number[_0x36cfd2(0x176,'\x43\x74\x43\x4d')](_0x49f8a3))return _0x49f8a3;}if(_0x2f7ce9&&Number[_0x36cfd2(0x177,'\x53\x4f\x30\x58')](_0x4928b2[_0x36cfd2(0x164,'\x76\x48\x57\x57')](Number,_0x2f7ce9[_0x36cfd2(0x136,'\x34\x68\x4c\x63')+'\x74'])))return _0x4928b2[_0x36cfd2(0x135,'\x68\x57\x70\x52')](_0x4928b2[_0x36cfd2(0x15f,'\x6a\x5b\x44\x77')](Number,_0x2f7ce9[_0x36cfd2(0x179,'\x42\x63\x49\x57')+'\x74']),0xe79+-0x7c*0x3+-0x1*0x91d);return null;}function _0x5f4f82(_0x4ea39a={}){const _0xea428a=_0x57e99d,_0x952d86={'\x79\x55\x44\x45\x65':function(_0x2adca8,_0x498285){return _0x2adca8!=_0x498285;},'\x59\x53\x41\x71\x75':function(_0x16aa8a,_0xda07be){return _0x16aa8a!==_0xda07be;},'\x4e\x6e\x6e\x58\x6a':_0xea428a(0x14c,'\x4d\x36\x32\x56'),'\x53\x50\x63\x6e\x67':_0xea428a(0x14d,'\x40\x6c\x5e\x75'),'\x6f\x67\x50\x7a\x4e':function(_0x597032){return _0x597032();},'\x76\x64\x70\x68\x55':_0xea428a(0x180,'\x5d\x68\x65\x49'),'\x6c\x62\x53\x58\x56':function(_0x428912,_0x543afd){return _0x428912!==_0x543afd;},'\x71\x67\x62\x53\x65':_0xea428a(0x165,'\x6e\x58\x4b\x47'),'\x67\x6f\x48\x6c\x61':_0xea428a(0x13e,'\x4f\x6c\x38\x26'),'\x6a\x78\x62\x45\x72':function(_0x3a6f82,_0x28cb43){return _0x3a6f82!==_0x28cb43;},'\x6c\x6e\x4c\x4f\x64':_0xea428a(0x186,'\x6f\x6d\x75\x4e'),'\x57\x48\x4d\x6a\x63':function(_0x73a814,_0x4e1750){return _0x73a814(_0x4e1750);},'\x42\x64\x58\x7a\x78':function(_0x2b3795,_0x5f0ee9){return _0x2b3795==_0x5f0ee9;},'\x55\x6f\x59\x6f\x45':function(_0x3be636,_0x4e4a2d){return _0x3be636<_0x4e4a2d;},'\x58\x43\x56\x7a\x4e':function(_0x1f72bb,_0x254c05){return _0x1f72bb>_0x254c05;},'\x4d\x69\x42\x49\x4e':function(_0x116ee2,_0x52415c){return _0x116ee2>_0x52415c;},'\x7a\x6d\x78\x4b\x79':function(_0x7c5106,_0x51f636){return _0x7c5106||_0x51f636;},'\x75\x61\x56\x41\x55':function(_0x5bb1dd,_0x41a1a9){return _0x5bb1dd===_0x41a1a9;},'\x42\x6b\x43\x51\x54':function(_0x466f5d,_0x62ee5c){return _0x466f5d+_0x62ee5c;}},_0x28e92b=_0x4ea39a&&_0x952d86[_0xea428a(0x138,'\x53\x4f\x30\x58')](_0x4ea39a[_0xea428a(0x16c,'\x6a\x5b\x44\x77')],null)?Date[_0xea428a(0x173,'\x6a\x5b\x44\x77')](_0x4ea39a[_0xea428a(0x17c,'\x37\x4c\x6c\x46')]):NaN,_0x55cb62={..._0x54cea0};if(!Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](_0x28e92b))return _0x55cb62;const _0x22d791=_0x4ea39a&&_0x4ea39a[_0xea428a(0x160,'\x40\x62\x58\x57')]!=null&&Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](Date[_0xea428a(0x145,'\x68\x57\x70\x52')](_0x4ea39a[_0xea428a(0x15c,'\x4b\x7a\x30\x76')]))?Date[_0xea428a(0x148,'\x4f\x2a\x57\x34')](_0x4ea39a['\x75\x6e\x74\x69\x6c\x49\x73\x6f']):Date[_0xea428a(0x137,'\x6f\x5a\x50\x33')]();let _0x1e5df9;try{if(_0x952d86[_0xea428a(0x131,'\x75\x4d\x6a\x72')](_0x952d86[_0xea428a(0x146,'\x4a\x36\x6f\x4a')],_0x952d86[_0xea428a(0x167,'\x37\x4c\x6c\x46')])){const _0x2a8c55=_0x952d86[_0xea428a(0x14a,'\x77\x21\x41\x61')](_0x544f8a),_0x239ab9={..._0x54cea0};if(!_0x4c69db[_0xea428a(0x183,'\x4d\x71\x46\x4e')+'\x6e\x63'](_0x2a8c55))return _0x239ab9;_0x1e5df9=_0x4c69db[_0xea428a(0x149,'\x73\x4d\x4a\x4d')+_0xea428a(0x155,'\x49\x76\x76\x31')](_0x2a8c55,_0x952d86[_0xea428a(0x129,'\x42\x63\x49\x57')]);}else _0x56feb8=_0x4758b6();}catch(_0x5daf92){const _0x209dcd={..._0x54cea0};return _0x209dcd;}let _0x215402=null;try{_0x215402=_0x952d86[_0xea428a(0x171,'\x57\x39\x39\x29')](_0x253b1e);}catch(_0x4a1c27){_0x215402=null;}let _0x1c0f64=0x185a+-0x9b*-0x21+-0x2c55,_0x596bf2=0x17*0x17f+0x1f*-0xdf+-0x768,_0x272b0f=-0x107d+0x6b3+0x9ca;for(const _0x2507fe of _0x1e5df9[_0xea428a(0x161,'\x40\x6c\x5e\x75')]('\x0a')){const _0x5059b3=_0x2507fe['\x74\x72\x69\x6d']();if(!_0x5059b3)continue;let _0x3db210;try{_0x3db210=JSON[_0xea428a(0x16e,'\x6f\x6d\x75\x4e')](_0x5059b3);}catch(_0xbb6c5b){continue;}if(_0x3db210&&_0x3db210[_0xea428a(0x133,'\x31\x53\x64\x21')+'\x64']){if(_0x952d86['\x6c\x62\x53\x58\x56'](_0x952d86[_0xea428a(0x174,'\x25\x5b\x40\x61')],_0x952d86[_0xea428a(0x17e,'\x4d\x71\x46\x4e')])){if(!_0x215402)continue;try{_0x3db210=_0x10f7e2(_0x3db210,_0x215402);}catch(_0x47c44d){continue;}}else{const _0x807a94={..._0x2f0e0e};return _0x807a94;}}if(!_0x3db210||_0x952d86['\x6a\x78\x62\x45\x72'](typeof _0x3db210,_0x952d86[_0xea428a(0x166,'\x24\x77\x51\x21')]))continue;const _0x1369fb=_0x952d86['\x57\x48\x4d\x6a\x63'](_0x31d480,_0x3db210);if(_0x952d86[_0xea428a(0x12e,'\x73\x4d\x4a\x4d')](_0x1369fb,null)||_0x952d86[_0xea428a(0x15a,'\x4d\x71\x46\x4e')](_0x1369fb,_0x28e92b)||_0x952d86[_0xea428a(0x170,'\x4f\x33\x38\x49')](_0x1369fb,_0x22d791))continue;const _0x1c4d98=_0x952d86[_0xea428a(0x185,'\x24\x77\x51\x21')](Number,_0x3db210[_0xea428a(0x15d,'\x4b\x38\x65\x33')+_0xea428a(0x128,'\x67\x50\x5b\x48')]),_0x3d4aad=_0x952d86[_0xea428a(0x124,'\x39\x5b\x59\x36')](Number,_0x3db210[_0xea428a(0x158,'\x49\x76\x76\x31')+'\x6f\x6b\x65\x6e\x73']),_0x471ec2=Number[_0xea428a(0x16a,'\x6f\x6d\x75\x4e')](_0x1c4d98)&&_0x952d86[_0xea428a(0x163,'\x73\x4d\x4a\x4d')](_0x1c4d98,-0x67*-0x4f+0x2326+-0x5*0xd63),_0x36fb7c=Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](_0x3d4aad)&&_0x3d4aad>0x4*0x9ad+-0x155*-0x1c+0x200*-0x26;if(_0x471ec2)_0x1c0f64+=_0x1c4d98;if(_0x36fb7c)_0x596bf2+=_0x3d4aad;if(_0x952d86['\x7a\x6d\x78\x4b\x79'](_0x471ec2,_0x36fb7c))_0x272b0f+=-0x144*-0x8+-0x26ea+0x1ccb;}const _0x11895b={..._0x54cea0};if(_0x952d86[_0xea428a(0x168,'\x6f\x5a\x50\x33')](_0x272b0f,-0x1c1+0x1c78+-0x7*0x3d1))return _0x11895b;return{'\x69\x6e\x70\x75\x74\x5f\x74\x6f\x6b\x65\x6e\x73':_0x1c0f64,'\x6f\x75\x74\x70\x75\x74\x5f\x74\x6f\x6b\x65\x6e\x73':_0x596bf2,'\x74\x6f\x74\x61\x6c\x5f\x74\x6f\x6b\x65\x6e\x73':_0x952d86[_0xea428a(0x127,'\x50\x2a\x73\x34')](_0x1c0f64,_0x596bf2),'\x63\x61\x6c\x6c\x73':_0x272b0f,'\x6d\x65\x61\x73\x75\x72\x65\x64':!![]};}const _0x4f1b08={};_0x4f1b08[_0x57e99d(0x125,'\x40\x62\x58\x57')+_0x57e99d(0x12a,'\x6e\x51\x75\x4c')]=_0x5f4f82,module[_0x57e99d(0x181,'\x25\x56\x59\x32')]=_0x4f1b08;
|
package/src/solo/breaker.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Solo-mode circuit breaker (pure decision logic, unit-testable).
|
|
2
|
-
//
|
|
3
|
-
// The wild Mad Dog loop, on a crash, sleeps 10s and blindly respawns forever.
|
|
4
|
-
// Solo replaces that with a bounded breaker: count consecutive failed cycles,
|
|
5
|
-
// reset on any success, and once the count hits the threshold, signal STOP so
|
|
6
|
-
// the caller can hard-exit instead of thrashing. Keeping the decision pure (no
|
|
7
|
-
// git, no process.exit, no clock) lets test/solo/breaker.test.js exercise every
|
|
8
|
-
// transition without spawning a daemon.
|
|
9
|
-
|
|
10
|
-
// Advance the breaker by one cycle result. Returns the new state plus whether
|
|
11
|
-
// the caller should trip (stop the process).
|
|
12
|
-
// state: { consecutiveFailures }
|
|
13
|
-
// ok: did the cycle succeed?
|
|
14
|
-
// maxConsecutiveFailures: threshold (>=1)
|
|
15
|
-
function step(state, ok, maxConsecutiveFailures) {
|
|
16
|
-
const max = Math.max(1, maxConsecutiveFailures | 0);
|
|
17
|
-
const prev = (state && state.consecutiveFailures) || 0;
|
|
18
|
-
const consecutiveFailures = ok ? 0 : prev + 1;
|
|
19
|
-
return {
|
|
20
|
-
state: { consecutiveFailures },
|
|
21
|
-
tripped: !ok && consecutiveFailures >= max,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
module.exports = { step };
|
package/src/solo/gitGuard.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// Solo-mode git safety net (--solo). The wild Mad Dog loop self-modifies its
|
|
2
|
-
// target project every cycle with no undo; solo trades the human-review gate
|
|
3
|
-
// for a mechanical one: snapshot the target repo before each cycle, and on a
|
|
4
|
-
// failed cycle hard-reset back to that snapshot so a broken self-edit cannot
|
|
5
|
-
// accumulate. This is the "改坏能回退" leg of the four solo backstops.
|
|
6
|
-
//
|
|
7
|
-
// Scope: this guards the TARGET project repo (getRepoRoot() — the project the
|
|
8
|
-
// user is standing in, or EVOLVER_REPO_ROOT), NOT evolver's own source. A
|
|
9
|
-
// Mad Dog cycle mutates the target codebase, so that is what we roll back.
|
|
10
|
-
//
|
|
11
|
-
// All git calls go through execFileSync (never a shell) so a repo path or
|
|
12
|
-
// branch name can't be interpreted as a command. Pure, dependency-free, and
|
|
13
|
-
// intentionally small so test/solo/gitGuard.test.js can exercise it against a
|
|
14
|
-
// throwaway repo.
|
|
15
|
-
const { execFileSync } = require('child_process');
|
|
16
|
-
|
|
17
|
-
function git(repoDir, args, opts) {
|
|
18
|
-
return execFileSync('git', ['-C', repoDir, ...args], {
|
|
19
|
-
encoding: 'utf8',
|
|
20
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
21
|
-
...(opts || {}),
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// True if the repo has any staged/unstaged/untracked changes.
|
|
26
|
-
function hasUncommittedChanges(repoDir) {
|
|
27
|
-
try {
|
|
28
|
-
const out = git(repoDir, ['status', '--porcelain']);
|
|
29
|
-
return out.trim().length > 0;
|
|
30
|
-
} catch (_) {
|
|
31
|
-
// Not a git repo / git missing: treat as "can't tell" → no clean baseline.
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Capture a rollback point for the current cycle. Returns the HEAD sha, or null
|
|
37
|
-
// if the repo can't be snapshotted (not a git repo, detached with no commits,
|
|
38
|
-
// git unavailable). A null snapshot disables rollback for that cycle rather
|
|
39
|
-
// than throwing — solo must not crash because the target isn't a git repo.
|
|
40
|
-
function snapshot(repoDir) {
|
|
41
|
-
try {
|
|
42
|
-
const sha = git(repoDir, ['rev-parse', 'HEAD']).trim();
|
|
43
|
-
return sha || null;
|
|
44
|
-
} catch (_) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Roll the target repo back to a snapshot sha: discard tracked-file edits
|
|
50
|
-
// (reset --hard) AND remove any new files the cycle created (clean -fd), so the
|
|
51
|
-
// working tree matches the pre-cycle state. No-op when sha is null/empty.
|
|
52
|
-
// Returns true on success, false if the rollback itself failed (surfaced by the
|
|
53
|
-
// caller so a wedged repo doesn't masquerade as a clean recovery).
|
|
54
|
-
function rollbackTo(repoDir, sha) {
|
|
55
|
-
if (!sha) return false;
|
|
56
|
-
try {
|
|
57
|
-
git(repoDir, ['reset', '--hard', sha]);
|
|
58
|
-
git(repoDir, ['clean', '-fd']);
|
|
59
|
-
return true;
|
|
60
|
-
} catch (_) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
module.exports = { snapshot, rollbackTo, hasUncommittedChanges };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.assetsJs = `
|
|
4
|
-
function renderGenesTable(data) {
|
|
5
|
-
return '<table class="data-table"><thead><tr>' +
|
|
6
|
-
'<th>' + esc(t('assets.col.id')) + '</th>' +
|
|
7
|
-
'<th>' + esc(t('assets.col.category')) + '</th>' +
|
|
8
|
-
'<th>' + esc(t('assets.col.signals')) + '</th>' +
|
|
9
|
-
'<th>' + esc(t('assets.col.strategy')) + '</th>' +
|
|
10
|
-
'<th>' + esc(t('assets.col.validation')) + '</th>' +
|
|
11
|
-
'</tr></thead><tbody>' +
|
|
12
|
-
data.map((g) => '<tr><td><strong>' + esc(g.id) + '</strong></td>' +
|
|
13
|
-
'<td><span class="pill ' + esc(g.category) + '">' + esc(g.category) + '</span></td>' +
|
|
14
|
-
'<td>' + pillList(g.signals_match || [], 'signal') + '</td>' +
|
|
15
|
-
'<td><details><summary>' + (g.strategy?.length || 0) + ' ' + esc(t('assets.steps')) + '</summary><ol class="reason-list">' + (g.strategy || []).map(s => '<li>' + esc(s) + '</li>').join('') + '</ol></details></td>' +
|
|
16
|
-
'<td><details><summary>' + (g.validation?.length || 0) + ' ' + esc(t('assets.cmds')) + '</summary><ul class="reason-list">' + (g.validation || []).map(s => '<li><code>' + esc(s) + '</code></li>').join('') + '</ul></details></td>' +
|
|
17
|
-
'</tr>').join('') +
|
|
18
|
-
'</tbody></table>';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function renderCapsulesTable(data) {
|
|
22
|
-
if (!data.length) return '<p class="muted">' + esc(t('assets.empty.capsules')) + '</p>';
|
|
23
|
-
return '<table class="data-table"><thead><tr>' +
|
|
24
|
-
'<th>' + esc(t('assets.col.id')) + '</th>' +
|
|
25
|
-
'<th>' + esc(t('assets.col.gene')) + '</th>' +
|
|
26
|
-
'<th>' + esc(t('assets.col.outcome')) + '</th>' +
|
|
27
|
-
'<th>' + esc(t('assets.col.confidence')) + '</th>' +
|
|
28
|
-
'<th>' + esc(t('assets.col.blast')) + '</th>' +
|
|
29
|
-
'</tr></thead><tbody>' +
|
|
30
|
-
data.map((c) => '<tr><td><strong>' + esc(c.id) + '</strong></td><td>' + esc(c.gene || '-') + '</td>' +
|
|
31
|
-
'<td><span class="status-indicator ' + getStatusClass(c.outcome?.status) + '"></span>' + esc(tStatus(c.outcome?.status) || '-') + '</td>' +
|
|
32
|
-
'<td>' + esc(c.confidence ?? '-') + '</td>' +
|
|
33
|
-
'<td>' + esc((c.blast_radius?.files ?? '-') + '/' + (c.blast_radius?.lines ?? '-')) + '</td>' +
|
|
34
|
-
'</tr>').join('') +
|
|
35
|
-
'</tbody></table>';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function renderEventsList(data) {
|
|
39
|
-
if (!data.length) return '<p class="muted">' + t('assets.empty.events') + '</p>';
|
|
40
|
-
return '<ul class="event-list">' + data.map((e) => '<li>' +
|
|
41
|
-
'<div><strong>' + esc(e.id || '-') + '</strong> <span class="muted small">' + esc(formatTime(e.timestamp || e.created_at)) + '</span></div>' +
|
|
42
|
-
'<div>' + esc(t('assets.events.signals')) + pillList(e.signals || e.signals_matched || [], 'signal') + '</div>' +
|
|
43
|
-
'<div>' + esc(t('assets.events.genes')) + pillList(e.genes_used || [], '') + '</div>' +
|
|
44
|
-
'<div>' + esc(t('assets.events.outcome')) + '<span class="status-indicator ' + getStatusClass(e.outcome?.status) + '"></span>' + esc(tStatus(e.outcome?.status) || '-') + '</div>' +
|
|
45
|
-
'</li>').join('') + '</ul>';
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function renderCandidatesTable(data) {
|
|
49
|
-
if (!data.length) return '<p class="muted">' + esc(t('assets.empty.candidates')) + '</p>';
|
|
50
|
-
return '<table class="data-table"><thead><tr>' +
|
|
51
|
-
'<th>' + esc(t('assets.col.source')) + '</th>' +
|
|
52
|
-
'<th>' + esc(t('assets.col.assetId')) + '</th>' +
|
|
53
|
-
'<th>' + esc(t('assets.col.score')) + '</th>' +
|
|
54
|
-
'<th>' + esc(t('assets.col.time')) + '</th>' +
|
|
55
|
-
'</tr></thead><tbody>' +
|
|
56
|
-
data.map((c) => '<tr><td>' + esc(c.source || c.source_node_id || '-') + '</td>' +
|
|
57
|
-
'<td><code>' + esc(c.asset_id || c.id || '-') + '</code></td>' +
|
|
58
|
-
'<td>' + esc(c.score ?? '-') + '</td>' +
|
|
59
|
-
'<td>' + esc(formatTime(c.timestamp)) + '</td></tr>').join('') +
|
|
60
|
-
'</tbody></table>';
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function renderCallsTable(data) {
|
|
64
|
-
if (!data.length) return '<p class="muted">' + esc(t('assets.empty.calls')) + '</p>';
|
|
65
|
-
return '<table class="data-table"><thead><tr>' +
|
|
66
|
-
'<th>' + esc(t('assets.col.time')) + '</th>' +
|
|
67
|
-
'<th>' + esc(t('assets.col.action')) + '</th>' +
|
|
68
|
-
'<th>' + esc(t('assets.col.asset')) + '</th>' +
|
|
69
|
-
'<th>' + esc(t('assets.col.run')) + '</th>' +
|
|
70
|
-
'<th>' + esc(t('assets.col.score')) + '</th>' +
|
|
71
|
-
'</tr></thead><tbody>' +
|
|
72
|
-
data.map((c) => '<tr><td>' + esc(formatTime(c.timestamp)) + '</td>' +
|
|
73
|
-
'<td><span class="pill ' + esc(c.action) + '">' + esc(tAction(c.action)) + '</span></td>' +
|
|
74
|
-
'<td><code>' + esc(c.asset_id || '-') + '</code></td>' +
|
|
75
|
-
'<td>' + esc(c.run_id || '-') + '</td>' +
|
|
76
|
-
'<td>' + esc(c.score ?? '-') + '</td></tr>').join('') +
|
|
77
|
-
'</tbody></table>';
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const ASSET_RENDERERS = {
|
|
81
|
-
genes: renderGenesTable,
|
|
82
|
-
capsules: renderCapsulesTable,
|
|
83
|
-
events: renderEventsList,
|
|
84
|
-
candidates: renderCandidatesTable,
|
|
85
|
-
calls: renderCallsTable,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const ASSET_ENDPOINTS = {
|
|
89
|
-
genes: '/webui/assets/genes',
|
|
90
|
-
capsules: '/webui/assets/capsules',
|
|
91
|
-
events: '/webui/assets/events',
|
|
92
|
-
candidates: '/webui/assets/candidates',
|
|
93
|
-
calls: '/webui/assets/calls',
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
async function loadAsset(kind) {
|
|
97
|
-
state.currentAsset = kind;
|
|
98
|
-
$('asset-list').innerHTML = '<p class="muted">' + esc(t('common.loading')) + '</p>';
|
|
99
|
-
document.querySelectorAll('.asset-tab').forEach((b) => b.classList.toggle('active', b.getAttribute('data-asset') === kind));
|
|
100
|
-
try {
|
|
101
|
-
const result = await api(ASSET_ENDPOINTS[kind] + '?limit=200');
|
|
102
|
-
const renderer = ASSET_RENDERERS[kind];
|
|
103
|
-
const total = result.pagination?.totalItems ?? (result.data || []).length;
|
|
104
|
-
$('asset-list').innerHTML =
|
|
105
|
-
'<div class="muted small" style="margin-bottom:12px">' + total + ' ' + esc(t('assets.records')) + '</div>' +
|
|
106
|
-
renderer(result.data || []);
|
|
107
|
-
} catch (err) {
|
|
108
|
-
$('asset-list').innerHTML = '<p class="status-failed">' + esc(t('common.failedPrefix')) + esc(err.message) + '</p>';
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
`;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.bootstrapJs = `
|
|
4
|
-
const TAB_TITLE_KEYS = {
|
|
5
|
-
overview: 'nav.overview',
|
|
6
|
-
pipelines: 'nav.pipelines',
|
|
7
|
-
assets: 'nav.assets',
|
|
8
|
-
interactions: 'nav.interactions',
|
|
9
|
-
personality: 'nav.personality',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
function activateTab(tab) {
|
|
13
|
-
state.currentTab = tab;
|
|
14
|
-
document.querySelectorAll('.tab').forEach((b) => b.classList.toggle('active', b.getAttribute('data-tab') === tab));
|
|
15
|
-
document.querySelectorAll('.view').forEach((v) => v.classList.toggle('active', v.getAttribute('data-view') === tab));
|
|
16
|
-
const title = document.getElementById('topbar-title');
|
|
17
|
-
if (title && TAB_TITLE_KEYS[tab]) {
|
|
18
|
-
title.setAttribute('data-i18n', TAB_TITLE_KEYS[tab]);
|
|
19
|
-
title.textContent = t(TAB_TITLE_KEYS[tab]);
|
|
20
|
-
}
|
|
21
|
-
setTimeout(() => Object.values(state.charts).forEach((c) => c.resize && c.resize()), 50);
|
|
22
|
-
// Reload current tab so it works after toggleTheme/toggleLocale has
|
|
23
|
-
// disposed all chart instances (otherwise switching back to Overview
|
|
24
|
-
// would show empty chart slots).
|
|
25
|
-
if (tab === 'overview') loadOverview();
|
|
26
|
-
if (tab === 'pipelines') loadPipelines();
|
|
27
|
-
if (tab === 'assets') loadAsset(state.currentAsset);
|
|
28
|
-
if (tab === 'interactions') loadInteractions();
|
|
29
|
-
if (tab === 'personality') loadPersonality();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async function refresh() {
|
|
33
|
-
if (state.currentTab === 'overview') return loadOverview();
|
|
34
|
-
if (state.currentTab === 'pipelines') return loadPipelines();
|
|
35
|
-
if (state.currentTab === 'assets') return loadAsset(state.currentAsset);
|
|
36
|
-
if (state.currentTab === 'interactions') return loadInteractions();
|
|
37
|
-
if (state.currentTab === 'personality') return loadPersonality();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function disposeAllCharts() {
|
|
41
|
-
for (const id of Object.keys(state.charts)) {
|
|
42
|
-
state.charts[id].dispose && state.charts[id].dispose();
|
|
43
|
-
delete state.charts[id];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function toggleTheme() {
|
|
48
|
-
const root = document.documentElement;
|
|
49
|
-
const next = root.classList.contains('dark') ? 'light' : 'dark';
|
|
50
|
-
root.classList.toggle('dark', next === 'dark');
|
|
51
|
-
try { localStorage.setItem('evolver-theme', next); } catch (_) {}
|
|
52
|
-
// ECharts colors are baked at init time, so dispose + re-render the
|
|
53
|
-
// active tab so chart text/axes pick up the new palette.
|
|
54
|
-
disposeAllCharts();
|
|
55
|
-
refresh();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function syncLocaleGlyph() {
|
|
59
|
-
const glyph = document.querySelector('#locale-toggle .locale-glyph');
|
|
60
|
-
if (!glyph) return;
|
|
61
|
-
// Glyph shows the *target* locale (what you'll switch to), matching
|
|
62
|
-
// common bilingual UI conventions (e.g. evox-desktop).
|
|
63
|
-
glyph.textContent = getLocale() === 'zh' ? 'EN' : '中';
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function toggleLocale() {
|
|
67
|
-
const next = getLocale() === 'zh' ? 'en' : 'zh';
|
|
68
|
-
setLocale(next);
|
|
69
|
-
applyI18nDom();
|
|
70
|
-
syncLocaleGlyph();
|
|
71
|
-
// Charts contain locale-baked labels (axis names, legends, tooltips
|
|
72
|
-
// built from t() calls), so dispose + re-render to pick up the new
|
|
73
|
-
// strings. Same pattern as toggleTheme.
|
|
74
|
-
disposeAllCharts();
|
|
75
|
-
refresh();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Initial paint — set glyph + apply translations to the static markup.
|
|
79
|
-
syncLocaleGlyph();
|
|
80
|
-
applyI18nDom();
|
|
81
|
-
|
|
82
|
-
document.querySelectorAll('.tab').forEach((b) => b.addEventListener('click', () => activateTab(b.getAttribute('data-tab'))));
|
|
83
|
-
document.querySelectorAll('.asset-tab').forEach((b) => b.addEventListener('click', () => loadAsset(b.getAttribute('data-asset'))));
|
|
84
|
-
$('refresh').addEventListener('click', refresh);
|
|
85
|
-
const themeBtn = $('theme-toggle');
|
|
86
|
-
if (themeBtn) themeBtn.addEventListener('click', toggleTheme);
|
|
87
|
-
const localeBtn = $('locale-toggle');
|
|
88
|
-
if (localeBtn) localeBtn.addEventListener('click', toggleLocale);
|
|
89
|
-
window.addEventListener('resize', () => Object.values(state.charts).forEach((c) => c.resize && c.resize()));
|
|
90
|
-
window.loadRun = loadRun;
|
|
91
|
-
loadOverview();
|
|
92
|
-
`;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.commonJs = `
|
|
4
|
-
const state = { selectedRunId: null, charts: {}, currentTab: 'overview', currentAsset: 'genes' };
|
|
5
|
-
const $ = (id) => document.getElementById(id);
|
|
6
|
-
|
|
7
|
-
async function api(path) {
|
|
8
|
-
const res = await fetch(path);
|
|
9
|
-
const body = await res.json();
|
|
10
|
-
if (!res.ok) throw new Error(body.error?.message || 'Request failed');
|
|
11
|
-
return body;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function isDarkMode() {
|
|
15
|
-
// .dark on <html> is the single source of truth. THEME_INIT_SCRIPT
|
|
16
|
-
// runs synchronously in <head> before any client JS executes and
|
|
17
|
-
// already resolves the explicit (localStorage 'evolver-theme'
|
|
18
|
-
// light/dark) vs implicit (system: matchMedia) cases into the class.
|
|
19
|
-
// Falling back to matchMedia here would re-introduce the OS
|
|
20
|
-
// preference *after* the user explicitly toggled to light on a
|
|
21
|
-
// dark-OS system, so chartTextColor() would return light text on a
|
|
22
|
-
// light background and ECharts axis labels would be near-invisible.
|
|
23
|
-
return document.documentElement.classList.contains('dark');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function chartTextColor() {
|
|
27
|
-
return isDarkMode() ? '#c7d0d9' : '#5c6975';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function ensureChart(id) {
|
|
31
|
-
const el = document.getElementById(id);
|
|
32
|
-
if (!el) return null;
|
|
33
|
-
if (!state.charts[id]) state.charts[id] = echarts.init(el);
|
|
34
|
-
return state.charts[id];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function getStatusClass(status) {
|
|
38
|
-
if (status === 'success' || status === 'completed') return 'status-success';
|
|
39
|
-
if (status === 'running' || status === 'pending') return 'status-running';
|
|
40
|
-
if (status === 'failed') return 'status-failed';
|
|
41
|
-
if (status === 'blocked' || status === 'review_pending') return 'status-blocked';
|
|
42
|
-
if (status === 'abandoned') return 'status-abandoned';
|
|
43
|
-
if (status === 'selected') return 'status-running';
|
|
44
|
-
return 'status-skipped';
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function kv(rows) {
|
|
48
|
-
return '<dl>' + rows.map(([k, v]) => '<dt>' + esc(k) + '</dt><dd>' + esc(format(v)) + '</dd>').join('') + '</dl>';
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function esc(value) {
|
|
52
|
-
return String(value ?? '').replace(/[&<>"']/g, (ch) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[ch]));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function format(value) {
|
|
56
|
-
if (value === null || value === undefined || value === '') return '-';
|
|
57
|
-
if (typeof value === 'object') return JSON.stringify(value);
|
|
58
|
-
// Round non-integer numbers to 4 decimals to drop float noise like
|
|
59
|
-
// 0.7499999999999999 -> 0.75 without losing meaningful precision.
|
|
60
|
-
if (typeof value === 'number' && Number.isFinite(value) && !Number.isInteger(value)) {
|
|
61
|
-
return Number(value.toFixed(4));
|
|
62
|
-
}
|
|
63
|
-
return value;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function formatTime(value) {
|
|
67
|
-
if (!value) return '-';
|
|
68
|
-
const t = new Date(value);
|
|
69
|
-
if (isNaN(t.getTime()) || t.getTime() === 0) return '-';
|
|
70
|
-
return t.toLocaleString();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function pillList(items, kind) {
|
|
74
|
-
if (!items || !items.length) return '<span class="muted">none</span>';
|
|
75
|
-
return items.map((item) => '<span class="pill ' + (kind || '') + '">' + esc(item) + '</span>').join(' ');
|
|
76
|
-
}
|
|
77
|
-
`;
|