export const IBMI_KNOWN_EXTENSIONS=new Set(['.rpgle','.sqlrpgle','.clle','.cl','.clp','.dspf','.pf','.lf','.prtf','.table.sql','.index.sql','.proc.sql','.bnd','.msgf','.bnddir']);const INELIGIBLE_EXTENSIONS=new Set(['.md','.yml','.yaml','.xml','.html','.htm','.css','.js','.ts','.json','.lock','.log','.sh','.bat','.cmd','.mk','.png','.jpg','.jpeg','.gif','.svg','.ico','.zip','.tar','.gz','.pdf']),INELIGIBLE_FILENAMES=new Set(['.gitignore','.gitattributes','.gitmodules','.editorconfig','.prettierrc','.eslintrc','.npmrc','.env','license','makefile','dockerfile','jenkinsfile','.dockerignore']);export function getIbmiExtension(_0x5559ed){const _0x4a51e9=_0x5559ed['split']('/')['pop']();for(const _0x10a0c9 of IBMI_KNOWN_EXTENSIONS){if(_0x10a0c9['includes']('.')&&_0x10a0c9!=='.'+_0x4a51e9['split']('.')['pop']()){if(_0x4a51e9['toLowerCase']()['endsWith'](_0x10a0c9))return _0x10a0c9;}}const _0x4d4d81=_0x4a51e9['lastIndexOf']('.');return _0x4d4d81>=0x0?_0x4a51e9['substring'](_0x4d4d81)['toLowerCase']():'';}export function getMemberName(_0x3aca46){const _0x54c02e=_0x3aca46['split']('/')['pop'](),_0xb46890=getIbmiExtension(_0x3aca46);return _0xb46890?_0x54c02e['substring'](0x0,_0x54c02e['length']-_0xb46890['length']):_0x54c02e;}export function getSourceFileName(_0x1573a5){const _0x44b4cb=_0x1573a5['split']('/');return _0x44b4cb['length']>=0x2?_0x44b4cb[_0x44b4cb['length']-0x2]:'';}export function validateIbmiFile(_0x7776ba){const _0x577ff0=_0x7776ba['split']('/')['pop'](),_0x5de29c=_0x577ff0['toLowerCase']();if(INELIGIBLE_FILENAMES['has'](_0x5de29c))return{'valid':![],'reason':'\x22'+_0x577ff0+'\x22\x20is\x20not\x20an\x20IBM\x20i\x20source\x20type'};const _0x5746ac=_0x5de29c['lastIndexOf']('.');if(_0x5746ac>=0x0){const _0x210074=_0x5de29c['substring'](_0x5746ac);if(INELIGIBLE_EXTENSIONS['has'](_0x210074))return{'valid':![],'reason':'\x22'+_0x210074+'\x22\x20files\x20are\x20not\x20IBM\x20i\x20source\x20types'};}const _0x4173db=getSourceFileName(_0x7776ba),_0xee793e=getMemberName(_0x7776ba);if(_0x4173db['length']>0xa)return{'valid':![],'reason':'Directory\x20name\x20\x22'+_0x4173db+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20source\x20file\x20name\x20limit)'};if(_0xee793e['length']>0xa)return{'valid':![],'reason':'File\x20name\x20\x22'+_0xee793e+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20name\x20limit)'};const _0x5cb173=getIbmiExtension(_0x7776ba);if(_0x5cb173){const _0x2b5d97=_0x5cb173['startsWith']('.')?_0x5cb173['substring'](0x1):_0x5cb173;if(_0x2b5d97['length']>0xa)return{'valid':![],'reason':'Extension\x20\x22'+_0x5cb173+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20type\x20limit)'};}return{'valid':!![]};}export function hasKnownIbmiExtension(_0x56fef7){const _0x6d004d=getIbmiExtension(_0x56fef7);return IBMI_KNOWN_EXTENSIONS['has'](_0x6d004d);}