@ranger-testing/ranger-cli 3.1.4-alpha.fb796e7-45 → 3.1.4-alpha.ffeeafe-46
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/scenarioOriginCheck.js +1 -0
- 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
|
-
function _0x555c(){const _0x2f1d6d=['\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','baseUrl','317220dThtFE','404907dViwVU','envBaseUrl','name','cwd','LcKKv','JMpic','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','url','cloud','string','startPath','Profile\x20\x22','RANGER_SESSION_STATE_PATH','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','9pIwQVV','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','PXnHW','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','profile','resolvedEnv','240785fXMuus','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','source','DISKK','EBrOr','environmentKey','RANGER_SESSION_STATE_PATH=','Cloud\x20profile\x20(recommended)','telemetry','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','8qVsMqx','Mejcv','ngFtj','ItiZI','log','length','NodMo','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','Local\x20profile','332804pgGRZC','hGGRM','cdpEndpoint','ivJft','envStartPath','380302yzhmjH','fKSUQ','status','TYffA','zGwlD','SkFxe','742238QvGSkg','UfPXS','zWRqU','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','domains','3264410IfDgXR','36uBNBZe','settings'];_0x555c=function(){return _0x2f1d6d;};return _0x555c();}(function(_0x3e7b67,_0x15e14b){const _0x182a6a=_0x2807,_0x2afdc2=_0x3e7b67();while(!![]){try{const _0x407736=-parseInt(_0x182a6a(0x167))/0x1+-parseInt(_0x182a6a(0x157))/0x2+-parseInt(_0x182a6a(0x168))/0x3+parseInt(_0x182a6a(0x18f))/0x4+-parseInt(_0x182a6a(0x17c))/0x5*(-parseInt(_0x182a6a(0x163))/0x6)+parseInt(_0x182a6a(0x15d))/0x7*(parseInt(_0x182a6a(0x186))/0x8)+-parseInt(_0x182a6a(0x176))/0x9*(-parseInt(_0x182a6a(0x162))/0xa);if(_0x407736===_0x15e14b)break;else _0x2afdc2['push'](_0x2afdc2['shift']());}catch(_0x590a26){_0x2afdc2['push'](_0x2afdc2['shift']());}}}(_0x555c,0x279e6));import{existsSync}from'fs';import _0x2c2e87 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';export async function resolveProfileContext(_0x1a680e){const _0xb6517e=_0x2807,_0x5825b4={'Mejcv':function(_0x5209f3){return _0x5209f3();},'zWRqU':function(_0x4a993c){return _0x4a993c();},'uhdtw':function(_0x41f7ae,_0x486d0c){return _0x41f7ae===_0x486d0c;},'PbuyC':function(_0x383262,_0x29dbcf){return _0x383262+_0x29dbcf;},'ItiZI':_0xb6517e(0x179),'GRpfW':_0xb6517e(0x165),'MFDPB':_0xb6517e(0x18d),'ppPVm':_0xb6517e(0x16e),'zGwlD':function(_0x500532,_0x478068){return _0x500532(_0x478068);},'YeTQn':function(_0x56d0d2,_0x17111e){return _0x56d0d2(_0x17111e);},'IoEha':function(_0x45d401,_0x45ec7d){return _0x45d401===_0x45ec7d;},'EGFjX':function(_0x48726a,_0x1e05c8){return _0x48726a&&_0x1e05c8;},'ivJft':function(_0x344c24,_0x19fc17){return _0x344c24+_0x19fc17;},'mdgjU':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','iubOV':_0xb6517e(0x17e),'fKSUQ':_0xb6517e(0x170),'EBrOr':_0xb6517e(0x18e),'LcKKv':'local','JMpic':function(_0xae357f,_0x1f96a6){return _0xae357f===_0x1f96a6;},'PXnHW':function(_0x60caff,_0x4ab460,_0x41e753){return _0x60caff(_0x4ab460,_0x41e753);},'ozObz':function(_0x4eee00,_0x3226b0){return _0x4eee00(_0x3226b0);},'Lmwcw':function(_0x1d9966,_0x5b8011){return _0x1d9966??_0x5b8011;},'SkFxe':function(_0x15c4d3,_0x1a3039){return _0x15c4d3(_0x1a3039);},'UfPXS':function(_0x314bee,_0x1cd57d){return _0x314bee(_0x1cd57d);},'QAQKe':function(_0x38428f,_0x4682fe){return _0x38428f(_0x4682fe);},'hGGRM':function(_0x3222c9,_0x124945){return _0x3222c9(_0x124945);},'NodMo':function(_0x5d8fae,_0x436bc0){return _0x5d8fae(_0x436bc0);},'tUCiX':function(_0x1bb4a0,_0x1b72f9){return _0x1bb4a0(_0x1b72f9);},'pYACp':function(_0x49fc40,_0x55a26c){return _0x49fc40&&_0x55a26c;}},_0x465ede=_0x1a680e[_0xb6517e(0x17a)];let _0x591a4a=_0x1a680e[_0xb6517e(0x17a)]??await _0x5825b4[_0xb6517e(0x187)](readActiveProfileName),_0x5a8378=null;if(!_0x591a4a&&process['env']['RANGER_TEST_USERNAME']){const _0x4a185e=await resolveAdHocProfile();_0x4a185e&&(_0x591a4a=_0x4a185e[_0xb6517e(0x16a)],_0x5a8378=_0x4a185e[_0xb6517e(0x17a)]);}if(!_0x591a4a)try{const _0x310283=await _0x5825b4[_0xb6517e(0x15f)](listCloudProfiles);if(_0x5825b4['uhdtw'](_0x310283[_0xb6517e(0x18b)],0x1)){const _0x4a0887=_0x310283[0x0];_0x591a4a=_0x4a0887['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x4a0887[_0xb6517e(0x16a)]),console[_0xb6517e(0x18a)]('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x591a4a)throw new Error(_0x5825b4['PbuyC'](_0x5825b4[_0xb6517e(0x189)]+'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a',_0x5825b4['GRpfW'])+_0x5825b4['MFDPB']+_0x5825b4['ppPVm']);const _0x19e303=getEnvDir(_0x591a4a),_0x4b6251=_0x5825b4['zGwlD'](existsSync,_0x19e303);let _0x6322a=_0x5a8378,_0x525126=![];if(!_0x6322a)try{_0x6322a=await _0x5825b4['YeTQn'](fetchCloudProfile,_0x591a4a);if(!_0x6322a)_0x525126=!![];}catch(_0x1c6c62){_0x1c6c62 instanceof ApiError&&_0x5825b4['IoEha'](_0x1c6c62[_0xb6517e(0x159)],0x194)&&(_0x525126=!![]);}if(_0x5825b4['EGFjX'](_0x465ede,_0x525126)&&!_0x4b6251&&!_0x6322a)throw new Error(_0x5825b4[_0xb6517e(0x192)](_0xb6517e(0x173)+_0x465ede+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0xb6517e(0x175),_0x5825b4['mdgjU']));if(_0x6322a&&_0x4b6251){let _0x5d342c=!![];if(_0x5825b4['zWRqU'](isInteractive)){const {source:_0x1155c5}=await _0x2c2e87['prompt']([{'type':'list','name':_0x5825b4['iubOV'],'message':'Profile\x20\x22'+_0x591a4a+_0xb6517e(0x160),'choices':[{'name':_0xb6517e(0x183),'value':_0x5825b4[_0xb6517e(0x158)]},{'name':_0x5825b4[_0xb6517e(0x180)],'value':_0x5825b4[_0xb6517e(0x16c)]}],'default':_0xb6517e(0x170)}]);_0x5d342c=_0x5825b4[_0xb6517e(0x16d)](_0x1155c5,_0x5825b4[_0xb6517e(0x158)]);}if(!_0x5d342c)_0x6322a=null;}const _0x102e2e=_0x5825b4[_0xb6517e(0x178)](readProfileOverrides,process[_0xb6517e(0x16b)](),_0x591a4a);let _0x464deb=null,_0x3fbf07,_0x30d1a8,_0x291c70,_0x481347,_0x2aaecb=null,_0x5c80db;const _0x5bec18=_0x5825b4['ozObz'](expandOverrides,_0x102e2e),_0x12b8be=readUrlEnvVars();if(_0x6322a){_0x464deb=_0x6322a;const _0x2290a4=_0x6322a[_0xb6517e(0x164)]??{},_0x2e30ff=mergeCloudProfileSettings(_0x2290a4,_0x5825b4['Lmwcw'](_0x102e2e,undefined)),_0x31cbde={..._0x6322a,'settings':_0x2e30ff};_0x2aaecb={'baseUrl':_0x5825b4['SkFxe'](expandString,_0x2290a4['baseUrl']),'startPath':expandString(_0x2290a4[_0xb6517e(0x172)])};const _0x177cc3=await _0x5825b4['Mejcv'](fetchAuthConfig),_0x45ce89=_0x177cc3?resolveAuthEnvironmentLocally(_0x177cc3,_0x6322a[_0xb6517e(0x181)]):null;_0x5c80db=_0x45ce89?.[_0xb6517e(0x161)]?.[0x0];const _0x4db832=resolveProfileUrl({'flagBaseUrl':_0x1a680e[_0xb6517e(0x166)],'flagStartPath':_0x1a680e[_0xb6517e(0x172)],'envBaseUrl':_0x12b8be[_0xb6517e(0x169)],'envStartPath':_0x12b8be[_0xb6517e(0x156)],'projectOverrides':_0x5bec18,'cloudSettings':_0x2aaecb,'authEnvironmentDomain':_0x5c80db}),_0x2e6c50=process['env'][_0xb6517e(0x174)];if(_0x2e6c50){if(!_0x5825b4[_0xb6517e(0x15e)](existsSync,_0x2e6c50))throw new Error(_0xb6517e(0x182)+_0x2e6c50+'\x20does\x20not\x20exist.');_0x3fbf07=_0x2e6c50,_0x30d1a8=_0x5825b4['QAQKe'](resolveEnvVars,_0x2e30ff),_0x291c70=_0x5825b4[_0xb6517e(0x190)](Boolean,_0x30d1a8['cdpEndpoint']);}else{const _0x37a7bd=await resolveCloudProfileSession(_0x31cbde,{'effectiveBaseUrl':_0x4db832['baseUrl'],'telemetry':_0x1a680e[_0xb6517e(0x184)]});_0x3fbf07=_0x37a7bd['authPath'],_0x30d1a8=_0x5825b4['ozObz'](resolveEnvVars,_0x37a7bd['settings']),_0x291c70=Boolean(_0x30d1a8[_0xb6517e(0x191)]),_0x5c80db=_0x37a7bd[_0xb6517e(0x17b)]?.[_0xb6517e(0x161)]?.[0x0];}}else{if(!_0x4b6251)throw new Error(_0xb6517e(0x173)+_0x591a4a+_0xb6517e(0x185)+_0x591a4a);const _0x3f3b3d=await _0x5825b4[_0xb6517e(0x15c)](loadSettings,_0x591a4a);_0x30d1a8=_0x5825b4[_0xb6517e(0x15b)](resolveEnvVars,_0x3f3b3d),_0x291c70=_0x5825b4[_0xb6517e(0x18c)](Boolean,_0x30d1a8[_0xb6517e(0x191)]),_0x481347=_0x30d1a8[_0xb6517e(0x166)];}const _0x10ae95=_0x5825b4['tUCiX'](resolveProfileUrl,{'flagBaseUrl':_0x1a680e[_0xb6517e(0x166)],'flagStartPath':_0x1a680e['startPath'],'envBaseUrl':_0x12b8be['envBaseUrl'],'envStartPath':_0x12b8be[_0xb6517e(0x156)],'localSettingsBaseUrl':_0x481347,'projectOverrides':_0x5bec18,'cloudSettings':_0x2aaecb,'authEnvironmentDomain':_0x5c80db}),_0x43e9fe=_0x10ae95[_0xb6517e(0x16f)]??_0x10ae95['baseUrl'];if(_0x5825b4['pYACp'](!_0x43e9fe,!_0x291c70))throw new Error(_0xb6517e(0x177)+_0x591a4a+_0xb6517e(0x17d)+_0x591a4a+'\x20baseUrl\x20<url>');return{'activeProfile':_0x591a4a,'resolvedCloudProfile':_0x464deb,'cloudAuthPath':_0x3fbf07,'resolvedSettings':_0x30d1a8,'isCdpMode':_0x291c70,'url':_0x43e9fe,'startPath':_0x10ae95[_0xb6517e(0x172)]};}function expandString(_0x7e45b2){const _0x52e923=_0x2807,_0x377aa7={'TYffA':function(_0x4a5216,_0x42914d){return _0x4a5216!==_0x42914d;},'VWfQU':function(_0x20a466,_0x43d804){return _0x20a466(_0x43d804);}};if(_0x377aa7[_0x52e923(0x15a)](typeof _0x7e45b2,'string'))return _0x7e45b2;return _0x377aa7['VWfQU'](resolveEnvVars,_0x7e45b2);}function _0x2807(_0x417bf3,_0x196b15){_0x417bf3=_0x417bf3-0x156;const _0x555ced=_0x555c();let _0x280765=_0x555ced[_0x417bf3];return _0x280765;}function expandOverrides(_0x3366b5){const _0x4dad38=_0x2807,_0x7e0f3={'uPfHe':function(_0x5a6b30,_0x27e14c){return _0x5a6b30===_0x27e14c;},'DISKK':_0x4dad38(0x171),'ngFtj':function(_0x3a8d68,_0x3a97ff){return _0x3a8d68(_0x3a97ff);}};if(!_0x3366b5)return _0x3366b5;const _0x292686={..._0x3366b5};return _0x7e0f3['uPfHe'](typeof _0x292686[_0x4dad38(0x166)],_0x4dad38(0x171))&&(_0x292686[_0x4dad38(0x166)]=resolveEnvVars(_0x292686['baseUrl'])),typeof _0x292686[_0x4dad38(0x172)]===_0x7e0f3[_0x4dad38(0x17f)]&&(_0x292686[_0x4dad38(0x172)]=_0x7e0f3[_0x4dad38(0x188)](resolveEnvVars,_0x292686['startPath'])),_0x292686;}
|
|
1
|
+
(function(_0x355d11,_0x137c1b){const _0x381fc8=_0x1edd,_0x57ea7f=_0x355d11();while(!![]){try{const _0x3ed199=-parseInt(_0x381fc8(0x1c8))/0x1*(parseInt(_0x381fc8(0x1a5))/0x2)+parseInt(_0x381fc8(0x187))/0x3*(parseInt(_0x381fc8(0x1bc))/0x4)+parseInt(_0x381fc8(0x1ac))/0x5*(parseInt(_0x381fc8(0x1c9))/0x6)+-parseInt(_0x381fc8(0x1c1))/0x7*(parseInt(_0x381fc8(0x1c3))/0x8)+parseInt(_0x381fc8(0x1ab))/0x9+-parseInt(_0x381fc8(0x18e))/0xa*(-parseInt(_0x381fc8(0x1ae))/0xb)+parseInt(_0x381fc8(0x1b2))/0xc*(-parseInt(_0x381fc8(0x1c6))/0xd);if(_0x3ed199===_0x137c1b)break;else _0x57ea7f['push'](_0x57ea7f['shift']());}catch(_0x3d4ad1){_0x57ea7f['push'](_0x57ea7f['shift']());}}}(_0x18e6,0xaa9bd));import{existsSync}from'fs';import _0x4621c5 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';function _0x1edd(_0x39d0e5,_0x36c00c){_0x39d0e5=_0x39d0e5-0x185;const _0x18e63c=_0x18e6();let _0x1edd59=_0x18e63c[_0x39d0e5];return _0x1edd59;}import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';function _0x18e6(){const _0x47baa0=['\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','DKsYQ','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','948otHomm','jxUyZ','ZtERG','baseUrl','lmQVj','658343wejeDD','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','8AclLDN','local','startPath','416uvlwSP','log','199311xLAfzv','1382124HFXmSC','Profile\x20\x22','profile','source','wkIZF','env','cwd','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','settings','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','11751iaLhay','\x20baseUrl\x20<url>','url','YiHBx','RIMBT','PAOTO','message','3673150nyqRHE','\x22.\x20Pass\x20--profile\x20','vHAVb','KUoVj','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','gSJLK','vajiZ','\x20\x20Note:\x20--env\x20\x22','authEnv','Active\x20profile\x20\x22','RANGER_SESSION_STATE_PATH','cdpEndpoint','name','Cloud\x20profile\x20(recommended)','CBWex','SLmWO','baseUrlSource','domains','environmentKey','thZUi','envBaseUrl','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','RANGER_TEST_USERNAME','10QiMnck','VbpTV','telemetry','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','soUmG','RANGER_SESSION_STATE_PATH=','11670165dnLket','25ZvUSuO','XLMOQ','33ajsMVj','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','GKNnW','WZHEr','1008492EuUcvd','qCbMz','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','XZsAG','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','string'];_0x18e6=function(){return _0x47baa0;};return _0x18e6();}import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x5271db){const _0x16a443=_0x1edd,_0x39e103={'SLmWO':function(_0x206025,_0x4ddedd){return _0x206025(_0x4ddedd);},'syYch':function(_0x1574b2,_0x47e86d){return _0x1574b2!==_0x47e86d;},'WZHEr':function(_0x563840,_0x4f53c2){return _0x563840(_0x4f53c2);},'lmQVj':function(_0x4e61b0,_0x3cc0ef){return _0x4e61b0===_0x3cc0ef;},'wkIZF':function(_0x4c0660,_0x473929){return _0x4c0660+_0x473929;},'vHAVb':'Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','kJcxL':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','YiHBx':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','jxUyZ':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','VbpTV':function(_0x2f9f2b,_0x3a560b){return _0x2f9f2b(_0x3a560b);},'nGzFO':function(_0x281d17,_0x37b03c){return _0x281d17 instanceof _0x37b03c;},'DrLjg':function(_0x595c5a,_0x142de5){return _0x595c5a&&_0x142de5;},'qCbMz':function(_0x1ce587,_0x1f671f){return _0x1ce587+_0x1f671f;},'GKNnW':function(_0x5822ef,_0x53496b){return _0x5822ef+_0x53496b;},'XZsAG':_0x16a443(0x186),'soUmG':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','vajiZ':function(_0x2d469a,_0x34a395){return _0x2d469a&&_0x34a395;},'OSRiU':'list','YxyqB':_0x16a443(0x19b),'RIMBT':'cloud','XLMOQ':'Local\x20profile','PAOTO':_0x16a443(0x1c4),'ArruZ':function(_0x51aa36,_0x1abe13){return _0x51aa36===_0x1abe13;},'DKsYQ':function(_0x4c7456){return _0x4c7456();},'CBWex':function(_0x4dc74d,_0x4ebb00,_0x412f7f){return _0x4dc74d(_0x4ebb00,_0x412f7f);},'mpLgY':function(_0x48e1e9,_0x1aa00f){return _0x48e1e9??_0x1aa00f;},'WXnTU':function(_0x14299a,_0x32c4d0){return _0x14299a+_0x32c4d0;},'gSJLK':function(_0x3ecdd4,_0x5bd3f1){return _0x3ecdd4+_0x5bd3f1;},'HJAJE':function(_0x386b5b,_0x4c1fe5){return _0x386b5b+_0x4c1fe5;},'KUoVj':function(_0x399637,_0x332bd6){return _0x399637(_0x332bd6);}},_0x13eaf0=_0x5271db[_0x16a443(0x1cb)];let _0x2540aa=_0x13eaf0,_0x1b28d1=null;const _0x216240=_0x13eaf0?null:await readActiveProfileName();if(_0x5271db['authEnv']&&_0x13eaf0)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x5271db['authEnv']+'\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.');else _0x5271db['authEnv']&&!process[_0x16a443(0x1ce)][_0x16a443(0x1a4)]&&console['log'](_0x16a443(0x195)+_0x5271db['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x13eaf0&&process['env'][_0x16a443(0x1a4)])try{const _0x573acb=await _0x39e103[_0x16a443(0x19d)](resolveAdHocProfile,{'targetUrl':_0x5271db['baseUrl']??readUrlEnvVars()['envBaseUrl'],'envKey':_0x5271db['authEnv']});_0x573acb&&(_0x216240&&_0x39e103['syYch'](_0x216240,_0x573acb[_0x16a443(0x19a)])&&console['log'](_0x16a443(0x1ba)+_0x573acb[_0x16a443(0x19a)]+_0x16a443(0x1a8)+_0x216240+_0x16a443(0x18f)+_0x216240+'\x20to\x20override.'),_0x2540aa=_0x573acb['name'],_0x1b28d1=_0x573acb['profile']);}catch(_0x108607){if(!_0x216240||_0x5271db[_0x16a443(0x196)])throw _0x108607;console[_0x16a443(0x1c7)]('\x20\x20Warning:\x20'+(_0x108607 instanceof Error?_0x108607[_0x16a443(0x18d)]:_0x39e103[_0x16a443(0x1b1)](String,_0x108607))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x216240+'\x22.');}if(!_0x2540aa)_0x2540aa=_0x216240??undefined;if(!_0x2540aa)try{const _0xdc15be=await listCloudProfiles();if(_0x39e103[_0x16a443(0x1c0)](_0xdc15be['length'],0x1)){const _0x18d33f=_0xdc15be[0x0];_0x2540aa=_0x18d33f[_0x16a443(0x19a)],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x18d33f[_0x16a443(0x19a)]),console['log'](_0x16a443(0x1c2));}}catch{}if(!_0x2540aa)throw new Error(_0x39e103['wkIZF'](_0x39e103[_0x16a443(0x1cd)](_0x39e103[_0x16a443(0x190)],_0x39e103['kJcxL']),_0x39e103[_0x16a443(0x18a)])+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'+_0x39e103[_0x16a443(0x1bd)]);const _0x5563d7=getEnvDir(_0x2540aa),_0x21a128=_0x39e103['SLmWO'](existsSync,_0x5563d7);let _0x45530c=_0x1b28d1,_0x55cd46=![];if(!_0x45530c)try{_0x45530c=await _0x39e103['VbpTV'](fetchCloudProfile,_0x2540aa);if(!_0x45530c)_0x55cd46=!![];}catch(_0x29b67a){_0x39e103['nGzFO'](_0x29b67a,ApiError)&&_0x29b67a['status']===0x194&&(_0x55cd46=!![]);}if(_0x39e103['DrLjg'](_0x13eaf0,_0x55cd46)&&!_0x21a128&&!_0x45530c)throw new Error(_0x39e103[_0x16a443(0x1b3)](_0x39e103[_0x16a443(0x1b0)]('Profile\x20\x22'+_0x13eaf0+_0x16a443(0x1b6),_0x39e103[_0x16a443(0x1b5)]),_0x39e103[_0x16a443(0x1a9)]));if(_0x39e103[_0x16a443(0x194)](_0x45530c,_0x21a128)){let _0x517e1d=!![];if(isInteractive()){const {source:_0x31b58c}=await _0x4621c5['prompt']([{'type':_0x39e103['OSRiU'],'name':_0x16a443(0x1cc),'message':_0x16a443(0x1ca)+_0x2540aa+_0x16a443(0x1bb),'choices':[{'name':_0x39e103['YxyqB'],'value':_0x39e103[_0x16a443(0x18b)]},{'name':_0x39e103[_0x16a443(0x1ad)],'value':_0x39e103[_0x16a443(0x18c)]}],'default':_0x39e103[_0x16a443(0x18b)]}]);_0x517e1d=_0x39e103['ArruZ'](_0x31b58c,_0x39e103['RIMBT']);}if(!_0x517e1d)_0x45530c=null;}const _0x213275=readProfileOverrides(process[_0x16a443(0x1cf)](),_0x2540aa);let _0x156a8b=null,_0x35d677,_0x5f00ff,_0x57317d,_0x2a4c12,_0x8653e0=null,_0x6959c1,_0x52d0bc;const _0x215788=expandOverrides(_0x213275),_0x467548=_0x39e103[_0x16a443(0x1b9)](readUrlEnvVars);if(_0x45530c){_0x156a8b=_0x45530c;const _0x81a94=_0x45530c['settings']??{},_0x3c3a16=_0x39e103['CBWex'](mergeCloudProfileSettings,_0x81a94,_0x39e103['mpLgY'](_0x213275,undefined)),_0x315379={..._0x45530c,'settings':_0x3c3a16};_0x8653e0={'baseUrl':_0x39e103['WZHEr'](expandString,_0x81a94[_0x16a443(0x1bf)]),'startPath':expandString(_0x81a94['startPath'])};const _0x18ba4b=await fetchAuthConfig(),_0x2e3e68=_0x18ba4b?resolveAuthEnvironmentLocally(_0x18ba4b,_0x45530c[_0x16a443(0x1a0)]):null;_0x6959c1=_0x2e3e68?.[_0x16a443(0x19f)]?.[0x0],_0x52d0bc=_0x2e3e68?.['key'];const _0x115016=resolveProfileUrl({'flagBaseUrl':_0x5271db[_0x16a443(0x1bf)],'flagStartPath':_0x5271db[_0x16a443(0x1c5)],'envBaseUrl':_0x467548[_0x16a443(0x1a2)],'envStartPath':_0x467548['envStartPath'],'projectOverrides':_0x215788,'cloudSettings':_0x8653e0,'authEnvironmentDomain':_0x6959c1}),_0x426eaf=process[_0x16a443(0x1ce)][_0x16a443(0x198)];if(_0x426eaf){if(!existsSync(_0x426eaf))throw new Error(_0x16a443(0x1aa)+_0x426eaf+'\x20does\x20not\x20exist.');_0x35d677=_0x426eaf,_0x5f00ff=resolveEnvVars(_0x3c3a16),_0x57317d=Boolean(_0x5f00ff[_0x16a443(0x199)]);}else{const _0x2e6b1c=await _0x39e103[_0x16a443(0x19c)](resolveCloudProfileSession,_0x315379,{'effectiveBaseUrl':_0x115016[_0x16a443(0x1bf)],'telemetry':_0x5271db[_0x16a443(0x1a7)]});_0x35d677=_0x2e6b1c['authPath'],_0x5f00ff=resolveEnvVars(_0x2e6b1c[_0x16a443(0x185)]),_0x57317d=Boolean(_0x5f00ff['cdpEndpoint']),_0x6959c1=_0x2e6b1c['resolvedEnv']?.[_0x16a443(0x19f)]?.[0x0],_0x52d0bc=_0x2e6b1c['resolvedEnv']?.['key'];}}else{if(!_0x21a128){const _0x1b9125=!_0x13eaf0;throw new Error(_0x1b9125?_0x39e103['WXnTU'](_0x39e103[_0x16a443(0x193)](_0x39e103['HJAJE'](_0x16a443(0x197)+_0x2540aa+_0x16a443(0x1b4),_0x16a443(0x192)),_0x16a443(0x1b8)),_0x16a443(0x1af)+_0x2540aa+'`\x20to\x20recreate\x20it.'):'Profile\x20\x22'+_0x2540aa+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x2540aa);}const _0x40efda=await loadSettings(_0x2540aa);_0x5f00ff=_0x39e103[_0x16a443(0x1a6)](resolveEnvVars,_0x40efda),_0x57317d=_0x39e103[_0x16a443(0x191)](Boolean,_0x5f00ff['cdpEndpoint']),_0x2a4c12=_0x5f00ff[_0x16a443(0x1bf)];}const _0x139ae6=_0x39e103['WZHEr'](resolveProfileUrl,{'flagBaseUrl':_0x5271db['baseUrl'],'flagStartPath':_0x5271db[_0x16a443(0x1c5)],'envBaseUrl':_0x467548['envBaseUrl'],'envStartPath':_0x467548['envStartPath'],'localSettingsBaseUrl':_0x2a4c12,'projectOverrides':_0x215788,'cloudSettings':_0x8653e0,'authEnvironmentDomain':_0x6959c1}),_0x24bbf0=_0x139ae6[_0x16a443(0x189)]??_0x139ae6['baseUrl'];if(_0x39e103['DrLjg'](!_0x24bbf0,!_0x57317d))throw new Error(_0x16a443(0x1d0)+_0x2540aa+_0x16a443(0x1a3)+_0x2540aa+_0x16a443(0x188));return{'activeProfile':_0x2540aa,'resolvedCloudProfile':_0x156a8b,'cloudAuthPath':_0x35d677,'resolvedSettings':_0x5f00ff,'isCdpMode':_0x57317d,'url':_0x24bbf0,'baseUrlSource':_0x139ae6[_0x16a443(0x19e)],'authEnvKey':_0x52d0bc,'startPath':_0x139ae6[_0x16a443(0x1c5)]};}function expandString(_0xe778aa){const _0x108c9f=_0x1edd;if(typeof _0xe778aa!==_0x108c9f(0x1b7))return _0xe778aa;return resolveEnvVars(_0xe778aa);}function expandOverrides(_0x510d95){const _0x3ef53f=_0x1edd,_0x33729f={'CAPxf':function(_0x44a3aa,_0x1a2559){return _0x44a3aa===_0x1a2559;},'fPuAE':_0x3ef53f(0x1b7),'thZUi':function(_0x1c226a,_0x186664){return _0x1c226a(_0x186664);},'ZtERG':function(_0x2ad463,_0x1f5eb2){return _0x2ad463(_0x1f5eb2);}};if(!_0x510d95)return _0x510d95;const _0x55a554={..._0x510d95};return _0x33729f['CAPxf'](typeof _0x55a554['baseUrl'],_0x33729f['fPuAE'])&&(_0x55a554['baseUrl']=_0x33729f[_0x3ef53f(0x1a1)](resolveEnvVars,_0x55a554['baseUrl'])),_0x33729f['CAPxf'](typeof _0x55a554[_0x3ef53f(0x1c5)],_0x3ef53f(0x1b7))&&(_0x55a554['startPath']=_0x33729f[_0x3ef53f(0x1be)](resolveEnvVars,_0x55a554[_0x3ef53f(0x1c5)])),_0x55a554;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x92bb97,_0x19193f){const _0x2a133a=_0x5f3f,_0x3a777b=_0x92bb97();while(!![]){try{const _0x3b2694=parseInt(_0x2a133a(0x157))/0x1*(parseInt(_0x2a133a(0x156))/0x2)+parseInt(_0x2a133a(0x14f))/0x3+parseInt(_0x2a133a(0x151))/0x4*(parseInt(_0x2a133a(0x14c))/0x5)+parseInt(_0x2a133a(0x142))/0x6+parseInt(_0x2a133a(0x14e))/0x7+parseInt(_0x2a133a(0x148))/0x8+parseInt(_0x2a133a(0x154))/0x9*(-parseInt(_0x2a133a(0x145))/0xa);if(_0x3b2694===_0x19193f)break;else _0x3a777b['push'](_0x3a777b['shift']());}catch(_0x2d408c){_0x3a777b['push'](_0x3a777b['shift']());}}}(_0x2778,0x8160a));function firstDefined(..._0x1375cc){const _0x43c3ae={'SNRCt':function(_0x6174aa,_0x19d10f){return _0x6174aa!==_0x19d10f;}};for(const _0x459993 of _0x1375cc){if(_0x43c3ae['SNRCt'](_0x459993,undefined)&&_0x459993!==null&&_0x459993!=='')return _0x459993;}return undefined;}function normalizeAuthEnvironmentDomain(_0x314abc){const _0x4ddcaf=_0x5f3f;if(!_0x314abc)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x4ddcaf(0x158)](_0x314abc))return _0x314abc;return _0x4ddcaf(0x146)+_0x314abc;}function _0x5f3f(_0x38c405,_0x50b3e4){_0x38c405=_0x38c405-0x140;const _0x277840=_0x2778();let _0x5f3fa3=_0x277840[_0x38c405];return _0x5f3fa3;}function _0x2778(){const _0x4bc005=['ydmen','startsWith','startPath','106962tJIGdL','baseUrl','RANGER_START_PATH','22465010GCWkBa','https://','projectOverrides','3269464STakqK','envBaseUrl','auth\x20environment\x20domain','sbPWr','2292980AjOCvC','flagStartPath','6971888zpyPOn','1320771NQGOvG','localSettingsBaseUrl','4zhhogJ','cloudSettings','RANGER_BASE_URL','9DPnbtI','foNHH','227542OXFYwH','4waxpmA','test','string'];_0x2778=function(){return _0x4bc005;};return _0x2778();}export function resolveBaseUrlWithSource(_0x29dc15){const _0x2755fb=_0x5f3f,_0x4881db={'qxQDM':function(_0xbfc21f,_0x19af24){return _0xbfc21f===_0x19af24;},'PjbqQ':function(_0x4e6473,_0x51d8f1){return _0x4e6473!==_0x51d8f1;},'PjHMW':function(_0x567ca8,_0x39ddd1){return _0x567ca8!==_0x39ddd1;}},_0x314aaa=_0x29dc15[_0x2755fb(0x147)],_0x459586=!!_0x314aaa&&_0x2755fb(0x143)in _0x314aaa,_0x70dde7=_0x314aaa?.[_0x2755fb(0x143)],_0x3c6b76=!(_0x459586&&_0x70dde7===null),_0x13f4a4=[[_0x29dc15['flagBaseUrl'],'--base-url'],[_0x29dc15[_0x2755fb(0x149)],_0x2755fb(0x153)],[_0x29dc15[_0x2755fb(0x150)],'local\x20profile\x20settings'],[_0x4881db['qxQDM'](typeof _0x70dde7,'string')?_0x70dde7:undefined,'projects.json\x20override'],[_0x3c6b76?_0x29dc15['cloudSettings']?.['baseUrl']:undefined,'cloud\x20profile\x20settings'],[_0x3c6b76?normalizeAuthEnvironmentDomain(_0x29dc15['authEnvironmentDomain']):undefined,_0x2755fb(0x14a)]];for(const [_0x489052,_0x4fe806]of _0x13f4a4){if(_0x4881db['PjbqQ'](_0x489052,undefined)&&_0x4881db['PjHMW'](_0x489052,null)&&_0x489052!=='')return{'baseUrl':_0x489052,'source':_0x4fe806};}return{};}export function resolveBaseUrl(_0xa733b2){return resolveBaseUrlWithSource(_0xa733b2)['baseUrl'];}export function resolveStartPath(_0x212962){const _0x55b6db=_0x5f3f,_0x269e23={'foNHH':_0x55b6db(0x141),'sbPWr':function(_0x1286de,_0x4fb248){return _0x1286de===_0x4fb248;}},_0x6eb4a0=_0x212962['projectOverrides'],_0x35f679=!!_0x6eb4a0&&_0x269e23[_0x55b6db(0x155)]in _0x6eb4a0,_0x43290b=_0x6eb4a0?.['startPath'],_0x121761=!(_0x35f679&&_0x43290b===null);return firstDefined(_0x212962[_0x55b6db(0x14d)],_0x212962['envStartPath'],_0x269e23[_0x55b6db(0x14b)](typeof _0x43290b,_0x55b6db(0x159))?_0x43290b:undefined,_0x121761?_0x212962[_0x55b6db(0x152)]?.[_0x55b6db(0x141)]:undefined);}export function joinBaseAndPath(_0x5526f9,_0x28672f){const _0x4b6294=_0x5f3f,_0x48f402={'ydmen':function(_0xaeb39,_0x56a95c){return _0xaeb39+_0x56a95c;}};if(!_0x5526f9)return undefined;if(!_0x28672f)return _0x5526f9;const _0x51284d=_0x5526f9['endsWith']('/')?_0x5526f9['slice'](0x0,-0x1):_0x5526f9,_0x52bb1e=_0x28672f[_0x4b6294(0x140)]('/')?_0x28672f:_0x48f402[_0x4b6294(0x15a)]('/',_0x28672f);return _0x51284d+_0x52bb1e;}export function resolveProfileUrl(_0x436f02){const _0x40128f={'cFfsQ':function(_0x3dad4d,_0x170ac1){return _0x3dad4d(_0x170ac1);}},{baseUrl:_0x3db4b5,source:_0x38572f}=_0x40128f['cFfsQ'](resolveBaseUrlWithSource,_0x436f02),_0x115f88=_0x40128f['cFfsQ'](resolveStartPath,_0x436f02);return{'baseUrl':_0x3db4b5,'baseUrlSource':_0x38572f,'startPath':_0x115f88,'url':joinBaseAndPath(_0x3db4b5,_0x115f88)};}export function readUrlEnvVars(_0x30b55f=process['env']){const _0x327b2c=_0x5f3f;return{'envBaseUrl':_0x30b55f[_0x327b2c(0x153)],'envStartPath':_0x30b55f[_0x327b2c(0x144)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x46d2(){const _0x58203e=['1492968FAnQar','24JVDYnN','6875580LxfKYF','InIMq','2888972YLJSaY','5UoTgzn','886046Towvvx','9pxSBbG','3281034OmKdHu','1966707mHfhGn','33522YeEbYE'];_0x46d2=function(){return _0x58203e;};return _0x46d2();}function _0x1052(_0x2b5ce8,_0x40fd4f){_0x2b5ce8=_0x2b5ce8-0x1b8;const _0x46d2ff=_0x46d2();let _0x1052de=_0x46d2ff[_0x2b5ce8];return _0x1052de;}(function(_0x289f37,_0xb6cfd5){const _0xe78614=_0x1052,_0x15dfe7=_0x289f37();while(!![]){try{const _0x3cb474=parseInt(_0xe78614(0x1ba))/0x1*(-parseInt(_0xe78614(0x1bd))/0x2)+parseInt(_0xe78614(0x1be))/0x3+parseInt(_0xe78614(0x1c2))/0x4*(parseInt(_0xe78614(0x1b8))/0x5)+-parseInt(_0xe78614(0x1bb))/0x6+-parseInt(_0xe78614(0x1b9))/0x7+parseInt(_0xe78614(0x1bf))/0x8*(-parseInt(_0xe78614(0x1bc))/0x9)+parseInt(_0xe78614(0x1c0))/0xa;if(_0x3cb474===_0xb6cfd5)break;else _0x15dfe7['push'](_0x15dfe7['shift']());}catch(_0x10f81d){_0x15dfe7['push'](_0x15dfe7['shift']());}}}(_0x46d2,0x68666));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x2520e4,_0x440244){const _0x262f0c=_0x1052,_0x5e9258={'ZOKoA':function(_0x2eacd3,_0x5ae84a){return _0x2eacd3 instanceof _0x5ae84a;},'aZDzo':function(_0x25f54f,_0x269670){return _0x25f54f(_0x269670);},'wUbGd':function(_0xc90bd8,_0x1e2580){return _0xc90bd8<_0x1e2580;},'InIMq':function(_0x5f1d9a,_0x31e2fd){return _0x5f1d9a*_0x31e2fd;}},_0xf2306=_0x440244?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x4d397c=_0x440244?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x4ec5b2;for(let _0x4473ca=0x0;_0x4473ca<=_0xf2306;_0x4473ca++){try{return await _0x2520e4();}catch(_0x53da25){_0x4ec5b2=_0x5e9258['ZOKoA'](_0x53da25,Error)?_0x53da25:new Error(_0x5e9258['aZDzo'](String,_0x53da25));if(_0x5e9258['wUbGd'](_0x4473ca,_0xf2306)){const _0x218644=_0x5e9258[_0x262f0c(0x1c1)](_0x4d397c,Math['pow'](0x2,_0x4473ca));_0x440244?.['label']&&console['error'](_0x440244['label']+'\x20failed\x20(attempt\x20'+(_0x4473ca+0x1)+'/'+(_0xf2306+0x1)+'),\x20retrying\x20in\x20'+_0x218644+'ms...'),await new Promise(_0x362e7f=>setTimeout(_0x362e7f,_0x218644));}}}throw _0x4ec5b2;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x21e669,_0x28a16d){const _0x17ea54=_0x5174,_0x249114=_0x21e669();while(!![]){try{const _0x54d62d=-parseInt(_0x17ea54(0x8c))/0x1+parseInt(_0x17ea54(0x85))/0x2+parseInt(_0x17ea54(0x8a))/0x3*(parseInt(_0x17ea54(0x81))/0x4)+-parseInt(_0x17ea54(0x8b))/0x5+-parseInt(_0x17ea54(0x83))/0x6+-parseInt(_0x17ea54(0x88))/0x7+parseInt(_0x17ea54(0x89))/0x8*(parseInt(_0x17ea54(0x87))/0x9);if(_0x54d62d===_0x28a16d)break;else _0x249114['push'](_0x249114['shift']());}catch(_0xa2bb08){_0x249114['push'](_0x249114['shift']());}}}(_0x349f,0xf00fb));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;function _0x5174(_0x53913d,_0x4de665){_0x53913d=_0x53913d-0x81;const _0x349f73=_0x349f();let _0x5174ee=_0x349f73[_0x53913d];return _0x5174ee;}export function extractUrlOrigins(_0x3cc628){const _0x3631ae=_0x5174,_0xb1f849=new Set();for(const _0x512eb0 of _0x3cc628[_0x3631ae(0x82)](ABSOLUTE_URL_PATTERN)){const _0x4f055b=_0x512eb0[0x0][_0x3631ae(0x84)](/[.,;:!?]+$/,'');try{_0xb1f849['add'](new URL(_0x4f055b)['origin']);}catch{}}return[..._0xb1f849];}export function findScenarioOriginMismatches(_0x4232f8,_0x3e94b2){const _0x559f79=_0x5174,_0x1f666b={'pjfNd':function(_0x3bc272,_0x6a7b08){return _0x3bc272(_0x6a7b08);}};let _0x208740;try{_0x208740=new URL(_0x3e94b2)['origin'];}catch{return[];}return _0x1f666b[_0x559f79(0x86)](extractUrlOrigins,_0x4232f8)['filter'](_0xbd233b=>_0xbd233b!==_0x208740);}function _0x349f(){const _0x595659=['8586240dQtBsE','replace','2951892acuLOJ','pjfNd','1053DGYLtt','12313616TpTHQz','297576YXnOFu','1987179NeowTc','6068860BWSsfI','1765590Msvoug','8jFbdNY','matchAll'];_0x349f=function(){return _0x595659;};return _0x349f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3a4e38=_0x3f2d;(function(_0x2f1ab3,_0x5866c1){const _0x290a1a=_0x3f2d,_0x1f43ee=_0x2f1ab3();while(!![]){try{const _0x3df6e7=parseInt(_0x290a1a(0x14f))/0x1*(-parseInt(_0x290a1a(0x13e))/0x2)+-parseInt(_0x290a1a(0x13f))/0x3*(parseInt(_0x290a1a(0x149))/0x4)+parseInt(_0x290a1a(0x141))/0x5*(parseInt(_0x290a1a(0x14c))/0x6)+-parseInt(_0x290a1a(0x14d))/0x7*(parseInt(_0x290a1a(0x138))/0x8)+-parseInt(_0x290a1a(0x133))/0x9+-parseInt(_0x290a1a(0x153))/0xa*(-parseInt(_0x290a1a(0x12c))/0xb)+parseInt(_0x290a1a(0x12e))/0xc;if(_0x3df6e7===_0x5866c1)break;else _0x1f43ee['push'](_0x1f43ee['shift']());}catch(_0x4419ac){_0x1f43ee['push'](_0x1f43ee['shift']());}}}(_0x2566,0x690d0));import*as _0x461a86 from'fs';import*as _0x157448 from'path';import*as _0x12fd9c from'os';import{execSync}from'child_process';const CACHE_FILE=_0x157448['join'](_0x12fd9c[_0x3a4e38(0x13d)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0xaea1e3=_0x3a4e38;try{if(_0x461a86['existsSync'](CACHE_FILE)){const _0x2f630e=JSON[_0xaea1e3(0x135)](_0x461a86[_0xaea1e3(0x144)](CACHE_FILE,_0xaea1e3(0x147)));return{'version':0x3,'sessions':_0x2f630e[_0xaea1e3(0x146)]||{},'branches':_0x2f630e['branches']||{},'lastEnabledSessionClearedAt':_0x2f630e[_0xaea1e3(0x131)]};}}catch{}return createEmptyCache();}function saveCache(_0x293d03){const _0x4b8ff8=_0x3a4e38;try{const _0x9cdb5=_0x157448['dirname'](CACHE_FILE);!_0x461a86['existsSync'](_0x9cdb5)&&_0x461a86[_0x4b8ff8(0x12b)](_0x9cdb5,{'recursive':!![]}),_0x461a86['writeFileSync'](CACHE_FILE,JSON['stringify'](_0x293d03,null,0x2));}catch{}}export function getCurrentBranch(){const _0x51b82e=_0x3a4e38,_0x3e72bd={'ddukj':_0x51b82e(0x15a),'lKDJD':'utf-8','SKahH':'pipe','DVlAC':'HEAD'};try{const _0x7390f1=execSync(_0x3e72bd[_0x51b82e(0x150)],{'encoding':_0x3e72bd[_0x51b82e(0x12a)],'stdio':[_0x3e72bd['SKahH'],_0x51b82e(0x12f),_0x51b82e(0x12f)]})['trim']();if(!_0x7390f1||_0x7390f1===_0x3e72bd[_0x51b82e(0x13c)])return null;return _0x7390f1;}catch{return null;}}export function enableBranch(_0x55afd8){const _0x2ce847=_0x3a4e38,_0x3b357f={'ueQGV':function(_0x4ccbff){return _0x4ccbff();},'MCqyC':function(_0x1cb7dc,_0x1d47a7){return _0x1cb7dc(_0x1d47a7);}},_0x3f9e2f=_0x3b357f[_0x2ce847(0x134)](loadCache);_0x3f9e2f['branches'][_0x55afd8]=!![],_0x3b357f[_0x2ce847(0x13b)](saveCache,_0x3f9e2f);}function _0x2566(){const _0x30788b=['311526QaTEzH','ueQGV','parse','vTphO','CBJhk','64LfvrQv','uZlFK','main','MCqyC','DVlAC','homedir','2mTdtpD','6VEhDbQ','ikMho','5075kxbyEu','enabled','uCtMZ','readFileSync','UhbuO','sessions','utf-8','MeJgV','920784pZLzCu','branches','featureId','1014srtUhy','487438GOyvVw','TODHM','705981SPeBOD','ddukj','BLjeJ','YgGao','7220PDyXzc','now','pSuNu','currentBranch','prompted','YCLpU','HYJhg','git\x20rev-parse\x20--abbrev-ref\x20HEAD','master','mWnPS','nzuYv','lKDJD','mkdirSync','6941YkFBME','clear','18734760QfrxBY','pipe','registeredAt','lastEnabledSessionClearedAt','RGfYk'];_0x2566=function(){return _0x30788b;};return _0x2566();}export function disableBranch(_0x32a388){const _0x56efc8=loadCache();delete _0x56efc8['branches'][_0x32a388],saveCache(_0x56efc8);}export function isBranchEnabled(_0x28dbdb){const _0x11adcf=_0x3a4e38,_0x21752a=loadCache();return _0x21752a[_0x11adcf(0x14a)][_0x28dbdb]===!![];}function getOrCreateSession(_0x10e328,_0x5d0ad9){const _0x30d7e4=_0x3a4e38;return!_0x10e328['sessions'][_0x5d0ad9]&&(_0x10e328['sessions'][_0x5d0ad9]={}),_0x10e328[_0x30d7e4(0x146)][_0x5d0ad9];}export function enableSession(_0x38986c){const _0x376e1=_0x3a4e38,_0x1933a0={'ikMho':function(_0x5393d8){return _0x5393d8();},'MeJgV':function(_0x2f6413,_0x502384,_0x43d9dc){return _0x2f6413(_0x502384,_0x43d9dc);},'zenhG':function(_0x54f26f,_0x4e9536){return _0x54f26f!==_0x4e9536;}},_0xdc32f5=_0x1933a0[_0x376e1(0x140)](loadCache),_0x4d19cc=_0x1933a0[_0x376e1(0x148)](getOrCreateSession,_0xdc32f5,_0x38986c);_0x4d19cc[_0x376e1(0x142)]=!![];const _0x1224e5=getCurrentBranch();_0x1224e5&&_0x1224e5!==_0x376e1(0x13a)&&_0x1933a0['zenhG'](_0x1224e5,'master')&&(_0xdc32f5['branches'][_0x1224e5]=!![],_0x4d19cc[_0x376e1(0x156)]=_0x1224e5),saveCache(_0xdc32f5);}export function isSessionEnabled(_0x3fa135){const _0x167341=_0x3a4e38,_0x2aab08={'BLjeJ':function(_0xf339f0){return _0xf339f0();},'UhbuO':function(_0x5a1cd3,_0x1f7c4b){return _0x5a1cd3===_0x1f7c4b;},'JBUrK':'main','IVEAX':function(_0x201eee,_0x4a7e8e){return _0x201eee===_0x4a7e8e;}},_0x1faa7d=_0x2aab08['BLjeJ'](loadCache),_0x1469d9=_0x2aab08[_0x167341(0x151)](getCurrentBranch);if(!_0x1469d9||_0x2aab08[_0x167341(0x145)](_0x1469d9,_0x2aab08['JBUrK'])||_0x1469d9===_0x167341(0x15b))return _0x1faa7d[_0x167341(0x146)][_0x3fa135]?.[_0x167341(0x142)]===!![];const _0x731f3a=_0x2aab08['IVEAX'](_0x1faa7d['branches'][_0x1469d9],!![]),_0x4a8dc8=_0x2aab08['IVEAX'](_0x1faa7d['sessions'][_0x3fa135]?.['enabled'],!![]);return _0x731f3a||_0x4a8dc8;}export function disableSession(_0x37186a){const _0x56fa59=_0x3a4e38,_0x422a2b={'uCtMZ':function(_0xe2790){return _0xe2790();},'fFUea':function(_0x59bc0c,_0x452322,_0x420d2b){return _0x59bc0c(_0x452322,_0x420d2b);},'DTFEn':function(_0x1225dc,_0x28954e){return _0x1225dc(_0x28954e);}},_0x18403c=_0x422a2b[_0x56fa59(0x143)](loadCache),_0x15391f=_0x422a2b['fFUea'](getOrCreateSession,_0x18403c,_0x37186a);_0x15391f[_0x56fa59(0x142)]=![],_0x422a2b['DTFEn'](saveCache,_0x18403c);}export function updateBranchTracking(_0x57b41f){const _0x1b71d7=_0x3a4e38,_0x4e051d={'NGfke':'main','HMgmt':function(_0x4f0286,_0x160f2f){return _0x4f0286!==_0x160f2f;}},_0x198106=loadCache(),_0x3dc4de=_0x198106[_0x1b71d7(0x146)][_0x57b41f];if(!_0x3dc4de?.[_0x1b71d7(0x142)])return;const _0x5e07d1=getCurrentBranch();if(!_0x5e07d1||_0x5e07d1===_0x4e051d['NGfke']||_0x5e07d1===_0x1b71d7(0x15b))return;_0x4e051d['HMgmt'](_0x3dc4de[_0x1b71d7(0x156)],_0x5e07d1)&&(_0x198106[_0x1b71d7(0x14a)][_0x5e07d1]=!![],_0x3dc4de[_0x1b71d7(0x156)]=_0x5e07d1,saveCache(_0x198106));}export function initBranchTracking(_0x424a54){const _0x110141=_0x3a4e38,_0x1d6e6c={'kPSJX':function(_0x339850){return _0x339850();},'yhfPe':'main','nzuYv':_0x110141(0x15b)},_0x3162e9=loadCache(),_0x28b693=_0x1d6e6c['kPSJX'](getCurrentBranch);if(!_0x28b693||_0x28b693===_0x1d6e6c['yhfPe']||_0x28b693===_0x1d6e6c[_0x110141(0x15d)])return;if(_0x3162e9['branches'][_0x28b693]===!![]){const _0x141abd=getOrCreateSession(_0x3162e9,_0x424a54);_0x141abd['enabled']=!![],_0x141abd['currentBranch']=_0x28b693,saveCache(_0x3162e9);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x382f2e){const _0x5b3342=_0x3a4e38,_0x3d9780={'kZupG':function(_0x5b8baf){return _0x5b8baf();}},_0x3479c4=_0x3d9780['kZupG'](loadCache),_0x33d346=_0x3479c4['sessions'][_0x382f2e];_0x33d346?.['enabled']&&(_0x3479c4[_0x5b3342(0x131)]=Date['now'](),saveCache(_0x3479c4));}export function shouldAutoEnableAfterClear(_0x2214f1){const _0x126326=_0x3a4e38,_0x56c83e={'wwOHb':function(_0x2a3381,_0x31ed33){return _0x2a3381!==_0x31ed33;},'HYJhg':_0x126326(0x12d),'vTphO':function(_0x3f7371,_0x15e2b9){return _0x3f7371-_0x15e2b9;}};if(_0x56c83e['wwOHb'](_0x2214f1,_0x56c83e[_0x126326(0x159)]))return![];const _0x3bb095=loadCache(),_0x2bcbe8=_0x3bb095['lastEnabledSessionClearedAt'];if(!_0x2bcbe8)return![];const _0x1631a1=_0x56c83e[_0x126326(0x136)](Date['now'](),_0x2bcbe8);return _0x1631a1<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0xb3252a){const _0x46b80e=_0x3a4e38,_0x3c68ec={'DBxqn':function(_0x8e06f4){return _0x8e06f4();},'pSuNu':'main','uqTSN':function(_0x2445b6,_0x9f5256){return _0x2445b6(_0x9f5256);}},_0x575fe4=_0x3c68ec['DBxqn'](loadCache),_0x174143=getOrCreateSession(_0x575fe4,_0xb3252a);_0x174143[_0x46b80e(0x142)]=!![];const _0x21d1dd=getCurrentBranch();_0x21d1dd&&_0x21d1dd!==_0x3c68ec[_0x46b80e(0x155)]&&_0x21d1dd!==_0x46b80e(0x15b)&&(_0x174143[_0x46b80e(0x156)]=_0x21d1dd),delete _0x575fe4[_0x46b80e(0x131)],_0x3c68ec['uqTSN'](saveCache,_0x575fe4);}export function registerSession(_0x16b18e,_0x53c035){const _0x476dce=_0x3a4e38,_0x49c6dd={'mWnPS':function(_0xb9e60f){return _0xb9e60f();},'YCLpU':function(_0x56608b,_0x573669,_0x3ab9d4){return _0x56608b(_0x573669,_0x3ab9d4);},'uZlFK':function(_0x244e5a,_0x447283){return _0x244e5a(_0x447283);}},_0x405a72=_0x49c6dd[_0x476dce(0x15c)](loadCache),_0x130350=_0x49c6dd[_0x476dce(0x158)](getOrCreateSession,_0x405a72,_0x16b18e);_0x130350['featureId']=_0x53c035,_0x130350[_0x476dce(0x130)]=new Date()['toISOString'](),_0x49c6dd[_0x476dce(0x139)](saveCache,_0x405a72);}export function getSessionEntry(_0x4588a6){const _0x288698=_0x3a4e38,_0x19c6d5={'CBJhk':function(_0x282003){return _0x282003();}},_0x2ad9f8=_0x19c6d5[_0x288698(0x137)](loadCache),_0x213c75=_0x2ad9f8['sessions'][_0x4588a6];if(_0x213c75?.[_0x288698(0x14b)]&&_0x213c75?.[_0x288698(0x130)])return{'featureId':_0x213c75['featureId'],'registeredAt':_0x213c75['registeredAt']};return null;}export function unregisterSession(_0xf459e){const _0x25efdb=_0x3a4e38,_0x3ef9c1={'NUtbk':function(_0x2ba878){return _0x2ba878();},'TODHM':function(_0x22e969,_0x1373aa){return _0x22e969(_0x1373aa);}},_0x1a134d=_0x3ef9c1['NUtbk'](loadCache),_0x10d8f8=_0x1a134d[_0x25efdb(0x146)][_0xf459e];_0x10d8f8&&(delete _0x10d8f8[_0x25efdb(0x14b)],delete _0x10d8f8[_0x25efdb(0x130)],_0x3ef9c1[_0x25efdb(0x14e)](saveCache,_0x1a134d));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;function _0x3f2d(_0x2bab08,_0x3f14d3){_0x2bab08=_0x2bab08-0x12a;const _0x256659=_0x2566();let _0x3f2d69=_0x256659[_0x2bab08];return _0x3f2d69;}export function shouldShowPlanReminder(_0x409215){const _0xb782ab=_0x3a4e38,_0x1f037a={'RGfYk':function(_0x3c922f,_0x431f6a,_0x43e0a4){return _0x3c922f(_0x431f6a,_0x43e0a4);}},_0x2da467=loadCache(),_0x3f73d9=_0x1f037a[_0xb782ab(0x132)](getOrCreateSession,_0x2da467,_0x409215),_0x40c2e8=_0x3f73d9['lastPlanReminderAt']||0x0,_0x39e1df=Date[_0xb782ab(0x154)]();if(_0x39e1df-_0x40c2e8>=PLAN_REMINDER_INTERVAL_MS)return _0x3f73d9['lastPlanReminderAt']=_0x39e1df,saveCache(_0x2da467),!![];return![];}export function shouldShowStopReminder(_0x4e8a7a){const _0x1a49e3=_0x3a4e38,_0x434a78={'ggsEW':function(_0xf298c2,_0x339a6d){return _0xf298c2>=_0x339a6d;},'xdpmF':function(_0x2cd290,_0x1d675e){return _0x2cd290-_0x1d675e;}},_0x4b649e=loadCache(),_0x33d7fc=getOrCreateSession(_0x4b649e,_0x4e8a7a),_0x562e8a=_0x33d7fc['lastStopReminderAt']||0x0,_0x35203c=Date[_0x1a49e3(0x154)]();if(_0x434a78['ggsEW'](_0x434a78['xdpmF'](_0x35203c,_0x562e8a),STOP_REMINDER_INTERVAL_MS))return _0x33d7fc['lastStopReminderAt']=_0x35203c,saveCache(_0x4b649e),!![];return![];}export function hasSessionBeenPrompted(_0x45d12c){const _0x51aff7=_0x3a4e38,_0x5ee25f={'cRQjT':function(_0x52cf3f){return _0x52cf3f();},'YgGao':function(_0x3d6a23,_0x5e3330){return _0x3d6a23===_0x5e3330;}},_0x88da8c=_0x5ee25f['cRQjT'](loadCache);return _0x5ee25f[_0x51aff7(0x152)](_0x88da8c['sessions'][_0x45d12c]?.[_0x51aff7(0x157)],!![]);}export function markSessionPrompted(_0x41fe75){const _0x4c0da0={'BaIuO':function(_0x41869c,_0x52c097){return _0x41869c(_0x52c097);}},_0x97b0c8=loadCache(),_0x585da8=getOrCreateSession(_0x97b0c8,_0x41fe75);_0x585da8['prompted']=!![],_0x4c0da0['BaIuO'](saveCache,_0x97b0c8);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x4a0eb1=_0x59d8;(function(_0x22ba60,_0x30563f){const _0x3905ff=_0x59d8,_0x271818=_0x22ba60();while(!![]){try{const _0x3a5357=parseInt(_0x3905ff(0xd3))/0x1+parseInt(_0x3905ff(0xbd))/0x2*(-parseInt(_0x3905ff(0xe0))/0x3)+-parseInt(_0x3905ff(0xd5))/0x4*(parseInt(_0x3905ff(0xdd))/0x5)+-parseInt(_0x3905ff(0xc9))/0x6+parseInt(_0x3905ff(0xd7))/0x7*(-parseInt(_0x3905ff(0xc0))/0x8)+parseInt(_0x3905ff(0xe1))/0x9+parseInt(_0x3905ff(0xda))/0xa*(parseInt(_0x3905ff(0xbf))/0xb);if(_0x3a5357===_0x30563f)break;else _0x271818['push'](_0x271818['shift']());}catch(_0x3a5cdc){_0x271818['push'](_0x271818['shift']());}}}(_0x6f9b,0xe848b));import*as _0x37d86c from'fs';import*as _0x24e9b6 from'path';import*as _0x1bd21b from'os';import{execSync}from'child_process';const CACHE_FILE=_0x24e9b6['join'](_0x1bd21b['homedir'](),'.claude',_0x4a0eb1(0xcf));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x210f2b=_0x4a0eb1,_0x28177d={'CKpDP':_0x210f2b(0xe2),'piBvJ':function(_0x1596f4){return _0x1596f4();}};try{if(_0x37d86c[_0x210f2b(0xc5)](CACHE_FILE)){const _0x230b27=JSON[_0x210f2b(0xd2)](_0x37d86c[_0x210f2b(0xbc)](CACHE_FILE,_0x28177d['CKpDP']));return{'version':0x3,'sessions':_0x230b27['sessions']||{},'branches':_0x230b27['branches']||{},'lastEnabledSessionClearedAt':_0x230b27[_0x210f2b(0xce)]};}}catch{}return _0x28177d[_0x210f2b(0xe7)](createEmptyCache);}function saveCache(_0x2e1b9b){const _0x3a0d57=_0x4a0eb1;try{const _0x501d69=_0x24e9b6[_0x3a0d57(0xba)](CACHE_FILE);!_0x37d86c[_0x3a0d57(0xc5)](_0x501d69)&&_0x37d86c['mkdirSync'](_0x501d69,{'recursive':!![]}),_0x37d86c[_0x3a0d57(0xdb)](CACHE_FILE,JSON['stringify'](_0x2e1b9b,null,0x2));}catch{}}export function getCurrentBranch(){const _0x36ce5c=_0x4a0eb1,_0x464688={'Zmpjx':'utf-8','VTXNc':_0x36ce5c(0xd1),'odiPD':function(_0x1d1658,_0x5f59a0){return _0x1d1658===_0x5f59a0;}};try{const _0x4ed910=execSync(_0x36ce5c(0xef),{'encoding':_0x464688[_0x36ce5c(0xe6)],'stdio':[_0x464688[_0x36ce5c(0xd4)],_0x464688['VTXNc'],_0x464688['VTXNc']]})['trim']();if(!_0x4ed910||_0x464688[_0x36ce5c(0xd6)](_0x4ed910,_0x36ce5c(0xdc)))return null;return _0x4ed910;}catch{return null;}}export function enableBranch(_0x40399f){const _0x39d88c={'ekdAp':function(_0x1e99a0){return _0x1e99a0();},'VETBe':function(_0x54d697,_0xf6f7c7){return _0x54d697(_0xf6f7c7);}},_0x17d448=_0x39d88c['ekdAp'](loadCache);_0x17d448['branches'][_0x40399f]=!![],_0x39d88c['VETBe'](saveCache,_0x17d448);}function _0x6f9b(){const _0x31027a=['vhjQA','pipe','parse','1253508AeNmhw','VTXNc','12YAByLJ','odiPD','35PTbWtO','TNVLS','flrBV','85350qUTWaP','writeFileSync','HEAD','1207060ijzqfv','LFhMA','zerPN','6uZFpCv','1036422AhTIWX','utf-8','branches','DIqeS','oQViH','Zmpjx','piBvJ','featureId','SSWFP','dPwSA','master','HviBS','hddza','ULxBA','git\x20rev-parse\x20--abbrev-ref\x20HEAD','main','VXWUD','registeredAt','dirname','sessions','readFileSync','928022YkISkm','ymrLD','3641ZiHFky','1931928ASRnAb','DbyJo','qRTeH','cWUaC','wHcvO','existsSync','bXKHH','enabled','clear','2295618kcnZNo','icdsQ','currentBranch','OHWmC','agQek','lastEnabledSessionClearedAt','.ranger_cache.json'];_0x6f9b=function(){return _0x31027a;};return _0x6f9b();}export function disableBranch(_0x30308c){const _0x331e33={'UDUUJ':function(_0x285f06){return _0x285f06();}},_0x9715a4=_0x331e33['UDUUJ'](loadCache);delete _0x9715a4['branches'][_0x30308c],saveCache(_0x9715a4);}function _0x59d8(_0x4720bf,_0x58352e){_0x4720bf=_0x4720bf-0xba;const _0x6f9b15=_0x6f9b();let _0x59d8f8=_0x6f9b15[_0x4720bf];return _0x59d8f8;}export function isBranchEnabled(_0x510c3f){const _0x292e67=_0x4a0eb1,_0x13af0d=loadCache();return _0x13af0d[_0x292e67(0xe3)][_0x510c3f]===!![];}function getOrCreateSession(_0x4f1617,_0xe621ec){const _0xad18ff=_0x4a0eb1;return!_0x4f1617['sessions'][_0xe621ec]&&(_0x4f1617[_0xad18ff(0xbb)][_0xe621ec]={}),_0x4f1617['sessions'][_0xe621ec];}export function enableSession(_0x25c55c){const _0x2bdacf=_0x4a0eb1,_0x42e8e8={'QCjgE':function(_0x5343ac,_0x106204){return _0x5343ac!==_0x106204;},'aVpur':'main','SGSZx':function(_0x11b0ed,_0x134c6a){return _0x11b0ed!==_0x134c6a;},'dPwSA':function(_0x173b40,_0x28796d){return _0x173b40(_0x28796d);}},_0x599ccf=loadCache(),_0xe857cb=getOrCreateSession(_0x599ccf,_0x25c55c);_0xe857cb[_0x2bdacf(0xc7)]=!![];const _0x402ca3=getCurrentBranch();_0x402ca3&&_0x42e8e8['QCjgE'](_0x402ca3,_0x42e8e8['aVpur'])&&_0x42e8e8['SGSZx'](_0x402ca3,_0x2bdacf(0xeb))&&(_0x599ccf[_0x2bdacf(0xe3)][_0x402ca3]=!![],_0xe857cb[_0x2bdacf(0xcb)]=_0x402ca3),_0x42e8e8[_0x2bdacf(0xea)](saveCache,_0x599ccf);}export function isSessionEnabled(_0x5c102f){const _0x2e9e4a=_0x4a0eb1,_0x3938cc={'OHWmC':_0x2e9e4a(0xf0),'WZqfh':function(_0x1d3659,_0x38596f){return _0x1d3659===_0x38596f;},'TNVLS':'master','agQek':function(_0x26d34c,_0x2c37dd){return _0x26d34c===_0x2c37dd;},'ymrLD':function(_0x2eb4d5,_0x2cf3ca){return _0x2eb4d5===_0x2cf3ca;}},_0x1e6810=loadCache(),_0x499756=getCurrentBranch();if(!_0x499756||_0x499756===_0x3938cc[_0x2e9e4a(0xcc)]||_0x3938cc['WZqfh'](_0x499756,_0x3938cc[_0x2e9e4a(0xd8)]))return _0x3938cc[_0x2e9e4a(0xcd)](_0x1e6810['sessions'][_0x5c102f]?.['enabled'],!![]);const _0x38983b=_0x3938cc[_0x2e9e4a(0xbe)](_0x1e6810['branches'][_0x499756],!![]),_0x36eed1=_0x3938cc['agQek'](_0x1e6810['sessions'][_0x5c102f]?.[_0x2e9e4a(0xc7)],!![]);return _0x38983b||_0x36eed1;}export function disableSession(_0x49c991){const _0x569743=_0x4a0eb1,_0x41aeb0={'ULxBA':function(_0x211fa0,_0x198fee,_0x48b6a0){return _0x211fa0(_0x198fee,_0x48b6a0);},'DbyJo':function(_0x59a410,_0x1f4ab9){return _0x59a410(_0x1f4ab9);}},_0x3306ed=loadCache(),_0xe12cd0=_0x41aeb0[_0x569743(0xee)](getOrCreateSession,_0x3306ed,_0x49c991);_0xe12cd0['enabled']=![],_0x41aeb0[_0x569743(0xc1)](saveCache,_0x3306ed);}export function updateBranchTracking(_0x516469){const _0x1276de=_0x4a0eb1,_0x215664={'tRayq':function(_0x17d2bf){return _0x17d2bf();},'vhjQA':_0x1276de(0xf0)},_0x1213e7=_0x215664['tRayq'](loadCache),_0x138a41=_0x1213e7[_0x1276de(0xbb)][_0x516469];if(!_0x138a41?.['enabled'])return;const _0x3a6d9e=getCurrentBranch();if(!_0x3a6d9e||_0x3a6d9e===_0x215664[_0x1276de(0xd0)]||_0x3a6d9e==='master')return;_0x138a41[_0x1276de(0xcb)]!==_0x3a6d9e&&(_0x1213e7['branches'][_0x3a6d9e]=!![],_0x138a41['currentBranch']=_0x3a6d9e,saveCache(_0x1213e7));}export function initBranchTracking(_0x1d1eaa){const _0x108c2e=_0x4a0eb1,_0x55a9aa={'wHcvO':function(_0x3f29c1){return _0x3f29c1();},'jAOEh':function(_0x1e5ab5,_0xce4b7c){return _0x1e5ab5===_0xce4b7c;},'HviBS':'master','VBEkQ':function(_0x270680,_0x370c27,_0x4fc49f){return _0x270680(_0x370c27,_0x4fc49f);},'jePPE':function(_0x165b28,_0x4f9f15){return _0x165b28(_0x4f9f15);}},_0x247df5=_0x55a9aa[_0x108c2e(0xc4)](loadCache),_0x75c6a3=getCurrentBranch();if(!_0x75c6a3||_0x55a9aa['jAOEh'](_0x75c6a3,'main')||_0x75c6a3===_0x55a9aa[_0x108c2e(0xec)])return;if(_0x247df5['branches'][_0x75c6a3]===!![]){const _0x272f43=_0x55a9aa['VBEkQ'](getOrCreateSession,_0x247df5,_0x1d1eaa);_0x272f43['enabled']=!![],_0x272f43[_0x108c2e(0xcb)]=_0x75c6a3,_0x55a9aa['jePPE'](saveCache,_0x247df5);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x25a6f8){const _0x36a1e4=_0x4a0eb1,_0x3467f1=loadCache(),_0x45d2cd=_0x3467f1[_0x36a1e4(0xbb)][_0x25a6f8];_0x45d2cd?.['enabled']&&(_0x3467f1['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x3467f1));}export function shouldAutoEnableAfterClear(_0x557cb1){const _0x31cdeb=_0x4a0eb1,_0x128657={'qRTeH':function(_0x4d4fbb,_0x2b930a){return _0x4d4fbb!==_0x2b930a;},'kFTTY':_0x31cdeb(0xc8)};if(_0x128657[_0x31cdeb(0xc2)](_0x557cb1,_0x128657['kFTTY']))return![];const _0x556a7c=loadCache(),_0x45ceb0=_0x556a7c[_0x31cdeb(0xce)];if(!_0x45ceb0)return![];const _0x5c9473=Date['now']()-_0x45ceb0;return _0x5c9473<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x4c882b){const _0x599e97=_0x4a0eb1,_0x5a89a4={'VXWUD':function(_0x11fc9e){return _0x11fc9e();},'ZDERD':function(_0xfad2f8,_0x418be8,_0x54b6b3){return _0xfad2f8(_0x418be8,_0x54b6b3);},'eLsfs':function(_0x3953bf,_0x6d4b2d){return _0x3953bf!==_0x6d4b2d;},'SSWFP':'master'},_0x154d30=_0x5a89a4[_0x599e97(0xf1)](loadCache),_0x1c1d21=_0x5a89a4['ZDERD'](getOrCreateSession,_0x154d30,_0x4c882b);_0x1c1d21[_0x599e97(0xc7)]=!![];const _0x5588cc=getCurrentBranch();_0x5588cc&&_0x5588cc!=='main'&&_0x5a89a4['eLsfs'](_0x5588cc,_0x5a89a4[_0x599e97(0xe9)])&&(_0x1c1d21[_0x599e97(0xcb)]=_0x5588cc),delete _0x154d30['lastEnabledSessionClearedAt'],saveCache(_0x154d30);}export function registerSession(_0x110512,_0x12ba5e){const _0x3d866c=_0x4a0eb1,_0xfa4fbc={'LFhMA':function(_0x188ded){return _0x188ded();},'zerPN':function(_0x58a851,_0x213c7b,_0x4342ab){return _0x58a851(_0x213c7b,_0x4342ab);}},_0x403315=_0xfa4fbc[_0x3d866c(0xde)](loadCache),_0xf65c38=_0xfa4fbc[_0x3d866c(0xdf)](getOrCreateSession,_0x403315,_0x110512);_0xf65c38['featureId']=_0x12ba5e,_0xf65c38[_0x3d866c(0xf2)]=new Date()['toISOString'](),saveCache(_0x403315);}export function getSessionEntry(_0x113219){const _0x324d1=_0x4a0eb1,_0x49f662=loadCache(),_0x2a0569=_0x49f662['sessions'][_0x113219];if(_0x2a0569?.[_0x324d1(0xe8)]&&_0x2a0569?.[_0x324d1(0xf2)])return{'featureId':_0x2a0569[_0x324d1(0xe8)],'registeredAt':_0x2a0569[_0x324d1(0xf2)]};return null;}export function unregisterSession(_0x56fb66){const _0x17a6de=_0x4a0eb1,_0x4c3f71={'oQViH':function(_0x2641eb){return _0x2641eb();},'cWUaC':function(_0x529fe1,_0x6b3b86){return _0x529fe1(_0x6b3b86);}},_0x14278f=_0x4c3f71[_0x17a6de(0xe5)](loadCache),_0xc7cf6a=_0x14278f['sessions'][_0x56fb66];_0xc7cf6a&&(delete _0xc7cf6a['featureId'],delete _0xc7cf6a[_0x17a6de(0xf2)],_0x4c3f71[_0x17a6de(0xc3)](saveCache,_0x14278f));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x105808){const _0x54e539=_0x4a0eb1,_0x2dc807={'icdsQ':function(_0x3ded97){return _0x3ded97();},'TrBqT':function(_0x23bd99,_0x31a1ec){return _0x23bd99-_0x31a1ec;},'zFfem':function(_0x5c770d,_0x454464){return _0x5c770d(_0x454464);}},_0x6a9d38=_0x2dc807[_0x54e539(0xca)](loadCache),_0x53bef7=getOrCreateSession(_0x6a9d38,_0x105808),_0x46fb3a=_0x53bef7['lastPlanReminderAt']||0x0,_0x396351=Date['now']();if(_0x2dc807['TrBqT'](_0x396351,_0x46fb3a)>=PLAN_REMINDER_INTERVAL_MS)return _0x53bef7['lastPlanReminderAt']=_0x396351,_0x2dc807['zFfem'](saveCache,_0x6a9d38),!![];return![];}export function shouldShowStopReminder(_0x36944f){const _0x4dbbe6=_0x4a0eb1,_0xafe411={'bXKHH':function(_0x396f0e,_0x4f14a1){return _0x396f0e-_0x4f14a1;},'YWWTN':function(_0x1791f7,_0x4ac2db){return _0x1791f7(_0x4ac2db);}},_0x460b79=loadCache(),_0x591c04=getOrCreateSession(_0x460b79,_0x36944f),_0x56c2a3=_0x591c04['lastStopReminderAt']||0x0,_0x54e468=Date['now']();if(_0xafe411[_0x4dbbe6(0xc6)](_0x54e468,_0x56c2a3)>=STOP_REMINDER_INTERVAL_MS)return _0x591c04['lastStopReminderAt']=_0x54e468,_0xafe411['YWWTN'](saveCache,_0x460b79),!![];return![];}export function hasSessionBeenPrompted(_0x2dc574){const _0x27aeb3=_0x4a0eb1,_0x1c2ced={'wdwMF':function(_0x4ffa35){return _0x4ffa35();},'hddza':function(_0x4ec9b9,_0x56dbda){return _0x4ec9b9===_0x56dbda;}},_0x29a609=_0x1c2ced['wdwMF'](loadCache);return _0x1c2ced[_0x27aeb3(0xed)](_0x29a609['sessions'][_0x2dc574]?.['prompted'],!![]);}export function markSessionPrompted(_0x5df6c8){const _0x59b255=_0x4a0eb1,_0x17710b={'flrBV':function(_0x20d6bd){return _0x20d6bd();},'DIqeS':function(_0x2a591b,_0x231a93){return _0x2a591b(_0x231a93);}},_0x49e505=_0x17710b[_0x59b255(0xd9)](loadCache),_0x587364=getOrCreateSession(_0x49e505,_0x5df6c8);_0x587364['prompted']=!![],_0x17710b[_0x59b255(0xe4)](saveCache,_0x49e505);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x44a5db=_0x20d1;(function(_0x4e3ced,_0x13796a){const _0x46e26b=_0x20d1,_0x2e27ad=_0x4e3ced();while(!![]){try{const _0x231f92=-parseInt(_0x46e26b(0xb3))/0x1*(-parseInt(_0x46e26b(0xdf))/0x2)+-parseInt(_0x46e26b(0x73))/0x3+parseInt(_0x46e26b(0xa0))/0x4*(parseInt(_0x46e26b(0xe7))/0x5)+parseInt(_0x46e26b(0xb0))/0x6+parseInt(_0x46e26b(0xea))/0x7*(parseInt(_0x46e26b(0xd7))/0x8)+parseInt(_0x46e26b(0xed))/0x9*(-parseInt(_0x46e26b(0xab))/0xa)+parseInt(_0x46e26b(0xce))/0xb*(-parseInt(_0x46e26b(0xa3))/0xc);if(_0x231f92===_0x13796a)break;else _0x2e27ad['push'](_0x2e27ad['shift']());}catch(_0x4af222){_0x2e27ad['push'](_0x2e27ad['shift']());}}}(_0xbd33,0x75b9b));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(_0x23cae7,_0x11be48){const _0x47972c=_0x20d1,_0x57b284={'tsiYp':'local','AlZLv':function(_0x38682b,_0x3dea31,_0x268e60){return _0x38682b(_0x3dea31,_0x268e60);},'rBEdr':function(_0x4cb25f,_0xf0c3b6){return _0x4cb25f(_0xf0c3b6);},'QIAEn':function(_0x3f9f36,_0x1aa6eb){return _0x3f9f36(_0x1aa6eb);},'OIJPh':function(_0x125b60,_0x23fff7){return _0x125b60!==_0x23fff7;}},_0x3c2941=join(_0x11be48,'ci',_0x23cae7),_0x445066=join(_0x11be48,_0x57b284['tsiYp'],_0x23cae7),_0xb933cb=_0x57b284['AlZLv'](join,_0x11be48,_0x23cae7),_0x3f18b5=_0x57b284[_0x47972c(0xb7)](join,_0x11be48,_0x57b284['tsiYp']),_0x3f5d2b=join(_0x11be48,'ci');if(_0x57b284['rBEdr'](existsSync,_0x3c2941))return _0x3c2941;if(existsSync(_0x445066))return _0x445066;if(_0x57b284[_0x47972c(0xdc)](existsSync,_0xb933cb)&&(_0xb933cb!==_0x3f18b5&&_0x57b284['OIJPh'](_0xb933cb,_0x3f5d2b)?!![]:hasLegacyProfileFiles(_0xb933cb)))return _0xb933cb;return null;}export function getEnvDir(_0x238230,_0xcd322={}){const _0xcf7d29=_0x20d1,_0x5d32bd={'ySrGQ':function(_0x5579a2){return _0x5579a2();},'JYpKD':function(_0x3654d7,_0x1763c6,_0x513e8c){return _0x3654d7(_0x1763c6,_0x513e8c);},'rpZlE':function(_0x445357,_0x4e0d2c,_0x74f9ec){return _0x445357(_0x4e0d2c,_0x74f9ec);},'cvUGV':function(_0x1c6302,_0x111b04){return _0x1c6302(_0x111b04);}},_0x5d4378=_0x5d32bd[_0xcf7d29(0xe1)](getRangerDir),_0x1c6111=findEnvInRoot(_0x238230,_0x5d4378);if(_0x1c6111){if(_0xcd322[_0xcf7d29(0x6d)]&&isLegacyEnvPath(_0x1c6111))throw _0x5d32bd[_0xcf7d29(0xdb)](legacyWriteError,_0x238230,_0x1c6111);return _0x1c6111;}const _0xa986c9=_0x5d32bd[_0xcf7d29(0xe1)](getRangerHomeDir);if(_0xa986c9!==_0x5d4378){const _0x492fa4=_0x5d32bd['rpZlE'](findEnvInRoot,_0x238230,_0xa986c9);if(_0x492fa4){if(_0xcd322['forWrite']&&_0x5d32bd['cvUGV'](isLegacyEnvPath,_0x492fa4))throw legacyWriteError(_0x238230,_0x492fa4);return _0x492fa4;}}const _0x36df04=join(_0xa986c9,'local',_0x238230);if(_0xcd322[_0xcf7d29(0x6d)])throw legacyWriteError(_0x238230,_0x36df04);return _0x36df04;}function isLegacyEnvPath(_0x17fd5d){const _0xcf17e2={'UXPiJ':function(_0x2005b8){return _0x2005b8();}},_0x551f0f=_0xcf17e2['UXPiJ'](getRangerDir),_0x43edb0=getRangerHomeDir();for(const _0x3163cb of new Set([_0x551f0f,_0x43edb0])){const _0x322d93=_0x3163cb['endsWith']('/')?_0x3163cb:_0x3163cb+'/';if(_0x17fd5d===_0x3163cb||_0x17fd5d['startsWith'](_0x322d93))return!![];}return![];}function legacyWriteError(_0x41ce5a,_0x30c033){const _0x5d3234=_0x20d1,_0x43814b={'eBnFr':function(_0x213a15,_0x541a4e){return _0x213a15+_0x541a4e;}};return new Error(_0x43814b[_0x5d3234(0xeb)](_0x5d3234(0x83)+_0x41ce5a+'\x22\x20to\x20legacy\x20path\x20'+_0x30c033+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x5d3234(0x98))+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x5b9ad8,_0x106369){const _0x34672d=_0x20d1,_0x4aeb8b={'sLgNN':function(_0x1d5ed5){return _0x1d5ed5();},'SeFKE':_0x34672d(0x85),'JZzvH':function(_0x1a6eea,_0x5a8379,_0x51b12a){return _0x1a6eea(_0x5a8379,_0x51b12a);},'FlpKj':_0x34672d(0x8b),'eWfee':function(_0x5a3a0e,_0x50e507,_0x2d9364,_0x5a0b5b){return _0x5a3a0e(_0x50e507,_0x2d9364,_0x5a0b5b);},'saxTc':function(_0x49b3ba,_0x4d6223,_0x4beb27,_0x4b815b){return _0x49b3ba(_0x4d6223,_0x4beb27,_0x4b815b);},'eSIFc':function(_0x2df781,_0x3820e0){return _0x2df781===_0x3820e0;}},_0x25a1a2=_0x106369?.[_0x34672d(0xe6)],_0x3aa0e2=_0x25a1a2?[_0x25a1a2]:[_0x4aeb8b[_0x34672d(0xcf)](getRangerDir),getRangerHomeDir()][_0x34672d(0x91)]((_0x538737,_0x18b36d,_0x2ece59)=>_0x2ece59['indexOf'](_0x538737)===_0x18b36d),_0x1da1e4=_0x106369?.['locations']??['ci',_0x34672d(0x8b),_0x4aeb8b[_0x34672d(0xb8)]];for(const _0x1650d9 of _0x3aa0e2){const _0x5ac317=_0x4aeb8b[_0x34672d(0xc3)](join,_0x1650d9,_0x4aeb8b[_0x34672d(0xbc)]),_0x533b2f=join(_0x1650d9,'ci'),_0x160db8=[{'location':'ci','path':_0x4aeb8b['eWfee'](join,_0x1650d9,'ci',_0x5b9ad8)},{'location':_0x4aeb8b[_0x34672d(0xbc)],'path':_0x4aeb8b['saxTc'](join,_0x1650d9,_0x4aeb8b['FlpKj'],_0x5b9ad8)},{'location':_0x34672d(0x85),'path':join(_0x1650d9,_0x5b9ad8)}];for(const _0x152f27 of _0x160db8){if(_0x1da1e4[_0x34672d(0xe2)](_0x152f27['location'])&&existsSync(_0x152f27[_0x34672d(0xd1)])){if(_0x4aeb8b[_0x34672d(0x76)](_0x152f27['location'],'legacy')&&(_0x4aeb8b[_0x34672d(0x76)](_0x152f27['path'],_0x5ac317)||_0x152f27[_0x34672d(0xd1)]===_0x533b2f)&&!hasLegacyProfileFiles(_0x152f27['path']))continue;return{'path':_0x152f27['path'],'location':_0x152f27[_0x34672d(0x8d)]};}}}return null;}function hasLegacyProfileFiles(_0x3c5afe){const _0x15da67=_0x20d1,_0x49f564={'dvLVS':function(_0x4d5833,_0x36299c,_0x1cec27){return _0x4d5833(_0x36299c,_0x1cec27);},'lkEUW':_0x15da67(0x78),'caVUd':function(_0x329d19,_0x4503a7){return _0x329d19(_0x4503a7);},'VsFJc':function(_0x1a114a,_0x2b2548,_0x2e2711){return _0x1a114a(_0x2b2548,_0x2e2711);},'BhHbd':_0x15da67(0xd0),'RVkht':function(_0x38b5e9,_0x3a4e30,_0x6ea529){return _0x38b5e9(_0x3a4e30,_0x6ea529);}};return existsSync(_0x49f564[_0x15da67(0xd8)](join,_0x3c5afe,_0x49f564[_0x15da67(0xc5)]))||_0x49f564[_0x15da67(0xaf)](existsSync,_0x49f564[_0x15da67(0x94)](join,_0x3c5afe,_0x49f564['BhHbd']))||existsSync(_0x49f564[_0x15da67(0xa4)](join,_0x3c5afe,_0x15da67(0x74)));}export function isEnvCi(_0x2d95e0){const _0x4da177=_0x20d1,_0x107036={'hKJhI':function(_0x3dfccb,_0x179a29,_0x261bf6,_0xafec23){return _0x3dfccb(_0x179a29,_0x261bf6,_0xafec23);},'tlwTy':function(_0x31038f){return _0x31038f();},'uDLGX':function(_0x4ca5b0,_0xd3bdb1){return _0x4ca5b0!==_0xd3bdb1;}};if(existsSync(_0x107036['hKJhI'](join,_0x107036['tlwTy'](getRangerDir),'ci',_0x2d95e0)))return!![];const _0x54506e=getRangerHomeDir();if(_0x107036['uDLGX'](_0x54506e,_0x107036[_0x4da177(0xa2)](getRangerDir))&&existsSync(join(_0x54506e,'ci',_0x2d95e0)))return!![];return![];}export async function cleanupTempFiles(_0x26e6a7){const _0x15fa4f=_0x20d1,_0x11e73c={'lNdZc':function(_0x31edd1,_0x456baf){return _0x31edd1!==_0x456baf;},'eiveV':_0x15fa4f(0x82)},_0x5e85f5=[_0x26e6a7['tempAuthPath'],_0x26e6a7['configPath']][_0x15fa4f(0x91)](Boolean);await Promise[_0x15fa4f(0xa7)](_0x5e85f5['map'](_0x1fa265=>unlink(_0x1fa265)['catch'](_0x4b1894=>{const _0x4f0a87=_0x15fa4f;_0x11e73c['lNdZc'](_0x4b1894[_0x4f0a87(0xd2)],_0x11e73c['eiveV'])&&console[_0x4f0a87(0xbf)](_0x4f0a87(0x77)+_0x1fa265+':',_0x4b1894['message']);})));}function _0x20d1(_0x429260,_0x4f8940){_0x429260=_0x429260-0x6a;const _0xbd3396=_0xbd33();let _0x20d145=_0xbd3396[_0x429260];return _0x20d145;}export function getSettingsPath(_0x3e747d){const _0x29f15f=_0x20d1,_0x1bc8be={'aRcpQ':function(_0x3cd926,_0x110562,_0x2e500f){return _0x3cd926(_0x110562,_0x2e500f);},'xijRn':function(_0x36c4a5,_0x501efd){return _0x36c4a5(_0x501efd);},'JpFhj':'settings.json'};return _0x1bc8be[_0x29f15f(0xb1)](join,_0x1bc8be[_0x29f15f(0xa1)](getEnvDir,_0x3e747d),_0x1bc8be[_0x29f15f(0xde)]);}export async function loadSettings(_0x1b67b6){const _0x408557=_0x20d1,_0x2145c7={'YPmuU':function(_0x74741,_0x4ba2a1,_0xfb6ff){return _0x74741(_0x4ba2a1,_0xfb6ff);}},_0x32dcda=getSettingsPath(_0x1b67b6);if(!existsSync(_0x32dcda))return{};try{const _0x44e564=await _0x2145c7[_0x408557(0x7f)](readFile,_0x32dcda,'utf-8');return JSON['parse'](_0x44e564);}catch{return{};}}export async function saveSettings(_0x34e0ad,_0x11e27d){const _0x5e523=_0x20d1,_0x3ed2a3={'hTVQr':function(_0x1fa3ef,_0x44d6b2){return _0x1fa3ef(_0x44d6b2);},'VYqlZ':function(_0x483476,_0x1ec88b,_0xb834b7){return _0x483476(_0x1ec88b,_0xb834b7);}},_0x424fd3=getSettingsPath(_0x34e0ad),_0x31a7ae=_0x3ed2a3['hTVQr'](dirname,_0x424fd3);!existsSync(_0x31a7ae)&&await mkdir(_0x31a7ae,{'recursive':!![]}),await _0x3ed2a3['VYqlZ'](writeFile,_0x424fd3,JSON[_0x5e523(0xc8)](_0x11e27d,null,0x2));}export function resolveEnvVars(_0x34a7ab){const _0x46bda3=_0x20d1,_0x675f3b={'uJpkb':function(_0x1caab2,_0x32a5e2){return _0x1caab2===_0x32a5e2;},'jPGwo':'string','adGuf':'object'};if(_0x675f3b[_0x46bda3(0x72)](typeof _0x34a7ab,_0x675f3b[_0x46bda3(0x9a)]))return _0x34a7ab['replace'](/\$\{(\w+)\}/g,(_0x401e09,_0x158576)=>{const _0x1aa4ae=_0x46bda3,_0x5aaf91=process[_0x1aa4ae(0x7b)][_0x158576];if(_0x5aaf91===undefined)throw new Error(_0x1aa4ae(0xef)+_0x158576+_0x1aa4ae(0xf0));return _0x5aaf91;});if(Array[_0x46bda3(0x80)](_0x34a7ab))return _0x34a7ab[_0x46bda3(0x7c)](resolveEnvVars);if(_0x34a7ab&&typeof _0x34a7ab===_0x675f3b[_0x46bda3(0x8e)])return Object['fromEntries'](Object[_0x46bda3(0xd6)](_0x34a7ab)['map'](([_0x2ee4f1,_0x569093])=>[_0x2ee4f1,resolveEnvVars(_0x569093)]));return _0x34a7ab;}const isRecord=_0x2fbf9f=>typeof _0x2fbf9f==='object'&&_0x2fbf9f!==null&&!Array[_0x44a5db(0x80)](_0x2fbf9f),asRecord=_0x234569=>isRecord(_0x234569)?_0x234569:undefined,mergeHeaders=(_0x5e0ac2,_0x448611)=>{const _0x3e5aa2=_0x44a5db,_0x1bf759={'kvuXZ':function(_0x31e5ef,_0x3579b0){return _0x31e5ef??_0x3579b0;}},_0x583c3a={..._0x1bf759[_0x3e5aa2(0xa5)](_0x5e0ac2,{}),..._0x448611??{}};return Object['keys'](_0x583c3a)[_0x3e5aa2(0xac)]?_0x583c3a:undefined;},SAFE_MODE_ARGS=[_0x44a5db(0xc0)],ALLOW_LOCALHOST_ARGS=[_0x44a5db(0x79),_0x44a5db(0xc2),_0x44a5db(0x92),_0x44a5db(0x86)];export function buildBrowserOptionsFromSettings(_0x4c8ce5,_0x1c88d={}){const _0xbde5a3=_0x44a5db,_0x1b373b={'QlJfN':function(_0x4c5241,_0xfd4512){return _0x4c5241(_0xfd4512);},'grDhB':function(_0x44246f,_0x504cc0){return _0x44246f===_0x504cc0;},'HVQrh':function(_0x31a91f,_0x2f5f5c){return _0x31a91f===_0x2f5f5c;},'CyNiW':'string','sfbJz':function(_0x196b15,_0x359f47){return _0x196b15(_0x359f47);}},_0x4468b6=_0x1b373b['QlJfN'](asRecord,_0x4c8ce5['browser']),_0x56aa88={...asRecord(_0x4468b6?.['launchOptions'])??{}};_0x1b373b[_0xbde5a3(0xe9)](typeof _0x1c88d['headless'],'boolean')&&(_0x56aa88[_0xbde5a3(0x70)]=_0x1c88d[_0xbde5a3(0x70)]);if(_0x4c8ce5[_0xbde5a3(0x90)]){const _0x3ca6fe=_0x56aa88['args']??[],_0x396263=SAFE_MODE_ARGS['filter'](_0x5ed805=>!_0x3ca6fe['includes'](_0x5ed805));_0x56aa88['args']=[..._0x3ca6fe,..._0x396263];}if(_0x4c8ce5[_0xbde5a3(0x88)]){const _0x2fbf85=_0x56aa88['args']??[],_0x47d2da=ALLOW_LOCALHOST_ARGS[_0xbde5a3(0x91)](_0x374520=>!_0x2fbf85['includes'](_0x374520));_0x56aa88[_0xbde5a3(0xd9)]=[..._0x2fbf85,..._0x47d2da];}const _0x481d8a={..._0x1b373b['QlJfN'](asRecord,_0x4468b6?.[_0xbde5a3(0x96)])??{}};_0x481d8a[_0xbde5a3(0xd3)]=!![];_0x1b373b['HVQrh'](typeof _0x4c8ce5['userAgent'],_0x1b373b['CyNiW'])&&(_0x481d8a['userAgent']=_0x4c8ce5['userAgent']);const _0x2fc5d0=mergeHeaders(_0x1b373b['sfbJz'](asRecord,_0x481d8a['extraHTTPHeaders']),asRecord(_0x4c8ce5['headers']));return _0x2fc5d0?_0x481d8a[_0xbde5a3(0xec)]=_0x2fc5d0:delete _0x481d8a[_0xbde5a3(0xec)],_0x1c88d['storageStatePath']&&(_0x481d8a['storageState']=_0x1c88d['storageStatePath']),{'launchOptions':_0x56aa88,'contextOptions':_0x481d8a};}export async function resolveProfileStorageState(_0x42bded){const _0x4a254b=_0x44a5db,_0xddc706={'VbYJN':function(_0x336671,_0x42c9bd){return _0x336671(_0x42c9bd);}};return _0xddc706['VbYJN'](resolveLocalAuthPath,_0xddc706[_0x4a254b(0xb9)](getEnvDir,_0x42bded));}async function resolveLocalAuthPath(_0x5e6999){const _0x2a619a=_0x44a5db,_0x425149={'FquDA':_0x2a619a(0xd0),'MHLeZ':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','mfzFG':function(_0x3237d0,_0x547e3e,_0x52b3d8){return _0x3237d0(_0x547e3e,_0x52b3d8);},'zPKvp':function(_0x1236c4,_0x222b43,_0x1d3321){return _0x1236c4(_0x222b43,_0x1d3321);},'wmrLJ':function(_0x1da41f,_0x476ed7){return _0x1da41f instanceof _0x476ed7;}},_0x30b5a3=join(_0x5e6999,'auth.json.enc'),_0x17646a=join(_0x5e6999,_0x425149[_0x2a619a(0x7a)]);if(existsSync(_0x30b5a3))try{const _0x1f8002=await getToken();if(!_0x1f8002)throw new Error(_0x425149[_0x2a619a(0x6f)]);const _0x41e670=await readFile(_0x30b5a3),_0x59f111=_0x425149['mfzFG'](decrypt,_0x41e670,_0x1f8002),_0x56b275=join(tmpdir(),_0x2a619a(0xda)+Date['now']()+'.json');return await _0x425149[_0x2a619a(0xba)](writeFile,_0x56b275,_0x59f111),{'storageStatePath':_0x56b275,'tempAuthPath':_0x56b275};}catch(_0x4639db){const _0x25a100=_0x425149['wmrLJ'](_0x4639db,Error)?_0x4639db[_0x2a619a(0xa8)]:String(_0x4639db);throw new Error(_0x2a619a(0xcc)+_0x25a100);}if(existsSync(_0x17646a))return{'storageStatePath':_0x17646a};return{};}export async function buildPlaywrightConfig(_0xe66819,_0x381e08,_0x26e330,_0x300d58,_0x3e83f2){const _0x1e1584=_0x44a5db,_0x4f6046={'gqUDF':'stagehand','mYSXA':function(_0x358054,_0x24c432){return _0x358054(_0x24c432);},'mLsiM':function(_0x44bc32,_0x2be672){return _0x44bc32(_0x2be672);}};if(_0x3e83f2)return buildPlaywrightConfigCore(_0xe66819,_0x3e83f2,_0x381e08,_0x26e330,_0x300d58,_0x4f6046['gqUDF']);const {storageStatePath:_0x35466e,tempAuthPath:_0x330694}=await resolveLocalAuthPath(_0x4f6046[_0x1e1584(0xe8)](getEnvDir,_0x381e08));try{const _0x440877=await buildPlaywrightConfigCore(_0xe66819,_0x35466e,_0x381e08,_0x26e330,_0x300d58,'stagehand');return{..._0x440877,'tempAuthPath':_0x330694};}catch(_0x1cd655){_0x330694&&await _0x4f6046['mLsiM'](unlink,_0x330694)['catch'](()=>{});throw _0x1cd655;}}export async function buildPlaywrightConfigCore(_0x2799cb,_0x52128b,_0xedd3d6,_0x3d36c5,_0x5e28ff,_0x45081e=_0x44a5db(0x7e)){const _0x47a337=_0x44a5db,_0x258356={'BtZZZ':function(_0x12e9ce,_0x50dfab){return _0x12e9ce===_0x50dfab;},'rRAuM':'clipboard-read','qlltT':function(_0xa756a2){return _0xa756a2();},'CstcQ':function(_0x34da82,_0x38f2c6,_0x4d3828,_0x4fbb8e){return _0x34da82(_0x38f2c6,_0x4d3828,_0x4fbb8e);},'Nemqh':'playwright-cli','uAyay':_0x47a337(0x8a),'oyHgx':_0x47a337(0x93),'cCGeb':function(_0x4f25b2,_0x3913f7,_0x31aa8c){return _0x4f25b2(_0x3913f7,_0x31aa8c);},'vkrFf':function(_0x349c15){return _0x349c15();},'yDOmS':function(_0x368747,_0x3e900e){return _0x368747(_0x3e900e);},'pBAgQ':function(_0x4a2144,_0x48c7d7,_0x53660a){return _0x4a2144(_0x48c7d7,_0x53660a);},'rRhLb':'-cli','lUnCw':function(_0x299864,_0x1eb7e6,_0x3237a1){return _0x299864(_0x1eb7e6,_0x3237a1);}},_0x30be34=_0x3d36c5||_0x258356['qlltT'](randomUUID),_0x1ece91=_0x258356[_0x47a337(0xe0)](join,_0x258356['qlltT'](getRangerDir),'sessions',_0x30be34),_0x2ca749=Boolean(_0x2799cb[_0x47a337(0xd5)]),_0x4f4f92=_0x2ca749?{'browserName':'chromium','cdpEndpoint':_0x2799cb['cdpEndpoint']}:((()=>{const _0x598d23=_0x47a337,{launchOptions:_0x17f734,contextOptions:_0x208195}=buildBrowserOptionsFromSettings(_0x2799cb,{'headless':_0x5e28ff?![]:_0x2799cb['headless']??!![],'storageStatePath':_0x52128b});if(_0x258356[_0x598d23(0xaa)](process['getuid']?.(),0x0)){const _0x5a666b=['--no-sandbox','--disable-setuid-sandbox'],_0x13411e=_0x17f734[_0x598d23(0xd9)]??[],_0x2d0345=_0x5a666b[_0x598d23(0x91)](_0x39fe07=>!_0x13411e['includes'](_0x39fe07));_0x17f734['args']=[..._0x13411e,..._0x2d0345];}return{'isolated':!![],'browserName':_0x598d23(0xad),'launchOptions':_0x17f734,'contextOptions':{..._0x208195,'permissions':[_0x258356['rRAuM'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x20649b=_0x258356['BtZZZ'](_0x45081e,_0x258356[_0x47a337(0x8f)])?{'browser':_0x4f4f92,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1ece91,'outputMode':_0x258356['uAyay'],'codegen':'none'}:{'name':_0xedd3d6,'browser':_0x4f4f92,'capabilities':['core',_0x258356['oyHgx'],_0x47a337(0xa9),'pdf',_0x47a337(0xc1)],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1ece91};if(!_0x2ca749){const _0x15cc13=_0x20649b['browser'],_0x174d5f=_0x15cc13['contextOptions'];if(_0x258356['BtZZZ'](_0x174d5f['userAgent'],undefined))delete _0x174d5f[_0x47a337(0xb6)];if(_0x174d5f[_0x47a337(0x8c)]===undefined)delete _0x174d5f['storageState'];}const _0x2725ef=_0x258356['cCGeb'](join,_0x258356[_0x47a337(0xc4)](tmpdir),_0x47a337(0xd4));!_0x258356['yDOmS'](existsSync,_0x2725ef)&&await _0x258356[_0x47a337(0xf3)](mkdir,_0x2725ef,{'recursive':!![]});const _0x4b9a4c=_0x258356[_0x47a337(0xaa)](_0x45081e,_0x258356[_0x47a337(0x8f)])?_0x258356['rRhLb']:'',_0xf72c4f=_0x258356[_0x47a337(0x97)](join,_0x2725ef,_0xedd3d6+'-'+Date[_0x47a337(0xcb)]()+_0x4b9a4c+'.json');return await writeFile(_0xf72c4f,JSON[_0x47a337(0xc8)](_0x20649b,null,0x2)),{'configPath':_0xf72c4f,'storageStatePath':_0x52128b};}export async function buildPlaywrightCliConfig(_0x2652dd,_0x5166ff,_0x523103,_0x2f86f7,_0x137fb0){const _0x1b20af=_0x44a5db,_0x1f701b={'QKuWY':_0x1b20af(0xc9),'gTgJo':function(_0x8f3f78,_0x2b407a){return _0x8f3f78(_0x2b407a);}};if(_0x137fb0)return buildPlaywrightConfigCore(_0x2652dd,_0x137fb0,_0x5166ff,_0x523103,_0x2f86f7,_0x1f701b['QKuWY']);const {storageStatePath:_0x31b8a8,tempAuthPath:_0x46fc5c}=await _0x1f701b['gTgJo'](resolveLocalAuthPath,getEnvDir(_0x5166ff));try{const _0x131677=await buildPlaywrightConfigCore(_0x2652dd,_0x31b8a8,_0x5166ff,_0x523103,_0x2f86f7,_0x1f701b[_0x1b20af(0xb5)]);return{..._0x131677,'tempAuthPath':_0x46fc5c};}catch(_0x1f41e5){_0x46fc5c&&await unlink(_0x46fc5c)[_0x1b20af(0x6c)](()=>{});throw _0x1f41e5;}}export async function buildRangerwrightCliConfig(_0x1944a6,_0x4f7a0a,_0x12190c,_0x589f41,_0x25bf36){const _0xf4cad2=_0x44a5db,_0x386bde={'MvAKM':function(_0x2dbd29,_0x519689){return _0x2dbd29===_0x519689;},'alOWv':'--no-sandbox','eoFIH':'clipboard-write','unJHP':function(_0x4607f2){return _0x4607f2();},'eMwQf':function(_0x535796,_0x47d71c,_0x3a779b,_0x46a43f){return _0x535796(_0x47d71c,_0x3a779b,_0x46a43f);},'QxuPh':function(_0x43eb9a,_0x2b123f){return _0x43eb9a(_0x2b123f);},'oXspR':_0xf4cad2(0xad),'yMdHX':'ranger-config','QTbjM':function(_0x5b4c2c,_0x38707d){return _0x5b4c2c(_0x38707d);},'xpsSq':function(_0x4f3b34,_0x3a22d4,_0x4c08c4){return _0x4f3b34(_0x3a22d4,_0x4c08c4);}},{storageStatePath:_0x1467f1,tempAuthPath:_0x3e8ef4}=_0x25bf36?{'storageStatePath':_0x25bf36,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x4f7a0a)),_0x10df12=_0x12190c||_0x386bde['unJHP'](randomUUID),_0x1f3633=_0x386bde[_0xf4cad2(0xae)](join,getRangerDir(),'sessions',_0x10df12),_0x4abf90=_0x386bde[_0xf4cad2(0xbe)](Boolean,_0x1944a6[_0xf4cad2(0xd5)]),_0x513961=_0x4abf90?{'browserName':_0x386bde['oXspR'],'cdpEndpoint':_0x1944a6[_0xf4cad2(0xd5)]}:((()=>{const _0x5dc987=_0xf4cad2,{launchOptions:_0x1931ee,contextOptions:_0x188cf9}=buildBrowserOptionsFromSettings(_0x1944a6,{'headless':_0x589f41?![]:_0x1944a6[_0x5dc987(0x70)]??!![],'storageStatePath':_0x1467f1});if(_0x386bde['MvAKM'](process[_0x5dc987(0xdd)]?.(),0x0)){const _0x105555=[_0x386bde['alOWv'],_0x5dc987(0x89)],_0x56a7be=_0x1931ee[_0x5dc987(0xd9)]??[],_0x16bb45=_0x105555['filter'](_0x23e2e2=>!_0x56a7be[_0x5dc987(0xe2)](_0x23e2e2));_0x1931ee[_0x5dc987(0xd9)]=[..._0x56a7be,..._0x16bb45];}return{'browserName':'chromium','launchOptions':_0x1931ee,'contextOptions':{..._0x188cf9,'permissions':[_0x5dc987(0xbd),_0x386bde[_0x5dc987(0xc6)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x4abf90){const _0x5e1948=_0x513961['contextOptions'];if(_0x5e1948){if(_0x5e1948[_0xf4cad2(0xb6)]===undefined)delete _0x5e1948['userAgent'];if(_0x386bde[_0xf4cad2(0x6b)](_0x5e1948[_0xf4cad2(0x8c)],undefined))delete _0x5e1948[_0xf4cad2(0x8c)];}}const _0x52731a={'browser':_0x513961,'outputDir':_0x1f3633,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5aeeb2;try{const _0x29618a=join(_0x386bde[_0xf4cad2(0xee)](tmpdir),_0x386bde[_0xf4cad2(0x9b)]);!_0x386bde[_0xf4cad2(0xa6)](existsSync,_0x29618a)&&await _0x386bde['xpsSq'](mkdir,_0x29618a,{'recursive':!![]}),_0x5aeeb2=join(_0x29618a,_0x4f7a0a+'-'+Date['now']()+_0xf4cad2(0xb4)),await writeFile(_0x5aeeb2,JSON['stringify'](_0x52731a,null,0x2));}catch(_0x4fd428){_0x3e8ef4&&await _0x386bde['QTbjM'](unlink,_0x3e8ef4)['catch'](()=>{});throw _0x4fd428;}return{'configPath':_0x5aeeb2,'storageStatePath':_0x1467f1,'tempAuthPath':_0x3e8ef4,'outputDir':_0x1f3633};}export async function buildNovaActCliConfig(_0x41683b,_0x17f3bd,_0x16c2c9,_0x8b6fc,_0x2e160f){const _0xcc7bc6=_0x44a5db,_0x28dc1a={'lOQzr':function(_0x59ad0a){return _0x59ad0a();},'tDOJW':'sessions','aRNcu':function(_0x702247,_0x49ca19,_0x30fb0f){return _0x702247(_0x49ca19,_0x30fb0f);},'qJEAY':_0xcc7bc6(0xc7),'NDTEC':function(_0x17b680,_0x405dfd){return _0x17b680===_0x405dfd;},'XxTpc':'--disable-setuid-sandbox','COAWh':function(_0x518367,_0x33358c){return _0x518367(_0x33358c);},'yFhFN':function(_0x9235ce,_0x4a38f5){return _0x9235ce(_0x4a38f5);}},{storageStatePath:_0x844fd,tempAuthPath:_0x439437}=_0x2e160f?{'storageStatePath':_0x2e160f,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x17f3bd)),_0x50d1e9=_0x16c2c9||randomUUID(),_0x4e65d3=join(_0x28dc1a[_0xcc7bc6(0x95)](getRangerDir),_0x28dc1a[_0xcc7bc6(0x9e)],_0x50d1e9),_0x11612f=_0x28dc1a[_0xcc7bc6(0xbb)](join,_0x4e65d3,'nova-user-data'),_0x2068e2=_0x844fd?join(_0x11612f,_0x28dc1a[_0xcc7bc6(0x81)]):undefined,{launchOptions:_0x17324e,contextOptions:_0x121978}=buildBrowserOptionsFromSettings(_0x41683b,{'headless':_0x8b6fc?![]:_0x41683b[_0xcc7bc6(0x70)]??!![],'storageStatePath':_0x844fd});if(_0x28dc1a['NDTEC'](process['getuid']?.(),0x0)){const _0x2151b=['--no-sandbox',_0x28dc1a[_0xcc7bc6(0xf1)]],_0x5173cf=_0x17324e['args']??[],_0x16f2fd=_0x2151b[_0xcc7bc6(0x91)](_0x30949=>!_0x5173cf['includes'](_0x30949));_0x17324e[_0xcc7bc6(0xd9)]=[..._0x5173cf,..._0x16f2fd];}const _0x372105=typeof _0x17324e['executablePath']===_0xcc7bc6(0x6a)?_0x17324e[_0xcc7bc6(0xe4)]:_0x844fd?chromium['executablePath']():undefined;return{'storageStatePath':_0x844fd,'tempAuthPath':_0x439437,'baseUrl':_0x41683b[_0xcc7bc6(0x99)],'headless':_0x28dc1a[_0xcc7bc6(0xe5)](Boolean,_0x17324e[_0xcc7bc6(0x70)]),'userDataDir':_0x11612f,'browserProfilePath':_0x2068e2,'executablePath':_0x372105,'launchArgs':Array[_0xcc7bc6(0x80)](_0x17324e['args'])?_0x17324e[_0xcc7bc6(0xd9)]['filter'](_0x149da9=>typeof _0x149da9==='string'):[],'userAgent':_0x28dc1a[_0xcc7bc6(0xf2)](typeof _0x121978['userAgent'],'string')?_0x121978['userAgent']:undefined,'extraHTTPHeaders':_0x121978[_0xcc7bc6(0xec)],'allowInsecureLocalhost':_0x28dc1a['yFhFN'](Boolean,_0x41683b['allowInsecureLocalhost']),'safeMode':_0x28dc1a['COAWh'](Boolean,_0x41683b[_0xcc7bc6(0x90)]),'cdpEndpoint':_0x41683b[_0xcc7bc6(0xd5)],'isCdpMode':Boolean(_0x41683b['cdpEndpoint'])};}export function getNestedValue(_0x30a88c,_0x18f847){const _0x547d2f=_0x44a5db,_0x262d83={'NgKkO':function(_0x4ed923,_0x2b819c){return _0x4ed923!==_0x2b819c;}},_0x40526f=parseKeyPath(_0x18f847);let _0x2ab323=_0x30a88c;for(const _0x22e969 of _0x40526f){if(_0x2ab323===null||_0x2ab323===undefined||_0x262d83[_0x547d2f(0x9d)](typeof _0x2ab323,_0x547d2f(0x71)))return undefined;_0x2ab323=_0x2ab323[_0x22e969];}return _0x2ab323;}export function setNestedValue(_0x1d58d9,_0x1186d4,_0x210157){const _0x22cedf=_0x44a5db,_0x25c59c={'TBYOz':function(_0x5afac4,_0x4f09ee){return _0x5afac4-_0x4f09ee;},'BmiQw':function(_0x11b094,_0x15e387){return _0x11b094 in _0x15e387;}},_0x205bac=parseKeyPath(_0x1186d4);let _0x2be08a=_0x1d58d9;for(let _0x2c71be=0x0;_0x2c71be<_0x25c59c['TBYOz'](_0x205bac['length'],0x1);_0x2c71be++){const _0x30460b=_0x205bac[_0x2c71be];(!_0x25c59c[_0x22cedf(0x84)](_0x30460b,_0x2be08a)||typeof _0x2be08a[_0x30460b]!=='object')&&(_0x2be08a[_0x30460b]={}),_0x2be08a=_0x2be08a[_0x30460b];}_0x2be08a[_0x205bac[_0x205bac[_0x22cedf(0xac)]-0x1]]=_0x210157;}export function deleteNestedValue(_0x5600ae,_0x12990e){const _0x38fd0d=_0x44a5db,_0xe78a00={'YVNyt':function(_0x388c31,_0x356a39){return _0x388c31(_0x356a39);},'wqQIK':function(_0x48f6cc,_0x5238d5){return _0x48f6cc<_0x5238d5;},'yAciL':function(_0x20fd47,_0x349aa6){return _0x20fd47-_0x349aa6;},'tnPXQ':function(_0x10f55b,_0x4a683b){return _0x10f55b===_0x4a683b;},'ZOmPh':function(_0xed4287,_0x4ce596){return _0xed4287!==_0x4ce596;},'ocASR':function(_0x10e58d,_0x9dee9b){return _0x10e58d in _0x9dee9b;}},_0x1e7554=_0xe78a00[_0x38fd0d(0x75)](parseKeyPath,_0x12990e);let _0x1f3947=_0x5600ae;for(let _0x1df061=0x0;_0xe78a00['wqQIK'](_0x1df061,_0xe78a00['yAciL'](_0x1e7554[_0x38fd0d(0xac)],0x1));_0x1df061++){if(_0xe78a00['tnPXQ'](_0x1f3947,null)||_0x1f3947===undefined||_0xe78a00['ZOmPh'](typeof _0x1f3947,'object'))return![];_0x1f3947=_0x1f3947[_0x1e7554[_0x1df061]];}if(_0x1f3947===null||_0xe78a00[_0x38fd0d(0x9c)](_0x1f3947,undefined)||typeof _0x1f3947!=='object')return![];const _0x12be1b=_0x1e7554[_0x1e7554['length']-0x1];if(_0xe78a00['ocASR'](_0x12be1b,_0x1f3947))return delete _0x1f3947[_0x12be1b],!![];return![];}function _0xbd33(){const _0x3b6e36=['clipboard-read','QxuPh','warn','--disable-features=WebBluetooth','vision','--allow-running-insecure-content','JZzvH','vkrFf','lkEUW','eoFIH','Default','stringify','playwright-cli','setupHeaders','now','Failed\x20to\x20decrypt\x20auth\x20state:\x20','setupHeader','77nQpxHP','sLgNN','auth.json','path','code','ignoreHTTPSErrors','ranger-config','cdpEndpoint','entries','2401208LfebCf','dvLVS','args','ranger-auth-','JYpKD','QIAEn','getuid','JpFhj','1177204cjPwwH','CstcQ','ySrGQ','includes','repeat','executablePath','COAWh','rangerDir','5QhaSFm','mYSXA','grDhB','14HYMlTA','eBnFr','extraHTTPHeaders','4167JbNjSI','unJHP','Environment\x20variable\x20','\x20is\x20not\x20set','XxTpc','NDTEC','pBAgQ','string','MvAKM','catch','forWrite','BCVqD','MHLeZ','headless','object','uJpkb','2766189IsYBvD','auth.json.enc','YVNyt','eSIFc','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','settings.json','--disable-web-security','FquDA','env','map','gObXG','stagehand','YPmuU','isArray','qJEAY','ENOENT','Refusing\x20to\x20write\x20profile\x20\x22','BmiQw','legacy','--allow-insecure-localhost','join','allowInsecureLocalhost','--disable-setuid-sandbox','file','local','storageState','location','adGuf','Nemqh','safeMode','filter','--unsafely-treat-insecure-origin-as-secure=http://localhost','tabs','VsFJc','lOQzr','contextOptions','lUnCw','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','baseUrl','jPGwo','yMdHX','tnPXQ','NgKkO','tDOJW','Igbtq','3754204faVHue','xijRn','tlwTy','1854804WVlwtB','RVkht','kvuXZ','QTbjM','all','message','install','BtZZZ','7310ZzLFFr','length','chromium','eMwQf','caVUd','4183398MaMFkF','aRcpQ','push','1vPtpBh','-rangerwright.json','QKuWY','userAgent','AlZLv','SeFKE','VbYJN','zPKvp','aRNcu','FlpKj'];_0xbd33=function(){return _0x3b6e36;};return _0xbd33();}function parseKeyPath(_0x589311){const _0x5b6acc=_0x44a5db,_0x1e6fea={'QDHKA':function(_0x1841b0,_0x47a332){return _0x1841b0===_0x47a332;},'VzFXo':'header','BCVqD':'headers','Igbtq':_0x5b6acc(0xcd),'IZKRr':_0x5b6acc(0xca)},_0x330d3c=_0x589311['split']('.');return _0x1e6fea['QDHKA'](_0x330d3c[0x0],_0x1e6fea['VzFXo'])&&(_0x330d3c[0x0]=_0x1e6fea[_0x5b6acc(0x6e)]),_0x330d3c[0x0]===_0x1e6fea[_0x5b6acc(0x9f)]&&(_0x330d3c[0x0]=_0x1e6fea['IZKRr']),_0x330d3c;}export function formatSettings(_0x51a94d,_0x3f1f64=0x0){const _0xa9e067=_0x44a5db,_0xf400c={'gObXG':function(_0x580609,_0x1e011c){return _0x580609===_0x1e011c;},'pwYPB':'object'},_0x3f5472=[],_0xac0352='\x20\x20'[_0xa9e067(0xe3)](_0x3f1f64);for(const [_0x40b98f,_0xeca139]of Object['entries'](_0x51a94d)){if(_0xf400c['gObXG'](_0xeca139,undefined))continue;if(_0xf400c[_0xa9e067(0x7d)](typeof _0xeca139,_0xf400c['pwYPB'])&&_0xeca139!==null){_0x3f5472['push'](''+_0xac0352+_0x40b98f+':');for(const [_0x8b5ea8,_0x5bf915]of Object[_0xa9e067(0xd6)](_0xeca139)){_0x3f5472['push'](_0xac0352+'\x20\x20'+_0x8b5ea8+':\x20'+_0x5bf915);}}else _0x3f5472[_0xa9e067(0xb2)](''+_0xac0352+_0x40b98f+':\x20'+_0xeca139);}return _0x3f5472[_0xa9e067(0x87)]('\x0a');}
|
|
1
|
+
const _0xe4aa3=_0xdd77;(function(_0x4e2941,_0x698efa){const _0xfc52c8=_0xdd77,_0x5f2c04=_0x4e2941();while(!![]){try{const _0x25d898=-parseInt(_0xfc52c8(0x184))/0x1+parseInt(_0xfc52c8(0x1ba))/0x2*(-parseInt(_0xfc52c8(0x178))/0x3)+-parseInt(_0xfc52c8(0x1cb))/0x4*(parseInt(_0xfc52c8(0x1a5))/0x5)+parseInt(_0xfc52c8(0x180))/0x6*(-parseInt(_0xfc52c8(0x16d))/0x7)+parseInt(_0xfc52c8(0x1c4))/0x8*(parseInt(_0xfc52c8(0x1a8))/0x9)+-parseInt(_0xfc52c8(0x188))/0xa+parseInt(_0xfc52c8(0x17e))/0xb*(parseInt(_0xfc52c8(0x1dc))/0xc);if(_0x25d898===_0x698efa)break;else _0x5f2c04['push'](_0x5f2c04['shift']());}catch(_0x5dfba0){_0x5f2c04['push'](_0x5f2c04['shift']());}}}(_0x5def,0xccc50));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(_0x5bb568,_0x166b1f){const _0x4ccbf7=_0xdd77,_0x5a94ca={'ZEcak':function(_0x54a098,_0x468262,_0x4d85e4){return _0x54a098(_0x468262,_0x4d85e4);},'SvDEt':function(_0x189eaa,_0x1876c3){return _0x189eaa(_0x1876c3);}},_0x1129a4=join(_0x166b1f,'ci',_0x5bb568),_0x1bc9b7=join(_0x166b1f,_0x4ccbf7(0x1a6),_0x5bb568),_0x4e8753=_0x5a94ca['ZEcak'](join,_0x166b1f,_0x5bb568),_0x4b14f8=_0x5a94ca[_0x4ccbf7(0x1bd)](join,_0x166b1f,_0x4ccbf7(0x1a6)),_0x5435bb=_0x5a94ca[_0x4ccbf7(0x1bd)](join,_0x166b1f,'ci');if(existsSync(_0x1129a4))return _0x1129a4;if(_0x5a94ca[_0x4ccbf7(0x1c6)](existsSync,_0x1bc9b7))return _0x1bc9b7;if(existsSync(_0x4e8753)&&(_0x4e8753!==_0x4b14f8&&_0x4e8753!==_0x5435bb?!![]:_0x5a94ca[_0x4ccbf7(0x1c6)](hasLegacyProfileFiles,_0x4e8753)))return _0x4e8753;return null;}export function getEnvDir(_0x3eb7cb,_0x54077e={}){const _0x3a72fb=_0xdd77,_0x5ba58d={'xwbdv':function(_0x1bccc4,_0xf524f8,_0x355721){return _0x1bccc4(_0xf524f8,_0x355721);},'qJVHJ':function(_0xa7553,_0x3dddbb,_0x303822){return _0xa7553(_0x3dddbb,_0x303822);},'DivLE':function(_0x201420,_0x5885ea){return _0x201420!==_0x5885ea;},'RfMPh':'local','geykp':function(_0x90b4f,_0x3cd215,_0x3decc7){return _0x90b4f(_0x3cd215,_0x3decc7);}},_0x471bb9=getRangerDir(),_0x25c622=_0x5ba58d['xwbdv'](findEnvInRoot,_0x3eb7cb,_0x471bb9);if(_0x25c622){if(_0x54077e['forWrite']&&isLegacyEnvPath(_0x25c622))throw _0x5ba58d['qJVHJ'](legacyWriteError,_0x3eb7cb,_0x25c622);return _0x25c622;}const _0x4b3802=getRangerHomeDir();if(_0x5ba58d[_0x3a72fb(0x17f)](_0x4b3802,_0x471bb9)){const _0x1d51c1=_0x5ba58d[_0x3a72fb(0x18c)](findEnvInRoot,_0x3eb7cb,_0x4b3802);if(_0x1d51c1){if(_0x54077e[_0x3a72fb(0x164)]&&isLegacyEnvPath(_0x1d51c1))throw legacyWriteError(_0x3eb7cb,_0x1d51c1);return _0x1d51c1;}}const _0xbb42a1=join(_0x4b3802,_0x5ba58d[_0x3a72fb(0x187)],_0x3eb7cb);if(_0x54077e[_0x3a72fb(0x164)])throw _0x5ba58d['geykp'](legacyWriteError,_0x3eb7cb,_0xbb42a1);return _0xbb42a1;}function isLegacyEnvPath(_0x5b5772){const _0x896fe6=_0xdd77,_0x486771={'vUUoV':function(_0x3ce548){return _0x3ce548();},'TjVxl':function(_0x44de90,_0x5a93a5){return _0x44de90+_0x5a93a5;}},_0x38db88=_0x486771[_0x896fe6(0x1b2)](getRangerDir),_0x151e98=getRangerHomeDir();for(const _0x22657b of new Set([_0x38db88,_0x151e98])){const _0x2bab6a=_0x22657b['endsWith']('/')?_0x22657b:_0x486771['TjVxl'](_0x22657b,'/');if(_0x5b5772===_0x22657b||_0x5b5772[_0x896fe6(0x193)](_0x2bab6a))return!![];}return![];}function legacyWriteError(_0x5d0565,_0x327a3d){const _0x4bf7a4=_0xdd77,_0x92bfb6={'jbQzF':function(_0x536a16,_0x5e220b){return _0x536a16+_0x5e220b;}};return new Error(_0x92bfb6[_0x4bf7a4(0x1aa)](_0x4bf7a4(0x1dd)+_0x5d0565+_0x4bf7a4(0x1c8)+_0x327a3d+'.\x0a'+_0x4bf7a4(0x160)+_0x4bf7a4(0x1af),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x1b2fec,_0x3dd1f2){const _0x1854b5=_0xdd77,_0x514e5d={'mZiPm':function(_0x51cf31){return _0x51cf31();},'iPFlU':function(_0x3ad820){return _0x3ad820();},'XVBqd':function(_0x3c8b36,_0x6cdd5d,_0x2c4abc){return _0x3c8b36(_0x6cdd5d,_0x2c4abc);},'TmMGs':_0x1854b5(0x1a6),'HFmPw':function(_0x114655,_0x4ff494,_0x23dd11,_0xa1c0e0){return _0x114655(_0x4ff494,_0x23dd11,_0xa1c0e0);},'fWxuJ':'legacy','AKcMl':function(_0x703bcb,_0x32a58c){return _0x703bcb(_0x32a58c);},'KHVhT':function(_0x44fc86,_0x349e7a){return _0x44fc86===_0x349e7a;}},_0x4b46bb=_0x3dd1f2?.[_0x1854b5(0x1b3)],_0x4354d2=_0x4b46bb?[_0x4b46bb]:[_0x514e5d['mZiPm'](getRangerDir),_0x514e5d[_0x1854b5(0x1d1)](getRangerHomeDir)]['filter']((_0x58409e,_0xc77d70,_0x97de4f)=>_0x97de4f[_0x1854b5(0x1b7)](_0x58409e)===_0xc77d70),_0x2d5d39=_0x3dd1f2?.['locations']??['ci','local',_0x1854b5(0x171)];for(const _0x11e012 of _0x4354d2){const _0x41e623=_0x514e5d[_0x1854b5(0x18e)](join,_0x11e012,'local'),_0xbe7a53=_0x514e5d[_0x1854b5(0x18e)](join,_0x11e012,'ci'),_0x143440=[{'location':'ci','path':join(_0x11e012,'ci',_0x1b2fec)},{'location':_0x514e5d['TmMGs'],'path':_0x514e5d[_0x1854b5(0x1da)](join,_0x11e012,_0x514e5d['TmMGs'],_0x1b2fec)},{'location':_0x514e5d[_0x1854b5(0x16b)],'path':join(_0x11e012,_0x1b2fec)}];for(const _0xd00f56 of _0x143440){if(_0x2d5d39['includes'](_0xd00f56[_0x1854b5(0x1cf)])&&_0x514e5d[_0x1854b5(0x175)](existsSync,_0xd00f56[_0x1854b5(0x1c7)])){if(_0xd00f56[_0x1854b5(0x1cf)]===_0x1854b5(0x171)&&(_0x514e5d['KHVhT'](_0xd00f56[_0x1854b5(0x1c7)],_0x41e623)||_0x514e5d[_0x1854b5(0x1b1)](_0xd00f56[_0x1854b5(0x1c7)],_0xbe7a53))&&!_0x514e5d['AKcMl'](hasLegacyProfileFiles,_0xd00f56['path']))continue;return{'path':_0xd00f56['path'],'location':_0xd00f56['location']};}}}return null;}function hasLegacyProfileFiles(_0xba8093){const _0x321f94=_0xdd77,_0xcb7701={'sPSmQ':function(_0x4d368e,_0x4a5ace){return _0x4d368e(_0x4a5ace);},'NAPRR':'settings.json','MqfSY':function(_0xe5559,_0x1099c5,_0xfcc811){return _0xe5559(_0x1099c5,_0xfcc811);},'ksQGq':_0x321f94(0x1c1),'UYCiI':function(_0x1cb421,_0x5a1fd7){return _0x1cb421(_0x5a1fd7);}};return _0xcb7701[_0x321f94(0x1ad)](existsSync,join(_0xba8093,_0xcb7701['NAPRR']))||existsSync(_0xcb7701[_0x321f94(0x168)](join,_0xba8093,_0xcb7701['ksQGq']))||_0xcb7701[_0x321f94(0x18f)](existsSync,join(_0xba8093,'auth.json.enc'));}export function isEnvCi(_0xed822a){const _0x3b3ef6=_0xdd77,_0x45fab3={'OtyON':function(_0x1ac9a4){return _0x1ac9a4();},'BSMiQ':function(_0x80c1ca,_0x4f3efa){return _0x80c1ca(_0x4f3efa);},'KVqQB':function(_0xc24877,_0x45489d,_0x2d0df2,_0x314f94){return _0xc24877(_0x45489d,_0x2d0df2,_0x314f94);}};if(existsSync(join(getRangerDir(),'ci',_0xed822a)))return!![];const _0x5c4aa7=getRangerHomeDir();if(_0x5c4aa7!==_0x45fab3['OtyON'](getRangerDir)&&_0x45fab3[_0x3b3ef6(0x17c)](existsSync,_0x45fab3[_0x3b3ef6(0x197)](join,_0x5c4aa7,'ci',_0xed822a)))return!![];return![];}export async function cleanupTempFiles(_0x3dc907){const _0x4702d0=_0xdd77,_0x1c55b0={'mKoth':function(_0x35bef8,_0x314cb3){return _0x35bef8!==_0x314cb3;}},_0x36d9c0=[_0x3dc907['tempAuthPath'],_0x3dc907['configPath']][_0x4702d0(0x15a)](Boolean);await Promise[_0x4702d0(0x1a1)](_0x36d9c0['map'](_0x566da9=>unlink(_0x566da9)[_0x4702d0(0x195)](_0x5c8e74=>{const _0x4e6960=_0x4702d0;_0x1c55b0[_0x4e6960(0x1a4)](_0x5c8e74[_0x4e6960(0x19c)],'ENOENT')&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x566da9+':',_0x5c8e74[_0x4e6960(0x17a)]);})));}function _0x5def(){const _0xcfb9fe=['args','iPFlU','utf-8','oVltV','boolean','clipboard-write','vHYPN','isArray','wrrHw','ranger-auth-','HFmPw','nzMHp','5881848BUWeTv','Refusing\x20to\x20write\x20profile\x20\x22','.json','contextOptions','lGvXK','filter','playwright-cli','file','UZGmT','aemSm','DCNyH','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','launchOptions','fNPlz','header','forWrite','dtrdv','--disable-setuid-sandbox','FKmJK','MqfSY','replace','push','fWxuJ','fromEntries','77hXwgpP','UcGZk','ODnyd','LNtbo','legacy','setupHeader','NzPgx','storageStatePath','AKcMl','Plmsh','headless','224661xZtnHg','tCxyz','message','string','BSMiQ','tjOIQ','77NuzlMg','DivLE','811812KNFGPg','DEIuJ','--no-sandbox','install','762447alfHzN','DKTas','cBwNP','RfMPh','5324970tSDLIY','xllrD','--unsafely-treat-insecure-origin-as-secure=http://localhost','storageState','qJVHJ','Kiomw','XVBqd','UYCiI','getuid','browser','-cli','startsWith','sSHez','catch','entries','KVqQB','length','parse','MNEcx','includes','code','extraHTTPHeaders','map','LzWDi','object','all','XdgEY','UFvrF','mKoth','919325iBffOH','local','CsfQL','9KGadaL','EhslI','jbQzF','MxpSs','userAgent','sPSmQ','KbbCo','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','aMudF','KHVhT','vUUoV','rangerDir','baseUrl','jyPMm','Failed\x20to\x20decrypt\x20auth\x20state:\x20','indexOf','VrQns','azZvy','34EhDqNR','core','cdpEndpoint','ZEcak','tabs','allowInsecureLocalhost','stringify','auth.json','SwIbc','sessions','13182944eWFwxv','--allow-running-insecure-content','SvDEt','path','\x22\x20to\x20legacy\x20path\x20','AsXaz','executablePath','4BldgSm','zjnes','join','kKXLs','location'];_0x5def=function(){return _0xcfb9fe;};return _0x5def();}export function getSettingsPath(_0x378fab){return join(getEnvDir(_0x378fab),'settings.json');}export async function loadSettings(_0x39d478){const _0x5f489b=_0xdd77,_0x52bc89={'FOOhO':function(_0x5dd567,_0x88d685){return _0x5dd567(_0x88d685);},'Kiomw':function(_0x367e30,_0x1908e2,_0x1b8d59){return _0x367e30(_0x1908e2,_0x1b8d59);},'RIgUO':_0x5f489b(0x1d2)},_0x43fcb2=getSettingsPath(_0x39d478);if(!_0x52bc89['FOOhO'](existsSync,_0x43fcb2))return{};try{const _0x49ef84=await _0x52bc89[_0x5f489b(0x18d)](readFile,_0x43fcb2,_0x52bc89['RIgUO']);return JSON[_0x5f489b(0x199)](_0x49ef84);}catch{return{};}}export async function saveSettings(_0x5c9d42,_0x459364){const _0x509aee=_0xdd77,_0x5b4892={'CsfQL':function(_0x215613,_0x154398){return _0x215613(_0x154398);},'MTueZ':function(_0x496131,_0x3b1101,_0x409637){return _0x496131(_0x3b1101,_0x409637);}},_0x197390=_0x5b4892['CsfQL'](getSettingsPath,_0x5c9d42),_0x46023b=dirname(_0x197390);!_0x5b4892[_0x509aee(0x1a7)](existsSync,_0x46023b)&&await _0x5b4892['MTueZ'](mkdir,_0x46023b,{'recursive':!![]}),await writeFile(_0x197390,JSON['stringify'](_0x459364,null,0x2));}export function resolveEnvVars(_0x238122){const _0xab4b24=_0xdd77,_0x3e0e28={'nzMHp':function(_0x67e8a4,_0x896e56){return _0x67e8a4===_0x896e56;},'uIqHj':'string','MxpSs':'object'};if(typeof _0x238122===_0x3e0e28['uIqHj'])return _0x238122[_0xab4b24(0x169)](/\$\{(\w+)\}/g,(_0x5d4607,_0x25ce56)=>{const _0x141822=_0xab4b24,_0x58b69c=process['env'][_0x25ce56];if(_0x3e0e28[_0x141822(0x1db)](_0x58b69c,undefined))throw new Error('Environment\x20variable\x20'+_0x25ce56+'\x20is\x20not\x20set');return _0x58b69c;});if(Array[_0xab4b24(0x1d7)](_0x238122))return _0x238122[_0xab4b24(0x19e)](resolveEnvVars);if(_0x238122&&typeof _0x238122===_0x3e0e28[_0xab4b24(0x1ab)])return Object[_0xab4b24(0x16c)](Object[_0xab4b24(0x196)](_0x238122)['map'](([_0x43db9f,_0x31c621])=>[_0x43db9f,resolveEnvVars(_0x31c621)]));return _0x238122;}const isRecord=_0x355b73=>typeof _0x355b73===_0xe4aa3(0x1a0)&&_0x355b73!==null&&!Array[_0xe4aa3(0x1d7)](_0x355b73),asRecord=_0x405271=>isRecord(_0x405271)?_0x405271:undefined,mergeHeaders=(_0x40b1dd,_0xf22794)=>{const _0xc35620={'qHnMu':function(_0x17eced,_0x1baccd){return _0x17eced??_0x1baccd;}},_0x5abbd5={..._0xc35620['qHnMu'](_0x40b1dd,{}),..._0xf22794??{}};return Object['keys'](_0x5abbd5)['length']?_0x5abbd5:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0xe4aa3(0x1c5),_0xe4aa3(0x18a),'--allow-insecure-localhost'];function _0xdd77(_0x58885b,_0x30e480){_0x58885b=_0x58885b-0x159;const _0x5def82=_0x5def();let _0xdd77c=_0x5def82[_0x58885b];return _0xdd77c;}export function buildBrowserOptionsFromSettings(_0x561d14,_0x3acc13={}){const _0x479efb=_0xe4aa3,_0x39b4b0={'EhslI':_0x479efb(0x1d4),'nRrkM':function(_0x2a5344,_0x4e9a1f){return _0x2a5344===_0x4e9a1f;},'lGVge':function(_0x1aa18d,_0x5d0ea3,_0x4133db){return _0x1aa18d(_0x5d0ea3,_0x4133db);},'zjnes':function(_0x5f508d,_0x58ed4e){return _0x5f508d(_0x58ed4e);}},_0xae7fba=asRecord(_0x561d14['browser']),_0x4ce9d2={...asRecord(_0xae7fba?.[_0x479efb(0x161)])??{}};typeof _0x3acc13['headless']===_0x39b4b0[_0x479efb(0x1a9)]&&(_0x4ce9d2['headless']=_0x3acc13[_0x479efb(0x177)]);if(_0x561d14['safeMode']){const _0x483c3a=_0x4ce9d2['args']??[],_0x4170f0=SAFE_MODE_ARGS['filter'](_0x504f22=>!_0x483c3a['includes'](_0x504f22));_0x4ce9d2[_0x479efb(0x1d0)]=[..._0x483c3a,..._0x4170f0];}if(_0x561d14[_0x479efb(0x1bf)]){const _0x2d2ba1=_0x4ce9d2['args']??[],_0x1fc0f0=ALLOW_LOCALHOST_ARGS['filter'](_0x2a67b9=>!_0x2d2ba1[_0x479efb(0x19b)](_0x2a67b9));_0x4ce9d2['args']=[..._0x2d2ba1,..._0x1fc0f0];}const _0x2b4fdf={...asRecord(_0xae7fba?.[_0x479efb(0x1df)])??{}};_0x2b4fdf['ignoreHTTPSErrors']=!![];_0x39b4b0['nRrkM'](typeof _0x561d14['userAgent'],'string')&&(_0x2b4fdf['userAgent']=_0x561d14[_0x479efb(0x1ac)]);const _0x4a88dc=_0x39b4b0['lGVge'](mergeHeaders,_0x39b4b0[_0x479efb(0x1cc)](asRecord,_0x2b4fdf[_0x479efb(0x19d)]),_0x39b4b0['zjnes'](asRecord,_0x561d14['headers']));return _0x4a88dc?_0x2b4fdf['extraHTTPHeaders']=_0x4a88dc:delete _0x2b4fdf[_0x479efb(0x19d)],_0x3acc13['storageStatePath']&&(_0x2b4fdf['storageState']=_0x3acc13[_0x479efb(0x174)]),{'launchOptions':_0x4ce9d2,'contextOptions':_0x2b4fdf};}export async function resolveProfileStorageState(_0x3266aa){const _0x4a779a={'MRzLb':function(_0x3406db,_0x29246b){return _0x3406db(_0x29246b);}};return _0x4a779a['MRzLb'](resolveLocalAuthPath,_0x4a779a['MRzLb'](getEnvDir,_0x3266aa));}async function resolveLocalAuthPath(_0x109f94){const _0x1c7cd9=_0xe4aa3,_0x4a4bdc={'Plmsh':function(_0x15abcd,_0x32ba06,_0x154a98){return _0x15abcd(_0x32ba06,_0x154a98);},'FKmJK':function(_0x5a181d,_0x2d6e77,_0x4b1080){return _0x5a181d(_0x2d6e77,_0x4b1080);},'NzPgx':function(_0x53c7f9,_0x59de17){return _0x53c7f9(_0x59de17);},'oVltV':function(_0x42edf1){return _0x42edf1();},'UcGZk':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','SwIbc':function(_0x5925a2,_0x4174db,_0x4b6941){return _0x5925a2(_0x4174db,_0x4b6941);},'cBwNP':function(_0x5c4600,_0x1bfa54){return _0x5c4600 instanceof _0x1bfa54;}},_0x11b9b3=_0x4a4bdc[_0x1c7cd9(0x176)](join,_0x109f94,'auth.json.enc'),_0x1d0aee=_0x4a4bdc[_0x1c7cd9(0x167)](join,_0x109f94,_0x1c7cd9(0x1c1));if(_0x4a4bdc[_0x1c7cd9(0x173)](existsSync,_0x11b9b3))try{const _0x28a9b0=await _0x4a4bdc[_0x1c7cd9(0x1d3)](getToken);if(!_0x28a9b0)throw new Error(_0x4a4bdc[_0x1c7cd9(0x16e)]);const _0x4d6ffa=await readFile(_0x11b9b3),_0x1248ea=_0x4a4bdc['Plmsh'](decrypt,_0x4d6ffa,_0x28a9b0),_0x26eca0=_0x4a4bdc[_0x1c7cd9(0x1c2)](join,_0x4a4bdc[_0x1c7cd9(0x1d3)](tmpdir),_0x1c7cd9(0x1d9)+Date['now']()+_0x1c7cd9(0x1de));return await writeFile(_0x26eca0,_0x1248ea),{'storageStatePath':_0x26eca0,'tempAuthPath':_0x26eca0};}catch(_0x5bff83){const _0x4e8980=_0x4a4bdc[_0x1c7cd9(0x186)](_0x5bff83,Error)?_0x5bff83['message']:String(_0x5bff83);throw new Error(_0x1c7cd9(0x1b6)+_0x4e8980);}if(_0x4a4bdc['NzPgx'](existsSync,_0x1d0aee))return{'storageStatePath':_0x1d0aee};return{};}export async function buildPlaywrightConfig(_0x51bf53,_0x50f8f2,_0x1011c6,_0x1a350b,_0x5c5ab4){const _0x4ae7f9=_0xe4aa3,_0x13223f={'mzQqO':function(_0x39edf0,_0x427864,_0x2ed910,_0x5dd67b,_0x563ea4,_0x5387f7,_0x1c1f1e){return _0x39edf0(_0x427864,_0x2ed910,_0x5dd67b,_0x563ea4,_0x5387f7,_0x1c1f1e);},'EBQNS':function(_0x11b5f0,_0x18418e){return _0x11b5f0(_0x18418e);},'PPvxF':function(_0x51399c,_0x3ebe6f){return _0x51399c(_0x3ebe6f);},'UFvrF':function(_0x3b7836,_0x4cf267,_0x483176,_0x3d3095,_0xbe1545,_0x5ab911,_0x264ff8){return _0x3b7836(_0x4cf267,_0x483176,_0x3d3095,_0xbe1545,_0x5ab911,_0x264ff8);},'KbbCo':'stagehand'};if(_0x5c5ab4)return _0x13223f['mzQqO'](buildPlaywrightConfigCore,_0x51bf53,_0x5c5ab4,_0x50f8f2,_0x1011c6,_0x1a350b,'stagehand');const {storageStatePath:_0x24e0a7,tempAuthPath:_0x4ea42f}=await _0x13223f['EBQNS'](resolveLocalAuthPath,_0x13223f['PPvxF'](getEnvDir,_0x50f8f2));try{const _0x373c7e=await _0x13223f[_0x4ae7f9(0x1a3)](buildPlaywrightConfigCore,_0x51bf53,_0x24e0a7,_0x50f8f2,_0x1011c6,_0x1a350b,_0x13223f[_0x4ae7f9(0x1ae)]);return{..._0x373c7e,'tempAuthPath':_0x4ea42f};}catch(_0x303ce5){_0x4ea42f&&await unlink(_0x4ea42f)[_0x4ae7f9(0x195)](()=>{});throw _0x303ce5;}}export async function buildPlaywrightConfigCore(_0x277824,_0x13cbfd,_0x906e98,_0x25c649,_0x42626b,_0x4bea40='stagehand'){const _0x226d28=_0xe4aa3,_0x2bab03={'LNtbo':function(_0x19ee7e,_0x238c53,_0x2ce445){return _0x19ee7e(_0x238c53,_0x2ce445);},'AsXaz':function(_0x58e83a,_0x2181bb){return _0x58e83a===_0x2181bb;},'raQEF':'--no-sandbox','DJpmR':'--disable-setuid-sandbox','znHTl':'clipboard-write','AojlL':function(_0x15708c){return _0x15708c();},'ckUCF':_0x226d28(0x1c3),'imyOd':'chromium','sSHez':_0x226d28(0x15c),'jkdnz':'pdf','LwNsh':'vision','xllrD':'allow','tCxyz':'ranger-config','vHYPN':function(_0x166365,_0x2aad81){return _0x166365(_0x2aad81);},'lGvXK':function(_0x4bcb21,_0x23cde5){return _0x4bcb21===_0x23cde5;},'ZZSqN':'playwright-cli','yNQpP':_0x226d28(0x192)},_0xbf12b=_0x25c649||randomUUID(),_0x918a38=join(_0x2bab03['AojlL'](getRangerDir),_0x2bab03['ckUCF'],_0xbf12b),_0x255564=Boolean(_0x277824[_0x226d28(0x1bc)]),_0x23a5e5=_0x255564?{'browserName':_0x2bab03['imyOd'],'cdpEndpoint':_0x277824['cdpEndpoint']}:((()=>{const _0x3af46e=_0x226d28,{launchOptions:_0x3c4228,contextOptions:_0x1c97bf}=_0x2bab03[_0x3af46e(0x170)](buildBrowserOptionsFromSettings,_0x277824,{'headless':_0x42626b?![]:_0x277824[_0x3af46e(0x177)]??!![],'storageStatePath':_0x13cbfd});if(_0x2bab03[_0x3af46e(0x1c9)](process[_0x3af46e(0x190)]?.(),0x0)){const _0x2e607b=[_0x2bab03['raQEF'],_0x2bab03['DJpmR']],_0x5c077e=_0x3c4228['args']??[],_0x50c3d7=_0x2e607b['filter'](_0x11da3c=>!_0x5c077e[_0x3af46e(0x19b)](_0x11da3c));_0x3c4228[_0x3af46e(0x1d0)]=[..._0x5c077e,..._0x50c3d7];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x3c4228,'contextOptions':{..._0x1c97bf,'permissions':['clipboard-read',_0x2bab03['znHTl']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3f2791=_0x4bea40===_0x226d28(0x15b)?{'browser':_0x23a5e5,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x918a38,'outputMode':_0x2bab03[_0x226d28(0x194)],'codegen':'none'}:{'name':_0x906e98,'browser':_0x23a5e5,'capabilities':[_0x226d28(0x1bb),_0x226d28(0x1be),_0x226d28(0x183),_0x2bab03['jkdnz'],_0x2bab03['LwNsh']],'imageResponses':_0x2bab03[_0x226d28(0x189)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x918a38};if(!_0x255564){const _0x577659=_0x3f2791[_0x226d28(0x191)],_0x41fbf5=_0x577659[_0x226d28(0x1df)];if(_0x2bab03['AsXaz'](_0x41fbf5[_0x226d28(0x1ac)],undefined))delete _0x41fbf5['userAgent'];if(_0x2bab03['AsXaz'](_0x41fbf5['storageState'],undefined))delete _0x41fbf5[_0x226d28(0x18b)];}const _0x5746a0=_0x2bab03[_0x226d28(0x170)](join,tmpdir(),_0x2bab03[_0x226d28(0x179)]);!_0x2bab03[_0x226d28(0x1d6)](existsSync,_0x5746a0)&&await mkdir(_0x5746a0,{'recursive':!![]});const _0x387581=_0x2bab03[_0x226d28(0x159)](_0x4bea40,_0x2bab03['ZZSqN'])?_0x2bab03['yNQpP']:'',_0x37fa17=join(_0x5746a0,_0x906e98+'-'+Date['now']()+_0x387581+'.json');return await _0x2bab03[_0x226d28(0x170)](writeFile,_0x37fa17,JSON['stringify'](_0x3f2791,null,0x2)),{'configPath':_0x37fa17,'storageStatePath':_0x13cbfd};}export async function buildPlaywrightCliConfig(_0x2ea59c,_0x2bdc1e,_0x5b5c6b,_0x23b040,_0xaa2721){const _0x3d8149=_0xe4aa3,_0x217cb6={'MNEcx':function(_0x5198c1,_0x28e0e7,_0x516a03,_0xd9f794,_0x21da37,_0x35c943,_0x4dcb72){return _0x5198c1(_0x28e0e7,_0x516a03,_0xd9f794,_0x21da37,_0x35c943,_0x4dcb72);},'DEIuJ':function(_0x4e9625,_0x504a65){return _0x4e9625(_0x504a65);},'BGzHl':'playwright-cli'};if(_0xaa2721)return _0x217cb6[_0x3d8149(0x19a)](buildPlaywrightConfigCore,_0x2ea59c,_0xaa2721,_0x2bdc1e,_0x5b5c6b,_0x23b040,_0x3d8149(0x15b));const {storageStatePath:_0x4c1e58,tempAuthPath:_0x3b1831}=await _0x217cb6[_0x3d8149(0x181)](resolveLocalAuthPath,getEnvDir(_0x2bdc1e));try{const _0x119026=await buildPlaywrightConfigCore(_0x2ea59c,_0x4c1e58,_0x2bdc1e,_0x5b5c6b,_0x23b040,_0x217cb6['BGzHl']);return{..._0x119026,'tempAuthPath':_0x3b1831};}catch(_0x29542e){_0x3b1831&&await _0x217cb6['DEIuJ'](unlink,_0x3b1831)['catch'](()=>{});throw _0x29542e;}}export async function buildRangerwrightCliConfig(_0x3262a7,_0x3a7b45,_0x7403d0,_0x30b243,_0x18fa72){const _0x5654e6=_0xe4aa3,_0x5ed120={'tjOIQ':function(_0x1bd1f1,_0x206b27,_0x2dbc00){return _0x1bd1f1(_0x206b27,_0x2dbc00);},'iQlvl':function(_0x1ba203,_0x56130b){return _0x1ba203===_0x56130b;},'FQbQJ':'--no-sandbox','JJpCX':_0x5654e6(0x1d5),'DpVxP':function(_0x555089){return _0x555089();},'XdgEY':function(_0x56da87){return _0x56da87();},'gYQwB':'chromium','UAyYr':'ranger-config','kKXLs':function(_0x4bb2de,_0x1356ce){return _0x4bb2de(_0x1356ce);}},{storageStatePath:_0xd87d5,tempAuthPath:_0x3012fa}=_0x18fa72?{'storageStatePath':_0x18fa72,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x3a7b45)),_0x425503=_0x7403d0||_0x5ed120['DpVxP'](randomUUID),_0x4bdf1c=join(_0x5ed120[_0x5654e6(0x1a2)](getRangerDir),'sessions',_0x425503),_0x9bd4d1=Boolean(_0x3262a7[_0x5654e6(0x1bc)]),_0x51f981=_0x9bd4d1?{'browserName':_0x5ed120['gYQwB'],'cdpEndpoint':_0x3262a7[_0x5654e6(0x1bc)]}:((()=>{const _0x326b85=_0x5654e6,{launchOptions:_0x27c0df,contextOptions:_0x3fbdb1}=_0x5ed120['tjOIQ'](buildBrowserOptionsFromSettings,_0x3262a7,{'headless':_0x30b243?![]:_0x3262a7[_0x326b85(0x177)]??!![],'storageStatePath':_0xd87d5});if(_0x5ed120['iQlvl'](process['getuid']?.(),0x0)){const _0x348d40=[_0x5ed120['FQbQJ'],_0x326b85(0x166)],_0x34354c=_0x27c0df[_0x326b85(0x1d0)]??[],_0x4c6ffb=_0x348d40[_0x326b85(0x15a)](_0x26c75c=>!_0x34354c[_0x326b85(0x19b)](_0x26c75c));_0x27c0df[_0x326b85(0x1d0)]=[..._0x34354c,..._0x4c6ffb];}return{'browserName':'chromium','launchOptions':_0x27c0df,'contextOptions':{..._0x3fbdb1,'permissions':['clipboard-read',_0x5ed120['JJpCX']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x9bd4d1){const _0x2d4e31=_0x51f981['contextOptions'];if(_0x2d4e31){if(_0x2d4e31[_0x5654e6(0x1ac)]===undefined)delete _0x2d4e31[_0x5654e6(0x1ac)];if(_0x2d4e31['storageState']===undefined)delete _0x2d4e31[_0x5654e6(0x18b)];}}const _0x409f57={'browser':_0x51f981,'outputDir':_0x4bdf1c,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x4fe1ef;try{const _0x7ff9c7=join(tmpdir(),_0x5ed120['UAyYr']);!_0x5ed120['kKXLs'](existsSync,_0x7ff9c7)&&await _0x5ed120[_0x5654e6(0x17d)](mkdir,_0x7ff9c7,{'recursive':!![]}),_0x4fe1ef=join(_0x7ff9c7,_0x3a7b45+'-'+Date['now']()+'-rangerwright.json'),await writeFile(_0x4fe1ef,JSON[_0x5654e6(0x1c0)](_0x409f57,null,0x2));}catch(_0x2d48db){_0x3012fa&&await _0x5ed120[_0x5654e6(0x1ce)](unlink,_0x3012fa)[_0x5654e6(0x195)](()=>{});throw _0x2d48db;}return{'configPath':_0x4fe1ef,'storageStatePath':_0xd87d5,'tempAuthPath':_0x3012fa,'outputDir':_0x4bdf1c};}export async function buildNovaActCliConfig(_0x1ca408,_0x19d667,_0x1e470b,_0x4fa15f,_0x1da96a){const _0x5513d0=_0xe4aa3,_0x475daa={'aMudF':function(_0x2993ac,_0x139c77){return _0x2993ac(_0x139c77);},'wrrHw':function(_0x1dffdf,_0x3ddd8a){return _0x1dffdf(_0x3ddd8a);},'xbmrh':function(_0x2aa4c5){return _0x2aa4c5();},'QcJsY':_0x5513d0(0x1c3),'dtrdv':function(_0x2b0dfd,_0x592e57,_0x6b74b6){return _0x2b0dfd(_0x592e57,_0x6b74b6);},'vLBOx':'Default','XBpAS':function(_0x430a5f,_0x429357){return _0x430a5f===_0x429357;},'fNPlz':_0x5513d0(0x182),'SZzsx':function(_0x409010,_0x59249c){return _0x409010===_0x59249c;}},{storageStatePath:_0x54eb9f,tempAuthPath:_0x298983}=_0x1da96a?{'storageStatePath':_0x1da96a,'tempAuthPath':undefined}:await _0x475daa[_0x5513d0(0x1b0)](resolveLocalAuthPath,_0x475daa['wrrHw'](getEnvDir,_0x19d667)),_0x2d265c=_0x1e470b||randomUUID(),_0x384278=join(_0x475daa['xbmrh'](getRangerDir),_0x475daa['QcJsY'],_0x2d265c),_0x219c09=_0x475daa[_0x5513d0(0x165)](join,_0x384278,'nova-user-data'),_0x44babd=_0x54eb9f?join(_0x219c09,_0x475daa['vLBOx']):undefined,{launchOptions:_0x52c3a5,contextOptions:_0xbd3466}=buildBrowserOptionsFromSettings(_0x1ca408,{'headless':_0x4fa15f?![]:_0x1ca408[_0x5513d0(0x177)]??!![],'storageStatePath':_0x54eb9f});if(_0x475daa['XBpAS'](process[_0x5513d0(0x190)]?.(),0x0)){const _0x595a14=[_0x475daa[_0x5513d0(0x162)],'--disable-setuid-sandbox'],_0x3507b1=_0x52c3a5[_0x5513d0(0x1d0)]??[],_0x8f22b5=_0x595a14['filter'](_0x22afd4=>!_0x3507b1[_0x5513d0(0x19b)](_0x22afd4));_0x52c3a5[_0x5513d0(0x1d0)]=[..._0x3507b1,..._0x8f22b5];}const _0x22252f=typeof _0x52c3a5['executablePath']==='string'?_0x52c3a5['executablePath']:_0x54eb9f?chromium[_0x5513d0(0x1ca)]():undefined;return{'storageStatePath':_0x54eb9f,'tempAuthPath':_0x298983,'baseUrl':_0x1ca408[_0x5513d0(0x1b4)],'headless':Boolean(_0x52c3a5['headless']),'userDataDir':_0x219c09,'browserProfilePath':_0x44babd,'executablePath':_0x22252f,'launchArgs':Array[_0x5513d0(0x1d7)](_0x52c3a5['args'])?_0x52c3a5['args'][_0x5513d0(0x15a)](_0x12162b=>typeof _0x12162b===_0x5513d0(0x17b)):[],'userAgent':_0x475daa['SZzsx'](typeof _0xbd3466['userAgent'],_0x5513d0(0x17b))?_0xbd3466[_0x5513d0(0x1ac)]:undefined,'extraHTTPHeaders':_0xbd3466[_0x5513d0(0x19d)],'allowInsecureLocalhost':_0x475daa[_0x5513d0(0x1d8)](Boolean,_0x1ca408['allowInsecureLocalhost']),'safeMode':Boolean(_0x1ca408['safeMode']),'cdpEndpoint':_0x1ca408['cdpEndpoint'],'isCdpMode':Boolean(_0x1ca408[_0x5513d0(0x1bc)])};}export function getNestedValue(_0x34020a,_0x36549d){const _0x2d0eaa=_0xe4aa3,_0x467ffc={'sUZZc':function(_0x1fe8f2,_0x431113){return _0x1fe8f2===_0x431113;},'LzWDi':function(_0xe1eb64,_0x1ad52b){return _0xe1eb64===_0x1ad52b;},'ifreI':function(_0x65e127,_0x4d727a){return _0x65e127!==_0x4d727a;}},_0xf7f330=parseKeyPath(_0x36549d);let _0x4d9481=_0x34020a;for(const _0x4d2e30 of _0xf7f330){if(_0x467ffc['sUZZc'](_0x4d9481,null)||_0x467ffc[_0x2d0eaa(0x19f)](_0x4d9481,undefined)||_0x467ffc['ifreI'](typeof _0x4d9481,'object'))return undefined;_0x4d9481=_0x4d9481[_0x4d2e30];}return _0x4d9481;}export function setNestedValue(_0x536e7e,_0x183858,_0x4fe1a5){const _0x15dbe7=_0xe4aa3,_0x49742d={'aemSm':function(_0x3705ec,_0xde0e07){return _0x3705ec(_0xde0e07);},'mJOcH':function(_0x186526,_0x12f2bf){return _0x186526<_0x12f2bf;},'FGwKB':function(_0x5a77dc,_0x2aad2f){return _0x5a77dc in _0x2aad2f;},'ZufIC':function(_0x197de6,_0x996d41){return _0x197de6!==_0x996d41;},'DCNyH':'object'},_0x10a369=_0x49742d[_0x15dbe7(0x15e)](parseKeyPath,_0x183858);let _0x3e4e37=_0x536e7e;for(let _0x39a93c=0x0;_0x49742d['mJOcH'](_0x39a93c,_0x10a369['length']-0x1);_0x39a93c++){const _0x47c4b5=_0x10a369[_0x39a93c];(!_0x49742d['FGwKB'](_0x47c4b5,_0x3e4e37)||_0x49742d['ZufIC'](typeof _0x3e4e37[_0x47c4b5],_0x49742d[_0x15dbe7(0x15f)]))&&(_0x3e4e37[_0x47c4b5]={}),_0x3e4e37=_0x3e4e37[_0x47c4b5];}_0x3e4e37[_0x10a369[_0x10a369[_0x15dbe7(0x198)]-0x1]]=_0x4fe1a5;}export function deleteNestedValue(_0x5ea557,_0x524eca){const _0x256d8d=_0xe4aa3,_0x13f962={'ThQPE':function(_0x4ec43d,_0x11614b){return _0x4ec43d(_0x11614b);},'EVeZO':function(_0x2ea324,_0x3c2791){return _0x2ea324-_0x3c2791;},'VrQns':function(_0xc441d4,_0x144d2d){return _0xc441d4===_0x144d2d;},'jyPMm':function(_0x11c2bc,_0x5adf49){return _0x11c2bc!==_0x5adf49;},'ODnyd':function(_0x4ec128,_0x3e1efc){return _0x4ec128===_0x3e1efc;},'azZvy':function(_0xd13926,_0x1a3364){return _0xd13926!==_0x1a3364;},'DKTas':_0x256d8d(0x1a0)},_0x3ee761=_0x13f962['ThQPE'](parseKeyPath,_0x524eca);let _0x57d7de=_0x5ea557;for(let _0x219c93=0x0;_0x219c93<_0x13f962['EVeZO'](_0x3ee761['length'],0x1);_0x219c93++){if(_0x57d7de===null||_0x13f962['VrQns'](_0x57d7de,undefined)||_0x13f962[_0x256d8d(0x1b5)](typeof _0x57d7de,_0x256d8d(0x1a0)))return![];_0x57d7de=_0x57d7de[_0x3ee761[_0x219c93]];}if(_0x13f962[_0x256d8d(0x1b8)](_0x57d7de,null)||_0x13f962[_0x256d8d(0x16f)](_0x57d7de,undefined)||_0x13f962[_0x256d8d(0x1b9)](typeof _0x57d7de,_0x13f962[_0x256d8d(0x185)]))return![];const _0x228aec=_0x3ee761[_0x3ee761[_0x256d8d(0x198)]-0x1];if(_0x228aec in _0x57d7de)return delete _0x57d7de[_0x228aec],!![];return![];}function parseKeyPath(_0x8b4b4a){const _0x6cf5cf=_0xe4aa3,_0x43123f={'UZGmT':function(_0x3a9dff,_0x403135){return _0x3a9dff===_0x403135;},'SqDvw':'setupHeaders'},_0x4cc8ce=_0x8b4b4a['split']('.');return _0x4cc8ce[0x0]===_0x6cf5cf(0x163)&&(_0x4cc8ce[0x0]='headers'),_0x43123f[_0x6cf5cf(0x15d)](_0x4cc8ce[0x0],_0x6cf5cf(0x172))&&(_0x4cc8ce[0x0]=_0x43123f['SqDvw']),_0x4cc8ce;}export function formatSettings(_0x822044,_0x50a0a8=0x0){const _0x1f8214=_0xe4aa3,_0x469c38={'Smlsv':function(_0x38654d,_0x26b7ae){return _0x38654d===_0x26b7ae;}},_0x26d271=[],_0x18f6e6='\x20\x20'['repeat'](_0x50a0a8);for(const [_0x5e68a1,_0x214037]of Object['entries'](_0x822044)){if(_0x469c38['Smlsv'](_0x214037,undefined))continue;if(_0x469c38['Smlsv'](typeof _0x214037,_0x1f8214(0x1a0))&&_0x214037!==null){_0x26d271[_0x1f8214(0x16a)](''+_0x18f6e6+_0x5e68a1+':');for(const [_0x36f5a0,_0x54e1ec]of Object['entries'](_0x214037)){_0x26d271[_0x1f8214(0x16a)](_0x18f6e6+'\x20\x20'+_0x36f5a0+':\x20'+_0x54e1ec);}}else _0x26d271['push'](''+_0x18f6e6+_0x5e68a1+':\x20'+_0x214037);}return _0x26d271[_0x1f8214(0x1cd)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ba8fa,_0x1d40ad){const _0xb9c37=_0x2343,_0x1262b5=_0x3ba8fa();while(!![]){try{const _0x4f7319=-parseInt(_0xb9c37(0x11a))/0x1+parseInt(_0xb9c37(0x122))/0x2*(-parseInt(_0xb9c37(0x120))/0x3)+parseInt(_0xb9c37(0x11b))/0x4*(-parseInt(_0xb9c37(0x11e))/0x5)+parseInt(_0xb9c37(0x11d))/0x6+-parseInt(_0xb9c37(0x11c))/0x7+-parseInt(_0xb9c37(0x123))/0x8*(-parseInt(_0xb9c37(0x121))/0x9)+parseInt(_0xb9c37(0x11f))/0xa;if(_0x4f7319===_0x1d40ad)break;else _0x1262b5['push'](_0x1262b5['shift']());}catch(_0x37a51c){_0x1262b5['push'](_0x1262b5['shift']());}}}(_0x2651,0x9150b));function _0x2651(){const _0x14cf27=['21689550wqbkpf','201BwXfJq','9sRRVWB','2854rQhcxB','789296yqpjip','FxVLI','hNVKD','skills','TVgQR','1164544Cyqrkp','124IdoZDa','314937ATjjwq','4446486zKvwyX','178765YoShcV'];_0x2651=function(){return _0x14cf27;};return _0x2651();}function _0x2343(_0xc3fc7a,_0x445ef2){_0xc3fc7a=_0xc3fc7a-0x117;const _0x26512f=_0x2651();let _0x234373=_0x26512f[_0xc3fc7a];return _0x234373;}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x59d6cb){const _0x300b2c=_0x2343,_0x1f65e5={'OZBIz':_0x300b2c(0x118),'hNVKD':function(_0x5ba537,_0x27f001,_0x2b90f5){return _0x5ba537(_0x27f001,_0x2b90f5);}},_0x47826f=join(__dirname,'..','..',_0x1f65e5['OZBIz']),_0x5c44bb=join(_0x47826f,_0x59d6cb);try{return _0x1f65e5[_0x300b2c(0x117)](readFileSync,_0x5c44bb,'utf-8');}catch{return'';}}export function getRangerSkillContent(){const _0x4f0a05=_0x2343,_0x1cf657={'TVgQR':function(_0x26ae0d,_0x4bdc51){return _0x26ae0d(_0x4bdc51);},'FxVLI':'ranger/SKILL.md'};return _0x1cf657[_0x4f0a05(0x119)](readSkillContent,_0x1cf657[_0x4f0a05(0x124)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3368d5=_0x1936;(function(_0x2d6100,_0x2f4ca9){const _0x243c64=_0x1936,_0x2619cd=_0x2d6100();while(!![]){try{const _0x1646e6=-parseInt(_0x243c64(0x159))/0x1+parseInt(_0x243c64(0x16f))/0x2*(-parseInt(_0x243c64(0x169))/0x3)+parseInt(_0x243c64(0x162))/0x4+parseInt(_0x243c64(0x171))/0x5+-parseInt(_0x243c64(0x174))/0x6+parseInt(_0x243c64(0x14f))/0x7+-parseInt(_0x243c64(0x16b))/0x8*(-parseInt(_0x243c64(0x155))/0x9);if(_0x1646e6===_0x2f4ca9)break;else _0x2619cd['push'](_0x2619cd['shift']());}catch(_0x72c1d9){_0x2619cd['push'](_0x2619cd['shift']());}}}(_0x281c,0xc6204));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';function _0x281c(){const _0x3a938d=['hxAtZ','log','gRXYh','warn','1038000cbJuoZ','skills','utf-8','push','OAAXl','rPxRo','pBrKI','3IqZwFu','cZSTR','8EwlkEp','project','trim','feature-tracker','2017090wqSUvq','SKILL.md','7527850SpVoWd','WXwMW','Invalid\x20skill\x20frontmatter','8430564jHEGHs','match','fItaZ','10128776trJJLX','\x20\x20Location:\x20','isDirectory','filter','endsWith','.md','3430503SBWGHw','VhxGE','opencode','e2e-test-recommender','368042SdxCDv','uVxHV','HxTfs','RZksM','length'];_0x281c=function(){return _0x3a938d;};return _0x281c();}import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0x3368d5(0x158),'bug-bash',_0x3368d5(0x16e)];export async function installSkill(_0x3af394,_0x232782={}){const _0x40c750=_0x3368d5,_0xfedb7={'lKIvI':'claude','WXwMW':function(_0x2d3d9c){return _0x2d3d9c();},'gRXYh':function(_0x334618,_0x1b5f3a,_0x43dc72){return _0x334618(_0x1b5f3a,_0x43dc72);},'iuqBe':function(_0x5ee672,_0x3d8a37){return _0x5ee672(_0x3d8a37);},'OAAXl':function(_0x1f5f43,_0x58910b){return _0x1f5f43(_0x58910b);},'rPxRo':function(_0x239aab,_0x34e6e0){return _0x239aab&&_0x34e6e0;},'jWLSP':function(_0x5963c0,_0x16c718){return _0x5963c0===_0x16c718;},'pBrKI':_0x40c750(0x157),'YwAMT':function(_0xf359bb,_0x1a8c08,_0x1c32d9,_0x6b5791){return _0xf359bb(_0x1a8c08,_0x1c32d9,_0x6b5791);},'HxTfs':function(_0x37398d,_0x44425a,_0x1d3f82,_0x105a1b){return _0x37398d(_0x44425a,_0x1d3f82,_0x105a1b);}},{level:level=_0x40c750(0x16c),cliVersion:_0x455265,platform:platform=_0xfedb7['lKIvI']}=_0x232782,_0x1942a3=_0xfedb7[_0x40c750(0x172)](getSourceSkillsDir),_0x1941a5=join(_0x1942a3,_0x3af394),_0x4b2b25=_0xfedb7['gRXYh'](join,_0x1942a3,_0x3af394+_0x40c750(0x154)),_0x12ffac=_0xfedb7['iuqBe'](existsSync,_0x1941a5)&&statSync(_0x1941a5)[_0x40c750(0x151)]()&&existsSync(join(_0x1941a5,_0x40c750(0x170))),_0x43e2cb=_0xfedb7[_0x40c750(0x166)](existsSync,_0x4b2b25);if(_0xfedb7[_0x40c750(0x167)](!_0x12ffac,!_0x43e2cb))return console['warn']('\x20\x20Skill\x20not\x20found:\x20'+_0x3af394),![];const _0x25e5f3=_0xfedb7['jWLSP'](platform,_0xfedb7[_0x40c750(0x168)])?_0xfedb7['OAAXl'](getOpencodeSkillsDir,level):getSkillsDir(level),_0x4fd6eb=join(_0x25e5f3,_0x3af394);await _0xfedb7[_0x40c750(0x160)](mkdir,_0x4fd6eb,{'recursive':!![]});let _0x5713d1,_0x48d75b=[];if(_0x12ffac){const _0x432f89=await readdir(_0x1941a5),_0x282f71=_0x432f89[_0x40c750(0x152)](_0x49b949=>_0x49b949[_0x40c750(0x153)](_0x40c750(0x154)));for(const _0x57a5a8 of _0x282f71){const _0x10a3b4=join(_0x1941a5,_0x57a5a8),_0x224209=join(_0x4fd6eb,_0x57a5a8);await _0xfedb7[_0x40c750(0x160)](copyFile,_0x10a3b4,_0x224209),_0x48d75b[_0x40c750(0x165)](_0x57a5a8);}_0x5713d1=await _0xfedb7[_0x40c750(0x160)](readFile,join(_0x1941a5,'SKILL.md'),'utf-8');}else{_0x5713d1=await readFile(_0x4b2b25,_0x40c750(0x164));const _0x21f026=_0xfedb7[_0x40c750(0x160)](join,_0x4fd6eb,_0x40c750(0x170));await _0xfedb7['YwAMT'](writeFile,_0x21f026,_0x5713d1,_0x40c750(0x164)),_0x48d75b['push'](_0x40c750(0x170));}const {name:_0x4bfaf2}=_0xfedb7['iuqBe'](parseFrontmatter,_0x5713d1);return console['log']('\x20\x20Installed\x20skill:\x20'+_0x4bfaf2),console[_0x40c750(0x15f)](_0x40c750(0x150)+_0x4fd6eb),_0x48d75b[_0x40c750(0x15d)]>0x1&&console['log']('\x20\x20Files:\x20'+_0x48d75b['join'](',\x20')),_0xfedb7[_0x40c750(0x15b)](logLocalAgentInstallation,_0x3af394,{'skillDisplayName':_0x4bfaf2,'installLevel':level},_0x455265)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0x119086=_0x3368d5,_0x848719={'fItaZ':_0x119086(0x163),'hxAtZ':function(_0x2549e9,_0x257314,_0x1921fb,_0x297e4b,_0x38ee4f,_0x306803){return _0x2549e9(_0x257314,_0x1921fb,_0x297e4b,_0x38ee4f,_0x306803);},'cZSTR':function(_0x379cb6,_0x7e8a79){return _0x379cb6(_0x7e8a79);}},_0xe6affb=[join(__dirname,'..','..',_0x848719[_0x119086(0x14e)]),_0x848719[_0x119086(0x15e)](join,__dirname,'..','..','..','skills')];for(const _0x51f148 of _0xe6affb){if(_0x848719[_0x119086(0x16a)](existsSync,_0x51f148))return _0x51f148;}return _0xe6affb[0x0];}function _0x1936(_0x5ec80c,_0x1fd8da){_0x5ec80c=_0x5ec80c-0x14d;const _0x281c7c=_0x281c();let _0x193621=_0x281c7c[_0x5ec80c];return _0x193621;}function parseFrontmatter(_0x4915d1){const _0x3d3b6e=_0x3368d5,_0x2de8ec=_0x4915d1['match'](/^---\n([\s\S]+?)\n---/);if(!_0x2de8ec)throw new Error(_0x3d3b6e(0x173));const _0x49db07=_0x2de8ec[0x1],_0x2e1129=_0x49db07[_0x3d3b6e(0x14d)](/name:\s*(.+)/),_0x340792=_0x49db07[_0x3d3b6e(0x14d)](/description:\s*"?(.+?)"?\n/);return{'name':_0x2e1129?.[0x1]['trim']()||'','description':_0x340792?.[0x1][_0x3d3b6e(0x16d)]()||''};}export async function removeSkill(_0x5efb0d,_0x1c19c7){const _0x247337=_0x3368d5,_0x18a9b6={'RZksM':function(_0x46573a,_0x43d69f){return _0x46573a(_0x43d69f);},'tLlYe':function(_0x5e6844,_0x4a0ac1,_0x4cc0ee){return _0x5e6844(_0x4a0ac1,_0x4cc0ee);},'uVxHV':function(_0xd1e8e9,_0x34be1d){return _0xd1e8e9(_0x34be1d);},'VhxGE':function(_0x1b413e,_0x4e5d2b,_0x4a0b03){return _0x1b413e(_0x4e5d2b,_0x4a0b03);}},_0x2b6c5e=_0x18a9b6[_0x247337(0x15c)](getSkillsDir,_0x1c19c7),_0x22aded=_0x18a9b6['tLlYe'](join,_0x2b6c5e,_0x5efb0d);if(!_0x18a9b6[_0x247337(0x15a)](existsSync,_0x22aded))return![];try{return await _0x18a9b6[_0x247337(0x156)](rm,_0x22aded,{'recursive':!![]}),console[_0x247337(0x15f)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x5efb0d),!![];}catch{return console[_0x247337(0x161)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x5efb0d),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x163e52=_0x3669;(function(_0x853bcf,_0x40d96a){const _0x2b1d04=_0x3669,_0x20e72f=_0x853bcf();while(!![]){try{const _0x1925ac=-parseInt(_0x2b1d04(0x160))/0x1+parseInt(_0x2b1d04(0x150))/0x2+-parseInt(_0x2b1d04(0x162))/0x3*(parseInt(_0x2b1d04(0x155))/0x4)+-parseInt(_0x2b1d04(0x158))/0x5+parseInt(_0x2b1d04(0x173))/0x6+-parseInt(_0x2b1d04(0x16d))/0x7+parseInt(_0x2b1d04(0x16f))/0x8;if(_0x1925ac===_0x40d96a)break;else _0x20e72f['push'](_0x20e72f['shift']());}catch(_0x28dac){_0x20e72f['push'](_0x20e72f['shift']());}}}(_0x4a96,0xdc207));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x4a3b85,_0x3579e6){const _0x35307f=_0x3669,_0x357b44={'VCULU':function(_0xf327b7,_0xe1fd09){return _0xf327b7>=_0xe1fd09;},'lCVON':function(_0x5a2505,_0x5e60f7){return _0x5a2505&_0x5e60f7;},'DGjCn':function(_0x5243a7,_0xdbdb1e){return _0x5243a7>_0xdbdb1e;},'pOFUb':function(_0x3ec530,_0xcc1f04){return _0x3ec530&_0xcc1f04;},'wBzGP':function(_0xe9a85c,_0x16e079){return _0xe9a85c+_0x16e079;}};if(_0x357b44[_0x35307f(0x14b)](_0x3579e6,_0x4a3b85['length']))return[0x0,0x0];const _0x5cebec=_0x4a3b85[_0x3579e6];let _0x1eedf1=0x1,_0x529767=0x80;while(_0x1eedf1<=0x8&&!_0x357b44['lCVON'](_0x5cebec,_0x529767)){_0x1eedf1++,_0x529767>>=0x1;}if(_0x357b44[_0x35307f(0x149)](_0x3579e6+_0x1eedf1,_0x4a3b85[_0x35307f(0x174)]))return[0x0,0x0];let _0x5b96bb=_0x357b44['pOFUb'](_0x5cebec,_0x529767-0x1);for(let _0xc882ac=0x1;_0xc882ac<_0x1eedf1;_0xc882ac++){_0x5b96bb=_0x5b96bb*0x100+_0x4a3b85[_0x357b44[_0x35307f(0x159)](_0x3579e6,_0xc882ac)];}return[_0x5b96bb,_0x1eedf1];}function readId(_0xa14c26,_0x5495c9){const _0x2f1535=_0x3669,_0x46a53f={'itCrE':function(_0x45a270,_0x20b658){return _0x45a270>=_0x20b658;},'wToQj':function(_0x2afecc,_0x1c5174){return _0x2afecc+_0x1c5174;},'NZwAe':function(_0x4b52d7,_0x558e5f){return _0x4b52d7*_0x558e5f;}};if(_0x5495c9>=_0xa14c26['length'])return[0x0,0x0];const _0x20adce=_0xa14c26[_0x5495c9];let _0x584f86;if(_0x46a53f[_0x2f1535(0x15d)](_0x20adce,0x80))_0x584f86=0x1;else{if(_0x20adce>=0x40)_0x584f86=0x2;else{if(_0x20adce>=0x20)_0x584f86=0x3;else{if(_0x20adce>=0x10)_0x584f86=0x4;else return[_0x20adce,0x1];}}}if(_0x46a53f['wToQj'](_0x5495c9,_0x584f86)>_0xa14c26['length'])return[0x0,0x0];let _0x1b0602=0x0;for(let _0x3f4981=0x0;_0x3f4981<_0x584f86;_0x3f4981++){_0x1b0602=_0x46a53f['NZwAe'](_0x1b0602,0x100)+_0xa14c26[_0x5495c9+_0x3f4981];}return[_0x1b0602,_0x584f86];}function readUint(_0x13b483,_0x4d1b9b,_0x342cf7){const _0x37599b=_0x3669,_0x328821={'wHTbd':function(_0x4c983e,_0x22668e){return _0x4c983e<_0x22668e;},'zyJqv':function(_0x27cc12,_0x1def53){return _0x27cc12+_0x1def53;},'raHvy':function(_0x183020,_0x18fef2){return _0x183020*_0x18fef2;}};let _0x1e8bb9=0x0;for(let _0x30ee90=0x0;_0x328821[_0x37599b(0x148)](_0x30ee90,_0x342cf7);_0x30ee90++){_0x1e8bb9=_0x328821['zyJqv'](_0x328821[_0x37599b(0x17c)](_0x1e8bb9,0x100),_0x13b483[_0x4d1b9b+_0x30ee90]);}return _0x1e8bb9;}function isUnknownSize(_0x5ad6b0,_0xab5f60){const _0x448ba9=_0x3669,_0x21625e={'ocViS':function(_0x4f5f45,_0x41efcc){return _0x4f5f45-_0x41efcc;},'SafrC':function(_0x3250e6,_0x5ef6de){return _0x3250e6*_0x5ef6de;}};return _0x5ad6b0===_0x21625e[_0x448ba9(0x179)](Math['pow'](0x2,_0x21625e['SafrC'](0x7,_0xab5f60)),0x1);}function writeVint(_0x3dc6a7,_0x57c88f){const _0xd55bff=_0x3669,_0x5ee32b={'kXBGW':function(_0x2b8293,_0x4966ee){return _0x2b8293||_0x4966ee;},'GhneD':function(_0x368cbd,_0x57fb77){return _0x368cbd<_0x57fb77;},'WeHxF':function(_0x1737c1,_0x174b64){return _0x1737c1-_0x174b64;},'kfIYA':function(_0x1f8f8b,_0x521d43){return _0x1f8f8b>=_0x521d43;},'TlKoy':function(_0x3a433b,_0x13e686){return _0x3a433b&_0x13e686;},'cKAmA':function(_0x242e3,_0x2ce5c7){return _0x242e3/_0x2ce5c7;},'mBLVv':function(_0x3f71bb,_0x3b2f1a){return _0x3f71bb<<_0x3b2f1a;}};let _0x3ab7d5=_0x5ee32b[_0xd55bff(0x172)](_0x57c88f,0x1);while(_0x5ee32b['GhneD'](_0x5ee32b[_0xd55bff(0x144)](Math['pow'](0x2,0x7*_0x3ab7d5),0x2),_0x3dc6a7))_0x3ab7d5++;const _0x107e84=Buffer['alloc'](_0x3ab7d5);for(let _0x4f385d=_0x3ab7d5-0x1;_0x5ee32b[_0xd55bff(0x16b)](_0x4f385d,0x0);_0x4f385d--){_0x107e84[_0x4f385d]=_0x5ee32b['TlKoy'](_0x3dc6a7,0xff),_0x3dc6a7=Math['floor'](_0x5ee32b[_0xd55bff(0x14e)](_0x3dc6a7,0x100));}return _0x107e84[0x0]|=_0x5ee32b['mBLVv'](0x1,0x8-_0x3ab7d5),_0x107e84;}function writeUint(_0x133e1c,_0x53a3ad){const _0x29e880={'gXjOG':function(_0x105f2f,_0xc55a91){return _0x105f2f>=_0xc55a91;},'FCCTP':function(_0x53f895,_0x5e8b33){return _0x53f895/_0x5e8b33;}},_0xd58a36=Buffer['alloc'](_0x53a3ad);for(let _0x297fe9=_0x53a3ad-0x1;_0x29e880['gXjOG'](_0x297fe9,0x0);_0x297fe9--){_0xd58a36[_0x297fe9]=_0x133e1c&0xff,_0x133e1c=Math['floor'](_0x29e880['FCCTP'](_0x133e1c,0x100));}return _0xd58a36;}function writeUnknownSizeVint(_0x8fe393){const _0x4a28a6=_0x3669,_0x4e0d3a=Buffer[_0x4a28a6(0x15a)](_0x8fe393,0xff);return _0x4e0d3a[0x0]=0xff>>_0x8fe393-0x1,_0x4e0d3a;}function _0x4a96(){const _0x57099f=['hwqbm','otwlG','kXBGW','7129380BYueAS','length','aaEel','JaThP','zGpYd','RNvtn','ocViS','pczuu','QATeT','raHvy','mkcHj','endsWith','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','bodyAfterTimestamp','QogeZ','from','bBHtx','slice','WeHxF','HsNKA','maxTicks','floor','wHTbd','DGjCn','Zocfy','VCULU','PfEur','FxRtA','cKAmA','QuaCP','1394192JhXrun','GxrRY','oZoLG','qWkPQ','concat','109772ZdTcBW','LkltG','argv','244365SteFal','wBzGP','alloc','fsjqJ','sHACt','itCrE','GApTF','header','452661PDQCOF','wqxOG','3CnbIEq','min','timestamp','clusters','push','mYzgv','BsumL','VyWQu','exit','kfIYA','xPskR','5358220CkMBQi','stitchWebmFiles.ts','2486000kMwyUA'];_0x4a96=function(){return _0x57099f;};return _0x4a96();}function uintSize(_0x1b837b){const _0x2fbb6c=_0x3669,_0x1e4e07={'FtuMO':function(_0x3c4ab2,_0x28e0cc){return _0x3c4ab2>_0x28e0cc;},'NinsH':function(_0x504e6e,_0xc51705){return _0x504e6e/_0xc51705;}};if(_0x1b837b===0x0)return 0x1;let _0x3cb567=0x0,_0x4e170c=_0x1b837b;while(_0x1e4e07['FtuMO'](_0x4e170c,0x0)){_0x3cb567++,_0x4e170c=Math[_0x2fbb6c(0x147)](_0x1e4e07['NinsH'](_0x4e170c,0x100));}return _0x3cb567;}function findTimestampScale(_0x3e7088,_0x392683){const _0x2526bf=_0x3669,_0x44f720={'xPskR':function(_0x5853cf,_0x23492b){return _0x5853cf+_0x23492b;},'GxrRY':function(_0x272468,_0x779507,_0x45111f){return _0x272468(_0x779507,_0x45111f);},'rRwae':function(_0x276094,_0x4c07ff){return _0x276094===_0x4c07ff;},'RNvtn':function(_0x49105f,_0x51ca13){return _0x49105f+_0x51ca13;},'pczuu':function(_0xb5be45,_0x575bce,_0x3851ac){return _0xb5be45(_0x575bce,_0x3851ac);},'ponYp':function(_0x33116b,_0x4e9ad7){return _0x33116b===_0x4e9ad7;},'Zocfy':function(_0x2dccfb,_0x5e4c33,_0x115739,_0xbcb318){return _0x2dccfb(_0x5e4c33,_0x115739,_0xbcb318);},'rhtDF':function(_0x137791,_0xdb40b5){return _0x137791===_0xdb40b5;}};let _0x31465d=_0x392683;const _0x35f5cf=Math[_0x2526bf(0x163)](_0x3e7088[_0x2526bf(0x174)],_0x44f720[_0x2526bf(0x16c)](_0x392683,0x2710));while(_0x31465d<_0x35f5cf){const [_0x486342,_0x154c38]=_0x44f720[_0x2526bf(0x151)](readId,_0x3e7088,_0x31465d),[_0x46bc81,_0x1ee167]=readVint(_0x3e7088,_0x44f720[_0x2526bf(0x16c)](_0x31465d,_0x154c38));if(_0x44f720['rRwae'](_0x486342,ID_INFO)){let _0x2dd160=_0x44f720['RNvtn'](_0x44f720['xPskR'](_0x31465d,_0x154c38),_0x1ee167);const _0x2d81f6=_0x2dd160+_0x46bc81;while(_0x2dd160<_0x2d81f6){const [_0x26dc1b,_0x122091]=_0x44f720[_0x2526bf(0x17a)](readId,_0x3e7088,_0x2dd160),[_0x2f31f5,_0x1f1d13]=readVint(_0x3e7088,_0x2dd160+_0x122091);if(_0x44f720['ponYp'](_0x26dc1b,ID_TIMESTAMP_SCALE))return _0x44f720[_0x2526bf(0x14a)](readUint,_0x3e7088,_0x44f720[_0x2526bf(0x178)](_0x2dd160+_0x122091,_0x1f1d13),_0x2f31f5);_0x2dd160+=_0x122091+_0x1f1d13+_0x2f31f5;}break;}if(_0x44f720['rhtDF'](_0x486342,ID_CLUSTER))break;if(isUnknownSize(_0x46bc81,_0x1ee167))break;_0x31465d+=_0x154c38+_0x1ee167+_0x46bc81;}return 0xf4240;}function findFirstClusterOffset(_0x32bdc9,_0x107b6f){const _0x5619ea=_0x3669,_0x423f4e={'BsumL':function(_0x135a48,_0x14f98c,_0x463a71){return _0x135a48(_0x14f98c,_0x463a71);},'anCeb':function(_0x593b6e,_0x208633,_0xdd1dbd){return _0x593b6e(_0x208633,_0xdd1dbd);},'fsjqJ':function(_0x21daf,_0xd022d6){return _0x21daf+_0xd022d6;}};let _0x387c4e=_0x107b6f;while(_0x387c4e<_0x32bdc9[_0x5619ea(0x174)]){const [_0x1e4539,_0x45afbd]=_0x423f4e[_0x5619ea(0x168)](readId,_0x32bdc9,_0x387c4e);if(_0x1e4539===ID_CLUSTER)return _0x387c4e;const [_0x2a4af5,_0x468206]=_0x423f4e['anCeb'](readVint,_0x32bdc9,_0x387c4e+_0x45afbd);if(isUnknownSize(_0x2a4af5,_0x468206))return _0x387c4e;_0x387c4e+=_0x423f4e[_0x5619ea(0x15b)](_0x45afbd,_0x468206)+_0x2a4af5;}return _0x32bdc9[_0x5619ea(0x174)];}function _0x3669(_0x473b60,_0x324e61){_0x473b60=_0x473b60-0x13e;const _0x4a9681=_0x4a96();let _0x36699a=_0x4a9681[_0x473b60];return _0x36699a;}function findClusterEnd(_0x49725c,_0x34f80d,_0x572766,_0x5a95b7){const _0x421943=_0x3669,_0xca782b={'sJuqS':function(_0x1e3d14,_0x25c792,_0x408cf2){return _0x1e3d14(_0x25c792,_0x408cf2);},'bnLdf':function(_0x39b11a,_0x2763e5){return _0x39b11a+_0x2763e5;},'QbGBa':function(_0xd9b609,_0x164046,_0x2ef63e){return _0xd9b609(_0x164046,_0x2ef63e);},'JaThP':function(_0x14d6a1,_0x49ed78){return _0x14d6a1+_0x49ed78;}};if(!_0xca782b['sJuqS'](isUnknownSize,_0x572766,_0x5a95b7))return _0xca782b['bnLdf'](_0x34f80d,_0x572766);const _0x3409f3=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4d450e=_0x34f80d;while(_0x4d450e<_0x49725c[_0x421943(0x174)]-0x4){const [_0x26d28c,_0x391962]=readId(_0x49725c,_0x4d450e);if(_0x3409f3['has'](_0x26d28c))return _0x4d450e;const [_0x4bc243,_0x2633d9]=readVint(_0x49725c,_0x4d450e+_0x391962);if(_0xca782b['QbGBa'](isUnknownSize,_0x4bc243,_0x2633d9))return _0x49725c[_0x421943(0x174)];_0x4d450e+=_0xca782b[_0x421943(0x176)](_0x391962,_0x2633d9)+_0x4bc243;}return _0x49725c[_0x421943(0x174)];}function extractClusters(_0x2da035,_0x1e98f4){const _0x525e3e=_0x3669,_0x45c5ff={'AeAeZ':function(_0x45bdea,_0x1af73a){return _0x45bdea<_0x1af73a;},'mkcHj':function(_0x45d4bf,_0xc43fc0){return _0x45d4bf===_0xc43fc0;},'EaFiA':function(_0x598aa5,_0x13f5bc,_0x1e0aea){return _0x598aa5(_0x13f5bc,_0x1e0aea);},'wqxOG':function(_0x29a1b3,_0x1843b6,_0x4f59d6){return _0x29a1b3(_0x1843b6,_0x4f59d6);},'PfEur':function(_0x5208bd,_0x8b77fc){return _0x5208bd+_0x8b77fc;},'Bugeu':function(_0x5eb493,_0x4d738d,_0xa590c6){return _0x5eb493(_0x4d738d,_0xa590c6);},'otwlG':function(_0x5d3e42,_0x1e84a6){return _0x5d3e42===_0x1e84a6;},'YsWwr':function(_0x1358be,_0x3ccdfd){return _0x1358be+_0x3ccdfd;},'VyWQu':function(_0x269f4a,_0x3bf86b){return _0x269f4a+_0x3bf86b;},'ExoDr':function(_0x276ccf,_0x548254){return _0x276ccf===_0x548254;},'ORrJE':function(_0x279444,_0xc058dd,_0x11fb0c){return _0x279444(_0xc058dd,_0x11fb0c);},'aaEel':function(_0x3c9cb0,_0xbaf3c6){return _0x3c9cb0>_0xbaf3c6;},'yWsrm':function(_0x5ef1d6,_0x5af689,_0x492277){return _0x5ef1d6(_0x5af689,_0x492277);}},_0x25a6f9=[],_0x514ac5=Buffer[_0x525e3e(0x141)]([0x1f,0x43,0xb6,0x75]);let _0xf24a0f=0x0;while(_0x45c5ff['AeAeZ'](_0xf24a0f,_0x2da035[_0x525e3e(0x174)])){const _0x170010=_0x2da035['indexOf'](_0x514ac5,_0xf24a0f);if(_0x45c5ff[_0x525e3e(0x17d)](_0x170010,-0x1))break;const [_0x397eea,_0x271b27]=_0x45c5ff['EaFiA'](readId,_0x2da035,_0x170010);if(_0x397eea!==ID_CLUSTER){_0xf24a0f=_0x170010+0x1;continue;}const [_0x3756fb,_0x558809]=_0x45c5ff['wqxOG'](readVint,_0x2da035,_0x45c5ff[_0x525e3e(0x14c)](_0x170010,_0x271b27)),_0x11f6ef=_0x170010+_0x271b27+_0x558809,_0x3228f5=findClusterEnd(_0x2da035,_0x11f6ef,_0x3756fb,_0x558809);let _0x67fb58=_0x11f6ef,_0x23668b=0x0,_0x2d4792=0x2,_0x341b5d=![],_0x19bf52=Buffer[_0x525e3e(0x15a)](0x0),_0x515251=Buffer[_0x525e3e(0x15a)](0x0);while(_0x67fb58<_0x3228f5){const [_0x32f097,_0x5edf44]=_0x45c5ff['Bugeu'](readId,_0x2da035,_0x67fb58),[_0x550a5b,_0xc9bd0c]=readVint(_0x2da035,_0x45c5ff[_0x525e3e(0x14c)](_0x67fb58,_0x5edf44));if(_0x45c5ff[_0x525e3e(0x171)](_0x32f097,ID_TIMESTAMP)){_0x23668b=readUint(_0x2da035,_0x45c5ff['YsWwr'](_0x67fb58,_0x5edf44)+_0xc9bd0c,_0x550a5b),_0x2d4792=_0x550a5b,_0x341b5d=!![],_0x19bf52=_0x2da035[_0x525e3e(0x143)](_0x11f6ef,_0x67fb58);const _0x5c957f=_0x45c5ff[_0x525e3e(0x14c)](_0x45c5ff['PfEur'](_0x67fb58+_0x5edf44,_0xc9bd0c),_0x550a5b);_0x515251=_0x2da035[_0x525e3e(0x143)](_0x5c957f,_0x3228f5);break;}if(_0x32f097===ID_CLUSTER)break;if(isUnknownSize(_0x550a5b,_0xc9bd0c))break;_0x67fb58+=_0x45c5ff[_0x525e3e(0x169)](_0x5edf44+_0xc9bd0c,_0x550a5b);}!_0x341b5d&&(_0x515251=_0x2da035[_0x525e3e(0x143)](_0x11f6ef,_0x3228f5));let _0x471be2=_0x23668b;_0x67fb58=_0x11f6ef;while(_0x67fb58<_0x3228f5){const [_0x55162c,_0x4bb409]=_0x45c5ff[_0x525e3e(0x161)](readId,_0x2da035,_0x67fb58),[_0x284b12,_0xb5f7a2]=_0x45c5ff['EaFiA'](readVint,_0x2da035,_0x67fb58+_0x4bb409);if(_0x45c5ff['ExoDr'](_0x55162c,ID_SIMPLE_BLOCK)&&_0x284b12>=0x4){const _0x5d1748=_0x67fb58+_0x4bb409+_0xb5f7a2,[,_0x1fbaf7]=_0x45c5ff['ORrJE'](readVint,_0x2da035,_0x5d1748),_0xb09f86=_0x2da035['readInt16BE'](_0x5d1748+_0x1fbaf7),_0x5eff58=_0x23668b+_0xb09f86;if(_0x45c5ff[_0x525e3e(0x175)](_0x5eff58,_0x471be2))_0x471be2=_0x5eff58;}if(_0x45c5ff[_0x525e3e(0x171)](_0x55162c,ID_CLUSTER))break;if(_0x45c5ff['yWsrm'](isUnknownSize,_0x284b12,_0xb5f7a2))break;_0x67fb58+=_0x4bb409+_0xb5f7a2+_0x284b12;}_0x25a6f9[_0x525e3e(0x166)]({'timestamp':_0x23668b,'maxTicks':_0x471be2,'bodyBeforeTimestamp':_0x19bf52,'bodyAfterTimestamp':_0x515251,'timestampElementSize':_0x2d4792}),_0xf24a0f=_0x3228f5;}return _0x25a6f9;}function parseWebm(_0x35d1c4){const _0x2002f4=_0x3669,_0x5f0eac={'bBHtx':function(_0x345baa,_0x4137fe){return _0x345baa+_0x4137fe;},'zGpYd':function(_0x4ebc45,_0x4f1da1,_0x4bc781){return _0x4ebc45(_0x4f1da1,_0x4bc781);},'FxRtA':function(_0x436a03,_0x196388,_0x161656){return _0x436a03(_0x196388,_0x161656);},'ofEhf':function(_0x15ca3a,_0x653eeb){return _0x15ca3a>_0x653eeb;}};let _0xb36033=0x0;const [,_0xee8eb0]=readId(_0x35d1c4,_0xb36033),[_0x395e4f,_0x3525e1]=readVint(_0x35d1c4,_0x5f0eac['bBHtx'](_0xb36033,_0xee8eb0));_0xb36033+=_0x5f0eac[_0x2002f4(0x142)](_0xee8eb0,_0x3525e1)+_0x395e4f;const [_0x34bad2,_0x465791]=_0x5f0eac[_0x2002f4(0x177)](readId,_0x35d1c4,_0xb36033);if(_0x34bad2!==ID_SEGMENT)return null;const [,_0x225f46]=_0x5f0eac['zGpYd'](readVint,_0x35d1c4,_0xb36033+_0x465791),_0x424730=_0x5f0eac['bBHtx'](_0xb36033+_0x465791,_0x225f46),_0x256534=_0x5f0eac[_0x2002f4(0x14d)](findTimestampScale,_0x35d1c4,_0x424730),_0xf97f26=findFirstClusterOffset(_0x35d1c4,_0x424730),_0x287e6d=_0x35d1c4[_0x2002f4(0x143)](0x0,_0xf97f26),_0x352825=extractClusters(_0x35d1c4,_0x256534);let _0x3ff8f5=0x0;for(const _0x136b77 of _0x352825){if(_0x5f0eac['ofEhf'](_0x136b77['maxTicks'],_0x3ff8f5))_0x3ff8f5=_0x136b77[_0x2002f4(0x146)];}return{'header':_0x287e6d,'clusters':_0x352825,'timestampScale':_0x256534,'maxTimestampTicks':_0x3ff8f5};}function buildCluster(_0x4d3885,_0x3135c3,_0x2d700c){const _0x4a3af1=_0x3669,_0x114fd1={'Iwzbu':function(_0x31494d,_0x4885c5){return _0x31494d(_0x4885c5);}},_0x432ab4=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x1bd0fa=Math['max'](0x4,uintSize(_0x4d3885)),_0x3d3d5e=Buffer['concat']([Buffer[_0x4a3af1(0x141)]([ID_TIMESTAMP]),_0x114fd1['Iwzbu'](writeVint,_0x1bd0fa),writeUint(_0x4d3885,_0x1bd0fa)]),_0x4ccb4f=Buffer[_0x4a3af1(0x154)]([_0x3135c3,_0x3d3d5e,_0x2d700c]),_0x4dadf0=writeVint(_0x4ccb4f[_0x4a3af1(0x174)]);return Buffer[_0x4a3af1(0x154)]([_0x432ab4,_0x4dadf0,_0x4ccb4f]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x2ba5bc){const _0x4be6cd=_0x3669,_0x2b67c1={'QuaCP':function(_0x1e34b7,_0x38d01f,_0x48b144){return _0x1e34b7(_0x38d01f,_0x48b144);},'QATeT':function(_0x2e3926,_0x44b866){return _0x2e3926+_0x44b866;},'GApTF':function(_0x2dc460,_0x212920){return _0x2dc460+_0x212920;},'Hmcar':function(_0x54a89b,_0x443f2c){return _0x54a89b+_0x443f2c;},'HsNKA':function(_0x3391f7,_0x16a181){return _0x3391f7(_0x16a181);},'mYzgv':function(_0x4a4393,_0x29dbff){return _0x4a4393<_0x29dbff;},'oZoLG':function(_0x364d30,_0x4d8552){return _0x364d30===_0x4d8552;},'QogeZ':function(_0x4f47e7,_0x5842ca){return _0x4f47e7+_0x5842ca;},'LkltG':function(_0x2860eb,_0x3c69ef){return _0x2860eb+_0x3c69ef;},'fNcph':function(_0x284b6f,_0x407a23){return _0x284b6f+_0x407a23;},'sHACt':function(_0x574a60,_0xd2b9fd){return _0x574a60+_0xd2b9fd;},'pDjUJ':function(_0x5988ef,_0x3df41f){return _0x5988ef+_0x3df41f;},'qWkPQ':function(_0x26728b,_0x324962,_0x259f2b){return _0x26728b(_0x324962,_0x259f2b);}},_0x53b3e1=Buffer[_0x4be6cd(0x141)](_0x2ba5bc);let _0x1f39a1=0x0;const [,_0x4233d9]=_0x2b67c1[_0x4be6cd(0x14f)](readId,_0x53b3e1,_0x1f39a1),[_0x427514,_0x37fd64]=readVint(_0x53b3e1,_0x2b67c1[_0x4be6cd(0x17b)](_0x1f39a1,_0x4233d9)),_0x1b21f3=_0x2b67c1[_0x4be6cd(0x17b)](_0x2b67c1['QATeT'](_0x2b67c1[_0x4be6cd(0x15e)](_0x1f39a1,_0x4233d9),_0x37fd64),_0x427514),[,_0x478a32]=_0x2b67c1['QuaCP'](readId,_0x53b3e1,_0x1b21f3),[,_0x4326e7]=readVint(_0x53b3e1,_0x1b21f3+_0x478a32),_0x54195c=_0x2b67c1[_0x4be6cd(0x17b)](_0x2b67c1['Hmcar'](_0x1b21f3,_0x478a32),_0x4326e7),_0x8c141c=_0x2b67c1[_0x4be6cd(0x145)](writeUnknownSizeVint,_0x4326e7);_0x8c141c['copy'](_0x53b3e1,_0x1b21f3+_0x478a32);let _0x5a9e54=_0x54195c;const _0x5aa850=Math['min'](_0x53b3e1['length'],_0x54195c+0x2710);while(_0x2b67c1[_0x4be6cd(0x167)](_0x5a9e54,_0x5aa850)){const [_0x5aad4d,_0x5170b0]=_0x2b67c1['QuaCP'](readId,_0x53b3e1,_0x5a9e54),[_0x4b9ced,_0x303122]=_0x2b67c1['QuaCP'](readVint,_0x53b3e1,_0x5a9e54+_0x5170b0);if(_0x2b67c1['oZoLG'](_0x5aad4d,ID_CLUSTER))break;if(isUnknownSize(_0x4b9ced,_0x303122))break;if(_0x2b67c1[_0x4be6cd(0x152)](_0x5aad4d,ID_INFO)){const _0x4edcb4=_0x2b67c1[_0x4be6cd(0x140)](_0x2b67c1[_0x4be6cd(0x156)](_0x5a9e54,_0x5170b0),_0x303122),_0x5180d8=_0x2b67c1['fNcph'](_0x4edcb4,_0x4b9ced),_0x511a6f=[];let _0xf47aff=_0x4edcb4;while(_0x2b67c1[_0x4be6cd(0x167)](_0xf47aff,_0x5180d8)){const [_0x14858c,_0x52d80a]=readId(_0x53b3e1,_0xf47aff),[_0x1ebcb5,_0x13734f]=readVint(_0x53b3e1,_0x2b67c1[_0x4be6cd(0x15c)](_0xf47aff,_0x52d80a)),_0x57783e=_0x2b67c1['pDjUJ'](_0x52d80a+_0x13734f,_0x1ebcb5);_0x14858c!==ID_DURATION&&_0x511a6f['push'](_0x53b3e1['slice'](_0xf47aff,_0xf47aff+_0x57783e)),_0xf47aff+=_0x57783e;}const _0x44e99c=Buffer['concat'](_0x511a6f),_0x23b1c9=Buffer[_0x4be6cd(0x154)]([_0x53b3e1[_0x4be6cd(0x143)](_0x5a9e54,_0x5a9e54+_0x5170b0),_0x2b67c1[_0x4be6cd(0x153)](writeVint,_0x44e99c[_0x4be6cd(0x174)],_0x303122)]);return Buffer[_0x4be6cd(0x154)]([_0x53b3e1['slice'](0x0,_0x5a9e54),_0x23b1c9,_0x44e99c,_0x53b3e1[_0x4be6cd(0x143)](_0x5180d8)]);}_0x5a9e54+=_0x2b67c1['QATeT'](_0x5170b0,_0x303122)+_0x4b9ced;}return _0x53b3e1;}export function stitchWebmFiles(_0x20d29f,_0x50fde6){const _0x172542=_0x3669,_0x2cb48d={'hwqbm':function(_0x4087f3,_0x4b632c){return _0x4087f3<=_0x4b632c;},'vQyoy':function(_0x3f0596,_0x438dc0){return _0x3f0596(_0x438dc0);},'pKsuI':function(_0x13c207,_0x4a03fc,_0x1b433e,_0x506924){return _0x13c207(_0x4a03fc,_0x1b433e,_0x506924);},'PaBkZ':function(_0x1c3e99,_0x37047d){return _0x1c3e99+_0x37047d;},'ukjVm':function(_0x5d2aa7,_0x4c9249,_0x36784b){return _0x5d2aa7(_0x4c9249,_0x36784b);}};if(_0x2cb48d[_0x172542(0x170)](_0x20d29f[_0x172542(0x174)],0x1))return![];const _0x460edf=[];for(const _0xf833d5 of _0x20d29f){const _0x37bcd2=readFileSync(_0xf833d5),_0x4326a7=_0x2cb48d['vQyoy'](parseWebm,_0x37bcd2);if(!_0x4326a7||_0x4326a7['clusters'][_0x172542(0x174)]===0x0)return![];_0x460edf['push'](_0x4326a7);}const _0x4b3e6a=_0x460edf[0x0],_0x448348=rebuildHeaderWithoutDuration(_0x4b3e6a[_0x172542(0x15f)]),_0x3e518b=[_0x448348];let _0x42fdf8=0x0;for(let _0x13bd57=0x0;_0x13bd57<_0x460edf[_0x172542(0x174)];_0x13bd57++){const _0x3e8969=_0x460edf[_0x13bd57];for(const _0x358e60 of _0x3e8969[_0x172542(0x165)]){const _0x2cf2c8=_0x358e60[_0x172542(0x164)]+_0x42fdf8;_0x3e518b['push'](_0x2cb48d['pKsuI'](buildCluster,_0x2cf2c8,_0x358e60['bodyBeforeTimestamp'],_0x358e60[_0x172542(0x13f)]));}const _0x328128=0x1e;_0x42fdf8+=_0x2cb48d['PaBkZ'](_0x3e8969['maxTimestampTicks'],_0x328128);}return _0x2cb48d['ukjVm'](writeFileSync,_0x50fde6,Buffer[_0x172542(0x154)](_0x3e518b)),!![];}if(process[_0x163e52(0x157)][0x1]?.[_0x163e52(0x17e)](_0x163e52(0x16e))||process['argv'][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv'][_0x163e52(0x143)](0x2);args[_0x163e52(0x174)]<0x3&&(console['error'](_0x163e52(0x13e)),process[_0x163e52(0x16a)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs[_0x163e52(0x174)]+'\x20files\x20->\x20'+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x22fa84=_0x5b3c;(function(_0x3f904f,_0x525bae){const _0x1dad2d=_0x5b3c,_0x4c658c=_0x3f904f();while(!![]){try{const _0x59b8ab=parseInt(_0x1dad2d(0xaa))/0x1+parseInt(_0x1dad2d(0xb4))/0x2*(-parseInt(_0x1dad2d(0xe1))/0x3)+parseInt(_0x1dad2d(0xd7))/0x4+parseInt(_0x1dad2d(0xe6))/0x5*(parseInt(_0x1dad2d(0xb1))/0x6)+parseInt(_0x1dad2d(0xcc))/0x7+-parseInt(_0x1dad2d(0xae))/0x8+-parseInt(_0x1dad2d(0xa9))/0x9;if(_0x59b8ab===_0x525bae)break;else _0x4c658c['push'](_0x4c658c['shift']());}catch(_0x30f737){_0x4c658c['push'](_0x4c658c['shift']());}}}(_0x3bbb,0x9f855));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x50bcf7,_0x2f641d){const _0x487d3e=_0x5b3c,_0x3c91d3={'lDZtA':function(_0x93b9a3,_0xbee71a){return _0x93b9a3>=_0xbee71a;},'kjjWU':function(_0xa74230,_0x2019fd){return _0xa74230<=_0x2019fd;},'wprFu':function(_0x55aa00,_0x364ddf){return _0x55aa00>_0x364ddf;},'EgDHW':function(_0x4d0ac3,_0x207c36){return _0x4d0ac3+_0x207c36;},'GuJJR':function(_0x5aefc0,_0x1cd082){return _0x5aefc0&_0x1cd082;},'otRRA':function(_0x2f6eb2,_0xdd5744){return _0x2f6eb2<_0xdd5744;},'TjNZR':function(_0x2bb2e8,_0x527f38){return _0x2bb2e8*_0x527f38;}};if(_0x3c91d3['lDZtA'](_0x2f641d,_0x50bcf7['length']))return[0x0,0x0];const _0x1169bc=_0x50bcf7[_0x2f641d];let _0x1102b8=0x1,_0x13c503=0x80;while(_0x3c91d3[_0x487d3e(0xe9)](_0x1102b8,0x8)&&!(_0x1169bc&_0x13c503)){_0x1102b8++,_0x13c503>>=0x1;}if(_0x3c91d3['wprFu'](_0x3c91d3[_0x487d3e(0xb0)](_0x2f641d,_0x1102b8),_0x50bcf7['length']))return[0x0,0x0];let _0x52ea59=_0x3c91d3['GuJJR'](_0x1169bc,_0x13c503-0x1);for(let _0xfade49=0x1;_0x3c91d3['otRRA'](_0xfade49,_0x1102b8);_0xfade49++){_0x52ea59=_0x3c91d3['TjNZR'](_0x52ea59,0x100)+_0x50bcf7[_0x3c91d3['EgDHW'](_0x2f641d,_0xfade49)];}return[_0x52ea59,_0x1102b8];}function _0x5b3c(_0x196c3b,_0x3f5b09){_0x196c3b=_0x196c3b-0xa9;const _0x3bbb80=_0x3bbb();let _0x5b3cba=_0x3bbb80[_0x196c3b];return _0x5b3cba;}function readId(_0x39c54c,_0x5023d1){const _0x182a24=_0x5b3c,_0x2b93f8={'vfbAk':function(_0x2c4167,_0x12c4fa){return _0x2c4167>=_0x12c4fa;},'vmJZE':function(_0x5ee976,_0x5d9e14){return _0x5ee976>=_0x5d9e14;},'zTDhy':function(_0x228dd7,_0x2fd9c7){return _0x228dd7>_0x2fd9c7;},'qQrIb':function(_0x494c55,_0x27d154){return _0x494c55+_0x27d154;},'gJPWn':function(_0x4ed172,_0x5513e5){return _0x4ed172*_0x5513e5;}};if(_0x5023d1>=_0x39c54c['length'])return[0x0,0x0];const _0x1f625a=_0x39c54c[_0x5023d1];let _0x48567c;if(_0x2b93f8[_0x182a24(0xcf)](_0x1f625a,0x80))_0x48567c=0x1;else{if(_0x1f625a>=0x40)_0x48567c=0x2;else{if(_0x2b93f8['vmJZE'](_0x1f625a,0x20))_0x48567c=0x3;else{if(_0x1f625a>=0x10)_0x48567c=0x4;else return[_0x1f625a,0x1];}}}if(_0x2b93f8['zTDhy'](_0x2b93f8[_0x182a24(0xb8)](_0x5023d1,_0x48567c),_0x39c54c['length']))return[0x0,0x0];let _0x5d4601=0x0;for(let _0x407f06=0x0;_0x407f06<_0x48567c;_0x407f06++){_0x5d4601=_0x2b93f8[_0x182a24(0xc5)](_0x5d4601,0x100)+_0x39c54c[_0x5023d1+_0x407f06];}return[_0x5d4601,_0x48567c];}function readUint(_0x251517,_0x1ee84f,_0x165aef){const _0x2cc1d4={'BUZIn':function(_0x54bc6f,_0x1970da){return _0x54bc6f+_0x1970da;}};let _0x46808e=0x0;for(let _0x35ef3f=0x0;_0x35ef3f<_0x165aef;_0x35ef3f++){_0x46808e=_0x46808e*0x100+_0x251517[_0x2cc1d4['BUZIn'](_0x1ee84f,_0x35ef3f)];}return _0x46808e;}function isUnknownSize(_0x55cf36,_0x178ef5){const _0x5eca8d=_0x5b3c,_0x2fdfc5={'fnPsK':function(_0x37fbbe,_0x40dee4){return _0x37fbbe===_0x40dee4;},'xGdrv':function(_0x472bf3,_0x4bc19f){return _0x472bf3*_0x4bc19f;}};return _0x2fdfc5[_0x5eca8d(0xc4)](_0x55cf36,Math['pow'](0x2,_0x2fdfc5[_0x5eca8d(0xac)](0x7,_0x178ef5))-0x1);}function writeVint(_0x5338cf,_0x1b4371){const _0x5e616d=_0x5b3c,_0x3edff7={'sQclB':function(_0x164d18,_0x109a2d){return _0x164d18||_0x109a2d;},'nOHSP':function(_0x4dd5e5,_0x1d39cb){return _0x4dd5e5<_0x1d39cb;},'KEGXX':function(_0x23c210,_0x758619){return _0x23c210*_0x758619;},'enTPx':function(_0xe18163,_0x15e506){return _0xe18163<<_0x15e506;},'YaNeL':function(_0x5724fb,_0x59de64){return _0x5724fb-_0x59de64;}};let _0x5cc852=_0x3edff7[_0x5e616d(0xc1)](_0x1b4371,0x1);while(_0x3edff7['nOHSP'](Math['pow'](0x2,_0x3edff7[_0x5e616d(0xdb)](0x7,_0x5cc852))-0x2,_0x5338cf))_0x5cc852++;const _0x186274=Buffer['alloc'](_0x5cc852);for(let _0x53d9ab=_0x5cc852-0x1;_0x53d9ab>=0x0;_0x53d9ab--){_0x186274[_0x53d9ab]=_0x5338cf&0xff,_0x5338cf=Math[_0x5e616d(0xe5)](_0x5338cf/0x100);}return _0x186274[0x0]|=_0x3edff7['enTPx'](0x1,_0x3edff7[_0x5e616d(0xd8)](0x8,_0x5cc852)),_0x186274;}function writeUint(_0x379de0,_0x2cea76){const _0x59809f=_0x5b3c,_0x2891b1={'QNmym':function(_0x5a6cad,_0x3720c7){return _0x5a6cad-_0x3720c7;},'DFsJv':function(_0x28c1e9,_0x5501b9){return _0x28c1e9>=_0x5501b9;},'rHUyO':function(_0x13347a,_0x3b1304){return _0x13347a/_0x3b1304;}},_0x291b5d=Buffer['alloc'](_0x2cea76);for(let _0x22be1a=_0x2891b1['QNmym'](_0x2cea76,0x1);_0x2891b1['DFsJv'](_0x22be1a,0x0);_0x22be1a--){_0x291b5d[_0x22be1a]=_0x379de0&0xff,_0x379de0=Math[_0x59809f(0xe5)](_0x2891b1[_0x59809f(0xb5)](_0x379de0,0x100));}return _0x291b5d;}function writeUnknownSizeVint(_0x5c3054){const _0x545629=_0x5b3c,_0x405ce0={'gHEZz':function(_0x300c30,_0x25cb2f){return _0x300c30-_0x25cb2f;}},_0x4da15a=Buffer[_0x545629(0xb9)](_0x5c3054,0xff);return _0x4da15a[0x0]=0xff>>_0x405ce0[_0x545629(0xe4)](_0x5c3054,0x1),_0x4da15a;}function uintSize(_0xc56678){const _0x52c73d=_0x5b3c,_0x1ecbe5={'MESuA':function(_0xf69cb8,_0x3616ea){return _0xf69cb8/_0x3616ea;}};if(_0xc56678===0x0)return 0x1;let _0x509701=0x0,_0x17bb68=_0xc56678;while(_0x17bb68>0x0){_0x509701++,_0x17bb68=Math[_0x52c73d(0xe5)](_0x1ecbe5[_0x52c73d(0xd1)](_0x17bb68,0x100));}return _0x509701;}function findTimestampScale(_0x534ddf,_0x3017ee){const _0x45912e=_0x5b3c,_0x27a39f={'NldRj':function(_0x24b718,_0x30ffc9){return _0x24b718+_0x30ffc9;},'rvVba':function(_0x24dbc2,_0x1a6c71,_0x11e5b0){return _0x24dbc2(_0x1a6c71,_0x11e5b0);},'nUYQz':function(_0x43cc72,_0x2fde70){return _0x43cc72===_0x2fde70;},'OxFZG':function(_0x133985,_0x4cae03){return _0x133985<_0x4cae03;},'tCMio':function(_0x3c861e,_0x2da937,_0x4047f4){return _0x3c861e(_0x2da937,_0x4047f4);},'GGWqi':function(_0x262db4,_0x1154b4){return _0x262db4+_0x1154b4;},'kxAEG':function(_0x3c5689,_0xadd7af,_0x10bb87,_0x2f01cc){return _0x3c5689(_0xadd7af,_0x10bb87,_0x2f01cc);}};let _0x3f02a4=_0x3017ee;const _0x1fdb72=Math['min'](_0x534ddf[_0x45912e(0xd3)],_0x27a39f[_0x45912e(0xc2)](_0x3017ee,0x2710));while(_0x3f02a4<_0x1fdb72){const [_0x278e47,_0x386eb8]=readId(_0x534ddf,_0x3f02a4),[_0x111b11,_0x8446c]=_0x27a39f['rvVba'](readVint,_0x534ddf,_0x3f02a4+_0x386eb8);if(_0x27a39f['nUYQz'](_0x278e47,ID_INFO)){let _0x55f63e=_0x27a39f['NldRj'](_0x3f02a4+_0x386eb8,_0x8446c);const _0x50b7b8=_0x55f63e+_0x111b11;while(_0x27a39f[_0x45912e(0xdc)](_0x55f63e,_0x50b7b8)){const [_0x1ee86b,_0x585186]=_0x27a39f[_0x45912e(0xde)](readId,_0x534ddf,_0x55f63e),[_0x5778b8,_0x435a6f]=_0x27a39f[_0x45912e(0xb3)](readVint,_0x534ddf,_0x27a39f[_0x45912e(0xc8)](_0x55f63e,_0x585186));if(_0x1ee86b===ID_TIMESTAMP_SCALE)return _0x27a39f['kxAEG'](readUint,_0x534ddf,_0x27a39f['NldRj'](_0x55f63e+_0x585186,_0x435a6f),_0x5778b8);_0x55f63e+=_0x585186+_0x435a6f+_0x5778b8;}break;}if(_0x278e47===ID_CLUSTER)break;if(isUnknownSize(_0x111b11,_0x8446c))break;_0x3f02a4+=_0x27a39f[_0x45912e(0xc8)](_0x27a39f[_0x45912e(0xc8)](_0x386eb8,_0x8446c),_0x111b11);}return 0xf4240;}function findFirstClusterOffset(_0x57d56c,_0x3ce701){const _0x2bc8de=_0x5b3c,_0x5d20a4={'PtNPx':function(_0x57aba0,_0xbf7040,_0x4efcaa){return _0x57aba0(_0xbf7040,_0x4efcaa);},'qwrqW':function(_0xe89a19,_0x209977){return _0xe89a19===_0x209977;},'uCaIj':function(_0x36aa10,_0x41afb4){return _0x36aa10+_0x41afb4;},'WvqAe':function(_0x26323b,_0x488ea7){return _0x26323b+_0x488ea7;}};let _0x1e9471=_0x3ce701;while(_0x1e9471<_0x57d56c['length']){const [_0x179064,_0x39d386]=_0x5d20a4['PtNPx'](readId,_0x57d56c,_0x1e9471);if(_0x5d20a4[_0x2bc8de(0xd5)](_0x179064,ID_CLUSTER))return _0x1e9471;const [_0x25899a,_0x2d9476]=_0x5d20a4['PtNPx'](readVint,_0x57d56c,_0x1e9471+_0x39d386);if(isUnknownSize(_0x25899a,_0x2d9476))return _0x1e9471;_0x1e9471+=_0x5d20a4['uCaIj'](_0x5d20a4[_0x2bc8de(0xc0)](_0x39d386,_0x2d9476),_0x25899a);}return _0x57d56c['length'];}function findClusterEnd(_0x2ef400,_0x12b501,_0x277b28,_0x51d0f8){const _0x589e65=_0x5b3c,_0x3cbcf1={'ewCyV':function(_0x46d50d,_0x7bc9b3){return _0x46d50d+_0x7bc9b3;},'jJPit':function(_0x2c4bd3,_0x4e48ea,_0x3dfb66){return _0x2c4bd3(_0x4e48ea,_0x3dfb66);},'EULKm':function(_0x2779f5,_0x549ab7,_0x2ccd16){return _0x2779f5(_0x549ab7,_0x2ccd16);},'mIxWD':function(_0x2ca77e,_0x405179){return _0x2ca77e+_0x405179;}};if(!isUnknownSize(_0x277b28,_0x51d0f8))return _0x3cbcf1['ewCyV'](_0x12b501,_0x277b28);const _0x3e8c99=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x5bdfb4=_0x12b501;while(_0x5bdfb4<_0x2ef400[_0x589e65(0xd3)]-0x4){const [_0x5d20d4,_0x550d6b]=_0x3cbcf1[_0x589e65(0xc9)](readId,_0x2ef400,_0x5bdfb4);if(_0x3e8c99['has'](_0x5d20d4))return _0x5bdfb4;const [_0x18b522,_0x1116f1]=_0x3cbcf1['jJPit'](readVint,_0x2ef400,_0x5bdfb4+_0x550d6b);if(_0x3cbcf1['EULKm'](isUnknownSize,_0x18b522,_0x1116f1))return _0x2ef400[_0x589e65(0xd3)];_0x5bdfb4+=_0x3cbcf1[_0x589e65(0xbd)](_0x550d6b,_0x1116f1)+_0x18b522;}return _0x2ef400['length'];}function extractClusters(_0x423d56,_0xe24859){const _0x27ec2a=_0x5b3c,_0x2f36c7={'xjzmf':function(_0x23ba6c,_0x2f2f4a){return _0x23ba6c<_0x2f2f4a;},'xoWUp':function(_0x127d53,_0x4295f9,_0x3644ff){return _0x127d53(_0x4295f9,_0x3644ff);},'sMaek':function(_0x2e3434,_0xa834c6){return _0x2e3434!==_0xa834c6;},'bTwxC':function(_0x586f97,_0x464c98){return _0x586f97+_0x464c98;},'OMcwt':function(_0x3db99d,_0x3c4874){return _0x3db99d+_0x3c4874;},'TsrCY':function(_0x120ac2,_0x310e38,_0x49ef65,_0x1b5c5c,_0x24653d){return _0x120ac2(_0x310e38,_0x49ef65,_0x1b5c5c,_0x24653d);},'tkKsZ':function(_0x1531a7,_0x4ec18f){return _0x1531a7+_0x4ec18f;},'eZSHw':function(_0x4bbc1c,_0x40206c){return _0x4bbc1c===_0x40206c;},'CBxOw':function(_0x8f101e,_0x1939b4,_0x5932f2,_0x4233a1){return _0x8f101e(_0x1939b4,_0x5932f2,_0x4233a1);},'yGbyZ':function(_0x57c0df,_0x1a002c){return _0x57c0df+_0x1a002c;},'ZadJZ':function(_0x4d552b,_0x37df79,_0x3cab03){return _0x4d552b(_0x37df79,_0x3cab03);},'kQXAu':function(_0x28f1d8,_0x3f4f41,_0x2db548){return _0x28f1d8(_0x3f4f41,_0x2db548);},'bWyFm':function(_0x195e42,_0x7e3455){return _0x195e42>=_0x7e3455;},'qYCLj':function(_0x4d4f22,_0x3b34c4){return _0x4d4f22+_0x3b34c4;},'IPxaz':function(_0xebfe04,_0x4c4cb1){return _0xebfe04+_0x4c4cb1;}},_0x4d0e9d=[],_0x5a5108=Buffer[_0x27ec2a(0xba)]([0x1f,0x43,0xb6,0x75]);let _0x5500e3=0x0;while(_0x2f36c7['xjzmf'](_0x5500e3,_0x423d56['length'])){const _0x1f8fa3=_0x423d56['indexOf'](_0x5a5108,_0x5500e3);if(_0x1f8fa3===-0x1)break;const [_0xb4b18b,_0xb2366b]=_0x2f36c7[_0x27ec2a(0xce)](readId,_0x423d56,_0x1f8fa3);if(_0x2f36c7[_0x27ec2a(0xd9)](_0xb4b18b,ID_CLUSTER)){_0x5500e3=_0x1f8fa3+0x1;continue;}const [_0x4676f3,_0x1edcaa]=_0x2f36c7['xoWUp'](readVint,_0x423d56,_0x2f36c7[_0x27ec2a(0xb7)](_0x1f8fa3,_0xb2366b)),_0xe72b8e=_0x2f36c7['bTwxC'](_0x2f36c7[_0x27ec2a(0xe0)](_0x1f8fa3,_0xb2366b),_0x1edcaa),_0x16cebd=_0x2f36c7['TsrCY'](findClusterEnd,_0x423d56,_0xe72b8e,_0x4676f3,_0x1edcaa);let _0x51a2da=_0xe72b8e,_0x1b64b4=0x0,_0x195fb3=0x2,_0x2134a8=![],_0x40c50c=Buffer['alloc'](0x0),_0x5884b6=Buffer[_0x27ec2a(0xb9)](0x0);while(_0x51a2da<_0x16cebd){const [_0x4577b6,_0x327738]=readId(_0x423d56,_0x51a2da),[_0x477e3a,_0x276b37]=_0x2f36c7[_0x27ec2a(0xce)](readVint,_0x423d56,_0x2f36c7['tkKsZ'](_0x51a2da,_0x327738));if(_0x2f36c7['eZSHw'](_0x4577b6,ID_TIMESTAMP)){_0x1b64b4=_0x2f36c7['CBxOw'](readUint,_0x423d56,_0x2f36c7['tkKsZ'](_0x51a2da+_0x327738,_0x276b37),_0x477e3a),_0x195fb3=_0x477e3a,_0x2134a8=!![],_0x40c50c=_0x423d56[_0x27ec2a(0xab)](_0xe72b8e,_0x51a2da);const _0x5e6648=_0x2f36c7['yGbyZ'](_0x51a2da,_0x327738)+_0x276b37+_0x477e3a;_0x5884b6=_0x423d56[_0x27ec2a(0xab)](_0x5e6648,_0x16cebd);break;}if(_0x4577b6===ID_CLUSTER)break;if(isUnknownSize(_0x477e3a,_0x276b37))break;_0x51a2da+=_0x327738+_0x276b37+_0x477e3a;}!_0x2134a8&&(_0x5884b6=_0x423d56['slice'](_0xe72b8e,_0x16cebd));let _0x450065=_0x1b64b4;_0x51a2da=_0xe72b8e;while(_0x51a2da<_0x16cebd){const [_0x523daf,_0x4677f4]=_0x2f36c7[_0x27ec2a(0xbc)](readId,_0x423d56,_0x51a2da),[_0x5ba22e,_0x403551]=_0x2f36c7[_0x27ec2a(0xda)](readVint,_0x423d56,_0x51a2da+_0x4677f4);if(_0x523daf===ID_SIMPLE_BLOCK&&_0x2f36c7[_0x27ec2a(0xbf)](_0x5ba22e,0x4)){const _0x487804=_0x2f36c7['qYCLj'](_0x51a2da+_0x4677f4,_0x403551),[,_0x36b0a4]=readVint(_0x423d56,_0x487804),_0x35fd44=_0x423d56[_0x27ec2a(0xc6)](_0x487804+_0x36b0a4),_0x3ffc46=_0x2f36c7['bTwxC'](_0x1b64b4,_0x35fd44);if(_0x3ffc46>_0x450065)_0x450065=_0x3ffc46;}if(_0x523daf===ID_CLUSTER)break;if(isUnknownSize(_0x5ba22e,_0x403551))break;_0x51a2da+=_0x2f36c7[_0x27ec2a(0xe8)](_0x4677f4,_0x403551)+_0x5ba22e;}_0x4d0e9d['push']({'timestamp':_0x1b64b4,'maxTicks':_0x450065,'bodyBeforeTimestamp':_0x40c50c,'bodyAfterTimestamp':_0x5884b6,'timestampElementSize':_0x195fb3}),_0x5500e3=_0x16cebd;}return _0x4d0e9d;}function parseWebm(_0x28ff85){const _0x6ad49c=_0x5b3c,_0x3da49e={'AWeKk':function(_0x493dc7,_0x53f916,_0x1b3acc){return _0x493dc7(_0x53f916,_0x1b3acc);},'UAOMC':function(_0x28e9c8,_0x315d2e){return _0x28e9c8+_0x315d2e;},'bKExx':function(_0x4fed7b,_0x411e96){return _0x4fed7b!==_0x411e96;}};let _0x5952f3=0x0;const [,_0x3d4cc0]=_0x3da49e[_0x6ad49c(0xdd)](readId,_0x28ff85,_0x5952f3),[_0x471532,_0x431d3c]=readVint(_0x28ff85,_0x5952f3+_0x3d4cc0);_0x5952f3+=_0x3da49e['UAOMC'](_0x3d4cc0,_0x431d3c)+_0x471532;const [_0x5b4513,_0x3f827d]=readId(_0x28ff85,_0x5952f3);if(_0x3da49e[_0x6ad49c(0xcb)](_0x5b4513,ID_SEGMENT))return null;const [,_0x29ddb0]=readVint(_0x28ff85,_0x5952f3+_0x3f827d),_0x382d63=_0x3da49e[_0x6ad49c(0xd0)](_0x3da49e[_0x6ad49c(0xd0)](_0x5952f3,_0x3f827d),_0x29ddb0),_0x37bd5c=findTimestampScale(_0x28ff85,_0x382d63),_0x4c020f=findFirstClusterOffset(_0x28ff85,_0x382d63),_0x476431=_0x28ff85[_0x6ad49c(0xab)](0x0,_0x4c020f),_0x23cf52=_0x3da49e['AWeKk'](extractClusters,_0x28ff85,_0x37bd5c);let _0x23bcb7=0x0;for(const _0x44accd of _0x23cf52){if(_0x44accd[_0x6ad49c(0xea)]>_0x23bcb7)_0x23bcb7=_0x44accd['maxTicks'];}return{'header':_0x476431,'clusters':_0x23cf52,'timestampScale':_0x37bd5c,'maxTimestampTicks':_0x23bcb7};}function _0x3bbb(){const _0x1d584f=['qQrIb','alloc','from','TTrrl','ZadJZ','mIxWD','bjomw','bWyFm','WvqAe','sQclB','NldRj','push','fnPsK','gJPWn','readInt16BE','copy','GGWqi','jJPit','header','bKExx','2048830ISrONX','stitchWebmFiles.ts','xoWUp','vfbAk','UAOMC','MESuA','KSnNR','length','argv','qwrqW','timestamp','182240YfiIFZ','YaNeL','sMaek','kQXAu','KEGXX','OxFZG','AWeKk','tCMio','concat','OMcwt','751569ZwQyPi','stitchWebmFiles.js','min','gHEZz','floor','25tjxLaW','max','IPxaz','kjjWU','maxTicks','5389209GJpnNC','658997rVbMUg','slice','xGdrv','MTFxz','381448iqQDId','dfCpG','EgDHW','663786PovfHP','bodyAfterTimestamp','rvVba','2WXlljT','rHUyO','clusters','bTwxC'];_0x3bbb=function(){return _0x1d584f;};return _0x3bbb();}function buildCluster(_0x3ef7b5,_0x329c45,_0xa845bd){const _0x32824c=_0x5b3c,_0x4453f4={'KSnNR':function(_0x51b1d5,_0x5baf43){return _0x51b1d5(_0x5baf43);},'HInaG':function(_0x5506f5,_0x531b32,_0x3b175a){return _0x5506f5(_0x531b32,_0x3b175a);}},_0x59b9fb=Buffer[_0x32824c(0xba)]([0x1f,0x43,0xb6,0x75]),_0x487532=Math[_0x32824c(0xe7)](0x4,_0x4453f4['KSnNR'](uintSize,_0x3ef7b5)),_0x546e92=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x4453f4['KSnNR'](writeVint,_0x487532),_0x4453f4['HInaG'](writeUint,_0x3ef7b5,_0x487532)]),_0x580411=Buffer['concat']([_0x329c45,_0x546e92,_0xa845bd]),_0x1f342f=_0x4453f4[_0x32824c(0xd2)](writeVint,_0x580411[_0x32824c(0xd3)]);return Buffer[_0x32824c(0xdf)]([_0x59b9fb,_0x1f342f,_0x580411]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x149cc5){const _0x4569b5=_0x5b3c,_0x580d82={'yluOy':function(_0x79dc65,_0x27c382){return _0x79dc65+_0x27c382;},'YNEpz':function(_0x1b500b,_0x570fba,_0x133886){return _0x1b500b(_0x570fba,_0x133886);},'dfCpG':function(_0x12daec,_0x1bc9da){return _0x12daec+_0x1bc9da;},'BCVMb':function(_0x5abb0a,_0x547078){return _0x5abb0a+_0x547078;},'TTrrl':function(_0x4caa69,_0x100f86){return _0x4caa69+_0x100f86;},'bjomw':function(_0x3343cc,_0xad5032,_0x5b5922){return _0x3343cc(_0xad5032,_0x5b5922);}},_0xd33a39=Buffer[_0x4569b5(0xba)](_0x149cc5);let _0x3aa910=0x0;const [,_0x101b2e]=readId(_0xd33a39,_0x3aa910),[_0xeb6555,_0x2048b8]=readVint(_0xd33a39,_0x3aa910+_0x101b2e),_0x1e6392=_0x580d82['yluOy'](_0x3aa910+_0x101b2e,_0x2048b8)+_0xeb6555,[,_0x3a0a76]=_0x580d82['YNEpz'](readId,_0xd33a39,_0x1e6392),[,_0x33d5b7]=readVint(_0xd33a39,_0x1e6392+_0x3a0a76),_0x498b01=_0x1e6392+_0x3a0a76+_0x33d5b7,_0x4de788=writeUnknownSizeVint(_0x33d5b7);_0x4de788[_0x4569b5(0xc7)](_0xd33a39,_0x1e6392+_0x3a0a76);let _0x18947d=_0x498b01;const _0x4b73af=Math[_0x4569b5(0xe3)](_0xd33a39[_0x4569b5(0xd3)],_0x580d82['dfCpG'](_0x498b01,0x2710));while(_0x18947d<_0x4b73af){const [_0x3d59eb,_0x574f37]=readId(_0xd33a39,_0x18947d),[_0xe2e6a0,_0x3bce57]=readVint(_0xd33a39,_0x18947d+_0x574f37);if(_0x3d59eb===ID_CLUSTER)break;if(_0x580d82['YNEpz'](isUnknownSize,_0xe2e6a0,_0x3bce57))break;if(_0x3d59eb===ID_INFO){const _0x3865a0=_0x580d82[_0x4569b5(0xaf)](_0x580d82['dfCpG'](_0x18947d,_0x574f37),_0x3bce57),_0x587177=_0x580d82['BCVMb'](_0x3865a0,_0xe2e6a0),_0x44f6f0=[];let _0x3af631=_0x3865a0;while(_0x3af631<_0x587177){const [_0x34a088,_0x474f4e]=readId(_0xd33a39,_0x3af631),[_0x126e51,_0x24e582]=readVint(_0xd33a39,_0x3af631+_0x474f4e),_0x33bb8d=_0x580d82['yluOy'](_0x474f4e+_0x24e582,_0x126e51);_0x34a088!==ID_DURATION&&_0x44f6f0['push'](_0xd33a39[_0x4569b5(0xab)](_0x3af631,_0x580d82[_0x4569b5(0xbb)](_0x3af631,_0x33bb8d))),_0x3af631+=_0x33bb8d;}const _0x1f8124=Buffer['concat'](_0x44f6f0),_0x2dfbaf=Buffer[_0x4569b5(0xdf)]([_0xd33a39['slice'](_0x18947d,_0x580d82['dfCpG'](_0x18947d,_0x574f37)),_0x580d82[_0x4569b5(0xbe)](writeVint,_0x1f8124[_0x4569b5(0xd3)],_0x3bce57)]);return Buffer['concat']([_0xd33a39['slice'](0x0,_0x18947d),_0x2dfbaf,_0x1f8124,_0xd33a39[_0x4569b5(0xab)](_0x587177)]);}_0x18947d+=_0x574f37+_0x3bce57+_0xe2e6a0;}return _0xd33a39;}export function stitchWebmFiles(_0x3108b7,_0x561f11){const _0x452002=_0x5b3c,_0x1e2192={'MTFxz':function(_0x54469d,_0x270b90){return _0x54469d(_0x270b90);}};if(_0x3108b7[_0x452002(0xd3)]<=0x1)return![];const _0x246e9b=[];for(const _0x14ed33 of _0x3108b7){const _0x261ca1=_0x1e2192[_0x452002(0xad)](readFileSync,_0x14ed33),_0x565380=parseWebm(_0x261ca1);if(!_0x565380||_0x565380['clusters']['length']===0x0)return![];_0x246e9b['push'](_0x565380);}const _0x56cefc=_0x246e9b[0x0],_0x452a9c=rebuildHeaderWithoutDuration(_0x56cefc[_0x452002(0xca)]),_0x5f562a=[_0x452a9c];let _0x211f4f=0x0;for(let _0x22e0a1=0x0;_0x22e0a1<_0x246e9b[_0x452002(0xd3)];_0x22e0a1++){const _0x5db692=_0x246e9b[_0x22e0a1];for(const _0x4a2ecc of _0x5db692[_0x452002(0xb6)]){const _0x27097c=_0x4a2ecc[_0x452002(0xd6)]+_0x211f4f;_0x5f562a[_0x452002(0xc3)](buildCluster(_0x27097c,_0x4a2ecc['bodyBeforeTimestamp'],_0x4a2ecc[_0x452002(0xb2)]));}const _0x40ca2d=0x1e;_0x211f4f+=_0x5db692['maxTimestampTicks']+_0x40ca2d;}return writeFileSync(_0x561f11,Buffer['concat'](_0x5f562a)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x22fa84(0xcd))||process[_0x22fa84(0xd4)][0x1]?.['endsWith'](_0x22fa84(0xe2))){const args=process['argv'][_0x22fa84(0xab)](0x2);args[_0x22fa84(0xd3)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x22fa84(0xd3)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs['length']+'\x20files\x20->\x20'+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|