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(_0x487267){const _0x7da0b2=_0x487267['split']('/')['pop']();for(const _0x2256fb of IBMI_KNOWN_EXTENSIONS){if(_0x2256fb['includes']('.')&&_0x2256fb!=='.'+_0x7da0b2['split']('.')['pop']()){if(_0x7da0b2['toLowerCase']()['endsWith'](_0x2256fb))return _0x2256fb;}}const _0x41dacc=_0x7da0b2['lastIndexOf']('.');return _0x41dacc>=0x0?_0x7da0b2['substring'](_0x41dacc)['toLowerCase']():'';}export function getMemberName(_0x47b89d){const _0x125fd0=_0x47b89d['split']('/')['pop'](),_0x43e1fe=getIbmiExtension(_0x47b89d);return _0x43e1fe?_0x125fd0['substring'](0x0,_0x125fd0['length']-_0x43e1fe['length']):_0x125fd0;}export function getSourceFileName(_0x8abc88){const _0xffe53e=_0x8abc88['split']('/');return _0xffe53e['length']>=0x2?_0xffe53e[_0xffe53e['length']-0x2]:'';}export function validateIbmiFile(_0x568a76){const _0x17ec83=_0x568a76['split']('/')['pop'](),_0x29d787=_0x17ec83['toLowerCase']();if(INELIGIBLE_FILENAMES['has'](_0x29d787))return{'valid':![],'reason':'\x22'+_0x17ec83+'\x22\x20is\x20not\x20an\x20IBM\x20i\x20source\x20type'};const _0x1c8d65=_0x29d787['lastIndexOf']('.');if(_0x1c8d65>=0x0){const _0x2baa38=_0x29d787['substring'](_0x1c8d65);if(INELIGIBLE_EXTENSIONS['has'](_0x2baa38))return{'valid':![],'reason':'\x22'+_0x2baa38+'\x22\x20files\x20are\x20not\x20IBM\x20i\x20source\x20types'};}const _0x3b7db9=getSourceFileName(_0x568a76),_0x117047=getMemberName(_0x568a76);if(_0x3b7db9['length']>0xa)return{'valid':![],'reason':'Directory\x20name\x20\x22'+_0x3b7db9+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20source\x20file\x20name\x20limit)'};if(_0x117047['length']>0xa)return{'valid':![],'reason':'File\x20name\x20\x22'+_0x117047+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20name\x20limit)'};const _0x5d0bf9=getIbmiExtension(_0x568a76);if(_0x5d0bf9){const _0x336133=_0x5d0bf9['startsWith']('.')?_0x5d0bf9['substring'](0x1):_0x5d0bf9;if(_0x336133['length']>0xa)return{'valid':![],'reason':'Extension\x20\x22'+_0x5d0bf9+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20type\x20limit)'};}return{'valid':!![]};}export function hasKnownIbmiExtension(_0x3ad433){const _0x2ae98d=getIbmiExtension(_0x3ad433);return IBMI_KNOWN_EXTENSIONS['has'](_0x2ae98d);}