// APRS table identifiers and BPQ's row/column icon keys (APRSCode.c). export function aprsSymbol(symset,symbol){ if(typeof symbol!=='string'||symbol.length!==1||symbol<'!'||symbol>'~'||!/^[/\\A-Z0-9]$/.test(symset||''))return null; return {symbol,symset,table:symset==='/'?'primary':'alternate',overlay:/^[A-Z0-9]$/.test(symset)?symset:null}; } export function nativeSymbol(key){ if(!/^[0-9a-f]{4}[@A-Z0-9]$/i.test(key||''))return null; const row=parseInt(key.slice(0,2),16),col=parseInt(key.slice(2,4),16); if(row>11||col>15)return null; const index=(row%6)*16+col;if(index>93)return null; const overlay=key[4]==='@'?null:key[4];if(overlay&&row<6)return null; return aprsSymbol(overlay||(row<6?'/':'\\'),String.fromCharCode(33+index)); }