export const DEFAULT_LAZY_RENDER_MIN_FILES=0xc8;export const DEFAULT_LAZY_RENDER_MAX_FILES=0x3e7;export const DEFAULT_LAZY_RENDER_CHUNK_SIZE=0x28;export const DEFAULT_AUTO_COLLAPSE_MIN_FILES=0xc8;export function getLazyRenderUpperBound({maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){if(!Number['isFinite'](serverMaxFiles))return maxFiles;return Math['min'](maxFiles,serverMaxFiles);}export function shouldUseLazyRendering(_0x582407,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x42f01b=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x582407>=minFiles&&_0x582407<=_0x42f01b;}export function shouldAutoCollapseDiff(_0x50a692,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x50a692>=threshold;}export function getNextRenderedCount({renderedCount:_0x172c5f,totalFiles:_0xffddfa,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x172c5f+chunkSize,_0xffddfa);}export function renderedCountForTarget({renderedCount:_0x1c2fe9,targetIndex:_0x5d1119,totalFiles:_0x15fe97,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x382d75=_0x1c2fe9;while(_0x382d75<=_0x5d1119&&_0x382d75<_0x15fe97){_0x382d75=getNextRenderedCount({'renderedCount':_0x382d75,'totalFiles':_0x15fe97,'chunkSize':chunkSize});}return _0x382d75;}export function getLazyLoadMoreText({filesLength:_0x4f407f,renderedCount:_0xb5c8a9,chunkSize:_0x1068f1}){const _0x3b5a1d=Math['max'](0x0,_0x4f407f-_0xb5c8a9),_0x1e766d=Math['min'](_0x1068f1,_0x3b5a1d);return'Load\x20'+_0x1e766d['toLocaleString']()+'\x20more\x20files\x20('+_0xb5c8a9['toLocaleString']()+'\x20/\x20'+_0x4f407f['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x1893d0){return _0x1893d0?.['newPath']||_0x1893d0?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x4617a9,collapsed:_0x3f6d70,storageKeyPrefix:_0x39e83b,getStorageKey:_0x3e974e}){const _0x4d563f=[];for(const _0x2b9e01 of _0x4617a9||[]){const _0x5ce93c=getFileNameFromDiffFile(_0x2b9e01);if(!_0x5ce93c)continue;_0x4d563f['push']({'key':_0x3e974e(_0x39e83b,_0x5ce93c),'value':String(_0x3f6d70),'fileName':_0x5ce93c});}return _0x4d563f;}