@ranger-testing/ranger-cli 3.1.7-alpha.62f152a-54 → 3.1.7-alpha.9ed0a8d-59
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 +2 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2899(_0x312ee3,_0x1e2dd3){_0x312ee3=_0x312ee3-0x176;const _0x3116b5=_0x3116();let _0x2899f8=_0x3116b5[_0x312ee3];return _0x2899f8;}(function(_0x5f3aab,_0x25ef69){const _0x3686a6=_0x2899,_0x5b22d2=_0x5f3aab();while(!![]){try{const _0x29bce9=-parseInt(_0x3686a6(0x19a))/0x1+-parseInt(_0x3686a6(0x190))/0x2+parseInt(_0x3686a6(0x17e))/0x3*(parseInt(_0x3686a6(0x187))/0x4)+-parseInt(_0x3686a6(0x179))/0x5+parseInt(_0x3686a6(0x1af))/0x6+-parseInt(_0x3686a6(0x1ab))/0x7*(-parseInt(_0x3686a6(0x19e))/0x8)+parseInt(_0x3686a6(0x181))/0x9;if(_0x29bce9===_0x25ef69)break;else _0x5b22d2['push'](_0x5b22d2['shift']());}catch(_0x39e399){_0x5b22d2['push'](_0x5b22d2['shift']());}}}(_0x3116,0x97516));import{existsSync}from'fs';import _0x3e62cb from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x17ddec){const _0x28a274=_0x2899,_0x471ed4={'nYoQb':function(_0x422204,_0x2e6f3b){return _0x422204(_0x2e6f3b);},'oJbxk':function(_0x35426d,_0x1ff75d){return _0x35426d!==_0x1ff75d;},'GHAPn':function(_0x48ef24){return _0x48ef24();},'NqeAg':function(_0x3674b2,_0x12744a){return _0x3674b2===_0x12744a;},'bZobn':function(_0x51c339,_0x5cb8a0){return _0x51c339+_0x5cb8a0;},'whQBl':function(_0x231bbe,_0x37c067){return _0x231bbe+_0x37c067;},'NFlYl':function(_0x49d340,_0x36a093){return _0x49d340+_0x36a093;},'ltoyF':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','wEORJ':_0x28a274(0x18e),'iCWfP':_0x28a274(0x176),'ICGEZ':function(_0x1e0512,_0x48813e){return _0x1e0512 instanceof _0x48813e;},'cTnrG':_0x28a274(0x177),'alRTh':function(_0x1909bd){return _0x1909bd();},'NlbqP':_0x28a274(0x17f),'SsFqv':'source','amGgg':'Cloud\x20profile\x20(recommended)','sLcxS':'cloud','xWwRy':'local','IQABX':function(_0xbff4f3,_0x55a24f){return _0xbff4f3===_0x55a24f;},'snUFH':function(_0x5802d0,_0x2cb353,_0x246ce){return _0x5802d0(_0x2cb353,_0x246ce);},'VMiDu':function(_0x1d3b34,_0x31904c){return _0x1d3b34(_0x31904c);},'HRHDz':function(_0x2236b4,_0x4ef048){return _0x2236b4(_0x4ef048);},'dNbug':function(_0x302e05,_0x36ffbc){return _0x302e05+_0x36ffbc;},'SkyHi':function(_0x32fbec,_0x2a7203){return _0x32fbec+_0x2a7203;},'XsWgh':_0x28a274(0x1a2),'zzNsg':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','RwhnM':function(_0x59760c,_0x39e1a5){return _0x59760c(_0x39e1a5);}},_0x22466f=_0x17ddec['profile'];let _0x37a984=_0x22466f,_0x2d8ea3=null;const _0x1dd825=_0x22466f?null:await readActiveProfileName();if(_0x17ddec[_0x28a274(0x18b)]&&_0x22466f)console['log'](_0x28a274(0x1ad)+_0x17ddec['authEnv']+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x22466f+_0x28a274(0x192));else _0x17ddec['authEnv']&&!process[_0x28a274(0x1b1)]['RANGER_TEST_USERNAME']&&console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x17ddec[_0x28a274(0x18b)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x22466f&&process[_0x28a274(0x1b1)]['RANGER_TEST_USERNAME'])try{const _0x359a7b=await _0x471ed4['nYoQb'](resolveAdHocProfile,{'targetUrl':_0x17ddec['baseUrl']??readUrlEnvVars()[_0x28a274(0x178)],'envKey':_0x17ddec[_0x28a274(0x18b)]});_0x359a7b&&(_0x1dd825&&_0x471ed4[_0x28a274(0x189)](_0x1dd825,_0x359a7b['name'])&&console[_0x28a274(0x17a)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x359a7b['name']+_0x28a274(0x17b)+_0x1dd825+'\x22.\x20Pass\x20--profile\x20'+_0x1dd825+'\x20to\x20override.'),_0x37a984=_0x359a7b[_0x28a274(0x182)],_0x2d8ea3=_0x359a7b[_0x28a274(0x193)]);}catch(_0x4b5afd){if(!_0x1dd825||_0x17ddec['authEnv'])throw _0x4b5afd;console['log']('\x20\x20Warning:\x20'+(_0x4b5afd instanceof Error?_0x4b5afd['message']:String(_0x4b5afd))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x1dd825+'\x22.');}if(!_0x37a984)_0x37a984=_0x1dd825??undefined;if(!_0x37a984)try{const _0xf6fcdf=await _0x471ed4['GHAPn'](listCloudProfiles);if(_0x471ed4['NqeAg'](_0xf6fcdf[_0x28a274(0x1ac)],0x1)){const _0x17dc45=_0xf6fcdf[0x0];_0x37a984=_0x17dc45[_0x28a274(0x182)],console['log'](_0x28a274(0x198)+_0x17dc45[_0x28a274(0x182)]),console['log'](_0x28a274(0x183));}}catch{}if(!_0x37a984)throw new Error(_0x471ed4['bZobn'](_0x471ed4[_0x28a274(0x19c)](_0x471ed4[_0x28a274(0x196)](_0x471ed4['NFlYl'](_0x28a274(0x197),_0x471ed4['ltoyF']),_0x471ed4['wEORJ']),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'),_0x471ed4[_0x28a274(0x1a5)]));const _0x2bdd83=getEnvDir(_0x37a984),_0x27b626=existsSync(_0x2bdd83);let _0x4d4dd3=_0x2d8ea3,_0x1fa8fc=![];if(!_0x4d4dd3)try{_0x4d4dd3=await fetchCloudProfile(_0x37a984);if(!_0x4d4dd3)_0x1fa8fc=!![];}catch(_0x3df2b1){_0x471ed4['ICGEZ'](_0x3df2b1,ApiError)&&_0x3df2b1[_0x28a274(0x17d)]===0x194&&(_0x1fa8fc=!![]);}if(_0x22466f&&_0x1fa8fc&&!_0x27b626&&!_0x4d4dd3)throw new Error(_0x28a274(0x1ae)+_0x22466f+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x471ed4[_0x28a274(0x1a9)]+_0x28a274(0x194));if(_0x4d4dd3&&_0x27b626){let _0x357cb6=!![];if(_0x471ed4['alRTh'](isInteractive)){const {source:_0x15e822}=await _0x3e62cb['prompt']([{'type':_0x471ed4['NlbqP'],'name':_0x471ed4['SsFqv'],'message':'Profile\x20\x22'+_0x37a984+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x471ed4[_0x28a274(0x1a6)],'value':_0x471ed4[_0x28a274(0x1a3)]},{'name':'Local\x20profile','value':_0x471ed4[_0x28a274(0x1a0)]}],'default':'cloud'}]);_0x357cb6=_0x471ed4['IQABX'](_0x15e822,'cloud');}if(!_0x357cb6)_0x4d4dd3=null;}const _0x5c0112=readProfileOverrides(process['cwd'](),_0x37a984);let _0x5ad791=null,_0x182f93,_0x437f53,_0x362b26,_0x2811db,_0xb0e0c=null,_0x59c32a,_0x2ceca9;const _0x38f2a9=_0x471ed4[_0x28a274(0x19d)](expandOverrides,_0x5c0112),_0x476ada=readUrlEnvVars();if(_0x4d4dd3){_0x5ad791=_0x4d4dd3;const _0x1584be=_0x4d4dd3[_0x28a274(0x1b0)]??{},_0x2c1199=_0x471ed4[_0x28a274(0x18c)](mergeCloudProfileSettings,_0x1584be,_0x5c0112??undefined),_0x4b6bcc={..._0x4d4dd3,'settings':_0x2c1199};_0xb0e0c={'baseUrl':_0x471ed4['nYoQb'](expandString,_0x1584be['baseUrl']),'startPath':expandString(_0x1584be[_0x28a274(0x19f)])};const _0x16c6fd=await fetchAuthConfig(),_0x27f617=_0x16c6fd?_0x471ed4[_0x28a274(0x18c)](resolveAuthEnvironmentLocally,_0x16c6fd,_0x4d4dd3[_0x28a274(0x199)]):null;_0x59c32a=_0x27f617?.['domains']?.[0x0],_0x2ceca9=_0x27f617?.['key'];const _0x5eddd7=_0x471ed4[_0x28a274(0x19d)](resolveProfileUrl,{'flagBaseUrl':_0x17ddec['baseUrl'],'flagStartPath':_0x17ddec[_0x28a274(0x19f)],'envBaseUrl':_0x476ada['envBaseUrl'],'envStartPath':_0x476ada['envStartPath'],'projectOverrides':_0x38f2a9,'cloudSettings':_0xb0e0c,'authEnvironmentDomain':_0x59c32a}),_0x39a3df=process[_0x28a274(0x1b1)]['RANGER_SESSION_STATE_PATH'];if(_0x39a3df){if(!existsSync(_0x39a3df))throw new Error('RANGER_SESSION_STATE_PATH='+_0x39a3df+'\x20does\x20not\x20exist.');_0x182f93=_0x39a3df,_0x437f53=_0x471ed4[_0x28a274(0x180)](resolveEnvVars,_0x2c1199),_0x362b26=Boolean(_0x437f53[_0x28a274(0x17c)]);}else{const _0x4f5ebd=await _0x471ed4['snUFH'](resolveCloudProfileSession,_0x4b6bcc,{'effectiveBaseUrl':_0x5eddd7['baseUrl'],'telemetry':_0x17ddec[_0x28a274(0x1aa)],'assertedEnv':_0x17ddec['authEnv']});_0x182f93=_0x4f5ebd['authPath'],_0x437f53=resolveEnvVars(_0x4f5ebd['settings']),_0x362b26=_0x471ed4['HRHDz'](Boolean,_0x437f53[_0x28a274(0x17c)]),_0x59c32a=_0x4f5ebd[_0x28a274(0x18d)]?.['domains']?.[0x0],_0x2ceca9=_0x4f5ebd['resolvedEnv']?.[_0x28a274(0x1a8)];}}else{if(!_0x27b626){const _0x59ca8c=!_0x22466f;throw new Error(_0x59ca8c?_0x471ed4['dNbug'](_0x471ed4[_0x28a274(0x1b2)]('Active\x20profile\x20\x22'+_0x37a984+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a',_0x471ed4[_0x28a274(0x18a)]),_0x471ed4[_0x28a274(0x191)])+(_0x28a274(0x186)+_0x37a984+_0x28a274(0x18f)):_0x28a274(0x1ae)+_0x37a984+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x37a984);}const _0x1adf6b=await loadSettings(_0x37a984);_0x437f53=_0x471ed4[_0x28a274(0x195)](resolveEnvVars,_0x1adf6b),_0x362b26=_0x471ed4['RwhnM'](Boolean,_0x437f53['cdpEndpoint']),_0x2811db=_0x437f53[_0x28a274(0x1a7)];}const _0x2fd455=_0x471ed4[_0x28a274(0x195)](resolveProfileUrl,{'flagBaseUrl':_0x17ddec[_0x28a274(0x1a7)],'flagStartPath':_0x17ddec['startPath'],'envBaseUrl':_0x476ada[_0x28a274(0x178)],'envStartPath':_0x476ada['envStartPath'],'localSettingsBaseUrl':_0x2811db,'projectOverrides':_0x38f2a9,'cloudSettings':_0xb0e0c,'authEnvironmentDomain':_0x59c32a}),_0x2c6824=_0x2fd455[_0x28a274(0x1a1)]??_0x2fd455[_0x28a274(0x1a7)];if(!_0x2c6824&&!_0x362b26)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x37a984+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x37a984+_0x28a274(0x19b));return{'activeProfile':_0x37a984,'resolvedCloudProfile':_0x5ad791,'cloudAuthPath':_0x182f93,'resolvedSettings':_0x437f53,'isCdpMode':_0x362b26,'url':_0x2c6824,'baseUrlSource':_0x2fd455['baseUrlSource'],'authEnvKey':_0x2ceca9,'startPath':_0x2fd455['startPath']};}function expandString(_0x1d2f1a){if(typeof _0x1d2f1a!=='string')return _0x1d2f1a;return resolveEnvVars(_0x1d2f1a);}function expandOverrides(_0x40788f){const _0x5e5125=_0x2899,_0x4f9927={'enqTk':_0x5e5125(0x184),'zEGJF':function(_0x4b8796,_0x4b44b1){return _0x4b8796(_0x4b44b1);},'rkERv':function(_0x500c4c,_0x39356a){return _0x500c4c===_0x39356a;}};if(!_0x40788f)return _0x40788f;const _0x30fc08={..._0x40788f};return typeof _0x30fc08[_0x5e5125(0x1a7)]===_0x4f9927[_0x5e5125(0x188)]&&(_0x30fc08[_0x5e5125(0x1a7)]=_0x4f9927['zEGJF'](resolveEnvVars,_0x30fc08[_0x5e5125(0x1a7)])),_0x4f9927[_0x5e5125(0x1a4)](typeof _0x30fc08['startPath'],_0x5e5125(0x184))&&(_0x30fc08['startPath']=_0x4f9927[_0x5e5125(0x185)](resolveEnvVars,_0x30fc08['startPath'])),_0x30fc08;}function _0x3116(){const _0x489ae0=['iCWfP','amGgg','baseUrl','key','cTnrG','telemetry','7DOtzQJ','length','\x20\x20Note:\x20--env\x20\x22','Profile\x20\x22','7259094dJuiXk','settings','env','SkyHi','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','envBaseUrl','3690475ZLsBXS','log','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','cdpEndpoint','status','3501AYlhbP','list','VMiDu','330921nvDNiw','name','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','string','zEGJF','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','3808gqVmAw','enqTk','oJbxk','XsWgh','authEnv','snUFH','resolvedEnv','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','`\x20to\x20recreate\x20it.','559004VmzFap','zzNsg','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','profile','`ranger\x20profile\x20add`\x20to\x20create\x20one.','RwhnM','whQBl','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','environmentKey','1030946edhQju','\x20baseUrl\x20<url>','bZobn','nYoQb','2485912OFhYKW','startPath','xWwRy','url','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','sLcxS','rkERv'];_0x3116=function(){return _0x489ae0;};return _0x3116();}
|
|
1
|
+
function _0x4584(){const _0x210995=['Cloud\x20profile\x20(recommended)','534mRXeBF','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','startPath','kbsVc','RANGER_SESSION_STATE_PATH=','cYlSI','cdpEndpoint','aiYhw','cwd','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','string','topSz','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22','\x20\x20Warning:\x20','envBaseUrl','settings','atQDF','profile','domains','cjfmj','82035LZamnV','enZbK','8jXnkiN','\x20\x20Note:\x20--env\x20\x22','baseUrlSource','RANGER_SESSION_STATE_PATH','14rovsKs','list','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','RANGER_TEST_USERNAME','Local\x20profile','resolvedEnv','envStartPath','317550ghiWHj','20iwuoaY','XBUBJ','60ARGqbY','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','message','name','key','hITKn','log','1697806kpDgoh','XrVDz','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','Profile\x20\x22','Active\x20profile\x20\x22','HvXpt','5841120IeaMUt','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','Tlkpw','201876kYiHId','env','aWZbQ','source','AfAPR','KzAuO','NZydn','baseUrl','102960cSobzH','authEnv','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','telemetry','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','10101924WHthcl'];_0x4584=function(){return _0x210995;};return _0x4584();}(function(_0x881a28,_0x12daa4){const _0xa65fa2=_0x4ff9,_0x7082ce=_0x881a28();while(!![]){try{const _0x334a08=-parseInt(_0xa65fa2(0x1ab))/0x1*(-parseInt(_0xa65fa2(0x191))/0x2)+parseInt(_0xa65fa2(0x1a3))/0x3*(parseInt(_0xa65fa2(0x185))/0x4)+parseInt(_0xa65fa2(0x183))/0x5*(parseInt(_0xa65fa2(0x16e))/0x6)+-parseInt(_0xa65fa2(0x189))/0x7*(parseInt(_0xa65fa2(0x1a0))/0x8)+-parseInt(_0xa65fa2(0x16c))/0x9+-parseInt(_0xa65fa2(0x190))/0xa+parseInt(_0xa65fa2(0x19a))/0xb*(parseInt(_0xa65fa2(0x193))/0xc);if(_0x334a08===_0x12daa4)break;else _0x7082ce['push'](_0x7082ce['shift']());}catch(_0x31e23b){_0x7082ce['push'](_0x7082ce['shift']());}}}(_0x4584,0xbed62));import{existsSync}from'fs';function _0x4ff9(_0x5bd1e2,_0x49d986){_0x5bd1e2=_0x5bd1e2-0x166;const _0x45848f=_0x4584();let _0x4ff935=_0x45848f[_0x5bd1e2];return _0x4ff935;}import _0x231e7f 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(_0x29fb0b){const _0x31014e=_0x4ff9,_0x305ce4={'atQDF':function(_0x210452){return _0x210452();},'aWZbQ':function(_0x5a6b1b,_0x1a533b){return _0x5a6b1b(_0x1a533b);},'cYlSI':function(_0x3956a1){return _0x3956a1();},'Tlkpw':function(_0x4a2508,_0x2d2d97){return _0x4a2508??_0x2d2d97;},'XulWm':function(_0x4946d5,_0x35cc2d){return _0x4946d5===_0x35cc2d;},'aiYhw':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','NZydn':function(_0x2bf184,_0x144dcb){return _0x2bf184&&_0x144dcb;},'enZbK':function(_0x51d62a,_0x3d3b2b){return _0x51d62a+_0x3d3b2b;},'HvXpt':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','hITKn':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','EDfOP':_0x31014e(0x16d),'KzAuO':'cloud','XBUBJ':_0x31014e(0x18d),'kbsVc':'local','cjfmj':function(_0x345e93,_0x40e721){return _0x345e93===_0x40e721;},'topSz':function(_0x176283,_0xb0fe85,_0x12556d){return _0x176283(_0xb0fe85,_0x12556d);},'BIXHd':function(_0x37c992,_0x31a7bb){return _0x37c992(_0x31a7bb);},'vwgEy':function(_0x421688,_0x332ad1){return _0x421688(_0x332ad1);},'sBOwq':function(_0x5a5839,_0x4cd418){return _0x5a5839(_0x4cd418);},'YBILP':function(_0x139de6,_0x272ab3){return _0x139de6&&_0x272ab3;}},_0x251626=_0x29fb0b['profile'];let _0x5d261e=_0x251626,_0x3b4b4a=null;const _0x352e7a=_0x251626?null:await _0x305ce4[_0x31014e(0x17f)](readActiveProfileName);if(_0x29fb0b['authEnv']&&_0x251626)console['log'](_0x31014e(0x186)+_0x29fb0b['authEnv']+_0x31014e(0x17b)+_0x251626+_0x31014e(0x177));else _0x29fb0b[_0x31014e(0x1ac)]&&!process[_0x31014e(0x1a4)][_0x31014e(0x18c)]&&console[_0x31014e(0x199)](_0x31014e(0x186)+_0x29fb0b[_0x31014e(0x1ac)]+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x251626&&process[_0x31014e(0x1a4)]['RANGER_TEST_USERNAME'])try{const _0x2a3250=await _0x305ce4[_0x31014e(0x1a5)](resolveAdHocProfile,{'targetUrl':_0x29fb0b['baseUrl']??_0x305ce4[_0x31014e(0x173)](readUrlEnvVars)['envBaseUrl'],'envKey':_0x29fb0b[_0x31014e(0x1ac)]});_0x2a3250&&(_0x352e7a&&_0x352e7a!==_0x2a3250[_0x31014e(0x196)]&&console[_0x31014e(0x199)](_0x31014e(0x167)+_0x2a3250['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x352e7a+'\x22.\x20Pass\x20--profile\x20'+_0x352e7a+'\x20to\x20override.'),_0x5d261e=_0x2a3250['name'],_0x3b4b4a=_0x2a3250[_0x31014e(0x180)]);}catch(_0x290b27){if(!_0x352e7a||_0x29fb0b['authEnv'])throw _0x290b27;console['log'](_0x31014e(0x17c)+(_0x290b27 instanceof Error?_0x290b27[_0x31014e(0x195)]:String(_0x290b27))),console[_0x31014e(0x199)](_0x31014e(0x169)+_0x352e7a+'\x22.');}if(!_0x5d261e)_0x5d261e=_0x305ce4[_0x31014e(0x1a2)](_0x352e7a,undefined);if(!_0x5d261e)try{const _0x202c8e=await _0x305ce4['cYlSI'](listCloudProfiles);if(_0x305ce4['XulWm'](_0x202c8e['length'],0x1)){const _0x3360e2=_0x202c8e[0x0];_0x5d261e=_0x3360e2['name'],console['log'](_0x31014e(0x18b)+_0x3360e2[_0x31014e(0x196)]),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x5d261e)throw new Error(_0x31014e(0x1a1)+_0x305ce4[_0x31014e(0x175)]+'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a'+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'+_0x31014e(0x19c));const _0x5102d1=getEnvDir(_0x5d261e),_0x3b5cc6=existsSync(_0x5102d1);let _0x34a6f7=_0x3b4b4a,_0x2a0e70=![];if(!_0x34a6f7)try{_0x34a6f7=await _0x305ce4[_0x31014e(0x1a5)](fetchCloudProfile,_0x5d261e);if(!_0x34a6f7)_0x2a0e70=!![];}catch(_0x110896){_0x110896 instanceof ApiError&&_0x305ce4['XulWm'](_0x110896['status'],0x194)&&(_0x2a0e70=!![]);}if(_0x305ce4[_0x31014e(0x1a9)](_0x251626,_0x2a0e70)&&!_0x3b5cc6&&!_0x34a6f7)throw new Error(_0x305ce4['enZbK'](_0x31014e(0x19d)+_0x251626+_0x31014e(0x17a)+_0x305ce4[_0x31014e(0x19f)],_0x305ce4[_0x31014e(0x198)]));if(_0x34a6f7&&_0x3b5cc6){let _0x6b2f24=!![];if(isInteractive()){const {source:_0x162b40}=await _0x231e7f['prompt']([{'type':_0x31014e(0x18a),'name':_0x31014e(0x1a6),'message':'Profile\x20\x22'+_0x5d261e+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x305ce4['EDfOP'],'value':_0x305ce4[_0x31014e(0x1a8)]},{'name':_0x305ce4[_0x31014e(0x192)],'value':_0x305ce4[_0x31014e(0x171)]}],'default':'cloud'}]);_0x6b2f24=_0x305ce4[_0x31014e(0x182)](_0x162b40,'cloud');}if(!_0x6b2f24)_0x34a6f7=null;}const _0x3931e9=_0x305ce4[_0x31014e(0x179)](readProfileOverrides,process[_0x31014e(0x176)](),_0x5d261e);let _0x212aae=null,_0xbf1340,_0x14adf6,_0x37b99e,_0x167610,_0x581a42=null,_0x319de3,_0x19f5d9;const _0x49800c=expandOverrides(_0x3931e9),_0x13c8a1=readUrlEnvVars();if(_0x34a6f7){_0x212aae=_0x34a6f7;const _0x3a3158=_0x34a6f7['settings']??{},_0x39d8c4=mergeCloudProfileSettings(_0x3a3158,_0x3931e9??undefined),_0x52cf90={..._0x34a6f7,'settings':_0x39d8c4};_0x581a42={'baseUrl':expandString(_0x3a3158[_0x31014e(0x1aa)]),'startPath':expandString(_0x3a3158[_0x31014e(0x170)])};const _0x532f69=await fetchAuthConfig(),_0x2e3ea1=_0x532f69?resolveAuthEnvironmentLocally(_0x532f69,_0x34a6f7['environmentKey']):null;_0x319de3=_0x2e3ea1?.[_0x31014e(0x181)]?.[0x0],_0x19f5d9=_0x2e3ea1?.['key'];const _0x7a5826=resolveProfileUrl({'flagBaseUrl':_0x29fb0b['baseUrl'],'flagStartPath':_0x29fb0b['startPath'],'envBaseUrl':_0x13c8a1['envBaseUrl'],'envStartPath':_0x13c8a1[_0x31014e(0x18f)],'projectOverrides':_0x49800c,'cloudSettings':_0x581a42,'authEnvironmentDomain':_0x319de3}),_0x965da6=process[_0x31014e(0x1a4)][_0x31014e(0x188)];if(_0x965da6){if(!_0x305ce4['BIXHd'](existsSync,_0x965da6))throw new Error(_0x31014e(0x172)+_0x965da6+'\x20does\x20not\x20exist.');_0xbf1340=_0x965da6,_0x14adf6=_0x305ce4['BIXHd'](resolveEnvVars,_0x39d8c4),_0x37b99e=_0x305ce4['aWZbQ'](Boolean,_0x14adf6[_0x31014e(0x174)]);}else{const _0x4ac3f4=await resolveCloudProfileSession(_0x52cf90,{'effectiveBaseUrl':_0x7a5826['baseUrl'],'telemetry':_0x29fb0b[_0x31014e(0x16a)],'assertedEnv':_0x29fb0b['authEnv']});_0xbf1340=_0x4ac3f4['authPath'],_0x14adf6=_0x305ce4['BIXHd'](resolveEnvVars,_0x4ac3f4[_0x31014e(0x17e)]),_0x37b99e=Boolean(_0x14adf6[_0x31014e(0x174)]),_0x319de3=_0x4ac3f4[_0x31014e(0x18e)]?.['domains']?.[0x0],_0x19f5d9=_0x4ac3f4['resolvedEnv']?.[_0x31014e(0x197)];}}else{if(!_0x3b5cc6){const _0x31d062=!_0x251626;throw new Error(_0x31d062?_0x305ce4[_0x31014e(0x184)](_0x305ce4[_0x31014e(0x184)](_0x31014e(0x19e)+_0x5d261e+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a'+_0x31014e(0x166),'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a'),_0x31014e(0x168)+_0x5d261e+'`\x20to\x20recreate\x20it.'):'Profile\x20\x22'+_0x5d261e+_0x31014e(0x194)+_0x5d261e);}const _0x20dc1a=await loadSettings(_0x5d261e);_0x14adf6=_0x305ce4['vwgEy'](resolveEnvVars,_0x20dc1a),_0x37b99e=_0x305ce4['sBOwq'](Boolean,_0x14adf6[_0x31014e(0x174)]),_0x167610=_0x14adf6['baseUrl'];}const _0x1e4c01=resolveProfileUrl({'flagBaseUrl':_0x29fb0b[_0x31014e(0x1aa)],'flagStartPath':_0x29fb0b['startPath'],'envBaseUrl':_0x13c8a1[_0x31014e(0x17d)],'envStartPath':_0x13c8a1[_0x31014e(0x18f)],'localSettingsBaseUrl':_0x167610,'projectOverrides':_0x49800c,'cloudSettings':_0x581a42,'authEnvironmentDomain':_0x319de3}),_0x2cfd07=_0x1e4c01['url']??_0x1e4c01[_0x31014e(0x1aa)];if(_0x305ce4['YBILP'](!_0x2cfd07,!_0x37b99e))throw new Error(_0x31014e(0x16f)+_0x5d261e+_0x31014e(0x16b)+_0x5d261e+'\x20baseUrl\x20<url>');return{'activeProfile':_0x5d261e,'resolvedCloudProfile':_0x212aae,'cloudAuthPath':_0xbf1340,'resolvedSettings':_0x14adf6,'isCdpMode':_0x37b99e,'url':_0x2cfd07,'baseUrlSource':_0x1e4c01[_0x31014e(0x187)],'authEnvKey':_0x19f5d9,'startPath':_0x1e4c01[_0x31014e(0x170)]};}function expandString(_0x1304eb){if(typeof _0x1304eb!=='string')return _0x1304eb;return resolveEnvVars(_0x1304eb);}function expandOverrides(_0x558e52){const _0x23080d=_0x4ff9,_0x577a3b={'AfAPR':_0x23080d(0x178),'XrVDz':function(_0xdacee8,_0x1fdda1){return _0xdacee8(_0x1fdda1);}};if(!_0x558e52)return _0x558e52;const _0x342c3b={..._0x558e52};return typeof _0x342c3b['baseUrl']===_0x23080d(0x178)&&(_0x342c3b['baseUrl']=resolveEnvVars(_0x342c3b['baseUrl'])),typeof _0x342c3b['startPath']===_0x577a3b[_0x23080d(0x1a7)]&&(_0x342c3b['startPath']=_0x577a3b[_0x23080d(0x19b)](resolveEnvVars,_0x342c3b['startPath'])),_0x342c3b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55fc14,_0x138b95){const _0x6f1dda=_0x56b1,_0xa76697=_0x55fc14();while(!![]){try{const _0x49011f=parseInt(_0x6f1dda(0x8a))/0x1*(-parseInt(_0x6f1dda(0x88))/0x2)+parseInt(_0x6f1dda(0x7d))/0x3+parseInt(_0x6f1dda(0x82))/0x4+-parseInt(_0x6f1dda(0x80))/0x5*(-parseInt(_0x6f1dda(0x89))/0x6)+parseInt(_0x6f1dda(0x73))/0x7*(-parseInt(_0x6f1dda(0x8b))/0x8)+parseInt(_0x6f1dda(0x86))/0x9+-parseInt(_0x6f1dda(0x81))/0xa;if(_0x49011f===_0x138b95)break;else _0xa76697['push'](_0xa76697['shift']());}catch(_0x2d9b82){_0xa76697['push'](_0xa76697['shift']());}}}(_0x1996,0x58406));function firstDefined(..._0x2e5649){for(const _0x3438ea of _0x2e5649){if(_0x3438ea!==undefined&&_0x3438ea!==null&&_0x3438ea!=='')return _0x3438ea;}return undefined;}function normalizeAuthEnvironmentDomain(_0x1187b7){if(!_0x1187b7)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x1187b7))return _0x1187b7;return'https://'+_0x1187b7;}export function resolveBaseUrlWithSource(_0x1616d3){const _0x26cd54=_0x56b1,_0x2c0870={'oVnxv':function(_0x240f6d,_0x3899cc){return _0x240f6d in _0x3899cc;},'sIFnH':_0x26cd54(0x75),'ZTZdq':_0x26cd54(0x76),'ieGor':function(_0x1c0194,_0x1eb281){return _0x1c0194===_0x1eb281;},'SnrDf':_0x26cd54(0x72),'IAaPM':function(_0x5be839,_0x53a760){return _0x5be839!==_0x53a760;},'yqjRj':function(_0x2d3f11,_0x467eb8){return _0x2d3f11!==_0x467eb8;}},_0x3a6cd1=_0x1616d3[_0x26cd54(0x74)],_0x13e55a=!!_0x3a6cd1&&_0x2c0870[_0x26cd54(0x8d)]('baseUrl',_0x3a6cd1),_0x1937ac=_0x3a6cd1?.[_0x26cd54(0x7f)],_0x567761=!(_0x13e55a&&_0x1937ac===null),_0x3cf04f=[[_0x1616d3['flagBaseUrl'],_0x2c0870['sIFnH']],[_0x1616d3[_0x26cd54(0x78)],_0x2c0870['ZTZdq']],[_0x1616d3['localSettingsBaseUrl'],_0x26cd54(0x87)],[_0x2c0870['ieGor'](typeof _0x1937ac,'string')?_0x1937ac:undefined,'projects.json\x20override'],[_0x567761?_0x1616d3['cloudSettings']?.[_0x26cd54(0x7f)]:undefined,_0x2c0870[_0x26cd54(0x7c)]],[_0x567761?normalizeAuthEnvironmentDomain(_0x1616d3['authEnvironmentDomain']):undefined,'auth\x20environment\x20domain']];for(const [_0x4840ca,_0x3a18a2]of _0x3cf04f){if(_0x2c0870['IAaPM'](_0x4840ca,undefined)&&_0x4840ca!==null&&_0x2c0870[_0x26cd54(0x8c)](_0x4840ca,''))return{'baseUrl':_0x4840ca,'source':_0x3a18a2};}return{};}function _0x56b1(_0x51d719,_0x5170e3){_0x51d719=_0x51d719-0x71;const _0x199618=_0x1996();let _0x56b1df=_0x199618[_0x51d719];return _0x56b1df;}function _0x1996(){const _0x3b002b=['VCYhh','iKXRI','startsWith','SnrDf','2138703BabHvw','startPath','baseUrl','45FQdywS','6885660cGzRgA','773904WqtBeh','RANGER_START_PATH','string','rRjkF','3583575VnsuMt','local\x20profile\x20settings','19842RgZNCq','201672qkASGa','23EYsutV','2630664sHcgwC','yqjRj','oVnxv','flagStartPath','cloud\x20profile\x20settings','7xFnxGL','projectOverrides','--base-url','RANGER_BASE_URL','cloudSettings','envBaseUrl'];_0x1996=function(){return _0x3b002b;};return _0x1996();}export function resolveBaseUrl(_0x296aa2){const _0x38526f={'nkpcf':function(_0x100ab4,_0x229c51){return _0x100ab4(_0x229c51);}};return _0x38526f['nkpcf'](resolveBaseUrlWithSource,_0x296aa2)['baseUrl'];}export function resolveStartPath(_0x5800d8){const _0x3f2a65=_0x56b1,_0x238c8b={'fxQoC':function(_0x1c57d7,_0x138963){return _0x1c57d7 in _0x138963;},'EuJsH':_0x3f2a65(0x7e),'iKXRI':function(_0x126102,_0x17505b,_0x2496d4,_0x554411,_0x3964de){return _0x126102(_0x17505b,_0x2496d4,_0x554411,_0x3964de);}},_0xbc3a4f=_0x5800d8['projectOverrides'],_0x3d94e7=!!_0xbc3a4f&&_0x238c8b['fxQoC'](_0x238c8b['EuJsH'],_0xbc3a4f),_0x8bb33f=_0xbc3a4f?.[_0x3f2a65(0x7e)],_0x4bb72c=!(_0x3d94e7&&_0x8bb33f===null);return _0x238c8b[_0x3f2a65(0x7a)](firstDefined,_0x5800d8[_0x3f2a65(0x71)],_0x5800d8['envStartPath'],typeof _0x8bb33f===_0x3f2a65(0x84)?_0x8bb33f:undefined,_0x4bb72c?_0x5800d8[_0x3f2a65(0x77)]?.[_0x3f2a65(0x7e)]:undefined);}export function joinBaseAndPath(_0x339731,_0x155618){const _0x48f73d=_0x56b1,_0x599c41={'rRjkF':function(_0x58f476,_0x3fe993){return _0x58f476+_0x3fe993;}};if(!_0x339731)return undefined;if(!_0x155618)return _0x339731;const _0xeb9338=_0x339731['endsWith']('/')?_0x339731['slice'](0x0,-0x1):_0x339731,_0x285e8a=_0x155618[_0x48f73d(0x7b)]('/')?_0x155618:'/'+_0x155618;return _0x599c41[_0x48f73d(0x85)](_0xeb9338,_0x285e8a);}export function resolveProfileUrl(_0x78de4c){const _0x538e48=_0x56b1,_0x2a1887={'VCYhh':function(_0x52743f,_0x155799){return _0x52743f(_0x155799);}},{baseUrl:_0x2bcbe2,source:_0x575dc9}=_0x2a1887[_0x538e48(0x79)](resolveBaseUrlWithSource,_0x78de4c),_0x27cf39=_0x2a1887['VCYhh'](resolveStartPath,_0x78de4c);return{'baseUrl':_0x2bcbe2,'baseUrlSource':_0x575dc9,'startPath':_0x27cf39,'url':joinBaseAndPath(_0x2bcbe2,_0x27cf39)};}export function readUrlEnvVars(_0xf12ea1=process['env']){const _0x5eb969=_0x56b1;return{'envBaseUrl':_0xf12ea1['RANGER_BASE_URL'],'envStartPath':_0xf12ea1[_0x5eb969(0x83)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x41a2(_0x119306,_0x1e214c){_0x119306=_0x119306-0x1c0;const _0xb0dffb=_0xb0df();let _0x41a22f=_0xb0dffb[_0x119306];return _0x41a22f;}(function(_0x558ec2,_0x101c07){const _0x4c164c=_0x41a2,_0x57ddc6=_0x558ec2();while(!![]){try{const _0x25add6=parseInt(_0x4c164c(0x1d2))/0x1*(parseInt(_0x4c164c(0x1c2))/0x2)+-parseInt(_0x4c164c(0x1cd))/0x3*(-parseInt(_0x4c164c(0x1c5))/0x4)+parseInt(_0x4c164c(0x1c8))/0x5+-parseInt(_0x4c164c(0x1c9))/0x6+-parseInt(_0x4c164c(0x1d1))/0x7*(-parseInt(_0x4c164c(0x1ca))/0x8)+-parseInt(_0x4c164c(0x1cc))/0x9+parseInt(_0x4c164c(0x1c3))/0xa;if(_0x25add6===_0x101c07)break;else _0x57ddc6['push'](_0x57ddc6['shift']());}catch(_0x52783e){_0x57ddc6['push'](_0x57ddc6['shift']());}}}(_0xb0df,0x6d081));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x1ec9a8,_0x160d5e){const _0x5172dd=_0x41a2,_0x5e161e={'RYsFc':function(_0x5b67f9,_0x5d1e39){return _0x5b67f9(_0x5d1e39);},'ogUvT':function(_0x4e5aeb,_0x5078c8){return _0x4e5aeb<_0x5078c8;},'KyADV':function(_0xaa21f7,_0x14f245){return _0xaa21f7*_0x14f245;},'thBsb':function(_0x3662d0,_0x46137e){return _0x3662d0+_0x46137e;}},_0x590eda=_0x160d5e?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x5ce140=_0x160d5e?.[_0x5172dd(0x1cb)]??DEFAULT_BASE_DELAY_MS;let _0x47edc6;for(let _0x4d338c=0x0;_0x4d338c<=_0x590eda;_0x4d338c++){try{return await _0x1ec9a8();}catch(_0x55534b){_0x47edc6=_0x55534b instanceof Error?_0x55534b:new Error(_0x5e161e[_0x5172dd(0x1c1)](String,_0x55534b));if(_0x5e161e[_0x5172dd(0x1c0)](_0x4d338c,_0x590eda)){const _0x361728=_0x5e161e[_0x5172dd(0x1c4)](_0x5ce140,Math['pow'](0x2,_0x4d338c));_0x160d5e?.['label']&&console['error'](_0x160d5e[_0x5172dd(0x1c7)]+_0x5172dd(0x1c6)+(_0x4d338c+0x1)+'/'+_0x5e161e[_0x5172dd(0x1d0)](_0x590eda,0x1)+_0x5172dd(0x1cf)+_0x361728+_0x5172dd(0x1ce)),await new Promise(_0x58782d=>setTimeout(_0x58782d,_0x361728));}}}throw _0x47edc6;}function _0xb0df(){const _0x5a85d7=['RYsFc','2IYILMZ','2439810jEclVE','KyADV','284vxpQAH','\x20failed\x20(attempt\x20','label','1457290UwopLc','3728520YbxUqd','16gptVPD','baseDelayMs','6190632UBwCHe','1599vcrpjP','ms...','),\x20retrying\x20in\x20','thBsb','2509087WWIkUp','465697rbEgzI','ogUvT'];_0xb0df=function(){return _0x5a85d7;};return _0xb0df();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c9af3,_0x4fa4fa){const _0x661f69=_0x564f,_0x5156b9=_0x5c9af3();while(!![]){try{const _0x2de064=-parseInt(_0x661f69(0x180))/0x1*(parseInt(_0x661f69(0x184))/0x2)+parseInt(_0x661f69(0x187))/0x3*(-parseInt(_0x661f69(0x181))/0x4)+-parseInt(_0x661f69(0x17d))/0x5*(parseInt(_0x661f69(0x17f))/0x6)+-parseInt(_0x661f69(0x188))/0x7+-parseInt(_0x661f69(0x17b))/0x8*(-parseInt(_0x661f69(0x182))/0x9)+parseInt(_0x661f69(0x185))/0xa*(-parseInt(_0x661f69(0x189))/0xb)+parseInt(_0x661f69(0x183))/0xc*(parseInt(_0x661f69(0x186))/0xd);if(_0x2de064===_0x4fa4fa)break;else _0x5156b9['push'](_0x5156b9['shift']());}catch(_0x1526f9){_0x5156b9['push'](_0x5156b9['shift']());}}}(_0x21a7,0x5bcc1));function _0x21a7(){const _0x12ad3f=['filter','78YTEILS','2699JkVEEr','1262488HgpmZb','5250474nWDkvd','2452524MgJfgv','178MCHVjC','210TTntci','52yfkFSz','6HyucXg','701876VCIHQI','15873lOkQxc','matchAll','8haorJV','origin','8795MGILYE'];_0x21a7=function(){return _0x12ad3f;};return _0x21a7();}function _0x564f(_0x52d96c,_0x15e434){_0x52d96c=_0x52d96c-0x17a;const _0x21a7f=_0x21a7();let _0x564f71=_0x21a7f[_0x52d96c];return _0x564f71;}const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x273f17){const _0x17b692=_0x564f,_0x5d5aa2=new Set();for(const _0x3b0d94 of _0x273f17[_0x17b692(0x17a)](ABSOLUTE_URL_PATTERN)){const _0x9d6f8c=_0x3b0d94[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x5d5aa2['add'](new URL(_0x9d6f8c)['origin']);}catch{}}return[..._0x5d5aa2];}export function findScenarioOriginMismatches(_0x2ca7a2,_0x5ad58e){const _0x262e3a=_0x564f;let _0x2a193c;try{_0x2a193c=new URL(_0x5ad58e)[_0x262e3a(0x17c)];}catch{return[];}return extractUrlOrigins(_0x2ca7a2)[_0x262e3a(0x17e)](_0x4acaf2=>_0x4acaf2!==_0x2a193c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x11e65d=_0x395e;(function(_0x2d7493,_0xf86de9){const _0x4c34bd=_0x395e,_0x114ef8=_0x2d7493();while(!![]){try{const _0x4a3d68=-parseInt(_0x4c34bd(0x11c))/0x1+-parseInt(_0x4c34bd(0x12e))/0x2*(parseInt(_0x4c34bd(0x118))/0x3)+parseInt(_0x4c34bd(0x134))/0x4*(-parseInt(_0x4c34bd(0x127))/0x5)+parseInt(_0x4c34bd(0x123))/0x6*(-parseInt(_0x4c34bd(0x11a))/0x7)+parseInt(_0x4c34bd(0x11d))/0x8*(-parseInt(_0x4c34bd(0x110))/0x9)+-parseInt(_0x4c34bd(0x128))/0xa+parseInt(_0x4c34bd(0x117))/0xb;if(_0x4a3d68===_0xf86de9)break;else _0x114ef8['push'](_0x114ef8['shift']());}catch(_0x3ecb53){_0x114ef8['push'](_0x114ef8['shift']());}}}(_0x2e1c,0x56bcb));import*as _0x110111 from'fs';import*as _0x4b41a8 from'path';import*as _0x105108 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4b41a8['join'](_0x105108[_0x11e65d(0x135)](),_0x11e65d(0x10e),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x24fd0a=_0x11e65d,_0x255ae2={'dPVtL':'utf-8','Drquy':function(_0x311288){return _0x311288();}};try{if(_0x110111['existsSync'](CACHE_FILE)){const _0x25b7d1=JSON[_0x24fd0a(0x115)](_0x110111[_0x24fd0a(0x12f)](CACHE_FILE,_0x255ae2['dPVtL']));return{'version':0x3,'sessions':_0x25b7d1['sessions']||{},'branches':_0x25b7d1['branches']||{},'lastEnabledSessionClearedAt':_0x25b7d1[_0x24fd0a(0x131)]};}}catch{}return _0x255ae2['Drquy'](createEmptyCache);}function saveCache(_0x1271bb){const _0x1de0fa=_0x11e65d;try{const _0x16038b=_0x4b41a8['dirname'](CACHE_FILE);!_0x110111['existsSync'](_0x16038b)&&_0x110111[_0x1de0fa(0x10f)](_0x16038b,{'recursive':!![]}),_0x110111[_0x1de0fa(0x132)](CACHE_FILE,JSON['stringify'](_0x1271bb,null,0x2));}catch{}}export function getCurrentBranch(){const _0x3908b1=_0x11e65d,_0x393e3b={'UHxeN':_0x3908b1(0x137),'gEQeC':function(_0x61c4a0,_0x2b7fa7){return _0x61c4a0===_0x2b7fa7;},'WeaTK':'HEAD'};try{const _0xdbaef2=execSync('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x3908b1(0x119),'stdio':[_0x393e3b['UHxeN'],_0x393e3b['UHxeN'],'pipe']})[_0x3908b1(0x11b)]();if(!_0xdbaef2||_0x393e3b[_0x3908b1(0x12c)](_0xdbaef2,_0x393e3b['WeaTK']))return null;return _0xdbaef2;}catch{return null;}}export function enableBranch(_0x215f80){const _0x564688=_0x11e65d,_0x54a3b0={'FowNH':function(_0x19fbe5){return _0x19fbe5();},'thxFl':function(_0x23a3af,_0x35d356){return _0x23a3af(_0x35d356);}},_0x4b79a4=_0x54a3b0['FowNH'](loadCache);_0x4b79a4['branches'][_0x215f80]=!![],_0x54a3b0[_0x564688(0x133)](saveCache,_0x4b79a4);}export function disableBranch(_0x4d601e){const _0x3808e6=_0x11e65d,_0x5c620b={'OwEWm':function(_0x4a47d3,_0x5bc8ff){return _0x4a47d3(_0x5bc8ff);}},_0x390919=loadCache();delete _0x390919[_0x3808e6(0x12d)][_0x4d601e],_0x5c620b[_0x3808e6(0x122)](saveCache,_0x390919);}export function isBranchEnabled(_0x323e48){const _0x9e08fb=_0x11e65d,_0x52b395={'LGCtn':function(_0x194fd2,_0x29ea8b){return _0x194fd2===_0x29ea8b;}},_0x47e1ff=loadCache();return _0x52b395[_0x9e08fb(0x113)](_0x47e1ff[_0x9e08fb(0x12d)][_0x323e48],!![]);}function getOrCreateSession(_0x2bb235,_0x255929){const _0x471663=_0x11e65d;return!_0x2bb235[_0x471663(0x125)][_0x255929]&&(_0x2bb235['sessions'][_0x255929]={}),_0x2bb235[_0x471663(0x125)][_0x255929];}export function enableSession(_0x3f2155){const _0x30a179=_0x11e65d,_0x440476={'uGOBU':function(_0x58f741,_0x54622c,_0x5960ce){return _0x58f741(_0x54622c,_0x5960ce);},'ZGgyW':function(_0x5778c9,_0x48ae7c){return _0x5778c9!==_0x48ae7c;}},_0x54e007=loadCache(),_0x53cf12=_0x440476['uGOBU'](getOrCreateSession,_0x54e007,_0x3f2155);_0x53cf12['enabled']=!![];const _0x444b7c=getCurrentBranch();_0x444b7c&&_0x440476[_0x30a179(0x120)](_0x444b7c,'main')&&_0x440476['ZGgyW'](_0x444b7c,_0x30a179(0x10d))&&(_0x54e007['branches'][_0x444b7c]=!![],_0x53cf12[_0x30a179(0x10a)]=_0x444b7c),saveCache(_0x54e007);}export function isSessionEnabled(_0x2ca52b){const _0x16d9b9=_0x11e65d,_0x40a0f4={'sskWz':function(_0x454b1e){return _0x454b1e();},'rEVYN':function(_0x196980,_0x865900){return _0x196980===_0x865900;},'iouBj':function(_0x3b273f,_0x18d913){return _0x3b273f||_0x18d913;}},_0x251dea=loadCache(),_0x24349c=_0x40a0f4['sskWz'](getCurrentBranch);if(!_0x24349c||_0x40a0f4[_0x16d9b9(0x10c)](_0x24349c,'main')||_0x24349c==='master')return _0x251dea['sessions'][_0x2ca52b]?.[_0x16d9b9(0x116)]===!![];const _0x2c1172=_0x251dea[_0x16d9b9(0x12d)][_0x24349c]===!![],_0xffa7c1=_0x251dea[_0x16d9b9(0x125)][_0x2ca52b]?.['enabled']===!![];return _0x40a0f4[_0x16d9b9(0x124)](_0x2c1172,_0xffa7c1);}export function disableSession(_0xf9aff9){const _0x3bfaa4=_0x11e65d,_0x4c181a={'rpXVY':function(_0x3b1de2){return _0x3b1de2();}},_0x238376=_0x4c181a[_0x3bfaa4(0x126)](loadCache),_0x16e528=getOrCreateSession(_0x238376,_0xf9aff9);_0x16e528[_0x3bfaa4(0x116)]=![],saveCache(_0x238376);}export function updateBranchTracking(_0xad482){const _0xfebe08=_0x11e65d,_0x3d3922={'YuPsB':function(_0x5cbe3b){return _0x5cbe3b();},'JmTos':function(_0x585bf9,_0x1ddfdd){return _0x585bf9!==_0x1ddfdd;}},_0x377e23=_0x3d3922['YuPsB'](loadCache),_0x447b28=_0x377e23['sessions'][_0xad482];if(!_0x447b28?.[_0xfebe08(0x116)])return;const _0x15a2a4=getCurrentBranch();if(!_0x15a2a4||_0x15a2a4===_0xfebe08(0x111)||_0x15a2a4===_0xfebe08(0x10d))return;_0x3d3922[_0xfebe08(0x109)](_0x447b28[_0xfebe08(0x10a)],_0x15a2a4)&&(_0x377e23[_0xfebe08(0x12d)][_0x15a2a4]=!![],_0x447b28['currentBranch']=_0x15a2a4,saveCache(_0x377e23));}export function initBranchTracking(_0x14926d){const _0x2b7f9f=_0x11e65d,_0x20ec86={'uULfv':_0x2b7f9f(0x111),'XmQia':function(_0xb404a0,_0xc4e80e){return _0xb404a0===_0xc4e80e;},'riQiY':'master','sQQIz':function(_0x7fe0c0,_0x32c261){return _0x7fe0c0(_0x32c261);}},_0x1bb103=loadCache(),_0xdc9ad6=getCurrentBranch();if(!_0xdc9ad6||_0xdc9ad6===_0x20ec86[_0x2b7f9f(0x136)]||_0x20ec86[_0x2b7f9f(0x12a)](_0xdc9ad6,_0x20ec86['riQiY']))return;if(_0x1bb103['branches'][_0xdc9ad6]===!![]){const _0x5a8272=getOrCreateSession(_0x1bb103,_0x14926d);_0x5a8272['enabled']=!![],_0x5a8272['currentBranch']=_0xdc9ad6,_0x20ec86[_0x2b7f9f(0x130)](saveCache,_0x1bb103);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x2cb2fe){const _0x107cb2=_0x11e65d,_0x391e86=loadCache(),_0x5d9555=_0x391e86['sessions'][_0x2cb2fe];_0x5d9555?.[_0x107cb2(0x116)]&&(_0x391e86[_0x107cb2(0x131)]=Date[_0x107cb2(0x10b)](),saveCache(_0x391e86));}export function shouldAutoEnableAfterClear(_0x1e92c9){const _0x13b56=_0x11e65d,_0x134bb5={'eEUls':'clear','fRRBV':function(_0x4ec6b3){return _0x4ec6b3();},'YiZTj':function(_0x384d62,_0x51c17e){return _0x384d62<=_0x51c17e;}};if(_0x1e92c9!==_0x134bb5[_0x13b56(0x11e)])return![];const _0x599bf5=_0x134bb5['fRRBV'](loadCache),_0x353dc4=_0x599bf5['lastEnabledSessionClearedAt'];if(!_0x353dc4)return![];const _0x463b46=Date[_0x13b56(0x10b)]()-_0x353dc4;return _0x134bb5['YiZTj'](_0x463b46,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x59d8ec){const _0x4420c4=_0x11e65d,_0x9ada27={'CdCUK':function(_0x5daa2b){return _0x5daa2b();},'fdNKf':function(_0x355013,_0xe9f45b,_0x157f32){return _0x355013(_0xe9f45b,_0x157f32);},'dUjBO':function(_0x48ea96){return _0x48ea96();},'hWhnW':function(_0x49da8b,_0x351806){return _0x49da8b!==_0x351806;},'KMbYz':function(_0x56e332,_0x4619d5){return _0x56e332(_0x4619d5);}},_0x17f321=_0x9ada27['CdCUK'](loadCache),_0x48c05f=_0x9ada27['fdNKf'](getOrCreateSession,_0x17f321,_0x59d8ec);_0x48c05f[_0x4420c4(0x116)]=!![];const _0x54c0c1=_0x9ada27['dUjBO'](getCurrentBranch);_0x54c0c1&&_0x54c0c1!=='main'&&_0x9ada27['hWhnW'](_0x54c0c1,'master')&&(_0x48c05f[_0x4420c4(0x10a)]=_0x54c0c1),delete _0x17f321[_0x4420c4(0x131)],_0x9ada27['KMbYz'](saveCache,_0x17f321);}export function registerSession(_0x4d5061,_0x545029){const _0x381bec=_0x11e65d,_0x2a4a6c={'LtcwG':function(_0x3b83dd,_0x4ff6f3,_0x8ef33d){return _0x3b83dd(_0x4ff6f3,_0x8ef33d);},'XecfF':function(_0x1b2d84,_0x35f314){return _0x1b2d84(_0x35f314);}},_0x3516fc=loadCache(),_0x1e1332=_0x2a4a6c[_0x381bec(0x114)](getOrCreateSession,_0x3516fc,_0x4d5061);_0x1e1332[_0x381bec(0x129)]=_0x545029,_0x1e1332[_0x381bec(0x12b)]=new Date()['toISOString'](),_0x2a4a6c['XecfF'](saveCache,_0x3516fc);}export function getSessionEntry(_0xf4e34){const _0x1ddf09=_0x11e65d,_0x1d46a4={'qKitK':function(_0x49d633){return _0x49d633();}},_0x2c23bf=_0x1d46a4['qKitK'](loadCache),_0x32ae92=_0x2c23bf[_0x1ddf09(0x125)][_0xf4e34];if(_0x32ae92?.[_0x1ddf09(0x129)]&&_0x32ae92?.[_0x1ddf09(0x12b)])return{'featureId':_0x32ae92[_0x1ddf09(0x129)],'registeredAt':_0x32ae92[_0x1ddf09(0x12b)]};return null;}function _0x395e(_0x305d2b,_0x5722bb){_0x305d2b=_0x305d2b-0x109;const _0x2e1cfe=_0x2e1c();let _0x395e13=_0x2e1cfe[_0x305d2b];return _0x395e13;}export function unregisterSession(_0x2673bf){const _0x467c13=_0x11e65d,_0x44e683=loadCache(),_0x2021cd=_0x44e683['sessions'][_0x2673bf];_0x2021cd&&(delete _0x2021cd[_0x467c13(0x129)],delete _0x2021cd['registeredAt'],saveCache(_0x44e683));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x1cde54){const _0x263818=_0x11e65d,_0x56d61d={'zxRtB':function(_0x37027e){return _0x37027e();},'NAQpk':function(_0x3b0984,_0x40d228){return _0x3b0984>=_0x40d228;},'iTflX':function(_0x5b0727,_0x3b52b8){return _0x5b0727(_0x3b52b8);}},_0x100969=_0x56d61d['zxRtB'](loadCache),_0x316124=getOrCreateSession(_0x100969,_0x1cde54),_0x2c14ba=_0x316124['lastPlanReminderAt']||0x0,_0x217078=Date['now']();if(_0x56d61d['NAQpk'](_0x217078-_0x2c14ba,PLAN_REMINDER_INTERVAL_MS))return _0x316124[_0x263818(0x11f)]=_0x217078,_0x56d61d['iTflX'](saveCache,_0x100969),!![];return![];}export function shouldShowStopReminder(_0x146f64){const _0x37b18a=_0x11e65d,_0xd2b2b7={'pUWLX':function(_0x2416c9,_0x1e0225){return _0x2416c9>=_0x1e0225;},'VdRVO':function(_0xa3957b,_0x38c83c){return _0xa3957b-_0x38c83c;}},_0x5e4950=loadCache(),_0x35e39b=getOrCreateSession(_0x5e4950,_0x146f64),_0x16e37a=_0x35e39b[_0x37b18a(0x121)]||0x0,_0x44fa5e=Date['now']();if(_0xd2b2b7['pUWLX'](_0xd2b2b7['VdRVO'](_0x44fa5e,_0x16e37a),STOP_REMINDER_INTERVAL_MS))return _0x35e39b[_0x37b18a(0x121)]=_0x44fa5e,saveCache(_0x5e4950),!![];return![];}export function hasSessionBeenPrompted(_0x2bb3c3){const _0x31cbb6=_0x11e65d,_0x1a0475={'NGJoA':function(_0x4282d4,_0x13036b){return _0x4282d4===_0x13036b;}},_0x233cd8=loadCache();return _0x1a0475['NGJoA'](_0x233cd8[_0x31cbb6(0x125)][_0x2bb3c3]?.['prompted'],!![]);}function _0x2e1c(){const _0x198019=['iouBj','sessions','rpXVY','5Zqtgww','4736230eHYPTc','featureId','XmQia','registeredAt','gEQeC','branches','452RSWiDt','readFileSync','sQQIz','lastEnabledSessionClearedAt','writeFileSync','thxFl','265416YWfYyS','homedir','uULfv','pipe','JmTos','currentBranch','now','rEVYN','master','.claude','mkdirSync','9XOkGEA','main','prompted','LGCtn','LtcwG','parse','enabled','24527888ZVLeXX','2772YFxBIu','utf-8','347641mQZmnb','trim','184980eIdPcB','4744888aIheMH','eEUls','lastPlanReminderAt','ZGgyW','lastStopReminderAt','OwEWm','42mPDOGF'];_0x2e1c=function(){return _0x198019;};return _0x2e1c();}export function markSessionPrompted(_0x481a7c){const _0x1f6206=_0x11e65d,_0x90e29a={'shVdO':function(_0x6f76){return _0x6f76();}},_0x4355eb=_0x90e29a['shVdO'](loadCache),_0x5872b7=getOrCreateSession(_0x4355eb,_0x481a7c);_0x5872b7[_0x1f6206(0x112)]=!![],saveCache(_0x4355eb);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x43f2aa=_0x3280;(function(_0x23cdf6,_0x7f8158){const _0x3a8c30=_0x3280,_0x5f4153=_0x23cdf6();while(!![]){try{const _0x60b082=parseInt(_0x3a8c30(0xc6))/0x1*(-parseInt(_0x3a8c30(0xeb))/0x2)+-parseInt(_0x3a8c30(0xdf))/0x3+-parseInt(_0x3a8c30(0xce))/0x4*(-parseInt(_0x3a8c30(0xca))/0x5)+-parseInt(_0x3a8c30(0xbe))/0x6*(parseInt(_0x3a8c30(0xd7))/0x7)+-parseInt(_0x3a8c30(0xe4))/0x8+-parseInt(_0x3a8c30(0xe9))/0x9*(parseInt(_0x3a8c30(0xea))/0xa)+-parseInt(_0x3a8c30(0xc0))/0xb*(-parseInt(_0x3a8c30(0xe1))/0xc);if(_0x60b082===_0x7f8158)break;else _0x5f4153['push'](_0x5f4153['shift']());}catch(_0x7ae1b5){_0x5f4153['push'](_0x5f4153['shift']());}}}(_0x548e,0x4634a));import*as _0x5844e4 from'fs';import*as _0x4b8d05 from'path';import*as _0x30f5b8 from'os';import{execSync}from'child_process';function _0x3280(_0x1840f5,_0x16b0ec){_0x1840f5=_0x1840f5-0xbb;const _0x548e6b=_0x548e();let _0x328077=_0x548e6b[_0x1840f5];return _0x328077;}const CACHE_FILE=_0x4b8d05[_0x43f2aa(0xd1)](_0x30f5b8['homedir'](),_0x43f2aa(0xd4),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x4bdd56=_0x43f2aa,_0x50de99={'sjDbj':_0x4bdd56(0xc4),'fwXbU':function(_0x415941){return _0x415941();}};try{if(_0x5844e4[_0x4bdd56(0xd2)](CACHE_FILE)){const _0x928b32=JSON[_0x4bdd56(0xda)](_0x5844e4['readFileSync'](CACHE_FILE,_0x50de99[_0x4bdd56(0xc2)]));return{'version':0x3,'sessions':_0x928b32['sessions']||{},'branches':_0x928b32[_0x4bdd56(0xd8)]||{},'lastEnabledSessionClearedAt':_0x928b32[_0x4bdd56(0xd0)]};}}catch{}return _0x50de99[_0x4bdd56(0xc1)](createEmptyCache);}function saveCache(_0x1160a3){const _0x20bce2=_0x43f2aa;try{const _0x163d66=_0x4b8d05[_0x20bce2(0xe0)](CACHE_FILE);!_0x5844e4['existsSync'](_0x163d66)&&_0x5844e4[_0x20bce2(0xe3)](_0x163d66,{'recursive':!![]}),_0x5844e4['writeFileSync'](CACHE_FILE,JSON[_0x20bce2(0xdd)](_0x1160a3,null,0x2));}catch{}}export function getCurrentBranch(){const _0xd74cac=_0x43f2aa,_0x22ed71={'uJxRv':function(_0x39d493,_0x5b79b9,_0x2bd135){return _0x39d493(_0x5b79b9,_0x2bd135);},'fBMvP':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','IXQjs':_0xd74cac(0xc3),'EUlAh':function(_0x528ebc,_0x3bea1b){return _0x528ebc===_0x3bea1b;},'Srkln':_0xd74cac(0xc9)};try{const _0x31f37e=_0x22ed71['uJxRv'](execSync,_0x22ed71['fBMvP'],{'encoding':_0xd74cac(0xc4),'stdio':['pipe',_0x22ed71['IXQjs'],'pipe']})[_0xd74cac(0xcb)]();if(!_0x31f37e||_0x22ed71['EUlAh'](_0x31f37e,_0x22ed71[_0xd74cac(0xc8)]))return null;return _0x31f37e;}catch{return null;}}export function enableBranch(_0x1d6481){const _0x529908=_0x43f2aa,_0x45ae96={'RsLYj':function(_0x45db1a,_0x237a49){return _0x45db1a(_0x237a49);}},_0x1c71a0=loadCache();_0x1c71a0[_0x529908(0xd8)][_0x1d6481]=!![],_0x45ae96[_0x529908(0xbd)](saveCache,_0x1c71a0);}function _0x548e(){const _0x6fc7dc=['Nkcre','now','stringify','FqCvM','205596OifEFJ','dirname','15117180ZFONBV','SoOmU','mkdirSync','1468416mFWBQB','enabled','bDGoR','gdXsO','SSptm','737433cmonjD','50jVfKij','31518lcRBmB','wPkAU','LejoJ','uJkPW','sessions','sdNak','Zyuhv','master','IaMwL','CaoFf','RsLYj','2988ascZsC','uXQMB','11ewtGPm','fwXbU','sjDbj','pipe','utf-8','toISOString','18ZYZaRN','Jfwel','Srkln','HEAD','422355KEAXmn','trim','eAEpN','currentBranch','8hoBGFj','hwwna','lastEnabledSessionClearedAt','join','existsSync','lastStopReminderAt','.claude','vIbjQ','lastPlanReminderAt','2751ruGYNU','branches','euCUv','parse'];_0x548e=function(){return _0x6fc7dc;};return _0x548e();}export function disableBranch(_0x7817c7){const _0x352b5c={'OQjgV':function(_0x57ba1d){return _0x57ba1d();}},_0x4409c5=_0x352b5c['OQjgV'](loadCache);delete _0x4409c5['branches'][_0x7817c7],saveCache(_0x4409c5);}export function isBranchEnabled(_0x2293f6){const _0x5bb244=loadCache();return _0x5bb244['branches'][_0x2293f6]===!![];}function getOrCreateSession(_0x42a9b9,_0x59165d){const _0x34a5b8=_0x43f2aa;return!_0x42a9b9[_0x34a5b8(0xef)][_0x59165d]&&(_0x42a9b9[_0x34a5b8(0xef)][_0x59165d]={}),_0x42a9b9[_0x34a5b8(0xef)][_0x59165d];}export function enableSession(_0x597641){const _0x1044e8=_0x43f2aa,_0x159d0a={'fqOoY':function(_0x16e62c,_0x1919be,_0x30b0a0){return _0x16e62c(_0x1919be,_0x30b0a0);},'xnJxz':'main'},_0x1b2bdf=loadCache(),_0x2b5c46=_0x159d0a['fqOoY'](getOrCreateSession,_0x1b2bdf,_0x597641);_0x2b5c46[_0x1044e8(0xe5)]=!![];const _0x234223=getCurrentBranch();_0x234223&&_0x234223!==_0x159d0a['xnJxz']&&_0x234223!=='master'&&(_0x1b2bdf['branches'][_0x234223]=!![],_0x2b5c46[_0x1044e8(0xcd)]=_0x234223),saveCache(_0x1b2bdf);}export function isSessionEnabled(_0x28c6a0){const _0x3942bf=_0x43f2aa,_0x324258={'hwwna':function(_0xd5237d){return _0xd5237d();},'FqCvM':function(_0x5896ac){return _0x5896ac();},'Jfwel':'main','SoOmU':function(_0x486b41,_0x4a3ca9){return _0x486b41===_0x4a3ca9;},'Nkcre':function(_0x3b987e,_0x3c4097){return _0x3b987e||_0x3c4097;}},_0x1eda4b=_0x324258[_0x3942bf(0xcf)](loadCache),_0xfa579a=_0x324258[_0x3942bf(0xde)](getCurrentBranch);if(!_0xfa579a||_0xfa579a===_0x324258[_0x3942bf(0xc7)]||_0x324258['SoOmU'](_0xfa579a,_0x3942bf(0xf2)))return _0x1eda4b[_0x3942bf(0xef)][_0x28c6a0]?.[_0x3942bf(0xe5)]===!![];const _0x24a1f0=_0x324258[_0x3942bf(0xe2)](_0x1eda4b['branches'][_0xfa579a],!![]),_0x5df82f=_0x324258[_0x3942bf(0xe2)](_0x1eda4b['sessions'][_0x28c6a0]?.['enabled'],!![]);return _0x324258[_0x3942bf(0xdb)](_0x24a1f0,_0x5df82f);}export function disableSession(_0x188ce8){const _0x27d3cf={'rYyoV':function(_0x5c5e55,_0x4343d2,_0xa54b67){return _0x5c5e55(_0x4343d2,_0xa54b67);}},_0x54fc6b=loadCache(),_0x2a96b2=_0x27d3cf['rYyoV'](getOrCreateSession,_0x54fc6b,_0x188ce8);_0x2a96b2['enabled']=![],saveCache(_0x54fc6b);}export function updateBranchTracking(_0x1960a5){const _0x2ba144=_0x43f2aa,_0x4ab7b8={'LejoJ':function(_0x5de311,_0x46db3e){return _0x5de311===_0x46db3e;},'euCUv':'master'},_0x411eee=loadCache(),_0x379602=_0x411eee['sessions'][_0x1960a5];if(!_0x379602?.[_0x2ba144(0xe5)])return;const _0x59a1ab=getCurrentBranch();if(!_0x59a1ab||_0x4ab7b8[_0x2ba144(0xed)](_0x59a1ab,'main')||_0x4ab7b8[_0x2ba144(0xed)](_0x59a1ab,_0x4ab7b8[_0x2ba144(0xd9)]))return;_0x379602[_0x2ba144(0xcd)]!==_0x59a1ab&&(_0x411eee[_0x2ba144(0xd8)][_0x59a1ab]=!![],_0x379602[_0x2ba144(0xcd)]=_0x59a1ab,saveCache(_0x411eee));}export function initBranchTracking(_0x5e6883){const _0x5313e5=_0x43f2aa,_0x5c8e8d={'SSptm':function(_0x1f6d8b){return _0x1f6d8b();},'fioMm':function(_0x5dc4e8,_0x2fde2b){return _0x5dc4e8===_0x2fde2b;}},_0xca7c82=loadCache(),_0x361159=_0x5c8e8d[_0x5313e5(0xe8)](getCurrentBranch);if(!_0x361159||_0x5c8e8d['fioMm'](_0x361159,'main')||_0x5c8e8d['fioMm'](_0x361159,'master'))return;if(_0xca7c82[_0x5313e5(0xd8)][_0x361159]===!![]){const _0x2444ac=getOrCreateSession(_0xca7c82,_0x5e6883);_0x2444ac['enabled']=!![],_0x2444ac['currentBranch']=_0x361159,saveCache(_0xca7c82);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x1f5de3){const _0x209471=_0x43f2aa,_0x859987={'CaoFf':function(_0x31bbf0){return _0x31bbf0();},'fOrMY':function(_0x20ea30,_0x45b10e){return _0x20ea30(_0x45b10e);}},_0x261b9b=_0x859987[_0x209471(0xbc)](loadCache),_0x232118=_0x261b9b['sessions'][_0x1f5de3];_0x232118?.[_0x209471(0xe5)]&&(_0x261b9b['lastEnabledSessionClearedAt']=Date['now'](),_0x859987['fOrMY'](saveCache,_0x261b9b));}export function shouldAutoEnableAfterClear(_0x2721b5){const _0x351ec9=_0x43f2aa,_0x11c8e3={'vIbjQ':'clear','Mwxrp':function(_0x32d59b,_0x1b089c){return _0x32d59b-_0x1b089c;}};if(_0x2721b5!==_0x11c8e3[_0x351ec9(0xd5)])return![];const _0x2fc4c8=loadCache(),_0x5d4b32=_0x2fc4c8[_0x351ec9(0xd0)];if(!_0x5d4b32)return![];const _0x3607a2=_0x11c8e3['Mwxrp'](Date['now'](),_0x5d4b32);return _0x3607a2<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x10a49a){const _0x34f176=_0x43f2aa,_0x273992={'VgfaZ':function(_0x170508,_0x3dc0b3,_0x141476){return _0x170508(_0x3dc0b3,_0x141476);},'uXQMB':function(_0x59d6ee){return _0x59d6ee();},'eAEpN':function(_0xfe9ca4,_0x49af1f){return _0xfe9ca4(_0x49af1f);}},_0x5b0628=loadCache(),_0x1cd061=_0x273992['VgfaZ'](getOrCreateSession,_0x5b0628,_0x10a49a);_0x1cd061['enabled']=!![];const _0xca54a8=_0x273992[_0x34f176(0xbf)](getCurrentBranch);_0xca54a8&&_0xca54a8!=='main'&&_0xca54a8!=='master'&&(_0x1cd061[_0x34f176(0xcd)]=_0xca54a8),delete _0x5b0628[_0x34f176(0xd0)],_0x273992[_0x34f176(0xcc)](saveCache,_0x5b0628);}export function registerSession(_0x56c649,_0x5886ed){const _0x390982=_0x43f2aa,_0x4c8437={'bDGoR':function(_0x4c5cbc){return _0x4c5cbc();}},_0x516efb=_0x4c8437[_0x390982(0xe6)](loadCache),_0x3d44c2=getOrCreateSession(_0x516efb,_0x56c649);_0x3d44c2['featureId']=_0x5886ed,_0x3d44c2['registeredAt']=new Date()[_0x390982(0xc5)](),saveCache(_0x516efb);}export function getSessionEntry(_0x403e87){const _0x317cba=_0x43f2aa,_0x11b280={'IaMwL':function(_0x2ec8c8){return _0x2ec8c8();}},_0x55ae9d=_0x11b280[_0x317cba(0xbb)](loadCache),_0x5dfcfc=_0x55ae9d['sessions'][_0x403e87];if(_0x5dfcfc?.['featureId']&&_0x5dfcfc?.['registeredAt'])return{'featureId':_0x5dfcfc['featureId'],'registeredAt':_0x5dfcfc['registeredAt']};return null;}export function unregisterSession(_0x33d6b4){const _0x3ddf21={'oypFY':function(_0x38c852,_0x5cae3e){return _0x38c852(_0x5cae3e);}},_0x4effeb=loadCache(),_0x4072b3=_0x4effeb['sessions'][_0x33d6b4];_0x4072b3&&(delete _0x4072b3['featureId'],delete _0x4072b3['registeredAt'],_0x3ddf21['oypFY'](saveCache,_0x4effeb));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x3dfd8a){const _0x37cbd2=_0x43f2aa,_0x36a15c={'qiGqf':function(_0x3680b8){return _0x3680b8();},'sdNak':function(_0x13a8df,_0x43f725){return _0x13a8df>=_0x43f725;},'wPkAU':function(_0x3a3223,_0x484ada){return _0x3a3223-_0x484ada;},'vcOpR':function(_0x2d9353,_0x58d24c){return _0x2d9353(_0x58d24c);}},_0x3aa14d=_0x36a15c['qiGqf'](loadCache),_0x5ccb34=getOrCreateSession(_0x3aa14d,_0x3dfd8a),_0x5b8028=_0x5ccb34[_0x37cbd2(0xd6)]||0x0,_0x59c554=Date[_0x37cbd2(0xdc)]();if(_0x36a15c[_0x37cbd2(0xf0)](_0x36a15c[_0x37cbd2(0xec)](_0x59c554,_0x5b8028),PLAN_REMINDER_INTERVAL_MS))return _0x5ccb34[_0x37cbd2(0xd6)]=_0x59c554,_0x36a15c['vcOpR'](saveCache,_0x3aa14d),!![];return![];}export function shouldShowStopReminder(_0x425fe8){const _0x386cc9=_0x43f2aa,_0x25f739={'Zyuhv':function(_0x28f56d,_0x1d455a){return _0x28f56d>=_0x1d455a;},'AyfbO':function(_0x5a4a45,_0x3174d5){return _0x5a4a45(_0x3174d5);}},_0x5e26df=loadCache(),_0x30a7c5=getOrCreateSession(_0x5e26df,_0x425fe8),_0xe3e9c2=_0x30a7c5['lastStopReminderAt']||0x0,_0x1c99ea=Date[_0x386cc9(0xdc)]();if(_0x25f739[_0x386cc9(0xf1)](_0x1c99ea-_0xe3e9c2,STOP_REMINDER_INTERVAL_MS))return _0x30a7c5[_0x386cc9(0xd3)]=_0x1c99ea,_0x25f739['AyfbO'](saveCache,_0x5e26df),!![];return![];}export function hasSessionBeenPrompted(_0x6973db){const _0xe1931=_0x43f2aa,_0x584fa8=loadCache();return _0x584fa8[_0xe1931(0xef)][_0x6973db]?.['prompted']===!![];}export function markSessionPrompted(_0x4385a9){const _0x3b4973=_0x43f2aa,_0x59828b={'gdXsO':function(_0x1ea07c){return _0x1ea07c();},'rKouh':function(_0x5a8e2e,_0x546486,_0x3edf34){return _0x5a8e2e(_0x546486,_0x3edf34);},'uJkPW':function(_0x50a9c4,_0x2da65a){return _0x50a9c4(_0x2da65a);}},_0x482806=_0x59828b[_0x3b4973(0xe7)](loadCache),_0x84c37f=_0x59828b['rKouh'](getOrCreateSession,_0x482806,_0x4385a9);_0x84c37f['prompted']=!![],_0x59828b[_0x3b4973(0xee)](saveCache,_0x482806);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2efe12=_0x4f98;(function(_0x4cce18,_0x1a0dcd){const _0x2af609=_0x4f98,_0xfc811e=_0x4cce18();while(!![]){try{const _0x22f0cb=parseInt(_0x2af609(0xc6))/0x1+parseInt(_0x2af609(0x120))/0x2*(parseInt(_0x2af609(0x12b))/0x3)+-parseInt(_0x2af609(0xcc))/0x4*(parseInt(_0x2af609(0x126))/0x5)+parseInt(_0x2af609(0xec))/0x6+parseInt(_0x2af609(0xd2))/0x7*(parseInt(_0x2af609(0xf6))/0x8)+parseInt(_0x2af609(0x137))/0x9*(parseInt(_0x2af609(0x11a))/0xa)+-parseInt(_0x2af609(0xd3))/0xb;if(_0x22f0cb===_0x1a0dcd)break;else _0xfc811e['push'](_0xfc811e['shift']());}catch(_0x23fa4e){_0xfc811e['push'](_0xfc811e['shift']());}}}(_0x456a,0x5bd93));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x4f27e6,_0x4d7f80){const _0x268efe=_0x4f98,_0x2b4e9c={'NbPRq':function(_0x327e69,_0x38bd15,_0x4aaa86,_0x39561a){return _0x327e69(_0x38bd15,_0x4aaa86,_0x39561a);},'ukeVl':function(_0x13779b,_0x48cd72,_0x2c0323,_0x688747){return _0x13779b(_0x48cd72,_0x2c0323,_0x688747);},'rYEzm':'local','rHIOK':function(_0x216a64,_0x882b5e,_0x5a33ed){return _0x216a64(_0x882b5e,_0x5a33ed);},'XDNMV':function(_0x4e5764,_0x312266){return _0x4e5764(_0x312266);},'EaVcU':function(_0x432142,_0x2bd0c2){return _0x432142(_0x2bd0c2);},'LGapJ':function(_0x8775d8,_0x3e9a8b){return _0x8775d8(_0x3e9a8b);}},_0x26ba0e=_0x2b4e9c[_0x268efe(0xe0)](join,_0x4d7f80,'ci',_0x4f27e6),_0x3de0e3=_0x2b4e9c['ukeVl'](join,_0x4d7f80,'local',_0x4f27e6),_0x248a75=join(_0x4d7f80,_0x4f27e6),_0x41024b=join(_0x4d7f80,_0x2b4e9c[_0x268efe(0xe2)]),_0x7c904b=_0x2b4e9c[_0x268efe(0x10d)](join,_0x4d7f80,'ci');if(_0x2b4e9c[_0x268efe(0x10c)](existsSync,_0x26ba0e))return _0x26ba0e;if(_0x2b4e9c['EaVcU'](existsSync,_0x3de0e3))return _0x3de0e3;if(_0x2b4e9c['EaVcU'](existsSync,_0x248a75)&&(_0x248a75!==_0x41024b&&_0x248a75!==_0x7c904b?!![]:_0x2b4e9c[_0x268efe(0xc5)](hasLegacyProfileFiles,_0x248a75)))return _0x248a75;return null;}export function getEnvDir(_0xe5b590,_0x42fd3d={}){const _0x5294de=_0x4f98,_0x3b5c05={'cTJFV':function(_0x285106,_0x1a9f9e,_0x687da8){return _0x285106(_0x1a9f9e,_0x687da8);},'McUgm':function(_0x1f6e7e,_0x29b107){return _0x1f6e7e(_0x29b107);},'zzHwk':function(_0x543ce9){return _0x543ce9();},'GhJVU':function(_0x8cc3ca,_0x10d6a8){return _0x8cc3ca!==_0x10d6a8;},'DRXhy':function(_0x1d0ab3,_0xb17345,_0x2e0d65){return _0x1d0ab3(_0xb17345,_0x2e0d65);},'PERaF':function(_0x1bf988,_0x344171,_0x224308){return _0x1bf988(_0x344171,_0x224308);}},_0x3d0c96=getRangerDir(),_0x407168=_0x3b5c05['cTJFV'](findEnvInRoot,_0xe5b590,_0x3d0c96);if(_0x407168){if(_0x42fd3d[_0x5294de(0x10f)]&&_0x3b5c05['McUgm'](isLegacyEnvPath,_0x407168))throw _0x3b5c05['cTJFV'](legacyWriteError,_0xe5b590,_0x407168);return _0x407168;}const _0x369ed1=_0x3b5c05[_0x5294de(0x119)](getRangerHomeDir);if(_0x3b5c05[_0x5294de(0xde)](_0x369ed1,_0x3d0c96)){const _0x532be2=_0x3b5c05[_0x5294de(0x13d)](findEnvInRoot,_0xe5b590,_0x369ed1);if(_0x532be2){if(_0x42fd3d[_0x5294de(0x10f)]&&_0x3b5c05['McUgm'](isLegacyEnvPath,_0x532be2))throw _0x3b5c05['PERaF'](legacyWriteError,_0xe5b590,_0x532be2);return _0x532be2;}}const _0x41e874=join(_0x369ed1,'local',_0xe5b590);if(_0x42fd3d['forWrite'])throw legacyWriteError(_0xe5b590,_0x41e874);return _0x41e874;}function isLegacyEnvPath(_0x2946e5){const _0x22cbe8=_0x4f98,_0x3d9b46={'LPFpF':function(_0xf3966b){return _0xf3966b();}},_0x4fe29e=getRangerDir(),_0x1bdc68=_0x3d9b46[_0x22cbe8(0xea)](getRangerHomeDir);for(const _0x4a1ced of new Set([_0x4fe29e,_0x1bdc68])){const _0x268662=_0x4a1ced['endsWith']('/')?_0x4a1ced:_0x4a1ced+'/';if(_0x2946e5===_0x4a1ced||_0x2946e5['startsWith'](_0x268662))return!![];}return![];}function legacyWriteError(_0x266280,_0x178ee3){const _0x47caf3=_0x4f98,_0x22c47c={'leFhX':function(_0x545a7c,_0x529022){return _0x545a7c+_0x529022;}};return new Error(_0x22c47c[_0x47caf3(0xfe)](_0x22c47c[_0x47caf3(0xfe)](_0x22c47c[_0x47caf3(0xfe)](_0x47caf3(0x125)+_0x266280+'\x22\x20to\x20legacy\x20path\x20'+_0x178ee3+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),_0x47caf3(0x107)));}export function findExistingEnv(_0x1efc44,_0x4eaa64){const _0x599ba4=_0x4f98,_0x39ed1f={'dZOyk':'legacy','VjPMO':_0x599ba4(0xdf),'ikwfx':function(_0x2749cf,_0x39804d,_0x2c73ba){return _0x2749cf(_0x39804d,_0x2c73ba);},'EYauh':function(_0x4a8b5a,_0x19687c){return _0x4a8b5a(_0x19687c);},'LyXaj':function(_0x5e3de6,_0x400cde){return _0x5e3de6===_0x400cde;}},_0x2fe412=_0x4eaa64?.['rangerDir'],_0x2c6bc7=_0x2fe412?[_0x2fe412]:[getRangerDir(),getRangerHomeDir()][_0x599ba4(0x102)]((_0x248382,_0xd5801b,_0x134151)=>_0x134151[_0x599ba4(0xf5)](_0x248382)===_0xd5801b),_0x19a6e1=_0x4eaa64?.['locations']??['ci','local',_0x39ed1f['dZOyk']];for(const _0x162e00 of _0x2c6bc7){const _0x235b29=join(_0x162e00,_0x39ed1f[_0x599ba4(0x11f)]),_0x15d844=_0x39ed1f['ikwfx'](join,_0x162e00,'ci'),_0x4fce9d=[{'location':'ci','path':join(_0x162e00,'ci',_0x1efc44)},{'location':_0x39ed1f['VjPMO'],'path':join(_0x162e00,_0x39ed1f[_0x599ba4(0x11f)],_0x1efc44)},{'location':_0x599ba4(0xc3),'path':join(_0x162e00,_0x1efc44)}];for(const _0x2a81f1 of _0x4fce9d){if(_0x19a6e1['includes'](_0x2a81f1[_0x599ba4(0xc4)])&&_0x39ed1f[_0x599ba4(0xcd)](existsSync,_0x2a81f1['path'])){if(_0x2a81f1[_0x599ba4(0xc4)]==='legacy'&&(_0x39ed1f[_0x599ba4(0xed)](_0x2a81f1['path'],_0x235b29)||_0x2a81f1[_0x599ba4(0x114)]===_0x15d844)&&!_0x39ed1f['EYauh'](hasLegacyProfileFiles,_0x2a81f1[_0x599ba4(0x114)]))continue;return{'path':_0x2a81f1['path'],'location':_0x2a81f1['location']};}}}return null;}function hasLegacyProfileFiles(_0x4679ec){const _0x13dbfe=_0x4f98,_0x573c7f={'xynbG':function(_0x5f255c,_0x14b051){return _0x5f255c(_0x14b051);},'cNPKq':function(_0x3beb42,_0x164a5c,_0x2b933d){return _0x3beb42(_0x164a5c,_0x2b933d);},'ixrhD':_0x13dbfe(0xcf),'IbZaV':_0x13dbfe(0xef),'QjDSq':function(_0x223d5e,_0x542bf6){return _0x223d5e(_0x542bf6);},'PeUWT':function(_0x256783,_0x3a549f,_0x9f10c0){return _0x256783(_0x3a549f,_0x9f10c0);}};return _0x573c7f['xynbG'](existsSync,_0x573c7f[_0x13dbfe(0xf7)](join,_0x4679ec,_0x573c7f[_0x13dbfe(0x116)]))||_0x573c7f['xynbG'](existsSync,join(_0x4679ec,_0x573c7f['IbZaV']))||_0x573c7f[_0x13dbfe(0xfa)](existsSync,_0x573c7f['PeUWT'](join,_0x4679ec,_0x13dbfe(0x135)));}export function isEnvCi(_0xc26f37){const _0x192899=_0x4f98,_0x3a7d4d={'HqEBI':function(_0x59a181,_0x2a2dec){return _0x59a181(_0x2a2dec);},'FmEPf':function(_0x5bbc38,_0x126041,_0x318a53,_0x31b957){return _0x5bbc38(_0x126041,_0x318a53,_0x31b957);},'cPCmu':function(_0x6e0d9d){return _0x6e0d9d();},'ZgjUl':function(_0x15cce6){return _0x15cce6();}};if(_0x3a7d4d[_0x192899(0x134)](existsSync,_0x3a7d4d['FmEPf'](join,getRangerDir(),'ci',_0xc26f37)))return!![];const _0x514bca=_0x3a7d4d['cPCmu'](getRangerHomeDir);if(_0x514bca!==_0x3a7d4d[_0x192899(0x118)](getRangerDir)&&_0x3a7d4d[_0x192899(0x134)](existsSync,_0x3a7d4d['FmEPf'](join,_0x514bca,'ci',_0xc26f37)))return!![];return![];}function _0x4f98(_0x53bf3f,_0x34ca5d){_0x53bf3f=_0x53bf3f-0xc2;const _0x456a2d=_0x456a();let _0x4f986e=_0x456a2d[_0x53bf3f];return _0x4f986e;}export async function cleanupTempFiles(_0x926b09){const _0x2c739d=_0x4f98,_0x995d6={'slDlP':function(_0x310d66,_0x146cc6){return _0x310d66!==_0x146cc6;},'cVtuu':_0x2c739d(0x123)},_0x5393f6=[_0x926b09[_0x2c739d(0x130)],_0x926b09['configPath']]['filter'](Boolean);await Promise['all'](_0x5393f6['map'](_0x16e2d1=>unlink(_0x16e2d1)[_0x2c739d(0xf0)](_0xea7daf=>{const _0x169c13=_0x2c739d;_0x995d6['slDlP'](_0xea7daf['code'],_0x995d6[_0x169c13(0x133)])&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x16e2d1+':',_0xea7daf['message']);})));}export function getSettingsPath(_0x2e0357){const _0x53df0d=_0x4f98,_0x5b0007={'SQWBg':function(_0x3c8b3c,_0x1c168,_0x21a27e){return _0x3c8b3c(_0x1c168,_0x21a27e);}};return _0x5b0007[_0x53df0d(0xe8)](join,getEnvDir(_0x2e0357),_0x53df0d(0xcf));}export async function loadSettings(_0x185291){const _0x55fb83=_0x4f98,_0x413928={'gzYYs':_0x55fb83(0x11d)},_0x2b9bfd=getSettingsPath(_0x185291);if(!existsSync(_0x2b9bfd))return{};try{const _0x456464=await readFile(_0x2b9bfd,_0x413928[_0x55fb83(0xe6)]);return JSON['parse'](_0x456464);}catch{return{};}}export async function saveSettings(_0x48cca6,_0x192b00){const _0x4d3614=_0x4f98,_0x2c8e00={'KNKcD':function(_0x5c6774,_0x495781){return _0x5c6774(_0x495781);}},_0x4e74de=_0x2c8e00[_0x4d3614(0x101)](getSettingsPath,_0x48cca6),_0x22d93c=dirname(_0x4e74de);!_0x2c8e00[_0x4d3614(0x101)](existsSync,_0x22d93c)&&await mkdir(_0x22d93c,{'recursive':!![]}),await writeFile(_0x4e74de,JSON['stringify'](_0x192b00,null,0x2));}export function resolveEnvVars(_0x3c843a){const _0x2589cf=_0x4f98,_0x1cd64d={'FQaxk':function(_0x48969e,_0x32674e){return _0x48969e===_0x32674e;}};if(typeof _0x3c843a==='string')return _0x3c843a[_0x2589cf(0xd5)](/\$\{(\w+)\}/g,(_0x215240,_0x2b8288)=>{const _0x44fcef=_0x2589cf,_0x4938df=process['env'][_0x2b8288];if(_0x1cd64d[_0x44fcef(0xd7)](_0x4938df,undefined))throw new Error(_0x44fcef(0xc8)+_0x2b8288+_0x44fcef(0x105));return _0x4938df;});if(Array[_0x2589cf(0xeb)](_0x3c843a))return _0x3c843a['map'](resolveEnvVars);if(_0x3c843a&&typeof _0x3c843a==='object')return Object['fromEntries'](Object[_0x2589cf(0x108)](_0x3c843a)['map'](([_0x322727,_0x281a6e])=>[_0x322727,resolveEnvVars(_0x281a6e)]));return _0x3c843a;}const isRecord=_0x8389e7=>typeof _0x8389e7==='object'&&_0x8389e7!==null&&!Array[_0x2efe12(0xeb)](_0x8389e7),asRecord=_0x5d8561=>isRecord(_0x5d8561)?_0x5d8561:undefined,mergeHeaders=(_0xed83f5,_0x492f0e)=>{const _0x1f2767={'ZBjmL':function(_0x16d8b7,_0x59bbe9){return _0x16d8b7??_0x59bbe9;}},_0x50901f={..._0xed83f5??{},..._0x1f2767['ZBjmL'](_0x492f0e,{})};return Object['keys'](_0x50901f)['length']?_0x50901f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x2efe12(0xd4),'--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];function _0x456a(){const _0x1623eb=['ixrhD','flIwp','ZgjUl','zzHwk','1609330rxhtGv','allow','LduLW','utf-8','WlSFc','VjPMO','906BrpIrY','now','iITNM','ENOENT','contextOptions','Refusing\x20to\x20write\x20profile\x20\x22','5fOpQwK','install','push','headers','playwright-cli','1359ihwuvc','tQQTr','setupHeader','ZcoFu','safeMode','tempAuthPath','IBIOA','--disable-setuid-sandbox','cVtuu','HqEBI','auth.json.enc','headless','18uTfoVs','message','IxeKT','nCuSr','clipboard-read','UtLPn','DRXhy','JDyfY','chromium','ujmpu','includes','setupHeaders','legacy','location','LGapJ','674799ITiiYT','Default','Environment\x20variable\x20','TBNBh','--no-sandbox','FkMdO','1566332xPjwOD','EYauh','browser','settings.json','object','RwhYd','4528447GxmHYs','12839563KPUiHr','--allow-running-insecure-content','replace','aLMIH','FQaxk','cdpEndpoint','vision','baseUrl','eKWse','launchOptions','.json','GhJVU','local','NbPRq','string','rYEzm','executablePath','HzhzC','stagehand','gzYYs','-cli','SQWBg','JdiSh','LPFpF','isArray','517392EtYOOl','LyXaj','args','auth.json','catch','Failed\x20to\x20decrypt\x20auth\x20state:\x20','storageState','QhUMq','XvwMk','indexOf','8zWpTaw','cNPKq','RkIDe','userAgent','QjDSq','hSKzE','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','GrwbO','leFhX','none','pdf','KNKcD','filter','clipboard-write','iWGdK','\x20is\x20not\x20set','length','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','entries','extraHTTPHeaders','wFhQS','tZpwY','XDNMV','rHIOK','tYYKy','forWrite','UoEHo','enoSZ','core','hxywE','path','AiTti'];_0x456a=function(){return _0x1623eb;};return _0x456a();}export function buildBrowserOptionsFromSettings(_0x23d04c,_0x34e748={}){const _0x35f233=_0x2efe12,_0xcba57a={'CmgpZ':function(_0x15b203,_0x775ed9){return _0x15b203(_0x775ed9);},'bVTup':'boolean','chDaI':function(_0x628a59,_0x32539b){return _0x628a59(_0x32539b);},'IpNhr':function(_0x4e542d,_0x3228f2){return _0x4e542d===_0x3228f2;},'UtLPn':function(_0x226a64,_0x456df3,_0x3c9514){return _0x226a64(_0x456df3,_0x3c9514);}},_0x3f4570=asRecord(_0x23d04c[_0x35f233(0xce)]),_0x3a2cc8={..._0xcba57a['CmgpZ'](asRecord,_0x3f4570?.[_0x35f233(0xdc)])??{}};typeof _0x34e748['headless']===_0xcba57a['bVTup']&&(_0x3a2cc8[_0x35f233(0x136)]=_0x34e748['headless']);if(_0x23d04c[_0x35f233(0x12f)]){const _0x106fb1=_0x3a2cc8['args']??[],_0x599f14=SAFE_MODE_ARGS[_0x35f233(0x102)](_0x143252=>!_0x106fb1[_0x35f233(0x141)](_0x143252));_0x3a2cc8[_0x35f233(0xee)]=[..._0x106fb1,..._0x599f14];}if(_0x23d04c['allowInsecureLocalhost']){const _0x3cc908=_0x3a2cc8[_0x35f233(0xee)]??[],_0x53067b=ALLOW_LOCALHOST_ARGS['filter'](_0xe86aeb=>!_0x3cc908['includes'](_0xe86aeb));_0x3a2cc8['args']=[..._0x3cc908,..._0x53067b];}const _0x137966={..._0xcba57a['chDaI'](asRecord,_0x3f4570?.['contextOptions'])??{}};_0x137966['ignoreHTTPSErrors']=!![];_0xcba57a['IpNhr'](typeof _0x23d04c['userAgent'],_0x35f233(0xe1))&&(_0x137966[_0x35f233(0xf9)]=_0x23d04c[_0x35f233(0xf9)]);const _0x5d4afa=_0xcba57a[_0x35f233(0x13c)](mergeHeaders,asRecord(_0x137966['extraHTTPHeaders']),_0xcba57a['CmgpZ'](asRecord,_0x23d04c[_0x35f233(0x129)]));return _0x5d4afa?_0x137966['extraHTTPHeaders']=_0x5d4afa:delete _0x137966['extraHTTPHeaders'],_0x34e748['storageStatePath']&&(_0x137966[_0x35f233(0xf2)]=_0x34e748['storageStatePath']),{'launchOptions':_0x3a2cc8,'contextOptions':_0x137966};}export async function resolveProfileStorageState(_0x3faf0e){const _0x4f3844=_0x2efe12,_0x394d30={'JDyfY':function(_0x51f0d8,_0x30c0bf){return _0x51f0d8(_0x30c0bf);}};return resolveLocalAuthPath(_0x394d30[_0x4f3844(0x13e)](getEnvDir,_0x3faf0e));}async function resolveLocalAuthPath(_0x55415d){const _0x4032b0=_0x2efe12,_0x1b14a9={'AiTti':function(_0x303d13,_0x1f5941,_0x3a35ed){return _0x303d13(_0x1f5941,_0x3a35ed);},'hmdlM':_0x4032b0(0xfc),'iWGdK':function(_0x4cb965,_0xf12445){return _0x4cb965(_0xf12445);},'UoEHo':function(_0x83217b,_0x5736ba,_0x46833f){return _0x83217b(_0x5736ba,_0x46833f);},'IulPd':function(_0x19dced){return _0x19dced();},'tMbXE':function(_0x29cd01,_0x29de28){return _0x29cd01(_0x29de28);}},_0x2f6594=_0x1b14a9[_0x4032b0(0x115)](join,_0x55415d,'auth.json.enc'),_0x912593=join(_0x55415d,_0x4032b0(0xef));if(existsSync(_0x2f6594))try{const _0x5bea6e=await getToken();if(!_0x5bea6e)throw new Error(_0x1b14a9['hmdlM']);const _0x5058d7=await _0x1b14a9[_0x4032b0(0x104)](readFile,_0x2f6594),_0x258d66=_0x1b14a9['AiTti'](decrypt,_0x5058d7,_0x5bea6e),_0x43808a=_0x1b14a9[_0x4032b0(0x110)](join,_0x1b14a9['IulPd'](tmpdir),'ranger-auth-'+Date[_0x4032b0(0x121)]()+'.json');return await _0x1b14a9[_0x4032b0(0x115)](writeFile,_0x43808a,_0x258d66),{'storageStatePath':_0x43808a,'tempAuthPath':_0x43808a};}catch(_0xc3007e){const _0x473732=_0xc3007e instanceof Error?_0xc3007e[_0x4032b0(0x138)]:_0x1b14a9[_0x4032b0(0x104)](String,_0xc3007e);throw new Error(_0x4032b0(0xf1)+_0x473732);}if(_0x1b14a9['tMbXE'](existsSync,_0x912593))return{'storageStatePath':_0x912593};return{};}export async function buildPlaywrightConfig(_0x365784,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x156300){const _0x3dc9f6=_0x2efe12,_0x387ba5={'GrwbO':function(_0x218c0f,_0x67cf82,_0x1437fd,_0x569c6e,_0x37602a,_0x4ee74e,_0x275a12){return _0x218c0f(_0x67cf82,_0x1437fd,_0x569c6e,_0x37602a,_0x4ee74e,_0x275a12);},'jdsSu':function(_0x2427c8,_0x460e20){return _0x2427c8(_0x460e20);},'PVAuc':_0x3dc9f6(0xe5)};if(_0x156300)return _0x387ba5[_0x3dc9f6(0xfd)](buildPlaywrightConfigCore,_0x365784,_0x156300,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x3dc9f6(0xe5));const {storageStatePath:_0x1db940,tempAuthPath:_0x36a65f}=await _0x387ba5['jdsSu'](resolveLocalAuthPath,getEnvDir(_0x2f6c9d));try{const _0x4f4a2b=await buildPlaywrightConfigCore(_0x365784,_0x1db940,_0x2f6c9d,_0x57f7f6,_0x5e101a,_0x387ba5['PVAuc']);return{..._0x4f4a2b,'tempAuthPath':_0x36a65f};}catch(_0x358c44){_0x36a65f&&await unlink(_0x36a65f)[_0x3dc9f6(0xf0)](()=>{});throw _0x358c44;}}export async function buildPlaywrightConfigCore(_0x4b8cab,_0x29c0e4,_0x437097,_0xa45710,_0xdcbc92,_0x18b194=_0x2efe12(0xe5)){const _0x4dcf29=_0x2efe12,_0x1d6913={'LduLW':function(_0x1dd8f7,_0x247864){return _0x1dd8f7===_0x247864;},'frnpK':'--disable-setuid-sandbox','HzhzC':'clipboard-write','uUqUC':function(_0x2851c1,_0x5b549c){return _0x2851c1(_0x5b549c);},'sdhFj':_0x4dcf29(0x13f),'hSKzE':'playwright-cli','TBNBh':_0x4dcf29(0xff),'prviW':_0x4dcf29(0x100),'QIZNC':_0x4dcf29(0x11b),'tZpwY':function(_0x4a1742,_0x3f68b7){return _0x4a1742===_0x3f68b7;},'iITNM':function(_0x2f80cc,_0x4e3a37,_0xbd84a0){return _0x2f80cc(_0x4e3a37,_0xbd84a0);},'Ygcbh':function(_0x2114ab){return _0x2114ab();},'dUmow':function(_0x435af3,_0x21ef0a,_0x1b92c7){return _0x435af3(_0x21ef0a,_0x1b92c7);}},_0x50a131=_0xa45710||randomUUID(),_0xa47f94=join(getRangerDir(),'sessions',_0x50a131),_0x111f3c=_0x1d6913['uUqUC'](Boolean,_0x4b8cab[_0x4dcf29(0xd8)]),_0x58effe=_0x111f3c?{'browserName':_0x1d6913['sdhFj'],'cdpEndpoint':_0x4b8cab['cdpEndpoint']}:((()=>{const _0x35db36=_0x4dcf29,{launchOptions:_0x20331c,contextOptions:_0x4e57ae}=buildBrowserOptionsFromSettings(_0x4b8cab,{'headless':_0xdcbc92?![]:_0x4b8cab['headless']??!![],'storageStatePath':_0x29c0e4});if(_0x1d6913['LduLW'](process['getuid']?.(),0x0)){const _0x35a998=['--no-sandbox',_0x1d6913['frnpK']],_0x249db7=_0x20331c['args']??[],_0x4dc7a2=_0x35a998[_0x35db36(0x102)](_0x4c2ec8=>!_0x249db7['includes'](_0x4c2ec8));_0x20331c['args']=[..._0x249db7,..._0x4dc7a2];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x20331c,'contextOptions':{..._0x4e57ae,'permissions':[_0x35db36(0x13b),_0x1d6913[_0x35db36(0xe4)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x1900b7=_0x18b194===_0x1d6913['hSKzE']?{'browser':_0x58effe,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xa47f94,'outputMode':'file','codegen':_0x1d6913[_0x4dcf29(0xc9)]}:{'name':_0x437097,'browser':_0x58effe,'capabilities':[_0x4dcf29(0x112),'tabs',_0x4dcf29(0x127),_0x1d6913['prviW'],_0x4dcf29(0xd9)],'imageResponses':_0x1d6913['QIZNC'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xa47f94};if(!_0x111f3c){const _0x2a7da0=_0x1900b7[_0x4dcf29(0xce)],_0x5926ac=_0x2a7da0[_0x4dcf29(0x124)];if(_0x1d6913[_0x4dcf29(0x11c)](_0x5926ac[_0x4dcf29(0xf9)],undefined))delete _0x5926ac[_0x4dcf29(0xf9)];if(_0x1d6913[_0x4dcf29(0x10b)](_0x5926ac[_0x4dcf29(0xf2)],undefined))delete _0x5926ac[_0x4dcf29(0xf2)];}const _0x42853a=_0x1d6913['iITNM'](join,_0x1d6913['Ygcbh'](tmpdir),'ranger-config');!existsSync(_0x42853a)&&await _0x1d6913['dUmow'](mkdir,_0x42853a,{'recursive':!![]});const _0x1d1740=_0x18b194===_0x1d6913[_0x4dcf29(0xfb)]?_0x4dcf29(0xe7):'',_0x4cf92c=join(_0x42853a,_0x437097+'-'+Date[_0x4dcf29(0x121)]()+_0x1d1740+_0x4dcf29(0xdd));return await _0x1d6913[_0x4dcf29(0x122)](writeFile,_0x4cf92c,JSON['stringify'](_0x1900b7,null,0x2)),{'configPath':_0x4cf92c,'storageStatePath':_0x29c0e4};}export async function buildPlaywrightCliConfig(_0x5ab2d1,_0x1706c3,_0x5c7667,_0x5922b1,_0x54ccf6){const _0x26e0e9=_0x2efe12,_0x35789e={'JdiSh':function(_0x647fa2,_0x35c9bf,_0x675c57,_0xa4fd54,_0x3c35b5,_0x2c9093,_0x441f44){return _0x647fa2(_0x35c9bf,_0x675c57,_0xa4fd54,_0x3c35b5,_0x2c9093,_0x441f44);},'ZcoFu':function(_0x470b69,_0x3e35c3){return _0x470b69(_0x3e35c3);}};if(_0x54ccf6)return _0x35789e[_0x26e0e9(0xe9)](buildPlaywrightConfigCore,_0x5ab2d1,_0x54ccf6,_0x1706c3,_0x5c7667,_0x5922b1,_0x26e0e9(0x12a));const {storageStatePath:_0x563358,tempAuthPath:_0x329e90}=await resolveLocalAuthPath(_0x35789e[_0x26e0e9(0x12e)](getEnvDir,_0x1706c3));try{const _0x881362=await buildPlaywrightConfigCore(_0x5ab2d1,_0x563358,_0x1706c3,_0x5c7667,_0x5922b1,_0x26e0e9(0x12a));return{..._0x881362,'tempAuthPath':_0x329e90};}catch(_0x45ff16){_0x329e90&&await unlink(_0x329e90)[_0x26e0e9(0xf0)](()=>{});throw _0x45ff16;}}export async function buildRangerwrightCliConfig(_0x228678,_0x2e1de2,_0x3ccbd6,_0x43e9d4,_0x17821d){const _0x25d139=_0x2efe12,_0x1c79d9={'RkIDe':function(_0x267a78,_0x468417,_0x442e99){return _0x267a78(_0x468417,_0x442e99);},'eifzM':function(_0x55dcff,_0x4ba2cd){return _0x55dcff===_0x4ba2cd;},'cwdSy':_0x25d139(0x132),'QhUMq':function(_0xc6be8e){return _0xc6be8e();},'wFhQS':_0x25d139(0x13f),'aLMIH':function(_0x441fa7,_0x1cc20f){return _0x441fa7===_0x1cc20f;},'WlSFc':function(_0x500577,_0x99679f,_0x5e4c12){return _0x500577(_0x99679f,_0x5e4c12);},'enoSZ':function(_0x455eb0,_0x5b71ae){return _0x455eb0(_0x5b71ae);}},{storageStatePath:_0x1679ac,tempAuthPath:_0xf8f932}=_0x17821d?{'storageStatePath':_0x17821d,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x2e1de2)),_0xa6257=_0x3ccbd6||_0x1c79d9[_0x25d139(0xf3)](randomUUID),_0x5070aa=join(getRangerDir(),'sessions',_0xa6257),_0x38abaf=Boolean(_0x228678[_0x25d139(0xd8)]),_0x286e20=_0x38abaf?{'browserName':_0x1c79d9[_0x25d139(0x10a)],'cdpEndpoint':_0x228678['cdpEndpoint']}:((()=>{const _0xdc2191=_0x25d139,{launchOptions:_0xec42f8,contextOptions:_0xea3dc4}=_0x1c79d9['RkIDe'](buildBrowserOptionsFromSettings,_0x228678,{'headless':_0x43e9d4?![]:_0x228678['headless']??!![],'storageStatePath':_0x1679ac});if(_0x1c79d9['eifzM'](process['getuid']?.(),0x0)){const _0x340bd8=[_0xdc2191(0xca),_0x1c79d9['cwdSy']],_0x64aa1f=_0xec42f8[_0xdc2191(0xee)]??[],_0xdf2ab4=_0x340bd8['filter'](_0x2f9a80=>!_0x64aa1f[_0xdc2191(0x141)](_0x2f9a80));_0xec42f8[_0xdc2191(0xee)]=[..._0x64aa1f,..._0xdf2ab4];}return{'browserName':'chromium','launchOptions':_0xec42f8,'contextOptions':{..._0xea3dc4,'permissions':[_0xdc2191(0x13b),_0xdc2191(0x103)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x38abaf){const _0x543287=_0x286e20[_0x25d139(0x124)];if(_0x543287){if(_0x1c79d9[_0x25d139(0xd6)](_0x543287['userAgent'],undefined))delete _0x543287[_0x25d139(0xf9)];if(_0x543287['storageState']===undefined)delete _0x543287[_0x25d139(0xf2)];}}const _0x55f378={'browser':_0x286e20,'outputDir':_0x5070aa,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x43610b;try{const _0x10a669=join(tmpdir(),'ranger-config');!existsSync(_0x10a669)&&await _0x1c79d9[_0x25d139(0xf8)](mkdir,_0x10a669,{'recursive':!![]}),_0x43610b=join(_0x10a669,_0x2e1de2+'-'+Date['now']()+'-rangerwright.json'),await _0x1c79d9[_0x25d139(0x11e)](writeFile,_0x43610b,JSON['stringify'](_0x55f378,null,0x2));}catch(_0x4a0950){_0xf8f932&&await _0x1c79d9[_0x25d139(0x111)](unlink,_0xf8f932)[_0x25d139(0xf0)](()=>{});throw _0x4a0950;}return{'configPath':_0x43610b,'storageStatePath':_0x1679ac,'tempAuthPath':_0xf8f932,'outputDir':_0x5070aa};}export async function buildNovaActCliConfig(_0x244995,_0x50f2d8,_0x32a907,_0x51fd5f,_0x40e4fa){const _0x448094=_0x2efe12,_0xeb34bf={'gKTUk':function(_0x3bf451){return _0x3bf451();},'flIwp':function(_0x27b4d2,_0x14ce4b,_0x442c84,_0x5c3d6c){return _0x27b4d2(_0x14ce4b,_0x442c84,_0x5c3d6c);},'gUpfb':'sessions','danKp':function(_0x4676fa,_0x4a9bef){return _0x4676fa===_0x4a9bef;},'tQQTr':_0x448094(0xe1),'ILkDd':function(_0xbaf075,_0x193da2){return _0xbaf075(_0x193da2);},'FkMdO':function(_0x2ba6b2,_0x311f90){return _0x2ba6b2===_0x311f90;},'IBIOA':function(_0x21d558,_0x1cd6b0){return _0x21d558(_0x1cd6b0);}},{storageStatePath:_0x48cf87,tempAuthPath:_0x3c408a}=_0x40e4fa?{'storageStatePath':_0x40e4fa,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x50f2d8)),_0x590b1b=_0x32a907||_0xeb34bf['gKTUk'](randomUUID),_0x380317=_0xeb34bf[_0x448094(0x117)](join,_0xeb34bf['gKTUk'](getRangerDir),_0xeb34bf['gUpfb'],_0x590b1b),_0x3316c4=join(_0x380317,'nova-user-data'),_0x180e0=_0x48cf87?join(_0x3316c4,_0x448094(0xc7)):undefined,{launchOptions:_0x306c94,contextOptions:_0x32719c}=buildBrowserOptionsFromSettings(_0x244995,{'headless':_0x51fd5f?![]:_0x244995['headless']??!![],'storageStatePath':_0x48cf87});if(_0xeb34bf['danKp'](process['getuid']?.(),0x0)){const _0x521453=['--no-sandbox','--disable-setuid-sandbox'],_0xca97b5=_0x306c94[_0x448094(0xee)]??[],_0xd9eff9=_0x521453['filter'](_0x512318=>!_0xca97b5['includes'](_0x512318));_0x306c94['args']=[..._0xca97b5,..._0xd9eff9];}const _0x501d62=typeof _0x306c94[_0x448094(0xe3)]===_0xeb34bf[_0x448094(0x12c)]?_0x306c94['executablePath']:_0x48cf87?chromium['executablePath']():undefined;return{'storageStatePath':_0x48cf87,'tempAuthPath':_0x3c408a,'baseUrl':_0x244995[_0x448094(0xda)],'headless':_0xeb34bf['ILkDd'](Boolean,_0x306c94[_0x448094(0x136)]),'userDataDir':_0x3316c4,'browserProfilePath':_0x180e0,'executablePath':_0x501d62,'launchArgs':Array[_0x448094(0xeb)](_0x306c94['args'])?_0x306c94['args']['filter'](_0x5108e1=>typeof _0x5108e1==='string'):[],'userAgent':_0xeb34bf[_0x448094(0xcb)](typeof _0x32719c['userAgent'],'string')?_0x32719c['userAgent']:undefined,'extraHTTPHeaders':_0x32719c[_0x448094(0x109)],'allowInsecureLocalhost':Boolean(_0x244995['allowInsecureLocalhost']),'safeMode':Boolean(_0x244995['safeMode']),'cdpEndpoint':_0x244995[_0x448094(0xd8)],'isCdpMode':_0xeb34bf[_0x448094(0x131)](Boolean,_0x244995[_0x448094(0xd8)])};}export function getNestedValue(_0x3740ac,_0x2d64e6){const _0x230aeb=_0x2efe12,_0x27c812={'IxeKT':_0x230aeb(0xd0)},_0x38dddb=parseKeyPath(_0x2d64e6);let _0x4ad453=_0x3740ac;for(const _0x24c6cb of _0x38dddb){if(_0x4ad453===null||_0x4ad453===undefined||typeof _0x4ad453!==_0x27c812[_0x230aeb(0x139)])return undefined;_0x4ad453=_0x4ad453[_0x24c6cb];}return _0x4ad453;}export function setNestedValue(_0x376f59,_0x2dada0,_0x628804){const _0x303173=_0x2efe12,_0xc50cea={'HANAJ':function(_0x30270a,_0x3ba5d1){return _0x30270a-_0x3ba5d1;},'RwhYd':function(_0x21d9df,_0x71506f){return _0x21d9df in _0x71506f;},'wAojq':function(_0x112826,_0x427502){return _0x112826!==_0x427502;}},_0x42a068=parseKeyPath(_0x2dada0);let _0x51a4a6=_0x376f59;for(let _0x4ab765=0x0;_0x4ab765<_0xc50cea['HANAJ'](_0x42a068[_0x303173(0x106)],0x1);_0x4ab765++){const _0x4dba43=_0x42a068[_0x4ab765];(!_0xc50cea[_0x303173(0xd1)](_0x4dba43,_0x51a4a6)||_0xc50cea['wAojq'](typeof _0x51a4a6[_0x4dba43],'object'))&&(_0x51a4a6[_0x4dba43]={}),_0x51a4a6=_0x51a4a6[_0x4dba43];}_0x51a4a6[_0x42a068[_0x42a068['length']-0x1]]=_0x628804;}export function deleteNestedValue(_0x5f2727,_0x1e470d){const _0xa5dcd1=_0x2efe12,_0x1ed13b={'eKWse':function(_0x1dc368,_0x838f4e){return _0x1dc368(_0x838f4e);},'DWEVU':function(_0x3d2ce3,_0x22eee3){return _0x3d2ce3-_0x22eee3;},'sRmEv':function(_0x4c823f,_0x2787d4){return _0x4c823f===_0x2787d4;},'hxywE':_0xa5dcd1(0xd0),'tYYKy':function(_0x113de0,_0x35c170){return _0x113de0!==_0x35c170;}},_0x4fa44e=_0x1ed13b[_0xa5dcd1(0xdb)](parseKeyPath,_0x1e470d);let _0x104dd5=_0x5f2727;for(let _0x1246fc=0x0;_0x1246fc<_0x1ed13b['DWEVU'](_0x4fa44e[_0xa5dcd1(0x106)],0x1);_0x1246fc++){if(_0x1ed13b['sRmEv'](_0x104dd5,null)||_0x104dd5===undefined||typeof _0x104dd5!==_0x1ed13b['hxywE'])return![];_0x104dd5=_0x104dd5[_0x4fa44e[_0x1246fc]];}if(_0x104dd5===null||_0x104dd5===undefined||_0x1ed13b[_0xa5dcd1(0x10e)](typeof _0x104dd5,_0x1ed13b[_0xa5dcd1(0x113)]))return![];const _0x25a78d=_0x4fa44e[_0x4fa44e[_0xa5dcd1(0x106)]-0x1];if(_0x25a78d in _0x104dd5)return delete _0x104dd5[_0x25a78d],!![];return![];}function parseKeyPath(_0x4c8bf4){const _0x429f3a=_0x2efe12,_0x2c4b5a={'TJnRy':function(_0x151cf4,_0x5a41df){return _0x151cf4===_0x5a41df;},'nCuSr':'header','ujmpu':'headers','jupKg':_0x429f3a(0xc2)},_0x2ae4c7=_0x4c8bf4['split']('.');return _0x2c4b5a['TJnRy'](_0x2ae4c7[0x0],_0x2c4b5a[_0x429f3a(0x13a)])&&(_0x2ae4c7[0x0]=_0x2c4b5a[_0x429f3a(0x140)]),_0x2ae4c7[0x0]===_0x429f3a(0x12d)&&(_0x2ae4c7[0x0]=_0x2c4b5a['jupKg']),_0x2ae4c7;}export function formatSettings(_0x30287f,_0x1b3ed7=0x0){const _0x5334ef=_0x2efe12,_0x2a538b={'XvwMk':function(_0xb1f33f,_0x4aced6){return _0xb1f33f===_0x4aced6;},'mOeNq':'object'},_0x1ac219=[],_0x1ff680='\x20\x20'['repeat'](_0x1b3ed7);for(const [_0x3318b1,_0x4e2aad]of Object[_0x5334ef(0x108)](_0x30287f)){if(_0x2a538b[_0x5334ef(0xf4)](_0x4e2aad,undefined))continue;if(typeof _0x4e2aad===_0x2a538b['mOeNq']&&_0x4e2aad!==null){_0x1ac219['push'](''+_0x1ff680+_0x3318b1+':');for(const [_0x301574,_0x471abd]of Object[_0x5334ef(0x108)](_0x4e2aad)){_0x1ac219['push'](_0x1ff680+'\x20\x20'+_0x301574+':\x20'+_0x471abd);}}else _0x1ac219[_0x5334ef(0x128)](''+_0x1ff680+_0x3318b1+':\x20'+_0x4e2aad);}return _0x1ac219['join']('\x0a');}
|
|
1
|
+
const _0x15f260=_0x3ada;function _0x3ada(_0xab9e77,_0x3ca373){_0xab9e77=_0xab9e77-0x9a;const _0x32b9bf=_0x32b9();let _0x3ada54=_0x32b9bf[_0xab9e77];return _0x3ada54;}(function(_0x842524,_0x3e4c02){const _0x7fc825=_0x3ada,_0xa12c93=_0x842524();while(!![]){try{const _0x4401ae=parseInt(_0x7fc825(0xef))/0x1*(parseInt(_0x7fc825(0xda))/0x2)+parseInt(_0x7fc825(0xe4))/0x3*(parseInt(_0x7fc825(0xfb))/0x4)+-parseInt(_0x7fc825(0xa3))/0x5*(parseInt(_0x7fc825(0xc0))/0x6)+-parseInt(_0x7fc825(0x10f))/0x7*(parseInt(_0x7fc825(0xd0))/0x8)+parseInt(_0x7fc825(0xf4))/0x9+parseInt(_0x7fc825(0xff))/0xa*(parseInt(_0x7fc825(0x100))/0xb)+parseInt(_0x7fc825(0x105))/0xc*(parseInt(_0x7fc825(0x10a))/0xd);if(_0x4401ae===_0x3e4c02)break;else _0xa12c93['push'](_0xa12c93['shift']());}catch(_0x49a009){_0xa12c93['push'](_0xa12c93['shift']());}}}(_0x32b9,0xa4885));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(_0x2dd465,_0x562691){const _0x40d3d2=_0x3ada,_0x3ed459={'SElCB':function(_0x300845,_0x4bd680,_0x1f0669,_0x233f51){return _0x300845(_0x4bd680,_0x1f0669,_0x233f51);},'aSFAn':'local','QYpZz':function(_0x3c8569,_0x3d166c,_0x3783e7){return _0x3c8569(_0x3d166c,_0x3783e7);},'yNEss':function(_0x270a16,_0x59ef61){return _0x270a16(_0x59ef61);},'xCIjZ':function(_0x21b8e6,_0x3234eb){return _0x21b8e6!==_0x3234eb;}},_0x565000=join(_0x562691,'ci',_0x2dd465),_0x28c81b=_0x3ed459['SElCB'](join,_0x562691,_0x3ed459[_0x40d3d2(0xc3)],_0x2dd465),_0x37a752=join(_0x562691,_0x2dd465),_0x9ef643=_0x3ed459['QYpZz'](join,_0x562691,_0x40d3d2(0x115)),_0x3ff1e1=_0x3ed459[_0x40d3d2(0xb6)](join,_0x562691,'ci');if(_0x3ed459[_0x40d3d2(0x9a)](existsSync,_0x565000))return _0x565000;if(existsSync(_0x28c81b))return _0x28c81b;if(existsSync(_0x37a752)&&(_0x37a752!==_0x9ef643&&_0x3ed459[_0x40d3d2(0xb0)](_0x37a752,_0x3ff1e1)?!![]:_0x3ed459['yNEss'](hasLegacyProfileFiles,_0x37a752)))return _0x37a752;return null;}export function getEnvDir(_0xfa0557,_0x51d698={}){const _0x4cfeb4=_0x3ada,_0x2a2760={'QlmYa':function(_0x3af6bc,_0x344d19,_0x10cea0){return _0x3af6bc(_0x344d19,_0x10cea0);},'YKXLj':function(_0x8d914c,_0xbceb51){return _0x8d914c!==_0xbceb51;},'Jxzzx':function(_0x1350fc,_0x29fe94){return _0x1350fc(_0x29fe94);},'IuerW':'local'},_0x12d739=getRangerDir(),_0x3f733a=findEnvInRoot(_0xfa0557,_0x12d739);if(_0x3f733a){if(_0x51d698[_0x4cfeb4(0x106)]&&isLegacyEnvPath(_0x3f733a))throw _0x2a2760[_0x4cfeb4(0xf5)](legacyWriteError,_0xfa0557,_0x3f733a);return _0x3f733a;}const _0xec26c=getRangerHomeDir();if(_0x2a2760[_0x4cfeb4(0x9b)](_0xec26c,_0x12d739)){const _0x4d57f3=findEnvInRoot(_0xfa0557,_0xec26c);if(_0x4d57f3){if(_0x51d698[_0x4cfeb4(0x106)]&&_0x2a2760['Jxzzx'](isLegacyEnvPath,_0x4d57f3))throw legacyWriteError(_0xfa0557,_0x4d57f3);return _0x4d57f3;}}const _0x287437=join(_0xec26c,_0x2a2760[_0x4cfeb4(0x101)],_0xfa0557);if(_0x51d698['forWrite'])throw _0x2a2760[_0x4cfeb4(0xf5)](legacyWriteError,_0xfa0557,_0x287437);return _0x287437;}function isLegacyEnvPath(_0x307349){const _0x3eb917={'UrkjZ':function(_0x63f303,_0x289077){return _0x63f303===_0x289077;}},_0x13f242=getRangerDir(),_0x1c9293=getRangerHomeDir();for(const _0x40a288 of new Set([_0x13f242,_0x1c9293])){const _0x33dc11=_0x40a288['endsWith']('/')?_0x40a288:_0x40a288+'/';if(_0x3eb917['UrkjZ'](_0x307349,_0x40a288)||_0x307349['startsWith'](_0x33dc11))return!![];}return![];}function legacyWriteError(_0x2a2dd5,_0xc34c82){const _0x7809d=_0x3ada;return new Error('Refusing\x20to\x20write\x20profile\x20\x22'+_0x2a2dd5+_0x7809d(0xb4)+_0xc34c82+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x7809d(0xd4)+_0x7809d(0xb9));}export function findExistingEnv(_0x3efdf5,_0x4bc5b2){const _0x38f56a=_0x3ada,_0x3c8172={'TlEnH':function(_0x242d52){return _0x242d52();},'FjTFU':_0x38f56a(0x115),'izqsl':_0x38f56a(0xd1),'rAVof':function(_0x2a3bf1,_0x2aad38,_0x2ad097){return _0x2a3bf1(_0x2aad38,_0x2ad097);},'TYHRd':function(_0x1027aa,_0x17f184,_0x15f950,_0x3c1986){return _0x1027aa(_0x17f184,_0x15f950,_0x3c1986);},'GYebm':function(_0xebeb3d,_0x186bd9,_0x3c4f48,_0x4a06a7){return _0xebeb3d(_0x186bd9,_0x3c4f48,_0x4a06a7);},'nwflN':function(_0x1bc8b5,_0x4b8dd9,_0x14d8ad){return _0x1bc8b5(_0x4b8dd9,_0x14d8ad);},'BiDPq':function(_0x556843,_0x31cb1b){return _0x556843(_0x31cb1b);},'UBCIm':function(_0xce1739,_0x5010cc){return _0xce1739===_0x5010cc;},'COmoA':function(_0x147db2,_0x21bcb7){return _0x147db2(_0x21bcb7);}},_0xfb9b9=_0x4bc5b2?.['rangerDir'],_0x5af905=_0xfb9b9?[_0xfb9b9]:[_0x3c8172['TlEnH'](getRangerDir),getRangerHomeDir()][_0x38f56a(0xb2)]((_0x5126fa,_0x45b932,_0x5f4115)=>_0x5f4115[_0x38f56a(0x120)](_0x5126fa)===_0x45b932),_0x1d3a83=_0x4bc5b2?.[_0x38f56a(0xa5)]??['ci',_0x3c8172['FjTFU'],_0x3c8172['izqsl']];for(const _0x56e9b3 of _0x5af905){const _0x9a0a12=_0x3c8172['rAVof'](join,_0x56e9b3,_0x38f56a(0x115)),_0x5727c5=join(_0x56e9b3,'ci'),_0x491dc8=[{'location':'ci','path':_0x3c8172[_0x38f56a(0x9f)](join,_0x56e9b3,'ci',_0x3efdf5)},{'location':_0x38f56a(0x115),'path':_0x3c8172[_0x38f56a(0xdc)](join,_0x56e9b3,_0x3c8172[_0x38f56a(0xdb)],_0x3efdf5)},{'location':_0x3c8172[_0x38f56a(0xc7)],'path':_0x3c8172['nwflN'](join,_0x56e9b3,_0x3efdf5)}];for(const _0x394cb7 of _0x491dc8){if(_0x1d3a83['includes'](_0x394cb7[_0x38f56a(0x11a)])&&_0x3c8172['BiDPq'](existsSync,_0x394cb7['path'])){if(_0x394cb7[_0x38f56a(0x11a)]==='legacy'&&(_0x3c8172['UBCIm'](_0x394cb7['path'],_0x9a0a12)||_0x394cb7[_0x38f56a(0x11f)]===_0x5727c5)&&!_0x3c8172['COmoA'](hasLegacyProfileFiles,_0x394cb7['path']))continue;return{'path':_0x394cb7['path'],'location':_0x394cb7[_0x38f56a(0x11a)]};}}}return null;}function hasLegacyProfileFiles(_0x115503){const _0x53a7c1=_0x3ada,_0x1f475c={'yyrvC':_0x53a7c1(0xec),'Idlxw':function(_0x1672c5,_0x4bdece){return _0x1672c5(_0x4bdece);},'zUpwY':function(_0x49a22c,_0x5cf213,_0x1ba0e2){return _0x49a22c(_0x5cf213,_0x1ba0e2);},'AHdjI':_0x53a7c1(0xbf)};return existsSync(join(_0x115503,_0x1f475c[_0x53a7c1(0xa0)]))||_0x1f475c[_0x53a7c1(0xc1)](existsSync,_0x1f475c[_0x53a7c1(0x102)](join,_0x115503,'auth.json'))||_0x1f475c['Idlxw'](existsSync,_0x1f475c[_0x53a7c1(0x102)](join,_0x115503,_0x1f475c['AHdjI']));}export function isEnvCi(_0x48d00e){const _0xaa690=_0x3ada,_0x539a33={'jmxQy':function(_0x327454){return _0x327454();},'AJIEe':function(_0x79bae0,_0x4eecac){return _0x79bae0!==_0x4eecac;},'pvbKT':function(_0x327d76,_0x5f2ae2,_0x11f35d,_0x124595){return _0x327d76(_0x5f2ae2,_0x11f35d,_0x124595);}};if(existsSync(join(getRangerDir(),'ci',_0x48d00e)))return!![];const _0x3e9fa3=_0x539a33[_0xaa690(0xbd)](getRangerHomeDir);if(_0x539a33[_0xaa690(0xfa)](_0x3e9fa3,getRangerDir())&&existsSync(_0x539a33[_0xaa690(0xe0)](join,_0x3e9fa3,'ci',_0x48d00e)))return!![];return![];}export async function cleanupTempFiles(_0x59da98){const _0x47db1e=_0x3ada,_0x2eaea4=[_0x59da98[_0x47db1e(0xde)],_0x59da98[_0x47db1e(0x114)]]['filter'](Boolean);await Promise['all'](_0x2eaea4[_0x47db1e(0xbe)](_0x1b4bf9=>unlink(_0x1b4bf9)[_0x47db1e(0xa7)](_0x53439e=>{const _0x31071c=_0x47db1e;_0x53439e['code']!==_0x31071c(0xfe)&&console[_0x31071c(0x107)](_0x31071c(0xae)+_0x1b4bf9+':',_0x53439e[_0x31071c(0xe6)]);})));}export function getSettingsPath(_0x4a2dfb){const _0x491b5b={'SiHlv':function(_0x46d626,_0x2a7836,_0x3f799b){return _0x46d626(_0x2a7836,_0x3f799b);}};return _0x491b5b['SiHlv'](join,getEnvDir(_0x4a2dfb),'settings.json');}export async function loadSettings(_0x477a98){const _0x171edf=_0x3ada,_0x188271={'vGLwQ':function(_0x43489a,_0x418767,_0x54d0f0){return _0x43489a(_0x418767,_0x54d0f0);},'VyDDB':_0x171edf(0x110)},_0x5913d1=getSettingsPath(_0x477a98);if(!existsSync(_0x5913d1))return{};try{const _0x2f497a=await _0x188271['vGLwQ'](readFile,_0x5913d1,_0x188271['VyDDB']);return JSON[_0x171edf(0xaa)](_0x2f497a);}catch{return{};}}export async function saveSettings(_0x19b080,_0xfdea5f){const _0x2822e9={'hLqSs':function(_0x53bfc6,_0x378fd8){return _0x53bfc6(_0x378fd8);}},_0x4c323b=getSettingsPath(_0x19b080),_0x1669f6=_0x2822e9['hLqSs'](dirname,_0x4c323b);!existsSync(_0x1669f6)&&await mkdir(_0x1669f6,{'recursive':!![]}),await writeFile(_0x4c323b,JSON['stringify'](_0xfdea5f,null,0x2));}export function resolveEnvVars(_0x39bd75){const _0x108ac7=_0x3ada,_0x5415f4={'WRexU':function(_0x4256af,_0x555153){return _0x4256af===_0x555153;},'aXjeR':'string','ufArO':function(_0x9c71f6,_0x5e9232){return _0x9c71f6===_0x5e9232;},'Pkodf':_0x108ac7(0xd6)};if(typeof _0x39bd75===_0x5415f4['aXjeR'])return _0x39bd75['replace'](/\$\{(\w+)\}/g,(_0x28d8fc,_0x4e8e5d)=>{const _0x3b303f=_0x108ac7,_0x17e6b8=process[_0x3b303f(0xbc)][_0x4e8e5d];if(_0x5415f4['WRexU'](_0x17e6b8,undefined))throw new Error('Environment\x20variable\x20'+_0x4e8e5d+_0x3b303f(0xbb));return _0x17e6b8;});if(Array[_0x108ac7(0xed)](_0x39bd75))return _0x39bd75['map'](resolveEnvVars);if(_0x39bd75&&_0x5415f4['ufArO'](typeof _0x39bd75,_0x5415f4['Pkodf']))return Object[_0x108ac7(0x10e)](Object['entries'](_0x39bd75)[_0x108ac7(0xbe)](([_0x1d26f3,_0x1b5e03])=>[_0x1d26f3,resolveEnvVars(_0x1b5e03)]));return _0x39bd75;}const isRecord=_0x391d76=>typeof _0x391d76===_0x15f260(0xd6)&&_0x391d76!==null&&!Array['isArray'](_0x391d76),asRecord=_0x4fcbb1=>isRecord(_0x4fcbb1)?_0x4fcbb1:undefined,mergeHeaders=(_0x1c584a,_0x4813fa)=>{const _0x3bf64f={'IwAkb':function(_0x56c394,_0x423f84){return _0x56c394??_0x423f84;}},_0x5948ab={..._0x1c584a??{},..._0x3bf64f['IwAkb'](_0x4813fa,{})};return Object['keys'](_0x5948ab)['length']?_0x5948ab:undefined;},SAFE_MODE_ARGS=[_0x15f260(0xba)],ALLOW_LOCALHOST_ARGS=[_0x15f260(0xad),'--allow-running-insecure-content',_0x15f260(0xac),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x33d036,_0x3aa443={}){const _0x2115c9=_0x15f260,_0xec4192={'YjXKd':'boolean','bSFdp':function(_0x46164d,_0x2dcaad){return _0x46164d(_0x2dcaad);},'oRBpg':function(_0x4be156,_0x55f080){return _0x4be156===_0x55f080;},'IwFai':'string','LxIMh':function(_0xf75f5d,_0x4d89f1){return _0xf75f5d(_0x4d89f1);}},_0x1b99f6=asRecord(_0x33d036['browser']),_0x1778f9={...asRecord(_0x1b99f6?.['launchOptions'])??{}};typeof _0x3aa443[_0x2115c9(0xe2)]===_0xec4192[_0x2115c9(0xcb)]&&(_0x1778f9['headless']=_0x3aa443['headless']);if(_0x33d036[_0x2115c9(0x9e)]){const _0x5444ca=_0x1778f9[_0x2115c9(0xe1)]??[],_0x2dbcf2=SAFE_MODE_ARGS[_0x2115c9(0xb2)](_0x3d1840=>!_0x5444ca['includes'](_0x3d1840));_0x1778f9['args']=[..._0x5444ca,..._0x2dbcf2];}if(_0x33d036[_0x2115c9(0x108)]){const _0x30e79e=_0x1778f9[_0x2115c9(0xe1)]??[],_0x429c3a=ALLOW_LOCALHOST_ARGS['filter'](_0x5b74d0=>!_0x30e79e[_0x2115c9(0x112)](_0x5b74d0));_0x1778f9['args']=[..._0x30e79e,..._0x429c3a];}const _0x47209b={..._0xec4192[_0x2115c9(0x121)](asRecord,_0x1b99f6?.[_0x2115c9(0x11b)])??{}};_0x47209b['ignoreHTTPSErrors']=!![];_0xec4192['oRBpg'](typeof _0x33d036['userAgent'],_0xec4192['IwFai'])&&(_0x47209b['userAgent']=_0x33d036['userAgent']);const _0x4bcea5=mergeHeaders(_0xec4192[_0x2115c9(0xa2)](asRecord,_0x47209b[_0x2115c9(0xa1)]),_0xec4192[_0x2115c9(0xa2)](asRecord,_0x33d036[_0x2115c9(0x118)]));return _0x4bcea5?_0x47209b[_0x2115c9(0xa1)]=_0x4bcea5:delete _0x47209b['extraHTTPHeaders'],_0x3aa443['storageStatePath']&&(_0x47209b[_0x2115c9(0xf9)]=_0x3aa443['storageStatePath']),{'launchOptions':_0x1778f9,'contextOptions':_0x47209b};}export async function resolveProfileStorageState(_0x57ff7f){const _0x428429={'CCwzb':function(_0x17ed7c,_0x38d78f){return _0x17ed7c(_0x38d78f);}};return _0x428429['CCwzb'](resolveLocalAuthPath,getEnvDir(_0x57ff7f));}async function resolveLocalAuthPath(_0xd7ad19){const _0x5b1f94=_0x15f260,_0x55f947={'MrjVB':function(_0x28269f,_0x592284){return _0x28269f(_0x592284);},'fBKaa':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','nGMtp':function(_0xb19d1b,_0xdf6fea){return _0xb19d1b(_0xdf6fea);},'QySSe':function(_0x4f2c41,_0x267e21,_0x376433){return _0x4f2c41(_0x267e21,_0x376433);},'evgsc':function(_0x12f9d2){return _0x12f9d2();},'ExLJL':function(_0x357922,_0x14d3d6,_0x260c3c){return _0x357922(_0x14d3d6,_0x260c3c);},'NSyuX':function(_0x33a6cd,_0x4ede46){return _0x33a6cd(_0x4ede46);}},_0x2a4aac=join(_0xd7ad19,'auth.json.enc'),_0x1f661f=join(_0xd7ad19,_0x5b1f94(0x116));if(_0x55f947['MrjVB'](existsSync,_0x2a4aac))try{const _0x1fd6b5=await getToken();if(!_0x1fd6b5)throw new Error(_0x55f947[_0x5b1f94(0xe5)]);const _0x167c92=await _0x55f947[_0x5b1f94(0x109)](readFile,_0x2a4aac),_0x4a6965=_0x55f947['QySSe'](decrypt,_0x167c92,_0x1fd6b5),_0x1f5252=join(_0x55f947['evgsc'](tmpdir),'ranger-auth-'+Date['now']()+'.json');return await _0x55f947['ExLJL'](writeFile,_0x1f5252,_0x4a6965),{'storageStatePath':_0x1f5252,'tempAuthPath':_0x1f5252};}catch(_0x1f4fc0){const _0x3acdb5=_0x1f4fc0 instanceof Error?_0x1f4fc0[_0x5b1f94(0xe6)]:_0x55f947[_0x5b1f94(0xb3)](String,_0x1f4fc0);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x3acdb5);}if(existsSync(_0x1f661f))return{'storageStatePath':_0x1f661f};return{};}export async function buildPlaywrightConfig(_0x37d65a,_0xe8239a,_0x2c211f,_0x34a5d,_0x3732d0){const _0x18a8e7=_0x15f260,_0x3890f5={'WhcZu':function(_0x1d46b7,_0x5cbf77){return _0x1d46b7(_0x5cbf77);},'wBnnD':function(_0x3eb67d,_0x59bb9a){return _0x3eb67d(_0x59bb9a);}};if(_0x3732d0)return buildPlaywrightConfigCore(_0x37d65a,_0x3732d0,_0xe8239a,_0x2c211f,_0x34a5d,'stagehand');const {storageStatePath:_0x53afac,tempAuthPath:_0x1eb5c8}=await _0x3890f5[_0x18a8e7(0x104)](resolveLocalAuthPath,_0x3890f5[_0x18a8e7(0x104)](getEnvDir,_0xe8239a));try{const _0x14a1af=await buildPlaywrightConfigCore(_0x37d65a,_0x53afac,_0xe8239a,_0x2c211f,_0x34a5d,'stagehand');return{..._0x14a1af,'tempAuthPath':_0x1eb5c8};}catch(_0x533831){_0x1eb5c8&&await _0x3890f5['wBnnD'](unlink,_0x1eb5c8)['catch'](()=>{});throw _0x533831;}}export async function buildPlaywrightConfigCore(_0x4c696d,_0x244029,_0x45974c,_0x7eb250,_0x5e2cca,_0x4ed826='stagehand'){const _0x68aad8=_0x15f260,_0x108825={'OwtAW':function(_0x351d56,_0x1c3490,_0x3a6474){return _0x351d56(_0x1c3490,_0x3a6474);},'cwKgK':'--no-sandbox','aJGae':'--disable-setuid-sandbox','ZHPpQ':function(_0x31e8b7){return _0x31e8b7();},'ZdCzT':'sessions','rqEgt':_0x68aad8(0xeb),'hXPSB':function(_0xdf7581,_0x4c7358){return _0xdf7581===_0x4c7358;},'POqcN':'file','Wywsc':'none','jFUXj':_0x68aad8(0x117),'CrGvE':'vision','swceB':function(_0x93ffa3,_0x8423a1){return _0x93ffa3===_0x8423a1;},'bPGQy':function(_0x4fdc5f,_0x3fb278,_0x332b32){return _0x4fdc5f(_0x3fb278,_0x332b32);},'BSeQg':_0x68aad8(0xa8),'Himbc':_0x68aad8(0x103),'diVTg':function(_0x1ff0d7,_0x23ca09,_0x33b044){return _0x1ff0d7(_0x23ca09,_0x33b044);}},_0x5976bf=_0x7eb250||randomUUID(),_0x44a3f4=join(_0x108825['ZHPpQ'](getRangerDir),_0x108825['ZdCzT'],_0x5976bf),_0x289f34=Boolean(_0x4c696d[_0x68aad8(0xca)]),_0x52662e=_0x289f34?{'browserName':_0x108825[_0x68aad8(0xf6)],'cdpEndpoint':_0x4c696d[_0x68aad8(0xca)]}:((()=>{const _0x28bef2=_0x68aad8,{launchOptions:_0x1b5558,contextOptions:_0x4ac17b}=_0x108825[_0x28bef2(0xc6)](buildBrowserOptionsFromSettings,_0x4c696d,{'headless':_0x5e2cca?![]:_0x4c696d[_0x28bef2(0xe2)]??!![],'storageStatePath':_0x244029});if(process[_0x28bef2(0xfd)]?.()===0x0){const _0x412863=[_0x108825[_0x28bef2(0xe7)],_0x108825['aJGae']],_0x1099c6=_0x1b5558['args']??[],_0xe81781=_0x412863[_0x28bef2(0xb2)](_0x3610ca=>!_0x1099c6[_0x28bef2(0x112)](_0x3610ca));_0x1b5558['args']=[..._0x1099c6,..._0xe81781];}return{'isolated':!![],'browserName':_0x28bef2(0xeb),'launchOptions':_0x1b5558,'contextOptions':{..._0x4ac17b,'permissions':['clipboard-read','clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x334aec=_0x108825[_0x68aad8(0xf3)](_0x4ed826,'playwright-cli')?{'browser':_0x52662e,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x44a3f4,'outputMode':_0x108825[_0x68aad8(0xf1)],'codegen':_0x108825[_0x68aad8(0xab)]}:{'name':_0x45974c,'browser':_0x52662e,'capabilities':[_0x68aad8(0xce),_0x108825[_0x68aad8(0xd7)],'install','pdf',_0x108825['CrGvE']],'imageResponses':_0x68aad8(0xc5),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x44a3f4};if(!_0x289f34){const _0x43ca2b=_0x334aec['browser'],_0x4f90e1=_0x43ca2b[_0x68aad8(0x11b)];if(_0x4f90e1['userAgent']===undefined)delete _0x4f90e1['userAgent'];if(_0x108825[_0x68aad8(0xc4)](_0x4f90e1['storageState'],undefined))delete _0x4f90e1[_0x68aad8(0xf9)];}const _0x190ed5=_0x108825['bPGQy'](join,tmpdir(),_0x108825['BSeQg']);!existsSync(_0x190ed5)&&await _0x108825['OwtAW'](mkdir,_0x190ed5,{'recursive':!![]});const _0xa65aca=_0x4ed826===_0x68aad8(0xd8)?_0x108825['Himbc']:'',_0xabfdb8=_0x108825[_0x68aad8(0xe8)](join,_0x190ed5,_0x45974c+'-'+Date[_0x68aad8(0x119)]()+_0xa65aca+_0x68aad8(0x10d));return await _0x108825['diVTg'](writeFile,_0xabfdb8,JSON['stringify'](_0x334aec,null,0x2)),{'configPath':_0xabfdb8,'storageStatePath':_0x244029};}export async function buildPlaywrightCliConfig(_0x4b476c,_0x48d1f3,_0x22abb7,_0x244ea4,_0x30c7e3){const _0x4325be=_0x15f260,_0x5bbebc={'cpvDf':function(_0x1ec364,_0x494e77,_0x4cf2f5,_0x25c5b3,_0x144120,_0x291359,_0x43f34a){return _0x1ec364(_0x494e77,_0x4cf2f5,_0x25c5b3,_0x144120,_0x291359,_0x43f34a);},'GleAt':'playwright-cli','YaoeE':function(_0x881a2d,_0x492b92){return _0x881a2d(_0x492b92);}};if(_0x30c7e3)return _0x5bbebc[_0x4325be(0xf0)](buildPlaywrightConfigCore,_0x4b476c,_0x30c7e3,_0x48d1f3,_0x22abb7,_0x244ea4,_0x5bbebc['GleAt']);const {storageStatePath:_0x33ba49,tempAuthPath:_0x1a66a8}=await resolveLocalAuthPath(getEnvDir(_0x48d1f3));try{const _0x40096f=await buildPlaywrightConfigCore(_0x4b476c,_0x33ba49,_0x48d1f3,_0x22abb7,_0x244ea4,_0x5bbebc[_0x4325be(0xe3)]);return{..._0x40096f,'tempAuthPath':_0x1a66a8};}catch(_0x5c0fc0){_0x1a66a8&&await _0x5bbebc[_0x4325be(0x10b)](unlink,_0x1a66a8)[_0x4325be(0xa7)](()=>{});throw _0x5c0fc0;}}function _0x32b9(){const _0x4b44c0=['tabs','headers','now','location','contextOptions','setupHeaders','ThkWx','zzlhB','path','indexOf','bSFdp','yNEss','YKXLj','MBbXg','Owwpm','safeMode','TYHRd','yyrvC','extraHTTPHeaders','LxIMh','1552060tfyKFu','GKRdq','locations','Dznfk','catch','ranger-config','IkAHk','parse','Wywsc','--unsafely-treat-insecure-origin-as-secure=http://localhost','--disable-web-security','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','string','xCIjZ','stringify','filter','NSyuX','\x22\x20to\x20legacy\x20path\x20','length','QYpZz','baseUrl','DeTwf','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','--disable-features=WebBluetooth','\x20is\x20not\x20set','env','jmxQy','map','auth.json.enc','12JDAORm','Idlxw','entries','aSFAn','swceB','allow','OwtAW','izqsl','clipboard-write','LRxoB','cdpEndpoint','YjXKd','setupHeader','bHDbU','core','--no-sandbox','1032uFJOoC','legacy','wuJtL','aWead','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','zdIhg','object','jFUXj','playwright-cli','YFSWR','367212bjINwh','FjTFU','GYebm','wwPxN','tempAuthPath','push','pvbKT','args','headless','GleAt','102936dMDqQa','fBKaa','message','cwKgK','diVTg','sessions','OqHmA','chromium','settings.json','isArray','edefV','1OEDkER','cpvDf','POqcN','nova-user-data','hXPSB','4900185HtDSRu','QlmYa','rqEgt','--disable-setuid-sandbox','QqyKe','storageState','AJIEe','76PkIbbr','nzNLo','getuid','ENOENT','140090OiyDjx','352ZYTyKM','IuerW','zUpwY','-cli','WhcZu','408XEjWQz','forWrite','warn','allowInsecureLocalhost','nGMtp','14898AKgNTF','YaoeE','mKFpq','.json','fromEntries','31066EaSncL','utf-8','JXJfB','includes','userAgent','configPath','local','auth.json'];_0x32b9=function(){return _0x4b44c0;};return _0x32b9();}export async function buildRangerwrightCliConfig(_0x4d3875,_0x69a311,_0x110e69,_0x9f825d,_0xbe04c6){const _0x4a4263=_0x15f260,_0x58f737={'Owwpm':function(_0x426260,_0x104583,_0x1c026c){return _0x426260(_0x104583,_0x1c026c);},'Dznfk':function(_0x55fc52,_0x5c4239){return _0x55fc52===_0x5c4239;},'hJkAw':'--no-sandbox','rfSiq':'chromium','MBbXg':'clipboard-read','IkAHk':function(_0x5cae94,_0xb7ebf){return _0x5cae94(_0xb7ebf);},'wwPxN':function(_0x8e93be,_0x2b2894,_0x194b13,_0x1285c6){return _0x8e93be(_0x2b2894,_0x194b13,_0x1285c6);},'LRxoB':function(_0x12dc30,_0x24589b){return _0x12dc30(_0x24589b);},'aWead':function(_0x1f7726,_0x3cdd91,_0x4927be){return _0x1f7726(_0x3cdd91,_0x4927be);},'wabYB':'ranger-config','QqyKe':function(_0x3575b1,_0x4de4eb,_0x5c42ea){return _0x3575b1(_0x4de4eb,_0x5c42ea);}},{storageStatePath:_0x5dcb06,tempAuthPath:_0xd07027}=_0xbe04c6?{'storageStatePath':_0xbe04c6,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x58f737[_0x4a4263(0xa9)](getEnvDir,_0x69a311)),_0x499635=_0x110e69||randomUUID(),_0xea8fb6=_0x58f737[_0x4a4263(0xdd)](join,getRangerDir(),_0x4a4263(0xe9),_0x499635),_0x9b08ec=_0x58f737[_0x4a4263(0xc9)](Boolean,_0x4d3875['cdpEndpoint']),_0x447043=_0x9b08ec?{'browserName':'chromium','cdpEndpoint':_0x4d3875['cdpEndpoint']}:((()=>{const _0x560efb=_0x4a4263,{launchOptions:_0x499e39,contextOptions:_0x1bb644}=_0x58f737[_0x560efb(0x9d)](buildBrowserOptionsFromSettings,_0x4d3875,{'headless':_0x9f825d?![]:_0x4d3875[_0x560efb(0xe2)]??!![],'storageStatePath':_0x5dcb06});if(_0x58f737[_0x560efb(0xa6)](process[_0x560efb(0xfd)]?.(),0x0)){const _0x1c0e7e=[_0x58f737['hJkAw'],'--disable-setuid-sandbox'],_0x571d9c=_0x499e39['args']??[],_0xe1da05=_0x1c0e7e[_0x560efb(0xb2)](_0x2e2ab3=>!_0x571d9c['includes'](_0x2e2ab3));_0x499e39['args']=[..._0x571d9c,..._0xe1da05];}return{'browserName':_0x58f737['rfSiq'],'launchOptions':_0x499e39,'contextOptions':{..._0x1bb644,'permissions':[_0x58f737[_0x560efb(0x9c)],_0x560efb(0xc8)],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x9b08ec){const _0x3273cf=_0x447043['contextOptions'];if(_0x3273cf){if(_0x3273cf['userAgent']===undefined)delete _0x3273cf[_0x4a4263(0x113)];if(_0x3273cf['storageState']===undefined)delete _0x3273cf[_0x4a4263(0xf9)];}}const _0xf69e19={'browser':_0x447043,'outputDir':_0xea8fb6,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x14fa67;try{const _0x640c03=_0x58f737[_0x4a4263(0xd3)](join,tmpdir(),_0x58f737['wabYB']);!existsSync(_0x640c03)&&await _0x58f737[_0x4a4263(0xf8)](mkdir,_0x640c03,{'recursive':!![]}),_0x14fa67=_0x58f737['aWead'](join,_0x640c03,_0x69a311+'-'+Date['now']()+'-rangerwright.json'),await _0x58f737['Owwpm'](writeFile,_0x14fa67,JSON[_0x4a4263(0xb1)](_0xf69e19,null,0x2));}catch(_0xff4998){_0xd07027&&await _0x58f737[_0x4a4263(0xa9)](unlink,_0xd07027)[_0x4a4263(0xa7)](()=>{});throw _0xff4998;}return{'configPath':_0x14fa67,'storageStatePath':_0x5dcb06,'tempAuthPath':_0xd07027,'outputDir':_0xea8fb6};}export async function buildNovaActCliConfig(_0x37981d,_0x188c0f,_0x3cd00b,_0x1f2462,_0x457b33){const _0x28a65d=_0x15f260,_0x435085={'gfVjw':function(_0x22589c,_0x3bd250){return _0x22589c(_0x3bd250);},'bHDbU':function(_0x5f4216){return _0x5f4216();},'zdIhg':'sessions','CgXOH':function(_0x3156c9,_0xce1686,_0x52e3b2){return _0x3156c9(_0xce1686,_0x52e3b2);},'DeTwf':'Default','GKRdq':function(_0x57113b,_0x5aff72){return _0x57113b===_0x5aff72;},'zzlhB':_0x28a65d(0xcf),'nzNLo':function(_0x5f5837,_0x8ad5d4){return _0x5f5837(_0x8ad5d4);},'JXJfB':_0x28a65d(0xaf),'mKFpq':function(_0x558156,_0x4fdc17){return _0x558156(_0x4fdc17);}},{storageStatePath:_0x24408e,tempAuthPath:_0x497cfc}=_0x457b33?{'storageStatePath':_0x457b33,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x435085['gfVjw'](getEnvDir,_0x188c0f)),_0x6d09f8=_0x3cd00b||_0x435085[_0x28a65d(0xcd)](randomUUID),_0x38af28=join(_0x435085['bHDbU'](getRangerDir),_0x435085[_0x28a65d(0xd5)],_0x6d09f8),_0x2ef642=_0x435085['CgXOH'](join,_0x38af28,_0x28a65d(0xf2)),_0x11ea07=_0x24408e?join(_0x2ef642,_0x435085[_0x28a65d(0xb8)]):undefined,{launchOptions:_0x20b95e,contextOptions:_0x9a11be}=buildBrowserOptionsFromSettings(_0x37981d,{'headless':_0x1f2462?![]:_0x37981d['headless']??!![],'storageStatePath':_0x24408e});if(_0x435085['GKRdq'](process['getuid']?.(),0x0)){const _0x3304b7=[_0x435085[_0x28a65d(0x11e)],_0x28a65d(0xf7)],_0x447415=_0x20b95e[_0x28a65d(0xe1)]??[],_0x2ec231=_0x3304b7[_0x28a65d(0xb2)](_0x383982=>!_0x447415['includes'](_0x383982));_0x20b95e['args']=[..._0x447415,..._0x2ec231];}const _0x39fcca=typeof _0x20b95e['executablePath']===_0x28a65d(0xaf)?_0x20b95e['executablePath']:_0x24408e?chromium['executablePath']():undefined;return{'storageStatePath':_0x24408e,'tempAuthPath':_0x497cfc,'baseUrl':_0x37981d[_0x28a65d(0xb7)],'headless':_0x435085[_0x28a65d(0xfc)](Boolean,_0x20b95e[_0x28a65d(0xe2)]),'userDataDir':_0x2ef642,'browserProfilePath':_0x11ea07,'executablePath':_0x39fcca,'launchArgs':Array[_0x28a65d(0xed)](_0x20b95e['args'])?_0x20b95e[_0x28a65d(0xe1)][_0x28a65d(0xb2)](_0x2f7671=>typeof _0x2f7671===_0x28a65d(0xaf)):[],'userAgent':_0x435085[_0x28a65d(0xa4)](typeof _0x9a11be[_0x28a65d(0x113)],_0x435085[_0x28a65d(0x111)])?_0x9a11be[_0x28a65d(0x113)]:undefined,'extraHTTPHeaders':_0x9a11be['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0x37981d['allowInsecureLocalhost']),'safeMode':Boolean(_0x37981d[_0x28a65d(0x9e)]),'cdpEndpoint':_0x37981d[_0x28a65d(0xca)],'isCdpMode':_0x435085[_0x28a65d(0x10c)](Boolean,_0x37981d['cdpEndpoint'])};}export function getNestedValue(_0x2034c4,_0x10db18){const _0x32f609={'XzDkX':function(_0x2a3525,_0x2cca08){return _0x2a3525===_0x2cca08;},'BQyiQ':function(_0x1045e4,_0x5a37e9){return _0x1045e4!==_0x5a37e9;}},_0x50c486=parseKeyPath(_0x10db18);let _0x2eb4ef=_0x2034c4;for(const _0x341249 of _0x50c486){if(_0x32f609['XzDkX'](_0x2eb4ef,null)||_0x2eb4ef===undefined||_0x32f609['BQyiQ'](typeof _0x2eb4ef,'object'))return undefined;_0x2eb4ef=_0x2eb4ef[_0x341249];}return _0x2eb4ef;}export function setNestedValue(_0x3ce5eb,_0x4f198b,_0xd3f90b){const _0xde4624=_0x15f260,_0x120d8b={'eGkTu':function(_0x190473,_0x38f8c6){return _0x190473(_0x38f8c6);}},_0x229dac=_0x120d8b['eGkTu'](parseKeyPath,_0x4f198b);let _0x139b52=_0x3ce5eb;for(let _0x48684e=0x0;_0x48684e<_0x229dac[_0xde4624(0xb5)]-0x1;_0x48684e++){const _0x2737dd=_0x229dac[_0x48684e];(!(_0x2737dd in _0x139b52)||typeof _0x139b52[_0x2737dd]!==_0xde4624(0xd6))&&(_0x139b52[_0x2737dd]={}),_0x139b52=_0x139b52[_0x2737dd];}_0x139b52[_0x229dac[_0x229dac[_0xde4624(0xb5)]-0x1]]=_0xd3f90b;}export function deleteNestedValue(_0x292f0c,_0x526b27){const _0x3c26fd=_0x15f260,_0xe79900={'iYBfd':function(_0x455e9a,_0x563cfa){return _0x455e9a===_0x563cfa;},'ThkWx':function(_0x4f787b,_0x328ade){return _0x4f787b===_0x328ade;},'edefV':function(_0x4abf6c,_0x429c34){return _0x4abf6c!==_0x429c34;},'mlxlB':function(_0x249433,_0x4f4d73){return _0x249433 in _0x4f4d73;}},_0x1bbca6=parseKeyPath(_0x526b27);let _0x489bf4=_0x292f0c;for(let _0x9430be=0x0;_0x9430be<_0x1bbca6['length']-0x1;_0x9430be++){if(_0xe79900['iYBfd'](_0x489bf4,null)||_0xe79900[_0x3c26fd(0x11d)](_0x489bf4,undefined)||_0xe79900[_0x3c26fd(0xee)](typeof _0x489bf4,_0x3c26fd(0xd6)))return![];_0x489bf4=_0x489bf4[_0x1bbca6[_0x9430be]];}if(_0x489bf4===null||_0x489bf4===undefined||_0xe79900[_0x3c26fd(0xee)](typeof _0x489bf4,_0x3c26fd(0xd6)))return![];const _0x57a186=_0x1bbca6[_0x1bbca6[_0x3c26fd(0xb5)]-0x1];if(_0xe79900['mlxlB'](_0x57a186,_0x489bf4))return delete _0x489bf4[_0x57a186],!![];return![];}function parseKeyPath(_0x1ce1dd){const _0x3056b7=_0x15f260,_0x58ec79={'YFSWR':function(_0x4913ca,_0x4b96e8){return _0x4913ca===_0x4b96e8;},'OqHmA':_0x3056b7(0x118),'qqlRy':_0x3056b7(0xcc),'wuJtL':_0x3056b7(0x11c)},_0x11f993=_0x1ce1dd['split']('.');return _0x58ec79[_0x3056b7(0xd9)](_0x11f993[0x0],'header')&&(_0x11f993[0x0]=_0x58ec79[_0x3056b7(0xea)]),_0x58ec79[_0x3056b7(0xd9)](_0x11f993[0x0],_0x58ec79['qqlRy'])&&(_0x11f993[0x0]=_0x58ec79[_0x3056b7(0xd2)]),_0x11f993;}export function formatSettings(_0x54a33d,_0x42d1c2=0x0){const _0x576945=_0x15f260,_0x2ba1cf=[],_0x6b0980='\x20\x20'['repeat'](_0x42d1c2);for(const [_0x460ae8,_0x3f6ea8]of Object['entries'](_0x54a33d)){if(_0x3f6ea8===undefined)continue;if(typeof _0x3f6ea8===_0x576945(0xd6)&&_0x3f6ea8!==null){_0x2ba1cf['push'](''+_0x6b0980+_0x460ae8+':');for(const [_0x5eb6cf,_0x425a5f]of Object[_0x576945(0xc2)](_0x3f6ea8)){_0x2ba1cf[_0x576945(0xdf)](_0x6b0980+'\x20\x20'+_0x5eb6cf+':\x20'+_0x425a5f);}}else _0x2ba1cf[_0x576945(0xdf)](''+_0x6b0980+_0x460ae8+':\x20'+_0x3f6ea8);}return _0x2ba1cf['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x143f6b,_0x4fa601){const _0x16e2ea=_0x3997,_0x9ae4a5=_0x143f6b();while(!![]){try{const _0x1046aa=-parseInt(_0x16e2ea(0x115))/0x1*(-parseInt(_0x16e2ea(0x112))/0x2)+parseInt(_0x16e2ea(0x117))/0x3+parseInt(_0x16e2ea(0x111))/0x4+-parseInt(_0x16e2ea(0x119))/0x5+-parseInt(_0x16e2ea(0x118))/0x6+parseInt(_0x16e2ea(0x116))/0x7*(-parseInt(_0x16e2ea(0x110))/0x8)+parseInt(_0x16e2ea(0x114))/0x9;if(_0x1046aa===_0x4fa601)break;else _0x9ae4a5['push'](_0x9ae4a5['shift']());}catch(_0x4f9eb0){_0x9ae4a5['push'](_0x9ae4a5['shift']());}}}(_0x1392,0x36162));import{readFileSync}from'fs';function _0x1392(){const _0x3ddc90=['5851gkqkxI','189539eKrGTl','1146153pGBnJW','2169672TnECpt','1510015XlKkML','8XMhCvs','171560aMmYZJ','70oUbvbx','BzIyA','2542536aDkIZq'];_0x1392=function(){return _0x3ddc90;};return _0x1392();}function _0x3997(_0x1a5fee,_0x1bdbbd){_0x1a5fee=_0x1a5fee-0x110;const _0x139294=_0x1392();let _0x399756=_0x139294[_0x1a5fee];return _0x399756;}import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x156486){const _0x2b269e={'KFzOk':function(_0x344172,_0x38afc3,_0x2237ec){return _0x344172(_0x38afc3,_0x2237ec);}},_0x3b9871=join(__dirname,'..','..','skills'),_0x3a3e45=join(_0x3b9871,_0x156486);try{return _0x2b269e['KFzOk'](readFileSync,_0x3a3e45,'utf-8');}catch{return'';}}export function getRangerSkillContent(){const _0x2bd00f=_0x3997,_0x403d38={'BzIyA':function(_0x3f262b,_0xc0bd3c){return _0x3f262b(_0xc0bd3c);}};return _0x403d38[_0x2bd00f(0x113)](readSkillContent,'ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x5e2f5c=_0x4242;function _0x4242(_0x5ca055,_0x40c51a){_0x5ca055=_0x5ca055-0x186;const _0x4d72eb=_0x4d72();let _0x424287=_0x4d72eb[_0x5ca055];return _0x424287;}(function(_0x38c7c3,_0x2114a9){const _0x58dee3=_0x4242,_0x368d6b=_0x38c7c3();while(!![]){try{const _0x4d6cf8=-parseInt(_0x58dee3(0x19b))/0x1*(parseInt(_0x58dee3(0x191))/0x2)+-parseInt(_0x58dee3(0x1a3))/0x3+parseInt(_0x58dee3(0x19a))/0x4*(parseInt(_0x58dee3(0x1a4))/0x5)+-parseInt(_0x58dee3(0x187))/0x6*(-parseInt(_0x58dee3(0x1a0))/0x7)+-parseInt(_0x58dee3(0x19c))/0x8*(parseInt(_0x58dee3(0x188))/0x9)+-parseInt(_0x58dee3(0x1a8))/0xa+parseInt(_0x58dee3(0x1a6))/0xb;if(_0x4d6cf8===_0x2114a9)break;else _0x368d6b['push'](_0x368d6b['shift']());}catch(_0x2bca57){_0x368d6b['push'](_0x368d6b['shift']());}}}(_0x4d72,0x37ff5));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';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x5e2f5c(0x18e)];export const DEPRECATED_SKILLS=[_0x5e2f5c(0x190),'bug-bash','feature-tracker'];function _0x4d72(){const _0x4aec8f=['filter','1908mwzgXp','4721BykIXL','1650624cumSlc','IuRIx','kjkAL','warn','82439rBeoAJ','length','VrvHQ','1019850LRBSJO','4145cxayEp','gjOkv','8456382IbJzYp','pzVxw','3211620EAHvPr','opencode','MfVTk','yfFdz','78QRzuiF','18sQJwBu','SKILL.md','Invalid\x20skill\x20frontmatter','skills','XZPWt','push','ranger','JVRfK','e2e-test-recommender','6yLUhFx','utf-8','isDirectory','log','.md','rFftu','match','KZWZT'];_0x4d72=function(){return _0x4aec8f;};return _0x4d72();}export async function installSkill(_0x2fae05,_0x2ddb25={}){const _0x2bcdd9=_0x5e2f5c,_0x1c2e93={'VrvHQ':function(_0x160b17){return _0x160b17();},'kjkAL':function(_0x4d0b83,_0x3f2f8b){return _0x4d0b83(_0x3f2f8b);},'yOWAu':function(_0x328651,_0x2948ac){return _0x328651&&_0x2948ac;},'IuRIx':function(_0x421c72,_0x434e8e){return _0x421c72===_0x434e8e;},'CsOjW':function(_0x50986a,_0x21662e,_0x3ef56d){return _0x50986a(_0x21662e,_0x3ef56d);},'pzVxw':function(_0x44c8f4,_0xead9be,_0x365f69){return _0x44c8f4(_0xead9be,_0x365f69);},'XZPWt':_0x2bcdd9(0x189),'yfFdz':'utf-8','rFftu':function(_0x309525,_0x4cbbef,_0x372478){return _0x309525(_0x4cbbef,_0x372478);},'KZWZT':function(_0x2d5f02,_0x2aa80b,_0x13e9ba,_0x4d5be4){return _0x2d5f02(_0x2aa80b,_0x13e9ba,_0x4d5be4);},'IYJgR':function(_0x152bb3,_0x547933){return _0x152bb3>_0x547933;}},{level:level='project',cliVersion:_0x2bd3b1,platform:platform='claude'}=_0x2ddb25,_0x275a1b=_0x1c2e93[_0x2bcdd9(0x1a2)](getSourceSkillsDir),_0x19799c=join(_0x275a1b,_0x2fae05),_0x446068=join(_0x275a1b,_0x2fae05+_0x2bcdd9(0x195)),_0x19edaa=_0x1c2e93['kjkAL'](existsSync,_0x19799c)&&_0x1c2e93[_0x2bcdd9(0x19e)](statSync,_0x19799c)[_0x2bcdd9(0x193)]()&&_0x1c2e93['kjkAL'](existsSync,join(_0x19799c,_0x2bcdd9(0x189))),_0x3978a7=_0x1c2e93['kjkAL'](existsSync,_0x446068);if(_0x1c2e93['yOWAu'](!_0x19edaa,!_0x3978a7))return console[_0x2bcdd9(0x19f)]('\x20\x20Skill\x20not\x20found:\x20'+_0x2fae05),![];const _0x36f9f8=_0x1c2e93[_0x2bcdd9(0x19d)](platform,_0x2bcdd9(0x1a9))?getOpencodeSkillsDir(level):getSkillsDir(level),_0x48d711=_0x1c2e93['CsOjW'](join,_0x36f9f8,_0x2fae05);await mkdir(_0x48d711,{'recursive':!![]});let _0x545abf,_0x3c8a9a=[];if(_0x19edaa){const _0x4bd8b4=await readdir(_0x19799c),_0x4abea9=_0x4bd8b4[_0x2bcdd9(0x199)](_0x5b380e=>_0x5b380e['endsWith']('.md'));for(const _0x2d541e of _0x4abea9){const _0x4aecce=_0x1c2e93[_0x2bcdd9(0x1a7)](join,_0x19799c,_0x2d541e),_0x326604=join(_0x48d711,_0x2d541e);await copyFile(_0x4aecce,_0x326604),_0x3c8a9a[_0x2bcdd9(0x18d)](_0x2d541e);}_0x545abf=await readFile(_0x1c2e93['pzVxw'](join,_0x19799c,_0x1c2e93[_0x2bcdd9(0x18c)]),_0x1c2e93[_0x2bcdd9(0x186)]);}else{_0x545abf=await readFile(_0x446068,_0x2bcdd9(0x192));const _0x574098=_0x1c2e93[_0x2bcdd9(0x196)](join,_0x48d711,_0x1c2e93['XZPWt']);await _0x1c2e93[_0x2bcdd9(0x198)](writeFile,_0x574098,_0x545abf,'utf-8'),_0x3c8a9a['push'](_0x1c2e93[_0x2bcdd9(0x18c)]);}const {name:_0x31d426}=parseFrontmatter(_0x545abf);return console['log']('\x20\x20Installed\x20skill:\x20'+_0x31d426),console['log']('\x20\x20Location:\x20'+_0x48d711),_0x1c2e93['IYJgR'](_0x3c8a9a[_0x2bcdd9(0x1a1)],0x1)&&console[_0x2bcdd9(0x194)]('\x20\x20Files:\x20'+_0x3c8a9a['join'](',\x20')),logLocalAgentInstallation(_0x2fae05,{'skillDisplayName':_0x31d426,'installLevel':level},_0x2bd3b1)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0x4a6670=_0x5e2f5c,_0x138642={'gjOkv':_0x4a6670(0x18b),'MfVTk':function(_0x8ca923,_0x283549,_0x34b88b,_0x4b7112,_0x3d4988,_0x360358){return _0x8ca923(_0x283549,_0x34b88b,_0x4b7112,_0x3d4988,_0x360358);}},_0x2ddc62=[join(__dirname,'..','..',_0x138642[_0x4a6670(0x1a5)]),_0x138642[_0x4a6670(0x1aa)](join,__dirname,'..','..','..',_0x138642['gjOkv'])];for(const _0x3d196f of _0x2ddc62){if(existsSync(_0x3d196f))return _0x3d196f;}return _0x2ddc62[0x0];}function parseFrontmatter(_0x25e7cb){const _0x11e722=_0x5e2f5c,_0x6a947={'MefAw':_0x11e722(0x18a)},_0x3105ca=_0x25e7cb['match'](/^---\n([\s\S]+?)\n---/);if(!_0x3105ca)throw new Error(_0x6a947['MefAw']);const _0x1c5fef=_0x3105ca[0x1],_0x32102d=_0x1c5fef[_0x11e722(0x197)](/name:\s*(.+)/),_0x133580=_0x1c5fef[_0x11e722(0x197)](/description:\s*"?(.+?)"?\n/);return{'name':_0x32102d?.[0x1]['trim']()||'','description':_0x133580?.[0x1]['trim']()||''};}export async function removeSkill(_0x30434a,_0x38a9ae){const _0x5a73fc=_0x5e2f5c,_0x50493e={'JVRfK':function(_0x3fc577,_0x390cf9){return _0x3fc577(_0x390cf9);},'ICymu':function(_0x203904,_0x28084f,_0x8f3ed7){return _0x203904(_0x28084f,_0x8f3ed7);}},_0x451cc6=_0x50493e['JVRfK'](getSkillsDir,_0x38a9ae),_0x427652=_0x50493e['ICymu'](join,_0x451cc6,_0x30434a);if(!_0x50493e[_0x5a73fc(0x18f)](existsSync,_0x427652))return![];try{return await rm(_0x427652,{'recursive':!![]}),console['log']('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x30434a),!![];}catch{return console['warn']('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x30434a),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x35ece4=_0x5e2a;function _0x5e2a(_0x27237d,_0x4e6354){_0x27237d=_0x27237d-0xad;const _0x1e3fbe=_0x1e3f();let _0x5e2a61=_0x1e3fbe[_0x27237d];return _0x5e2a61;}(function(_0x4491f1,_0x121143){const _0x44b73f=_0x5e2a,_0x2c2f17=_0x4491f1();while(!![]){try{const _0x580de5=parseInt(_0x44b73f(0xb8))/0x1*(parseInt(_0x44b73f(0xf9))/0x2)+-parseInt(_0x44b73f(0xf7))/0x3*(-parseInt(_0x44b73f(0xb3))/0x4)+-parseInt(_0x44b73f(0xbf))/0x5*(parseInt(_0x44b73f(0xb0))/0x6)+parseInt(_0x44b73f(0xd1))/0x7*(-parseInt(_0x44b73f(0xb1))/0x8)+-parseInt(_0x44b73f(0xda))/0x9+-parseInt(_0x44b73f(0xc1))/0xa+parseInt(_0x44b73f(0xee))/0xb;if(_0x580de5===_0x121143)break;else _0x2c2f17['push'](_0x2c2f17['shift']());}catch(_0x12ed63){_0x2c2f17['push'](_0x2c2f17['shift']());}}}(_0x1e3f,0xec8fd));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x32d6e5,_0x1ea598){const _0x4027d8=_0x5e2a,_0x3216ee={'sxuFE':function(_0x32838e,_0x2b6c2){return _0x32838e>=_0x2b6c2;},'jmEmX':function(_0x3ab47f,_0x591108){return _0x3ab47f<=_0x591108;},'Ezbkf':function(_0x4e0314,_0x528e72){return _0x4e0314<_0x528e72;},'gxEUq':function(_0x29b8b4,_0x51d9a7){return _0x29b8b4+_0x51d9a7;},'mVokk':function(_0x440e9a,_0x31a63c){return _0x440e9a*_0x31a63c;}};if(_0x3216ee[_0x4027d8(0xf1)](_0x1ea598,_0x32d6e5[_0x4027d8(0xc4)]))return[0x0,0x0];const _0x4a2cb1=_0x32d6e5[_0x1ea598];let _0x41beab=0x1,_0x26396c=0x80;while(_0x3216ee['jmEmX'](_0x41beab,0x8)&&!(_0x4a2cb1&_0x26396c)){_0x41beab++,_0x26396c>>=0x1;}if(_0x1ea598+_0x41beab>_0x32d6e5['length'])return[0x0,0x0];let _0x1e18fb=_0x4a2cb1&_0x26396c-0x1;for(let _0x3fd941=0x1;_0x3216ee['Ezbkf'](_0x3fd941,_0x41beab);_0x3fd941++){_0x1e18fb=_0x3216ee['gxEUq'](_0x3216ee[_0x4027d8(0xd0)](_0x1e18fb,0x100),_0x32d6e5[_0x3216ee['gxEUq'](_0x1ea598,_0x3fd941)]);}return[_0x1e18fb,_0x41beab];}function readId(_0x276b57,_0x7b2735){const _0x3f6611=_0x5e2a,_0x152bee={'jCTJI':function(_0x4c72f7,_0x579668){return _0x4c72f7>=_0x579668;},'IIEpJ':function(_0x409976,_0x47c55d){return _0x409976+_0x47c55d;},'fzowY':function(_0x574be8,_0x43143c){return _0x574be8*_0x43143c;}};if(_0x152bee[_0x3f6611(0xe1)](_0x7b2735,_0x276b57['length']))return[0x0,0x0];const _0x15d236=_0x276b57[_0x7b2735];let _0x213008;if(_0x15d236>=0x80)_0x213008=0x1;else{if(_0x15d236>=0x40)_0x213008=0x2;else{if(_0x152bee[_0x3f6611(0xe1)](_0x15d236,0x20))_0x213008=0x3;else{if(_0x15d236>=0x10)_0x213008=0x4;else return[_0x15d236,0x1];}}}if(_0x152bee[_0x3f6611(0xf2)](_0x7b2735,_0x213008)>_0x276b57['length'])return[0x0,0x0];let _0x37b39d=0x0;for(let _0x4cf1a9=0x0;_0x4cf1a9<_0x213008;_0x4cf1a9++){_0x37b39d=_0x152bee['fzowY'](_0x37b39d,0x100)+_0x276b57[_0x152bee['IIEpJ'](_0x7b2735,_0x4cf1a9)];}return[_0x37b39d,_0x213008];}function readUint(_0x575416,_0x5d00b6,_0x648db5){const _0x316d93=_0x5e2a,_0x16e0d8={'WgJHH':function(_0x28684c,_0x4f4bdb){return _0x28684c<_0x4f4bdb;},'esRGO':function(_0xca0b38,_0x13d494){return _0xca0b38+_0x13d494;}};let _0x46c46b=0x0;for(let _0x55f766=0x0;_0x16e0d8['WgJHH'](_0x55f766,_0x648db5);_0x55f766++){_0x46c46b=_0x16e0d8[_0x316d93(0xb6)](_0x46c46b*0x100,_0x575416[_0x5d00b6+_0x55f766]);}return _0x46c46b;}function isUnknownSize(_0x4babcd,_0x51935c){const _0x46b803=_0x5e2a,_0x1244f4={'JFgOb':function(_0x1e396d,_0x474f08){return _0x1e396d===_0x474f08;},'YkcNL':function(_0x511667,_0xc5cb99){return _0x511667-_0xc5cb99;}};return _0x1244f4[_0x46b803(0xdc)](_0x4babcd,_0x1244f4['YkcNL'](Math['pow'](0x2,0x7*_0x51935c),0x1));}function writeVint(_0xf47c45,_0x343258){const _0x3f5730=_0x5e2a,_0x5ebe3b={'jwuPw':function(_0x283a1a,_0x28a88b){return _0x283a1a||_0x28a88b;},'dcfRq':function(_0x151b58,_0x4d1e35){return _0x151b58-_0x4d1e35;},'GpsPk':function(_0x1037b7,_0x193bcd){return _0x1037b7&_0x193bcd;},'zGOcI':function(_0x459ec8,_0x19cc3e){return _0x459ec8/_0x19cc3e;},'PHhVo':function(_0xcae16f,_0x233781){return _0xcae16f<<_0x233781;}};let _0x25ab28=_0x5ebe3b['jwuPw'](_0x343258,0x1);while(_0x5ebe3b[_0x3f5730(0xbb)](Math[_0x3f5730(0xcf)](0x2,0x7*_0x25ab28),0x2)<_0xf47c45)_0x25ab28++;const _0x439436=Buffer[_0x3f5730(0xae)](_0x25ab28);for(let _0x3859b6=_0x25ab28-0x1;_0x3859b6>=0x0;_0x3859b6--){_0x439436[_0x3859b6]=_0x5ebe3b[_0x3f5730(0xe3)](_0xf47c45,0xff),_0xf47c45=Math[_0x3f5730(0xf0)](_0x5ebe3b[_0x3f5730(0xf4)](_0xf47c45,0x100));}return _0x439436[0x0]|=_0x5ebe3b[_0x3f5730(0xed)](0x1,0x8-_0x25ab28),_0x439436;}function writeUint(_0x3b19de,_0x24db9d){const _0x2fa3ee=_0x5e2a,_0x3e5e0e={'kHZHu':function(_0x3b11a2,_0x5ca6f2){return _0x3b11a2>=_0x5ca6f2;}},_0x290360=Buffer[_0x2fa3ee(0xae)](_0x24db9d);for(let _0x22e65a=_0x24db9d-0x1;_0x3e5e0e[_0x2fa3ee(0xe0)](_0x22e65a,0x0);_0x22e65a--){_0x290360[_0x22e65a]=_0x3b19de&0xff,_0x3b19de=Math[_0x2fa3ee(0xf0)](_0x3b19de/0x100);}return _0x290360;}function _0x1e3f(){const _0x450e6a=['endsWith','exit','FNWpf','pow','mVokk','71561yiQEEm','jNsaB','readInt16BE','eyCkA','HYVFC','clusters','AqVzy','AXruQ','copy','848025xqQFPi','wMwDQ','JFgOb','NYCoV','error','HLQQn','kHZHu','jCTJI','zYPys','GpsPk','mhpyp','AEJUP','concat','bodyAfterTimestamp','WzYEi','Rjlah','YyIoH','kDEys','iDZWD','PHhVo','37689003wzOWGa','Stitched\x20','floor','sxuFE','IIEpJ','oOuGh','zGOcI','\x20files\x20->\x20','blHJS','27OiZEYk','ROcRQ','17694ArdHhz','YkmDQ','alloc','VFXVn','44022SFvPwc','1232pZTPgX','glWyX','300680yfHJJi','wHcrj','fJeDx','esRGO','ysCgk','49ZcACgD','dpBrR','JgPax','dcfRq','indexOf','maxTimestampTicks','paEFb','955mGxisX','from','4974150pJhjPf','xEcMq','uCbbl','length','stitchWebmFiles.ts','ZzImF','header','iljro','slice','HGwEj','ycNdd'];_0x1e3f=function(){return _0x450e6a;};return _0x1e3f();}function writeUnknownSizeVint(_0x5fb606){const _0x9f44ce=_0x5e2a,_0x39cc93={'NYCoV':function(_0x360243,_0x49f790){return _0x360243>>_0x49f790;},'mhpyp':function(_0x100f00,_0x3d3538){return _0x100f00-_0x3d3538;}},_0x3d9f53=Buffer[_0x9f44ce(0xae)](_0x5fb606,0xff);return _0x3d9f53[0x0]=_0x39cc93[_0x9f44ce(0xdd)](0xff,_0x39cc93[_0x9f44ce(0xe4)](_0x5fb606,0x1)),_0x3d9f53;}function uintSize(_0x4e7a58){const _0x56613f=_0x5e2a,_0x3a1ad9={'iljro':function(_0x30ab5f,_0x41214b){return _0x30ab5f>_0x41214b;}};if(_0x4e7a58===0x0)return 0x1;let _0x2c3277=0x0,_0x2ede4f=_0x4e7a58;while(_0x3a1ad9[_0x56613f(0xc8)](_0x2ede4f,0x0)){_0x2c3277++,_0x2ede4f=Math[_0x56613f(0xf0)](_0x2ede4f/0x100);}return _0x2c3277;}function findTimestampScale(_0x58c4c5,_0x348491){const _0x287f76=_0x5e2a,_0x31ddce={'oOuGh':function(_0x17cd7d,_0x4f5480){return _0x17cd7d<_0x4f5480;},'YyIoH':function(_0x1135ad,_0x41083c,_0xcabe75){return _0x1135ad(_0x41083c,_0xcabe75);},'EQEOp':function(_0x171298,_0x4170db){return _0x171298===_0x4170db;},'glWyX':function(_0x10241f,_0x27f8fc){return _0x10241f+_0x27f8fc;},'EmeJS':function(_0x1fd565,_0x37e92b){return _0x1fd565===_0x37e92b;},'FHIIp':function(_0x1720b6,_0x55fd35,_0x14c317,_0x590e72){return _0x1720b6(_0x55fd35,_0x14c317,_0x590e72);},'CeKie':function(_0x5da251,_0x46e2d6){return _0x5da251+_0x46e2d6;},'HYVFC':function(_0x3f129b,_0x3b6ecc){return _0x3f129b+_0x3b6ecc;},'FNWpf':function(_0x351f47,_0x1741ac){return _0x351f47===_0x1741ac;},'vnaVc':function(_0x487b5c,_0x548188,_0x5ca79a){return _0x487b5c(_0x548188,_0x5ca79a);},'deiXR':function(_0x2b7cc3,_0x59f31f){return _0x2b7cc3+_0x59f31f;}};let _0x4eeb3e=_0x348491;const _0x4f48f9=Math['min'](_0x58c4c5[_0x287f76(0xc4)],_0x348491+0x2710);while(_0x31ddce[_0x287f76(0xf3)](_0x4eeb3e,_0x4f48f9)){const [_0x324dbd,_0x5e1526]=readId(_0x58c4c5,_0x4eeb3e),[_0x2903d4,_0x1344eb]=_0x31ddce[_0x287f76(0xea)](readVint,_0x58c4c5,_0x4eeb3e+_0x5e1526);if(_0x31ddce['EQEOp'](_0x324dbd,ID_INFO)){let _0x5eb010=_0x31ddce[_0x287f76(0xb2)](_0x4eeb3e,_0x5e1526)+_0x1344eb;const _0x57eebd=_0x31ddce['glWyX'](_0x5eb010,_0x2903d4);while(_0x5eb010<_0x57eebd){const [_0x4f16d3,_0x2b0c03]=readId(_0x58c4c5,_0x5eb010),[_0x316d8e,_0x48aade]=readVint(_0x58c4c5,_0x5eb010+_0x2b0c03);if(_0x31ddce['EmeJS'](_0x4f16d3,ID_TIMESTAMP_SCALE))return _0x31ddce['FHIIp'](readUint,_0x58c4c5,_0x31ddce['CeKie'](_0x5eb010+_0x2b0c03,_0x48aade),_0x316d8e);_0x5eb010+=_0x31ddce[_0x287f76(0xd5)](_0x2b0c03+_0x48aade,_0x316d8e);}break;}if(_0x31ddce[_0x287f76(0xce)](_0x324dbd,ID_CLUSTER))break;if(_0x31ddce['vnaVc'](isUnknownSize,_0x2903d4,_0x1344eb))break;_0x4eeb3e+=_0x31ddce['deiXR'](_0x31ddce[_0x287f76(0xb2)](_0x5e1526,_0x1344eb),_0x2903d4);}return 0xf4240;}function findFirstClusterOffset(_0x23924b,_0x2a050b){const _0x548eb1=_0x5e2a,_0x452367={'ZzImF':function(_0x9f146,_0x3b2b05,_0x5a01f5){return _0x9f146(_0x3b2b05,_0x5a01f5);}};let _0x5713ae=_0x2a050b;while(_0x5713ae<_0x23924b['length']){const [_0x10dd8f,_0x39bf4e]=_0x452367[_0x548eb1(0xc6)](readId,_0x23924b,_0x5713ae);if(_0x10dd8f===ID_CLUSTER)return _0x5713ae;const [_0xfd1bcd,_0x76e3b8]=readVint(_0x23924b,_0x5713ae+_0x39bf4e);if(isUnknownSize(_0xfd1bcd,_0x76e3b8))return _0x5713ae;_0x5713ae+=_0x39bf4e+_0x76e3b8+_0xfd1bcd;}return _0x23924b['length'];}function findClusterEnd(_0xdc1fee,_0x5ace1b,_0x16c515,_0x211f50){const _0x1245a7=_0x5e2a,_0x33cf4c={'IBAhT':function(_0x511084,_0xa4c8b3){return _0x511084+_0xa4c8b3;},'AEJUP':function(_0x190043,_0x223652){return _0x190043<_0x223652;},'blHJS':function(_0x4e1e95,_0xd950c9,_0x3f9e34){return _0x4e1e95(_0xd950c9,_0x3f9e34);},'vAcOw':function(_0x8a969b,_0x8739ee){return _0x8a969b+_0x8739ee;}};if(!isUnknownSize(_0x16c515,_0x211f50))return _0x33cf4c['IBAhT'](_0x5ace1b,_0x16c515);const _0x3986a5=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x32ceb7=_0x5ace1b;while(_0x33cf4c[_0x1245a7(0xe5)](_0x32ceb7,_0xdc1fee['length']-0x4)){const [_0x164781,_0x46fc4e]=_0x33cf4c[_0x1245a7(0xf6)](readId,_0xdc1fee,_0x32ceb7);if(_0x3986a5['has'](_0x164781))return _0x32ceb7;const [_0x43c04b,_0x136678]=readVint(_0xdc1fee,_0x32ceb7+_0x46fc4e);if(_0x33cf4c[_0x1245a7(0xf6)](isUnknownSize,_0x43c04b,_0x136678))return _0xdc1fee['length'];_0x32ceb7+=_0x33cf4c['vAcOw'](_0x46fc4e,_0x136678)+_0x43c04b;}return _0xdc1fee[_0x1245a7(0xc4)];}function extractClusters(_0x213e49,_0x5ea1d0){const _0x248823=_0x5e2a,_0x5b3fd4={'KewLe':function(_0x583373,_0x4cc547,_0x377a02){return _0x583373(_0x4cc547,_0x377a02);},'bANbU':function(_0x570fd9,_0x3a722f){return _0x570fd9!==_0x3a722f;},'snbex':function(_0x2831c3,_0x146ebe){return _0x2831c3+_0x146ebe;},'ycNdd':function(_0x442885,_0x52121f,_0x5dcae2){return _0x442885(_0x52121f,_0x5dcae2);},'sTmiI':function(_0x28540a,_0xa079ec){return _0x28540a+_0xa079ec;},'iDZWD':function(_0x3d1575,_0x237899,_0x962fd2){return _0x3d1575(_0x237899,_0x962fd2);},'YkmDQ':function(_0x3f6830,_0x3c69aa,_0x221067){return _0x3f6830(_0x3c69aa,_0x221067);},'zYPys':function(_0x4e9f63,_0xe11624){return _0x4e9f63===_0xe11624;},'wxffs':function(_0x201f67,_0x1da981,_0x2f3fed,_0x49b153){return _0x201f67(_0x1da981,_0x2f3fed,_0x49b153);},'uCbbl':function(_0x1e0c06,_0xd68da3){return _0x1e0c06+_0xd68da3;},'saowK':function(_0x4b58a6,_0x4dce61){return _0x4b58a6+_0x4dce61;},'kDEys':function(_0xbbea99,_0x3f640f){return _0xbbea99+_0x3f640f;},'hLxcc':function(_0x5e04a9,_0x2ccf2a){return _0x5e04a9===_0x2ccf2a;},'xUwEx':function(_0x12ba2f,_0x34bca0){return _0x12ba2f+_0x34bca0;},'hhMja':function(_0x4bafbf,_0x49f338){return _0x4bafbf<_0x49f338;},'HGwEj':function(_0x5b263a,_0x3ffffe){return _0x5b263a+_0x3ffffe;},'yHWtV':function(_0x581544,_0x27dc76){return _0x581544+_0x27dc76;}},_0x4efbcc=[],_0x2b3e85=Buffer[_0x248823(0xc0)]([0x1f,0x43,0xb6,0x75]);let _0x4f97fb=0x0;while(_0x4f97fb<_0x213e49['length']){const _0x2c50f0=_0x213e49[_0x248823(0xbc)](_0x2b3e85,_0x4f97fb);if(_0x2c50f0===-0x1)break;const [_0x34ef7d,_0x4e1925]=_0x5b3fd4['KewLe'](readId,_0x213e49,_0x2c50f0);if(_0x5b3fd4['bANbU'](_0x34ef7d,ID_CLUSTER)){_0x4f97fb=_0x5b3fd4['snbex'](_0x2c50f0,0x1);continue;}const [_0x32e0f1,_0x2be729]=_0x5b3fd4['ycNdd'](readVint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2c50f0,_0x4e1925)),_0x2a8f8d=_0x2c50f0+_0x4e1925+_0x2be729,_0x5b6353=findClusterEnd(_0x213e49,_0x2a8f8d,_0x32e0f1,_0x2be729);let _0x2d09eb=_0x2a8f8d,_0x4f919f=0x0,_0x20b600=0x2,_0x13e97c=![],_0x1c3f30=Buffer[_0x248823(0xae)](0x0),_0x561a39=Buffer[_0x248823(0xae)](0x0);while(_0x2d09eb<_0x5b6353){const [_0x3c06c1,_0x231538]=_0x5b3fd4[_0x248823(0xec)](readId,_0x213e49,_0x2d09eb),[_0x2beb94,_0x38f741]=_0x5b3fd4[_0x248823(0xad)](readVint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2d09eb,_0x231538));if(_0x5b3fd4[_0x248823(0xe2)](_0x3c06c1,ID_TIMESTAMP)){_0x4f919f=_0x5b3fd4['wxffs'](readUint,_0x213e49,_0x5b3fd4['sTmiI'](_0x2d09eb,_0x231538)+_0x38f741,_0x2beb94),_0x20b600=_0x2beb94,_0x13e97c=!![],_0x1c3f30=_0x213e49[_0x248823(0xc9)](_0x2a8f8d,_0x2d09eb);const _0x46a249=_0x5b3fd4[_0x248823(0xc3)](_0x5b3fd4['saowK'](_0x5b3fd4[_0x248823(0xeb)](_0x2d09eb,_0x231538),_0x38f741),_0x2beb94);_0x561a39=_0x213e49['slice'](_0x46a249,_0x5b6353);break;}if(_0x5b3fd4['hLxcc'](_0x3c06c1,ID_CLUSTER))break;if(_0x5b3fd4['ycNdd'](isUnknownSize,_0x2beb94,_0x38f741))break;_0x2d09eb+=_0x5b3fd4['xUwEx'](_0x231538+_0x38f741,_0x2beb94);}!_0x13e97c&&(_0x561a39=_0x213e49['slice'](_0x2a8f8d,_0x5b6353));let _0x3ca7d9=_0x4f919f;_0x2d09eb=_0x2a8f8d;while(_0x5b3fd4['hhMja'](_0x2d09eb,_0x5b6353)){const [_0x56f335,_0x334b6e]=_0x5b3fd4[_0x248823(0xcb)](readId,_0x213e49,_0x2d09eb),[_0x58f867,_0x38fd7a]=readVint(_0x213e49,_0x2d09eb+_0x334b6e);if(_0x56f335===ID_SIMPLE_BLOCK&&_0x58f867>=0x4){const _0x38f9fd=_0x2d09eb+_0x334b6e+_0x38fd7a,[,_0x299396]=_0x5b3fd4[_0x248823(0xec)](readVint,_0x213e49,_0x38f9fd),_0x2cffbf=_0x213e49[_0x248823(0xd3)](_0x5b3fd4[_0x248823(0xca)](_0x38f9fd,_0x299396)),_0xab3518=_0x4f919f+_0x2cffbf;if(_0xab3518>_0x3ca7d9)_0x3ca7d9=_0xab3518;}if(_0x56f335===ID_CLUSTER)break;if(_0x5b3fd4['KewLe'](isUnknownSize,_0x58f867,_0x38fd7a))break;_0x2d09eb+=_0x5b3fd4['snbex'](_0x5b3fd4['yHWtV'](_0x334b6e,_0x38fd7a),_0x58f867);}_0x4efbcc['push']({'timestamp':_0x4f919f,'maxTicks':_0x3ca7d9,'bodyBeforeTimestamp':_0x1c3f30,'bodyAfterTimestamp':_0x561a39,'timestampElementSize':_0x20b600}),_0x4f97fb=_0x5b6353;}return _0x4efbcc;}function parseWebm(_0x3398be){const _0x443d11=_0x5e2a,_0x34d99a={'ROcRQ':function(_0x14ea3c,_0x14b32b){return _0x14ea3c+_0x14b32b;},'VALTa':function(_0x124877,_0xba12fe){return _0x124877+_0xba12fe;},'fJeDx':function(_0x6fde2b,_0x4aabd1){return _0x6fde2b+_0x4aabd1;},'exQgA':function(_0x802375,_0x2a331c){return _0x802375+_0x2a331c;},'zBBPt':function(_0x5260c6,_0x5c8554,_0x3551b2){return _0x5260c6(_0x5c8554,_0x3551b2);}};let _0xd71750=0x0;const [,_0x1d5ea8]=readId(_0x3398be,_0xd71750),[_0x2eb264,_0x49921d]=readVint(_0x3398be,_0x34d99a[_0x443d11(0xf8)](_0xd71750,_0x1d5ea8));_0xd71750+=_0x34d99a[_0x443d11(0xf8)](_0x34d99a['VALTa'](_0x1d5ea8,_0x49921d),_0x2eb264);const [_0x585753,_0x6b598e]=readId(_0x3398be,_0xd71750);if(_0x585753!==ID_SEGMENT)return null;const [,_0x53b85c]=readVint(_0x3398be,_0x34d99a['VALTa'](_0xd71750,_0x6b598e)),_0x2bf746=_0x34d99a[_0x443d11(0xb5)](_0x34d99a['exQgA'](_0xd71750,_0x6b598e),_0x53b85c),_0x3aab75=findTimestampScale(_0x3398be,_0x2bf746),_0x5bde37=findFirstClusterOffset(_0x3398be,_0x2bf746),_0x1e332a=_0x3398be['slice'](0x0,_0x5bde37),_0x133bac=_0x34d99a['zBBPt'](extractClusters,_0x3398be,_0x3aab75);let _0x50e40b=0x0;for(const _0x57161a of _0x133bac){if(_0x57161a['maxTicks']>_0x50e40b)_0x50e40b=_0x57161a['maxTicks'];}return{'header':_0x1e332a,'clusters':_0x133bac,'timestampScale':_0x3aab75,'maxTimestampTicks':_0x50e40b};}function buildCluster(_0x629e05,_0x25707b,_0x4aa074){const _0x2e1680=_0x5e2a,_0x71e163={'HLQQn':function(_0x4d7045,_0x2bde4f){return _0x4d7045(_0x2bde4f);},'wMwDQ':function(_0x15e95,_0x2730aa,_0x2bf1c5){return _0x15e95(_0x2730aa,_0x2bf1c5);}},_0x421a77=Buffer[_0x2e1680(0xc0)]([0x1f,0x43,0xb6,0x75]),_0x1b5451=Math['max'](0x4,uintSize(_0x629e05)),_0x590259=Buffer[_0x2e1680(0xe6)]([Buffer['from']([ID_TIMESTAMP]),_0x71e163[_0x2e1680(0xdf)](writeVint,_0x1b5451),_0x71e163[_0x2e1680(0xdb)](writeUint,_0x629e05,_0x1b5451)]),_0x3277e5=Buffer['concat']([_0x25707b,_0x590259,_0x4aa074]),_0xf8f7ff=writeVint(_0x3277e5[_0x2e1680(0xc4)]);return Buffer[_0x2e1680(0xe6)]([_0x421a77,_0xf8f7ff,_0x3277e5]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x4ec526){const _0x5c14d8=_0x5e2a,_0x35a9fb={'AXruQ':function(_0x1b290f,_0x1da736,_0x586c3c){return _0x1b290f(_0x1da736,_0x586c3c);},'wHcrj':function(_0x2dc03a,_0x1c2b87){return _0x2dc03a+_0x1c2b87;},'paEFb':function(_0x3a26a7,_0x1252e9,_0x4e0281){return _0x3a26a7(_0x1252e9,_0x4e0281);},'WzYEi':function(_0x18b8b6,_0x41e610,_0x45359f){return _0x18b8b6(_0x41e610,_0x45359f);},'eyCkA':function(_0x3c4426,_0x5e80d9){return _0x3c4426===_0x5e80d9;},'dpBrR':function(_0x3091f7,_0x1cadfb){return _0x3091f7+_0x1cadfb;},'JgPax':function(_0x1b65e1,_0x48abc6,_0xae566b){return _0x1b65e1(_0x48abc6,_0xae566b);},'ysCgk':function(_0x5731fa,_0x3a9c8a){return _0x5731fa+_0x3a9c8a;}},_0x1f18ce=Buffer[_0x5c14d8(0xc0)](_0x4ec526);let _0x331884=0x0;const [,_0x2d7ee3]=readId(_0x1f18ce,_0x331884),[_0x2d7983,_0x7a90e3]=_0x35a9fb[_0x5c14d8(0xd8)](readVint,_0x1f18ce,_0x35a9fb['wHcrj'](_0x331884,_0x2d7ee3)),_0xf583a=_0x331884+_0x2d7ee3+_0x7a90e3+_0x2d7983,[,_0x340644]=_0x35a9fb[_0x5c14d8(0xd8)](readId,_0x1f18ce,_0xf583a),[,_0x1d74d0]=_0x35a9fb[_0x5c14d8(0xbe)](readVint,_0x1f18ce,_0x35a9fb['wHcrj'](_0xf583a,_0x340644)),_0x264a95=_0xf583a+_0x340644+_0x1d74d0,_0xeeeebe=writeUnknownSizeVint(_0x1d74d0);_0xeeeebe[_0x5c14d8(0xd9)](_0x1f18ce,_0xf583a+_0x340644);let _0x3d0365=_0x264a95;const _0x5e6c05=Math['min'](_0x1f18ce[_0x5c14d8(0xc4)],_0x35a9fb['wHcrj'](_0x264a95,0x2710));while(_0x3d0365<_0x5e6c05){const [_0x180fe5,_0x4830d1]=readId(_0x1f18ce,_0x3d0365),[_0x12001f,_0x91713e]=_0x35a9fb[_0x5c14d8(0xe8)](readVint,_0x1f18ce,_0x35a9fb[_0x5c14d8(0xb4)](_0x3d0365,_0x4830d1));if(_0x180fe5===ID_CLUSTER)break;if(_0x35a9fb['WzYEi'](isUnknownSize,_0x12001f,_0x91713e))break;if(_0x35a9fb[_0x5c14d8(0xd4)](_0x180fe5,ID_INFO)){const _0x111877=_0x35a9fb['dpBrR'](_0x3d0365+_0x4830d1,_0x91713e),_0x936158=_0x35a9fb[_0x5c14d8(0xb4)](_0x111877,_0x12001f),_0x4c3f4f=[];let _0x22eb4b=_0x111877;while(_0x22eb4b<_0x936158){const [_0x5bc2d2,_0x4b5ee9]=_0x35a9fb[_0x5c14d8(0xba)](readId,_0x1f18ce,_0x22eb4b),[_0x34caaa,_0xd42ded]=readVint(_0x1f18ce,_0x35a9fb[_0x5c14d8(0xb9)](_0x22eb4b,_0x4b5ee9)),_0x31413d=_0x35a9fb[_0x5c14d8(0xb7)](_0x4b5ee9+_0xd42ded,_0x34caaa);_0x5bc2d2!==ID_DURATION&&_0x4c3f4f['push'](_0x1f18ce['slice'](_0x22eb4b,_0x35a9fb['wHcrj'](_0x22eb4b,_0x31413d))),_0x22eb4b+=_0x31413d;}const _0x1e0b1a=Buffer['concat'](_0x4c3f4f),_0x4932a0=Buffer[_0x5c14d8(0xe6)]([_0x1f18ce[_0x5c14d8(0xc9)](_0x3d0365,_0x3d0365+_0x4830d1),_0x35a9fb[_0x5c14d8(0xd8)](writeVint,_0x1e0b1a[_0x5c14d8(0xc4)],_0x91713e)]);return Buffer[_0x5c14d8(0xe6)]([_0x1f18ce['slice'](0x0,_0x3d0365),_0x4932a0,_0x1e0b1a,_0x1f18ce['slice'](_0x936158)]);}_0x3d0365+=_0x35a9fb[_0x5c14d8(0xb9)](_0x35a9fb[_0x5c14d8(0xb7)](_0x4830d1,_0x91713e),_0x12001f);}return _0x1f18ce;}export function stitchWebmFiles(_0x325650,_0x32b4c0){const _0x154e40=_0x5e2a,_0x37f1b8={'AqVzy':function(_0xa729df,_0x1233db){return _0xa729df(_0x1233db);},'hxdOc':function(_0x3101f4,_0x3665ed){return _0x3101f4===_0x3665ed;},'Rjlah':function(_0x4171e7,_0x3e2988){return _0x4171e7(_0x3e2988);},'xEcMq':function(_0x4f8a30,_0x3cd8d0){return _0x4f8a30<_0x3cd8d0;},'jNsaB':function(_0x3d88e6,_0xeaf4fd){return _0x3d88e6+_0xeaf4fd;},'VFXVn':function(_0x3fe0cb,_0x482ea2,_0x1a7287,_0x4d2930){return _0x3fe0cb(_0x482ea2,_0x1a7287,_0x4d2930);},'rvhTq':function(_0x12638a,_0x5145c1){return _0x12638a+_0x5145c1;},'QxDwB':function(_0x1bd6e3,_0x3f508d,_0x478220){return _0x1bd6e3(_0x3f508d,_0x478220);}};if(_0x325650['length']<=0x1)return![];const _0x1b1d22=[];for(const _0x1294a5 of _0x325650){const _0x3defff=_0x37f1b8[_0x154e40(0xd7)](readFileSync,_0x1294a5),_0x361b15=_0x37f1b8[_0x154e40(0xd7)](parseWebm,_0x3defff);if(!_0x361b15||_0x37f1b8['hxdOc'](_0x361b15['clusters'][_0x154e40(0xc4)],0x0))return![];_0x1b1d22['push'](_0x361b15);}const _0x5d00ee=_0x1b1d22[0x0],_0x187660=_0x37f1b8[_0x154e40(0xe9)](rebuildHeaderWithoutDuration,_0x5d00ee[_0x154e40(0xc7)]),_0xe10358=[_0x187660];let _0x44e42d=0x0;for(let _0xd9fa6b=0x0;_0x37f1b8[_0x154e40(0xc2)](_0xd9fa6b,_0x1b1d22['length']);_0xd9fa6b++){const _0x440aae=_0x1b1d22[_0xd9fa6b];for(const _0x28d411 of _0x440aae[_0x154e40(0xd6)]){const _0x143563=_0x37f1b8[_0x154e40(0xd2)](_0x28d411['timestamp'],_0x44e42d);_0xe10358['push'](_0x37f1b8[_0x154e40(0xaf)](buildCluster,_0x143563,_0x28d411['bodyBeforeTimestamp'],_0x28d411[_0x154e40(0xe7)]));}const _0x1f875a=0x1e;_0x44e42d+=_0x37f1b8['rvhTq'](_0x440aae[_0x154e40(0xbd)],_0x1f875a);}return _0x37f1b8['QxDwB'](writeFileSync,_0x32b4c0,Buffer['concat'](_0xe10358)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x35ece4(0xc5))||process['argv'][0x1]?.[_0x35ece4(0xcc)]('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args[_0x35ece4(0xc4)]<0x3&&(console[_0x35ece4(0xde)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x35ece4(0xcd)](0x1));const output=args[args['length']-0x1],inputs=args[_0x35ece4(0xc9)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x35ece4(0xef)+inputs['length']+_0x35ece4(0xf5)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x47972c=_0xcf24;(function(_0x4d2e71,_0x78bb54){const _0x17e716=_0xcf24,_0x1237c5=_0x4d2e71();while(!![]){try{const _0x20d5cd=parseInt(_0x17e716(0x131))/0x1+-parseInt(_0x17e716(0x132))/0x2*(parseInt(_0x17e716(0x157))/0x3)+parseInt(_0x17e716(0x169))/0x4+-parseInt(_0x17e716(0x13c))/0x5*(parseInt(_0x17e716(0x15e))/0x6)+-parseInt(_0x17e716(0x139))/0x7+parseInt(_0x17e716(0x13b))/0x8+parseInt(_0x17e716(0x16f))/0x9;if(_0x20d5cd===_0x78bb54)break;else _0x1237c5['push'](_0x1237c5['shift']());}catch(_0x130721){_0x1237c5['push'](_0x1237c5['shift']());}}}(_0x5626,0x59178));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(_0x3e10e3,_0x1f84e1){const _0x16a819=_0xcf24,_0x41f166={'IMakT':function(_0x176aeb,_0x4d687f){return _0x176aeb>_0x4d687f;},'dnHwr':function(_0x391e53,_0x25bb90){return _0x391e53&_0x25bb90;},'JJJqo':function(_0x1c0d5d,_0x5e4a8f){return _0x1c0d5d-_0x5e4a8f;}};if(_0x1f84e1>=_0x3e10e3[_0x16a819(0x151)])return[0x0,0x0];const _0x14c7b7=_0x3e10e3[_0x1f84e1];let _0x41ac59=0x1,_0x4e41d4=0x80;while(_0x41ac59<=0x8&&!(_0x14c7b7&_0x4e41d4)){_0x41ac59++,_0x4e41d4>>=0x1;}if(_0x41f166['IMakT'](_0x1f84e1+_0x41ac59,_0x3e10e3['length']))return[0x0,0x0];let _0x26c426=_0x41f166['dnHwr'](_0x14c7b7,_0x41f166[_0x16a819(0x16b)](_0x4e41d4,0x1));for(let _0x15be7f=0x1;_0x15be7f<_0x41ac59;_0x15be7f++){_0x26c426=_0x26c426*0x100+_0x3e10e3[_0x1f84e1+_0x15be7f];}return[_0x26c426,_0x41ac59];}function _0xcf24(_0x1bb106,_0xf36d98){_0x1bb106=_0x1bb106-0x12e;const _0x562697=_0x5626();let _0xcf24af=_0x562697[_0x1bb106];return _0xcf24af;}function readId(_0x146312,_0xd369b4){const _0x46e1df=_0xcf24,_0x42cc73={'uMKrC':function(_0x352752,_0xdbc978){return _0x352752>=_0xdbc978;},'laGBN':function(_0x3b862b,_0x1dc203){return _0x3b862b>=_0x1dc203;},'inrDr':function(_0x3e0137,_0x5a541b){return _0x3e0137>_0x5a541b;},'aBvsz':function(_0x2df3c9,_0x2ce5d1){return _0x2df3c9+_0x2ce5d1;},'hORfO':function(_0x34f7d0,_0xaa93ce){return _0x34f7d0*_0xaa93ce;}};if(_0x42cc73['uMKrC'](_0xd369b4,_0x146312[_0x46e1df(0x151)]))return[0x0,0x0];const _0xd0b821=_0x146312[_0xd369b4];let _0x5dac08;if(_0x42cc73['uMKrC'](_0xd0b821,0x80))_0x5dac08=0x1;else{if(_0x42cc73['laGBN'](_0xd0b821,0x40))_0x5dac08=0x2;else{if(_0xd0b821>=0x20)_0x5dac08=0x3;else{if(_0xd0b821>=0x10)_0x5dac08=0x4;else return[_0xd0b821,0x1];}}}if(_0x42cc73[_0x46e1df(0x13a)](_0xd369b4+_0x5dac08,_0x146312['length']))return[0x0,0x0];let _0x373ef5=0x0;for(let _0x5d4594=0x0;_0x5d4594<_0x5dac08;_0x5d4594++){_0x373ef5=_0x42cc73[_0x46e1df(0x145)](_0x42cc73[_0x46e1df(0x130)](_0x373ef5,0x100),_0x146312[_0x42cc73[_0x46e1df(0x145)](_0xd369b4,_0x5d4594)]);}return[_0x373ef5,_0x5dac08];}function readUint(_0x14cd69,_0x1617a5,_0x18ec3d){const _0x24be7d=_0xcf24,_0x50619b={'FgHMu':function(_0x4ea595,_0x1e8547){return _0x4ea595<_0x1e8547;},'ajisD':function(_0x1c0d6a,_0x477630){return _0x1c0d6a+_0x477630;},'Ctcdq':function(_0x218581,_0x35b962){return _0x218581*_0x35b962;}};let _0x35988f=0x0;for(let _0x22f784=0x0;_0x50619b['FgHMu'](_0x22f784,_0x18ec3d);_0x22f784++){_0x35988f=_0x50619b[_0x24be7d(0x150)](_0x50619b['Ctcdq'](_0x35988f,0x100),_0x14cd69[_0x1617a5+_0x22f784]);}return _0x35988f;}function isUnknownSize(_0x322679,_0x26cab4){const _0x2b5559={'sSMUr':function(_0xda4b63,_0x56fbd0){return _0xda4b63*_0x56fbd0;}};return _0x322679===Math['pow'](0x2,_0x2b5559['sSMUr'](0x7,_0x26cab4))-0x1;}function writeVint(_0x3bb94a,_0xc6fa6){const _0x229e75=_0xcf24,_0x56b033={'AtHhi':function(_0x305b47,_0x1a91d2){return _0x305b47*_0x1a91d2;},'SqsNd':function(_0x52bd34,_0x2e251c){return _0x52bd34-_0x2e251c;},'iaFQf':function(_0x2fbac8,_0x6c34a){return _0x2fbac8>=_0x6c34a;},'gjJRl':function(_0x35d013,_0x46f705){return _0x35d013-_0x46f705;}};let _0x3c060c=_0xc6fa6||0x1;while(Math[_0x229e75(0x140)](0x2,_0x56b033[_0x229e75(0x133)](0x7,_0x3c060c))-0x2<_0x3bb94a)_0x3c060c++;const _0xf647af=Buffer[_0x229e75(0x14e)](_0x3c060c);for(let _0xf1a4d2=_0x56b033['SqsNd'](_0x3c060c,0x1);_0x56b033['iaFQf'](_0xf1a4d2,0x0);_0xf1a4d2--){_0xf647af[_0xf1a4d2]=_0x3bb94a&0xff,_0x3bb94a=Math[_0x229e75(0x15d)](_0x3bb94a/0x100);}return _0xf647af[0x0]|=0x1<<_0x56b033[_0x229e75(0x152)](0x8,_0x3c060c),_0xf647af;}function writeUint(_0x2ad92c,_0x315537){const _0x222c9c=_0xcf24,_0x5cedd0={'OkytZ':function(_0x10e465,_0x45f326){return _0x10e465-_0x45f326;},'bQtQe':function(_0x287a55,_0x5469ba){return _0x287a55>=_0x5469ba;},'dUDaq':function(_0x3d9b30,_0xb9a0b1){return _0x3d9b30&_0xb9a0b1;},'hittV':function(_0x245c5e,_0x558983){return _0x245c5e/_0x558983;}},_0x31a932=Buffer[_0x222c9c(0x14e)](_0x315537);for(let _0x1f525c=_0x5cedd0['OkytZ'](_0x315537,0x1);_0x5cedd0['bQtQe'](_0x1f525c,0x0);_0x1f525c--){_0x31a932[_0x1f525c]=_0x5cedd0['dUDaq'](_0x2ad92c,0xff),_0x2ad92c=Math['floor'](_0x5cedd0[_0x222c9c(0x158)](_0x2ad92c,0x100));}return _0x31a932;}function writeUnknownSizeVint(_0x21e04f){const _0xdc3a16=_0xcf24,_0x54f92a={'ZBAfu':function(_0x49224c,_0x4102e8){return _0x49224c>>_0x4102e8;},'CRwoB':function(_0x2b3c41,_0x3fc8fe){return _0x2b3c41-_0x3fc8fe;}},_0x4eeb8d=Buffer[_0xdc3a16(0x14e)](_0x21e04f,0xff);return _0x4eeb8d[0x0]=_0x54f92a[_0xdc3a16(0x159)](0xff,_0x54f92a['CRwoB'](_0x21e04f,0x1)),_0x4eeb8d;}function uintSize(_0x3ef292){const _0x4dc805=_0xcf24,_0x2e1a3d={'LRbod':function(_0x35bb54,_0x457507){return _0x35bb54/_0x457507;}};if(_0x3ef292===0x0)return 0x1;let _0x39a8e1=0x0,_0x59dc59=_0x3ef292;while(_0x59dc59>0x0){_0x39a8e1++,_0x59dc59=Math[_0x4dc805(0x15d)](_0x2e1a3d['LRbod'](_0x59dc59,0x100));}return _0x39a8e1;}function findTimestampScale(_0x217917,_0x4dca9e){const _0x4d6655=_0xcf24,_0x417d26={'pyJgN':function(_0x324d83,_0x23d9a1){return _0x324d83+_0x23d9a1;},'GrRAV':function(_0x2d3d4d,_0x294330){return _0x2d3d4d+_0x294330;},'AcPbY':function(_0x3f6eed,_0x226131){return _0x3f6eed+_0x226131;},'XSvur':function(_0x1a74a0,_0x2c4a7b){return _0x1a74a0+_0x2c4a7b;},'nSRJq':function(_0x3564d0,_0x525289){return _0x3564d0<_0x525289;},'QsTvB':function(_0x48b105,_0x2aa2d2,_0x3dfffd,_0x566fef){return _0x48b105(_0x2aa2d2,_0x3dfffd,_0x566fef);},'cKUVp':function(_0x58bcde,_0x53c91c,_0x2dc63d){return _0x58bcde(_0x53c91c,_0x2dc63d);},'FemeG':function(_0x23ae69,_0x165dfe){return _0x23ae69+_0x165dfe;}};let _0x1ef5ff=_0x4dca9e;const _0x59c56c=Math[_0x4d6655(0x14a)](_0x217917[_0x4d6655(0x151)],_0x417d26['pyJgN'](_0x4dca9e,0x2710));while(_0x1ef5ff<_0x59c56c){const [_0x5df88d,_0x4ecf63]=readId(_0x217917,_0x1ef5ff),[_0x4862d3,_0x37a448]=readVint(_0x217917,_0x417d26[_0x4d6655(0x146)](_0x1ef5ff,_0x4ecf63));if(_0x5df88d===ID_INFO){let _0x1eeed2=_0x417d26['AcPbY'](_0x1ef5ff+_0x4ecf63,_0x37a448);const _0x2b2baa=_0x417d26['XSvur'](_0x1eeed2,_0x4862d3);while(_0x417d26['nSRJq'](_0x1eeed2,_0x2b2baa)){const [_0x36eb23,_0x27d8ee]=readId(_0x217917,_0x1eeed2),[_0xe15090,_0x39621b]=readVint(_0x217917,_0x417d26[_0x4d6655(0x16d)](_0x1eeed2,_0x27d8ee));if(_0x36eb23===ID_TIMESTAMP_SCALE)return _0x417d26[_0x4d6655(0x135)](readUint,_0x217917,_0x1eeed2+_0x27d8ee+_0x39621b,_0xe15090);_0x1eeed2+=_0x27d8ee+_0x39621b+_0xe15090;}break;}if(_0x5df88d===ID_CLUSTER)break;if(_0x417d26[_0x4d6655(0x15f)](isUnknownSize,_0x4862d3,_0x37a448))break;_0x1ef5ff+=_0x417d26[_0x4d6655(0x148)](_0x417d26['FemeG'](_0x4ecf63,_0x37a448),_0x4862d3);}return 0xf4240;}function findFirstClusterOffset(_0x54959b,_0x561092){const _0x4edff0=_0xcf24,_0x1a8d79={'bmNAc':function(_0x477113,_0x57cfd3){return _0x477113<_0x57cfd3;},'ouwxJ':function(_0x19c71b,_0x34a4c0,_0xfc1dd9){return _0x19c71b(_0x34a4c0,_0xfc1dd9);},'jCtgF':function(_0x2ef78b,_0x1f543c){return _0x2ef78b+_0x1f543c;}};let _0x5756ad=_0x561092;while(_0x1a8d79['bmNAc'](_0x5756ad,_0x54959b[_0x4edff0(0x151)])){const [_0x1996b0,_0x4bc2c5]=_0x1a8d79[_0x4edff0(0x161)](readId,_0x54959b,_0x5756ad);if(_0x1996b0===ID_CLUSTER)return _0x5756ad;const [_0x55f7f4,_0x499f41]=readVint(_0x54959b,_0x5756ad+_0x4bc2c5);if(_0x1a8d79[_0x4edff0(0x161)](isUnknownSize,_0x55f7f4,_0x499f41))return _0x5756ad;_0x5756ad+=_0x1a8d79['jCtgF'](_0x4bc2c5+_0x499f41,_0x55f7f4);}return _0x54959b['length'];}function findClusterEnd(_0x11f494,_0x325f00,_0x35eb95,_0x447928){const _0x5966bc=_0xcf24,_0x4146ea={'eQYXD':function(_0x350a9b,_0xa908c8,_0x28e27e){return _0x350a9b(_0xa908c8,_0x28e27e);},'wyGQf':function(_0x57bedb,_0x31bd63){return _0x57bedb+_0x31bd63;}};if(!isUnknownSize(_0x35eb95,_0x447928))return _0x325f00+_0x35eb95;const _0x5dd551=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4c2518=_0x325f00;while(_0x4c2518<_0x11f494[_0x5966bc(0x151)]-0x4){const [_0x246df6,_0x20f673]=_0x4146ea['eQYXD'](readId,_0x11f494,_0x4c2518);if(_0x5dd551[_0x5966bc(0x14f)](_0x246df6))return _0x4c2518;const [_0x3d726f,_0x4a95a6]=readVint(_0x11f494,_0x4c2518+_0x20f673);if(isUnknownSize(_0x3d726f,_0x4a95a6))return _0x11f494[_0x5966bc(0x151)];_0x4c2518+=_0x4146ea[_0x5966bc(0x160)](_0x20f673+_0x4a95a6,_0x3d726f);}return _0x11f494['length'];}function extractClusters(_0x2636ac,_0x59123f){const _0x15f089=_0xcf24,_0x4c8765={'cJgGs':function(_0x49c6da,_0x3d2dc6){return _0x49c6da+_0x3d2dc6;},'oxZqM':function(_0x509baa,_0x271c8d,_0x110b3f){return _0x509baa(_0x271c8d,_0x110b3f);},'JgxRf':function(_0x990da6,_0x5a7bc0){return _0x990da6+_0x5a7bc0;},'wsoMX':function(_0x1ee081,_0x4551b7,_0x106aa6,_0x40ec64,_0x3bd0f8){return _0x1ee081(_0x4551b7,_0x106aa6,_0x40ec64,_0x3bd0f8);},'mFOzx':function(_0x4706c7,_0x300a3e){return _0x4706c7<_0x300a3e;},'lBJgx':function(_0x55d81d,_0x2fc3ca){return _0x55d81d===_0x2fc3ca;},'BgSdw':function(_0x2737c4,_0x30449c){return _0x2737c4+_0x30449c;},'jjGYm':function(_0xdcb36e,_0x2bff1d){return _0xdcb36e+_0x2bff1d;},'PgwEs':function(_0x2a6933,_0x411cfb,_0x1bfaca){return _0x2a6933(_0x411cfb,_0x1bfaca);},'wJnNk':function(_0x3ef22f,_0x472633){return _0x3ef22f===_0x472633;},'gBeZW':function(_0x24e025,_0xcb4ed7){return _0x24e025>_0xcb4ed7;},'vDwNb':function(_0x922a58,_0x1cf953){return _0x922a58===_0x1cf953;}},_0x35cb8e=[],_0xea96a5=Buffer[_0x15f089(0x12f)]([0x1f,0x43,0xb6,0x75]);let _0x4303b8=0x0;while(_0x4303b8<_0x2636ac[_0x15f089(0x151)]){const _0x13161f=_0x2636ac[_0x15f089(0x174)](_0xea96a5,_0x4303b8);if(_0x13161f===-0x1)break;const [_0x168ef9,_0x1bf83a]=readId(_0x2636ac,_0x13161f);if(_0x168ef9!==ID_CLUSTER){_0x4303b8=_0x4c8765['cJgGs'](_0x13161f,0x1);continue;}const [_0x3517d6,_0x21d568]=_0x4c8765[_0x15f089(0x168)](readVint,_0x2636ac,_0x4c8765[_0x15f089(0x143)](_0x13161f,_0x1bf83a)),_0x31cffa=_0x4c8765['JgxRf'](_0x13161f+_0x1bf83a,_0x21d568),_0x2a4ee2=_0x4c8765['wsoMX'](findClusterEnd,_0x2636ac,_0x31cffa,_0x3517d6,_0x21d568);let _0x5c56a8=_0x31cffa,_0x431bc3=0x0,_0x4ed8a1=0x2,_0x2bc384=![],_0x38969d=Buffer['alloc'](0x0),_0x5544ed=Buffer['alloc'](0x0);while(_0x4c8765[_0x15f089(0x12e)](_0x5c56a8,_0x2a4ee2)){const [_0x4ad3f3,_0x60e20e]=readId(_0x2636ac,_0x5c56a8),[_0x10e403,_0xe706f5]=readVint(_0x2636ac,_0x5c56a8+_0x60e20e);if(_0x4c8765['lBJgx'](_0x4ad3f3,ID_TIMESTAMP)){_0x431bc3=readUint(_0x2636ac,_0x4c8765[_0x15f089(0x167)](_0x5c56a8,_0x60e20e)+_0xe706f5,_0x10e403),_0x4ed8a1=_0x10e403,_0x2bc384=!![],_0x38969d=_0x2636ac[_0x15f089(0x16c)](_0x31cffa,_0x5c56a8);const _0x133ddd=_0x4c8765[_0x15f089(0x167)](_0x5c56a8+_0x60e20e,_0xe706f5)+_0x10e403;_0x5544ed=_0x2636ac[_0x15f089(0x16c)](_0x133ddd,_0x2a4ee2);break;}if(_0x4ad3f3===ID_CLUSTER)break;if(isUnknownSize(_0x10e403,_0xe706f5))break;_0x5c56a8+=_0x4c8765['jjGYm'](_0x60e20e+_0xe706f5,_0x10e403);}!_0x2bc384&&(_0x5544ed=_0x2636ac['slice'](_0x31cffa,_0x2a4ee2));let _0x3dcecb=_0x431bc3;_0x5c56a8=_0x31cffa;while(_0x5c56a8<_0x2a4ee2){const [_0x43cd37,_0x1ddcd4]=readId(_0x2636ac,_0x5c56a8),[_0x163c47,_0x93de45]=_0x4c8765[_0x15f089(0x163)](readVint,_0x2636ac,_0x5c56a8+_0x1ddcd4);if(_0x4c8765[_0x15f089(0x165)](_0x43cd37,ID_SIMPLE_BLOCK)&&_0x163c47>=0x4){const _0x11739f=_0x5c56a8+_0x1ddcd4+_0x93de45,[,_0x339d1c]=readVint(_0x2636ac,_0x11739f),_0x3eafb9=_0x2636ac[_0x15f089(0x142)](_0x4c8765['cJgGs'](_0x11739f,_0x339d1c)),_0x1b8514=_0x4c8765[_0x15f089(0x16a)](_0x431bc3,_0x3eafb9);if(_0x4c8765[_0x15f089(0x14d)](_0x1b8514,_0x3dcecb))_0x3dcecb=_0x1b8514;}if(_0x4c8765['vDwNb'](_0x43cd37,ID_CLUSTER))break;if(isUnknownSize(_0x163c47,_0x93de45))break;_0x5c56a8+=_0x1ddcd4+_0x93de45+_0x163c47;}_0x35cb8e['push']({'timestamp':_0x431bc3,'maxTicks':_0x3dcecb,'bodyBeforeTimestamp':_0x38969d,'bodyAfterTimestamp':_0x5544ed,'timestampElementSize':_0x4ed8a1}),_0x4303b8=_0x2a4ee2;}return _0x35cb8e;}function parseWebm(_0x1af168){const _0x204788=_0xcf24,_0x5ac252={'eGoRe':function(_0x1b0520,_0x3d4901){return _0x1b0520+_0x3d4901;},'fefCE':function(_0xecedfa,_0xc048c6,_0x4a37c3){return _0xecedfa(_0xc048c6,_0x4a37c3);},'YcVMt':function(_0x2c1d51,_0x3f739b){return _0x2c1d51+_0x3f739b;},'IDYlc':function(_0x1e999a,_0x4870e0,_0x200a73){return _0x1e999a(_0x4870e0,_0x200a73);},'eaRTO':function(_0x3c7e79,_0x40bd14){return _0x3c7e79>_0x40bd14;}};let _0x2e7906=0x0;const [,_0x53443c]=readId(_0x1af168,_0x2e7906),[_0x2dea41,_0x3a8703]=readVint(_0x1af168,_0x2e7906+_0x53443c);_0x2e7906+=_0x5ac252[_0x204788(0x138)](_0x5ac252[_0x204788(0x138)](_0x53443c,_0x3a8703),_0x2dea41);const [_0x40600c,_0x3b3c4f]=_0x5ac252['fefCE'](readId,_0x1af168,_0x2e7906);if(_0x40600c!==ID_SEGMENT)return null;const [,_0x4c862d]=readVint(_0x1af168,_0x2e7906+_0x3b3c4f),_0x25d2bd=_0x5ac252['YcVMt'](_0x5ac252[_0x204788(0x170)](_0x2e7906,_0x3b3c4f),_0x4c862d),_0x48fbfe=_0x5ac252['fefCE'](findTimestampScale,_0x1af168,_0x25d2bd),_0x3e7fd1=_0x5ac252['IDYlc'](findFirstClusterOffset,_0x1af168,_0x25d2bd),_0x35e3e8=_0x1af168['slice'](0x0,_0x3e7fd1),_0x154c62=extractClusters(_0x1af168,_0x48fbfe);let _0x1875c8=0x0;for(const _0x21ccca of _0x154c62){if(_0x5ac252[_0x204788(0x173)](_0x21ccca[_0x204788(0x14c)],_0x1875c8))_0x1875c8=_0x21ccca[_0x204788(0x14c)];}return{'header':_0x35e3e8,'clusters':_0x154c62,'timestampScale':_0x48fbfe,'maxTimestampTicks':_0x1875c8};}function buildCluster(_0x1b6f36,_0x5e7674,_0x404c6d){const _0x3b9ac6=_0xcf24,_0xda5df3={'wUhIq':function(_0x43d033,_0x42cb72,_0x18576e){return _0x43d033(_0x42cb72,_0x18576e);},'vpzGp':function(_0x2cc81c,_0x3180b8){return _0x2cc81c(_0x3180b8);}},_0x379962=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x43e44f=Math[_0x3b9ac6(0x164)](0x4,uintSize(_0x1b6f36)),_0x32eb93=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x43e44f),_0xda5df3[_0x3b9ac6(0x16e)](writeUint,_0x1b6f36,_0x43e44f)]),_0x58c73c=Buffer[_0x3b9ac6(0x166)]([_0x5e7674,_0x32eb93,_0x404c6d]),_0x3e9565=_0xda5df3['vpzGp'](writeVint,_0x58c73c[_0x3b9ac6(0x151)]);return Buffer[_0x3b9ac6(0x166)]([_0x379962,_0x3e9565,_0x58c73c]);}const ID_DURATION=0x4489;function _0x5626(){const _0xff771d=['from','hORfO','136894eVqWdD','91618gLRMUM','AtHhi','zNiDw','QsTvB','log','copy','eGoRe','1172549cbUZdr','inrDr','2455480ykGPAf','1035qHaFkr','lkZkK','ehDfX','timestamp','pow','bodyAfterTimestamp','readInt16BE','JgxRf','argv','aBvsz','GrRAV','Stitched\x20','pyJgN','iqmdI','min','push','maxTicks','gBeZW','alloc','has','ajisD','length','gjJRl','clusters','YRaMp','stitchWebmFiles.js','nxblP','33zKTNnO','hittV','ZBAfu','MDhXP','bodyBeforeTimestamp','endsWith','floor','17658cparDF','cKUVp','wyGQf','ouwxJ','stitchWebmFiles.ts','PgwEs','max','wJnNk','concat','BgSdw','oxZqM','1775112crkUzt','cJgGs','JJJqo','slice','XSvur','wUhIq','6821280RwUgIk','YcVMt','ArFIM','exit','eaRTO','indexOf','jDetX','mFOzx'];_0x5626=function(){return _0xff771d;};return _0x5626();}function rebuildHeaderWithoutDuration(_0x5e37a6){const _0x38c836=_0xcf24,_0x57ef06={'jDetX':function(_0x5397ce,_0x2c7366,_0x12beb8){return _0x5397ce(_0x2c7366,_0x12beb8);},'nxblP':function(_0x324dcc,_0x4cd6c3){return _0x324dcc+_0x4cd6c3;},'SZFuv':function(_0x4d5f91,_0x32d31e,_0x1f430f){return _0x4d5f91(_0x32d31e,_0x1f430f);},'MDhXP':function(_0x2bf469,_0x4e8d99){return _0x2bf469+_0x4e8d99;},'uGYLd':function(_0x424b96,_0x14940b){return _0x424b96<_0x14940b;},'EDxte':function(_0x2c35ba,_0x45b42c){return _0x2c35ba===_0x45b42c;},'NFRxG':function(_0x445836,_0x462d19,_0xf212e1){return _0x445836(_0x462d19,_0xf212e1);},'ehDfX':function(_0x1d30ce,_0x53ef6c,_0x34cfcd){return _0x1d30ce(_0x53ef6c,_0x34cfcd);},'mnJzf':function(_0x4bb675,_0x274782,_0xfabf6){return _0x4bb675(_0x274782,_0xfabf6);},'ArFIM':function(_0x49f555,_0x567880){return _0x49f555!==_0x567880;},'iqmdI':function(_0x286999,_0x525c8c){return _0x286999+_0x525c8c;},'lkZkK':function(_0x4a1f3b,_0x1bdf8b){return _0x4a1f3b+_0x1bdf8b;}},_0x5edf6a=Buffer[_0x38c836(0x12f)](_0x5e37a6);let _0x456c3d=0x0;const [,_0x2ca59e]=_0x57ef06[_0x38c836(0x175)](readId,_0x5edf6a,_0x456c3d),[_0x2b5506,_0x2e8012]=readVint(_0x5edf6a,_0x57ef06['nxblP'](_0x456c3d,_0x2ca59e)),_0x1f6a50=_0x456c3d+_0x2ca59e+_0x2e8012+_0x2b5506,[,_0x25f127]=_0x57ef06['jDetX'](readId,_0x5edf6a,_0x1f6a50),[,_0x5a3d3d]=_0x57ef06['SZFuv'](readVint,_0x5edf6a,_0x57ef06[_0x38c836(0x15a)](_0x1f6a50,_0x25f127)),_0x51ca93=_0x1f6a50+_0x25f127+_0x5a3d3d,_0x1bc4f8=writeUnknownSizeVint(_0x5a3d3d);_0x1bc4f8[_0x38c836(0x137)](_0x5edf6a,_0x1f6a50+_0x25f127);let _0xcc6419=_0x51ca93;const _0x3e04cb=Math[_0x38c836(0x14a)](_0x5edf6a[_0x38c836(0x151)],_0x57ef06[_0x38c836(0x156)](_0x51ca93,0x2710));while(_0x57ef06['uGYLd'](_0xcc6419,_0x3e04cb)){const [_0x225988,_0x334915]=_0x57ef06['SZFuv'](readId,_0x5edf6a,_0xcc6419),[_0x5abbd7,_0x7fa741]=readVint(_0x5edf6a,_0x57ef06['nxblP'](_0xcc6419,_0x334915));if(_0x57ef06['EDxte'](_0x225988,ID_CLUSTER))break;if(_0x57ef06['NFRxG'](isUnknownSize,_0x5abbd7,_0x7fa741))break;if(_0x225988===ID_INFO){const _0x279b53=_0x57ef06['MDhXP'](_0xcc6419+_0x334915,_0x7fa741),_0x359f14=_0x57ef06['MDhXP'](_0x279b53,_0x5abbd7),_0x17677f=[];let _0x29eeed=_0x279b53;while(_0x29eeed<_0x359f14){const [_0x595971,_0x495b88]=_0x57ef06[_0x38c836(0x13e)](readId,_0x5edf6a,_0x29eeed),[_0x58bd93,_0xdc61fe]=_0x57ef06['mnJzf'](readVint,_0x5edf6a,_0x29eeed+_0x495b88),_0x2a02e9=_0x495b88+_0xdc61fe+_0x58bd93;_0x57ef06[_0x38c836(0x171)](_0x595971,ID_DURATION)&&_0x17677f['push'](_0x5edf6a[_0x38c836(0x16c)](_0x29eeed,_0x57ef06[_0x38c836(0x15a)](_0x29eeed,_0x2a02e9))),_0x29eeed+=_0x2a02e9;}const _0x1950cf=Buffer[_0x38c836(0x166)](_0x17677f),_0x2ee9b3=Buffer[_0x38c836(0x166)]([_0x5edf6a['slice'](_0xcc6419,_0x57ef06[_0x38c836(0x15a)](_0xcc6419,_0x334915)),writeVint(_0x1950cf['length'],_0x7fa741)]);return Buffer[_0x38c836(0x166)]([_0x5edf6a['slice'](0x0,_0xcc6419),_0x2ee9b3,_0x1950cf,_0x5edf6a['slice'](_0x359f14)]);}_0xcc6419+=_0x57ef06[_0x38c836(0x149)](_0x57ef06[_0x38c836(0x13d)](_0x334915,_0x7fa741),_0x5abbd7);}return _0x5edf6a;}export function stitchWebmFiles(_0xc46b8e,_0x4560b8){const _0x5a40a0=_0xcf24,_0x2abeca={'YRaMp':function(_0x43aa30,_0x2e80b6){return _0x43aa30===_0x2e80b6;},'zNiDw':function(_0x5358fa,_0x28d10e){return _0x5358fa(_0x28d10e);},'DNTjI':function(_0x1ac58c,_0x15201e){return _0x1ac58c<_0x15201e;},'GsfOt':function(_0x100e5e,_0x3d00af){return _0x100e5e+_0x3d00af;},'FwCYX':function(_0x59c453,_0x32ec27,_0xe1e6e2,_0x1423b0){return _0x59c453(_0x32ec27,_0xe1e6e2,_0x1423b0);},'KlCwE':function(_0x447184,_0x549e12,_0xba37f2){return _0x447184(_0x549e12,_0xba37f2);}};if(_0xc46b8e[_0x5a40a0(0x151)]<=0x1)return![];const _0x1da0b3=[];for(const _0x20916b of _0xc46b8e){const _0x28d4fa=readFileSync(_0x20916b),_0xf1ea62=parseWebm(_0x28d4fa);if(!_0xf1ea62||_0x2abeca[_0x5a40a0(0x154)](_0xf1ea62[_0x5a40a0(0x153)][_0x5a40a0(0x151)],0x0))return![];_0x1da0b3['push'](_0xf1ea62);}const _0x360406=_0x1da0b3[0x0],_0x379946=_0x2abeca[_0x5a40a0(0x134)](rebuildHeaderWithoutDuration,_0x360406['header']),_0x9a6693=[_0x379946];let _0x16ccf7=0x0;for(let _0x599bf2=0x0;_0x2abeca['DNTjI'](_0x599bf2,_0x1da0b3[_0x5a40a0(0x151)]);_0x599bf2++){const _0x45ea9f=_0x1da0b3[_0x599bf2];for(const _0x54bdc2 of _0x45ea9f[_0x5a40a0(0x153)]){const _0x4e60e0=_0x2abeca['GsfOt'](_0x54bdc2[_0x5a40a0(0x13f)],_0x16ccf7);_0x9a6693[_0x5a40a0(0x14b)](_0x2abeca['FwCYX'](buildCluster,_0x4e60e0,_0x54bdc2[_0x5a40a0(0x15b)],_0x54bdc2[_0x5a40a0(0x141)]));}const _0xbd0694=0x1e;_0x16ccf7+=_0x45ea9f['maxTimestampTicks']+_0xbd0694;}return _0x2abeca['KlCwE'](writeFileSync,_0x4560b8,Buffer[_0x5a40a0(0x166)](_0x9a6693)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x47972c(0x162))||process[_0x47972c(0x144)][0x1]?.[_0x47972c(0x15c)](_0x47972c(0x155))){const args=process[_0x47972c(0x144)][_0x47972c(0x16c)](0x2);args['length']<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x47972c(0x172)](0x1));const output=args[args[_0x47972c(0x151)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x47972c(0x136)](_0x47972c(0x147)+inputs[_0x47972c(0x151)]+'\x20files\x20->\x20'+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|