@myagentroam/node 0.9.37 → 0.9.38

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 _0x5ca5e6=_0x1f08;(function(_0x315a08,_0x38920b){const _0x12a35f=_0x1f08,_0x11ddd9=_0x315a08();while(!![]){try{const _0x2eb91e=-parseInt(_0x12a35f(0x1dc))/(-0xff5+-0x23f7+0x76b*0x7)+parseInt(_0x12a35f(0x1f5))/(0x1*-0x126e+0x8c4+-0x4*-0x26b)*(parseInt(_0x12a35f(0x1cd))/(0x1e7*-0x5+-0x1c98+-0x572*-0x7))+-parseInt(_0x12a35f(0x1d7))/(0xde4+-0x42+-0xd9e)*(-parseInt(_0x12a35f(0x1ba))/(-0x9*0x42d+0x1*-0xaa9+-0x3043*-0x1))+parseInt(_0x12a35f(0x1c8))/(0x2fa+-0x1229+0xf35)*(parseInt(_0x12a35f(0x1d4))/(-0x24a3*0x1+0x182b+-0x1c9*-0x7))+parseInt(_0x12a35f(0x1bf))/(-0x2*0x551+0x30a+-0x2*-0x3d0)*(parseInt(_0x12a35f(0x1f4))/(-0x20*0x43+0x1*0xc8+0x28b*0x3))+parseInt(_0x12a35f(0x1eb))/(-0x1*0x6b+0xe*0x4f+-0x1*0x3dd)*(-parseInt(_0x12a35f(0x1ca))/(0x11*0xe+0x1*0x26b3+0x12*-0x233))+parseInt(_0x12a35f(0x1df))/(0x1a32+-0xf9d+0x1d*-0x5d)*(-parseInt(_0x12a35f(0x1ea))/(0xf*-0xe5+0x455*-0x4+0x1ecc));if(_0x2eb91e===_0x38920b)break;else _0x11ddd9['push'](_0x11ddd9['shift']());}catch(_0x2c0e20){_0x11ddd9['push'](_0x11ddd9['shift']());}}}(_0x73aa,0x46595+0x8da0c+0xd731));import{isTerminalRunStatus}from'../util/node-operation-parsers.js';function _0x1f08(_0x91d19e,_0x36c696){_0x91d19e=_0x91d19e-(-0xdf9+-0x603+0x15b0);const _0x231244=_0x73aa();let _0x4f2773=_0x231244[_0x91d19e];if(_0x1f08['wKxNbm']===undefined){var _0xdf5767=function(_0x4b1b29){const _0x11a695='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x30888f='',_0x56436c='';for(let _0x50817f=-0x3*-0xbd9+0xb29+-0x2eb4,_0x28a887,_0x291cab,_0x56d9d2=-0x26ff*0x1+-0x61*0x27+0x35c6;_0x291cab=_0x4b1b29['charAt'](_0x56d9d2++);~_0x291cab&&(_0x28a887=_0x50817f%(0xe4e+-0x2504+0x1*0x16ba)?_0x28a887*(-0x23b2*-0x1+-0x1229+-0x375*0x5)+_0x291cab:_0x291cab,_0x50817f++%(0x1*-0xdb2+0x249+0x19*0x75))?_0x30888f+=String['fromCharCode'](-0x17*-0x2+-0x6c5*-0x5+-0x2108&_0x28a887>>(-(-0xc31*0x3+-0x196+0x262b)*_0x50817f&-0x1d6c+0x2069*0x1+0x21*-0x17)):0x1*-0x2185+-0x1*0x20e7+0x589*0xc){_0x291cab=_0x11a695['indexOf'](_0x291cab);}for(let _0x5c075e=0x47*0x4c+0x9d*0x10+0xf72*-0x2,_0x41a6df=_0x30888f['length'];_0x5c075e<_0x41a6df;_0x5c075e++){_0x56436c+='%'+('00'+_0x30888f['charCodeAt'](_0x5c075e)['toString'](-0x1367*0x1+0x18e*-0x1+0x1505*0x1))['slice'](-(-0x16cd+-0xaf6+-0x13*-0x1c7));}return decodeURIComponent(_0x56436c);};_0x1f08['FyEQWl']=_0xdf5767,_0x1f08['QqvfqC']={},_0x1f08['wKxNbm']=!![];}const _0x336d3b=_0x231244[-0x2*0xc96+-0x6ae+-0x54f*-0x6];_0x1f08['KvheAx']!==_0x336d3b&&(_0x1f08['QqvfqC']={},_0x1f08['KvheAx']=_0x336d3b);const _0x3342ab=_0x1f08['QqvfqC'][_0x91d19e];return _0x3342ab===undefined?(_0x4f2773=_0x1f08['FyEQWl'](_0x4f2773),_0x1f08['QqvfqC'][_0x91d19e]=_0x4f2773):_0x4f2773=_0x3342ab,_0x4f2773;}import{isPlainRecord}from'../runner/codex/conversation-parser.js';function _0x73aa(){const _0x4c8b24=['mJmWode2ngLICNjryG','CNvUlMLUDgvYCNvWDa','CMvZCg9Uza','y2fUB25Py2fSuNvUswq','zw1PDfj1BG','z2v0qxbWCM92ywW','CMvHzeLTywDL','uKvkrunuruq','DxnLCKL0zw1jza','CNvUswq','z2v0','mtqZrhbYDgr0','mJqZmeHite5vDa','CMvZCg9UzfvZzxjjBNb1Da','vvnfuL9jtLrfuLjvufrfra','y3vYCMvUDev4zwn1DgLVBKLK','qvbquK9wquXFtK9ux0zpvu5e','CNvUlMnHBMnLBa','zgvJAxnPB24','qvbquK9wruq','Aw50zxjYDxb0u2vZC2LVBG','nte1nJCYmxvKyvjvwG','nKfzsfvRCW','y2fUy2vSt3jjBNrLCNj1Chq','qvbquK9wquXFrevdsvnjt05Fsu5wquXjra','C3rYAw5N','uLvox05pvf9gt1vora','zgvJAwrLqxbWCM92ywW','uLvox0LnquDfx0LovKfmsuq','x19Yzxf1zxn0vxnLCKLK','z2v0qwDLBNrtzxnZAw9U','BwfYA0LUDgvYCNvWDgvK','mZK2otveyLjOq0i','C2vZC2LVBKLK','y29UDMvYC2f0Aw9UvhvYBKzVCLj1BG','q0foq0vmteLorW','CNvUlMfWChjVDMfSlMrLy2LZAw9U','mtz5tMTQuxK','su5urvjsvvburuq','y29UDhjVBa','CMvXDwLYzu93BMvKuNvU','B3bLCMf0Aw9UCW','yxbWCM92ywXjza','yxbWCM92ywWUzgvJAwrLza','BNvTyMvY','C3rHDhvZ','mtK3nZC4y2PbvLj3','CMvXDwLYzvj1BG','nZe3mZfZtfvosu4','uLvox0LnquDfx05pvf9gt1vora','vvnfuL9jtLbvvf9jtLzbteLe','odC5mduXz3fsCMP2','AxnjBNrLz2vY','B3b0Aw9UCW','z2v0uNvU','Cgf1C2vrDwv1zq','yxnZzxj0uNvUt3DUzxi','CNvUDgLTzq','mJG3yMnKsKfx','ywn0AxzLu2vZC2LVBLj1BG','Aw1Hz2vjBMrLEa','nZC2sxHMt2zL','yw5ZD2vYCW','Aw1Hz2u','DhjHBNnPDgLVBLj1BG','u0vtu0LptL9ot1rFrK9vtKq','mJKYodCYsLDUEuzJ','CMvXDwvZDeLK','CNvUlMLUDgvYCNvWDgvK'];_0x73aa=function(){return _0x4c8b24;};return _0x73aa();}import{assertRunOwner}from'./run-ownership-policy.js';export class RunWorkbenchService{[_0x5ca5e6(0x1cf)];constructor(_0x954b46){const _0x1ae707=_0x5ca5e6;this[_0x1ae707(0x1cf)]=_0x954b46;}[_0x5ca5e6(0x1c3)](){const _0x1a28ec=_0x5ca5e6;return{'run.get':_0x412565=>this[_0x1a28ec(0x1e9)](record(_0x412565)),'run.image.read':_0x282cc3=>this[_0x1a28ec(0x1d9)](record(_0x282cc3)),'run.user-input.respond':_0x1d2a2c=>this[_0x1a28ec(0x1e1)](record(_0x1d2a2c)),'session.interrupt':_0x2799ba=>this[_0x1a28ec(0x1f3)](record(_0x2799ba)),'run.cancel':_0x5b81be=>this[_0x1a28ec(0x1f6)](_0x1a28ec(0x1f0),record(_0x5b81be)),'run.interrupt':_0x3299d8=>this[_0x1a28ec(0x1f6)](_0x1a28ec(0x1e0),record(_0x3299d8)),'run.approval.decide':_0x5b419b=>this[_0x1a28ec(0x1b5)](record(_0x5b419b))};}[_0x5ca5e6(0x1e9)](_0x19864c){const _0x171a5d=_0x5ca5e6;return{'run':this[_0x171a5d(0x1c9)](_0x19864c[_0x171a5d(0x1e8)])};}async[_0x5ca5e6(0x1d9)](_0x3363ec){const _0x54cb0d=_0x5ca5e6;if(typeof _0x3363ec[_0x54cb0d(0x1e8)]!==_0x54cb0d(0x1f8)||typeof _0x3363ec[_0x54cb0d(0x1d6)]!==_0x54cb0d(0x1c6)||!Number[_0x54cb0d(0x1ce)](_0x3363ec[_0x54cb0d(0x1d6)])||_0x3363ec[_0x54cb0d(0x1d6)]<-0x1d1+-0x26ff*0x1+-0x51a*-0x8)throw new Error(_0x54cb0d(0x1b6));const _0x58281f=await this[_0x54cb0d(0x1cf)][_0x54cb0d(0x1e5)](_0x3363ec[_0x54cb0d(0x1e8)],_0x3363ec[_0x54cb0d(0x1d6)]);if(_0x58281f===undefined)throw new Error(_0x54cb0d(0x1cb));return{'image':_0x58281f};}[_0x5ca5e6(0x1e1)](_0xf1f90f){const _0x3d4b8f=_0x5ca5e6;if(typeof _0xf1f90f[_0x3d4b8f(0x1e8)]!==_0x3d4b8f(0x1f8)||typeof _0xf1f90f[_0x3d4b8f(0x1dd)]!==_0x3d4b8f(0x1f8)||!isPlainRecord(_0xf1f90f[_0x3d4b8f(0x1d8)]))throw new Error(_0x3d4b8f(0x1cc));const _0x538282=this[_0x3d4b8f(0x1c2)](_0xf1f90f[_0x3d4b8f(0x1e8)],_0xf1f90f[_0x3d4b8f(0x1b7)]),_0xac069d=this[_0x3d4b8f(0x1cf)][_0x3d4b8f(0x1d3)][_0x3d4b8f(0x1ee)](_0x538282['id'])??_0x538282['id'];return this[_0x3d4b8f(0x1cf)][_0x3d4b8f(0x1ec)](_0xac069d,_0xf1f90f[_0x3d4b8f(0x1dd)],_0xf1f90f[_0x3d4b8f(0x1d8)]),{'accepted':!![]};}[_0x5ca5e6(0x1f3)](_0x1ef91d){const _0x560bfb=_0x5ca5e6;if(typeof _0x1ef91d[_0x560bfb(0x1bb)]!==_0x560bfb(0x1f8))throw new Error(_0x560bfb(0x1db));const _0x327a3b=this[_0x560bfb(0x1cf)][_0x560bfb(0x1d3)][_0x560bfb(0x1b8)](_0x1ef91d[_0x560bfb(0x1bb)]);if(_0x327a3b===undefined)throw new Error(_0x560bfb(0x1db));const _0x540587=this[_0x560bfb(0x1cf)][_0x560bfb(0x1d3)][_0x560bfb(0x1d5)](_0x327a3b['id']);if(_0x540587===undefined||isTerminalRunStatus(_0x540587[_0x560bfb(0x1c7)]))throw new Error(_0x560bfb(0x1b4));return this[_0x560bfb(0x1f6)](_0x560bfb(0x1e0),{'runId':_0x540587['id'],'__requestUserId':_0x1ef91d[_0x560bfb(0x1b7)]});}[_0x5ca5e6(0x1f6)](_0x357750,_0xe370c2){const _0x2bf655=_0x5ca5e6,_0x529d9e=this[_0x2bf655(0x1c2)](_0xe370c2[_0x2bf655(0x1e8)],_0xe370c2[_0x2bf655(0x1b7)]),_0x3fd837=this[_0x2bf655(0x1cf)][_0x2bf655(0x1d3)][_0x2bf655(0x1da)](_0x529d9e['id'],_0x2bf655(0x1bd)),_0x2fe7d5=this[_0x2bf655(0x1cf)][_0x2bf655(0x1d3)][_0x2bf655(0x1ee)](_0x529d9e['id']),_0x58ff99=this[_0x2bf655(0x1cf)][_0x2bf655(0x1d3)][_0x2bf655(0x1bc)](_0x529d9e['id']),_0x3cef28=_0x2fe7d5??(_0x58ff99===undefined||_0x58ff99[_0x2bf655(0x1e7)]===null?_0x529d9e['id']:undefined);return this[_0x2bf655(0x1cf)][_0x2bf655(0x1d1)](_0x529d9e[_0x2bf655(0x1bb)]),_0x3cef28===undefined?(this[_0x2bf655(0x1cf)][_0x2bf655(0x1b9)](_0x529d9e['id']),this[_0x2bf655(0x1cf)][_0x2bf655(0x1e3)](_0x529d9e['id'],_0x2bf655(0x1de),{'code':_0x2bf655(0x1ed)},_0x2bf655(0x1c0))):(this[_0x2bf655(0x1cf)][_0x2bf655(0x1b9)](_0x3cef28),this[_0x2bf655(0x1cf)][_0x2bf655(0x1c1)](_0x357750,{'runId':_0x3cef28})),{'run':_0x3fd837};}[_0x5ca5e6(0x1b5)](_0x16c3a4){const _0x1ef35a=_0x5ca5e6;if(typeof _0x16c3a4[_0x1ef35a(0x1e8)]!==_0x1ef35a(0x1f8)||typeof _0x16c3a4[_0x1ef35a(0x1c4)]!==_0x1ef35a(0x1f8)||_0x16c3a4[_0x1ef35a(0x1f1)]!==_0x1ef35a(0x1f2)&&_0x16c3a4[_0x1ef35a(0x1f1)]!==_0x1ef35a(0x1e6))throw new Error(_0x1ef35a(0x1f7));const _0x4a66e4=this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1d3)][_0x1ef35a(0x1e4)](_0x16c3a4[_0x1ef35a(0x1c4)]);if(_0x4a66e4===undefined||this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1d3)][_0x1ef35a(0x1e2)](_0x4a66e4[_0x1ef35a(0x1e8)])!==_0x16c3a4[_0x1ef35a(0x1e8)])throw new Error(_0x1ef35a(0x1ef));this[_0x1ef35a(0x1d2)](_0x4a66e4[_0x1ef35a(0x1e8)],_0x16c3a4[_0x1ef35a(0x1b7)]);const _0x10e014=this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1d3)][_0x1ef35a(0x1b5)](_0x16c3a4[_0x1ef35a(0x1c4)],_0x16c3a4[_0x1ef35a(0x1f1)]);return this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1e3)](_0x10e014[_0x1ef35a(0x1e8)],_0x1ef35a(0x1c5),{'approvalId':_0x10e014['id'],'decision':_0x16c3a4[_0x1ef35a(0x1f1)]}),this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1c1)](_0x1ef35a(0x1be),{'runId':_0x10e014[_0x1ef35a(0x1e8)],'approvalId':_0x10e014['id'],'decision':_0x16c3a4[_0x1ef35a(0x1f1)]}),{'approval':_0x10e014};}[_0x5ca5e6(0x1c9)](_0x2b9d57){const _0x1e8b49=_0x5ca5e6;if(typeof _0x2b9d57!==_0x1e8b49(0x1f8))throw new Error(_0x1e8b49(0x1b4));const _0x30d1cc=this[_0x1e8b49(0x1cf)][_0x1e8b49(0x1d3)][_0x1e8b49(0x1d0)](_0x2b9d57);if(_0x30d1cc===undefined)throw new Error(_0x1e8b49(0x1b4));return _0x30d1cc;}[_0x5ca5e6(0x1c2)](_0x2dc04b,_0x549099){const _0x4c911e=_0x5ca5e6,_0x15b071=this[_0x4c911e(0x1c9)](_0x2dc04b);return assertRunOwner(_0x15b071,_0x549099),_0x15b071;}[_0x5ca5e6(0x1d2)](_0x2bc496,_0x128b7f){const _0x21b050=_0x5ca5e6;assertRunOwner(this[_0x21b050(0x1c9)](_0x2bc496),_0x128b7f);}}function record(_0xbc6b82){return isPlainRecord(_0xbc6b82)?_0xbc6b82:{};}
2
+ const _0x24be61=_0x42ac;(function(_0x4db7c4,_0x19e404){const _0x5ba149=_0x42ac,_0x486cdf=_0x4db7c4();while(!![]){try{const _0x1293b7=-parseInt(_0x5ba149(0x21d))/(0x406+-0x1*0x18f1+0x14ec)*(parseInt(_0x5ba149(0x20d))/(-0x1074+-0x1791*0x1+0x2807))+-parseInt(_0x5ba149(0x234))/(0x49*-0x65+0x59f+0x3*0x7bb)*(-parseInt(_0x5ba149(0x21b))/(-0x11c7+-0x1932+0x2afd))+parseInt(_0x5ba149(0x227))/(-0x1*-0x15d7+0x3*-0x74c+0x12)*(parseInt(_0x5ba149(0x211))/(0x11*0xd7+0x119c+0x3*-0xa9f))+parseInt(_0x5ba149(0x237))/(-0x14d+-0x5f3*0x3+-0x132d*-0x1)*(-parseInt(_0x5ba149(0x229))/(-0x18d3+0x3fd*0x5+-0x4a*-0x11))+-parseInt(_0x5ba149(0x21e))/(0x4b8+-0xae*0x7+0x13)*(-parseInt(_0x5ba149(0x209))/(-0x15*0xb9+0xfb6+-0x1*0x7f))+-parseInt(_0x5ba149(0x214))/(0x2414*0x1+-0x13d7+-0x1032)+parseInt(_0x5ba149(0x1f8))/(0x2129+-0x2b8+-0x1e65)*(-parseInt(_0x5ba149(0x236))/(0x1b32*-0x1+-0x1034*-0x2+0x529*-0x1));if(_0x1293b7===_0x19e404)break;else _0x486cdf['push'](_0x486cdf['shift']());}catch(_0x1fddd6){_0x486cdf['push'](_0x486cdf['shift']());}}}(_0x2a1e,0xe76b*0x1+0x8502*-0x10+0xca85c));import{isTerminalRunStatus}from'../util/node-operation-parsers.js';import{isPlainRecord}from'../runner/codex/conversation-parser.js';import{isHostedConversationImageRunId}from'../runner/mar-agent/generated-images.js';import{assertRunOwner}from'./run-ownership-policy.js';export class RunWorkbenchService{[_0x24be61(0x221)];constructor(_0x25944c){const _0x185b35=_0x24be61;this[_0x185b35(0x221)]=_0x25944c;}[_0x24be61(0x220)](){const _0x4f6564=_0x24be61;return{'run.get':_0x5a9c69=>this[_0x4f6564(0x22b)](record(_0x5a9c69)),'run.image.read':_0x31f831=>this[_0x4f6564(0x22e)](record(_0x31f831)),'run.user-input.respond':_0x8425fd=>this[_0x4f6564(0x208)](record(_0x8425fd)),'session.interrupt':_0xf4de6e=>this[_0x4f6564(0x218)](record(_0xf4de6e)),'run.cancel':_0x4fc7b8=>this[_0x4f6564(0x215)](_0x4f6564(0x1f4),record(_0x4fc7b8)),'run.interrupt':_0x405222=>this[_0x4f6564(0x215)](_0x4f6564(0x1f5),record(_0x405222)),'run.approval.decide':_0x3273b9=>this[_0x4f6564(0x219)](record(_0x3273b9))};}[_0x24be61(0x22b)](_0x3e9931){const _0x5606e3=_0x24be61;return{'run':this[_0x5606e3(0x212)](_0x3e9931[_0x5606e3(0x1f3)])};}async[_0x24be61(0x22e)](_0x1c97d1){const _0x424f8e=_0x24be61;if(typeof _0x1c97d1[_0x424f8e(0x1f3)]!==_0x424f8e(0x20a)||typeof _0x1c97d1[_0x424f8e(0x230)]!==_0x424f8e(0x223)||!Number[_0x424f8e(0x206)](_0x1c97d1[_0x424f8e(0x230)])||_0x1c97d1[_0x424f8e(0x230)]<-0x6a4+0x6ff*-0x3+0x1ba1)throw new Error(_0x424f8e(0x207));if(isHostedConversationImageRunId(_0x1c97d1[_0x424f8e(0x1f3)]))throw new Error(_0x424f8e(0x207));const _0x1450f6=await this[_0x424f8e(0x221)][_0x424f8e(0x1fa)](_0x1c97d1[_0x424f8e(0x1f3)],_0x1c97d1[_0x424f8e(0x230)]);if(_0x1450f6===undefined)throw new Error(_0x424f8e(0x20c));return{'image':_0x1450f6};}[_0x24be61(0x208)](_0x54e8b3){const _0x17612b=_0x24be61;if(typeof _0x54e8b3[_0x17612b(0x1f3)]!==_0x17612b(0x20a)||typeof _0x54e8b3[_0x17612b(0x205)]!==_0x17612b(0x20a)||!isPlainRecord(_0x54e8b3[_0x17612b(0x202)]))throw new Error(_0x17612b(0x21f));const _0x1ad66e=this[_0x17612b(0x21c)](_0x54e8b3[_0x17612b(0x1f3)],_0x54e8b3[_0x17612b(0x231)]),_0x5ae97c=this[_0x17612b(0x221)][_0x17612b(0x226)][_0x17612b(0x22f)](_0x1ad66e['id'])??_0x1ad66e['id'];return this[_0x17612b(0x221)][_0x17612b(0x1f6)](_0x5ae97c,_0x54e8b3[_0x17612b(0x205)],_0x54e8b3[_0x17612b(0x202)]),{'accepted':!![]};}[_0x24be61(0x218)](_0x4d12cb){const _0x30b0a8=_0x24be61;if(typeof _0x4d12cb[_0x30b0a8(0x21a)]!==_0x30b0a8(0x20a))throw new Error(_0x30b0a8(0x22c));const _0x510f2c=this[_0x30b0a8(0x221)][_0x30b0a8(0x226)][_0x30b0a8(0x233)](_0x4d12cb[_0x30b0a8(0x21a)]);if(_0x510f2c===undefined)throw new Error(_0x30b0a8(0x22c));const _0x2b5e18=this[_0x30b0a8(0x221)][_0x30b0a8(0x226)][_0x30b0a8(0x1f9)](_0x510f2c['id']);if(_0x2b5e18===undefined||isTerminalRunStatus(_0x2b5e18[_0x30b0a8(0x232)]))throw new Error(_0x30b0a8(0x200));return this[_0x30b0a8(0x215)](_0x30b0a8(0x1f5),{'runId':_0x2b5e18['id'],'__requestUserId':_0x4d12cb[_0x30b0a8(0x231)]});}[_0x24be61(0x215)](_0x2cdd27,_0x4bb6d8){const _0x86353a=_0x24be61,_0x2c81d1=this[_0x86353a(0x21c)](_0x4bb6d8[_0x86353a(0x1f3)],_0x4bb6d8[_0x86353a(0x231)]),_0x35cd3d=this[_0x86353a(0x221)][_0x86353a(0x226)][_0x86353a(0x1ff)](_0x2c81d1['id'],_0x86353a(0x213)),_0x13bda0=this[_0x86353a(0x221)][_0x86353a(0x226)][_0x86353a(0x22f)](_0x2c81d1['id']),_0x11cd79=this[_0x86353a(0x221)][_0x86353a(0x226)][_0x86353a(0x1fe)](_0x2c81d1['id']),_0x27af33=_0x13bda0??(_0x11cd79===undefined||_0x11cd79[_0x86353a(0x222)]===null?_0x2c81d1['id']:undefined);return this[_0x86353a(0x221)][_0x86353a(0x22d)](_0x2c81d1[_0x86353a(0x21a)]),_0x27af33===undefined?(this[_0x86353a(0x221)][_0x86353a(0x20b)](_0x2c81d1['id']),this[_0x86353a(0x221)][_0x86353a(0x217)](_0x2c81d1['id'],_0x86353a(0x1fc),{'code':_0x86353a(0x225)},_0x86353a(0x235))):(this[_0x86353a(0x221)][_0x86353a(0x20b)](_0x27af33),this[_0x86353a(0x221)][_0x86353a(0x228)](_0x2cdd27,{'runId':_0x27af33})),{'run':_0x35cd3d};}[_0x24be61(0x219)](_0x498b43){const _0x5be31d=_0x24be61;if(typeof _0x498b43[_0x5be31d(0x1f3)]!==_0x5be31d(0x20a)||typeof _0x498b43[_0x5be31d(0x216)]!==_0x5be31d(0x20a)||_0x498b43[_0x5be31d(0x201)]!==_0x5be31d(0x204)&&_0x498b43[_0x5be31d(0x201)]!==_0x5be31d(0x1f7))throw new Error(_0x5be31d(0x224));const _0x4e9c17=this[_0x5be31d(0x221)][_0x5be31d(0x226)][_0x5be31d(0x20e)](_0x498b43[_0x5be31d(0x216)]);if(_0x4e9c17===undefined||this[_0x5be31d(0x221)][_0x5be31d(0x226)][_0x5be31d(0x20f)](_0x4e9c17[_0x5be31d(0x1f3)])!==_0x498b43[_0x5be31d(0x1f3)])throw new Error(_0x5be31d(0x1fb));this[_0x5be31d(0x1fd)](_0x4e9c17[_0x5be31d(0x1f3)],_0x498b43[_0x5be31d(0x231)]);const _0x32182a=this[_0x5be31d(0x221)][_0x5be31d(0x226)][_0x5be31d(0x219)](_0x498b43[_0x5be31d(0x216)],_0x498b43[_0x5be31d(0x201)]);return this[_0x5be31d(0x221)][_0x5be31d(0x217)](_0x32182a[_0x5be31d(0x1f3)],_0x5be31d(0x210),{'approvalId':_0x32182a['id'],'decision':_0x498b43[_0x5be31d(0x201)]}),this[_0x5be31d(0x221)][_0x5be31d(0x228)](_0x5be31d(0x203),{'runId':_0x32182a[_0x5be31d(0x1f3)],'approvalId':_0x32182a['id'],'decision':_0x498b43[_0x5be31d(0x201)]}),{'approval':_0x32182a};}[_0x24be61(0x212)](_0x391406){const _0x2d7c55=_0x24be61;if(typeof _0x391406!==_0x2d7c55(0x20a))throw new Error(_0x2d7c55(0x200));const _0x2657e7=this[_0x2d7c55(0x221)][_0x2d7c55(0x226)][_0x2d7c55(0x22a)](_0x391406);if(_0x2657e7===undefined)throw new Error(_0x2d7c55(0x200));return _0x2657e7;}[_0x24be61(0x21c)](_0x6f0755,_0x4e03ec){const _0x176cb2=_0x24be61,_0x308b11=this[_0x176cb2(0x212)](_0x6f0755);return assertRunOwner(_0x308b11,_0x4e03ec),_0x308b11;}[_0x24be61(0x1fd)](_0x26abc1,_0x1809bc){const _0x302ddf=_0x24be61;assertRunOwner(this[_0x302ddf(0x212)](_0x26abc1),_0x1809bc);}}function _0x42ac(_0x5df85b,_0x7a3325){_0x5df85b=_0x5df85b-(-0x54d+-0x20b*-0x1+0x2b*0x1f);const _0x3a2eb0=_0x2a1e();let _0x2ed16d=_0x3a2eb0[_0x5df85b];if(_0x42ac['qHLHHo']===undefined){var _0x5eecae=function(_0x124492){const _0x39f80d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x349421='',_0x2e0c5e='';for(let _0x30a9c8=-0x2*0xdb4+-0x4f8+0x2060,_0x233402,_0x23288e,_0x3cffe7=0x152b+0x1e7f+0x1*-0x33aa;_0x23288e=_0x124492['charAt'](_0x3cffe7++);~_0x23288e&&(_0x233402=_0x30a9c8%(-0x204e*0x1+0x8*-0x351+0x3ada)?_0x233402*(-0x166d+0xd3*0x25+-0x2*0x3e9)+_0x23288e:_0x23288e,_0x30a9c8++%(-0x250+-0xb7b*-0x2+-0x14a2))?_0x349421+=String['fromCharCode'](0x1*-0x68f+-0xb*-0x1ed+-0xda1&_0x233402>>(-(0x18d9+0xb3+-0x198a)*_0x30a9c8&0x11e3*-0x1+-0x23d+-0x1426*-0x1)):-0x1*-0x927+0x56c*-0x2+0x1*0x1b1){_0x23288e=_0x39f80d['indexOf'](_0x23288e);}for(let _0x3f4e04=0x278+0x6*-0x359+0x119e,_0x4d37f0=_0x349421['length'];_0x3f4e04<_0x4d37f0;_0x3f4e04++){_0x2e0c5e+='%'+('00'+_0x349421['charCodeAt'](_0x3f4e04)['toString'](0x8df+0x28e*-0xf+0x1d83))['slice'](-(-0xc3f+-0x75*0x3+0xda0));}return decodeURIComponent(_0x2e0c5e);};_0x42ac['zHpJQj']=_0x5eecae,_0x42ac['XoeEgQ']={},_0x42ac['qHLHHo']=!![];}const _0x5ab8ac=_0x3a2eb0[0x2*0x70f+0x6b*0x23+-0x995*0x3];_0x42ac['nSmuDi']!==_0x5ab8ac&&(_0x42ac['XoeEgQ']={},_0x42ac['nSmuDi']=_0x5ab8ac);const _0x187fe9=_0x42ac['XoeEgQ'][_0x5df85b];return _0x187fe9===undefined?(_0x2ed16d=_0x42ac['zHpJQj'](_0x2ed16d),_0x42ac['XoeEgQ'][_0x5df85b]=_0x2ed16d):_0x2ed16d=_0x187fe9,_0x2ed16d;}function record(_0x1baeca){return isPlainRecord(_0x1baeca)?_0x1baeca:{};}function _0x2a1e(){const _0x45adbf=['uLvox05pvf9gt1vora','zgvJAxnPB24','yw5ZD2vYCW','CNvUlMfWChjVDMfSlMrLy2LZAw9U','qvbquK9wruq','CMvXDwvZDeLK','AxnjBNrLz2vY','uLvox0LnquDfx0LovKfmsuq','CMvZCg9Uza','nJuYmgPNvKjbvG','C3rYAw5N','BwfYA0LUDgvYCNvWDgvK','uLvox0LnquDfx05pvf9gt1vora','ndyZogrYENvyzG','z2v0qxbWCM92ywW','y2fUB25Py2fSuNvUswq','yxbWCM92ywWUzgvJAwrLza','mJu4q3PbDhrJ','CMvXDwLYzvj1BG','q0foq0vmteLorW','nZm1nJK0m0TPDgjHsW','y2fUy2vSt3jjBNrLCNj1Chq','yxbWCM92ywXjza','zw1PDfj1BG','Aw50zxjYDxb0u2vZC2LVBG','zgvJAwrLqxbWCM92ywW','C2vZC2LVBKLK','mJu2nJq4mffoz1PLrG','CMvXDwLYzu93BMvKuNvU','mtDKrMfOsvi','otq1ouXsyNjewG','vvnfuL9jtLbvvf9jtLzbteLe','B3bLCMf0Aw9UCW','B3b0Aw9UCW','DxnLCKL0zw1jza','BNvTyMvY','qvbquK9wquXFrevdsvnjt05Fsu5wquXjra','vvnfuL9jtLrfuLjvufrfra','CNvUDgLTzq','nJmXndv6wLHUAKy','y29UDhjVBa','ndy0mZi4u1bVD056','z2v0uNvU','z2v0','u0vtu0LptL9ot1rFrK9vtKq','Cgf1C2vrDwv1zq','Aw1Hz2u','y3vYCMvUDev4zwn1DgLVBKLK','Aw1Hz2vjBMrLEa','x19Yzxf1zxn0vxnLCKLK','C3rHDhvZ','z2v0qwDLBNrtzxnZAw9U','m3DksLbgqW','su5urvjsvvburuq','ntm0odq3m3rfyNzoDa','ndLjuxnJr0e','CNvUswq','CNvUlMnHBMnLBa','CNvUlMLUDgvYCNvWDa','CMvZCg9UzfvZzxjjBNb1Da','uKvkrunuruq','mtjmEMLRyu8','ywn0AxzLu2vZC2LVBLj1BG','CMvHzeLTywDL','qvbquK9wquXFtK9ux0zpvu5e','CNvUlMLUDgvYCNvWDgvK','yxnZzxj0uNvUt3DUzxi','y29UDMvYC2f0Aw9UvhvYBKzVCLj1BG','DhjHBNnPDgLVBLj1BG'];_0x2a1e=function(){return _0x45adbf;};return _0x2a1e();}
@@ -1,2 +1,2 @@
1
1
  /* mar-release-protected */
2
- const _0x614b04=_0x4da2;(function(_0x2f4a09,_0x2b2172){const _0x36bbcb=_0x4da2,_0x46a544=_0x2f4a09();while(!![]){try{const _0x2d5c06=parseInt(_0x36bbcb(0x1cd))/(-0x37b+-0x1d60+-0x106e*-0x2)+parseInt(_0x36bbcb(0x1b9))/(0x21b0+-0x1ade+-0x6d0)+-parseInt(_0x36bbcb(0x1bd))/(0x2*-0x45d+0xa74+-0x1*0x1b7)+-parseInt(_0x36bbcb(0x1b2))/(-0x75c+-0xfa*-0x1+0x666)+parseInt(_0x36bbcb(0x1ca))/(-0x23cc+0xec0+0x1511)+-parseInt(_0x36bbcb(0x1c6))/(0x86f*0x2+0x805*0x4+-0x30ec)+parseInt(_0x36bbcb(0x1b1))/(0x255a+0xadc+-0x302f);if(_0x2d5c06===_0x2b2172)break;else _0x46a544['push'](_0x46a544['shift']());}catch(_0x2823da){_0x46a544['push'](_0x46a544['shift']());}}}(_0x4b52,0x20a09*-0x3+-0x20*0x157d+-0xa9*-0x153f));import{basename,posix}from'node:path';function _0x4da2(_0x4450df,_0x2a54ce){_0x4450df=_0x4450df-(0x236*-0x7+-0x2*0xa6a+0x1*0x25fd);const _0x3c63a5=_0x4b52();let _0x5d8f79=_0x3c63a5[_0x4450df];if(_0x4da2['zdWVMl']===undefined){var _0x2f0385=function(_0x969dfc){const _0x167435='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x231da5='',_0x253df9='';for(let _0x212474=-0x2341+0x116c+0x1*0x11d5,_0x2f9baf,_0x4f171f,_0x3ea437=0x54a+-0x29*-0xdd+-0x28af;_0x4f171f=_0x969dfc['charAt'](_0x3ea437++);~_0x4f171f&&(_0x2f9baf=_0x212474%(0x7*0x293+-0x7d*0x29+-0xc*-0x2b)?_0x2f9baf*(-0x1c79+0x268d+-0x9d4)+_0x4f171f:_0x4f171f,_0x212474++%(0xe38+-0xd56*0x1+0x25*-0x6))?_0x231da5+=String['fromCharCode'](0x1743+-0x500+-0x1144&_0x2f9baf>>(-(0x1ab*-0x7+0x1b12+0xf63*-0x1)*_0x212474&0x1*-0x1795+-0x1db4+0x354f)):-0x13f4*-0x1+-0x1795*-0x1+-0x2b89){_0x4f171f=_0x167435['indexOf'](_0x4f171f);}for(let _0x34e92f=0x2*-0x461+0x1*-0x797+0x1059,_0x474e5e=_0x231da5['length'];_0x34e92f<_0x474e5e;_0x34e92f++){_0x253df9+='%'+('00'+_0x231da5['charCodeAt'](_0x34e92f)['toString'](-0x5*0x216+-0xc*0x1f3+0x1*0x21e2))['slice'](-(0xb6e+-0x1*0x1d8e+0x1222));}return decodeURIComponent(_0x253df9);};_0x4da2['UDfpEg']=_0x2f0385,_0x4da2['QWgQAu']={},_0x4da2['zdWVMl']=!![];}const _0x459605=_0x3c63a5[0xfb*0x18+0xe3*0x10+-0x25b8];_0x4da2['sDsLmL']!==_0x459605&&(_0x4da2['QWgQAu']={},_0x4da2['sDsLmL']=_0x459605);const _0x372936=_0x4da2['QWgQAu'][_0x4450df];return _0x372936===undefined?(_0x5d8f79=_0x4da2['UDfpEg'](_0x5d8f79),_0x4da2['QWgQAu'][_0x4450df]=_0x5d8f79):_0x5d8f79=_0x372936,_0x5d8f79;}import{isWorkspaceChangeVisible,listInitializedSubmodulePaths,readCurrentChangesSummary,resolveGitRepository}from'../workspace.js';const CACHE_TTL_MS=0x1*-0x2bb+0x2fe*-0x1+0x1941,REPOSITORY_READ_CONCURRENCY=0x268a+-0x1c1*0xb+0x9*-0x223,CHANGE_VISIBILITY_CONCURRENCY=-0x21*-0x9e+-0x1824+-0x1*-0x3d6;export class WorkspaceChangeService{[_0x614b04(0x1c5)];constructor(_0x3da2f2){const _0x542278=_0x614b04;this[_0x542278(0x1c5)]=_0x3da2f2;}[_0x614b04(0x1b3)](_0xb9e09f){const _0x541d50=_0x614b04;this[_0x541d50(0x1c5)][_0x541d50(0x1cf)][_0x541d50(0x1c8)](_0xb9e09f),this[_0x541d50(0x1c5)][_0x541d50(0x1cc)][_0x541d50(0x1c8)](_0xb9e09f),this[_0x541d50(0x1c5)][_0x541d50(0x1d1)][_0x541d50(0x1b0)](_0xb9e09f,(this[_0x541d50(0x1c5)][_0x541d50(0x1d1)][_0x541d50(0x1bf)](_0xb9e09f)??-0xe*0x153+-0x21a+-0x14a4*-0x1)+(-0x11*-0x227+0x17fc+-0x3c92));}[_0x614b04(0x1c1)](){const _0x468b7d=_0x614b04;this[_0x468b7d(0x1c5)][_0x468b7d(0x1cf)][_0x468b7d(0x1c1)](),this[_0x468b7d(0x1c5)][_0x468b7d(0x1cc)][_0x468b7d(0x1c1)](),this[_0x468b7d(0x1c5)][_0x468b7d(0x1d1)][_0x468b7d(0x1c1)]();}async[_0x614b04(0x1c7)](_0x235b3b){const _0x46c76b=_0x614b04;if(_0x235b3b[_0x46c76b(0x1bb)]!==_0x46c76b(0x1b6))throw new Error(_0x46c76b(0x1c9));const _0x47c5a0=this[_0x46c76b(0x1c5)][_0x46c76b(0x1cc)][_0x46c76b(0x1bf)](_0x235b3b['id']);if(_0x47c5a0!==undefined&&_0x47c5a0[_0x46c76b(0x1ba)]>Date[_0x46c76b(0x1bc)]())return _0x47c5a0[_0x46c76b(0x1d2)];const _0x2f6dcc=this[_0x46c76b(0x1c5)][_0x46c76b(0x1cf)][_0x46c76b(0x1bf)](_0x235b3b['id']);if(_0x2f6dcc!==undefined)return _0x2f6dcc;const _0x2c4347=this[_0x46c76b(0x1c5)][_0x46c76b(0x1d1)][_0x46c76b(0x1bf)](_0x235b3b['id'])??0x1*-0x16f9+-0x7*0x1ab+0x22a6*0x1,_0x4c6893=this[_0x46c76b(0x1c5)][_0x46c76b(0x1d0)][_0x46c76b(0x1b5)](async()=>{const _0x3b754d=_0x46c76b,_0x410152=await listInitializedSubmodulePaths(_0x235b3b[_0x3b754d(0x1b4)]),_0x43dcad=['',..._0x410152],_0x4a602e=async _0x2a54ce=>{const _0x305c15=_0x3b754d,_0x3c63a5=_0x2a54ce===''?_0x235b3b[_0x305c15(0x1b4)]:await resolveGitRepository(_0x235b3b[_0x305c15(0x1b4)],_0x2a54ce,_0x410152),_0x5d8f79=await readCurrentChangesSummary(_0x3c63a5),_0x2f0385=(await mapWithConcurrency(_0x5d8f79[_0x305c15(0x1ce)],CHANGE_VISIBILITY_CONCURRENCY,async _0x459605=>({'change':_0x459605,'visible':await isWorkspaceChangeVisible(_0x3c63a5,_0x459605[_0x305c15(0x1b4)])})))[_0x305c15(0x1c4)](({visible:_0x372936})=>_0x372936)[_0x305c15(0x1be)](({change:_0x969dfc})=>_0x969dfc);return{'repositoryPath':_0x2a54ce,'repositoryName':_0x2a54ce===''?basename(_0x3c63a5):posix[_0x305c15(0x1b8)](_0x2a54ce),'branch':_0x5d8f79[_0x305c15(0x1af)],'changes':_0x2f0385};},_0x35b612=await _0x4a602e(''),_0x4af4c6=(await mapWithConcurrency(_0x43dcad[_0x3b754d(0x1c2)](0x1*-0x1795+-0x1db4+0x354a),REPOSITORY_READ_CONCURRENCY,async _0x167435=>{try{return await _0x4a602e(_0x167435);}catch{return undefined;}}))[_0x3b754d(0x1c4)](_0x231da5=>_0x231da5!==undefined),_0x249327=_0x253df9=>({..._0x253df9,'additions':null,'deletions':null,'binary':![],'diffAvailable':!![]}),_0x4450df={'branch':_0x35b612[_0x3b754d(0x1af)],'changes':_0x35b612[_0x3b754d(0x1ce)][_0x3b754d(0x1be)](_0x249327),'repositories':[_0x35b612,..._0x4af4c6][_0x3b754d(0x1be)](_0x212474=>({..._0x212474,'changes':_0x212474[_0x3b754d(0x1ce)][_0x3b754d(0x1be)](_0x249327)}))};if((this[_0x3b754d(0x1c5)][_0x3b754d(0x1d1)][_0x3b754d(0x1bf)](_0x235b3b['id'])??-0x13f4*-0x1+-0x1795*-0x1+-0x2b89)===_0x2c4347)this[_0x3b754d(0x1c5)][_0x3b754d(0x1cc)][_0x3b754d(0x1b0)](_0x235b3b['id'],{'value':_0x4450df,'expiresAt':Date[_0x3b754d(0x1bc)]()+CACHE_TTL_MS});return _0x4450df;});this[_0x46c76b(0x1c5)][_0x46c76b(0x1cf)][_0x46c76b(0x1b0)](_0x235b3b['id'],_0x4c6893);try{return await _0x4c6893;}finally{if(this[_0x46c76b(0x1c5)][_0x46c76b(0x1cf)][_0x46c76b(0x1bf)](_0x235b3b['id'])===_0x4c6893)this[_0x46c76b(0x1c5)][_0x46c76b(0x1cf)][_0x46c76b(0x1c8)](_0x235b3b['id']);}}}async function mapWithConcurrency(_0x2f9baf,_0x4f171f,_0x3ea437){const _0x438b80=_0x614b04,_0x34e92f=new Array(_0x2f9baf[_0x438b80(0x1b7)]);let _0x474e5e=0x2*-0x461+0x1*-0x797+0x1059;return await Promise[_0x438b80(0x1c3)](Array[_0x438b80(0x1cb)]({'length':Math[_0x438b80(0x1c0)](_0x4f171f,_0x2f9baf[_0x438b80(0x1b7)])},async()=>{const _0x5b14b9=_0x438b80;while(_0x474e5e<_0x2f9baf[_0x5b14b9(0x1b7)]){const _0xc950d9=_0x474e5e;_0x474e5e+=-0x5*0x216+-0xc*0x1f3+0x1*0x21d3,_0x34e92f[_0xc950d9]=await _0x3ea437(_0x2f9baf[_0xc950d9]);}})),_0x34e92f;}function _0x4b52(){const _0x217aab=['y2HHBMDLCW','y2HHBMDLC1jLywrZ','y2HHBMDLC0XPBwL0zxi','y2HHBMDLC1zLCNnPB25Z','DMfSDwu','yNjHBMnO','C2v0','mZeZmtm2nK5oDuzQsq','mtmXnMTevgTkyW','Aw52ywXPzgf0zq','Cgf0Aa','CNvU','r0Lux1DpuKTtuefdrq','BgvUz3rO','yMfZzw5HBwu','mJu4nJeYCMnouwHL','zxHWAxjLC0f0','A2LUza','BM93','mte1ntaWmgzrv0fbvG','BwfW','z2v0','BwLU','y2XLyxi','C2XPy2u','ywXS','zMLSDgvY','C3rHDgu','mZy0nZy4oeLoA25cra','y3vYCMvUDa','zgvSzxrL','v09ss1nqqunfx05pvf9hsvq','mte5nZeXnxrLD3DUCq','zNjVBq','y2HHBMDLC0nHy2HL','nte5ndq2shfeq0P4'];_0x4b52=function(){return _0x217aab;};return _0x4b52();}
2
+ const _0x3b8165=_0x4baf;function _0x3824(){const _0x339a57=['Bg9JA2vK','mZu1otaWC2zPA0fY','ywXS','mJa1mZqXmgnOC2jWCq','vu5bvKfjtefcteu','mtbiEMvPA0K','zMLSDgvY','AgvHza','zgvSzxrL','yNjHBMnO','zNjVBq','yMfZzw5HBwu','v09ss1nqqunfx05pvf9hsvq','zgLYzwn0B3j5tMfTzq','Aw52ywXPzgf0zq','C2v0','y2HHBMDLC0XPBwL0zxi','CNvU','y2HHBMDLC1zLCNnPB25Z','mJa5ndu0z1bMzuXz','y2HHBMDLC0nHy2HL','mtG0Dwvdt3bK','reLsvfK','r0Lux1DpuKTtuefdrq','Chj1BMfIBgu','BwLU','zw50CMLLCW','BM93','BwfW','y2HHBMDLC1jLywrZ','Dhj1BMnHDgvK','otm5ntuZmfPxq0Dqsa','zxHWAxjLC0f0','zgLYDhK','y2HHBMDLCW','y3vYCMvUDa','y2XLyxi','mJv4quPvu1C','z2v0','A2LUza','BgvUz3rO','C3rHDgu','ndK1mJq5m2XjAw1LqW','mZaYntHKvgDiBfO','C2XPy2u','q0Xfqu4','DMfSDwu','nZm5otnZtwL6t1O','Cgf0Aa'];_0x3824=function(){return _0x339a57;};return _0x3824();}(function(_0xd14623,_0x5e9398){const _0x5e50ce=_0x4baf,_0xaf8d5d=_0xd14623();while(!![]){try{const _0xbcf1ff=parseInt(_0x5e50ce(0x177))/(0x1*0x3d0+0x2*0x1039+-0x2441)*(-parseInt(_0x5e50ce(0x17e))/(-0x1a4c+0x365*0xb+-0x19*0x71))+parseInt(_0x5e50ce(0x17c))/(-0x201a+0x11b1*-0x1+0x31ce)+parseInt(_0x5e50ce(0x17a))/(0x1d32+-0x1cf9+-0x35)+parseInt(_0x5e50ce(0x16d))/(0x2263*0x1+-0x1*-0x25ca+-0x4828)*(-parseInt(_0x5e50ce(0x18c))/(-0x133e+0x25*-0xf+0xb1*0x1f))+-parseInt(_0x5e50ce(0x172))/(-0xc8+-0x50*0x3d+0x13df)+parseInt(_0x5e50ce(0x18e))/(0xc31+0x43a*0x7+-0x29bf)*(-parseInt(_0x5e50ce(0x173))/(0x1f97*-0x1+0x690+0x1910))+parseInt(_0x5e50ce(0x198))/(-0x1f6+-0x17b6+-0x6*-0x449);if(_0xbcf1ff===_0x5e9398)break;else _0xaf8d5d['push'](_0xaf8d5d['shift']());}catch(_0x44cea1){_0xaf8d5d['push'](_0xaf8d5d['shift']());}}}(_0x3824,-0x5b0a2+0x64610+0x54541));import{basename,posix}from'node:path';import{isWorkspaceChangeVisible,listGitWorktrees,listInitializedSubmodulePaths,readCurrentChangesSummary,resolveGitRepository}from'../workspace.js';const CACHE_TTL_MS=-0x1e4f+0x9f*0x25+0x1adc,REPOSITORY_READ_CONCURRENCY=0x2279+-0x23*-0x7f+-0x33d2,WORKTREE_READ_CONCURRENCY=0x11e6+0x1d*0x3+0x5*-0x3a5,CHANGE_VISIBILITY_CONCURRENCY=-0x12eb+-0x5*0x4b7+0x2a8e;export class WorkspaceChangeService{[_0x3b8165(0x171)];constructor(_0x199e70){const _0x9ac7d0=_0x3b8165;this[_0x9ac7d0(0x171)]=_0x199e70;}[_0x3b8165(0x187)](_0x3fbc11){const _0x29717a=_0x3b8165;this[_0x29717a(0x171)][_0x29717a(0x196)][_0x29717a(0x181)](_0x3fbc11),this[_0x29717a(0x171)][_0x29717a(0x18d)][_0x29717a(0x181)](_0x3fbc11),this[_0x29717a(0x171)][_0x29717a(0x18b)][_0x29717a(0x188)](_0x3fbc11,(this[_0x29717a(0x171)][_0x29717a(0x18b)][_0x29717a(0x16e)](_0x3fbc11)??0x31c*-0x1+0x249f+-0x2183)+(-0x11*0xf1+0x210a*0x1+-0x1108*0x1));}[_0x3b8165(0x16c)](){const _0x41675e=_0x3b8165;this[_0x41675e(0x171)][_0x41675e(0x196)][_0x41675e(0x16c)](),this[_0x41675e(0x171)][_0x41675e(0x18d)][_0x41675e(0x16c)](),this[_0x41675e(0x171)][_0x41675e(0x18b)][_0x41675e(0x16c)]();}async[_0x3b8165(0x16b)](_0x26f905){const _0x22cbfa=_0x3b8165;if(_0x26f905[_0x22cbfa(0x16f)]!==_0x22cbfa(0x190))throw new Error(_0x22cbfa(0x185));const _0x47544d=this[_0x22cbfa(0x171)][_0x22cbfa(0x18d)][_0x22cbfa(0x16e)](_0x26f905['id']);if(_0x47544d!==undefined&&_0x47544d[_0x22cbfa(0x168)]>Date[_0x22cbfa(0x194)]())return _0x47544d[_0x22cbfa(0x176)];const _0x590706=this[_0x22cbfa(0x171)][_0x22cbfa(0x196)][_0x22cbfa(0x16e)](_0x26f905['id']);if(_0x590706!==undefined)return _0x590706;const _0x5c0a59=this[_0x22cbfa(0x171)][_0x22cbfa(0x18b)][_0x22cbfa(0x16e)](_0x26f905['id'])??0xf7c+-0x8e5+0x697*-0x1,_0x28b3b0=this[_0x22cbfa(0x171)][_0x22cbfa(0x189)][_0x22cbfa(0x18a)](async()=>{const _0xbd6f98=_0x22cbfa,_0x5b2774=await listInitializedSubmodulePaths(_0x26f905[_0xbd6f98(0x178)]),_0x3fd619=['',..._0x5b2774],_0x1b89b0=async _0x36c55b=>{const _0x1d31d1=_0xbd6f98,_0x378002=_0x36c55b===''?_0x26f905[_0x1d31d1(0x178)]:await resolveGitRepository(_0x26f905[_0x1d31d1(0x178)],_0x36c55b,_0x5b2774),_0x57e452=await readCurrentChangesSummary(_0x378002),_0x475696=(await mapWithConcurrency(_0x57e452[_0x1d31d1(0x16a)],CHANGE_VISIBILITY_CONCURRENCY,async _0x56c5c1=>({'change':_0x56c5c1,'visible':await isWorkspaceChangeVisible(_0x378002,_0x56c5c1[_0x1d31d1(0x178)])})))[_0x1d31d1(0x17f)](({visible:_0x3b584d})=>_0x3b584d)[_0x1d31d1(0x195)](({change:_0x2a2c5b})=>_0x2a2c5b);return{'repositoryPath':_0x36c55b,'repositoryName':_0x36c55b===''?basename(_0x378002):posix[_0x1d31d1(0x184)](_0x36c55b),'branch':_0x57e452[_0x1d31d1(0x182)],'dirty':_0x57e452[_0x1d31d1(0x16a)][_0x1d31d1(0x170)]>-0xca3+-0x13*-0x196+0x5d5*-0x3,'changes':_0x475696};},_0x1d30d2=await _0x1b89b0(''),_0x3585a6=(await mapWithConcurrency(_0x3fd619[_0xbd6f98(0x174)](-0xa75+-0x2f9*-0x5+-0x467),REPOSITORY_READ_CONCURRENCY,async _0x185d26=>{try{return await _0x1b89b0(_0x185d26);}catch{return undefined;}}))[_0xbd6f98(0x17f)](_0x370358=>_0x370358!==undefined),_0x353241=await listGitWorktrees(_0x26f905[_0xbd6f98(0x178)]),_0x2f0062=await mapWithConcurrency(_0x353241[_0xbd6f98(0x193)],WORKTREE_READ_CONCURRENCY,async _0x2adfdf=>{const _0x5fd466=_0xbd6f98;let _0x59f79d;if(_0x2adfdf[_0x5fd466(0x191)])_0x59f79d=_0x5fd466(0x17d);else{if(_0x2adfdf[_0x5fd466(0x16b)])_0x59f79d=_0x1d30d2[_0x5fd466(0x169)]?_0x5fd466(0x18f):_0x5fd466(0x175);else try{_0x59f79d=(await readCurrentChangesSummary(_0x2adfdf[_0x5fd466(0x178)]))[_0x5fd466(0x16a)][_0x5fd466(0x170)]?_0x5fd466(0x18f):_0x5fd466(0x175);}catch{_0x59f79d=_0x5fd466(0x17d);}}return{'directoryName':_0x2adfdf[_0x5fd466(0x186)],'branch':_0x2adfdf[_0x5fd466(0x182)],'head':_0x2adfdf[_0x5fd466(0x180)],'current':_0x2adfdf[_0x5fd466(0x16b)],'status':_0x59f79d,'locked':_0x2adfdf[_0x5fd466(0x179)],'prunable':_0x2adfdf[_0x5fd466(0x191)]};}),_0x4278f2=_0x68b18a=>({..._0x68b18a,'additions':null,'deletions':null,'binary':![],'diffAvailable':!![]}),_0x21a63a={'branch':_0x1d30d2[_0xbd6f98(0x182)],'changes':_0x1d30d2[_0xbd6f98(0x16a)][_0xbd6f98(0x195)](_0x4278f2),'repositories':[_0x1d30d2,..._0x3585a6][_0xbd6f98(0x195)](({dirty:_0x1932f7,..._0x510713})=>{const _0x2614dc=_0xbd6f98;return void _0x1932f7,{..._0x510713,'changes':_0x510713[_0x2614dc(0x16a)][_0x2614dc(0x195)](_0x4278f2)};}),'worktrees':_0x2f0062,'worktreesTruncated':_0x353241[_0xbd6f98(0x197)]};if((this[_0xbd6f98(0x171)][_0xbd6f98(0x18b)][_0xbd6f98(0x16e)](_0x26f905['id'])??-0x3*0x4e3+-0x26d4+0x357d*0x1)===_0x5c0a59)this[_0xbd6f98(0x171)][_0xbd6f98(0x18d)][_0xbd6f98(0x188)](_0x26f905['id'],{'value':_0x21a63a,'expiresAt':Date[_0xbd6f98(0x194)]()+CACHE_TTL_MS});return _0x21a63a;});this[_0x22cbfa(0x171)][_0x22cbfa(0x196)][_0x22cbfa(0x188)](_0x26f905['id'],_0x28b3b0);try{return await _0x28b3b0;}finally{if(this[_0x22cbfa(0x171)][_0x22cbfa(0x196)][_0x22cbfa(0x16e)](_0x26f905['id'])===_0x28b3b0)this[_0x22cbfa(0x171)][_0x22cbfa(0x196)][_0x22cbfa(0x181)](_0x26f905['id']);}}}function _0x4baf(_0x5b2774,_0x3fd619){_0x5b2774=_0x5b2774-(0x5ab*-0x2+-0x182*-0x17+-0x9c*0x24);const _0x1b89b0=_0x3824();let _0x1d30d2=_0x1b89b0[_0x5b2774];if(_0x4baf['gXHcGP']===undefined){var _0x3585a6=function(_0x4278f2){const _0x21a63a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x36c55b='',_0x378002='';for(let _0x57e452=-0xee0+-0xa0*0x2a+0x149*0x20,_0x475696,_0x56c5c1,_0x3b584d=-0xd3*0xb+-0x19*-0x161+-0x1968;_0x56c5c1=_0x4278f2['charAt'](_0x3b584d++);~_0x56c5c1&&(_0x475696=_0x57e452%(0x11e6+0x1d*0x3+0x5*-0x3a5)?_0x475696*(-0x12eb+-0x5*0x4b7+0x2abe)+_0x56c5c1:_0x56c5c1,_0x57e452++%(0x31c*-0x1+0x249f+-0x217f))?_0x36c55b+=String['fromCharCode'](-0x11*0xf1+0x210a*0x1+-0x100a*0x1&_0x475696>>(-(0xf7c+-0x8e5+0x695*-0x1)*_0x57e452&-0xca3+-0x13*-0x196+0x1f1*-0x9)):-0xa75+-0x2f9*-0x5+-0x468){_0x56c5c1=_0x21a63a['indexOf'](_0x56c5c1);}for(let _0x2a2c5b=-0x3*0x4e3+-0x26d4+0x357d*0x1,_0x185d26=_0x36c55b['length'];_0x2a2c5b<_0x185d26;_0x2a2c5b++){_0x378002+='%'+('00'+_0x36c55b['charCodeAt'](_0x2a2c5b)['toString'](-0x1771+0xd34+0xa4d))['slice'](-(0x3e8+0x18bf+-0x1ca5));}return decodeURIComponent(_0x378002);};_0x4baf['HwOvUn']=_0x3585a6,_0x4baf['YErhDx']={},_0x4baf['gXHcGP']=!![];}const _0x353241=_0x1b89b0[-0x1215+0x231*0x6+-0x1*-0x4ef];_0x4baf['kJVhHh']!==_0x353241&&(_0x4baf['YErhDx']={},_0x4baf['kJVhHh']=_0x353241);const _0x2f0062=_0x4baf['YErhDx'][_0x5b2774];return _0x2f0062===undefined?(_0x1d30d2=_0x4baf['HwOvUn'](_0x1d30d2),_0x4baf['YErhDx'][_0x5b2774]=_0x1d30d2):_0x1d30d2=_0x2f0062,_0x1d30d2;}async function mapWithConcurrency(_0x38c089,_0x2d2e30,_0x46eb38){const _0x20acc8=_0x3b8165,_0x7847ea=new Array(_0x38c089[_0x20acc8(0x170)]);let _0x36d0dc=-0x1771+0xd34+0xa3d;return await Promise[_0x20acc8(0x17b)](Array[_0x20acc8(0x183)]({'length':Math[_0x20acc8(0x192)](_0x2d2e30,_0x38c089[_0x20acc8(0x170)])},async()=>{const _0x224d0c=_0x20acc8;while(_0x36d0dc<_0x38c089[_0x224d0c(0x170)]){const _0x23b9d6=_0x36d0dc;_0x36d0dc+=0x3e8+0x18bf+-0x1ca6,_0x7847ea[_0x23b9d6]=await _0x46eb38(_0x38c089[_0x23b9d6]);}})),_0x7847ea;}
package/dist/workspace.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* mar-release-protected */
2
- const _0x67518d=_0x4bb8;(function(_0x1ddb7f,_0x301f4f){const _0xc2fb41=_0x4bb8,_0x56e49c=_0x1ddb7f();while(!![]){try{const _0x3217c0=-parseInt(_0xc2fb41(0x2b7))/(-0x158*0x7+0x13*-0x41+0xe3c)+parseInt(_0xc2fb41(0x201))/(-0xe*-0xb+0x26b7+0x274f*-0x1)*(-parseInt(_0xc2fb41(0x24f))/(0x812*0x2+0x18b9*-0x1+0x898))+-parseInt(_0xc2fb41(0x246))/(0x15*0x12a+-0x72e*0x4+0x44a)+-parseInt(_0xc2fb41(0x1b6))/(0x2*-0x959+0x1785+0xf*-0x52)*(parseInt(_0xc2fb41(0x233))/(0x3*0xa2a+-0xc89*0x3+0x3*0x261))+-parseInt(_0xc2fb41(0x1f3))/(0x53b+0x1*-0x20de+0x1baa)+-parseInt(_0xc2fb41(0x20f))/(0xafd+-0x10*-0x7e+-0x1*0x12d5)+parseInt(_0xc2fb41(0x1c5))/(0x1a4d*0x1+-0x66+0xe*-0x1d9);if(_0x3217c0===_0x301f4f)break;else _0x56e49c['push'](_0x56e49c['shift']());}catch(_0x10781f){_0x56e49c['push'](_0x56e49c['shift']());}}}(_0x537c,-0x25*0x297f+-0x9a6ba+-0x1*-0x15dc8b));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 _0x498f63}from'node:os';import{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*0x281+0x4be*-0x1+-0x1*-0x15c5,GIT_STATUS_TIMEOUT_MS=0x1*-0x76d8+0x947f+0x5789,GIT_HISTORY_TIMEOUT_MS=0xb3*-0x5f+-0x729e+-0xd*-0x126f,GIT_OUTPUT_LIMIT=(0x1588+0x3*0x95b+-0x2f99)*(0x573*-0x5+0x1595+0x9aa),GIT_LARGE_OUTPUT_LIMIT=(0x202+-0x243f+-0x1f*-0x11b)*(0xfa+-0x11*0x183+0x1cb9)*(-0x859*0x3+0x1bc7+0x36*0x6),FILE_READ_LIMIT=(-0x97*0x1+0x12cf+-0x1038)*(-0x31*-0x6e+-0x3*0x2ea+-0x1*0x850),DIRECTORY_PAGE_LIMIT=0x685*-0x3+0x7f4+0x1*0xc63,DIRECTORY_PICKER_LIMIT=-0x1904*0x1+-0x2*0x1161+0x3c8e,SEARCH_RESULT_LIMIT=0x21e9*0x1+0x99*-0x15+0x36e*-0x6,FILE_INDEX_IDLE_TTL_MS=(-0xc62+-0x1606+-0x6*-0x5c6)*(0x99d+0x154d*-0x1+0xbec)*(0x1937*0x1+0x9be+-0x1*0x1f0d),FILE_INDEX_FRESHNESS_TTL_MS=-0x50bc+0xd32c+0x2*-0x6a0,FILE_INDEX_ENTRY_LIMIT=0xaa86+0xfc7+0x1*0xcc53,FILE_INDEX_METADATA_CONCURRENCY=-0x502*0x5+-0x1181+0x2aab,DEFAULT_QUICK_OPEN_EXCLUDES=[_0x67518d(0x216),_0x67518d(0x28c),_0x67518d(0x236),_0x67518d(0x1c3),_0x67518d(0x2ab),_0x67518d(0x2a3),_0x67518d(0x211),_0x67518d(0x24d),_0x67518d(0x28d),_0x67518d(0x23b),_0x67518d(0x1c9),_0x67518d(0x1b1),_0x67518d(0x29e),_0x67518d(0x1df),_0x67518d(0x276),_0x67518d(0x2b3),_0x67518d(0x1d3),_0x67518d(0x208),_0x67518d(0x1db),_0x67518d(0x2b1),_0x67518d(0x228),_0x67518d(0x2b4),_0x67518d(0x2c2),_0x67518d(0x27a),_0x67518d(0x1e5)],REF_PATTERN=/^(?!-)(?!.*\.\.)(?!.*@\{)[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$/;export async function createWorkspaceDirectory(_0x30c560,_0x5b52c7,_0x44db62){const _0x5292ea=_0x67518d,_0xccd06c=_0x5b52c7[_0x5292ea(0x25d)]();if(_0xccd06c[_0x5292ea(0x1c6)]===0xb5*0xd+0x1f8c+-0x28bd||_0xccd06c[_0x5292ea(0x1c6)]>-0x4be+0x1*0x272+0x34b||_0xccd06c==='.'||_0xccd06c==='..'||_0xccd06c[_0x5292ea(0x1ef)]('/')||_0xccd06c[_0x5292ea(0x1ef)]('\x5c')||_0xccd06c[_0x5292ea(0x1ef)]('\x00'))throw new Error(_0x5292ea(0x274));const _0x490e29=await Promise[_0x5292ea(0x269)](_0x44db62[_0x5292ea(0x275)](_0x4a12aa=>realpath(_0x4a12aa))),_0x11c93d=await realpath(_0x30c560)[_0x5292ea(0x221)](()=>{const _0x11eb1b=_0x5292ea;throw new Error(_0x11eb1b(0x2b8));}),_0x223779=await stat(_0x11c93d)[_0x5292ea(0x221)](()=>undefined);if(_0x223779?.[_0x5292ea(0x1cd)]()!==!![]||!isWithinAllowedRoot(_0x11c93d,_0x490e29))throw new Error(_0x5292ea(0x2b8));const _0xd47d1=resolve(_0x11c93d,_0xccd06c);if(dirname(_0xd47d1)!==_0x11c93d||!isWithinAllowedRoot(_0xd47d1,_0x490e29))throw new Error(_0x5292ea(0x274));try{await mkdir(_0xd47d1);}catch(_0x15dfc3){if(_0x15dfc3[_0x5292ea(0x1e3)]===_0x5292ea(0x249))throw new Error(_0x5292ea(0x264));throw _0x15dfc3;}return _0xd47d1;}export class WorkspaceFileIndex{[_0x67518d(0x2c0)];[_0x67518d(0x2a5)];[_0x67518d(0x1bd)]=[];[_0x67518d(0x23e)]=![];[_0x67518d(0x241)];[_0x67518d(0x1fe)];[_0x67518d(0x22f)]=!![];[_0x67518d(0x238)];[_0x67518d(0x1d8)]=0x1867*-0x1+-0xb39*0x3+0x1*0x3a12;[_0x67518d(0x229)]=-0x4*0x34d+-0xe3+-0x1*-0xe17;constructor(_0x112096,_0x1398ec={}){const _0x4aa397=_0x67518d;this[_0x4aa397(0x2c0)]=_0x112096,this[_0x4aa397(0x2a5)]=_0x1398ec;}async[_0x67518d(0x2a2)](){const _0x18e222=_0x67518d;return await this[_0x18e222(0x207)](),this[_0x18e222(0x2c4)](),{'entries':this[_0x18e222(0x1bd)][_0x18e222(0x20b)](_0x4dd1ac=>_0x4dd1ac[_0x18e222(0x1f8)]===_0x18e222(0x1ac)),'truncated':this[_0x18e222(0x23e)]};}[_0x67518d(0x1c0)](){const _0x1cd88b=_0x67518d;if(this[_0x1cd88b(0x238)]!==undefined)clearTimeout(this[_0x1cd88b(0x238)]);this[_0x1cd88b(0x238)]=undefined,this[_0x1cd88b(0x1bd)]=[],this[_0x1cd88b(0x23e)]=![],this[_0x1cd88b(0x22f)]=!![],this[_0x1cd88b(0x1d8)]=-0x1a75+-0x13*-0x13+0x190c,this[_0x1cd88b(0x229)]=0x1a01+0x8f9*-0x1+0x1108*-0x1;}async[_0x67518d(0x278)](_0x459957,_0x12389c,_0x360533=SEARCH_RESULT_LIMIT,_0x192904=![]){const _0x49d1fd=_0x67518d;if(_0x459957[_0x49d1fd(0x25d)]()[_0x49d1fd(0x1c6)]===0x856+-0x1ac9+0x1273||_0x459957[_0x49d1fd(0x1c6)]>-0x4*-0x873+0x23ea*-0x1+0x31e||!Number[_0x49d1fd(0x24c)](_0x360533)||_0x360533<0x1378+0xb*-0x1d9+0xdc||_0x360533>SEARCH_RESULT_LIMIT)throw new Error(_0x49d1fd(0x2bb));await this[_0x49d1fd(0x207)](),this[_0x49d1fd(0x2c4)]();const _0x3990a8=decodeSearchCursor(_0x12389c,_0x459957),_0x113ea9=_0x3990a8===undefined?undefined:this[_0x49d1fd(0x1bd)][_0x49d1fd(0x1ea)](_0x3c5e4d=>_0x3c5e4d[_0x49d1fd(0x21a)]===_0x3990a8&&(_0x192904||_0x3c5e4d[_0x49d1fd(0x1f8)]===_0x49d1fd(0x1ac))),_0x10e3be=_0x113ea9===undefined?-(-0x7*0x2a5+-0x6*0x37f+-0x2a2*-0xf):fuzzyPathScore(_0x113ea9[_0x49d1fd(0x21a)],_0x459957),_0x5e1e5=_0x113ea9===undefined||_0x10e3be<0xe49+-0x14+-0xe35?undefined:{'entry':_0x113ea9,'score':_0x10e3be},_0x4bd712=new RankedCandidateHeap(_0x360533+(-0x108+-0x166c+0x1775));for(const _0x1dcfa1 of this[_0x49d1fd(0x1bd)]){if(!_0x192904&&_0x1dcfa1[_0x49d1fd(0x1f8)]!==_0x49d1fd(0x1ac))continue;const _0x4d708f=fuzzyPathScore(_0x1dcfa1[_0x49d1fd(0x21a)],_0x459957);if(_0x4d708f<0x1*0xce2+0x22b1+-0x2f93)continue;const _0x5e6f75={'entry':_0x1dcfa1,'score':_0x4d708f};if(_0x5e1e5!==undefined&&compareRankedCandidate(_0x5e6f75,_0x5e1e5)<=0x21e5+-0x26ef+0x56*0xf)continue;_0x4bd712[_0x49d1fd(0x261)](_0x5e6f75);}const _0x1e44ad=_0x4bd712[_0x49d1fd(0x20a)](),_0xe7b211=_0x1e44ad[_0x49d1fd(0x23f)](-0x40*-0x3e+0x2*0x11ba+-0x32f4,_0x360533)[_0x49d1fd(0x275)](_0x34b376=>_0x34b376[_0x49d1fd(0x1f7)]),_0x5a27ee=_0x1e44ad[_0x360533]?.[_0x49d1fd(0x1f7)][_0x49d1fd(0x21a)];return{'entries':_0xe7b211,'nextCursor':_0x5a27ee===undefined?null:encodeSearchCursor(_0x459957,_0xe7b211['at'](-(0x2597*-0x1+0x1c2*0xd+0xebe))?.[_0x49d1fd(0x21a)]??_0x3990a8??''),'truncated':_0x5a27ee!==undefined||this[_0x49d1fd(0x23e)]};}async[_0x67518d(0x207)](){const _0x975cc8=_0x67518d;if(!this[_0x975cc8(0x22f)]&&this[_0x975cc8(0x241)]!==undefined){if(Date[_0x975cc8(0x27b)]()-this[_0x975cc8(0x229)]>=(this[_0x975cc8(0x2a5)][_0x975cc8(0x242)]??FILE_INDEX_FRESHNESS_TTL_MS))this[_0x975cc8(0x28a)]();return;}this[_0x975cc8(0x1fe)]===undefined&&(this[_0x975cc8(0x1fe)]=this[_0x975cc8(0x2c5)]()[_0x975cc8(0x224)](()=>{const _0x5bda84=_0x975cc8;this[_0x5bda84(0x1fe)]=undefined;})),await this[_0x975cc8(0x1fe)];}[_0x67518d(0x2c4)](){const _0x7f2a38=_0x67518d;if(this[_0x7f2a38(0x238)]!==undefined)clearTimeout(this[_0x7f2a38(0x238)]);this[_0x7f2a38(0x238)]=setTimeout(()=>this[_0x7f2a38(0x1c0)](),this[_0x7f2a38(0x2a5)][_0x7f2a38(0x1f5)]??FILE_INDEX_IDLE_TTL_MS),this[_0x7f2a38(0x238)][_0x7f2a38(0x28b)]();}async[_0x67518d(0x2c5)](){const _0x294607=_0x67518d,_0x1679f=await resolveRegisteredWorkspaceRoot(this[_0x294607(0x2c0)]),_0x37c960=[...DEFAULT_QUICK_OPEN_EXCLUDES,...await workspaceExcludePatterns(_0x1679f)],_0x4df07a=[],_0x1da8ed=this[_0x294607(0x2a5)][_0x294607(0x266)]??FILE_INDEX_ENTRY_LIMIT;let _0x27a798=![];const _0x577654=['.'];let _0x3327a8=-0x57*-0x6d+-0x2*-0xec+-0x26e3;while(_0x3327a8<_0x577654[_0x294607(0x1c6)]&&!_0x27a798){const _0x511c59=_0x577654[_0x3327a8];_0x3327a8+=0x5ab*0x4+-0x1fad+-0x2*-0x481;const _0x58026f=await resolveWorkspaceEntryFromCanonicalRoot(_0x1679f,_0x511c59,!![])[_0x294607(0x221)](()=>undefined);if(_0x58026f===undefined)continue;const _0x31d457=await opendir(_0x58026f)[_0x294607(0x221)](()=>undefined);if(_0x31d457===undefined)continue;let _0x39f9bb=[];const _0x873d3e=async()=>{const _0x357fba=_0x294607,_0x18bc93=await Promise[_0x357fba(0x269)](_0x39f9bb);_0x39f9bb=[];for(const _0x510ffa of _0x18bc93){if(_0x510ffa===undefined)continue;if(_0x510ffa[_0x357fba(0x21a)]===_0x357fba(0x2a6)||_0x510ffa[_0x357fba(0x21a)][_0x357fba(0x1b9)](_0x357fba(0x234))||isExcluded(_0x510ffa[_0x357fba(0x21a)],_0x37c960))continue;if(_0x510ffa[_0x357fba(0x1f8)]===_0x357fba(0x298))_0x577654[_0x357fba(0x1f6)](_0x510ffa[_0x357fba(0x21a)]);_0x4df07a[_0x357fba(0x1f6)](_0x510ffa);if(_0x4df07a[_0x357fba(0x1c6)]>=_0x1da8ed){_0x27a798=!![];break;}}};for await(const _0x36e336 of _0x31d457){const _0x2f53fc=_0x511c59==='.'?_0x36e336[_0x294607(0x209)]:posix[_0x294607(0x223)](_0x511c59[_0x294607(0x254)]('\x5c','/'),_0x36e336[_0x294607(0x209)]);if(_0x2f53fc===_0x294607(0x2a6)||_0x2f53fc[_0x294607(0x1b9)](_0x294607(0x234))||isExcluded(_0x2f53fc,_0x37c960))continue;_0x39f9bb[_0x294607(0x1f6)](inspectWorkspaceIndexEntry(_0x1679f,_0x2f53fc,_0x36e336[_0x294607(0x209)]));if(_0x39f9bb[_0x294607(0x1c6)]>=FILE_INDEX_METADATA_CONCURRENCY)await _0x873d3e();if(_0x27a798)break;}if(!_0x27a798&&_0x39f9bb[_0x294607(0x1c6)]>-0x2034+0x20a1*0x1+-0x6d)await _0x873d3e();}this[_0x294607(0x241)]=_0x1679f,this[_0x294607(0x1bd)]=_0x4df07a,this[_0x294607(0x23e)]=_0x27a798,this[_0x294607(0x22f)]=![],this[_0x294607(0x1d8)]=Date[_0x294607(0x27b)](),this[_0x294607(0x229)]=this[_0x294607(0x1d8)];}[_0x67518d(0x28a)](){const _0x2bbf79=_0x67518d;if(this[_0x2bbf79(0x1fe)]!==undefined)return;this[_0x2bbf79(0x229)]=Date[_0x2bbf79(0x27b)](),this[_0x2bbf79(0x1fe)]=this[_0x2bbf79(0x2c5)]()[_0x2bbf79(0x221)](()=>undefined)[_0x2bbf79(0x224)](()=>{const _0x8e0365=_0x2bbf79;this[_0x8e0365(0x1fe)]=undefined;});}}async function workspaceExcludePatterns(_0x5a31e3){const _0x5b06f3=_0x67518d,_0x1bb543=resolve(_0x5a31e3,_0x5b06f3(0x22c)),_0x136748=await readFile(_0x1bb543,_0x5b06f3(0x2be))[_0x5b06f3(0x24a)](JSON[_0x5b06f3(0x283)])[_0x5b06f3(0x221)](()=>undefined);if(typeof _0x136748!==_0x5b06f3(0x1ec)||_0x136748===null)return[];return[_0x5b06f3(0x1cf),_0x5b06f3(0x1de)][_0x5b06f3(0x2b0)](_0x2fda09=>{const _0x5d683a=_0x5b06f3,_0x4427b2=_0x136748[_0x2fda09];return typeof _0x4427b2===_0x5d683a(0x1ec)&&_0x4427b2!==null?Object[_0x5d683a(0x1bd)](_0x4427b2)[_0x5d683a(0x2b0)](([_0x4b5119,_0x19100c])=>_0x19100c===!![]?[_0x4b5119]:[]):[];});}function isExcluded(_0x20c9e6,_0x595e94){const _0x14c423=_0x67518d;return _0x595e94[_0x14c423(0x252)](_0x449799=>minimatch(_0x20c9e6,_0x449799,{'dot':!![],'nocase':_0x498f63()!==_0x14c423(0x2a7)})||minimatch(_0x20c9e6+'/',_0x449799,{'dot':!![],'nocase':_0x498f63()!==_0x14c423(0x2a7)}));}function compareRankedCandidate(_0x1a7848,_0x11d25d){const _0x331ebc=_0x67518d;return _0x11d25d[_0x331ebc(0x231)]-_0x1a7848[_0x331ebc(0x231)]||_0x1a7848[_0x331ebc(0x1f7)][_0x331ebc(0x21a)][_0x331ebc(0x1f9)](_0x11d25d[_0x331ebc(0x1f7)][_0x331ebc(0x21a)]);}class RankedCandidateHeap{[_0x67518d(0x1af)];[_0x67518d(0x1a8)]=[];constructor(_0x9d114d){const _0x183283=_0x67518d;this[_0x183283(0x1af)]=_0x9d114d;}[_0x67518d(0x261)](_0x2da816){const _0x8528a0=_0x67518d;if(this[_0x8528a0(0x1a8)][_0x8528a0(0x1c6)]<this[_0x8528a0(0x1af)]){this[_0x8528a0(0x1a8)][_0x8528a0(0x1f6)](_0x2da816),this[_0x8528a0(0x268)](this[_0x8528a0(0x1a8)][_0x8528a0(0x1c6)]-(-0x687*0x2+0xfc5+-0x2b6));return;}if(compareRankedCandidate(_0x2da816,this[_0x8528a0(0x1a8)][0x1*-0x36a+0x1*-0x35b+0x6c5])>=-0x9*-0x3d1+0x74f+-0x29a8)return;this[_0x8528a0(0x1a8)][-0x10d*-0x5+-0xeba+-0x979*-0x1]=_0x2da816,this[_0x8528a0(0x277)](-0xd9*-0x7+-0x756+0x167);}[_0x67518d(0x20a)](){const _0x5c59c9=_0x67518d;return[...this[_0x5c59c9(0x1a8)]][_0x5c59c9(0x2c8)](compareRankedCandidate);}[_0x67518d(0x268)](_0x4deaff){const _0x5a46ef=_0x67518d;let _0x571be2=_0x4deaff;while(_0x571be2>-0x16cf+-0x1*-0x713+0xfbc){const _0x1e8bb3=Math[_0x5a46ef(0x267)]((_0x571be2-(-0x1488+-0xc6a*0x1+0x20f3))/(0x1*0x1aa+0x25*-0x13+0x117));if(compareRankedCandidate(this[_0x5a46ef(0x1a8)][_0x571be2],this[_0x5a46ef(0x1a8)][_0x1e8bb3])<=0x1dee+0x1*-0x329+-0x1ac5)break;[this[_0x5a46ef(0x1a8)][_0x571be2],this[_0x5a46ef(0x1a8)][_0x1e8bb3]]=[this[_0x5a46ef(0x1a8)][_0x1e8bb3],this[_0x5a46ef(0x1a8)][_0x571be2]],_0x571be2=_0x1e8bb3;}}[_0x67518d(0x277)](_0xc7cd36){const _0x580a29=_0x67518d;let _0x425a69=_0xc7cd36;while(!![]){const _0x5a4fb7=_0x425a69*(-0x1c4c+0x595+0x7*0x33f)+(-0x1c56+-0x1eda+-0x13bb*-0x3);if(_0x5a4fb7>=this[_0x580a29(0x1a8)][_0x580a29(0x1c6)])return;const _0x272a16=_0x5a4fb7+(-0x101*0x16+-0x25ba*0x1+0x3bd1),_0x5ea4e4=_0x272a16<this[_0x580a29(0x1a8)][_0x580a29(0x1c6)]&&compareRankedCandidate(this[_0x580a29(0x1a8)][_0x272a16],this[_0x580a29(0x1a8)][_0x5a4fb7])>-0x16e*0x11+-0x24c3+0x3*0x145b?_0x272a16:_0x5a4fb7;if(compareRankedCandidate(this[_0x580a29(0x1a8)][_0x5ea4e4],this[_0x580a29(0x1a8)][_0x425a69])<=-0x1fc0+-0x2b6*-0x1+-0x3f*-0x76)return;[this[_0x580a29(0x1a8)][_0x425a69],this[_0x580a29(0x1a8)][_0x5ea4e4]]=[this[_0x580a29(0x1a8)][_0x5ea4e4],this[_0x580a29(0x1a8)][_0x425a69]],_0x425a69=_0x5ea4e4;}}}function fuzzyPathScore(_0x32efd0,_0x4b52d9){const _0x53c4fb=_0x67518d,_0x4a54ec=_0x32efd0[_0x53c4fb(0x284)](),_0x425073=_0x4b52d9[_0x53c4fb(0x25d)]()[_0x53c4fb(0x284)]();let _0x220202=-0xc1*0x23+-0x1e7e*-0x1+-0x41b*0x1,_0x2da85e=0x832+0x138b+-0x9*0x315,_0x2024e0=-(0x6b8+0x1*-0x1f61+-0x5*-0x4ef);for(const _0x5c66b3 of _0x425073){const _0x4e819f=_0x4a54ec[_0x53c4fb(0x292)](_0x5c66b3,_0x220202);if(_0x4e819f===-(0x25*0x1c+0x5*-0x389+-0xda2*-0x1))return-(-0xf37*0x2+-0x7d8+0x2647);_0x2da85e+=_0x4e819f===_0x2024e0+(-0x851+0x1*-0x1483+-0x79*-0x3d)?0x1fa2+0x1be*0xa+-0x3102:0xb61+-0x24*-0x7e+-0x1d18;if(_0x4e819f===-0x133f+-0x3f3+0xb99*0x2||_0x53c4fb(0x25e)[_0x53c4fb(0x1ef)](_0x4a54ec[_0x4e819f-(0x8*-0x2bf+0x2663+-0x16*0xbf)]??''))_0x2da85e+=0x18a0+0x1707+-0x2f9f;_0x2024e0=_0x4e819f,_0x220202=_0x4e819f+(0x1c55+0x1e*-0x9c+0x283*-0x4);}const _0x595d14=_0x32efd0[_0x53c4fb(0x23f)](_0x32efd0[_0x53c4fb(0x271)]('/')+(-0x3*0x696+0xa*0x291+-0x5e7))[_0x53c4fb(0x284)]();if(_0x595d14[_0x53c4fb(0x1ef)](_0x425073))_0x2da85e+=0xc5f*0x1+0x1115+-0x753*0x4;else{if(_0x4a54ec[_0x53c4fb(0x1ef)](_0x425073))_0x2da85e+=-0x25*0x101+-0x1e36+0x436b;}return _0x2da85e-_0x32efd0[_0x53c4fb(0x1c6)]/(0x3c7+-0x1*-0x188f+-0x186e);}export async function listWorkspaceDirectories(_0x48992c,_0x3e1b9e,_0x4043f0=homedir()){const _0x1bb0c2=_0x67518d,_0x5595dd=await realpath(_0x4043f0),_0x5ddd4d=await Promise[_0x1bb0c2(0x269)](_0x3e1b9e[_0x1bb0c2(0x275)](_0x553e88=>realpath(_0x553e88))),_0x1caff8=[...new Set([_0x5595dd,..._0x5ddd4d])],_0x3d7d10=_0x48992c===undefined?_0x5ddd4d[-0x109b*0x1+-0x11fb*0x2+0x3491*0x1]??_0x5595dd:await realpath(_0x48992c),_0x50fcab=await stat(_0x3d7d10);if(!_0x50fcab[_0x1bb0c2(0x1cd)]()||!isWithinAllowedRoot(_0x3d7d10,_0x1caff8))throw new Error(_0x1bb0c2(0x2b8));const _0xb8127c=await readdir(_0x3d7d10,{'withFileTypes':!![]}),_0x4c7457=[];for(const _0x33b62c of _0xb8127c[_0x1bb0c2(0x2c8)]((_0x45a279,_0x526ff8)=>_0x45a279[_0x1bb0c2(0x209)][_0x1bb0c2(0x1f9)](_0x526ff8[_0x1bb0c2(0x209)]))){if(!_0x33b62c[_0x1bb0c2(0x1cd)]()&&!_0x33b62c[_0x1bb0c2(0x1f0)]())continue;const _0x388008=await realpath(resolve(_0x3d7d10,_0x33b62c[_0x1bb0c2(0x209)]))[_0x1bb0c2(0x221)](()=>undefined);if(_0x388008===undefined||!isWithinAllowedRoot(_0x388008,_0x1caff8))continue;const _0x37edf5=await stat(_0x388008)[_0x1bb0c2(0x221)](()=>undefined);if(_0x37edf5===undefined||!_0x37edf5[_0x1bb0c2(0x1cd)]())continue;_0x4c7457[_0x1bb0c2(0x1f6)]({'path':_0x388008,'name':_0x33b62c[_0x1bb0c2(0x209)],'selectable':isWithinAllowedRoot(_0x388008,_0x5ddd4d)});if(_0x4c7457[_0x1bb0c2(0x1c6)]>DIRECTORY_PICKER_LIMIT)break;}const _0x1e80bf=dirname(_0x3d7d10);return{'homePath':_0x5595dd,'currentPath':_0x3d7d10,'parentPath':_0x1e80bf===_0x3d7d10||!isWithinAllowedRoot(_0x1e80bf,_0x1caff8)?null:_0x1e80bf,'browseRoots':_0x5ddd4d,'selectable':isWithinAllowedRoot(_0x3d7d10,_0x5ddd4d),'entries':_0x4c7457[_0x1bb0c2(0x23f)](-0x1549+0x1*-0x25bf+0x8*0x761,DIRECTORY_PICKER_LIMIT),'truncated':_0x4c7457[_0x1bb0c2(0x1c6)]>DIRECTORY_PICKER_LIMIT};}export async function listWorkspaceFiles(_0x26bfd1,_0x201467='.',_0x4f27b1,_0x3b0da6=DIRECTORY_PAGE_LIMIT){const _0x3b0306=_0x67518d;if(!Number[_0x3b0306(0x24c)](_0x3b0da6)||_0x3b0da6<-0x1be7+0x8*-0x4a8+-0x18*-0x2b7||_0x3b0da6>DIRECTORY_PAGE_LIMIT)throw new Error(_0x3b0306(0x1bc));const _0x4bc497=await resolveRegisteredWorkspaceRoot(_0x26bfd1),_0x3ac98e=await resolveWorkspaceEntryFromCanonicalRoot(_0x4bc497,_0x201467,!![]),_0x11e037=await readdir(_0x3ac98e,{'withFileTypes':!![]}),_0x55562c=decodeDirectoryCursor(_0x4f27b1,_0x201467),_0x343356=_0x11e037[_0x3b0306(0x20b)](_0x2744da=>_0x2744da[_0x3b0306(0x209)]!==_0x3b0306(0x2a6)&&!isWorkspaceUploadTemporaryName(_0x2744da[_0x3b0306(0x209)]))[_0x3b0306(0x275)](_0x43fba7=>_0x43fba7[_0x3b0306(0x209)])[_0x3b0306(0x2c8)]((_0x45d2f6,_0x12849d)=>_0x45d2f6[_0x3b0306(0x1f9)](_0x12849d)),_0x3ea5c7=_0x55562c===undefined?-0x2*-0x1074+0x819+0x2901*-0x1:_0x343356[_0x3b0306(0x280)](_0xab3ccb=>_0xab3ccb>_0x55562c);if(_0x55562c!==undefined&&_0x3ea5c7===-(0x1*0xa36+0x2078+-0x2aad))return{'entries':[],'nextCursor':null,'truncated':![]};const _0x5b00e3=_0x343356[_0x3b0306(0x23f)](_0x3ea5c7,_0x3ea5c7+_0x3b0da6),_0x23480c=[];for(const _0x326faa of _0x5b00e3){const _0x4ee114=await resolveWorkspaceEntry(_0x4bc497,relative(_0x4bc497,resolve(_0x3ac98e,_0x326faa)),![])[_0x3b0306(0x221)](_0x1e9b3b=>{if(isSkippableWorkspaceEntryError(_0x1e9b3b))return undefined;throw _0x1e9b3b;});if(_0x4ee114===undefined)continue;const _0x18f6dd=await lstat(_0x4ee114)[_0x3b0306(0x221)](_0x167620=>{const _0x3b1040=_0x3b0306;if(_0x167620[_0x3b1040(0x1e3)]===_0x3b1040(0x260))return undefined;throw _0x167620;});if(_0x18f6dd===undefined||!_0x18f6dd[_0x3b0306(0x1bf)]()&&!_0x18f6dd[_0x3b0306(0x1cd)]())continue;_0x23480c[_0x3b0306(0x1f6)]({'path':relative(_0x4bc497,_0x4ee114)[_0x3b0306(0x1eb)](sep)[_0x3b0306(0x223)]('/'),'name':_0x326faa,'kind':_0x18f6dd[_0x3b0306(0x1cd)]()?_0x3b0306(0x298):_0x3b0306(0x1ac),'size':_0x18f6dd[_0x3b0306(0x1bf)]()?_0x18f6dd[_0x3b0306(0x21c)]:null,'modifiedAt':_0x18f6dd[_0x3b0306(0x1e2)]});}const _0x6abd05=_0x343356[_0x3ea5c7+_0x5b00e3[_0x3b0306(0x1c6)]];return{'entries':_0x23480c,'nextCursor':_0x6abd05===undefined||_0x5b00e3[_0x3b0306(0x1c6)]===0x1*-0x1cce+0x1a95+0x239*0x1?null:encodeDirectoryCursor(_0x201467,_0x5b00e3[_0x5b00e3[_0x3b0306(0x1c6)]-(-0x1980+-0x1*0x419+-0x6*-0x4ef)]),'truncated':_0x6abd05!==undefined};}export async function mutateWorkspaceFile(_0x2a2263,_0x3cc229){const _0x33a474=_0x67518d,_0x4823f4=await resolveRegisteredWorkspaceRoot(_0x2a2263);if(_0x3cc229[_0x33a474(0x1ca)]===_0x33a474(0x1e6)||_0x3cc229[_0x33a474(0x1ca)]===_0x33a474(0x1b8)){const _0x42cddb=await resolveNewWorkspaceEntry(_0x4823f4,_0x3cc229[_0x33a474(0x21a)]);if(_0x3cc229[_0x33a474(0x1ca)]===_0x33a474(0x1e6))await writeFile(_0x42cddb,'',{'flag':'wx'});else await mkdir(_0x42cddb);return{'path':workspaceRelativePath(_0x4823f4,_0x42cddb)};}await assertWorkspaceMutationPathHasNoSymlinks(_0x4823f4,_0x3cc229[_0x33a474(0x21a)]);const _0x51a2c6=await resolveWorkspaceEntryMetadata(_0x4823f4,_0x3cc229[_0x33a474(0x21a)]);if(workspaceRelativePath(_0x4823f4,_0x51a2c6[_0x33a474(0x21a)])==='.')throw new Error(_0x33a474(0x27e));if(_0x3cc229[_0x33a474(0x1ca)]===_0x33a474(0x253))return await rm(_0x51a2c6[_0x33a474(0x21a)],{'recursive':_0x51a2c6[_0x33a474(0x2b5)][_0x33a474(0x1cd)](),'force':![]}),{'deleted':!![]};const _0x5d5dc4=await resolveNewWorkspaceEntry(_0x4823f4,_0x3cc229[_0x33a474(0x29f)]);if(_0x51a2c6[_0x33a474(0x2b5)][_0x33a474(0x1cd)]()){const _0x1cfc40=relative(_0x51a2c6[_0x33a474(0x21a)],_0x5d5dc4);if(_0x1cfc40===''||!isAbsolute(_0x1cfc40)&&_0x1cfc40!=='..'&&!_0x1cfc40[_0x33a474(0x1b9)]('..'+sep))throw new Error(_0x33a474(0x1ad));}return await rename(_0x51a2c6[_0x33a474(0x21a)],_0x5d5dc4),{'path':workspaceRelativePath(_0x4823f4,_0x5d5dc4)};}async function resolveNewWorkspaceEntry(_0xcf16d7,_0x165934){const _0x459e4c=_0x67518d,_0x546c4c=_0x165934[_0x459e4c(0x254)]('\x5c','/'),_0x3998d7=_0x546c4c[_0x459e4c(0x1eb)]('/'),_0x525525=_0x3998d7['at'](-(0xfaa+-0xc2+-0xee7));if(_0x165934[_0x459e4c(0x1ef)]('\x00')||_0x546c4c[_0x459e4c(0x1b9)]('/')||isAbsolute(_0x165934)||win32[_0x459e4c(0x25c)](_0x546c4c)||_0x525525===undefined||_0x525525[_0x459e4c(0x1c6)]===-0x805+-0x1*0x1325+0x487*0x6||_0x3998d7[_0x459e4c(0x252)](invalidWorkspaceMutationSegment))throw new Error(_0x459e4c(0x1cb));const _0x5531a7=_0x3998d7[_0x459e4c(0x1c6)]===-0x98d+0x1a49+0x10bb*-0x1?'.':_0x3998d7[_0x459e4c(0x23f)](0x20b*0xf+0xae+-0x1f53,-(-0x878*0x1+0x115a*0x2+0x11*-0x18b))[_0x459e4c(0x223)]('/');await assertWorkspaceMutationPathHasNoSymlinks(_0xcf16d7,_0x5531a7);const _0x347530=await resolveWorkspaceEntryFromCanonicalRoot(_0xcf16d7,_0x5531a7,!![]),_0x798d86=resolve(_0x347530,_0x525525);try{await lstat(_0x798d86);throw new Error(_0x459e4c(0x1d1));}catch(_0x4cf743){if(_0x4cf743[_0x459e4c(0x1e3)]!==_0x459e4c(0x260))throw _0x4cf743;}return _0x798d86;}async function assertWorkspaceMutationPathHasNoSymlinks(_0x2b9123,_0x31994b){const _0x24859a=_0x67518d,_0x2e64e0=_0x31994b[_0x24859a(0x254)]('\x5c','/');if(_0x2e64e0==='.')return;const _0x2e9871=_0x2e64e0[_0x24859a(0x1eb)]('/');if(_0x31994b[_0x24859a(0x1ef)]('\x00')||_0x2e64e0[_0x24859a(0x1b9)]('/')||isAbsolute(_0x31994b)||win32[_0x24859a(0x25c)](_0x2e64e0)||_0x2e9871[_0x24859a(0x252)](invalidWorkspaceMutationSegment))throw new Error(_0x24859a(0x1cb));let _0x5831dc=_0x2b9123;for(const _0x1a2d5c of _0x2e9871){_0x5831dc=resolve(_0x5831dc,_0x1a2d5c);const _0x387d2b=await lstat(_0x5831dc)[_0x24859a(0x221)](_0x5b3f53=>{const _0x3dff96=_0x24859a;if(_0x5b3f53[_0x3dff96(0x1e3)]===_0x3dff96(0x260))throw new Error(_0x3dff96(0x29d));throw _0x5b3f53;});if(_0x387d2b[_0x24859a(0x1f0)]())throw new Error(_0x24859a(0x1cb));}}function invalidWorkspaceMutationSegment(_0x272ce4){const _0x2c35af=_0x67518d;if(_0x272ce4[_0x2c35af(0x1c6)]===-0x353*-0x6+-0xb9*-0x13+-0x1*0x21ad||_0x272ce4==='.'||_0x272ce4==='..'||_0x272ce4===_0x2c35af(0x2a6))return!![];if(_0x498f63()!==_0x2c35af(0x2c6))return![];const _0x466a6a=_0x272ce4[_0x2c35af(0x1d2)](/[. ]+$/u,'')[_0x2c35af(0x290)]();return/[<>:"|?*]/u[_0x2c35af(0x27d)](_0x272ce4)||/^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$/u[_0x2c35af(0x27d)](_0x466a6a);}function workspaceRelativePath(_0x4d536d,_0x1ad92a){const _0x350e38=_0x67518d,_0x236d80=relative(_0x4d536d,_0x1ad92a)[_0x350e38(0x1eb)](sep)[_0x350e38(0x223)]('/');return _0x236d80[_0x350e38(0x1c6)]===0x49f*0x3+0x2347+-0x2e4*0x11?'.':_0x236d80;}function isSkippableWorkspaceEntryError(_0x48f114){const _0x536a37=_0x67518d;return _0x48f114 instanceof Error&&(_0x48f114[_0x536a37(0x26a)]===_0x536a37(0x1cb)||_0x48f114[_0x536a37(0x26a)]===_0x536a37(0x29d)||_0x48f114[_0x536a37(0x26a)]===_0x536a37(0x1aa));}export async function preflightWorkspaceUpload(_0xcb574f,_0x42d575,_0x59fca6){const _0x41218b=_0x67518d;if(_0x59fca6[_0x41218b(0x1c6)]===-0x1*0x1834+-0x673+0x1ea7||_0x59fca6==='.'||_0x59fca6==='..'||_0x59fca6[_0x41218b(0x1ef)]('\x00')||_0x59fca6[_0x41218b(0x1ef)]('/')||_0x59fca6[_0x41218b(0x1ef)]('\x5c')||isWorkspaceUploadTemporaryName(_0x59fca6))return{'path':'','absolutePath':'','status':_0x41218b(0x1b4)};const _0x2ec258=await resolveRegisteredWorkspaceRoot(_0xcb574f),_0x5bcfad=await resolveWorkspaceEntry(_0x2ec258,_0x42d575,!![]),_0x3db892=resolve(_0x5bcfad,_0x59fca6);if(dirname(_0x3db892)!==_0x5bcfad)throw new Error(_0x41218b(0x1cb));const _0x43c713=relative(_0x2ec258,_0x3db892)[_0x41218b(0x1eb)](sep)[_0x41218b(0x223)]('/'),_0x519e98=await lstat(_0x3db892)[_0x41218b(0x221)](_0x5bf436=>{const _0x30ee25=_0x41218b;if(_0x5bf436[_0x30ee25(0x1e3)]===_0x30ee25(0x260))return undefined;throw _0x5bf436;});if(_0x519e98===undefined)return{'path':_0x43c713,'absolutePath':_0x3db892,'status':_0x41218b(0x1fd)};if(_0x519e98[_0x41218b(0x1f0)]())throw new Error(_0x41218b(0x1cb));if(_0x519e98[_0x41218b(0x1bf)]())return{'path':_0x43c713,'absolutePath':_0x3db892,'status':_0x41218b(0x25a)};return{'path':_0x43c713,'absolutePath':_0x3db892,'status':_0x41218b(0x1f1)};}export function workspaceUploadTemporaryName(_0x310fc1){const _0x376011=_0x67518d;return _0x376011(0x25f)+_0x310fc1+_0x376011(0x1b5);}function isWorkspaceUploadTemporaryName(_0x1b5a44){const _0x14f497=_0x67518d;return/^\.mar-upload-[0-9a-f-]{36}\.part$/iu[_0x14f497(0x27d)](_0x1b5a44)||/^\.mar-edit-[0-9a-f-]{36}\.part$/iu[_0x14f497(0x27d)](_0x1b5a44);}export async function readWorkspaceTextFile(_0x79817a,_0x539ea8,_0x2ecfc9=-0x15b0+-0x1*-0xc51+0x95f,_0x4be821=FILE_READ_LIMIT){const _0x24c90a=_0x67518d;if(!Number[_0x24c90a(0x24c)](_0x2ecfc9)||_0x2ecfc9<-0x5e6+-0x456+0x2*0x51e||!Number[_0x24c90a(0x24c)](_0x4be821)||_0x4be821<0x1f80+0x1cab+-0x1*0x3c2a||_0x4be821>FILE_READ_LIMIT)throw new Error(_0x24c90a(0x1a4));const _0x420df1=await resolveRegisteredWorkspaceRoot(_0x79817a),_0x1502ce=await resolveWorkspaceEntry(_0x420df1,_0x539ea8,![]),_0x3aa644=await lstat(_0x1502ce);if(!_0x3aa644[_0x24c90a(0x1bf)]())throw new Error(_0x24c90a(0x1aa));if(_0x3aa644[_0x24c90a(0x21c)]>FILE_READ_LIMIT*(0x1683+0x2531+-0x2b6*0x16))throw new Error(_0x24c90a(0x273));const _0x55018d=await readFile(_0x1502ce),_0x39c391=createHash(_0x24c90a(0x2a9))[_0x24c90a(0x200)](_0x55018d)[_0x24c90a(0x214)](_0x24c90a(0x26f)),_0x10389b=_0x55018d[_0x24c90a(0x1ef)](0xb9*-0x6+-0x42*0x89+-0x11a*-0x24)||!isValidUtf8(_0x55018d);if(_0x10389b){const _0x27ac7b=Math[_0x24c90a(0x1d6)](_0x55018d[_0x24c90a(0x1c6)],_0x2ecfc9+_0x4be821),_0x4787f3=_0x55018d[_0x24c90a(0x227)](_0x2ecfc9,_0x27ac7b);return{'path':relative(_0x420df1,_0x1502ce)[_0x24c90a(0x1eb)](sep)[_0x24c90a(0x223)]('/'),'encoding':_0x24c90a(0x287),'size':_0x55018d[_0x24c90a(0x1c6)],'content':_0x4787f3[_0x24c90a(0x1dd)](_0x24c90a(0x287)),'truncated':_0x27ac7b<_0x55018d[_0x24c90a(0x1c6)],'nextOffset':_0x27ac7b<_0x55018d[_0x24c90a(0x1c6)]?_0x27ac7b:null,'revision':_0x39c391};}if(_0x2ecfc9>0x1*-0x674+0x255d*0x1+0x1ee9*-0x1&&_0x2ecfc9<_0x55018d[_0x24c90a(0x1c6)]&&isUtf8ContinuationByte(_0x55018d[_0x2ecfc9]))throw new Error(_0x24c90a(0x1a4));let _0x4add7a=Math[_0x24c90a(0x1d6)](_0x55018d[_0x24c90a(0x1c6)],_0x2ecfc9+_0x4be821);if(_0x4add7a<_0x55018d[_0x24c90a(0x1c6)]&&isUtf8ContinuationByte(_0x55018d[_0x4add7a])){while(_0x4add7a>_0x2ecfc9&&isUtf8ContinuationByte(_0x55018d[_0x4add7a]))_0x4add7a-=-0x1208+0x10*-0x6a+-0x3b*-0x6b;if(_0x4add7a===_0x2ecfc9){_0x4add7a+=0x1269+0x140c+-0x2674;while(_0x4add7a<_0x55018d[_0x24c90a(0x1c6)]&&isUtf8ContinuationByte(_0x55018d[_0x4add7a]))_0x4add7a+=-0x2*0xaa2+0xfe5+0x560;}}const _0x10fa50=_0x55018d[_0x24c90a(0x227)](_0x2ecfc9,_0x4add7a),_0x586828=new TextDecoder(_0x24c90a(0x203),{'fatal':!![]})[_0x24c90a(0x230)](_0x10fa50),_0x272911=_0x4add7a<_0x55018d[_0x24c90a(0x1c6)]?_0x4add7a:null;return{'path':relative(_0x420df1,_0x1502ce)[_0x24c90a(0x1eb)](sep)[_0x24c90a(0x223)]('/'),'encoding':_0x24c90a(0x203),'size':_0x55018d[_0x24c90a(0x1c6)],'content':_0x586828,'truncated':_0x272911!==null,'nextOffset':_0x272911,'revision':_0x39c391};}export async function writeWorkspaceTextFile(_0x1c541a,_0x56c6ca,_0x373234,_0x383287){const _0x51bb5f=_0x67518d;if(!/^[0-9a-f]{64}$/u[_0x51bb5f(0x27d)](_0x383287))throw new Error(_0x51bb5f(0x23d));const _0x3062f0=Buffer[_0x51bb5f(0x29a)](_0x373234,_0x51bb5f(0x2be));if(_0x3062f0[_0x51bb5f(0x1c6)]>FILE_READ_LIMIT*(0x10*0x7f+-0x1fb1+-0x43*-0x5b))throw new Error(_0x51bb5f(0x273));if(_0x3062f0[_0x51bb5f(0x1ef)](-0x1*-0x1949+0x2f*-0xd2+0x1*0xd45))throw new Error(_0x51bb5f(0x294));const _0x536faa=await resolveRegisteredWorkspaceRoot(_0x1c541a);await assertWorkspaceMutationPathHasNoSymlinks(_0x536faa,_0x56c6ca);const _0x3fc3c6=await resolveWorkspaceEntry(_0x536faa,_0x56c6ca,![]),_0xbb0bd6=await lstat(_0x3fc3c6);if(!_0xbb0bd6[_0x51bb5f(0x1bf)]())throw new Error(_0x51bb5f(0x1aa));const _0x116f80=await readFile(_0x3fc3c6);if(_0x116f80[_0x51bb5f(0x1ef)](-0x1487+0x1*0x1cc3+-0x83c)||!isValidUtf8(_0x116f80))throw new Error(_0x51bb5f(0x294));const _0x3b5526=createHash(_0x51bb5f(0x2a9))[_0x51bb5f(0x200)](_0x116f80)[_0x51bb5f(0x214)](_0x51bb5f(0x26f));if(_0x3b5526!==_0x383287)throw new Error(_0x51bb5f(0x1b3));const _0x597df4=createHash(_0x51bb5f(0x2a9))[_0x51bb5f(0x200)](_0x3062f0)[_0x51bb5f(0x214)](_0x51bb5f(0x26f)),_0x5ee790=resolve(dirname(_0x3fc3c6),_0x51bb5f(0x26d)+randomUUID()+_0x51bb5f(0x1b5));try{await writeFile(_0x5ee790,_0x3062f0,{'flag':'wx','mode':_0xbb0bd6[_0x51bb5f(0x212)]}),await rename(_0x5ee790,_0x3fc3c6);}finally{await rm(_0x5ee790,{'force':!![]})[_0x51bb5f(0x221)](()=>undefined);}return{'path':workspaceRelativePath(_0x536faa,_0x3fc3c6),'revision':_0x597df4,'size':_0x3062f0[_0x51bb5f(0x1c6)]};}export async function readWorkspaceFileContentRange(_0x4136fd,_0x3953b7,_0xc31e8b=0x98b*0x1+-0x9*-0x89+0x72e*-0x2,_0x4369e9=FILE_READ_LIMIT){const _0x2770f4=_0x67518d;if(!Number[_0x2770f4(0x24c)](_0xc31e8b)||_0xc31e8b<0x949*-0x3+-0x1*-0x121f+0x4de*0x2||!Number[_0x2770f4(0x24c)](_0x4369e9)||_0x4369e9<0xa9b*-0x1+-0x8d*-0x1e+-0x2f5*0x2||_0x4369e9>FILE_READ_LIMIT)throw new Error(_0x2770f4(0x1a4));const _0x39d4f1=await resolveRegisteredWorkspaceRoot(_0x4136fd),_0x544f61=await resolveWorkspaceEntry(_0x39d4f1,_0x3953b7,![]),_0x12448d=await lstat(_0x544f61);if(!_0x12448d[_0x2770f4(0x1bf)]())throw new Error(_0x2770f4(0x1aa));if(_0xc31e8b>_0x12448d[_0x2770f4(0x21c)])throw new Error(_0x2770f4(0x1a4));const _0x3fcf3a=Math[_0x2770f4(0x1d6)](_0x4369e9,_0x12448d[_0x2770f4(0x21c)]-_0xc31e8b),_0x544575=Buffer[_0x2770f4(0x213)](_0x3fcf3a),_0x2df91c=await open(_0x544f61,'r');try{const {bytesRead:_0x285875}=await _0x2df91c[_0x2770f4(0x1ff)](_0x544575,0x4f5*-0x6+-0x1*0x1075+0x2e33,_0x3fcf3a,_0xc31e8b),_0x48f266=_0xc31e8b+_0x285875;return{'path':relative(_0x39d4f1,_0x544f61)[_0x2770f4(0x1eb)](sep)[_0x2770f4(0x223)]('/'),'size':_0x12448d[_0x2770f4(0x21c)],'offset':_0xc31e8b,'contentBase64':_0x544575[_0x2770f4(0x227)](0x8*-0x2dd+0xe3a+0x16*0x65,_0x285875)[_0x2770f4(0x1dd)](_0x2770f4(0x287)),'nextOffset':_0x48f266<_0x12448d[_0x2770f4(0x21c)]?_0x48f266:null};}finally{await _0x2df91c[_0x2770f4(0x232)]();}}export async function readAllowedFileContentRange(_0x4b091c,_0x4a7853,_0x5267e5=0x3*-0xc4c+0x258a+-0xa6*0x1,_0x1b8f6a=FILE_READ_LIMIT){const _0x3a6028=_0x67518d;if(!Number[_0x3a6028(0x24c)](_0x5267e5)||_0x5267e5<0x1*-0xe5a+-0x9b+0xef5||!Number[_0x3a6028(0x24c)](_0x1b8f6a)||_0x1b8f6a<0x158b+-0x85b+0x2d*-0x4b||_0x1b8f6a>FILE_READ_LIMIT)throw new Error(_0x3a6028(0x1a4));const {file:_0x194e7a,metadata:_0x102b50}=await resolveAllowedFile(_0x4b091c,_0x4a7853);if(_0x5267e5>_0x102b50[_0x3a6028(0x21c)])throw new Error(_0x3a6028(0x1a4));const _0xd36e40=Math[_0x3a6028(0x1d6)](_0x1b8f6a,_0x102b50[_0x3a6028(0x21c)]-_0x5267e5),_0x48777e=Buffer[_0x3a6028(0x213)](_0xd36e40),_0x5f51ae=await open(_0x194e7a,'r');try{const {bytesRead:_0x25ba6c}=await _0x5f51ae[_0x3a6028(0x1ff)](_0x48777e,0x1521*0x1+-0x3a*0xa9+-0x1129*-0x1,_0xd36e40,_0x5267e5),_0x20ad36=_0x5267e5+_0x25ba6c;return{'path':_0x194e7a,'size':_0x102b50[_0x3a6028(0x21c)],'offset':_0x5267e5,'contentBase64':_0x48777e[_0x3a6028(0x227)](0x1fe5+-0x21e0+0x1fb,_0x25ba6c)[_0x3a6028(0x1dd)](_0x3a6028(0x287)),'nextOffset':_0x20ad36<_0x102b50[_0x3a6028(0x21c)]?_0x20ad36:null};}finally{await _0x5f51ae[_0x3a6028(0x232)]();}}export async function readAllowedTextFile(_0x192c99,_0x7f4193,_0x514492=-0x17f*-0x2+0x517*0x3+-0x5*0x3a7,_0x253a58=FILE_READ_LIMIT){const _0x3ebecf=_0x67518d,{file:_0x1466ae,metadata:_0x2f096f}=await resolveAllowedFile(_0x192c99,_0x7f4193);if(_0x2f096f[_0x3ebecf(0x21c)]>FILE_READ_LIMIT*(0x49*0x4f+-0x722+-0xf55))throw new Error(_0x3ebecf(0x273));if(!Number[_0x3ebecf(0x24c)](_0x514492)||_0x514492<0x1f2*0x5+0x1a54+-0x163*0x1a||!Number[_0x3ebecf(0x24c)](_0x253a58)||_0x253a58<-0x6c*-0x7+-0x134d+-0x2e*-0x5b||_0x253a58>FILE_READ_LIMIT)throw new Error(_0x3ebecf(0x1a4));const _0x35ed75=await readFile(_0x1466ae),_0x42d51c=_0x35ed75[_0x3ebecf(0x1ef)](-0x2*0x11f+0x5ae*0x2+-0x91e)||!isValidUtf8(_0x35ed75),_0x9552a4=Math[_0x3ebecf(0x1d6)](_0x35ed75[_0x3ebecf(0x1c6)],_0x514492+_0x253a58);if(_0x42d51c){const _0x5af87f=_0x35ed75[_0x3ebecf(0x227)](_0x514492,_0x9552a4);return{'path':_0x1466ae,'encoding':_0x3ebecf(0x287),'size':_0x35ed75[_0x3ebecf(0x1c6)],'content':_0x5af87f[_0x3ebecf(0x1dd)](_0x3ebecf(0x287)),'truncated':_0x9552a4<_0x35ed75[_0x3ebecf(0x1c6)],'nextOffset':_0x9552a4<_0x35ed75[_0x3ebecf(0x1c6)]?_0x9552a4:null};}if(_0x514492>-0xaf1+-0xce*-0x16+0x241*-0x3&&_0x514492<_0x35ed75[_0x3ebecf(0x1c6)]&&isUtf8ContinuationByte(_0x35ed75[_0x514492]))throw new Error(_0x3ebecf(0x1a4));let _0x506567=_0x9552a4;if(_0x506567<_0x35ed75[_0x3ebecf(0x1c6)]&&isUtf8ContinuationByte(_0x35ed75[_0x506567])){while(_0x506567>_0x514492&&isUtf8ContinuationByte(_0x35ed75[_0x506567]))_0x506567-=0x1a1*0x9+-0x788+-0x4*0x1c8;if(_0x506567===_0x514492){_0x506567+=-0x1fed+0x1*-0xa22+-0x542*-0x8;while(_0x506567<_0x35ed75[_0x3ebecf(0x1c6)]&&isUtf8ContinuationByte(_0x35ed75[_0x506567]))_0x506567+=0x1*0xf21+0x1*0x12b9+0x21d9*-0x1;}}const _0x334627=_0x506567<_0x35ed75[_0x3ebecf(0x1c6)]?_0x506567:null;return{'path':_0x1466ae,'encoding':_0x3ebecf(0x203),'size':_0x35ed75[_0x3ebecf(0x1c6)],'content':new TextDecoder(_0x3ebecf(0x203),{'fatal':!![]})[_0x3ebecf(0x230)](_0x35ed75[_0x3ebecf(0x227)](_0x514492,_0x506567)),'truncated':_0x334627!==null,'nextOffset':_0x334627};}export function normalizeFilePreviewPath(_0x293246){const _0x18eb8d=_0x67518d;if(!/^sandbox:/iu[_0x18eb8d(0x27d)](_0x293246))return _0x293246;let _0x218fd2;try{_0x218fd2=decodeURIComponent(_0x293246[_0x18eb8d(0x23f)](_0x293246[_0x18eb8d(0x292)](':')+(0x35e*0x7+-0xb63+-0xc2e)));}catch{throw new Error(_0x18eb8d(0x1cb));}const _0x4fb340=_0x218fd2[_0x18eb8d(0x1d2)](/^\/([a-z]:[\\/])/iu,'$1');if(_0x4fb340[_0x18eb8d(0x1c6)]===0x1d*0xd7+-0x3*-0x1fd+-0x1e52||/^[\\/]{2,}[?.](?:[\\/]|$)/u[_0x18eb8d(0x27d)](_0x218fd2)||!isAbsolute(_0x4fb340)&&!win32[_0x18eb8d(0x25c)](_0x4fb340)||_0x4fb340[_0x18eb8d(0x1ef)]('\x00')||_0x4fb340[_0x18eb8d(0x1ef)]('?')||_0x4fb340[_0x18eb8d(0x1ef)]('#'))throw new Error(_0x18eb8d(0x1cb));return _0x4fb340;}async function resolveAllowedFile(_0x757e5b,_0x5f58ea){const _0x3420f7=_0x67518d;if(!isAbsolute(_0x757e5b))throw new Error(_0x3420f7(0x1cb));const _0x2a15ec=await realpath(_0x757e5b)[_0x3420f7(0x221)](_0x183a69=>{const _0x43f0da=_0x3420f7;if(_0x183a69[_0x43f0da(0x1e3)]===_0x43f0da(0x260))throw new Error(_0x43f0da(0x29d));throw _0x183a69;}),_0x40455b=await Promise[_0x3420f7(0x269)](_0x5f58ea[_0x3420f7(0x275)](_0x419775=>realpath(_0x419775)));if(!isWithinAllowedRoot(_0x2a15ec,_0x40455b))throw new Error(_0x3420f7(0x1cb));const _0x2f07b0=await lstat(_0x2a15ec);if(!_0x2f07b0[_0x3420f7(0x1bf)]())throw new Error(_0x3420f7(0x1aa));return{'file':_0x2a15ec,'metadata':_0x2f07b0};}function isValidUtf8(_0x9a8fa9){const _0x1d2b6=_0x67518d;try{return new TextDecoder(_0x1d2b6(0x203),{'fatal':!![]})[_0x1d2b6(0x230)](_0x9a8fa9),!![];}catch{return![];}}function isUtf8ContinuationByte(_0x4f6e58){return(_0x4f6e58&-0x10f1*-0x2+-0xb50+-0x26*0x93)===-0xb08+0x36+-0xa1*-0x12;}export async function searchWorkspaceFiles(_0x3bb75e,_0xeec753,_0x397e5e,_0x317d8b=SEARCH_RESULT_LIMIT,_0x2c41fa=![]){const _0xec686=_0x67518d,_0x194aaa=new WorkspaceFileIndex(_0x3bb75e);try{return await _0x194aaa[_0xec686(0x278)](_0xeec753,_0x397e5e,_0x317d8b,_0x2c41fa);}finally{_0x194aaa[_0xec686(0x1c0)]();}}async function resolveRegisteredWorkspaceRoot(_0x3e3c78){const _0x2a841e=_0x67518d,_0x1c7932=await realpath(_0x3e3c78);if(normalizeWorkspacePath(_0x1c7932)!==normalizeWorkspacePath(_0x3e3c78))throw new Error(_0x2a841e(0x1e9));return _0x1c7932;}async function resolveWorkspaceEntry(_0x2c3cbb,_0x7f59f0,_0x8c6669){const _0x4a00d4=await resolveRegisteredWorkspaceRoot(_0x2c3cbb);return resolveWorkspaceEntryFromCanonicalRoot(_0x4a00d4,_0x7f59f0,_0x8c6669);}function _0x4bb8(_0x4eb3cc,_0x4ed1f5){_0x4eb3cc=_0x4eb3cc-(-0xc5*-0x1+-0x223+0x4d*0xa);const _0x591490=_0x537c();let _0x4ec3b3=_0x591490[_0x4eb3cc];if(_0x4bb8['ecaKKI']===undefined){var _0x4d0195=function(_0x14ce7f){const _0xc7071a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1ae36c='',_0x389563='';for(let _0x1d2319=0x1*-0x21a7+0x963+0x2*0xc22,_0x3b6c41,_0x15b0ff,_0x29110d=-0x1*-0xd06+0x2423+0x347*-0xf;_0x15b0ff=_0x14ce7f['charAt'](_0x29110d++);~_0x15b0ff&&(_0x3b6c41=_0x1d2319%(0x12d+-0x1378+0x124f)?_0x3b6c41*(0x10be+-0x1*-0x1462+0x24e*-0x10)+_0x15b0ff:_0x15b0ff,_0x1d2319++%(-0x1*0x508+0x1416+0x785*-0x2))?_0x1ae36c+=String['fromCharCode'](0x2256+-0x1867*0x1+-0x8f0&_0x3b6c41>>(-(-0x398+-0x21d7*-0x1+-0x1e3d)*_0x1d2319&0x15ef+-0xc29+0x34*-0x30)):0x17f5*-0x1+-0x5bf+0x1*0x1db4){_0x15b0ff=_0xc7071a['indexOf'](_0x15b0ff);}for(let _0x4f75df=-0x1bc5+-0x2*0xcbf+-0x2d*-0x12f,_0x5a58b2=_0x1ae36c['length'];_0x4f75df<_0x5a58b2;_0x4f75df++){_0x389563+='%'+('00'+_0x1ae36c['charCodeAt'](_0x4f75df)['toString'](-0x1*-0x1841+-0xe2d+0x4*-0x281))['slice'](-(0x4*0x5b0+-0x1b95+0x4d7));}return decodeURIComponent(_0x389563);};_0x4bb8['YkgbPQ']=_0x4d0195,_0x4bb8['tvBYGw']={},_0x4bb8['ecaKKI']=!![];}const _0x4e769d=_0x591490[-0x3*-0xa1b+-0x25e5+-0x5*-0x184];_0x4bb8['EkcmCC']!==_0x4e769d&&(_0x4bb8['tvBYGw']={},_0x4bb8['EkcmCC']=_0x4e769d);const _0x20929a=_0x4bb8['tvBYGw'][_0x4eb3cc];return _0x20929a===undefined?(_0x4ec3b3=_0x4bb8['YkgbPQ'](_0x4ec3b3),_0x4bb8['tvBYGw'][_0x4eb3cc]=_0x4ec3b3):_0x4ec3b3=_0x20929a,_0x4ec3b3;}async function resolveWorkspaceEntryFromCanonicalRoot(_0x3c18d2,_0x36fbbf,_0xa992f7){const _0x490418=_0x67518d,_0x202efa=await resolveWorkspaceEntryMetadata(_0x3c18d2,_0x36fbbf);if(_0xa992f7?!_0x202efa[_0x490418(0x2b5)][_0x490418(0x1cd)]():!_0x202efa[_0x490418(0x2b5)][_0x490418(0x1bf)]()&&!_0x202efa[_0x490418(0x2b5)][_0x490418(0x1cd)]())throw new Error(_0xa992f7?_0x490418(0x1fa):_0x490418(0x1aa));return _0x202efa[_0x490418(0x21a)];}async function resolveWorkspaceEntryMetadata(_0x25b3bc,_0x55c0fd){const _0x42b9ff=_0x67518d;if(_0x55c0fd[_0x42b9ff(0x1ef)]('\x00')||_0x55c0fd[_0x42b9ff(0x1c6)]===-0x1a5*-0x7+-0x2f*-0xc7+-0x6*0x802||_0x55c0fd[_0x42b9ff(0x1b9)]('/')||_0x55c0fd[_0x42b9ff(0x1b9)]('\x5c'))throw new Error(_0x42b9ff(0x1cb));const _0xfbc209=_0x55c0fd[_0x42b9ff(0x254)]('\x5c','/');if(_0xfbc209[_0x42b9ff(0x1eb)]('/')[_0x42b9ff(0x252)](_0x3e3c54=>_0x3e3c54==='..'||_0x3e3c54===_0x42b9ff(0x2a6)))throw new Error(_0x42b9ff(0x1cb));let _0xcced74;try{_0xcced74=await realpath(resolve(_0x25b3bc,_0xfbc209));}catch(_0x485a92){if(_0x485a92[_0x42b9ff(0x1e3)]===_0x42b9ff(0x260))throw new Error(_0x42b9ff(0x29d));throw _0x485a92;}const _0x13c4e4=relative(_0x25b3bc,_0xcced74);if(isAbsolute(_0x13c4e4)||_0x13c4e4[_0x42b9ff(0x1b9)]('..')||_0x13c4e4==='..'||_0x13c4e4[_0x42b9ff(0x1b9)]('..'+sep))throw new Error(_0x42b9ff(0x1cb));const _0x2b40ef=await lstat(_0xcced74);return{'path':_0xcced74,'metadata':_0x2b40ef};}async function inspectWorkspaceIndexEntry(_0x2a1d96,_0x35f69e,_0xf958f5){const _0x42618a=_0x67518d;try{const _0x2a5743=await resolveWorkspaceEntryMetadata(_0x2a1d96,_0x35f69e);if(!_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1bf)]()&&!_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1cd)]())return undefined;const _0xd77873=relative(_0x2a1d96,_0x2a5743[_0x42618a(0x21a)])[_0x42618a(0x1eb)](sep)[_0x42618a(0x223)]('/');return _0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1cd)]()?{'path':_0xd77873,'name':_0xf958f5,'kind':_0x42618a(0x298),'size':null,'modifiedAt':_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1e2)]}:{'path':_0xd77873,'name':_0xf958f5,'kind':_0x42618a(0x1ac),'size':_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x21c)],'modifiedAt':_0x2a5743[_0x42618a(0x2b5)][_0x42618a(0x1e2)]};}catch{return undefined;}}function encodeDirectoryCursor(_0x196062,_0x383f7d){const _0x36d621=_0x67518d;return Buffer[_0x36d621(0x29a)](JSON[_0x36d621(0x1a9)]({'path':_0x196062,'name':_0x383f7d}))[_0x36d621(0x1dd)](_0x36d621(0x288));}function decodeDirectoryCursor(_0x45371e,_0xa4e593){const _0x114a20=_0x67518d;if(_0x45371e===undefined)return undefined;try{const _0x123567=JSON[_0x114a20(0x283)](Buffer[_0x114a20(0x29a)](_0x45371e,_0x114a20(0x288))[_0x114a20(0x1dd)](_0x114a20(0x2be)));if(typeof _0x123567!==_0x114a20(0x1ec)||_0x123567===null||_0x123567[_0x114a20(0x21a)]!==_0xa4e593||typeof _0x123567[_0x114a20(0x209)]!==_0x114a20(0x1f4))throw new Error();return _0x123567[_0x114a20(0x209)];}catch{throw new Error(_0x114a20(0x1bc));}}function encodeSearchCursor(_0x4504ef,_0x4305b0){const _0x2c24f2=_0x67518d;return Buffer[_0x2c24f2(0x29a)](JSON[_0x2c24f2(0x1a9)]({'query':_0x4504ef,'path':_0x4305b0}))[_0x2c24f2(0x1dd)](_0x2c24f2(0x288));}function decodeSearchCursor(_0x24ce8f,_0x574477){const _0x8b4542=_0x67518d;if(_0x24ce8f===undefined)return undefined;try{const _0x1b8ea5=JSON[_0x8b4542(0x283)](Buffer[_0x8b4542(0x29a)](_0x24ce8f,_0x8b4542(0x288))[_0x8b4542(0x1dd)](_0x8b4542(0x2be)));if(typeof _0x1b8ea5!==_0x8b4542(0x1ec)||_0x1b8ea5===null||_0x1b8ea5[_0x8b4542(0x251)]!==_0x574477||typeof _0x1b8ea5[_0x8b4542(0x21a)]!==_0x8b4542(0x1f4))throw new Error();return _0x1b8ea5[_0x8b4542(0x21a)];}catch{throw new Error(_0x8b4542(0x1bc));}}export function normalizeWorkspacePath(_0x170cfd,_0x2d182b=_0x498f63()){const _0x237c64=_0x67518d;if(_0x170cfd[_0x237c64(0x1c6)]===-0x4ec+0xda*-0x1e+0x2*0xf3c||_0x170cfd[_0x237c64(0x1ef)]('\u0000'))throw new Error(_0x237c64(0x1a5));if(_0x2d182b===_0x237c64(0x2c6)){if(/^\\\\[?.]/[_0x237c64(0x27d)](_0x170cfd))throw new Error(_0x237c64(0x28f));const _0x40d8d6=win32[_0x237c64(0x285)](_0x170cfd[_0x237c64(0x254)]('/','\x5c'));if(!win32[_0x237c64(0x25c)](_0x40d8d6))throw new Error(_0x237c64(0x1ce));return _0x40d8d6[_0x237c64(0x1d2)](/\\+$/,'')[_0x237c64(0x1a7)]();}if(_0x2d182b!==_0x237c64(0x2a7))throw new Error(_0x237c64(0x27f));const _0x538449=posix[_0x237c64(0x285)](_0x170cfd);if(!posix[_0x237c64(0x25c)](_0x538449))throw new Error(_0x237c64(0x1ce));return _0x538449==='/'?_0x538449:_0x538449[_0x237c64(0x1d2)](/\/+$/,'');}export function isWithinAllowedRoot(_0x1a29cd,_0x97f32b,_0x140ae2=_0x498f63()){const _0x2a8134=_0x67518d,_0x5405ea=normalizeWorkspacePath(_0x1a29cd,_0x140ae2),_0xdad8d3=_0x140ae2===_0x2a8134(0x2c6)?win32:posix;return _0x97f32b[_0x2a8134(0x252)](_0x375c02=>{const _0x368a0c=_0x2a8134,_0x2dc824=normalizeWorkspacePath(_0x375c02,_0x140ae2),_0x5835be=_0xdad8d3[_0x368a0c(0x2aa)](_0x2dc824,_0x5405ea);return _0x5835be===''||!_0x5835be[_0x368a0c(0x1b9)]('..')&&!_0xdad8d3[_0x368a0c(0x25c)](_0x5835be);});}export async function inspectWorkspace(_0x3a05cb,_0x8242ff){const _0x1c7358=_0x67518d,_0x361fb5=await realpath(_0x3a05cb),_0x18c5e5=await Promise[_0x1c7358(0x269)](_0x8242ff[_0x1c7358(0x275)](_0x51cb92=>realpath(_0x51cb92))),_0x4f75ae=await stat(_0x361fb5);if(!_0x4f75ae[_0x1c7358(0x1cd)]()||!isWithinAllowedRoot(_0x361fb5,_0x18c5e5))throw new Error(_0x1c7358(0x1e9));try{const _0x58168e=await readGitSummary(_0x361fb5);return{'path':_0x361fb5,'kind':_0x1c7358(0x215),'gitSummary':_0x58168e};}catch(_0xd1249a){if(_0xd1249a instanceof GitCommandError&&_0xd1249a[_0x1c7358(0x1e3)]===-0xe*0xef+-0xe5c+0x11e*0x19||isGitUnavailable(_0xd1249a))return{'path':_0x361fb5,'kind':_0x1c7358(0x298)};throw _0xd1249a;}}export async function readGitSummary(_0x5e4c72){const _0x402ee2=_0x67518d,_0x3e6882=(await runReadOnlyGit(_0x5e4c72,[_0x402ee2(0x240),_0x402ee2(0x1b2)]))[_0x402ee2(0x247)][_0x402ee2(0x25d)](),_0x3b76ed=await runReadOnlyGitAllowFailure(_0x5e4c72,[_0x402ee2(0x240),_0x402ee2(0x235),_0x402ee2(0x1c1)]),_0x11662d=await runReadOnlyGitAllowFailure(_0x5e4c72,[_0x402ee2(0x22d),_0x402ee2(0x22a),_0x402ee2(0x250),_0x402ee2(0x1c1)]),_0x4ee619={'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT},_0x3b523a=await runReadOnlyGit(_0x5e4c72,[_0x402ee2(0x220),_0x402ee2(0x2a8)],_0x4ee619);return{'commonDir':_0x3e6882,'head':_0x3b76ed[_0x402ee2(0x1e3)]===-0x1e29*0x1+-0x98+0x1ec1?_0x3b76ed[_0x402ee2(0x247)][_0x402ee2(0x25d)]():'','branch':_0x11662d[_0x402ee2(0x1e3)]===-0xc61*0x1+0xa8*0x3b+0x1*-0x1a57?_0x11662d[_0x402ee2(0x247)][_0x402ee2(0x25d)]():null,'dirty':_0x3b523a[_0x402ee2(0x2a4)][_0x402ee2(0x1c6)]>-0x1*0x110b+0x507*-0x7+0x343c,'snapshot':summarizeText(_0x3b523a[_0x402ee2(0x247)])};}export function assertSafeGitRef(_0xd18e54){const _0x30ddb0=_0x67518d;if(!REF_PATTERN[_0x30ddb0(0x27d)](_0xd18e54))throw new Error(_0x30ddb0(0x1fb));}export async function readRestrictedDiff(_0x1f24fe,_0x5f0f24,_0x50c3b7){const _0x169b2e=_0x67518d;assertSafeGitRef(_0x5f0f24),assertSafeGitRef(_0x50c3b7);const _0x2d232e=await runReadOnlyGit(_0x1f24fe,[_0x169b2e(0x20c),_0x169b2e(0x1c8),_0x169b2e(0x20d),_0x5f0f24,_0x50c3b7]),_0x36a70f=_0x2d232e[_0x169b2e(0x2a4)][_0x169b2e(0x1ef)](0x1*0xa2b+-0x734*0x1+-0x2f7)||_0x2d232e[_0x169b2e(0x247)][_0x169b2e(0x1ef)](_0x169b2e(0x226));if(_0x36a70f)return{'binary':!![],'summary':_0x169b2e(0x1e4)+createHash(_0x169b2e(0x2a9))[_0x169b2e(0x200)](_0x2d232e[_0x169b2e(0x2a4)])[_0x169b2e(0x214)](_0x169b2e(0x26f))+_0x169b2e(0x282)+_0x2d232e[_0x169b2e(0x2a4)][_0x169b2e(0x1c6)],'truncated':_0x2d232e[_0x169b2e(0x23e)]};return{'binary':![],'text':_0x2d232e[_0x169b2e(0x247)],'truncated':_0x2d232e[_0x169b2e(0x23e)]};}function currentBranchFromStatusHeader(_0x11975b){const _0x5ab548=_0x67518d,_0x3fb951=_0x11975b[_0x5ab548(0x23f)](-0xb74+0x203c+-0x14c5);if(_0x3fb951[_0x5ab548(0x1b9)](_0x5ab548(0x1be)))return null;const _0x396f2c=/^(?:No commits yet on|Initial commit on) (.+)$/[_0x5ab548(0x22e)](_0x3fb951);if(_0x396f2c!==null)return _0x396f2c[-0x2*0xc38+0x7*-0x18b+0x233e]??null;return _0x3fb951[_0x5ab548(0x1eb)](_0x5ab548(0x245))[-0x2d*0xbf+0x2*-0x83+0x2299]?.[_0x5ab548(0x1eb)]('\x20')[-0x1*-0x96d+0x1*0x2668+-0x4f*0x9b]??null;}export async function readCurrentChangesSummary(_0x2aa641){const _0x205e84=_0x67518d,_0x2a92a4=await runReadOnlyGit(_0x2aa641,[_0x205e84(0x220),_0x205e84(0x2a8),'-z',_0x205e84(0x26b),_0x205e84(0x248)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x2abd80=_0x2a92a4[_0x205e84(0x247)][_0x205e84(0x1eb)]('\x00'),_0x1ad2e7=_0x2abd80[_0x205e84(0x23c)]()??'',_0x2859c5=[];for(let _0xb96f22=0x30b*-0x3+-0x161e+-0x1f3f*-0x1;_0xb96f22<_0x2abd80[_0x205e84(0x1c6)];_0xb96f22+=-0x1947*-0x1+0x1*0x1982+-0x32c8){const _0x20391b=_0x2abd80[_0xb96f22];if(_0x20391b[_0x205e84(0x1c6)]<0x1dc5+0x1327+-0x30e8)continue;const _0x31ae38=_0x20391b[-0x1070+0x2c*0x3d+-0x7f*-0xc],_0x3993b0=_0x20391b[0x1e7d*0x1+-0x22d*-0x7+-0x2db7],_0x1759d3=_0x20391b[_0x205e84(0x23f)](-0x3d*-0x14+-0x7*-0x2fb+-0x199e);if(_0x31ae38==='?'&&_0x3993b0==='?'){_0x2859c5[_0x205e84(0x1f6)]({'path':_0x1759d3,'state':_0x205e84(0x29b),'change':_0x205e84(0x297)});continue;}_0x31ae38!=='\x20'&&_0x2859c5[_0x205e84(0x1f6)]({'path':_0x1759d3,'state':_0x205e84(0x20e),'change':gitChange(_0x31ae38)});_0x3993b0!=='\x20'&&_0x2859c5[_0x205e84(0x1f6)]({'path':_0x1759d3,'state':_0x205e84(0x26c),'change':gitChange(_0x3993b0)});if(_0x31ae38==='R'||_0x31ae38==='C'||_0x3993b0==='R'||_0x3993b0==='C')_0xb96f22+=-0x26a6+0x78e+0x1f19*0x1;}return{'branch':_0x1ad2e7[_0x205e84(0x1b9)](_0x205e84(0x2a0))?currentBranchFromStatusHeader(_0x1ad2e7):null,'changes':_0x2859c5};}export async function listInitializedSubmodulePaths(_0x24f712){const _0x441019=_0x67518d,_0x4de737=await runReadOnlyGit(_0x24f712,[_0x441019(0x1d0),_0x441019(0x220),_0x441019(0x219)],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x4de737[_0x441019(0x247)][_0x441019(0x1eb)](/\r?\n/)[_0x441019(0x2b0)](_0x3dbf67=>{const _0xcdb049=_0x441019;if(_0x3dbf67[_0xcdb049(0x1c6)]<-0x3a*0x85+-0x1a48*0x1+0x354*0x11)return[];const _0x46c8f1=_0x3dbf67[0x114+-0x43*-0x43+-0x129d];if(_0x46c8f1==='-')return[];const _0x1b898c=/^.[0-9a-f]+\s+(.+?)(?:\s+\([^)]*\))?$/[_0xcdb049(0x22e)](_0x3dbf67),_0x474f07=_0x1b898c?.[0xd*0xf8+0x1540+-0x21d7]?.[_0xcdb049(0x254)]('\x5c','/');return _0x474f07===undefined||_0x474f07[_0xcdb049(0x1c6)]===0x3b*-0x9f+-0x22af+0x4754*0x1?[]:[_0x474f07];})[_0x441019(0x2c8)]((_0x3e70ba,_0x4a371b)=>_0x3e70ba[_0x441019(0x1f9)](_0x4a371b));}export async function resolveGitRepository(_0x4e5e23,_0x18d397,_0x3dce04){const _0x259fd1=_0x67518d,_0x55e69e=await realpath(_0x4e5e23);if(_0x18d397[_0x259fd1(0x1c6)]===0x1*0x1e19+-0x236c+0x553)return _0x55e69e;if(_0x18d397[_0x259fd1(0x1ef)]('\x00')||_0x18d397[_0x259fd1(0x1b9)]('/')||_0x18d397[_0x259fd1(0x1b9)]('\x5c')||_0x18d397[_0x259fd1(0x1eb)]('/')[_0x259fd1(0x252)](_0x1039e0=>_0x1039e0[_0x259fd1(0x1c6)]===-0x2*0x7ce+-0x4*0x243+0x18a8||_0x1039e0==='.'||_0x1039e0==='..'))throw new Error(_0x259fd1(0x218));try{const _0x3fe054=resolve(_0x55e69e,_0x18d397),_0x32541c=await realpath(_0x3fe054);if(normalizeWorkspacePath(_0x3fe054)!==normalizeWorkspacePath(_0x32541c)||!isWithinAllowedRoot(_0x32541c,[_0x55e69e]))throw new Error(_0x259fd1(0x2b6));if(_0x3dce04!==undefined){if(!_0x3dce04[_0x259fd1(0x1ef)](_0x18d397))throw new Error(_0x259fd1(0x2b6));return _0x32541c;}return await assertGitSuperprojectChain(_0x55e69e,_0x32541c),_0x32541c;}catch{throw new Error(_0x259fd1(0x218));}}async function assertGitSuperprojectChain(_0x649d3a,_0x49cc22){const _0xcbc349=_0x67518d,_0x5267a2=normalizeWorkspacePath(_0x649d3a);let _0x1ae0f5=_0x49cc22;const _0x274645=new Set();for(let _0x95888c=-0x20e8+-0x165a*0x1+0x3742;_0x95888c<-0xd92+-0xbf1*0x3+0x31a5;_0x95888c+=0x20e+0xe7c+0x33*-0x53){const _0x59b2a8=normalizeWorkspacePath(_0x1ae0f5);if(_0x59b2a8===_0x5267a2)return;if(_0x274645[_0xcbc349(0x205)](_0x59b2a8))throw new Error(_0xcbc349(0x2b6));_0x274645[_0xcbc349(0x261)](_0x59b2a8);const _0x5d5bf3=await runReadOnlyGit(_0x1ae0f5,[_0xcbc349(0x240),_0xcbc349(0x279),_0xcbc349(0x1da)]),[_0x293760,_0x10e9d9]=_0x5d5bf3[_0xcbc349(0x247)][_0xcbc349(0x1eb)](/\r?\n/);if(_0x293760===undefined||_0x10e9d9===undefined||_0x10e9d9[_0xcbc349(0x1c6)]===0x119*0xa+0x1c09*0x1+0x2703*-0x1)throw new Error(_0xcbc349(0x2b6));const _0x560888=await realpath(_0x293760),_0x480729=await realpath(_0x10e9d9);if(normalizeWorkspacePath(_0x560888)!==_0x59b2a8||normalizeWorkspacePath(_0x480729)===_0x59b2a8||!isWithinAllowedRoot(_0x480729,[_0x649d3a])||!isWithinAllowedRoot(_0x1ae0f5,[_0x480729]))throw new Error(_0xcbc349(0x2b6));_0x1ae0f5=_0x480729;}throw new Error(_0xcbc349(0x2b6));}export async function listGitHistoryRefs(_0x5768db){const _0x2c749f=_0x67518d,_0x41231b=await runReadOnlyGit(_0x5768db,[_0x2c749f(0x299),_0x2c749f(0x289),_0x2c749f(0x29c),_0x2c749f(0x222)],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT});return _0x41231b[_0x2c749f(0x247)][_0x2c749f(0x1eb)](/\r?\n/)[_0x2c749f(0x2b0)](_0x3c0c0f=>{const _0xd733eb=_0x2c749f,[_0x3389f6,_0x48aad8,_0x3d8a28,_0x129f9d,_0x5386d2]=_0x3c0c0f[_0xd733eb(0x1eb)]('\x09');if(_0x3389f6===undefined||_0x48aad8===undefined||_0x3d8a28===undefined||_0x5386d2===undefined||_0x5386d2[_0xd733eb(0x1c6)]>-0x8*-0x3f2+0x252+0x2*-0x10f1||!/^[0-9a-f]{40,64}$/[_0xd733eb(0x27d)](_0x3d8a28))return[];const _0x3ef399=_0x3389f6[_0xd733eb(0x1b9)](_0xd733eb(0x258))?_0xd733eb(0x204):_0x3389f6[_0xd733eb(0x1b9)](_0xd733eb(0x2ad))?_0xd733eb(0x24b):undefined;return _0x3ef399===undefined?[]:[{'name':_0x3389f6,'displayName':_0x48aad8,'kind':_0x3ef399,'hash':_0x3d8a28,'current':_0x129f9d==='*'}];})[_0x2c749f(0x2c8)]((_0x59e8a1,_0x412b1a)=>_0x59e8a1[_0x2c749f(0x1f8)][_0x2c749f(0x1f9)](_0x412b1a[_0x2c749f(0x1f8)])||_0x59e8a1[_0x2c749f(0x281)][_0x2c749f(0x1f9)](_0x412b1a[_0x2c749f(0x281)]));}function selectedHistoryRefs(_0xa0b927,_0x3f1e1b){const _0x377dbf=_0x67518d;if(_0x3f1e1b===undefined||_0x3f1e1b[_0x377dbf(0x1c6)]===-0x1*0x1199+-0x25a0+0x1*0x3739)return _0xa0b927;const _0xfff8a4=[...new Set(_0x3f1e1b)],_0x37b18a=_0xfff8a4[_0x377dbf(0x275)](_0xee1e93=>_0xa0b927[_0x377dbf(0x1ea)](_0x47e4cc=>_0x47e4cc[_0x377dbf(0x209)]===_0xee1e93));if(_0x37b18a[_0x377dbf(0x252)](_0x4adaf9=>_0x4adaf9===undefined))throw new Error(_0x377dbf(0x1d5));return _0x37b18a;}function historyCursor(_0xc20a4c,_0x182600){const _0x2d3026=_0x67518d;return Buffer[_0x2d3026(0x29a)](JSON[_0x2d3026(0x1a9)]({'offset':_0xc20a4c,'fingerprint':_0x182600}))[_0x2d3026(0x1dd)](_0x2d3026(0x288));}function parseHistoryCursor(_0xf99dc3,_0x39051f){const _0x250379=_0x67518d;if(_0xf99dc3===undefined)return-0x1872+0x7f7*-0x2+0x2860;try{const _0x51f751=JSON[_0x250379(0x283)](Buffer[_0x250379(0x29a)](_0xf99dc3,_0x250379(0x288))[_0x250379(0x1dd)](_0x250379(0x2be)));if(!Number[_0x250379(0x259)](_0x51f751[_0x250379(0x1f2)])||_0x51f751[_0x250379(0x1f2)]<-0xccf+-0x1d6b+0x2a3a||_0x51f751[_0x250379(0x2b2)]!==_0x39051f)throw new Error(_0x250379(0x2b6));return _0x51f751[_0x250379(0x1f2)];}catch{throw new Error(_0x250379(0x1c4));}}export async function readGitHistory(_0x2e217e,_0x503de7){const _0x509e6a=_0x67518d,_0x4248f9=await listGitHistoryRefs(_0x2e217e),_0x741b0e=selectedHistoryRefs(_0x4248f9,_0x503de7[_0x509e6a(0x239)]);if(_0x741b0e[_0x509e6a(0x1c6)]===-0x1*-0x1b9b+-0x1*0x17ef+-0x3ac)return{'commits':[],'nextCursor':null};const _0x4154c3=_0x503de7[_0x509e6a(0x1b7)]??-0x891+-0x177+0xa3a;if(!Number[_0x509e6a(0x259)](_0x4154c3)||_0x4154c3<-0x85+0x1ea2+-0x29*0xbc||_0x4154c3>0x1691*-0x1+-0x153*-0x5+0x1056)throw new Error(_0x509e6a(0x1dc));const _0xfbb0e9=_0x741b0e[_0x509e6a(0x275)](_0x5b1c41=>_0x5b1c41[_0x509e6a(0x209)])[_0x509e6a(0x2c8)](),_0x340274=_0x503de7[_0x509e6a(0x239)]===undefined||_0x503de7[_0x509e6a(0x239)][_0x509e6a(0x1c6)]===-0x1488+-0xd4d+0x21d5||_0x741b0e[_0x509e6a(0x1c6)]===_0x4248f9[_0x509e6a(0x1c6)]&&_0x741b0e[_0x509e6a(0x293)](_0x441fcd=>_0x4248f9[_0x509e6a(0x252)](_0x2def2f=>_0x2def2f[_0x509e6a(0x209)]===_0x441fcd[_0x509e6a(0x209)])),_0x501ef6=_0x340274?[_0x509e6a(0x2bc),_0x509e6a(0x210)]:_0xfbb0e9,_0x2be41e=createHash(_0x509e6a(0x2a9))[_0x509e6a(0x200)](_0x741b0e[_0x509e6a(0x275)](_0x2469cb=>_0x2469cb[_0x509e6a(0x209)]+'\x00'+_0x2469cb[_0x509e6a(0x1c2)])[_0x509e6a(0x2c8)]()[_0x509e6a(0x223)]('\x00'))[_0x509e6a(0x214)](_0x509e6a(0x26f)),_0x150331=parseHistoryCursor(_0x503de7[_0x509e6a(0x2c3)],_0x2be41e),_0x37967f=await runReadOnlyGit(_0x2e217e,[_0x509e6a(0x225),_0x509e6a(0x2ba),_0x509e6a(0x2ae),_0x509e6a(0x1bb)+_0x150331,_0x509e6a(0x1e0)+(_0x4154c3+(-0x19a0+0x29f+-0x1f*-0xbe)),'-z',_0x509e6a(0x2c1),..._0x501ef6,'--'],{'timeoutMs':GIT_HISTORY_TIMEOUT_MS}),_0x92751=new Map();for(const _0x19cc42 of _0x4248f9){const _0x1400ee=_0x92751[_0x509e6a(0x244)](_0x19cc42[_0x509e6a(0x1c2)])??[];_0x1400ee[_0x509e6a(0x1f6)](_0x19cc42[_0x509e6a(0x281)]),_0x92751[_0x509e6a(0x1b0)](_0x19cc42[_0x509e6a(0x1c2)],_0x1400ee);}const _0x452de7=_0x37967f[_0x509e6a(0x247)][_0x509e6a(0x1eb)]('\x00'),_0x5d6de6=[];for(let _0x1426a9=0x499*-0x7+-0x837*0x3+0x38d4;_0x1426a9+(-0x2*-0x73a+-0x1*-0x1312+-0x2181)<_0x452de7[_0x509e6a(0x1c6)];_0x1426a9+=0x4*0x8ea+-0x2681+0xf*0x31){const [_0x3b9f0a,_0x47e154='',_0x44e730='',_0x1bee6f='',_0xde271a='0',_0x2a53c1='']=_0x452de7[_0x509e6a(0x23f)](_0x1426a9,_0x1426a9+(0x2*-0x3e1+0x1810+-0x1048));if(_0x3b9f0a===undefined||!/^[0-9a-f]{40,64}$/[_0x509e6a(0x27d)](_0x3b9f0a))continue;_0x5d6de6[_0x509e6a(0x1f6)]({'hash':_0x3b9f0a,'parents':_0x47e154[_0x509e6a(0x1c6)]===-0x26b6+-0x19f8+0x22*0x1e7?[]:_0x47e154[_0x509e6a(0x1eb)]('\x20'),'authorName':_0x44e730,'authorEmail':_0x1bee6f,'committedAt':Number(_0xde271a)*(-0x25+0x1545+-0x1138),'subject':_0x2a53c1,'refs':_0x92751[_0x509e6a(0x244)](_0x3b9f0a)??[]});}const _0x5a3159=_0x5d6de6[_0x509e6a(0x1c6)]>_0x4154c3;return{'commits':_0x5d6de6[_0x509e6a(0x23f)](-0x1c9*0x7+0x3*0xb67+-0x15b6,_0x4154c3),'nextCursor':_0x5a3159?historyCursor(_0x150331+_0x4154c3,_0x2be41e):null};}async function assertHistoryCommitReachable(_0x206caf,_0x60b35c,_0x531174){const _0x662538=_0x67518d;if(!/^[0-9a-f]{40,64}$/[_0x662538(0x27d)](_0x60b35c))throw new Error(_0x662538(0x1e1));const _0x10c2d2=selectedHistoryRefs(await listGitHistoryRefs(_0x206caf),_0x531174);for(const _0x3cbd8f of _0x10c2d2){const _0x4b69b1=await runReadOnlyGitAllowFailure(_0x206caf,[_0x662538(0x270),_0x662538(0x21d),_0x60b35c,_0x3cbd8f[_0x662538(0x209)]]);if(_0x4b69b1[_0x662538(0x1e3)]===0x24ca+0x359+0x1*-0x2823)return;}throw new Error(_0x662538(0x1e1));}export async function readGitHistoryFiles(_0x18a4df,_0xe5d54a,_0x1765c3){const _0x22be58=_0x67518d;await assertHistoryCommitReachable(_0x18a4df,_0xe5d54a,_0x1765c3);const _0x548a20=await runReadOnlyGit(_0x18a4df,[_0x22be58(0x1ba),_0x22be58(0x1ee),_0x22be58(0x217),_0x22be58(0x255),'-r','-z','-M','-C',_0x22be58(0x243),_0xe5d54a],{'timeoutMs':GIT_STATUS_TIMEOUT_MS,'outputLimit':GIT_LARGE_OUTPUT_LIMIT}),_0x5035aa=_0x548a20[_0x22be58(0x247)][_0x22be58(0x1eb)]('\x00'),_0x282ec5=[];for(let _0x1abcb9=-0x291*0x9+-0x111d*-0x2+-0xb21*0x1;_0x1abcb9<_0x5035aa[_0x22be58(0x1c6)];_0x1abcb9+=-0x1*0x18ad+0x2d+0x11*0x171){const _0x309a67=_0x5035aa[_0x1abcb9];if(_0x309a67===undefined||_0x309a67[_0x22be58(0x1c6)]===-0xedb*0x2+0x1c1b*-0x1+0x39d1)continue;const _0x3a847e=_0x309a67[-0x1*-0x1d1d+0x6*-0x1e1+0x1*-0x11d7]??'M';if(_0x3a847e==='R'||_0x3a847e==='C'){const _0x26411c=_0x5035aa[_0x1abcb9+(-0x1*0x1897+0x2*0x90f+0x33d*0x2)],_0x4aba5a=_0x5035aa[_0x1abcb9+(0xf*-0x1+0x2701+-0x26f0)];if(_0x26411c!==undefined&&_0x4aba5a!==undefined)_0x282ec5[_0x22be58(0x1f6)]({'path':_0x4aba5a,'previousPath':_0x26411c,'change':gitChange(_0x3a847e)});_0x1abcb9+=0x13f6+0x10*-0xb4+-0x8b4;}else{const _0x57376f=_0x5035aa[_0x1abcb9+(0x1483+0x149*0x1c+-0x387e)];if(_0x57376f!==undefined)_0x282ec5[_0x22be58(0x1f6)]({'path':_0x57376f,'change':gitChange(_0x3a847e)});_0x1abcb9+=0x157*-0x4+-0x12e7+0x1844;}}return _0x282ec5;}export async function readGitHistoryFileDiff(_0x1a96fb,_0x2e289c,_0x2ebf56,_0x54dc6c,_0x2c6ab6){const _0x13cfd6=_0x67518d;await assertHistoryCommitReachable(_0x1a96fb,_0x2e289c,_0x54dc6c);const _0x30ef1a=safeGitWorkspacePath(_0x2ebf56),_0x342522=_0x2c6ab6===undefined?undefined:safeGitWorkspacePath(_0x2c6ab6),_0x6d9967=await runReadOnlyGit(_0x1a96fb,[_0x13cfd6(0x25b),_0x13cfd6(0x21f),_0x13cfd6(0x217),_0x13cfd6(0x1c8),_0x13cfd6(0x20d),_0x2e289c,'--',_0x13cfd6(0x262)+_0x30ef1a,..._0x342522===undefined||_0x342522===_0x30ef1a?[]:[_0x13cfd6(0x262)+_0x342522]]),_0x3c880d=_0x6d9967[_0x13cfd6(0x2a4)][_0x13cfd6(0x1ef)](0x1838+0x13*-0x3+-0x17ff)||_0x6d9967[_0x13cfd6(0x247)][_0x13cfd6(0x1ef)](_0x13cfd6(0x226));if(_0x3c880d)return{'binary':!![],'summary':_0x13cfd6(0x1e4)+createHash(_0x13cfd6(0x2a9))[_0x13cfd6(0x200)](_0x6d9967[_0x13cfd6(0x2a4)])[_0x13cfd6(0x214)](_0x13cfd6(0x26f))+_0x13cfd6(0x282)+_0x6d9967[_0x13cfd6(0x2a4)][_0x13cfd6(0x1c6)],'truncated':_0x6d9967[_0x13cfd6(0x23e)]};return{'binary':![],'text':_0x6d9967[_0x13cfd6(0x247)],'truncated':_0x6d9967[_0x13cfd6(0x23e)]};}export async function readGitHistoryFileContentRange(_0x17440e,_0x511951,_0x579a2a,_0x487d47,_0x3d61d5,_0x40320b){const _0x521e53=_0x67518d;if(!Number[_0x521e53(0x24c)](_0x487d47)||_0x487d47<-0x11b*-0x1f+0x20ea+-0x75*0x93||!Number[_0x521e53(0x24c)](_0x3d61d5)||_0x3d61d5<0x1b6e+-0x186f+-0x2fe||_0x3d61d5>(-0x1142*0x1+-0xc3*-0x2d+-0x10f1)*(0x3*-0xada+0x14*0x116+0x3*0x4f2)*(-0x1ae8+0x19b5+0x533)||_0x487d47+_0x3d61d5>(0xe57+0x1afd+-0x2940)*(-0x170c+-0x74a+0x2256)*(-0x1*-0xd91+-0x1fbd*0x1+0x2*0xb16))throw new Error(_0x521e53(0x1a4));await assertHistoryCommitReachable(_0x17440e,_0x511951,_0x40320b);const _0xb65682=safeGitWorkspacePath(_0x579a2a),_0x553234=_0x511951+':'+_0xb65682,_0x1d32a3=await runReadOnlyGit(_0x17440e,[_0x521e53(0x206),'-s',_0x553234]),_0x149243=Number(_0x1d32a3[_0x521e53(0x247)][_0x521e53(0x25d)]());if(!Number[_0x521e53(0x24c)](_0x149243)||_0x149243<0xc90*-0x1+-0x1b9c+0x6b2*0x6||_0x487d47>_0x149243)throw new Error(_0x521e53(0x1a4));if(_0x487d47===_0x149243)return{'path':_0xb65682,'size':_0x149243,'offset':_0x487d47,'contentBase64':'','nextOffset':null};const _0x29bbaa=await runReadOnlyGitAllowFailure(_0x17440e,[_0x521e53(0x206),_0x521e53(0x2a1),_0x553234],{'outputLimit':_0x487d47+_0x3d61d5,'timeoutMs':GIT_HISTORY_TIMEOUT_MS});if(_0x29bbaa[_0x521e53(0x1e3)]!==-0x2*0x1072+0xfb6+0x112e)throw new GitCommandError(_0x29bbaa[_0x521e53(0x1e3)],_0x29bbaa[_0x521e53(0x1d7)]);const _0x4c2634=_0x29bbaa[_0x521e53(0x2a4)][_0x521e53(0x227)](_0x487d47,Math[_0x521e53(0x1d6)](_0x149243,_0x487d47+_0x3d61d5)),_0x2be114=_0x487d47+_0x4c2634[_0x521e53(0x1c6)];return{'path':_0xb65682,'size':_0x149243,'offset':_0x487d47,'contentBase64':_0x4c2634[_0x521e53(0x1dd)](_0x521e53(0x287)),'nextOffset':_0x2be114<_0x149243?_0x2be114:null};}export async function readCurrentChanges(_0x1fe211){const _0x1f1fec=_0x67518d;return(await readCurrentChangesSummary(_0x1fe211))[_0x1f1fec(0x1d4)];}export async function readCurrentChangeDiff(_0x1f0022,_0x4c9a57){const _0x124335=_0x67518d,_0x10f0d4=safeGitWorkspacePath(_0x4c9a57);await assertCurrentChangePathAccessible(_0x1f0022,_0x10f0d4);const _0x40b14f=await readCurrentChangeGitDiff(_0x1f0022,_0x10f0d4),_0x1cea65=await readWorkingTreeText(_0x1f0022,_0x10f0d4),_0x44f935=_0x40b14f[_0x124335(0x2a4)][_0x124335(0x1ef)](-0x103f+0x2263+-0x1224)||_0x40b14f[_0x124335(0x247)][_0x124335(0x1ef)](_0x124335(0x226))||_0x1cea65?.[_0x124335(0x265)]===!![];if(_0x44f935)return{'binary':!![],'summary':_0x124335(0x1e4)+createHash(_0x124335(0x2a9))[_0x124335(0x200)](_0x40b14f[_0x124335(0x2a4)])[_0x124335(0x214)](_0x124335(0x26f))+_0x124335(0x282)+_0x40b14f[_0x124335(0x2a4)][_0x124335(0x1c6)],'truncated':_0x40b14f[_0x124335(0x23e)]||_0x1cea65?.[_0x124335(0x23e)]===!![]};return{'binary':![],'text':_0x40b14f[_0x124335(0x247)],'truncated':_0x40b14f[_0x124335(0x23e)]||_0x1cea65?.[_0x124335(0x23e)]===!![],'afterText':_0x1cea65?.[_0x124335(0x247)]??'',..._0x1cea65===undefined?{}:{'afterTruncated':_0x1cea65[_0x124335(0x23e)]}};}async function readCurrentChangeGitDiff(_0xc2cae4,_0x46a47c){const _0x2d4950=_0x67518d,_0x41978b=await runReadOnlyGit(_0xc2cae4,[_0x2d4950(0x1d9),_0x2d4950(0x2ac),_0x2d4950(0x1cc),'-z','--',_0x2d4950(0x262)+_0x46a47c]);if(_0x41978b[_0x2d4950(0x247)][_0x2d4950(0x1eb)]('\x00')[_0x2d4950(0x1ef)](_0x46a47c)){const _0x12f8e4=await runReadOnlyGitAllowFailure(_0xc2cae4,[_0x2d4950(0x20c),_0x2d4950(0x296),_0x2d4950(0x1c8),_0x2d4950(0x20d),'--',_0x2d4950(0x1c7),_0x46a47c]);if(_0x12f8e4[_0x2d4950(0x1e3)]!==0x1657+-0x49*0x62+0x59b&&_0x12f8e4[_0x2d4950(0x1e3)]!==0x22d5+-0x21fc+-0xd8)throw new GitCommandError(_0x12f8e4[_0x2d4950(0x1e3)],_0x12f8e4[_0x2d4950(0x1d7)]);return _0x12f8e4;}return runReadOnlyGit(_0xc2cae4,[_0x2d4950(0x20c),_0x2d4950(0x1c8),_0x2d4950(0x20d),_0x2d4950(0x1c1),'--',_0x2d4950(0x262)+_0x46a47c]);}export async function isWorkspaceChangeVisible(_0x487893,_0x3676fd){const _0x11a7fa=_0x67518d;try{return await assertCurrentChangePathAccessible(_0x487893,safeGitWorkspacePath(_0x3676fd)),!![];}catch(_0x5e49d9){if(_0x5e49d9 instanceof Error&&(_0x5e49d9[_0x11a7fa(0x26a)]===_0x11a7fa(0x1cb)||_0x5e49d9[_0x11a7fa(0x26a)]===_0x11a7fa(0x29d)||_0x5e49d9[_0x11a7fa(0x26a)]===_0x11a7fa(0x1aa)))return![];throw _0x5e49d9;}}async function assertCurrentChangePathAccessible(_0x3e3b64,_0x13fe90){const _0x3500dc=_0x67518d,_0x209817=await realpath(_0x3e3b64),_0x26fb07=resolve(_0x209817,_0x13fe90),_0x52253a=await lstat(_0x26fb07)[_0x3500dc(0x221)](_0x1f114f=>{const _0x5c2cec=_0x3500dc;if(_0x1f114f[_0x5c2cec(0x1e3)]===_0x5c2cec(0x260))return undefined;throw _0x1f114f;});if(_0x52253a===undefined)return;await resolveWorkspaceEntry(_0x209817,_0x13fe90,![]);}async function readWorkingTreeText(_0x5564fe,_0x221146){const _0x12739f=_0x67518d,_0x194455=await realpath(_0x5564fe);let _0x2baab3;try{_0x2baab3=await resolveWorkspaceEntry(_0x194455,_0x221146,![]);}catch(_0x3b78e0){if(_0x3b78e0 instanceof Error&&_0x3b78e0[_0x12739f(0x26a)]===_0x12739f(0x29d))return undefined;throw _0x3b78e0;}const _0x27513a=await lstat(_0x2baab3);if(!_0x27513a[_0x12739f(0x1bf)]())return undefined;const _0x4d6b4f=await readFile(_0x2baab3);return diffTextFromBuffer(_0x4d6b4f,_0x4d6b4f[_0x12739f(0x1c6)]>GIT_OUTPUT_LIMIT);}function diffTextFromBuffer(_0x36445e,_0x14eb25){const _0x263870=_0x67518d;if(_0x36445e[_0x263870(0x1ef)](0x2392+-0x2706+0x374)||!isValidUtf8(_0x36445e))return{'binary':!![],'truncated':_0x14eb25};let _0x3bf7b7=Math[_0x263870(0x1d6)](_0x36445e[_0x263870(0x1c6)],GIT_OUTPUT_LIMIT);while(_0x3bf7b7>0x3*-0x89b+0x708+0x2af*0x7&&_0x3bf7b7<_0x36445e[_0x263870(0x1c6)]&&isUtf8ContinuationByte(_0x36445e[_0x3bf7b7]))_0x3bf7b7-=-0x1dd2+0x662+0x1771;return{'binary':![],'text':_0x36445e[_0x263870(0x227)](-0xadc+-0x1*-0x5e9+0x4f3,_0x3bf7b7)[_0x263870(0x1dd)](_0x263870(0x2be)),'truncated':_0x14eb25};}function _0x537c(){const _0x359b6c=['lM1HCI1LzgL0lq','A2LSBa','Agv4','BwvYz2uTyMfZzq','BgfZDeLUzgv4t2y','uKvoqu1fra','rKLmrv9ut09Ftefsr0u','v09ss1nqqunfx0rjuKvdve9swv9oqu1fx0LovKfmsuq','BwfW','kIOVlM51EhqVkIO','C2LUA0rVD24','C2vHCMnO','ls1ZAg93lxrVCgXLDMvS','kIOVlNzLBNyVkIO','BM93','r0Lux0nptu1btKrFrKfjteve','DgvZDa','rKLmrv9st09ux01vvefusu9ox0LovKfmsuq','v09ss1nqqunfx1bmqvrgt1jnx1vou1vque9sveve','zMLUzeLUzgv4','zgLZCgXHEu5HBwu','igj5DgvZpq','CgfYC2u','Dg9mB2nHBgvmB3DLCKnHC2u','BM9YBwfSAxPL','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','yMfZzty0','yMfZzty0DxjS','ls1MB3jTyxq9jsHYzwzUyw1LksuWosuOCMvMBMfTztPZAg9YDcKLmdKLkg9IAMvJDg5HBwuPjta5jsHirufeksuWosuOC3LTCMvMkq','CMvMCMvZAeLUqMfJA2DYB3vUza','Dw5Yzwy','kIOVBM9Kzv9TB2r1BgvZlYOQ','kIOVzgLZDc8QkG','q09qsuve','v09ss1nqqunfx0rfvKLdrv9qqvrix1jfsKvdveve','Dg9vChbLCKnHC2u','Bwf4','Aw5KzxHpzG','zxzLCNK','rKLmrv9ot1rFvevyva','pZ8G','ls1UBY1PBMrLEa','qureruq','reLsrunut1jz','zM9YlwvHy2GTCMvM','zNjVBq','vu5uuKfds0ve','CMvMCY9OzwfKCW','rKLmrv9ot1rFrK9vtKq','kIOVDgvZDc9YDw5ZlYOQ','zgvZDgLUyxrPB24','iYmG','yMXVyG','y29UDgvUDenHBMrPzgf0zxm','kIOVlMnHy2HLlYOQ','B3v0Chv0','BgLTAxrZ','lMDPDa','BgLUDxG','ls1WB3jJzwXHAw49DJe','C2HHmJu2','CMvSyxrPDMu','kIOVlNLHCM4VkIO','ls1VDgHLCNm','CMvMCY9Yzw1VDgvZlW','ls1KyxrLlw9YzgvY','ls13B3jRDhjLzq','zMXHDe1HCa','kIOVyMLUlYOQ','zMLUz2vYChjPBNq','kIOVlNn2zwX0zs1RAxqVkIO','kIOVDMvUzg9YlYOQ','Bwv0ywrHDge','Aw52ywXPza','nJaXndKYzfzVyxDu','v09ss1nqqunfx0rjuKvdve9swv9ot1rFquXmt1Dfra','y29Uy2f0','ls10B3bVlw9YzgvY','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','ls1ICMfUy2HLCW','tu9esuzjruq','DxrMoa','zxjYB3i','D29YA3nWywnLuM9VDa','ls1MB3jTyxq9juGLEdaWjvaLEdaWjwfUjxGWmcvHzsv4mdaLy3qLEdaWjxm','kIOVx19WEwnHy2HLx18VkIO','y3vYC29Y','Dg91y2G','CMvIDwLSza','D2LUmZi','yNL0zuXLBMD0Aa','C29YDa','rKLmrv9squ5hrv9jtLzbteLe','v09ss1nqqunfx1bbveHFsu5wquXjra','revmrvrfra','Dg9mB3DLCKnHC2u','DMfSDwvZ','C3rYAw5NAwz5','rKLmrv9ot1rFuKvhvuXbuG','B25Jzq','rKLmrq','rKLmrv9nt1zfx0rfu0nftKrbtLrFsu5wquXjra','C3rKB3v0','y2fWywnPDhK','C2v0','kIOVy292zxjHz2uVkIO','ls1NAxqTy29TBw9UlwrPCG','rKLmrv9xuKLurv9dt05gteLdva','su5wquXjrf9oqu1f','lNbHCNq','mti1ntyWEejWBxzN','BgLTAxq','q1jfqvrfx0rjuKvdve9swq','C3rHCNrZv2L0Aa','zgLMzI10CMvL','ls1ZA2LWpq','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','zw50CMLLCW','sevbrca','AxngAwXL','zgLZCg9Zzq','sevbra','AgfZAa','kIOVlNbUCg0VkIO','r0Lux0Hju1rpuLLFq1vsu09sx0LovKfmsuq','mtK2otyWodznrNLNv1O','BgvUz3rO','l2rLDI9UDwXS','ls1UBY1LEhqTzgLMzG','kIOVB3v0lYOQ','ywn0Aw9U','rKLmrv9qqvrix0vtq0fqrq','ls1LEgnSDwrLlxn0yw5KyxjK','AxneAxjLy3rVCNK','v09ss1nqqunfx1bbveHFtK9ux0fcu09mvvrf','zMLSzxmUzxHJBhvKzq','C3vIBw9KDwXL','rKLmrv9btfjfqurzx0vysvnuuW','CMvWBgfJzq','kIOVlMfUz3vSyxiVkIO','y2HHBMDLCW','r0Lux0Hju1rpuLLFuKvgx0LovKfmsuq','BwLU','C3rKzxjY','CMvMCMvZAgvKqxq','BhmTzMLSzxm','ls1ZAg93lxn1CgvYChjVAMvJDc13B3jRAw5NlxrYzwu','kIOVlMDYywrSzs8QkG','r0Lux0Hju1rpuLLFteLnsvrFsu5wquXjra','Dg9tDhjPBMC','C2vHCMnOlMv4y2X1zgu','kIOVlM5LEhqVkIO','ls1TyxGTy291BNq9','r0Lux0Hju1rpuLLFq09ntuLux0LovKfmsuq','BxrPBwvnCW','y29Kzq','yMLUyxj5igrPzMyGC2HHmJu2pq','kIOVDMvUDI8QkG','q1jfqvrfx0zjteu','zgf0yq','AwDUB3jL','v09ss1nqqunfx05pvf9bteXpv0ve','zMLUza','C3bSAxq','B2jQzwn0','ls1ZDgfNzwq','ls1YB290','Aw5JBhvKzxm','AxntEw1IB2XPy0XPBMS','rvHju1rtx0rjuKvdve9swq','B2zMC2v0','mZyWmduZnfHAsxvJua','C3rYAw5N','AwrSzvr0Be1Z','ChvZAa','zw50CNK','A2LUza','Bg9JywXLq29TCgfYzq','rKLmrv9ot1rFreLsrunut1jz','r0Lux1jfrL9jtLzbteLe','CMvZDg9Yzq','uKvbrfK','Bg9HzgLUzW','CMvHza','DxbKyxrL','mJe4nMHmuLzzrq','CgLWzq','DxrMltG','te9dquW','AgfZ','y2f0lwzPBgu','zw5ZDxjLtg9HzgvK','kIOVDgfYz2v0lYOQ','BMfTzq','C29YDgvK','zMLSDgvY','zgLMzG','ls1UBY10zxH0y29UDG','u1rbr0ve','mtC4mZyWAK9fz0f5','ls1Yzw1VDgvZ','kIOVlNbHCMnLBc1JywnOzs8QkG','Bw9Kzq','ywXSB2nvBNnHzMu','zgLNzxn0','r0Lux1DpuKTtuefdrq','kIOVlMDPDc8QkG','ls1MAxjZDc1WyxjLBNq','r0Lux1jfue9tsvrpuLLFsu5wquXjra','ls1Yzwn1CNnPDMu','Cgf0Aa','DgLTzw91De1Z','C2L6zq','ls1PCY1HBMnLC3rVCG','z2L0','ls1MB3jTyxq9','C3rHDhvZ','y2f0y2G','CMvMCY9Yzw1VDgvZ','AM9PBG','zMLUywXSEq','Bg9N','qMLUyxj5igzPBgvZia','C3vIyxjYyxK','kIOVB2jQlYOQ','CMvMCMvZAef0DgvTChrLzef0','ls1XDwLLDa','B3v0Chv0tgLTAxq','lNzZy29Kzs9Zzxr0Aw5NCY5QC29U','C3LTyM9SAwmTCMvM','zxHLyW','C3rHBgu','zgvJB2rL','C2nVCMu','y2XVC2u','mJrXtxrVCwe','lMDPDc8','ls12zxjPzNK','kIOVyM93zxjFy29TCg9Uzw50CY8QkG','u0Lhs0Lmta','zxHWAxj5vgLTzxi','CMvMCW','CMvHze9UBhK','kIOVyNvPBgqVkIO','C2HPzNq','rKLmrv9srvzju0LptL9jtLzbteLe','Dhj1BMnHDgvK','C2XPy2u','CMv2lxbHCNnL','CM9VDa','zNjLC2HUzxnZvhrStxm','ls1Uyw1Llxn0yxr1CW','z2v0','lI4U','odaYmZyWBfHgteHg','Dgv4Da','ls11BNrYywnRzwqTzMLSzxm9ywXS','ruvysvnu','DgHLBG','uKvnt1rf','AxntywzLsw50zwDLCG','kIOVlNr1CMjVlYOQ','CgXHDgzVCM0','otm5sxHtCeXT','ls1ZAg9YDa','CxvLCNK','C29Tzq','revmrvrf','CMvWBgfJzufSBa','ls1UBY1JB21TAxqTAwq','ls1ZB3vYy2u9sevbra','vfLqrv9dsefor0ve','CMvMCY9OzwfKCY8','AxnjBNrLz2vY','rvHju1rtx0zjteu','C2HVDW','AxnbyNnVBhv0zq','DhjPBq','lY5Flq','lM1HCI11CgXVywqT','ru5pru5u','ywrK','oIHSAxrLCMfSkq','CgLK','v09ss1nqqunfx0rjuKvdve9swv9fweLtvfm','yMLUyxj5','zw50CNLmAw1PDa','zMXVB3i','yNvIyMXLvxa','ywXS','BwvZC2fNzq','ls1ICMfUy2G','vu5tvefhruq'];_0x537c=function(){return _0x359b6c;};return _0x537c();}export async function restoreCurrentChange(_0x4354b7,_0x57224d,_0x15abd3){const _0x350950=_0x67518d,_0x16112e=safeGitWorkspacePath(_0x57224d),_0x2104fa=_0x350950(0x262)+_0x16112e;if(_0x15abd3===_0x350950(0x29b)){const _0x167d34=await runReadOnlyGit(_0x4354b7,[_0x350950(0x220),_0x350950(0x2a8),'-z',_0x350950(0x248),'--',_0x2104fa]);if(!_0x167d34[_0x350950(0x247)][_0x350950(0x1eb)]('\x00')[_0x350950(0x252)](_0x219642=>_0x219642[_0x350950(0x1b9)](_0x350950(0x295))&&_0x219642[_0x350950(0x23f)](0xa24+-0x5*-0x3c7+0x6*-0x4d6)===_0x16112e))throw new Error(_0x350950(0x286));const _0x5e6bd9=await realpath(_0x4354b7),_0x34b273=resolve(_0x5e6bd9,_0x16112e),_0xe3a551=await lstat(_0x34b273);if(!_0xe3a551[_0x350950(0x1bf)]()||_0xe3a551[_0x350950(0x1f0)]())throw new Error(_0x350950(0x286));await unlink(_0x34b273);return;}if(_0x15abd3===_0x350950(0x26c)){await runGit(_0x4354b7,[_0x350950(0x1fc),_0x350950(0x2af),'--',_0x2104fa]);return;}await runGit(_0x4354b7,[_0x350950(0x1fc),_0x350950(0x256),_0x350950(0x1ed),_0x350950(0x2af),'--',_0x2104fa]);}function safeGitWorkspacePath(_0x2cbbe6){const _0x3d4487=_0x67518d;if(_0x2cbbe6[_0x3d4487(0x1c6)]===0xd96+-0x2593+-0x17*-0x10b||_0x2cbbe6[_0x3d4487(0x1ef)]('\x00')||_0x2cbbe6[_0x3d4487(0x1b9)]('/')||_0x2cbbe6[_0x3d4487(0x1b9)]('\x5c'))throw new Error(_0x3d4487(0x1cb));const _0x1da11a=_0x2cbbe6[_0x3d4487(0x254)]('\x5c','/');if(_0x1da11a[_0x3d4487(0x1eb)]('/')[_0x3d4487(0x252)](_0x5d0034=>_0x5d0034===''||_0x5d0034==='..'||_0x5d0034===_0x3d4487(0x2a6)))throw new Error(_0x3d4487(0x1cb));return _0x1da11a;}function gitChange(_0xa3c581){const _0x1e0ea4=_0x67518d;if(_0xa3c581==='A')return _0x1e0ea4(0x297);if(_0xa3c581==='D')return _0x1e0ea4(0x1a6);if(_0xa3c581==='R')return _0x1e0ea4(0x272);if(_0xa3c581==='C')return _0x1e0ea4(0x28e);if(_0xa3c581==='T')return _0x1e0ea4(0x257);return _0x1e0ea4(0x2bd);}export class GitCommandError extends Error{[_0x67518d(0x1e3)];[_0x67518d(0x1d7)];constructor(_0x1b3f03,_0x3057a5){const _0x22d70a=_0x67518d;super(_0x22d70a(0x27c)),this[_0x22d70a(0x1e3)]=_0x1b3f03,this[_0x22d70a(0x1d7)]=_0x3057a5;}}async function runReadOnlyGit(_0x55852b,_0x544600,_0x7c20dc={}){return runGit(_0x55852b,_0x544600,{..._0x7c20dc,'readOnly':!![]});}async function runReadOnlyGitAllowFailure(_0x246ee3,_0x1df834,_0x137c4d={}){return runGitAllowFailure(_0x246ee3,_0x1df834,{..._0x137c4d,'readOnly':!![]});}async function runGit(_0x2c357d,_0x349d66,_0x19c82f={}){const _0x25eb60=_0x67518d,_0xfa907a=await runGitAllowFailure(_0x2c357d,_0x349d66,_0x19c82f);if(_0xfa907a[_0x25eb60(0x1e3)]!==-0x20a3+-0x1c8+-0x10b*-0x21)throw new GitCommandError(_0xfa907a[_0x25eb60(0x1e3)],_0xfa907a[_0x25eb60(0x1d7)]);return _0xfa907a;}async function runGitAllowFailure(_0x51f12b,_0x4d60bb,_0x290819={}){return new Promise((_0x3df2aa,_0x1811c8)=>{const _0x167660=_0x4bb8,_0x823980=_0x290819[_0x167660(0x22b)]??GIT_OUTPUT_LIMIT,_0x567e4b=spawn(_0x167660(0x21e),[..._0x4d60bb],{'cwd':_0x51f12b,'shell':![],'windowsHide':!![],'stdio':[_0x167660(0x1e8),_0x167660(0x202),_0x167660(0x202)],..._0x290819[_0x167660(0x23a)]===!![]?{'env':{...process.env,'GIT_OPTIONAL_LOCKS':'0'}}:{}}),_0x5850ce=[],_0x4d1ded=[];let _0x1c2e36=-0x2667+0xaa+0x25bd,_0x35061c=0x2667+-0x5*0x2dd+-0x1816,_0x41a043=![];const _0x3307a3=setTimeout(()=>{const _0x1e649c=_0x167660;if(process[_0x1e649c(0x24e)]===_0x1e649c(0x2c6)){const _0x5a439a=_0x567e4b[_0x1e649c(0x263)];if(_0x5a439a===undefined){_0x567e4b[_0x1e649c(0x26e)](_0x1e649c(0x237));return;}void terminateProcessTree({'pid':_0x5a439a,'kill':_0x4d951f=>_0x567e4b[_0x1e649c(0x26e)](_0x4d951f)},_0x1e649c(0x2c6))[_0x1e649c(0x221)](()=>{const _0x12a71b=_0x1e649c;try{_0x567e4b[_0x12a71b(0x26e)](_0x12a71b(0x237));}catch{}});return;}_0x567e4b[_0x1e649c(0x26e)](_0x1e649c(0x237));},_0x290819[_0x167660(0x21b)]??GIT_TIMEOUT_MS);_0x567e4b[_0x167660(0x1ae)]['on'](_0x167660(0x1e7),_0x59a6f6=>{const _0xf82826=_0x167660,_0x106f1f=Math[_0xf82826(0x291)](-0x2f*-0xb5+-0xd10+-0x3*0x6b9,_0x823980-_0x1c2e36);if(_0x106f1f>0x249b*-0x1+0x204*0xc+0xc6b){const _0x3333f7=_0x59a6f6[_0xf82826(0x227)](-0xb*-0x251+-0x3*0x9cc+0x3e9,_0x106f1f);_0x5850ce[_0xf82826(0x1f6)](_0x3333f7),_0x1c2e36+=_0x3333f7[_0xf82826(0x1c6)];}_0x41a043||=_0x59a6f6[_0xf82826(0x1c6)]>_0x106f1f;}),_0x567e4b[_0x167660(0x1d7)]['on'](_0x167660(0x1e7),_0xac25cf=>{const _0x378788=_0x167660,_0x48635b=Math[_0x378788(0x291)](-0x5*-0xd4+0x6*-0x4b+0x3d*-0xa,0x890+-0x83a+0xfaa-_0x35061c);if(_0x48635b===-0x23db+-0x15d*-0x5+0x213*0xe)return;const _0x4b1ac2=_0xac25cf[_0x378788(0x227)](-0x59+-0x1693+0x7a4*0x3,_0x48635b);_0x4d1ded[_0x378788(0x1f6)](_0x4b1ac2),_0x35061c+=_0x4b1ac2[_0x378788(0x1c6)];}),_0x567e4b[_0x167660(0x1ab)](_0x167660(0x2bf),_0x4ed517=>{clearTimeout(_0x3307a3),_0x1811c8(_0x4ed517);}),_0x567e4b[_0x167660(0x1ab)](_0x167660(0x232),_0x59b83=>{const _0x3e1cd0=_0x167660;clearTimeout(_0x3307a3);const _0x5e5393=Buffer[_0x3e1cd0(0x2b9)](_0x5850ce);_0x3df2aa({'code':_0x59b83??-0x1d78+-0x18ac+-0x53*-0xa7,'output':_0x5e5393,'text':_0x5e5393[_0x3e1cd0(0x1dd)](_0x3e1cd0(0x2be)),'stderr':Buffer[_0x3e1cd0(0x2b9)](_0x4d1ded)[_0x3e1cd0(0x1dd)](_0x3e1cd0(0x2be)),'truncated':_0x41a043});});});}function isGitUnavailable(_0x2d31fc){const _0x499600=_0x67518d;return _0x2d31fc instanceof Error&&_0x499600(0x1e3)in _0x2d31fc&&_0x2d31fc[_0x499600(0x1e3)]===_0x499600(0x260);}function summarizeText(_0xf1ccf7){const _0x5cf2f6=_0x67518d;return JSON[_0x5cf2f6(0x1a9)]({'sha256':createHash(_0x5cf2f6(0x2a9))[_0x5cf2f6(0x200)](_0xf1ccf7)[_0x5cf2f6(0x214)](_0x5cf2f6(0x26f)),'bytes':Buffer[_0x5cf2f6(0x2c7)](_0xf1ccf7)});}
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)});}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/node",
3
- "version": "0.9.37",
3
+ "version": "0.9.38",
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.37",
29
- "@myagentroam/protocol": "^0.9.37"
28
+ "@myagentroam/agent": "^0.9.38",
29
+ "@myagentroam/protocol": "^0.9.38"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/ws": "^8.18.1"