@ranger-testing/ranger-cli 3.1.6-alpha.aca5f9c-53 → 3.1.6-alpha.e1ccb01-57
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 +14 -5
|
@@ -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(_0x4f852f,_0x19c125){const _0x2194d6=_0x426f,_0x116b24=_0x4f852f();while(!![]){try{const _0xa2b1bd=-parseInt(_0x2194d6(0xf2))/0x1*(parseInt(_0x2194d6(0xfe))/0x2)+-parseInt(_0x2194d6(0x123))/0x3*(parseInt(_0x2194d6(0x128))/0x4)+-parseInt(_0x2194d6(0x118))/0x5*(-parseInt(_0x2194d6(0x125))/0x6)+parseInt(_0x2194d6(0x102))/0x7+-parseInt(_0x2194d6(0x12d))/0x8+-parseInt(_0x2194d6(0x115))/0x9*(parseInt(_0x2194d6(0xf6))/0xa)+parseInt(_0x2194d6(0x11d))/0xb*(parseInt(_0x2194d6(0x11a))/0xc);if(_0xa2b1bd===_0x19c125)break;else _0x116b24['push'](_0x116b24['shift']());}catch(_0x153e86){_0x116b24['push'](_0x116b24['shift']());}}}(_0xf95a,0x2d6f5));function _0xf95a(){const _0x3d74b5=['cloud','\x20\x20Note:\x20--env\x20\x22','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','avCtk','envStartPath','5IZMTZs','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','XyzKF','cwd','46140PJynKz','bfcrC','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','cdpEndpoint','GKnvn','env','prompt','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','108494Mvwgtw','AIsCq','string','RANGER_TEST_USERNAME','472745umbZFV','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','envBaseUrl','cgeWE','\x20to\x20override.','iDqeg','ZAmJt','nLjMp','RANGER_SESSION_STATE_PATH=','resolvedEnv','wMFvL','startPath','KVvmE','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','baseUrl','KoJet','authEnv','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','list','18wZKoER','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','local','923590hQuDNL','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','1836YItiww','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','domains','40986VHePTf','UpIJg','zvfUI','`\x20to\x20recreate\x20it.','name','source','9513SOgTcr','key','6eZQjps','EiLSI','RANGER_SESSION_STATE_PATH','436IuPhKk','fUAyU','DrJDg','Profile\x20\x22','wOIXv','81024OVmGMI','log','ujkfR','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','settings','status','jsLnd'];_0xf95a=function(){return _0x3d74b5;};return _0xf95a();}import{existsSync}from'fs';import _0x17edb2 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';function _0x426f(_0x113bfc,_0x1fbc50){_0x113bfc=_0x113bfc-0xec;const _0xf95a11=_0xf95a();let _0x426f0f=_0xf95a11[_0x113bfc];return _0x426f0f;}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(_0x2e2570){const _0x44a71a=_0x426f,_0x1cb6bb={'DrJDg':function(_0xe316e2,_0x165132){return _0xe316e2(_0x165132);},'bfcrC':function(_0x38c5bc){return _0x38c5bc();},'nLjMp':function(_0x46fc3b,_0x572a29){return _0x46fc3b!==_0x572a29;},'cgeWE':function(_0x4321f6,_0x5730f4){return _0x4321f6 instanceof _0x5730f4;},'UpIJg':function(_0x4427f0,_0x23956f){return _0x4427f0??_0x23956f;},'jsLnd':function(_0x179c9b){return _0x179c9b();},'iDqeg':function(_0x216fb2,_0x4c7039){return _0x216fb2+_0x4c7039;},'BthtB':function(_0x64a755,_0x5b5d0c){return _0x64a755+_0x5b5d0c;},'KjTfy':function(_0x18723b,_0x23d2e4){return _0x18723b+_0x23d2e4;},'WHxXu':_0x44a71a(0xef),'avCtk':_0x44a71a(0x116),'ZAmJt':_0x44a71a(0x113),'AIsCq':function(_0x480daa,_0x28a9c6){return _0x480daa(_0x28a9c6);},'hdLhl':function(_0x3b23a7,_0x54c2ec){return _0x3b23a7&&_0x54c2ec;},'KoJet':function(_0x5c844e){return _0x5c844e();},'oOvkH':_0x44a71a(0x122),'wMFvL':_0x44a71a(0x117),'yuaos':function(_0x1d4ca4,_0x102ff){return _0x1d4ca4===_0x102ff;},'GKnvn':'cloud','XyzKF':function(_0x37d899,_0x150d17){return _0x37d899(_0x150d17);},'KVvmE':function(_0x4dfbfb,_0x55b1c5){return _0x4dfbfb(_0x55b1c5);},'yYVOc':function(_0x292e0f,_0x3bec92){return _0x292e0f+_0x3bec92;},'JcPFq':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','EiLSI':_0x44a71a(0xfd),'wOIXv':function(_0x232e8f,_0x4ed3a9){return _0x232e8f(_0x4ed3a9);}},_0x37d03f=_0x2e2570['profile'];let _0x199cf8=_0x37d03f,_0x59ea34=null;const _0x2f2d44=_0x37d03f?null:await readActiveProfileName();if(_0x2e2570[_0x44a71a(0x112)]&&_0x37d03f)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x2e2570['authEnv']+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x37d03f+_0x44a71a(0xf8));else _0x2e2570['authEnv']&&!process[_0x44a71a(0xfb)][_0x44a71a(0x101)]&&console[_0x44a71a(0x12e)](_0x44a71a(0xee)+_0x2e2570['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x37d03f&&process['env']['RANGER_TEST_USERNAME'])try{const _0x2e21ed=await _0x1cb6bb[_0x44a71a(0x12a)](resolveAdHocProfile,{'targetUrl':_0x2e2570[_0x44a71a(0x110)]??_0x1cb6bb[_0x44a71a(0xf7)](readUrlEnvVars)[_0x44a71a(0x104)],'envKey':_0x2e2570[_0x44a71a(0x112)]});_0x2e21ed&&(_0x2f2d44&&_0x1cb6bb[_0x44a71a(0x109)](_0x2f2d44,_0x2e21ed[_0x44a71a(0x121)])&&console[_0x44a71a(0x12e)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x2e21ed[_0x44a71a(0x121)]+_0x44a71a(0x11b)+_0x2f2d44+'\x22.\x20Pass\x20--profile\x20'+_0x2f2d44+_0x44a71a(0x106)),_0x199cf8=_0x2e21ed['name'],_0x59ea34=_0x2e21ed['profile']);}catch(_0x2d14fe){if(!_0x2f2d44||_0x2e2570[_0x44a71a(0x112)])throw _0x2d14fe;console['log']('\x20\x20Warning:\x20'+(_0x1cb6bb[_0x44a71a(0x105)](_0x2d14fe,Error)?_0x2d14fe['message']:String(_0x2d14fe))),console[_0x44a71a(0x12e)]('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x2f2d44+'\x22.');}if(!_0x199cf8)_0x199cf8=_0x1cb6bb[_0x44a71a(0x11e)](_0x2f2d44,undefined);if(!_0x199cf8)try{const _0x41e999=await _0x1cb6bb[_0x44a71a(0xec)](listCloudProfiles);if(_0x41e999['length']===0x1){const _0x23bb39=_0x41e999[0x0];_0x199cf8=_0x23bb39[_0x44a71a(0x121)],console[_0x44a71a(0x12e)](_0x44a71a(0x10f)+_0x23bb39['name']),console[_0x44a71a(0x12e)]('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x199cf8)throw new Error(_0x1cb6bb[_0x44a71a(0x107)](_0x1cb6bb['BthtB'](_0x1cb6bb['KjTfy'](_0x44a71a(0x103),_0x1cb6bb['WHxXu']),_0x44a71a(0xf3))+_0x1cb6bb[_0x44a71a(0xf0)],_0x1cb6bb[_0x44a71a(0x108)]));const _0x591ea1=_0x1cb6bb[_0x44a71a(0xff)](getEnvDir,_0x199cf8),_0x37d145=existsSync(_0x591ea1);let _0x4f3203=_0x59ea34,_0x1396b8=![];if(!_0x4f3203)try{_0x4f3203=await fetchCloudProfile(_0x199cf8);if(!_0x4f3203)_0x1396b8=!![];}catch(_0x1171c1){_0x1171c1 instanceof ApiError&&_0x1171c1[_0x44a71a(0x132)]===0x194&&(_0x1396b8=!![]);}if(_0x1cb6bb['hdLhl'](_0x37d03f,_0x1396b8)&&!_0x37d145&&!_0x4f3203)throw new Error('Profile\x20\x22'+_0x37d03f+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'+'`ranger\x20profile\x20add`\x20to\x20create\x20one.');if(_0x4f3203&&_0x37d145){let _0x18d221=!![];if(_0x1cb6bb[_0x44a71a(0x111)](isInteractive)){const {source:_0x31c832}=await _0x17edb2[_0x44a71a(0xfc)]([{'type':_0x44a71a(0x114),'name':_0x1cb6bb['oOvkH'],'message':'Profile\x20\x22'+_0x199cf8+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':'Cloud\x20profile\x20(recommended)','value':'cloud'},{'name':'Local\x20profile','value':_0x1cb6bb[_0x44a71a(0x10c)]}],'default':_0x44a71a(0xed)}]);_0x18d221=_0x1cb6bb['yuaos'](_0x31c832,_0x1cb6bb[_0x44a71a(0xfa)]);}if(!_0x18d221)_0x4f3203=null;}const _0x13b3de=readProfileOverrides(process[_0x44a71a(0xf5)](),_0x199cf8);let _0x2d5378=null,_0x9f5bac,_0xf6ebce,_0x4a6bce,_0x475bb6,_0x18b8fa=null,_0x212540,_0x29c755;const _0x1a1f1b=expandOverrides(_0x13b3de),_0x1f791c=_0x1cb6bb['jsLnd'](readUrlEnvVars);if(_0x4f3203){_0x2d5378=_0x4f3203;const _0x3cde88=_0x4f3203[_0x44a71a(0x131)]??{},_0x552ac4=mergeCloudProfileSettings(_0x3cde88,_0x1cb6bb[_0x44a71a(0x11e)](_0x13b3de,undefined)),_0x41c53f={..._0x4f3203,'settings':_0x552ac4};_0x18b8fa={'baseUrl':expandString(_0x3cde88[_0x44a71a(0x110)]),'startPath':expandString(_0x3cde88[_0x44a71a(0x10d)])};const _0x1e2148=await _0x1cb6bb['bfcrC'](fetchAuthConfig),_0x5072bb=_0x1e2148?resolveAuthEnvironmentLocally(_0x1e2148,_0x4f3203['environmentKey']):null;_0x212540=_0x5072bb?.['domains']?.[0x0],_0x29c755=_0x5072bb?.[_0x44a71a(0x124)];const _0x249070=_0x1cb6bb[_0x44a71a(0xf4)](resolveProfileUrl,{'flagBaseUrl':_0x2e2570[_0x44a71a(0x110)],'flagStartPath':_0x2e2570['startPath'],'envBaseUrl':_0x1f791c['envBaseUrl'],'envStartPath':_0x1f791c[_0x44a71a(0xf1)],'projectOverrides':_0x1a1f1b,'cloudSettings':_0x18b8fa,'authEnvironmentDomain':_0x212540}),_0x457f85=process['env'][_0x44a71a(0x127)];if(_0x457f85){if(!_0x1cb6bb['AIsCq'](existsSync,_0x457f85))throw new Error(_0x44a71a(0x10a)+_0x457f85+'\x20does\x20not\x20exist.');_0x9f5bac=_0x457f85,_0xf6ebce=resolveEnvVars(_0x552ac4),_0x4a6bce=_0x1cb6bb[_0x44a71a(0xf4)](Boolean,_0xf6ebce['cdpEndpoint']);}else{const _0x444cb7=await resolveCloudProfileSession(_0x41c53f,{'effectiveBaseUrl':_0x249070['baseUrl'],'telemetry':_0x2e2570['telemetry'],'assertedEnv':_0x2e2570[_0x44a71a(0x112)]});_0x9f5bac=_0x444cb7['authPath'],_0xf6ebce=resolveEnvVars(_0x444cb7['settings']),_0x4a6bce=_0x1cb6bb[_0x44a71a(0x10e)](Boolean,_0xf6ebce['cdpEndpoint']),_0x212540=_0x444cb7['resolvedEnv']?.[_0x44a71a(0x11c)]?.[0x0],_0x29c755=_0x444cb7[_0x44a71a(0x10b)]?.['key'];}}else{if(!_0x37d145){const _0x3588f9=!_0x37d03f;throw new Error(_0x3588f9?_0x1cb6bb['yYVOc']('Active\x20profile\x20\x22'+_0x199cf8+_0x44a71a(0x119)+_0x1cb6bb['JcPFq'],_0x1cb6bb[_0x44a71a(0x126)])+('\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x199cf8+_0x44a71a(0x120)):_0x44a71a(0x12b)+_0x199cf8+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x199cf8);}const _0x2937de=await _0x1cb6bb['DrJDg'](loadSettings,_0x199cf8);_0xf6ebce=resolveEnvVars(_0x2937de),_0x4a6bce=_0x1cb6bb['AIsCq'](Boolean,_0xf6ebce[_0x44a71a(0xf9)]),_0x475bb6=_0xf6ebce[_0x44a71a(0x110)];}const _0x1eccfb=_0x1cb6bb[_0x44a71a(0x12c)](resolveProfileUrl,{'flagBaseUrl':_0x2e2570[_0x44a71a(0x110)],'flagStartPath':_0x2e2570['startPath'],'envBaseUrl':_0x1f791c['envBaseUrl'],'envStartPath':_0x1f791c[_0x44a71a(0xf1)],'localSettingsBaseUrl':_0x475bb6,'projectOverrides':_0x1a1f1b,'cloudSettings':_0x18b8fa,'authEnvironmentDomain':_0x212540}),_0x1a4b6=_0x1eccfb['url']??_0x1eccfb['baseUrl'];if(!_0x1a4b6&&!_0x4a6bce)throw new Error(_0x44a71a(0x130)+_0x199cf8+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x199cf8+'\x20baseUrl\x20<url>');return{'activeProfile':_0x199cf8,'resolvedCloudProfile':_0x2d5378,'cloudAuthPath':_0x9f5bac,'resolvedSettings':_0xf6ebce,'isCdpMode':_0x4a6bce,'url':_0x1a4b6,'baseUrlSource':_0x1eccfb['baseUrlSource'],'authEnvKey':_0x29c755,'startPath':_0x1eccfb['startPath']};}function expandString(_0x3c8ece){const _0x36c051=_0x426f,_0x8e04d7={'JyHRr':function(_0x3273d2,_0x2c028a){return _0x3273d2!==_0x2c028a;},'zvfUI':'string'};if(_0x8e04d7['JyHRr'](typeof _0x3c8ece,_0x8e04d7[_0x36c051(0x11f)]))return _0x3c8ece;return resolveEnvVars(_0x3c8ece);}function expandOverrides(_0x4db076){const _0x3d3742=_0x426f,_0x5951e2={'fUAyU':_0x3d3742(0x100),'xPDei':function(_0x51e8b4,_0x525bff){return _0x51e8b4(_0x525bff);},'ujkfR':function(_0x5f2f75,_0x5c67c3){return _0x5f2f75===_0x5c67c3;}};if(!_0x4db076)return _0x4db076;const _0x43170b={..._0x4db076};return typeof _0x43170b['baseUrl']===_0x5951e2['fUAyU']&&(_0x43170b[_0x3d3742(0x110)]=_0x5951e2['xPDei'](resolveEnvVars,_0x43170b[_0x3d3742(0x110)])),_0x5951e2[_0x3d3742(0x12f)](typeof _0x43170b[_0x3d3742(0x10d)],_0x5951e2[_0x3d3742(0x129)])&&(_0x43170b['startPath']=resolveEnvVars(_0x43170b['startPath'])),_0x43170b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x6a9221=_0x2a9d;(function(_0xb02736,_0x5918ee){const _0x5e0170=_0x2a9d,_0x333c5c=_0xb02736();while(!![]){try{const _0x1df5c8=parseInt(_0x5e0170(0x19f))/0x1+-parseInt(_0x5e0170(0x1b2))/0x2*(-parseInt(_0x5e0170(0x1a8))/0x3)+-parseInt(_0x5e0170(0x1b0))/0x4*(parseInt(_0x5e0170(0x1a1))/0x5)+parseInt(_0x5e0170(0x1bb))/0x6+parseInt(_0x5e0170(0x1aa))/0x7+parseInt(_0x5e0170(0x1a9))/0x8+-parseInt(_0x5e0170(0x1b6))/0x9*(parseInt(_0x5e0170(0x1a5))/0xa);if(_0x1df5c8===_0x5918ee)break;else _0x333c5c['push'](_0x333c5c['shift']());}catch(_0x417a86){_0x333c5c['push'](_0x333c5c['shift']());}}}(_0x101c,0x6cf9e));function firstDefined(..._0x7df818){const _0x362392=_0x2a9d,_0x47f928={'bCNtc':function(_0x3901f5,_0x51410e){return _0x3901f5!==_0x51410e;},'QSobw':function(_0x539efb,_0xdbc62d){return _0x539efb!==_0xdbc62d;}};for(const _0x4322c4 of _0x7df818){if(_0x47f928[_0x362392(0x1b4)](_0x4322c4,undefined)&&_0x47f928['QSobw'](_0x4322c4,null)&&_0x47f928[_0x362392(0x1ab)](_0x4322c4,''))return _0x4322c4;}return undefined;}function normalizeAuthEnvironmentDomain(_0x5afbdf){const _0x53baf1=_0x2a9d;if(!_0x5afbdf)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x53baf1(0x1bc)](_0x5afbdf))return _0x5afbdf;return'https://'+_0x5afbdf;}export function resolveBaseUrlWithSource(_0x574fc0){const _0x37b7b8=_0x2a9d,_0x1a63d1={'XWrkF':'local\x20profile\x20settings','sLvAq':'string','HsWDl':_0x37b7b8(0x19d),'nhjJo':function(_0x58b2dd,_0x5bad00){return _0x58b2dd(_0x5bad00);},'EXNFF':'auth\x20environment\x20domain','Tfiav':function(_0x143a1f,_0x421730){return _0x143a1f!==_0x421730;},'Brlqx':function(_0x45ea76,_0x56489d){return _0x45ea76!==_0x56489d;}},_0x13426e=_0x574fc0[_0x37b7b8(0x1a6)],_0xe0696f=!!_0x13426e&&_0x37b7b8(0x1a4)in _0x13426e,_0x9b7757=_0x13426e?.['baseUrl'],_0x1065c6=!(_0xe0696f&&_0x9b7757===null),_0x305490=[[_0x574fc0['flagBaseUrl'],_0x37b7b8(0x1ae)],[_0x574fc0[_0x37b7b8(0x1b9)],'RANGER_BASE_URL'],[_0x574fc0['localSettingsBaseUrl'],_0x1a63d1['XWrkF']],[typeof _0x9b7757===_0x1a63d1[_0x37b7b8(0x1ad)]?_0x9b7757:undefined,_0x37b7b8(0x19e)],[_0x1065c6?_0x574fc0['cloudSettings']?.[_0x37b7b8(0x1a4)]:undefined,_0x1a63d1[_0x37b7b8(0x1b3)]],[_0x1065c6?_0x1a63d1[_0x37b7b8(0x1a3)](normalizeAuthEnvironmentDomain,_0x574fc0[_0x37b7b8(0x1b5)]):undefined,_0x1a63d1[_0x37b7b8(0x1a2)]]];for(const [_0x1f320f,_0x1f43a0]of _0x305490){if(_0x1a63d1[_0x37b7b8(0x1af)](_0x1f320f,undefined)&&_0x1f320f!==null&&_0x1a63d1['Brlqx'](_0x1f320f,''))return{'baseUrl':_0x1f320f,'source':_0x1f43a0};}return{};}export function resolveBaseUrl(_0x49aee6){const _0x681fb5=_0x2a9d;return resolveBaseUrlWithSource(_0x49aee6)[_0x681fb5(0x1a4)];}export function resolveStartPath(_0x2d8ec5){const _0x1369c1=_0x2a9d,_0x37fc30={'gpBuy':function(_0x1776c7,_0x57f564,_0xa64e2f,_0x21ebdc,_0x559992){return _0x1776c7(_0x57f564,_0xa64e2f,_0x21ebdc,_0x559992);},'NRSEB':'string'},_0x8569e9=_0x2d8ec5['projectOverrides'],_0x1763ad=!!_0x8569e9&&'startPath'in _0x8569e9,_0x2b309c=_0x8569e9?.['startPath'],_0x4850c2=!(_0x1763ad&&_0x2b309c===null);return _0x37fc30['gpBuy'](firstDefined,_0x2d8ec5[_0x1369c1(0x1b8)],_0x2d8ec5[_0x1369c1(0x1a7)],typeof _0x2b309c===_0x37fc30['NRSEB']?_0x2b309c:undefined,_0x4850c2?_0x2d8ec5[_0x1369c1(0x1ba)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x3f6228,_0x3d9d51){const _0x4cefd4=_0x2a9d,_0x5077dd={'oMYck':function(_0x18ab1e,_0x3cd961){return _0x18ab1e+_0x3cd961;}};if(!_0x3f6228)return undefined;if(!_0x3d9d51)return _0x3f6228;const _0x4a47df=_0x3f6228['endsWith']('/')?_0x3f6228[_0x4cefd4(0x19c)](0x0,-0x1):_0x3f6228,_0x5a5b6d=_0x3d9d51[_0x4cefd4(0x1b1)]('/')?_0x3d9d51:'/'+_0x3d9d51;return _0x5077dd[_0x4cefd4(0x1b7)](_0x4a47df,_0x5a5b6d);}function _0x2a9d(_0x5e4730,_0x2b4270){_0x5e4730=_0x5e4730-0x19b;const _0x101c77=_0x101c();let _0x2a9da2=_0x101c77[_0x5e4730];return _0x2a9da2;}export function resolveProfileUrl(_0x44ca35){const _0x64565c=_0x2a9d,_0x18a9d2={'vmPBu':function(_0x18a36d,_0x759bc){return _0x18a36d(_0x759bc);},'JSNtl':function(_0x222042,_0x5f57e6,_0x3a06ca){return _0x222042(_0x5f57e6,_0x3a06ca);}},{baseUrl:_0x213f97,source:_0x2bc53c}=_0x18a9d2[_0x64565c(0x19b)](resolveBaseUrlWithSource,_0x44ca35),_0x348ad9=resolveStartPath(_0x44ca35);return{'baseUrl':_0x213f97,'baseUrlSource':_0x2bc53c,'startPath':_0x348ad9,'url':_0x18a9d2['JSNtl'](joinBaseAndPath,_0x213f97,_0x348ad9)};}function _0x101c(){const _0x4f2eda=['cloudSettings','3999210oRAduS','test','vmPBu','slice','cloud\x20profile\x20settings','projects.json\x20override','778441GoyIOS','env','900irzjUF','EXNFF','nhjJo','baseUrl','440GwyEHM','projectOverrides','envStartPath','2013Cpouzm','1824584Cpkpxf','4707899vyXxXR','QSobw','RANGER_START_PATH','sLvAq','--base-url','Tfiav','17404GsIKro','startsWith','8edZLRq','HsWDl','bCNtc','authEnvironmentDomain','228834CVuFDx','oMYck','flagStartPath','envBaseUrl'];_0x101c=function(){return _0x4f2eda;};return _0x101c();}export function readUrlEnvVars(_0x4495c3=process[_0x6a9221(0x1a0)]){const _0x2b4a0d=_0x6a9221;return{'envBaseUrl':_0x4495c3['RANGER_BASE_URL'],'envStartPath':_0x4495c3[_0x2b4a0d(0x1ac)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4cb483,_0xf0207a){const _0x4dc749=_0x406f,_0x1deb1c=_0x4cb483();while(!![]){try{const _0x340c54=parseInt(_0x4dc749(0x15a))/0x1*(parseInt(_0x4dc749(0x151))/0x2)+-parseInt(_0x4dc749(0x15c))/0x3+-parseInt(_0x4dc749(0x157))/0x4+parseInt(_0x4dc749(0x15e))/0x5+parseInt(_0x4dc749(0x15d))/0x6*(-parseInt(_0x4dc749(0x152))/0x7)+-parseInt(_0x4dc749(0x153))/0x8+parseInt(_0x4dc749(0x156))/0x9;if(_0x340c54===_0xf0207a)break;else _0x1deb1c['push'](_0x1deb1c['shift']());}catch(_0x4e016d){_0x1deb1c['push'](_0x1deb1c['shift']());}}}(_0x3b2a,0x2ea1f));function _0x3b2a(){const _0x5dd684=['YqkJr','961494ERAUXN','6SQBRlm','182380YbTHGO','\x20failed\x20(attempt\x20','30mEbgkI','608426iPcGQw','1499144hQnbbP','maxRetries','label','5320962LQGbIE','406892bIsycs','pow','Butfz','17323TRNdoa'];_0x3b2a=function(){return _0x5dd684;};return _0x3b2a();}function _0x406f(_0x36e054,_0x25f921){_0x36e054=_0x36e054-0x150;const _0x3b2a8a=_0x3b2a();let _0x406fd3=_0x3b2a8a[_0x36e054];return _0x406fd3;}const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x3dd5e9,_0x1cfd2b){const _0x2949dd=_0x406f,_0x3ed8c5={'tihLt':function(_0x2fc7dd,_0x521e10){return _0x2fc7dd<=_0x521e10;},'cWKKE':function(_0x167829,_0x10e591){return _0x167829 instanceof _0x10e591;},'YqkJr':function(_0x4041ee,_0x38d5e4){return _0x4041ee(_0x38d5e4);},'Butfz':function(_0x45f718,_0x2c8eca){return _0x45f718+_0x2c8eca;}},_0x186d4f=_0x1cfd2b?.[_0x2949dd(0x154)]??DEFAULT_MAX_RETRIES,_0x3d05e9=_0x1cfd2b?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x1dd1a7;for(let _0x1b8815=0x0;_0x3ed8c5['tihLt'](_0x1b8815,_0x186d4f);_0x1b8815++){try{return await _0x3dd5e9();}catch(_0xe00844){_0x1dd1a7=_0x3ed8c5['cWKKE'](_0xe00844,Error)?_0xe00844:new Error(_0x3ed8c5[_0x2949dd(0x15b)](String,_0xe00844));if(_0x1b8815<_0x186d4f){const _0x112282=_0x3d05e9*Math[_0x2949dd(0x158)](0x2,_0x1b8815);_0x1cfd2b?.[_0x2949dd(0x155)]&&console['error'](_0x1cfd2b['label']+_0x2949dd(0x150)+_0x3ed8c5[_0x2949dd(0x159)](_0x1b8815,0x1)+'/'+(_0x186d4f+0x1)+'),\x20retrying\x20in\x20'+_0x112282+'ms...'),await new Promise(_0x174daa=>setTimeout(_0x174daa,_0x112282));}}}throw _0x1dd1a7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3acdc3,_0x30490b){const _0xa95374=_0x11f7,_0x146c5e=_0x3acdc3();while(!![]){try{const _0x46ca0e=-parseInt(_0xa95374(0xe3))/0x1+parseInt(_0xa95374(0xe6))/0x2+parseInt(_0xa95374(0xe7))/0x3+parseInt(_0xa95374(0xe0))/0x4*(parseInt(_0xa95374(0xdf))/0x5)+-parseInt(_0xa95374(0xde))/0x6+-parseInt(_0xa95374(0xe4))/0x7+parseInt(_0xa95374(0xe2))/0x8;if(_0x46ca0e===_0x30490b)break;else _0x146c5e['push'](_0x146c5e['shift']());}catch(_0x58e55f){_0x146c5e['push'](_0x146c5e['shift']());}}}(_0x4f33,0x54303));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;function _0x11f7(_0xe1f85e,_0x5e7798){_0xe1f85e=_0xe1f85e-0xde;const _0x4f3353=_0x4f33();let _0x11f7c4=_0x4f3353[_0xe1f85e];return _0x11f7c4;}export function extractUrlOrigins(_0xd4f2b7){const _0x1a74cf=_0x11f7,_0x5364f1=new Set();for(const _0x591a97 of _0xd4f2b7['matchAll'](ABSOLUTE_URL_PATTERN)){const _0x50f902=_0x591a97[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x5364f1[_0x1a74cf(0xe5)](new URL(_0x50f902)['origin']);}catch{}}return[..._0x5364f1];}export function findScenarioOriginMismatches(_0x5df0db,_0x3031ba){const _0x11d8f0=_0x11f7;let _0x3cf323;try{_0x3cf323=new URL(_0x3031ba)[_0x11d8f0(0xe1)];}catch{return[];}return extractUrlOrigins(_0x5df0db)['filter'](_0x525736=>_0x525736!==_0x3cf323);}function _0x4f33(){const _0x251528=['755WtbxHz','2284QrmEFg','origin','5631976aTYqKi','558544OWgkcx','2871764GeIqyr','add','1002328HgxDlY','826212qNGESk','1518930cqizdf'];_0x4f33=function(){return _0x251528;};return _0x4f33();}
|
|
@@ -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 _0x5d81ba=_0x1186;(function(_0x154e22,_0x1a21e2){const _0x1a6444=_0x1186,_0x25e3fb=_0x154e22();while(!![]){try{const _0x301894=parseInt(_0x1a6444(0xeb))/0x1+-parseInt(_0x1a6444(0xfb))/0x2+parseInt(_0x1a6444(0x104))/0x3+parseInt(_0x1a6444(0xfc))/0x4+-parseInt(_0x1a6444(0xf2))/0x5*(parseInt(_0x1a6444(0xf5))/0x6)+-parseInt(_0x1a6444(0xe5))/0x7+-parseInt(_0x1a6444(0xee))/0x8;if(_0x301894===_0x1a21e2)break;else _0x25e3fb['push'](_0x25e3fb['shift']());}catch(_0xfa3a1b){_0x25e3fb['push'](_0x25e3fb['shift']());}}}(_0x21b5,0x3c0f7));import*as _0x3cee18 from'fs';import*as _0x84a647 from'path';import*as _0x4d634e from'os';import{execSync}from'child_process';const CACHE_FILE=_0x84a647[_0x5d81ba(0xed)](_0x4d634e['homedir'](),_0x5d81ba(0xf3),_0x5d81ba(0x10e));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x48d2e3=_0x5d81ba,_0xf88fe7={'PwsbN':function(_0x553b6d){return _0x553b6d();}};try{if(_0x3cee18[_0x48d2e3(0xff)](CACHE_FILE)){const _0xfe835=JSON['parse'](_0x3cee18['readFileSync'](CACHE_FILE,'utf-8'));return{'version':0x3,'sessions':_0xfe835['sessions']||{},'branches':_0xfe835['branches']||{},'lastEnabledSessionClearedAt':_0xfe835['lastEnabledSessionClearedAt']};}}catch{}return _0xf88fe7[_0x48d2e3(0x116)](createEmptyCache);}function saveCache(_0x454382){const _0x5d4a5e=_0x5d81ba;try{const _0x3a3fb=_0x84a647[_0x5d4a5e(0xfa)](CACHE_FILE);!_0x3cee18['existsSync'](_0x3a3fb)&&_0x3cee18[_0x5d4a5e(0x10f)](_0x3a3fb,{'recursive':!![]}),_0x3cee18[_0x5d4a5e(0xf4)](CACHE_FILE,JSON['stringify'](_0x454382,null,0x2));}catch{}}export function getCurrentBranch(){const _0x1e13dc=_0x5d81ba,_0x5c8738={'RCrVQ':_0x1e13dc(0x115),'CoTdg':function(_0x3103d4,_0x4d61f5){return _0x3103d4===_0x4d61f5;},'CulxK':_0x1e13dc(0x112)};try{const _0xec7d35=execSync(_0x1e13dc(0xef),{'encoding':_0x1e13dc(0xf8),'stdio':['pipe',_0x5c8738[_0x1e13dc(0xe9)],_0x1e13dc(0x115)]})[_0x1e13dc(0x101)]();if(!_0xec7d35||_0x5c8738[_0x1e13dc(0xe8)](_0xec7d35,_0x5c8738[_0x1e13dc(0xf6)]))return null;return _0xec7d35;}catch{return null;}}export function enableBranch(_0x5e869e){const _0x2d88b7=_0x5d81ba,_0x49a82e={'AWrgw':function(_0x2423cd){return _0x2423cd();}},_0x13cb67=_0x49a82e[_0x2d88b7(0xea)](loadCache);_0x13cb67['branches'][_0x5e869e]=!![],saveCache(_0x13cb67);}function _0x21b5(){const _0x1539fd=['HmDTj','registeredAt','branches','.ranger_cache.json','mkdirSync','featureId','pgUJP','HEAD','pRERv','mtAIF','pipe','PwsbN','DPALb','CXXbr','now','Mwfuz','1032913wGGQWO','lastStopReminderAt','jFAhv','CoTdg','RCrVQ','AWrgw','424512AXSHUk','PLJQr','join','1144960zUZvpW','git\x20rev-parse\x20--abbrev-ref\x20HEAD','aKpoK','CcQrR','5665Ciweqm','.claude','writeFileSync','1038MkcWhy','CulxK','master','utf-8','enabled','dirname','928998FqVQjP','1695192KncChq','ydccl','currentBranch','existsSync','wjYjq','trim','azcSy','main','1046652vzxYzv','lastEnabledSessionClearedAt','MWAIG','sessions','BDACf','PBuGn','OiHQj'];_0x21b5=function(){return _0x1539fd;};return _0x21b5();}export function disableBranch(_0x145764){const _0x50718a=_0x5d81ba,_0x650e42={'mUfdw':function(_0x23df73){return _0x23df73();}},_0x51d1c9=_0x650e42['mUfdw'](loadCache);delete _0x51d1c9[_0x50718a(0x10d)][_0x145764],saveCache(_0x51d1c9);}function _0x1186(_0x2e7bfc,_0x404319){_0x2e7bfc=_0x2e7bfc-0xe5;const _0x21b5ae=_0x21b5();let _0x118662=_0x21b5ae[_0x2e7bfc];return _0x118662;}export function isBranchEnabled(_0xa02aa3){const _0x43aca6=_0x5d81ba,_0x103152=loadCache();return _0x103152[_0x43aca6(0x10d)][_0xa02aa3]===!![];}function getOrCreateSession(_0x22d837,_0x146a87){const _0xd8008e=_0x5d81ba;return!_0x22d837[_0xd8008e(0x107)][_0x146a87]&&(_0x22d837['sessions'][_0x146a87]={}),_0x22d837['sessions'][_0x146a87];}export function enableSession(_0x2b0367){const _0x4009b8=_0x5d81ba,_0x38df17={'DPALb':function(_0x1a8f70){return _0x1a8f70();},'DGmEi':function(_0x2b020c,_0x18e96a,_0x5b9773){return _0x2b020c(_0x18e96a,_0x5b9773);},'OiHQj':_0x4009b8(0x103),'aKpoK':function(_0x45bd4e,_0x15de7e){return _0x45bd4e!==_0x15de7e;}},_0x2a35a4=_0x38df17['DPALb'](loadCache),_0x116243=_0x38df17['DGmEi'](getOrCreateSession,_0x2a35a4,_0x2b0367);_0x116243[_0x4009b8(0xf9)]=!![];const _0x317b4e=_0x38df17[_0x4009b8(0x117)](getCurrentBranch);_0x317b4e&&_0x317b4e!==_0x38df17[_0x4009b8(0x10a)]&&_0x38df17[_0x4009b8(0xf0)](_0x317b4e,_0x4009b8(0xf7))&&(_0x2a35a4['branches'][_0x317b4e]=!![],_0x116243['currentBranch']=_0x317b4e),saveCache(_0x2a35a4);}export function isSessionEnabled(_0xa3da3b){const _0x26bde8=_0x5d81ba,_0x296ce4={'LjmPm':function(_0x10761b){return _0x10761b();},'HHTBi':_0x26bde8(0x103),'PLJQr':_0x26bde8(0xf7),'HmDTj':function(_0x8c3c5d,_0x2830df){return _0x8c3c5d===_0x2830df;},'qMxba':function(_0x5f3e48,_0x455802){return _0x5f3e48||_0x455802;}},_0x1e05cd=loadCache(),_0x442cd7=_0x296ce4['LjmPm'](getCurrentBranch);if(!_0x442cd7||_0x442cd7===_0x296ce4['HHTBi']||_0x442cd7===_0x296ce4[_0x26bde8(0xec)])return _0x296ce4[_0x26bde8(0x10b)](_0x1e05cd['sessions'][_0xa3da3b]?.[_0x26bde8(0xf9)],!![]);const _0x264bce=_0x1e05cd['branches'][_0x442cd7]===!![],_0x5e90fa=_0x1e05cd['sessions'][_0xa3da3b]?.['enabled']===!![];return _0x296ce4['qMxba'](_0x264bce,_0x5e90fa);}export function disableSession(_0x2ee8a4){const _0x7d0539=_0x5d81ba,_0x38f2dd={'ydccl':function(_0x2ab5ab){return _0x2ab5ab();},'veinV':function(_0x3d02eb,_0x21af82,_0x5de278){return _0x3d02eb(_0x21af82,_0x5de278);}},_0x40fd3d=_0x38f2dd[_0x7d0539(0xfd)](loadCache),_0x19aa3f=_0x38f2dd['veinV'](getOrCreateSession,_0x40fd3d,_0x2ee8a4);_0x19aa3f[_0x7d0539(0xf9)]=![],saveCache(_0x40fd3d);}export function updateBranchTracking(_0x409c0e){const _0x12a99b=_0x5d81ba,_0x195388={'ZswVm':function(_0x47bac5){return _0x47bac5();},'MObVk':function(_0xdad4dd,_0x57cc56){return _0xdad4dd===_0x57cc56;}},_0x494525=loadCache(),_0x51dd87=_0x494525['sessions'][_0x409c0e];if(!_0x51dd87?.[_0x12a99b(0xf9)])return;const _0x3135e1=_0x195388['ZswVm'](getCurrentBranch);if(!_0x3135e1||_0x195388['MObVk'](_0x3135e1,'main')||_0x195388['MObVk'](_0x3135e1,'master'))return;_0x51dd87[_0x12a99b(0xfe)]!==_0x3135e1&&(_0x494525['branches'][_0x3135e1]=!![],_0x51dd87[_0x12a99b(0xfe)]=_0x3135e1,saveCache(_0x494525));}export function initBranchTracking(_0xe8272f){const _0xa36c01=_0x5d81ba,_0x5262df={'cjdim':function(_0x27a0e2){return _0x27a0e2();},'pRERv':function(_0x4838c5,_0xa0d652){return _0x4838c5===_0xa0d652;},'azcSy':'master','vmaHz':function(_0xa62e33,_0x5cbf90){return _0xa62e33(_0x5cbf90);}},_0x37ee3a=loadCache(),_0x5b809b=_0x5262df['cjdim'](getCurrentBranch);if(!_0x5b809b||_0x5b809b===_0xa36c01(0x103)||_0x5262df[_0xa36c01(0x113)](_0x5b809b,_0x5262df[_0xa36c01(0x102)]))return;if(_0x37ee3a['branches'][_0x5b809b]===!![]){const _0x409506=getOrCreateSession(_0x37ee3a,_0xe8272f);_0x409506['enabled']=!![],_0x409506['currentBranch']=_0x5b809b,_0x5262df['vmaHz'](saveCache,_0x37ee3a);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x953da5){const _0x30a1c7=_0x5d81ba,_0x495f74={'CcQrR':function(_0x6502c8){return _0x6502c8();}},_0x14a78c=_0x495f74[_0x30a1c7(0xf1)](loadCache),_0x48913b=_0x14a78c['sessions'][_0x953da5];_0x48913b?.[_0x30a1c7(0xf9)]&&(_0x14a78c[_0x30a1c7(0x105)]=Date['now'](),saveCache(_0x14a78c));}export function shouldAutoEnableAfterClear(_0x187bb4){const _0x3673e6={'Jopno':function(_0x44fe36){return _0x44fe36();},'EUeCS':function(_0x329761,_0x14c73d){return _0x329761-_0x14c73d;}};if(_0x187bb4!=='clear')return![];const _0x2b1de6=_0x3673e6['Jopno'](loadCache),_0x1fa61b=_0x2b1de6['lastEnabledSessionClearedAt'];if(!_0x1fa61b)return![];const _0x5db982=_0x3673e6['EUeCS'](Date['now'](),_0x1fa61b);return _0x5db982<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x3b3ac0){const _0x3cf439=_0x5d81ba,_0x3b135d={'pgUJP':function(_0x9a00e7){return _0x9a00e7();},'RKdbZ':function(_0x4d7062,_0x3f482d){return _0x4d7062!==_0x3f482d;},'Mwfuz':'master'},_0x4acf91=loadCache(),_0x368154=getOrCreateSession(_0x4acf91,_0x3b3ac0);_0x368154['enabled']=!![];const _0x489e8b=_0x3b135d[_0x3cf439(0x111)](getCurrentBranch);_0x489e8b&&_0x3b135d['RKdbZ'](_0x489e8b,'main')&&_0x489e8b!==_0x3b135d[_0x3cf439(0x11a)]&&(_0x368154[_0x3cf439(0xfe)]=_0x489e8b),delete _0x4acf91[_0x3cf439(0x105)],saveCache(_0x4acf91);}export function registerSession(_0x405008,_0x50fdc8){const _0x54308f=_0x5d81ba,_0x336d65={'UimuF':function(_0x48b512){return _0x48b512();},'GOOzR':function(_0x19a5fa,_0x347f51,_0x2f1fcf){return _0x19a5fa(_0x347f51,_0x2f1fcf);}},_0x47e9b1=_0x336d65['UimuF'](loadCache),_0x4a5773=_0x336d65['GOOzR'](getOrCreateSession,_0x47e9b1,_0x405008);_0x4a5773['featureId']=_0x50fdc8,_0x4a5773[_0x54308f(0x10c)]=new Date()['toISOString'](),saveCache(_0x47e9b1);}export function getSessionEntry(_0x48eb59){const _0x1d42b7=_0x5d81ba,_0x41f5a2=loadCache(),_0x279973=_0x41f5a2[_0x1d42b7(0x107)][_0x48eb59];if(_0x279973?.['featureId']&&_0x279973?.[_0x1d42b7(0x10c)])return{'featureId':_0x279973[_0x1d42b7(0x110)],'registeredAt':_0x279973[_0x1d42b7(0x10c)]};return null;}export function unregisterSession(_0x458b13){const _0x17daa5=_0x5d81ba,_0x569f2a={'jFAhv':function(_0x1ec3da){return _0x1ec3da();}},_0x23346f=_0x569f2a[_0x17daa5(0xe7)](loadCache),_0xdb837f=_0x23346f[_0x17daa5(0x107)][_0x458b13];_0xdb837f&&(delete _0xdb837f['featureId'],delete _0xdb837f['registeredAt'],saveCache(_0x23346f));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x47105c){const _0x4ab5bf=_0x5d81ba,_0x46391a={'isAGM':function(_0x5f01c1){return _0x5f01c1();},'BDACf':function(_0x320fcb,_0x1a45c6,_0x5b1858){return _0x320fcb(_0x1a45c6,_0x5b1858);},'PBuGn':function(_0x18a7f5,_0x340dfa){return _0x18a7f5-_0x340dfa;},'nsQGa':function(_0x1060b5,_0x26cabf){return _0x1060b5(_0x26cabf);}},_0x5044af=_0x46391a['isAGM'](loadCache),_0x23bfdc=_0x46391a[_0x4ab5bf(0x108)](getOrCreateSession,_0x5044af,_0x47105c),_0x55957a=_0x23bfdc['lastPlanReminderAt']||0x0,_0xff65ae=Date[_0x4ab5bf(0x119)]();if(_0x46391a[_0x4ab5bf(0x109)](_0xff65ae,_0x55957a)>=PLAN_REMINDER_INTERVAL_MS)return _0x23bfdc['lastPlanReminderAt']=_0xff65ae,_0x46391a['nsQGa'](saveCache,_0x5044af),!![];return![];}export function shouldShowStopReminder(_0x3477d7){const _0x183aa5=_0x5d81ba,_0x850a31={'wjYjq':function(_0x578864,_0x9b968a,_0x2c477e){return _0x578864(_0x9b968a,_0x2c477e);},'vCGKQ':function(_0x41f07f,_0x2cfeaa){return _0x41f07f>=_0x2cfeaa;},'XmWsU':function(_0x2ea3ea,_0x1e38a4){return _0x2ea3ea-_0x1e38a4;},'mtAIF':function(_0x334799,_0x2521c5){return _0x334799(_0x2521c5);}},_0x1c79a1=loadCache(),_0x595e82=_0x850a31[_0x183aa5(0x100)](getOrCreateSession,_0x1c79a1,_0x3477d7),_0x3ca618=_0x595e82['lastStopReminderAt']||0x0,_0x35419d=Date[_0x183aa5(0x119)]();if(_0x850a31['vCGKQ'](_0x850a31['XmWsU'](_0x35419d,_0x3ca618),STOP_REMINDER_INTERVAL_MS))return _0x595e82[_0x183aa5(0xe6)]=_0x35419d,_0x850a31[_0x183aa5(0x114)](saveCache,_0x1c79a1),!![];return![];}export function hasSessionBeenPrompted(_0x2489ac){const _0x2151e2=_0x5d81ba,_0x1adebe={'YSpcw':function(_0x2e2930){return _0x2e2930();}},_0x2748a6=_0x1adebe['YSpcw'](loadCache);return _0x2748a6[_0x2151e2(0x107)][_0x2489ac]?.['prompted']===!![];}export function markSessionPrompted(_0x26a0cb){const _0xeeed78=_0x5d81ba,_0x399f8b={'CXXbr':function(_0x239a0e){return _0x239a0e();},'MWAIG':function(_0x41a06a,_0x589f64,_0xa89671){return _0x41a06a(_0x589f64,_0xa89671);}},_0x44cb16=_0x399f8b[_0xeeed78(0x118)](loadCache),_0x5b3d27=_0x399f8b[_0xeeed78(0x106)](getOrCreateSession,_0x44cb16,_0x26a0cb);_0x5b3d27['prompted']=!![],saveCache(_0x44cb16);}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 _0x2b2e19=_0x1ee5;(function(_0x5ed2e5,_0x43fca2){const _0x9e4472=_0x1ee5,_0x4e3ae7=_0x5ed2e5();while(!![]){try{const _0x581abe=parseInt(_0x9e4472(0x1f7))/0x1+parseInt(_0x9e4472(0x220))/0x2+parseInt(_0x9e4472(0x1f9))/0x3*(-parseInt(_0x9e4472(0x23c))/0x4)+-parseInt(_0x9e4472(0x214))/0x5*(parseInt(_0x9e4472(0x269))/0x6)+-parseInt(_0x9e4472(0x267))/0x7+-parseInt(_0x9e4472(0x242))/0x8+parseInt(_0x9e4472(0x239))/0x9;if(_0x581abe===_0x43fca2)break;else _0x4e3ae7['push'](_0x4e3ae7['shift']());}catch(_0x4bc3c2){_0x4e3ae7['push'](_0x4e3ae7['shift']());}}}(_0x718d,0xc7ed7));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(_0x954fb8,_0x3ab98e){const _0x28d8ac=_0x1ee5,_0x5b1a43={'nYbmV':function(_0x3ebbce,_0x20f40e,_0x486f0b,_0x3fd476){return _0x3ebbce(_0x20f40e,_0x486f0b,_0x3fd476);},'DkSwr':'local','aTXZL':function(_0x2789b0,_0x5321a8,_0x275772){return _0x2789b0(_0x5321a8,_0x275772);},'qiYDL':function(_0x109980,_0x521837){return _0x109980(_0x521837);}},_0xf58d60=join(_0x3ab98e,'ci',_0x954fb8),_0x1fce14=_0x5b1a43['nYbmV'](join,_0x3ab98e,_0x5b1a43[_0x28d8ac(0x218)],_0x954fb8),_0x51d7e8=join(_0x3ab98e,_0x954fb8),_0x19abfe=_0x5b1a43['aTXZL'](join,_0x3ab98e,_0x28d8ac(0x206)),_0x2da3b2=join(_0x3ab98e,'ci');if(_0x5b1a43['qiYDL'](existsSync,_0xf58d60))return _0xf58d60;if(existsSync(_0x1fce14))return _0x1fce14;if(existsSync(_0x51d7e8)&&(_0x51d7e8!==_0x19abfe&&_0x51d7e8!==_0x2da3b2?!![]:hasLegacyProfileFiles(_0x51d7e8)))return _0x51d7e8;return null;}export function getEnvDir(_0x151777,_0x311118={}){const _0x11aa58=_0x1ee5,_0x57fc9f={'ckXhM':function(_0x3df58b){return _0x3df58b();},'lyyru':function(_0x21f103,_0x17dd65){return _0x21f103(_0x17dd65);},'RNVmV':function(_0x42a5bc){return _0x42a5bc();},'CEfWC':function(_0x3577b2,_0xc8679f,_0x23ad14){return _0x3577b2(_0xc8679f,_0x23ad14);},'QzymC':function(_0x226ef1,_0x3f67d7,_0x1733ef){return _0x226ef1(_0x3f67d7,_0x1733ef);},'aqeop':function(_0x2c1c05,_0x4df1f1,_0x1e6ffc,_0x53bda1){return _0x2c1c05(_0x4df1f1,_0x1e6ffc,_0x53bda1);}},_0x2f51b1=_0x57fc9f['ckXhM'](getRangerDir),_0x108ca9=findEnvInRoot(_0x151777,_0x2f51b1);if(_0x108ca9){if(_0x311118['forWrite']&&_0x57fc9f['lyyru'](isLegacyEnvPath,_0x108ca9))throw legacyWriteError(_0x151777,_0x108ca9);return _0x108ca9;}const _0x487bec=_0x57fc9f[_0x11aa58(0x256)](getRangerHomeDir);if(_0x487bec!==_0x2f51b1){const _0x3f394a=_0x57fc9f[_0x11aa58(0x253)](findEnvInRoot,_0x151777,_0x487bec);if(_0x3f394a){if(_0x311118['forWrite']&&isLegacyEnvPath(_0x3f394a))throw _0x57fc9f['QzymC'](legacyWriteError,_0x151777,_0x3f394a);return _0x3f394a;}}const _0x441943=_0x57fc9f['aqeop'](join,_0x487bec,_0x11aa58(0x206),_0x151777);if(_0x311118[_0x11aa58(0x248)])throw legacyWriteError(_0x151777,_0x441943);return _0x441943;}function isLegacyEnvPath(_0x17876d){const _0x1e1262=_0x1ee5,_0x3689d9={'UqVQG':function(_0x47ee8c){return _0x47ee8c();}},_0x400f0a=_0x3689d9['UqVQG'](getRangerDir),_0xfd9f51=getRangerHomeDir();for(const _0x50230d of new Set([_0x400f0a,_0xfd9f51])){const _0x12412a=_0x50230d['endsWith']('/')?_0x50230d:_0x50230d+'/';if(_0x17876d===_0x50230d||_0x17876d[_0x1e1262(0x208)](_0x12412a))return!![];}return![];}function legacyWriteError(_0x180181,_0x5b4b2b){const _0x2efcb7=_0x1ee5,_0x1fcaa={'fFPZb':function(_0x4543a6,_0x5c8549){return _0x4543a6+_0x5c8549;},'FxSZT':function(_0xbec5e7,_0x28a702){return _0xbec5e7+_0x28a702;}};return new Error(_0x1fcaa[_0x2efcb7(0x249)](_0x1fcaa['FxSZT']('Refusing\x20to\x20write\x20profile\x20\x22'+_0x180181+'\x22\x20to\x20legacy\x20path\x20'+_0x5b4b2b+'.\x0a',_0x2efcb7(0x235))+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a',_0x2efcb7(0x229)));}export function findExistingEnv(_0x5ad009,_0xf31028){const _0x3b04f8=_0x1ee5,_0x5646a8={'CIzSg':_0x3b04f8(0x206),'wERLN':_0x3b04f8(0x24f),'xRMTB':function(_0x3ea92d,_0x3be637,_0x80026d){return _0x3ea92d(_0x3be637,_0x80026d);},'ywmwQ':function(_0x11b13d,_0xf34127,_0x41412b){return _0x11b13d(_0xf34127,_0x41412b);},'OlzMU':function(_0x374ffa,_0x4937f4){return _0x374ffa===_0x4937f4;}},_0x44572a=_0xf31028?.[_0x3b04f8(0x238)],_0x184a8a=_0x44572a?[_0x44572a]:[getRangerDir(),getRangerHomeDir()][_0x3b04f8(0x237)]((_0x4cb036,_0x327330,_0x18f46d)=>_0x18f46d[_0x3b04f8(0x25f)](_0x4cb036)===_0x327330),_0x138634=_0xf31028?.[_0x3b04f8(0x24c)]??['ci',_0x5646a8[_0x3b04f8(0x21e)],_0x5646a8[_0x3b04f8(0x1f5)]];for(const _0x5df030 of _0x184a8a){const _0x3f5488=join(_0x5df030,_0x5646a8[_0x3b04f8(0x21e)]),_0x406264=_0x5646a8['xRMTB'](join,_0x5df030,'ci'),_0x1f1132=[{'location':'ci','path':join(_0x5df030,'ci',_0x5ad009)},{'location':_0x3b04f8(0x206),'path':join(_0x5df030,_0x5646a8['CIzSg'],_0x5ad009)},{'location':_0x5646a8[_0x3b04f8(0x1f5)],'path':_0x5646a8[_0x3b04f8(0x236)](join,_0x5df030,_0x5ad009)}];for(const _0x2f4d95 of _0x1f1132){if(_0x138634[_0x3b04f8(0x1f6)](_0x2f4d95[_0x3b04f8(0x25b)])&&existsSync(_0x2f4d95[_0x3b04f8(0x212)])){if(_0x5646a8['OlzMU'](_0x2f4d95['location'],_0x3b04f8(0x24f))&&(_0x2f4d95['path']===_0x3f5488||_0x2f4d95[_0x3b04f8(0x212)]===_0x406264)&&!hasLegacyProfileFiles(_0x2f4d95[_0x3b04f8(0x212)]))continue;return{'path':_0x2f4d95[_0x3b04f8(0x212)],'location':_0x2f4d95[_0x3b04f8(0x25b)]};}}}return null;}function hasLegacyProfileFiles(_0x2fafdf){const _0x530875=_0x1ee5,_0x3e012b={'faJxX':function(_0x2a5f70,_0x5db2ed,_0x375025){return _0x2a5f70(_0x5db2ed,_0x375025);},'aLDGt':_0x530875(0x23a),'WwkeZ':function(_0x13532e,_0x183c76){return _0x13532e(_0x183c76);},'QiRAT':function(_0xee17e9,_0x3d83d9,_0x172c94){return _0xee17e9(_0x3d83d9,_0x172c94);}};return existsSync(_0x3e012b['faJxX'](join,_0x2fafdf,_0x530875(0x221)))||existsSync(_0x3e012b['faJxX'](join,_0x2fafdf,_0x3e012b['aLDGt']))||_0x3e012b[_0x530875(0x219)](existsSync,_0x3e012b['QiRAT'](join,_0x2fafdf,_0x530875(0x24e)));}function _0x718d(){const _0x258970=['core','stagehand','parse','CEfWC','mbRsX','code','RNVmV','catch','vknlJ','ranger-auth-','isArray','location','jpjqk','pdf','--disable-setuid-sandbox','indexOf','--allow-running-insecure-content','KvPIJ','entries','clipboard-read','allow','MUyXv','map','353122AomhUc','OHDLK','42gNqOEm','Environment\x20variable\x20','getuid','--disable-features=WebBluetooth','--unsafely-treat-insecure-origin-as-secure=http://localhost','Xqtue','replace','qCpfO','wERLN','includes','636373XGrsKL','storageStatePath','151341ogysQA','yqZpg','IGWBa','extraHTTPHeaders','cdpEndpoint','NIBID','--no-sandbox','UPRPs','DjceI','stringify','yIfts','allowInsecureLocalhost','XWKmL','local','LQpKY','startsWith','ENOENT','AKsbK','BNpwX','QoFbx','qzoxA','args','utf-8','push','safeMode','path','ignoreHTTPSErrors','363570jJKYfY','HZRtX','zUfIk','contextOptions','DkSwr','WwkeZ','GmXro','BpORK','GaGCW','playwright-cli','CIzSg','SqRaT','1264740eVDNiY','settings.json','PRDCs','rmHsO','clipboard-write','psoOd','ISboD','devtools','PpVRo','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','warn','object','length','OuuGU','VioBL','executablePath','string','all','wmQoT','userAgent','storageState','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ywmwQ','filter','rangerDir','13933188yQQvAy','auth.json','ranger-config','108GwacOr','fromEntries','Ddixh','QvZes','.json','AgPQf','611672Oitgby','Failed\x20to\x20decrypt\x20auth\x20state:\x20','nTrYi','PjUcl','now','chromium','forWrite','fFPZb','setupHeader','headless','locations','ScXni','auth.json.enc','legacy'];_0x718d=function(){return _0x258970;};return _0x718d();}export function isEnvCi(_0x4c3619){const _0x4e6113=_0x1ee5,_0x1f943b={'MUyXv':function(_0x3537cd,_0xa490b4){return _0x3537cd(_0xa490b4);},'vknlJ':function(_0x33f5ee){return _0x33f5ee();},'BpORK':function(_0x401278,_0x48f2cb,_0x473dc5,_0x10be41){return _0x401278(_0x48f2cb,_0x473dc5,_0x10be41);}};if(_0x1f943b['MUyXv'](existsSync,join(_0x1f943b[_0x4e6113(0x258)](getRangerDir),'ci',_0x4c3619)))return!![];const _0x5a8d3b=getRangerHomeDir();if(_0x5a8d3b!==_0x1f943b['vknlJ'](getRangerDir)&&_0x1f943b[_0x4e6113(0x265)](existsSync,_0x1f943b[_0x4e6113(0x21b)](join,_0x5a8d3b,'ci',_0x4c3619)))return!![];return![];}export async function cleanupTempFiles(_0x3946d9){const _0x1f4336=_0x1ee5,_0x4e5de7={'RyeEd':_0x1f4336(0x209)},_0x503b4d=[_0x3946d9['tempAuthPath'],_0x3946d9['configPath']][_0x1f4336(0x237)](Boolean);await Promise[_0x1f4336(0x231)](_0x503b4d[_0x1f4336(0x266)](_0x2eca08=>unlink(_0x2eca08)[_0x1f4336(0x257)](_0x359d3a=>{const _0xadbcc2=_0x1f4336;_0x359d3a[_0xadbcc2(0x255)]!==_0x4e5de7['RyeEd']&&console[_0xadbcc2(0x22a)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x2eca08+':',_0x359d3a['message']);})));}export function getSettingsPath(_0x2fdb90){const _0xcf19=_0x1ee5,_0x5a2624={'PRDCs':function(_0x10284b,_0x118d8f,_0x2c2f61){return _0x10284b(_0x118d8f,_0x2c2f61);},'FjJLf':_0xcf19(0x221)};return _0x5a2624[_0xcf19(0x222)](join,getEnvDir(_0x2fdb90),_0x5a2624['FjJLf']);}export async function loadSettings(_0x5b0450){const _0x2a9d1a=_0x1ee5,_0x2e21cc={'UPRPs':function(_0x103ce1,_0x26fa8f){return _0x103ce1(_0x26fa8f);},'KCRST':_0x2a9d1a(0x20f)},_0x21f352=_0x2e21cc[_0x2a9d1a(0x200)](getSettingsPath,_0x5b0450);if(!existsSync(_0x21f352))return{};try{const _0x1c4b76=await readFile(_0x21f352,_0x2e21cc['KCRST']);return JSON[_0x2a9d1a(0x252)](_0x1c4b76);}catch{return{};}}export async function saveSettings(_0x5f7223,_0x159c41){const _0x4af82e=_0x1ee5,_0x4e526b={'HZRtX':function(_0x23b4db,_0x3db465){return _0x23b4db(_0x3db465);},'yqZpg':function(_0x302350,_0x2671d8,_0x420ef6){return _0x302350(_0x2671d8,_0x420ef6);}},_0xef64a3=_0x4e526b[_0x4af82e(0x215)](getSettingsPath,_0x5f7223),_0x4a33e0=_0x4e526b[_0x4af82e(0x215)](dirname,_0xef64a3);!existsSync(_0x4a33e0)&&await _0x4e526b[_0x4af82e(0x1fa)](mkdir,_0x4a33e0,{'recursive':!![]}),await _0x4e526b[_0x4af82e(0x1fa)](writeFile,_0xef64a3,JSON[_0x4af82e(0x202)](_0x159c41,null,0x2));}export function resolveEnvVars(_0x519a60){const _0x4c71e9=_0x1ee5,_0x5866fe={'EsEdU':function(_0x2765cb,_0x5290b9){return _0x2765cb===_0x5290b9;},'AKsbK':'string'};if(_0x5866fe['EsEdU'](typeof _0x519a60,_0x5866fe[_0x4c71e9(0x20a)]))return _0x519a60[_0x4c71e9(0x1f3)](/\$\{(\w+)\}/g,(_0x155d13,_0x373f63)=>{const _0x4aeac1=_0x4c71e9,_0x4fa7f8=process['env'][_0x373f63];if(_0x4fa7f8===undefined)throw new Error(_0x4aeac1(0x26a)+_0x373f63+'\x20is\x20not\x20set');return _0x4fa7f8;});if(Array['isArray'](_0x519a60))return _0x519a60['map'](resolveEnvVars);if(_0x519a60&&typeof _0x519a60==='object')return Object[_0x4c71e9(0x23d)](Object[_0x4c71e9(0x262)](_0x519a60)[_0x4c71e9(0x266)](([_0x2df35d,_0xea602e])=>[_0x2df35d,resolveEnvVars(_0xea602e)]));return _0x519a60;}const isRecord=_0x5f0c8c=>typeof _0x5f0c8c==='object'&&_0x5f0c8c!==null&&!Array[_0x2b2e19(0x25a)](_0x5f0c8c),asRecord=_0x1d99ee=>isRecord(_0x1d99ee)?_0x1d99ee:undefined,mergeHeaders=(_0x2201a3,_0x43f0ba)=>{const _0xa3bb3f=_0x2b2e19,_0x3da0d8={'UbYny':function(_0x4342ff,_0x180065){return _0x4342ff??_0x180065;}},_0xb0f4c2={..._0x3da0d8['UbYny'](_0x2201a3,{}),..._0x43f0ba??{}};return Object['keys'](_0xb0f4c2)[_0xa3bb3f(0x22c)]?_0xb0f4c2:undefined;},SAFE_MODE_ARGS=[_0x2b2e19(0x26c)],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x2b2e19(0x260),_0x2b2e19(0x1f1),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x1646fc,_0x3b5b4b={}){const _0x2a21e8=_0x2b2e19,_0x17ec0b={'PjUcl':function(_0x220496,_0xc2993e){return _0x220496(_0xc2993e);},'LjDtq':function(_0x30b464,_0x350adf){return _0x30b464===_0x350adf;},'WaAJb':'string','hUzJT':function(_0x3d96c9,_0x1b86cf,_0x52396f){return _0x3d96c9(_0x1b86cf,_0x52396f);}},_0xe7703e=asRecord(_0x1646fc['browser']),_0x5a918c={..._0x17ec0b[_0x2a21e8(0x245)](asRecord,_0xe7703e?.['launchOptions'])??{}};typeof _0x3b5b4b['headless']==='boolean'&&(_0x5a918c[_0x2a21e8(0x24b)]=_0x3b5b4b['headless']);if(_0x1646fc['safeMode']){const _0x5b2028=_0x5a918c[_0x2a21e8(0x20e)]??[],_0xa29e55=SAFE_MODE_ARGS['filter'](_0x243e26=>!_0x5b2028[_0x2a21e8(0x1f6)](_0x243e26));_0x5a918c[_0x2a21e8(0x20e)]=[..._0x5b2028,..._0xa29e55];}if(_0x1646fc[_0x2a21e8(0x204)]){const _0x2514e9=_0x5a918c[_0x2a21e8(0x20e)]??[],_0x7175f6=ALLOW_LOCALHOST_ARGS[_0x2a21e8(0x237)](_0x3bca5a=>!_0x2514e9[_0x2a21e8(0x1f6)](_0x3bca5a));_0x5a918c[_0x2a21e8(0x20e)]=[..._0x2514e9,..._0x7175f6];}const _0x12e6dc={...asRecord(_0xe7703e?.[_0x2a21e8(0x217)])??{}};_0x12e6dc[_0x2a21e8(0x213)]=!![];_0x17ec0b['LjDtq'](typeof _0x1646fc['userAgent'],_0x17ec0b['WaAJb'])&&(_0x12e6dc['userAgent']=_0x1646fc['userAgent']);const _0x21611a=_0x17ec0b['hUzJT'](mergeHeaders,asRecord(_0x12e6dc[_0x2a21e8(0x1fc)]),_0x17ec0b['PjUcl'](asRecord,_0x1646fc['headers']));return _0x21611a?_0x12e6dc['extraHTTPHeaders']=_0x21611a:delete _0x12e6dc[_0x2a21e8(0x1fc)],_0x3b5b4b[_0x2a21e8(0x1f8)]&&(_0x12e6dc['storageState']=_0x3b5b4b['storageStatePath']),{'launchOptions':_0x5a918c,'contextOptions':_0x12e6dc};}export async function resolveProfileStorageState(_0x4c2955){const _0x39b836=_0x2b2e19,_0x15fb82={'qzoxA':function(_0x3d61f7,_0x270e94){return _0x3d61f7(_0x270e94);}};return _0x15fb82[_0x39b836(0x20d)](resolveLocalAuthPath,getEnvDir(_0x4c2955));}async function resolveLocalAuthPath(_0x178dd4){const _0x48edea=_0x2b2e19,_0x4a17ed={'hNsQe':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','IGWBa':function(_0x4e42c5,_0x2f6e29){return _0x4e42c5(_0x2f6e29);},'BNpwX':function(_0x565933,_0x1c52b7,_0x2cc37a){return _0x565933(_0x1c52b7,_0x2cc37a);},'psoOd':function(_0x1428a8,_0x206712,_0x5a8f16){return _0x1428a8(_0x206712,_0x5a8f16);},'sXmZd':function(_0x3928d9){return _0x3928d9();},'jpjqk':function(_0x1c2724,_0x1d092f,_0x371207){return _0x1c2724(_0x1d092f,_0x371207);}},_0x10fc56=join(_0x178dd4,'auth.json.enc'),_0x538d38=join(_0x178dd4,'auth.json');if(existsSync(_0x10fc56))try{const _0x4697fe=await getToken();if(!_0x4697fe)throw new Error(_0x4a17ed['hNsQe']);const _0x288083=await _0x4a17ed[_0x48edea(0x1fb)](readFile,_0x10fc56),_0x4f259b=_0x4a17ed[_0x48edea(0x20b)](decrypt,_0x288083,_0x4697fe),_0x33fd85=_0x4a17ed[_0x48edea(0x225)](join,_0x4a17ed['sXmZd'](tmpdir),_0x48edea(0x259)+Date['now']()+_0x48edea(0x240));return await _0x4a17ed[_0x48edea(0x25c)](writeFile,_0x33fd85,_0x4f259b),{'storageStatePath':_0x33fd85,'tempAuthPath':_0x33fd85};}catch(_0x4d708b){const _0x53b363=_0x4d708b instanceof Error?_0x4d708b['message']:_0x4a17ed['IGWBa'](String,_0x4d708b);throw new Error(_0x48edea(0x243)+_0x53b363);}if(existsSync(_0x538d38))return{'storageStatePath':_0x538d38};return{};}export async function buildPlaywrightConfig(_0x462fd6,_0xae0b69,_0xb6908f,_0x54acc5,_0x375571){const _0x1f5fb9=_0x2b2e19,_0x5d2443={'SqRaT':function(_0x47df17,_0x5e3fff,_0x4eacc3,_0x43b16d,_0x7df65e,_0x4e8225,_0xce050){return _0x47df17(_0x5e3fff,_0x4eacc3,_0x43b16d,_0x7df65e,_0x4e8225,_0xce050);},'QoFbx':_0x1f5fb9(0x251),'KvPIJ':function(_0x1d0a59,_0x28bd5d){return _0x1d0a59(_0x28bd5d);}};if(_0x375571)return _0x5d2443[_0x1f5fb9(0x21f)](buildPlaywrightConfigCore,_0x462fd6,_0x375571,_0xae0b69,_0xb6908f,_0x54acc5,_0x5d2443['QoFbx']);const {storageStatePath:_0x1042b1,tempAuthPath:_0x18e67c}=await _0x5d2443[_0x1f5fb9(0x261)](resolveLocalAuthPath,getEnvDir(_0xae0b69));try{const _0x3fdb77=await buildPlaywrightConfigCore(_0x462fd6,_0x1042b1,_0xae0b69,_0xb6908f,_0x54acc5,_0x5d2443[_0x1f5fb9(0x20c)]);return{..._0x3fdb77,'tempAuthPath':_0x18e67c};}catch(_0x2e983e){_0x18e67c&&await _0x5d2443[_0x1f5fb9(0x261)](unlink,_0x18e67c)[_0x1f5fb9(0x257)](()=>{});throw _0x2e983e;}}export async function buildPlaywrightConfigCore(_0x5c849e,_0x3d5b1e,_0x225765,_0x37e57e,_0x2d08d5,_0x5851ad='stagehand'){const _0x2e0464=_0x2b2e19,_0x4150d2={'GmXro':_0x2e0464(0x1ff),'Ckskc':function(_0x21d4d0){return _0x21d4d0();},'Yeybr':function(_0x311aff,_0x12a9eb,_0x443051,_0x28a866){return _0x311aff(_0x12a9eb,_0x443051,_0x28a866);},'AgPQf':function(_0x3390e0){return _0x3390e0();},'NZdbz':function(_0x10f4ac,_0x38aa34){return _0x10f4ac(_0x38aa34);},'mbRsX':'chromium','OHDLK':function(_0x1d14b1,_0x1f1313){return _0x1d14b1===_0x1f1313;},'AtEIa':'file','DFhtg':'none','Wnkwn':_0x2e0464(0x250),'epDpc':_0x2e0464(0x25d),'gRUpQ':'vision','tURLa':_0x2e0464(0x264),'ScXni':function(_0x8dbfec,_0xeb77df,_0x318b44){return _0x8dbfec(_0xeb77df,_0x318b44);},'rmHsO':'ranger-config','aCglS':function(_0x562616,_0x29395d){return _0x562616(_0x29395d);},'JfsjF':'-cli','PpVRo':function(_0x4987bb,_0x291f1b,_0x4b4ebb){return _0x4987bb(_0x291f1b,_0x4b4ebb);}},_0x5e6bf0=_0x37e57e||_0x4150d2['Ckskc'](randomUUID),_0x164dd5=_0x4150d2['Yeybr'](join,_0x4150d2[_0x2e0464(0x241)](getRangerDir),'sessions',_0x5e6bf0),_0x2ebbe5=_0x4150d2['NZdbz'](Boolean,_0x5c849e[_0x2e0464(0x1fd)]),_0x698338=_0x2ebbe5?{'browserName':_0x4150d2[_0x2e0464(0x254)],'cdpEndpoint':_0x5c849e[_0x2e0464(0x1fd)]}:((()=>{const _0x1f5e7c=_0x2e0464,{launchOptions:_0x3e2323,contextOptions:_0x289e34}=buildBrowserOptionsFromSettings(_0x5c849e,{'headless':_0x2d08d5?![]:_0x5c849e[_0x1f5e7c(0x24b)]??!![],'storageStatePath':_0x3d5b1e});if(process[_0x1f5e7c(0x26b)]?.()===0x0){const _0x559e11=[_0x4150d2[_0x1f5e7c(0x21a)],_0x1f5e7c(0x25e)],_0xfe1fd6=_0x3e2323[_0x1f5e7c(0x20e)]??[],_0x39fad6=_0x559e11[_0x1f5e7c(0x237)](_0x5a0834=>!_0xfe1fd6[_0x1f5e7c(0x1f6)](_0x5a0834));_0x3e2323[_0x1f5e7c(0x20e)]=[..._0xfe1fd6,..._0x39fad6];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x3e2323,'contextOptions':{..._0x289e34,'permissions':['clipboard-read','clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x37be67=_0x4150d2[_0x2e0464(0x268)](_0x5851ad,_0x2e0464(0x21d))?{'browser':_0x698338,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x164dd5,'outputMode':_0x4150d2['AtEIa'],'codegen':_0x4150d2['DFhtg']}:{'name':_0x225765,'browser':_0x698338,'capabilities':[_0x4150d2['Wnkwn'],_0x4150d2['epDpc'],_0x4150d2['gRUpQ'],_0x2e0464(0x227)],'imageResponses':_0x4150d2['tURLa'],'outputDir':_0x164dd5};if(!_0x2ebbe5){const _0x2d79f2=_0x37be67['browser'],_0x5c7c3d=_0x2d79f2['contextOptions'];if(_0x5c7c3d[_0x2e0464(0x233)]===undefined)delete _0x5c7c3d['userAgent'];if(_0x4150d2[_0x2e0464(0x268)](_0x5c7c3d[_0x2e0464(0x234)],undefined))delete _0x5c7c3d[_0x2e0464(0x234)];}const _0x1b39e0=_0x4150d2[_0x2e0464(0x24d)](join,tmpdir(),_0x4150d2[_0x2e0464(0x223)]);!_0x4150d2['aCglS'](existsSync,_0x1b39e0)&&await mkdir(_0x1b39e0,{'recursive':!![]});const _0x11c8a7=_0x5851ad==='playwright-cli'?_0x4150d2['JfsjF']:'',_0xfba64f=_0x4150d2[_0x2e0464(0x228)](join,_0x1b39e0,_0x225765+'-'+Date['now']()+_0x11c8a7+'.json');return await writeFile(_0xfba64f,JSON['stringify'](_0x37be67,null,0x2)),{'configPath':_0xfba64f,'storageStatePath':_0x3d5b1e};}export async function buildPlaywrightCliConfig(_0x39c6bb,_0x37da18,_0x5c38b9,_0x1360e0,_0x233102){const _0x2753f1=_0x2b2e19,_0x5b8f15={'DjceI':_0x2753f1(0x21d),'XWKmL':function(_0x2b9301,_0x23c021,_0x1bed77,_0x3c7f6d,_0x2fab6c,_0x2de93d,_0x64c06){return _0x2b9301(_0x23c021,_0x1bed77,_0x3c7f6d,_0x2fab6c,_0x2de93d,_0x64c06);},'WAKbW':function(_0x487b83,_0x6b12ce){return _0x487b83(_0x6b12ce);}};if(_0x233102)return buildPlaywrightConfigCore(_0x39c6bb,_0x233102,_0x37da18,_0x5c38b9,_0x1360e0,_0x5b8f15[_0x2753f1(0x201)]);const {storageStatePath:_0x1351fc,tempAuthPath:_0x61596b}=await resolveLocalAuthPath(getEnvDir(_0x37da18));try{const _0x2655f7=await _0x5b8f15[_0x2753f1(0x205)](buildPlaywrightConfigCore,_0x39c6bb,_0x1351fc,_0x37da18,_0x5c38b9,_0x1360e0,_0x5b8f15['DjceI']);return{..._0x2655f7,'tempAuthPath':_0x61596b};}catch(_0x3e5b00){_0x61596b&&await _0x5b8f15['WAKbW'](unlink,_0x61596b)['catch'](()=>{});throw _0x3e5b00;}}export async function buildRangerwrightCliConfig(_0x58362d,_0x3b0bc8,_0x194519,_0xb5f0a7,_0x2d529b){const _0x5340bf=_0x2b2e19,_0x13c694={'KZifA':_0x5340bf(0x1ff),'qijPm':_0x5340bf(0x263),'NIBID':_0x5340bf(0x224),'LQpKY':function(_0x16cf67,_0x4ba335){return _0x16cf67(_0x4ba335);},'pgHro':function(_0x5d0dee,_0x528b2a,_0x57b4fd,_0x2f652c){return _0x5d0dee(_0x528b2a,_0x57b4fd,_0x2f652c);},'wmQoT':function(_0x183b6d){return _0x183b6d();},'UZKUi':'sessions','UeZYA':function(_0x1b27f9,_0x579739){return _0x1b27f9(_0x579739);},'XSQtF':_0x5340bf(0x247),'bHZAM':function(_0x517641,_0x2b9c14){return _0x517641===_0x2b9c14;},'yIfts':function(_0x274445,_0x1dd6b4){return _0x274445===_0x1dd6b4;},'YbUkT':function(_0x567ab6){return _0x567ab6();},'lQizN':function(_0x1e1cdf,_0x49f887,_0x38d906){return _0x1e1cdf(_0x49f887,_0x38d906);}},{storageStatePath:_0x3fd3e5,tempAuthPath:_0x5659a6}=_0x2d529b?{'storageStatePath':_0x2d529b,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x13c694[_0x5340bf(0x207)](getEnvDir,_0x3b0bc8)),_0x4b9e87=_0x194519||randomUUID(),_0x730049=_0x13c694['pgHro'](join,_0x13c694[_0x5340bf(0x232)](getRangerDir),_0x13c694['UZKUi'],_0x4b9e87),_0x3124d4=_0x13c694['UeZYA'](Boolean,_0x58362d[_0x5340bf(0x1fd)]),_0x240d6d=_0x3124d4?{'browserName':_0x13c694['XSQtF'],'cdpEndpoint':_0x58362d[_0x5340bf(0x1fd)]}:((()=>{const _0x129a63=_0x5340bf,{launchOptions:_0xc165a1,contextOptions:_0x5b9eec}=buildBrowserOptionsFromSettings(_0x58362d,{'headless':_0xb5f0a7?![]:_0x58362d['headless']??!![],'storageStatePath':_0x3fd3e5});if(process[_0x129a63(0x26b)]?.()===0x0){const _0x9445a9=[_0x13c694['KZifA'],_0x129a63(0x25e)],_0xf77d9e=_0xc165a1[_0x129a63(0x20e)]??[],_0x52e2a1=_0x9445a9['filter'](_0x20bcde=>!_0xf77d9e[_0x129a63(0x1f6)](_0x20bcde));_0xc165a1[_0x129a63(0x20e)]=[..._0xf77d9e,..._0x52e2a1];}return{'browserName':_0x129a63(0x247),'launchOptions':_0xc165a1,'contextOptions':{..._0x5b9eec,'permissions':[_0x13c694['qijPm'],_0x13c694[_0x129a63(0x1fe)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x3124d4){const _0x4c1685=_0x240d6d[_0x5340bf(0x217)];if(_0x4c1685){if(_0x13c694['bHZAM'](_0x4c1685['userAgent'],undefined))delete _0x4c1685[_0x5340bf(0x233)];if(_0x13c694[_0x5340bf(0x203)](_0x4c1685['storageState'],undefined))delete _0x4c1685[_0x5340bf(0x234)];}}const _0x80fe46={'browser':_0x240d6d,'outputDir':_0x730049,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x5e0ba4;try{const _0x4b3af0=join(_0x13c694['YbUkT'](tmpdir),_0x5340bf(0x23b));!existsSync(_0x4b3af0)&&await mkdir(_0x4b3af0,{'recursive':!![]}),_0x5e0ba4=_0x13c694['lQizN'](join,_0x4b3af0,_0x3b0bc8+'-'+Date[_0x5340bf(0x246)]()+'-rangerwright.json'),await writeFile(_0x5e0ba4,JSON[_0x5340bf(0x202)](_0x80fe46,null,0x2));}catch(_0x14006f){_0x5659a6&&await unlink(_0x5659a6)[_0x5340bf(0x257)](()=>{});throw _0x14006f;}return{'configPath':_0x5e0ba4,'storageStatePath':_0x3fd3e5,'tempAuthPath':_0x5659a6,'outputDir':_0x730049};}export async function buildNovaActCliConfig(_0x17ca71,_0x16afb9,_0x2d4f64,_0x1ecfcc,_0x54ff9c){const _0x4e2599=_0x2b2e19,_0x57154d={'ISboD':function(_0x35f25a,_0xc4da7){return _0x35f25a(_0xc4da7);},'zUfIk':function(_0x1b2a93,_0x2222f1,_0x48b399,_0x11fc99){return _0x1b2a93(_0x2222f1,_0x48b399,_0x11fc99);},'TJysX':function(_0xcb67b7){return _0xcb67b7();},'WzmUz':'sessions','PElTr':function(_0x27f3f2,_0x27704b,_0x4e4d8f){return _0x27f3f2(_0x27704b,_0x4e4d8f);},'UMeiE':'nova-user-data','NPgpt':function(_0x3c85c0,_0x698099,_0xd295a3){return _0x3c85c0(_0x698099,_0xd295a3);},'JgfVM':function(_0x2bc21f,_0x230301){return _0x2bc21f===_0x230301;},'eDSfS':_0x4e2599(0x230)},{storageStatePath:_0x323bbb,tempAuthPath:_0x58e14f}=_0x54ff9c?{'storageStatePath':_0x54ff9c,'tempAuthPath':undefined}:await _0x57154d['ISboD'](resolveLocalAuthPath,getEnvDir(_0x16afb9)),_0xbb5223=_0x2d4f64||randomUUID(),_0x27e747=_0x57154d[_0x4e2599(0x216)](join,_0x57154d['TJysX'](getRangerDir),_0x57154d['WzmUz'],_0xbb5223),_0x5bbe31=_0x57154d['PElTr'](join,_0x27e747,_0x57154d['UMeiE']),_0x3656c5=_0x323bbb?_0x57154d['NPgpt'](join,_0x5bbe31,'Default'):undefined,{launchOptions:_0x2fe8e7,contextOptions:_0x37b809}=buildBrowserOptionsFromSettings(_0x17ca71,{'headless':_0x1ecfcc?![]:_0x17ca71[_0x4e2599(0x24b)]??!![],'storageStatePath':_0x323bbb});if(_0x57154d['JgfVM'](process['getuid']?.(),0x0)){const _0x2720bb=['--no-sandbox','--disable-setuid-sandbox'],_0x27dfa1=_0x2fe8e7['args']??[],_0x157283=_0x2720bb['filter'](_0x506843=>!_0x27dfa1[_0x4e2599(0x1f6)](_0x506843));_0x2fe8e7['args']=[..._0x27dfa1,..._0x157283];}const _0x11385d=typeof _0x2fe8e7['executablePath']===_0x57154d['eDSfS']?_0x2fe8e7[_0x4e2599(0x22f)]:_0x323bbb?chromium['executablePath']():undefined;return{'storageStatePath':_0x323bbb,'tempAuthPath':_0x58e14f,'baseUrl':_0x17ca71['baseUrl'],'headless':_0x57154d[_0x4e2599(0x226)](Boolean,_0x2fe8e7['headless']),'userDataDir':_0x5bbe31,'browserProfilePath':_0x3656c5,'executablePath':_0x11385d,'launchArgs':Array[_0x4e2599(0x25a)](_0x2fe8e7[_0x4e2599(0x20e)])?_0x2fe8e7['args'][_0x4e2599(0x237)](_0xb1bd1e=>typeof _0xb1bd1e===_0x4e2599(0x230)):[],'userAgent':_0x57154d['JgfVM'](typeof _0x37b809[_0x4e2599(0x233)],_0x4e2599(0x230))?_0x37b809['userAgent']:undefined,'extraHTTPHeaders':_0x37b809['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0x17ca71[_0x4e2599(0x204)]),'safeMode':Boolean(_0x17ca71[_0x4e2599(0x211)]),'cdpEndpoint':_0x17ca71['cdpEndpoint'],'isCdpMode':Boolean(_0x17ca71['cdpEndpoint'])};}export function getNestedValue(_0x70839e,_0x25e915){const _0x419864=_0x2b2e19,_0x26b15d={'GOutp':function(_0x8aa666,_0x3bd943){return _0x8aa666(_0x3bd943);},'OuuGU':function(_0x40437a,_0x4705dc){return _0x40437a===_0x4705dc;}},_0x1c2bc8=_0x26b15d['GOutp'](parseKeyPath,_0x25e915);let _0xddcf67=_0x70839e;for(const _0xe57840 of _0x1c2bc8){if(_0x26b15d[_0x419864(0x22d)](_0xddcf67,null)||_0x26b15d[_0x419864(0x22d)](_0xddcf67,undefined)||typeof _0xddcf67!=='object')return undefined;_0xddcf67=_0xddcf67[_0xe57840];}return _0xddcf67;}export function setNestedValue(_0x4b15fc,_0x20ac10,_0x25fa5c){const _0x1d9328=_0x2b2e19,_0x27ebc3={'jKWip':function(_0x1709a4,_0x2f9d4b){return _0x1709a4(_0x2f9d4b);},'Ddixh':function(_0xa7e849,_0x565e85){return _0xa7e849<_0x565e85;},'ZJXiE':function(_0x4972c1,_0x29bd4e){return _0x4972c1-_0x29bd4e;},'WNhJW':function(_0x46524a,_0x474f14){return _0x46524a!==_0x474f14;}},_0x26d50e=_0x27ebc3['jKWip'](parseKeyPath,_0x20ac10);let _0x4846c1=_0x4b15fc;for(let _0x15d1c4=0x0;_0x27ebc3[_0x1d9328(0x23e)](_0x15d1c4,_0x27ebc3['ZJXiE'](_0x26d50e['length'],0x1));_0x15d1c4++){const _0x6f461=_0x26d50e[_0x15d1c4];(!(_0x6f461 in _0x4846c1)||_0x27ebc3['WNhJW'](typeof _0x4846c1[_0x6f461],'object'))&&(_0x4846c1[_0x6f461]={}),_0x4846c1=_0x4846c1[_0x6f461];}_0x4846c1[_0x26d50e[_0x26d50e[_0x1d9328(0x22c)]-0x1]]=_0x25fa5c;}function _0x1ee5(_0x45c622,_0x5a8d89){_0x45c622=_0x45c622-0x1f1;const _0x718d77=_0x718d();let _0x1ee5d6=_0x718d77[_0x45c622];return _0x1ee5d6;}export function deleteNestedValue(_0x50d19a,_0x1ffc86){const _0x3418c5=_0x2b2e19,_0x119ed8={'qCpfO':function(_0x2c1c35,_0x4afb43){return _0x2c1c35(_0x4afb43);},'VioBL':function(_0x1ea657,_0x449c8f){return _0x1ea657<_0x449c8f;},'DoNfm':function(_0x21e2f8,_0x5b338c){return _0x21e2f8===_0x5b338c;},'Xqtue':function(_0x3b11d2,_0x13698c){return _0x3b11d2===_0x13698c;},'yiVTp':function(_0x1e7366,_0x5a75e4){return _0x1e7366!==_0x5a75e4;}},_0x20638a=_0x119ed8[_0x3418c5(0x1f4)](parseKeyPath,_0x1ffc86);let _0x1fd844=_0x50d19a;for(let _0x3681ff=0x0;_0x119ed8[_0x3418c5(0x22e)](_0x3681ff,_0x20638a['length']-0x1);_0x3681ff++){if(_0x119ed8['DoNfm'](_0x1fd844,null)||_0x119ed8[_0x3418c5(0x1f2)](_0x1fd844,undefined)||_0x119ed8['yiVTp'](typeof _0x1fd844,'object'))return![];_0x1fd844=_0x1fd844[_0x20638a[_0x3681ff]];}if(_0x1fd844===null||_0x1fd844===undefined||typeof _0x1fd844!==_0x3418c5(0x22b))return![];const _0x3cd58f=_0x20638a[_0x20638a['length']-0x1];if(_0x3cd58f in _0x1fd844)return delete _0x1fd844[_0x3cd58f],!![];return![];}function parseKeyPath(_0x18edcc){const _0x24b8d3=_0x2b2e19,_0x2f3829={'GaGCW':function(_0x10d49d,_0x35a610){return _0x10d49d===_0x35a610;},'kCuXs':function(_0x17bcfc,_0x136eb0){return _0x17bcfc===_0x136eb0;}},_0x579c7f=_0x18edcc['split']('.');return _0x2f3829[_0x24b8d3(0x21c)](_0x579c7f[0x0],'header')&&(_0x579c7f[0x0]='headers'),_0x2f3829['kCuXs'](_0x579c7f[0x0],_0x24b8d3(0x24a))&&(_0x579c7f[0x0]='setupHeaders'),_0x579c7f;}export function formatSettings(_0x953df5,_0x2f8870=0x0){const _0x357f28=_0x2b2e19,_0x1dd305={'nTrYi':function(_0x47dee3,_0x23a1d1){return _0x47dee3===_0x23a1d1;},'QvZes':'object'},_0x2c4740=[],_0x1d0223='\x20\x20'['repeat'](_0x2f8870);for(const [_0x471a71,_0x11553e]of Object[_0x357f28(0x262)](_0x953df5)){if(_0x11553e===undefined)continue;if(_0x1dd305[_0x357f28(0x244)](typeof _0x11553e,_0x1dd305[_0x357f28(0x23f)])&&_0x11553e!==null){_0x2c4740[_0x357f28(0x210)](''+_0x1d0223+_0x471a71+':');for(const [_0x27aa0c,_0x48e3f0]of Object[_0x357f28(0x262)](_0x11553e)){_0x2c4740['push'](_0x1d0223+'\x20\x20'+_0x27aa0c+':\x20'+_0x48e3f0);}}else _0x2c4740['push'](''+_0x1d0223+_0x471a71+':\x20'+_0x11553e);}return _0x2c4740['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3154fa,_0x532c16){const _0x2b596d=_0x1468,_0x16f57d=_0x3154fa();while(!![]){try{const _0x1133a9=parseInt(_0x2b596d(0x115))/0x1+parseInt(_0x2b596d(0x11d))/0x2*(-parseInt(_0x2b596d(0x11f))/0x3)+parseInt(_0x2b596d(0x116))/0x4+parseInt(_0x2b596d(0x11e))/0x5+-parseInt(_0x2b596d(0x114))/0x6*(parseInt(_0x2b596d(0x11b))/0x7)+-parseInt(_0x2b596d(0x119))/0x8*(-parseInt(_0x2b596d(0x120))/0x9)+-parseInt(_0x2b596d(0x118))/0xa;if(_0x1133a9===_0x532c16)break;else _0x16f57d['push'](_0x16f57d['shift']());}catch(_0x211d1c){_0x16f57d['push'](_0x16f57d['shift']());}}}(_0x565d,0x2cba8));function _0x1468(_0x5738af,_0x3cc70f){_0x5738af=_0x5738af-0x114;const _0x565d0d=_0x565d();let _0x146890=_0x565d0d[_0x5738af];return _0x146890;}import{readFileSync}from'fs';function _0x565d(){const _0x6ae689=['471462zwiujs','362491IdotDN','1258216CcqxWw','frBrQ','4582410IjsCuF','1505824ZGzaRy','utf-8','7wFUSTC','gihzb','10aghAqo','909340KRmBTy','196269NdxvRj','9HAMbtt'];_0x565d=function(){return _0x6ae689;};return _0x565d();}import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x381a8c){const _0x4f3eda=_0x1468,_0x48ad9b={'frBrQ':'skills','GOBKs':function(_0x10f627,_0x70402,_0x10bcfd){return _0x10f627(_0x70402,_0x10bcfd);}},_0x45696f=join(__dirname,'..','..',_0x48ad9b[_0x4f3eda(0x117)]),_0x2592b0=join(_0x45696f,_0x381a8c);try{return _0x48ad9b['GOBKs'](readFileSync,_0x2592b0,_0x4f3eda(0x11a));}catch{return'';}}export function getRangerSkillContent(){const _0x471b65=_0x1468,_0x57e02b={'gihzb':'ranger/SKILL.md'};return readSkillContent(_0x57e02b[_0x471b65(0x11c)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4475cd,_0x50f2ae){const _0x442cfc=_0x3511,_0x5e5100=_0x4475cd();while(!![]){try{const _0x321b98=parseInt(_0x442cfc(0x79))/0x1*(-parseInt(_0x442cfc(0x76))/0x2)+parseInt(_0x442cfc(0x78))/0x3*(parseInt(_0x442cfc(0x7d))/0x4)+-parseInt(_0x442cfc(0x7f))/0x5*(parseInt(_0x442cfc(0x83))/0x6)+-parseInt(_0x442cfc(0x6f))/0x7*(parseInt(_0x442cfc(0x73))/0x8)+-parseInt(_0x442cfc(0x86))/0x9+parseInt(_0x442cfc(0x72))/0xa*(-parseInt(_0x442cfc(0x71))/0xb)+parseInt(_0x442cfc(0x80))/0xc*(parseInt(_0x442cfc(0x70))/0xd);if(_0x321b98===_0x50f2ae)break;else _0x5e5100['push'](_0x5e5100['shift']());}catch(_0xc09758){_0x5e5100['push'](_0x5e5100['shift']());}}}(_0x4879,0x1c306));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 _0x4879(){const _0x551899=['XeCJK','join','24KIZXHy','.md','push','450801wSOWfr','log','filter','utf-8','\x20\x20Removed\x20deprecated\x20skill:\x20','trim','NWqIf','match','jGPbV','ONVdZ','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','length','16051YLdbtt','13nGUxAY','64669vDXlJW','130FpOsZp','48tbeLOr','warn','catch','6702QIwWAe','opencode','114981jSnvCc','2vCGBus','\x20\x20Files:\x20','skills','\x20\x20Installed\x20skill:\x20','4esfnkh','project','249310QNofLk','5082708QrUXPy'];_0x4879=function(){return _0x551899;};return _0x4879();}import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];function _0x3511(_0x475a73,_0x3c7ca3){_0x475a73=_0x475a73-0x6a;const _0x48792a=_0x4879();let _0x351111=_0x48792a[_0x475a73];return _0x351111;}export const DEPRECATED_SKILLS=['e2e-test-recommender','bug-bash','feature-tracker'];export async function installSkill(_0xc75d55,_0x68bf94={}){const _0x3b31d2=_0x3511,_0xf2cbf={'cVmzq':_0x3b31d2(0x7e),'whOwK':function(_0x4dd6d2,_0x18df6d,_0xcd4de8){return _0x4dd6d2(_0x18df6d,_0xcd4de8);},'QvdwD':function(_0x1caeb0,_0x424c2c){return _0x1caeb0(_0x424c2c);},'fZTnV':function(_0x340fb3,_0x2dafb8){return _0x340fb3(_0x2dafb8);},'jGPbV':'SKILL.md','ONVdZ':function(_0x4401d4,_0xece407){return _0x4401d4(_0xece407);},'iBiLD':function(_0x1ae2cd,_0x2e56a3){return _0x1ae2cd===_0x2e56a3;},'tHjDu':function(_0x5e388b,_0x20fcf6,_0x323218){return _0x5e388b(_0x20fcf6,_0x323218);},'RJbnA':function(_0x5d49ea,_0x31fcab,_0x463cb8){return _0x5d49ea(_0x31fcab,_0x463cb8);},'RuEJY':_0x3b31d2(0x89),'NWqIf':function(_0x5b5137,_0x507674){return _0x5b5137>_0x507674;},'XeCJK':function(_0x4ae31d,_0x5abea7,_0x1ca03b,_0x31f9da){return _0x4ae31d(_0x5abea7,_0x1ca03b,_0x31f9da);}},{level:level=_0xf2cbf['cVmzq'],cliVersion:_0x577b9a,platform:platform='claude'}=_0x68bf94,_0xb79d22=getSourceSkillsDir(),_0x28bc92=join(_0xb79d22,_0xc75d55),_0x33d33f=_0xf2cbf['whOwK'](join,_0xb79d22,_0xc75d55+_0x3b31d2(0x84)),_0x7fe96d=_0xf2cbf['QvdwD'](existsSync,_0x28bc92)&&_0xf2cbf['QvdwD'](statSync,_0x28bc92)['isDirectory']()&&_0xf2cbf['fZTnV'](existsSync,join(_0x28bc92,_0xf2cbf[_0x3b31d2(0x6b)])),_0xb95347=_0xf2cbf[_0x3b31d2(0x6c)](existsSync,_0x33d33f);if(!_0x7fe96d&&!_0xb95347)return console[_0x3b31d2(0x74)]('\x20\x20Skill\x20not\x20found:\x20'+_0xc75d55),![];const _0x4f294e=_0xf2cbf['iBiLD'](platform,_0x3b31d2(0x77))?getOpencodeSkillsDir(level):getSkillsDir(level),_0x2a510d=join(_0x4f294e,_0xc75d55);await mkdir(_0x2a510d,{'recursive':!![]});let _0x1a8be7,_0x2c253e=[];if(_0x7fe96d){const _0x5e90c4=await readdir(_0x28bc92),_0x4d91a3=_0x5e90c4[_0x3b31d2(0x88)](_0x4ecd63=>_0x4ecd63['endsWith'](_0x3b31d2(0x84)));for(const _0x23b9e1 of _0x4d91a3){const _0x9c1882=_0xf2cbf['tHjDu'](join,_0x28bc92,_0x23b9e1),_0x411bb9=join(_0x2a510d,_0x23b9e1);await _0xf2cbf['RJbnA'](copyFile,_0x9c1882,_0x411bb9),_0x2c253e['push'](_0x23b9e1);}_0x1a8be7=await _0xf2cbf['whOwK'](readFile,join(_0x28bc92,_0xf2cbf['jGPbV']),_0xf2cbf['RuEJY']);}else{_0x1a8be7=await readFile(_0x33d33f,_0xf2cbf['RuEJY']);const _0x424214=_0xf2cbf['tHjDu'](join,_0x2a510d,_0xf2cbf['jGPbV']);await writeFile(_0x424214,_0x1a8be7,_0x3b31d2(0x89)),_0x2c253e[_0x3b31d2(0x85)](_0xf2cbf['jGPbV']);}const {name:_0x140f56}=parseFrontmatter(_0x1a8be7);return console[_0x3b31d2(0x87)](_0x3b31d2(0x7c)+_0x140f56),console[_0x3b31d2(0x87)]('\x20\x20Location:\x20'+_0x2a510d),_0xf2cbf[_0x3b31d2(0x8c)](_0x2c253e[_0x3b31d2(0x6e)],0x1)&&console[_0x3b31d2(0x87)](_0x3b31d2(0x7a)+_0x2c253e[_0x3b31d2(0x82)](',\x20')),_0xf2cbf[_0x3b31d2(0x81)](logLocalAgentInstallation,_0xc75d55,{'skillDisplayName':_0x140f56,'installLevel':level},_0x577b9a)[_0x3b31d2(0x75)](()=>{}),!![];}function getSourceSkillsDir(){const _0x3a830d=_0x3511,_0x3234b8=[join(__dirname,'..','..',_0x3a830d(0x7b)),join(__dirname,'..','..','..',_0x3a830d(0x7b))];for(const _0x467959 of _0x3234b8){if(existsSync(_0x467959))return _0x467959;}return _0x3234b8[0x0];}function parseFrontmatter(_0x5adb96){const _0x26684f=_0x3511,_0xe75c53=_0x5adb96[_0x26684f(0x6a)](/^---\n([\s\S]+?)\n---/);if(!_0xe75c53)throw new Error('Invalid\x20skill\x20frontmatter');const _0x4750ee=_0xe75c53[0x1],_0x38ac48=_0x4750ee['match'](/name:\s*(.+)/),_0x4e935e=_0x4750ee[_0x26684f(0x6a)](/description:\s*"?(.+?)"?\n/);return{'name':_0x38ac48?.[0x1][_0x26684f(0x8b)]()||'','description':_0x4e935e?.[0x1]['trim']()||''};}export async function removeSkill(_0x56c647,_0x5289cc){const _0x3fbf2c=_0x3511,_0x18a3b0={'sAEux':function(_0x4d5154,_0x46b0d6,_0xef7121){return _0x4d5154(_0x46b0d6,_0xef7121);}},_0xd17bfb=getSkillsDir(_0x5289cc),_0x504e32=_0x18a3b0['sAEux'](join,_0xd17bfb,_0x56c647);if(!existsSync(_0x504e32))return![];try{return await _0x18a3b0['sAEux'](rm,_0x504e32,{'recursive':!![]}),console['log'](_0x3fbf2c(0x8a)+_0x56c647),!![];}catch{return console['warn'](_0x3fbf2c(0x6d)+_0x56c647),![];}}
|
|
@@ -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 _0x4e7c39=_0xe647;(function(_0x3d7d83,_0x498843){const _0x2186b8=_0xe647,_0x2cbe6c=_0x3d7d83();while(!![]){try{const _0x5a512c=parseInt(_0x2186b8(0x171))/0x1+parseInt(_0x2186b8(0x177))/0x2*(parseInt(_0x2186b8(0x13c))/0x3)+parseInt(_0x2186b8(0x148))/0x4*(-parseInt(_0x2186b8(0x164))/0x5)+parseInt(_0x2186b8(0x14b))/0x6*(-parseInt(_0x2186b8(0x16b))/0x7)+-parseInt(_0x2186b8(0x17b))/0x8*(parseInt(_0x2186b8(0x152))/0x9)+-parseInt(_0x2186b8(0x151))/0xa*(-parseInt(_0x2186b8(0x144))/0xb)+-parseInt(_0x2186b8(0x14c))/0xc;if(_0x5a512c===_0x498843)break;else _0x2cbe6c['push'](_0x2cbe6c['shift']());}catch(_0x3afe1c){_0x2cbe6c['push'](_0x2cbe6c['shift']());}}}(_0x5525,0x35e6d));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 _0xe647(_0x679c77,_0x33c61d){_0x679c77=_0x679c77-0x12f;const _0x55256f=_0x5525();let _0xe6478f=_0x55256f[_0x679c77];return _0xe6478f;}function readVint(_0x3568bb,_0x520f5d){const _0x5d0b69=_0xe647,_0xc330ac={'muReE':function(_0x1ef1c1,_0x1ff4f7){return _0x1ef1c1+_0x1ff4f7;},'PwHuh':function(_0x5e338d,_0x1550e8){return _0x5e338d&_0x1550e8;},'BKvOx':function(_0x101eac,_0x1e320c){return _0x101eac-_0x1e320c;},'MLnur':function(_0x36baca,_0x33e584){return _0x36baca<_0x33e584;}};if(_0x520f5d>=_0x3568bb[_0x5d0b69(0x162)])return[0x0,0x0];const _0x5262e4=_0x3568bb[_0x520f5d];let _0x2bdf97=0x1,_0x274105=0x80;while(_0x2bdf97<=0x8&&!(_0x5262e4&_0x274105)){_0x2bdf97++,_0x274105>>=0x1;}if(_0xc330ac[_0x5d0b69(0x170)](_0x520f5d,_0x2bdf97)>_0x3568bb[_0x5d0b69(0x162)])return[0x0,0x0];let _0x26294b=_0xc330ac[_0x5d0b69(0x143)](_0x5262e4,_0xc330ac['BKvOx'](_0x274105,0x1));for(let _0xe0b40a=0x1;_0xc330ac['MLnur'](_0xe0b40a,_0x2bdf97);_0xe0b40a++){_0x26294b=_0xc330ac[_0x5d0b69(0x170)](_0x26294b*0x100,_0x3568bb[_0x520f5d+_0xe0b40a]);}return[_0x26294b,_0x2bdf97];}function readId(_0x3e5412,_0x4d774f){const _0x1336e2=_0xe647,_0x29012e={'HQXQq':function(_0x4394a8,_0x443f63){return _0x4394a8>=_0x443f63;},'TIgra':function(_0x5caf8f,_0x20a75d){return _0x5caf8f>=_0x20a75d;},'CEnDu':function(_0x5d6b1d,_0x431167){return _0x5d6b1d>=_0x431167;},'sULcw':function(_0x3f49f8,_0x4d8a6c){return _0x3f49f8>_0x4d8a6c;},'Rgkca':function(_0x47823d,_0x4411a7){return _0x47823d+_0x4411a7;},'XNCSc':function(_0x4d4b7b,_0x13e2ac){return _0x4d4b7b<_0x13e2ac;},'iuggx':function(_0x183847,_0x1e3755){return _0x183847+_0x1e3755;}};if(_0x29012e['HQXQq'](_0x4d774f,_0x3e5412[_0x1336e2(0x162)]))return[0x0,0x0];const _0xd40c24=_0x3e5412[_0x4d774f];let _0x584e1c;if(_0x29012e[_0x1336e2(0x15d)](_0xd40c24,0x80))_0x584e1c=0x1;else{if(_0xd40c24>=0x40)_0x584e1c=0x2;else{if(_0x29012e['CEnDu'](_0xd40c24,0x20))_0x584e1c=0x3;else{if(_0xd40c24>=0x10)_0x584e1c=0x4;else return[_0xd40c24,0x1];}}}if(_0x29012e[_0x1336e2(0x15b)](_0x29012e[_0x1336e2(0x15e)](_0x4d774f,_0x584e1c),_0x3e5412[_0x1336e2(0x162)]))return[0x0,0x0];let _0x24815c=0x0;for(let _0x576bb9=0x0;_0x29012e['XNCSc'](_0x576bb9,_0x584e1c);_0x576bb9++){_0x24815c=_0x29012e['iuggx'](_0x24815c*0x100,_0x3e5412[_0x4d774f+_0x576bb9]);}return[_0x24815c,_0x584e1c];}function readUint(_0x2aca6f,_0x49b206,_0x1ccc02){const _0x227e38=_0xe647,_0x53518c={'ABEtr':function(_0x5ac128,_0x29baf4){return _0x5ac128<_0x29baf4;},'sZokz':function(_0x5d1ed1,_0x4410af){return _0x5d1ed1+_0x4410af;}};let _0x2978b9=0x0;for(let _0x39e794=0x0;_0x53518c[_0x227e38(0x161)](_0x39e794,_0x1ccc02);_0x39e794++){_0x2978b9=_0x2978b9*0x100+_0x2aca6f[_0x53518c['sZokz'](_0x49b206,_0x39e794)];}return _0x2978b9;}function isUnknownSize(_0x149e56,_0x3f51fd){const _0x5904ad=_0xe647,_0x31cca9={'DzTaL':function(_0x2383ae,_0x347a55){return _0x2383ae-_0x347a55;}};return _0x149e56===_0x31cca9['DzTaL'](Math[_0x5904ad(0x130)](0x2,0x7*_0x3f51fd),0x1);}function writeVint(_0x5ca290,_0x20df12){const _0x310229=_0xe647,_0x40fbff={'bZQjq':function(_0x227931,_0x34fa66){return _0x227931<_0x34fa66;},'QmUAV':function(_0x4bc871,_0x123beb){return _0x4bc871-_0x123beb;},'qXAsw':function(_0x4d4fba,_0x45c3a4){return _0x4d4fba&_0x45c3a4;},'OlJWU':function(_0x57bc6f,_0x252339){return _0x57bc6f/_0x252339;},'ONVyC':function(_0x2382c6,_0x527948){return _0x2382c6<<_0x527948;}};let _0x3aa4bc=_0x20df12||0x1;while(_0x40fbff['bZQjq'](_0x40fbff[_0x310229(0x167)](Math[_0x310229(0x130)](0x2,0x7*_0x3aa4bc),0x2),_0x5ca290))_0x3aa4bc++;const _0x119e50=Buffer[_0x310229(0x14e)](_0x3aa4bc);for(let _0x11ef3e=_0x3aa4bc-0x1;_0x11ef3e>=0x0;_0x11ef3e--){_0x119e50[_0x11ef3e]=_0x40fbff['qXAsw'](_0x5ca290,0xff),_0x5ca290=Math[_0x310229(0x153)](_0x40fbff[_0x310229(0x178)](_0x5ca290,0x100));}return _0x119e50[0x0]|=_0x40fbff['ONVyC'](0x1,0x8-_0x3aa4bc),_0x119e50;}function _0x5525(){const _0x4d9fa9=['rVHOq','PwHuh','22IulrJm','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','gTfLY','GpvoZ','944cpkLji','aiiZN','push','6MLZyWv','738180XDJDsn','msQXl','alloc','readInt16BE','wfGVs','1910620tODxhu','1791IyzUfB','floor','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','byTSo','Idqwm','BUrFF','bodyBeforeTimestamp','header','JOMLT','sULcw','QYAqR','TIgra','Rgkca','max','bodyAfterTimestamp','ABEtr','length','NVDDZ','2355yRXtMA','slice','GbvFo','QmUAV','FHdRh','has','shHFl','1871492sKMBxL','yAERU','BtXQX','copy','cNcCf','muReE','329490wXtlXM','ztNty','maxTicks','vIIxv','ENLXS','from','32KKvWSc','OlJWU','QNXdP','XXABv','10576JLlZiH','clusters','pow','TjTrT','dAGCn','exit','KlxpK','maxTimestampTicks','log','pbXiW','KCLtV','concat','OWFpJ','Stitched\x20','39801EvJCKE','yBsFF','lWqXB','indexOf','KEwrN','endsWith'];_0x5525=function(){return _0x4d9fa9;};return _0x5525();}function writeUint(_0x16df05,_0x415ae9){const _0x2481e6=_0xe647,_0x2ba712={'YCyVW':function(_0x337156,_0x3c7aa4){return _0x337156>=_0x3c7aa4;},'BEJDx':function(_0x59a52f,_0xdc419a){return _0x59a52f&_0xdc419a;}},_0x54fb57=Buffer[_0x2481e6(0x14e)](_0x415ae9);for(let _0x24191e=_0x415ae9-0x1;_0x2ba712['YCyVW'](_0x24191e,0x0);_0x24191e--){_0x54fb57[_0x24191e]=_0x2ba712['BEJDx'](_0x16df05,0xff),_0x16df05=Math['floor'](_0x16df05/0x100);}return _0x54fb57;}function writeUnknownSizeVint(_0x533550){const _0x47183c=Buffer['alloc'](_0x533550,0xff);return _0x47183c[0x0]=0xff>>_0x533550-0x1,_0x47183c;}function uintSize(_0xbac7f9){const _0x7d3bb5=_0xe647,_0x1aa0dd={'byTSo':function(_0x4fb5b1,_0x208806){return _0x4fb5b1===_0x208806;},'NpjHf':function(_0x2c2dfb,_0x4d702c){return _0x2c2dfb>_0x4d702c;},'bQhup':function(_0x365289,_0x454bb6){return _0x365289/_0x454bb6;}};if(_0x1aa0dd[_0x7d3bb5(0x155)](_0xbac7f9,0x0))return 0x1;let _0x51e650=0x0,_0x33e43a=_0xbac7f9;while(_0x1aa0dd['NpjHf'](_0x33e43a,0x0)){_0x51e650++,_0x33e43a=Math[_0x7d3bb5(0x153)](_0x1aa0dd['bQhup'](_0x33e43a,0x100));}return _0x51e650;}function findTimestampScale(_0x57b9be,_0x335cd9){const _0x4c80df=_0xe647,_0x55fedf={'btYmu':function(_0x491eee,_0x1b1844){return _0x491eee<_0x1b1844;},'rVHOq':function(_0x54df32,_0x9e4e55,_0x4420a7){return _0x54df32(_0x9e4e55,_0x4420a7);},'GbvFo':function(_0x5990bc,_0x50760e){return _0x5990bc+_0x50760e;},'pbXiW':function(_0x3be979,_0x4c1956){return _0x3be979===_0x4c1956;},'TzGiw':function(_0x128770,_0x29ab31){return _0x128770+_0x29ab31;},'shHFl':function(_0x4e3c39,_0x122598){return _0x4e3c39===_0x122598;},'Idqwm':function(_0x7ae4d5,_0x3ad72b,_0x423d1b,_0x6d851){return _0x7ae4d5(_0x3ad72b,_0x423d1b,_0x6d851);},'SKwoP':function(_0x385042,_0x493bb9){return _0x385042+_0x493bb9;},'OWFpJ':function(_0xcd18d1,_0x41d0db){return _0xcd18d1+_0x41d0db;},'QYAqR':function(_0x1c603f,_0x3df5b1){return _0x1c603f+_0x3df5b1;}};let _0x4b3629=_0x335cd9;const _0x11538e=Math['min'](_0x57b9be['length'],_0x335cd9+0x2710);while(_0x55fedf['btYmu'](_0x4b3629,_0x11538e)){const [_0x228cfa,_0x5851fa]=_0x55fedf[_0x4c80df(0x142)](readId,_0x57b9be,_0x4b3629),[_0x644cc6,_0x4b110e]=_0x55fedf[_0x4c80df(0x142)](readVint,_0x57b9be,_0x55fedf['GbvFo'](_0x4b3629,_0x5851fa));if(_0x55fedf[_0x4c80df(0x137)](_0x228cfa,ID_INFO)){let _0x255022=_0x55fedf[_0x4c80df(0x166)](_0x4b3629+_0x5851fa,_0x4b110e);const _0x39be69=_0x55fedf['TzGiw'](_0x255022,_0x644cc6);while(_0x255022<_0x39be69){const [_0x3d1042,_0x560081]=_0x55fedf[_0x4c80df(0x142)](readId,_0x57b9be,_0x255022),[_0x496368,_0x365d51]=_0x55fedf[_0x4c80df(0x142)](readVint,_0x57b9be,_0x55fedf['TzGiw'](_0x255022,_0x560081));if(_0x55fedf[_0x4c80df(0x16a)](_0x3d1042,ID_TIMESTAMP_SCALE))return _0x55fedf[_0x4c80df(0x156)](readUint,_0x57b9be,_0x55fedf[_0x4c80df(0x166)](_0x255022,_0x560081)+_0x365d51,_0x496368);_0x255022+=_0x55fedf['SKwoP'](_0x560081,_0x365d51)+_0x496368;}break;}if(_0x55fedf[_0x4c80df(0x16a)](_0x228cfa,ID_CLUSTER))break;if(isUnknownSize(_0x644cc6,_0x4b110e))break;_0x4b3629+=_0x55fedf[_0x4c80df(0x13a)](_0x55fedf[_0x4c80df(0x15c)](_0x5851fa,_0x4b110e),_0x644cc6);}return 0xf4240;}function findFirstClusterOffset(_0x12d488,_0x3e177a){const _0x240252=_0xe647,_0x65c5c1={'FDEdP':function(_0x18bb78,_0x4103c5,_0x5a8093){return _0x18bb78(_0x4103c5,_0x5a8093);},'QjPBB':function(_0x93d457,_0x148430,_0x1796e3){return _0x93d457(_0x148430,_0x1796e3);},'vIIxv':function(_0x382308,_0x51501c){return _0x382308+_0x51501c;}};let _0x40d8be=_0x3e177a;while(_0x40d8be<_0x12d488['length']){const [_0x2075c1,_0x264077]=readId(_0x12d488,_0x40d8be);if(_0x2075c1===ID_CLUSTER)return _0x40d8be;const [_0x2f277d,_0x5b3e85]=_0x65c5c1['FDEdP'](readVint,_0x12d488,_0x40d8be+_0x264077);if(_0x65c5c1['QjPBB'](isUnknownSize,_0x2f277d,_0x5b3e85))return _0x40d8be;_0x40d8be+=_0x65c5c1[_0x240252(0x174)](_0x264077,_0x5b3e85)+_0x2f277d;}return _0x12d488['length'];}function findClusterEnd(_0x47f445,_0x2da1ec,_0x1010aa,_0x4ebd45){const _0x135846=_0xe647,_0x3a11d7={'foXFW':function(_0x5605e4,_0x260e18){return _0x5605e4-_0x260e18;},'BUrFF':function(_0x8f3f79,_0x53826a,_0x1c8d00){return _0x8f3f79(_0x53826a,_0x1c8d00);},'KEwrN':function(_0x21add3,_0x52757f){return _0x21add3+_0x52757f;}};if(!isUnknownSize(_0x1010aa,_0x4ebd45))return _0x2da1ec+_0x1010aa;const _0x371fa1=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x5de4e6=_0x2da1ec;while(_0x5de4e6<_0x3a11d7['foXFW'](_0x47f445['length'],0x4)){const [_0x2a60a0,_0x4024bc]=_0x3a11d7[_0x135846(0x157)](readId,_0x47f445,_0x5de4e6);if(_0x371fa1[_0x135846(0x169)](_0x2a60a0))return _0x5de4e6;const [_0x34fe72,_0x4d2fbd]=readVint(_0x47f445,_0x5de4e6+_0x4024bc);if(_0x3a11d7['BUrFF'](isUnknownSize,_0x34fe72,_0x4d2fbd))return _0x47f445[_0x135846(0x162)];_0x5de4e6+=_0x3a11d7[_0x135846(0x140)](_0x4024bc+_0x4d2fbd,_0x34fe72);}return _0x47f445[_0x135846(0x162)];}function extractClusters(_0x5387a9,_0x582efe){const _0x3b7624=_0xe647,_0x481ee0={'ENLXS':function(_0x44a09a,_0x70c157,_0x21c89c){return _0x44a09a(_0x70c157,_0x21c89c);},'dAGCn':function(_0x495375,_0x3db05a){return _0x495375+_0x3db05a;},'FHdRh':function(_0x26f464,_0x351d43){return _0x26f464+_0x351d43;},'BtXQX':function(_0x9fb3cf,_0x5eb2b8,_0x2cd593,_0x275c79,_0x5d9f46){return _0x9fb3cf(_0x5eb2b8,_0x2cd593,_0x275c79,_0x5d9f46);},'dHTLU':function(_0x5e0417,_0x43b4a5){return _0x5e0417===_0x43b4a5;},'KCLtV':function(_0x5e3f0f,_0x673602,_0x16f3f5,_0x17702a){return _0x5e3f0f(_0x673602,_0x16f3f5,_0x17702a);},'ZMNPk':function(_0x157adb,_0x5152ee,_0x4d1803){return _0x157adb(_0x5152ee,_0x4d1803);},'yBsFF':function(_0x435fe,_0x1871f2){return _0x435fe+_0x1871f2;},'NVDDZ':function(_0x4b8927,_0x47f8e1){return _0x4b8927+_0x47f8e1;}},_0x41832f=[],_0x2948dc=Buffer[_0x3b7624(0x176)]([0x1f,0x43,0xb6,0x75]);let _0x249104=0x0;while(_0x249104<_0x5387a9['length']){const _0x457023=_0x5387a9[_0x3b7624(0x13f)](_0x2948dc,_0x249104);if(_0x457023===-0x1)break;const [_0x409b18,_0x155661]=_0x481ee0[_0x3b7624(0x175)](readId,_0x5387a9,_0x457023);if(_0x409b18!==ID_CLUSTER){_0x249104=_0x481ee0['dAGCn'](_0x457023,0x1);continue;}const [_0x87cdf9,_0x365751]=_0x481ee0[_0x3b7624(0x175)](readVint,_0x5387a9,_0x481ee0['FHdRh'](_0x457023,_0x155661)),_0x191ac9=_0x481ee0['FHdRh'](_0x457023+_0x155661,_0x365751),_0x360a06=_0x481ee0[_0x3b7624(0x16d)](findClusterEnd,_0x5387a9,_0x191ac9,_0x87cdf9,_0x365751);let _0x17990e=_0x191ac9,_0x42040f=0x0,_0x320cee=0x2,_0x38e580=![],_0x3a724b=Buffer['alloc'](0x0),_0x63ff89=Buffer[_0x3b7624(0x14e)](0x0);while(_0x17990e<_0x360a06){const [_0x5cfb3e,_0x25c0f0]=_0x481ee0['ENLXS'](readId,_0x5387a9,_0x17990e),[_0x22e228,_0x57ab2e]=readVint(_0x5387a9,_0x17990e+_0x25c0f0);if(_0x481ee0['dHTLU'](_0x5cfb3e,ID_TIMESTAMP)){_0x42040f=_0x481ee0[_0x3b7624(0x138)](readUint,_0x5387a9,_0x481ee0[_0x3b7624(0x168)](_0x17990e+_0x25c0f0,_0x57ab2e),_0x22e228),_0x320cee=_0x22e228,_0x38e580=!![],_0x3a724b=_0x5387a9['slice'](_0x191ac9,_0x17990e);const _0x3341a2=_0x481ee0['dAGCn'](_0x17990e+_0x25c0f0,_0x57ab2e)+_0x22e228;_0x63ff89=_0x5387a9['slice'](_0x3341a2,_0x360a06);break;}if(_0x5cfb3e===ID_CLUSTER)break;if(isUnknownSize(_0x22e228,_0x57ab2e))break;_0x17990e+=_0x481ee0[_0x3b7624(0x132)](_0x481ee0[_0x3b7624(0x132)](_0x25c0f0,_0x57ab2e),_0x22e228);}!_0x38e580&&(_0x63ff89=_0x5387a9[_0x3b7624(0x165)](_0x191ac9,_0x360a06));let _0x3c8d31=_0x42040f;_0x17990e=_0x191ac9;while(_0x17990e<_0x360a06){const [_0x422e24,_0x1539a9]=_0x481ee0['ZMNPk'](readId,_0x5387a9,_0x17990e),[_0x4f9374,_0x45fd20]=readVint(_0x5387a9,_0x17990e+_0x1539a9);if(_0x422e24===ID_SIMPLE_BLOCK&&_0x4f9374>=0x4){const _0x582ab8=_0x481ee0['FHdRh'](_0x17990e,_0x1539a9)+_0x45fd20,[,_0x5ea713]=readVint(_0x5387a9,_0x582ab8),_0x1313a0=_0x5387a9[_0x3b7624(0x14f)](_0x481ee0[_0x3b7624(0x13d)](_0x582ab8,_0x5ea713)),_0x1006c8=_0x481ee0[_0x3b7624(0x163)](_0x42040f,_0x1313a0);if(_0x1006c8>_0x3c8d31)_0x3c8d31=_0x1006c8;}if(_0x481ee0['dHTLU'](_0x422e24,ID_CLUSTER))break;if(isUnknownSize(_0x4f9374,_0x45fd20))break;_0x17990e+=_0x1539a9+_0x45fd20+_0x4f9374;}_0x41832f['push']({'timestamp':_0x42040f,'maxTicks':_0x3c8d31,'bodyBeforeTimestamp':_0x3a724b,'bodyAfterTimestamp':_0x63ff89,'timestampElementSize':_0x320cee}),_0x249104=_0x360a06;}return _0x41832f;}function parseWebm(_0x34f8ea){const _0x4f9555=_0xe647,_0x128688={'ESlXl':function(_0x1d9d8e,_0x1b60f8,_0x1becb8){return _0x1d9d8e(_0x1b60f8,_0x1becb8);},'JOMLT':function(_0xaf9cb7,_0x564d8d){return _0xaf9cb7+_0x564d8d;},'MuLDP':function(_0x33498d,_0x17d322,_0x7a7dac){return _0x33498d(_0x17d322,_0x7a7dac);},'GpvoZ':function(_0x919e94,_0x4377df){return _0x919e94>_0x4377df;}};let _0x4904db=0x0;const [,_0x303d9c]=_0x128688['ESlXl'](readId,_0x34f8ea,_0x4904db),[_0x3ebb01,_0x49dc96]=readVint(_0x34f8ea,_0x128688[_0x4f9555(0x15a)](_0x4904db,_0x303d9c));_0x4904db+=_0x128688['JOMLT'](_0x303d9c,_0x49dc96)+_0x3ebb01;const [_0x3efa18,_0x96d55e]=readId(_0x34f8ea,_0x4904db);if(_0x3efa18!==ID_SEGMENT)return null;const [,_0x248bd2]=readVint(_0x34f8ea,_0x4904db+_0x96d55e),_0x1ecd8a=_0x128688['JOMLT'](_0x4904db+_0x96d55e,_0x248bd2),_0x5065a6=findTimestampScale(_0x34f8ea,_0x1ecd8a),_0x4055c0=_0x128688['MuLDP'](findFirstClusterOffset,_0x34f8ea,_0x1ecd8a),_0x5707b8=_0x34f8ea['slice'](0x0,_0x4055c0),_0x287720=_0x128688['ESlXl'](extractClusters,_0x34f8ea,_0x5065a6);let _0x2d4e77=0x0;for(const _0x462ff7 of _0x287720){if(_0x128688[_0x4f9555(0x147)](_0x462ff7['maxTicks'],_0x2d4e77))_0x2d4e77=_0x462ff7[_0x4f9555(0x173)];}return{'header':_0x5707b8,'clusters':_0x287720,'timestampScale':_0x5065a6,'maxTimestampTicks':_0x2d4e77};}function buildCluster(_0x35573b,_0x583128,_0x2d41f0){const _0x593268=_0xe647,_0x8893fa={'TjTrT':function(_0x322209,_0x1b0c92){return _0x322209(_0x1b0c92);}},_0x3fabbd=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x3472e7=Math[_0x593268(0x15f)](0x4,_0x8893fa[_0x593268(0x131)](uintSize,_0x35573b)),_0xe802e0=Buffer['concat']([Buffer[_0x593268(0x176)]([ID_TIMESTAMP]),writeVint(_0x3472e7),writeUint(_0x35573b,_0x3472e7)]),_0x4775b0=Buffer['concat']([_0x583128,_0xe802e0,_0x2d41f0]),_0x1417a5=writeVint(_0x4775b0['length']);return Buffer['concat']([_0x3fabbd,_0x1417a5,_0x4775b0]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x4b0424){const _0x1c4e24=_0xe647,_0x3e7c9e={'MTKbf':function(_0x36b931,_0xf0c83e,_0x2b661f){return _0x36b931(_0xf0c83e,_0x2b661f);},'ztNty':function(_0x1120d7,_0x164a5a){return _0x1120d7+_0x164a5a;},'yAERU':function(_0x3d0348,_0x470299){return _0x3d0348+_0x470299;},'QNXdP':function(_0x5dc5a7,_0x5383c2){return _0x5dc5a7+_0x5383c2;},'wfGVs':function(_0x1f1a66,_0x314e10){return _0x1f1a66+_0x314e10;},'lWqXB':function(_0xc6fa16,_0x3f0d12,_0x53a2a5){return _0xc6fa16(_0x3f0d12,_0x53a2a5);},'XXABv':function(_0x1d5f7a,_0x131e0c){return _0x1d5f7a+_0x131e0c;},'CKRpl':function(_0x58dc1b,_0x570608){return _0x58dc1b+_0x570608;},'cNcCf':function(_0x4e9c56,_0x15cfdd){return _0x4e9c56+_0x15cfdd;},'aiiZN':function(_0x4a5663,_0x21475b){return _0x4a5663<_0x21475b;},'DlQYC':function(_0x2660bd,_0x11c73a,_0x16d1d3){return _0x2660bd(_0x11c73a,_0x16d1d3);},'msQXl':function(_0x5c5cd1,_0x58d4d2){return _0x5c5cd1+_0x58d4d2;},'WidGW':function(_0x58caab,_0x68d07f){return _0x58caab!==_0x68d07f;},'KlxpK':function(_0x560530,_0x4d54d4){return _0x560530+_0x4d54d4;},'SMEag':function(_0x4dfaa7,_0x4f6eec){return _0x4dfaa7+_0x4f6eec;}},_0x5e33b8=Buffer[_0x1c4e24(0x176)](_0x4b0424);let _0x69fe28=0x0;const [,_0x224102]=_0x3e7c9e['MTKbf'](readId,_0x5e33b8,_0x69fe28),[_0x3709ec,_0x46dca1]=readVint(_0x5e33b8,_0x3e7c9e['ztNty'](_0x69fe28,_0x224102)),_0x2d12ee=_0x3e7c9e[_0x1c4e24(0x16c)](_0x69fe28+_0x224102+_0x46dca1,_0x3709ec),[,_0x28ec96]=readId(_0x5e33b8,_0x2d12ee),[,_0x46b3b4]=readVint(_0x5e33b8,_0x3e7c9e[_0x1c4e24(0x179)](_0x2d12ee,_0x28ec96)),_0x2b9f21=_0x3e7c9e[_0x1c4e24(0x150)](_0x2d12ee,_0x28ec96)+_0x46b3b4,_0x520aa0=writeUnknownSizeVint(_0x46b3b4);_0x520aa0[_0x1c4e24(0x16e)](_0x5e33b8,_0x2d12ee+_0x28ec96);let _0x251702=_0x2b9f21;const _0x8c236f=Math['min'](_0x5e33b8[_0x1c4e24(0x162)],_0x2b9f21+0x2710);while(_0x251702<_0x8c236f){const [_0x4eb5cb,_0x50322d]=readId(_0x5e33b8,_0x251702),[_0x40d85d,_0xeed202]=_0x3e7c9e[_0x1c4e24(0x13e)](readVint,_0x5e33b8,_0x3e7c9e[_0x1c4e24(0x17a)](_0x251702,_0x50322d));if(_0x4eb5cb===ID_CLUSTER)break;if(isUnknownSize(_0x40d85d,_0xeed202))break;if(_0x4eb5cb===ID_INFO){const _0x31b7f0=_0x3e7c9e['CKRpl'](_0x251702+_0x50322d,_0xeed202),_0x72f0e8=_0x3e7c9e[_0x1c4e24(0x16f)](_0x31b7f0,_0x40d85d),_0x454b76=[];let _0x2388c8=_0x31b7f0;while(_0x3e7c9e[_0x1c4e24(0x149)](_0x2388c8,_0x72f0e8)){const [_0xcf205a,_0x3abc7d]=readId(_0x5e33b8,_0x2388c8),[_0x3e97e9,_0x42ca3c]=_0x3e7c9e['DlQYC'](readVint,_0x5e33b8,_0x2388c8+_0x3abc7d),_0x5422a2=_0x3e7c9e[_0x1c4e24(0x14d)](_0x3e7c9e[_0x1c4e24(0x172)](_0x3abc7d,_0x42ca3c),_0x3e97e9);_0x3e7c9e['WidGW'](_0xcf205a,ID_DURATION)&&_0x454b76[_0x1c4e24(0x14a)](_0x5e33b8['slice'](_0x2388c8,_0x3e7c9e['msQXl'](_0x2388c8,_0x5422a2))),_0x2388c8+=_0x5422a2;}const _0x471e9b=Buffer['concat'](_0x454b76),_0x518cb0=Buffer[_0x1c4e24(0x139)]([_0x5e33b8[_0x1c4e24(0x165)](_0x251702,_0x251702+_0x50322d),writeVint(_0x471e9b[_0x1c4e24(0x162)],_0xeed202)]);return Buffer['concat']([_0x5e33b8[_0x1c4e24(0x165)](0x0,_0x251702),_0x518cb0,_0x471e9b,_0x5e33b8[_0x1c4e24(0x165)](_0x72f0e8)]);}_0x251702+=_0x3e7c9e[_0x1c4e24(0x134)](_0x3e7c9e['SMEag'](_0x50322d,_0xeed202),_0x40d85d);}return _0x5e33b8;}export function stitchWebmFiles(_0x5a35ba,_0x2a85d7){const _0x111207=_0xe647,_0x525a8b={'gTfLY':function(_0x7dd98a,_0x3feae2){return _0x7dd98a===_0x3feae2;},'vHcRg':function(_0x6ec39e,_0x33106f){return _0x6ec39e(_0x33106f);},'SWQfH':function(_0x4dbb3c,_0xe2aa63){return _0x4dbb3c<_0xe2aa63;},'AivNC':function(_0x302ce9,_0x138c67){return _0x302ce9+_0x138c67;}};if(_0x5a35ba['length']<=0x1)return![];const _0x599a34=[];for(const _0x56089a of _0x5a35ba){const _0x5e37da=readFileSync(_0x56089a),_0x27b51d=parseWebm(_0x5e37da);if(!_0x27b51d||_0x525a8b[_0x111207(0x146)](_0x27b51d[_0x111207(0x12f)][_0x111207(0x162)],0x0))return![];_0x599a34[_0x111207(0x14a)](_0x27b51d);}const _0x5a942b=_0x599a34[0x0],_0x226e90=_0x525a8b['vHcRg'](rebuildHeaderWithoutDuration,_0x5a942b[_0x111207(0x159)]),_0x4e1fe1=[_0x226e90];let _0x571ff2=0x0;for(let _0xeb6137=0x0;_0x525a8b['SWQfH'](_0xeb6137,_0x599a34[_0x111207(0x162)]);_0xeb6137++){const _0x3a1a1b=_0x599a34[_0xeb6137];for(const _0x388ada of _0x3a1a1b['clusters']){const _0x16dd72=_0x388ada['timestamp']+_0x571ff2;_0x4e1fe1[_0x111207(0x14a)](buildCluster(_0x16dd72,_0x388ada[_0x111207(0x158)],_0x388ada[_0x111207(0x160)]));}const _0x4e10b0=0x1e;_0x571ff2+=_0x525a8b['AivNC'](_0x3a1a1b[_0x111207(0x135)],_0x4e10b0);}return writeFileSync(_0x2a85d7,Buffer['concat'](_0x4e1fe1)),!![];}if(process['argv'][0x1]?.['endsWith']('stitchWebmFiles.ts')||process['argv'][0x1]?.[_0x4e7c39(0x141)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args[_0x4e7c39(0x162)]<0x3&&(console['error'](_0x4e7c39(0x145)),process[_0x4e7c39(0x133)](0x1));const output=args[args[_0x4e7c39(0x162)]-0x1],inputs=args[_0x4e7c39(0x165)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x4e7c39(0x136)](_0x4e7c39(0x13b)+inputs['length']+'\x20files\x20->\x20'+output):console['log'](_0x4e7c39(0x154));}
|