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(_0x5705ac){const _0x2e4240=_0x5705ac['split']('/')['pop']();for(const _0x4751bf of IBMI_KNOWN_EXTENSIONS){if(_0x4751bf['includes']('.')&&_0x4751bf!=='.'+_0x2e4240['split']('.')['pop']()){if(_0x2e4240['toLowerCase']()['endsWith'](_0x4751bf))return _0x4751bf;}}const _0x3ac8a5=_0x2e4240['lastIndexOf']('.');return _0x3ac8a5>=0x0?_0x2e4240['substring'](_0x3ac8a5)['toLowerCase']():'';}export function getMemberName(_0x92988b){const _0x26e724=_0x92988b['split']('/')['pop'](),_0x35b5df=getIbmiExtension(_0x92988b);return _0x35b5df?_0x26e724['substring'](0x0,_0x26e724['length']-_0x35b5df['length']):_0x26e724;}export function getSourceFileName(_0x429853){const _0x4f9760=_0x429853['split']('/');return _0x4f9760['length']>=0x2?_0x4f9760[_0x4f9760['length']-0x2]:'';}export function validateIbmiFile(_0x1b69af){const _0x44ff20=_0x1b69af['split']('/')['pop'](),_0x59e984=_0x44ff20['toLowerCase']();if(INELIGIBLE_FILENAMES['has'](_0x59e984))return{'valid':![],'reason':'\x22'+_0x44ff20+'\x22\x20is\x20not\x20an\x20IBM\x20i\x20source\x20type'};const _0x564877=_0x59e984['lastIndexOf']('.');if(_0x564877>=0x0){const _0xc91f82=_0x59e984['substring'](_0x564877);if(INELIGIBLE_EXTENSIONS['has'](_0xc91f82))return{'valid':![],'reason':'\x22'+_0xc91f82+'\x22\x20files\x20are\x20not\x20IBM\x20i\x20source\x20types'};}const _0x2b98d1=getSourceFileName(_0x1b69af),_0x8eab04=getMemberName(_0x1b69af);if(_0x2b98d1['length']>0xa)return{'valid':![],'reason':'Directory\x20name\x20\x22'+_0x2b98d1+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20source\x20file\x20name\x20limit)'};if(_0x8eab04['length']>0xa)return{'valid':![],'reason':'File\x20name\x20\x22'+_0x8eab04+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20name\x20limit)'};const _0x8059b7=getIbmiExtension(_0x1b69af);if(_0x8059b7){const _0x52a805=_0x8059b7['startsWith']('.')?_0x8059b7['substring'](0x1):_0x8059b7;if(_0x52a805['length']>0xa)return{'valid':![],'reason':'Extension\x20\x22'+_0x8059b7+'\x22\x20exceeds\x2010\x20characters\x20(IBM\x20i\x20member\x20type\x20limit)'};}return{'valid':!![]};}export function hasKnownIbmiExtension(_0x1f8d41){const _0x41fdd1=getIbmiExtension(_0x1f8d41);return IBMI_KNOWN_EXTENSIONS['has'](_0x41fdd1);}