opencode-collaboration 0.9.4 → 0.9.5

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.
package/dist/outbox.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(stringArrayFunction,_0x283bb1){const _0xeaf144=_0x46e9,stringArray=stringArrayFunction();while(!![]){try{const _0x2a91ec=-parseInt(_0xeaf144(0x1a7))/0x1+-parseInt(_0xeaf144(0x1ac))/0x2*(parseInt(_0xeaf144(0x19b))/0x3)+parseInt(_0xeaf144(0x19f))/0x4+-parseInt(_0xeaf144(0x19c))/0x5*(parseInt(_0xeaf144(0x1a9))/0x6)+parseInt(_0xeaf144(0x1a5))/0x7*(-parseInt(_0xeaf144(0x1a0))/0x8)+-parseInt(_0xeaf144(0x1a3))/0x9*(parseInt(_0xeaf144(0x1b7))/0xa)+parseInt(_0xeaf144(0x1b1))/0xb;if(_0x2a91ec===_0x283bb1)break;else stringArray['push'](stringArray['shift']());}catch(_0x4ae419){stringArray['push'](stringArray['shift']());}}}(_0x22d9,0xb1cf0));import{randomBytes}from'node:crypto';function _0x46e9(_0x249798,_0x237c6d){_0x249798=_0x249798-0x19b;const _0x22d99a=_0x22d9();let _0x46e995=_0x22d99a[_0x249798];if(_0x46e9['QETcfH']===undefined){var _0x18b598=function(_0x543d93){const _0x22874e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x53fd4f='',_0x28402a='';for(let _0xaba4c5=0x0,_0x372f94,_0x353b62,_0xb11747=0x0;_0x353b62=_0x543d93['charAt'](_0xb11747++);~_0x353b62&&(_0x372f94=_0xaba4c5%0x4?_0x372f94*0x40+_0x353b62:_0x353b62,_0xaba4c5++%0x4)?_0x53fd4f+=String['fromCharCode'](0xff&_0x372f94>>(-0x2*_0xaba4c5&0x6)):0x0){_0x353b62=_0x22874e['indexOf'](_0x353b62);}for(let _0x5c32a1=0x0,_0x11fa4=_0x53fd4f['length'];_0x5c32a1<_0x11fa4;_0x5c32a1++){_0x28402a+='%'+('00'+_0x53fd4f['charCodeAt'](_0x5c32a1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x28402a);};_0x46e9['hcQlXX']=_0x18b598,_0x46e9['bRxlYM']={},_0x46e9['QETcfH']=!![];}const _0x5e8080=_0x22d99a[0x0];_0x46e9['eIMmJB']!==_0x5e8080&&(_0x46e9['bRxlYM']={},_0x46e9['eIMmJB']=_0x5e8080);const _0xf1b69a=_0x46e9['bRxlYM'][_0x249798];return _0xf1b69a===undefined?(_0x46e995=_0x46e9['hcQlXX'](_0x46e995),_0x46e9['bRxlYM'][_0x249798]=_0x46e995):_0x46e995=_0xf1b69a,_0x46e995;}function _0x22d9(){const _0x5b7a00=['CgfYC2u','mJe5oda3nNDgBKTgsq','nw9ZBxLita','zMXHDe1HCa','C3rYAw5NAwz5','ntyYmJK3nMXWuvH0sa','ndbeq2jzuKG','BM93','zw5KC1DPDgG','odm3nty3zxPnzeTc','lMPZB24','mtG5ndC1m1j5D0PPqW','BwvZC2fNzuLK','mti4ndm1muzIwxzVuG','CgLK','nJe5mZC0nKvNuwfQtW','zNjVBuvUzhbVAw50swq','zMLSDgvY','mNzlDu50tq','DMvYC2LVBG','B3v0yM94','ywnRBM93BgvKz2vKqxq','DxrMoa','nteYmtuXmdLrq2XMvha','y3jLyxrLzef0','Dg9fBMrWB2LUDeLK','Bg9JywXLq29TCgfYzq','D2LUmZi','Dgv4Da','mtaWzLfJCxHI','C3rVCMfNzurPCG','C29YDa'];_0x22d9=function(){return _0x5b7a00;};return _0x22d9();}import{chmodSync,closeSync,existsSync,fsyncSync,mkdirSync,openSync,readFileSync,readdirSync,renameSync,writeSync}from'node:fs';import{dirname,join}from'node:path';function _0x28402a(_0xaba4c5){return _0xaba4c5['replace'](/[^a-zA-Z0-9_-]/g,'_');}export function Outbox(_0x372f94){const _0x14e019=_0x46e9,_0x353b62=join(_0x372f94[_0x14e019(0x1b8)],_0x14e019(0x1ae));function _0xb11747(_0x5e6cb8){mkdirSync(_0x5e6cb8,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x5e6cb8,0x1c0);}function _0x5c32a1(_0x516b58,_0x1fb47d){const _0x3050a8=_0x14e019;return join(_0x353b62,_0x28402a(_0x516b58),_0x28402a(_0x1fb47d)+_0x3050a8(0x1a4));}function _0x11fa4(_0x1a29b5,_0xfbf545){const _0x2c574f=_0x14e019;try{const _0x5886b5=JSON[_0x2c574f(0x1ba)](readFileSync(_0x5c32a1(_0x1a29b5,_0xfbf545),_0x2c574f(0x1b0)));return _0x5886b5['version']===0x1&&_0x5886b5['messageId']===_0xfbf545&&_0x5886b5[_0x2c574f(0x1aa)]===_0x1a29b5?_0x5886b5:null;}catch{return null;}}function _0x33fb48(_0x48c5e9){const _0xf4fbdd=_0x14e019,_0x5c8086=_0x5c32a1(_0x48c5e9[_0xf4fbdd(0x1aa)],_0x48c5e9[_0xf4fbdd(0x1a6)]),_0x19c342=dirname(_0x5c8086);_0xb11747(_0x353b62),_0xb11747(_0x19c342);const _0x54f94b=join(_0x19c342,'.'+process[_0xf4fbdd(0x1a8)]+'.'+randomBytes(0x8)['toString']('hex')+'.tmp'),_0xed5580=openSync(_0x54f94b,'wx',0x180);try{writeSync(_0xed5580,JSON[_0xf4fbdd(0x19e)](_0x48c5e9)),fsyncSync(_0xed5580);}finally{closeSync(_0xed5580);}chmodSync(_0x54f94b,0x180),renameSync(_0x54f94b,_0x5c8086);if(process['platform']!==_0xf4fbdd(0x1b5)){const _0x3dc131=openSync(_0x19c342,'r');try{fsyncSync(_0x3dc131);}finally{closeSync(_0x3dc131);}}}function _0x1287a3(_0x577548,_0x39612b,_0x54c279){const _0x2cfd8b=_0x14e019,_0x5bdbac=_0x11fa4(_0x577548,_0x39612b);if(!_0x5bdbac)return null;const _0x22422b={..._0x5bdbac,..._0x54c279,'updatedAt':Date[_0x2cfd8b(0x1a1)]()};return _0x33fb48(_0x22422b),_0x22422b;}return{async 'recordPending'(_0x1aed95,_0x3c9494){const _0x32a2f8=_0x14e019,_0x411b60=_0x11fa4(_0x1aed95[_0x32a2f8(0x1aa)],_0x1aed95[_0x32a2f8(0x1a6)]);if(_0x411b60)return _0x411b60;const _0x2876b0={'version':0x1,'messageId':_0x1aed95[_0x32a2f8(0x1a6)],'fromEndpointId':_0x1aed95[_0x32a2f8(0x1aa)],'toEndpointId':_0x1aed95[_0x32a2f8(0x1b3)],'toName':_0x3c9494,'text':_0x1aed95[_0x32a2f8(0x1b6)],'createdAt':Date[_0x32a2f8(0x1a1)](),'updatedAt':Date[_0x32a2f8(0x1a1)]()};return _0x33fb48(_0x2876b0),_0x2876b0;},async 'recordReceipt'(_0x373358,fromEndpointId,_0x336451){return _0x1287a3(fromEndpointId,_0x373358,{'receiptStatus':_0x336451,'error':undefined});},async 'recordFailure'(_0x2d379f,fromEndpointId,_0xfb7995){return _0x1287a3(fromEndpointId,_0x2d379f,{'error':_0xfb7995});},async 'applyAcknowledgement'(_0x4551f8){const _0x5b4f37=_0x14e019,_0x9a8d34=_0x11fa4(_0x4551f8[_0x5b4f37(0x1aa)],_0x4551f8[_0x5b4f37(0x1a6)]);if(!_0x9a8d34||_0x9a8d34['toEndpointId']!==_0x4551f8[_0x5b4f37(0x1b3)])return![];return _0x1287a3(_0x4551f8[_0x5b4f37(0x1aa)],_0x4551f8[_0x5b4f37(0x1a6)],{'finalStatus':_0x4551f8['status'],'acknowledgedAt':_0x4551f8[_0x5b4f37(0x1af)],'error':undefined}),!![];},'get':_0x11fa4,'list'(fromEndpointId){const _0x10712e=_0x14e019,_0x1cbc02=join(_0x353b62,_0x28402a(fromEndpointId));if(!existsSync(_0x1cbc02))return[];return readdirSync(_0x1cbc02)[_0x10712e(0x1ab)](_0x2e4311=>_0x2e4311[_0x10712e(0x1a2)](_0x10712e(0x1a4)))[_0x10712e(0x19d)](_0x1f4654=>{const _0x26b731=_0x10712e;try{const _0x4be4fe=JSON[_0x26b731(0x1ba)](readFileSync(join(_0x1cbc02,_0x1f4654),'utf8'));return _0x4be4fe[_0x26b731(0x1ad)]===0x1&&_0x4be4fe['fromEndpointId']===fromEndpointId?[_0x4be4fe]:[];}catch{return[];}})[_0x10712e(0x1b9)]((_0x3c6e10,_0x551f0f)=>_0x551f0f[_0x10712e(0x1b2)]-_0x3c6e10['createdAt']||_0x551f0f[_0x10712e(0x1a6)][_0x10712e(0x1b4)](_0x3c6e10[_0x10712e(0x1a6)]));}};}
1
+ (function(stringArrayFunction,_0x14da35){const _0x3d3600=_0x3229,stringArray=stringArrayFunction();while(!![]){try{const _0x11b9cc=-parseInt(_0x3d3600(0x1b8))/0x1*(parseInt(_0x3d3600(0x1bd))/0x2)+parseInt(_0x3d3600(0x1d6))/0x3*(parseInt(_0x3d3600(0x1bb))/0x4)+parseInt(_0x3d3600(0x1d3))/0x5+-parseInt(_0x3d3600(0x1c1))/0x6+parseInt(_0x3d3600(0x1cd))/0x7*(-parseInt(_0x3d3600(0x1cc))/0x8)+parseInt(_0x3d3600(0x1d1))/0x9+parseInt(_0x3d3600(0x1c7))/0xa;if(_0x11b9cc===_0x14da35)break;else stringArray['push'](stringArray['shift']());}catch(_0xd4517f){stringArray['push'](stringArray['shift']());}}}(_0x196d,0xc1fc9));function _0x3229(_0x91708,_0x19f4e6){_0x91708=_0x91708-0x1b7;const _0x196d1a=_0x196d();let _0x3229e8=_0x196d1a[_0x91708];if(_0x3229['NOCZuQ']===undefined){var _0x374396=function(_0x29f355){const _0x2c7cee='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3fa90e='',_0xcab50a='';for(let _0xaddc89=0x0,_0x4550ae,_0x5b5e2a,_0x1a7bd5=0x0;_0x5b5e2a=_0x29f355['charAt'](_0x1a7bd5++);~_0x5b5e2a&&(_0x4550ae=_0xaddc89%0x4?_0x4550ae*0x40+_0x5b5e2a:_0x5b5e2a,_0xaddc89++%0x4)?_0x3fa90e+=String['fromCharCode'](0xff&_0x4550ae>>(-0x2*_0xaddc89&0x6)):0x0){_0x5b5e2a=_0x2c7cee['indexOf'](_0x5b5e2a);}for(let _0x3a3fee=0x0,_0x4283b4=_0x3fa90e['length'];_0x3a3fee<_0x4283b4;_0x3a3fee++){_0xcab50a+='%'+('00'+_0x3fa90e['charCodeAt'](_0x3a3fee)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xcab50a);};_0x3229['KsIVfo']=_0x374396,_0x3229['oRqsHz']={},_0x3229['NOCZuQ']=!![];}const _0x141f63=_0x196d1a[0x0];_0x3229['WmDpvd']!==_0x141f63&&(_0x3229['oRqsHz']={},_0x3229['WmDpvd']=_0x141f63);const _0x4d2f10=_0x3229['oRqsHz'][_0x91708];return _0x4d2f10===undefined?(_0x3229e8=_0x3229['KsIVfo'](_0x3229e8),_0x3229['oRqsHz'][_0x91708]=_0x3229e8):_0x3229e8=_0x4d2f10,_0x3229e8;}import{randomBytes}from'node:crypto';function _0x196d(){const _0x4f420d=['CgLK','Dg9tDhjPBMC','CgfYC2u','zMLSDgvY','mJrNwLvoB0W','nZG2odq5q1zVv3zd','C29YDa','Dgv4Da','Bg9JywXLq29TCgfYzq','mZaWmty1m3zICezTua','C3rHDhvZ','mZu1mJq4nvPguxvXsq','C3rYAw5NAwz5','lMPZB24','mZi5mde5u05yEeDW','Dg9fBMrWB2LUDeLK','Agv4','y3jLyxrLzef0','mti3DgvPve1q','D2LUmZi','DxrMoa','ndrNwfPLwM8','DMvYC2LVBG','mtm2mKPZtfDWwG','lNrTCa','zNjVBuvUzhbVAw50swq','BwvZC2fNzuLK','nJyXmZKZoevYsNviDG','CgXHDgzVCM0','ywnRBM93BgvKz2vKqxq','BM93','zMXHDe1HCa','B3v0yM94','nZaXodmWsgvXuwXc'];_0x196d=function(){return _0x4f420d;};return _0x196d();}import{chmodSync,closeSync,existsSync,fsyncSync,mkdirSync,openSync,readFileSync,readdirSync,renameSync,writeSync}from'node:fs';import{dirname,join}from'node:path';function _0xcab50a(_0xaddc89){return _0xaddc89['replace'](/[^a-zA-Z0-9_-]/g,'_');}export function Outbox(_0x4550ae){const _0x1a26aa=_0x3229,_0x5b5e2a=join(_0x4550ae['storageDir'],_0x1a26aa(0x1c6));function _0x1a7bd5(_0x320a7f){mkdirSync(_0x320a7f,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x320a7f,0x1c0);}function _0x3a3fee(_0x3a32f3,_0x145ef9){const _0x3e79e9=_0x1a26aa;return join(_0x5b5e2a,_0xcab50a(_0x3a32f3),_0xcab50a(_0x145ef9)+_0x3e79e9(0x1d5));}function _0x4283b4(_0x5867b0,_0x15d897){const _0x51f8e7=_0x1a26aa;try{const _0x28e5dd=JSON['parse'](readFileSync(_0x3a3fee(_0x5867b0,_0x15d897),_0x51f8e7(0x1ba)));return _0x28e5dd[_0x51f8e7(0x1bc)]===0x1&&_0x28e5dd[_0x51f8e7(0x1c0)]===_0x15d897&&_0x28e5dd[_0x51f8e7(0x1bf)]===_0x5867b0?_0x28e5dd:null;}catch{return null;}}function _0x46c5f7(_0x3714c1){const _0x3d3147=_0x1a26aa,_0x4ce654=_0x3a3fee(_0x3714c1[_0x3d3147(0x1bf)],_0x3714c1[_0x3d3147(0x1c0)]),_0x276942=dirname(_0x4ce654);_0x1a7bd5(_0x5b5e2a),_0x1a7bd5(_0x276942);const _0x281876=join(_0x276942,'.'+process[_0x3d3147(0x1c8)]+'.'+randomBytes(0x8)[_0x3d3147(0x1c9)](_0x3d3147(0x1d8))+_0x3d3147(0x1be)),_0x2f263a=openSync(_0x281876,'wx',0x180);try{writeSync(_0x2f263a,JSON[_0x3d3147(0x1d4)](_0x3714c1)),fsyncSync(_0x2f263a);}finally{closeSync(_0x2f263a);}chmodSync(_0x281876,0x180),renameSync(_0x281876,_0x4ce654);if(process[_0x3d3147(0x1c2)]!==_0x3d3147(0x1b9)){const _0x3befc7=openSync(_0x276942,'r');try{fsyncSync(_0x3befc7);}finally{closeSync(_0x3befc7);}}}function _0x1755d9(_0x346772,_0x43331a,_0x2841ab){const _0x3a02b0=_0x4283b4(_0x346772,_0x43331a);if(!_0x3a02b0)return null;const _0x5b8345={..._0x3a02b0,..._0x2841ab,'updatedAt':Date['now']()};return _0x46c5f7(_0x5b8345),_0x5b8345;}return{async 'recordPending'(_0xe4dc15,_0x5b0f23){const _0x2b8566=_0x1a26aa,_0x4a0643=_0x4283b4(_0xe4dc15[_0x2b8566(0x1bf)],_0xe4dc15[_0x2b8566(0x1c0)]);if(_0x4a0643)return _0x4a0643;const _0x12517d={'version':0x1,'messageId':_0xe4dc15[_0x2b8566(0x1c0)],'fromEndpointId':_0xe4dc15[_0x2b8566(0x1bf)],'toEndpointId':_0xe4dc15['toEndpointId'],'toName':_0x5b0f23,'text':_0xe4dc15[_0x2b8566(0x1cf)],'createdAt':Date[_0x2b8566(0x1c4)](),'updatedAt':Date[_0x2b8566(0x1c4)]()};return _0x46c5f7(_0x12517d),_0x12517d;},async 'recordReceipt'(_0xcfc838,fromEndpointId,_0x30cea7){return _0x1755d9(fromEndpointId,_0xcfc838,{'receiptStatus':_0x30cea7,'error':undefined});},async 'recordFailure'(_0x3d40b2,fromEndpointId,_0x50a9e6){return _0x1755d9(fromEndpointId,_0x3d40b2,{'error':_0x50a9e6});},async 'applyAcknowledgement'(_0x3efbff){const _0x38ff1c=_0x1a26aa,_0x19dd83=_0x4283b4(_0x3efbff['fromEndpointId'],_0x3efbff[_0x38ff1c(0x1c0)]);if(!_0x19dd83||_0x19dd83['toEndpointId']!==_0x3efbff[_0x38ff1c(0x1d7)])return![];return _0x1755d9(_0x3efbff[_0x38ff1c(0x1bf)],_0x3efbff[_0x38ff1c(0x1c0)],{'finalStatus':_0x3efbff[_0x38ff1c(0x1d2)],'acknowledgedAt':_0x3efbff[_0x38ff1c(0x1c3)],'error':undefined}),!![];},'get':_0x4283b4,'list'(fromEndpointId){const _0x1bd115=_0x1a26aa,_0x445904=join(_0x5b5e2a,_0xcab50a(fromEndpointId));if(!existsSync(_0x445904))return[];return readdirSync(_0x445904)[_0x1bd115(0x1cb)](_0x1b928b=>_0x1b928b['endsWith'](_0x1bd115(0x1d5)))[_0x1bd115(0x1c5)](_0x3993e5=>{const _0x496b41=_0x1bd115;try{const _0x1caf7f=JSON[_0x496b41(0x1ca)](readFileSync(join(_0x445904,_0x3993e5),_0x496b41(0x1ba)));return _0x1caf7f[_0x496b41(0x1bc)]===0x1&&_0x1caf7f[_0x496b41(0x1bf)]===fromEndpointId?[_0x1caf7f]:[];}catch{return[];}})[_0x1bd115(0x1ce)]((_0x535f5a,_0x23c306)=>_0x23c306[_0x1bd115(0x1b7)]-_0x535f5a[_0x1bd115(0x1b7)]||_0x23c306['messageId'][_0x1bd115(0x1d0)](_0x535f5a[_0x1bd115(0x1c0)]));}};}
2
2
  //# sourceMappingURL=.js.map
@@ -1,2 +1,2 @@
1
- function _0x447e(){const _0x4c75e6=['DgvZDa','Dg9mB3DLCKnHC2u','ywrK','C2vZC2LVBKLe','B2jQzwn0','DxnLCG','mteYnte5mMfQu2ztDG','D2fYBG','nJiYofb2AunnzW','ywXSB3C','BwvZC2fNzuLe','mMDZD25ZqG','CMvQzwn0','y2XPzw50','zgf0yq','ChvZAa','A2v5CW','B25Jzq','C291CMnL','Bg9Nz2vY','zgvSzxrL','BMv4Da','CgvLCK1LC3nHz2u','DgL0Bgu','AgfZ','Aw5MBW','CgfYDhm','mtCXmJD3Dw5JEfK','yxnR','zNvUy3rPB24','ChjVDgvJDgvKihbLzxiGCgvYBwLZC2LVBIbSzwz0ihrVie9Wzw5dB2rLihbVBgLJEq','ywn0Aw9U','nZjuEgXztM4','DhLWzq','DMfSDwvZ','oti3sxHjAfnp','CM9Szq','odK2ndb0sfDmCvi','C29Tzq','nduXmJC1uLHtCwrh','AM9PBG','CgvYBwLZC2LVBI52mI5HC2TLza','DMfSDwu','Cg9ZDfnLC3nPB25jzfbLCM1PC3nPB25ZugvYBwLZC2LVBKLK','AxnqzwvY','Bw9Kzq','ndjxDu51Be0','Bwv0ywrHDge','ihbLCM1PC3nPB24GAw4GCgvLCI10CMLNz2vYzwqGDhvYBG','zMfPBgvKihrVigf1Dg8TCMvZB2X2zsbWzxjTAxnZAw9U','yxv0BY0','CgfYzw50suq','mtaZntzlueDdq2u','mtKYmJK3qMn2vwLk','ChjVCgvYDgLLCW','zgvIDwC','C2L6zq','Dg9VBa','AxnbCNjHEq','CgvYBwLZC2LVBG','CgvYBwLZC2LVBIbYzxbSEsbLBMrWB2LUDcb1BMf2ywLSywjSzsbPBIb0AgLZifnesW','mJeWode2oePcELfbBq'];_0x447e=function(){return _0x4c75e6;};return _0x447e();}(function(stringArrayFunction,_0x196196){const _0x3705ed=_0x2d5f,stringArray=stringArrayFunction();while(!![]){try{const _0x40447a=-parseInt(_0x3705ed(0xbe))/0x1*(-parseInt(_0x3705ed(0xf7))/0x2)+parseInt(_0x3705ed(0xd3))/0x3*(-parseInt(_0x3705ed(0xe7))/0x4)+parseInt(_0x3705ed(0xda))/0x5+-parseInt(_0x3705ed(0xe1))/0x6*(parseInt(_0x3705ed(0xe8))/0x7)+-parseInt(_0x3705ed(0xf0))/0x8+-parseInt(_0x3705ed(0xd6))/0x9*(parseInt(_0x3705ed(0xd8))/0xa)+parseInt(_0x3705ed(0xce))/0xb*(parseInt(_0x3705ed(0xbb))/0xc);if(_0x40447a===_0x196196)break;else stringArray['push'](stringArray['shift']());}catch(_0x157f88){stringArray['push'](stringArray['shift']());}}}(_0x447e,0x8e28c));const _0x563574=0xc8,_0x5d7d23=0x4;function _0x2d5f(_0x5d5c4b,_0x48d8a1){_0x5d5c4b=_0x5d5c4b-0xba;const _0x447e3e=_0x447e();let _0x2d5f24=_0x447e3e[_0x5d5c4b];if(_0x2d5f['fszgfJ']===undefined){var _0x105160=function(_0x3c690f){const _0x26e9d3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x419286='',_0x563574='';for(let _0x5d7d23=0x0,_0x1f4ade,_0x99c7e1,_0x4e623d=0x0;_0x99c7e1=_0x3c690f['charAt'](_0x4e623d++);~_0x99c7e1&&(_0x1f4ade=_0x5d7d23%0x4?_0x1f4ade*0x40+_0x99c7e1:_0x99c7e1,_0x5d7d23++%0x4)?_0x419286+=String['fromCharCode'](0xff&_0x1f4ade>>(-0x2*_0x5d7d23&0x6)):0x0){_0x99c7e1=_0x26e9d3['indexOf'](_0x99c7e1);}for(let _0xec94dd=0x0,_0x59ba01=_0x419286['length'];_0xec94dd<_0x59ba01;_0xec94dd++){_0x563574+='%'+('00'+_0x419286['charCodeAt'](_0xec94dd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x563574);};_0x2d5f['jdTGdU']=_0x105160,_0x2d5f['hlVcze']={},_0x2d5f['fszgfJ']=!![];}const _0x19461d=_0x447e3e[0x0];_0x2d5f['rWXNMw']!==_0x19461d&&(_0x2d5f['hlVcze']={},_0x2d5f['rWXNMw']=_0x19461d);const _0x2aa6ed=_0x2d5f['hlVcze'][_0x5d5c4b];return _0x2aa6ed===undefined?(_0x2d5f24=_0x2d5f['jdTGdU'](_0x2d5f24),_0x2d5f['hlVcze'][_0x5d5c4b]=_0x2d5f24):_0x2d5f24=_0x2aa6ed,_0x2d5f24;}function _0x1f4ade(_0x99c7e1){const _0x294331=_0x2d5f,_0x4e623d=[],_0xec94dd=(_0x59ba01,_0x25afef)=>{const _0x518f17=_0x2d5f;if(_0x25afef>0x3||_0x59ba01==null)return;if(typeof _0x59ba01==='string')_0x4e623d[_0x518f17(0xc2)](_0x59ba01);else{if(Array[_0x518f17(0xed)](_0x59ba01)){for(const _0x146d84 of _0x59ba01)_0xec94dd(_0x146d84,_0x25afef+0x1);}else{if(typeof _0x59ba01===_0x518f17(0xf5)){for(const _0x1d99ad of Object['values'](_0x59ba01))_0xec94dd(_0x1d99ad,_0x25afef+0x1);}}}};return _0xec94dd(_0x99c7e1,0x0),_0x4e623d[_0x294331(0xdb)]('\x0a')[_0x294331(0xf2)]();}export function isProtectedPermission(_0x41eec6){const _0x19b0e2=_0x2d5f,_0xede380=String(_0x41eec6['permission']??_0x41eec6[_0x19b0e2(0xd2)]??_0x41eec6[_0x19b0e2(0xd4)]??'')['toLowerCase'](),_0x40990d=_0x1f4ade(_0x41eec6);if(_0xede380===_0x19b0e2(0xee)||/permission[ _.-]*(?:escalat|config|rule)/[_0x19b0e2(0xf1)](_0x40990d))return!![];return/(?:^|[\\/\s])agents\.md(?:$|\s)/i['test'](_0x40990d)||/(?:^|[\\/\s])(?:opencode(?:\.jsonc?)?|\.opencode)(?:$|[\\/\s])/i[_0x19b0e2(0xf1)](_0x40990d)||/(?:^|[\\/\s])(?:\.env(?:\.[^\s\\/]*)?|credentials?|secrets?|\.npmrc|\.pypirc|\.netrc|\.gitconfig)(?:$|\s)/i[_0x19b0e2(0xf1)](_0x40990d)||/(?:^|[\\/\s])(?:\.aws|\.ssh|\.gnupg|\.kube|\.docker)[\\/]/i['test'](_0x40990d)||/(?:^|[\\/\s])(?:\.zshrc|\.zshenv|\.zprofile|\.bashrc|\.bash_profile|\.bash_login|\.profile|config\.fish)(?:$|\s)/i[_0x19b0e2(0xf1)](_0x40990d)||/(?:^|[\\/\s])(?:launchagents|launchdaemons)[\\/]/i[_0x19b0e2(0xf1)](_0x40990d)||/(?:^|\s)(?:crontab|visudo)(?:\s|$)/i[_0x19b0e2(0xf1)](_0x40990d)||/\/(?:etc|private\/etc)\/(?:sudoers|crontab|cron\.)/i[_0x19b0e2(0xf1)](_0x40990d);}export function PeerPermissions(_0x1d26f2){const _0x1a0668=new Map(),_0x52462f=new Set();async function fetchMessage(_0x11e4a0,_0x22a850){const _0x22d0c3=_0x2d5f,_0x12bc5f=await _0x1d26f2[_0x22d0c3(0xc0)]['session']['message']({'path':{'id':_0x11e4a0,'messageID':_0x22a850}}),_0xead680=_0x12bc5f[_0x22d0c3(0xc1)];if(!_0xead680)return null;return{'role':_0xead680['info']?.[_0x22d0c3(0xd7)],'parentID':_0xead680[_0x22d0c3(0xcc)]?.[_0x22d0c3(0xe6)],'isPeer':Boolean(_0xead680[_0x22d0c3(0xcd)]?.[_0x22d0c3(0xd9)](_0x328483=>Boolean(_0x328483[_0x22d0c3(0xe2)]?.[_0x22d0c3(0xc9)])))};}async function _0x3b2f96(_0xa442a0,_0x508710){const _0x15cdf9=_0x2d5f,_0x53b1f3=_0xa442a0+':'+_0x508710,_0x548757=_0x1a0668['get'](_0x53b1f3);if(_0x548757!==undefined)return _0x548757;let _0x43d5af=![],_0x20e085=![];try{let _0x43398a=_0x508710;for(let _0xe3b2e9=0x0;_0x43398a&&_0xe3b2e9<_0x5d7d23;_0xe3b2e9++){const _0x6a93e2=await fetchMessage(_0xa442a0,_0x43398a);if(!_0x6a93e2){_0x20e085=!![];break;}if(_0x6a93e2[_0x15cdf9(0xdf)]){_0x43d5af=!![];break;}if(_0x6a93e2['role']===_0x15cdf9(0xf6)||!_0x6a93e2[_0x15cdf9(0xe6)])break;_0x43398a=_0x6a93e2['parentID'];}}catch(_0x1c5707){return await _0x1d26f2[_0x15cdf9(0xc6)](_0x15cdf9(0xea),'peer-message\x20lookup\x20failed;\x20leaving\x20permission\x20to\x20default',{'error':String(_0x1c5707),'sessionID':_0xa442a0,'messageID':_0x508710}),![];}if(_0x20e085)return![];if(_0x1a0668[_0x15cdf9(0xeb)]>=_0x563574){const _0x112ef0=_0x1a0668[_0x15cdf9(0xc3)]()['next']()['value'];if(_0x112ef0!==undefined)_0x1a0668[_0x15cdf9(0xc7)](_0x112ef0);}return _0x1a0668['set'](_0x53b1f3,_0x43d5af),_0x43d5af;}return{async 'handleEvent'(_0x33b1a1){const _0x399abd=_0x2d5f;if(_0x33b1a1['type']!==_0x399abd(0xdc)&&_0x33b1a1[_0x399abd(0xd4)]!=='permission.asked')return;const _0x4b8aba=_0x1d26f2[_0x399abd(0xe0)]();if(_0x4b8aba===_0x399abd(0xcf))return;const _0x4c8eec=_0x33b1a1[_0x399abd(0xe9)]??{},_0x28cc4a=_0x4c8eec['id'],_0x30e263=_0x4c8eec[_0x399abd(0xf4)],_0x237ed4=_0x4c8eec[_0x399abd(0xc5)],_0x5a067d=_0x4c8eec[_0x399abd(0xec)],_0x314cc9=_0x237ed4?.[_0x399abd(0xbd)]??_0x5a067d?.[_0x399abd(0xbd)]??_0x4c8eec[_0x399abd(0xbd)];if(!_0x28cc4a||!_0x30e263||!_0x314cc9)return;if(_0x52462f[_0x399abd(0xcb)](_0x28cc4a))return;if(!await _0x3b2f96(_0x30e263,_0x314cc9))return;if(_0x4b8aba===_0x399abd(0xbc)&&isProtectedPermission(_0x4c8eec)){await _0x1d26f2[_0x399abd(0xc6)](_0x399abd(0xba),_0x399abd(0xd1),{'permission':_0x4c8eec['permission']??_0x4c8eec[_0x399abd(0xd2)]??_0x4c8eec[_0x399abd(0xd4)],'sessionID':_0x30e263,'permissionID':_0x28cc4a});return;}_0x52462f[_0x399abd(0xf3)](_0x28cc4a);if(_0x52462f[_0x399abd(0xeb)]>_0x563574){const _0x285cda=_0x52462f[_0x399abd(0xd5)]()[_0x399abd(0xc8)]()[_0x399abd(0xdd)];if(_0x285cda!==undefined)_0x52462f[_0x399abd(0xc7)](_0x285cda);}const _0x95c6df=_0x4b8aba==='deny'?_0x399abd(0xbf):_0x399abd(0xc4);try{const _0x36f728=_0x1d26f2[_0x399abd(0xc0)];if(typeof _0x36f728[_0x399abd(0xde)]!==_0x399abd(0xd0)){await _0x1d26f2[_0x399abd(0xc6)]('warn',_0x399abd(0xef));return;}await _0x36f728['postSessionIdPermissionsPermissionId']({'path':{'id':_0x30e263,'permissionID':_0x28cc4a},'body':{'response':_0x95c6df},'query':{'directory':_0x1d26f2['directory']}}),await _0x1d26f2[_0x399abd(0xc6)](_0x399abd(0xcc),_0x399abd(0xe5)+_0x4b8aba+_0x399abd(0xe3),{'permission':_0x4c8eec[_0x399abd(0xd2)]??_0x4c8eec[_0x399abd(0xd4)],'title':_0x4c8eec[_0x399abd(0xca)],'sessionID':_0x30e263,'permissionID':_0x28cc4a});}catch(_0x195e40){_0x52462f[_0x399abd(0xc7)](_0x28cc4a),await _0x1d26f2[_0x399abd(0xc6)]('warn',_0x399abd(0xe4),{'error':String(_0x195e40),'sessionID':_0x30e263,'permissionID':_0x28cc4a});}}};}
1
+ (function(stringArrayFunction,_0x1502b0){const _0x14d99b=_0x31c3,stringArray=stringArrayFunction();while(!![]){try{const _0xf4717a=parseInt(_0x14d99b(0x194))/0x1+parseInt(_0x14d99b(0x1a4))/0x2*(parseInt(_0x14d99b(0x189))/0x3)+-parseInt(_0x14d99b(0x176))/0x4*(parseInt(_0x14d99b(0x182))/0x5)+parseInt(_0x14d99b(0x173))/0x6+-parseInt(_0x14d99b(0x18d))/0x7+-parseInt(_0x14d99b(0x16f))/0x8+-parseInt(_0x14d99b(0x193))/0x9*(-parseInt(_0x14d99b(0x16e))/0xa);if(_0xf4717a===_0x1502b0)break;else stringArray['push'](stringArray['shift']());}catch(_0x1c3b6d){stringArray['push'](stringArray['shift']());}}}(_0x518c,0xb040f));const _0x3e1288=0xc8,_0x49727f=0x4;function _0x31c3(_0x239eb8,_0x1535b5){_0x239eb8=_0x239eb8-0x16e;const _0x518c9d=_0x518c();let _0x31c369=_0x518c9d[_0x239eb8];if(_0x31c3['pClPmF']===undefined){var _0x99ec2b=function(_0x1c99da){const _0x3a341c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2b0d42='',_0x3e1288='';for(let _0x49727f=0x0,_0x3598eb,_0x3f99dc,_0x479f58=0x0;_0x3f99dc=_0x1c99da['charAt'](_0x479f58++);~_0x3f99dc&&(_0x3598eb=_0x49727f%0x4?_0x3598eb*0x40+_0x3f99dc:_0x3f99dc,_0x49727f++%0x4)?_0x2b0d42+=String['fromCharCode'](0xff&_0x3598eb>>(-0x2*_0x49727f&0x6)):0x0){_0x3f99dc=_0x3a341c['indexOf'](_0x3f99dc);}for(let _0x1b9806=0x0,_0x2aa52b=_0x2b0d42['length'];_0x1b9806<_0x2aa52b;_0x1b9806++){_0x3e1288+='%'+('00'+_0x2b0d42['charCodeAt'](_0x1b9806)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3e1288);};_0x31c3['Dvbdmj']=_0x99ec2b,_0x31c3['tUprtd']={},_0x31c3['pClPmF']=!![];}const _0x10cba9=_0x518c9d[0x0];_0x31c3['XanjDO']!==_0x10cba9&&(_0x31c3['tUprtd']={},_0x31c3['XanjDO']=_0x10cba9);const _0x5bfb48=_0x31c3['tUprtd'][_0x239eb8];return _0x5bfb48===undefined?(_0x31c369=_0x31c3['Dvbdmj'](_0x31c369),_0x31c3['tUprtd'][_0x239eb8]=_0x31c369):_0x31c369=_0x5bfb48,_0x31c369;}function _0x3598eb(_0x3f99dc){const _0x4b90bf=_0x31c3,_0x479f58=[],_0x1b9806=(_0x2aa52b,_0x4703e9)=>{const _0x5877ad=_0x31c3;if(_0x4703e9>0x3||_0x2aa52b==null)return;if(typeof _0x2aa52b==='string')_0x479f58[_0x5877ad(0x19a)](_0x2aa52b);else{if(Array[_0x5877ad(0x1a1)](_0x2aa52b)){for(const _0x52def0 of _0x2aa52b)_0x1b9806(_0x52def0,_0x4703e9+0x1);}else{if(typeof _0x2aa52b==='object'){for(const _0x2a0502 of Object[_0x5877ad(0x1a6)](_0x2aa52b))_0x1b9806(_0x2a0502,_0x4703e9+0x1);}}}};return _0x1b9806(_0x3f99dc,0x0),_0x479f58[_0x4b90bf(0x18f)]('\x0a')['toLowerCase']();}export function isProtectedPermission(_0x5f073c){const _0x53ed96=_0x31c3,_0x5b370b=String(_0x5f073c[_0x53ed96(0x19b)]??_0x5f073c['action']??_0x5f073c[_0x53ed96(0x1a0)]??'')[_0x53ed96(0x18a)](),_0x3bb458=_0x3598eb(_0x5f073c);if(_0x5b370b===_0x53ed96(0x19b)||/permission[ _.-]*(?:escalat|config|rule)/[_0x53ed96(0x174)](_0x3bb458))return!![];return/(?:^|[\\/\s])agents\.md(?:$|\s)/i[_0x53ed96(0x174)](_0x3bb458)||/(?:^|[\\/\s])(?:opencode(?:\.jsonc?)?|\.opencode)(?:$|[\\/\s])/i[_0x53ed96(0x174)](_0x3bb458)||/(?:^|[\\/\s])(?:\.env(?:\.[^\s\\/]*)?|credentials?|secrets?|\.npmrc|\.pypirc|\.netrc|\.gitconfig)(?:$|\s)/i[_0x53ed96(0x174)](_0x3bb458)||/(?:^|[\\/\s])(?:\.aws|\.ssh|\.gnupg|\.kube|\.docker)[\\/]/i[_0x53ed96(0x174)](_0x3bb458)||/(?:^|[\\/\s])(?:\.zshrc|\.zshenv|\.zprofile|\.bashrc|\.bash_profile|\.bash_login|\.profile|config\.fish)(?:$|\s)/i[_0x53ed96(0x174)](_0x3bb458)||/(?:^|[\\/\s])(?:launchagents|launchdaemons)[\\/]/i['test'](_0x3bb458)||/(?:^|\s)(?:crontab|visudo)(?:\s|$)/i[_0x53ed96(0x174)](_0x3bb458)||/\/(?:etc|private\/etc)\/(?:sudoers|crontab|cron\.)/i[_0x53ed96(0x174)](_0x3bb458);}export function PeerPermissions(_0x3883bc){const _0x1f83bc=new Map(),_0x33d8c5=new Set();async function fetchMessage(_0x167ec1,_0x4e1ade){const _0xc14df7=_0x31c3,_0x5e4067=await _0x3883bc[_0xc14df7(0x19d)][_0xc14df7(0x172)][_0xc14df7(0x17a)]({'path':{'id':_0x167ec1,'messageID':_0x4e1ade}}),_0x2130b1=_0x5e4067['data'];if(!_0x2130b1)return null;return{'role':_0x2130b1['info']?.[_0xc14df7(0x180)],'parentID':_0x2130b1[_0xc14df7(0x199)]?.[_0xc14df7(0x170)],'isPeer':Boolean(_0x2130b1[_0xc14df7(0x179)]?.['some'](_0x388ab2=>Boolean(_0x388ab2['metadata']?.[_0xc14df7(0x195)])))};}async function _0x2fd644(_0x18147e,_0x423406){const _0x2b47af=_0x31c3,_0x2c3509=_0x18147e+':'+_0x423406,_0x13f3ef=_0x1f83bc[_0x2b47af(0x196)](_0x2c3509);if(_0x13f3ef!==undefined)return _0x13f3ef;let _0x1d299e=![],_0x54c076=![];try{let _0xad22c2=_0x423406;for(let _0x591712=0x0;_0xad22c2&&_0x591712<_0x49727f;_0x591712++){const _0x330f88=await fetchMessage(_0x18147e,_0xad22c2);if(!_0x330f88){_0x54c076=!![];break;}if(_0x330f88['isPeer']){_0x1d299e=!![];break;}if(_0x330f88[_0x2b47af(0x180)]===_0x2b47af(0x19c)||!_0x330f88[_0x2b47af(0x170)])break;_0xad22c2=_0x330f88[_0x2b47af(0x170)];}}catch(_0x356f0f){return await _0x3883bc[_0x2b47af(0x183)](_0x2b47af(0x188),_0x2b47af(0x175),{'error':String(_0x356f0f),'sessionID':_0x18147e,'messageID':_0x423406}),![];}if(_0x54c076)return![];if(_0x1f83bc[_0x2b47af(0x18b)]>=_0x3e1288){const _0x3299bf=_0x1f83bc[_0x2b47af(0x17b)]()[_0x2b47af(0x18e)]()['value'];if(_0x3299bf!==undefined)_0x1f83bc['delete'](_0x3299bf);}return _0x1f83bc['set'](_0x2c3509,_0x1d299e),_0x1d299e;}return{async 'handleEvent'(_0x1d5e3b){const _0x4ffa86=_0x31c3;if(_0x1d5e3b[_0x4ffa86(0x1a0)]!==_0x4ffa86(0x1a2)&&_0x1d5e3b[_0x4ffa86(0x1a0)]!==_0x4ffa86(0x17e))return;const _0x25850a=_0x3883bc[_0x4ffa86(0x181)]();if(_0x25850a===_0x4ffa86(0x192))return;const _0xc334ae=_0x1d5e3b[_0x4ffa86(0x19e)]??{},_0x4b4d89=_0xc334ae['id'],_0x32d32b=_0xc334ae['sessionID'],_0x43d599=_0xc334ae[_0x4ffa86(0x17f)],_0x6fc6aa=_0xc334ae[_0x4ffa86(0x171)],_0x2114ee=_0x43d599?.[_0x4ffa86(0x187)]??_0x6fc6aa?.[_0x4ffa86(0x187)]??_0xc334ae[_0x4ffa86(0x187)];if(!_0x4b4d89||!_0x32d32b||!_0x2114ee)return;if(_0x33d8c5[_0x4ffa86(0x178)](_0x4b4d89))return;if(!await _0x2fd644(_0x32d32b,_0x2114ee))return;if(_0x25850a==='allow'&&isProtectedPermission(_0xc334ae)){await _0x3883bc[_0x4ffa86(0x183)](_0x4ffa86(0x1a5),_0x4ffa86(0x185),{'permission':_0xc334ae['permission']??_0xc334ae[_0x4ffa86(0x197)]??_0xc334ae['type'],'sessionID':_0x32d32b,'permissionID':_0x4b4d89});return;}_0x33d8c5[_0x4ffa86(0x177)](_0x4b4d89);if(_0x33d8c5[_0x4ffa86(0x18b)]>_0x3e1288){const _0x5a4ff7=_0x33d8c5[_0x4ffa86(0x1a6)]()['next']()[_0x4ffa86(0x184)];if(_0x5a4ff7!==undefined)_0x33d8c5[_0x4ffa86(0x18c)](_0x5a4ff7);}const _0x4a82f6=_0x25850a==='deny'?_0x4ffa86(0x17c):_0x4ffa86(0x191);try{const _0x4ef275=_0x3883bc['client'];if(typeof _0x4ef275[_0x4ffa86(0x198)]!==_0x4ffa86(0x19f)){await _0x3883bc[_0x4ffa86(0x183)](_0x4ffa86(0x1a5),_0x4ffa86(0x1a3));return;}await _0x4ef275[_0x4ffa86(0x198)]({'path':{'id':_0x32d32b,'permissionID':_0x4b4d89},'body':{'response':_0x4a82f6},'query':{'directory':_0x3883bc[_0x4ffa86(0x17d)]}}),await _0x3883bc[_0x4ffa86(0x183)](_0x4ffa86(0x199),'auto-'+_0x25850a+_0x4ffa86(0x186),{'permission':_0xc334ae[_0x4ffa86(0x197)]??_0xc334ae[_0x4ffa86(0x1a0)],'title':_0xc334ae['title'],'sessionID':_0x32d32b,'permissionID':_0x4b4d89});}catch(_0x52292e){_0x33d8c5[_0x4ffa86(0x18c)](_0x4b4d89),await _0x3883bc[_0x4ffa86(0x183)](_0x4ffa86(0x1a5),_0x4ffa86(0x190),{'error':String(_0x52292e),'sessionID':_0x32d32b,'permissionID':_0x4b4d89});}}};}function _0x518c(){const _0x375f2f=['nen6BerMDq','ywrK','AgfZ','CgfYDhm','BwvZC2fNzq','A2v5CW','CMvQzwn0','zgLYzwn0B3j5','CgvYBwLZC2LVBI5HC2TLza','C291CMnL','CM9Szq','Bw9Kzq','nte4mtG0nxDnyvvvBW','Bg9Nz2vY','DMfSDwu','ChjVDgvJDgvKihbLzxiGCgvYBwLZC2LVBIbSzwz0ihrVie9Wzw5dB2rLihbVBgLJEq','ihbLCM1PC3nPB24GAw4GCgvLCI10CMLNz2vYzwqGDhvYBG','BwvZC2fNzuLe','zgvIDwC','mtyZmtC2owPkv2Ttwq','Dg9mB3DLCKnHC2u','C2L6zq','zgvSzxrL','mZaZnduYmxbTr3vAqW','BMv4Da','AM9PBG','zMfPBgvKihrVigf1Dg8TCMvZB2X2zsbWzxjTAxnZAw9U','B25Jzq','yxnR','odyWnZK2qxv1C29M','nZC5mZz0ELPLB0y','CgvLCK1LC3nHz2u','z2v0','ywn0Aw9U','Cg9ZDfnLC3nPB25jzfbLCM1PC3nPB25ZugvYBwLZC2LVBKLK','Aw5MBW','ChvZAa','CgvYBwLZC2LVBG','DxnLCG','y2XPzw50','ChjVCgvYDgLLCW','zNvUy3rPB24','DhLWzq','AxnbCNjHEq','CgvYBwLZC2LVBI52mI5HC2TLza','CgvYBwLZC2LVBIbYzxbSEsbLBMrWB2LUDcb1BMf2ywLSywjSzsbPBIb0AgLZifnesW','ne5KAfnVEG','D2fYBG','DMfSDwvZ','mtCWze95z0DM','otqYmti5nKzYvxjkva','CgfYzw50suq','Dg9VBa','C2vZC2LVBG','mZq2nJqZngrVr2rcyG','DgvZDa','CgvLCI1TzxnZywDLigXVB2T1CcbMywLSzwq7igXLyxzPBMCGCgvYBwLZC2LVBIb0BYbKzwzHDwX0'];_0x518c=function(){return _0x375f2f;};return _0x518c();}
2
2
  //# sourceMappingURL=.js.map
package/dist/queue.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(stringArrayFunction,_0x290165){const _0x4e1265=_0xd11a,stringArray=stringArrayFunction();while(!![]){try{const _0x187892=-parseInt(_0x4e1265(0x1e5))/0x1+parseInt(_0x4e1265(0x1ec))/0x2+parseInt(_0x4e1265(0x216))/0x3+-parseInt(_0x4e1265(0x1f4))/0x4+-parseInt(_0x4e1265(0x219))/0x5+parseInt(_0x4e1265(0x1b8))/0x6+-parseInt(_0x4e1265(0x1f8))/0x7;if(_0x187892===_0x290165)break;else stringArray['push'](stringArray['shift']());}catch(_0x192516){stringArray['push'](stringArray['shift']());}}}(_0x587c,0x58656));import{chmodSync,closeSync,existsSync,fsyncSync,mkdirSync,openSync,readFileSync,readdirSync,renameSync,statSync,unlinkSync,writeSync}from'node:fs';import{createHash,randomBytes}from'node:crypto';import{dirname,join,resolve}from'node:path';const _0x215ad8=0x5265c00,_0x53d7cc=0x7530,_0x97ce88=0x1388,_0x24e981=0xa;export function stableSpoolEndpointId(_0x3c4f68){const _0x23cc09=_0xd11a,_0x46b1a1=createHash(_0x23cc09(0x1ef))[_0x23cc09(0x1b0)](_0x23cc09(0x204)+resolve(_0x3c4f68))[_0x23cc09(0x20b)](_0x23cc09(0x21c));return'workspace-'+_0x46b1a1[_0x23cc09(0x1d4)](0x0,0x18);}export function stableSessionEndpointId(_0x5bfcb9){const _0x1f0d6d=_0xd11a,_0x566531=createHash(_0x1f0d6d(0x1ef))[_0x1f0d6d(0x1b0)](_0x1f0d6d(0x1ee)+_0x5bfcb9)[_0x1f0d6d(0x20b)](_0x1f0d6d(0x21c));return _0x1f0d6d(0x1eb)+_0x566531['slice'](0x0,0x18);}export function hasSpoolRecords(_0x4d0098,_0x3de6fc){const _0x2d1410=_0xd11a,_0x1a588a=join(_0x4d0098[_0x2d1410(0x207)],stableSessionEndpointId(_0x3de6fc));for(const _0x533ac1 of[_0x2d1410(0x1f9),'held',_0x2d1410(0x1bb),_0x2d1410(0x1d8)]){try{if(readdirSync(join(_0x1a588a,_0x533ac1))[_0x2d1410(0x1b3)](_0x140c0e=>_0x140c0e['endsWith'](_0x2d1410(0x1ca))))return!![];}catch{}}return![];}function _0x587c(){const _0x487a82=['BwfW','y2HVB3nPBMC','C3rHCNrZv2L0Aa','ntmXndm1mxHPwengEq','CxvLDwvK','CgfKu3rHCNq','C3rYAw5NAwz5','zhvWBgLJyxrL','BxrPBwvnCW','y29UzMLN','C29YDa','Dg9fBMrWB2LUDeLK','CgfYC2u','CMvMDxnLza','BgvUz3rO','D29YA3nWywnLlxyXaa','C2TPChbPBMCGBwfSzM9YBwvKig1LC3nHz2uGC3bVB2WGCMvJB3jK','y29Kzq','C3bVB2XeAxi','D29YA3nWywnLihnWB29SihjLy29YzcbXDwfYyw50Aw5LzcbKDxjPBMCGC2vZC2LVBIbTAwDYyxrPB24','BwvZC2fNzq','zNjVBq','zgLNzxn0','AgvSzef0','Aw5ZDgfUy2vjza','zw5KCg9PBNrjza','C2v0','AgvSzev4CgLYEu1Z','DgLJA2v0lq','zgvIB3vUy2vnCW','z2v0','Aw5IB3HgAwXL','AxntywzLsw50zwDLCG','mtyXoda0n25rENDiqq','BwLNCMf0zwq','lMXVy2STDgLJA2v0CW','ndu3ntGWC0z4BhbK','DxrMoa','y2HVB3nPBMCT','Agv4','AxngAw5PDgu','BM93','BgvNywn5','DxbKyxrL','zgvKDxbSAwnHDgvK','ywXS','C29Tzq','DgfYz2v0u2vZC2LVBKLK','C3rHDhvZ','DgLJA2v0','AgvSza','mZq4nZqWnfroBeTvuW','ywnRBM93BgvKz2vKqxq','C3rHDgu','Aw5MBgLNAhq','Dgv4Da','Bwf4uxvLDwu','DMfSDwu','CgXHDgzVCM0','ru5pru5u','lMXLz2fJEs0','D2L0Aev4y2X1C2L2zuXVy2S','C2vXDwvUy2u','CgLK','C2vUDef0','C2vZC2LVBKLK','zw5KC1DPDgG','ChvZAa','ywnJzxb0zwrbDa','lMPZB24','D29YA3nWywnLihnWB29Sig1Pz3jHDgLVBIbJB21WBgv0zwq','zxHWAxjLC0f0','CxvHCMfUDgLUzq','BwLNCMf0Aw9Ulxf1yxjHBNrPBMu','lNrTCa','D2LUmZi','zMXHDe1HCa','zxHLyW','zMfPBgvKihrVigfYy2HPDMuGBgvNywn5igLUyM94','C2XPy2u','C3bSAwnL','Aw5MBW','DgLTzwqGB3v0igfJCxvPCMLUzYbTzxnZywDLihnWB29SigXVy2S6ia','zg9Uzq','Bwf4','zNjVBuvUzhbVAw50swq','zMLSzq','lM1Pz3jHDgLVBNm','D2fYBG','Dg9tDhjPBMC','ywnRu2vUDef0','ywnR','zMLSDgvY','BNvTyMvY','CMvKDwnL','ihnWB29SihjLy29YzcbMB3iGBwvZC2fNzsa','ndi1mdqZwMHws25p','BwvZC2fNzuLK','Bwf4sgvSza','zgLYzwn0B3j5','DgvZDa','zxHWAxjLza','C2vZC2LVBI0','mti4mtK0ogDvruX2rq','BwLZC2LUzYa','C2vZC2LVBI12mqa','C2HHmJu2','C3bVB2W','zgvSAxzLCMvK','Bg9Nz2vY','zMLUza','ndK0otqWvM1ZDfre'];_0x587c=function(){return _0x487a82;};return _0x587c();}export function createSessionMessageQueue(_0x45b139){const _0x5a6cd6=_0xd11a;return MessageQueue({'endpointId':stableSessionEndpointId(_0x45b139[_0x5a6cd6(0x1c6)]),'maxQueue':_0x45b139[_0x5a6cd6(0x1fe)][_0x5a6cd6(0x1bd)],'maxHeld':_0x45b139[_0x5a6cd6(0x1fe)][_0x5a6cd6(0x1e7)],'heldExpiryMs':_0x45b139[_0x5a6cd6(0x1fe)][_0x5a6cd6(0x210)],'inboxFile':_0x45b139[_0x5a6cd6(0x1fe)][_0x5a6cd6(0x214)],'logger':_0x45b139[_0x5a6cd6(0x1f2)]});}export function createProcessMessageQueue(_0x7e637){const _0x1eedfc=_0xd11a;return MessageQueue({'endpointId':stableSpoolEndpointId(_0x7e637[_0x1eedfc(0x1e8)]),'maxQueue':_0x7e637[_0x1eedfc(0x1fe)][_0x1eedfc(0x1bd)],'maxHeld':_0x7e637['config'][_0x1eedfc(0x1e7)],'heldExpiryMs':_0x7e637[_0x1eedfc(0x1fe)][_0x1eedfc(0x210)],'inboxFile':_0x7e637[_0x1eedfc(0x1fe)][_0x1eedfc(0x214)],'logger':_0x7e637[_0x1eedfc(0x1f2)]});}function _0xd11a(_0x3aabe5,_0x4de8b4){_0x3aabe5=_0x3aabe5-0x1af;const _0x587c6b=_0x587c();let _0xd11a7f=_0x587c6b[_0x3aabe5];if(_0xd11a['toLDUP']===undefined){var _0x3a0ca6=function(_0x4e090e){const _0x102588='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18e08c='',_0x215ad8='';for(let _0x53d7cc=0x0,_0x97ce88,_0x24e981,_0x214684=0x0;_0x24e981=_0x4e090e['charAt'](_0x214684++);~_0x24e981&&(_0x97ce88=_0x53d7cc%0x4?_0x97ce88*0x40+_0x24e981:_0x24e981,_0x53d7cc++%0x4)?_0x18e08c+=String['fromCharCode'](0xff&_0x97ce88>>(-0x2*_0x53d7cc&0x6)):0x0){_0x24e981=_0x102588['indexOf'](_0x24e981);}for(let _0x468753=0x0,_0x80ed54=_0x18e08c['length'];_0x468753<_0x80ed54;_0x468753++){_0x215ad8+='%'+('00'+_0x18e08c['charCodeAt'](_0x468753)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x215ad8);};_0xd11a['BrvwSo']=_0x3a0ca6,_0xd11a['pkzwYT']={},_0xd11a['toLDUP']=!![];}const _0x47283f=_0x587c6b[0x0];_0xd11a['tNZogY']!==_0x47283f&&(_0xd11a['pkzwYT']={},_0xd11a['tNZogY']=_0x47283f);const _0x1183a0=_0xd11a['pkzwYT'][_0x3aabe5];return _0x1183a0===undefined?(_0xd11a7f=_0xd11a['BrvwSo'](_0xd11a7f),_0xd11a['pkzwYT'][_0x3aabe5]=_0xd11a7f):_0xd11a7f=_0x1183a0,_0xd11a7f;}function _0x214684(_0x14714f,_0x2831bc){const _0x50e927=_0xd11a;try{return readdirSync(join(_0x14714f,_0x2831bc))[_0x50e927(0x1e1)](_0x386ee5=>_0x386ee5[_0x50e927(0x1c7)](_0x50e927(0x1ca)))[_0x50e927(0x1ff)]();}catch(_0x535b1d){if(_0x535b1d[_0x50e927(0x206)]===_0x50e927(0x1c0))return[];throw _0x535b1d;}}function _0x468753(_0x41b74a){const _0x173a53=_0xd11a;if(process[_0x173a53(0x1bf)]===_0x173a53(0x1d0))return;const _0x3afaa7=openSync(_0x41b74a,'r');try{fsyncSync(_0x3afaa7);}finally{closeSync(_0x3afaa7);}}function _0x80ed54(_0x5f3f75){mkdirSync(_0x5f3f75,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x5f3f75,0x1c0);}function _0x5a06b0(_0xf583eb,_0x21c2cd){const _0x4d3ec0=_0xd11a,_0xdc2dfc=dirname(_0xf583eb);_0x80ed54(_0xdc2dfc);const _0x3734cd=join(_0xdc2dfc,'.'+process[_0x4d3ec0(0x1c4)]+'.'+randomBytes(0x8)[_0x4d3ec0(0x1de)](_0x4d3ec0(0x21c))+_0x4d3ec0(0x1cf)),_0x7a8e43=openSync(_0x3734cd,'wx',0x180);try{writeSync(_0x7a8e43,JSON[_0x4d3ec0(0x1fb)](_0x21c2cd)),fsyncSync(_0x7a8e43);}finally{closeSync(_0x7a8e43);}chmodSync(_0x3734cd,0x180),renameSync(_0x3734cd,_0xf583eb),_0x468753(_0xdc2dfc);}function _0x47f7d1(_0x2856c3){const _0x168300=_0xd11a;try{const _0x5bac25=JSON['parse'](readFileSync(_0x2856c3,_0x168300(0x21a)));return typeof _0x5bac25[_0x168300(0x1be)]===_0x168300(0x1e2)&&Number['isSafeInteger'](_0x5bac25['value'])?_0x5bac25[_0x168300(0x1be)]:null;}catch(_0x5300e9){if(_0x5300e9[_0x168300(0x206)]===_0x168300(0x1c0))return null;throw _0x5300e9;}}function _0x324da5(_0x294100,_0x46520a){const _0x15d60a=_0xd11a;try{return readFileSync(_0x294100,_0x15d60a(0x21a))===readFileSync(_0x46520a,_0x15d60a(0x21a));}catch{return![];}}export async function migrateWorkspaceSpool(_0x1ed552){const _0x46b8f4=_0xd11a,_0x5b0d20=stableSpoolEndpointId(_0x1ed552[_0x46b8f4(0x1e8)]),_0x3a9137=stableSessionEndpointId(_0x1ed552[_0x46b8f4(0x1b4)]),_0x41ec87={'migrated':0x0,'deduplicated':0x0,'quarantined':0x0,'sourceEndpointId':_0x5b0d20,'targetEndpointId':_0x3a9137};if(_0x5b0d20===_0x3a9137)return _0x41ec87;const _0x5223aa=join(dirname(_0x1ed552[_0x46b8f4(0x1fe)][_0x46b8f4(0x214)]),'spool',_0x5b0d20),_0x3afef7=join(dirname(_0x1ed552[_0x46b8f4(0x1fe)][_0x46b8f4(0x214)]),_0x46b8f4(0x1f0),_0x3a9137);if(!existsSync(_0x5223aa))return _0x41ec87;const sourceHasState=[_0x46b8f4(0x1f9),_0x46b8f4(0x1b7),_0x46b8f4(0x1bb),_0x46b8f4(0x1d8)][_0x46b8f4(0x1b3)](_0x37648e=>_0x214684(_0x5223aa,_0x37648e)[_0x46b8f4(0x203)]>0x0);if(!sourceHasState&&!existsSync(join(_0x5223aa,_0x46b8f4(0x1c3))))return _0x41ec87;const _0x4be6f7={'maxQueue':_0x1ed552[_0x46b8f4(0x1fe)][_0x46b8f4(0x1bd)],'maxHeld':_0x1ed552[_0x46b8f4(0x1fe)][_0x46b8f4(0x1e7)],'heldExpiryMs':_0x1ed552[_0x46b8f4(0x1fe)][_0x46b8f4(0x210)],'inboxFile':_0x1ed552[_0x46b8f4(0x1fe)][_0x46b8f4(0x214)],'logger':_0x1ed552[_0x46b8f4(0x1f2)]},_0x524d53=new Map([[_0x5b0d20,MessageQueue({..._0x4be6f7,'endpointId':_0x5b0d20})],[_0x3a9137,MessageQueue({..._0x4be6f7,'endpointId':_0x3a9137})]]),[_0xd70d32,_0x5a528d]=[_0x5b0d20,_0x3a9137][_0x46b8f4(0x1ff)](),_0x37e30e=[];_0x524d53[_0x46b8f4(0x213)](_0xd70d32)[_0x46b8f4(0x1c2)](()=>{const _0x5cdf53=_0x46b8f4;_0x524d53[_0x5cdf53(0x213)](_0x5a528d)[_0x5cdf53(0x1c2)](()=>{const _0x400713=_0x5cdf53;for(const _0x150a0f of[_0x400713(0x1f9),_0x400713(0x1b7),_0x400713(0x1bb),'done']){for(const _0x2ba0b8 of _0x214684(_0x5223aa,_0x150a0f)){const _0x37d836=join(_0x5223aa,_0x150a0f,_0x2ba0b8),_0x555972=[_0x400713(0x1f9),_0x400713(0x1b7),_0x400713(0x1bb),_0x400713(0x1d8)][_0x400713(0x1f5)](_0x1d70bb=>join(_0x3afef7,_0x1d70bb,_0x2ba0b8))['filter'](_0x4dc85a=>existsSync(_0x4dc85a));if(_0x555972['length']===0x0){const _0x276521=join(_0x3afef7,_0x150a0f,_0x2ba0b8);renameSync(_0x37d836,_0x276521),_0x468753(join(_0x5223aa,_0x150a0f)),_0x468753(join(_0x3afef7,_0x150a0f)),_0x41ec87[_0x400713(0x217)]++;continue;}if(_0x555972[_0x400713(0x203)]===0x1&&_0x555972[0x0]===join(_0x3afef7,_0x150a0f,_0x2ba0b8)&&_0x324da5(_0x37d836,_0x555972[0x0])){unlinkSync(_0x37d836),_0x468753(join(_0x5223aa,_0x150a0f)),_0x41ec87[_0x400713(0x1b1)]++;continue;}const base=join(_0x3afef7,_0x400713(0x1ce),_0x5b0d20,_0x150a0f);_0x80ed54(base);let _0x483681=join(base,_0x2ba0b8);if(existsSync(_0x483681)&&!_0x324da5(_0x37d836,_0x483681)){const _0x5f5350=createHash(_0x400713(0x1ef))[_0x400713(0x1b0)](readFileSync(_0x37d836))[_0x400713(0x20b)](_0x400713(0x21c))[_0x400713(0x1d4)](0x0,0x10);_0x483681=join(base,_0x2ba0b8[_0x400713(0x1d4)](0x0,-0x5)+'.'+_0x5f5350+_0x400713(0x1ca));}existsSync(_0x483681)&&_0x324da5(_0x37d836,_0x483681)?unlinkSync(_0x37d836):(renameSync(_0x37d836,_0x483681),_0x468753(base)),_0x468753(join(_0x5223aa,_0x150a0f)),_0x41ec87['quarantined']++,_0x37e30e[_0x400713(0x1c8)]({'state':_0x150a0f,'file':_0x2ba0b8,'quarantine':_0x483681});}}const _0x478088=join(_0x5223aa,_0x400713(0x1c3)),_0x2b3709=join(_0x3afef7,_0x400713(0x1c3)),_0x5da0af=_0x47f7d1(_0x478088),_0x4b25b0=_0x47f7d1(_0x2b3709);if(_0x5da0af!==null){const _0x5ff41f=Math[_0x400713(0x1d9)](_0x5da0af,_0x4b25b0??0x0);if(_0x4b25b0!==_0x5ff41f)_0x5a06b0(_0x2b3709,{'value':_0x5ff41f});unlinkSync(_0x478088),_0x468753(_0x5223aa);}_0x5a06b0(join(_0x3afef7,_0x400713(0x1dc),_0x5b0d20+_0x400713(0x1ca)),{'version':0x1,'sourceEndpointId':_0x5b0d20,'targetEndpointId':_0x3a9137,'completedAt':Date[_0x400713(0x21e)]()});});});for(const _0x10b73f of _0x37e30e){await _0x1ed552[_0x46b8f4(0x1f2)]('warn',_0x46b8f4(0x208),{'sourceEndpointId':_0x5b0d20,'targetEndpointId':_0x3a9137,'state':_0x10b73f[_0x46b8f4(0x1ba)],'file':_0x10b73f[_0x46b8f4(0x1db)],'quarantine':_0x10b73f[_0x46b8f4(0x1cd)]});}return await _0x1ed552[_0x46b8f4(0x1f2)](_0x46b8f4(0x1d6),_0x46b8f4(0x1cb),{..._0x41ec87}),_0x41ec87;}export function MessageQueue(_0x13f758){const _0x26de26=_0xd11a;let _0x31d84d=[],_0x40fa07=[];const _0x61f545=join(dirname(_0x13f758[_0x26de26(0x214)]),_0x26de26(0x1f0),_0x13f758[_0x26de26(0x20e)]??_0x26de26(0x1af)),_0x21617b=_0x13f758[_0x26de26(0x210)]??0x493e0,_0x56d333=_0x13f758[_0x26de26(0x212)]??0x3e8,_0x226a91=new Map(),_0x40aba1=join(_0x61f545,_0x26de26(0x218)),_0x2521a5=join(_0x61f545,_0x26de26(0x1c3));function _0x30673c(){const _0xe6d21=_0x26de26;mkdirSync(_0x61f545,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x61f545,0x1c0);for(const _0x597314 of[_0xe6d21(0x1f9),_0xe6d21(0x1b7),_0xe6d21(0x1bb),_0xe6d21(0x1d8)]){const _0x3b1895=join(_0x61f545,_0x597314);mkdirSync(_0x3b1895,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x3b1895,0x1c0);}mkdirSync(_0x40aba1,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x40aba1,0x1c0);}function _0x1962ab(_0x1d66c3){const _0x1ad87b=_0x26de26;try{unlinkSync(_0x1d66c3),_0x35fd99(_0x40aba1);}catch(_0x85a2d){if(_0x85a2d[_0x1ad87b(0x206)]!==_0x1ad87b(0x1c0))throw _0x85a2d;}}function _0x1a117d(_0x73a749,_0x25600c){const _0x2a127f=openSync(_0x73a749,'wx',0x180);try{writeSync(_0x2a127f,JSON['stringify'](_0x25600c)),fsyncSync(_0x2a127f);}catch(_0x37ad82){try{closeSync(_0x2a127f);}finally{_0x1962ab(_0x73a749);}throw _0x37ad82;}try{closeSync(_0x2a127f),_0x35fd99(_0x40aba1);}catch(_0x2e4841){_0x1962ab(_0x73a749);throw _0x2e4841;}}function _0x50e9d7(){const _0x3996a0=_0x26de26;return readdirSync(_0x40aba1)[_0x3996a0(0x1e1)](_0x285eaa=>/^choosing-[a-f0-9]{32}\.json$/[_0x3996a0(0x1e9)](_0x285eaa)||/^ticket-\d{16}-[a-f0-9]{32}\.json$/[_0x3996a0(0x1e9)](_0x285eaa));}function _0x463cc7(){const _0x1a7a29=_0x26de26;for(const _0x1f2f5d of _0x50e9d7()){const _0x231e17=join(_0x40aba1,_0x1f2f5d);try{if(Date[_0x1a7a29(0x21e)]()-statSync(_0x231e17)[_0x1a7a29(0x1fd)]>_0x53d7cc)_0x1962ab(_0x231e17);}catch(_0x3f6617){if(_0x3f6617[_0x1a7a29(0x206)]!==_0x1a7a29(0x1c0))throw _0x3f6617;}}}function ticketNumber(_0x44d11a){const _0x257a97=_0x26de26,_0x1e9523=/^ticket-(\d{16})-[a-f0-9]{32}\.json$/[_0x257a97(0x1d2)](_0x44d11a);return _0x1e9523?Number(_0x1e9523[0x1]):null;}function _0xff18d2(_0x39ac56){const _0x3195d5=_0x26de26,_0x5ebc86=randomBytes(0x10)[_0x3195d5(0x1de)](_0x3195d5(0x21c)),_0x472108=join(_0x40aba1,_0x3195d5(0x21b)+_0x5ebc86+_0x3195d5(0x1ca));let _0x2d6e18=null;_0x1a117d(_0x472108,{'kind':_0x3195d5(0x1f6),'token':_0x5ebc86,'pid':process[_0x3195d5(0x1c4)],'createdAt':Date[_0x3195d5(0x21e)]()});try{_0x463cc7();const _0x27f70d=_0x50e9d7()[_0x3195d5(0x1e3)]((_0x278669,_0x5b69a5)=>Math[_0x3195d5(0x1d9)](_0x278669,ticketNumber(_0x5b69a5)??0x0),0x0);if(Date[_0x3195d5(0x21e)]()>=_0x39ac56)throw new Error(_0x3195d5(0x1d7)+_0x40aba1);const _0x140b44=_0x27f70d+0x1;_0x2d6e18=join(_0x40aba1,_0x3195d5(0x211)+String(_0x140b44)[_0x3195d5(0x1fa)](0x10,'0')+'-'+_0x5ebc86+_0x3195d5(0x1ca)),_0x1a117d(_0x2d6e18,{'kind':_0x3195d5(0x1b6),'ticket':_0x140b44,'token':_0x5ebc86,'pid':process[_0x3195d5(0x1c4)],'createdAt':Date[_0x3195d5(0x21e)]()});}finally{_0x1962ab(_0x472108);}for(;;){_0x463cc7();if(!existsSync(_0x2d6e18))throw new Error('message\x20spool\x20lock\x20claim\x20expired\x20before\x20admission:\x20'+_0x2d6e18);if(Date[_0x3195d5(0x21e)]()>=_0x39ac56){_0x1962ab(_0x2d6e18);throw new Error('timed\x20out\x20acquiring\x20message\x20spool\x20lock:\x20'+_0x40aba1);}const _0x5b8e4c=_0x50e9d7(),_0x3bcb53=_0x5b8e4c[_0x3195d5(0x1b3)](_0x12747e=>_0x12747e[_0x3195d5(0x1f7)](_0x3195d5(0x21b))),_0x4b2477=_0x5b8e4c[_0x3195d5(0x1d1)](_0x9f4f69=>{const _0x42b864=ticketNumber(_0x9f4f69);return _0x42b864===null?[]:[{'file':_0x9f4f69,'ticket':_0x42b864}];})[_0x3195d5(0x1ff)]((_0x1d9bed,_0x2a0ddf)=>_0x1d9bed['ticket']-_0x2a0ddf[_0x3195d5(0x1b6)]||(_0x1d9bed[_0x3195d5(0x1db)]<_0x2a0ddf[_0x3195d5(0x1db)]?-0x1:_0x1d9bed[_0x3195d5(0x1db)]>_0x2a0ddf['file']?0x1:0x0));if(!_0x3bcb53&&_0x4b2477[0x0]?.[_0x3195d5(0x1db)]===_0x2d6e18['slice'](_0x40aba1[_0x3195d5(0x203)]+0x1))return _0x2d6e18;Atomics['wait'](new Int32Array(new SharedArrayBuffer(0x4)),0x0,0x0,_0x24e981);}}function _0x4c7c3a(_0x3fe0cb){const _0x2b2b2c=_0x26de26;_0x30673c();const _0x5c9dce=_0xff18d2(Date[_0x2b2b2c(0x21e)]()+_0x97ce88);try{return _0x3fe0cb();}finally{_0x1962ab(_0x5c9dce);}}function _0x4cffd0(_0x1c39f3){const _0x286ddb=_0x26de26;return _0x580873(_0x1c39f3)[_0x286ddb(0x203)];}function _0x580873(_0x5ef428){const _0x131183=_0x26de26,_0xff86bd=join(_0x61f545,_0x5ef428);let _0x29cb22=[];try{_0x29cb22=readdirSync(_0xff86bd)[_0x131183(0x1e1)](_0x1f4173=>_0x1f4173[_0x131183(0x1c7)](_0x131183(0x1ca)));}catch(_0x24a690){return _0x24a690[_0x131183(0x206)]!==_0x131183(0x1c0)&&void _0x13f758[_0x131183(0x1f2)](_0x131183(0x1dd),'failed\x20to\x20read\x20message\x20spool\x20directory',{'state':_0x5ef428,'error':String(_0x24a690)}),[];}const _0xf6225b=[];for(const _0x3b1e19 of _0x29cb22){try{const _0x4e5a53=JSON[_0x131183(0x201)](readFileSync(join(_0xff86bd,_0x3b1e19),_0x131183(0x21a)));if(_0x4e5a53?.['version']!==0x2||_0x4e5a53[_0x131183(0x1ba)]!==_0x5ef428||!_0x4e5a53['message']?.['id']||!_0x4e5a53[_0x131183(0x209)][_0x131183(0x20a)]?.[_0x131183(0x20d)]||!Number['isFinite'](_0x4e5a53[_0x131183(0x209)][_0x131183(0x1c5)])||_0x5ef428===_0x131183(0x1b7)&&!Number[_0x131183(0x21d)](_0x4e5a53[_0x131183(0x209)][_0x131183(0x1cc)])||_0x5ef428===_0x131183(0x1d8)&&!_0x4e5a53[_0x131183(0x1e0)])throw new Error('invalid\x20spool\x20record');_0xf6225b[_0x131183(0x1c8)](_0x4e5a53);}catch(_0x2f737b){void _0x13f758[_0x131183(0x1f2)](_0x131183(0x1dd),_0x131183(0x205),{'state':_0x5ef428,'file':_0x3b1e19,'error':String(_0x2f737b)});}}return _0xf6225b[_0x131183(0x1ff)]((_0x134328,_0x585152)=>{const _0x5d7099=_0x131183,_0x5d65b4=_0x134328[_0x5d7099(0x1c3)]??_0x134328[_0x5d7099(0x1c9)]??_0x134328[_0x5d7099(0x209)]['sentAt'],_0x5ab75a=_0x585152[_0x5d7099(0x1c3)]??_0x585152[_0x5d7099(0x1c9)]??_0x585152['message'][_0x5d7099(0x1c5)];return _0x5d65b4-_0x5ab75a;});}function _0x467fc8(){const _0x4b18db=_0x26de26;let _0x3aa71d=0x0;try{const _0xf6d66e=JSON[_0x4b18db(0x201)](readFileSync(_0x2521a5,_0x4b18db(0x21a)));if(typeof _0xf6d66e[_0x4b18db(0x1be)]===_0x4b18db(0x1e2)&&Number[_0x4b18db(0x215)](_0xf6d66e[_0x4b18db(0x1be)]))_0x3aa71d=_0xf6d66e[_0x4b18db(0x1be)];}catch{}const _0x5e9293=_0x3aa71d+0x1;return _0x5a797f(_0x2521a5,{'value':_0x5e9293}),_0x5e9293;}function _0x1faeb5(_0x127908,_0x574e2d){const _0x2a19eb=_0x26de26;try{const _0x4757d3=JSON[_0x2a19eb(0x201)](readFileSync(join(_0x61f545,_0x127908,_0x37095a(_0x574e2d)+_0x2a19eb(0x1ca)),'utf8'));if(_0x4757d3?.['version']!==0x2||_0x4757d3[_0x2a19eb(0x1ba)]!==_0x127908||_0x4757d3[_0x2a19eb(0x209)]?.['id']!==_0x574e2d['id']||_0x4757d3[_0x2a19eb(0x209)][_0x2a19eb(0x20a)]?.[_0x2a19eb(0x20d)]!==_0x574e2d[_0x2a19eb(0x20a)][_0x2a19eb(0x20d)]||_0x127908===_0x2a19eb(0x1d8)&&!_0x4757d3['ack'])return null;return _0x4757d3;}catch{return null;}}function _0x237177(){const _0xb1a99=_0x26de26;_0x40fa07=_0x580873(_0xb1a99(0x1b7))[_0xb1a99(0x1f5)](_0x65aa18=>_0x65aa18[_0xb1a99(0x209)]);}function _0x3bf8da(){const _0x2716c8=_0x26de26;_0x31d84d=_0x580873(_0x2716c8(0x1f9))[_0x2716c8(0x1f5)](_0x59da13=>_0x59da13[_0x2716c8(0x209)]);}function _0x37095a(_0x3796f9){const _0x4e230f=_0x26de26;return createHash('sha256')[_0x4e230f(0x1b0)](_0x3796f9['from'][_0x4e230f(0x20d)]+'\x00'+_0x3796f9['id'])[_0x4e230f(0x20b)](_0x4e230f(0x21c));}function _0x3447f6(_0x296de6){const _0x410c53=_0x26de26;return join(_0x61f545,'queued',_0x37095a(_0x296de6)+_0x410c53(0x1ca));}function _0x32ddde(_0x439ffb){const _0x502658=_0x26de26;return join(_0x61f545,_0x502658(0x1bb),_0x37095a(_0x439ffb)+_0x502658(0x1ca));}function _0xecacf7(_0x22689f){const _0x29a37c=_0x26de26;return join(_0x61f545,_0x29a37c(0x1b7),_0x37095a(_0x22689f)+_0x29a37c(0x1ca));}function _0x3132ac(_0x2021a4){const _0x2f6388=_0x26de26;return join(_0x61f545,_0x2f6388(0x1d8),_0x37095a(_0x2021a4)+_0x2f6388(0x1ca));}function _0x42f859(_0x1b6c58){const _0x133724=_0x26de26;for(const _0x20c28a of[_0x133724(0x1f9),_0x133724(0x1b7),_0x133724(0x1bb),_0x133724(0x1d8)]){if(_0x1faeb5(_0x20c28a,_0x1b6c58))return _0x20c28a;}return null;}function _0x262eeb(_0x390bf8){const _0x3dc27f=_0x26de26;return createHash('sha256')['update'](_0x390bf8[_0x3dc27f(0x20a)][_0x3dc27f(0x20d)]+'\x00'+_0x390bf8[_0x3dc27f(0x1bc)])[_0x3dc27f(0x20b)](_0x3dc27f(0x21c));}function _0x515231(_0x3e328e){const _0x199ae4=_0x26de26,_0x3c3c46=_0x226a91[_0x199ae4(0x213)](_0x262eeb(_0x3e328e));return typeof _0x3c3c46===_0x199ae4(0x1e2)&&_0x3c3c46>Date[_0x199ae4(0x21e)]()-_0x56d333;}function _0x2dc453(_0x5814f7){const _0x89b6b5=_0x26de26;_0x226a91[_0x89b6b5(0x20f)](_0x262eeb(_0x5814f7),Date[_0x89b6b5(0x21e)]());}function _0xd48ee7(_0x3fa9d4){const _0x5759cb=_0x26de26,_0x594a82=Date[_0x5759cb(0x21e)]()-_0x56d333;for(const _0x112890 of[_0x5759cb(0x1f9),_0x5759cb(0x1b7),_0x5759cb(0x1bb),_0x5759cb(0x1d8)]){for(const _0x592b53 of _0x580873(_0x112890)){const _0x5a359e=_0x592b53[_0x5759cb(0x1c9)]??_0x592b53[_0x5759cb(0x20c)]??_0x592b53[_0x5759cb(0x209)][_0x5759cb(0x1c5)];if(_0x5a359e>_0x594a82&&_0x592b53[_0x5759cb(0x209)]['id']!==_0x3fa9d4['id']&&_0x592b53[_0x5759cb(0x209)][_0x5759cb(0x20a)][_0x5759cb(0x20d)]===_0x3fa9d4[_0x5759cb(0x20a)][_0x5759cb(0x20d)]&&_0x592b53[_0x5759cb(0x209)][_0x5759cb(0x1bc)]===_0x3fa9d4[_0x5759cb(0x1bc)])return _0x592b53;}}return null;}function _0x224f92(_0x2887b9){mkdirSync(_0x2887b9,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x61f545,0x1c0),chmodSync(_0x2887b9,0x1c0);}function _0x35fd99(_0x45e618){const _0x44462f=_0x26de26;if(process[_0x44462f(0x1bf)]===_0x44462f(0x1d0))return;const _0x9a552=openSync(_0x45e618,'r');try{fsyncSync(_0x9a552);}finally{closeSync(_0x9a552);}}function _0x5a797f(_0x16652e,_0x24f07e){const _0x7c023c=_0x26de26,_0x2b1730=dirname(_0x16652e);_0x224f92(_0x2b1730);const _0x43cb87=join(_0x2b1730,'.'+process['pid']+'.'+Date[_0x7c023c(0x21e)]()+_0x7c023c(0x1cf)),_0x2ead6b=openSync(_0x43cb87,'w',0x180);try{writeSync(_0x2ead6b,JSON[_0x7c023c(0x1fb)](_0x24f07e)),fsyncSync(_0x2ead6b);}finally{closeSync(_0x2ead6b);}chmodSync(_0x43cb87,0x180),renameSync(_0x43cb87,_0x16652e),_0x35fd99(_0x2b1730);}function _0x9e591d(_0x27ae3f){const _0x12921f=_0x26de26;_0x5a797f(_0x3447f6(_0x27ae3f),{'version':0x2,'state':_0x12921f(0x1f9),'message':_0x27ae3f,'acceptedAt':Date[_0x12921f(0x21e)](),'sequence':_0x467fc8()});}function _0x5d0d4c(_0x3e9942,_0x12931b){const _0x6e8501=_0x26de26;return{'version':0x2,'messageId':_0x3e9942['id'],'fromEndpointId':_0x3e9942['from'][_0x6e8501(0x20d)],'toEndpointId':_0x13f758[_0x6e8501(0x20e)]??_0x6e8501(0x1af),'status':_0x12931b,'acknowledgedAt':Date['now']()};}function _0x2864f9(_0x57a3a8,_0x4ff1ea,_0x318bde){const _0x13f892=_0x26de26,_0x38d2ae=_0x1faeb5(_0x4ff1ea,_0x57a3a8);if(!_0x38d2ae){const _0x3b6b6c=_0x1faeb5(_0x13f892(0x1d8),_0x57a3a8)?.[_0x13f892(0x1e0)];if(_0x3b6b6c)return _0x3b6b6c;throw new Error(_0x13f892(0x1ed)+_0x4ff1ea+_0x13f892(0x1e4)+_0x57a3a8['id']);}const _0x3714ab=_0x5d0d4c(_0x57a3a8,_0x318bde);_0x5a797f(_0x3132ac(_0x57a3a8),{..._0x38d2ae,'state':_0x13f892(0x1d8),'message':_0x57a3a8,'ack':_0x3714ab});const _0x4aa816=join(_0x61f545,_0x4ff1ea,_0x37095a(_0x57a3a8)+_0x13f892(0x1ca));return unlinkSync(_0x4aa816),_0x35fd99(dirname(_0x4aa816)),_0x3714ab;}function _0x6ba3f9(_0x25c482,_0x4e23a2){const _0x564a86=_0x26de26,_0x2de166=_0x5d0d4c(_0x25c482,_0x564a86(0x1fc));return _0x5a797f(_0x3132ac(_0x25c482),{'version':0x2,'state':_0x564a86(0x1d8),'message':_0x25c482,'ack':_0x2de166,'acceptedAt':Date[_0x564a86(0x21e)](),'sequence':_0x467fc8(),'duplicateOfMessageId':_0x4e23a2[_0x564a86(0x209)]['id']}),_0x2de166;}function _0x5f082d(_0x313473,_0x2624bc=Infinity){const _0x307c2e=_0x26de26;if(_0x2624bc<=0x0)return[];if(_0x313473===_0x307c2e(0x1b2)){const _0x55bd04=_0x40fa07[_0x307c2e(0x1d4)](0x0,_0x2624bc);return _0x40fa07=_0x40fa07[_0x307c2e(0x1d4)](_0x55bd04[_0x307c2e(0x203)]),_0x55bd04;}const _0x25a7bd=_0x313473-0x1;if(_0x25a7bd<0x0||_0x25a7bd>=_0x40fa07[_0x307c2e(0x203)])return[];return _0x40fa07[_0x307c2e(0x1d5)](_0x25a7bd,0x1);}function _0x2d7a0f(){const _0x556208=_0x26de26;_0x237177();const _0x468663=Date[_0x556208(0x21e)](),_0x46cc6c=_0x40fa07[_0x556208(0x1e1)](_0x209455=>_0x209455[_0x556208(0x1cc)]<=_0x468663);return _0x40fa07=_0x40fa07['filter'](_0x2e30d0=>_0x2e30d0['expiresAt']>_0x468663),_0x46cc6c['map'](_0x4a6c56=>_0x2864f9(_0x4a6c56,_0x556208(0x1b7),_0x556208(0x1ea)));}async function _0x153305(){return _0x4c7c3a(_0x2d7a0f);}const _0x387832={'enqueue'(_0x5e444b){return _0x4c7c3a(()=>{const _0x459344=_0xd11a;if(_0x42f859(_0x5e444b))return![];const _0x41ccf4=_0xd48ee7(_0x5e444b);if(_0x41ccf4||_0x515231(_0x5e444b))return _0x6ba3f9(_0x5e444b,_0x41ccf4??{'version':0x2,'state':_0x459344(0x1f9),'message':_0x5e444b}),![];if(_0x4cffd0(_0x459344(0x1f9))+_0x4cffd0(_0x459344(0x1bb))>=_0x13f758['maxQueue'])return![];return _0x9e591d(_0x5e444b),_0x2dc453(_0x5e444b),_0x31d84d['push'](_0x5e444b),!![];});},'drain'(){return _0x4c7c3a(()=>{const _0x3b4016=_0xd11a,_0x4f1a78=_0x580873(_0x3b4016(0x1f9)),_0x3962ec=_0x4f1a78[_0x3b4016(0x1f5)](_0x49b6ae=>_0x49b6ae[_0x3b4016(0x209)]);for(const _0x50ff4e of _0x4f1a78){const _0x57fe7d=_0x50ff4e[_0x3b4016(0x209)];_0x5a797f(_0x32ddde(_0x57fe7d),{..._0x50ff4e,'state':_0x3b4016(0x1bb),'message':_0x57fe7d}),unlinkSync(_0x3447f6(_0x57fe7d)),_0x35fd99(dirname(_0x3447f6(_0x57fe7d)));}return _0x31d84d=[],_0x3962ec;});},async 'complete'(_0x2c02f7){const _0x2c9cca=_0x26de26;return _0x4c7c3a(()=>_0x2c02f7['map'](_0x3dd936=>_0x2864f9(_0x3dd936,'inflight',_0x2c9cca(0x1f1))));},async 'requeue'(_0x1f90c8){_0x4c7c3a(()=>{const _0x1574f0=_0xd11a;for(const _0x13828f of _0x1f90c8){const _0x1b8702=_0x1faeb5(_0x1574f0(0x1bb),_0x13828f);if(!_0x1b8702)continue;_0x5a797f(_0x3447f6(_0x13828f),{..._0x1b8702,'state':_0x1574f0(0x1f9),'message':_0x13828f}),unlinkSync(_0x32ddde(_0x13828f)),_0x35fd99(dirname(_0x32ddde(_0x13828f)));}_0x3bf8da();});},'duplicateAcknowledgement'(_0x5608cc){const _0x15e19a=_0x26de26,_0x5efbfc=_0x1faeb5(_0x15e19a(0x1d8),_0x5608cc);return _0x5efbfc?.[_0x15e19a(0x1e0)]?.[_0x15e19a(0x1b5)]===_0x15e19a(0x1fc)?_0x5efbfc[_0x15e19a(0x1e0)]:null;},'existingStatus'(_0x41f486){const _0x480a5b=_0x26de26;switch(_0x42f859(_0x41f486)){case _0x480a5b(0x1f9):case _0x480a5b(0x1bb):return _0x480a5b(0x1f9);case'held':return'held';case'done':{return _0x1faeb5(_0x480a5b(0x1d8),_0x41f486)?.[_0x480a5b(0x1e0)]?.[_0x480a5b(0x1b5)]??null;}default:return null;}},'isDebounced'(_0x1d0152){return _0x4c7c3a(()=>{const _0x297e74=_0xd11a;if(_0x42f859(_0x1d0152))return![];const _0x5ea092=_0xd48ee7(_0x1d0152);if(!_0x5ea092&&!_0x515231(_0x1d0152))return![];return _0x6ba3f9(_0x1d0152,_0x5ea092??{'version':0x2,'state':_0x297e74(0x1f9),'message':_0x1d0152}),!![];});},async 'refuse'(_0x200633){return _0x4c7c3a(()=>{const _0x360104=_0xd11a,_0x3ec7a0=_0x42f859(_0x200633);if(_0x3ec7a0===_0x360104(0x1d8))return _0x1faeb5('done',_0x200633)[_0x360104(0x1e0)];if(_0x3ec7a0)return _0x5d0d4c(_0x200633,'duplicate');const _0x2e7526=_0x5d0d4c(_0x200633,_0x360104(0x202));return _0x5a797f(_0x3132ac(_0x200633),{'version':0x2,'state':'done','message':_0x200633,'ack':_0x2e7526,'acceptedAt':Date[_0x360104(0x21e)](),'sequence':_0x467fc8()}),_0x2e7526;});},'pending'(){return[..._0x31d84d];},'size'(){const _0x5a526a=_0x26de26;return _0x31d84d[_0x5a526a(0x203)];},async 'hold'(_0x1019d0){return _0x4c7c3a(()=>{const _0x4ace9f=_0xd11a;if(_0x42f859(_0x1019d0))return![];const _0x50a840=_0xd48ee7(_0x1019d0);if(_0x50a840||_0x515231(_0x1019d0))return _0x6ba3f9(_0x1019d0,_0x50a840??{'version':0x2,'state':_0x4ace9f(0x1b7),'message':_0x1019d0}),![];if(_0x4cffd0(_0x4ace9f(0x1b7))>=_0x13f758[_0x4ace9f(0x1e7)])return![];const _0x51a27b=Date[_0x4ace9f(0x21e)](),_0x325a04={..._0x1019d0,'heldAt':_0x51a27b,'expiresAt':_0x51a27b+_0x21617b};return _0x5a797f(_0xecacf7(_0x1019d0),{'version':0x2,'state':_0x4ace9f(0x1b7),'message':_0x325a04,'heldAt':_0x51a27b,'expiresAt':_0x325a04[_0x4ace9f(0x1cc)],'acceptedAt':_0x51a27b,'sequence':_0x467fc8()}),_0x2dc453(_0x1019d0),_0x40fa07['push'](_0x325a04),!![];});},'held'(){return[..._0x40fa07];},'expireHeld':_0x153305,'pendingAcknowledgements'(){const _0x2ded3d=_0x26de26;return _0x4c7c3a(()=>_0x580873(_0x2ded3d(0x1d8))['filter'](_0x54fa29=>_0x54fa29[_0x2ded3d(0x1e0)]&&!_0x54fa29[_0x2ded3d(0x1df)])['map'](_0x4dd588=>_0x4dd588[_0x2ded3d(0x1e0)]));},async 'markAcknowledgementSent'(_0x3a780a){_0x4c7c3a(()=>{const _0x490e42=_0xd11a,_0x2562a8=_0x580873(_0x490e42(0x1d8))[_0x490e42(0x1f3)](_0x3c5d5f=>_0x3c5d5f['ack']?.[_0x490e42(0x1e6)]===_0x3a780a[_0x490e42(0x1e6)]&&_0x3c5d5f[_0x490e42(0x1e0)]['fromEndpointId']===_0x3a780a[_0x490e42(0x1da)]&&_0x3c5d5f[_0x490e42(0x1e0)][_0x490e42(0x200)]===_0x3a780a[_0x490e42(0x200)]);if(!_0x2562a8)return;_0x5a797f(_0x3132ac(_0x2562a8[_0x490e42(0x209)]),{..._0x2562a8,'ackSentAt':Date[_0x490e42(0x21e)]()});});},async 'acceptHeld'(_0x7bdb88){return _0x4c7c3a(()=>{const _0x2c59fc=_0xd11a;_0x2d7a0f(),_0x237177();const _0x2a127e=_0x4cffd0(_0x2c59fc(0x1f9))+_0x4cffd0(_0x2c59fc(0x1bb)),_0x20268d=_0x5f082d(_0x7bdb88,Math['max'](0x0,_0x13f758[_0x2c59fc(0x1bd)]-_0x2a127e));for(const _0x5e77ee of _0x20268d){const {heldAt:_0x5de3e2,expiresAt:_0x1d3408,..._0x704996}=_0x5e77ee,_0x493ab8=_0x1faeb5(_0x2c59fc(0x1b7),_0x5e77ee);_0x5a797f(_0x3447f6(_0x704996),{..._0x493ab8??{'version':0x2,'acceptedAt':Date[_0x2c59fc(0x21e)](),'sequence':_0x467fc8()},'state':_0x2c59fc(0x1f9),'message':_0x704996,'heldAt':undefined,'expiresAt':undefined,'ack':undefined}),unlinkSync(_0xecacf7(_0x5e77ee)),_0x35fd99(dirname(_0xecacf7(_0x5e77ee)));}return _0x3bf8da(),_0x237177(),_0x20268d;});},async 'dropHeld'(_0x2b08f7){return _0x4c7c3a(()=>{const _0x43b006=_0xd11a;_0x2d7a0f(),_0x237177();const _0x43b707=_0x5f082d(_0x2b08f7);for(const _0x45ccd1 of _0x43b707)_0x2864f9(_0x45ccd1,'held','dropped');return _0x237177(),_0x43b707[_0x43b006(0x203)];});},async 'loadHeld'(){_0x4c7c3a(()=>{const _0x42676c=_0xd11a,_0x4bc1c7=join(_0x61f545,_0x42676c(0x1bb));for(const _0x40948c of _0x580873(_0x42676c(0x1bb))){const _0x41d668=_0x40948c[_0x42676c(0x209)];!_0x1faeb5(_0x42676c(0x1d8),_0x41d668)&&_0x5a797f(_0x3447f6(_0x41d668),{..._0x40948c,'state':'queued','message':_0x41d668}),unlinkSync(_0x32ddde(_0x41d668)),_0x35fd99(_0x4bc1c7);}const _0x320d74=Date[_0x42676c(0x21e)]()-_0x215ad8;for(const _0x69f19b of _0x580873(_0x42676c(0x1d8))){typeof _0x69f19b[_0x42676c(0x1e0)]?.[_0x42676c(0x1b9)]===_0x42676c(0x1e2)&&_0x69f19b[_0x42676c(0x1e0)][_0x42676c(0x1b9)]<=_0x320d74&&unlinkSync(_0x3132ac(_0x69f19b[_0x42676c(0x209)]));}_0x3bf8da(),_0x237177();try{renameSync(_0x13f758[_0x42676c(0x214)],_0x13f758['inboxFile']+_0x42676c(0x1c1)+Date[_0x42676c(0x21e)]());}catch(_0x2aa955){_0x2aa955[_0x42676c(0x206)]!==_0x42676c(0x1c0)&&void _0x13f758[_0x42676c(0x1f2)](_0x42676c(0x1dd),_0x42676c(0x1d3),{'error':String(_0x2aa955)});}});},'withExclusiveLock'(_0x368fac){return _0x4c7c3a(_0x368fac);}};return _0x387832;}export function RateLimiter(_0x26f550){const _0x2d3ac8=new Map();return _0x5e02cc=>{const _0x4b9cc4=_0xd11a,_0x5a6e63=Date['now'](),_0x1568d6=_0x5a6e63-0xea60,_0x1aa681=(_0x2d3ac8[_0x4b9cc4(0x213)](_0x5e02cc)??[])[_0x4b9cc4(0x1e1)](_0x48c9b6=>_0x48c9b6>_0x1568d6);if(_0x1aa681['length']>=_0x26f550)return _0x2d3ac8[_0x4b9cc4(0x20f)](_0x5e02cc,_0x1aa681),![];return _0x1aa681['push'](_0x5a6e63),_0x2d3ac8[_0x4b9cc4(0x20f)](_0x5e02cc,_0x1aa681),!![];};}
1
+ (function(stringArrayFunction,_0x3144d5){const _0x23f986=_0xa85f,stringArray=stringArrayFunction();while(!![]){try{const _0x5b3ad7=-parseInt(_0x23f986(0x23f))/0x1+-parseInt(_0x23f986(0x23c))/0x2*(-parseInt(_0x23f986(0x214))/0x3)+parseInt(_0x23f986(0x208))/0x4+-parseInt(_0x23f986(0x247))/0x5+parseInt(_0x23f986(0x226))/0x6*(parseInt(_0x23f986(0x258))/0x7)+-parseInt(_0x23f986(0x217))/0x8*(parseInt(_0x23f986(0x218))/0x9)+parseInt(_0x23f986(0x22e))/0xa*(parseInt(_0x23f986(0x200))/0xb);if(_0x5b3ad7===_0x3144d5)break;else stringArray['push'](stringArray['shift']());}catch(_0x979e67){stringArray['push'](stringArray['shift']());}}}(_0x48c7,0x280ee));import{chmodSync,closeSync,existsSync,fsyncSync,mkdirSync,openSync,readFileSync,readdirSync,renameSync,statSync,unlinkSync,writeSync}from'node:fs';import{createHash,randomBytes}from'node:crypto';import{dirname,join,resolve}from'node:path';const _0x125ce5=0x5265c00,_0x5101e8=0x7530,_0x390509=0x1388,_0x554840=0xa;export function stableSpoolEndpointId(_0x3db9ff){const _0x456b4b=_0xa85f,_0xa4a9e=createHash(_0x456b4b(0x1fa))[_0x456b4b(0x1fd)](_0x456b4b(0x23b)+resolve(_0x3db9ff))[_0x456b4b(0x21e)](_0x456b4b(0x222));return _0x456b4b(0x210)+_0xa4a9e[_0x456b4b(0x1f6)](0x0,0x18);}export function stableSessionEndpointId(_0x299c86){const _0x1abf37=_0xa85f,_0x1f21f6=createHash('sha256')[_0x1abf37(0x1fd)](_0x1abf37(0x24b)+_0x299c86)[_0x1abf37(0x21e)](_0x1abf37(0x222));return _0x1abf37(0x1f8)+_0x1f21f6['slice'](0x0,0x18);}export function hasSpoolRecords(_0x22a07d,_0x9d1518){const _0x519b66=_0xa85f,_0x18814e=join(_0x22a07d[_0x519b66(0x260)],stableSessionEndpointId(_0x9d1518));for(const _0x2e3e5f of[_0x519b66(0x237),'held',_0x519b66(0x213),_0x519b66(0x1f3)]){try{if(readdirSync(join(_0x18814e,_0x2e3e5f))['some'](_0x39e177=>_0x39e177[_0x519b66(0x262)](_0x519b66(0x244))))return!![];}catch{}}return![];}function _0xa85f(_0x54758e,_0x5c6c52){_0x54758e=_0x54758e-0x1f1;const _0x48c715=_0x48c7();let _0xa85fe1=_0x48c715[_0x54758e];if(_0xa85f['TNyNHl']===undefined){var _0x36fa27=function(_0x36b6c1){const _0x1d40da='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a8cf6='',_0x125ce5='';for(let _0x5101e8=0x0,_0x390509,_0x554840,_0x4b25f8=0x0;_0x554840=_0x36b6c1['charAt'](_0x4b25f8++);~_0x554840&&(_0x390509=_0x5101e8%0x4?_0x390509*0x40+_0x554840:_0x554840,_0x5101e8++%0x4)?_0x2a8cf6+=String['fromCharCode'](0xff&_0x390509>>(-0x2*_0x5101e8&0x6)):0x0){_0x554840=_0x1d40da['indexOf'](_0x554840);}for(let _0x1c791d=0x0,_0x1cd0c8=_0x2a8cf6['length'];_0x1c791d<_0x1cd0c8;_0x1c791d++){_0x125ce5+='%'+('00'+_0x2a8cf6['charCodeAt'](_0x1c791d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x125ce5);};_0xa85f['qhPfjt']=_0x36fa27,_0xa85f['ZaSGgH']={},_0xa85f['TNyNHl']=!![];}const _0x3853db=_0x48c715[0x0];_0xa85f['SLCBQO']!==_0x3853db&&(_0xa85f['ZaSGgH']={},_0xa85f['SLCBQO']=_0x3853db);const _0x1f09ec=_0xa85f['ZaSGgH'][_0x54758e];return _0x1f09ec===undefined?(_0xa85fe1=_0xa85f['qhPfjt'](_0xa85fe1),_0xa85f['ZaSGgH'][_0x54758e]=_0xa85fe1):_0xa85fe1=_0x1f09ec,_0xa85fe1;}export function createSessionMessageQueue(_0x3520d4){const _0x4fb9af=_0xa85f;return MessageQueue({'endpointId':stableSessionEndpointId(_0x3520d4[_0x4fb9af(0x20c)]),'maxQueue':_0x3520d4[_0x4fb9af(0x25b)][_0x4fb9af(0x211)],'maxHeld':_0x3520d4[_0x4fb9af(0x25b)][_0x4fb9af(0x219)],'heldExpiryMs':_0x3520d4['config'][_0x4fb9af(0x242)],'inboxFile':_0x3520d4[_0x4fb9af(0x25b)][_0x4fb9af(0x231)],'logger':_0x3520d4[_0x4fb9af(0x204)]});}export function createProcessMessageQueue(_0x21a2ad){const _0x110518=_0xa85f;return MessageQueue({'endpointId':stableSpoolEndpointId(_0x21a2ad['directory']),'maxQueue':_0x21a2ad[_0x110518(0x25b)][_0x110518(0x211)],'maxHeld':_0x21a2ad[_0x110518(0x25b)][_0x110518(0x219)],'heldExpiryMs':_0x21a2ad[_0x110518(0x25b)][_0x110518(0x242)],'inboxFile':_0x21a2ad[_0x110518(0x25b)]['inboxFile'],'logger':_0x21a2ad['logger']});}function _0x4b25f8(_0x13eb2a,_0x1f4c85){const _0x46b685=_0xa85f;try{return readdirSync(join(_0x13eb2a,_0x1f4c85))[_0x46b685(0x248)](_0x3d3d56=>_0x3d3d56[_0x46b685(0x262)](_0x46b685(0x244)))[_0x46b685(0x23e)]();}catch(_0x3bf1d2){if(_0x3bf1d2[_0x46b685(0x212)]===_0x46b685(0x23d))return[];throw _0x3bf1d2;}}function _0x1c791d(_0x3c9b64){const _0x25bccc=_0xa85f;if(process[_0x25bccc(0x22a)]===_0x25bccc(0x21f))return;const _0x52faaf=openSync(_0x3c9b64,'r');try{fsyncSync(_0x52faaf);}finally{closeSync(_0x52faaf);}}function _0x1cd0c8(_0x30715e){mkdirSync(_0x30715e,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x30715e,0x1c0);}function _0x382803(_0x91ec5c,_0x45e60f){const _0x2fd2bc=_0xa85f,_0x1639f5=dirname(_0x91ec5c);_0x1cd0c8(_0x1639f5);const _0x3560a4=join(_0x1639f5,'.'+process[_0x2fd2bc(0x1fb)]+'.'+randomBytes(0x8)[_0x2fd2bc(0x266)](_0x2fd2bc(0x222))+_0x2fd2bc(0x22f)),_0x2bd69e=openSync(_0x3560a4,'wx',0x180);try{writeSync(_0x2bd69e,JSON['stringify'](_0x45e60f)),fsyncSync(_0x2bd69e);}finally{closeSync(_0x2bd69e);}chmodSync(_0x3560a4,0x180),renameSync(_0x3560a4,_0x91ec5c),_0x1c791d(_0x1639f5);}function _0x2bc6bb(_0x2e425b){const _0x44f127=_0xa85f;try{const _0xa242d9=JSON[_0x44f127(0x224)](readFileSync(_0x2e425b,'utf8'));return typeof _0xa242d9[_0x44f127(0x256)]===_0x44f127(0x1f9)&&Number[_0x44f127(0x246)](_0xa242d9['value'])?_0xa242d9[_0x44f127(0x256)]:null;}catch(_0x126395){if(_0x126395[_0x44f127(0x212)]===_0x44f127(0x23d))return null;throw _0x126395;}}function _0x110b33(_0x23ce4f,_0x43c8e8){const _0x3aa5ec=_0xa85f;try{return readFileSync(_0x23ce4f,_0x3aa5ec(0x221))===readFileSync(_0x43c8e8,_0x3aa5ec(0x221));}catch{return![];}}export async function migrateWorkspaceSpool(_0x5be3b9){const _0x5254ab=_0xa85f,_0x33c5b0=stableSpoolEndpointId(_0x5be3b9[_0x5254ab(0x22c)]),_0x50953a=stableSessionEndpointId(_0x5be3b9[_0x5254ab(0x239)]),_0x163a9f={'migrated':0x0,'deduplicated':0x0,'quarantined':0x0,'sourceEndpointId':_0x33c5b0,'targetEndpointId':_0x50953a};if(_0x33c5b0===_0x50953a)return _0x163a9f;const _0x1fb7ad=join(dirname(_0x5be3b9['config'][_0x5254ab(0x231)]),_0x5254ab(0x215),_0x33c5b0),_0x1cbe03=join(dirname(_0x5be3b9['config']['inboxFile']),_0x5254ab(0x215),_0x50953a);if(!existsSync(_0x1fb7ad))return _0x163a9f;const sourceHasState=[_0x5254ab(0x237),_0x5254ab(0x20d),'inflight','done'][_0x5254ab(0x201)](_0x58fe84=>_0x4b25f8(_0x1fb7ad,_0x58fe84)[_0x5254ab(0x216)]>0x0);if(!sourceHasState&&!existsSync(join(_0x1fb7ad,_0x5254ab(0x255))))return _0x163a9f;const _0x306d25={'maxQueue':_0x5be3b9[_0x5254ab(0x25b)]['maxQueue'],'maxHeld':_0x5be3b9['config'][_0x5254ab(0x219)],'heldExpiryMs':_0x5be3b9[_0x5254ab(0x25b)][_0x5254ab(0x242)],'inboxFile':_0x5be3b9[_0x5254ab(0x25b)][_0x5254ab(0x231)],'logger':_0x5be3b9[_0x5254ab(0x204)]},_0x562f23=new Map([[_0x33c5b0,MessageQueue({..._0x306d25,'endpointId':_0x33c5b0})],[_0x50953a,MessageQueue({..._0x306d25,'endpointId':_0x50953a})]]),[_0x39efa9,_0x2d9de1]=[_0x33c5b0,_0x50953a][_0x5254ab(0x23e)](),_0x30492e=[];_0x562f23[_0x5254ab(0x1f2)](_0x39efa9)[_0x5254ab(0x250)](()=>{const _0x3aae33=_0x5254ab;_0x562f23[_0x3aae33(0x1f2)](_0x2d9de1)[_0x3aae33(0x250)](()=>{const _0x28a964=_0x3aae33;for(const _0x57c6e1 of[_0x28a964(0x237),_0x28a964(0x20d),_0x28a964(0x213),_0x28a964(0x1f3)]){for(const _0x4912ab of _0x4b25f8(_0x1fb7ad,_0x57c6e1)){const _0x451bea=join(_0x1fb7ad,_0x57c6e1,_0x4912ab),_0x55eff0=[_0x28a964(0x237),'held',_0x28a964(0x213),'done']['map'](_0x53628e=>join(_0x1cbe03,_0x53628e,_0x4912ab))['filter'](_0x2539ca=>existsSync(_0x2539ca));if(_0x55eff0[_0x28a964(0x216)]===0x0){const _0x4ef0f7=join(_0x1cbe03,_0x57c6e1,_0x4912ab);renameSync(_0x451bea,_0x4ef0f7),_0x1c791d(join(_0x1fb7ad,_0x57c6e1)),_0x1c791d(join(_0x1cbe03,_0x57c6e1)),_0x163a9f[_0x28a964(0x21b)]++;continue;}if(_0x55eff0[_0x28a964(0x216)]===0x1&&_0x55eff0[0x0]===join(_0x1cbe03,_0x57c6e1,_0x4912ab)&&_0x110b33(_0x451bea,_0x55eff0[0x0])){unlinkSync(_0x451bea),_0x1c791d(join(_0x1fb7ad,_0x57c6e1)),_0x163a9f[_0x28a964(0x251)]++;continue;}const base=join(_0x1cbe03,_0x28a964(0x263),_0x33c5b0,_0x57c6e1);_0x1cd0c8(base);let _0x1d6abd=join(base,_0x4912ab);if(existsSync(_0x1d6abd)&&!_0x110b33(_0x451bea,_0x1d6abd)){const _0x31ccd0=createHash('sha256')[_0x28a964(0x1fd)](readFileSync(_0x451bea))[_0x28a964(0x21e)](_0x28a964(0x222))[_0x28a964(0x1f6)](0x0,0x10);_0x1d6abd=join(base,_0x4912ab[_0x28a964(0x1f6)](0x0,-0x5)+'.'+_0x31ccd0+_0x28a964(0x244));}existsSync(_0x1d6abd)&&_0x110b33(_0x451bea,_0x1d6abd)?unlinkSync(_0x451bea):(renameSync(_0x451bea,_0x1d6abd),_0x1c791d(base)),_0x1c791d(join(_0x1fb7ad,_0x57c6e1)),_0x163a9f[_0x28a964(0x24f)]++,_0x30492e[_0x28a964(0x22d)]({'state':_0x57c6e1,'file':_0x4912ab,'quarantine':_0x1d6abd});}}const _0x5565c5=join(_0x1fb7ad,'sequence'),_0xc1a0ca=join(_0x1cbe03,'sequence'),_0x381d6f=_0x2bc6bb(_0x5565c5),_0x8844f6=_0x2bc6bb(_0xc1a0ca);if(_0x381d6f!==null){const _0x4c1e23=Math[_0x28a964(0x207)](_0x381d6f,_0x8844f6??0x0);if(_0x8844f6!==_0x4c1e23)_0x382803(_0xc1a0ca,{'value':_0x4c1e23});unlinkSync(_0x5565c5),_0x1c791d(_0x1fb7ad);}_0x382803(join(_0x1cbe03,_0x28a964(0x227),_0x33c5b0+'.json'),{'version':0x1,'sourceEndpointId':_0x33c5b0,'targetEndpointId':_0x50953a,'completedAt':Date[_0x28a964(0x209)]()});});});for(const _0x447125 of _0x30492e){await _0x5be3b9[_0x5254ab(0x204)](_0x5254ab(0x24c),'workspace\x20spool\x20record\x20quarantined\x20during\x20session\x20migration',{'sourceEndpointId':_0x33c5b0,'targetEndpointId':_0x50953a,'state':_0x447125[_0x5254ab(0x241)],'file':_0x447125[_0x5254ab(0x253)],'quarantine':_0x447125[_0x5254ab(0x24d)]});}return await _0x5be3b9['logger']('info',_0x5254ab(0x21d),{..._0x163a9f}),_0x163a9f;}export function MessageQueue(_0x146643){const _0x1905bc=_0xa85f;let _0x17bbf5=[],_0x24d189=[];const _0x10c0d1=join(dirname(_0x146643[_0x1905bc(0x231)]),_0x1905bc(0x215),_0x146643[_0x1905bc(0x202)]??_0x1905bc(0x1fc)),_0x1120aa=_0x146643[_0x1905bc(0x242)]??0x493e0,_0xf33c06=_0x146643[_0x1905bc(0x225)]??0x3e8,_0x525c00=new Map(),_0xec5d76=join(_0x10c0d1,_0x1905bc(0x22b)),_0x466095=join(_0x10c0d1,_0x1905bc(0x255));function _0x5ed2fc(){const _0x31f9ac=_0x1905bc;mkdirSync(_0x10c0d1,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x10c0d1,0x1c0);for(const _0xb779d9 of['queued',_0x31f9ac(0x20d),_0x31f9ac(0x213),_0x31f9ac(0x1f3)]){const _0x76d9c3=join(_0x10c0d1,_0xb779d9);mkdirSync(_0x76d9c3,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x76d9c3,0x1c0);}mkdirSync(_0xec5d76,{'recursive':!![],'mode':0x1c0}),chmodSync(_0xec5d76,0x1c0);}function _0x44f3dc(_0x3ff832){const _0x2abd96=_0x1905bc;try{unlinkSync(_0x3ff832),_0x223075(_0xec5d76);}catch(_0x1b0c6b){if(_0x1b0c6b[_0x2abd96(0x212)]!==_0x2abd96(0x23d))throw _0x1b0c6b;}}function _0x58c578(_0x1d45f2,_0xd33bf2){const _0x25c6eb=_0x1905bc,_0x16c51e=openSync(_0x1d45f2,'wx',0x180);try{writeSync(_0x16c51e,JSON[_0x25c6eb(0x24e)](_0xd33bf2)),fsyncSync(_0x16c51e);}catch(_0x550113){try{closeSync(_0x16c51e);}finally{_0x44f3dc(_0x1d45f2);}throw _0x550113;}try{closeSync(_0x16c51e),_0x223075(_0xec5d76);}catch(_0xe5e8f6){_0x44f3dc(_0x1d45f2);throw _0xe5e8f6;}}function _0x4b5400(){const _0x16478a=_0x1905bc;return readdirSync(_0xec5d76)['filter'](_0x3ced2e=>/^choosing-[a-f0-9]{32}\.json$/[_0x16478a(0x21c)](_0x3ced2e)||/^ticket-\d{16}-[a-f0-9]{32}\.json$/['test'](_0x3ced2e));}function _0x27eb41(){const _0x4ccbd5=_0x1905bc;for(const _0x5721d3 of _0x4b5400()){const _0x12817f=join(_0xec5d76,_0x5721d3);try{if(Date[_0x4ccbd5(0x209)]()-statSync(_0x12817f)[_0x4ccbd5(0x240)]>_0x5101e8)_0x44f3dc(_0x12817f);}catch(_0x2c8de0){if(_0x2c8de0[_0x4ccbd5(0x212)]!==_0x4ccbd5(0x23d))throw _0x2c8de0;}}}function ticketNumber(_0x12b745){const _0x2d0717=_0x1905bc,_0x1b2d25=/^ticket-(\d{16})-[a-f0-9]{32}\.json$/[_0x2d0717(0x20f)](_0x12b745);return _0x1b2d25?Number(_0x1b2d25[0x1]):null;}function _0x6738f8(_0x3d211c){const _0x533c9b=_0x1905bc,_0x49b7ca=randomBytes(0x10)[_0x533c9b(0x266)](_0x533c9b(0x222)),_0x357bc3=join(_0xec5d76,_0x533c9b(0x25e)+_0x49b7ca+_0x533c9b(0x244));let _0x5efbdc=null;_0x58c578(_0x357bc3,{'kind':_0x533c9b(0x235),'token':_0x49b7ca,'pid':process[_0x533c9b(0x1fb)],'createdAt':Date[_0x533c9b(0x209)]()});try{_0x27eb41();const _0x416d3e=_0x4b5400()['reduce']((_0x1595f4,_0x1cf225)=>Math[_0x533c9b(0x207)](_0x1595f4,ticketNumber(_0x1cf225)??0x0),0x0);if(Date[_0x533c9b(0x209)]()>=_0x3d211c)throw new Error(_0x533c9b(0x203)+_0xec5d76);const _0xb606df=_0x416d3e+0x1;_0x5efbdc=join(_0xec5d76,_0x533c9b(0x21a)+String(_0xb606df)[_0x533c9b(0x205)](0x10,'0')+'-'+_0x49b7ca+_0x533c9b(0x244)),_0x58c578(_0x5efbdc,{'kind':_0x533c9b(0x259),'ticket':_0xb606df,'token':_0x49b7ca,'pid':process[_0x533c9b(0x1fb)],'createdAt':Date['now']()});}finally{_0x44f3dc(_0x357bc3);}for(;;){_0x27eb41();if(!existsSync(_0x5efbdc))throw new Error(_0x533c9b(0x1f1)+_0x5efbdc);if(Date[_0x533c9b(0x209)]()>=_0x3d211c){_0x44f3dc(_0x5efbdc);throw new Error(_0x533c9b(0x203)+_0xec5d76);}const _0x5b10fb=_0x4b5400(),_0x4b6f27=_0x5b10fb[_0x533c9b(0x201)](_0x225dc1=>_0x225dc1[_0x533c9b(0x23a)](_0x533c9b(0x25e))),_0x1d57f4=_0x5b10fb[_0x533c9b(0x265)](_0x565c83=>{const _0x48aed7=ticketNumber(_0x565c83);return _0x48aed7===null?[]:[{'file':_0x565c83,'ticket':_0x48aed7}];})[_0x533c9b(0x23e)]((_0x15f8b5,_0xdf6e25)=>_0x15f8b5[_0x533c9b(0x259)]-_0xdf6e25['ticket']||(_0x15f8b5[_0x533c9b(0x253)]<_0xdf6e25[_0x533c9b(0x253)]?-0x1:_0x15f8b5[_0x533c9b(0x253)]>_0xdf6e25[_0x533c9b(0x253)]?0x1:0x0));if(!_0x4b6f27&&_0x1d57f4[0x0]?.[_0x533c9b(0x253)]===_0x5efbdc[_0x533c9b(0x1f6)](_0xec5d76[_0x533c9b(0x216)]+0x1))return _0x5efbdc;Atomics[_0x533c9b(0x25f)](new Int32Array(new SharedArrayBuffer(0x4)),0x0,0x0,_0x554840);}}function _0x526809(_0x504720){const _0x1426fd=_0x1905bc;_0x5ed2fc();const _0x3efde3=_0x6738f8(Date[_0x1426fd(0x209)]()+_0x390509);try{return _0x504720();}finally{_0x44f3dc(_0x3efde3);}}function _0x4096e3(_0x178b6b){const _0x354918=_0x1905bc;return _0x5920a0(_0x178b6b)[_0x354918(0x216)];}function _0x5920a0(_0x4f2d29){const _0x327d70=_0x1905bc,_0x48d370=join(_0x10c0d1,_0x4f2d29);let _0x251884=[];try{_0x251884=readdirSync(_0x48d370)[_0x327d70(0x248)](_0x34f784=>_0x34f784['endsWith'](_0x327d70(0x244)));}catch(_0x332be1){return _0x332be1[_0x327d70(0x212)]!==_0x327d70(0x23d)&&void _0x146643[_0x327d70(0x204)]('warn',_0x327d70(0x234),{'state':_0x4f2d29,'error':String(_0x332be1)}),[];}const _0x54dba5=[];for(const _0x1ac07e of _0x251884){try{const _0x163fa8=JSON['parse'](readFileSync(join(_0x48d370,_0x1ac07e),'utf8'));if(_0x163fa8?.[_0x327d70(0x236)]!==0x2||_0x163fa8[_0x327d70(0x241)]!==_0x4f2d29||!_0x163fa8[_0x327d70(0x1ff)]?.['id']||!_0x163fa8[_0x327d70(0x1ff)][_0x327d70(0x229)]?.[_0x327d70(0x254)]||!Number[_0x327d70(0x264)](_0x163fa8['message'][_0x327d70(0x25d)])||_0x4f2d29===_0x327d70(0x20d)&&!Number['isFinite'](_0x163fa8[_0x327d70(0x1ff)][_0x327d70(0x230)])||_0x4f2d29===_0x327d70(0x1f3)&&!_0x163fa8[_0x327d70(0x25a)])throw new Error('invalid\x20spool\x20record');_0x54dba5[_0x327d70(0x22d)](_0x163fa8);}catch(_0x598339){void _0x146643[_0x327d70(0x204)](_0x327d70(0x24c),_0x327d70(0x25c),{'state':_0x4f2d29,'file':_0x1ac07e,'error':String(_0x598339)});}}return _0x54dba5[_0x327d70(0x23e)]((_0x5bad89,_0x18d26e)=>{const _0x55c547=_0x327d70,_0x40043d=_0x5bad89[_0x55c547(0x255)]??_0x5bad89[_0x55c547(0x1f5)]??_0x5bad89['message'][_0x55c547(0x25d)],_0x2d9777=_0x18d26e[_0x55c547(0x255)]??_0x18d26e[_0x55c547(0x1f5)]??_0x18d26e[_0x55c547(0x1ff)]['sentAt'];return _0x40043d-_0x2d9777;});}function _0x46ec14(){const _0x1e7c7c=_0x1905bc;let _0x43f50f=0x0;try{const _0x585f75=JSON[_0x1e7c7c(0x224)](readFileSync(_0x466095,_0x1e7c7c(0x221)));if(typeof _0x585f75[_0x1e7c7c(0x256)]===_0x1e7c7c(0x1f9)&&Number[_0x1e7c7c(0x246)](_0x585f75['value']))_0x43f50f=_0x585f75[_0x1e7c7c(0x256)];}catch{}const _0x2349e1=_0x43f50f+0x1;return _0x6225c3(_0x466095,{'value':_0x2349e1}),_0x2349e1;}function _0x163d87(_0x106f36,_0x21e3e0){const _0x2e9d71=_0x1905bc;try{const _0x415d44=JSON[_0x2e9d71(0x224)](readFileSync(join(_0x10c0d1,_0x106f36,_0x3a92f0(_0x21e3e0)+_0x2e9d71(0x244)),_0x2e9d71(0x221)));if(_0x415d44?.[_0x2e9d71(0x236)]!==0x2||_0x415d44[_0x2e9d71(0x241)]!==_0x106f36||_0x415d44[_0x2e9d71(0x1ff)]?.['id']!==_0x21e3e0['id']||_0x415d44[_0x2e9d71(0x1ff)][_0x2e9d71(0x229)]?.[_0x2e9d71(0x254)]!==_0x21e3e0[_0x2e9d71(0x229)][_0x2e9d71(0x254)]||_0x106f36==='done'&&!_0x415d44[_0x2e9d71(0x25a)])return null;return _0x415d44;}catch{return null;}}function _0xabdc7f(){const _0x484338=_0x1905bc;_0x24d189=_0x5920a0(_0x484338(0x20d))['map'](_0x47cb6b=>_0x47cb6b[_0x484338(0x1ff)]);}function _0x2583be(){const _0x2d00aa=_0x1905bc;_0x17bbf5=_0x5920a0('queued')['map'](_0x1550cc=>_0x1550cc[_0x2d00aa(0x1ff)]);}function _0x3a92f0(_0x13d530){const _0x588a76=_0x1905bc;return createHash(_0x588a76(0x1fa))[_0x588a76(0x1fd)](_0x13d530[_0x588a76(0x229)][_0x588a76(0x254)]+'\x00'+_0x13d530['id'])[_0x588a76(0x21e)](_0x588a76(0x222));}function _0x17c1c0(_0x36ed3f){const _0x5d550a=_0x1905bc;return join(_0x10c0d1,_0x5d550a(0x237),_0x3a92f0(_0x36ed3f)+_0x5d550a(0x244));}function _0xe0fef2(_0x45d10b){const _0x214f6d=_0x1905bc;return join(_0x10c0d1,'inflight',_0x3a92f0(_0x45d10b)+_0x214f6d(0x244));}function _0x5db841(_0x826691){const _0x4f89df=_0x1905bc;return join(_0x10c0d1,_0x4f89df(0x20d),_0x3a92f0(_0x826691)+'.json');}function _0x31e723(_0x192ae5){const _0x4c66d6=_0x1905bc;return join(_0x10c0d1,'done',_0x3a92f0(_0x192ae5)+_0x4c66d6(0x244));}function _0x36a1fa(_0x5ad3c0){const _0x52e3e8=_0x1905bc;for(const _0x456e5f of['queued',_0x52e3e8(0x20d),_0x52e3e8(0x213),_0x52e3e8(0x1f3)]){if(_0x163d87(_0x456e5f,_0x5ad3c0))return _0x456e5f;}return null;}function _0x349f22(_0x4e09b6){const _0x135af7=_0x1905bc;return createHash(_0x135af7(0x1fa))[_0x135af7(0x1fd)](_0x4e09b6[_0x135af7(0x229)][_0x135af7(0x254)]+'\x00'+_0x4e09b6['text'])[_0x135af7(0x21e)](_0x135af7(0x222));}function _0x45aa9d(_0x1384dd){const _0x4e1b9a=_0x1905bc,_0x1dcf8f=_0x525c00[_0x4e1b9a(0x1f2)](_0x349f22(_0x1384dd));return typeof _0x1dcf8f===_0x4e1b9a(0x1f9)&&_0x1dcf8f>Date['now']()-_0xf33c06;}function _0x4961b8(_0x21eeeb){const _0xac0e9b=_0x1905bc;_0x525c00[_0xac0e9b(0x233)](_0x349f22(_0x21eeeb),Date[_0xac0e9b(0x209)]());}function _0x5dd440(_0x453ef1){const _0x3b926c=_0x1905bc,_0x526a97=Date[_0x3b926c(0x209)]()-_0xf33c06;for(const _0x439aad of[_0x3b926c(0x237),_0x3b926c(0x20d),'inflight',_0x3b926c(0x1f3)]){for(const _0x4a66b6 of _0x5920a0(_0x439aad)){const _0x4dc191=_0x4a66b6[_0x3b926c(0x1f5)]??_0x4a66b6[_0x3b926c(0x206)]??_0x4a66b6[_0x3b926c(0x1ff)][_0x3b926c(0x25d)];if(_0x4dc191>_0x526a97&&_0x4a66b6[_0x3b926c(0x1ff)]['id']!==_0x453ef1['id']&&_0x4a66b6['message']['from'][_0x3b926c(0x254)]===_0x453ef1[_0x3b926c(0x229)][_0x3b926c(0x254)]&&_0x4a66b6['message'][_0x3b926c(0x232)]===_0x453ef1[_0x3b926c(0x232)])return _0x4a66b6;}}return null;}function _0x1871e8(_0x5cbc2a){mkdirSync(_0x5cbc2a,{'recursive':!![],'mode':0x1c0}),chmodSync(_0x10c0d1,0x1c0),chmodSync(_0x5cbc2a,0x1c0);}function _0x223075(_0x22c1ca){const _0x27bf49=_0x1905bc;if(process[_0x27bf49(0x22a)]===_0x27bf49(0x21f))return;const _0x3db1c4=openSync(_0x22c1ca,'r');try{fsyncSync(_0x3db1c4);}finally{closeSync(_0x3db1c4);}}function _0x6225c3(_0x333532,_0x57f5cc){const _0x223a20=_0x1905bc,_0xc1069=dirname(_0x333532);_0x1871e8(_0xc1069);const _0x36dee0=join(_0xc1069,'.'+process['pid']+'.'+Date[_0x223a20(0x209)]()+'.tmp'),_0x364aac=openSync(_0x36dee0,'w',0x180);try{writeSync(_0x364aac,JSON[_0x223a20(0x24e)](_0x57f5cc)),fsyncSync(_0x364aac);}finally{closeSync(_0x364aac);}chmodSync(_0x36dee0,0x180),renameSync(_0x36dee0,_0x333532),_0x223075(_0xc1069);}function _0x5177e0(_0x4c9db5){const _0xec90e8=_0x1905bc;_0x6225c3(_0x17c1c0(_0x4c9db5),{'version':0x2,'state':_0xec90e8(0x237),'message':_0x4c9db5,'acceptedAt':Date['now'](),'sequence':_0x46ec14()});}function _0x295191(_0x53b218,_0x4cbdea){const _0x533580=_0x1905bc;return{'version':0x2,'messageId':_0x53b218['id'],'fromEndpointId':_0x53b218[_0x533580(0x229)][_0x533580(0x254)],'toEndpointId':_0x146643['endpointId']??_0x533580(0x1fc),'status':_0x4cbdea,'acknowledgedAt':Date['now']()};}function _0x3b65ec(_0x5f469c,_0x18bf11,_0x29ddf8){const _0x1ae19d=_0x1905bc,_0x544356=_0x163d87(_0x18bf11,_0x5f469c);if(!_0x544356){const _0x2b47a7=_0x163d87(_0x1ae19d(0x1f3),_0x5f469c)?.[_0x1ae19d(0x25a)];if(_0x2b47a7)return _0x2b47a7;throw new Error(_0x1ae19d(0x220)+_0x18bf11+_0x1ae19d(0x20a)+_0x5f469c['id']);}const _0x2d5456=_0x295191(_0x5f469c,_0x29ddf8);_0x6225c3(_0x31e723(_0x5f469c),{..._0x544356,'state':_0x1ae19d(0x1f3),'message':_0x5f469c,'ack':_0x2d5456});const _0x3123e4=join(_0x10c0d1,_0x18bf11,_0x3a92f0(_0x5f469c)+_0x1ae19d(0x244));return unlinkSync(_0x3123e4),_0x223075(dirname(_0x3123e4)),_0x2d5456;}function _0x50ee53(_0x1e1059,_0x215ceb){const _0x58edef=_0x1905bc,_0x2334b1=_0x295191(_0x1e1059,_0x58edef(0x243));return _0x6225c3(_0x31e723(_0x1e1059),{'version':0x2,'state':_0x58edef(0x1f3),'message':_0x1e1059,'ack':_0x2334b1,'acceptedAt':Date[_0x58edef(0x209)](),'sequence':_0x46ec14(),'duplicateOfMessageId':_0x215ceb[_0x58edef(0x1ff)]['id']}),_0x2334b1;}function _0x184f1d(_0x238e62,_0x3c81e9=Infinity){const _0x5c0ee0=_0x1905bc;if(_0x3c81e9<=0x0)return[];if(_0x238e62===_0x5c0ee0(0x238)){const _0x33252a=_0x24d189[_0x5c0ee0(0x1f6)](0x0,_0x3c81e9);return _0x24d189=_0x24d189[_0x5c0ee0(0x1f6)](_0x33252a[_0x5c0ee0(0x216)]),_0x33252a;}const _0x59953b=_0x238e62-0x1;if(_0x59953b<0x0||_0x59953b>=_0x24d189['length'])return[];return _0x24d189[_0x5c0ee0(0x20e)](_0x59953b,0x1);}function _0x1a2345(){const _0x400934=_0x1905bc;_0xabdc7f();const _0x26f8be=Date[_0x400934(0x209)](),_0x5f55a4=_0x24d189[_0x400934(0x248)](_0x5012cf=>_0x5012cf['expiresAt']<=_0x26f8be);return _0x24d189=_0x24d189[_0x400934(0x248)](_0x4aa525=>_0x4aa525[_0x400934(0x230)]>_0x26f8be),_0x5f55a4[_0x400934(0x20b)](_0x4f1b56=>_0x3b65ec(_0x4f1b56,_0x400934(0x20d),_0x400934(0x245)));}async function _0x56ea3c(){return _0x526809(_0x1a2345);}const _0x55cafb={'enqueue'(_0x65af24){return _0x526809(()=>{const _0x253726=_0xa85f;if(_0x36a1fa(_0x65af24))return![];const _0xfc0628=_0x5dd440(_0x65af24);if(_0xfc0628||_0x45aa9d(_0x65af24))return _0x50ee53(_0x65af24,_0xfc0628??{'version':0x2,'state':_0x253726(0x237),'message':_0x65af24}),![];if(_0x4096e3(_0x253726(0x237))+_0x4096e3(_0x253726(0x213))>=_0x146643[_0x253726(0x211)])return![];return _0x5177e0(_0x65af24),_0x4961b8(_0x65af24),_0x17bbf5[_0x253726(0x22d)](_0x65af24),!![];});},'drain'(){return _0x526809(()=>{const _0x147283=_0xa85f,_0x58288a=_0x5920a0(_0x147283(0x237)),_0x23f7aa=_0x58288a[_0x147283(0x20b)](_0x41d481=>_0x41d481[_0x147283(0x1ff)]);for(const _0x5ed4f5 of _0x58288a){const _0x3261e9=_0x5ed4f5[_0x147283(0x1ff)];_0x6225c3(_0xe0fef2(_0x3261e9),{..._0x5ed4f5,'state':_0x147283(0x213),'message':_0x3261e9}),unlinkSync(_0x17c1c0(_0x3261e9)),_0x223075(dirname(_0x17c1c0(_0x3261e9)));}return _0x17bbf5=[],_0x23f7aa;});},async 'complete'(_0x3a6327){const _0x3a59e7=_0x1905bc;return _0x526809(()=>_0x3a6327[_0x3a59e7(0x20b)](_0xeac82d=>_0x3b65ec(_0xeac82d,_0x3a59e7(0x213),'delivered')));},async 'requeue'(_0x28ec0e){_0x526809(()=>{for(const _0x1bd827 of _0x28ec0e){const _0x48c65e=_0x163d87('inflight',_0x1bd827);if(!_0x48c65e)continue;_0x6225c3(_0x17c1c0(_0x1bd827),{..._0x48c65e,'state':'queued','message':_0x1bd827}),unlinkSync(_0xe0fef2(_0x1bd827)),_0x223075(dirname(_0xe0fef2(_0x1bd827)));}_0x2583be();});},'duplicateAcknowledgement'(_0x1d9c9c){const _0x3e86ed=_0x1905bc,_0x4cbed9=_0x163d87(_0x3e86ed(0x1f3),_0x1d9c9c);return _0x4cbed9?.['ack']?.[_0x3e86ed(0x249)]===_0x3e86ed(0x243)?_0x4cbed9[_0x3e86ed(0x25a)]:null;},'existingStatus'(_0x3e3ed0){const _0x1924bb=_0x1905bc;switch(_0x36a1fa(_0x3e3ed0)){case _0x1924bb(0x237):case _0x1924bb(0x213):return _0x1924bb(0x237);case'held':return _0x1924bb(0x20d);case _0x1924bb(0x1f3):{return _0x163d87(_0x1924bb(0x1f3),_0x3e3ed0)?.[_0x1924bb(0x25a)]?.[_0x1924bb(0x249)]??null;}default:return null;}},'isDebounced'(_0x5e0059){return _0x526809(()=>{const _0x3bfa87=_0xa85f;if(_0x36a1fa(_0x5e0059))return![];const _0x2f149c=_0x5dd440(_0x5e0059);if(!_0x2f149c&&!_0x45aa9d(_0x5e0059))return![];return _0x50ee53(_0x5e0059,_0x2f149c??{'version':0x2,'state':_0x3bfa87(0x237),'message':_0x5e0059}),!![];});},async 'refuse'(_0x1bb4ed){return _0x526809(()=>{const _0x9e3754=_0xa85f,_0x1e5b6b=_0x36a1fa(_0x1bb4ed);if(_0x1e5b6b===_0x9e3754(0x1f3))return _0x163d87(_0x9e3754(0x1f3),_0x1bb4ed)[_0x9e3754(0x25a)];if(_0x1e5b6b)return _0x295191(_0x1bb4ed,_0x9e3754(0x243));const _0x498d58=_0x295191(_0x1bb4ed,'refused');return _0x6225c3(_0x31e723(_0x1bb4ed),{'version':0x2,'state':_0x9e3754(0x1f3),'message':_0x1bb4ed,'ack':_0x498d58,'acceptedAt':Date[_0x9e3754(0x209)](),'sequence':_0x46ec14()}),_0x498d58;});},'pending'(){return[..._0x17bbf5];},'size'(){const _0x5b943c=_0x1905bc;return _0x17bbf5[_0x5b943c(0x216)];},async 'hold'(_0x34a329){return _0x526809(()=>{const _0x284cf2=_0xa85f;if(_0x36a1fa(_0x34a329))return![];const _0x1fe765=_0x5dd440(_0x34a329);if(_0x1fe765||_0x45aa9d(_0x34a329))return _0x50ee53(_0x34a329,_0x1fe765??{'version':0x2,'state':'held','message':_0x34a329}),![];if(_0x4096e3(_0x284cf2(0x20d))>=_0x146643[_0x284cf2(0x219)])return![];const _0x13bc7f=Date[_0x284cf2(0x209)](),_0x1397d5={..._0x34a329,'heldAt':_0x13bc7f,'expiresAt':_0x13bc7f+_0x1120aa};return _0x6225c3(_0x5db841(_0x34a329),{'version':0x2,'state':_0x284cf2(0x20d),'message':_0x1397d5,'heldAt':_0x13bc7f,'expiresAt':_0x1397d5['expiresAt'],'acceptedAt':_0x13bc7f,'sequence':_0x46ec14()}),_0x4961b8(_0x34a329),_0x24d189[_0x284cf2(0x22d)](_0x1397d5),!![];});},'held'(){return[..._0x24d189];},'expireHeld':_0x56ea3c,'pendingAcknowledgements'(){const _0x2243a3=_0x1905bc;return _0x526809(()=>_0x5920a0(_0x2243a3(0x1f3))['filter'](_0x2b89d9=>_0x2b89d9[_0x2243a3(0x25a)]&&!_0x2b89d9[_0x2243a3(0x252)])[_0x2243a3(0x20b)](_0x457683=>_0x457683[_0x2243a3(0x25a)]));},async 'markAcknowledgementSent'(_0x19b25c){_0x526809(()=>{const _0x18640a=_0xa85f,_0x2e0ae1=_0x5920a0(_0x18640a(0x1f3))[_0x18640a(0x228)](_0x1416e1=>_0x1416e1['ack']?.['messageId']===_0x19b25c[_0x18640a(0x1fe)]&&_0x1416e1['ack'][_0x18640a(0x1f4)]===_0x19b25c[_0x18640a(0x1f4)]&&_0x1416e1[_0x18640a(0x25a)][_0x18640a(0x261)]===_0x19b25c[_0x18640a(0x261)]);if(!_0x2e0ae1)return;_0x6225c3(_0x31e723(_0x2e0ae1[_0x18640a(0x1ff)]),{..._0x2e0ae1,'ackSentAt':Date[_0x18640a(0x209)]()});});},async 'acceptHeld'(_0x3c15cb){return _0x526809(()=>{const _0x313ba7=_0xa85f;_0x1a2345(),_0xabdc7f();const _0x2a739c=_0x4096e3(_0x313ba7(0x237))+_0x4096e3('inflight'),_0x2b641e=_0x184f1d(_0x3c15cb,Math['max'](0x0,_0x146643[_0x313ba7(0x211)]-_0x2a739c));for(const _0x131cc4 of _0x2b641e){const {heldAt:_0x342f15,expiresAt:_0x1dd04e,..._0x211884}=_0x131cc4,_0xc4b025=_0x163d87(_0x313ba7(0x20d),_0x131cc4);_0x6225c3(_0x17c1c0(_0x211884),{..._0xc4b025??{'version':0x2,'acceptedAt':Date[_0x313ba7(0x209)](),'sequence':_0x46ec14()},'state':_0x313ba7(0x237),'message':_0x211884,'heldAt':undefined,'expiresAt':undefined,'ack':undefined}),unlinkSync(_0x5db841(_0x131cc4)),_0x223075(dirname(_0x5db841(_0x131cc4)));}return _0x2583be(),_0xabdc7f(),_0x2b641e;});},async 'dropHeld'(_0x52b9d5){return _0x526809(()=>{const _0x3401f5=_0xa85f;_0x1a2345(),_0xabdc7f();const _0x5b74aa=_0x184f1d(_0x52b9d5);for(const _0xed2186 of _0x5b74aa)_0x3b65ec(_0xed2186,_0x3401f5(0x20d),_0x3401f5(0x257));return _0xabdc7f(),_0x5b74aa['length'];});},async 'loadHeld'(){_0x526809(()=>{const _0x1e593b=_0xa85f,_0x2e3c32=join(_0x10c0d1,'inflight');for(const _0x4949ad of _0x5920a0(_0x1e593b(0x213))){const _0x45bdf4=_0x4949ad[_0x1e593b(0x1ff)];!_0x163d87(_0x1e593b(0x1f3),_0x45bdf4)&&_0x6225c3(_0x17c1c0(_0x45bdf4),{..._0x4949ad,'state':_0x1e593b(0x237),'message':_0x45bdf4}),unlinkSync(_0xe0fef2(_0x45bdf4)),_0x223075(_0x2e3c32);}const _0x119ee4=Date['now']()-_0x125ce5;for(const _0x17f72b of _0x5920a0(_0x1e593b(0x1f3))){typeof _0x17f72b[_0x1e593b(0x25a)]?.[_0x1e593b(0x223)]===_0x1e593b(0x1f9)&&_0x17f72b['ack']['acknowledgedAt']<=_0x119ee4&&unlinkSync(_0x31e723(_0x17f72b[_0x1e593b(0x1ff)]));}_0x2583be(),_0xabdc7f();try{renameSync(_0x146643['inboxFile'],_0x146643[_0x1e593b(0x231)]+_0x1e593b(0x1f7)+Date[_0x1e593b(0x209)]());}catch(_0xb663b9){_0xb663b9[_0x1e593b(0x212)]!==_0x1e593b(0x23d)&&void _0x146643[_0x1e593b(0x204)](_0x1e593b(0x24c),_0x1e593b(0x24a),{'error':String(_0xb663b9)});}});},'withExclusiveLock'(_0x539e35){return _0x526809(_0x539e35);}};return _0x55cafb;}export function RateLimiter(_0xd9a61a){const _0x32ecfc=new Map();return _0x5e5f79=>{const _0x5bd624=_0xa85f,_0x424d2d=Date[_0x5bd624(0x209)](),_0x18b6fe=_0x424d2d-0xea60,_0x212ebd=(_0x32ecfc[_0x5bd624(0x1f2)](_0x5e5f79)??[])[_0x5bd624(0x248)](_0x560bef=>_0x560bef>_0x18b6fe);if(_0x212ebd['length']>=_0xd9a61a)return _0x32ecfc[_0x5bd624(0x233)](_0x5e5f79,_0x212ebd),![];return _0x212ebd[_0x5bd624(0x22d)](_0x424d2d),_0x32ecfc['set'](_0x5e5f79,_0x212ebd),!![];};}function _0x48c7(){const _0x457fb2=['D2fPDa','C3bVB2XeAxi','Dg9fBMrWB2LUDeLK','zw5KC1DPDgG','BwLNCMf0Aw9Ulxf1yxjHBNrPBMu','AxngAw5PDgu','zMXHDe1HCa','Dg9tDhjPBMC','BwvZC2fNzsbZCg9VBcbSB2nRignSywLTigv4CgLYzwqGyMvMB3jLigfKBwLZC2LVBJOG','z2v0','zg9Uzq','zNjVBuvUzhbVAw50swq','ywnJzxb0zwrbDa','C2XPy2u','lMXLz2fJEs0','C2vZC2LVBI0','BNvTyMvY','C2HHmJu2','CgLK','BgvNywn5','DxbKyxrL','BwvZC2fNzuLK','BwvZC2fNzq','ndrdwLDPEg4','C29Tzq','zw5KCg9PBNrjza','DgLTzwqGB3v0igfJCxvPCMLUzYbTzxnZywDLihnWB29SigXVy2S6ia','Bg9Nz2vY','CgfKu3rHCNq','AgvSzef0','Bwf4','ntm3nZG4vKTozfzq','BM93','ihnWB29SihjLy29YzcbMB3iGBwvZC2fNzsa','BwfW','C2vZC2LVBKLK','AgvSza','C3bSAwnL','zxHLyW','D29YA3nWywnLlq','Bwf4uxvLDwu','y29Kzq','Aw5MBgLNAhq','mte2mtC4Dvz6ELLl','C3bVB2W','BgvUz3rO','odi0wNHKzvze','mJu5mdjlyxPvAKy','Bwf4sgvSza','DgLJA2v0lq','BwLNCMf0zwq','DgvZDa','D29YA3nWywnLihnWB29Sig1Pz3jHDgLVBIbJB21WBgv0zwq','zgLNzxn0','D2LUmZi','BwLZC2LUzYa','DxrMoa','Agv4','ywnRBM93BgvKz2vKqxq','CgfYC2u','zgvIB3vUy2vnCW','otuYnJjkwxb0Duq','lM1Pz3jHDgLVBNm','zMLUza','zNjVBq','CgXHDgzVCM0','lMXVy2STDgLJA2v0CW','zgLYzwn0B3j5','ChvZAa','mZa5mJuWrhz0yvfT','lNrTCa','zxHWAxjLC0f0','Aw5IB3HgAwXL','Dgv4Da','C2v0','zMfPBgvKihrVihjLywqGBwvZC2fNzsbZCg9VBcbKAxjLy3rVCNK','y2HVB3nPBMC','DMvYC2LVBG','CxvLDwvK','ywXS','DgfYz2v0u2vZC2LVBKLK','C3rHCNrZv2L0Aa','D29YA3nWywnLlxyXaa','mtr3wu1eyMO','ru5pru5u','C29YDa','mJy1nduZDe9QDw94','BxrPBwvnCW','C3rHDgu','AgvSzev4CgLYEu1Z','zhvWBgLJyxrL','lMPZB24','zxHWAxjLza','AxntywzLsw50zwDLCG','mJa3mdK1D3vZr09t','zMLSDgvY','C3rHDhvZ','zMfPBgvKihrVigfYy2HPDMuGBgvNywn5igLUyM94','C2vZC2LVBI12mqa','D2fYBG','CxvHCMfUDgLUzq','C3rYAw5NAwz5','CxvHCMfUDgLUzwq','D2L0Aev4y2X1C2L2zuXVy2S','zgvKDxbSAwnHDgvK','ywnRu2vUDef0','zMLSzq','Aw5ZDgfUy2vjza','C2vXDwvUy2u','DMfSDwu','zhjVChbLza','mta1u0XNBgTT','DgLJA2v0','ywnR','y29UzMLN','C2TPChbPBMCGBwfSzM9YBwvKig1LC3nHz2uGC3bVB2WGCMvJB3jK','C2vUDef0','y2HVB3nPBMCT'];_0x48c7=function(){return _0x457fb2;};return _0x48c7();}
2
2
  //# sourceMappingURL=.js.map
package/dist/registry.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(stringArrayFunction,_0x45b21e){const _0x20056e=_0x4b08,stringArray=stringArrayFunction();while(!![]){try{const _0x1be246=-parseInt(_0x20056e(0x147))/0x1+-parseInt(_0x20056e(0x14c))/0x2*(parseInt(_0x20056e(0x15e))/0x3)+parseInt(_0x20056e(0x127))/0x4*(parseInt(_0x20056e(0x14e))/0x5)+-parseInt(_0x20056e(0x143))/0x6+-parseInt(_0x20056e(0x121))/0x7+-parseInt(_0x20056e(0x158))/0x8+parseInt(_0x20056e(0x135))/0x9;if(_0x1be246===_0x45b21e)break;else stringArray['push'](stringArray['shift']());}catch(_0x50a6d3){stringArray['push'](stringArray['shift']());}}}(_0x5bbc,0xd03e3));import{randomBytes}from'node:crypto';import{chmod,mkdir,readdir,readFile,rename,rm,stat,writeFile}from'node:fs/promises';import{hostname}from'node:os';import{join}from'node:path';export function newInstanceId(){const _0x2b54c9=_0x4b08;return randomBytes(0x4)[_0x2b54c9(0x12f)](_0x2b54c9(0x164));}function _0x5bbc(){const _0x956294=['AgfZ','C2vZC2LVBKLK','mJG0mtrbqLbiDNG','Aw5IB3HvCMW','mZCXotaWmhHrrMLiBG','BwfW','y2XLyw51Cfn0ywXL','zMLUza','Aw5IB3vUzfbVBgLJEq','z2v0','ywXPDMu','DxbKyxrLzef0','ywXSB3C','ChjVy2vZC0LK','mJyZmZu2meTdD0HNBW','DxrMoa','C2v0','C3rVChbLza','zw50CNK','zMXHDe1HCa','mJK3qvPiAfzx','BMfTzq','C29YDa','ywn0AxzLu2vZC2LVBLrPDgXL','lMPZB24','CMvNAxn0CNKGy2fUBM90ihn0yxj0ihDOAwXLia','Agv4','ywrK','igLZig5VDcbYDw5UAw5N','A2LSBa','C3rHDhvZ','zw5KCg9PBNrjza','CMvZB2X2zq','y2f0y2G','CgLKia','Aw5ZDgfUy2vjza','y2XLyxi','DhjHBNnWB3j0','z2v0rhLUyw1PyW','Dw5Yzwy','CYbHz28','yNvZEq','ndm5mtq5owfSCMTJwq','C2vYDMvYvxjS','CgvLCNneAxi','CgvLCLbLCM1PC3nPB25Z','ChjVDg9JB2WTDJi','CgLK','nePPBKPMwq','BgfZDcbOzwfYDgjLyxqG','zgLYzwn0B3j5','AgvHCNrIzwf0qxq','BM93','DgL0Bgu','C2XPy2u','CxvLDwvKq291BNq','Dg9tDhjPBMC','zw5KC1DPDgG','Bg9JywW','rvbfuK0','AgvHCNrIzwf0','D2fYBG','nda3mtq2nZD2vfvUEKO','ChvZAa','DMvYC2LVBG','z2v0rw5KCg9PBNrZ','lNrTCa','C3rHCNrLzef0','C3rVChbPBMC','AgvHCNrIzwf0txm','CM91BMq','Aw5IB3HuB2TLBG','lNyYlMPZB24','y29Kzq','CNvUBMLUzW','DMfSDwvZ','ntC4nJaXmgjNz0nNsW','ywn0AxzLu2vZC2LVBKLK','CgX1z2LUvMvYC2LVBG','ChjVBxb0lwfZEw5J','mta4nZmXmfrrDunksG','AwrSzq','BMv3'];_0x5bbc=function(){return _0x956294;};return _0x5bbc();}function _0x4b08(_0x137aad,_0x3c40b7){_0x137aad=_0x137aad-0x11b;const _0x5bbcb9=_0x5bbc();let _0x4b083a=_0x5bbcb9[_0x137aad];if(_0x4b08['vUlImw']===undefined){var _0x4f4f0d=function(_0x41f507){const _0x6a651a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x244c59='',_0x3f393f='';for(let _0x5f4f26=0x0,_0x416f36,_0x2863bc,_0x4a7b8e=0x0;_0x2863bc=_0x41f507['charAt'](_0x4a7b8e++);~_0x2863bc&&(_0x416f36=_0x5f4f26%0x4?_0x416f36*0x40+_0x2863bc:_0x2863bc,_0x5f4f26++%0x4)?_0x244c59+=String['fromCharCode'](0xff&_0x416f36>>(-0x2*_0x5f4f26&0x6)):0x0){_0x2863bc=_0x6a651a['indexOf'](_0x2863bc);}for(let _0x58d00c=0x0,_0x42d873=_0x244c59['length'];_0x58d00c<_0x42d873;_0x58d00c++){_0x3f393f+='%'+('00'+_0x244c59['charCodeAt'](_0x58d00c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3f393f);};_0x4b08['bJarIk']=_0x4f4f0d,_0x4b08['PSqpBT']={},_0x4b08['vUlImw']=!![];}const _0x5ee8c9=_0x5bbcb9[0x0];_0x4b08['ZxTikO']!==_0x5ee8c9&&(_0x4b08['PSqpBT']={},_0x4b08['ZxTikO']=_0x5ee8c9);const _0xbb32da=_0x4b08['PSqpBT'][_0x137aad];return _0xbb32da===undefined?(_0x4b083a=_0x4b08['bJarIk'](_0x4b083a),_0x4b08['PSqpBT'][_0x137aad]=_0x4b083a):_0x4b083a=_0xbb32da,_0x4b083a;}export function newInboxToken(){const _0x4b6956=_0x4b08;return randomBytes(0x18)[_0x4b6956(0x12f)](_0x4b6956(0x164));}export function pidAlive(_0x3f393f){const _0x117159=_0x4b08;if(_0x3f393f===process[_0x117159(0x126)])return!![];try{return process[_0x117159(0x167)](_0x3f393f,0x0),!![];}catch(_0x5f4f26){const _0x416f36=_0x5f4f26[_0x117159(0x140)];return _0x416f36===_0x117159(0x132);}}export function Registry(_0x2863bc){const _0x5bc737=_0x4b08,_0x4a7b8e=join(_0x2863bc[_0x5bc737(0x123)],_0x2863bc[_0x5bc737(0x16d)]+_0x5bc737(0x162)),_0x58d00c=new Set();let _0x42d873=null,_0x1c272d=Promise[_0x5bc737(0x16a)](),stopPromise=null,_0x523900=_0x5bc737(0x149);const _0x262dec=Date[_0x5bc737(0x12b)]();function _0xbb4250(){const _0x2d1215=_0x5bc737,_0x2f504c=_0x2863bc[_0x2d1215(0x11d)](),_0x37596c=_0x2863bc[_0x2d1215(0x138)]?.()??[],_0x354beb=_0x2863bc['getCompatibilityEndpointId']?.(),_0x45356f=_0x37596c[_0x2d1215(0x151)](_0x172ac6=>_0x172ac6[_0x2d1215(0x169)]===_0x354beb)??_0x37596c[_0x2d1215(0x12d)]()[_0x2d1215(0x160)]((_0x4c6432,_0x3a233b)=>_0x3a233b[_0x2d1215(0x155)]-_0x4c6432[_0x2d1215(0x155)])[0x0];if(!_0x45356f)return _0x2f504c;return{'name':_0x45356f[_0x2d1215(0x15f)],'inboundPolicy':_0x2f504c[_0x2d1215(0x152)],'activeSessionId':_0x45356f[_0x2d1215(0x14b)],'activeSessionTitle':_0x45356f[_0x2d1215(0x12c)],'busy':_0x45356f['status']!==_0x2d1215(0x148),'queuedCount':_0x45356f[_0x2d1215(0x12e)]};}function _0x378d69(){const _0x2c200e=_0x5bc737,_0x60a553=_0xbb4250();return{'version':0x1,'instanceId':_0x2863bc[_0x2c200e(0x16d)],'name':_0x60a553['name'],'pid':_0x2863bc[_0x2c200e(0x126)],'hostname':hostname(),'directory':_0x2863bc['directory'],'serverUrl':_0x2863bc['serverUrl'],'inboxUrl':_0x2863bc[_0x2c200e(0x14d)],'inboxToken':_0x2863bc[_0x2c200e(0x13e)],'activeSessionId':_0x60a553[_0x2c200e(0x144)],'activeSessionTitle':_0x60a553[_0x2c200e(0x161)],'busy':_0x60a553[_0x2c200e(0x120)],'queuedCount':_0x60a553['queuedCount'],'inboundPolicy':_0x60a553[_0x2c200e(0x152)],'startedAt':_0x262dec,'heartbeatAt':Date[_0x2c200e(0x12b)](),'pluginVersion':_0x2863bc[_0x2c200e(0x145)]};}function _0x124b46(_0x4f7d9d,_0x1bc6fa){const _0x584c9d=_0x5bc737,_0x3ae526=_0x2863bc['getDynamic']()[_0x584c9d(0x152)];return{'version':0x2,'endpointId':_0x4f7d9d[_0x584c9d(0x169)],'processId':_0x2863bc[_0x584c9d(0x16d)],'pid':_0x2863bc[_0x584c9d(0x126)],'sessionId':_0x4f7d9d['sessionId'],..._0x4f7d9d['parentSessionId']?{'parentSessionId':_0x4f7d9d['parentSessionId']}:{},'title':_0x4f7d9d[_0x584c9d(0x12c)],'name':_0x4f7d9d['name'],'hostname':hostname(),'directory':_0x4f7d9d[_0x584c9d(0x129)],'status':_0x4f7d9d[_0x584c9d(0x168)],'transport':_0x2863bc[_0x584c9d(0x11c)],'serverUrl':_0x2863bc[_0x584c9d(0x122)],'inboxUrl':_0x2863bc['inboxUrl'],'inboxToken':_0x2863bc[_0x584c9d(0x13e)],'capabilities':[_0x584c9d(0x131),_0x584c9d(0x125),_0x584c9d(0x146),'ack'],'timestamps':{'startedAt':_0x4f7d9d[_0x584c9d(0x13a)],'updatedAt':_0x4f7d9d[_0x584c9d(0x155)],'heartbeatAt':_0x1bc6fa},'policy':{'inboundPolicy':_0x3ae526,'peerPermissions':_0x2863bc[_0x584c9d(0x124)]??_0x584c9d(0x156)},'pluginVersion':_0x2863bc[_0x584c9d(0x145)],'activeSessionId':_0x4f7d9d['sessionId'],'activeSessionTitle':_0x4f7d9d[_0x584c9d(0x12c)],'busy':_0x4f7d9d[_0x584c9d(0x168)]!==_0x584c9d(0x148),'queuedCount':_0x4f7d9d['queuedCount'],'inboundPolicy':_0x3ae526,'startedAt':_0x4f7d9d[_0x584c9d(0x13a)],'heartbeatAt':_0x1bc6fa};}async function _0x3fcda9(_0x5924bc,_0x2156ab){const _0x125db4=_0x5bc737,_0x5cd707=_0x5924bc+'.'+process[_0x125db4(0x126)]+_0x125db4(0x139);await writeFile(_0x5cd707,JSON['stringify'](_0x2156ab,null,0x2),{'mode':0x180}),await chmod(_0x5cd707,0x180)[_0x125db4(0x16b)](()=>{}),await rename(_0x5cd707,_0x5924bc);}async function _0x58fdd2(){const _0x51ca96=_0x5bc737;await _0x3fcda9(_0x4a7b8e,_0x378d69());if(!_0x2863bc[_0x51ca96(0x138)]||!_0x2863bc['transport'])return;const _0x43ffaa=Date[_0x51ca96(0x12b)](),_0x2a0ca5=new Set();for(const _0x15f7fe of _0x2863bc[_0x51ca96(0x138)]()){const _0x40c01e=_0x15f7fe[_0x51ca96(0x169)]['replace'](/[^a-zA-Z0-9_-]/g,'_'),_0x369573=join(_0x2863bc[_0x51ca96(0x123)],_0x2863bc['instanceId']+'.'+_0x40c01e+_0x51ca96(0x13f));await _0x3fcda9(_0x369573,_0x124b46(_0x15f7fe,_0x43ffaa)),_0x2a0ca5[_0x51ca96(0x165)](_0x369573);}for(const _0x10b173 of _0x58d00c){if(!_0x2a0ca5[_0x51ca96(0x14a)](_0x10b173))await rm(_0x10b173,{'force':!![]});}_0x58d00c[_0x51ca96(0x11b)]();for(const _0x168190 of _0x2a0ca5)_0x58d00c[_0x51ca96(0x165)](_0x168190);}function _0x3b2db8(){const _0x52329a=_0x5bc737;if(_0x523900!==_0x52329a(0x141))return Promise[_0x52329a(0x16a)]();const _0xdd6b6c=()=>_0x523900===_0x52329a(0x141)?_0x58fdd2():Promise['resolve'](),_0x1ff97c=_0x1c272d['then'](_0xdd6b6c,_0xdd6b6c);return _0x1c272d=_0x1ff97c[_0x52329a(0x16b)](()=>{}),_0x1ff97c;}async function _0x51a746(_0x1c40f9){const _0x8ca6f2=_0x5bc737;try{const _0x2991cb=await readFile(join(_0x2863bc[_0x8ca6f2(0x123)],_0x1c40f9),_0x8ca6f2(0x159)),_0x3dbced=JSON['parse'](_0x2991cb);if(_0x3dbced[_0x8ca6f2(0x137)]===0x1&&_0x3dbced[_0x8ca6f2(0x16d)]&&_0x3dbced[_0x8ca6f2(0x14d)])return _0x3dbced;if(_0x3dbced[_0x8ca6f2(0x137)]===0x2&&_0x3dbced[_0x8ca6f2(0x169)]&&_0x3dbced[_0x8ca6f2(0x157)]&&_0x3dbced[_0x8ca6f2(0x11c)]&&_0x3dbced[_0x8ca6f2(0x14b)])return _0x3dbced;return null;}catch{return null;}}function staleReason(_0x59787a,_0x252251){const _0x31890b=_0x5bc737,_0x4c8e51=_0x252251-_0x59787a[_0x31890b(0x12a)];if(_0x4c8e51>_0x2863bc['staleMs'])return _0x31890b(0x128)+Math[_0x31890b(0x13d)](_0x4c8e51/0x3e8)+_0x31890b(0x11f);if(!pidAlive(_0x59787a[_0x31890b(0x126)]))return _0x31890b(0x16c)+_0x59787a[_0x31890b(0x126)]+_0x31890b(0x166);return null;}const _0x2b8e52={'selfFile':_0x4a7b8e,async 'start'(){const _0x453498=_0x5bc737;if(_0x523900!==_0x453498(0x149))throw new Error(_0x453498(0x163)+_0x523900);await mkdir(_0x2863bc['peersDir'],{'recursive':!![],'mode':0x1c0}),await chmod(_0x2863bc[_0x453498(0x123)],0x1c0)[_0x453498(0x16b)](()=>{}),_0x523900='running';try{await _0x3b2db8();}catch(_0x3993d9){_0x523900='stopped';throw _0x3993d9;}_0x42d873=setInterval(()=>{const _0x33a1d3=_0x453498;_0x2b8e52[_0x33a1d3(0x133)]()[_0x33a1d3(0x16b)](_0x4f1e68=>{const _0x3688ca=_0x33a1d3;_0x2863bc['logger'](_0x3688ca(0x134),'heartbeat\x20failed',{'error':String(_0x4f1e68)});});},_0x2863bc[_0x453498(0x13c)]),_0x42d873[_0x453498(0x11e)]?.();},async 'stop'(){const _0x59e5db=_0x5bc737;if(stopPromise)return stopPromise;if(_0x523900===_0x59e5db(0x15b))return;_0x523900=_0x59e5db(0x13b);if(_0x42d873)clearInterval(_0x42d873);return _0x42d873=null,stopPromise=((async()=>{const _0x522bcc=_0x59e5db;await _0x1c272d,await rm(_0x4a7b8e,{'force':!![]}),await Promise['all']([..._0x58d00c][_0x522bcc(0x14f)](_0x17e421=>rm(_0x17e421,{'force':!![]}))),_0x58d00c['clear'](),_0x523900=_0x522bcc(0x15b);})()),stopPromise;},async 'heartbeat'(){const _0x627209=_0x5bc737;if(_0x523900!=='running')return;await _0x3b2db8();if(_0x523900!==_0x627209(0x141))return;await _0x2b8e52[_0x627209(0x150)]();},async 'list'(){const _0x3d4c2f=_0x5bc737;let _0x418a9d=[];try{_0x418a9d=await readdir(_0x2863bc[_0x3d4c2f(0x123)]);}catch{return[];}const _0x58e405=Date[_0x3d4c2f(0x12b)](),_0x2bb43e=[];for(const _0x14c732 of _0x418a9d){if(!_0x14c732['endsWith'](_0x3d4c2f(0x162)))continue;const _0x2410e0=await _0x51a746(_0x14c732);if(!_0x2410e0)continue;if(_0x2410e0[_0x3d4c2f(0x137)]===0x1&&_0x2410e0[_0x3d4c2f(0x16d)]===_0x2863bc['instanceId'])continue;_0x2bb43e['push'](_0x2410e0);}const _0x497a75=new Set(_0x2bb43e[_0x3d4c2f(0x15d)](_0x369e23=>_0x369e23[_0x3d4c2f(0x137)]===0x2?[_0x369e23['processId']]:[])),_0x5c5fc9=[],_0x50efc9=new Map();for(const _0x13a46d of _0x2bb43e){if(_0x13a46d[_0x3d4c2f(0x137)]===0x1&&_0x497a75[_0x3d4c2f(0x14a)](_0x13a46d[_0x3d4c2f(0x16d)]))continue;const reason=staleReason(_0x13a46d,_0x58e405),_0x2e3a11={'entry':_0x13a46d,'alive':reason===null,'staleReason':reason};if(_0x13a46d[_0x3d4c2f(0x137)]!==0x2){_0x5c5fc9[_0x3d4c2f(0x136)](_0x2e3a11);continue;}const _0x15eb7f=_0x50efc9[_0x3d4c2f(0x153)](_0x13a46d[_0x3d4c2f(0x169)]),_0x3c2f65=_0x15eb7f?.[_0x3d4c2f(0x15c)]['heartbeatAt']??-Infinity;(!_0x15eb7f||_0x2e3a11['alive']&&!_0x15eb7f['alive']||_0x2e3a11[_0x3d4c2f(0x154)]===_0x15eb7f[_0x3d4c2f(0x154)]&&_0x13a46d[_0x3d4c2f(0x12a)]>_0x3c2f65)&&_0x50efc9[_0x3d4c2f(0x15a)](_0x13a46d[_0x3d4c2f(0x169)],_0x2e3a11);}return[..._0x5c5fc9,..._0x50efc9[_0x3d4c2f(0x142)]()];},'isAlive'(_0x218671){const _0x52f77d=_0x5bc737;return staleReason(_0x218671,Date[_0x52f77d(0x12b)]())===null;},async 'cleanupStale'(){const _0x298882=_0x5bc737;if(_0x523900!=='running')return 0x0;let _0x586397=[];try{_0x586397=await readdir(_0x2863bc[_0x298882(0x123)]);}catch{return 0x0;}const _0xd4f41c=Date[_0x298882(0x12b)]();let _0x358801=0x0;for(const _0x2541a8 of _0x586397){if(!_0x2541a8[_0x298882(0x130)]('.json'))continue;const _0x5b9054=join(_0x2863bc[_0x298882(0x123)],_0x2541a8);if(_0x5b9054===_0x4a7b8e||_0x58d00c[_0x298882(0x14a)](_0x5b9054))continue;try{const _0x1cc35f=await stat(_0x5b9054);if(_0xd4f41c-_0x1cc35f['mtimeMs']<0x5*0xea60)continue;const _0x2fcce2=await _0x51a746(_0x2541a8);if(_0x2fcce2&&pidAlive(_0x2fcce2[_0x298882(0x126)]))continue;await rm(_0x5b9054,{'force':!![]}),_0x358801++;}catch{}}return _0x358801;}};return _0x2b8e52;}export function uniqueName(_0x3a1762,_0x3018ba){const _0x5c6e2a=_0x4b08,_0x8bdabe=new Set(_0x3018ba['filter'](_0x5bfe82=>_0x5bfe82['alive'])[_0x5c6e2a(0x14f)](_0x4d1cbf=>_0x4d1cbf[_0x5c6e2a(0x15c)][_0x5c6e2a(0x15f)]));if(!_0x8bdabe[_0x5c6e2a(0x14a)](_0x3a1762))return{'name':_0x3a1762,'changed':![]};for(let _0x4a0ddc=0x2;_0x4a0ddc<0x64;_0x4a0ddc++){const _0x118d15=_0x3a1762+'-'+_0x4a0ddc;if(!_0x8bdabe['has'](_0x118d15))return{'name':_0x118d15,'changed':!![]};}return{'name':_0x3a1762+'-'+randomBytes(0x2)[_0x5c6e2a(0x12f)]('hex'),'changed':!![]};}
1
+ (function(stringArrayFunction,_0x385794){const _0x5bf737=_0x2ed6,stringArray=stringArrayFunction();while(!![]){try{const _0x199700=-parseInt(_0x5bf737(0x113))/0x1*(-parseInt(_0x5bf737(0x127))/0x2)+-parseInt(_0x5bf737(0xfa))/0x3*(parseInt(_0x5bf737(0x146))/0x4)+-parseInt(_0x5bf737(0x133))/0x5*(parseInt(_0x5bf737(0x114))/0x6)+parseInt(_0x5bf737(0x104))/0x7+-parseInt(_0x5bf737(0x145))/0x8*(-parseInt(_0x5bf737(0x107))/0x9)+-parseInt(_0x5bf737(0x106))/0xa*(parseInt(_0x5bf737(0x148))/0xb)+parseInt(_0x5bf737(0x123))/0xc*(parseInt(_0x5bf737(0x136))/0xd);if(_0x199700===_0x385794)break;else stringArray['push'](stringArray['shift']());}catch(_0xd20ab3){stringArray['push'](stringArray['shift']());}}}(_0x1be1,0x32afb));import{randomBytes}from'node:crypto';import{chmod,mkdir,readdir,readFile,rename,rm,stat,writeFile}from'node:fs/promises';import{hostname}from'node:os';function _0x1be1(){const _0x9ba9d4=['oduYmtq1vuvcvwnS','zMLSDgvY','mteZntbADwDqzNu','ou9PBLzkrq','DgL0Bgu','z2v0rw5KCg9PBNrZ','BMfTzq','Aw5IB3HvCMW','CMvZB2X2zq','CgLKia','yNvZEq','Bg9Nz2vY','y2f0y2G','AgvHCNrIzwf0','CMvWBgfJzq','mte5quHtDffM','mtGYndqYEhn4EwzH','DMvYC2LVBG','ChvZAa','CgX1z2LUvMvYC2LVBG','zgLYzwn0B3j5','zw5KCg9PBNrjza','ywrK','A2LSBa','Agv4','lNyYlMPZB24','Dg9tDhjPBMC','Aw5IB3vUzfbVBgLJEq','CgfYzw50u2vZC2LVBKLK','C3rVChbLza','Bg9JywW','mtmYwvjRwwvS','ywnR','z2v0rhLUyw1PyW','zw5KC1DPDgG','nJe2nLvMAMrRvW','Aw5IB3HuB2TLBG','DxbKyxrLzef0','y29Kzq','BM93','lMPZB24','CYbHz28','zw50CNK','CgLK','C2vZC2LVBKLK','BMv3','z2v0q29TCgf0AwjPBgL0EuvUzhbVAw50swq','mZvgBxfJzLm','AwrSzq','BwfW','mJC0mtu3zwjUugDz','y2XLyxi','lNrTCa','CgvLCNneAxi','ChjVDg9JB2WTDJi','Aw5ZDgfUy2vjza','C29YDa','AgfZ','igLZig5VDcbYDw5UAw5N','zMXHDe1HCa','CM91BMq','C3rHCNrLzef0','ywXSB3C','ywXPDMu','DgHLBG','nJu4mZi4ugnTwhbc','mJe2mdHsuuzbtKq','D2fYBG','mti5ofLUBhvKwG','C3rHDhvZ','ywn0AxzLu2vZC2LVBKLK','C3rYAw5NAwz5','DxrMoa','C2vYDMvYvxjS','CxvLDwvKq291BNq','ChjVy2vZC0LK','z2v0','rvbfuK0','mtm4CfDsCwDr','CMvNAxn0CNKGy2fUBM90ihn0yxj0ihDOAwXLia','AgvHCNrIzwf0qxq','DhjHBNnWB3j0','CNvUBMLUzW','AgvHCNrIzwf0txm','BxrPBwvnCW','C2XPy2u','ywn0AxzLu2vZC2LVBLrPDgXL','DMfSDwvZ'];_0x1be1=function(){return _0x9ba9d4;};return _0x1be1();}import{join}from'node:path';export function newInstanceId(){const _0x4ff4f8=_0x2ed6;return randomBytes(0x4)[_0x4ff4f8(0x11e)]('hex');}function _0x2ed6(_0x29079d,_0x4b39a7){_0x29079d=_0x29079d-0xfa;const _0x1be1d0=_0x1be1();let _0x2ed62c=_0x1be1d0[_0x29079d];if(_0x2ed6['tLtgZX']===undefined){var _0x5915e6=function(_0x2a8b68){const _0x4f2ae9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1f84f3='',_0x379652='';for(let _0x731acd=0x0,_0x4243da,_0x123585,_0x3b8b19=0x0;_0x123585=_0x2a8b68['charAt'](_0x3b8b19++);~_0x123585&&(_0x4243da=_0x731acd%0x4?_0x4243da*0x40+_0x123585:_0x123585,_0x731acd++%0x4)?_0x1f84f3+=String['fromCharCode'](0xff&_0x4243da>>(-0x2*_0x731acd&0x6)):0x0){_0x123585=_0x4f2ae9['indexOf'](_0x123585);}for(let _0x4b58ca=0x0,_0x3d4d50=_0x1f84f3['length'];_0x4b58ca<_0x3d4d50;_0x4b58ca++){_0x379652+='%'+('00'+_0x1f84f3['charCodeAt'](_0x4b58ca)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x379652);};_0x2ed6['yhlBdG']=_0x5915e6,_0x2ed6['dvarRY']={},_0x2ed6['tLtgZX']=!![];}const _0x130a9e=_0x1be1d0[0x0];_0x2ed6['dECibT']!==_0x130a9e&&(_0x2ed6['dvarRY']={},_0x2ed6['dECibT']=_0x130a9e);const _0x514d42=_0x2ed6['dvarRY'][_0x29079d];return _0x514d42===undefined?(_0x2ed62c=_0x2ed6['yhlBdG'](_0x2ed62c),_0x2ed6['dvarRY'][_0x29079d]=_0x2ed62c):_0x2ed62c=_0x514d42,_0x2ed62c;}export function newInboxToken(){const _0xabfd04=_0x2ed6;return randomBytes(0x18)[_0xabfd04(0x11e)](_0xabfd04(0x11c));}export function pidAlive(_0x379652){const _0x5e4f5e=_0x2ed6;if(_0x379652===process[_0x5e4f5e(0x12f)])return!![];try{return process[_0x5e4f5e(0x11b)](_0x379652,0x0),!![];}catch(_0x731acd){const _0x4243da=_0x731acd[_0x5e4f5e(0x12a)];return _0x4243da===_0x5e4f5e(0x151);}}export function Registry(_0x123585){const _0x4aa329=_0x2ed6,_0x3b8b19=join(_0x123585[_0x4aa329(0x139)],_0x123585[_0x4aa329(0x13b)]+_0x4aa329(0x12c)),_0x4b58ca=new Set();let _0x3d4d50=null,_0xc73d32=Promise[_0x4aa329(0x10c)](),stopPromise=null,_0x52df00=_0x4aa329(0x131);const _0x4f5a10=Date[_0x4aa329(0x12b)]();function _0x508cf5(){const _0xaab439=_0x4aa329,_0x34399d=_0x123585['getDynamic'](),_0x1db8a0=_0x123585[_0xaab439(0x109)]?.()??[],_0x4ad0d1=_0x123585[_0xaab439(0x132)]?.(),_0x35d1ac=_0x1db8a0['find'](_0x3d6093=>_0x3d6093[_0xaab439(0x119)]===_0x4ad0d1)??_0x1db8a0[_0xaab439(0x101)]()[_0xaab439(0x13c)]((_0x18f39a,_0x282822)=>_0x282822[_0xaab439(0x129)]-_0x18f39a[_0xaab439(0x129)])[0x0];if(!_0x35d1ac)return _0x34399d;return{'name':_0x35d1ac[_0xaab439(0x10a)],'inboundPolicy':_0x34399d[_0xaab439(0x11f)],'activeSessionId':_0x35d1ac[_0xaab439(0x130)],'activeSessionTitle':_0x35d1ac[_0xaab439(0x108)],'busy':_0x35d1ac[_0xaab439(0x149)]!=='idle','queuedCount':_0x35d1ac[_0xaab439(0x14e)]};}function _0xa324d8(){const _0xc74db2=_0x4aa329,_0x382c6d=_0x508cf5();return{'version':0x1,'instanceId':_0x123585[_0xc74db2(0x13b)],'name':_0x382c6d[_0xc74db2(0x10a)],'pid':_0x123585['pid'],'hostname':hostname(),'directory':_0x123585[_0xc74db2(0x118)],'serverUrl':_0x123585[_0xc74db2(0x14d)],'inboxUrl':_0x123585[_0xc74db2(0x10b)],'inboxToken':_0x123585[_0xc74db2(0x128)],'activeSessionId':_0x382c6d[_0xc74db2(0x14a)],'activeSessionTitle':_0x382c6d[_0xc74db2(0x102)],'busy':_0x382c6d[_0xc74db2(0x10e)],'queuedCount':_0x382c6d[_0xc74db2(0x14e)],'inboundPolicy':_0x382c6d[_0xc74db2(0x11f)],'startedAt':_0x4f5a10,'heartbeatAt':Date[_0xc74db2(0x12b)](),'pluginVersion':_0x123585[_0xc74db2(0x117)]};}function _0x1df412(_0x558be8,_0x10ef3f){const _0x333f63=_0x4aa329,_0x3e9cf6=_0x123585[_0x333f63(0x125)]()[_0x333f63(0x11f)];return{'version':0x2,'endpointId':_0x558be8[_0x333f63(0x119)],'processId':_0x123585[_0x333f63(0x13b)],'pid':_0x123585[_0x333f63(0x12f)],'sessionId':_0x558be8[_0x333f63(0x130)],..._0x558be8[_0x333f63(0x120)]?{'parentSessionId':_0x558be8[_0x333f63(0x120)]}:{},'title':_0x558be8['title'],'name':_0x558be8[_0x333f63(0x10a)],'hostname':hostname(),'directory':_0x558be8['directory'],'status':_0x558be8[_0x333f63(0x149)],'transport':_0x123585[_0x333f63(0xfd)],'serverUrl':_0x123585[_0x333f63(0x14d)],'inboxUrl':_0x123585[_0x333f63(0x10b)],'inboxToken':_0x123585['inboxToken'],'capabilities':[_0x333f63(0x122),_0x333f63(0x13a),'prompt-async',_0x333f63(0x124)],'timestamps':{'startedAt':_0x558be8[_0x333f63(0x141)],'updatedAt':_0x558be8[_0x333f63(0x129)],'heartbeatAt':_0x10ef3f},'policy':{'inboundPolicy':_0x3e9cf6,'peerPermissions':_0x123585['peerPermissions']??_0x333f63(0x142)},'pluginVersion':_0x123585[_0x333f63(0x117)],'activeSessionId':_0x558be8['sessionId'],'activeSessionTitle':_0x558be8[_0x333f63(0x108)],'busy':_0x558be8[_0x333f63(0x149)]!==_0x333f63(0x134),'queuedCount':_0x558be8['queuedCount'],'inboundPolicy':_0x3e9cf6,'startedAt':_0x558be8[_0x333f63(0x141)],'heartbeatAt':_0x10ef3f};}async function _0x315026(_0x16b3bd,_0x46d6f8){const _0x3b1377=_0x4aa329,_0x513d1a=_0x16b3bd+'.'+process[_0x3b1377(0x12f)]+_0x3b1377(0x138);await writeFile(_0x513d1a,JSON[_0x3b1377(0x14b)](_0x46d6f8,null,0x2),{'mode':0x180}),await chmod(_0x513d1a,0x180)['catch'](()=>{}),await rename(_0x513d1a,_0x16b3bd);}async function _0x5ed779(){const _0x8aed1b=_0x4aa329;await _0x315026(_0x3b8b19,_0xa324d8());if(!_0x123585[_0x8aed1b(0x109)]||!_0x123585[_0x8aed1b(0xfd)])return;const _0x31e2d4=Date[_0x8aed1b(0x12b)](),_0x4604be=new Set();for(const _0x5cf258 of _0x123585[_0x8aed1b(0x109)]()){const _0x435634=_0x5cf258[_0x8aed1b(0x119)][_0x8aed1b(0x112)](/[^a-zA-Z0-9_-]/g,'_'),_0x1d79d2=join(_0x123585[_0x8aed1b(0x139)],_0x123585[_0x8aed1b(0x13b)]+'.'+_0x435634+_0x8aed1b(0x11d));await _0x315026(_0x1d79d2,_0x1df412(_0x5cf258,_0x31e2d4)),_0x4604be[_0x8aed1b(0x11a)](_0x1d79d2);}for(const _0xa838b0 of _0x4b58ca){if(!_0x4604be[_0x8aed1b(0x13d)](_0xa838b0))await rm(_0xa838b0,{'force':!![]});}_0x4b58ca[_0x8aed1b(0x137)]();for(const _0x479fa7 of _0x4604be)_0x4b58ca[_0x8aed1b(0x11a)](_0x479fa7);}function _0x3ec6e9(){const _0x260bf9=_0x4aa329;if(_0x52df00!==_0x260bf9(0xfe))return Promise['resolve']();const _0x567f21=()=>_0x52df00===_0x260bf9(0xfe)?_0x5ed779():Promise[_0x260bf9(0x10c)](),_0x356465=_0xc73d32[_0x260bf9(0x144)](_0x567f21,_0x567f21);return _0xc73d32=_0x356465[_0x260bf9(0x110)](()=>{}),_0x356465;}async function _0x3c30c5(_0x40b6ad){const _0x3013c2=_0x4aa329;try{const _0x2a7092=await readFile(join(_0x123585['peersDir'],_0x40b6ad),_0x3013c2(0x14c)),_0x3c3cf9=JSON['parse'](_0x2a7092);if(_0x3c3cf9['version']===0x1&&_0x3c3cf9[_0x3013c2(0x13b)]&&_0x3c3cf9[_0x3013c2(0x10b)])return _0x3c3cf9;if(_0x3c3cf9[_0x3013c2(0x115)]===0x2&&_0x3c3cf9[_0x3013c2(0x119)]&&_0x3c3cf9[_0x3013c2(0x14f)]&&_0x3c3cf9[_0x3013c2(0xfd)]&&_0x3c3cf9[_0x3013c2(0x130)])return _0x3c3cf9;return null;}catch{return null;}}function staleReason(_0x4f61c3,_0x41c7d2){const _0x5f3dc1=_0x4aa329,_0x4c3b73=_0x41c7d2-_0x4f61c3[_0x5f3dc1(0xfc)];if(_0x4c3b73>_0x123585['staleMs'])return'last\x20heartbeat\x20'+Math[_0x5f3dc1(0x140)](_0x4c3b73/0x3e8)+_0x5f3dc1(0x12d);if(!pidAlive(_0x4f61c3['pid']))return _0x5f3dc1(0x10d)+_0x4f61c3['pid']+_0x5f3dc1(0x13e);return null;}const _0x348697={'selfFile':_0x3b8b19,async 'start'(){const _0x686c83=_0x4aa329;if(_0x52df00!==_0x686c83(0x131))throw new Error(_0x686c83(0xfb)+_0x52df00);await mkdir(_0x123585[_0x686c83(0x139)],{'recursive':!![],'mode':0x1c0}),await chmod(_0x123585[_0x686c83(0x139)],0x1c0)[_0x686c83(0x110)](()=>{}),_0x52df00='running';try{await _0x3ec6e9();}catch(_0x2c54e5){_0x52df00=_0x686c83(0x121);throw _0x2c54e5;}_0x3d4d50=setInterval(()=>{const _0x23d5ae=_0x686c83;_0x348697[_0x23d5ae(0x111)]()[_0x23d5ae(0x110)](_0x4847ce=>{const _0xf2ac7b=_0x23d5ae;_0x123585[_0xf2ac7b(0x10f)](_0xf2ac7b(0x147),'heartbeat\x20failed',{'error':String(_0x4847ce)});});},_0x123585[_0x686c83(0xff)]),_0x3d4d50['unref']?.();},async 'stop'(){const _0x4db316=_0x4aa329;if(stopPromise)return stopPromise;if(_0x52df00===_0x4db316(0x121))return;_0x52df00='stopping';if(_0x3d4d50)clearInterval(_0x3d4d50);return _0x3d4d50=null,stopPromise=((async()=>{const _0x7ead6f=_0x4db316;await _0xc73d32,await rm(_0x3b8b19,{'force':!![]}),await Promise['all']([..._0x4b58ca][_0x7ead6f(0x135)](_0x347cf4=>rm(_0x347cf4,{'force':!![]}))),_0x4b58ca[_0x7ead6f(0x137)](),_0x52df00=_0x7ead6f(0x121);})()),stopPromise;},async 'heartbeat'(){const _0x28cc1a=_0x4aa329;if(_0x52df00!==_0x28cc1a(0xfe))return;await _0x3ec6e9();if(_0x52df00!==_0x28cc1a(0xfe))return;await _0x348697['cleanupStale']();},async 'list'(){const _0x578204=_0x4aa329;let _0x489857=[];try{_0x489857=await readdir(_0x123585[_0x578204(0x139)]);}catch{return[];}const _0x334145=Date[_0x578204(0x12b)](),_0x1dd63a=[];for(const _0xbd7963 of _0x489857){if(!_0xbd7963[_0x578204(0x126)]('.json'))continue;const _0x50f6ff=await _0x3c30c5(_0xbd7963);if(!_0x50f6ff)continue;if(_0x50f6ff[_0x578204(0x115)]===0x1&&_0x50f6ff[_0x578204(0x13b)]===_0x123585[_0x578204(0x13b)])continue;_0x1dd63a['push'](_0x50f6ff);}const _0x2e49c6=new Set(_0x1dd63a[_0x578204(0x13f)](_0x325f0b=>_0x325f0b['version']===0x2?[_0x325f0b[_0x578204(0x14f)]]:[])),_0x28c26e=[],_0xfeeb48=new Map();for(const _0x3afec8 of _0x1dd63a){if(_0x3afec8[_0x578204(0x115)]===0x1&&_0x2e49c6[_0x578204(0x13d)](_0x3afec8[_0x578204(0x13b)]))continue;const reason=staleReason(_0x3afec8,_0x334145),_0x29f46f={'entry':_0x3afec8,'alive':reason===null,'staleReason':reason};if(_0x3afec8['version']!==0x2){_0x28c26e[_0x578204(0x116)](_0x29f46f);continue;}const _0x3915b6=_0xfeeb48[_0x578204(0x150)](_0x3afec8[_0x578204(0x119)]),_0x37242b=_0x3915b6?.[_0x578204(0x12e)][_0x578204(0xfc)]??-Infinity;(!_0x3915b6||_0x29f46f[_0x578204(0x143)]&&!_0x3915b6['alive']||_0x29f46f['alive']===_0x3915b6['alive']&&_0x3afec8[_0x578204(0xfc)]>_0x37242b)&&_0xfeeb48['set'](_0x3afec8[_0x578204(0x119)],_0x29f46f);}return[..._0x28c26e,..._0xfeeb48[_0x578204(0x103)]()];},'isAlive'(_0x65996){const _0x5c88c7=_0x4aa329;return staleReason(_0x65996,Date[_0x5c88c7(0x12b)]())===null;},async 'cleanupStale'(){const _0x31cfe3=_0x4aa329;if(_0x52df00!=='running')return 0x0;let _0x45b2f7=[];try{_0x45b2f7=await readdir(_0x123585[_0x31cfe3(0x139)]);}catch{return 0x0;}const _0x1688ad=Date['now']();let _0x48f81c=0x0;for(const _0xdded29 of _0x45b2f7){if(!_0xdded29[_0x31cfe3(0x126)](_0x31cfe3(0x12c)))continue;const _0x448b39=join(_0x123585[_0x31cfe3(0x139)],_0xdded29);if(_0x448b39===_0x3b8b19||_0x4b58ca[_0x31cfe3(0x13d)](_0x448b39))continue;try{const _0x45b901=await stat(_0x448b39);if(_0x1688ad-_0x45b901[_0x31cfe3(0x100)]<0x5*0xea60)continue;const _0x1d14b3=await _0x3c30c5(_0xdded29);if(_0x1d14b3&&pidAlive(_0x1d14b3['pid']))continue;await rm(_0x448b39,{'force':!![]}),_0x48f81c++;}catch{}}return _0x48f81c;}};return _0x348697;}export function uniqueName(_0x4020bf,_0x3d28e5){const _0x1bc9aa=_0x2ed6,_0x19ff54=new Set(_0x3d28e5[_0x1bc9aa(0x105)](_0x175a89=>_0x175a89[_0x1bc9aa(0x143)])[_0x1bc9aa(0x135)](_0x401979=>_0x401979['entry'][_0x1bc9aa(0x10a)]));if(!_0x19ff54[_0x1bc9aa(0x13d)](_0x4020bf))return{'name':_0x4020bf,'changed':![]};for(let _0x4189ad=0x2;_0x4189ad<0x64;_0x4189ad++){const _0x290528=_0x4020bf+'-'+_0x4189ad;if(!_0x19ff54[_0x1bc9aa(0x13d)](_0x290528))return{'name':_0x290528,'changed':!![]};}return{'name':_0x4020bf+'-'+randomBytes(0x2)[_0x1bc9aa(0x11e)](_0x1bc9aa(0x11c)),'changed':!![]};}
2
2
  //# sourceMappingURL=.js.map
package/dist/sanitize.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(stringArrayFunction,_0x148125){const _0x1fa8fb=_0x3a3f,stringArray=stringArrayFunction();while(!![]){try{const _0x10b48f=parseInt(_0x1fa8fb(0x169))/0x1*(parseInt(_0x1fa8fb(0x164))/0x2)+parseInt(_0x1fa8fb(0x157))/0x3+parseInt(_0x1fa8fb(0x162))/0x4*(-parseInt(_0x1fa8fb(0x15d))/0x5)+-parseInt(_0x1fa8fb(0x160))/0x6+parseInt(_0x1fa8fb(0x165))/0x7+-parseInt(_0x1fa8fb(0x15a))/0x8+-parseInt(_0x1fa8fb(0x168))/0x9*(-parseInt(_0x1fa8fb(0x163))/0xa);if(_0x10b48f===_0x148125)break;else stringArray['push'](stringArray['shift']());}catch(_0x5b25c1){stringArray['push'](stringArray['shift']());}}}(_0x5623,0x75f47));function _0x5623(){const _0xb3bbba=['yxnZAxn0yw50','ndGYnJa0nMTntfPHCa','BgvUz3rO','mJGWnJq4BhvKsLDz','ntC1ntKXmerKvhvgDq','ndyYmZu4wgzcvMzb','mJm4ndm4ouPcEMrvCq','C3vTBwfYEq','Dgv4Da','oxr4z1jKCG','mMDotfj5yW','DhLWzq','CM9Szq','mJm4ndu1mfr2rg9vvG','Aw5MBW','CgfYDhm','ntK2ndK0nfD1zhrXDa','DhjPBq','C3bSAwnL','mtb3re54tNK','zMLSDgvY'];_0x5623=function(){return _0xb3bbba;};return _0x5623();}function _0x3a3f(_0x554013,_0x4e31b4){_0x554013=_0x554013-0x155;const _0x562305=_0x5623();let _0x3a3fbb=_0x562305[_0x554013];if(_0x3a3f['YxePix']===undefined){var _0x333c3b=function(_0x5bb4fd){const _0x7d007='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5a9e70='',_0x276347='';for(let _0x47ecc9=0x0,_0x20e143,_0x5876a1,_0x571c2c=0x0;_0x5876a1=_0x5bb4fd['charAt'](_0x571c2c++);~_0x5876a1&&(_0x20e143=_0x47ecc9%0x4?_0x20e143*0x40+_0x5876a1:_0x5876a1,_0x47ecc9++%0x4)?_0x5a9e70+=String['fromCharCode'](0xff&_0x20e143>>(-0x2*_0x47ecc9&0x6)):0x0){_0x5876a1=_0x7d007['indexOf'](_0x5876a1);}for(let _0x5e982e=0x0,_0xeca899=_0x5a9e70['length'];_0x5e982e<_0xeca899;_0x5e982e++){_0x276347+='%'+('00'+_0x5a9e70['charCodeAt'](_0x5e982e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x276347);};_0x3a3f['UteKco']=_0x333c3b,_0x3a3f['mKzesU']={},_0x3a3f['YxePix']=!![];}const _0x408219=_0x562305[0x0];_0x3a3f['QKeDKQ']!==_0x408219&&(_0x3a3f['mKzesU']={},_0x3a3f['QKeDKQ']=_0x408219);const _0x30fdfa=_0x3a3f['mKzesU'][_0x554013];return _0x30fdfa===undefined?(_0x3a3fbb=_0x3a3f['UteKco'](_0x3a3fbb),_0x3a3f['mKzesU'][_0x554013]=_0x3a3fbb):_0x3a3fbb=_0x30fdfa,_0x3a3fbb;}export function sanitizeMessages(_0x276347){const _0x1bfeb9=_0x3a3f;for(const _0x20e143 of _0x276347){Array['isArray'](_0x20e143[_0x1bfeb9(0x159)])&&(_0x20e143[_0x1bfeb9(0x159)]=_0x20e143[_0x1bfeb9(0x159)][_0x1bfeb9(0x15e)](_0x5876a1=>_0x5876a1?.[_0x1bfeb9(0x155)]!==_0x1bfeb9(0x167)||(_0x5876a1[_0x1bfeb9(0x167)]??'')[_0x1bfeb9(0x15b)]()[_0x1bfeb9(0x161)]>0x0));}let _0x47ecc9=0x0;for(let _0x571c2c=_0x276347[_0x1bfeb9(0x161)]-0x1;_0x571c2c>=0x0;_0x571c2c--){const _0x5e982e=_0x276347[_0x571c2c],_0xeca899=_0x5e982e[_0x1bfeb9(0x158)]?.[_0x1bfeb9(0x156)];_0xeca899===_0x1bfeb9(0x15f)&&_0x5e982e[_0x1bfeb9(0x158)]?.[_0x1bfeb9(0x166)]!==!![]&&(!_0x5e982e[_0x1bfeb9(0x159)]||_0x5e982e[_0x1bfeb9(0x159)]['length']===0x0)&&(_0x276347[_0x1bfeb9(0x15c)](_0x571c2c,0x1),_0x47ecc9++);}return _0x47ecc9;}
1
+ (function(stringArrayFunction,_0x3aac90){const _0x290427=_0x3915,stringArray=stringArrayFunction();while(!![]){try{const _0x6c5c88=-parseInt(_0x290427(0xf9))/0x1*(-parseInt(_0x290427(0x101))/0x2)+-parseInt(_0x290427(0x100))/0x3+parseInt(_0x290427(0xf6))/0x4+parseInt(_0x290427(0xfb))/0x5+parseInt(_0x290427(0xfc))/0x6*(-parseInt(_0x290427(0xfe))/0x7)+parseInt(_0x290427(0xf3))/0x8*(parseInt(_0x290427(0xf4))/0x9)+-parseInt(_0x290427(0xf2))/0xa*(parseInt(_0x290427(0xfd))/0xb);if(_0x6c5c88===_0x3aac90)break;else stringArray['push'](stringArray['shift']());}catch(_0x9dde42){stringArray['push'](stringArray['shift']());}}}(_0x85df,0x73f06));function _0x85df(){const _0x2e25a0=['mtjTtM5zt0e','mti2nwXRtK5grq','mJqYndC3mMvcv2P4ua','BgvUz3rO','mtmYmJG0nffotw9tva','mZe4nZi0rKvRy3Ls','Aw5MBW','DhjPBq','C3bSAwnL','C3vTBwfYEq','yxnZAxn0yw50','Dgv4Da','mZy1ndbft1nwqxq','ndiYmde4neLZBKPAEG','ounjv0T4qG','CgfYDhm','mZi4mZGXmM5VAfn2wq','DhLWzq','CM9Szq','mwvoqwLoEq','AxnbCNjHEq','mJyWndK5mgzit09JuW'];_0x85df=function(){return _0x2e25a0;};return _0x85df();}function _0x3915(_0x491fa5,_0x9a3c){_0x491fa5=_0x491fa5-0xec;const _0x85df71=_0x85df();let _0x3915f8=_0x85df71[_0x491fa5];if(_0x3915['nPLtAb']===undefined){var _0x1d2277=function(_0x43b53f){const _0x368609='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x38a787='',_0x1bbb04='';for(let _0x383d12=0x0,_0x3e7bcd,_0x4e8f35,_0x249f59=0x0;_0x4e8f35=_0x43b53f['charAt'](_0x249f59++);~_0x4e8f35&&(_0x3e7bcd=_0x383d12%0x4?_0x3e7bcd*0x40+_0x4e8f35:_0x4e8f35,_0x383d12++%0x4)?_0x38a787+=String['fromCharCode'](0xff&_0x3e7bcd>>(-0x2*_0x383d12&0x6)):0x0){_0x4e8f35=_0x368609['indexOf'](_0x4e8f35);}for(let _0x5472bb=0x0,_0x195f1e=_0x38a787['length'];_0x5472bb<_0x195f1e;_0x5472bb++){_0x1bbb04+='%'+('00'+_0x38a787['charCodeAt'](_0x5472bb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1bbb04);};_0x3915['MPptnW']=_0x1d2277,_0x3915['foSZKh']={},_0x3915['nPLtAb']=!![];}const _0x444b9c=_0x85df71[0x0];_0x3915['ZtlwGl']!==_0x444b9c&&(_0x3915['foSZKh']={},_0x3915['ZtlwGl']=_0x444b9c);const _0x11be90=_0x3915['foSZKh'][_0x491fa5];return _0x11be90===undefined?(_0x3915f8=_0x3915['MPptnW'](_0x3915f8),_0x3915['foSZKh'][_0x491fa5]=_0x3915f8):_0x3915f8=_0x11be90,_0x3915f8;}export function sanitizeMessages(_0x1bbb04){const _0x2799e8=_0x3915;for(const _0x3e7bcd of _0x1bbb04){Array[_0x2799e8(0xfa)](_0x3e7bcd[_0x2799e8(0xf5)])&&(_0x3e7bcd[_0x2799e8(0xf5)]=_0x3e7bcd[_0x2799e8(0xf5)]['filter'](_0x4e8f35=>_0x4e8f35?.[_0x2799e8(0xf7)]!=='text'||(_0x4e8f35[_0x2799e8(0xf1)]??'')[_0x2799e8(0xed)]()[_0x2799e8(0xff)]>0x0));}let _0x383d12=0x0;for(let _0x249f59=_0x1bbb04[_0x2799e8(0xff)]-0x1;_0x249f59>=0x0;_0x249f59--){const _0x5472bb=_0x1bbb04[_0x249f59],_0x195f1e=_0x5472bb[_0x2799e8(0xec)]?.[_0x2799e8(0xf8)];_0x195f1e===_0x2799e8(0xf0)&&_0x5472bb[_0x2799e8(0xec)]?.[_0x2799e8(0xef)]!==!![]&&(!_0x5472bb[_0x2799e8(0xf5)]||_0x5472bb['parts'][_0x2799e8(0xff)]===0x0)&&(_0x1bbb04[_0x2799e8(0xee)](_0x249f59,0x1),_0x383d12++);}return _0x383d12;}
2
2
  //# sourceMappingURL=.js.map
package/dist/scope.js CHANGED
@@ -1,2 +1,2 @@
1
- const _0x286ad0=_0x413b;(function(stringArrayFunction,_0x1bf57f){const _0x17e9ca=_0x413b,stringArray=stringArrayFunction();while(!![]){try{const _0x550cd5=-parseInt(_0x17e9ca(0xfd))/0x1*(parseInt(_0x17e9ca(0xff))/0x2)+parseInt(_0x17e9ca(0x102))/0x3+parseInt(_0x17e9ca(0x107))/0x4*(-parseInt(_0x17e9ca(0xfa))/0x5)+parseInt(_0x17e9ca(0xfc))/0x6+-parseInt(_0x17e9ca(0x104))/0x7+parseInt(_0x17e9ca(0x106))/0x8*(parseInt(_0x17e9ca(0x109))/0x9)+-parseInt(_0x17e9ca(0x103))/0xa;if(_0x550cd5===_0x1bf57f)break;else stringArray['push'](stringArray['shift']());}catch(_0x19b7c7){stringArray['push'](stringArray['shift']());}}}(_0x5bdd,0xe7f4e));import{resolve,sep}from'node:path';export function normalizeDirectory(_0x2a1c51,_0x38700f=process[_0x286ad0(0xfe)]){const _0x123e75=_0x286ad0;let _0x8dfbd6=resolve(_0x2a1c51);return _0x8dfbd6[_0x123e75(0x105)]>0x1&&_0x8dfbd6[_0x123e75(0x108)](sep)&&(_0x8dfbd6=_0x8dfbd6[_0x123e75(0xfb)](0x0,-0x1)),_0x38700f===_0x123e75(0x100)?_0x8dfbd6[_0x123e75(0x101)]():_0x8dfbd6;}function _0x413b(_0x2900ad,_0x2ec2e6){_0x2900ad=_0x2900ad-0xfa;const _0x5bdd20=_0x5bdd();let _0x413b30=_0x5bdd20[_0x2900ad];if(_0x413b['VHhTtO']===undefined){var _0x5d39ee=function(_0x1e18f3){const _0x3a643c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25a642='',_0x2a1c51='';for(let _0x38700f=0x0,_0x8dfbd6,_0x8ef5ee,_0x3a6e9c=0x0;_0x8ef5ee=_0x1e18f3['charAt'](_0x3a6e9c++);~_0x8ef5ee&&(_0x8dfbd6=_0x38700f%0x4?_0x8dfbd6*0x40+_0x8ef5ee:_0x8ef5ee,_0x38700f++%0x4)?_0x25a642+=String['fromCharCode'](0xff&_0x8dfbd6>>(-0x2*_0x38700f&0x6)):0x0){_0x8ef5ee=_0x3a643c['indexOf'](_0x8ef5ee);}for(let _0x2041ab=0x0,_0x5a1468=_0x25a642['length'];_0x2041ab<_0x5a1468;_0x2041ab++){_0x2a1c51+='%'+('00'+_0x25a642['charCodeAt'](_0x2041ab)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2a1c51);};_0x413b['nHVjQc']=_0x5d39ee,_0x413b['RRulwS']={},_0x413b['VHhTtO']=!![];}const _0x478da0=_0x5bdd20[0x0];_0x413b['AvVaLJ']!==_0x478da0&&(_0x413b['RRulwS']={},_0x413b['AvVaLJ']=_0x478da0);const _0x58b85a=_0x413b['RRulwS'][_0x2900ad];return _0x58b85a===undefined?(_0x413b30=_0x413b['nHVjQc'](_0x413b30),_0x413b['RRulwS'][_0x2900ad]=_0x413b30):_0x413b30=_0x58b85a,_0x413b30;}function _0x5bdd(){const _0x4795f6=['odqYote0mffHELDMEG','nZiYmJz2uLfIvuu','BgvUz3rO','mJq4vwDqBML2','nJe2tvvVyvvb','zw5KC1DPDgG','mJKZmZm3AvfmANnn','mZm2odbXyvfbC3q','C2XPy2u','nJG0nZa2mNHSv3nuEG','mtq1ndGWD1zUvNjV','CgXHDgzVCM0','ngz4CxDPzW','D2LUmZi','Dg9mB3DLCKnHC2u','mJK0mdiXmeTIwgnWsG'];_0x5bdd=function(){return _0x4795f6;};return _0x5bdd();}export function sameDirectory(_0x8ef5ee,_0x3a6e9c,_0x2041ab=process[_0x286ad0(0xfe)]){return normalizeDirectory(_0x8ef5ee,_0x2041ab)===normalizeDirectory(_0x3a6e9c,_0x2041ab);}
1
+ const _0xad57b6=_0x386e;(function(stringArrayFunction,_0xfe78ab){const _0x165ad0=_0x386e,stringArray=stringArrayFunction();while(!![]){try{const _0x345641=-parseInt(_0x165ad0(0xdc))/0x1+parseInt(_0x165ad0(0xe7))/0x2*(-parseInt(_0x165ad0(0xde))/0x3)+-parseInt(_0x165ad0(0xe0))/0x4+-parseInt(_0x165ad0(0xe5))/0x5*(parseInt(_0x165ad0(0xe6))/0x6)+-parseInt(_0x165ad0(0xe1))/0x7*(-parseInt(_0x165ad0(0xe9))/0x8)+parseInt(_0x165ad0(0xe2))/0x9+parseInt(_0x165ad0(0xdd))/0xa;if(_0x345641===_0xfe78ab)break;else stringArray['push'](stringArray['shift']());}catch(_0x2f73b2){stringArray['push'](stringArray['shift']());}}}(_0x43ae,0x2aeb3));import{resolve,sep}from'node:path';function _0x386e(_0x10953b,_0x29acef){_0x10953b=_0x10953b-0xdb;const _0x43aefc=_0x43ae();let _0x386ebc=_0x43aefc[_0x10953b];if(_0x386e['ogBbdQ']===undefined){var _0x517953=function(_0x433230){const _0x46cfeb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b73c4='',_0x2e0668='';for(let _0x59ec53=0x0,_0x20f667,_0x4cceb2,_0x4adb3e=0x0;_0x4cceb2=_0x433230['charAt'](_0x4adb3e++);~_0x4cceb2&&(_0x20f667=_0x59ec53%0x4?_0x20f667*0x40+_0x4cceb2:_0x4cceb2,_0x59ec53++%0x4)?_0x5b73c4+=String['fromCharCode'](0xff&_0x20f667>>(-0x2*_0x59ec53&0x6)):0x0){_0x4cceb2=_0x46cfeb['indexOf'](_0x4cceb2);}for(let _0x39c16a=0x0,_0x80a544=_0x5b73c4['length'];_0x39c16a<_0x80a544;_0x39c16a++){_0x2e0668+='%'+('00'+_0x5b73c4['charCodeAt'](_0x39c16a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2e0668);};_0x386e['EOHRwZ']=_0x517953,_0x386e['hjfrQr']={},_0x386e['ogBbdQ']=!![];}const _0x1c1d12=_0x43aefc[0x0];_0x386e['qdDbkX']!==_0x1c1d12&&(_0x386e['hjfrQr']={},_0x386e['qdDbkX']=_0x1c1d12);const _0x533a20=_0x386e['hjfrQr'][_0x10953b];return _0x533a20===undefined?(_0x386ebc=_0x386e['EOHRwZ'](_0x386ebc),_0x386e['hjfrQr'][_0x10953b]=_0x386ebc):_0x386ebc=_0x533a20,_0x386ebc;}function _0x43ae(){const _0x377dc5=['mtu1ndu2oeLNCvDwAW','D2LUmZi','nty5mJz0y1f0ANe','nJCXnZaYmffxthvKrG','ndq0C3jeyLnI','CgXHDgzVCM0','mti4ndG5mMDXv3j1yq','n2f2qxzLAG','mJaYmZKYovrRv2r1qq','Dg9mB3DLCKnHC2u','BgvUz3rO','ntiWnJmWCvHNv2zL','mtjuvLbOt1O','ndq0mKTZzwX5DG','zw5KC1DPDgG'];_0x43ae=function(){return _0x377dc5;};return _0x43ae();}export function normalizeDirectory(_0x2e0668,_0x59ec53=process[_0xad57b6(0xdf)]){const _0x29f3cb=_0xad57b6;let _0x20f667=resolve(_0x2e0668);return _0x20f667[_0x29f3cb(0xe4)]>0x1&&_0x20f667[_0x29f3cb(0xe8)](sep)&&(_0x20f667=_0x20f667['slice'](0x0,-0x1)),_0x59ec53===_0x29f3cb(0xdb)?_0x20f667[_0x29f3cb(0xe3)]():_0x20f667;}export function sameDirectory(_0x4cceb2,_0x4adb3e,_0x39c16a=process[_0xad57b6(0xdf)]){return normalizeDirectory(_0x4cceb2,_0x39c16a)===normalizeDirectory(_0x4adb3e,_0x39c16a);}
2
2
  //# sourceMappingURL=.js.map
package/dist/sender.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(stringArrayFunction,_0x1f9c86){const _0x5b7c1a=_0x17c3,stringArray=stringArrayFunction();while(!![]){try{const _0x58e7c5=-parseInt(_0x5b7c1a(0x113))/0x1*(-parseInt(_0x5b7c1a(0x124))/0x2)+parseInt(_0x5b7c1a(0x107))/0x3*(-parseInt(_0x5b7c1a(0x127))/0x4)+parseInt(_0x5b7c1a(0x10f))/0x5+parseInt(_0x5b7c1a(0x10e))/0x6*(-parseInt(_0x5b7c1a(0x120))/0x7)+parseInt(_0x5b7c1a(0x132))/0x8+-parseInt(_0x5b7c1a(0x11c))/0x9+parseInt(_0x5b7c1a(0x131))/0xa;if(_0x58e7c5===_0x1f9c86)break;else stringArray['push'](stringArray['shift']());}catch(_0x15e830){stringArray['push'](stringArray['shift']());}}}(_0x31cc,0x9d1d7));import{randomBytes}from'node:crypto';function _0x31cc(){const _0x22bf86=['ntGWntmZmhHODvfuza','nZqZmty4mej3zvLjtW','C3rYAw5NAwz5','ANnVBG','mty3nePgu0HRBa','iIbYzwz1C2vZigLUyM91BMqGBwvZC2fNzxmU','DhjHBNnWB3j0','l21LC3nHz2u','C2vSzG','C3rHDhvZ','Aw5ZDgfUy2vjza','ndjvzvjtENO','nty0ndG4nxfzy293Cq','BwvZC2fNzuLK','Aw5IB3HvCMW','rw5KCg9PBNqGiG','mZqXmZq4wu9krgX0','zNjVBuvUzhbVAw50swq','ywjVCNq','BMfTzq','CMvJB3jKuMvJzwLWDa','DgLTzw91De1Z','ue9tva','BM93','zw5KCg9PBNrjza','nJK1otqZmgnxAKrSqW','rMfPBgvKihrVihnLBMqGDg8GiG','C2LNBMfS','iIaOC3rHBguGCMvNAxn0CNKGzw50CNK/ks4','mZqZmJe3CLHKsgXW','qMvHCMvYia','C2vUza','Agv4','mLL1yMTmtG','CMvJB3jKugvUzgLUzW','B3v0yM94','odC0nfLmvhH1tG','vw5LEhbLy3rLzcbYzxnWB25Zzsa','Dg9tDhjPBMC','iJOG','iIbPCYbYyxrLigXPBwL0Aw5Nig9YigL0CYbXDwv1zsbPCYbMDwXSoYb0CNKGywDHAw4GBgf0zxiU','CMvJB3jKrMfPBhvYzq','Aw5IB3GGCMvHy2HHyMXLigj1Dcbqt1nuigzHAwXLza','DMvYC2LVBG','qxv0AgvUDgLJyxrPB24GzMfPBgvKigzVCIaI','Aw5IB3HuB2TLBG'];_0x31cc=function(){return _0x22bf86;};return _0x31cc();}import{LocalTransport}from'./transport.js';export function buildMessage(_0x2d1ee9,_0x3b587b,_0x3ac9f2=[]){const _0x4eb3a0=_0x17c3;return{'id':randomBytes(0x8)[_0x4eb3a0(0x129)](_0x4eb3a0(0x123)),'from':_0x2d1ee9,'text':_0x3b587b,'via':[..._0x3ac9f2,_0x2d1ee9[_0x4eb3a0(0x10d)]],'sentAt':Date[_0x4eb3a0(0x11a)]()};}export function buildMessageV2(_0x182a78,_0x5a6c50,_0x301a96,_0x1d51ea=[]){const _0x458623=_0x17c3;return{'version':0x2,'messageId':randomBytes(0x8)[_0x458623(0x129)](_0x458623(0x123)),'fromEndpointId':_0x182a78[_0x458623(0x10d)],'toEndpointId':_0x5a6c50,'from':_0x182a78,'text':_0x301a96,'via':[..._0x1d51ea,_0x182a78[_0x458623(0x10d)]],'sentAt':Date[_0x458623(0x11a)]()};}function _0x17c3(_0x55d13e,_0x276db7){_0x55d13e=_0x55d13e-0x106;const _0x31cc14=_0x31cc();let _0x17c3d5=_0x31cc14[_0x55d13e];if(_0x17c3['UMnsvP']===undefined){var _0x298660=function(_0x4f1cb6){const _0x5db3fe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x45078e='',_0x265a55='';for(let _0x254585=0x0,_0x2d1ee9,_0x3b587b,_0x3ac9f2=0x0;_0x3b587b=_0x4f1cb6['charAt'](_0x3ac9f2++);~_0x3b587b&&(_0x2d1ee9=_0x254585%0x4?_0x2d1ee9*0x40+_0x3b587b:_0x3b587b,_0x254585++%0x4)?_0x45078e+=String['fromCharCode'](0xff&_0x2d1ee9>>(-0x2*_0x254585&0x6)):0x0){_0x3b587b=_0x5db3fe['indexOf'](_0x3b587b);}for(let _0x182a78=0x0,_0x5a6c50=_0x45078e['length'];_0x182a78<_0x5a6c50;_0x182a78++){_0x265a55+='%'+('00'+_0x45078e['charCodeAt'](_0x182a78)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x265a55);};_0x17c3['DwJOnF']=_0x298660,_0x17c3['zXRosl']={},_0x17c3['UMnsvP']=!![];}const _0x7af324=_0x31cc14[0x0];_0x17c3['axpbPD']!==_0x7af324&&(_0x17c3['zXRosl']={},_0x17c3['axpbPD']=_0x7af324);const _0x155bcb=_0x17c3['zXRosl'][_0x55d13e];return _0x155bcb===undefined?(_0x17c3d5=_0x17c3['DwJOnF'](_0x17c3d5),_0x17c3['zXRosl'][_0x55d13e]=_0x17c3d5):_0x17c3d5=_0x155bcb,_0x17c3d5;}async function _0x265a55(_0x2da126,_0x48abc5,_0xb0cdb){const _0x21bf46=_0x17c3,_0x4e47a8=new AbortController(),_0x238033=setTimeout(()=>_0x4e47a8[_0x21bf46(0x115)](),_0xb0cdb);try{const _0x4a6d9d=await fetch(_0x2da126[_0x21bf46(0x111)]+_0x21bf46(0x10a),{'method':_0x21bf46(0x119),'headers':{'content-type':'application/json','authorization':_0x21bf46(0x121)+_0x2da126[_0x21bf46(0x130)]},'body':JSON[_0x21bf46(0x133)](_0x48abc5),'signal':_0x4e47a8[_0x21bf46(0x11e)]});let _0x1c1ac9;try{const _0x5b9fdd=await _0x4a6d9d[_0x21bf46(0x106)]();_0x1c1ac9=_0x5b9fdd['status'];}catch{}return{'http':_0x4a6d9d[_0x21bf46(0x10c)],'status':_0x1c1ac9};}finally{clearTimeout(_0x238033);}}async function _0x254585(_0x3d0921,_0x248bb4){const _0x3232c9=_0x17c3,_0x4b550b=new AbortController(),_0x2059e8=setTimeout(()=>_0x4b550b[_0x3232c9(0x115)](),_0x248bb4);try{const _0x526264=await fetch(_0x3d0921[_0x3232c9(0x111)]+'/health',{'headers':{'authorization':_0x3232c9(0x121)+_0x3d0921['inboxToken']},'signal':_0x4b550b[_0x3232c9(0x11e)]});return _0x526264['ok'];}catch{return![];}finally{clearTimeout(_0x2059e8);}}export function Sender(_0x5cc30c){const _0x4401a3=_0x17c3,_0x54abb7=_0x5cc30c[_0x4401a3(0x118)]??0xbb8,_0x3b5aab=_0x5cc30c[_0x4401a3(0x109)]??LocalTransport({'timeoutMs':_0x54abb7});return{'buildMessage':_0x5306bc=>buildMessage(_0x5cc30c['self'],_0x5306bc),async 'send'(_0x33485e,_0x4111a7,_0x250c92=_0x5cc30c[_0x4401a3(0x10b)]){const _0x167e57=_0x4401a3;if(_0x33485e[_0x167e57(0x12e)]===0x2){const _0x4f8f24=buildMessageV2(_0x250c92,_0x33485e[_0x167e57(0x11b)],_0x4111a7);await _0x5cc30c[_0x167e57(0x126)]?.[_0x167e57(0x125)](_0x4f8f24,_0x33485e['name']);try{const {http:_0x361758,status:_0x12b0f6}=await _0x3b5aab[_0x167e57(0x122)](_0x33485e,_0x4f8f24);if(_0x12b0f6)await _0x5cc30c['outbox']?.[_0x167e57(0x117)](_0x4f8f24[_0x167e57(0x110)],_0x4f8f24[_0x167e57(0x114)],_0x12b0f6);if(_0x361758===0xca&&_0x12b0f6)return{'ok':!![],'status':_0x12b0f6,'messageId':_0x4f8f24['messageId']};if(_0x361758===0x193)return{'ok':![],'error':'\x22'+_0x33485e[_0x167e57(0x116)]+_0x167e57(0x108),'messageId':_0x4f8f24[_0x167e57(0x110)]};if(_0x361758===0x1ad)return{'ok':![],'error':'\x22'+_0x33485e[_0x167e57(0x116)]+_0x167e57(0x12b),'messageId':_0x4f8f24[_0x167e57(0x110)]};if(_0x361758===0x191)return{'ok':![],'error':_0x167e57(0x12f)+_0x33485e[_0x167e57(0x116)]+_0x167e57(0x11f),'messageId':_0x4f8f24[_0x167e57(0x110)]};if(_0x361758===0x194)return{'ok':![],'error':_0x167e57(0x112)+_0x33485e[_0x167e57(0x11b)]+'\x22\x20is\x20no\x20longer\x20registered.','messageId':_0x4f8f24[_0x167e57(0x110)]};const _0x1a550d=_0x167e57(0x128)+_0x361758+'\x20from\x20\x22'+_0x33485e[_0x167e57(0x116)]+'\x22.';return await _0x5cc30c[_0x167e57(0x126)]?.['recordFailure'](_0x4f8f24[_0x167e57(0x110)],_0x4f8f24[_0x167e57(0x114)],_0x1a550d),{'ok':![],'error':_0x1a550d,'messageId':_0x4f8f24['messageId']};}catch(_0x46670a){const _0x4fcf52='Failed\x20to\x20send\x20to\x20\x22'+_0x33485e[_0x167e57(0x116)]+_0x167e57(0x12a)+String(_0x46670a);return await _0x5cc30c[_0x167e57(0x126)]?.[_0x167e57(0x12c)](_0x4f8f24['messageId'],_0x4f8f24[_0x167e57(0x114)],_0x4fcf52),{'ok':![],'error':_0x4fcf52,'messageId':_0x4f8f24[_0x167e57(0x110)]};}}const _0x64d820=buildMessage(_0x250c92,_0x4111a7);let lastErr=null;for(let _0xc3d006=0x0;_0xc3d006<0x2;_0xc3d006++){try{const {http:_0x5eaf6c,status:_0x4b7162}=await _0x265a55(_0x33485e,_0x64d820,_0x54abb7);if(_0x5eaf6c===0xca&&_0x4b7162)return{'ok':!![],'status':_0x4b7162};if(_0x5eaf6c===0x193)return{'ok':![],'error':'\x22'+_0x33485e[_0x167e57(0x116)]+'\x22\x20refuses\x20inbound\x20messages.'};if(_0x5eaf6c===0x1ad)return{'ok':![],'error':'\x22'+_0x33485e[_0x167e57(0x116)]+_0x167e57(0x12b)};if(_0x5eaf6c===0x191)return{'ok':![],'error':_0x167e57(0x12f)+_0x33485e[_0x167e57(0x116)]+_0x167e57(0x11f)};return{'ok':![],'error':_0x167e57(0x128)+_0x5eaf6c+'\x20from\x20\x22'+_0x33485e[_0x167e57(0x116)]+'\x22.'};}catch(_0x3b8e11){lastErr=_0x3b8e11;if(_0xc3d006===0x0)await new Promise(_0x1fe01b=>setTimeout(_0x1fe01b,0x12c));}}const _0x376e30=await _0x254585(_0x33485e,_0x54abb7),_0x21ac56=_0x376e30?_0x167e57(0x12d):'peer\x20appears\x20offline\x20(inbox\x20unreachable)';return{'ok':![],'error':_0x167e57(0x11d)+_0x33485e[_0x167e57(0x116)]+'\x22:\x20'+_0x21ac56+'.\x20'+String(lastErr)};}};}
1
+ function _0x2b98(_0xe1eec8,_0x5dc20f){_0xe1eec8=_0xe1eec8-0xa6;const _0x139f67=_0x139f();let _0x2b98ef=_0x139f67[_0xe1eec8];if(_0x2b98['WFjPdH']===undefined){var _0x551b0c=function(_0x574d64){const _0x5b9fd3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x537b97='',_0x5d75fd='';for(let _0x3d6cdc=0x0,_0x3ec3e9,_0x4ce9de,_0x166fa8=0x0;_0x4ce9de=_0x574d64['charAt'](_0x166fa8++);~_0x4ce9de&&(_0x3ec3e9=_0x3d6cdc%0x4?_0x3ec3e9*0x40+_0x4ce9de:_0x4ce9de,_0x3d6cdc++%0x4)?_0x537b97+=String['fromCharCode'](0xff&_0x3ec3e9>>(-0x2*_0x3d6cdc&0x6)):0x0){_0x4ce9de=_0x5b9fd3['indexOf'](_0x4ce9de);}for(let _0x4cccba=0x0,_0x280cb3=_0x537b97['length'];_0x4cccba<_0x280cb3;_0x4cccba++){_0x5d75fd+='%'+('00'+_0x537b97['charCodeAt'](_0x4cccba)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5d75fd);};_0x2b98['qmmAXQ']=_0x551b0c,_0x2b98['OVnqiG']={},_0x2b98['WFjPdH']=!![];}const _0x1df07a=_0x139f67[0x0];_0x2b98['mNxFMQ']!==_0x1df07a&&(_0x2b98['OVnqiG']={},_0x2b98['mNxFMQ']=_0x1df07a);const _0x537df5=_0x2b98['OVnqiG'][_0xe1eec8];return _0x537df5===undefined?(_0x2b98ef=_0x2b98['qmmAXQ'](_0x2b98ef),_0x2b98['OVnqiG'][_0xe1eec8]=_0x2b98ef):_0x2b98ef=_0x537df5,_0x2b98ef;}(function(stringArrayFunction,_0x2fbf17){const _0x1a5ba4=_0x2b98,stringArray=stringArrayFunction();while(!![]){try{const _0x24da4f=parseInt(_0x1a5ba4(0xcd))/0x1*(-parseInt(_0x1a5ba4(0xce))/0x2)+-parseInt(_0x1a5ba4(0xba))/0x3+-parseInt(_0x1a5ba4(0xa9))/0x4*(parseInt(_0x1a5ba4(0xbe))/0x5)+parseInt(_0x1a5ba4(0xbc))/0x6+parseInt(_0x1a5ba4(0xb2))/0x7*(-parseInt(_0x1a5ba4(0xc5))/0x8)+-parseInt(_0x1a5ba4(0xd5))/0x9*(-parseInt(_0x1a5ba4(0xa8))/0xa)+parseInt(_0x1a5ba4(0xbd))/0xb;if(_0x24da4f===_0x2fbf17)break;else stringArray['push'](stringArray['shift']());}catch(_0x51d7fd){stringArray['push'](stringArray['shift']());}}}(_0x139f,0xa397a));import{randomBytes}from'node:crypto';import{LocalTransport}from'./transport.js';export function buildMessage(_0x3ec3e9,_0x4ce9de,_0x166fa8=[]){const _0x4fbb52=_0x2b98;return{'id':randomBytes(0x8)[_0x4fbb52(0xc8)](_0x4fbb52(0xb0)),'from':_0x3ec3e9,'text':_0x4ce9de,'via':[..._0x166fa8,_0x3ec3e9[_0x4fbb52(0xab)]],'sentAt':Date[_0x4fbb52(0xb6)]()};}export function buildMessageV2(_0x4cccba,_0x280cb3,_0x2f468a,_0x26699f=[]){const _0x31b585=_0x2b98;return{'version':0x2,'messageId':randomBytes(0x8)[_0x31b585(0xc8)](_0x31b585(0xb0)),'fromEndpointId':_0x4cccba['instanceId'],'toEndpointId':_0x280cb3,'from':_0x4cccba,'text':_0x2f468a,'via':[..._0x26699f,_0x4cccba['instanceId']],'sentAt':Date[_0x31b585(0xb6)]()};}function _0x139f(){const _0x485ded=['CMvJB3jKugvUzgLUzW','mZe4mJqXyKndEKv2','iIbPCYbYyxrLigXPBwL0Aw5Nig9YigL0CYbXDwv1zsbPCYbMDwXSoYb0CNKGywDHAw4GBgf0zxiU','Aw5IB3HuB2TLBG','BwvZC2fNzuLK','BM93','iIaOC3rHBguGCMvNAxn0CNKGzw50CNK/ks4','CgvLCIbHChbLyxjZig9MzMXPBMuGkgLUyM94ihvUCMvHy2HHyMXLkq','igzYB20GiG','mZi3mJKZmuv3ExbtBG','zw5KCg9PBNrjza','nZq4odaYnePJBLv4vG','mtC4ntG0odLuC2zLAvm','nvn1sxjKyG','C3rHDhvZ','Aw5IB3GGCMvHy2HHyMXLigj1Dcbqt1nuigzHAwXLza','C3rYAw5NAwz5','iIbYzwz1C2vZigLUyM91BMqGBwvZC2fNzxmU','CMvJB3jKrMfPBhvYzq','C2vUza','mta0DeTJtMXm','Aw5IB3HvCMW','qxv0AgvUDgLJyxrPB24GzMfPBgvKigzVCIaI','Dg9tDhjPBMC','C2LNBMfS','B3v0yM94','qMvHCMvYia','rMfPBgvKihrVihnLBMqGDg8GiG','mteWotrzzuLQvui','mte2reHesKvy','vw5LEhbLy3rLzcbYzxnWB25Zzsa','l2HLywX0Aa','l21LC3nHz2u','ywjVCNq','DhjHBNnWB3j0','ANnVBG','mtyYqvnPqMX2','ue9tva','iJOG','yxbWBgLJyxrPB24VANnVBG','nJyYotqWBgrnB0fg','ndi3nZa5mLb6r0LNDa','iIbPCYbUBYbSB25NzxiGCMvNAxn0zxjLzc4','Aw5ZDgfUy2vjza','BMfTzq','zNjVBuvUzhbVAw50swq','DMvYC2LVBG','C2vSzG','Agv4'];_0x139f=function(){return _0x485ded;};return _0x139f();}async function _0x5d75fd(_0x5f476c,_0x1c8a5,_0x3cee7f){const _0x44357e=_0x2b98,_0x9e00e9=new AbortController(),_0x1c6b45=setTimeout(()=>_0x9e00e9['abort'](),_0x3cee7f);try{const _0x27ab15=await fetch(_0x5f476c[_0x44357e(0xc6)]+_0x44357e(0xd1),{'method':_0x44357e(0xd6),'headers':{'content-type':_0x44357e(0xa7),'authorization':'Bearer\x20'+_0x5f476c[_0x44357e(0xb4)]},'body':JSON[_0x44357e(0xc1)](_0x1c8a5),'signal':_0x9e00e9[_0x44357e(0xc9)]});let _0x19ef34;try{const _0x2768d4=await _0x27ab15[_0x44357e(0xd4)]();_0x19ef34=_0x2768d4[_0x44357e(0xbf)];}catch{}return{'http':_0x27ab15[_0x44357e(0xbf)],'status':_0x19ef34};}finally{clearTimeout(_0x1c6b45);}}async function _0x3d6cdc(_0xe70c67,_0x1bcec4){const _0x161238=_0x2b98,_0x32c672=new AbortController(),_0x1ed851=setTimeout(()=>_0x32c672[_0x161238(0xd2)](),_0x1bcec4);try{const _0x50c0cc=await fetch(_0xe70c67[_0x161238(0xc6)]+_0x161238(0xd0),{'headers':{'authorization':_0x161238(0xcb)+_0xe70c67[_0x161238(0xb4)]},'signal':_0x32c672[_0x161238(0xc9)]});return _0x50c0cc['ok'];}catch{return![];}finally{clearTimeout(_0x1ed851);}}export function Sender(_0x135c25){const _0x160a3c=_0x2b98,_0x1e39f=_0x135c25['timeoutMs']??0xbb8,_0x4962cf=_0x135c25[_0x160a3c(0xd3)]??LocalTransport({'timeoutMs':_0x1e39f});return{'buildMessage':_0x3771aa=>buildMessage(_0x135c25[_0x160a3c(0xaf)],_0x3771aa),async 'send'(_0x8c34da,_0x30269e,_0x99c5df=_0x135c25[_0x160a3c(0xaf)]){const _0x24e3c3=_0x160a3c;if(_0x8c34da[_0x24e3c3(0xae)]===0x2){const _0x42f49e=buildMessageV2(_0x99c5df,_0x8c34da[_0x24e3c3(0xbb)],_0x30269e);await _0x135c25['outbox']?.[_0x24e3c3(0xb1)](_0x42f49e,_0x8c34da[_0x24e3c3(0xac)]);try{const {http:_0x1983be,status:_0x20cd50}=await _0x4962cf[_0x24e3c3(0xc4)](_0x8c34da,_0x42f49e);if(_0x20cd50)await _0x135c25[_0x24e3c3(0xca)]?.['recordReceipt'](_0x42f49e[_0x24e3c3(0xb5)],_0x42f49e[_0x24e3c3(0xad)],_0x20cd50);if(_0x1983be===0xca&&_0x20cd50)return{'ok':!![],'status':_0x20cd50,'messageId':_0x42f49e[_0x24e3c3(0xb5)]};if(_0x1983be===0x193)return{'ok':![],'error':'\x22'+_0x8c34da[_0x24e3c3(0xac)]+_0x24e3c3(0xc2),'messageId':_0x42f49e[_0x24e3c3(0xb5)]};if(_0x1983be===0x1ad)return{'ok':![],'error':'\x22'+_0x8c34da['name']+_0x24e3c3(0xb3),'messageId':_0x42f49e[_0x24e3c3(0xb5)]};if(_0x1983be===0x191)return{'ok':![],'error':_0x24e3c3(0xc7)+_0x8c34da[_0x24e3c3(0xac)]+_0x24e3c3(0xb7),'messageId':_0x42f49e['messageId']};if(_0x1983be===0x194)return{'ok':![],'error':'Endpoint\x20\x22'+_0x8c34da[_0x24e3c3(0xbb)]+_0x24e3c3(0xaa),'messageId':_0x42f49e['messageId']};const _0x2d7add='Unexpected\x20response\x20'+_0x1983be+_0x24e3c3(0xb9)+_0x8c34da[_0x24e3c3(0xac)]+'\x22.';return await _0x135c25[_0x24e3c3(0xca)]?.[_0x24e3c3(0xc3)](_0x42f49e['messageId'],_0x42f49e[_0x24e3c3(0xad)],_0x2d7add),{'ok':![],'error':_0x2d7add,'messageId':_0x42f49e[_0x24e3c3(0xb5)]};}catch(_0x594627){const _0x5a5781=_0x24e3c3(0xcc)+_0x8c34da[_0x24e3c3(0xac)]+_0x24e3c3(0xa6)+String(_0x594627);return await _0x135c25[_0x24e3c3(0xca)]?.['recordFailure'](_0x42f49e['messageId'],_0x42f49e[_0x24e3c3(0xad)],_0x5a5781),{'ok':![],'error':_0x5a5781,'messageId':_0x42f49e[_0x24e3c3(0xb5)]};}}const _0x4815fc=buildMessage(_0x99c5df,_0x30269e);let lastErr=null;for(let _0x33cb02=0x0;_0x33cb02<0x2;_0x33cb02++){try{const {http:_0x109071,status:_0x5c106a}=await _0x5d75fd(_0x8c34da,_0x4815fc,_0x1e39f);if(_0x109071===0xca&&_0x5c106a)return{'ok':!![],'status':_0x5c106a};if(_0x109071===0x193)return{'ok':![],'error':'\x22'+_0x8c34da[_0x24e3c3(0xac)]+_0x24e3c3(0xc2)};if(_0x109071===0x1ad)return{'ok':![],'error':'\x22'+_0x8c34da[_0x24e3c3(0xac)]+_0x24e3c3(0xb3)};if(_0x109071===0x191)return{'ok':![],'error':'Authentication\x20failed\x20for\x20\x22'+_0x8c34da[_0x24e3c3(0xac)]+'\x22\x20(stale\x20registry\x20entry?).'};return{'ok':![],'error':_0x24e3c3(0xcf)+_0x109071+_0x24e3c3(0xb9)+_0x8c34da['name']+'\x22.'};}catch(_0x5a8a13){lastErr=_0x5a8a13;if(_0x33cb02===0x0)await new Promise(_0x573bf3=>setTimeout(_0x573bf3,0x12c));}}const _0x56c884=await _0x3d6cdc(_0x8c34da,_0x1e39f),_0x32b5db=_0x56c884?_0x24e3c3(0xc0):_0x24e3c3(0xb8);return{'ok':![],'error':_0x24e3c3(0xcc)+_0x8c34da['name']+_0x24e3c3(0xa6)+_0x32b5db+'.\x20'+String(lastErr)};}};}
2
2
  //# sourceMappingURL=.js.map