export const JUDGE_AGENTS_STORAGE_KEY='judge-selected-agents';function getStorage(_0x318d15){if(_0x318d15)return _0x318d15;return typeof localStorage!=='undefined'?localStorage:null;}export function loadPersistedJudgeAgents(_0x5d10c8){const _0x59ef98=getStorage(_0x5d10c8);if(!_0x59ef98)return new Set();try{const _0x52152c=_0x59ef98['getItem'](JUDGE_AGENTS_STORAGE_KEY);if(!_0x52152c)return new Set();const _0x56935a=JSON['parse'](_0x52152c);return Array['isArray'](_0x56935a)?new Set(_0x56935a['filter'](_0x2e37f9=>typeof _0x2e37f9==='string')):new Set();}catch{return new Set();}}export function persistJudgeAgents(_0x37fe7e,_0x4226ea){const _0x5158a4=getStorage(_0x4226ea);if(!_0x5158a4)return;try{_0x5158a4['setItem'](JUDGE_AGENTS_STORAGE_KEY,JSON['stringify']([..._0x37fe7e]));}catch{}}export function getTaskDefaultAgent(_0x2bf234){const _0x1c9c70=_0x2bf234?.['envVars']?.['default_agent'];return typeof _0x1c9c70==='string'&&_0x1c9c70?_0x1c9c70:null;}export function readServerDefaultAgent(_0x2f4c55){if(!_0x2f4c55)return null;const _0x803646=_0x2f4c55['default_agent'];return typeof _0x803646==='string'&&_0x803646?_0x803646:null;}export function resolveDefaultJudgeAgent({taskDefaultAgent:_0x205b0d,serverDefaultAgent:_0x5b85bf,configuredAgents:_0x13f15c}={}){const _0x32dac7=_0x13f15c instanceof Set?_0x13f15c:new Set(_0x13f15c||[]);if(_0x32dac7['size']===0x0)return null;if(_0x205b0d&&_0x32dac7['has'](_0x205b0d))return _0x205b0d;if(_0x5b85bf&&_0x32dac7['has'](_0x5b85bf))return _0x5b85bf;return null;}