@ranger-testing/ranger-cli 3.1.0 → 3.1.1-alpha.b22d278-38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x573345=_0x5cc3;(function(_0x56ac50,_0x41c4ab){const _0x1f47f0=_0x5cc3,_0x26574b=_0x56ac50();while(!![]){try{const _0x1ace49=-parseInt(_0x1f47f0(0xcd))/0x1*(-parseInt(_0x1f47f0(0xd9))/0x2)+parseInt(_0x1f47f0(0xc1))/0x3+-parseInt(_0x1f47f0(0xd4))/0x4*(parseInt(_0x1f47f0(0xc4))/0x5)+-parseInt(_0x1f47f0(0xda))/0x6+-parseInt(_0x1f47f0(0xc2))/0x7*(parseInt(_0x1f47f0(0xd5))/0x8)+-parseInt(_0x1f47f0(0xc3))/0x9*(-parseInt(_0x1f47f0(0xe6))/0xa)+-parseInt(_0x1f47f0(0xd0))/0xb*(-parseInt(_0x1f47f0(0xc8))/0xc);if(_0x1ace49===_0x41c4ab)break;else _0x26574b['push'](_0x26574b['shift']());}catch(_0x2833e8){_0x26574b['push'](_0x26574b['shift']());}}}(_0x2338,0xd38ba));import{spawn}from'child_process';import{createRequire}from'module';import{dirname,join}from'path';import{readFileSync}from'fs';import{quoteShellArg}from'./playwrightCli.js';export const RANGERWRIGHT_CLI_PACKAGE=_0x573345(0xe5);export const RANGERWRIGHT_CLI_BINARY=_0x573345(0xd6);function readPackageJson(_0x1f57d1){const _0x4d91a3=_0x573345,_0x2395de={'ymTVV':_0x4d91a3(0xe1),'HYbjN':function(_0x206fb2,_0x3579e6){return _0x206fb2!==_0x3579e6;}},_0x326a06=readFileSync(_0x1f57d1,_0x2395de[_0x4d91a3(0xe4)]),_0x410d93=JSON[_0x4d91a3(0xbc)](_0x326a06);if(!_0x410d93||_0x2395de['HYbjN'](typeof _0x410d93,_0x4d91a3(0xc9)))return{};return _0x410d93;}function _0x2338(){const _0x35e909=['rangerwright','\x20binary','data','62QGCtiZ','8675868TnOAsi','\x0astdout:\x20','LGCbe','vCvyc','command','args','mPObY','utf-8','eEHag','close','ymTVV','@ranger-testing/rangerwright','10pLOvWo','null','Tfhxo','/package.json','...','socketPath','subcommand','timeoutMs','PCKQG','\x20--json','parse','toString','\x20does\x20not\x20expose\x20a\x20','--json','bin','560418PKcQLT','1295bIFoeb','10689129ffAkhv','430205fOnOas','rangerwright-cli\x20','ERmZq','cwd','62856AoBECG','object','artifactDir','binaryPath','package.json','29153ssPJcj','eqaUI','string','2222jgtlDG','SYXSI','kill','env','12nVTRnP','33112dTipoQ'];_0x2338=function(){return _0x35e909;};return _0x2338();}export function resolveRangerwrightCliBinary(){const _0x3b3bf2=_0x573345,_0x24f901={'SYXSI':function(_0x31b847,_0x2df5a8){return _0x31b847(_0x2df5a8);},'Tfhxo':_0x3b3bf2(0xcc)},_0x404c74=_0x24f901[_0x3b3bf2(0xd1)](createRequire,process['argv'][0x1]||join(process[_0x3b3bf2(0xc7)](),_0x24f901[_0x3b3bf2(0xb4)])),_0x1153ad=_0x404c74['resolve'](RANGERWRIGHT_CLI_PACKAGE+_0x3b3bf2(0xb5)),_0x1482bc=dirname(_0x1153ad),_0x3546d6=readPackageJson(_0x1153ad),_0x4f50e9=typeof _0x3546d6[_0x3b3bf2(0xc0)]===_0x3b3bf2(0xcf)?_0x3546d6[_0x3b3bf2(0xc0)]:_0x3546d6['bin']?.[RANGERWRIGHT_CLI_BINARY];if(!_0x4f50e9)throw new Error(RANGERWRIGHT_CLI_PACKAGE+_0x3b3bf2(0xbe)+RANGERWRIGHT_CLI_BINARY+_0x3b3bf2(0xd7));return join(_0x1482bc,_0x4f50e9);}function _0x5cc3(_0x3086f3,_0x1ef918){_0x3086f3=_0x3086f3-0xb3;const _0x233894=_0x2338();let _0x5cc30a=_0x233894[_0x3086f3];return _0x5cc30a;}export function buildRangerwrightCliEnv(_0x42e35b){const _0x9c1c7=_0x573345;return{'RANGERWRIGHT_SESSION':_0x42e35b['sessionId'],'RANGERWRIGHT_CONFIG':_0x42e35b['configPath'],'RANGERWRIGHT_ARTIFACT_DIR':_0x42e35b[_0x9c1c7(0xca)],..._0x42e35b['socketPath']?{'RANGERWRIGHT_SOCKET_PATH':_0x42e35b[_0x9c1c7(0xb7)]}:{}};}export function applyRangerwrightCliEnv(_0x32e8cd,_0x935451){const _0x2a38b9=_0x573345,_0x2ab5a6={'LGCbe':function(_0x5850db,_0x2e304c){return _0x5850db(_0x2e304c);}};Object['assign'](_0x32e8cd,_0x2ab5a6[_0x2a38b9(0xdc)](buildRangerwrightCliEnv,_0x935451));}export function buildRangerwrightCliCommandPrefix(_0x185fb4=resolveRangerwrightCliBinary()){const _0x10f1e0=_0x573345;return quoteShellArg(_0x185fb4)+_0x10f1e0(0xbb);}function getRangerwrightSubcommand(_0x39ec81){return _0x39ec81[0x0]??'unknown';}export function buildRangerwrightCliInvocation(_0x24b073,_0x347903){const _0x495285=_0x573345,_0x428e4a={'QZNQF':function(_0x56e2fd){return _0x56e2fd();},'ACFoe':_0x495285(0xbf),'vCvyc':function(_0x44940c,_0xc31683){return _0x44940c(_0xc31683);}},_0x2b9c78=_0x24b073[_0x495285(0xcb)]??_0x428e4a['QZNQF'](resolveRangerwrightCliBinary),_0x3baa69=[_0x495285(0xbf),..._0x347903];return{'command':_0x2b9c78,'args':_0x3baa69,'shellCommand':[quoteShellArg(_0x2b9c78),_0x428e4a['ACFoe'],..._0x347903['map'](quoteShellArg)]['join']('\x20'),'subcommand':_0x428e4a[_0x495285(0xdd)](getRangerwrightSubcommand,_0x347903)};}function truncateOutput(_0x5078b2,_0x42a711=0x7d0){const _0x4c375e=_0x573345,_0x28b7ed={'ERmZq':function(_0x451a9f,_0x1b33b8){return _0x451a9f>_0x1b33b8;},'eqaUI':function(_0x35c298,_0x38411c){return _0x35c298+_0x38411c;}};return _0x28b7ed[_0x4c375e(0xc6)](_0x5078b2['length'],_0x42a711)?_0x28b7ed[_0x4c375e(0xce)](_0x5078b2['slice'](0x0,_0x42a711),_0x4c375e(0xb6)):_0x5078b2;}export async function runRangerwrightCliCommand(_0x3fc2bc){const _0x1145cc=_0x573345,_0x1852dd={'tDmqR':'SIGTERM','jsVRR':function(_0x305507,_0xe6dd84){return _0x305507===_0xe6dd84;},'mPObY':function(_0x7df7d,_0x21b56d){return _0x7df7d(_0x21b56d);},'ehzcL':function(_0x1d119,_0x11c702){return _0x1d119??_0x11c702;},'GxuvW':function(_0xaa7947,_0x6ef576){return _0xaa7947??_0x6ef576;},'eEHag':function(_0x4e096d,_0x1109cc){return _0x4e096d(_0x1109cc);},'PCKQG':'ignore','GlyFn':function(_0x4713cf,_0x463ec2,_0xb9ce28){return _0x4713cf(_0x463ec2,_0xb9ce28);},'xorpr':_0x1145cc(0xd8)},_0x339b1a=buildRangerwrightCliInvocation(_0x3fc2bc,_0x3fc2bc['commandArgs']),_0x28eb2c={..._0x3fc2bc[_0x1145cc(0xd3)]??process['env'],..._0x1852dd['mPObY'](buildRangerwrightCliEnv,_0x3fc2bc)};return new Promise((_0x307972,_0x26182f)=>{const _0xcfe90=_0x1145cc,_0x962788=spawn(_0x339b1a[_0xcfe90(0xde)],_0x339b1a[_0xcfe90(0xdf)],{'cwd':_0x3fc2bc[_0xcfe90(0xc7)],'env':_0x28eb2c,'stdio':[_0x1852dd[_0xcfe90(0xba)],'pipe','pipe']});let _0x1de4da='',_0x4a25a8='',_0x3f5cd5=![];const _0xee2f9f=_0x3fc2bc['timeoutMs']&&_0x3fc2bc['timeoutMs']>0x0?_0x1852dd['GlyFn'](setTimeout,()=>{const _0x261041=_0xcfe90;_0x3f5cd5=!![],_0x962788[_0x261041(0xd2)](_0x1852dd['tDmqR']),setTimeout(()=>{try{_0x962788['kill']('SIGKILL');}catch{}},0x3e8);},_0x3fc2bc['timeoutMs']):null;_0x962788['stdout']?.['on'](_0x1852dd['xorpr'],_0x2c0e41=>{_0x1de4da+=_0x2c0e41['toString']();}),_0x962788['stderr']?.['on'](_0xcfe90(0xd8),_0x1dbee0=>{const _0xc573c3=_0xcfe90;_0x4a25a8+=_0x1dbee0[_0xc573c3(0xbd)]();}),_0x962788['on']('error',_0x3406b1=>{if(_0xee2f9f)clearTimeout(_0xee2f9f);_0x26182f(_0x3406b1);}),_0x962788['on'](_0xcfe90(0xe3),(_0x1308d1,_0x3e0e3a)=>{const _0x25ff63=_0xcfe90;if(_0xee2f9f)clearTimeout(_0xee2f9f);if(_0x1852dd['jsVRR'](_0x1308d1,0x0)){_0x1852dd[_0x25ff63(0xe0)](_0x307972,{'stdout':_0x1de4da,'stderr':_0x4a25a8,'invocation':_0x339b1a});return;}const _0x4a2a7b=_0x3f5cd5?'timed\x20out\x20after\x20'+_0x3fc2bc[_0x25ff63(0xb9)]+'ms':'exited\x20with\x20code='+_0x1852dd['ehzcL'](_0x1308d1,_0x25ff63(0xb3))+'\x20signal='+_0x1852dd['GxuvW'](_0x3e0e3a,_0x25ff63(0xb3));_0x1852dd[_0x25ff63(0xe0)](_0x26182f,new Error(_0x25ff63(0xc5)+_0x339b1a[_0x25ff63(0xb8)]+'\x20'+_0x4a2a7b+_0x25ff63(0xdb)+truncateOutput(_0x1de4da)+'\x0astderr:\x20'+_0x1852dd[_0x25ff63(0xe2)](truncateOutput,_0x4a25a8)));});});}export function parseRangerwrightCliCommand(_0x3a1784){const _0x2eeaa7=_0x3a1784['match'](/(?:^|\s)(?:"[^"]*rangerwright"|'[^']*rangerwright'|\S*rangerwright)(?:\s+--json)?\s+([a-z-]+)/);return _0x2eeaa7?.[0x1]??null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x173cec,_0x26d129){const _0x253905=_0xb241,_0x24a288=_0x173cec();while(!![]){try{const _0x217036=-parseInt(_0x253905(0x16a))/0x1+parseInt(_0x253905(0x15c))/0x2+parseInt(_0x253905(0x13e))/0x3*(-parseInt(_0x253905(0x159))/0x4)+parseInt(_0x253905(0x144))/0x5+-parseInt(_0x253905(0x151))/0x6+parseInt(_0x253905(0x150))/0x7+parseInt(_0x253905(0x142))/0x8;if(_0x217036===_0x26d129)break;else _0x24a288['push'](_0x24a288['shift']());}catch(_0x43bbc5){_0x24a288['push'](_0x24a288['shift']());}}}(_0x404c,0xd1d36));import{existsSync}from'fs';import _0x431a4e from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';function _0xb241(_0x3daaf5,_0x33696b){_0x3daaf5=_0x3daaf5-0x13a;const _0x404cad=_0x404c();let _0xb24106=_0x404cad[_0x3daaf5];return _0xb24106;}export async function resolveProfileContext(_0xf57400){const _0x2ee160=_0xb241,_0x572122={'vIFOA':function(_0x5560fd){return _0x5560fd();},'zurEN':function(_0x396bab,_0x4fa071){return _0x396bab===_0x4fa071;},'QnZej':function(_0x5d239c,_0x3ed801){return _0x5d239c+_0x3ed801;},'mOoOP':_0x2ee160(0x148),'uPAql':function(_0x4654ad,_0x11a15e){return _0x4654ad(_0x11a15e);},'GSVhk':function(_0x2a29af,_0x4bf8d0){return _0x2a29af instanceof _0x4bf8d0;},'THbdQ':function(_0x377ccb,_0x5b755a){return _0x377ccb===_0x5b755a;},'VpdlY':_0x2ee160(0x15b),'cRurx':function(_0x53f883,_0x393998){return _0x53f883&&_0x393998;},'Chqgw':'source','fqyns':'Local\x20profile','spPyZ':_0x2ee160(0x155),'FXVLN':_0x2ee160(0x14e),'MhKWL':function(_0x4f7cb2,_0x893913,_0x23765f){return _0x4f7cb2(_0x893913,_0x23765f);},'jGtTK':function(_0x5393b4,_0x338639){return _0x5393b4(_0x338639);},'wHRmk':function(_0x1b8bde,_0x4f6c84){return _0x1b8bde(_0x4f6c84);},'rjLPF':function(_0x275ece,_0x4c81cb){return _0x275ece(_0x4c81cb);},'yQFdV':function(_0x37d9bc,_0x3da52a){return _0x37d9bc(_0x3da52a);},'vPQYg':function(_0x474dd7,_0xf4e332,_0x421569){return _0x474dd7(_0xf4e332,_0x421569);},'UUqdj':function(_0x57399a,_0x1630f1){return _0x57399a(_0x1630f1);},'FZkcz':function(_0x240603,_0x516e87){return _0x240603(_0x516e87);}},_0x21aee2=_0xf57400[_0x2ee160(0x15e)];let _0x190783=_0xf57400['profile']??await _0x572122['vIFOA'](readActiveProfileName),_0x481abe=null;if(!_0x190783&&process[_0x2ee160(0x169)][_0x2ee160(0x141)]){const _0x331f0c=await resolveAdHocProfile();_0x331f0c&&(_0x190783=_0x331f0c['name'],_0x481abe=_0x331f0c['profile']);}if(!_0x190783)try{const _0x1ab501=await listCloudProfiles();if(_0x572122['zurEN'](_0x1ab501['length'],0x1)){const _0x10ead6=_0x1ab501[0x0];_0x190783=_0x10ead6[_0x2ee160(0x14f)],console[_0x2ee160(0x14a)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x10ead6['name']),console[_0x2ee160(0x14a)]('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x190783)throw new Error(_0x572122[_0x2ee160(0x168)](_0x572122[_0x2ee160(0x168)](_0x2ee160(0x156),_0x2ee160(0x146)),_0x2ee160(0x167))+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'+_0x572122[_0x2ee160(0x14c)]);const _0x4aa6dd=getEnvDir(_0x190783),_0x13fd18=existsSync(_0x4aa6dd);let _0x535751=_0x481abe,_0x18ece0=![];if(!_0x535751)try{_0x535751=await _0x572122['uPAql'](fetchCloudProfile,_0x190783);if(!_0x535751)_0x18ece0=!![];}catch(_0x3b3744){_0x572122['GSVhk'](_0x3b3744,ApiError)&&_0x572122[_0x2ee160(0x14b)](_0x3b3744[_0x2ee160(0x15d)],0x194)&&(_0x18ece0=!![]);}if(_0x21aee2&&_0x18ece0&&!_0x13fd18&&!_0x535751)throw new Error(_0x572122['QnZej'](_0x2ee160(0x149)+_0x21aee2+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x2ee160(0x145),_0x572122['VpdlY']));if(_0x572122['cRurx'](_0x535751,_0x13fd18)){let _0x52b8a7=!![];if(isInteractive()){const {source:_0x17eef3}=await _0x431a4e[_0x2ee160(0x13c)]([{'type':_0x2ee160(0x13a),'name':_0x572122[_0x2ee160(0x154)],'message':_0x2ee160(0x149)+_0x190783+_0x2ee160(0x165),'choices':[{'name':_0x2ee160(0x143),'value':_0x2ee160(0x14e)},{'name':_0x572122['fqyns'],'value':_0x572122[_0x2ee160(0x166)]}],'default':_0x2ee160(0x14e)}]);_0x52b8a7=_0x17eef3===_0x572122['FXVLN'];}if(!_0x52b8a7)_0x535751=null;}const _0x157e63=readProfileOverrides(process['cwd'](),_0x190783);let _0x42b6a9=null,_0x58b7cf,_0x360ef1,_0x335e47,_0x51752e,_0x47b035=null,_0x2bc40e;const _0x35a8a3=expandOverrides(_0x157e63),_0x10ec4d=readUrlEnvVars();if(_0x535751){_0x42b6a9=_0x535751;const _0x15a52f=_0x535751['settings']??{},_0x11dc10=_0x572122['MhKWL'](mergeCloudProfileSettings,_0x15a52f,_0x157e63??undefined),_0x4ec66f={..._0x535751,'settings':_0x11dc10};_0x47b035={'baseUrl':_0x572122['jGtTK'](expandString,_0x15a52f[_0x2ee160(0x164)]),'startPath':_0x572122['wHRmk'](expandString,_0x15a52f[_0x2ee160(0x140)])};const _0x3d32ff=await fetchAuthConfig(),_0x39c30a=_0x3d32ff?resolveAuthEnvironmentLocally(_0x3d32ff,_0x535751['environmentKey']):null;_0x2bc40e=_0x39c30a?.[_0x2ee160(0x157)]?.[0x0];const _0x1e10f8=resolveProfileUrl({'flagBaseUrl':_0xf57400[_0x2ee160(0x164)],'flagStartPath':_0xf57400['startPath'],'envBaseUrl':_0x10ec4d['envBaseUrl'],'envStartPath':_0x10ec4d['envStartPath'],'projectOverrides':_0x35a8a3,'cloudSettings':_0x47b035,'authEnvironmentDomain':_0x2bc40e}),_0x121d90=process['env'][_0x2ee160(0x153)];if(_0x121d90){if(!_0x572122[_0x2ee160(0x147)](existsSync,_0x121d90))throw new Error('RANGER_SESSION_STATE_PATH='+_0x121d90+'\x20does\x20not\x20exist.');_0x58b7cf=_0x121d90,_0x360ef1=resolveEnvVars(_0x11dc10),_0x335e47=_0x572122[_0x2ee160(0x13f)](Boolean,_0x360ef1['cdpEndpoint']);}else{const _0x133e47=await _0x572122[_0x2ee160(0x160)](resolveCloudProfileSession,_0x4ec66f,{'effectiveBaseUrl':_0x1e10f8['baseUrl']});_0x58b7cf=_0x133e47['authPath'],_0x360ef1=_0x572122[_0x2ee160(0x158)](resolveEnvVars,_0x133e47[_0x2ee160(0x161)]),_0x335e47=Boolean(_0x360ef1['cdpEndpoint']),_0x2bc40e=_0x133e47[_0x2ee160(0x13d)]?.[_0x2ee160(0x157)]?.[0x0];}}else{if(!_0x13fd18)throw new Error(_0x2ee160(0x149)+_0x190783+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x190783);const _0x572d1a=await loadSettings(_0x190783);_0x360ef1=_0x572122[_0x2ee160(0x13b)](resolveEnvVars,_0x572d1a),_0x335e47=Boolean(_0x360ef1['cdpEndpoint']),_0x51752e=_0x360ef1[_0x2ee160(0x164)];}const _0x1c5e0c=resolveProfileUrl({'flagBaseUrl':_0xf57400['baseUrl'],'flagStartPath':_0xf57400['startPath'],'envBaseUrl':_0x10ec4d['envBaseUrl'],'envStartPath':_0x10ec4d[_0x2ee160(0x163)],'localSettingsBaseUrl':_0x51752e,'projectOverrides':_0x35a8a3,'cloudSettings':_0x47b035,'authEnvironmentDomain':_0x2bc40e}),_0x46de87=_0x1c5e0c['url']??_0x1c5e0c[_0x2ee160(0x164)];if(!_0x46de87&&!_0x335e47)throw new Error(_0x2ee160(0x14d)+_0x190783+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x190783+'\x20baseUrl\x20<url>');return{'activeProfile':_0x190783,'resolvedCloudProfile':_0x42b6a9,'cloudAuthPath':_0x58b7cf,'resolvedSettings':_0x360ef1,'isCdpMode':_0x335e47,'url':_0x46de87,'startPath':_0x1c5e0c[_0x2ee160(0x140)]};}function expandString(_0x433d1a){const _0x36d040=_0xb241,_0x2cbcde={'agveh':'string'};if(typeof _0x433d1a!==_0x2cbcde[_0x36d040(0x152)])return _0x433d1a;return resolveEnvVars(_0x433d1a);}function expandOverrides(_0x96d1a2){const _0x24c61b=_0xb241,_0x236a8c={'EkwiA':function(_0x43d047,_0x4ee2e7){return _0x43d047===_0x4ee2e7;},'vuIbV':'string','kZiWv':function(_0x41bf1f,_0x536c55){return _0x41bf1f(_0x536c55);}};if(!_0x96d1a2)return _0x96d1a2;const _0x13ed59={..._0x96d1a2};return _0x236a8c['EkwiA'](typeof _0x13ed59['baseUrl'],_0x236a8c['vuIbV'])&&(_0x13ed59['baseUrl']=resolveEnvVars(_0x13ed59[_0x24c61b(0x164)])),_0x236a8c[_0x24c61b(0x15f)](typeof _0x13ed59[_0x24c61b(0x140)],_0x24c61b(0x15a))&&(_0x13ed59[_0x24c61b(0x140)]=_0x236a8c[_0x24c61b(0x162)](resolveEnvVars,_0x13ed59[_0x24c61b(0x140)])),_0x13ed59;}function _0x404c(){const _0x1a7731=['agveh','RANGER_SESSION_STATE_PATH','Chqgw','local','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','domains','UUqdj','564EJHEGq','string','`ranger\x20profile\x20add`\x20to\x20create\x20one.','2109030NexarW','status','profile','EkwiA','vPQYg','settings','kZiWv','envStartPath','baseUrl','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','spPyZ','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','QnZej','env','1524220LmYhpP','list','FZkcz','prompt','resolvedEnv','28419fdEYoq','yQFdV','startPath','RANGER_TEST_USERNAME','8725688HrHVwy','Cloud\x20profile\x20(recommended)','5889830qEIRBB','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','rjLPF','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','Profile\x20\x22','log','THbdQ','mOoOP','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','cloud','name','7816571CsJsDA','4322916MOfRFP'];_0x404c=function(){return _0x1a7731;};return _0x404c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x1ae8(_0x477647,_0x3511c2){_0x477647=_0x477647-0x1bc;const _0xc425d4=_0xc425();let _0x1ae821=_0xc425d4[_0x477647];return _0x1ae821;}(function(_0x37b4f3,_0x16c41e){const _0x276419=_0x1ae8,_0x4af75f=_0x37b4f3();while(!![]){try{const _0x40c4b2=-parseInt(_0x276419(0x1d1))/0x1+parseInt(_0x276419(0x1d3))/0x2*(-parseInt(_0x276419(0x1d0))/0x3)+parseInt(_0x276419(0x1cf))/0x4+parseInt(_0x276419(0x1be))/0x5*(parseInt(_0x276419(0x1c9))/0x6)+-parseInt(_0x276419(0x1ca))/0x7*(-parseInt(_0x276419(0x1ce))/0x8)+-parseInt(_0x276419(0x1c1))/0x9*(-parseInt(_0x276419(0x1d8))/0xa)+parseInt(_0x276419(0x1c3))/0xb*(-parseInt(_0x276419(0x1d7))/0xc);if(_0x40c4b2===_0x16c41e)break;else _0x4af75f['push'](_0x4af75f['shift']());}catch(_0x3caa93){_0x4af75f['push'](_0x4af75f['shift']());}}}(_0xc425,0x6f184));function firstDefined(..._0x1c4376){const _0x27f40d=_0x1ae8,_0x2abcbb={'liWNj':function(_0x462846,_0x56e44a){return _0x462846!==_0x56e44a;}};for(const _0x43a478 of _0x1c4376){if(_0x43a478!==undefined&&_0x2abcbb[_0x27f40d(0x1c2)](_0x43a478,null)&&_0x2abcbb[_0x27f40d(0x1c2)](_0x43a478,''))return _0x43a478;}return undefined;}function normalizeAuthEnvironmentDomain(_0x192384){const _0x13575a=_0x1ae8;if(!_0x192384)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x192384))return _0x192384;return _0x13575a(0x1c5)+_0x192384;}export function resolveBaseUrl(_0x264d17){const _0x3e9c42=_0x1ae8,_0x2bedf5={'RgXxX':function(_0x218e9d,_0x21f863){return _0x218e9d in _0x21f863;},'FIhNX':_0x3e9c42(0x1c0),'YhANz':function(_0x2eddff,_0x471fa9,_0x4612cf,_0x1a976f,_0xe0c646,_0x5b8504,_0x5ecf6a){return _0x2eddff(_0x471fa9,_0x4612cf,_0x1a976f,_0xe0c646,_0x5b8504,_0x5ecf6a);},'ahcpn':function(_0x754e0b,_0x826e58){return _0x754e0b===_0x826e58;},'JLWYC':function(_0x6e60be,_0x1f27e7){return _0x6e60be(_0x1f27e7);}},_0x18fc47=_0x264d17[_0x3e9c42(0x1c6)],_0x466135=!!_0x18fc47&&_0x2bedf5['RgXxX'](_0x2bedf5[_0x3e9c42(0x1c7)],_0x18fc47),_0x368fc9=_0x18fc47?.['baseUrl'],_0x1c21df=!(_0x466135&&_0x368fc9===null);return _0x2bedf5['YhANz'](firstDefined,_0x264d17[_0x3e9c42(0x1d9)],_0x264d17['envBaseUrl'],_0x264d17['localSettingsBaseUrl'],_0x2bedf5['ahcpn'](typeof _0x368fc9,_0x3e9c42(0x1bf))?_0x368fc9:undefined,_0x1c21df?_0x264d17['cloudSettings']?.['baseUrl']:undefined,_0x1c21df?_0x2bedf5[_0x3e9c42(0x1cc)](normalizeAuthEnvironmentDomain,_0x264d17[_0x3e9c42(0x1bc)]):undefined);}export function resolveStartPath(_0x7fc5aa){const _0x3fdc8d=_0x1ae8,_0x2ddb40={'uxCQO':function(_0x9fc65e,_0x433185){return _0x9fc65e in _0x433185;},'lghJd':function(_0x516363,_0x22496d){return _0x516363===_0x22496d;},'BySEj':function(_0x3cba94,_0x545edc,_0x5c9521,_0x5aec3d,_0x528718){return _0x3cba94(_0x545edc,_0x5c9521,_0x5aec3d,_0x528718);},'tGFFD':_0x3fdc8d(0x1bf)},_0x355ee2=_0x7fc5aa['projectOverrides'],_0x3ab47e=!!_0x355ee2&&_0x2ddb40[_0x3fdc8d(0x1c4)]('startPath',_0x355ee2),_0x329ea4=_0x355ee2?.['startPath'],_0xce3ce7=!(_0x3ab47e&&_0x2ddb40['lghJd'](_0x329ea4,null));return _0x2ddb40[_0x3fdc8d(0x1d4)](firstDefined,_0x7fc5aa[_0x3fdc8d(0x1d2)],_0x7fc5aa[_0x3fdc8d(0x1c8)],_0x2ddb40['lghJd'](typeof _0x329ea4,_0x2ddb40[_0x3fdc8d(0x1cd)])?_0x329ea4:undefined,_0xce3ce7?_0x7fc5aa['cloudSettings']?.['startPath']:undefined);}export function joinBaseAndPath(_0x4c6fbf,_0x2cdf69){const _0xd51ef0=_0x1ae8,_0x4f111f={'MnCTt':function(_0x17c5e1,_0x20fe58){return _0x17c5e1+_0x20fe58;}};if(!_0x4c6fbf)return undefined;if(!_0x2cdf69)return _0x4c6fbf;const _0x42efab=_0x4c6fbf['endsWith']('/')?_0x4c6fbf[_0xd51ef0(0x1cb)](0x0,-0x1):_0x4c6fbf,_0x198038=_0x2cdf69[_0xd51ef0(0x1d5)]('/')?_0x2cdf69:'/'+_0x2cdf69;return _0x4f111f['MnCTt'](_0x42efab,_0x198038);}export function resolveProfileUrl(_0x14a9ca){const _0x190a04=_0x1ae8,_0x15da15={'EsuDl':function(_0x2744b1,_0x351a13){return _0x2744b1(_0x351a13);}},_0x3fd7bc=resolveBaseUrl(_0x14a9ca),_0x8a12c2=_0x15da15[_0x190a04(0x1d6)](resolveStartPath,_0x14a9ca);return{'baseUrl':_0x3fd7bc,'startPath':_0x8a12c2,'url':joinBaseAndPath(_0x3fd7bc,_0x8a12c2)};}function _0xc425(){const _0x3cff8c=['tGFFD','1905528slcoin','2888540ksGnXk','9XYxoFm','27191Ihcbwe','flagStartPath','274642Tnxkdw','BySEj','startsWith','EsuDl','320556vgYEeq','8116180iSaToR','flagBaseUrl','authEnvironmentDomain','RANGER_START_PATH','190ZtDzJD','string','baseUrl','9tpqRwU','liWNj','517NBmDwg','uxCQO','https://','projectOverrides','FIhNX','envStartPath','22038aUuVXX','14FxAjOP','slice','JLWYC'];_0xc425=function(){return _0x3cff8c;};return _0xc425();}export function readUrlEnvVars(_0x256f4f=process['env']){const _0x543733=_0x1ae8;return{'envBaseUrl':_0x256f4f['RANGER_BASE_URL'],'envStartPath':_0x256f4f[_0x543733(0x1bd)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x535052,_0x3cf847){const _0x5c4b9f=_0x3d81,_0x2d5c1c=_0x535052();while(!![]){try{const _0x2d7a11=-parseInt(_0x5c4b9f(0xe7))/0x1*(-parseInt(_0x5c4b9f(0xe5))/0x2)+parseInt(_0x5c4b9f(0xe1))/0x3+-parseInt(_0x5c4b9f(0xde))/0x4+parseInt(_0x5c4b9f(0xdd))/0x5+parseInt(_0x5c4b9f(0xdc))/0x6*(parseInt(_0x5c4b9f(0xe3))/0x7)+-parseInt(_0x5c4b9f(0xe6))/0x8+-parseInt(_0x5c4b9f(0xe0))/0x9;if(_0x2d7a11===_0x3cf847)break;else _0x2d5c1c['push'](_0x2d5c1c['shift']());}catch(_0x6cddc){_0x2d5c1c['push'](_0x2d5c1c['shift']());}}}(_0x312b,0x521e3));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x312b(){const _0x4524f3=['1207390hQCgoj','2195760ixnfjx','1AvSTVe','PsxEM','),\x20retrying\x20in\x20','12jTYGjz','623405xCQmRr','2263188qIEvLG','pow','6151644YurUqq','1746498ynKcfI','label','1923586xxzqNe','maxRetries'];_0x312b=function(){return _0x4524f3;};return _0x312b();}function _0x3d81(_0x22782e,_0x1d43f3){_0x22782e=_0x22782e-0xdc;const _0x312bd9=_0x312b();let _0x3d8163=_0x312bd9[_0x22782e];return _0x3d8163;}export async function withRetry(_0x1525dd,_0xd2328b){const _0xf90193=_0x3d81,_0x1e8128={'NSaeL':function(_0x3cad13){return _0x3cad13();},'PsxEM':function(_0x3cc90b,_0x41c98c){return _0x3cc90b(_0x41c98c);},'fUDYP':function(_0x27cf25,_0x3b537d){return _0x27cf25<_0x3b537d;},'HLNJM':function(_0x3ea44c,_0x406c08){return _0x3ea44c+_0x406c08;}},_0x1980ad=_0xd2328b?.[_0xf90193(0xe4)]??DEFAULT_MAX_RETRIES,_0x27001d=_0xd2328b?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x5adcfb;for(let _0x33476c=0x0;_0x33476c<=_0x1980ad;_0x33476c++){try{return await _0x1e8128['NSaeL'](_0x1525dd);}catch(_0x1f2679){_0x5adcfb=_0x1f2679 instanceof Error?_0x1f2679:new Error(_0x1e8128[_0xf90193(0xe8)](String,_0x1f2679));if(_0x1e8128['fUDYP'](_0x33476c,_0x1980ad)){const _0x6d9c84=_0x27001d*Math[_0xf90193(0xdf)](0x2,_0x33476c);_0xd2328b?.[_0xf90193(0xe2)]&&console['error'](_0xd2328b[_0xf90193(0xe2)]+'\x20failed\x20(attempt\x20'+_0x1e8128['HLNJM'](_0x33476c,0x1)+'/'+(_0x1980ad+0x1)+_0xf90193(0xe9)+_0x6d9c84+'ms...'),await new Promise(_0x1d60c4=>setTimeout(_0x1d60c4,_0x6d9c84));}}}throw _0x5adcfb;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1707be=_0x7be9;(function(_0x204c0b,_0x318896){const _0x48d40e=_0x7be9,_0x3f83aa=_0x204c0b();while(!![]){try{const _0x33a103=parseInt(_0x48d40e(0xba))/0x1*(parseInt(_0x48d40e(0xab))/0x2)+parseInt(_0x48d40e(0xbd))/0x3+parseInt(_0x48d40e(0xbf))/0x4*(parseInt(_0x48d40e(0xc2))/0x5)+-parseInt(_0x48d40e(0xc0))/0x6*(-parseInt(_0x48d40e(0x96))/0x7)+-parseInt(_0x48d40e(0xc6))/0x8*(parseInt(_0x48d40e(0xa3))/0x9)+-parseInt(_0x48d40e(0x97))/0xa*(parseInt(_0x48d40e(0xa5))/0xb)+-parseInt(_0x48d40e(0xa1))/0xc;if(_0x33a103===_0x318896)break;else _0x3f83aa['push'](_0x3f83aa['shift']());}catch(_0x463f98){_0x3f83aa['push'](_0x3f83aa['shift']());}}}(_0x2c27,0x3601c));import*as _0x10f078 from'fs';import*as _0x2d3ef7 from'path';import*as _0x5a8b14 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x2d3ef7['join'](_0x5a8b14[_0x1707be(0xae)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x377b1a=_0x1707be,_0x5c2c17={'dLUHz':'utf-8'};try{if(_0x10f078[_0x377b1a(0xa9)](CACHE_FILE)){const _0x4ccf72=JSON['parse'](_0x10f078[_0x377b1a(0xb2)](CACHE_FILE,_0x5c2c17[_0x377b1a(0x99)]));return{'version':0x3,'sessions':_0x4ccf72[_0x377b1a(0xcc)]||{},'branches':_0x4ccf72[_0x377b1a(0x9c)]||{},'lastEnabledSessionClearedAt':_0x4ccf72[_0x377b1a(0xbe)]};}}catch{}return createEmptyCache();}function saveCache(_0x5a611){const _0x570fd5=_0x1707be;try{const _0x4b4be8=_0x2d3ef7['dirname'](CACHE_FILE);!_0x10f078[_0x570fd5(0xa9)](_0x4b4be8)&&_0x10f078[_0x570fd5(0x9d)](_0x4b4be8,{'recursive':!![]}),_0x10f078[_0x570fd5(0xc3)](CACHE_FILE,JSON[_0x570fd5(0xb5)](_0x5a611,null,0x2));}catch{}}export function getCurrentBranch(){const _0x325cb7=_0x1707be,_0x299d9c={'XsxBO':function(_0x26d79e,_0x46cfa8,_0x344293){return _0x26d79e(_0x46cfa8,_0x344293);},'LOhYj':_0x325cb7(0xb6),'ntTxx':function(_0x3db124,_0x2fa9f2){return _0x3db124===_0x2fa9f2;}};try{const _0xf6d1ea=_0x299d9c['XsxBO'](execSync,_0x325cb7(0xb7),{'encoding':'utf-8','stdio':[_0x325cb7(0xb6),_0x325cb7(0xb6),_0x299d9c[_0x325cb7(0xb1)]]})[_0x325cb7(0xa7)]();if(!_0xf6d1ea||_0x299d9c[_0x325cb7(0xa4)](_0xf6d1ea,'HEAD'))return null;return _0xf6d1ea;}catch{return null;}}export function enableBranch(_0x515661){const _0x568491=_0x1707be,_0x2ae6e3={'YaWyH':function(_0x14f10f){return _0x14f10f();},'pyQlo':function(_0x62d873,_0x55fdb5){return _0x62d873(_0x55fdb5);}},_0x481c87=_0x2ae6e3[_0x568491(0xb8)](loadCache);_0x481c87['branches'][_0x515661]=!![],_0x2ae6e3['pyQlo'](saveCache,_0x481c87);}function _0x7be9(_0x5c1954,_0x46baad){_0x5c1954=_0x5c1954-0x94;const _0x2c27b0=_0x2c27();let _0x7be949=_0x2c27b0[_0x5c1954];return _0x7be949;}export function disableBranch(_0x4eb00e){const _0x12d575=_0x1707be,_0x445801={'DUiXl':function(_0xf09c53,_0x3da266){return _0xf09c53(_0x3da266);}},_0x5682a2=loadCache();delete _0x5682a2['branches'][_0x4eb00e],_0x445801[_0x12d575(0xa0)](saveCache,_0x5682a2);}export function isBranchEnabled(_0x21f4ba){const _0x3787f9={'lCOax':function(_0x58c490){return _0x58c490();}},_0x458bd8=_0x3787f9['lCOax'](loadCache);return _0x458bd8['branches'][_0x21f4ba]===!![];}function getOrCreateSession(_0x321dfe,_0x5dac92){const _0x269d00=_0x1707be;return!_0x321dfe[_0x269d00(0xcc)][_0x5dac92]&&(_0x321dfe[_0x269d00(0xcc)][_0x5dac92]={}),_0x321dfe[_0x269d00(0xcc)][_0x5dac92];}function _0x2c27(){const _0x5bd8fc=['git\x20rev-parse\x20--abbrev-ref\x20HEAD','YaWyH','lastPlanReminderAt','24609GqWMET','JEEOw','mQfrn','1111464ZeaXbj','lastEnabledSessionClearedAt','374672ocrmeU','2382uUaNIw','RIHtI','5MrKeBz','writeFileSync','nyEzh','currentBranch','16qEYtFw','iRGpY','VnYMq','now','Dehua','gEKIx','sessions','PXduR','rKNuA','lvffe','prompted','clear','3787YxKeQX','10TQIgcF','toISOString','dLUHz','CmDnk','enabled','branches','mkdirSync','IlKCe','registeredAt','DUiXl','1587600srPjDF','AtRwK','1767276OoYwFE','ntTxx','1425215uMsOQi','TEszP','trim','gFwsJ','existsSync','UgcEk','16wBDnVj','XguuK','lastStopReminderAt','homedir','beMNf','main','LOhYj','readFileSync','RlfNS','master','stringify','pipe'];_0x2c27=function(){return _0x5bd8fc;};return _0x2c27();}export function enableSession(_0x324286){const _0x406494=_0x1707be,_0x69dc76={'UgcEk':function(_0x534f58,_0x5b08af){return _0x534f58!==_0x5b08af;}},_0x5ce50f=loadCache(),_0x3800a5=getOrCreateSession(_0x5ce50f,_0x324286);_0x3800a5['enabled']=!![];const _0x460726=getCurrentBranch();_0x460726&&_0x460726!=='main'&&_0x69dc76[_0x406494(0xaa)](_0x460726,_0x406494(0xb4))&&(_0x5ce50f['branches'][_0x460726]=!![],_0x3800a5[_0x406494(0xc5)]=_0x460726),saveCache(_0x5ce50f);}export function isSessionEnabled(_0x327e84){const _0x5e530d=_0x1707be,_0x532af2={'mQfrn':function(_0x50d0cd,_0x419f65){return _0x50d0cd===_0x419f65;},'JEEOw':function(_0x320fe4,_0x5436b2){return _0x320fe4===_0x5436b2;},'OILnv':_0x5e530d(0xb4)},_0x109914=loadCache(),_0x12bc5e=getCurrentBranch();if(!_0x12bc5e||_0x532af2[_0x5e530d(0xbc)](_0x12bc5e,_0x5e530d(0xb0))||_0x532af2[_0x5e530d(0xbb)](_0x12bc5e,_0x532af2['OILnv']))return _0x532af2[_0x5e530d(0xbc)](_0x109914['sessions'][_0x327e84]?.['enabled'],!![]);const _0x1317f5=_0x532af2[_0x5e530d(0xbb)](_0x109914['branches'][_0x12bc5e],!![]),_0x70a428=_0x109914['sessions'][_0x327e84]?.['enabled']===!![];return _0x1317f5||_0x70a428;}export function disableSession(_0x1f7dc1){const _0x299c1f=_0x1707be,_0x3b826e={'kaLFg':function(_0x105cd9){return _0x105cd9();}},_0x5ebc62=_0x3b826e['kaLFg'](loadCache),_0x30a71a=getOrCreateSession(_0x5ebc62,_0x1f7dc1);_0x30a71a[_0x299c1f(0x9b)]=![],saveCache(_0x5ebc62);}export function updateBranchTracking(_0x45b8f2){const _0x4d035f=_0x1707be,_0x559302={'QvQOq':function(_0xa7c50f){return _0xa7c50f();},'jgLkg':function(_0x1e056d,_0x5df74d){return _0x1e056d===_0x5df74d;},'zNmVs':'main','RIHtI':'master','AtRwK':function(_0x19f490,_0x1343d2){return _0x19f490!==_0x1343d2;},'KLtcX':function(_0x5ad2a4,_0x322477){return _0x5ad2a4(_0x322477);}},_0x5d714c=loadCache(),_0x212338=_0x5d714c[_0x4d035f(0xcc)][_0x45b8f2];if(!_0x212338?.['enabled'])return;const _0x43da72=_0x559302['QvQOq'](getCurrentBranch);if(!_0x43da72||_0x559302['jgLkg'](_0x43da72,_0x559302['zNmVs'])||_0x43da72===_0x559302[_0x4d035f(0xc1)])return;_0x559302[_0x4d035f(0xa2)](_0x212338['currentBranch'],_0x43da72)&&(_0x5d714c[_0x4d035f(0x9c)][_0x43da72]=!![],_0x212338['currentBranch']=_0x43da72,_0x559302['KLtcX'](saveCache,_0x5d714c));}export function initBranchTracking(_0x5e2da9){const _0x2d845c=_0x1707be,_0x384d09={'Dehua':function(_0x980f13){return _0x980f13();},'LxddD':function(_0x2ce7ea,_0x43e2f4){return _0x2ce7ea===_0x43e2f4;},'IXNFH':'main','ZxBhj':function(_0x47b324,_0x986c3c){return _0x47b324===_0x986c3c;},'mBTbB':'master','DcAKH':function(_0x224126,_0x4335b2){return _0x224126===_0x4335b2;},'gEKIx':function(_0x18073a,_0x2522b2,_0x1cd929){return _0x18073a(_0x2522b2,_0x1cd929);}},_0x1e2482=_0x384d09[_0x2d845c(0xca)](loadCache),_0x51d64f=getCurrentBranch();if(!_0x51d64f||_0x384d09['LxddD'](_0x51d64f,_0x384d09['IXNFH'])||_0x384d09['ZxBhj'](_0x51d64f,_0x384d09['mBTbB']))return;if(_0x384d09['DcAKH'](_0x1e2482['branches'][_0x51d64f],!![])){const _0x462c9b=_0x384d09[_0x2d845c(0xcb)](getOrCreateSession,_0x1e2482,_0x5e2da9);_0x462c9b['enabled']=!![],_0x462c9b[_0x2d845c(0xc5)]=_0x51d64f,saveCache(_0x1e2482);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x4537e1){const _0x4f2160=_0x1707be,_0xc61403={'beMNf':function(_0x4a2793,_0x97368b){return _0x4a2793(_0x97368b);}},_0x1d221b=loadCache(),_0x1a10f7=_0x1d221b['sessions'][_0x4537e1];_0x1a10f7?.['enabled']&&(_0x1d221b['lastEnabledSessionClearedAt']=Date[_0x4f2160(0xc9)](),_0xc61403[_0x4f2160(0xaf)](saveCache,_0x1d221b));}export function shouldAutoEnableAfterClear(_0x3debc4){const _0x4d2497=_0x1707be,_0x3649e4={'VnYMq':function(_0x3ee756){return _0x3ee756();},'nyEzh':function(_0x1608d6,_0x35a131){return _0x1608d6<=_0x35a131;}};if(_0x3debc4!==_0x4d2497(0x95))return![];const _0x48af9b=_0x3649e4[_0x4d2497(0xc8)](loadCache),_0x429c8c=_0x48af9b['lastEnabledSessionClearedAt'];if(!_0x429c8c)return![];const _0x386cd3=Date['now']()-_0x429c8c;return _0x3649e4[_0x4d2497(0xc4)](_0x386cd3,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x421813){const _0x3118f4=_0x1707be,_0x552331={'iRGpY':function(_0x9e10eb,_0x5c8f40,_0x86eda9){return _0x9e10eb(_0x5c8f40,_0x86eda9);},'lvffe':function(_0x19fd54,_0x2d0ec5){return _0x19fd54!==_0x2d0ec5;},'tuhGR':_0x3118f4(0xb0),'RlfNS':'master','INdhJ':function(_0x4fee50,_0x37e045){return _0x4fee50(_0x37e045);}},_0x15502e=loadCache(),_0x5154f0=_0x552331[_0x3118f4(0xc7)](getOrCreateSession,_0x15502e,_0x421813);_0x5154f0[_0x3118f4(0x9b)]=!![];const _0x5e5bb0=getCurrentBranch();_0x5e5bb0&&_0x552331[_0x3118f4(0xcf)](_0x5e5bb0,_0x552331['tuhGR'])&&_0x5e5bb0!==_0x552331[_0x3118f4(0xb3)]&&(_0x5154f0[_0x3118f4(0xc5)]=_0x5e5bb0),delete _0x15502e[_0x3118f4(0xbe)],_0x552331['INdhJ'](saveCache,_0x15502e);}export function registerSession(_0x410254,_0x1e7df3){const _0x4a3284=_0x1707be,_0xdcb1c6={'VKeNy':function(_0x146c3c,_0x2834e0,_0x270cdc){return _0x146c3c(_0x2834e0,_0x270cdc);},'TEszP':function(_0x25860c,_0x18b12b){return _0x25860c(_0x18b12b);}},_0xc8ae5=loadCache(),_0x13ccaa=_0xdcb1c6['VKeNy'](getOrCreateSession,_0xc8ae5,_0x410254);_0x13ccaa['featureId']=_0x1e7df3,_0x13ccaa['registeredAt']=new Date()[_0x4a3284(0x98)](),_0xdcb1c6[_0x4a3284(0xa6)](saveCache,_0xc8ae5);}export function getSessionEntry(_0xe9cbc3){const _0x230fc3=_0x1707be,_0x433682=loadCache(),_0x31a52e=_0x433682[_0x230fc3(0xcc)][_0xe9cbc3];if(_0x31a52e?.['featureId']&&_0x31a52e?.[_0x230fc3(0x9f)])return{'featureId':_0x31a52e['featureId'],'registeredAt':_0x31a52e['registeredAt']};return null;}export function unregisterSession(_0x211336){const _0x139586=_0x1707be,_0x2eead2={'gFwsJ':function(_0x460f5b){return _0x460f5b();},'CmDnk':function(_0x1800dd,_0x36e10d){return _0x1800dd(_0x36e10d);}},_0x2e5272=_0x2eead2[_0x139586(0xa8)](loadCache),_0x1bc6fe=_0x2e5272['sessions'][_0x211336];_0x1bc6fe&&(delete _0x1bc6fe['featureId'],delete _0x1bc6fe['registeredAt'],_0x2eead2[_0x139586(0x9a)](saveCache,_0x2e5272));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x2b8eec){const _0x5002be=_0x1707be,_0x1a358e={'pPyPD':function(_0x49185d,_0x32cb20,_0x2de5c9){return _0x49185d(_0x32cb20,_0x2de5c9);},'UhgZk':function(_0x208d56,_0x221e80){return _0x208d56>=_0x221e80;}},_0x4ba089=loadCache(),_0x12c737=_0x1a358e['pPyPD'](getOrCreateSession,_0x4ba089,_0x2b8eec),_0x33f3cd=_0x12c737[_0x5002be(0xb9)]||0x0,_0x1aad0b=Date[_0x5002be(0xc9)]();if(_0x1a358e['UhgZk'](_0x1aad0b-_0x33f3cd,PLAN_REMINDER_INTERVAL_MS))return _0x12c737[_0x5002be(0xb9)]=_0x1aad0b,saveCache(_0x4ba089),!![];return![];}export function shouldShowStopReminder(_0x1b844d){const _0x5b8903=_0x1707be,_0x3874a7={'txHrJ':function(_0x12501c){return _0x12501c();},'rtDoJ':function(_0x39f497,_0x3ec295){return _0x39f497>=_0x3ec295;},'PXduR':function(_0x26ffe2,_0x5b3353){return _0x26ffe2(_0x5b3353);}},_0x1eb8ff=_0x3874a7['txHrJ'](loadCache),_0x35a048=getOrCreateSession(_0x1eb8ff,_0x1b844d),_0x2a35b6=_0x35a048[_0x5b8903(0xad)]||0x0,_0x2d94ee=Date[_0x5b8903(0xc9)]();if(_0x3874a7['rtDoJ'](_0x2d94ee-_0x2a35b6,STOP_REMINDER_INTERVAL_MS))return _0x35a048[_0x5b8903(0xad)]=_0x2d94ee,_0x3874a7[_0x5b8903(0xcd)](saveCache,_0x1eb8ff),!![];return![];}export function hasSessionBeenPrompted(_0x583be2){const _0x48edb7=_0x1707be,_0x54ef7f={'rKNuA':function(_0x37599a,_0x4bb172){return _0x37599a===_0x4bb172;}},_0x4b24fd=loadCache();return _0x54ef7f[_0x48edb7(0xce)](_0x4b24fd['sessions'][_0x583be2]?.[_0x48edb7(0x94)],!![]);}export function markSessionPrompted(_0x25e123){const _0x3e6f8b=_0x1707be,_0x1668c7={'XguuK':function(_0x18dcf0,_0x45aec7,_0x203590){return _0x18dcf0(_0x45aec7,_0x203590);},'IlKCe':function(_0x107d12,_0x2133fb){return _0x107d12(_0x2133fb);}},_0x337ca2=loadCache(),_0x3cf83d=_0x1668c7[_0x3e6f8b(0xac)](getOrCreateSession,_0x337ca2,_0x25e123);_0x3cf83d['prompted']=!![],_0x1668c7[_0x3e6f8b(0x9e)](saveCache,_0x337ca2);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x4841bd=_0x1f55;(function(_0x10948e,_0xd652a4){const _0x1ee298=_0x1f55,_0x1dba3c=_0x10948e();while(!![]){try{const _0x37a61b=-parseInt(_0x1ee298(0xef))/0x1*(parseInt(_0x1ee298(0xd4))/0x2)+-parseInt(_0x1ee298(0xf5))/0x3+parseInt(_0x1ee298(0xf4))/0x4*(-parseInt(_0x1ee298(0xf1))/0x5)+-parseInt(_0x1ee298(0xe9))/0x6*(-parseInt(_0x1ee298(0xf6))/0x7)+-parseInt(_0x1ee298(0xd9))/0x8+parseInt(_0x1ee298(0xe0))/0x9*(-parseInt(_0x1ee298(0xd1))/0xa)+-parseInt(_0x1ee298(0xcc))/0xb*(-parseInt(_0x1ee298(0xe3))/0xc);if(_0x37a61b===_0xd652a4)break;else _0x1dba3c['push'](_0x1dba3c['shift']());}catch(_0x4dffee){_0x1dba3c['push'](_0x1dba3c['shift']());}}}(_0x261b,0x7ab45));import*as _0x49ca79 from'fs';import*as _0x5eb65e from'path';function _0x1f55(_0x1d83bf,_0x5ce56){_0x1d83bf=_0x1d83bf-0xbf;const _0x261b6a=_0x261b();let _0x1f5590=_0x261b6a[_0x1d83bf];return _0x1f5590;}import*as _0x1fc079 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x5eb65e[_0x4841bd(0xdf)](_0x1fc079['homedir'](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x15b0e2=_0x4841bd,_0x510d41={'yZBbZ':_0x15b0e2(0xe7),'rkmTw':function(_0x612385){return _0x612385();}};try{if(_0x49ca79[_0x15b0e2(0xea)](CACHE_FILE)){const _0x15d7bb=JSON[_0x15b0e2(0xe6)](_0x49ca79[_0x15b0e2(0xc3)](CACHE_FILE,_0x510d41['yZBbZ']));return{'version':0x3,'sessions':_0x15d7bb['sessions']||{},'branches':_0x15d7bb['branches']||{},'lastEnabledSessionClearedAt':_0x15d7bb[_0x15b0e2(0xdd)]};}}catch{}return _0x510d41[_0x15b0e2(0xbf)](createEmptyCache);}function saveCache(_0x117310){const _0x41c292=_0x4841bd;try{const _0x4c48d3=_0x5eb65e['dirname'](CACHE_FILE);!_0x49ca79['existsSync'](_0x4c48d3)&&_0x49ca79[_0x41c292(0xd8)](_0x4c48d3,{'recursive':!![]}),_0x49ca79[_0x41c292(0xd6)](CACHE_FILE,JSON['stringify'](_0x117310,null,0x2));}catch{}}export function getCurrentBranch(){const _0x5ac976=_0x4841bd,_0x32ee12={'WQLJt':_0x5ac976(0xdb),'eIHKf':'pipe','zzFJU':function(_0x1224cd,_0x2ba455){return _0x1224cd===_0x2ba455;},'AvAsM':_0x5ac976(0xd3)};try{const _0x1313b9=execSync(_0x32ee12[_0x5ac976(0xeb)],{'encoding':'utf-8','stdio':[_0x32ee12[_0x5ac976(0xde)],_0x32ee12[_0x5ac976(0xde)],_0x5ac976(0xce)]})[_0x5ac976(0xc5)]();if(!_0x1313b9||_0x32ee12['zzFJU'](_0x1313b9,_0x32ee12['AvAsM']))return null;return _0x1313b9;}catch{return null;}}export function enableBranch(_0x400a6d){const _0x193a4a=_0x4841bd,_0x1fb944={'JkfGN':function(_0x5687cc,_0x384428){return _0x5687cc(_0x384428);}},_0x3d94e6=loadCache();_0x3d94e6['branches'][_0x400a6d]=!![],_0x1fb944[_0x193a4a(0xd0)](saveCache,_0x3d94e6);}export function disableBranch(_0x342ecc){const _0x12f452=loadCache();delete _0x12f452['branches'][_0x342ecc],saveCache(_0x12f452);}export function isBranchEnabled(_0x2f35c4){const _0x4efb74={'NoMhg':function(_0x1f2120){return _0x1f2120();},'vFkyw':function(_0x4bc1ed,_0x4c8e16){return _0x4bc1ed===_0x4c8e16;}},_0x179cf0=_0x4efb74['NoMhg'](loadCache);return _0x4efb74['vFkyw'](_0x179cf0['branches'][_0x2f35c4],!![]);}function getOrCreateSession(_0x22ff48,_0x533858){return!_0x22ff48['sessions'][_0x533858]&&(_0x22ff48['sessions'][_0x533858]={}),_0x22ff48['sessions'][_0x533858];}export function enableSession(_0x938a51){const _0x12ff30=_0x4841bd,_0x46dba2={'ORYuj':function(_0x1d6723,_0x40f5f8){return _0x1d6723!==_0x40f5f8;}},_0x85fb50=loadCache(),_0x4d6401=getOrCreateSession(_0x85fb50,_0x938a51);_0x4d6401[_0x12ff30(0xc2)]=!![];const _0x258d21=getCurrentBranch();_0x258d21&&_0x46dba2['ORYuj'](_0x258d21,'main')&&_0x258d21!==_0x12ff30(0xcb)&&(_0x85fb50[_0x12ff30(0xed)][_0x258d21]=!![],_0x4d6401[_0x12ff30(0xc1)]=_0x258d21),saveCache(_0x85fb50);}export function isSessionEnabled(_0x578364){const _0x348432=_0x4841bd,_0x148889={'kaiHC':function(_0x36a5f4){return _0x36a5f4();},'ZXeyc':function(_0x3646ba,_0x51ab9d){return _0x3646ba===_0x51ab9d;},'SaMcK':_0x348432(0xf0)},_0x1c4115=_0x148889[_0x348432(0xca)](loadCache),_0x175a0a=getCurrentBranch();if(!_0x175a0a||_0x148889[_0x348432(0xc0)](_0x175a0a,_0x148889['SaMcK'])||_0x175a0a==='master')return _0x1c4115[_0x348432(0xda)][_0x578364]?.['enabled']===!![];const _0x40a319=_0x1c4115['branches'][_0x175a0a]===!![],_0x4c89b6=_0x1c4115[_0x348432(0xda)][_0x578364]?.['enabled']===!![];return _0x40a319||_0x4c89b6;}export function disableSession(_0x10be2c){const _0x3907a0=_0x4841bd,_0x3818a9={'rJHNd':function(_0x55e17a,_0x4bc66a,_0xe9b530){return _0x55e17a(_0x4bc66a,_0xe9b530);},'bcvLK':function(_0x5bf7e8,_0x1b220a){return _0x5bf7e8(_0x1b220a);}},_0x46bcc7=loadCache(),_0x335ff2=_0x3818a9[_0x3907a0(0xcd)](getOrCreateSession,_0x46bcc7,_0x10be2c);_0x335ff2['enabled']=![],_0x3818a9['bcvLK'](saveCache,_0x46bcc7);}export function updateBranchTracking(_0x3f95ec){const _0x3857f5=_0x4841bd,_0x5db091={'VNadH':function(_0x592962){return _0x592962();},'yqMuu':function(_0x44d190){return _0x44d190();},'fKltZ':function(_0x21c4e4,_0x5d8991){return _0x21c4e4===_0x5d8991;},'YdPnL':function(_0x48c9e1,_0x50bfad){return _0x48c9e1(_0x50bfad);}},_0xc77bd2=_0x5db091['VNadH'](loadCache),_0x249a0e=_0xc77bd2['sessions'][_0x3f95ec];if(!_0x249a0e?.[_0x3857f5(0xc2)])return;const _0x39d8e9=_0x5db091[_0x3857f5(0xd2)](getCurrentBranch);if(!_0x39d8e9||_0x5db091[_0x3857f5(0xe1)](_0x39d8e9,_0x3857f5(0xf0))||_0x39d8e9==='master')return;_0x249a0e['currentBranch']!==_0x39d8e9&&(_0xc77bd2['branches'][_0x39d8e9]=!![],_0x249a0e[_0x3857f5(0xc1)]=_0x39d8e9,_0x5db091[_0x3857f5(0xf2)](saveCache,_0xc77bd2));}export function initBranchTracking(_0x3f7544){const _0x382cbc=_0x4841bd,_0x5343af={'FGTBh':function(_0x1ae6bf){return _0x1ae6bf();},'DjBAk':function(_0xfef20c,_0x167cb4){return _0xfef20c===_0x167cb4;},'MTyvz':_0x382cbc(0xf0),'GPVyc':function(_0x23d65b,_0xeaf372,_0xd19105){return _0x23d65b(_0xeaf372,_0xd19105);},'fHAzw':function(_0x7b84d6,_0x3e55fe){return _0x7b84d6(_0x3e55fe);}},_0x5dc29e=_0x5343af['FGTBh'](loadCache),_0x21a7a5=_0x5343af['FGTBh'](getCurrentBranch);if(!_0x21a7a5||_0x5343af[_0x382cbc(0xe4)](_0x21a7a5,_0x5343af['MTyvz'])||_0x5343af[_0x382cbc(0xe4)](_0x21a7a5,'master'))return;if(_0x5dc29e['branches'][_0x21a7a5]===!![]){const _0x99a497=_0x5343af[_0x382cbc(0xee)](getOrCreateSession,_0x5dc29e,_0x3f7544);_0x99a497[_0x382cbc(0xc2)]=!![],_0x99a497['currentBranch']=_0x21a7a5,_0x5343af[_0x382cbc(0xc6)](saveCache,_0x5dc29e);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x3e6496){const _0x4bd592=_0x4841bd,_0x1761b4=loadCache(),_0x16daad=_0x1761b4['sessions'][_0x3e6496];_0x16daad?.['enabled']&&(_0x1761b4['lastEnabledSessionClearedAt']=Date[_0x4bd592(0xc4)](),saveCache(_0x1761b4));}export function shouldAutoEnableAfterClear(_0x40a064){const _0x2fb464=_0x4841bd,_0x36acfd={'FKsvL':'clear','xfigr':function(_0x16b7ad){return _0x16b7ad();}};if(_0x40a064!==_0x36acfd[_0x2fb464(0xe8)])return![];const _0x45c2c0=_0x36acfd[_0x2fb464(0xe2)](loadCache),_0x36918f=_0x45c2c0[_0x2fb464(0xdd)];if(!_0x36918f)return![];const _0x1e3166=Date[_0x2fb464(0xc4)]()-_0x36918f;return _0x1e3166<=CLEAR_AUTO_ENABLE_WINDOW_MS;}function _0x261b(){const _0x2cdf78=['7rBtNRW','rkmTw','ZXeyc','currentBranch','enabled','readFileSync','now','trim','fHAzw','arWja','ayXKS','prompted','kaiHC','master','165kWIXQt','rJHNd','pipe','DNStU','JkfGN','5130mipsQk','yqMuu','HEAD','6LdQvdP','RahMG','writeFileSync','featureId','mkdirSync','107312JVRYNX','sessions','git\x20rev-parse\x20--abbrev-ref\x20HEAD','registeredAt','lastEnabledSessionClearedAt','eIHKf','join','5022tJYlLq','fKltZ','xfigr','1336932wVCMuH','DjBAk','hveQx','parse','utf-8','FKsvL','3931428oFTLTu','existsSync','WQLJt','zucvz','branches','GPVyc','137577RafJtx','main','327185eeEtvi','YdPnL','zDVqP','28TflEoX','1960044todXOw'];_0x261b=function(){return _0x2cdf78;};return _0x261b();}export function autoEnableAfterClear(_0x1c3830){const _0x526429=_0x4841bd,_0x11a410={'UAOnJ':function(_0x4fb418){return _0x4fb418();},'zucvz':function(_0x390ae5,_0x62b979){return _0x390ae5!==_0x62b979;},'vmria':'master'},_0x418e6a=loadCache(),_0xe8cbe4=getOrCreateSession(_0x418e6a,_0x1c3830);_0xe8cbe4['enabled']=!![];const _0x26afe6=_0x11a410['UAOnJ'](getCurrentBranch);_0x26afe6&&_0x11a410[_0x526429(0xec)](_0x26afe6,_0x526429(0xf0))&&_0x26afe6!==_0x11a410['vmria']&&(_0xe8cbe4[_0x526429(0xc1)]=_0x26afe6),delete _0x418e6a[_0x526429(0xdd)],saveCache(_0x418e6a);}export function registerSession(_0x482d86,_0x1eaa27){const _0x4b01cd=_0x4841bd,_0x1d8abf={'ayXKS':function(_0x89c4ef){return _0x89c4ef();},'CoErM':function(_0x350cb3,_0x520a31){return _0x350cb3(_0x520a31);}},_0x577338=_0x1d8abf[_0x4b01cd(0xc8)](loadCache),_0x3965f5=getOrCreateSession(_0x577338,_0x482d86);_0x3965f5[_0x4b01cd(0xd7)]=_0x1eaa27,_0x3965f5['registeredAt']=new Date()['toISOString'](),_0x1d8abf['CoErM'](saveCache,_0x577338);}export function getSessionEntry(_0x1c1537){const _0x1d6717=_0x4841bd,_0x31d939=loadCache(),_0x427733=_0x31d939[_0x1d6717(0xda)][_0x1c1537];if(_0x427733?.['featureId']&&_0x427733?.[_0x1d6717(0xdc)])return{'featureId':_0x427733['featureId'],'registeredAt':_0x427733['registeredAt']};return null;}export function unregisterSession(_0x3e9e46){const _0x156375=_0x4841bd,_0x29f3a2=loadCache(),_0x274892=_0x29f3a2[_0x156375(0xda)][_0x3e9e46];_0x274892&&(delete _0x274892[_0x156375(0xd7)],delete _0x274892['registeredAt'],saveCache(_0x29f3a2));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x3c479f){const _0x21cdec=_0x4841bd,_0x862f0e={'zDVqP':function(_0x5c8b29){return _0x5c8b29();},'RahMG':function(_0x47f7f8,_0x334182){return _0x47f7f8(_0x334182);}},_0x38cefe=_0x862f0e[_0x21cdec(0xf3)](loadCache),_0x364a5b=getOrCreateSession(_0x38cefe,_0x3c479f),_0xe42d07=_0x364a5b['lastPlanReminderAt']||0x0,_0x275d6=Date[_0x21cdec(0xc4)]();if(_0x275d6-_0xe42d07>=PLAN_REMINDER_INTERVAL_MS)return _0x364a5b['lastPlanReminderAt']=_0x275d6,_0x862f0e[_0x21cdec(0xd5)](saveCache,_0x38cefe),!![];return![];}export function shouldShowStopReminder(_0x5414cb){const _0x45a664=_0x4841bd,_0x395833={'arWja':function(_0x398107,_0x1eae8d){return _0x398107-_0x1eae8d;},'cwVAh':function(_0x51caa1,_0x362bde){return _0x51caa1(_0x362bde);}},_0x5ecf41=loadCache(),_0x319978=getOrCreateSession(_0x5ecf41,_0x5414cb),_0xa63a81=_0x319978['lastStopReminderAt']||0x0,_0x3391e4=Date['now']();if(_0x395833[_0x45a664(0xc7)](_0x3391e4,_0xa63a81)>=STOP_REMINDER_INTERVAL_MS)return _0x319978['lastStopReminderAt']=_0x3391e4,_0x395833['cwVAh'](saveCache,_0x5ecf41),!![];return![];}export function hasSessionBeenPrompted(_0x50857a){const _0x32a2ff=_0x4841bd,_0x414d45={'hveQx':function(_0x1c98d9){return _0x1c98d9();}},_0xffcedd=_0x414d45[_0x32a2ff(0xe5)](loadCache);return _0xffcedd['sessions'][_0x50857a]?.[_0x32a2ff(0xc9)]===!![];}export function markSessionPrompted(_0x9e4865){const _0x1ab042=_0x4841bd,_0x42506b={'DNStU':function(_0x4b2d73,_0x37aebe){return _0x4b2d73(_0x37aebe);}},_0x3fa3bc=loadCache(),_0x2e0e48=getOrCreateSession(_0x3fa3bc,_0x9e4865);_0x2e0e48['prompted']=!![],_0x42506b[_0x1ab042(0xcf)](saveCache,_0x3fa3bc);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xf34d34=_0x46d7;(function(_0x3430f1,_0x1073e5){const _0x15d959=_0x46d7,_0x33b022=_0x3430f1();while(!![]){try{const _0x58ca6b=parseInt(_0x15d959(0x188))/0x1*(-parseInt(_0x15d959(0x198))/0x2)+parseInt(_0x15d959(0x190))/0x3*(parseInt(_0x15d959(0x166))/0x4)+-parseInt(_0x15d959(0x1bb))/0x5+parseInt(_0x15d959(0x180))/0x6+parseInt(_0x15d959(0x1af))/0x7*(-parseInt(_0x15d959(0x164))/0x8)+parseInt(_0x15d959(0x1be))/0x9*(parseInt(_0x15d959(0x17d))/0xa)+parseInt(_0x15d959(0x1b0))/0xb*(parseInt(_0x15d959(0x1a5))/0xc);if(_0x58ca6b===_0x1073e5)break;else _0x33b022['push'](_0x33b022['shift']());}catch(_0x372f7b){_0x33b022['push'](_0x33b022['shift']());}}}(_0x3529,0x5b4a0));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';function _0x46d7(_0x2542d2,_0xd075b){_0x2542d2=_0x2542d2-0x150;const _0x3529d3=_0x3529();let _0x46d7f2=_0x3529d3[_0x2542d2];return _0x46d7f2;}import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x1c8736,_0x34867a){const _0x7d4c44=_0x46d7,_0x36d3ba={'UAAKn':function(_0x49699b,_0x49d2c4,_0x37285e,_0x511879){return _0x49699b(_0x49d2c4,_0x37285e,_0x511879);},'xwklg':_0x7d4c44(0x172),'lnJel':function(_0x2d0ddc,_0x499d35){return _0x2d0ddc(_0x499d35);},'vflkR':function(_0x1e101d,_0x3e6019){return _0x1e101d!==_0x3e6019;}},_0x2289b3=_0x36d3ba['UAAKn'](join,_0x34867a,'ci',_0x1c8736),_0x3ade84=_0x36d3ba['UAAKn'](join,_0x34867a,_0x36d3ba[_0x7d4c44(0x16f)],_0x1c8736),_0x497524=join(_0x34867a,_0x1c8736),_0x2fbf23=join(_0x34867a,_0x36d3ba[_0x7d4c44(0x16f)]),_0x2afe1c=join(_0x34867a,'ci');if(_0x36d3ba[_0x7d4c44(0x1c3)](existsSync,_0x2289b3))return _0x2289b3;if(existsSync(_0x3ade84))return _0x3ade84;if(existsSync(_0x497524)&&(_0x36d3ba[_0x7d4c44(0x1ba)](_0x497524,_0x2fbf23)&&_0x497524!==_0x2afe1c?!![]:hasLegacyProfileFiles(_0x497524)))return _0x497524;return null;}export function getEnvDir(_0x341337,_0x35546c={}){const _0x3b14be=_0x46d7,_0x455e77={'xjYgU':function(_0x33cfe5,_0x303fe0,_0x5d87bf){return _0x33cfe5(_0x303fe0,_0x5d87bf);},'Ztzhb':function(_0x597c67,_0x57b23c,_0x4bd9a2){return _0x597c67(_0x57b23c,_0x4bd9a2);},'xZCup':function(_0x55a4cd,_0x40e388,_0x26fc6a,_0x28ce1a){return _0x55a4cd(_0x40e388,_0x26fc6a,_0x28ce1a);},'dpXnE':function(_0x32131,_0x2d1727,_0x389b93){return _0x32131(_0x2d1727,_0x389b93);}},_0x26dd02=getRangerDir(),_0xe1c09c=findEnvInRoot(_0x341337,_0x26dd02);if(_0xe1c09c){if(_0x35546c['forWrite']&&isLegacyEnvPath(_0xe1c09c))throw _0x455e77['xjYgU'](legacyWriteError,_0x341337,_0xe1c09c);return _0xe1c09c;}const _0x1f23c0=getRangerHomeDir();if(_0x1f23c0!==_0x26dd02){const _0xfbd3fd=_0x455e77[_0x3b14be(0x17b)](findEnvInRoot,_0x341337,_0x1f23c0);if(_0xfbd3fd){if(_0x35546c[_0x3b14be(0x15a)]&&isLegacyEnvPath(_0xfbd3fd))throw legacyWriteError(_0x341337,_0xfbd3fd);return _0xfbd3fd;}}const _0x13777a=_0x455e77[_0x3b14be(0x197)](join,_0x1f23c0,'local',_0x341337);if(_0x35546c[_0x3b14be(0x15a)])throw _0x455e77[_0x3b14be(0x1b7)](legacyWriteError,_0x341337,_0x13777a);return _0x13777a;}function isLegacyEnvPath(_0x3e1c36){const _0x5615af=_0x46d7,_0xd1b5b0={'gNgzc':function(_0x15c862){return _0x15c862();},'hYDqq':function(_0x2f2819){return _0x2f2819();},'yaocm':function(_0x17cdbd,_0x1fec78){return _0x17cdbd+_0x1fec78;},'oOoll':function(_0x52c164,_0x5ed8e8){return _0x52c164===_0x5ed8e8;}},_0x227b9b=_0xd1b5b0['gNgzc'](getRangerDir),_0x2b0218=_0xd1b5b0[_0x5615af(0x1b4)](getRangerHomeDir);for(const _0x299fb4 of new Set([_0x227b9b,_0x2b0218])){const _0x346b28=_0x299fb4[_0x5615af(0x193)]('/')?_0x299fb4:_0xd1b5b0[_0x5615af(0x173)](_0x299fb4,'/');if(_0xd1b5b0['oOoll'](_0x3e1c36,_0x299fb4)||_0x3e1c36['startsWith'](_0x346b28))return!![];}return![];}function legacyWriteError(_0x5235af,_0x26f6cd){const _0x3acdea=_0x46d7,_0x23058d={'mrRWk':function(_0x55c3a5,_0x24c22e){return _0x55c3a5+_0x24c22e;}};return new Error(_0x23058d['mrRWk'](_0x23058d[_0x3acdea(0x19d)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x5235af+'\x22\x20to\x20legacy\x20path\x20'+_0x26f6cd+'.\x0a'+_0x3acdea(0x1c9),_0x3acdea(0x163)),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x2cb62d,_0x45e7eb){const _0x40c659=_0x46d7,_0x4ad79b={'KXUQI':function(_0x7181f3){return _0x7181f3();},'rCqXC':function(_0x5bd360,_0x1825d1,_0x42d601){return _0x5bd360(_0x1825d1,_0x42d601);},'VIlcg':function(_0x39515,_0x4da1d1,_0x13e7e4,_0x32e7f2){return _0x39515(_0x4da1d1,_0x13e7e4,_0x32e7f2);},'Kqezo':'local','TrMwk':function(_0x426a04,_0x449754){return _0x426a04(_0x449754);},'fgitw':function(_0x3821d7,_0x420e9b){return _0x3821d7===_0x420e9b;},'cWExp':function(_0x4ba8fb,_0x2bdef8){return _0x4ba8fb===_0x2bdef8;}},_0x514b90=_0x45e7eb?.[_0x40c659(0x15b)],_0x1be42d=_0x514b90?[_0x514b90]:[getRangerDir(),_0x4ad79b['KXUQI'](getRangerHomeDir)]['filter']((_0x7e7af4,_0x4d7d0f,_0xdce395)=>_0xdce395['indexOf'](_0x7e7af4)===_0x4d7d0f),_0x3572d1=_0x45e7eb?.[_0x40c659(0x1d1)]??['ci','local',_0x40c659(0x1a7)];for(const _0x3f4dad of _0x1be42d){const _0x121693=join(_0x3f4dad,_0x40c659(0x172)),_0x40d71c=_0x4ad79b['rCqXC'](join,_0x3f4dad,'ci'),_0x43cfe8=[{'location':'ci','path':join(_0x3f4dad,'ci',_0x2cb62d)},{'location':_0x40c659(0x172),'path':_0x4ad79b['VIlcg'](join,_0x3f4dad,_0x4ad79b[_0x40c659(0x167)],_0x2cb62d)},{'location':'legacy','path':_0x4ad79b[_0x40c659(0x1b2)](join,_0x3f4dad,_0x2cb62d)}];for(const _0x34505c of _0x43cfe8){if(_0x3572d1[_0x40c659(0x1c2)](_0x34505c[_0x40c659(0x17c)])&&_0x4ad79b[_0x40c659(0x1a6)](existsSync,_0x34505c['path'])){if(_0x4ad79b['fgitw'](_0x34505c[_0x40c659(0x17c)],'legacy')&&(_0x34505c['path']===_0x121693||_0x4ad79b['cWExp'](_0x34505c['path'],_0x40d71c))&&!hasLegacyProfileFiles(_0x34505c[_0x40c659(0x15d)]))continue;return{'path':_0x34505c['path'],'location':_0x34505c[_0x40c659(0x17c)]};}}}return null;}function hasLegacyProfileFiles(_0x5a9cd0){const _0x9c51f9=_0x46d7,_0xaf79ee={'oiRFD':function(_0x3f09e1,_0x1f98da,_0x174f12){return _0x3f09e1(_0x1f98da,_0x174f12);},'RgWFp':'settings.json','UAHsE':function(_0x4c8c05,_0x529f60){return _0x4c8c05(_0x529f60);}};return existsSync(_0xaf79ee[_0x9c51f9(0x15f)](join,_0x5a9cd0,_0xaf79ee[_0x9c51f9(0x183)]))||_0xaf79ee['UAHsE'](existsSync,join(_0x5a9cd0,_0x9c51f9(0x18f)))||_0xaf79ee[_0x9c51f9(0x153)](existsSync,join(_0x5a9cd0,'auth.json.enc'));}export function isEnvCi(_0x213d31){const _0x4eca87=_0x46d7,_0x32dfac={'RRIfv':function(_0x417d83,_0x12c43f){return _0x417d83(_0x12c43f);},'Dguds':function(_0x58717a,_0x4c93c8){return _0x58717a!==_0x4c93c8;},'pYlyr':function(_0x49c706){return _0x49c706();},'TBByS':function(_0x97623d,_0x507af6,_0x34644e,_0x5c0c13){return _0x97623d(_0x507af6,_0x34644e,_0x5c0c13);}};if(_0x32dfac['RRIfv'](existsSync,join(getRangerDir(),'ci',_0x213d31)))return!![];const _0x498f04=getRangerHomeDir();if(_0x32dfac['Dguds'](_0x498f04,_0x32dfac['pYlyr'](getRangerDir))&&_0x32dfac[_0x4eca87(0x15e)](existsSync,_0x32dfac['TBByS'](join,_0x498f04,'ci',_0x213d31)))return!![];return![];}export async function cleanupTempFiles(_0x1dcbd2){const _0x34c1fd={'ObBts':'ENOENT'},_0xbd870=[_0x1dcbd2['tempAuthPath'],_0x1dcbd2['configPath']]['filter'](Boolean);await Promise['all'](_0xbd870['map'](_0x2904a0=>unlink(_0x2904a0)['catch'](_0x3c1840=>{const _0x69e21f=_0x46d7;_0x3c1840['code']!==_0x34c1fd['ObBts']&&console['warn'](_0x69e21f(0x1a8)+_0x2904a0+':',_0x3c1840['message']);})));}export function getSettingsPath(_0x1cc439){const _0x50d842=_0x46d7,_0x4622ec={'bUArb':function(_0x5dc92a,_0x4b8c1c,_0x519cf0){return _0x5dc92a(_0x4b8c1c,_0x519cf0);}};return _0x4622ec[_0x50d842(0x1cb)](join,getEnvDir(_0x1cc439),_0x50d842(0x1ac));}export async function loadSettings(_0xe3e8b7){const _0x404e63=_0x46d7,_0x3dea9f={'yAzmW':function(_0x26751e,_0x14e4f6){return _0x26751e(_0x14e4f6);},'hyXFp':_0x404e63(0x16c)},_0x46bc96=_0x3dea9f['yAzmW'](getSettingsPath,_0xe3e8b7);if(!_0x3dea9f['yAzmW'](existsSync,_0x46bc96))return{};try{const _0x3f86a8=await readFile(_0x46bc96,_0x3dea9f['hyXFp']);return JSON[_0x404e63(0x156)](_0x3f86a8);}catch{return{};}}export async function saveSettings(_0x37c486,_0x1dd853){const _0x43168d=_0x46d7,_0x11d938={'BKUuq':function(_0x2f16c9,_0x58bca5){return _0x2f16c9(_0x58bca5);},'tNeBp':function(_0xecb708,_0x434374,_0x1f95f2){return _0xecb708(_0x434374,_0x1f95f2);},'FscLM':function(_0x3a009f,_0x5ad76b,_0x62d47f){return _0x3a009f(_0x5ad76b,_0x62d47f);}},_0x2fa04d=_0x11d938['BKUuq'](getSettingsPath,_0x37c486),_0x1075af=dirname(_0x2fa04d);!existsSync(_0x1075af)&&await _0x11d938[_0x43168d(0x1c5)](mkdir,_0x1075af,{'recursive':!![]}),await _0x11d938[_0x43168d(0x1a4)](writeFile,_0x2fa04d,JSON['stringify'](_0x1dd853,null,0x2));}export function resolveEnvVars(_0xbc834){const _0x2773f8=_0x46d7,_0x342bd0={'IQBAM':'string','zHgXC':function(_0x23435d,_0x54da33){return _0x23435d===_0x54da33;},'eXVxO':'object'};if(typeof _0xbc834===_0x342bd0[_0x2773f8(0x176)])return _0xbc834[_0x2773f8(0x179)](/\$\{(\w+)\}/g,(_0x111c49,_0x34800d)=>{const _0x269e20=_0x2773f8,_0x6ed03f=process['env'][_0x34800d];if(_0x6ed03f===undefined)throw new Error(_0x269e20(0x1a0)+_0x34800d+_0x269e20(0x1ad));return _0x6ed03f;});if(Array[_0x2773f8(0x194)](_0xbc834))return _0xbc834['map'](resolveEnvVars);if(_0xbc834&&_0x342bd0['zHgXC'](typeof _0xbc834,_0x342bd0[_0x2773f8(0x1b6)]))return Object[_0x2773f8(0x16b)](Object['entries'](_0xbc834)['map'](([_0x5c320c,_0x3f792a])=>[_0x5c320c,resolveEnvVars(_0x3f792a)]));return _0xbc834;}const isRecord=_0x101af5=>typeof _0x101af5==='object'&&_0x101af5!==null&&!Array['isArray'](_0x101af5),asRecord=_0x509360=>isRecord(_0x509360)?_0x509360:undefined,mergeHeaders=(_0x4c8e59,_0x385cac)=>{const _0x3c43ee=_0x46d7,_0x5ab69e={'FXOwz':function(_0x46e805,_0xe6d12e){return _0x46e805??_0xe6d12e;},'CNFIb':function(_0x55c29a,_0x2ace47){return _0x55c29a??_0x2ace47;}},_0x18bc2d={..._0x5ab69e[_0x3c43ee(0x157)](_0x4c8e59,{}),..._0x5ab69e['CNFIb'](_0x385cac,{})};return Object[_0x3c43ee(0x1c4)](_0x18bc2d)['length']?_0x18bc2d:undefined;},SAFE_MODE_ARGS=[_0xf34d34(0x1b5)],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0xf34d34(0x186),_0xf34d34(0x19b),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x3fecc4,_0x31d375={}){const _0x5bee1a=_0xf34d34,_0xe278fc={'ZZgJm':function(_0x1da93c,_0x351dc6){return _0x1da93c===_0x351dc6;},'aZoeH':function(_0x34b0aa,_0x1635b0){return _0x34b0aa(_0x1635b0);},'symvZ':function(_0x3cd9c5,_0x2bf178){return _0x3cd9c5===_0x2bf178;},'JJqcQ':function(_0x51d7de,_0xc9e7f1,_0x2d7fcd){return _0x51d7de(_0xc9e7f1,_0x2d7fcd);}},_0x464350=asRecord(_0x3fecc4['browser']),_0x312ab2={...asRecord(_0x464350?.[_0x5bee1a(0x19f)])??{}};_0xe278fc[_0x5bee1a(0x1c0)](typeof _0x31d375[_0x5bee1a(0x189)],'boolean')&&(_0x312ab2['headless']=_0x31d375['headless']);if(_0x3fecc4['safeMode']){const _0x25b10b=_0x312ab2['args']??[],_0x4a2246=SAFE_MODE_ARGS[_0x5bee1a(0x17e)](_0x3449a1=>!_0x25b10b[_0x5bee1a(0x1c2)](_0x3449a1));_0x312ab2['args']=[..._0x25b10b,..._0x4a2246];}if(_0x3fecc4[_0x5bee1a(0x1d3)]){const _0x13ee2b=_0x312ab2[_0x5bee1a(0x1d5)]??[],_0x27323e=ALLOW_LOCALHOST_ARGS['filter'](_0x118c4c=>!_0x13ee2b['includes'](_0x118c4c));_0x312ab2['args']=[..._0x13ee2b,..._0x27323e];}const _0x197a30={..._0xe278fc[_0x5bee1a(0x16d)](asRecord,_0x464350?.['contextOptions'])??{}};_0x197a30[_0x5bee1a(0x161)]=!![];_0xe278fc[_0x5bee1a(0x18d)](typeof _0x3fecc4['userAgent'],_0x5bee1a(0x17f))&&(_0x197a30['userAgent']=_0x3fecc4['userAgent']);const _0x2769d9=_0xe278fc[_0x5bee1a(0x19e)](mergeHeaders,asRecord(_0x197a30['extraHTTPHeaders']),asRecord(_0x3fecc4[_0x5bee1a(0x1c7)]));return _0x2769d9?_0x197a30['extraHTTPHeaders']=_0x2769d9:delete _0x197a30['extraHTTPHeaders'],_0x31d375['storageStatePath']&&(_0x197a30[_0x5bee1a(0x154)]=_0x31d375[_0x5bee1a(0x1bc)]),{'launchOptions':_0x312ab2,'contextOptions':_0x197a30};}export async function resolveProfileStorageState(_0x151267){const _0x5da18d=_0xf34d34,_0x55e711={'YIpJI':function(_0x5388dc,_0x3ff53d){return _0x5388dc(_0x3ff53d);}};return _0x55e711[_0x5da18d(0x175)](resolveLocalAuthPath,getEnvDir(_0x151267));}async function resolveLocalAuthPath(_0x71a4f2){const _0x30987a=_0xf34d34,_0x302c71={'stedS':'auth.json.enc','HwtGQ':_0x30987a(0x18f),'jETQJ':function(_0x59ae81,_0x9090d3){return _0x59ae81(_0x9090d3);},'ScYPt':function(_0x15a611){return _0x15a611();},'aWUso':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','WiGAz':function(_0x52913b,_0x44a61a,_0x4c4e85){return _0x52913b(_0x44a61a,_0x4c4e85);},'zJNsm':function(_0x78c12e,_0x12b010,_0x8c8e94){return _0x78c12e(_0x12b010,_0x8c8e94);},'FNkRB':function(_0x4f927d,_0x5f2532){return _0x4f927d instanceof _0x5f2532;}},_0x1cc68e=join(_0x71a4f2,_0x302c71['stedS']),_0x24155d=join(_0x71a4f2,_0x302c71['HwtGQ']);if(_0x302c71[_0x30987a(0x185)](existsSync,_0x1cc68e))try{const _0x56f292=await _0x302c71[_0x30987a(0x1a1)](getToken);if(!_0x56f292)throw new Error(_0x302c71['aWUso']);const _0x28e77c=await readFile(_0x1cc68e),_0x10de71=_0x302c71['WiGAz'](decrypt,_0x28e77c,_0x56f292),_0x2cc2f4=_0x302c71['zJNsm'](join,tmpdir(),_0x30987a(0x17a)+Date['now']()+_0x30987a(0x191));return await _0x302c71['zJNsm'](writeFile,_0x2cc2f4,_0x10de71),{'storageStatePath':_0x2cc2f4,'tempAuthPath':_0x2cc2f4};}catch(_0x144b11){const _0x559a33=_0x302c71[_0x30987a(0x1d2)](_0x144b11,Error)?_0x144b11[_0x30987a(0x1d6)]:String(_0x144b11);throw new Error(_0x30987a(0x178)+_0x559a33);}if(existsSync(_0x24155d))return{'storageStatePath':_0x24155d};return{};}export async function buildPlaywrightConfig(_0x3e91ac,_0x558b01,_0x5ca181,_0x4c2a8f,_0x21baca){const _0x398264=_0xf34d34,_0x496450={'GmTPf':function(_0xfdeb1c,_0x52d045,_0x3e35af,_0x461837,_0xac56e5,_0x3b1d5c,_0x5ab8c6){return _0xfdeb1c(_0x52d045,_0x3e35af,_0x461837,_0xac56e5,_0x3b1d5c,_0x5ab8c6);},'SmMlV':function(_0x51afe6,_0x1ebf95){return _0x51afe6(_0x1ebf95);},'DzNPw':_0x398264(0x19a)};if(_0x21baca)return _0x496450[_0x398264(0x1c6)](buildPlaywrightConfigCore,_0x3e91ac,_0x21baca,_0x558b01,_0x5ca181,_0x4c2a8f,_0x398264(0x19a));const {storageStatePath:_0x1193de,tempAuthPath:_0x49c156}=await resolveLocalAuthPath(_0x496450[_0x398264(0x15c)](getEnvDir,_0x558b01));try{const _0x4dd17d=await buildPlaywrightConfigCore(_0x3e91ac,_0x1193de,_0x558b01,_0x5ca181,_0x4c2a8f,_0x496450['DzNPw']);return{..._0x4dd17d,'tempAuthPath':_0x49c156};}catch(_0x43cc39){_0x49c156&&await _0x496450['SmMlV'](unlink,_0x49c156)['catch'](()=>{});throw _0x43cc39;}}export async function buildPlaywrightConfigCore(_0x307171,_0x27e892,_0x448359,_0x31a1b9,_0x41deaf,_0x319e72='stagehand'){const _0x1136c5=_0xf34d34,_0xa174c9={'ksoTX':function(_0x5addee,_0x2f3b41,_0x2da32c){return _0x5addee(_0x2f3b41,_0x2da32c);},'iUVur':_0x1136c5(0x16e),'aejlQ':_0x1136c5(0x1ae),'MEzdG':_0x1136c5(0x165),'mvzaE':function(_0x4d12b5){return _0x4d12b5();},'NWwaG':function(_0x338f49,_0x1539c){return _0x338f49(_0x1539c);},'oTSxK':'playwright-cli','sPOOm':'file','oElpo':_0x1136c5(0x168),'SvGRi':'allow','npyXE':function(_0x11c655,_0x25c08c){return _0x11c655===_0x25c08c;},'UBMkS':function(_0x46030a,_0x1d7d64,_0x3c9825){return _0x46030a(_0x1d7d64,_0x3c9825);},'SIopN':_0x1136c5(0x1ab)},_0x2972c1=_0x31a1b9||_0xa174c9[_0x1136c5(0x199)](randomUUID),_0x4e5c7d=join(getRangerDir(),_0x1136c5(0x18b),_0x2972c1),_0x23939a=_0xa174c9['NWwaG'](Boolean,_0x307171['cdpEndpoint']),_0xabe753=_0x23939a?{'browserName':_0xa174c9[_0x1136c5(0x170)],'cdpEndpoint':_0x307171['cdpEndpoint']}:((()=>{const _0x47dbc7=_0x1136c5,{launchOptions:_0x5ad647,contextOptions:_0x5203bc}=_0xa174c9['ksoTX'](buildBrowserOptionsFromSettings,_0x307171,{'headless':_0x41deaf?![]:_0x307171[_0x47dbc7(0x189)]??!![],'storageStatePath':_0x27e892});if(process['getuid']?.()===0x0){const _0x30ee69=[_0xa174c9['iUVur'],'--disable-setuid-sandbox'],_0x3b3a05=_0x5ad647[_0x47dbc7(0x1d5)]??[],_0x138e1a=_0x30ee69['filter'](_0x884776=>!_0x3b3a05[_0x47dbc7(0x1c2)](_0x884776));_0x5ad647['args']=[..._0x3b3a05,..._0x138e1a];}return{'isolated':!![],'browserName':_0xa174c9['aejlQ'],'launchOptions':_0x5ad647,'contextOptions':{..._0x5203bc,'permissions':[_0x47dbc7(0x152),_0xa174c9['MEzdG']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x166c41=_0x319e72===_0xa174c9[_0x1136c5(0x196)]?{'browser':_0xabe753,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4e5c7d,'outputMode':_0xa174c9['sPOOm'],'codegen':_0xa174c9['oElpo']}:{'name':_0x448359,'browser':_0xabe753,'capabilities':['core','tabs',_0x1136c5(0x169),'pdf',_0x1136c5(0x1ca)],'imageResponses':_0xa174c9['SvGRi'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4e5c7d};if(!_0x23939a){const _0x1a67b5=_0x166c41[_0x1136c5(0x177)],_0xdb975f=_0x1a67b5[_0x1136c5(0x155)];if(_0xa174c9['npyXE'](_0xdb975f['userAgent'],undefined))delete _0xdb975f['userAgent'];if(_0xdb975f['storageState']===undefined)delete _0xdb975f[_0x1136c5(0x154)];}const _0x16b08e=_0xa174c9[_0x1136c5(0x162)](join,tmpdir(),_0xa174c9[_0x1136c5(0x1c1)]);!existsSync(_0x16b08e)&&await mkdir(_0x16b08e,{'recursive':!![]});const _0x382f9a=_0x319e72===_0xa174c9['oTSxK']?'-cli':'',_0x2cb274=join(_0x16b08e,_0x448359+'-'+Date['now']()+_0x382f9a+_0x1136c5(0x191));return await writeFile(_0x2cb274,JSON[_0x1136c5(0x1bf)](_0x166c41,null,0x2)),{'configPath':_0x2cb274,'storageStatePath':_0x27e892};}export async function buildPlaywrightCliConfig(_0x44a74e,_0x1b9170,_0x4d34c2,_0x4b977b,_0x3e5203){const _0x4a6671=_0xf34d34,_0x1acfd5={'dabMI':function(_0x4fbec2,_0x39c191){return _0x4fbec2(_0x39c191);},'ExBvO':function(_0x4de965,_0x16c3a5){return _0x4de965(_0x16c3a5);},'whOsu':function(_0x16aa8c,_0xcf1cde,_0x5cce55,_0x41aa8c,_0x3a3b4f,_0x3c542f,_0x117b59){return _0x16aa8c(_0xcf1cde,_0x5cce55,_0x41aa8c,_0x3a3b4f,_0x3c542f,_0x117b59);},'SsBAj':_0x4a6671(0x19c)};if(_0x3e5203)return buildPlaywrightConfigCore(_0x44a74e,_0x3e5203,_0x1b9170,_0x4d34c2,_0x4b977b,'playwright-cli');const {storageStatePath:_0x3b72ba,tempAuthPath:_0x36738f}=await _0x1acfd5['dabMI'](resolveLocalAuthPath,_0x1acfd5['ExBvO'](getEnvDir,_0x1b9170));try{const _0x45f0b7=await _0x1acfd5[_0x4a6671(0x1b1)](buildPlaywrightConfigCore,_0x44a74e,_0x3b72ba,_0x1b9170,_0x4d34c2,_0x4b977b,_0x1acfd5[_0x4a6671(0x150)]);return{..._0x45f0b7,'tempAuthPath':_0x36738f};}catch(_0x4e1ca5){_0x36738f&&await unlink(_0x36738f)['catch'](()=>{});throw _0x4e1ca5;}}export async function buildRangerwrightCliConfig(_0x25691b,_0x4426f6,_0x523ec6,_0x51c727,_0x48d5bc){const _0x49e6e3=_0xf34d34,_0x60dc38={'IAFMn':'--no-sandbox','GLHxX':_0x49e6e3(0x174),'bFBdf':_0x49e6e3(0x165),'WHWSw':function(_0x328ee6,_0xb632bb,_0x145cf5,_0x5c9ed8){return _0x328ee6(_0xb632bb,_0x145cf5,_0x5c9ed8);},'XLrNy':function(_0x8f7fa5){return _0x8f7fa5();},'JUhDb':function(_0x198bdd,_0x499426){return _0x198bdd(_0x499426);},'gZDEA':function(_0x1032f8,_0x57d295){return _0x1032f8===_0x57d295;},'NJOQi':function(_0x4237a7,_0x196f97,_0x5b12b0){return _0x4237a7(_0x196f97,_0x5b12b0);},'dwdBR':function(_0x4b7706,_0x27a249){return _0x4b7706(_0x27a249);},'LHuFD':function(_0x1cce11,_0x117443,_0x6cfb2){return _0x1cce11(_0x117443,_0x6cfb2);}},{storageStatePath:_0x4950b1,tempAuthPath:_0x420a0b}=_0x48d5bc?{'storageStatePath':_0x48d5bc,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x4426f6)),_0x35ce3c=_0x523ec6||randomUUID(),_0x58e098=_0x60dc38['WHWSw'](join,_0x60dc38[_0x49e6e3(0x1b9)](getRangerDir),_0x49e6e3(0x18b),_0x35ce3c),_0x3a6957=_0x60dc38[_0x49e6e3(0x192)](Boolean,_0x25691b[_0x49e6e3(0x1d0)]),_0x21b43b=_0x3a6957?{'browserName':'chromium','cdpEndpoint':_0x25691b['cdpEndpoint']}:((()=>{const _0x53b8f5=_0x49e6e3,{launchOptions:_0x3dbdc0,contextOptions:_0x1c9ce1}=buildBrowserOptionsFromSettings(_0x25691b,{'headless':_0x51c727?![]:_0x25691b['headless']??!![],'storageStatePath':_0x4950b1});if(process[_0x53b8f5(0x18a)]?.()===0x0){const _0x96ded5=[_0x60dc38[_0x53b8f5(0x18c)],_0x60dc38[_0x53b8f5(0x1cd)]],_0x907212=_0x3dbdc0[_0x53b8f5(0x1d5)]??[],_0x392361=_0x96ded5['filter'](_0x1fe6f2=>!_0x907212[_0x53b8f5(0x1c2)](_0x1fe6f2));_0x3dbdc0[_0x53b8f5(0x1d5)]=[..._0x907212,..._0x392361];}return{'browserName':'chromium','launchOptions':_0x3dbdc0,'contextOptions':{..._0x1c9ce1,'permissions':[_0x53b8f5(0x152),_0x60dc38['bFBdf']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x3a6957){const _0x2891da=_0x21b43b[_0x49e6e3(0x155)];if(_0x2891da){if(_0x60dc38['gZDEA'](_0x2891da['userAgent'],undefined))delete _0x2891da[_0x49e6e3(0x1d4)];if(_0x60dc38['gZDEA'](_0x2891da[_0x49e6e3(0x154)],undefined))delete _0x2891da['storageState'];}}const _0x36ad52={'browser':_0x21b43b,'outputDir':_0x58e098,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x2f1670;try{const _0x285650=_0x60dc38['NJOQi'](join,tmpdir(),_0x49e6e3(0x1ab));!_0x60dc38[_0x49e6e3(0x160)](existsSync,_0x285650)&&await mkdir(_0x285650,{'recursive':!![]}),_0x2f1670=_0x60dc38['NJOQi'](join,_0x285650,_0x4426f6+'-'+Date['now']()+'-rangerwright.json'),await _0x60dc38[_0x49e6e3(0x181)](writeFile,_0x2f1670,JSON['stringify'](_0x36ad52,null,0x2));}catch(_0x21214c){_0x420a0b&&await unlink(_0x420a0b)['catch'](()=>{});throw _0x21214c;}return{'configPath':_0x2f1670,'storageStatePath':_0x4950b1,'tempAuthPath':_0x420a0b,'outputDir':_0x58e098};}export async function buildNovaActCliConfig(_0x33885f,_0x453746,_0x236d99,_0x389542,_0x103f80){const _0x2930f7=_0xf34d34,_0x1acd79={'zwfuS':function(_0x31ef25,_0x57d351){return _0x31ef25(_0x57d351);},'xzDDI':function(_0x3d818f){return _0x3d818f();},'xQcDh':'sessions','rDQom':function(_0x47bb2e,_0x3e74ea,_0x2b0ba0){return _0x47bb2e(_0x3e74ea,_0x2b0ba0);},'JhBmG':_0x2930f7(0x16e),'AKOZm':_0x2930f7(0x174)},{storageStatePath:_0x143970,tempAuthPath:_0x2db542}=_0x103f80?{'storageStatePath':_0x103f80,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x1acd79[_0x2930f7(0x1ce)](getEnvDir,_0x453746)),_0x1f8d69=_0x236d99||_0x1acd79['xzDDI'](randomUUID),_0xda07=join(getRangerDir(),_0x1acd79[_0x2930f7(0x1cf)],_0x1f8d69),_0x2e736d=_0x1acd79[_0x2930f7(0x18e)](join,_0xda07,'nova-user-data'),_0xf0381b=_0x143970?_0x1acd79['rDQom'](join,_0x2e736d,'Default'):undefined,{launchOptions:_0x36f979,contextOptions:_0x5e8bae}=buildBrowserOptionsFromSettings(_0x33885f,{'headless':_0x389542?![]:_0x33885f[_0x2930f7(0x189)]??!![],'storageStatePath':_0x143970});if(process['getuid']?.()===0x0){const _0x181add=[_0x1acd79[_0x2930f7(0x1cc)],_0x1acd79['AKOZm']],_0x4be29a=_0x36f979['args']??[],_0x297143=_0x181add['filter'](_0x3eff81=>!_0x4be29a[_0x2930f7(0x1c2)](_0x3eff81));_0x36f979[_0x2930f7(0x1d5)]=[..._0x4be29a,..._0x297143];}const _0x193526=typeof _0x36f979[_0x2930f7(0x171)]===_0x2930f7(0x17f)?_0x36f979[_0x2930f7(0x171)]:_0x143970?chromium[_0x2930f7(0x171)]():undefined;return{'storageStatePath':_0x143970,'tempAuthPath':_0x2db542,'baseUrl':_0x33885f[_0x2930f7(0x1bd)],'headless':Boolean(_0x36f979[_0x2930f7(0x189)]),'userDataDir':_0x2e736d,'browserProfilePath':_0xf0381b,'executablePath':_0x193526,'launchArgs':Array[_0x2930f7(0x194)](_0x36f979['args'])?_0x36f979[_0x2930f7(0x1d5)][_0x2930f7(0x17e)](_0x5a439e=>typeof _0x5a439e===_0x2930f7(0x17f)):[],'userAgent':typeof _0x5e8bae[_0x2930f7(0x1d4)]===_0x2930f7(0x17f)?_0x5e8bae[_0x2930f7(0x1d4)]:undefined,'extraHTTPHeaders':_0x5e8bae[_0x2930f7(0x158)],'allowInsecureLocalhost':Boolean(_0x33885f[_0x2930f7(0x1d3)]),'safeMode':_0x1acd79['zwfuS'](Boolean,_0x33885f['safeMode']),'cdpEndpoint':_0x33885f[_0x2930f7(0x1d0)],'isCdpMode':_0x1acd79['zwfuS'](Boolean,_0x33885f['cdpEndpoint'])};}export function getNestedValue(_0x2dd85b,_0x23fa2a){const _0x3f3be2=_0xf34d34,_0x287cac={'eOfme':function(_0x360c30,_0x1714d8){return _0x360c30(_0x1714d8);},'ywoIj':function(_0x1ae16f,_0xa1fdc6){return _0x1ae16f===_0xa1fdc6;},'CtVIE':function(_0x4930a3,_0xb26da5){return _0x4930a3!==_0xb26da5;},'GCtsZ':_0x3f3be2(0x1aa)},_0x18ae6f=_0x287cac[_0x3f3be2(0x1a2)](parseKeyPath,_0x23fa2a);let _0x368e91=_0x2dd85b;for(const _0x4cc355 of _0x18ae6f){if(_0x287cac[_0x3f3be2(0x1a9)](_0x368e91,null)||_0x287cac['ywoIj'](_0x368e91,undefined)||_0x287cac[_0x3f3be2(0x195)](typeof _0x368e91,_0x287cac['GCtsZ']))return undefined;_0x368e91=_0x368e91[_0x4cc355];}return _0x368e91;}function _0x3529(){const _0x1caa9c=['install','push','fromEntries','utf-8','aZoeH','--no-sandbox','xwklg','aejlQ','executablePath','local','yaocm','--disable-setuid-sandbox','YIpJI','IQBAM','browser','Failed\x20to\x20decrypt\x20auth\x20state:\x20','replace','ranger-auth-','Ztzhb','location','80gizGPe','filter','string','2525922hZFECq','LHuFD','setupHeader','RgWFp','IsdHU','jETQJ','--allow-running-insecure-content','ApvyW','15567NzkfsX','headless','getuid','sessions','IAFMn','symvZ','rDQom','auth.json','3eygTHs','.json','JUhDb','endsWith','isArray','CtVIE','oTSxK','xZCup','92eoVJAG','mvzaE','stagehand','--unsafely-treat-insecure-origin-as-secure=http://localhost','playwright-cli','mrRWk','JJqcQ','launchOptions','Environment\x20variable\x20','ScYPt','eOfme','setupHeaders','FscLM','12oIvqsx','TrMwk','legacy','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','ywoIj','object','ranger-config','settings.json','\x20is\x20not\x20set','chromium','553CbqYaP','3023768efstMN','whOsu','rCqXC','length','hYDqq','--disable-features=WebBluetooth','eXVxO','dpXnE','IsQyc','XLrNy','vflkR','730965bcrhSp','storageStatePath','baseUrl','508374GpWXcP','stringify','ZZgJm','SIopN','includes','lnJel','keys','tNeBp','GmTPf','headers','pnNNs','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','vision','bUArb','JhBmG','GLHxX','zwfuS','xQcDh','cdpEndpoint','locations','FNkRB','allowInsecureLocalhost','userAgent','args','message','SsBAj','entries','clipboard-read','UAHsE','storageState','contextOptions','parse','FXOwz','extraHTTPHeaders','mmAgC','forWrite','rangerDir','SmMlV','path','RRIfv','oiRFD','dwdBR','ignoreHTTPSErrors','UBMkS','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','11448lmsvGq','clipboard-write','805924ItyZkO','Kqezo','none'];_0x3529=function(){return _0x1caa9c;};return _0x3529();}export function setNestedValue(_0x2a5052,_0x180152,_0x4df8f5){const _0x40c33f=_0xf34d34,_0x3e120e={'ApvyW':function(_0x19699b,_0x3fd36f){return _0x19699b-_0x3fd36f;},'PhEUe':function(_0x3b42b9,_0x3ac0a8){return _0x3b42b9 in _0x3ac0a8;}},_0x5810a1=parseKeyPath(_0x180152);let _0x40e069=_0x2a5052;for(let _0x3406f5=0x0;_0x3406f5<_0x3e120e[_0x40c33f(0x187)](_0x5810a1['length'],0x1);_0x3406f5++){const _0xb246aa=_0x5810a1[_0x3406f5];(!_0x3e120e['PhEUe'](_0xb246aa,_0x40e069)||typeof _0x40e069[_0xb246aa]!=='object')&&(_0x40e069[_0xb246aa]={}),_0x40e069=_0x40e069[_0xb246aa];}_0x40e069[_0x5810a1[_0x3e120e['ApvyW'](_0x5810a1[_0x40c33f(0x1b3)],0x1)]]=_0x4df8f5;}export function deleteNestedValue(_0x1a288a,_0x5b6c85){const _0x5e904f=_0xf34d34,_0x47e992={'HYtzW':function(_0x3ca907,_0x3dd475){return _0x3ca907(_0x3dd475);},'IsdHU':function(_0x428474,_0x2f3c99){return _0x428474 in _0x2f3c99;}},_0xe8135a=_0x47e992['HYtzW'](parseKeyPath,_0x5b6c85);let _0x3f10d3=_0x1a288a;for(let _0x423909=0x0;_0x423909<_0xe8135a[_0x5e904f(0x1b3)]-0x1;_0x423909++){if(_0x3f10d3===null||_0x3f10d3===undefined||typeof _0x3f10d3!=='object')return![];_0x3f10d3=_0x3f10d3[_0xe8135a[_0x423909]];}if(_0x3f10d3===null||_0x3f10d3===undefined||typeof _0x3f10d3!=='object')return![];const _0x572aac=_0xe8135a[_0xe8135a[_0x5e904f(0x1b3)]-0x1];if(_0x47e992[_0x5e904f(0x184)](_0x572aac,_0x3f10d3))return delete _0x3f10d3[_0x572aac],!![];return![];}function parseKeyPath(_0xc9a7d0){const _0x1b542a=_0xf34d34,_0x21e277={'IsQyc':function(_0x37495e,_0x56d000){return _0x37495e===_0x56d000;},'lDOSn':'header','pnNNs':_0x1b542a(0x1c7),'mmAgC':_0x1b542a(0x1a3)},_0x1ff62b=_0xc9a7d0['split']('.');return _0x21e277[_0x1b542a(0x1b8)](_0x1ff62b[0x0],_0x21e277['lDOSn'])&&(_0x1ff62b[0x0]=_0x21e277[_0x1b542a(0x1c8)]),_0x21e277[_0x1b542a(0x1b8)](_0x1ff62b[0x0],_0x1b542a(0x182))&&(_0x1ff62b[0x0]=_0x21e277[_0x1b542a(0x159)]),_0x1ff62b;}export function formatSettings(_0x3ea2de,_0x1b64bd=0x0){const _0x5240ae=_0xf34d34,_0x145e2c={'qGYkC':function(_0x92483,_0x4c4bba){return _0x92483===_0x4c4bba;},'RZSVQ':_0x5240ae(0x1aa),'GkbFE':function(_0x11256c,_0x5923c0){return _0x11256c!==_0x5923c0;}},_0x240350=[],_0xc7ff78='\x20\x20'['repeat'](_0x1b64bd);for(const [_0xc0a426,_0x1ba9fd]of Object[_0x5240ae(0x151)](_0x3ea2de)){if(_0x145e2c['qGYkC'](_0x1ba9fd,undefined))continue;if(_0x145e2c['qGYkC'](typeof _0x1ba9fd,_0x145e2c['RZSVQ'])&&_0x145e2c['GkbFE'](_0x1ba9fd,null)){_0x240350['push'](''+_0xc7ff78+_0xc0a426+':');for(const [_0xef60b5,_0x278dd2]of Object['entries'](_0x1ba9fd)){_0x240350['push'](_0xc7ff78+'\x20\x20'+_0xef60b5+':\x20'+_0x278dd2);}}else _0x240350[_0x5240ae(0x16a)](''+_0xc7ff78+_0xc0a426+':\x20'+_0x1ba9fd);}return _0x240350['join']('\x0a');}
|
|
1
|
+
const _0x5ebd86=_0x38c9;(function(_0x5ccb95,_0x7363ae){const _0x2e030d=_0x38c9,_0x5a758c=_0x5ccb95();while(!![]){try{const _0x1c713c=parseInt(_0x2e030d(0x216))/0x1*(parseInt(_0x2e030d(0x207))/0x2)+-parseInt(_0x2e030d(0x215))/0x3+parseInt(_0x2e030d(0x201))/0x4+-parseInt(_0x2e030d(0x1b6))/0x5+-parseInt(_0x2e030d(0x1d4))/0x6*(parseInt(_0x2e030d(0x230))/0x7)+parseInt(_0x2e030d(0x214))/0x8*(-parseInt(_0x2e030d(0x1c2))/0x9)+-parseInt(_0x2e030d(0x22a))/0xa*(-parseInt(_0x2e030d(0x209))/0xb);if(_0x1c713c===_0x7363ae)break;else _0x5a758c['push'](_0x5a758c['shift']());}catch(_0x4b8100){_0x5a758c['push'](_0x5a758c['shift']());}}}(_0x167e,0xa75e2));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x11d910,_0x389d06){const _0x1b2924=_0x38c9,_0x3c0893={'egSJz':function(_0x591a5d,_0x2a71b5,_0x280091,_0x5ceabb){return _0x591a5d(_0x2a71b5,_0x280091,_0x5ceabb);},'nlmuA':_0x1b2924(0x20c),'dFtRu':function(_0x15ccc4,_0x3b8459,_0x83005){return _0x15ccc4(_0x3b8459,_0x83005);},'SgcGK':function(_0x4aefb4,_0x43e79d){return _0x4aefb4(_0x43e79d);},'JvRto':function(_0x1c44cc,_0x3d0312){return _0x1c44cc(_0x3d0312);},'tXsyZ':function(_0x266860,_0x50bc9d){return _0x266860!==_0x50bc9d;}},_0x5f0cd5=join(_0x389d06,'ci',_0x11d910),_0x251814=_0x3c0893[_0x1b2924(0x1e8)](join,_0x389d06,_0x3c0893[_0x1b2924(0x1ef)],_0x11d910),_0x2a42f9=_0x3c0893[_0x1b2924(0x1f1)](join,_0x389d06,_0x11d910),_0x2e995a=join(_0x389d06,'local'),_0x1cb43b=_0x3c0893['dFtRu'](join,_0x389d06,'ci');if(existsSync(_0x5f0cd5))return _0x5f0cd5;if(_0x3c0893['SgcGK'](existsSync,_0x251814))return _0x251814;if(_0x3c0893[_0x1b2924(0x205)](existsSync,_0x2a42f9)&&(_0x2a42f9!==_0x2e995a&&_0x3c0893[_0x1b2924(0x1dd)](_0x2a42f9,_0x1cb43b)?!![]:_0x3c0893['JvRto'](hasLegacyProfileFiles,_0x2a42f9)))return _0x2a42f9;return null;}export function getEnvDir(_0xe83d48,_0x408ec5={}){const _0x21e947=_0x38c9,_0x4a949d={'XkPKp':function(_0x55fc70,_0x5d42d8,_0x355b0a){return _0x55fc70(_0x5d42d8,_0x355b0a);},'ZQbCp':function(_0x59cf29,_0x452e35){return _0x59cf29(_0x452e35);},'Daljm':function(_0x4932ec,_0x2313f8,_0x17bb0a){return _0x4932ec(_0x2313f8,_0x17bb0a);},'wdNWz':function(_0x30ced6,_0x3a15d6,_0x1436b8){return _0x30ced6(_0x3a15d6,_0x1436b8);}},_0x1c38f5=getRangerDir(),_0x32a98c=_0x4a949d['XkPKp'](findEnvInRoot,_0xe83d48,_0x1c38f5);if(_0x32a98c){if(_0x408ec5['forWrite']&&_0x4a949d['ZQbCp'](isLegacyEnvPath,_0x32a98c))throw legacyWriteError(_0xe83d48,_0x32a98c);return _0x32a98c;}const _0xf93737=getRangerHomeDir();if(_0xf93737!==_0x1c38f5){const _0x3ebfa6=_0x4a949d['Daljm'](findEnvInRoot,_0xe83d48,_0xf93737);if(_0x3ebfa6){if(_0x408ec5['forWrite']&&isLegacyEnvPath(_0x3ebfa6))throw _0x4a949d['XkPKp'](legacyWriteError,_0xe83d48,_0x3ebfa6);return _0x3ebfa6;}}const _0x20be90=join(_0xf93737,'local',_0xe83d48);if(_0x408ec5['forWrite'])throw _0x4a949d[_0x21e947(0x1d5)](legacyWriteError,_0xe83d48,_0x20be90);return _0x20be90;}function isLegacyEnvPath(_0x517029){const _0x2cde70=_0x38c9,_0x405144={'MQKXI':function(_0x2eb190){return _0x2eb190();}},_0x4f6788=_0x405144['MQKXI'](getRangerDir),_0x2e3ea6=_0x405144[_0x2cde70(0x1e6)](getRangerHomeDir);for(const _0x5ef5b1 of new Set([_0x4f6788,_0x2e3ea6])){const _0x29d214=_0x5ef5b1['endsWith']('/')?_0x5ef5b1:_0x5ef5b1+'/';if(_0x517029===_0x5ef5b1||_0x517029[_0x2cde70(0x1a9)](_0x29d214))return!![];}return![];}function legacyWriteError(_0x10d2b1,_0x4a85dd){const _0x4610cf=_0x38c9,_0x762c72={'nBPLN':function(_0x562f30,_0x4b9abb){return _0x562f30+_0x4b9abb;}};return new Error(_0x762c72[_0x4610cf(0x1e4)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x10d2b1+'\x22\x20to\x20legacy\x20path\x20'+_0x4a85dd+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0x4610cf(0x232)+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x396f6d,_0x40c81b){const _0x30fdc3=_0x38c9,_0x43268e={'JWBsd':'local','LARHl':function(_0x20870a,_0x19affb,_0x125020,_0x3537a4){return _0x20870a(_0x19affb,_0x125020,_0x3537a4);},'GmNOM':function(_0x51d49d,_0x277fac){return _0x51d49d(_0x277fac);},'VLuNc':function(_0x38dc11,_0x17b54a){return _0x38dc11===_0x17b54a;}},_0x5e4a21=_0x40c81b?.['rangerDir'],_0x493c89=_0x5e4a21?[_0x5e4a21]:[getRangerDir(),getRangerHomeDir()][_0x30fdc3(0x1c4)]((_0x68df4c,_0x152666,_0x5aa67c)=>_0x5aa67c[_0x30fdc3(0x1cd)](_0x68df4c)===_0x152666),_0x2a25fd=_0x40c81b?.['locations']??['ci','local','legacy'];for(const _0x52069f of _0x493c89){const _0x22feaf=join(_0x52069f,_0x43268e['JWBsd']),_0x160654=join(_0x52069f,'ci'),_0x467c81=[{'location':'ci','path':_0x43268e['LARHl'](join,_0x52069f,'ci',_0x396f6d)},{'location':'local','path':_0x43268e['LARHl'](join,_0x52069f,_0x30fdc3(0x20c),_0x396f6d)},{'location':'legacy','path':join(_0x52069f,_0x396f6d)}];for(const _0x1db298 of _0x467c81){if(_0x2a25fd['includes'](_0x1db298['location'])&&_0x43268e[_0x30fdc3(0x1bb)](existsSync,_0x1db298[_0x30fdc3(0x1f2)])){if(_0x43268e[_0x30fdc3(0x1e5)](_0x1db298[_0x30fdc3(0x1c7)],_0x30fdc3(0x1d9))&&(_0x1db298[_0x30fdc3(0x1f2)]===_0x22feaf||_0x1db298[_0x30fdc3(0x1f2)]===_0x160654)&&!hasLegacyProfileFiles(_0x1db298[_0x30fdc3(0x1f2)]))continue;return{'path':_0x1db298['path'],'location':_0x1db298['location']};}}}return null;}function hasLegacyProfileFiles(_0xfee4a8){const _0x59796a=_0x38c9,_0x164a1b={'towsN':function(_0x21fc78,_0x478859){return _0x21fc78(_0x478859);},'oIUJl':function(_0x8529b9,_0x16e1c4,_0x5ca69a){return _0x8529b9(_0x16e1c4,_0x5ca69a);},'fxLqq':'settings.json','LcrTD':'auth.json.enc'};return _0x164a1b[_0x59796a(0x21c)](existsSync,_0x164a1b[_0x59796a(0x204)](join,_0xfee4a8,_0x164a1b[_0x59796a(0x1b4)]))||_0x164a1b['towsN'](existsSync,join(_0xfee4a8,'auth.json'))||existsSync(join(_0xfee4a8,_0x164a1b[_0x59796a(0x1fe)]));}export function isEnvCi(_0x1fd21f){const _0x55d908=_0x38c9,_0x560cd8={'GhYPw':function(_0x456251,_0x29a72f){return _0x456251(_0x29a72f);},'YjxKR':function(_0x611ea9,_0x1ae73a,_0x5ed145,_0x13f086){return _0x611ea9(_0x1ae73a,_0x5ed145,_0x13f086);},'IIQKF':function(_0x9b01f4){return _0x9b01f4();},'yJfyd':function(_0x46d196){return _0x46d196();}};if(_0x560cd8['GhYPw'](existsSync,_0x560cd8[_0x55d908(0x1ed)](join,_0x560cd8[_0x55d908(0x1ba)](getRangerDir),'ci',_0x1fd21f)))return!![];const _0x3ea716=_0x560cd8[_0x55d908(0x1f8)](getRangerHomeDir);if(_0x3ea716!==_0x560cd8['IIQKF'](getRangerDir)&&existsSync(join(_0x3ea716,'ci',_0x1fd21f)))return!![];return![];}export async function cleanupTempFiles(_0x25ad70){const _0xfb3f70=_0x38c9,_0x46f6a9={'DnRiq':'ENOENT'},_0x16b01f=[_0x25ad70['tempAuthPath'],_0x25ad70[_0xfb3f70(0x20e)]]['filter'](Boolean);await Promise[_0xfb3f70(0x1c6)](_0x16b01f[_0xfb3f70(0x1e9)](_0x377d04=>unlink(_0x377d04)[_0xfb3f70(0x1f3)](_0x2d2ba3=>{const _0x4af945=_0xfb3f70;_0x2d2ba3['code']!==_0x46f6a9['DnRiq']&&console[_0x4af945(0x1da)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x377d04+':',_0x2d2ba3[_0x4af945(0x1b8)]);})));}export function getSettingsPath(_0x1bc0f9){const _0x39cf0d=_0x38c9,_0x27a2ac={'xxdjz':function(_0x37e885,_0x59cf12,_0x10b53e){return _0x37e885(_0x59cf12,_0x10b53e);},'TGUFY':function(_0x52524b,_0x429627){return _0x52524b(_0x429627);},'ZdHoT':_0x39cf0d(0x1bd)};return _0x27a2ac[_0x39cf0d(0x1ce)](join,_0x27a2ac[_0x39cf0d(0x1c0)](getEnvDir,_0x1bc0f9),_0x27a2ac['ZdHoT']);}export async function loadSettings(_0x456a1a){const _0x107b09=_0x38c9,_0xeaffcc={'KPYRh':function(_0x255ba2,_0x5a8271){return _0x255ba2(_0x5a8271);},'HQhEh':function(_0x3071a3,_0x286964,_0x1ad445){return _0x3071a3(_0x286964,_0x1ad445);},'bUbrE':'utf-8'},_0x15af2f=getSettingsPath(_0x456a1a);if(!_0xeaffcc[_0x107b09(0x1db)](existsSync,_0x15af2f))return{};try{const _0x329660=await _0xeaffcc[_0x107b09(0x228)](readFile,_0x15af2f,_0xeaffcc[_0x107b09(0x1dc)]);return JSON[_0x107b09(0x208)](_0x329660);}catch{return{};}}export async function saveSettings(_0xf4ae43,_0x3b3664){const _0x19c84b=_0x38c9,_0x1348ff={'DnqMq':function(_0x49be28,_0x5e8657){return _0x49be28(_0x5e8657);}},_0x44e389=getSettingsPath(_0xf4ae43),_0x9c1e9f=_0x1348ff[_0x19c84b(0x1f4)](dirname,_0x44e389);!_0x1348ff[_0x19c84b(0x1f4)](existsSync,_0x9c1e9f)&&await mkdir(_0x9c1e9f,{'recursive':!![]}),await writeFile(_0x44e389,JSON['stringify'](_0x3b3664,null,0x2));}function _0x167e(){const _0x1cd010=['xxdjz','browser','GYqaG','sfSiz','extraHTTPHeaders','header','3807978vJULCB','wdNWz','ZrSPR','ranger-config','xBBqH','legacy','warn','KPYRh','bUbrE','tXsyZ','tabs','SJCHO','auth.json','sessions','wzhVY','--no-sandbox','nBPLN','VLuNc','MQKXI','lWxmX','egSJz','map','WFNjW','contextOptions','storageState','YjxKR','length','nlmuA','storageStatePath','dFtRu','path','catch','DnqMq','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','--disable-features=WebBluetooth','auth.json.enc','yJfyd','YvQCt','repeat','getuid','.json','ewfuG','LcrTD','whwur','now','2011112gdzLZy','--disable-setuid-sandbox','includes','oIUJl','JvRto','install','4682XcFLrI','parse','6500736iQdtss','QjTLB','ToOMC','local','tlFqm','configPath','fnVSL','kUDis','clipboard-write','kMNmw','string','25936tQBVRP','2025864QmnnLS','101HVIVOI','kTAeg','cdpEndpoint','SseCn','ZAVWB','UuHTo','towsN','isArray','MkKsH','LmaZo','env','PssQs','Abnml','setupHeader','setupHeaders','GNzwd','none','entries','HQhEh','IoAPz','50VyHXlr','args','--allow-insecure-localhost','gVdsD','Xfvqj','gOvCU','7RMsWYo','executablePath','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','playwright-cli','startsWith','safeMode','push','ranger-auth-','RcPYi','stagehand','headless','WdBKL','allowInsecureLocalhost','file','chromium','fxLqq','Environment\x20variable\x20','5267260vpaeNK','-cli','message','core','IIQKF','GmNOM','headers','settings.json','object','userAgent','TGUFY','LlKSe','1791PMYMaH','LGwij','filter','--unsafely-treat-insecure-origin-as-secure=http://localhost','all','location','kZAbb','replace','uVicu','gTbzO','keys','indexOf'];_0x167e=function(){return _0x1cd010;};return _0x167e();}export function resolveEnvVars(_0x438030){const _0x497d12=_0x38c9;if(typeof _0x438030==='string')return _0x438030[_0x497d12(0x1c9)](/\$\{(\w+)\}/g,(_0x34534d,_0x43da82)=>{const _0x3c1f24=_0x497d12,_0x44c066=process[_0x3c1f24(0x220)][_0x43da82];if(_0x44c066===undefined)throw new Error(_0x3c1f24(0x1b5)+_0x43da82+'\x20is\x20not\x20set');return _0x44c066;});if(Array['isArray'](_0x438030))return _0x438030[_0x497d12(0x1e9)](resolveEnvVars);if(_0x438030&&typeof _0x438030==='object')return Object['fromEntries'](Object['entries'](_0x438030)['map'](([_0x4fba76,_0x50e8e6])=>[_0x4fba76,resolveEnvVars(_0x50e8e6)]));return _0x438030;}const isRecord=_0xd97882=>typeof _0xd97882==='object'&&_0xd97882!==null&&!Array['isArray'](_0xd97882),asRecord=_0x2d3879=>isRecord(_0x2d3879)?_0x2d3879:undefined,mergeHeaders=(_0x363dd6,_0x5751c0)=>{const _0x1d02ee=_0x38c9,_0x3f5952={'ToOMC':function(_0x48ba6f,_0x44041f){return _0x48ba6f??_0x44041f;}},_0x1a7ab7={..._0x363dd6??{},..._0x3f5952[_0x1d02ee(0x20b)](_0x5751c0,{})};return Object[_0x1d02ee(0x1cc)](_0x1a7ab7)[_0x1d02ee(0x1ee)]?_0x1a7ab7:undefined;},SAFE_MODE_ARGS=[_0x5ebd86(0x1f6)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content',_0x5ebd86(0x1c5),_0x5ebd86(0x22c)];export function buildBrowserOptionsFromSettings(_0x5de666,_0x1bc322={}){const _0x5bd727=_0x5ebd86,_0x2e4f2b={'YvQCt':function(_0x546230,_0x3e6354){return _0x546230(_0x3e6354);},'DqONK':function(_0x3a8601,_0x4bd5ef){return _0x3a8601===_0x4bd5ef;},'LWYOA':'boolean','uVicu':'string','lxVLO':function(_0x315fb1,_0x5777e2,_0xed0101){return _0x315fb1(_0x5777e2,_0xed0101);}},_0x2f8f2a=_0x2e4f2b[_0x5bd727(0x1f9)](asRecord,_0x5de666[_0x5bd727(0x1cf)]),_0xa01d65={..._0x2e4f2b['YvQCt'](asRecord,_0x2f8f2a?.['launchOptions'])??{}};_0x2e4f2b['DqONK'](typeof _0x1bc322[_0x5bd727(0x1af)],_0x2e4f2b['LWYOA'])&&(_0xa01d65[_0x5bd727(0x1af)]=_0x1bc322['headless']);if(_0x5de666[_0x5bd727(0x1aa)]){const _0x170806=_0xa01d65['args']??[],_0x209f95=SAFE_MODE_ARGS[_0x5bd727(0x1c4)](_0x41fc4c=>!_0x170806['includes'](_0x41fc4c));_0xa01d65['args']=[..._0x170806,..._0x209f95];}if(_0x5de666[_0x5bd727(0x1b1)]){const _0x175782=_0xa01d65['args']??[],_0x4a28eb=ALLOW_LOCALHOST_ARGS[_0x5bd727(0x1c4)](_0x3c7572=>!_0x175782[_0x5bd727(0x203)](_0x3c7572));_0xa01d65[_0x5bd727(0x22b)]=[..._0x175782,..._0x4a28eb];}const _0x54ba64={..._0x2e4f2b['YvQCt'](asRecord,_0x2f8f2a?.[_0x5bd727(0x1eb)])??{}};_0x54ba64['ignoreHTTPSErrors']=!![];typeof _0x5de666[_0x5bd727(0x1bf)]===_0x2e4f2b[_0x5bd727(0x1ca)]&&(_0x54ba64['userAgent']=_0x5de666[_0x5bd727(0x1bf)]);const _0x1ec14a=_0x2e4f2b['lxVLO'](mergeHeaders,_0x2e4f2b['YvQCt'](asRecord,_0x54ba64[_0x5bd727(0x1d2)]),asRecord(_0x5de666['headers']));return _0x1ec14a?_0x54ba64[_0x5bd727(0x1d2)]=_0x1ec14a:delete _0x54ba64['extraHTTPHeaders'],_0x1bc322['storageStatePath']&&(_0x54ba64['storageState']=_0x1bc322[_0x5bd727(0x1f0)]),{'launchOptions':_0xa01d65,'contextOptions':_0x54ba64};}export async function resolveProfileStorageState(_0x1cfe14){const _0x49e5c7=_0x5ebd86,_0x1ffc25={'kUDis':function(_0x3c7367,_0x2a8e29){return _0x3c7367(_0x2a8e29);}};return _0x1ffc25['kUDis'](resolveLocalAuthPath,_0x1ffc25[_0x49e5c7(0x210)](getEnvDir,_0x1cfe14));}async function resolveLocalAuthPath(_0x1e7de8){const _0x3493ac=_0x5ebd86,_0x583df7={'fnVSL':_0x3493ac(0x1f7),'gOvCU':function(_0x4da001,_0x2062e7,_0x2c0cb0){return _0x4da001(_0x2062e7,_0x2c0cb0);},'PssQs':_0x3493ac(0x1f5),'LGwij':function(_0x168563,_0x40cded,_0x4d2b12){return _0x168563(_0x40cded,_0x4d2b12);},'APWhB':function(_0x3aa39a){return _0x3aa39a();},'RXPrF':function(_0x53a36d,_0x4b750e,_0x167fff){return _0x53a36d(_0x4b750e,_0x167fff);},'DZWKa':function(_0x159f4f,_0x143787){return _0x159f4f(_0x143787);}},_0x3e7d39=join(_0x1e7de8,_0x583df7[_0x3493ac(0x20f)]),_0x4a46bd=_0x583df7['gOvCU'](join,_0x1e7de8,_0x3493ac(0x1e0));if(existsSync(_0x3e7d39))try{const _0x44df25=await getToken();if(!_0x44df25)throw new Error(_0x583df7[_0x3493ac(0x221)]);const _0x3714c4=await readFile(_0x3e7d39),_0x2fce8f=_0x583df7[_0x3493ac(0x22f)](decrypt,_0x3714c4,_0x44df25),_0x295b50=_0x583df7[_0x3493ac(0x1c3)](join,_0x583df7['APWhB'](tmpdir),_0x3493ac(0x1ac)+Date[_0x3493ac(0x200)]()+_0x3493ac(0x1fc));return await _0x583df7['RXPrF'](writeFile,_0x295b50,_0x2fce8f),{'storageStatePath':_0x295b50,'tempAuthPath':_0x295b50};}catch(_0x3a3ac5){const _0x4e1865=_0x3a3ac5 instanceof Error?_0x3a3ac5[_0x3493ac(0x1b8)]:_0x583df7['DZWKa'](String,_0x3a3ac5);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x4e1865);}if(existsSync(_0x4a46bd))return{'storageStatePath':_0x4a46bd};return{};}export async function buildPlaywrightConfig(_0x512a95,_0x328e9d,_0x689d2c,_0x506b7b,_0x545531){const _0x5b2376=_0x5ebd86,_0x27de1c={'IoAPz':function(_0x99f8c6,_0x2e23bd,_0x4f9d68,_0x461e7b,_0x27c4e7,_0x3cf5c7,_0xbf7884){return _0x99f8c6(_0x2e23bd,_0x4f9d68,_0x461e7b,_0x27c4e7,_0x3cf5c7,_0xbf7884);},'LlKSe':'stagehand','SJCHO':function(_0x476ae2,_0x2b0b5d,_0x3f128f,_0x4bd10e,_0x57a0d7,_0x4cfae0,_0x29d742){return _0x476ae2(_0x2b0b5d,_0x3f128f,_0x4bd10e,_0x57a0d7,_0x4cfae0,_0x29d742);}};if(_0x545531)return _0x27de1c[_0x5b2376(0x229)](buildPlaywrightConfigCore,_0x512a95,_0x545531,_0x328e9d,_0x689d2c,_0x506b7b,_0x27de1c['LlKSe']);const {storageStatePath:_0x2e9cbe,tempAuthPath:_0x312375}=await resolveLocalAuthPath(getEnvDir(_0x328e9d));try{const _0x3afda6=await _0x27de1c[_0x5b2376(0x1df)](buildPlaywrightConfigCore,_0x512a95,_0x2e9cbe,_0x328e9d,_0x689d2c,_0x506b7b,_0x27de1c[_0x5b2376(0x1c1)]);return{..._0x3afda6,'tempAuthPath':_0x312375};}catch(_0x4bbfb1){_0x312375&&await unlink(_0x312375)[_0x5b2376(0x1f3)](()=>{});throw _0x4bbfb1;}}export async function buildPlaywrightConfigCore(_0x15b770,_0x2250f7,_0x58ab0c,_0x4b296c,_0x49a91b,_0x523b17=_0x5ebd86(0x1ae)){const _0x278317=_0x5ebd86,_0x3612e4={'ZrSPR':function(_0x24b9d5,_0x501287,_0x2ab7f4){return _0x24b9d5(_0x501287,_0x2ab7f4);},'sfSiz':'chromium','QjTLB':_0x278317(0x211),'isvXr':function(_0x54e1a3){return _0x54e1a3();},'OuLOo':_0x278317(0x1e1),'lWxmX':_0x278317(0x1b2),'kZAbb':_0x278317(0x206),'Abnml':'pdf','leMdb':'vision','veATM':'allow','xBBqH':function(_0x626378,_0x4cfef5){return _0x626378===_0x4cfef5;},'gVdsD':_0x278317(0x1d7),'ZAVWB':function(_0x232084,_0x2a0dbd){return _0x232084(_0x2a0dbd);},'gTbzO':_0x278317(0x1b7),'TYpLl':function(_0x3731ba,_0x416b7f,_0x1f5ab2){return _0x3731ba(_0x416b7f,_0x1f5ab2);}},_0x28c720=_0x4b296c||randomUUID(),_0x15d01f=join(_0x3612e4['isvXr'](getRangerDir),_0x3612e4['OuLOo'],_0x28c720),_0x5826bd=Boolean(_0x15b770[_0x278317(0x218)]),_0x58e65c=_0x5826bd?{'browserName':'chromium','cdpEndpoint':_0x15b770['cdpEndpoint']}:((()=>{const _0x317f07=_0x278317,{launchOptions:_0x30d8a9,contextOptions:_0x382765}=_0x3612e4[_0x317f07(0x1d6)](buildBrowserOptionsFromSettings,_0x15b770,{'headless':_0x49a91b?![]:_0x15b770[_0x317f07(0x1af)]??!![],'storageStatePath':_0x2250f7});if(process[_0x317f07(0x1fb)]?.()===0x0){const _0x4fcf58=['--no-sandbox','--disable-setuid-sandbox'],_0x318b2a=_0x30d8a9[_0x317f07(0x22b)]??[],_0x52f488=_0x4fcf58['filter'](_0x24e908=>!_0x318b2a['includes'](_0x24e908));_0x30d8a9['args']=[..._0x318b2a,..._0x52f488];}return{'isolated':!![],'browserName':_0x3612e4[_0x317f07(0x1d1)],'launchOptions':_0x30d8a9,'contextOptions':{..._0x382765,'permissions':['clipboard-read',_0x3612e4[_0x317f07(0x20a)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x356c68=_0x523b17==='playwright-cli'?{'browser':_0x58e65c,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x15d01f,'outputMode':_0x3612e4[_0x278317(0x1e7)],'codegen':_0x278317(0x226)}:{'name':_0x58ab0c,'browser':_0x58e65c,'capabilities':[_0x278317(0x1b9),_0x278317(0x1de),_0x3612e4[_0x278317(0x1c8)],_0x3612e4[_0x278317(0x222)],_0x3612e4['leMdb']],'imageResponses':_0x3612e4['veATM'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x15d01f};if(!_0x5826bd){const _0x107ccf=_0x356c68['browser'],_0x2f0511=_0x107ccf[_0x278317(0x1eb)];if(_0x3612e4[_0x278317(0x1d8)](_0x2f0511['userAgent'],undefined))delete _0x2f0511['userAgent'];if(_0x2f0511[_0x278317(0x1ec)]===undefined)delete _0x2f0511[_0x278317(0x1ec)];}const _0x2564d9=join(_0x3612e4['isvXr'](tmpdir),_0x3612e4[_0x278317(0x22d)]);!_0x3612e4[_0x278317(0x21a)](existsSync,_0x2564d9)&&await mkdir(_0x2564d9,{'recursive':!![]});const _0x38c8bf=_0x523b17==='playwright-cli'?_0x3612e4[_0x278317(0x1cb)]:'',_0x4f112d=_0x3612e4[_0x278317(0x1d6)](join,_0x2564d9,_0x58ab0c+'-'+Date[_0x278317(0x200)]()+_0x38c8bf+'.json');return await _0x3612e4['TYpLl'](writeFile,_0x4f112d,JSON['stringify'](_0x356c68,null,0x2)),{'configPath':_0x4f112d,'storageStatePath':_0x2250f7};}export async function buildPlaywrightCliConfig(_0x492806,_0x27fb70,_0x5ae325,_0x4a4e14,_0x4b8a3d){const _0x22e495=_0x5ebd86,_0x194e20={'WTPbE':function(_0xf0b494,_0x247bec,_0x1b5993,_0x5e6016,_0x55baba,_0x32e532,_0x37dedd){return _0xf0b494(_0x247bec,_0x1b5993,_0x5e6016,_0x55baba,_0x32e532,_0x37dedd);},'kTAeg':_0x22e495(0x233),'tlFqm':function(_0x56b667,_0x3d2e79){return _0x56b667(_0x3d2e79);}};if(_0x4b8a3d)return _0x194e20['WTPbE'](buildPlaywrightConfigCore,_0x492806,_0x4b8a3d,_0x27fb70,_0x5ae325,_0x4a4e14,'playwright-cli');const {storageStatePath:_0x3141b4,tempAuthPath:_0x6db336}=await resolveLocalAuthPath(getEnvDir(_0x27fb70));try{const _0x1738b3=await buildPlaywrightConfigCore(_0x492806,_0x3141b4,_0x27fb70,_0x5ae325,_0x4a4e14,_0x194e20[_0x22e495(0x217)]);return{..._0x1738b3,'tempAuthPath':_0x6db336};}catch(_0x38c442){_0x6db336&&await _0x194e20[_0x22e495(0x20d)](unlink,_0x6db336)[_0x22e495(0x1f3)](()=>{});throw _0x38c442;}}export async function buildRangerwrightCliConfig(_0x424886,_0x2f99e9,_0x46d890,_0x545961,_0x3ca960){const _0x2d419f=_0x5ebd86,_0x3ab4cd={'sZJxm':function(_0x31b234,_0x4a63e9,_0x58757f){return _0x31b234(_0x4a63e9,_0x58757f);},'GYqaG':function(_0x5d4887,_0x239f3b){return _0x5d4887===_0x239f3b;},'Xfvqj':'clipboard-read','UuHTo':function(_0x1a964d,_0x2da779){return _0x1a964d(_0x2da779);},'fOJnt':function(_0x5837d7,_0xa7e80e){return _0x5837d7===_0xa7e80e;},'JIxOS':function(_0x16f2e6){return _0x16f2e6();},'WdBKL':'ranger-config','QjjtF':function(_0x5ab253,_0x543d86){return _0x5ab253(_0x543d86);}},{storageStatePath:_0x593d64,tempAuthPath:_0x535066}=_0x3ca960?{'storageStatePath':_0x3ca960,'tempAuthPath':undefined}:await _0x3ab4cd[_0x2d419f(0x21b)](resolveLocalAuthPath,getEnvDir(_0x2f99e9)),_0x3567d6=_0x46d890||randomUUID(),_0x14208a=join(getRangerDir(),'sessions',_0x3567d6),_0x2c0b69=_0x3ab4cd[_0x2d419f(0x21b)](Boolean,_0x424886['cdpEndpoint']),_0x2d5ac8=_0x2c0b69?{'browserName':_0x2d419f(0x1b3),'cdpEndpoint':_0x424886['cdpEndpoint']}:((()=>{const _0x1b841f=_0x2d419f,{launchOptions:_0x290156,contextOptions:_0x46fd6b}=_0x3ab4cd['sZJxm'](buildBrowserOptionsFromSettings,_0x424886,{'headless':_0x545961?![]:_0x424886['headless']??!![],'storageStatePath':_0x593d64});if(_0x3ab4cd[_0x1b841f(0x1d0)](process[_0x1b841f(0x1fb)]?.(),0x0)){const _0x386b4e=[_0x1b841f(0x1e3),_0x1b841f(0x202)],_0x39fabd=_0x290156['args']??[],_0x26f01e=_0x386b4e['filter'](_0x44141c=>!_0x39fabd[_0x1b841f(0x203)](_0x44141c));_0x290156['args']=[..._0x39fabd,..._0x26f01e];}return{'browserName':'chromium','launchOptions':_0x290156,'contextOptions':{..._0x46fd6b,'permissions':[_0x3ab4cd[_0x1b841f(0x22e)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x2c0b69){const _0x386c39=_0x2d5ac8['contextOptions'];if(_0x386c39){if(_0x386c39[_0x2d419f(0x1bf)]===undefined)delete _0x386c39[_0x2d419f(0x1bf)];if(_0x3ab4cd['fOJnt'](_0x386c39[_0x2d419f(0x1ec)],undefined))delete _0x386c39['storageState'];}}const _0x2ef632={'browser':_0x2d5ac8,'outputDir':_0x14208a,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x32da9c;try{const _0x3bc554=join(_0x3ab4cd['JIxOS'](tmpdir),_0x3ab4cd[_0x2d419f(0x1b0)]);!_0x3ab4cd['QjjtF'](existsSync,_0x3bc554)&&await mkdir(_0x3bc554,{'recursive':!![]}),_0x32da9c=join(_0x3bc554,_0x2f99e9+'-'+Date['now']()+'-rangerwright.json'),await _0x3ab4cd['sZJxm'](writeFile,_0x32da9c,JSON['stringify'](_0x2ef632,null,0x2));}catch(_0x39bb93){_0x535066&&await unlink(_0x535066)['catch'](()=>{});throw _0x39bb93;}return{'configPath':_0x32da9c,'storageStatePath':_0x593d64,'tempAuthPath':_0x535066,'outputDir':_0x14208a};}export async function buildNovaActCliConfig(_0x4a8ee6,_0x5bb05a,_0x556e40,_0xfb6cd2,_0xa321a){const _0x284c21=_0x5ebd86,_0x4f2816={'wzhVY':function(_0x4a69bc,_0xbfb40c){return _0x4a69bc(_0xbfb40c);},'LmaZo':function(_0x58c52d){return _0x58c52d();},'GNzwd':function(_0x4a1124,_0x2c499e,_0x1d9ce0){return _0x4a1124(_0x2c499e,_0x1d9ce0);},'MkKsH':function(_0x2cf85b,_0x538455,_0x4d39ac){return _0x2cf85b(_0x538455,_0x4d39ac);},'UiBRb':function(_0x985e42,_0x2a9c01){return _0x985e42===_0x2a9c01;},'gLgHQ':'--disable-setuid-sandbox','whwur':function(_0x3ff337,_0x314d10){return _0x3ff337(_0x314d10);}},{storageStatePath:_0x55b8ef,tempAuthPath:_0x365938}=_0xa321a?{'storageStatePath':_0xa321a,'tempAuthPath':undefined}:await _0x4f2816['wzhVY'](resolveLocalAuthPath,getEnvDir(_0x5bb05a)),_0x2f0a64=_0x556e40||_0x4f2816[_0x284c21(0x21f)](randomUUID),_0x48e9e5=join(_0x4f2816['LmaZo'](getRangerDir),_0x284c21(0x1e1),_0x2f0a64),_0x204d06=_0x4f2816[_0x284c21(0x225)](join,_0x48e9e5,'nova-user-data'),_0x1f557a=_0x55b8ef?_0x4f2816[_0x284c21(0x21e)](join,_0x204d06,'Default'):undefined,{launchOptions:_0x501b1c,contextOptions:_0x57fa08}=_0x4f2816['GNzwd'](buildBrowserOptionsFromSettings,_0x4a8ee6,{'headless':_0xfb6cd2?![]:_0x4a8ee6['headless']??!![],'storageStatePath':_0x55b8ef});if(_0x4f2816['UiBRb'](process['getuid']?.(),0x0)){const _0x35afb1=['--no-sandbox',_0x4f2816['gLgHQ']],_0x4b92d2=_0x501b1c[_0x284c21(0x22b)]??[],_0x54b0c6=_0x35afb1[_0x284c21(0x1c4)](_0x4005e8=>!_0x4b92d2[_0x284c21(0x203)](_0x4005e8));_0x501b1c['args']=[..._0x4b92d2,..._0x54b0c6];}const _0x4ed5d3=typeof _0x501b1c['executablePath']===_0x284c21(0x213)?_0x501b1c['executablePath']:_0x55b8ef?chromium[_0x284c21(0x231)]():undefined;return{'storageStatePath':_0x55b8ef,'tempAuthPath':_0x365938,'baseUrl':_0x4a8ee6['baseUrl'],'headless':_0x4f2816[_0x284c21(0x1e2)](Boolean,_0x501b1c['headless']),'userDataDir':_0x204d06,'browserProfilePath':_0x1f557a,'executablePath':_0x4ed5d3,'launchArgs':Array[_0x284c21(0x21d)](_0x501b1c[_0x284c21(0x22b)])?_0x501b1c[_0x284c21(0x22b)]['filter'](_0x484b43=>typeof _0x484b43===_0x284c21(0x213)):[],'userAgent':typeof _0x57fa08['userAgent']===_0x284c21(0x213)?_0x57fa08[_0x284c21(0x1bf)]:undefined,'extraHTTPHeaders':_0x57fa08[_0x284c21(0x1d2)],'allowInsecureLocalhost':Boolean(_0x4a8ee6['allowInsecureLocalhost']),'safeMode':Boolean(_0x4a8ee6['safeMode']),'cdpEndpoint':_0x4a8ee6[_0x284c21(0x218)],'isCdpMode':_0x4f2816[_0x284c21(0x1ff)](Boolean,_0x4a8ee6[_0x284c21(0x218)])};}export function getNestedValue(_0x1d16d2,_0x14dd2e){const _0x3b1278={'VHDpr':function(_0x24ead5,_0x2f7a6d){return _0x24ead5(_0x2f7a6d);},'aJHvJ':function(_0x5a3170,_0x363896){return _0x5a3170===_0x363896;}},_0x4903c2=_0x3b1278['VHDpr'](parseKeyPath,_0x14dd2e);let _0x9187e9=_0x1d16d2;for(const _0x4b09c3 of _0x4903c2){if(_0x9187e9===null||_0x3b1278['aJHvJ'](_0x9187e9,undefined)||typeof _0x9187e9!=='object')return undefined;_0x9187e9=_0x9187e9[_0x4b09c3];}return _0x9187e9;}export function setNestedValue(_0x5819d6,_0x28f617,_0x29d255){const _0x461dd8=_0x5ebd86,_0x105bab={'tuboF':function(_0x1af239,_0x3cfcb6){return _0x1af239(_0x3cfcb6);},'ewfuG':'object','SseCn':function(_0x595895,_0x42419e){return _0x595895-_0x42419e;}},_0x11e81c=_0x105bab['tuboF'](parseKeyPath,_0x28f617);let _0x22a775=_0x5819d6;for(let _0x419501=0x0;_0x419501<_0x11e81c[_0x461dd8(0x1ee)]-0x1;_0x419501++){const _0x3330fa=_0x11e81c[_0x419501];(!(_0x3330fa in _0x22a775)||typeof _0x22a775[_0x3330fa]!==_0x105bab[_0x461dd8(0x1fd)])&&(_0x22a775[_0x3330fa]={}),_0x22a775=_0x22a775[_0x3330fa];}_0x22a775[_0x11e81c[_0x105bab[_0x461dd8(0x219)](_0x11e81c[_0x461dd8(0x1ee)],0x1)]]=_0x29d255;}function _0x38c9(_0x3f64c3,_0x47845c){_0x3f64c3=_0x3f64c3-0x1a9;const _0x167e02=_0x167e();let _0x38c98c=_0x167e02[_0x3f64c3];return _0x38c98c;}export function deleteNestedValue(_0x27843d,_0x4871eb){const _0x180273=_0x5ebd86,_0x476bd3={'xdYah':function(_0x27eda2,_0x5392dc){return _0x27eda2<_0x5392dc;},'bJGIz':function(_0x23c2d4,_0x4c9ff2){return _0x23c2d4===_0x4c9ff2;},'RcPYi':'object','hQTlZ':function(_0x2106c9,_0x29639e){return _0x2106c9!==_0x29639e;}},_0x2864f9=parseKeyPath(_0x4871eb);let _0x251d3b=_0x27843d;for(let _0x359ad1=0x0;_0x476bd3['xdYah'](_0x359ad1,_0x2864f9['length']-0x1);_0x359ad1++){if(_0x251d3b===null||_0x476bd3['bJGIz'](_0x251d3b,undefined)||typeof _0x251d3b!==_0x476bd3[_0x180273(0x1ad)])return![];_0x251d3b=_0x251d3b[_0x2864f9[_0x359ad1]];}if(_0x251d3b===null||_0x251d3b===undefined||_0x476bd3['hQTlZ'](typeof _0x251d3b,_0x180273(0x1be)))return![];const _0x2accc2=_0x2864f9[_0x2864f9[_0x180273(0x1ee)]-0x1];if(_0x2accc2 in _0x251d3b)return delete _0x251d3b[_0x2accc2],!![];return![];}function parseKeyPath(_0xe68038){const _0x3fd1d2=_0x5ebd86,_0x517d45={'iaqlT':_0x3fd1d2(0x1bc),'WFNjW':_0x3fd1d2(0x223),'kMNmw':_0x3fd1d2(0x224)},_0x193682=_0xe68038['split']('.');return _0x193682[0x0]===_0x3fd1d2(0x1d3)&&(_0x193682[0x0]=_0x517d45['iaqlT']),_0x193682[0x0]===_0x517d45[_0x3fd1d2(0x1ea)]&&(_0x193682[0x0]=_0x517d45[_0x3fd1d2(0x212)]),_0x193682;}export function formatSettings(_0x4ad0e9,_0x2f2a2e=0x0){const _0x554124=_0x5ebd86,_0x4ae6a1={'jzXGw':function(_0xd3cb8c,_0x519442){return _0xd3cb8c===_0x519442;},'fdmlq':function(_0x10915d,_0x2849c0){return _0x10915d!==_0x2849c0;}},_0x299083=[],_0x368c3f='\x20\x20'[_0x554124(0x1fa)](_0x2f2a2e);for(const [_0x1c074d,_0x1a6aeb]of Object[_0x554124(0x227)](_0x4ad0e9)){if(_0x4ae6a1['jzXGw'](_0x1a6aeb,undefined))continue;if(typeof _0x1a6aeb==='object'&&_0x4ae6a1['fdmlq'](_0x1a6aeb,null)){_0x299083['push'](''+_0x368c3f+_0x1c074d+':');for(const [_0x43d07f,_0x101b0b]of Object['entries'](_0x1a6aeb)){_0x299083[_0x554124(0x1ab)](_0x368c3f+'\x20\x20'+_0x43d07f+':\x20'+_0x101b0b);}}else _0x299083['push'](''+_0x368c3f+_0x1c074d+':\x20'+_0x1a6aeb);}return _0x299083['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x289e07,_0xa0c3b6){const _0x2ef7b3=_0x52b5,_0x45cdb1=_0x289e07();while(!![]){try{const _0x64fad3=parseInt(_0x2ef7b3(0x1af))/0x1*(-parseInt(_0x2ef7b3(0x1b4))/0x2)+-parseInt(_0x2ef7b3(0x1b7))/0x3+parseInt(_0x2ef7b3(0x1b3))/0x4+-parseInt(_0x2ef7b3(0x1b9))/0x5+parseInt(_0x2ef7b3(0x1b2))/0x6*(parseInt(_0x2ef7b3(0x1ad))/0x7)+parseInt(_0x2ef7b3(0x1ae))/0x8*(-parseInt(_0x2ef7b3(0x1b6))/0x9)+parseInt(_0x2ef7b3(0x1b0))/0xa*(parseInt(_0x2ef7b3(0x1b5))/0xb);if(_0x64fad3===_0xa0c3b6)break;else _0x45cdb1['push'](_0x45cdb1['shift']());}catch(_0xdc30ce){_0x45cdb1['push'](_0x45cdb1['shift']());}}}(_0x5cf3,0xe72a8));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0x52b5(_0x168735,_0x1667a0){_0x168735=_0x168735-0x1ac;const _0x5cf36d=_0x5cf3();let _0x52b534=_0x5cf36d[_0x168735];return _0x52b534;}function _0x5cf3(){const _0x593441=['skills','2796552KBdCGS','3779288BUkMlK','6500xffdiV','11Hnwuoh','11043IxnVbO','474837LATRtU','utf-8','6992405CcqHFk','sioTR','7uTNkYZ','3704FmTIYv','526FPygPW','33703030ownYmB'];_0x5cf3=function(){return _0x593441;};return _0x5cf3();}export function readSkillContent(_0xbef0c9){const _0x297120=_0x52b5,_0x24183d={'WaBWb':function(_0x385826,_0x4089b9,_0xdcaef,_0x49ea72,_0x79eef1){return _0x385826(_0x4089b9,_0xdcaef,_0x49ea72,_0x79eef1);},'ywngR':_0x297120(0x1b1),'cdMas':function(_0x37676d,_0x2bfe77,_0x3ae3f4){return _0x37676d(_0x2bfe77,_0x3ae3f4);},'sioTR':_0x297120(0x1b8)},_0x57891d=_0x24183d['WaBWb'](join,__dirname,'..','..',_0x24183d['ywngR']),_0x59d87e=_0x24183d['cdMas'](join,_0x57891d,_0xbef0c9);try{return _0x24183d['cdMas'](readFileSync,_0x59d87e,_0x24183d[_0x297120(0x1ac)]);}catch{return'';}}export function getRangerSkillContent(){return readSkillContent('ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x55d4(_0x38b640,_0x2b3b0f){_0x38b640=_0x38b640-0x10e;const _0x207189=_0x2071();let _0x55d4c1=_0x207189[_0x38b640];return _0x55d4c1;}const _0x30c1d1=_0x55d4;(function(_0x527179,_0x1a4303){const _0x24b525=_0x55d4,_0xf8dfe6=_0x527179();while(!![]){try{const _0x436070=parseInt(_0x24b525(0x114))/0x1*(-parseInt(_0x24b525(0x119))/0x2)+parseInt(_0x24b525(0x116))/0x3*(-parseInt(_0x24b525(0x113))/0x4)+parseInt(_0x24b525(0x127))/0x5+-parseInt(_0x24b525(0x12f))/0x6+parseInt(_0x24b525(0x131))/0x7+parseInt(_0x24b525(0x120))/0x8*(-parseInt(_0x24b525(0x122))/0x9)+parseInt(_0x24b525(0x12e))/0xa*(parseInt(_0x24b525(0x121))/0xb);if(_0x436070===_0x1a4303)break;else _0xf8dfe6['push'](_0xf8dfe6['shift']());}catch(_0x2b2b8f){_0xf8dfe6['push'](_0xf8dfe6['shift']());}}}(_0x2071,0x4af60));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x2071(){const _0x595327=['opencode','140FVaINw','1715370eSBEUA','QpuYn','2831458oIClsA','match','filter','nGAiK','\x20\x20Files:\x20','vTIfw','5460rFVhmv','1gczWVS','Invalid\x20skill\x20frontmatter','1014gUwmwe','SKILL.md','skills','89394DiHWDG','warn','bug-bash','feature-tracker','\x20\x20Skill\x20not\x20found:\x20','fNBsb','log','2733128yiqpeH','792011fNVEVR','9cdmooR','.md','endsWith','catch','GXhvI','140675EdIGCn','NMUYB','\x20\x20Installed\x20skill:\x20','ascrJ','GOFDn','OLNxK'];_0x2071=function(){return _0x595327;};return _0x2071();}import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=['e2e-test-recommender',_0x30c1d1(0x11b),_0x30c1d1(0x11c)];export async function installSkill(_0x43d4ff,_0x37ffc3={}){const _0x44599e=_0x30c1d1,_0x69980f={'scrFx':'claude','OLNxK':function(_0x297f96,_0x2d621,_0x4e0157){return _0x297f96(_0x2d621,_0x4e0157);},'fNBsb':function(_0x7be616,_0x433ec9){return _0x7be616(_0x433ec9);},'QpuYn':function(_0x1cbc9a,_0x30773f){return _0x1cbc9a&&_0x30773f;},'GOFDn':function(_0x40f7ae,_0x257dcb){return _0x40f7ae(_0x257dcb);},'ascrJ':_0x44599e(0x117),'nGAiK':'utf-8','fwrnv':function(_0xf5fbe8,_0x304efc,_0x111248){return _0xf5fbe8(_0x304efc,_0x111248);},'vTIfw':function(_0x386f1c,_0x1eac84,_0x527b52,_0x35acce){return _0x386f1c(_0x1eac84,_0x527b52,_0x35acce);},'cUThB':function(_0x4815d0,_0x47411f){return _0x4815d0>_0x47411f;},'NMUYB':function(_0x2e91fa,_0x5e0c78,_0x2ec4d1,_0x35fd4b){return _0x2e91fa(_0x5e0c78,_0x2ec4d1,_0x35fd4b);}},{level:level='project',cliVersion:_0x50eeb0,platform:platform=_0x69980f['scrFx']}=_0x37ffc3,_0x8cd312=getSourceSkillsDir(),_0x5514b6=join(_0x8cd312,_0x43d4ff),_0x45de3b=_0x69980f[_0x44599e(0x12c)](join,_0x8cd312,_0x43d4ff+'.md'),_0x3fb851=existsSync(_0x5514b6)&&_0x69980f['fNBsb'](statSync,_0x5514b6)['isDirectory']()&&_0x69980f['fNBsb'](existsSync,join(_0x5514b6,'SKILL.md')),_0x3342a6=_0x69980f[_0x44599e(0x11e)](existsSync,_0x45de3b);if(_0x69980f[_0x44599e(0x130)](!_0x3fb851,!_0x3342a6))return console['warn'](_0x44599e(0x11d)+_0x43d4ff),![];const _0x2fe9c9=platform===_0x44599e(0x12d)?_0x69980f[_0x44599e(0x12b)](getOpencodeSkillsDir,level):getSkillsDir(level),_0x349a66=_0x69980f['OLNxK'](join,_0x2fe9c9,_0x43d4ff);await mkdir(_0x349a66,{'recursive':!![]});let _0x52a7be,_0x3765d5=[];if(_0x3fb851){const _0x3ef2bb=await readdir(_0x5514b6),_0x5c0fe3=_0x3ef2bb[_0x44599e(0x10f)](_0x56e9b9=>_0x56e9b9[_0x44599e(0x124)](_0x44599e(0x123)));for(const _0x50c0e2 of _0x5c0fe3){const _0x424d78=_0x69980f[_0x44599e(0x12c)](join,_0x5514b6,_0x50c0e2),_0x31da29=join(_0x349a66,_0x50c0e2);await copyFile(_0x424d78,_0x31da29),_0x3765d5['push'](_0x50c0e2);}_0x52a7be=await readFile(join(_0x5514b6,_0x69980f['ascrJ']),_0x69980f['nGAiK']);}else{_0x52a7be=await _0x69980f['fwrnv'](readFile,_0x45de3b,_0x69980f['nGAiK']);const _0x549cb2=join(_0x349a66,_0x69980f[_0x44599e(0x12a)]);await _0x69980f[_0x44599e(0x112)](writeFile,_0x549cb2,_0x52a7be,_0x69980f[_0x44599e(0x110)]),_0x3765d5['push']('SKILL.md');}const {name:_0x3e585d}=parseFrontmatter(_0x52a7be);return console['log'](_0x44599e(0x129)+_0x3e585d),console['log']('\x20\x20Location:\x20'+_0x349a66),_0x69980f['cUThB'](_0x3765d5['length'],0x1)&&console[_0x44599e(0x11f)](_0x44599e(0x111)+_0x3765d5['join'](',\x20')),_0x69980f[_0x44599e(0x128)](logLocalAgentInstallation,_0x43d4ff,{'skillDisplayName':_0x3e585d,'installLevel':level},_0x50eeb0)[_0x44599e(0x125)](()=>{}),!![];}function getSourceSkillsDir(){const _0x41a8dd=_0x30c1d1,_0x35926b={'OdenK':function(_0x24daec,_0x250146,_0x4c5d7f,_0x2e0eee,_0x3083aa,_0x2eba28){return _0x24daec(_0x250146,_0x4c5d7f,_0x2e0eee,_0x3083aa,_0x2eba28);},'GXhvI':_0x41a8dd(0x118),'aDyyh':function(_0x36ac8c,_0x5ce838){return _0x36ac8c(_0x5ce838);}},_0x2b8abb=[join(__dirname,'..','..',_0x41a8dd(0x118)),_0x35926b['OdenK'](join,__dirname,'..','..','..',_0x35926b[_0x41a8dd(0x126)])];for(const _0x4e753f of _0x2b8abb){if(_0x35926b['aDyyh'](existsSync,_0x4e753f))return _0x4e753f;}return _0x2b8abb[0x0];}function parseFrontmatter(_0x2fffca){const _0x5c507a=_0x30c1d1,_0x573b2b=_0x2fffca['match'](/^---\n([\s\S]+?)\n---/);if(!_0x573b2b)throw new Error(_0x5c507a(0x115));const _0x180945=_0x573b2b[0x1],_0x39535c=_0x180945['match'](/name:\s*(.+)/),_0x2ebde6=_0x180945[_0x5c507a(0x10e)](/description:\s*"?(.+?)"?\n/);return{'name':_0x39535c?.[0x1]['trim']()||'','description':_0x2ebde6?.[0x1]['trim']()||''};}export async function removeSkill(_0x30d93d,_0x317a0e){const _0x3a0573=_0x30c1d1,_0x27b677=getSkillsDir(_0x317a0e),_0x2456ba=join(_0x27b677,_0x30d93d);if(!existsSync(_0x2456ba))return![];try{return await rm(_0x2456ba,{'recursive':!![]}),console[_0x3a0573(0x11f)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x30d93d),!![];}catch{return console[_0x3a0573(0x11a)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x30d93d),![];}}
|