export const JUDGE_AGENTS_STORAGE_KEY='judge-selected-agents';function getStorage(_0x182117){if(_0x182117)return _0x182117;return typeof localStorage!=='undefined'?localStorage:null;}export function loadPersistedJudgeAgents(_0x18f67a){const _0x497c9b=getStorage(_0x18f67a);if(!_0x497c9b)return new Set();try{const _0x4ab3a4=_0x497c9b['getItem'](JUDGE_AGENTS_STORAGE_KEY);if(!_0x4ab3a4)return new Set();const _0x2939df=JSON['parse'](_0x4ab3a4);return Array['isArray'](_0x2939df)?new Set(_0x2939df['filter'](_0x30dbdc=>typeof _0x30dbdc==='string')):new Set();}catch{return new Set();}}export function persistJudgeAgents(_0x1bfe24,_0x4436e9){const _0x189e47=getStorage(_0x4436e9);if(!_0x189e47)return;try{_0x189e47['setItem'](JUDGE_AGENTS_STORAGE_KEY,JSON['stringify']([..._0x1bfe24]));}catch{}}export function getTaskDefaultAgent(_0x58743f){const _0x1c719c=_0x58743f?.['envVars']?.['default_agent'];return typeof _0x1c719c==='string'&&_0x1c719c?_0x1c719c:null;}export function readServerDefaultAgent(_0x43c029){if(!_0x43c029)return null;const _0x2e1347=_0x43c029['default_agent'];return typeof _0x2e1347==='string'&&_0x2e1347?_0x2e1347:null;}export function resolveDefaultJudgeAgent({taskDefaultAgent:_0x1ed7bf,serverDefaultAgent:_0x1d38f8,configuredAgents:_0x1b3b1f}={}){const _0x151c62=_0x1b3b1f instanceof Set?_0x1b3b1f:new Set(_0x1b3b1f||[]);if(_0x151c62['size']===0x0)return null;if(_0x1ed7bf&&_0x151c62['has'](_0x1ed7bf))return _0x1ed7bf;if(_0x1d38f8&&_0x151c62['has'](_0x1d38f8))return _0x1d38f8;return null;}