/** * ANSItex definitions */ /* Unit of cost */ const FRAME_COSTUNIT ='c'; /** ACTIONS **/ /* Exit the script */ const ACTION_EXIT =99; /* Reload the current frame */ const ACTION_RELOAD =1; /* Goto a specific frame */ const ACTION_GOTO =2; /* Goto previous frame */ const ACTION_BACKUP =3; /* Goto next frame */ const ACTION_NEXT =4; /* Terminate the session */ const ACTION_TERMINATE =5; /* Submit form contents */ const ACTION_SUBMITRF =6; /* Star command entry */ const ACTION_STAR =7; /* Edit a frame */ const ACTION_EDIT =8; /** MODES **/ /* Typing * command on baseline */ const MODE_BL =1; /* Field Input */ const MODE_FIELD =2; /* Asking if form should be submitted */ const MODE_SUBMITRF =3; /* Response frame not sent */ const MODE_RFNOTSENT =4; /* Response frame sent */ const MODE_RFSENT =5; /* Response frame error */ const MODE_RFERROR =6; /** FRAME TYPES **/ /* Information Frame, requires no response after viewed */ const FRAME_TYPE_INFO ='i'; /* Terminate Frame, contents displayed and then carrier dropped */ const FRAME_TYPE_TERMINATE ='t'; /** * Frame the calls an External Method * Contents indicate the method to be called with arguments */ const FRAME_TYPE_EXTERNAL ='x'; /** * Response frame, input fields are embedded in the frame and after input the * response will be submitted to the Service Provider, or to a method */ const FRAME_TYPE_RESPONSE ='r'; /* Login frame, enables the user to authenticate to the system, or to a CUG */ const FRAME_TYPE_LOGIN ='l'; /* Mail template frames - mail templates will have the user's stats for the area passed to render() */ const FRAME_TYPE_MAIL_TEMPLATE ='m'; /* Frame is a message */ const FRAME_TYPE_MESSAGE ='M'; /* Disable *# going backwards for the following frames */ var NO_HISTORY_FRAMES =['980a','98b','981a','982a','983a','998a']; /* Frames prefixed with this are owned by the system */ const SYSTEM_OWNER =9; /* Time to wait for a key press */ const INKEY_TIMEOUT =10000; /* Idle time for un-authenticated users */ const INACTIVE_NOLOGIN =30000; /* Idle time for authenticated users */ const INACTIVE_LOGIN =5*60000; var SYSTEM_ZONE =516; // @todo rename these all to FRAME_* /* Home Frame */ const HOME_FRAME ={frame: 1,index: 'a'}; /* Login Frame */ const LOGIN_FRAME ={frame: 98,index: 'a'}; /* Registration Frame */ const REGISTER_FRAME ={frame: 981,index: 'a'}; /* SQRL Login */ const SQRL_FRAME ={frame: 982,index: 'a'}; /* Login Failed */ const LOGIN_FAILED_FRAME ={frame: 983,index: 'a'}; /* Home page after authentication */ const HOME_FRAME_AUTH ={frame: 98,index: 'b'}; /* Home page for initial connection */ const HOME_FRAME_CONNECT ={frame: 980,index: 'a'}; const FRAME_SYSTEM_ERROR ={frame: 998,index: 'a'}; /* Attributes saved/loaded from files */ const SAVED_FRAME_ATTRS =['content','version','frame','input_fields','index','owner','cost','isPublic','isAccessible','type','key','date']; /* The page that has our echomail area reading template */ var MAIL_TEMPLATE_FRAME ='199a'; /* The page that has our echomail area summary template */ var MAIL_TEMPLATE_AREA_SUMMARY ='198a'; // The maximum size of embedded dynamic fields in frames var DYNAMIC_FIELD_SIZE_MAX =50; /** ESCAPE CODES **/ const ESC = '\x1b'; this;