@ranger-testing/ranger-cli 3.1.7-alpha.62f152a-54 → 3.1.7-alpha.a5be4ca-60
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 +15 -9
|
@@ -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(_0x223ab4,_0x2932c5){const _0x14a8aa=_0x131d,_0x42fe75=_0x223ab4();while(!![]){try{const _0xbac7d3=-parseInt(_0x14a8aa(0x1b5))/0x1*(-parseInt(_0x14a8aa(0x1b3))/0x2)+parseInt(_0x14a8aa(0x1cb))/0x3*(parseInt(_0x14a8aa(0x1e9))/0x4)+parseInt(_0x14a8aa(0x1cd))/0x5*(parseInt(_0x14a8aa(0x1e8))/0x6)+-parseInt(_0x14a8aa(0x1c3))/0x7*(parseInt(_0x14a8aa(0x1bb))/0x8)+-parseInt(_0x14a8aa(0x1b2))/0x9*(parseInt(_0x14a8aa(0x1de))/0xa)+parseInt(_0x14a8aa(0x1c6))/0xb+-parseInt(_0x14a8aa(0x1ae))/0xc;if(_0xbac7d3===_0x2932c5)break;else _0x42fe75['push'](_0x42fe75['shift']());}catch(_0x4ded30){_0x42fe75['push'](_0x42fe75['shift']());}}}(_0x4eca,0xc53a8));import{existsSync}from'fs';import _0x27949e from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';function _0x131d(_0x2a9a62,_0x120b79){_0x2a9a62=_0x2a9a62-0x1ad;const _0x4eca93=_0x4eca();let _0x131d04=_0x4eca93[_0x2a9a62];return _0x131d04;}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';function _0x4eca(){const _0x4b5a78=['envBaseUrl','xlkBp','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','sRetG','oDSim','15111370XLdmIp','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','lXNmN','\x20does\x20not\x20exist.','cloud','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','length','Cloud\x20profile\x20(recommended)','WZwJV','list','11436iGtYxi','1188zrbnyx','\x20\x20Note:\x20--env\x20\x22','`ranger\x20profile\x20add`\x20to\x20create\x20one.','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','string','baseUrl','adcwu','envStartPath','4592784jnBSUt','log','authEnv','name','9mZzeiN','5090BUlKDf','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','78CxHvLp','environmentKey','\x20\x20Warning:\x20','aXaZJ','resolvedEnv','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','48tBhJRZ','trhhY','telemetry','pxPMV','profile','key','Local\x20profile','status','1159774ogbWav','WjOTy','`\x20to\x20recreate\x20it.','16747544ZgUrOv','domains','RANGER_TEST_USERNAME','env','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','5277rQzSYg','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','3810OCTFVX','settings','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','authPath','BRnxh','baseUrlSource','startPath','hKogb','rPMFi','xAuSl','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','RANGER_SESSION_STATE_PATH='];_0x4eca=function(){return _0x4b5a78;};return _0x4eca();}import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x72f6ce){const _0x58c32b=_0x131d,_0x2f0584={'WZwJV':function(_0x21047f,_0x502bea){return _0x21047f(_0x502bea);},'qtJMv':function(_0x6a8c68,_0x2a1940){return _0x6a8c68!==_0x2a1940;},'trhhY':function(_0x57ffa7,_0x206ee3){return _0x57ffa7??_0x206ee3;},'sRetG':function(_0x265924){return _0x265924();},'hKogb':function(_0x216815,_0x497944){return _0x216815===_0x497944;},'pxPMV':function(_0x389124,_0x7f137c){return _0x389124+_0x7f137c;},'ynVhm':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','aXaZJ':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','oDSim':_0x58c32b(0x1cc),'daDLF':function(_0x6cbeca,_0x1df067){return _0x6cbeca instanceof _0x1df067;},'lXNmN':function(_0x49e3ac,_0x487f16){return _0x49e3ac&&_0x487f16;},'BRnxh':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','xlkBp':_0x58c32b(0x1e7),'WjOTy':_0x58c32b(0x1e5),'YFWGI':'cloud','adcwu':'local','xAuSl':function(_0x5a3a5e,_0x331bec,_0x214b18){return _0x5a3a5e(_0x331bec,_0x214b18);},'dJIYY':function(_0x3b3c8b,_0x1efc38,_0x3177cb){return _0x3b3c8b(_0x1efc38,_0x3177cb);},'YZePC':function(_0x3804d5,_0x1861e6){return _0x3804d5(_0x1861e6);},'rPMFi':function(_0x3b11a9,_0x133c71){return _0x3b11a9(_0x133c71);},'fdkoN':function(_0x20e4c5,_0x4a4759){return _0x20e4c5(_0x4a4759);},'uMLWA':function(_0x6b219f,_0x56c12c){return _0x6b219f(_0x56c12c);},'CEpSp':function(_0x4bca59,_0x5b4b5d){return _0x4bca59(_0x5b4b5d);},'bRvzC':function(_0x2bf515,_0x1235f1){return _0x2bf515+_0x1235f1;},'lfPdo':_0x58c32b(0x1ba)},_0x26f5c1=_0x72f6ce[_0x58c32b(0x1bf)];let _0x5c3456=_0x26f5c1,_0x33fe81=null;const _0x64c45a=_0x26f5c1?null:await readActiveProfileName();if(_0x72f6ce['authEnv']&&_0x26f5c1)console[_0x58c32b(0x1af)]('\x20\x20Note:\x20--env\x20\x22'+_0x72f6ce[_0x58c32b(0x1b0)]+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x26f5c1+_0x58c32b(0x1df));else _0x72f6ce['authEnv']&&!process['env']['RANGER_TEST_USERNAME']&&console['log'](_0x58c32b(0x1ea)+_0x72f6ce['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x26f5c1&&process[_0x58c32b(0x1c9)][_0x58c32b(0x1c8)])try{const _0x47284b=await _0x2f0584[_0x58c32b(0x1e6)](resolveAdHocProfile,{'targetUrl':_0x72f6ce[_0x58c32b(0x1ee)]??readUrlEnvVars()['envBaseUrl'],'envKey':_0x72f6ce[_0x58c32b(0x1b0)]});_0x47284b&&(_0x64c45a&&_0x2f0584['qtJMv'](_0x64c45a,_0x47284b[_0x58c32b(0x1b1)])&&console['log'](_0x58c32b(0x1ca)+_0x47284b['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x64c45a+'\x22.\x20Pass\x20--profile\x20'+_0x64c45a+'\x20to\x20override.'),_0x5c3456=_0x47284b[_0x58c32b(0x1b1)],_0x33fe81=_0x47284b[_0x58c32b(0x1bf)]);}catch(_0x4ecb10){if(!_0x64c45a||_0x72f6ce[_0x58c32b(0x1b0)])throw _0x4ecb10;console[_0x58c32b(0x1af)](_0x58c32b(0x1b7)+(_0x4ecb10 instanceof Error?_0x4ecb10['message']:_0x2f0584[_0x58c32b(0x1e6)](String,_0x4ecb10))),console[_0x58c32b(0x1af)](_0x58c32b(0x1d7)+_0x64c45a+'\x22.');}if(!_0x5c3456)_0x5c3456=_0x2f0584[_0x58c32b(0x1bc)](_0x64c45a,undefined);if(!_0x5c3456)try{const _0x475eeb=await _0x2f0584[_0x58c32b(0x1dc)](listCloudProfiles);if(_0x2f0584[_0x58c32b(0x1d4)](_0x475eeb[_0x58c32b(0x1e4)],0x1)){const _0xe74efb=_0x475eeb[0x0];_0x5c3456=_0xe74efb['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0xe74efb[_0x58c32b(0x1b1)]),console[_0x58c32b(0x1af)](_0x58c32b(0x1b4));}}catch{}if(!_0x5c3456)throw new Error(_0x2f0584['pxPMV'](_0x2f0584['pxPMV'](_0x2f0584[_0x58c32b(0x1be)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a'),_0x2f0584['ynVhm']),_0x2f0584[_0x58c32b(0x1b8)])+_0x2f0584[_0x58c32b(0x1dd)]);const _0x17a964=getEnvDir(_0x5c3456),_0x1626e0=_0x2f0584[_0x58c32b(0x1e6)](existsSync,_0x17a964);let _0x21e4bd=_0x33fe81,_0x6fdd80=![];if(!_0x21e4bd)try{_0x21e4bd=await fetchCloudProfile(_0x5c3456);if(!_0x21e4bd)_0x6fdd80=!![];}catch(_0x182b14){_0x2f0584['daDLF'](_0x182b14,ApiError)&&_0x182b14[_0x58c32b(0x1c2)]===0x194&&(_0x6fdd80=!![]);}if(_0x2f0584[_0x58c32b(0x1e0)](_0x26f5c1,_0x6fdd80)&&!_0x1626e0&&!_0x21e4bd)throw new Error(_0x2f0584[_0x58c32b(0x1be)]('Profile\x20\x22'+_0x26f5c1+_0x58c32b(0x1ec)+_0x2f0584[_0x58c32b(0x1d1)],_0x58c32b(0x1eb)));if(_0x21e4bd&&_0x1626e0){let _0x3f10fe=!![];if(_0x2f0584['sRetG'](isInteractive)){const {source:_0x299eea}=await _0x27949e['prompt']([{'type':_0x2f0584[_0x58c32b(0x1da)],'name':'source','message':'Profile\x20\x22'+_0x5c3456+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x2f0584[_0x58c32b(0x1c4)],'value':_0x2f0584['YFWGI']},{'name':_0x58c32b(0x1c1),'value':_0x2f0584[_0x58c32b(0x1ef)]}],'default':_0x2f0584['YFWGI']}]);_0x3f10fe=_0x299eea===_0x58c32b(0x1e2);}if(!_0x3f10fe)_0x21e4bd=null;}const _0x4b5048=readProfileOverrides(process['cwd'](),_0x5c3456);let _0xab8d0c=null,_0x101289,_0x25c718,_0x4ef92e,_0x559d42,_0x1d2595=null,_0x5df2f2,_0x5dc2dc;const _0x5a464c=expandOverrides(_0x4b5048),_0x37e04b=_0x2f0584[_0x58c32b(0x1dc)](readUrlEnvVars);if(_0x21e4bd){_0xab8d0c=_0x21e4bd;const _0x504f25=_0x21e4bd[_0x58c32b(0x1ce)]??{},_0x3aa425=_0x2f0584['xAuSl'](mergeCloudProfileSettings,_0x504f25,_0x4b5048??undefined),_0x28c3f7={..._0x21e4bd,'settings':_0x3aa425};_0x1d2595={'baseUrl':expandString(_0x504f25[_0x58c32b(0x1ee)]),'startPath':_0x2f0584['WZwJV'](expandString,_0x504f25['startPath'])};const _0x4d3c4f=await _0x2f0584[_0x58c32b(0x1dc)](fetchAuthConfig),_0x5db2c8=_0x4d3c4f?_0x2f0584['dJIYY'](resolveAuthEnvironmentLocally,_0x4d3c4f,_0x21e4bd[_0x58c32b(0x1b6)]):null;_0x5df2f2=_0x5db2c8?.['domains']?.[0x0],_0x5dc2dc=_0x5db2c8?.['key'];const _0x530683=_0x2f0584['YZePC'](resolveProfileUrl,{'flagBaseUrl':_0x72f6ce[_0x58c32b(0x1ee)],'flagStartPath':_0x72f6ce['startPath'],'envBaseUrl':_0x37e04b[_0x58c32b(0x1d9)],'envStartPath':_0x37e04b['envStartPath'],'projectOverrides':_0x5a464c,'cloudSettings':_0x1d2595,'authEnvironmentDomain':_0x5df2f2}),_0x2dafca=process[_0x58c32b(0x1c9)]['RANGER_SESSION_STATE_PATH'];if(_0x2dafca){if(!_0x2f0584[_0x58c32b(0x1d5)](existsSync,_0x2dafca))throw new Error(_0x58c32b(0x1d8)+_0x2dafca+_0x58c32b(0x1e1));_0x101289=_0x2dafca,_0x25c718=_0x2f0584['fdkoN'](resolveEnvVars,_0x3aa425),_0x4ef92e=_0x2f0584['uMLWA'](Boolean,_0x25c718['cdpEndpoint']);}else{const _0x446f32=await _0x2f0584[_0x58c32b(0x1d6)](resolveCloudProfileSession,_0x28c3f7,{'effectiveBaseUrl':_0x530683[_0x58c32b(0x1ee)],'telemetry':_0x72f6ce[_0x58c32b(0x1bd)],'assertedEnv':_0x72f6ce[_0x58c32b(0x1b0)]});_0x101289=_0x446f32[_0x58c32b(0x1d0)],_0x25c718=resolveEnvVars(_0x446f32[_0x58c32b(0x1ce)]),_0x4ef92e=_0x2f0584['CEpSp'](Boolean,_0x25c718['cdpEndpoint']),_0x5df2f2=_0x446f32['resolvedEnv']?.[_0x58c32b(0x1c7)]?.[0x0],_0x5dc2dc=_0x446f32[_0x58c32b(0x1b9)]?.[_0x58c32b(0x1c0)];}}else{if(!_0x1626e0){const _0x4ee330=!_0x26f5c1;throw new Error(_0x4ee330?_0x2f0584['bRvzC']('Active\x20profile\x20\x22'+_0x5c3456+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a',_0x58c32b(0x1cf))+_0x2f0584['lfPdo']+(_0x58c32b(0x1db)+_0x5c3456+_0x58c32b(0x1c5)):'Profile\x20\x22'+_0x5c3456+_0x58c32b(0x1e3)+_0x5c3456);}const _0x393ded=await _0x2f0584['CEpSp'](loadSettings,_0x5c3456);_0x25c718=resolveEnvVars(_0x393ded),_0x4ef92e=_0x2f0584['fdkoN'](Boolean,_0x25c718['cdpEndpoint']),_0x559d42=_0x25c718['baseUrl'];}const _0xdc8f1c=resolveProfileUrl({'flagBaseUrl':_0x72f6ce[_0x58c32b(0x1ee)],'flagStartPath':_0x72f6ce[_0x58c32b(0x1d3)],'envBaseUrl':_0x37e04b[_0x58c32b(0x1d9)],'envStartPath':_0x37e04b[_0x58c32b(0x1ad)],'localSettingsBaseUrl':_0x559d42,'projectOverrides':_0x5a464c,'cloudSettings':_0x1d2595,'authEnvironmentDomain':_0x5df2f2}),_0x17c99f=_0xdc8f1c['url']??_0xdc8f1c[_0x58c32b(0x1ee)];if(!_0x17c99f&&!_0x4ef92e)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x5c3456+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x5c3456+'\x20baseUrl\x20<url>');return{'activeProfile':_0x5c3456,'resolvedCloudProfile':_0xab8d0c,'cloudAuthPath':_0x101289,'resolvedSettings':_0x25c718,'isCdpMode':_0x4ef92e,'url':_0x17c99f,'baseUrlSource':_0xdc8f1c[_0x58c32b(0x1d2)],'authEnvKey':_0x5dc2dc,'startPath':_0xdc8f1c['startPath']};}function expandString(_0x528650){const _0x3838a4={'PLNeh':function(_0xf67d8d,_0x3a2555){return _0xf67d8d!==_0x3a2555;},'kKNov':function(_0x4b16e3,_0x5ce528){return _0x4b16e3(_0x5ce528);}};if(_0x3838a4['PLNeh'](typeof _0x528650,'string'))return _0x528650;return _0x3838a4['kKNov'](resolveEnvVars,_0x528650);}function expandOverrides(_0x57912a){const _0x15fd27=_0x131d,_0x157e33={'WTMFZ':function(_0x4f638f,_0x38f277){return _0x4f638f(_0x38f277);},'inbsy':_0x15fd27(0x1ed)};if(!_0x57912a)return _0x57912a;const _0x48938e={..._0x57912a};return typeof _0x48938e[_0x15fd27(0x1ee)]===_0x15fd27(0x1ed)&&(_0x48938e[_0x15fd27(0x1ee)]=_0x157e33['WTMFZ'](resolveEnvVars,_0x48938e['baseUrl'])),typeof _0x48938e['startPath']===_0x157e33['inbsy']&&(_0x48938e[_0x15fd27(0x1d3)]=resolveEnvVars(_0x48938e['startPath'])),_0x48938e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x21c7(_0x4311f1,_0x2a1b22){_0x4311f1=_0x4311f1-0x1c0;const _0x442083=_0x4420();let _0x21c7d7=_0x442083[_0x4311f1];return _0x21c7d7;}(function(_0x1e8663,_0x43f20c){const _0x12d49b=_0x21c7,_0x268004=_0x1e8663();while(!![]){try{const _0xd3e811=-parseInt(_0x12d49b(0x1c0))/0x1*(parseInt(_0x12d49b(0x1c8))/0x2)+parseInt(_0x12d49b(0x1ca))/0x3+-parseInt(_0x12d49b(0x1c5))/0x4*(parseInt(_0x12d49b(0x1d8))/0x5)+parseInt(_0x12d49b(0x1c9))/0x6*(-parseInt(_0x12d49b(0x1ce))/0x7)+parseInt(_0x12d49b(0x1c2))/0x8*(-parseInt(_0x12d49b(0x1c4))/0x9)+parseInt(_0x12d49b(0x1e2))/0xa+parseInt(_0x12d49b(0x1d4))/0xb*(parseInt(_0x12d49b(0x1d1))/0xc);if(_0xd3e811===_0x43f20c)break;else _0x268004['push'](_0x268004['shift']());}catch(_0x519e71){_0x268004['push'](_0x268004['shift']());}}}(_0x4420,0x97460));function _0x4420(){const _0x24891e=['2894277xIMcEI','RANGER_BASE_URL','uaJTD','slice','7PtDdtX','projectOverrides','RANGER_START_PATH','156JghKOn','https://','Rsjvv','105215jnlBAt','authEnvironmentDomain','endsWith','envStartPath','755FQtFRb','brtqF','GGKHr','envBaseUrl','gjAXg','string','local\x20profile\x20settings','IdwLs','vdHcN','QGkHT','3846670pgSleT','--base-url','flagStartPath','RXzZi','localSettingsBaseUrl','3jwKyOW','cloudSettings','3560784EbCioF','XTTYk','9HwmvGb','1596FYDOmJ','baseUrl','startsWith','76926MkDQSv','1400514gHhWdI'];_0x4420=function(){return _0x24891e;};return _0x4420();}function firstDefined(..._0x29bf43){const _0x53690e={'GNPkN':function(_0xb9e7d1,_0x1c0329){return _0xb9e7d1!==_0x1c0329;}};for(const _0xee03ef of _0x29bf43){if(_0xee03ef!==undefined&&_0xee03ef!==null&&_0x53690e['GNPkN'](_0xee03ef,''))return _0xee03ef;}return undefined;}function normalizeAuthEnvironmentDomain(_0x559519){const _0x5a1e93=_0x21c7;if(!_0x559519)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x559519))return _0x559519;return _0x5a1e93(0x1d2)+_0x559519;}export function resolveBaseUrlWithSource(_0x42b413){const _0x56de28=_0x21c7,_0x441728={'TSUBl':'baseUrl','XTTYk':function(_0x14ceec,_0x35daee){return _0x14ceec===_0x35daee;},'gjAXg':_0x56de28(0x1e3),'vdHcN':_0x56de28(0x1de),'OITIN':'string','RXzZi':'projects.json\x20override','AevEZ':'cloud\x20profile\x20settings','IdwLs':'auth\x20environment\x20domain','QGkHT':function(_0x17c7d6,_0x289acc){return _0x17c7d6!==_0x289acc;}},_0x4f2f40=_0x42b413['projectOverrides'],_0xd13d97=!!_0x4f2f40&&_0x441728['TSUBl']in _0x4f2f40,_0x52c225=_0x4f2f40?.['baseUrl'],_0x30d31d=!(_0xd13d97&&_0x441728['XTTYk'](_0x52c225,null)),_0x2dbf28=[[_0x42b413['flagBaseUrl'],_0x441728[_0x56de28(0x1dc)]],[_0x42b413[_0x56de28(0x1db)],'RANGER_BASE_URL'],[_0x42b413[_0x56de28(0x1e6)],_0x441728[_0x56de28(0x1e0)]],[_0x441728[_0x56de28(0x1c3)](typeof _0x52c225,_0x441728['OITIN'])?_0x52c225:undefined,_0x441728[_0x56de28(0x1e5)]],[_0x30d31d?_0x42b413['cloudSettings']?.[_0x56de28(0x1c6)]:undefined,_0x441728['AevEZ']],[_0x30d31d?normalizeAuthEnvironmentDomain(_0x42b413[_0x56de28(0x1d5)]):undefined,_0x441728[_0x56de28(0x1df)]]];for(const [_0x531d97,_0x3a64c1]of _0x2dbf28){if(_0x441728[_0x56de28(0x1e1)](_0x531d97,undefined)&&_0x531d97!==null&&_0x441728['QGkHT'](_0x531d97,''))return{'baseUrl':_0x531d97,'source':_0x3a64c1};}return{};}export function resolveBaseUrl(_0x242bf9){return resolveBaseUrlWithSource(_0x242bf9)['baseUrl'];}export function resolveStartPath(_0x11f175){const _0x24609f=_0x21c7,_0x4f16b2={'kGILW':'startPath','Rsjvv':function(_0x3d7018,_0x3be236,_0x54ffb4,_0x5d02ca,_0x4eb3f7){return _0x3d7018(_0x3be236,_0x54ffb4,_0x5d02ca,_0x4eb3f7);},'TcENU':function(_0x39bb5d,_0x1b725d){return _0x39bb5d===_0x1b725d;},'dcquP':_0x24609f(0x1dd)},_0x2eaeea=_0x11f175[_0x24609f(0x1cf)],_0x5058de=!!_0x2eaeea&&_0x4f16b2['kGILW']in _0x2eaeea,_0x6f87af=_0x2eaeea?.['startPath'],_0x5d472c=!(_0x5058de&&_0x6f87af===null);return _0x4f16b2[_0x24609f(0x1d3)](firstDefined,_0x11f175[_0x24609f(0x1e4)],_0x11f175[_0x24609f(0x1d7)],_0x4f16b2['TcENU'](typeof _0x6f87af,_0x4f16b2['dcquP'])?_0x6f87af:undefined,_0x5d472c?_0x11f175[_0x24609f(0x1c1)]?.['startPath']:undefined);}export function joinBaseAndPath(_0xc5766,_0x7b2a68){const _0x29bc56=_0x21c7,_0x47ae57={'brtqF':function(_0x520582,_0x5e6eac){return _0x520582+_0x5e6eac;}};if(!_0xc5766)return undefined;if(!_0x7b2a68)return _0xc5766;const _0x577d82=_0xc5766[_0x29bc56(0x1d6)]('/')?_0xc5766[_0x29bc56(0x1cd)](0x0,-0x1):_0xc5766,_0x3277a3=_0x7b2a68[_0x29bc56(0x1c7)]('/')?_0x7b2a68:_0x47ae57[_0x29bc56(0x1d9)]('/',_0x7b2a68);return _0x577d82+_0x3277a3;}export function resolveProfileUrl(_0xf4a46a){const _0x15338f=_0x21c7,_0x379f6d={'uaJTD':function(_0x432fa8,_0x139ce8){return _0x432fa8(_0x139ce8);},'GGKHr':function(_0x41cf6c,_0x155e12){return _0x41cf6c(_0x155e12);}},{baseUrl:_0x182a5e,source:_0x34cb3d}=_0x379f6d[_0x15338f(0x1cc)](resolveBaseUrlWithSource,_0xf4a46a),_0x4fc872=_0x379f6d[_0x15338f(0x1da)](resolveStartPath,_0xf4a46a);return{'baseUrl':_0x182a5e,'baseUrlSource':_0x34cb3d,'startPath':_0x4fc872,'url':joinBaseAndPath(_0x182a5e,_0x4fc872)};}export function readUrlEnvVars(_0x2b1b9e=process['env']){const _0xdd6145=_0x21c7;return{'envBaseUrl':_0x2b1b9e[_0xdd6145(0x1cb)],'envStartPath':_0x2b1b9e[_0xdd6145(0x1d0)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb64a56,_0xa0fe38){const _0x2236fb=_0x12ec,_0x3d018b=_0xb64a56();while(!![]){try{const _0x3a1aff=parseInt(_0x2236fb(0x1d5))/0x1+-parseInt(_0x2236fb(0x1d3))/0x2+-parseInt(_0x2236fb(0x1cd))/0x3+-parseInt(_0x2236fb(0x1d6))/0x4+-parseInt(_0x2236fb(0x1da))/0x5+parseInt(_0x2236fb(0x1d0))/0x6*(-parseInt(_0x2236fb(0x1d1))/0x7)+-parseInt(_0x2236fb(0x1ce))/0x8*(-parseInt(_0x2236fb(0x1d7))/0x9);if(_0x3a1aff===_0xa0fe38)break;else _0x3d018b['push'](_0x3d018b['shift']());}catch(_0x23f9a7){_0x3d018b['push'](_0x3d018b['shift']());}}}(_0xf773,0x7c6bb));function _0xf773(){const _0x54c694=['154GUZvpK','\x20failed\x20(attempt\x20','2015332UnXzkH','cNvFJ','780977bjrrTQ','2447428xKDFzi','9049626QtjFEk','label','uXFqZ','1319015opftdh','Prhib','maxRetries','755682DEZXoQ','16ugdqHg','baseDelayMs','40134kIDyDO'];_0xf773=function(){return _0x54c694;};return _0xf773();}const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x12ec(_0x24ba3c,_0x20ae2c){_0x24ba3c=_0x24ba3c-0x1cb;const _0xf7735=_0xf773();let _0x12eced=_0xf7735[_0x24ba3c];return _0x12eced;}export async function withRetry(_0x135215,_0x3da43f){const _0x1a734f=_0x12ec,_0x47be6b={'txicT':function(_0x2e91c3,_0x5f5545){return _0x2e91c3<=_0x5f5545;},'cNvFJ':function(_0x34878b,_0xeb8475){return _0x34878b instanceof _0xeb8475;},'uXFqZ':function(_0x40a61b,_0x57abfd){return _0x40a61b<_0x57abfd;},'Prhib':function(_0x24edce,_0x2ee974){return _0x24edce+_0x2ee974;}},_0x47f1e0=_0x3da43f?.[_0x1a734f(0x1cc)]??DEFAULT_MAX_RETRIES,_0x56c833=_0x3da43f?.[_0x1a734f(0x1cf)]??DEFAULT_BASE_DELAY_MS;let _0x406048;for(let _0x1f93c4=0x0;_0x47be6b['txicT'](_0x1f93c4,_0x47f1e0);_0x1f93c4++){try{return await _0x135215();}catch(_0x555d4d){_0x406048=_0x47be6b[_0x1a734f(0x1d4)](_0x555d4d,Error)?_0x555d4d:new Error(String(_0x555d4d));if(_0x47be6b[_0x1a734f(0x1d9)](_0x1f93c4,_0x47f1e0)){const _0x431bad=_0x56c833*Math['pow'](0x2,_0x1f93c4);_0x3da43f?.[_0x1a734f(0x1d8)]&&console['error'](_0x3da43f['label']+_0x1a734f(0x1d2)+(_0x1f93c4+0x1)+'/'+_0x47be6b[_0x1a734f(0x1cb)](_0x47f1e0,0x1)+'),\x20retrying\x20in\x20'+_0x431bad+'ms...'),await new Promise(_0x1ab77e=>setTimeout(_0x1ab77e,_0x431bad));}}}throw _0x406048;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x6aa2(_0x1ee61b,_0x3b49f){_0x1ee61b=_0x1ee61b-0x199;const _0xb98bc3=_0xb98b();let _0x6aa23=_0xb98bc3[_0x1ee61b];return _0x6aa23;}(function(_0x1b0f85,_0x375306){const _0x236b0=_0x6aa2,_0x27ba63=_0x1b0f85();while(!![]){try{const _0x229122=-parseInt(_0x236b0(0x19f))/0x1*(-parseInt(_0x236b0(0x1a7))/0x2)+-parseInt(_0x236b0(0x1a2))/0x3+-parseInt(_0x236b0(0x1a4))/0x4+parseInt(_0x236b0(0x199))/0x5*(-parseInt(_0x236b0(0x19b))/0x6)+-parseInt(_0x236b0(0x19e))/0x7+parseInt(_0x236b0(0x1a5))/0x8*(parseInt(_0x236b0(0x19c))/0x9)+parseInt(_0x236b0(0x1a1))/0xa;if(_0x229122===_0x375306)break;else _0x27ba63['push'](_0x27ba63['shift']());}catch(_0x500e74){_0x27ba63['push'](_0x27ba63['shift']());}}}(_0xb98b,0x696e8));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0xc15544){const _0x3d8eaa=_0x6aa2,_0x1aa12e=new Set();for(const _0x108422 of _0xc15544[_0x3d8eaa(0x19a)](ABSOLUTE_URL_PATTERN)){const _0x2d40ab=_0x108422[0x0][_0x3d8eaa(0x1a0)](/[.,;:!?]+$/,'');try{_0x1aa12e[_0x3d8eaa(0x19d)](new URL(_0x2d40ab)[_0x3d8eaa(0x1a3)]);}catch{}}return[..._0x1aa12e];}export function findScenarioOriginMismatches(_0x49bea9,_0x3375cc){const _0x3c9102=_0x6aa2;let _0x134819;try{_0x134819=new URL(_0x3375cc)['origin'];}catch{return[];}return extractUrlOrigins(_0x49bea9)[_0x3c9102(0x1a6)](_0x265fe6=>_0x265fe6!==_0x134819);}function _0xb98b(){const _0x36ff11=['17477030SVXfYn','627213CpKGHG','origin','3209728nWnLid','865376ThpSei','filter','43360RLXKAR','655uRGLbI','matchAll','25566IVUqfZ','18BwqdjI','add','3986815zqjWJq','28xUMqIl','replace'];_0xb98b=function(){return _0x36ff11;};return _0xb98b();}
|
|
@@ -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 _0x549b38=_0x1cbf;(function(_0x57842c,_0x384826){const _0x2ca912=_0x1cbf,_0x1d548b=_0x57842c();while(!![]){try{const _0x595258=-parseInt(_0x2ca912(0xc9))/0x1+-parseInt(_0x2ca912(0xc4))/0x2*(parseInt(_0x2ca912(0xc6))/0x3)+parseInt(_0x2ca912(0xc8))/0x4+parseInt(_0x2ca912(0xbe))/0x5*(parseInt(_0x2ca912(0xa7))/0x6)+parseInt(_0x2ca912(0xbf))/0x7+-parseInt(_0x2ca912(0xba))/0x8*(-parseInt(_0x2ca912(0xc3))/0x9)+parseInt(_0x2ca912(0xd1))/0xa*(parseInt(_0x2ca912(0xb0))/0xb);if(_0x595258===_0x384826)break;else _0x1d548b['push'](_0x1d548b['shift']());}catch(_0x4a50d7){_0x1d548b['push'](_0x1d548b['shift']());}}}(_0x5c2a,0x5606b));import*as _0x1a10f2 from'fs';import*as _0x277256 from'path';import*as _0x49e90b from'os';import{execSync}from'child_process';const CACHE_FILE=_0x277256['join'](_0x49e90b[_0x549b38(0xcf)](),'.claude',_0x549b38(0xbc));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x58468d=_0x549b38,_0x59775b={'pPXJH':'utf-8','ZqdlW':function(_0x1d27ec){return _0x1d27ec();}};try{if(_0x1a10f2[_0x58468d(0xb8)](CACHE_FILE)){const _0x48e218=JSON['parse'](_0x1a10f2['readFileSync'](CACHE_FILE,_0x59775b[_0x58468d(0xaf)]));return{'version':0x3,'sessions':_0x48e218[_0x58468d(0xae)]||{},'branches':_0x48e218['branches']||{},'lastEnabledSessionClearedAt':_0x48e218[_0x58468d(0xca)]};}}catch{}return _0x59775b['ZqdlW'](createEmptyCache);}function saveCache(_0x1f3f41){const _0x5a14e8=_0x549b38;try{const _0x1abd51=_0x277256['dirname'](CACHE_FILE);!_0x1a10f2[_0x5a14e8(0xb8)](_0x1abd51)&&_0x1a10f2['mkdirSync'](_0x1abd51,{'recursive':!![]}),_0x1a10f2['writeFileSync'](CACHE_FILE,JSON[_0x5a14e8(0xa9)](_0x1f3f41,null,0x2));}catch{}}export function getCurrentBranch(){const _0x30b067=_0x549b38,_0x1168ce={'IgUVs':function(_0xe42b4f,_0x13b2ef,_0x1aefa9){return _0xe42b4f(_0x13b2ef,_0x1aefa9);},'obkJb':_0x30b067(0xb3),'QhCmQ':_0x30b067(0xb1),'QRIgH':function(_0x516b0a,_0x5307c8){return _0x516b0a===_0x5307c8;},'KrAdu':'HEAD'};try{const _0x57d75f=_0x1168ce[_0x30b067(0xc0)](execSync,_0x1168ce['obkJb'],{'encoding':_0x30b067(0xcc),'stdio':[_0x1168ce['QhCmQ'],_0x30b067(0xb1),_0x1168ce[_0x30b067(0xa3)]]})[_0x30b067(0xa1)]();if(!_0x57d75f||_0x1168ce[_0x30b067(0xd2)](_0x57d75f,_0x1168ce[_0x30b067(0xaa)]))return null;return _0x57d75f;}catch{return null;}}export function enableBranch(_0x5b081b){const _0x17b345=_0x549b38,_0xc3383={'xWxzu':function(_0x17cef2){return _0x17cef2();}},_0x5c93be=_0xc3383[_0x17b345(0xc5)](loadCache);_0x5c93be[_0x17b345(0xa4)][_0x5b081b]=!![],saveCache(_0x5c93be);}export function disableBranch(_0x522b0d){const _0x513adb=_0x549b38,_0x16e10b={'vNTEQ':function(_0x122755){return _0x122755();}},_0x28794c=_0x16e10b['vNTEQ'](loadCache);delete _0x28794c[_0x513adb(0xa4)][_0x522b0d],saveCache(_0x28794c);}export function isBranchEnabled(_0x480458){const _0x55d09c=loadCache();return _0x55d09c['branches'][_0x480458]===!![];}function getOrCreateSession(_0x35e40f,_0x549665){const _0x43224d=_0x549b38;return!_0x35e40f[_0x43224d(0xae)][_0x549665]&&(_0x35e40f[_0x43224d(0xae)][_0x549665]={}),_0x35e40f[_0x43224d(0xae)][_0x549665];}export function enableSession(_0x593b7a){const _0x56bed4=_0x549b38,_0x52bd4f={'wSVHB':function(_0x5f4346){return _0x5f4346();},'tnqxD':function(_0x53e186,_0x2d0aae,_0x16e769){return _0x53e186(_0x2d0aae,_0x16e769);},'kBrxH':_0x56bed4(0xa6),'UqnCg':function(_0x32754e,_0x1690ad){return _0x32754e!==_0x1690ad;},'QspGl':'master'},_0x3922f3=_0x52bd4f['wSVHB'](loadCache),_0x468770=_0x52bd4f['tnqxD'](getOrCreateSession,_0x3922f3,_0x593b7a);_0x468770[_0x56bed4(0xce)]=!![];const _0x419f31=_0x52bd4f[_0x56bed4(0xc1)](getCurrentBranch);_0x419f31&&_0x419f31!==_0x52bd4f['kBrxH']&&_0x52bd4f['UqnCg'](_0x419f31,_0x52bd4f['QspGl'])&&(_0x3922f3['branches'][_0x419f31]=!![],_0x468770['currentBranch']=_0x419f31),saveCache(_0x3922f3);}export function isSessionEnabled(_0x42510d){const _0x3e619a=_0x549b38,_0x28f9f4={'DdyGe':function(_0x57007d){return _0x57007d();},'uqMcr':_0x3e619a(0xbb),'QIheT':function(_0x20e0da,_0x30741e){return _0x20e0da===_0x30741e;}},_0x5ceb0f=loadCache(),_0x5b48a=_0x28f9f4['DdyGe'](getCurrentBranch);if(!_0x5b48a||_0x5b48a==='main'||_0x5b48a===_0x28f9f4['uqMcr'])return _0x28f9f4['QIheT'](_0x5ceb0f['sessions'][_0x42510d]?.['enabled'],!![]);const _0x2eff3f=_0x5ceb0f[_0x3e619a(0xa4)][_0x5b48a]===!![],_0x5eea0b=_0x28f9f4['QIheT'](_0x5ceb0f['sessions'][_0x42510d]?.['enabled'],!![]);return _0x2eff3f||_0x5eea0b;}export function disableSession(_0x112c63){const _0x5bfb36=_0x549b38,_0x4e4b38={'Ijsey':function(_0x2553c5){return _0x2553c5();},'nPJrj':function(_0x1ee86e,_0x5e36bf,_0x7294e4){return _0x1ee86e(_0x5e36bf,_0x7294e4);}},_0x51166f=_0x4e4b38[_0x5bfb36(0xb2)](loadCache),_0xdb718a=_0x4e4b38[_0x5bfb36(0xb4)](getOrCreateSession,_0x51166f,_0x112c63);_0xdb718a['enabled']=![],saveCache(_0x51166f);}export function updateBranchTracking(_0x1b647c){const _0x5aec07=_0x549b38,_0x23cb01={'RkWOJ':function(_0x31181d){return _0x31181d();},'eoUTm':function(_0x52a17c,_0x260aeb){return _0x52a17c===_0x260aeb;},'zHLeO':_0x5aec07(0xa6),'TKfQT':function(_0x1501de,_0x3db720){return _0x1501de===_0x3db720;},'Reurs':function(_0x18139d,_0x43ac5d){return _0x18139d!==_0x43ac5d;},'BMiIG':function(_0x2a3751,_0xf92690){return _0x2a3751(_0xf92690);}},_0x8f8cc4=loadCache(),_0x17a670=_0x8f8cc4['sessions'][_0x1b647c];if(!_0x17a670?.[_0x5aec07(0xce)])return;const _0x2b9762=_0x23cb01['RkWOJ'](getCurrentBranch);if(!_0x2b9762||_0x23cb01[_0x5aec07(0xab)](_0x2b9762,_0x23cb01['zHLeO'])||_0x23cb01['TKfQT'](_0x2b9762,_0x5aec07(0xbb)))return;_0x23cb01['Reurs'](_0x17a670['currentBranch'],_0x2b9762)&&(_0x8f8cc4[_0x5aec07(0xa4)][_0x2b9762]=!![],_0x17a670['currentBranch']=_0x2b9762,_0x23cb01[_0x5aec07(0xc7)](saveCache,_0x8f8cc4));}function _0x1cbf(_0xa03484,_0x27a25e){_0xa03484=_0xa03484-0xa1;const _0x5c2af7=_0x5c2a();let _0x1cbf59=_0x5c2af7[_0xa03484];return _0x1cbf59;}export function initBranchTracking(_0x3fa426){const _0x21ba13=_0x549b38,_0x3fac8a={'pILPk':function(_0x50b5fa){return _0x50b5fa();},'IPYDU':function(_0x597190,_0x373d1e){return _0x597190===_0x373d1e;},'uTxaL':_0x21ba13(0xbb),'XyGvb':function(_0x5d0010,_0x4f63d3){return _0x5d0010===_0x4f63d3;},'sLZOd':function(_0x2eee5e,_0xdce963,_0x3f3188){return _0x2eee5e(_0xdce963,_0x3f3188);},'CYwIt':function(_0x11cbc3,_0x3d58d6){return _0x11cbc3(_0x3d58d6);}},_0x41d518=loadCache(),_0x9d22fe=_0x3fac8a[_0x21ba13(0xcd)](getCurrentBranch);if(!_0x9d22fe||_0x9d22fe===_0x21ba13(0xa6)||_0x3fac8a['IPYDU'](_0x9d22fe,_0x3fac8a['uTxaL']))return;if(_0x3fac8a['XyGvb'](_0x41d518['branches'][_0x9d22fe],!![])){const _0x5f38be=_0x3fac8a[_0x21ba13(0xad)](getOrCreateSession,_0x41d518,_0x3fa426);_0x5f38be['enabled']=!![],_0x5f38be[_0x21ba13(0xb6)]=_0x9d22fe,_0x3fac8a[_0x21ba13(0xa5)](saveCache,_0x41d518);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x27b212){const _0x173c57=_0x549b38,_0xc1e732={'AcrdP':function(_0x2131e1){return _0x2131e1();}},_0x587832=_0xc1e732['AcrdP'](loadCache),_0x1f89ab=_0x587832['sessions'][_0x27b212];_0x1f89ab?.[_0x173c57(0xce)]&&(_0x587832['lastEnabledSessionClearedAt']=Date[_0x173c57(0xd0)](),saveCache(_0x587832));}export function shouldAutoEnableAfterClear(_0x37e10d){const _0x2e77c7=_0x549b38,_0x196b26={'VXmPm':function(_0xcc7c4e,_0x27cff7){return _0xcc7c4e!==_0x27cff7;},'SdBro':_0x2e77c7(0xac),'tVUjs':function(_0x5336d7,_0x3f26ba){return _0x5336d7-_0x3f26ba;},'eNmKL':function(_0x4800fa,_0x119cc5){return _0x4800fa<=_0x119cc5;}};if(_0x196b26['VXmPm'](_0x37e10d,_0x196b26['SdBro']))return![];const _0x492a32=loadCache(),_0x278a1a=_0x492a32[_0x2e77c7(0xca)];if(!_0x278a1a)return![];const _0x4144f8=_0x196b26['tVUjs'](Date[_0x2e77c7(0xd0)](),_0x278a1a);return _0x196b26[_0x2e77c7(0xc2)](_0x4144f8,CLEAR_AUTO_ENABLE_WINDOW_MS);}function _0x5c2a(){const _0x28b150=['homedir','now','138610mTNcJo','QRIgH','trim','featureId','QhCmQ','branches','CYwIt','main','2133654HBhOrj','zKPwA','stringify','KrAdu','eoUTm','clear','sLZOd','sessions','pPXJH','88qJEKGM','pipe','Ijsey','git\x20rev-parse\x20--abbrev-ref\x20HEAD','nPJrj','TLanx','currentBranch','rTqeo','existsSync','IMzLI','8bODQmJ','master','.ranger_cache.json','prompted','5WqJObV','754257TFIlaQ','IgUVs','wSVHB','eNmKL','173934KXReLF','833324qErrPi','xWxzu','3USnNic','BMiIG','2621316leEkKA','479878QJMCGl','lastEnabledSessionClearedAt','xALro','utf-8','pILPk','enabled'];_0x5c2a=function(){return _0x28b150;};return _0x5c2a();}export function autoEnableAfterClear(_0x3a701e){const _0x340e5b=_0x549b38,_0x4da57d={'TLanx':function(_0x2e7b74){return _0x2e7b74();},'qMGvt':'main','CETpb':function(_0x3a0293,_0x5c7a43){return _0x3a0293!==_0x5c7a43;},'PQsqO':_0x340e5b(0xbb)},_0xe32a7c=_0x4da57d[_0x340e5b(0xb5)](loadCache),_0x208788=getOrCreateSession(_0xe32a7c,_0x3a701e);_0x208788['enabled']=!![];const _0x204a20=_0x4da57d[_0x340e5b(0xb5)](getCurrentBranch);_0x204a20&&_0x204a20!==_0x4da57d['qMGvt']&&_0x4da57d['CETpb'](_0x204a20,_0x4da57d['PQsqO'])&&(_0x208788[_0x340e5b(0xb6)]=_0x204a20),delete _0xe32a7c[_0x340e5b(0xca)],saveCache(_0xe32a7c);}export function registerSession(_0x43c0db,_0x5e5533){const _0x255f72={'LtJUk':function(_0xe1f2ec){return _0xe1f2ec();},'jAhge':function(_0x182c63,_0x3f8b2b,_0x1ce0aa){return _0x182c63(_0x3f8b2b,_0x1ce0aa);}},_0x4c7296=_0x255f72['LtJUk'](loadCache),_0x5988e6=_0x255f72['jAhge'](getOrCreateSession,_0x4c7296,_0x43c0db);_0x5988e6['featureId']=_0x5e5533,_0x5988e6['registeredAt']=new Date()['toISOString'](),saveCache(_0x4c7296);}export function getSessionEntry(_0x293c6d){const _0x31bb07=_0x549b38,_0xbc293d=loadCache(),_0x593ed0=_0xbc293d[_0x31bb07(0xae)][_0x293c6d];if(_0x593ed0?.['featureId']&&_0x593ed0?.['registeredAt'])return{'featureId':_0x593ed0['featureId'],'registeredAt':_0x593ed0['registeredAt']};return null;}export function unregisterSession(_0x625c11){const _0x59519a=_0x549b38,_0xe7a546={'rTqeo':function(_0x26af60){return _0x26af60();}},_0x34236f=_0xe7a546[_0x59519a(0xb7)](loadCache),_0x546507=_0x34236f['sessions'][_0x625c11];_0x546507&&(delete _0x546507[_0x59519a(0xa2)],delete _0x546507['registeredAt'],saveCache(_0x34236f));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xc0f06d){const _0x5a78b0=_0x549b38,_0x53741b={'IMzLI':function(_0x5f3045,_0x38a452,_0x1bf438){return _0x5f3045(_0x38a452,_0x1bf438);},'FSKBr':function(_0x33cea6,_0x3d497f){return _0x33cea6>=_0x3d497f;},'xALro':function(_0x47ea13,_0x389ef2){return _0x47ea13-_0x389ef2;},'Ufpjy':function(_0x5ad77a,_0x555db5){return _0x5ad77a(_0x555db5);}},_0x5b9087=loadCache(),_0x4a31ab=_0x53741b[_0x5a78b0(0xb9)](getOrCreateSession,_0x5b9087,_0xc0f06d),_0x29daed=_0x4a31ab['lastPlanReminderAt']||0x0,_0x500954=Date[_0x5a78b0(0xd0)]();if(_0x53741b['FSKBr'](_0x53741b[_0x5a78b0(0xcb)](_0x500954,_0x29daed),PLAN_REMINDER_INTERVAL_MS))return _0x4a31ab['lastPlanReminderAt']=_0x500954,_0x53741b['Ufpjy'](saveCache,_0x5b9087),!![];return![];}export function shouldShowStopReminder(_0x566fd7){const _0xa9e31b=_0x549b38,_0x2ed39a={'zKPwA':function(_0x106f5f){return _0x106f5f();},'WOIVu':function(_0x2dad81,_0x10b9fc,_0x4304d9){return _0x2dad81(_0x10b9fc,_0x4304d9);},'Ikepc':function(_0x43c182,_0x4b20f9){return _0x43c182-_0x4b20f9;}},_0x1628dc=_0x2ed39a[_0xa9e31b(0xa8)](loadCache),_0x1b8736=_0x2ed39a['WOIVu'](getOrCreateSession,_0x1628dc,_0x566fd7),_0x4e8673=_0x1b8736['lastStopReminderAt']||0x0,_0x4b8133=Date[_0xa9e31b(0xd0)]();if(_0x2ed39a['Ikepc'](_0x4b8133,_0x4e8673)>=STOP_REMINDER_INTERVAL_MS)return _0x1b8736['lastStopReminderAt']=_0x4b8133,saveCache(_0x1628dc),!![];return![];}export function hasSessionBeenPrompted(_0x4e2ffe){const _0xb3e142=_0x549b38,_0x4df3b8={'Ipjsg':function(_0x1dfa65,_0x14952d){return _0x1dfa65===_0x14952d;}},_0x459a9b=loadCache();return _0x4df3b8['Ipjsg'](_0x459a9b[_0xb3e142(0xae)][_0x4e2ffe]?.['prompted'],!![]);}export function markSessionPrompted(_0x49dca0){const _0x4cf6e2=_0x549b38,_0x1d2de5=loadCache(),_0x47c1f1=getOrCreateSession(_0x1d2de5,_0x49dca0);_0x47c1f1[_0x4cf6e2(0xbd)]=!![],saveCache(_0x1d2de5);}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 _0xf14d6=_0x40ab;(function(_0xd6b125,_0x3e526e){const _0x5d16c0=_0x40ab,_0x253a19=_0xd6b125();while(!![]){try{const _0x5ebcf0=parseInt(_0x5d16c0(0x1c4))/0x1*(parseInt(_0x5d16c0(0x1ef))/0x2)+parseInt(_0x5d16c0(0x209))/0x3+-parseInt(_0x5d16c0(0x246))/0x4+-parseInt(_0x5d16c0(0x1c6))/0x5+-parseInt(_0x5d16c0(0x1dd))/0x6*(parseInt(_0x5d16c0(0x1ff))/0x7)+-parseInt(_0x5d16c0(0x243))/0x8+-parseInt(_0x5d16c0(0x1e6))/0x9*(-parseInt(_0x5d16c0(0x1c3))/0xa);if(_0x5ebcf0===_0x3e526e)break;else _0x253a19['push'](_0x253a19['shift']());}catch(_0x29b2ae){_0x253a19['push'](_0x253a19['shift']());}}}(_0x355e,0xe344d));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';function _0x40ab(_0x535315,_0x587872){_0x535315=_0x535315-0x1bf;const _0x355e7b=_0x355e();let _0x40abc1=_0x355e7b[_0x535315];return _0x40abc1;}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(_0x247abd,_0x244276){const _0x2a458f=_0x40ab,_0x146bf4={'EPDKm':_0x2a458f(0x24c),'xNcmP':function(_0x3235d4,_0x49f52b,_0x785994){return _0x3235d4(_0x49f52b,_0x785994);},'OoJoU':function(_0x4f8008,_0x329962,_0x2accde){return _0x4f8008(_0x329962,_0x2accde);},'dDCBU':function(_0x4364d7,_0x1b57fb){return _0x4364d7(_0x1b57fb);}},_0xa955fa=join(_0x244276,'ci',_0x247abd),_0x6aa6f1=join(_0x244276,_0x146bf4['EPDKm'],_0x247abd),_0x166415=_0x146bf4[_0x2a458f(0x215)](join,_0x244276,_0x247abd),_0x116469=join(_0x244276,_0x2a458f(0x24c)),_0x17fc0f=_0x146bf4['OoJoU'](join,_0x244276,'ci');if(existsSync(_0xa955fa))return _0xa955fa;if(_0x146bf4['dDCBU'](existsSync,_0x6aa6f1))return _0x6aa6f1;if(existsSync(_0x166415)&&(_0x166415!==_0x116469&&_0x166415!==_0x17fc0f?!![]:_0x146bf4[_0x2a458f(0x1e7)](hasLegacyProfileFiles,_0x166415)))return _0x166415;return null;}export function getEnvDir(_0x4b2f8d,_0x32e105={}){const _0x42a11c=_0x40ab,_0x1642ee={'JkTol':function(_0x413d51,_0x8fbdaf,_0x3d7c7c){return _0x413d51(_0x8fbdaf,_0x3d7c7c);},'XxkvC':function(_0x2a24e2,_0x2a52c7){return _0x2a24e2!==_0x2a52c7;},'CkVIY':function(_0x30774c,_0x90af48,_0xdba4e3,_0x37d33d){return _0x30774c(_0x90af48,_0xdba4e3,_0x37d33d);},'GwlQF':'local','pNInb':function(_0x22ab34,_0x224a2f,_0x298393){return _0x22ab34(_0x224a2f,_0x298393);}},_0x1d97e5=getRangerDir(),_0x53208a=_0x1642ee['JkTol'](findEnvInRoot,_0x4b2f8d,_0x1d97e5);if(_0x53208a){if(_0x32e105['forWrite']&&isLegacyEnvPath(_0x53208a))throw _0x1642ee[_0x42a11c(0x238)](legacyWriteError,_0x4b2f8d,_0x53208a);return _0x53208a;}const _0xcb6630=getRangerHomeDir();if(_0x1642ee['XxkvC'](_0xcb6630,_0x1d97e5)){const _0x58a390=findEnvInRoot(_0x4b2f8d,_0xcb6630);if(_0x58a390){if(_0x32e105[_0x42a11c(0x242)]&&isLegacyEnvPath(_0x58a390))throw legacyWriteError(_0x4b2f8d,_0x58a390);return _0x58a390;}}const _0xf9396c=_0x1642ee['CkVIY'](join,_0xcb6630,_0x1642ee[_0x42a11c(0x1d7)],_0x4b2f8d);if(_0x32e105[_0x42a11c(0x242)])throw _0x1642ee[_0x42a11c(0x248)](legacyWriteError,_0x4b2f8d,_0xf9396c);return _0xf9396c;}function isLegacyEnvPath(_0x1880e6){const _0x35ea59=_0x40ab,_0x3dc4a3={'yqhIy':function(_0x4bab9b){return _0x4bab9b();},'HhuBb':function(_0x10771b){return _0x10771b();},'lUrOP':function(_0x53f5d7,_0x4ea407){return _0x53f5d7===_0x4ea407;}},_0x1eb556=_0x3dc4a3['yqhIy'](getRangerDir),_0x1ff378=_0x3dc4a3[_0x35ea59(0x235)](getRangerHomeDir);for(const _0x5f067e of new Set([_0x1eb556,_0x1ff378])){const _0x156620=_0x5f067e['endsWith']('/')?_0x5f067e:_0x5f067e+'/';if(_0x3dc4a3[_0x35ea59(0x20a)](_0x1880e6,_0x5f067e)||_0x1880e6[_0x35ea59(0x1cd)](_0x156620))return!![];}return![];}function legacyWriteError(_0x4f0a9a,_0x410be1){const _0xb8f976=_0x40ab,_0x41d547={'NSxmi':function(_0x5ce0ae,_0x32f340){return _0x5ce0ae+_0x32f340;}};return new Error(_0x41d547[_0xb8f976(0x21c)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x4f0a9a+_0xb8f976(0x1bf)+_0x410be1+'.\x0a'+_0xb8f976(0x23c),_0xb8f976(0x233))+_0xb8f976(0x1f2));}export function findExistingEnv(_0x54f2a6,_0x53c6bc){const _0x3c49f5=_0x40ab,_0x4ade6e={'OYueU':function(_0x35c207){return _0x35c207();},'oGXXt':function(_0x251930){return _0x251930();},'wwszK':'local','BxLKo':'legacy','yNkkR':function(_0x342fa6,_0x51819b,_0x13f0a9){return _0x342fa6(_0x51819b,_0x13f0a9);},'AYExU':function(_0x151bd1,_0x163156){return _0x151bd1===_0x163156;},'SDjDx':function(_0x4338cd,_0x5d197d){return _0x4338cd(_0x5d197d);}},_0x474ebf=_0x53c6bc?.['rangerDir'],_0x230e42=_0x474ebf?[_0x474ebf]:[_0x4ade6e[_0x3c49f5(0x1ec)](getRangerDir),_0x4ade6e['oGXXt'](getRangerHomeDir)]['filter']((_0x5248b8,_0xc2b990,_0x4fc539)=>_0x4fc539['indexOf'](_0x5248b8)===_0xc2b990),_0x2e5353=_0x53c6bc?.['locations']??['ci',_0x4ade6e[_0x3c49f5(0x1f0)],_0x4ade6e[_0x3c49f5(0x1c0)]];for(const _0x473a85 of _0x230e42){const _0xa7787a=_0x4ade6e[_0x3c49f5(0x225)](join,_0x473a85,_0x3c49f5(0x24c)),_0x5f1279=join(_0x473a85,'ci'),_0x58a01f=[{'location':'ci','path':join(_0x473a85,'ci',_0x54f2a6)},{'location':_0x3c49f5(0x24c),'path':join(_0x473a85,_0x4ade6e[_0x3c49f5(0x1f0)],_0x54f2a6)},{'location':_0x3c49f5(0x1c1),'path':join(_0x473a85,_0x54f2a6)}];for(const _0x4676e0 of _0x58a01f){if(_0x2e5353['includes'](_0x4676e0[_0x3c49f5(0x1ea)])&&existsSync(_0x4676e0[_0x3c49f5(0x220)])){if(_0x4ade6e['AYExU'](_0x4676e0['location'],_0x3c49f5(0x1c1))&&(_0x4676e0['path']===_0xa7787a||_0x4676e0['path']===_0x5f1279)&&!_0x4ade6e['SDjDx'](hasLegacyProfileFiles,_0x4676e0['path']))continue;return{'path':_0x4676e0[_0x3c49f5(0x220)],'location':_0x4676e0['location']};}}}return null;}function hasLegacyProfileFiles(_0x3512bb){const _0x29c5ff=_0x40ab,_0x169d44={'lngLW':function(_0x2916d4,_0x1395c8){return _0x2916d4(_0x1395c8);},'tbreH':function(_0x59dbd9,_0x460873){return _0x59dbd9(_0x460873);},'soOGG':function(_0x66d57e,_0x395a7a,_0x3027b1){return _0x66d57e(_0x395a7a,_0x3027b1);},'elRcm':_0x29c5ff(0x212),'zlAKE':function(_0x307621,_0x4dec05,_0x4ea6b3){return _0x307621(_0x4dec05,_0x4ea6b3);},'XDhpB':_0x29c5ff(0x1f6)};return _0x169d44['lngLW'](existsSync,join(_0x3512bb,'settings.json'))||_0x169d44[_0x29c5ff(0x1f3)](existsSync,_0x169d44[_0x29c5ff(0x1f9)](join,_0x3512bb,_0x169d44[_0x29c5ff(0x1c7)]))||_0x169d44['lngLW'](existsSync,_0x169d44['zlAKE'](join,_0x3512bb,_0x169d44[_0x29c5ff(0x1d0)]));}export function isEnvCi(_0x12ff06){const _0x3b1bae={'ZKctb':function(_0x3e1f46,_0x2e7a28){return _0x3e1f46(_0x2e7a28);},'CODVI':function(_0x4cc362){return _0x4cc362();},'rCbRK':function(_0x843ac7,_0x18faf3){return _0x843ac7(_0x18faf3);}};if(_0x3b1bae['ZKctb'](existsSync,join(_0x3b1bae['CODVI'](getRangerDir),'ci',_0x12ff06)))return!![];const _0x507a8a=getRangerHomeDir();if(_0x507a8a!==getRangerDir()&&_0x3b1bae['rCbRK'](existsSync,join(_0x507a8a,'ci',_0x12ff06)))return!![];return![];}export async function cleanupTempFiles(_0x24f9b6){const _0x260769=_0x40ab,_0x2b46c4={'OgFjY':function(_0x2faf99,_0x27c491){return _0x2faf99!==_0x27c491;},'dthxu':_0x260769(0x21d)},_0x22227f=[_0x24f9b6['tempAuthPath'],_0x24f9b6[_0x260769(0x204)]]['filter'](Boolean);await Promise['all'](_0x22227f['map'](_0x48fe1d=>unlink(_0x48fe1d)[_0x260769(0x1f7)](_0xeadc27=>{const _0x1a6f1c=_0x260769;_0x2b46c4['OgFjY'](_0xeadc27[_0x1a6f1c(0x1ee)],_0x2b46c4[_0x1a6f1c(0x224)])&&console['warn'](_0x1a6f1c(0x1e0)+_0x48fe1d+':',_0xeadc27['message']);})));}export function getSettingsPath(_0x60cd9){const _0x1d71e1=_0x40ab,_0x1b511b={'IOIOC':function(_0x214d91,_0x1653b2,_0x19c395){return _0x214d91(_0x1653b2,_0x19c395);},'aosLA':function(_0x52bf60,_0x5c900a){return _0x52bf60(_0x5c900a);}};return _0x1b511b['IOIOC'](join,_0x1b511b[_0x1d71e1(0x1d4)](getEnvDir,_0x60cd9),_0x1d71e1(0x201));}export async function loadSettings(_0x31c479){const _0x442b46=_0x40ab,_0xf430dd={'MrEee':function(_0x45b6d0,_0x407e27){return _0x45b6d0(_0x407e27);},'XGdIp':function(_0x1ec9fd,_0x4100ad,_0x1628ea){return _0x1ec9fd(_0x4100ad,_0x1628ea);}},_0x4d9bd8=_0xf430dd['MrEee'](getSettingsPath,_0x31c479);if(!existsSync(_0x4d9bd8))return{};try{const _0x5147ef=await _0xf430dd[_0x442b46(0x1de)](readFile,_0x4d9bd8,'utf-8');return JSON[_0x442b46(0x226)](_0x5147ef);}catch{return{};}}export async function saveSettings(_0x246de1,_0x38a1da){const _0x152073=_0x40ab,_0x37d1b6={'jJqUi':function(_0x102e89,_0x43b014){return _0x102e89(_0x43b014);},'XXvLk':function(_0x5265f9,_0x19574a,_0x282c42){return _0x5265f9(_0x19574a,_0x282c42);}},_0x3fa79b=getSettingsPath(_0x246de1),_0x553d8e=_0x37d1b6['jJqUi'](dirname,_0x3fa79b);!existsSync(_0x553d8e)&&await _0x37d1b6[_0x152073(0x1d1)](mkdir,_0x553d8e,{'recursive':!![]}),await _0x37d1b6[_0x152073(0x1d1)](writeFile,_0x3fa79b,JSON[_0x152073(0x23f)](_0x38a1da,null,0x2));}export function resolveEnvVars(_0x44a577){const _0x35cb2a=_0x40ab,_0x37e55e={'PtyWl':function(_0x43d948,_0xc607f0){return _0x43d948===_0xc607f0;},'qlCKK':_0x35cb2a(0x22b)};if(typeof _0x44a577===_0x37e55e['qlCKK'])return _0x44a577[_0x35cb2a(0x214)](/\$\{(\w+)\}/g,(_0x3f0b59,_0x173ad6)=>{const _0x4ab849=_0x35cb2a,_0x5482ba=process['env'][_0x173ad6];if(_0x37e55e[_0x4ab849(0x222)](_0x5482ba,undefined))throw new Error('Environment\x20variable\x20'+_0x173ad6+_0x4ab849(0x234));return _0x5482ba;});if(Array[_0x35cb2a(0x23d)](_0x44a577))return _0x44a577[_0x35cb2a(0x20c)](resolveEnvVars);if(_0x44a577&&typeof _0x44a577===_0x35cb2a(0x236))return Object[_0x35cb2a(0x239)](Object[_0x35cb2a(0x1dc)](_0x44a577)['map'](([_0x47d581,_0x2be022])=>[_0x47d581,resolveEnvVars(_0x2be022)]));return _0x44a577;}const isRecord=_0xa3634c=>typeof _0xa3634c===_0xf14d6(0x236)&&_0xa3634c!==null&&!Array['isArray'](_0xa3634c),asRecord=_0x44ae28=>isRecord(_0x44ae28)?_0x44ae28:undefined,mergeHeaders=(_0x4f2efb,_0x2dc2dd)=>{const _0x30c0f3=_0xf14d6,_0x5df38b={'rbOOt':function(_0x3c9914,_0x34a34c){return _0x3c9914??_0x34a34c;}},_0x2b187e={..._0x5df38b[_0x30c0f3(0x21b)](_0x4f2efb,{}),..._0x2dc2dd??{}};return Object[_0x30c0f3(0x23b)](_0x2b187e)[_0x30c0f3(0x23e)]?_0x2b187e:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x2973c0,_0x31c4c2={}){const _0x2b555b=_0xf14d6,_0x57b9d3={'oNYqy':function(_0xf77bca,_0x42b2b5){return _0xf77bca(_0x42b2b5);},'EyVvo':'boolean','aQHua':function(_0x49559f,_0x30e87c){return _0x49559f(_0x30e87c);},'qhBwN':function(_0x4c7a86,_0x516640){return _0x4c7a86===_0x516640;},'FlUxO':'string'},_0x1ce99a=asRecord(_0x2973c0['browser']),_0x6eba62={..._0x57b9d3[_0x2b555b(0x1f1)](asRecord,_0x1ce99a?.[_0x2b555b(0x1d6)])??{}};typeof _0x31c4c2['headless']===_0x57b9d3['EyVvo']&&(_0x6eba62[_0x2b555b(0x1d8)]=_0x31c4c2[_0x2b555b(0x1d8)]);if(_0x2973c0['safeMode']){const _0xb6548e=_0x6eba62[_0x2b555b(0x22c)]??[],_0x5a4943=SAFE_MODE_ARGS[_0x2b555b(0x22f)](_0x551c63=>!_0xb6548e['includes'](_0x551c63));_0x6eba62[_0x2b555b(0x22c)]=[..._0xb6548e,..._0x5a4943];}if(_0x2973c0['allowInsecureLocalhost']){const _0x5365e4=_0x6eba62['args']??[],_0xbc49c0=ALLOW_LOCALHOST_ARGS['filter'](_0x4c0069=>!_0x5365e4['includes'](_0x4c0069));_0x6eba62['args']=[..._0x5365e4,..._0xbc49c0];}const _0x43615a={..._0x57b9d3[_0x2b555b(0x23a)](asRecord,_0x1ce99a?.['contextOptions'])??{}};_0x43615a[_0x2b555b(0x1c9)]=!![];_0x57b9d3['qhBwN'](typeof _0x2973c0[_0x2b555b(0x213)],_0x57b9d3[_0x2b555b(0x1d2)])&&(_0x43615a['userAgent']=_0x2973c0['userAgent']);const _0x48cf9b=mergeHeaders(_0x57b9d3['aQHua'](asRecord,_0x43615a[_0x2b555b(0x223)]),asRecord(_0x2973c0['headers']));return _0x48cf9b?_0x43615a['extraHTTPHeaders']=_0x48cf9b:delete _0x43615a[_0x2b555b(0x223)],_0x31c4c2[_0x2b555b(0x1ed)]&&(_0x43615a['storageState']=_0x31c4c2['storageStatePath']),{'launchOptions':_0x6eba62,'contextOptions':_0x43615a};}export async function resolveProfileStorageState(_0x1e2336){const _0x486785=_0xf14d6,_0x1af0c5={'CVuYb':function(_0x123883,_0x2d50d3){return _0x123883(_0x2d50d3);},'kblMe':function(_0x51a222,_0x21b2eb){return _0x51a222(_0x21b2eb);}};return _0x1af0c5[_0x486785(0x1e1)](resolveLocalAuthPath,_0x1af0c5['kblMe'](getEnvDir,_0x1e2336));}async function resolveLocalAuthPath(_0x6d7ba6){const _0x576a3f=_0xf14d6,_0x33370f={'lnYve':function(_0x4a8a87,_0x5a787d,_0x12fc13){return _0x4a8a87(_0x5a787d,_0x12fc13);},'sIEXn':_0x576a3f(0x1f6),'xnncQ':function(_0x212981,_0x444aaf,_0x34d9f5){return _0x212981(_0x444aaf,_0x34d9f5);},'ERqKD':function(_0x1b39be){return _0x1b39be();},'lhKcy':_0x576a3f(0x218),'Vrdqi':function(_0x19929c,_0xfa775f){return _0x19929c(_0xfa775f);},'pVkaa':function(_0x30abb0,_0x4a9334,_0x4cec13){return _0x30abb0(_0x4a9334,_0x4cec13);},'RYfMt':function(_0x11157a,_0x440543){return _0x11157a instanceof _0x440543;}},_0x103aa0=_0x33370f[_0x576a3f(0x216)](join,_0x6d7ba6,_0x33370f['sIEXn']),_0x2e7ea1=_0x33370f['xnncQ'](join,_0x6d7ba6,'auth.json');if(existsSync(_0x103aa0))try{const _0x4e6663=await _0x33370f['ERqKD'](getToken);if(!_0x4e6663)throw new Error(_0x33370f['lhKcy']);const _0x1e69c5=await _0x33370f[_0x576a3f(0x1eb)](readFile,_0x103aa0),_0x4c7f10=decrypt(_0x1e69c5,_0x4e6663),_0xc7a1bc=_0x33370f['lnYve'](join,tmpdir(),'ranger-auth-'+Date['now']()+'.json');return await _0x33370f[_0x576a3f(0x1f4)](writeFile,_0xc7a1bc,_0x4c7f10),{'storageStatePath':_0xc7a1bc,'tempAuthPath':_0xc7a1bc};}catch(_0x119d1e){const _0x54782b=_0x33370f[_0x576a3f(0x240)](_0x119d1e,Error)?_0x119d1e['message']:_0x33370f[_0x576a3f(0x1eb)](String,_0x119d1e);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x54782b);}if(existsSync(_0x2e7ea1))return{'storageStatePath':_0x2e7ea1};return{};}export async function buildPlaywrightConfig(_0x1418ca,_0x599b73,_0x3c4739,_0x2c304a,_0xd041f6){const _0x2e6200=_0xf14d6,_0x59947e={'sbZji':function(_0x591751,_0x4fca44,_0x38add2,_0x22dce5,_0x3ad3ec,_0x25f313,_0xf8b92){return _0x591751(_0x4fca44,_0x38add2,_0x22dce5,_0x3ad3ec,_0x25f313,_0xf8b92);},'RenIJ':function(_0x328210,_0x23f175){return _0x328210(_0x23f175);},'LbMQN':_0x2e6200(0x1c2)};if(_0xd041f6)return _0x59947e['sbZji'](buildPlaywrightConfigCore,_0x1418ca,_0xd041f6,_0x599b73,_0x3c4739,_0x2c304a,_0x2e6200(0x1c2));const {storageStatePath:_0x104487,tempAuthPath:_0x1a1492}=await _0x59947e['RenIJ'](resolveLocalAuthPath,getEnvDir(_0x599b73));try{const _0x436b42=await buildPlaywrightConfigCore(_0x1418ca,_0x104487,_0x599b73,_0x3c4739,_0x2c304a,_0x59947e['LbMQN']);return{..._0x436b42,'tempAuthPath':_0x1a1492};}catch(_0x227625){_0x1a1492&&await unlink(_0x1a1492)[_0x2e6200(0x1f7)](()=>{});throw _0x227625;}}export async function buildPlaywrightConfigCore(_0x37ed0b,_0x37c135,_0x3e1829,_0x72618,_0x7deec1,_0x8560='stagehand'){const _0xc9b0bd=_0xf14d6,_0x2e70e4={'maFHP':_0xc9b0bd(0x229),'Koxhz':'--disable-setuid-sandbox','OFTRP':'chromium','zbTky':_0xc9b0bd(0x211),'gGqoL':'clipboard-write','isdTA':function(_0x520228){return _0x520228();},'pXeyI':function(_0x258dd5,_0x33cd73,_0xfc2304,_0x43d1fc){return _0x258dd5(_0x33cd73,_0xfc2304,_0x43d1fc);},'NQdky':function(_0x5a6290,_0x1c03f6){return _0x5a6290(_0x1c03f6);},'QwwkR':'playwright-cli','eVPSn':'file','hDUoH':'none','KZkCq':_0xc9b0bd(0x200),'LFHma':_0xc9b0bd(0x241),'nFZiJ':function(_0x5cfdf8,_0x110873,_0x29f5ed){return _0x5cfdf8(_0x110873,_0x29f5ed);},'Jzmrp':'ranger-config','cVQos':function(_0x38f309,_0xf04c40){return _0x38f309(_0xf04c40);},'ADkFF':_0xc9b0bd(0x228)},_0x3ce812=_0x72618||_0x2e70e4[_0xc9b0bd(0x1e5)](randomUUID),_0x2cb635=_0x2e70e4[_0xc9b0bd(0x20e)](join,getRangerDir(),'sessions',_0x3ce812),_0xe938d3=_0x2e70e4[_0xc9b0bd(0x1e8)](Boolean,_0x37ed0b['cdpEndpoint']),_0xfd42c2=_0xe938d3?{'browserName':_0x2e70e4[_0xc9b0bd(0x24a)],'cdpEndpoint':_0x37ed0b[_0xc9b0bd(0x1c5)]}:((()=>{const _0x26ec0c=_0xc9b0bd,{launchOptions:_0xe00b65,contextOptions:_0x12747a}=buildBrowserOptionsFromSettings(_0x37ed0b,{'headless':_0x7deec1?![]:_0x37ed0b[_0x26ec0c(0x1d8)]??!![],'storageStatePath':_0x37c135});if(process[_0x26ec0c(0x22e)]?.()===0x0){const _0x3cb30c=[_0x2e70e4['maFHP'],_0x2e70e4['Koxhz']],_0x16e1bf=_0xe00b65[_0x26ec0c(0x22c)]??[],_0x48cefe=_0x3cb30c['filter'](_0x4e853d=>!_0x16e1bf['includes'](_0x4e853d));_0xe00b65[_0x26ec0c(0x22c)]=[..._0x16e1bf,..._0x48cefe];}return{'isolated':!![],'browserName':_0x2e70e4[_0x26ec0c(0x24a)],'launchOptions':_0xe00b65,'contextOptions':{..._0x12747a,'permissions':[_0x2e70e4['zbTky'],_0x2e70e4['gGqoL']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x1ef078=_0x8560===_0x2e70e4[_0xc9b0bd(0x1df)]?{'browser':_0xfd42c2,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x2cb635,'outputMode':_0x2e70e4['eVPSn'],'codegen':_0x2e70e4[_0xc9b0bd(0x1fb)]}:{'name':_0x3e1829,'browser':_0xfd42c2,'capabilities':[_0x2e70e4[_0xc9b0bd(0x20f)],_0xc9b0bd(0x1d3),'vision',_0x2e70e4[_0xc9b0bd(0x247)]],'imageResponses':_0xc9b0bd(0x1db),'outputDir':_0x2cb635};if(!_0xe938d3){const _0x626057=_0x1ef078[_0xc9b0bd(0x1fe)],_0x34c6d1=_0x626057[_0xc9b0bd(0x1d9)];if(_0x34c6d1[_0xc9b0bd(0x213)]===undefined)delete _0x34c6d1['userAgent'];if(_0x34c6d1['storageState']===undefined)delete _0x34c6d1['storageState'];}const _0x3fbf73=_0x2e70e4[_0xc9b0bd(0x1f8)](join,tmpdir(),_0x2e70e4['Jzmrp']);!_0x2e70e4['cVQos'](existsSync,_0x3fbf73)&&await _0x2e70e4['nFZiJ'](mkdir,_0x3fbf73,{'recursive':!![]});const _0x285902=_0x8560==='playwright-cli'?_0x2e70e4['ADkFF']:'',_0x4b8c56=_0x2e70e4['nFZiJ'](join,_0x3fbf73,_0x3e1829+'-'+Date['now']()+_0x285902+'.json');return await writeFile(_0x4b8c56,JSON[_0xc9b0bd(0x23f)](_0x1ef078,null,0x2)),{'configPath':_0x4b8c56,'storageStatePath':_0x37c135};}export async function buildPlaywrightCliConfig(_0x1b16d9,_0x37d5d4,_0x3b03ba,_0x5eb7f5,_0x2a079c){const _0x26686b=_0xf14d6,_0x529328={'vUduB':function(_0xe89441,_0x4a3796){return _0xe89441(_0x4a3796);},'QFBZq':function(_0x2bc725,_0x40d5f2){return _0x2bc725(_0x40d5f2);},'vcJbY':function(_0x155a62,_0x2bd98d,_0x15ed39,_0x345270,_0x30af13,_0x3622d6,_0x11bb01){return _0x155a62(_0x2bd98d,_0x15ed39,_0x345270,_0x30af13,_0x3622d6,_0x11bb01);},'FrYpe':'playwright-cli'};if(_0x2a079c)return buildPlaywrightConfigCore(_0x1b16d9,_0x2a079c,_0x37d5d4,_0x3b03ba,_0x5eb7f5,_0x26686b(0x1cc));const {storageStatePath:_0x5376b4,tempAuthPath:_0x17d45e}=await _0x529328[_0x26686b(0x230)](resolveLocalAuthPath,_0x529328['QFBZq'](getEnvDir,_0x37d5d4));try{const _0x3c45b5=await _0x529328['vcJbY'](buildPlaywrightConfigCore,_0x1b16d9,_0x5376b4,_0x37d5d4,_0x3b03ba,_0x5eb7f5,_0x529328[_0x26686b(0x208)]);return{..._0x3c45b5,'tempAuthPath':_0x17d45e};}catch(_0x5256a3){_0x17d45e&&await _0x529328[_0x26686b(0x232)](unlink,_0x17d45e)['catch'](()=>{});throw _0x5256a3;}}export async function buildRangerwrightCliConfig(_0xb377a7,_0x579a26,_0x21ba9f,_0x33952d,_0xe755da){const _0x2f4136=_0xf14d6,_0xa5ac66={'DwChG':function(_0x343d8d,_0x2888c4){return _0x343d8d===_0x2888c4;},'EuwrT':_0x2f4136(0x1fc),'ZPwNg':'clipboard-read','TbUCN':function(_0x16223c,_0x431cf6){return _0x16223c(_0x431cf6);},'OEwTb':'sessions','RgQnn':_0x2f4136(0x203),'kqKOa':function(_0x1d52a2,_0x418a40,_0x4fd816){return _0x1d52a2(_0x418a40,_0x4fd816);},'UHlNz':_0x2f4136(0x1fd),'LAhQF':function(_0x38fed9,_0x2c28c0){return _0x38fed9(_0x2c28c0);}},{storageStatePath:_0x2875e7,tempAuthPath:_0x46ee06}=_0xe755da?{'storageStatePath':_0xe755da,'tempAuthPath':undefined}:await _0xa5ac66[_0x2f4136(0x206)](resolveLocalAuthPath,getEnvDir(_0x579a26)),_0x36b90f=_0x21ba9f||randomUUID(),_0x2779a7=join(getRangerDir(),_0xa5ac66[_0x2f4136(0x237)],_0x36b90f),_0x23e6f4=_0xa5ac66['TbUCN'](Boolean,_0xb377a7['cdpEndpoint']),_0x1bfeba=_0x23e6f4?{'browserName':_0xa5ac66['RgQnn'],'cdpEndpoint':_0xb377a7['cdpEndpoint']}:((()=>{const _0xf6dcd1=_0x2f4136,{launchOptions:_0x406c6e,contextOptions:_0x1389ab}=buildBrowserOptionsFromSettings(_0xb377a7,{'headless':_0x33952d?![]:_0xb377a7['headless']??!![],'storageStatePath':_0x2875e7});if(_0xa5ac66[_0xf6dcd1(0x1cf)](process[_0xf6dcd1(0x22e)]?.(),0x0)){const _0x5df41f=[_0xf6dcd1(0x229),_0xa5ac66['EuwrT']],_0x246540=_0x406c6e[_0xf6dcd1(0x22c)]??[],_0x46c827=_0x5df41f['filter'](_0x1e5311=>!_0x246540[_0xf6dcd1(0x205)](_0x1e5311));_0x406c6e['args']=[..._0x246540,..._0x46c827];}return{'browserName':'chromium','launchOptions':_0x406c6e,'contextOptions':{..._0x1389ab,'permissions':[_0xa5ac66['ZPwNg'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x23e6f4){const _0x53fa4d=_0x1bfeba['contextOptions'];if(_0x53fa4d){if(_0xa5ac66['DwChG'](_0x53fa4d['userAgent'],undefined))delete _0x53fa4d[_0x2f4136(0x213)];if(_0xa5ac66['DwChG'](_0x53fa4d[_0x2f4136(0x1fa)],undefined))delete _0x53fa4d[_0x2f4136(0x1fa)];}}const _0x806b8e={'browser':_0x1bfeba,'outputDir':_0x2779a7,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x1ebbbf;try{const _0x10d56b=_0xa5ac66[_0x2f4136(0x245)](join,tmpdir(),_0xa5ac66['UHlNz']);!existsSync(_0x10d56b)&&await mkdir(_0x10d56b,{'recursive':!![]}),_0x1ebbbf=_0xa5ac66[_0x2f4136(0x245)](join,_0x10d56b,_0x579a26+'-'+Date[_0x2f4136(0x24b)]()+'-rangerwright.json'),await writeFile(_0x1ebbbf,JSON['stringify'](_0x806b8e,null,0x2));}catch(_0x4dc0e1){_0x46ee06&&await _0xa5ac66['LAhQF'](unlink,_0x46ee06)['catch'](()=>{});throw _0x4dc0e1;}return{'configPath':_0x1ebbbf,'storageStatePath':_0x2875e7,'tempAuthPath':_0x46ee06,'outputDir':_0x2779a7};}export async function buildNovaActCliConfig(_0x248dca,_0x41ed30,_0x5899a3,_0x4f1a34,_0x1fdf61){const _0x3f99fb=_0xf14d6,_0x551bfa={'CgYQs':function(_0x2cddc0){return _0x2cddc0();},'JuvHL':_0x3f99fb(0x20d),'lxOGf':function(_0x51c07c,_0x4cd150,_0xe3ffcd){return _0x51c07c(_0x4cd150,_0xe3ffcd);},'KlfyT':function(_0x528cb8,_0x3baf8e,_0x3d69ff){return _0x528cb8(_0x3baf8e,_0x3d69ff);},'ONCun':function(_0x2a9056,_0xbdf2f7){return _0x2a9056(_0xbdf2f7);}},{storageStatePath:_0x2b46bd,tempAuthPath:_0x2ab7b3}=_0x1fdf61?{'storageStatePath':_0x1fdf61,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x41ed30)),_0x324d44=_0x5899a3||_0x551bfa['CgYQs'](randomUUID),_0x179eeb=join(getRangerDir(),_0x551bfa[_0x3f99fb(0x1f5)],_0x324d44),_0x232a04=join(_0x179eeb,_0x3f99fb(0x207)),_0x4bfeb6=_0x2b46bd?_0x551bfa[_0x3f99fb(0x21f)](join,_0x232a04,_0x3f99fb(0x1e4)):undefined,{launchOptions:_0x3f91cf,contextOptions:_0x4634a5}=_0x551bfa['KlfyT'](buildBrowserOptionsFromSettings,_0x248dca,{'headless':_0x4f1a34?![]:_0x248dca['headless']??!![],'storageStatePath':_0x2b46bd});if(process[_0x3f99fb(0x22e)]?.()===0x0){const _0x4eeb98=[_0x3f99fb(0x229),'--disable-setuid-sandbox'],_0x123a8c=_0x3f91cf['args']??[],_0x53bf83=_0x4eeb98['filter'](_0x461320=>!_0x123a8c[_0x3f99fb(0x205)](_0x461320));_0x3f91cf[_0x3f99fb(0x22c)]=[..._0x123a8c,..._0x53bf83];}const _0x429fa8=typeof _0x3f91cf[_0x3f99fb(0x227)]===_0x3f99fb(0x22b)?_0x3f91cf[_0x3f99fb(0x227)]:_0x2b46bd?chromium['executablePath']():undefined;return{'storageStatePath':_0x2b46bd,'tempAuthPath':_0x2ab7b3,'baseUrl':_0x248dca['baseUrl'],'headless':_0x551bfa['ONCun'](Boolean,_0x3f91cf[_0x3f99fb(0x1d8)]),'userDataDir':_0x232a04,'browserProfilePath':_0x4bfeb6,'executablePath':_0x429fa8,'launchArgs':Array['isArray'](_0x3f91cf['args'])?_0x3f91cf['args']['filter'](_0x117b8e=>typeof _0x117b8e==='string'):[],'userAgent':typeof _0x4634a5['userAgent']==='string'?_0x4634a5['userAgent']:undefined,'extraHTTPHeaders':_0x4634a5[_0x3f99fb(0x223)],'allowInsecureLocalhost':Boolean(_0x248dca[_0x3f99fb(0x1e2)]),'safeMode':Boolean(_0x248dca[_0x3f99fb(0x1c8)]),'cdpEndpoint':_0x248dca[_0x3f99fb(0x1c5)],'isCdpMode':_0x551bfa['ONCun'](Boolean,_0x248dca['cdpEndpoint'])};}export function getNestedValue(_0x59ba94,_0x1e86dd){const _0x2c1377=_0xf14d6,_0x51973a={'DKDLP':function(_0x9184b1,_0x4416f7){return _0x9184b1(_0x4416f7);},'shOAr':function(_0x3f6aa2,_0x19b566){return _0x3f6aa2===_0x19b566;},'GeDhb':function(_0x414cda,_0x4e0222){return _0x414cda!==_0x4e0222;}},_0x4c82a3=_0x51973a[_0x2c1377(0x22a)](parseKeyPath,_0x1e86dd);let _0x4cedde=_0x59ba94;for(const _0x108d95 of _0x4c82a3){if(_0x4cedde===null||_0x51973a['shOAr'](_0x4cedde,undefined)||_0x51973a[_0x2c1377(0x1cb)](typeof _0x4cedde,_0x2c1377(0x236)))return undefined;_0x4cedde=_0x4cedde[_0x108d95];}return _0x4cedde;}export function setNestedValue(_0x54462f,_0x3851b6,_0x205253){const _0x3fb9f2=_0xf14d6,_0x47dede={'ysXGy':function(_0xed8c1d,_0x47bc58){return _0xed8c1d(_0x47bc58);},'ZTWqW':function(_0x36a47a,_0x40dd09){return _0x36a47a<_0x40dd09;},'DnnTo':function(_0x3c6ff0,_0x386445){return _0x3c6ff0-_0x386445;},'PsPGf':function(_0x2bd4be,_0x5ee4c6){return _0x2bd4be in _0x5ee4c6;},'zoQes':function(_0x36c4a4,_0x7c0cf1){return _0x36c4a4!==_0x7c0cf1;},'UCbYi':'object'},_0x2349ac=_0x47dede[_0x3fb9f2(0x219)](parseKeyPath,_0x3851b6);let _0x422250=_0x54462f;for(let _0xe8dbb9=0x0;_0x47dede[_0x3fb9f2(0x21a)](_0xe8dbb9,_0x47dede[_0x3fb9f2(0x202)](_0x2349ac['length'],0x1));_0xe8dbb9++){const _0x100e83=_0x2349ac[_0xe8dbb9];(!_0x47dede[_0x3fb9f2(0x221)](_0x100e83,_0x422250)||_0x47dede[_0x3fb9f2(0x210)](typeof _0x422250[_0x100e83],_0x47dede['UCbYi']))&&(_0x422250[_0x100e83]={}),_0x422250=_0x422250[_0x100e83];}_0x422250[_0x2349ac[_0x47dede[_0x3fb9f2(0x202)](_0x2349ac[_0x3fb9f2(0x23e)],0x1)]]=_0x205253;}function _0x355e(){const _0x2e846a=['pXeyI','KZkCq','zoQes','clipboard-read','auth.json','userAgent','replace','xNcmP','lnYve','setupHeader','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','ysXGy','ZTWqW','rbOOt','NSxmi','ENOENT','gWzMc','lxOGf','path','PsPGf','PtyWl','extraHTTPHeaders','dthxu','yNkkR','parse','executablePath','-cli','--no-sandbox','DKDLP','string','args','TiLDC','getuid','filter','vUduB','FSVjD','QFBZq','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x20is\x20not\x20set','HhuBb','object','OEwTb','JkTol','fromEntries','aQHua','keys','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','isArray','length','stringify','RYfMt','devtools','forWrite','4384032RCsKWr','mbJyL','kqKOa','5655152XWEyge','LFHma','pNInb','push','OFTRP','now','local','\x22\x20to\x20legacy\x20path\x20','BxLKo','legacy','stagehand','38410daHbwT','19156XnmoVr','cdpEndpoint','5133300hvTlsS','elRcm','safeMode','ignoreHTTPSErrors','mkyiI','GeDhb','playwright-cli','startsWith','YhJsz','DwChG','XDhpB','XXvLk','FlUxO','pdf','aosLA','join','launchOptions','GwlQF','headless','contextOptions','zVtms','allow','entries','6cIxrLl','XGdIp','QwwkR','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','CVuYb','allowInsecureLocalhost','header','Default','isdTA','7839mGDIyR','dDCBU','NQdky','nEPvU','location','Vrdqi','OYueU','storageStatePath','code','66xSgSvW','wwszK','oNYqy','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','tbreH','pVkaa','JuvHL','auth.json.enc','catch','nFZiJ','soOGG','storageState','hDUoH','--disable-setuid-sandbox','ranger-config','browser','8196468xaqaoU','core','settings.json','DnnTo','chromium','configPath','includes','TbUCN','nova-user-data','FrYpe','3337830qcuAIC','lUrOP','repeat','map','sessions'];_0x355e=function(){return _0x2e846a;};return _0x355e();}export function deleteNestedValue(_0x2313d9,_0x293347){const _0x3b9cb6=_0xf14d6,_0x5dea7f={'GorZw':function(_0x3743d3,_0x57f928){return _0x3743d3(_0x57f928);},'gWzMc':function(_0x4f023b,_0x22c776){return _0x4f023b<_0x22c776;},'FSVjD':function(_0x1f07c6,_0x4ad0f1){return _0x1f07c6!==_0x4ad0f1;},'mbJyL':'object','zVtms':function(_0x15ef73,_0x3a0be3){return _0x15ef73===_0x3a0be3;},'wlIaN':function(_0x130db4,_0x45ea17){return _0x130db4-_0x45ea17;}},_0x13d6a5=_0x5dea7f['GorZw'](parseKeyPath,_0x293347);let _0x5828b9=_0x2313d9;for(let _0x35bdc8=0x0;_0x5dea7f[_0x3b9cb6(0x21e)](_0x35bdc8,_0x13d6a5[_0x3b9cb6(0x23e)]-0x1);_0x35bdc8++){if(_0x5828b9===null||_0x5828b9===undefined||_0x5dea7f[_0x3b9cb6(0x231)](typeof _0x5828b9,_0x5dea7f['mbJyL']))return![];_0x5828b9=_0x5828b9[_0x13d6a5[_0x35bdc8]];}if(_0x5828b9===null||_0x5dea7f[_0x3b9cb6(0x1da)](_0x5828b9,undefined)||_0x5dea7f[_0x3b9cb6(0x231)](typeof _0x5828b9,_0x5dea7f[_0x3b9cb6(0x244)]))return![];const _0x5893fb=_0x13d6a5[_0x5dea7f['wlIaN'](_0x13d6a5[_0x3b9cb6(0x23e)],0x1)];if(_0x5893fb in _0x5828b9)return delete _0x5828b9[_0x5893fb],!![];return![];}function parseKeyPath(_0x5902f2){const _0x250eb3=_0xf14d6,_0xdf767e={'TiLDC':'headers','rwHVn':function(_0x47fce5,_0x166cd0){return _0x47fce5===_0x166cd0;},'TurbV':_0x250eb3(0x217),'mkyiI':'setupHeaders'},_0x33a8ff=_0x5902f2['split']('.');return _0x33a8ff[0x0]===_0x250eb3(0x1e3)&&(_0x33a8ff[0x0]=_0xdf767e[_0x250eb3(0x22d)]),_0xdf767e['rwHVn'](_0x33a8ff[0x0],_0xdf767e['TurbV'])&&(_0x33a8ff[0x0]=_0xdf767e[_0x250eb3(0x1ca)]),_0x33a8ff;}export function formatSettings(_0x3a3a9b,_0x6bcecd=0x0){const _0x2da8a8=_0xf14d6,_0x5e61ab={'YhJsz':function(_0x2331cb,_0x1fadfc){return _0x2331cb===_0x1fadfc;},'nEPvU':function(_0xbdfcd1,_0xfbabf3){return _0xbdfcd1!==_0xfbabf3;}},_0x876121=[],_0x24d933='\x20\x20'[_0x2da8a8(0x20b)](_0x6bcecd);for(const [_0x47596d,_0x297f5e]of Object[_0x2da8a8(0x1dc)](_0x3a3a9b)){if(_0x5e61ab[_0x2da8a8(0x1ce)](_0x297f5e,undefined))continue;if(_0x5e61ab['YhJsz'](typeof _0x297f5e,'object')&&_0x5e61ab[_0x2da8a8(0x1e9)](_0x297f5e,null)){_0x876121[_0x2da8a8(0x249)](''+_0x24d933+_0x47596d+':');for(const [_0x39ac8d,_0x10f8b6]of Object['entries'](_0x297f5e)){_0x876121[_0x2da8a8(0x249)](_0x24d933+'\x20\x20'+_0x39ac8d+':\x20'+_0x10f8b6);}}else _0x876121['push'](''+_0x24d933+_0x47596d+':\x20'+_0x297f5e);}return _0x876121[_0x2da8a8(0x1d5)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x125622,_0x55f44c){const _0x11653f=_0x431f,_0x1dc795=_0x125622();while(!![]){try{const _0x37cf26=-parseInt(_0x11653f(0xff))/0x1+-parseInt(_0x11653f(0x108))/0x2+parseInt(_0x11653f(0x107))/0x3+-parseInt(_0x11653f(0x100))/0x4+-parseInt(_0x11653f(0x104))/0x5+parseInt(_0x11653f(0x109))/0x6*(parseInt(_0x11653f(0x101))/0x7)+-parseInt(_0x11653f(0x105))/0x8*(-parseInt(_0x11653f(0xfe))/0x9);if(_0x37cf26===_0x55f44c)break;else _0x1dc795['push'](_0x1dc795['shift']());}catch(_0x3778cf){_0x1dc795['push'](_0x1dc795['shift']());}}}(_0x3840,0xdd7e6));import{readFileSync}from'fs';import{dirname,join}from'path';function _0x3840(){const _0x383fc1=['utf-8','3602375dindqQ','20912VGEjiR','Dxsyl','3769485jmCZKO','1241268sVBdkn','102QIFung','ranger/SKILL.md','6228NKxIEH','1012375cgCGKR','2624696vgnNOK','350623wbjBsT','YUcdC'];_0x3840=function(){return _0x383fc1;};return _0x3840();}import{fileURLToPath}from'url';function _0x431f(_0xdf37c7,_0x106a5e){_0xdf37c7=_0xdf37c7-0xfd;const _0x38405c=_0x3840();let _0x431f48=_0x38405c[_0xdf37c7];return _0x431f48;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x3a9a5f){const _0x4e2eb5=_0x431f,_0x1412dc={'FadYt':'skills','YUcdC':function(_0x57262e,_0x17cf80,_0x3eb745){return _0x57262e(_0x17cf80,_0x3eb745);},'Dxsyl':_0x4e2eb5(0x103)},_0x5cdc59=join(__dirname,'..','..',_0x1412dc['FadYt']),_0x409149=join(_0x5cdc59,_0x3a9a5f);try{return _0x1412dc[_0x4e2eb5(0x102)](readFileSync,_0x409149,_0x1412dc[_0x4e2eb5(0x106)]);}catch{return'';}}export function getRangerSkillContent(){const _0x288570=_0x431f;return readSkillContent(_0x288570(0xfd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x3e0fbc=_0x3236;(function(_0x396840,_0xb0f285){const _0x56d46a=_0x3236,_0x114844=_0x396840();while(!![]){try{const _0x5350ac=parseInt(_0x56d46a(0xfa))/0x1+parseInt(_0x56d46a(0xfd))/0x2*(-parseInt(_0x56d46a(0xf2))/0x3)+-parseInt(_0x56d46a(0x104))/0x4*(parseInt(_0x56d46a(0x10a))/0x5)+parseInt(_0x56d46a(0xec))/0x6*(parseInt(_0x56d46a(0xf4))/0x7)+parseInt(_0x56d46a(0x100))/0x8*(parseInt(_0x56d46a(0x10b))/0x9)+parseInt(_0x56d46a(0x10c))/0xa*(-parseInt(_0x56d46a(0xfc))/0xb)+-parseInt(_0x56d46a(0x103))/0xc*(-parseInt(_0x56d46a(0x102))/0xd);if(_0x5350ac===_0xb0f285)break;else _0x114844['push'](_0x114844['shift']());}catch(_0x59599b){_0x114844['push'](_0x114844['shift']());}}}(_0x3d69,0xaa31e));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';function _0x3236(_0x1652da,_0x544a2b){_0x1652da=_0x1652da-0xe9;const _0x3d6942=_0x3d69();let _0x3236ad=_0x3d6942[_0x1652da];return _0x3236ad;}import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];function _0x3d69(){const _0x473a78=['join','endsWith','lvmZX','SauaC','VWVEh','1947TkXnoO','trim','7kdPiXj','\x20\x20Files:\x20','tFjRz','e2e-test-recommender','.md','ipKMF','308700OVKJhL','opencode','9493WrxWJG','1668nZpVYH','KiogV','push','8XjMjgN','utf-8','22188023gYQTRz','12sdcDbp','14212nDawIq','\x20\x20Removed\x20deprecated\x20skill:\x20','SKILL.md','ITRMi','Invalid\x20skill\x20frontmatter','catch','115PSudqA','2159073VnsYYv','14880uDwlyH','bug-bash','project','zZODX','log','\x20\x20Location:\x20','match','warn','2093274SXEgUM'];_0x3d69=function(){return _0x473a78;};return _0x3d69();}export const DEPRECATED_SKILLS=[_0x3e0fbc(0xf7),_0x3e0fbc(0x10d),'feature-tracker'];export async function installSkill(_0x12b019,_0x55bb2f={}){const _0x544d2e=_0x3e0fbc,_0x2c1afc={'WrXkP':_0x544d2e(0x10e),'ipKMF':function(_0x26f77d){return _0x26f77d();},'zZODX':function(_0x1ad6fd,_0x1cacd3){return _0x1ad6fd(_0x1cacd3);},'mCjns':function(_0x7acca2,_0xdc3bc2,_0x12701b){return _0x7acca2(_0xdc3bc2,_0x12701b);},'tFjRz':function(_0x582ce6,_0x3a911c){return _0x582ce6&&_0x3a911c;},'fKRpf':_0x544d2e(0xfb),'dXUNR':function(_0x4a2b47,_0x5b3868,_0x6af998){return _0x4a2b47(_0x5b3868,_0x6af998);},'MjiKV':function(_0x278602,_0xca196c,_0x16e134){return _0x278602(_0xca196c,_0x16e134);},'EpLau':function(_0x310524,_0x2febbf,_0x1dbc31){return _0x310524(_0x2febbf,_0x1dbc31);},'VWVEh':function(_0x39281d,_0x55cf98,_0x238fd2){return _0x39281d(_0x55cf98,_0x238fd2);},'dJrOp':function(_0x3be729,_0x4c2da8,_0x3819df,_0x59b10a){return _0x3be729(_0x4c2da8,_0x3819df,_0x59b10a);},'SauaC':'SKILL.md','jFVjU':function(_0x34039e,_0x4b4661,_0x1739cf,_0x2ea8e1){return _0x34039e(_0x4b4661,_0x1739cf,_0x2ea8e1);}},{level:level=_0x2c1afc['WrXkP'],cliVersion:_0x379100,platform:platform='claude'}=_0x55bb2f,_0x105565=_0x2c1afc[_0x544d2e(0xf9)](getSourceSkillsDir),_0x17d593=join(_0x105565,_0x12b019),_0x110e6b=join(_0x105565,_0x12b019+_0x544d2e(0xf8)),_0x45ad3e=_0x2c1afc[_0x544d2e(0x10f)](existsSync,_0x17d593)&&_0x2c1afc[_0x544d2e(0x10f)](statSync,_0x17d593)['isDirectory']()&&existsSync(_0x2c1afc['mCjns'](join,_0x17d593,_0x544d2e(0x106))),_0x3e03c6=_0x2c1afc['zZODX'](existsSync,_0x110e6b);if(_0x2c1afc[_0x544d2e(0xf6)](!_0x45ad3e,!_0x3e03c6))return console[_0x544d2e(0xeb)]('\x20\x20Skill\x20not\x20found:\x20'+_0x12b019),![];const _0x3f7de9=platform===_0x2c1afc['fKRpf']?getOpencodeSkillsDir(level):getSkillsDir(level),_0x1683f5=_0x2c1afc['dXUNR'](join,_0x3f7de9,_0x12b019);await _0x2c1afc['MjiKV'](mkdir,_0x1683f5,{'recursive':!![]});let _0x20c073,_0x5223b9=[];if(_0x45ad3e){const _0x434249=await readdir(_0x17d593),_0x5b0b96=_0x434249['filter'](_0x84b6bc=>_0x84b6bc[_0x544d2e(0xee)](_0x544d2e(0xf8)));for(const _0x1ad8c8 of _0x5b0b96){const _0xaae7e5=_0x2c1afc['EpLau'](join,_0x17d593,_0x1ad8c8),_0x2da7aa=_0x2c1afc[_0x544d2e(0xf1)](join,_0x1683f5,_0x1ad8c8);await copyFile(_0xaae7e5,_0x2da7aa),_0x5223b9[_0x544d2e(0xff)](_0x1ad8c8);}_0x20c073=await readFile(join(_0x17d593,'SKILL.md'),'utf-8');}else{_0x20c073=await readFile(_0x110e6b,_0x544d2e(0x101));const _0x2ec94b=join(_0x1683f5,'SKILL.md');await _0x2c1afc['dJrOp'](writeFile,_0x2ec94b,_0x20c073,'utf-8'),_0x5223b9[_0x544d2e(0xff)](_0x2c1afc[_0x544d2e(0xf0)]);}const {name:_0x12a18e}=parseFrontmatter(_0x20c073);return console[_0x544d2e(0x110)]('\x20\x20Installed\x20skill:\x20'+_0x12a18e),console[_0x544d2e(0x110)](_0x544d2e(0xe9)+_0x1683f5),_0x5223b9['length']>0x1&&console['log'](_0x544d2e(0xf5)+_0x5223b9[_0x544d2e(0xed)](',\x20')),_0x2c1afc['jFVjU'](logLocalAgentInstallation,_0x12b019,{'skillDisplayName':_0x12a18e,'installLevel':level},_0x379100)[_0x544d2e(0x109)](()=>{}),!![];}function getSourceSkillsDir(){const _0x4baacd=_0x3e0fbc,_0x10a990={'KiogV':'skills','lvmZX':function(_0x2db1c4,_0x579989,_0x1da08c,_0x1fcc29,_0x4d9754,_0x527d47){return _0x2db1c4(_0x579989,_0x1da08c,_0x1fcc29,_0x4d9754,_0x527d47);}},_0x1f77de=[join(__dirname,'..','..',_0x10a990[_0x4baacd(0xfe)]),_0x10a990[_0x4baacd(0xef)](join,__dirname,'..','..','..','skills')];for(const _0x2cb1a9 of _0x1f77de){if(existsSync(_0x2cb1a9))return _0x2cb1a9;}return _0x1f77de[0x0];}function parseFrontmatter(_0x3c7cbf){const _0x4cb5fe=_0x3e0fbc,_0x100a8c={'ROIPD':_0x4cb5fe(0x108)},_0x479bfd=_0x3c7cbf[_0x4cb5fe(0xea)](/^---\n([\s\S]+?)\n---/);if(!_0x479bfd)throw new Error(_0x100a8c['ROIPD']);const _0x4f09c1=_0x479bfd[0x1],_0x267d5a=_0x4f09c1[_0x4cb5fe(0xea)](/name:\s*(.+)/),_0x33e081=_0x4f09c1['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x267d5a?.[0x1][_0x4cb5fe(0xf3)]()||'','description':_0x33e081?.[0x1]['trim']()||''};}export async function removeSkill(_0x5a1c76,_0x226f22){const _0x37b4cc=_0x3e0fbc,_0x7981cd={'ITRMi':function(_0x127318,_0xca14bf,_0x29b416){return _0x127318(_0xca14bf,_0x29b416);},'CBBCO':function(_0x16e744,_0xff4394){return _0x16e744(_0xff4394);}},_0x2c86ef=getSkillsDir(_0x226f22),_0x1bdceb=_0x7981cd['ITRMi'](join,_0x2c86ef,_0x5a1c76);if(!_0x7981cd['CBBCO'](existsSync,_0x1bdceb))return![];try{return await _0x7981cd[_0x37b4cc(0x107)](rm,_0x1bdceb,{'recursive':!![]}),console['log'](_0x37b4cc(0x105)+_0x5a1c76),!![];}catch{return console['warn']('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x5a1c76),![];}}
|
|
@@ -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 _0x5f060a=_0x58b5;(function(_0x548839,_0xf1e330){const _0x19274c=_0x58b5,_0x3bf47d=_0x548839();while(!![]){try{const _0x4a036f=parseInt(_0x19274c(0x96))/0x1+parseInt(_0x19274c(0xac))/0x2+parseInt(_0x19274c(0xc0))/0x3+-parseInt(_0x19274c(0x9b))/0x4*(parseInt(_0x19274c(0x85))/0x5)+-parseInt(_0x19274c(0x89))/0x6*(parseInt(_0x19274c(0x97))/0x7)+parseInt(_0x19274c(0x98))/0x8+-parseInt(_0x19274c(0x9e))/0x9*(-parseInt(_0x19274c(0x9c))/0xa);if(_0x4a036f===_0xf1e330)break;else _0x3bf47d['push'](_0x3bf47d['shift']());}catch(_0x5e8cce){_0x3bf47d['push'](_0x3bf47d['shift']());}}}(_0x4fa7,0x749fb));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(_0x25172a,_0x49f3b0){const _0xa4c51e=_0x58b5,_0x327a1c={'jflns':function(_0x49a1a2,_0xdc42f3){return _0x49a1a2&_0xdc42f3;},'WzJmE':function(_0xf40e45,_0x112c11){return _0xf40e45-_0x112c11;},'tneCd':function(_0x28fbb3,_0x16017b){return _0x28fbb3<_0x16017b;}};if(_0x49f3b0>=_0x25172a[_0xa4c51e(0xbe)])return[0x0,0x0];const _0xa1ae07=_0x25172a[_0x49f3b0];let _0x315b37=0x1,_0x602ece=0x80;while(_0x315b37<=0x8&&!(_0xa1ae07&_0x602ece)){_0x315b37++,_0x602ece>>=0x1;}if(_0x49f3b0+_0x315b37>_0x25172a['length'])return[0x0,0x0];let _0x2c1cf6=_0x327a1c['jflns'](_0xa1ae07,_0x327a1c['WzJmE'](_0x602ece,0x1));for(let _0x590e63=0x1;_0x327a1c[_0xa4c51e(0xab)](_0x590e63,_0x315b37);_0x590e63++){_0x2c1cf6=_0x2c1cf6*0x100+_0x25172a[_0x49f3b0+_0x590e63];}return[_0x2c1cf6,_0x315b37];}function readId(_0x11d981,_0x992884){const _0x318e8a=_0x58b5,_0x2468ef={'HFiLA':function(_0x1e0f06,_0x5c2d74){return _0x1e0f06>=_0x5c2d74;},'Yaezp':function(_0x52b0e2,_0x1aab6c){return _0x52b0e2+_0x1aab6c;},'KwECD':function(_0x24af0a,_0x173ec3){return _0x24af0a<_0x173ec3;},'hsiNE':function(_0x21f6ae,_0x78c4f8){return _0x21f6ae+_0x78c4f8;}};if(_0x2468ef[_0x318e8a(0x87)](_0x992884,_0x11d981[_0x318e8a(0xbe)]))return[0x0,0x0];const _0x3bd679=_0x11d981[_0x992884];let _0x1dd5dd;if(_0x3bd679>=0x80)_0x1dd5dd=0x1;else{if(_0x3bd679>=0x40)_0x1dd5dd=0x2;else{if(_0x2468ef[_0x318e8a(0x87)](_0x3bd679,0x20))_0x1dd5dd=0x3;else{if(_0x3bd679>=0x10)_0x1dd5dd=0x4;else return[_0x3bd679,0x1];}}}if(_0x2468ef[_0x318e8a(0xad)](_0x992884,_0x1dd5dd)>_0x11d981['length'])return[0x0,0x0];let _0x17b512=0x0;for(let _0x359206=0x0;_0x2468ef['KwECD'](_0x359206,_0x1dd5dd);_0x359206++){_0x17b512=_0x2468ef['hsiNE'](_0x17b512*0x100,_0x11d981[_0x992884+_0x359206]);}return[_0x17b512,_0x1dd5dd];}function _0x58b5(_0x240bc2,_0x1eadf1){_0x240bc2=_0x240bc2-0x7f;const _0x4fa734=_0x4fa7();let _0x58b5d7=_0x4fa734[_0x240bc2];return _0x58b5d7;}function readUint(_0x37233d,_0x27a7c5,_0x7d40ce){const _0x56f71d=_0x58b5,_0x301e76={'QqcUs':function(_0xe9eaa0,_0x57bd0f){return _0xe9eaa0<_0x57bd0f;},'XfRav':function(_0x5017b7,_0x3893ee){return _0x5017b7+_0x3893ee;},'HmDMw':function(_0xf87af,_0x21b227){return _0xf87af*_0x21b227;}};let _0x206aa4=0x0;for(let _0x11f0b5=0x0;_0x301e76[_0x56f71d(0xae)](_0x11f0b5,_0x7d40ce);_0x11f0b5++){_0x206aa4=_0x301e76['XfRav'](_0x301e76[_0x56f71d(0xb5)](_0x206aa4,0x100),_0x37233d[_0x27a7c5+_0x11f0b5]);}return _0x206aa4;}function isUnknownSize(_0x586b4f,_0x1d929a){const _0x32860e=_0x58b5,_0x40e1b7={'HGvYf':function(_0x1efd77,_0x1fdbfb){return _0x1efd77===_0x1fdbfb;},'KrfJz':function(_0x264e2a,_0x3b3c18){return _0x264e2a-_0x3b3c18;},'pHybv':function(_0x3e8b91,_0x5ee203){return _0x3e8b91*_0x5ee203;}};return _0x40e1b7[_0x32860e(0xb9)](_0x586b4f,_0x40e1b7['KrfJz'](Math['pow'](0x2,_0x40e1b7[_0x32860e(0xbb)](0x7,_0x1d929a)),0x1));}function writeVint(_0x1854ce,_0x2e816f){const _0x1047e9=_0x58b5,_0x297d4e={'pXXYH':function(_0x41d7c5,_0xfec521){return _0x41d7c5||_0xfec521;},'lLVsl':function(_0x11a34c,_0x2420b7){return _0x11a34c<_0x2420b7;},'cNZEk':function(_0x4af4af,_0x194815){return _0x4af4af*_0x194815;},'lAbRG':function(_0x1d8b8e,_0x2a91b1){return _0x1d8b8e>=_0x2a91b1;},'PoXqd':function(_0x5cb883,_0x11d638){return _0x5cb883/_0x11d638;},'jgRGx':function(_0x71fee3,_0x258a80){return _0x71fee3-_0x258a80;}};let _0x579dfc=_0x297d4e['pXXYH'](_0x2e816f,0x1);while(_0x297d4e[_0x1047e9(0xa0)](Math['pow'](0x2,_0x297d4e['cNZEk'](0x7,_0x579dfc))-0x2,_0x1854ce))_0x579dfc++;const _0x99cf04=Buffer['alloc'](_0x579dfc);for(let _0x231441=_0x579dfc-0x1;_0x297d4e[_0x1047e9(0x92)](_0x231441,0x0);_0x231441--){_0x99cf04[_0x231441]=_0x1854ce&0xff,_0x1854ce=Math['floor'](_0x297d4e['PoXqd'](_0x1854ce,0x100));}return _0x99cf04[0x0]|=0x1<<_0x297d4e['jgRGx'](0x8,_0x579dfc),_0x99cf04;}function writeUint(_0x361a88,_0x53d6a6){const _0x40f359=_0x58b5,_0x5a9e33={'sEJKv':function(_0x118baa,_0x163016){return _0x118baa-_0x163016;},'NSrmV':function(_0x83d8c5,_0x43c43f){return _0x83d8c5>=_0x43c43f;},'GMLBK':function(_0x43adf9,_0x5c7468){return _0x43adf9/_0x5c7468;}},_0x4e63bc=Buffer[_0x40f359(0xa5)](_0x53d6a6);for(let _0x24a38f=_0x5a9e33['sEJKv'](_0x53d6a6,0x1);_0x5a9e33[_0x40f359(0x8c)](_0x24a38f,0x0);_0x24a38f--){_0x4e63bc[_0x24a38f]=_0x361a88&0xff,_0x361a88=Math['floor'](_0x5a9e33['GMLBK'](_0x361a88,0x100));}return _0x4e63bc;}function writeUnknownSizeVint(_0x5b2a99){const _0x3f0d9={'IlfpA':function(_0x584084,_0x2627fe){return _0x584084-_0x2627fe;}},_0x498b52=Buffer['alloc'](_0x5b2a99,0xff);return _0x498b52[0x0]=0xff>>_0x3f0d9['IlfpA'](_0x5b2a99,0x1),_0x498b52;}function uintSize(_0x53d7ba){const _0x211141=_0x58b5,_0x210da6={'lCEcP':function(_0xfa86a8,_0xaca3cf){return _0xfa86a8===_0xaca3cf;},'bjTVr':function(_0xaeeb54,_0x1bbd1c){return _0xaeeb54/_0x1bbd1c;}};if(_0x210da6[_0x211141(0xaa)](_0x53d7ba,0x0))return 0x1;let _0x3abaed=0x0,_0x46c377=_0x53d7ba;while(_0x46c377>0x0){_0x3abaed++,_0x46c377=Math['floor'](_0x210da6['bjTVr'](_0x46c377,0x100));}return _0x3abaed;}function findTimestampScale(_0x495681,_0x17b7c4){const _0x1341df=_0x58b5,_0x3edcb3={'yhbMZ':function(_0xeb432f,_0x2311e1){return _0xeb432f+_0x2311e1;},'scNVa':function(_0x3ed114,_0x493c6f){return _0x3ed114<_0x493c6f;},'RxelO':function(_0x551170,_0x2920c3,_0x2179d7){return _0x551170(_0x2920c3,_0x2179d7);},'JsyEY':function(_0x4466c1,_0x4a55e8){return _0x4466c1===_0x4a55e8;},'JtJIR':function(_0x57a015,_0xce5009){return _0x57a015+_0xce5009;},'hAafe':function(_0x1fc668,_0x430831){return _0x1fc668===_0x430831;},'csJKc':function(_0x3c5e3e,_0x3c180f,_0x583d66){return _0x3c5e3e(_0x3c180f,_0x583d66);},'CJAuV':function(_0x162ff6,_0x50702d){return _0x162ff6+_0x50702d;}};let _0x5c76ee=_0x17b7c4;const _0xcfaae3=Math['min'](_0x495681['length'],_0x3edcb3['yhbMZ'](_0x17b7c4,0x2710));while(_0x3edcb3[_0x1341df(0x99)](_0x5c76ee,_0xcfaae3)){const [_0xc74a67,_0x6655b]=readId(_0x495681,_0x5c76ee),[_0x39333f,_0x178e88]=_0x3edcb3['RxelO'](readVint,_0x495681,_0x3edcb3['yhbMZ'](_0x5c76ee,_0x6655b));if(_0x3edcb3[_0x1341df(0x91)](_0xc74a67,ID_INFO)){let _0x4af613=_0x5c76ee+_0x6655b+_0x178e88;const _0x336aca=_0x3edcb3[_0x1341df(0x90)](_0x4af613,_0x39333f);while(_0x3edcb3['scNVa'](_0x4af613,_0x336aca)){const [_0x2374a7,_0x2ea468]=readId(_0x495681,_0x4af613),[_0x4e460c,_0x3e8a42]=_0x3edcb3['RxelO'](readVint,_0x495681,_0x3edcb3['yhbMZ'](_0x4af613,_0x2ea468));if(_0x3edcb3['JsyEY'](_0x2374a7,ID_TIMESTAMP_SCALE))return readUint(_0x495681,_0x4af613+_0x2ea468+_0x3e8a42,_0x4e460c);_0x4af613+=_0x3edcb3['JtJIR'](_0x3edcb3[_0x1341df(0x90)](_0x2ea468,_0x3e8a42),_0x4e460c);}break;}if(_0x3edcb3['hAafe'](_0xc74a67,ID_CLUSTER))break;if(_0x3edcb3[_0x1341df(0xb1)](isUnknownSize,_0x39333f,_0x178e88))break;_0x5c76ee+=_0x3edcb3[_0x1341df(0x90)](_0x3edcb3[_0x1341df(0xb0)](_0x6655b,_0x178e88),_0x39333f);}return 0xf4240;}function _0x4fa7(){const _0x47c804=['HGvYf','Dujsa','pHybv','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','PiykF','length','argv','747933IXgDqa','qZGJD','jLcUa','from','readInt16BE','header','indexOf','log','MCXNU','5NoBznu','clusters','HFiLA','concat','60042PNssgV','ymFqV','igkRj','NSrmV','BbZZe','has','GQwtx','JtJIR','JsyEY','lAbRG','endsWith','bodyBeforeTimestamp','gBLTz','537932TnTqsW','413ZdpwXJ','1491952eWxNgb','scNVa','Stitched\x20','3155868GQBdsX','42380UUmIEf','bXHWx','1863yuIbuI','oWjdH','lLVsl','DBAWh','ohuHF','bodyAfterTimestamp','fGxvo','alloc','qXbGY','ZVOLb','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','BMTDK','lCEcP','tneCd','12136BIUdUj','Yaezp','QqcUs','uNcse','CJAuV','csJKc','slice','pabFA','stitchWebmFiles.ts','HmDMw','DdQYF','dnASp','bwigm'];_0x4fa7=function(){return _0x47c804;};return _0x4fa7();}function findFirstClusterOffset(_0x503ade,_0x20192d){const _0x4877e4=_0x58b5,_0x30b23f={'Mcwgk':function(_0x558cb5,_0x42666e){return _0x558cb5===_0x42666e;},'uGcCU':function(_0x16c772,_0x3b1ebf,_0x4c66fe){return _0x16c772(_0x3b1ebf,_0x4c66fe);},'jLcUa':function(_0x36246e,_0x2851c5,_0x34d681){return _0x36246e(_0x2851c5,_0x34d681);},'nWEVn':function(_0x4636b2,_0x44d762){return _0x4636b2+_0x44d762;}};let _0x249c3a=_0x20192d;while(_0x249c3a<_0x503ade['length']){const [_0x32122a,_0x1ba723]=readId(_0x503ade,_0x249c3a);if(_0x30b23f['Mcwgk'](_0x32122a,ID_CLUSTER))return _0x249c3a;const [_0x537d7e,_0x5a6bef]=_0x30b23f['uGcCU'](readVint,_0x503ade,_0x249c3a+_0x1ba723);if(_0x30b23f[_0x4877e4(0xc2)](isUnknownSize,_0x537d7e,_0x5a6bef))return _0x249c3a;_0x249c3a+=_0x30b23f['nWEVn'](_0x30b23f['nWEVn'](_0x1ba723,_0x5a6bef),_0x537d7e);}return _0x503ade[_0x4877e4(0xbe)];}function findClusterEnd(_0x4d7f38,_0x7640b5,_0x569b32,_0x5c904b){const _0x1e087b=_0x58b5,_0x113c38={'ymFqV':function(_0x221382,_0x3d2e4c){return _0x221382+_0x3d2e4c;},'QAntq':function(_0x1e0d4f,_0x565745){return _0x1e0d4f-_0x565745;},'JKdVV':function(_0x10fd3a,_0x32e9cc,_0x53b9ed){return _0x10fd3a(_0x32e9cc,_0x53b9ed);}};if(!isUnknownSize(_0x569b32,_0x5c904b))return _0x113c38[_0x1e087b(0x8a)](_0x7640b5,_0x569b32);const _0x13e7d9=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4f8b0e=_0x7640b5;while(_0x4f8b0e<_0x113c38['QAntq'](_0x4d7f38[_0x1e087b(0xbe)],0x4)){const [_0x43ddad,_0x2ccfc2]=readId(_0x4d7f38,_0x4f8b0e);if(_0x13e7d9[_0x1e087b(0x8e)](_0x43ddad))return _0x4f8b0e;const [_0x1b6a18,_0x3b4fc0]=_0x113c38['JKdVV'](readVint,_0x4d7f38,_0x4f8b0e+_0x2ccfc2);if(isUnknownSize(_0x1b6a18,_0x3b4fc0))return _0x4d7f38[_0x1e087b(0xbe)];_0x4f8b0e+=_0x2ccfc2+_0x3b4fc0+_0x1b6a18;}return _0x4d7f38['length'];}function extractClusters(_0xffcd6,_0x2aa02d){const _0x260af1=_0x58b5,_0x50947f={'Dujsa':function(_0x486556,_0x4d8f3c){return _0x486556===_0x4d8f3c;},'vHmQC':function(_0x4efa81,_0x31fbf1){return _0x4efa81!==_0x31fbf1;},'MCXNU':function(_0x4b66aa,_0x1b6c77){return _0x4b66aa+_0x1b6c77;},'ZVOLb':function(_0x4839de,_0x382a80,_0x41532d){return _0x4839de(_0x382a80,_0x41532d);},'IfTba':function(_0x95fe4a,_0x5cb9cc,_0x424475,_0x130370,_0x382460){return _0x95fe4a(_0x5cb9cc,_0x424475,_0x130370,_0x382460);},'TmtNt':function(_0x171f99,_0x17e96a){return _0x171f99+_0x17e96a;},'pabFA':function(_0xaab7ba,_0x2aeb6e){return _0xaab7ba+_0x2aeb6e;},'vgFxM':function(_0x42eeee,_0x340c65){return _0x42eeee<_0x340c65;},'GQwtx':function(_0x167ea5,_0x3d232c,_0x4b415b){return _0x167ea5(_0x3d232c,_0x4b415b);},'bwigm':function(_0x5b9aa7,_0xcac29f){return _0x5b9aa7>=_0xcac29f;},'bXHWx':function(_0xa40c20,_0x5034e4){return _0xa40c20+_0x5034e4;},'ECXMG':function(_0x3193ee,_0x432d89){return _0x3193ee+_0x432d89;},'uCiZi':function(_0x52f220,_0x4217b9){return _0x52f220>_0x4217b9;},'cOpCg':function(_0x25da28,_0x207141){return _0x25da28===_0x207141;}},_0x24a71e=[],_0x13e387=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x423d75=0x0;while(_0x423d75<_0xffcd6['length']){const _0xb45c3=_0xffcd6[_0x260af1(0x82)](_0x13e387,_0x423d75);if(_0x50947f[_0x260af1(0xba)](_0xb45c3,-0x1))break;const [_0x5653e4,_0xd8b7f4]=readId(_0xffcd6,_0xb45c3);if(_0x50947f['vHmQC'](_0x5653e4,ID_CLUSTER)){_0x423d75=_0x50947f[_0x260af1(0x84)](_0xb45c3,0x1);continue;}const [_0x1897ee,_0x9addf4]=_0x50947f[_0x260af1(0xa7)](readVint,_0xffcd6,_0xb45c3+_0xd8b7f4),_0x126117=_0xb45c3+_0xd8b7f4+_0x9addf4,_0x39b11d=_0x50947f['IfTba'](findClusterEnd,_0xffcd6,_0x126117,_0x1897ee,_0x9addf4);let _0x4f127e=_0x126117,_0x3ec65c=0x0,_0x582563=0x2,_0x42e38a=![],_0x3c8f64=Buffer['alloc'](0x0),_0x377656=Buffer['alloc'](0x0);while(_0x4f127e<_0x39b11d){const [_0x2fee3c,_0x5b8865]=_0x50947f[_0x260af1(0xa7)](readId,_0xffcd6,_0x4f127e),[_0x5c89b2,_0x351b94]=readVint(_0xffcd6,_0x4f127e+_0x5b8865);if(_0x2fee3c===ID_TIMESTAMP){_0x3ec65c=readUint(_0xffcd6,_0x50947f['TmtNt'](_0x4f127e,_0x5b8865)+_0x351b94,_0x5c89b2),_0x582563=_0x5c89b2,_0x42e38a=!![],_0x3c8f64=_0xffcd6[_0x260af1(0xb2)](_0x126117,_0x4f127e);const _0x26a871=_0x50947f['pabFA'](_0x4f127e+_0x5b8865+_0x351b94,_0x5c89b2);_0x377656=_0xffcd6[_0x260af1(0xb2)](_0x26a871,_0x39b11d);break;}if(_0x2fee3c===ID_CLUSTER)break;if(_0x50947f[_0x260af1(0xa7)](isUnknownSize,_0x5c89b2,_0x351b94))break;_0x4f127e+=_0x50947f[_0x260af1(0xb3)](_0x50947f[_0x260af1(0xb3)](_0x5b8865,_0x351b94),_0x5c89b2);}!_0x42e38a&&(_0x377656=_0xffcd6['slice'](_0x126117,_0x39b11d));let _0x4ca69c=_0x3ec65c;_0x4f127e=_0x126117;while(_0x50947f['vgFxM'](_0x4f127e,_0x39b11d)){const [_0x3ee838,_0x4129a1]=readId(_0xffcd6,_0x4f127e),[_0x3d8891,_0xf20636]=_0x50947f[_0x260af1(0x8f)](readVint,_0xffcd6,_0x50947f[_0x260af1(0xb3)](_0x4f127e,_0x4129a1));if(_0x3ee838===ID_SIMPLE_BLOCK&&_0x50947f[_0x260af1(0xb8)](_0x3d8891,0x4)){const _0x13972c=_0x50947f[_0x260af1(0x9d)](_0x50947f[_0x260af1(0xb3)](_0x4f127e,_0x4129a1),_0xf20636),[,_0x29eba2]=readVint(_0xffcd6,_0x13972c),_0x46e136=_0xffcd6[_0x260af1(0x80)](_0x50947f['ECXMG'](_0x13972c,_0x29eba2)),_0x201e7e=_0x3ec65c+_0x46e136;if(_0x50947f['uCiZi'](_0x201e7e,_0x4ca69c))_0x4ca69c=_0x201e7e;}if(_0x50947f['cOpCg'](_0x3ee838,ID_CLUSTER))break;if(isUnknownSize(_0x3d8891,_0xf20636))break;_0x4f127e+=_0x50947f[_0x260af1(0xb3)](_0x4129a1,_0xf20636)+_0x3d8891;}_0x24a71e['push']({'timestamp':_0x3ec65c,'maxTicks':_0x4ca69c,'bodyBeforeTimestamp':_0x3c8f64,'bodyAfterTimestamp':_0x377656,'timestampElementSize':_0x582563}),_0x423d75=_0x39b11d;}return _0x24a71e;}function parseWebm(_0x3f2e0b){const _0x204c88=_0x58b5,_0x1e9ed5={'ulePv':function(_0x5d8385,_0x176827,_0x340ca2){return _0x5d8385(_0x176827,_0x340ca2);},'dnASp':function(_0x3e3990,_0x1585ba){return _0x3e3990+_0x1585ba;},'Djwtv':function(_0x36be8c,_0xf77444){return _0x36be8c+_0xf77444;},'DdQYF':function(_0x41246b,_0x1e8117){return _0x41246b+_0x1e8117;},'PTrNn':function(_0x32ca1d,_0x1089de){return _0x32ca1d+_0x1089de;},'qZGJD':function(_0x3d7a20,_0x30bec5,_0x3aaacc){return _0x3d7a20(_0x30bec5,_0x3aaacc);},'vkviR':function(_0x42a431,_0x13b6f1){return _0x42a431>_0x13b6f1;}};let _0x226fd3=0x0;const [,_0x2782f4]=_0x1e9ed5['ulePv'](readId,_0x3f2e0b,_0x226fd3),[_0x5f0241,_0x24bd72]=readVint(_0x3f2e0b,_0x1e9ed5[_0x204c88(0xb7)](_0x226fd3,_0x2782f4));_0x226fd3+=_0x1e9ed5['Djwtv'](_0x1e9ed5[_0x204c88(0xb6)](_0x2782f4,_0x24bd72),_0x5f0241);const [_0x1e35bb,_0x1eae9b]=_0x1e9ed5['ulePv'](readId,_0x3f2e0b,_0x226fd3);if(_0x1e35bb!==ID_SEGMENT)return null;const [,_0x52f047]=readVint(_0x3f2e0b,_0x226fd3+_0x1eae9b),_0x533855=_0x1e9ed5['PTrNn'](_0x226fd3+_0x1eae9b,_0x52f047),_0x3825d6=findTimestampScale(_0x3f2e0b,_0x533855),_0x2f7452=findFirstClusterOffset(_0x3f2e0b,_0x533855),_0x1f84bb=_0x3f2e0b[_0x204c88(0xb2)](0x0,_0x2f7452),_0x3da2b0=_0x1e9ed5[_0x204c88(0xc1)](extractClusters,_0x3f2e0b,_0x3825d6);let _0x3ad2ba=0x0;for(const _0x334a1b of _0x3da2b0){if(_0x1e9ed5['vkviR'](_0x334a1b['maxTicks'],_0x3ad2ba))_0x3ad2ba=_0x334a1b['maxTicks'];}return{'header':_0x1f84bb,'clusters':_0x3da2b0,'timestampScale':_0x3825d6,'maxTimestampTicks':_0x3ad2ba};}function buildCluster(_0x3f878e,_0x3ae18c,_0xd35373){const _0x5ea0b5=_0x58b5,_0x356962={'BMTDK':function(_0xe86ad7,_0x1c0f44){return _0xe86ad7(_0x1c0f44);},'yMkcm':function(_0x21de00,_0x3c9947,_0x52daa9){return _0x21de00(_0x3c9947,_0x52daa9);}},_0x111040=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x388c2f=Math['max'](0x4,_0x356962['BMTDK'](uintSize,_0x3f878e)),_0x15d176=Buffer['concat']([Buffer[_0x5ea0b5(0x7f)]([ID_TIMESTAMP]),_0x356962['BMTDK'](writeVint,_0x388c2f),_0x356962['yMkcm'](writeUint,_0x3f878e,_0x388c2f)]),_0x422440=Buffer['concat']([_0x3ae18c,_0x15d176,_0xd35373]),_0x4f19b6=_0x356962[_0x5ea0b5(0xa9)](writeVint,_0x422440[_0x5ea0b5(0xbe)]);return Buffer['concat']([_0x111040,_0x4f19b6,_0x422440]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x53f71b){const _0x4f05e4=_0x58b5,_0x501c30={'DBAWh':function(_0x265309,_0x6d5c60,_0x5f14f1){return _0x265309(_0x6d5c60,_0x5f14f1);},'ohuHF':function(_0x20e763,_0x2f0200){return _0x20e763(_0x2f0200);},'qXbGY':function(_0x16cbfa,_0x299eb1){return _0x16cbfa+_0x299eb1;},'igkRj':function(_0x7e53e4,_0x38b94c){return _0x7e53e4===_0x38b94c;},'BbZZe':function(_0x5c8a17,_0x5420c9){return _0x5c8a17+_0x5420c9;},'uNcse':function(_0x373bf1,_0x47a12c){return _0x373bf1+_0x47a12c;},'gBLTz':function(_0xa58bc0,_0x1cef53,_0x57f1b3){return _0xa58bc0(_0x1cef53,_0x57f1b3);},'WvKjE':function(_0x268c39,_0x1e60a3,_0x56fa83){return _0x268c39(_0x1e60a3,_0x56fa83);},'AJJkj':function(_0x395212,_0x23a088){return _0x395212!==_0x23a088;}},_0x34dd1a=Buffer[_0x4f05e4(0x7f)](_0x53f71b);let _0x3bf198=0x0;const [,_0x18089e]=readId(_0x34dd1a,_0x3bf198),[_0x120997,_0x574f51]=readVint(_0x34dd1a,_0x3bf198+_0x18089e),_0x3c1a84=_0x3bf198+_0x18089e+_0x574f51+_0x120997,[,_0x478b88]=_0x501c30[_0x4f05e4(0xa1)](readId,_0x34dd1a,_0x3c1a84),[,_0x45a6ee]=readVint(_0x34dd1a,_0x3c1a84+_0x478b88),_0x5873ff=_0x3c1a84+_0x478b88+_0x45a6ee,_0x2ecb47=_0x501c30[_0x4f05e4(0xa2)](writeUnknownSizeVint,_0x45a6ee);_0x2ecb47['copy'](_0x34dd1a,_0x3c1a84+_0x478b88);let _0x514bf3=_0x5873ff;const _0x49616a=Math['min'](_0x34dd1a[_0x4f05e4(0xbe)],_0x501c30['qXbGY'](_0x5873ff,0x2710));while(_0x514bf3<_0x49616a){const [_0x1a3c82,_0x8e1465]=readId(_0x34dd1a,_0x514bf3),[_0xb45857,_0x4a7d42]=_0x501c30['DBAWh'](readVint,_0x34dd1a,_0x514bf3+_0x8e1465);if(_0x501c30[_0x4f05e4(0x8b)](_0x1a3c82,ID_CLUSTER))break;if(isUnknownSize(_0xb45857,_0x4a7d42))break;if(_0x1a3c82===ID_INFO){const _0x40bc76=_0x501c30[_0x4f05e4(0x8d)](_0x501c30[_0x4f05e4(0xaf)](_0x514bf3,_0x8e1465),_0x4a7d42),_0x1e6f95=_0x501c30['qXbGY'](_0x40bc76,_0xb45857),_0x50185e=[];let _0x5700ed=_0x40bc76;while(_0x5700ed<_0x1e6f95){const [_0x5d40f7,_0x5278ee]=_0x501c30[_0x4f05e4(0x95)](readId,_0x34dd1a,_0x5700ed),[_0xdbc505,_0x15314c]=_0x501c30['WvKjE'](readVint,_0x34dd1a,_0x5700ed+_0x5278ee),_0x447bd9=_0x501c30[_0x4f05e4(0x8d)](_0x501c30[_0x4f05e4(0xa6)](_0x5278ee,_0x15314c),_0xdbc505);_0x501c30['AJJkj'](_0x5d40f7,ID_DURATION)&&_0x50185e['push'](_0x34dd1a[_0x4f05e4(0xb2)](_0x5700ed,_0x5700ed+_0x447bd9)),_0x5700ed+=_0x447bd9;}const _0x2cb543=Buffer[_0x4f05e4(0x88)](_0x50185e),_0x13c8e8=Buffer['concat']([_0x34dd1a['slice'](_0x514bf3,_0x514bf3+_0x8e1465),writeVint(_0x2cb543['length'],_0x4a7d42)]);return Buffer[_0x4f05e4(0x88)]([_0x34dd1a['slice'](0x0,_0x514bf3),_0x13c8e8,_0x2cb543,_0x34dd1a[_0x4f05e4(0xb2)](_0x1e6f95)]);}_0x514bf3+=_0x8e1465+_0x4a7d42+_0xb45857;}return _0x34dd1a;}export function stitchWebmFiles(_0x357204,_0x1ada94){const _0x37f490=_0x58b5,_0x112c51={'fGxvo':function(_0x324789,_0xd0b1db){return _0x324789<=_0xd0b1db;},'PiykF':function(_0x139632,_0x5eaf87){return _0x139632(_0x5eaf87);},'oWjdH':function(_0x2f774d,_0x413206){return _0x2f774d===_0x413206;},'ONIiw':function(_0x22bdf9,_0x5e0e71,_0x4688dd){return _0x22bdf9(_0x5e0e71,_0x4688dd);}};if(_0x112c51[_0x37f490(0xa4)](_0x357204['length'],0x1))return![];const _0x344df8=[];for(const _0x24eb77 of _0x357204){const _0x25c8ef=readFileSync(_0x24eb77),_0x5232f8=_0x112c51[_0x37f490(0xbd)](parseWebm,_0x25c8ef);if(!_0x5232f8||_0x112c51[_0x37f490(0x9f)](_0x5232f8[_0x37f490(0x86)][_0x37f490(0xbe)],0x0))return![];_0x344df8['push'](_0x5232f8);}const _0x1e8a9a=_0x344df8[0x0],_0x28ee90=_0x112c51['PiykF'](rebuildHeaderWithoutDuration,_0x1e8a9a[_0x37f490(0x81)]),_0x2b4e53=[_0x28ee90];let _0x596fc7=0x0;for(let _0x11a093=0x0;_0x11a093<_0x344df8[_0x37f490(0xbe)];_0x11a093++){const _0x58ee79=_0x344df8[_0x11a093];for(const _0x44f489 of _0x58ee79[_0x37f490(0x86)]){const _0x2bfe1f=_0x44f489['timestamp']+_0x596fc7;_0x2b4e53['push'](buildCluster(_0x2bfe1f,_0x44f489[_0x37f490(0x94)],_0x44f489[_0x37f490(0xa3)]));}const _0x3eb602=0x1e;_0x596fc7+=_0x58ee79['maxTimestampTicks']+_0x3eb602;}return _0x112c51['ONIiw'](writeFileSync,_0x1ada94,Buffer['concat'](_0x2b4e53)),!![];}if(process[_0x5f060a(0xbf)][0x1]?.[_0x5f060a(0x93)](_0x5f060a(0xb4))||process[_0x5f060a(0xbf)][0x1]?.[_0x5f060a(0x93)]('stitchWebmFiles.js')){const args=process['argv'][_0x5f060a(0xb2)](0x2);args[_0x5f060a(0xbe)]<0x3&&(console['error'](_0x5f060a(0xa8)),process['exit'](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x5f060a(0x9a)+inputs[_0x5f060a(0xbe)]+'\x20files\x20->\x20'+output):console[_0x5f060a(0x83)](_0x5f060a(0xbc));}
|