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(_0x52e55b,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x3ce508=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x52e55b>=minFiles&&_0x52e55b<=_0x3ce508;}export function shouldAutoCollapseDiff(_0x483aef,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x483aef>=threshold;}export function getNextRenderedCount({renderedCount:_0x50f94a,totalFiles:_0x3ed998,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x50f94a+chunkSize,_0x3ed998);}export function renderedCountForTarget({renderedCount:_0x524d60,targetIndex:_0x330314,totalFiles:_0x20af6e,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x1f7980=_0x524d60;while(_0x1f7980<=_0x330314&&_0x1f7980<_0x20af6e){_0x1f7980=getNextRenderedCount({'renderedCount':_0x1f7980,'totalFiles':_0x20af6e,'chunkSize':chunkSize});}return _0x1f7980;}export function getLazyLoadMoreText({filesLength:_0x30ad1f,renderedCount:_0x390573,chunkSize:_0x285e08}){const _0x1e4eb7=Math['max'](0x0,_0x30ad1f-_0x390573),_0x4b8124=Math['min'](_0x285e08,_0x1e4eb7);return'Load\x20'+_0x4b8124['toLocaleString']()+'\x20more\x20files\x20('+_0x390573['toLocaleString']()+'\x20/\x20'+_0x30ad1f['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x4bf9d5){return _0x4bf9d5?.['newPath']||_0x4bf9d5?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x2ba86a,collapsed:_0x52dd4e,storageKeyPrefix:_0x441caf,getStorageKey:_0x284f22}){const _0x51fe2a=[];for(const _0x345eda of _0x2ba86a||[]){const _0x4f795c=getFileNameFromDiffFile(_0x345eda);if(!_0x4f795c)continue;_0x51fe2a['push']({'key':_0x284f22(_0x441caf,_0x4f795c),'value':String(_0x52dd4e),'fileName':_0x4f795c});}return _0x51fe2a;}