export const enum JIS8 { NUL = 0x00 , BEL = 0x07 , APB = 0x08 , APF = 0x09 , APD = 0x0a , APU = 0x0b , CS = 0x0c , APR = 0x0d , LS1 = 0x0e , LS0 = 0x0f , PAPF = 0x16 , CAN = 0x18 , SS2 = 0x19 , ESC = 0x1b , APS = 0x1c , SS3 = 0x1d , RS = 0x1e , US = 0x1f , SP = 0x20 , DEL = 0x7f , BKF = 0x80 , RDF = 0x81 , GRF = 0x82 , YLF = 0x83 , BLF = 0x84 , MGF = 0x85 , CNF = 0x86 , WHF = 0x87 , SSZ = 0x88 , MSZ = 0x89 , NSZ = 0x8a , SZX = 0x8b , COL = 0x90 , FLC = 0x91 , CDC = 0x92 , POL = 0x93 , WMM = 0x94 , MACRO = 0x95 , HLC = 0x97 , RPC = 0x98 , SPL = 0x99 , STL = 0x9a , CSI = 0x9b , TIME = 0x9d } export const enum CSI { GSM = 0x42 , SWF = 0x53 , CCC = 0x54 , SDF = 0x56 , SSM = 0x57 , SHS = 0x58 , SVS = 0x59 , PLD = 0x5b , PLU = 0x5c , GAA = 0x5d , SRC = 0x5e , SDP = 0x5f , ACPS = 0x61 , TCC = 0x62 , ORN = 0x63 , MDF = 0x64 , CFS = 0x65 , XCS = 0x66 , SCR = 0x67 , PRA = 0x68 , ACS = 0x69 , UED = 0x6a , RCS = 0x6e , SCS = 0x6f } export const enum ESC { LS2 = 0x6e , LS3 = 0x6f , LS1R = 0x7e , LS2R = 0x7d , LS3R = 0x7c } const enum ALPHABETS { KANJI , ASCII , HIRAGANA , KATAKANA , MOSAIC_A , MOSAIC_B , MOSAIC_C , MOSAIC_D , P_ASCII , P_HIRAGANA , P_KATAKANA , JIS_X0201_KATAKANA , JIS_X0213_2004_KANJI_1 , JIS_X0213_2004_KANJI_2 , ADDITIONAL_SYMBOLS , DRCS_0 , DRCS_1 , DRCS_2 , DRCS_3 , DRCS_4 , DRCS_5 , DRCS_6 , DRCS_7 , DRCS_8 , DRCS_9 , DRCS_10 , DRCS_11 , DRCS_12 , DRCS_13 , DRCS_14 , DRCS_15 , MACRO } export { ALPHABETS } ; export interface ALPHABET_ENTRY { bytes : number ; alphabet : ALPHABETS ; } export const G_SET_BY_ALPHABET = new Map < number , ALPHABET_ENTRY > ( [ [ ALPHABETS . KANJI , { bytes : 2 , alphabet : ALPHABETS . KANJI } ] , [ ALPHABETS . ASCII , { bytes : 1 , alphabet : ALPHABETS . ASCII } ] , [ ALPHABETS . HIRAGANA , { bytes : 1 , alphabet : ALPHABETS . HIRAGANA } ] , [ ALPHABETS . KATAKANA , { bytes : 1 , alphabet : ALPHABETS . KATAKANA } ] , [ ALPHABETS . MOSAIC_A , { bytes : 1 , alphabet : ALPHABETS . MOSAIC_A } ] , [ ALPHABETS . MOSAIC_B , { bytes : 1 , alphabet : ALPHABETS . MOSAIC_B } ] , [ ALPHABETS . MOSAIC_C , { bytes : 1 , alphabet : ALPHABETS . MOSAIC_C } ] , [ ALPHABETS . MOSAIC_D , { bytes : 1 , alphabet : ALPHABETS . MOSAIC_D } ] , [ ALPHABETS . P_ASCII , { bytes : 1 , alphabet : ALPHABETS . P_ASCII } ] , [ ALPHABETS . P_HIRAGANA , { bytes : 1 , alphabet : ALPHABETS . P_HIRAGANA } ] , [ ALPHABETS . P_KATAKANA , { bytes : 1 , alphabet : ALPHABETS . P_KATAKANA } ] , [ ALPHABETS . JIS_X0201_KATAKANA , { bytes : 1 , alphabet : ALPHABETS . JIS_X0201_KATAKANA } , ] , [ ALPHABETS . JIS_X0213_2004_KANJI_1 , { bytes : 1 , alphabet : ALPHABETS . JIS_X0213_2004_KANJI_1 } , ] , [ ALPHABETS . JIS_X0213_2004_KANJI_2 , { bytes : 1 , alphabet : ALPHABETS . JIS_X0213_2004_KANJI_2 } , ] , [ ALPHABETS . ADDITIONAL_SYMBOLS , { bytes : 2 , alphabet : ALPHABETS . ADDITIONAL_SYMBOLS } , ] , ] ) ; export const G_SET_BY_F = new Map < number , ALPHABET_ENTRY > ( [ [ 0x42 , { bytes : 2 , alphabet : ALPHABETS . KANJI } ] , [ 0x4a , { bytes : 1 , alphabet : ALPHABETS . ASCII } ] , [ 0x30 , { bytes : 1 , alphabet : ALPHABETS . HIRAGANA } ] , [ 0x31 , { bytes : 1 , alphabet : ALPHABETS . KATAKANA } ] , [ 0x32 , { bytes : 1 , alphabet : ALPHABETS . MOSAIC_A } ] , [ 0x33 , { bytes : 1 , alphabet : ALPHABETS . MOSAIC_B } ] , [ 0x34 , { bytes : 1 , alphabet : ALPHABETS . MOSAIC_C } ] , [ 0x35 , { bytes : 1 , alphabet : ALPHABETS . MOSAIC_D } ] , [ 0x36 , { bytes : 1 , alphabet : ALPHABETS . P_ASCII } ] , [ 0x37 , { bytes : 1 , alphabet : ALPHABETS . P_HIRAGANA } ] , [ 0x38 , { bytes : 1 , alphabet : ALPHABETS . P_KATAKANA } ] , [ 0x39 , { bytes : 1 , alphabet : ALPHABETS . JIS_X0201_KATAKANA } ] , [ 0x3a , { bytes : 1 , alphabet : ALPHABETS . JIS_X0213_2004_KANJI_1 } ] , [ 0x3b , { bytes : 1 , alphabet : ALPHABETS . JIS_X0213_2004_KANJI_2 } ] , [ 0x3c , { bytes : 2 , alphabet : ALPHABETS . ADDITIONAL_SYMBOLS } ] , ] ) ; export const G_DRCS_BY_ALPHABET = new Map < number , ALPHABET_ENTRY > ( [ [ ALPHABETS . DRCS_0 , { bytes : 2 , alphabet : ALPHABETS . DRCS_0 } ] , [ ALPHABETS . DRCS_1 , { bytes : 1 , alphabet : ALPHABETS . DRCS_1 } ] , [ ALPHABETS . DRCS_2 , { bytes : 1 , alphabet : ALPHABETS . DRCS_2 } ] , [ ALPHABETS . DRCS_3 , { bytes : 1 , alphabet : ALPHABETS . DRCS_3 } ] , [ ALPHABETS . DRCS_4 , { bytes : 1 , alphabet : ALPHABETS . DRCS_4 } ] , [ ALPHABETS . DRCS_5 , { bytes : 1 , alphabet : ALPHABETS . DRCS_5 } ] , [ ALPHABETS . DRCS_6 , { bytes : 1 , alphabet : ALPHABETS . DRCS_6 } ] , [ ALPHABETS . DRCS_7 , { bytes : 1 , alphabet : ALPHABETS . DRCS_7 } ] , [ ALPHABETS . DRCS_8 , { bytes : 1 , alphabet : ALPHABETS . DRCS_8 } ] , [ ALPHABETS . DRCS_9 , { bytes : 1 , alphabet : ALPHABETS . DRCS_9 } ] , [ ALPHABETS . DRCS_10 , { bytes : 1 , alphabet : ALPHABETS . DRCS_10 } ] , [ ALPHABETS . DRCS_11 , { bytes : 1 , alphabet : ALPHABETS . DRCS_11 } ] , [ ALPHABETS . DRCS_12 , { bytes : 1 , alphabet : ALPHABETS . DRCS_12 } ] , [ ALPHABETS . DRCS_13 , { bytes : 1 , alphabet : ALPHABETS . DRCS_13 } ] , [ ALPHABETS . DRCS_14 , { bytes : 1 , alphabet : ALPHABETS . DRCS_14 } ] , [ ALPHABETS . DRCS_15 , { bytes : 1 , alphabet : ALPHABETS . DRCS_15 } ] , [ ALPHABETS . MACRO , { bytes : 1 , alphabet : ALPHABETS . MACRO } ] , ] ) ; export const G_DRCS_BY_F = new Map < number , ALPHABET_ENTRY > ( [ [ 0x40 , { bytes : 2 , alphabet : ALPHABETS . DRCS_0 } ] , [ 0x41 , { bytes : 1 , alphabet : ALPHABETS . DRCS_1 } ] , [ 0x42 , { bytes : 1 , alphabet : ALPHABETS . DRCS_2 } ] , [ 0x43 , { bytes : 1 , alphabet : ALPHABETS . DRCS_3 } ] , [ 0x44 , { bytes : 1 , alphabet : ALPHABETS . DRCS_4 } ] , [ 0x45 , { bytes : 1 , alphabet : ALPHABETS . DRCS_5 } ] , [ 0x46 , { bytes : 1 , alphabet : ALPHABETS . DRCS_6 } ] , [ 0x47 , { bytes : 1 , alphabet : ALPHABETS . DRCS_7 } ] , [ 0x48 , { bytes : 1 , alphabet : ALPHABETS . DRCS_8 } ] , [ 0x49 , { bytes : 1 , alphabet : ALPHABETS . DRCS_9 } ] , [ 0x4a , { bytes : 1 , alphabet : ALPHABETS . DRCS_10 } ] , [ 0x4b , { bytes : 1 , alphabet : ALPHABETS . DRCS_11 } ] , [ 0x4c , { bytes : 1 , alphabet : ALPHABETS . DRCS_12 } ] , [ 0x4d , { bytes : 1 , alphabet : ALPHABETS . DRCS_13 } ] , [ 0x4e , { bytes : 1 , alphabet : ALPHABETS . DRCS_14 } ] , [ 0x4f , { bytes : 1 , alphabet : ALPHABETS . DRCS_15 } ] , [ 0x70 , { bytes : 1 , alphabet : ALPHABETS . MACRO } ] , ] ) ;