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(_0x19bac6){const _0x3aa8a2=_0x19bac6['split']('/')['pop']();for(const _0x179baa of IBMI_KNOWN_EXTENSIONS){if(_0x179baa['includes']('.')&&_0x179baa!=='.'+_0x3aa8a2['split']('.')['pop']()){if(_0x3aa8a2['toLowerCase']()['endsWith'](_0x179baa))return _0x179baa;}}const _0x56f9cb=_0x3aa8a2['lastIndexOf']('.');return _0x56f9cb>=0x0?_0x3aa8a2['substring'](_0x56f9cb)['toLowerCase']():'';}export function getMemberName(_0x4bd580){const _0x114bd4=_0x4bd580['split']('/')['pop'](),_0xa4352b=getIbmiExtension(_0x4bd580);return _0xa4352b?_0x114bd4['substring'](0x0,_0x114bd4['length']-_0xa4352b['length']):_0x114bd4;}export function getSourceFileName(_0x41e189){const _0x17d523=_0x41e189['split']('/');return _0x17d523['length']>=0x2?_0x17d523[_0x17d523['length']-0x2]:'';}export function validateIbmiFile(_0x42dc01){const _0x19b91d=_0x42dc01['split']('/')['pop'](),_0x65f071=_0x19b91d['toLowerCase']();if(INELIGIBLE_FILENAMES['has'](_0x65f071))return{'valid':![],'reason':'\x22'+_0x19b91d+'\x22\x20is\x20not\x20an\x20IBM\x20i\x20source\x20type'};const _0x1b1941=_0x65f071['lastIndexOf']('.');if(_0x1b1941>=0x0){const _0x21c038=_0x65f071['substring'](_0x1b1941);if(INELIGIBLE_EXTENSIONS['has'](_0x21c038))return{'valid':![],'reason':'\x22'+_0x21c038+'\x22\x20files\x20are\x20not\x20IBM\x20i\x20source\x20types'};}const _0x29003d=getSourceFileName(_0x42dc01),_0x11cd7f=getMemberName(_0x42dc01);if(_0x29003d['length']>0xa)return{'valid':![],'reason':'Directory\x20name\x20\x22'+_0x29003d+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20source\x20file\x20name\x20limit)'};if(_0x11cd7f['length']>0xa)return{'valid':![],'reason':'File\x20name\x20\x22'+_0x11cd7f+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20name\x20limit)'};const _0x592ac9=getIbmiExtension(_0x42dc01);if(_0x592ac9){const _0x17a405=_0x592ac9['startsWith']('.')?_0x592ac9['substring'](0x1):_0x592ac9;if(_0x17a405['length']>0xa)return{'valid':![],'reason':'Extension\x20\x22'+_0x592ac9+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20type\x20limit)'};}return{'valid':!![]};}export function hasKnownIbmiExtension(_0x1bab39){const _0x476090=getIbmiExtension(_0x1bab39);return IBMI_KNOWN_EXTENSIONS['has'](_0x476090);}