@ranger-testing/ranger-cli 3.0.1-alpha.55b593b-29 → 3.0.1-alpha.bb18058-34
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 -0
- 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 -0
- 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/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/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 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x30a05b,_0x543574){const _0x47a79d=_0x1453,_0x36b760=_0x30a05b();while(!![]){try{const _0x1c4c21=-parseInt(_0x47a79d(0x1dd))/0x1+parseInt(_0x47a79d(0x1d9))/0x2*(parseInt(_0x47a79d(0x1f7))/0x3)+parseInt(_0x47a79d(0x1d4))/0x4*(-parseInt(_0x47a79d(0x1d6))/0x5)+parseInt(_0x47a79d(0x1f0))/0x6+-parseInt(_0x47a79d(0x1f1))/0x7*(-parseInt(_0x47a79d(0x1cc))/0x8)+parseInt(_0x47a79d(0x1e3))/0x9*(-parseInt(_0x47a79d(0x1c3))/0xa)+parseInt(_0x47a79d(0x1d2))/0xb;if(_0x1c4c21===_0x543574)break;else _0x36b760['push'](_0x36b760['shift']());}catch(_0x1a5168){_0x36b760['push'](_0x36b760['shift']());}}}(_0x1243,0xa102a));import{existsSync}from'fs';import _0x1914d4 from'inquirer';import{ApiError,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';function _0x1243(){const _0x1d3dcc=['domains','QVPHf','profile','XoWEG','14057516fgLqzO','WoehG','4YfeaZy','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','6559225LruGcW','startPath','settings','142pQgBHq','ZndeF','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','`ranger\x20profile\x20add`\x20to\x20create\x20one.','317683RzhcuL','url','UDidZ','RANGER_SESSION_STATE_PATH','cdpEndpoint','ncJGj','18xByMMs','list','EQZNy','string','tvHut','attVP','0|3|4|2|1','\x20does\x20not\x20exist.','Cloud\x20profile\x20(recommended)','jSras','FABhe','status','KWEgO','4775100NVgrTy','15449NmUTpn','Profile\x20\x22','JkSGB','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','authPath','resolvedEnv','1203hmuoAF','split','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','cloud','iDJLf','log','2431930XQOJvK','PKlzd','baseUrl','prompt','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','JnzfV','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','peVGo','name','2440xAgxQc','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'];_0x1243=function(){return _0x1d3dcc;};return _0x1243();}import{isInteractive}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(_0x2da5ac){const _0x5afd4b=_0x1453,_0x30380c={'ZndeF':function(_0x243ae3){return _0x243ae3();},'peVGo':function(_0x332146,_0x516dad){return _0x332146===_0x516dad;},'JkSGB':function(_0x2fe858,_0x565826){return _0x2fe858+_0x565826;},'KWEgO':_0x5afd4b(0x1c7),'tvHut':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','zuEKP':_0x5afd4b(0x1bf),'KREZq':_0x5afd4b(0x1c9),'ncJGj':function(_0x52b646,_0x1eb967){return _0x52b646(_0x1eb967);},'BRQKg':function(_0x1a8e9c,_0x508990){return _0x1a8e9c instanceof _0x508990;},'attVP':function(_0x4dd908,_0x5c2243){return _0x4dd908&&_0x5c2243;},'PNbGm':_0x5afd4b(0x1dc),'iDJLf':function(_0x25aa99){return _0x25aa99();},'UQAXD':_0x5afd4b(0x1e4),'eOZEt':_0x5afd4b(0x1eb),'PaewZ':'Local\x20profile','PKlzd':_0x5afd4b(0x1c0),'mUhMe':function(_0x3ede22,_0x172685){return _0x3ede22===_0x172685;},'WoehG':function(_0x29ea37,_0x5762a5,_0x50c8c0){return _0x29ea37(_0x5762a5,_0x50c8c0);},'FABhe':function(_0x448302,_0x4cfcd3){return _0x448302??_0x4cfcd3;},'XjLZo':function(_0x2b9483,_0x5a6e4e){return _0x2b9483(_0x5a6e4e);},'XoWEG':function(_0x388fdc,_0x170424){return _0x388fdc(_0x170424);},'JnzfV':function(_0x53187b,_0xf6c5de){return _0x53187b(_0xf6c5de);}},_0x1e95e0=_0x2da5ac['profile'];let _0x2d2317=_0x2da5ac[_0x5afd4b(0x1d0)]??await _0x30380c[_0x5afd4b(0x1da)](readActiveProfileName),_0x3b4c1d=null;if(!_0x2d2317&&process['env']['RANGER_TEST_USERNAME']){const _0x3e7e2c=await resolveAdHocProfile();_0x3e7e2c&&(_0x2d2317=_0x3e7e2c['name'],_0x3b4c1d=_0x3e7e2c[_0x5afd4b(0x1d0)]);}if(!_0x2d2317)try{const _0x5529b6=await _0x30380c['ZndeF'](listCloudProfiles);if(_0x30380c[_0x5afd4b(0x1ca)](_0x5529b6['length'],0x1)){const _0x42e816=_0x5529b6[0x0];_0x2d2317=_0x42e816[_0x5afd4b(0x1cb)],console[_0x5afd4b(0x1c2)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x42e816[_0x5afd4b(0x1cb)]),console[_0x5afd4b(0x1c2)]('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x2d2317)throw new Error(_0x30380c[_0x5afd4b(0x1f3)](_0x30380c[_0x5afd4b(0x1ef)],_0x30380c[_0x5afd4b(0x1e7)])+_0x30380c['zuEKP']+_0x5afd4b(0x1d5)+_0x30380c['KREZq']);const _0x579f07=getEnvDir(_0x2d2317),_0x35d934=_0x30380c[_0x5afd4b(0x1e2)](existsSync,_0x579f07);let _0x340efa=_0x3b4c1d,_0x43060b=![];if(!_0x340efa)try{_0x340efa=await fetchCloudProfile(_0x2d2317);if(!_0x340efa)_0x43060b=!![];}catch(_0x25812d){_0x30380c['BRQKg'](_0x25812d,ApiError)&&_0x25812d[_0x5afd4b(0x1ee)]===0x194&&(_0x43060b=!![]);}if(_0x30380c[_0x5afd4b(0x1e8)](_0x1e95e0,_0x43060b)&&!_0x35d934&&!_0x340efa)throw new Error(_0x30380c['JkSGB'](_0x30380c['JkSGB']('Profile\x20\x22'+_0x1e95e0+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a',_0x5afd4b(0x1f4)),_0x30380c['PNbGm']));if(_0x30380c[_0x5afd4b(0x1e8)](_0x340efa,_0x35d934)){let _0x2b25eb=!![];if(_0x30380c[_0x5afd4b(0x1c1)](isInteractive)){const {source:_0x1a40c9}=await _0x1914d4[_0x5afd4b(0x1c6)]([{'type':_0x30380c['UQAXD'],'name':'source','message':_0x5afd4b(0x1f2)+_0x2d2317+_0x5afd4b(0x1db),'choices':[{'name':_0x30380c['eOZEt'],'value':_0x5afd4b(0x1c0)},{'name':_0x30380c['PaewZ'],'value':'local'}],'default':_0x30380c[_0x5afd4b(0x1c4)]}]);_0x2b25eb=_0x30380c['mUhMe'](_0x1a40c9,_0x30380c['PKlzd']);}if(!_0x2b25eb)_0x340efa=null;}const _0x1735d=_0x30380c[_0x5afd4b(0x1d3)](readProfileOverrides,process['cwd'](),_0x2d2317);let _0x1c62f1=null,_0x14889b,_0xb09d3e,_0x30bb58,_0xc44ac4,_0xb4da54=null,_0x1dbca9;const _0x6a7c7f=expandOverrides(_0x1735d);if(_0x340efa){_0x1c62f1=_0x340efa;const _0x568e5b=_0x340efa[_0x5afd4b(0x1d8)]??{},_0x22f595=_0x30380c['WoehG'](mergeCloudProfileSettings,_0x568e5b,_0x30380c[_0x5afd4b(0x1ed)](_0x1735d,undefined)),_0x2e3dcc={..._0x340efa,'settings':_0x22f595},_0x1db842=process['env'][_0x5afd4b(0x1e0)];if(_0x1db842){const _0x1e921e=_0x5afd4b(0x1e9)[_0x5afd4b(0x1be)]('|');let _0x1111ea=0x0;while(!![]){switch(_0x1e921e[_0x1111ea++]){case'0':if(!existsSync(_0x1db842))throw new Error('RANGER_SESSION_STATE_PATH='+_0x1db842+_0x5afd4b(0x1ea));continue;case'1':_0xb4da54={'baseUrl':expandString(_0x568e5b['baseUrl']),'startPath':_0x30380c['XjLZo'](expandString,_0x568e5b[_0x5afd4b(0x1d7)])};continue;case'2':_0x30bb58=_0x30380c[_0x5afd4b(0x1e2)](Boolean,_0xb09d3e['cdpEndpoint']);continue;case'3':_0x14889b=_0x1db842;continue;case'4':_0xb09d3e=_0x30380c[_0x5afd4b(0x1d1)](resolveEnvVars,_0x22f595);continue;}break;}}else{const _0x1783f1=await _0x30380c['XoWEG'](resolveCloudProfileSession,_0x2e3dcc);_0x14889b=_0x1783f1[_0x5afd4b(0x1f5)],_0xb09d3e=_0x30380c['JnzfV'](resolveEnvVars,_0x1783f1[_0x5afd4b(0x1d8)]),_0x30bb58=_0x30380c['XjLZo'](Boolean,_0xb09d3e['cdpEndpoint']),_0xb4da54={'baseUrl':expandString(_0x568e5b['baseUrl']),'startPath':expandString(_0x568e5b['startPath'])},_0x1dbca9=_0x1783f1[_0x5afd4b(0x1f6)]?.[_0x5afd4b(0x1ce)]?.[0x0];}}else{if(!_0x35d934)throw new Error('Profile\x20\x22'+_0x2d2317+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x2d2317);const _0x217d61=await _0x30380c[_0x5afd4b(0x1c8)](loadSettings,_0x2d2317);_0xb09d3e=_0x30380c['ncJGj'](resolveEnvVars,_0x217d61),_0x30bb58=Boolean(_0xb09d3e[_0x5afd4b(0x1e1)]),_0xc44ac4=_0xb09d3e['baseUrl'];}const _0x1c2d3e=readUrlEnvVars(),_0x59e097=resolveProfileUrl({'flagBaseUrl':_0x2da5ac[_0x5afd4b(0x1c5)],'flagStartPath':_0x2da5ac[_0x5afd4b(0x1d7)],'envBaseUrl':_0x1c2d3e['envBaseUrl'],'envStartPath':_0x1c2d3e['envStartPath'],'localSettingsBaseUrl':_0xc44ac4,'projectOverrides':_0x6a7c7f,'cloudSettings':_0xb4da54,'authEnvironmentDomain':_0x1dbca9}),_0x1ea019=_0x59e097[_0x5afd4b(0x1de)]??_0x59e097[_0x5afd4b(0x1c5)];if(!_0x1ea019&&!_0x30bb58)throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x2d2317+_0x5afd4b(0x1cd)+_0x2d2317+'\x20baseUrl\x20<url>');return{'activeProfile':_0x2d2317,'resolvedCloudProfile':_0x1c62f1,'cloudAuthPath':_0x14889b,'resolvedSettings':_0xb09d3e,'isCdpMode':_0x30bb58,'url':_0x1ea019,'startPath':_0x59e097['startPath']};}function _0x1453(_0xb6e9c1,_0x3ce398){_0xb6e9c1=_0xb6e9c1-0x1be;const _0x124330=_0x1243();let _0x14530d=_0x124330[_0xb6e9c1];return _0x14530d;}function expandString(_0x42f96d){const _0x261c0a=_0x1453,_0x16cf29={'rRLik':function(_0x5aee4f,_0x2a6c22){return _0x5aee4f!==_0x2a6c22;},'UDidZ':_0x261c0a(0x1e6),'EQZNy':function(_0xdcb71a,_0xc5371e){return _0xdcb71a(_0xc5371e);}};if(_0x16cf29['rRLik'](typeof _0x42f96d,_0x16cf29[_0x261c0a(0x1df)]))return _0x42f96d;return _0x16cf29[_0x261c0a(0x1e5)](resolveEnvVars,_0x42f96d);}function expandOverrides(_0x5f7249){const _0x2617cb=_0x1453,_0x17b90c={'QVPHf':function(_0x2d6317,_0x456b28){return _0x2d6317===_0x456b28;},'jSras':'string','nZoIH':function(_0x45f6a1,_0x4d012a){return _0x45f6a1(_0x4d012a);}};if(!_0x5f7249)return _0x5f7249;const _0x5f9dbc={..._0x5f7249};return _0x17b90c[_0x2617cb(0x1cf)](typeof _0x5f9dbc['baseUrl'],_0x17b90c['jSras'])&&(_0x5f9dbc[_0x2617cb(0x1c5)]=resolveEnvVars(_0x5f9dbc['baseUrl'])),_0x17b90c['QVPHf'](typeof _0x5f9dbc['startPath'],_0x17b90c[_0x2617cb(0x1ec)])&&(_0x5f9dbc[_0x2617cb(0x1d7)]=_0x17b90c['nZoIH'](resolveEnvVars,_0x5f9dbc[_0x2617cb(0x1d7)])),_0x5f9dbc;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x51cac8,_0x5165ad){const _0x4d465a=_0x2166,_0x1a8ba3=_0x51cac8();while(!![]){try{const _0x567237=parseInt(_0x4d465a(0x103))/0x1+-parseInt(_0x4d465a(0xf3))/0x2+parseInt(_0x4d465a(0xf2))/0x3+parseInt(_0x4d465a(0x100))/0x4+parseInt(_0x4d465a(0xfb))/0x5+-parseInt(_0x4d465a(0xf4))/0x6+-parseInt(_0x4d465a(0xf9))/0x7;if(_0x567237===_0x5165ad)break;else _0x1a8ba3['push'](_0x1a8ba3['shift']());}catch(_0x59d66f){_0x1a8ba3['push'](_0x1a8ba3['shift']());}}}(_0x1444,0x1e205));function _0x2166(_0x4c6798,_0x41dcd6){_0x4c6798=_0x4c6798-0xf0;const _0x144498=_0x1444();let _0x216612=_0x144498[_0x4c6798];return _0x216612;}function firstDefined(..._0x4b2ce3){const _0x358532=_0x2166,_0xa0eb1f={'LXMZZ':function(_0x4803be,_0x3e0905){return _0x4803be!==_0x3e0905;}};for(const _0x4c77db of _0x4b2ce3){if(_0x4c77db!==undefined&&_0xa0eb1f[_0x358532(0xf7)](_0x4c77db,null)&&_0xa0eb1f['LXMZZ'](_0x4c77db,''))return _0x4c77db;}return undefined;}function _0x1444(){const _0x3650dd=['flagBaseUrl','555198raNYDb','81086UNlyHT','566982LFSnJp','yBAiG','hVvkN','LXMZZ','test','2209935euSbYg','string','489760DbrjRR','baseUrl','startPath','slice','cloudSettings','204072HBAaxW','projectOverrides','envBaseUrl','240106zwJAFR','CwzuX','HbXLE'];_0x1444=function(){return _0x3650dd;};return _0x1444();}function normalizeAuthEnvironmentDomain(_0x4aacb0){const _0x426d7d=_0x2166;if(!_0x4aacb0)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x426d7d(0xf8)](_0x4aacb0))return _0x4aacb0;return'https://'+_0x4aacb0;}export function resolveBaseUrl(_0xa4d3c4){const _0x46b1b5=_0x2166,_0x1d2867={'CwzuX':function(_0x64ca6d,_0xabaa64){return _0x64ca6d in _0xabaa64;},'kykyU':function(_0x53f45f,_0x50bd0d){return _0x53f45f===_0x50bd0d;},'KHWyU':function(_0x4f3c7a,_0x386464){return _0x4f3c7a(_0x386464);}},_0x13b469=_0xa4d3c4[_0x46b1b5(0x101)],_0x24e44b=!!_0x13b469&&_0x1d2867[_0x46b1b5(0x104)]('baseUrl',_0x13b469),_0x2550e0=_0x13b469?.[_0x46b1b5(0xfc)],_0x587fca=!(_0x24e44b&&_0x1d2867['kykyU'](_0x2550e0,null));return firstDefined(_0xa4d3c4[_0x46b1b5(0xf1)],_0xa4d3c4[_0x46b1b5(0x102)],_0xa4d3c4['localSettingsBaseUrl'],typeof _0x2550e0===_0x46b1b5(0xfa)?_0x2550e0:undefined,_0x587fca?_0xa4d3c4[_0x46b1b5(0xff)]?.[_0x46b1b5(0xfc)]:undefined,_0x587fca?_0x1d2867['KHWyU'](normalizeAuthEnvironmentDomain,_0xa4d3c4['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x2ad2a3){const _0x3bce1d=_0x2166,_0x580fa6={'hVvkN':_0x3bce1d(0xfd),'yBAiG':_0x3bce1d(0xfa)},_0x4aa2d4=_0x2ad2a3[_0x3bce1d(0x101)],_0x1741da=!!_0x4aa2d4&&_0x580fa6[_0x3bce1d(0xf6)]in _0x4aa2d4,_0x351211=_0x4aa2d4?.['startPath'],_0x149acf=!(_0x1741da&&_0x351211===null);return firstDefined(_0x2ad2a3['flagStartPath'],_0x2ad2a3['envStartPath'],typeof _0x351211===_0x580fa6[_0x3bce1d(0xf5)]?_0x351211:undefined,_0x149acf?_0x2ad2a3[_0x3bce1d(0xff)]?.[_0x3bce1d(0xfd)]:undefined);}export function joinBaseAndPath(_0x59f94a,_0xa8bbde){const _0x5ca99e=_0x2166,_0x512f21={'qxZCD':function(_0x3f5ca3,_0x3821bb){return _0x3f5ca3+_0x3821bb;}};if(!_0x59f94a)return undefined;if(!_0xa8bbde)return _0x59f94a;const _0x2d493f=_0x59f94a['endsWith']('/')?_0x59f94a[_0x5ca99e(0xfe)](0x0,-0x1):_0x59f94a,_0x47f5b1=_0xa8bbde['startsWith']('/')?_0xa8bbde:'/'+_0xa8bbde;return _0x512f21['qxZCD'](_0x2d493f,_0x47f5b1);}export function resolveProfileUrl(_0xb4b60){const _0x50f2cf=_0x2166,_0x3bfa06={'HbXLE':function(_0x3989f4,_0x7e87ff){return _0x3989f4(_0x7e87ff);}},_0x441647=resolveBaseUrl(_0xb4b60),_0x2ed4e3=_0x3bfa06[_0x50f2cf(0xf0)](resolveStartPath,_0xb4b60);return{'baseUrl':_0x441647,'startPath':_0x2ed4e3,'url':joinBaseAndPath(_0x441647,_0x2ed4e3)};}export function readUrlEnvVars(_0x5c663b=process['env']){return{'envBaseUrl':_0x5c663b['RANGER_BASE_URL'],'envStartPath':_0x5c663b['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x218e(){const _0x146914=['ms...','304715jOkQeJ','104pGbzbZ','462669eJneTv','737qNdcFj','1079508tqnmHZ','18TKLGpN','310SbaNiB','12YaVeSP','635990IYqBBT','),\x20retrying\x20in\x20','291888SPRDQd','dxlFy','error','131467tTTBOd','137907XtBqtt','maxRetries'];_0x218e=function(){return _0x146914;};return _0x218e();}function _0x47ee(_0x53b57d,_0x24d4c5){_0x53b57d=_0x53b57d-0x7a;const _0x218eae=_0x218e();let _0x47ee8f=_0x218eae[_0x53b57d];return _0x47ee8f;}(function(_0x2a4072,_0x5c6285){const _0x380cc4=_0x47ee,_0x3fb9dd=_0x2a4072();while(!![]){try{const _0x1aa52f=-parseInt(_0x380cc4(0x88))/0x1+parseInt(_0x380cc4(0x7b))/0x2+parseInt(_0x380cc4(0x8a))/0x3*(-parseInt(_0x380cc4(0x7e))/0x4)+parseInt(_0x380cc4(0x7f))/0x5*(-parseInt(_0x380cc4(0x7c))/0x6)+parseInt(_0x380cc4(0x84))/0x7*(-parseInt(_0x380cc4(0x89))/0x8)+-parseInt(_0x380cc4(0x85))/0x9*(parseInt(_0x380cc4(0x7d))/0xa)+parseInt(_0x380cc4(0x7a))/0xb*(parseInt(_0x380cc4(0x81))/0xc);if(_0x1aa52f===_0x5c6285)break;else _0x3fb9dd['push'](_0x3fb9dd['shift']());}catch(_0x4b7f36){_0x3fb9dd['push'](_0x3fb9dd['shift']());}}}(_0x218e,0x49906));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x1a7339,_0x2259d1){const _0x456bed=_0x47ee,_0x539b1d={'WHxWE':function(_0x3c3e29){return _0x3c3e29();},'dxlFy':function(_0x14e527,_0x4f5a3f){return _0x14e527(_0x4f5a3f);},'GfQYI':function(_0x211407,_0x516c21){return _0x211407+_0x516c21;},'vLtzb':function(_0x5ace79,_0x5cb39b){return _0x5ace79+_0x5cb39b;}},_0x127bee=_0x2259d1?.[_0x456bed(0x86)]??DEFAULT_MAX_RETRIES,_0x32f317=_0x2259d1?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x26147c;for(let _0xf87026=0x0;_0xf87026<=_0x127bee;_0xf87026++){try{return await _0x539b1d['WHxWE'](_0x1a7339);}catch(_0x355f00){_0x26147c=_0x355f00 instanceof Error?_0x355f00:new Error(_0x539b1d[_0x456bed(0x82)](String,_0x355f00));if(_0xf87026<_0x127bee){const _0xeb787=_0x32f317*Math['pow'](0x2,_0xf87026);_0x2259d1?.['label']&&console[_0x456bed(0x83)](_0x2259d1['label']+'\x20failed\x20(attempt\x20'+_0x539b1d['GfQYI'](_0xf87026,0x1)+'/'+_0x539b1d['vLtzb'](_0x127bee,0x1)+_0x456bed(0x80)+_0xeb787+_0x456bed(0x87)),await new Promise(_0x3e5553=>setTimeout(_0x3e5553,_0xeb787));}}}throw _0x26147c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x323b18=_0x3d3e;(function(_0x11428d,_0x122e9f){const _0x3e785c=_0x3d3e,_0x406684=_0x11428d();while(!![]){try{const _0x352da7=-parseInt(_0x3e785c(0x14a))/0x1+-parseInt(_0x3e785c(0x124))/0x2+parseInt(_0x3e785c(0x147))/0x3+parseInt(_0x3e785c(0x14c))/0x4+parseInt(_0x3e785c(0x14e))/0x5*(-parseInt(_0x3e785c(0x142))/0x6)+parseInt(_0x3e785c(0x13b))/0x7+-parseInt(_0x3e785c(0x12c))/0x8;if(_0x352da7===_0x122e9f)break;else _0x406684['push'](_0x406684['shift']());}catch(_0x4fb1cf){_0x406684['push'](_0x406684['shift']());}}}(_0x332b,0x64233));import*as _0x46a704 from'fs';import*as _0x5e0183 from'path';import*as _0x3d984e from'os';import{execSync}from'child_process';function _0x3d3e(_0x3c202e,_0x551e91){_0x3c202e=_0x3c202e-0x121;const _0x332b00=_0x332b();let _0x3d3e14=_0x332b00[_0x3c202e];return _0x3d3e14;}const CACHE_FILE=_0x5e0183[_0x323b18(0x129)](_0x3d984e['homedir'](),_0x323b18(0x136),_0x323b18(0x12f));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x1aba21=_0x323b18;try{if(_0x46a704[_0x1aba21(0x128)](CACHE_FILE)){const _0x48f169=JSON['parse'](_0x46a704['readFileSync'](CACHE_FILE,_0x1aba21(0x148)));return{'version':0x3,'sessions':_0x48f169['sessions']||{},'branches':_0x48f169['branches']||{},'lastEnabledSessionClearedAt':_0x48f169[_0x1aba21(0x141)]};}}catch{}return createEmptyCache();}function saveCache(_0x5a736a){const _0x2a8caa=_0x323b18;try{const _0xc2a264=_0x5e0183['dirname'](CACHE_FILE);!_0x46a704[_0x2a8caa(0x128)](_0xc2a264)&&_0x46a704['mkdirSync'](_0xc2a264,{'recursive':!![]}),_0x46a704[_0x2a8caa(0x13a)](CACHE_FILE,JSON[_0x2a8caa(0x126)](_0x5a736a,null,0x2));}catch{}}export function getCurrentBranch(){const _0x17124e=_0x323b18,_0x393194={'PxdGY':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','akQEH':_0x17124e(0x13f),'eNRhs':_0x17124e(0x12d)};try{const _0x2e553e=execSync(_0x393194[_0x17124e(0x12a)],{'encoding':'utf-8','stdio':['pipe',_0x393194['akQEH'],_0x393194[_0x17124e(0x144)]]})['trim']();if(!_0x2e553e||_0x2e553e===_0x393194[_0x17124e(0x13c)])return null;return _0x2e553e;}catch{return null;}}export function enableBranch(_0x5c6e5b){const _0x53df42=_0x323b18,_0x20dcdc=loadCache();_0x20dcdc[_0x53df42(0x12b)][_0x5c6e5b]=!![],saveCache(_0x20dcdc);}export function disableBranch(_0x54e19a){const _0x591948=_0x323b18,_0x5a8499={'lrvBl':function(_0x205c60,_0x19ee44){return _0x205c60(_0x19ee44);}},_0x5160df=loadCache();delete _0x5160df[_0x591948(0x12b)][_0x54e19a],_0x5a8499[_0x591948(0x14f)](saveCache,_0x5160df);}export function isBranchEnabled(_0x5777d6){const _0x5c2ac2=_0x323b18,_0x41e9ff=loadCache();return _0x41e9ff[_0x5c2ac2(0x12b)][_0x5777d6]===!![];}function getOrCreateSession(_0x5a6ece,_0xc98019){const _0x346b95=_0x323b18;return!_0x5a6ece['sessions'][_0xc98019]&&(_0x5a6ece['sessions'][_0xc98019]={}),_0x5a6ece[_0x346b95(0x140)][_0xc98019];}export function enableSession(_0x49b8fa){const _0x293056=_0x323b18,_0x4150b8={'LDznc':function(_0x333ba9){return _0x333ba9();},'wqwxc':function(_0x437706,_0x5237df,_0x6e35){return _0x437706(_0x5237df,_0x6e35);},'BjxsT':function(_0x5601c2,_0x391908){return _0x5601c2!==_0x391908;}},_0x2a3028=_0x4150b8[_0x293056(0x132)](loadCache),_0x560b1f=_0x4150b8['wqwxc'](getOrCreateSession,_0x2a3028,_0x49b8fa);_0x560b1f['enabled']=!![];const _0x350ab8=getCurrentBranch();_0x350ab8&&_0x4150b8[_0x293056(0x127)](_0x350ab8,'main')&&_0x4150b8[_0x293056(0x127)](_0x350ab8,'master')&&(_0x2a3028['branches'][_0x350ab8]=!![],_0x560b1f['currentBranch']=_0x350ab8),saveCache(_0x2a3028);}export function isSessionEnabled(_0xa1138f){const _0x12e8be=_0x323b18,_0x52ff87={'rKKIl':function(_0x52ac19){return _0x52ac19();},'uBVQO':function(_0x133a10,_0x3b953f){return _0x133a10===_0x3b953f;},'meKQo':'main','BJVbH':function(_0x41b846,_0x2f311c){return _0x41b846||_0x2f311c;}},_0x41d67c=_0x52ff87['rKKIl'](loadCache),_0x5497be=getCurrentBranch();if(!_0x5497be||_0x52ff87['uBVQO'](_0x5497be,_0x52ff87['meKQo'])||_0x5497be==='master')return _0x52ff87[_0x12e8be(0x150)](_0x41d67c[_0x12e8be(0x140)][_0xa1138f]?.['enabled'],!![]);const _0x6b2d96=_0x41d67c['branches'][_0x5497be]===!![],_0x2d9e70=_0x41d67c[_0x12e8be(0x140)][_0xa1138f]?.[_0x12e8be(0x121)]===!![];return _0x52ff87[_0x12e8be(0x122)](_0x6b2d96,_0x2d9e70);}export function disableSession(_0x1bd42f){const _0x341578=_0x323b18,_0x389934={'mDsEF':function(_0x40c53f){return _0x40c53f();},'nisNo':function(_0x2c8612,_0x1683cc,_0x5ebbfd){return _0x2c8612(_0x1683cc,_0x5ebbfd);}},_0x1e3a3d=_0x389934['mDsEF'](loadCache),_0x3ebe6a=_0x389934[_0x341578(0x133)](getOrCreateSession,_0x1e3a3d,_0x1bd42f);_0x3ebe6a[_0x341578(0x121)]=![],saveCache(_0x1e3a3d);}export function updateBranchTracking(_0x549154){const _0x23bae9=_0x323b18,_0x4cb979={'NRXYO':function(_0x5c84f3){return _0x5c84f3();},'UTNGx':function(_0x1db6f8,_0x45a3d3){return _0x1db6f8===_0x45a3d3;},'LOEAw':'main','MWpTC':'master'},_0x5bc3ea=_0x4cb979['NRXYO'](loadCache),_0x16b119=_0x5bc3ea[_0x23bae9(0x140)][_0x549154];if(!_0x16b119?.['enabled'])return;const _0x2035fc=getCurrentBranch();if(!_0x2035fc||_0x4cb979[_0x23bae9(0x145)](_0x2035fc,_0x4cb979[_0x23bae9(0x135)])||_0x2035fc===_0x4cb979['MWpTC'])return;_0x16b119['currentBranch']!==_0x2035fc&&(_0x5bc3ea[_0x23bae9(0x12b)][_0x2035fc]=!![],_0x16b119['currentBranch']=_0x2035fc,saveCache(_0x5bc3ea));}export function initBranchTracking(_0x22b201){const _0x2c588a=_0x323b18,_0x2c5043={'XvFVx':function(_0x54e162){return _0x54e162();},'YnOeQ':function(_0x4db0b9){return _0x4db0b9();},'UqrhH':function(_0x2ef780,_0x271116){return _0x2ef780===_0x271116;},'PcOeb':function(_0x3469ca,_0x2bdb3c){return _0x3469ca(_0x2bdb3c);}},_0x19748e=_0x2c5043[_0x2c588a(0x139)](loadCache),_0x26966f=_0x2c5043['YnOeQ'](getCurrentBranch);if(!_0x26966f||_0x2c5043['UqrhH'](_0x26966f,'main')||_0x26966f===_0x2c588a(0x149))return;if(_0x2c5043['UqrhH'](_0x19748e[_0x2c588a(0x12b)][_0x26966f],!![])){const _0x285b73=getOrCreateSession(_0x19748e,_0x22b201);_0x285b73['enabled']=!![],_0x285b73[_0x2c588a(0x138)]=_0x26966f,_0x2c5043['PcOeb'](saveCache,_0x19748e);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x35af1c){const _0x351998=_0x323b18,_0x1dd472={'wyQRr':function(_0x1b20c2){return _0x1b20c2();}},_0x602791=_0x1dd472['wyQRr'](loadCache),_0x928594=_0x602791['sessions'][_0x35af1c];_0x928594?.[_0x351998(0x121)]&&(_0x602791[_0x351998(0x141)]=Date[_0x351998(0x151)](),saveCache(_0x602791));}export function shouldAutoEnableAfterClear(_0x267b92){const _0x48be5b=_0x323b18,_0x6926a0={'oHlGB':'clear'};if(_0x267b92!==_0x6926a0['oHlGB'])return![];const _0x9ad938=loadCache(),_0x2e19a3=_0x9ad938['lastEnabledSessionClearedAt'];if(!_0x2e19a3)return![];const _0x2a484b=Date[_0x48be5b(0x151)]()-_0x2e19a3;return _0x2a484b<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x2b39f0){const _0x2964d5=_0x323b18,_0x5a4ecd={'HicdQ':function(_0x5b4aa7,_0x58759e,_0x154ad3){return _0x5b4aa7(_0x58759e,_0x154ad3);},'jAPiz':function(_0x1cc335,_0x4851b5){return _0x1cc335!==_0x4851b5;}},_0x33e671=loadCache(),_0x2e32f9=_0x5a4ecd[_0x2964d5(0x137)](getOrCreateSession,_0x33e671,_0x2b39f0);_0x2e32f9[_0x2964d5(0x121)]=!![];const _0x1d2359=getCurrentBranch();_0x1d2359&&_0x5a4ecd[_0x2964d5(0x123)](_0x1d2359,'main')&&_0x5a4ecd[_0x2964d5(0x123)](_0x1d2359,'master')&&(_0x2e32f9['currentBranch']=_0x1d2359),delete _0x33e671['lastEnabledSessionClearedAt'],saveCache(_0x33e671);}export function registerSession(_0x278cdc,_0x20b269){const _0x344ebd=_0x323b18,_0x25131f={'lutHJ':function(_0x2bbf56,_0x64565a,_0x343033){return _0x2bbf56(_0x64565a,_0x343033);}},_0x28f18f=loadCache(),_0x2ff7cc=_0x25131f['lutHJ'](getOrCreateSession,_0x28f18f,_0x278cdc);_0x2ff7cc[_0x344ebd(0x14d)]=_0x20b269,_0x2ff7cc[_0x344ebd(0x14b)]=new Date()[_0x344ebd(0x131)](),saveCache(_0x28f18f);}export function getSessionEntry(_0x47d5bc){const _0x3f5b15=_0x323b18,_0xc917f3=loadCache(),_0x3468b0=_0xc917f3[_0x3f5b15(0x140)][_0x47d5bc];if(_0x3468b0?.['featureId']&&_0x3468b0?.[_0x3f5b15(0x14b)])return{'featureId':_0x3468b0[_0x3f5b15(0x14d)],'registeredAt':_0x3468b0[_0x3f5b15(0x14b)]};return null;}export function unregisterSession(_0x4b8f15){const _0x49a630=_0x323b18,_0x1b753b={'ikBay':function(_0x1ab7c4){return _0x1ab7c4();},'GBzqe':function(_0x3be537,_0x4da8d5){return _0x3be537(_0x4da8d5);}},_0x58088d=_0x1b753b[_0x49a630(0x143)](loadCache),_0x10d17f=_0x58088d[_0x49a630(0x140)][_0x4b8f15];_0x10d17f&&(delete _0x10d17f['featureId'],delete _0x10d17f[_0x49a630(0x14b)],_0x1b753b[_0x49a630(0x130)](saveCache,_0x58088d));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x20e6ea){const _0x217491=_0x323b18,_0x5d27fe={'KMmQk':function(_0x5cb7aa,_0x5ce4c3,_0x220b22){return _0x5cb7aa(_0x5ce4c3,_0x220b22);},'bnRyO':function(_0x31ee9e,_0x257e3c){return _0x31ee9e>=_0x257e3c;},'Rtrza':function(_0x478cd5,_0x2cfd5c){return _0x478cd5-_0x2cfd5c;}},_0x9e0e58=loadCache(),_0x36dca2=_0x5d27fe[_0x217491(0x125)](getOrCreateSession,_0x9e0e58,_0x20e6ea),_0x21b74a=_0x36dca2['lastPlanReminderAt']||0x0,_0x3e6aca=Date['now']();if(_0x5d27fe[_0x217491(0x13d)](_0x5d27fe[_0x217491(0x146)](_0x3e6aca,_0x21b74a),PLAN_REMINDER_INTERVAL_MS))return _0x36dca2[_0x217491(0x134)]=_0x3e6aca,saveCache(_0x9e0e58),!![];return![];}function _0x332b(){const _0x43551f=['nisNo','lastPlanReminderAt','LOEAw','.claude','HicdQ','currentBranch','XvFVx','writeFileSync','3330467aLeWig','eNRhs','bnRyO','avuRi','pipe','sessions','lastEnabledSessionClearedAt','13746ehnuUz','ikBay','akQEH','UTNGx','Rtrza','360717mDLQnF','utf-8','master','92840btPPHv','registeredAt','3211972cZFzts','featureId','210ZAGQni','lrvBl','uBVQO','now','enabled','BJVbH','jAPiz','1452244nmfJTF','KMmQk','stringify','BjxsT','existsSync','join','PxdGY','branches','589328YTXgDa','HEAD','JAugA','.ranger_cache.json','GBzqe','toISOString','LDznc'];_0x332b=function(){return _0x43551f;};return _0x332b();}export function shouldShowStopReminder(_0x477088){const _0xe52f58=_0x323b18,_0x7ee578={'DDUxo':function(_0x53b997,_0x5ed787,_0x28b60c){return _0x53b997(_0x5ed787,_0x28b60c);},'hiWKb':function(_0x492895,_0x51744a){return _0x492895-_0x51744a;},'JAugA':function(_0x214104,_0x3a49f3){return _0x214104(_0x3a49f3);}},_0xa35d0d=loadCache(),_0x31e1c8=_0x7ee578['DDUxo'](getOrCreateSession,_0xa35d0d,_0x477088),_0x562f19=_0x31e1c8['lastStopReminderAt']||0x0,_0x8dc0b6=Date[_0xe52f58(0x151)]();if(_0x7ee578['hiWKb'](_0x8dc0b6,_0x562f19)>=STOP_REMINDER_INTERVAL_MS)return _0x31e1c8['lastStopReminderAt']=_0x8dc0b6,_0x7ee578[_0xe52f58(0x12e)](saveCache,_0xa35d0d),!![];return![];}export function hasSessionBeenPrompted(_0x505474){const _0x1071b8={'qEpAC':function(_0x297789){return _0x297789();}},_0x3c0cdb=_0x1071b8['qEpAC'](loadCache);return _0x3c0cdb['sessions'][_0x505474]?.['prompted']===!![];}export function markSessionPrompted(_0x354f07){const _0x88a167=_0x323b18,_0xfaa6a9={'jOXuv':function(_0x47f6fe){return _0x47f6fe();},'avuRi':function(_0x11896f,_0x1e8f55,_0x31748d){return _0x11896f(_0x1e8f55,_0x31748d);}},_0x96a4c4=_0xfaa6a9['jOXuv'](loadCache),_0xeb3cde=_0xfaa6a9[_0x88a167(0x13e)](getOrCreateSession,_0x96a4c4,_0x354f07);_0xeb3cde['prompted']=!![],saveCache(_0x96a4c4);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x582ff1=_0x1586;(function(_0x24333c,_0x57c671){const _0x58a672=_0x1586,_0x4df608=_0x24333c();while(!![]){try{const _0x1fbda0=-parseInt(_0x58a672(0x90))/0x1*(-parseInt(_0x58a672(0x88))/0x2)+-parseInt(_0x58a672(0xa5))/0x3*(parseInt(_0x58a672(0x73))/0x4)+-parseInt(_0x58a672(0x87))/0x5*(parseInt(_0x58a672(0x98))/0x6)+parseInt(_0x58a672(0x7b))/0x7*(-parseInt(_0x58a672(0xa0))/0x8)+-parseInt(_0x58a672(0x95))/0x9*(parseInt(_0x58a672(0x7d))/0xa)+parseInt(_0x58a672(0x7e))/0xb+parseInt(_0x58a672(0xaa))/0xc;if(_0x1fbda0===_0x57c671)break;else _0x4df608['push'](_0x4df608['shift']());}catch(_0x2d179c){_0x4df608['push'](_0x4df608['shift']());}}}(_0x3308,0xb4e64));import*as _0x32d4d2 from'fs';import*as _0x16497f from'path';import*as _0x48cda2 from'os';function _0x1586(_0xc8c32e,_0x2fe24b){_0xc8c32e=_0xc8c32e-0x6f;const _0x3308b8=_0x3308();let _0x1586b1=_0x3308b8[_0xc8c32e];return _0x1586b1;}function _0x3308(){const _0x30b62e=['wrZLQ','lastEnabledSessionClearedAt','zSldp','enabled','1119moXTdH','master','readFileSync','Xvwid','mqtJI','45207120EgjnxR','prompted','pipe','ZzgWx','mRQbo','dirname','11084YjTHvk','utf-8','parse','branches','RlmBK','qEhPi','main','JYTez','28JxPKOz','homedir','4478990IVfNmX','12458435pREFIX','currentBranch','now','mkdirSync','stringify','sessions','BoKyM','wQbLw','existsSync','5CvoWDD','376490kAKoJv','featureId','tZdAO','wiUaY','IZmSy','lastStopReminderAt','FFruW','xxccN','3kQEEWH','WnWcA','LqbBE','writeFileSync','join','18GKEbXZ','HEAD','registeredAt','8176722JBMukh','JMXvT','upjVO','QSUog','clear','gVRaG','rnyRZ','txllG','2862896VgbXUA'];_0x3308=function(){return _0x30b62e;};return _0x3308();}import{execSync}from'child_process';const CACHE_FILE=_0x16497f[_0x582ff1(0x94)](_0x48cda2[_0x582ff1(0x7c)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x55d9b3=_0x582ff1;try{if(_0x32d4d2[_0x55d9b3(0x86)](CACHE_FILE)){const _0x16c992=JSON[_0x55d9b3(0x75)](_0x32d4d2[_0x55d9b3(0xa7)](CACHE_FILE,'utf-8'));return{'version':0x3,'sessions':_0x16c992[_0x55d9b3(0x83)]||{},'branches':_0x16c992['branches']||{},'lastEnabledSessionClearedAt':_0x16c992[_0x55d9b3(0xa2)]};}}catch{}return createEmptyCache();}function saveCache(_0x42425c){const _0x5602d7=_0x582ff1;try{const _0x4f9b85=_0x16497f[_0x5602d7(0x72)](CACHE_FILE);!_0x32d4d2['existsSync'](_0x4f9b85)&&_0x32d4d2[_0x5602d7(0x81)](_0x4f9b85,{'recursive':!![]}),_0x32d4d2[_0x5602d7(0x93)](CACHE_FILE,JSON[_0x5602d7(0x82)](_0x42425c,null,0x2));}catch{}}export function getCurrentBranch(){const _0x107c11=_0x582ff1,_0x564c66={'wrZLQ':function(_0x51612f,_0x45ef49,_0x17ce9e){return _0x51612f(_0x45ef49,_0x17ce9e);},'Xvwid':_0x107c11(0x74),'PHjzt':_0x107c11(0x6f),'LqbBE':function(_0x259000,_0x6a6a7f){return _0x259000===_0x6a6a7f;}};try{const _0x574332=_0x564c66[_0x107c11(0xa1)](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x564c66[_0x107c11(0xa8)],'stdio':[_0x564c66['PHjzt'],'pipe','pipe']})['trim']();if(!_0x574332||_0x564c66[_0x107c11(0x92)](_0x574332,_0x107c11(0x96)))return null;return _0x574332;}catch{return null;}}export function enableBranch(_0x3d8bb2){const _0x888178=_0x582ff1,_0x41bf4e={'wQbLw':function(_0xfbe02a,_0x2587b5){return _0xfbe02a(_0x2587b5);}},_0x1f5f3f=loadCache();_0x1f5f3f[_0x888178(0x76)][_0x3d8bb2]=!![],_0x41bf4e[_0x888178(0x85)](saveCache,_0x1f5f3f);}export function disableBranch(_0x2c7d23){const _0x6d6b61=_0x582ff1,_0x362ffc={'tZdAO':function(_0x235c3f){return _0x235c3f();}},_0x4472d0=_0x362ffc[_0x6d6b61(0x8a)](loadCache);delete _0x4472d0[_0x6d6b61(0x76)][_0x2c7d23],saveCache(_0x4472d0);}export function isBranchEnabled(_0x14284c){const _0x5105c3=_0x582ff1,_0x35c6b7=loadCache();return _0x35c6b7[_0x5105c3(0x76)][_0x14284c]===!![];}function getOrCreateSession(_0x2f76e8,_0x2c232c){const _0xfa0e28=_0x582ff1;return!_0x2f76e8[_0xfa0e28(0x83)][_0x2c232c]&&(_0x2f76e8['sessions'][_0x2c232c]={}),_0x2f76e8['sessions'][_0x2c232c];}export function enableSession(_0x1f1316){const _0x242d85=_0x582ff1,_0x131839={'UDVZQ':function(_0x2625d2,_0x594bc3){return _0x2625d2!==_0x594bc3;},'gVRaG':_0x242d85(0x79),'gdePp':'master','rnyRZ':function(_0xa7e7dc,_0xba66f9){return _0xa7e7dc(_0xba66f9);}},_0x5130f7=loadCache(),_0x355c0c=getOrCreateSession(_0x5130f7,_0x1f1316);_0x355c0c['enabled']=!![];const _0x348fa9=getCurrentBranch();_0x348fa9&&_0x131839['UDVZQ'](_0x348fa9,_0x131839[_0x242d85(0x9d)])&&_0x131839['UDVZQ'](_0x348fa9,_0x131839['gdePp'])&&(_0x5130f7[_0x242d85(0x76)][_0x348fa9]=!![],_0x355c0c['currentBranch']=_0x348fa9),_0x131839[_0x242d85(0x9e)](saveCache,_0x5130f7);}export function isSessionEnabled(_0x34434d){const _0x75b4c=_0x582ff1,_0x4730d1={'ZzgWx':function(_0x3935f9,_0x34f8b7){return _0x3935f9===_0x34f8b7;},'WnWcA':function(_0x17d520,_0x17154d){return _0x17d520||_0x17154d;}},_0x1af731=loadCache(),_0xdc59a3=getCurrentBranch();if(!_0xdc59a3||_0x4730d1[_0x75b4c(0x70)](_0xdc59a3,_0x75b4c(0x79))||_0x4730d1[_0x75b4c(0x70)](_0xdc59a3,_0x75b4c(0xa6)))return _0x1af731['sessions'][_0x34434d]?.['enabled']===!![];const _0x275504=_0x1af731['branches'][_0xdc59a3]===!![],_0x581678=_0x1af731[_0x75b4c(0x83)][_0x34434d]?.[_0x75b4c(0xa4)]===!![];return _0x4730d1[_0x75b4c(0x91)](_0x275504,_0x581678);}export function disableSession(_0x4a46cc){const _0xb049bc=_0x582ff1,_0x416a47={'RymEA':function(_0x2c08f2,_0x1afe5f){return _0x2c08f2(_0x1afe5f);}},_0x1a1bfa=loadCache(),_0x746684=getOrCreateSession(_0x1a1bfa,_0x4a46cc);_0x746684[_0xb049bc(0xa4)]=![],_0x416a47['RymEA'](saveCache,_0x1a1bfa);}export function updateBranchTracking(_0x5c11a5){const _0x2b84b7=_0x582ff1,_0x50fe37={'nnAhv':function(_0x2363d8){return _0x2363d8();},'qEhPi':function(_0x26a538,_0x141894){return _0x26a538===_0x141894;},'JMXvT':function(_0x430b66,_0xa9e0e5){return _0x430b66===_0xa9e0e5;}},_0x215d3b=_0x50fe37['nnAhv'](loadCache),_0x994a36=_0x215d3b[_0x2b84b7(0x83)][_0x5c11a5];if(!_0x994a36?.['enabled'])return;const _0x244dcb=getCurrentBranch();if(!_0x244dcb||_0x50fe37[_0x2b84b7(0x78)](_0x244dcb,'main')||_0x50fe37[_0x2b84b7(0x99)](_0x244dcb,_0x2b84b7(0xa6)))return;_0x994a36[_0x2b84b7(0x7f)]!==_0x244dcb&&(_0x215d3b['branches'][_0x244dcb]=!![],_0x994a36[_0x2b84b7(0x7f)]=_0x244dcb,saveCache(_0x215d3b));}export function initBranchTracking(_0x59be4e){const _0x2f129e=_0x582ff1,_0x2d1f4a={'upjVO':function(_0x52244a){return _0x52244a();},'mqtJI':function(_0x5b7f23,_0x239c62){return _0x5b7f23===_0x239c62;},'sXMDB':_0x2f129e(0x79),'gmUDp':_0x2f129e(0xa6),'xxccN':function(_0x5b0e1f,_0x2c77c5){return _0x5b0e1f===_0x2c77c5;}},_0x4fafb7=_0x2d1f4a[_0x2f129e(0x9a)](loadCache),_0x5a6055=getCurrentBranch();if(!_0x5a6055||_0x2d1f4a['mqtJI'](_0x5a6055,_0x2d1f4a['sXMDB'])||_0x2d1f4a[_0x2f129e(0xa9)](_0x5a6055,_0x2d1f4a['gmUDp']))return;if(_0x2d1f4a[_0x2f129e(0x8f)](_0x4fafb7[_0x2f129e(0x76)][_0x5a6055],!![])){const _0xf7b37b=getOrCreateSession(_0x4fafb7,_0x59be4e);_0xf7b37b[_0x2f129e(0xa4)]=!![],_0xf7b37b[_0x2f129e(0x7f)]=_0x5a6055,saveCache(_0x4fafb7);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x2df59c){const _0x202e5c=_0x582ff1,_0x3bcf02={'zANhT':function(_0x49ac54){return _0x49ac54();}},_0x22bcc7=_0x3bcf02['zANhT'](loadCache),_0x1cd4d4=_0x22bcc7[_0x202e5c(0x83)][_0x2df59c];_0x1cd4d4?.['enabled']&&(_0x22bcc7['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x22bcc7));}export function shouldAutoEnableAfterClear(_0xf40649){const _0x14b44e=_0x582ff1,_0x4fc3f4={'xMUif':_0x14b44e(0x9c),'JYTez':function(_0x3a14f1){return _0x3a14f1();},'wiUaY':function(_0x51635c,_0x4dc4e7){return _0x51635c-_0x4dc4e7;},'kKbAK':function(_0x2d1987,_0x408e5b){return _0x2d1987<=_0x408e5b;}};if(_0xf40649!==_0x4fc3f4['xMUif'])return![];const _0x44b82b=_0x4fc3f4[_0x14b44e(0x7a)](loadCache),_0x471f45=_0x44b82b['lastEnabledSessionClearedAt'];if(!_0x471f45)return![];const _0x4eff40=_0x4fc3f4[_0x14b44e(0x8b)](Date[_0x14b44e(0x80)](),_0x471f45);return _0x4fc3f4['kKbAK'](_0x4eff40,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x35c2ec){const _0x179b57=_0x582ff1,_0x183230={'GXcHe':function(_0x2e3e2b){return _0x2e3e2b();},'FFruW':function(_0x1f3902,_0x9fd5a8){return _0x1f3902!==_0x9fd5a8;},'celeO':'main','txllG':'master','AJqqZ':function(_0x1f1418,_0xb73a54){return _0x1f1418(_0xb73a54);}},_0x32b8da=loadCache(),_0x1c38d9=getOrCreateSession(_0x32b8da,_0x35c2ec);_0x1c38d9['enabled']=!![];const _0x246c5c=_0x183230['GXcHe'](getCurrentBranch);_0x246c5c&&_0x183230[_0x179b57(0x8e)](_0x246c5c,_0x183230['celeO'])&&_0x246c5c!==_0x183230[_0x179b57(0x9f)]&&(_0x1c38d9[_0x179b57(0x7f)]=_0x246c5c),delete _0x32b8da['lastEnabledSessionClearedAt'],_0x183230['AJqqZ'](saveCache,_0x32b8da);}export function registerSession(_0x29e987,_0x5a36c7){const _0x1fea3b=_0x582ff1,_0x866d80={'XMfES':function(_0x5e85b8){return _0x5e85b8();},'RlmBK':function(_0x479de5,_0x121dc0,_0x41aece){return _0x479de5(_0x121dc0,_0x41aece);},'YBZlh':function(_0x2097c3,_0x139535){return _0x2097c3(_0x139535);}},_0xc3389a=_0x866d80['XMfES'](loadCache),_0x37081c=_0x866d80[_0x1fea3b(0x77)](getOrCreateSession,_0xc3389a,_0x29e987);_0x37081c[_0x1fea3b(0x89)]=_0x5a36c7,_0x37081c[_0x1fea3b(0x97)]=new Date()['toISOString'](),_0x866d80['YBZlh'](saveCache,_0xc3389a);}export function getSessionEntry(_0x19a7ab){const _0x5db3b7=_0x582ff1,_0x12c138=loadCache(),_0x2848d8=_0x12c138['sessions'][_0x19a7ab];if(_0x2848d8?.['featureId']&&_0x2848d8?.[_0x5db3b7(0x97)])return{'featureId':_0x2848d8['featureId'],'registeredAt':_0x2848d8['registeredAt']};return null;}export function unregisterSession(_0xf620f8){const _0x5e008e=_0x582ff1,_0x11c36f={'BoKyM':function(_0x46374e,_0x24f888){return _0x46374e(_0x24f888);}},_0x270f5d=loadCache(),_0x45f129=_0x270f5d[_0x5e008e(0x83)][_0xf620f8];_0x45f129&&(delete _0x45f129[_0x5e008e(0x89)],delete _0x45f129['registeredAt'],_0x11c36f[_0x5e008e(0x84)](saveCache,_0x270f5d));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x110a4f){const _0x19b258=_0x582ff1,_0x9cdf11={'QSUog':function(_0x490542){return _0x490542();},'yIbBN':function(_0x301d34,_0x17cd29){return _0x301d34>=_0x17cd29;}},_0x4f39bb=_0x9cdf11[_0x19b258(0x9b)](loadCache),_0x1219b8=getOrCreateSession(_0x4f39bb,_0x110a4f),_0x4a3b02=_0x1219b8['lastPlanReminderAt']||0x0,_0x4626dd=Date[_0x19b258(0x80)]();if(_0x9cdf11['yIbBN'](_0x4626dd-_0x4a3b02,PLAN_REMINDER_INTERVAL_MS))return _0x1219b8['lastPlanReminderAt']=_0x4626dd,saveCache(_0x4f39bb),!![];return![];}export function shouldShowStopReminder(_0x228ba7){const _0x3dfaa2=_0x582ff1,_0x5ce397={'UucKS':function(_0x4abb13){return _0x4abb13();},'IZmSy':function(_0x35ceee,_0x33bd04,_0x3f5feb){return _0x35ceee(_0x33bd04,_0x3f5feb);},'zSldp':function(_0x33fe18,_0x3e4296){return _0x33fe18>=_0x3e4296;}},_0x998501=_0x5ce397['UucKS'](loadCache),_0x1e3a5f=_0x5ce397[_0x3dfaa2(0x8c)](getOrCreateSession,_0x998501,_0x228ba7),_0x4d066e=_0x1e3a5f[_0x3dfaa2(0x8d)]||0x0,_0x677157=Date['now']();if(_0x5ce397[_0x3dfaa2(0xa3)](_0x677157-_0x4d066e,STOP_REMINDER_INTERVAL_MS))return _0x1e3a5f['lastStopReminderAt']=_0x677157,saveCache(_0x998501),!![];return![];}export function hasSessionBeenPrompted(_0x5e5b3b){const _0x2458b6=_0x582ff1,_0x382888=loadCache();return _0x382888[_0x2458b6(0x83)][_0x5e5b3b]?.['prompted']===!![];}export function markSessionPrompted(_0x1865da){const _0x5e61ba=_0x582ff1,_0x50f9ef={'mRQbo':function(_0x289eb7){return _0x289eb7();},'whIBn':function(_0x211e32,_0x4ab414){return _0x211e32(_0x4ab414);}},_0x5d4827=_0x50f9ef[_0x5e61ba(0x71)](loadCache),_0x1f8aee=getOrCreateSession(_0x5d4827,_0x1865da);_0x1f8aee[_0x5e61ba(0xab)]=!![],_0x50f9ef['whIBn'](saveCache,_0x5d4827);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x107345=_0xfe5e;(function(_0x4f2b9a,_0x482f51){const _0x30b252=_0xfe5e,_0x35e611=_0x4f2b9a();while(!![]){try{const _0x3185a3=-parseInt(_0x30b252(0xa8))/0x1+-parseInt(_0x30b252(0xf0))/0x2+parseInt(_0x30b252(0xfb))/0x3*(parseInt(_0x30b252(0xe5))/0x4)+parseInt(_0x30b252(0xed))/0x5+-parseInt(_0x30b252(0xa1))/0x6+parseInt(_0x30b252(0xde))/0x7+parseInt(_0x30b252(0xe2))/0x8;if(_0x3185a3===_0x482f51)break;else _0x35e611['push'](_0x35e611['shift']());}catch(_0x3ea431){_0x35e611['push'](_0x35e611['shift']());}}}(_0x5a8d,0x8a4dd));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';function _0x5a8d(){const _0x5c313b=['--disable-setuid-sandbox','TaagK','eUlQC','GPdkz','message','fNGJt','mMhpv','tabs','LthUU','location','none','file','sicVb','entries','VqfjJ','xPpvG','aXyCK','map','headless','lWBfM','browser','OKoMA','string','ranger-config','IDCjW','stagehand','EDzUw','nova-user-data','baseUrl','push','tRhAD','YBSMm','clipboard-read','2598648gobjBK','includes','NaLrS','--allow-insecure-localhost','YFskt','cIWWh','chromium','153414XMKzkp','headers','pvuri','--unsafely-treat-insecure-origin-as-secure=http://localhost','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','startsWith','GCFPU','RROzg','object','XyKwN','.json','--allow-running-insecure-content','replace','storageState','mpjCB','split','-cli','MNsTc','setupHeader','filter','nRueT','settings.json','zIIcs','eQfHK','keys','legacy','auth.json','configPath','repeat','gCbDk','tejpE','FNPiS','ZSKsw','IdsPo','TskKq','join','WjLfA','parse','eNGoO','userAgent','setupHeaders','forWrite','local','vQriU','FRgYY','rangerDir','safeMode','extraHTTPHeaders','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','Refusing\x20to\x20write\x20profile\x20\x22','contextOptions','getuid','stringify','executablePath','5872867GiRTqj','auth.json.enc','env','MEnPK','219920PIjOEd','ngICg','xXnJf','6396aNJkZJ','header','allowInsecureLocalhost','lhMNK','DMUHj','xOliD','--disable-web-security','oTPYx','2705580QWoAxx','playwright-cli','GbQLl','691430BHSFWn','args','catch','fxPwH','lROYX','path','KogZR','JafMr','riuxn','locations','storageStatePath','171vRNuyo','Failed\x20to\x20decrypt\x20auth\x20state:\x20','Environment\x20variable\x20','FZqQY','LlkIe','--no-sandbox','--disable-features=WebBluetooth'];_0x5a8d=function(){return _0x5c313b;};return _0x5a8d();}import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x5c7901,_0x250782){const _0x1f5d57=_0xfe5e,_0x3c7476={'MNsTc':function(_0x1e33fc,_0x3836fb,_0x38c690,_0x20980b){return _0x1e33fc(_0x3836fb,_0x38c690,_0x20980b);},'sAGrq':function(_0x589a2f,_0x124993,_0x5190c7,_0x2b97f8){return _0x589a2f(_0x124993,_0x5190c7,_0x2b97f8);},'CrebY':function(_0x4b18b4,_0x5269de,_0x2b9040){return _0x4b18b4(_0x5269de,_0x2b9040);},'riuxn':function(_0x2eb7bc,_0x1cb3c7,_0x30a112){return _0x2eb7bc(_0x1cb3c7,_0x30a112);},'lROYX':function(_0x442242,_0x1bc113){return _0x442242(_0x1bc113);},'cIWWh':function(_0x5b10c7,_0x211c9b){return _0x5b10c7(_0x211c9b);},'fNGJt':function(_0x1fe812,_0x2e31df){return _0x1fe812!==_0x2e31df;},'xPpvG':function(_0x2a48d1,_0x3c39c3){return _0x2a48d1(_0x3c39c3);}},_0x1f3ecc=_0x3c7476[_0x1f5d57(0xb9)](join,_0x250782,'ci',_0x5c7901),_0xcbe86d=_0x3c7476['sAGrq'](join,_0x250782,_0x1f5d57(0xd2),_0x5c7901),_0x32a4a4=_0x3c7476['CrebY'](join,_0x250782,_0x5c7901),_0x58962f=_0x3c7476[_0x1f5d57(0xf8)](join,_0x250782,_0x1f5d57(0xd2)),_0x3c88e4=join(_0x250782,'ci');if(_0x3c7476[_0x1f5d57(0xf4)](existsSync,_0x1f3ecc))return _0x1f3ecc;if(existsSync(_0xcbe86d))return _0xcbe86d;if(_0x3c7476[_0x1f5d57(0xa6)](existsSync,_0x32a4a4)&&(_0x3c7476[_0x1f5d57(0x107)](_0x32a4a4,_0x58962f)&&_0x32a4a4!==_0x3c88e4?!![]:_0x3c7476[_0x1f5d57(0x111)](hasLegacyProfileFiles,_0x32a4a4)))return _0x32a4a4;return null;}export function getEnvDir(_0x28b8e6,_0x4771e5={}){const _0x29ac2d=_0xfe5e,_0x2cf45b={'eUlQC':function(_0x133ce5,_0x567084){return _0x133ce5(_0x567084);},'dEvaF':function(_0xea51bc,_0x5b9b5b){return _0xea51bc!==_0x5b9b5b;},'LHujF':function(_0x4e8baf,_0x1b9fa7,_0x402e8e){return _0x4e8baf(_0x1b9fa7,_0x402e8e);},'OKoMA':function(_0x1a2afb,_0x2fc9f5,_0xe7702a,_0x53da66){return _0x1a2afb(_0x2fc9f5,_0xe7702a,_0x53da66);},'xVDKN':function(_0xd108ee,_0x8f63f2,_0x4e7584){return _0xd108ee(_0x8f63f2,_0x4e7584);}},_0x19d604=getRangerDir(),_0x525a02=findEnvInRoot(_0x28b8e6,_0x19d604);if(_0x525a02){if(_0x4771e5[_0x29ac2d(0xd1)]&&_0x2cf45b[_0x29ac2d(0x104)](isLegacyEnvPath,_0x525a02))throw legacyWriteError(_0x28b8e6,_0x525a02);return _0x525a02;}const _0x32b615=getRangerHomeDir();if(_0x2cf45b['dEvaF'](_0x32b615,_0x19d604)){const _0x3dd6c9=findEnvInRoot(_0x28b8e6,_0x32b615);if(_0x3dd6c9){if(_0x4771e5[_0x29ac2d(0xd1)]&&_0x2cf45b['eUlQC'](isLegacyEnvPath,_0x3dd6c9))throw _0x2cf45b['LHujF'](legacyWriteError,_0x28b8e6,_0x3dd6c9);return _0x3dd6c9;}}const _0x3f4a66=_0x2cf45b[_0x29ac2d(0x95)](join,_0x32b615,'local',_0x28b8e6);if(_0x4771e5['forWrite'])throw _0x2cf45b['xVDKN'](legacyWriteError,_0x28b8e6,_0x3f4a66);return _0x3f4a66;}function isLegacyEnvPath(_0x456b7d){const _0x229a00=_0xfe5e,_0x5dacb3={'BtnqP':function(_0x59743e){return _0x59743e();},'XyKwN':function(_0x43f534,_0x27664b){return _0x43f534+_0x27664b;},'aXyCK':function(_0x45c44f,_0x34b5b3){return _0x45c44f===_0x34b5b3;}},_0x4e5b58=getRangerDir(),_0x22d039=_0x5dacb3['BtnqP'](getRangerHomeDir);for(const _0x418b24 of new Set([_0x4e5b58,_0x22d039])){const _0x507d72=_0x418b24['endsWith']('/')?_0x418b24:_0x5dacb3[_0x229a00(0xb1)](_0x418b24,'/');if(_0x5dacb3[_0x229a00(0x112)](_0x456b7d,_0x418b24)||_0x456b7d[_0x229a00(0xad)](_0x507d72))return!![];}return![];}function _0xfe5e(_0x21453d,_0x24b39f){_0x21453d=_0x21453d-0x91;const _0x5a8d58=_0x5a8d();let _0xfe5eda=_0x5a8d58[_0x21453d];return _0xfe5eda;}function legacyWriteError(_0x468465,_0x382fd3){const _0x527623=_0xfe5e,_0x7c2970={'cUEIz':function(_0x596d49,_0x41c1db){return _0x596d49+_0x41c1db;},'RURnV':function(_0x9db391,_0x3efbbc){return _0x9db391+_0x3efbbc;}};return new Error(_0x7c2970['cUEIz'](_0x7c2970['cUEIz'](_0x7c2970['RURnV'](_0x527623(0xd9)+_0x468465+'\x22\x20to\x20legacy\x20path\x20'+_0x382fd3+'.\x0a',_0x527623(0xac)),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),_0x527623(0xd8)));}export function findExistingEnv(_0x29bd2b,_0x20492e){const _0x359bdc=_0xfe5e,_0xc124a1={'lbuUU':function(_0x5583f4){return _0x5583f4();},'LthUU':'local','IdsPo':function(_0x35faad,_0x46e1f5,_0x56a8ed){return _0x35faad(_0x46e1f5,_0x56a8ed);},'Fbjts':function(_0x1c0a3a,_0x5f3e9a){return _0x1c0a3a(_0x5f3e9a);},'LlkIe':function(_0xf142bd,_0x20dc9c){return _0xf142bd===_0x20dc9c;},'pbpik':function(_0x251044,_0x17fc5d){return _0x251044===_0x17fc5d;}},_0x39d294=_0x20492e?.[_0x359bdc(0xd5)],_0x215e24=_0x39d294?[_0x39d294]:[_0xc124a1['lbuUU'](getRangerDir),_0xc124a1['lbuUU'](getRangerHomeDir)]['filter']((_0x3b9e5,_0x1e12f1,_0x2fb0c5)=>_0x2fb0c5['indexOf'](_0x3b9e5)===_0x1e12f1),_0x57aaee=_0x20492e?.[_0x359bdc(0xf9)]??['ci','local',_0x359bdc(0xc1)];for(const _0x2d5bbf of _0x215e24){const _0x2e2c8a=join(_0x2d5bbf,_0xc124a1['LthUU']),_0x87355e=join(_0x2d5bbf,'ci'),_0x5b20f3=[{'location':'ci','path':join(_0x2d5bbf,'ci',_0x29bd2b)},{'location':'local','path':join(_0x2d5bbf,_0xc124a1[_0x359bdc(0x10a)],_0x29bd2b)},{'location':_0x359bdc(0xc1),'path':_0xc124a1[_0x359bdc(0xc9)](join,_0x2d5bbf,_0x29bd2b)}];for(const _0x4b4313 of _0x5b20f3){if(_0x57aaee[_0x359bdc(0xa2)](_0x4b4313[_0x359bdc(0x10b)])&&_0xc124a1['Fbjts'](existsSync,_0x4b4313[_0x359bdc(0xf5)])){if(_0xc124a1[_0x359bdc(0xff)](_0x4b4313['location'],'legacy')&&(_0xc124a1['pbpik'](_0x4b4313[_0x359bdc(0xf5)],_0x2e2c8a)||_0x4b4313['path']===_0x87355e)&&!hasLegacyProfileFiles(_0x4b4313[_0x359bdc(0xf5)]))continue;return{'path':_0x4b4313[_0x359bdc(0xf5)],'location':_0x4b4313[_0x359bdc(0x10b)]};}}}return null;}function hasLegacyProfileFiles(_0x219c32){const _0x5b1c33=_0xfe5e,_0x5d1464={'lRNoU':function(_0x22395d,_0x4e7d2a){return _0x22395d(_0x4e7d2a);},'pvuri':function(_0x484c2d,_0x4bae3b,_0x4824ee){return _0x484c2d(_0x4bae3b,_0x4824ee);},'zIIcs':'auth.json.enc'};return _0x5d1464['lRNoU'](existsSync,_0x5d1464[_0x5b1c33(0xaa)](join,_0x219c32,'settings.json'))||existsSync(_0x5d1464['pvuri'](join,_0x219c32,_0x5b1c33(0xc2)))||_0x5d1464['lRNoU'](existsSync,join(_0x219c32,_0x5d1464[_0x5b1c33(0xbe)]));}export function isEnvCi(_0x4194eb){const _0x5847e1=_0xfe5e,_0x3e6311={'GPdkz':function(_0x43bd3e,_0x181427){return _0x43bd3e(_0x181427);},'eNGoO':function(_0x1cc899){return _0x1cc899();},'EDzUw':function(_0x5c3ad1,_0x50c7ca){return _0x5c3ad1!==_0x50c7ca;},'YXPXY':function(_0x4567b2,_0x5dba91,_0x129938,_0x42ef69){return _0x4567b2(_0x5dba91,_0x129938,_0x42ef69);}};if(_0x3e6311[_0x5847e1(0x105)](existsSync,join(getRangerDir(),'ci',_0x4194eb)))return!![];const _0x4c5d48=_0x3e6311[_0x5847e1(0xce)](getRangerHomeDir);if(_0x3e6311[_0x5847e1(0x9a)](_0x4c5d48,_0x3e6311[_0x5847e1(0xce)](getRangerDir))&&_0x3e6311[_0x5847e1(0x105)](existsSync,_0x3e6311['YXPXY'](join,_0x4c5d48,'ci',_0x4194eb)))return!![];return![];}export async function cleanupTempFiles(_0x5139ab){const _0x53db94=_0xfe5e,_0x3a5d60={'IlzIT':function(_0x3fcfdb,_0x253ba8){return _0x3fcfdb!==_0x253ba8;},'TskKq':'ENOENT'},_0x3f5c2b=[_0x5139ab['tempAuthPath'],_0x5139ab[_0x53db94(0xc3)]][_0x53db94(0xbb)](Boolean);await Promise['all'](_0x3f5c2b[_0x53db94(0x91)](_0x1571f0=>unlink(_0x1571f0)[_0x53db94(0xf2)](_0x242b63=>{const _0x20e81e=_0x53db94;_0x3a5d60['IlzIT'](_0x242b63['code'],_0x3a5d60[_0x20e81e(0xca)])&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x1571f0+':',_0x242b63['message']);})));}export function getSettingsPath(_0x169edf){const _0x4d46f0=_0xfe5e;return join(getEnvDir(_0x169edf),_0x4d46f0(0xbd));}export async function loadSettings(_0x2e151c){const _0x5efc99=_0xfe5e,_0x323ee4={'vQriU':function(_0x1d345f,_0xa4fa54,_0x1b8bf9){return _0x1d345f(_0xa4fa54,_0x1b8bf9);},'GCFPU':'utf-8'},_0x493c35=getSettingsPath(_0x2e151c);if(!existsSync(_0x493c35))return{};try{const _0x55fa44=await _0x323ee4[_0x5efc99(0xd3)](readFile,_0x493c35,_0x323ee4[_0x5efc99(0xae)]);return JSON[_0x5efc99(0xcd)](_0x55fa44);}catch{return{};}}export async function saveSettings(_0x2fb2c0,_0x563a1e){const _0x4e6b41=_0xfe5e,_0x1089ee={'xOliD':function(_0x42845e,_0x399e6f){return _0x42845e(_0x399e6f);},'FxtDJ':function(_0x1505e0,_0x5868a7){return _0x1505e0(_0x5868a7);}},_0x2123b1=_0x1089ee[_0x4e6b41(0xea)](getSettingsPath,_0x2fb2c0),_0x26d05a=dirname(_0x2123b1);!_0x1089ee['FxtDJ'](existsSync,_0x26d05a)&&await mkdir(_0x26d05a,{'recursive':!![]}),await writeFile(_0x2123b1,JSON[_0x4e6b41(0xdc)](_0x563a1e,null,0x2));}export function resolveEnvVars(_0x127ea9){const _0x372eb6=_0xfe5e,_0x59e9c7={'lWBfM':function(_0x572e38,_0x1f5d27){return _0x572e38===_0x1f5d27;},'Sngul':_0x372eb6(0xb0)};if(typeof _0x127ea9===_0x372eb6(0x96))return _0x127ea9[_0x372eb6(0xb4)](/\$\{(\w+)\}/g,(_0x462bc8,_0x4195af)=>{const _0x4962bb=_0x372eb6,_0x49ea0a=process[_0x4962bb(0xe0)][_0x4195af];if(_0x59e9c7[_0x4962bb(0x93)](_0x49ea0a,undefined))throw new Error(_0x4962bb(0xfd)+_0x4195af+'\x20is\x20not\x20set');return _0x49ea0a;});if(Array['isArray'](_0x127ea9))return _0x127ea9[_0x372eb6(0x91)](resolveEnvVars);if(_0x127ea9&&typeof _0x127ea9===_0x59e9c7['Sngul'])return Object['fromEntries'](Object[_0x372eb6(0x10f)](_0x127ea9)['map'](([_0x1cfc88,_0x4c6a4c])=>[_0x1cfc88,resolveEnvVars(_0x4c6a4c)]));return _0x127ea9;}const isRecord=_0x5813bb=>typeof _0x5813bb==='object'&&_0x5813bb!==null&&!Array['isArray'](_0x5813bb),asRecord=_0x43f466=>isRecord(_0x43f466)?_0x43f466:undefined,mergeHeaders=(_0x310cdc,_0x16e65d)=>{const _0x220f2b=_0xfe5e,_0x11c331={'FNPiS':function(_0x4d3de6,_0x364400){return _0x4d3de6??_0x364400;}},_0x4f4833={..._0x11c331[_0x220f2b(0xc7)](_0x310cdc,{}),..._0x16e65d??{}};return Object[_0x220f2b(0xc0)](_0x4f4833)['length']?_0x4f4833:undefined;},SAFE_MODE_ARGS=[_0x107345(0x101)],ALLOW_LOCALHOST_ARGS=[_0x107345(0xeb),_0x107345(0xb3),_0x107345(0xab),_0x107345(0xa4)];export function buildBrowserOptionsFromSettings(_0x53bac3,_0x44fd46={}){const _0x10b2b5=_0x107345,_0x11d3ce={'NaLrS':function(_0x1db897,_0x3d5565){return _0x1db897(_0x3d5565);},'qOGZX':function(_0x51560b,_0xf0c771){return _0x51560b===_0xf0c771;},'NcBjK':_0x10b2b5(0x96),'dVnsQ':function(_0x257db2,_0x339fd4){return _0x257db2(_0x339fd4);}},_0x1f71cc=_0x11d3ce[_0x10b2b5(0xa3)](asRecord,_0x53bac3[_0x10b2b5(0x94)]),_0xfac1ea={..._0x11d3ce[_0x10b2b5(0xa3)](asRecord,_0x1f71cc?.['launchOptions'])??{}};typeof _0x44fd46[_0x10b2b5(0x92)]==='boolean'&&(_0xfac1ea[_0x10b2b5(0x92)]=_0x44fd46[_0x10b2b5(0x92)]);if(_0x53bac3['safeMode']){const _0x73e5e2=_0xfac1ea[_0x10b2b5(0xf1)]??[],_0x304aae=SAFE_MODE_ARGS['filter'](_0x3a10b8=>!_0x73e5e2['includes'](_0x3a10b8));_0xfac1ea['args']=[..._0x73e5e2,..._0x304aae];}if(_0x53bac3[_0x10b2b5(0xe7)]){const _0x4b8527=_0xfac1ea[_0x10b2b5(0xf1)]??[],_0x3ba0a8=ALLOW_LOCALHOST_ARGS[_0x10b2b5(0xbb)](_0x4998db=>!_0x4b8527['includes'](_0x4998db));_0xfac1ea[_0x10b2b5(0xf1)]=[..._0x4b8527,..._0x3ba0a8];}const _0x111d32={...asRecord(_0x1f71cc?.[_0x10b2b5(0xda)])??{}};_0x111d32['ignoreHTTPSErrors']=!![];_0x11d3ce['qOGZX'](typeof _0x53bac3['userAgent'],_0x11d3ce['NcBjK'])&&(_0x111d32[_0x10b2b5(0xcf)]=_0x53bac3['userAgent']);const _0x30a543=mergeHeaders(asRecord(_0x111d32[_0x10b2b5(0xd7)]),_0x11d3ce['dVnsQ'](asRecord,_0x53bac3['headers']));return _0x30a543?_0x111d32[_0x10b2b5(0xd7)]=_0x30a543:delete _0x111d32[_0x10b2b5(0xd7)],_0x44fd46[_0x10b2b5(0xfa)]&&(_0x111d32[_0x10b2b5(0xb5)]=_0x44fd46[_0x10b2b5(0xfa)]),{'launchOptions':_0xfac1ea,'contextOptions':_0x111d32};}export async function resolveProfileStorageState(_0x2e6c57){const _0x8d8396=_0x107345,_0x58c9bb={'MEnPK':function(_0x3af40e,_0x549f19){return _0x3af40e(_0x549f19);}};return _0x58c9bb[_0x8d8396(0xe1)](resolveLocalAuthPath,_0x58c9bb[_0x8d8396(0xe1)](getEnvDir,_0x2e6c57));}async function resolveLocalAuthPath(_0x415c57){const _0x43886c=_0x107345,_0x284231={'NeaBM':function(_0x30205a,_0x836aac,_0x3b0624){return _0x30205a(_0x836aac,_0x3b0624);},'WgzYz':_0x43886c(0xdf),'NAYjo':function(_0x385b05,_0x3e517c,_0x9ef9ef){return _0x385b05(_0x3e517c,_0x9ef9ef);},'zGusE':_0x43886c(0xc2),'ZSKsw':function(_0x5c66a1,_0x22f670){return _0x5c66a1(_0x22f670);},'KogZR':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','DMUHj':function(_0x19f773,_0x1a1fb1,_0x4f9f87){return _0x19f773(_0x1a1fb1,_0x4f9f87);},'hRhmc':function(_0x183877,_0x5b4a8b){return _0x183877 instanceof _0x5b4a8b;}},_0x429fa9=_0x284231['NeaBM'](join,_0x415c57,_0x284231['WgzYz']),_0x5a46f2=_0x284231['NAYjo'](join,_0x415c57,_0x284231['zGusE']);if(_0x284231[_0x43886c(0xc8)](existsSync,_0x429fa9))try{const _0x2c7f8a=await getToken();if(!_0x2c7f8a)throw new Error(_0x284231[_0x43886c(0xf6)]);const _0x4445c9=await readFile(_0x429fa9),_0x8992aa=_0x284231[_0x43886c(0xe9)](decrypt,_0x4445c9,_0x2c7f8a),_0x1279af=join(tmpdir(),'ranger-auth-'+Date['now']()+'.json');return await writeFile(_0x1279af,_0x8992aa),{'storageStatePath':_0x1279af,'tempAuthPath':_0x1279af};}catch(_0x57864b){const _0x7371e=_0x284231['hRhmc'](_0x57864b,Error)?_0x57864b[_0x43886c(0x106)]:String(_0x57864b);throw new Error(_0x43886c(0xfc)+_0x7371e);}if(_0x284231[_0x43886c(0xc8)](existsSync,_0x5a46f2))return{'storageStatePath':_0x5a46f2};return{};}export async function buildPlaywrightConfig(_0x41d4dc,_0xb2c11,_0x56f17e,_0x276e7a,_0x46faa8){const _0x186914=_0x107345,_0x4c619a={'sicVb':_0x186914(0x99),'wuSZf':function(_0xdf6fea,_0x324cb3){return _0xdf6fea(_0x324cb3);},'uFVlE':function(_0x169796,_0x549f8f,_0x2a46d2,_0x2f8b7f,_0x442fcd,_0x1f658d,_0x5bab8c){return _0x169796(_0x549f8f,_0x2a46d2,_0x2f8b7f,_0x442fcd,_0x1f658d,_0x5bab8c);}};if(_0x46faa8)return buildPlaywrightConfigCore(_0x41d4dc,_0x46faa8,_0xb2c11,_0x56f17e,_0x276e7a,_0x4c619a[_0x186914(0x10e)]);const {storageStatePath:_0x58057f,tempAuthPath:_0x233f87}=await resolveLocalAuthPath(_0x4c619a['wuSZf'](getEnvDir,_0xb2c11));try{const _0x485bb6=await _0x4c619a['uFVlE'](buildPlaywrightConfigCore,_0x41d4dc,_0x58057f,_0xb2c11,_0x56f17e,_0x276e7a,_0x4c619a[_0x186914(0x10e)]);return{..._0x485bb6,'tempAuthPath':_0x233f87};}catch(_0xd9b652){_0x233f87&&await unlink(_0x233f87)['catch'](()=>{});throw _0xd9b652;}}export async function buildPlaywrightConfigCore(_0x3204af,_0x1182f9,_0x3782f0,_0x37dc4a,_0x19f32e,_0x3bea2e='stagehand'){const _0x443701=_0x107345,_0x3b1bb8={'mMhpv':function(_0x59980f,_0x289def){return _0x59980f===_0x289def;},'OpkEo':_0x443701(0x100),'IDCjW':_0x443701(0xa0),'lhMNK':function(_0x4bedf3,_0x227cc0,_0x4d24ed,_0x20cce7){return _0x4bedf3(_0x227cc0,_0x4d24ed,_0x20cce7);},'evjTF':_0x443701(0xa7),'vAmzk':'install','bQSSu':'pdf','TaagK':'vision','oTPYx':'allow','pjqvg':function(_0xabb1d6,_0x472dd0,_0x2796dd){return _0xabb1d6(_0x472dd0,_0x2796dd);},'ngICg':_0x443701(0x97),'MFWyQ':function(_0x42a871,_0x49e438){return _0x42a871(_0x49e438);},'tRhAD':function(_0x230e7d,_0xce9e9d,_0x3d0c0e){return _0x230e7d(_0xce9e9d,_0x3d0c0e);}},_0x1d8ce5=_0x37dc4a||randomUUID(),_0x55070f=_0x3b1bb8[_0x443701(0xe8)](join,getRangerDir(),'sessions',_0x1d8ce5),_0x409867=Boolean(_0x3204af['cdpEndpoint']),_0x59aa1b=_0x409867?{'browserName':_0x3b1bb8['evjTF'],'cdpEndpoint':_0x3204af['cdpEndpoint']}:((()=>{const _0x714d68=_0x443701,{launchOptions:_0x195cb4,contextOptions:_0x406c8f}=buildBrowserOptionsFromSettings(_0x3204af,{'headless':_0x19f32e?![]:_0x3204af[_0x714d68(0x92)]??!![],'storageStatePath':_0x1182f9});if(_0x3b1bb8[_0x714d68(0x108)](process[_0x714d68(0xdb)]?.(),0x0)){const _0x1f409b=[_0x3b1bb8['OpkEo'],_0x714d68(0x102)],_0x55467c=_0x195cb4['args']??[],_0x4ca53a=_0x1f409b['filter'](_0x139ea1=>!_0x55467c[_0x714d68(0xa2)](_0x139ea1));_0x195cb4['args']=[..._0x55467c,..._0x4ca53a];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x195cb4,'contextOptions':{..._0x406c8f,'permissions':[_0x3b1bb8[_0x714d68(0x98)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3df940=_0x3b1bb8[_0x443701(0x108)](_0x3bea2e,'playwright-cli')?{'browser':_0x59aa1b,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x55070f,'outputMode':_0x443701(0x10d),'codegen':_0x443701(0x10c)}:{'name':_0x3782f0,'browser':_0x59aa1b,'capabilities':['core',_0x443701(0x109),_0x3b1bb8['vAmzk'],_0x3b1bb8['bQSSu'],_0x3b1bb8[_0x443701(0x103)]],'imageResponses':_0x3b1bb8[_0x443701(0xec)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x55070f};if(!_0x409867){const _0x2bf814=_0x3df940[_0x443701(0x94)],_0x184eec=_0x2bf814[_0x443701(0xda)];if(_0x184eec['userAgent']===undefined)delete _0x184eec['userAgent'];if(_0x184eec['storageState']===undefined)delete _0x184eec['storageState'];}const _0x8c399d=_0x3b1bb8['pjqvg'](join,tmpdir(),_0x3b1bb8[_0x443701(0xe3)]);!_0x3b1bb8['MFWyQ'](existsSync,_0x8c399d)&&await mkdir(_0x8c399d,{'recursive':!![]});const _0x2f6bba=_0x3bea2e===_0x443701(0xee)?_0x443701(0xb8):'',_0x39074f=_0x3b1bb8['pjqvg'](join,_0x8c399d,_0x3782f0+'-'+Date['now']()+_0x2f6bba+_0x443701(0xb2));return await _0x3b1bb8[_0x443701(0x9e)](writeFile,_0x39074f,JSON['stringify'](_0x3df940,null,0x2)),{'configPath':_0x39074f,'storageStatePath':_0x1182f9};}export async function buildPlaywrightCliConfig(_0x534c3a,_0x213583,_0x5e4da6,_0x285b9f,_0x38503a){const _0x3b7f4d=_0x107345,_0x34a20e={'fxPwH':'playwright-cli','YFskt':function(_0x15b405,_0x10f3f9){return _0x15b405(_0x10f3f9);},'mpjCB':function(_0x480011,_0x299218){return _0x480011(_0x299218);}};if(_0x38503a)return buildPlaywrightConfigCore(_0x534c3a,_0x38503a,_0x213583,_0x5e4da6,_0x285b9f,_0x34a20e['fxPwH']);const {storageStatePath:_0x323d4c,tempAuthPath:_0x2a5a90}=await _0x34a20e[_0x3b7f4d(0xa5)](resolveLocalAuthPath,getEnvDir(_0x213583));try{const _0x438192=await buildPlaywrightConfigCore(_0x534c3a,_0x323d4c,_0x213583,_0x5e4da6,_0x285b9f,_0x34a20e[_0x3b7f4d(0xf3)]);return{..._0x438192,'tempAuthPath':_0x2a5a90};}catch(_0xfd70ab){_0x2a5a90&&await _0x34a20e[_0x3b7f4d(0xb6)](unlink,_0x2a5a90)[_0x3b7f4d(0xf2)](()=>{});throw _0xfd70ab;}}export async function buildNovaActCliConfig(_0x279c77,_0x2e0b31,_0x58a504,_0x1c013b,_0x5099c4){const _0x33b016=_0x107345,_0x3d7857={'SMgfW':function(_0x39b92a,_0xabb1a0){return _0x39b92a(_0xabb1a0);},'wyIGO':function(_0x30ab77){return _0x30ab77();},'sOyYY':'sessions','PaMUW':function(_0x58e2cd,_0x3ed25d,_0x2116b1){return _0x58e2cd(_0x3ed25d,_0x2116b1);},'nRueT':'Default','eQfHK':function(_0x1b167a,_0x29f4be,_0x1bf840){return _0x1b167a(_0x29f4be,_0x1bf840);},'RROzg':'--disable-setuid-sandbox','tejpE':function(_0x593071,_0x495925){return _0x593071===_0x495925;},'JafMr':_0x33b016(0x96),'FRgYY':function(_0x3198a1,_0x301f2f){return _0x3198a1(_0x301f2f);},'VqfjJ':function(_0x7ec40e,_0x5568d6){return _0x7ec40e(_0x5568d6);}},{storageStatePath:_0xd74b8,tempAuthPath:_0x2066f1}=_0x5099c4?{'storageStatePath':_0x5099c4,'tempAuthPath':undefined}:await _0x3d7857['SMgfW'](resolveLocalAuthPath,getEnvDir(_0x2e0b31)),_0x2c19f6=_0x58a504||randomUUID(),_0x5601ef=join(_0x3d7857['wyIGO'](getRangerDir),_0x3d7857['sOyYY'],_0x2c19f6),_0x289631=join(_0x5601ef,_0x33b016(0x9b)),_0x5f10ca=_0xd74b8?_0x3d7857['PaMUW'](join,_0x289631,_0x3d7857[_0x33b016(0xbc)]):undefined,{launchOptions:_0x31ef91,contextOptions:_0x18debc}=_0x3d7857[_0x33b016(0xbf)](buildBrowserOptionsFromSettings,_0x279c77,{'headless':_0x1c013b?![]:_0x279c77['headless']??!![],'storageStatePath':_0xd74b8});if(process[_0x33b016(0xdb)]?.()===0x0){const _0x17857a=['--no-sandbox',_0x3d7857[_0x33b016(0xaf)]],_0x22220f=_0x31ef91['args']??[],_0x957840=_0x17857a[_0x33b016(0xbb)](_0x34697f=>!_0x22220f['includes'](_0x34697f));_0x31ef91['args']=[..._0x22220f,..._0x957840];}const _0x52457a=_0x3d7857[_0x33b016(0xc6)](typeof _0x31ef91['executablePath'],_0x3d7857['JafMr'])?_0x31ef91[_0x33b016(0xdd)]:_0xd74b8?chromium[_0x33b016(0xdd)]():undefined;return{'storageStatePath':_0xd74b8,'tempAuthPath':_0x2066f1,'baseUrl':_0x279c77[_0x33b016(0x9c)],'headless':_0x3d7857[_0x33b016(0xd4)](Boolean,_0x31ef91['headless']),'userDataDir':_0x289631,'browserProfilePath':_0x5f10ca,'executablePath':_0x52457a,'launchArgs':Array['isArray'](_0x31ef91[_0x33b016(0xf1)])?_0x31ef91[_0x33b016(0xf1)][_0x33b016(0xbb)](_0x1087a4=>typeof _0x1087a4==='string'):[],'userAgent':typeof _0x18debc[_0x33b016(0xcf)]===_0x3d7857[_0x33b016(0xf7)]?_0x18debc['userAgent']:undefined,'extraHTTPHeaders':_0x18debc['extraHTTPHeaders'],'allowInsecureLocalhost':_0x3d7857[_0x33b016(0x110)](Boolean,_0x279c77['allowInsecureLocalhost']),'safeMode':_0x3d7857[_0x33b016(0x110)](Boolean,_0x279c77[_0x33b016(0xd6)]),'cdpEndpoint':_0x279c77['cdpEndpoint'],'isCdpMode':Boolean(_0x279c77['cdpEndpoint'])};}export function getNestedValue(_0x5e10de,_0x3855bb){const _0x5f188b=_0x107345,_0x302f70={'FZqQY':function(_0x216cd8,_0x3d99dd){return _0x216cd8===_0x3d99dd;}},_0x462d75=parseKeyPath(_0x3855bb);let _0x3179c0=_0x5e10de;for(const _0x29647d of _0x462d75){if(_0x302f70['FZqQY'](_0x3179c0,null)||_0x302f70[_0x5f188b(0xfe)](_0x3179c0,undefined)||typeof _0x3179c0!==_0x5f188b(0xb0))return undefined;_0x3179c0=_0x3179c0[_0x29647d];}return _0x3179c0;}export function setNestedValue(_0x49e881,_0x22df62,_0x44e6f8){const _0x29f946=_0x107345,_0x85d1f=parseKeyPath(_0x22df62);let _0x53d018=_0x49e881;for(let _0x4e7a6c=0x0;_0x4e7a6c<_0x85d1f['length']-0x1;_0x4e7a6c++){const _0x528df0=_0x85d1f[_0x4e7a6c];(!(_0x528df0 in _0x53d018)||typeof _0x53d018[_0x528df0]!==_0x29f946(0xb0))&&(_0x53d018[_0x528df0]={}),_0x53d018=_0x53d018[_0x528df0];}_0x53d018[_0x85d1f[_0x85d1f['length']-0x1]]=_0x44e6f8;}export function deleteNestedValue(_0x1f0332,_0x920251){const _0x3ff4db=_0x107345,_0x466852={'WjLfA':function(_0x487088,_0x1adcfd){return _0x487088(_0x1adcfd);},'xrKtp':function(_0x47f90e,_0x511602){return _0x47f90e<_0x511602;},'RwZJK':function(_0xc873b2,_0x56cc88){return _0xc873b2-_0x56cc88;},'xXnJf':'object','gCbDk':function(_0x5e7ff2,_0x239b66){return _0x5e7ff2!==_0x239b66;},'GbQLl':function(_0x5863ef,_0x4e511b){return _0x5863ef-_0x4e511b;}},_0x4742e5=_0x466852[_0x3ff4db(0xcc)](parseKeyPath,_0x920251);let _0x1c2b9b=_0x1f0332;for(let _0x4cb043=0x0;_0x466852['xrKtp'](_0x4cb043,_0x466852['RwZJK'](_0x4742e5['length'],0x1));_0x4cb043++){if(_0x1c2b9b===null||_0x1c2b9b===undefined||typeof _0x1c2b9b!==_0x466852[_0x3ff4db(0xe4)])return![];_0x1c2b9b=_0x1c2b9b[_0x4742e5[_0x4cb043]];}if(_0x1c2b9b===null||_0x1c2b9b===undefined||_0x466852[_0x3ff4db(0xc5)](typeof _0x1c2b9b,_0x466852[_0x3ff4db(0xe4)]))return![];const _0x257f1c=_0x4742e5[_0x466852[_0x3ff4db(0xef)](_0x4742e5['length'],0x1)];if(_0x257f1c in _0x1c2b9b)return delete _0x1c2b9b[_0x257f1c],!![];return![];}function parseKeyPath(_0x30b243){const _0xb4cf2f=_0x107345,_0x147675={'kgwsS':function(_0x12c51e,_0x2895a2){return _0x12c51e===_0x2895a2;},'YBSMm':_0xb4cf2f(0xe6)},_0xc789f4=_0x30b243[_0xb4cf2f(0xb7)]('.');return _0x147675['kgwsS'](_0xc789f4[0x0],_0x147675[_0xb4cf2f(0x9f)])&&(_0xc789f4[0x0]=_0xb4cf2f(0xa9)),_0xc789f4[0x0]===_0xb4cf2f(0xba)&&(_0xc789f4[0x0]=_0xb4cf2f(0xd0)),_0xc789f4;}export function formatSettings(_0x561914,_0x40def6=0x0){const _0x41bb26=_0x107345,_0x28714a={'TOkMe':function(_0x8f74f4,_0x2d8c25){return _0x8f74f4===_0x2d8c25;}},_0x395498=[],_0x2dd5dd='\x20\x20'[_0x41bb26(0xc4)](_0x40def6);for(const [_0x2910df,_0x4b616f]of Object[_0x41bb26(0x10f)](_0x561914)){if(_0x4b616f===undefined)continue;if(_0x28714a['TOkMe'](typeof _0x4b616f,'object')&&_0x4b616f!==null){_0x395498['push'](''+_0x2dd5dd+_0x2910df+':');for(const [_0x16e5a5,_0x319bc8]of Object['entries'](_0x4b616f)){_0x395498[_0x41bb26(0x9d)](_0x2dd5dd+'\x20\x20'+_0x16e5a5+':\x20'+_0x319bc8);}}else _0x395498['push'](''+_0x2dd5dd+_0x2910df+':\x20'+_0x4b616f);}return _0x395498[_0x41bb26(0xcb)]('\x0a');}
|
|
1
|
+
function _0x4a59(_0x1b8738,_0x505dca){_0x1b8738=_0x1b8738-0x93;const _0x308202=_0x3082();let _0x4a5909=_0x308202[_0x1b8738];return _0x4a5909;}const _0xde5ba5=_0x4a59;(function(_0x679405,_0x5b5026){const _0x3829ac=_0x4a59,_0x58c794=_0x679405();while(!![]){try{const _0x42277c=parseInt(_0x3829ac(0x115))/0x1+-parseInt(_0x3829ac(0xcf))/0x2+parseInt(_0x3829ac(0xcc))/0x3+parseInt(_0x3829ac(0xd9))/0x4*(parseInt(_0x3829ac(0xf9))/0x5)+parseInt(_0x3829ac(0xfa))/0x6+-parseInt(_0x3829ac(0xf3))/0x7*(-parseInt(_0x3829ac(0xcd))/0x8)+-parseInt(_0x3829ac(0xd6))/0x9*(parseInt(_0x3829ac(0x97))/0xa);if(_0x42277c===_0x5b5026)break;else _0x58c794['push'](_0x58c794['shift']());}catch(_0x1e4b1c){_0x58c794['push'](_0x58c794['shift']());}}}(_0x3082,0x3940e));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(_0x9bc691,_0x5b8a2b){const _0x3bb001=_0x4a59,_0x2c93f1={'iEzbX':function(_0x3486c8,_0x11b660,_0x1b4f55,_0x3587be){return _0x3486c8(_0x11b660,_0x1b4f55,_0x3587be);},'UygMX':_0x3bb001(0x9a),'IKjNJ':function(_0x1d5892,_0x2dd875,_0x3f2584){return _0x1d5892(_0x2dd875,_0x3f2584);},'MOfEI':function(_0x419c2d,_0x4c6843){return _0x419c2d(_0x4c6843);},'cWjdq':function(_0x48fe97,_0x6db609){return _0x48fe97!==_0x6db609;}},_0x205917=join(_0x5b8a2b,'ci',_0x9bc691),_0x15a137=_0x2c93f1[_0x3bb001(0xec)](join,_0x5b8a2b,_0x3bb001(0x9a),_0x9bc691),_0x265bf6=join(_0x5b8a2b,_0x9bc691),_0x3c0502=join(_0x5b8a2b,_0x2c93f1['UygMX']),_0x348f92=_0x2c93f1[_0x3bb001(0xa1)](join,_0x5b8a2b,'ci');if(_0x2c93f1[_0x3bb001(0xc9)](existsSync,_0x205917))return _0x205917;if(existsSync(_0x15a137))return _0x15a137;if(_0x2c93f1[_0x3bb001(0xc9)](existsSync,_0x265bf6)&&(_0x265bf6!==_0x3c0502&&_0x2c93f1['cWjdq'](_0x265bf6,_0x348f92)?!![]:hasLegacyProfileFiles(_0x265bf6)))return _0x265bf6;return null;}export function getEnvDir(_0x3dc637,_0x2ec9af={}){const _0x2110eb=_0x4a59,_0xb7c7c={'bNhsn':function(_0x19f8c2){return _0x19f8c2();},'RgwXW':function(_0x5ded6d,_0x2a2d9d){return _0x5ded6d(_0x2a2d9d);},'idjGg':function(_0x4dc57d,_0x546b35,_0x4c1753){return _0x4dc57d(_0x546b35,_0x4c1753);},'SoipM':function(_0x450d82,_0x329c15,_0x17ffd4){return _0x450d82(_0x329c15,_0x17ffd4);},'sfwjy':'local'},_0x2d4d67=_0xb7c7c[_0x2110eb(0xf2)](getRangerDir),_0x4c80fd=findEnvInRoot(_0x3dc637,_0x2d4d67);if(_0x4c80fd){if(_0x2ec9af[_0x2110eb(0xff)]&&_0xb7c7c[_0x2110eb(0xc0)](isLegacyEnvPath,_0x4c80fd))throw legacyWriteError(_0x3dc637,_0x4c80fd);return _0x4c80fd;}const _0x8af3bd=_0xb7c7c['bNhsn'](getRangerHomeDir);if(_0x8af3bd!==_0x2d4d67){const _0x321118=_0xb7c7c['idjGg'](findEnvInRoot,_0x3dc637,_0x8af3bd);if(_0x321118){if(_0x2ec9af[_0x2110eb(0xff)]&&_0xb7c7c['RgwXW'](isLegacyEnvPath,_0x321118))throw _0xb7c7c['SoipM'](legacyWriteError,_0x3dc637,_0x321118);return _0x321118;}}const _0x2fb6d5=join(_0x8af3bd,_0xb7c7c[_0x2110eb(0xce)],_0x3dc637);if(_0x2ec9af['forWrite'])throw legacyWriteError(_0x3dc637,_0x2fb6d5);return _0x2fb6d5;}function isLegacyEnvPath(_0x39f8a3){const _0x4f4234=_0x4a59,_0x196421={'eHlIm':function(_0x499984,_0x9bb99e){return _0x499984+_0x9bb99e;},'xyPfU':function(_0x33aa90,_0x5d71d0){return _0x33aa90===_0x5d71d0;}},_0x14a886=getRangerDir(),_0x410cd9=getRangerHomeDir();for(const _0x49f9fe of new Set([_0x14a886,_0x410cd9])){const _0x270071=_0x49f9fe['endsWith']('/')?_0x49f9fe:_0x196421[_0x4f4234(0xa7)](_0x49f9fe,'/');if(_0x196421[_0x4f4234(0xac)](_0x39f8a3,_0x49f9fe)||_0x39f8a3['startsWith'](_0x270071))return!![];}return![];}function legacyWriteError(_0x10ea12,_0x31b638){const _0x12f3e3=_0x4a59,_0x2f7295={'fBVYm':function(_0x3470b4,_0x409288){return _0x3470b4+_0x409288;},'VZmnD':function(_0x3f270b,_0x3ea5f9){return _0x3f270b+_0x3ea5f9;},'fqgcp':function(_0x31273f,_0x3ff6dc){return _0x31273f+_0x3ff6dc;}};return new Error(_0x2f7295[_0x12f3e3(0xdd)](_0x2f7295[_0x12f3e3(0xb1)](_0x2f7295[_0x12f3e3(0xd8)](_0x12f3e3(0xba)+_0x10ea12+'\x22\x20to\x20legacy\x20path\x20'+_0x31b638+'.\x0a',_0x12f3e3(0x98)),_0x12f3e3(0xd1)),_0x12f3e3(0xbf)));}export function findExistingEnv(_0x5e1ede,_0x494b99){const _0x3966d5=_0x4a59,_0x5652fa={'hkEtA':function(_0x177be1){return _0x177be1();},'xHZvz':'local','JfDUj':_0x3966d5(0xe0),'JogbY':function(_0xb19c9e,_0x2e28e9,_0x52e708){return _0xb19c9e(_0x2e28e9,_0x52e708);},'AGBNN':function(_0x4bba65,_0x2e699c,_0xf17552,_0x5736a7){return _0x4bba65(_0x2e699c,_0xf17552,_0x5736a7);},'yZXjX':function(_0x564a0a,_0x1f59d2){return _0x564a0a(_0x1f59d2);}},_0x5b471d=_0x494b99?.['rangerDir'],_0x3bb302=_0x5b471d?[_0x5b471d]:[_0x5652fa['hkEtA'](getRangerDir),_0x5652fa['hkEtA'](getRangerHomeDir)][_0x3966d5(0x107)]((_0x3698b2,_0x4cf7be,_0x19e6e4)=>_0x19e6e4[_0x3966d5(0xb5)](_0x3698b2)===_0x4cf7be),_0x40c421=_0x494b99?.[_0x3966d5(0x9c)]??['ci',_0x5652fa['xHZvz'],_0x5652fa[_0x3966d5(0xc7)]];for(const _0x41674b of _0x3bb302){const _0xa216d2=join(_0x41674b,_0x5652fa[_0x3966d5(0xb2)]),_0x462eb5=_0x5652fa['JogbY'](join,_0x41674b,'ci'),_0x364340=[{'location':'ci','path':_0x5652fa['AGBNN'](join,_0x41674b,'ci',_0x5e1ede)},{'location':'local','path':_0x5652fa[_0x3966d5(0x106)](join,_0x41674b,'local',_0x5e1ede)},{'location':_0x5652fa['JfDUj'],'path':join(_0x41674b,_0x5e1ede)}];for(const _0x2d1695 of _0x364340){if(_0x40c421['includes'](_0x2d1695[_0x3966d5(0xa0)])&&existsSync(_0x2d1695[_0x3966d5(0xf1)])){if(_0x2d1695[_0x3966d5(0xa0)]===_0x5652fa[_0x3966d5(0xc7)]&&(_0x2d1695['path']===_0xa216d2||_0x2d1695[_0x3966d5(0xf1)]===_0x462eb5)&&!_0x5652fa['yZXjX'](hasLegacyProfileFiles,_0x2d1695['path']))continue;return{'path':_0x2d1695['path'],'location':_0x2d1695[_0x3966d5(0xa0)]};}}}return null;}function hasLegacyProfileFiles(_0x211c36){const _0x45643f=_0x4a59,_0x4b3ec8={'GddcU':function(_0x552f8c,_0x413069){return _0x552f8c(_0x413069);},'ZzXMA':'auth.json'};return existsSync(join(_0x211c36,_0x45643f(0xe9)))||_0x4b3ec8[_0x45643f(0xcb)](existsSync,join(_0x211c36,_0x4b3ec8['ZzXMA']))||existsSync(join(_0x211c36,'auth.json.enc'));}export function isEnvCi(_0x283a58){const _0x21966a=_0x4a59,_0x52a768={'nJnYs':function(_0x413deb,_0x255202){return _0x413deb(_0x255202);},'pKrIn':function(_0x4d9c68){return _0x4d9c68();}};if(_0x52a768[_0x21966a(0xca)](existsSync,join(_0x52a768[_0x21966a(0xe5)](getRangerDir),'ci',_0x283a58)))return!![];const _0x344ddf=getRangerHomeDir();if(_0x344ddf!==getRangerDir()&&existsSync(join(_0x344ddf,'ci',_0x283a58)))return!![];return![];}export async function cleanupTempFiles(_0x4569b1){const _0x41b8f5=_0x4a59,_0x1f4ee2=[_0x4569b1['tempAuthPath'],_0x4569b1[_0x41b8f5(0xf5)]][_0x41b8f5(0x107)](Boolean);await Promise['all'](_0x1f4ee2['map'](_0x5a0b2d=>unlink(_0x5a0b2d)['catch'](_0x16acee=>{const _0x379791=_0x41b8f5;_0x16acee['code']!==_0x379791(0xbb)&&console[_0x379791(0xa9)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x5a0b2d+':',_0x16acee['message']);})));}export function getSettingsPath(_0x5a5450){const _0x1449df=_0x4a59,_0x6f2dda={'KDBJG':function(_0xd36a09,_0x5d1f09,_0x49d800){return _0xd36a09(_0x5d1f09,_0x49d800);},'BRVaC':function(_0x1fc767,_0x5daaf8){return _0x1fc767(_0x5daaf8);}};return _0x6f2dda['KDBJG'](join,_0x6f2dda[_0x1449df(0xbd)](getEnvDir,_0x5a5450),'settings.json');}export async function loadSettings(_0x5bc8db){const _0x624004=_0x4a59,_0x58cd6d={'BlHQL':function(_0x123f04,_0x2a2312){return _0x123f04(_0x2a2312);}},_0x5bd53e=_0x58cd6d['BlHQL'](getSettingsPath,_0x5bc8db);if(!existsSync(_0x5bd53e))return{};try{const _0x146fa9=await readFile(_0x5bd53e,_0x624004(0xc6));return JSON[_0x624004(0xa4)](_0x146fa9);}catch{return{};}}function _0x3082(){const _0x2cde09=['warn','clipboard-write','djXUu','xyPfU','AuGng','playwright-cli','--no-sandbox','pVkoy','VZmnD','xHZvz','pdf','storageStatePath','indexOf','setupHeader','extraHTTPHeaders','storageState','MpwDG','Refusing\x20to\x20write\x20profile\x20\x22','ENOENT','file','BRVaC','nova-user-data','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','RgwXW','replace','install','getuid','cjqoJ','isArray','utf-8','JfDUj','chromium','MOfEI','nJnYs','GddcU','435984TtApya','1688BgrNVc','sfwjy','775702rIFjDT','stagehand','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ranger-config','YdFSt','TJXwi','\x20is\x20not\x20set','936ZhpkyR','mGCsH','fqgcp','4AcfdRk','vUagh','dBldS','entries','fBVYm','userAgent','header','legacy','auth.json','OWgKL','--allow-insecure-localhost','TDtPa','pKrIn','none','ELajm','args','settings.json','UYMYa','split','iEzbX','contextOptions','auth.json.enc','sessions','kYbhv','path','bNhsn','9345plrbUJ','rczTl','configPath','catch','UDjyU','boolean','760510EHQAtR','987492UyDIIB','headers','now','--disable-setuid-sandbox','TIMeV','forWrite','keys','oDeiJ','string','-cli','object','qIhoJ','AGBNN','filter','Environment\x20variable\x20','UrQpv','browser','executablePath','push','cNyvX','repeat','ysAfL','TVBGu','.json','map','includes','length','337720SWhnvU','LPLnO','join','core','yfFPB','-rangerwright.json','xSJBb','Gjczi','44140YvYCUF','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','pRllx','local','allowInsecureLocalhost','locations','clipboard-read','zZLEr','TGcKl','location','IKjNJ','hgVwj','cdpEndpoint','parse','safeMode','LpyYc','eHlIm','JSNeS'];_0x3082=function(){return _0x2cde09;};return _0x3082();}export async function saveSettings(_0x7e0037,_0x25c31d){const _0x19b6ec=_0x4a59,_0x4042c2={'yfFPB':function(_0x328cbd,_0x39346d){return _0x328cbd(_0x39346d);},'XCgHe':function(_0x40c0a5,_0x307ecb){return _0x40c0a5(_0x307ecb);},'FStqy':function(_0x24f562,_0x3139fc,_0x5e71e){return _0x24f562(_0x3139fc,_0x5e71e);}},_0x4530c6=_0x4042c2[_0x19b6ec(0x93)](getSettingsPath,_0x7e0037),_0x1a64de=dirname(_0x4530c6);!_0x4042c2['XCgHe'](existsSync,_0x1a64de)&&await _0x4042c2['FStqy'](mkdir,_0x1a64de,{'recursive':!![]}),await writeFile(_0x4530c6,JSON['stringify'](_0x25c31d,null,0x2));}export function resolveEnvVars(_0x1d1928){const _0x506cc7=_0x4a59,_0x27eb6a={'ysAfL':'string','aijDz':function(_0x2b0177,_0xc52da0){return _0x2b0177===_0xc52da0;},'pRhuC':'object'};if(typeof _0x1d1928===_0x27eb6a[_0x506cc7(0x10f)])return _0x1d1928[_0x506cc7(0xc1)](/\$\{(\w+)\}/g,(_0x545061,_0x5c66b1)=>{const _0x206889=_0x506cc7,_0x313775=process['env'][_0x5c66b1];if(_0x313775===undefined)throw new Error(_0x206889(0x108)+_0x5c66b1+_0x206889(0xd5));return _0x313775;});if(Array[_0x506cc7(0xc5)](_0x1d1928))return _0x1d1928[_0x506cc7(0x112)](resolveEnvVars);if(_0x1d1928&&_0x27eb6a['aijDz'](typeof _0x1d1928,_0x27eb6a['pRhuC']))return Object['fromEntries'](Object[_0x506cc7(0xdc)](_0x1d1928)['map'](([_0x151f8d,_0x490a18])=>[_0x151f8d,resolveEnvVars(_0x490a18)]));return _0x1d1928;}const isRecord=_0x1701d7=>typeof _0x1701d7===_0xde5ba5(0x104)&&_0x1701d7!==null&&!Array[_0xde5ba5(0xc5)](_0x1701d7),asRecord=_0x5da3db=>isRecord(_0x5da3db)?_0x5da3db:undefined,mergeHeaders=(_0x1fed5f,_0x6e5fb8)=>{const _0x3d17c9=_0xde5ba5,_0x7cb561={'UrQpv':function(_0x39dd7d,_0x125f01){return _0x39dd7d??_0x125f01;}},_0x1245d7={..._0x1fed5f??{},..._0x7cb561[_0x3d17c9(0x109)](_0x6e5fb8,{})};return Object[_0x3d17c9(0x100)](_0x1245d7)[_0x3d17c9(0x114)]?_0x1245d7: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',_0xde5ba5(0xe3)];export function buildBrowserOptionsFromSettings(_0x496b79,_0x5dad54={}){const _0x437993=_0xde5ba5,_0x3ed7cc={'UDjyU':function(_0x5f4486,_0x48f37){return _0x5f4486===_0x48f37;},'qdvCd':function(_0x448044,_0x2c173b){return _0x448044(_0x2c173b);}},_0x1a638f=asRecord(_0x496b79[_0x437993(0x10a)]),_0x3a9280={...asRecord(_0x1a638f?.['launchOptions'])??{}};typeof _0x5dad54['headless']===_0x437993(0xf8)&&(_0x3a9280['headless']=_0x5dad54['headless']);if(_0x496b79[_0x437993(0xa5)]){const _0x1e1854=_0x3a9280['args']??[],_0x13abda=SAFE_MODE_ARGS['filter'](_0x56f25e=>!_0x1e1854[_0x437993(0x113)](_0x56f25e));_0x3a9280['args']=[..._0x1e1854,..._0x13abda];}if(_0x496b79[_0x437993(0x9b)]){const _0x25f62e=_0x3a9280['args']??[],_0x2e7e28=ALLOW_LOCALHOST_ARGS[_0x437993(0x107)](_0x51e9c1=>!_0x25f62e['includes'](_0x51e9c1));_0x3a9280[_0x437993(0xe8)]=[..._0x25f62e,..._0x2e7e28];}const _0x158ec8={...asRecord(_0x1a638f?.['contextOptions'])??{}};_0x158ec8['ignoreHTTPSErrors']=!![];_0x3ed7cc[_0x437993(0xf7)](typeof _0x496b79['userAgent'],'string')&&(_0x158ec8['userAgent']=_0x496b79[_0x437993(0xde)]);const _0x2064d0=mergeHeaders(asRecord(_0x158ec8['extraHTTPHeaders']),_0x3ed7cc['qdvCd'](asRecord,_0x496b79['headers']));return _0x2064d0?_0x158ec8['extraHTTPHeaders']=_0x2064d0:delete _0x158ec8['extraHTTPHeaders'],_0x5dad54['storageStatePath']&&(_0x158ec8[_0x437993(0xb8)]=_0x5dad54[_0x437993(0xb4)]),{'launchOptions':_0x3a9280,'contextOptions':_0x158ec8};}export async function resolveProfileStorageState(_0x1820fd){const _0x191315={'fNDGQ':function(_0x178c8f,_0x42fb38){return _0x178c8f(_0x42fb38);}};return _0x191315['fNDGQ'](resolveLocalAuthPath,getEnvDir(_0x1820fd));}async function resolveLocalAuthPath(_0x410cf6){const _0x297afe=_0xde5ba5,_0x19c1ec={'ccGjU':function(_0x3abcfa,_0x292ec5,_0x3866d8){return _0x3abcfa(_0x292ec5,_0x3866d8);},'AuGng':function(_0x33bd7a,_0x26a245){return _0x33bd7a(_0x26a245);},'TGcKl':function(_0x2e4f0d,_0x109e85,_0x4b4ebf){return _0x2e4f0d(_0x109e85,_0x4b4ebf);},'azrRC':function(_0x4ef593,_0x18d55d,_0x24aa79){return _0x4ef593(_0x18d55d,_0x24aa79);}},_0x1fbd8c=_0x19c1ec['ccGjU'](join,_0x410cf6,_0x297afe(0xee)),_0x5bcbc0=join(_0x410cf6,_0x297afe(0xe1));if(_0x19c1ec['AuGng'](existsSync,_0x1fbd8c))try{const _0x6aa9bd=await getToken();if(!_0x6aa9bd)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x51361f=await _0x19c1ec[_0x297afe(0xad)](readFile,_0x1fbd8c),_0x5e3772=_0x19c1ec[_0x297afe(0x9f)](decrypt,_0x51361f,_0x6aa9bd),_0x2f83da=_0x19c1ec['azrRC'](join,tmpdir(),'ranger-auth-'+Date[_0x297afe(0xfc)]()+_0x297afe(0x111));return await writeFile(_0x2f83da,_0x5e3772),{'storageStatePath':_0x2f83da,'tempAuthPath':_0x2f83da};}catch(_0x5c644a){const _0x19dfc5=_0x5c644a instanceof Error?_0x5c644a['message']:String(_0x5c644a);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x19dfc5);}if(existsSync(_0x5bcbc0))return{'storageStatePath':_0x5bcbc0};return{};}export async function buildPlaywrightConfig(_0x2cae39,_0x4c7219,_0x3a3267,_0x4a3d37,_0x5c248e){const _0x5b8e29=_0xde5ba5,_0x212f6b={'SFuej':function(_0x2fb233,_0x1c1975,_0x337726,_0x205c57,_0x33d8d8,_0x51f84a,_0x27fe8f){return _0x2fb233(_0x1c1975,_0x337726,_0x205c57,_0x33d8d8,_0x51f84a,_0x27fe8f);},'MpwDG':'stagehand','vUagh':function(_0x384705,_0x2a932d){return _0x384705(_0x2a932d);}};if(_0x5c248e)return _0x212f6b['SFuej'](buildPlaywrightConfigCore,_0x2cae39,_0x5c248e,_0x4c7219,_0x3a3267,_0x4a3d37,_0x212f6b[_0x5b8e29(0xb9)]);const {storageStatePath:_0x145473,tempAuthPath:_0x177814}=await _0x212f6b['vUagh'](resolveLocalAuthPath,getEnvDir(_0x4c7219));try{const _0x1f29bb=await _0x212f6b['SFuej'](buildPlaywrightConfigCore,_0x2cae39,_0x145473,_0x4c7219,_0x3a3267,_0x4a3d37,_0x5b8e29(0xd0));return{..._0x1f29bb,'tempAuthPath':_0x177814};}catch(_0x2397cb){_0x177814&&await _0x212f6b[_0x5b8e29(0xda)](unlink,_0x177814)['catch'](()=>{});throw _0x2397cb;}}export async function buildPlaywrightConfigCore(_0x32be43,_0x15cee0,_0x1c0e5a,_0x14b1ef,_0x359ac9,_0x49198a=_0xde5ba5(0xd0)){const _0x3eab1d=_0xde5ba5,_0x53ef14={'pRllx':'--no-sandbox','cNyvX':_0x3eab1d(0x9d),'oDeiJ':'chromium','iaQou':_0x3eab1d(0xe6),'rczTl':_0x3eab1d(0x118),'UYMYa':_0x3eab1d(0xb3),'qIhoJ':function(_0x2d1a62,_0x1f6253){return _0x2d1a62===_0x1f6253;},'kYbhv':_0x3eab1d(0xd2),'wCEsa':_0x3eab1d(0xae),'LPLnO':_0x3eab1d(0x103),'SyHqm':function(_0x1561d5,_0x43a94b,_0x2cb5c0){return _0x1561d5(_0x43a94b,_0x2cb5c0);}},_0x4b211e=_0x14b1ef||randomUUID(),_0x4a19f0=join(getRangerDir(),'sessions',_0x4b211e),_0x26508b=Boolean(_0x32be43['cdpEndpoint']),_0x3761f2=_0x26508b?{'browserName':_0x53ef14[_0x3eab1d(0x101)],'cdpEndpoint':_0x32be43[_0x3eab1d(0xa3)]}:((()=>{const _0xf62177=_0x3eab1d,{launchOptions:_0x50e04a,contextOptions:_0x208902}=buildBrowserOptionsFromSettings(_0x32be43,{'headless':_0x359ac9?![]:_0x32be43['headless']??!![],'storageStatePath':_0x15cee0});if(process['getuid']?.()===0x0){const _0x1c13c4=[_0x53ef14[_0xf62177(0x99)],_0xf62177(0xfd)],_0x3aea94=_0x50e04a['args']??[],_0x455430=_0x1c13c4[_0xf62177(0x107)](_0x50cfd7=>!_0x3aea94[_0xf62177(0x113)](_0x50cfd7));_0x50e04a['args']=[..._0x3aea94,..._0x455430];}return{'isolated':!![],'browserName':_0xf62177(0xc8),'launchOptions':_0x50e04a,'contextOptions':{..._0x208902,'permissions':[_0x53ef14[_0xf62177(0x10d)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3a16e2=_0x49198a==='playwright-cli'?{'browser':_0x3761f2,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4a19f0,'outputMode':_0x3eab1d(0xbc),'codegen':_0x53ef14['iaQou']}:{'name':_0x1c0e5a,'browser':_0x3761f2,'capabilities':[_0x53ef14[_0x3eab1d(0xf4)],'tabs',_0x3eab1d(0xc2),_0x53ef14[_0x3eab1d(0xea)],'vision'],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4a19f0};if(!_0x26508b){const _0x4b3439=_0x3a16e2[_0x3eab1d(0x10a)],_0x544444=_0x4b3439[_0x3eab1d(0xed)];if(_0x544444[_0x3eab1d(0xde)]===undefined)delete _0x544444['userAgent'];if(_0x53ef14[_0x3eab1d(0x105)](_0x544444[_0x3eab1d(0xb8)],undefined))delete _0x544444['storageState'];}const _0x556ecd=join(tmpdir(),_0x53ef14[_0x3eab1d(0xf0)]);!existsSync(_0x556ecd)&&await mkdir(_0x556ecd,{'recursive':!![]});const _0x1e0b5a=_0x49198a===_0x53ef14['wCEsa']?_0x53ef14[_0x3eab1d(0x116)]:'',_0xfe9f09=_0x53ef14['SyHqm'](join,_0x556ecd,_0x1c0e5a+'-'+Date[_0x3eab1d(0xfc)]()+_0x1e0b5a+'.json');return await writeFile(_0xfe9f09,JSON['stringify'](_0x3a16e2,null,0x2)),{'configPath':_0xfe9f09,'storageStatePath':_0x15cee0};}export async function buildPlaywrightCliConfig(_0x150d8d,_0x3f8dbf,_0x43d8aa,_0x54528c,_0x1e4820){const _0x5c2e1d=_0xde5ba5,_0xf41039={'Midcz':function(_0x4a3ff2,_0x36ae2e,_0x2395a5,_0x4c9b86,_0x1086ef,_0x288945,_0x5b7cf9){return _0x4a3ff2(_0x36ae2e,_0x2395a5,_0x4c9b86,_0x1086ef,_0x288945,_0x5b7cf9);},'mGCsH':'playwright-cli'};if(_0x1e4820)return _0xf41039['Midcz'](buildPlaywrightConfigCore,_0x150d8d,_0x1e4820,_0x3f8dbf,_0x43d8aa,_0x54528c,_0xf41039[_0x5c2e1d(0xd7)]);const {storageStatePath:_0x3c90e4,tempAuthPath:_0x5e7a07}=await resolveLocalAuthPath(getEnvDir(_0x3f8dbf));try{const _0x24ba90=await _0xf41039['Midcz'](buildPlaywrightConfigCore,_0x150d8d,_0x3c90e4,_0x3f8dbf,_0x43d8aa,_0x54528c,'playwright-cli');return{..._0x24ba90,'tempAuthPath':_0x5e7a07};}catch(_0x5a2a9d){_0x5e7a07&&await unlink(_0x5e7a07)[_0x5c2e1d(0xf6)](()=>{});throw _0x5a2a9d;}}export async function buildRangerwrightCliConfig(_0x16e33b,_0x44b95a,_0x147432,_0x50171d,_0x2baed4){const _0xb9bace=_0xde5ba5,_0x30f7c3={'TJXwi':function(_0x19fad1,_0x33b75d,_0x1b508d){return _0x19fad1(_0x33b75d,_0x1b508d);},'HzOXz':function(_0x4343b3,_0x523026){return _0x4343b3===_0x523026;},'cjqoJ':_0xb9bace(0xaf),'ibVed':'--disable-setuid-sandbox','TIMeV':_0xb9bace(0xc8),'IxUqy':_0xb9bace(0x9d),'hgVwj':_0xb9bace(0xaa),'OWgKL':function(_0x388773,_0x3cba54){return _0x388773(_0x3cba54);},'ELajm':function(_0x569064,_0x27dfaf,_0x109209){return _0x569064(_0x27dfaf,_0x109209);}},{storageStatePath:_0x38fd36,tempAuthPath:_0xf90767}=_0x2baed4?{'storageStatePath':_0x2baed4,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x30f7c3['OWgKL'](getEnvDir,_0x44b95a)),_0xba6d8c=_0x147432||randomUUID(),_0x2ca35a=join(getRangerDir(),_0xb9bace(0xef),_0xba6d8c),_0x44656a=Boolean(_0x16e33b['cdpEndpoint']),_0x59498a=_0x44656a?{'browserName':_0xb9bace(0xc8),'cdpEndpoint':_0x16e33b['cdpEndpoint']}:((()=>{const _0x18ef58=_0xb9bace,{launchOptions:_0x18782a,contextOptions:_0x56df03}=_0x30f7c3['TJXwi'](buildBrowserOptionsFromSettings,_0x16e33b,{'headless':_0x50171d?![]:_0x16e33b['headless']??!![],'storageStatePath':_0x38fd36});if(_0x30f7c3['HzOXz'](process[_0x18ef58(0xc3)]?.(),0x0)){const _0x14e14a=[_0x30f7c3[_0x18ef58(0xc4)],_0x30f7c3['ibVed']],_0x32c280=_0x18782a['args']??[],_0x4087c3=_0x14e14a[_0x18ef58(0x107)](_0x3709fd=>!_0x32c280['includes'](_0x3709fd));_0x18782a[_0x18ef58(0xe8)]=[..._0x32c280,..._0x4087c3];}return{'browserName':_0x30f7c3[_0x18ef58(0xfe)],'launchOptions':_0x18782a,'contextOptions':{..._0x56df03,'permissions':[_0x30f7c3['IxUqy'],_0x30f7c3[_0x18ef58(0xa2)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x44656a){const _0xcc029f=_0x59498a[_0xb9bace(0xed)];if(_0xcc029f){if(_0xcc029f[_0xb9bace(0xde)]===undefined)delete _0xcc029f['userAgent'];if(_0xcc029f[_0xb9bace(0xb8)]===undefined)delete _0xcc029f['storageState'];}}const _0x273019={'browser':_0x59498a,'outputDir':_0x2ca35a,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x3cee1b;try{const _0x32cbf9=_0x30f7c3[_0xb9bace(0xd4)](join,tmpdir(),'ranger-config');!_0x30f7c3[_0xb9bace(0xe2)](existsSync,_0x32cbf9)&&await _0x30f7c3['ELajm'](mkdir,_0x32cbf9,{'recursive':!![]}),_0x3cee1b=join(_0x32cbf9,_0x44b95a+'-'+Date[_0xb9bace(0xfc)]()+_0xb9bace(0x94)),await _0x30f7c3[_0xb9bace(0xe7)](writeFile,_0x3cee1b,JSON['stringify'](_0x273019,null,0x2));}catch(_0x26ca0f){_0xf90767&&await unlink(_0xf90767)[_0xb9bace(0xf6)](()=>{});throw _0x26ca0f;}return{'configPath':_0x3cee1b,'storageStatePath':_0x38fd36,'tempAuthPath':_0xf90767,'outputDir':_0x2ca35a};}export async function buildNovaActCliConfig(_0x53876f,_0x4beadb,_0x6ea91,_0x14890a,_0x209e1f){const _0x267cf3=_0xde5ba5,_0x42e1e4={'TDtPa':function(_0x886479,_0x49e652,_0x3cf16b,_0x5c6b75){return _0x886479(_0x49e652,_0x3cf16b,_0x5c6b75);},'jRUoB':function(_0x2f36cd){return _0x2f36cd();},'dTYVh':'sessions','Gearm':_0x267cf3(0xbe),'mmbzt':function(_0x18ca57,_0x3a21f7,_0x1c57e4){return _0x18ca57(_0x3a21f7,_0x1c57e4);},'tiwyi':'Default','Jvdzk':function(_0x3d6dfb,_0x1bcc5d,_0x53f276){return _0x3d6dfb(_0x1bcc5d,_0x53f276);},'zZLEr':function(_0x492342,_0x515147){return _0x492342===_0x515147;},'svqLr':function(_0x4843d7,_0x5014d4){return _0x4843d7===_0x5014d4;},'ymYlH':_0x267cf3(0x102),'YBjcV':function(_0xfe827d,_0x2693e2){return _0xfe827d(_0x2693e2);},'SWUeh':function(_0x4e6c73,_0x5c623e){return _0x4e6c73(_0x5c623e);},'TVBGu':function(_0x3dfeb8,_0x4c65b2){return _0x3dfeb8(_0x4c65b2);}},{storageStatePath:_0x343ddf,tempAuthPath:_0x523d35}=_0x209e1f?{'storageStatePath':_0x209e1f,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x4beadb)),_0x467e5a=_0x6ea91||randomUUID(),_0x3d821e=_0x42e1e4[_0x267cf3(0xe4)](join,_0x42e1e4['jRUoB'](getRangerDir),_0x42e1e4['dTYVh'],_0x467e5a),_0x2c9905=join(_0x3d821e,_0x42e1e4['Gearm']),_0x4b489a=_0x343ddf?_0x42e1e4['mmbzt'](join,_0x2c9905,_0x42e1e4['tiwyi']):undefined,{launchOptions:_0x212f37,contextOptions:_0x3ac303}=_0x42e1e4['Jvdzk'](buildBrowserOptionsFromSettings,_0x53876f,{'headless':_0x14890a?![]:_0x53876f['headless']??!![],'storageStatePath':_0x343ddf});if(_0x42e1e4[_0x267cf3(0x9e)](process[_0x267cf3(0xc3)]?.(),0x0)){const _0x3dddee=[_0x267cf3(0xaf),'--disable-setuid-sandbox'],_0xde22a0=_0x212f37['args']??[],_0x5155fa=_0x3dddee[_0x267cf3(0x107)](_0x4cf96b=>!_0xde22a0['includes'](_0x4cf96b));_0x212f37['args']=[..._0xde22a0,..._0x5155fa];}const _0x2f706e=_0x42e1e4['svqLr'](typeof _0x212f37[_0x267cf3(0x10b)],_0x42e1e4['ymYlH'])?_0x212f37[_0x267cf3(0x10b)]:_0x343ddf?chromium[_0x267cf3(0x10b)]():undefined;return{'storageStatePath':_0x343ddf,'tempAuthPath':_0x523d35,'baseUrl':_0x53876f['baseUrl'],'headless':Boolean(_0x212f37['headless']),'userDataDir':_0x2c9905,'browserProfilePath':_0x4b489a,'executablePath':_0x2f706e,'launchArgs':Array['isArray'](_0x212f37[_0x267cf3(0xe8)])?_0x212f37[_0x267cf3(0xe8)]['filter'](_0x544cdf=>typeof _0x544cdf===_0x267cf3(0x102)):[],'userAgent':typeof _0x3ac303[_0x267cf3(0xde)]===_0x267cf3(0x102)?_0x3ac303['userAgent']:undefined,'extraHTTPHeaders':_0x3ac303[_0x267cf3(0xb7)],'allowInsecureLocalhost':_0x42e1e4['YBjcV'](Boolean,_0x53876f[_0x267cf3(0x9b)]),'safeMode':_0x42e1e4['SWUeh'](Boolean,_0x53876f[_0x267cf3(0xa5)]),'cdpEndpoint':_0x53876f[_0x267cf3(0xa3)],'isCdpMode':_0x42e1e4[_0x267cf3(0x110)](Boolean,_0x53876f[_0x267cf3(0xa3)])};}export function getNestedValue(_0x4f33f8,_0x4ce92b){const _0xaf9f48=_0xde5ba5,_0x531245={'Gjczi':function(_0x53cc28,_0x316c7f){return _0x53cc28(_0x316c7f);},'jXdro':function(_0x30ce9c,_0x31ffac){return _0x30ce9c===_0x31ffac;},'jLGAU':_0xaf9f48(0x104)},_0x20bab8=_0x531245[_0xaf9f48(0x96)](parseKeyPath,_0x4ce92b);let _0x11a21f=_0x4f33f8;for(const _0x3e5dd6 of _0x20bab8){if(_0x531245['jXdro'](_0x11a21f,null)||_0x11a21f===undefined||typeof _0x11a21f!==_0x531245['jLGAU'])return undefined;_0x11a21f=_0x11a21f[_0x3e5dd6];}return _0x11a21f;}export function setNestedValue(_0x3d43b2,_0x24db3f,_0x1c3de8){const _0xa9fcf6=_0xde5ba5,_0x34c81c={'pVkoy':function(_0x445d2a,_0x2ffe0b){return _0x445d2a<_0x2ffe0b;},'xSJBb':'object'},_0x35bc99=parseKeyPath(_0x24db3f);let _0x42c201=_0x3d43b2;for(let _0x3852ac=0x0;_0x34c81c[_0xa9fcf6(0xb0)](_0x3852ac,_0x35bc99[_0xa9fcf6(0x114)]-0x1);_0x3852ac++){const _0x326bfa=_0x35bc99[_0x3852ac];(!(_0x326bfa in _0x42c201)||typeof _0x42c201[_0x326bfa]!==_0x34c81c[_0xa9fcf6(0x95)])&&(_0x42c201[_0x326bfa]={}),_0x42c201=_0x42c201[_0x326bfa];}_0x42c201[_0x35bc99[_0x35bc99[_0xa9fcf6(0x114)]-0x1]]=_0x1c3de8;}export function deleteNestedValue(_0x330b60,_0x3b81d2){const _0x1b2887=_0xde5ba5,_0x34bfb0={'sCEwS':function(_0x20bbc4,_0x37ceac){return _0x20bbc4(_0x37ceac);},'qTgto':function(_0x484124,_0x229ed5){return _0x484124<_0x229ed5;},'LpyYc':function(_0xe996b8,_0xa22be9){return _0xe996b8!==_0xa22be9;},'vplWG':'object','JSNeS':function(_0x58919c,_0x2cd809){return _0x58919c===_0x2cd809;}},_0x3fe7e9=_0x34bfb0['sCEwS'](parseKeyPath,_0x3b81d2);let _0x126f67=_0x330b60;for(let _0x431a7f=0x0;_0x34bfb0['qTgto'](_0x431a7f,_0x3fe7e9['length']-0x1);_0x431a7f++){if(_0x126f67===null||_0x126f67===undefined||_0x34bfb0[_0x1b2887(0xa6)](typeof _0x126f67,_0x34bfb0['vplWG']))return![];_0x126f67=_0x126f67[_0x3fe7e9[_0x431a7f]];}if(_0x126f67===null||_0x34bfb0[_0x1b2887(0xa8)](_0x126f67,undefined)||_0x34bfb0[_0x1b2887(0xa6)](typeof _0x126f67,'object'))return![];const _0x2f3a04=_0x3fe7e9[_0x3fe7e9[_0x1b2887(0x114)]-0x1];if(_0x2f3a04 in _0x126f67)return delete _0x126f67[_0x2f3a04],!![];return![];}function parseKeyPath(_0x592732){const _0x194605=_0xde5ba5,_0x5b9428={'YdFSt':_0x194605(0xdf),'tUvyb':_0x194605(0xfb),'djXUu':_0x194605(0xb6)},_0x529078=_0x592732[_0x194605(0xeb)]('.');return _0x529078[0x0]===_0x5b9428[_0x194605(0xd3)]&&(_0x529078[0x0]=_0x5b9428['tUvyb']),_0x529078[0x0]===_0x5b9428[_0x194605(0xab)]&&(_0x529078[0x0]='setupHeaders'),_0x529078;}export function formatSettings(_0x5d3059,_0x24f9c2=0x0){const _0x2e64af=_0xde5ba5,_0x860f30={'dBldS':function(_0x4f49c0,_0x52d1e6){return _0x4f49c0!==_0x52d1e6;}},_0x288cb1=[],_0x29d5a8='\x20\x20'[_0x2e64af(0x10e)](_0x24f9c2);for(const [_0x39efcc,_0x1673c0]of Object['entries'](_0x5d3059)){if(_0x1673c0===undefined)continue;if(typeof _0x1673c0===_0x2e64af(0x104)&&_0x860f30[_0x2e64af(0xdb)](_0x1673c0,null)){_0x288cb1[_0x2e64af(0x10c)](''+_0x29d5a8+_0x39efcc+':');for(const [_0x5b41ab,_0x391b58]of Object[_0x2e64af(0xdc)](_0x1673c0)){_0x288cb1['push'](_0x29d5a8+'\x20\x20'+_0x5b41ab+':\x20'+_0x391b58);}}else _0x288cb1['push'](''+_0x29d5a8+_0x39efcc+':\x20'+_0x1673c0);}return _0x288cb1[_0x2e64af(0x117)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x413b5d,_0x2a7c03){const _0x507299=_0x2094,_0x3a0296=_0x413b5d();while(!![]){try{const _0x25dbf6=parseInt(_0x507299(0xf6))/0x1*(parseInt(_0x507299(0xfc))/0x2)+-parseInt(_0x507299(0xfb))/0x3*(-parseInt(_0x507299(0xf4))/0x4)+parseInt(_0x507299(0xf7))/0x5*(parseInt(_0x507299(0xfd))/0x6)+parseInt(_0x507299(0xfa))/0x7+-parseInt(_0x507299(0xf9))/0x8*(-parseInt(_0x507299(0xff))/0x9)+-parseInt(_0x507299(0xf2))/0xa+-parseInt(_0x507299(0x100))/0xb;if(_0x25dbf6===_0x2a7c03)break;else _0x3a0296['push'](_0x3a0296['shift']());}catch(_0x3d4118){_0x3a0296['push'](_0x3a0296['shift']());}}}(_0xff8e,0xbc947));function _0x2094(_0x1a3105,_0x3c71c7){_0x1a3105=_0x1a3105-0xf2;const _0xff8eaf=_0xff8e();let _0x2094cb=_0xff8eaf[_0x1a3105];return _0x2094cb;}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0xff8e(){const _0x314334=['66QHlRCy','11086KjwJSD','1398702ZfXRyf','ranger/SKILL.md','795699tBIDPd','21526384ljgmcu','7443740RMgMRj','UFlQC','217316ttHVlS','MRCub','122mzSVbd','5yhHXQA','skills','56TDDzDP','5251841iCWIAA'];_0xff8e=function(){return _0x314334;};return _0xff8e();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x5324e9){const _0x4d8fc1=_0x2094,_0x22a0b5={'MRCub':function(_0x517931,_0x575df4,_0x10f9f8){return _0x517931(_0x575df4,_0x10f9f8);}},_0x1f9039=join(__dirname,'..','..',_0x4d8fc1(0xf8)),_0x8c5a08=_0x22a0b5[_0x4d8fc1(0xf5)](join,_0x1f9039,_0x5324e9);try{return readFileSync(_0x8c5a08,'utf-8');}catch{return'';}}export function getRangerSkillContent(){const _0x38f9d2=_0x2094,_0x140042={'UFlQC':function(_0x5e50de,_0x5bc936){return _0x5e50de(_0x5bc936);}};return _0x140042[_0x38f9d2(0xf3)](readSkillContent,_0x38f9d2(0xfe));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5104e7=_0x1cac;(function(_0x53d439,_0x491590){const _0x44d395=_0x1cac,_0x4fd2f7=_0x53d439();while(!![]){try{const _0x417711=parseInt(_0x44d395(0x157))/0x1*(parseInt(_0x44d395(0x15e))/0x2)+parseInt(_0x44d395(0x16c))/0x3+-parseInt(_0x44d395(0x156))/0x4+-parseInt(_0x44d395(0x166))/0x5*(-parseInt(_0x44d395(0x15a))/0x6)+-parseInt(_0x44d395(0x16e))/0x7+parseInt(_0x44d395(0x16d))/0x8+-parseInt(_0x44d395(0x152))/0x9;if(_0x417711===_0x491590)break;else _0x4fd2f7['push'](_0x4fd2f7['shift']());}catch(_0x224e61){_0x4fd2f7['push'](_0x4fd2f7['shift']());}}}(_0x3b3a,0x2f683));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';function _0x1cac(_0x35e797,_0x3fcc69){_0x35e797=_0x35e797-0x149;const _0x3b3a18=_0x3b3a();let _0x1cacee=_0x3b3a18[_0x35e797];return _0x1cacee;}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'];export const DEPRECATED_SKILLS=['e2e-test-recommender',_0x5104e7(0x15d),_0x5104e7(0x161)];export async function installSkill(_0x53675f,_0x594312={}){const _0x4a727c=_0x5104e7,_0x40674f={'teDfm':_0x4a727c(0x14d),'oyFIe':function(_0x176cfc){return _0x176cfc();},'aLAFS':function(_0xcb2059,_0x90bb68,_0x5e5f98){return _0xcb2059(_0x90bb68,_0x5e5f98);},'OWgMs':function(_0x6592c0,_0x1b665e){return _0x6592c0(_0x1b665e);},'nkaiL':'SKILL.md','nnGVr':function(_0x3f4a68,_0x2bca34){return _0x3f4a68&&_0x2bca34;},'ABmfv':'opencode','GpMJO':function(_0x3427b9,_0x181ec2){return _0x3427b9(_0x181ec2);},'QsFKM':function(_0x495f92,_0x1281fb){return _0x495f92(_0x1281fb);},'tofiI':function(_0x3ea8bd,_0x499fe,_0x56cd09){return _0x3ea8bd(_0x499fe,_0x56cd09);},'JBFkf':_0x4a727c(0x14c),'FPjRZ':function(_0x3adea2,_0x4788fc){return _0x3adea2(_0x4788fc);},'mnvmm':function(_0x2a5a22,_0x3a25b5){return _0x2a5a22>_0x3a25b5;},'XhpUu':function(_0x22c6a9,_0x3eb470,_0x2f11e0,_0x30a9d3){return _0x22c6a9(_0x3eb470,_0x2f11e0,_0x30a9d3);}},{level:level=_0x40674f[_0x4a727c(0x15c)],cliVersion:_0x5a140d,platform:platform=_0x4a727c(0x14b)}=_0x594312,_0x39daa4=_0x40674f['oyFIe'](getSourceSkillsDir),_0x30ea5a=_0x40674f['aLAFS'](join,_0x39daa4,_0x53675f),_0x191bb6=join(_0x39daa4,_0x53675f+_0x4a727c(0x163)),_0x1b2bc8=existsSync(_0x30ea5a)&&statSync(_0x30ea5a)[_0x4a727c(0x168)]()&&_0x40674f['OWgMs'](existsSync,join(_0x30ea5a,_0x40674f['nkaiL'])),_0x50f46b=existsSync(_0x191bb6);if(_0x40674f['nnGVr'](!_0x1b2bc8,!_0x50f46b))return console[_0x4a727c(0x159)](_0x4a727c(0x162)+_0x53675f),![];const _0x3141fd=platform===_0x40674f['ABmfv']?_0x40674f[_0x4a727c(0x15f)](getOpencodeSkillsDir,level):_0x40674f[_0x4a727c(0x150)](getSkillsDir,level),_0x240130=join(_0x3141fd,_0x53675f);await mkdir(_0x240130,{'recursive':!![]});let _0x5e1cb7,_0x24cae6=[];if(_0x1b2bc8){const _0x5f12ba=await _0x40674f['QsFKM'](readdir,_0x30ea5a),_0xf7d58c=_0x5f12ba['filter'](_0x5ee1f2=>_0x5ee1f2['endsWith'](_0x4a727c(0x163)));for(const _0x2cadf7 of _0xf7d58c){const _0x2f84e0=_0x40674f[_0x4a727c(0x15b)](join,_0x30ea5a,_0x2cadf7),_0x1618a7=join(_0x240130,_0x2cadf7);await copyFile(_0x2f84e0,_0x1618a7),_0x24cae6['push'](_0x2cadf7);}_0x5e1cb7=await readFile(join(_0x30ea5a,'SKILL.md'),'utf-8');}else{_0x5e1cb7=await _0x40674f[_0x4a727c(0x16b)](readFile,_0x191bb6,_0x4a727c(0x14c));const _0x152686=join(_0x240130,_0x40674f['nkaiL']);await writeFile(_0x152686,_0x5e1cb7,_0x40674f[_0x4a727c(0x16f)]),_0x24cae6['push'](_0x40674f[_0x4a727c(0x158)]);}const {name:_0x54bf91}=_0x40674f[_0x4a727c(0x165)](parseFrontmatter,_0x5e1cb7);return console[_0x4a727c(0x154)]('\x20\x20Installed\x20skill:\x20'+_0x54bf91),console[_0x4a727c(0x154)]('\x20\x20Location:\x20'+_0x240130),_0x40674f['mnvmm'](_0x24cae6[_0x4a727c(0x151)],0x1)&&console[_0x4a727c(0x154)]('\x20\x20Files:\x20'+_0x24cae6['join'](',\x20')),_0x40674f[_0x4a727c(0x14e)](logLocalAgentInstallation,_0x53675f,{'skillDisplayName':_0x54bf91,'installLevel':level},_0x5a140d)[_0x4a727c(0x167)](()=>{}),!![];}function getSourceSkillsDir(){const _0x59639d=_0x5104e7,_0xc32eba={'NTURM':_0x59639d(0x153),'xMisP':function(_0x5bc9d4,_0x5559ec,_0x5f361f,_0x26d6a6,_0x268d9a,_0x4e3458){return _0x5bc9d4(_0x5559ec,_0x5f361f,_0x26d6a6,_0x268d9a,_0x4e3458);},'pRdZO':function(_0x28f5f1,_0x38145e){return _0x28f5f1(_0x38145e);}},_0x2422d9=[join(__dirname,'..','..',_0xc32eba[_0x59639d(0x169)]),_0xc32eba['xMisP'](join,__dirname,'..','..','..','skills')];for(const _0xf9f0b6 of _0x2422d9){if(_0xc32eba[_0x59639d(0x160)](existsSync,_0xf9f0b6))return _0xf9f0b6;}return _0x2422d9[0x0];}function parseFrontmatter(_0x529155){const _0x5bb2ad=_0x5104e7,_0x53503a={'UGsIm':_0x5bb2ad(0x149)},_0x57a0c9=_0x529155[_0x5bb2ad(0x164)](/^---\n([\s\S]+?)\n---/);if(!_0x57a0c9)throw new Error(_0x53503a[_0x5bb2ad(0x155)]);const _0x544375=_0x57a0c9[0x1],_0x491516=_0x544375['match'](/name:\s*(.+)/),_0x3878d3=_0x544375[_0x5bb2ad(0x164)](/description:\s*"?(.+?)"?\n/);return{'name':_0x491516?.[0x1][_0x5bb2ad(0x16a)]()||'','description':_0x3878d3?.[0x1]['trim']()||''};}function _0x3b3a(){const _0x2ead12=['aLAFS','teDfm','bug-bash','2PIHgmY','OWgMs','pRdZO','feature-tracker','\x20\x20Skill\x20not\x20found:\x20','.md','match','FPjRZ','326135uPwBdV','catch','isDirectory','NTURM','trim','tofiI','593544Mcjhqy','1677888oqjGJB','117411pWaBaY','JBFkf','Invalid\x20skill\x20frontmatter','moWbT','claude','utf-8','project','XhpUu','\x20\x20Removed\x20deprecated\x20skill:\x20','GpMJO','length','4565142UprlYj','skills','log','UGsIm','178672nLnBUD','290047bRFSle','nkaiL','warn','6rXwvsZ'];_0x3b3a=function(){return _0x2ead12;};return _0x3b3a();}export async function removeSkill(_0x596adc,_0x341f4f){const _0x199735=_0x5104e7,_0x3664e4={'moWbT':function(_0x38db0f,_0x513b7d,_0x513f15){return _0x38db0f(_0x513b7d,_0x513f15);}},_0x3251c9=getSkillsDir(_0x341f4f),_0x2eea3f=_0x3664e4[_0x199735(0x14a)](join,_0x3251c9,_0x596adc);if(!existsSync(_0x2eea3f))return![];try{return await rm(_0x2eea3f,{'recursive':!![]}),console[_0x199735(0x154)](_0x199735(0x14f)+_0x596adc),!![];}catch{return console['warn']('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x596adc),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x55242f=_0x5c71;(function(_0x49a793,_0x4ca0bd){const _0x154ba9=_0x5c71,_0x5a299a=_0x49a793();while(!![]){try{const _0x201b20=parseInt(_0x154ba9(0xcf))/0x1+parseInt(_0x154ba9(0xe0))/0x2+-parseInt(_0x154ba9(0xf0))/0x3*(-parseInt(_0x154ba9(0xdc))/0x4)+-parseInt(_0x154ba9(0xf3))/0x5*(-parseInt(_0x154ba9(0xf1))/0x6)+-parseInt(_0x154ba9(0xe2))/0x7+parseInt(_0x154ba9(0xda))/0x8*(-parseInt(_0x154ba9(0xbb))/0x9)+parseInt(_0x154ba9(0xf6))/0xa*(-parseInt(_0x154ba9(0xc2))/0xb);if(_0x201b20===_0x4ca0bd)break;else _0x5a299a['push'](_0x5a299a['shift']());}catch(_0x3be1c5){_0x5a299a['push'](_0x5a299a['shift']());}}}(_0x39c8,0x50346));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(_0x2f325f,_0x5aba8d){const _0x157037=_0x5c71,_0x414919={'SFiIF':function(_0x22e83a,_0x1911c8){return _0x22e83a>=_0x1911c8;},'XiohZ':function(_0x1e2c17,_0x2d0f64){return _0x1e2c17<=_0x2d0f64;},'jDeyD':function(_0x99f23a,_0x812023){return _0x99f23a>_0x812023;},'fbuba':function(_0x1a5f09,_0x2d2539){return _0x1a5f09&_0x2d2539;},'yjmmV':function(_0x3ca8c6,_0x7c61b1){return _0x3ca8c6-_0x7c61b1;},'HLzJi':function(_0x49c6f0,_0x16a057){return _0x49c6f0+_0x16a057;}};if(_0x414919[_0x157037(0xe9)](_0x5aba8d,_0x2f325f[_0x157037(0xf7)]))return[0x0,0x0];const _0x34b14f=_0x2f325f[_0x5aba8d];let _0x54642f=0x1,_0x27ed1a=0x80;while(_0x414919['XiohZ'](_0x54642f,0x8)&&!(_0x34b14f&_0x27ed1a)){_0x54642f++,_0x27ed1a>>=0x1;}if(_0x414919[_0x157037(0xee)](_0x5aba8d+_0x54642f,_0x2f325f['length']))return[0x0,0x0];let _0x18618c=_0x414919[_0x157037(0xbd)](_0x34b14f,_0x414919['yjmmV'](_0x27ed1a,0x1));for(let _0x461f4c=0x1;_0x461f4c<_0x54642f;_0x461f4c++){_0x18618c=_0x414919['HLzJi'](_0x18618c*0x100,_0x2f325f[_0x5aba8d+_0x461f4c]);}return[_0x18618c,_0x54642f];}function readId(_0x1ea7ed,_0x57ec3b){const _0x4dde15=_0x5c71,_0x2f6086={'ZzeXs':function(_0x31fde6,_0x1b9ccd){return _0x31fde6>=_0x1b9ccd;},'jLvyr':function(_0x49446f,_0x359ac6){return _0x49446f>=_0x359ac6;},'HCBmY':function(_0x43bdde,_0x21a20e){return _0x43bdde>_0x21a20e;},'wqzDq':function(_0x1cea24,_0x2730c9){return _0x1cea24+_0x2730c9;},'XaYWH':function(_0x3efb13,_0x46c707){return _0x3efb13<_0x46c707;},'LNmUt':function(_0x42e294,_0xccbfcd){return _0x42e294+_0xccbfcd;}};if(_0x2f6086[_0x4dde15(0xf2)](_0x57ec3b,_0x1ea7ed['length']))return[0x0,0x0];const _0x51c4ef=_0x1ea7ed[_0x57ec3b];let _0x88b7f1;if(_0x51c4ef>=0x80)_0x88b7f1=0x1;else{if(_0x2f6086[_0x4dde15(0xf2)](_0x51c4ef,0x40))_0x88b7f1=0x2;else{if(_0x2f6086[_0x4dde15(0xdf)](_0x51c4ef,0x20))_0x88b7f1=0x3;else{if(_0x51c4ef>=0x10)_0x88b7f1=0x4;else return[_0x51c4ef,0x1];}}}if(_0x2f6086['HCBmY'](_0x2f6086['wqzDq'](_0x57ec3b,_0x88b7f1),_0x1ea7ed['length']))return[0x0,0x0];let _0x1f7d40=0x0;for(let _0x47d33e=0x0;_0x2f6086['XaYWH'](_0x47d33e,_0x88b7f1);_0x47d33e++){_0x1f7d40=_0x2f6086['LNmUt'](_0x1f7d40*0x100,_0x1ea7ed[_0x57ec3b+_0x47d33e]);}return[_0x1f7d40,_0x88b7f1];}function readUint(_0x2546f7,_0x312385,_0x3adae4){const _0x21d852=_0x5c71,_0x4a2f83={'rWJOZ':function(_0x3e9a44,_0x16c2d8){return _0x3e9a44+_0x16c2d8;}};let _0xca03bf=0x0;for(let _0x576b7a=0x0;_0x576b7a<_0x3adae4;_0x576b7a++){_0xca03bf=_0xca03bf*0x100+_0x2546f7[_0x4a2f83[_0x21d852(0xbe)](_0x312385,_0x576b7a)];}return _0xca03bf;}function isUnknownSize(_0x2d71f1,_0x5cf8f7){const _0x309d27=_0x5c71,_0x32f771={'OJVig':function(_0xfdbfd1,_0x301cf9){return _0xfdbfd1===_0x301cf9;},'aPesA':function(_0x4f2886,_0x53964f){return _0x4f2886*_0x53964f;}};return _0x32f771[_0x309d27(0xf5)](_0x2d71f1,Math['pow'](0x2,_0x32f771[_0x309d27(0xba)](0x7,_0x5cf8f7))-0x1);}function writeVint(_0x331f72,_0x275755){const _0x46fd4d=_0x5c71,_0x23ad2f={'XDGKQ':function(_0x4f69e3,_0x4c65a2){return _0x4f69e3-_0x4c65a2;},'tPMgV':function(_0x5b8085,_0x4157ee){return _0x5b8085>=_0x4157ee;},'OfGjU':function(_0x433e68,_0x139e94){return _0x433e68/_0x139e94;}};let _0x35b948=_0x275755||0x1;while(_0x23ad2f['XDGKQ'](Math[_0x46fd4d(0xb8)](0x2,0x7*_0x35b948),0x2)<_0x331f72)_0x35b948++;const _0xa5b9ab=Buffer['alloc'](_0x35b948);for(let _0x3044a1=_0x35b948-0x1;_0x23ad2f['tPMgV'](_0x3044a1,0x0);_0x3044a1--){_0xa5b9ab[_0x3044a1]=_0x331f72&0xff,_0x331f72=Math['floor'](_0x23ad2f['OfGjU'](_0x331f72,0x100));}return _0xa5b9ab[0x0]|=0x1<<_0x23ad2f[_0x46fd4d(0xbc)](0x8,_0x35b948),_0xa5b9ab;}function writeUint(_0x5c5e11,_0x4f725b){const _0x2a17f6=_0x5c71,_0x2231ac={'EEJWF':function(_0x556e35,_0x3ee238){return _0x556e35-_0x3ee238;},'oUYsK':function(_0x1f9276,_0x513009){return _0x1f9276>=_0x513009;},'IqRRJ':function(_0xc148fc,_0x50f902){return _0xc148fc&_0x50f902;},'fayGu':function(_0x576d1d,_0x3d5db1){return _0x576d1d/_0x3d5db1;}},_0x3e8334=Buffer[_0x2a17f6(0xd7)](_0x4f725b);for(let _0x41a4a7=_0x2231ac[_0x2a17f6(0xc4)](_0x4f725b,0x1);_0x2231ac[_0x2a17f6(0xe7)](_0x41a4a7,0x0);_0x41a4a7--){_0x3e8334[_0x41a4a7]=_0x2231ac[_0x2a17f6(0xce)](_0x5c5e11,0xff),_0x5c5e11=Math['floor'](_0x2231ac['fayGu'](_0x5c5e11,0x100));}return _0x3e8334;}function writeUnknownSizeVint(_0x79c1eb){const _0x1d1126=_0x5c71,_0xa023c6={'VfecH':function(_0x100140,_0x4d5d1b){return _0x100140-_0x4d5d1b;}},_0x1774cb=Buffer[_0x1d1126(0xd7)](_0x79c1eb,0xff);return _0x1774cb[0x0]=0xff>>_0xa023c6['VfecH'](_0x79c1eb,0x1),_0x1774cb;}function uintSize(_0xeabcd3){const _0x95ef8a=_0x5c71,_0x49a841={'SiTEV':function(_0x57059f,_0x20e2b9){return _0x57059f>_0x20e2b9;}};if(_0xeabcd3===0x0)return 0x1;let _0x1da33b=0x0,_0x56d87b=_0xeabcd3;while(_0x49a841[_0x95ef8a(0xec)](_0x56d87b,0x0)){_0x1da33b++,_0x56d87b=Math['floor'](_0x56d87b/0x100);}return _0x1da33b;}function findTimestampScale(_0x1af396,_0x2e76ac){const _0x3e4e6f=_0x5c71,_0xb8ac35={'uqFnn':function(_0x18acdf,_0x54a5b5){return _0x18acdf+_0x54a5b5;},'ulztw':function(_0x375817,_0x374127){return _0x375817===_0x374127;},'exLnf':function(_0x1a1b42,_0x9a4475){return _0x1a1b42+_0x9a4475;},'CDpBb':function(_0x148ce5,_0x134551){return _0x148ce5+_0x134551;},'vpzZk':function(_0x570198,_0x5eea9d){return _0x570198===_0x5eea9d;},'qHaSm':function(_0x2708d4,_0x4425a9,_0x2e5579,_0x2e520a){return _0x2708d4(_0x4425a9,_0x2e5579,_0x2e520a);},'Pejxc':function(_0x29561f,_0x2f5356){return _0x29561f+_0x2f5356;},'WyqDj':function(_0x42eec9,_0x214c15){return _0x42eec9===_0x214c15;},'myDiC':function(_0x211368,_0x3db9c6){return _0x211368+_0x3db9c6;}};let _0x3dfdec=_0x2e76ac;const _0x1d071b=Math[_0x3e4e6f(0xb9)](_0x1af396['length'],_0xb8ac35['uqFnn'](_0x2e76ac,0x2710));while(_0x3dfdec<_0x1d071b){const [_0xc775b0,_0x126181]=readId(_0x1af396,_0x3dfdec),[_0xbc01dd,_0xd970b4]=readVint(_0x1af396,_0xb8ac35[_0x3e4e6f(0xc9)](_0x3dfdec,_0x126181));if(_0xb8ac35['ulztw'](_0xc775b0,ID_INFO)){let _0x5d01c6=_0xb8ac35[_0x3e4e6f(0xc9)](_0x3dfdec+_0x126181,_0xd970b4);const _0x4d064b=_0xb8ac35[_0x3e4e6f(0xfa)](_0x5d01c6,_0xbc01dd);while(_0x5d01c6<_0x4d064b){const [_0x27c509,_0x21d556]=readId(_0x1af396,_0x5d01c6),[_0x44c5a6,_0x5d35ee]=readVint(_0x1af396,_0xb8ac35[_0x3e4e6f(0xd1)](_0x5d01c6,_0x21d556));if(_0xb8ac35['vpzZk'](_0x27c509,ID_TIMESTAMP_SCALE))return _0xb8ac35['qHaSm'](readUint,_0x1af396,_0xb8ac35[_0x3e4e6f(0xfa)](_0x5d01c6,_0x21d556)+_0x5d35ee,_0x44c5a6);_0x5d01c6+=_0xb8ac35['Pejxc'](_0xb8ac35['CDpBb'](_0x21d556,_0x5d35ee),_0x44c5a6);}break;}if(_0xb8ac35[_0x3e4e6f(0xf8)](_0xc775b0,ID_CLUSTER))break;if(isUnknownSize(_0xbc01dd,_0xd970b4))break;_0x3dfdec+=_0xb8ac35['myDiC'](_0x126181+_0xd970b4,_0xbc01dd);}return 0xf4240;}function findFirstClusterOffset(_0x1b0572,_0x28a3eb){const _0x2dad19=_0x5c71,_0x342e2={'lqIgU':function(_0x3af687,_0x52fbbc,_0x1e7102){return _0x3af687(_0x52fbbc,_0x1e7102);},'MCjTZ':function(_0x4d46c3,_0x34d999,_0x436270){return _0x4d46c3(_0x34d999,_0x436270);},'wpAmW':function(_0xe209b2,_0xbbf5d8){return _0xe209b2+_0xbbf5d8;}};let _0x15ff39=_0x28a3eb;while(_0x15ff39<_0x1b0572[_0x2dad19(0xf7)]){const [_0x1f1959,_0x2d8d40]=_0x342e2['lqIgU'](readId,_0x1b0572,_0x15ff39);if(_0x1f1959===ID_CLUSTER)return _0x15ff39;const [_0x3c9630,_0x11967a]=_0x342e2['MCjTZ'](readVint,_0x1b0572,_0x342e2['wpAmW'](_0x15ff39,_0x2d8d40));if(isUnknownSize(_0x3c9630,_0x11967a))return _0x15ff39;_0x15ff39+=_0x2d8d40+_0x11967a+_0x3c9630;}return _0x1b0572[_0x2dad19(0xf7)];}function findClusterEnd(_0x3d3dd2,_0x259cd7,_0x2be4e8,_0x5587af){const _0x5a4b43=_0x5c71,_0x50ae12={'PxGSv':function(_0x442d9c,_0x4e57e7,_0x21857c){return _0x442d9c(_0x4e57e7,_0x21857c);},'SWPGX':function(_0x31b752,_0x104c6b){return _0x31b752+_0x104c6b;},'LawJQ':function(_0x3c86dc,_0x59918f){return _0x3c86dc<_0x59918f;},'UhAqR':function(_0x42d4ce,_0x9efb6a,_0xff9e6d){return _0x42d4ce(_0x9efb6a,_0xff9e6d);}};if(!_0x50ae12[_0x5a4b43(0xca)](isUnknownSize,_0x2be4e8,_0x5587af))return _0x50ae12[_0x5a4b43(0xdb)](_0x259cd7,_0x2be4e8);const _0xa13857=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x1c5636=_0x259cd7;while(_0x50ae12[_0x5a4b43(0xf4)](_0x1c5636,_0x3d3dd2[_0x5a4b43(0xf7)]-0x4)){const [_0x49c8f3,_0x7ebe51]=readId(_0x3d3dd2,_0x1c5636);if(_0xa13857[_0x5a4b43(0xdd)](_0x49c8f3))return _0x1c5636;const [_0x159ee0,_0x1242a6]=readVint(_0x3d3dd2,_0x1c5636+_0x7ebe51);if(_0x50ae12['UhAqR'](isUnknownSize,_0x159ee0,_0x1242a6))return _0x3d3dd2['length'];_0x1c5636+=_0x50ae12['SWPGX'](_0x50ae12['SWPGX'](_0x7ebe51,_0x1242a6),_0x159ee0);}return _0x3d3dd2['length'];}function extractClusters(_0xc91e35,_0x42cc13){const _0x5b3080=_0x5c71,_0x481d4a={'JzUUu':function(_0x5857e3,_0x3d3220){return _0x5857e3===_0x3d3220;},'oJmpi':function(_0x3d37e2,_0x16f852){return _0x3d37e2+_0x16f852;},'bgHwV':function(_0x4d9c89,_0x78c44c){return _0x4d9c89<_0x78c44c;},'FKned':function(_0x59cde2,_0x1ca3d2,_0x1c0fbc){return _0x59cde2(_0x1ca3d2,_0x1c0fbc);},'vcaGD':function(_0x1df0f8,_0xe6ce49){return _0x1df0f8+_0xe6ce49;},'EADvI':function(_0x4a5874,_0x3e29a9){return _0x4a5874+_0x3e29a9;},'CGFUP':function(_0x13a563,_0x22a848,_0x584f70){return _0x13a563(_0x22a848,_0x584f70);},'DeYlZ':function(_0x382b60,_0x5c1821){return _0x382b60+_0x5c1821;},'kcVCG':function(_0x3fbaf4,_0x1a6813){return _0x3fbaf4+_0x1a6813;},'cmAJN':function(_0x2e7a45,_0x112b97){return _0x2e7a45>_0x112b97;},'bKyit':function(_0x2176f6,_0x49f09a,_0x1d1510){return _0x2176f6(_0x49f09a,_0x1d1510);}},_0x3b1363=[],_0x41dd82=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x284ab2=0x0;while(_0x284ab2<_0xc91e35[_0x5b3080(0xf7)]){const _0x50ca69=_0xc91e35[_0x5b3080(0xc0)](_0x41dd82,_0x284ab2);if(_0x481d4a['JzUUu'](_0x50ca69,-0x1))break;const [_0x619a19,_0x377c54]=readId(_0xc91e35,_0x50ca69);if(_0x619a19!==ID_CLUSTER){_0x284ab2=_0x50ca69+0x1;continue;}const [_0xe2eeb9,_0xf2f0b5]=readVint(_0xc91e35,_0x50ca69+_0x377c54),_0x8c682d=_0x481d4a['oJmpi'](_0x50ca69,_0x377c54)+_0xf2f0b5,_0xce0112=findClusterEnd(_0xc91e35,_0x8c682d,_0xe2eeb9,_0xf2f0b5);let _0x5d034d=_0x8c682d,_0x534ae4=0x0,_0x2c7388=0x2,_0x50aa63=![],_0x57c425=Buffer['alloc'](0x0),_0x20ba4d=Buffer['alloc'](0x0);while(_0x481d4a[_0x5b3080(0xc8)](_0x5d034d,_0xce0112)){const [_0x141fca,_0x2e908c]=readId(_0xc91e35,_0x5d034d),[_0xea751d,_0x4ede2d]=_0x481d4a[_0x5b3080(0xbf)](readVint,_0xc91e35,_0x5d034d+_0x2e908c);if(_0x141fca===ID_TIMESTAMP){_0x534ae4=readUint(_0xc91e35,_0x5d034d+_0x2e908c+_0x4ede2d,_0xea751d),_0x2c7388=_0xea751d,_0x50aa63=!![],_0x57c425=_0xc91e35['slice'](_0x8c682d,_0x5d034d);const _0x228e04=_0x481d4a['oJmpi'](_0x481d4a[_0x5b3080(0xde)](_0x481d4a['EADvI'](_0x5d034d,_0x2e908c),_0x4ede2d),_0xea751d);_0x20ba4d=_0xc91e35[_0x5b3080(0xcb)](_0x228e04,_0xce0112);break;}if(_0x141fca===ID_CLUSTER)break;if(_0x481d4a[_0x5b3080(0xd6)](isUnknownSize,_0xea751d,_0x4ede2d))break;_0x5d034d+=_0x481d4a[_0x5b3080(0xd2)](_0x2e908c+_0x4ede2d,_0xea751d);}!_0x50aa63&&(_0x20ba4d=_0xc91e35[_0x5b3080(0xcb)](_0x8c682d,_0xce0112));let _0x5ab9f6=_0x534ae4;_0x5d034d=_0x8c682d;while(_0x481d4a[_0x5b3080(0xc8)](_0x5d034d,_0xce0112)){const [_0x468213,_0x21f615]=_0x481d4a[_0x5b3080(0xbf)](readId,_0xc91e35,_0x5d034d),[_0x1b32c9,_0x28e1d8]=_0x481d4a[_0x5b3080(0xd6)](readVint,_0xc91e35,_0x481d4a['oJmpi'](_0x5d034d,_0x21f615));if(_0x481d4a['JzUUu'](_0x468213,ID_SIMPLE_BLOCK)&&_0x1b32c9>=0x4){const _0x3b4b58=_0x481d4a['oJmpi'](_0x481d4a['kcVCG'](_0x5d034d,_0x21f615),_0x28e1d8),[,_0x59402d]=readVint(_0xc91e35,_0x3b4b58),_0x18cfc2=_0xc91e35['readInt16BE'](_0x481d4a[_0x5b3080(0xde)](_0x3b4b58,_0x59402d)),_0x2945fa=_0x481d4a[_0x5b3080(0xfb)](_0x534ae4,_0x18cfc2);if(_0x481d4a['cmAJN'](_0x2945fa,_0x5ab9f6))_0x5ab9f6=_0x2945fa;}if(_0x468213===ID_CLUSTER)break;if(_0x481d4a['bKyit'](isUnknownSize,_0x1b32c9,_0x28e1d8))break;_0x5d034d+=_0x21f615+_0x28e1d8+_0x1b32c9;}_0x3b1363['push']({'timestamp':_0x534ae4,'maxTicks':_0x5ab9f6,'bodyBeforeTimestamp':_0x57c425,'bodyAfterTimestamp':_0x20ba4d,'timestampElementSize':_0x2c7388}),_0x284ab2=_0xce0112;}return _0x3b1363;}function _0x5c71(_0x430338,_0xd7bd5c){_0x430338=_0x430338-0xb8;const _0x39c851=_0x39c8();let _0x5c711d=_0x39c851[_0x430338];return _0x5c711d;}function parseWebm(_0x591051){const _0x24abbb=_0x5c71,_0x277eea={'lomOY':function(_0x43a881,_0x460881,_0x383c3a){return _0x43a881(_0x460881,_0x383c3a);},'FxRTr':function(_0x3c021f,_0x377402){return _0x3c021f+_0x377402;},'lNyOu':function(_0x9874be,_0x14969d,_0x342fa1){return _0x9874be(_0x14969d,_0x342fa1);},'dosHg':function(_0x1a466f,_0x4ccca9){return _0x1a466f+_0x4ccca9;},'FuKcF':function(_0x4f9d91,_0x51d2d9){return _0x4f9d91>_0x51d2d9;}};let _0x49aeaf=0x0;const [,_0x4f5e62]=readId(_0x591051,_0x49aeaf),[_0x5bc68a,_0x32d6c0]=_0x277eea[_0x24abbb(0xd0)](readVint,_0x591051,_0x277eea[_0x24abbb(0xd8)](_0x49aeaf,_0x4f5e62));_0x49aeaf+=_0x4f5e62+_0x32d6c0+_0x5bc68a;const [_0x4824eb,_0x587d4b]=readId(_0x591051,_0x49aeaf);if(_0x4824eb!==ID_SEGMENT)return null;const [,_0x5cbd5f]=_0x277eea['lNyOu'](readVint,_0x591051,_0x277eea[_0x24abbb(0xd8)](_0x49aeaf,_0x587d4b)),_0xa5f3a9=_0x277eea[_0x24abbb(0xea)](_0x49aeaf,_0x587d4b)+_0x5cbd5f,_0x451461=findTimestampScale(_0x591051,_0xa5f3a9),_0x388c5d=findFirstClusterOffset(_0x591051,_0xa5f3a9),_0x5a0cec=_0x591051['slice'](0x0,_0x388c5d),_0x4f13c8=_0x277eea['lomOY'](extractClusters,_0x591051,_0x451461);let _0x4129cf=0x0;for(const _0x12c74e of _0x4f13c8){if(_0x277eea[_0x24abbb(0xeb)](_0x12c74e['maxTicks'],_0x4129cf))_0x4129cf=_0x12c74e['maxTicks'];}return{'header':_0x5a0cec,'clusters':_0x4f13c8,'timestampScale':_0x451461,'maxTimestampTicks':_0x4129cf};}function buildCluster(_0x35101c,_0x17faf7,_0x402707){const _0x1b633d=_0x5c71,_0x1dac86=Buffer[_0x1b633d(0xc6)]([0x1f,0x43,0xb6,0x75]),_0x5a522a=Math[_0x1b633d(0xc3)](0x4,uintSize(_0x35101c)),_0x3236e8=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x5a522a),writeUint(_0x35101c,_0x5a522a)]),_0x1027fd=Buffer[_0x1b633d(0xe1)]([_0x17faf7,_0x3236e8,_0x402707]),_0x2a63cc=writeVint(_0x1027fd['length']);return Buffer['concat']([_0x1dac86,_0x2a63cc,_0x1027fd]);}function _0x39c8(){const _0x2d2930=['has','vcaGD','jLvyr','567858WRAXLe','concat','3341170uhXJky','ByJPG','error','XrYlB','wApFu','oUYsK','KeGgU','SFiIF','dosHg','FuKcF','SiTEV','HDQBJ','jDeyD','push','1509NjtZqP','67398nIpKkA','ZzeXs','195fCHWDm','LawJQ','OJVig','2070hhxGUG','length','WyqDj','argv','exLnf','oJmpi','pow','min','aPesA','9woAech','XDGKQ','fbuba','rWJOZ','FKned','indexOf','stitchWebmFiles.ts','16368pepwvB','max','EEJWF','exit','from','WAjdf','bgHwV','uqFnn','PxGSv','slice','wRQly','log','IqRRJ','432744lgugmz','lomOY','CDpBb','DeYlZ','header','XZUQj','Xyfxu','CGFUP','alloc','FxRTr','Stitched\x20','3083768wXqUEf','SWPGX','2740kjHLMG'];_0x39c8=function(){return _0x2d2930;};return _0x39c8();}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x53528f){const _0x4dbf0b=_0x5c71,_0x23867c={'qOBuf':function(_0x35d419,_0x47c8a8,_0x53bcfc){return _0x35d419(_0x47c8a8,_0x53bcfc);},'WAjdf':function(_0x25ac09,_0x29b925){return _0x25ac09+_0x29b925;},'wApFu':function(_0x2a2c57,_0x294a04){return _0x2a2c57+_0x294a04;},'KAtDg':function(_0x3d9bef,_0x3e4f10,_0x4d170f){return _0x3d9bef(_0x3e4f10,_0x4d170f);},'Xyfxu':function(_0x20f3a4,_0x58500c){return _0x20f3a4+_0x58500c;},'HDQBJ':function(_0x444af3,_0x243141){return _0x444af3(_0x243141);},'wRQly':function(_0x2d939b,_0x28d216){return _0x2d939b===_0x28d216;},'ByJPG':function(_0x57a28a,_0x1ffcd0){return _0x57a28a<_0x1ffcd0;},'XZUQj':function(_0x3a0624,_0x2a8668,_0xf459e1){return _0x3a0624(_0x2a8668,_0xf459e1);},'QlDGj':function(_0x349b27,_0x302045){return _0x349b27!==_0x302045;},'odiKc':function(_0x20758c,_0x35d820){return _0x20758c+_0x35d820;},'ykltx':function(_0x1c1686,_0x35e770,_0x2fc672){return _0x1c1686(_0x35e770,_0x2fc672);}},_0x37dea0=Buffer['from'](_0x53528f);let _0x4c4e98=0x0;const [,_0xf08b25]=_0x23867c['qOBuf'](readId,_0x37dea0,_0x4c4e98),[_0x5600e4,_0x48a1a3]=readVint(_0x37dea0,_0x23867c['WAjdf'](_0x4c4e98,_0xf08b25)),_0x140f68=_0x23867c['wApFu'](_0x4c4e98+_0xf08b25+_0x48a1a3,_0x5600e4),[,_0x37b839]=_0x23867c['qOBuf'](readId,_0x37dea0,_0x140f68),[,_0x33030d]=_0x23867c['KAtDg'](readVint,_0x37dea0,_0x23867c[_0x4dbf0b(0xe6)](_0x140f68,_0x37b839)),_0x10f2c8=_0x23867c[_0x4dbf0b(0xd5)](_0x140f68+_0x37b839,_0x33030d),_0x51948c=_0x23867c[_0x4dbf0b(0xed)](writeUnknownSizeVint,_0x33030d);_0x51948c['copy'](_0x37dea0,_0x140f68+_0x37b839);let _0x301a81=_0x10f2c8;const _0x22c118=Math[_0x4dbf0b(0xb9)](_0x37dea0[_0x4dbf0b(0xf7)],_0x10f2c8+0x2710);while(_0x301a81<_0x22c118){const [_0x186131,_0x6280c0]=_0x23867c['KAtDg'](readId,_0x37dea0,_0x301a81),[_0x11c533,_0x9ba42f]=readVint(_0x37dea0,_0x301a81+_0x6280c0);if(_0x23867c[_0x4dbf0b(0xcc)](_0x186131,ID_CLUSTER))break;if(isUnknownSize(_0x11c533,_0x9ba42f))break;if(_0x186131===ID_INFO){const _0x5ae850=_0x301a81+_0x6280c0+_0x9ba42f,_0x5c51a4=_0x23867c[_0x4dbf0b(0xc7)](_0x5ae850,_0x11c533),_0x81a0d7=[];let _0x4b3e08=_0x5ae850;while(_0x23867c[_0x4dbf0b(0xe3)](_0x4b3e08,_0x5c51a4)){const [_0x1f6488,_0x14fcc6]=readId(_0x37dea0,_0x4b3e08),[_0x312eeb,_0x4e2ea3]=_0x23867c[_0x4dbf0b(0xd4)](readVint,_0x37dea0,_0x23867c[_0x4dbf0b(0xd5)](_0x4b3e08,_0x14fcc6)),_0x42bd19=_0x23867c['wApFu'](_0x14fcc6,_0x4e2ea3)+_0x312eeb;_0x23867c['QlDGj'](_0x1f6488,ID_DURATION)&&_0x81a0d7['push'](_0x37dea0[_0x4dbf0b(0xcb)](_0x4b3e08,_0x4b3e08+_0x42bd19)),_0x4b3e08+=_0x42bd19;}const _0x5246b2=Buffer['concat'](_0x81a0d7),_0x6e5660=Buffer['concat']([_0x37dea0['slice'](_0x301a81,_0x23867c['odiKc'](_0x301a81,_0x6280c0)),_0x23867c['ykltx'](writeVint,_0x5246b2[_0x4dbf0b(0xf7)],_0x9ba42f)]);return Buffer[_0x4dbf0b(0xe1)]([_0x37dea0['slice'](0x0,_0x301a81),_0x6e5660,_0x5246b2,_0x37dea0['slice'](_0x5c51a4)]);}_0x301a81+=_0x23867c[_0x4dbf0b(0xd5)](_0x6280c0,_0x9ba42f)+_0x11c533;}return _0x37dea0;}export function stitchWebmFiles(_0x2a0dfc,_0x29c018){const _0x293ee2=_0x5c71,_0x26418a={'KeGgU':function(_0x4102c6,_0x4b7aa4){return _0x4102c6(_0x4b7aa4);},'XrYlB':function(_0x4aa1fa,_0x5c9439){return _0x4aa1fa(_0x5c9439);},'SzuGd':function(_0x497013,_0x445487){return _0x497013+_0x445487;},'xkEhp':function(_0x452d10,_0x493a85,_0xd44f51,_0x2e1dee){return _0x452d10(_0x493a85,_0xd44f51,_0x2e1dee);}};if(_0x2a0dfc['length']<=0x1)return![];const _0x2b4e74=[];for(const _0x372063 of _0x2a0dfc){const _0x4a1fb1=readFileSync(_0x372063),_0x59a739=_0x26418a[_0x293ee2(0xe8)](parseWebm,_0x4a1fb1);if(!_0x59a739||_0x59a739['clusters']['length']===0x0)return![];_0x2b4e74[_0x293ee2(0xef)](_0x59a739);}const _0x14184e=_0x2b4e74[0x0],_0xaa13e9=_0x26418a[_0x293ee2(0xe5)](rebuildHeaderWithoutDuration,_0x14184e[_0x293ee2(0xd3)]),_0x7d6c60=[_0xaa13e9];let _0x21db15=0x0;for(let _0x357cf4=0x0;_0x357cf4<_0x2b4e74[_0x293ee2(0xf7)];_0x357cf4++){const _0x2d623e=_0x2b4e74[_0x357cf4];for(const _0x2b7a7f of _0x2d623e['clusters']){const _0x93488=_0x26418a['SzuGd'](_0x2b7a7f['timestamp'],_0x21db15);_0x7d6c60[_0x293ee2(0xef)](_0x26418a['xkEhp'](buildCluster,_0x93488,_0x2b7a7f['bodyBeforeTimestamp'],_0x2b7a7f['bodyAfterTimestamp']));}const _0x28cd8e=0x1e;_0x21db15+=_0x2d623e['maxTimestampTicks']+_0x28cd8e;}return writeFileSync(_0x29c018,Buffer[_0x293ee2(0xe1)](_0x7d6c60)),!![];}if(process[_0x55242f(0xf9)][0x1]?.['endsWith'](_0x55242f(0xc1))||process[_0x55242f(0xf9)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process[_0x55242f(0xf9)]['slice'](0x2);args['length']<0x3&&(console[_0x55242f(0xe4)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x55242f(0xc5)](0x1));const output=args[args[_0x55242f(0xf7)]-0x1],inputs=args[_0x55242f(0xcb)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x55242f(0xcd)](_0x55242f(0xd9)+inputs['length']+'\x20files\x20->\x20'+output):console[_0x55242f(0xcd)]('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x1f87f1=_0x837e;(function(_0x461197,_0x5efd85){const _0x29a3ae=_0x837e,_0x1ce926=_0x461197();while(!![]){try{const _0x147851=-parseInt(_0x29a3ae(0x16c))/0x1*(parseInt(_0x29a3ae(0x177))/0x2)+parseInt(_0x29a3ae(0x15d))/0x3+parseInt(_0x29a3ae(0x148))/0x4+parseInt(_0x29a3ae(0x15e))/0x5*(-parseInt(_0x29a3ae(0x147))/0x6)+-parseInt(_0x29a3ae(0x155))/0x7*(parseInt(_0x29a3ae(0x163))/0x8)+parseInt(_0x29a3ae(0x17a))/0x9+parseInt(_0x29a3ae(0x16f))/0xa;if(_0x147851===_0x5efd85)break;else _0x1ce926['push'](_0x1ce926['shift']());}catch(_0x213629){_0x1ce926['push'](_0x1ce926['shift']());}}}(_0x3834,0xddd67));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 _0x837e(_0x5dc7bd,_0x19146d){_0x5dc7bd=_0x5dc7bd-0x13e;const _0x3834d5=_0x3834();let _0x837eec=_0x3834d5[_0x5dc7bd];return _0x837eec;}function readVint(_0x4d786d,_0x1a440f){const _0xe6128d=_0x837e,_0x5dd44d={'lKrms':function(_0x4f4f7d,_0x2ab503){return _0x4f4f7d+_0x2ab503;},'pAgHT':function(_0x35009e,_0x520fca){return _0x35009e&_0x520fca;},'XazYF':function(_0x1e2b69,_0x441a4a){return _0x1e2b69<_0x441a4a;},'LLySb':function(_0x57592d,_0x25ed0d){return _0x57592d*_0x25ed0d;}};if(_0x1a440f>=_0x4d786d['length'])return[0x0,0x0];const _0x1ea846=_0x4d786d[_0x1a440f];let _0xb3ac62=0x1,_0x594277=0x80;while(_0xb3ac62<=0x8&&!(_0x1ea846&_0x594277)){_0xb3ac62++,_0x594277>>=0x1;}if(_0x5dd44d['lKrms'](_0x1a440f,_0xb3ac62)>_0x4d786d[_0xe6128d(0x157)])return[0x0,0x0];let _0x218494=_0x5dd44d['pAgHT'](_0x1ea846,_0x594277-0x1);for(let _0x307e55=0x1;_0x5dd44d[_0xe6128d(0x161)](_0x307e55,_0xb3ac62);_0x307e55++){_0x218494=_0x5dd44d[_0xe6128d(0x15a)](_0x5dd44d[_0xe6128d(0x164)](_0x218494,0x100),_0x4d786d[_0x1a440f+_0x307e55]);}return[_0x218494,_0xb3ac62];}function readId(_0x40037f,_0x1baf45){const _0x1b4823=_0x837e,_0x2ebb8d={'eDshJ':function(_0x1464c4,_0x5cb835){return _0x1464c4>=_0x5cb835;},'BCSKZ':function(_0x641666,_0x3638f6){return _0x641666<_0x3638f6;},'GerMB':function(_0x21ab3f,_0x16ed75){return _0x21ab3f*_0x16ed75;},'wCBzh':function(_0x5548af,_0x529ad6){return _0x5548af+_0x529ad6;}};if(_0x2ebb8d['eDshJ'](_0x1baf45,_0x40037f[_0x1b4823(0x157)]))return[0x0,0x0];const _0x43fe3e=_0x40037f[_0x1baf45];let _0x39f65b;if(_0x2ebb8d[_0x1b4823(0x17b)](_0x43fe3e,0x80))_0x39f65b=0x1;else{if(_0x2ebb8d['eDshJ'](_0x43fe3e,0x40))_0x39f65b=0x2;else{if(_0x43fe3e>=0x20)_0x39f65b=0x3;else{if(_0x2ebb8d[_0x1b4823(0x17b)](_0x43fe3e,0x10))_0x39f65b=0x4;else return[_0x43fe3e,0x1];}}}if(_0x1baf45+_0x39f65b>_0x40037f['length'])return[0x0,0x0];let _0x146d10=0x0;for(let _0x3f2eff=0x0;_0x2ebb8d[_0x1b4823(0x143)](_0x3f2eff,_0x39f65b);_0x3f2eff++){_0x146d10=_0x2ebb8d['GerMB'](_0x146d10,0x100)+_0x40037f[_0x2ebb8d['wCBzh'](_0x1baf45,_0x3f2eff)];}return[_0x146d10,_0x39f65b];}function readUint(_0x4499d4,_0x23d639,_0x2b1c0f){const _0x268019=_0x837e,_0x53fdc4={'ucJxu':function(_0x1a998c,_0x926a79){return _0x1a998c<_0x926a79;},'AAMkR':function(_0x19dd61,_0x9647e0){return _0x19dd61+_0x9647e0;}};let _0x1b1c4f=0x0;for(let _0x193537=0x0;_0x53fdc4[_0x268019(0x170)](_0x193537,_0x2b1c0f);_0x193537++){_0x1b1c4f=_0x1b1c4f*0x100+_0x4499d4[_0x53fdc4['AAMkR'](_0x23d639,_0x193537)];}return _0x1b1c4f;}function isUnknownSize(_0xc98a68,_0x293ace){const _0x1df769=_0x837e,_0x50ed0c={'vwrYc':function(_0x471254,_0x17125e){return _0x471254-_0x17125e;},'vXozN':function(_0x4d7b8d,_0x43b6a7){return _0x4d7b8d*_0x43b6a7;}};return _0xc98a68===_0x50ed0c['vwrYc'](Math['pow'](0x2,_0x50ed0c[_0x1df769(0x144)](0x7,_0x293ace)),0x1);}function writeVint(_0x528659,_0x4473a5){const _0x491a7b=_0x837e,_0x2c8079={'gircP':function(_0x10fced,_0x5386c2){return _0x10fced*_0x5386c2;},'GOUNU':function(_0x531be5,_0x4a76f8){return _0x531be5>=_0x4a76f8;},'IzVFJ':function(_0x39f7d5,_0x37dc1e){return _0x39f7d5/_0x37dc1e;}};let _0x3bcdd5=_0x4473a5||0x1;while(Math['pow'](0x2,_0x2c8079[_0x491a7b(0x16a)](0x7,_0x3bcdd5))-0x2<_0x528659)_0x3bcdd5++;const _0x4e7b5e=Buffer['alloc'](_0x3bcdd5);for(let _0x587f54=_0x3bcdd5-0x1;_0x2c8079['GOUNU'](_0x587f54,0x0);_0x587f54--){_0x4e7b5e[_0x587f54]=_0x528659&0xff,_0x528659=Math[_0x491a7b(0x167)](_0x2c8079['IzVFJ'](_0x528659,0x100));}return _0x4e7b5e[0x0]|=0x1<<0x8-_0x3bcdd5,_0x4e7b5e;}function writeUint(_0x55ba10,_0x3b6e3d){const _0x3fd722=_0x837e,_0x1bafa7={'lzMVZ':function(_0x487de9,_0x1d8d60){return _0x487de9-_0x1d8d60;},'ocRSQ':function(_0x4dfa9d,_0x34ade4){return _0x4dfa9d/_0x34ade4;}},_0x21394a=Buffer['alloc'](_0x3b6e3d);for(let _0x2be3fa=_0x1bafa7['lzMVZ'](_0x3b6e3d,0x1);_0x2be3fa>=0x0;_0x2be3fa--){_0x21394a[_0x2be3fa]=_0x55ba10&0xff,_0x55ba10=Math['floor'](_0x1bafa7[_0x3fd722(0x15b)](_0x55ba10,0x100));}return _0x21394a;}function writeUnknownSizeVint(_0x37a3de){const _0x5332d6=_0x837e,_0x3e41c2=Buffer[_0x5332d6(0x14f)](_0x37a3de,0xff);return _0x3e41c2[0x0]=0xff>>_0x37a3de-0x1,_0x3e41c2;}function uintSize(_0x2189e1){const _0x181e82=_0x837e,_0x142356={'EGAkY':function(_0xd6b481,_0xb97287){return _0xd6b481>_0xb97287;},'raTNQ':function(_0x54d232,_0x25640d){return _0x54d232/_0x25640d;}};if(_0x2189e1===0x0)return 0x1;let _0x4f1c6e=0x0,_0x20ade6=_0x2189e1;while(_0x142356[_0x181e82(0x14a)](_0x20ade6,0x0)){_0x4f1c6e++,_0x20ade6=Math[_0x181e82(0x167)](_0x142356[_0x181e82(0x142)](_0x20ade6,0x100));}return _0x4f1c6e;}function findTimestampScale(_0x4c1943,_0x557eb9){const _0x2fa96a=_0x837e,_0x3c0756={'LyIgA':function(_0x1f0a8a,_0x3799c0){return _0x1f0a8a+_0x3799c0;},'cXgru':function(_0x34bba3,_0x2533aa){return _0x34bba3<_0x2533aa;},'cKroA':function(_0x516e92,_0x37fff1,_0x7511d8){return _0x516e92(_0x37fff1,_0x7511d8);},'XhXJQ':function(_0x30054c,_0x459c80){return _0x30054c===_0x459c80;},'sAskN':function(_0x3a1326,_0x30c8d3,_0x257666,_0x23462c){return _0x3a1326(_0x30c8d3,_0x257666,_0x23462c);},'QBLjl':function(_0x53e22b,_0x3822c7){return _0x53e22b+_0x3822c7;},'PPbtl':function(_0xc6c56,_0x1af977){return _0xc6c56+_0x1af977;}};let _0x27d87e=_0x557eb9;const _0x2fe674=Math['min'](_0x4c1943['length'],_0x3c0756['LyIgA'](_0x557eb9,0x2710));while(_0x27d87e<_0x2fe674){const [_0x51eadf,_0x3cf5b8]=readId(_0x4c1943,_0x27d87e),[_0x2e2e98,_0x3a344d]=readVint(_0x4c1943,_0x3c0756[_0x2fa96a(0x14c)](_0x27d87e,_0x3cf5b8));if(_0x51eadf===ID_INFO){let _0x2364fa=_0x3c0756['LyIgA'](_0x27d87e,_0x3cf5b8)+_0x3a344d;const _0x147aac=_0x3c0756[_0x2fa96a(0x14c)](_0x2364fa,_0x2e2e98);while(_0x3c0756['cXgru'](_0x2364fa,_0x147aac)){const [_0x422f2a,_0x591cb7]=_0x3c0756[_0x2fa96a(0x176)](readId,_0x4c1943,_0x2364fa),[_0x428835,_0x225d5b]=readVint(_0x4c1943,_0x2364fa+_0x591cb7);if(_0x3c0756['XhXJQ'](_0x422f2a,ID_TIMESTAMP_SCALE))return _0x3c0756['sAskN'](readUint,_0x4c1943,_0x3c0756[_0x2fa96a(0x172)](_0x2364fa,_0x591cb7)+_0x225d5b,_0x428835);_0x2364fa+=_0x3c0756['PPbtl'](_0x591cb7+_0x225d5b,_0x428835);}break;}if(_0x51eadf===ID_CLUSTER)break;if(isUnknownSize(_0x2e2e98,_0x3a344d))break;_0x27d87e+=_0x3cf5b8+_0x3a344d+_0x2e2e98;}return 0xf4240;}function findFirstClusterOffset(_0x2d9381,_0xcaf28d){const _0x265f16=_0x837e,_0x3a7c57={'YlcTH':function(_0x50812c,_0x2340dc,_0x518499){return _0x50812c(_0x2340dc,_0x518499);},'Dgwom':function(_0x41f7e7,_0x42fd3c){return _0x41f7e7===_0x42fd3c;},'amLad':function(_0x5b1de8,_0x3c0164,_0x517e61){return _0x5b1de8(_0x3c0164,_0x517e61);},'HsuKx':function(_0x77c750,_0x551f80){return _0x77c750+_0x551f80;}};let _0x300d5f=_0xcaf28d;while(_0x300d5f<_0x2d9381['length']){const [_0x5c966e,_0x4a57e2]=_0x3a7c57['YlcTH'](readId,_0x2d9381,_0x300d5f);if(_0x3a7c57['Dgwom'](_0x5c966e,ID_CLUSTER))return _0x300d5f;const [_0x55c7e3,_0x2678a1]=_0x3a7c57['amLad'](readVint,_0x2d9381,_0x3a7c57['HsuKx'](_0x300d5f,_0x4a57e2));if(_0x3a7c57[_0x265f16(0x14d)](isUnknownSize,_0x55c7e3,_0x2678a1))return _0x300d5f;_0x300d5f+=_0x3a7c57[_0x265f16(0x150)](_0x4a57e2+_0x2678a1,_0x55c7e3);}return _0x2d9381['length'];}function findClusterEnd(_0x10f573,_0x30d5a4,_0x1418a0,_0x55d6f0){const _0x40b3a5=_0x837e,_0x338048={'AfAlY':function(_0x440d7a,_0x2962c3){return _0x440d7a-_0x2962c3;},'NIUim':function(_0x402183,_0x68824d,_0x5c885f){return _0x402183(_0x68824d,_0x5c885f);},'oQDuL':function(_0x1b0680,_0x35f8a6){return _0x1b0680+_0x35f8a6;},'rdStk':function(_0x2a48a3,_0x5dbadd){return _0x2a48a3+_0x5dbadd;}};if(!isUnknownSize(_0x1418a0,_0x55d6f0))return _0x30d5a4+_0x1418a0;const _0x302972=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x267340=_0x30d5a4;while(_0x267340<_0x338048[_0x40b3a5(0x159)](_0x10f573['length'],0x4)){const [_0x19c387,_0x32d566]=_0x338048['NIUim'](readId,_0x10f573,_0x267340);if(_0x302972[_0x40b3a5(0x171)](_0x19c387))return _0x267340;const [_0x256f7b,_0xb446a6]=readVint(_0x10f573,_0x338048['oQDuL'](_0x267340,_0x32d566));if(isUnknownSize(_0x256f7b,_0xb446a6))return _0x10f573[_0x40b3a5(0x157)];_0x267340+=_0x338048['rdStk'](_0x32d566,_0xb446a6)+_0x256f7b;}return _0x10f573['length'];}function extractClusters(_0x5ef27f,_0x3e4931){const _0x8d5fe6=_0x837e,_0x1c2ae9={'pgpPH':function(_0x68e4d,_0x4d3ae3){return _0x68e4d===_0x4d3ae3;},'qiiTj':function(_0x2908e3,_0x2bbdcd,_0x35f139){return _0x2908e3(_0x2bbdcd,_0x35f139);},'YLsow':function(_0x3de985,_0x20466e){return _0x3de985!==_0x20466e;},'NmUIV':function(_0x377da3,_0x278b54,_0x473876){return _0x377da3(_0x278b54,_0x473876);},'jJkha':function(_0x3326c7,_0x5afcf4){return _0x3326c7+_0x5afcf4;},'nwMVa':function(_0x13a420,_0x6b12fa){return _0x13a420<_0x6b12fa;},'eXHsm':function(_0xf78c45,_0x181092){return _0xf78c45+_0x181092;},'axiFy':function(_0x299be8,_0x5a1a60){return _0x299be8===_0x5a1a60;},'FlOIj':function(_0x12fea3,_0x18f1da){return _0x12fea3+_0x18f1da;},'EkLQt':function(_0x5708c8,_0x2798ad){return _0x5708c8+_0x2798ad;},'Naorx':function(_0x5e44e6,_0x1fd832){return _0x5e44e6+_0x1fd832;},'kxrKd':function(_0x3e01ff,_0x45fed1){return _0x3e01ff===_0x45fed1;},'diQOZ':function(_0xde7a19,_0x2f13e6,_0xee297e){return _0xde7a19(_0x2f13e6,_0xee297e);},'VwsKO':function(_0xa2e092,_0x4a47cf){return _0xa2e092<_0x4a47cf;},'RHgup':function(_0xf96750,_0x1999ee,_0x1b0cdf){return _0xf96750(_0x1999ee,_0x1b0cdf);},'udzBH':function(_0x2320a2,_0x498fc7){return _0x2320a2>=_0x498fc7;},'MuxKP':function(_0x2bc241,_0x1eb962){return _0x2bc241+_0x1eb962;},'XaZpQ':function(_0x41694c,_0x5641e2){return _0x41694c>_0x5641e2;},'sPGGH':function(_0x248150,_0x31edc4,_0x12dcaa){return _0x248150(_0x31edc4,_0x12dcaa);}},_0x3581e0=[],_0x28c942=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x1a88ea=0x0;while(_0x1a88ea<_0x5ef27f['length']){const _0xcdc01c=_0x5ef27f['indexOf'](_0x28c942,_0x1a88ea);if(_0x1c2ae9['pgpPH'](_0xcdc01c,-0x1))break;const [_0x1d7772,_0x4437b5]=_0x1c2ae9['qiiTj'](readId,_0x5ef27f,_0xcdc01c);if(_0x1c2ae9['YLsow'](_0x1d7772,ID_CLUSTER)){_0x1a88ea=_0xcdc01c+0x1;continue;}const [_0x5ef887,_0x36ab5d]=_0x1c2ae9['NmUIV'](readVint,_0x5ef27f,_0x1c2ae9[_0x8d5fe6(0x153)](_0xcdc01c,_0x4437b5)),_0x19accf=_0x1c2ae9[_0x8d5fe6(0x153)](_0xcdc01c+_0x4437b5,_0x36ab5d),_0x532829=findClusterEnd(_0x5ef27f,_0x19accf,_0x5ef887,_0x36ab5d);let _0x105c15=_0x19accf,_0x232197=0x0,_0x48d24d=0x2,_0x299cfb=![],_0x48218e=Buffer['alloc'](0x0),_0x30fb52=Buffer['alloc'](0x0);while(_0x1c2ae9['nwMVa'](_0x105c15,_0x532829)){const [_0x4eb615,_0x329e33]=readId(_0x5ef27f,_0x105c15),[_0x4a7012,_0x2627da]=_0x1c2ae9['qiiTj'](readVint,_0x5ef27f,_0x1c2ae9[_0x8d5fe6(0x162)](_0x105c15,_0x329e33));if(_0x1c2ae9['axiFy'](_0x4eb615,ID_TIMESTAMP)){_0x232197=readUint(_0x5ef27f,_0x1c2ae9['FlOIj'](_0x105c15,_0x329e33)+_0x2627da,_0x4a7012),_0x48d24d=_0x4a7012,_0x299cfb=!![],_0x48218e=_0x5ef27f[_0x8d5fe6(0x156)](_0x19accf,_0x105c15);const _0x1f5a74=_0x1c2ae9['EkLQt'](_0x1c2ae9[_0x8d5fe6(0x17c)](_0x105c15+_0x329e33,_0x2627da),_0x4a7012);_0x30fb52=_0x5ef27f['slice'](_0x1f5a74,_0x532829);break;}if(_0x1c2ae9[_0x8d5fe6(0x13f)](_0x4eb615,ID_CLUSTER))break;if(_0x1c2ae9['diQOZ'](isUnknownSize,_0x4a7012,_0x2627da))break;_0x105c15+=_0x1c2ae9['Naorx'](_0x1c2ae9[_0x8d5fe6(0x153)](_0x329e33,_0x2627da),_0x4a7012);}!_0x299cfb&&(_0x30fb52=_0x5ef27f['slice'](_0x19accf,_0x532829));let _0x8a52b7=_0x232197;_0x105c15=_0x19accf;while(_0x1c2ae9['VwsKO'](_0x105c15,_0x532829)){const [_0x339a7a,_0x2d97a7]=readId(_0x5ef27f,_0x105c15),[_0x29a4ee,_0x24f054]=_0x1c2ae9[_0x8d5fe6(0x141)](readVint,_0x5ef27f,_0x105c15+_0x2d97a7);if(_0x1c2ae9['kxrKd'](_0x339a7a,ID_SIMPLE_BLOCK)&&_0x1c2ae9['udzBH'](_0x29a4ee,0x4)){const _0x304299=_0x1c2ae9[_0x8d5fe6(0x13e)](_0x105c15,_0x2d97a7)+_0x24f054,[,_0x334d0e]=readVint(_0x5ef27f,_0x304299),_0x4fe087=_0x5ef27f[_0x8d5fe6(0x16e)](_0x304299+_0x334d0e),_0x2ae870=_0x232197+_0x4fe087;if(_0x1c2ae9[_0x8d5fe6(0x17f)](_0x2ae870,_0x8a52b7))_0x8a52b7=_0x2ae870;}if(_0x1c2ae9[_0x8d5fe6(0x17e)](_0x339a7a,ID_CLUSTER))break;if(_0x1c2ae9['sPGGH'](isUnknownSize,_0x29a4ee,_0x24f054))break;_0x105c15+=_0x1c2ae9[_0x8d5fe6(0x17c)](_0x2d97a7,_0x24f054)+_0x29a4ee;}_0x3581e0[_0x8d5fe6(0x173)]({'timestamp':_0x232197,'maxTicks':_0x8a52b7,'bodyBeforeTimestamp':_0x48218e,'bodyAfterTimestamp':_0x30fb52,'timestampElementSize':_0x48d24d}),_0x1a88ea=_0x532829;}return _0x3581e0;}function parseWebm(_0x2b7289){const _0x24584b=_0x837e,_0x4d00e6={'wuguh':function(_0x513f5b,_0x340950,_0x5ef7ac){return _0x513f5b(_0x340950,_0x5ef7ac);},'Sdzca':function(_0x2ead38,_0x48d457){return _0x2ead38+_0x48d457;},'tMKxw':function(_0x36c874,_0x25e77b){return _0x36c874>_0x25e77b;}};let _0x40b724=0x0;const [,_0x629926]=readId(_0x2b7289,_0x40b724),[_0x379263,_0x4e2bbf]=readVint(_0x2b7289,_0x40b724+_0x629926);_0x40b724+=_0x629926+_0x4e2bbf+_0x379263;const [_0x1b039a,_0x51e03c]=_0x4d00e6[_0x24584b(0x158)](readId,_0x2b7289,_0x40b724);if(_0x1b039a!==ID_SEGMENT)return null;const [,_0x145526]=_0x4d00e6[_0x24584b(0x158)](readVint,_0x2b7289,_0x4d00e6['Sdzca'](_0x40b724,_0x51e03c)),_0x5ca21e=_0x40b724+_0x51e03c+_0x145526,_0x332992=findTimestampScale(_0x2b7289,_0x5ca21e),_0x438249=findFirstClusterOffset(_0x2b7289,_0x5ca21e),_0xa2cb70=_0x2b7289[_0x24584b(0x156)](0x0,_0x438249),_0x3675f0=_0x4d00e6['wuguh'](extractClusters,_0x2b7289,_0x332992);let _0x4a5c3a=0x0;for(const _0x207539 of _0x3675f0){if(_0x4d00e6['tMKxw'](_0x207539['maxTicks'],_0x4a5c3a))_0x4a5c3a=_0x207539['maxTicks'];}return{'header':_0xa2cb70,'clusters':_0x3675f0,'timestampScale':_0x332992,'maxTimestampTicks':_0x4a5c3a};}function buildCluster(_0x138573,_0x1e04fd,_0x56dbb4){const _0x1b8803=_0x837e,_0x4d081a=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x5a92f1=Math['max'](0x4,uintSize(_0x138573)),_0x47feeb=Buffer['concat']([Buffer[_0x1b8803(0x14e)]([ID_TIMESTAMP]),writeVint(_0x5a92f1),writeUint(_0x138573,_0x5a92f1)]),_0x18fc81=Buffer['concat']([_0x1e04fd,_0x47feeb,_0x56dbb4]),_0x236bb8=writeVint(_0x18fc81[_0x1b8803(0x157)]);return Buffer[_0x1b8803(0x15c)]([_0x4d081a,_0x236bb8,_0x18fc81]);}const ID_DURATION=0x4489;function _0x3834(){const _0x14b857=['lKrms','ocRSQ','concat','2359524UGhUvZ','590btYDAf','log','clusters','XazYF','eXHsm','5224NbHqPB','LLySb','copy','lUYZs','floor','error','argv','gircP','stitchWebmFiles.ts','804157wpjESM','min','readInt16BE','7162350bbSedD','ucJxu','has','QBLjl','push','uqrnV','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','cKroA','2rlcNWe','JFJzn','header','1222506wISIJk','eDshJ','Naorx','\x20files\x20->\x20','pgpPH','XaZpQ','zPsRO','MuxKP','kxrKd','YtiRM','RHgup','raTNQ','BCSKZ','vXozN','endsWith','vyOAD','4266pdpYtd','5848664lHUDzJ','fTfim','EGAkY','KnPUY','LyIgA','amLad','from','alloc','HsuKx','WaiMr','czQvc','jJkha','bodyAfterTimestamp','13979RxyGHw','slice','length','wuguh','AfAlY'];_0x3834=function(){return _0x14b857;};return _0x3834();}function rebuildHeaderWithoutDuration(_0x58f718){const _0x2b54f5=_0x837e,_0x5e7796={'uqrnV':function(_0x311724,_0x56e7c0,_0x291ce9){return _0x311724(_0x56e7c0,_0x291ce9);},'lUYZs':function(_0x9b5e48,_0x4bfa7d){return _0x9b5e48+_0x4bfa7d;},'zPsRO':function(_0x424c30,_0xf73a07,_0x5c876d){return _0x424c30(_0xf73a07,_0x5c876d);},'WaiMr':function(_0x32bf0a,_0x44b684){return _0x32bf0a<_0x44b684;},'wXlGj':function(_0x55fcca,_0x57b54b,_0x17693b){return _0x55fcca(_0x57b54b,_0x17693b);},'CVgTO':function(_0x41124c,_0x46ee4c,_0x3472f4){return _0x41124c(_0x46ee4c,_0x3472f4);},'czQvc':function(_0x439eb5,_0xd9d90c,_0x8c7a28){return _0x439eb5(_0xd9d90c,_0x8c7a28);},'vyOAD':function(_0x3395b5,_0x54eefb){return _0x3395b5+_0x54eefb;}},_0xda9db1=Buffer['from'](_0x58f718);let _0x27fbc5=0x0;const [,_0x22a858]=readId(_0xda9db1,_0x27fbc5),[_0x1ad6fe,_0x5df183]=_0x5e7796[_0x2b54f5(0x174)](readVint,_0xda9db1,_0x27fbc5+_0x22a858),_0x58dbe3=_0x5e7796['lUYZs'](_0x5e7796[_0x2b54f5(0x166)](_0x27fbc5,_0x22a858)+_0x5df183,_0x1ad6fe),[,_0x47be70]=_0x5e7796['zPsRO'](readId,_0xda9db1,_0x58dbe3),[,_0x4809fa]=_0x5e7796[_0x2b54f5(0x180)](readVint,_0xda9db1,_0x5e7796[_0x2b54f5(0x166)](_0x58dbe3,_0x47be70)),_0x2f1d5a=_0x58dbe3+_0x47be70+_0x4809fa,_0x33205c=writeUnknownSizeVint(_0x4809fa);_0x33205c[_0x2b54f5(0x165)](_0xda9db1,_0x5e7796[_0x2b54f5(0x166)](_0x58dbe3,_0x47be70));let _0x35d90d=_0x2f1d5a;const _0x33fc4b=Math[_0x2b54f5(0x16d)](_0xda9db1['length'],_0x5e7796['lUYZs'](_0x2f1d5a,0x2710));while(_0x5e7796[_0x2b54f5(0x151)](_0x35d90d,_0x33fc4b)){const [_0x4e60f4,_0x594aa7]=_0x5e7796['wXlGj'](readId,_0xda9db1,_0x35d90d),[_0x3ff0b4,_0x5cffc5]=_0x5e7796['CVgTO'](readVint,_0xda9db1,_0x35d90d+_0x594aa7);if(_0x4e60f4===ID_CLUSTER)break;if(_0x5e7796[_0x2b54f5(0x152)](isUnknownSize,_0x3ff0b4,_0x5cffc5))break;if(_0x4e60f4===ID_INFO){const _0x57e817=_0x5e7796[_0x2b54f5(0x166)](_0x35d90d+_0x594aa7,_0x5cffc5),_0xbe695d=_0x57e817+_0x3ff0b4,_0x9359a9=[];let _0x2024cb=_0x57e817;while(_0x2024cb<_0xbe695d){const [_0x14584e,_0x1a17f3]=readId(_0xda9db1,_0x2024cb),[_0x30c3db,_0x28f30c]=readVint(_0xda9db1,_0x5e7796[_0x2b54f5(0x146)](_0x2024cb,_0x1a17f3)),_0x4e2f48=_0x1a17f3+_0x28f30c+_0x30c3db;_0x14584e!==ID_DURATION&&_0x9359a9[_0x2b54f5(0x173)](_0xda9db1['slice'](_0x2024cb,_0x5e7796[_0x2b54f5(0x146)](_0x2024cb,_0x4e2f48))),_0x2024cb+=_0x4e2f48;}const _0x154230=Buffer['concat'](_0x9359a9),_0x5beacb=Buffer['concat']([_0xda9db1[_0x2b54f5(0x156)](_0x35d90d,_0x35d90d+_0x594aa7),writeVint(_0x154230['length'],_0x5cffc5)]);return Buffer[_0x2b54f5(0x15c)]([_0xda9db1['slice'](0x0,_0x35d90d),_0x5beacb,_0x154230,_0xda9db1['slice'](_0xbe695d)]);}_0x35d90d+=_0x594aa7+_0x5cffc5+_0x3ff0b4;}return _0xda9db1;}export function stitchWebmFiles(_0x4bf8fe,_0xbdc058){const _0x4b5217=_0x837e,_0x20c1e9={'gGTxF':function(_0x286c05,_0x1e1bfa){return _0x286c05(_0x1e1bfa);},'fTfim':function(_0x405621,_0x46a58a){return _0x405621(_0x46a58a);},'YtiRM':function(_0xe7bef4,_0x2b5dd1){return _0xe7bef4<_0x2b5dd1;},'KnPUY':function(_0x5e5e03,_0x1c3f85,_0x7f9aff,_0x265d6b){return _0x5e5e03(_0x1c3f85,_0x7f9aff,_0x265d6b);},'JFJzn':function(_0x23e900,_0x4d175c){return _0x23e900+_0x4d175c;},'DKzuL':function(_0x5cedd3,_0x5e0e63,_0x2999ee){return _0x5cedd3(_0x5e0e63,_0x2999ee);}};if(_0x4bf8fe['length']<=0x1)return![];const _0x42f6eb=[];for(const _0xb9fc0e of _0x4bf8fe){const _0x37b718=readFileSync(_0xb9fc0e),_0x397835=_0x20c1e9['gGTxF'](parseWebm,_0x37b718);if(!_0x397835||_0x397835[_0x4b5217(0x160)]['length']===0x0)return![];_0x42f6eb[_0x4b5217(0x173)](_0x397835);}const _0x438a6b=_0x42f6eb[0x0],_0x28490a=_0x20c1e9[_0x4b5217(0x149)](rebuildHeaderWithoutDuration,_0x438a6b[_0x4b5217(0x179)]),_0x312dce=[_0x28490a];let _0x3b7cc5=0x0;for(let _0x537503=0x0;_0x20c1e9[_0x4b5217(0x140)](_0x537503,_0x42f6eb['length']);_0x537503++){const _0x1237c9=_0x42f6eb[_0x537503];for(const _0x4794df of _0x1237c9[_0x4b5217(0x160)]){const _0x425a50=_0x4794df['timestamp']+_0x3b7cc5;_0x312dce['push'](_0x20c1e9[_0x4b5217(0x14b)](buildCluster,_0x425a50,_0x4794df['bodyBeforeTimestamp'],_0x4794df[_0x4b5217(0x154)]));}const _0x291983=0x1e;_0x3b7cc5+=_0x20c1e9[_0x4b5217(0x178)](_0x1237c9['maxTimestampTicks'],_0x291983);}return _0x20c1e9['DKzuL'](writeFileSync,_0xbdc058,Buffer['concat'](_0x312dce)),!![];}if(process['argv'][0x1]?.[_0x1f87f1(0x145)](_0x1f87f1(0x16b))||process[_0x1f87f1(0x169)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process[_0x1f87f1(0x169)][_0x1f87f1(0x156)](0x2);args['length']<0x3&&(console[_0x1f87f1(0x168)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x1f87f1(0x157)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs['length']+_0x1f87f1(0x17d)+output):console[_0x1f87f1(0x15f)](_0x1f87f1(0x175));}
|