Built motion from commit 1fa89557.|2.6.10
[motion2.git] / server / api / intZohoField / intZohoField.controller.js
index 185aa44..080a51e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x39f8=['model','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','show','params','keys','length','find','create','body','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','fs-extra','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','then','destroy','stack','name','send','index','map','ZohoField','rawAttributes','fieldName','type','key'];(function(_0x41ff30,_0x10f6f7){var _0x544f11=function(_0x270390){while(--_0x270390){_0x41ff30['push'](_0x41ff30['shift']());}};_0x544f11(++_0x10f6f7);}(_0x39f8,0xb3));var _0x839f=function(_0x147662,_0x5deefb){_0x147662=_0x147662-0x0;var _0x8e91c9=_0x39f8[_0x147662];return _0x8e91c9;};'use strict';var emlformat=require(_0x839f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x839f('0x1'));var jsonpatch=require(_0x839f('0x2'));var rp=require(_0x839f('0x3'));var moment=require(_0x839f('0x4'));var BPromise=require(_0x839f('0x5'));var Mustache=require(_0x839f('0x6'));var util=require(_0x839f('0x7'));var path=require('path');var sox=require(_0x839f('0x8'));var csv=require('to-csv');var ejs=require(_0x839f('0x9'));var fs=require('fs');var fs_extra=require(_0x839f('0xa'));var _=require('lodash');var squel=require(_0x839f('0xb'));var crypto=require('crypto');var jsforce=require(_0x839f('0xc'));var deskjs=require(_0x839f('0xd'));var toCsv=require(_0x839f('0xe'));var querystring=require(_0x839f('0xf'));var Papa=require(_0x839f('0x10'));var Redis=require(_0x839f('0x11'));var authService=require(_0x839f('0x12'));var qs=require(_0x839f('0x13'));var as=require(_0x839f('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x839f('0x15'));var utils=require(_0x839f('0x16'));var config=require(_0x839f('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x839f('0x18'))['db'];function respondWithStatusCode(_0x5d619d,_0x1f77cd){_0x1f77cd=_0x1f77cd||0xcc;return function(_0x4147e4){if(_0x4147e4){return _0x5d619d[_0x839f('0x19')](_0x1f77cd);}return _0x5d619d[_0x839f('0x1a')](_0x1f77cd)[_0x839f('0x1b')]();};}function respondWithResult(_0x3dff99,_0x27e3f7){_0x27e3f7=_0x27e3f7||0xc8;return function(_0x566883){if(_0x566883){return _0x3dff99[_0x839f('0x1a')](_0x27e3f7)[_0x839f('0x1c')](_0x566883);}};}function respondWithFilteredResult(_0x1d0c25,_0xda540){return function(_0x58cf55){if(_0x58cf55){var _0x4441ed=typeof _0xda540[_0x839f('0x1d')]===_0x839f('0x1e')&&typeof _0xda540[_0x839f('0x1f')]==='undefined';var _0x1b30f1=_0x58cf55[_0x839f('0x20')];var _0x3ec6ce=_0x4441ed?0x0:_0xda540[_0x839f('0x1d')];var _0x2bb40e=_0x4441ed?_0x58cf55[_0x839f('0x20')]:_0xda540[_0x839f('0x1d')]+_0xda540['limit'];var _0x4f1fce;if(_0x2bb40e>=_0x1b30f1){_0x2bb40e=_0x1b30f1;_0x4f1fce=0xc8;}else{_0x4f1fce=0xce;}_0x1d0c25[_0x839f('0x1a')](_0x4f1fce);return _0x1d0c25[_0x839f('0x21')]('Content-Range',_0x3ec6ce+'-'+_0x2bb40e+'/'+_0x1b30f1)[_0x839f('0x1c')](_0x58cf55);}return null;};}function patchUpdates(_0x1fd5d0){return function(_0x4bfc98){try{jsonpatch[_0x839f('0x22')](_0x4bfc98,_0x1fd5d0,!![]);}catch(_0xaef648){return BPromise[_0x839f('0x23')](_0xaef648);}return _0x4bfc98[_0x839f('0x24')]();};}function saveUpdates(_0xb6b1d4,_0x217f58){return function(_0x345e13){if(_0x345e13){return _0x345e13['update'](_0xb6b1d4)[_0x839f('0x25')](function(_0x10aafd){return _0x10aafd;});}return null;};}function removeEntity(_0x2684eb,_0x188336){return function(_0x3197c2){if(_0x3197c2){return _0x3197c2[_0x839f('0x26')]()[_0x839f('0x25')](function(){_0x2684eb[_0x839f('0x1a')](0xcc)[_0x839f('0x1b')]();});}};}function handleEntityNotFound(_0x38d131,_0x4c5a03){return function(_0x3c157a){if(!_0x3c157a){_0x38d131[_0x839f('0x19')](0x194);}return _0x3c157a;};}function handleError(_0xd16c02,_0x12f981){_0x12f981=_0x12f981||0x1f4;return function(_0x250582){logger['error'](_0x250582[_0x839f('0x27')]);if(_0x250582[_0x839f('0x28')]){delete _0x250582[_0x839f('0x28')];}_0xd16c02[_0x839f('0x1a')](_0x12f981)[_0x839f('0x29')](_0x250582);};}exports[_0x839f('0x2a')]=function(_0x2f9fd0,_0x602c5){var _0x41237e={},_0x3893c7={},_0x5977f3={'count':0x0,'rows':[]};var _0x2856ab=_[_0x839f('0x2b')](db[_0x839f('0x2c')][_0x839f('0x2d')],function(_0x5ec155){return{'name':_0x5ec155[_0x839f('0x2e')],'type':_0x5ec155[_0x839f('0x2f')][_0x839f('0x30')]};});_0x3893c7[_0x839f('0x31')]=_[_0x839f('0x2b')](_0x2856ab,_0x839f('0x28'));_0x3893c7['query']=_['keys'](_0x2f9fd0[_0x839f('0x32')]);_0x3893c7[_0x839f('0x33')]=_[_0x839f('0x34')](_0x3893c7[_0x839f('0x31')],_0x3893c7[_0x839f('0x32')]);_0x41237e[_0x839f('0x35')]=_[_0x839f('0x34')](_0x3893c7[_0x839f('0x31')],qs[_0x839f('0x36')](_0x2f9fd0[_0x839f('0x32')][_0x839f('0x36')]));_0x41237e[_0x839f('0x35')]=_0x41237e[_0x839f('0x35')]['length']?_0x41237e['attributes']:_0x3893c7[_0x839f('0x31')];if(!_0x2f9fd0['query'][_0x839f('0x37')]('nolimit')){_0x41237e['limit']=qs[_0x839f('0x1f')](_0x2f9fd0['query'][_0x839f('0x1f')]);_0x41237e[_0x839f('0x1d')]=qs[_0x839f('0x1d')](_0x2f9fd0['query'][_0x839f('0x1d')]);}_0x41237e[_0x839f('0x38')]=qs[_0x839f('0x39')](_0x2f9fd0[_0x839f('0x32')][_0x839f('0x39')]);_0x41237e[_0x839f('0x3a')]=qs[_0x839f('0x33')](_[_0x839f('0x3b')](_0x2f9fd0[_0x839f('0x32')],_0x3893c7[_0x839f('0x33')]),_0x2856ab);if(_0x2f9fd0[_0x839f('0x32')]['filter']){_0x41237e['where']=_[_0x839f('0x3c')](_0x41237e[_0x839f('0x3a')],{'$or':_[_0x839f('0x2b')](_0x2856ab,function(_0x479cc4){if(_0x479cc4[_0x839f('0x2f')]!==_0x839f('0x3d')){var _0x35eec6={};_0x35eec6[_0x479cc4[_0x839f('0x28')]]={'$like':'%'+_0x2f9fd0[_0x839f('0x32')][_0x839f('0x3e')]+'%'};return _0x35eec6;}})});}_0x41237e=_[_0x839f('0x3c')]({},_0x41237e,_0x2f9fd0[_0x839f('0x3f')]);var _0xb27ce3={'where':_0x41237e['where']};return db[_0x839f('0x2c')][_0x839f('0x20')](_0xb27ce3)[_0x839f('0x25')](function(_0x231684){_0x5977f3[_0x839f('0x20')]=_0x231684;if(_0x2f9fd0[_0x839f('0x32')][_0x839f('0x40')]){_0x41237e[_0x839f('0x41')]=[{'all':!![]}];}return db[_0x839f('0x2c')][_0x839f('0x42')](_0x41237e);})['then'](function(_0xe9ad4d){_0x5977f3[_0x839f('0x43')]=_0xe9ad4d;return _0x5977f3;})[_0x839f('0x25')](respondWithFilteredResult(_0x602c5,_0x41237e))[_0x839f('0x44')](handleError(_0x602c5,null));};exports[_0x839f('0x45')]=function(_0x39c299,_0x158916){var _0x43640b={'raw':!![],'where':{'id':_0x39c299[_0x839f('0x46')]['id']}},_0xb50571={};_0xb50571[_0x839f('0x31')]=_[_0x839f('0x47')](db[_0x839f('0x2c')][_0x839f('0x2d')]);_0xb50571[_0x839f('0x32')]=_['keys'](_0x39c299[_0x839f('0x32')]);_0xb50571[_0x839f('0x33')]=_['intersection'](_0xb50571[_0x839f('0x31')],_0xb50571[_0x839f('0x32')]);_0x43640b[_0x839f('0x35')]=_[_0x839f('0x34')](_0xb50571[_0x839f('0x31')],qs[_0x839f('0x36')](_0x39c299['query']['fields']));_0x43640b['attributes']=_0x43640b[_0x839f('0x35')][_0x839f('0x48')]?_0x43640b[_0x839f('0x35')]:_0xb50571[_0x839f('0x31')];if(_0x39c299[_0x839f('0x32')][_0x839f('0x40')]){_0x43640b['include']=[{'all':!![]}];}_0x43640b=_[_0x839f('0x3c')]({},_0x43640b,_0x39c299[_0x839f('0x3f')]);return db[_0x839f('0x2c')][_0x839f('0x49')](_0x43640b)[_0x839f('0x25')](handleEntityNotFound(_0x158916,null))[_0x839f('0x25')](respondWithResult(_0x158916,null))[_0x839f('0x44')](handleError(_0x158916,null));};exports[_0x839f('0x4a')]=function(_0x1f0fe4,_0x379f65){return db[_0x839f('0x2c')][_0x839f('0x4a')](_0x1f0fe4[_0x839f('0x4b')],{})[_0x839f('0x25')](respondWithResult(_0x379f65,0xc9))[_0x839f('0x44')](handleError(_0x379f65,null));};exports['update']=function(_0x3bc38a,_0x34a617){if(_0x3bc38a[_0x839f('0x4b')]['id']){delete _0x3bc38a[_0x839f('0x4b')]['id'];}return db[_0x839f('0x2c')][_0x839f('0x49')]({'where':{'id':_0x3bc38a['params']['id']}})[_0x839f('0x25')](handleEntityNotFound(_0x34a617,null))[_0x839f('0x25')](saveUpdates(_0x3bc38a[_0x839f('0x4b')],null))['then'](respondWithResult(_0x34a617,null))[_0x839f('0x44')](handleError(_0x34a617,null));};exports[_0x839f('0x26')]=function(_0x425bc7,_0x2ff5e2){return db[_0x839f('0x2c')]['find']({'where':{'id':_0x425bc7[_0x839f('0x46')]['id']}})[_0x839f('0x25')](handleEntityNotFound(_0x2ff5e2,null))[_0x839f('0x25')](removeEntity(_0x2ff5e2,null))['catch'](handleError(_0x2ff5e2,null));};
\ No newline at end of file
+var _0xa936=['lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','status','json','offset','undefined','limit','count','reject','save','update','destroy','then','sendStatus','error','stack','name','send','map','ZohoField','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','order','sort','where','pick','filter','options','includeAll','include','rows','catch','show','params','length','find','create','body','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','ejs','fs-extra'];(function(_0x1727ad,_0x3283e4){var _0x441a02=function(_0x176a5f){while(--_0x176a5f){_0x1727ad['push'](_0x1727ad['shift']());}};_0x441a02(++_0x3283e4);}(_0xa936,0x107));var _0x6a93=function(_0xaa1b3e,_0x47d976){_0xaa1b3e=_0xaa1b3e-0x0;var _0x454d7d=_0xa936[_0xaa1b3e];return _0x454d7d;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x6a93('0x0'));var jsonpatch=require(_0x6a93('0x1'));var rp=require(_0x6a93('0x2'));var moment=require('moment');var BPromise=require(_0x6a93('0x3'));var Mustache=require(_0x6a93('0x4'));var util=require(_0x6a93('0x5'));var path=require('path');var sox=require(_0x6a93('0x6'));var csv=require('to-csv');var ejs=require(_0x6a93('0x7'));var fs=require('fs');var fs_extra=require(_0x6a93('0x8'));var _=require(_0x6a93('0x9'));var squel=require(_0x6a93('0xa'));var crypto=require(_0x6a93('0xb'));var jsforce=require(_0x6a93('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x6a93('0xd'));var querystring=require(_0x6a93('0xe'));var Papa=require(_0x6a93('0xf'));var Redis=require(_0x6a93('0x10'));var authService=require(_0x6a93('0x11'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x6a93('0x12'));var logger=require(_0x6a93('0x13'))(_0x6a93('0x14'));var utils=require(_0x6a93('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x6a93('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4780a5,_0x32c864){_0x32c864=_0x32c864||0xcc;return function(_0x28c06c){if(_0x28c06c){return _0x4780a5['sendStatus'](_0x32c864);}return _0x4780a5[_0x6a93('0x17')](_0x32c864)['end']();};}function respondWithResult(_0x2cac47,_0xb701cd){_0xb701cd=_0xb701cd||0xc8;return function(_0x4aeeb6){if(_0x4aeeb6){return _0x2cac47[_0x6a93('0x17')](_0xb701cd)[_0x6a93('0x18')](_0x4aeeb6);}};}function respondWithFilteredResult(_0x3679ab,_0x5c1a52){return function(_0x56ffe7){if(_0x56ffe7){var _0x3e87c9=typeof _0x5c1a52[_0x6a93('0x19')]===_0x6a93('0x1a')&&typeof _0x5c1a52[_0x6a93('0x1b')]===_0x6a93('0x1a');var _0x32a018=_0x56ffe7[_0x6a93('0x1c')];var _0x4f2139=_0x3e87c9?0x0:_0x5c1a52[_0x6a93('0x19')];var _0x42129f=_0x3e87c9?_0x56ffe7[_0x6a93('0x1c')]:_0x5c1a52['offset']+_0x5c1a52[_0x6a93('0x1b')];var _0x401402;if(_0x42129f>=_0x32a018){_0x42129f=_0x32a018;_0x401402=0xc8;}else{_0x401402=0xce;}_0x3679ab[_0x6a93('0x17')](_0x401402);return _0x3679ab['set']('Content-Range',_0x4f2139+'-'+_0x42129f+'/'+_0x32a018)[_0x6a93('0x18')](_0x56ffe7);}return null;};}function patchUpdates(_0x1c62c0){return function(_0x254403){try{jsonpatch['apply'](_0x254403,_0x1c62c0,!![]);}catch(_0x236a08){return BPromise[_0x6a93('0x1d')](_0x236a08);}return _0x254403[_0x6a93('0x1e')]();};}function saveUpdates(_0x2f0892,_0x1a390b){return function(_0x50bf3e){if(_0x50bf3e){return _0x50bf3e[_0x6a93('0x1f')](_0x2f0892)['then'](function(_0x4b8786){return _0x4b8786;});}return null;};}function removeEntity(_0x1b318a,_0x3691b4){return function(_0x25e3e1){if(_0x25e3e1){return _0x25e3e1[_0x6a93('0x20')]()[_0x6a93('0x21')](function(){_0x1b318a[_0x6a93('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5c5cb6,_0x2c6bde){return function(_0x5a6734){if(!_0x5a6734){_0x5c5cb6[_0x6a93('0x22')](0x194);}return _0x5a6734;};}function handleError(_0x11aec9,_0x43a772){_0x43a772=_0x43a772||0x1f4;return function(_0x97259){logger[_0x6a93('0x23')](_0x97259[_0x6a93('0x24')]);if(_0x97259[_0x6a93('0x25')]){delete _0x97259[_0x6a93('0x25')];}_0x11aec9[_0x6a93('0x17')](_0x43a772)[_0x6a93('0x26')](_0x97259);};}exports['index']=function(_0x17b6d3,_0x5ed149){var _0xca6b7b={},_0x3db08f={},_0x2ee77d={'count':0x0,'rows':[]};var _0x4632d4=_[_0x6a93('0x27')](db[_0x6a93('0x28')][_0x6a93('0x29')],function(_0x39727c){return{'name':_0x39727c[_0x6a93('0x2a')],'type':_0x39727c[_0x6a93('0x2b')]['key']};});_0x3db08f[_0x6a93('0x2c')]=_['map'](_0x4632d4,_0x6a93('0x25'));_0x3db08f[_0x6a93('0x2d')]=_[_0x6a93('0x2e')](_0x17b6d3['query']);_0x3db08f[_0x6a93('0x2f')]=_[_0x6a93('0x30')](_0x3db08f[_0x6a93('0x2c')],_0x3db08f['query']);_0xca6b7b['attributes']=_[_0x6a93('0x30')](_0x3db08f[_0x6a93('0x2c')],qs[_0x6a93('0x31')](_0x17b6d3[_0x6a93('0x2d')][_0x6a93('0x31')]));_0xca6b7b[_0x6a93('0x32')]=_0xca6b7b[_0x6a93('0x32')]['length']?_0xca6b7b[_0x6a93('0x32')]:_0x3db08f[_0x6a93('0x2c')];if(!_0x17b6d3[_0x6a93('0x2d')][_0x6a93('0x33')]('nolimit')){_0xca6b7b[_0x6a93('0x1b')]=qs[_0x6a93('0x1b')](_0x17b6d3[_0x6a93('0x2d')][_0x6a93('0x1b')]);_0xca6b7b[_0x6a93('0x19')]=qs[_0x6a93('0x19')](_0x17b6d3[_0x6a93('0x2d')][_0x6a93('0x19')]);}_0xca6b7b[_0x6a93('0x34')]=qs[_0x6a93('0x35')](_0x17b6d3[_0x6a93('0x2d')][_0x6a93('0x35')]);_0xca6b7b[_0x6a93('0x36')]=qs['filters'](_[_0x6a93('0x37')](_0x17b6d3[_0x6a93('0x2d')],_0x3db08f[_0x6a93('0x2f')]),_0x4632d4);if(_0x17b6d3[_0x6a93('0x2d')]['filter']){_0xca6b7b['where']=_['merge'](_0xca6b7b[_0x6a93('0x36')],{'$or':_[_0x6a93('0x27')](_0x4632d4,function(_0x52de4c){if(_0x52de4c[_0x6a93('0x2b')]!=='VIRTUAL'){var _0x11f5a3={};_0x11f5a3[_0x52de4c[_0x6a93('0x25')]]={'$like':'%'+_0x17b6d3[_0x6a93('0x2d')][_0x6a93('0x38')]+'%'};return _0x11f5a3;}})});}_0xca6b7b=_['merge']({},_0xca6b7b,_0x17b6d3[_0x6a93('0x39')]);var _0x5864e1={'where':_0xca6b7b[_0x6a93('0x36')]};return db[_0x6a93('0x28')]['count'](_0x5864e1)[_0x6a93('0x21')](function(_0x467651){_0x2ee77d[_0x6a93('0x1c')]=_0x467651;if(_0x17b6d3[_0x6a93('0x2d')][_0x6a93('0x3a')]){_0xca6b7b[_0x6a93('0x3b')]=[{'all':!![]}];}return db[_0x6a93('0x28')]['findAll'](_0xca6b7b);})[_0x6a93('0x21')](function(_0x384592){_0x2ee77d[_0x6a93('0x3c')]=_0x384592;return _0x2ee77d;})[_0x6a93('0x21')](respondWithFilteredResult(_0x5ed149,_0xca6b7b))[_0x6a93('0x3d')](handleError(_0x5ed149,null));};exports[_0x6a93('0x3e')]=function(_0x30fed5,_0x50224a){var _0x51e43d={'raw':!![],'where':{'id':_0x30fed5[_0x6a93('0x3f')]['id']}},_0x52a500={};_0x52a500[_0x6a93('0x2c')]=_[_0x6a93('0x2e')](db[_0x6a93('0x28')][_0x6a93('0x29')]);_0x52a500[_0x6a93('0x2d')]=_[_0x6a93('0x2e')](_0x30fed5[_0x6a93('0x2d')]);_0x52a500['filters']=_['intersection'](_0x52a500[_0x6a93('0x2c')],_0x52a500['query']);_0x51e43d[_0x6a93('0x32')]=_['intersection'](_0x52a500['model'],qs['fields'](_0x30fed5[_0x6a93('0x2d')][_0x6a93('0x31')]));_0x51e43d[_0x6a93('0x32')]=_0x51e43d[_0x6a93('0x32')][_0x6a93('0x40')]?_0x51e43d[_0x6a93('0x32')]:_0x52a500[_0x6a93('0x2c')];if(_0x30fed5['query']['includeAll']){_0x51e43d[_0x6a93('0x3b')]=[{'all':!![]}];}_0x51e43d=_['merge']({},_0x51e43d,_0x30fed5[_0x6a93('0x39')]);return db[_0x6a93('0x28')][_0x6a93('0x41')](_0x51e43d)['then'](handleEntityNotFound(_0x50224a,null))['then'](respondWithResult(_0x50224a,null))[_0x6a93('0x3d')](handleError(_0x50224a,null));};exports[_0x6a93('0x42')]=function(_0x1f6798,_0x3f514d){return db[_0x6a93('0x28')][_0x6a93('0x42')](_0x1f6798['body'],{})['then'](respondWithResult(_0x3f514d,0xc9))[_0x6a93('0x3d')](handleError(_0x3f514d,null));};exports[_0x6a93('0x1f')]=function(_0x14f077,_0x1b6185){if(_0x14f077[_0x6a93('0x43')]['id']){delete _0x14f077[_0x6a93('0x43')]['id'];}return db['ZohoField'][_0x6a93('0x41')]({'where':{'id':_0x14f077[_0x6a93('0x3f')]['id']}})[_0x6a93('0x21')](handleEntityNotFound(_0x1b6185,null))['then'](saveUpdates(_0x14f077[_0x6a93('0x43')],null))[_0x6a93('0x21')](respondWithResult(_0x1b6185,null))[_0x6a93('0x3d')](handleError(_0x1b6185,null));};exports['destroy']=function(_0x7e15d1,_0x2e7f7b){return db[_0x6a93('0x28')][_0x6a93('0x41')]({'where':{'id':_0x7e15d1['params']['id']}})[_0x6a93('0x21')](handleEntityNotFound(_0x2e7f7b,null))[_0x6a93('0x21')](removeEntity(_0x2e7f7b,null))[_0x6a93('0x3d')](handleError(_0x2e7f7b,null));};
\ No newline at end of file