@myagentroam/node 0.9.38 → 0.9.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /* mar-release-protected */
2
- const _0x5ca356=_0x53af;(function(_0x3d0874,_0x3684b5){const _0x549db7=_0x53af,_0x2a405e=_0x3d0874();while(!![]){try{const _0x16b948=-parseInt(_0x549db7(0x167))/(-0x1e6b*-0x1+0x3*-0x2e7+-0x15b5)+-parseInt(_0x549db7(0x145))/(-0x13d*0x7+-0x1157+0x1a04)+parseInt(_0x549db7(0x173))/(0x1*-0x1e7d+0x2b4+0x1bcc)+-parseInt(_0x549db7(0x141))/(0x247c+-0x1*-0xd9f+-0x3217)*(-parseInt(_0x549db7(0x151))/(-0x198b+-0x233a+0x3cca))+-parseInt(_0x549db7(0x152))/(0x5ad*0x1+0x427+0xfb*-0xa)*(parseInt(_0x549db7(0x14a))/(-0x153c+-0x100d*-0x1+-0x2*-0x29b))+parseInt(_0x549db7(0x142))/(-0x35*0x1c+0x1936+-0x1362)+parseInt(_0x549db7(0x166))/(0x1583+-0x7c8+-0x2*0x6d9);if(_0x16b948===_0x3684b5)break;else _0x2a405e['push'](_0x2a405e['shift']());}catch(_0x53b558){_0x2a405e['push'](_0x2a405e['shift']());}}}(_0x37a9,-0x11986*0x4+-0x5b53*0x11+0xeb81c));function _0x53af(_0x30b13f,_0xe826e6){_0x30b13f=_0x30b13f-(0x201*-0xd+0x27*0x41+0x3*0x5cb);const _0x3d1951=_0x37a9();let _0x27ef93=_0x3d1951[_0x30b13f];if(_0x53af['RhMfTz']===undefined){var _0x4b845f=function(_0x5c03c5){const _0x5e6691='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57d6a2='',_0x5c1cdd='';for(let _0x3fdc32=0x109*0x2+0x1ea0+0xae6*-0x3,_0xd652fb,_0x5afae5,_0x2791c2=-0x636+-0x1*0xb93+0x11c9;_0x5afae5=_0x5c03c5['charAt'](_0x2791c2++);~_0x5afae5&&(_0xd652fb=_0x3fdc32%(-0x3dd*0x7+-0x1*0x5af+0xb*0x2fa)?_0xd652fb*(0x98e*0x3+0x1*0x1c16+0x1*-0x3880)+_0x5afae5:_0x5afae5,_0x3fdc32++%(0x906+-0xb6a*0x3+0x193c))?_0x57d6a2+=String['fromCharCode'](-0x3*0x2dd+0xcdf+0x1d*-0x1d&_0xd652fb>>(-(-0x2*-0x65+0x31d*-0x1+0x3*0xc7)*_0x3fdc32&0x22c4+-0x1cb4+-0x60a)):-0x6*0x610+-0xac*-0x4+0x31*0xb0){_0x5afae5=_0x5e6691['indexOf'](_0x5afae5);}for(let _0x4c94ea=-0x7*-0x71+-0x119e+-0x1*-0xe87,_0x4dd7bf=_0x57d6a2['length'];_0x4c94ea<_0x4dd7bf;_0x4c94ea++){_0x5c1cdd+='%'+('00'+_0x57d6a2['charCodeAt'](_0x4c94ea)['toString'](-0x1b13+-0xa2f*0x2+0x2f81))['slice'](-(0xd7c*-0x2+0x9dd+0x111d));}return decodeURIComponent(_0x5c1cdd);};_0x53af['ToYnbB']=_0x4b845f,_0x53af['XfyUJz']={},_0x53af['RhMfTz']=!![];}const _0x1ac55d=_0x3d1951[-0x1282+-0x4e1*-0x3+0x1*0x3df];_0x53af['GReBKq']!==_0x1ac55d&&(_0x53af['XfyUJz']={},_0x53af['GReBKq']=_0x1ac55d);const _0x38b667=_0x53af['XfyUJz'][_0x30b13f];return _0x38b667===undefined?(_0x27ef93=_0x53af['ToYnbB'](_0x27ef93),_0x53af['XfyUJz'][_0x30b13f]=_0x27ef93):_0x27ef93=_0x38b667,_0x27ef93;}function _0x37a9(){const _0x55ccd6=['Bxv0yxrL','Cgf0Aa','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','zgLZCg9Zzq','CMvHza','y2XLyxi','nxzwDefOAa','mtK3mtuZne1IueHyuW','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','z2v0','BNvTyMvY','C2vYAwfSAxPLtxv0yxrPB24','q1jfqvrfx0zjteu','rKLmrv9xuKLurv9jtLzbteLe','BgLZDa','revmrvrf','AxnjBNrLz2vY','q1jfqvrfx0rjuKvdve9swq','Aw5JBhvKzurPCMvJDg9YAwvZ','B2zMC2v0','tu9wrq','DgHLBG','ChjLDMLLD1jVB3rZ','C2L6zq','BgLTAxq','DMfSDwu','CMvZB2X2zq','nZeXmtmYm0TfDKvLDW','mZGWmtu3ANvtuerP','y3vYC29Y','C3rYAw5N','y29UDgvUDa','rKLmrv9squ5hrv9jtLzbteLe','zgvZDgLUyxrPB24','D3jPDgu','ywXSB3DLzfjVB3rZ','C2v0','ywn0Aw9U','zgvSzxrL','C2vHCMnO','nJe1otaZCxv4vNvO','zMLSzuLUzgv4zxm','CMvHzenVBNrLBNq','Bxv0yxrPB25uywLSCW','Aw5KzxG','B25jBNzHBgLKyxrLza','zw50CMLLCW','C3rHDgu','AxnbyNnVBhv0zq','otiXmtm2q21NBxzM','mJi3mJq5nKL2rwHLrG','CxvLCNK','zxHWzwn0zwrszxzPC2LVBG','mta0ndi3mhvfBK1eAa','BMv4Da','DMfSDwvZ','rKLmrv9nvvrbveLptL9jtLzbteLe','yM9VBgvHBG','n3j1qvnPvW'];_0x37a9=function(){return _0x55ccd6;};return _0x37a9();}import{tmpdir}from'node:os';import{isAbsolute,win32}from'node:path';import{listWorkspaceFiles,mutateWorkspaceFile,normalizeFilePreviewPath,readAllowedFileContentRange,readWorkspaceFileContentRange,readAllowedTextFile,readWorkspaceTextFile,writeWorkspaceTextFile,WorkspaceFileIndex}from'../workspace.js';const INDEX_CACHE_LIMIT=0x687+0x1ef7*0x1+-0x2576;export class WorkspaceFileService{[_0x5ca356(0x13f)];[_0x5ca356(0x16e)];[_0x5ca356(0x13d)];[_0x5ca356(0x13b)]=new Map();constructor(_0x17568e,_0x92f431,_0x510804){const _0x4f5939=_0x5ca356;this[_0x4f5939(0x13f)]=_0x17568e,this[_0x4f5939(0x16e)]=_0x92f431,this[_0x4f5939(0x13d)]=_0x510804;}async[_0x5ca356(0x159)](_0x1fd2ae,_0x563987){const _0x5da5ec=_0x5ca356;if(_0x563987[_0x5da5ec(0x14c)]!==undefined&&typeof _0x563987[_0x5da5ec(0x14c)]!==_0x5da5ec(0x169)||_0x563987[_0x5da5ec(0x168)]!==undefined&&typeof _0x563987[_0x5da5ec(0x168)]!==_0x5da5ec(0x169)||_0x563987[_0x5da5ec(0x163)]!==undefined&&(!Number[_0x5da5ec(0x15b)](_0x563987[_0x5da5ec(0x163)])||_0x563987[_0x5da5ec(0x163)]<-0x1*0xb93+-0x1a9d+0x2631||_0x563987[_0x5da5ec(0x163)]>-0x5af+-0x1*-0xadc+0x9*-0x7d))throw new Error(_0x5da5ec(0x14d));return listWorkspaceFiles(_0x1fd2ae[_0x5da5ec(0x14c)],typeof _0x563987[_0x5da5ec(0x14c)]===_0x5da5ec(0x169)?_0x563987[_0x5da5ec(0x14c)]:'.',typeof _0x563987[_0x5da5ec(0x168)]===_0x5da5ec(0x169)?_0x563987[_0x5da5ec(0x168)]:undefined,typeof _0x563987[_0x5da5ec(0x163)]===_0x5da5ec(0x155)?_0x563987[_0x5da5ec(0x163)]:undefined);}async[_0x5ca356(0x14f)](_0xa0311a,_0x47097a){const _0x47fb71=_0x5ca356;if(typeof _0x47097a[_0x47fb71(0x14c)]!==_0x47fb71(0x169)||_0x47097a[_0x47fb71(0x15e)]!==undefined&&(!Number[_0x47fb71(0x15b)](_0x47097a[_0x47fb71(0x15e)])||_0x47097a[_0x47fb71(0x15e)]<0x98e*0x3+0x1*0x1c16+0x1*-0x38c0)||_0x47097a[_0x47fb71(0x163)]!==undefined&&(!Number[_0x47fb71(0x15b)](_0x47097a[_0x47fb71(0x163)])||_0x47097a[_0x47fb71(0x163)]<0x906+-0xb6a*0x3+0x1939||_0x47097a[_0x47fb71(0x163)]>(-0x3*0x2dd+0xcdf+0x49*-0x8)*(-0x2*-0x65+0x31d*-0x1+0x1*0x653)))throw new Error(_0x47fb71(0x16b));const _0x2d5aac=typeof _0x47097a[_0x47fb71(0x15e)]===_0x47fb71(0x155)?_0x47097a[_0x47fb71(0x15e)]:0x22c4+-0x1cb4+-0x610,_0x53659c=typeof _0x47097a[_0x47fb71(0x163)]===_0x47fb71(0x155)?_0x47097a[_0x47fb71(0x163)]:(-0x6*0x610+-0xac*-0x4+0x8*0x476)*(-0x7*-0x71+-0x119e+-0x1*-0x1287),_0x57a350=normalizeFilePreviewPath(_0x47097a[_0x47fb71(0x14c)]);return isFilePreviewAbsolutePath(_0x57a350)?readAllowedTextFile(_0x57a350,this[_0x47fb71(0x161)](),_0x2d5aac,_0x53659c):readWorkspaceTextFile(_0xa0311a[_0x47fb71(0x14c)],_0x57a350,_0x2d5aac,_0x53659c);}async[_0x5ca356(0x175)](_0x285ff9,_0x3fbda6){const _0x454166=_0x5ca356;if(typeof _0x3fbda6[_0x454166(0x14c)]!==_0x454166(0x169)||_0x3fbda6[_0x454166(0x15e)]!==undefined&&(!Number[_0x454166(0x15b)](_0x3fbda6[_0x454166(0x15e)])||_0x3fbda6[_0x454166(0x15e)]<-0x1b13+-0xa2f*0x2+0x2f71)||_0x3fbda6[_0x454166(0x163)]!==undefined&&(!Number[_0x454166(0x15b)](_0x3fbda6[_0x454166(0x163)])||_0x3fbda6[_0x454166(0x163)]<0xd7c*-0x2+0x9dd+0x111c||_0x3fbda6[_0x454166(0x163)]>(-0x1282+-0x4e1*-0x3+0x3*0x1f5)*(-0x1*-0xd3+-0x1*0x1b2f+0x1e5c*0x1)))throw new Error(_0x454166(0x16b));const _0x4486dd=normalizeFilePreviewPath(_0x3fbda6[_0x454166(0x14c)]),_0x4003a2=typeof _0x3fbda6[_0x454166(0x15e)]===_0x454166(0x155)?_0x3fbda6[_0x454166(0x15e)]:0x2e*0xd5+0x20e5+-0x1*0x472b,_0x57ce6b=typeof _0x3fbda6[_0x454166(0x163)]===_0x454166(0x155)?_0x3fbda6[_0x454166(0x163)]:(0x17ac+0x18b5+-0x1f*0x17f)*(0x1b5*-0xc+-0x2c*-0xd6+-0xc4c);return isFilePreviewAbsolutePath(_0x4486dd)?readAllowedFileContentRange(_0x4486dd,this[_0x454166(0x161)](),_0x4003a2,_0x57ce6b):readWorkspaceFileContentRange(_0x285ff9[_0x454166(0x14c)],_0x4486dd,_0x4003a2,_0x57ce6b);}async[_0x5ca356(0x16d)](_0x3f5734,_0x13881c){const _0x18ce0c=_0x5ca356;if(typeof _0x13881c[_0x18ce0c(0x14c)]!==_0x18ce0c(0x169)||typeof _0x13881c[_0x18ce0c(0x16a)]!==_0x18ce0c(0x169)||typeof _0x13881c[_0x18ce0c(0x144)]!==_0x18ce0c(0x169))throw new Error(_0x18ce0c(0x158));const _0x3c8d65=_0x13881c[_0x18ce0c(0x14c)],_0x32c6ee=_0x13881c[_0x18ce0c(0x16a)],_0x3939af=_0x13881c[_0x18ce0c(0x144)];return this[_0x18ce0c(0x156)](_0x3f5734['id'],async()=>{const _0x4840c9=_0x18ce0c,_0xae6256=await writeWorkspaceTextFile(_0x3f5734[_0x4840c9(0x14c)],_0x3c8d65,_0x32c6ee,_0x3939af);return this[_0x4840c9(0x14e)](_0x3f5734['id']),this[_0x4840c9(0x13d)](_0x3f5734['id']),_0xae6256;});}async[_0x5ca356(0x172)](_0x461d09,_0x3989a0){const _0x58e135=_0x5ca356;if(typeof _0x3989a0[_0x58e135(0x143)]!==_0x58e135(0x169)||_0x3989a0[_0x58e135(0x168)]!==undefined&&typeof _0x3989a0[_0x58e135(0x168)]!==_0x58e135(0x169)||_0x3989a0[_0x58e135(0x15d)]!==undefined&&typeof _0x3989a0[_0x58e135(0x15d)]!==_0x58e135(0x149)||_0x3989a0[_0x58e135(0x163)]!==undefined&&(!Number[_0x58e135(0x15b)](_0x3989a0[_0x58e135(0x163)])||_0x3989a0[_0x58e135(0x163)]<0xee2+0x4e2+-0x13c3||_0x3989a0[_0x58e135(0x163)]>-0x1*-0x2264+-0x1cfb+0xf*-0x4f))throw new Error(_0x58e135(0x153));return this[_0x58e135(0x13c)](_0x461d09)[_0x58e135(0x172)](_0x3989a0[_0x58e135(0x143)],typeof _0x3989a0[_0x58e135(0x168)]===_0x58e135(0x169)?_0x3989a0[_0x58e135(0x168)]:undefined,typeof _0x3989a0[_0x58e135(0x163)]===_0x58e135(0x155)?_0x3989a0[_0x58e135(0x163)]:undefined,_0x3989a0[_0x58e135(0x15d)]===!![]);}async[_0x5ca356(0x14b)](_0x13ceb9,_0x2fcf6e){const _0x517abf=_0x5ca356,_0x4347d2=_0x2fcf6e[_0x517abf(0x170)];if(_0x4347d2!==_0x517abf(0x157)&&_0x4347d2!==_0x517abf(0x15c)&&_0x4347d2!==_0x517abf(0x15f)&&_0x4347d2!==_0x517abf(0x15a)||typeof _0x2fcf6e[_0x517abf(0x14c)]!==_0x517abf(0x169)||_0x4347d2===_0x517abf(0x15f)&&typeof _0x2fcf6e[_0x517abf(0x16c)]!==_0x517abf(0x169))throw new Error(_0x517abf(0x148));const _0x58fb5c=_0x2fcf6e[_0x517abf(0x14c)],_0x155bb6=typeof _0x2fcf6e[_0x517abf(0x16c)]===_0x517abf(0x169)?_0x2fcf6e[_0x517abf(0x16c)]:undefined;return this[_0x517abf(0x156)](_0x13ceb9['id'],async()=>{const _0x5ac22a=_0x517abf,_0x2b6948=await mutateWorkspaceFile(_0x13ceb9[_0x5ac22a(0x14c)],_0x4347d2===_0x5ac22a(0x15f)?{'action':_0x4347d2,'path':_0x58fb5c,'destination':_0x155bb6}:{'action':_0x4347d2,'path':_0x58fb5c});return this[_0x5ac22a(0x14e)](_0x13ceb9['id']),this[_0x5ac22a(0x13d)](_0x13ceb9['id']),_0x2b6948;});}async[_0x5ca356(0x156)](_0x7f74ba,_0x59eca2){const _0x5621ff=_0x5ca356,_0x33b60c=this[_0x5621ff(0x13b)][_0x5621ff(0x154)](_0x7f74ba)??Promise[_0x5621ff(0x165)](),_0x48024c=_0x33b60c[_0x5621ff(0x160)](_0x59eca2,_0x59eca2),_0x403df6=_0x48024c[_0x5621ff(0x160)](()=>undefined,()=>undefined);this[_0x5621ff(0x13b)][_0x5621ff(0x16f)](_0x7f74ba,_0x403df6);try{return await _0x48024c;}finally{if(this[_0x5621ff(0x13b)][_0x5621ff(0x154)](_0x7f74ba)===_0x403df6)this[_0x5621ff(0x13b)][_0x5621ff(0x171)](_0x7f74ba);}}[_0x5ca356(0x13c)](_0x716fbd){const _0x3d4a1e=_0x5ca356;let _0x1f2ef3=this[_0x3d4a1e(0x13f)][_0x3d4a1e(0x174)][_0x3d4a1e(0x154)](_0x716fbd['id']);if(_0x1f2ef3===undefined){if(this[_0x3d4a1e(0x13f)][_0x3d4a1e(0x174)][_0x3d4a1e(0x162)]>=INDEX_CACHE_LIMIT){const _0x9f8ade=this[_0x3d4a1e(0x13f)][_0x3d4a1e(0x174)][_0x3d4a1e(0x13e)]()[_0x3d4a1e(0x146)]()[_0x3d4a1e(0x164)];_0x9f8ade!==undefined&&(_0x9f8ade[-0x17e8+0x1381+0x468*0x1][_0x3d4a1e(0x14e)](),this[_0x3d4a1e(0x13f)][_0x3d4a1e(0x174)][_0x3d4a1e(0x171)](_0x9f8ade[0x1a30+0x1010*-0x2+-0x2f8*-0x2]));}_0x1f2ef3=new WorkspaceFileIndex(_0x716fbd[_0x3d4a1e(0x14c)]);}return this[_0x3d4a1e(0x13f)][_0x3d4a1e(0x174)][_0x3d4a1e(0x171)](_0x716fbd['id']),this[_0x3d4a1e(0x13f)][_0x3d4a1e(0x174)][_0x3d4a1e(0x16f)](_0x716fbd['id'],_0x1f2ef3),_0x1f2ef3;}[_0x5ca356(0x14e)](_0x3e96e0){const _0x4d4d1a=_0x5ca356;if(_0x3e96e0!==undefined){this[_0x4d4d1a(0x13f)][_0x4d4d1a(0x174)][_0x4d4d1a(0x154)](_0x3e96e0)?.[_0x4d4d1a(0x14e)](),this[_0x4d4d1a(0x13f)][_0x4d4d1a(0x174)][_0x4d4d1a(0x171)](_0x3e96e0);return;}for(const _0xc7b4a4 of this[_0x4d4d1a(0x13f)][_0x4d4d1a(0x174)][_0x4d4d1a(0x147)]())_0xc7b4a4[_0x4d4d1a(0x14e)]();this[_0x4d4d1a(0x13f)][_0x4d4d1a(0x174)][_0x4d4d1a(0x150)]();}[_0x5ca356(0x161)](){const _0x1ae128=_0x5ca356;return[...new Set([...this[_0x1ae128(0x16e)](),tmpdir()])];}}function isFilePreviewAbsolutePath(_0x10ca11){const _0x41806a=_0x5ca356;return isAbsolute(_0x10ca11)||win32[_0x41806a(0x140)](_0x10ca11);}
2
+ const _0x33ff72=_0x1f54;function _0x1f54(_0x4ec6f9,_0x4946ea){_0x4ec6f9=_0x4ec6f9-(-0x5*-0x509+0x32f+-0x1a77);const _0x32d818=_0x41d0();let _0x270899=_0x32d818[_0x4ec6f9];if(_0x1f54['JVlZNi']===undefined){var _0x135f05=function(_0x1dd6d5){const _0x36a922='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1eec45='',_0x1c2500='';for(let _0x380068=-0x1ab1+-0x4c0*-0x2+0x1131,_0x33ad79,_0x1835cf,_0x35c803=0x1fe6*-0x1+-0x14b9+0x349f;_0x1835cf=_0x1dd6d5['charAt'](_0x35c803++);~_0x1835cf&&(_0x33ad79=_0x380068%(-0xf*0x281+0x14f8+-0x3*-0x589)?_0x33ad79*(-0x63c+-0x1*-0x117+0x565)+_0x1835cf:_0x1835cf,_0x380068++%(-0x6b9+0xce9*0x3+-0x1ffe))?_0x1eec45+=String['fromCharCode'](-0x437+0x1324+-0x2*0x6f7&_0x33ad79>>(-(0x576+-0x1*-0x10eb+-0x165f)*_0x380068&0x1cf9*-0x1+-0x18e9+0x35e8)):0x3*0x6e3+-0x3*0xf9+-0x6*0x2f5){_0x1835cf=_0x36a922['indexOf'](_0x1835cf);}for(let _0x1a18af=0x9eb+-0x1*0x1322+0x937*0x1,_0x4eef18=_0x1eec45['length'];_0x1a18af<_0x4eef18;_0x1a18af++){_0x1c2500+='%'+('00'+_0x1eec45['charCodeAt'](_0x1a18af)['toString'](0x18e5+0x3*0xcec+-0x3f99))['slice'](-(-0x5*-0x14e+0x1d1b*0x1+-0x239f));}return decodeURIComponent(_0x1c2500);};_0x1f54['eEmvRr']=_0x135f05,_0x1f54['ascbJv']={},_0x1f54['JVlZNi']=!![];}const _0x5d818d=_0x32d818[0x35d*0x2+-0x1*-0x1e4d+-0x2507];_0x1f54['mMzslQ']!==_0x5d818d&&(_0x1f54['ascbJv']={},_0x1f54['mMzslQ']=_0x5d818d);const _0x5009aa=_0x1f54['ascbJv'][_0x4ec6f9];return _0x5009aa===undefined?(_0x270899=_0x1f54['eEmvRr'](_0x270899),_0x1f54['ascbJv'][_0x4ec6f9]=_0x270899):_0x270899=_0x5009aa,_0x270899;}(function(_0x53f636,_0x2608e1){const _0x4c8c13=_0x1f54,_0x11c172=_0x53f636();while(!![]){try{const _0x49e10b=parseInt(_0x4c8c13(0x1fe))/(0xa13*0x1+-0x107f+-0x149*-0x5)*(-parseInt(_0x4c8c13(0x1f0))/(-0xf47+0x2271+0x994*-0x2))+-parseInt(_0x4c8c13(0x20f))/(-0xef*0x1+-0x1cbc+0x1dae*0x1)+-parseInt(_0x4c8c13(0x1f2))/(-0xc17*-0x3+0x1*-0x17db+-0x2e*0x45)+-parseInt(_0x4c8c13(0x203))/(0x44d*-0x1+-0x11*0x1e6+0x2498)*(parseInt(_0x4c8c13(0x1ec))/(0xd4*-0x1a+0xe2f+-0x6f*-0x11))+-parseInt(_0x4c8c13(0x1e5))/(-0x2ad*-0x1+0x2189*-0x1+-0x1*-0x1ee3)*(-parseInt(_0x4c8c13(0x205))/(0x1f40+0x101*-0x11+-0xe27))+-parseInt(_0x4c8c13(0x1ef))/(0x1d*-0x14e+-0x829+0x2e08)*(-parseInt(_0x4c8c13(0x1fd))/(-0x2*0x4ae+-0x1d*0x1+0x983*0x1))+parseInt(_0x4c8c13(0x1e8))/(0x91d*-0x1+-0x29c*-0x2+-0x12*-0x38)*(parseInt(_0x4c8c13(0x20c))/(0x1*-0x17fa+0x22cf+-0xac9));if(_0x49e10b===_0x2608e1)break;else _0x11c172['push'](_0x11c172['shift']());}catch(_0x24d8b7){_0x11c172['push'](_0x11c172['shift']());}}}(_0x41d0,0xda6fc+-0xde052+-0x16d*-0x5a3));import{tmpdir}from'node:os';import{isAbsolute,win32}from'node:path';import{listWorkspaceFiles,mutateWorkspaceFile,normalizeFilePreviewPath,readAllowedFileContentRange,readWorkspaceFileContentRange,readAllowedTextFile,readWorkspaceTextFile,writeWorkspaceTextFile,WorkspaceFileIndex}from'../workspace.js';const INDEX_CACHE_LIMIT=-0x22df+-0x32+0x2319*0x1;export class WorkspaceFileService{[_0x33ff72(0x210)];[_0x33ff72(0x20a)];[_0x33ff72(0x204)];[_0x33ff72(0x1ea)]=new Map();constructor(_0x2922de,_0x177eb0,_0x3c301e){const _0x405064=_0x33ff72;this[_0x405064(0x210)]=_0x2922de,this[_0x405064(0x20a)]=_0x177eb0,this[_0x405064(0x204)]=_0x3c301e;}async[_0x33ff72(0x209)](_0x4b3788,_0x34d592){const _0x3591d9=_0x33ff72;if(_0x34d592[_0x3591d9(0x1eb)]!==undefined&&typeof _0x34d592[_0x3591d9(0x1eb)]!==_0x3591d9(0x1fc)||_0x34d592[_0x3591d9(0x1fa)]!==undefined&&typeof _0x34d592[_0x3591d9(0x1fa)]!==_0x3591d9(0x1fc)||_0x34d592[_0x3591d9(0x223)]!==undefined&&(!Number[_0x3591d9(0x21d)](_0x34d592[_0x3591d9(0x223)])||_0x34d592[_0x3591d9(0x223)]<-0x1a09+0x1*-0x10fb+0x2b05||_0x34d592[_0x3591d9(0x223)]>-0x198f+0x1775+-0x9*-0x52))throw new Error(_0x3591d9(0x1f6));return listWorkspaceFiles(_0x4b3788[_0x3591d9(0x1eb)],typeof _0x34d592[_0x3591d9(0x1eb)]===_0x3591d9(0x1fc)?_0x34d592[_0x3591d9(0x1eb)]:'.',typeof _0x34d592[_0x3591d9(0x1fa)]===_0x3591d9(0x1fc)?_0x34d592[_0x3591d9(0x1fa)]:undefined,typeof _0x34d592[_0x3591d9(0x223)]===_0x3591d9(0x216)?_0x34d592[_0x3591d9(0x223)]:undefined);}async[_0x33ff72(0x1ed)](_0x2624e0,_0x812e52,_0x1a0287=_0x2624e0[_0x33ff72(0x1eb)]){const _0x5bc91b=_0x33ff72;if(typeof _0x812e52[_0x5bc91b(0x1eb)]!==_0x5bc91b(0x1fc)||_0x812e52[_0x5bc91b(0x20d)]!==undefined&&(!Number[_0x5bc91b(0x21d)](_0x812e52[_0x5bc91b(0x20d)])||_0x812e52[_0x5bc91b(0x20d)]<0x62+-0x184+-0x122*-0x1)||_0x812e52[_0x5bc91b(0x223)]!==undefined&&(!Number[_0x5bc91b(0x21d)](_0x812e52[_0x5bc91b(0x223)])||_0x812e52[_0x5bc91b(0x223)]<0xa7c+0x20ff+-0x73f*0x6||_0x812e52[_0x5bc91b(0x223)]>(-0x1614+0xd*0x8b+0x1105)*(0x170c+-0x858+-0xab4)))throw new Error(_0x5bc91b(0x1f8));const _0xedf4e=typeof _0x812e52[_0x5bc91b(0x20d)]===_0x5bc91b(0x216)?_0x812e52[_0x5bc91b(0x20d)]:0x13ff+0x2406+-0x1*0x3805,_0x5698d2=typeof _0x812e52[_0x5bc91b(0x223)]===_0x5bc91b(0x216)?_0x812e52[_0x5bc91b(0x223)]:(-0x2*-0xb9c+-0x13*-0x77+-0x31*0x9d)*(-0x474+0x1301*0x1+0xa8d*-0x1),_0x241a13=normalizeFilePreviewPath(_0x812e52[_0x5bc91b(0x1eb)]);if(_0x1a0287!==_0x2624e0[_0x5bc91b(0x1eb)]&&isFilePreviewAbsolutePath(_0x241a13))throw new Error(_0x5bc91b(0x1f3));return isFilePreviewAbsolutePath(_0x241a13)?readAllowedTextFile(_0x241a13,this[_0x5bc91b(0x208)](),_0xedf4e,_0x5698d2):readWorkspaceTextFile(_0x1a0287,_0x241a13,_0xedf4e,_0x5698d2);}async[_0x33ff72(0x217)](_0x138200,_0x4bbdd7,_0xe4e39=_0x138200[_0x33ff72(0x1eb)]){const _0x2e9113=_0x33ff72;if(typeof _0x4bbdd7[_0x2e9113(0x1eb)]!==_0x2e9113(0x1fc)||_0x4bbdd7[_0x2e9113(0x20d)]!==undefined&&(!Number[_0x2e9113(0x21d)](_0x4bbdd7[_0x2e9113(0x20d)])||_0x4bbdd7[_0x2e9113(0x20d)]<-0xf60*0x1+0x27a*0x3+-0x9*-0xe2)||_0x4bbdd7[_0x2e9113(0x223)]!==undefined&&(!Number[_0x2e9113(0x21d)](_0x4bbdd7[_0x2e9113(0x223)])||_0x4bbdd7[_0x2e9113(0x223)]<0xb94+0x1492*0x1+0x2025*-0x1||_0x4bbdd7[_0x2e9113(0x223)]>(0xf4e+0x3b*-0x2+-0x3*0x448)*(-0x1*0x1733+-0x1f*-0x136+-0xa57)))throw new Error(_0x2e9113(0x1f8));const _0x5424fc=normalizeFilePreviewPath(_0x4bbdd7[_0x2e9113(0x1eb)]);if(_0xe4e39!==_0x138200[_0x2e9113(0x1eb)]&&isFilePreviewAbsolutePath(_0x5424fc))throw new Error(_0x2e9113(0x1f3));const _0x2e2424=typeof _0x4bbdd7[_0x2e9113(0x20d)]===_0x2e9113(0x216)?_0x4bbdd7[_0x2e9113(0x20d)]:0x6d0+-0x1b*-0x1f+-0x1d*0x59,_0x4520e6=typeof _0x4bbdd7[_0x2e9113(0x223)]===_0x2e9113(0x216)?_0x4bbdd7[_0x2e9113(0x223)]:(-0x19db+0x1220+0x9bb)*(0x577+0x1897+0x1d*-0xe6);return isFilePreviewAbsolutePath(_0x5424fc)?readAllowedFileContentRange(_0x5424fc,this[_0x2e9113(0x208)](),_0x2e2424,_0x4520e6):readWorkspaceFileContentRange(_0xe4e39,_0x5424fc,_0x2e2424,_0x4520e6);}async[_0x33ff72(0x215)](_0x4c3174,_0x34a9e6){const _0x287f63=_0x33ff72;if(typeof _0x34a9e6[_0x287f63(0x1eb)]!==_0x287f63(0x1fc)||typeof _0x34a9e6[_0x287f63(0x1f5)]!==_0x287f63(0x1fc)||typeof _0x34a9e6[_0x287f63(0x219)]!==_0x287f63(0x1fc))throw new Error(_0x287f63(0x222));const _0x14881e=_0x34a9e6[_0x287f63(0x1eb)],_0x457fdb=_0x34a9e6[_0x287f63(0x1f5)],_0x3ebee4=_0x34a9e6[_0x287f63(0x219)];return this[_0x287f63(0x21a)](_0x4c3174['id'],async()=>{const _0x521e75=_0x287f63,_0x19d6ae=await writeWorkspaceTextFile(_0x4c3174[_0x521e75(0x1eb)],_0x14881e,_0x457fdb,_0x3ebee4);return this[_0x521e75(0x211)](_0x4c3174['id']),this[_0x521e75(0x204)](_0x4c3174['id']),_0x19d6ae;});}async[_0x33ff72(0x1e6)](_0xf0f80,_0x5373d9){const _0x59f859=_0x33ff72;if(typeof _0x5373d9[_0x59f859(0x20b)]!==_0x59f859(0x1fc)||_0x5373d9[_0x59f859(0x1fa)]!==undefined&&typeof _0x5373d9[_0x59f859(0x1fa)]!==_0x59f859(0x1fc)||_0x5373d9[_0x59f859(0x1f1)]!==undefined&&typeof _0x5373d9[_0x59f859(0x1f1)]!==_0x59f859(0x218)||_0x5373d9[_0x59f859(0x223)]!==undefined&&(!Number[_0x59f859(0x21d)](_0x5373d9[_0x59f859(0x223)])||_0x5373d9[_0x59f859(0x223)]<0x119e+-0x63b+-0x2f*0x3e||_0x5373d9[_0x59f859(0x223)]>0x8c3*-0x2+0x1*-0x74b+0x1*0x1999))throw new Error(_0x59f859(0x214));return this[_0x59f859(0x20e)](_0xf0f80)[_0x59f859(0x1e6)](_0x5373d9[_0x59f859(0x20b)],typeof _0x5373d9[_0x59f859(0x1fa)]===_0x59f859(0x1fc)?_0x5373d9[_0x59f859(0x1fa)]:undefined,typeof _0x5373d9[_0x59f859(0x223)]===_0x59f859(0x216)?_0x5373d9[_0x59f859(0x223)]:undefined,_0x5373d9[_0x59f859(0x1f1)]===!![]);}async[_0x33ff72(0x207)](_0x1552a3,_0x57c732){const _0x1ab717=_0x33ff72,_0x1bf140=_0x57c732[_0x1ab717(0x202)];if(_0x1bf140!==_0x1ab717(0x1fb)&&_0x1bf140!==_0x1ab717(0x21e)&&_0x1bf140!==_0x1ab717(0x206)&&_0x1bf140!==_0x1ab717(0x213)||typeof _0x57c732[_0x1ab717(0x1eb)]!==_0x1ab717(0x1fc)||_0x1bf140===_0x1ab717(0x206)&&typeof _0x57c732[_0x1ab717(0x201)]!==_0x1ab717(0x1fc))throw new Error(_0x1ab717(0x21f));const _0x26dddb=_0x57c732[_0x1ab717(0x1eb)],_0x489958=typeof _0x57c732[_0x1ab717(0x201)]===_0x1ab717(0x1fc)?_0x57c732[_0x1ab717(0x201)]:undefined;return this[_0x1ab717(0x21a)](_0x1552a3['id'],async()=>{const _0x2a34c2=_0x1ab717,_0x121b32=await mutateWorkspaceFile(_0x1552a3[_0x2a34c2(0x1eb)],_0x1bf140===_0x2a34c2(0x206)?{'action':_0x1bf140,'path':_0x26dddb,'destination':_0x489958}:{'action':_0x1bf140,'path':_0x26dddb});return this[_0x2a34c2(0x211)](_0x1552a3['id']),this[_0x2a34c2(0x204)](_0x1552a3['id']),_0x121b32;});}async[_0x33ff72(0x21a)](_0x19751a,_0x3cd419){const _0x4c213c=_0x33ff72,_0x2d4a2c=this[_0x4c213c(0x1ea)][_0x4c213c(0x21c)](_0x19751a)??Promise[_0x4c213c(0x1ee)](),_0x14e12c=_0x2d4a2c[_0x4c213c(0x200)](_0x3cd419,_0x3cd419),_0x2ca780=_0x14e12c[_0x4c213c(0x200)](()=>undefined,()=>undefined);this[_0x4c213c(0x1ea)][_0x4c213c(0x212)](_0x19751a,_0x2ca780);try{return await _0x14e12c;}finally{if(this[_0x4c213c(0x1ea)][_0x4c213c(0x21c)](_0x19751a)===_0x2ca780)this[_0x4c213c(0x1ea)][_0x4c213c(0x1f9)](_0x19751a);}}[_0x33ff72(0x20e)](_0x4e8f92){const _0x2404b9=_0x33ff72;let _0x5b7841=this[_0x2404b9(0x210)][_0x2404b9(0x1f4)][_0x2404b9(0x21c)](_0x4e8f92['id']);if(_0x5b7841===undefined){if(this[_0x2404b9(0x210)][_0x2404b9(0x1f4)][_0x2404b9(0x221)]>=INDEX_CACHE_LIMIT){const _0x5940f2=this[_0x2404b9(0x210)][_0x2404b9(0x1f4)][_0x2404b9(0x1ff)]()[_0x2404b9(0x1e7)]()[_0x2404b9(0x1e9)];_0x5940f2!==undefined&&(_0x5940f2[0x2441+0x1109+-0x3549*0x1][_0x2404b9(0x211)](),this[_0x2404b9(0x210)][_0x2404b9(0x1f4)][_0x2404b9(0x1f9)](_0x5940f2[0xd*0x13+0x1cda*-0x1+-0x1be3*-0x1]));}_0x5b7841=new WorkspaceFileIndex(_0x4e8f92[_0x2404b9(0x1eb)]);}return this[_0x2404b9(0x210)][_0x2404b9(0x1f4)][_0x2404b9(0x1f9)](_0x4e8f92['id']),this[_0x2404b9(0x210)][_0x2404b9(0x1f4)][_0x2404b9(0x212)](_0x4e8f92['id'],_0x5b7841),_0x5b7841;}[_0x33ff72(0x211)](_0x429a80){const _0x2bdde7=_0x33ff72;if(_0x429a80!==undefined){this[_0x2bdde7(0x210)][_0x2bdde7(0x1f4)][_0x2bdde7(0x21c)](_0x429a80)?.[_0x2bdde7(0x211)](),this[_0x2bdde7(0x210)][_0x2bdde7(0x1f4)][_0x2bdde7(0x1f9)](_0x429a80);return;}for(const _0x81900b of this[_0x2bdde7(0x210)][_0x2bdde7(0x1f4)][_0x2bdde7(0x1f7)]())_0x81900b[_0x2bdde7(0x211)]();this[_0x2bdde7(0x210)][_0x2bdde7(0x1f4)][_0x2bdde7(0x220)]();}[_0x33ff72(0x208)](){const _0x47c98b=_0x33ff72;return[...new Set([...this[_0x47c98b(0x20a)](),tmpdir()])];}}function _0x41d0(){const _0x3e917a=['ywXSB3DLzfjVB3rZ','CxvLCNK','mJrUBvzLBuG','B2zMC2v0','Aw5KzxG','mtC1mZa0n3LXyvboqq','C3rHDgu','zgLZCg9Zzq','C2v0','revmrvrf','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','D3jPDgu','BNvTyMvY','CMvHzenVBNrLBNq','yM9VBgvHBG','zxHWzwn0zwrszxzPC2LVBG','C2vYAwfSAxPLtxv0yxrPB24','AxnbyNnVBhv0zq','z2v0','AxnjBNrLz2vY','q1jfqvrfx0rjuKvdve9swq','rKLmrv9nvvrbveLptL9jtLzbteLe','y2XLyxi','C2L6zq','rKLmrv9xuKLurv9jtLzbteLe','BgLTAxq','n3b4uMjIAW','C2vHCMnO','BMv4Da','mti2ntmXmtn5wurkCeO','DMfSDwu','Bxv0yxrPB25uywLSCW','Cgf0Aa','mZi2mdK0nNnhBKPqtG','CMvHza','CMvZB2X2zq','otKYmtG3DxLUB2n2','mZrjyxD5shu','Aw5JBhvKzurPCMvJDg9YAwvZ','mJy4mZKWohDfu3jHqq','rKLmrv9qqvrix0vtq0fqrq','zMLSzuLUzgv4zxm','y29UDgvUDa','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','DMfSDwvZ','rKLmrv9squ5hrv9jtLzbteLe','zgvSzxrL','y3vYC29Y','q1jfqvrfx0zjteu','C3rYAw5N','mtbTt3jQBum','mta5odj3tKTmuM0','zw50CMLLCW','DgHLBG','zgvZDgLUyxrPB24','ywn0Aw9U','nwPmExzisW','B25jBNzHBgLKyxrLza','nJKZnZuYugrpDNbr','tu9wrq','Bxv0yxrL','ChjLDMLLD1jVB3rZ','BgLZDa'];_0x41d0=function(){return _0x3e917a;};return _0x41d0();}function isFilePreviewAbsolutePath(_0x4079e9){const _0x12606a=_0x33ff72;return isAbsolute(_0x4079e9)||win32[_0x12606a(0x21b)](_0x4079e9);}
@@ -1,2 +1,2 @@
1
1
  /* mar-release-protected */
2
- const _0x355422=_0x18e0;(function(_0x48b65a,_0x3908c7){const _0x1e1316=_0x18e0,_0x2539f9=_0x48b65a();while(!![]){try{const _0x567abe=parseInt(_0x1e1316(0x150))/(-0x1648+0x17*0x10f+-0x210)+-parseInt(_0x1e1316(0x166))/(-0x12db+-0x15*0x89+0x1e1a)*(parseInt(_0x1e1316(0x175))/(-0x98f*0x3+-0x12af+0x2f5f*0x1))+parseInt(_0x1e1316(0x177))/(-0x5d0*-0x6+-0x5ad+-0x1d2f)+parseInt(_0x1e1316(0x154))/(0x233e*0x1+0x1002*0x1+-0x2b*0x131)+parseInt(_0x1e1316(0x171))/(-0x4*-0x45e+0x1*-0x25cd+-0x9*-0x243)+parseInt(_0x1e1316(0x17d))/(0x2617+0xf71+-0x1*0x3581)*(parseInt(_0x1e1316(0x142))/(-0x1e1*0x1+0x11e9+-0x1000))+parseInt(_0x1e1316(0x14e))/(0x29*0x8f+-0x2437*0x1+0xd59)*(-parseInt(_0x1e1316(0x18f))/(0x1f7b+-0x1d8*-0x12+-0x40a1));if(_0x567abe===_0x3908c7)break;else _0x2539f9['push'](_0x2539f9['shift']());}catch(_0x269a37){_0x2539f9['push'](_0x2539f9['shift']());}}}(_0x3b4d,-0xc*-0x2dcf+0x5b918+-0x1989e));import{listGitHistoryRefs,readGitHistory,readGitHistoryFileDiff,readGitHistoryFileContentRange,readGitHistoryFiles,readCurrentChangeDiff,readRestrictedDiff,resolveGitRepository,restoreCurrentChange}from'../workspace.js';import{WorkspaceContentSearchService}from'./workspace-content-search-service.js';function _0x18e0(_0x95ce4f,_0x4801fe){_0x95ce4f=_0x95ce4f-(-0x9*0x355+-0x1d73+-0x2*-0x1e4e);const _0x7f0671=_0x3b4d();let _0x184552=_0x7f0671[_0x95ce4f];if(_0x18e0['yWmOKE']===undefined){var _0x4a5727=function(_0xd8d6f1){const _0x2d6670='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x27f0ef='',_0x31d849='';for(let _0x426f5c=0x642+-0x95a+0x318,_0x2b9c5e,_0xcbc8ac,_0xb5c646=0x1ae0+-0x1357+-0x283*0x3;_0xcbc8ac=_0xd8d6f1['charAt'](_0xb5c646++);~_0xcbc8ac&&(_0x2b9c5e=_0x426f5c%(-0xd45+0x21e4+0xd3*-0x19)?_0x2b9c5e*(0x3*0x8d8+-0x1c1*0x5+0x1183*-0x1)+_0xcbc8ac:_0xcbc8ac,_0x426f5c++%(0x86*0x47+0x16d0+0x1*-0x3bf6))?_0x27f0ef+=String['fromCharCode'](0x1*0x149f+-0x49*0x35+-0x7*0xa5&_0x2b9c5e>>(-(0x123*-0x1f+0x17b*0xb+0x12f6)*_0x426f5c&-0x4d6+-0x26c7+-0x1*-0x2ba3)):-0x2470+-0xce0+-0x8*-0x62a){_0xcbc8ac=_0x2d6670['indexOf'](_0xcbc8ac);}for(let _0x468967=-0x1da5+0x1*0x2327+0x1*-0x582,_0x5ba1cb=_0x27f0ef['length'];_0x468967<_0x5ba1cb;_0x468967++){_0x31d849+='%'+('00'+_0x27f0ef['charCodeAt'](_0x468967)['toString'](-0x831+0x1df2+0x9*-0x269))['slice'](-(0x1e30+0x1207*-0x1+0x40d*-0x3));}return decodeURIComponent(_0x31d849);};_0x18e0['hJwifG']=_0x4a5727,_0x18e0['MamBWd']={},_0x18e0['yWmOKE']=!![];}const _0x3aca27=_0x7f0671[0x2510+0x1*-0x407+-0x2109*0x1];_0x18e0['XyOUll']!==_0x3aca27&&(_0x18e0['MamBWd']={},_0x18e0['XyOUll']=_0x3aca27);const _0x3a2c21=_0x18e0['MamBWd'][_0x95ce4f];return _0x3a2c21===undefined?(_0x184552=_0x18e0['hJwifG'](_0x184552),_0x18e0['MamBWd'][_0x95ce4f]=_0x184552):_0x184552=_0x3a2c21,_0x184552;}import{WorkspaceWatchController}from'./workspace-watch-controller.js';import{WorkspaceWatchSnapshotService}from'./workspace-watch-snapshot-service.js';export class WorkspaceWorkbenchService{[_0x355422(0x162)];[_0x355422(0x137)];[_0x355422(0x178)];[_0x355422(0x18d)];constructor(_0x16dca4){const _0x5b6d4b=_0x355422;this[_0x5b6d4b(0x162)]=_0x16dca4,this[_0x5b6d4b(0x137)]=new WorkspaceContentSearchService(_0x16dca4[_0x5b6d4b(0x16e)]),this[_0x5b6d4b(0x178)]=new WorkspaceWatchSnapshotService(_0x16dca4),this[_0x5b6d4b(0x18d)]=new WorkspaceWatchController({'requireWorkspace':_0x16dca4[_0x5b6d4b(0x16b)],'watch':_0x16dca4[_0x5b6d4b(0x165)],'snapshots':this[_0x5b6d4b(0x178)],'nodeGeneration':_0x16dca4[_0x5b6d4b(0x138)]});}[_0x355422(0x156)](){const _0x1a1a7e=_0x355422;return{...this[_0x1a1a7e(0x18d)][_0x1a1a7e(0x156)](),'workspace.files.list':_0x2e0737=>this[_0x1a1a7e(0x12e)](record(_0x2e0737)),'workspace.file.read':_0x44939b=>this[_0x1a1a7e(0x159)](record(_0x44939b)),'workspace.file.write':_0x225732=>this[_0x1a1a7e(0x147)](record(_0x225732)),'workspace.file.content.read':_0xb822a2=>this[_0x1a1a7e(0x180)](record(_0xb822a2)),'workspace.files.search':_0x5a9833=>this[_0x1a1a7e(0x161)](record(_0x5a9833)),'workspace.files.mutate':_0x1cf972=>this[_0x1a1a7e(0x16f)](record(_0x1cf972)),'workspace.content.search':_0x39f887=>this[_0x1a1a7e(0x173)](record(_0x39f887)),'workspace.files.upload.preflight':_0x37182d=>this[_0x1a1a7e(0x13b)](record(_0x37182d)),'workspace.files.upload.create':_0x45082c=>this[_0x1a1a7e(0x184)](record(_0x45082c)),'workspace.files.upload.chunk':_0x3122c7=>this[_0x1a1a7e(0x135)](record(_0x3122c7)),'workspace.files.upload.status':_0x25b0f5=>({'upload':this[_0x1a1a7e(0x162)][_0x1a1a7e(0x13d)][_0x1a1a7e(0x16a)](record(_0x25b0f5)[_0x1a1a7e(0x182)])}),'workspace.files.upload.complete':_0x543c5c=>this[_0x1a1a7e(0x15f)](record(_0x543c5c)),'workspace.files.upload.cancel':_0x14f412=>this[_0x1a1a7e(0x12f)](record(_0x14f412)),'workspace.changes.current':_0x133111=>this[_0x1a1a7e(0x174)](record(_0x133111)),'workspace.change.diff':_0x5b7388=>this[_0x1a1a7e(0x187)](record(_0x5b7388)),'workspace.change.restore':_0x400776=>this[_0x1a1a7e(0x163)](record(_0x400776)),'workspace.git.refs.list':_0x5488b0=>this[_0x1a1a7e(0x18c)](record(_0x5488b0)),'workspace.git.history.list':_0x19af69=>this[_0x1a1a7e(0x186)](record(_0x19af69)),'workspace.git.commit.files':_0x1bb62a=>this[_0x1a1a7e(0x15d)](record(_0x1bb62a)),'workspace.git.commit.file.diff':_0x44b19e=>this[_0x1a1a7e(0x18e)](record(_0x44b19e)),'workspace.git.commit.file.content.read':_0x5a8008=>this[_0x1a1a7e(0x153)](record(_0x5a8008)),'workspace.diff':_0x557954=>this[_0x1a1a7e(0x17b)](record(_0x557954))};}[_0x355422(0x14d)](_0x576437,_0x5cecaf){const _0x432acf=_0x355422;return this[_0x432acf(0x178)][_0x432acf(0x157)](_0x576437,_0x5cecaf);}[_0x355422(0x151)](_0x2ac596,_0xa3af01){const _0x5bea32=_0x355422;return this[_0x5bea32(0x178)][_0x5bea32(0x130)](_0x2ac596,_0xa3af01);}[_0x355422(0x141)](_0x4ba0d9){const _0x516017=_0x355422;this[_0x516017(0x178)][_0x516017(0x172)](_0x4ba0d9);}[_0x355422(0x172)](){const _0x139476=_0x355422;this[_0x139476(0x178)][_0x139476(0x181)]();}async[_0x355422(0x12e)](_0x31b848){const _0x341168=_0x355422,_0x48e014=this[_0x341168(0x162)][_0x341168(0x16b)](_0x31b848[_0x341168(0x152)]);if(_0x31b848[_0x341168(0x189)]!==undefined||_0x31b848[_0x341168(0x144)]!==undefined&&_0x31b848[_0x341168(0x144)]!=='.')return{'files':await this[_0x341168(0x162)][_0x341168(0x16e)][_0x341168(0x132)](_0x48e014,_0x31b848)};const _0x6523c2=await this[_0x341168(0x162)][_0x341168(0x16d)](_0x48e014),_0x95ce4f=await this[_0x341168(0x162)][_0x341168(0x16e)][_0x341168(0x132)](_0x48e014,_0x31b848);return{'files':_0x95ce4f,'workspace':await this[_0x341168(0x162)][_0x341168(0x17c)](_0x48e014,_0x6523c2)};}async[_0x355422(0x159)](_0x4801fe){const _0x47a109=_0x355422,_0x7f0671=this[_0x47a109(0x162)][_0x47a109(0x16b)](_0x4801fe[_0x47a109(0x152)]);return{'file':await this[_0x47a109(0x162)][_0x47a109(0x16e)][_0x47a109(0x14f)](_0x7f0671,_0x4801fe)};}async[_0x355422(0x147)](_0x184552){const _0x3a4205=_0x355422,_0x4a5727=this[_0x3a4205(0x162)][_0x3a4205(0x16b)](_0x184552[_0x3a4205(0x152)]);return{'file':await this[_0x3a4205(0x162)][_0x3a4205(0x16e)][_0x3a4205(0x188)](_0x4a5727,_0x184552)};}async[_0x355422(0x161)](_0x3aca27){const _0x4ca309=_0x355422,_0x3a2c21=this[_0x4ca309(0x162)][_0x4ca309(0x16b)](_0x3aca27[_0x4ca309(0x152)]);return{'files':await this[_0x4ca309(0x162)][_0x4ca309(0x16e)][_0x4ca309(0x17f)](_0x3a2c21,_0x3aca27)};}async[_0x355422(0x16f)](_0xd8d6f1){const _0x3604aa=_0x355422,_0x2d6670=this[_0x3604aa(0x162)][_0x3604aa(0x16b)](_0xd8d6f1[_0x3604aa(0x152)]);return{'file':await this[_0x3604aa(0x162)][_0x3604aa(0x16e)][_0x3604aa(0x14a)](_0x2d6670,_0xd8d6f1)};}async[_0x355422(0x173)](_0x27f0ef){const _0x4a1595=_0x355422,_0x31d849=this[_0x4a1595(0x162)][_0x4a1595(0x16b)](_0x27f0ef[_0x4a1595(0x152)]);return{'search':await this[_0x4a1595(0x137)][_0x4a1595(0x17f)](_0x31d849,_0x27f0ef)};}async[_0x355422(0x13b)](_0x426f5c){const _0x569111=_0x355422;return{'uploads':await this[_0x569111(0x162)][_0x569111(0x13d)][_0x569111(0x13b)](this[_0x569111(0x162)][_0x569111(0x16b)](_0x426f5c[_0x569111(0x152)]),_0x426f5c)};}async[_0x355422(0x184)](_0x2b9c5e){const _0x107da8=_0x355422;return{'upload':await this[_0x107da8(0x162)][_0x107da8(0x13d)][_0x107da8(0x143)](this[_0x107da8(0x162)][_0x107da8(0x16b)](_0x2b9c5e[_0x107da8(0x152)]),_0x2b9c5e)};}async[_0x355422(0x135)](_0xcbc8ac){const _0x3e0c98=_0x355422;return{'upload':await this[_0x3e0c98(0x162)][_0x3e0c98(0x13d)][_0x3e0c98(0x188)](_0xcbc8ac)};}async[_0x355422(0x15f)](_0xb5c646){const _0x47abe2=_0x355422;return{'upload':await this[_0x47abe2(0x162)][_0x47abe2(0x13d)][_0x47abe2(0x170)](_0xb5c646[_0x47abe2(0x182)])};}async[_0x355422(0x12f)](_0x468967){const _0x4c0596=_0x355422;return await this[_0x4c0596(0x162)][_0x4c0596(0x13d)][_0x4c0596(0x15c)](_0x468967[_0x4c0596(0x182)]),{'cancelled':!![]};}async[_0x355422(0x174)](_0x5ba1cb){const _0x2ae9cf=_0x355422;return this[_0x2ae9cf(0x162)][_0x2ae9cf(0x134)][_0x2ae9cf(0x168)](this[_0x2ae9cf(0x162)][_0x2ae9cf(0x16b)](_0x5ba1cb[_0x2ae9cf(0x152)]));}async[_0x355422(0x180)](_0x5188fd){const _0x4cd8e2=_0x355422;if(typeof _0x5188fd[_0x4cd8e2(0x152)]!==_0x4cd8e2(0x14b))throw new Error(_0x4cd8e2(0x13c));return{'file':await this[_0x4cd8e2(0x162)][_0x4cd8e2(0x16e)][_0x4cd8e2(0x164)](this[_0x4cd8e2(0x162)][_0x4cd8e2(0x16b)](_0x5188fd[_0x4cd8e2(0x152)]),_0x5188fd)};}async[_0x355422(0x187)](_0x1ad416){const _0x3829ee=_0x355422;if(typeof _0x1ad416[_0x3829ee(0x152)]!==_0x3829ee(0x14b)||typeof _0x1ad416[_0x3829ee(0x144)]!==_0x3829ee(0x14b)||_0x1ad416[_0x3829ee(0x14c)]!==undefined&&typeof _0x1ad416[_0x3829ee(0x14c)]!==_0x3829ee(0x14b))throw new Error(_0x3829ee(0x148));const _0x2b4257=this[_0x3829ee(0x167)](_0x1ad416[_0x3829ee(0x152)]),_0x16fa55=await resolveGitRepository(_0x2b4257[_0x3829ee(0x144)],_0x1ad416[_0x3829ee(0x14c)]??'');return{'diff':await readCurrentChangeDiff(_0x16fa55,_0x1ad416[_0x3829ee(0x144)])};}async[_0x355422(0x163)](_0x2e3024){const _0x3536be=_0x355422;if(typeof _0x2e3024[_0x3536be(0x152)]!==_0x3536be(0x14b)||typeof _0x2e3024[_0x3536be(0x144)]!==_0x3536be(0x14b)||_0x2e3024[_0x3536be(0x14c)]!==undefined&&typeof _0x2e3024[_0x3536be(0x14c)]!==_0x3536be(0x14b)||_0x2e3024[_0x3536be(0x15a)]!==_0x3536be(0x179)&&_0x2e3024[_0x3536be(0x15a)]!==_0x3536be(0x13a)&&_0x2e3024[_0x3536be(0x15a)]!==_0x3536be(0x145))throw new Error(_0x3536be(0x136));const _0xbd76a=this[_0x3536be(0x167)](_0x2e3024[_0x3536be(0x152)]),_0x599394=await resolveGitRepository(_0xbd76a[_0x3536be(0x144)],_0x2e3024[_0x3536be(0x14c)]??'');return await restoreCurrentChange(_0x599394,_0x2e3024[_0x3536be(0x144)],_0x2e3024[_0x3536be(0x15a)]),this[_0x3536be(0x162)][_0x3536be(0x157)](_0xbd76a['id']),{'restored':!![]};}async[_0x355422(0x131)](_0x513412){const _0x89fb93=_0x355422;if(typeof _0x513412[_0x89fb93(0x152)]!==_0x89fb93(0x14b)||_0x513412[_0x89fb93(0x14c)]!==undefined&&typeof _0x513412[_0x89fb93(0x14c)]!==_0x89fb93(0x14b))throw new Error(_0x89fb93(0x149));const _0x10a8c5=this[_0x89fb93(0x167)](_0x513412[_0x89fb93(0x152)]);return resolveGitRepository(_0x10a8c5[_0x89fb93(0x144)],_0x513412[_0x89fb93(0x14c)]??'');}[_0x355422(0x18a)](_0x4109bd){const _0x575b95=_0x355422;if(_0x4109bd[_0x575b95(0x18a)]===undefined)return undefined;if(!Array[_0x575b95(0x17e)](_0x4109bd[_0x575b95(0x18a)])||_0x4109bd[_0x575b95(0x18a)][_0x575b95(0x158)]>-0x14*0x185+-0x1ad1+0x39b5||_0x4109bd[_0x575b95(0x18a)][_0x575b95(0x155)](_0x2baeb0=>typeof _0x2baeb0!==_0x575b95(0x14b)))throw new Error(_0x575b95(0x160));return _0x4109bd[_0x575b95(0x18a)];}async[_0x355422(0x18c)](_0x33cdb6){const _0x5c0ac3=_0x355422;return{'refs':await listGitHistoryRefs(await this[_0x5c0ac3(0x131)](_0x33cdb6))};}async[_0x355422(0x186)](_0xeb50a){const _0x18fbf5=_0x355422,_0x4b0a7a=this[_0x18fbf5(0x18a)](_0xeb50a);if(_0xeb50a[_0x18fbf5(0x189)]!==undefined&&typeof _0xeb50a[_0x18fbf5(0x189)]!==_0x18fbf5(0x14b))throw new Error(_0x18fbf5(0x176));if(_0xeb50a[_0x18fbf5(0x12c)]!==undefined&&(typeof _0xeb50a[_0x18fbf5(0x12c)]!==_0x18fbf5(0x15b)||!Number[_0x18fbf5(0x12d)](_0xeb50a[_0x18fbf5(0x12c)])||_0xeb50a[_0x18fbf5(0x12c)]<0x1719+-0x1*0x1c02+0x4ea||_0xeb50a[_0x18fbf5(0x12c)]>-0x1*-0xad+0x3*0x76b+-0x241*0xa))throw new Error(_0x18fbf5(0x15e));return readGitHistory(await this[_0x18fbf5(0x131)](_0xeb50a),{..._0x4b0a7a===undefined?{}:{'refs':_0x4b0a7a},...typeof _0xeb50a[_0x18fbf5(0x189)]===_0x18fbf5(0x14b)?{'cursor':_0xeb50a[_0x18fbf5(0x189)]}:{},...typeof _0xeb50a[_0x18fbf5(0x12c)]===_0x18fbf5(0x15b)?{'limit':_0xeb50a[_0x18fbf5(0x12c)]}:{}});}async[_0x355422(0x15d)](_0x31c6df){const _0x38c7df=_0x355422;if(typeof _0x31c6df[_0x38c7df(0x185)]!==_0x38c7df(0x14b))throw new Error(_0x38c7df(0x13e));return{'files':await readGitHistoryFiles(await this[_0x38c7df(0x131)](_0x31c6df),_0x31c6df[_0x38c7df(0x185)],this[_0x38c7df(0x18a)](_0x31c6df))};}async[_0x355422(0x18e)](_0xf445dc){const _0xa9d45=_0x355422;if(typeof _0xf445dc[_0xa9d45(0x185)]!==_0xa9d45(0x14b)||typeof _0xf445dc[_0xa9d45(0x144)]!==_0xa9d45(0x14b)||_0xf445dc[_0xa9d45(0x133)]!==undefined&&typeof _0xf445dc[_0xa9d45(0x133)]!==_0xa9d45(0x14b))throw new Error(_0xa9d45(0x148));return{'diff':await readGitHistoryFileDiff(await this[_0xa9d45(0x131)](_0xf445dc),_0xf445dc[_0xa9d45(0x185)],_0xf445dc[_0xa9d45(0x144)],this[_0xa9d45(0x18a)](_0xf445dc),_0xf445dc[_0xa9d45(0x133)])};}async[_0x355422(0x153)](_0x2503c7){const _0x58a7ba=_0x355422;if(typeof _0x2503c7[_0x58a7ba(0x185)]!==_0x58a7ba(0x14b)||typeof _0x2503c7[_0x58a7ba(0x144)]!==_0x58a7ba(0x14b)||!Number[_0x58a7ba(0x13f)](_0x2503c7[_0x58a7ba(0x17a)])||_0x2503c7[_0x58a7ba(0x17a)]<0x8e*0x34+0x24b*0x9+-0x317b||!Number[_0x58a7ba(0x13f)](_0x2503c7[_0x58a7ba(0x12c)])||_0x2503c7[_0x58a7ba(0x12c)]<-0x1*-0x3c7+0xd*0x23+-0x31*0x1d||_0x2503c7[_0x58a7ba(0x12c)]>(0x9e4+0x832*-0x1+0xcf*-0x2)*(0x16ba+-0xc39+-0x681)*(-0x1a54+0x2c5+0x1b8f))throw new Error(_0x58a7ba(0x183));return{'file':await readGitHistoryFileContentRange(await this[_0x58a7ba(0x131)](_0x2503c7),_0x2503c7[_0x58a7ba(0x185)],_0x2503c7[_0x58a7ba(0x144)],_0x2503c7[_0x58a7ba(0x17a)],_0x2503c7[_0x58a7ba(0x12c)],this[_0x58a7ba(0x18a)](_0x2503c7))};}async[_0x355422(0x17b)](_0x233acb){const _0x1dce14=_0x355422;if(typeof _0x233acb[_0x1dce14(0x152)]!==_0x1dce14(0x14b)||typeof _0x233acb[_0x1dce14(0x169)]!==_0x1dce14(0x14b)||typeof _0x233acb[_0x1dce14(0x18b)]!==_0x1dce14(0x14b))throw new Error(_0x1dce14(0x148));const _0x236c83=this[_0x1dce14(0x167)](_0x233acb[_0x1dce14(0x152)]);return{'diff':await readRestrictedDiff(_0x236c83[_0x1dce14(0x144)],_0x233acb[_0x1dce14(0x169)],_0x233acb[_0x1dce14(0x18b)])};}[_0x355422(0x167)](_0x5d86b7){const _0x14d5fa=_0x355422,_0x19752e=this[_0x14d5fa(0x162)][_0x14d5fa(0x16b)](_0x5d86b7);if(_0x19752e[_0x14d5fa(0x139)]!==_0x14d5fa(0x140))throw new Error(_0x14d5fa(0x146));return _0x19752e;}}function record(_0x155e4e){const _0x1208cf=_0x355422;return typeof _0x155e4e===_0x1208cf(0x16c)&&_0x155e4e!==null&&!Array[_0x1208cf(0x17e)](_0x155e4e)?_0x155e4e:{};}function _0x3b4d(){const _0x5e7739=['CMvHzezPBgvdB250zw50','y2XLyxjbBgW','DxbSB2fKswq','rKLmrv9squ5hrv9jtLzbteLe','y3jLyxrLvxbSB2fK','y29TBwL0','z2L0sgLZDg9YEq','y2HHBMDLrgLMzG','D3jPDgu','y3vYC29Y','CMvMCW','Dg9szwy','z2L0uMvMCW','D2f0y2HdB250CM9SBgvY','z2L0q29TBwL0rMLSzurPzMy','mtK1ota1nZbQtLjjvKW','BgLTAxq','AxnjBNrLz2vY','BgLZDezPBgvZ','y2fUy2vSvxbSB2fK','zw5ZDxjLu25HChnOB3q','z2L0uMvWB3nPDg9YEq','BgLZDa','ChjLDMLVDxnqyxrO','y2HHBMDLCW','D3jPDgvvCgXVywq','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','y29UDgvUDfnLyxjJAa','BM9KzuDLBMvYyxrPB24','A2LUza','vu5tvefhruq','ChjLzMXPz2H0','v09ss1nqqunfx05pvf9gt1vora','DxbSB2fKCW','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','AxntywzLsw50zwDLCG','r0Lux1DpuKTtuefdrq','y2XLyxjxB3jRC3bHy2u','mtG0uvHwzMjo','y3jLyxrL','Cgf0Aa','vu5uuKfds0ve','v09ss1nqqunfx05pvf9hsvq','D3jPDgvgAwXL','r0Lux0rjrKzFsu5wquXjra','r0Lux1jfue9tsvrpuLLFsu5wquXjra','Bxv0yxrL','C3rYAw5N','CMvWB3nPDg9YEvbHDgG','Aw52ywXPzgf0zvrVCgLJ','oxjNwNn4Eq','CMvHza','otmYndbcvKnNtK8','zw5ZDxjLvg9WAwntBMfWC2HVDa','D29YA3nWywnLswq','z2L0q29TBwL0rMLSzunVBNrLBNq','mZi1mtK1mefptNjHyq','C29Tzq','B3bLCMf0Aw9UCW','Aw52ywXPzgf0zq','BgvUz3rO','CMvHzezPBgu','C3rHDgu','BNvTyMvY','y2fUy2vS','z2L0q29TBwL0rMLSzxm','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','y29TCgXLDgvvCgXVywq','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','C2vHCMnOrMLSzxm','B3b0Aw9UCW','CMvZDg9YzunOyw5Nzq','CMvHzenVBNrLBNq','D2f0y2G','mJG3mJG4suPqrKDc','z2L0v29YA3nWywnL','y3vYCMvUDa','zNjVBvjLzG','C3rHDhvZ','CMvXDwLYzvDVCMTZCgfJzq','B2jQzwn0','Aw5ZCgvJDfDVCMTZCgfJzq','zMLSzxm','Bxv0yxrLrMLSzq','y29TCgXLDgu','ndi4odqYohLYzeXQAa','y2XLyxi','C2vHCMnOq29UDgvUDa','y3vYCMvUDenOyw5Nzxm','m2T4A0f5Aa','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','mZaZmdKZnLbjD3jICa','C25HChnOB3rZ','u1rbr0ve','B2zMC2v0','zgLMzG','y29TBwL0v29YA3nWywnL','ota2mJLRtK5guhC','AxnbCNjHEq','C2vHCMnO'];_0x3b4d=function(){return _0x5e7739;};return _0x3b4d();}
2
+ function _0x1657(_0x5efcc1,_0x18ed79){_0x5efcc1=_0x5efcc1-(-0x137d+0xe4a+0x1*0x727);const _0xc2ffd2=_0xa545();let _0x50e065=_0xc2ffd2[_0x5efcc1];if(_0x1657['leGQia']===undefined){var _0xab6536=function(_0xe20e45){const _0x57f153='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a2192='',_0x4454c8='';for(let _0x1cd6a1=0x139*-0x15+0x770+0x1*0x123d,_0x3fd88b,_0x4ecd3d,_0x265e21=-0x49*0x29+-0xec1+-0xa*-0x2a5;_0x4ecd3d=_0xe20e45['charAt'](_0x265e21++);~_0x4ecd3d&&(_0x3fd88b=_0x1cd6a1%(-0x48e+-0x20a+0x12*0x5e)?_0x3fd88b*(0x23*-0x101+0x4a*0x56+0xa87)+_0x4ecd3d:_0x4ecd3d,_0x1cd6a1++%(-0x12ae*-0x2+0xb24*0x1+-0x307c))?_0x2a2192+=String['fromCharCode'](0xb*0x1+0x84c*-0x3+0x19d8*0x1&_0x3fd88b>>(-(-0x20c8+0x181d*-0x1+0x7*0x821)*_0x1cd6a1&-0x3e6+-0xff2+0x13de)):0x1*0x2029+-0x1851+0x2*-0x3ec){_0x4ecd3d=_0x57f153['indexOf'](_0x4ecd3d);}for(let _0xd5aeaf=-0x154*-0x1c+-0x26f7+0x1c7,_0x1f632d=_0x2a2192['length'];_0xd5aeaf<_0x1f632d;_0xd5aeaf++){_0x4454c8+='%'+('00'+_0x2a2192['charCodeAt'](_0xd5aeaf)['toString'](-0xd*-0x116+0x9*0x11e+-0x181c))['slice'](-(0x22cf+-0x1720+-0xbad*0x1));}return decodeURIComponent(_0x4454c8);};_0x1657['QGlCXX']=_0xab6536,_0x1657['kfgrGi']={},_0x1657['leGQia']=!![];}const _0x25333a=_0xc2ffd2[-0x23ab+0x14ef+0xebc];_0x1657['fpVgre']!==_0x25333a&&(_0x1657['kfgrGi']={},_0x1657['fpVgre']=_0x25333a);const _0x5297fa=_0x1657['kfgrGi'][_0x5efcc1];return _0x5297fa===undefined?(_0x50e065=_0x1657['QGlCXX'](_0x50e065),_0x1657['kfgrGi'][_0x5efcc1]=_0x50e065):_0x50e065=_0x5297fa,_0x50e065;}const _0x26b56f=_0x1657;(function(_0x1e9c7a,_0x40ab45){const _0x503672=_0x1657,_0x1b1947=_0x1e9c7a();while(!![]){try{const _0x1f5f94=-parseInt(_0x503672(0x259))/(-0x89*-0x2f+0x183d+-0x3163)*(parseInt(_0x503672(0x1f6))/(-0x19b1*-0x1+-0x84a*0x1+-0x3d*0x49))+-parseInt(_0x503672(0x24b))/(-0x264f+-0x3*0x1cd+0x2bb9)+parseInt(_0x503672(0x24e))/(-0x1249+-0x460+0x16ad)*(-parseInt(_0x503672(0x1f5))/(0x331+-0x1cdf+-0x33*-0x81))+parseInt(_0x503672(0x21b))/(-0x4*-0x11b+-0x2*-0x456+-0x7*0x1de)+parseInt(_0x503672(0x236))/(0x73b+-0x24f4+-0x44*-0x70)+-parseInt(_0x503672(0x20a))/(-0x1*-0x1c3+-0x726+-0x49*-0x13)*(-parseInt(_0x503672(0x213))/(-0x1212+0x505*0x7+-0x1108))+-parseInt(_0x503672(0x223))/(-0x23a4+0x13b8+-0x9*-0x1c6)*(-parseInt(_0x503672(0x229))/(-0x17*-0x158+0x1148+-0x3025));if(_0x1f5f94===_0x40ab45)break;else _0x1b1947['push'](_0x1b1947['shift']());}catch(_0x9cb220){_0x1b1947['push'](_0x1b1947['shift']());}}}(_0xa545,0xa7*-0x587+0x199d1*-0x1+-0x5*-0x176fe));import{listGitHistoryRefs,readGitHistory,readGitHistoryFileDiff,readGitHistoryFileContentRange,readGitHistoryFiles,readCurrentChangeDiff,readRestrictedDiff,resolveGitRepository,resolveGitRepositoryTarget,restoreCurrentChange}from'../workspace.js';import{WorkspaceContentSearchService}from'./workspace-content-search-service.js';import{WorkspaceWatchController}from'./workspace-watch-controller.js';import{WorkspaceWatchSnapshotService}from'./workspace-watch-snapshot-service.js';export class WorkspaceWorkbenchService{[_0x26b56f(0x1fa)];[_0x26b56f(0x252)];[_0x26b56f(0x241)];[_0x26b56f(0x200)];constructor(_0x7d2b2f){const _0xbc7ed=_0x26b56f;this[_0xbc7ed(0x1fa)]=_0x7d2b2f,this[_0xbc7ed(0x252)]=new WorkspaceContentSearchService(_0x7d2b2f[_0xbc7ed(0x239)]),this[_0xbc7ed(0x241)]=new WorkspaceWatchSnapshotService(_0x7d2b2f),this[_0xbc7ed(0x200)]=new WorkspaceWatchController({'requireWorkspace':_0x7d2b2f[_0xbc7ed(0x253)],'watch':_0x7d2b2f[_0xbc7ed(0x204)],'snapshots':this[_0xbc7ed(0x241)],'nodeGeneration':_0x7d2b2f[_0xbc7ed(0x203)]});}[_0x26b56f(0x251)](){const _0x1ba082=_0x26b56f;return{...this[_0x1ba082(0x200)][_0x1ba082(0x251)](),'workspace.files.list':_0x577f0b=>this[_0x1ba082(0x257)](record(_0x577f0b)),'workspace.file.read':_0x39fd66=>this[_0x1ba082(0x228)](record(_0x39fd66)),'workspace.file.write':_0x5d142e=>this[_0x1ba082(0x240)](record(_0x5d142e)),'workspace.file.content.read':_0x213fd=>this[_0x1ba082(0x23e)](record(_0x213fd)),'workspace.files.search':_0x53a202=>this[_0x1ba082(0x234)](record(_0x53a202)),'workspace.files.mutate':_0xddc6a0=>this[_0x1ba082(0x231)](record(_0xddc6a0)),'workspace.content.search':_0xc469f4=>this[_0x1ba082(0x211)](record(_0xc469f4)),'workspace.files.upload.preflight':_0x27f197=>this[_0x1ba082(0x248)](record(_0x27f197)),'workspace.files.upload.create':_0x40eb5b=>this[_0x1ba082(0x235)](record(_0x40eb5b)),'workspace.files.upload.chunk':_0x3bf58f=>this[_0x1ba082(0x206)](record(_0x3bf58f)),'workspace.files.upload.status':_0x308e40=>({'upload':this[_0x1ba082(0x1fa)][_0x1ba082(0x20d)][_0x1ba082(0x221)](record(_0x308e40)[_0x1ba082(0x247)])}),'workspace.files.upload.complete':_0x1ef7ef=>this[_0x1ba082(0x25a)](record(_0x1ef7ef)),'workspace.files.upload.cancel':_0x3d2807=>this[_0x1ba082(0x215)](record(_0x3d2807)),'workspace.changes.current':_0x37e2c8=>this[_0x1ba082(0x217)](record(_0x37e2c8)),'workspace.change.diff':_0x72a122=>this[_0x1ba082(0x20f)](record(_0x72a122)),'workspace.change.restore':_0x5a2c7a=>this[_0x1ba082(0x224)](record(_0x5a2c7a)),'workspace.git.refs.list':_0x1376bd=>this[_0x1ba082(0x1f7)](record(_0x1376bd)),'workspace.git.history.list':_0x13833d=>this[_0x1ba082(0x208)](record(_0x13833d)),'workspace.git.commit.files':_0x1d3fb0=>this[_0x1ba082(0x21d)](record(_0x1d3fb0)),'workspace.git.commit.file.diff':_0x4ae4ee=>this[_0x1ba082(0x245)](record(_0x4ae4ee)),'workspace.git.commit.file.content.read':_0x69d398=>this[_0x1ba082(0x226)](record(_0x69d398)),'workspace.diff':_0x4283ee=>this[_0x1ba082(0x216)](record(_0x4283ee))};}[_0x26b56f(0x23a)](_0x493ce2,_0x21bf05){const _0x38f4de=_0x26b56f;return this[_0x38f4de(0x241)][_0x38f4de(0x249)](_0x493ce2,_0x21bf05);}[_0x26b56f(0x220)](_0x154b05,_0x1fc86a){const _0x5280cf=_0x26b56f;return this[_0x5280cf(0x241)][_0x5280cf(0x258)](_0x154b05,_0x1fc86a);}[_0x26b56f(0x21e)](_0x5efcc1){const _0x3fa3c3=_0x26b56f;this[_0x3fa3c3(0x241)][_0x3fa3c3(0x222)](_0x5efcc1);}[_0x26b56f(0x222)](){const _0x1a0c59=_0x26b56f;this[_0x1a0c59(0x241)][_0x1a0c59(0x23d)]();}async[_0x26b56f(0x257)](_0x18ed79){const _0x5105b9=_0x26b56f,_0xc2ffd2=this[_0x5105b9(0x1fa)][_0x5105b9(0x253)](_0x18ed79[_0x5105b9(0x254)]);if(_0x18ed79[_0x5105b9(0x20e)]!==undefined||_0x18ed79[_0x5105b9(0x210)]!==undefined&&_0x18ed79[_0x5105b9(0x210)]!=='.')return{'files':await this[_0x5105b9(0x1fa)][_0x5105b9(0x239)][_0x5105b9(0x1f4)](_0xc2ffd2,_0x18ed79)};const _0x50e065=await this[_0x5105b9(0x1fa)][_0x5105b9(0x233)](_0xc2ffd2),_0xab6536=await this[_0x5105b9(0x1fa)][_0x5105b9(0x239)][_0x5105b9(0x1f4)](_0xc2ffd2,_0x18ed79);return{'files':_0xab6536,'workspace':await this[_0x5105b9(0x1fa)][_0x5105b9(0x232)](_0xc2ffd2,_0x50e065)};}async[_0x26b56f(0x228)](_0x25333a){const _0x76a300=_0x26b56f,_0x5297fa=this[_0x76a300(0x1fa)][_0x76a300(0x253)](_0x25333a[_0x76a300(0x254)]),_0xe20e45=await this[_0x76a300(0x238)](_0x5297fa,_0x25333a);return{'file':await this[_0x76a300(0x1fa)][_0x76a300(0x239)][_0x76a300(0x246)](_0x5297fa,_0x25333a,_0xe20e45)};}async[_0x26b56f(0x240)](_0x57f153){const _0x161d99=_0x26b56f,_0x2a2192=this[_0x161d99(0x1fa)][_0x161d99(0x253)](_0x57f153[_0x161d99(0x254)]);return{'file':await this[_0x161d99(0x1fa)][_0x161d99(0x239)][_0x161d99(0x255)](_0x2a2192,_0x57f153)};}async[_0x26b56f(0x234)](_0x4454c8){const _0x4e8f41=_0x26b56f,_0x1cd6a1=this[_0x4e8f41(0x1fa)][_0x4e8f41(0x253)](_0x4454c8[_0x4e8f41(0x254)]);return{'files':await this[_0x4e8f41(0x1fa)][_0x4e8f41(0x239)][_0x4e8f41(0x22b)](_0x1cd6a1,_0x4454c8)};}async[_0x26b56f(0x231)](_0x3fd88b){const _0x4cd06f=_0x26b56f,_0x4ecd3d=this[_0x4cd06f(0x1fa)][_0x4cd06f(0x253)](_0x3fd88b[_0x4cd06f(0x254)]);return{'file':await this[_0x4cd06f(0x1fa)][_0x4cd06f(0x239)][_0x4cd06f(0x22f)](_0x4ecd3d,_0x3fd88b)};}async[_0x26b56f(0x211)](_0x265e21){const _0x3f4e24=_0x26b56f,_0xd5aeaf=this[_0x3f4e24(0x1fa)][_0x3f4e24(0x253)](_0x265e21[_0x3f4e24(0x254)]);return{'search':await this[_0x3f4e24(0x252)][_0x3f4e24(0x22b)](_0xd5aeaf,_0x265e21)};}async[_0x26b56f(0x248)](_0x1f632d){const _0xcb0d09=_0x26b56f;return{'uploads':await this[_0xcb0d09(0x1fa)][_0xcb0d09(0x20d)][_0xcb0d09(0x248)](this[_0xcb0d09(0x1fa)][_0xcb0d09(0x253)](_0x1f632d[_0xcb0d09(0x254)]),_0x1f632d)};}async[_0x26b56f(0x235)](_0x43dd7c){const _0x2e09b1=_0x26b56f;return{'upload':await this[_0x2e09b1(0x1fa)][_0x2e09b1(0x20d)][_0x2e09b1(0x22e)](this[_0x2e09b1(0x1fa)][_0x2e09b1(0x253)](_0x43dd7c[_0x2e09b1(0x254)]),_0x43dd7c)};}async[_0x26b56f(0x206)](_0x261c48){const _0x1e429f=_0x26b56f;return{'upload':await this[_0x1e429f(0x1fa)][_0x1e429f(0x20d)][_0x1e429f(0x255)](_0x261c48)};}async[_0x26b56f(0x25a)](_0x36959e){const _0x41a98f=_0x26b56f;return{'upload':await this[_0x41a98f(0x1fa)][_0x41a98f(0x20d)][_0x41a98f(0x202)](_0x36959e[_0x41a98f(0x247)])};}async[_0x26b56f(0x215)](_0x34e289){const _0x159d37=_0x26b56f;return await this[_0x159d37(0x1fa)][_0x159d37(0x20d)][_0x159d37(0x219)](_0x34e289[_0x159d37(0x247)]),{'cancelled':!![]};}async[_0x26b56f(0x217)](_0x3c75d5){const _0x2f99d7=_0x26b56f;return this[_0x2f99d7(0x1fa)][_0x2f99d7(0x24d)][_0x2f99d7(0x212)](this[_0x2f99d7(0x1fa)][_0x2f99d7(0x253)](_0x3c75d5[_0x2f99d7(0x254)]));}async[_0x26b56f(0x23e)](_0x287b17){const _0x12d405=_0x26b56f;if(typeof _0x287b17[_0x12d405(0x254)]!==_0x12d405(0x201))throw new Error(_0x12d405(0x225));const _0x1ae350=this[_0x12d405(0x1fa)][_0x12d405(0x253)](_0x287b17[_0x12d405(0x254)]),_0x3ef0a6=await this[_0x12d405(0x238)](_0x1ae350,_0x287b17);return{'file':await this[_0x12d405(0x1fa)][_0x12d405(0x239)][_0x12d405(0x22a)](_0x1ae350,_0x287b17,_0x3ef0a6)};}async[_0x26b56f(0x20f)](_0x5e36ef){const _0x5bc257=_0x26b56f;if(typeof _0x5e36ef[_0x5bc257(0x254)]!==_0x5bc257(0x201)||typeof _0x5e36ef[_0x5bc257(0x210)]!==_0x5bc257(0x201)||_0x5e36ef[_0x5bc257(0x230)]!==undefined&&typeof _0x5e36ef[_0x5bc257(0x230)]!==_0x5bc257(0x201)||_0x5e36ef[_0x5bc257(0x20b)]!==undefined&&typeof _0x5e36ef[_0x5bc257(0x20b)]!==_0x5bc257(0x201))throw new Error(_0x5bc257(0x256));const _0x53a880=this[_0x5bc257(0x24c)](_0x5e36ef[_0x5bc257(0x254)]),_0x1c8650=await resolveGitRepositoryTarget(_0x53a880[_0x5bc257(0x210)],_0x5e36ef[_0x5bc257(0x230)]??'',_0x5e36ef[_0x5bc257(0x20b)]);return{'diff':await readCurrentChangeDiff(_0x1c8650,_0x5e36ef[_0x5bc257(0x210)])};}async[_0x26b56f(0x224)](_0x2023bb){const _0x25d432=_0x26b56f;if(typeof _0x2023bb[_0x25d432(0x254)]!==_0x25d432(0x201)||typeof _0x2023bb[_0x25d432(0x210)]!==_0x25d432(0x201)||_0x2023bb[_0x25d432(0x230)]!==undefined&&typeof _0x2023bb[_0x25d432(0x230)]!==_0x25d432(0x201)||_0x2023bb[_0x25d432(0x20b)]!==undefined&&typeof _0x2023bb[_0x25d432(0x20b)]!==_0x25d432(0x201)||_0x2023bb[_0x25d432(0x21a)]!==_0x25d432(0x207)&&_0x2023bb[_0x25d432(0x21a)]!==_0x25d432(0x23f)&&_0x2023bb[_0x25d432(0x21a)]!==_0x25d432(0x1fe))throw new Error(_0x25d432(0x21c));const _0x5123b8=this[_0x25d432(0x24c)](_0x2023bb[_0x25d432(0x254)]),_0x5e7b45=await resolveGitRepositoryTarget(_0x5123b8[_0x25d432(0x210)],_0x2023bb[_0x25d432(0x230)]??'',_0x2023bb[_0x25d432(0x20b)]);return await restoreCurrentChange(_0x5e7b45,_0x2023bb[_0x25d432(0x210)],_0x2023bb[_0x25d432(0x21a)]),this[_0x25d432(0x1fa)][_0x25d432(0x249)](_0x5123b8['id']),{'restored':!![]};}async[_0x26b56f(0x244)](_0x2a6fac){const _0x3738cb=_0x26b56f;if(typeof _0x2a6fac[_0x3738cb(0x254)]!==_0x3738cb(0x201)||_0x2a6fac[_0x3738cb(0x230)]!==undefined&&typeof _0x2a6fac[_0x3738cb(0x230)]!==_0x3738cb(0x201))throw new Error(_0x3738cb(0x218));const _0x3e5b73=this[_0x3738cb(0x24c)](_0x2a6fac[_0x3738cb(0x254)]);return resolveGitRepository(_0x3e5b73[_0x3738cb(0x210)],_0x2a6fac[_0x3738cb(0x230)]??'');}async[_0x26b56f(0x238)](_0x20a268,_0x332de5){const _0x570981=_0x26b56f;if(_0x332de5[_0x570981(0x20b)]===undefined)return _0x20a268[_0x570981(0x210)];if(typeof _0x332de5[_0x570981(0x20b)]!==_0x570981(0x201))throw new Error(_0x570981(0x218));return resolveGitRepositoryTarget(_0x20a268[_0x570981(0x210)],'',_0x332de5[_0x570981(0x20b)]);}[_0x26b56f(0x20c)](_0x35e487){const _0x4dcafb=_0x26b56f;if(_0x35e487[_0x4dcafb(0x20c)]===undefined)return undefined;if(!Array[_0x4dcafb(0x22c)](_0x35e487[_0x4dcafb(0x20c)])||_0x35e487[_0x4dcafb(0x20c)][_0x4dcafb(0x22d)]>-0x16*0x1b5+0x8+-0x9d*-0x3e||_0x35e487[_0x4dcafb(0x20c)][_0x4dcafb(0x21f)](_0x1f2431=>typeof _0x1f2431!==_0x4dcafb(0x201)))throw new Error(_0x4dcafb(0x1ff));return _0x35e487[_0x4dcafb(0x20c)];}async[_0x26b56f(0x1f7)](_0x31d672){const _0x353316=_0x26b56f;return{'refs':await listGitHistoryRefs(await this[_0x353316(0x244)](_0x31d672))};}async[_0x26b56f(0x208)](_0x5a66d1){const _0x286d07=_0x26b56f,_0xafc22e=this[_0x286d07(0x20c)](_0x5a66d1);if(_0x5a66d1[_0x286d07(0x20e)]!==undefined&&typeof _0x5a66d1[_0x286d07(0x20e)]!==_0x286d07(0x201))throw new Error(_0x286d07(0x242));if(_0x5a66d1[_0x286d07(0x1f9)]!==undefined&&(typeof _0x5a66d1[_0x286d07(0x1f9)]!==_0x286d07(0x205)||!Number[_0x286d07(0x227)](_0x5a66d1[_0x286d07(0x1f9)])||_0x5a66d1[_0x286d07(0x1f9)]<-0x21b+0xef0+-0xcd4||_0x5a66d1[_0x286d07(0x1f9)]>0x29*-0x85+-0x245f+0x4*0xe84))throw new Error(_0x286d07(0x250));return readGitHistory(await this[_0x286d07(0x244)](_0x5a66d1),{..._0xafc22e===undefined?{}:{'refs':_0xafc22e},...typeof _0x5a66d1[_0x286d07(0x20e)]===_0x286d07(0x201)?{'cursor':_0x5a66d1[_0x286d07(0x20e)]}:{},...typeof _0x5a66d1[_0x286d07(0x1f9)]===_0x286d07(0x205)?{'limit':_0x5a66d1[_0x286d07(0x1f9)]}:{}});}async[_0x26b56f(0x21d)](_0x57fd92){const _0x537680=_0x26b56f;if(typeof _0x57fd92[_0x537680(0x237)]!==_0x537680(0x201))throw new Error(_0x537680(0x23c));return{'files':await readGitHistoryFiles(await this[_0x537680(0x244)](_0x57fd92),_0x57fd92[_0x537680(0x237)],this[_0x537680(0x20c)](_0x57fd92))};}async[_0x26b56f(0x245)](_0x3d7538){const _0xfed97a=_0x26b56f;if(typeof _0x3d7538[_0xfed97a(0x237)]!==_0xfed97a(0x201)||typeof _0x3d7538[_0xfed97a(0x210)]!==_0xfed97a(0x201)||_0x3d7538[_0xfed97a(0x1fb)]!==undefined&&typeof _0x3d7538[_0xfed97a(0x1fb)]!==_0xfed97a(0x201))throw new Error(_0xfed97a(0x256));return{'diff':await readGitHistoryFileDiff(await this[_0xfed97a(0x244)](_0x3d7538),_0x3d7538[_0xfed97a(0x237)],_0x3d7538[_0xfed97a(0x210)],this[_0xfed97a(0x20c)](_0x3d7538),_0x3d7538[_0xfed97a(0x1fb)])};}async[_0x26b56f(0x226)](_0x13e444){const _0x58507d=_0x26b56f;if(typeof _0x13e444[_0x58507d(0x237)]!==_0x58507d(0x201)||typeof _0x13e444[_0x58507d(0x210)]!==_0x58507d(0x201)||!Number[_0x58507d(0x243)](_0x13e444[_0x58507d(0x23b)])||_0x13e444[_0x58507d(0x23b)]<-0x25*-0x6a+0x5*0x3ab+-0x21a9*0x1||!Number[_0x58507d(0x243)](_0x13e444[_0x58507d(0x1f9)])||_0x13e444[_0x58507d(0x1f9)]<0x1121+-0x2417*-0x1+0x11bd*-0x3||_0x13e444[_0x58507d(0x1f9)]>(0x243*0x1+0x2265+-0x2494)*(0x2*-0x112a+-0x1*-0x99d+0x1cb7)*(-0x40+-0x1d3*0x5+0x15*0xa3))throw new Error(_0x58507d(0x214));return{'file':await readGitHistoryFileContentRange(await this[_0x58507d(0x244)](_0x13e444),_0x13e444[_0x58507d(0x237)],_0x13e444[_0x58507d(0x210)],_0x13e444[_0x58507d(0x23b)],_0x13e444[_0x58507d(0x1f9)],this[_0x58507d(0x20c)](_0x13e444))};}async[_0x26b56f(0x216)](_0x8ddd8){const _0x32b299=_0x26b56f;if(typeof _0x8ddd8[_0x32b299(0x254)]!==_0x32b299(0x201)||typeof _0x8ddd8[_0x32b299(0x24a)]!==_0x32b299(0x201)||typeof _0x8ddd8[_0x32b299(0x1fc)]!==_0x32b299(0x201))throw new Error(_0x32b299(0x256));const _0x1491a3=this[_0x32b299(0x24c)](_0x8ddd8[_0x32b299(0x254)]);return{'diff':await readRestrictedDiff(_0x1491a3[_0x32b299(0x210)],_0x8ddd8[_0x32b299(0x24a)],_0x8ddd8[_0x32b299(0x1fc)])};}[_0x26b56f(0x24c)](_0x182c5d){const _0x2b5e7e=_0x26b56f,_0xa689af=this[_0x2b5e7e(0x1fa)][_0x2b5e7e(0x253)](_0x182c5d);if(_0xa689af[_0x2b5e7e(0x24f)]!==_0x2b5e7e(0x1f8))throw new Error(_0x2b5e7e(0x1fd));return _0xa689af;}}function record(_0x3c67fc){const _0x1ab91c=_0x26b56f;return typeof _0x3c67fc===_0x1ab91c(0x209)&&_0x3c67fc!==null&&!Array[_0x1ab91c(0x22c)](_0x3c67fc)?_0x3c67fc:{};}function _0xa545(){const _0x53d1d1=['ngTrA3D1vW','A2LUza','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','B3bLCMf0Aw9UCW','y29UDgvUDfnLyxjJAa','CMvXDwLYzvDVCMTZCgfJzq','D29YA3nWywnLswq','D3jPDgu','r0Lux0rjrKzFsu5wquXjra','BgLZDezPBgvZ','zw5ZDxjLu25HChnOB3q','mJe5otKXyuHqz1ns','y29TCgXLDgvvCgXVywq','BgLZDa','nJq0nte1wurWyNHz','mMXrzNPjvq','z2L0uMvMCW','r0Lux1DpuKTtuefdrq','BgLTAxq','B3b0Aw9UCW','ChjLDMLVDxnqyxrO','Dg9szwy','v09ss1nqqunfx05pvf9hsvq','vu5uuKfds0ve','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','D2f0y2HdB250CM9SBgvY','C3rYAw5N','y29TCgXLDgu','BM9KzuDLBMvYyxrPB24','D2f0y2G','BNvTyMvY','D3jPDgvvCgXVywq','u1rbr0ve','z2L0sgLZDg9YEq','B2jQzwn0','mtzPuMPtrvC','D29YA3rYzwvqyxrO','CMvMCW','DxbSB2fKCW','y3vYC29Y','y2HHBMDLrgLMzG','Cgf0Aa','C2vHCMnOq29UDgvUDa','y3vYCMvUDa','mta0mdyWn2PzuwHAvW','rKLmrv9squ5hrv9jtLzbteLe','y2fUy2vSvxbSB2fK','zgLMzG','y3vYCMvUDenOyw5Nzxm','r0Lux1jfue9tsvrpuLLFsu5wquXjra','y2fUy2vS','C3rHDgu','odq4nti2vxrywNjW','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','z2L0q29TBwL0rMLSzxm','y2XLyxjxB3jRC3bHy2u','C29Tzq','zw5ZDxjLvg9WAwntBMfWC2HVDa','C3rHDhvZ','y2XLyxi','mtbZsKHKswC','CMvZDg9YzunOyw5Nzq','v09ss1nqqunfx05pvf9gt1vora','z2L0q29TBwL0rMLSzunVBNrLBNq','AxnjBNrLz2vY','CMvHzezPBgu','mZqXoda0mwrAsw1MuW','CMvHzenVBNrLBNq','C2vHCMnO','AxnbCNjHEq','BgvUz3rO','y3jLyxrL','Bxv0yxrL','CMvWB3nPDg9YEvbHDgG','Bxv0yxrLrMLSzq','y29TBwL0v29YA3nWywnL','Aw5ZCgvJDfDVCMTZCgfJzq','C2vHCMnOrMLSzxm','y3jLyxrLvxbSB2fK','mtq0otq5tfLrDfPZ','y29TBwL0','zMLSzvjLCg9ZAxrVCNK','zMLSzxm','Aw52ywXPzgf0zvrVCgLJ','B2zMC2v0','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','y2XLyxjbBgW','CMvHzezPBgvdB250zw50','vu5tvefhruq','D3jPDgvgAwXL','C25HChnOB3rZ','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','AxntywzLsw50zwDLCG','z2L0uMvWB3nPDg9YEq','z2L0q29TBwL0rMLSzurPzMy','CMvHza','DxbSB2fKswq','ChjLzMXPz2H0','Aw52ywXPzgf0zq','zNjVBvjLzG','nJq5mZe3ChbWz0nQ','z2L0v29YA3nWywnL','y2HHBMDLCW'];_0xa545=function(){return _0x53d1d1;};return _0xa545();}
package/dist/workspace.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* mar-release-protected */
2
- const _0x29cc70=_0x28d1;(function(_0x5a11fb,_0x44a7a5){const _0x5a6df0=_0x28d1,_0x48528c=_0x5a11fb();while(!![]){try{const _0x221623=-parseInt(_0x5a6df0(0x287))/(-0x7d7*-0x1+-0x1b41*0x1+0x136b)+parseInt(_0x5a6df0(0x25b))/(-0x1f*-0x7d+0xd*0x125+-0x1e02)+parseInt(_0x5a6df0(0x1bb))/(0x180f+0x5*-0x39a+-0x1*0x60a)+-parseInt(_0x5a6df0(0x206))/(0x1ffd+-0x691*-0x2+-0xf09*0x3)+parseInt(_0x5a6df0(0x1c2))/(-0x117*0x1d+-0x1ce5+0x3c85)+parseInt(_0x5a6df0(0x2a4))/(0xfe+-0x1*-0x1d29+-0x3*0xa0b)+-parseInt(_0x5a6df0(0x29c))/(0x124d+-0x19b*-0xd+-0x2725);if(_0x221623===_0x44a7a5)break;else _0x48528c['push'](_0x48528c['shift']());}catch(_0x4aa98f){_0x48528c['push'](_0x48528c['shift']());}}}(_0x2e1c,-0x1*-0x2c693+0x4e8f4+0x173c8));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,opendir,open,readdir,readFile,realpath,rename,rm,stat,unlink,writeFile}from'node:fs/promises';import{homedir,platform as _0x292b67}from'node:os';import{basename,dirname,isAbsolute,posix,relative,resolve,sep,win32}from'node:path';import{spawn}from'node:child_process';import{minimatch}from'minimatch';import{terminateProcessTree}from'./process-tree.js';const GIT_TIMEOUT_MS=-0x1*-0x26ef+-0x1*0xe1a+0x3b*-0x17,GIT_STATUS_TIMEOUT_MS=-0x1*0x3047+0xd211+-0x1*0x2c9a,GIT_HISTORY_TIMEOUT_MS=0xdfb*0x2+0x21c4+0x2*-0x191,GIT_OUTPUT_LIMIT=(0xfd4*0x2+0x86a+-0x2612)*(0x1*0x11e9+-0xe38+0x4f*0x1),GIT_LARGE_OUTPUT_LIMIT=(-0x1f4*0xe+-0x24c7+-0x1*-0x4027)*(-0x13bb+-0x8b*0x43+0x3c1c)*(-0x25f1+-0x6bd+0x1857*0x2),FILE_READ_LIMIT=(0x167*-0x3+-0x3c6+0x1*0x9fb)*(-0x126*-0xa+0x3e8*-0x4+0x412*0x2),DIRECTORY_PAGE_LIMIT=-0x36*-0x50+-0x1850+0x107*0x8,DIRECTORY_PICKER_LIMIT=0xb27+0x3*-0xc01+-0x19a4*-0x1,SEARCH_RESULT_LIMIT=0x71*0x5+0x1*0x171+0x2de*-0x1,GIT_WORKTREE_LIST_LIMIT=-0x1f3f+-0x25c2*0x1+0x4581,FILE_INDEX_IDLE_TTL_MS=(-0x18c1*-0x1+0x1*-0x1869+0x2*-0xe)*(0x242b+-0x18e5+-0x3ae*0x3)*(0x1753+0x53d+-0x18a8),FILE_INDEX_FRESHNESS_TTL_MS=-0x3*-0x4a65+-0x12a*0x20+-0x44bf,FILE_INDEX_ENTRY_LIMIT=0x1*0x24f2b+0x13a6*-0x22+0x1d381,FILE_INDEX_METADATA_CONCURRENCY=0x2*0x3ee+-0x137+-0x1*0x685,DEFAULT_QUICK_OPEN_EXCLUDES=[_0x29cc70(0x1bd),_0x29cc70(0x1cd),_0x29cc70(0x26c),_0x29cc70(0x204),_0x29cc70(0x280),_0x29cc70(0x1c7),_0x29cc70(0x27c),_0x29cc70(0x269),_0x29cc70(0x21c),_0x29cc70(0x28d),_0x29cc70(0x2b4),_0x29cc70(0x25e),_0x29cc70(0x295),_0x29cc70(0x235),_0x29cc70(0x277),_0x29cc70(0x1ff),_0x29cc70(0x21d),_0x29cc70(0x1f5),_0x29cc70(0x254),_0x29cc70(0x2b1),_0x29cc70(0x258),_0x29cc70(0x207),_0x29cc70(0x2b8),_0x29cc70(0x291),_0x29cc70(0x1c8)],REF_PATTERN=/^(?!-)(?!.*\.\.)(?!.*@\{)[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$/;export async function createWorkspaceDirectory(_0x5ac3bb,_0x1802d0,_0x45be31){const _0x5c3d11=_0x29cc70,_0x34512d=_0x1802d0[_0x5c3d11(0x22b)]();if(_0x34512d[_0x5c3d11(0x1c3)]===-0x1667+0xb3d+0xb2a||_0x34512d[_0x5c3d11(0x1c3)]>0xac2+0x47*-0x17+0x362*-0x1||_0x34512d==='.'||_0x34512d==='..'||_0x34512d[_0x5c3d11(0x262)]('/')||_0x34512d[_0x5c3d11(0x262)]('\x5c')||_0x34512d[_0x5c3d11(0x262)]('\x00'))throw new Error(_0x5c3d11(0x20e));const _0x3b0dd0=await Promise[_0x5c3d11(0x191)](_0x45be31[_0x5c3d11(0x1f1)](_0x22bcac=>realpath(_0x22bcac))),_0x2a9e18=await realpath(_0x5ac3bb)[_0x5c3d11(0x19c)](()=>{const _0xc7f35=_0x5c3d11;throw new Error(_0xc7f35(0x2a3));}),_0x4d5868=await stat(_0x2a9e18)[_0x5c3d11(0x19c)](()=>undefined);if(_0x4d5868?.[_0x5c3d11(0x265)]()!==!![]||!isWithinAllowedRoot(_0x2a9e18,_0x3b0dd0))throw new Error(_0x5c3d11(0x2a3));const _0x48a22f=resolve(_0x2a9e18,_0x34512d);if(dirname(_0x48a22f)!==_0x2a9e18||!isWithinAllowedRoot(_0x48a22f,_0x3b0dd0))throw new Error(_0x5c3d11(0x20e));try{await mkdir(_0x48a22f);}catch(_0x3910be){if(_0x3910be[_0x5c3d11(0x28f)]===_0x5c3d11(0x225))throw new Error(_0x5c3d11(0x290));throw _0x3910be;}return _0x48a22f;}export class WorkspaceFileIndex{[_0x29cc70(0x1cb)];[_0x29cc70(0x1fd)];[_0x29cc70(0x27d)]=[];[_0x29cc70(0x253)]=![];[_0x29cc70(0x270)];[_0x29cc70(0x2b9)];[_0x29cc70(0x222)]=!![];[_0x29cc70(0x282)];[_0x29cc70(0x1de)]=-0x22*-0x2d+0xce0+-0x12da;[_0x29cc70(0x236)]=0x220f*-0x1+-0xc88+0x2e97;constructor(_0x1f713b,_0x507420={}){const _0x33fd3c=_0x29cc70;this[_0x33fd3c(0x1cb)]=_0x1f713b,this[_0x33fd3c(0x1fd)]=_0x507420;}async[_0x29cc70(0x29d)](){const _0x18386e=_0x29cc70;return await this[_0x18386e(0x192)](),this[_0x18386e(0x1ba)](),{'entries':this[_0x18386e(0x27d)][_0x18386e(0x1fb)](_0x454283=>_0x454283[_0x18386e(0x232)]===_0x18386e(0x2a0)),'truncated':this[_0x18386e(0x253)]};}[_0x29cc70(0x20f)](){const _0x409d7b=_0x29cc70;if(this[_0x409d7b(0x282)]!==undefined)clearTimeout(this[_0x409d7b(0x282)]);this[_0x409d7b(0x282)]=undefined,this[_0x409d7b(0x27d)]=[],this[_0x409d7b(0x253)]=![],this[_0x409d7b(0x222)]=!![],this[_0x409d7b(0x1de)]=0x1*0xa59+-0x9ce+-0x8b,this[_0x409d7b(0x236)]=-0x10+0x14b3*-0x1+-0x1*-0x14c3;}async[_0x29cc70(0x1a8)](_0x8bcf08,_0x4ffb2c,_0x200a10=SEARCH_RESULT_LIMIT,_0x15c743=![]){const _0x12930f=_0x29cc70;if(_0x8bcf08[_0x12930f(0x22b)]()[_0x12930f(0x1c3)]===-0x56d*0x7+-0x16a6+-0x583*-0xb||_0x8bcf08[_0x12930f(0x1c3)]>-0x6b1+-0x3d*-0x5b+-0xdfe||!Number[_0x12930f(0x1eb)](_0x200a10)||_0x200a10<0xae*0x3+0xd*0x1a3+-0x1750||_0x200a10>SEARCH_RESULT_LIMIT)throw new Error(_0x12930f(0x239));await this[_0x12930f(0x192)](),this[_0x12930f(0x1ba)]();const _0x1879a4=decodeSearchCursor(_0x4ffb2c,_0x8bcf08),_0x7df633=_0x1879a4===undefined?undefined:this[_0x12930f(0x27d)][_0x12930f(0x1a5)](_0xa9e42a=>_0xa9e42a[_0x12930f(0x2a2)]===_0x1879a4&&(_0x15c743||_0xa9e42a[_0x12930f(0x232)]===_0x12930f(0x2a0))),_0x686276=_0x7df633===undefined?-(-0x94f*-0x2+-0x305*-0x9+-0x2dca*0x1):fuzzyPathScore(_0x7df633[_0x12930f(0x2a2)],_0x8bcf08),_0x288f7f=_0x7df633===undefined||_0x686276<-0x486*0x5+-0x1*-0x1ab1+-0x413?undefined:{'entry':_0x7df633,'score':_0x686276},_0x4cd7d4=new RankedCandidateHeap(_0x200a10+(-0x1*0x13c2+0x80c+0xbb7));for(const _0x3ab722 of this[_0x12930f(0x27d)]){if(!_0x15c743&&_0x3ab722[_0x12930f(0x232)]!==_0x12930f(0x2a0))continue;const _0x5ec82c=fuzzyPathScore(_0x3ab722[_0x12930f(0x2a2)],_0x8bcf08);if(_0x5ec82c<0x1ec3+0x3a5+-0x2268)continue;const _0x48c727={'entry':_0x3ab722,'score':_0x5ec82c};if(_0x288f7f!==undefined&&compareRankedCandidate(_0x48c727,_0x288f7f)<=0x1353+0x1c32+-0x2f85)continue;_0x4cd7d4[_0x12930f(0x1c0)](_0x48c727);}const _0x40ec77=_0x4cd7d4[_0x12930f(0x1cf)](),_0x26f946=_0x40ec77[_0x12930f(0x190)](0x520+-0xe0a+0x8ea,_0x200a10)[_0x12930f(0x1f1)](_0x2abcb5=>_0x2abcb5[_0x12930f(0x1ac)]),_0x5bb4bf=_0x40ec77[_0x200a10]?.[_0x12930f(0x1ac)][_0x12930f(0x2a2)];return{'entries':_0x26f946,'nextCursor':_0x5bb4bf===undefined?null:encodeSearchCursor(_0x8bcf08,_0x26f946['at'](-(0x9d*0x2b+0x241a*-0x1+0x9bc))?.[_0x12930f(0x2a2)]??_0x1879a4??''),'truncated':_0x5bb4bf!==undefined||this[_0x12930f(0x253)]};}async[_0x29cc70(0x192)](){const _0x57add3=_0x29cc70;if(!this[_0x57add3(0x222)]&&this[_0x57add3(0x270)]!==undefined){if(Date[_0x57add3(0x20c)]()-this[_0x57add3(0x236)]>=(this[_0x57add3(0x1fd)][_0x57add3(0x1c9)]??FILE_INDEX_FRESHNESS_TTL_MS))this[_0x57add3(0x2a9)]();return;}this[_0x57add3(0x2b9)]===undefined&&(this[_0x57add3(0x2b9)]=this[_0x57add3(0x28b)]()[_0x57add3(0x233)](()=>{const _0x481bfe=_0x57add3;this[_0x481bfe(0x2b9)]=undefined;})),await this[_0x57add3(0x2b9)];}[_0x29cc70(0x1ba)](){const _0x1b707f=_0x29cc70;if(this[_0x1b707f(0x282)]!==undefined)clearTimeout(this[_0x1b707f(0x282)]);this[_0x1b707f(0x282)]=setTimeout(()=>this[_0x1b707f(0x20f)](),this[_0x1b707f(0x1fd)][_0x1b707f(0x1dd)]??FILE_INDEX_IDLE_TTL_MS),this[_0x1b707f(0x282)][_0x1b707f(0x21f)]();}async[_0x29cc70(0x28b)](){const _0x480ada=_0x29cc70,_0x3055cc=await resolveRegisteredWorkspaceRoot(this[_0x480ada(0x1cb)]),_0x45db4a=[...DEFAULT_QUICK_OPEN_EXCLUDES,...await workspaceExcludePatterns(_0x3055cc)],_0x420058=[],_0x5439d5=this[_0x480ada(0x1fd)][_0x480ada(0x24b)]??FILE_INDEX_ENTRY_LIMIT;let _0x2a82de=![];const _0x46bb69=['.'];let _0x2677c6=-0x42f*0x4+-0x3bd+0x1479*0x1;while(_0x2677c6<_0x46bb69[_0x480ada(0x1c3)]&&!_0x2a82de){const _0x2d1bc3=_0x46bb69[_0x2677c6];_0x2677c6+=-0xd32+-0x2*-0x70a+-0xe1;const _0x14f685=await resolveWorkspaceEntryFromCanonicalRoot(_0x3055cc,_0x2d1bc3,!![])[_0x480ada(0x19c)](()=>undefined);if(_0x14f685===undefined)continue;const _0x4e2e48=await opendir(_0x14f685)[_0x480ada(0x19c)](()=>undefined);if(_0x4e2e48===undefined)continue;let _0x441868=[];const _0x3cbb8e=async()=>{const _0x1b688d=_0x480ada,_0x14d3b7=await Promise[_0x1b688d(0x191)](_0x441868);_0x441868=[];for(const _0x52fcac of _0x14d3b7){if(_0x52fcac===undefined)continue;if(_0x52fcac[_0x1b688d(0x2a2)]===_0x1b688d(0x1ef)||_0x52fcac[_0x1b688d(0x2a2)][_0x1b688d(0x28c)](_0x1b688d(0x261))||isExcluded(_0x52fcac[_0x1b688d(0x2a2)],_0x45db4a))continue;if(_0x52fcac[_0x1b688d(0x232)]===_0x1b688d(0x217))_0x46bb69[_0x1b688d(0x21a)](_0x52fcac[_0x1b688d(0x2a2)]);_0x420058[_0x1b688d(0x21a)](_0x52fcac);if(_0x420058[_0x1b688d(0x1c3)]>=_0x5439d5){_0x2a82de=!![];break;}}};for await(const _0x2ea07c of _0x4e2e48){const _0x5f45a5=_0x2d1bc3==='.'?_0x2ea07c[_0x480ada(0x1db)]:posix[_0x480ada(0x24f)](_0x2d1bc3[_0x480ada(0x278)]('\x5c','/'),_0x2ea07c[_0x480ada(0x1db)]);if(_0x5f45a5===_0x480ada(0x1ef)||_0x5f45a5[_0x480ada(0x28c)](_0x480ada(0x261))||isExcluded(_0x5f45a5,_0x45db4a))continue;_0x441868[_0x480ada(0x21a)](inspectWorkspaceIndexEntry(_0x3055cc,_0x5f45a5,_0x2ea07c[_0x480ada(0x1db)]));if(_0x441868[_0x480ada(0x1c3)]>=FILE_INDEX_METADATA_CONCURRENCY)await _0x3cbb8e();if(_0x2a82de)break;}if(!_0x2a82de&&_0x441868[_0x480ada(0x1c3)]>-0x1*-0x679+-0x2*-0xaee+-0x1c55)await _0x3cbb8e();}this[_0x480ada(0x270)]=_0x3055cc,this[_0x480ada(0x27d)]=_0x420058,this[_0x480ada(0x253)]=_0x2a82de,this[_0x480ada(0x222)]=![],this[_0x480ada(0x1de)]=Date[_0x480ada(0x20c)](),this[_0x480ada(0x236)]=this[_0x480ada(0x1de)];}[_0x29cc70(0x2a9)](){const _0x26d09f=_0x29cc70;if(this[_0x26d09f(0x2b9)]!==undefined)return;this[_0x26d09f(0x236)]=Date[_0x26d09f(0x20c)](),this[_0x26d09f(0x2b9)]=this[_0x26d09f(0x28b)]()[_0x26d09f(0x19c)](()=>undefined)[_0x26d09f(0x233)](()=>{const _0x227535=_0x26d09f;this[_0x227535(0x2b9)]=undefined;});}}async function workspaceExcludePatterns(_0x4c24e6){const _0xb456b3=_0x29cc70,_0x244774=resolve(_0x4c24e6,_0xb456b3(0x220)),_0x2afc93=await readFile(_0x244774,_0xb456b3(0x288))[_0xb456b3(0x246)](JSON[_0xb456b3(0x250)])[_0xb456b3(0x19c)](()=>undefined);if(typeof _0x2afc93!==_0xb456b3(0x227)||_0x2afc93===null)return[];return[_0xb456b3(0x1f8),_0xb456b3(0x1a3)][_0xb456b3(0x256)](_0x55ec0e=>{const _0x5d5796=_0xb456b3,_0x3b08a6=_0x2afc93[_0x55ec0e];return typeof _0x3b08a6===_0x5d5796(0x227)&&_0x3b08a6!==null?Object[_0x5d5796(0x27d)](_0x3b08a6)[_0x5d5796(0x256)](([_0x2ce70d,_0x30b970])=>_0x30b970===!![]?[_0x2ce70d]:[]):[];});}function isExcluded(_0x3accc6,_0x14d9a2){const _0x1c9b15=_0x29cc70;return _0x14d9a2[_0x1c9b15(0x1fe)](_0x54ff36=>minimatch(_0x3accc6,_0x54ff36,{'dot':!![],'nocase':_0x292b67()!==_0x1c9b15(0x223)})||minimatch(_0x3accc6+'/',_0x54ff36,{'dot':!![],'nocase':_0x292b67()!==_0x1c9b15(0x223)}));}function compareRankedCandidate(_0x238c6d,_0x49b102){const _0x431218=_0x29cc70;return _0x49b102[_0x431218(0x275)]-_0x238c6d[_0x431218(0x275)]||_0x238c6d[_0x431218(0x1ac)][_0x431218(0x2a2)][_0x431218(0x1ce)](_0x49b102[_0x431218(0x1ac)][_0x431218(0x2a2)]);}class RankedCandidateHeap{[_0x29cc70(0x19f)];[_0x29cc70(0x1df)]=[];constructor(_0x5ca896){const _0x5dee8c=_0x29cc70;this[_0x5dee8c(0x19f)]=_0x5ca896;}[_0x29cc70(0x1c0)](_0x165b3e){const _0x3167a2=_0x29cc70;if(this[_0x3167a2(0x1df)][_0x3167a2(0x1c3)]<this[_0x3167a2(0x19f)]){this[_0x3167a2(0x1df)][_0x3167a2(0x21a)](_0x165b3e),this[_0x3167a2(0x2af)](this[_0x3167a2(0x1df)][_0x3167a2(0x1c3)]-(0x1*0x2395+-0x1455+0x3*-0x515));return;}if(compareRankedCandidate(_0x165b3e,this[_0x3167a2(0x1df)][-0x14*-0x2d+-0x6e2+-0x35e*-0x1])>=-0x11e1*0x1+-0x88+0x1269)return;this[_0x3167a2(0x1df)][0x622+-0x4*0x43f+-0xada*-0x1]=_0x165b3e,this[_0x3167a2(0x2b2)](-0x11d*-0x1c+0x1471+-0x339d*0x1);}[_0x29cc70(0x1cf)](){const _0x20aecd=_0x29cc70;return[...this[_0x20aecd(0x1df)]][_0x20aecd(0x24a)](compareRankedCandidate);}[_0x29cc70(0x2af)](_0x48f688){const _0xcd2f3=_0x29cc70;let _0x4562d9=_0x48f688;while(_0x4562d9>-0x1*0x136b+0x1*0xded+0x57e){const _0x23f10a=Math[_0xcd2f3(0x1f2)]((_0x4562d9-(-0x2182+-0x1*0x1bd9+0x3d5c))/(-0x14e9+0x1*0x1cf4+-0x809));if(compareRankedCandidate(this[_0xcd2f3(0x1df)][_0x4562d9],this[_0xcd2f3(0x1df)][_0x23f10a])<=-0xf*0xe9+-0x1e7a+0x2c21)break;[this[_0xcd2f3(0x1df)][_0x4562d9],this[_0xcd2f3(0x1df)][_0x23f10a]]=[this[_0xcd2f3(0x1df)][_0x23f10a],this[_0xcd2f3(0x1df)][_0x4562d9]],_0x4562d9=_0x23f10a;}}[_0x29cc70(0x2b2)](_0x20e345){const _0x177324=_0x29cc70;let _0x5b012e=_0x20e345;while(!![]){const _0x35d9ae=_0x5b012e*(-0xf58+-0x52*-0x3d+0x2*-0x218)+(-0x10b3+-0x4f*-0x6f+-0x1*0x118d);if(_0x35d9ae>=this[_0x177324(0x1df)][_0x177324(0x1c3)])return;const _0x330740=_0x35d9ae+(-0x47e+0x11*0x105+0x2*-0x66b),_0x2b42c4=_0x330740<this[_0x177324(0x1df)][_0x177324(0x1c3)]&&compareRankedCandidate(this[_0x177324(0x1df)][_0x330740],this[_0x177324(0x1df)][_0x35d9ae])>-0x323+0x4f*0x6+0x149?_0x330740:_0x35d9ae;if(compareRankedCandidate(this[_0x177324(0x1df)][_0x2b42c4],this[_0x177324(0x1df)][_0x5b012e])<=0x1a3c+0x1283+-0x1*0x2cbf)return;[this[_0x177324(0x1df)][_0x5b012e],this[_0x177324(0x1df)][_0x2b42c4]]=[this[_0x177324(0x1df)][_0x2b42c4],this[_0x177324(0x1df)][_0x5b012e]],_0x5b012e=_0x2b42c4;}}}function _0x28d1(_0x3261d1,_0x31720e){_0x3261d1=_0x3261d1-(-0xf98+0x1dc3+-0xc9c);const _0x54cc97=_0x2e1c();let _0x4952a0=_0x54cc97[_0x3261d1];if(_0x28d1['mgQWTb']===undefined){var _0x53e0c3=function(_0x5484f7){const _0x98d848='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x19b3ac='',_0x7d6c91='';for(let _0x4560df=-0x14ba+-0xbc2+0x207c,_0x11d910,_0x2070c6,_0x4de6a9=-0x1*-0x26ef+-0x1*0xe1a+0xa3*-0x27;_0x2070c6=_0x5484f7['charAt'](_0x4de6a9++);~_0x2070c6&&(_0x11d910=_0x4560df%(-0x1*0x80c+0x2303+-0x1*0x1af3)?_0x11d910*(0x952*0x1+0xb41+0xb*-0x1d9)+_0x2070c6:_0x2070c6,_0x4560df++%(0xfd4*0x2+0x86a+-0x280e))?_0x19b3ac+=String['fromCharCode'](0x1*0x11e9+-0xe38+0xe6*-0x3&_0x11d910>>(-(-0x1f4*0xe+-0x24c7+-0x1*-0x4021)*_0x4560df&-0x13bb+-0x8b*0x43+0x3822)):-0x25f1+-0x6bd+0x1657*0x2){_0x2070c6=_0x98d848['indexOf'](_0x2070c6);}for(let _0x11e4a2=0x167*-0x3+-0x3c6+0x1*0x7fb,_0x333953=_0x19b3ac['length'];_0x11e4a2<_0x333953;_0x11e4a2++){_0x7d6c91+='%'+('00'+_0x19b3ac['charCodeAt'](_0x11e4a2)['toString'](-0x126*-0xa+0x3e8*-0x4+0x21a*0x2))['slice'](-(-0x36*-0x50+-0x1850+0x3b9*0x2));}return decodeURIComponent(_0x7d6c91);};_0x28d1['TcXnUr']=_0x53e0c3,_0x28d1['NXAZPo']={},_0x28d1['mgQWTb']=!![];}const _0x30d6d2=_0x54cc97[0xb27+0x3*-0xc01+-0x18dc*-0x1];_0x28d1['SHvEav']!==_0x30d6d2&&(_0x28d1['NXAZPo']={},_0x28d1['SHvEav']=_0x30d6d2);const _0x50f449=_0x28d1['NXAZPo'][_0x3261d1];return _0x50f449===undefined?(_0x4952a0=_0x28d1['TcXnUr'](_0x4952a0),_0x28d1['NXAZPo'][_0x3261d1]=_0x4952a0):_0x4952a0=_0x50f449,_0x4952a0;}function fuzzyPathScore(_0x5ad7c3,_0x5fe928){const _0x5e2e56=_0x29cc70,_0x407971=_0x5ad7c3[_0x5e2e56(0x28e)](),_0x8673ba=_0x5fe928[_0x5e2e56(0x22b)]()[_0x5e2e56(0x28e)]();let _0x214d0a=0xf2f+0x1b01+0xf0*-0x2d,_0x50014a=0x349*0xa+0x9cd+-0x2aa7,_0x2f0a2f=-(-0x2*0xe1b+0x116b+0x1*0xacd);for(const _0x2ce5ff of _0x8673ba){const _0x16f3a5=_0x407971[_0x5e2e56(0x1fc)](_0x2ce5ff,_0x214d0a);if(_0x16f3a5===-(0x98d+0x167b*-0x1+-0x2b*-0x4d))return-(0x159a+-0xdd8+-0x7c1);_0x50014a+=_0x16f3a5===_0x2f0a2f+(0x1*-0x212b+0x8c5*0x1+0x1867)?0x1*-0x1511+-0x1256+0x1*0x2773:0x1d3*0x14+0x7*0xa0+0x28db*-0x1;if(_0x16f3a5===0x154f+0x1*-0xaf6+0xa59*-0x1||_0x5e2e56(0x1d0)[_0x5e2e56(0x262)](_0x407971[_0x16f3a5-(0x1193+-0xa97*-0x2+-0x26c0)]??''))_0x50014a+=-0x9*-0x27+0x18a+-0x2e1;_0x2f0a2f=_0x16f3a5,_0x214d0a=_0x16f3a5+(0xb35+0x2f*0x6b+-0x1ed9);}const _0x7b7add=_0x5ad7c3[_0x5e2e56(0x190)](_0x5ad7c3[_0x5e2e56(0x19a)]('/')+(0x2*0x1229+-0x25b4+-0x163*-0x1))[_0x5e2e56(0x28e)]();if(_0x7b7add[_0x5e2e56(0x262)](_0x8673ba))_0x50014a+=0x1c26+0x1*-0x1d7b+-0x17d*-0x1;else{if(_0x407971[_0x5e2e56(0x262)](_0x8673ba))_0x50014a+=0xcd0+0x1*0x21e5+0x1*-0x2ea5;}return _0x50014a-_0x5ad7c3[_0x5e2e56(0x1c3)]/(-0xd*-0x2cc+-0x22d5*-0x1+-0x4349);}export async function listWorkspaceDirectories(_0x359b73,_0x2fa026,_0x4de58e=homedir()){const _0x326fa2=_0x29cc70,_0x784bd3=await realpath(_0x4de58e),_0x388e9b=await Promise[_0x326fa2(0x191)](_0x2fa026[_0x326fa2(0x1f1)](_0x13dcf5=>realpath(_0x13dcf5))),_0x1c86c5=[...new Set([_0x784bd3,..._0x388e9b])],_0x4de2bf=_0x359b73===undefined?_0x388e9b[-0x2203+0xb7f*0x1+0x1684]??_0x784bd3:await realpath(_0x359b73),_0x1f380a=await stat(_0x4de2bf);if(!_0x1f380a[_0x326fa2(0x265)]()||!isWithinAllowedRoot(_0x4de2bf,_0x1c86c5))throw new Error(_0x326fa2(0x2a3));const _0x2af6c0=await readdir(_0x4de2bf,{'withFileTypes':!![]}),_0x20213d=[];for(const _0x20d75e of _0x2af6c0[_0x326fa2(0x24a)]((_0x96110c,_0x2859ec)=>_0x96110c[_0x326fa2(0x1db)][_0x326fa2(0x1ce)](_0x2859ec[_0x326fa2(0x1db)]))){if(!_0x20d75e[_0x326fa2(0x265)]()&&!_0x20d75e[_0x326fa2(0x1b8)]())continue;const _0x4c134a=await realpath(resolve(_0x4de2bf,_0x20d75e[_0x326fa2(0x1db)]))[_0x326fa2(0x19c)](()=>undefined);if(_0x4c134a===undefined||!isWithinAllowedRoot(_0x4c134a,_0x1c86c5))continue;const _0x1745ee=await stat(_0x4c134a)[_0x326fa2(0x19c)](()=>undefined);if(_0x1745ee===undefined||!_0x1745ee[_0x326fa2(0x265)]())continue;_0x20213d[_0x326fa2(0x21a)]({'path':_0x4c134a,'name':_0x20d75e[_0x326fa2(0x1db)],'selectable':isWithinAllowedRoot(_0x4c134a,_0x388e9b)});if(_0x20213d[_0x326fa2(0x1c3)]>DIRECTORY_PICKER_LIMIT)break;}const _0x3ecfaf=dirname(_0x4de2bf);return{'homePath':_0x784bd3,'currentPath':_0x4de2bf,'parentPath':_0x3ecfaf===_0x4de2bf||!isWithinAllowedRoot(_0x3ecfaf,_0x1c86c5)?null:_0x3ecfaf,'browseRoots':_0x388e9b,'selectable':isWithinAllowedRoot(_0x4de2bf,_0x388e9b),'entries':_0x20213d[_0x326fa2(0x190)](0x1*0xf76+0xf*-0xaf+-0x535*0x1,DIRECTORY_PICKER_LIMIT),'truncated':_0x20213d[_0x326fa2(0x1c3)]>DIRECTORY_PICKER_LIMIT};}export async function listWorkspaceFiles(_0x5be896,_0x814eda='.',_0x288a2d,_0x4a1378=DIRECTORY_PAGE_LIMIT){const _0x4fb4bf=_0x29cc70;if(!Number[_0x4fb4bf(0x1eb)](_0x4a1378)||_0x4a1378<0x1*0xf8c+-0x1*0x20cf+0x1144||_0x4a1378>DIRECTORY_PAGE_LIMIT)throw new Error(_0x4fb4bf(0x266));const _0x53467b=await resolveRegisteredWorkspaceRoot(_0x5be896),_0x51b639=await resolveWorkspaceEntryFromCanonicalRoot(_0x53467b,_0x814eda,!![]),_0x5c4b7d=await readdir(_0x51b639,{'withFileTypes':!![]}),_0x3ab1e6=decodeDirectoryCursor(_0x288a2d,_0x814eda),_0xf9af7c=_0x5c4b7d[_0x4fb4bf(0x1fb)](_0x26fcd5=>_0x26fcd5[_0x4fb4bf(0x1db)]!==_0x4fb4bf(0x1ef)&&!isWorkspaceUploadTemporaryName(_0x26fcd5[_0x4fb4bf(0x1db)]))[_0x4fb4bf(0x1f1)](_0x5a229b=>_0x5a229b[_0x4fb4bf(0x1db)])[_0x4fb4bf(0x24a)]((_0x502d96,_0x5ae9e8)=>_0x502d96[_0x4fb4bf(0x1ce)](_0x5ae9e8)),_0x2d3a00=_0x3ab1e6===undefined?-0xe70+0x286*-0xa+0x4*0x9eb:_0xf9af7c[_0x4fb4bf(0x210)](_0x3a41d0=>_0x3a41d0>_0x3ab1e6);if(_0x3ab1e6!==undefined&&_0x2d3a00===-(0x2*0x819+-0xfa1*0x2+0xf11))return{'entries':[],'nextCursor':null,'truncated':![]};const _0x3ad3d2=_0xf9af7c[_0x4fb4bf(0x190)](_0x2d3a00,_0x2d3a00+_0x4a1378),_0x7ebd76=[];for(const _0x5f15e5 of _0x3ad3d2){const _0x1034a0=await resolveWorkspaceEntry(_0x53467b,relative(_0x53467b,resolve(_0x51b639,_0x5f15e5)),![])[_0x4fb4bf(0x19c)](_0x58e7ff=>{if(isSkippableWorkspaceEntryError(_0x58e7ff))return undefined;throw _0x58e7ff;});if(_0x1034a0===undefined)continue;const _0x488df8=await lstat(_0x1034a0)[_0x4fb4bf(0x19c)](_0x1f902f=>{const _0x1b1d1a=_0x4fb4bf;if(_0x1f902f[_0x1b1d1a(0x28f)]===_0x1b1d1a(0x231))return undefined;throw _0x1f902f;});if(_0x488df8===undefined||!_0x488df8[_0x4fb4bf(0x257)]()&&!_0x488df8[_0x4fb4bf(0x265)]())continue;_0x7ebd76[_0x4fb4bf(0x21a)]({'path':relative(_0x53467b,_0x1034a0)[_0x4fb4bf(0x1f4)](sep)[_0x4fb4bf(0x24f)]('/'),'name':_0x5f15e5,'kind':_0x488df8[_0x4fb4bf(0x265)]()?_0x4fb4bf(0x217):_0x4fb4bf(0x2a0),'size':_0x488df8[_0x4fb4bf(0x257)]()?_0x488df8[_0x4fb4bf(0x281)]:null,'modifiedAt':_0x488df8[_0x4fb4bf(0x211)]});}const _0x310825=_0xf9af7c[_0x2d3a00+_0x3ad3d2[_0x4fb4bf(0x1c3)]];return{'entries':_0x7ebd76,'nextCursor':_0x310825===undefined||_0x3ad3d2[_0x4fb4bf(0x1c3)]===-0x83e*0x3+-0x2*0x127d+0x3db4?null:encodeDirectoryCursor(_0x814eda,_0x3ad3d2[_0x3ad3d2[_0x4fb4bf(0x1c3)]-(0x1a19+0x9f0+-0x8*0x481)]),'truncated':_0x310825!==undefined};}export async function mutateWorkspaceFile(_0xc1d377,_0x1f46f7){const _0xe20a79=_0x29cc70,_0x15adb9=await resolveRegisteredWorkspaceRoot(_0xc1d377);if(_0x1f46f7[_0xe20a79(0x226)]===_0xe20a79(0x294)||_0x1f46f7[_0xe20a79(0x226)]===_0xe20a79(0x22a)){const _0x5aacd5=await resolveNewWorkspaceEntry(_0x15adb9,_0x1f46f7[_0xe20a79(0x2a2)]);if(_0x1f46f7[_0xe20a79(0x226)]===_0xe20a79(0x294))await writeFile(_0x5aacd5,'',{'flag':'wx'});else await mkdir(_0x5aacd5);return{'path':workspaceRelativePath(_0x15adb9,_0x5aacd5)};}await assertWorkspaceMutationPathHasNoSymlinks(_0x15adb9,_0x1f46f7[_0xe20a79(0x2a2)]);const _0x38f8f4=await resolveWorkspaceEntryMetadata(_0x15adb9,_0x1f46f7[_0xe20a79(0x2a2)]);if(workspaceRelativePath(_0x15adb9,_0x38f8f4[_0xe20a79(0x2a2)])==='.')throw new Error(_0xe20a79(0x199));if(_0x1f46f7[_0xe20a79(0x226)]===_0xe20a79(0x1f9))return await rm(_0x38f8f4[_0xe20a79(0x2a2)],{'recursive':_0x38f8f4[_0xe20a79(0x23a)][_0xe20a79(0x265)](),'force':![]}),{'deleted':!![]};const _0x1774da=await resolveNewWorkspaceEntry(_0x15adb9,_0x1f46f7[_0xe20a79(0x285)]);if(_0x38f8f4[_0xe20a79(0x23a)][_0xe20a79(0x265)]()){const _0x367049=relative(_0x38f8f4[_0xe20a79(0x2a2)],_0x1774da);if(_0x367049===''||!isAbsolute(_0x367049)&&_0x367049!=='..'&&!_0x367049[_0xe20a79(0x28c)]('..'+sep))throw new Error(_0xe20a79(0x1bc));}return await rename(_0x38f8f4[_0xe20a79(0x2a2)],_0x1774da),{'path':workspaceRelativePath(_0x15adb9,_0x1774da)};}function _0x2e1c(){const _0x4b6952=['Aw5KzxHpzG','BgLTAxrZ','C29Tzq','kIOVlNn2zwX0zs1RAxqVkIO','su5wquXjrf9oqu1f','Chj1BMfIBguG','C3rYAw5NAwz5','ls1XDwLLDa','kIOVlNbUCg0VkIO','ls10B3bVlw9YzgvY','ntuWodyWq3PHBNDm','kIOVDMvUzg9YlYOQ','rKLmrv9ot1rFvevyva','v09ss1nqqunfx1bbveHFsu5wquXjra','Dg9tDhjPBMC','Dgv4Da','BM93','CMvZDg9Yzq','v09ss1nqqunfx0rjuKvdve9swv9oqu1fx0LovKfmsuq','zgLZCg9Zzq','zMLUzeLUzgv4','BxrPBwvnCW','r0Lux1jfrL9jtLzbteLe','D2LUmZi','CMvSyxrPDMu','u1rbr0ve','lNbHCNq','reLsrunut1jz','v09ss1nqqunfx0rfvKLdrv9qqvrix1jfsKvdveve','A2LSBa','ChvZAa','yNL0zuXLBMD0Aa','kIOVzgLZDc8QkG','kIOVlMfUz3vSyxiVkIO','BwvYz2uTyMfZzq','Dw5Yzwy','lNzZy29Kzs9Zzxr0Aw5NCY5QC29U','r0Lux1DpuKTtuefdrq','C3rHBgu','BgLUDxG','Dg9mB3DLCKnHC2u','ruvysvnu','ywn0Aw9U','B2jQzwn0','yMfZzty0','C2HPzNq','q1jfqvrfx0rjuKvdve9swq','DhjPBq','Chj1BMfIBgu','CgLK','sevbrca','AgfZAa','ls1LEgnSDwrLlxn0yw5KyxjK','ru5pru5u','A2LUza','zMLUywXSEq','rvHju1rtx0rjuKvdve9swq','kIOVlM5LEhqVkIO','CMvMCMvZAef0DgvTChrLzef0','qureruq','r0Lux1DpuKTuuKvfx0Xju1rFsu5wquXjra','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','Bwv0ywrHDge','CxvLCNK','B2zMC2v0','DxbKyxrL','zgLMzG','DgLTzw91De1Z','B25Jzq','B3v0Chv0tgLTAxq','oIHSAxrLCMfSkq','zgLNzxn0','Bg9N','rKLmrv9ot1rFreLsrunut1jz','DgHLBG','ls13B3jRDhjLzq','ls1ZDgfNzwq','tu9esuzjruq','C29YDa','zw50CNLmAw1PDa','ls1UBY10zxH0y29UDG','yMLUyxj5igrPzMyGC2HHmJu2pq','CMvMCY9OzwfKCW','AM9PBG','CgfYC2u','ls1ICMfUy2G','CMvHza','Dhj1BMnHDgvK','kIOVlMDYywrSzs8QkG','BM9YBwfSAxPL','zMXHDe1HCa','AxngAwXL','kIOVB2jQlYOQ','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','ls1UBY1PBMrLEa','mtG2odi5nK5NBvjWEa','uKvbrfK','Bg9JA2vK','kIOVy292zxjHz2uVkIO','B3v0Chv0','DxrMltG','lMDPDc8','Aw5JBhvKzxm','DgvZDa','zNjVBq','AxneAxjLy3rVCNK','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','CMvMCW','uKvoqu1fra','kIOVlNr1CMjVlYOQ','lM1HCI11CgXVywqT','zxHLyW','kIOVyM93zxjFy29TCg9Uzw50CY8QkG','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','lI4U','C2HHmJu2','CM9VDa','y3vYC29Y','BgLZDa','ls1Uyw1Llxn0yxr1CW','CMvMCY9OzwfKCY8','C2nVCMu','r0Lux1jfue9tsvrpuLLFsu5wquXjra','kIOVlM51EhqVkIO','CMvWBgfJzufSBa','rKLmrv9xuKLurv9dt05gteLdva','rKLmrv9ut09Ftefsr0u','q09qsuve','kIOVlNbHCMnLBc1JywnOzs8QkG','zw50CMLLCW','C3rYAw5N','rKLmrv9srvzju0LptL9jtLzbteLe','kIOVlNLHCM4VkIO','C2L6zq','zxHWAxj5vgLTzxi','zxjYB3i','ls1ZA2LWpq','zgvZDgLUyxrPB24','AwDUB3jL','nJK1mtuXse9rEhL1','DxrMoa','y2HHBMDLCW','yMfYzq','CMvIDwLSza','C3rHCNrZv2L0Aa','kIOVyNvPBgqVkIO','Dg9mB2nHBgvmB3DLCKnHC2u','y29Kzq','v09ss1nqqunfx0rjuKvdve9swv9fweLtvfm','kIOVlNzLBNyVkIO','C3LTyM9SAwmTCMvM','BwvZC2fNzq','q1jfqvrfx0zjteu','kIOVDgvZDc9YDw5ZlYOQ','C2v0','yMLUyxj5','lM1HCI1LzgL0lq','l2rLDI9UDwXS','CMvMCY9Yzw1VDgvZlW','BgLTAxq','mteXmJq1nJfTwvL2Afa','y29UDgvUDenHBMrPzgf0zxm','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','Bw9Kzq','rKLmrq','rKLmrv9ot1rFrK9vtKq','Cgf0Aa','v09ss1nqqunfx0rjuKvdve9swv9ot1rFquXmt1Dfra','nta0odu1mgTrANvAvG','v09ss1nqqunfx1bmqvrgt1jnx1vou1vque9sveve','C3vIBw9KDwXL','v09ss1nqqunfx1bbveHFtK9ux0fcu09mvvrf','vu5tvefhruq','CMvMCMvZAeLUqMfJA2DYB3vUza','ls1WB3jJzwXHAw49DJe','uKvnt1rf','ls1KyxrLlw9YzgvY','zxzLCNK','Dg9vChbLCKnHC2u','yNvIyMXLvxa','CMvHze9UBhK','kIOVyMLUlYOQ','C2LUA0rVD24','BhmTzMLSzxm','kIOVB3v0lYOQ','ls1UBY1JB21TAxqTAwq','y2XVC2u','ls1WB3jJzwXHAw4','kIOVx19WEwnHy2HLx18VkIO','Bg9HzgLUzW','pZ8G','rKLmrv9ot1rFuKvhvuXbuG','z2L0','ls1ICMfUy2HLCW','C2XPy2u','ywXS','zw5ZDxjLtg9HzgvK','ls11BNrYywnRzwqTzMLSzxm9ywXS','y29Uy2f0','rvHju1rtx0zjteu','Agv4','Bg9JA2vKia','z2v0','rKLmrv9st09ux01vvefusu9ox0LovKfmsuq','BgfZDeLUzgv4t2y','CgXHDgzVCM0','y2f0y2G','ls1YB290','te9dquW','y2fWywnPDhK','CgLWzq','yNjHBMnOia','C3rKB3v0','C2vHCMnOlMv4y2X1zgu','AxnjBNrLz2vY','zMLUza','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','ls1Yzw1VDgvZ','C2vHCMnO','ls1Yzwn1CNnPDMu','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','yMXVyG','zw50CNK','zM9YlwvHy2GTCMvM','ls1ZB3vYy2u9sevbra','vfLqrv9dsefor0ve','C3rHDhvZ','y2f0lwzPBgu','ls1UBY1LEhqTzgLMzG','u0Lhs0Lmta','yMfZzty0DxjS','rKLmrv9squ5hrv9jtLzbteLe','CMvMCY9Yzw1VDgvZ','C2HVDW','AxntEw1IB2XPy0XPBMS','vu5uuKfds0ve','Dg91y2G','mtaWnJqZmw9zC09yDq','rKLmrv9nt1zfx0rfu0nftKrbtLrFsu5wquXjra','kIOVlMDPDc8QkG','igj5DgvZpq','ls1MB3jTyxq9','ywrK','C3rKzxjY','ndu0otuXmeLttKrozq','BgvUz3rO','sevbra','revmrvrfra','ls1ZAg9YDa','kIOVlMnHy2HLlYOQ','kIOVDMvUDI8QkG','zNjLC2HUzxnZvhrStxm','zgf0yq','D29YA3nWywnLuM9VDa','ls12zxjPzNK','kIOVBM9Kzv9TB2r1BgvZlYOQ','Bg9JywXLq29TCgfYzq','C29YDgvK','lY5Flq','iYmG','ls1ZAg93lxrVCgXLDMvS','v09ss1nqqunfx05pvf9bteXpv0ve','Bwf4','AxnbyNnVBhv0zq','Aw52ywXPza','r0Lux0nptu1btKrFrKfjteve','rKLmrv9qqvrix0vtq0fqrq','D29YA3rYzwu','ls1VDgHLCNm','BMfTzq','BwLU','AwrSzvr0Be1Z','CMvMCMvZAgvKqxq','DMfSDwvZ','zMLUz2vYChjPBNq','ls1ZAg93lxn1CgvYChjVAMvJDc13B3jRAw5NlxrYzwu','ls1MAxjZDc1WyxjLBNq','zgLMzI10CMvL','qMLUyxj5igzPBgvZia','zgvJB2rL','C3vIyxjYyxK','ls1PCY1HBMnLC3rVCG','ls1MB3jTyxq9jsHYzwzUyw1LksuWosuOCMvMBMfTztPZAg9YDcKLmdKLkg9IAMvJDg5HBwuPjta5jsHirufeksuWosuOC3LTCMvMkq','ls1TyxGTy291BNq9','ywXSB2nvBNnHzMu','AxntywzLsw50zwDLCG','CMv2lxbHCNnL','D29YA3rYzwuG','AgfZ','lMDPDa','CMvWBgfJzq','BwfW','zMXVB3i','ls1MB3jTyxq9juGLEdaWjvaLEdaWjwfUjxGWmcvHzsv4mdaLy3qLEdaWjxm','C3bSAxq','kIOVDgfYz2v0lYOQ','rKLmrv9btfjfqurzx0vysvnuuW','ls1NAxqTy29TBw9UlwrPCG','zMLSzxmUzxHJBhvKzq','revmrvrf','zgLZCgXHEu5HBwu','zMLSDgvY'];_0x2e1c=function(){return _0x4b6952;};return _0x2e1c();}async function resolveNewWorkspaceEntry(_0x9eebd4,_0x2b9415){const _0x1e0ac1=_0x29cc70,_0x3b71e9=_0x2b9415[_0x1e0ac1(0x278)]('\x5c','/'),_0x2c6846=_0x3b71e9[_0x1e0ac1(0x1f4)]('/'),_0x461f41=_0x2c6846['at'](-(-0x2*-0x115a+-0xfe0+-0x12d3));if(_0x2b9415[_0x1e0ac1(0x262)]('\x00')||_0x3b71e9[_0x1e0ac1(0x28c)]('/')||isAbsolute(_0x2b9415)||win32[_0x1e0ac1(0x1d5)](_0x3b71e9)||_0x461f41===undefined||_0x461f41[_0x1e0ac1(0x1c3)]===-0x1*0x10d2+0x5f0*0x4+0x2*-0x377||_0x2c6846[_0x1e0ac1(0x1fe)](invalidWorkspaceMutationSegment))throw new Error(_0x1e0ac1(0x1d8));const _0x596962=_0x2c6846[_0x1e0ac1(0x1c3)]===0x1775+-0xb10+0x34*-0x3d?'.':_0x2c6846[_0x1e0ac1(0x190)](0x1869+0x77a+-0x1fe3,-(-0x1d78+-0xd7a+0x2af3))[_0x1e0ac1(0x24f)]('/');await assertWorkspaceMutationPathHasNoSymlinks(_0x9eebd4,_0x596962);const _0x22c352=await resolveWorkspaceEntryFromCanonicalRoot(_0x9eebd4,_0x596962,!![]),_0x535187=resolve(_0x22c352,_0x461f41);try{await lstat(_0x535187);throw new Error(_0x1e0ac1(0x1f6));}catch(_0x1ba871){if(_0x1ba871[_0x1e0ac1(0x28f)]!==_0x1e0ac1(0x231))throw _0x1ba871;}return _0x535187;}async function assertWorkspaceMutationPathHasNoSymlinks(_0x43c72f,_0x7a77a1){const _0x4a104a=_0x29cc70,_0x5e4ae1=_0x7a77a1[_0x4a104a(0x278)]('\x5c','/');if(_0x5e4ae1==='.')return;const _0x13d1e7=_0x5e4ae1[_0x4a104a(0x1f4)]('/');if(_0x7a77a1[_0x4a104a(0x262)]('\x00')||_0x5e4ae1[_0x4a104a(0x28c)]('/')||isAbsolute(_0x7a77a1)||win32[_0x4a104a(0x1d5)](_0x5e4ae1)||_0x13d1e7[_0x4a104a(0x1fe)](invalidWorkspaceMutationSegment))throw new Error(_0x4a104a(0x1d8));let _0x205c39=_0x43c72f;for(const _0x48b3f7 of _0x13d1e7){_0x205c39=resolve(_0x205c39,_0x48b3f7);const _0x4ac267=await lstat(_0x205c39)[_0x4a104a(0x19c)](_0x31e72d=>{const _0xa65c09=_0x4a104a;if(_0x31e72d[_0xa65c09(0x28f)]===_0xa65c09(0x231))throw new Error(_0xa65c09(0x2a1));throw _0x31e72d;});if(_0x4ac267[_0x4a104a(0x1b8)]())throw new Error(_0x4a104a(0x1d8));}}function invalidWorkspaceMutationSegment(_0x58f994){const _0x3e6bbb=_0x29cc70;if(_0x58f994[_0x3e6bbb(0x1c3)]===-0x26*-0x35+-0x178e+0xfb0||_0x58f994==='.'||_0x58f994==='..'||_0x58f994===_0x3e6bbb(0x1ef))return!![];if(_0x292b67()!==_0x3e6bbb(0x213))return![];const _0x5bd459=_0x58f994[_0x3e6bbb(0x1f0)](/[. ]+$/u,'')[_0x3e6bbb(0x2ae)]();return/[<>:"|?*]/u[_0x3e6bbb(0x263)](_0x58f994)||/^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$/u[_0x3e6bbb(0x263)](_0x5bd459);}function workspaceRelativePath(_0x44a18e,_0x31be67){const _0x3d8567=_0x29cc70,_0x55c9a5=relative(_0x44a18e,_0x31be67)[_0x3d8567(0x1f4)](sep)[_0x3d8567(0x24f)]('/');return _0x55c9a5[_0x3d8567(0x1c3)]===-0x2b*0xd3+0x1486*-0x1+0x37f7?'.':_0x55c9a5;}function isSkippableWorkspaceEntryError(_0xabd4f5){const _0x54c8b9=_0x29cc70;return _0xabd4f5 instanceof Error&&(_0xabd4f5[_0x54c8b9(0x293)]===_0x54c8b9(0x1d8)||_0xabd4f5[_0x54c8b9(0x293)]===_0x54c8b9(0x2a1)||_0xabd4f5[_0x54c8b9(0x293)]===_0x54c8b9(0x2bb));}export async function preflightWorkspaceUpload(_0x2eb45d,_0x796e9c,_0x1fb8a8){const _0x388eb9=_0x29cc70;if(_0x1fb8a8[_0x388eb9(0x1c3)]===-0xef*0x11+-0x167b*0x1+0x1*0x265a||_0x1fb8a8==='.'||_0x1fb8a8==='..'||_0x1fb8a8[_0x388eb9(0x262)]('\x00')||_0x1fb8a8[_0x388eb9(0x262)]('/')||_0x1fb8a8[_0x388eb9(0x262)]('\x5c')||isWorkspaceUploadTemporaryName(_0x1fb8a8))return{'path':'','absolutePath':'','status':_0x388eb9(0x200)};const _0x181d3d=await resolveRegisteredWorkspaceRoot(_0x2eb45d),_0x5395e7=await resolveWorkspaceEntry(_0x181d3d,_0x796e9c,!![]),_0x36d2a2=resolve(_0x5395e7,_0x1fb8a8);if(dirname(_0x36d2a2)!==_0x5395e7)throw new Error(_0x388eb9(0x1d8));const _0x1ea53e=relative(_0x181d3d,_0x36d2a2)[_0x388eb9(0x1f4)](sep)[_0x388eb9(0x24f)]('/'),_0x277708=await lstat(_0x36d2a2)[_0x388eb9(0x19c)](_0x5cbe69=>{const _0x6394b0=_0x388eb9;if(_0x5cbe69[_0x6394b0(0x28f)]===_0x6394b0(0x231))return undefined;throw _0x5cbe69;});if(_0x277708===undefined)return{'path':_0x1ea53e,'absolutePath':_0x36d2a2,'status':_0x388eb9(0x25c)};if(_0x277708[_0x388eb9(0x1b8)]())throw new Error(_0x388eb9(0x1d8));if(_0x277708[_0x388eb9(0x257)]())return{'path':_0x1ea53e,'absolutePath':_0x36d2a2,'status':_0x388eb9(0x195)};return{'path':_0x1ea53e,'absolutePath':_0x36d2a2,'status':_0x388eb9(0x234)};}export function workspaceUploadTemporaryName(_0x121bfe){const _0xde5648=_0x29cc70;return _0xde5648(0x26a)+_0x121bfe+_0xde5648(0x216);}function isWorkspaceUploadTemporaryName(_0x2271af){const _0x3de270=_0x29cc70;return/^\.mar-upload-[0-9a-f-]{36}\.part$/iu[_0x3de270(0x263)](_0x2271af)||/^\.mar-edit-[0-9a-f-]{36}\.part$/iu[_0x3de270(0x263)](_0x2271af);}export async function readWorkspaceTextFile(_0x3da08b,_0x166b7c,_0x53de70=0xd1f*-0x1+0x39a+0x985,_0xfb331=FILE_READ_LIMIT){const _0x1c740e=_0x29cc70;if(!Number[_0x1c740e(0x1eb)](_0x53de70)||_0x53de70<0x1c81+-0x25c7+-0x2*-0x4a3||!Number[_0x1c740e(0x1eb)](_0xfb331)||_0xfb331<-0x4*0x178+-0x5af+0xb90||_0xfb331>FILE_READ_LIMIT)throw new Error(_0x1c740e(0x1b5));const _0x14c1f0=await resolveRegisteredWorkspaceRoot(_0x3da08b),_0xf697c6=await resolveWorkspaceEntry(_0x14c1f0,_0x166b7c,![]),_0x1390f7=await lstat(_0xf697c6);if(!_0x1390f7[_0x1c740e(0x257)]())throw new Error(_0x1c740e(0x2bb));if(_0x1390f7[_0x1c740e(0x281)]>FILE_READ_LIMIT*(0x2b7*-0x2+0x1b8*-0x8+-0x6*-0x335))throw new Error(_0x1c740e(0x27a));const _0x3051ac=await readFile(_0xf697c6),_0x484054=createHash(_0x1c740e(0x26f))[_0x1c740e(0x23d)](_0x3051ac)[_0x1c740e(0x243)](_0x1c740e(0x196)),_0x21b174=_0x3051ac[_0x1c740e(0x262)](0x1f99+0x1c94*0x1+-0x4f*0xc3)||!isValidUtf8(_0x3051ac);if(_0x21b174){const _0x2b1df5=Math[_0x1c740e(0x1dc)](_0x3051ac[_0x1c740e(0x1c3)],_0x53de70+_0xfb331),_0x4f789b=_0x3051ac[_0x1c740e(0x1e6)](_0x53de70,_0x2b1df5);return{'path':relative(_0x14c1f0,_0xf697c6)[_0x1c740e(0x1f4)](sep)[_0x1c740e(0x24f)]('/'),'encoding':_0x1c740e(0x228),'size':_0x3051ac[_0x1c740e(0x1c3)],'content':_0x4f789b[_0x1c740e(0x20a)](_0x1c740e(0x228)),'truncated':_0x2b1df5<_0x3051ac[_0x1c740e(0x1c3)],'nextOffset':_0x2b1df5<_0x3051ac[_0x1c740e(0x1c3)]?_0x2b1df5:null,'revision':_0x484054};}if(_0x53de70>-0xc97+0xe*-0x1cf+0x25e9&&_0x53de70<_0x3051ac[_0x1c740e(0x1c3)]&&isUtf8ContinuationByte(_0x3051ac[_0x53de70]))throw new Error(_0x1c740e(0x1b5));let _0x4694bc=Math[_0x1c740e(0x1dc)](_0x3051ac[_0x1c740e(0x1c3)],_0x53de70+_0xfb331);if(_0x4694bc<_0x3051ac[_0x1c740e(0x1c3)]&&isUtf8ContinuationByte(_0x3051ac[_0x4694bc])){while(_0x4694bc>_0x53de70&&isUtf8ContinuationByte(_0x3051ac[_0x4694bc]))_0x4694bc-=0x7ec+-0x417+-0x2*0x1ea;if(_0x4694bc===_0x53de70){_0x4694bc+=-0x13b9+-0xce5*0x3+-0x313*-0x13;while(_0x4694bc<_0x3051ac[_0x1c740e(0x1c3)]&&isUtf8ContinuationByte(_0x3051ac[_0x4694bc]))_0x4694bc+=-0x19c6+-0x214f+0x1d8b*0x2;}}const _0x1dc1b3=_0x3051ac[_0x1c740e(0x1e6)](_0x53de70,_0x4694bc),_0x468bef=new TextDecoder(_0x1c740e(0x260),{'fatal':!![]})[_0x1c740e(0x1e5)](_0x1dc1b3),_0x110230=_0x4694bc<_0x3051ac[_0x1c740e(0x1c3)]?_0x4694bc:null;return{'path':relative(_0x14c1f0,_0xf697c6)[_0x1c740e(0x1f4)](sep)[_0x1c740e(0x24f)]('/'),'encoding':_0x1c740e(0x260),'size':_0x3051ac[_0x1c740e(0x1c3)],'content':_0x468bef,'truncated':_0x110230!==null,'nextOffset':_0x110230,'revision':_0x484054};}export async function writeWorkspaceTextFile(_0xc28e0,_0x13597d,_0x1d3b00,_0x371833){const _0x146615=_0x29cc70;if(!/^[0-9a-f]{64}$/u[_0x146615(0x263)](_0x371833))throw new Error(_0x146615(0x27f));const _0x5ed862=Buffer[_0x146615(0x264)](_0x1d3b00,_0x146615(0x288));if(_0x5ed862[_0x146615(0x1c3)]>FILE_READ_LIMIT*(0x3*-0x125+-0x1478*-0x1+0x18b*-0xb))throw new Error(_0x146615(0x27a));if(_0x5ed862[_0x146615(0x262)](0x3a1*0x8+0x1883+0x5f3*-0x9))throw new Error(_0x146615(0x208));const _0x3196ef=await resolveRegisteredWorkspaceRoot(_0xc28e0);await assertWorkspaceMutationPathHasNoSymlinks(_0x3196ef,_0x13597d);const _0x1c22a8=await resolveWorkspaceEntry(_0x3196ef,_0x13597d,![]),_0x551e40=await lstat(_0x1c22a8);if(!_0x551e40[_0x146615(0x257)]())throw new Error(_0x146615(0x2bb));const _0x52ae27=await readFile(_0x1c22a8);if(_0x52ae27[_0x146615(0x262)](-0x171d+-0x20e1+-0x955*-0x6)||!isValidUtf8(_0x52ae27))throw new Error(_0x146615(0x208));const _0x19c27a=createHash(_0x146615(0x26f))[_0x146615(0x23d)](_0x52ae27)[_0x146615(0x243)](_0x146615(0x196));if(_0x19c27a!==_0x371833)throw new Error(_0x146615(0x279));const _0x3b2cd7=createHash(_0x146615(0x26f))[_0x146615(0x23d)](_0x5ed862)[_0x146615(0x243)](_0x146615(0x196)),_0xb6ab47=resolve(dirname(_0x1c22a8),_0x146615(0x298)+randomUUID()+_0x146615(0x216));try{await writeFile(_0xb6ab47,_0x5ed862,{'flag':'wx','mode':_0x551e40[_0x146615(0x29f)]}),await rename(_0xb6ab47,_0x1c22a8);}finally{await rm(_0xb6ab47,{'force':!![]})[_0x146615(0x19c)](()=>undefined);}return{'path':workspaceRelativePath(_0x3196ef,_0x1c22a8),'revision':_0x3b2cd7,'size':_0x5ed862[_0x146615(0x1c3)]};}export async function readWorkspaceFileContentRange(_0x1b3675,_0x10dfe8,_0x247b86=-0x883+-0x10f9+0x4*0x65f,_0x5e89a0=FILE_READ_LIMIT){const _0x1d2099=_0x29cc70;if(!Number[_0x1d2099(0x1eb)](_0x247b86)||_0x247b86<0xad0*0x2+-0x10df+0x4c1*-0x1||!Number[_0x1d2099(0x1eb)](_0x5e89a0)||_0x5e89a0<0x19a5+-0x5f+0x1*-0x1945||_0x5e89a0>FILE_READ_LIMIT)throw new Error(_0x1d2099(0x1b5));const _0x38bfc7=await resolveRegisteredWorkspaceRoot(_0x1b3675),_0x1a4ab4=await resolveWorkspaceEntry(_0x38bfc7,_0x10dfe8,![]),_0x16b742=await lstat(_0x1a4ab4);if(!_0x16b742[_0x1d2099(0x257)]())throw new Error(_0x1d2099(0x2bb));if(_0x247b86>_0x16b742[_0x1d2099(0x281)])throw new Error(_0x1d2099(0x1b5));const _0x98f29d=Math[_0x1d2099(0x1dc)](_0x5e89a0,_0x16b742[_0x1d2099(0x281)]-_0x247b86),_0x1623d2=Buffer[_0x1d2099(0x1ea)](_0x98f29d),_0xacee63=await open(_0x1a4ab4,'r');try{const {bytesRead:_0x2dbdcd}=await _0xacee63[_0x1d2099(0x252)](_0x1623d2,-0xe1c+-0x980+0x179c,_0x98f29d,_0x247b86),_0x447781=_0x247b86+_0x2dbdcd;return{'path':relative(_0x38bfc7,_0x1a4ab4)[_0x1d2099(0x1f4)](sep)[_0x1d2099(0x24f)]('/'),'size':_0x16b742[_0x1d2099(0x281)],'offset':_0x247b86,'contentBase64':_0x1623d2[_0x1d2099(0x1e6)](-0xf9e+-0xb07+-0x13*-0x167,_0x2dbdcd)[_0x1d2099(0x20a)](_0x1d2099(0x228)),'nextOffset':_0x447781<_0x16b742[_0x1d2099(0x281)]?_0x447781:null};}finally{await _0xacee63[_0x1d2099(0x2b6)]();}}export async function readAllowedFileContentRange(_0x482836,_0x6530e5,_0x597f38=0x21b7+0x94d+-0x2b04,_0x2d9d27=FILE_READ_LIMIT){const _0x4cf5d4=_0x29cc70;if(!Number[_0x4cf5d4(0x1eb)](_0x597f38)||_0x597f38<0x10a9+-0x6c7*-0x2+0x5*-0x60b||!Number[_0x4cf5d4(0x1eb)](_0x2d9d27)||_0x2d9d27<0x8*-0x1d8+0x1663+0x1*-0x7a2||_0x2d9d27>FILE_READ_LIMIT)throw new Error(_0x4cf5d4(0x1b5));const {file:_0x24c6ba,metadata:_0x3fb09a}=await resolveAllowedFile(_0x482836,_0x6530e5);if(_0x597f38>_0x3fb09a[_0x4cf5d4(0x281)])throw new Error(_0x4cf5d4(0x1b5));const _0x42027c=Math[_0x4cf5d4(0x1dc)](_0x2d9d27,_0x3fb09a[_0x4cf5d4(0x281)]-_0x597f38),_0x3ef541=Buffer[_0x4cf5d4(0x1ea)](_0x42027c),_0x445a60=await open(_0x24c6ba,'r');try{const {bytesRead:_0x5515c2}=await _0x445a60[_0x4cf5d4(0x252)](_0x3ef541,0x9b3+0x1c0a+-0x25bd*0x1,_0x42027c,_0x597f38),_0x434ac3=_0x597f38+_0x5515c2;return{'path':_0x24c6ba,'size':_0x3fb09a[_0x4cf5d4(0x281)],'offset':_0x597f38,'contentBase64':_0x3ef541[_0x4cf5d4(0x1e6)](0xcdc*-0x3+0x7*0xe1+0x206d,_0x5515c2)[_0x4cf5d4(0x20a)](_0x4cf5d4(0x228)),'nextOffset':_0x434ac3<_0x3fb09a[_0x4cf5d4(0x281)]?_0x434ac3:null};}finally{await _0x445a60[_0x4cf5d4(0x2b6)]();}}export async function readAllowedTextFile(_0x2dc23f,_0x3f8479,_0x95b23d=0x1*-0xcc7+0x1d4c+-0x1085,_0x4b1b36=FILE_READ_LIMIT){const _0x5abfb0=_0x29cc70,{file:_0x5f0a93,metadata:_0x2a8f18}=await resolveAllowedFile(_0x2dc23f,_0x3f8479);if(_0x2a8f18[_0x5abfb0(0x281)]>FILE_READ_LIMIT*(0x34*-0xa+0x907*-0x2+0x1426))throw new Error(_0x5abfb0(0x27a));if(!Number[_0x5abfb0(0x1eb)](_0x95b23d)||_0x95b23d<0x94*0x20+0xd*0x1b7+-0x28cb||!Number[_0x5abfb0(0x1eb)](_0x4b1b36)||_0x4b1b36<-0x1551+-0x1*0x1764+0x76*0x61||_0x4b1b36>FILE_READ_LIMIT)throw new Error(_0x5abfb0(0x1b5));const _0x32316e=await readFile(_0x5f0a93),_0x32d02c=_0x32316e[_0x5abfb0(0x262)](-0x2053+-0xf18+0x2f6b)||!isValidUtf8(_0x32316e),_0x42f46e=Math[_0x5abfb0(0x1dc)](_0x32316e[_0x5abfb0(0x1c3)],_0x95b23d+_0x4b1b36);if(_0x32d02c){const _0x26407f=_0x32316e[_0x5abfb0(0x1e6)](_0x95b23d,_0x42f46e);return{'path':_0x5f0a93,'encoding':_0x5abfb0(0x228),'size':_0x32316e[_0x5abfb0(0x1c3)],'content':_0x26407f[_0x5abfb0(0x20a)](_0x5abfb0(0x228)),'truncated':_0x42f46e<_0x32316e[_0x5abfb0(0x1c3)],'nextOffset':_0x42f46e<_0x32316e[_0x5abfb0(0x1c3)]?_0x42f46e:null};}if(_0x95b23d>0x1ce7+0x1919+0x3*-0x1200&&_0x95b23d<_0x32316e[_0x5abfb0(0x1c3)]&&isUtf8ContinuationByte(_0x32316e[_0x95b23d]))throw new Error(_0x5abfb0(0x1b5));let _0x3ea016=_0x42f46e;if(_0x3ea016<_0x32316e[_0x5abfb0(0x1c3)]&&isUtf8ContinuationByte(_0x32316e[_0x3ea016])){while(_0x3ea016>_0x95b23d&&isUtf8ContinuationByte(_0x32316e[_0x3ea016]))_0x3ea016-=0x1ea0+-0x25f*-0x7+0x4*-0xbce;if(_0x3ea016===_0x95b23d){_0x3ea016+=-0x70*-0x18+-0x26ff+-0x1c80*-0x1;while(_0x3ea016<_0x32316e[_0x5abfb0(0x1c3)]&&isUtf8ContinuationByte(_0x32316e[_0x3ea016]))_0x3ea016+=0xb*-0x1c4+0x1*-0x559+0x18c6;}}const _0x48dbfa=_0x3ea016<_0x32316e[_0x5abfb0(0x1c3)]?_0x3ea016:null;return{'path':_0x5f0a93,'encoding':_0x5abfb0(0x260),'size':_0x32316e[_0x5abfb0(0x1c3)],'content':new TextDecoder(_0x5abfb0(0x260),{'fatal':!![]})[_0x5abfb0(0x1e5)](_0x32316e[_0x5abfb0(0x1e6)](_0x95b23d,_0x3ea016)),'truncated':_0x48dbfa!==null,'nextOffset':_0x48dbfa};}export function normalizeFilePreviewPath(_0x30076b){const _0x3925f5=_0x29cc70;if(!/^sandbox:/iu[_0x3925f5(0x263)](_0x30076b))return _0x30076b;let _0x1770cb;try{_0x1770cb=decodeURIComponent(_0x30076b[_0x3925f5(0x190)](_0x30076b[_0x3925f5(0x1fc)](':')+(-0x2060+0x1e95*0x1+0x73*0x4)));}catch{throw new Error(_0x3925f5(0x1d8));}const _0x137a65=_0x1770cb[_0x3925f5(0x1f0)](/^\/([a-z]:[\\/])/iu,'$1');if(_0x137a65[_0x3925f5(0x1c3)]===0x2f5+0x7*0x2e6+-0x173f||/^[\\/]{2,}[?.](?:[\\/]|$)/u[_0x3925f5(0x263)](_0x1770cb)||!isAbsolute(_0x137a65)&&!win32[_0x3925f5(0x1d5)](_0x137a65)||_0x137a65[_0x3925f5(0x262)]('\x00')||_0x137a65[_0x3925f5(0x262)]('?')||_0x137a65[_0x3925f5(0x262)]('#'))throw new Error(_0x3925f5(0x1d8));return _0x137a65;}async function resolveAllowedFile(_0x23a5fc,_0x189758){const _0x572955=_0x29cc70;if(!isAbsolute(_0x23a5fc))throw new Error(_0x572955(0x1d8));const _0x4329da=await realpath(_0x23a5fc)[_0x572955(0x19c)](_0xe683e2=>{const _0x18b4d6=_0x572955;if(_0xe683e2[_0x18b4d6(0x28f)]===_0x18b4d6(0x231))throw new Error(_0x18b4d6(0x2a1));throw _0xe683e2;}),_0x45a4e1=await Promise[_0x572955(0x191)](_0x189758[_0x572955(0x1f1)](_0x59e490=>realpath(_0x59e490)));if(!isWithinAllowedRoot(_0x4329da,_0x45a4e1))throw new Error(_0x572955(0x1d8));const _0x2762f5=await lstat(_0x4329da);if(!_0x2762f5[_0x572955(0x257)]())throw new Error(_0x572955(0x2bb));return{'file':_0x4329da,'metadata':_0x2762f5};}function isValidUtf8(_0x3a60be){const _0x1aad94=_0x29cc70;try{return new TextDecoder(_0x1aad94(0x260),{'fatal':!![]})[_0x1aad94(0x1e5)](_0x3a60be),!![];}catch{return![];}}function isUtf8ContinuationByte(_0x1ddd3d){return(_0x1ddd3d&0x214e+-0x1fcd+0x1*-0xc1)===0xb68+-0x752+-0x396;}export async function searchWorkspaceFiles(_0x3f3d4e,_0x4583da,_0x201c3b,_0x27097d=SEARCH_RESULT_LIMIT,_0x1a030a=![]){const _0x42e229=_0x29cc70,_0x23e5f1=new WorkspaceFileIndex(_0x3f3d4e);try{return await _0x23e5f1[_0x42e229(0x1a8)](_0x4583da,_0x201c3b,_0x27097d,_0x1a030a);}finally{_0x23e5f1[_0x42e229(0x20f)]();}}async function resolveRegisteredWorkspaceRoot(_0x1b20af){const _0x54dbcd=_0x29cc70,_0x5f5b04=await realpath(_0x1b20af);if(normalizeWorkspacePath(_0x5f5b04)!==normalizeWorkspacePath(_0x1b20af))throw new Error(_0x54dbcd(0x1d3));return _0x5f5b04;}async function resolveWorkspaceEntry(_0x3fe028,_0x38a347,_0x183e36){const _0x5a8993=await resolveRegisteredWorkspaceRoot(_0x3fe028);return resolveWorkspaceEntryFromCanonicalRoot(_0x5a8993,_0x38a347,_0x183e36);}async function resolveWorkspaceEntryFromCanonicalRoot(_0x1cfa46,_0x445455,_0x19d908){const _0x59cad4=_0x29cc70,_0x63c43a=await resolveWorkspaceEntryMetadata(_0x1cfa46,_0x445455);if(_0x19d908?!_0x63c43a[_0x59cad4(0x23a)][_0x59cad4(0x265)]():!_0x63c43a[_0x59cad4(0x23a)][_0x59cad4(0x257)]()&&!_0x63c43a[_0x59cad4(0x23a)][_0x59cad4(0x265)]())throw new Error(_0x19d908?_0x59cad4(0x245):_0x59cad4(0x2bb));return _0x63c43a[_0x59cad4(0x2a2)];}async function resolveWorkspaceEntryMetadata(_0x5e7805,_0x2f57c8){const _0x2ff857=_0x29cc70;if(_0x2f57c8[_0x2ff857(0x262)]('\x00')||_0x2f57c8[_0x2ff857(0x1c3)]===-0x81+0x10*-0x1fb+0x1*0x2031||_0x2f57c8[_0x2ff857(0x28c)]('/')||_0x2f57c8[_0x2ff857(0x28c)]('\x5c'))throw new Error(_0x2ff857(0x1d8));const _0x34d7f1=_0x2f57c8[_0x2ff857(0x278)]('\x5c','/');if(_0x34d7f1[_0x2ff857(0x1f4)]('/')[_0x2ff857(0x1fe)](_0x1e3fe7=>_0x1e3fe7==='..'||_0x1e3fe7===_0x2ff857(0x1ef)))throw new Error(_0x2ff857(0x1d8));let _0x4c9fe5;try{_0x4c9fe5=await realpath(resolve(_0x5e7805,_0x34d7f1));}catch(_0x594e02){if(_0x594e02[_0x2ff857(0x28f)]===_0x2ff857(0x231))throw new Error(_0x2ff857(0x2a1));throw _0x594e02;}const _0x7c6eca=relative(_0x5e7805,_0x4c9fe5);if(isAbsolute(_0x7c6eca)||_0x7c6eca[_0x2ff857(0x28c)]('..')||_0x7c6eca==='..'||_0x7c6eca[_0x2ff857(0x28c)]('..'+sep))throw new Error(_0x2ff857(0x1d8));const _0x4c91b9=await lstat(_0x4c9fe5);return{'path':_0x4c9fe5,'metadata':_0x4c91b9};}async function inspectWorkspaceIndexEntry(_0x201612,_0x1f6130,_0x3cdcd2){const _0x5aa83c=_0x29cc70;try{const _0x2355e1=await resolveWorkspaceEntryMetadata(_0x201612,_0x1f6130);if(!_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x257)]()&&!_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x265)]())return undefined;const _0x3228b1=relative(_0x201612,_0x2355e1[_0x5aa83c(0x2a2)])[_0x5aa83c(0x1f4)](sep)[_0x5aa83c(0x24f)]('/');return _0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x265)]()?{'path':_0x3228b1,'name':_0x3cdcd2,'kind':_0x5aa83c(0x217),'size':null,'modifiedAt':_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x211)]}:{'path':_0x3228b1,'name':_0x3cdcd2,'kind':_0x5aa83c(0x2a0),'size':_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x281)],'modifiedAt':_0x2355e1[_0x5aa83c(0x23a)][_0x5aa83c(0x211)]};}catch{return undefined;}}function encodeDirectoryCursor(_0x337d1d,_0x581337){const _0x55f65a=_0x29cc70;return Buffer[_0x55f65a(0x264)](JSON[_0x55f65a(0x202)]({'path':_0x337d1d,'name':_0x581337}))[_0x55f65a(0x20a)](_0x55f65a(0x1b4));}function decodeDirectoryCursor(_0x2253ef,_0x3a7201){const _0x29d81e=_0x29cc70;if(_0x2253ef===undefined)return undefined;try{const _0x157c95=JSON[_0x29d81e(0x250)](Buffer[_0x29d81e(0x264)](_0x2253ef,_0x29d81e(0x1b4))[_0x29d81e(0x20a)](_0x29d81e(0x288)));if(typeof _0x157c95!==_0x29d81e(0x227)||_0x157c95===null||_0x157c95[_0x29d81e(0x2a2)]!==_0x3a7201||typeof _0x157c95[_0x29d81e(0x1db)]!==_0x29d81e(0x27e))throw new Error();return _0x157c95[_0x29d81e(0x1db)];}catch{throw new Error(_0x29d81e(0x266));}}function encodeSearchCursor(_0x4597f4,_0x55419f){const _0x4ee3f4=_0x29cc70;return Buffer[_0x4ee3f4(0x264)](JSON[_0x4ee3f4(0x202)]({'query':_0x4597f4,'path':_0x55419f}))[_0x4ee3f4(0x20a)](_0x4ee3f4(0x1b4));}function decodeSearchCursor(_0x561a18,_0x18c410){const _0xdc69a0=_0x29cc70;if(_0x561a18===undefined)return undefined;try{const _0x4353f8=JSON[_0xdc69a0(0x250)](Buffer[_0xdc69a0(0x264)](_0x561a18,_0xdc69a0(0x1b4))[_0xdc69a0(0x20a)](_0xdc69a0(0x288)));if(typeof _0x4353f8!==_0xdc69a0(0x227)||_0x4353f8===null||_0x4353f8[_0xdc69a0(0x23b)]!==_0x18c410||typeof _0x4353f8[_0xdc69a0(0x2a2)]!==_0xdc69a0(0x27e))throw new Error();return _0x4353f8[_0xdc69a0(0x2a2)];}catch{throw new Error(_0xdc69a0(0x266));}}export function normalizeWorkspacePath(_0x521c6e,_0xa7ceb0=_0x292b67()){const _0x3ed668=_0x29cc70;if(_0x521c6e[_0x3ed668(0x1c3)]===0x7*0x4ae+0x233*0x5+-0x2bc1||_0x521c6e[_0x3ed668(0x262)]('\u0000'))throw new Error(_0x3ed668(0x209));if(_0xa7ceb0===_0x3ed668(0x213)){if(/^\\\\[?.]/[_0x3ed668(0x263)](_0x521c6e))throw new Error(_0x3ed668(0x218));const _0x29ec33=win32[_0x3ed668(0x255)](_0x521c6e[_0x3ed668(0x278)]('/','\x5c'));if(!win32[_0x3ed668(0x1d5)](_0x29ec33))throw new Error(_0x3ed668(0x2a7));return _0x29ec33[_0x3ed668(0x1f0)](/\\+$/,'')[_0x3ed668(0x224)]();}if(_0xa7ceb0!==_0x3ed668(0x223))throw new Error(_0x3ed668(0x2a5));const _0x2cb9c7=posix[_0x3ed668(0x255)](_0x521c6e);if(!posix[_0x3ed668(0x1d5)](_0x2cb9c7))throw new Error(_0x3ed668(0x2a7));return _0x2cb9c7==='/'?_0x2cb9c7:_0x2cb9c7[_0x3ed668(0x1f0)](/\/+$/,'');}export function isWithinAllowedRoot(_0x4d3693,_0x9c3383,_0x5b1a34=_0x292b67()){const _0x1081d0=_0x29cc70,_0x5b0b99=normalizeWorkspacePath(_0x4d3693,_0x5b1a34),_0x196902=_0x5b1a34===_0x1081d0(0x213)?win32:posix;return _0x9c3383[_0x1081d0(0x1fe)](_0x377d8f=>{const _0x36eeb2=_0x1081d0,_0x8b176=normalizeWorkspacePath(_0x377d8f,_0x5b1a34),_0x27d064=_0x196902[_0x36eeb2(0x214)](_0x8b176,_0x5b0b99);return _0x27d064===''||!_0x27d064[_0x36eeb2(0x28c)]('..')&&!_0x196902[_0x36eeb2(0x1d5)](_0x27d064);});}export async function inspectWorkspace(_0xb0b5e1,_0x13b318){const _0xfe146e=_0x29cc70,_0x57a625=await realpath(_0xb0b5e1),_0x300914=await Promise[_0xfe146e(0x191)](_0x13b318[_0xfe146e(0x1f1)](_0x166775=>realpath(_0x166775))),_0x1a4b4e=await stat(_0x57a625);if(!_0x1a4b4e[_0xfe146e(0x265)]()||!isWithinAllowedRoot(_0x57a625,_0x300914))throw new Error(_0xfe146e(0x1d3));try{const _0x509a58=await readGitSummary(_0x57a625);return{'path':_0x57a625,'kind':_0xfe146e(0x221),'gitSummary':_0x509a58};}catch(_0x43053f){if(_0x43053f instanceof GitCommandError&&_0x43053f[_0xfe146e(0x28f)]===-0xdb+-0x38*0x7+0x2e3||isGitUnavailable(_0x43053f))return{'path':_0x57a625,'kind':_0xfe146e(0x217)};throw _0x43053f;}}export async function readGitSummary(_0x1dc27f){const _0x184975=_0x29cc70,_0x4b5e2d=(await runReadOnlyGit(_0x1dc27f,[_0x184975(0x1ec),_0x184975(0x1f7)]))[_0x184975(0x20b)][_0x184975(0x22b)](),_0x1dfcee=await runReadOnlyGitAllowFailure(_0x1dc27f,[_0x184975(0x1ec),_0x184975(0x1cc),_0x184975(0x1c4)]),_0x47643f=await runReadOnlyGitAllowFailure(_0x1dc27f,[_0x184975(0x292),_0x184975(0x203),_0x184975(0x1c6),_0x184975(0x1c4)]),_0x44874f={'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT},_0xac54a8=await runReadOnlyGit(_0x1dc27f,[_0x184975(0x1b0),_0x184975(0x2aa)],_0x44874f);return{'commonDir':_0x4b5e2d,'head':_0x1dfcee[_0x184975(0x28f)]===-0x10*-0x53+0x8*0x173+-0x2cc*0x6?_0x1dfcee[_0x184975(0x20b)][_0x184975(0x22b)]():'','branch':_0x47643f[_0x184975(0x28f)]===0x18fe*-0x1+0xdde+0xb20?_0x47643f[_0x184975(0x20b)][_0x184975(0x22b)]():null,'dirty':_0xac54a8[_0x184975(0x25f)][_0x184975(0x1c3)]>0x58c+0x100d+-0x1599,'snapshot':summarizeText(_0xac54a8[_0x184975(0x20b)])};}export function assertSafeGitRef(_0x4d4f23){const _0x535f7c=_0x29cc70;if(!REF_PATTERN[_0x535f7c(0x263)](_0x4d4f23))throw new Error(_0x535f7c(0x212));}export async function readRestrictedDiff(_0x270768,_0x193b4d,_0x214d11){const _0x446b38=_0x29cc70;assertSafeGitRef(_0x193b4d),assertSafeGitRef(_0x214d11);const _0x410b19=await runReadOnlyGit(_0x270768,[_0x446b38(0x23e),_0x446b38(0x1b2),_0x446b38(0x24c),_0x193b4d,_0x214d11]),_0xde80f9=_0x410b19[_0x446b38(0x25f)][_0x446b38(0x262)](-0x1*0x1f33+-0x7c*-0x11+0x16f7)||_0x410b19[_0x446b38(0x20b)][_0x446b38(0x262)](_0x446b38(0x1e4));if(_0xde80f9)return{'binary':!![],'summary':_0x446b38(0x24d)+createHash(_0x446b38(0x26f))[_0x446b38(0x23d)](_0x410b19[_0x446b38(0x25f)])[_0x446b38(0x243)](_0x446b38(0x196))+_0x446b38(0x1be)+_0x410b19[_0x446b38(0x25f)][_0x446b38(0x1c3)],'truncated':_0x410b19[_0x446b38(0x253)]};return{'binary':![],'text':_0x410b19[_0x446b38(0x20b)],'truncated':_0x410b19[_0x446b38(0x253)]};}function currentBranchFromStatusHeader(_0x239f42){const _0x6e6bf5=_0x29cc70,_0x440bd8=_0x239f42[_0x6e6bf5(0x190)](0x23c6*-0x1+0xc7*-0xd+0x2de4);if(_0x440bd8[_0x6e6bf5(0x28c)](_0x6e6bf5(0x22e)))return null;const _0x2a305a=/^(?:No commits yet on|Initial commit on) (.+)$/[_0x6e6bf5(0x26b)](_0x440bd8);if(_0x2a305a!==null)return _0x2a305a[0x2383+0xb*-0x168+-0x156*0xf]??null;return _0x440bd8[_0x6e6bf5(0x1f4)](_0x6e6bf5(0x26e))[-0x53*0x53+0x137*0x13+-0xa*-0x62]?.[_0x6e6bf5(0x1f4)]('\x20')[-0x66d+0x1d*0x99+-0xae8]??null;}export async function listGitWorktrees(_0x4ab771){const _0x6c9f32=_0x29cc70,_0x3e0b46=await runReadOnlyGit(_0x4ab771,[_0x6c9f32(0x1d9),_0x6c9f32(0x272),_0x6c9f32(0x2b7),'-z'],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x3e1ad3=normalizeWorkspacePath(await realpath(_0x4ab771)),_0x5df003=[];let _0x4ae625=_0x3e0b46[_0x6c9f32(0x253)];for(const _0x20ac18 of _0x3e0b46[_0x6c9f32(0x20b)][_0x6c9f32(0x1f4)]('\x00\x00')){if(_0x20ac18[_0x6c9f32(0x1c3)]===-0x23d8+0xcb1+0x1727)continue;if(_0x5df003[_0x6c9f32(0x1c3)]>=GIT_WORKTREE_LIST_LIMIT){_0x4ae625=!![];break;}const _0x38d57a=_0x20ac18[_0x6c9f32(0x1f4)]('\x00')[_0x6c9f32(0x1fb)](_0x314bcf=>_0x314bcf[_0x6c9f32(0x1c3)]>0xcae+0x13ca+-0x2*0x103c);if(_0x38d57a[_0x6c9f32(0x1fe)](_0x1275c1=>_0x1275c1===_0x6c9f32(0x28a)))continue;const _0x4e1269=_0x38d57a[_0x6c9f32(0x1a5)](_0x1b16f1=>_0x1b16f1[_0x6c9f32(0x28c)](_0x6c9f32(0x1ed))),_0x486a44=_0x38d57a[_0x6c9f32(0x1a5)](_0x10b0dc=>_0x10b0dc[_0x6c9f32(0x28c)](_0x6c9f32(0x22e))),_0x45f1ac=_0x4e1269?.[_0x6c9f32(0x190)](_0x6c9f32(0x1ed)[_0x6c9f32(0x1c3)]),_0x45eb82=_0x486a44?.[_0x6c9f32(0x190)](_0x6c9f32(0x22e)[_0x6c9f32(0x1c3)]);if(_0x45f1ac===undefined||_0x45f1ac[_0x6c9f32(0x1c3)]===-0xeef*0x1+-0x1ac7+-0x14db*-0x2||_0x45eb82===undefined||!/^[0-9a-f]{40,64}$/u[_0x6c9f32(0x263)](_0x45eb82)){if(_0x3e0b46[_0x6c9f32(0x253)]){_0x4ae625=!![];continue;}throw new Error(_0x6c9f32(0x238));}const _0x61f556=_0x38d57a[_0x6c9f32(0x1a5)](_0x441df1=>_0x441df1[_0x6c9f32(0x28c)](_0x6c9f32(0x1a1))),_0x1b7889=_0x61f556?.[_0x6c9f32(0x190)](_0x6c9f32(0x1a1)[_0x6c9f32(0x1c3)]),_0x44f9f1=_0x1b7889===undefined?null:_0x1b7889[_0x6c9f32(0x28c)](_0x6c9f32(0x274))?_0x1b7889[_0x6c9f32(0x190)](_0x6c9f32(0x274)[_0x6c9f32(0x1c3)]):_0x1b7889,_0x50ab8d=(basename(_0x45f1ac)[_0x6c9f32(0x22b)]()||_0x44f9f1||_0x45eb82[_0x6c9f32(0x190)](0x6d0*-0x1+0xf*-0x9e+0x2*0x809,-0x27b+-0x1*-0x11c3+-0xf3c))[_0x6c9f32(0x190)](0x1c38+0x3*-0x8ac+-0x234,-0x1127*-0x1+-0xd91+-0x196);_0x5df003[_0x6c9f32(0x21a)]({'path':_0x45f1ac,'directoryName':_0x50ab8d,'branch':_0x44f9f1,'head':_0x45eb82,'current':normalizeWorkspacePath(_0x45f1ac)===_0x3e1ad3,'locked':_0x38d57a[_0x6c9f32(0x1fe)](_0x27ae9f=>_0x27ae9f===_0x6c9f32(0x25d)||_0x27ae9f[_0x6c9f32(0x28c)](_0x6c9f32(0x197))),'prunable':_0x38d57a[_0x6c9f32(0x1fe)](_0x2f49f5=>_0x2f49f5===_0x6c9f32(0x22c)||_0x2f49f5[_0x6c9f32(0x28c)](_0x6c9f32(0x201)))});}return{'entries':_0x5df003,'truncated':_0x4ae625};}export async function readCurrentChangesSummary(_0x5cabad){const _0x22426b=_0x29cc70,_0x557fdf=await runReadOnlyGit(_0x5cabad,[_0x22426b(0x1b0),_0x22426b(0x2aa),'-z',_0x22426b(0x251),_0x22426b(0x193)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x16f326=_0x557fdf[_0x22426b(0x20b)][_0x22426b(0x1f4)]('\x00'),_0xf921e5=_0x16f326[_0x22426b(0x229)]()??'',_0x1c6f03=[];for(let _0x209009=-0xb2+0x1161+-0x10af;_0x209009<_0x16f326[_0x22426b(0x1c3)];_0x209009+=0xfee+-0x1*-0x1846+-0x2833*0x1){const _0x4ce20f=_0x16f326[_0x209009];if(_0x4ce20f[_0x22426b(0x1c3)]<0x1*-0x2467+0x1*-0xb47+0x2fb2)continue;const _0x5e49a7=_0x4ce20f[-0x1*0x13+0x1*-0x1f6f+-0x4a*-0x6d],_0x458446=_0x4ce20f[-0x311*0xc+-0x220e+-0x1*-0x46db],_0xc73dbf=_0x4ce20f[_0x22426b(0x190)](0x423*0x2+0x2*0x10db+0x29f9*-0x1);if(_0x5e49a7==='?'&&_0x458446==='?'){_0x1c6f03[_0x22426b(0x21a)]({'path':_0xc73dbf,'state':_0x22426b(0x1b9),'change':_0x22426b(0x237)});continue;}_0x5e49a7!=='\x20'&&_0x1c6f03[_0x22426b(0x21a)]({'path':_0xc73dbf,'state':_0x22426b(0x215),'change':gitChange(_0x5e49a7)});_0x458446!=='\x20'&&_0x1c6f03[_0x22426b(0x21a)]({'path':_0xc73dbf,'state':_0x22426b(0x2a8),'change':gitChange(_0x458446)});if(_0x5e49a7==='R'||_0x5e49a7==='C'||_0x458446==='R'||_0x458446==='C')_0x209009+=0x4b6+0x1eff+0x2*-0x11da;}return{'branch':_0xf921e5[_0x22426b(0x28c)](_0x22426b(0x1d1))?currentBranchFromStatusHeader(_0xf921e5):null,'changes':_0x1c6f03};}export async function listInitializedSubmodulePaths(_0x2ebb61){const _0x18f31f=_0x29cc70,_0x4be35f=await runReadOnlyGit(_0x2ebb61,[_0x18f31f(0x2a6),_0x18f31f(0x1b0),_0x18f31f(0x1a9)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x4be35f[_0x18f31f(0x20b)][_0x18f31f(0x1f4)](/\r?\n/)[_0x18f31f(0x256)](_0x5c6e3b=>{const _0x440ef7=_0x18f31f;if(_0x5c6e3b[_0x440ef7(0x1c3)]<-0x204d*-0x1+-0x9f1*0x1+-0x1*0x1632)return[];const _0x359c44=_0x5c6e3b[0x1dd3+0x4a6+-0x2279];if(_0x359c44==='-')return[];const _0x5e8f4e=/^.[0-9a-f]+\s+(.+?)(?:\s+\([^)]*\))?$/[_0x440ef7(0x26b)](_0x5c6e3b),_0x35ee52=_0x5e8f4e?.[-0x24bb*0x1+-0x5b*-0x45+-0x19*-0x7d]?.[_0x440ef7(0x278)]('\x5c','/');return _0x35ee52===undefined||_0x35ee52[_0x440ef7(0x1c3)]===0x1*-0xecf+0x8b3+0x61c?[]:[_0x35ee52];})[_0x18f31f(0x24a)]((_0x43df5d,_0x264cb6)=>_0x43df5d[_0x18f31f(0x1ce)](_0x264cb6));}export async function resolveGitRepository(_0x3d54a0,_0x573b8d,_0xc58968){const _0xc67b66=_0x29cc70,_0x3fd2ad=await realpath(_0x3d54a0);if(_0x573b8d[_0xc67b66(0x1c3)]===0x13a6+-0x1*-0x7a2+-0x12*0x184)return _0x3fd2ad;if(_0x573b8d[_0xc67b66(0x262)]('\x00')||_0x573b8d[_0xc67b66(0x28c)]('/')||_0x573b8d[_0xc67b66(0x28c)]('\x5c')||_0x573b8d[_0xc67b66(0x1f4)]('/')[_0xc67b66(0x1fe)](_0x112c8c=>_0x112c8c[_0xc67b66(0x1c3)]===-0x11ae+0x89e*0x2+-0x2*-0x39||_0x112c8c==='.'||_0x112c8c==='..'))throw new Error(_0xc67b66(0x276));try{const _0x56d8ef=resolve(_0x3fd2ad,_0x573b8d),_0x2a79b6=await realpath(_0x56d8ef);if(normalizeWorkspacePath(_0x56d8ef)!==normalizeWorkspacePath(_0x2a79b6)||!isWithinAllowedRoot(_0x2a79b6,[_0x3fd2ad]))throw new Error(_0xc67b66(0x1d6));if(_0xc58968!==undefined){if(!_0xc58968[_0xc67b66(0x262)](_0x573b8d))throw new Error(_0xc67b66(0x1d6));return _0x2a79b6;}return await assertGitSuperprojectChain(_0x3fd2ad,_0x2a79b6),_0x2a79b6;}catch{throw new Error(_0xc67b66(0x276));}}async function assertGitSuperprojectChain(_0x1de492,_0xab1640){const _0x1a7c8a=_0x29cc70,_0x44088c=normalizeWorkspacePath(_0x1de492);let _0x2f3c76=_0xab1640;const _0x283a04=new Set();for(let _0x58d8f1=-0x25df+0x1109+0x1*0x14d6;_0x58d8f1<-0x23d1+0x9d+0x2374;_0x58d8f1+=-0x1*0x1409+-0x5ba*-0x4+-0x16f*0x2){const _0x5beed9=normalizeWorkspacePath(_0x2f3c76);if(_0x5beed9===_0x44088c)return;if(_0x283a04[_0x1a7c8a(0x1ee)](_0x5beed9))throw new Error(_0x1a7c8a(0x1d6));_0x283a04[_0x1a7c8a(0x1c0)](_0x5beed9);const _0x4421ce=await runReadOnlyGit(_0x2f3c76,[_0x1a7c8a(0x1ec),_0x1a7c8a(0x1d2),_0x1a7c8a(0x1e1)]),[_0x3499d1,_0x49b3dd]=_0x4421ce[_0x1a7c8a(0x20b)][_0x1a7c8a(0x1f4)](/\r?\n/);if(_0x3499d1===undefined||_0x49b3dd===undefined||_0x49b3dd[_0x1a7c8a(0x1c3)]===-0x2577+-0x4f*-0x65+-0x64c*-0x1)throw new Error(_0x1a7c8a(0x1d6));const _0x513d31=await realpath(_0x3499d1),_0x4e0e77=await realpath(_0x49b3dd);if(normalizeWorkspacePath(_0x513d31)!==_0x5beed9||normalizeWorkspacePath(_0x4e0e77)===_0x5beed9||!isWithinAllowedRoot(_0x4e0e77,[_0x1de492])||!isWithinAllowedRoot(_0x2f3c76,[_0x4e0e77]))throw new Error(_0x1a7c8a(0x1d6));_0x2f3c76=_0x4e0e77;}throw new Error(_0x1a7c8a(0x1d6));}export async function listGitHistoryRefs(_0x258bf8){const _0x45306a=_0x29cc70,_0x259ff9=await runReadOnlyGit(_0x258bf8,[_0x45306a(0x1ad),_0x45306a(0x1e8),_0x45306a(0x24e),_0x45306a(0x1b6)],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x259ff9[_0x45306a(0x20b)][_0x45306a(0x1f4)](/\r?\n/)[_0x45306a(0x256)](_0x3d5f63=>{const _0xac7bde=_0x45306a,[_0x43ddee,_0x29ca3a,_0x425f41,_0x55ff78,_0x1910ff]=_0x3d5f63[_0xac7bde(0x1f4)]('\x09');if(_0x43ddee===undefined||_0x29ca3a===undefined||_0x425f41===undefined||_0x1910ff===undefined||_0x1910ff[_0xac7bde(0x1c3)]>0x532+0x1d49+-0x227b||!/^[0-9a-f]{40,64}$/[_0xac7bde(0x263)](_0x425f41))return[];const _0x8e44f3=_0x43ddee[_0xac7bde(0x28c)](_0xac7bde(0x274))?_0xac7bde(0x19e):_0x43ddee[_0xac7bde(0x28c)](_0xac7bde(0x29a))?_0xac7bde(0x2ab):undefined;return _0x8e44f3===undefined?[]:[{'name':_0x43ddee,'displayName':_0x29ca3a,'kind':_0x8e44f3,'hash':_0x425f41,'current':_0x55ff78==='*'}];})[_0x45306a(0x24a)]((_0x4b7be0,_0xbb70f8)=>_0x4b7be0[_0x45306a(0x232)][_0x45306a(0x1ce)](_0xbb70f8[_0x45306a(0x232)])||_0x4b7be0[_0x45306a(0x1fa)][_0x45306a(0x1ce)](_0xbb70f8[_0x45306a(0x1fa)]));}function selectedHistoryRefs(_0x18a292,_0x20e7bc){const _0x143285=_0x29cc70;if(_0x20e7bc===undefined||_0x20e7bc[_0x143285(0x1c3)]===-0x12a7+-0x125*0x3+0x1616)return _0x18a292;const _0x319a43=[...new Set(_0x20e7bc)],_0x34c7b0=_0x319a43[_0x143285(0x1f1)](_0x562708=>_0x18a292[_0x143285(0x1a5)](_0x46ca4f=>_0x46ca4f[_0x143285(0x1db)]===_0x562708));if(_0x34c7b0[_0x143285(0x1fe)](_0x2bf1c1=>_0x2bf1c1===undefined))throw new Error(_0x143285(0x26d));return _0x34c7b0;}function historyCursor(_0x2be18b,_0x24e3dc){const _0x157046=_0x29cc70;return Buffer[_0x157046(0x264)](JSON[_0x157046(0x202)]({'offset':_0x2be18b,'fingerprint':_0x24e3dc}))[_0x157046(0x20a)](_0x157046(0x1b4));}function parseHistoryCursor(_0x3e320b,_0x2cda88){const _0x4d8b45=_0x29cc70;if(_0x3e320b===undefined)return 0x145*0xe+-0x1bb*0x11+0xba5;try{const _0x227e6a=JSON[_0x4d8b45(0x250)](Buffer[_0x4d8b45(0x264)](_0x3e320b,_0x4d8b45(0x1b4))[_0x4d8b45(0x20a)](_0x4d8b45(0x288)));if(!Number[_0x4d8b45(0x1a4)](_0x227e6a[_0x4d8b45(0x23c)])||_0x227e6a[_0x4d8b45(0x23c)]<-0xa98*-0x3+-0x4*0x6bc+0x1f*-0x28||_0x227e6a[_0x4d8b45(0x1e0)]!==_0x2cda88)throw new Error(_0x4d8b45(0x1d6));return _0x227e6a[_0x4d8b45(0x23c)];}catch{throw new Error(_0x4d8b45(0x1a6));}}export async function readGitHistory(_0x41d765,_0x386b35){const _0x1758f0=_0x29cc70,_0x4979c3=await listGitHistoryRefs(_0x41d765),_0x3b8524=selectedHistoryRefs(_0x4979c3,_0x386b35[_0x1758f0(0x267)]);if(_0x3b8524[_0x1758f0(0x1c3)]===0x1c3f+-0x1c1*0x5+0x67e*-0x3)return{'commits':[],'nextCursor':null};const _0x362736=_0x386b35[_0x1758f0(0x29b)]??0x23af+0x1adb+-0x3e58;if(!Number[_0x1758f0(0x1a4)](_0x362736)||_0x362736<0xb7*0x25+-0x10ca+-0x135*0x8||_0x362736>0x220e+-0x124*0x2+-0x1f62)throw new Error(_0x1758f0(0x259));const _0x5e94e=_0x3b8524[_0x1758f0(0x1f1)](_0xd9eda=>_0xd9eda[_0x1758f0(0x1db)])[_0x1758f0(0x24a)](),_0xe0faf6=_0x386b35[_0x1758f0(0x267)]===undefined||_0x386b35[_0x1758f0(0x267)][_0x1758f0(0x1c3)]===-0x17b5+-0x1*-0x1901+-0x14c*0x1||_0x3b8524[_0x1758f0(0x1c3)]===_0x4979c3[_0x1758f0(0x1c3)]&&_0x3b8524[_0x1758f0(0x2ad)](_0x1e54c8=>_0x4979c3[_0x1758f0(0x1fe)](_0x28a2e6=>_0x28a2e6[_0x1758f0(0x1db)]===_0x1e54c8[_0x1758f0(0x1db)])),_0x91fa46=_0xe0faf6?[_0x1758f0(0x18f),_0x1758f0(0x1a7)]:_0x5e94e,_0x5f2477=createHash(_0x1758f0(0x26f))[_0x1758f0(0x23d)](_0x3b8524[_0x1758f0(0x1f1)](_0x511c40=>_0x511c40[_0x1758f0(0x1db)]+'\x00'+_0x511c40[_0x1758f0(0x22f)])[_0x1758f0(0x24a)]()[_0x1758f0(0x24f)]('\x00'))[_0x1758f0(0x243)](_0x1758f0(0x196)),_0xf466cd=parseHistoryCursor(_0x386b35[_0x1758f0(0x271)],_0x5f2477),_0x47dff1=await runReadOnlyGit(_0x41d765,[_0x1758f0(0x244),_0x1758f0(0x205),_0x1758f0(0x2ac),_0x1758f0(0x284)+_0xf466cd,_0x1758f0(0x1e9)+(_0x362736+(0x146*0x4+0x1*-0x18bd+0x9d3*0x2)),'-z',_0x1758f0(0x1f3),..._0x91fa46,'--'],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS}),_0x5a40b1=new Map();for(const _0x599c74 of _0x4979c3){const _0x19d19e=_0x5a40b1[_0x1758f0(0x198)](_0x599c74[_0x1758f0(0x22f)])??[];_0x19d19e[_0x1758f0(0x21a)](_0x599c74[_0x1758f0(0x1fa)]),_0x5a40b1[_0x1758f0(0x296)](_0x599c74[_0x1758f0(0x22f)],_0x19d19e);}const _0xe9b361=_0x47dff1[_0x1758f0(0x20b)][_0x1758f0(0x1f4)]('\x00'),_0xe22a16=[];for(let _0x5831a1=0x4*-0x715+0x3*0xb65+0x1*-0x5db;_0x5831a1+(-0x21f3+0x443+0x1db5)<_0xe9b361[_0x1758f0(0x1c3)];_0x5831a1+=0x4*-0x26e+-0x251d+0x2edb){const [_0x88a298,_0x1178dd='',_0x3572f1='',_0x137d7a='',_0x11b8fd='0',_0x598530='']=_0xe9b361[_0x1758f0(0x190)](_0x5831a1,_0x5831a1+(-0x1*0x33+-0x7*-0x45d+-0xf29*0x2));if(_0x88a298===undefined||!/^[0-9a-f]{40,64}$/[_0x1758f0(0x263)](_0x88a298))continue;_0xe22a16[_0x1758f0(0x21a)]({'hash':_0x88a298,'parents':_0x1178dd[_0x1758f0(0x1c3)]===-0xb*-0x327+0xe*0x6b+-0x2887?[]:_0x1178dd[_0x1758f0(0x1f4)]('\x20'),'authorName':_0x3572f1,'authorEmail':_0x137d7a,'committedAt':Number(_0x11b8fd)*(0x11dc+0x185a*-0x1+0xa66),'subject':_0x598530,'refs':_0x5a40b1[_0x1758f0(0x198)](_0x88a298)??[]});}const _0x57f22d=_0xe22a16[_0x1758f0(0x1c3)]>_0x362736;return{'commits':_0xe22a16[_0x1758f0(0x190)](0x902+0x2591+-0x2e93,_0x362736),'nextCursor':_0x57f22d?historyCursor(_0xf466cd+_0x362736,_0x5f2477):null};}async function assertHistoryCommitReachable(_0x29678a,_0x4207d4,_0x4ece85){const _0x2d9827=_0x29cc70;if(!/^[0-9a-f]{40,64}$/[_0x2d9827(0x263)](_0x4207d4))throw new Error(_0x2d9827(0x1aa));const _0x41db3e=selectedHistoryRefs(await listGitHistoryRefs(_0x29678a),_0x4ece85);for(const _0x533449 of _0x41db3e){const _0x30de8a=await runReadOnlyGitAllowFailure(_0x29678a,[_0x2d9827(0x21e),_0x2d9827(0x1e7),_0x4207d4,_0x533449[_0x2d9827(0x1db)]]);if(_0x30de8a[_0x2d9827(0x28f)]===0x2289+0x1d*-0x9d+-0x10c0)return;}throw new Error(_0x2d9827(0x1aa));}export async function readGitHistoryFiles(_0x1090d6,_0x11b0c0,_0xec45c9){const _0x50bffb=_0x29cc70;await assertHistoryCommitReachable(_0x1090d6,_0x11b0c0,_0xec45c9);const _0x2d2c7c=await runReadOnlyGit(_0x1090d6,[_0x50bffb(0x1e3),_0x50bffb(0x19d),_0x50bffb(0x1e2),_0x50bffb(0x2b5),'-r','-z','-M','-C',_0x50bffb(0x273),_0x11b0c0],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x4f1787=_0x2d2c7c[_0x50bffb(0x20b)][_0x50bffb(0x1f4)]('\x00'),_0x44ca5c=[];for(let _0x4a55ec=0x14*-0x10+0x9d0+-0x224*0x4;_0x4a55ec<_0x4f1787[_0x50bffb(0x1c3)];_0x4a55ec+=-0x71*0x37+-0xe24+0x266c){const _0x3339e4=_0x4f1787[_0x4a55ec];if(_0x3339e4===undefined||_0x3339e4[_0x50bffb(0x1c3)]===-0x1b94+-0x1bc+0x430*0x7)continue;const _0x3f4768=_0x3339e4[-0x2ac+-0x26e3+0x298f]??'M';if(_0x3f4768==='R'||_0x3f4768==='C'){const _0xa5aa4c=_0x4f1787[_0x4a55ec+(0x117f+0x2603+-0xd*0x445)],_0x569036=_0x4f1787[_0x4a55ec+(-0x75c+0x10db+-0x97d)];if(_0xa5aa4c!==undefined&&_0x569036!==undefined)_0x44ca5c[_0x50bffb(0x21a)]({'path':_0x569036,'previousPath':_0xa5aa4c,'change':gitChange(_0x3f4768)});_0x4a55ec+=0x1af+0x5ff*-0x5+0x1c4e;}else{const _0x559194=_0x4f1787[_0x4a55ec+(-0x398+0x2106+-0x1d6d)];if(_0x559194!==undefined)_0x44ca5c[_0x50bffb(0x21a)]({'path':_0x559194,'change':gitChange(_0x3f4768)});_0x4a55ec+=0x151d*0x1+0x326*-0x8+-0x4*-0x105;}}return _0x44ca5c;}export async function readGitHistoryFileDiff(_0x12a268,_0x2bed90,_0x23c471,_0x256b1b,_0x3c7323){const _0x303ae7=_0x29cc70;await assertHistoryCommitReachable(_0x12a268,_0x2bed90,_0x256b1b);const _0x2f51e7=safeGitWorkspacePath(_0x23c471),_0x41a1dd=_0x3c7323===undefined?undefined:safeGitWorkspacePath(_0x3c7323),_0x1f210a=await runReadOnlyGit(_0x12a268,[_0x303ae7(0x1b7),_0x303ae7(0x1bf),_0x303ae7(0x1e2),_0x303ae7(0x1b2),_0x303ae7(0x24c),_0x2bed90,'--',_0x303ae7(0x242)+_0x2f51e7,..._0x41a1dd===undefined||_0x41a1dd===_0x2f51e7?[]:[_0x303ae7(0x242)+_0x41a1dd]]),_0x482adc=_0x1f210a[_0x303ae7(0x25f)][_0x303ae7(0x262)](-0x23b+0x233e*-0x1+0x2579)||_0x1f210a[_0x303ae7(0x20b)][_0x303ae7(0x262)](_0x303ae7(0x1e4));if(_0x482adc)return{'binary':!![],'summary':_0x303ae7(0x24d)+createHash(_0x303ae7(0x26f))[_0x303ae7(0x23d)](_0x1f210a[_0x303ae7(0x25f)])[_0x303ae7(0x243)](_0x303ae7(0x196))+_0x303ae7(0x1be)+_0x1f210a[_0x303ae7(0x25f)][_0x303ae7(0x1c3)],'truncated':_0x1f210a[_0x303ae7(0x253)]};return{'binary':![],'text':_0x1f210a[_0x303ae7(0x20b)],'truncated':_0x1f210a[_0x303ae7(0x253)]};}export async function readGitHistoryFileContentRange(_0x1c23ed,_0x51e1a1,_0x17ca47,_0x2cfb39,_0x347be5,_0x1eca91){const _0x2960a8=_0x29cc70;if(!Number[_0x2960a8(0x1eb)](_0x2cfb39)||_0x2cfb39<-0xbe0+-0xb*0xb9+0x5*0x3f7||!Number[_0x2960a8(0x1eb)](_0x347be5)||_0x347be5<0x49*0x5+-0x13*-0x25+-0x42b||_0x347be5>(0xfc7+-0x89e+-0x103*0x7)*(-0x1565+0x1f2e+-0x5c9)*(0x163*-0x8+0x18*-0x89+0x1bf0)||_0x2cfb39+_0x347be5>(-0x113*-0x3+0x128*-0x3+-0x1*-0x53)*(-0x897+0xc42+0x55)*(-0x22f+-0xc9*-0x2+0x49d))throw new Error(_0x2960a8(0x1b5));await assertHistoryCommitReachable(_0x1c23ed,_0x51e1a1,_0x1eca91);const _0xa2af49=safeGitWorkspacePath(_0x17ca47),_0x26b60e=_0x51e1a1+':'+_0xa2af49,_0x355d73=await runReadOnlyGit(_0x1c23ed,[_0x2960a8(0x1b1),'-s',_0x26b60e]),_0x3f6cac=Number(_0x355d73[_0x2960a8(0x20b)][_0x2960a8(0x22b)]());if(!Number[_0x2960a8(0x1eb)](_0x3f6cac)||_0x3f6cac<-0x1*0x4bb+0x177b+-0x1e0*0xa||_0x2cfb39>_0x3f6cac)throw new Error(_0x2960a8(0x1b5));if(_0x2cfb39===_0x3f6cac)return{'path':_0xa2af49,'size':_0x3f6cac,'offset':_0x2cfb39,'contentBase64':'','nextOffset':null};const _0x5bbfac=await runReadOnlyGitAllowFailure(_0x1c23ed,[_0x2960a8(0x1b1),_0x2960a8(0x1ab),_0x26b60e],{'outputLimit':_0x2cfb39+_0x347be5,'timeoutMs':GIT_HISTORY_TIMEOUT_MS});if(_0x5bbfac[_0x2960a8(0x28f)]!==-0x94*-0x43+-0x11d9+-0x14e3)throw new GitCommandError(_0x5bbfac[_0x2960a8(0x28f)],_0x5bbfac[_0x2960a8(0x1c1)]);const _0x3fe50a=_0x5bbfac[_0x2960a8(0x25f)][_0x2960a8(0x1e6)](_0x2cfb39,Math[_0x2960a8(0x1dc)](_0x3f6cac,_0x2cfb39+_0x347be5)),_0x30dc7a=_0x2cfb39+_0x3fe50a[_0x2960a8(0x1c3)];return{'path':_0xa2af49,'size':_0x3f6cac,'offset':_0x2cfb39,'contentBase64':_0x3fe50a[_0x2960a8(0x20a)](_0x2960a8(0x228)),'nextOffset':_0x30dc7a<_0x3f6cac?_0x30dc7a:null};}export async function readCurrentChanges(_0xdf9e8c){const _0x5497da=_0x29cc70;return(await readCurrentChangesSummary(_0xdf9e8c))[_0x5497da(0x289)];}export async function readCurrentChangeDiff(_0x4e7e9f,_0x4cc932){const _0x20b560=_0x29cc70,_0x1fa052=safeGitWorkspacePath(_0x4cc932);await assertCurrentChangePathAccessible(_0x4e7e9f,_0x1fa052);const _0x12127d=await readCurrentChangeGitDiff(_0x4e7e9f,_0x1fa052),_0x17f223=await readWorkingTreeText(_0x4e7e9f,_0x1fa052),_0xf9fd92=_0x12127d[_0x20b560(0x25f)][_0x20b560(0x262)](0x1*0x337+0x228c+0x565*-0x7)||_0x12127d[_0x20b560(0x20b)][_0x20b560(0x262)](_0x20b560(0x1e4))||_0x17f223?.[_0x20b560(0x297)]===!![];if(_0xf9fd92)return{'binary':!![],'summary':_0x20b560(0x24d)+createHash(_0x20b560(0x26f))[_0x20b560(0x23d)](_0x12127d[_0x20b560(0x25f)])[_0x20b560(0x243)](_0x20b560(0x196))+_0x20b560(0x1be)+_0x12127d[_0x20b560(0x25f)][_0x20b560(0x1c3)],'truncated':_0x12127d[_0x20b560(0x253)]||_0x17f223?.[_0x20b560(0x253)]===!![]};return{'binary':![],'text':_0x12127d[_0x20b560(0x20b)],'truncated':_0x12127d[_0x20b560(0x253)]||_0x17f223?.[_0x20b560(0x253)]===!![],'afterText':_0x17f223?.[_0x20b560(0x20b)]??'',..._0x17f223===undefined?{}:{'afterTruncated':_0x17f223[_0x20b560(0x253)]}};}async function readCurrentChangeGitDiff(_0x1bbe51,_0x2f9dc7){const _0x17d999=_0x29cc70,_0x547b22=await runReadOnlyGit(_0x1bbe51,[_0x17d999(0x2b3),_0x17d999(0x1da),_0x17d999(0x230),'-z','--',_0x17d999(0x242)+_0x2f9dc7]);if(_0x547b22[_0x17d999(0x20b)][_0x17d999(0x1f4)]('\x00')[_0x17d999(0x262)](_0x2f9dc7)){const _0x2b8bef=await runReadOnlyGitAllowFailure(_0x1bbe51,[_0x17d999(0x23e),_0x17d999(0x25a),_0x17d999(0x1b2),_0x17d999(0x24c),'--',_0x17d999(0x299),_0x2f9dc7]);if(_0x2b8bef[_0x17d999(0x28f)]!==-0xe85+0x11c*-0x1e+0x2fcd&&_0x2b8bef[_0x17d999(0x28f)]!==-0x2326+-0x11b7+-0x43*-0xca)throw new GitCommandError(_0x2b8bef[_0x17d999(0x28f)],_0x2b8bef[_0x17d999(0x1c1)]);return _0x2b8bef;}return runReadOnlyGit(_0x1bbe51,[_0x17d999(0x23e),_0x17d999(0x1b2),_0x17d999(0x24c),_0x17d999(0x1c4),'--',_0x17d999(0x242)+_0x2f9dc7]);}export async function isWorkspaceChangeVisible(_0x58bbf,_0x3c0fbf){const _0x3f558e=_0x29cc70;try{return await assertCurrentChangePathAccessible(_0x58bbf,safeGitWorkspacePath(_0x3c0fbf)),!![];}catch(_0x236540){if(_0x236540 instanceof Error&&(_0x236540[_0x3f558e(0x293)]===_0x3f558e(0x1d8)||_0x236540[_0x3f558e(0x293)]===_0x3f558e(0x2a1)||_0x236540[_0x3f558e(0x293)]===_0x3f558e(0x2bb)))return![];throw _0x236540;}}async function assertCurrentChangePathAccessible(_0x52f60c,_0x2664eb){const _0x419c45=_0x29cc70,_0x298393=await realpath(_0x52f60c),_0x30fd72=resolve(_0x298393,_0x2664eb),_0x4c5647=await lstat(_0x30fd72)[_0x419c45(0x19c)](_0x376d23=>{const _0x52b9aa=_0x419c45;if(_0x376d23[_0x52b9aa(0x28f)]===_0x52b9aa(0x231))return undefined;throw _0x376d23;});if(_0x4c5647===undefined)return;await resolveWorkspaceEntry(_0x298393,_0x2664eb,![]);}async function readWorkingTreeText(_0x121534,_0x59cb1b){const _0x4a11a4=_0x29cc70,_0x3fdc4f=await realpath(_0x121534);let _0x11cccd;try{_0x11cccd=await resolveWorkspaceEntry(_0x3fdc4f,_0x59cb1b,![]);}catch(_0x13145f){if(_0x13145f instanceof Error&&_0x13145f[_0x4a11a4(0x293)]===_0x4a11a4(0x2a1))return undefined;throw _0x13145f;}const _0x4c6fad=await lstat(_0x11cccd);if(!_0x4c6fad[_0x4a11a4(0x257)]())return undefined;const _0x30ea13=await readFile(_0x11cccd);return diffTextFromBuffer(_0x30ea13,_0x30ea13[_0x4a11a4(0x1c3)]>GIT_OUTPUT_LIMIT);}function diffTextFromBuffer(_0x294b19,_0x16f42f){const _0x11c5b9=_0x29cc70;if(_0x294b19[_0x11c5b9(0x262)](-0x744+0xf85*0x2+-0x17c6)||!isValidUtf8(_0x294b19))return{'binary':!![],'truncated':_0x16f42f};let _0x18640f=Math[_0x11c5b9(0x1dc)](_0x294b19[_0x11c5b9(0x1c3)],GIT_OUTPUT_LIMIT);while(_0x18640f>-0xd*0x1bb+0x2e6*-0x1+0x1965&&_0x18640f<_0x294b19[_0x11c5b9(0x1c3)]&&isUtf8ContinuationByte(_0x294b19[_0x18640f]))_0x18640f-=0x1*-0xabe+0x2*-0x1188+0x2dcf*0x1;return{'binary':![],'text':_0x294b19[_0x11c5b9(0x1e6)](-0x23fb+-0x3*-0x6dd+-0x3d9*-0x4,_0x18640f)[_0x11c5b9(0x20a)](_0x11c5b9(0x288)),'truncated':_0x16f42f};}export async function restoreCurrentChange(_0x2f1422,_0x27cc45,_0x4e5571){const _0x9eae50=_0x29cc70,_0x5a77e2=safeGitWorkspacePath(_0x27cc45),_0x34cff7=_0x9eae50(0x242)+_0x5a77e2;if(_0x4e5571===_0x9eae50(0x1b9)){const _0x3e7b61=await runReadOnlyGit(_0x2f1422,[_0x9eae50(0x1b0),_0x9eae50(0x2aa),'-z',_0x9eae50(0x193),'--',_0x34cff7]);if(!_0x3e7b61[_0x9eae50(0x20b)][_0x9eae50(0x1f4)]('\x00')[_0x9eae50(0x1fe)](_0x2713cb=>_0x2713cb[_0x9eae50(0x28c)](_0x9eae50(0x2ba))&&_0x2713cb[_0x9eae50(0x190)](0x14e*0x15+0x1333*0x1+-0x174b*0x2)===_0x5a77e2))throw new Error(_0x9eae50(0x29e));const _0x454615=await realpath(_0x2f1422),_0x4d21bd=resolve(_0x454615,_0x5a77e2),_0x4d30d0=await lstat(_0x4d21bd);if(!_0x4d30d0[_0x9eae50(0x257)]()||_0x4d30d0[_0x9eae50(0x1b8)]())throw new Error(_0x9eae50(0x29e));await unlink(_0x4d21bd);return;}if(_0x4e5571===_0x9eae50(0x2a8)){await runGit(_0x2f1422,[_0x9eae50(0x20d),_0x9eae50(0x247),'--',_0x34cff7]);return;}await runGit(_0x2f1422,[_0x9eae50(0x20d),_0x9eae50(0x1ae),_0x9eae50(0x248),_0x9eae50(0x247),'--',_0x34cff7]);}function safeGitWorkspacePath(_0x54edea){const _0x4e1ca8=_0x29cc70;if(_0x54edea[_0x4e1ca8(0x1c3)]===-0x263a+-0x7*-0x203+0x1825||_0x54edea[_0x4e1ca8(0x262)]('\x00')||_0x54edea[_0x4e1ca8(0x28c)]('/')||_0x54edea[_0x4e1ca8(0x28c)]('\x5c'))throw new Error(_0x4e1ca8(0x1d8));const _0x4c3e16=_0x54edea[_0x4e1ca8(0x278)]('\x5c','/');if(_0x4c3e16[_0x4e1ca8(0x1f4)]('/')[_0x4e1ca8(0x1fe)](_0x47df77=>_0x47df77===''||_0x47df77==='..'||_0x47df77===_0x4e1ca8(0x1ef)))throw new Error(_0x4e1ca8(0x1d8));return _0x4c3e16;}function gitChange(_0x32c58c){const _0xd8eb43=_0x29cc70;if(_0x32c58c==='A')return _0xd8eb43(0x237);if(_0x32c58c==='D')return _0xd8eb43(0x1c5);if(_0x32c58c==='R')return _0xd8eb43(0x268);if(_0x32c58c==='C')return _0xd8eb43(0x27b);if(_0x32c58c==='T')return _0xd8eb43(0x1af);return _0xd8eb43(0x249);}export class GitCommandError extends Error{[_0x29cc70(0x28f)];[_0x29cc70(0x1c1)];constructor(_0x49e359,_0x24c448){const _0x248d23=_0x29cc70;super(_0x248d23(0x1d7)),this[_0x248d23(0x28f)]=_0x49e359,this[_0x248d23(0x1c1)]=_0x24c448;}}async function runReadOnlyGit(_0x541112,_0x23e96c,_0x4a56d2={}){return runGit(_0x541112,_0x23e96c,{..._0x4a56d2,'readOnly':!![]});}async function runReadOnlyGitAllowFailure(_0x41b508,_0x4ca134,_0x187f2b={}){return runGitAllowFailure(_0x41b508,_0x4ca134,{..._0x187f2b,'readOnly':!![]});}async function runGit(_0x3b19a8,_0x3225fc,_0x1d773b={}){const _0xefb73c=_0x29cc70,_0x4b44a0=await runGitAllowFailure(_0x3b19a8,_0x3225fc,_0x1d773b);if(_0x4b44a0[_0xefb73c(0x28f)]!==0x962+0x1*-0x1b84+0x1222)throw new GitCommandError(_0x4b44a0[_0xefb73c(0x28f)],_0x4b44a0[_0xefb73c(0x1c1)]);return _0x4b44a0;}async function runGitAllowFailure(_0x49239f,_0x1e3774,_0xb0884={}){return new Promise((_0x37dcf3,_0x23e22d)=>{const _0x401d91=_0x28d1,_0x42fe6e=_0xb0884[_0x401d91(0x241)]??GIT_OUTPUT_LIMIT,_0x461b01=spawn(_0x401d91(0x2bc),[..._0x1e3774],{'cwd':_0x49239f,'shell':![],'windowsHide':!![],'stdio':[_0x401d91(0x286),_0x401d91(0x1a0),_0x401d91(0x1a0)],..._0xb0884[_0x401d91(0x2b0)]===!![]?{'env':{...process.env,'GIT_OPTIONAL_LOCKS':'0'}}:{}}),_0xdb327d=[],_0x468d34=[];let _0x25207f=0xa9*-0x1b+-0x10a6*0x2+0x1*0x331f,_0x5421eb=-0x91e*0x3+0x5de+0x19*0xdc,_0x24132c=![];const _0x1b6915=setTimeout(()=>{const _0x38eb1b=_0x401d91;if(process[_0x38eb1b(0x19b)]===_0x38eb1b(0x213)){const _0x4e901f=_0x461b01[_0x38eb1b(0x22d)];if(_0x4e901f===undefined){_0x461b01[_0x38eb1b(0x219)](_0x38eb1b(0x1b3));return;}void terminateProcessTree({'pid':_0x4e901f,'kill':_0x186d65=>_0x461b01[_0x38eb1b(0x219)](_0x186d65)},_0x38eb1b(0x213))[_0x38eb1b(0x19c)](()=>{const _0x57e46d=_0x38eb1b;try{_0x461b01[_0x57e46d(0x219)](_0x57e46d(0x1b3));}catch{}});return;}_0x461b01[_0x38eb1b(0x219)](_0x38eb1b(0x1b3));},_0xb0884[_0x401d91(0x23f)]??GIT_TIMEOUT_MS);_0x461b01[_0x401d91(0x1a2)]['on'](_0x401d91(0x1ca),_0x1fbaf9=>{const _0x6fc7e1=_0x401d91,_0x502425=Math[_0x6fc7e1(0x1d4)](0x1f2f+-0xb*-0x203+-0x1aa8*0x2,_0x42fe6e-_0x25207f);if(_0x502425>0x2*0x311+0xd*-0x10d+0x787*0x1){const _0x5f042d=_0x1fbaf9[_0x6fc7e1(0x1e6)](-0x15a9+-0x22eb+0x4*0xe25,_0x502425);_0xdb327d[_0x6fc7e1(0x21a)](_0x5f042d),_0x25207f+=_0x5f042d[_0x6fc7e1(0x1c3)];}_0x24132c||=_0x1fbaf9[_0x6fc7e1(0x1c3)]>_0x502425;}),_0x461b01[_0x401d91(0x1c1)]['on'](_0x401d91(0x1ca),_0x5bf6d2=>{const _0x195aca=_0x401d91,_0x4117c9=Math[_0x195aca(0x1d4)](-0x2*0xc5f+-0x95*0x2e+0x6*0x896,-0xde9+0x1*0x1f9d+-0x1b4-_0x5421eb);if(_0x4117c9===-0x1bcb+-0x307+0x1ed2)return;const _0x11fa8f=_0x5bf6d2[_0x195aca(0x1e6)](0x1*-0x167d+0x3d*0x91+0x10*-0xc1,_0x4117c9);_0x468d34[_0x195aca(0x21a)](_0x11fa8f),_0x5421eb+=_0x11fa8f[_0x195aca(0x1c3)];}),_0x461b01[_0x401d91(0x240)](_0x401d91(0x283),_0x16d7b0=>{clearTimeout(_0x1b6915),_0x23e22d(_0x16d7b0);}),_0x461b01[_0x401d91(0x240)](_0x401d91(0x2b6),_0x3bf4bc=>{const _0x4a46f3=_0x401d91;clearTimeout(_0x1b6915);const _0x155684=Buffer[_0x4a46f3(0x194)](_0xdb327d);_0x37dcf3({'code':_0x3bf4bc??0x86d+-0x23cf+0x1b63,'output':_0x155684,'text':_0x155684[_0x4a46f3(0x20a)](_0x4a46f3(0x288)),'stderr':Buffer[_0x4a46f3(0x194)](_0x468d34)[_0x4a46f3(0x20a)](_0x4a46f3(0x288)),'truncated':_0x24132c});});});}function isGitUnavailable(_0x396394){const _0x5ecd0f=_0x29cc70;return _0x396394 instanceof Error&&_0x5ecd0f(0x28f)in _0x396394&&_0x396394[_0x5ecd0f(0x28f)]===_0x5ecd0f(0x231);}function summarizeText(_0xa3830f){const _0x211103=_0x29cc70;return JSON[_0x211103(0x202)]({'sha256':createHash(_0x211103(0x26f))[_0x211103(0x23d)](_0xa3830f)[_0x211103(0x243)](_0x211103(0x196)),'bytes':Buffer[_0x211103(0x21b)](_0xa3830f)});}
2
+ const _0x4148b8=_0x2b8d;(function(_0x37738c,_0x924051){const _0x261eab=_0x2b8d,_0xb4e37c=_0x37738c();while(!![]){try{const _0x23094b=parseInt(_0x261eab(0x213))/(0x641*-0x1+-0x52d+-0x1*-0xb6f)+-parseInt(_0x261eab(0x20f))/(-0x88*0x16+-0x1d43+0xf*0x2bb)+parseInt(_0x261eab(0x14a))/(-0xfc1+-0xd5*-0x18+-0x1*0x434)+parseInt(_0x261eab(0x1e9))/(-0x26d1+-0x271*0x5+0x330a)*(parseInt(_0x261eab(0x185))/(0xb21+0x1c6d*-0x1+0x1151))+parseInt(_0x261eab(0x25c))/(-0x632*0x1+-0xc6*0x4+-0x95*-0x10)+-parseInt(_0x261eab(0x13f))/(0x1acd*0x1+-0x25f9+0x1*0xb33)*(-parseInt(_0x261eab(0x235))/(-0x2a*0x81+0x2604+-0x10d2))+-parseInt(_0x261eab(0x1b1))/(-0x2*-0xd86+-0xa1*0x30+0x32d);if(_0x23094b===_0x924051)break;else _0xb4e37c['push'](_0xb4e37c['shift']());}catch(_0x499a25){_0xb4e37c['push'](_0xb4e37c['shift']());}}}(_0x5465,-0xca9f*-0xa+-0x5*-0x14338+-0x459e3));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,opendir,open,readdir,readFile,realpath,rename,rm,stat,unlink,writeFile}from'node:fs/promises';import{homedir,platform as _0x223f26}from'node:os';import{basename,dirname,isAbsolute,posix,relative,resolve,sep,win32}from'node:path';import{spawn}from'node:child_process';import{minimatch}from'minimatch';import{terminateProcessTree}from'./process-tree.js';const GIT_TIMEOUT_MS=0x89c*-0x1+0x22d6+-0x2*0x359,GIT_STATUS_TIMEOUT_MS=-0x3b80+0x4eb0*0x2+0x1350,GIT_HISTORY_TIMEOUT_MS=-0x7bb*-0x2+-0xc2*0x74+0x830a,GIT_OUTPUT_LIMIT=(0x25a8+-0x10d7*-0x1+-0x347f*0x1)*(-0x1*0x2c5+0x1*-0x14c2+0x1b87),GIT_LARGE_OUTPUT_LIMIT=(0x224e+-0x248c+-0x2*-0x123)*(-0x233+0x10f*0x4+0x1f7)*(-0x521+-0x2*0xcec+0x22f9),FILE_READ_LIMIT=(0x3*0x547+-0x1d24+0xf4f*0x1)*(-0x199+0x1*-0x21a1+-0x1*-0x273a),DIRECTORY_PAGE_LIMIT=0x5*0x4e7+-0x1*-0x19a8+0x10d*-0x2f,DIRECTORY_PICKER_LIMIT=-0x5e6+-0x67b+-0xd29*-0x1,SEARCH_RESULT_LIMIT=0xaf9*0x2+-0xb2*0x1+-0x1478,GIT_WORKTREE_LIST_LIMIT=0xe5*0x16+-0x1272+-0xbc,FILE_INDEX_IDLE_TTL_MS=(0x10e9+-0x242e+0x1*0x1381)*(0x101b+-0xdf5*0x2+0xc0b*0x1)*(-0x27*0xf7+-0x19*0x4b+0x30dc),FILE_INDEX_FRESHNESS_TTL_MS=-0x26f*0xb+-0xcf70+-0xb5*-0x1f1,FILE_INDEX_ENTRY_LIMIT=0x29ae3+-0xca8a*-0x2+-0x2a957,FILE_INDEX_METADATA_CONCURRENCY=0x48*-0x2f+0x11d0+-0x478,DEFAULT_QUICK_OPEN_EXCLUDES=[_0x4148b8(0x16d),_0x4148b8(0x13e),_0x4148b8(0x245),_0x4148b8(0x16f),_0x4148b8(0x189),_0x4148b8(0x1ee),_0x4148b8(0x232),_0x4148b8(0x14e),_0x4148b8(0x15c),_0x4148b8(0x1ef),_0x4148b8(0x175),_0x4148b8(0x190),_0x4148b8(0x236),_0x4148b8(0x228),_0x4148b8(0x1f0),_0x4148b8(0x227),_0x4148b8(0x22c),_0x4148b8(0x241),_0x4148b8(0x1ad),_0x4148b8(0x147),_0x4148b8(0x1e6),_0x4148b8(0x246),_0x4148b8(0x1bb),_0x4148b8(0x1a5),_0x4148b8(0x222)],REF_PATTERN=/^(?!-)(?!.*\.\.)(?!.*@\{)[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$/;export async function createWorkspaceDirectory(_0x468a75,_0xc0f836,_0x2391d0){const _0x5afb93=_0x4148b8,_0x52ee5f=_0xc0f836[_0x5afb93(0x23b)]();if(_0x52ee5f[_0x5afb93(0x25d)]===-0xb*-0x200+0x15c6+-0x2bc6||_0x52ee5f[_0x5afb93(0x25d)]>-0x1a62+-0x116b+0x2ccc||_0x52ee5f==='.'||_0x52ee5f==='..'||_0x52ee5f[_0x5afb93(0x215)]('/')||_0x52ee5f[_0x5afb93(0x215)]('\x5c')||_0x52ee5f[_0x5afb93(0x215)]('\x00'))throw new Error(_0x5afb93(0x162));const _0x473c57=await Promise[_0x5afb93(0x1fc)](_0x2391d0[_0x5afb93(0x1ca)](_0x3653e7=>realpath(_0x3653e7))),_0x6e8bfc=await realpath(_0x468a75)[_0x5afb93(0x18a)](()=>{const _0x21044a=_0x5afb93;throw new Error(_0x21044a(0x1a8));}),_0x2c726e=await stat(_0x6e8bfc)[_0x5afb93(0x18a)](()=>undefined);if(_0x2c726e?.[_0x5afb93(0x1c1)]()!==!![]||!isWithinAllowedRoot(_0x6e8bfc,_0x473c57))throw new Error(_0x5afb93(0x1a8));const _0x454a8f=resolve(_0x6e8bfc,_0x52ee5f);if(dirname(_0x454a8f)!==_0x6e8bfc||!isWithinAllowedRoot(_0x454a8f,_0x473c57))throw new Error(_0x5afb93(0x162));try{await mkdir(_0x454a8f);}catch(_0x39b145){if(_0x39b145[_0x5afb93(0x14d)]===_0x5afb93(0x21f))throw new Error(_0x5afb93(0x149));throw _0x39b145;}return _0x454a8f;}export class WorkspaceFileIndex{[_0x4148b8(0x24f)];[_0x4148b8(0x13a)];[_0x4148b8(0x195)]=[];[_0x4148b8(0x1ae)]=![];[_0x4148b8(0x1ec)];[_0x4148b8(0x192)];[_0x4148b8(0x1be)]=!![];[_0x4148b8(0x199)];[_0x4148b8(0x17a)]=-0xf23*0x1+-0x37d*-0x2+0x829;[_0x4148b8(0x1a0)]=-0x2075*0x1+-0x1*-0x5d1+-0x5*-0x554;constructor(_0x2d45ae,_0x54dc36={}){const _0x536c65=_0x4148b8;this[_0x536c65(0x24f)]=_0x2d45ae,this[_0x536c65(0x13a)]=_0x54dc36;}async[_0x4148b8(0x218)](){const _0x2867b7=_0x4148b8;return await this[_0x2867b7(0x25f)](),this[_0x2867b7(0x1cb)](),{'entries':this[_0x2867b7(0x195)][_0x2867b7(0x186)](_0x52bbae=>_0x52bbae[_0x2867b7(0x16c)]===_0x2867b7(0x21c)),'truncated':this[_0x2867b7(0x1ae)]};}[_0x4148b8(0x180)](){const _0x375824=_0x4148b8;if(this[_0x375824(0x199)]!==undefined)clearTimeout(this[_0x375824(0x199)]);this[_0x375824(0x199)]=undefined,this[_0x375824(0x195)]=[],this[_0x375824(0x1ae)]=![],this[_0x375824(0x1be)]=!![],this[_0x375824(0x17a)]=0xcc+-0x14b8+0x13ec,this[_0x375824(0x1a0)]=-0x291*-0x1+0x8*0x2b7+-0x1849*0x1;}async[_0x4148b8(0x1e0)](_0x4d3d4d,_0x14e83e,_0x5163b3=SEARCH_RESULT_LIMIT,_0x263c57=![]){const _0x4f3a65=_0x4148b8;if(_0x4d3d4d[_0x4f3a65(0x23b)]()[_0x4f3a65(0x25d)]===-0x259b+0x4*-0x7bd+0x448f*0x1||_0x4d3d4d[_0x4f3a65(0x25d)]>-0x15b6+0x3d*0x7b+-0x699||!Number[_0x4f3a65(0x1bc)](_0x5163b3)||_0x5163b3<0x15c*0x7+0x281+-0xc04||_0x5163b3>SEARCH_RESULT_LIMIT)throw new Error(_0x4f3a65(0x1e5));await this[_0x4f3a65(0x25f)](),this[_0x4f3a65(0x1cb)]();const _0xde32f4=decodeSearchCursor(_0x14e83e,_0x4d3d4d),_0x15e5d5=_0xde32f4===undefined?undefined:this[_0x4f3a65(0x195)][_0x4f3a65(0x22e)](_0x5be700=>_0x5be700[_0x4f3a65(0x250)]===_0xde32f4&&(_0x263c57||_0x5be700[_0x4f3a65(0x16c)]===_0x4f3a65(0x21c))),_0x212ee2=_0x15e5d5===undefined?-(0x14b3+-0x1612+0x160):fuzzyPathScore(_0x15e5d5[_0x4f3a65(0x250)],_0x4d3d4d),_0xcc82c8=_0x15e5d5===undefined||_0x212ee2<-0x106a+-0x656*0x6+0x366e?undefined:{'entry':_0x15e5d5,'score':_0x212ee2},_0x5a32ff=new RankedCandidateHeap(_0x5163b3+(-0x9*0x1+0x1b2a+-0x1b20));for(const _0x32db64 of this[_0x4f3a65(0x195)]){if(!_0x263c57&&_0x32db64[_0x4f3a65(0x16c)]!==_0x4f3a65(0x21c))continue;const _0x3da148=fuzzyPathScore(_0x32db64[_0x4f3a65(0x250)],_0x4d3d4d);if(_0x3da148<0x4*-0x4eb+0x1d20+-0x974)continue;const _0x38aade={'entry':_0x32db64,'score':_0x3da148};if(_0xcc82c8!==undefined&&compareRankedCandidate(_0x38aade,_0xcc82c8)<=0x7*-0x51b+0x7ac+0x1c11)continue;_0x5a32ff[_0x4f3a65(0x164)](_0x38aade);}const _0x363bb9=_0x5a32ff[_0x4f3a65(0x230)](),_0x4cc99e=_0x363bb9[_0x4f3a65(0x20c)](-0x16a2*0x1+0x97d+0x2a1*0x5,_0x5163b3)[_0x4f3a65(0x1ca)](_0x49c17c=>_0x49c17c[_0x4f3a65(0x1f8)]),_0x20f9d0=_0x363bb9[_0x5163b3]?.[_0x4f3a65(0x1f8)][_0x4f3a65(0x250)];return{'entries':_0x4cc99e,'nextCursor':_0x20f9d0===undefined?null:encodeSearchCursor(_0x4d3d4d,_0x4cc99e['at'](-(0x1a6*-0x9+-0x1b5f+0x2a36))?.[_0x4f3a65(0x250)]??_0xde32f4??''),'truncated':_0x20f9d0!==undefined||this[_0x4f3a65(0x1ae)]};}async[_0x4148b8(0x25f)](){const _0x2ef192=_0x4148b8;if(!this[_0x2ef192(0x1be)]&&this[_0x2ef192(0x1ec)]!==undefined){if(Date[_0x2ef192(0x1ab)]()-this[_0x2ef192(0x1a0)]>=(this[_0x2ef192(0x13a)][_0x2ef192(0x1a1)]??FILE_INDEX_FRESHNESS_TTL_MS))this[_0x2ef192(0x1f9)]();return;}this[_0x2ef192(0x192)]===undefined&&(this[_0x2ef192(0x192)]=this[_0x2ef192(0x1d5)]()[_0x2ef192(0x143)](()=>{const _0x55cdec=_0x2ef192;this[_0x55cdec(0x192)]=undefined;})),await this[_0x2ef192(0x192)];}[_0x4148b8(0x1cb)](){const _0x17a2b7=_0x4148b8;if(this[_0x17a2b7(0x199)]!==undefined)clearTimeout(this[_0x17a2b7(0x199)]);this[_0x17a2b7(0x199)]=setTimeout(()=>this[_0x17a2b7(0x180)](),this[_0x17a2b7(0x13a)][_0x17a2b7(0x1bd)]??FILE_INDEX_IDLE_TTL_MS),this[_0x17a2b7(0x199)][_0x17a2b7(0x1e1)]();}async[_0x4148b8(0x1d5)](){const _0x5e6b10=_0x4148b8,_0x238382=await resolveRegisteredWorkspaceRoot(this[_0x5e6b10(0x24f)]),_0x12f739=[...DEFAULT_QUICK_OPEN_EXCLUDES,...await workspaceExcludePatterns(_0x238382)],_0x3797cb=[],_0x4a7742=this[_0x5e6b10(0x13a)][_0x5e6b10(0x1a4)]??FILE_INDEX_ENTRY_LIMIT;let _0x211a5c=![];const _0x1a87a9=['.'];let _0x2c18a3=0x1*0x1b33+0x17ee+-0x3321;while(_0x2c18a3<_0x1a87a9[_0x5e6b10(0x25d)]&&!_0x211a5c){const _0x45df06=_0x1a87a9[_0x2c18a3];_0x2c18a3+=-0x1*0x2025+-0x2535+0x455b*0x1;const _0x3b870b=await resolveWorkspaceEntryFromCanonicalRoot(_0x238382,_0x45df06,!![])[_0x5e6b10(0x18a)](()=>undefined);if(_0x3b870b===undefined)continue;const _0x43997c=await opendir(_0x3b870b)[_0x5e6b10(0x18a)](()=>undefined);if(_0x43997c===undefined)continue;let _0xe7de0f=[];const _0xbdff20=async()=>{const _0x233a8d=_0x5e6b10,_0x119f38=await Promise[_0x233a8d(0x1fc)](_0xe7de0f);_0xe7de0f=[];for(const _0x1907d2 of _0x119f38){if(_0x1907d2===undefined)continue;if(_0x1907d2[_0x233a8d(0x250)]===_0x233a8d(0x216)||_0x1907d2[_0x233a8d(0x250)][_0x233a8d(0x1af)](_0x233a8d(0x240))||isExcluded(_0x1907d2[_0x233a8d(0x250)],_0x12f739))continue;if(_0x1907d2[_0x233a8d(0x16c)]===_0x233a8d(0x1e7))_0x1a87a9[_0x233a8d(0x17f)](_0x1907d2[_0x233a8d(0x250)]);_0x3797cb[_0x233a8d(0x17f)](_0x1907d2);if(_0x3797cb[_0x233a8d(0x25d)]>=_0x4a7742){_0x211a5c=!![];break;}}};for await(const _0x46ada4 of _0x43997c){const _0x588bbf=_0x45df06==='.'?_0x46ada4[_0x5e6b10(0x151)]:posix[_0x5e6b10(0x188)](_0x45df06[_0x5e6b10(0x191)]('\x5c','/'),_0x46ada4[_0x5e6b10(0x151)]);if(_0x588bbf===_0x5e6b10(0x216)||_0x588bbf[_0x5e6b10(0x1af)](_0x5e6b10(0x240))||isExcluded(_0x588bbf,_0x12f739))continue;_0xe7de0f[_0x5e6b10(0x17f)](inspectWorkspaceIndexEntry(_0x238382,_0x588bbf,_0x46ada4[_0x5e6b10(0x151)]));if(_0xe7de0f[_0x5e6b10(0x25d)]>=FILE_INDEX_METADATA_CONCURRENCY)await _0xbdff20();if(_0x211a5c)break;}if(!_0x211a5c&&_0xe7de0f[_0x5e6b10(0x25d)]>-0xe3*-0x5+0x741+-0xbb0)await _0xbdff20();}this[_0x5e6b10(0x1ec)]=_0x238382,this[_0x5e6b10(0x195)]=_0x3797cb,this[_0x5e6b10(0x1ae)]=_0x211a5c,this[_0x5e6b10(0x1be)]=![],this[_0x5e6b10(0x17a)]=Date[_0x5e6b10(0x1ab)](),this[_0x5e6b10(0x1a0)]=this[_0x5e6b10(0x17a)];}[_0x4148b8(0x1f9)](){const _0x185c16=_0x4148b8;if(this[_0x185c16(0x192)]!==undefined)return;this[_0x185c16(0x1a0)]=Date[_0x185c16(0x1ab)](),this[_0x185c16(0x192)]=this[_0x185c16(0x1d5)]()[_0x185c16(0x18a)](()=>undefined)[_0x185c16(0x143)](()=>{const _0x149991=_0x185c16;this[_0x149991(0x192)]=undefined;});}}async function workspaceExcludePatterns(_0x12b71e){const _0xa1941c=_0x4148b8,_0x2514f1=resolve(_0x12b71e,_0xa1941c(0x19e)),_0x3e566f=await readFile(_0x2514f1,_0xa1941c(0x19b))[_0xa1941c(0x207)](JSON[_0xa1941c(0x144)])[_0xa1941c(0x18a)](()=>undefined);if(typeof _0x3e566f!==_0xa1941c(0x1db)||_0x3e566f===null)return[];return[_0xa1941c(0x226),_0xa1941c(0x18b)][_0xa1941c(0x24a)](_0x544fd1=>{const _0x27478a=_0xa1941c,_0x159478=_0x3e566f[_0x544fd1];return typeof _0x159478===_0x27478a(0x1db)&&_0x159478!==null?Object[_0x27478a(0x195)](_0x159478)[_0x27478a(0x24a)](([_0x589468,_0x33225f])=>_0x33225f===!![]?[_0x589468]:[]):[];});}function isExcluded(_0x5ed799,_0x683e96){const _0x2db8f3=_0x4148b8;return _0x683e96[_0x2db8f3(0x140)](_0x5ea217=>minimatch(_0x5ed799,_0x5ea217,{'dot':!![],'nocase':_0x223f26()!==_0x2db8f3(0x1c3)})||minimatch(_0x5ed799+'/',_0x5ea217,{'dot':!![],'nocase':_0x223f26()!==_0x2db8f3(0x1c3)}));}function compareRankedCandidate(_0x39ebed,_0x1888ff){const _0x5a7935=_0x4148b8;return _0x1888ff[_0x5a7935(0x231)]-_0x39ebed[_0x5a7935(0x231)]||_0x39ebed[_0x5a7935(0x1f8)][_0x5a7935(0x250)][_0x5a7935(0x198)](_0x1888ff[_0x5a7935(0x1f8)][_0x5a7935(0x250)]);}class RankedCandidateHeap{[_0x4148b8(0x21b)];[_0x4148b8(0x1d4)]=[];constructor(_0x594921){const _0x1bfb77=_0x4148b8;this[_0x1bfb77(0x21b)]=_0x594921;}[_0x4148b8(0x164)](_0x3ceed7){const _0x61679e=_0x4148b8;if(this[_0x61679e(0x1d4)][_0x61679e(0x25d)]<this[_0x61679e(0x21b)]){this[_0x61679e(0x1d4)][_0x61679e(0x17f)](_0x3ceed7),this[_0x61679e(0x23c)](this[_0x61679e(0x1d4)][_0x61679e(0x25d)]-(0x972+0x2b7*-0xe+-0x67*-0x47));return;}if(compareRankedCandidate(_0x3ceed7,this[_0x61679e(0x1d4)][-0xe3+-0x130f+0x13f2])>=0x6*-0x5c6+0x789*0x5+-0x1*0x309)return;this[_0x61679e(0x1d4)][-0x2377*0x1+0xb7+-0x1160*-0x2]=_0x3ceed7,this[_0x61679e(0x187)](-0x12a*-0x11+0xc8c+0x102b*-0x2);}[_0x4148b8(0x230)](){const _0x5b6bc7=_0x4148b8;return[...this[_0x5b6bc7(0x1d4)]][_0x5b6bc7(0x1fd)](compareRankedCandidate);}[_0x4148b8(0x23c)](_0x167a85){const _0x40509b=_0x4148b8;let _0x300ab7=_0x167a85;while(_0x300ab7>-0x1*0xa47+-0x1*-0x198d+0x2*-0x7a3){const _0x3c4012=Math[_0x40509b(0x212)]((_0x300ab7-(-0x2*0x6e5+-0x20ce+0x2e99))/(-0x1*0x1fbd+0xbed+0x13d2));if(compareRankedCandidate(this[_0x40509b(0x1d4)][_0x300ab7],this[_0x40509b(0x1d4)][_0x3c4012])<=0x3f2*0x1+0xc0a+-0xffc)break;[this[_0x40509b(0x1d4)][_0x300ab7],this[_0x40509b(0x1d4)][_0x3c4012]]=[this[_0x40509b(0x1d4)][_0x3c4012],this[_0x40509b(0x1d4)][_0x300ab7]],_0x300ab7=_0x3c4012;}}[_0x4148b8(0x187)](_0x7a22fb){const _0x4c771c=_0x4148b8;let _0x45b21e=_0x7a22fb;while(!![]){const _0x4303d3=_0x45b21e*(0x185*-0xb+-0x1235+0x22ee*0x1)+(-0x135f+0xc3+0x3b9*0x5);if(_0x4303d3>=this[_0x4c771c(0x1d4)][_0x4c771c(0x25d)])return;const _0x256843=_0x4303d3+(0x235+0x16cc*-0x1+0x1498),_0x5a0841=_0x256843<this[_0x4c771c(0x1d4)][_0x4c771c(0x25d)]&&compareRankedCandidate(this[_0x4c771c(0x1d4)][_0x256843],this[_0x4c771c(0x1d4)][_0x4303d3])>-0x16f8+-0x2*0xfa1+-0x16*-0x277?_0x256843:_0x4303d3;if(compareRankedCandidate(this[_0x4c771c(0x1d4)][_0x5a0841],this[_0x4c771c(0x1d4)][_0x45b21e])<=0xfe0+0x2193+-0x3173)return;[this[_0x4c771c(0x1d4)][_0x45b21e],this[_0x4c771c(0x1d4)][_0x5a0841]]=[this[_0x4c771c(0x1d4)][_0x5a0841],this[_0x4c771c(0x1d4)][_0x45b21e]],_0x45b21e=_0x5a0841;}}}function fuzzyPathScore(_0x2d5680,_0x52c66c){const _0x4ea035=_0x4148b8,_0x57a0bb=_0x2d5680[_0x4ea035(0x1cc)](),_0x59920b=_0x52c66c[_0x4ea035(0x23b)]()[_0x4ea035(0x1cc)]();let _0x4fbb34=0xef3+0x216d+-0x3060,_0x4b7be6=0xd29+-0xa7c+-0x89*0x5,_0x360450=-(-0x253e+-0x258+0x2798*0x1);for(const _0x307dd6 of _0x59920b){const _0x1ec9a8=_0x57a0bb[_0x4ea035(0x14f)](_0x307dd6,_0x4fbb34);if(_0x1ec9a8===-(0x91e+0x2*0x1314+-0x1*0x2f45))return-(-0x139*-0x3+-0x2*0x427+0x4a4);_0x4b7be6+=_0x1ec9a8===_0x360450+(-0x3*-0x4ba+-0x1336*-0x1+-0x1*0x2163)?-0xf35+0x1319+-0x3d8:-0x154a+-0x7*0x47e+0x1*0x34bd;if(_0x1ec9a8===0x6e*-0x29+0x1*0x162+0x1*0x103c||_0x4ea035(0x1fb)[_0x4ea035(0x215)](_0x57a0bb[_0x1ec9a8-(0x225f+-0x222b+-0x33)]??''))_0x4b7be6+=-0x7a7*0x5+0x1*0x1a65+0xbe6;_0x360450=_0x1ec9a8,_0x4fbb34=_0x1ec9a8+(-0x2*-0xb3+-0xde5*0x1+0xc80);}const _0x2e4fa4=_0x2d5680[_0x4ea035(0x20c)](_0x2d5680[_0x4ea035(0x1b2)]('/')+(-0x9b3*0x3+-0x3*-0x922+-0x1b4*-0x1))[_0x4ea035(0x1cc)]();if(_0x2e4fa4[_0x4ea035(0x215)](_0x59920b))_0x4b7be6+=0x1*0x249b+0x395*0x8+-0x411b;else{if(_0x57a0bb[_0x4ea035(0x215)](_0x59920b))_0x4b7be6+=-0xf71+-0x17c0+-0x2741*-0x1;}return _0x4b7be6-_0x2d5680[_0x4ea035(0x25d)]/(0x17ee*-0x1+0xdf3*-0x1+-0x13*-0x233);}export async function listWorkspaceDirectories(_0x39292b,_0x17b71c,_0x10ec0e=homedir()){const _0x1f0655=_0x4148b8,_0x55f1d6=await realpath(_0x10ec0e),_0x1cb5d4=await Promise[_0x1f0655(0x1fc)](_0x17b71c[_0x1f0655(0x1ca)](_0xf833fb=>realpath(_0xf833fb))),_0x3b7200=[...new Set([_0x55f1d6,..._0x1cb5d4])],_0xfe9a1d=_0x39292b===undefined?_0x1cb5d4[0x9a0+-0x1*0x241d+-0x1*-0x1a7d]??_0x55f1d6:await realpath(_0x39292b),_0x220e30=await stat(_0xfe9a1d);if(!_0x220e30[_0x1f0655(0x1c1)]()||!isWithinAllowedRoot(_0xfe9a1d,_0x3b7200))throw new Error(_0x1f0655(0x1a8));const _0x3479cf=await readdir(_0xfe9a1d,{'withFileTypes':!![]}),_0xaf9558=[];for(const _0xb85af4 of _0x3479cf[_0x1f0655(0x1fd)]((_0x2d220f,_0x3f477c)=>_0x2d220f[_0x1f0655(0x151)][_0x1f0655(0x198)](_0x3f477c[_0x1f0655(0x151)]))){if(!_0xb85af4[_0x1f0655(0x1c1)]()&&!_0xb85af4[_0x1f0655(0x19a)]())continue;const _0xb9ddee=await realpath(resolve(_0xfe9a1d,_0xb85af4[_0x1f0655(0x151)]))[_0x1f0655(0x18a)](()=>undefined);if(_0xb9ddee===undefined||!isWithinAllowedRoot(_0xb9ddee,_0x3b7200))continue;const _0x1c22c9=await stat(_0xb9ddee)[_0x1f0655(0x18a)](()=>undefined);if(_0x1c22c9===undefined||!_0x1c22c9[_0x1f0655(0x1c1)]())continue;_0xaf9558[_0x1f0655(0x17f)]({'path':_0xb9ddee,'name':_0xb85af4[_0x1f0655(0x151)],'selectable':isWithinAllowedRoot(_0xb9ddee,_0x1cb5d4)});if(_0xaf9558[_0x1f0655(0x25d)]>DIRECTORY_PICKER_LIMIT)break;}const _0x1cb0cb=dirname(_0xfe9a1d);return{'homePath':_0x55f1d6,'currentPath':_0xfe9a1d,'parentPath':_0x1cb0cb===_0xfe9a1d||!isWithinAllowedRoot(_0x1cb0cb,_0x3b7200)?null:_0x1cb0cb,'browseRoots':_0x1cb5d4,'selectable':isWithinAllowedRoot(_0xfe9a1d,_0x1cb5d4),'entries':_0xaf9558[_0x1f0655(0x20c)](0x1dfe+-0x3*-0x1c7+-0x2353,DIRECTORY_PICKER_LIMIT),'truncated':_0xaf9558[_0x1f0655(0x25d)]>DIRECTORY_PICKER_LIMIT};}export async function listWorkspaceFiles(_0x3ec6ae,_0x1967e9='.',_0x342052,_0x3c2dd4=DIRECTORY_PAGE_LIMIT){const _0x338c65=_0x4148b8;if(!Number[_0x338c65(0x1bc)](_0x3c2dd4)||_0x3c2dd4<-0x1*-0x25e1+-0x24bd+0x123*-0x1||_0x3c2dd4>DIRECTORY_PAGE_LIMIT)throw new Error(_0x338c65(0x1b8));const _0x157520=await resolveRegisteredWorkspaceRoot(_0x3ec6ae),_0x43c05b=await resolveWorkspaceEntryFromCanonicalRoot(_0x157520,_0x1967e9,!![]),_0x343e17=await readdir(_0x43c05b,{'withFileTypes':!![]}),_0x51e328=decodeDirectoryCursor(_0x342052,_0x1967e9),_0x4194bb=_0x343e17[_0x338c65(0x186)](_0x4ccac2=>_0x4ccac2[_0x338c65(0x151)]!==_0x338c65(0x216)&&!isWorkspaceUploadTemporaryName(_0x4ccac2[_0x338c65(0x151)]))[_0x338c65(0x1ca)](_0x36941e=>_0x36941e[_0x338c65(0x151)])[_0x338c65(0x1fd)]((_0x1ac65b,_0x45c272)=>_0x1ac65b[_0x338c65(0x198)](_0x45c272)),_0x4b2d06=_0x51e328===undefined?0x3*0x4eb+-0x2360+-0x1*-0x149f:_0x4194bb[_0x338c65(0x1ff)](_0x55deae=>_0x55deae>_0x51e328);if(_0x51e328!==undefined&&_0x4b2d06===-(-0x116e+0x157+-0x2*-0x80c))return{'entries':[],'nextCursor':null,'truncated':![]};const _0x3f4e38=_0x4194bb[_0x338c65(0x20c)](_0x4b2d06,_0x4b2d06+_0x3c2dd4),_0x54b52c=[];for(const _0x18ecab of _0x3f4e38){const _0x23a952=await resolveWorkspaceEntry(_0x157520,relative(_0x157520,resolve(_0x43c05b,_0x18ecab)),![])[_0x338c65(0x18a)](_0x83c482=>{if(isSkippableWorkspaceEntryError(_0x83c482))return undefined;throw _0x83c482;});if(_0x23a952===undefined)continue;const _0x4fdedd=await lstat(_0x23a952)[_0x338c65(0x18a)](_0x5301b7=>{const _0x11e584=_0x338c65;if(_0x5301b7[_0x11e584(0x14d)]===_0x11e584(0x172))return undefined;throw _0x5301b7;});if(_0x4fdedd===undefined||!_0x4fdedd[_0x338c65(0x251)]()&&!_0x4fdedd[_0x338c65(0x1c1)]())continue;_0x54b52c[_0x338c65(0x17f)]({'path':relative(_0x157520,_0x23a952)[_0x338c65(0x1c6)](sep)[_0x338c65(0x188)]('/'),'name':_0x18ecab,'kind':_0x4fdedd[_0x338c65(0x1c1)]()?_0x338c65(0x1e7):_0x338c65(0x21c),'size':_0x4fdedd[_0x338c65(0x251)]()?_0x4fdedd[_0x338c65(0x176)]:null,'modifiedAt':_0x4fdedd[_0x338c65(0x24d)]});}const _0x2c9a45=_0x4194bb[_0x4b2d06+_0x3f4e38[_0x338c65(0x25d)]];return{'entries':_0x54b52c,'nextCursor':_0x2c9a45===undefined||_0x3f4e38[_0x338c65(0x25d)]===0x2045+0x1338+-0x31*0x10d?null:encodeDirectoryCursor(_0x1967e9,_0x3f4e38[_0x3f4e38[_0x338c65(0x25d)]-(0x265d+0x1d8+-0x2834)]),'truncated':_0x2c9a45!==undefined};}export async function mutateWorkspaceFile(_0x146615,_0x3d7848){const _0x31e726=_0x4148b8,_0x4cb2e=await resolveRegisteredWorkspaceRoot(_0x146615);if(_0x3d7848[_0x31e726(0x252)]===_0x31e726(0x1f3)||_0x3d7848[_0x31e726(0x252)]===_0x31e726(0x148)){const _0x287478=await resolveNewWorkspaceEntry(_0x4cb2e,_0x3d7848[_0x31e726(0x250)]);if(_0x3d7848[_0x31e726(0x252)]===_0x31e726(0x1f3))await writeFile(_0x287478,'',{'flag':'wx'});else await mkdir(_0x287478);return{'path':workspaceRelativePath(_0x4cb2e,_0x287478)};}await assertWorkspaceMutationPathHasNoSymlinks(_0x4cb2e,_0x3d7848[_0x31e726(0x250)]);const _0x12be10=await resolveWorkspaceEntryMetadata(_0x4cb2e,_0x3d7848[_0x31e726(0x250)]);if(workspaceRelativePath(_0x4cb2e,_0x12be10[_0x31e726(0x250)])==='.')throw new Error(_0x31e726(0x179));if(_0x3d7848[_0x31e726(0x252)]===_0x31e726(0x15d))return await rm(_0x12be10[_0x31e726(0x250)],{'recursive':_0x12be10[_0x31e726(0x1f2)][_0x31e726(0x1c1)](),'force':![]}),{'deleted':!![]};const _0x4b0750=await resolveNewWorkspaceEntry(_0x4cb2e,_0x3d7848[_0x31e726(0x1f5)]);if(_0x12be10[_0x31e726(0x1f2)][_0x31e726(0x1c1)]()){const _0xdc8ad4=relative(_0x12be10[_0x31e726(0x250)],_0x4b0750);if(_0xdc8ad4===''||!isAbsolute(_0xdc8ad4)&&_0xdc8ad4!=='..'&&!_0xdc8ad4[_0x31e726(0x1af)]('..'+sep))throw new Error(_0x31e726(0x261));}return await rename(_0x12be10[_0x31e726(0x250)],_0x4b0750),{'path':workspaceRelativePath(_0x4cb2e,_0x4b0750)};}async function resolveNewWorkspaceEntry(_0x124e6f,_0xc7457b){const _0x8a68e7=_0x4148b8,_0x4fd088=_0xc7457b[_0x8a68e7(0x191)]('\x5c','/'),_0x2d5435=_0x4fd088[_0x8a68e7(0x1c6)]('/'),_0xcf091d=_0x2d5435['at'](-(0x10d0+-0x1*0x7ef+-0x10*0x8e));if(_0xc7457b[_0x8a68e7(0x215)]('\x00')||_0x4fd088[_0x8a68e7(0x1af)]('/')||isAbsolute(_0xc7457b)||win32[_0x8a68e7(0x163)](_0x4fd088)||_0xcf091d===undefined||_0xcf091d[_0x8a68e7(0x25d)]===-0x758+0x6da+0x7e*0x1||_0x2d5435[_0x8a68e7(0x140)](invalidWorkspaceMutationSegment))throw new Error(_0x8a68e7(0x13c));const _0x4d3d5b=_0x2d5435[_0x8a68e7(0x25d)]===0x204d+0x9bc+0x434*-0xa?'.':_0x2d5435[_0x8a68e7(0x20c)](-0x1282+-0x1bbf*0x1+0x2e41,-(0x2395+-0xc*-0x1e2+-0x3a2c))[_0x8a68e7(0x188)]('/');await assertWorkspaceMutationPathHasNoSymlinks(_0x124e6f,_0x4d3d5b);const _0x3ac750=await resolveWorkspaceEntryFromCanonicalRoot(_0x124e6f,_0x4d3d5b,!![]),_0xdfb148=resolve(_0x3ac750,_0xcf091d);try{await lstat(_0xdfb148);throw new Error(_0x8a68e7(0x20a));}catch(_0x1bb006){if(_0x1bb006[_0x8a68e7(0x14d)]!==_0x8a68e7(0x172))throw _0x1bb006;}return _0xdfb148;}async function assertWorkspaceMutationPathHasNoSymlinks(_0x365d48,_0x8aa691){const _0x3e759d=_0x4148b8,_0x1f24ff=_0x8aa691[_0x3e759d(0x191)]('\x5c','/');if(_0x1f24ff==='.')return;const _0x4ee21b=_0x1f24ff[_0x3e759d(0x1c6)]('/');if(_0x8aa691[_0x3e759d(0x215)]('\x00')||_0x1f24ff[_0x3e759d(0x1af)]('/')||isAbsolute(_0x8aa691)||win32[_0x3e759d(0x163)](_0x1f24ff)||_0x4ee21b[_0x3e759d(0x140)](invalidWorkspaceMutationSegment))throw new Error(_0x3e759d(0x13c));let _0x556ffe=_0x365d48;for(const _0x142cb2 of _0x4ee21b){_0x556ffe=resolve(_0x556ffe,_0x142cb2);const _0x342ad6=await lstat(_0x556ffe)[_0x3e759d(0x18a)](_0x77af46=>{const _0x315bcb=_0x3e759d;if(_0x77af46[_0x315bcb(0x14d)]===_0x315bcb(0x172))throw new Error(_0x315bcb(0x1f6));throw _0x77af46;});if(_0x342ad6[_0x3e759d(0x19a)]())throw new Error(_0x3e759d(0x13c));}}function invalidWorkspaceMutationSegment(_0x169aa3){const _0x2b04c2=_0x4148b8;if(_0x169aa3[_0x2b04c2(0x25d)]===0x3d2+0x1*-0x1813+-0x5*-0x40d||_0x169aa3==='.'||_0x169aa3==='..'||_0x169aa3===_0x2b04c2(0x216))return!![];if(_0x223f26()!==_0x2b04c2(0x1f1))return![];const _0x10a881=_0x169aa3[_0x2b04c2(0x1dc)](/[. ]+$/u,'')[_0x2b04c2(0x24e)]();return/[<>:"|?*]/u[_0x2b04c2(0x194)](_0x169aa3)||/^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$/u[_0x2b04c2(0x194)](_0x10a881);}function workspaceRelativePath(_0x3e0f21,_0x118259){const _0x5753bc=_0x4148b8,_0x18f58f=relative(_0x3e0f21,_0x118259)[_0x5753bc(0x1c6)](sep)[_0x5753bc(0x188)]('/');return _0x18f58f[_0x5753bc(0x25d)]===-0x231d+-0x17*-0x53+-0x6*-0x49c?'.':_0x18f58f;}function isSkippableWorkspaceEntryError(_0x54ba39){const _0x43c68c=_0x4148b8;return _0x54ba39 instanceof Error&&(_0x54ba39[_0x43c68c(0x1ac)]===_0x43c68c(0x13c)||_0x54ba39[_0x43c68c(0x1ac)]===_0x43c68c(0x1f6)||_0x54ba39[_0x43c68c(0x1ac)]===_0x43c68c(0x1ba));}export async function preflightWorkspaceUpload(_0x3b4afa,_0x5b3a8a,_0x217b8f){const _0x5a6ac0=_0x4148b8;if(_0x217b8f[_0x5a6ac0(0x25d)]===-0x25*-0x7f+0x1d*-0x124+0xeb9||_0x217b8f==='.'||_0x217b8f==='..'||_0x217b8f[_0x5a6ac0(0x215)]('\x00')||_0x217b8f[_0x5a6ac0(0x215)]('/')||_0x217b8f[_0x5a6ac0(0x215)]('\x5c')||isWorkspaceUploadTemporaryName(_0x217b8f))return{'path':'','absolutePath':'','status':_0x5a6ac0(0x17b)};const _0x1ca257=await resolveRegisteredWorkspaceRoot(_0x3b4afa),_0x2817e4=await resolveWorkspaceEntry(_0x1ca257,_0x5b3a8a,!![]),_0x4491b8=resolve(_0x2817e4,_0x217b8f);if(dirname(_0x4491b8)!==_0x2817e4)throw new Error(_0x5a6ac0(0x13c));const _0x86db82=relative(_0x1ca257,_0x4491b8)[_0x5a6ac0(0x1c6)](sep)[_0x5a6ac0(0x188)]('/'),_0x3e0bf2=await lstat(_0x4491b8)[_0x5a6ac0(0x18a)](_0x1a5e21=>{const _0x245483=_0x5a6ac0;if(_0x1a5e21[_0x245483(0x14d)]===_0x245483(0x172))return undefined;throw _0x1a5e21;});if(_0x3e0bf2===undefined)return{'path':_0x86db82,'absolutePath':_0x4491b8,'status':_0x5a6ac0(0x259)};if(_0x3e0bf2[_0x5a6ac0(0x19a)]())throw new Error(_0x5a6ac0(0x13c));if(_0x3e0bf2[_0x5a6ac0(0x251)]())return{'path':_0x86db82,'absolutePath':_0x4491b8,'status':_0x5a6ac0(0x211)};return{'path':_0x86db82,'absolutePath':_0x4491b8,'status':_0x5a6ac0(0x210)};}export function workspaceUploadTemporaryName(_0x41c4d9){const _0x5a5d61=_0x4148b8;return _0x5a5d61(0x1b0)+_0x41c4d9+_0x5a5d61(0x20e);}function isWorkspaceUploadTemporaryName(_0x4709af){const _0x9e9842=_0x4148b8;return/^\.mar-upload-[0-9a-f-]{36}\.part$/iu[_0x9e9842(0x194)](_0x4709af)||/^\.mar-edit-[0-9a-f-]{36}\.part$/iu[_0x9e9842(0x194)](_0x4709af);}export async function readWorkspaceTextFile(_0x5234b6,_0x42cc15,_0x2c57b0=0x8f*-0x1e+-0xdc0+0x163*0x16,_0xf9ef2e=FILE_READ_LIMIT){const _0x48c7ed=_0x4148b8;if(!Number[_0x48c7ed(0x1bc)](_0x2c57b0)||_0x2c57b0<0xd*-0x22f+0x7f9+0xc9*0x1a||!Number[_0x48c7ed(0x1bc)](_0xf9ef2e)||_0xf9ef2e<0x16a8+-0x13*0x6b+-0xeb6||_0xf9ef2e>FILE_READ_LIMIT)throw new Error(_0x48c7ed(0x157));const _0x30986a=await resolveRegisteredWorkspaceRoot(_0x5234b6),_0x5e7e4a=await resolveWorkspaceEntry(_0x30986a,_0x42cc15,![]),_0x2cb089=await lstat(_0x5e7e4a);if(!_0x2cb089[_0x48c7ed(0x251)]())throw new Error(_0x48c7ed(0x1ba));if(_0x2cb089[_0x48c7ed(0x176)]>FILE_READ_LIMIT*(-0x3b*0x47+-0xf04+0x3*0xa7b))throw new Error(_0x48c7ed(0x21d));const _0x1ea2c8=await readFile(_0x5e7e4a),_0x4ba988=createHash(_0x48c7ed(0x23a))[_0x48c7ed(0x219)](_0x1ea2c8)[_0x48c7ed(0x1a2)](_0x48c7ed(0x1cf)),_0x296740=_0x1ea2c8[_0x48c7ed(0x215)](0x51a*0x4+-0xd77+-0x6f1)||!isValidUtf8(_0x1ea2c8);if(_0x296740){const _0x30c09b=Math[_0x48c7ed(0x145)](_0x1ea2c8[_0x48c7ed(0x25d)],_0x2c57b0+_0xf9ef2e),_0xbcab78=_0x1ea2c8[_0x48c7ed(0x182)](_0x2c57b0,_0x30c09b);return{'path':relative(_0x30986a,_0x5e7e4a)[_0x48c7ed(0x1c6)](sep)[_0x48c7ed(0x188)]('/'),'encoding':_0x48c7ed(0x24b),'size':_0x1ea2c8[_0x48c7ed(0x25d)],'content':_0xbcab78[_0x48c7ed(0x1b9)](_0x48c7ed(0x24b)),'truncated':_0x30c09b<_0x1ea2c8[_0x48c7ed(0x25d)],'nextOffset':_0x30c09b<_0x1ea2c8[_0x48c7ed(0x25d)]?_0x30c09b:null,'revision':_0x4ba988};}if(_0x2c57b0>-0xd4a+0x1b3+0xb97&&_0x2c57b0<_0x1ea2c8[_0x48c7ed(0x25d)]&&isUtf8ContinuationByte(_0x1ea2c8[_0x2c57b0]))throw new Error(_0x48c7ed(0x157));let _0x416f13=Math[_0x48c7ed(0x145)](_0x1ea2c8[_0x48c7ed(0x25d)],_0x2c57b0+_0xf9ef2e);if(_0x416f13<_0x1ea2c8[_0x48c7ed(0x25d)]&&isUtf8ContinuationByte(_0x1ea2c8[_0x416f13])){while(_0x416f13>_0x2c57b0&&isUtf8ContinuationByte(_0x1ea2c8[_0x416f13]))_0x416f13-=-0x5*0x51e+-0x189*0x3+-0xf19*-0x2;if(_0x416f13===_0x2c57b0){_0x416f13+=-0x63f+0xaed+-0x7*0xab;while(_0x416f13<_0x1ea2c8[_0x48c7ed(0x25d)]&&isUtf8ContinuationByte(_0x1ea2c8[_0x416f13]))_0x416f13+=-0x1a2*-0x15+0x27*0xc7+-0x409a;}}const _0x8bcac3=_0x1ea2c8[_0x48c7ed(0x182)](_0x2c57b0,_0x416f13),_0x49f0fb=new TextDecoder(_0x48c7ed(0x153),{'fatal':!![]})[_0x48c7ed(0x203)](_0x8bcac3),_0x43c12c=_0x416f13<_0x1ea2c8[_0x48c7ed(0x25d)]?_0x416f13:null;return{'path':relative(_0x30986a,_0x5e7e4a)[_0x48c7ed(0x1c6)](sep)[_0x48c7ed(0x188)]('/'),'encoding':_0x48c7ed(0x153),'size':_0x1ea2c8[_0x48c7ed(0x25d)],'content':_0x49f0fb,'truncated':_0x43c12c!==null,'nextOffset':_0x43c12c,'revision':_0x4ba988};}export async function writeWorkspaceTextFile(_0x53ee4c,_0x1b34de,_0x32e1a0,_0x399f83){const _0x5f5a73=_0x4148b8;if(!/^[0-9a-f]{64}$/u[_0x5f5a73(0x194)](_0x399f83))throw new Error(_0x5f5a73(0x1c5));const _0x74f2a3=Buffer[_0x5f5a73(0x158)](_0x32e1a0,_0x5f5a73(0x19b));if(_0x74f2a3[_0x5f5a73(0x25d)]>FILE_READ_LIMIT*(0x269b+-0x137d+-0x12*0x10f))throw new Error(_0x5f5a73(0x21d));if(_0x74f2a3[_0x5f5a73(0x215)](-0x1*0x19cf+0x2552+-0xb83*0x1))throw new Error(_0x5f5a73(0x13d));const _0x536eca=await resolveRegisteredWorkspaceRoot(_0x53ee4c);await assertWorkspaceMutationPathHasNoSymlinks(_0x536eca,_0x1b34de);const _0x2a070=await resolveWorkspaceEntry(_0x536eca,_0x1b34de,![]),_0x25680a=await lstat(_0x2a070);if(!_0x25680a[_0x5f5a73(0x251)]())throw new Error(_0x5f5a73(0x1ba));const _0x441d90=await readFile(_0x2a070);if(_0x441d90[_0x5f5a73(0x215)](0x113f+-0x1e53*-0x1+-0x2f92)||!isValidUtf8(_0x441d90))throw new Error(_0x5f5a73(0x13d));const _0x323a8f=createHash(_0x5f5a73(0x23a))[_0x5f5a73(0x219)](_0x441d90)[_0x5f5a73(0x1a2)](_0x5f5a73(0x1cf));if(_0x323a8f!==_0x399f83)throw new Error(_0x5f5a73(0x258));const _0x271a5f=createHash(_0x5f5a73(0x23a))[_0x5f5a73(0x219)](_0x74f2a3)[_0x5f5a73(0x1a2)](_0x5f5a73(0x1cf)),_0x79a2a9=resolve(dirname(_0x2a070),_0x5f5a73(0x1e3)+randomUUID()+_0x5f5a73(0x20e));try{await writeFile(_0x79a2a9,_0x74f2a3,{'flag':'wx','mode':_0x25680a[_0x5f5a73(0x15f)]}),await rename(_0x79a2a9,_0x2a070);}finally{await rm(_0x79a2a9,{'force':!![]})[_0x5f5a73(0x18a)](()=>undefined);}return{'path':workspaceRelativePath(_0x536eca,_0x2a070),'revision':_0x271a5f,'size':_0x74f2a3[_0x5f5a73(0x25d)]};}function _0x5465(){const _0x1f8f5c=['rKLmrv9ot1rFvevyva','kIOVBM9Kzv9TB2r1BgvZlYOQ','mJyZmJa0ou1xDK5PzW','C29Tzq','CMvMCY9Yzw1VDgvZ','ls1NAxqTy29TBw9UlwrPCG','zMLUywXSEq','CgfYC2u','BwLU','CMvMCW','kIOVyMLUlYOQ','q1jfqvrfx0rjuKvdve9swq','v09ss1nqqunfx0rjuKvdve9swv9fweLtvfm','mZiYotCZmxvdvfzKsW','yMfZzty0DxjS','vu5uuKfds0ve','y29Kzq','kIOVlNr1CMjVlYOQ','Aw5KzxHpzG','yNL0zuXLBMD0Aa','BMfTzq','v09ss1nqqunfx0rfvKLdrv9qqvrix1jfsKvdveve','DxrMltG','AgfZAa','qureruq','D29YA3rYzwu','rKLmrv9squ5hrv9jtLzbteLe','zNjVBq','B3v0Chv0','y2XVC2u','ls1ZB3vYy2u9sevbra','kIOVzgLZDc8QkG','revmrvrf','ls1WB3jJzwXHAw4','Bw9Kzq','CxvLCNK','ls1ZAg93lxn1CgvYChjVAMvJDc13B3jRAw5NlxrYzwu','v09ss1nqqunfx0rjuKvdve9swv9oqu1fx0LovKfmsuq','AxnbyNnVBhv0zq','ywrK','Chj1BMfIBguG','ls10B3bVlw9YzgvY','Dg9mB3DLCKnHC2u','v09ss1nqqunfx05pvf9bteXpv0ve','r0Lux1jfrL9jtLzbteLe','C3rYAw5N','lI4U','A2LUza','kIOVlMDPDc8QkG','ls1TyxGTy291BNq9','kIOVlNbUCg0VkIO','iYmG','ls1VDgHLCNm','ru5pru5u','CMvMCY9OzwfKCW','Chj1BMfIBgu','kIOVB3v0lYOQ','C2L6zq','C2v0','zgLMzI10CMvL','rKLmrv9st09ux01vvefusu9ox0LovKfmsuq','CMvMCMvZAgvKqxq','su5wquXjrf9oqu1f','CMvHza','AgfZ','BM9YBwfSAxPL','ChvZAa','zgLZCg9Zzq','C3rKzxjY','C3vIyxjYyxK','ls1UBY1PBMrLEa','ls1PCY1HBMnLC3rVCG','mZa0mJC5nu5iAMPHsa','zMLSDgvY','C2LUA0rVD24','AM9PBG','kIOVlNLHCM4VkIO','y2f0y2G','C2vHCMnOlMv4y2X1zgu','CMvZDg9Yzq','r0Lux1jfue9tsvrpuLLFsu5wquXjra','CMvHze9UBhK','ls1LEgnSDwrLlxn0yw5KyxjK','kIOVy292zxjHz2uVkIO','CMvWBgfJzufSBa','Bg9HzgLUzW','v09ss1nqqunfx1bmqvrgt1jnx1vou1vque9sveve','DgvZDa','zw50CMLLCW','rKLmrv9ot1rFreLsrunut1jz','ls1XDwLLDa','Bg9JywXLq29TCgfYzq','zxHWAxj5vgLTzxi','AxntEw1IB2XPy0XPBMS','DxrMoa','z2L0','Bg9JA2vK','lNzZy29Kzs9Zzxr0Aw5NCY5QC29U','l2rLDI9UDwXS','CMvMCMvZAef0DgvTChrLzef0','zNjLC2HUzxnZvhrStxm','zgLNzxn0','CMvMCY9Yzw1VDgvZlW','zw50CNLmAw1PDa','kIOVlNzLBNyVkIO','AxnjBNrLz2vY','A2LSBa','v09ss1nqqunfx0rjuKvdve9swv9ot1rFquXmt1Dfra','CgLK','Aw52ywXPza','BM93','BwvZC2fNzq','kIOVlMDYywrSzs8QkG','Dhj1BMnHDgvK','C3rHCNrZv2L0Aa','lM1HCI11CgXVywqT','mJqWmZq1nZjdtfHvqw0','BgfZDeLUzgv4t2y','yMLUyxj5igrPzMyGC2HHmJu2pq','BgLTAxq','B3v0Chv0tgLTAxq','zMLUz2vYChjPBNq','CMv2lxbHCNnL','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','Dg9tDhjPBMC','rKLmrv9ot1rFuKvhvuXbuG','kIOVx19WEwnHy2HLx18VkIO','AxntywzLsw50zwDLCG','AwrSzvr0Be1Z','C3rHBgu','ls1YB290','ls1UBY10zxH0y29UDG','AxneAxjLy3rVCNK','vfLqrv9dsefor0ve','BgLUDxG','zgLMzG','rKLmrv9srvzju0LptL9jtLzbteLe','C3bSAxq','BhmTzMLSzxm','ls1MB3jTyxq9juGLEdaWjvaLEdaWjwfUjxGWmcvHzsv4mdaLy3qLEdaWjxm','oIHSAxrLCMfSkq','BwfW','Dg91y2G','Dg9mB2nHBgvmB3DLCKnHC2u','ls1MB3jTyxq9','yMfYzq','Agv4','sevbra','yMXVyG','B25Jzq','y3vYC29Y','DMfSDwvZ','CMvIDwLSza','ls1UBY1JB21TAxqTAwq','q09qsuve','ls1ZA2LWpq','r0Lux0nptu1btKrFrKfjteve','zxzLCNK','B2jQzwn0','CMvWBgfJzq','C2HVDW','BwvYz2uTyMfZzq','B2zMC2v0','C2vHCMnO','Dw5Yzwy','C3vIBw9KDwXL','lM1HCI1LzgL0lq','r0Lux1DpuKTtuefdrq','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','kIOVB2jQlYOQ','reLsrunut1jz','yMLUyxj5','oefnBun6CG','v09ss1nqqunfx1bbveHFtK9ux0fcu09mvvrf','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','CM9VDa','ls1MAxjZDc1WyxjLBNq','kIOVlMnHy2HLlYOQ','kIOVyNvPBgqVkIO','kIOVlM51EhqVkIO','D2LUmZi','Bwv0ywrHDge','q1jfqvrfx0zjteu','CMvSyxrPDMu','zgvZDgLUyxrPB24','rKLmrv9ot1rFrK9vtKq','ywXSB2nvBNnHzMu','zw50CNK','CMvMCMvZAeLUqMfJA2DYB3vUza','y2f0lwzPBgu','lY5Flq','ywXS','C29YDa','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','zMLUzeLUzgv4','ls1ICMfUy2HLCW','y29Uy2f0','revmrvrfra','zgvJB2rL','Bwf4','D29YA3rYzwuG','CgXHDgzVCM0','DgHLBG','ls1Yzw1VDgvZ','CgLWzq','rKLmrv9btfjfqurzx0vysvnuuW','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','C2XPy2u','C3rKB3v0','lNbHCNq','mtiYmti5mePzqK5AAq','rvHju1rtx0rjuKvdve9swq','rvHju1rtx0zjteu','zMXVB3i','nZyXnZmXvffmBeDA','CMvMCY9OzwfKCY8','Aw5JBhvKzxm','lMDPDa','ls11BNrYywnRzwqTzMLSzxm9ywXS','y29UDgvUDenHBMrPzgf0zxm','DxbKyxrL','pZ8G','y2fWywnPDhK','rKLmrq','rKLmrv9ut09Ftefsr0u','ls1KyxrLlw9YzgvY','ruvysvnu','ls1ZDgfNzwq','Dgv4Da','kIOVDMvUDI8QkG','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','zgf0yq','sevbrca','zMLSzxmUzxHJBhvKzq','kIOVlNn2zwX0zs1RAxqVkIO','kIOVlM5LEhqVkIO','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','r0Lux1DpuKTuuKvfx0Xju1rFsu5wquXjra','C2HPzNq','kIOVlMfUz3vSyxiVkIO','Bg9N','zMLUza','DgLTzw91De1Z','C29YDgvK','C2nVCMu','kIOVlNbHCMnLBc1JywnOzs8QkG','uKvnt1rf','C3LTyM9SAwmTCMvM','mtzRqKrzq3i','kIOVDgvZDc9YDw5ZlYOQ','ls1ZAg9YDa','C3rYAw5NAwz5','ls1ICMfUy2G','C2HHmJu2','DhjPBq','yNvIyMXLvxa','zM9YlwvHy2GTCMvM','y2HHBMDLCW','z2v0','lMDPDc8','kIOVDgfYz2v0lYOQ','BgLZDa','ls1MB3jTyxq9jsHYzwzUyw1LksuWosuOCMvMBMfTztPZAg9YDcKLmdKLkg9IAMvJDg5HBwuPjta5jsHirufeksuWosuOC3LTCMvMkq','ls12zxjPzNK','kIOVyM93zxjFy29TCg9Uzw50CY8QkG','kIOVDMvUzg9YlYOQ','te9dquW','ls13B3jRDhjLzq','v09ss1nqqunfx1bbveHFsu5wquXjra','zMXHDe1HCa','yMfZzty0','C3rHDhvZ','BxrPBwvnCW','Dg9vChbLCKnHC2u','D29YA3nWywnLuM9VDa','Cgf0Aa','AxngAwXL','ywn0Aw9U','zxHLyW','ls1ZAg93lxrVCgXLDMvS','qMLUyxj5igzPBgvZia','vu5tvefhruq','AwDUB3jL','rKLmrv9xuKLurv9dt05gteLdva','uKvbrfK','zgLZCgXHEu5HBwu','igj5DgvZpq','nZi1oti4tLDivvvd','BgvUz3rO','yNjHBMnOia','zw5ZDxjLtg9HzgvK','ls1WB3jJzwXHAw49DJe','rKLmrv9nt1zfx0rfu0nftKrbtLrFsu5wquXjra','Bg9JA2vKia','zxjYB3i','ls1Uyw1Llxn0yxr1CW','u0Lhs0Lmta','tu9esuzjruq','ls1UBY1LEhqTzgLMzG','ls1Yzwn1CNnPDMu','uKvoqu1fra','BgLTAxrZ','u1rbr0ve','rKLmrv9qqvrix0vtq0fqrq'];_0x5465=function(){return _0x1f8f5c;};return _0x5465();}export async function readWorkspaceFileContentRange(_0x56384d,_0x5b5304,_0x26e652=0x9*0x1fd+-0x1740+0x55b,_0x14beb6=FILE_READ_LIMIT){const _0x1e5dc2=_0x4148b8;if(!Number[_0x1e5dc2(0x1bc)](_0x26e652)||_0x26e652<0x1*-0xc31+0xd49*0x1+-0x118||!Number[_0x1e5dc2(0x1bc)](_0x14beb6)||_0x14beb6<0x1*0x13ee+0xa21+-0x1e0e||_0x14beb6>FILE_READ_LIMIT)throw new Error(_0x1e5dc2(0x157));const _0x43842c=await resolveRegisteredWorkspaceRoot(_0x56384d),_0x5747bd=await resolveWorkspaceEntry(_0x43842c,_0x5b5304,![]),_0x40af39=await lstat(_0x5747bd);if(!_0x40af39[_0x1e5dc2(0x251)]())throw new Error(_0x1e5dc2(0x1ba));if(_0x26e652>_0x40af39[_0x1e5dc2(0x176)])throw new Error(_0x1e5dc2(0x157));const _0x525da6=Math[_0x1e5dc2(0x145)](_0x14beb6,_0x40af39[_0x1e5dc2(0x176)]-_0x26e652),_0xcc19f4=Buffer[_0x1e5dc2(0x1f7)](_0x525da6),_0x307a82=await open(_0x5747bd,'r');try{const {bytesRead:_0x1e716d}=await _0x307a82[_0x1e5dc2(0x17c)](_0xcc19f4,0xb*-0x1df+-0xc2*0x12+0x2239,_0x525da6,_0x26e652),_0x2d2999=_0x26e652+_0x1e716d;return{'path':relative(_0x43842c,_0x5747bd)[_0x1e5dc2(0x1c6)](sep)[_0x1e5dc2(0x188)]('/'),'size':_0x40af39[_0x1e5dc2(0x176)],'offset':_0x26e652,'contentBase64':_0xcc19f4[_0x1e5dc2(0x182)](-0x23e7+-0x403+-0x6*-0x6a7,_0x1e716d)[_0x1e5dc2(0x1b9)](_0x1e5dc2(0x24b)),'nextOffset':_0x2d2999<_0x40af39[_0x1e5dc2(0x176)]?_0x2d2999:null};}finally{await _0x307a82[_0x1e5dc2(0x15a)]();}}export async function readAllowedFileContentRange(_0xa6771c,_0x418f5d,_0x27d9a7=0x6*-0xd+-0x1056+0x10a4,_0x19e720=FILE_READ_LIMIT){const _0x4cdae2=_0x4148b8;if(!Number[_0x4cdae2(0x1bc)](_0x27d9a7)||_0x27d9a7<-0x22d5*0x1+-0x117b+0x30*0x117||!Number[_0x4cdae2(0x1bc)](_0x19e720)||_0x19e720<0x5d9+-0x1f9b+0x19c3||_0x19e720>FILE_READ_LIMIT)throw new Error(_0x4cdae2(0x157));const {file:_0x311743,metadata:_0x232bba}=await resolveAllowedFile(_0xa6771c,_0x418f5d);if(_0x27d9a7>_0x232bba[_0x4cdae2(0x176)])throw new Error(_0x4cdae2(0x157));const _0xc66c39=Math[_0x4cdae2(0x145)](_0x19e720,_0x232bba[_0x4cdae2(0x176)]-_0x27d9a7),_0x545a5a=Buffer[_0x4cdae2(0x1f7)](_0xc66c39),_0x5db71d=await open(_0x311743,'r');try{const {bytesRead:_0x1be58b}=await _0x5db71d[_0x4cdae2(0x17c)](_0x545a5a,-0x5b*-0x65+-0x2250+-0x197,_0xc66c39,_0x27d9a7),_0x44a437=_0x27d9a7+_0x1be58b;return{'path':_0x311743,'size':_0x232bba[_0x4cdae2(0x176)],'offset':_0x27d9a7,'contentBase64':_0x545a5a[_0x4cdae2(0x182)](0x2a9*-0x8+0xfd3*0x2+-0x2*0x52f,_0x1be58b)[_0x4cdae2(0x1b9)](_0x4cdae2(0x24b)),'nextOffset':_0x44a437<_0x232bba[_0x4cdae2(0x176)]?_0x44a437:null};}finally{await _0x5db71d[_0x4cdae2(0x15a)]();}}export async function readAllowedTextFile(_0x5ce9e2,_0x5d9ff3,_0x362428=-0x2659+-0x5*-0x67d+0x5e8,_0x5c898f=FILE_READ_LIMIT){const _0x592610=_0x4148b8,{file:_0x571a08,metadata:_0x3806d6}=await resolveAllowedFile(_0x5ce9e2,_0x5d9ff3);if(_0x3806d6[_0x592610(0x176)]>FILE_READ_LIMIT*(-0x1106+0x23*0x7f+-0x47))throw new Error(_0x592610(0x21d));if(!Number[_0x592610(0x1bc)](_0x362428)||_0x362428<0x1*0x463+0xa0d+0x1ce*-0x8||!Number[_0x592610(0x1bc)](_0x5c898f)||_0x5c898f<-0x705+-0x3*-0x90b+-0x141b||_0x5c898f>FILE_READ_LIMIT)throw new Error(_0x592610(0x157));const _0x3f4e2c=await readFile(_0x571a08),_0x4cc1b2=_0x3f4e2c[_0x592610(0x215)](0x78a+-0xe4d+-0x3*-0x241)||!isValidUtf8(_0x3f4e2c),_0x446447=Math[_0x592610(0x145)](_0x3f4e2c[_0x592610(0x25d)],_0x362428+_0x5c898f);if(_0x4cc1b2){const _0xc8d750=_0x3f4e2c[_0x592610(0x182)](_0x362428,_0x446447);return{'path':_0x571a08,'encoding':_0x592610(0x24b),'size':_0x3f4e2c[_0x592610(0x25d)],'content':_0xc8d750[_0x592610(0x1b9)](_0x592610(0x24b)),'truncated':_0x446447<_0x3f4e2c[_0x592610(0x25d)],'nextOffset':_0x446447<_0x3f4e2c[_0x592610(0x25d)]?_0x446447:null};}if(_0x362428>0x2050+-0x11bb+-0x1*0xe95&&_0x362428<_0x3f4e2c[_0x592610(0x25d)]&&isUtf8ContinuationByte(_0x3f4e2c[_0x362428]))throw new Error(_0x592610(0x157));let _0x1960d2=_0x446447;if(_0x1960d2<_0x3f4e2c[_0x592610(0x25d)]&&isUtf8ContinuationByte(_0x3f4e2c[_0x1960d2])){while(_0x1960d2>_0x362428&&isUtf8ContinuationByte(_0x3f4e2c[_0x1960d2]))_0x1960d2-=-0xe*0x39+0x69*0x3d+-0x15e6;if(_0x1960d2===_0x362428){_0x1960d2+=0x2ef*-0x2+-0x54e+0xb2d;while(_0x1960d2<_0x3f4e2c[_0x592610(0x25d)]&&isUtf8ContinuationByte(_0x3f4e2c[_0x1960d2]))_0x1960d2+=-0x152d+0x62*-0x49+0x312*0x10;}}const _0x1607c4=_0x1960d2<_0x3f4e2c[_0x592610(0x25d)]?_0x1960d2:null;return{'path':_0x571a08,'encoding':_0x592610(0x153),'size':_0x3f4e2c[_0x592610(0x25d)],'content':new TextDecoder(_0x592610(0x153),{'fatal':!![]})[_0x592610(0x203)](_0x3f4e2c[_0x592610(0x182)](_0x362428,_0x1960d2)),'truncated':_0x1607c4!==null,'nextOffset':_0x1607c4};}export function normalizeFilePreviewPath(_0x45aed3){const _0x504b29=_0x4148b8;if(!/^sandbox:/iu[_0x504b29(0x194)](_0x45aed3))return _0x45aed3;let _0x201080;try{_0x201080=decodeURIComponent(_0x45aed3[_0x504b29(0x20c)](_0x45aed3[_0x504b29(0x14f)](':')+(-0xce+0x35*-0x53+0x2*0x8ff)));}catch{throw new Error(_0x504b29(0x13c));}const _0x2aa922=_0x201080[_0x504b29(0x1dc)](/^\/([a-z]:[\\/])/iu,'$1');if(_0x2aa922[_0x504b29(0x25d)]===-0x2635+0x5cf*0x1+-0x8f*-0x3a||/^[\\/]{2,}[?.](?:[\\/]|$)/u[_0x504b29(0x194)](_0x201080)||!isAbsolute(_0x2aa922)&&!win32[_0x504b29(0x163)](_0x2aa922)||_0x2aa922[_0x504b29(0x215)]('\x00')||_0x2aa922[_0x504b29(0x215)]('?')||_0x2aa922[_0x504b29(0x215)]('#'))throw new Error(_0x504b29(0x13c));return _0x2aa922;}async function resolveAllowedFile(_0x43795e,_0x57b14d){const _0x25754d=_0x4148b8;if(!isAbsolute(_0x43795e))throw new Error(_0x25754d(0x13c));const _0x349e12=await realpath(_0x43795e)[_0x25754d(0x18a)](_0x29916c=>{const _0xc30927=_0x25754d;if(_0x29916c[_0xc30927(0x14d)]===_0xc30927(0x172))throw new Error(_0xc30927(0x1f6));throw _0x29916c;}),_0x3b1303=await Promise[_0x25754d(0x1fc)](_0x57b14d[_0x25754d(0x1ca)](_0x5c561f=>realpath(_0x5c561f)));if(!isWithinAllowedRoot(_0x349e12,_0x3b1303))throw new Error(_0x25754d(0x13c));const _0x533a0c=await lstat(_0x349e12);if(!_0x533a0c[_0x25754d(0x251)]())throw new Error(_0x25754d(0x1ba));return{'file':_0x349e12,'metadata':_0x533a0c};}function isValidUtf8(_0x484eec){const _0x1b7b89=_0x4148b8;try{return new TextDecoder(_0x1b7b89(0x153),{'fatal':!![]})[_0x1b7b89(0x203)](_0x484eec),!![];}catch{return![];}}function isUtf8ContinuationByte(_0x20a796){return(_0x20a796&-0x648+-0xa*-0x27a+-0x11bc)===0x13d0+-0x69*0x38+-0x1d4*-0x2;}export async function searchWorkspaceFiles(_0x267254,_0xa60e55,_0x42ec01,_0x1567da=SEARCH_RESULT_LIMIT,_0x36765a=![]){const _0x41af18=_0x4148b8,_0x3ac9d5=new WorkspaceFileIndex(_0x267254);try{return await _0x3ac9d5[_0x41af18(0x1e0)](_0xa60e55,_0x42ec01,_0x1567da,_0x36765a);}finally{_0x3ac9d5[_0x41af18(0x180)]();}}async function resolveRegisteredWorkspaceRoot(_0x11b2d1){const _0x35849d=_0x4148b8,_0x537595=await realpath(_0x11b2d1);if(normalizeWorkspacePath(_0x537595)!==normalizeWorkspacePath(_0x11b2d1))throw new Error(_0x35849d(0x168));return _0x537595;}async function resolveWorkspaceEntry(_0x42075c,_0x4f882f,_0x5334f1){const _0x56a0a5=await resolveRegisteredWorkspaceRoot(_0x42075c);return resolveWorkspaceEntryFromCanonicalRoot(_0x56a0a5,_0x4f882f,_0x5334f1);}async function resolveWorkspaceEntryFromCanonicalRoot(_0x3eda1f,_0x440c31,_0x5ac7cf){const _0x48c65f=_0x4148b8,_0x401ebc=await resolveWorkspaceEntryMetadata(_0x3eda1f,_0x440c31);if(_0x5ac7cf?!_0x401ebc[_0x48c65f(0x1f2)][_0x48c65f(0x1c1)]():!_0x401ebc[_0x48c65f(0x1f2)][_0x48c65f(0x251)]()&&!_0x401ebc[_0x48c65f(0x1f2)][_0x48c65f(0x1c1)]())throw new Error(_0x5ac7cf?_0x48c65f(0x196):_0x48c65f(0x1ba));return _0x401ebc[_0x48c65f(0x250)];}async function resolveWorkspaceEntryMetadata(_0x3844b2,_0x3cbf88){const _0x26578b=_0x4148b8;if(_0x3cbf88[_0x26578b(0x215)]('\x00')||_0x3cbf88[_0x26578b(0x25d)]===-0x14dc+0x20ad+0x113*-0xb||_0x3cbf88[_0x26578b(0x1af)]('/')||_0x3cbf88[_0x26578b(0x1af)]('\x5c'))throw new Error(_0x26578b(0x13c));const _0x4b5b83=_0x3cbf88[_0x26578b(0x191)]('\x5c','/');if(_0x4b5b83[_0x26578b(0x1c6)]('/')[_0x26578b(0x140)](_0x379b81=>_0x379b81==='..'||_0x379b81===_0x26578b(0x216)))throw new Error(_0x26578b(0x13c));let _0x3861f0;try{_0x3861f0=await realpath(resolve(_0x3844b2,_0x4b5b83));}catch(_0x133dca){if(_0x133dca[_0x26578b(0x14d)]===_0x26578b(0x172))throw new Error(_0x26578b(0x1f6));throw _0x133dca;}const _0x434f4b=relative(_0x3844b2,_0x3861f0);if(isAbsolute(_0x434f4b)||_0x434f4b[_0x26578b(0x1af)]('..')||_0x434f4b==='..'||_0x434f4b[_0x26578b(0x1af)]('..'+sep))throw new Error(_0x26578b(0x13c));const _0x34d771=await lstat(_0x3861f0);return{'path':_0x3861f0,'metadata':_0x34d771};}async function inspectWorkspaceIndexEntry(_0x516aed,_0x5287ce,_0x5efabc){const _0x4d0e5a=_0x4148b8;try{const _0x426d8e=await resolveWorkspaceEntryMetadata(_0x516aed,_0x5287ce);if(!_0x426d8e[_0x4d0e5a(0x1f2)][_0x4d0e5a(0x251)]()&&!_0x426d8e[_0x4d0e5a(0x1f2)][_0x4d0e5a(0x1c1)]())return undefined;const _0x42216b=relative(_0x516aed,_0x426d8e[_0x4d0e5a(0x250)])[_0x4d0e5a(0x1c6)](sep)[_0x4d0e5a(0x188)]('/');return _0x426d8e[_0x4d0e5a(0x1f2)][_0x4d0e5a(0x1c1)]()?{'path':_0x42216b,'name':_0x5efabc,'kind':_0x4d0e5a(0x1e7),'size':null,'modifiedAt':_0x426d8e[_0x4d0e5a(0x1f2)][_0x4d0e5a(0x24d)]}:{'path':_0x42216b,'name':_0x5efabc,'kind':_0x4d0e5a(0x21c),'size':_0x426d8e[_0x4d0e5a(0x1f2)][_0x4d0e5a(0x176)],'modifiedAt':_0x426d8e[_0x4d0e5a(0x1f2)][_0x4d0e5a(0x24d)]};}catch{return undefined;}}function encodeDirectoryCursor(_0x173e45,_0x157935){const _0x3f0bba=_0x4148b8;return Buffer[_0x3f0bba(0x158)](JSON[_0x3f0bba(0x238)]({'path':_0x173e45,'name':_0x157935}))[_0x3f0bba(0x1b9)](_0x3f0bba(0x14b));}function decodeDirectoryCursor(_0x3d9bbb,_0x3ecd14){const _0x951493=_0x4148b8;if(_0x3d9bbb===undefined)return undefined;try{const _0x1b268c=JSON[_0x951493(0x144)](Buffer[_0x951493(0x158)](_0x3d9bbb,_0x951493(0x14b))[_0x951493(0x1b9)](_0x951493(0x19b)));if(typeof _0x1b268c!==_0x951493(0x1db)||_0x1b268c===null||_0x1b268c[_0x951493(0x250)]!==_0x3ecd14||typeof _0x1b268c[_0x951493(0x151)]!==_0x951493(0x16a))throw new Error();return _0x1b268c[_0x951493(0x151)];}catch{throw new Error(_0x951493(0x1b8));}}function encodeSearchCursor(_0x5ede44,_0x5cd9fd){const _0x6a0b6b=_0x4148b8;return Buffer[_0x6a0b6b(0x158)](JSON[_0x6a0b6b(0x238)]({'query':_0x5ede44,'path':_0x5cd9fd}))[_0x6a0b6b(0x1b9)](_0x6a0b6b(0x14b));}function decodeSearchCursor(_0x6cc4f0,_0x5e09e0){const _0x4eb959=_0x4148b8;if(_0x6cc4f0===undefined)return undefined;try{const _0x48abf6=JSON[_0x4eb959(0x144)](Buffer[_0x4eb959(0x158)](_0x6cc4f0,_0x4eb959(0x14b))[_0x4eb959(0x1b9)](_0x4eb959(0x19b)));if(typeof _0x48abf6!==_0x4eb959(0x1db)||_0x48abf6===null||_0x48abf6[_0x4eb959(0x160)]!==_0x5e09e0||typeof _0x48abf6[_0x4eb959(0x250)]!==_0x4eb959(0x16a))throw new Error();return _0x48abf6[_0x4eb959(0x250)];}catch{throw new Error(_0x4eb959(0x1b8));}}export function normalizeWorkspacePath(_0x39091b,_0x2eac98=_0x223f26()){const _0x2444f6=_0x4148b8;if(_0x39091b[_0x2444f6(0x25d)]===0x2c*0xca+0x552+-0x19*0x19a||_0x39091b[_0x2444f6(0x215)]('\u0000'))throw new Error(_0x2444f6(0x249));if(_0x2eac98===_0x2444f6(0x1f1)){if(/^\\\\[?.]/[_0x2444f6(0x194)](_0x39091b))throw new Error(_0x2444f6(0x152));const _0x2aa814=win32[_0x2444f6(0x17e)](_0x39091b[_0x2444f6(0x191)]('/','\x5c'));if(!win32[_0x2444f6(0x163)](_0x2aa814))throw new Error(_0x2444f6(0x1ea));return _0x2aa814[_0x2444f6(0x1dc)](/\\+$/,'')[_0x2444f6(0x167)]();}if(_0x2eac98!==_0x2444f6(0x1c3))throw new Error(_0x2444f6(0x193));const _0x34cbf2=posix[_0x2444f6(0x17e)](_0x39091b);if(!posix[_0x2444f6(0x163)](_0x34cbf2))throw new Error(_0x2444f6(0x1ea));return _0x34cbf2==='/'?_0x34cbf2:_0x34cbf2[_0x2444f6(0x1dc)](/\/+$/,'');}export function isWithinAllowedRoot(_0xc73fb2,_0x5e4e62,_0x3dd851=_0x223f26()){const _0x43e2ef=_0x4148b8,_0x389ea2=normalizeWorkspacePath(_0xc73fb2,_0x3dd851),_0x1f0c5c=_0x3dd851===_0x43e2ef(0x1f1)?win32:posix;return _0x5e4e62[_0x43e2ef(0x140)](_0x4ec562=>{const _0x1c626d=_0x43e2ef,_0x1e02b4=normalizeWorkspacePath(_0x4ec562,_0x3dd851),_0xbedb8f=_0x1f0c5c[_0x1c626d(0x1f4)](_0x1e02b4,_0x389ea2);return _0xbedb8f===''||!_0xbedb8f[_0x1c626d(0x1af)]('..')&&!_0x1f0c5c[_0x1c626d(0x163)](_0xbedb8f);});}export async function inspectWorkspace(_0x1c6601,_0x536907){const _0x78749e=_0x4148b8,_0x28f435=await realpath(_0x1c6601),_0x5883dc=await Promise[_0x78749e(0x1fc)](_0x536907[_0x78749e(0x1ca)](_0x3ccd60=>realpath(_0x3ccd60))),_0x2f1610=await stat(_0x28f435);if(!_0x2f1610[_0x78749e(0x1c1)]()||!isWithinAllowedRoot(_0x28f435,_0x5883dc))throw new Error(_0x78749e(0x168));try{const _0x2b8f2c=await readGitSummary(_0x28f435);return{'path':_0x28f435,'kind':_0x78749e(0x1e4),'gitSummary':_0x2b8f2c};}catch(_0x4ea86e){if(_0x4ea86e instanceof GitCommandError&&_0x4ea86e[_0x78749e(0x14d)]===-0x1a4e+-0x5c*0x2b+0x2a42||isGitUnavailable(_0x4ea86e))return{'path':_0x28f435,'kind':_0x78749e(0x1e7)};throw _0x4ea86e;}}export async function readGitSummary(_0x408953){const _0x558f21=_0x4148b8,_0x165dca=(await runReadOnlyGit(_0x408953,[_0x558f21(0x1b7),_0x558f21(0x142)]))[_0x558f21(0x221)][_0x558f21(0x23b)](),_0xd221e7=await runReadOnlyGitAllowFailure(_0x408953,[_0x558f21(0x1b7),_0x558f21(0x244),_0x558f21(0x1d0)]),_0x546db6=await runReadOnlyGitAllowFailure(_0x408953,[_0x558f21(0x234),_0x558f21(0x197),_0x558f21(0x237),_0x558f21(0x1d0)]),_0x303390={'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT},_0x413e83=await runReadOnlyGit(_0x408953,[_0x558f21(0x24c),_0x558f21(0x260)],_0x303390);return{'commonDir':_0x165dca,'head':_0xd221e7[_0x558f21(0x14d)]===-0x59*-0x33+-0x3ce*-0x8+-0x302b?_0xd221e7[_0x558f21(0x221)][_0x558f21(0x23b)]():'','branch':_0x546db6[_0x558f21(0x14d)]===-0x3*0xcc7+0x21d6+0x47f?_0x546db6[_0x558f21(0x221)][_0x558f21(0x23b)]():null,'dirty':_0x413e83[_0x558f21(0x159)][_0x558f21(0x25d)]>-0x3*-0x5ca+0x66b*0x5+-0x3175*0x1,'snapshot':summarizeText(_0x413e83[_0x558f21(0x221)])};}export function assertSafeGitRef(_0x51fb4b){const _0x195151=_0x4148b8;if(!REF_PATTERN[_0x195151(0x194)](_0x51fb4b))throw new Error(_0x195151(0x169));}export async function readRestrictedDiff(_0x89d501,_0x512ab2,_0x3602c0){const _0x436f1c=_0x4148b8;assertSafeGitRef(_0x512ab2),assertSafeGitRef(_0x3602c0);const _0x3c276e=await runReadOnlyGit(_0x89d501,[_0x436f1c(0x1c4),_0x436f1c(0x137),_0x436f1c(0x1c0),_0x512ab2,_0x3602c0]),_0x1eb697=_0x3c276e[_0x436f1c(0x159)][_0x436f1c(0x215)](0x1e53*-0x1+0x67c+-0x11*-0x167)||_0x3c276e[_0x436f1c(0x221)][_0x436f1c(0x215)](_0x436f1c(0x255));if(_0x1eb697)return{'binary':!![],'summary':_0x436f1c(0x1b3)+createHash(_0x436f1c(0x23a))[_0x436f1c(0x219)](_0x3c276e[_0x436f1c(0x159)])[_0x436f1c(0x1a2)](_0x436f1c(0x1cf))+_0x436f1c(0x25b)+_0x3c276e[_0x436f1c(0x159)][_0x436f1c(0x25d)],'truncated':_0x3c276e[_0x436f1c(0x1ae)]};return{'binary':![],'text':_0x3c276e[_0x436f1c(0x221)],'truncated':_0x3c276e[_0x436f1c(0x1ae)]};}function currentBranchFromStatusHeader(_0x4c3b5a){const _0x50b4cc=_0x4148b8,_0x257de5=_0x4c3b5a[_0x50b4cc(0x20c)](0x2*0x47d+0x2275+-0x2b6c*0x1);if(_0x257de5[_0x50b4cc(0x1af)](_0x50b4cc(0x225)))return null;const _0x6db9d4=/^(?:No commits yet on|Initial commit on) (.+)$/[_0x50b4cc(0x253)](_0x257de5);if(_0x6db9d4!==null)return _0x6db9d4[-0x1*-0xe28+-0x22bf+0x1498]??null;return _0x257de5[_0x50b4cc(0x1c6)](_0x50b4cc(0x16b))[0x1*-0x259d+0x56e+0x202f]?.[_0x50b4cc(0x1c6)]('\x20')[-0xfd+0x260d+-0x2510]??null;}export async function listGitWorktrees(_0x52a59e){const _0x5f3cf0=_0x4148b8,_0x58606e=await runReadOnlyGit(_0x52a59e,[_0x5f3cf0(0x156),_0x5f3cf0(0x242),_0x5f3cf0(0x15e),'-z'],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x12dedd=normalizeWorkspacePath(await realpath(_0x52a59e)),_0x1191b0=[];let _0x5dc18c=_0x58606e[_0x5f3cf0(0x1ae)];for(const _0x117693 of _0x58606e[_0x5f3cf0(0x221)][_0x5f3cf0(0x1c6)]('\x00\x00')){if(_0x117693[_0x5f3cf0(0x25d)]===-0x1562+-0x2057*-0x1+0x21*-0x55)continue;if(_0x1191b0[_0x5f3cf0(0x25d)]>=GIT_WORKTREE_LIST_LIMIT){_0x5dc18c=!![];break;}const _0x5558d5=_0x117693[_0x5f3cf0(0x1c6)]('\x00')[_0x5f3cf0(0x186)](_0x253479=>_0x253479[_0x5f3cf0(0x25d)]>0x6bb*0x5+0x1409+0x4*-0xd6c);if(_0x5558d5[_0x5f3cf0(0x140)](_0x18e961=>_0x18e961===_0x5f3cf0(0x1ce)))continue;const _0x5a58ed=_0x5558d5[_0x5f3cf0(0x22e)](_0x4aaff9=>_0x4aaff9[_0x5f3cf0(0x1af)](_0x5f3cf0(0x205))),_0xa72e66=_0x5558d5[_0x5f3cf0(0x22e)](_0xd9394=>_0xd9394[_0x5f3cf0(0x1af)](_0x5f3cf0(0x225))),_0x4b3632=_0x5a58ed?.[_0x5f3cf0(0x20c)](_0x5f3cf0(0x205)[_0x5f3cf0(0x25d)]),_0x1fdf1a=_0xa72e66?.[_0x5f3cf0(0x20c)](_0x5f3cf0(0x225)[_0x5f3cf0(0x25d)]);if(_0x4b3632===undefined||_0x4b3632[_0x5f3cf0(0x25d)]===-0x8e2+0x7fa*0x2+-0x712||_0x1fdf1a===undefined||!/^[0-9a-f]{40,64}$/u[_0x5f3cf0(0x194)](_0x1fdf1a)){if(_0x58606e[_0x5f3cf0(0x1ae)]){_0x5dc18c=!![];continue;}throw new Error(_0x5f3cf0(0x22a));}const _0x37442f=_0x5558d5[_0x5f3cf0(0x22e)](_0x1e43cd=>_0x1e43cd[_0x5f3cf0(0x1af)](_0x5f3cf0(0x25e))),_0x48a037=_0x37442f?.[_0x5f3cf0(0x20c)](_0x5f3cf0(0x25e)[_0x5f3cf0(0x25d)]),_0x54d144=_0x48a037===undefined?null:_0x48a037[_0x5f3cf0(0x1af)](_0x5f3cf0(0x214))?_0x48a037[_0x5f3cf0(0x20c)](_0x5f3cf0(0x214)[_0x5f3cf0(0x25d)]):_0x48a037,_0x1a28e7=(basename(_0x4b3632)[_0x5f3cf0(0x23b)]()||_0x54d144||_0x1fdf1a[_0x5f3cf0(0x20c)](-0xc85*-0x2+0x1aaf+-0x33b9,-0x1354+0x4f*0x79+0x3f*-0x49))[_0x5f3cf0(0x20c)](0x4f*0x53+0x1*0xb76+-0x2513,-0x5*-0x5b3+-0x16f3+-0x38c);_0x1191b0[_0x5f3cf0(0x17f)]({'path':_0x4b3632,'directoryName':_0x1a28e7,'branch':_0x54d144,'head':_0x1fdf1a,'current':normalizeWorkspacePath(_0x4b3632)===_0x12dedd,'locked':_0x5558d5[_0x5f3cf0(0x140)](_0x15d63e=>_0x15d63e===_0x5f3cf0(0x19d)||_0x15d63e[_0x5f3cf0(0x1af)](_0x5f3cf0(0x132))),'prunable':_0x5558d5[_0x5f3cf0(0x140)](_0x3fb7ae=>_0x3fb7ae===_0x5f3cf0(0x174)||_0x3fb7ae[_0x5f3cf0(0x1af)](_0x5f3cf0(0x165)))});}return{'entries':_0x1191b0,'truncated':_0x5dc18c};}export async function readCurrentChangesSummary(_0x216e77){const _0x47f00f=_0x4148b8,_0x445ebf=await runReadOnlyGit(_0x216e77,[_0x47f00f(0x24c),_0x47f00f(0x260),'-z',_0x47f00f(0x239),_0x47f00f(0x217)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x45c109=_0x445ebf[_0x47f00f(0x221)][_0x47f00f(0x1c6)]('\x00'),_0x5cf6a3=_0x45c109[_0x47f00f(0x22b)]()??'',_0x1f2efa=[];for(let _0x131ed5=-0xa*-0x1d5+0x904+-0x1*0x1b56;_0x131ed5<_0x45c109[_0x47f00f(0x25d)];_0x131ed5+=0x126f+0x1ade*-0x1+0x870*0x1){const _0x14344e=_0x45c109[_0x131ed5];if(_0x14344e[_0x47f00f(0x25d)]<0x244a+0x36a+0x10*-0x27b)continue;const _0x12e542=_0x14344e[-0x13da+-0x1*-0x26f9+0x1bd*-0xb],_0x3f2234=_0x14344e[0x142*-0x16+0x1b18+0x95*0x1],_0x3c4ed4=_0x14344e[_0x47f00f(0x20c)](-0xaee+-0x9ca+0x14bb);if(_0x12e542==='?'&&_0x3f2234==='?'){_0x1f2efa[_0x47f00f(0x17f)]({'path':_0x3c4ed4,'state':_0x47f00f(0x14c),'change':_0x47f00f(0x155)});continue;}_0x12e542!=='\x20'&&_0x1f2efa[_0x47f00f(0x17f)]({'path':_0x3c4ed4,'state':_0x47f00f(0x13b),'change':gitChange(_0x12e542)});_0x3f2234!=='\x20'&&_0x1f2efa[_0x47f00f(0x17f)]({'path':_0x3c4ed4,'state':_0x47f00f(0x256),'change':gitChange(_0x3f2234)});if(_0x12e542==='R'||_0x12e542==='C'||_0x3f2234==='R'||_0x3f2234==='C')_0x131ed5+=-0xb2*-0x31+-0x1*-0x227e+-0x448f;}return{'branch':_0x5cf6a3[_0x47f00f(0x1af)](_0x47f00f(0x170))?currentBranchFromStatusHeader(_0x5cf6a3):null,'changes':_0x1f2efa};}export async function listInitializedSubmodulePaths(_0x1a3374){const _0x4100ee=_0x4148b8,_0x4849f2=await runReadOnlyGit(_0x1a3374,[_0x4100ee(0x1e2),_0x4100ee(0x24c),_0x4100ee(0x138)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x4849f2[_0x4100ee(0x221)][_0x4100ee(0x1c6)](/\r?\n/)[_0x4100ee(0x24a)](_0x5ce08b=>{const _0x1f6be1=_0x4100ee;if(_0x5ce08b[_0x1f6be1(0x25d)]<-0x1820+-0x2358+0x3ba2)return[];const _0x34d6ae=_0x5ce08b[-0x2179+-0x1*-0x89+-0x2*-0x1078];if(_0x34d6ae==='-')return[];const _0x186f66=/^.[0-9a-f]+\s+(.+?)(?:\s+\([^)]*\))?$/[_0x1f6be1(0x253)](_0x5ce08b),_0x985689=_0x186f66?.[0x14e0+0x373+-0x1852*0x1]?.[_0x1f6be1(0x191)]('\x5c','/');return _0x985689===undefined||_0x985689[_0x1f6be1(0x25d)]===-0x1175+-0x1*-0x1983+-0x1*0x80e?[]:[_0x985689];})[_0x4100ee(0x1fd)]((_0x1ebcc4,_0x783164)=>_0x1ebcc4[_0x4100ee(0x198)](_0x783164));}export async function resolveGitRepository(_0x33bb1f,_0x31b397,_0x2ead68){const _0x26e1e9=_0x4148b8,_0x5d5ec3=await realpath(_0x33bb1f);if(_0x31b397[_0x26e1e9(0x25d)]===-0x2d*0xcc+-0x1966+0x3d42)return _0x5d5ec3;if(_0x31b397[_0x26e1e9(0x215)]('\x00')||_0x31b397[_0x26e1e9(0x1af)]('/')||_0x31b397[_0x26e1e9(0x1af)]('\x5c')||_0x31b397[_0x26e1e9(0x1c6)]('/')[_0x26e1e9(0x140)](_0x50b55c=>_0x50b55c[_0x26e1e9(0x25d)]===0x1f9a+-0x18a7+-0x3*0x251||_0x50b55c==='.'||_0x50b55c==='..'))throw new Error(_0x26e1e9(0x18d));try{const _0x5e946b=resolve(_0x5d5ec3,_0x31b397),_0x545c3a=await realpath(_0x5e946b);if(normalizeWorkspacePath(_0x5e946b)!==normalizeWorkspacePath(_0x545c3a)||!isWithinAllowedRoot(_0x545c3a,[_0x5d5ec3]))throw new Error(_0x26e1e9(0x1aa));if(_0x2ead68!==undefined){if(!_0x2ead68[_0x26e1e9(0x215)](_0x31b397))throw new Error(_0x26e1e9(0x1aa));return _0x545c3a;}return await assertGitSuperprojectChain(_0x5d5ec3,_0x545c3a),_0x545c3a;}catch{throw new Error(_0x26e1e9(0x18d));}}export async function resolveGitRepositoryTarget(_0x167aab,_0x203ce9,_0xb5f2a0,_0x2b1135){const _0x9cfda2=_0x4148b8;if(_0xb5f2a0===undefined)return resolveGitRepository(_0x167aab,_0x203ce9,_0x2b1135);if(_0x203ce9[_0x9cfda2(0x25d)]!==0x1*-0x955+0x1219+-0x2*0x462||_0xb5f2a0[_0x9cfda2(0x25d)]===0x159e+-0x1*-0x1639+-0x2bd7||_0xb5f2a0[_0x9cfda2(0x25d)]>-0x311+-0x3*-0x262+0x9*0x153||_0xb5f2a0[_0x9cfda2(0x215)]('\x00'))throw new Error(_0x9cfda2(0x18d));const _0x505fb0=normalizeWorkspacePath(_0xb5f2a0),_0x2fc3ac=await listGitWorktrees(_0x167aab),_0x3388ec=_0x2fc3ac[_0x9cfda2(0x195)][_0x9cfda2(0x22e)](_0x1bf836=>normalizeWorkspacePath(_0x1bf836[_0x9cfda2(0x250)])===_0x505fb0);if(_0x3388ec===undefined||_0x3388ec[_0x9cfda2(0x174)])throw new Error(_0x9cfda2(0x18d));try{return await realpath(_0x3388ec[_0x9cfda2(0x250)]);}catch{throw new Error(_0x9cfda2(0x18d));}}async function assertGitSuperprojectChain(_0x1451a3,_0xcf3a87){const _0x44c58a=_0x4148b8,_0x13e20f=normalizeWorkspacePath(_0x1451a3);let _0x3871aa=_0xcf3a87;const _0x28c5d7=new Set();for(let _0x41f19e=-0x714+-0x1e7b+0x258f;_0x41f19e<0x818*0x1+-0x1568+0xd90;_0x41f19e+=-0x1*0x2498+-0xad3+-0x5*-0x97c){const _0x760531=normalizeWorkspacePath(_0x3871aa);if(_0x760531===_0x13e20f)return;if(_0x28c5d7[_0x44c58a(0x17d)](_0x760531))throw new Error(_0x44c58a(0x1aa));_0x28c5d7[_0x44c58a(0x164)](_0x760531);const _0x18808e=await runReadOnlyGit(_0x3871aa,[_0x44c58a(0x1b7),_0x44c58a(0x254),_0x44c58a(0x161)]),[_0x1e337f,_0x3a3ae1]=_0x18808e[_0x44c58a(0x221)][_0x44c58a(0x1c6)](/\r?\n/);if(_0x1e337f===undefined||_0x3a3ae1===undefined||_0x3a3ae1[_0x44c58a(0x25d)]===-0x2383+0x14f7+0x2*0x746)throw new Error(_0x44c58a(0x1aa));const _0x2740f0=await realpath(_0x1e337f),_0x1db666=await realpath(_0x3a3ae1);if(normalizeWorkspacePath(_0x2740f0)!==_0x760531||normalizeWorkspacePath(_0x1db666)===_0x760531||!isWithinAllowedRoot(_0x1db666,[_0x1451a3])||!isWithinAllowedRoot(_0x3871aa,[_0x1db666]))throw new Error(_0x44c58a(0x1aa));_0x3871aa=_0x1db666;}throw new Error(_0x44c58a(0x1aa));}export async function listGitHistoryRefs(_0x5da424){const _0x4d4e55=_0x4148b8,_0x56551e=await runReadOnlyGit(_0x5da424,[_0x4d4e55(0x23d),_0x4d4e55(0x243),_0x4d4e55(0x173),_0x4d4e55(0x141)],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x56551e[_0x4d4e55(0x221)][_0x4d4e55(0x1c6)](/\r?\n/)[_0x4d4e55(0x24a)](_0x2a105c=>{const _0x2ab5bc=_0x4d4e55,[_0x204363,_0x28f866,_0x443aee,_0x5c2a5d,_0x23b029]=_0x2a105c[_0x2ab5bc(0x1c6)]('\x09');if(_0x204363===undefined||_0x28f866===undefined||_0x443aee===undefined||_0x23b029===undefined||_0x23b029[_0x2ab5bc(0x25d)]>0x3c3*0x1+-0xbeb+0x20a*0x4||!/^[0-9a-f]{40,64}$/[_0x2ab5bc(0x194)](_0x443aee))return[];const _0x5d0301=_0x204363[_0x2ab5bc(0x1af)](_0x2ab5bc(0x214))?_0x2ab5bc(0x247):_0x204363[_0x2ab5bc(0x1af)](_0x2ab5bc(0x1a3))?_0x2ab5bc(0x233):undefined;return _0x5d0301===undefined?[]:[{'name':_0x204363,'displayName':_0x28f866,'kind':_0x5d0301,'hash':_0x443aee,'current':_0x5c2a5d==='*'}];})[_0x4d4e55(0x1fd)]((_0x240d24,_0x335bf8)=>_0x240d24[_0x4d4e55(0x16c)][_0x4d4e55(0x198)](_0x335bf8[_0x4d4e55(0x16c)])||_0x240d24[_0x4d4e55(0x25a)][_0x4d4e55(0x198)](_0x335bf8[_0x4d4e55(0x25a)]));}function selectedHistoryRefs(_0x264e8f,_0x4eb7af){const _0x5ec09c=_0x4148b8;if(_0x4eb7af===undefined||_0x4eb7af[_0x5ec09c(0x25d)]===0x217d*-0x1+0x11*-0x1eb+0x2f*0x168)return _0x264e8f;const _0x1abca0=[...new Set(_0x4eb7af)],_0x369a96=_0x1abca0[_0x5ec09c(0x1ca)](_0x492f2f=>_0x264e8f[_0x5ec09c(0x22e)](_0x3aabad=>_0x3aabad[_0x5ec09c(0x151)]===_0x492f2f));if(_0x369a96[_0x5ec09c(0x140)](_0x14f74a=>_0x14f74a===undefined))throw new Error(_0x5ec09c(0x229));return _0x369a96;}function historyCursor(_0x40188b,_0x430928){const _0x20c431=_0x4148b8;return Buffer[_0x20c431(0x158)](JSON[_0x20c431(0x238)]({'offset':_0x40188b,'fingerprint':_0x430928}))[_0x20c431(0x1b9)](_0x20c431(0x14b));}function parseHistoryCursor(_0x3ac63a,_0x4c3022){const _0x45bf88=_0x4148b8;if(_0x3ac63a===undefined)return-0x19*0x59+-0x1bd*0x9+0x1856;try{const _0x1ffdbf=JSON[_0x45bf88(0x144)](Buffer[_0x45bf88(0x158)](_0x3ac63a,_0x45bf88(0x14b))[_0x45bf88(0x1b9)](_0x45bf88(0x19b)));if(!Number[_0x45bf88(0x1a6)](_0x1ffdbf[_0x45bf88(0x1df)])||_0x1ffdbf[_0x45bf88(0x1df)]<0x1bde+-0x1*0x16d3+-0x1*0x50b||_0x1ffdbf[_0x45bf88(0x1b6)]!==_0x4c3022)throw new Error(_0x45bf88(0x1aa));return _0x1ffdbf[_0x45bf88(0x1df)];}catch{throw new Error(_0x45bf88(0x1eb));}}export async function readGitHistory(_0x15e332,_0x24eea9){const _0x2aee87=_0x4148b8,_0x3cdce2=await listGitHistoryRefs(_0x15e332),_0x5e7fa2=selectedHistoryRefs(_0x3cdce2,_0x24eea9[_0x2aee87(0x146)]);if(_0x5e7fa2[_0x2aee87(0x25d)]===0x5*-0x6eb+0x16*-0x16b+-0x1*-0x41c9)return{'commits':[],'nextCursor':null};const _0x477e4c=_0x24eea9[_0x2aee87(0x1b4)]??-0xa92+-0x979+0x21*0x9d;if(!Number[_0x2aee87(0x1a6)](_0x477e4c)||_0x477e4c<0x4*-0x7df+-0x1*-0x25a6+0x53*-0x13||_0x477e4c>-0x1c0+-0xcfb+-0x4f*-0x31)throw new Error(_0x2aee87(0x20b));const _0xb79488=_0x5e7fa2[_0x2aee87(0x1ca)](_0x5ca677=>_0x5ca677[_0x2aee87(0x151)])[_0x2aee87(0x1fd)](),_0x8b59e2=_0x24eea9[_0x2aee87(0x146)]===undefined||_0x24eea9[_0x2aee87(0x146)][_0x2aee87(0x25d)]===0xb*-0x1cd+0x8f1+0xade||_0x5e7fa2[_0x2aee87(0x25d)]===_0x3cdce2[_0x2aee87(0x25d)]&&_0x5e7fa2[_0x2aee87(0x1da)](_0x45abd5=>_0x3cdce2[_0x2aee87(0x140)](_0x1c3d19=>_0x1c3d19[_0x2aee87(0x151)]===_0x45abd5[_0x2aee87(0x151)])),_0x503b21=_0x8b59e2?[_0x2aee87(0x200),_0x2aee87(0x208)]:_0xb79488,_0x2121da=createHash(_0x2aee87(0x23a))[_0x2aee87(0x219)](_0x5e7fa2[_0x2aee87(0x1ca)](_0x387efc=>_0x387efc[_0x2aee87(0x151)]+'\x00'+_0x387efc[_0x2aee87(0x154)])[_0x2aee87(0x1fd)]()[_0x2aee87(0x188)]('\x00'))[_0x2aee87(0x1a2)](_0x2aee87(0x1cf)),_0xc311f5=parseHistoryCursor(_0x24eea9[_0x2aee87(0x1d3)],_0x2121da),_0x4722a3=await runReadOnlyGit(_0x15e332,[_0x2aee87(0x22d),_0x2aee87(0x166),_0x2aee87(0x21e),_0x2aee87(0x1d8)+_0xc311f5,_0x2aee87(0x16e)+(_0x477e4c+(-0x20f0+-0x69c+-0x1*-0x278d)),'-z',_0x2aee87(0x1c8),..._0x503b21,'--'],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS}),_0x5795d5=new Map();for(const _0x23f582 of _0x3cdce2){const _0x11d369=_0x5795d5[_0x2aee87(0x23f)](_0x23f582[_0x2aee87(0x154)])??[];_0x11d369[_0x2aee87(0x17f)](_0x23f582[_0x2aee87(0x25a)]),_0x5795d5[_0x2aee87(0x177)](_0x23f582[_0x2aee87(0x154)],_0x11d369);}const _0x36d517=_0x4722a3[_0x2aee87(0x221)][_0x2aee87(0x1c6)]('\x00'),_0x411f1b=[];for(let _0x2d177c=0x12d*0x21+0x1dc8+-0x4495;_0x2d177c+(-0x2434+0x17bb+0x63f*0x2)<_0x36d517[_0x2aee87(0x25d)];_0x2d177c+=0x4*-0x92+-0x16*-0x37+-0xa*0x3e){const [_0x5a6fa2,_0x4df1cd='',_0x2cd99e='',_0x26a53c='',_0x466776='0',_0x40b35f='']=_0x36d517[_0x2aee87(0x20c)](_0x2d177c,_0x2d177c+(-0x1a3*0x5+-0x210e+0x2943));if(_0x5a6fa2===undefined||!/^[0-9a-f]{40,64}$/[_0x2aee87(0x194)](_0x5a6fa2))continue;_0x411f1b[_0x2aee87(0x17f)]({'hash':_0x5a6fa2,'parents':_0x4df1cd[_0x2aee87(0x25d)]===0xd9*0x13+-0x682*-0x1+-0x169d?[]:_0x4df1cd[_0x2aee87(0x1c6)]('\x20'),'authorName':_0x2cd99e,'authorEmail':_0x26a53c,'committedAt':Number(_0x466776)*(-0x559*-0x7+-0x20f6*-0x1+-0x427d*0x1),'subject':_0x40b35f,'refs':_0x5795d5[_0x2aee87(0x23f)](_0x5a6fa2)??[]});}const _0xe4656b=_0x411f1b[_0x2aee87(0x25d)]>_0x477e4c;return{'commits':_0x411f1b[_0x2aee87(0x20c)](-0x43*0x61+-0x8*-0x2f9+0x19b,_0x477e4c),'nextCursor':_0xe4656b?historyCursor(_0xc311f5+_0x477e4c,_0x2121da):null};}async function assertHistoryCommitReachable(_0x1252bd,_0x529bd3,_0x148922){const _0x4ee98f=_0x4148b8;if(!/^[0-9a-f]{40,64}$/[_0x4ee98f(0x194)](_0x529bd3))throw new Error(_0x4ee98f(0x223));const _0x39b95a=selectedHistoryRefs(await listGitHistoryRefs(_0x1252bd),_0x148922);for(const _0xab1389 of _0x39b95a){const _0x218216=await runReadOnlyGitAllowFailure(_0x1252bd,[_0x4ee98f(0x1de),_0x4ee98f(0x184),_0x529bd3,_0xab1389[_0x4ee98f(0x151)]]);if(_0x218216[_0x4ee98f(0x14d)]===-0x1eef+-0x1382+-0x3271*-0x1)return;}throw new Error(_0x4ee98f(0x223));}export async function readGitHistoryFiles(_0x2b5fc3,_0x4da142,_0x56e744){const _0x24a969=_0x4148b8;await assertHistoryCommitReachable(_0x2b5fc3,_0x4da142,_0x56e744);const _0x382037=await runReadOnlyGit(_0x2b5fc3,[_0x24a969(0x178),_0x24a969(0x1bf),_0x24a969(0x1ed),_0x24a969(0x1d6),'-r','-z','-M','-C',_0x24a969(0x134),_0x4da142],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x5fa00e=_0x382037[_0x24a969(0x221)][_0x24a969(0x1c6)]('\x00'),_0x24315c=[];for(let _0x539b96=-0xa5c+0x24f4+0x353*-0x8;_0x539b96<_0x5fa00e[_0x24a969(0x25d)];_0x539b96+=0x351+-0x2086*-0x1+-0xbf2*0x3){const _0x534317=_0x5fa00e[_0x539b96];if(_0x534317===undefined||_0x534317[_0x24a969(0x25d)]===0x129f+0x9a9+-0x1c48)continue;const _0x16edb8=_0x534317[0x403*-0x5+-0x16f+0x157e]??'M';if(_0x16edb8==='R'||_0x16edb8==='C'){const _0x44c352=_0x5fa00e[_0x539b96+(0x23*-0x43+0x1*0x178+0x3d9*0x2)],_0x3b7616=_0x5fa00e[_0x539b96+(-0x4*0x3af+0x1dfa+0x41*-0x3c)];if(_0x44c352!==undefined&&_0x3b7616!==undefined)_0x24315c[_0x24a969(0x17f)]({'path':_0x3b7616,'previousPath':_0x44c352,'change':gitChange(_0x16edb8)});_0x539b96+=-0x54*0x52+0x1341+0x7a9;}else{const _0x2d13cb=_0x5fa00e[_0x539b96+(-0x13*-0xe1+0x1b25*0x1+0xe9d*-0x3)];if(_0x2d13cb!==undefined)_0x24315c[_0x24a969(0x17f)]({'path':_0x2d13cb,'change':gitChange(_0x16edb8)});_0x539b96+=-0x20bd+0x2d7*-0xb+0x1*0x3ffb;}}return _0x24315c;}export async function readGitHistoryFileDiff(_0x40c4a3,_0x4a4f4c,_0x306f8d,_0x2babf7,_0x400131){const _0x33ac6d=_0x4148b8;await assertHistoryCommitReachable(_0x40c4a3,_0x4a4f4c,_0x2babf7);const _0x13591f=safeGitWorkspacePath(_0x306f8d),_0x1255bc=_0x400131===undefined?undefined:safeGitWorkspacePath(_0x400131),_0x27a38f=await runReadOnlyGit(_0x40c4a3,[_0x33ac6d(0x1dd),_0x33ac6d(0x1cd),_0x33ac6d(0x1ed),_0x33ac6d(0x137),_0x33ac6d(0x1c0),_0x4a4f4c,'--',_0x33ac6d(0x1c9)+_0x13591f,..._0x1255bc===undefined||_0x1255bc===_0x13591f?[]:[_0x33ac6d(0x1c9)+_0x1255bc]]),_0x162c07=_0x27a38f[_0x33ac6d(0x159)][_0x33ac6d(0x215)](0x1775+0x1*-0x1b05+0x390)||_0x27a38f[_0x33ac6d(0x221)][_0x33ac6d(0x215)](_0x33ac6d(0x255));if(_0x162c07)return{'binary':!![],'summary':_0x33ac6d(0x1b3)+createHash(_0x33ac6d(0x23a))[_0x33ac6d(0x219)](_0x27a38f[_0x33ac6d(0x159)])[_0x33ac6d(0x1a2)](_0x33ac6d(0x1cf))+_0x33ac6d(0x25b)+_0x27a38f[_0x33ac6d(0x159)][_0x33ac6d(0x25d)],'truncated':_0x27a38f[_0x33ac6d(0x1ae)]};return{'binary':![],'text':_0x27a38f[_0x33ac6d(0x221)],'truncated':_0x27a38f[_0x33ac6d(0x1ae)]};}export async function readGitHistoryFileContentRange(_0x49d072,_0x55af28,_0x4c413b,_0x1ccad8,_0x42c03a,_0x1daed9){const _0x449d38=_0x4148b8;if(!Number[_0x449d38(0x1bc)](_0x1ccad8)||_0x1ccad8<-0x1*0x108+0x273*-0x7+0x122d||!Number[_0x449d38(0x1bc)](_0x42c03a)||_0x42c03a<-0x2*0x3c4+0xa6*-0xf+-0x9*-0x1eb||_0x42c03a>(-0x268a+-0x11*-0x21d+0x35*0xd)*(-0x1a54+0x368*-0x4+-0x15fa*-0x2)*(0x1*0x13b+0x5db*-0x3+0x1456)||_0x1ccad8+_0x42c03a>(0x1631+0x28f*0xc+-0x34d1)*(-0xf1d*0x1+0x8e*0x41+0x1*-0x10f1)*(-0x1*0xc16+0x1d7e+0x2*-0x6b4))throw new Error(_0x449d38(0x157));await assertHistoryCommitReachable(_0x49d072,_0x55af28,_0x1daed9);const _0x16f681=safeGitWorkspacePath(_0x4c413b),_0xe0ffb5=_0x55af28+':'+_0x16f681,_0xdf2324=await runReadOnlyGit(_0x49d072,[_0x449d38(0x1fa),'-s',_0xe0ffb5]),_0x565b7e=Number(_0xdf2324[_0x449d38(0x221)][_0x449d38(0x23b)]());if(!Number[_0x449d38(0x1bc)](_0x565b7e)||_0x565b7e<-0x21e8+0xc6c+0x157c||_0x1ccad8>_0x565b7e)throw new Error(_0x449d38(0x157));if(_0x1ccad8===_0x565b7e)return{'path':_0x16f681,'size':_0x565b7e,'offset':_0x1ccad8,'contentBase64':'','nextOffset':null};const _0xfc2bc7=await runReadOnlyGitAllowFailure(_0x49d072,[_0x449d38(0x1fa),_0x449d38(0x1d1),_0xe0ffb5],{'outputLimit':_0x1ccad8+_0x42c03a,'timeoutMs':GIT_HISTORY_TIMEOUT_MS});if(_0xfc2bc7[_0x449d38(0x14d)]!==0x62*-0x3e+-0x1d7d+0x19*0x221)throw new GitCommandError(_0xfc2bc7[_0x449d38(0x14d)],_0xfc2bc7[_0x449d38(0x181)]);const _0x4e332c=_0xfc2bc7[_0x449d38(0x159)][_0x449d38(0x182)](_0x1ccad8,Math[_0x449d38(0x145)](_0x565b7e,_0x1ccad8+_0x42c03a)),_0x41a328=_0x1ccad8+_0x4e332c[_0x449d38(0x25d)];return{'path':_0x16f681,'size':_0x565b7e,'offset':_0x1ccad8,'contentBase64':_0x4e332c[_0x449d38(0x1b9)](_0x449d38(0x24b)),'nextOffset':_0x41a328<_0x565b7e?_0x41a328:null};}function _0x2b8d(_0x47b59d,_0x192d18){_0x47b59d=_0x47b59d-(-0x3*0x9ed+0x1*-0x813+0x270c);const _0x359c05=_0x5465();let _0x4b0ad2=_0x359c05[_0x47b59d];if(_0x2b8d['ImfTyr']===undefined){var _0xfaab6e=function(_0x387462){const _0x2d8968='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x11e626='',_0x4ab76b='';for(let _0x3ce76a=-0x2*0x8f3+0x67*0x4f+-0xf*0xed,_0x435886,_0xd9ea81,_0x173bf7=0x51c+-0x601*0x2+0x6e6*0x1;_0xd9ea81=_0x387462['charAt'](_0x173bf7++);~_0xd9ea81&&(_0x435886=_0x3ce76a%(-0x3c1+-0x527*-0x1+-0x3b*0x6)?_0x435886*(-0xe*0x291+-0x25a8*-0x1+-0x7e*0x3)+_0xd9ea81:_0xd9ea81,_0x3ce76a++%(-0x1*0x2c5+0x1*-0x14c2+0x178b))?_0x11e626+=String['fromCharCode'](0x224e+-0x248c+-0x1*-0x33d&_0x435886>>(-(-0x233+0x10f*0x4+-0x207)*_0x3ce76a&-0x521+-0x2*0xcec+0x1eff)):0x3*0x547+-0x1d24+0xd4f*0x1){_0xd9ea81=_0x2d8968['indexOf'](_0xd9ea81);}for(let _0x51368b=-0x199+0x1*-0x21a1+-0x3*-0xbbe,_0x72e5fd=_0x11e626['length'];_0x51368b<_0x72e5fd;_0x51368b++){_0x4ab76b+='%'+('00'+_0x11e626['charCodeAt'](_0x51368b)['toString'](0x5*0x4e7+-0x1*-0x19a8+0x7f*-0x65))['slice'](-(-0x5e6+-0x67b+-0xc63*-0x1));}return decodeURIComponent(_0x4ab76b);};_0x2b8d['VsaDso']=_0xfaab6e,_0x2b8d['UoyNfn']={},_0x2b8d['ImfTyr']=!![];}const _0x834a3e=_0x359c05[0xaf9*0x2+-0xb2*0x1+-0x1540];_0x2b8d['SlKgwT']!==_0x834a3e&&(_0x2b8d['UoyNfn']={},_0x2b8d['SlKgwT']=_0x834a3e);const _0x44541b=_0x2b8d['UoyNfn'][_0x47b59d];return _0x44541b===undefined?(_0x4b0ad2=_0x2b8d['VsaDso'](_0x4b0ad2),_0x2b8d['UoyNfn'][_0x47b59d]=_0x4b0ad2):_0x4b0ad2=_0x44541b,_0x4b0ad2;}export async function readCurrentChanges(_0x165bc0){const _0x10862b=_0x4148b8;return(await readCurrentChangesSummary(_0x165bc0))[_0x10862b(0x23e)];}export async function readCurrentChangeDiff(_0x649931,_0x200987){const _0x4bacca=_0x4148b8,_0x467692=safeGitWorkspacePath(_0x200987);await assertCurrentChangePathAccessible(_0x649931,_0x467692);const _0x3489b1=await readCurrentChangeGitDiff(_0x649931,_0x467692),_0x1759ff=await readWorkingTreeText(_0x649931,_0x467692),_0x2227f4=_0x3489b1[_0x4bacca(0x159)][_0x4bacca(0x215)](0x101f*0x1+-0x475+0x1*-0xbaa)||_0x3489b1[_0x4bacca(0x221)][_0x4bacca(0x215)](_0x4bacca(0x255))||_0x1759ff?.[_0x4bacca(0x1e8)]===!![];if(_0x2227f4)return{'binary':!![],'summary':_0x4bacca(0x1b3)+createHash(_0x4bacca(0x23a))[_0x4bacca(0x219)](_0x3489b1[_0x4bacca(0x159)])[_0x4bacca(0x1a2)](_0x4bacca(0x1cf))+_0x4bacca(0x25b)+_0x3489b1[_0x4bacca(0x159)][_0x4bacca(0x25d)],'truncated':_0x3489b1[_0x4bacca(0x1ae)]||_0x1759ff?.[_0x4bacca(0x1ae)]===!![]};return{'binary':![],'text':_0x3489b1[_0x4bacca(0x221)],'truncated':_0x3489b1[_0x4bacca(0x1ae)]||_0x1759ff?.[_0x4bacca(0x1ae)]===!![],'afterText':_0x1759ff?.[_0x4bacca(0x221)]??'',..._0x1759ff===undefined?{}:{'afterTruncated':_0x1759ff[_0x4bacca(0x1ae)]}};}async function readCurrentChangeGitDiff(_0x2b5df2,_0x1490f3){const _0x4d98af=_0x4148b8,_0x28369d=await runReadOnlyGit(_0x2b5df2,[_0x4d98af(0x1c7),_0x4d98af(0x171),_0x4d98af(0x18f),'-z','--',_0x4d98af(0x1c9)+_0x1490f3]);if(_0x28369d[_0x4d98af(0x221)][_0x4d98af(0x1c6)]('\x00')[_0x4d98af(0x215)](_0x1490f3)){const _0xe79fba=await runReadOnlyGitAllowFailure(_0x2b5df2,[_0x4d98af(0x1c4),_0x4d98af(0x183),_0x4d98af(0x137),_0x4d98af(0x1c0),'--',_0x4d98af(0x19f),_0x1490f3]);if(_0xe79fba[_0x4d98af(0x14d)]!==0xcb*0x5+-0xe9f+0xaa8&&_0xe79fba[_0x4d98af(0x14d)]!==-0xc5*0x25+-0x941+0x25bb)throw new GitCommandError(_0xe79fba[_0x4d98af(0x14d)],_0xe79fba[_0x4d98af(0x181)]);return _0xe79fba;}return runReadOnlyGit(_0x2b5df2,[_0x4d98af(0x1c4),_0x4d98af(0x137),_0x4d98af(0x1c0),_0x4d98af(0x1d0),'--',_0x4d98af(0x1c9)+_0x1490f3]);}export async function isWorkspaceChangeVisible(_0x21afb9,_0x5edf2e){const _0x4682a3=_0x4148b8;try{return await assertCurrentChangePathAccessible(_0x21afb9,safeGitWorkspacePath(_0x5edf2e)),!![];}catch(_0x2cc0ba){if(_0x2cc0ba instanceof Error&&(_0x2cc0ba[_0x4682a3(0x1ac)]===_0x4682a3(0x13c)||_0x2cc0ba[_0x4682a3(0x1ac)]===_0x4682a3(0x1f6)||_0x2cc0ba[_0x4682a3(0x1ac)]===_0x4682a3(0x1ba)))return![];throw _0x2cc0ba;}}async function assertCurrentChangePathAccessible(_0x504016,_0x6df596){const _0x30544d=_0x4148b8,_0x20bd19=await realpath(_0x504016),_0x5469f4=resolve(_0x20bd19,_0x6df596),_0x260644=await lstat(_0x5469f4)[_0x30544d(0x18a)](_0x160ce1=>{const _0x4a2096=_0x30544d;if(_0x160ce1[_0x4a2096(0x14d)]===_0x4a2096(0x172))return undefined;throw _0x160ce1;});if(_0x260644===undefined)return;await resolveWorkspaceEntry(_0x20bd19,_0x6df596,![]);}async function readWorkingTreeText(_0x4fb43b,_0x53b82e){const _0x3c1b03=_0x4148b8,_0x437351=await realpath(_0x4fb43b);let _0x493074;try{_0x493074=await resolveWorkspaceEntry(_0x437351,_0x53b82e,![]);}catch(_0x53220b){if(_0x53220b instanceof Error&&_0x53220b[_0x3c1b03(0x1ac)]===_0x3c1b03(0x1f6))return undefined;throw _0x53220b;}const _0x24cdc4=await lstat(_0x493074);if(!_0x24cdc4[_0x3c1b03(0x251)]())return undefined;const _0x43d191=await readFile(_0x493074);return diffTextFromBuffer(_0x43d191,_0x43d191[_0x3c1b03(0x25d)]>GIT_OUTPUT_LIMIT);}function diffTextFromBuffer(_0x2752c7,_0x2e8d4f){const _0x393971=_0x4148b8;if(_0x2752c7[_0x393971(0x215)](0x1e68+-0x2366+0x4fe)||!isValidUtf8(_0x2752c7))return{'binary':!![],'truncated':_0x2e8d4f};let _0x1d5c6c=Math[_0x393971(0x145)](_0x2752c7[_0x393971(0x25d)],GIT_OUTPUT_LIMIT);while(_0x1d5c6c>0x44*0xc+-0x1875+0x9*0x25d&&_0x1d5c6c<_0x2752c7[_0x393971(0x25d)]&&isUtf8ContinuationByte(_0x2752c7[_0x1d5c6c]))_0x1d5c6c-=0x28*-0x36+-0xc*0x12d+0x168d;return{'binary':![],'text':_0x2752c7[_0x393971(0x182)](0x1c01+-0x689+-0x728*0x3,_0x1d5c6c)[_0x393971(0x1b9)](_0x393971(0x19b)),'truncated':_0x2e8d4f};}export async function restoreCurrentChange(_0x20f976,_0x4e6ac5,_0x1778d6){const _0x59f18e=_0x4148b8,_0x123890=safeGitWorkspacePath(_0x4e6ac5),_0x154619=_0x59f18e(0x1c9)+_0x123890;if(_0x1778d6===_0x59f18e(0x14c)){const _0x32ca8b=await runReadOnlyGit(_0x20f976,[_0x59f18e(0x24c),_0x59f18e(0x260),'-z',_0x59f18e(0x217),'--',_0x154619]);if(!_0x32ca8b[_0x59f18e(0x221)][_0x59f18e(0x1c6)]('\x00')[_0x59f18e(0x140)](_0x23f016=>_0x23f016[_0x59f18e(0x1af)](_0x59f18e(0x21a))&&_0x23f016[_0x59f18e(0x20c)](-0x11e7+0x1d11+-0xb27)===_0x123890))throw new Error(_0x59f18e(0x1fe));const _0x168d26=await realpath(_0x20f976),_0x5ac0fc=resolve(_0x168d26,_0x123890),_0x5c9b63=await lstat(_0x5ac0fc);if(!_0x5c9b63[_0x59f18e(0x251)]()||_0x5c9b63[_0x59f18e(0x19a)]())throw new Error(_0x59f18e(0x1fe));await unlink(_0x5ac0fc);return;}if(_0x1778d6===_0x59f18e(0x256)){await runGit(_0x20f976,[_0x59f18e(0x18c),_0x59f18e(0x248),'--',_0x154619]);return;}await runGit(_0x20f976,[_0x59f18e(0x18c),_0x59f18e(0x15b),_0x59f18e(0x220),_0x59f18e(0x248),'--',_0x154619]);}function safeGitWorkspacePath(_0xc9ecba){const _0x5d1d5b=_0x4148b8;if(_0xc9ecba[_0x5d1d5b(0x25d)]===-0xf35+-0x102*-0x3+0x1*0xc2f||_0xc9ecba[_0x5d1d5b(0x215)]('\x00')||_0xc9ecba[_0x5d1d5b(0x1af)]('/')||_0xc9ecba[_0x5d1d5b(0x1af)]('\x5c'))throw new Error(_0x5d1d5b(0x13c));const _0x1fe078=_0xc9ecba[_0x5d1d5b(0x191)]('\x5c','/');if(_0x1fe078[_0x5d1d5b(0x1c6)]('/')[_0x5d1d5b(0x140)](_0x2fbb17=>_0x2fbb17===''||_0x2fbb17==='..'||_0x2fbb17===_0x5d1d5b(0x216)))throw new Error(_0x5d1d5b(0x13c));return _0x1fe078;}function gitChange(_0x6195b0){const _0x39c5f0=_0x4148b8;if(_0x6195b0==='A')return _0x39c5f0(0x155);if(_0x6195b0==='D')return _0x39c5f0(0x202);if(_0x6195b0==='R')return _0x39c5f0(0x139);if(_0x6195b0==='C')return _0x39c5f0(0x1d7);if(_0x6195b0==='T')return _0x39c5f0(0x1c2);return _0x39c5f0(0x136);}export class GitCommandError extends Error{[_0x4148b8(0x14d)];[_0x4148b8(0x181)];constructor(_0xe8430f,_0x1cac9a){const _0x5d4968=_0x4148b8;super(_0x5d4968(0x1d9)),this[_0x5d4968(0x14d)]=_0xe8430f,this[_0x5d4968(0x181)]=_0x1cac9a;}}async function runReadOnlyGit(_0x1fe885,_0x256762,_0xdde95={}){return runGit(_0x1fe885,_0x256762,{..._0xdde95,'readOnly':!![]});}async function runReadOnlyGitAllowFailure(_0x29b8c2,_0x361b1f,_0x5effda={}){return runGitAllowFailure(_0x29b8c2,_0x361b1f,{..._0x5effda,'readOnly':!![]});}async function runGit(_0x1012ca,_0x35bf07,_0x4dc9d4={}){const _0x30f38b=_0x4148b8,_0x138835=await runGitAllowFailure(_0x1012ca,_0x35bf07,_0x4dc9d4);if(_0x138835[_0x30f38b(0x14d)]!==0x1*-0xeff+0x2357+-0x1458)throw new GitCommandError(_0x138835[_0x30f38b(0x14d)],_0x138835[_0x30f38b(0x181)]);return _0x138835;}async function runGitAllowFailure(_0x11fd55,_0x1ba742,_0x152b56={}){return new Promise((_0x193a5b,_0x13726d)=>{const _0x264750=_0x2b8d,_0x5984a9=_0x152b56[_0x264750(0x1b5)]??GIT_OUTPUT_LIMIT,_0x5b8d1e=spawn(_0x264750(0x19c),[..._0x1ba742],{'cwd':_0x11fd55,'shell':![],'windowsHide':!![],'stdio':[_0x264750(0x257),_0x264750(0x209),_0x264750(0x209)],..._0x152b56[_0x264750(0x18e)]===!![]?{'env':{...process.env,'GIT_OPTIONAL_LOCKS':'0'}}:{}}),_0x5baae1=[],_0x1a5aa3=[];let _0x203cc9=-0x1*-0x122c+0xbd4*-0x1+0x658*-0x1,_0x1ceeb5=-0x66e+-0x16a*-0x1a+-0x1e56,_0xe2fd4a=![];const _0x45b87f=setTimeout(()=>{const _0x48893d=_0x264750;if(process[_0x48893d(0x206)]===_0x48893d(0x1f1)){const _0x449eda=_0x5b8d1e[_0x48893d(0x1a9)];if(_0x449eda===undefined){_0x5b8d1e[_0x48893d(0x1a7)](_0x48893d(0x135));return;}void terminateProcessTree({'pid':_0x449eda,'kill':_0x4d49f4=>_0x5b8d1e[_0x48893d(0x1a7)](_0x4d49f4)},_0x48893d(0x1f1))[_0x48893d(0x18a)](()=>{const _0x22176c=_0x48893d;try{_0x5b8d1e[_0x22176c(0x1a7)](_0x22176c(0x135));}catch{}});return;}_0x5b8d1e[_0x48893d(0x1a7)](_0x48893d(0x135));},_0x152b56[_0x264750(0x22f)]??GIT_TIMEOUT_MS);_0x5b8d1e[_0x264750(0x20d)]['on'](_0x264750(0x224),_0x155270=>{const _0x1eee6d=_0x264750,_0x250b82=Math[_0x1eee6d(0x204)](0x668+-0x475*-0x3+-0x13c7,_0x5984a9-_0x203cc9);if(_0x250b82>0x1*0xd5a+-0x453*0x9+0x253*0xb){const _0x139e00=_0x155270[_0x1eee6d(0x182)](0xa3e+0xcf5*0x1+-0x1*0x1733,_0x250b82);_0x5baae1[_0x1eee6d(0x17f)](_0x139e00),_0x203cc9+=_0x139e00[_0x1eee6d(0x25d)];}_0xe2fd4a||=_0x155270[_0x1eee6d(0x25d)]>_0x250b82;}),_0x5b8d1e[_0x264750(0x181)]['on'](_0x264750(0x224),_0x32a541=>{const _0x9306a8=_0x264750,_0x2cc178=Math[_0x9306a8(0x204)](-0x239e+-0x1462+0x3800,-0x1a66*0x1+0x790+0x22d6-_0x1ceeb5);if(_0x2cc178===-0xa8a+0x1f86+-0x14fc)return;const _0x4fe351=_0x32a541[_0x9306a8(0x182)](0x35e+-0x4*0xa3+-0xf*0xe,_0x2cc178);_0x1a5aa3[_0x9306a8(0x17f)](_0x4fe351),_0x1ceeb5+=_0x4fe351[_0x9306a8(0x25d)];}),_0x5b8d1e[_0x264750(0x1d2)](_0x264750(0x133),_0x1b6ae1=>{clearTimeout(_0x45b87f),_0x13726d(_0x1b6ae1);}),_0x5b8d1e[_0x264750(0x1d2)](_0x264750(0x15a),_0x502394=>{const _0x38d8a3=_0x264750;clearTimeout(_0x45b87f);const _0x443bd7=Buffer[_0x38d8a3(0x201)](_0x5baae1);_0x193a5b({'code':_0x502394??-0x54d*-0x5+0xffd+0x1*-0x2a7d,'output':_0x443bd7,'text':_0x443bd7[_0x38d8a3(0x1b9)](_0x38d8a3(0x19b)),'stderr':Buffer[_0x38d8a3(0x201)](_0x1a5aa3)[_0x38d8a3(0x1b9)](_0x38d8a3(0x19b)),'truncated':_0xe2fd4a});});});}function isGitUnavailable(_0x3f80df){const _0x56375c=_0x4148b8;return _0x3f80df instanceof Error&&_0x56375c(0x14d)in _0x3f80df&&_0x3f80df[_0x56375c(0x14d)]===_0x56375c(0x172);}function summarizeText(_0x6c4408){const _0x1ed1a2=_0x4148b8;return JSON[_0x1ed1a2(0x238)]({'sha256':createHash(_0x1ed1a2(0x23a))[_0x1ed1a2(0x219)](_0x6c4408)[_0x1ed1a2(0x1a2)](_0x1ed1a2(0x1cf)),'bytes':Buffer[_0x1ed1a2(0x150)](_0x6c4408)});}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/node",
3
- "version": "0.9.38",
3
+ "version": "0.9.40",
4
4
  "description": "MyAgentRoam Node runtime CLI.",
5
5
  "type": "module",
6
6
  "files": [
@@ -25,8 +25,8 @@
25
25
  "node-pty": "1.1.0",
26
26
  "ws": "^8.21.3",
27
27
  "zod": "4.4.3",
28
- "@myagentroam/agent": "^0.9.38",
29
- "@myagentroam/protocol": "^0.9.38"
28
+ "@myagentroam/agent": "^0.9.40",
29
+ "@myagentroam/protocol": "^0.9.40"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/ws": "^8.18.1"