@ranger-testing/ranger-cli 3.1.6-alpha.aca5f9c-53 → 3.1.7-alpha.62f152a-54
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 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2bac2d,_0x6de1e1){const _0xa2c6ff=_0x5766,_0x4b04e0=_0x2bac2d();while(!![]){try{const _0x14fd02=parseInt(_0xa2c6ff(0x1c4))/0x1*(-parseInt(_0xa2c6ff(0x1e2))/0x2)+parseInt(_0xa2c6ff(0x1db))/0x3*(parseInt(_0xa2c6ff(0x1bd))/0x4)+parseInt(_0xa2c6ff(0x1e5))/0x5+-parseInt(_0xa2c6ff(0x1d3))/0x6*(-parseInt(_0xa2c6ff(0x1d7))/0x7)+-parseInt(_0xa2c6ff(0x1a7))/0x8+parseInt(_0xa2c6ff(0x1b6))/0x9+-parseInt(_0xa2c6ff(0x1da))/0xa;if(_0x14fd02===_0x6de1e1)break;else _0x4b04e0['push'](_0x4b04e0['shift']());}catch(_0x304f06){_0x4b04e0['push'](_0x4b04e0['shift']());}}}(_0xc601,0xdde11));import{existsSync}from'fs';function _0xc601(){const _0x3c7f71=['\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','log','RANGER_TEST_USERNAME','cCBPf','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','pfOAC','307117DuUVpt','clDQo','SvDSN','profile','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','GQjzq','authEnv','\x20to\x20override.','WQyYJ','env','VyPMn','\x22.\x20Pass\x20--profile\x20','tULfA','cloud','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','36132vBvwco','uCMuE','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','HLTUg','329iXfCNE','prompt','Cloud\x20profile\x20(recommended)','20102450UDYTQi','1233eLwaBC','baseUrl','vtzCP','\x20baseUrl\x20<url>','aluQm','vayfc','\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22','2xDHPFv','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','6737840SxvWLc','uvemY','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','domains','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','name','string','2502696WKndwt','uVzop','envStartPath','PNIjE','`\x20to\x20recreate\x20it.','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','startPath','\x20does\x20not\x20exist.','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','WZMUg','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','Local\x20profile','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','12378123mqzrJV','list','jCRRR','VehBx','length','key','DRTTb','5188pFYeDJ'];_0xc601=function(){return _0x3c7f71;};return _0xc601();}import _0x3b835f 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(_0x5c2cf2){const _0x3cf38f=_0x5766,_0x517efe={'udhKa':function(_0x55be20,_0x32bdd0){return _0x55be20!==_0x32bdd0;},'uvemY':function(_0xd65434,_0x4f83d5){return _0xd65434??_0x4f83d5;},'kDTOy':function(_0x3eae49,_0x4a21d7){return _0x3eae49+_0x4a21d7;},'gctGz':function(_0x34d2b2,_0x275b2b){return _0x34d2b2+_0x275b2b;},'tULfA':_0x3cf38f(0x1ae),'YVVIt':_0x3cf38f(0x1e7),'pfOAC':function(_0x16b689,_0x43d674){return _0x16b689(_0x43d674);},'HLTUg':function(_0x3df6a6,_0x4424d6){return _0x3df6a6 instanceof _0x4424d6;},'WZMUg':function(_0x18f5eb,_0x3944e1){return _0x18f5eb===_0x3944e1;},'PNIjE':function(_0x23a426,_0x2e66d1){return _0x23a426&&_0x2e66d1;},'SEGKG':function(_0x391d18,_0x42cf4a){return _0x391d18+_0x42cf4a;},'jCRRR':function(_0x435314,_0x5ab133){return _0x435314+_0x5ab133;},'vtzCP':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','WQyYJ':function(_0x31e4eb){return _0x31e4eb();},'aluQm':_0x3cf38f(0x1b7),'DCrGe':_0x3cf38f(0x1d9),'VyPMn':'local','cCBPf':_0x3cf38f(0x1d1),'GQjzq':function(_0x42e0e1,_0x19af80){return _0x42e0e1(_0x19af80);},'KQgDp':function(_0x29a5a2,_0x319fb2,_0x1c1916){return _0x29a5a2(_0x319fb2,_0x1c1916);},'TzfCu':function(_0x30bff8,_0x3e61ad,_0x106d2f){return _0x30bff8(_0x3e61ad,_0x106d2f);},'DRTTb':function(_0x3c8e6c,_0xeb6259){return _0x3c8e6c(_0xeb6259);},'clDQo':function(_0x59caa4,_0x22250d){return _0x59caa4+_0x22250d;},'uCMuE':function(_0x3f0baf,_0x317958){return _0x3f0baf+_0x317958;},'OwpzI':function(_0x46085e,_0x5b3e4c){return _0x46085e+_0x5b3e4c;},'VehBx':_0x3cf38f(0x1ad),'SvDSN':function(_0x3ed7aa,_0x544b1e){return _0x3ed7aa(_0x544b1e);},'uVzop':function(_0x36238c,_0x34a240){return _0x36238c&&_0x34a240;}},_0x515ef5=_0x5c2cf2['profile'];let _0x319a89=_0x515ef5,_0x44f5c8=null;const _0x114aea=_0x515ef5?null:await readActiveProfileName();if(_0x5c2cf2[_0x3cf38f(0x1ca)]&&_0x515ef5)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x5c2cf2[_0x3cf38f(0x1ca)]+_0x3cf38f(0x1e1)+_0x515ef5+_0x3cf38f(0x1e3));else _0x5c2cf2['authEnv']&&!process[_0x3cf38f(0x1cd)][_0x3cf38f(0x1c0)]&&console[_0x3cf38f(0x1bf)]('\x20\x20Note:\x20--env\x20\x22'+_0x5c2cf2['authEnv']+_0x3cf38f(0x1be));if(!_0x515ef5&&process[_0x3cf38f(0x1cd)][_0x3cf38f(0x1c0)])try{const _0x2fa2c6=await resolveAdHocProfile({'targetUrl':_0x5c2cf2[_0x3cf38f(0x1dc)]??readUrlEnvVars()['envBaseUrl'],'envKey':_0x5c2cf2['authEnv']});_0x2fa2c6&&(_0x114aea&&_0x517efe['udhKa'](_0x114aea,_0x2fa2c6[_0x3cf38f(0x1a5)])&&console[_0x3cf38f(0x1bf)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x2fa2c6['name']+_0x3cf38f(0x1e4)+_0x114aea+_0x3cf38f(0x1cf)+_0x114aea+_0x3cf38f(0x1cb)),_0x319a89=_0x2fa2c6[_0x3cf38f(0x1a5)],_0x44f5c8=_0x2fa2c6[_0x3cf38f(0x1c7)]);}catch(_0x5c0907){if(!_0x114aea||_0x5c2cf2['authEnv'])throw _0x5c0907;console['log']('\x20\x20Warning:\x20'+(_0x5c0907 instanceof Error?_0x5c0907['message']:String(_0x5c0907))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x114aea+'\x22.');}if(!_0x319a89)_0x319a89=_0x517efe[_0x3cf38f(0x1e6)](_0x114aea,undefined);if(!_0x319a89)try{const _0x3fde9c=await listCloudProfiles();if(_0x3fde9c[_0x3cf38f(0x1ba)]===0x1){const _0x4bfb80=_0x3fde9c[0x0];_0x319a89=_0x4bfb80['name'],console[_0x3cf38f(0x1bf)](_0x3cf38f(0x1b1)+_0x4bfb80[_0x3cf38f(0x1a5)]),console['log'](_0x3cf38f(0x1e9));}}catch{}if(!_0x319a89)throw new Error(_0x517efe['kDTOy'](_0x517efe['gctGz'](_0x517efe['gctGz'](_0x3cf38f(0x1a4),'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a')+_0x517efe[_0x3cf38f(0x1d0)],_0x517efe['YVVIt']),_0x3cf38f(0x1d2)));const _0x456bac=_0x517efe['pfOAC'](getEnvDir,_0x319a89),_0x210795=_0x517efe['pfOAC'](existsSync,_0x456bac);let _0x53114c=_0x44f5c8,_0x26cecb=![];if(!_0x53114c)try{_0x53114c=await fetchCloudProfile(_0x319a89);if(!_0x53114c)_0x26cecb=!![];}catch(_0x15b438){_0x517efe[_0x3cf38f(0x1d6)](_0x15b438,ApiError)&&_0x517efe[_0x3cf38f(0x1b2)](_0x15b438['status'],0x194)&&(_0x26cecb=!![]);}if(_0x517efe[_0x3cf38f(0x1aa)](_0x515ef5,_0x26cecb)&&!_0x210795&&!_0x53114c)throw new Error(_0x517efe['SEGKG'](_0x517efe[_0x3cf38f(0x1b8)]('Profile\x20\x22'+_0x515ef5+_0x3cf38f(0x1c2),_0x3cf38f(0x1ac)),_0x517efe[_0x3cf38f(0x1dd)]));if(_0x53114c&&_0x210795){let _0x3cf2ad=!![];if(_0x517efe[_0x3cf38f(0x1cc)](isInteractive)){const {source:_0x2c9727}=await _0x3b835f[_0x3cf38f(0x1d8)]([{'type':_0x517efe[_0x3cf38f(0x1df)],'name':'source','message':'Profile\x20\x22'+_0x319a89+_0x3cf38f(0x1b5),'choices':[{'name':_0x517efe['DCrGe'],'value':'cloud'},{'name':_0x3cf38f(0x1b4),'value':_0x517efe[_0x3cf38f(0x1ce)]}],'default':_0x517efe[_0x3cf38f(0x1c1)]}]);_0x3cf2ad=_0x517efe[_0x3cf38f(0x1b2)](_0x2c9727,_0x517efe[_0x3cf38f(0x1c1)]);}if(!_0x3cf2ad)_0x53114c=null;}const _0x34cd89=readProfileOverrides(process['cwd'](),_0x319a89);let _0x4de318=null,_0x417605,_0x5e7c6d,_0x532aca,_0x7082f6,_0x21b4c5=null,_0x572fe7,_0x50796a;const _0x282f4a=expandOverrides(_0x34cd89),_0x247dd5=readUrlEnvVars();if(_0x53114c){_0x4de318=_0x53114c;const _0x3dfd0b=_0x53114c['settings']??{},_0x2aaba4=mergeCloudProfileSettings(_0x3dfd0b,_0x34cd89??undefined),_0x2c637f={..._0x53114c,'settings':_0x2aaba4};_0x21b4c5={'baseUrl':_0x517efe['pfOAC'](expandString,_0x3dfd0b['baseUrl']),'startPath':_0x517efe['GQjzq'](expandString,_0x3dfd0b['startPath'])};const _0x4b4a40=await _0x517efe[_0x3cf38f(0x1cc)](fetchAuthConfig),_0x5529b1=_0x4b4a40?_0x517efe['KQgDp'](resolveAuthEnvironmentLocally,_0x4b4a40,_0x53114c['environmentKey']):null;_0x572fe7=_0x5529b1?.['domains']?.[0x0],_0x50796a=_0x5529b1?.['key'];const _0xb10b1e=resolveProfileUrl({'flagBaseUrl':_0x5c2cf2['baseUrl'],'flagStartPath':_0x5c2cf2[_0x3cf38f(0x1af)],'envBaseUrl':_0x247dd5['envBaseUrl'],'envStartPath':_0x247dd5[_0x3cf38f(0x1a9)],'projectOverrides':_0x282f4a,'cloudSettings':_0x21b4c5,'authEnvironmentDomain':_0x572fe7}),_0x37b1fd=process['env']['RANGER_SESSION_STATE_PATH'];if(_0x37b1fd){if(!existsSync(_0x37b1fd))throw new Error('RANGER_SESSION_STATE_PATH='+_0x37b1fd+_0x3cf38f(0x1b0));_0x417605=_0x37b1fd,_0x5e7c6d=_0x517efe[_0x3cf38f(0x1c9)](resolveEnvVars,_0x2aaba4),_0x532aca=Boolean(_0x5e7c6d['cdpEndpoint']);}else{const _0x47fd0f=await _0x517efe['TzfCu'](resolveCloudProfileSession,_0x2c637f,{'effectiveBaseUrl':_0xb10b1e['baseUrl'],'telemetry':_0x5c2cf2['telemetry'],'assertedEnv':_0x5c2cf2['authEnv']});_0x417605=_0x47fd0f['authPath'],_0x5e7c6d=_0x517efe['DRTTb'](resolveEnvVars,_0x47fd0f['settings']),_0x532aca=Boolean(_0x5e7c6d['cdpEndpoint']),_0x572fe7=_0x47fd0f['resolvedEnv']?.[_0x3cf38f(0x1e8)]?.[0x0],_0x50796a=_0x47fd0f['resolvedEnv']?.[_0x3cf38f(0x1bb)];}}else{if(!_0x210795){const _0x4d7e8f=!_0x515ef5;throw new Error(_0x4d7e8f?_0x517efe[_0x3cf38f(0x1c5)](_0x517efe[_0x3cf38f(0x1d4)](_0x517efe['OwpzI']('Active\x20profile\x20\x22'+_0x319a89+_0x3cf38f(0x1d5),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a'),_0x517efe[_0x3cf38f(0x1b9)]),'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x319a89+_0x3cf38f(0x1ab)):'Profile\x20\x22'+_0x319a89+_0x3cf38f(0x1b3)+_0x319a89);}const _0xbcc97f=await loadSettings(_0x319a89);_0x5e7c6d=_0x517efe[_0x3cf38f(0x1bc)](resolveEnvVars,_0xbcc97f),_0x532aca=_0x517efe[_0x3cf38f(0x1c3)](Boolean,_0x5e7c6d['cdpEndpoint']),_0x7082f6=_0x5e7c6d['baseUrl'];}const _0x126296=_0x517efe[_0x3cf38f(0x1c6)](resolveProfileUrl,{'flagBaseUrl':_0x5c2cf2[_0x3cf38f(0x1dc)],'flagStartPath':_0x5c2cf2['startPath'],'envBaseUrl':_0x247dd5['envBaseUrl'],'envStartPath':_0x247dd5[_0x3cf38f(0x1a9)],'localSettingsBaseUrl':_0x7082f6,'projectOverrides':_0x282f4a,'cloudSettings':_0x21b4c5,'authEnvironmentDomain':_0x572fe7}),_0xbb9150=_0x126296['url']??_0x126296['baseUrl'];if(_0x517efe[_0x3cf38f(0x1a8)](!_0xbb9150,!_0x532aca))throw new Error(_0x3cf38f(0x1c8)+_0x319a89+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x319a89+_0x3cf38f(0x1de));return{'activeProfile':_0x319a89,'resolvedCloudProfile':_0x4de318,'cloudAuthPath':_0x417605,'resolvedSettings':_0x5e7c6d,'isCdpMode':_0x532aca,'url':_0xbb9150,'baseUrlSource':_0x126296['baseUrlSource'],'authEnvKey':_0x50796a,'startPath':_0x126296[_0x3cf38f(0x1af)]};}function _0x5766(_0x3fafb4,_0xe308bc){_0x3fafb4=_0x3fafb4-0x1a4;const _0xc6014a=_0xc601();let _0x576680=_0xc6014a[_0x3fafb4];return _0x576680;}function expandString(_0x4186a8){const _0x8d1560=_0x5766,_0x5af598={'NlhnS':function(_0x4fa6de,_0x5cbca4){return _0x4fa6de(_0x5cbca4);}};if(typeof _0x4186a8!==_0x8d1560(0x1a6))return _0x4186a8;return _0x5af598['NlhnS'](resolveEnvVars,_0x4186a8);}function expandOverrides(_0x5e3f01){const _0x3c891e=_0x5766,_0x5c9b36={'IuGYP':function(_0x36d353,_0x5a4012){return _0x36d353(_0x5a4012);},'vayfc':_0x3c891e(0x1a6)};if(!_0x5e3f01)return _0x5e3f01;const _0x2961d4={..._0x5e3f01};return typeof _0x2961d4[_0x3c891e(0x1dc)]==='string'&&(_0x2961d4[_0x3c891e(0x1dc)]=_0x5c9b36['IuGYP'](resolveEnvVars,_0x2961d4[_0x3c891e(0x1dc)])),typeof _0x2961d4['startPath']===_0x5c9b36[_0x3c891e(0x1e0)]&&(_0x2961d4['startPath']=resolveEnvVars(_0x2961d4['startPath'])),_0x2961d4;}
|
|
1
|
+
function _0x2899(_0x312ee3,_0x1e2dd3){_0x312ee3=_0x312ee3-0x176;const _0x3116b5=_0x3116();let _0x2899f8=_0x3116b5[_0x312ee3];return _0x2899f8;}(function(_0x5f3aab,_0x25ef69){const _0x3686a6=_0x2899,_0x5b22d2=_0x5f3aab();while(!![]){try{const _0x29bce9=-parseInt(_0x3686a6(0x19a))/0x1+-parseInt(_0x3686a6(0x190))/0x2+parseInt(_0x3686a6(0x17e))/0x3*(parseInt(_0x3686a6(0x187))/0x4)+-parseInt(_0x3686a6(0x179))/0x5+parseInt(_0x3686a6(0x1af))/0x6+-parseInt(_0x3686a6(0x1ab))/0x7*(-parseInt(_0x3686a6(0x19e))/0x8)+parseInt(_0x3686a6(0x181))/0x9;if(_0x29bce9===_0x25ef69)break;else _0x5b22d2['push'](_0x5b22d2['shift']());}catch(_0x39e399){_0x5b22d2['push'](_0x5b22d2['shift']());}}}(_0x3116,0x97516));import{existsSync}from'fs';import _0x3e62cb 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(_0x17ddec){const _0x28a274=_0x2899,_0x471ed4={'nYoQb':function(_0x422204,_0x2e6f3b){return _0x422204(_0x2e6f3b);},'oJbxk':function(_0x35426d,_0x1ff75d){return _0x35426d!==_0x1ff75d;},'GHAPn':function(_0x48ef24){return _0x48ef24();},'NqeAg':function(_0x3674b2,_0x12744a){return _0x3674b2===_0x12744a;},'bZobn':function(_0x51c339,_0x5cb8a0){return _0x51c339+_0x5cb8a0;},'whQBl':function(_0x231bbe,_0x37c067){return _0x231bbe+_0x37c067;},'NFlYl':function(_0x49d340,_0x36a093){return _0x49d340+_0x36a093;},'ltoyF':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','wEORJ':_0x28a274(0x18e),'iCWfP':_0x28a274(0x176),'ICGEZ':function(_0x1e0512,_0x48813e){return _0x1e0512 instanceof _0x48813e;},'cTnrG':_0x28a274(0x177),'alRTh':function(_0x1909bd){return _0x1909bd();},'NlbqP':_0x28a274(0x17f),'SsFqv':'source','amGgg':'Cloud\x20profile\x20(recommended)','sLcxS':'cloud','xWwRy':'local','IQABX':function(_0xbff4f3,_0x55a24f){return _0xbff4f3===_0x55a24f;},'snUFH':function(_0x5802d0,_0x2cb353,_0x246ce){return _0x5802d0(_0x2cb353,_0x246ce);},'VMiDu':function(_0x1d3b34,_0x31904c){return _0x1d3b34(_0x31904c);},'HRHDz':function(_0x2236b4,_0x4ef048){return _0x2236b4(_0x4ef048);},'dNbug':function(_0x302e05,_0x36ffbc){return _0x302e05+_0x36ffbc;},'SkyHi':function(_0x32fbec,_0x2a7203){return _0x32fbec+_0x2a7203;},'XsWgh':_0x28a274(0x1a2),'zzNsg':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','RwhnM':function(_0x59760c,_0x39e1a5){return _0x59760c(_0x39e1a5);}},_0x22466f=_0x17ddec['profile'];let _0x37a984=_0x22466f,_0x2d8ea3=null;const _0x1dd825=_0x22466f?null:await readActiveProfileName();if(_0x17ddec[_0x28a274(0x18b)]&&_0x22466f)console['log'](_0x28a274(0x1ad)+_0x17ddec['authEnv']+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x22466f+_0x28a274(0x192));else _0x17ddec['authEnv']&&!process[_0x28a274(0x1b1)]['RANGER_TEST_USERNAME']&&console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x17ddec[_0x28a274(0x18b)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x22466f&&process[_0x28a274(0x1b1)]['RANGER_TEST_USERNAME'])try{const _0x359a7b=await _0x471ed4['nYoQb'](resolveAdHocProfile,{'targetUrl':_0x17ddec['baseUrl']??readUrlEnvVars()[_0x28a274(0x178)],'envKey':_0x17ddec[_0x28a274(0x18b)]});_0x359a7b&&(_0x1dd825&&_0x471ed4[_0x28a274(0x189)](_0x1dd825,_0x359a7b['name'])&&console[_0x28a274(0x17a)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x359a7b['name']+_0x28a274(0x17b)+_0x1dd825+'\x22.\x20Pass\x20--profile\x20'+_0x1dd825+'\x20to\x20override.'),_0x37a984=_0x359a7b[_0x28a274(0x182)],_0x2d8ea3=_0x359a7b[_0x28a274(0x193)]);}catch(_0x4b5afd){if(!_0x1dd825||_0x17ddec['authEnv'])throw _0x4b5afd;console['log']('\x20\x20Warning:\x20'+(_0x4b5afd instanceof Error?_0x4b5afd['message']:String(_0x4b5afd))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x1dd825+'\x22.');}if(!_0x37a984)_0x37a984=_0x1dd825??undefined;if(!_0x37a984)try{const _0xf6fcdf=await _0x471ed4['GHAPn'](listCloudProfiles);if(_0x471ed4['NqeAg'](_0xf6fcdf[_0x28a274(0x1ac)],0x1)){const _0x17dc45=_0xf6fcdf[0x0];_0x37a984=_0x17dc45[_0x28a274(0x182)],console['log'](_0x28a274(0x198)+_0x17dc45[_0x28a274(0x182)]),console['log'](_0x28a274(0x183));}}catch{}if(!_0x37a984)throw new Error(_0x471ed4['bZobn'](_0x471ed4[_0x28a274(0x19c)](_0x471ed4[_0x28a274(0x196)](_0x471ed4['NFlYl'](_0x28a274(0x197),_0x471ed4['ltoyF']),_0x471ed4['wEORJ']),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'),_0x471ed4[_0x28a274(0x1a5)]));const _0x2bdd83=getEnvDir(_0x37a984),_0x27b626=existsSync(_0x2bdd83);let _0x4d4dd3=_0x2d8ea3,_0x1fa8fc=![];if(!_0x4d4dd3)try{_0x4d4dd3=await fetchCloudProfile(_0x37a984);if(!_0x4d4dd3)_0x1fa8fc=!![];}catch(_0x3df2b1){_0x471ed4['ICGEZ'](_0x3df2b1,ApiError)&&_0x3df2b1[_0x28a274(0x17d)]===0x194&&(_0x1fa8fc=!![]);}if(_0x22466f&&_0x1fa8fc&&!_0x27b626&&!_0x4d4dd3)throw new Error(_0x28a274(0x1ae)+_0x22466f+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x471ed4[_0x28a274(0x1a9)]+_0x28a274(0x194));if(_0x4d4dd3&&_0x27b626){let _0x357cb6=!![];if(_0x471ed4['alRTh'](isInteractive)){const {source:_0x15e822}=await _0x3e62cb['prompt']([{'type':_0x471ed4['NlbqP'],'name':_0x471ed4['SsFqv'],'message':'Profile\x20\x22'+_0x37a984+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x471ed4[_0x28a274(0x1a6)],'value':_0x471ed4[_0x28a274(0x1a3)]},{'name':'Local\x20profile','value':_0x471ed4[_0x28a274(0x1a0)]}],'default':'cloud'}]);_0x357cb6=_0x471ed4['IQABX'](_0x15e822,'cloud');}if(!_0x357cb6)_0x4d4dd3=null;}const _0x5c0112=readProfileOverrides(process['cwd'](),_0x37a984);let _0x5ad791=null,_0x182f93,_0x437f53,_0x362b26,_0x2811db,_0xb0e0c=null,_0x59c32a,_0x2ceca9;const _0x38f2a9=_0x471ed4[_0x28a274(0x19d)](expandOverrides,_0x5c0112),_0x476ada=readUrlEnvVars();if(_0x4d4dd3){_0x5ad791=_0x4d4dd3;const _0x1584be=_0x4d4dd3[_0x28a274(0x1b0)]??{},_0x2c1199=_0x471ed4[_0x28a274(0x18c)](mergeCloudProfileSettings,_0x1584be,_0x5c0112??undefined),_0x4b6bcc={..._0x4d4dd3,'settings':_0x2c1199};_0xb0e0c={'baseUrl':_0x471ed4['nYoQb'](expandString,_0x1584be['baseUrl']),'startPath':expandString(_0x1584be[_0x28a274(0x19f)])};const _0x16c6fd=await fetchAuthConfig(),_0x27f617=_0x16c6fd?_0x471ed4[_0x28a274(0x18c)](resolveAuthEnvironmentLocally,_0x16c6fd,_0x4d4dd3[_0x28a274(0x199)]):null;_0x59c32a=_0x27f617?.['domains']?.[0x0],_0x2ceca9=_0x27f617?.['key'];const _0x5eddd7=_0x471ed4[_0x28a274(0x19d)](resolveProfileUrl,{'flagBaseUrl':_0x17ddec['baseUrl'],'flagStartPath':_0x17ddec[_0x28a274(0x19f)],'envBaseUrl':_0x476ada['envBaseUrl'],'envStartPath':_0x476ada['envStartPath'],'projectOverrides':_0x38f2a9,'cloudSettings':_0xb0e0c,'authEnvironmentDomain':_0x59c32a}),_0x39a3df=process[_0x28a274(0x1b1)]['RANGER_SESSION_STATE_PATH'];if(_0x39a3df){if(!existsSync(_0x39a3df))throw new Error('RANGER_SESSION_STATE_PATH='+_0x39a3df+'\x20does\x20not\x20exist.');_0x182f93=_0x39a3df,_0x437f53=_0x471ed4[_0x28a274(0x180)](resolveEnvVars,_0x2c1199),_0x362b26=Boolean(_0x437f53[_0x28a274(0x17c)]);}else{const _0x4f5ebd=await _0x471ed4['snUFH'](resolveCloudProfileSession,_0x4b6bcc,{'effectiveBaseUrl':_0x5eddd7['baseUrl'],'telemetry':_0x17ddec[_0x28a274(0x1aa)],'assertedEnv':_0x17ddec['authEnv']});_0x182f93=_0x4f5ebd['authPath'],_0x437f53=resolveEnvVars(_0x4f5ebd['settings']),_0x362b26=_0x471ed4['HRHDz'](Boolean,_0x437f53[_0x28a274(0x17c)]),_0x59c32a=_0x4f5ebd[_0x28a274(0x18d)]?.['domains']?.[0x0],_0x2ceca9=_0x4f5ebd['resolvedEnv']?.[_0x28a274(0x1a8)];}}else{if(!_0x27b626){const _0x59ca8c=!_0x22466f;throw new Error(_0x59ca8c?_0x471ed4['dNbug'](_0x471ed4[_0x28a274(0x1b2)]('Active\x20profile\x20\x22'+_0x37a984+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a',_0x471ed4[_0x28a274(0x18a)]),_0x471ed4[_0x28a274(0x191)])+(_0x28a274(0x186)+_0x37a984+_0x28a274(0x18f)):_0x28a274(0x1ae)+_0x37a984+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x37a984);}const _0x1adf6b=await loadSettings(_0x37a984);_0x437f53=_0x471ed4[_0x28a274(0x195)](resolveEnvVars,_0x1adf6b),_0x362b26=_0x471ed4['RwhnM'](Boolean,_0x437f53['cdpEndpoint']),_0x2811db=_0x437f53[_0x28a274(0x1a7)];}const _0x2fd455=_0x471ed4[_0x28a274(0x195)](resolveProfileUrl,{'flagBaseUrl':_0x17ddec[_0x28a274(0x1a7)],'flagStartPath':_0x17ddec['startPath'],'envBaseUrl':_0x476ada[_0x28a274(0x178)],'envStartPath':_0x476ada['envStartPath'],'localSettingsBaseUrl':_0x2811db,'projectOverrides':_0x38f2a9,'cloudSettings':_0xb0e0c,'authEnvironmentDomain':_0x59c32a}),_0x2c6824=_0x2fd455[_0x28a274(0x1a1)]??_0x2fd455[_0x28a274(0x1a7)];if(!_0x2c6824&&!_0x362b26)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x37a984+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x37a984+_0x28a274(0x19b));return{'activeProfile':_0x37a984,'resolvedCloudProfile':_0x5ad791,'cloudAuthPath':_0x182f93,'resolvedSettings':_0x437f53,'isCdpMode':_0x362b26,'url':_0x2c6824,'baseUrlSource':_0x2fd455['baseUrlSource'],'authEnvKey':_0x2ceca9,'startPath':_0x2fd455['startPath']};}function expandString(_0x1d2f1a){if(typeof _0x1d2f1a!=='string')return _0x1d2f1a;return resolveEnvVars(_0x1d2f1a);}function expandOverrides(_0x40788f){const _0x5e5125=_0x2899,_0x4f9927={'enqTk':_0x5e5125(0x184),'zEGJF':function(_0x4b8796,_0x4b44b1){return _0x4b8796(_0x4b44b1);},'rkERv':function(_0x500c4c,_0x39356a){return _0x500c4c===_0x39356a;}};if(!_0x40788f)return _0x40788f;const _0x30fc08={..._0x40788f};return typeof _0x30fc08[_0x5e5125(0x1a7)]===_0x4f9927[_0x5e5125(0x188)]&&(_0x30fc08[_0x5e5125(0x1a7)]=_0x4f9927['zEGJF'](resolveEnvVars,_0x30fc08[_0x5e5125(0x1a7)])),_0x4f9927[_0x5e5125(0x1a4)](typeof _0x30fc08['startPath'],_0x5e5125(0x184))&&(_0x30fc08['startPath']=_0x4f9927[_0x5e5125(0x185)](resolveEnvVars,_0x30fc08['startPath'])),_0x30fc08;}function _0x3116(){const _0x489ae0=['iCWfP','amGgg','baseUrl','key','cTnrG','telemetry','7DOtzQJ','length','\x20\x20Note:\x20--env\x20\x22','Profile\x20\x22','7259094dJuiXk','settings','env','SkyHi','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','envBaseUrl','3690475ZLsBXS','log','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','cdpEndpoint','status','3501AYlhbP','list','VMiDu','330921nvDNiw','name','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','string','zEGJF','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','3808gqVmAw','enqTk','oJbxk','XsWgh','authEnv','snUFH','resolvedEnv','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','`\x20to\x20recreate\x20it.','559004VmzFap','zzNsg','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','profile','`ranger\x20profile\x20add`\x20to\x20create\x20one.','RwhnM','whQBl','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','environmentKey','1030946edhQju','\x20baseUrl\x20<url>','bZobn','nYoQb','2485912OFhYKW','startPath','xWwRy','url','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','sLcxS','rkERv'];_0x3116=function(){return _0x489ae0;};return _0x3116();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x39f8d3,_0x4b6d60){const _0x22347e=_0x3c21,_0xb7f3f2=_0x39f8d3();while(!![]){try{const _0x36359f=parseInt(_0x22347e(0xef))/0x1*(-parseInt(_0x22347e(0xdf))/0x2)+parseInt(_0x22347e(0xe7))/0x3+parseInt(_0x22347e(0xe0))/0x4*(parseInt(_0x22347e(0xf1))/0x5)+parseInt(_0x22347e(0xdd))/0x6+-parseInt(_0x22347e(0xd8))/0x7+parseInt(_0x22347e(0xda))/0x8+parseInt(_0x22347e(0xe4))/0x9*(-parseInt(_0x22347e(0xed))/0xa);if(_0x36359f===_0x4b6d60)break;else _0xb7f3f2['push'](_0xb7f3f2['shift']());}catch(_0x4e1368){_0xb7f3f2['push'](_0xb7f3f2['shift']());}}}(_0x525f,0x4c6a4));function firstDefined(..._0x1bb62a){const _0x3448eb=_0x3c21,_0x3efd7c={'vFieC':function(_0x315736,_0x2e9791){return _0x315736!==_0x2e9791;}};for(const _0xb690c7 of _0x1bb62a){if(_0xb690c7!==undefined&&_0x3efd7c[_0x3448eb(0xec)](_0xb690c7,null)&&_0x3efd7c['vFieC'](_0xb690c7,''))return _0xb690c7;}return undefined;}function normalizeAuthEnvironmentDomain(_0xb55a1b){const _0x2c7bba=_0x3c21;if(!_0xb55a1b)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0xb55a1b))return _0xb55a1b;return _0x2c7bba(0xd9)+_0xb55a1b;}export function resolveBaseUrlWithSource(_0x12c6aa){const _0x9cea57=_0x3c21,_0x4d5756={'hrJwn':function(_0x2c5a8d,_0x488bb5){return _0x2c5a8d===_0x488bb5;},'lJoDV':_0x9cea57(0xeb),'iVRpI':'RANGER_BASE_URL','XmiXQ':'local\x20profile\x20settings','DziMq':'projects.json\x20override','ooaPp':_0x9cea57(0xf0),'crOlZ':function(_0x5d5765,_0x39ea36){return _0x5d5765(_0x39ea36);},'RZJxl':function(_0x6e14d6,_0xafa6f9){return _0x6e14d6!==_0xafa6f9;},'QjMsJ':function(_0x2b552c,_0x21e392){return _0x2b552c!==_0x21e392;}},_0xaad9a=_0x12c6aa[_0x9cea57(0xf3)],_0x54d3b1=!!_0xaad9a&&'baseUrl'in _0xaad9a,_0x1e966f=_0xaad9a?.['baseUrl'],_0x56ea05=!(_0x54d3b1&&_0x4d5756[_0x9cea57(0xe2)](_0x1e966f,null)),_0x462231=[[_0x12c6aa['flagBaseUrl'],_0x4d5756[_0x9cea57(0xde)]],[_0x12c6aa[_0x9cea57(0xe5)],_0x4d5756[_0x9cea57(0xf2)]],[_0x12c6aa['localSettingsBaseUrl'],_0x4d5756['XmiXQ']],[typeof _0x1e966f===_0x9cea57(0xe3)?_0x1e966f:undefined,_0x4d5756['DziMq']],[_0x56ea05?_0x12c6aa[_0x9cea57(0xee)]?.[_0x9cea57(0xdb)]:undefined,_0x4d5756['ooaPp']],[_0x56ea05?_0x4d5756[_0x9cea57(0xe6)](normalizeAuthEnvironmentDomain,_0x12c6aa['authEnvironmentDomain']):undefined,'auth\x20environment\x20domain']];for(const [_0x3b7112,_0x12d958]of _0x462231){if(_0x4d5756['RZJxl'](_0x3b7112,undefined)&&_0x3b7112!==null&&_0x4d5756['QjMsJ'](_0x3b7112,''))return{'baseUrl':_0x3b7112,'source':_0x12d958};}return{};}export function resolveBaseUrl(_0x2a5c14){return resolveBaseUrlWithSource(_0x2a5c14)['baseUrl'];}export function resolveStartPath(_0x2c046b){const _0x154780=_0x3c21,_0x25e73a={'nXSDK':function(_0x3fc5e9,_0xdd9727){return _0x3fc5e9 in _0xdd9727;},'FZttb':function(_0x2ba3db,_0x5490d6){return _0x2ba3db===_0x5490d6;},'gaaFW':function(_0x4423ac,_0x2951da,_0x290110,_0x194fd4,_0xdb75ee){return _0x4423ac(_0x2951da,_0x290110,_0x194fd4,_0xdb75ee);},'RRDDr':function(_0x242327,_0x41285a){return _0x242327===_0x41285a;}},_0x4c4859=_0x2c046b[_0x154780(0xf3)],_0x470a0d=!!_0x4c4859&&_0x25e73a['nXSDK']('startPath',_0x4c4859),_0x327ee5=_0x4c4859?.[_0x154780(0xe9)],_0x5d1854=!(_0x470a0d&&_0x25e73a['FZttb'](_0x327ee5,null));return _0x25e73a['gaaFW'](firstDefined,_0x2c046b['flagStartPath'],_0x2c046b['envStartPath'],_0x25e73a[_0x154780(0xe1)](typeof _0x327ee5,'string')?_0x327ee5:undefined,_0x5d1854?_0x2c046b[_0x154780(0xee)]?.['startPath']:undefined);}function _0x525f(){const _0x1772d1=['lJoDV','24218dDwCzG','216pnQwmb','RRDDr','hrJwn','string','7582473LpwPMl','envBaseUrl','crOlZ','771657zvXkPn','startsWith','startPath','endsWith','--base-url','vFieC','10VPEUVy','cloudSettings','9ccvdZb','cloud\x20profile\x20settings','47765dPRDrY','iVRpI','projectOverrides','3484908tnOmGB','https://','4096096pvMRyw','baseUrl','RANGER_BASE_URL','2863350BmYAow'];_0x525f=function(){return _0x1772d1;};return _0x525f();}function _0x3c21(_0x4b37a2,_0x5cf7f0){_0x4b37a2=_0x4b37a2-0xd8;const _0x525fa6=_0x525f();let _0x3c2144=_0x525fa6[_0x4b37a2];return _0x3c2144;}export function joinBaseAndPath(_0xdffef0,_0x266587){const _0x48d26f=_0x3c21;if(!_0xdffef0)return undefined;if(!_0x266587)return _0xdffef0;const _0x1c61cc=_0xdffef0[_0x48d26f(0xea)]('/')?_0xdffef0['slice'](0x0,-0x1):_0xdffef0,_0x206489=_0x266587[_0x48d26f(0xe8)]('/')?_0x266587:'/'+_0x266587;return _0x1c61cc+_0x206489;}export function resolveProfileUrl(_0x5eb6ef){const {baseUrl:_0x262574,source:_0xde33c7}=resolveBaseUrlWithSource(_0x5eb6ef),_0x33826=resolveStartPath(_0x5eb6ef);return{'baseUrl':_0x262574,'baseUrlSource':_0xde33c7,'startPath':_0x33826,'url':joinBaseAndPath(_0x262574,_0x33826)};}export function readUrlEnvVars(_0xa02716=process['env']){const _0x49a756=_0x3c21;return{'envBaseUrl':_0xa02716[_0x49a756(0xdc)],'envStartPath':_0xa02716['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4b77(_0x307042,_0x4c8f80){_0x307042=_0x307042-0x120;const _0xb2e8f8=_0xb2e8();let _0x4b77d3=_0xb2e8f8[_0x307042];return _0x4b77d3;}(function(_0x2c2f5d,_0x2494e6){const _0x3dd941=_0x4b77,_0x2a7bab=_0x2c2f5d();while(!![]){try{const _0x2cdd6b=parseInt(_0x3dd941(0x123))/0x1*(parseInt(_0x3dd941(0x12b))/0x2)+-parseInt(_0x3dd941(0x128))/0x3+-parseInt(_0x3dd941(0x129))/0x4+parseInt(_0x3dd941(0x124))/0x5+parseInt(_0x3dd941(0x127))/0x6+parseInt(_0x3dd941(0x12a))/0x7+-parseInt(_0x3dd941(0x122))/0x8;if(_0x2cdd6b===_0x2494e6)break;else _0x2a7bab['push'](_0x2a7bab['shift']());}catch(_0x5daa6d){_0x2a7bab['push'](_0x2a7bab['shift']());}}}(_0xb2e8,0xa4617));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x423683,_0x24ffd7){const _0x2cc374=_0x4b77,_0x55a3d9={'WjGrN':function(_0x4947c8,_0x5c32f8){return _0x4947c8<=_0x5c32f8;},'DTvFf':function(_0x5578e4,_0x276d89){return _0x5578e4 instanceof _0x276d89;},'UzRYC':function(_0x3a2718,_0x5e8670){return _0x3a2718<_0x5e8670;},'kRndb':function(_0x74befc,_0x349f3a){return _0x74befc*_0x349f3a;}},_0x7ceb47=_0x24ffd7?.[_0x2cc374(0x126)]??DEFAULT_MAX_RETRIES,_0x4b65a4=_0x24ffd7?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x193b84;for(let _0x4d5ec2=0x0;_0x55a3d9['WjGrN'](_0x4d5ec2,_0x7ceb47);_0x4d5ec2++){try{return await _0x423683();}catch(_0x3fdd9a){_0x193b84=_0x55a3d9['DTvFf'](_0x3fdd9a,Error)?_0x3fdd9a:new Error(String(_0x3fdd9a));if(_0x55a3d9['UzRYC'](_0x4d5ec2,_0x7ceb47)){const _0x4f1b97=_0x55a3d9[_0x2cc374(0x12c)](_0x4b65a4,Math[_0x2cc374(0x125)](0x2,_0x4d5ec2));_0x24ffd7?.[_0x2cc374(0x120)]&&console[_0x2cc374(0x12d)](_0x24ffd7['label']+'\x20failed\x20(attempt\x20'+(_0x4d5ec2+0x1)+'/'+(_0x7ceb47+0x1)+'),\x20retrying\x20in\x20'+_0x4f1b97+_0x2cc374(0x121)),await new Promise(_0x209d58=>setTimeout(_0x209d58,_0x4f1b97));}}}throw _0x193b84;}function _0xb2e8(){const _0x1076df=['2519348bHbOIT','kRndb','error','label','ms...','18568088qCVedj','1OJqUnm','5707120wgiepB','pow','maxRetries','4580232vSQuDg','62772hVQhGr','1641692iAdUun','1828337sCQDXX'];_0xb2e8=function(){return _0x1076df;};return _0xb2e8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4772(_0xec9108,_0x2b5739){_0xec9108=_0xec9108-0x1a5;const _0x16e877=_0x16e8();let _0x47724a=_0x16e877[_0xec9108];return _0x47724a;}(function(_0x5c88b4,_0x30e78a){const _0x5e4c13=_0x4772,_0x411e45=_0x5c88b4();while(!![]){try{const _0x3093fc=parseInt(_0x5e4c13(0x1ad))/0x1+parseInt(_0x5e4c13(0x1a5))/0x2*(-parseInt(_0x5e4c13(0x1a9))/0x3)+parseInt(_0x5e4c13(0x1aa))/0x4*(parseInt(_0x5e4c13(0x1b1))/0x5)+parseInt(_0x5e4c13(0x1a7))/0x6*(parseInt(_0x5e4c13(0x1ab))/0x7)+-parseInt(_0x5e4c13(0x1a8))/0x8+parseInt(_0x5e4c13(0x1b3))/0x9*(parseInt(_0x5e4c13(0x1ae))/0xa)+-parseInt(_0x5e4c13(0x1b0))/0xb*(parseInt(_0x5e4c13(0x1a6))/0xc);if(_0x3093fc===_0x30e78a)break;else _0x411e45['push'](_0x411e45['shift']());}catch(_0x169534){_0x411e45['push'](_0x411e45['shift']());}}}(_0x16e8,0xa9d16));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x1f5372){const _0x584854=_0x4772,_0x779317=new Set();for(const _0x17fd54 of _0x1f5372[_0x584854(0x1b2)](ABSOLUTE_URL_PATTERN)){const _0xb990a2=_0x17fd54[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x779317[_0x584854(0x1af)](new URL(_0xb990a2)[_0x584854(0x1ac)]);}catch{}}return[..._0x779317];}function _0x16e8(){const _0x3a4602=['3100MOmvjy','add','24783fysrWN','395UnmwUP','matchAll','33093wJmBXu','64sXAcpm','2268dFOIen','12zfIPRL','8145048FOnfNw','52341hRTnHf','5716gJhRKV','2115127vEbNxZ','origin','840743RcTfxt'];_0x16e8=function(){return _0x3a4602;};return _0x16e8();}export function findScenarioOriginMismatches(_0x34695a,_0x1aa794){const _0x5942be=_0x4772;let _0x485bad;try{_0x485bad=new URL(_0x1aa794)[_0x5942be(0x1ac)];}catch{return[];}return extractUrlOrigins(_0x34695a)['filter'](_0xc9f3ca=>_0xc9f3ca!==_0x485bad);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x11df5c=_0x5bbf;(function(_0xc80909,_0xf7eed4){const _0x589dfe=_0x5bbf,_0x3214aa=_0xc80909();while(!![]){try{const _0xafde39=-parseInt(_0x589dfe(0x18d))/0x1+-parseInt(_0x589dfe(0x1a6))/0x2*(parseInt(_0x589dfe(0x194))/0x3)+-parseInt(_0x589dfe(0x19e))/0x4*(parseInt(_0x589dfe(0x17a))/0x5)+parseInt(_0x589dfe(0x1aa))/0x6+-parseInt(_0x589dfe(0x19d))/0x7+-parseInt(_0x589dfe(0x181))/0x8+parseInt(_0x589dfe(0x1a0))/0x9;if(_0xafde39===_0xf7eed4)break;else _0x3214aa['push'](_0x3214aa['shift']());}catch(_0x301aa7){_0x3214aa['push'](_0x3214aa['shift']());}}}(_0x53c1,0x988c9));import*as _0x5f232d from'fs';import*as _0x4f9fe8 from'path';import*as _0x402764 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4f9fe8['join'](_0x402764[_0x11df5c(0x17f)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x1f3f9c=_0x11df5c,_0x36c527={'DaYhB':'utf-8'};try{if(_0x5f232d[_0x1f3f9c(0x187)](CACHE_FILE)){const _0x3e58a9=JSON[_0x1f3f9c(0x1a9)](_0x5f232d[_0x1f3f9c(0x17b)](CACHE_FILE,_0x36c527[_0x1f3f9c(0x190)]));return{'version':0x3,'sessions':_0x3e58a9['sessions']||{},'branches':_0x3e58a9['branches']||{},'lastEnabledSessionClearedAt':_0x3e58a9['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x5e3b1c){const _0x42a5bd=_0x11df5c;try{const _0x364b64=_0x4f9fe8['dirname'](CACHE_FILE);!_0x5f232d['existsSync'](_0x364b64)&&_0x5f232d['mkdirSync'](_0x364b64,{'recursive':!![]}),_0x5f232d[_0x42a5bd(0x198)](CACHE_FILE,JSON[_0x42a5bd(0x1a4)](_0x5e3b1c,null,0x2));}catch{}}function _0x5bbf(_0x11268e,_0x29a823){_0x11268e=_0x11268e-0x176;const _0x53c19e=_0x53c1();let _0x5bbfaa=_0x53c19e[_0x11268e];return _0x5bbfaa;}export function getCurrentBranch(){const _0x31e7ca=_0x11df5c,_0xf0c654={'IVkTX':function(_0x3a821b,_0x3fd08f,_0x390455){return _0x3a821b(_0x3fd08f,_0x390455);},'LEwty':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','vVnwJ':_0x31e7ca(0x186),'tnNSs':function(_0x53f625,_0x25f6dd){return _0x53f625===_0x25f6dd;}};try{const _0x3e389a=_0xf0c654['IVkTX'](execSync,_0xf0c654['LEwty'],{'encoding':'utf-8','stdio':['pipe',_0xf0c654[_0x31e7ca(0x19c)],_0xf0c654[_0x31e7ca(0x19c)]]})['trim']();if(!_0x3e389a||_0xf0c654[_0x31e7ca(0x17d)](_0x3e389a,_0x31e7ca(0x19f)))return null;return _0x3e389a;}catch{return null;}}export function enableBranch(_0x3d7ba2){const _0x27126e=_0x11df5c,_0x5eb6b1={'zwLQw':function(_0x8de795){return _0x8de795();},'MBTRf':function(_0x36e0c9,_0x28d717){return _0x36e0c9(_0x28d717);}},_0x13fb8b=_0x5eb6b1[_0x27126e(0x185)](loadCache);_0x13fb8b['branches'][_0x3d7ba2]=!![],_0x5eb6b1[_0x27126e(0x18b)](saveCache,_0x13fb8b);}export function disableBranch(_0x18a365){const _0x561cdc=_0x11df5c,_0x3dc111={'XKcWz':function(_0x29bc48){return _0x29bc48();},'cTAEP':function(_0x4d834c,_0x13c2ef){return _0x4d834c(_0x13c2ef);}},_0x326351=_0x3dc111['XKcWz'](loadCache);delete _0x326351[_0x561cdc(0x1a5)][_0x18a365],_0x3dc111[_0x561cdc(0x18c)](saveCache,_0x326351);}export function isBranchEnabled(_0x9c2109){const _0x57feaa=_0x11df5c,_0x45de5d={'vRCQG':function(_0x2e058b,_0x5b95e0){return _0x2e058b===_0x5b95e0;}},_0x4b9efb=loadCache();return _0x45de5d[_0x57feaa(0x184)](_0x4b9efb[_0x57feaa(0x1a5)][_0x9c2109],!![]);}function getOrCreateSession(_0x8c913a,_0x450b70){const _0x20c9b6=_0x11df5c;return!_0x8c913a[_0x20c9b6(0x1a1)][_0x450b70]&&(_0x8c913a['sessions'][_0x450b70]={}),_0x8c913a['sessions'][_0x450b70];}export function enableSession(_0xa8fc96){const _0x358752=_0x11df5c,_0x3205ad={'rQSsN':function(_0x318d22,_0x123a8f,_0x1f9174){return _0x318d22(_0x123a8f,_0x1f9174);},'WCjCY':function(_0x48e14d,_0x199a32){return _0x48e14d!==_0x199a32;},'YVTum':'master'},_0x553cc7=loadCache(),_0x3af0b0=_0x3205ad[_0x358752(0x1a2)](getOrCreateSession,_0x553cc7,_0xa8fc96);_0x3af0b0['enabled']=!![];const _0x1d8d88=getCurrentBranch();_0x1d8d88&&_0x3205ad['WCjCY'](_0x1d8d88,'main')&&_0x1d8d88!==_0x3205ad['YVTum']&&(_0x553cc7['branches'][_0x1d8d88]=!![],_0x3af0b0[_0x358752(0x177)]=_0x1d8d88),saveCache(_0x553cc7);}export function isSessionEnabled(_0x380359){const _0x32d24f=_0x11df5c,_0x1704c6={'ZugKO':function(_0x593470){return _0x593470();},'NUoKY':function(_0x5cf8f6,_0x2b99c8){return _0x5cf8f6===_0x2b99c8;},'eGmfb':_0x32d24f(0x199),'lwLGE':_0x32d24f(0x192),'vxLhm':function(_0x3f6035,_0x3bdb65){return _0x3f6035===_0x3bdb65;}},_0x297257=loadCache(),_0x4df420=_0x1704c6[_0x32d24f(0x197)](getCurrentBranch);if(!_0x4df420||_0x1704c6[_0x32d24f(0x1ac)](_0x4df420,_0x1704c6[_0x32d24f(0x182)])||_0x4df420===_0x1704c6[_0x32d24f(0x17c)])return _0x297257[_0x32d24f(0x1a1)][_0x380359]?.['enabled']===!![];const _0x32eb68=_0x1704c6['NUoKY'](_0x297257['branches'][_0x4df420],!![]),_0xaa2ed6=_0x1704c6[_0x32d24f(0x18f)](_0x297257['sessions'][_0x380359]?.['enabled'],!![]);return _0x32eb68||_0xaa2ed6;}export function disableSession(_0x399191){const _0xb8df96=_0x11df5c,_0x443141={'pGMVR':function(_0x3e6297,_0x151bd8,_0x378b3a){return _0x3e6297(_0x151bd8,_0x378b3a);},'JwWis':function(_0x49fe9c,_0x11ddf0){return _0x49fe9c(_0x11ddf0);}},_0x4158c8=loadCache(),_0x3502a9=_0x443141['pGMVR'](getOrCreateSession,_0x4158c8,_0x399191);_0x3502a9[_0xb8df96(0x176)]=![],_0x443141['JwWis'](saveCache,_0x4158c8);}export function updateBranchTracking(_0x53058a){const _0xdf8104=_0x11df5c,_0x13d68d={'ohBSm':function(_0x72cca7){return _0x72cca7();},'GBYRw':function(_0xd3168,_0xdece63){return _0xd3168===_0xdece63;},'xNtVy':function(_0x17c8cd,_0x4a251f){return _0x17c8cd===_0x4a251f;},'AvYUN':function(_0x4df141,_0xb86417){return _0x4df141!==_0xb86417;},'poajh':function(_0x51d370,_0x4634f0){return _0x51d370(_0x4634f0);}},_0x43d98b=_0x13d68d['ohBSm'](loadCache),_0x28b9d5=_0x43d98b['sessions'][_0x53058a];if(!_0x28b9d5?.[_0xdf8104(0x176)])return;const _0xd6e452=getCurrentBranch();if(!_0xd6e452||_0x13d68d['GBYRw'](_0xd6e452,_0xdf8104(0x199))||_0x13d68d['xNtVy'](_0xd6e452,'master'))return;_0x13d68d['AvYUN'](_0x28b9d5['currentBranch'],_0xd6e452)&&(_0x43d98b[_0xdf8104(0x1a5)][_0xd6e452]=!![],_0x28b9d5['currentBranch']=_0xd6e452,_0x13d68d[_0xdf8104(0x1ad)](saveCache,_0x43d98b));}export function initBranchTracking(_0x2bc12d){const _0x2cee20=_0x11df5c,_0x2b26a1={'EbPog':function(_0x3008a0){return _0x3008a0();},'UPmuW':_0x2cee20(0x199),'ToZSR':'master','NeOwu':function(_0x1f7e5a,_0x2c5188){return _0x1f7e5a===_0x2c5188;},'OAEvq':function(_0x11bd15,_0x42af3f){return _0x11bd15(_0x42af3f);}},_0x446e42=_0x2b26a1['EbPog'](loadCache),_0x4fba56=_0x2b26a1[_0x2cee20(0x196)](getCurrentBranch);if(!_0x4fba56||_0x4fba56===_0x2b26a1['UPmuW']||_0x4fba56===_0x2b26a1[_0x2cee20(0x19a)])return;if(_0x2b26a1[_0x2cee20(0x17e)](_0x446e42['branches'][_0x4fba56],!![])){const _0x1dc831=getOrCreateSession(_0x446e42,_0x2bc12d);_0x1dc831['enabled']=!![],_0x1dc831[_0x2cee20(0x177)]=_0x4fba56,_0x2b26a1[_0x2cee20(0x1a7)](saveCache,_0x446e42);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x1d31f0){const _0x1d1ab0={'ctDJZ':function(_0x2d2ed7){return _0x2d2ed7();},'klWeE':function(_0x3fa282,_0x11f15a){return _0x3fa282(_0x11f15a);}},_0x1fd2ab=_0x1d1ab0['ctDJZ'](loadCache),_0x1fe2d3=_0x1fd2ab['sessions'][_0x1d31f0];_0x1fe2d3?.['enabled']&&(_0x1fd2ab['lastEnabledSessionClearedAt']=Date['now'](),_0x1d1ab0['klWeE'](saveCache,_0x1fd2ab));}export function shouldAutoEnableAfterClear(_0x1b0482){const _0x43f207=_0x11df5c,_0x3f0c18={'jmpbQ':function(_0x4bb38e,_0x16b250){return _0x4bb38e!==_0x16b250;},'SXTVX':_0x43f207(0x19b),'cPdxz':function(_0xd805a){return _0xd805a();},'LQToN':function(_0x5432c1,_0x3bc9e2){return _0x5432c1<=_0x3bc9e2;}};if(_0x3f0c18[_0x43f207(0x188)](_0x1b0482,_0x3f0c18['SXTVX']))return![];const _0x2d7b7f=_0x3f0c18['cPdxz'](loadCache),_0x41d6f5=_0x2d7b7f['lastEnabledSessionClearedAt'];if(!_0x41d6f5)return![];const _0x552450=Date[_0x43f207(0x180)]()-_0x41d6f5;return _0x3f0c18[_0x43f207(0x1a8)](_0x552450,CLEAR_AUTO_ENABLE_WINDOW_MS);}function _0x53c1(){const _0x40395e=['stringify','branches','596WeyPFr','OAEvq','LQToN','parse','5197920WhsSNx','featureId','NUoKY','poajh','lastStopReminderAt','enabled','currentBranch','GsVbx','bBKre','79010xmrzGf','readFileSync','lwLGE','tnNSs','NeOwu','homedir','now','6885880pqijmq','eGmfb','lastEnabledSessionClearedAt','vRCQG','zwLQw','pipe','existsSync','jmpbQ','registeredAt','kWkOt','MBTRf','cTAEP','855976WXIOEt','vBMPD','vxLhm','DaYhB','UapWn','master','prompted','11079oOuqKQ','FvhZo','EbPog','ZugKO','writeFileSync','main','ToZSR','clear','vVnwJ','8537711RYiNMc','4HEuqsq','HEAD','34300989vllnyl','sessions','rQSsN','lastPlanReminderAt'];_0x53c1=function(){return _0x40395e;};return _0x53c1();}export function autoEnableAfterClear(_0x291e48){const _0x326b47=_0x11df5c,_0x290307={'FvhZo':function(_0x51a695){return _0x51a695();},'GmSTd':function(_0x1306e0,_0x2a5436){return _0x1306e0(_0x2a5436);}},_0x140c9b=_0x290307[_0x326b47(0x195)](loadCache),_0x40867a=getOrCreateSession(_0x140c9b,_0x291e48);_0x40867a['enabled']=!![];const _0x252ea1=getCurrentBranch();_0x252ea1&&_0x252ea1!==_0x326b47(0x199)&&_0x252ea1!=='master'&&(_0x40867a['currentBranch']=_0x252ea1),delete _0x140c9b[_0x326b47(0x183)],_0x290307['GmSTd'](saveCache,_0x140c9b);}export function registerSession(_0x29f712,_0x13a978){const _0x8ca1d6=_0x11df5c,_0x264ff0={'bBKre':function(_0x432a7f){return _0x432a7f();},'vBMPD':function(_0x27e1a5,_0x129053){return _0x27e1a5(_0x129053);}},_0x298d8=_0x264ff0[_0x8ca1d6(0x179)](loadCache),_0xc1c5b3=getOrCreateSession(_0x298d8,_0x29f712);_0xc1c5b3['featureId']=_0x13a978,_0xc1c5b3['registeredAt']=new Date()['toISOString'](),_0x264ff0[_0x8ca1d6(0x18e)](saveCache,_0x298d8);}export function getSessionEntry(_0x213d6c){const _0x4ac597=_0x11df5c,_0x45b880={'BlpgG':function(_0x108a87){return _0x108a87();}},_0x403de2=_0x45b880['BlpgG'](loadCache),_0x56c60d=_0x403de2['sessions'][_0x213d6c];if(_0x56c60d?.[_0x4ac597(0x1ab)]&&_0x56c60d?.[_0x4ac597(0x189)])return{'featureId':_0x56c60d['featureId'],'registeredAt':_0x56c60d[_0x4ac597(0x189)]};return null;}export function unregisterSession(_0x164688){const _0x5e66c9=_0x11df5c,_0x43ff07={'GsVbx':function(_0x2c4c1d,_0xfe62c2){return _0x2c4c1d(_0xfe62c2);}},_0x29ffef=loadCache(),_0x354abb=_0x29ffef['sessions'][_0x164688];_0x354abb&&(delete _0x354abb['featureId'],delete _0x354abb['registeredAt'],_0x43ff07[_0x5e66c9(0x178)](saveCache,_0x29ffef));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x446b37){const _0x173397=_0x11df5c,_0x28e71c={'QlJfN':function(_0x2a2871){return _0x2a2871();},'ZbfWK':function(_0x4794b8,_0x4289b7){return _0x4794b8(_0x4289b7);}},_0x1c0ada=_0x28e71c['QlJfN'](loadCache),_0x4d6fd4=getOrCreateSession(_0x1c0ada,_0x446b37),_0x2d90bf=_0x4d6fd4[_0x173397(0x1a3)]||0x0,_0x49fe00=Date['now']();if(_0x49fe00-_0x2d90bf>=PLAN_REMINDER_INTERVAL_MS)return _0x4d6fd4[_0x173397(0x1a3)]=_0x49fe00,_0x28e71c['ZbfWK'](saveCache,_0x1c0ada),!![];return![];}export function shouldShowStopReminder(_0x4c552e){const _0x196d79=_0x11df5c,_0x574223={'QLyTK':function(_0x1de0ee){return _0x1de0ee();},'PuKWo':function(_0x1cdc9c,_0x5eaa5d){return _0x1cdc9c-_0x5eaa5d;},'kWkOt':function(_0x46b304,_0x112780){return _0x46b304(_0x112780);}},_0x5e8540=_0x574223['QLyTK'](loadCache),_0x522fb6=getOrCreateSession(_0x5e8540,_0x4c552e),_0x367e6d=_0x522fb6[_0x196d79(0x1ae)]||0x0,_0x5120ce=Date['now']();if(_0x574223['PuKWo'](_0x5120ce,_0x367e6d)>=STOP_REMINDER_INTERVAL_MS)return _0x522fb6['lastStopReminderAt']=_0x5120ce,_0x574223[_0x196d79(0x18a)](saveCache,_0x5e8540),!![];return![];}export function hasSessionBeenPrompted(_0x424f46){const _0x542d36=_0x11df5c,_0x4f2c4e=loadCache();return _0x4f2c4e[_0x542d36(0x1a1)][_0x424f46]?.['prompted']===!![];}export function markSessionPrompted(_0x59f96b){const _0x4bb039=_0x11df5c,_0x2441b0={'UapWn':function(_0x203dd8,_0x1bea91,_0x5b53c8){return _0x203dd8(_0x1bea91,_0x5b53c8);}},_0x5f2850=loadCache(),_0x20136e=_0x2441b0[_0x4bb039(0x191)](getOrCreateSession,_0x5f2850,_0x59f96b);_0x20136e[_0x4bb039(0x193)]=!![],saveCache(_0x5f2850);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x11e65d=_0x395e;(function(_0x2d7493,_0xf86de9){const _0x4c34bd=_0x395e,_0x114ef8=_0x2d7493();while(!![]){try{const _0x4a3d68=-parseInt(_0x4c34bd(0x11c))/0x1+-parseInt(_0x4c34bd(0x12e))/0x2*(parseInt(_0x4c34bd(0x118))/0x3)+parseInt(_0x4c34bd(0x134))/0x4*(-parseInt(_0x4c34bd(0x127))/0x5)+parseInt(_0x4c34bd(0x123))/0x6*(-parseInt(_0x4c34bd(0x11a))/0x7)+parseInt(_0x4c34bd(0x11d))/0x8*(-parseInt(_0x4c34bd(0x110))/0x9)+-parseInt(_0x4c34bd(0x128))/0xa+parseInt(_0x4c34bd(0x117))/0xb;if(_0x4a3d68===_0xf86de9)break;else _0x114ef8['push'](_0x114ef8['shift']());}catch(_0x3ecb53){_0x114ef8['push'](_0x114ef8['shift']());}}}(_0x2e1c,0x56bcb));import*as _0x110111 from'fs';import*as _0x4b41a8 from'path';import*as _0x105108 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4b41a8['join'](_0x105108[_0x11e65d(0x135)](),_0x11e65d(0x10e),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x24fd0a=_0x11e65d,_0x255ae2={'dPVtL':'utf-8','Drquy':function(_0x311288){return _0x311288();}};try{if(_0x110111['existsSync'](CACHE_FILE)){const _0x25b7d1=JSON[_0x24fd0a(0x115)](_0x110111[_0x24fd0a(0x12f)](CACHE_FILE,_0x255ae2['dPVtL']));return{'version':0x3,'sessions':_0x25b7d1['sessions']||{},'branches':_0x25b7d1['branches']||{},'lastEnabledSessionClearedAt':_0x25b7d1[_0x24fd0a(0x131)]};}}catch{}return _0x255ae2['Drquy'](createEmptyCache);}function saveCache(_0x1271bb){const _0x1de0fa=_0x11e65d;try{const _0x16038b=_0x4b41a8['dirname'](CACHE_FILE);!_0x110111['existsSync'](_0x16038b)&&_0x110111[_0x1de0fa(0x10f)](_0x16038b,{'recursive':!![]}),_0x110111[_0x1de0fa(0x132)](CACHE_FILE,JSON['stringify'](_0x1271bb,null,0x2));}catch{}}export function getCurrentBranch(){const _0x3908b1=_0x11e65d,_0x393e3b={'UHxeN':_0x3908b1(0x137),'gEQeC':function(_0x61c4a0,_0x2b7fa7){return _0x61c4a0===_0x2b7fa7;},'WeaTK':'HEAD'};try{const _0xdbaef2=execSync('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x3908b1(0x119),'stdio':[_0x393e3b['UHxeN'],_0x393e3b['UHxeN'],'pipe']})[_0x3908b1(0x11b)]();if(!_0xdbaef2||_0x393e3b[_0x3908b1(0x12c)](_0xdbaef2,_0x393e3b['WeaTK']))return null;return _0xdbaef2;}catch{return null;}}export function enableBranch(_0x215f80){const _0x564688=_0x11e65d,_0x54a3b0={'FowNH':function(_0x19fbe5){return _0x19fbe5();},'thxFl':function(_0x23a3af,_0x35d356){return _0x23a3af(_0x35d356);}},_0x4b79a4=_0x54a3b0['FowNH'](loadCache);_0x4b79a4['branches'][_0x215f80]=!![],_0x54a3b0[_0x564688(0x133)](saveCache,_0x4b79a4);}export function disableBranch(_0x4d601e){const _0x3808e6=_0x11e65d,_0x5c620b={'OwEWm':function(_0x4a47d3,_0x5bc8ff){return _0x4a47d3(_0x5bc8ff);}},_0x390919=loadCache();delete _0x390919[_0x3808e6(0x12d)][_0x4d601e],_0x5c620b[_0x3808e6(0x122)](saveCache,_0x390919);}export function isBranchEnabled(_0x323e48){const _0x9e08fb=_0x11e65d,_0x52b395={'LGCtn':function(_0x194fd2,_0x29ea8b){return _0x194fd2===_0x29ea8b;}},_0x47e1ff=loadCache();return _0x52b395[_0x9e08fb(0x113)](_0x47e1ff[_0x9e08fb(0x12d)][_0x323e48],!![]);}function getOrCreateSession(_0x2bb235,_0x255929){const _0x471663=_0x11e65d;return!_0x2bb235[_0x471663(0x125)][_0x255929]&&(_0x2bb235['sessions'][_0x255929]={}),_0x2bb235[_0x471663(0x125)][_0x255929];}export function enableSession(_0x3f2155){const _0x30a179=_0x11e65d,_0x440476={'uGOBU':function(_0x58f741,_0x54622c,_0x5960ce){return _0x58f741(_0x54622c,_0x5960ce);},'ZGgyW':function(_0x5778c9,_0x48ae7c){return _0x5778c9!==_0x48ae7c;}},_0x54e007=loadCache(),_0x53cf12=_0x440476['uGOBU'](getOrCreateSession,_0x54e007,_0x3f2155);_0x53cf12['enabled']=!![];const _0x444b7c=getCurrentBranch();_0x444b7c&&_0x440476[_0x30a179(0x120)](_0x444b7c,'main')&&_0x440476['ZGgyW'](_0x444b7c,_0x30a179(0x10d))&&(_0x54e007['branches'][_0x444b7c]=!![],_0x53cf12[_0x30a179(0x10a)]=_0x444b7c),saveCache(_0x54e007);}export function isSessionEnabled(_0x2ca52b){const _0x16d9b9=_0x11e65d,_0x40a0f4={'sskWz':function(_0x454b1e){return _0x454b1e();},'rEVYN':function(_0x196980,_0x865900){return _0x196980===_0x865900;},'iouBj':function(_0x3b273f,_0x18d913){return _0x3b273f||_0x18d913;}},_0x251dea=loadCache(),_0x24349c=_0x40a0f4['sskWz'](getCurrentBranch);if(!_0x24349c||_0x40a0f4[_0x16d9b9(0x10c)](_0x24349c,'main')||_0x24349c==='master')return _0x251dea['sessions'][_0x2ca52b]?.[_0x16d9b9(0x116)]===!![];const _0x2c1172=_0x251dea[_0x16d9b9(0x12d)][_0x24349c]===!![],_0xffa7c1=_0x251dea[_0x16d9b9(0x125)][_0x2ca52b]?.['enabled']===!![];return _0x40a0f4[_0x16d9b9(0x124)](_0x2c1172,_0xffa7c1);}export function disableSession(_0xf9aff9){const _0x3bfaa4=_0x11e65d,_0x4c181a={'rpXVY':function(_0x3b1de2){return _0x3b1de2();}},_0x238376=_0x4c181a[_0x3bfaa4(0x126)](loadCache),_0x16e528=getOrCreateSession(_0x238376,_0xf9aff9);_0x16e528[_0x3bfaa4(0x116)]=![],saveCache(_0x238376);}export function updateBranchTracking(_0xad482){const _0xfebe08=_0x11e65d,_0x3d3922={'YuPsB':function(_0x5cbe3b){return _0x5cbe3b();},'JmTos':function(_0x585bf9,_0x1ddfdd){return _0x585bf9!==_0x1ddfdd;}},_0x377e23=_0x3d3922['YuPsB'](loadCache),_0x447b28=_0x377e23['sessions'][_0xad482];if(!_0x447b28?.[_0xfebe08(0x116)])return;const _0x15a2a4=getCurrentBranch();if(!_0x15a2a4||_0x15a2a4===_0xfebe08(0x111)||_0x15a2a4===_0xfebe08(0x10d))return;_0x3d3922[_0xfebe08(0x109)](_0x447b28[_0xfebe08(0x10a)],_0x15a2a4)&&(_0x377e23[_0xfebe08(0x12d)][_0x15a2a4]=!![],_0x447b28['currentBranch']=_0x15a2a4,saveCache(_0x377e23));}export function initBranchTracking(_0x14926d){const _0x2b7f9f=_0x11e65d,_0x20ec86={'uULfv':_0x2b7f9f(0x111),'XmQia':function(_0xb404a0,_0xc4e80e){return _0xb404a0===_0xc4e80e;},'riQiY':'master','sQQIz':function(_0x7fe0c0,_0x32c261){return _0x7fe0c0(_0x32c261);}},_0x1bb103=loadCache(),_0xdc9ad6=getCurrentBranch();if(!_0xdc9ad6||_0xdc9ad6===_0x20ec86[_0x2b7f9f(0x136)]||_0x20ec86[_0x2b7f9f(0x12a)](_0xdc9ad6,_0x20ec86['riQiY']))return;if(_0x1bb103['branches'][_0xdc9ad6]===!![]){const _0x5a8272=getOrCreateSession(_0x1bb103,_0x14926d);_0x5a8272['enabled']=!![],_0x5a8272['currentBranch']=_0xdc9ad6,_0x20ec86[_0x2b7f9f(0x130)](saveCache,_0x1bb103);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x2cb2fe){const _0x107cb2=_0x11e65d,_0x391e86=loadCache(),_0x5d9555=_0x391e86['sessions'][_0x2cb2fe];_0x5d9555?.[_0x107cb2(0x116)]&&(_0x391e86[_0x107cb2(0x131)]=Date[_0x107cb2(0x10b)](),saveCache(_0x391e86));}export function shouldAutoEnableAfterClear(_0x1e92c9){const _0x13b56=_0x11e65d,_0x134bb5={'eEUls':'clear','fRRBV':function(_0x4ec6b3){return _0x4ec6b3();},'YiZTj':function(_0x384d62,_0x51c17e){return _0x384d62<=_0x51c17e;}};if(_0x1e92c9!==_0x134bb5[_0x13b56(0x11e)])return![];const _0x599bf5=_0x134bb5['fRRBV'](loadCache),_0x353dc4=_0x599bf5['lastEnabledSessionClearedAt'];if(!_0x353dc4)return![];const _0x463b46=Date[_0x13b56(0x10b)]()-_0x353dc4;return _0x134bb5['YiZTj'](_0x463b46,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x59d8ec){const _0x4420c4=_0x11e65d,_0x9ada27={'CdCUK':function(_0x5daa2b){return _0x5daa2b();},'fdNKf':function(_0x355013,_0xe9f45b,_0x157f32){return _0x355013(_0xe9f45b,_0x157f32);},'dUjBO':function(_0x48ea96){return _0x48ea96();},'hWhnW':function(_0x49da8b,_0x351806){return _0x49da8b!==_0x351806;},'KMbYz':function(_0x56e332,_0x4619d5){return _0x56e332(_0x4619d5);}},_0x17f321=_0x9ada27['CdCUK'](loadCache),_0x48c05f=_0x9ada27['fdNKf'](getOrCreateSession,_0x17f321,_0x59d8ec);_0x48c05f[_0x4420c4(0x116)]=!![];const _0x54c0c1=_0x9ada27['dUjBO'](getCurrentBranch);_0x54c0c1&&_0x54c0c1!=='main'&&_0x9ada27['hWhnW'](_0x54c0c1,'master')&&(_0x48c05f[_0x4420c4(0x10a)]=_0x54c0c1),delete _0x17f321[_0x4420c4(0x131)],_0x9ada27['KMbYz'](saveCache,_0x17f321);}export function registerSession(_0x4d5061,_0x545029){const _0x381bec=_0x11e65d,_0x2a4a6c={'LtcwG':function(_0x3b83dd,_0x4ff6f3,_0x8ef33d){return _0x3b83dd(_0x4ff6f3,_0x8ef33d);},'XecfF':function(_0x1b2d84,_0x35f314){return _0x1b2d84(_0x35f314);}},_0x3516fc=loadCache(),_0x1e1332=_0x2a4a6c[_0x381bec(0x114)](getOrCreateSession,_0x3516fc,_0x4d5061);_0x1e1332[_0x381bec(0x129)]=_0x545029,_0x1e1332[_0x381bec(0x12b)]=new Date()['toISOString'](),_0x2a4a6c['XecfF'](saveCache,_0x3516fc);}export function getSessionEntry(_0xf4e34){const _0x1ddf09=_0x11e65d,_0x1d46a4={'qKitK':function(_0x49d633){return _0x49d633();}},_0x2c23bf=_0x1d46a4['qKitK'](loadCache),_0x32ae92=_0x2c23bf[_0x1ddf09(0x125)][_0xf4e34];if(_0x32ae92?.[_0x1ddf09(0x129)]&&_0x32ae92?.[_0x1ddf09(0x12b)])return{'featureId':_0x32ae92[_0x1ddf09(0x129)],'registeredAt':_0x32ae92[_0x1ddf09(0x12b)]};return null;}function _0x395e(_0x305d2b,_0x5722bb){_0x305d2b=_0x305d2b-0x109;const _0x2e1cfe=_0x2e1c();let _0x395e13=_0x2e1cfe[_0x305d2b];return _0x395e13;}export function unregisterSession(_0x2673bf){const _0x467c13=_0x11e65d,_0x44e683=loadCache(),_0x2021cd=_0x44e683['sessions'][_0x2673bf];_0x2021cd&&(delete _0x2021cd[_0x467c13(0x129)],delete _0x2021cd['registeredAt'],saveCache(_0x44e683));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x1cde54){const _0x263818=_0x11e65d,_0x56d61d={'zxRtB':function(_0x37027e){return _0x37027e();},'NAQpk':function(_0x3b0984,_0x40d228){return _0x3b0984>=_0x40d228;},'iTflX':function(_0x5b0727,_0x3b52b8){return _0x5b0727(_0x3b52b8);}},_0x100969=_0x56d61d['zxRtB'](loadCache),_0x316124=getOrCreateSession(_0x100969,_0x1cde54),_0x2c14ba=_0x316124['lastPlanReminderAt']||0x0,_0x217078=Date['now']();if(_0x56d61d['NAQpk'](_0x217078-_0x2c14ba,PLAN_REMINDER_INTERVAL_MS))return _0x316124[_0x263818(0x11f)]=_0x217078,_0x56d61d['iTflX'](saveCache,_0x100969),!![];return![];}export function shouldShowStopReminder(_0x146f64){const _0x37b18a=_0x11e65d,_0xd2b2b7={'pUWLX':function(_0x2416c9,_0x1e0225){return _0x2416c9>=_0x1e0225;},'VdRVO':function(_0xa3957b,_0x38c83c){return _0xa3957b-_0x38c83c;}},_0x5e4950=loadCache(),_0x35e39b=getOrCreateSession(_0x5e4950,_0x146f64),_0x16e37a=_0x35e39b[_0x37b18a(0x121)]||0x0,_0x44fa5e=Date['now']();if(_0xd2b2b7['pUWLX'](_0xd2b2b7['VdRVO'](_0x44fa5e,_0x16e37a),STOP_REMINDER_INTERVAL_MS))return _0x35e39b[_0x37b18a(0x121)]=_0x44fa5e,saveCache(_0x5e4950),!![];return![];}export function hasSessionBeenPrompted(_0x2bb3c3){const _0x31cbb6=_0x11e65d,_0x1a0475={'NGJoA':function(_0x4282d4,_0x13036b){return _0x4282d4===_0x13036b;}},_0x233cd8=loadCache();return _0x1a0475['NGJoA'](_0x233cd8[_0x31cbb6(0x125)][_0x2bb3c3]?.['prompted'],!![]);}function _0x2e1c(){const _0x198019=['iouBj','sessions','rpXVY','5Zqtgww','4736230eHYPTc','featureId','XmQia','registeredAt','gEQeC','branches','452RSWiDt','readFileSync','sQQIz','lastEnabledSessionClearedAt','writeFileSync','thxFl','265416YWfYyS','homedir','uULfv','pipe','JmTos','currentBranch','now','rEVYN','master','.claude','mkdirSync','9XOkGEA','main','prompted','LGCtn','LtcwG','parse','enabled','24527888ZVLeXX','2772YFxBIu','utf-8','347641mQZmnb','trim','184980eIdPcB','4744888aIheMH','eEUls','lastPlanReminderAt','ZGgyW','lastStopReminderAt','OwEWm','42mPDOGF'];_0x2e1c=function(){return _0x198019;};return _0x2e1c();}export function markSessionPrompted(_0x481a7c){const _0x1f6206=_0x11e65d,_0x90e29a={'shVdO':function(_0x6f76){return _0x6f76();}},_0x4355eb=_0x90e29a['shVdO'](loadCache),_0x5872b7=getOrCreateSession(_0x4355eb,_0x481a7c);_0x5872b7[_0x1f6206(0x112)]=!![],saveCache(_0x4355eb);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x31c664=_0x3abf;(function(_0xc168d,_0x4679e7){const _0x537684=_0x3abf,_0x4b0254=_0xc168d();while(!![]){try{const _0x5ce987=-parseInt(_0x537684(0x1a1))/0x1+parseInt(_0x537684(0x14a))/0x2+parseInt(_0x537684(0x178))/0x3+-parseInt(_0x537684(0x15c))/0x4+-parseInt(_0x537684(0x1c1))/0x5*(-parseInt(_0x537684(0x15d))/0x6)+parseInt(_0x537684(0x1ad))/0x7+-parseInt(_0x537684(0x1c7))/0x8*(parseInt(_0x537684(0x149))/0x9);if(_0x5ce987===_0x4679e7)break;else _0x4b0254['push'](_0x4b0254['shift']());}catch(_0x37ce87){_0x4b0254['push'](_0x4b0254['shift']());}}}(_0x5f9b,0x4d8f4));import{readFile,writeFile,mkdir,unlink}from'fs/promises';function _0x5f9b(){const _0x2cf7af=['-cli','FjoYa','DBNLr','RXezv','4095833wJGZgu','safeMode','iuUkm','legacy','UlxrX','jBUNB','Refusing\x20to\x20write\x20profile\x20\x22','ranger-config','huynR','UoLwp','allow','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','args','CjhZX','string','--allow-insecure-localhost','lIUqE','gdLXD','klJtT','XltUC','356705UNJRSM','ClygZ','yCgBF','LJkjR','cefHN','UdQEz','32488DFfIXf','length','browser','XeINN','MKIQP','--no-sandbox','63jQxnin','514664WcaOip','--disable-setuid-sandbox','Oyusv','pRTjD','Aantw','userAgent','lVtyY','BbUCm','LRjSD','WKWmm','setupHeader','Environment\x20variable\x20','indexOf','lzLPo','allowInsecureLocalhost','install','jFvRb','VBqYN','2378596KqamrO','6tkzVMx','clipboard-read','rangerDir','ignoreHTTPSErrors','core','message','replace','forWrite','sessions','baseUrl','qLycn','path','ENOENT','FLCVR','map','PtvAg','headless','playwright-cli','cdpEndpoint','filter','MBJCp','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','object','vnfrW','chromium','DRpnj','storageStatePath','810948qJFznj','extraHTTPHeaders','rbhNJ','repeat','ITVWa','pIiYG','auth.json.enc','GYzMO','snaED','BSrhW','qgVEr','clipboard-write','keys','warn','\x20is\x20not\x20set','split','fromEntries','catch','QkYaz','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','sfwCK','agLXQ','LOolY','fNxrc','headers','stagehand','getuid','Default','entries','fNsZB','Thvrm','local','YMYLs','lzGww','includes','stringify','kHiis','file','launchOptions','LtdbH','isArray','243348hjGliu','rPJVM','now','HaLOT','storageState','contextOptions','NLHaD','iFKMD'];_0x5f9b=function(){return _0x2cf7af;};return _0x5f9b();}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(_0x4443e5,_0x5a2683){const _0x254931=_0x3abf,_0x49601f={'Dbfsf':_0x254931(0x197),'mwfMi':function(_0x246f30,_0x546921,_0x3657f7){return _0x246f30(_0x546921,_0x3657f7);},'CjhZX':function(_0x271e06,_0x3c6282){return _0x271e06(_0x3c6282);},'gdLXD':function(_0x557632,_0x974242){return _0x557632!==_0x974242;},'lVtyY':function(_0x458623,_0x5039d3){return _0x458623(_0x5039d3);}},_0x449e7f=join(_0x5a2683,'ci',_0x4443e5),_0x15a8ff=join(_0x5a2683,_0x49601f['Dbfsf'],_0x4443e5),_0x310d3b=_0x49601f['mwfMi'](join,_0x5a2683,_0x4443e5),_0x2bbb20=join(_0x5a2683,'local'),_0xc9cb7=join(_0x5a2683,'ci');if(existsSync(_0x449e7f))return _0x449e7f;if(_0x49601f[_0x254931(0x1ba)](existsSync,_0x15a8ff))return _0x15a8ff;if(_0x49601f['CjhZX'](existsSync,_0x310d3b)&&(_0x49601f[_0x254931(0x1be)](_0x310d3b,_0x2bbb20)&&_0x49601f[_0x254931(0x1be)](_0x310d3b,_0xc9cb7)?!![]:_0x49601f[_0x254931(0x150)](hasLegacyProfileFiles,_0x310d3b)))return _0x310d3b;return null;}export function getEnvDir(_0x4ff28d,_0x1146d2={}){const _0x198e25=_0x3abf,_0x19eb03={'ITVWa':function(_0x370871){return _0x370871();},'pYPnB':function(_0x42cb1a,_0x536c67){return _0x42cb1a(_0x536c67);},'Thvrm':'local'},_0x4d6bdf=_0x19eb03[_0x198e25(0x17c)](getRangerDir),_0x1c463e=findEnvInRoot(_0x4ff28d,_0x4d6bdf);if(_0x1c463e){if(_0x1146d2[_0x198e25(0x164)]&&_0x19eb03['pYPnB'](isLegacyEnvPath,_0x1c463e))throw legacyWriteError(_0x4ff28d,_0x1c463e);return _0x1c463e;}const _0x424df9=getRangerHomeDir();if(_0x424df9!==_0x4d6bdf){const _0x734ca8=findEnvInRoot(_0x4ff28d,_0x424df9);if(_0x734ca8){if(_0x1146d2[_0x198e25(0x164)]&&isLegacyEnvPath(_0x734ca8))throw legacyWriteError(_0x4ff28d,_0x734ca8);return _0x734ca8;}}const _0xc11f08=join(_0x424df9,_0x19eb03[_0x198e25(0x196)],_0x4ff28d);if(_0x1146d2['forWrite'])throw legacyWriteError(_0x4ff28d,_0xc11f08);return _0xc11f08;}function isLegacyEnvPath(_0xaa8a8c){const _0x2131b7=_0x3abf,_0x11161e={'sfwCK':function(_0x158561){return _0x158561();},'hublb':function(_0x4a4413,_0x3a386e){return _0x4a4413+_0x3a386e;},'LJkjR':function(_0x2829da,_0x2d48f6){return _0x2829da===_0x2d48f6;}},_0x2d4126=getRangerDir(),_0x303b91=_0x11161e[_0x2131b7(0x18c)](getRangerHomeDir);for(const _0x5b22ab of new Set([_0x2d4126,_0x303b91])){const _0x23779f=_0x5b22ab['endsWith']('/')?_0x5b22ab:_0x11161e['hublb'](_0x5b22ab,'/');if(_0x11161e[_0x2131b7(0x1c4)](_0xaa8a8c,_0x5b22ab)||_0xaa8a8c['startsWith'](_0x23779f))return!![];}return![];}function legacyWriteError(_0x54b008,_0x39180c){const _0x504e54=_0x3abf;return new Error(_0x504e54(0x1b3)+_0x54b008+'\x22\x20to\x20legacy\x20path\x20'+_0x39180c+'.\x0a'+_0x504e54(0x172)+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x59b912,_0x44f320){const _0x20813=_0x3abf,_0x46858e={'qNaFc':function(_0x2b5c12){return _0x2b5c12();},'PtvAg':_0x20813(0x197),'Oyusv':'legacy','UdQEz':function(_0x57f9f9,_0x23e6d8,_0x4fae55){return _0x57f9f9(_0x23e6d8,_0x4fae55);},'iFKMD':function(_0xe2262d,_0x443e62,_0x581cc9,_0x379aad){return _0xe2262d(_0x443e62,_0x581cc9,_0x379aad);},'ACPlu':function(_0x47795a,_0x202436,_0x44b1d1,_0x3b11fe){return _0x47795a(_0x202436,_0x44b1d1,_0x3b11fe);},'XeINN':function(_0x337ebf,_0x59f2dc){return _0x337ebf(_0x59f2dc);},'snaED':function(_0x1a5b09,_0x5ea603){return _0x1a5b09===_0x5ea603;},'hfWdF':function(_0x31a314,_0x467dda){return _0x31a314(_0x467dda);}},_0x3d32b8=_0x44f320?.[_0x20813(0x15f)],_0x4a7db0=_0x3d32b8?[_0x3d32b8]:[getRangerDir(),_0x46858e['qNaFc'](getRangerHomeDir)]['filter']((_0x36c1aa,_0x27f960,_0x9c0c63)=>_0x9c0c63[_0x20813(0x156)](_0x36c1aa)===_0x27f960),_0x549047=_0x44f320?.['locations']??['ci',_0x46858e[_0x20813(0x16c)],_0x46858e[_0x20813(0x14c)]];for(const _0x291250 of _0x4a7db0){const _0x4835d7=_0x46858e[_0x20813(0x1c6)](join,_0x291250,_0x20813(0x197)),_0x392758=join(_0x291250,'ci'),_0x550bce=[{'location':'ci','path':_0x46858e[_0x20813(0x1a8)](join,_0x291250,'ci',_0x59b912)},{'location':'local','path':_0x46858e['ACPlu'](join,_0x291250,_0x46858e[_0x20813(0x16c)],_0x59b912)},{'location':_0x46858e['Oyusv'],'path':join(_0x291250,_0x59b912)}];for(const _0x30baf1 of _0x550bce){if(_0x549047['includes'](_0x30baf1['location'])&&_0x46858e[_0x20813(0x1ca)](existsSync,_0x30baf1['path'])){if(_0x46858e['snaED'](_0x30baf1['location'],_0x20813(0x1b0))&&(_0x46858e[_0x20813(0x180)](_0x30baf1['path'],_0x4835d7)||_0x46858e[_0x20813(0x180)](_0x30baf1['path'],_0x392758))&&!_0x46858e['hfWdF'](hasLegacyProfileFiles,_0x30baf1[_0x20813(0x168)]))continue;return{'path':_0x30baf1[_0x20813(0x168)],'location':_0x30baf1['location']};}}}return null;}function hasLegacyProfileFiles(_0x12e0d8){const _0x29eb54=_0x3abf,_0xfbc4c1={'pRTjD':function(_0x4b1e4d,_0x3a2595){return _0x4b1e4d(_0x3a2595);},'ywXAj':function(_0x5efa65,_0x19ce46,_0x52b059){return _0x5efa65(_0x19ce46,_0x52b059);}};return _0xfbc4c1[_0x29eb54(0x14d)](existsSync,join(_0x12e0d8,'settings.json'))||_0xfbc4c1['pRTjD'](existsSync,join(_0x12e0d8,'auth.json'))||_0xfbc4c1[_0x29eb54(0x14d)](existsSync,_0xfbc4c1['ywXAj'](join,_0x12e0d8,_0x29eb54(0x17e)));}export function isEnvCi(_0x22fa6c){const _0x1b5fea=_0x3abf,_0x6b2cda={'qBGVJ':function(_0x5450fe,_0x684921){return _0x5450fe(_0x684921);},'UoLwp':function(_0x5e1200){return _0x5e1200();},'EcGvS':function(_0x371364,_0x5639cf){return _0x371364!==_0x5639cf;},'qgVEr':function(_0x3d7ade,_0x23d3fe){return _0x3d7ade(_0x23d3fe);},'VBqYN':function(_0x297266,_0x45a6ca,_0x58faeb,_0x127276){return _0x297266(_0x45a6ca,_0x58faeb,_0x127276);}};if(_0x6b2cda['qBGVJ'](existsSync,join(getRangerDir(),'ci',_0x22fa6c)))return!![];const _0x49f650=_0x6b2cda['UoLwp'](getRangerHomeDir);if(_0x6b2cda['EcGvS'](_0x49f650,_0x6b2cda[_0x1b5fea(0x1b6)](getRangerDir))&&_0x6b2cda[_0x1b5fea(0x182)](existsSync,_0x6b2cda[_0x1b5fea(0x15b)](join,_0x49f650,'ci',_0x22fa6c)))return!![];return![];}export async function cleanupTempFiles(_0xaea625){const _0xbbe125=_0x3abf,_0x5a6640={'jFvRb':function(_0x233b0d,_0x38f0bd){return _0x233b0d!==_0x38f0bd;}},_0x5649be=[_0xaea625['tempAuthPath'],_0xaea625['configPath']]['filter'](Boolean);await Promise['all'](_0x5649be[_0xbbe125(0x16b)](_0x3563cf=>unlink(_0x3563cf)['catch'](_0x3a37cc=>{const _0x3f5f37=_0xbbe125;_0x5a6640[_0x3f5f37(0x15a)](_0x3a37cc['code'],_0x3f5f37(0x169))&&console[_0x3f5f37(0x185)](_0x3f5f37(0x18b)+_0x3563cf+':',_0x3a37cc[_0x3f5f37(0x162)]);})));}export function getSettingsPath(_0xa7a01f){return join(getEnvDir(_0xa7a01f),'settings.json');}export async function loadSettings(_0x4ddf41){const _0x5e00e2={'jGvDj':function(_0xf23c46,_0x417439){return _0xf23c46(_0x417439);}},_0x5266ca=_0x5e00e2['jGvDj'](getSettingsPath,_0x4ddf41);if(!existsSync(_0x5266ca))return{};try{const _0x2671e8=await readFile(_0x5266ca,'utf-8');return JSON['parse'](_0x2671e8);}catch{return{};}}export async function saveSettings(_0x5177a2,_0x572028){const _0x5e6fd7=_0x3abf,_0x453cfa={'qLycn':function(_0x438fd0,_0x1a3242){return _0x438fd0(_0x1a3242);},'MKIQP':function(_0x2c95a6,_0x79cd69){return _0x2c95a6(_0x79cd69);}},_0x7e3d7b=_0x453cfa['qLycn'](getSettingsPath,_0x5177a2),_0x577127=_0x453cfa[_0x5e6fd7(0x167)](dirname,_0x7e3d7b);!_0x453cfa[_0x5e6fd7(0x1cb)](existsSync,_0x577127)&&await mkdir(_0x577127,{'recursive':!![]}),await writeFile(_0x7e3d7b,JSON['stringify'](_0x572028,null,0x2));}export function resolveEnvVars(_0x517ca2){const _0x4f9803=_0x3abf,_0x3932c5={'kssjv':function(_0x4f6876,_0x1da5e6){return _0x4f6876===_0x1da5e6;},'rERdh':_0x4f9803(0x1bb),'ptUbC':function(_0x13d590,_0x399f6c){return _0x13d590===_0x399f6c;}};if(typeof _0x517ca2===_0x3932c5['rERdh'])return _0x517ca2[_0x4f9803(0x163)](/\$\{(\w+)\}/g,(_0x1af523,_0x2641a9)=>{const _0x2dda6c=_0x4f9803,_0x794c8a=process['env'][_0x2641a9];if(_0x3932c5['kssjv'](_0x794c8a,undefined))throw new Error(_0x2dda6c(0x155)+_0x2641a9+_0x2dda6c(0x186));return _0x794c8a;});if(Array[_0x4f9803(0x1a0)](_0x517ca2))return _0x517ca2['map'](resolveEnvVars);if(_0x517ca2&&_0x3932c5['ptUbC'](typeof _0x517ca2,'object'))return Object[_0x4f9803(0x188)](Object[_0x4f9803(0x194)](_0x517ca2)[_0x4f9803(0x16b)](([_0x2f949d,_0x3c2340])=>[_0x2f949d,resolveEnvVars(_0x3c2340)]));return _0x517ca2;}const isRecord=_0x5303d2=>typeof _0x5303d2==='object'&&_0x5303d2!==null&&!Array[_0x31c664(0x1a0)](_0x5303d2),asRecord=_0x270862=>isRecord(_0x270862)?_0x270862:undefined,mergeHeaders=(_0x386808,_0x2b232b)=>{const _0xf8588b=_0x31c664,_0x3709cb={'FUxCT':function(_0x485bc0,_0x47d0d6){return _0x485bc0??_0x47d0d6;}},_0x57803f={..._0x3709cb['FUxCT'](_0x386808,{}),..._0x3709cb['FUxCT'](_0x2b232b,{})};return Object[_0xf8588b(0x184)](_0x57803f)['length']?_0x57803f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x31c664(0x1bc)];export function buildBrowserOptionsFromSettings(_0xad161d,_0x5780e3={}){const _0x3d9db8=_0x31c664,_0x3a6e85={'YMYLs':function(_0x3ef2c1,_0x182131){return _0x3ef2c1(_0x182131);},'FjoYa':_0x3d9db8(0x1bb),'TkVlF':function(_0x302d5c,_0x1b0638,_0x407a90){return _0x302d5c(_0x1b0638,_0x407a90);}},_0x373500=asRecord(_0xad161d['browser']),_0x42b179={...asRecord(_0x373500?.[_0x3d9db8(0x19e)])??{}};typeof _0x5780e3[_0x3d9db8(0x16d)]==='boolean'&&(_0x42b179['headless']=_0x5780e3[_0x3d9db8(0x16d)]);if(_0xad161d['safeMode']){const _0xbccf21=_0x42b179['args']??[],_0x21a81b=SAFE_MODE_ARGS[_0x3d9db8(0x170)](_0x48ee92=>!_0xbccf21['includes'](_0x48ee92));_0x42b179['args']=[..._0xbccf21,..._0x21a81b];}if(_0xad161d[_0x3d9db8(0x158)]){const _0x483ef3=_0x42b179['args']??[],_0x3d0c99=ALLOW_LOCALHOST_ARGS[_0x3d9db8(0x170)](_0x877d9d=>!_0x483ef3['includes'](_0x877d9d));_0x42b179['args']=[..._0x483ef3,..._0x3d0c99];}const _0x14abbf={..._0x3a6e85[_0x3d9db8(0x198)](asRecord,_0x373500?.[_0x3d9db8(0x1a6)])??{}};_0x14abbf[_0x3d9db8(0x160)]=!![];typeof _0xad161d[_0x3d9db8(0x14f)]===_0x3a6e85[_0x3d9db8(0x1aa)]&&(_0x14abbf['userAgent']=_0xad161d['userAgent']);const _0x401485=_0x3a6e85['TkVlF'](mergeHeaders,asRecord(_0x14abbf['extraHTTPHeaders']),asRecord(_0xad161d[_0x3d9db8(0x190)]));return _0x401485?_0x14abbf['extraHTTPHeaders']=_0x401485:delete _0x14abbf[_0x3d9db8(0x179)],_0x5780e3[_0x3d9db8(0x177)]&&(_0x14abbf[_0x3d9db8(0x1a5)]=_0x5780e3['storageStatePath']),{'launchOptions':_0x42b179,'contextOptions':_0x14abbf};}export async function resolveProfileStorageState(_0x2abcce){const _0x496b22=_0x31c664,_0x139588={'rbhNJ':function(_0x3b2a6b,_0x41e385){return _0x3b2a6b(_0x41e385);}};return resolveLocalAuthPath(_0x139588[_0x496b22(0x17a)](getEnvDir,_0x2abcce));}async function resolveLocalAuthPath(_0x3c4655){const _0x3a50d8=_0x31c664,_0x5f5c95={'BtXCy':function(_0x492bcb,_0x45e5d3,_0x2bccf0){return _0x492bcb(_0x45e5d3,_0x2bccf0);},'HQNmW':function(_0x235b88,_0xf29c8d,_0x59ba7){return _0x235b88(_0xf29c8d,_0x59ba7);},'oYHZw':function(_0x4ba1c2){return _0x4ba1c2();},'huynR':function(_0x198b0f,_0x573cde){return _0x198b0f(_0x573cde);},'NLHaD':function(_0x1f5f5e,_0x306215){return _0x1f5f5e(_0x306215);}},_0x5d0eb1=_0x5f5c95['BtXCy'](join,_0x3c4655,'auth.json.enc'),_0x2a7961=join(_0x3c4655,'auth.json');if(existsSync(_0x5d0eb1))try{const _0x1b4caf=await getToken();if(!_0x1b4caf)throw new Error(_0x3a50d8(0x1b8));const _0xd31cd7=await readFile(_0x5d0eb1),_0x4e182a=_0x5f5c95['HQNmW'](decrypt,_0xd31cd7,_0x1b4caf),_0x1fede4=join(_0x5f5c95['oYHZw'](tmpdir),'ranger-auth-'+Date['now']()+'.json');return await writeFile(_0x1fede4,_0x4e182a),{'storageStatePath':_0x1fede4,'tempAuthPath':_0x1fede4};}catch(_0x5ec1b1){const _0x28e109=_0x5ec1b1 instanceof Error?_0x5ec1b1[_0x3a50d8(0x162)]:_0x5f5c95[_0x3a50d8(0x1b5)](String,_0x5ec1b1);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x28e109);}if(_0x5f5c95[_0x3a50d8(0x1a7)](existsSync,_0x2a7961))return{'storageStatePath':_0x2a7961};return{};}export async function buildPlaywrightConfig(_0x28a14e,_0x4976e7,_0x3feec2,_0x319d65,_0x45afee){const _0x4e9930=_0x31c664,_0x48fe31={'RDLCb':_0x4e9930(0x191),'CHDmA':function(_0x20f404,_0x14bc76){return _0x20f404(_0x14bc76);},'QkYaz':function(_0x1cf4fa,_0xa331e,_0xedcbb0,_0x5f917f,_0x27942a,_0x4f517b,_0x209c44){return _0x1cf4fa(_0xa331e,_0xedcbb0,_0x5f917f,_0x27942a,_0x4f517b,_0x209c44);},'xQEvy':function(_0x2f3d1e,_0x4d4e95){return _0x2f3d1e(_0x4d4e95);}};if(_0x45afee)return buildPlaywrightConfigCore(_0x28a14e,_0x45afee,_0x4976e7,_0x3feec2,_0x319d65,_0x48fe31['RDLCb']);const {storageStatePath:_0x688923,tempAuthPath:_0x199ad2}=await _0x48fe31['CHDmA'](resolveLocalAuthPath,getEnvDir(_0x4976e7));try{const _0x338c0a=await _0x48fe31[_0x4e9930(0x18a)](buildPlaywrightConfigCore,_0x28a14e,_0x688923,_0x4976e7,_0x3feec2,_0x319d65,'stagehand');return{..._0x338c0a,'tempAuthPath':_0x199ad2};}catch(_0x4a6174){_0x199ad2&&await _0x48fe31['xQEvy'](unlink,_0x199ad2)['catch'](()=>{});throw _0x4a6174;}}export async function buildPlaywrightConfigCore(_0x4ad08a,_0x54b6d7,_0x5d1db3,_0x25b107,_0x40e4c9,_0x2d4833=_0x31c664(0x191)){const _0xd94087=_0x31c664,_0x4985b7={'seMsb':function(_0x14f3e8,_0x1fc771){return _0x14f3e8===_0x1fc771;},'RXezv':_0xd94087(0x148),'yldsC':_0xd94087(0x15e),'agLXQ':_0xd94087(0x183),'XltUC':_0xd94087(0x175),'ZjhKs':function(_0x2b19ab,_0x3c13d5){return _0x2b19ab===_0x3c13d5;},'kHiis':_0xd94087(0x161),'WKWmm':_0xd94087(0x159),'udtdf':'pdf','DRpnj':_0xd94087(0x1b7),'rPJVM':function(_0x7d0db8,_0x3d48e2){return _0x7d0db8===_0x3d48e2;},'FLCVR':function(_0x2e0b4e,_0x3a905f){return _0x2e0b4e===_0x3a905f;},'jRTlA':_0xd94087(0x1b4),'pIiYG':function(_0x553069,_0x149122){return _0x553069(_0x149122);},'XKnbf':_0xd94087(0x1a9),'HaLOT':function(_0x5090bb,_0x159aef,_0xf1a80){return _0x5090bb(_0x159aef,_0xf1a80);},'BlGPo':function(_0x1cb6ae,_0x1c49fd,_0x54f278){return _0x1cb6ae(_0x1c49fd,_0x54f278);}},_0x368031=_0x25b107||randomUUID(),_0x1e3990=join(getRangerDir(),'sessions',_0x368031),_0x57aa63=Boolean(_0x4ad08a[_0xd94087(0x16f)]),_0x17b107=_0x57aa63?{'browserName':_0x4985b7[_0xd94087(0x1c0)],'cdpEndpoint':_0x4ad08a[_0xd94087(0x16f)]}:((()=>{const _0x343ae0=_0xd94087,{launchOptions:_0x199ff1,contextOptions:_0x63e12c}=buildBrowserOptionsFromSettings(_0x4ad08a,{'headless':_0x40e4c9?![]:_0x4ad08a[_0x343ae0(0x16d)]??!![],'storageStatePath':_0x54b6d7});if(_0x4985b7['seMsb'](process[_0x343ae0(0x192)]?.(),0x0)){const _0x166671=[_0x4985b7[_0x343ae0(0x1ac)],_0x343ae0(0x14b)],_0x4a29b0=_0x199ff1['args']??[],_0x3105cf=_0x166671[_0x343ae0(0x170)](_0x52714d=>!_0x4a29b0['includes'](_0x52714d));_0x199ff1[_0x343ae0(0x1b9)]=[..._0x4a29b0,..._0x3105cf];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x199ff1,'contextOptions':{..._0x63e12c,'permissions':[_0x4985b7['yldsC'],_0x4985b7[_0x343ae0(0x18d)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x52d9ba=_0x4985b7['ZjhKs'](_0x2d4833,'playwright-cli')?{'browser':_0x17b107,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1e3990,'outputMode':_0xd94087(0x19d),'codegen':'none'}:{'name':_0x5d1db3,'browser':_0x17b107,'capabilities':[_0x4985b7[_0xd94087(0x19c)],'tabs',_0x4985b7[_0xd94087(0x153)],_0x4985b7['udtdf'],'vision'],'imageResponses':_0x4985b7[_0xd94087(0x176)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1e3990};if(!_0x57aa63){const _0x275e10=_0x52d9ba[_0xd94087(0x1c9)],_0x1eb04e=_0x275e10['contextOptions'];if(_0x4985b7[_0xd94087(0x1a2)](_0x1eb04e[_0xd94087(0x14f)],undefined))delete _0x1eb04e['userAgent'];if(_0x4985b7[_0xd94087(0x16a)](_0x1eb04e['storageState'],undefined))delete _0x1eb04e['storageState'];}const _0x257542=join(tmpdir(),_0x4985b7['jRTlA']);!_0x4985b7[_0xd94087(0x17d)](existsSync,_0x257542)&&await mkdir(_0x257542,{'recursive':!![]});const _0x409b66=_0x2d4833==='playwright-cli'?_0x4985b7['XKnbf']:'',_0x2b9f24=_0x4985b7[_0xd94087(0x1a4)](join,_0x257542,_0x5d1db3+'-'+Date['now']()+_0x409b66+'.json');return await _0x4985b7['BlGPo'](writeFile,_0x2b9f24,JSON[_0xd94087(0x19b)](_0x52d9ba,null,0x2)),{'configPath':_0x2b9f24,'storageStatePath':_0x54b6d7};}export async function buildPlaywrightCliConfig(_0x2d13df,_0x3a5bfe,_0x5b2fd2,_0xde2ec7,_0x131054){const _0x56c448=_0x31c664,_0x5b9793={'MBJCp':function(_0x20d1b5,_0x1cf7aa,_0x891218,_0x31e216,_0x2e8051,_0x37cb14,_0x1886e6){return _0x20d1b5(_0x1cf7aa,_0x891218,_0x31e216,_0x2e8051,_0x37cb14,_0x1886e6);},'iWMaH':'playwright-cli','ytSWE':function(_0x1077f4,_0x5de47d){return _0x1077f4(_0x5de47d);}};if(_0x131054)return _0x5b9793[_0x56c448(0x171)](buildPlaywrightConfigCore,_0x2d13df,_0x131054,_0x3a5bfe,_0x5b2fd2,_0xde2ec7,_0x5b9793['iWMaH']);const {storageStatePath:_0x2034ff,tempAuthPath:_0x147b46}=await _0x5b9793['ytSWE'](resolveLocalAuthPath,getEnvDir(_0x3a5bfe));try{const _0x1d63bf=await _0x5b9793[_0x56c448(0x171)](buildPlaywrightConfigCore,_0x2d13df,_0x2034ff,_0x3a5bfe,_0x5b2fd2,_0xde2ec7,_0x56c448(0x16e));return{..._0x1d63bf,'tempAuthPath':_0x147b46};}catch(_0x10ca40){_0x147b46&&await unlink(_0x147b46)[_0x56c448(0x189)](()=>{});throw _0x10ca40;}}export async function buildRangerwrightCliConfig(_0x2e13ee,_0x2882a1,_0x2a17a4,_0x2c524b,_0x4c44a5){const _0x1c2c8b=_0x31c664,_0xf90918={'iuUkm':function(_0x22aa6a,_0x313fbe){return _0x22aa6a===_0x313fbe;},'GYzMO':'--disable-setuid-sandbox','lzLPo':_0x1c2c8b(0x175),'YIJwu':_0x1c2c8b(0x15e),'HHHRW':'clipboard-write','cefHN':function(_0x15e9e5,_0x415342){return _0x15e9e5(_0x415342);},'xoRnX':function(_0x1decc7){return _0x1decc7();},'LtdbH':_0x1c2c8b(0x165),'bGWuQ':function(_0x458312,_0x40815d){return _0x458312===_0x40815d;},'gzuod':_0x1c2c8b(0x1b4),'LOolY':function(_0x363981,_0x2e0fc7,_0x4d803c){return _0x363981(_0x2e0fc7,_0x4d803c);}},{storageStatePath:_0x3e4b0b,tempAuthPath:_0x2a02c8}=_0x4c44a5?{'storageStatePath':_0x4c44a5,'tempAuthPath':undefined}:await _0xf90918['cefHN'](resolveLocalAuthPath,getEnvDir(_0x2882a1)),_0x261a73=_0x2a17a4||_0xf90918['xoRnX'](randomUUID),_0x3706af=join(_0xf90918['xoRnX'](getRangerDir),_0xf90918[_0x1c2c8b(0x19f)],_0x261a73),_0x515ddd=_0xf90918[_0x1c2c8b(0x1c5)](Boolean,_0x2e13ee['cdpEndpoint']),_0x4f5cfa=_0x515ddd?{'browserName':_0xf90918[_0x1c2c8b(0x157)],'cdpEndpoint':_0x2e13ee[_0x1c2c8b(0x16f)]}:((()=>{const _0x3b7484=_0x1c2c8b,{launchOptions:_0x5941eb,contextOptions:_0x15d262}=buildBrowserOptionsFromSettings(_0x2e13ee,{'headless':_0x2c524b?![]:_0x2e13ee[_0x3b7484(0x16d)]??!![],'storageStatePath':_0x3e4b0b});if(_0xf90918[_0x3b7484(0x1af)](process[_0x3b7484(0x192)]?.(),0x0)){const _0x2f7524=[_0x3b7484(0x148),_0xf90918[_0x3b7484(0x17f)]],_0x56e84e=_0x5941eb['args']??[],_0x32af91=_0x2f7524[_0x3b7484(0x170)](_0x177ac1=>!_0x56e84e[_0x3b7484(0x19a)](_0x177ac1));_0x5941eb['args']=[..._0x56e84e,..._0x32af91];}return{'browserName':_0xf90918['lzLPo'],'launchOptions':_0x5941eb,'contextOptions':{..._0x15d262,'permissions':[_0xf90918['YIJwu'],_0xf90918['HHHRW']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x515ddd){const _0x2e4afb=_0x4f5cfa['contextOptions'];if(_0x2e4afb){if(_0xf90918['iuUkm'](_0x2e4afb['userAgent'],undefined))delete _0x2e4afb['userAgent'];if(_0xf90918['bGWuQ'](_0x2e4afb['storageState'],undefined))delete _0x2e4afb['storageState'];}}const _0xd48633={'browser':_0x4f5cfa,'outputDir':_0x3706af,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x3166ce;try{const _0x4ed312=join(tmpdir(),_0xf90918['gzuod']);!existsSync(_0x4ed312)&&await _0xf90918[_0x1c2c8b(0x18e)](mkdir,_0x4ed312,{'recursive':!![]}),_0x3166ce=join(_0x4ed312,_0x2882a1+'-'+Date[_0x1c2c8b(0x1a3)]()+'-rangerwright.json'),await writeFile(_0x3166ce,JSON['stringify'](_0xd48633,null,0x2));}catch(_0x1fd68a){_0x2a02c8&&await unlink(_0x2a02c8)[_0x1c2c8b(0x189)](()=>{});throw _0x1fd68a;}return{'configPath':_0x3166ce,'storageStatePath':_0x3e4b0b,'tempAuthPath':_0x2a02c8,'outputDir':_0x3706af};}export async function buildNovaActCliConfig(_0x26f9c5,_0x4b8a17,_0x1de20c,_0x3b9f3c,_0x28b813){const _0x39b04c=_0x31c664,_0x2c126b={'qGffA':function(_0x3f8f00,_0x518b96){return _0x3f8f00(_0x518b96);},'XEIVS':function(_0x608190,_0x4489de,_0x5ced3c,_0x537f65){return _0x608190(_0x4489de,_0x5ced3c,_0x537f65);},'zgtRq':function(_0xfbfbcf,_0x145eda,_0x1b4ad7){return _0xfbfbcf(_0x145eda,_0x1b4ad7);},'DBNLr':'nova-user-data','MckcW':function(_0x224c83,_0x1fb729,_0xf8997e){return _0x224c83(_0x1fb729,_0xf8997e);},'yCgBF':_0x39b04c(0x193),'YlPLm':function(_0x5b21df,_0x249fe5,_0x358c32){return _0x5b21df(_0x249fe5,_0x358c32);},'RPeqk':function(_0x341f55,_0x33d585){return _0x341f55===_0x33d585;},'lzGww':function(_0x587ad2,_0x485d7d){return _0x587ad2(_0x485d7d);},'KtWOf':function(_0x7d5a90,_0x5a4f2d){return _0x7d5a90===_0x5a4f2d;},'XjeSg':'string','zbcCs':function(_0xca2f05,_0x123a5b){return _0xca2f05(_0x123a5b);}},{storageStatePath:_0x530708,tempAuthPath:_0x528c20}=_0x28b813?{'storageStatePath':_0x28b813,'tempAuthPath':undefined}:await _0x2c126b['qGffA'](resolveLocalAuthPath,getEnvDir(_0x4b8a17)),_0x16dc31=_0x1de20c||randomUUID(),_0x2b280e=_0x2c126b['XEIVS'](join,getRangerDir(),'sessions',_0x16dc31),_0x1c31d9=_0x2c126b['zgtRq'](join,_0x2b280e,_0x2c126b[_0x39b04c(0x1ab)]),_0x3a8a94=_0x530708?_0x2c126b['MckcW'](join,_0x1c31d9,_0x2c126b[_0x39b04c(0x1c3)]):undefined,{launchOptions:_0x388ec4,contextOptions:_0x5b92bf}=_0x2c126b['YlPLm'](buildBrowserOptionsFromSettings,_0x26f9c5,{'headless':_0x3b9f3c?![]:_0x26f9c5[_0x39b04c(0x16d)]??!![],'storageStatePath':_0x530708});if(_0x2c126b['RPeqk'](process['getuid']?.(),0x0)){const _0x44ef33=[_0x39b04c(0x148),_0x39b04c(0x14b)],_0x56614c=_0x388ec4['args']??[],_0x30ebd5=_0x44ef33['filter'](_0x385e03=>!_0x56614c[_0x39b04c(0x19a)](_0x385e03));_0x388ec4['args']=[..._0x56614c,..._0x30ebd5];}const _0x2b3f7b=_0x2c126b['RPeqk'](typeof _0x388ec4['executablePath'],'string')?_0x388ec4['executablePath']:_0x530708?chromium['executablePath']():undefined;return{'storageStatePath':_0x530708,'tempAuthPath':_0x528c20,'baseUrl':_0x26f9c5[_0x39b04c(0x166)],'headless':_0x2c126b[_0x39b04c(0x199)](Boolean,_0x388ec4[_0x39b04c(0x16d)]),'userDataDir':_0x1c31d9,'browserProfilePath':_0x3a8a94,'executablePath':_0x2b3f7b,'launchArgs':Array[_0x39b04c(0x1a0)](_0x388ec4['args'])?_0x388ec4['args']['filter'](_0x311e62=>typeof _0x311e62===_0x39b04c(0x1bb)):[],'userAgent':_0x2c126b['KtWOf'](typeof _0x5b92bf['userAgent'],_0x2c126b['XjeSg'])?_0x5b92bf[_0x39b04c(0x14f)]:undefined,'extraHTTPHeaders':_0x5b92bf['extraHTTPHeaders'],'allowInsecureLocalhost':_0x2c126b['qGffA'](Boolean,_0x26f9c5[_0x39b04c(0x158)]),'safeMode':_0x2c126b['zbcCs'](Boolean,_0x26f9c5[_0x39b04c(0x1ae)]),'cdpEndpoint':_0x26f9c5['cdpEndpoint'],'isCdpMode':_0x2c126b['zbcCs'](Boolean,_0x26f9c5[_0x39b04c(0x16f)])};}export function getNestedValue(_0x4b4c3d,_0x3863d0){const _0x450e4e=_0x31c664,_0x5f41a6={'fNsZB':function(_0x11b9fd,_0x2f2e3f){return _0x11b9fd===_0x2f2e3f;},'fNxrc':function(_0x16aa16,_0x42414f){return _0x16aa16!==_0x42414f;},'FyewZ':_0x450e4e(0x173)},_0x41fc80=parseKeyPath(_0x3863d0);let _0x58dfa2=_0x4b4c3d;for(const _0x41352c of _0x41fc80){if(_0x5f41a6['fNsZB'](_0x58dfa2,null)||_0x5f41a6[_0x450e4e(0x195)](_0x58dfa2,undefined)||_0x5f41a6[_0x450e4e(0x18f)](typeof _0x58dfa2,_0x5f41a6['FyewZ']))return undefined;_0x58dfa2=_0x58dfa2[_0x41352c];}return _0x58dfa2;}function _0x3abf(_0x436c48,_0xcec82d){_0x436c48=_0x436c48-0x148;const _0x5f9bf1=_0x5f9b();let _0x3abfac=_0x5f9bf1[_0x436c48];return _0x3abfac;}export function setNestedValue(_0x2de153,_0x45fd80,_0x1ba9bd){const _0x1449f6=_0x31c664,_0x3b6414={'UbZwf':function(_0x547b08,_0xecb174){return _0x547b08(_0xecb174);},'vnfrW':function(_0x141027,_0x3dddd0){return _0x141027<_0x3dddd0;},'jBUNB':function(_0x271f53,_0x555e18){return _0x271f53 in _0x555e18;},'lIUqE':function(_0x44fc4b,_0x5d4fd1){return _0x44fc4b!==_0x5d4fd1;},'Aantw':_0x1449f6(0x173),'BbUCm':function(_0x303e58,_0x278961){return _0x303e58-_0x278961;}},_0x293688=_0x3b6414['UbZwf'](parseKeyPath,_0x45fd80);let _0x37c99a=_0x2de153;for(let _0x3b576c=0x0;_0x3b6414[_0x1449f6(0x174)](_0x3b576c,_0x293688[_0x1449f6(0x1c8)]-0x1);_0x3b576c++){const _0x53565c=_0x293688[_0x3b576c];(!_0x3b6414[_0x1449f6(0x1b2)](_0x53565c,_0x37c99a)||_0x3b6414[_0x1449f6(0x1bd)](typeof _0x37c99a[_0x53565c],_0x3b6414[_0x1449f6(0x14e)]))&&(_0x37c99a[_0x53565c]={}),_0x37c99a=_0x37c99a[_0x53565c];}_0x37c99a[_0x293688[_0x3b6414[_0x1449f6(0x151)](_0x293688[_0x1449f6(0x1c8)],0x1)]]=_0x1ba9bd;}export function deleteNestedValue(_0x401f4a,_0x47fbc8){const _0x3ca36d=_0x31c664,_0x3e5645={'LRjSD':function(_0x228940,_0x3d9304){return _0x228940<_0x3d9304;},'ZLcFl':'object','BSrhW':function(_0x5857d1,_0x43beae){return _0x5857d1===_0x43beae;},'UlxrX':function(_0x5b2fff,_0x6f2533){return _0x5b2fff-_0x6f2533;}},_0x4d01a7=parseKeyPath(_0x47fbc8);let _0x17b216=_0x401f4a;for(let _0x299775=0x0;_0x3e5645[_0x3ca36d(0x152)](_0x299775,_0x4d01a7['length']-0x1);_0x299775++){if(_0x17b216===null||_0x17b216===undefined||typeof _0x17b216!==_0x3e5645['ZLcFl'])return![];_0x17b216=_0x17b216[_0x4d01a7[_0x299775]];}if(_0x3e5645[_0x3ca36d(0x181)](_0x17b216,null)||_0x17b216===undefined||typeof _0x17b216!==_0x3ca36d(0x173))return![];const _0x1514a9=_0x4d01a7[_0x3e5645[_0x3ca36d(0x1b1)](_0x4d01a7[_0x3ca36d(0x1c8)],0x1)];if(_0x1514a9 in _0x17b216)return delete _0x17b216[_0x1514a9],!![];return![];}function parseKeyPath(_0xcab3eb){const _0x2e387f=_0x31c664,_0x108863={'yKzii':'headers','RJaUd':_0x2e387f(0x154),'klJtT':'setupHeaders'},_0x1a6db8=_0xcab3eb[_0x2e387f(0x187)]('.');return _0x1a6db8[0x0]==='header'&&(_0x1a6db8[0x0]=_0x108863['yKzii']),_0x1a6db8[0x0]===_0x108863['RJaUd']&&(_0x1a6db8[0x0]=_0x108863[_0x2e387f(0x1bf)]),_0x1a6db8;}export function formatSettings(_0x13139a,_0x540bbd=0x0){const _0x5e8172=_0x31c664,_0x4a61c8={'AdEuk':function(_0x28d256,_0x5123e4){return _0x28d256===_0x5123e4;},'ClygZ':function(_0x589f20,_0x95a339){return _0x589f20!==_0x95a339;}},_0xdf5c89=[],_0x188eb0='\x20\x20'[_0x5e8172(0x17b)](_0x540bbd);for(const [_0x1d84b9,_0x44d442]of Object[_0x5e8172(0x194)](_0x13139a)){if(_0x44d442===undefined)continue;if(_0x4a61c8['AdEuk'](typeof _0x44d442,_0x5e8172(0x173))&&_0x4a61c8[_0x5e8172(0x1c2)](_0x44d442,null)){_0xdf5c89['push'](''+_0x188eb0+_0x1d84b9+':');for(const [_0x52e565,_0x522de0]of Object[_0x5e8172(0x194)](_0x44d442)){_0xdf5c89['push'](_0x188eb0+'\x20\x20'+_0x52e565+':\x20'+_0x522de0);}}else _0xdf5c89['push'](''+_0x188eb0+_0x1d84b9+':\x20'+_0x44d442);}return _0xdf5c89['join']('\x0a');}
|
|
1
|
+
const _0x2efe12=_0x4f98;(function(_0x4cce18,_0x1a0dcd){const _0x2af609=_0x4f98,_0xfc811e=_0x4cce18();while(!![]){try{const _0x22f0cb=parseInt(_0x2af609(0xc6))/0x1+parseInt(_0x2af609(0x120))/0x2*(parseInt(_0x2af609(0x12b))/0x3)+-parseInt(_0x2af609(0xcc))/0x4*(parseInt(_0x2af609(0x126))/0x5)+parseInt(_0x2af609(0xec))/0x6+parseInt(_0x2af609(0xd2))/0x7*(parseInt(_0x2af609(0xf6))/0x8)+parseInt(_0x2af609(0x137))/0x9*(parseInt(_0x2af609(0x11a))/0xa)+-parseInt(_0x2af609(0xd3))/0xb;if(_0x22f0cb===_0x1a0dcd)break;else _0xfc811e['push'](_0xfc811e['shift']());}catch(_0x23fa4e){_0xfc811e['push'](_0xfc811e['shift']());}}}(_0x456a,0x5bd93));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(_0x4f27e6,_0x4d7f80){const _0x268efe=_0x4f98,_0x2b4e9c={'NbPRq':function(_0x327e69,_0x38bd15,_0x4aaa86,_0x39561a){return _0x327e69(_0x38bd15,_0x4aaa86,_0x39561a);},'ukeVl':function(_0x13779b,_0x48cd72,_0x2c0323,_0x688747){return _0x13779b(_0x48cd72,_0x2c0323,_0x688747);},'rYEzm':'local','rHIOK':function(_0x216a64,_0x882b5e,_0x5a33ed){return _0x216a64(_0x882b5e,_0x5a33ed);},'XDNMV':function(_0x4e5764,_0x312266){return _0x4e5764(_0x312266);},'EaVcU':function(_0x432142,_0x2bd0c2){return _0x432142(_0x2bd0c2);},'LGapJ':function(_0x8775d8,_0x3e9a8b){return _0x8775d8(_0x3e9a8b);}},_0x26ba0e=_0x2b4e9c[_0x268efe(0xe0)](join,_0x4d7f80,'ci',_0x4f27e6),_0x3de0e3=_0x2b4e9c['ukeVl'](join,_0x4d7f80,'local',_0x4f27e6),_0x248a75=join(_0x4d7f80,_0x4f27e6),_0x41024b=join(_0x4d7f80,_0x2b4e9c[_0x268efe(0xe2)]),_0x7c904b=_0x2b4e9c[_0x268efe(0x10d)](join,_0x4d7f80,'ci');if(_0x2b4e9c[_0x268efe(0x10c)](existsSync,_0x26ba0e))return _0x26ba0e;if(_0x2b4e9c['EaVcU'](existsSync,_0x3de0e3))return _0x3de0e3;if(_0x2b4e9c['EaVcU'](existsSync,_0x248a75)&&(_0x248a75!==_0x41024b&&_0x248a75!==_0x7c904b?!![]:_0x2b4e9c[_0x268efe(0xc5)](hasLegacyProfileFiles,_0x248a75)))return _0x248a75;return null;}export function getEnvDir(_0xe5b590,_0x42fd3d={}){const _0x5294de=_0x4f98,_0x3b5c05={'cTJFV':function(_0x285106,_0x1a9f9e,_0x687da8){return _0x285106(_0x1a9f9e,_0x687da8);},'McUgm':function(_0x1f6e7e,_0x29b107){return _0x1f6e7e(_0x29b107);},'zzHwk':function(_0x543ce9){return _0x543ce9();},'GhJVU':function(_0x8cc3ca,_0x10d6a8){return _0x8cc3ca!==_0x10d6a8;},'DRXhy':function(_0x1d0ab3,_0xb17345,_0x2e0d65){return _0x1d0ab3(_0xb17345,_0x2e0d65);},'PERaF':function(_0x1bf988,_0x344171,_0x224308){return _0x1bf988(_0x344171,_0x224308);}},_0x3d0c96=getRangerDir(),_0x407168=_0x3b5c05['cTJFV'](findEnvInRoot,_0xe5b590,_0x3d0c96);if(_0x407168){if(_0x42fd3d[_0x5294de(0x10f)]&&_0x3b5c05['McUgm'](isLegacyEnvPath,_0x407168))throw _0x3b5c05['cTJFV'](legacyWriteError,_0xe5b590,_0x407168);return _0x407168;}const _0x369ed1=_0x3b5c05[_0x5294de(0x119)](getRangerHomeDir);if(_0x3b5c05[_0x5294de(0xde)](_0x369ed1,_0x3d0c96)){const _0x532be2=_0x3b5c05[_0x5294de(0x13d)](findEnvInRoot,_0xe5b590,_0x369ed1);if(_0x532be2){if(_0x42fd3d[_0x5294de(0x10f)]&&_0x3b5c05['McUgm'](isLegacyEnvPath,_0x532be2))throw _0x3b5c05['PERaF'](legacyWriteError,_0xe5b590,_0x532be2);return _0x532be2;}}const _0x41e874=join(_0x369ed1,'local',_0xe5b590);if(_0x42fd3d['forWrite'])throw legacyWriteError(_0xe5b590,_0x41e874);return _0x41e874;}function isLegacyEnvPath(_0x2946e5){const _0x22cbe8=_0x4f98,_0x3d9b46={'LPFpF':function(_0xf3966b){return _0xf3966b();}},_0x4fe29e=getRangerDir(),_0x1bdc68=_0x3d9b46[_0x22cbe8(0xea)](getRangerHomeDir);for(const _0x4a1ced of new Set([_0x4fe29e,_0x1bdc68])){const _0x268662=_0x4a1ced['endsWith']('/')?_0x4a1ced:_0x4a1ced+'/';if(_0x2946e5===_0x4a1ced||_0x2946e5['startsWith'](_0x268662))return!![];}return![];}function legacyWriteError(_0x266280,_0x178ee3){const _0x47caf3=_0x4f98,_0x22c47c={'leFhX':function(_0x545a7c,_0x529022){return _0x545a7c+_0x529022;}};return new Error(_0x22c47c[_0x47caf3(0xfe)](_0x22c47c[_0x47caf3(0xfe)](_0x22c47c[_0x47caf3(0xfe)](_0x47caf3(0x125)+_0x266280+'\x22\x20to\x20legacy\x20path\x20'+_0x178ee3+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),_0x47caf3(0x107)));}export function findExistingEnv(_0x1efc44,_0x4eaa64){const _0x599ba4=_0x4f98,_0x39ed1f={'dZOyk':'legacy','VjPMO':_0x599ba4(0xdf),'ikwfx':function(_0x2749cf,_0x39804d,_0x2c73ba){return _0x2749cf(_0x39804d,_0x2c73ba);},'EYauh':function(_0x4a8b5a,_0x19687c){return _0x4a8b5a(_0x19687c);},'LyXaj':function(_0x5e3de6,_0x400cde){return _0x5e3de6===_0x400cde;}},_0x2fe412=_0x4eaa64?.['rangerDir'],_0x2c6bc7=_0x2fe412?[_0x2fe412]:[getRangerDir(),getRangerHomeDir()][_0x599ba4(0x102)]((_0x248382,_0xd5801b,_0x134151)=>_0x134151[_0x599ba4(0xf5)](_0x248382)===_0xd5801b),_0x19a6e1=_0x4eaa64?.['locations']??['ci','local',_0x39ed1f['dZOyk']];for(const _0x162e00 of _0x2c6bc7){const _0x235b29=join(_0x162e00,_0x39ed1f[_0x599ba4(0x11f)]),_0x15d844=_0x39ed1f['ikwfx'](join,_0x162e00,'ci'),_0x4fce9d=[{'location':'ci','path':join(_0x162e00,'ci',_0x1efc44)},{'location':_0x39ed1f['VjPMO'],'path':join(_0x162e00,_0x39ed1f[_0x599ba4(0x11f)],_0x1efc44)},{'location':_0x599ba4(0xc3),'path':join(_0x162e00,_0x1efc44)}];for(const _0x2a81f1 of _0x4fce9d){if(_0x19a6e1['includes'](_0x2a81f1[_0x599ba4(0xc4)])&&_0x39ed1f[_0x599ba4(0xcd)](existsSync,_0x2a81f1['path'])){if(_0x2a81f1[_0x599ba4(0xc4)]==='legacy'&&(_0x39ed1f[_0x599ba4(0xed)](_0x2a81f1['path'],_0x235b29)||_0x2a81f1[_0x599ba4(0x114)]===_0x15d844)&&!_0x39ed1f['EYauh'](hasLegacyProfileFiles,_0x2a81f1[_0x599ba4(0x114)]))continue;return{'path':_0x2a81f1['path'],'location':_0x2a81f1['location']};}}}return null;}function hasLegacyProfileFiles(_0x4679ec){const _0x13dbfe=_0x4f98,_0x573c7f={'xynbG':function(_0x5f255c,_0x14b051){return _0x5f255c(_0x14b051);},'cNPKq':function(_0x3beb42,_0x164a5c,_0x2b933d){return _0x3beb42(_0x164a5c,_0x2b933d);},'ixrhD':_0x13dbfe(0xcf),'IbZaV':_0x13dbfe(0xef),'QjDSq':function(_0x223d5e,_0x542bf6){return _0x223d5e(_0x542bf6);},'PeUWT':function(_0x256783,_0x3a549f,_0x9f10c0){return _0x256783(_0x3a549f,_0x9f10c0);}};return _0x573c7f['xynbG'](existsSync,_0x573c7f[_0x13dbfe(0xf7)](join,_0x4679ec,_0x573c7f[_0x13dbfe(0x116)]))||_0x573c7f['xynbG'](existsSync,join(_0x4679ec,_0x573c7f['IbZaV']))||_0x573c7f[_0x13dbfe(0xfa)](existsSync,_0x573c7f['PeUWT'](join,_0x4679ec,_0x13dbfe(0x135)));}export function isEnvCi(_0xc26f37){const _0x192899=_0x4f98,_0x3a7d4d={'HqEBI':function(_0x59a181,_0x2a2dec){return _0x59a181(_0x2a2dec);},'FmEPf':function(_0x5bbc38,_0x126041,_0x318a53,_0x31b957){return _0x5bbc38(_0x126041,_0x318a53,_0x31b957);},'cPCmu':function(_0x6e0d9d){return _0x6e0d9d();},'ZgjUl':function(_0x15cce6){return _0x15cce6();}};if(_0x3a7d4d[_0x192899(0x134)](existsSync,_0x3a7d4d['FmEPf'](join,getRangerDir(),'ci',_0xc26f37)))return!![];const _0x514bca=_0x3a7d4d['cPCmu'](getRangerHomeDir);if(_0x514bca!==_0x3a7d4d[_0x192899(0x118)](getRangerDir)&&_0x3a7d4d[_0x192899(0x134)](existsSync,_0x3a7d4d['FmEPf'](join,_0x514bca,'ci',_0xc26f37)))return!![];return![];}function _0x4f98(_0x53bf3f,_0x34ca5d){_0x53bf3f=_0x53bf3f-0xc2;const _0x456a2d=_0x456a();let _0x4f986e=_0x456a2d[_0x53bf3f];return _0x4f986e;}export async function cleanupTempFiles(_0x926b09){const _0x2c739d=_0x4f98,_0x995d6={'slDlP':function(_0x310d66,_0x146cc6){return _0x310d66!==_0x146cc6;},'cVtuu':_0x2c739d(0x123)},_0x5393f6=[_0x926b09[_0x2c739d(0x130)],_0x926b09['configPath']]['filter'](Boolean);await Promise['all'](_0x5393f6['map'](_0x16e2d1=>unlink(_0x16e2d1)[_0x2c739d(0xf0)](_0xea7daf=>{const _0x169c13=_0x2c739d;_0x995d6['slDlP'](_0xea7daf['code'],_0x995d6[_0x169c13(0x133)])&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x16e2d1+':',_0xea7daf['message']);})));}export function getSettingsPath(_0x2e0357){const _0x53df0d=_0x4f98,_0x5b0007={'SQWBg':function(_0x3c8b3c,_0x1c168,_0x21a27e){return _0x3c8b3c(_0x1c168,_0x21a27e);}};return _0x5b0007[_0x53df0d(0xe8)](join,getEnvDir(_0x2e0357),_0x53df0d(0xcf));}export async function loadSettings(_0x185291){const _0x55fb83=_0x4f98,_0x413928={'gzYYs':_0x55fb83(0x11d)},_0x2b9bfd=getSettingsPath(_0x185291);if(!existsSync(_0x2b9bfd))return{};try{const _0x456464=await readFile(_0x2b9bfd,_0x413928[_0x55fb83(0xe6)]);return JSON['parse'](_0x456464);}catch{return{};}}export async function saveSettings(_0x48cca6,_0x192b00){const _0x4d3614=_0x4f98,_0x2c8e00={'KNKcD':function(_0x5c6774,_0x495781){return _0x5c6774(_0x495781);}},_0x4e74de=_0x2c8e00[_0x4d3614(0x101)](getSettingsPath,_0x48cca6),_0x22d93c=dirname(_0x4e74de);!_0x2c8e00[_0x4d3614(0x101)](existsSync,_0x22d93c)&&await mkdir(_0x22d93c,{'recursive':!![]}),await writeFile(_0x4e74de,JSON['stringify'](_0x192b00,null,0x2));}export function resolveEnvVars(_0x3c843a){const _0x2589cf=_0x4f98,_0x1cd64d={'FQaxk':function(_0x48969e,_0x32674e){return _0x48969e===_0x32674e;}};if(typeof _0x3c843a==='string')return _0x3c843a[_0x2589cf(0xd5)](/\$\{(\w+)\}/g,(_0x215240,_0x2b8288)=>{const _0x44fcef=_0x2589cf,_0x4938df=process['env'][_0x2b8288];if(_0x1cd64d[_0x44fcef(0xd7)](_0x4938df,undefined))throw new Error(_0x44fcef(0xc8)+_0x2b8288+_0x44fcef(0x105));return _0x4938df;});if(Array[_0x2589cf(0xeb)](_0x3c843a))return _0x3c843a['map'](resolveEnvVars);if(_0x3c843a&&typeof _0x3c843a==='object')return Object['fromEntries'](Object[_0x2589cf(0x108)](_0x3c843a)['map'](([_0x322727,_0x281a6e])=>[_0x322727,resolveEnvVars(_0x281a6e)]));return _0x3c843a;}const isRecord=_0x8389e7=>typeof _0x8389e7==='object'&&_0x8389e7!==null&&!Array[_0x2efe12(0xeb)](_0x8389e7),asRecord=_0x5d8561=>isRecord(_0x5d8561)?_0x5d8561:undefined,mergeHeaders=(_0xed83f5,_0x492f0e)=>{const _0x1f2767={'ZBjmL':function(_0x16d8b7,_0x59bbe9){return _0x16d8b7??_0x59bbe9;}},_0x50901f={..._0xed83f5??{},..._0x1f2767['ZBjmL'](_0x492f0e,{})};return Object['keys'](_0x50901f)['length']?_0x50901f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x2efe12(0xd4),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];function _0x456a(){const _0x1623eb=['ixrhD','flIwp','ZgjUl','zzHwk','1609330rxhtGv','allow','LduLW','utf-8','WlSFc','VjPMO','906BrpIrY','now','iITNM','ENOENT','contextOptions','Refusing\x20to\x20write\x20profile\x20\x22','5fOpQwK','install','push','headers','playwright-cli','1359ihwuvc','tQQTr','setupHeader','ZcoFu','safeMode','tempAuthPath','IBIOA','--disable-setuid-sandbox','cVtuu','HqEBI','auth.json.enc','headless','18uTfoVs','message','IxeKT','nCuSr','clipboard-read','UtLPn','DRXhy','JDyfY','chromium','ujmpu','includes','setupHeaders','legacy','location','LGapJ','674799ITiiYT','Default','Environment\x20variable\x20','TBNBh','--no-sandbox','FkMdO','1566332xPjwOD','EYauh','browser','settings.json','object','RwhYd','4528447GxmHYs','12839563KPUiHr','--allow-running-insecure-content','replace','aLMIH','FQaxk','cdpEndpoint','vision','baseUrl','eKWse','launchOptions','.json','GhJVU','local','NbPRq','string','rYEzm','executablePath','HzhzC','stagehand','gzYYs','-cli','SQWBg','JdiSh','LPFpF','isArray','517392EtYOOl','LyXaj','args','auth.json','catch','Failed\x20to\x20decrypt\x20auth\x20state:\x20','storageState','QhUMq','XvwMk','indexOf','8zWpTaw','cNPKq','RkIDe','userAgent','QjDSq','hSKzE','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','GrwbO','leFhX','none','pdf','KNKcD','filter','clipboard-write','iWGdK','\x20is\x20not\x20set','length','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','entries','extraHTTPHeaders','wFhQS','tZpwY','XDNMV','rHIOK','tYYKy','forWrite','UoEHo','enoSZ','core','hxywE','path','AiTti'];_0x456a=function(){return _0x1623eb;};return _0x456a();}export function buildBrowserOptionsFromSettings(_0x23d04c,_0x34e748={}){const _0x35f233=_0x2efe12,_0xcba57a={'CmgpZ':function(_0x15b203,_0x775ed9){return _0x15b203(_0x775ed9);},'bVTup':'boolean','chDaI':function(_0x628a59,_0x32539b){return _0x628a59(_0x32539b);},'IpNhr':function(_0x4e542d,_0x3228f2){return _0x4e542d===_0x3228f2;},'UtLPn':function(_0x226a64,_0x456df3,_0x3c9514){return _0x226a64(_0x456df3,_0x3c9514);}},_0x3f4570=asRecord(_0x23d04c[_0x35f233(0xce)]),_0x3a2cc8={..._0xcba57a['CmgpZ'](asRecord,_0x3f4570?.[_0x35f233(0xdc)])??{}};typeof _0x34e748['headless']===_0xcba57a['bVTup']&&(_0x3a2cc8[_0x35f233(0x136)]=_0x34e748['headless']);if(_0x23d04c[_0x35f233(0x12f)]){const _0x106fb1=_0x3a2cc8['args']??[],_0x599f14=SAFE_MODE_ARGS[_0x35f233(0x102)](_0x143252=>!_0x106fb1[_0x35f233(0x141)](_0x143252));_0x3a2cc8[_0x35f233(0xee)]=[..._0x106fb1,..._0x599f14];}if(_0x23d04c['allowInsecureLocalhost']){const _0x3cc908=_0x3a2cc8[_0x35f233(0xee)]??[],_0x53067b=ALLOW_LOCALHOST_ARGS['filter'](_0xe86aeb=>!_0x3cc908['includes'](_0xe86aeb));_0x3a2cc8['args']=[..._0x3cc908,..._0x53067b];}const _0x137966={..._0xcba57a['chDaI'](asRecord,_0x3f4570?.['contextOptions'])??{}};_0x137966['ignoreHTTPSErrors']=!![];_0xcba57a['IpNhr'](typeof _0x23d04c['userAgent'],_0x35f233(0xe1))&&(_0x137966[_0x35f233(0xf9)]=_0x23d04c[_0x35f233(0xf9)]);const _0x5d4afa=_0xcba57a[_0x35f233(0x13c)](mergeHeaders,asRecord(_0x137966['extraHTTPHeaders']),_0xcba57a['CmgpZ'](asRecord,_0x23d04c[_0x35f233(0x129)]));return _0x5d4afa?_0x137966['extraHTTPHeaders']=_0x5d4afa:delete _0x137966['extraHTTPHeaders'],_0x34e748['storageStatePath']&&(_0x137966[_0x35f233(0xf2)]=_0x34e748['storageStatePath']),{'launchOptions':_0x3a2cc8,'contextOptions':_0x137966};}export async function resolveProfileStorageState(_0x3faf0e){const _0x4f3844=_0x2efe12,_0x394d30={'JDyfY':function(_0x51f0d8,_0x30c0bf){return _0x51f0d8(_0x30c0bf);}};return resolveLocalAuthPath(_0x394d30[_0x4f3844(0x13e)](getEnvDir,_0x3faf0e));}async function resolveLocalAuthPath(_0x55415d){const _0x4032b0=_0x2efe12,_0x1b14a9={'AiTti':function(_0x303d13,_0x1f5941,_0x3a35ed){return _0x303d13(_0x1f5941,_0x3a35ed);},'hmdlM':_0x4032b0(0xfc),'iWGdK':function(_0x4cb965,_0xf12445){return _0x4cb965(_0xf12445);},'UoEHo':function(_0x83217b,_0x5736ba,_0x46833f){return _0x83217b(_0x5736ba,_0x46833f);},'IulPd':function(_0x19dced){return _0x19dced();},'tMbXE':function(_0x29cd01,_0x29de28){return _0x29cd01(_0x29de28);}},_0x2f6594=_0x1b14a9[_0x4032b0(0x115)](join,_0x55415d,'auth.json.enc'),_0x912593=join(_0x55415d,_0x4032b0(0xef));if(existsSync(_0x2f6594))try{const _0x5bea6e=await getToken();if(!_0x5bea6e)throw new Error(_0x1b14a9['hmdlM']);const _0x5058d7=await _0x1b14a9[_0x4032b0(0x104)](readFile,_0x2f6594),_0x258d66=_0x1b14a9['AiTti'](decrypt,_0x5058d7,_0x5bea6e),_0x43808a=_0x1b14a9[_0x4032b0(0x110)](join,_0x1b14a9['IulPd'](tmpdir),'ranger-auth-'+Date[_0x4032b0(0x121)]()+'.json');return await _0x1b14a9[_0x4032b0(0x115)](writeFile,_0x43808a,_0x258d66),{'storageStatePath':_0x43808a,'tempAuthPath':_0x43808a};}catch(_0xc3007e){const _0x473732=_0xc3007e instanceof Error?_0xc3007e[_0x4032b0(0x138)]:_0x1b14a9[_0x4032b0(0x104)](String,_0xc3007e);throw new Error(_0x4032b0(0xf1)+_0x473732);}if(_0x1b14a9['tMbXE'](existsSync,_0x912593))return{'storageStatePath':_0x912593};return{};}export async function buildPlaywrightConfig(_0x365784,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x156300){const _0x3dc9f6=_0x2efe12,_0x387ba5={'GrwbO':function(_0x218c0f,_0x67cf82,_0x1437fd,_0x569c6e,_0x37602a,_0x4ee74e,_0x275a12){return _0x218c0f(_0x67cf82,_0x1437fd,_0x569c6e,_0x37602a,_0x4ee74e,_0x275a12);},'jdsSu':function(_0x2427c8,_0x460e20){return _0x2427c8(_0x460e20);},'PVAuc':_0x3dc9f6(0xe5)};if(_0x156300)return _0x387ba5[_0x3dc9f6(0xfd)](buildPlaywrightConfigCore,_0x365784,_0x156300,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x3dc9f6(0xe5));const {storageStatePath:_0x1db940,tempAuthPath:_0x36a65f}=await _0x387ba5['jdsSu'](resolveLocalAuthPath,getEnvDir(_0x2f6c9d));try{const _0x4f4a2b=await buildPlaywrightConfigCore(_0x365784,_0x1db940,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x387ba5['PVAuc']);return{..._0x4f4a2b,'tempAuthPath':_0x36a65f};}catch(_0x358c44){_0x36a65f&&await unlink(_0x36a65f)[_0x3dc9f6(0xf0)](()=>{});throw _0x358c44;}}export async function buildPlaywrightConfigCore(_0x4b8cab,_0x29c0e4,_0x437097,_0xa45710,_0xdcbc92,_0x18b194=_0x2efe12(0xe5)){const _0x4dcf29=_0x2efe12,_0x1d6913={'LduLW':function(_0x1dd8f7,_0x247864){return _0x1dd8f7===_0x247864;},'frnpK':'--disable-setuid-sandbox','HzhzC':'clipboard-write','uUqUC':function(_0x2851c1,_0x5b549c){return _0x2851c1(_0x5b549c);},'sdhFj':_0x4dcf29(0x13f),'hSKzE':'playwright-cli','TBNBh':_0x4dcf29(0xff),'prviW':_0x4dcf29(0x100),'QIZNC':_0x4dcf29(0x11b),'tZpwY':function(_0x4a1742,_0x3f68b7){return _0x4a1742===_0x3f68b7;},'iITNM':function(_0x2f80cc,_0x4e3a37,_0xbd84a0){return _0x2f80cc(_0x4e3a37,_0xbd84a0);},'Ygcbh':function(_0x2114ab){return _0x2114ab();},'dUmow':function(_0x435af3,_0x21ef0a,_0x1b92c7){return _0x435af3(_0x21ef0a,_0x1b92c7);}},_0x50a131=_0xa45710||randomUUID(),_0xa47f94=join(getRangerDir(),'sessions',_0x50a131),_0x111f3c=_0x1d6913['uUqUC'](Boolean,_0x4b8cab[_0x4dcf29(0xd8)]),_0x58effe=_0x111f3c?{'browserName':_0x1d6913['sdhFj'],'cdpEndpoint':_0x4b8cab['cdpEndpoint']}:((()=>{const _0x35db36=_0x4dcf29,{launchOptions:_0x20331c,contextOptions:_0x4e57ae}=buildBrowserOptionsFromSettings(_0x4b8cab,{'headless':_0xdcbc92?![]:_0x4b8cab['headless']??!![],'storageStatePath':_0x29c0e4});if(_0x1d6913['LduLW'](process['getuid']?.(),0x0)){const _0x35a998=['--no-sandbox',_0x1d6913['frnpK']],_0x249db7=_0x20331c['args']??[],_0x4dc7a2=_0x35a998[_0x35db36(0x102)](_0x4c2ec8=>!_0x249db7['includes'](_0x4c2ec8));_0x20331c['args']=[..._0x249db7,..._0x4dc7a2];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x20331c,'contextOptions':{..._0x4e57ae,'permissions':[_0x35db36(0x13b),_0x1d6913[_0x35db36(0xe4)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x1900b7=_0x18b194===_0x1d6913['hSKzE']?{'browser':_0x58effe,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xa47f94,'outputMode':'file','codegen':_0x1d6913[_0x4dcf29(0xc9)]}:{'name':_0x437097,'browser':_0x58effe,'capabilities':[_0x4dcf29(0x112),'tabs',_0x4dcf29(0x127),_0x1d6913['prviW'],_0x4dcf29(0xd9)],'imageResponses':_0x1d6913['QIZNC'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xa47f94};if(!_0x111f3c){const _0x2a7da0=_0x1900b7[_0x4dcf29(0xce)],_0x5926ac=_0x2a7da0[_0x4dcf29(0x124)];if(_0x1d6913[_0x4dcf29(0x11c)](_0x5926ac[_0x4dcf29(0xf9)],undefined))delete _0x5926ac[_0x4dcf29(0xf9)];if(_0x1d6913[_0x4dcf29(0x10b)](_0x5926ac[_0x4dcf29(0xf2)],undefined))delete _0x5926ac[_0x4dcf29(0xf2)];}const _0x42853a=_0x1d6913['iITNM'](join,_0x1d6913['Ygcbh'](tmpdir),'ranger-config');!existsSync(_0x42853a)&&await _0x1d6913['dUmow'](mkdir,_0x42853a,{'recursive':!![]});const _0x1d1740=_0x18b194===_0x1d6913[_0x4dcf29(0xfb)]?_0x4dcf29(0xe7):'',_0x4cf92c=join(_0x42853a,_0x437097+'-'+Date[_0x4dcf29(0x121)]()+_0x1d1740+_0x4dcf29(0xdd));return await _0x1d6913[_0x4dcf29(0x122)](writeFile,_0x4cf92c,JSON['stringify'](_0x1900b7,null,0x2)),{'configPath':_0x4cf92c,'storageStatePath':_0x29c0e4};}export async function buildPlaywrightCliConfig(_0x5ab2d1,_0x1706c3,_0x5c7667,_0x5922b1,_0x54ccf6){const _0x26e0e9=_0x2efe12,_0x35789e={'JdiSh':function(_0x647fa2,_0x35c9bf,_0x675c57,_0xa4fd54,_0x3c35b5,_0x2c9093,_0x441f44){return _0x647fa2(_0x35c9bf,_0x675c57,_0xa4fd54,_0x3c35b5,_0x2c9093,_0x441f44);},'ZcoFu':function(_0x470b69,_0x3e35c3){return _0x470b69(_0x3e35c3);}};if(_0x54ccf6)return _0x35789e[_0x26e0e9(0xe9)](buildPlaywrightConfigCore,_0x5ab2d1,_0x54ccf6,_0x1706c3,_0x5c7667,_0x5922b1,_0x26e0e9(0x12a));const {storageStatePath:_0x563358,tempAuthPath:_0x329e90}=await resolveLocalAuthPath(_0x35789e[_0x26e0e9(0x12e)](getEnvDir,_0x1706c3));try{const _0x881362=await buildPlaywrightConfigCore(_0x5ab2d1,_0x563358,_0x1706c3,_0x5c7667,_0x5922b1,_0x26e0e9(0x12a));return{..._0x881362,'tempAuthPath':_0x329e90};}catch(_0x45ff16){_0x329e90&&await unlink(_0x329e90)[_0x26e0e9(0xf0)](()=>{});throw _0x45ff16;}}export async function buildRangerwrightCliConfig(_0x228678,_0x2e1de2,_0x3ccbd6,_0x43e9d4,_0x17821d){const _0x25d139=_0x2efe12,_0x1c79d9={'RkIDe':function(_0x267a78,_0x468417,_0x442e99){return _0x267a78(_0x468417,_0x442e99);},'eifzM':function(_0x55dcff,_0x4ba2cd){return _0x55dcff===_0x4ba2cd;},'cwdSy':_0x25d139(0x132),'QhUMq':function(_0xc6be8e){return _0xc6be8e();},'wFhQS':_0x25d139(0x13f),'aLMIH':function(_0x441fa7,_0x1cc20f){return _0x441fa7===_0x1cc20f;},'WlSFc':function(_0x500577,_0x99679f,_0x5e4c12){return _0x500577(_0x99679f,_0x5e4c12);},'enoSZ':function(_0x455eb0,_0x5b71ae){return _0x455eb0(_0x5b71ae);}},{storageStatePath:_0x1679ac,tempAuthPath:_0xf8f932}=_0x17821d?{'storageStatePath':_0x17821d,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x2e1de2)),_0xa6257=_0x3ccbd6||_0x1c79d9[_0x25d139(0xf3)](randomUUID),_0x5070aa=join(getRangerDir(),'sessions',_0xa6257),_0x38abaf=Boolean(_0x228678[_0x25d139(0xd8)]),_0x286e20=_0x38abaf?{'browserName':_0x1c79d9[_0x25d139(0x10a)],'cdpEndpoint':_0x228678['cdpEndpoint']}:((()=>{const _0xdc2191=_0x25d139,{launchOptions:_0xec42f8,contextOptions:_0xea3dc4}=_0x1c79d9['RkIDe'](buildBrowserOptionsFromSettings,_0x228678,{'headless':_0x43e9d4?![]:_0x228678['headless']??!![],'storageStatePath':_0x1679ac});if(_0x1c79d9['eifzM'](process['getuid']?.(),0x0)){const _0x340bd8=[_0xdc2191(0xca),_0x1c79d9['cwdSy']],_0x64aa1f=_0xec42f8[_0xdc2191(0xee)]??[],_0xdf2ab4=_0x340bd8['filter'](_0x2f9a80=>!_0x64aa1f[_0xdc2191(0x141)](_0x2f9a80));_0xec42f8[_0xdc2191(0xee)]=[..._0x64aa1f,..._0xdf2ab4];}return{'browserName':'chromium','launchOptions':_0xec42f8,'contextOptions':{..._0xea3dc4,'permissions':[_0xdc2191(0x13b),_0xdc2191(0x103)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x38abaf){const _0x543287=_0x286e20[_0x25d139(0x124)];if(_0x543287){if(_0x1c79d9[_0x25d139(0xd6)](_0x543287['userAgent'],undefined))delete _0x543287[_0x25d139(0xf9)];if(_0x543287['storageState']===undefined)delete _0x543287[_0x25d139(0xf2)];}}const _0x55f378={'browser':_0x286e20,'outputDir':_0x5070aa,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x43610b;try{const _0x10a669=join(tmpdir(),'ranger-config');!existsSync(_0x10a669)&&await _0x1c79d9[_0x25d139(0xf8)](mkdir,_0x10a669,{'recursive':!![]}),_0x43610b=join(_0x10a669,_0x2e1de2+'-'+Date['now']()+'-rangerwright.json'),await _0x1c79d9[_0x25d139(0x11e)](writeFile,_0x43610b,JSON['stringify'](_0x55f378,null,0x2));}catch(_0x4a0950){_0xf8f932&&await _0x1c79d9[_0x25d139(0x111)](unlink,_0xf8f932)[_0x25d139(0xf0)](()=>{});throw _0x4a0950;}return{'configPath':_0x43610b,'storageStatePath':_0x1679ac,'tempAuthPath':_0xf8f932,'outputDir':_0x5070aa};}export async function buildNovaActCliConfig(_0x244995,_0x50f2d8,_0x32a907,_0x51fd5f,_0x40e4fa){const _0x448094=_0x2efe12,_0xeb34bf={'gKTUk':function(_0x3bf451){return _0x3bf451();},'flIwp':function(_0x27b4d2,_0x14ce4b,_0x442c84,_0x5c3d6c){return _0x27b4d2(_0x14ce4b,_0x442c84,_0x5c3d6c);},'gUpfb':'sessions','danKp':function(_0x4676fa,_0x4a9bef){return _0x4676fa===_0x4a9bef;},'tQQTr':_0x448094(0xe1),'ILkDd':function(_0xbaf075,_0x193da2){return _0xbaf075(_0x193da2);},'FkMdO':function(_0x2ba6b2,_0x311f90){return _0x2ba6b2===_0x311f90;},'IBIOA':function(_0x21d558,_0x1cd6b0){return _0x21d558(_0x1cd6b0);}},{storageStatePath:_0x48cf87,tempAuthPath:_0x3c408a}=_0x40e4fa?{'storageStatePath':_0x40e4fa,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x50f2d8)),_0x590b1b=_0x32a907||_0xeb34bf['gKTUk'](randomUUID),_0x380317=_0xeb34bf[_0x448094(0x117)](join,_0xeb34bf['gKTUk'](getRangerDir),_0xeb34bf['gUpfb'],_0x590b1b),_0x3316c4=join(_0x380317,'nova-user-data'),_0x180e0=_0x48cf87?join(_0x3316c4,_0x448094(0xc7)):undefined,{launchOptions:_0x306c94,contextOptions:_0x32719c}=buildBrowserOptionsFromSettings(_0x244995,{'headless':_0x51fd5f?![]:_0x244995['headless']??!![],'storageStatePath':_0x48cf87});if(_0xeb34bf['danKp'](process['getuid']?.(),0x0)){const _0x521453=['--no-sandbox','--disable-setuid-sandbox'],_0xca97b5=_0x306c94[_0x448094(0xee)]??[],_0xd9eff9=_0x521453['filter'](_0x512318=>!_0xca97b5['includes'](_0x512318));_0x306c94['args']=[..._0xca97b5,..._0xd9eff9];}const _0x501d62=typeof _0x306c94[_0x448094(0xe3)]===_0xeb34bf[_0x448094(0x12c)]?_0x306c94['executablePath']:_0x48cf87?chromium['executablePath']():undefined;return{'storageStatePath':_0x48cf87,'tempAuthPath':_0x3c408a,'baseUrl':_0x244995[_0x448094(0xda)],'headless':_0xeb34bf['ILkDd'](Boolean,_0x306c94[_0x448094(0x136)]),'userDataDir':_0x3316c4,'browserProfilePath':_0x180e0,'executablePath':_0x501d62,'launchArgs':Array[_0x448094(0xeb)](_0x306c94['args'])?_0x306c94['args']['filter'](_0x5108e1=>typeof _0x5108e1==='string'):[],'userAgent':_0xeb34bf[_0x448094(0xcb)](typeof _0x32719c['userAgent'],'string')?_0x32719c['userAgent']:undefined,'extraHTTPHeaders':_0x32719c[_0x448094(0x109)],'allowInsecureLocalhost':Boolean(_0x244995['allowInsecureLocalhost']),'safeMode':Boolean(_0x244995['safeMode']),'cdpEndpoint':_0x244995[_0x448094(0xd8)],'isCdpMode':_0xeb34bf[_0x448094(0x131)](Boolean,_0x244995[_0x448094(0xd8)])};}export function getNestedValue(_0x3740ac,_0x2d64e6){const _0x230aeb=_0x2efe12,_0x27c812={'IxeKT':_0x230aeb(0xd0)},_0x38dddb=parseKeyPath(_0x2d64e6);let _0x4ad453=_0x3740ac;for(const _0x24c6cb of _0x38dddb){if(_0x4ad453===null||_0x4ad453===undefined||typeof _0x4ad453!==_0x27c812[_0x230aeb(0x139)])return undefined;_0x4ad453=_0x4ad453[_0x24c6cb];}return _0x4ad453;}export function setNestedValue(_0x376f59,_0x2dada0,_0x628804){const _0x303173=_0x2efe12,_0xc50cea={'HANAJ':function(_0x30270a,_0x3ba5d1){return _0x30270a-_0x3ba5d1;},'RwhYd':function(_0x21d9df,_0x71506f){return _0x21d9df in _0x71506f;},'wAojq':function(_0x112826,_0x427502){return _0x112826!==_0x427502;}},_0x42a068=parseKeyPath(_0x2dada0);let _0x51a4a6=_0x376f59;for(let _0x4ab765=0x0;_0x4ab765<_0xc50cea['HANAJ'](_0x42a068[_0x303173(0x106)],0x1);_0x4ab765++){const _0x4dba43=_0x42a068[_0x4ab765];(!_0xc50cea[_0x303173(0xd1)](_0x4dba43,_0x51a4a6)||_0xc50cea['wAojq'](typeof _0x51a4a6[_0x4dba43],'object'))&&(_0x51a4a6[_0x4dba43]={}),_0x51a4a6=_0x51a4a6[_0x4dba43];}_0x51a4a6[_0x42a068[_0x42a068['length']-0x1]]=_0x628804;}export function deleteNestedValue(_0x5f2727,_0x1e470d){const _0xa5dcd1=_0x2efe12,_0x1ed13b={'eKWse':function(_0x1dc368,_0x838f4e){return _0x1dc368(_0x838f4e);},'DWEVU':function(_0x3d2ce3,_0x22eee3){return _0x3d2ce3-_0x22eee3;},'sRmEv':function(_0x4c823f,_0x2787d4){return _0x4c823f===_0x2787d4;},'hxywE':_0xa5dcd1(0xd0),'tYYKy':function(_0x113de0,_0x35c170){return _0x113de0!==_0x35c170;}},_0x4fa44e=_0x1ed13b[_0xa5dcd1(0xdb)](parseKeyPath,_0x1e470d);let _0x104dd5=_0x5f2727;for(let _0x1246fc=0x0;_0x1246fc<_0x1ed13b['DWEVU'](_0x4fa44e[_0xa5dcd1(0x106)],0x1);_0x1246fc++){if(_0x1ed13b['sRmEv'](_0x104dd5,null)||_0x104dd5===undefined||typeof _0x104dd5!==_0x1ed13b['hxywE'])return![];_0x104dd5=_0x104dd5[_0x4fa44e[_0x1246fc]];}if(_0x104dd5===null||_0x104dd5===undefined||_0x1ed13b[_0xa5dcd1(0x10e)](typeof _0x104dd5,_0x1ed13b[_0xa5dcd1(0x113)]))return![];const _0x25a78d=_0x4fa44e[_0x4fa44e[_0xa5dcd1(0x106)]-0x1];if(_0x25a78d in _0x104dd5)return delete _0x104dd5[_0x25a78d],!![];return![];}function parseKeyPath(_0x4c8bf4){const _0x429f3a=_0x2efe12,_0x2c4b5a={'TJnRy':function(_0x151cf4,_0x5a41df){return _0x151cf4===_0x5a41df;},'nCuSr':'header','ujmpu':'headers','jupKg':_0x429f3a(0xc2)},_0x2ae4c7=_0x4c8bf4['split']('.');return _0x2c4b5a['TJnRy'](_0x2ae4c7[0x0],_0x2c4b5a[_0x429f3a(0x13a)])&&(_0x2ae4c7[0x0]=_0x2c4b5a[_0x429f3a(0x140)]),_0x2ae4c7[0x0]===_0x429f3a(0x12d)&&(_0x2ae4c7[0x0]=_0x2c4b5a['jupKg']),_0x2ae4c7;}export function formatSettings(_0x30287f,_0x1b3ed7=0x0){const _0x5334ef=_0x2efe12,_0x2a538b={'XvwMk':function(_0xb1f33f,_0x4aced6){return _0xb1f33f===_0x4aced6;},'mOeNq':'object'},_0x1ac219=[],_0x1ff680='\x20\x20'['repeat'](_0x1b3ed7);for(const [_0x3318b1,_0x4e2aad]of Object[_0x5334ef(0x108)](_0x30287f)){if(_0x2a538b[_0x5334ef(0xf4)](_0x4e2aad,undefined))continue;if(typeof _0x4e2aad===_0x2a538b['mOeNq']&&_0x4e2aad!==null){_0x1ac219['push'](''+_0x1ff680+_0x3318b1+':');for(const [_0x301574,_0x471abd]of Object[_0x5334ef(0x108)](_0x4e2aad)){_0x1ac219['push'](_0x1ff680+'\x20\x20'+_0x301574+':\x20'+_0x471abd);}}else _0x1ac219[_0x5334ef(0x128)](''+_0x1ff680+_0x3318b1+':\x20'+_0x4e2aad);}return _0x1ac219['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b7f0c,_0x5354bf){const _0x3b5960=_0x2c58,_0x2b0cbe=_0x3b7f0c();while(!![]){try{const _0x3a99e1=-parseInt(_0x3b5960(0x12f))/0x1+-parseInt(_0x3b5960(0x13c))/0x2*(-parseInt(_0x3b5960(0x133))/0x3)+parseInt(_0x3b5960(0x131))/0x4+parseInt(_0x3b5960(0x138))/0x5*(parseInt(_0x3b5960(0x132))/0x6)+parseInt(_0x3b5960(0x139))/0x7+parseInt(_0x3b5960(0x130))/0x8*(parseInt(_0x3b5960(0x137))/0x9)+-parseInt(_0x3b5960(0x135))/0xa*(parseInt(_0x3b5960(0x13a))/0xb);if(_0x3a99e1===_0x5354bf)break;else _0x2b0cbe['push'](_0x2b0cbe['shift']());}catch(_0x39907c){_0x2b0cbe['push'](_0x2b0cbe['shift']());}}}(_0x41e2,0x340b8));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0x2c58(_0x54d6b6,_0x498968){_0x54d6b6=_0x54d6b6-0x12f;const _0x41e205=_0x41e2();let _0x2c586a=_0x41e205[_0x54d6b6];return _0x2c586a;}export function readSkillContent(_0x594d6d){const _0x56fae7=_0x2c58,_0x74879d={'iIcLl':'skills','MRMKe':function(_0x1578bb,_0x13feb4,_0x2a4c6d){return _0x1578bb(_0x13feb4,_0x2a4c6d);},'GMdOW':function(_0x33b88c,_0x2387a8,_0x2f9757){return _0x33b88c(_0x2387a8,_0x2f9757);},'ebrdS':_0x56fae7(0x134)},_0x51545d=join(__dirname,'..','..',_0x74879d['iIcLl']),_0x15ecb4=_0x74879d[_0x56fae7(0x136)](join,_0x51545d,_0x594d6d);try{return _0x74879d['GMdOW'](readFileSync,_0x15ecb4,_0x74879d['ebrdS']);}catch{return'';}}export function getRangerSkillContent(){const _0xb9e7f4=_0x2c58,_0x38184d={'AUAeI':'ranger/SKILL.md'};return readSkillContent(_0x38184d[_0xb9e7f4(0x13b)]);}function _0x41e2(){const _0x5f9cc1=['7396710Bqylwm','MRMKe','3501972VCZUyx','185yYRTMO','2303301Zgnjjc','11gikcrD','AUAeI','8gNklfi','318045jbhGYw','8ErBoXs','747176UKFmvi','19074SZgDpo','186243fcAPgS','utf-8'];_0x41e2=function(){return _0x5f9cc1;};return _0x41e2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x2e17(){const _0x40046c=['log','3481030aDbcSe','ranger','trim','utf-8','match','waqBO','1133014pvDOzk','SKILL.md','.md','5rMFFdP','1560392WEphOA','633712nDOVsR','dAxZJ','2417484KrOkdJ','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','YEIKV','join','push','8643330vSIhFX','project','e2e-test-recommender','AVaJg','isDirectory','qiPgZ','\x20\x20Location:\x20','\x20\x20Files:\x20','7xsTjeZ','10pjYUGZ','GuIEM','FnZOq','\x20\x20Removed\x20deprecated\x20skill:\x20','bug-bash','EUaAZ','clkzM','VuuYp','endsWith','NgXMI','eMUzQ','12466053ylBZQP','catch','feature-tracker','wWQEg','xYUBn'];_0x2e17=function(){return _0x40046c;};return _0x2e17();}const _0x404621=_0x3bdc;(function(_0x36d1fb,_0x31a415){const _0x56a48a=_0x3bdc,_0x4fad58=_0x36d1fb();while(!![]){try{const _0x51eb8c=parseInt(_0x56a48a(0x110))/0x1+-parseInt(_0x56a48a(0x10a))/0x2+-parseInt(_0x56a48a(0x117))/0x3+parseInt(_0x56a48a(0x114))/0x4*(-parseInt(_0x56a48a(0x113))/0x5)+parseInt(_0x56a48a(0x11c))/0x6+parseInt(_0x56a48a(0x124))/0x7*(-parseInt(_0x56a48a(0x115))/0x8)+-parseInt(_0x56a48a(0x104))/0x9*(-parseInt(_0x56a48a(0x125))/0xa);if(_0x51eb8c===_0x31a415)break;else _0x4fad58['push'](_0x4fad58['shift']());}catch(_0x1d0f95){_0x4fad58['push'](_0x4fad58['shift']());}}}(_0x2e17,0xe63b7));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 _0x3bdc(_0x33cbe8,_0x2736de){_0x33cbe8=_0x33cbe8-0x104;const _0x2e1779=_0x2e17();let _0x3bdc6e=_0x2e1779[_0x33cbe8];return _0x3bdc6e;}import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x404621(0x10b)];export const DEPRECATED_SKILLS=[_0x404621(0x11e),_0x404621(0x129),_0x404621(0x106)];export async function installSkill(_0x4fcaec,_0x414ff0={}){const _0xcd5b=_0x404621,_0x384a2a={'wWQEg':_0xcd5b(0x11d),'qiPgZ':'claude','clkzM':function(_0x3453bc){return _0x3453bc();},'EUaAZ':function(_0x3d8c78,_0xa6f8d6){return _0x3d8c78(_0xa6f8d6);},'gbRUh':function(_0x16ded0,_0x2b244f){return _0x16ded0(_0x2b244f);},'YEIKV':function(_0x3580fb,_0x1d10b2){return _0x3580fb&&_0x1d10b2;},'VuuYp':function(_0x420584,_0x7a3bc6){return _0x420584===_0x7a3bc6;},'uONsb':function(_0x453749,_0x3d6280,_0x5a2d90){return _0x453749(_0x3d6280,_0x5a2d90);},'xYUBn':function(_0x5e54a6,_0x23dfe2,_0x5f1db0){return _0x5e54a6(_0x23dfe2,_0x5f1db0);},'lKkUT':_0xcd5b(0x111),'AVaJg':'utf-8','NgXMI':function(_0x144bb1,_0x41d374,_0x58e12d,_0x46e6c4){return _0x144bb1(_0x41d374,_0x58e12d,_0x46e6c4);}},{level:level=_0x384a2a[_0xcd5b(0x107)],cliVersion:_0x1b3a8a,platform:platform=_0x384a2a[_0xcd5b(0x121)]}=_0x414ff0,_0x73e8de=_0x384a2a[_0xcd5b(0x12b)](getSourceSkillsDir),_0x3d40ee=join(_0x73e8de,_0x4fcaec),_0x5e06fc=join(_0x73e8de,_0x4fcaec+'.md'),_0xb3603a=existsSync(_0x3d40ee)&&_0x384a2a[_0xcd5b(0x12a)](statSync,_0x3d40ee)[_0xcd5b(0x120)]()&&_0x384a2a['EUaAZ'](existsSync,join(_0x3d40ee,'SKILL.md')),_0x290b69=_0x384a2a['gbRUh'](existsSync,_0x5e06fc);if(_0x384a2a[_0xcd5b(0x119)](!_0xb3603a,!_0x290b69))return console['warn']('\x20\x20Skill\x20not\x20found:\x20'+_0x4fcaec),![];const _0x447ec8=_0x384a2a[_0xcd5b(0x12c)](platform,'opencode')?_0x384a2a['EUaAZ'](getOpencodeSkillsDir,level):getSkillsDir(level),_0x5d919d=join(_0x447ec8,_0x4fcaec);await mkdir(_0x5d919d,{'recursive':!![]});let _0x5a9a3d,_0x360792=[];if(_0xb3603a){const _0x38383f=await readdir(_0x3d40ee),_0xc583f9=_0x38383f['filter'](_0x1b7611=>_0x1b7611[_0xcd5b(0x12d)](_0xcd5b(0x112)));for(const _0x23e0ba of _0xc583f9){const _0x3480cf=_0x384a2a['uONsb'](join,_0x3d40ee,_0x23e0ba),_0x3d320c=_0x384a2a['xYUBn'](join,_0x5d919d,_0x23e0ba);await copyFile(_0x3480cf,_0x3d320c),_0x360792[_0xcd5b(0x11b)](_0x23e0ba);}_0x5a9a3d=await _0x384a2a[_0xcd5b(0x108)](readFile,_0x384a2a[_0xcd5b(0x108)](join,_0x3d40ee,_0x384a2a['lKkUT']),_0x384a2a[_0xcd5b(0x11f)]);}else{_0x5a9a3d=await _0x384a2a['uONsb'](readFile,_0x5e06fc,_0xcd5b(0x10d));const _0x5b2939=join(_0x5d919d,'SKILL.md');await _0x384a2a['NgXMI'](writeFile,_0x5b2939,_0x5a9a3d,_0xcd5b(0x10d)),_0x360792['push'](_0xcd5b(0x111));}const {name:_0x5ba2cf}=parseFrontmatter(_0x5a9a3d);return console[_0xcd5b(0x109)]('\x20\x20Installed\x20skill:\x20'+_0x5ba2cf),console['log'](_0xcd5b(0x122)+_0x5d919d),_0x360792['length']>0x1&&console[_0xcd5b(0x109)](_0xcd5b(0x123)+_0x360792[_0xcd5b(0x11a)](',\x20')),_0x384a2a[_0xcd5b(0x12e)](logLocalAgentInstallation,_0x4fcaec,{'skillDisplayName':_0x5ba2cf,'installLevel':level},_0x1b3a8a)[_0xcd5b(0x105)](()=>{}),!![];}function getSourceSkillsDir(){const _0x1443b9=_0x404621,_0x2fa2ea={'FnZOq':'skills','dAxZJ':function(_0x103a67,_0x33b589,_0x13cfd6,_0x14a4c0,_0x410554,_0x2266a4){return _0x103a67(_0x33b589,_0x13cfd6,_0x14a4c0,_0x410554,_0x2266a4);},'GuIEM':function(_0x2b8d6f,_0x164a91){return _0x2b8d6f(_0x164a91);}},_0x1a430a=[join(__dirname,'..','..',_0x2fa2ea['FnZOq']),_0x2fa2ea[_0x1443b9(0x116)](join,__dirname,'..','..','..',_0x2fa2ea[_0x1443b9(0x127)])];for(const _0xae88f9 of _0x1a430a){if(_0x2fa2ea[_0x1443b9(0x126)](existsSync,_0xae88f9))return _0xae88f9;}return _0x1a430a[0x0];}function parseFrontmatter(_0x3c9e4d){const _0x86603d=_0x404621,_0x295806={'eMUzQ':'Invalid\x20skill\x20frontmatter'},_0x502523=_0x3c9e4d['match'](/^---\n([\s\S]+?)\n---/);if(!_0x502523)throw new Error(_0x295806[_0x86603d(0x12f)]);const _0x104a36=_0x502523[0x1],_0x4ba075=_0x104a36[_0x86603d(0x10e)](/name:\s*(.+)/),_0x5a54f4=_0x104a36[_0x86603d(0x10e)](/description:\s*"?(.+?)"?\n/);return{'name':_0x4ba075?.[0x1][_0x86603d(0x10c)]()||'','description':_0x5a54f4?.[0x1][_0x86603d(0x10c)]()||''};}export async function removeSkill(_0x39e2b1,_0x290996){const _0x5d319f=_0x404621,_0x268dec={'waqBO':function(_0x4e7a48,_0x5cdba6,_0x2eddf7){return _0x4e7a48(_0x5cdba6,_0x2eddf7);}},_0x1ca1ee=getSkillsDir(_0x290996),_0x467308=join(_0x1ca1ee,_0x39e2b1);if(!existsSync(_0x467308))return![];try{return await _0x268dec[_0x5d319f(0x10f)](rm,_0x467308,{'recursive':!![]}),console[_0x5d319f(0x109)](_0x5d319f(0x128)+_0x39e2b1),!![];}catch{return console['warn'](_0x5d319f(0x118)+_0x39e2b1),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x425631=_0x8098;(function(_0x16abbb,_0x567257){const _0x2507c1=_0x8098,_0x38a2ff=_0x16abbb();while(!![]){try{const _0x5194cf=parseInt(_0x2507c1(0x1cd))/0x1+-parseInt(_0x2507c1(0x1bb))/0x2*(-parseInt(_0x2507c1(0x1bf))/0x3)+-parseInt(_0x2507c1(0x1eb))/0x4*(parseInt(_0x2507c1(0x1f3))/0x5)+parseInt(_0x2507c1(0x1ee))/0x6+parseInt(_0x2507c1(0x1ca))/0x7*(parseInt(_0x2507c1(0x1e1))/0x8)+-parseInt(_0x2507c1(0x1d4))/0x9*(parseInt(_0x2507c1(0x1df))/0xa)+parseInt(_0x2507c1(0x1b9))/0xb;if(_0x5194cf===_0x567257)break;else _0x38a2ff['push'](_0x38a2ff['shift']());}catch(_0x39ed2f){_0x38a2ff['push'](_0x38a2ff['shift']());}}}(_0x495d,0x902ac));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(_0x5f1922,_0x12f051){const _0x2ad3e9=_0x8098,_0x320d39={'IgZSz':function(_0x31466a,_0x37a5bd){return _0x31466a<=_0x37a5bd;},'UxNsZ':function(_0x118bed,_0x407ce3){return _0x118bed&_0x407ce3;},'LBHgt':function(_0x1a3133,_0x1a0ca2){return _0x1a3133+_0x1a0ca2;},'ZxZnC':function(_0x4670e7,_0x2b6ef1){return _0x4670e7-_0x2b6ef1;},'haRwT':function(_0xc1b2a4,_0x5cbf25){return _0xc1b2a4<_0x5cbf25;}};if(_0x12f051>=_0x5f1922['length'])return[0x0,0x0];const _0x4846bf=_0x5f1922[_0x12f051];let _0x36d913=0x1,_0x3e49d2=0x80;while(_0x320d39['IgZSz'](_0x36d913,0x8)&&!_0x320d39['UxNsZ'](_0x4846bf,_0x3e49d2)){_0x36d913++,_0x3e49d2>>=0x1;}if(_0x320d39['LBHgt'](_0x12f051,_0x36d913)>_0x5f1922[_0x2ad3e9(0x1ff)])return[0x0,0x0];let _0x50e929=_0x4846bf&_0x320d39['ZxZnC'](_0x3e49d2,0x1);for(let _0x4db04b=0x1;_0x320d39[_0x2ad3e9(0x201)](_0x4db04b,_0x36d913);_0x4db04b++){_0x50e929=_0x50e929*0x100+_0x5f1922[_0x12f051+_0x4db04b];}return[_0x50e929,_0x36d913];}function readId(_0x265184,_0x12eca8){const _0x4b9f02=_0x8098,_0x50f668={'gKORm':function(_0x56e3b8,_0x2c067a){return _0x56e3b8>=_0x2c067a;},'Igwia':function(_0x5e9796,_0x10623a){return _0x5e9796<_0x10623a;},'Hwjqj':function(_0xa020c3,_0xd5c1a){return _0xa020c3+_0xd5c1a;},'DVBDc':function(_0x24998e,_0x53be75){return _0x24998e*_0x53be75;}};if(_0x12eca8>=_0x265184[_0x4b9f02(0x1ff)])return[0x0,0x0];const _0x26e32f=_0x265184[_0x12eca8];let _0x41891f;if(_0x26e32f>=0x80)_0x41891f=0x1;else{if(_0x26e32f>=0x40)_0x41891f=0x2;else{if(_0x50f668[_0x4b9f02(0x1c0)](_0x26e32f,0x20))_0x41891f=0x3;else{if(_0x26e32f>=0x10)_0x41891f=0x4;else return[_0x26e32f,0x1];}}}if(_0x12eca8+_0x41891f>_0x265184[_0x4b9f02(0x1ff)])return[0x0,0x0];let _0x146800=0x0;for(let _0x4a74d8=0x0;_0x50f668[_0x4b9f02(0x1e6)](_0x4a74d8,_0x41891f);_0x4a74d8++){_0x146800=_0x50f668[_0x4b9f02(0x204)](_0x50f668[_0x4b9f02(0x1e9)](_0x146800,0x100),_0x265184[_0x50f668['Hwjqj'](_0x12eca8,_0x4a74d8)]);}return[_0x146800,_0x41891f];}function readUint(_0x54ded9,_0x5e42e7,_0x758ea3){const _0x583b85=_0x8098,_0x4d42ee={'KONzN':function(_0x3c980e,_0x32640b){return _0x3c980e<_0x32640b;},'MVuZa':function(_0x44a9a6,_0x5407d8){return _0x44a9a6+_0x5407d8;}};let _0x52fbba=0x0;for(let _0xe996b1=0x0;_0x4d42ee[_0x583b85(0x1bd)](_0xe996b1,_0x758ea3);_0xe996b1++){_0x52fbba=_0x52fbba*0x100+_0x54ded9[_0x4d42ee['MVuZa'](_0x5e42e7,_0xe996b1)];}return _0x52fbba;}function _0x8098(_0x3ded1d,_0x449b3b){_0x3ded1d=_0x3ded1d-0x1b8;const _0x495d88=_0x495d();let _0x8098dc=_0x495d88[_0x3ded1d];return _0x8098dc;}function isUnknownSize(_0x4db4e3,_0x4e7a7e){const _0x4cd50f={'aHpOa':function(_0x440766,_0x4b1e7e){return _0x440766-_0x4b1e7e;},'LQDVk':function(_0x531f4e,_0x14eac2){return _0x531f4e*_0x14eac2;}};return _0x4db4e3===_0x4cd50f['aHpOa'](Math['pow'](0x2,_0x4cd50f['LQDVk'](0x7,_0x4e7a7e)),0x1);}function _0x495d(){const _0x4878ab=['pow','timestamp','clusters','zRvte','Igwia','maxTicks','concat','DVBDc','JPjyi','8HrUnLb','Teecj','JZloX','305550ozTviE','endsWith','XMJiX','indexOf','OiFhv','2942930rdaloB','has','JEtOF','CbjZW','hdYxs','MuIwn','QoKjY','log','floor','push','esVtj','OiDcn','length','HlttF','haRwT','QQiGR','CVmRF','Hwjqj','from','QOYGv','SIFeC','ATODM','gxlME','vPxlb','13388287iioqsI','wAdxo','644ySxRid','efIIj','KONzN','ZYQKA','534VFnlnm','gKORm','argv','min','maxTimestampTicks','\x20files\x20->\x20','Mppzn','stitchWebmFiles.js','VfkIt','aFWhD','xITmY','7TeDVrh','sARWI','mrtjB','969341xZGMsK','alloc','jWjbj','oklvT','wqnBh','WLLFX','nhzpg','9SCwalu','NMETx','xBCKN','slice','ccLGP','error','MqdMF','AllaB','header','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','8163460CrIgJR','TBder','2314616wblQQT'];_0x495d=function(){return _0x4878ab;};return _0x495d();}function writeVint(_0x2122cb,_0x1af15f){const _0x1320e0=_0x8098,_0x3a785b={'pXVUb':function(_0x277f92,_0x279c8f){return _0x277f92<_0x279c8f;},'vNOsj':function(_0x518e53,_0xfc1171){return _0x518e53-_0xfc1171;},'kUjau':function(_0x34058e,_0x240187){return _0x34058e>=_0x240187;},'gRwjk':function(_0x1b6a80,_0x40c79c){return _0x1b6a80&_0x40c79c;},'ZimoA':function(_0x1c3ba7,_0xea8458){return _0x1c3ba7<<_0xea8458;}};let _0x5e6847=_0x1af15f||0x1;while(_0x3a785b['pXVUb'](_0x3a785b['vNOsj'](Math[_0x1320e0(0x1e2)](0x2,0x7*_0x5e6847),0x2),_0x2122cb))_0x5e6847++;const _0x550cd6=Buffer['alloc'](_0x5e6847);for(let _0x591722=_0x5e6847-0x1;_0x3a785b['kUjau'](_0x591722,0x0);_0x591722--){_0x550cd6[_0x591722]=_0x3a785b['gRwjk'](_0x2122cb,0xff),_0x2122cb=Math['floor'](_0x2122cb/0x100);}return _0x550cd6[0x0]|=_0x3a785b['ZimoA'](0x1,0x8-_0x5e6847),_0x550cd6;}function writeUint(_0x504a17,_0x3d3c2e){const _0x257a7b=_0x8098,_0x3bdd37={'wAdxo':function(_0x2a57aa,_0x9e01b4){return _0x2a57aa>=_0x9e01b4;},'sARWI':function(_0x42f48b,_0x32e410){return _0x42f48b&_0x32e410;}},_0x72c45d=Buffer['alloc'](_0x3d3c2e);for(let _0x143015=_0x3d3c2e-0x1;_0x3bdd37[_0x257a7b(0x1ba)](_0x143015,0x0);_0x143015--){_0x72c45d[_0x143015]=_0x3bdd37[_0x257a7b(0x1cb)](_0x504a17,0xff),_0x504a17=Math[_0x257a7b(0x1fb)](_0x504a17/0x100);}return _0x72c45d;}function writeUnknownSizeVint(_0x42b56d){const _0x419c23=_0x8098,_0x340a0d={'CVmRF':function(_0x2cf451,_0x2738f1){return _0x2cf451>>_0x2738f1;},'WLLFX':function(_0x11a801,_0x346d1c){return _0x11a801-_0x346d1c;}},_0x5e501c=Buffer[_0x419c23(0x1ce)](_0x42b56d,0xff);return _0x5e501c[0x0]=_0x340a0d[_0x419c23(0x203)](0xff,_0x340a0d[_0x419c23(0x1d2)](_0x42b56d,0x1)),_0x5e501c;}function uintSize(_0x39ed2a){const _0x56286f=_0x8098,_0x40af8e={'Mppzn':function(_0x4a8baa,_0x35ecb6){return _0x4a8baa===_0x35ecb6;},'OiDcn':function(_0x49deaa,_0x51fcec){return _0x49deaa/_0x51fcec;}};if(_0x40af8e[_0x56286f(0x1c5)](_0x39ed2a,0x0))return 0x1;let _0x181ac0=0x0,_0x168313=_0x39ed2a;while(_0x168313>0x0){_0x181ac0++,_0x168313=Math['floor'](_0x40af8e[_0x56286f(0x1fe)](_0x168313,0x100));}return _0x181ac0;}function findTimestampScale(_0x18be80,_0x171201){const _0x1dae4a=_0x8098,_0x36bb78={'xITmY':function(_0x129568,_0x179ebe){return _0x129568+_0x179ebe;},'gxlME':function(_0x22a5c1,_0x11901a){return _0x22a5c1<_0x11901a;},'efIIj':function(_0x338319,_0x38d43c){return _0x338319===_0x38d43c;},'MuIwn':function(_0x104e7f,_0x40531e){return _0x104e7f+_0x40531e;},'JEtOF':function(_0x6138ea,_0x2fdcf9,_0x4ece46){return _0x6138ea(_0x2fdcf9,_0x4ece46);},'JPjyi':function(_0x44420e,_0x9309f0,_0x230cb0,_0x59e13d){return _0x44420e(_0x9309f0,_0x230cb0,_0x59e13d);},'HlttF':function(_0x5d74a8,_0x5f1594){return _0x5d74a8+_0x5f1594;},'SOawk':function(_0x1b6d36,_0x421fc2){return _0x1b6d36+_0x421fc2;},'LZwLm':function(_0x1e8a67,_0x34d5dc,_0x3792ad){return _0x1e8a67(_0x34d5dc,_0x3792ad);}};let _0x5a79a5=_0x171201;const _0x574082=Math[_0x1dae4a(0x1c2)](_0x18be80[_0x1dae4a(0x1ff)],_0x36bb78[_0x1dae4a(0x1c9)](_0x171201,0x2710));while(_0x36bb78[_0x1dae4a(0x209)](_0x5a79a5,_0x574082)){const [_0x2f8396,_0x3582e4]=readId(_0x18be80,_0x5a79a5),[_0x222f10,_0x1b05a6]=readVint(_0x18be80,_0x36bb78['xITmY'](_0x5a79a5,_0x3582e4));if(_0x36bb78[_0x1dae4a(0x1bc)](_0x2f8396,ID_INFO)){let _0x4c0315=_0x36bb78[_0x1dae4a(0x1f8)](_0x5a79a5,_0x3582e4)+_0x1b05a6;const _0x1ff019=_0x4c0315+_0x222f10;while(_0x4c0315<_0x1ff019){const [_0x2aa750,_0x25caaf]=_0x36bb78[_0x1dae4a(0x1f5)](readId,_0x18be80,_0x4c0315),[_0xff9c23,_0x4cb103]=readVint(_0x18be80,_0x4c0315+_0x25caaf);if(_0x2aa750===ID_TIMESTAMP_SCALE)return _0x36bb78[_0x1dae4a(0x1ea)](readUint,_0x18be80,_0x36bb78[_0x1dae4a(0x200)](_0x4c0315,_0x25caaf)+_0x4cb103,_0xff9c23);_0x4c0315+=_0x36bb78['SOawk'](_0x25caaf,_0x4cb103)+_0xff9c23;}break;}if(_0x36bb78[_0x1dae4a(0x1bc)](_0x2f8396,ID_CLUSTER))break;if(_0x36bb78['LZwLm'](isUnknownSize,_0x222f10,_0x1b05a6))break;_0x5a79a5+=_0x36bb78['MuIwn'](_0x3582e4,_0x1b05a6)+_0x222f10;}return 0xf4240;}function findFirstClusterOffset(_0x4b0c0b,_0x929d81){const _0x5c41a7=_0x8098,_0x5eb836={'aFWhD':function(_0x5b5df2,_0xed7ae0){return _0x5b5df2+_0xed7ae0;}};let _0x28f68d=_0x929d81;while(_0x28f68d<_0x4b0c0b[_0x5c41a7(0x1ff)]){const [_0x5d98f3,_0xfe411a]=readId(_0x4b0c0b,_0x28f68d);if(_0x5d98f3===ID_CLUSTER)return _0x28f68d;const [_0x3963dc,_0x3bc2c2]=readVint(_0x4b0c0b,_0x5eb836['aFWhD'](_0x28f68d,_0xfe411a));if(isUnknownSize(_0x3963dc,_0x3bc2c2))return _0x28f68d;_0x28f68d+=_0x5eb836[_0x5c41a7(0x1c8)](_0xfe411a+_0x3bc2c2,_0x3963dc);}return _0x4b0c0b[_0x5c41a7(0x1ff)];}function findClusterEnd(_0x57fc3e,_0x23b6d2,_0x1f47a4,_0x262ed2){const _0x4201c4=_0x8098,_0x35a176={'xBCKN':function(_0x7ca894,_0x344bad,_0x5d4ba2){return _0x7ca894(_0x344bad,_0x5d4ba2);},'sPWGZ':function(_0x47e814,_0x3c5878){return _0x47e814+_0x3c5878;},'wfPzb':function(_0x4b441d,_0x4d8027){return _0x4b441d-_0x4d8027;},'QQiGR':function(_0x1f0ec0,_0x3c236c,_0x4718d5){return _0x1f0ec0(_0x3c236c,_0x4718d5);},'SIFeC':function(_0x1eda36,_0x14498f,_0x467c4d){return _0x1eda36(_0x14498f,_0x467c4d);}};if(!_0x35a176[_0x4201c4(0x1d6)](isUnknownSize,_0x1f47a4,_0x262ed2))return _0x35a176['sPWGZ'](_0x23b6d2,_0x1f47a4);const _0x384930=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x348d53=_0x23b6d2;while(_0x348d53<_0x35a176['wfPzb'](_0x57fc3e['length'],0x4)){const [_0x4820da,_0x311a1b]=_0x35a176[_0x4201c4(0x202)](readId,_0x57fc3e,_0x348d53);if(_0x384930[_0x4201c4(0x1f4)](_0x4820da))return _0x348d53;const [_0x464356,_0x4b8b06]=_0x35a176[_0x4201c4(0x207)](readVint,_0x57fc3e,_0x348d53+_0x311a1b);if(isUnknownSize(_0x464356,_0x4b8b06))return _0x57fc3e[_0x4201c4(0x1ff)];_0x348d53+=_0x35a176['sPWGZ'](_0x311a1b,_0x4b8b06)+_0x464356;}return _0x57fc3e['length'];}function extractClusters(_0x1d4e3e,_0x16429c){const _0x4608cd=_0x8098,_0x4ac201={'wqnBh':function(_0x250964,_0x1da35e){return _0x250964<_0x1da35e;},'nhzpg':function(_0x19fbbc,_0x42b711){return _0x19fbbc===_0x42b711;},'MqdMF':function(_0x557a36,_0x32a7eb){return _0x557a36+_0x32a7eb;},'jWjbj':function(_0x9b420e,_0x1bfbab){return _0x9b420e+_0x1bfbab;},'hdYxs':function(_0x3c111f,_0x5f18ac){return _0x3c111f+_0x5f18ac;},'XWDdZ':function(_0x5b559c,_0x329c58){return _0x5b559c+_0x329c58;},'YKAfE':function(_0x574b0f,_0x416fe5,_0x2f32ff){return _0x574b0f(_0x416fe5,_0x2f32ff);},'oklvT':function(_0x231303,_0x5511d0,_0x2270b3,_0x140595){return _0x231303(_0x5511d0,_0x2270b3,_0x140595);},'XMJiX':function(_0x271ce7,_0x5be8bf){return _0x271ce7+_0x5be8bf;},'TBder':function(_0xc8ca36,_0x5542e7,_0x33bb3a){return _0xc8ca36(_0x5542e7,_0x33bb3a);},'AllaB':function(_0x3068ba,_0xea3304){return _0x3068ba+_0xea3304;},'NFbHb':function(_0x9b5b46,_0x4aa1af){return _0x9b5b46+_0x4aa1af;},'Teecj':function(_0x2a5f71,_0x23a181){return _0x2a5f71+_0x23a181;},'zRvte':function(_0x2131df,_0x397f4b){return _0x2131df+_0x397f4b;}},_0x470786=[],_0x12b716=Buffer[_0x4608cd(0x205)]([0x1f,0x43,0xb6,0x75]);let _0x5443f4=0x0;while(_0x4ac201[_0x4608cd(0x1d1)](_0x5443f4,_0x1d4e3e['length'])){const _0x4db3f2=_0x1d4e3e[_0x4608cd(0x1f1)](_0x12b716,_0x5443f4);if(_0x4ac201[_0x4608cd(0x1d3)](_0x4db3f2,-0x1))break;const [_0x2e2fd1,_0x194c55]=readId(_0x1d4e3e,_0x4db3f2);if(_0x2e2fd1!==ID_CLUSTER){_0x5443f4=_0x4ac201['MqdMF'](_0x4db3f2,0x1);continue;}const [_0x584a7c,_0x40bfff]=readVint(_0x1d4e3e,_0x4ac201[_0x4608cd(0x1cf)](_0x4db3f2,_0x194c55)),_0x628c6b=_0x4ac201['hdYxs'](_0x4ac201['XWDdZ'](_0x4db3f2,_0x194c55),_0x40bfff),_0x1f0927=findClusterEnd(_0x1d4e3e,_0x628c6b,_0x584a7c,_0x40bfff);let _0x2ecbc0=_0x628c6b,_0x44ea09=0x0,_0x4c2453=0x2,_0x12dbd9=![],_0x4a3af4=Buffer[_0x4608cd(0x1ce)](0x0),_0x5d600d=Buffer['alloc'](0x0);while(_0x2ecbc0<_0x1f0927){const [_0x490fb2,_0x27e52b]=readId(_0x1d4e3e,_0x2ecbc0),[_0x325c52,_0x4f6316]=_0x4ac201['YKAfE'](readVint,_0x1d4e3e,_0x2ecbc0+_0x27e52b);if(_0x490fb2===ID_TIMESTAMP){_0x44ea09=_0x4ac201[_0x4608cd(0x1d0)](readUint,_0x1d4e3e,_0x4ac201[_0x4608cd(0x1f7)](_0x2ecbc0+_0x27e52b,_0x4f6316),_0x325c52),_0x4c2453=_0x325c52,_0x12dbd9=!![],_0x4a3af4=_0x1d4e3e['slice'](_0x628c6b,_0x2ecbc0);const _0x56de13=_0x4ac201[_0x4608cd(0x1f0)](_0x4ac201[_0x4608cd(0x1da)](_0x2ecbc0,_0x27e52b)+_0x4f6316,_0x325c52);_0x5d600d=_0x1d4e3e[_0x4608cd(0x1d7)](_0x56de13,_0x1f0927);break;}if(_0x490fb2===ID_CLUSTER)break;if(_0x4ac201[_0x4608cd(0x1e0)](isUnknownSize,_0x325c52,_0x4f6316))break;_0x2ecbc0+=_0x27e52b+_0x4f6316+_0x325c52;}!_0x12dbd9&&(_0x5d600d=_0x1d4e3e['slice'](_0x628c6b,_0x1f0927));let _0x32db63=_0x44ea09;_0x2ecbc0=_0x628c6b;while(_0x2ecbc0<_0x1f0927){const [_0x3ec492,_0x4b5678]=readId(_0x1d4e3e,_0x2ecbc0),[_0x271fb0,_0x383083]=_0x4ac201[_0x4608cd(0x1e0)](readVint,_0x1d4e3e,_0x4ac201[_0x4608cd(0x1db)](_0x2ecbc0,_0x4b5678));if(_0x4ac201[_0x4608cd(0x1d3)](_0x3ec492,ID_SIMPLE_BLOCK)&&_0x271fb0>=0x4){const _0x501bd8=_0x4ac201['NFbHb'](_0x2ecbc0,_0x4b5678)+_0x383083,[,_0x10352e]=readVint(_0x1d4e3e,_0x501bd8),_0xa9db21=_0x1d4e3e['readInt16BE'](_0x4ac201[_0x4608cd(0x1ec)](_0x501bd8,_0x10352e)),_0x1bf0cf=_0x44ea09+_0xa9db21;if(_0x1bf0cf>_0x32db63)_0x32db63=_0x1bf0cf;}if(_0x3ec492===ID_CLUSTER)break;if(isUnknownSize(_0x271fb0,_0x383083))break;_0x2ecbc0+=_0x4ac201[_0x4608cd(0x1e5)](_0x4b5678,_0x383083)+_0x271fb0;}_0x470786['push']({'timestamp':_0x44ea09,'maxTicks':_0x32db63,'bodyBeforeTimestamp':_0x4a3af4,'bodyAfterTimestamp':_0x5d600d,'timestampElementSize':_0x4c2453}),_0x5443f4=_0x1f0927;}return _0x470786;}function parseWebm(_0x3a8dd9){const _0x365c3b=_0x8098,_0x2d9760={'QoKjY':function(_0x21bd8f,_0x3cc3bb,_0x35096f){return _0x21bd8f(_0x3cc3bb,_0x35096f);},'VfkIt':function(_0x4849b5,_0x217a4f){return _0x4849b5+_0x217a4f;},'uqkxh':function(_0x22367f,_0x82edcc){return _0x22367f!==_0x82edcc;},'QOYGv':function(_0xeb18eb,_0x538ca9){return _0xeb18eb+_0x538ca9;},'oHhTx':function(_0xad1d79,_0x25f6a8){return _0xad1d79+_0x25f6a8;},'CBuds':function(_0x5b091b,_0x3bfcd4,_0x570226){return _0x5b091b(_0x3bfcd4,_0x570226);}};let _0x5f18e8=0x0;const [,_0x40ec74]=_0x2d9760[_0x365c3b(0x1f9)](readId,_0x3a8dd9,_0x5f18e8),[_0x46bf46,_0x32807e]=readVint(_0x3a8dd9,_0x5f18e8+_0x40ec74);_0x5f18e8+=_0x2d9760['VfkIt'](_0x40ec74+_0x32807e,_0x46bf46);const [_0x234c3a,_0x2547d0]=readId(_0x3a8dd9,_0x5f18e8);if(_0x2d9760['uqkxh'](_0x234c3a,ID_SEGMENT))return null;const [,_0x28d7b6]=readVint(_0x3a8dd9,_0x2d9760[_0x365c3b(0x1c7)](_0x5f18e8,_0x2547d0)),_0x45df38=_0x2d9760[_0x365c3b(0x206)](_0x2d9760['oHhTx'](_0x5f18e8,_0x2547d0),_0x28d7b6),_0x514710=findTimestampScale(_0x3a8dd9,_0x45df38),_0x541872=findFirstClusterOffset(_0x3a8dd9,_0x45df38),_0x345f9b=_0x3a8dd9['slice'](0x0,_0x541872),_0x3db70b=_0x2d9760['CBuds'](extractClusters,_0x3a8dd9,_0x514710);let _0x1e11d6=0x0;for(const _0x61a48d of _0x3db70b){if(_0x61a48d[_0x365c3b(0x1e7)]>_0x1e11d6)_0x1e11d6=_0x61a48d['maxTicks'];}return{'header':_0x345f9b,'clusters':_0x3db70b,'timestampScale':_0x514710,'maxTimestampTicks':_0x1e11d6};}function buildCluster(_0x175057,_0x51cd97,_0x117e87){const _0x3275d1=_0x8098,_0x5b6a54={'CbjZW':function(_0x574824,_0x5a98d5){return _0x574824(_0x5a98d5);},'ZYQKA':function(_0x56fb66,_0x2f7822,_0x4c2b05){return _0x56fb66(_0x2f7822,_0x4c2b05);},'vPxlb':function(_0x317183,_0x151f72){return _0x317183(_0x151f72);}},_0x56ea27=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x148f6b=Math['max'](0x4,uintSize(_0x175057)),_0x1235d8=Buffer['concat']([Buffer[_0x3275d1(0x205)]([ID_TIMESTAMP]),_0x5b6a54[_0x3275d1(0x1f6)](writeVint,_0x148f6b),_0x5b6a54[_0x3275d1(0x1be)](writeUint,_0x175057,_0x148f6b)]),_0x51c860=Buffer[_0x3275d1(0x1e8)]([_0x51cd97,_0x1235d8,_0x117e87]),_0x38c533=_0x5b6a54[_0x3275d1(0x1b8)](writeVint,_0x51c860[_0x3275d1(0x1ff)]);return Buffer['concat']([_0x56ea27,_0x38c533,_0x51c860]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x212def){const _0x1477e6=_0x8098,_0x280403={'rreQF':function(_0x4da6dd,_0x43a5b4,_0x46f91b){return _0x4da6dd(_0x43a5b4,_0x46f91b);},'ATODM':function(_0x39fcd8,_0x5e1757){return _0x39fcd8+_0x5e1757;},'mrtjB':function(_0x342366,_0x291460,_0x1c074c){return _0x342366(_0x291460,_0x1c074c);},'NMETx':function(_0x3a755d,_0x42db40,_0x25ec14){return _0x3a755d(_0x42db40,_0x25ec14);},'lCqcx':function(_0x54f84d,_0x192bc8){return _0x54f84d+_0x192bc8;},'esVtj':function(_0x4b2bdc,_0x1a513){return _0x4b2bdc<_0x1a513;},'xbdwq':function(_0x50fb5d,_0x405ae9){return _0x50fb5d+_0x405ae9;},'uneNi':function(_0x2f709a,_0x4283c7,_0x2bfc06){return _0x2f709a(_0x4283c7,_0x2bfc06);}},_0x213444=Buffer['from'](_0x212def);let _0x519e2c=0x0;const [,_0x446bc0]=readId(_0x213444,_0x519e2c),[_0x3fb4dc,_0x3c3c96]=_0x280403['rreQF'](readVint,_0x213444,_0x519e2c+_0x446bc0),_0x2ca448=_0x280403[_0x1477e6(0x208)](_0x519e2c+_0x446bc0+_0x3c3c96,_0x3fb4dc),[,_0x4c2c85]=_0x280403[_0x1477e6(0x1cc)](readId,_0x213444,_0x2ca448),[,_0x3e453b]=_0x280403['NMETx'](readVint,_0x213444,_0x2ca448+_0x4c2c85),_0x27a317=_0x280403['ATODM'](_0x2ca448+_0x4c2c85,_0x3e453b),_0x18d31e=writeUnknownSizeVint(_0x3e453b);_0x18d31e['copy'](_0x213444,_0x2ca448+_0x4c2c85);let _0x3342b4=_0x27a317;const _0x10d11c=Math['min'](_0x213444['length'],_0x280403['lCqcx'](_0x27a317,0x2710));while(_0x280403[_0x1477e6(0x1fd)](_0x3342b4,_0x10d11c)){const [_0x44c95f,_0x440d13]=readId(_0x213444,_0x3342b4),[_0x286361,_0x4b5f70]=readVint(_0x213444,_0x3342b4+_0x440d13);if(_0x44c95f===ID_CLUSTER)break;if(isUnknownSize(_0x286361,_0x4b5f70))break;if(_0x44c95f===ID_INFO){const _0x2427fc=_0x280403['ATODM'](_0x3342b4+_0x440d13,_0x4b5f70),_0x14ca5d=_0x280403['ATODM'](_0x2427fc,_0x286361),_0x184b16=[];let _0x21f519=_0x2427fc;while(_0x280403['esVtj'](_0x21f519,_0x14ca5d)){const [_0x2e2b8c,_0x238e51]=_0x280403[_0x1477e6(0x1d5)](readId,_0x213444,_0x21f519),[_0x1e4660,_0x390ae1]=readVint(_0x213444,_0x280403['xbdwq'](_0x21f519,_0x238e51)),_0x495a4f=_0x280403[_0x1477e6(0x208)](_0x238e51+_0x390ae1,_0x1e4660);_0x2e2b8c!==ID_DURATION&&_0x184b16[_0x1477e6(0x1fc)](_0x213444[_0x1477e6(0x1d7)](_0x21f519,_0x280403[_0x1477e6(0x208)](_0x21f519,_0x495a4f))),_0x21f519+=_0x495a4f;}const _0x37fcf3=Buffer[_0x1477e6(0x1e8)](_0x184b16),_0x2bc9ed=Buffer['concat']([_0x213444['slice'](_0x3342b4,_0x3342b4+_0x440d13),_0x280403['uneNi'](writeVint,_0x37fcf3['length'],_0x4b5f70)]);return Buffer[_0x1477e6(0x1e8)]([_0x213444['slice'](0x0,_0x3342b4),_0x2bc9ed,_0x37fcf3,_0x213444['slice'](_0x14ca5d)]);}_0x3342b4+=_0x440d13+_0x4b5f70+_0x286361;}return _0x213444;}export function stitchWebmFiles(_0x103a41,_0x3852be){const _0x29b68f=_0x8098,_0x1cceaa={'ccLGP':function(_0x24b05a,_0x43ffd4){return _0x24b05a(_0x43ffd4);},'JZloX':function(_0x10f01f,_0x3fb22d){return _0x10f01f===_0x3fb22d;},'PWrVy':function(_0x570b37,_0x2c9c5d){return _0x570b37<_0x2c9c5d;},'YRKQs':function(_0xe71829,_0x318f5a){return _0xe71829+_0x318f5a;},'OiFhv':function(_0x4cddbd,_0x39519f,_0xdf31e2){return _0x4cddbd(_0x39519f,_0xdf31e2);}};if(_0x103a41[_0x29b68f(0x1ff)]<=0x1)return![];const _0x5b7a4e=[];for(const _0x1263ab of _0x103a41){const _0x553544=_0x1cceaa[_0x29b68f(0x1d8)](readFileSync,_0x1263ab),_0x1b40ac=_0x1cceaa['ccLGP'](parseWebm,_0x553544);if(!_0x1b40ac||_0x1cceaa[_0x29b68f(0x1ed)](_0x1b40ac[_0x29b68f(0x1e4)][_0x29b68f(0x1ff)],0x0))return![];_0x5b7a4e[_0x29b68f(0x1fc)](_0x1b40ac);}const _0x1177a5=_0x5b7a4e[0x0],_0x571291=_0x1cceaa['ccLGP'](rebuildHeaderWithoutDuration,_0x1177a5[_0x29b68f(0x1dc)]),_0x41196b=[_0x571291];let _0x481023=0x0;for(let _0x411b13=0x0;_0x1cceaa['PWrVy'](_0x411b13,_0x5b7a4e['length']);_0x411b13++){const _0x7296e8=_0x5b7a4e[_0x411b13];for(const _0x5e51c6 of _0x7296e8[_0x29b68f(0x1e4)]){const _0x5b51b9=_0x1cceaa['YRKQs'](_0x5e51c6[_0x29b68f(0x1e3)],_0x481023);_0x41196b[_0x29b68f(0x1fc)](buildCluster(_0x5b51b9,_0x5e51c6['bodyBeforeTimestamp'],_0x5e51c6['bodyAfterTimestamp']));}const _0x553f5e=0x1e;_0x481023+=_0x7296e8[_0x29b68f(0x1c3)]+_0x553f5e;}return _0x1cceaa[_0x29b68f(0x1f2)](writeFileSync,_0x3852be,Buffer[_0x29b68f(0x1e8)](_0x41196b)),!![];}if(process[_0x425631(0x1c1)][0x1]?.['endsWith']('stitchWebmFiles.ts')||process['argv'][0x1]?.[_0x425631(0x1ef)](_0x425631(0x1c6))){const args=process[_0x425631(0x1c1)]['slice'](0x2);args[_0x425631(0x1ff)]<0x3&&(console[_0x425631(0x1d9)](_0x425631(0x1dd)),process['exit'](0x1));const output=args[args[_0x425631(0x1ff)]-0x1],inputs=args[_0x425631(0x1d7)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x425631(0x1fa)]('Stitched\x20'+inputs['length']+_0x425631(0x1c4)+output):console[_0x425631(0x1fa)](_0x425631(0x1de));}
|
|
1
|
+
const _0x35ece4=_0x5e2a;function _0x5e2a(_0x27237d,_0x4e6354){_0x27237d=_0x27237d-0xad;const _0x1e3fbe=_0x1e3f();let _0x5e2a61=_0x1e3fbe[_0x27237d];return _0x5e2a61;}(function(_0x4491f1,_0x121143){const _0x44b73f=_0x5e2a,_0x2c2f17=_0x4491f1();while(!![]){try{const _0x580de5=parseInt(_0x44b73f(0xb8))/0x1*(parseInt(_0x44b73f(0xf9))/0x2)+-parseInt(_0x44b73f(0xf7))/0x3*(-parseInt(_0x44b73f(0xb3))/0x4)+-parseInt(_0x44b73f(0xbf))/0x5*(parseInt(_0x44b73f(0xb0))/0x6)+parseInt(_0x44b73f(0xd1))/0x7*(-parseInt(_0x44b73f(0xb1))/0x8)+-parseInt(_0x44b73f(0xda))/0x9+-parseInt(_0x44b73f(0xc1))/0xa+parseInt(_0x44b73f(0xee))/0xb;if(_0x580de5===_0x121143)break;else _0x2c2f17['push'](_0x2c2f17['shift']());}catch(_0x12ed63){_0x2c2f17['push'](_0x2c2f17['shift']());}}}(_0x1e3f,0xec8fd));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(_0x32d6e5,_0x1ea598){const _0x4027d8=_0x5e2a,_0x3216ee={'sxuFE':function(_0x32838e,_0x2b6c2){return _0x32838e>=_0x2b6c2;},'jmEmX':function(_0x3ab47f,_0x591108){return _0x3ab47f<=_0x591108;},'Ezbkf':function(_0x4e0314,_0x528e72){return _0x4e0314<_0x528e72;},'gxEUq':function(_0x29b8b4,_0x51d9a7){return _0x29b8b4+_0x51d9a7;},'mVokk':function(_0x440e9a,_0x31a63c){return _0x440e9a*_0x31a63c;}};if(_0x3216ee[_0x4027d8(0xf1)](_0x1ea598,_0x32d6e5[_0x4027d8(0xc4)]))return[0x0,0x0];const _0x4a2cb1=_0x32d6e5[_0x1ea598];let _0x41beab=0x1,_0x26396c=0x80;while(_0x3216ee['jmEmX'](_0x41beab,0x8)&&!(_0x4a2cb1&_0x26396c)){_0x41beab++,_0x26396c>>=0x1;}if(_0x1ea598+_0x41beab>_0x32d6e5['length'])return[0x0,0x0];let _0x1e18fb=_0x4a2cb1&_0x26396c-0x1;for(let _0x3fd941=0x1;_0x3216ee['Ezbkf'](_0x3fd941,_0x41beab);_0x3fd941++){_0x1e18fb=_0x3216ee['gxEUq'](_0x3216ee[_0x4027d8(0xd0)](_0x1e18fb,0x100),_0x32d6e5[_0x3216ee['gxEUq'](_0x1ea598,_0x3fd941)]);}return[_0x1e18fb,_0x41beab];}function readId(_0x276b57,_0x7b2735){const _0x3f6611=_0x5e2a,_0x152bee={'jCTJI':function(_0x4c72f7,_0x579668){return _0x4c72f7>=_0x579668;},'IIEpJ':function(_0x409976,_0x47c55d){return _0x409976+_0x47c55d;},'fzowY':function(_0x574be8,_0x43143c){return _0x574be8*_0x43143c;}};if(_0x152bee[_0x3f6611(0xe1)](_0x7b2735,_0x276b57['length']))return[0x0,0x0];const _0x15d236=_0x276b57[_0x7b2735];let _0x213008;if(_0x15d236>=0x80)_0x213008=0x1;else{if(_0x15d236>=0x40)_0x213008=0x2;else{if(_0x152bee[_0x3f6611(0xe1)](_0x15d236,0x20))_0x213008=0x3;else{if(_0x15d236>=0x10)_0x213008=0x4;else return[_0x15d236,0x1];}}}if(_0x152bee[_0x3f6611(0xf2)](_0x7b2735,_0x213008)>_0x276b57['length'])return[0x0,0x0];let _0x37b39d=0x0;for(let _0x4cf1a9=0x0;_0x4cf1a9<_0x213008;_0x4cf1a9++){_0x37b39d=_0x152bee['fzowY'](_0x37b39d,0x100)+_0x276b57[_0x152bee['IIEpJ'](_0x7b2735,_0x4cf1a9)];}return[_0x37b39d,_0x213008];}function readUint(_0x575416,_0x5d00b6,_0x648db5){const _0x316d93=_0x5e2a,_0x16e0d8={'WgJHH':function(_0x28684c,_0x4f4bdb){return _0x28684c<_0x4f4bdb;},'esRGO':function(_0xca0b38,_0x13d494){return _0xca0b38+_0x13d494;}};let _0x46c46b=0x0;for(let _0x55f766=0x0;_0x16e0d8['WgJHH'](_0x55f766,_0x648db5);_0x55f766++){_0x46c46b=_0x16e0d8[_0x316d93(0xb6)](_0x46c46b*0x100,_0x575416[_0x5d00b6+_0x55f766]);}return _0x46c46b;}function isUnknownSize(_0x4babcd,_0x51935c){const _0x46b803=_0x5e2a,_0x1244f4={'JFgOb':function(_0x1e396d,_0x474f08){return _0x1e396d===_0x474f08;},'YkcNL':function(_0x511667,_0xc5cb99){return _0x511667-_0xc5cb99;}};return _0x1244f4[_0x46b803(0xdc)](_0x4babcd,_0x1244f4['YkcNL'](Math['pow'](0x2,0x7*_0x51935c),0x1));}function writeVint(_0xf47c45,_0x343258){const _0x3f5730=_0x5e2a,_0x5ebe3b={'jwuPw':function(_0x283a1a,_0x28a88b){return _0x283a1a||_0x28a88b;},'dcfRq':function(_0x151b58,_0x4d1e35){return _0x151b58-_0x4d1e35;},'GpsPk':function(_0x1037b7,_0x193bcd){return _0x1037b7&_0x193bcd;},'zGOcI':function(_0x459ec8,_0x19cc3e){return _0x459ec8/_0x19cc3e;},'PHhVo':function(_0xcae16f,_0x233781){return _0xcae16f<<_0x233781;}};let _0x25ab28=_0x5ebe3b['jwuPw'](_0x343258,0x1);while(_0x5ebe3b[_0x3f5730(0xbb)](Math[_0x3f5730(0xcf)](0x2,0x7*_0x25ab28),0x2)<_0xf47c45)_0x25ab28++;const _0x439436=Buffer[_0x3f5730(0xae)](_0x25ab28);for(let _0x3859b6=_0x25ab28-0x1;_0x3859b6>=0x0;_0x3859b6--){_0x439436[_0x3859b6]=_0x5ebe3b[_0x3f5730(0xe3)](_0xf47c45,0xff),_0xf47c45=Math[_0x3f5730(0xf0)](_0x5ebe3b[_0x3f5730(0xf4)](_0xf47c45,0x100));}return _0x439436[0x0]|=_0x5ebe3b[_0x3f5730(0xed)](0x1,0x8-_0x25ab28),_0x439436;}function writeUint(_0x3b19de,_0x24db9d){const _0x2fa3ee=_0x5e2a,_0x3e5e0e={'kHZHu':function(_0x3b11a2,_0x5ca6f2){return _0x3b11a2>=_0x5ca6f2;}},_0x290360=Buffer[_0x2fa3ee(0xae)](_0x24db9d);for(let _0x22e65a=_0x24db9d-0x1;_0x3e5e0e[_0x2fa3ee(0xe0)](_0x22e65a,0x0);_0x22e65a--){_0x290360[_0x22e65a]=_0x3b19de&0xff,_0x3b19de=Math[_0x2fa3ee(0xf0)](_0x3b19de/0x100);}return _0x290360;}function _0x1e3f(){const _0x450e6a=['endsWith','exit','FNWpf','pow','mVokk','71561yiQEEm','jNsaB','readInt16BE','eyCkA','HYVFC','clusters','AqVzy','AXruQ','copy','848025xqQFPi','wMwDQ','JFgOb','NYCoV','error','HLQQn','kHZHu','jCTJI','zYPys','GpsPk','mhpyp','AEJUP','concat','bodyAfterTimestamp','WzYEi','Rjlah','YyIoH','kDEys','iDZWD','PHhVo','37689003wzOWGa','Stitched\x20','floor','sxuFE','IIEpJ','oOuGh','zGOcI','\x20files\x20->\x20','blHJS','27OiZEYk','ROcRQ','17694ArdHhz','YkmDQ','alloc','VFXVn','44022SFvPwc','1232pZTPgX','glWyX','300680yfHJJi','wHcrj','fJeDx','esRGO','ysCgk','49ZcACgD','dpBrR','JgPax','dcfRq','indexOf','maxTimestampTicks','paEFb','955mGxisX','from','4974150pJhjPf','xEcMq','uCbbl','length','stitchWebmFiles.ts','ZzImF','header','iljro','slice','HGwEj','ycNdd'];_0x1e3f=function(){return _0x450e6a;};return _0x1e3f();}function writeUnknownSizeVint(_0x5fb606){const _0x9f44ce=_0x5e2a,_0x39cc93={'NYCoV':function(_0x360243,_0x49f790){return _0x360243>>_0x49f790;},'mhpyp':function(_0x100f00,_0x3d3538){return _0x100f00-_0x3d3538;}},_0x3d9f53=Buffer[_0x9f44ce(0xae)](_0x5fb606,0xff);return _0x3d9f53[0x0]=_0x39cc93[_0x9f44ce(0xdd)](0xff,_0x39cc93[_0x9f44ce(0xe4)](_0x5fb606,0x1)),_0x3d9f53;}function uintSize(_0x4e7a58){const _0x56613f=_0x5e2a,_0x3a1ad9={'iljro':function(_0x30ab5f,_0x41214b){return _0x30ab5f>_0x41214b;}};if(_0x4e7a58===0x0)return 0x1;let _0x2c3277=0x0,_0x2ede4f=_0x4e7a58;while(_0x3a1ad9[_0x56613f(0xc8)](_0x2ede4f,0x0)){_0x2c3277++,_0x2ede4f=Math[_0x56613f(0xf0)](_0x2ede4f/0x100);}return _0x2c3277;}function findTimestampScale(_0x58c4c5,_0x348491){const _0x287f76=_0x5e2a,_0x31ddce={'oOuGh':function(_0x17cd7d,_0x4f5480){return _0x17cd7d<_0x4f5480;},'YyIoH':function(_0x1135ad,_0x41083c,_0xcabe75){return _0x1135ad(_0x41083c,_0xcabe75);},'EQEOp':function(_0x171298,_0x4170db){return _0x171298===_0x4170db;},'glWyX':function(_0x10241f,_0x27f8fc){return _0x10241f+_0x27f8fc;},'EmeJS':function(_0x1fd565,_0x37e92b){return _0x1fd565===_0x37e92b;},'FHIIp':function(_0x1720b6,_0x55fd35,_0x14c317,_0x590e72){return _0x1720b6(_0x55fd35,_0x14c317,_0x590e72);},'CeKie':function(_0x5da251,_0x46e2d6){return _0x5da251+_0x46e2d6;},'HYVFC':function(_0x3f129b,_0x3b6ecc){return _0x3f129b+_0x3b6ecc;},'FNWpf':function(_0x351f47,_0x1741ac){return _0x351f47===_0x1741ac;},'vnaVc':function(_0x487b5c,_0x548188,_0x5ca79a){return _0x487b5c(_0x548188,_0x5ca79a);},'deiXR':function(_0x2b7cc3,_0x59f31f){return _0x2b7cc3+_0x59f31f;}};let _0x4eeb3e=_0x348491;const _0x4f48f9=Math['min'](_0x58c4c5[_0x287f76(0xc4)],_0x348491+0x2710);while(_0x31ddce[_0x287f76(0xf3)](_0x4eeb3e,_0x4f48f9)){const [_0x324dbd,_0x5e1526]=readId(_0x58c4c5,_0x4eeb3e),[_0x2903d4,_0x1344eb]=_0x31ddce[_0x287f76(0xea)](readVint,_0x58c4c5,_0x4eeb3e+_0x5e1526);if(_0x31ddce['EQEOp'](_0x324dbd,ID_INFO)){let _0x5eb010=_0x31ddce[_0x287f76(0xb2)](_0x4eeb3e,_0x5e1526)+_0x1344eb;const _0x57eebd=_0x31ddce['glWyX'](_0x5eb010,_0x2903d4);while(_0x5eb010<_0x57eebd){const [_0x4f16d3,_0x2b0c03]=readId(_0x58c4c5,_0x5eb010),[_0x316d8e,_0x48aade]=readVint(_0x58c4c5,_0x5eb010+_0x2b0c03);if(_0x31ddce['EmeJS'](_0x4f16d3,ID_TIMESTAMP_SCALE))return _0x31ddce['FHIIp'](readUint,_0x58c4c5,_0x31ddce['CeKie'](_0x5eb010+_0x2b0c03,_0x48aade),_0x316d8e);_0x5eb010+=_0x31ddce[_0x287f76(0xd5)](_0x2b0c03+_0x48aade,_0x316d8e);}break;}if(_0x31ddce[_0x287f76(0xce)](_0x324dbd,ID_CLUSTER))break;if(_0x31ddce['vnaVc'](isUnknownSize,_0x2903d4,_0x1344eb))break;_0x4eeb3e+=_0x31ddce['deiXR'](_0x31ddce[_0x287f76(0xb2)](_0x5e1526,_0x1344eb),_0x2903d4);}return 0xf4240;}function findFirstClusterOffset(_0x23924b,_0x2a050b){const _0x548eb1=_0x5e2a,_0x452367={'ZzImF':function(_0x9f146,_0x3b2b05,_0x5a01f5){return _0x9f146(_0x3b2b05,_0x5a01f5);}};let _0x5713ae=_0x2a050b;while(_0x5713ae<_0x23924b['length']){const [_0x10dd8f,_0x39bf4e]=_0x452367[_0x548eb1(0xc6)](readId,_0x23924b,_0x5713ae);if(_0x10dd8f===ID_CLUSTER)return _0x5713ae;const [_0xfd1bcd,_0x76e3b8]=readVint(_0x23924b,_0x5713ae+_0x39bf4e);if(isUnknownSize(_0xfd1bcd,_0x76e3b8))return _0x5713ae;_0x5713ae+=_0x39bf4e+_0x76e3b8+_0xfd1bcd;}return _0x23924b['length'];}function findClusterEnd(_0xdc1fee,_0x5ace1b,_0x16c515,_0x211f50){const _0x1245a7=_0x5e2a,_0x33cf4c={'IBAhT':function(_0x511084,_0xa4c8b3){return _0x511084+_0xa4c8b3;},'AEJUP':function(_0x190043,_0x223652){return _0x190043<_0x223652;},'blHJS':function(_0x4e1e95,_0xd950c9,_0x3f9e34){return _0x4e1e95(_0xd950c9,_0x3f9e34);},'vAcOw':function(_0x8a969b,_0x8739ee){return _0x8a969b+_0x8739ee;}};if(!isUnknownSize(_0x16c515,_0x211f50))return _0x33cf4c['IBAhT'](_0x5ace1b,_0x16c515);const _0x3986a5=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x32ceb7=_0x5ace1b;while(_0x33cf4c[_0x1245a7(0xe5)](_0x32ceb7,_0xdc1fee['length']-0x4)){const [_0x164781,_0x46fc4e]=_0x33cf4c[_0x1245a7(0xf6)](readId,_0xdc1fee,_0x32ceb7);if(_0x3986a5['has'](_0x164781))return _0x32ceb7;const [_0x43c04b,_0x136678]=readVint(_0xdc1fee,_0x32ceb7+_0x46fc4e);if(_0x33cf4c[_0x1245a7(0xf6)](isUnknownSize,_0x43c04b,_0x136678))return _0xdc1fee['length'];_0x32ceb7+=_0x33cf4c['vAcOw'](_0x46fc4e,_0x136678)+_0x43c04b;}return _0xdc1fee[_0x1245a7(0xc4)];}function extractClusters(_0x213e49,_0x5ea1d0){const _0x248823=_0x5e2a,_0x5b3fd4={'KewLe':function(_0x583373,_0x4cc547,_0x377a02){return _0x583373(_0x4cc547,_0x377a02);},'bANbU':function(_0x570fd9,_0x3a722f){return _0x570fd9!==_0x3a722f;},'snbex':function(_0x2831c3,_0x146ebe){return _0x2831c3+_0x146ebe;},'ycNdd':function(_0x442885,_0x52121f,_0x5dcae2){return _0x442885(_0x52121f,_0x5dcae2);},'sTmiI':function(_0x28540a,_0xa079ec){return _0x28540a+_0xa079ec;},'iDZWD':function(_0x3d1575,_0x237899,_0x962fd2){return _0x3d1575(_0x237899,_0x962fd2);},'YkmDQ':function(_0x3f6830,_0x3c69aa,_0x221067){return _0x3f6830(_0x3c69aa,_0x221067);},'zYPys':function(_0x4e9f63,_0xe11624){return _0x4e9f63===_0xe11624;},'wxffs':function(_0x201f67,_0x1da981,_0x2f3fed,_0x49b153){return _0x201f67(_0x1da981,_0x2f3fed,_0x49b153);},'uCbbl':function(_0x1e0c06,_0xd68da3){return _0x1e0c06+_0xd68da3;},'saowK':function(_0x4b58a6,_0x4dce61){return _0x4b58a6+_0x4dce61;},'kDEys':function(_0xbbea99,_0x3f640f){return _0xbbea99+_0x3f640f;},'hLxcc':function(_0x5e04a9,_0x2ccf2a){return _0x5e04a9===_0x2ccf2a;},'xUwEx':function(_0x12ba2f,_0x34bca0){return _0x12ba2f+_0x34bca0;},'hhMja':function(_0x4bafbf,_0x49f338){return _0x4bafbf<_0x49f338;},'HGwEj':function(_0x5b263a,_0x3ffffe){return _0x5b263a+_0x3ffffe;},'yHWtV':function(_0x581544,_0x27dc76){return _0x581544+_0x27dc76;}},_0x4efbcc=[],_0x2b3e85=Buffer[_0x248823(0xc0)]([0x1f,0x43,0xb6,0x75]);let _0x4f97fb=0x0;while(_0x4f97fb<_0x213e49['length']){const _0x2c50f0=_0x213e49[_0x248823(0xbc)](_0x2b3e85,_0x4f97fb);if(_0x2c50f0===-0x1)break;const [_0x34ef7d,_0x4e1925]=_0x5b3fd4['KewLe'](readId,_0x213e49,_0x2c50f0);if(_0x5b3fd4['bANbU'](_0x34ef7d,ID_CLUSTER)){_0x4f97fb=_0x5b3fd4['snbex'](_0x2c50f0,0x1);continue;}const [_0x32e0f1,_0x2be729]=_0x5b3fd4['ycNdd'](readVint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2c50f0,_0x4e1925)),_0x2a8f8d=_0x2c50f0+_0x4e1925+_0x2be729,_0x5b6353=findClusterEnd(_0x213e49,_0x2a8f8d,_0x32e0f1,_0x2be729);let _0x2d09eb=_0x2a8f8d,_0x4f919f=0x0,_0x20b600=0x2,_0x13e97c=![],_0x1c3f30=Buffer[_0x248823(0xae)](0x0),_0x561a39=Buffer[_0x248823(0xae)](0x0);while(_0x2d09eb<_0x5b6353){const [_0x3c06c1,_0x231538]=_0x5b3fd4[_0x248823(0xec)](readId,_0x213e49,_0x2d09eb),[_0x2beb94,_0x38f741]=_0x5b3fd4[_0x248823(0xad)](readVint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2d09eb,_0x231538));if(_0x5b3fd4[_0x248823(0xe2)](_0x3c06c1,ID_TIMESTAMP)){_0x4f919f=_0x5b3fd4['wxffs'](readUint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2d09eb,_0x231538)+_0x38f741,_0x2beb94),_0x20b600=_0x2beb94,_0x13e97c=!![],_0x1c3f30=_0x213e49[_0x248823(0xc9)](_0x2a8f8d,_0x2d09eb);const _0x46a249=_0x5b3fd4[_0x248823(0xc3)](_0x5b3fd4['saowK'](_0x5b3fd4[_0x248823(0xeb)](_0x2d09eb,_0x231538),_0x38f741),_0x2beb94);_0x561a39=_0x213e49['slice'](_0x46a249,_0x5b6353);break;}if(_0x5b3fd4['hLxcc'](_0x3c06c1,ID_CLUSTER))break;if(_0x5b3fd4['ycNdd'](isUnknownSize,_0x2beb94,_0x38f741))break;_0x2d09eb+=_0x5b3fd4['xUwEx'](_0x231538+_0x38f741,_0x2beb94);}!_0x13e97c&&(_0x561a39=_0x213e49['slice'](_0x2a8f8d,_0x5b6353));let _0x3ca7d9=_0x4f919f;_0x2d09eb=_0x2a8f8d;while(_0x5b3fd4['hhMja'](_0x2d09eb,_0x5b6353)){const [_0x56f335,_0x334b6e]=_0x5b3fd4[_0x248823(0xcb)](readId,_0x213e49,_0x2d09eb),[_0x58f867,_0x38fd7a]=readVint(_0x213e49,_0x2d09eb+_0x334b6e);if(_0x56f335===ID_SIMPLE_BLOCK&&_0x58f867>=0x4){const _0x38f9fd=_0x2d09eb+_0x334b6e+_0x38fd7a,[,_0x299396]=_0x5b3fd4[_0x248823(0xec)](readVint,_0x213e49,_0x38f9fd),_0x2cffbf=_0x213e49[_0x248823(0xd3)](_0x5b3fd4[_0x248823(0xca)](_0x38f9fd,_0x299396)),_0xab3518=_0x4f919f+_0x2cffbf;if(_0xab3518>_0x3ca7d9)_0x3ca7d9=_0xab3518;}if(_0x56f335===ID_CLUSTER)break;if(_0x5b3fd4['KewLe'](isUnknownSize,_0x58f867,_0x38fd7a))break;_0x2d09eb+=_0x5b3fd4['snbex'](_0x5b3fd4['yHWtV'](_0x334b6e,_0x38fd7a),_0x58f867);}_0x4efbcc['push']({'timestamp':_0x4f919f,'maxTicks':_0x3ca7d9,'bodyBeforeTimestamp':_0x1c3f30,'bodyAfterTimestamp':_0x561a39,'timestampElementSize':_0x20b600}),_0x4f97fb=_0x5b6353;}return _0x4efbcc;}function parseWebm(_0x3398be){const _0x443d11=_0x5e2a,_0x34d99a={'ROcRQ':function(_0x14ea3c,_0x14b32b){return _0x14ea3c+_0x14b32b;},'VALTa':function(_0x124877,_0xba12fe){return _0x124877+_0xba12fe;},'fJeDx':function(_0x6fde2b,_0x4aabd1){return _0x6fde2b+_0x4aabd1;},'exQgA':function(_0x802375,_0x2a331c){return _0x802375+_0x2a331c;},'zBBPt':function(_0x5260c6,_0x5c8554,_0x3551b2){return _0x5260c6(_0x5c8554,_0x3551b2);}};let _0xd71750=0x0;const [,_0x1d5ea8]=readId(_0x3398be,_0xd71750),[_0x2eb264,_0x49921d]=readVint(_0x3398be,_0x34d99a[_0x443d11(0xf8)](_0xd71750,_0x1d5ea8));_0xd71750+=_0x34d99a[_0x443d11(0xf8)](_0x34d99a['VALTa'](_0x1d5ea8,_0x49921d),_0x2eb264);const [_0x585753,_0x6b598e]=readId(_0x3398be,_0xd71750);if(_0x585753!==ID_SEGMENT)return null;const [,_0x53b85c]=readVint(_0x3398be,_0x34d99a['VALTa'](_0xd71750,_0x6b598e)),_0x2bf746=_0x34d99a[_0x443d11(0xb5)](_0x34d99a['exQgA'](_0xd71750,_0x6b598e),_0x53b85c),_0x3aab75=findTimestampScale(_0x3398be,_0x2bf746),_0x5bde37=findFirstClusterOffset(_0x3398be,_0x2bf746),_0x1e332a=_0x3398be['slice'](0x0,_0x5bde37),_0x133bac=_0x34d99a['zBBPt'](extractClusters,_0x3398be,_0x3aab75);let _0x50e40b=0x0;for(const _0x57161a of _0x133bac){if(_0x57161a['maxTicks']>_0x50e40b)_0x50e40b=_0x57161a['maxTicks'];}return{'header':_0x1e332a,'clusters':_0x133bac,'timestampScale':_0x3aab75,'maxTimestampTicks':_0x50e40b};}function buildCluster(_0x629e05,_0x25707b,_0x4aa074){const _0x2e1680=_0x5e2a,_0x71e163={'HLQQn':function(_0x4d7045,_0x2bde4f){return _0x4d7045(_0x2bde4f);},'wMwDQ':function(_0x15e95,_0x2730aa,_0x2bf1c5){return _0x15e95(_0x2730aa,_0x2bf1c5);}},_0x421a77=Buffer[_0x2e1680(0xc0)]([0x1f,0x43,0xb6,0x75]),_0x1b5451=Math['max'](0x4,uintSize(_0x629e05)),_0x590259=Buffer[_0x2e1680(0xe6)]([Buffer['from']([ID_TIMESTAMP]),_0x71e163[_0x2e1680(0xdf)](writeVint,_0x1b5451),_0x71e163[_0x2e1680(0xdb)](writeUint,_0x629e05,_0x1b5451)]),_0x3277e5=Buffer['concat']([_0x25707b,_0x590259,_0x4aa074]),_0xf8f7ff=writeVint(_0x3277e5[_0x2e1680(0xc4)]);return Buffer[_0x2e1680(0xe6)]([_0x421a77,_0xf8f7ff,_0x3277e5]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x4ec526){const _0x5c14d8=_0x5e2a,_0x35a9fb={'AXruQ':function(_0x1b290f,_0x1da736,_0x586c3c){return _0x1b290f(_0x1da736,_0x586c3c);},'wHcrj':function(_0x2dc03a,_0x1c2b87){return _0x2dc03a+_0x1c2b87;},'paEFb':function(_0x3a26a7,_0x1252e9,_0x4e0281){return _0x3a26a7(_0x1252e9,_0x4e0281);},'WzYEi':function(_0x18b8b6,_0x41e610,_0x45359f){return _0x18b8b6(_0x41e610,_0x45359f);},'eyCkA':function(_0x3c4426,_0x5e80d9){return _0x3c4426===_0x5e80d9;},'dpBrR':function(_0x3091f7,_0x1cadfb){return _0x3091f7+_0x1cadfb;},'JgPax':function(_0x1b65e1,_0x48abc6,_0xae566b){return _0x1b65e1(_0x48abc6,_0xae566b);},'ysCgk':function(_0x5731fa,_0x3a9c8a){return _0x5731fa+_0x3a9c8a;}},_0x1f18ce=Buffer[_0x5c14d8(0xc0)](_0x4ec526);let _0x331884=0x0;const [,_0x2d7ee3]=readId(_0x1f18ce,_0x331884),[_0x2d7983,_0x7a90e3]=_0x35a9fb[_0x5c14d8(0xd8)](readVint,_0x1f18ce,_0x35a9fb['wHcrj'](_0x331884,_0x2d7ee3)),_0xf583a=_0x331884+_0x2d7ee3+_0x7a90e3+_0x2d7983,[,_0x340644]=_0x35a9fb[_0x5c14d8(0xd8)](readId,_0x1f18ce,_0xf583a),[,_0x1d74d0]=_0x35a9fb[_0x5c14d8(0xbe)](readVint,_0x1f18ce,_0x35a9fb['wHcrj'](_0xf583a,_0x340644)),_0x264a95=_0xf583a+_0x340644+_0x1d74d0,_0xeeeebe=writeUnknownSizeVint(_0x1d74d0);_0xeeeebe[_0x5c14d8(0xd9)](_0x1f18ce,_0xf583a+_0x340644);let _0x3d0365=_0x264a95;const _0x5e6c05=Math['min'](_0x1f18ce[_0x5c14d8(0xc4)],_0x35a9fb['wHcrj'](_0x264a95,0x2710));while(_0x3d0365<_0x5e6c05){const [_0x180fe5,_0x4830d1]=readId(_0x1f18ce,_0x3d0365),[_0x12001f,_0x91713e]=_0x35a9fb[_0x5c14d8(0xe8)](readVint,_0x1f18ce,_0x35a9fb[_0x5c14d8(0xb4)](_0x3d0365,_0x4830d1));if(_0x180fe5===ID_CLUSTER)break;if(_0x35a9fb['WzYEi'](isUnknownSize,_0x12001f,_0x91713e))break;if(_0x35a9fb[_0x5c14d8(0xd4)](_0x180fe5,ID_INFO)){const _0x111877=_0x35a9fb['dpBrR'](_0x3d0365+_0x4830d1,_0x91713e),_0x936158=_0x35a9fb[_0x5c14d8(0xb4)](_0x111877,_0x12001f),_0x4c3f4f=[];let _0x22eb4b=_0x111877;while(_0x22eb4b<_0x936158){const [_0x5bc2d2,_0x4b5ee9]=_0x35a9fb[_0x5c14d8(0xba)](readId,_0x1f18ce,_0x22eb4b),[_0x34caaa,_0xd42ded]=readVint(_0x1f18ce,_0x35a9fb[_0x5c14d8(0xb9)](_0x22eb4b,_0x4b5ee9)),_0x31413d=_0x35a9fb[_0x5c14d8(0xb7)](_0x4b5ee9+_0xd42ded,_0x34caaa);_0x5bc2d2!==ID_DURATION&&_0x4c3f4f['push'](_0x1f18ce['slice'](_0x22eb4b,_0x35a9fb['wHcrj'](_0x22eb4b,_0x31413d))),_0x22eb4b+=_0x31413d;}const _0x1e0b1a=Buffer['concat'](_0x4c3f4f),_0x4932a0=Buffer[_0x5c14d8(0xe6)]([_0x1f18ce[_0x5c14d8(0xc9)](_0x3d0365,_0x3d0365+_0x4830d1),_0x35a9fb[_0x5c14d8(0xd8)](writeVint,_0x1e0b1a[_0x5c14d8(0xc4)],_0x91713e)]);return Buffer[_0x5c14d8(0xe6)]([_0x1f18ce['slice'](0x0,_0x3d0365),_0x4932a0,_0x1e0b1a,_0x1f18ce['slice'](_0x936158)]);}_0x3d0365+=_0x35a9fb[_0x5c14d8(0xb9)](_0x35a9fb[_0x5c14d8(0xb7)](_0x4830d1,_0x91713e),_0x12001f);}return _0x1f18ce;}export function stitchWebmFiles(_0x325650,_0x32b4c0){const _0x154e40=_0x5e2a,_0x37f1b8={'AqVzy':function(_0xa729df,_0x1233db){return _0xa729df(_0x1233db);},'hxdOc':function(_0x3101f4,_0x3665ed){return _0x3101f4===_0x3665ed;},'Rjlah':function(_0x4171e7,_0x3e2988){return _0x4171e7(_0x3e2988);},'xEcMq':function(_0x4f8a30,_0x3cd8d0){return _0x4f8a30<_0x3cd8d0;},'jNsaB':function(_0x3d88e6,_0xeaf4fd){return _0x3d88e6+_0xeaf4fd;},'VFXVn':function(_0x3fe0cb,_0x482ea2,_0x1a7287,_0x4d2930){return _0x3fe0cb(_0x482ea2,_0x1a7287,_0x4d2930);},'rvhTq':function(_0x12638a,_0x5145c1){return _0x12638a+_0x5145c1;},'QxDwB':function(_0x1bd6e3,_0x3f508d,_0x478220){return _0x1bd6e3(_0x3f508d,_0x478220);}};if(_0x325650['length']<=0x1)return![];const _0x1b1d22=[];for(const _0x1294a5 of _0x325650){const _0x3defff=_0x37f1b8[_0x154e40(0xd7)](readFileSync,_0x1294a5),_0x361b15=_0x37f1b8[_0x154e40(0xd7)](parseWebm,_0x3defff);if(!_0x361b15||_0x37f1b8['hxdOc'](_0x361b15['clusters'][_0x154e40(0xc4)],0x0))return![];_0x1b1d22['push'](_0x361b15);}const _0x5d00ee=_0x1b1d22[0x0],_0x187660=_0x37f1b8[_0x154e40(0xe9)](rebuildHeaderWithoutDuration,_0x5d00ee[_0x154e40(0xc7)]),_0xe10358=[_0x187660];let _0x44e42d=0x0;for(let _0xd9fa6b=0x0;_0x37f1b8[_0x154e40(0xc2)](_0xd9fa6b,_0x1b1d22['length']);_0xd9fa6b++){const _0x440aae=_0x1b1d22[_0xd9fa6b];for(const _0x28d411 of _0x440aae[_0x154e40(0xd6)]){const _0x143563=_0x37f1b8[_0x154e40(0xd2)](_0x28d411['timestamp'],_0x44e42d);_0xe10358['push'](_0x37f1b8[_0x154e40(0xaf)](buildCluster,_0x143563,_0x28d411['bodyBeforeTimestamp'],_0x28d411[_0x154e40(0xe7)]));}const _0x1f875a=0x1e;_0x44e42d+=_0x37f1b8['rvhTq'](_0x440aae[_0x154e40(0xbd)],_0x1f875a);}return _0x37f1b8['QxDwB'](writeFileSync,_0x32b4c0,Buffer['concat'](_0xe10358)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x35ece4(0xc5))||process['argv'][0x1]?.[_0x35ece4(0xcc)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args[_0x35ece4(0xc4)]<0x3&&(console[_0x35ece4(0xde)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x35ece4(0xcd)](0x1));const output=args[args['length']-0x1],inputs=args[_0x35ece4(0xc9)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x35ece4(0xef)+inputs['length']+_0x35ece4(0xf5)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|