@ranger-testing/ranger-cli 3.0.1-alpha.f6aba6c-32 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -0
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x94139c,_0x3025c2){const _0x12a726=_0x13f3,_0x5f37d3=_0x94139c();while(!![]){try{const _0x58f38e=-parseInt(_0x12a726(0x200))/0x1*(parseInt(_0x12a726(0x1eb))/0x2)+-parseInt(_0x12a726(0x1f7))/0x3+-parseInt(_0x12a726(0x214))/0x4+-parseInt(_0x12a726(0x1fe))/0x5*(parseInt(_0x12a726(0x216))/0x6)+-parseInt(_0x12a726(0x1f0))/0x7*(parseInt(_0x12a726(0x218))/0x8)+-parseInt(_0x12a726(0x219))/0x9*(parseInt(_0x12a726(0x208))/0xa)+parseInt(_0x12a726(0x206))/0xb;if(_0x58f38e===_0x3025c2)break;else _0x5f37d3['push'](_0x5f37d3['shift']());}catch(_0x52ae16){_0x5f37d3['push'](_0x5f37d3['shift']());}}}(_0x5bb0,0xd78dc));import{existsSync}from'fs';import _0x36b212 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';function _0x5bb0(){const _0x5b052e=['ymaOe','16392CmnwLn','cwd','56yZbTWs','225PSAACv','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','env','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','3217366GBQzdx','kbOgn','IsHyG','HxYus','LMEIl','497700tlhWAc','log','authPath','MjyiX','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','qdVFq','name','1219308YdWAGS','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','RANGER_SESSION_STATE_PATH','local','WJEBs','DOQzo','HNVqM','1105fcyGgu','envBaseUrl','1EdzNRP','baseUrl','RANGER_SESSION_STATE_PATH=','profile','jgUpl','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','54394208TfXKBw','string','42010ecnzWe','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','list','Profile\x20\x22','cdpEndpoint','domains','startPath','LCdtY','`ranger\x20profile\x20add`\x20to\x20create\x20one.','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','url','XraME','3361616bnkfmX'];_0x5bb0=function(){return _0x5b052e;};return _0x5bb0();}import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x32ebc7){const _0x390b2b=_0x13f3,_0x25ae8b={'qdVFq':function(_0x31e9cb,_0x5beccd){return _0x31e9cb+_0x5beccd;},'crpVk':function(_0x1460cc,_0x3d0b7e){return _0x1460cc+_0x3d0b7e;},'qlQUs':_0x390b2b(0x21c),'HxYus':_0x390b2b(0x205),'WJEBs':_0x390b2b(0x1f4),'HNVqM':function(_0x32d228,_0x4eae44){return _0x32d228(_0x4eae44);},'IWpDj':function(_0x556f60,_0x5a5fb6){return _0x556f60===_0x5a5fb6;},'MjyiX':function(_0x41d694,_0x151e08){return _0x41d694+_0x151e08;},'XraME':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','LCdtY':function(_0x543c91,_0x3677a7){return _0x543c91&&_0x3677a7;},'swXex':function(_0x412cdf){return _0x412cdf();},'CFvCi':'source','DOQzo':'Local\x20profile','LMEIl':function(_0x1088a9,_0x11d01b,_0x4e0e06){return _0x1088a9(_0x11d01b,_0x4e0e06);},'ttlhQ':function(_0x40a4a0,_0x2305da){return _0x40a4a0??_0x2305da;},'ymaOe':function(_0x2f2b90,_0x3b57d9){return _0x2f2b90(_0x3b57d9);},'gqsWK':function(_0x51dcaf,_0x352a43,_0xbe9c77){return _0x51dcaf(_0x352a43,_0xbe9c77);},'HyYmA':function(_0x220e98,_0x10170a){return _0x220e98(_0x10170a);},'kbOgn':function(_0x1cf1be,_0x508860){return _0x1cf1be(_0x508860);}},_0x80a3ed=_0x32ebc7['profile'];let _0x14673c=_0x32ebc7[_0x390b2b(0x203)]??await readActiveProfileName(),_0x46249a=null;if(!_0x14673c&&process['env']['RANGER_TEST_USERNAME']){const _0x21a44d=await resolveAdHocProfile();_0x21a44d&&(_0x14673c=_0x21a44d[_0x390b2b(0x1f6)],_0x46249a=_0x21a44d['profile']);}if(!_0x14673c)try{const _0x120b0d=await listCloudProfiles();if(_0x120b0d['length']===0x1){const _0x27ac1c=_0x120b0d[0x0];_0x14673c=_0x27ac1c['name'],console[_0x390b2b(0x1f1)](_0x390b2b(0x1f8)+_0x27ac1c['name']),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x14673c)throw new Error(_0x25ae8b[_0x390b2b(0x1f5)](_0x25ae8b['crpVk'](_0x25ae8b['crpVk'](_0x25ae8b['qlQUs'],_0x390b2b(0x211)),_0x390b2b(0x209))+_0x25ae8b[_0x390b2b(0x1ee)],_0x25ae8b[_0x390b2b(0x1fb)]));const _0xb56381=_0x25ae8b['HNVqM'](getEnvDir,_0x14673c),_0x9e3f5=existsSync(_0xb56381);let _0x3dfefe=_0x46249a,_0x3f9ce9=![];if(!_0x3dfefe)try{_0x3dfefe=await fetchCloudProfile(_0x14673c);if(!_0x3dfefe)_0x3f9ce9=!![];}catch(_0x3dc18f){_0x3dc18f instanceof ApiError&&_0x25ae8b['IWpDj'](_0x3dc18f['status'],0x194)&&(_0x3f9ce9=!![]);}if(_0x80a3ed&&_0x3f9ce9&&!_0x9e3f5&&!_0x3dfefe)throw new Error(_0x25ae8b[_0x390b2b(0x1f3)](_0x390b2b(0x20b)+_0x80a3ed+_0x390b2b(0x21a),_0x25ae8b[_0x390b2b(0x213)])+_0x390b2b(0x210));if(_0x25ae8b[_0x390b2b(0x20f)](_0x3dfefe,_0x9e3f5)){let _0x33aa8d=!![];if(_0x25ae8b['swXex'](isInteractive)){const {source:_0x684130}=await _0x36b212['prompt']([{'type':_0x390b2b(0x20a),'name':_0x25ae8b['CFvCi'],'message':'Profile\x20\x22'+_0x14673c+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':'Cloud\x20profile\x20(recommended)','value':'cloud'},{'name':_0x25ae8b[_0x390b2b(0x1fc)],'value':_0x390b2b(0x1fa)}],'default':'cloud'}]);_0x33aa8d=_0x684130==='cloud';}if(!_0x33aa8d)_0x3dfefe=null;}const _0x177627=_0x25ae8b[_0x390b2b(0x1ef)](readProfileOverrides,process[_0x390b2b(0x217)](),_0x14673c);let _0x30c014=null,_0x55ff87,_0x1d2459,_0x28d74a,_0x255788,_0x291c7d=null,_0x4c62c1;const _0x416593=_0x25ae8b[_0x390b2b(0x1fd)](expandOverrides,_0x177627),_0x3678d3=readUrlEnvVars();if(_0x3dfefe){_0x30c014=_0x3dfefe;const _0x1ea999=_0x3dfefe['settings']??{},_0x1f3173=mergeCloudProfileSettings(_0x1ea999,_0x25ae8b['ttlhQ'](_0x177627,undefined)),_0xff017e={..._0x3dfefe,'settings':_0x1f3173};_0x291c7d={'baseUrl':expandString(_0x1ea999[_0x390b2b(0x201)]),'startPath':_0x25ae8b[_0x390b2b(0x215)](expandString,_0x1ea999[_0x390b2b(0x20e)])};const _0x70ca4d=await fetchAuthConfig(),_0x19e063=_0x70ca4d?_0x25ae8b['gqsWK'](resolveAuthEnvironmentLocally,_0x70ca4d,_0x3dfefe['environmentKey']):null;_0x4c62c1=_0x19e063?.['domains']?.[0x0];const _0x1587cf=resolveProfileUrl({'flagBaseUrl':_0x32ebc7[_0x390b2b(0x201)],'flagStartPath':_0x32ebc7[_0x390b2b(0x20e)],'envBaseUrl':_0x3678d3['envBaseUrl'],'envStartPath':_0x3678d3['envStartPath'],'projectOverrides':_0x416593,'cloudSettings':_0x291c7d,'authEnvironmentDomain':_0x4c62c1}),_0x580711=process[_0x390b2b(0x21b)][_0x390b2b(0x1f9)];if(_0x580711){if(!_0x25ae8b['HyYmA'](existsSync,_0x580711))throw new Error(_0x390b2b(0x202)+_0x580711+'\x20does\x20not\x20exist.');_0x55ff87=_0x580711,_0x1d2459=_0x25ae8b[_0x390b2b(0x1ec)](resolveEnvVars,_0x1f3173),_0x28d74a=Boolean(_0x1d2459[_0x390b2b(0x20c)]);}else{const _0x3ca41c=await resolveCloudProfileSession(_0xff017e,{'effectiveBaseUrl':_0x1587cf['baseUrl']});_0x55ff87=_0x3ca41c[_0x390b2b(0x1f2)],_0x1d2459=resolveEnvVars(_0x3ca41c['settings']),_0x28d74a=Boolean(_0x1d2459[_0x390b2b(0x20c)]),_0x4c62c1=_0x3ca41c['resolvedEnv']?.[_0x390b2b(0x20d)]?.[0x0];}}else{if(!_0x9e3f5)throw new Error(_0x390b2b(0x20b)+_0x14673c+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x14673c);const _0xcc431c=await loadSettings(_0x14673c);_0x1d2459=resolveEnvVars(_0xcc431c),_0x28d74a=Boolean(_0x1d2459['cdpEndpoint']),_0x255788=_0x1d2459['baseUrl'];}const _0x5920b1=_0x25ae8b[_0x390b2b(0x1ec)](resolveProfileUrl,{'flagBaseUrl':_0x32ebc7['baseUrl'],'flagStartPath':_0x32ebc7['startPath'],'envBaseUrl':_0x3678d3[_0x390b2b(0x1ff)],'envStartPath':_0x3678d3['envStartPath'],'localSettingsBaseUrl':_0x255788,'projectOverrides':_0x416593,'cloudSettings':_0x291c7d,'authEnvironmentDomain':_0x4c62c1}),_0x14314d=_0x5920b1[_0x390b2b(0x212)]??_0x5920b1[_0x390b2b(0x201)];if(_0x25ae8b['LCdtY'](!_0x14314d,!_0x28d74a))throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x14673c+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x14673c+'\x20baseUrl\x20<url>');return{'activeProfile':_0x14673c,'resolvedCloudProfile':_0x30c014,'cloudAuthPath':_0x55ff87,'resolvedSettings':_0x1d2459,'isCdpMode':_0x28d74a,'url':_0x14314d,'startPath':_0x5920b1[_0x390b2b(0x20e)]};}function _0x13f3(_0x52f8d6,_0x2c60ad){_0x52f8d6=_0x52f8d6-0x1eb;const _0x5bb007=_0x5bb0();let _0x13f310=_0x5bb007[_0x52f8d6];return _0x13f310;}function expandString(_0x22cf7b){const _0x20d72e=_0x13f3,_0x164f78={'hDpZe':function(_0x56c693,_0x58b53){return _0x56c693!==_0x58b53;}};if(_0x164f78['hDpZe'](typeof _0x22cf7b,_0x20d72e(0x207)))return _0x22cf7b;return resolveEnvVars(_0x22cf7b);}function expandOverrides(_0x2bd33e){const _0x2acabe=_0x13f3,_0x9442e1={'IsHyG':function(_0x2c032e,_0x4c6f1e){return _0x2c032e===_0x4c6f1e;},'YgBbv':'string','jgUpl':function(_0x367990,_0xbbbbc6){return _0x367990(_0xbbbbc6);}};if(!_0x2bd33e)return _0x2bd33e;const _0x41c8f2={..._0x2bd33e};return _0x9442e1[_0x2acabe(0x1ed)](typeof _0x41c8f2['baseUrl'],'string')&&(_0x41c8f2['baseUrl']=resolveEnvVars(_0x41c8f2['baseUrl'])),typeof _0x41c8f2[_0x2acabe(0x20e)]===_0x9442e1['YgBbv']&&(_0x41c8f2[_0x2acabe(0x20e)]=_0x9442e1[_0x2acabe(0x204)](resolveEnvVars,_0x41c8f2['startPath'])),_0x41c8f2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xa26271=_0x3cad;(function(_0xe45958,_0x40ef94){const _0x4a4785=_0x3cad,_0x59a933=_0xe45958();while(!![]){try{const _0x55c9a4=-parseInt(_0x4a4785(0x193))/0x1*(-parseInt(_0x4a4785(0x189))/0x2)+-parseInt(_0x4a4785(0x182))/0x3*(parseInt(_0x4a4785(0x18f))/0x4)+parseInt(_0x4a4785(0x18c))/0x5*(-parseInt(_0x4a4785(0x18e))/0x6)+-parseInt(_0x4a4785(0x17f))/0x7+-parseInt(_0x4a4785(0x191))/0x8*(-parseInt(_0x4a4785(0x186))/0x9)+parseInt(_0x4a4785(0x18b))/0xa+parseInt(_0x4a4785(0x184))/0xb*(parseInt(_0x4a4785(0x199))/0xc);if(_0x55c9a4===_0x40ef94)break;else _0x59a933['push'](_0x59a933['shift']());}catch(_0x3bbe8c){_0x59a933['push'](_0x59a933['shift']());}}}(_0x9dfc,0xb02f7));function firstDefined(..._0x302d18){for(const _0x4f2394 of _0x302d18){if(_0x4f2394!==undefined&&_0x4f2394!==null&&_0x4f2394!=='')return _0x4f2394;}return undefined;}function _0x3cad(_0x12790e,_0x2ef032){_0x12790e=_0x12790e-0x17f;const _0x9dfc3c=_0x9dfc();let _0x3cadd8=_0x9dfc3c[_0x12790e];return _0x3cadd8;}function normalizeAuthEnvironmentDomain(_0x57a56c){if(!_0x57a56c)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x57a56c))return _0x57a56c;return'https://'+_0x57a56c;}export function resolveBaseUrl(_0x283f82){const _0x502e08=_0x3cad,_0x2f381d={'ofyrl':function(_0x311612,_0x1d14db){return _0x311612 in _0x1d14db;},'umhMy':function(_0x119d5f,_0x16b1ba,_0x54214a,_0x5b122c,_0xfbfa1e,_0x5333ee,_0x1aae03){return _0x119d5f(_0x16b1ba,_0x54214a,_0x5b122c,_0xfbfa1e,_0x5333ee,_0x1aae03);},'qDCQu':function(_0x1f31a2,_0x1d6efd){return _0x1f31a2===_0x1d6efd;},'nlBMS':'string'},_0xb7e96=_0x283f82[_0x502e08(0x180)],_0x3dde89=!!_0xb7e96&&_0x2f381d[_0x502e08(0x192)](_0x502e08(0x195),_0xb7e96),_0x2c7197=_0xb7e96?.['baseUrl'],_0x397c9e=!(_0x3dde89&&_0x2c7197===null);return _0x2f381d['umhMy'](firstDefined,_0x283f82[_0x502e08(0x196)],_0x283f82[_0x502e08(0x188)],_0x283f82[_0x502e08(0x185)],_0x2f381d[_0x502e08(0x197)](typeof _0x2c7197,_0x2f381d[_0x502e08(0x183)])?_0x2c7197:undefined,_0x397c9e?_0x283f82['cloudSettings']?.['baseUrl']:undefined,_0x397c9e?normalizeAuthEnvironmentDomain(_0x283f82[_0x502e08(0x190)]):undefined);}export function resolveStartPath(_0x25327d){const _0x5dcb1d=_0x3cad,_0x5d5e8c={'uujsQ':'startPath','dTkDF':function(_0x1fc8ec,_0x5084fd,_0x1b0cec,_0x523fc4,_0x543086){return _0x1fc8ec(_0x5084fd,_0x1b0cec,_0x523fc4,_0x543086);},'SFAQh':function(_0x4d875d,_0x44c334){return _0x4d875d===_0x44c334;}},_0x5224d9=_0x25327d['projectOverrides'],_0x17af63=!!_0x5224d9&&_0x5d5e8c['uujsQ']in _0x5224d9,_0x13ac7d=_0x5224d9?.[_0x5dcb1d(0x18a)],_0x40e28a=!(_0x17af63&&_0x13ac7d===null);return _0x5d5e8c[_0x5dcb1d(0x18d)](firstDefined,_0x25327d[_0x5dcb1d(0x19a)],_0x25327d['envStartPath'],_0x5d5e8c['SFAQh'](typeof _0x13ac7d,_0x5dcb1d(0x198))?_0x13ac7d:undefined,_0x40e28a?_0x25327d[_0x5dcb1d(0x187)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x21ff85,_0x5087ef){const _0x31d63d=_0x3cad,_0x1a2bfd={'WfeBO':function(_0x5a84c4,_0x61750e){return _0x5a84c4+_0x61750e;}};if(!_0x21ff85)return undefined;if(!_0x5087ef)return _0x21ff85;const _0x2ec0d0=_0x21ff85['endsWith']('/')?_0x21ff85['slice'](0x0,-0x1):_0x21ff85,_0x262c29=_0x5087ef[_0x31d63d(0x181)]('/')?_0x5087ef:'/'+_0x5087ef;return _0x1a2bfd['WfeBO'](_0x2ec0d0,_0x262c29);}function _0x9dfc(){const _0x22d3bc=['ofyrl','135386KPKwhH','env','baseUrl','flagBaseUrl','qDCQu','string','120BCXMcf','flagStartPath','4028304Ekaqgm','projectOverrides','startsWith','311259RljuAJ','nlBMS','1120537VCvCUp','localSettingsBaseUrl','4118859FqrpVj','cloudSettings','envBaseUrl','14fzmafA','startPath','6748320CWgOMd','2995CmZzvF','dTkDF','8694EYKnVF','36PeJvJf','authEnvironmentDomain','8RTsbia'];_0x9dfc=function(){return _0x22d3bc;};return _0x9dfc();}export function resolveProfileUrl(_0x495f21){const _0x26d621={'eQAHy':function(_0x5d1e2a,_0x447ff7){return _0x5d1e2a(_0x447ff7);}},_0x55750d=_0x26d621['eQAHy'](resolveBaseUrl,_0x495f21),_0xfbf128=resolveStartPath(_0x495f21);return{'baseUrl':_0x55750d,'startPath':_0xfbf128,'url':joinBaseAndPath(_0x55750d,_0xfbf128)};}export function readUrlEnvVars(_0x48eb7d=process[_0xa26271(0x194)]){return{'envBaseUrl':_0x48eb7d['RANGER_BASE_URL'],'envStartPath':_0x48eb7d['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1408(){const _0x49fc01=['141130UAmQdH','6525928iGRZsk','ms...','9hkMYCh','282RzstoS','label','495KpQvdE','\x20failed\x20(attempt\x20','120Vagxid','OBaoC','maxRetries','14QStTIA','tARHr','8043442KVDIYu','baseDelayMs','pow','2762ENguXD','1573154WKgEVn','15316850AXtONb','679044RVztWY'];_0x1408=function(){return _0x49fc01;};return _0x1408();}function _0x11cc(_0x5353f4,_0x2b03d2){_0x5353f4=_0x5353f4-0xf6;const _0x1408dd=_0x1408();let _0x11cc5a=_0x1408dd[_0x5353f4];return _0x11cc5a;}(function(_0x2aadc2,_0x5af99b){const _0x54622c=_0x11cc,_0x397195=_0x2aadc2();while(!![]){try{const _0x239ffb=-parseInt(_0x54622c(0xfa))/0x1+-parseInt(_0x54622c(0xf9))/0x2*(parseInt(_0x54622c(0x103))/0x3)+-parseInt(_0x54622c(0xfc))/0x4+parseInt(_0x54622c(0xfd))/0x5*(-parseInt(_0x54622c(0x101))/0x6)+-parseInt(_0x54622c(0x108))/0x7*(parseInt(_0x54622c(0xfe))/0x8)+parseInt(_0x54622c(0x100))/0x9*(-parseInt(_0x54622c(0xfb))/0xa)+parseInt(_0x54622c(0xf6))/0xb*(parseInt(_0x54622c(0x105))/0xc);if(_0x239ffb===_0x5af99b)break;else _0x397195['push'](_0x397195['shift']());}catch(_0x33bf6f){_0x397195['push'](_0x397195['shift']());}}}(_0x1408,0xcfec3));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x20761b,_0x337828){const _0xaa1417=_0x11cc,_0x48882b={'tARHr':function(_0x3a43bc,_0x29e408){return _0x3a43bc<=_0x29e408;},'HEosz':function(_0x1caf2f,_0x18209f){return _0x1caf2f<_0x18209f;},'OBaoC':function(_0xe4e357,_0x3f6f00){return _0xe4e357*_0x3f6f00;}},_0x3822ba=_0x337828?.[_0xaa1417(0x107)]??DEFAULT_MAX_RETRIES,_0x57f3b5=_0x337828?.[_0xaa1417(0xf7)]??DEFAULT_BASE_DELAY_MS;let _0xac372a;for(let _0x5e5351=0x0;_0x48882b[_0xaa1417(0x109)](_0x5e5351,_0x3822ba);_0x5e5351++){try{return await _0x20761b();}catch(_0x41a8d9){_0xac372a=_0x41a8d9 instanceof Error?_0x41a8d9:new Error(String(_0x41a8d9));if(_0x48882b['HEosz'](_0x5e5351,_0x3822ba)){const _0x12e29f=_0x48882b[_0xaa1417(0x106)](_0x57f3b5,Math[_0xaa1417(0xf8)](0x2,_0x5e5351));_0x337828?.[_0xaa1417(0x102)]&&console['error'](_0x337828['label']+_0xaa1417(0x104)+(_0x5e5351+0x1)+'/'+(_0x3822ba+0x1)+'),\x20retrying\x20in\x20'+_0x12e29f+_0xaa1417(0xff)),await new Promise(_0x5e4b5d=>setTimeout(_0x5e4b5d,_0x12e29f));}}}throw _0xac372a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x211fa6=_0xa85e;(function(_0x19641a,_0x4d5b7f){const _0x5c3956=_0xa85e,_0x405682=_0x19641a();while(!![]){try{const _0x2d0373=-parseInt(_0x5c3956(0x1b0))/0x1+-parseInt(_0x5c3956(0x191))/0x2+parseInt(_0x5c3956(0x1a1))/0x3*(-parseInt(_0x5c3956(0x1b5))/0x4)+parseInt(_0x5c3956(0x188))/0x5*(-parseInt(_0x5c3956(0x19a))/0x6)+-parseInt(_0x5c3956(0x1a4))/0x7*(parseInt(_0x5c3956(0x19b))/0x8)+parseInt(_0x5c3956(0x19e))/0x9*(parseInt(_0x5c3956(0x18e))/0xa)+parseInt(_0x5c3956(0x189))/0xb;if(_0x2d0373===_0x4d5b7f)break;else _0x405682['push'](_0x405682['shift']());}catch(_0x60fbe8){_0x405682['push'](_0x405682['shift']());}}}(_0xcdb1,0x482fe));import*as _0x50c598 from'fs';import*as _0x5d0513 from'path';import*as _0x3910b1 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x5d0513[_0x211fa6(0x197)](_0x3910b1['homedir'](),_0x211fa6(0x1ae),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x12ed73=_0x211fa6,_0x4d7dbe={'noZsV':_0x12ed73(0x18d)};try{if(_0x50c598[_0x12ed73(0x194)](CACHE_FILE)){const _0x28dd54=JSON['parse'](_0x50c598['readFileSync'](CACHE_FILE,_0x4d7dbe['noZsV']));return{'version':0x3,'sessions':_0x28dd54['sessions']||{},'branches':_0x28dd54[_0x12ed73(0x1b1)]||{},'lastEnabledSessionClearedAt':_0x28dd54[_0x12ed73(0x1a0)]};}}catch{}return createEmptyCache();}function saveCache(_0x1e53b3){const _0x3a1efd=_0x211fa6;try{const _0xd28d16=_0x5d0513['dirname'](CACHE_FILE);!_0x50c598['existsSync'](_0xd28d16)&&_0x50c598['mkdirSync'](_0xd28d16,{'recursive':!![]}),_0x50c598['writeFileSync'](CACHE_FILE,JSON[_0x3a1efd(0x192)](_0x1e53b3,null,0x2));}catch{}}export function getCurrentBranch(){const _0x4b292c=_0x211fa6,_0x3b9d9f={'IKOnN':function(_0x6b0a32,_0xe58bc0,_0x511a14){return _0x6b0a32(_0xe58bc0,_0x511a14);},'KmhSq':'pipe','pcAnp':function(_0xacdfa1,_0x52c7f2){return _0xacdfa1===_0x52c7f2;}};try{const _0x19327f=_0x3b9d9f['IKOnN'](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x4b292c(0x18d),'stdio':['pipe',_0x3b9d9f['KmhSq'],_0x4b292c(0x18b)]})['trim']();if(!_0x19327f||_0x3b9d9f['pcAnp'](_0x19327f,_0x4b292c(0x1b4)))return null;return _0x19327f;}catch{return null;}}export function enableBranch(_0x72c89b){const _0x1767a6={'mFnpI':function(_0x5ce606,_0x5be49b){return _0x5ce606(_0x5be49b);}},_0x389426=loadCache();_0x389426['branches'][_0x72c89b]=!![],_0x1767a6['mFnpI'](saveCache,_0x389426);}export function disableBranch(_0xb1ca6d){const _0x5efec6=_0x211fa6,_0x6d08dd=loadCache();delete _0x6d08dd[_0x5efec6(0x1b1)][_0xb1ca6d],saveCache(_0x6d08dd);}export function isBranchEnabled(_0x16e0d6){const _0x57ce98=_0x211fa6,_0x2c4997={'wGzdX':function(_0xea2a9e){return _0xea2a9e();}},_0x7e1da=_0x2c4997[_0x57ce98(0x19d)](loadCache);return _0x7e1da[_0x57ce98(0x1b1)][_0x16e0d6]===!![];}function getOrCreateSession(_0xeeba72,_0x813166){return!_0xeeba72['sessions'][_0x813166]&&(_0xeeba72['sessions'][_0x813166]={}),_0xeeba72['sessions'][_0x813166];}export function enableSession(_0x223036){const _0x19e748=_0x211fa6,_0x3398e5={'HLqaJ':function(_0x33f8d2){return _0x33f8d2();},'bEnea':'main','sKqEk':function(_0x4a60e1,_0x3e74b4){return _0x4a60e1!==_0x3e74b4;},'xQTxl':function(_0x1187fb,_0x832765){return _0x1187fb(_0x832765);}},_0x52ae5b=_0x3398e5[_0x19e748(0x1b2)](loadCache),_0x41f00a=getOrCreateSession(_0x52ae5b,_0x223036);_0x41f00a['enabled']=!![];const _0x263dfc=_0x3398e5['HLqaJ'](getCurrentBranch);_0x263dfc&&_0x263dfc!==_0x3398e5[_0x19e748(0x1ab)]&&_0x3398e5[_0x19e748(0x1a7)](_0x263dfc,_0x19e748(0x1a3))&&(_0x52ae5b['branches'][_0x263dfc]=!![],_0x41f00a[_0x19e748(0x1ad)]=_0x263dfc),_0x3398e5['xQTxl'](saveCache,_0x52ae5b);}export function isSessionEnabled(_0x14ca1b){const _0xa2faf7=_0x211fa6,_0xbf0d5={'wxuEe':function(_0x4aa7e1){return _0x4aa7e1();},'yCtuQ':function(_0x1d23a6){return _0x1d23a6();},'TwmMI':function(_0x43817b,_0x19e154){return _0x43817b===_0x19e154;},'ZIWgd':'master','qSFsU':function(_0x25743d,_0x6c4b20){return _0x25743d||_0x6c4b20;}},_0x193200=_0xbf0d5['wxuEe'](loadCache),_0x2d988c=_0xbf0d5['yCtuQ'](getCurrentBranch);if(!_0x2d988c||_0xbf0d5[_0xa2faf7(0x18c)](_0x2d988c,_0xa2faf7(0x1a2))||_0xbf0d5[_0xa2faf7(0x18c)](_0x2d988c,_0xbf0d5['ZIWgd']))return _0x193200['sessions'][_0x14ca1b]?.['enabled']===!![];const _0x184455=_0x193200[_0xa2faf7(0x1b1)][_0x2d988c]===!![],_0xe5e8a6=_0xbf0d5[_0xa2faf7(0x18c)](_0x193200['sessions'][_0x14ca1b]?.[_0xa2faf7(0x19c)],!![]);return _0xbf0d5['qSFsU'](_0x184455,_0xe5e8a6);}export function disableSession(_0x5607dd){const _0x14a9f7=_0x211fa6,_0x3f2911=loadCache(),_0x55aaf2=getOrCreateSession(_0x3f2911,_0x5607dd);_0x55aaf2[_0x14a9f7(0x19c)]=![],saveCache(_0x3f2911);}function _0xa85e(_0x266d29,_0x2f7398){_0x266d29=_0x266d29-0x188;const _0xcdb16f=_0xcdb1();let _0xa85ef7=_0xcdb16f[_0x266d29];return _0xa85ef7;}export function updateBranchTracking(_0x7b82eb){const _0xf2b3d8=_0x211fa6,_0x43ba64={'FxseJ':function(_0x5d3ddc){return _0x5d3ddc();},'EjyRG':'main','xPcUy':function(_0x51a81a,_0xf941ab){return _0x51a81a===_0xf941ab;},'vPDqh':'master'},_0x33ac8e=_0x43ba64[_0xf2b3d8(0x193)](loadCache),_0x5151f8=_0x33ac8e['sessions'][_0x7b82eb];if(!_0x5151f8?.[_0xf2b3d8(0x19c)])return;const _0x335998=_0x43ba64['FxseJ'](getCurrentBranch);if(!_0x335998||_0x335998===_0x43ba64['EjyRG']||_0x43ba64[_0xf2b3d8(0x1af)](_0x335998,_0x43ba64[_0xf2b3d8(0x18f)]))return;_0x5151f8['currentBranch']!==_0x335998&&(_0x33ac8e['branches'][_0x335998]=!![],_0x5151f8[_0xf2b3d8(0x1ad)]=_0x335998,saveCache(_0x33ac8e));}export function initBranchTracking(_0x32db1b){const _0x593e7f=_0x211fa6,_0x2450e5={'CYvTJ':function(_0x33f2cc){return _0x33f2cc();},'MPIyh':function(_0x33b139,_0x3da1d2){return _0x33b139===_0x3da1d2;},'Kyijg':'master'},_0x8b5fb4=_0x2450e5[_0x593e7f(0x1a5)](loadCache),_0x399d5b=getCurrentBranch();if(!_0x399d5b||_0x399d5b===_0x593e7f(0x1a2)||_0x2450e5['MPIyh'](_0x399d5b,_0x2450e5['Kyijg']))return;if(_0x2450e5['MPIyh'](_0x8b5fb4['branches'][_0x399d5b],!![])){const _0xb0aa88=getOrCreateSession(_0x8b5fb4,_0x32db1b);_0xb0aa88['enabled']=!![],_0xb0aa88['currentBranch']=_0x399d5b,saveCache(_0x8b5fb4);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x525195){const _0x181de0=_0x211fa6,_0x1e776d={'EbmJj':function(_0x5231df){return _0x5231df();},'ZxtWH':function(_0x400caa,_0x2229f8){return _0x400caa(_0x2229f8);}},_0x227354=_0x1e776d[_0x181de0(0x198)](loadCache),_0x471e9b=_0x227354['sessions'][_0x525195];_0x471e9b?.['enabled']&&(_0x227354[_0x181de0(0x1a0)]=Date[_0x181de0(0x1ac)](),_0x1e776d[_0x181de0(0x1b3)](saveCache,_0x227354));}export function shouldAutoEnableAfterClear(_0x33b24b){const _0x4b49da=_0x211fa6,_0x556b8c={'szHit':function(_0x2f8ef4,_0x370ef4){return _0x2f8ef4!==_0x370ef4;},'ShPXj':function(_0x970acf){return _0x970acf();},'NSmQy':function(_0x268511,_0x31db79){return _0x268511<=_0x31db79;}};if(_0x556b8c['szHit'](_0x33b24b,'clear'))return![];const _0x245da7=_0x556b8c[_0x4b49da(0x195)](loadCache),_0x5114f4=_0x245da7[_0x4b49da(0x1a0)];if(!_0x5114f4)return![];const _0x14fb5a=Date['now']()-_0x5114f4;return _0x556b8c['NSmQy'](_0x14fb5a,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x4e8f98){const _0x268079=_0x211fa6,_0x28ceb9={'UziOA':function(_0x4fda9b,_0x905abf,_0x4e27bf){return _0x4fda9b(_0x905abf,_0x4e27bf);},'FCEeX':function(_0xceea5e,_0x15e91a){return _0xceea5e!==_0x15e91a;},'EjaNg':'main','rxvag':function(_0x318fd8,_0x173a2e){return _0x318fd8(_0x173a2e);}},_0x36935a=loadCache(),_0x5a140f=_0x28ceb9[_0x268079(0x1aa)](getOrCreateSession,_0x36935a,_0x4e8f98);_0x5a140f[_0x268079(0x19c)]=!![];const _0x55ac97=getCurrentBranch();_0x55ac97&&_0x28ceb9['FCEeX'](_0x55ac97,_0x28ceb9['EjaNg'])&&_0x55ac97!==_0x268079(0x1a3)&&(_0x5a140f[_0x268079(0x1ad)]=_0x55ac97),delete _0x36935a[_0x268079(0x1a0)],_0x28ceb9[_0x268079(0x1a9)](saveCache,_0x36935a);}export function registerSession(_0x40eafc,_0x44b2bd){const _0x23848b=_0x211fa6,_0x257ef4={'suYUK':function(_0x2893e2,_0x5a8540,_0x3c6972){return _0x2893e2(_0x5a8540,_0x3c6972);}},_0x3058fa=loadCache(),_0x426713=_0x257ef4['suYUK'](getOrCreateSession,_0x3058fa,_0x40eafc);_0x426713['featureId']=_0x44b2bd,_0x426713[_0x23848b(0x1a6)]=new Date()[_0x23848b(0x196)](),saveCache(_0x3058fa);}export function getSessionEntry(_0x39d612){const _0x2e882f=_0x211fa6,_0x3a5a6c=loadCache(),_0x58bd13=_0x3a5a6c['sessions'][_0x39d612];if(_0x58bd13?.['featureId']&&_0x58bd13?.['registeredAt'])return{'featureId':_0x58bd13[_0x2e882f(0x19f)],'registeredAt':_0x58bd13[_0x2e882f(0x1a6)]};return null;}export function unregisterSession(_0x1f32c9){const _0x56707b=_0x211fa6,_0xea8ebc={'YewSf':function(_0x32c93b){return _0x32c93b();}},_0x2bfc78=_0xea8ebc['YewSf'](loadCache),_0x4da49b=_0x2bfc78['sessions'][_0x1f32c9];_0x4da49b&&(delete _0x4da49b[_0x56707b(0x19f)],delete _0x4da49b[_0x56707b(0x1a6)],saveCache(_0x2bfc78));}function _0xcdb1(){const _0xc8e1ab=['stringify','FxseJ','existsSync','ShPXj','toISOString','join','EbmJj','lastStopReminderAt','582bwWLUq','4358000FTIPOo','enabled','wGzdX','27vZPNgm','featureId','lastEnabledSessionClearedAt','3nFpjaX','main','master','7cvYUly','CYvTJ','registeredAt','sKqEk','lastPlanReminderAt','rxvag','UziOA','bEnea','now','currentBranch','.claude','xPcUy','180136ygTvHb','branches','HLqaJ','ZxtWH','HEAD','1257724uayXyp','12335WLKtah','19075441QxvatV','AkFuC','pipe','TwmMI','utf-8','292510KUAlKa','vPDqh','GJykg','495180vtFLLg'];_0xcdb1=function(){return _0xc8e1ab;};return _0xcdb1();}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x1a87bc){const _0x593962=_0x211fa6,_0x117072={'yZxYP':function(_0x5a0601,_0x3f9c59){return _0x5a0601>=_0x3f9c59;},'AkFuC':function(_0x5666a5,_0x3029ba){return _0x5666a5(_0x3029ba);}},_0x52a2e1=loadCache(),_0x4fea12=getOrCreateSession(_0x52a2e1,_0x1a87bc),_0x584539=_0x4fea12[_0x593962(0x1a8)]||0x0,_0x37afc5=Date[_0x593962(0x1ac)]();if(_0x117072['yZxYP'](_0x37afc5-_0x584539,PLAN_REMINDER_INTERVAL_MS))return _0x4fea12[_0x593962(0x1a8)]=_0x37afc5,_0x117072[_0x593962(0x18a)](saveCache,_0x52a2e1),!![];return![];}export function shouldShowStopReminder(_0x3f13c2){const _0x22f6da=_0x211fa6,_0x357c23={'sUhim':function(_0x4eacd5){return _0x4eacd5();},'zJbng':function(_0x27ada4,_0x437cb0){return _0x27ada4(_0x437cb0);}},_0x3c2421=_0x357c23['sUhim'](loadCache),_0x12ffa8=getOrCreateSession(_0x3c2421,_0x3f13c2),_0x41de69=_0x12ffa8[_0x22f6da(0x199)]||0x0,_0x1b7f79=Date['now']();if(_0x1b7f79-_0x41de69>=STOP_REMINDER_INTERVAL_MS)return _0x12ffa8[_0x22f6da(0x199)]=_0x1b7f79,_0x357c23['zJbng'](saveCache,_0x3c2421),!![];return![];}export function hasSessionBeenPrompted(_0x16e59d){const _0x9df120=_0x211fa6,_0x47938a={'GJykg':function(_0x5e6be3){return _0x5e6be3();},'RliGO':function(_0x219784,_0x447b1f){return _0x219784===_0x447b1f;}},_0x392283=_0x47938a[_0x9df120(0x190)](loadCache);return _0x47938a['RliGO'](_0x392283['sessions'][_0x16e59d]?.['prompted'],!![]);}export function markSessionPrompted(_0x326f0e){const _0x257570=loadCache(),_0x16a662=getOrCreateSession(_0x257570,_0x326f0e);_0x16a662['prompted']=!![],saveCache(_0x257570);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x1707be=_0x7be9;(function(_0x204c0b,_0x318896){const _0x48d40e=_0x7be9,_0x3f83aa=_0x204c0b();while(!![]){try{const _0x33a103=parseInt(_0x48d40e(0xba))/0x1*(parseInt(_0x48d40e(0xab))/0x2)+parseInt(_0x48d40e(0xbd))/0x3+parseInt(_0x48d40e(0xbf))/0x4*(parseInt(_0x48d40e(0xc2))/0x5)+-parseInt(_0x48d40e(0xc0))/0x6*(-parseInt(_0x48d40e(0x96))/0x7)+-parseInt(_0x48d40e(0xc6))/0x8*(parseInt(_0x48d40e(0xa3))/0x9)+-parseInt(_0x48d40e(0x97))/0xa*(parseInt(_0x48d40e(0xa5))/0xb)+-parseInt(_0x48d40e(0xa1))/0xc;if(_0x33a103===_0x318896)break;else _0x3f83aa['push'](_0x3f83aa['shift']());}catch(_0x463f98){_0x3f83aa['push'](_0x3f83aa['shift']());}}}(_0x2c27,0x3601c));import*as _0x10f078 from'fs';import*as _0x2d3ef7 from'path';import*as _0x5a8b14 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x2d3ef7['join'](_0x5a8b14[_0x1707be(0xae)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x377b1a=_0x1707be,_0x5c2c17={'dLUHz':'utf-8'};try{if(_0x10f078[_0x377b1a(0xa9)](CACHE_FILE)){const _0x4ccf72=JSON['parse'](_0x10f078[_0x377b1a(0xb2)](CACHE_FILE,_0x5c2c17[_0x377b1a(0x99)]));return{'version':0x3,'sessions':_0x4ccf72[_0x377b1a(0xcc)]||{},'branches':_0x4ccf72[_0x377b1a(0x9c)]||{},'lastEnabledSessionClearedAt':_0x4ccf72[_0x377b1a(0xbe)]};}}catch{}return createEmptyCache();}function saveCache(_0x5a611){const _0x570fd5=_0x1707be;try{const _0x4b4be8=_0x2d3ef7['dirname'](CACHE_FILE);!_0x10f078[_0x570fd5(0xa9)](_0x4b4be8)&&_0x10f078[_0x570fd5(0x9d)](_0x4b4be8,{'recursive':!![]}),_0x10f078[_0x570fd5(0xc3)](CACHE_FILE,JSON[_0x570fd5(0xb5)](_0x5a611,null,0x2));}catch{}}export function getCurrentBranch(){const _0x325cb7=_0x1707be,_0x299d9c={'XsxBO':function(_0x26d79e,_0x46cfa8,_0x344293){return _0x26d79e(_0x46cfa8,_0x344293);},'LOhYj':_0x325cb7(0xb6),'ntTxx':function(_0x3db124,_0x2fa9f2){return _0x3db124===_0x2fa9f2;}};try{const _0xf6d1ea=_0x299d9c['XsxBO'](execSync,_0x325cb7(0xb7),{'encoding':'utf-8','stdio':[_0x325cb7(0xb6),_0x325cb7(0xb6),_0x299d9c[_0x325cb7(0xb1)]]})[_0x325cb7(0xa7)]();if(!_0xf6d1ea||_0x299d9c[_0x325cb7(0xa4)](_0xf6d1ea,'HEAD'))return null;return _0xf6d1ea;}catch{return null;}}export function enableBranch(_0x515661){const _0x568491=_0x1707be,_0x2ae6e3={'YaWyH':function(_0x14f10f){return _0x14f10f();},'pyQlo':function(_0x62d873,_0x55fdb5){return _0x62d873(_0x55fdb5);}},_0x481c87=_0x2ae6e3[_0x568491(0xb8)](loadCache);_0x481c87['branches'][_0x515661]=!![],_0x2ae6e3['pyQlo'](saveCache,_0x481c87);}function _0x7be9(_0x5c1954,_0x46baad){_0x5c1954=_0x5c1954-0x94;const _0x2c27b0=_0x2c27();let _0x7be949=_0x2c27b0[_0x5c1954];return _0x7be949;}export function disableBranch(_0x4eb00e){const _0x12d575=_0x1707be,_0x445801={'DUiXl':function(_0xf09c53,_0x3da266){return _0xf09c53(_0x3da266);}},_0x5682a2=loadCache();delete _0x5682a2['branches'][_0x4eb00e],_0x445801[_0x12d575(0xa0)](saveCache,_0x5682a2);}export function isBranchEnabled(_0x21f4ba){const _0x3787f9={'lCOax':function(_0x58c490){return _0x58c490();}},_0x458bd8=_0x3787f9['lCOax'](loadCache);return _0x458bd8['branches'][_0x21f4ba]===!![];}function getOrCreateSession(_0x321dfe,_0x5dac92){const _0x269d00=_0x1707be;return!_0x321dfe[_0x269d00(0xcc)][_0x5dac92]&&(_0x321dfe[_0x269d00(0xcc)][_0x5dac92]={}),_0x321dfe[_0x269d00(0xcc)][_0x5dac92];}function _0x2c27(){const _0x5bd8fc=['git\x20rev-parse\x20--abbrev-ref\x20HEAD','YaWyH','lastPlanReminderAt','24609GqWMET','JEEOw','mQfrn','1111464ZeaXbj','lastEnabledSessionClearedAt','374672ocrmeU','2382uUaNIw','RIHtI','5MrKeBz','writeFileSync','nyEzh','currentBranch','16qEYtFw','iRGpY','VnYMq','now','Dehua','gEKIx','sessions','PXduR','rKNuA','lvffe','prompted','clear','3787YxKeQX','10TQIgcF','toISOString','dLUHz','CmDnk','enabled','branches','mkdirSync','IlKCe','registeredAt','DUiXl','1587600srPjDF','AtRwK','1767276OoYwFE','ntTxx','1425215uMsOQi','TEszP','trim','gFwsJ','existsSync','UgcEk','16wBDnVj','XguuK','lastStopReminderAt','homedir','beMNf','main','LOhYj','readFileSync','RlfNS','master','stringify','pipe'];_0x2c27=function(){return _0x5bd8fc;};return _0x2c27();}export function enableSession(_0x324286){const _0x406494=_0x1707be,_0x69dc76={'UgcEk':function(_0x534f58,_0x5b08af){return _0x534f58!==_0x5b08af;}},_0x5ce50f=loadCache(),_0x3800a5=getOrCreateSession(_0x5ce50f,_0x324286);_0x3800a5['enabled']=!![];const _0x460726=getCurrentBranch();_0x460726&&_0x460726!=='main'&&_0x69dc76[_0x406494(0xaa)](_0x460726,_0x406494(0xb4))&&(_0x5ce50f['branches'][_0x460726]=!![],_0x3800a5[_0x406494(0xc5)]=_0x460726),saveCache(_0x5ce50f);}export function isSessionEnabled(_0x327e84){const _0x5e530d=_0x1707be,_0x532af2={'mQfrn':function(_0x50d0cd,_0x419f65){return _0x50d0cd===_0x419f65;},'JEEOw':function(_0x320fe4,_0x5436b2){return _0x320fe4===_0x5436b2;},'OILnv':_0x5e530d(0xb4)},_0x109914=loadCache(),_0x12bc5e=getCurrentBranch();if(!_0x12bc5e||_0x532af2[_0x5e530d(0xbc)](_0x12bc5e,_0x5e530d(0xb0))||_0x532af2[_0x5e530d(0xbb)](_0x12bc5e,_0x532af2['OILnv']))return _0x532af2[_0x5e530d(0xbc)](_0x109914['sessions'][_0x327e84]?.['enabled'],!![]);const _0x1317f5=_0x532af2[_0x5e530d(0xbb)](_0x109914['branches'][_0x12bc5e],!![]),_0x70a428=_0x109914['sessions'][_0x327e84]?.['enabled']===!![];return _0x1317f5||_0x70a428;}export function disableSession(_0x1f7dc1){const _0x299c1f=_0x1707be,_0x3b826e={'kaLFg':function(_0x105cd9){return _0x105cd9();}},_0x5ebc62=_0x3b826e['kaLFg'](loadCache),_0x30a71a=getOrCreateSession(_0x5ebc62,_0x1f7dc1);_0x30a71a[_0x299c1f(0x9b)]=![],saveCache(_0x5ebc62);}export function updateBranchTracking(_0x45b8f2){const _0x4d035f=_0x1707be,_0x559302={'QvQOq':function(_0xa7c50f){return _0xa7c50f();},'jgLkg':function(_0x1e056d,_0x5df74d){return _0x1e056d===_0x5df74d;},'zNmVs':'main','RIHtI':'master','AtRwK':function(_0x19f490,_0x1343d2){return _0x19f490!==_0x1343d2;},'KLtcX':function(_0x5ad2a4,_0x322477){return _0x5ad2a4(_0x322477);}},_0x5d714c=loadCache(),_0x212338=_0x5d714c[_0x4d035f(0xcc)][_0x45b8f2];if(!_0x212338?.['enabled'])return;const _0x43da72=_0x559302['QvQOq'](getCurrentBranch);if(!_0x43da72||_0x559302['jgLkg'](_0x43da72,_0x559302['zNmVs'])||_0x43da72===_0x559302[_0x4d035f(0xc1)])return;_0x559302[_0x4d035f(0xa2)](_0x212338['currentBranch'],_0x43da72)&&(_0x5d714c[_0x4d035f(0x9c)][_0x43da72]=!![],_0x212338['currentBranch']=_0x43da72,_0x559302['KLtcX'](saveCache,_0x5d714c));}export function initBranchTracking(_0x5e2da9){const _0x2d845c=_0x1707be,_0x384d09={'Dehua':function(_0x980f13){return _0x980f13();},'LxddD':function(_0x2ce7ea,_0x43e2f4){return _0x2ce7ea===_0x43e2f4;},'IXNFH':'main','ZxBhj':function(_0x47b324,_0x986c3c){return _0x47b324===_0x986c3c;},'mBTbB':'master','DcAKH':function(_0x224126,_0x4335b2){return _0x224126===_0x4335b2;},'gEKIx':function(_0x18073a,_0x2522b2,_0x1cd929){return _0x18073a(_0x2522b2,_0x1cd929);}},_0x1e2482=_0x384d09[_0x2d845c(0xca)](loadCache),_0x51d64f=getCurrentBranch();if(!_0x51d64f||_0x384d09['LxddD'](_0x51d64f,_0x384d09['IXNFH'])||_0x384d09['ZxBhj'](_0x51d64f,_0x384d09['mBTbB']))return;if(_0x384d09['DcAKH'](_0x1e2482['branches'][_0x51d64f],!![])){const _0x462c9b=_0x384d09[_0x2d845c(0xcb)](getOrCreateSession,_0x1e2482,_0x5e2da9);_0x462c9b['enabled']=!![],_0x462c9b[_0x2d845c(0xc5)]=_0x51d64f,saveCache(_0x1e2482);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x4537e1){const _0x4f2160=_0x1707be,_0xc61403={'beMNf':function(_0x4a2793,_0x97368b){return _0x4a2793(_0x97368b);}},_0x1d221b=loadCache(),_0x1a10f7=_0x1d221b['sessions'][_0x4537e1];_0x1a10f7?.['enabled']&&(_0x1d221b['lastEnabledSessionClearedAt']=Date[_0x4f2160(0xc9)](),_0xc61403[_0x4f2160(0xaf)](saveCache,_0x1d221b));}export function shouldAutoEnableAfterClear(_0x3debc4){const _0x4d2497=_0x1707be,_0x3649e4={'VnYMq':function(_0x3ee756){return _0x3ee756();},'nyEzh':function(_0x1608d6,_0x35a131){return _0x1608d6<=_0x35a131;}};if(_0x3debc4!==_0x4d2497(0x95))return![];const _0x48af9b=_0x3649e4[_0x4d2497(0xc8)](loadCache),_0x429c8c=_0x48af9b['lastEnabledSessionClearedAt'];if(!_0x429c8c)return![];const _0x386cd3=Date['now']()-_0x429c8c;return _0x3649e4[_0x4d2497(0xc4)](_0x386cd3,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x421813){const _0x3118f4=_0x1707be,_0x552331={'iRGpY':function(_0x9e10eb,_0x5c8f40,_0x86eda9){return _0x9e10eb(_0x5c8f40,_0x86eda9);},'lvffe':function(_0x19fd54,_0x2d0ec5){return _0x19fd54!==_0x2d0ec5;},'tuhGR':_0x3118f4(0xb0),'RlfNS':'master','INdhJ':function(_0x4fee50,_0x37e045){return _0x4fee50(_0x37e045);}},_0x15502e=loadCache(),_0x5154f0=_0x552331[_0x3118f4(0xc7)](getOrCreateSession,_0x15502e,_0x421813);_0x5154f0[_0x3118f4(0x9b)]=!![];const _0x5e5bb0=getCurrentBranch();_0x5e5bb0&&_0x552331[_0x3118f4(0xcf)](_0x5e5bb0,_0x552331['tuhGR'])&&_0x5e5bb0!==_0x552331[_0x3118f4(0xb3)]&&(_0x5154f0[_0x3118f4(0xc5)]=_0x5e5bb0),delete _0x15502e[_0x3118f4(0xbe)],_0x552331['INdhJ'](saveCache,_0x15502e);}export function registerSession(_0x410254,_0x1e7df3){const _0x4a3284=_0x1707be,_0xdcb1c6={'VKeNy':function(_0x146c3c,_0x2834e0,_0x270cdc){return _0x146c3c(_0x2834e0,_0x270cdc);},'TEszP':function(_0x25860c,_0x18b12b){return _0x25860c(_0x18b12b);}},_0xc8ae5=loadCache(),_0x13ccaa=_0xdcb1c6['VKeNy'](getOrCreateSession,_0xc8ae5,_0x410254);_0x13ccaa['featureId']=_0x1e7df3,_0x13ccaa['registeredAt']=new Date()[_0x4a3284(0x98)](),_0xdcb1c6[_0x4a3284(0xa6)](saveCache,_0xc8ae5);}export function getSessionEntry(_0xe9cbc3){const _0x230fc3=_0x1707be,_0x433682=loadCache(),_0x31a52e=_0x433682[_0x230fc3(0xcc)][_0xe9cbc3];if(_0x31a52e?.['featureId']&&_0x31a52e?.[_0x230fc3(0x9f)])return{'featureId':_0x31a52e['featureId'],'registeredAt':_0x31a52e['registeredAt']};return null;}export function unregisterSession(_0x211336){const _0x139586=_0x1707be,_0x2eead2={'gFwsJ':function(_0x460f5b){return _0x460f5b();},'CmDnk':function(_0x1800dd,_0x36e10d){return _0x1800dd(_0x36e10d);}},_0x2e5272=_0x2eead2[_0x139586(0xa8)](loadCache),_0x1bc6fe=_0x2e5272['sessions'][_0x211336];_0x1bc6fe&&(delete _0x1bc6fe['featureId'],delete _0x1bc6fe['registeredAt'],_0x2eead2[_0x139586(0x9a)](saveCache,_0x2e5272));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x2b8eec){const _0x5002be=_0x1707be,_0x1a358e={'pPyPD':function(_0x49185d,_0x32cb20,_0x2de5c9){return _0x49185d(_0x32cb20,_0x2de5c9);},'UhgZk':function(_0x208d56,_0x221e80){return _0x208d56>=_0x221e80;}},_0x4ba089=loadCache(),_0x12c737=_0x1a358e['pPyPD'](getOrCreateSession,_0x4ba089,_0x2b8eec),_0x33f3cd=_0x12c737[_0x5002be(0xb9)]||0x0,_0x1aad0b=Date[_0x5002be(0xc9)]();if(_0x1a358e['UhgZk'](_0x1aad0b-_0x33f3cd,PLAN_REMINDER_INTERVAL_MS))return _0x12c737[_0x5002be(0xb9)]=_0x1aad0b,saveCache(_0x4ba089),!![];return![];}export function shouldShowStopReminder(_0x1b844d){const _0x5b8903=_0x1707be,_0x3874a7={'txHrJ':function(_0x12501c){return _0x12501c();},'rtDoJ':function(_0x39f497,_0x3ec295){return _0x39f497>=_0x3ec295;},'PXduR':function(_0x26ffe2,_0x5b3353){return _0x26ffe2(_0x5b3353);}},_0x1eb8ff=_0x3874a7['txHrJ'](loadCache),_0x35a048=getOrCreateSession(_0x1eb8ff,_0x1b844d),_0x2a35b6=_0x35a048[_0x5b8903(0xad)]||0x0,_0x2d94ee=Date[_0x5b8903(0xc9)]();if(_0x3874a7['rtDoJ'](_0x2d94ee-_0x2a35b6,STOP_REMINDER_INTERVAL_MS))return _0x35a048[_0x5b8903(0xad)]=_0x2d94ee,_0x3874a7[_0x5b8903(0xcd)](saveCache,_0x1eb8ff),!![];return![];}export function hasSessionBeenPrompted(_0x583be2){const _0x48edb7=_0x1707be,_0x54ef7f={'rKNuA':function(_0x37599a,_0x4bb172){return _0x37599a===_0x4bb172;}},_0x4b24fd=loadCache();return _0x54ef7f[_0x48edb7(0xce)](_0x4b24fd['sessions'][_0x583be2]?.[_0x48edb7(0x94)],!![]);}export function markSessionPrompted(_0x25e123){const _0x3e6f8b=_0x1707be,_0x1668c7={'XguuK':function(_0x18dcf0,_0x45aec7,_0x203590){return _0x18dcf0(_0x45aec7,_0x203590);},'IlKCe':function(_0x107d12,_0x2133fb){return _0x107d12(_0x2133fb);}},_0x337ca2=loadCache(),_0x3cf83d=_0x1668c7[_0x3e6f8b(0xac)](getOrCreateSession,_0x337ca2,_0x25e123);_0x3cf83d['prompted']=!![],_0x1668c7[_0x3e6f8b(0x9e)](saveCache,_0x337ca2);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x485763=_0x1386;(function(_0x398aa0,_0x14b647){const _0x4152c6=_0x1386,_0x2a8ca7=_0x398aa0();while(!![]){try{const _0x3851cf=parseInt(_0x4152c6(0xce))/0x1*(parseInt(_0x4152c6(0xa9))/0x2)+-parseInt(_0x4152c6(0xcb))/0x3*(parseInt(_0x4152c6(0xe2))/0x4)+parseInt(_0x4152c6(0x99))/0x5+parseInt(_0x4152c6(0x85))/0x6+-parseInt(_0x4152c6(0x90))/0x7+parseInt(_0x4152c6(0xba))/0x8*(parseInt(_0x4152c6(0x69))/0x9)+-parseInt(_0x4152c6(0xcf))/0xa;if(_0x3851cf===_0x14b647)break;else _0x2a8ca7['push'](_0x2a8ca7['shift']());}catch(_0x8f5961){_0x2a8ca7['push'](_0x2a8ca7['shift']());}}}(_0x5dc4,0xed208));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';function _0x1386(_0x5873e8,_0x6e0e63){_0x5873e8=_0x5873e8-0x68;const _0x5dc44c=_0x5dc4();let _0x138680=_0x5dc44c[_0x5873e8];return _0x138680;}import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x1ec7ab,_0x3dd90a){const _0x50d650=_0x1386,_0x564c3f={'LIUqU':function(_0x16b26a,_0x141a28,_0x15ec0c,_0x5f4443){return _0x16b26a(_0x141a28,_0x15ec0c,_0x5f4443);},'gAMhP':function(_0x2aa20a,_0x3309d2,_0x11b149,_0x15ecb6){return _0x2aa20a(_0x3309d2,_0x11b149,_0x15ecb6);},'fCNqP':'local','ATMBU':function(_0x58e3ae,_0x5eea5b,_0x5c035c){return _0x58e3ae(_0x5eea5b,_0x5c035c);},'ZODJc':function(_0x22d6ce,_0x521fc2,_0x103fc0){return _0x22d6ce(_0x521fc2,_0x103fc0);},'WZSCs':function(_0x56754e,_0x5304d0){return _0x56754e(_0x5304d0);},'LefSP':function(_0x1e4b69,_0x35b4cd){return _0x1e4b69(_0x35b4cd);},'LhYJJ':function(_0x2d2d68,_0x3f75ec){return _0x2d2d68!==_0x3f75ec;}},_0x1500e5=_0x564c3f[_0x50d650(0xc8)](join,_0x3dd90a,'ci',_0x1ec7ab),_0x33af3f=_0x564c3f[_0x50d650(0xc7)](join,_0x3dd90a,_0x564c3f[_0x50d650(0xdd)],_0x1ec7ab),_0x44bc9a=join(_0x3dd90a,_0x1ec7ab),_0x2a6020=_0x564c3f['ATMBU'](join,_0x3dd90a,_0x50d650(0xb0)),_0x4e7868=_0x564c3f[_0x50d650(0xa8)](join,_0x3dd90a,'ci');if(existsSync(_0x1500e5))return _0x1500e5;if(_0x564c3f['WZSCs'](existsSync,_0x33af3f))return _0x33af3f;if(_0x564c3f['LefSP'](existsSync,_0x44bc9a)&&(_0x44bc9a!==_0x2a6020&&_0x564c3f['LhYJJ'](_0x44bc9a,_0x4e7868)?!![]:hasLegacyProfileFiles(_0x44bc9a)))return _0x44bc9a;return null;}export function getEnvDir(_0x4535ed,_0x298c0a={}){const _0x3a9884=_0x1386,_0x17351d={'zAads':function(_0x2c2a2c,_0x436425){return _0x2c2a2c(_0x436425);},'bHRQA':function(_0x9fe0a2){return _0x9fe0a2();},'ecYVi':function(_0x2bbbac,_0x4ed75d,_0x3fb290){return _0x2bbbac(_0x4ed75d,_0x3fb290);}},_0x59e691=getRangerDir(),_0x32c333=findEnvInRoot(_0x4535ed,_0x59e691);if(_0x32c333){if(_0x298c0a[_0x3a9884(0xca)]&&_0x17351d['zAads'](isLegacyEnvPath,_0x32c333))throw legacyWriteError(_0x4535ed,_0x32c333);return _0x32c333;}const _0x1d7958=_0x17351d[_0x3a9884(0xb7)](getRangerHomeDir);if(_0x1d7958!==_0x59e691){const _0x386f96=findEnvInRoot(_0x4535ed,_0x1d7958);if(_0x386f96){if(_0x298c0a[_0x3a9884(0xca)]&&isLegacyEnvPath(_0x386f96))throw _0x17351d['ecYVi'](legacyWriteError,_0x4535ed,_0x386f96);return _0x386f96;}}const _0xe7b5ca=join(_0x1d7958,_0x3a9884(0xb0),_0x4535ed);if(_0x298c0a[_0x3a9884(0xca)])throw legacyWriteError(_0x4535ed,_0xe7b5ca);return _0xe7b5ca;}function isLegacyEnvPath(_0x51d030){const _0x1386fc=_0x1386,_0x88eb9c={'ODPJJ':function(_0x3f060c){return _0x3f060c();}},_0x138579=_0x88eb9c[_0x1386fc(0x74)](getRangerDir),_0x583636=getRangerHomeDir();for(const _0x44ae27 of new Set([_0x138579,_0x583636])){const _0x394a48=_0x44ae27['endsWith']('/')?_0x44ae27:_0x44ae27+'/';if(_0x51d030===_0x44ae27||_0x51d030[_0x1386fc(0x76)](_0x394a48))return!![];}return![];}function legacyWriteError(_0x1c197e,_0x563785){const _0x450c78=_0x1386,_0x4a736c={'HVkTG':function(_0x4451b9,_0x3e2f79){return _0x4451b9+_0x3e2f79;},'mYyig':function(_0xda5dd9,_0x5604ad){return _0xda5dd9+_0x5604ad;}};return new Error(_0x4a736c[_0x450c78(0xb9)](_0x4a736c[_0x450c78(0xb1)](_0x450c78(0x80)+_0x1c197e+'\x22\x20to\x20legacy\x20path\x20'+_0x563785+'.\x0a',_0x450c78(0x95)),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x217b87,_0x4f7327){const _0x233633=_0x1386,_0x302e63={'OJcLP':function(_0x3595a3){return _0x3595a3();},'pPRkm':'local','lAxXg':function(_0x551ab8,_0x538566,_0x4b2dad,_0x29ea2b){return _0x551ab8(_0x538566,_0x4b2dad,_0x29ea2b);},'ZccNE':function(_0x1c7b5b,_0x101359,_0xb5a429,_0x559f88){return _0x1c7b5b(_0x101359,_0xb5a429,_0x559f88);},'riADh':function(_0x482b70,_0x55ee00,_0x2b9bb2){return _0x482b70(_0x55ee00,_0x2b9bb2);},'pBEji':function(_0x5c6562,_0x4934d6){return _0x5c6562===_0x4934d6;}},_0xfc1a93=_0x4f7327?.['rangerDir'],_0x328893=_0xfc1a93?[_0xfc1a93]:[_0x302e63['OJcLP'](getRangerDir),getRangerHomeDir()][_0x233633(0x93)]((_0x22e753,_0x560ddb,_0x2ea255)=>_0x2ea255['indexOf'](_0x22e753)===_0x560ddb),_0xb906fd=_0x4f7327?.[_0x233633(0xa2)]??['ci',_0x302e63['pPRkm'],_0x233633(0xa1)];for(const _0x5a42b2 of _0x328893){const _0x3173a8=join(_0x5a42b2,_0x302e63['pPRkm']),_0x3a5538=join(_0x5a42b2,'ci'),_0x17e231=[{'location':'ci','path':_0x302e63[_0x233633(0x70)](join,_0x5a42b2,'ci',_0x217b87)},{'location':_0x233633(0xb0),'path':_0x302e63['ZccNE'](join,_0x5a42b2,'local',_0x217b87)},{'location':_0x233633(0xa1),'path':_0x302e63[_0x233633(0x84)](join,_0x5a42b2,_0x217b87)}];for(const _0x16a5bb of _0x17e231){if(_0xb906fd['includes'](_0x16a5bb[_0x233633(0xdb)])&&existsSync(_0x16a5bb['path'])){if(_0x16a5bb[_0x233633(0xdb)]===_0x233633(0xa1)&&(_0x302e63['pBEji'](_0x16a5bb[_0x233633(0xdf)],_0x3173a8)||_0x302e63['pBEji'](_0x16a5bb['path'],_0x3a5538))&&!hasLegacyProfileFiles(_0x16a5bb['path']))continue;return{'path':_0x16a5bb['path'],'location':_0x16a5bb[_0x233633(0xdb)]};}}}return null;}function hasLegacyProfileFiles(_0x3c596f){const _0x1f4a69=_0x1386,_0x43c443={'bzwMS':_0x1f4a69(0xdc),'dElJV':function(_0x317cb6,_0x1e20c5,_0x4bf3f5){return _0x317cb6(_0x1e20c5,_0x4bf3f5);},'mbWBi':'auth.json'};return existsSync(join(_0x3c596f,_0x43c443['bzwMS']))||existsSync(_0x43c443[_0x1f4a69(0xd9)](join,_0x3c596f,_0x43c443[_0x1f4a69(0xde)]))||existsSync(join(_0x3c596f,'auth.json.enc'));}export function isEnvCi(_0x53419e){const _0x14dbab={'toUhx':function(_0x3f4f8f,_0x408777,_0x9c2a40,_0x477636){return _0x3f4f8f(_0x408777,_0x9c2a40,_0x477636);}};if(existsSync(_0x14dbab['toUhx'](join,getRangerDir(),'ci',_0x53419e)))return!![];const _0x41524c=getRangerHomeDir();if(_0x41524c!==getRangerDir()&&existsSync(join(_0x41524c,'ci',_0x53419e)))return!![];return![];}export async function cleanupTempFiles(_0x51e9f0){const _0x4aa4c1=_0x1386,_0x37ecb4=[_0x51e9f0[_0x4aa4c1(0xbf)],_0x51e9f0[_0x4aa4c1(0x71)]]['filter'](Boolean);await Promise[_0x4aa4c1(0xc5)](_0x37ecb4['map'](_0x360094=>unlink(_0x360094)[_0x4aa4c1(0xa0)](_0x4b2d97=>{const _0x1fa07c=_0x4aa4c1;_0x4b2d97['code']!==_0x1fa07c(0x6b)&&console[_0x1fa07c(0xc0)](_0x1fa07c(0x6f)+_0x360094+':',_0x4b2d97[_0x1fa07c(0xae)]);})));}export function getSettingsPath(_0x3c6eb2){const _0x16809e=_0x1386,_0x452448={'pWUhf':_0x16809e(0xdc)};return join(getEnvDir(_0x3c6eb2),_0x452448[_0x16809e(0x9b)]);}export async function loadSettings(_0x5bbeb6){const _0x17712b=_0x1386,_0xe5ef1f={'fuAyz':function(_0x5c78c5,_0x6a7222){return _0x5c78c5(_0x6a7222);},'xhDqw':_0x17712b(0x68)},_0x4b0a3a=getSettingsPath(_0x5bbeb6);if(!_0xe5ef1f['fuAyz'](existsSync,_0x4b0a3a))return{};try{const _0x2c212d=await readFile(_0x4b0a3a,_0xe5ef1f[_0x17712b(0x81)]);return JSON[_0x17712b(0x94)](_0x2c212d);}catch{return{};}}export async function saveSettings(_0x1c38bf,_0x304487){const _0x511b07=_0x1386,_0x34ce2a={'MjWyN':function(_0x4d95cc,_0x5163bc,_0xe877c2){return _0x4d95cc(_0x5163bc,_0xe877c2);}},_0x84d160=getSettingsPath(_0x1c38bf),_0x1ad168=dirname(_0x84d160);!existsSync(_0x1ad168)&&await _0x34ce2a['MjWyN'](mkdir,_0x1ad168,{'recursive':!![]}),await writeFile(_0x84d160,JSON[_0x511b07(0xd1)](_0x304487,null,0x2));}export function resolveEnvVars(_0x1fa2a3){const _0x489128=_0x1386,_0x255523={'pANUK':function(_0x384a65,_0x1f4a84){return _0x384a65===_0x1f4a84;},'HpWPY':_0x489128(0xa3),'OxMsF':function(_0xfd1486,_0x475bc3){return _0xfd1486===_0x475bc3;},'UhPNx':_0x489128(0x88)};if(typeof _0x1fa2a3===_0x255523['HpWPY'])return _0x1fa2a3['replace'](/\$\{(\w+)\}/g,(_0x3148f1,_0x29f27a)=>{const _0x40eb71=_0x489128,_0x2c143d=process['env'][_0x29f27a];if(_0x255523[_0x40eb71(0x97)](_0x2c143d,undefined))throw new Error('Environment\x20variable\x20'+_0x29f27a+_0x40eb71(0x73));return _0x2c143d;});if(Array[_0x489128(0xd5)](_0x1fa2a3))return _0x1fa2a3['map'](resolveEnvVars);if(_0x1fa2a3&&_0x255523['OxMsF'](typeof _0x1fa2a3,_0x255523['UhPNx']))return Object['fromEntries'](Object[_0x489128(0xb3)](_0x1fa2a3)['map'](([_0x59da5b,_0x41dc1f])=>[_0x59da5b,resolveEnvVars(_0x41dc1f)]));return _0x1fa2a3;}const isRecord=_0x2c1576=>typeof _0x2c1576===_0x485763(0x88)&&_0x2c1576!==null&&!Array[_0x485763(0xd5)](_0x2c1576),asRecord=_0x220b61=>isRecord(_0x220b61)?_0x220b61:undefined,mergeHeaders=(_0xad600a,_0x20306e)=>{const _0x504e0b=_0x485763,_0xc90307={'XzWoa':function(_0x559d71,_0x3d432a){return _0x559d71??_0x3d432a;}},_0x1bf8d6={..._0xc90307[_0x504e0b(0x79)](_0xad600a,{}),..._0x20306e??{}};return Object[_0x504e0b(0x9d)](_0x1bf8d6)[_0x504e0b(0xaf)]?_0x1bf8d6:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x485763(0x9c),'--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x485763(0xc4)];export function buildBrowserOptionsFromSettings(_0x481b06,_0x18776d={}){const _0x598f03=_0x485763,_0x18c162={'rrytq':function(_0x5d82dc,_0x4ce013){return _0x5d82dc(_0x4ce013);},'QSqxD':function(_0xef3206,_0x305f40){return _0xef3206===_0x305f40;},'VJrNy':function(_0x13f4dc,_0x4ac951){return _0x13f4dc(_0x4ac951);}},_0x5e789f=asRecord(_0x481b06[_0x598f03(0xa6)]),_0x318264={...asRecord(_0x5e789f?.['launchOptions'])??{}};typeof _0x18776d[_0x598f03(0x8a)]===_0x598f03(0x96)&&(_0x318264['headless']=_0x18776d[_0x598f03(0x8a)]);if(_0x481b06[_0x598f03(0xbd)]){const _0x1adb76=_0x318264['args']??[],_0x4d9f46=SAFE_MODE_ARGS[_0x598f03(0x93)](_0x890f19=>!_0x1adb76['includes'](_0x890f19));_0x318264['args']=[..._0x1adb76,..._0x4d9f46];}if(_0x481b06[_0x598f03(0x82)]){const _0x4fca33=_0x318264['args']??[],_0x4633be=ALLOW_LOCALHOST_ARGS['filter'](_0x3d6908=>!_0x4fca33[_0x598f03(0xa7)](_0x3d6908));_0x318264['args']=[..._0x4fca33,..._0x4633be];}const _0x74ec7f={..._0x18c162['rrytq'](asRecord,_0x5e789f?.[_0x598f03(0x7d)])??{}};_0x74ec7f[_0x598f03(0x8c)]=!![];_0x18c162[_0x598f03(0xd3)](typeof _0x481b06['userAgent'],'string')&&(_0x74ec7f['userAgent']=_0x481b06['userAgent']);const _0x1f8124=mergeHeaders(_0x18c162[_0x598f03(0x92)](asRecord,_0x74ec7f['extraHTTPHeaders']),asRecord(_0x481b06[_0x598f03(0xbe)]));return _0x1f8124?_0x74ec7f['extraHTTPHeaders']=_0x1f8124:delete _0x74ec7f[_0x598f03(0xb4)],_0x18776d['storageStatePath']&&(_0x74ec7f[_0x598f03(0xc2)]=_0x18776d['storageStatePath']),{'launchOptions':_0x318264,'contextOptions':_0x74ec7f};}export async function resolveProfileStorageState(_0x555461){const _0x2376d6=_0x485763,_0x53c2f3={'zQMKL':function(_0x4b4b5b,_0x3b0574){return _0x4b4b5b(_0x3b0574);}};return _0x53c2f3[_0x2376d6(0xac)](resolveLocalAuthPath,getEnvDir(_0x555461));}async function resolveLocalAuthPath(_0x1fb1ef){const _0x3fe05a=_0x485763,_0x272105={'OyFoQ':_0x3fe05a(0x7f),'hrPlw':function(_0xb7fb1b,_0x555ba4){return _0xb7fb1b(_0x555ba4);},'lQYoZ':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','nFfIU':function(_0x15a6f3){return _0x15a6f3();},'uePwy':function(_0x4f567f,_0x4a3e80,_0x580ed1){return _0x4f567f(_0x4a3e80,_0x580ed1);}},_0x37ea50=join(_0x1fb1ef,_0x272105[_0x3fe05a(0xd8)]),_0x389ec3=join(_0x1fb1ef,'auth.json');if(_0x272105['hrPlw'](existsSync,_0x37ea50))try{const _0x307ae3=await getToken();if(!_0x307ae3)throw new Error(_0x272105[_0x3fe05a(0xa5)]);const _0x40de96=await readFile(_0x37ea50),_0x2f5b6f=decrypt(_0x40de96,_0x307ae3),_0x285761=join(_0x272105[_0x3fe05a(0x7e)](tmpdir),'ranger-auth-'+Date[_0x3fe05a(0x77)]()+'.json');return await _0x272105['uePwy'](writeFile,_0x285761,_0x2f5b6f),{'storageStatePath':_0x285761,'tempAuthPath':_0x285761};}catch(_0x37e868){const _0x1e3dbf=_0x37e868 instanceof Error?_0x37e868[_0x3fe05a(0xae)]:String(_0x37e868);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x1e3dbf);}if(existsSync(_0x389ec3))return{'storageStatePath':_0x389ec3};return{};}function _0x5dc4(){const _0x1898c1=['ZODJc','10278XqzDbR','tabs','Default','zQMKL','repeat','message','length','local','mYyig','TwvQQ','entries','extraHTTPHeaders','userAgent','sessions','bHRQA','ranger-config','HVkTG','184LzcKNm','NhyJZ','Sfruq','safeMode','headers','tempAuthPath','warn','zQrtZ','storageState','.json','--allow-insecure-localhost','all','core','gAMhP','LIUqU','cGMyn','forWrite','15vQvtBX','npdrC','ydOTp','342LjPwsR','18196180KEUzde','split','stringify','allow','QSqxD','NPXsF','isArray','hYVbm','clipboard-write','OyFoQ','dElJV','--disable-setuid-sandbox','location','settings.json','fCNqP','mbWBi','path','SQWap','rxRDh','582476mTQalo','args','utf-8','76527DEsVBD','KPGHz','ENOENT','uYrKE','qFquy','getuid','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','lAxXg','configPath','qosXL','\x20is\x20not\x20set','ODPJJ','DrTIV','startsWith','now','EzDcM','XzWoa','executablePath','nJseu','vision','contextOptions','nFfIU','auth.json.enc','Refusing\x20to\x20write\x20profile\x20\x22','xhDqw','allowInsecureLocalhost','GFKjt','riADh','2241966AqRpST','eSsku','pYWOG','object','install','headless','stagehand','ignoreHTTPSErrors','JIcrT','ehyFw','playwright-cli','529683tcrcmm','baseUrl','VJrNy','filter','parse','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','boolean','pANUK','cdpEndpoint','6339430jMYoka','push','pWUhf','--disable-web-security','keys','wVCuK','RXMtJ','catch','legacy','locations','string','kpaft','lQYoZ','browser','includes'];_0x5dc4=function(){return _0x1898c1;};return _0x5dc4();}export async function buildPlaywrightConfig(_0x3e200a,_0x2a3381,_0x3e244b,_0x35c39b,_0x5a5214){const _0x399896=_0x485763,_0x100a4b={'rxRDh':function(_0x197639,_0x1d5d39){return _0x197639(_0x1d5d39);},'LxIRc':'stagehand','npdrC':function(_0x32e6c1,_0x5347e3){return _0x32e6c1(_0x5347e3);}};if(_0x5a5214)return buildPlaywrightConfigCore(_0x3e200a,_0x5a5214,_0x2a3381,_0x3e244b,_0x35c39b,_0x399896(0x8b));const {storageStatePath:_0x3d3093,tempAuthPath:_0x5ed3e1}=await _0x100a4b[_0x399896(0xe1)](resolveLocalAuthPath,_0x100a4b['rxRDh'](getEnvDir,_0x2a3381));try{const _0x2ad63b=await buildPlaywrightConfigCore(_0x3e200a,_0x3d3093,_0x2a3381,_0x3e244b,_0x35c39b,_0x100a4b['LxIRc']);return{..._0x2ad63b,'tempAuthPath':_0x5ed3e1};}catch(_0x53f3c7){_0x5ed3e1&&await _0x100a4b[_0x399896(0xcc)](unlink,_0x5ed3e1)[_0x399896(0xa0)](()=>{});throw _0x53f3c7;}}export async function buildPlaywrightConfigCore(_0x2a5653,_0x30af50,_0x2a186f,_0x2d7dff,_0x1fd4e1,_0x5dcb18=_0x485763(0x8b)){const _0x5c81eb=_0x485763,_0x47224a={'ydOTp':function(_0x305756,_0x47b733,_0x3bf289){return _0x305756(_0x47b733,_0x3bf289);},'OyfFe':'chromium','NhyJZ':'clipboard-read','zQLkP':_0x5c81eb(0xd7),'eSsku':_0x5c81eb(0xb6),'ehyFw':function(_0x37310b,_0x47e46b){return _0x37310b(_0x47e46b);},'sVYHg':'file','TwvQQ':'none','kZuYd':_0x5c81eb(0x89),'dizKY':function(_0x3465a9,_0x1cf2fe){return _0x3465a9===_0x1cf2fe;},'fqMda':function(_0x5baffc){return _0x5baffc();},'WmXOV':'ranger-config','zQrtZ':function(_0x11b5ce,_0x595a3e){return _0x11b5ce(_0x595a3e);},'FYITe':function(_0x4b2853,_0x2c507a){return _0x4b2853===_0x2c507a;},'GFKjt':'playwright-cli'},_0x565ecd=_0x2d7dff||randomUUID(),_0xdb4732=join(getRangerDir(),_0x47224a[_0x5c81eb(0x86)],_0x565ecd),_0x3a952a=_0x47224a[_0x5c81eb(0x8e)](Boolean,_0x2a5653[_0x5c81eb(0x98)]),_0x546f68=_0x3a952a?{'browserName':_0x47224a['OyfFe'],'cdpEndpoint':_0x2a5653['cdpEndpoint']}:((()=>{const _0x43027f=_0x5c81eb,{launchOptions:_0x31e7d3,contextOptions:_0x95e168}=_0x47224a[_0x43027f(0xcd)](buildBrowserOptionsFromSettings,_0x2a5653,{'headless':_0x1fd4e1?![]:_0x2a5653['headless']??!![],'storageStatePath':_0x30af50});if(process[_0x43027f(0x6e)]?.()===0x0){const _0x41ae95=['--no-sandbox',_0x43027f(0xda)],_0x3be7c3=_0x31e7d3[_0x43027f(0xe3)]??[],_0x5d57ce=_0x41ae95[_0x43027f(0x93)](_0x1600d2=>!_0x3be7c3[_0x43027f(0xa7)](_0x1600d2));_0x31e7d3[_0x43027f(0xe3)]=[..._0x3be7c3,..._0x5d57ce];}return{'isolated':!![],'browserName':_0x47224a['OyfFe'],'launchOptions':_0x31e7d3,'contextOptions':{..._0x95e168,'permissions':[_0x47224a[_0x43027f(0xbb)],_0x47224a['zQLkP']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x274bdc=_0x5dcb18==='playwright-cli'?{'browser':_0x546f68,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xdb4732,'outputMode':_0x47224a['sVYHg'],'codegen':_0x47224a[_0x5c81eb(0xb2)]}:{'name':_0x2a186f,'browser':_0x546f68,'capabilities':[_0x5c81eb(0xc6),_0x5c81eb(0xaa),_0x47224a['kZuYd'],'pdf',_0x5c81eb(0x7c)],'imageResponses':_0x5c81eb(0xd2),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0xdb4732};if(!_0x3a952a){const _0x4b7c56=_0x274bdc['browser'],_0x2ad42a=_0x4b7c56[_0x5c81eb(0x7d)];if(_0x47224a['dizKY'](_0x2ad42a['userAgent'],undefined))delete _0x2ad42a[_0x5c81eb(0xb5)];if(_0x2ad42a[_0x5c81eb(0xc2)]===undefined)delete _0x2ad42a[_0x5c81eb(0xc2)];}const _0x217e4f=_0x47224a['ydOTp'](join,_0x47224a['fqMda'](tmpdir),_0x47224a['WmXOV']);!_0x47224a[_0x5c81eb(0xc1)](existsSync,_0x217e4f)&&await _0x47224a['ydOTp'](mkdir,_0x217e4f,{'recursive':!![]});const _0x5f1731=_0x47224a['FYITe'](_0x5dcb18,_0x47224a[_0x5c81eb(0x83)])?'-cli':'',_0x13cd0a=join(_0x217e4f,_0x2a186f+'-'+Date['now']()+_0x5f1731+_0x5c81eb(0xc3));return await writeFile(_0x13cd0a,JSON['stringify'](_0x274bdc,null,0x2)),{'configPath':_0x13cd0a,'storageStatePath':_0x30af50};}export async function buildPlaywrightCliConfig(_0x295191,_0x32a185,_0x116946,_0x4b4895,_0x40ae34){const _0xee7a7f=_0x485763,_0x3eee45={'zkmsa':function(_0x16267f,_0x5b37b2){return _0x16267f(_0x5b37b2);}};if(_0x40ae34)return buildPlaywrightConfigCore(_0x295191,_0x40ae34,_0x32a185,_0x116946,_0x4b4895,'playwright-cli');const {storageStatePath:_0xe05ccf,tempAuthPath:_0x2d00e5}=await resolveLocalAuthPath(getEnvDir(_0x32a185));try{const _0xeed2aa=await buildPlaywrightConfigCore(_0x295191,_0xe05ccf,_0x32a185,_0x116946,_0x4b4895,_0xee7a7f(0x8f));return{..._0xeed2aa,'tempAuthPath':_0x2d00e5};}catch(_0x278335){_0x2d00e5&&await _0x3eee45['zkmsa'](unlink,_0x2d00e5)['catch'](()=>{});throw _0x278335;}}export async function buildRangerwrightCliConfig(_0x46067a,_0x4da3ea,_0x170f30,_0x5cd157,_0x2515db){const _0x41ea90=_0x485763,_0x2de537={'eAGrW':'--no-sandbox','KPGHz':_0x41ea90(0xda),'pYWOG':_0x41ea90(0xd7),'qosXL':function(_0x2c52ef,_0x1bb9df){return _0x2c52ef(_0x1bb9df);},'wVCuK':function(_0x1675e4,_0x1ed073){return _0x1675e4(_0x1ed073);},'UeqlT':function(_0x1b35e1){return _0x1b35e1();},'UtYIX':function(_0x249a22,_0x5c111d){return _0x249a22===_0x5c111d;},'RXMtJ':function(_0x4d2bd7,_0x1684d0){return _0x4d2bd7===_0x1684d0;}},{storageStatePath:_0x304379,tempAuthPath:_0x1e9f7d}=_0x2515db?{'storageStatePath':_0x2515db,'tempAuthPath':undefined}:await _0x2de537[_0x41ea90(0x72)](resolveLocalAuthPath,_0x2de537[_0x41ea90(0x9e)](getEnvDir,_0x4da3ea)),_0x2e8e19=_0x170f30||randomUUID(),_0x4af618=join(_0x2de537['UeqlT'](getRangerDir),'sessions',_0x2e8e19),_0x14c9d8=Boolean(_0x46067a['cdpEndpoint']),_0x246f15=_0x14c9d8?{'browserName':'chromium','cdpEndpoint':_0x46067a['cdpEndpoint']}:((()=>{const _0x85a784=_0x41ea90,{launchOptions:_0x2ab429,contextOptions:_0x12f090}=buildBrowserOptionsFromSettings(_0x46067a,{'headless':_0x5cd157?![]:_0x46067a[_0x85a784(0x8a)]??!![],'storageStatePath':_0x304379});if(process[_0x85a784(0x6e)]?.()===0x0){const _0x1c001d=[_0x2de537['eAGrW'],_0x2de537[_0x85a784(0x6a)]],_0x36d317=_0x2ab429[_0x85a784(0xe3)]??[],_0x4c1e93=_0x1c001d['filter'](_0x559154=>!_0x36d317[_0x85a784(0xa7)](_0x559154));_0x2ab429['args']=[..._0x36d317,..._0x4c1e93];}return{'browserName':'chromium','launchOptions':_0x2ab429,'contextOptions':{..._0x12f090,'permissions':['clipboard-read',_0x2de537[_0x85a784(0x87)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x14c9d8){const _0x212479=_0x246f15['contextOptions'];if(_0x212479){if(_0x2de537['UtYIX'](_0x212479['userAgent'],undefined))delete _0x212479['userAgent'];if(_0x2de537[_0x41ea90(0x9f)](_0x212479['storageState'],undefined))delete _0x212479[_0x41ea90(0xc2)];}}const _0x2ea2c2={'browser':_0x246f15,'outputDir':_0x4af618,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x13b4ca;try{const _0x5b7d37=join(tmpdir(),_0x41ea90(0xb8));!existsSync(_0x5b7d37)&&await mkdir(_0x5b7d37,{'recursive':!![]}),_0x13b4ca=join(_0x5b7d37,_0x4da3ea+'-'+Date[_0x41ea90(0x77)]()+'-rangerwright.json'),await writeFile(_0x13b4ca,JSON[_0x41ea90(0xd1)](_0x2ea2c2,null,0x2));}catch(_0x1b26c8){_0x1e9f7d&&await _0x2de537[_0x41ea90(0x9e)](unlink,_0x1e9f7d)['catch'](()=>{});throw _0x1b26c8;}return{'configPath':_0x13b4ca,'storageStatePath':_0x304379,'tempAuthPath':_0x1e9f7d,'outputDir':_0x4af618};}export async function buildNovaActCliConfig(_0xe549e3,_0x47b3e6,_0x5f273c,_0x1406c4,_0x4d129b){const _0x434633=_0x485763,_0xcf610={'buiYl':function(_0x503d94,_0xcb64f){return _0x503d94(_0xcb64f);},'DrTIV':function(_0x2bbc92,_0x374c35,_0xc4357b,_0x102983){return _0x2bbc92(_0x374c35,_0xc4357b,_0x102983);},'iHfWZ':_0x434633(0xb6),'hYVbm':function(_0x42526d,_0x4844b,_0xa4bd32){return _0x42526d(_0x4844b,_0xa4bd32);},'IFKra':'nova-user-data','cGMyn':_0x434633(0xab),'nJseu':function(_0x2f7aff,_0x42efd2,_0x5244ec){return _0x2f7aff(_0x42efd2,_0x5244ec);},'uYrKE':'--no-sandbox','DsoGS':function(_0x2516e5,_0x364aa2){return _0x2516e5===_0x364aa2;}},{storageStatePath:_0x40f78b,tempAuthPath:_0x10c82c}=_0x4d129b?{'storageStatePath':_0x4d129b,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0xcf610['buiYl'](getEnvDir,_0x47b3e6)),_0x237fed=_0x5f273c||randomUUID(),_0x1f45be=_0xcf610[_0x434633(0x75)](join,getRangerDir(),_0xcf610['iHfWZ'],_0x237fed),_0x10f39e=_0xcf610[_0x434633(0xd6)](join,_0x1f45be,_0xcf610['IFKra']),_0x465c68=_0x40f78b?_0xcf610[_0x434633(0xd6)](join,_0x10f39e,_0xcf610[_0x434633(0xc9)]):undefined,{launchOptions:_0x453520,contextOptions:_0x491358}=_0xcf610[_0x434633(0x7b)](buildBrowserOptionsFromSettings,_0xe549e3,{'headless':_0x1406c4?![]:_0xe549e3[_0x434633(0x8a)]??!![],'storageStatePath':_0x40f78b});if(process[_0x434633(0x6e)]?.()===0x0){const _0x3b3665=[_0xcf610[_0x434633(0x6c)],_0x434633(0xda)],_0x54580=_0x453520[_0x434633(0xe3)]??[],_0x2077ff=_0x3b3665['filter'](_0x53a115=>!_0x54580['includes'](_0x53a115));_0x453520['args']=[..._0x54580,..._0x2077ff];}const _0x218c2e=_0xcf610['DsoGS'](typeof _0x453520[_0x434633(0x7a)],_0x434633(0xa3))?_0x453520['executablePath']:_0x40f78b?chromium[_0x434633(0x7a)]():undefined;return{'storageStatePath':_0x40f78b,'tempAuthPath':_0x10c82c,'baseUrl':_0xe549e3[_0x434633(0x91)],'headless':Boolean(_0x453520[_0x434633(0x8a)]),'userDataDir':_0x10f39e,'browserProfilePath':_0x465c68,'executablePath':_0x218c2e,'launchArgs':Array[_0x434633(0xd5)](_0x453520['args'])?_0x453520['args']['filter'](_0xcacd6e=>typeof _0xcacd6e===_0x434633(0xa3)):[],'userAgent':typeof _0x491358[_0x434633(0xb5)]==='string'?_0x491358['userAgent']:undefined,'extraHTTPHeaders':_0x491358['extraHTTPHeaders'],'allowInsecureLocalhost':Boolean(_0xe549e3['allowInsecureLocalhost']),'safeMode':Boolean(_0xe549e3[_0x434633(0xbd)]),'cdpEndpoint':_0xe549e3[_0x434633(0x98)],'isCdpMode':Boolean(_0xe549e3['cdpEndpoint'])};}export function getNestedValue(_0x116c23,_0x8d228a){const _0x52ac14=_0x485763,_0x36838c={'JREsy':function(_0x9a07e5,_0x18658c){return _0x9a07e5(_0x18658c);},'rvDjb':function(_0xdbbf24,_0x5f1cf9){return _0xdbbf24===_0x5f1cf9;},'qwDPT':function(_0x1b6def,_0x43f36e){return _0x1b6def!==_0x43f36e;},'NPXsF':'object'},_0x27f71a=_0x36838c['JREsy'](parseKeyPath,_0x8d228a);let _0x6c52a8=_0x116c23;for(const _0x43db82 of _0x27f71a){if(_0x36838c['rvDjb'](_0x6c52a8,null)||_0x36838c['rvDjb'](_0x6c52a8,undefined)||_0x36838c['qwDPT'](typeof _0x6c52a8,_0x36838c[_0x52ac14(0xd4)]))return undefined;_0x6c52a8=_0x6c52a8[_0x43db82];}return _0x6c52a8;}export function setNestedValue(_0x51269c,_0x576537,_0x156c62){const _0xbd4d8a=_0x485763,_0x958810={'kpaft':function(_0x3e2aef,_0x2bbdea){return _0x3e2aef<_0x2bbdea;},'jNbMU':function(_0x3db426,_0xd8b624){return _0x3db426!==_0xd8b624;},'OScLB':function(_0xc7133,_0xeed11a){return _0xc7133-_0xeed11a;}},_0x1e7d71=parseKeyPath(_0x576537);let _0x499deb=_0x51269c;for(let _0x1cd261=0x0;_0x958810[_0xbd4d8a(0xa4)](_0x1cd261,_0x1e7d71['length']-0x1);_0x1cd261++){const _0x34bf1c=_0x1e7d71[_0x1cd261];(!(_0x34bf1c in _0x499deb)||_0x958810['jNbMU'](typeof _0x499deb[_0x34bf1c],_0xbd4d8a(0x88)))&&(_0x499deb[_0x34bf1c]={}),_0x499deb=_0x499deb[_0x34bf1c];}_0x499deb[_0x1e7d71[_0x958810['OScLB'](_0x1e7d71['length'],0x1)]]=_0x156c62;}export function deleteNestedValue(_0x59f57d,_0x5195a4){const _0x2bcb82=_0x485763,_0x39e1d={'vcVlx':function(_0x292bcb,_0x2d6b6e){return _0x292bcb(_0x2d6b6e);},'JIcrT':function(_0x20728f,_0x230b4c){return _0x20728f-_0x230b4c;},'SQWap':function(_0x2a6930,_0x772a06){return _0x2a6930===_0x772a06;},'tLipw':function(_0x53a209,_0x55594d){return _0x53a209===_0x55594d;},'nDuTr':'object','Sfruq':function(_0x90437e,_0x35a5a4){return _0x90437e in _0x35a5a4;}},_0x2e7100=_0x39e1d['vcVlx'](parseKeyPath,_0x5195a4);let _0x161704=_0x59f57d;for(let _0x27fe6f=0x0;_0x27fe6f<_0x39e1d[_0x2bcb82(0x8d)](_0x2e7100[_0x2bcb82(0xaf)],0x1);_0x27fe6f++){if(_0x161704===null||_0x39e1d[_0x2bcb82(0xe0)](_0x161704,undefined)||typeof _0x161704!==_0x2bcb82(0x88))return![];_0x161704=_0x161704[_0x2e7100[_0x27fe6f]];}if(_0x39e1d[_0x2bcb82(0xe0)](_0x161704,null)||_0x39e1d['tLipw'](_0x161704,undefined)||typeof _0x161704!==_0x39e1d['nDuTr'])return![];const _0x183d69=_0x2e7100[_0x2e7100[_0x2bcb82(0xaf)]-0x1];if(_0x39e1d[_0x2bcb82(0xbc)](_0x183d69,_0x161704))return delete _0x161704[_0x183d69],!![];return![];}function parseKeyPath(_0xaa98cd){const _0x30c9ea=_0x485763,_0x1a206b={'EzDcM':function(_0x3488dc,_0x29aa19){return _0x3488dc===_0x29aa19;},'KNlmS':'header','zXxRT':'setupHeader','qBRPn':'setupHeaders'},_0x5ead7f=_0xaa98cd[_0x30c9ea(0xd0)]('.');return _0x1a206b[_0x30c9ea(0x78)](_0x5ead7f[0x0],_0x1a206b['KNlmS'])&&(_0x5ead7f[0x0]=_0x30c9ea(0xbe)),_0x5ead7f[0x0]===_0x1a206b['zXxRT']&&(_0x5ead7f[0x0]=_0x1a206b['qBRPn']),_0x5ead7f;}export function formatSettings(_0x10cb0c,_0x2f065b=0x0){const _0x187bba=_0x485763,_0x4cefda={'qFquy':function(_0x420aef,_0x5f5397){return _0x420aef===_0x5f5397;},'yPZmt':function(_0x175db6,_0x2d564b){return _0x175db6!==_0x2d564b;}},_0xfad7b4=[],_0x7ff751='\x20\x20'[_0x187bba(0xad)](_0x2f065b);for(const [_0x531ba2,_0x26d62d]of Object[_0x187bba(0xb3)](_0x10cb0c)){if(_0x26d62d===undefined)continue;if(_0x4cefda[_0x187bba(0x6d)](typeof _0x26d62d,_0x187bba(0x88))&&_0x4cefda['yPZmt'](_0x26d62d,null)){_0xfad7b4[_0x187bba(0x9a)](''+_0x7ff751+_0x531ba2+':');for(const [_0xd5a71b,_0x243e89]of Object[_0x187bba(0xb3)](_0x26d62d)){_0xfad7b4[_0x187bba(0x9a)](_0x7ff751+'\x20\x20'+_0xd5a71b+':\x20'+_0x243e89);}}else _0xfad7b4['push'](''+_0x7ff751+_0x531ba2+':\x20'+_0x26d62d);}return _0xfad7b4['join']('\x0a');}
|
|
1
|
+
const _0xf34d34=_0x46d7;(function(_0x3430f1,_0x1073e5){const _0x15d959=_0x46d7,_0x33b022=_0x3430f1();while(!![]){try{const _0x58ca6b=parseInt(_0x15d959(0x188))/0x1*(-parseInt(_0x15d959(0x198))/0x2)+parseInt(_0x15d959(0x190))/0x3*(parseInt(_0x15d959(0x166))/0x4)+-parseInt(_0x15d959(0x1bb))/0x5+parseInt(_0x15d959(0x180))/0x6+parseInt(_0x15d959(0x1af))/0x7*(-parseInt(_0x15d959(0x164))/0x8)+parseInt(_0x15d959(0x1be))/0x9*(parseInt(_0x15d959(0x17d))/0xa)+parseInt(_0x15d959(0x1b0))/0xb*(parseInt(_0x15d959(0x1a5))/0xc);if(_0x58ca6b===_0x1073e5)break;else _0x33b022['push'](_0x33b022['shift']());}catch(_0x372f7b){_0x33b022['push'](_0x33b022['shift']());}}}(_0x3529,0x5b4a0));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';function _0x46d7(_0x2542d2,_0xd075b){_0x2542d2=_0x2542d2-0x150;const _0x3529d3=_0x3529();let _0x46d7f2=_0x3529d3[_0x2542d2];return _0x46d7f2;}import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x1c8736,_0x34867a){const _0x7d4c44=_0x46d7,_0x36d3ba={'UAAKn':function(_0x49699b,_0x49d2c4,_0x37285e,_0x511879){return _0x49699b(_0x49d2c4,_0x37285e,_0x511879);},'xwklg':_0x7d4c44(0x172),'lnJel':function(_0x2d0ddc,_0x499d35){return _0x2d0ddc(_0x499d35);},'vflkR':function(_0x1e101d,_0x3e6019){return _0x1e101d!==_0x3e6019;}},_0x2289b3=_0x36d3ba['UAAKn'](join,_0x34867a,'ci',_0x1c8736),_0x3ade84=_0x36d3ba['UAAKn'](join,_0x34867a,_0x36d3ba[_0x7d4c44(0x16f)],_0x1c8736),_0x497524=join(_0x34867a,_0x1c8736),_0x2fbf23=join(_0x34867a,_0x36d3ba[_0x7d4c44(0x16f)]),_0x2afe1c=join(_0x34867a,'ci');if(_0x36d3ba[_0x7d4c44(0x1c3)](existsSync,_0x2289b3))return _0x2289b3;if(existsSync(_0x3ade84))return _0x3ade84;if(existsSync(_0x497524)&&(_0x36d3ba[_0x7d4c44(0x1ba)](_0x497524,_0x2fbf23)&&_0x497524!==_0x2afe1c?!![]:hasLegacyProfileFiles(_0x497524)))return _0x497524;return null;}export function getEnvDir(_0x341337,_0x35546c={}){const _0x3b14be=_0x46d7,_0x455e77={'xjYgU':function(_0x33cfe5,_0x303fe0,_0x5d87bf){return _0x33cfe5(_0x303fe0,_0x5d87bf);},'Ztzhb':function(_0x597c67,_0x57b23c,_0x4bd9a2){return _0x597c67(_0x57b23c,_0x4bd9a2);},'xZCup':function(_0x55a4cd,_0x40e388,_0x26fc6a,_0x28ce1a){return _0x55a4cd(_0x40e388,_0x26fc6a,_0x28ce1a);},'dpXnE':function(_0x32131,_0x2d1727,_0x389b93){return _0x32131(_0x2d1727,_0x389b93);}},_0x26dd02=getRangerDir(),_0xe1c09c=findEnvInRoot(_0x341337,_0x26dd02);if(_0xe1c09c){if(_0x35546c['forWrite']&&isLegacyEnvPath(_0xe1c09c))throw _0x455e77['xjYgU'](legacyWriteError,_0x341337,_0xe1c09c);return _0xe1c09c;}const _0x1f23c0=getRangerHomeDir();if(_0x1f23c0!==_0x26dd02){const _0xfbd3fd=_0x455e77[_0x3b14be(0x17b)](findEnvInRoot,_0x341337,_0x1f23c0);if(_0xfbd3fd){if(_0x35546c[_0x3b14be(0x15a)]&&isLegacyEnvPath(_0xfbd3fd))throw legacyWriteError(_0x341337,_0xfbd3fd);return _0xfbd3fd;}}const _0x13777a=_0x455e77[_0x3b14be(0x197)](join,_0x1f23c0,'local',_0x341337);if(_0x35546c[_0x3b14be(0x15a)])throw _0x455e77[_0x3b14be(0x1b7)](legacyWriteError,_0x341337,_0x13777a);return _0x13777a;}function isLegacyEnvPath(_0x3e1c36){const _0x5615af=_0x46d7,_0xd1b5b0={'gNgzc':function(_0x15c862){return _0x15c862();},'hYDqq':function(_0x2f2819){return _0x2f2819();},'yaocm':function(_0x17cdbd,_0x1fec78){return _0x17cdbd+_0x1fec78;},'oOoll':function(_0x52c164,_0x5ed8e8){return _0x52c164===_0x5ed8e8;}},_0x227b9b=_0xd1b5b0['gNgzc'](getRangerDir),_0x2b0218=_0xd1b5b0[_0x5615af(0x1b4)](getRangerHomeDir);for(const _0x299fb4 of new Set([_0x227b9b,_0x2b0218])){const _0x346b28=_0x299fb4[_0x5615af(0x193)]('/')?_0x299fb4:_0xd1b5b0[_0x5615af(0x173)](_0x299fb4,'/');if(_0xd1b5b0['oOoll'](_0x3e1c36,_0x299fb4)||_0x3e1c36['startsWith'](_0x346b28))return!![];}return![];}function legacyWriteError(_0x5235af,_0x26f6cd){const _0x3acdea=_0x46d7,_0x23058d={'mrRWk':function(_0x55c3a5,_0x24c22e){return _0x55c3a5+_0x24c22e;}};return new Error(_0x23058d['mrRWk'](_0x23058d[_0x3acdea(0x19d)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x5235af+'\x22\x20to\x20legacy\x20path\x20'+_0x26f6cd+'.\x0a'+_0x3acdea(0x1c9),_0x3acdea(0x163)),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x2cb62d,_0x45e7eb){const _0x40c659=_0x46d7,_0x4ad79b={'KXUQI':function(_0x7181f3){return _0x7181f3();},'rCqXC':function(_0x5bd360,_0x1825d1,_0x42d601){return _0x5bd360(_0x1825d1,_0x42d601);},'VIlcg':function(_0x39515,_0x4da1d1,_0x13e7e4,_0x32e7f2){return _0x39515(_0x4da1d1,_0x13e7e4,_0x32e7f2);},'Kqezo':'local','TrMwk':function(_0x426a04,_0x449754){return _0x426a04(_0x449754);},'fgitw':function(_0x3821d7,_0x420e9b){return _0x3821d7===_0x420e9b;},'cWExp':function(_0x4ba8fb,_0x2bdef8){return _0x4ba8fb===_0x2bdef8;}},_0x514b90=_0x45e7eb?.[_0x40c659(0x15b)],_0x1be42d=_0x514b90?[_0x514b90]:[getRangerDir(),_0x4ad79b['KXUQI'](getRangerHomeDir)]['filter']((_0x7e7af4,_0x4d7d0f,_0xdce395)=>_0xdce395['indexOf'](_0x7e7af4)===_0x4d7d0f),_0x3572d1=_0x45e7eb?.[_0x40c659(0x1d1)]??['ci','local',_0x40c659(0x1a7)];for(const _0x3f4dad of _0x1be42d){const _0x121693=join(_0x3f4dad,_0x40c659(0x172)),_0x40d71c=_0x4ad79b['rCqXC'](join,_0x3f4dad,'ci'),_0x43cfe8=[{'location':'ci','path':join(_0x3f4dad,'ci',_0x2cb62d)},{'location':_0x40c659(0x172),'path':_0x4ad79b['VIlcg'](join,_0x3f4dad,_0x4ad79b[_0x40c659(0x167)],_0x2cb62d)},{'location':'legacy','path':_0x4ad79b[_0x40c659(0x1b2)](join,_0x3f4dad,_0x2cb62d)}];for(const _0x34505c of _0x43cfe8){if(_0x3572d1[_0x40c659(0x1c2)](_0x34505c[_0x40c659(0x17c)])&&_0x4ad79b[_0x40c659(0x1a6)](existsSync,_0x34505c['path'])){if(_0x4ad79b['fgitw'](_0x34505c[_0x40c659(0x17c)],'legacy')&&(_0x34505c['path']===_0x121693||_0x4ad79b['cWExp'](_0x34505c['path'],_0x40d71c))&&!hasLegacyProfileFiles(_0x34505c[_0x40c659(0x15d)]))continue;return{'path':_0x34505c['path'],'location':_0x34505c[_0x40c659(0x17c)]};}}}return null;}function hasLegacyProfileFiles(_0x5a9cd0){const _0x9c51f9=_0x46d7,_0xaf79ee={'oiRFD':function(_0x3f09e1,_0x1f98da,_0x174f12){return _0x3f09e1(_0x1f98da,_0x174f12);},'RgWFp':'settings.json','UAHsE':function(_0x4c8c05,_0x529f60){return _0x4c8c05(_0x529f60);}};return existsSync(_0xaf79ee[_0x9c51f9(0x15f)](join,_0x5a9cd0,_0xaf79ee[_0x9c51f9(0x183)]))||_0xaf79ee['UAHsE'](existsSync,join(_0x5a9cd0,_0x9c51f9(0x18f)))||_0xaf79ee[_0x9c51f9(0x153)](existsSync,join(_0x5a9cd0,'auth.json.enc'));}export function isEnvCi(_0x213d31){const _0x4eca87=_0x46d7,_0x32dfac={'RRIfv':function(_0x417d83,_0x12c43f){return _0x417d83(_0x12c43f);},'Dguds':function(_0x58717a,_0x4c93c8){return _0x58717a!==_0x4c93c8;},'pYlyr':function(_0x49c706){return _0x49c706();},'TBByS':function(_0x97623d,_0x507af6,_0x34644e,_0x5c0c13){return _0x97623d(_0x507af6,_0x34644e,_0x5c0c13);}};if(_0x32dfac['RRIfv'](existsSync,join(getRangerDir(),'ci',_0x213d31)))return!![];const _0x498f04=getRangerHomeDir();if(_0x32dfac['Dguds'](_0x498f04,_0x32dfac['pYlyr'](getRangerDir))&&_0x32dfac[_0x4eca87(0x15e)](existsSync,_0x32dfac['TBByS'](join,_0x498f04,'ci',_0x213d31)))return!![];return![];}export async function cleanupTempFiles(_0x1dcbd2){const _0x34c1fd={'ObBts':'ENOENT'},_0xbd870=[_0x1dcbd2['tempAuthPath'],_0x1dcbd2['configPath']]['filter'](Boolean);await Promise['all'](_0xbd870['map'](_0x2904a0=>unlink(_0x2904a0)['catch'](_0x3c1840=>{const _0x69e21f=_0x46d7;_0x3c1840['code']!==_0x34c1fd['ObBts']&&console['warn'](_0x69e21f(0x1a8)+_0x2904a0+':',_0x3c1840['message']);})));}export function getSettingsPath(_0x1cc439){const _0x50d842=_0x46d7,_0x4622ec={'bUArb':function(_0x5dc92a,_0x4b8c1c,_0x519cf0){return _0x5dc92a(_0x4b8c1c,_0x519cf0);}};return _0x4622ec[_0x50d842(0x1cb)](join,getEnvDir(_0x1cc439),_0x50d842(0x1ac));}export async function loadSettings(_0xe3e8b7){const _0x404e63=_0x46d7,_0x3dea9f={'yAzmW':function(_0x26751e,_0x14e4f6){return _0x26751e(_0x14e4f6);},'hyXFp':_0x404e63(0x16c)},_0x46bc96=_0x3dea9f['yAzmW'](getSettingsPath,_0xe3e8b7);if(!_0x3dea9f['yAzmW'](existsSync,_0x46bc96))return{};try{const _0x3f86a8=await readFile(_0x46bc96,_0x3dea9f['hyXFp']);return JSON[_0x404e63(0x156)](_0x3f86a8);}catch{return{};}}export async function saveSettings(_0x37c486,_0x1dd853){const _0x43168d=_0x46d7,_0x11d938={'BKUuq':function(_0x2f16c9,_0x58bca5){return _0x2f16c9(_0x58bca5);},'tNeBp':function(_0xecb708,_0x434374,_0x1f95f2){return _0xecb708(_0x434374,_0x1f95f2);},'FscLM':function(_0x3a009f,_0x5ad76b,_0x62d47f){return _0x3a009f(_0x5ad76b,_0x62d47f);}},_0x2fa04d=_0x11d938['BKUuq'](getSettingsPath,_0x37c486),_0x1075af=dirname(_0x2fa04d);!existsSync(_0x1075af)&&await _0x11d938[_0x43168d(0x1c5)](mkdir,_0x1075af,{'recursive':!![]}),await _0x11d938[_0x43168d(0x1a4)](writeFile,_0x2fa04d,JSON['stringify'](_0x1dd853,null,0x2));}export function resolveEnvVars(_0xbc834){const _0x2773f8=_0x46d7,_0x342bd0={'IQBAM':'string','zHgXC':function(_0x23435d,_0x54da33){return _0x23435d===_0x54da33;},'eXVxO':'object'};if(typeof _0xbc834===_0x342bd0[_0x2773f8(0x176)])return _0xbc834[_0x2773f8(0x179)](/\$\{(\w+)\}/g,(_0x111c49,_0x34800d)=>{const _0x269e20=_0x2773f8,_0x6ed03f=process['env'][_0x34800d];if(_0x6ed03f===undefined)throw new Error(_0x269e20(0x1a0)+_0x34800d+_0x269e20(0x1ad));return _0x6ed03f;});if(Array[_0x2773f8(0x194)](_0xbc834))return _0xbc834['map'](resolveEnvVars);if(_0xbc834&&_0x342bd0['zHgXC'](typeof _0xbc834,_0x342bd0[_0x2773f8(0x1b6)]))return Object[_0x2773f8(0x16b)](Object['entries'](_0xbc834)['map'](([_0x5c320c,_0x3f792a])=>[_0x5c320c,resolveEnvVars(_0x3f792a)]));return _0xbc834;}const isRecord=_0x101af5=>typeof _0x101af5==='object'&&_0x101af5!==null&&!Array['isArray'](_0x101af5),asRecord=_0x509360=>isRecord(_0x509360)?_0x509360:undefined,mergeHeaders=(_0x4c8e59,_0x385cac)=>{const _0x3c43ee=_0x46d7,_0x5ab69e={'FXOwz':function(_0x46e805,_0xe6d12e){return _0x46e805??_0xe6d12e;},'CNFIb':function(_0x55c29a,_0x2ace47){return _0x55c29a??_0x2ace47;}},_0x18bc2d={..._0x5ab69e[_0x3c43ee(0x157)](_0x4c8e59,{}),..._0x5ab69e['CNFIb'](_0x385cac,{})};return Object[_0x3c43ee(0x1c4)](_0x18bc2d)['length']?_0x18bc2d:undefined;},SAFE_MODE_ARGS=[_0xf34d34(0x1b5)],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0xf34d34(0x186),_0xf34d34(0x19b),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x3fecc4,_0x31d375={}){const _0x5bee1a=_0xf34d34,_0xe278fc={'ZZgJm':function(_0x1da93c,_0x351dc6){return _0x1da93c===_0x351dc6;},'aZoeH':function(_0x34b0aa,_0x1635b0){return _0x34b0aa(_0x1635b0);},'symvZ':function(_0x3cd9c5,_0x2bf178){return _0x3cd9c5===_0x2bf178;},'JJqcQ':function(_0x51d7de,_0xc9e7f1,_0x2d7fcd){return _0x51d7de(_0xc9e7f1,_0x2d7fcd);}},_0x464350=asRecord(_0x3fecc4['browser']),_0x312ab2={...asRecord(_0x464350?.[_0x5bee1a(0x19f)])??{}};_0xe278fc[_0x5bee1a(0x1c0)](typeof _0x31d375[_0x5bee1a(0x189)],'boolean')&&(_0x312ab2['headless']=_0x31d375['headless']);if(_0x3fecc4['safeMode']){const _0x25b10b=_0x312ab2['args']??[],_0x4a2246=SAFE_MODE_ARGS[_0x5bee1a(0x17e)](_0x3449a1=>!_0x25b10b[_0x5bee1a(0x1c2)](_0x3449a1));_0x312ab2['args']=[..._0x25b10b,..._0x4a2246];}if(_0x3fecc4[_0x5bee1a(0x1d3)]){const _0x13ee2b=_0x312ab2[_0x5bee1a(0x1d5)]??[],_0x27323e=ALLOW_LOCALHOST_ARGS['filter'](_0x118c4c=>!_0x13ee2b['includes'](_0x118c4c));_0x312ab2['args']=[..._0x13ee2b,..._0x27323e];}const _0x197a30={..._0xe278fc[_0x5bee1a(0x16d)](asRecord,_0x464350?.['contextOptions'])??{}};_0x197a30[_0x5bee1a(0x161)]=!![];_0xe278fc[_0x5bee1a(0x18d)](typeof _0x3fecc4['userAgent'],_0x5bee1a(0x17f))&&(_0x197a30['userAgent']=_0x3fecc4['userAgent']);const _0x2769d9=_0xe278fc[_0x5bee1a(0x19e)](mergeHeaders,asRecord(_0x197a30['extraHTTPHeaders']),asRecord(_0x3fecc4[_0x5bee1a(0x1c7)]));return _0x2769d9?_0x197a30['extraHTTPHeaders']=_0x2769d9:delete _0x197a30['extraHTTPHeaders'],_0x31d375['storageStatePath']&&(_0x197a30[_0x5bee1a(0x154)]=_0x31d375[_0x5bee1a(0x1bc)]),{'launchOptions':_0x312ab2,'contextOptions':_0x197a30};}export async function resolveProfileStorageState(_0x151267){const _0x5da18d=_0xf34d34,_0x55e711={'YIpJI':function(_0x5388dc,_0x3ff53d){return _0x5388dc(_0x3ff53d);}};return _0x55e711[_0x5da18d(0x175)](resolveLocalAuthPath,getEnvDir(_0x151267));}async function resolveLocalAuthPath(_0x71a4f2){const _0x30987a=_0xf34d34,_0x302c71={'stedS':'auth.json.enc','HwtGQ':_0x30987a(0x18f),'jETQJ':function(_0x59ae81,_0x9090d3){return _0x59ae81(_0x9090d3);},'ScYPt':function(_0x15a611){return _0x15a611();},'aWUso':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','WiGAz':function(_0x52913b,_0x44a61a,_0x4c4e85){return _0x52913b(_0x44a61a,_0x4c4e85);},'zJNsm':function(_0x78c12e,_0x12b010,_0x8c8e94){return _0x78c12e(_0x12b010,_0x8c8e94);},'FNkRB':function(_0x4f927d,_0x5f2532){return _0x4f927d instanceof _0x5f2532;}},_0x1cc68e=join(_0x71a4f2,_0x302c71['stedS']),_0x24155d=join(_0x71a4f2,_0x302c71['HwtGQ']);if(_0x302c71[_0x30987a(0x185)](existsSync,_0x1cc68e))try{const _0x56f292=await _0x302c71[_0x30987a(0x1a1)](getToken);if(!_0x56f292)throw new Error(_0x302c71['aWUso']);const _0x28e77c=await readFile(_0x1cc68e),_0x10de71=_0x302c71['WiGAz'](decrypt,_0x28e77c,_0x56f292),_0x2cc2f4=_0x302c71['zJNsm'](join,tmpdir(),_0x30987a(0x17a)+Date['now']()+_0x30987a(0x191));return await _0x302c71['zJNsm'](writeFile,_0x2cc2f4,_0x10de71),{'storageStatePath':_0x2cc2f4,'tempAuthPath':_0x2cc2f4};}catch(_0x144b11){const _0x559a33=_0x302c71[_0x30987a(0x1d2)](_0x144b11,Error)?_0x144b11[_0x30987a(0x1d6)]:String(_0x144b11);throw new Error(_0x30987a(0x178)+_0x559a33);}if(existsSync(_0x24155d))return{'storageStatePath':_0x24155d};return{};}export async function buildPlaywrightConfig(_0x3e91ac,_0x558b01,_0x5ca181,_0x4c2a8f,_0x21baca){const _0x398264=_0xf34d34,_0x496450={'GmTPf':function(_0xfdeb1c,_0x52d045,_0x3e35af,_0x461837,_0xac56e5,_0x3b1d5c,_0x5ab8c6){return _0xfdeb1c(_0x52d045,_0x3e35af,_0x461837,_0xac56e5,_0x3b1d5c,_0x5ab8c6);},'SmMlV':function(_0x51afe6,_0x1ebf95){return _0x51afe6(_0x1ebf95);},'DzNPw':_0x398264(0x19a)};if(_0x21baca)return _0x496450[_0x398264(0x1c6)](buildPlaywrightConfigCore,_0x3e91ac,_0x21baca,_0x558b01,_0x5ca181,_0x4c2a8f,_0x398264(0x19a));const {storageStatePath:_0x1193de,tempAuthPath:_0x49c156}=await resolveLocalAuthPath(_0x496450[_0x398264(0x15c)](getEnvDir,_0x558b01));try{const _0x4dd17d=await buildPlaywrightConfigCore(_0x3e91ac,_0x1193de,_0x558b01,_0x5ca181,_0x4c2a8f,_0x496450['DzNPw']);return{..._0x4dd17d,'tempAuthPath':_0x49c156};}catch(_0x43cc39){_0x49c156&&await _0x496450['SmMlV'](unlink,_0x49c156)['catch'](()=>{});throw _0x43cc39;}}export async function buildPlaywrightConfigCore(_0x307171,_0x27e892,_0x448359,_0x31a1b9,_0x41deaf,_0x319e72='stagehand'){const _0x1136c5=_0xf34d34,_0xa174c9={'ksoTX':function(_0x5addee,_0x2f3b41,_0x2da32c){return _0x5addee(_0x2f3b41,_0x2da32c);},'iUVur':_0x1136c5(0x16e),'aejlQ':_0x1136c5(0x1ae),'MEzdG':_0x1136c5(0x165),'mvzaE':function(_0x4d12b5){return _0x4d12b5();},'NWwaG':function(_0x338f49,_0x1539c){return _0x338f49(_0x1539c);},'oTSxK':'playwright-cli','sPOOm':'file','oElpo':_0x1136c5(0x168),'SvGRi':'allow','npyXE':function(_0x11c655,_0x25c08c){return _0x11c655===_0x25c08c;},'UBMkS':function(_0x46030a,_0x1d7d64,_0x3c9825){return _0x46030a(_0x1d7d64,_0x3c9825);},'SIopN':_0x1136c5(0x1ab)},_0x2972c1=_0x31a1b9||_0xa174c9[_0x1136c5(0x199)](randomUUID),_0x4e5c7d=join(getRangerDir(),_0x1136c5(0x18b),_0x2972c1),_0x23939a=_0xa174c9['NWwaG'](Boolean,_0x307171['cdpEndpoint']),_0xabe753=_0x23939a?{'browserName':_0xa174c9[_0x1136c5(0x170)],'cdpEndpoint':_0x307171['cdpEndpoint']}:((()=>{const _0x47dbc7=_0x1136c5,{launchOptions:_0x5ad647,contextOptions:_0x5203bc}=_0xa174c9['ksoTX'](buildBrowserOptionsFromSettings,_0x307171,{'headless':_0x41deaf?![]:_0x307171[_0x47dbc7(0x189)]??!![],'storageStatePath':_0x27e892});if(process['getuid']?.()===0x0){const _0x30ee69=[_0xa174c9['iUVur'],'--disable-setuid-sandbox'],_0x3b3a05=_0x5ad647[_0x47dbc7(0x1d5)]??[],_0x138e1a=_0x30ee69['filter'](_0x884776=>!_0x3b3a05[_0x47dbc7(0x1c2)](_0x884776));_0x5ad647['args']=[..._0x3b3a05,..._0x138e1a];}return{'isolated':!![],'browserName':_0xa174c9['aejlQ'],'launchOptions':_0x5ad647,'contextOptions':{..._0x5203bc,'permissions':[_0x47dbc7(0x152),_0xa174c9['MEzdG']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x166c41=_0x319e72===_0xa174c9[_0x1136c5(0x196)]?{'browser':_0xabe753,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4e5c7d,'outputMode':_0xa174c9['sPOOm'],'codegen':_0xa174c9['oElpo']}:{'name':_0x448359,'browser':_0xabe753,'capabilities':['core','tabs',_0x1136c5(0x169),'pdf',_0x1136c5(0x1ca)],'imageResponses':_0xa174c9['SvGRi'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4e5c7d};if(!_0x23939a){const _0x1a67b5=_0x166c41[_0x1136c5(0x177)],_0xdb975f=_0x1a67b5[_0x1136c5(0x155)];if(_0xa174c9['npyXE'](_0xdb975f['userAgent'],undefined))delete _0xdb975f['userAgent'];if(_0xdb975f['storageState']===undefined)delete _0xdb975f[_0x1136c5(0x154)];}const _0x16b08e=_0xa174c9[_0x1136c5(0x162)](join,tmpdir(),_0xa174c9[_0x1136c5(0x1c1)]);!existsSync(_0x16b08e)&&await mkdir(_0x16b08e,{'recursive':!![]});const _0x382f9a=_0x319e72===_0xa174c9['oTSxK']?'-cli':'',_0x2cb274=join(_0x16b08e,_0x448359+'-'+Date['now']()+_0x382f9a+_0x1136c5(0x191));return await writeFile(_0x2cb274,JSON[_0x1136c5(0x1bf)](_0x166c41,null,0x2)),{'configPath':_0x2cb274,'storageStatePath':_0x27e892};}export async function buildPlaywrightCliConfig(_0x44a74e,_0x1b9170,_0x4d34c2,_0x4b977b,_0x3e5203){const _0x4a6671=_0xf34d34,_0x1acfd5={'dabMI':function(_0x4fbec2,_0x39c191){return _0x4fbec2(_0x39c191);},'ExBvO':function(_0x4de965,_0x16c3a5){return _0x4de965(_0x16c3a5);},'whOsu':function(_0x16aa8c,_0xcf1cde,_0x5cce55,_0x41aa8c,_0x3a3b4f,_0x3c542f,_0x117b59){return _0x16aa8c(_0xcf1cde,_0x5cce55,_0x41aa8c,_0x3a3b4f,_0x3c542f,_0x117b59);},'SsBAj':_0x4a6671(0x19c)};if(_0x3e5203)return buildPlaywrightConfigCore(_0x44a74e,_0x3e5203,_0x1b9170,_0x4d34c2,_0x4b977b,'playwright-cli');const {storageStatePath:_0x3b72ba,tempAuthPath:_0x36738f}=await _0x1acfd5['dabMI'](resolveLocalAuthPath,_0x1acfd5['ExBvO'](getEnvDir,_0x1b9170));try{const _0x45f0b7=await _0x1acfd5[_0x4a6671(0x1b1)](buildPlaywrightConfigCore,_0x44a74e,_0x3b72ba,_0x1b9170,_0x4d34c2,_0x4b977b,_0x1acfd5[_0x4a6671(0x150)]);return{..._0x45f0b7,'tempAuthPath':_0x36738f};}catch(_0x4e1ca5){_0x36738f&&await unlink(_0x36738f)['catch'](()=>{});throw _0x4e1ca5;}}export async function buildRangerwrightCliConfig(_0x25691b,_0x4426f6,_0x523ec6,_0x51c727,_0x48d5bc){const _0x49e6e3=_0xf34d34,_0x60dc38={'IAFMn':'--no-sandbox','GLHxX':_0x49e6e3(0x174),'bFBdf':_0x49e6e3(0x165),'WHWSw':function(_0x328ee6,_0xb632bb,_0x145cf5,_0x5c9ed8){return _0x328ee6(_0xb632bb,_0x145cf5,_0x5c9ed8);},'XLrNy':function(_0x8f7fa5){return _0x8f7fa5();},'JUhDb':function(_0x198bdd,_0x499426){return _0x198bdd(_0x499426);},'gZDEA':function(_0x1032f8,_0x57d295){return _0x1032f8===_0x57d295;},'NJOQi':function(_0x4237a7,_0x196f97,_0x5b12b0){return _0x4237a7(_0x196f97,_0x5b12b0);},'dwdBR':function(_0x4b7706,_0x27a249){return _0x4b7706(_0x27a249);},'LHuFD':function(_0x1cce11,_0x117443,_0x6cfb2){return _0x1cce11(_0x117443,_0x6cfb2);}},{storageStatePath:_0x4950b1,tempAuthPath:_0x420a0b}=_0x48d5bc?{'storageStatePath':_0x48d5bc,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x4426f6)),_0x35ce3c=_0x523ec6||randomUUID(),_0x58e098=_0x60dc38['WHWSw'](join,_0x60dc38[_0x49e6e3(0x1b9)](getRangerDir),_0x49e6e3(0x18b),_0x35ce3c),_0x3a6957=_0x60dc38[_0x49e6e3(0x192)](Boolean,_0x25691b[_0x49e6e3(0x1d0)]),_0x21b43b=_0x3a6957?{'browserName':'chromium','cdpEndpoint':_0x25691b['cdpEndpoint']}:((()=>{const _0x53b8f5=_0x49e6e3,{launchOptions:_0x3dbdc0,contextOptions:_0x1c9ce1}=buildBrowserOptionsFromSettings(_0x25691b,{'headless':_0x51c727?![]:_0x25691b['headless']??!![],'storageStatePath':_0x4950b1});if(process[_0x53b8f5(0x18a)]?.()===0x0){const _0x96ded5=[_0x60dc38[_0x53b8f5(0x18c)],_0x60dc38[_0x53b8f5(0x1cd)]],_0x907212=_0x3dbdc0[_0x53b8f5(0x1d5)]??[],_0x392361=_0x96ded5['filter'](_0x1fe6f2=>!_0x907212[_0x53b8f5(0x1c2)](_0x1fe6f2));_0x3dbdc0[_0x53b8f5(0x1d5)]=[..._0x907212,..._0x392361];}return{'browserName':'chromium','launchOptions':_0x3dbdc0,'contextOptions':{..._0x1c9ce1,'permissions':[_0x53b8f5(0x152),_0x60dc38['bFBdf']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x3a6957){const _0x2891da=_0x21b43b[_0x49e6e3(0x155)];if(_0x2891da){if(_0x60dc38['gZDEA'](_0x2891da['userAgent'],undefined))delete _0x2891da[_0x49e6e3(0x1d4)];if(_0x60dc38['gZDEA'](_0x2891da[_0x49e6e3(0x154)],undefined))delete _0x2891da['storageState'];}}const _0x36ad52={'browser':_0x21b43b,'outputDir':_0x58e098,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x2f1670;try{const _0x285650=_0x60dc38['NJOQi'](join,tmpdir(),_0x49e6e3(0x1ab));!_0x60dc38[_0x49e6e3(0x160)](existsSync,_0x285650)&&await mkdir(_0x285650,{'recursive':!![]}),_0x2f1670=_0x60dc38['NJOQi'](join,_0x285650,_0x4426f6+'-'+Date['now']()+'-rangerwright.json'),await _0x60dc38[_0x49e6e3(0x181)](writeFile,_0x2f1670,JSON['stringify'](_0x36ad52,null,0x2));}catch(_0x21214c){_0x420a0b&&await unlink(_0x420a0b)['catch'](()=>{});throw _0x21214c;}return{'configPath':_0x2f1670,'storageStatePath':_0x4950b1,'tempAuthPath':_0x420a0b,'outputDir':_0x58e098};}export async function buildNovaActCliConfig(_0x33885f,_0x453746,_0x236d99,_0x389542,_0x103f80){const _0x2930f7=_0xf34d34,_0x1acd79={'zwfuS':function(_0x31ef25,_0x57d351){return _0x31ef25(_0x57d351);},'xzDDI':function(_0x3d818f){return _0x3d818f();},'xQcDh':'sessions','rDQom':function(_0x47bb2e,_0x3e74ea,_0x2b0ba0){return _0x47bb2e(_0x3e74ea,_0x2b0ba0);},'JhBmG':_0x2930f7(0x16e),'AKOZm':_0x2930f7(0x174)},{storageStatePath:_0x143970,tempAuthPath:_0x2db542}=_0x103f80?{'storageStatePath':_0x103f80,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x1acd79[_0x2930f7(0x1ce)](getEnvDir,_0x453746)),_0x1f8d69=_0x236d99||_0x1acd79['xzDDI'](randomUUID),_0xda07=join(getRangerDir(),_0x1acd79[_0x2930f7(0x1cf)],_0x1f8d69),_0x2e736d=_0x1acd79[_0x2930f7(0x18e)](join,_0xda07,'nova-user-data'),_0xf0381b=_0x143970?_0x1acd79['rDQom'](join,_0x2e736d,'Default'):undefined,{launchOptions:_0x36f979,contextOptions:_0x5e8bae}=buildBrowserOptionsFromSettings(_0x33885f,{'headless':_0x389542?![]:_0x33885f[_0x2930f7(0x189)]??!![],'storageStatePath':_0x143970});if(process['getuid']?.()===0x0){const _0x181add=[_0x1acd79[_0x2930f7(0x1cc)],_0x1acd79['AKOZm']],_0x4be29a=_0x36f979['args']??[],_0x297143=_0x181add['filter'](_0x3eff81=>!_0x4be29a[_0x2930f7(0x1c2)](_0x3eff81));_0x36f979[_0x2930f7(0x1d5)]=[..._0x4be29a,..._0x297143];}const _0x193526=typeof _0x36f979[_0x2930f7(0x171)]===_0x2930f7(0x17f)?_0x36f979[_0x2930f7(0x171)]:_0x143970?chromium[_0x2930f7(0x171)]():undefined;return{'storageStatePath':_0x143970,'tempAuthPath':_0x2db542,'baseUrl':_0x33885f[_0x2930f7(0x1bd)],'headless':Boolean(_0x36f979[_0x2930f7(0x189)]),'userDataDir':_0x2e736d,'browserProfilePath':_0xf0381b,'executablePath':_0x193526,'launchArgs':Array[_0x2930f7(0x194)](_0x36f979['args'])?_0x36f979[_0x2930f7(0x1d5)][_0x2930f7(0x17e)](_0x5a439e=>typeof _0x5a439e===_0x2930f7(0x17f)):[],'userAgent':typeof _0x5e8bae[_0x2930f7(0x1d4)]===_0x2930f7(0x17f)?_0x5e8bae[_0x2930f7(0x1d4)]:undefined,'extraHTTPHeaders':_0x5e8bae[_0x2930f7(0x158)],'allowInsecureLocalhost':Boolean(_0x33885f[_0x2930f7(0x1d3)]),'safeMode':_0x1acd79['zwfuS'](Boolean,_0x33885f['safeMode']),'cdpEndpoint':_0x33885f[_0x2930f7(0x1d0)],'isCdpMode':_0x1acd79['zwfuS'](Boolean,_0x33885f['cdpEndpoint'])};}export function getNestedValue(_0x2dd85b,_0x23fa2a){const _0x3f3be2=_0xf34d34,_0x287cac={'eOfme':function(_0x360c30,_0x1714d8){return _0x360c30(_0x1714d8);},'ywoIj':function(_0x1ae16f,_0xa1fdc6){return _0x1ae16f===_0xa1fdc6;},'CtVIE':function(_0x4930a3,_0xb26da5){return _0x4930a3!==_0xb26da5;},'GCtsZ':_0x3f3be2(0x1aa)},_0x18ae6f=_0x287cac[_0x3f3be2(0x1a2)](parseKeyPath,_0x23fa2a);let _0x368e91=_0x2dd85b;for(const _0x4cc355 of _0x18ae6f){if(_0x287cac[_0x3f3be2(0x1a9)](_0x368e91,null)||_0x287cac['ywoIj'](_0x368e91,undefined)||_0x287cac[_0x3f3be2(0x195)](typeof _0x368e91,_0x287cac['GCtsZ']))return undefined;_0x368e91=_0x368e91[_0x4cc355];}return _0x368e91;}function _0x3529(){const _0x1caa9c=['install','push','fromEntries','utf-8','aZoeH','--no-sandbox','xwklg','aejlQ','executablePath','local','yaocm','--disable-setuid-sandbox','YIpJI','IQBAM','browser','Failed\x20to\x20decrypt\x20auth\x20state:\x20','replace','ranger-auth-','Ztzhb','location','80gizGPe','filter','string','2525922hZFECq','LHuFD','setupHeader','RgWFp','IsdHU','jETQJ','--allow-running-insecure-content','ApvyW','15567NzkfsX','headless','getuid','sessions','IAFMn','symvZ','rDQom','auth.json','3eygTHs','.json','JUhDb','endsWith','isArray','CtVIE','oTSxK','xZCup','92eoVJAG','mvzaE','stagehand','--unsafely-treat-insecure-origin-as-secure=http://localhost','playwright-cli','mrRWk','JJqcQ','launchOptions','Environment\x20variable\x20','ScYPt','eOfme','setupHeaders','FscLM','12oIvqsx','TrMwk','legacy','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','ywoIj','object','ranger-config','settings.json','\x20is\x20not\x20set','chromium','553CbqYaP','3023768efstMN','whOsu','rCqXC','length','hYDqq','--disable-features=WebBluetooth','eXVxO','dpXnE','IsQyc','XLrNy','vflkR','730965bcrhSp','storageStatePath','baseUrl','508374GpWXcP','stringify','ZZgJm','SIopN','includes','lnJel','keys','tNeBp','GmTPf','headers','pnNNs','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','vision','bUArb','JhBmG','GLHxX','zwfuS','xQcDh','cdpEndpoint','locations','FNkRB','allowInsecureLocalhost','userAgent','args','message','SsBAj','entries','clipboard-read','UAHsE','storageState','contextOptions','parse','FXOwz','extraHTTPHeaders','mmAgC','forWrite','rangerDir','SmMlV','path','RRIfv','oiRFD','dwdBR','ignoreHTTPSErrors','UBMkS','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','11448lmsvGq','clipboard-write','805924ItyZkO','Kqezo','none'];_0x3529=function(){return _0x1caa9c;};return _0x3529();}export function setNestedValue(_0x2a5052,_0x180152,_0x4df8f5){const _0x40c33f=_0xf34d34,_0x3e120e={'ApvyW':function(_0x19699b,_0x3fd36f){return _0x19699b-_0x3fd36f;},'PhEUe':function(_0x3b42b9,_0x3ac0a8){return _0x3b42b9 in _0x3ac0a8;}},_0x5810a1=parseKeyPath(_0x180152);let _0x40e069=_0x2a5052;for(let _0x3406f5=0x0;_0x3406f5<_0x3e120e[_0x40c33f(0x187)](_0x5810a1['length'],0x1);_0x3406f5++){const _0xb246aa=_0x5810a1[_0x3406f5];(!_0x3e120e['PhEUe'](_0xb246aa,_0x40e069)||typeof _0x40e069[_0xb246aa]!=='object')&&(_0x40e069[_0xb246aa]={}),_0x40e069=_0x40e069[_0xb246aa];}_0x40e069[_0x5810a1[_0x3e120e['ApvyW'](_0x5810a1[_0x40c33f(0x1b3)],0x1)]]=_0x4df8f5;}export function deleteNestedValue(_0x1a288a,_0x5b6c85){const _0x5e904f=_0xf34d34,_0x47e992={'HYtzW':function(_0x3ca907,_0x3dd475){return _0x3ca907(_0x3dd475);},'IsdHU':function(_0x428474,_0x2f3c99){return _0x428474 in _0x2f3c99;}},_0xe8135a=_0x47e992['HYtzW'](parseKeyPath,_0x5b6c85);let _0x3f10d3=_0x1a288a;for(let _0x423909=0x0;_0x423909<_0xe8135a[_0x5e904f(0x1b3)]-0x1;_0x423909++){if(_0x3f10d3===null||_0x3f10d3===undefined||typeof _0x3f10d3!=='object')return![];_0x3f10d3=_0x3f10d3[_0xe8135a[_0x423909]];}if(_0x3f10d3===null||_0x3f10d3===undefined||typeof _0x3f10d3!=='object')return![];const _0x572aac=_0xe8135a[_0xe8135a[_0x5e904f(0x1b3)]-0x1];if(_0x47e992[_0x5e904f(0x184)](_0x572aac,_0x3f10d3))return delete _0x3f10d3[_0x572aac],!![];return![];}function parseKeyPath(_0xc9a7d0){const _0x1b542a=_0xf34d34,_0x21e277={'IsQyc':function(_0x37495e,_0x56d000){return _0x37495e===_0x56d000;},'lDOSn':'header','pnNNs':_0x1b542a(0x1c7),'mmAgC':_0x1b542a(0x1a3)},_0x1ff62b=_0xc9a7d0['split']('.');return _0x21e277[_0x1b542a(0x1b8)](_0x1ff62b[0x0],_0x21e277['lDOSn'])&&(_0x1ff62b[0x0]=_0x21e277[_0x1b542a(0x1c8)]),_0x21e277[_0x1b542a(0x1b8)](_0x1ff62b[0x0],_0x1b542a(0x182))&&(_0x1ff62b[0x0]=_0x21e277[_0x1b542a(0x159)]),_0x1ff62b;}export function formatSettings(_0x3ea2de,_0x1b64bd=0x0){const _0x5240ae=_0xf34d34,_0x145e2c={'qGYkC':function(_0x92483,_0x4c4bba){return _0x92483===_0x4c4bba;},'RZSVQ':_0x5240ae(0x1aa),'GkbFE':function(_0x11256c,_0x5923c0){return _0x11256c!==_0x5923c0;}},_0x240350=[],_0xc7ff78='\x20\x20'['repeat'](_0x1b64bd);for(const [_0xc0a426,_0x1ba9fd]of Object[_0x5240ae(0x151)](_0x3ea2de)){if(_0x145e2c['qGYkC'](_0x1ba9fd,undefined))continue;if(_0x145e2c['qGYkC'](typeof _0x1ba9fd,_0x145e2c['RZSVQ'])&&_0x145e2c['GkbFE'](_0x1ba9fd,null)){_0x240350['push'](''+_0xc7ff78+_0xc0a426+':');for(const [_0xef60b5,_0x278dd2]of Object['entries'](_0x1ba9fd)){_0x240350['push'](_0xc7ff78+'\x20\x20'+_0xef60b5+':\x20'+_0x278dd2);}}else _0x240350[_0x5240ae(0x16a)](''+_0xc7ff78+_0xc0a426+':\x20'+_0x1ba9fd);}return _0x240350['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3910ee,_0x389510){const _0x1affb1=_0x30d5,_0x35ac61=_0x3910ee();while(!![]){try{const _0x3b4dea=-parseInt(_0x1affb1(0x127))/0x1+-parseInt(_0x1affb1(0x12a))/0x2+-parseInt(_0x1affb1(0x12b))/0x3+-parseInt(_0x1affb1(0x126))/0x4+-parseInt(_0x1affb1(0x125))/0x5+parseInt(_0x1affb1(0x129))/0x6+parseInt(_0x1affb1(0x12d))/0x7*(parseInt(_0x1affb1(0x128))/0x8);if(_0x3b4dea===_0x389510)break;else _0x35ac61['push'](_0x35ac61['shift']());}catch(_0x343221){_0x35ac61['push'](_0x35ac61['shift']());}}}(_0x4171,0xe5c56));function _0x30d5(_0x32d30a,_0x4561be){_0x32d30a=_0x32d30a-0x125;const _0x4171b7=_0x4171();let _0x30d560=_0x4171b7[_0x32d30a];return _0x30d560;}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0x4171(){const _0x5339f7=['3680720DzsBnK','180603TtBCMf','2384ZygUBK','4455252aetqSs','2566982FsJlYi','5478717vwUJbQ','SRqyC','137823DksvhN','7291045ZYnfQw'];_0x4171=function(){return _0x5339f7;};return _0x4171();}export function readSkillContent(_0x3a585b){const _0x2ce79d=_0x30d5,_0x3d9ee7={'SRqyC':function(_0x49f88b,_0x45d663,_0x4c87d6){return _0x49f88b(_0x45d663,_0x4c87d6);},'OuGlj':'utf-8'},_0x2bef77=join(__dirname,'..','..','skills'),_0x82f372=join(_0x2bef77,_0x3a585b);try{return _0x3d9ee7[_0x2ce79d(0x12c)](readFileSync,_0x82f372,_0x3d9ee7['OuGlj']);}catch{return'';}}export function getRangerSkillContent(){return readSkillContent('ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x202a4f=_0x1e9c;(function(_0x282671,_0x22373a){const _0x5b0b0c=_0x1e9c,_0x2d1baa=_0x282671();while(!![]){try{const _0x2df3b1=-parseInt(_0x5b0b0c(0x103))/0x1*(-parseInt(_0x5b0b0c(0xeb))/0x2)+-parseInt(_0x5b0b0c(0xfc))/0x3+-parseInt(_0x5b0b0c(0x100))/0x4+-parseInt(_0x5b0b0c(0xef))/0x5+parseInt(_0x5b0b0c(0xec))/0x6+parseInt(_0x5b0b0c(0xfb))/0x7+parseInt(_0x5b0b0c(0xed))/0x8;if(_0x2df3b1===_0x22373a)break;else _0x2d1baa['push'](_0x2d1baa['shift']());}catch(_0x591bb9){_0x2d1baa['push'](_0x2d1baa['shift']());}}}(_0x39ba,0xb10cd));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x1e9c(_0x1bd4e6,_0x10178c){_0x1bd4e6=_0x1bd4e6-0xe9;const _0x39ba36=_0x39ba();let _0x1e9cfc=_0x39ba36[_0x1bd4e6];return _0x1e9cfc;}import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x202a4f(0xf7)];function _0x39ba(){const _0x19b63c=['3856321EpJshc','914778AcmXqg','push','cfdcH','QkdCW','4107284FAYUii','Invalid\x20skill\x20frontmatter','match','28484pjZZVY','jNOAv','feature-tracker','log','10slFmhJ','5235636EJLgwN','4155080ubQcEF','\x20\x20Installed\x20skill:\x20','141850ZKnLDc','length','warn','skills','cfgji','SKILL.md','MLvbB','KYyDE','ranger','lTcth','cdQAi','.md'];_0x39ba=function(){return _0x19b63c;};return _0x39ba();}export const DEPRECATED_SKILLS=['e2e-test-recommender','bug-bash',_0x202a4f(0xe9)];export async function installSkill(_0xc14ae9,_0x752ebf={}){const _0x3a6872=_0x202a4f,_0x408a0f={'WbYHg':function(_0x15f0b8,_0x3e9a8e,_0x25d6ac){return _0x15f0b8(_0x3e9a8e,_0x25d6ac);},'cfdcH':function(_0x1db9e9,_0x211a20){return _0x1db9e9(_0x211a20);},'jNOAv':function(_0x524458,_0x127661){return _0x524458(_0x127661);},'MLvbB':function(_0x584fa4,_0x440500){return _0x584fa4===_0x440500;},'cdQAi':function(_0x2a8a27,_0x4b8080,_0x4cac7d){return _0x2a8a27(_0x4b8080,_0x4cac7d);},'WVBaG':function(_0x342c11,_0x58a591,_0x3b99fc){return _0x342c11(_0x58a591,_0x3b99fc);},'lTcth':function(_0x29a12f,_0x30de88,_0x503ed3){return _0x29a12f(_0x30de88,_0x503ed3);},'KYyDE':'utf-8','QkdCW':'SKILL.md','TPrXH':function(_0x3c8fd5,_0xba02a1,_0x553286,_0x4b42d7){return _0x3c8fd5(_0xba02a1,_0x553286,_0x4b42d7);}},{level:level='project',cliVersion:_0xcc8186,platform:platform='claude'}=_0x752ebf,_0x3918e3=getSourceSkillsDir(),_0x4f25e5=_0x408a0f['WbYHg'](join,_0x3918e3,_0xc14ae9),_0x4eb631=join(_0x3918e3,_0xc14ae9+_0x3a6872(0xfa)),_0x511230=existsSync(_0x4f25e5)&&statSync(_0x4f25e5)['isDirectory']()&&_0x408a0f[_0x3a6872(0xfe)](existsSync,_0x408a0f['WbYHg'](join,_0x4f25e5,'SKILL.md')),_0x1ed058=_0x408a0f[_0x3a6872(0x104)](existsSync,_0x4eb631);if(!_0x511230&&!_0x1ed058)return console[_0x3a6872(0xf1)]('\x20\x20Skill\x20not\x20found:\x20'+_0xc14ae9),![];const _0x2428d7=_0x408a0f[_0x3a6872(0xf5)](platform,'opencode')?_0x408a0f['jNOAv'](getOpencodeSkillsDir,level):_0x408a0f[_0x3a6872(0x104)](getSkillsDir,level),_0x575131=join(_0x2428d7,_0xc14ae9);await _0x408a0f[_0x3a6872(0xf9)](mkdir,_0x575131,{'recursive':!![]});let _0x55a076,_0x345e7e=[];if(_0x511230){const _0x139b7b=await _0x408a0f[_0x3a6872(0xfe)](readdir,_0x4f25e5),_0x31cfe6=_0x139b7b['filter'](_0x5c2c46=>_0x5c2c46['endsWith'](_0x3a6872(0xfa)));for(const _0x141844 of _0x31cfe6){const _0x558118=join(_0x4f25e5,_0x141844),_0x167dd3=_0x408a0f['WVBaG'](join,_0x575131,_0x141844);await copyFile(_0x558118,_0x167dd3),_0x345e7e[_0x3a6872(0xfd)](_0x141844);}_0x55a076=await readFile(_0x408a0f[_0x3a6872(0xf8)](join,_0x4f25e5,_0x3a6872(0xf4)),_0x408a0f[_0x3a6872(0xf6)]);}else{_0x55a076=await readFile(_0x4eb631,'utf-8');const _0x1cb1fb=join(_0x575131,_0x408a0f[_0x3a6872(0xff)]);await _0x408a0f['TPrXH'](writeFile,_0x1cb1fb,_0x55a076,'utf-8'),_0x345e7e['push'](_0x408a0f['QkdCW']);}const {name:_0x52f49e}=parseFrontmatter(_0x55a076);return console['log'](_0x3a6872(0xee)+_0x52f49e),console['log']('\x20\x20Location:\x20'+_0x575131),_0x345e7e[_0x3a6872(0xf0)]>0x1&&console[_0x3a6872(0xea)]('\x20\x20Files:\x20'+_0x345e7e['join'](',\x20')),logLocalAgentInstallation(_0xc14ae9,{'skillDisplayName':_0x52f49e,'installLevel':level},_0xcc8186)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0x292ab2=_0x202a4f,_0x4b454c={'tsnej':function(_0x6a008,_0x1cf328,_0x2c9fcb,_0x21d373,_0x4cd39c,_0x29317c){return _0x6a008(_0x1cf328,_0x2c9fcb,_0x21d373,_0x4cd39c,_0x29317c);},'Afobn':function(_0x376b4f,_0x2453f5){return _0x376b4f(_0x2453f5);}},_0xad6655=[join(__dirname,'..','..',_0x292ab2(0xf2)),_0x4b454c['tsnej'](join,__dirname,'..','..','..',_0x292ab2(0xf2))];for(const _0x48108b of _0xad6655){if(_0x4b454c['Afobn'](existsSync,_0x48108b))return _0x48108b;}return _0xad6655[0x0];}function parseFrontmatter(_0x4e43d1){const _0x40f16d=_0x202a4f,_0xcb2d59=_0x4e43d1['match'](/^---\n([\s\S]+?)\n---/);if(!_0xcb2d59)throw new Error(_0x40f16d(0x101));const _0x476b8e=_0xcb2d59[0x1],_0x3fd014=_0x476b8e[_0x40f16d(0x102)](/name:\s*(.+)/),_0x138be1=_0x476b8e['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x3fd014?.[0x1]['trim']()||'','description':_0x138be1?.[0x1]['trim']()||''};}export async function removeSkill(_0x1fcd96,_0xeddd6b){const _0x11b8ef=_0x202a4f,_0x481a31={'zgfaE':function(_0x892a01,_0x5f1dba){return _0x892a01(_0x5f1dba);},'cfgji':function(_0x18d0e8,_0xeaa8bf,_0x568b11){return _0x18d0e8(_0xeaa8bf,_0x568b11);}},_0x58f11c=_0x481a31['zgfaE'](getSkillsDir,_0xeddd6b),_0x41b55c=join(_0x58f11c,_0x1fcd96);if(!existsSync(_0x41b55c))return![];try{return await _0x481a31[_0x11b8ef(0xf3)](rm,_0x41b55c,{'recursive':!![]}),console[_0x11b8ef(0xea)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x1fcd96),!![];}catch{return console[_0x11b8ef(0xf1)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x1fcd96),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2e7af9=_0x3d1b;function _0xc9b9(){const _0x387687=['379gHdLzI','sixuh','CMuxu','428ENTjkF','tISWA','LTULw','RaBNf','push','from','has','header','qWirD','1570uoaUxa','indexOf','28935DkZNlG','length','7832604oFWzbZ','zJswy','error','endsWith','RKPPk','12arxZbu','VZffJ','zdLil','8ksCeSe','argv','readInt16BE','JKMjM','683947dDKXkh','XkzAo','exit','XoEju','igaXS','log','Uygih','192sdODLv','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','xcdsT','JIacK','lTRUm','LvGPE','mgQyC','min','max','jEQWM','pepzh','slice','nuzPb','BNoGv','xVlnd','DthXO','RJQtv','gflYX','OWApi','bDIjm','NXWZs','30879RQekRS','RhtUc','\x20files\x20->\x20','PLCdG','ZSBVt','tMnOD','concat','aSCeJ','5086599oDyTXJ','YWINM','872845QWESuT','sUrUy','kIkFL','ZctrL','QMlni','24cSoLkq'];_0xc9b9=function(){return _0x387687;};return _0xc9b9();}(function(_0x5a8a68,_0x5ec223){const _0x4f0a30=_0x3d1b,_0x3ab1bf=_0x5a8a68();while(!![]){try{const _0x490260=-parseInt(_0x4f0a30(0x14e))/0x1*(parseInt(_0x4f0a30(0x151))/0x2)+-parseInt(_0x4f0a30(0x13e))/0x3*(parseInt(_0x4f0a30(0x171))/0x4)+-parseInt(_0x4f0a30(0x148))/0x5*(-parseInt(_0x4f0a30(0x14d))/0x6)+parseInt(_0x4f0a30(0x146))/0x7*(-parseInt(_0x4f0a30(0x166))/0x8)+-parseInt(_0x4f0a30(0x15c))/0x9*(-parseInt(_0x4f0a30(0x15a))/0xa)+parseInt(_0x4f0a30(0x16a))/0xb*(-parseInt(_0x4f0a30(0x163))/0xc)+parseInt(_0x4f0a30(0x15e))/0xd;if(_0x490260===_0x5ec223)break;else _0x3ab1bf['push'](_0x3ab1bf['shift']());}catch(_0x1cbb5b){_0x3ab1bf['push'](_0x3ab1bf['shift']());}}}(_0xc9b9,0x6bcbf));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(_0x52090a,_0x41b11a){const _0x2eb8d0=_0x3d1b,_0x15dc65={'RaBNf':function(_0x114051,_0x339e43){return _0x114051&_0x339e43;},'LvGPE':function(_0x3586d8,_0x16f605){return _0x3586d8+_0x16f605;},'hlkGl':function(_0x16e10a,_0x384497){return _0x16e10a&_0x384497;},'bQQsM':function(_0xec0ce2,_0x15a060){return _0xec0ce2-_0x15a060;},'eHeQw':function(_0x5abf76,_0x5344af){return _0x5abf76*_0x5344af;}};if(_0x41b11a>=_0x52090a[_0x2eb8d0(0x15d)])return[0x0,0x0];const _0x1e5ce3=_0x52090a[_0x41b11a];let _0x35daf9=0x1,_0x11d5c6=0x80;while(_0x35daf9<=0x8&&!_0x15dc65[_0x2eb8d0(0x154)](_0x1e5ce3,_0x11d5c6)){_0x35daf9++,_0x11d5c6>>=0x1;}if(_0x15dc65[_0x2eb8d0(0x176)](_0x41b11a,_0x35daf9)>_0x52090a[_0x2eb8d0(0x15d)])return[0x0,0x0];let _0x39a0fa=_0x15dc65['hlkGl'](_0x1e5ce3,_0x15dc65['bQQsM'](_0x11d5c6,0x1));for(let _0x292dc8=0x1;_0x292dc8<_0x35daf9;_0x292dc8++){_0x39a0fa=_0x15dc65['LvGPE'](_0x15dc65['eHeQw'](_0x39a0fa,0x100),_0x52090a[_0x41b11a+_0x292dc8]);}return[_0x39a0fa,_0x35daf9];}function readId(_0x5ec4ba,_0x56f73b){const _0x136c5c=_0x3d1b,_0x340d8a={'bDIjm':function(_0x302052,_0x52c70e){return _0x302052>=_0x52c70e;},'sixuh':function(_0x5d94dc,_0x2167bf){return _0x5d94dc>_0x2167bf;},'QMlni':function(_0x5b4d03,_0x58bb88){return _0x5b4d03+_0x58bb88;},'YNwrc':function(_0x164b16,_0x20d1c0){return _0x164b16<_0x20d1c0;},'ZctrL':function(_0x3fb11d,_0x57953e){return _0x3fb11d*_0x57953e;}};if(_0x340d8a[_0x136c5c(0x13c)](_0x56f73b,_0x5ec4ba['length']))return[0x0,0x0];const _0x286eee=_0x5ec4ba[_0x56f73b];let _0x875209;if(_0x286eee>=0x80)_0x875209=0x1;else{if(_0x286eee>=0x40)_0x875209=0x2;else{if(_0x286eee>=0x20)_0x875209=0x3;else{if(_0x286eee>=0x10)_0x875209=0x4;else return[_0x286eee,0x1];}}}if(_0x340d8a[_0x136c5c(0x14f)](_0x340d8a[_0x136c5c(0x14c)](_0x56f73b,_0x875209),_0x5ec4ba[_0x136c5c(0x15d)]))return[0x0,0x0];let _0x23effa=0x0;for(let _0x50e088=0x0;_0x340d8a['YNwrc'](_0x50e088,_0x875209);_0x50e088++){_0x23effa=_0x340d8a[_0x136c5c(0x14c)](_0x340d8a[_0x136c5c(0x14b)](_0x23effa,0x100),_0x5ec4ba[_0x56f73b+_0x50e088]);}return[_0x23effa,_0x875209];}function readUint(_0x1db14c,_0x3454fe,_0x25271e){const _0x3d3409=_0x3d1b,_0x206458={'RJQtv':function(_0x50e74d,_0x5c636b){return _0x50e74d+_0x5c636b;}};let _0x2684da=0x0;for(let _0x49bea9=0x0;_0x49bea9<_0x25271e;_0x49bea9++){_0x2684da=_0x206458[_0x3d3409(0x139)](_0x2684da*0x100,_0x1db14c[_0x206458[_0x3d3409(0x139)](_0x3454fe,_0x49bea9)]);}return _0x2684da;}function isUnknownSize(_0x229c3a,_0x391a68){const _0x45a845={'RgbTW':function(_0x26e6fc,_0x5ecc2b){return _0x26e6fc===_0x5ecc2b;},'VYACC':function(_0x2bd3b0,_0x1dd407){return _0x2bd3b0-_0x1dd407;},'rHzZB':function(_0x4eb170,_0x2b77a8){return _0x4eb170*_0x2b77a8;}};return _0x45a845['RgbTW'](_0x229c3a,_0x45a845['VYACC'](Math['pow'](0x2,_0x45a845['rHzZB'](0x7,_0x391a68)),0x1));}function writeVint(_0x31b180,_0x1d82cd){const _0x5a4572=_0x3d1b,_0x41a8dc={'gEgRV':function(_0x2e8b9e,_0xe569ac){return _0x2e8b9e<_0xe569ac;},'RKPPk':function(_0x4cd9cb,_0x36b507){return _0x4cd9cb&_0x36b507;},'ZoiFQ':function(_0x11ee37,_0x125eb5){return _0x11ee37/_0x125eb5;},'zdLil':function(_0x12959b,_0x51a407){return _0x12959b<<_0x51a407;},'XkzAo':function(_0x500278,_0x16d1be){return _0x500278-_0x16d1be;}};let _0x4aae12=_0x1d82cd||0x1;while(_0x41a8dc['gEgRV'](Math['pow'](0x2,0x7*_0x4aae12)-0x2,_0x31b180))_0x4aae12++;const _0x2250a7=Buffer['alloc'](_0x4aae12);for(let _0x537b03=_0x4aae12-0x1;_0x537b03>=0x0;_0x537b03--){_0x2250a7[_0x537b03]=_0x41a8dc[_0x5a4572(0x162)](_0x31b180,0xff),_0x31b180=Math['floor'](_0x41a8dc['ZoiFQ'](_0x31b180,0x100));}return _0x2250a7[0x0]|=_0x41a8dc[_0x5a4572(0x165)](0x1,_0x41a8dc[_0x5a4572(0x16b)](0x8,_0x4aae12)),_0x2250a7;}function writeUint(_0x5e62d6,_0x47ea48){const _0x1850ca=_0x3d1b,_0x1c71a3={'RhtUc':function(_0x81af6,_0x1280a8){return _0x81af6-_0x1280a8;},'lTRUm':function(_0x227f71,_0x3bc50b){return _0x227f71/_0x3bc50b;}},_0x1e0283=Buffer['alloc'](_0x47ea48);for(let _0x2c0712=_0x1c71a3[_0x1850ca(0x13f)](_0x47ea48,0x1);_0x2c0712>=0x0;_0x2c0712--){_0x1e0283[_0x2c0712]=_0x5e62d6&0xff,_0x5e62d6=Math['floor'](_0x1c71a3[_0x1850ca(0x175)](_0x5e62d6,0x100));}return _0x1e0283;}function writeUnknownSizeVint(_0x488186){const _0x5cb3d6=_0x3d1b,_0x5c6e04={'fvaaQ':function(_0x29b9da,_0x280c0a){return _0x29b9da>>_0x280c0a;},'XoEju':function(_0x20276b,_0x334753){return _0x20276b-_0x334753;}},_0x5e0d9d=Buffer['alloc'](_0x488186,0xff);return _0x5e0d9d[0x0]=_0x5c6e04['fvaaQ'](0xff,_0x5c6e04[_0x5cb3d6(0x16d)](_0x488186,0x1)),_0x5e0d9d;}function uintSize(_0x2ed362){if(_0x2ed362===0x0)return 0x1;let _0x53c2ff=0x0,_0x1803cf=_0x2ed362;while(_0x1803cf>0x0){_0x53c2ff++,_0x1803cf=Math['floor'](_0x1803cf/0x100);}return _0x53c2ff;}function findTimestampScale(_0x544801,_0x369927){const _0x3ec713=_0x3d1b,_0x3a1d57={'tMnOD':function(_0x208b00,_0x4bc0c5){return _0x208b00+_0x4bc0c5;},'DthXO':function(_0x4d3f8e,_0xde6e86){return _0x4d3f8e<_0xde6e86;},'sUrUy':function(_0x4b82ed,_0x1ba2db){return _0x4b82ed+_0x1ba2db;},'YWINM':function(_0x1e39d2,_0x1ddf3b){return _0x1e39d2<_0x1ddf3b;},'dcgLM':function(_0x3f0986,_0x1e1c4f,_0x4e910e){return _0x3f0986(_0x1e1c4f,_0x4e910e);}};let _0x3bb8a6=_0x369927;const _0x3eb4a0=Math[_0x3ec713(0x178)](_0x544801['length'],_0x3a1d57['tMnOD'](_0x369927,0x2710));while(_0x3a1d57[_0x3ec713(0x138)](_0x3bb8a6,_0x3eb4a0)){const [_0x2f7d96,_0x140a07]=readId(_0x544801,_0x3bb8a6),[_0x3b5de1,_0x4010ab]=readVint(_0x544801,_0x3a1d57['tMnOD'](_0x3bb8a6,_0x140a07));if(_0x2f7d96===ID_INFO){let _0x113e7c=_0x3a1d57[_0x3ec713(0x149)](_0x3a1d57[_0x3ec713(0x149)](_0x3bb8a6,_0x140a07),_0x4010ab);const _0x2c92c6=_0x113e7c+_0x3b5de1;while(_0x3a1d57[_0x3ec713(0x147)](_0x113e7c,_0x2c92c6)){const [_0x1b27ce,_0x87f94c]=readId(_0x544801,_0x113e7c),[_0x88fdca,_0x325acb]=_0x3a1d57['dcgLM'](readVint,_0x544801,_0x113e7c+_0x87f94c);if(_0x1b27ce===ID_TIMESTAMP_SCALE)return readUint(_0x544801,_0x113e7c+_0x87f94c+_0x325acb,_0x88fdca);_0x113e7c+=_0x3a1d57[_0x3ec713(0x143)](_0x87f94c,_0x325acb)+_0x88fdca;}break;}if(_0x2f7d96===ID_CLUSTER)break;if(isUnknownSize(_0x3b5de1,_0x4010ab))break;_0x3bb8a6+=_0x140a07+_0x4010ab+_0x3b5de1;}return 0xf4240;}function findFirstClusterOffset(_0x4e4adc,_0x5caf84){const _0x1b68de=_0x3d1b,_0x2acc86={'mwYrz':function(_0x2f7f64,_0x5f0fd7,_0x521b2b){return _0x2f7f64(_0x5f0fd7,_0x521b2b);},'igaXS':function(_0x5d624b,_0x1e0915){return _0x5d624b+_0x1e0915;}};let _0x2380dc=_0x5caf84;while(_0x2380dc<_0x4e4adc[_0x1b68de(0x15d)]){const [_0x3d8693,_0x59aff6]=_0x2acc86['mwYrz'](readId,_0x4e4adc,_0x2380dc);if(_0x3d8693===ID_CLUSTER)return _0x2380dc;const [_0x206602,_0x2f29a2]=readVint(_0x4e4adc,_0x2acc86[_0x1b68de(0x16e)](_0x2380dc,_0x59aff6));if(isUnknownSize(_0x206602,_0x2f29a2))return _0x2380dc;_0x2380dc+=_0x2acc86[_0x1b68de(0x16e)](_0x59aff6+_0x2f29a2,_0x206602);}return _0x4e4adc[_0x1b68de(0x15d)];}function findClusterEnd(_0x4738a1,_0x15f95b,_0x35a79c,_0x464d81){const _0x7695be=_0x3d1b,_0x9c9349={'CMuxu':function(_0x2db85c,_0x68878,_0x22a965){return _0x2db85c(_0x68878,_0x22a965);},'zJswy':function(_0x34f823,_0x58fa06){return _0x34f823+_0x58fa06;},'nuzPb':function(_0x4ae16f,_0x456463){return _0x4ae16f-_0x456463;},'tISWA':function(_0x18b739,_0x4ffea8,_0x357c72){return _0x18b739(_0x4ffea8,_0x357c72);}};if(!_0x9c9349[_0x7695be(0x150)](isUnknownSize,_0x35a79c,_0x464d81))return _0x9c9349[_0x7695be(0x15f)](_0x15f95b,_0x35a79c);const _0x5ce63f=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x3816b4=_0x15f95b;while(_0x3816b4<_0x9c9349[_0x7695be(0x17d)](_0x4738a1[_0x7695be(0x15d)],0x4)){const [_0x3cbafb,_0x43e1c6]=readId(_0x4738a1,_0x3816b4);if(_0x5ce63f[_0x7695be(0x157)](_0x3cbafb))return _0x3816b4;const [_0x23fb86,_0x165f35]=_0x9c9349[_0x7695be(0x152)](readVint,_0x4738a1,_0x3816b4+_0x43e1c6);if(isUnknownSize(_0x23fb86,_0x165f35))return _0x4738a1['length'];_0x3816b4+=_0x43e1c6+_0x165f35+_0x23fb86;}return _0x4738a1['length'];}function extractClusters(_0x378a5e,_0xf79054){const _0x46bee2=_0x3d1b,_0x13957f={'qWirD':function(_0x59586a,_0x4d0767){return _0x59586a<_0x4d0767;},'pepzh':function(_0x379df1,_0x4a3b6c){return _0x379df1+_0x4a3b6c;},'KtBlb':function(_0xf166d8,_0x2dbc5a){return _0xf166d8+_0x2dbc5a;},'jEQWM':function(_0x5008db,_0x23a951){return _0x5008db+_0x23a951;},'joabA':function(_0x5f1843,_0x266e30){return _0x5f1843+_0x266e30;},'spqii':function(_0x55d04f,_0x153164,_0x59a17d){return _0x55d04f(_0x153164,_0x59a17d);},'VZffJ':function(_0x2e92e5,_0x23f4dd){return _0x2e92e5===_0x23f4dd;},'kIkFL':function(_0xc3f9eb,_0x227365,_0x2c1517){return _0xc3f9eb(_0x227365,_0x2c1517);},'OWApi':function(_0x437131,_0x38d4b1,_0x5c5a49){return _0x437131(_0x38d4b1,_0x5c5a49);},'Jwfkw':function(_0x4c0afb,_0x3ee29a,_0xb6759){return _0x4c0afb(_0x3ee29a,_0xb6759);},'mgQyC':function(_0x1995e0,_0x3739b5){return _0x1995e0+_0x3739b5;},'Uygih':function(_0x2bce5c,_0x245102){return _0x2bce5c===_0x245102;}},_0x5600a2=[],_0x4027e0=Buffer[_0x46bee2(0x156)]([0x1f,0x43,0xb6,0x75]);let _0x12376d=0x0;while(_0x13957f[_0x46bee2(0x159)](_0x12376d,_0x378a5e['length'])){const _0x2bcbee=_0x378a5e[_0x46bee2(0x15b)](_0x4027e0,_0x12376d);if(_0x2bcbee===-0x1)break;const [_0x480c23,_0x5ceb83]=readId(_0x378a5e,_0x2bcbee);if(_0x480c23!==ID_CLUSTER){_0x12376d=_0x13957f[_0x46bee2(0x17b)](_0x2bcbee,0x1);continue;}const [_0xc523fc,_0x3229f0]=readVint(_0x378a5e,_0x13957f['KtBlb'](_0x2bcbee,_0x5ceb83)),_0x51ec52=_0x13957f[_0x46bee2(0x17a)](_0x13957f['joabA'](_0x2bcbee,_0x5ceb83),_0x3229f0),_0x19c53f=findClusterEnd(_0x378a5e,_0x51ec52,_0xc523fc,_0x3229f0);let _0x2fb46c=_0x51ec52,_0xc3d029=0x0,_0x458662=0x2,_0x2a74b4=![],_0x8128d8=Buffer['alloc'](0x0),_0x5254b0=Buffer['alloc'](0x0);while(_0x13957f[_0x46bee2(0x159)](_0x2fb46c,_0x19c53f)){const [_0x14a601,_0x4d9d82]=readId(_0x378a5e,_0x2fb46c),[_0xfe7372,_0xb47e9d]=_0x13957f['spqii'](readVint,_0x378a5e,_0x13957f[_0x46bee2(0x17a)](_0x2fb46c,_0x4d9d82));if(_0x13957f[_0x46bee2(0x164)](_0x14a601,ID_TIMESTAMP)){_0xc3d029=readUint(_0x378a5e,_0x13957f[_0x46bee2(0x17b)](_0x2fb46c,_0x4d9d82)+_0xb47e9d,_0xfe7372),_0x458662=_0xfe7372,_0x2a74b4=!![],_0x8128d8=_0x378a5e[_0x46bee2(0x17c)](_0x51ec52,_0x2fb46c);const _0x2f48eb=_0x13957f['KtBlb'](_0x2fb46c+_0x4d9d82+_0xb47e9d,_0xfe7372);_0x5254b0=_0x378a5e[_0x46bee2(0x17c)](_0x2f48eb,_0x19c53f);break;}if(_0x14a601===ID_CLUSTER)break;if(_0x13957f[_0x46bee2(0x14a)](isUnknownSize,_0xfe7372,_0xb47e9d))break;_0x2fb46c+=_0x13957f['pepzh'](_0x4d9d82,_0xb47e9d)+_0xfe7372;}!_0x2a74b4&&(_0x5254b0=_0x378a5e[_0x46bee2(0x17c)](_0x51ec52,_0x19c53f));let _0x4f22d8=_0xc3d029;_0x2fb46c=_0x51ec52;while(_0x2fb46c<_0x19c53f){const [_0x5c6d65,_0x2cb6d5]=_0x13957f[_0x46bee2(0x13b)](readId,_0x378a5e,_0x2fb46c),[_0x32b789,_0x49f8cf]=_0x13957f['Jwfkw'](readVint,_0x378a5e,_0x13957f[_0x46bee2(0x177)](_0x2fb46c,_0x2cb6d5));if(_0x13957f['Uygih'](_0x5c6d65,ID_SIMPLE_BLOCK)&&_0x32b789>=0x4){const _0x46ca95=_0x13957f['pepzh'](_0x2fb46c+_0x2cb6d5,_0x49f8cf),[,_0x4f6507]=_0x13957f[_0x46bee2(0x14a)](readVint,_0x378a5e,_0x46ca95),_0x5af8d8=_0x378a5e[_0x46bee2(0x168)](_0x46ca95+_0x4f6507),_0x1b42a0=_0xc3d029+_0x5af8d8;if(_0x1b42a0>_0x4f22d8)_0x4f22d8=_0x1b42a0;}if(_0x13957f[_0x46bee2(0x170)](_0x5c6d65,ID_CLUSTER))break;if(isUnknownSize(_0x32b789,_0x49f8cf))break;_0x2fb46c+=_0x2cb6d5+_0x49f8cf+_0x32b789;}_0x5600a2[_0x46bee2(0x155)]({'timestamp':_0xc3d029,'maxTicks':_0x4f22d8,'bodyBeforeTimestamp':_0x8128d8,'bodyAfterTimestamp':_0x5254b0,'timestampElementSize':_0x458662}),_0x12376d=_0x19c53f;}return _0x5600a2;}function parseWebm(_0xbb9994){const _0x507abe=_0x3d1b,_0x314f8e={'PLCdG':function(_0x4174f8,_0x3732d0,_0xe6d72c){return _0x4174f8(_0x3732d0,_0xe6d72c);},'vnjwe':function(_0x54e713,_0x49d897){return _0x54e713+_0x49d897;},'ZHhmY':function(_0x4428f8,_0x49ca6d){return _0x4428f8!==_0x49ca6d;},'xVlnd':function(_0x9936e4,_0x3e11f9){return _0x9936e4+_0x3e11f9;}};let _0x522416=0x0;const [,_0x1af934]=readId(_0xbb9994,_0x522416),[_0x3ba0af,_0x5629ee]=_0x314f8e['PLCdG'](readVint,_0xbb9994,_0x314f8e['vnjwe'](_0x522416,_0x1af934));_0x522416+=_0x314f8e['vnjwe'](_0x1af934,_0x5629ee)+_0x3ba0af;const [_0x464364,_0x1d9a14]=_0x314f8e['PLCdG'](readId,_0xbb9994,_0x522416);if(_0x314f8e['ZHhmY'](_0x464364,ID_SEGMENT))return null;const [,_0x23aa8a]=readVint(_0xbb9994,_0x314f8e['xVlnd'](_0x522416,_0x1d9a14)),_0x288932=_0x314f8e[_0x507abe(0x137)](_0x522416+_0x1d9a14,_0x23aa8a),_0x4e320e=findTimestampScale(_0xbb9994,_0x288932),_0x739756=_0x314f8e[_0x507abe(0x141)](findFirstClusterOffset,_0xbb9994,_0x288932),_0x2ddb43=_0xbb9994['slice'](0x0,_0x739756),_0x24ca45=extractClusters(_0xbb9994,_0x4e320e);let _0x57dbb3=0x0;for(const _0x4c8555 of _0x24ca45){if(_0x4c8555['maxTicks']>_0x57dbb3)_0x57dbb3=_0x4c8555['maxTicks'];}return{'header':_0x2ddb43,'clusters':_0x24ca45,'timestampScale':_0x4e320e,'maxTimestampTicks':_0x57dbb3};}function buildCluster(_0x43ac83,_0x4513d3,_0x419cde){const _0x41a95b=_0x3d1b,_0x2fa2f1={'JIacK':function(_0x1f96cc,_0x741cd8){return _0x1f96cc(_0x741cd8);},'NXWZs':function(_0x52df40,_0x3db115,_0x40a61f){return _0x52df40(_0x3db115,_0x40a61f);}},_0x2651cc=Buffer[_0x41a95b(0x156)]([0x1f,0x43,0xb6,0x75]),_0x32da9b=Math[_0x41a95b(0x179)](0x4,uintSize(_0x43ac83)),_0x4e57c6=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x2fa2f1[_0x41a95b(0x174)](writeVint,_0x32da9b),_0x2fa2f1[_0x41a95b(0x13d)](writeUint,_0x43ac83,_0x32da9b)]),_0x5b04bf=Buffer[_0x41a95b(0x144)]([_0x4513d3,_0x4e57c6,_0x419cde]),_0x3a8b3e=writeVint(_0x5b04bf['length']);return Buffer[_0x41a95b(0x144)]([_0x2651cc,_0x3a8b3e,_0x5b04bf]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x58e1e3){const _0x549091=_0x3d1b,_0x169d42={'xcdsT':function(_0x17e3fa,_0x116500,_0x1a069a){return _0x17e3fa(_0x116500,_0x1a069a);},'YQDSW':function(_0xecf620,_0x59f50c){return _0xecf620+_0x59f50c;},'ZSBVt':function(_0x1587ef,_0x448b6b){return _0x1587ef+_0x448b6b;},'PXidD':function(_0x375942,_0x5d93e8){return _0x375942(_0x5d93e8);},'JKMjM':function(_0x32a95c,_0x1c7bdd){return _0x32a95c+_0x1c7bdd;},'BNoGv':function(_0x142794,_0xd91947){return _0x142794<_0xd91947;},'fTcYm':function(_0x859bdf,_0x5900cb){return _0x859bdf===_0x5900cb;},'LTULw':function(_0x256e8f,_0x3fc284,_0x74755f){return _0x256e8f(_0x3fc284,_0x74755f);},'oqhYj':function(_0x2ff493,_0x3b455a,_0x21ebb0){return _0x2ff493(_0x3b455a,_0x21ebb0);},'UQjCa':function(_0x424e60,_0x323f04){return _0x424e60!==_0x323f04;},'IvewX':function(_0x1b8185,_0x1d78bd){return _0x1b8185+_0x1d78bd;}},_0x1f0bdf=Buffer[_0x549091(0x156)](_0x58e1e3);let _0x30ffa3=0x0;const [,_0x311e95]=_0x169d42[_0x549091(0x173)](readId,_0x1f0bdf,_0x30ffa3),[_0x1ad622,_0x5351ad]=readVint(_0x1f0bdf,_0x169d42['YQDSW'](_0x30ffa3,_0x311e95)),_0x2b5c71=_0x169d42['YQDSW'](_0x169d42[_0x549091(0x142)](_0x30ffa3,_0x311e95),_0x5351ad)+_0x1ad622,[,_0x58c358]=readId(_0x1f0bdf,_0x2b5c71),[,_0x5cef23]=readVint(_0x1f0bdf,_0x169d42['YQDSW'](_0x2b5c71,_0x58c358)),_0x181d5b=_0x2b5c71+_0x58c358+_0x5cef23,_0x168ea2=_0x169d42['PXidD'](writeUnknownSizeVint,_0x5cef23);_0x168ea2['copy'](_0x1f0bdf,_0x2b5c71+_0x58c358);let _0x2593de=_0x181d5b;const _0x439f32=Math[_0x549091(0x178)](_0x1f0bdf[_0x549091(0x15d)],_0x169d42[_0x549091(0x169)](_0x181d5b,0x2710));while(_0x169d42[_0x549091(0x17e)](_0x2593de,_0x439f32)){const [_0xa7ba0,_0x57b305]=readId(_0x1f0bdf,_0x2593de),[_0x2aaa60,_0x4130e3]=readVint(_0x1f0bdf,_0x169d42['YQDSW'](_0x2593de,_0x57b305));if(_0xa7ba0===ID_CLUSTER)break;if(isUnknownSize(_0x2aaa60,_0x4130e3))break;if(_0x169d42['fTcYm'](_0xa7ba0,ID_INFO)){const _0x2a649a=_0x169d42['ZSBVt'](_0x2593de,_0x57b305)+_0x4130e3,_0xb8a63f=_0x2a649a+_0x2aaa60,_0x3b865d=[];let _0x241eff=_0x2a649a;while(_0x169d42['BNoGv'](_0x241eff,_0xb8a63f)){const [_0x4f61bd,_0x541060]=_0x169d42[_0x549091(0x153)](readId,_0x1f0bdf,_0x241eff),[_0xc838f2,_0xb1785a]=_0x169d42['oqhYj'](readVint,_0x1f0bdf,_0x169d42[_0x549091(0x169)](_0x241eff,_0x541060)),_0x213828=_0x541060+_0xb1785a+_0xc838f2;_0x169d42['UQjCa'](_0x4f61bd,ID_DURATION)&&_0x3b865d[_0x549091(0x155)](_0x1f0bdf['slice'](_0x241eff,_0x169d42['IvewX'](_0x241eff,_0x213828))),_0x241eff+=_0x213828;}const _0x4ab40c=Buffer[_0x549091(0x144)](_0x3b865d),_0xf015f5=Buffer['concat']([_0x1f0bdf['slice'](_0x2593de,_0x2593de+_0x57b305),writeVint(_0x4ab40c[_0x549091(0x15d)],_0x4130e3)]);return Buffer['concat']([_0x1f0bdf['slice'](0x0,_0x2593de),_0xf015f5,_0x4ab40c,_0x1f0bdf['slice'](_0xb8a63f)]);}_0x2593de+=_0x169d42['IvewX'](_0x57b305+_0x4130e3,_0x2aaa60);}return _0x1f0bdf;}function _0x3d1b(_0x8b55e1,_0x3f8ea7){_0x8b55e1=_0x8b55e1-0x137;const _0xc9b9ee=_0xc9b9();let _0x3d1b19=_0xc9b9ee[_0x8b55e1];return _0x3d1b19;}export function stitchWebmFiles(_0x387063,_0x4fb7e2){const _0x531988=_0x3d1b,_0x1be94f={'hrYtb':function(_0x19db4c,_0x3f1a50){return _0x19db4c(_0x3f1a50);},'aSCeJ':function(_0x590304,_0x2d17ec){return _0x590304<_0x2d17ec;},'gflYX':function(_0x521098,_0x1b6a3a){return _0x521098+_0x1b6a3a;},'rZITM':function(_0x2e3b18,_0x2500aa,_0x3abe39){return _0x2e3b18(_0x2500aa,_0x3abe39);}};if(_0x387063['length']<=0x1)return![];const _0x3a10f0=[];for(const _0x541eb1 of _0x387063){const _0x5c427f=readFileSync(_0x541eb1),_0x7a765=parseWebm(_0x5c427f);if(!_0x7a765||_0x7a765['clusters']['length']===0x0)return![];_0x3a10f0['push'](_0x7a765);}const _0x43b58e=_0x3a10f0[0x0],_0xa670d1=_0x1be94f['hrYtb'](rebuildHeaderWithoutDuration,_0x43b58e[_0x531988(0x158)]),_0x96208c=[_0xa670d1];let _0x477070=0x0;for(let _0x5d5be9=0x0;_0x1be94f[_0x531988(0x145)](_0x5d5be9,_0x3a10f0['length']);_0x5d5be9++){const _0x49e2f8=_0x3a10f0[_0x5d5be9];for(const _0x1d5aba of _0x49e2f8['clusters']){const _0x3964da=_0x1d5aba['timestamp']+_0x477070;_0x96208c['push'](buildCluster(_0x3964da,_0x1d5aba['bodyBeforeTimestamp'],_0x1d5aba['bodyAfterTimestamp']));}const _0x1d2f9f=0x1e;_0x477070+=_0x1be94f[_0x531988(0x13a)](_0x49e2f8['maxTimestampTicks'],_0x1d2f9f);}return _0x1be94f['rZITM'](writeFileSync,_0x4fb7e2,Buffer['concat'](_0x96208c)),!![];}if(process['argv'][0x1]?.[_0x2e7af9(0x161)]('stitchWebmFiles.ts')||process[_0x2e7af9(0x167)][0x1]?.[_0x2e7af9(0x161)]('stitchWebmFiles.js')){const args=process[_0x2e7af9(0x167)][_0x2e7af9(0x17c)](0x2);args[_0x2e7af9(0x15d)]<0x3&&(console[_0x2e7af9(0x160)](_0x2e7af9(0x172)),process[_0x2e7af9(0x16c)](0x1));const output=args[args['length']-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x2e7af9(0x16f)]('Stitched\x20'+inputs['length']+_0x2e7af9(0x140)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x41fddb=_0xaf97;(function(_0x433d5d,_0x365b73){const _0x9bb8c5=_0xaf97,_0x32f37d=_0x433d5d();while(!![]){try{const _0x341a32=parseInt(_0x9bb8c5(0x1f9))/0x1*(parseInt(_0x9bb8c5(0x223))/0x2)+parseInt(_0x9bb8c5(0x22b))/0x3+parseInt(_0x9bb8c5(0x23b))/0x4*(-parseInt(_0x9bb8c5(0x1f8))/0x5)+-parseInt(_0x9bb8c5(0x1fa))/0x6+parseInt(_0x9bb8c5(0x214))/0x7+-parseInt(_0x9bb8c5(0x224))/0x8+parseInt(_0x9bb8c5(0x22e))/0x9*(parseInt(_0x9bb8c5(0x227))/0xa);if(_0x341a32===_0x365b73)break;else _0x32f37d['push'](_0x32f37d['shift']());}catch(_0x1c5059){_0x32f37d['push'](_0x32f37d['shift']());}}}(_0x4c3a,0xe51b1));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(_0x35e821,_0x12c29a){const _0x4496e4=_0xaf97,_0x1c0c4d={'ynKvl':function(_0x3b2201,_0x4223b1){return _0x3b2201<=_0x4223b1;},'RiBmf':function(_0x3f6018,_0x5ecb0c){return _0x3f6018&_0x5ecb0c;},'zpnJX':function(_0x32d4a5,_0x491873){return _0x32d4a5>_0x491873;},'dcYzN':function(_0x3a9034,_0xc7fbf7){return _0x3a9034+_0xc7fbf7;},'VDzVr':function(_0x13af18,_0x4bca30){return _0x13af18-_0x4bca30;},'KDexJ':function(_0x1825e9,_0x2fabfa){return _0x1825e9<_0x2fabfa;}};if(_0x12c29a>=_0x35e821['length'])return[0x0,0x0];const _0x14d3d9=_0x35e821[_0x12c29a];let _0x22cddf=0x1,_0xbef188=0x80;while(_0x1c0c4d[_0x4496e4(0x226)](_0x22cddf,0x8)&&!_0x1c0c4d['RiBmf'](_0x14d3d9,_0xbef188)){_0x22cddf++,_0xbef188>>=0x1;}if(_0x1c0c4d[_0x4496e4(0x1f2)](_0x1c0c4d[_0x4496e4(0x228)](_0x12c29a,_0x22cddf),_0x35e821[_0x4496e4(0x1fe)]))return[0x0,0x0];let _0xb86c4c=_0x14d3d9&_0x1c0c4d[_0x4496e4(0x20e)](_0xbef188,0x1);for(let _0x37ccd2=0x1;_0x1c0c4d['KDexJ'](_0x37ccd2,_0x22cddf);_0x37ccd2++){_0xb86c4c=_0x1c0c4d[_0x4496e4(0x228)](_0xb86c4c*0x100,_0x35e821[_0x12c29a+_0x37ccd2]);}return[_0xb86c4c,_0x22cddf];}function readId(_0x59e51d,_0x26706f){const _0x5b4f0a=_0xaf97,_0xe2d0f9={'JKOzV':function(_0x5e0380,_0x2de920){return _0x5e0380>=_0x2de920;},'uuICG':function(_0x2380bd,_0x15205f){return _0x2380bd+_0x15205f;}};if(_0x26706f>=_0x59e51d[_0x5b4f0a(0x1fe)])return[0x0,0x0];const _0x1097ed=_0x59e51d[_0x26706f];let _0x5a876c;if(_0x1097ed>=0x80)_0x5a876c=0x1;else{if(_0x1097ed>=0x40)_0x5a876c=0x2;else{if(_0x1097ed>=0x20)_0x5a876c=0x3;else{if(_0xe2d0f9[_0x5b4f0a(0x222)](_0x1097ed,0x10))_0x5a876c=0x4;else return[_0x1097ed,0x1];}}}if(_0xe2d0f9['uuICG'](_0x26706f,_0x5a876c)>_0x59e51d[_0x5b4f0a(0x1fe)])return[0x0,0x0];let _0x4263a0=0x0;for(let _0x461450=0x0;_0x461450<_0x5a876c;_0x461450++){_0x4263a0=_0x4263a0*0x100+_0x59e51d[_0x26706f+_0x461450];}return[_0x4263a0,_0x5a876c];}function readUint(_0x3e2c88,_0x4a963f,_0x3f583a){const _0x3fef4a=_0xaf97,_0x1b7280={'gZlMq':function(_0x10039e,_0x5d88b1){return _0x10039e<_0x5d88b1;},'BKdri':function(_0x52d94f,_0x305448){return _0x52d94f*_0x305448;}};let _0x11fc48=0x0;for(let _0x122e7e=0x0;_0x1b7280['gZlMq'](_0x122e7e,_0x3f583a);_0x122e7e++){_0x11fc48=_0x1b7280[_0x3fef4a(0x22a)](_0x11fc48,0x100)+_0x3e2c88[_0x4a963f+_0x122e7e];}return _0x11fc48;}function isUnknownSize(_0x4a72e6,_0x55b0da){const _0x5c17a7=_0xaf97,_0x5c063a={'yuiYa':function(_0x22c958,_0x28602a){return _0x22c958===_0x28602a;},'jxwEQ':function(_0x222add,_0x51d3b3){return _0x222add-_0x51d3b3;},'uTgvV':function(_0x1d8591,_0x2dd9eb){return _0x1d8591*_0x2dd9eb;}};return _0x5c063a[_0x5c17a7(0x204)](_0x4a72e6,_0x5c063a[_0x5c17a7(0x20f)](Math['pow'](0x2,_0x5c063a[_0x5c17a7(0x212)](0x7,_0x55b0da)),0x1));}function writeVint(_0x1c0f05,_0x2958ee){const _0x563d3b=_0xaf97,_0x10add4={'gBuUO':function(_0x126aa1,_0xda9591){return _0x126aa1||_0xda9591;},'wQQGd':function(_0x1c40cb,_0x5cc521){return _0x1c40cb<_0x5cc521;},'KpMQE':function(_0x167fe3,_0x56d6b0){return _0x167fe3*_0x56d6b0;},'wYiOh':function(_0x1de329,_0x5a1a42){return _0x1de329>=_0x5a1a42;},'QaOhd':function(_0x11fdb3,_0x5019d6){return _0x11fdb3<<_0x5019d6;},'gQpcw':function(_0x4247e4,_0x1851d8){return _0x4247e4-_0x1851d8;}};let _0x1ce0c8=_0x10add4['gBuUO'](_0x2958ee,0x1);while(_0x10add4['wQQGd'](Math['pow'](0x2,_0x10add4[_0x563d3b(0x238)](0x7,_0x1ce0c8))-0x2,_0x1c0f05))_0x1ce0c8++;const _0x2046cd=Buffer[_0x563d3b(0x22d)](_0x1ce0c8);for(let _0x49745f=_0x1ce0c8-0x1;_0x10add4['wYiOh'](_0x49745f,0x0);_0x49745f--){_0x2046cd[_0x49745f]=_0x1c0f05&0xff,_0x1c0f05=Math['floor'](_0x1c0f05/0x100);}return _0x2046cd[0x0]|=_0x10add4['QaOhd'](0x1,_0x10add4['gQpcw'](0x8,_0x1ce0c8)),_0x2046cd;}function writeUint(_0x13712d,_0x1c3490){const _0x374f9d=_0xaf97,_0x982baa={'quLsc':function(_0x3bb9e9,_0x1d2f13){return _0x3bb9e9/_0x1d2f13;}},_0x1b79bb=Buffer[_0x374f9d(0x22d)](_0x1c3490);for(let _0x867542=_0x1c3490-0x1;_0x867542>=0x0;_0x867542--){_0x1b79bb[_0x867542]=_0x13712d&0xff,_0x13712d=Math['floor'](_0x982baa[_0x374f9d(0x218)](_0x13712d,0x100));}return _0x1b79bb;}function writeUnknownSizeVint(_0x2fd136){const _0x445f6d=_0xaf97,_0x401461={'qoXPL':function(_0x4848d8,_0x3ab82c){return _0x4848d8>>_0x3ab82c;}},_0xc050b5=Buffer['alloc'](_0x2fd136,0xff);return _0xc050b5[0x0]=_0x401461[_0x445f6d(0x213)](0xff,_0x2fd136-0x1),_0xc050b5;}function _0xaf97(_0x5d8007,_0x4a9566){_0x5d8007=_0x5d8007-0x1f2;const _0x4c3a5b=_0x4c3a();let _0xaf97be=_0x4c3a5b[_0x5d8007];return _0xaf97be;}function uintSize(_0x1cfb06){const _0x2b9dcf=_0xaf97,_0xf8be6d={'GWZDI':function(_0x52dd49,_0x4eb787){return _0x52dd49>_0x4eb787;},'sSrEU':function(_0x445363,_0x129080){return _0x445363/_0x129080;}};if(_0x1cfb06===0x0)return 0x1;let _0x223d07=0x0,_0x148a6c=_0x1cfb06;while(_0xf8be6d[_0x2b9dcf(0x203)](_0x148a6c,0x0)){_0x223d07++,_0x148a6c=Math['floor'](_0xf8be6d[_0x2b9dcf(0x1fc)](_0x148a6c,0x100));}return _0x223d07;}function findTimestampScale(_0x4069b1,_0x9841c0){const _0x5aa8ff=_0xaf97,_0x48d7a0={'hVmcY':function(_0x1b30d6,_0x443b0c){return _0x1b30d6+_0x443b0c;},'PNDfq':function(_0x18fab7,_0x3a6e70){return _0x18fab7<_0x3a6e70;},'CajWV':function(_0xa0f41f,_0x3e5018,_0x1d7b33){return _0xa0f41f(_0x3e5018,_0x1d7b33);},'tZIAF':function(_0x337bee,_0x451046){return _0x337bee+_0x451046;},'YbVEo':function(_0x2f208c,_0x45bcf8){return _0x2f208c+_0x45bcf8;},'JNDDu':function(_0x255a91,_0x39d6f6){return _0x255a91+_0x39d6f6;},'ZKtpj':function(_0x4d97e6,_0x5e67b4){return _0x4d97e6<_0x5e67b4;},'pJQfs':function(_0x432b1e,_0x1bd91e,_0x1d10b5){return _0x432b1e(_0x1bd91e,_0x1d10b5);},'rEJSJ':function(_0x3af468,_0xc17b2a){return _0x3af468===_0xc17b2a;},'QGeFb':function(_0x40d1b4,_0x206b8a,_0x14077a,_0x290815){return _0x40d1b4(_0x206b8a,_0x14077a,_0x290815);}};let _0x26c11d=_0x9841c0;const _0x58dfe1=Math['min'](_0x4069b1['length'],_0x48d7a0['hVmcY'](_0x9841c0,0x2710));while(_0x48d7a0[_0x5aa8ff(0x20c)](_0x26c11d,_0x58dfe1)){const [_0x309127,_0x3e68fc]=readId(_0x4069b1,_0x26c11d),[_0x2d1be8,_0x55d0c3]=_0x48d7a0[_0x5aa8ff(0x215)](readVint,_0x4069b1,_0x48d7a0['tZIAF'](_0x26c11d,_0x3e68fc));if(_0x309127===ID_INFO){let _0x4deb72=_0x48d7a0[_0x5aa8ff(0x229)](_0x48d7a0[_0x5aa8ff(0x235)](_0x26c11d,_0x3e68fc),_0x55d0c3);const _0x3c0bf8=_0x4deb72+_0x2d1be8;while(_0x48d7a0[_0x5aa8ff(0x1f7)](_0x4deb72,_0x3c0bf8)){const [_0x4e2217,_0x4df968]=_0x48d7a0[_0x5aa8ff(0x1f5)](readId,_0x4069b1,_0x4deb72),[_0x532eb6,_0xcd27fc]=readVint(_0x4069b1,_0x4deb72+_0x4df968);if(_0x48d7a0['rEJSJ'](_0x4e2217,ID_TIMESTAMP_SCALE))return _0x48d7a0['QGeFb'](readUint,_0x4069b1,_0x48d7a0[_0x5aa8ff(0x235)](_0x4deb72+_0x4df968,_0xcd27fc),_0x532eb6);_0x4deb72+=_0x48d7a0['tZIAF'](_0x4df968+_0xcd27fc,_0x532eb6);}break;}if(_0x48d7a0['rEJSJ'](_0x309127,ID_CLUSTER))break;if(_0x48d7a0[_0x5aa8ff(0x215)](isUnknownSize,_0x2d1be8,_0x55d0c3))break;_0x26c11d+=_0x48d7a0[_0x5aa8ff(0x235)](_0x3e68fc,_0x55d0c3)+_0x2d1be8;}return 0xf4240;}function findFirstClusterOffset(_0x3757bc,_0x23d0e9){const _0x1f5766=_0xaf97,_0x98d9e={'gVpRj':function(_0x1cfc05,_0x31deb6){return _0x1cfc05+_0x31deb6;},'VQBWE':function(_0x4ea1c4,_0x1b0854,_0x2af178){return _0x4ea1c4(_0x1b0854,_0x2af178);}};let _0x58abf0=_0x23d0e9;while(_0x58abf0<_0x3757bc['length']){const [_0x2a1dac,_0x203d38]=readId(_0x3757bc,_0x58abf0);if(_0x2a1dac===ID_CLUSTER)return _0x58abf0;const [_0x3f8f7f,_0x341db6]=readVint(_0x3757bc,_0x98d9e['gVpRj'](_0x58abf0,_0x203d38));if(_0x98d9e['VQBWE'](isUnknownSize,_0x3f8f7f,_0x341db6))return _0x58abf0;_0x58abf0+=_0x98d9e[_0x1f5766(0x225)](_0x203d38,_0x341db6)+_0x3f8f7f;}return _0x3757bc['length'];}function findClusterEnd(_0x509ee1,_0x145d50,_0x2a2a35,_0x404b2b){const _0x222e96=_0xaf97,_0x2fc444={'TffmP':function(_0x9a6338,_0x412254,_0xe6e45b){return _0x9a6338(_0x412254,_0xe6e45b);},'CMjSz':function(_0x5c3bcf,_0x2a8899){return _0x5c3bcf+_0x2a8899;},'fFaoO':function(_0x213705,_0x49c072){return _0x213705<_0x49c072;}};if(!_0x2fc444['TffmP'](isUnknownSize,_0x2a2a35,_0x404b2b))return _0x2fc444[_0x222e96(0x207)](_0x145d50,_0x2a2a35);const _0x4f5e2d=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x3020b2=_0x145d50;while(_0x2fc444['fFaoO'](_0x3020b2,_0x509ee1[_0x222e96(0x1fe)]-0x4)){const [_0xdf3c63,_0x43f8cc]=readId(_0x509ee1,_0x3020b2);if(_0x4f5e2d['has'](_0xdf3c63))return _0x3020b2;const [_0xaf7cb5,_0x41c446]=readVint(_0x509ee1,_0x3020b2+_0x43f8cc);if(isUnknownSize(_0xaf7cb5,_0x41c446))return _0x509ee1['length'];_0x3020b2+=_0x43f8cc+_0x41c446+_0xaf7cb5;}return _0x509ee1[_0x222e96(0x1fe)];}function extractClusters(_0x5a9b56,_0x43a5ef){const _0x4e8e95=_0xaf97,_0x1f737d={'bOUhH':function(_0x57b353,_0x49d105){return _0x57b353<_0x49d105;},'hXrAq':function(_0x4f863d,_0x989cbd){return _0x4f863d+_0x989cbd;},'cFSPM':function(_0x1c26bd,_0x975cda,_0x52d831,_0x557b03,_0x21cd70){return _0x1c26bd(_0x975cda,_0x52d831,_0x557b03,_0x21cd70);},'nDSUR':function(_0x1fe12c,_0x1d70d6,_0x229a10){return _0x1fe12c(_0x1d70d6,_0x229a10);},'PcpBu':function(_0x30e777,_0x287d09,_0x1ffc93){return _0x30e777(_0x287d09,_0x1ffc93);},'AWsju':function(_0x1c8f85,_0x9d7b2a,_0x82983c,_0x481e6d){return _0x1c8f85(_0x9d7b2a,_0x82983c,_0x481e6d);},'GooqT':function(_0x26432,_0x148499){return _0x26432+_0x148499;},'jyTNf':function(_0x48331d,_0x1825a9){return _0x48331d+_0x1825a9;},'MDecU':function(_0x3ba811,_0x19cce9){return _0x3ba811<_0x19cce9;},'xEOpp':function(_0x3fcb5d,_0x5ee039){return _0x3fcb5d>=_0x5ee039;},'RTYEV':function(_0x2f6fab,_0x155ed7){return _0x2f6fab>_0x155ed7;},'pThIg':function(_0x35b29a,_0x146257,_0x579225){return _0x35b29a(_0x146257,_0x579225);}},_0x2a25d4=[],_0x2f7b40=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x468453=0x0;while(_0x1f737d[_0x4e8e95(0x21a)](_0x468453,_0x5a9b56[_0x4e8e95(0x1fe)])){const _0x349b06=_0x5a9b56['indexOf'](_0x2f7b40,_0x468453);if(_0x349b06===-0x1)break;const [_0x1be6c9,_0xedd768]=readId(_0x5a9b56,_0x349b06);if(_0x1be6c9!==ID_CLUSTER){_0x468453=_0x1f737d[_0x4e8e95(0x234)](_0x349b06,0x1);continue;}const [_0x196260,_0x5a3cc8]=readVint(_0x5a9b56,_0x349b06+_0xedd768),_0x326d1a=_0x349b06+_0xedd768+_0x5a3cc8,_0x1d8b18=_0x1f737d[_0x4e8e95(0x1fb)](findClusterEnd,_0x5a9b56,_0x326d1a,_0x196260,_0x5a3cc8);let _0x109903=_0x326d1a,_0x10418e=0x0,_0x380774=0x2,_0x4f06ac=![],_0x29ebd4=Buffer['alloc'](0x0),_0x410b40=Buffer[_0x4e8e95(0x22d)](0x0);while(_0x109903<_0x1d8b18){const [_0x302c7a,_0x1ac8d9]=_0x1f737d['nDSUR'](readId,_0x5a9b56,_0x109903),[_0x1518fa,_0x4da06e]=_0x1f737d[_0x4e8e95(0x21d)](readVint,_0x5a9b56,_0x109903+_0x1ac8d9);if(_0x302c7a===ID_TIMESTAMP){_0x10418e=_0x1f737d['AWsju'](readUint,_0x5a9b56,_0x1f737d['GooqT'](_0x109903,_0x1ac8d9)+_0x4da06e,_0x1518fa),_0x380774=_0x1518fa,_0x4f06ac=!![],_0x29ebd4=_0x5a9b56['slice'](_0x326d1a,_0x109903);const _0x468b44=_0x1f737d[_0x4e8e95(0x20d)](_0x1f737d['jyTNf'](_0x109903,_0x1ac8d9)+_0x4da06e,_0x1518fa);_0x410b40=_0x5a9b56['slice'](_0x468b44,_0x1d8b18);break;}if(_0x302c7a===ID_CLUSTER)break;if(isUnknownSize(_0x1518fa,_0x4da06e))break;_0x109903+=_0x1ac8d9+_0x4da06e+_0x1518fa;}!_0x4f06ac&&(_0x410b40=_0x5a9b56['slice'](_0x326d1a,_0x1d8b18));let _0x192dca=_0x10418e;_0x109903=_0x326d1a;while(_0x1f737d['MDecU'](_0x109903,_0x1d8b18)){const [_0x33fe9e,_0x350f8c]=_0x1f737d[_0x4e8e95(0x233)](readId,_0x5a9b56,_0x109903),[_0x3db8af,_0x32fa99]=readVint(_0x5a9b56,_0x109903+_0x350f8c);if(_0x33fe9e===ID_SIMPLE_BLOCK&&_0x1f737d[_0x4e8e95(0x239)](_0x3db8af,0x4)){const _0xd60cc3=_0x1f737d['GooqT'](_0x109903+_0x350f8c,_0x32fa99),[,_0x3ee588]=_0x1f737d[_0x4e8e95(0x21d)](readVint,_0x5a9b56,_0xd60cc3),_0x1f1f1b=_0x5a9b56['readInt16BE'](_0xd60cc3+_0x3ee588),_0x5b6d66=_0x1f737d['jyTNf'](_0x10418e,_0x1f1f1b);if(_0x1f737d[_0x4e8e95(0x237)](_0x5b6d66,_0x192dca))_0x192dca=_0x5b6d66;}if(_0x33fe9e===ID_CLUSTER)break;if(_0x1f737d['pThIg'](isUnknownSize,_0x3db8af,_0x32fa99))break;_0x109903+=_0x350f8c+_0x32fa99+_0x3db8af;}_0x2a25d4[_0x4e8e95(0x219)]({'timestamp':_0x10418e,'maxTicks':_0x192dca,'bodyBeforeTimestamp':_0x29ebd4,'bodyAfterTimestamp':_0x410b40,'timestampElementSize':_0x380774}),_0x468453=_0x1d8b18;}return _0x2a25d4;}function parseWebm(_0x158291){const _0x59c179=_0xaf97,_0x108339={'fTFEN':function(_0x4110c3,_0x350267,_0x872323){return _0x4110c3(_0x350267,_0x872323);},'tklsR':function(_0x1e5fc7,_0x360892){return _0x1e5fc7+_0x360892;},'oFBjp':function(_0x160baf,_0x584136,_0x1bd785){return _0x160baf(_0x584136,_0x1bd785);},'Nuaps':function(_0x1536f1,_0xa6eda7){return _0x1536f1+_0xa6eda7;}};let _0xd19390=0x0;const [,_0x583346]=_0x108339[_0x59c179(0x231)](readId,_0x158291,_0xd19390),[_0x1086cd,_0x5684e4]=_0x108339[_0x59c179(0x231)](readVint,_0x158291,_0xd19390+_0x583346);_0xd19390+=_0x108339[_0x59c179(0x1ff)](_0x583346+_0x5684e4,_0x1086cd);const [_0x75cc26,_0x48b03a]=_0x108339[_0x59c179(0x231)](readId,_0x158291,_0xd19390);if(_0x75cc26!==ID_SEGMENT)return null;const [,_0x456c16]=_0x108339['oFBjp'](readVint,_0x158291,_0xd19390+_0x48b03a),_0x144503=_0x108339['Nuaps'](_0xd19390+_0x48b03a,_0x456c16),_0x1ce5f7=_0x108339['oFBjp'](findTimestampScale,_0x158291,_0x144503),_0x2ffd19=_0x108339['fTFEN'](findFirstClusterOffset,_0x158291,_0x144503),_0x2da90c=_0x158291[_0x59c179(0x205)](0x0,_0x2ffd19),_0x48ba7e=extractClusters(_0x158291,_0x1ce5f7);let _0x216f03=0x0;for(const _0x3cd70f of _0x48ba7e){if(_0x3cd70f['maxTicks']>_0x216f03)_0x216f03=_0x3cd70f[_0x59c179(0x209)];}return{'header':_0x2da90c,'clusters':_0x48ba7e,'timestampScale':_0x1ce5f7,'maxTimestampTicks':_0x216f03};}function buildCluster(_0x509cd1,_0x46b5bd,_0x459362){const _0x3a6de2=_0xaf97,_0xe653ec={'IcdMU':function(_0x30513f,_0x34ed5a){return _0x30513f(_0x34ed5a);}},_0x111c86=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x1ff18d=Math[_0x3a6de2(0x217)](0x4,uintSize(_0x509cd1)),_0x10680c=Buffer[_0x3a6de2(0x221)]([Buffer['from']([ID_TIMESTAMP]),_0xe653ec['IcdMU'](writeVint,_0x1ff18d),writeUint(_0x509cd1,_0x1ff18d)]),_0x5222ca=Buffer['concat']([_0x46b5bd,_0x10680c,_0x459362]),_0xafb61=writeVint(_0x5222ca['length']);return Buffer[_0x3a6de2(0x221)]([_0x111c86,_0xafb61,_0x5222ca]);}function _0x4c3a(){const _0x316d32=['from','lqbms','pJQfs','bodyAfterTimestamp','ZKtpj','5315WsYYut','495821EgVbDj','6587622BXVKAr','cFSPM','sSrEU','\x20files\x20->\x20','length','tklsR','min','Stitched\x20','eICCN','GWZDI','yuiYa','slice','IzVCu','CMjSz','dwSgt','maxTicks','exit','HWSpQ','PNDfq','GooqT','VDzVr','jxwEQ','error','PeivV','uTgvV','qoXPL','10482395bqrdrX','CajWV','fhEJR','max','quLsc','push','bOUhH','UkGbF','argv','PcpBu','timestamp','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','Otlsz','concat','JKOzV','2ICfHju','3851792WegEZG','gVpRj','ynKvl','4711050UiGjPx','dcYzN','YbVEo','BKdri','2506179zziGIq','stitchWebmFiles.ts','alloc','27ymGxHQ','copy','jFARk','fTFEN','VmVPs','nDSUR','hXrAq','JNDDu','clusters','RTYEV','KpMQE','xEOpp','JbQav','6488nhjYJw','zpnJX'];_0x4c3a=function(){return _0x316d32;};return _0x4c3a();}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x529630){const _0x323347=_0xaf97,_0x18c1b0={'UkGbF':function(_0x39042c,_0x512017){return _0x39042c+_0x512017;},'zxGzz':function(_0x48b67d,_0x431f11){return _0x48b67d+_0x431f11;},'fhEJR':function(_0x1ec722,_0x760d8a,_0x57985d){return _0x1ec722(_0x760d8a,_0x57985d);},'dwSgt':function(_0x3b06ba,_0x43ea8f){return _0x3b06ba+_0x43ea8f;},'Otlsz':function(_0x5a8a71,_0x2e42b0){return _0x5a8a71(_0x2e42b0);},'lqbms':function(_0x3c136c,_0x5e4099){return _0x3c136c===_0x5e4099;},'JbQav':function(_0x3193f6,_0x1f2fe2){return _0x3193f6<_0x1f2fe2;},'VTnUm':function(_0x3d5609,_0x2d1a7,_0x284ec5){return _0x3d5609(_0x2d1a7,_0x284ec5);},'eICCN':function(_0x4ab8aa,_0x31cf24){return _0x4ab8aa+_0x31cf24;},'jFARk':function(_0x10725b,_0x4bcd13){return _0x10725b!==_0x4bcd13;},'vmQQy':function(_0x234ebe,_0x4262df){return _0x234ebe+_0x4262df;},'HYMup':function(_0x9574e6,_0x248445){return _0x9574e6+_0x248445;}},_0x524da1=Buffer[_0x323347(0x1f3)](_0x529630);let _0x30666d=0x0;const [,_0x4fdc5a]=readId(_0x524da1,_0x30666d),[_0x5822f9,_0x2cf27e]=readVint(_0x524da1,_0x18c1b0[_0x323347(0x21b)](_0x30666d,_0x4fdc5a)),_0x440bcc=_0x18c1b0['zxGzz'](_0x18c1b0['UkGbF'](_0x30666d,_0x4fdc5a),_0x2cf27e)+_0x5822f9,[,_0x5d5f68]=readId(_0x524da1,_0x440bcc),[,_0x30dd3d]=_0x18c1b0[_0x323347(0x216)](readVint,_0x524da1,_0x18c1b0['UkGbF'](_0x440bcc,_0x5d5f68)),_0x133e2a=_0x18c1b0[_0x323347(0x208)](_0x440bcc,_0x5d5f68)+_0x30dd3d,_0x3d8007=_0x18c1b0[_0x323347(0x220)](writeUnknownSizeVint,_0x30dd3d);_0x3d8007[_0x323347(0x22f)](_0x524da1,_0x440bcc+_0x5d5f68);let _0x56441e=_0x133e2a;const _0x4fd8bd=Math[_0x323347(0x200)](_0x524da1['length'],_0x133e2a+0x2710);while(_0x56441e<_0x4fd8bd){const [_0x46c7be,_0x27c770]=readId(_0x524da1,_0x56441e),[_0x2217b1,_0x2ee48c]=_0x18c1b0[_0x323347(0x216)](readVint,_0x524da1,_0x56441e+_0x27c770);if(_0x18c1b0[_0x323347(0x1f4)](_0x46c7be,ID_CLUSTER))break;if(isUnknownSize(_0x2217b1,_0x2ee48c))break;if(_0x46c7be===ID_INFO){const _0x36bbec=_0x56441e+_0x27c770+_0x2ee48c,_0x1ea908=_0x18c1b0['zxGzz'](_0x36bbec,_0x2217b1),_0x45cc41=[];let _0x60e439=_0x36bbec;while(_0x18c1b0[_0x323347(0x23a)](_0x60e439,_0x1ea908)){const [_0x484bb1,_0x4dd531]=_0x18c1b0['VTnUm'](readId,_0x524da1,_0x60e439),[_0xc040d,_0x473e91]=readVint(_0x524da1,_0x60e439+_0x4dd531),_0x51d975=_0x18c1b0[_0x323347(0x202)](_0x4dd531,_0x473e91)+_0xc040d;_0x18c1b0[_0x323347(0x230)](_0x484bb1,ID_DURATION)&&_0x45cc41[_0x323347(0x219)](_0x524da1['slice'](_0x60e439,_0x18c1b0['vmQQy'](_0x60e439,_0x51d975))),_0x60e439+=_0x51d975;}const _0x58ce5a=Buffer['concat'](_0x45cc41),_0xfeaa03=Buffer['concat']([_0x524da1[_0x323347(0x205)](_0x56441e,_0x56441e+_0x27c770),_0x18c1b0['VTnUm'](writeVint,_0x58ce5a['length'],_0x2ee48c)]);return Buffer['concat']([_0x524da1['slice'](0x0,_0x56441e),_0xfeaa03,_0x58ce5a,_0x524da1[_0x323347(0x205)](_0x1ea908)]);}_0x56441e+=_0x18c1b0['HYMup'](_0x27c770+_0x2ee48c,_0x2217b1);}return _0x524da1;}export function stitchWebmFiles(_0xa19e49,_0xb2bce8){const _0x14ea10=_0xaf97,_0x3c3b44={'PeivV':function(_0x1bb526,_0x54ef8d){return _0x1bb526(_0x54ef8d);},'LYGLn':function(_0x23d855,_0x41b279){return _0x23d855===_0x41b279;},'VmVPs':function(_0xd13332,_0x21bb17){return _0xd13332<_0x21bb17;},'HWSpQ':function(_0x300e27,_0x1abc62,_0x1e0415,_0x108a43){return _0x300e27(_0x1abc62,_0x1e0415,_0x108a43);},'IzVCu':function(_0x1feab7,_0x254425){return _0x1feab7+_0x254425;},'apJjA':function(_0x2d4c14,_0x4a34cf,_0x4bcef8){return _0x2d4c14(_0x4a34cf,_0x4bcef8);}};if(_0xa19e49['length']<=0x1)return![];const _0x480172=[];for(const _0xa58cb8 of _0xa19e49){const _0x1f6b9=_0x3c3b44[_0x14ea10(0x211)](readFileSync,_0xa58cb8),_0x5efcdb=parseWebm(_0x1f6b9);if(!_0x5efcdb||_0x3c3b44['LYGLn'](_0x5efcdb[_0x14ea10(0x236)][_0x14ea10(0x1fe)],0x0))return![];_0x480172[_0x14ea10(0x219)](_0x5efcdb);}const _0x10ce32=_0x480172[0x0],_0xa70dda=rebuildHeaderWithoutDuration(_0x10ce32['header']),_0x442190=[_0xa70dda];let _0x10d705=0x0;for(let _0x143662=0x0;_0x3c3b44[_0x14ea10(0x232)](_0x143662,_0x480172[_0x14ea10(0x1fe)]);_0x143662++){const _0x1173f8=_0x480172[_0x143662];for(const _0x5dc1fa of _0x1173f8['clusters']){const _0x5a26a9=_0x5dc1fa[_0x14ea10(0x21e)]+_0x10d705;_0x442190[_0x14ea10(0x219)](_0x3c3b44[_0x14ea10(0x20b)](buildCluster,_0x5a26a9,_0x5dc1fa['bodyBeforeTimestamp'],_0x5dc1fa[_0x14ea10(0x1f6)]));}const _0x474c2b=0x1e;_0x10d705+=_0x3c3b44[_0x14ea10(0x206)](_0x1173f8['maxTimestampTicks'],_0x474c2b);}return _0x3c3b44['apJjA'](writeFileSync,_0xb2bce8,Buffer['concat'](_0x442190)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x41fddb(0x22c))||process[_0x41fddb(0x21c)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console[_0x41fddb(0x210)](_0x41fddb(0x21f)),process[_0x41fddb(0x20a)](0x1));const output=args[args['length']-0x1],inputs=args[_0x41fddb(0x205)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x41fddb(0x201)+inputs['length']+_0x41fddb(0x1fd)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|