@ranger-testing/ranger-cli 2.5.4-alpha.0e8b82c-9 → 2.5.4-alpha.27e3ee8-11
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/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/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/opencodeConfig.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/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ccfd3,_0x52b324){const _0x4553bd=_0x1b5b,_0x219814=_0x2ccfd3();while(!![]){try{const _0x45e691=-parseInt(_0x4553bd(0x17e))/0x1*(-parseInt(_0x4553bd(0x18e))/0x2)+parseInt(_0x4553bd(0x197))/0x3*(-parseInt(_0x4553bd(0x174))/0x4)+parseInt(_0x4553bd(0x180))/0x5*(parseInt(_0x4553bd(0x190))/0x6)+-parseInt(_0x4553bd(0x1a3))/0x7+parseInt(_0x4553bd(0x175))/0x8*(-parseInt(_0x4553bd(0x192))/0x9)+parseInt(_0x4553bd(0x1a7))/0xa+parseInt(_0x4553bd(0x194))/0xb*(parseInt(_0x4553bd(0x1a0))/0xc);if(_0x45e691===_0x52b324)break;else _0x219814['push'](_0x219814['shift']());}catch(_0x56fc3d){_0x219814['push'](_0x219814['shift']());}}}(_0x5353,0x916f9));import{existsSync}from'fs';import _0x3b5d8b from'inquirer';function _0x1b5b(_0x50bee7,_0xf82e0e){_0x50bee7=_0x50bee7-0x16e;const _0x535380=_0x5353();let _0x1b5b20=_0x535380[_0x50bee7];return _0x1b5b20;}import{ApiError,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x4358f2){const _0x20f06c=_0x1b5b,_0x494c41={'MrcaU':function(_0xd3871e){return _0xd3871e();},'NSyyq':function(_0x57718d,_0x45e2b0){return _0x57718d+_0x45e2b0;},'eiKoy':function(_0x5b2271,_0x5ba791){return _0x5b2271+_0x5ba791;},'MzDPH':function(_0x5b3580,_0x36c79d){return _0x5b3580+_0x36c79d;},'ukBBs':_0x20f06c(0x19f),'vDtQX':_0x20f06c(0x1a4),'HCYYl':function(_0x9f26ea,_0x11b122){return _0x9f26ea(_0x11b122);},'VKtuA':function(_0x6fb0a3,_0x5994ec){return _0x6fb0a3===_0x5994ec;},'CHMsy':function(_0x58b577,_0x33c671){return _0x58b577&&_0x33c671;},'mpbsx':function(_0x264889,_0x2b8290){return _0x264889+_0x2b8290;},'JkQFB':function(_0x2aa79e,_0x862389){return _0x2aa79e&&_0x862389;},'gbCVo':_0x20f06c(0x19c),'bgAnn':'source','JmJko':'local','lfNIr':'cloud','OLtgz':function(_0xdc428b,_0x5ec44a,_0x58c02e){return _0xdc428b(_0x5ec44a,_0x58c02e);},'DDKGW':function(_0x37a0af,_0x39412c,_0x22188a){return _0x37a0af(_0x39412c,_0x22188a);},'Effgg':function(_0x46eaef,_0x35bf11){return _0x46eaef??_0x35bf11;},'EUrdh':'0|4|2|3|1','RjpDS':function(_0xb3085f,_0x5c4bcf){return _0xb3085f(_0x5c4bcf);}},_0x1cb6aa=_0x4358f2['profile'];let _0x1da743=_0x4358f2[_0x20f06c(0x181)]??await _0x494c41[_0x20f06c(0x16e)](readActiveProfileName),_0xd3d2ce=null;if(!_0x1da743&&process[_0x20f06c(0x1a1)][_0x20f06c(0x196)]){const _0x5bfad6=await resolveAdHocProfile();_0x5bfad6&&(_0x1da743=_0x5bfad6[_0x20f06c(0x19a)],_0xd3d2ce=_0x5bfad6[_0x20f06c(0x181)]);}if(!_0x1da743)try{const _0x164e54=await _0x494c41['MrcaU'](listCloudProfiles);if(_0x164e54[_0x20f06c(0x186)]===0x1){const _0x7f3831=_0x164e54[0x0];_0x1da743=_0x7f3831['name'],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x7f3831[_0x20f06c(0x19a)]),console[_0x20f06c(0x191)](_0x20f06c(0x17a));}}catch{}if(!_0x1da743)throw new Error(_0x494c41[_0x20f06c(0x17d)](_0x494c41['eiKoy'](_0x494c41[_0x20f06c(0x189)](_0x494c41['ukBBs'],'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a'),_0x20f06c(0x18d)),_0x494c41['vDtQX'])+_0x20f06c(0x199));const _0x402fa4=_0x494c41['HCYYl'](getEnvDir,_0x1da743),_0x38f386=existsSync(_0x402fa4);let _0x3d9576=_0xd3d2ce,_0x2efa0e=![];if(!_0x3d9576)try{_0x3d9576=await _0x494c41['HCYYl'](fetchCloudProfile,_0x1da743);if(!_0x3d9576)_0x2efa0e=!![];}catch(_0x33c043){_0x33c043 instanceof ApiError&&_0x494c41[_0x20f06c(0x16f)](_0x33c043['status'],0x194)&&(_0x2efa0e=!![]);}if(_0x494c41['CHMsy'](_0x1cb6aa,_0x2efa0e)&&!_0x38f386&&!_0x3d9576)throw new Error(_0x494c41[_0x20f06c(0x1a6)](_0x494c41[_0x20f06c(0x189)](_0x20f06c(0x198)+_0x1cb6aa+_0x20f06c(0x195),'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),'`ranger\x20profile\x20add`\x20to\x20create\x20one.'));if(_0x494c41[_0x20f06c(0x19e)](_0x3d9576,_0x38f386)){let _0x3b0d06=!![];if(_0x494c41[_0x20f06c(0x16e)](isInteractive)){const {source:_0x381e08}=await _0x3b5d8b[_0x20f06c(0x179)]([{'type':_0x494c41[_0x20f06c(0x18a)],'name':_0x494c41['bgAnn'],'message':'Profile\x20\x22'+_0x1da743+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x20f06c(0x18b),'value':_0x20f06c(0x193)},{'name':_0x20f06c(0x178),'value':_0x494c41[_0x20f06c(0x170)]}],'default':_0x494c41[_0x20f06c(0x177)]}]);_0x3b0d06=_0x381e08===_0x494c41[_0x20f06c(0x177)];}if(!_0x3b0d06)_0x3d9576=null;}const _0x2bd523=_0x494c41[_0x20f06c(0x182)](readProfileOverrides,process['cwd'](),_0x1da743);let _0x5bee37=null,_0x3091e0,_0x19e07f,_0x501889,_0x1cb6e6,_0x43284f=null,_0x3d5655;const _0x2db3f6=_0x494c41['HCYYl'](expandOverrides,_0x2bd523);if(_0x3d9576){_0x5bee37=_0x3d9576;const _0x1a738e=_0x3d9576[_0x20f06c(0x18c)]??{},_0x320c50=_0x494c41['DDKGW'](mergeCloudProfileSettings,_0x1a738e,_0x494c41['Effgg'](_0x2bd523,undefined)),_0x5b15d6={..._0x3d9576,'settings':_0x320c50},_0x255abe=process[_0x20f06c(0x1a1)][_0x20f06c(0x171)];if(_0x255abe){const _0x32f05a=_0x494c41[_0x20f06c(0x172)]['split']('|');let _0x3a7625=0x0;while(!![]){switch(_0x32f05a[_0x3a7625++]){case'0':if(!existsSync(_0x255abe))throw new Error('RANGER_SESSION_STATE_PATH='+_0x255abe+'\x20does\x20not\x20exist.');continue;case'1':_0x43284f={'baseUrl':expandString(_0x1a738e['baseUrl']),'startPath':expandString(_0x1a738e['startPath'])};continue;case'2':_0x19e07f=resolveEnvVars(_0x320c50);continue;case'3':_0x501889=_0x494c41[_0x20f06c(0x17f)](Boolean,_0x19e07f[_0x20f06c(0x173)]);continue;case'4':_0x3091e0=_0x255abe;continue;}break;}}else{const _0x4ff704=await resolveCloudProfileSession(_0x5b15d6);_0x3091e0=_0x4ff704['authPath'],_0x19e07f=resolveEnvVars(_0x320c50),_0x501889=_0x494c41['RjpDS'](Boolean,_0x19e07f[_0x20f06c(0x173)]),_0x43284f={'baseUrl':expandString(_0x1a738e[_0x20f06c(0x1a2)]),'startPath':expandString(_0x1a738e['startPath'])},_0x3d5655=_0x4ff704[_0x20f06c(0x188)]?.[_0x20f06c(0x185)]?.[0x0];}}else{if(!_0x38f386)throw new Error(_0x20f06c(0x198)+_0x1da743+_0x20f06c(0x184)+_0x1da743);const _0x33ec43=await _0x494c41[_0x20f06c(0x187)](loadSettings,_0x1da743);_0x19e07f=resolveEnvVars(_0x33ec43),_0x501889=Boolean(_0x19e07f[_0x20f06c(0x173)]),_0x1cb6e6=_0x19e07f[_0x20f06c(0x1a2)];}const _0x16b37c=readUrlEnvVars(),_0x12cbf5=resolveProfileUrl({'flagBaseUrl':_0x4358f2['baseUrl'],'flagStartPath':_0x4358f2[_0x20f06c(0x17c)],'envBaseUrl':_0x16b37c[_0x20f06c(0x18f)],'envStartPath':_0x16b37c[_0x20f06c(0x19d)],'localSettingsBaseUrl':_0x1cb6e6,'projectOverrides':_0x2db3f6,'cloudSettings':_0x43284f,'authEnvironmentDomain':_0x3d5655}),_0x45f37e=_0x12cbf5[_0x20f06c(0x176)]??_0x12cbf5[_0x20f06c(0x1a2)];if(_0x494c41[_0x20f06c(0x19e)](!_0x45f37e,!_0x501889))throw new Error(_0x20f06c(0x19b)+_0x1da743+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x1da743+'\x20baseUrl\x20<url>');return{'activeProfile':_0x1da743,'resolvedCloudProfile':_0x5bee37,'cloudAuthPath':_0x3091e0,'resolvedSettings':_0x19e07f,'isCdpMode':_0x501889,'url':_0x45f37e,'startPath':_0x12cbf5['startPath']};}function expandString(_0xa15dd8){const _0x186df3=_0x1b5b,_0x3a0be4={'jzaIV':function(_0x50987e,_0x354478){return _0x50987e!==_0x354478;}};if(_0x3a0be4['jzaIV'](typeof _0xa15dd8,_0x186df3(0x183)))return _0xa15dd8;return resolveEnvVars(_0xa15dd8);}function _0x5353(){const _0x38bf91=['1755VGExaY','cloud','6034479RClnku','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','RANGER_TEST_USERNAME','3QDkZpO','Profile\x20\x22','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','name','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','list','envStartPath','JkQFB','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','48ABDTCn','env','baseUrl','3547768aQNLWR','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','SoYcl','mpbsx','387220iuBaWM','MrcaU','VKtuA','JmJko','RANGER_SESSION_STATE_PATH','EUrdh','cdpEndpoint','2883812Fwfbtz','48320FfOZms','url','lfNIr','Local\x20profile','prompt','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','rNAdr','startPath','NSyyq','9ghhIcL','RjpDS','5Zjxbdd','profile','OLtgz','string','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','domains','length','HCYYl','resolvedEnv','MzDPH','gbCVo','Cloud\x20profile\x20(recommended)','settings','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','31294aHsvFO','envBaseUrl','3764286JTsIzO','log'];_0x5353=function(){return _0x38bf91;};return _0x5353();}function expandOverrides(_0x30ab72){const _0x1e1059=_0x1b5b,_0x16567f={'rNAdr':function(_0x5593b6,_0x4e2986){return _0x5593b6===_0x4e2986;},'SoYcl':function(_0x12b814,_0x2e6fe2){return _0x12b814(_0x2e6fe2);},'jLAXF':'string'};if(!_0x30ab72)return _0x30ab72;const _0x43e308={..._0x30ab72};return _0x16567f[_0x1e1059(0x17b)](typeof _0x43e308[_0x1e1059(0x1a2)],'string')&&(_0x43e308[_0x1e1059(0x1a2)]=_0x16567f[_0x1e1059(0x1a5)](resolveEnvVars,_0x43e308[_0x1e1059(0x1a2)])),_0x16567f[_0x1e1059(0x17b)](typeof _0x43e308['startPath'],_0x16567f['jLAXF'])&&(_0x43e308['startPath']=_0x16567f['SoYcl'](resolveEnvVars,_0x43e308['startPath'])),_0x43e308;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x37d710=_0x4c42;function _0x4c42(_0x2a3e82,_0x1a2b1b){_0x2a3e82=_0x2a3e82-0x16f;const _0x2c033d=_0x2c03();let _0x4c4252=_0x2c033d[_0x2a3e82];return _0x4c4252;}(function(_0x346d67,_0x147ca9){const _0x56f0c4=_0x4c42,_0x5802e8=_0x346d67();while(!![]){try{const _0x4d1d05=-parseInt(_0x56f0c4(0x17f))/0x1+-parseInt(_0x56f0c4(0x172))/0x2*(-parseInt(_0x56f0c4(0x180))/0x3)+parseInt(_0x56f0c4(0x17a))/0x4+-parseInt(_0x56f0c4(0x17b))/0x5*(-parseInt(_0x56f0c4(0x170))/0x6)+parseInt(_0x56f0c4(0x181))/0x7*(-parseInt(_0x56f0c4(0x171))/0x8)+parseInt(_0x56f0c4(0x17c))/0x9*(parseInt(_0x56f0c4(0x176))/0xa)+-parseInt(_0x56f0c4(0x175))/0xb;if(_0x4d1d05===_0x147ca9)break;else _0x5802e8['push'](_0x5802e8['shift']());}catch(_0x401b0b){_0x5802e8['push'](_0x5802e8['shift']());}}}(_0x2c03,0xe0f92));function firstDefined(..._0x3cacfc){const _0xa50a9=_0x4c42,_0x45ae1f={'WwfCI':function(_0x2323ba,_0x3ccf5e){return _0x2323ba!==_0x3ccf5e;}};for(const _0x62e38a of _0x3cacfc){if(_0x62e38a!==undefined&&_0x45ae1f[_0xa50a9(0x173)](_0x62e38a,null)&&_0x62e38a!=='')return _0x62e38a;}return undefined;}function normalizeAuthEnvironmentDomain(_0x1f3ac3){const _0x4b1f4a=_0x4c42;if(!_0x1f3ac3)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x4b1f4a(0x17e)](_0x1f3ac3))return _0x1f3ac3;return _0x4b1f4a(0x17d)+_0x1f3ac3;}export function resolveBaseUrl(_0x56e430){const _0x288c46=_0x4c42,_0x22062e={'GYFRG':function(_0x34a49e,_0x4f46b4){return _0x34a49e in _0x4f46b4;},'Fawqr':function(_0x3bffd5,_0x14e3a3,_0x25d913,_0x3ca3d9,_0x40d306,_0x32e036,_0x46b6b5){return _0x3bffd5(_0x14e3a3,_0x25d913,_0x3ca3d9,_0x40d306,_0x32e036,_0x46b6b5);}},_0x1d93ce=_0x56e430['projectOverrides'],_0x484c68=!!_0x1d93ce&&_0x22062e['GYFRG']('baseUrl',_0x1d93ce),_0x3f39cc=_0x1d93ce?.['baseUrl'],_0x3dd2aa=!(_0x484c68&&_0x3f39cc===null);return _0x22062e[_0x288c46(0x174)](firstDefined,_0x56e430['flagBaseUrl'],_0x56e430['envBaseUrl'],_0x56e430['localSettingsBaseUrl'],typeof _0x3f39cc===_0x288c46(0x177)?_0x3f39cc:undefined,_0x3dd2aa?_0x56e430['cloudSettings']?.['baseUrl']:undefined,_0x3dd2aa?normalizeAuthEnvironmentDomain(_0x56e430['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x157c63){const _0x56a9ed=_0x4c42,_0x412720={'CWOfN':function(_0x151349,_0x1c9bc1){return _0x151349 in _0x1c9bc1;},'VCLZX':function(_0x5185e2,_0x2e55ca){return _0x5185e2===_0x2e55ca;},'Jhvvv':function(_0x492cdf,_0x49d497,_0x20a094,_0x5bbf5,_0x4a5be1){return _0x492cdf(_0x49d497,_0x20a094,_0x5bbf5,_0x4a5be1);}},_0xb532f0=_0x157c63['projectOverrides'],_0x9bdf22=!!_0xb532f0&&_0x412720['CWOfN'](_0x56a9ed(0x178),_0xb532f0),_0x203142=_0xb532f0?.[_0x56a9ed(0x178)],_0xf7c6be=!(_0x9bdf22&&_0x412720['VCLZX'](_0x203142,null));return _0x412720['Jhvvv'](firstDefined,_0x157c63['flagStartPath'],_0x157c63[_0x56a9ed(0x16f)],_0x412720['VCLZX'](typeof _0x203142,_0x56a9ed(0x177))?_0x203142:undefined,_0xf7c6be?_0x157c63['cloudSettings']?.['startPath']:undefined);}function _0x2c03(){const _0x34852d=['Fawqr','490853JKoqjl','100nNnNKI','string','startPath','env','3845188ugLQMH','5vrmYdK','1592775oXdJsA','https://','test','1792361EPeyyy','3GLzReh','2947JDJaYo','EJuPx','envStartPath','4777554XFZYvX','20720SRfZPY','643116zHWQvK','WwfCI'];_0x2c03=function(){return _0x34852d;};return _0x2c03();}export function joinBaseAndPath(_0x553428,_0x336f9c){if(!_0x553428)return undefined;if(!_0x336f9c)return _0x553428;const _0x1746e1=_0x553428['endsWith']('/')?_0x553428['slice'](0x0,-0x1):_0x553428,_0x33d4e=_0x336f9c['startsWith']('/')?_0x336f9c:'/'+_0x336f9c;return _0x1746e1+_0x33d4e;}export function resolveProfileUrl(_0x21b329){const _0x216ed5=_0x4c42,_0x206939={'EJuPx':function(_0x390250,_0x441d2b){return _0x390250(_0x441d2b);},'yfMab':function(_0x3433b6,_0x21ced8){return _0x3433b6(_0x21ced8);}},_0x39da7a=_0x206939[_0x216ed5(0x182)](resolveBaseUrl,_0x21b329),_0x4bfa83=_0x206939['yfMab'](resolveStartPath,_0x21b329);return{'baseUrl':_0x39da7a,'startPath':_0x4bfa83,'url':joinBaseAndPath(_0x39da7a,_0x4bfa83)};}export function readUrlEnvVars(_0xcf1259=process[_0x37d710(0x179)]){return{'envBaseUrl':_0xcf1259['RANGER_BASE_URL'],'envStartPath':_0xcf1259['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3bee57,_0xb4e94e){const _0x262a29=_0x3f0e,_0x196d2d=_0x3bee57();while(!![]){try{const _0x5c9cf4=parseInt(_0x262a29(0xe0))/0x1*(-parseInt(_0x262a29(0xda))/0x2)+-parseInt(_0x262a29(0xd6))/0x3+-parseInt(_0x262a29(0xd8))/0x4+-parseInt(_0x262a29(0xde))/0x5*(-parseInt(_0x262a29(0xd9))/0x6)+parseInt(_0x262a29(0xdb))/0x7+-parseInt(_0x262a29(0xd5))/0x8*(-parseInt(_0x262a29(0xdd))/0x9)+parseInt(_0x262a29(0xdc))/0xa;if(_0x5c9cf4===_0xb4e94e)break;else _0x196d2d['push'](_0x196d2d['shift']());}catch(_0x416f91){_0x196d2d['push'](_0x196d2d['shift']());}}}(_0x5505,0x35e34));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x3f0e(_0x366006,_0x39ce6c){_0x366006=_0x366006-0xd5;const _0x5505c2=_0x5505();let _0x3f0ecf=_0x5505c2[_0x366006];return _0x3f0ecf;}function _0x5505(){const _0x478734=['1489616IuDAlf','6OmbGhV','118486UdXbFq','2853816xLeVxf','1200280TZGLWW','60012syJGTY','1630585CHHWvo','baseDelayMs','1CrLDZz','ms...','pow','),\x20retrying\x20in\x20','maxRetries','88FnfAkQ','824430izUvPT','\x20failed\x20(attempt\x20'];_0x5505=function(){return _0x478734;};return _0x5505();}export async function withRetry(_0x6b1cf1,_0x1a15cf){const _0x5b6d6d=_0x3f0e,_0x5706d8={'TzKqy':function(_0x39ade4){return _0x39ade4();},'feMyG':function(_0x2dff19,_0x427e19){return _0x2dff19 instanceof _0x427e19;}},_0x27a077=_0x1a15cf?.[_0x5b6d6d(0xe4)]??DEFAULT_MAX_RETRIES,_0x539804=_0x1a15cf?.[_0x5b6d6d(0xdf)]??DEFAULT_BASE_DELAY_MS;let _0x2b61c0;for(let _0x4b9458=0x0;_0x4b9458<=_0x27a077;_0x4b9458++){try{return await _0x5706d8['TzKqy'](_0x6b1cf1);}catch(_0x2a62a9){_0x2b61c0=_0x5706d8['feMyG'](_0x2a62a9,Error)?_0x2a62a9:new Error(String(_0x2a62a9));if(_0x4b9458<_0x27a077){const _0x53ba5d=_0x539804*Math[_0x5b6d6d(0xe2)](0x2,_0x4b9458);_0x1a15cf?.['label']&&console['error'](_0x1a15cf['label']+_0x5b6d6d(0xd7)+(_0x4b9458+0x1)+'/'+(_0x27a077+0x1)+_0x5b6d6d(0xe3)+_0x53ba5d+_0x5b6d6d(0xe1)),await new Promise(_0x2c784e=>setTimeout(_0x2c784e,_0x53ba5d));}}}throw _0x2b61c0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x40c551=_0x19da;(function(_0x48b214,_0x24eb0f){const _0xada056=_0x19da,_0x1c69b6=_0x48b214();while(!![]){try{const _0x30b7a9=parseInt(_0xada056(0x164))/0x1*(parseInt(_0xada056(0x183))/0x2)+-parseInt(_0xada056(0x17c))/0x3+-parseInt(_0xada056(0x18a))/0x4*(parseInt(_0xada056(0x196))/0x5)+-parseInt(_0xada056(0x17d))/0x6*(-parseInt(_0xada056(0x186))/0x7)+parseInt(_0xada056(0x189))/0x8+-parseInt(_0xada056(0x162))/0x9+-parseInt(_0xada056(0x184))/0xa*(-parseInt(_0xada056(0x188))/0xb);if(_0x30b7a9===_0x24eb0f)break;else _0x1c69b6['push'](_0x1c69b6['shift']());}catch(_0x3f5cd9){_0x1c69b6['push'](_0x1c69b6['shift']());}}}(_0x30cc,0x8bb9f));import*as _0x2a537d from'fs';import*as _0x129d11 from'path';function _0x19da(_0x4c9933,_0x1a69c0){_0x4c9933=_0x4c9933-0x162;const _0x30cc02=_0x30cc();let _0x19da3d=_0x30cc02[_0x4c9933];return _0x19da3d;}import*as _0x5ac8e3 from'os';import{execSync}from'child_process';function _0x30cc(){const _0x62eaa1=['pipe','bltLI','stringify','Brfxa','currentBranch','lastPlanReminderAt','sessions','writeFileSync','featureId','pxKHn','RXFfl','817029KcJxvz','2998524JPAbbO','parse','ASWAg','enabled','existsSync','ukDYZ','2157422SLSGYf','22730fsdxHT','main','7NXyJuF','clear','4499YdzCJT','1539352CCVCdb','12148ghVFoi','bNHvP','AEHHA','HEAD','.ranger_cache.json','master','tRLFU','GCSbK','doEjc','utf-8','VMsif','CKPfu','1385PBHiXH','NnlbA','hozRo','BGFNA','now','9131670uCXvcU','kUTHH','1GcMZhN','readFileSync','toISOString','EbTdh','mkdirSync','lastEnabledSessionClearedAt','registeredAt','homedir','prompted','bvONr','branches','uDwjw','.claude'];_0x30cc=function(){return _0x62eaa1;};return _0x30cc();}const CACHE_FILE=_0x129d11['join'](_0x5ac8e3[_0x40c551(0x16b)](),_0x40c551(0x170),_0x40c551(0x18e));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x523db6=_0x40c551;try{if(_0x2a537d['existsSync'](CACHE_FILE)){const _0x28da11=JSON[_0x523db6(0x17e)](_0x2a537d[_0x523db6(0x165)](CACHE_FILE,_0x523db6(0x193)));return{'version':0x3,'sessions':_0x28da11['sessions']||{},'branches':_0x28da11[_0x523db6(0x16e)]||{},'lastEnabledSessionClearedAt':_0x28da11['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x45e4c8){const _0x371346=_0x40c551;try{const _0x1f3f42=_0x129d11['dirname'](CACHE_FILE);!_0x2a537d[_0x371346(0x181)](_0x1f3f42)&&_0x2a537d[_0x371346(0x168)](_0x1f3f42,{'recursive':!![]}),_0x2a537d[_0x371346(0x178)](CACHE_FILE,JSON[_0x371346(0x173)](_0x45e4c8,null,0x2));}catch{}}export function getCurrentBranch(){const _0x736b50=_0x40c551,_0x51d881={'JmYvH':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','CrquX':_0x736b50(0x193),'tRLFU':function(_0xc442cd,_0x1be534){return _0xc442cd===_0x1be534;},'RqXNe':_0x736b50(0x18d)};try{const _0x593e2e=execSync(_0x51d881['JmYvH'],{'encoding':_0x51d881['CrquX'],'stdio':['pipe',_0x736b50(0x171),_0x736b50(0x171)]})['trim']();if(!_0x593e2e||_0x51d881[_0x736b50(0x190)](_0x593e2e,_0x51d881['RqXNe']))return null;return _0x593e2e;}catch{return null;}}export function enableBranch(_0x6bd583){const _0x9ab05={'LSlnW':function(_0x2d674e,_0x4e4bab){return _0x2d674e(_0x4e4bab);}},_0x4d7620=loadCache();_0x4d7620['branches'][_0x6bd583]=!![],_0x9ab05['LSlnW'](saveCache,_0x4d7620);}export function disableBranch(_0x2b6f6a){const _0xa8b6e9=loadCache();delete _0xa8b6e9['branches'][_0x2b6f6a],saveCache(_0xa8b6e9);}export function isBranchEnabled(_0x3ba874){const _0x350267=_0x40c551,_0x194c00={'QPABx':function(_0x4ba1f1){return _0x4ba1f1();},'NnlbA':function(_0x4d020e,_0x4f1d25){return _0x4d020e===_0x4f1d25;}},_0x4e379a=_0x194c00['QPABx'](loadCache);return _0x194c00[_0x350267(0x197)](_0x4e379a['branches'][_0x3ba874],!![]);}function getOrCreateSession(_0x27d565,_0x2c10fb){const _0x5925f7=_0x40c551;return!_0x27d565[_0x5925f7(0x177)][_0x2c10fb]&&(_0x27d565['sessions'][_0x2c10fb]={}),_0x27d565[_0x5925f7(0x177)][_0x2c10fb];}export function enableSession(_0x19ef2c){const _0x34f539=_0x40c551,_0x4d4a80={'bNHvP':function(_0x29a864){return _0x29a864();},'aaUQH':_0x34f539(0x185)},_0xe1f1ba=loadCache(),_0x293876=getOrCreateSession(_0xe1f1ba,_0x19ef2c);_0x293876[_0x34f539(0x180)]=!![];const _0x3b1f30=_0x4d4a80[_0x34f539(0x18b)](getCurrentBranch);_0x3b1f30&&_0x3b1f30!==_0x4d4a80['aaUQH']&&_0x3b1f30!=='master'&&(_0xe1f1ba[_0x34f539(0x16e)][_0x3b1f30]=!![],_0x293876[_0x34f539(0x175)]=_0x3b1f30),saveCache(_0xe1f1ba);}export function isSessionEnabled(_0x263a67){const _0x2e616a=_0x40c551,_0x1976a9={'doEjc':function(_0x302956,_0x28d236){return _0x302956===_0x28d236;},'aRdoT':'main','DyFMY':'master'},_0x55380b=loadCache(),_0x3939f5=getCurrentBranch();if(!_0x3939f5||_0x1976a9[_0x2e616a(0x192)](_0x3939f5,_0x1976a9['aRdoT'])||_0x3939f5===_0x1976a9['DyFMY'])return _0x1976a9['doEjc'](_0x55380b['sessions'][_0x263a67]?.['enabled'],!![]);const _0xfe707b=_0x55380b['branches'][_0x3939f5]===!![],_0x5a929d=_0x1976a9['doEjc'](_0x55380b[_0x2e616a(0x177)][_0x263a67]?.['enabled'],!![]);return _0xfe707b||_0x5a929d;}export function disableSession(_0x578e64){const _0x4cb430=_0x40c551,_0xeeb634={'bvONr':function(_0x504443){return _0x504443();}},_0x56117e=_0xeeb634[_0x4cb430(0x16d)](loadCache),_0x54abf2=getOrCreateSession(_0x56117e,_0x578e64);_0x54abf2[_0x4cb430(0x180)]=![],saveCache(_0x56117e);}export function updateBranchTracking(_0x494b4d){const _0x26f775=_0x40c551,_0x57a53a={'HUzNL':function(_0x419c3b,_0x51aaba){return _0x419c3b===_0x51aaba;},'BGFNA':_0x26f775(0x185),'hozRo':function(_0x4310c3,_0x4a9fe2){return _0x4310c3!==_0x4a9fe2;}},_0x267df8=loadCache(),_0x10f9ae=_0x267df8['sessions'][_0x494b4d];if(!_0x10f9ae?.['enabled'])return;const _0x20cc5e=getCurrentBranch();if(!_0x20cc5e||_0x57a53a['HUzNL'](_0x20cc5e,_0x57a53a[_0x26f775(0x199)])||_0x20cc5e==='master')return;_0x57a53a[_0x26f775(0x198)](_0x10f9ae[_0x26f775(0x175)],_0x20cc5e)&&(_0x267df8['branches'][_0x20cc5e]=!![],_0x10f9ae['currentBranch']=_0x20cc5e,saveCache(_0x267df8));}export function initBranchTracking(_0xbd946a){const _0x1b219e=_0x40c551,_0x104570={'xrXAS':function(_0x4d83cb){return _0x4d83cb();},'RXFfl':function(_0x404566,_0x43c9e5){return _0x404566===_0x43c9e5;},'ZyRxQ':_0x1b219e(0x185),'AEHHA':_0x1b219e(0x18f),'Ffytw':function(_0x515af0,_0x15337c){return _0x515af0===_0x15337c;},'YLiwG':function(_0x28f3b3,_0x2c41bb,_0x3ed9cf){return _0x28f3b3(_0x2c41bb,_0x3ed9cf);}},_0x5320c7=_0x104570['xrXAS'](loadCache),_0x196e77=getCurrentBranch();if(!_0x196e77||_0x104570[_0x1b219e(0x17b)](_0x196e77,_0x104570['ZyRxQ'])||_0x196e77===_0x104570[_0x1b219e(0x18c)])return;if(_0x104570['Ffytw'](_0x5320c7[_0x1b219e(0x16e)][_0x196e77],!![])){const _0x39b1bd=_0x104570['YLiwG'](getOrCreateSession,_0x5320c7,_0xbd946a);_0x39b1bd['enabled']=!![],_0x39b1bd[_0x1b219e(0x175)]=_0x196e77,saveCache(_0x5320c7);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0xb8b9fb){const _0x42264b=_0x40c551,_0x292684=loadCache(),_0x2345c5=_0x292684[_0x42264b(0x177)][_0xb8b9fb];_0x2345c5?.['enabled']&&(_0x292684['lastEnabledSessionClearedAt']=Date[_0x42264b(0x19a)](),saveCache(_0x292684));}export function shouldAutoEnableAfterClear(_0x3fb6d5){const _0x417e18=_0x40c551,_0x3c3e2a={'hKUuG':function(_0x10cd9f,_0x1e8007){return _0x10cd9f!==_0x1e8007;},'EbTdh':_0x417e18(0x187),'LDVTI':function(_0x2a96a7){return _0x2a96a7();},'Opzcv':function(_0x57ed1c,_0x128e6f){return _0x57ed1c-_0x128e6f;}};if(_0x3c3e2a['hKUuG'](_0x3fb6d5,_0x3c3e2a[_0x417e18(0x167)]))return![];const _0x35c087=_0x3c3e2a['LDVTI'](loadCache),_0x5aea61=_0x35c087[_0x417e18(0x169)];if(!_0x5aea61)return![];const _0x1852ee=_0x3c3e2a['Opzcv'](Date[_0x417e18(0x19a)](),_0x5aea61);return _0x1852ee<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x51c1ce){const _0x1f28dc=_0x40c551,_0x440e1e={'Brfxa':function(_0x41c95e){return _0x41c95e();},'CKPfu':function(_0x1c207c,_0x2a57f0,_0x1109c2){return _0x1c207c(_0x2a57f0,_0x1109c2);},'VMsif':function(_0x24845d){return _0x24845d();},'wHgcE':function(_0x1f08c0,_0x1c4a86){return _0x1f08c0!==_0x1c4a86;},'tYUYy':function(_0x3140d6,_0x159e95){return _0x3140d6(_0x159e95);}},_0x449f3e=_0x440e1e[_0x1f28dc(0x174)](loadCache),_0x26c217=_0x440e1e[_0x1f28dc(0x195)](getOrCreateSession,_0x449f3e,_0x51c1ce);_0x26c217[_0x1f28dc(0x180)]=!![];const _0x144c23=_0x440e1e[_0x1f28dc(0x194)](getCurrentBranch);_0x144c23&&_0x440e1e['wHgcE'](_0x144c23,_0x1f28dc(0x185))&&_0x440e1e['wHgcE'](_0x144c23,_0x1f28dc(0x18f))&&(_0x26c217[_0x1f28dc(0x175)]=_0x144c23),delete _0x449f3e['lastEnabledSessionClearedAt'],_0x440e1e['tYUYy'](saveCache,_0x449f3e);}export function registerSession(_0x3f1c56,_0xef8fd){const _0x2606ce=_0x40c551,_0x63d525={'ukDYZ':function(_0x4a820d){return _0x4a820d();},'PNVaX':function(_0xd64987,_0x4d1a73){return _0xd64987(_0x4d1a73);}},_0x371bc1=_0x63d525[_0x2606ce(0x182)](loadCache),_0x1b9861=getOrCreateSession(_0x371bc1,_0x3f1c56);_0x1b9861['featureId']=_0xef8fd,_0x1b9861['registeredAt']=new Date()[_0x2606ce(0x166)](),_0x63d525['PNVaX'](saveCache,_0x371bc1);}export function getSessionEntry(_0x1d6a74){const _0x5e513b=_0x40c551,_0x233971=loadCache(),_0x1cca04=_0x233971['sessions'][_0x1d6a74];if(_0x1cca04?.[_0x5e513b(0x179)]&&_0x1cca04?.[_0x5e513b(0x16a)])return{'featureId':_0x1cca04['featureId'],'registeredAt':_0x1cca04[_0x5e513b(0x16a)]};return null;}export function unregisterSession(_0x1237b7){const _0x86b182=_0x40c551,_0xac4954={'ASWAg':function(_0x2d4a8d){return _0x2d4a8d();}},_0x237871=_0xac4954[_0x86b182(0x17f)](loadCache),_0x483397=_0x237871['sessions'][_0x1237b7];_0x483397&&(delete _0x483397['featureId'],delete _0x483397[_0x86b182(0x16a)],saveCache(_0x237871));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xb3497b){const _0x577c4e=_0x40c551,_0x200aa1={'sQXje':function(_0x1b1646){return _0x1b1646();},'pxKHn':function(_0x23d825,_0x2e6f06,_0x56f3cb){return _0x23d825(_0x2e6f06,_0x56f3cb);},'IPQrv':function(_0x5cb4aa,_0xfe609e){return _0x5cb4aa>=_0xfe609e;},'APREy':function(_0x251c7f,_0x55f358){return _0x251c7f(_0x55f358);}},_0xb1feda=_0x200aa1['sQXje'](loadCache),_0x54d0ce=_0x200aa1[_0x577c4e(0x17a)](getOrCreateSession,_0xb1feda,_0xb3497b),_0x57e926=_0x54d0ce[_0x577c4e(0x176)]||0x0,_0x1426f8=Date[_0x577c4e(0x19a)]();if(_0x200aa1['IPQrv'](_0x1426f8-_0x57e926,PLAN_REMINDER_INTERVAL_MS))return _0x54d0ce['lastPlanReminderAt']=_0x1426f8,_0x200aa1['APREy'](saveCache,_0xb1feda),!![];return![];}export function shouldShowStopReminder(_0x165477){const _0x187bd8=_0x40c551,_0x5063eb={'YWNDu':function(_0xe61a75,_0x195357,_0x11d3d3){return _0xe61a75(_0x195357,_0x11d3d3);},'bltLI':function(_0x258e8e,_0xe3e4c8){return _0x258e8e-_0xe3e4c8;},'uDwjw':function(_0x32265b,_0x3177fd){return _0x32265b(_0x3177fd);}},_0x434be2=loadCache(),_0x59fa2b=_0x5063eb['YWNDu'](getOrCreateSession,_0x434be2,_0x165477),_0x4f573c=_0x59fa2b['lastStopReminderAt']||0x0,_0x327e44=Date[_0x187bd8(0x19a)]();if(_0x5063eb[_0x187bd8(0x172)](_0x327e44,_0x4f573c)>=STOP_REMINDER_INTERVAL_MS)return _0x59fa2b['lastStopReminderAt']=_0x327e44,_0x5063eb[_0x187bd8(0x16f)](saveCache,_0x434be2),!![];return![];}export function hasSessionBeenPrompted(_0x586911){const _0x770d38=_0x40c551,_0x4f5e50=loadCache();return _0x4f5e50['sessions'][_0x586911]?.[_0x770d38(0x16c)]===!![];}export function markSessionPrompted(_0x1106b9){const _0x3fafdb=_0x40c551,_0x430e9f={'kUTHH':function(_0xc4638,_0xa8b6b1,_0x1775c2){return _0xc4638(_0xa8b6b1,_0x1775c2);},'GCSbK':function(_0x366c3f,_0x411d58){return _0x366c3f(_0x411d58);}},_0x52e1cd=loadCache(),_0x51f601=_0x430e9f[_0x3fafdb(0x163)](getOrCreateSession,_0x52e1cd,_0x1106b9);_0x51f601[_0x3fafdb(0x16c)]=!![],_0x430e9f[_0x3fafdb(0x191)](saveCache,_0x52e1cd);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x22e4fb=_0xd0d3;(function(_0x1cdb35,_0x45fc65){const _0x157bc2=_0xd0d3,_0x5b08a7=_0x1cdb35();while(!![]){try{const _0x244e0a=parseInt(_0x157bc2(0x15c))/0x1+parseInt(_0x157bc2(0x153))/0x2+-parseInt(_0x157bc2(0x16d))/0x3+-parseInt(_0x157bc2(0x176))/0x4+-parseInt(_0x157bc2(0x146))/0x5+-parseInt(_0x157bc2(0x14f))/0x6*(-parseInt(_0x157bc2(0x14c))/0x7)+-parseInt(_0x157bc2(0x149))/0x8*(parseInt(_0x157bc2(0x159))/0x9);if(_0x244e0a===_0x45fc65)break;else _0x5b08a7['push'](_0x5b08a7['shift']());}catch(_0xb2b590){_0x5b08a7['push'](_0x5b08a7['shift']());}}}(_0xadc1,0x46002));import*as _0x4fa829 from'fs';import*as _0x4bdb53 from'path';import*as _0x128574 from'os';import{execSync}from'child_process';function _0xd0d3(_0x17cd1b,_0x5df059){_0x17cd1b=_0x17cd1b-0x144;const _0xadc1a1=_0xadc1();let _0xd0d3ff=_0xadc1a1[_0x17cd1b];return _0xd0d3ff;}const CACHE_FILE=_0x4bdb53[_0x22e4fb(0x168)](_0x128574['homedir'](),'.claude',_0x22e4fb(0x167));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x23f397=_0x22e4fb,_0xd407d1={'AckWZ':_0x23f397(0x16e)};try{if(_0x4fa829['existsSync'](CACHE_FILE)){const _0x39ef01=JSON[_0x23f397(0x16f)](_0x4fa829[_0x23f397(0x16a)](CACHE_FILE,_0xd407d1[_0x23f397(0x178)]));return{'version':0x3,'sessions':_0x39ef01[_0x23f397(0x177)]||{},'branches':_0x39ef01[_0x23f397(0x147)]||{},'lastEnabledSessionClearedAt':_0x39ef01['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x4c6952){const _0x4b38d6=_0x22e4fb;try{const _0x4c194e=_0x4bdb53['dirname'](CACHE_FILE);!_0x4fa829['existsSync'](_0x4c194e)&&_0x4fa829[_0x4b38d6(0x157)](_0x4c194e,{'recursive':!![]}),_0x4fa829[_0x4b38d6(0x15a)](CACHE_FILE,JSON[_0x4b38d6(0x14e)](_0x4c6952,null,0x2));}catch{}}export function getCurrentBranch(){const _0x2ebecf=_0x22e4fb,_0x32213b={'erihD':function(_0x32b045,_0x3ba76b,_0x4fcb23){return _0x32b045(_0x3ba76b,_0x4fcb23);},'npNry':_0x2ebecf(0x156),'AxhRf':_0x2ebecf(0x172),'UPTfU':_0x2ebecf(0x145)};try{const _0x4b7406=_0x32213b[_0x2ebecf(0x14a)](execSync,_0x32213b[_0x2ebecf(0x148)],{'encoding':_0x2ebecf(0x16e),'stdio':[_0x32213b['AxhRf'],'pipe',_0x32213b['AxhRf']]})['trim']();if(!_0x4b7406||_0x4b7406===_0x32213b[_0x2ebecf(0x17b)])return null;return _0x4b7406;}catch{return null;}}export function enableBranch(_0x15d2a3){const _0x28d5c3=_0x22e4fb,_0x26701c={'iFsiU':function(_0x4ea9fb){return _0x4ea9fb();}},_0x1337bf=_0x26701c[_0x28d5c3(0x150)](loadCache);_0x1337bf[_0x28d5c3(0x147)][_0x15d2a3]=!![],saveCache(_0x1337bf);}export function disableBranch(_0xe6b90){const _0x5cb771=loadCache();delete _0x5cb771['branches'][_0xe6b90],saveCache(_0x5cb771);}export function isBranchEnabled(_0x50f5d7){const _0x2523d6=_0x22e4fb,_0x40a74c={'drgQX':function(_0x54b9cb){return _0x54b9cb();},'kbIso':function(_0x4260ce,_0x5dccf7){return _0x4260ce===_0x5dccf7;}},_0x1ae3a1=_0x40a74c['drgQX'](loadCache);return _0x40a74c[_0x2523d6(0x175)](_0x1ae3a1[_0x2523d6(0x147)][_0x50f5d7],!![]);}function getOrCreateSession(_0xa114ae,_0x58976e){const _0x1acabb=_0x22e4fb;return!_0xa114ae['sessions'][_0x58976e]&&(_0xa114ae['sessions'][_0x58976e]={}),_0xa114ae[_0x1acabb(0x177)][_0x58976e];}export function enableSession(_0x22c071){const _0x9a9899=_0x22e4fb,_0x58121c={'dhtyn':function(_0x144548){return _0x144548();},'cfltO':function(_0x3ca475,_0x54fdbd){return _0x3ca475!==_0x54fdbd;},'jIsGg':function(_0x45c73f,_0x261199){return _0x45c73f(_0x261199);}},_0x18db81=_0x58121c[_0x9a9899(0x15d)](loadCache),_0x148212=getOrCreateSession(_0x18db81,_0x22c071);_0x148212['enabled']=!![];const _0xcf312b=getCurrentBranch();_0xcf312b&&_0xcf312b!=='main'&&_0x58121c[_0x9a9899(0x164)](_0xcf312b,'master')&&(_0x18db81[_0x9a9899(0x147)][_0xcf312b]=!![],_0x148212['currentBranch']=_0xcf312b),_0x58121c['jIsGg'](saveCache,_0x18db81);}export function isSessionEnabled(_0x389f5d){const _0x1a4991=_0x22e4fb,_0x190612={'wLvbi':function(_0x3bd472){return _0x3bd472();},'wOOMJ':function(_0x4742de,_0x326457){return _0x4742de===_0x326457;},'dgIhi':'main','FnmOH':_0x1a4991(0x154),'sCWgb':function(_0xd85a2e,_0x25060b){return _0xd85a2e===_0x25060b;}},_0xca4019=_0x190612[_0x1a4991(0x171)](loadCache),_0x171d71=getCurrentBranch();if(!_0x171d71||_0x190612[_0x1a4991(0x162)](_0x171d71,_0x190612['dgIhi'])||_0x190612[_0x1a4991(0x162)](_0x171d71,_0x190612[_0x1a4991(0x144)]))return _0x190612['wOOMJ'](_0xca4019[_0x1a4991(0x177)][_0x389f5d]?.[_0x1a4991(0x166)],!![]);const _0x4f57f5=_0x190612[_0x1a4991(0x158)](_0xca4019[_0x1a4991(0x147)][_0x171d71],!![]),_0x311bfe=_0xca4019['sessions'][_0x389f5d]?.['enabled']===!![];return _0x4f57f5||_0x311bfe;}export function disableSession(_0x3f2c47){const _0x46e5a8=_0x22e4fb,_0x4010a5={'JmOOS':function(_0x5c69a4,_0x550da0,_0x3f7123){return _0x5c69a4(_0x550da0,_0x3f7123);}},_0x3682fc=loadCache(),_0xd09985=_0x4010a5['JmOOS'](getOrCreateSession,_0x3682fc,_0x3f2c47);_0xd09985[_0x46e5a8(0x166)]=![],saveCache(_0x3682fc);}export function updateBranchTracking(_0x24d850){const _0x574684=_0x22e4fb,_0x234ef7={'xmaNn':function(_0x577294,_0x3f9fcd){return _0x577294===_0x3f9fcd;}},_0x94824f=loadCache(),_0x36ab73=_0x94824f[_0x574684(0x177)][_0x24d850];if(!_0x36ab73?.['enabled'])return;const _0x591be7=getCurrentBranch();if(!_0x591be7||_0x234ef7[_0x574684(0x15f)](_0x591be7,_0x574684(0x15e))||_0x591be7===_0x574684(0x154))return;_0x36ab73[_0x574684(0x163)]!==_0x591be7&&(_0x94824f['branches'][_0x591be7]=!![],_0x36ab73['currentBranch']=_0x591be7,saveCache(_0x94824f));}export function initBranchTracking(_0xbef117){const _0x1b504a=_0x22e4fb,_0x1ecc00={'OueSk':function(_0x11b770){return _0x11b770();},'Xhzey':function(_0x12142f,_0x157685){return _0x12142f===_0x157685;},'KgAso':function(_0xb05e2,_0x2913dd){return _0xb05e2===_0x2913dd;},'yAkHK':function(_0x131d46,_0x179370){return _0x131d46(_0x179370);}},_0x4e6929=_0x1ecc00[_0x1b504a(0x17a)](loadCache),_0x303fcb=getCurrentBranch();if(!_0x303fcb||_0x1ecc00[_0x1b504a(0x152)](_0x303fcb,_0x1b504a(0x15e))||_0x1ecc00['KgAso'](_0x303fcb,'master'))return;if(_0x4e6929['branches'][_0x303fcb]===!![]){const _0xb6c7e6=getOrCreateSession(_0x4e6929,_0xbef117);_0xb6c7e6['enabled']=!![],_0xb6c7e6[_0x1b504a(0x163)]=_0x303fcb,_0x1ecc00[_0x1b504a(0x16b)](saveCache,_0x4e6929);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x1446b4){const _0x4dcc87=_0x22e4fb,_0x26c44d={'CPEtc':function(_0x3d5e62,_0x17603b){return _0x3d5e62(_0x17603b);}},_0x1260a6=loadCache(),_0x585684=_0x1260a6[_0x4dcc87(0x177)][_0x1446b4];_0x585684?.[_0x4dcc87(0x166)]&&(_0x1260a6[_0x4dcc87(0x14d)]=Date[_0x4dcc87(0x160)](),_0x26c44d['CPEtc'](saveCache,_0x1260a6));}export function shouldAutoEnableAfterClear(_0x1eaf10){const _0x5bc412=_0x22e4fb,_0x2527c3={'SZqqD':function(_0x4f3b3a){return _0x4f3b3a();},'koKfl':function(_0x398407,_0x41ce71){return _0x398407-_0x41ce71;},'EDxgI':function(_0x4ba15d,_0x26fd4d){return _0x4ba15d<=_0x26fd4d;}};if(_0x1eaf10!==_0x5bc412(0x169))return![];const _0x5c4a70=_0x2527c3['SZqqD'](loadCache),_0x587cad=_0x5c4a70[_0x5bc412(0x14d)];if(!_0x587cad)return![];const _0x43ee12=_0x2527c3[_0x5bc412(0x16c)](Date[_0x5bc412(0x160)](),_0x587cad);return _0x2527c3['EDxgI'](_0x43ee12,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x11e727){const _0x158e4c=_0x22e4fb,_0x11a61d={'myxVm':function(_0x1411a3){return _0x1411a3();},'UAngI':function(_0x3b2a05){return _0x3b2a05();},'HzKBh':'main','AdOjJ':function(_0x196657,_0x296c8e){return _0x196657!==_0x296c8e;},'ptdXK':'master','bGVIe':function(_0x25d448,_0x4a0c43){return _0x25d448(_0x4a0c43);}},_0x5c9a79=_0x11a61d[_0x158e4c(0x170)](loadCache),_0x5bf09e=getOrCreateSession(_0x5c9a79,_0x11e727);_0x5bf09e[_0x158e4c(0x166)]=!![];const _0x4d1aeb=_0x11a61d['UAngI'](getCurrentBranch);_0x4d1aeb&&_0x4d1aeb!==_0x11a61d['HzKBh']&&_0x11a61d[_0x158e4c(0x173)](_0x4d1aeb,_0x11a61d[_0x158e4c(0x151)])&&(_0x5bf09e[_0x158e4c(0x163)]=_0x4d1aeb),delete _0x5c9a79[_0x158e4c(0x14d)],_0x11a61d['bGVIe'](saveCache,_0x5c9a79);}export function registerSession(_0x36756e,_0x52b57e){const _0x501d29=_0x22e4fb,_0x10cc14=loadCache(),_0x134861=getOrCreateSession(_0x10cc14,_0x36756e);_0x134861['featureId']=_0x52b57e,_0x134861[_0x501d29(0x174)]=new Date()['toISOString'](),saveCache(_0x10cc14);}function _0xadc1(){const _0x4ca8b5=['parse','myxVm','wLvbi','pipe','AdOjJ','registeredAt','kbIso','1521824MMMFsH','sessions','AckWZ','RhlcD','OueSk','UPTfU','FnmOH','HEAD','800815MmHBLK','branches','npNry','8OpQDTD','erihD','eDzhZ','438487vENOCm','lastEnabledSessionClearedAt','stringify','54FxWkho','iFsiU','ptdXK','Xhzey','984510ZSFqoC','master','lastPlanReminderAt','git\x20rev-parse\x20--abbrev-ref\x20HEAD','mkdirSync','sCWgb','3011274nzrpbZ','writeFileSync','featureId','208905ufrXzQ','dhtyn','main','xmaNn','now','xzmbT','wOOMJ','currentBranch','cfltO','WiJCh','enabled','.ranger_cache.json','join','clear','readFileSync','yAkHK','koKfl','309006wviPYK','utf-8'];_0xadc1=function(){return _0x4ca8b5;};return _0xadc1();}export function getSessionEntry(_0x28de5e){const _0x35d4eb=_0x22e4fb,_0x8c039f={'fabmt':function(_0x222306){return _0x222306();}},_0x308ac5=_0x8c039f['fabmt'](loadCache),_0x2ce070=_0x308ac5[_0x35d4eb(0x177)][_0x28de5e];if(_0x2ce070?.['featureId']&&_0x2ce070?.['registeredAt'])return{'featureId':_0x2ce070['featureId'],'registeredAt':_0x2ce070[_0x35d4eb(0x174)]};return null;}export function unregisterSession(_0x25de22){const _0x3511b1=_0x22e4fb,_0xc79ed5={'WIRjk':function(_0x438aa6){return _0x438aa6();}},_0x21ca5e=_0xc79ed5['WIRjk'](loadCache),_0xe8d613=_0x21ca5e[_0x3511b1(0x177)][_0x25de22];_0xe8d613&&(delete _0xe8d613[_0x3511b1(0x15b)],delete _0xe8d613[_0x3511b1(0x174)],saveCache(_0x21ca5e));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x16f123){const _0x20d49e=_0x22e4fb,_0x1fb93c={'eDzhZ':function(_0x6ccf1){return _0x6ccf1();},'UNuDp':function(_0x47a1bf,_0x20ced0){return _0x47a1bf>=_0x20ced0;},'KTNsc':function(_0x5727c3,_0x585391){return _0x5727c3-_0x585391;}},_0x5c4942=_0x1fb93c[_0x20d49e(0x14b)](loadCache),_0x4ae7d9=getOrCreateSession(_0x5c4942,_0x16f123),_0x1445e6=_0x4ae7d9[_0x20d49e(0x155)]||0x0,_0xfc2e54=Date['now']();if(_0x1fb93c['UNuDp'](_0x1fb93c['KTNsc'](_0xfc2e54,_0x1445e6),PLAN_REMINDER_INTERVAL_MS))return _0x4ae7d9['lastPlanReminderAt']=_0xfc2e54,saveCache(_0x5c4942),!![];return![];}export function shouldShowStopReminder(_0xf439ae){const _0x526da3=_0x22e4fb,_0x2a1bfb={'RhlcD':function(_0x1d474b){return _0x1d474b();},'nAFBu':function(_0x5948c7,_0xea9c,_0x36c1e1){return _0x5948c7(_0xea9c,_0x36c1e1);},'UOAFC':function(_0x3105bc,_0x1c3d0a){return _0x3105bc>=_0x1c3d0a;},'WiJCh':function(_0x4b4090,_0x2882e3){return _0x4b4090-_0x2882e3;},'QAAEx':function(_0x2782a4,_0x556e1c){return _0x2782a4(_0x556e1c);}},_0x2dc16c=_0x2a1bfb[_0x526da3(0x179)](loadCache),_0x248278=_0x2a1bfb['nAFBu'](getOrCreateSession,_0x2dc16c,_0xf439ae),_0x3e3f01=_0x248278['lastStopReminderAt']||0x0,_0x3e5029=Date[_0x526da3(0x160)]();if(_0x2a1bfb['UOAFC'](_0x2a1bfb[_0x526da3(0x165)](_0x3e5029,_0x3e3f01),STOP_REMINDER_INTERVAL_MS))return _0x248278['lastStopReminderAt']=_0x3e5029,_0x2a1bfb['QAAEx'](saveCache,_0x2dc16c),!![];return![];}export function hasSessionBeenPrompted(_0xe76fb5){const _0x5b09d7=loadCache();return _0x5b09d7['sessions'][_0xe76fb5]?.['prompted']===!![];}export function markSessionPrompted(_0x2badea){const _0x459a9b=_0x22e4fb,_0x246743={'xzmbT':function(_0x3f7f41,_0x354a2c){return _0x3f7f41(_0x354a2c);}},_0x406136=loadCache(),_0xf2f80c=getOrCreateSession(_0x406136,_0x2badea);_0xf2f80c['prompted']=!![],_0x246743[_0x459a9b(0x161)](saveCache,_0x406136);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8c91a=_0x2d38;(function(_0x37b754,_0x33a05e){const _0x27683a=_0x2d38,_0x2ab3f3=_0x37b754();while(!![]){try{const _0x28fa17=parseInt(_0x27683a(0x1c1))/0x1+parseInt(_0x27683a(0x1a9))/0x2*(parseInt(_0x27683a(0x1ce))/0x3)+-parseInt(_0x27683a(0x1e5))/0x4+-parseInt(_0x27683a(0x1f7))/0x5*(parseInt(_0x27683a(0x1be))/0x6)+-parseInt(_0x27683a(0x1c7))/0x7*(parseInt(_0x27683a(0x1aa))/0x8)+parseInt(_0x27683a(0x1c5))/0x9*(parseInt(_0x27683a(0x1e9))/0xa)+-parseInt(_0x27683a(0x1dd))/0xb;if(_0x28fa17===_0x33a05e)break;else _0x2ab3f3['push'](_0x2ab3f3['shift']());}catch(_0x3efa24){_0x2ab3f3['push'](_0x2ab3f3['shift']());}}}(_0xba7c,0xd8bb8));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';function _0x2d38(_0x10a43c,_0x4a9ff8){_0x10a43c=_0x10a43c-0x1a9;const _0xba7c1b=_0xba7c();let _0x2d3854=_0xba7c1b[_0x10a43c];return _0x2d3854;}import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x29db7b,_0x1fe772){const _0x539c7a=_0x2d38,_0x21fc9c={'bLrDA':function(_0x4d1eb7,_0x43f8f2,_0x5bd2ab,_0x2090c4){return _0x4d1eb7(_0x43f8f2,_0x5bd2ab,_0x2090c4);},'EXLgZ':function(_0x3a4aa1,_0x1aace2){return _0x3a4aa1(_0x1aace2);},'gutax':function(_0x5993e2,_0x3988f8){return _0x5993e2!==_0x3988f8;},'sCHXm':function(_0x32a7ad,_0x449258){return _0x32a7ad(_0x449258);}},_0x22a8fb=_0x21fc9c['bLrDA'](join,_0x1fe772,'ci',_0x29db7b),_0x57ff39=join(_0x1fe772,'local',_0x29db7b),_0x5b8fed=join(_0x1fe772,_0x29db7b),_0x25149b=join(_0x1fe772,'local'),_0x524997=join(_0x1fe772,'ci');if(existsSync(_0x22a8fb))return _0x22a8fb;if(existsSync(_0x57ff39))return _0x57ff39;if(_0x21fc9c[_0x539c7a(0x209)](existsSync,_0x5b8fed)&&(_0x5b8fed!==_0x25149b&&_0x21fc9c[_0x539c7a(0x1da)](_0x5b8fed,_0x524997)?!![]:_0x21fc9c['sCHXm'](hasLegacyProfileFiles,_0x5b8fed)))return _0x5b8fed;return null;}export function getEnvDir(_0x497633){const _0x3de6bd=_0x2d38,_0x1e74aa={'LXIlX':function(_0x564f1e){return _0x564f1e();},'uHGuE':function(_0x395be5,_0x4a584b,_0x3bbc9e){return _0x395be5(_0x4a584b,_0x3bbc9e);},'SPtVi':function(_0x170552,_0x4ba647){return _0x170552!==_0x4ba647;},'zHwoB':function(_0x5a369e,_0x18fe0f,_0x48a3d0,_0x5554bc){return _0x5a369e(_0x18fe0f,_0x48a3d0,_0x5554bc);},'heWMQ':'local'},_0x436147=_0x1e74aa[_0x3de6bd(0x1b8)](getRangerDir),_0x4c6310=_0x1e74aa[_0x3de6bd(0x1b0)](findEnvInRoot,_0x497633,_0x436147);if(_0x4c6310)return _0x4c6310;const _0x5f4112=getRangerHomeDir();if(_0x1e74aa['SPtVi'](_0x5f4112,_0x436147)){const _0x171a82=findEnvInRoot(_0x497633,_0x5f4112);if(_0x171a82)return _0x171a82;}return _0x1e74aa[_0x3de6bd(0x1e1)](join,_0x436147,_0x1e74aa['heWMQ'],_0x497633);}export function findExistingEnv(_0x2677d4,_0x14929e){const _0x5602f6=_0x2d38,_0x39d2d4={'rYumT':'legacy','HRxDH':function(_0x4ab501,_0x5360d5,_0x2565bd,_0x2d325a){return _0x4ab501(_0x5360d5,_0x2565bd,_0x2d325a);},'gegah':'local','lhLuJ':function(_0x35fdf7,_0x37ab09){return _0x35fdf7===_0x37ab09;}},_0x168985=_0x14929e?.['rangerDir'],_0x4e3ee2=_0x168985?[_0x168985]:[getRangerDir(),getRangerHomeDir()][_0x5602f6(0x1f6)]((_0xe33437,_0x54e140,_0x37327c)=>_0x37327c['indexOf'](_0xe33437)===_0x54e140),_0x37e09d=_0x14929e?.['locations']??['ci','local',_0x39d2d4['rYumT']];for(const _0x3feb87 of _0x4e3ee2){const _0x1be8a0=join(_0x3feb87,'local'),_0x492be5=join(_0x3feb87,'ci'),_0x7645b2=[{'location':'ci','path':_0x39d2d4['HRxDH'](join,_0x3feb87,'ci',_0x2677d4)},{'location':'local','path':join(_0x3feb87,_0x39d2d4[_0x5602f6(0x1bc)],_0x2677d4)},{'location':'legacy','path':join(_0x3feb87,_0x2677d4)}];for(const _0x459b56 of _0x7645b2){if(_0x37e09d['includes'](_0x459b56['location'])&&existsSync(_0x459b56['path'])){if(_0x39d2d4['lhLuJ'](_0x459b56[_0x5602f6(0x1cc)],'legacy')&&(_0x39d2d4['lhLuJ'](_0x459b56[_0x5602f6(0x1ed)],_0x1be8a0)||_0x459b56[_0x5602f6(0x1ed)]===_0x492be5)&&!hasLegacyProfileFiles(_0x459b56['path']))continue;return{'path':_0x459b56[_0x5602f6(0x1ed)],'location':_0x459b56[_0x5602f6(0x1cc)]};}}}return null;}function hasLegacyProfileFiles(_0x38c456){const _0x15e17b=_0x2d38,_0x3fbb74={'xtgQq':function(_0x388ec7,_0x5b9071,_0x539159){return _0x388ec7(_0x5b9071,_0x539159);},'mLkUA':function(_0x1f1b36,_0x19e03f,_0x309241){return _0x1f1b36(_0x19e03f,_0x309241);}};return existsSync(_0x3fbb74[_0x15e17b(0x202)](join,_0x38c456,'settings.json'))||existsSync(_0x3fbb74[_0x15e17b(0x1e3)](join,_0x38c456,_0x15e17b(0x20e)))||existsSync(join(_0x38c456,_0x15e17b(0x21a)));}export function isEnvCi(_0x33419b){const _0x14725d=_0x2d38,_0x1345c4={'GRTfR':function(_0x79fed,_0x14a60c){return _0x79fed(_0x14a60c);},'NcsYi':function(_0x20ace9,_0x327959,_0x2f29e7,_0x9eff1){return _0x20ace9(_0x327959,_0x2f29e7,_0x9eff1);},'Ydhvg':function(_0x2a6661){return _0x2a6661();},'akilP':function(_0x11bf51,_0x19604c){return _0x11bf51!==_0x19604c;},'KkhDR':function(_0x4db2c4){return _0x4db2c4();}};if(_0x1345c4[_0x14725d(0x1d1)](existsSync,_0x1345c4[_0x14725d(0x1c9)](join,_0x1345c4['Ydhvg'](getRangerDir),'ci',_0x33419b)))return!![];const _0x3abd2e=getRangerHomeDir();if(_0x1345c4['akilP'](_0x3abd2e,_0x1345c4[_0x14725d(0x1ac)](getRangerDir))&&_0x1345c4[_0x14725d(0x1d1)](existsSync,_0x1345c4[_0x14725d(0x1c9)](join,_0x3abd2e,'ci',_0x33419b)))return!![];return![];}export async function cleanupTempFiles(_0x36efcd){const _0x52dbc9=_0x2d38,_0xf80741={'UjRaB':function(_0x22b5d1,_0x54697b){return _0x22b5d1!==_0x54697b;},'dBulr':'ENOENT'},_0x2e50dc=[_0x36efcd[_0x52dbc9(0x1ae)],_0x36efcd[_0x52dbc9(0x210)]]['filter'](Boolean);await Promise[_0x52dbc9(0x1b6)](_0x2e50dc['map'](_0x48f78b=>unlink(_0x48f78b)['catch'](_0x18a650=>{const _0x3d33ef=_0x52dbc9;_0xf80741[_0x3d33ef(0x1bb)](_0x18a650['code'],_0xf80741[_0x3d33ef(0x1d5)])&&console['warn'](_0x3d33ef(0x1f5)+_0x48f78b+':',_0x18a650['message']);})));}export function getSettingsPath(_0x267d2a){const _0xad53d=_0x2d38,_0x3b9bda={'MaDtA':function(_0x331b2d,_0x361818,_0xfb057){return _0x331b2d(_0x361818,_0xfb057);},'HCKHA':function(_0x5aa471,_0x54b770){return _0x5aa471(_0x54b770);},'adnuJ':'settings.json'};return _0x3b9bda['MaDtA'](join,_0x3b9bda[_0xad53d(0x1e4)](getEnvDir,_0x267d2a),_0x3b9bda[_0xad53d(0x219)]);}export async function loadSettings(_0x4e4542){const _0xa189bf=_0x2d38,_0x4bc1f7={'YGvdp':function(_0x200f30,_0x26e885,_0xf15ddd){return _0x200f30(_0x26e885,_0xf15ddd);},'CVWAO':_0xa189bf(0x1d9)},_0xf47251=getSettingsPath(_0x4e4542);if(!existsSync(_0xf47251))return{};try{const _0x8eb7bb=await _0x4bc1f7[_0xa189bf(0x212)](readFile,_0xf47251,_0x4bc1f7[_0xa189bf(0x1c6)]);return JSON['parse'](_0x8eb7bb);}catch{return{};}}export async function saveSettings(_0x2562ae,_0x987f33){const _0x4b8780=_0x2d38,_0xd929e0={'DxmBU':function(_0x42b148,_0x34d0d2){return _0x42b148(_0x34d0d2);},'BmJVs':function(_0x20c175,_0x533f60){return _0x20c175(_0x533f60);},'SrkyR':function(_0x2986a8,_0x199068,_0x267fd9){return _0x2986a8(_0x199068,_0x267fd9);}},_0x23c8e3=_0xd929e0[_0x4b8780(0x213)](getSettingsPath,_0x2562ae),_0xb23643=_0xd929e0[_0x4b8780(0x215)](dirname,_0x23c8e3);!_0xd929e0['DxmBU'](existsSync,_0xb23643)&&await _0xd929e0['SrkyR'](mkdir,_0xb23643,{'recursive':!![]}),await _0xd929e0[_0x4b8780(0x1db)](writeFile,_0x23c8e3,JSON['stringify'](_0x987f33,null,0x2));}export function resolveEnvVars(_0x52aee1){const _0x1988f3=_0x2d38,_0x50ba82={'XORrd':function(_0x228b33,_0xfe9c86){return _0x228b33===_0xfe9c86;},'pHOmf':_0x1988f3(0x1b5),'NLBZC':_0x1988f3(0x1df)};if(_0x50ba82[_0x1988f3(0x211)](typeof _0x52aee1,_0x50ba82[_0x1988f3(0x1d4)]))return _0x52aee1['replace'](/\$\{(\w+)\}/g,(_0x11a786,_0x297679)=>{const _0x758ea6=_0x1988f3,_0x559fc3=process['env'][_0x297679];if(_0x50ba82[_0x758ea6(0x211)](_0x559fc3,undefined))throw new Error(_0x758ea6(0x214)+_0x297679+'\x20is\x20not\x20set');return _0x559fc3;});if(Array[_0x1988f3(0x1b2)](_0x52aee1))return _0x52aee1['map'](resolveEnvVars);if(_0x52aee1&&typeof _0x52aee1===_0x50ba82[_0x1988f3(0x207)])return Object[_0x1988f3(0x216)](Object['entries'](_0x52aee1)['map'](([_0x442557,_0x57c4e2])=>[_0x442557,resolveEnvVars(_0x57c4e2)]));return _0x52aee1;}const isRecord=_0x2ff47d=>typeof _0x2ff47d===_0x8c91a(0x1df)&&_0x2ff47d!==null&&!Array['isArray'](_0x2ff47d),asRecord=_0x1b4109=>isRecord(_0x1b4109)?_0x1b4109:undefined,mergeHeaders=(_0x1667e0,_0x52efec)=>{const _0x1d5a76=_0x8c91a,_0x335de9={'xrQdm':function(_0x23099c,_0x39165c){return _0x23099c??_0x39165c;}},_0x4da84a={..._0x335de9['xrQdm'](_0x1667e0,{}),..._0x52efec??{}};return Object[_0x1d5a76(0x1ec)](_0x4da84a)[_0x1d5a76(0x1e2)]?_0x4da84a:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x8c91a(0x1bd),_0x8c91a(0x1e0),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x612f03,_0x5e8b38={}){const _0x5413ff=_0x8c91a,_0x16fb4e={'XeBHX':function(_0x21ae90,_0x5632f5){return _0x21ae90(_0x5632f5);},'aLRaE':_0x5413ff(0x1b5),'sdAdP':function(_0x4fb10d,_0x2217e4,_0x705c57){return _0x4fb10d(_0x2217e4,_0x705c57);}},_0x22a12b=_0x16fb4e['XeBHX'](asRecord,_0x612f03['browser']),_0x7afef9={...asRecord(_0x22a12b?.['launchOptions'])??{}};typeof _0x5e8b38['headless']===_0x5413ff(0x1fb)&&(_0x7afef9[_0x5413ff(0x1d8)]=_0x5e8b38['headless']);if(_0x612f03[_0x5413ff(0x204)]){const _0x31626c=_0x7afef9['args']??[],_0x2ed3da=SAFE_MODE_ARGS['filter'](_0x17f17a=>!_0x31626c[_0x5413ff(0x1de)](_0x17f17a));_0x7afef9[_0x5413ff(0x1d7)]=[..._0x31626c,..._0x2ed3da];}if(_0x612f03['allowInsecureLocalhost']){const _0x189edd=_0x7afef9[_0x5413ff(0x1d7)]??[],_0x3a9e12=ALLOW_LOCALHOST_ARGS['filter'](_0x10200d=>!_0x189edd['includes'](_0x10200d));_0x7afef9[_0x5413ff(0x1d7)]=[..._0x189edd,..._0x3a9e12];}const _0x5619b2={...asRecord(_0x22a12b?.['contextOptions'])??{}};_0x5619b2['ignoreHTTPSErrors']=!![];typeof _0x612f03['userAgent']===_0x16fb4e['aLRaE']&&(_0x5619b2[_0x5413ff(0x1cf)]=_0x612f03['userAgent']);const _0x42ed10=_0x16fb4e['sdAdP'](mergeHeaders,asRecord(_0x5619b2[_0x5413ff(0x1fc)]),asRecord(_0x612f03[_0x5413ff(0x1fa)]));return _0x42ed10?_0x5619b2['extraHTTPHeaders']=_0x42ed10:delete _0x5619b2['extraHTTPHeaders'],_0x5e8b38[_0x5413ff(0x20a)]&&(_0x5619b2[_0x5413ff(0x201)]=_0x5e8b38[_0x5413ff(0x20a)]),{'launchOptions':_0x7afef9,'contextOptions':_0x5619b2};}async function resolveLocalAuthPath(_0x292043){const _0x2c84dc=_0x8c91a,_0xce7eb6={'yJGmi':function(_0x5d70c6,_0x3935de,_0x5b365d){return _0x5d70c6(_0x3935de,_0x5b365d);},'lXSHw':'auth.json','kVfRs':function(_0x4e0439){return _0x4e0439();},'ghpJF':function(_0x3a5223,_0x15bd9c){return _0x3a5223 instanceof _0x15bd9c;},'uMvcA':function(_0x3041b5,_0x242446){return _0x3041b5(_0x242446);},'YAPog':function(_0x49b002,_0x1be10f){return _0x49b002(_0x1be10f);}},_0x4108fe=_0xce7eb6[_0x2c84dc(0x1c2)](join,_0x292043,'auth.json.enc'),_0x520aa5=join(_0x292043,_0xce7eb6['lXSHw']);if(existsSync(_0x4108fe))try{const _0x47efef=await getToken();if(!_0x47efef)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3efca2=await readFile(_0x4108fe),_0x225f2b=decrypt(_0x3efca2,_0x47efef),_0x2c21dc=join(_0xce7eb6[_0x2c84dc(0x1cb)](tmpdir),'ranger-auth-'+Date['now']()+'.json');return await writeFile(_0x2c21dc,_0x225f2b),{'storageStatePath':_0x2c21dc,'tempAuthPath':_0x2c21dc};}catch(_0x22ac26){const _0x28b7e3=_0xce7eb6[_0x2c84dc(0x1fe)](_0x22ac26,Error)?_0x22ac26['message']:_0xce7eb6[_0x2c84dc(0x1f3)](String,_0x22ac26);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x28b7e3);}if(_0xce7eb6[_0x2c84dc(0x1b1)](existsSync,_0x520aa5))return{'storageStatePath':_0x520aa5};return{};}export async function buildPlaywrightConfig(_0x557b2a,_0x1505e7,_0x32f31a,_0x4ca00d,_0x25def5){const _0x689960=_0x8c91a,_0x5caa89={'EJPsE':function(_0x4b2c85,_0x532216,_0x5f2a51,_0x331346,_0x5921e2,_0x221b27,_0x539740){return _0x4b2c85(_0x532216,_0x5f2a51,_0x331346,_0x5921e2,_0x221b27,_0x539740);},'uCDJk':'stagehand','WxmIB':function(_0x1b2685,_0x1f3dab){return _0x1b2685(_0x1f3dab);}};if(_0x25def5)return _0x5caa89['EJPsE'](buildPlaywrightConfigCore,_0x557b2a,_0x25def5,_0x1505e7,_0x32f31a,_0x4ca00d,_0x5caa89['uCDJk']);const {storageStatePath:_0x4accc5,tempAuthPath:_0x39cfa7}=await resolveLocalAuthPath(getEnvDir(_0x1505e7));try{const _0x567bb0=await buildPlaywrightConfigCore(_0x557b2a,_0x4accc5,_0x1505e7,_0x32f31a,_0x4ca00d,_0x5caa89[_0x689960(0x1e8)]);return{..._0x567bb0,'tempAuthPath':_0x39cfa7};}catch(_0x5ac894){_0x39cfa7&&await _0x5caa89['WxmIB'](unlink,_0x39cfa7)['catch'](()=>{});throw _0x5ac894;}}export async function buildPlaywrightConfigCore(_0x3359d3,_0x47b320,_0x171cab,_0x4e046b,_0x185b80,_0xb7d947=_0x8c91a(0x1fd)){const _0x209df0=_0x8c91a,_0x36f5ce={'ZFtMm':function(_0x4d6b19,_0x21369c,_0x46b1e5){return _0x4d6b19(_0x21369c,_0x46b1e5);},'IaNDv':function(_0x37a623,_0x10915a){return _0x37a623===_0x10915a;},'IXPNW':'--no-sandbox','FfAsY':'--disable-setuid-sandbox','cswpy':function(_0x1550c3){return _0x1550c3();},'GavmU':function(_0x146c39,_0x495856,_0x3be911,_0x13752f){return _0x146c39(_0x495856,_0x3be911,_0x13752f);},'CCVKH':function(_0x4bccdf){return _0x4bccdf();},'pooSU':'sessions','wIKpg':function(_0x41ec24,_0x40a756){return _0x41ec24(_0x40a756);},'cQTqV':'chromium','gZeSn':_0x209df0(0x200),'aJcFS':_0x209df0(0x1ef),'ltNUx':'tabs','HlUIG':'pdf','jvtgW':function(_0x5a661e,_0x362af7){return _0x5a661e===_0x362af7;},'StUvf':_0x209df0(0x1b7)},_0x5975f3=_0x4e046b||_0x36f5ce[_0x209df0(0x1af)](randomUUID),_0x56fd6d=_0x36f5ce[_0x209df0(0x1ea)](join,_0x36f5ce['CCVKH'](getRangerDir),_0x36f5ce[_0x209df0(0x1ad)],_0x5975f3),_0xad26db=_0x36f5ce['wIKpg'](Boolean,_0x3359d3[_0x209df0(0x1b9)]),_0x3f8ada=_0xad26db?{'browserName':_0x36f5ce['cQTqV'],'cdpEndpoint':_0x3359d3[_0x209df0(0x1b9)]}:((()=>{const _0x416e3c=_0x209df0,{launchOptions:_0x2505bc,contextOptions:_0x4c7675}=_0x36f5ce['ZFtMm'](buildBrowserOptionsFromSettings,_0x3359d3,{'headless':_0x185b80?![]:_0x3359d3['headless']??!![],'storageStatePath':_0x47b320});if(_0x36f5ce[_0x416e3c(0x1ab)](process[_0x416e3c(0x1dc)]?.(),0x0)){const _0x556701=[_0x36f5ce['IXPNW'],_0x36f5ce[_0x416e3c(0x1bf)]],_0x2c454e=_0x2505bc['args']??[],_0x4308ea=_0x556701[_0x416e3c(0x1f6)](_0x4d7885=>!_0x2c454e['includes'](_0x4d7885));_0x2505bc['args']=[..._0x2c454e,..._0x4308ea];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x2505bc,'contextOptions':{..._0x4c7675,'permissions':[_0x416e3c(0x203),'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3d8a6c=_0x36f5ce['IaNDv'](_0xb7d947,'playwright-cli')?{'browser':_0x3f8ada,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x56fd6d,'outputMode':_0x209df0(0x1ba),'codegen':_0x36f5ce[_0x209df0(0x1eb)]}:{'name':_0x171cab,'browser':_0x3f8ada,'capabilities':[_0x36f5ce['aJcFS'],_0x36f5ce['ltNUx'],_0x209df0(0x1cd),_0x36f5ce[_0x209df0(0x1d2)],'vision'],'imageResponses':_0x209df0(0x208),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x56fd6d};if(!_0xad26db){const _0x32be9a=_0x3d8a6c[_0x209df0(0x1c8)],_0x336125=_0x32be9a[_0x209df0(0x1b4)];if(_0x36f5ce['jvtgW'](_0x336125['userAgent'],undefined))delete _0x336125['userAgent'];if(_0x336125[_0x209df0(0x201)]===undefined)delete _0x336125['storageState'];}const _0x3e701a=join(_0x36f5ce[_0x209df0(0x1af)](tmpdir),'ranger-config');!existsSync(_0x3e701a)&&await mkdir(_0x3e701a,{'recursive':!![]});const _0x3a9360=_0xb7d947==='playwright-cli'?_0x36f5ce['StUvf']:'',_0x3bf805=_0x36f5ce[_0x209df0(0x1ff)](join,_0x3e701a,_0x171cab+'-'+Date['now']()+_0x3a9360+_0x209df0(0x20c));return await _0x36f5ce[_0x209df0(0x1ff)](writeFile,_0x3bf805,JSON[_0x209df0(0x1f0)](_0x3d8a6c,null,0x2)),{'configPath':_0x3bf805};}export async function buildPlaywrightCliConfig(_0x1fd4c3,_0x57e0bc,_0x350e60,_0x28ce9f,_0x16c70c){const _0x459d2d=_0x8c91a,_0x59b338={'HZbNl':function(_0x13b326,_0x368915){return _0x13b326(_0x368915);},'unpey':function(_0x411759,_0x4d0a84,_0x8e3e,_0x1a4063,_0x4faec1,_0x2750f1,_0x3c00cf){return _0x411759(_0x4d0a84,_0x8e3e,_0x1a4063,_0x4faec1,_0x2750f1,_0x3c00cf);},'bvTML':_0x459d2d(0x1c4)};if(_0x16c70c)return buildPlaywrightConfigCore(_0x1fd4c3,_0x16c70c,_0x57e0bc,_0x350e60,_0x28ce9f,'playwright-cli');const {storageStatePath:_0x299a1a,tempAuthPath:_0x5b8837}=await _0x59b338[_0x459d2d(0x1ee)](resolveLocalAuthPath,getEnvDir(_0x57e0bc));try{const _0x244acf=await _0x59b338[_0x459d2d(0x21b)](buildPlaywrightConfigCore,_0x1fd4c3,_0x299a1a,_0x57e0bc,_0x350e60,_0x28ce9f,_0x59b338['bvTML']);return{..._0x244acf,'tempAuthPath':_0x5b8837};}catch(_0x35045b){_0x5b8837&&await unlink(_0x5b8837)['catch'](()=>{});throw _0x35045b;}}export function getNestedValue(_0x1c6480,_0x46b02e){const _0x8ca29=_0x8c91a,_0x26eef7={'kZetn':function(_0xeeff9,_0x4fc772){return _0xeeff9!==_0x4fc772;},'mVMNj':_0x8ca29(0x1df)},_0x176d21=parseKeyPath(_0x46b02e);let _0x4823f6=_0x1c6480;for(const _0x492c1e of _0x176d21){if(_0x4823f6===null||_0x4823f6===undefined||_0x26eef7['kZetn'](typeof _0x4823f6,_0x26eef7[_0x8ca29(0x1f2)]))return undefined;_0x4823f6=_0x4823f6[_0x492c1e];}return _0x4823f6;}export function setNestedValue(_0x145a01,_0x840b6f,_0x4674dd){const _0x1f12a7=_0x8c91a,_0x581906={'Jwiqg':function(_0x369e6a,_0x38d369){return _0x369e6a(_0x38d369);},'EVaMj':function(_0x251762,_0x3c5919){return _0x251762-_0x3c5919;},'oTLYX':function(_0x5cd430,_0x8da013){return _0x5cd430!==_0x8da013;}},_0x151f16=_0x581906['Jwiqg'](parseKeyPath,_0x840b6f);let _0x43ef5a=_0x145a01;for(let _0x17fb4c=0x0;_0x17fb4c<_0x581906[_0x1f12a7(0x205)](_0x151f16[_0x1f12a7(0x1e2)],0x1);_0x17fb4c++){const _0x243f46=_0x151f16[_0x17fb4c];(!(_0x243f46 in _0x43ef5a)||_0x581906[_0x1f12a7(0x1f4)](typeof _0x43ef5a[_0x243f46],'object'))&&(_0x43ef5a[_0x243f46]={}),_0x43ef5a=_0x43ef5a[_0x243f46];}_0x43ef5a[_0x151f16[_0x151f16[_0x1f12a7(0x1e2)]-0x1]]=_0x4674dd;}export function deleteNestedValue(_0x431deb,_0x9e50c9){const _0x172dce=_0x8c91a,_0x2298ad={'fvSVF':function(_0x31e511,_0x298930){return _0x31e511(_0x298930);},'tslmQ':function(_0x62913e,_0x56c087){return _0x62913e<_0x56c087;},'doiOZ':function(_0x18ed0e,_0x30f68e){return _0x18ed0e-_0x30f68e;},'ZNOfU':function(_0x5ef35c,_0x2cc907){return _0x5ef35c===_0x2cc907;},'wUVra':function(_0x42dd09,_0xee821a){return _0x42dd09!==_0xee821a;},'HHnhj':'object','WVmQb':function(_0x36ecc5,_0x5a8b4b){return _0x36ecc5===_0x5a8b4b;},'gQoWu':function(_0x3e6328,_0x4797a1){return _0x3e6328!==_0x4797a1;},'BKycJ':function(_0x2928f4,_0x23f408){return _0x2928f4 in _0x23f408;}},_0xcfbeee=_0x2298ad['fvSVF'](parseKeyPath,_0x9e50c9);let _0x1f90e1=_0x431deb;for(let _0x27cda9=0x0;_0x2298ad[_0x172dce(0x1d3)](_0x27cda9,_0x2298ad[_0x172dce(0x1f9)](_0xcfbeee[_0x172dce(0x1e2)],0x1));_0x27cda9++){if(_0x1f90e1===null||_0x2298ad['ZNOfU'](_0x1f90e1,undefined)||_0x2298ad[_0x172dce(0x20b)](typeof _0x1f90e1,_0x2298ad[_0x172dce(0x218)]))return![];_0x1f90e1=_0x1f90e1[_0xcfbeee[_0x27cda9]];}if(_0x2298ad[_0x172dce(0x1d6)](_0x1f90e1,null)||_0x2298ad[_0x172dce(0x1e6)](_0x1f90e1,undefined)||_0x2298ad[_0x172dce(0x20d)](typeof _0x1f90e1,_0x2298ad['HHnhj']))return![];const _0x569289=_0xcfbeee[_0x2298ad[_0x172dce(0x1f9)](_0xcfbeee[_0x172dce(0x1e2)],0x1)];if(_0x2298ad[_0x172dce(0x1e7)](_0x569289,_0x1f90e1))return delete _0x1f90e1[_0x569289],!![];return![];}function parseKeyPath(_0xcae4da){const _0x37a4ac=_0x8c91a,_0xab8f09={'gKcJN':'headers','TJdxW':function(_0x4d5d1d,_0x791a1e){return _0x4d5d1d===_0x791a1e;},'axRmg':_0x37a4ac(0x1c3)},_0x2db596=_0xcae4da[_0x37a4ac(0x1c0)]('.');return _0x2db596[0x0]===_0x37a4ac(0x1d0)&&(_0x2db596[0x0]=_0xab8f09[_0x37a4ac(0x217)]),_0xab8f09[_0x37a4ac(0x20f)](_0x2db596[0x0],_0xab8f09['axRmg'])&&(_0x2db596[0x0]=_0x37a4ac(0x1b3)),_0x2db596;}function _0xba7c(){const _0x2e7169=['configPath','XORrd','YGvdp','DxmBU','Environment\x20variable\x20','BmJVs','fromEntries','gKcJN','HHnhj','adnuJ','auth.json.enc','unpey','24664CFXojj','3184NsMjuM','IaNDv','KkhDR','pooSU','tempAuthPath','cswpy','uHGuE','YAPog','isArray','setupHeaders','contextOptions','string','all','-cli','LXIlX','cdpEndpoint','file','UjRaB','gegah','--allow-running-insecure-content','174XmoXOB','FfAsY','split','1205575uoBWNP','yJGmi','setupHeader','playwright-cli','756UVTekB','CVWAO','11683lFUGsm','browser','NcsYi','join','kVfRs','location','install','327PlsQUg','userAgent','header','GRTfR','HlUIG','tslmQ','pHOmf','dBulr','ZNOfU','args','headless','utf-8','gutax','SrkyR','getuid','2613721wcDojA','includes','object','--unsafely-treat-insecure-origin-as-secure=http://localhost','zHwoB','length','mLkUA','HCKHA','3883992CJvECc','WVmQb','BKycJ','uCDJk','63270TcaYxT','GavmU','gZeSn','keys','path','HZbNl','core','stringify','entries','mVMNj','uMvcA','oTLYX','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','filter','55280oQmncL','repeat','doiOZ','headers','boolean','extraHTTPHeaders','stagehand','ghpJF','ZFtMm','none','storageState','xtgQq','clipboard-read','safeMode','EVaMj','push','NLBZC','allow','EXLgZ','storageStatePath','wUVra','.json','gQoWu','auth.json','TJdxW'];_0xba7c=function(){return _0x2e7169;};return _0xba7c();}export function formatSettings(_0x2176c7,_0x578fe8=0x0){const _0x514918=_0x8c91a,_0x6a61f8={'grAlL':'object','zHqtb':function(_0x274478,_0x29d796){return _0x274478!==_0x29d796;}},_0x220c96=[],_0x28172f='\x20\x20'[_0x514918(0x1f8)](_0x578fe8);for(const [_0x4a6e49,_0x460fac]of Object[_0x514918(0x1f1)](_0x2176c7)){if(_0x460fac===undefined)continue;if(typeof _0x460fac===_0x6a61f8['grAlL']&&_0x6a61f8['zHqtb'](_0x460fac,null)){_0x220c96[_0x514918(0x206)](''+_0x28172f+_0x4a6e49+':');for(const [_0x384786,_0x5a31f2]of Object['entries'](_0x460fac)){_0x220c96[_0x514918(0x206)](_0x28172f+'\x20\x20'+_0x384786+':\x20'+_0x5a31f2);}}else _0x220c96[_0x514918(0x206)](''+_0x28172f+_0x4a6e49+':\x20'+_0x460fac);}return _0x220c96[_0x514918(0x1ca)]('\x0a');}
|
|
1
|
+
const _0x3ef812=_0x216e;(function(_0x21925d,_0x1af859){const _0x335ba9=_0x216e,_0x1bbb3b=_0x21925d();while(!![]){try{const _0x44fd05=parseInt(_0x335ba9(0x1d0))/0x1+-parseInt(_0x335ba9(0x1da))/0x2*(parseInt(_0x335ba9(0x1cd))/0x3)+parseInt(_0x335ba9(0x1de))/0x4*(parseInt(_0x335ba9(0x1cb))/0x5)+parseInt(_0x335ba9(0x195))/0x6*(parseInt(_0x335ba9(0x1c2))/0x7)+parseInt(_0x335ba9(0x18e))/0x8*(parseInt(_0x335ba9(0x1a7))/0x9)+parseInt(_0x335ba9(0x1d7))/0xa*(-parseInt(_0x335ba9(0x1c7))/0xb)+parseInt(_0x335ba9(0x1e8))/0xc*(-parseInt(_0x335ba9(0x1b5))/0xd);if(_0x44fd05===_0x1af859)break;else _0x1bbb3b['push'](_0x1bbb3b['shift']());}catch(_0x4becad){_0x1bbb3b['push'](_0x1bbb3b['shift']());}}}(_0x4efb,0xe2ec0));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{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';function _0x4efb(){const _0x1271b3=['replace','header','utf-8','fromEntries','XbaeN','stringify','30zBJkXP','--allow-insecure-localhost','locations','Failed\x20to\x20decrypt\x20auth\x20state:\x20','lJMTf','contextOptions','HzluV','headers','args','DGjfD','message','keys','allowInsecureLocalhost','object','oOPZw','clipboard-read','local','GbIpm','171uJexWT','entries','parse','EzCEu','oCFmm','dYRxX','--disable-web-security','includes','vbisH','SufBA','auth.json.enc','--unsafely-treat-insecure-origin-as-secure=http://localhost','setupHeader','JMtwK','715BylXgW','.json','jTAdQ','RNVIs','vpoIj','Zifsx','push','vision','length','LqCdR','repeat','userAgent','EcCKG','1357769ZPcphT','fZtUM','auth.json','boolean','legacy','2229095vDWKhf','pxPdk','Environment\x20variable\x20','NAdAB','153760YByhqg','ZpUoy','511923UUYQRO','none','ranger-auth-','1507494TkHGok','XleeJ','chromium','filter','configPath','erxag','ENOENT','20iwCdrW','zhLCM','rsmJo','14cPBABL','storageState','SHTqc','extraHTTPHeaders','64lLdytA','code','map','TApmj','--disable-setuid-sandbox','WDFCu','JskKa','getuid','path','rGFFH','161220wEqQPB','string','playwright-cli','headless','split','bOPgo','allow','tabs','RKNmv','WvWQR','now','browser','125816BpspCB'];_0x4efb=function(){return _0x1271b3;};return _0x4efb();}import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x5634d0,_0x1260f8){const _0x4a10bb=_0x216e,_0x34f499={'SLtRo':function(_0x41730b,_0x1e7b94,_0x4549f0,_0x506430){return _0x41730b(_0x1e7b94,_0x4549f0,_0x506430);},'SHTqc':function(_0x536e3a,_0xc48bfc,_0x59e097,_0x54b450){return _0x536e3a(_0xc48bfc,_0x59e097,_0x54b450);},'ynSgS':_0x4a10bb(0x1a5),'RwJcs':function(_0x4ca837,_0x2c875b,_0x28f94b){return _0x4ca837(_0x2c875b,_0x28f94b);},'WvWQR':function(_0x1fa228,_0x343dbb){return _0x1fa228(_0x343dbb);},'CwqeT':function(_0x2ce8ec,_0x394d72){return _0x2ce8ec!==_0x394d72;},'aAUxK':function(_0x2de9c1,_0x3a8611){return _0x2de9c1(_0x3a8611);}},_0x4cf0ea=_0x34f499['SLtRo'](join,_0x1260f8,'ci',_0x5634d0),_0x1619e3=_0x34f499[_0x4a10bb(0x1dc)](join,_0x1260f8,_0x34f499['ynSgS'],_0x5634d0),_0x4bec53=join(_0x1260f8,_0x5634d0),_0x1c1a11=_0x34f499['RwJcs'](join,_0x1260f8,'local'),_0x50fc08=_0x34f499['RwJcs'](join,_0x1260f8,'ci');if(existsSync(_0x4cf0ea))return _0x4cf0ea;if(_0x34f499[_0x4a10bb(0x18b)](existsSync,_0x1619e3))return _0x1619e3;if(existsSync(_0x4bec53)&&(_0x34f499['CwqeT'](_0x4bec53,_0x1c1a11)&&_0x34f499['CwqeT'](_0x4bec53,_0x50fc08)?!![]:_0x34f499['aAUxK'](hasLegacyProfileFiles,_0x4bec53)))return _0x4bec53;return null;}export function getEnvDir(_0x1a0129){const _0x1a8d5d=_0x216e,_0x1b471f={'PDVOp':function(_0x3fd546){return _0x3fd546();},'stxNk':function(_0x2b1e8a,_0x54f825,_0x800bf4){return _0x2b1e8a(_0x54f825,_0x800bf4);},'WAMmm':function(_0x5e0dd8,_0x580c38,_0x1a7205,_0x160f43){return _0x5e0dd8(_0x580c38,_0x1a7205,_0x160f43);}},_0x41fd02=_0x1b471f['PDVOp'](getRangerDir),_0x583c26=_0x1b471f['stxNk'](findEnvInRoot,_0x1a0129,_0x41fd02);if(_0x583c26)return _0x583c26;const _0x418c8e=getRangerHomeDir();if(_0x418c8e!==_0x41fd02){const _0x31f210=findEnvInRoot(_0x1a0129,_0x418c8e);if(_0x31f210)return _0x31f210;}return _0x1b471f['WAMmm'](join,_0x41fd02,_0x1a8d5d(0x1a5),_0x1a0129);}export function findExistingEnv(_0x20f5ee,_0x5e7baa){const _0x310a39=_0x216e,_0x2bf86e={'WDFCu':function(_0x5b6624,_0xa94bb9,_0x2ea8a0){return _0x5b6624(_0xa94bb9,_0x2ea8a0);},'jTAdQ':function(_0x13f8a0,_0x1bab80,_0x5aebf7,_0x335270){return _0x13f8a0(_0x1bab80,_0x5aebf7,_0x335270);},'zhLCM':_0x310a39(0x1c6),'dYRxX':function(_0x47fc14,_0x42e78f){return _0x47fc14(_0x42e78f);},'IEgyH':function(_0x1c85ba,_0x51dc92){return _0x1c85ba===_0x51dc92;},'LqCdR':function(_0x1d6759,_0x336779){return _0x1d6759(_0x336779);}},_0x5436ab=_0x5e7baa?.['rangerDir'],_0x431524=_0x5436ab?[_0x5436ab]:[getRangerDir(),getRangerHomeDir()][_0x310a39(0x1d3)]((_0x3e6249,_0x4d9c8f,_0x513d4d)=>_0x513d4d['indexOf'](_0x3e6249)===_0x4d9c8f),_0x36036b=_0x5e7baa?.[_0x310a39(0x197)]??['ci','local',_0x310a39(0x1c6)];for(const _0x3a4214 of _0x431524){const _0x3bf638=join(_0x3a4214,'local'),_0x23f46d=_0x2bf86e[_0x310a39(0x1e3)](join,_0x3a4214,'ci'),_0x38ae03=[{'location':'ci','path':join(_0x3a4214,'ci',_0x20f5ee)},{'location':'local','path':_0x2bf86e[_0x310a39(0x1b7)](join,_0x3a4214,'local',_0x20f5ee)},{'location':_0x2bf86e[_0x310a39(0x1d8)],'path':_0x2bf86e[_0x310a39(0x1e3)](join,_0x3a4214,_0x20f5ee)}];for(const _0x545ffe of _0x38ae03){if(_0x36036b[_0x310a39(0x1ae)](_0x545ffe['location'])&&_0x2bf86e[_0x310a39(0x1ac)](existsSync,_0x545ffe[_0x310a39(0x1e6)])){if(_0x2bf86e['IEgyH'](_0x545ffe['location'],'legacy')&&(_0x545ffe['path']===_0x3bf638||_0x545ffe[_0x310a39(0x1e6)]===_0x23f46d)&&!_0x2bf86e[_0x310a39(0x1be)](hasLegacyProfileFiles,_0x545ffe[_0x310a39(0x1e6)]))continue;return{'path':_0x545ffe[_0x310a39(0x1e6)],'location':_0x545ffe['location']};}}}return null;}function hasLegacyProfileFiles(_0x4c187a){const _0x6372d=_0x216e,_0x5e2b4c={'vgLlV':function(_0x2c0468,_0x37a2ff){return _0x2c0468(_0x37a2ff);},'bwvGS':function(_0x513acc,_0xe7f666,_0x3884b1){return _0x513acc(_0xe7f666,_0x3884b1);},'lJMTf':function(_0x2b629a,_0x38e570){return _0x2b629a(_0x38e570);},'BxUFH':_0x6372d(0x1c4)};return _0x5e2b4c['vgLlV'](existsSync,_0x5e2b4c['bwvGS'](join,_0x4c187a,'settings.json'))||_0x5e2b4c[_0x6372d(0x199)](existsSync,join(_0x4c187a,_0x5e2b4c['BxUFH']))||_0x5e2b4c['vgLlV'](existsSync,join(_0x4c187a,_0x6372d(0x1b1)));}export function isEnvCi(_0xea2865){const _0x4f7228=_0x216e,_0x2459a2={'NAPlC':function(_0x517629,_0x2ee6eb,_0x1b849b,_0x37d59e){return _0x517629(_0x2ee6eb,_0x1b849b,_0x37d59e);},'fqXqg':function(_0x18c9be){return _0x18c9be();},'RKNmv':function(_0x1f5ee3,_0x3983df){return _0x1f5ee3!==_0x3983df;},'uYNPr':function(_0x98f510){return _0x98f510();}};if(existsSync(_0x2459a2['NAPlC'](join,getRangerDir(),'ci',_0xea2865)))return!![];const _0x50559b=_0x2459a2['fqXqg'](getRangerHomeDir);if(_0x2459a2[_0x4f7228(0x18a)](_0x50559b,_0x2459a2['uYNPr'](getRangerDir))&&existsSync(join(_0x50559b,'ci',_0xea2865)))return!![];return![];}export async function cleanupTempFiles(_0x424ff8){const _0x462bad=_0x216e,_0xfdaa7c={'THokc':function(_0x48d88c,_0x901bf0){return _0x48d88c!==_0x901bf0;}},_0x48d31f=[_0x424ff8['tempAuthPath'],_0x424ff8[_0x462bad(0x1d4)]][_0x462bad(0x1d3)](Boolean);await Promise['all'](_0x48d31f[_0x462bad(0x1e0)](_0x3e9620=>unlink(_0x3e9620)['catch'](_0x5b5ab3=>{const _0x2d9129=_0x462bad;_0xfdaa7c['THokc'](_0x5b5ab3[_0x2d9129(0x1df)],_0x2d9129(0x1d6))&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x3e9620+':',_0x5b5ab3[_0x2d9129(0x19f)]);})));}export function getSettingsPath(_0x4fe0c2){const _0x32b7b6=_0x216e,_0x55f625={'HzluV':function(_0x3e0051,_0x30e010,_0x2fd5fd){return _0x3e0051(_0x30e010,_0x2fd5fd);},'GbIpm':function(_0x971b4,_0x2fbdd6){return _0x971b4(_0x2fbdd6);},'fVmvf':'settings.json'};return _0x55f625[_0x32b7b6(0x19b)](join,_0x55f625[_0x32b7b6(0x1a6)](getEnvDir,_0x4fe0c2),_0x55f625['fVmvf']);}export async function loadSettings(_0x38ed1d){const _0x2bd6ad=_0x216e,_0x522695={'rGFFH':function(_0x1c269a,_0x2fe965){return _0x1c269a(_0x2fe965);}},_0x4a1962=_0x522695[_0x2bd6ad(0x1e7)](getSettingsPath,_0x38ed1d);if(!existsSync(_0x4a1962))return{};try{const _0x164211=await readFile(_0x4a1962,_0x2bd6ad(0x191));return JSON[_0x2bd6ad(0x1a9)](_0x164211);}catch{return{};}}export async function saveSettings(_0x1fab73,_0x51bdcf){const _0x3cb22a=_0x216e,_0x47cca2={'SufBA':function(_0x24e0d1,_0x3399e7){return _0x24e0d1(_0x3399e7);},'ViEod':function(_0x468f32,_0x2e8fae,_0x219b42){return _0x468f32(_0x2e8fae,_0x219b42);},'gzhbG':function(_0x58596d,_0x530cad,_0x31baeb){return _0x58596d(_0x530cad,_0x31baeb);}},_0xb0119d=getSettingsPath(_0x1fab73),_0xa36e0d=_0x47cca2[_0x3cb22a(0x1b0)](dirname,_0xb0119d);!existsSync(_0xa36e0d)&&await _0x47cca2['ViEod'](mkdir,_0xa36e0d,{'recursive':!![]}),await _0x47cca2['gzhbG'](writeFile,_0xb0119d,JSON[_0x3cb22a(0x194)](_0x51bdcf,null,0x2));}export function resolveEnvVars(_0x76553b){const _0x129189=_0x216e,_0x2c15a2={'xKFFq':function(_0x1eeae9,_0x5a4160){return _0x1eeae9===_0x5a4160;},'bquhw':function(_0x4dcc54,_0x366ca6){return _0x4dcc54===_0x366ca6;}};if(_0x2c15a2['bquhw'](typeof _0x76553b,'string'))return _0x76553b[_0x129189(0x18f)](/\$\{(\w+)\}/g,(_0x308ec7,_0x467cf5)=>{const _0x55573d=_0x129189,_0x556498=process['env'][_0x467cf5];if(_0x2c15a2['xKFFq'](_0x556498,undefined))throw new Error(_0x55573d(0x1c9)+_0x467cf5+'\x20is\x20not\x20set');return _0x556498;});if(Array['isArray'](_0x76553b))return _0x76553b['map'](resolveEnvVars);if(_0x76553b&&_0x2c15a2['bquhw'](typeof _0x76553b,'object'))return Object[_0x129189(0x192)](Object[_0x129189(0x1a8)](_0x76553b)['map'](([_0x9006ea,_0xceb01f])=>[_0x9006ea,resolveEnvVars(_0xceb01f)]));return _0x76553b;}const isRecord=_0x7625a2=>typeof _0x7625a2===_0x3ef812(0x1a2)&&_0x7625a2!==null&&!Array['isArray'](_0x7625a2),asRecord=_0x1ddf8b=>isRecord(_0x1ddf8b)?_0x1ddf8b:undefined,mergeHeaders=(_0x13a882,_0x3837f7)=>{const _0xe554d5=_0x3ef812,_0x3b6236={'nJiFh':function(_0x15c0df,_0x253d9a){return _0x15c0df??_0x253d9a;},'qsVKS':function(_0x29361d,_0x57b26b){return _0x29361d??_0x57b26b;}},_0x164b84={..._0x3b6236['nJiFh'](_0x13a882,{}),..._0x3b6236['qsVKS'](_0x3837f7,{})};return Object[_0xe554d5(0x1a0)](_0x164b84)[_0xe554d5(0x1bd)]?_0x164b84:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x3ef812(0x1ad),'--allow-running-insecure-content',_0x3ef812(0x1b2),_0x3ef812(0x196)];export function buildBrowserOptionsFromSettings(_0x199ef5,_0x2765f3={}){const _0x27ad81=_0x3ef812,_0x50b4c7={'aMBLt':function(_0x4b1942,_0x4d837d){return _0x4b1942(_0x4d837d);},'Zifsx':function(_0x4e4409,_0x2c9ba3){return _0x4e4409===_0x2c9ba3;},'rsmJo':function(_0x2f2c97,_0x2a7629){return _0x2f2c97(_0x2a7629);}},_0xe07dba=_0x50b4c7['aMBLt'](asRecord,_0x199ef5[_0x27ad81(0x18d)]),_0x3f3638={...asRecord(_0xe07dba?.['launchOptions'])??{}};_0x50b4c7[_0x27ad81(0x1ba)](typeof _0x2765f3['headless'],_0x27ad81(0x1c5))&&(_0x3f3638['headless']=_0x2765f3[_0x27ad81(0x185)]);if(_0x199ef5['safeMode']){const _0x1ef6fd=_0x3f3638['args']??[],_0x54ed19=SAFE_MODE_ARGS[_0x27ad81(0x1d3)](_0x3a3e4b=>!_0x1ef6fd['includes'](_0x3a3e4b));_0x3f3638['args']=[..._0x1ef6fd,..._0x54ed19];}if(_0x199ef5[_0x27ad81(0x1a1)]){const _0x4fc4c8=_0x3f3638['args']??[],_0x26f6cc=ALLOW_LOCALHOST_ARGS[_0x27ad81(0x1d3)](_0x213ff4=>!_0x4fc4c8['includes'](_0x213ff4));_0x3f3638['args']=[..._0x4fc4c8,..._0x26f6cc];}const _0x411c43={..._0x50b4c7['rsmJo'](asRecord,_0xe07dba?.['contextOptions'])??{}};_0x411c43['ignoreHTTPSErrors']=!![];typeof _0x199ef5['userAgent']===_0x27ad81(0x1e9)&&(_0x411c43['userAgent']=_0x199ef5[_0x27ad81(0x1c0)]);const _0x53400e=mergeHeaders(asRecord(_0x411c43['extraHTTPHeaders']),_0x50b4c7[_0x27ad81(0x1d9)](asRecord,_0x199ef5[_0x27ad81(0x19c)]));return _0x53400e?_0x411c43[_0x27ad81(0x1dd)]=_0x53400e:delete _0x411c43['extraHTTPHeaders'],_0x2765f3['storageStatePath']&&(_0x411c43[_0x27ad81(0x1db)]=_0x2765f3['storageStatePath']),{'launchOptions':_0x3f3638,'contextOptions':_0x411c43};}function _0x216e(_0x36011c,_0x202b00){_0x36011c=_0x36011c-0x185;const _0x4efb8f=_0x4efb();let _0x216ebf=_0x4efb8f[_0x36011c];return _0x216ebf;}async function resolveLocalAuthPath(_0x18664f){const _0x7a8976=_0x3ef812,_0x5e72a1={'fZtUM':function(_0x490a8b){return _0x490a8b();},'TApmj':function(_0x9a7192,_0x92d0c5,_0x90610f){return _0x9a7192(_0x92d0c5,_0x90610f);},'JMtwK':function(_0x22116c){return _0x22116c();},'xAjlf':function(_0x549142,_0x7ddf1e,_0x3d1dbe){return _0x549142(_0x7ddf1e,_0x3d1dbe);},'bOPgo':function(_0x4984b8,_0x327fa4){return _0x4984b8(_0x327fa4);}},_0x123418=join(_0x18664f,'auth.json.enc'),_0x446a23=join(_0x18664f,_0x7a8976(0x1c4));if(existsSync(_0x123418))try{const _0x5cf62f=await _0x5e72a1[_0x7a8976(0x1c3)](getToken);if(!_0x5cf62f)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5664c4=await readFile(_0x123418),_0x53680c=_0x5e72a1[_0x7a8976(0x1e1)](decrypt,_0x5664c4,_0x5cf62f),_0x2ca8a0=join(_0x5e72a1[_0x7a8976(0x1b4)](tmpdir),_0x7a8976(0x1cf)+Date[_0x7a8976(0x18c)]()+'.json');return await _0x5e72a1['xAjlf'](writeFile,_0x2ca8a0,_0x53680c),{'storageStatePath':_0x2ca8a0,'tempAuthPath':_0x2ca8a0};}catch(_0x33270c){const _0x4334c4=_0x33270c instanceof Error?_0x33270c[_0x7a8976(0x19f)]:String(_0x33270c);throw new Error(_0x7a8976(0x198)+_0x4334c4);}if(_0x5e72a1[_0x7a8976(0x187)](existsSync,_0x446a23))return{'storageStatePath':_0x446a23};return{};}export async function buildPlaywrightConfig(_0xa76dc0,_0x1c617d,_0x4ecef5,_0x2bea60,_0xd01ed4){const _0x30b760=_0x3ef812,_0x141570={'RJlJq':function(_0x2efafe,_0x1ceaf5,_0x22d1ee,_0xa2b0c,_0x2bfee1,_0x220693,_0x1653c5){return _0x2efafe(_0x1ceaf5,_0x22d1ee,_0xa2b0c,_0x2bfee1,_0x220693,_0x1653c5);},'ZaeYA':function(_0x4745e4,_0x127591){return _0x4745e4(_0x127591);},'oOPZw':function(_0x18ce0a,_0x1a9ef2){return _0x18ce0a(_0x1a9ef2);},'OUevO':function(_0x1ad2df,_0x315ec2,_0x2b2d4e,_0x5cd6a8,_0x3d8a19,_0x17a60f,_0x29a164){return _0x1ad2df(_0x315ec2,_0x2b2d4e,_0x5cd6a8,_0x3d8a19,_0x17a60f,_0x29a164);}};if(_0xd01ed4)return _0x141570['RJlJq'](buildPlaywrightConfigCore,_0xa76dc0,_0xd01ed4,_0x1c617d,_0x4ecef5,_0x2bea60,'stagehand');const {storageStatePath:_0x321156,tempAuthPath:_0x13b355}=await _0x141570['ZaeYA'](resolveLocalAuthPath,_0x141570[_0x30b760(0x1a3)](getEnvDir,_0x1c617d));try{const _0x18de82=await _0x141570['OUevO'](buildPlaywrightConfigCore,_0xa76dc0,_0x321156,_0x1c617d,_0x4ecef5,_0x2bea60,'stagehand');return{..._0x18de82,'tempAuthPath':_0x13b355};}catch(_0x2af6d7){_0x13b355&&await unlink(_0x13b355)['catch'](()=>{});throw _0x2af6d7;}}export async function buildPlaywrightConfigCore(_0x439a1e,_0x36b6dd,_0x3222d0,_0x79874e,_0x92a32e,_0x22265e='stagehand'){const _0x5aa684=_0x3ef812,_0x1b95f0={'khxDq':function(_0x27015e,_0x153806,_0x2175fe){return _0x27015e(_0x153806,_0x2175fe);},'vbisH':function(_0x240354,_0x201a61){return _0x240354===_0x201a61;},'yKoUh':_0x5aa684(0x1a4),'jWojw':function(_0x5cf45d,_0x1c45e4,_0x5f408a,_0x1b1ba3){return _0x5cf45d(_0x1c45e4,_0x5f408a,_0x1b1ba3);},'erxag':'sessions','oLpVT':'file','ihSPl':_0x5aa684(0x1ce),'QXPUR':'core','oCFmm':_0x5aa684(0x189),'EzCEu':function(_0x3f32eb,_0x58e5ad,_0x205f06){return _0x3f32eb(_0x58e5ad,_0x205f06);},'RNVIs':function(_0x598ad8,_0x1a1c04,_0x30c2d9){return _0x598ad8(_0x1a1c04,_0x30c2d9);},'ZpUoy':function(_0x4a93e5,_0x2c759d){return _0x4a93e5===_0x2c759d;},'DGjfD':_0x5aa684(0x1ea),'NAGSV':'-cli','WTZRp':function(_0x111e29,_0x3a250a,_0x1bd68a){return _0x111e29(_0x3a250a,_0x1bd68a);}},_0x42ad8e=_0x79874e||randomUUID(),_0x3b1d94=_0x1b95f0['jWojw'](join,getRangerDir(),_0x1b95f0[_0x5aa684(0x1d5)],_0x42ad8e),_0x57dbdf=Boolean(_0x439a1e['cdpEndpoint']),_0x10b138=_0x57dbdf?{'browserName':_0x5aa684(0x1d2),'cdpEndpoint':_0x439a1e['cdpEndpoint']}:((()=>{const _0x4fd09e=_0x5aa684,{launchOptions:_0x56faf1,contextOptions:_0x2f0b79}=_0x1b95f0['khxDq'](buildBrowserOptionsFromSettings,_0x439a1e,{'headless':_0x92a32e?![]:_0x439a1e[_0x4fd09e(0x185)]??!![],'storageStatePath':_0x36b6dd});if(_0x1b95f0[_0x4fd09e(0x1af)](process[_0x4fd09e(0x1e5)]?.(),0x0)){const _0x2c51b6=['--no-sandbox',_0x4fd09e(0x1e2)],_0x356f52=_0x56faf1[_0x4fd09e(0x19d)]??[],_0xe7d1cb=_0x2c51b6['filter'](_0x5ea03d=>!_0x356f52[_0x4fd09e(0x1ae)](_0x5ea03d));_0x56faf1[_0x4fd09e(0x19d)]=[..._0x356f52,..._0xe7d1cb];}return{'isolated':!![],'browserName':_0x4fd09e(0x1d2),'launchOptions':_0x56faf1,'contextOptions':{..._0x2f0b79,'permissions':[_0x1b95f0['yKoUh'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x549837=_0x22265e===_0x5aa684(0x1ea)?{'browser':_0x10b138,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x3b1d94,'outputMode':_0x1b95f0['oLpVT'],'codegen':_0x1b95f0['ihSPl']}:{'name':_0x3222d0,'browser':_0x10b138,'capabilities':[_0x1b95f0['QXPUR'],_0x1b95f0[_0x5aa684(0x1ab)],'install','pdf',_0x5aa684(0x1bc)],'imageResponses':_0x5aa684(0x188),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x3b1d94};if(!_0x57dbdf){const _0xa70329=_0x549837['browser'],_0x3ff5e3=_0xa70329[_0x5aa684(0x19a)];if(_0x3ff5e3[_0x5aa684(0x1c0)]===undefined)delete _0x3ff5e3['userAgent'];if(_0x3ff5e3['storageState']===undefined)delete _0x3ff5e3['storageState'];}const _0x52c642=_0x1b95f0[_0x5aa684(0x1aa)](join,tmpdir(),'ranger-config');!existsSync(_0x52c642)&&await _0x1b95f0[_0x5aa684(0x1b8)](mkdir,_0x52c642,{'recursive':!![]});const _0x24c063=_0x1b95f0[_0x5aa684(0x1cc)](_0x22265e,_0x1b95f0[_0x5aa684(0x19e)])?_0x1b95f0['NAGSV']:'',_0xaabe39=join(_0x52c642,_0x3222d0+'-'+Date[_0x5aa684(0x18c)]()+_0x24c063+_0x5aa684(0x1b6));return await _0x1b95f0['WTZRp'](writeFile,_0xaabe39,JSON['stringify'](_0x549837,null,0x2)),{'configPath':_0xaabe39};}export async function buildPlaywrightCliConfig(_0x4483f3,_0x6d41c2,_0x2dd6e8,_0xd8b899,_0x4423ef){const _0xf25deb=_0x3ef812,_0x1b4677={'EcCKG':function(_0x3bf325,_0x16843c,_0x124756,_0x26f716,_0x45c1db,_0x17b9ed,_0x41941b){return _0x3bf325(_0x16843c,_0x124756,_0x26f716,_0x45c1db,_0x17b9ed,_0x41941b);},'XbaeN':function(_0x1ff554,_0x43096b){return _0x1ff554(_0x43096b);},'XleeJ':_0xf25deb(0x1ea)};if(_0x4423ef)return _0x1b4677[_0xf25deb(0x1c1)](buildPlaywrightConfigCore,_0x4483f3,_0x4423ef,_0x6d41c2,_0x2dd6e8,_0xd8b899,_0xf25deb(0x1ea));const {storageStatePath:_0x3d34c1,tempAuthPath:_0x4d3335}=await _0x1b4677[_0xf25deb(0x193)](resolveLocalAuthPath,_0x1b4677['XbaeN'](getEnvDir,_0x6d41c2));try{const _0x44e879=await buildPlaywrightConfigCore(_0x4483f3,_0x3d34c1,_0x6d41c2,_0x2dd6e8,_0xd8b899,_0x1b4677[_0xf25deb(0x1d1)]);return{..._0x44e879,'tempAuthPath':_0x4d3335};}catch(_0x137727){_0x4d3335&&await unlink(_0x4d3335)['catch'](()=>{});throw _0x137727;}}export function getNestedValue(_0x3befe0,_0x23e2c8){const _0x316367=_0x3ef812,_0x5098fc={'pxPdk':function(_0x4a8907,_0x3ea4a8){return _0x4a8907===_0x3ea4a8;},'RMwRR':function(_0xe8d5aa,_0x5059dd){return _0xe8d5aa!==_0x5059dd;}},_0x14717d=parseKeyPath(_0x23e2c8);let _0x120a49=_0x3befe0;for(const _0x4ce896 of _0x14717d){if(_0x5098fc[_0x316367(0x1c8)](_0x120a49,null)||_0x120a49===undefined||_0x5098fc['RMwRR'](typeof _0x120a49,_0x316367(0x1a2)))return undefined;_0x120a49=_0x120a49[_0x4ce896];}return _0x120a49;}export function setNestedValue(_0x45bbfa,_0x1e7dc1,_0x235bed){const _0x1b8ec0={'QLJzZ':function(_0x445462,_0x54df6b){return _0x445462 in _0x54df6b;},'srYQW':function(_0x1ae5e8,_0x24ba3a){return _0x1ae5e8!==_0x24ba3a;},'dvwbF':function(_0x136af8,_0x23d64a){return _0x136af8-_0x23d64a;}},_0x115b7e=parseKeyPath(_0x1e7dc1);let _0x297101=_0x45bbfa;for(let _0x2fa509=0x0;_0x2fa509<_0x115b7e['length']-0x1;_0x2fa509++){const _0x3d4df7=_0x115b7e[_0x2fa509];(!_0x1b8ec0['QLJzZ'](_0x3d4df7,_0x297101)||_0x1b8ec0['srYQW'](typeof _0x297101[_0x3d4df7],'object'))&&(_0x297101[_0x3d4df7]={}),_0x297101=_0x297101[_0x3d4df7];}_0x297101[_0x115b7e[_0x1b8ec0['dvwbF'](_0x115b7e['length'],0x1)]]=_0x235bed;}export function deleteNestedValue(_0x5c44e7,_0x330902){const _0x46e1cf=_0x3ef812,_0x4dc84d={'NAdAB':function(_0x1ec2e6,_0x560bc3){return _0x1ec2e6(_0x560bc3);},'pqbbs':function(_0x6dc089,_0x1b9f01){return _0x6dc089<_0x1b9f01;},'UHuUk':function(_0x58f5b8,_0x1a5f9b){return _0x58f5b8===_0x1a5f9b;},'feNbO':function(_0x5de7a5,_0x335b8e){return _0x5de7a5===_0x335b8e;},'IrjlH':function(_0x3f4f10,_0x46d4f7){return _0x3f4f10 in _0x46d4f7;}},_0x50c5bd=_0x4dc84d[_0x46e1cf(0x1ca)](parseKeyPath,_0x330902);let _0x274df4=_0x5c44e7;for(let _0x47c761=0x0;_0x4dc84d['pqbbs'](_0x47c761,_0x50c5bd[_0x46e1cf(0x1bd)]-0x1);_0x47c761++){if(_0x274df4===null||_0x4dc84d['UHuUk'](_0x274df4,undefined)||typeof _0x274df4!=='object')return![];_0x274df4=_0x274df4[_0x50c5bd[_0x47c761]];}if(_0x4dc84d['feNbO'](_0x274df4,null)||_0x274df4===undefined||typeof _0x274df4!=='object')return![];const _0x437ed0=_0x50c5bd[_0x50c5bd['length']-0x1];if(_0x4dc84d['IrjlH'](_0x437ed0,_0x274df4))return delete _0x274df4[_0x437ed0],!![];return![];}function parseKeyPath(_0x4af3e9){const _0x5ccf9a=_0x3ef812,_0x2dec80={'OUjJx':function(_0x5753f4,_0x2a0988){return _0x5753f4===_0x2a0988;},'JskKa':_0x5ccf9a(0x1b3)},_0x1eb8fd=_0x4af3e9[_0x5ccf9a(0x186)]('.');return _0x1eb8fd[0x0]===_0x5ccf9a(0x190)&&(_0x1eb8fd[0x0]=_0x5ccf9a(0x19c)),_0x2dec80['OUjJx'](_0x1eb8fd[0x0],_0x2dec80[_0x5ccf9a(0x1e4)])&&(_0x1eb8fd[0x0]='setupHeaders'),_0x1eb8fd;}export function formatSettings(_0x4dd779,_0x283527=0x0){const _0x2b889d=_0x3ef812,_0x3bb081={'vpoIj':function(_0x290e73,_0x6956cc){return _0x290e73===_0x6956cc;}},_0x194d6c=[],_0x27b7bd='\x20\x20'[_0x2b889d(0x1bf)](_0x283527);for(const [_0x47329a,_0x3fcbd7]of Object[_0x2b889d(0x1a8)](_0x4dd779)){if(_0x3bb081[_0x2b889d(0x1b9)](_0x3fcbd7,undefined))continue;if(typeof _0x3fcbd7===_0x2b889d(0x1a2)&&_0x3fcbd7!==null){_0x194d6c['push'](''+_0x27b7bd+_0x47329a+':');for(const [_0x466ef3,_0x2d6c59]of Object['entries'](_0x3fcbd7)){_0x194d6c['push'](_0x27b7bd+'\x20\x20'+_0x466ef3+':\x20'+_0x2d6c59);}}else _0x194d6c[_0x2b889d(0x1bb)](''+_0x27b7bd+_0x47329a+':\x20'+_0x3fcbd7);}return _0x194d6c['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e7b85,_0xa82619){const _0x497871=_0x13e8,_0x5aa9f1=_0x3e7b85();while(!![]){try{const _0x2ba60b=parseInt(_0x497871(0x93))/0x1+parseInt(_0x497871(0x94))/0x2+parseInt(_0x497871(0x96))/0x3*(parseInt(_0x497871(0x99))/0x4)+-parseInt(_0x497871(0x90))/0x5*(parseInt(_0x497871(0x9e))/0x6)+parseInt(_0x497871(0x9c))/0x7*(-parseInt(_0x497871(0x97))/0x8)+-parseInt(_0x497871(0x8f))/0x9*(-parseInt(_0x497871(0x95))/0xa)+-parseInt(_0x497871(0x92))/0xb;if(_0x2ba60b===_0xa82619)break;else _0x5aa9f1['push'](_0x5aa9f1['shift']());}catch(_0x194a09){_0x5aa9f1['push'](_0x5aa9f1['shift']());}}}(_0x4f8b,0x68c2d));function _0x13e8(_0x5366d2,_0x5e158e){_0x5366d2=_0x5366d2-0x8f;const _0x4f8b65=_0x4f8b();let _0x13e8e1=_0x4f8b65[_0x5366d2];return _0x13e8e1;}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x4f8b(){const _0x636276=['oSPun','ranger/SKILL.md','7KhcvqX','skills','366UvJQjl','QxtFI','1037745hHNIIF','58365RsrvxH','kEbvj','2328062pdlorc','687880uTYdFN','355042SANrsa','10UFmRWw','1434189vOGBMR','847784skEwxb','utf-8','4wCRTtX'];_0x4f8b=function(){return _0x636276;};return _0x4f8b();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x638f91){const _0x4e6ce3=_0x13e8,_0x3e04d7={'kEbvj':function(_0x429659,_0x37af7d,_0x23c5ac,_0x512c8c,_0x17b11d){return _0x429659(_0x37af7d,_0x23c5ac,_0x512c8c,_0x17b11d);},'oSPun':function(_0x5837cf,_0x5327c8,_0x3d5a24){return _0x5837cf(_0x5327c8,_0x3d5a24);},'QxtFI':_0x4e6ce3(0x98)},_0x493ad6=_0x3e04d7[_0x4e6ce3(0x91)](join,__dirname,'..','..',_0x4e6ce3(0x9d)),_0x7899c0=_0x3e04d7[_0x4e6ce3(0x9a)](join,_0x493ad6,_0x638f91);try{return readFileSync(_0x7899c0,_0x3e04d7[_0x4e6ce3(0x9f)]);}catch{return'';}}export function getRangerSkillContent(){const _0x122572=_0x13e8;return readSkillContent(_0x122572(0x9b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4e24(_0x1ffdfe,_0xb76ac3){_0x1ffdfe=_0x1ffdfe-0xa6;const _0x21b705=_0x21b7();let _0x4e2429=_0x21b705[_0x1ffdfe];return _0x4e2429;}(function(_0x2ce625,_0x33a4c1){const _0x19a70c=_0x4e24,_0x1dcbab=_0x2ce625();while(!![]){try{const _0x74c62c=parseInt(_0x19a70c(0xc0))/0x1*(parseInt(_0x19a70c(0xb2))/0x2)+-parseInt(_0x19a70c(0xc6))/0x3*(-parseInt(_0x19a70c(0xc2))/0x4)+parseInt(_0x19a70c(0xb5))/0x5*(parseInt(_0x19a70c(0xcb))/0x6)+-parseInt(_0x19a70c(0xae))/0x7+parseInt(_0x19a70c(0xc9))/0x8*(parseInt(_0x19a70c(0xb9))/0x9)+-parseInt(_0x19a70c(0xa7))/0xa*(parseInt(_0x19a70c(0xbb))/0xb)+-parseInt(_0x19a70c(0xa8))/0xc*(-parseInt(_0x19a70c(0xbe))/0xd);if(_0x74c62c===_0x33a4c1)break;else _0x1dcbab['push'](_0x1dcbab['shift']());}catch(_0x5daaa3){_0x1dcbab['push'](_0x1dcbab['shift']());}}}(_0x21b7,0x77e47));function _0x21b7(){const _0x108ea0=['4BtGiSq','match','filter','\x20\x20Removed\x20deprecated\x20skill:\x20','306141AXArwr','endsWith','\x20\x20Files:\x20','8oNoCzb','warn','10566wcFdxF','LdIxu','log','176490bAfQrL','48ZMtjmK','length','SKILL.md','utf-8','wvCPq','koaUM','3768856MGodJF','catch','.md','XpPmn','4WeJdqe','isDirectory','JlNka','435wnEJMk','trim','kbOmR','claude','2314638BsCsXK','project','253djvONL','join','NRlfw','2871661SEAAGu','push','19695BBnJse','ejqMk'];_0x21b7=function(){return _0x108ea0;};return _0x21b7();}import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=['e2e-test-recommender','bug-bash','feature-tracker'];export async function installSkill(_0x5e2776,_0x4833a5={}){const _0x3b1266=_0x4e24,_0x3c1a61={'ejqMk':_0x3b1266(0xba),'kbOmR':function(_0x10ca61,_0x2d4acb,_0x4c60d0){return _0x10ca61(_0x2d4acb,_0x4c60d0);},'CZPgl':function(_0x2bfce6,_0x29758d,_0x536cb5){return _0x2bfce6(_0x29758d,_0x536cb5);},'VGliG':function(_0xebd2fa,_0xc074df){return _0xebd2fa&&_0xc074df;},'NRlfw':function(_0x5ee5f6,_0x780696){return _0x5ee5f6===_0x780696;},'wvCPq':function(_0x1a80d1,_0x381329){return _0x1a80d1(_0x381329);},'XpPmn':_0x3b1266(0xaa),'YOQlI':'utf-8','xbDws':function(_0x489969,_0x28de72,_0x22a1d7,_0x59b888){return _0x489969(_0x28de72,_0x22a1d7,_0x59b888);}},{level:level=_0x3c1a61[_0x3b1266(0xc1)],cliVersion:_0x1bf0df,platform:platform=_0x3b1266(0xb8)}=_0x4833a5,_0x402a35=getSourceSkillsDir(),_0x5396a6=_0x3c1a61['kbOmR'](join,_0x402a35,_0x5e2776),_0x323ecd=_0x3c1a61[_0x3b1266(0xb7)](join,_0x402a35,_0x5e2776+_0x3b1266(0xb0)),_0x4b74d8=existsSync(_0x5396a6)&&statSync(_0x5396a6)[_0x3b1266(0xb3)]()&&existsSync(_0x3c1a61['CZPgl'](join,_0x5396a6,'SKILL.md')),_0x4df26d=existsSync(_0x323ecd);if(_0x3c1a61['VGliG'](!_0x4b74d8,!_0x4df26d))return console['warn']('\x20\x20Skill\x20not\x20found:\x20'+_0x5e2776),![];const _0xd94f4a=_0x3c1a61[_0x3b1266(0xbd)](platform,'opencode')?getOpencodeSkillsDir(level):_0x3c1a61[_0x3b1266(0xac)](getSkillsDir,level),_0x36e2f7=join(_0xd94f4a,_0x5e2776);await mkdir(_0x36e2f7,{'recursive':!![]});let _0x5cf5d6,_0x1cce98=[];if(_0x4b74d8){const _0x5cad8e=await _0x3c1a61[_0x3b1266(0xac)](readdir,_0x5396a6),_0x2864c8=_0x5cad8e[_0x3b1266(0xc4)](_0x4d0278=>_0x4d0278[_0x3b1266(0xc7)]('.md'));for(const _0x2a1b06 of _0x2864c8){const _0x58128d=join(_0x5396a6,_0x2a1b06),_0x183445=join(_0x36e2f7,_0x2a1b06);await _0x3c1a61['kbOmR'](copyFile,_0x58128d,_0x183445),_0x1cce98['push'](_0x2a1b06);}_0x5cf5d6=await readFile(_0x3c1a61[_0x3b1266(0xb7)](join,_0x5396a6,_0x3c1a61[_0x3b1266(0xb1)]),_0x3b1266(0xab));}else{_0x5cf5d6=await readFile(_0x323ecd,_0x3c1a61['YOQlI']);const _0x37f525=join(_0x36e2f7,'SKILL.md');await _0x3c1a61['xbDws'](writeFile,_0x37f525,_0x5cf5d6,_0x3b1266(0xab)),_0x1cce98[_0x3b1266(0xbf)](_0x3b1266(0xaa));}const {name:_0x44760a}=parseFrontmatter(_0x5cf5d6);return console['log']('\x20\x20Installed\x20skill:\x20'+_0x44760a),console[_0x3b1266(0xa6)]('\x20\x20Location:\x20'+_0x36e2f7),_0x1cce98[_0x3b1266(0xa9)]>0x1&&console[_0x3b1266(0xa6)](_0x3b1266(0xc8)+_0x1cce98[_0x3b1266(0xbc)](',\x20')),logLocalAgentInstallation(_0x5e2776,{'skillDisplayName':_0x44760a,'installLevel':level},_0x1bf0df)[_0x3b1266(0xaf)](()=>{}),!![];}function getSourceSkillsDir(){const _0x5a54e4=_0x4e24,_0x296a71={'JlNka':'skills'},_0x7d3d4=[join(__dirname,'..','..',_0x296a71[_0x5a54e4(0xb4)]),join(__dirname,'..','..','..','skills')];for(const _0x1dead8 of _0x7d3d4){if(existsSync(_0x1dead8))return _0x1dead8;}return _0x7d3d4[0x0];}function parseFrontmatter(_0x162a38){const _0x3eee0c=_0x4e24,_0x4ca07a=_0x162a38['match'](/^---\n([\s\S]+?)\n---/);if(!_0x4ca07a)throw new Error('Invalid\x20skill\x20frontmatter');const _0x2589c4=_0x4ca07a[0x1],_0x2766fe=_0x2589c4[_0x3eee0c(0xc3)](/name:\s*(.+)/),_0x54a741=_0x2589c4['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x2766fe?.[0x1][_0x3eee0c(0xb6)]()||'','description':_0x54a741?.[0x1][_0x3eee0c(0xb6)]()||''};}export async function removeSkill(_0x44be63,_0x3bdbec){const _0x5a319c=_0x4e24,_0x1da5b3={'koaUM':function(_0x3bc645,_0x366a2a){return _0x3bc645(_0x366a2a);},'LdIxu':function(_0x49a404,_0x4e7290,_0x2173f8){return _0x49a404(_0x4e7290,_0x2173f8);},'WROeR':function(_0x4f351b,_0x4c7786){return _0x4f351b(_0x4c7786);}},_0x1cf153=_0x1da5b3[_0x5a319c(0xad)](getSkillsDir,_0x3bdbec),_0x79b427=_0x1da5b3[_0x5a319c(0xcc)](join,_0x1cf153,_0x44be63);if(!_0x1da5b3['WROeR'](existsSync,_0x79b427))return![];try{return await rm(_0x79b427,{'recursive':!![]}),console[_0x5a319c(0xa6)](_0x5a319c(0xc5)+_0x44be63),!![];}catch{return console[_0x5a319c(0xca)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x44be63),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3d9620=_0x3359;(function(_0x380f7b,_0x212b8f){const _0x218b6c=_0x3359,_0x1d4865=_0x380f7b();while(!![]){try{const _0x107659=-parseInt(_0x218b6c(0x19b))/0x1+-parseInt(_0x218b6c(0x194))/0x2*(-parseInt(_0x218b6c(0x190))/0x3)+parseInt(_0x218b6c(0x18d))/0x4+parseInt(_0x218b6c(0x161))/0x5+-parseInt(_0x218b6c(0x18f))/0x6*(parseInt(_0x218b6c(0x191))/0x7)+parseInt(_0x218b6c(0x18b))/0x8+parseInt(_0x218b6c(0x16d))/0x9;if(_0x107659===_0x212b8f)break;else _0x1d4865['push'](_0x1d4865['shift']());}catch(_0x640cdb){_0x1d4865['push'](_0x1d4865['shift']());}}}(_0x24f2,0xdf45c));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(_0x32ccfc,_0x2f964){const _0x3f0959=_0x3359,_0x19aaf1={'RKCJV':function(_0x342baa,_0x4680bd){return _0x342baa<=_0x4680bd;},'hDvBt':function(_0x22b3d3,_0x226fca){return _0x22b3d3&_0x226fca;},'BssOH':function(_0x7f656,_0x5b381f){return _0x7f656>_0x5b381f;},'GLojL':function(_0x311854,_0x381025){return _0x311854<_0x381025;}};if(_0x2f964>=_0x32ccfc['length'])return[0x0,0x0];const _0x113faa=_0x32ccfc[_0x2f964];let _0x56dbdb=0x1,_0x24d3bf=0x80;while(_0x19aaf1['RKCJV'](_0x56dbdb,0x8)&&!_0x19aaf1[_0x3f0959(0x173)](_0x113faa,_0x24d3bf)){_0x56dbdb++,_0x24d3bf>>=0x1;}if(_0x19aaf1[_0x3f0959(0x17e)](_0x2f964+_0x56dbdb,_0x32ccfc['length']))return[0x0,0x0];let _0x11734c=_0x113faa&_0x24d3bf-0x1;for(let _0x7dcb70=0x1;_0x19aaf1[_0x3f0959(0x180)](_0x7dcb70,_0x56dbdb);_0x7dcb70++){_0x11734c=_0x11734c*0x100+_0x32ccfc[_0x2f964+_0x7dcb70];}return[_0x11734c,_0x56dbdb];}function readId(_0x5e65a8,_0x4fee58){const _0xd9891a=_0x3359,_0x565dfb={'OIrXt':function(_0x115419,_0x592f79){return _0x115419>=_0x592f79;},'XtdbR':function(_0x4f636a,_0x542b06){return _0x4f636a>=_0x542b06;},'oFIRj':function(_0x2beea4,_0x24847){return _0x2beea4>_0x24847;},'rKxYA':function(_0x7f6e18,_0x30e40f){return _0x7f6e18+_0x30e40f;},'LdQGC':function(_0x3cecab,_0xe28a72){return _0x3cecab<_0xe28a72;},'GkPXl':function(_0x50ad08,_0x103803){return _0x50ad08+_0x103803;},'rrRuU':function(_0x44f87f,_0x2aaf43){return _0x44f87f*_0x2aaf43;},'sIJVw':function(_0x1849b2,_0x4ba796){return _0x1849b2+_0x4ba796;}};if(_0x565dfb[_0xd9891a(0x16c)](_0x4fee58,_0x5e65a8['length']))return[0x0,0x0];const _0x503dda=_0x5e65a8[_0x4fee58];let _0x2e3aee;if(_0x565dfb['XtdbR'](_0x503dda,0x80))_0x2e3aee=0x1;else{if(_0x503dda>=0x40)_0x2e3aee=0x2;else{if(_0x503dda>=0x20)_0x2e3aee=0x3;else{if(_0x503dda>=0x10)_0x2e3aee=0x4;else return[_0x503dda,0x1];}}}if(_0x565dfb['oFIRj'](_0x565dfb['rKxYA'](_0x4fee58,_0x2e3aee),_0x5e65a8[_0xd9891a(0x18c)]))return[0x0,0x0];let _0x5dce4d=0x0;for(let _0x2fec37=0x0;_0x565dfb['LdQGC'](_0x2fec37,_0x2e3aee);_0x2fec37++){_0x5dce4d=_0x565dfb['GkPXl'](_0x565dfb['rrRuU'](_0x5dce4d,0x100),_0x5e65a8[_0x565dfb[_0xd9891a(0x17d)](_0x4fee58,_0x2fec37)]);}return[_0x5dce4d,_0x2e3aee];}function _0x3359(_0x4bfb34,_0x450d36){_0x4bfb34=_0x4bfb34-0x15b;const _0x24f2cd=_0x24f2();let _0x3359dc=_0x24f2cd[_0x4bfb34];return _0x3359dc;}function readUint(_0x881ba9,_0x102d89,_0x53772e){const _0x440aa8=_0x3359,_0x52bc9c={'aIRcA':function(_0x59db1c,_0x197669){return _0x59db1c<_0x197669;},'qzeUa':function(_0x3461ba,_0x49b132){return _0x3461ba*_0x49b132;}};let _0x4c61b9=0x0;for(let _0x172946=0x0;_0x52bc9c[_0x440aa8(0x195)](_0x172946,_0x53772e);_0x172946++){_0x4c61b9=_0x52bc9c[_0x440aa8(0x17a)](_0x4c61b9,0x100)+_0x881ba9[_0x102d89+_0x172946];}return _0x4c61b9;}function isUnknownSize(_0x3ec849,_0x3abc87){const _0x5e6d47=_0x3359,_0x162473={'fDPcy':function(_0x4e8ae6,_0x1bea67){return _0x4e8ae6*_0x1bea67;}};return _0x3ec849===Math[_0x5e6d47(0x15b)](0x2,_0x162473['fDPcy'](0x7,_0x3abc87))-0x1;}function writeVint(_0x50e4a4,_0x2e5e87){const _0x36b762=_0x3359,_0x57d5cc={'rybDk':function(_0x42f3e6,_0x83745b){return _0x42f3e6<_0x83745b;},'zqiXv':function(_0x3b95f9,_0x4c347d){return _0x3b95f9&_0x4c347d;},'LknCX':function(_0x22a956,_0x2b9878){return _0x22a956<<_0x2b9878;},'gJYCP':function(_0x3f0708,_0x390a77){return _0x3f0708-_0x390a77;}};let _0x28e568=_0x2e5e87||0x1;while(_0x57d5cc['rybDk'](Math[_0x36b762(0x15b)](0x2,0x7*_0x28e568)-0x2,_0x50e4a4))_0x28e568++;const _0x2704a7=Buffer[_0x36b762(0x188)](_0x28e568);for(let _0x5bbf05=_0x28e568-0x1;_0x5bbf05>=0x0;_0x5bbf05--){_0x2704a7[_0x5bbf05]=_0x57d5cc[_0x36b762(0x15c)](_0x50e4a4,0xff),_0x50e4a4=Math[_0x36b762(0x1a0)](_0x50e4a4/0x100);}return _0x2704a7[0x0]|=_0x57d5cc['LknCX'](0x1,_0x57d5cc['gJYCP'](0x8,_0x28e568)),_0x2704a7;}function writeUint(_0x30e05e,_0x50baf3){const _0x3995a7=_0x3359,_0x2ec157={'IYHSH':function(_0x4c6a15,_0x120803){return _0x4c6a15&_0x120803;},'NTHnR':function(_0x790c54,_0x50d794){return _0x790c54/_0x50d794;}},_0x2528fd=Buffer[_0x3995a7(0x188)](_0x50baf3);for(let _0x374e2d=_0x50baf3-0x1;_0x374e2d>=0x0;_0x374e2d--){_0x2528fd[_0x374e2d]=_0x2ec157[_0x3995a7(0x19f)](_0x30e05e,0xff),_0x30e05e=Math['floor'](_0x2ec157['NTHnR'](_0x30e05e,0x100));}return _0x2528fd;}function writeUnknownSizeVint(_0x50fa11){const _0x3243af=_0x3359,_0x18055c={'YQLPV':function(_0x1f7117,_0x4633e8){return _0x1f7117-_0x4633e8;}},_0x5f5736=Buffer['alloc'](_0x50fa11,0xff);return _0x5f5736[0x0]=0xff>>_0x18055c[_0x3243af(0x1a1)](_0x50fa11,0x1),_0x5f5736;}function uintSize(_0x24c2f0){const _0x1872de=_0x3359,_0x508ebb={'nWEEy':function(_0x5c3866,_0x320731){return _0x5c3866/_0x320731;}};if(_0x24c2f0===0x0)return 0x1;let _0x460dec=0x0,_0x10f9f2=_0x24c2f0;while(_0x10f9f2>0x0){_0x460dec++,_0x10f9f2=Math['floor'](_0x508ebb[_0x1872de(0x198)](_0x10f9f2,0x100));}return _0x460dec;}function findTimestampScale(_0x4bb20e,_0xa983aa){const _0x5bff61=_0x3359,_0x2b3ddd={'FoRCi':function(_0x34968b,_0xd0bcbf){return _0x34968b+_0xd0bcbf;},'SNUfH':function(_0xf39b9b,_0x5d915c){return _0xf39b9b<_0x5d915c;},'OtKRr':function(_0x2cc902,_0x48d6f8,_0x1e8222){return _0x2cc902(_0x48d6f8,_0x1e8222);},'zJPsR':function(_0x2c0c01,_0xa457fb){return _0x2c0c01===_0xa457fb;},'KpBBE':function(_0xd1206b,_0x500088){return _0xd1206b+_0x500088;},'xmTiS':function(_0x7e4963,_0x139d3a,_0x1583bb,_0x13126b){return _0x7e4963(_0x139d3a,_0x1583bb,_0x13126b);},'LIyWC':function(_0x29edfb,_0x18d103){return _0x29edfb+_0x18d103;},'MDaxF':function(_0x541b2b,_0x16ef45){return _0x541b2b+_0x16ef45;}};let _0x5d56c9=_0xa983aa;const _0xa7ccf7=Math[_0x5bff61(0x169)](_0x4bb20e['length'],_0x2b3ddd['FoRCi'](_0xa983aa,0x2710));while(_0x2b3ddd[_0x5bff61(0x15f)](_0x5d56c9,_0xa7ccf7)){const [_0x5da076,_0x4504cb]=readId(_0x4bb20e,_0x5d56c9),[_0x805fae,_0x6246a7]=_0x2b3ddd[_0x5bff61(0x19c)](readVint,_0x4bb20e,_0x2b3ddd['FoRCi'](_0x5d56c9,_0x4504cb));if(_0x2b3ddd['zJPsR'](_0x5da076,ID_INFO)){let _0x5ad405=_0x2b3ddd['FoRCi'](_0x2b3ddd['KpBBE'](_0x5d56c9,_0x4504cb),_0x6246a7);const _0x25b9a7=_0x5ad405+_0x805fae;while(_0x5ad405<_0x25b9a7){const [_0x35af89,_0x139837]=readId(_0x4bb20e,_0x5ad405),[_0x502ab6,_0x1248c3]=readVint(_0x4bb20e,_0x2b3ddd[_0x5bff61(0x16f)](_0x5ad405,_0x139837));if(_0x35af89===ID_TIMESTAMP_SCALE)return _0x2b3ddd['xmTiS'](readUint,_0x4bb20e,_0x2b3ddd[_0x5bff61(0x186)](_0x5ad405,_0x139837)+_0x1248c3,_0x502ab6);_0x5ad405+=_0x2b3ddd[_0x5bff61(0x17b)](_0x139837,_0x1248c3)+_0x502ab6;}break;}if(_0x5da076===ID_CLUSTER)break;if(isUnknownSize(_0x805fae,_0x6246a7))break;_0x5d56c9+=_0x2b3ddd['LIyWC'](_0x2b3ddd['MDaxF'](_0x4504cb,_0x6246a7),_0x805fae);}return 0xf4240;}function findFirstClusterOffset(_0x5be775,_0x3dc296){const _0x247881=_0x3359,_0x319d70={'lrJmN':function(_0x4ff176,_0x535d89,_0xa8cfd){return _0x4ff176(_0x535d89,_0xa8cfd);},'bkomA':function(_0x2c2a3d,_0x52a3bc){return _0x2c2a3d+_0x52a3bc;},'gZaWF':function(_0x2eb57b,_0x133950){return _0x2eb57b+_0x133950;}};let _0x25a3ba=_0x3dc296;while(_0x25a3ba<_0x5be775[_0x247881(0x18c)]){const [_0x396240,_0x49ba62]=_0x319d70['lrJmN'](readId,_0x5be775,_0x25a3ba);if(_0x396240===ID_CLUSTER)return _0x25a3ba;const [_0x324cb6,_0x5a50ff]=readVint(_0x5be775,_0x25a3ba+_0x49ba62);if(_0x319d70['lrJmN'](isUnknownSize,_0x324cb6,_0x5a50ff))return _0x25a3ba;_0x25a3ba+=_0x319d70['bkomA'](_0x319d70[_0x247881(0x18e)](_0x49ba62,_0x5a50ff),_0x324cb6);}return _0x5be775['length'];}function findClusterEnd(_0xc175c7,_0x329923,_0x33aaef,_0x54b816){const _0x5b2e93=_0x3359,_0x49b077={'KbhlX':function(_0x51f748,_0x50ca80,_0x2d51a4){return _0x51f748(_0x50ca80,_0x2d51a4);},'mvvXP':function(_0x4de6c7,_0xaeec26){return _0x4de6c7+_0xaeec26;},'cwDpO':function(_0x3b5485,_0xe30e90){return _0x3b5485<_0xe30e90;},'LrcIC':function(_0x8c9107,_0x29420f,_0x289863){return _0x8c9107(_0x29420f,_0x289863);},'BFuxB':function(_0x887408,_0x29273d,_0x32ed71){return _0x887408(_0x29273d,_0x32ed71);},'mUQUf':function(_0x150576,_0x5343d1){return _0x150576+_0x5343d1;}};if(!_0x49b077[_0x5b2e93(0x17c)](isUnknownSize,_0x33aaef,_0x54b816))return _0x49b077[_0x5b2e93(0x160)](_0x329923,_0x33aaef);const _0x58bd4e=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x2c2b9b=_0x329923;while(_0x49b077[_0x5b2e93(0x174)](_0x2c2b9b,_0xc175c7[_0x5b2e93(0x18c)]-0x4)){const [_0x2b2330,_0x36b8b9]=_0x49b077['LrcIC'](readId,_0xc175c7,_0x2c2b9b);if(_0x58bd4e[_0x5b2e93(0x179)](_0x2b2330))return _0x2c2b9b;const [_0xeaa6d8,_0x311b55]=_0x49b077[_0x5b2e93(0x17f)](readVint,_0xc175c7,_0x49b077['mUQUf'](_0x2c2b9b,_0x36b8b9));if(isUnknownSize(_0xeaa6d8,_0x311b55))return _0xc175c7['length'];_0x2c2b9b+=_0x49b077[_0x5b2e93(0x168)](_0x36b8b9,_0x311b55)+_0xeaa6d8;}return _0xc175c7[_0x5b2e93(0x18c)];}function extractClusters(_0x952387,_0x405059){const _0x2074a0=_0x3359,_0x4ed268={'NzxRS':function(_0x1f9f92,_0x7523c8){return _0x1f9f92===_0x7523c8;},'bEBTa':function(_0x5250ea,_0x4652df,_0x14269a){return _0x5250ea(_0x4652df,_0x14269a);},'doQYr':function(_0x52f268,_0x358fbc){return _0x52f268+_0x358fbc;},'rKKPy':function(_0x28ddab,_0x47eee9){return _0x28ddab<_0x47eee9;},'PqcsF':function(_0x1d7968,_0x1c8480){return _0x1d7968===_0x1c8480;},'ckHks':function(_0x3ee25d,_0x10c96b,_0x4ab819,_0x4adbd0){return _0x3ee25d(_0x10c96b,_0x4ab819,_0x4adbd0);},'YRTEH':function(_0x5876be,_0x53711f){return _0x5876be+_0x53711f;},'monjg':function(_0x33007e,_0x147e44){return _0x33007e+_0x147e44;},'UwEAx':function(_0x2b45b6,_0x57ad42,_0x12b918){return _0x2b45b6(_0x57ad42,_0x12b918);},'GdTQs':function(_0x1d8e79,_0x2f1e4a){return _0x1d8e79+_0x2f1e4a;},'GITcD':function(_0x11c7a8,_0x38116c){return _0x11c7a8>=_0x38116c;},'lewTW':function(_0x284a67,_0x3f9b53){return _0x284a67>_0x3f9b53;},'XDHfq':function(_0x592604,_0x1dedf8,_0x56052f){return _0x592604(_0x1dedf8,_0x56052f);},'cDXJO':function(_0x3ffec5,_0x31d42b){return _0x3ffec5+_0x31d42b;}},_0x42f794=[],_0x5738b8=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x2ad3bc=0x0;while(_0x2ad3bc<_0x952387[_0x2074a0(0x18c)]){const _0x25c8d6=_0x952387['indexOf'](_0x5738b8,_0x2ad3bc);if(_0x4ed268[_0x2074a0(0x185)](_0x25c8d6,-0x1))break;const [_0x5f7639,_0x55ac68]=_0x4ed268['bEBTa'](readId,_0x952387,_0x25c8d6);if(_0x5f7639!==ID_CLUSTER){_0x2ad3bc=_0x25c8d6+0x1;continue;}const [_0x40e817,_0x4c63dd]=readVint(_0x952387,_0x4ed268['doQYr'](_0x25c8d6,_0x55ac68)),_0x428b46=_0x4ed268['doQYr'](_0x4ed268['doQYr'](_0x25c8d6,_0x55ac68),_0x4c63dd),_0x4b6dea=findClusterEnd(_0x952387,_0x428b46,_0x40e817,_0x4c63dd);let _0x1553ae=_0x428b46,_0x541b90=0x0,_0x4c699f=0x2,_0x501b28=![],_0x574295=Buffer[_0x2074a0(0x188)](0x0),_0x202b4b=Buffer['alloc'](0x0);while(_0x4ed268[_0x2074a0(0x165)](_0x1553ae,_0x4b6dea)){const [_0x5833d3,_0x83171d]=readId(_0x952387,_0x1553ae),[_0x5c8636,_0x778130]=_0x4ed268['bEBTa'](readVint,_0x952387,_0x1553ae+_0x83171d);if(_0x4ed268[_0x2074a0(0x18a)](_0x5833d3,ID_TIMESTAMP)){_0x541b90=_0x4ed268[_0x2074a0(0x193)](readUint,_0x952387,_0x4ed268[_0x2074a0(0x171)](_0x4ed268['monjg'](_0x1553ae,_0x83171d),_0x778130),_0x5c8636),_0x4c699f=_0x5c8636,_0x501b28=!![],_0x574295=_0x952387['slice'](_0x428b46,_0x1553ae);const _0x537498=_0x1553ae+_0x83171d+_0x778130+_0x5c8636;_0x202b4b=_0x952387[_0x2074a0(0x183)](_0x537498,_0x4b6dea);break;}if(_0x5833d3===ID_CLUSTER)break;if(_0x4ed268['bEBTa'](isUnknownSize,_0x5c8636,_0x778130))break;_0x1553ae+=_0x83171d+_0x778130+_0x5c8636;}!_0x501b28&&(_0x202b4b=_0x952387[_0x2074a0(0x183)](_0x428b46,_0x4b6dea));let _0x24a8af=_0x541b90;_0x1553ae=_0x428b46;while(_0x1553ae<_0x4b6dea){const [_0x3d1505,_0x342a26]=_0x4ed268['UwEAx'](readId,_0x952387,_0x1553ae),[_0xf1ace2,_0x36fc41]=_0x4ed268['UwEAx'](readVint,_0x952387,_0x4ed268['GdTQs'](_0x1553ae,_0x342a26));if(_0x3d1505===ID_SIMPLE_BLOCK&&_0x4ed268['GITcD'](_0xf1ace2,0x4)){const _0x25f0e1=_0x1553ae+_0x342a26+_0x36fc41,[,_0x18bc8e]=readVint(_0x952387,_0x25f0e1),_0x1a29b2=_0x952387['readInt16BE'](_0x25f0e1+_0x18bc8e),_0x1fff63=_0x4ed268[_0x2074a0(0x15e)](_0x541b90,_0x1a29b2);if(_0x4ed268[_0x2074a0(0x163)](_0x1fff63,_0x24a8af))_0x24a8af=_0x1fff63;}if(_0x3d1505===ID_CLUSTER)break;if(_0x4ed268['XDHfq'](isUnknownSize,_0xf1ace2,_0x36fc41))break;_0x1553ae+=_0x4ed268[_0x2074a0(0x171)](_0x4ed268[_0x2074a0(0x182)](_0x342a26,_0x36fc41),_0xf1ace2);}_0x42f794['push']({'timestamp':_0x541b90,'maxTicks':_0x24a8af,'bodyBeforeTimestamp':_0x574295,'bodyAfterTimestamp':_0x202b4b,'timestampElementSize':_0x4c699f}),_0x2ad3bc=_0x4b6dea;}return _0x42f794;}function parseWebm(_0x37c927){const _0x51a8f3=_0x3359,_0x227dd9={'hBUTO':function(_0x3d6e2a,_0x3ced17,_0x455cb8){return _0x3d6e2a(_0x3ced17,_0x455cb8);},'XoTef':function(_0x236dad,_0x201465){return _0x236dad+_0x201465;},'QqvqA':function(_0x45e8ed,_0x664bd4){return _0x45e8ed!==_0x664bd4;},'ZpLrj':function(_0xb764b9,_0x5b429c,_0x453d8b){return _0xb764b9(_0x5b429c,_0x453d8b);},'lymEa':function(_0x4b9b92,_0x43d1dd){return _0x4b9b92>_0x43d1dd;}};let _0x1840e6=0x0;const [,_0x117fc5]=_0x227dd9['hBUTO'](readId,_0x37c927,_0x1840e6),[_0x15719f,_0x40c5de]=_0x227dd9[_0x51a8f3(0x181)](readVint,_0x37c927,_0x227dd9[_0x51a8f3(0x189)](_0x1840e6,_0x117fc5));_0x1840e6+=_0x117fc5+_0x40c5de+_0x15719f;const [_0x10c87b,_0xa14221]=readId(_0x37c927,_0x1840e6);if(_0x227dd9['QqvqA'](_0x10c87b,ID_SEGMENT))return null;const [,_0x12aa10]=readVint(_0x37c927,_0x1840e6+_0xa14221),_0x327e5f=_0x1840e6+_0xa14221+_0x12aa10,_0x2f7446=_0x227dd9['ZpLrj'](findTimestampScale,_0x37c927,_0x327e5f),_0x62eb59=_0x227dd9[_0x51a8f3(0x19a)](findFirstClusterOffset,_0x37c927,_0x327e5f),_0x34c15e=_0x37c927[_0x51a8f3(0x183)](0x0,_0x62eb59),_0x11c005=extractClusters(_0x37c927,_0x2f7446);let _0x45ffba=0x0;for(const _0x208813 of _0x11c005){if(_0x227dd9['lymEa'](_0x208813[_0x51a8f3(0x172)],_0x45ffba))_0x45ffba=_0x208813[_0x51a8f3(0x172)];}return{'header':_0x34c15e,'clusters':_0x11c005,'timestampScale':_0x2f7446,'maxTimestampTicks':_0x45ffba};}function buildCluster(_0x5abf20,_0x1272ef,_0x1bc73d){const _0x47e57b=_0x3359,_0x59bae4={'jXyaj':function(_0x284c5e,_0x94fca4,_0x511e90){return _0x284c5e(_0x94fca4,_0x511e90);},'yJTuu':function(_0x12f811,_0x47279b){return _0x12f811(_0x47279b);}},_0x197fc6=Buffer[_0x47e57b(0x196)]([0x1f,0x43,0xb6,0x75]),_0x3655fc=Math[_0x47e57b(0x164)](0x4,uintSize(_0x5abf20)),_0x4aa878=Buffer[_0x47e57b(0x16b)]([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x3655fc),_0x59bae4[_0x47e57b(0x162)](writeUint,_0x5abf20,_0x3655fc)]),_0x5eb4b0=Buffer['concat']([_0x1272ef,_0x4aa878,_0x1bc73d]),_0x26fdfd=_0x59bae4[_0x47e57b(0x16a)](writeVint,_0x5eb4b0['length']);return Buffer['concat']([_0x197fc6,_0x26fdfd,_0x5eb4b0]);}const ID_DURATION=0x4489;function _0x24f2(){const _0x3c23ae=['ckHks','4VxyciW','aIRcA','from','KGSZJ','nWEEy','QSukb','ZpLrj','1760575JMmiAD','OtKRr','endsWith','push','IYHSH','floor','YQLPV','pow','zqiXv','pirLY','doQYr','SNUfH','mvvXP','7252400MncqtV','jXyaj','lewTW','max','rKKPy','sbdBL','\x20files\x20->\x20','mUQUf','min','yJTuu','concat','OIrXt','2533158jsvYhv','timestamp','FoRCi','log','YRTEH','maxTicks','hDvBt','cwDpO','argv','WKQwo','clusters','stitchWebmFiles.js','has','qzeUa','LIyWC','KbhlX','sIJVw','BssOH','BFuxB','GLojL','hBUTO','cDXJO','slice','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','NzxRS','KpBBE','stitchWebmFiles.ts','alloc','XoTef','PqcsF','6259816sLyLdb','length','3209320oYIMPU','gZaWF','9602784LYRRDF','1438221iEfytD','7CglWlS','error'];_0x24f2=function(){return _0x3c23ae;};return _0x24f2();}function rebuildHeaderWithoutDuration(_0x56bea5){const _0x3a8c2e=_0x3359,_0x36eb21={'sbdBL':function(_0x34a226,_0x11eeb7,_0x980c5c){return _0x34a226(_0x11eeb7,_0x980c5c);},'jfFcw':function(_0x4ee270,_0x3cfd60){return _0x4ee270+_0x3cfd60;},'QSukb':function(_0x42362c,_0x590c14){return _0x42362c+_0x590c14;},'ouVmv':function(_0x3294aa,_0x289693){return _0x3294aa(_0x289693);},'pirLY':function(_0x15fe7c,_0x42eb3d){return _0x15fe7c+_0x42eb3d;},'KGSZJ':function(_0x276e51,_0x442821){return _0x276e51<_0x442821;},'xrkFg':function(_0x214128,_0x5bcbb3,_0x52449e){return _0x214128(_0x5bcbb3,_0x52449e);}},_0xe0f1cb=Buffer[_0x3a8c2e(0x196)](_0x56bea5);let _0x2b99e4=0x0;const [,_0x52d28b]=_0x36eb21['sbdBL'](readId,_0xe0f1cb,_0x2b99e4),[_0x235378,_0x29b71a]=readVint(_0xe0f1cb,_0x36eb21['jfFcw'](_0x2b99e4,_0x52d28b)),_0x166d11=_0x36eb21['jfFcw'](_0x36eb21[_0x3a8c2e(0x199)](_0x2b99e4,_0x52d28b)+_0x29b71a,_0x235378),[,_0x14d96d]=readId(_0xe0f1cb,_0x166d11),[,_0x157a45]=readVint(_0xe0f1cb,_0x166d11+_0x14d96d),_0x56431b=_0x166d11+_0x14d96d+_0x157a45,_0x1a0eb9=_0x36eb21['ouVmv'](writeUnknownSizeVint,_0x157a45);_0x1a0eb9['copy'](_0xe0f1cb,_0x36eb21[_0x3a8c2e(0x15d)](_0x166d11,_0x14d96d));let _0x1f9646=_0x56431b;const _0x2b79ec=Math['min'](_0xe0f1cb[_0x3a8c2e(0x18c)],_0x56431b+0x2710);while(_0x1f9646<_0x2b79ec){const [_0x219c11,_0x172c41]=_0x36eb21[_0x3a8c2e(0x166)](readId,_0xe0f1cb,_0x1f9646),[_0x288119,_0x4fd81d]=readVint(_0xe0f1cb,_0x1f9646+_0x172c41);if(_0x219c11===ID_CLUSTER)break;if(isUnknownSize(_0x288119,_0x4fd81d))break;if(_0x219c11===ID_INFO){const _0x3bceb2=_0x1f9646+_0x172c41+_0x4fd81d,_0x2f9a9a=_0x3bceb2+_0x288119,_0xc8339e=[];let _0x508c1b=_0x3bceb2;while(_0x36eb21[_0x3a8c2e(0x197)](_0x508c1b,_0x2f9a9a)){const [_0x407848,_0xea7521]=_0x36eb21['xrkFg'](readId,_0xe0f1cb,_0x508c1b),[_0x35b9f8,_0x2ae824]=readVint(_0xe0f1cb,_0x508c1b+_0xea7521),_0x10d6d9=_0xea7521+_0x2ae824+_0x35b9f8;_0x407848!==ID_DURATION&&_0xc8339e[_0x3a8c2e(0x19e)](_0xe0f1cb[_0x3a8c2e(0x183)](_0x508c1b,_0x508c1b+_0x10d6d9)),_0x508c1b+=_0x10d6d9;}const _0x11a280=Buffer[_0x3a8c2e(0x16b)](_0xc8339e),_0x2e095d=Buffer[_0x3a8c2e(0x16b)]([_0xe0f1cb[_0x3a8c2e(0x183)](_0x1f9646,_0x36eb21['pirLY'](_0x1f9646,_0x172c41)),writeVint(_0x11a280[_0x3a8c2e(0x18c)],_0x4fd81d)]);return Buffer[_0x3a8c2e(0x16b)]([_0xe0f1cb['slice'](0x0,_0x1f9646),_0x2e095d,_0x11a280,_0xe0f1cb[_0x3a8c2e(0x183)](_0x2f9a9a)]);}_0x1f9646+=_0x172c41+_0x4fd81d+_0x288119;}return _0xe0f1cb;}export function stitchWebmFiles(_0xe09877,_0x7365e7){const _0x38f5aa=_0x3359,_0xf5184f={'WKQwo':function(_0x2826bb,_0x4d5e06,_0x14200f){return _0x2826bb(_0x4d5e06,_0x14200f);}};if(_0xe09877['length']<=0x1)return![];const _0x30dfac=[];for(const _0x4c7552 of _0xe09877){const _0x5b9d9e=readFileSync(_0x4c7552),_0x4ed3b2=parseWebm(_0x5b9d9e);if(!_0x4ed3b2||_0x4ed3b2[_0x38f5aa(0x177)]['length']===0x0)return![];_0x30dfac[_0x38f5aa(0x19e)](_0x4ed3b2);}const _0x17cfcb=_0x30dfac[0x0],_0x44a7c6=rebuildHeaderWithoutDuration(_0x17cfcb['header']),_0x1ddd16=[_0x44a7c6];let _0x4ad6b9=0x0;for(let _0x2fc192=0x0;_0x2fc192<_0x30dfac[_0x38f5aa(0x18c)];_0x2fc192++){const _0x1d114e=_0x30dfac[_0x2fc192];for(const _0x54bb93 of _0x1d114e['clusters']){const _0x2661dd=_0x54bb93[_0x38f5aa(0x16e)]+_0x4ad6b9;_0x1ddd16[_0x38f5aa(0x19e)](buildCluster(_0x2661dd,_0x54bb93['bodyBeforeTimestamp'],_0x54bb93['bodyAfterTimestamp']));}const _0x50b41f=0x1e;_0x4ad6b9+=_0x1d114e['maxTimestampTicks']+_0x50b41f;}return _0xf5184f[_0x38f5aa(0x176)](writeFileSync,_0x7365e7,Buffer['concat'](_0x1ddd16)),!![];}if(process[_0x3d9620(0x175)][0x1]?.['endsWith'](_0x3d9620(0x187))||process[_0x3d9620(0x175)][0x1]?.[_0x3d9620(0x19d)](_0x3d9620(0x178))){const args=process[_0x3d9620(0x175)]['slice'](0x2);args['length']<0x3&&(console[_0x3d9620(0x192)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x3d9620(0x18c)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x3d9620(0x170)]('Stitched\x20'+inputs['length']+_0x3d9620(0x167)+output):console['log'](_0x3d9620(0x184));}
|
|
1
|
+
const _0x3bbe45=_0x314f;(function(_0x2b740a,_0x2a60e8){const _0x18f393=_0x314f,_0x4664fa=_0x2b740a();while(!![]){try{const _0x3c771b=-parseInt(_0x18f393(0x153))/0x1+parseInt(_0x18f393(0x169))/0x2*(-parseInt(_0x18f393(0x15e))/0x3)+parseInt(_0x18f393(0x170))/0x4*(-parseInt(_0x18f393(0x165))/0x5)+parseInt(_0x18f393(0x155))/0x6+parseInt(_0x18f393(0x147))/0x7*(parseInt(_0x18f393(0x166))/0x8)+-parseInt(_0x18f393(0x132))/0x9*(-parseInt(_0x18f393(0x143))/0xa)+parseInt(_0x18f393(0x154))/0xb;if(_0x3c771b===_0x2a60e8)break;else _0x4664fa['push'](_0x4664fa['shift']());}catch(_0x224b1e){_0x4664fa['push'](_0x4664fa['shift']());}}}(_0x1154,0x87e12));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(_0x2b3687,_0x37ecd2){const _0x39ee3a=_0x314f,_0x982c29={'raXiD':function(_0x44861c,_0x1b97f6){return _0x44861c+_0x1b97f6;},'peTTP':function(_0xd2e590,_0x2dbd80){return _0xd2e590&_0x2dbd80;}};if(_0x37ecd2>=_0x2b3687[_0x39ee3a(0x156)])return[0x0,0x0];const _0x311025=_0x2b3687[_0x37ecd2];let _0x1e4b23=0x1,_0x3dfa75=0x80;while(_0x1e4b23<=0x8&&!(_0x311025&_0x3dfa75)){_0x1e4b23++,_0x3dfa75>>=0x1;}if(_0x982c29[_0x39ee3a(0x135)](_0x37ecd2,_0x1e4b23)>_0x2b3687[_0x39ee3a(0x156)])return[0x0,0x0];let _0x21c5b8=_0x982c29['peTTP'](_0x311025,_0x3dfa75-0x1);for(let _0x553745=0x1;_0x553745<_0x1e4b23;_0x553745++){_0x21c5b8=_0x21c5b8*0x100+_0x2b3687[_0x982c29['raXiD'](_0x37ecd2,_0x553745)];}return[_0x21c5b8,_0x1e4b23];}function readId(_0x79f93c,_0x7e0377){const _0x2b6e3e=_0x314f,_0xec5af5={'hRsxt':function(_0x5ca802,_0x1f43d1){return _0x5ca802>=_0x1f43d1;},'xDXBl':function(_0x12e205,_0x5f243d){return _0x12e205>=_0x5f243d;},'cXSnG':function(_0x42a0f2,_0x17fd03){return _0x42a0f2>_0x17fd03;},'tkzoi':function(_0x1bef92,_0x322386){return _0x1bef92*_0x322386;},'QejCB':function(_0x3ced5b,_0xee04c8){return _0x3ced5b+_0xee04c8;}};if(_0xec5af5[_0x2b6e3e(0x176)](_0x7e0377,_0x79f93c['length']))return[0x0,0x0];const _0x416b8c=_0x79f93c[_0x7e0377];let _0x387f94;if(_0xec5af5[_0x2b6e3e(0x176)](_0x416b8c,0x80))_0x387f94=0x1;else{if(_0x416b8c>=0x40)_0x387f94=0x2;else{if(_0xec5af5[_0x2b6e3e(0x149)](_0x416b8c,0x20))_0x387f94=0x3;else{if(_0xec5af5[_0x2b6e3e(0x176)](_0x416b8c,0x10))_0x387f94=0x4;else return[_0x416b8c,0x1];}}}if(_0xec5af5[_0x2b6e3e(0x16f)](_0x7e0377+_0x387f94,_0x79f93c['length']))return[0x0,0x0];let _0x7fc128=0x0;for(let _0x49a9d8=0x0;_0x49a9d8<_0x387f94;_0x49a9d8++){_0x7fc128=_0xec5af5[_0x2b6e3e(0x14d)](_0x7fc128,0x100)+_0x79f93c[_0xec5af5['QejCB'](_0x7e0377,_0x49a9d8)];}return[_0x7fc128,_0x387f94];}function readUint(_0x63c855,_0x47de64,_0x5bfa4c){const _0x3e6e0d=_0x314f,_0x546e59={'DGYnA':function(_0x43d1b6,_0x5a0ecd){return _0x43d1b6*_0x5a0ecd;}};let _0x160cd7=0x0;for(let _0x4bb8f0=0x0;_0x4bb8f0<_0x5bfa4c;_0x4bb8f0++){_0x160cd7=_0x546e59[_0x3e6e0d(0x146)](_0x160cd7,0x100)+_0x63c855[_0x47de64+_0x4bb8f0];}return _0x160cd7;}function isUnknownSize(_0x53d625,_0x2b8c6c){const _0x1bb351=_0x314f,_0x4ddbab={'hKOEg':function(_0x46405b,_0x5511cf){return _0x46405b-_0x5511cf;},'zqzIu':function(_0x4f6d96,_0x11b046){return _0x4f6d96*_0x11b046;}};return _0x53d625===_0x4ddbab[_0x1bb351(0x14b)](Math[_0x1bb351(0x14f)](0x2,_0x4ddbab[_0x1bb351(0x145)](0x7,_0x2b8c6c)),0x1);}function writeVint(_0x36a261,_0x1e8d8f){const _0x272f88=_0x314f,_0x10ec37={'toUhK':function(_0x432129,_0x53aaaf){return _0x432129<_0x53aaaf;},'HasJi':function(_0x5e7eaf,_0x5bc33c){return _0x5e7eaf-_0x5bc33c;},'kNWEz':function(_0x28aa09,_0x2bd87e){return _0x28aa09-_0x2bd87e;},'cQnez':function(_0x452130,_0x17873f){return _0x452130&_0x17873f;},'ScllR':function(_0x546342,_0x36cf29){return _0x546342/_0x36cf29;},'Xjpif':function(_0x565e59,_0x1f0634){return _0x565e59<<_0x1f0634;}};let _0x2d148a=_0x1e8d8f||0x1;while(_0x10ec37['toUhK'](_0x10ec37[_0x272f88(0x139)](Math[_0x272f88(0x14f)](0x2,0x7*_0x2d148a),0x2),_0x36a261))_0x2d148a++;const _0x9cb7f1=Buffer[_0x272f88(0x14a)](_0x2d148a);for(let _0x2c1794=_0x10ec37[_0x272f88(0x15a)](_0x2d148a,0x1);_0x2c1794>=0x0;_0x2c1794--){_0x9cb7f1[_0x2c1794]=_0x10ec37[_0x272f88(0x16e)](_0x36a261,0xff),_0x36a261=Math[_0x272f88(0x13f)](_0x10ec37[_0x272f88(0x12e)](_0x36a261,0x100));}return _0x9cb7f1[0x0]|=_0x10ec37[_0x272f88(0x161)](0x1,0x8-_0x2d148a),_0x9cb7f1;}function writeUint(_0xbe7975,_0x2cd87e){const _0x3c1a3a=_0x314f,_0x12ede3={'sHFKQ':function(_0x1ac77f,_0x325033){return _0x1ac77f-_0x325033;},'efQEA':function(_0x1c6a9d,_0x15674f){return _0x1c6a9d/_0x15674f;}},_0x1bf3d0=Buffer[_0x3c1a3a(0x14a)](_0x2cd87e);for(let _0x501ad1=_0x12ede3[_0x3c1a3a(0x160)](_0x2cd87e,0x1);_0x501ad1>=0x0;_0x501ad1--){_0x1bf3d0[_0x501ad1]=_0xbe7975&0xff,_0xbe7975=Math[_0x3c1a3a(0x13f)](_0x12ede3['efQEA'](_0xbe7975,0x100));}return _0x1bf3d0;}function writeUnknownSizeVint(_0x1a937d){const _0x268f5e=_0x314f,_0x4cb454={'SlfWl':function(_0x23ea00,_0x34097a){return _0x23ea00>>_0x34097a;},'YtUer':function(_0x4c0c41,_0x3da99c){return _0x4c0c41-_0x3da99c;}},_0x47a65f=Buffer[_0x268f5e(0x14a)](_0x1a937d,0xff);return _0x47a65f[0x0]=_0x4cb454[_0x268f5e(0x144)](0xff,_0x4cb454[_0x268f5e(0x159)](_0x1a937d,0x1)),_0x47a65f;}function uintSize(_0x267d3c){const _0x57e4df=_0x314f,_0x1485e1={'JBuDd':function(_0x5bdf24,_0x17e3ec){return _0x5bdf24===_0x17e3ec;},'mHmgm':function(_0x12210d,_0x15d955){return _0x12210d/_0x15d955;}};if(_0x1485e1[_0x57e4df(0x168)](_0x267d3c,0x0))return 0x1;let _0x1b8c6b=0x0,_0x4c6235=_0x267d3c;while(_0x4c6235>0x0){_0x1b8c6b++,_0x4c6235=Math[_0x57e4df(0x13f)](_0x1485e1['mHmgm'](_0x4c6235,0x100));}return _0x1b8c6b;}function findTimestampScale(_0x5e806e,_0x47bfc5){const _0x4c07b2=_0x314f,_0x373679={'ULEQy':function(_0x4459fd,_0x19bbfd){return _0x4459fd+_0x19bbfd;},'zzAxN':function(_0x171855,_0x5d4c66){return _0x171855<_0x5d4c66;},'cTtIp':function(_0x211fe2,_0x3e4e87){return _0x211fe2+_0x3e4e87;},'jRnXB':function(_0x4376a1,_0x3adb38){return _0x4376a1+_0x3adb38;},'IVpMc':function(_0x1c386c,_0x32242e){return _0x1c386c<_0x32242e;},'LjPJa':function(_0x4946fe,_0x2bb0c3){return _0x4946fe+_0x2bb0c3;}};let _0x118c54=_0x47bfc5;const _0x421f02=Math['min'](_0x5e806e['length'],_0x373679[_0x4c07b2(0x13d)](_0x47bfc5,0x2710));while(_0x373679[_0x4c07b2(0x140)](_0x118c54,_0x421f02)){const [_0x19c8b1,_0x3790a9]=readId(_0x5e806e,_0x118c54),[_0x2531af,_0x2644d6]=readVint(_0x5e806e,_0x118c54+_0x3790a9);if(_0x19c8b1===ID_INFO){let _0x42cf2d=_0x373679['cTtIp'](_0x373679['jRnXB'](_0x118c54,_0x3790a9),_0x2644d6);const _0x233343=_0x42cf2d+_0x2531af;while(_0x373679['IVpMc'](_0x42cf2d,_0x233343)){const [_0x5edd05,_0x42d032]=readId(_0x5e806e,_0x42cf2d),[_0x95431a,_0xc09006]=readVint(_0x5e806e,_0x42cf2d+_0x42d032);if(_0x5edd05===ID_TIMESTAMP_SCALE)return readUint(_0x5e806e,_0x373679[_0x4c07b2(0x131)](_0x42cf2d+_0x42d032,_0xc09006),_0x95431a);_0x42cf2d+=_0x373679[_0x4c07b2(0x12f)](_0x42d032+_0xc09006,_0x95431a);}break;}if(_0x19c8b1===ID_CLUSTER)break;if(isUnknownSize(_0x2531af,_0x2644d6))break;_0x118c54+=_0x373679['LjPJa'](_0x373679[_0x4c07b2(0x13d)](_0x3790a9,_0x2644d6),_0x2531af);}return 0xf4240;}function findFirstClusterOffset(_0x5ba4c4,_0x15e173){const _0x45cace=_0x314f,_0x121a7e={'rNRss':function(_0x3cd35d,_0x412b79,_0x2c8592){return _0x3cd35d(_0x412b79,_0x2c8592);},'PDcYU':function(_0x4d8279,_0x100e7c){return _0x4d8279===_0x100e7c;},'MngOw':function(_0x3849e8,_0x11af26){return _0x3849e8+_0x11af26;},'YsfdP':function(_0x464aac,_0x332cd0){return _0x464aac+_0x332cd0;}};let _0x1c5a8c=_0x15e173;while(_0x1c5a8c<_0x5ba4c4['length']){const [_0x3ca7ff,_0x3b66a5]=_0x121a7e[_0x45cace(0x134)](readId,_0x5ba4c4,_0x1c5a8c);if(_0x121a7e['PDcYU'](_0x3ca7ff,ID_CLUSTER))return _0x1c5a8c;const [_0x58db5b,_0xe3fc]=_0x121a7e[_0x45cace(0x134)](readVint,_0x5ba4c4,_0x121a7e['MngOw'](_0x1c5a8c,_0x3b66a5));if(isUnknownSize(_0x58db5b,_0xe3fc))return _0x1c5a8c;_0x1c5a8c+=_0x121a7e['YsfdP'](_0x121a7e[_0x45cace(0x15c)](_0x3b66a5,_0xe3fc),_0x58db5b);}return _0x5ba4c4[_0x45cace(0x156)];}function findClusterEnd(_0x523590,_0xcde894,_0x1a0a8b,_0x541434){const _0x12489f=_0x314f,_0x36ebca={'waNng':function(_0x377bf9,_0x2628b1){return _0x377bf9-_0x2628b1;},'Nsdsr':function(_0x277c49,_0x3f0164,_0x23abb0){return _0x277c49(_0x3f0164,_0x23abb0);},'VGkOa':function(_0xed42ef,_0xb452b7){return _0xed42ef+_0xb452b7;},'eyLPE':function(_0x503d9f,_0x418ad5){return _0x503d9f+_0x418ad5;}};if(!isUnknownSize(_0x1a0a8b,_0x541434))return _0xcde894+_0x1a0a8b;const _0x62b4da=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x4f801d=_0xcde894;while(_0x4f801d<_0x36ebca['waNng'](_0x523590[_0x12489f(0x156)],0x4)){const [_0x6fe025,_0x4c479f]=readId(_0x523590,_0x4f801d);if(_0x62b4da['has'](_0x6fe025))return _0x4f801d;const [_0xc77362,_0xf040b3]=_0x36ebca['Nsdsr'](readVint,_0x523590,_0x36ebca[_0x12489f(0x152)](_0x4f801d,_0x4c479f));if(isUnknownSize(_0xc77362,_0xf040b3))return _0x523590['length'];_0x4f801d+=_0x36ebca['eyLPE'](_0x4c479f+_0xf040b3,_0xc77362);}return _0x523590[_0x12489f(0x156)];}function _0x1154(){const _0x14f0f6=['SlfWl','zqzIu','DGYnA','23191lAQXAf','push','xDXBl','alloc','hKOEg','LBNcg','tkzoi','WkvTv','pow','argv','BlARl','VGkOa','937451pGMFOV','21650728AcyGvn','3332004hznXff','length','indexOf','nIhNf','YtUer','kNWEz','iMIGw','YsfdP','yxLfe','219beefEN','yjlPg','sHFKQ','Xjpif','mFfvn','ZYqah','stitchWebmFiles.ts','4383745rTwJNU','728CthmFB','exit','JBuDd','17704OmbIaU','\x20files\x20->\x20','xFXZF','HVHcy','PHGDD','cQnez','cXSnG','4nlGhmV','Stitched\x20','idBgq','log','endsWith','slice','hRsxt','bwUda','stitchWebmFiles.js','MhKmn','shcEA','ScllR','LjPJa','clusters','jRnXB','3393ydNfba','copy','rNRss','raXiD','concat','min','rhNAB','HasJi','zSoVn','maxTicks','jCmor','ULEQy','from','floor','zzAxN','readInt16BE','Wqtfi','5090JvYtNI'];_0x1154=function(){return _0x14f0f6;};return _0x1154();}function extractClusters(_0x5163d5,_0x72e4d5){const _0x199857=_0x314f,_0x6a765a={'jLTdN':function(_0x358bfc,_0x41c83d){return _0x358bfc+_0x41c83d;},'iMIGw':function(_0x3b19da,_0x8776fd){return _0x3b19da+_0x8776fd;},'AfQwj':function(_0x57a8d6,_0x2ddfeb,_0x2e4001,_0x57f96c,_0x3bc16f){return _0x57a8d6(_0x2ddfeb,_0x2e4001,_0x57f96c,_0x3bc16f);},'LYhkA':function(_0x2a605e,_0x256b57){return _0x2a605e<_0x256b57;},'rhNAB':function(_0x5141cc,_0x47f5d6,_0x532d2c){return _0x5141cc(_0x47f5d6,_0x532d2c);},'bwUda':function(_0x31a829,_0x4cb587,_0x28deec){return _0x31a829(_0x4cb587,_0x28deec);},'fCmrd':function(_0x13302a,_0x156f46){return _0x13302a+_0x156f46;},'YGrKD':function(_0xa9389,_0x346abc,_0x33b739,_0x5c5d0c){return _0xa9389(_0x346abc,_0x33b739,_0x5c5d0c);},'jCmor':function(_0x14d08b,_0x306abe){return _0x14d08b+_0x306abe;},'AQSGC':function(_0xa360f2,_0x5b0673){return _0xa360f2+_0x5b0673;},'HVHcy':function(_0x140055,_0x141fc6){return _0x140055+_0x141fc6;},'Kqtvm':function(_0x8b708b,_0x2f6327){return _0x8b708b+_0x2f6327;},'zSoVn':function(_0x567f5e,_0x36e01f){return _0x567f5e===_0x36e01f;},'LBNcg':function(_0x5afe47,_0x2bfae1){return _0x5afe47+_0x2bfae1;},'rTKNQ':function(_0x804fdb,_0x2e4356){return _0x804fdb<_0x2e4356;},'mFfvn':function(_0x91ebcb,_0x4e37ed,_0x515150){return _0x91ebcb(_0x4e37ed,_0x515150);},'yjlPg':function(_0x48eed4,_0x3d0c7f){return _0x48eed4>=_0x3d0c7f;},'jkMQW':function(_0x212505,_0xcc056f){return _0x212505+_0xcc056f;}},_0x36227a=[],_0x4225e4=Buffer[_0x199857(0x13e)]([0x1f,0x43,0xb6,0x75]);let _0x3aeb0c=0x0;while(_0x3aeb0c<_0x5163d5['length']){const _0x4256e0=_0x5163d5[_0x199857(0x157)](_0x4225e4,_0x3aeb0c);if(_0x4256e0===-0x1)break;const [_0x57cf55,_0x1c85ab]=readId(_0x5163d5,_0x4256e0);if(_0x57cf55!==ID_CLUSTER){_0x3aeb0c=_0x4256e0+0x1;continue;}const [_0xd8f06e,_0x1fba12]=readVint(_0x5163d5,_0x6a765a['jLTdN'](_0x4256e0,_0x1c85ab)),_0x5a1fa9=_0x6a765a['jLTdN'](_0x6a765a[_0x199857(0x15b)](_0x4256e0,_0x1c85ab),_0x1fba12),_0x46a5ee=_0x6a765a['AfQwj'](findClusterEnd,_0x5163d5,_0x5a1fa9,_0xd8f06e,_0x1fba12);let _0x1a12f1=_0x5a1fa9,_0x3eeecd=0x0,_0x2deb15=0x2,_0x4818cf=![],_0x1ff553=Buffer[_0x199857(0x14a)](0x0),_0x4c2be5=Buffer['alloc'](0x0);while(_0x6a765a['LYhkA'](_0x1a12f1,_0x46a5ee)){const [_0x27c04a,_0x5b6d76]=_0x6a765a[_0x199857(0x138)](readId,_0x5163d5,_0x1a12f1),[_0x5a0eaf,_0x403d10]=_0x6a765a[_0x199857(0x177)](readVint,_0x5163d5,_0x6a765a['fCmrd'](_0x1a12f1,_0x5b6d76));if(_0x27c04a===ID_TIMESTAMP){_0x3eeecd=_0x6a765a['YGrKD'](readUint,_0x5163d5,_0x6a765a[_0x199857(0x13c)](_0x6a765a['AQSGC'](_0x1a12f1,_0x5b6d76),_0x403d10),_0x5a0eaf),_0x2deb15=_0x5a0eaf,_0x4818cf=!![],_0x1ff553=_0x5163d5[_0x199857(0x175)](_0x5a1fa9,_0x1a12f1);const _0x48c6a0=_0x6a765a[_0x199857(0x16c)](_0x6a765a['Kqtvm'](_0x1a12f1+_0x5b6d76,_0x403d10),_0x5a0eaf);_0x4c2be5=_0x5163d5['slice'](_0x48c6a0,_0x46a5ee);break;}if(_0x6a765a[_0x199857(0x13a)](_0x27c04a,ID_CLUSTER))break;if(_0x6a765a['bwUda'](isUnknownSize,_0x5a0eaf,_0x403d10))break;_0x1a12f1+=_0x6a765a[_0x199857(0x14c)](_0x5b6d76+_0x403d10,_0x5a0eaf);}!_0x4818cf&&(_0x4c2be5=_0x5163d5[_0x199857(0x175)](_0x5a1fa9,_0x46a5ee));let _0x1a6874=_0x3eeecd;_0x1a12f1=_0x5a1fa9;while(_0x6a765a['rTKNQ'](_0x1a12f1,_0x46a5ee)){const [_0xed9e33,_0x411f44]=_0x6a765a[_0x199857(0x162)](readId,_0x5163d5,_0x1a12f1),[_0x37ff9c,_0x369263]=readVint(_0x5163d5,_0x6a765a['iMIGw'](_0x1a12f1,_0x411f44));if(_0x6a765a[_0x199857(0x13a)](_0xed9e33,ID_SIMPLE_BLOCK)&&_0x6a765a[_0x199857(0x15f)](_0x37ff9c,0x4)){const _0x501408=_0x6a765a['jkMQW'](_0x1a12f1+_0x411f44,_0x369263),[,_0x510877]=readVint(_0x5163d5,_0x501408),_0x4d7fcc=_0x5163d5[_0x199857(0x141)](_0x501408+_0x510877),_0x35bf33=_0x3eeecd+_0x4d7fcc;if(_0x35bf33>_0x1a6874)_0x1a6874=_0x35bf33;}if(_0x6a765a[_0x199857(0x13a)](_0xed9e33,ID_CLUSTER))break;if(isUnknownSize(_0x37ff9c,_0x369263))break;_0x1a12f1+=_0x411f44+_0x369263+_0x37ff9c;}_0x36227a[_0x199857(0x148)]({'timestamp':_0x3eeecd,'maxTicks':_0x1a6874,'bodyBeforeTimestamp':_0x1ff553,'bodyAfterTimestamp':_0x4c2be5,'timestampElementSize':_0x2deb15}),_0x3aeb0c=_0x46a5ee;}return _0x36227a;}function parseWebm(_0x3e19b2){const _0x44c4d1=_0x314f,_0xf823e9={'Wqtfi':function(_0x5f3602,_0xd1638f,_0x4bb90c){return _0x5f3602(_0xd1638f,_0x4bb90c);},'ZYqah':function(_0x5e116b,_0x5936e3){return _0x5e116b+_0x5936e3;},'PHGDD':function(_0x3e690b,_0x47519a){return _0x3e690b+_0x47519a;},'WkvTv':function(_0x3a8dae,_0x2b0112){return _0x3a8dae+_0x2b0112;},'shcEA':function(_0x3fb15b,_0x529e6a,_0x578401){return _0x3fb15b(_0x529e6a,_0x578401);}};let _0x172988=0x0;const [,_0x2c4384]=_0xf823e9[_0x44c4d1(0x142)](readId,_0x3e19b2,_0x172988),[_0x29e347,_0x4cf89b]=readVint(_0x3e19b2,_0xf823e9[_0x44c4d1(0x163)](_0x172988,_0x2c4384));_0x172988+=_0xf823e9[_0x44c4d1(0x16d)](_0xf823e9[_0x44c4d1(0x14e)](_0x2c4384,_0x4cf89b),_0x29e347);const [_0x3477fa,_0x4d34c1]=readId(_0x3e19b2,_0x172988);if(_0x3477fa!==ID_SEGMENT)return null;const [,_0x77acec]=readVint(_0x3e19b2,_0x172988+_0x4d34c1),_0x310512=_0x172988+_0x4d34c1+_0x77acec,_0x44d0c9=_0xf823e9[_0x44c4d1(0x12d)](findTimestampScale,_0x3e19b2,_0x310512),_0x552235=findFirstClusterOffset(_0x3e19b2,_0x310512),_0x20d2f1=_0x3e19b2['slice'](0x0,_0x552235),_0x227e9b=extractClusters(_0x3e19b2,_0x44d0c9);let _0x58e2bd=0x0;for(const _0x15de6e of _0x227e9b){if(_0x15de6e[_0x44c4d1(0x13b)]>_0x58e2bd)_0x58e2bd=_0x15de6e[_0x44c4d1(0x13b)];}return{'header':_0x20d2f1,'clusters':_0x227e9b,'timestampScale':_0x44d0c9,'maxTimestampTicks':_0x58e2bd};}function buildCluster(_0x20b751,_0x27003f,_0x342872){const _0x214e84=_0x314f,_0x23fb58={'idBgq':function(_0x39effc,_0x1f2520){return _0x39effc(_0x1f2520);}},_0x38d98c=Buffer[_0x214e84(0x13e)]([0x1f,0x43,0xb6,0x75]),_0x507168=Math['max'](0x4,uintSize(_0x20b751)),_0x5ba248=Buffer['concat']([Buffer[_0x214e84(0x13e)]([ID_TIMESTAMP]),writeVint(_0x507168),writeUint(_0x20b751,_0x507168)]),_0x4a99f5=Buffer[_0x214e84(0x136)]([_0x27003f,_0x5ba248,_0x342872]),_0x1b3fa0=_0x23fb58[_0x214e84(0x172)](writeVint,_0x4a99f5[_0x214e84(0x156)]);return Buffer['concat']([_0x38d98c,_0x1b3fa0,_0x4a99f5]);}const ID_DURATION=0x4489;function _0x314f(_0x1644ad,_0x45bce6){_0x1644ad=_0x1644ad-0x12b;const _0x1154fe=_0x1154();let _0x314f0a=_0x1154fe[_0x1644ad];return _0x314f0a;}function rebuildHeaderWithoutDuration(_0x1fcd66){const _0x2313e0=_0x314f,_0x370b39={'XIFgC':function(_0x187d41,_0x4b9ed6,_0x1ae14d){return _0x187d41(_0x4b9ed6,_0x1ae14d);},'PmYsc':function(_0x1bd991,_0x214375){return _0x1bd991+_0x214375;},'nIhNf':function(_0x5b7111,_0x1de973){return _0x5b7111+_0x1de973;},'QvXgj':function(_0x2906e8,_0x4c57e6,_0x361986){return _0x2906e8(_0x4c57e6,_0x361986);},'vVRta':function(_0x2939ab,_0x337459){return _0x2939ab+_0x337459;},'yxLfe':function(_0x3cfbe2,_0x39afc0){return _0x3cfbe2+_0x39afc0;},'knwtS':function(_0x261937,_0x4aae96,_0x18b950){return _0x261937(_0x4aae96,_0x18b950);},'nRqNH':function(_0x5398dd,_0x48ac86){return _0x5398dd+_0x48ac86;},'MhKmn':function(_0x5a50a4,_0x594a85){return _0x5a50a4+_0x594a85;},'IFsdm':function(_0x17e6ff,_0x8d4526){return _0x17e6ff!==_0x8d4526;},'xFXZF':function(_0x432c26,_0x32896e){return _0x432c26+_0x32896e;}},_0x5f3152=Buffer[_0x2313e0(0x13e)](_0x1fcd66);let _0x8142a=0x0;const [,_0x1bf5c7]=readId(_0x5f3152,_0x8142a),[_0x5e6fa0,_0x55cfa5]=_0x370b39['XIFgC'](readVint,_0x5f3152,_0x8142a+_0x1bf5c7),_0x944f6c=_0x370b39['PmYsc'](_0x370b39[_0x2313e0(0x158)](_0x8142a,_0x1bf5c7),_0x55cfa5)+_0x5e6fa0,[,_0x3754cd]=_0x370b39['QvXgj'](readId,_0x5f3152,_0x944f6c),[,_0x2d72ba]=readVint(_0x5f3152,_0x370b39['vVRta'](_0x944f6c,_0x3754cd)),_0x6511f7=_0x944f6c+_0x3754cd+_0x2d72ba,_0x17d286=writeUnknownSizeVint(_0x2d72ba);_0x17d286[_0x2313e0(0x133)](_0x5f3152,_0x370b39['nIhNf'](_0x944f6c,_0x3754cd));let _0x4e3e72=_0x6511f7;const _0x1e31a9=Math[_0x2313e0(0x137)](_0x5f3152['length'],_0x6511f7+0x2710);while(_0x4e3e72<_0x1e31a9){const [_0x24927c,_0xe86fdc]=readId(_0x5f3152,_0x4e3e72),[_0x2d9957,_0x2e1e19]=readVint(_0x5f3152,_0x4e3e72+_0xe86fdc);if(_0x24927c===ID_CLUSTER)break;if(_0x370b39['XIFgC'](isUnknownSize,_0x2d9957,_0x2e1e19))break;if(_0x24927c===ID_INFO){const _0x415731=_0x370b39['vVRta'](_0x4e3e72+_0xe86fdc,_0x2e1e19),_0x10b44d=_0x370b39[_0x2313e0(0x15d)](_0x415731,_0x2d9957),_0x1decfa=[];let _0x1d3b7a=_0x415731;while(_0x1d3b7a<_0x10b44d){const [_0x18fba1,_0x690170]=_0x370b39['knwtS'](readId,_0x5f3152,_0x1d3b7a),[_0x2e8f86,_0x113670]=readVint(_0x5f3152,_0x1d3b7a+_0x690170),_0x378125=_0x370b39['nRqNH'](_0x370b39[_0x2313e0(0x12c)](_0x690170,_0x113670),_0x2e8f86);_0x370b39['IFsdm'](_0x18fba1,ID_DURATION)&&_0x1decfa[_0x2313e0(0x148)](_0x5f3152['slice'](_0x1d3b7a,_0x370b39[_0x2313e0(0x16b)](_0x1d3b7a,_0x378125))),_0x1d3b7a+=_0x378125;}const _0x174cc0=Buffer[_0x2313e0(0x136)](_0x1decfa),_0x1aa246=Buffer[_0x2313e0(0x136)]([_0x5f3152['slice'](_0x4e3e72,_0x4e3e72+_0xe86fdc),writeVint(_0x174cc0['length'],_0x2e1e19)]);return Buffer['concat']([_0x5f3152[_0x2313e0(0x175)](0x0,_0x4e3e72),_0x1aa246,_0x174cc0,_0x5f3152['slice'](_0x10b44d)]);}_0x4e3e72+=_0xe86fdc+_0x2e1e19+_0x2d9957;}return _0x5f3152;}export function stitchWebmFiles(_0x5c267e,_0x5e57c3){const _0xf44146=_0x314f,_0xe2c8aa={'pTkRV':function(_0x3560dc,_0x4062ce){return _0x3560dc(_0x4062ce);},'fcpPi':function(_0x2149f6,_0x29caac){return _0x2149f6===_0x29caac;},'lKzek':function(_0x3b28e3,_0x340f76){return _0x3b28e3(_0x340f76);},'BlARl':function(_0x41d2af,_0x40dc57){return _0x41d2af<_0x40dc57;},'PPOwX':function(_0x131f90,_0x57d658,_0x3797b4,_0x5ddcd7){return _0x131f90(_0x57d658,_0x3797b4,_0x5ddcd7);}};if(_0x5c267e['length']<=0x1)return![];const _0x204c54=[];for(const _0x50b95b of _0x5c267e){const _0x24e326=_0xe2c8aa['pTkRV'](readFileSync,_0x50b95b),_0x43e442=parseWebm(_0x24e326);if(!_0x43e442||_0xe2c8aa['fcpPi'](_0x43e442[_0xf44146(0x130)]['length'],0x0))return![];_0x204c54['push'](_0x43e442);}const _0x52a0a0=_0x204c54[0x0],_0x5f502d=_0xe2c8aa['lKzek'](rebuildHeaderWithoutDuration,_0x52a0a0['header']),_0x1083fa=[_0x5f502d];let _0x2f374a=0x0;for(let _0x441fe5=0x0;_0xe2c8aa[_0xf44146(0x151)](_0x441fe5,_0x204c54[_0xf44146(0x156)]);_0x441fe5++){const _0x278f44=_0x204c54[_0x441fe5];for(const _0x3476f1 of _0x278f44[_0xf44146(0x130)]){const _0x2325b7=_0x3476f1['timestamp']+_0x2f374a;_0x1083fa[_0xf44146(0x148)](_0xe2c8aa['PPOwX'](buildCluster,_0x2325b7,_0x3476f1['bodyBeforeTimestamp'],_0x3476f1['bodyAfterTimestamp']));}const _0x3135f3=0x1e;_0x2f374a+=_0x278f44['maxTimestampTicks']+_0x3135f3;}return writeFileSync(_0x5e57c3,Buffer['concat'](_0x1083fa)),!![];}if(process[_0x3bbe45(0x150)][0x1]?.[_0x3bbe45(0x174)](_0x3bbe45(0x164))||process[_0x3bbe45(0x150)][0x1]?.['endsWith'](_0x3bbe45(0x12b))){const args=process[_0x3bbe45(0x150)][_0x3bbe45(0x175)](0x2);args[_0x3bbe45(0x156)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x3bbe45(0x167)](0x1));const output=args[args[_0x3bbe45(0x156)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x3bbe45(0x173)](_0x3bbe45(0x171)+inputs['length']+_0x3bbe45(0x16a)+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2e31a1=_0x482b;(function(_0x290a18,_0x12fa12){const _0x5a75d1=_0x482b,_0x1e5233=_0x290a18();while(!![]){try{const _0xcf289=-parseInt(_0x5a75d1(0xfd))/0x1*(parseInt(_0x5a75d1(0x103))/0x2)+parseInt(_0x5a75d1(0xed))/0x3+parseInt(_0x5a75d1(0x11f))/0x4+parseInt(_0x5a75d1(0x109))/0x5+-parseInt(_0x5a75d1(0x116))/0x6*(parseInt(_0x5a75d1(0x129))/0x7)+parseInt(_0x5a75d1(0xea))/0x8+-parseInt(_0x5a75d1(0xe6))/0x9;if(_0xcf289===_0x12fa12)break;else _0x1e5233['push'](_0x1e5233['shift']());}catch(_0x52b549){_0x1e5233['push'](_0x1e5233['shift']());}}}(_0x4c90,0x4e369));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function _0x482b(_0x9e835f,_0x2868bf){_0x9e835f=_0x9e835f-0xe0;const _0x4c9021=_0x4c90();let _0x482b49=_0x4c9021[_0x9e835f];return _0x482b49;}function getDeviceId(){const _0x42169a=_0x482b,_0x157839={'wnHGL':function(_0x3972c7,_0x480ed0,_0x64d79c){return _0x3972c7(_0x480ed0,_0x64d79c);},'PBCBw':function(_0x297104){return _0x297104();},'LbPYM':function(_0x3e74f5,_0x5ef62f,_0x3b47ef){return _0x3e74f5(_0x5ef62f,_0x3b47ef);},'TKPln':'.session','yxRlV':'utf-8'};if(cachedDeviceId)return cachedDeviceId;try{const _0x1b7e0b=_0x157839['wnHGL'](join,_0x157839['PBCBw'](homedir),'.ranger'),_0x3b332c=_0x157839['LbPYM'](join,_0x1b7e0b,_0x157839['TKPln']);if(existsSync(_0x3b332c)){cachedDeviceId=_0x157839[_0x42169a(0xf6)](readFileSync,_0x3b332c,_0x157839[_0x42169a(0x12a)])[_0x42169a(0x100)]();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x157839[_0x42169a(0x10d)](randomUUID),mkdirSync(_0x1b7e0b,{'recursive':!![]}),_0x157839['LbPYM'](writeFileSync,_0x3b332c,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x157839[_0x42169a(0x10d)](randomUUID),cachedDeviceId;}}export class TelemetryCollector{[_0x2e31a1(0xe7)]=[];[_0x2e31a1(0xe3)];[_0x2e31a1(0x124)];['commandStartTime'];['phaseCounter']=0x0;['phaseStartTimes']=new Map();['flushing']=null;[_0x2e31a1(0xfb)];['cliVersion'];['nodeVersion'];[_0x2e31a1(0x10e)];[_0x2e31a1(0xf9)];[_0x2e31a1(0x115)];['featureId'];[_0x2e31a1(0x120)];[_0x2e31a1(0x111)];[_0x2e31a1(0x101)];constructor(_0x37ccb5){const _0x27b221=_0x2e31a1,_0x4630e0={'ammrh':function(_0xb72d11){return _0xb72d11();}},_0x5ebff3='7|4|5|8|1|2|3|0|6'['split']('|');let _0x1b5f28=0x0;while(!![]){switch(_0x5ebff3[_0x1b5f28++]){case'0':this['isTty']=process['stdout'][_0x27b221(0x104)]??![];continue;case'1':this['cliVersion']=_0x4630e0['ammrh'](getCurrentVersion);continue;case'2':this[_0x27b221(0x107)]=process[_0x27b221(0x12b)];continue;case'3':this[_0x27b221(0x10e)]=process['platform'];continue;case'4':this['command']=_0x37ccb5;continue;case'5':this['commandStartTime']=Date['now']();continue;case'6':this[_0x27b221(0x115)]=!!(process[_0x27b221(0xf2)]['CI']||process['env']['GITHUB_ACTIONS']);continue;case'7':this['commandId']=randomUUID();continue;case'8':this['deviceId']=_0x4630e0[_0x27b221(0xfe)](getDeviceId);continue;}break;}}[_0x2e31a1(0xe4)](_0x33f5d2){const _0x5c7f47=_0x2e31a1;if(_0x33f5d2['featureId'])this['featureId']=_0x33f5d2['featureId'];if(_0x33f5d2[_0x5c7f47(0x120)])this[_0x5c7f47(0x120)]=_0x33f5d2[_0x5c7f47(0x120)];if(_0x33f5d2[_0x5c7f47(0x111)])this[_0x5c7f47(0x111)]=_0x33f5d2['browserSessionId'];if(_0x33f5d2[_0x5c7f47(0x101)])this['transport']=_0x33f5d2['transport'];}async[_0x2e31a1(0x11b)](_0x4dd9c3){const _0x495bb3=_0x2e31a1,_0x48ea64={'MFUsB':_0x495bb3(0x126)},_0x5ea5d0=this['buildEvent']({'eventType':_0x48ea64['MFUsB'],'metadata':_0x4dd9c3});await this[_0x495bb3(0xec)](_0x5ea5d0);}async[_0x2e31a1(0x102)](_0x5be0f0,_0x3dc352){const _0x4359c5=_0x2e31a1,_0x3f4159={'npPhC':_0x4359c5(0xfc)},_0x2b4c6a=this['buildEvent']({'eventType':_0x3f4159[_0x4359c5(0xe0)],'outcome':_0x5be0f0,'durationMs':Date[_0x4359c5(0x10a)]()-this[_0x4359c5(0xe9)],'metadata':_0x3dc352});await this['sendImmediate'](_0x2b4c6a),await this['flush']();}async[_0x2e31a1(0x113)](_0x25bba3,_0x1e2503){const _0x25c504=_0x2e31a1,_0x50b560={'CLLXK':_0x25c504(0x125),'vtQbW':function(_0x4d6bc6,_0x15776f,_0x433c4c){return _0x4d6bc6(_0x15776f,_0x433c4c);},'CnwdN':function(_0x369bc5,_0x51e84c){return _0x369bc5 instanceof _0x51e84c;},'jlWYr':function(_0x10d8f2,_0x1e6d88){return _0x10d8f2-_0x1e6d88;}},_0x4e4ee2=this[_0x25c504(0x105)]({'eventType':_0x50b560['CLLXK'],'errorMessage':_0x50b560[_0x25c504(0x106)](truncate,_0x50b560['CnwdN'](_0x25bba3,Error)?_0x25bba3['message']:String(_0x25bba3),0x1f4),'errorType':_0x50b560['CnwdN'](_0x25bba3,Error)?_0x25bba3['constructor']['name']:_0x25c504(0x128),'durationMs':_0x50b560[_0x25c504(0xf3)](Date['now'](),this[_0x25c504(0xe9)]),'metadata':_0x1e2503});await this[_0x25c504(0xec)](_0x4e4ee2),await this[_0x25c504(0x112)]();}[_0x2e31a1(0x10c)](_0x17dfc8,_0x400b99){const _0x2d1aff=_0x2e31a1,_0x5e620d={'izNIk':'phase_start'};this[_0x2d1aff(0xf7)]++,this[_0x2d1aff(0xe1)]['set'](_0x17dfc8,Date[_0x2d1aff(0x10a)]());const _0x33b9fa=this[_0x2d1aff(0x105)]({'eventType':_0x5e620d['izNIk'],'phase':_0x17dfc8,'phaseIndex':this['phaseCounter'],'metadata':_0x400b99});this['buffer'][_0x2d1aff(0x127)](_0x33b9fa);}[_0x2e31a1(0x10f)](_0x132554,_0x3e0ce8){const _0x2c7ccf=_0x2e31a1,_0x276b94={'Vdqyk':'phase_end','TGaCy':function(_0x17281f,_0x474148){return _0x17281f>=_0x474148;}},_0x5c471e=this[_0x2c7ccf(0xe1)]['get'](_0x132554),_0x2ae262=_0x5c471e?Date['now']()-_0x5c471e:undefined;this['phaseStartTimes'][_0x2c7ccf(0x118)](_0x132554);const _0x4e00ac=this['buildEvent']({'eventType':_0x276b94['Vdqyk'],'phase':_0x132554,'durationMs':_0x2ae262,'metadata':_0x3e0ce8});this[_0x2c7ccf(0xe7)][_0x2c7ccf(0x127)](_0x4e00ac),_0x276b94['TGaCy'](this[_0x2c7ccf(0xe7)]['length'],0xa)&&this['flushAsync']();}async['trackPhaseError'](_0x8a6617,_0x56221f,_0x1aac5b){const _0x33b4a9=_0x2e31a1,_0x1a9d70={'HcjEB':function(_0xfceb08,_0x33c560){return _0xfceb08 instanceof _0x33c560;},'NmHHv':function(_0xfdf1d5,_0x353e03){return _0xfdf1d5(_0x353e03);}},_0x475d5a=this[_0x33b4a9(0xe1)][_0x33b4a9(0x108)](_0x8a6617),_0x7144e3=_0x475d5a?Date['now']()-_0x475d5a:undefined;this['phaseStartTimes'][_0x33b4a9(0x118)](_0x8a6617);const _0xeeb79b=this[_0x33b4a9(0x105)]({'eventType':'phase_error','phase':_0x8a6617,'durationMs':_0x7144e3,'errorMessage':truncate(_0x1a9d70[_0x33b4a9(0xee)](_0x56221f,Error)?_0x56221f['message']:_0x1a9d70[_0x33b4a9(0x114)](String,_0x56221f),0x1f4),'errorType':_0x1a9d70['HcjEB'](_0x56221f,Error)?_0x56221f[_0x33b4a9(0xf4)][_0x33b4a9(0xf1)]:'Unknown','metadata':_0x1aac5b});await this[_0x33b4a9(0xec)](_0xeeb79b);}async[_0x2e31a1(0x112)](){const _0x41f7ea=_0x2e31a1,_0x1f00ad={'Mmklk':function(_0x541c94,_0x5cf0bd){return _0x541c94===_0x5cf0bd;}};if(_0x1f00ad[_0x41f7ea(0x119)](this['buffer']['length'],0x0))return;const _0x25cb55=this['buffer']['splice'](0x0);try{await this[_0x41f7ea(0xe2)](_0x25cb55);}catch{}}[_0x2e31a1(0x105)](_0x1a2881){const _0x3b4e46=_0x2e31a1;return{'eventType':_0x1a2881['eventType'],'command':this['command'],'commandId':this['commandId'],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x1a2881[_0x3b4e46(0x11e)],'phase':_0x1a2881['phase'],'phaseIndex':_0x1a2881['phaseIndex'],'outcome':_0x1a2881['outcome'],'errorMessage':_0x1a2881[_0x3b4e46(0x110)],'errorType':_0x1a2881['errorType'],'featureId':this['featureId'],'checklistItemId':this[_0x3b4e46(0x120)],'browserSessionId':this['browserSessionId'],'transport':this[_0x3b4e46(0x101)],'evaluation':_0x1a2881[_0x3b4e46(0x123)],'cliVersion':this[_0x3b4e46(0xeb)],'nodeVersion':this[_0x3b4e46(0x107)],'platform':this[_0x3b4e46(0x10e)],'cwd':process[_0x3b4e46(0xf8)](),'isTty':this[_0x3b4e46(0xf9)],'isCI':this[_0x3b4e46(0x115)],'metadata':_0x1a2881[_0x3b4e46(0xe8)]};}async['sendImmediate'](_0x353f3e){try{await this['sendBatch']([_0x353f3e]);}catch{}}['flushAsync'](){const _0x9e218e=_0x2e31a1;if(this['flushing'])return;this[_0x9e218e(0x117)]=this['flush']()[_0x9e218e(0xf5)](()=>{this['flushing']=null;});}async[_0x2e31a1(0xe2)](_0x393c8f){const _0x599498=_0x2e31a1,_0x429188={'kWKJP':function(_0x19b9c9){return _0x19b9c9();},'MKdCU':function(_0x28bd02){return _0x28bd02();},'QjUcm':'application/json','vQSAO':'Authorization','ZCUiL':function(_0x399bcf,_0x5801ac,_0x505942){return _0x399bcf(_0x5801ac,_0x505942);},'nAIal':'POST'},_0x48fefa=await _0x429188['kWKJP'](getToken)['catch'](()=>null),_0x57c112=_0x429188[_0x599498(0x122)](getApiBaseUrl),_0x258aca={'Content-Type':_0x429188[_0x599498(0x10b)]};_0x48fefa&&(_0x258aca[_0x429188['vQSAO']]='Bearer\x20'+_0x48fefa);const _0x2166dc={'events':_0x393c8f};process[_0x599498(0xf2)][_0x599498(0xff)]&&console[_0x599498(0x121)](_0x599498(0x11a)+_0x393c8f['length']+'\x20event(s)\x20to\x20'+_0x57c112+_0x599498(0xef));const _0x5e873e=new AbortController(),_0x18e2f3=_0x429188[_0x599498(0xe5)](setTimeout,()=>_0x5e873e['abort'](),0x1388);try{await _0x429188['ZCUiL'](fetch,_0x57c112+'/api/v1/mcp/cli-telemetry',{'method':_0x429188['nAIal'],'headers':_0x258aca,'body':JSON[_0x599498(0xf0)](_0x2166dc),'signal':_0x5e873e['signal']});}finally{clearTimeout(_0x18e2f3);}}}let currentCollector=null;export function createTelemetryCollector(_0x5017f4){return currentCollector=new TelemetryCollector(_0x5017f4),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x4fb4a5,_0x4632b4,_0x41e2ca){const _0x2db758=_0x2e31a1,_0xbc85ed={'qfPPS':function(_0x506910,_0x34dd0d){return _0x506910(_0x34dd0d);}},_0x964639=_0xbc85ed[_0x2db758(0xfa)](createTelemetryCollector,_0x4fb4a5);await _0x964639['trackCommandStart'](_0x41e2ca);try{const _0x4d777b=await _0x4632b4(_0x964639);return await _0x964639['trackCommandEnd']('success'),_0x4d777b;}catch(_0x2335f8){await _0x964639['trackCommandError'](_0x2335f8);throw _0x2335f8;}finally{await _0x964639[_0x2db758(0x112)]();}}function _0x4c90(){const _0x3ae480=['buildEvent','vtQbW','nodeVersion','get','2084395VZQkQt','now','QjUcm','trackPhaseStart','PBCBw','platform','trackPhaseEnd','errorMessage','browserSessionId','flush','trackCommandError','NmHHv','isCI','12qhCZpc','flushing','delete','Mmklk','[telemetry]\x20Sending\x20','trackCommandStart','IyaWN','rkOSL','durationMs','1316316ijNvqk','checklistItemId','error','MKdCU','evaluation','command','command_error','command_start','push','Unknown','1018346WRzNOa','yxRlV','version','npPhC','phaseStartTimes','sendBatch','commandId','setContext','ZCUiL','4554495oOGIKe','buffer','metadata','commandStartTime','1135512xViWpX','cliVersion','sendImmediate','1336155piubLB','HcjEB','/api/v1/mcp/cli-telemetry','stringify','name','env','jlWYr','constructor','finally','wnHGL','phaseCounter','cwd','isTty','qfPPS','deviceId','command_end','30SoHkzC','ammrh','DEBUG','trim','transport','trackCommandEnd','14394AMNFpi','isTTY'];_0x4c90=function(){return _0x3ae480;};return _0x4c90();}function truncate(_0x104efe,_0x1e1b2d){const _0x565572=_0x2e31a1,_0x2fea7a={'IyaWN':function(_0x468d46,_0xf227f9){return _0x468d46>_0xf227f9;},'rkOSL':'...'};return _0x2fea7a[_0x565572(0x11c)](_0x104efe['length'],_0x1e1b2d)?_0x104efe['slice'](0x0,_0x1e1b2d)+_0x2fea7a[_0x565572(0x11d)]:_0x104efe;}
|
|
1
|
+
const _0x12ec01=_0x3737;(function(_0x1fc4b2,_0x2f0326){const _0x1eb466=_0x3737,_0x13bc12=_0x1fc4b2();while(!![]){try{const _0x1a0bce=-parseInt(_0x1eb466(0x1ce))/0x1*(parseInt(_0x1eb466(0x1e9))/0x2)+-parseInt(_0x1eb466(0x1bd))/0x3*(parseInt(_0x1eb466(0x1f7))/0x4)+parseInt(_0x1eb466(0x1cf))/0x5*(-parseInt(_0x1eb466(0x1de))/0x6)+parseInt(_0x1eb466(0x1c0))/0x7+parseInt(_0x1eb466(0x1dc))/0x8+parseInt(_0x1eb466(0x1c1))/0x9+-parseInt(_0x1eb466(0x1d7))/0xa;if(_0x1a0bce===_0x2f0326)break;else _0x13bc12['push'](_0x13bc12['shift']());}catch(_0x3ed6e1){_0x13bc12['push'](_0x13bc12['shift']());}}}(_0x24d0,0x606c2));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function getDeviceId(){const _0x46ec2b=_0x3737,_0x1d7c7f={'atuhG':function(_0x22fa9b){return _0x22fa9b();},'bkXIH':function(_0x38bf77,_0x195dd8,_0x5fd016){return _0x38bf77(_0x195dd8,_0x5fd016);},'mVPMB':function(_0x369d50,_0x24a1f8,_0x20c752){return _0x369d50(_0x24a1f8,_0x20c752);},'lsmvK':function(_0x40c84c,_0x379158,_0x1188bc){return _0x40c84c(_0x379158,_0x1188bc);}};if(cachedDeviceId)return cachedDeviceId;try{const _0x243cfb=join(_0x1d7c7f['atuhG'](homedir),'.ranger'),_0x3ad155=join(_0x243cfb,_0x46ec2b(0x1ef));if(existsSync(_0x3ad155)){cachedDeviceId=_0x1d7c7f['bkXIH'](readFileSync,_0x3ad155,_0x46ec2b(0x1fe))['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=randomUUID(),_0x1d7c7f['mVPMB'](mkdirSync,_0x243cfb,{'recursive':!![]}),_0x1d7c7f[_0x46ec2b(0x1dd)](writeFileSync,_0x3ad155,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x1d7c7f['atuhG'](randomUUID),cachedDeviceId;}}export class TelemetryCollector{['buffer']=[];['commandId'];['command'];[_0x12ec01(0x1d1)];[_0x12ec01(0x1eb)]=0x0;[_0x12ec01(0x1ca)]=new Map();['flushing']=null;['deviceId'];['cliVersion'];[_0x12ec01(0x1ed)];['platform'];[_0x12ec01(0x1b7)];[_0x12ec01(0x1fd)];[_0x12ec01(0x1fb)];['checklistItemId'];['browserSessionId'];[_0x12ec01(0x1bc)];constructor(_0x566850){const _0x338d00=_0x12ec01,_0x3ddf53='0|1|3|7|8|4|2|5|6'[_0x338d00(0x1f0)]('|');let _0x17d62a=0x0;while(!![]){switch(_0x3ddf53[_0x17d62a++]){case'0':this[_0x338d00(0x1bb)]=randomUUID();continue;case'1':this[_0x338d00(0x1fc)]=_0x566850;continue;case'2':this['platform']=process['platform'];continue;case'3':this['commandStartTime']=Date[_0x338d00(0x1da)]();continue;case'4':this[_0x338d00(0x1ed)]=process['version'];continue;case'5':this[_0x338d00(0x1b7)]=process[_0x338d00(0x1ea)]['isTTY']??![];continue;case'6':this['isCI']=!!(process['env']['CI']||process[_0x338d00(0x1c6)]['GITHUB_ACTIONS']);continue;case'7':this[_0x338d00(0x1ee)]=getDeviceId();continue;case'8':this[_0x338d00(0x1e4)]=getCurrentVersion();continue;}break;}}['setContext'](_0x1f3265){const _0x5a5ec7=_0x12ec01;if(_0x1f3265['featureId'])this['featureId']=_0x1f3265['featureId'];if(_0x1f3265['checklistItemId'])this['checklistItemId']=_0x1f3265[_0x5a5ec7(0x1f8)];if(_0x1f3265[_0x5a5ec7(0x1c9)])this['browserSessionId']=_0x1f3265[_0x5a5ec7(0x1c9)];if(_0x1f3265[_0x5a5ec7(0x1bc)])this[_0x5a5ec7(0x1bc)]=_0x1f3265['transport'];}async[_0x12ec01(0x1c5)](_0x415cf7){const _0x138bc3=_0x12ec01,_0x44be25={'tVbVp':_0x138bc3(0x1d0)},_0x216e7a=this[_0x138bc3(0x1fa)]({'eventType':_0x44be25[_0x138bc3(0x1d2)],'metadata':_0x415cf7});await this[_0x138bc3(0x1cc)](_0x216e7a);}async[_0x12ec01(0x1e8)](_0x39f4ce,_0x3174a3){const _0x200c0d=_0x12ec01,_0x2a7022={'EtPms':'command_end','rzyHk':function(_0x1f1ad4,_0x2eb333){return _0x1f1ad4-_0x2eb333;}},_0x2ca3af=this[_0x200c0d(0x1fa)]({'eventType':_0x2a7022['EtPms'],'outcome':_0x39f4ce,'durationMs':_0x2a7022['rzyHk'](Date[_0x200c0d(0x1da)](),this['commandStartTime']),'metadata':_0x3174a3});await this[_0x200c0d(0x1cc)](_0x2ca3af),await this['flush']();}async[_0x12ec01(0x1b8)](_0xe1b83,_0x11b8d4){const _0xbe9352=_0x12ec01,_0xa6c731={'Udxks':function(_0x1a3241,_0x297ce6){return _0x1a3241 instanceof _0x297ce6;},'CnZDv':function(_0x54056f,_0x48453d){return _0x54056f-_0x48453d;}},_0x131c78=this['buildEvent']({'eventType':_0xbe9352(0x1ba),'errorMessage':truncate(_0xa6c731[_0xbe9352(0x1d3)](_0xe1b83,Error)?_0xe1b83[_0xbe9352(0x1e3)]:String(_0xe1b83),0x1f4),'errorType':_0xa6c731['Udxks'](_0xe1b83,Error)?_0xe1b83['constructor'][_0xbe9352(0x1db)]:'Unknown','durationMs':_0xa6c731['CnZDv'](Date[_0xbe9352(0x1da)](),this[_0xbe9352(0x1d1)]),'metadata':_0x11b8d4});await this[_0xbe9352(0x1cc)](_0x131c78),await this[_0xbe9352(0x1ec)]();}[_0x12ec01(0x1bf)](_0x202e36,_0x2fb94c){const _0x49ac95=_0x12ec01,_0x5aacf3={'nEKlN':_0x49ac95(0x1c2)};this[_0x49ac95(0x1eb)]++,this['phaseStartTimes']['set'](_0x202e36,Date[_0x49ac95(0x1da)]());const _0x349585=this['buildEvent']({'eventType':_0x5aacf3[_0x49ac95(0x1c4)],'phase':_0x202e36,'phaseIndex':this['phaseCounter'],'metadata':_0x2fb94c});this['buffer']['push'](_0x349585);}['trackPhaseEnd'](_0x40bece,_0x506f72){const _0x49078d=_0x12ec01,_0x46ee13={'SVVyT':function(_0xfe02f,_0x470ac4){return _0xfe02f-_0x470ac4;},'EAEsy':function(_0x24591b,_0x1c2509){return _0x24591b>=_0x1c2509;}},_0x110463=this['phaseStartTimes'][_0x49078d(0x1f9)](_0x40bece),_0x4eafaf=_0x110463?_0x46ee13['SVVyT'](Date[_0x49078d(0x1da)](),_0x110463):undefined;this['phaseStartTimes']['delete'](_0x40bece);const _0x35bf71=this[_0x49078d(0x1fa)]({'eventType':_0x49078d(0x1d9),'phase':_0x40bece,'durationMs':_0x4eafaf,'metadata':_0x506f72});this[_0x49078d(0x1f1)]['push'](_0x35bf71),_0x46ee13[_0x49078d(0x1e7)](this['buffer'][_0x49078d(0x1d5)],0xa)&&this['flushAsync']();}async['trackPhaseError'](_0x36110c,_0x3b4f9c,_0x427148){const _0x2d4b0a=_0x12ec01,_0x28f2f1={'UhRqE':function(_0x50b12a,_0x5bec62,_0xcde1aa){return _0x50b12a(_0x5bec62,_0xcde1aa);},'Kwldd':function(_0x459b5b,_0x39c19e){return _0x459b5b instanceof _0x39c19e;}},_0x357781=this[_0x2d4b0a(0x1ca)][_0x2d4b0a(0x1f9)](_0x36110c),_0x4b0cad=_0x357781?Date[_0x2d4b0a(0x1da)]()-_0x357781:undefined;this[_0x2d4b0a(0x1ca)]['delete'](_0x36110c);const _0x362161=this['buildEvent']({'eventType':_0x2d4b0a(0x1d6),'phase':_0x36110c,'durationMs':_0x4b0cad,'errorMessage':_0x28f2f1['UhRqE'](truncate,_0x28f2f1[_0x2d4b0a(0x1e0)](_0x3b4f9c,Error)?_0x3b4f9c[_0x2d4b0a(0x1e3)]:String(_0x3b4f9c),0x1f4),'errorType':_0x28f2f1[_0x2d4b0a(0x1e0)](_0x3b4f9c,Error)?_0x3b4f9c[_0x2d4b0a(0x1cd)][_0x2d4b0a(0x1db)]:'Unknown','metadata':_0x427148});await this[_0x2d4b0a(0x1cc)](_0x362161);}async['flush'](){const _0x4d4b4c=_0x12ec01,_0x40f632={'UuGsi':function(_0x21aa49,_0x7e360d){return _0x21aa49===_0x7e360d;}};if(_0x40f632[_0x4d4b4c(0x1ff)](this['buffer']['length'],0x0))return;const _0x460bd0=this['buffer']['splice'](0x0);try{await this['sendBatch'](_0x460bd0);}catch{}}[_0x12ec01(0x1fa)](_0x407fc3){const _0x2f6bb2=_0x12ec01;return{'eventType':_0x407fc3[_0x2f6bb2(0x1e6)],'command':this['command'],'commandId':this['commandId'],'deviceId':this['deviceId'],'timestamp':new Date()[_0x2f6bb2(0x1f4)](),'durationMs':_0x407fc3['durationMs'],'phase':_0x407fc3[_0x2f6bb2(0x200)],'phaseIndex':_0x407fc3[_0x2f6bb2(0x1d8)],'outcome':_0x407fc3[_0x2f6bb2(0x1d4)],'errorMessage':_0x407fc3[_0x2f6bb2(0x1df)],'errorType':_0x407fc3['errorType'],'featureId':this[_0x2f6bb2(0x1fb)],'checklistItemId':this['checklistItemId'],'browserSessionId':this[_0x2f6bb2(0x1c9)],'transport':this['transport'],'evaluation':_0x407fc3['evaluation'],'cliVersion':this['cliVersion'],'nodeVersion':this[_0x2f6bb2(0x1ed)],'platform':this[_0x2f6bb2(0x1cb)],'cwd':process['cwd'](),'isTty':this[_0x2f6bb2(0x1b7)],'isCI':this[_0x2f6bb2(0x1fd)],'metadata':_0x407fc3[_0x2f6bb2(0x1f3)]};}async[_0x12ec01(0x1cc)](_0x3a8179){const _0x5cb195=_0x12ec01;try{await this[_0x5cb195(0x1f5)]([_0x3a8179]);}catch{}}['flushAsync'](){const _0x542db5=_0x12ec01;if(this['flushing'])return;this['flushing']=this[_0x542db5(0x1ec)]()['finally'](()=>{const _0x144810=_0x542db5;this[_0x144810(0x1e2)]=null;});}async['sendBatch'](_0x276c24){const _0x9cd273=_0x12ec01,_0x17f204={'aHDvL':function(_0xd411c5){return _0xd411c5();},'WAmBj':_0x9cd273(0x1e1),'LkQGY':function(_0x4125ce,_0x334d21,_0x2af44d){return _0x4125ce(_0x334d21,_0x2af44d);}},_0x2c8194=await _0x17f204['aHDvL'](getToken)[_0x9cd273(0x1c8)](()=>null),_0x4256c5=getApiBaseUrl(),_0xd67bc={'Content-Type':'application/json'};_0x2c8194&&(_0xd67bc[_0x17f204[_0x9cd273(0x1c3)]]='Bearer\x20'+_0x2c8194);const _0x52c0ad={'events':_0x276c24};process['env']['DEBUG']&&console[_0x9cd273(0x1be)]('[telemetry]\x20Sending\x20'+_0x276c24[_0x9cd273(0x1d5)]+'\x20event(s)\x20to\x20'+_0x4256c5+'/api/v1/mcp/cli-telemetry');const _0x3b4187=new AbortController(),_0x816ab5=setTimeout(()=>_0x3b4187[_0x9cd273(0x1b9)](),0x1388);try{await _0x17f204[_0x9cd273(0x1e5)](fetch,_0x4256c5+'/api/v1/mcp/cli-telemetry',{'method':_0x9cd273(0x1c7),'headers':_0xd67bc,'body':JSON['stringify'](_0x52c0ad),'signal':_0x3b4187[_0x9cd273(0x1b6)]});}finally{clearTimeout(_0x816ab5);}}}let currentCollector=null;function _0x24d0(){const _0x2658ce=['lsmvK','361290QqtkCZ','errorMessage','Kwldd','Authorization','flushing','message','cliVersion','LkQGY','eventType','EAEsy','trackCommandEnd','4178tpSpsY','stdout','phaseCounter','flush','nodeVersion','deviceId','.session','split','buffer','PWtrJ','metadata','toISOString','sendBatch','...','26788GquazM','checklistItemId','get','buildEvent','featureId','command','isCI','utf-8','UuGsi','phase','signal','isTty','trackCommandError','abort','command_error','commandId','transport','6vyXVZS','error','trackPhaseStart','4948237rorKOD','6334371ZERKMt','phase_start','WAmBj','nEKlN','trackCommandStart','env','POST','catch','browserSessionId','phaseStartTimes','platform','sendImmediate','constructor','82hHjUkt','5FRdTSd','command_start','commandStartTime','tVbVp','Udxks','outcome','length','phase_error','9307550KpebiX','phaseIndex','phase_end','now','name','1279184aYaMYR'];_0x24d0=function(){return _0x2658ce;};return _0x24d0();}function _0x3737(_0x27f8e0,_0x278499){_0x27f8e0=_0x27f8e0-0x1b6;const _0x24d0d8=_0x24d0();let _0x3737ae=_0x24d0d8[_0x27f8e0];return _0x3737ae;}export function createTelemetryCollector(_0x1ce2e0){return currentCollector=new TelemetryCollector(_0x1ce2e0),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x24261c,_0x5e142e,_0x20779c){const _0x54ba83=_0x12ec01,_0x289416={'viePu':function(_0x5c992b,_0x382f89){return _0x5c992b(_0x382f89);}},_0x16c08d=createTelemetryCollector(_0x24261c);await _0x16c08d[_0x54ba83(0x1c5)](_0x20779c);try{const _0x136a77=await _0x289416['viePu'](_0x5e142e,_0x16c08d);return await _0x16c08d['trackCommandEnd']('success'),_0x136a77;}catch(_0x3ce57f){await _0x16c08d[_0x54ba83(0x1b8)](_0x3ce57f);throw _0x3ce57f;}finally{await _0x16c08d[_0x54ba83(0x1ec)]();}}function truncate(_0x198ef9,_0x145d6a){const _0x1d1db7=_0x12ec01,_0x35db3f={'XFWQg':function(_0x48a453,_0x5acff9){return _0x48a453>_0x5acff9;},'PWtrJ':_0x1d1db7(0x1f6)};return _0x35db3f['XFWQg'](_0x198ef9[_0x1d1db7(0x1d5)],_0x145d6a)?_0x198ef9['slice'](0x0,_0x145d6a)+_0x35db3f[_0x1d1db7(0x1f2)]:_0x198ef9;}
|