export function getProviderLevelKey(_0x4db552={}){if(_0x4db552?.['supportsReasoningLevel'])return'reasoningLevels';if(_0x4db552?.['supportsEffortLevel'])return'effortLevels';return null;}export function getLevelsForSelectedModel(_0xa11687={},_0x43771c=''){const _0x11ec98=getProviderLevelKey(_0xa11687);if(!_0x11ec98)return[];const _0x23606a=Array['isArray'](_0xa11687[_0x11ec98])?_0xa11687[_0x11ec98]:[],_0x99e583=String(_0x43771c||'')['trim'](),_0xfaef99=_0x99e583?(_0xa11687['models']||[])['find'](_0x6d07e2=>_0x6d07e2?.['id']===_0x99e583):null,_0x56c009=Array['isArray'](_0xfaef99?.[_0x11ec98])?new Set(_0xfaef99[_0x11ec98]['map'](_0x5f324d=>String(_0x5f324d||'')['trim']())['filter'](Boolean)):null;return _0x56c009?_0x23606a['filter'](_0x100780=>_0x56c009['has'](String(_0x100780?.['id']||'')['trim']())):_0x23606a;}export function buildLevelOptionsHtml({providerData:providerData={},modelId:modelId='',emptyLabel:emptyLabel='Default',escapeAttr:_0x1bab8d,escapeText:_0x2bcd20,stripDefaultLabelText:stripDefaultLabelText=_0x2cfb04=>String(_0x2cfb04||'')}={}){const _0x28f986=getLevelsForSelectedModel(providerData,modelId),_0x58d3f9=_0x1bab8d||_0x2bcd20||(_0x3dd6c0=>String(_0x3dd6c0||'')),_0x12434a=_0x2bcd20||_0x1bab8d||(_0x24afc9=>String(_0x24afc9||''));return'<option\x20value=\x22\x22>'+_0x12434a(emptyLabel)+'</option>'+_0x28f986['map'](_0x3e687f=>'<option\x20value=\x22'+_0x58d3f9(_0x3e687f['id'])+'\x22>'+_0x12434a(stripDefaultLabelText(_0x3e687f['displayName']||_0x3e687f['id']))+'</option>')['join']('');}