@ranger-testing/ranger-cli 3.1.4-alpha.ffeeafe-46 → 3.1.5-alpha.0c090c6-50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/deleteProfile.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/novaActCli.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/organizationEnvApi.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/rangerwrightCli.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/scenarioOriginCheck.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/tunnelClient.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyFeatureNovaCli.js +1 -1
- package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
- package/package.json +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x355d11,_0x137c1b){const _0x381fc8=_0x1edd,_0x57ea7f=_0x355d11();while(!![]){try{const _0x3ed199=-parseInt(_0x381fc8(0x1c8))/0x1*(parseInt(_0x381fc8(0x1a5))/0x2)+parseInt(_0x381fc8(0x187))/0x3*(parseInt(_0x381fc8(0x1bc))/0x4)+parseInt(_0x381fc8(0x1ac))/0x5*(parseInt(_0x381fc8(0x1c9))/0x6)+-parseInt(_0x381fc8(0x1c1))/0x7*(parseInt(_0x381fc8(0x1c3))/0x8)+parseInt(_0x381fc8(0x1ab))/0x9+-parseInt(_0x381fc8(0x18e))/0xa*(-parseInt(_0x381fc8(0x1ae))/0xb)+parseInt(_0x381fc8(0x1b2))/0xc*(-parseInt(_0x381fc8(0x1c6))/0xd);if(_0x3ed199===_0x137c1b)break;else _0x57ea7f['push'](_0x57ea7f['shift']());}catch(_0x3d4ad1){_0x57ea7f['push'](_0x57ea7f['shift']());}}}(_0x18e6,0xaa9bd));import{existsSync}from'fs';import _0x4621c5 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';function _0x1edd(_0x39d0e5,_0x36c00c){_0x39d0e5=_0x39d0e5-0x185;const _0x18e63c=_0x18e6();let _0x1edd59=_0x18e63c[_0x39d0e5];return _0x1edd59;}import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';function _0x18e6(){const _0x47baa0=['\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','DKsYQ','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','948otHomm','jxUyZ','ZtERG','baseUrl','lmQVj','658343wejeDD','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','8AclLDN','local','startPath','416uvlwSP','log','199311xLAfzv','1382124HFXmSC','Profile\x20\x22','profile','source','wkIZF','env','cwd','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','settings','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','11751iaLhay','\x20baseUrl\x20<url>','url','YiHBx','RIMBT','PAOTO','message','3673150nyqRHE','\x22.\x20Pass\x20--profile\x20','vHAVb','KUoVj','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','gSJLK','vajiZ','\x20\x20Note:\x20--env\x20\x22','authEnv','Active\x20profile\x20\x22','RANGER_SESSION_STATE_PATH','cdpEndpoint','name','Cloud\x20profile\x20(recommended)','CBWex','SLmWO','baseUrlSource','domains','environmentKey','thZUi','envBaseUrl','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','RANGER_TEST_USERNAME','10QiMnck','VbpTV','telemetry','\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22','soUmG','RANGER_SESSION_STATE_PATH=','11670165dnLket','25ZvUSuO','XLMOQ','33ajsMVj','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','GKNnW','WZHEr','1008492EuUcvd','qCbMz','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','XZsAG','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','string'];_0x18e6=function(){return _0x47baa0;};return _0x18e6();}import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x5271db){const _0x16a443=_0x1edd,_0x39e103={'SLmWO':function(_0x206025,_0x4ddedd){return _0x206025(_0x4ddedd);},'syYch':function(_0x1574b2,_0x47e86d){return _0x1574b2!==_0x47e86d;},'WZHEr':function(_0x563840,_0x4f53c2){return _0x563840(_0x4f53c2);},'lmQVj':function(_0x4e61b0,_0x3cc0ef){return _0x4e61b0===_0x3cc0ef;},'wkIZF':function(_0x4c0660,_0x473929){return _0x4c0660+_0x473929;},'vHAVb':'Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','kJcxL':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','YiHBx':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','jxUyZ':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','VbpTV':function(_0x2f9f2b,_0x3a560b){return _0x2f9f2b(_0x3a560b);},'nGzFO':function(_0x281d17,_0x37b03c){return _0x281d17 instanceof _0x37b03c;},'DrLjg':function(_0x595c5a,_0x142de5){return _0x595c5a&&_0x142de5;},'qCbMz':function(_0x1ce587,_0x1f671f){return _0x1ce587+_0x1f671f;},'GKNnW':function(_0x5822ef,_0x53496b){return _0x5822ef+_0x53496b;},'XZsAG':_0x16a443(0x186),'soUmG':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','vajiZ':function(_0x2d469a,_0x34a395){return _0x2d469a&&_0x34a395;},'OSRiU':'list','YxyqB':_0x16a443(0x19b),'RIMBT':'cloud','XLMOQ':'Local\x20profile','PAOTO':_0x16a443(0x1c4),'ArruZ':function(_0x51aa36,_0x1abe13){return _0x51aa36===_0x1abe13;},'DKsYQ':function(_0x4c7456){return _0x4c7456();},'CBWex':function(_0x4dc74d,_0x4ebb00,_0x412f7f){return _0x4dc74d(_0x4ebb00,_0x412f7f);},'mpLgY':function(_0x48e1e9,_0x1aa00f){return _0x48e1e9??_0x1aa00f;},'WXnTU':function(_0x14299a,_0x32c4d0){return _0x14299a+_0x32c4d0;},'gSJLK':function(_0x3ecdd4,_0x5bd3f1){return _0x3ecdd4+_0x5bd3f1;},'HJAJE':function(_0x386b5b,_0x4c1fe5){return _0x386b5b+_0x4c1fe5;},'KUoVj':function(_0x399637,_0x332bd6){return _0x399637(_0x332bd6);}},_0x13eaf0=_0x5271db[_0x16a443(0x1cb)];let _0x2540aa=_0x13eaf0,_0x1b28d1=null;const _0x216240=_0x13eaf0?null:await readActiveProfileName();if(_0x5271db['authEnv']&&_0x13eaf0)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x5271db['authEnv']+'\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.');else _0x5271db['authEnv']&&!process[_0x16a443(0x1ce)][_0x16a443(0x1a4)]&&console['log'](_0x16a443(0x195)+_0x5271db['authEnv']+'\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.');if(!_0x13eaf0&&process['env'][_0x16a443(0x1a4)])try{const _0x573acb=await _0x39e103[_0x16a443(0x19d)](resolveAdHocProfile,{'targetUrl':_0x5271db['baseUrl']??readUrlEnvVars()['envBaseUrl'],'envKey':_0x5271db['authEnv']});_0x573acb&&(_0x216240&&_0x39e103['syYch'](_0x216240,_0x573acb[_0x16a443(0x19a)])&&console['log'](_0x16a443(0x1ba)+_0x573acb[_0x16a443(0x19a)]+_0x16a443(0x1a8)+_0x216240+_0x16a443(0x18f)+_0x216240+'\x20to\x20override.'),_0x2540aa=_0x573acb['name'],_0x1b28d1=_0x573acb['profile']);}catch(_0x108607){if(!_0x216240||_0x5271db[_0x16a443(0x196)])throw _0x108607;console[_0x16a443(0x1c7)]('\x20\x20Warning:\x20'+(_0x108607 instanceof Error?_0x108607[_0x16a443(0x18d)]:_0x39e103[_0x16a443(0x1b1)](String,_0x108607))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x216240+'\x22.');}if(!_0x2540aa)_0x2540aa=_0x216240??undefined;if(!_0x2540aa)try{const _0xdc15be=await listCloudProfiles();if(_0x39e103[_0x16a443(0x1c0)](_0xdc15be['length'],0x1)){const _0x18d33f=_0xdc15be[0x0];_0x2540aa=_0x18d33f[_0x16a443(0x19a)],console['log']('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x18d33f[_0x16a443(0x19a)]),console['log'](_0x16a443(0x1c2));}}catch{}if(!_0x2540aa)throw new Error(_0x39e103['wkIZF'](_0x39e103[_0x16a443(0x1cd)](_0x39e103[_0x16a443(0x190)],_0x39e103['kJcxL']),_0x39e103[_0x16a443(0x18a)])+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'+_0x39e103[_0x16a443(0x1bd)]);const _0x5563d7=getEnvDir(_0x2540aa),_0x21a128=_0x39e103['SLmWO'](existsSync,_0x5563d7);let _0x45530c=_0x1b28d1,_0x55cd46=![];if(!_0x45530c)try{_0x45530c=await _0x39e103['VbpTV'](fetchCloudProfile,_0x2540aa);if(!_0x45530c)_0x55cd46=!![];}catch(_0x29b67a){_0x39e103['nGzFO'](_0x29b67a,ApiError)&&_0x29b67a['status']===0x194&&(_0x55cd46=!![]);}if(_0x39e103['DrLjg'](_0x13eaf0,_0x55cd46)&&!_0x21a128&&!_0x45530c)throw new Error(_0x39e103[_0x16a443(0x1b3)](_0x39e103[_0x16a443(0x1b0)]('Profile\x20\x22'+_0x13eaf0+_0x16a443(0x1b6),_0x39e103[_0x16a443(0x1b5)]),_0x39e103[_0x16a443(0x1a9)]));if(_0x39e103[_0x16a443(0x194)](_0x45530c,_0x21a128)){let _0x517e1d=!![];if(isInteractive()){const {source:_0x31b58c}=await _0x4621c5['prompt']([{'type':_0x39e103['OSRiU'],'name':_0x16a443(0x1cc),'message':_0x16a443(0x1ca)+_0x2540aa+_0x16a443(0x1bb),'choices':[{'name':_0x39e103['YxyqB'],'value':_0x39e103[_0x16a443(0x18b)]},{'name':_0x39e103[_0x16a443(0x1ad)],'value':_0x39e103[_0x16a443(0x18c)]}],'default':_0x39e103[_0x16a443(0x18b)]}]);_0x517e1d=_0x39e103['ArruZ'](_0x31b58c,_0x39e103['RIMBT']);}if(!_0x517e1d)_0x45530c=null;}const _0x213275=readProfileOverrides(process[_0x16a443(0x1cf)](),_0x2540aa);let _0x156a8b=null,_0x35d677,_0x5f00ff,_0x57317d,_0x2a4c12,_0x8653e0=null,_0x6959c1,_0x52d0bc;const _0x215788=expandOverrides(_0x213275),_0x467548=_0x39e103[_0x16a443(0x1b9)](readUrlEnvVars);if(_0x45530c){_0x156a8b=_0x45530c;const _0x81a94=_0x45530c['settings']??{},_0x3c3a16=_0x39e103['CBWex'](mergeCloudProfileSettings,_0x81a94,_0x39e103['mpLgY'](_0x213275,undefined)),_0x315379={..._0x45530c,'settings':_0x3c3a16};_0x8653e0={'baseUrl':_0x39e103['WZHEr'](expandString,_0x81a94[_0x16a443(0x1bf)]),'startPath':expandString(_0x81a94['startPath'])};const _0x18ba4b=await fetchAuthConfig(),_0x2e3e68=_0x18ba4b?resolveAuthEnvironmentLocally(_0x18ba4b,_0x45530c[_0x16a443(0x1a0)]):null;_0x6959c1=_0x2e3e68?.[_0x16a443(0x19f)]?.[0x0],_0x52d0bc=_0x2e3e68?.['key'];const _0x115016=resolveProfileUrl({'flagBaseUrl':_0x5271db[_0x16a443(0x1bf)],'flagStartPath':_0x5271db[_0x16a443(0x1c5)],'envBaseUrl':_0x467548[_0x16a443(0x1a2)],'envStartPath':_0x467548['envStartPath'],'projectOverrides':_0x215788,'cloudSettings':_0x8653e0,'authEnvironmentDomain':_0x6959c1}),_0x426eaf=process[_0x16a443(0x1ce)][_0x16a443(0x198)];if(_0x426eaf){if(!existsSync(_0x426eaf))throw new Error(_0x16a443(0x1aa)+_0x426eaf+'\x20does\x20not\x20exist.');_0x35d677=_0x426eaf,_0x5f00ff=resolveEnvVars(_0x3c3a16),_0x57317d=Boolean(_0x5f00ff[_0x16a443(0x199)]);}else{const _0x2e6b1c=await _0x39e103[_0x16a443(0x19c)](resolveCloudProfileSession,_0x315379,{'effectiveBaseUrl':_0x115016[_0x16a443(0x1bf)],'telemetry':_0x5271db[_0x16a443(0x1a7)]});_0x35d677=_0x2e6b1c['authPath'],_0x5f00ff=resolveEnvVars(_0x2e6b1c[_0x16a443(0x185)]),_0x57317d=Boolean(_0x5f00ff['cdpEndpoint']),_0x6959c1=_0x2e6b1c['resolvedEnv']?.[_0x16a443(0x19f)]?.[0x0],_0x52d0bc=_0x2e6b1c['resolvedEnv']?.['key'];}}else{if(!_0x21a128){const _0x1b9125=!_0x13eaf0;throw new Error(_0x1b9125?_0x39e103['WXnTU'](_0x39e103[_0x16a443(0x193)](_0x39e103['HJAJE'](_0x16a443(0x197)+_0x2540aa+_0x16a443(0x1b4),_0x16a443(0x192)),_0x16a443(0x1b8)),_0x16a443(0x1af)+_0x2540aa+'`\x20to\x20recreate\x20it.'):'Profile\x20\x22'+_0x2540aa+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x2540aa);}const _0x40efda=await loadSettings(_0x2540aa);_0x5f00ff=_0x39e103[_0x16a443(0x1a6)](resolveEnvVars,_0x40efda),_0x57317d=_0x39e103[_0x16a443(0x191)](Boolean,_0x5f00ff['cdpEndpoint']),_0x2a4c12=_0x5f00ff[_0x16a443(0x1bf)];}const _0x139ae6=_0x39e103['WZHEr'](resolveProfileUrl,{'flagBaseUrl':_0x5271db['baseUrl'],'flagStartPath':_0x5271db[_0x16a443(0x1c5)],'envBaseUrl':_0x467548['envBaseUrl'],'envStartPath':_0x467548['envStartPath'],'localSettingsBaseUrl':_0x2a4c12,'projectOverrides':_0x215788,'cloudSettings':_0x8653e0,'authEnvironmentDomain':_0x6959c1}),_0x24bbf0=_0x139ae6[_0x16a443(0x189)]??_0x139ae6['baseUrl'];if(_0x39e103['DrLjg'](!_0x24bbf0,!_0x57317d))throw new Error(_0x16a443(0x1d0)+_0x2540aa+_0x16a443(0x1a3)+_0x2540aa+_0x16a443(0x188));return{'activeProfile':_0x2540aa,'resolvedCloudProfile':_0x156a8b,'cloudAuthPath':_0x35d677,'resolvedSettings':_0x5f00ff,'isCdpMode':_0x57317d,'url':_0x24bbf0,'baseUrlSource':_0x139ae6[_0x16a443(0x19e)],'authEnvKey':_0x52d0bc,'startPath':_0x139ae6[_0x16a443(0x1c5)]};}function expandString(_0xe778aa){const _0x108c9f=_0x1edd;if(typeof _0xe778aa!==_0x108c9f(0x1b7))return _0xe778aa;return resolveEnvVars(_0xe778aa);}function expandOverrides(_0x510d95){const _0x3ef53f=_0x1edd,_0x33729f={'CAPxf':function(_0x44a3aa,_0x1a2559){return _0x44a3aa===_0x1a2559;},'fPuAE':_0x3ef53f(0x1b7),'thZUi':function(_0x1c226a,_0x186664){return _0x1c226a(_0x186664);},'ZtERG':function(_0x2ad463,_0x1f5eb2){return _0x2ad463(_0x1f5eb2);}};if(!_0x510d95)return _0x510d95;const _0x55a554={..._0x510d95};return _0x33729f['CAPxf'](typeof _0x55a554['baseUrl'],_0x33729f['fPuAE'])&&(_0x55a554['baseUrl']=_0x33729f[_0x3ef53f(0x1a1)](resolveEnvVars,_0x55a554['baseUrl'])),_0x33729f['CAPxf'](typeof _0x55a554[_0x3ef53f(0x1c5)],_0x3ef53f(0x1b7))&&(_0x55a554['startPath']=_0x33729f[_0x3ef53f(0x1be)](resolveEnvVars,_0x55a554[_0x3ef53f(0x1c5)])),_0x55a554;}
|
|
1
|
+
(function(_0x19c7e8,_0x15ecf4){const _0x12f750=_0x30e7,_0x461eb9=_0x19c7e8();while(!![]){try{const _0x10fdc5=-parseInt(_0x12f750(0x19d))/0x1*(parseInt(_0x12f750(0x1c8))/0x2)+-parseInt(_0x12f750(0x187))/0x3*(parseInt(_0x12f750(0x192))/0x4)+parseInt(_0x12f750(0x1bb))/0x5*(-parseInt(_0x12f750(0x1bf))/0x6)+parseInt(_0x12f750(0x18c))/0x7+parseInt(_0x12f750(0x1bc))/0x8*(parseInt(_0x12f750(0x1a5))/0x9)+-parseInt(_0x12f750(0x1ca))/0xa+parseInt(_0x12f750(0x1c7))/0xb*(parseInt(_0x12f750(0x198))/0xc);if(_0x10fdc5===_0x15ecf4)break;else _0x461eb9['push'](_0x461eb9['shift']());}catch(_0x20d7c1){_0x461eb9['push'](_0x461eb9['shift']());}}}(_0x5280,0x78c2a));import{existsSync}from'fs';import _0x596ed5 from'inquirer';function _0x30e7(_0x42f8a0,_0x2fc13c){_0x42f8a0=_0x42f8a0-0x187;const _0x52801a=_0x5280();let _0x30e774=_0x52801a[_0x42f8a0];return _0x30e774;}function _0x5280(){const _0x4170c7=['\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','baseUrl','baseUrlSource','key','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','Qrmkw','\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22','SMdal','lCjQS','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','authEnv','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','envStartPath','startPath','\x20to\x20override.','WPhTL','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','prompt','log','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','190FKbrdl','8mjeKNK','cloud','mEYuq','105030gLGUcw','environmentKey','zaCmn','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','RANGER_TEST_USERNAME','mJHsy','xpitb','GUhae','88xakBEL','8eVGWcv','ddoSa','3824980owrQbo','40578pbsYBc','SOxbU','WABHn','\x20does\x20not\x20exist.','EVOUh','6813247EMuQHU','ZrqUU','DACgn','length','local','list','188PZPAvL','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','env','mEEAg','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','name','2057388IbiKdd','vxTRG','RANGER_SESSION_STATE_PATH=','domains','envBaseUrl','135508XHuGlM','RANGER_SESSION_STATE_PATH','Cloud\x20profile\x20(recommended)','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','ynNUg','message','cdpEndpoint','settings','3376467GzEBzM'];_0x5280=function(){return _0x4170c7;};return _0x5280();}import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x5ed176){const _0xc38927=_0x30e7,_0x9a9f06={'mEEAg':function(_0x3c768d){return _0x3c768d();},'Qrmkw':function(_0x43016c,_0x30293f){return _0x43016c(_0x30293f);},'WABHn':function(_0x4c75db,_0x258aa8){return _0x4c75db!==_0x258aa8;},'lCjQS':function(_0x278533,_0x148cb2){return _0x278533 instanceof _0x148cb2;},'ZrqUU':function(_0x516bd6,_0x57a9cb){return _0x516bd6??_0x57a9cb;},'mJHsy':function(_0xb754a8,_0x34233b){return _0xb754a8===_0x34233b;},'ynNUg':function(_0x4fd535,_0x1731bd){return _0x4fd535+_0x1731bd;},'yLbjA':_0xc38927(0x1ba),'WPhTL':_0xc38927(0x1a0),'orVvd':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','cCZrb':function(_0x3dd498,_0x1949f8){return _0x3dd498(_0x1949f8);},'zaCmn':function(_0x11d5e8,_0x45689c){return _0x11d5e8 instanceof _0x45689c;},'SMdal':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','ddoSa':_0xc38927(0x191),'RCyOl':'Local\x20profile','DACgn':_0xc38927(0x1bd),'GUhae':function(_0x393875,_0x5a6504){return _0x393875(_0x5a6504);},'hlgjk':function(_0x17618f,_0x1359c7,_0x1be5ca){return _0x17618f(_0x1359c7,_0x1be5ca);},'hxKRw':function(_0x4de2a5,_0x5a9c69){return _0x4de2a5(_0x5a9c69);},'ddFzb':function(_0x51aeeb,_0x12fa20,_0x5307c8){return _0x51aeeb(_0x12fa20,_0x5307c8);},'xpitb':function(_0xc2d599,_0x54d5c0){return _0xc2d599(_0x54d5c0);},'LqauS':function(_0x3b9252,_0x2bb3cb,_0x550fe1){return _0x3b9252(_0x2bb3cb,_0x550fe1);},'mRyFF':function(_0x251a7f,_0x26bca1){return _0x251a7f(_0x26bca1);},'vxTRG':function(_0xa14df4,_0x34890c){return _0xa14df4+_0x34890c;},'SOxbU':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','UoGXR':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','qgPUt':function(_0x102ab6,_0x1ac9d2){return _0x102ab6(_0x1ac9d2);},'mEYuq':function(_0x3a1e02,_0x26117b){return _0x3a1e02&&_0x26117b;}},_0x3dc97c=_0x5ed176['profile'];let _0x5e3d1c=_0x3dc97c,_0x5b328b=null;const _0x3aa820=_0x3dc97c?null:await _0x9a9f06['mEEAg'](readActiveProfileName);if(_0x5ed176[_0xc38927(0x1b0)]&&_0x3dc97c)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x5ed176[_0xc38927(0x1b0)]+'\x22\x20is\x20ignored\x20when\x20--profile\x20is\x20set;\x20the\x20profile\x27s\x20own\x20auth\x20environment\x20applies.');else _0x5ed176['authEnv']&&!process[_0xc38927(0x194)]['RANGER_TEST_USERNAME']&&console[_0xc38927(0x1b9)]('\x20\x20Note:\x20--env\x20\x22'+_0x5ed176['authEnv']+_0xc38927(0x1c2));if(!_0x3dc97c&&process[_0xc38927(0x194)][_0xc38927(0x1c3)])try{const _0x2acc93=await _0x9a9f06[_0xc38927(0x1ab)](resolveAdHocProfile,{'targetUrl':_0x5ed176[_0xc38927(0x1a7)]??readUrlEnvVars()['envBaseUrl'],'envKey':_0x5ed176[_0xc38927(0x1b0)]});_0x2acc93&&(_0x3aa820&&_0x9a9f06[_0xc38927(0x189)](_0x3aa820,_0x2acc93['name'])&&console[_0xc38927(0x1b9)](_0xc38927(0x1ac)+_0x2acc93['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x3aa820+'\x22.\x20Pass\x20--profile\x20'+_0x3aa820+_0xc38927(0x1b4)),_0x5e3d1c=_0x2acc93[_0xc38927(0x197)],_0x5b328b=_0x2acc93['profile']);}catch(_0x537784){if(!_0x3aa820||_0x5ed176['authEnv'])throw _0x537784;console[_0xc38927(0x1b9)]('\x20\x20Warning:\x20'+(_0x9a9f06[_0xc38927(0x1ae)](_0x537784,Error)?_0x537784[_0xc38927(0x1a2)]:_0x9a9f06[_0xc38927(0x1ab)](String,_0x537784))),console['log']('\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22'+_0x3aa820+'\x22.');}if(!_0x5e3d1c)_0x5e3d1c=_0x9a9f06[_0xc38927(0x18d)](_0x3aa820,undefined);if(!_0x5e3d1c)try{const _0x1d74fc=await listCloudProfiles();if(_0x9a9f06[_0xc38927(0x1c4)](_0x1d74fc[_0xc38927(0x18f)],0x1)){const _0xdcdf15=_0x1d74fc[0x0];_0x5e3d1c=_0xdcdf15[_0xc38927(0x197)],console['log'](_0xc38927(0x1aa)+_0xdcdf15['name']),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x5e3d1c)throw new Error(_0x9a9f06[_0xc38927(0x1a1)](_0xc38927(0x1b7)+_0xc38927(0x1b6)+_0x9a9f06['yLbjA']+_0x9a9f06[_0xc38927(0x1b5)],_0x9a9f06['orVvd']));const _0x287b0b=getEnvDir(_0x5e3d1c),_0x5e898e=_0x9a9f06['Qrmkw'](existsSync,_0x287b0b);let _0x4c3b3d=_0x5b328b,_0x1a1190=![];if(!_0x4c3b3d)try{_0x4c3b3d=await _0x9a9f06['cCZrb'](fetchCloudProfile,_0x5e3d1c);if(!_0x4c3b3d)_0x1a1190=!![];}catch(_0x35522a){_0x9a9f06[_0xc38927(0x1c1)](_0x35522a,ApiError)&&_0x35522a['status']===0x194&&(_0x1a1190=!![]);}if(_0x3dc97c&&_0x1a1190&&!_0x5e898e&&!_0x4c3b3d)throw new Error('Profile\x20\x22'+_0x3dc97c+_0xc38927(0x193)+_0xc38927(0x1af)+_0x9a9f06[_0xc38927(0x1ad)]);if(_0x4c3b3d&&_0x5e898e){let _0x108588=!![];if(_0x9a9f06['mEEAg'](isInteractive)){const {source:_0x15ce2b}=await _0x596ed5[_0xc38927(0x1b8)]([{'type':_0x9a9f06[_0xc38927(0x1c9)],'name':'source','message':'Profile\x20\x22'+_0x5e3d1c+_0xc38927(0x196),'choices':[{'name':_0xc38927(0x19f),'value':'cloud'},{'name':_0x9a9f06['RCyOl'],'value':_0xc38927(0x190)}],'default':'cloud'}]);_0x108588=_0x15ce2b===_0x9a9f06[_0xc38927(0x18e)];}if(!_0x108588)_0x4c3b3d=null;}const _0x5499d5=readProfileOverrides(process['cwd'](),_0x5e3d1c);let _0x3ebf51=null,_0x1023c2,_0x5ead97,_0x2f40dc,_0x28d5d9,_0x592179=null,_0x48f25d,_0x5114f3;const _0x41839e=_0x9a9f06[_0xc38927(0x1c6)](expandOverrides,_0x5499d5),_0x317118=_0x9a9f06[_0xc38927(0x195)](readUrlEnvVars);if(_0x4c3b3d){_0x3ebf51=_0x4c3b3d;const _0x37f96e=_0x4c3b3d['settings']??{},_0x23a4b5=_0x9a9f06['hlgjk'](mergeCloudProfileSettings,_0x37f96e,_0x5499d5??undefined),_0x360559={..._0x4c3b3d,'settings':_0x23a4b5};_0x592179={'baseUrl':expandString(_0x37f96e[_0xc38927(0x1a7)]),'startPath':_0x9a9f06['hxKRw'](expandString,_0x37f96e['startPath'])};const _0x311869=await _0x9a9f06['mEEAg'](fetchAuthConfig),_0x348a09=_0x311869?_0x9a9f06['ddFzb'](resolveAuthEnvironmentLocally,_0x311869,_0x4c3b3d[_0xc38927(0x1c0)]):null;_0x48f25d=_0x348a09?.[_0xc38927(0x19b)]?.[0x0],_0x5114f3=_0x348a09?.[_0xc38927(0x1a9)];const _0x125cc9=_0x9a9f06['xpitb'](resolveProfileUrl,{'flagBaseUrl':_0x5ed176[_0xc38927(0x1a7)],'flagStartPath':_0x5ed176['startPath'],'envBaseUrl':_0x317118[_0xc38927(0x19c)],'envStartPath':_0x317118['envStartPath'],'projectOverrides':_0x41839e,'cloudSettings':_0x592179,'authEnvironmentDomain':_0x48f25d}),_0x58222b=process[_0xc38927(0x194)][_0xc38927(0x19e)];if(_0x58222b){if(!_0x9a9f06[_0xc38927(0x1c5)](existsSync,_0x58222b))throw new Error(_0xc38927(0x19a)+_0x58222b+_0xc38927(0x18a));_0x1023c2=_0x58222b,_0x5ead97=resolveEnvVars(_0x23a4b5),_0x2f40dc=Boolean(_0x5ead97['cdpEndpoint']);}else{const _0x25185a=await _0x9a9f06['LqauS'](resolveCloudProfileSession,_0x360559,{'effectiveBaseUrl':_0x125cc9['baseUrl'],'telemetry':_0x5ed176['telemetry']});_0x1023c2=_0x25185a['authPath'],_0x5ead97=_0x9a9f06['mRyFF'](resolveEnvVars,_0x25185a[_0xc38927(0x1a4)]),_0x2f40dc=Boolean(_0x5ead97[_0xc38927(0x1a3)]),_0x48f25d=_0x25185a['resolvedEnv']?.['domains']?.[0x0],_0x5114f3=_0x25185a['resolvedEnv']?.['key'];}}else{if(!_0x5e898e){const _0xe7c697=!_0x3dc97c;throw new Error(_0xe7c697?_0x9a9f06[_0xc38927(0x199)](_0x9a9f06['vxTRG']('Active\x20profile\x20\x22'+_0x5e3d1c+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a'+_0x9a9f06[_0xc38927(0x188)],_0x9a9f06['UoGXR']),'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20'+_0x5e3d1c+'`\x20to\x20recreate\x20it.'):'Profile\x20\x22'+_0x5e3d1c+_0xc38927(0x1b1)+_0x5e3d1c);}const _0x1548f7=await loadSettings(_0x5e3d1c);_0x5ead97=resolveEnvVars(_0x1548f7),_0x2f40dc=_0x9a9f06['qgPUt'](Boolean,_0x5ead97['cdpEndpoint']),_0x28d5d9=_0x5ead97['baseUrl'];}const _0x462602=resolveProfileUrl({'flagBaseUrl':_0x5ed176[_0xc38927(0x1a7)],'flagStartPath':_0x5ed176['startPath'],'envBaseUrl':_0x317118[_0xc38927(0x19c)],'envStartPath':_0x317118[_0xc38927(0x1b2)],'localSettingsBaseUrl':_0x28d5d9,'projectOverrides':_0x41839e,'cloudSettings':_0x592179,'authEnvironmentDomain':_0x48f25d}),_0x5b8e34=_0x462602['url']??_0x462602['baseUrl'];if(_0x9a9f06[_0xc38927(0x1be)](!_0x5b8e34,!_0x2f40dc))throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x5e3d1c+_0xc38927(0x1a6)+_0x5e3d1c+'\x20baseUrl\x20<url>');return{'activeProfile':_0x5e3d1c,'resolvedCloudProfile':_0x3ebf51,'cloudAuthPath':_0x1023c2,'resolvedSettings':_0x5ead97,'isCdpMode':_0x2f40dc,'url':_0x5b8e34,'baseUrlSource':_0x462602[_0xc38927(0x1a8)],'authEnvKey':_0x5114f3,'startPath':_0x462602['startPath']};}function expandString(_0x1d51fa){const _0x53438e=_0x30e7,_0x564424={'EVOUh':'string','aMzIS':function(_0x5f4aa1,_0x410016){return _0x5f4aa1(_0x410016);}};if(typeof _0x1d51fa!==_0x564424[_0x53438e(0x18b)])return _0x1d51fa;return _0x564424['aMzIS'](resolveEnvVars,_0x1d51fa);}function expandOverrides(_0x2c4d26){const _0x3084df=_0x30e7,_0x155590={'ZQlmE':function(_0x5bf425,_0x4a13ed){return _0x5bf425===_0x4a13ed;},'CLTgw':'string','zOKfF':function(_0x2b5239,_0x6ac11f){return _0x2b5239===_0x6ac11f;},'EbXWS':function(_0xdbb84d,_0x3dab4b){return _0xdbb84d(_0x3dab4b);}};if(!_0x2c4d26)return _0x2c4d26;const _0x143c65={..._0x2c4d26};return _0x155590['ZQlmE'](typeof _0x143c65[_0x3084df(0x1a7)],_0x155590['CLTgw'])&&(_0x143c65[_0x3084df(0x1a7)]=resolveEnvVars(_0x143c65[_0x3084df(0x1a7)])),_0x155590['zOKfF'](typeof _0x143c65[_0x3084df(0x1b3)],_0x155590['CLTgw'])&&(_0x143c65['startPath']=_0x155590['EbXWS'](resolveEnvVars,_0x143c65['startPath'])),_0x143c65;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x205a3c=_0x5c61;(function(_0x47c7e0,_0x53d5bf){const _0x49a6e0=_0x5c61,_0x18b689=_0x47c7e0();while(!![]){try{const _0x54d73f=parseInt(_0x49a6e0(0x184))/0x1*(parseInt(_0x49a6e0(0x188))/0x2)+parseInt(_0x49a6e0(0x180))/0x3+-parseInt(_0x49a6e0(0x18c))/0x4+-parseInt(_0x49a6e0(0x17a))/0x5*(-parseInt(_0x49a6e0(0x191))/0x6)+-parseInt(_0x49a6e0(0x189))/0x7*(-parseInt(_0x49a6e0(0x185))/0x8)+-parseInt(_0x49a6e0(0x178))/0x9+-parseInt(_0x49a6e0(0x179))/0xa*(-parseInt(_0x49a6e0(0x192))/0xb);if(_0x54d73f===_0x53d5bf)break;else _0x18b689['push'](_0x18b689['shift']());}catch(_0x2600ca){_0x18b689['push'](_0x18b689['shift']());}}}(_0xe92a,0xaf3ff));function firstDefined(..._0x2f863f){const _0x1222ca=_0x5c61,_0x9ebcff={'OPrJj':function(_0xf497a5,_0x3c612a){return _0xf497a5!==_0x3c612a;}};for(const _0x6b4710 of _0x2f863f){if(_0x9ebcff['OPrJj'](_0x6b4710,undefined)&&_0x9ebcff[_0x1222ca(0x17c)](_0x6b4710,null)&&_0x9ebcff[_0x1222ca(0x17c)](_0x6b4710,''))return _0x6b4710;}return undefined;}function _0xe92a(){const _0x18a400=['cloudSettings','QnNie','DRTMt','VUncN','hJgxh','Veqaa','env','11110086TibnOG','10oYcxnn','350255LBdleO','--base-url','OPrJj','flagBaseUrl','TYsJT','RANGER_BASE_URL','378663LHlErE','qTWwG','vegRN','startPath','58371BgUeYm','312WFBbbA','MuEAA','gOHGu','38okgSvd','1561smDiDT','string','slice','3469868upmoUq','baseUrl','envStartPath','endsWith','Sdzze','60uGMhpX','9627937LuYCgl','projectOverrides','test'];_0xe92a=function(){return _0x18a400;};return _0xe92a();}function normalizeAuthEnvironmentDomain(_0x5a6ade){const _0x19e8a2=_0x5c61;if(!_0x5a6ade)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x19e8a2(0x194)](_0x5a6ade))return _0x5a6ade;return'https://'+_0x5a6ade;}function _0x5c61(_0x201911,_0x138965){_0x201911=_0x201911-0x173;const _0xe92a5c=_0xe92a();let _0x5c61e9=_0xe92a5c[_0x201911];return _0x5c61e9;}export function resolveBaseUrlWithSource(_0x1bc28a){const _0x26838a=_0x5c61,_0x5b4abb={'qTWwG':function(_0x44d679,_0x6af1c9){return _0x44d679 in _0x6af1c9;},'hJgxh':_0x26838a(0x18d),'KZMTz':function(_0x4c5305,_0xb4bb77){return _0x4c5305===_0xb4bb77;},'Sdzze':_0x26838a(0x17b),'VUncN':'local\x20profile\x20settings','TYsJT':function(_0x2f94c0,_0x3ad2f8){return _0x2f94c0===_0x3ad2f8;},'VsPCf':function(_0x34d8b2,_0x301110){return _0x34d8b2(_0x301110);},'MuEAA':'auth\x20environment\x20domain','DRTMt':function(_0x249193,_0xdd0e75){return _0x249193!==_0xdd0e75;}},_0x38611b=_0x1bc28a[_0x26838a(0x193)],_0x1c8a70=!!_0x38611b&&_0x5b4abb[_0x26838a(0x181)](_0x5b4abb[_0x26838a(0x175)],_0x38611b),_0x1c80fb=_0x38611b?.['baseUrl'],_0x461079=!(_0x1c8a70&&_0x5b4abb['KZMTz'](_0x1c80fb,null)),_0x257ac6=[[_0x1bc28a[_0x26838a(0x17d)],_0x5b4abb[_0x26838a(0x190)]],[_0x1bc28a['envBaseUrl'],_0x26838a(0x17f)],[_0x1bc28a['localSettingsBaseUrl'],_0x5b4abb[_0x26838a(0x174)]],[_0x5b4abb[_0x26838a(0x17e)](typeof _0x1c80fb,'string')?_0x1c80fb:undefined,'projects.json\x20override'],[_0x461079?_0x1bc28a['cloudSettings']?.[_0x26838a(0x18d)]:undefined,'cloud\x20profile\x20settings'],[_0x461079?_0x5b4abb['VsPCf'](normalizeAuthEnvironmentDomain,_0x1bc28a['authEnvironmentDomain']):undefined,_0x5b4abb[_0x26838a(0x186)]]];for(const [_0x26c7e9,_0x2756f8]of _0x257ac6){if(_0x5b4abb[_0x26838a(0x173)](_0x26c7e9,undefined)&&_0x26c7e9!==null&&_0x5b4abb['DRTMt'](_0x26c7e9,''))return{'baseUrl':_0x26c7e9,'source':_0x2756f8};}return{};}export function resolveBaseUrl(_0x1d38fc){return resolveBaseUrlWithSource(_0x1d38fc)['baseUrl'];}export function resolveStartPath(_0x5bdc28){const _0x430873=_0x5c61,_0x542c8a={'gOHGu':function(_0x5be180,_0x1bd9be){return _0x5be180 in _0x1bd9be;},'QnNie':function(_0x19139c,_0x20539f){return _0x19139c===_0x20539f;},'fgQML':function(_0x47a7a7,_0x57e8a3,_0x31b352,_0x26f91b,_0x22f84c){return _0x47a7a7(_0x57e8a3,_0x31b352,_0x26f91b,_0x22f84c);},'CAheV':function(_0x1333a9,_0x5a3bc3){return _0x1333a9===_0x5a3bc3;},'Veqaa':_0x430873(0x18a)},_0xc5e179=_0x5bdc28['projectOverrides'],_0x3cb9ff=!!_0xc5e179&&_0x542c8a[_0x430873(0x187)](_0x430873(0x183),_0xc5e179),_0x50dc1b=_0xc5e179?.[_0x430873(0x183)],_0x37613f=!(_0x3cb9ff&&_0x542c8a[_0x430873(0x196)](_0x50dc1b,null));return _0x542c8a['fgQML'](firstDefined,_0x5bdc28['flagStartPath'],_0x5bdc28[_0x430873(0x18e)],_0x542c8a['CAheV'](typeof _0x50dc1b,_0x542c8a[_0x430873(0x176)])?_0x50dc1b:undefined,_0x37613f?_0x5bdc28[_0x430873(0x195)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x1ae626,_0x58e50a){const _0x3d7a01=_0x5c61,_0x18e9ff={'uGbrK':function(_0x3c7716,_0xf599de){return _0x3c7716+_0xf599de;}};if(!_0x1ae626)return undefined;if(!_0x58e50a)return _0x1ae626;const _0x1a00c0=_0x1ae626[_0x3d7a01(0x18f)]('/')?_0x1ae626[_0x3d7a01(0x18b)](0x0,-0x1):_0x1ae626,_0x37ab7a=_0x58e50a['startsWith']('/')?_0x58e50a:'/'+_0x58e50a;return _0x18e9ff['uGbrK'](_0x1a00c0,_0x37ab7a);}export function resolveProfileUrl(_0x5a5544){const _0x397d07=_0x5c61,_0x9d2f62={'oxUaa':function(_0x353d00,_0x5b01f2){return _0x353d00(_0x5b01f2);},'vegRN':function(_0x3633e8,_0x587e0b){return _0x3633e8(_0x587e0b);},'GsbfX':function(_0x26df8d,_0x2bc624,_0x2cbd6b){return _0x26df8d(_0x2bc624,_0x2cbd6b);}},{baseUrl:_0x96a565,source:_0x1b7f29}=_0x9d2f62['oxUaa'](resolveBaseUrlWithSource,_0x5a5544),_0x1a5937=_0x9d2f62[_0x397d07(0x182)](resolveStartPath,_0x5a5544);return{'baseUrl':_0x96a565,'baseUrlSource':_0x1b7f29,'startPath':_0x1a5937,'url':_0x9d2f62['GsbfX'](joinBaseAndPath,_0x96a565,_0x1a5937)};}export function readUrlEnvVars(_0x490dda=process[_0x205a3c(0x177)]){const _0x1ac4f4=_0x205a3c;return{'envBaseUrl':_0x490dda[_0x1ac4f4(0x17f)],'envStartPath':_0x490dda['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x38fd(_0x1fb596,_0x4f5038){_0x1fb596=_0x1fb596-0xbb;const _0xa85864=_0xa858();let _0x38fdc1=_0xa85864[_0x1fb596];return _0x38fdc1;}(function(_0x45f8f1,_0x503e66){const _0x45f1c3=_0x38fd,_0x5d1c1c=_0x45f8f1();while(!![]){try{const _0x280801=-parseInt(_0x45f1c3(0xbe))/0x1*(parseInt(_0x45f1c3(0xbb))/0x2)+-parseInt(_0x45f1c3(0xc6))/0x3*(parseInt(_0x45f1c3(0xc2))/0x4)+-parseInt(_0x45f1c3(0xc3))/0x5+-parseInt(_0x45f1c3(0xbf))/0x6+-parseInt(_0x45f1c3(0xc0))/0x7+parseInt(_0x45f1c3(0xc4))/0x8+parseInt(_0x45f1c3(0xc1))/0x9;if(_0x280801===_0x503e66)break;else _0x5d1c1c['push'](_0x5d1c1c['shift']());}catch(_0x47486c){_0x5d1c1c['push'](_0x5d1c1c['shift']());}}}(_0xa858,0x81391));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x166c3e,_0xec4692){const _0x2c9f1f=_0x38fd,_0x225f13={'lFtIk':function(_0x24b3ba){return _0x24b3ba();}},_0x43e0b7=_0xec4692?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x325142=_0xec4692?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0xd9ef0;for(let _0x299fca=0x0;_0x299fca<=_0x43e0b7;_0x299fca++){try{return await _0x225f13['lFtIk'](_0x166c3e);}catch(_0x5188be){_0xd9ef0=_0x5188be instanceof Error?_0x5188be:new Error(String(_0x5188be));if(_0x299fca<_0x43e0b7){const _0x12ec4d=_0x325142*Math[_0x2c9f1f(0xc5)](0x2,_0x299fca);_0xec4692?.[_0x2c9f1f(0xbd)]&&console[_0x2c9f1f(0xbc)](_0xec4692['label']+'\x20failed\x20(attempt\x20'+(_0x299fca+0x1)+'/'+(_0x43e0b7+0x1)+'),\x20retrying\x20in\x20'+_0x12ec4d+'ms...'),await new Promise(_0x4c20c9=>setTimeout(_0x4c20c9,_0x12ec4d));}}}throw _0xd9ef0;}function _0xa858(){const _0x1d3435=['label','1aOZwVO','827712uyelcP','4746007SaSjzT','25968510LXqZQX','52gNsZqm','4235230PjDubE','5853704twTubM','pow','99684RSWURI','1985686ypBZQc','error'];_0xa858=function(){return _0x1d3435;};return _0xa858();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f1192,_0x380822){const _0x969c84=_0x5e1c,_0x4d5c41=_0x1f1192();while(!![]){try{const _0x54d7fb=parseInt(_0x969c84(0x15c))/0x1+-parseInt(_0x969c84(0x157))/0x2*(-parseInt(_0x969c84(0x158))/0x3)+-parseInt(_0x969c84(0x15b))/0x4+-parseInt(_0x969c84(0x159))/0x5*(parseInt(_0x969c84(0x15a))/0x6)+-parseInt(_0x969c84(0x15f))/0x7+parseInt(_0x969c84(0x155))/0x8+-parseInt(_0x969c84(0x15d))/0x9*(-parseInt(_0x969c84(0x160))/0xa);if(_0x54d7fb===_0x380822)break;else _0x4d5c41['push'](_0x4d5c41['shift']());}catch(_0x1f0636){_0x4d5c41['push'](_0x4d5c41['shift']());}}}(_0x2ce9,0x3eb35));function _0x2ce9(){const _0x334a16=['10cAFnSW','add','origin','785384XSQUNP','replace','306082mkKJym','9vfLoWv','1409935zbChwE','6YYjLFh','1930016ppGVad','444915VSqyjC','3266208GZxeRt','matchAll','2406677TobcQg'];_0x2ce9=function(){return _0x334a16;};return _0x2ce9();}function _0x5e1c(_0x1501b0,_0x5cb005){_0x1501b0=_0x1501b0-0x153;const _0x2ce97f=_0x2ce9();let _0x5e1c83=_0x2ce97f[_0x1501b0];return _0x5e1c83;}const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x4163a5){const _0x5bdfca=_0x5e1c,_0x155ca7=new Set();for(const _0x47f897 of _0x4163a5[_0x5bdfca(0x15e)](ABSOLUTE_URL_PATTERN)){const _0x57344b=_0x47f897[0x0][_0x5bdfca(0x156)](/[.,;:!?]+$/,'');try{_0x155ca7[_0x5bdfca(0x153)](new URL(_0x57344b)[_0x5bdfca(0x154)]);}catch{}}return[..._0x155ca7];}export function findScenarioOriginMismatches(_0x3a59be,_0x1c0b2e){const _0x4ea0eb=_0x5e1c;let _0x541982;try{_0x541982=new URL(_0x1c0b2e)[_0x4ea0eb(0x154)];}catch{return[];}return extractUrlOrigins(_0x3a59be)['filter'](_0x2d113e=>_0x2d113e!==_0x541982);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4a0eb1=_0x59d8;(function(_0x22ba60,_0x30563f){const _0x3905ff=_0x59d8,_0x271818=_0x22ba60();while(!![]){try{const _0x3a5357=parseInt(_0x3905ff(0xd3))/0x1+parseInt(_0x3905ff(0xbd))/0x2*(-parseInt(_0x3905ff(0xe0))/0x3)+-parseInt(_0x3905ff(0xd5))/0x4*(parseInt(_0x3905ff(0xdd))/0x5)+-parseInt(_0x3905ff(0xc9))/0x6+parseInt(_0x3905ff(0xd7))/0x7*(-parseInt(_0x3905ff(0xc0))/0x8)+parseInt(_0x3905ff(0xe1))/0x9+parseInt(_0x3905ff(0xda))/0xa*(parseInt(_0x3905ff(0xbf))/0xb);if(_0x3a5357===_0x30563f)break;else _0x271818['push'](_0x271818['shift']());}catch(_0x3a5cdc){_0x271818['push'](_0x271818['shift']());}}}(_0x6f9b,0xe848b));import*as _0x37d86c from'fs';import*as _0x24e9b6 from'path';import*as _0x1bd21b from'os';import{execSync}from'child_process';const CACHE_FILE=_0x24e9b6['join'](_0x1bd21b['homedir'](),'.claude',_0x4a0eb1(0xcf));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x210f2b=_0x4a0eb1,_0x28177d={'CKpDP':_0x210f2b(0xe2),'piBvJ':function(_0x1596f4){return _0x1596f4();}};try{if(_0x37d86c[_0x210f2b(0xc5)](CACHE_FILE)){const _0x230b27=JSON[_0x210f2b(0xd2)](_0x37d86c[_0x210f2b(0xbc)](CACHE_FILE,_0x28177d['CKpDP']));return{'version':0x3,'sessions':_0x230b27['sessions']||{},'branches':_0x230b27['branches']||{},'lastEnabledSessionClearedAt':_0x230b27[_0x210f2b(0xce)]};}}catch{}return _0x28177d[_0x210f2b(0xe7)](createEmptyCache);}function saveCache(_0x2e1b9b){const _0x3a0d57=_0x4a0eb1;try{const _0x501d69=_0x24e9b6[_0x3a0d57(0xba)](CACHE_FILE);!_0x37d86c[_0x3a0d57(0xc5)](_0x501d69)&&_0x37d86c['mkdirSync'](_0x501d69,{'recursive':!![]}),_0x37d86c[_0x3a0d57(0xdb)](CACHE_FILE,JSON['stringify'](_0x2e1b9b,null,0x2));}catch{}}export function getCurrentBranch(){const _0x36ce5c=_0x4a0eb1,_0x464688={'Zmpjx':'utf-8','VTXNc':_0x36ce5c(0xd1),'odiPD':function(_0x1d1658,_0x5f59a0){return _0x1d1658===_0x5f59a0;}};try{const _0x4ed910=execSync(_0x36ce5c(0xef),{'encoding':_0x464688[_0x36ce5c(0xe6)],'stdio':[_0x464688[_0x36ce5c(0xd4)],_0x464688['VTXNc'],_0x464688['VTXNc']]})['trim']();if(!_0x4ed910||_0x464688[_0x36ce5c(0xd6)](_0x4ed910,_0x36ce5c(0xdc)))return null;return _0x4ed910;}catch{return null;}}export function enableBranch(_0x40399f){const _0x39d88c={'ekdAp':function(_0x1e99a0){return _0x1e99a0();},'VETBe':function(_0x54d697,_0xf6f7c7){return _0x54d697(_0xf6f7c7);}},_0x17d448=_0x39d88c['ekdAp'](loadCache);_0x17d448['branches'][_0x40399f]=!![],_0x39d88c['VETBe'](saveCache,_0x17d448);}function _0x6f9b(){const _0x31027a=['vhjQA','pipe','parse','1253508AeNmhw','VTXNc','12YAByLJ','odiPD','35PTbWtO','TNVLS','flrBV','85350qUTWaP','writeFileSync','HEAD','1207060ijzqfv','LFhMA','zerPN','6uZFpCv','1036422AhTIWX','utf-8','branches','DIqeS','oQViH','Zmpjx','piBvJ','featureId','SSWFP','dPwSA','master','HviBS','hddza','ULxBA','git\x20rev-parse\x20--abbrev-ref\x20HEAD','main','VXWUD','registeredAt','dirname','sessions','readFileSync','928022YkISkm','ymrLD','3641ZiHFky','1931928ASRnAb','DbyJo','qRTeH','cWUaC','wHcvO','existsSync','bXKHH','enabled','clear','2295618kcnZNo','icdsQ','currentBranch','OHWmC','agQek','lastEnabledSessionClearedAt','.ranger_cache.json'];_0x6f9b=function(){return _0x31027a;};return _0x6f9b();}export function disableBranch(_0x30308c){const _0x331e33={'UDUUJ':function(_0x285f06){return _0x285f06();}},_0x9715a4=_0x331e33['UDUUJ'](loadCache);delete _0x9715a4['branches'][_0x30308c],saveCache(_0x9715a4);}function _0x59d8(_0x4720bf,_0x58352e){_0x4720bf=_0x4720bf-0xba;const _0x6f9b15=_0x6f9b();let _0x59d8f8=_0x6f9b15[_0x4720bf];return _0x59d8f8;}export function isBranchEnabled(_0x510c3f){const _0x292e67=_0x4a0eb1,_0x13af0d=loadCache();return _0x13af0d[_0x292e67(0xe3)][_0x510c3f]===!![];}function getOrCreateSession(_0x4f1617,_0xe621ec){const _0xad18ff=_0x4a0eb1;return!_0x4f1617['sessions'][_0xe621ec]&&(_0x4f1617[_0xad18ff(0xbb)][_0xe621ec]={}),_0x4f1617['sessions'][_0xe621ec];}export function enableSession(_0x25c55c){const _0x2bdacf=_0x4a0eb1,_0x42e8e8={'QCjgE':function(_0x5343ac,_0x106204){return _0x5343ac!==_0x106204;},'aVpur':'main','SGSZx':function(_0x11b0ed,_0x134c6a){return _0x11b0ed!==_0x134c6a;},'dPwSA':function(_0x173b40,_0x28796d){return _0x173b40(_0x28796d);}},_0x599ccf=loadCache(),_0xe857cb=getOrCreateSession(_0x599ccf,_0x25c55c);_0xe857cb[_0x2bdacf(0xc7)]=!![];const _0x402ca3=getCurrentBranch();_0x402ca3&&_0x42e8e8['QCjgE'](_0x402ca3,_0x42e8e8['aVpur'])&&_0x42e8e8['SGSZx'](_0x402ca3,_0x2bdacf(0xeb))&&(_0x599ccf[_0x2bdacf(0xe3)][_0x402ca3]=!![],_0xe857cb[_0x2bdacf(0xcb)]=_0x402ca3),_0x42e8e8[_0x2bdacf(0xea)](saveCache,_0x599ccf);}export function isSessionEnabled(_0x5c102f){const _0x2e9e4a=_0x4a0eb1,_0x3938cc={'OHWmC':_0x2e9e4a(0xf0),'WZqfh':function(_0x1d3659,_0x38596f){return _0x1d3659===_0x38596f;},'TNVLS':'master','agQek':function(_0x26d34c,_0x2c37dd){return _0x26d34c===_0x2c37dd;},'ymrLD':function(_0x2eb4d5,_0x2cf3ca){return _0x2eb4d5===_0x2cf3ca;}},_0x1e6810=loadCache(),_0x499756=getCurrentBranch();if(!_0x499756||_0x499756===_0x3938cc[_0x2e9e4a(0xcc)]||_0x3938cc['WZqfh'](_0x499756,_0x3938cc[_0x2e9e4a(0xd8)]))return _0x3938cc[_0x2e9e4a(0xcd)](_0x1e6810['sessions'][_0x5c102f]?.['enabled'],!![]);const _0x38983b=_0x3938cc[_0x2e9e4a(0xbe)](_0x1e6810['branches'][_0x499756],!![]),_0x36eed1=_0x3938cc['agQek'](_0x1e6810['sessions'][_0x5c102f]?.[_0x2e9e4a(0xc7)],!![]);return _0x38983b||_0x36eed1;}export function disableSession(_0x49c991){const _0x569743=_0x4a0eb1,_0x41aeb0={'ULxBA':function(_0x211fa0,_0x198fee,_0x48b6a0){return _0x211fa0(_0x198fee,_0x48b6a0);},'DbyJo':function(_0x59a410,_0x1f4ab9){return _0x59a410(_0x1f4ab9);}},_0x3306ed=loadCache(),_0xe12cd0=_0x41aeb0[_0x569743(0xee)](getOrCreateSession,_0x3306ed,_0x49c991);_0xe12cd0['enabled']=![],_0x41aeb0[_0x569743(0xc1)](saveCache,_0x3306ed);}export function updateBranchTracking(_0x516469){const _0x1276de=_0x4a0eb1,_0x215664={'tRayq':function(_0x17d2bf){return _0x17d2bf();},'vhjQA':_0x1276de(0xf0)},_0x1213e7=_0x215664['tRayq'](loadCache),_0x138a41=_0x1213e7[_0x1276de(0xbb)][_0x516469];if(!_0x138a41?.['enabled'])return;const _0x3a6d9e=getCurrentBranch();if(!_0x3a6d9e||_0x3a6d9e===_0x215664[_0x1276de(0xd0)]||_0x3a6d9e==='master')return;_0x138a41[_0x1276de(0xcb)]!==_0x3a6d9e&&(_0x1213e7['branches'][_0x3a6d9e]=!![],_0x138a41['currentBranch']=_0x3a6d9e,saveCache(_0x1213e7));}export function initBranchTracking(_0x1d1eaa){const _0x108c2e=_0x4a0eb1,_0x55a9aa={'wHcvO':function(_0x3f29c1){return _0x3f29c1();},'jAOEh':function(_0x1e5ab5,_0xce4b7c){return _0x1e5ab5===_0xce4b7c;},'HviBS':'master','VBEkQ':function(_0x270680,_0x370c27,_0x4fc49f){return _0x270680(_0x370c27,_0x4fc49f);},'jePPE':function(_0x165b28,_0x4f9f15){return _0x165b28(_0x4f9f15);}},_0x247df5=_0x55a9aa[_0x108c2e(0xc4)](loadCache),_0x75c6a3=getCurrentBranch();if(!_0x75c6a3||_0x55a9aa['jAOEh'](_0x75c6a3,'main')||_0x75c6a3===_0x55a9aa[_0x108c2e(0xec)])return;if(_0x247df5['branches'][_0x75c6a3]===!![]){const _0x272f43=_0x55a9aa['VBEkQ'](getOrCreateSession,_0x247df5,_0x1d1eaa);_0x272f43['enabled']=!![],_0x272f43[_0x108c2e(0xcb)]=_0x75c6a3,_0x55a9aa['jePPE'](saveCache,_0x247df5);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x25a6f8){const _0x36a1e4=_0x4a0eb1,_0x3467f1=loadCache(),_0x45d2cd=_0x3467f1[_0x36a1e4(0xbb)][_0x25a6f8];_0x45d2cd?.['enabled']&&(_0x3467f1['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x3467f1));}export function shouldAutoEnableAfterClear(_0x557cb1){const _0x31cdeb=_0x4a0eb1,_0x128657={'qRTeH':function(_0x4d4fbb,_0x2b930a){return _0x4d4fbb!==_0x2b930a;},'kFTTY':_0x31cdeb(0xc8)};if(_0x128657[_0x31cdeb(0xc2)](_0x557cb1,_0x128657['kFTTY']))return![];const _0x556a7c=loadCache(),_0x45ceb0=_0x556a7c[_0x31cdeb(0xce)];if(!_0x45ceb0)return![];const _0x5c9473=Date['now']()-_0x45ceb0;return _0x5c9473<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x4c882b){const _0x599e97=_0x4a0eb1,_0x5a89a4={'VXWUD':function(_0x11fc9e){return _0x11fc9e();},'ZDERD':function(_0xfad2f8,_0x418be8,_0x54b6b3){return _0xfad2f8(_0x418be8,_0x54b6b3);},'eLsfs':function(_0x3953bf,_0x6d4b2d){return _0x3953bf!==_0x6d4b2d;},'SSWFP':'master'},_0x154d30=_0x5a89a4[_0x599e97(0xf1)](loadCache),_0x1c1d21=_0x5a89a4['ZDERD'](getOrCreateSession,_0x154d30,_0x4c882b);_0x1c1d21[_0x599e97(0xc7)]=!![];const _0x5588cc=getCurrentBranch();_0x5588cc&&_0x5588cc!=='main'&&_0x5a89a4['eLsfs'](_0x5588cc,_0x5a89a4[_0x599e97(0xe9)])&&(_0x1c1d21[_0x599e97(0xcb)]=_0x5588cc),delete _0x154d30['lastEnabledSessionClearedAt'],saveCache(_0x154d30);}export function registerSession(_0x110512,_0x12ba5e){const _0x3d866c=_0x4a0eb1,_0xfa4fbc={'LFhMA':function(_0x188ded){return _0x188ded();},'zerPN':function(_0x58a851,_0x213c7b,_0x4342ab){return _0x58a851(_0x213c7b,_0x4342ab);}},_0x403315=_0xfa4fbc[_0x3d866c(0xde)](loadCache),_0xf65c38=_0xfa4fbc[_0x3d866c(0xdf)](getOrCreateSession,_0x403315,_0x110512);_0xf65c38['featureId']=_0x12ba5e,_0xf65c38[_0x3d866c(0xf2)]=new Date()['toISOString'](),saveCache(_0x403315);}export function getSessionEntry(_0x113219){const _0x324d1=_0x4a0eb1,_0x49f662=loadCache(),_0x2a0569=_0x49f662['sessions'][_0x113219];if(_0x2a0569?.[_0x324d1(0xe8)]&&_0x2a0569?.[_0x324d1(0xf2)])return{'featureId':_0x2a0569[_0x324d1(0xe8)],'registeredAt':_0x2a0569[_0x324d1(0xf2)]};return null;}export function unregisterSession(_0x56fb66){const _0x17a6de=_0x4a0eb1,_0x4c3f71={'oQViH':function(_0x2641eb){return _0x2641eb();},'cWUaC':function(_0x529fe1,_0x6b3b86){return _0x529fe1(_0x6b3b86);}},_0x14278f=_0x4c3f71[_0x17a6de(0xe5)](loadCache),_0xc7cf6a=_0x14278f['sessions'][_0x56fb66];_0xc7cf6a&&(delete _0xc7cf6a['featureId'],delete _0xc7cf6a[_0x17a6de(0xf2)],_0x4c3f71[_0x17a6de(0xc3)](saveCache,_0x14278f));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x105808){const _0x54e539=_0x4a0eb1,_0x2dc807={'icdsQ':function(_0x3ded97){return _0x3ded97();},'TrBqT':function(_0x23bd99,_0x31a1ec){return _0x23bd99-_0x31a1ec;},'zFfem':function(_0x5c770d,_0x454464){return _0x5c770d(_0x454464);}},_0x6a9d38=_0x2dc807[_0x54e539(0xca)](loadCache),_0x53bef7=getOrCreateSession(_0x6a9d38,_0x105808),_0x46fb3a=_0x53bef7['lastPlanReminderAt']||0x0,_0x396351=Date['now']();if(_0x2dc807['TrBqT'](_0x396351,_0x46fb3a)>=PLAN_REMINDER_INTERVAL_MS)return _0x53bef7['lastPlanReminderAt']=_0x396351,_0x2dc807['zFfem'](saveCache,_0x6a9d38),!![];return![];}export function shouldShowStopReminder(_0x36944f){const _0x4dbbe6=_0x4a0eb1,_0xafe411={'bXKHH':function(_0x396f0e,_0x4f14a1){return _0x396f0e-_0x4f14a1;},'YWWTN':function(_0x1791f7,_0x4ac2db){return _0x1791f7(_0x4ac2db);}},_0x460b79=loadCache(),_0x591c04=getOrCreateSession(_0x460b79,_0x36944f),_0x56c2a3=_0x591c04['lastStopReminderAt']||0x0,_0x54e468=Date['now']();if(_0xafe411[_0x4dbbe6(0xc6)](_0x54e468,_0x56c2a3)>=STOP_REMINDER_INTERVAL_MS)return _0x591c04['lastStopReminderAt']=_0x54e468,_0xafe411['YWWTN'](saveCache,_0x460b79),!![];return![];}export function hasSessionBeenPrompted(_0x2dc574){const _0x27aeb3=_0x4a0eb1,_0x1c2ced={'wdwMF':function(_0x4ffa35){return _0x4ffa35();},'hddza':function(_0x4ec9b9,_0x56dbda){return _0x4ec9b9===_0x56dbda;}},_0x29a609=_0x1c2ced['wdwMF'](loadCache);return _0x1c2ced[_0x27aeb3(0xed)](_0x29a609['sessions'][_0x2dc574]?.['prompted'],!![]);}export function markSessionPrompted(_0x5df6c8){const _0x59b255=_0x4a0eb1,_0x17710b={'flrBV':function(_0x20d6bd){return _0x20d6bd();},'DIqeS':function(_0x2a591b,_0x231a93){return _0x2a591b(_0x231a93);}},_0x49e505=_0x17710b[_0x59b255(0xd9)](loadCache),_0x587364=getOrCreateSession(_0x49e505,_0x5df6c8);_0x587364['prompted']=!![],_0x17710b[_0x59b255(0xe4)](saveCache,_0x49e505);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x344520=_0x1a0b;(function(_0x2f7497,_0x49e1d2){const _0x383a43=_0x1a0b,_0x4bdcf9=_0x2f7497();while(!![]){try{const _0x1f91d3=-parseInt(_0x383a43(0x86))/0x1*(-parseInt(_0x383a43(0xb1))/0x2)+parseInt(_0x383a43(0x90))/0x3+-parseInt(_0x383a43(0xaa))/0x4*(-parseInt(_0x383a43(0xa1))/0x5)+-parseInt(_0x383a43(0x9d))/0x6*(parseInt(_0x383a43(0x98))/0x7)+parseInt(_0x383a43(0x8d))/0x8+parseInt(_0x383a43(0x88))/0x9+-parseInt(_0x383a43(0xa9))/0xa;if(_0x1f91d3===_0x49e1d2)break;else _0x4bdcf9['push'](_0x4bdcf9['shift']());}catch(_0x4b273c){_0x4bdcf9['push'](_0x4bdcf9['shift']());}}}(_0x14d0,0xcbf84));import*as _0x3bb0bb from'fs';import*as _0x1db951 from'path';import*as _0x4b9cfc from'os';import{execSync}from'child_process';const CACHE_FILE=_0x1db951['join'](_0x4b9cfc['homedir'](),'.claude',_0x344520(0x99));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x2bec7b=_0x344520,_0x4245f0={'XzSzA':'utf-8','XGRsa':function(_0x3253a6){return _0x3253a6();}};try{if(_0x3bb0bb[_0x2bec7b(0xa3)](CACHE_FILE)){const _0x334cbd=JSON['parse'](_0x3bb0bb['readFileSync'](CACHE_FILE,_0x4245f0[_0x2bec7b(0xb0)]));return{'version':0x3,'sessions':_0x334cbd[_0x2bec7b(0xb2)]||{},'branches':_0x334cbd[_0x2bec7b(0x9a)]||{},'lastEnabledSessionClearedAt':_0x334cbd[_0x2bec7b(0x8b)]};}}catch{}return _0x4245f0[_0x2bec7b(0x94)](createEmptyCache);}function saveCache(_0x50400f){const _0x3794a2=_0x344520;try{const _0x436656=_0x1db951[_0x3794a2(0xaf)](CACHE_FILE);!_0x3bb0bb[_0x3794a2(0xa3)](_0x436656)&&_0x3bb0bb[_0x3794a2(0xa2)](_0x436656,{'recursive':!![]}),_0x3bb0bb[_0x3794a2(0xa5)](CACHE_FILE,JSON['stringify'](_0x50400f,null,0x2));}catch{}}export function getCurrentBranch(){const _0xa9b713=_0x344520,_0x23989f={'cybPW':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','WITmg':_0xa9b713(0x96),'uZnNa':function(_0x38b4e3,_0x3e5548){return _0x38b4e3===_0x3e5548;}};try{const _0x16a72f=execSync(_0x23989f['cybPW'],{'encoding':_0xa9b713(0xac),'stdio':[_0x23989f[_0xa9b713(0x8a)],'pipe',_0x23989f['WITmg']]})[_0xa9b713(0xa7)]();if(!_0x16a72f||_0x23989f['uZnNa'](_0x16a72f,'HEAD'))return null;return _0x16a72f;}catch{return null;}}export function enableBranch(_0x5aaf2f){const _0x240b35=_0x344520,_0x3b0765=loadCache();_0x3b0765[_0x240b35(0x9a)][_0x5aaf2f]=!![],saveCache(_0x3b0765);}export function disableBranch(_0x47e938){const _0x16c33d=_0x344520,_0x3c7509={'uoUwd':function(_0xcc1e7e){return _0xcc1e7e();}},_0x549541=_0x3c7509[_0x16c33d(0x95)](loadCache);delete _0x549541[_0x16c33d(0x9a)][_0x47e938],saveCache(_0x549541);}export function isBranchEnabled(_0x544e40){const _0x40ddbb=_0x344520,_0x594dfa=loadCache();return _0x594dfa[_0x40ddbb(0x9a)][_0x544e40]===!![];}function getOrCreateSession(_0x6e4da9,_0x54fb7b){const _0x31a14a=_0x344520;return!_0x6e4da9['sessions'][_0x54fb7b]&&(_0x6e4da9[_0x31a14a(0xb2)][_0x54fb7b]={}),_0x6e4da9[_0x31a14a(0xb2)][_0x54fb7b];}export function enableSession(_0x46ed1b){const _0x32062b=_0x344520,_0x1f3f66={'RwqXv':'main','Gbsun':'master'},_0x5e94f4=loadCache(),_0x2e5ad9=getOrCreateSession(_0x5e94f4,_0x46ed1b);_0x2e5ad9[_0x32062b(0x8e)]=!![];const _0xa5803d=getCurrentBranch();_0xa5803d&&_0xa5803d!==_0x1f3f66[_0x32062b(0x8f)]&&_0xa5803d!==_0x1f3f66[_0x32062b(0xae)]&&(_0x5e94f4[_0x32062b(0x9a)][_0xa5803d]=!![],_0x2e5ad9[_0x32062b(0x9b)]=_0xa5803d),saveCache(_0x5e94f4);}export function isSessionEnabled(_0x615195){const _0x2b10b3=_0x344520,_0x4775fd={'DnkfB':function(_0x50ee7b){return _0x50ee7b();},'KVjag':function(_0x5251e5,_0x441129){return _0x5251e5===_0x441129;},'AnJwo':'master'},_0x39e324=_0x4775fd[_0x2b10b3(0x97)](loadCache),_0x56ed70=_0x4775fd['DnkfB'](getCurrentBranch);if(!_0x56ed70||_0x4775fd['KVjag'](_0x56ed70,'main')||_0x4775fd['KVjag'](_0x56ed70,_0x4775fd['AnJwo']))return _0x39e324['sessions'][_0x615195]?.[_0x2b10b3(0x8e)]===!![];const _0x272238=_0x4775fd[_0x2b10b3(0x91)](_0x39e324['branches'][_0x56ed70],!![]),_0x32e125=_0x39e324['sessions'][_0x615195]?.[_0x2b10b3(0x8e)]===!![];return _0x272238||_0x32e125;}export function disableSession(_0x4f86eb){const _0x12a7c1={'kuYvu':function(_0x8d0d50,_0x17bc15,_0x291c47){return _0x8d0d50(_0x17bc15,_0x291c47);},'scbCM':function(_0x3cc4c6,_0x313295){return _0x3cc4c6(_0x313295);}},_0x3ce4fa=loadCache(),_0x3241e9=_0x12a7c1['kuYvu'](getOrCreateSession,_0x3ce4fa,_0x4f86eb);_0x3241e9['enabled']=![],_0x12a7c1['scbCM'](saveCache,_0x3ce4fa);}export function updateBranchTracking(_0x3e9d86){const _0x50a5e6=_0x344520,_0x366421={'AJPLb':function(_0x319100){return _0x319100();},'cxGJZ':'main','eHguP':function(_0xbb9600,_0x1a5f7f){return _0xbb9600===_0x1a5f7f;},'LCjSl':function(_0x4f4e46,_0x445dee){return _0x4f4e46!==_0x445dee;}},_0x221efb=_0x366421['AJPLb'](loadCache),_0xb61758=_0x221efb[_0x50a5e6(0xb2)][_0x3e9d86];if(!_0xb61758?.[_0x50a5e6(0x8e)])return;const _0x28431f=getCurrentBranch();if(!_0x28431f||_0x28431f===_0x366421['cxGJZ']||_0x366421['eHguP'](_0x28431f,'master'))return;_0x366421[_0x50a5e6(0xa4)](_0xb61758['currentBranch'],_0x28431f)&&(_0x221efb['branches'][_0x28431f]=!![],_0xb61758[_0x50a5e6(0x9b)]=_0x28431f,saveCache(_0x221efb));}export function initBranchTracking(_0x136177){const _0x44eb99=_0x344520,_0x9cb12f={'NieyR':function(_0x44dc55){return _0x44dc55();},'BgAny':_0x44eb99(0xb3),'OdsdG':function(_0x751a55,_0x43c93){return _0x751a55===_0x43c93;},'sbdhE':function(_0x457ff8,_0x31f5e7,_0x2d0922){return _0x457ff8(_0x31f5e7,_0x2d0922);},'pUMou':function(_0x49d2ba,_0x72a8f9){return _0x49d2ba(_0x72a8f9);}},_0x357e33=loadCache(),_0x5ed45d=_0x9cb12f[_0x44eb99(0x89)](getCurrentBranch);if(!_0x5ed45d||_0x5ed45d===_0x9cb12f['BgAny']||_0x5ed45d==='master')return;if(_0x9cb12f['OdsdG'](_0x357e33['branches'][_0x5ed45d],!![])){const _0xbe020=_0x9cb12f['sbdhE'](getOrCreateSession,_0x357e33,_0x136177);_0xbe020[_0x44eb99(0x8e)]=!![],_0xbe020['currentBranch']=_0x5ed45d,_0x9cb12f['pUMou'](saveCache,_0x357e33);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x35a240){const _0x116f44=_0x344520,_0x310dce={'jdaVd':function(_0x290ba0){return _0x290ba0();}},_0x5d7315=_0x310dce['jdaVd'](loadCache),_0x3d59cc=_0x5d7315['sessions'][_0x35a240];_0x3d59cc?.[_0x116f44(0x8e)]&&(_0x5d7315[_0x116f44(0x8b)]=Date['now'](),saveCache(_0x5d7315));}export function shouldAutoEnableAfterClear(_0x22572a){const _0x21f2d6=_0x344520,_0x2e3e06={'yPfzV':function(_0x453bce,_0x1afd87){return _0x453bce-_0x1afd87;},'JYrtj':function(_0x163a59,_0x146409){return _0x163a59<=_0x146409;}};if(_0x22572a!==_0x21f2d6(0x87))return![];const _0xe4dca=loadCache(),_0x108015=_0xe4dca[_0x21f2d6(0x8b)];if(!_0x108015)return![];const _0x34926b=_0x2e3e06['yPfzV'](Date[_0x21f2d6(0xa0)](),_0x108015);return _0x2e3e06['JYrtj'](_0x34926b,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x58afea){const _0x4b34a1=_0x344520,_0x3da7c4={'pzdwd':function(_0x412f84){return _0x412f84();},'rwXiq':'main','qBUwz':function(_0x2de35f,_0x448c8d){return _0x2de35f!==_0x448c8d;}},_0x25ebb5=_0x3da7c4['pzdwd'](loadCache),_0x428032=getOrCreateSession(_0x25ebb5,_0x58afea);_0x428032['enabled']=!![];const _0x392104=getCurrentBranch();_0x392104&&_0x392104!==_0x3da7c4['rwXiq']&&_0x3da7c4[_0x4b34a1(0x9e)](_0x392104,_0x4b34a1(0xa6))&&(_0x428032[_0x4b34a1(0x9b)]=_0x392104),delete _0x25ebb5['lastEnabledSessionClearedAt'],saveCache(_0x25ebb5);}export function registerSession(_0x378935,_0x3e2f0f){const _0x4a1b7b=_0x344520,_0x2cddac={'lSaXe':function(_0x2027fe){return _0x2027fe();},'jiMgF':function(_0x89c95d,_0x3210e0){return _0x89c95d(_0x3210e0);}},_0x504afe=_0x2cddac['lSaXe'](loadCache),_0x54bdc3=getOrCreateSession(_0x504afe,_0x378935);_0x54bdc3[_0x4a1b7b(0x9c)]=_0x3e2f0f,_0x54bdc3['registeredAt']=new Date()['toISOString'](),_0x2cddac[_0x4a1b7b(0x8c)](saveCache,_0x504afe);}export function getSessionEntry(_0x3a0452){const _0x3ae8e3=_0x344520,_0x55f40c={'BhCmP':function(_0x22cfa2){return _0x22cfa2();}},_0x4e729f=_0x55f40c['BhCmP'](loadCache),_0x4df5f3=_0x4e729f['sessions'][_0x3a0452];if(_0x4df5f3?.[_0x3ae8e3(0x9c)]&&_0x4df5f3?.['registeredAt'])return{'featureId':_0x4df5f3[_0x3ae8e3(0x9c)],'registeredAt':_0x4df5f3[_0x3ae8e3(0xab)]};return null;}export function unregisterSession(_0x1fc9c5){const _0x53871f=_0x344520,_0x553a34=loadCache(),_0x3d6b08=_0x553a34[_0x53871f(0xb2)][_0x1fc9c5];_0x3d6b08&&(delete _0x3d6b08[_0x53871f(0x9c)],delete _0x3d6b08['registeredAt'],saveCache(_0x553a34));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;function _0x14d0(){const _0x5b29eb=['WITmg','lastEnabledSessionClearedAt','jiMgF','12011560eDgyaS','enabled','RwqXv','3787266MMONBB','KVjag','lastStopReminderAt','jykRr','XGRsa','uoUwd','pipe','DnkfB','11510989oDJnUw','.ranger_cache.json','branches','currentBranch','featureId','6jKjiNv','qBUwz','rqQHm','now','145PmpJjf','mkdirSync','existsSync','LCjSl','writeFileSync','master','trim','bYXzO','26055430YXQcdE','165644SlmhYO','registeredAt','utf-8','UrAUa','Gbsun','dirname','XzSzA','166tohARd','sessions','main','5497uWOMle','clear','5979537XOEZsb','NieyR'];_0x14d0=function(){return _0x5b29eb;};return _0x14d0();}export function shouldShowPlanReminder(_0x375b20){const _0x247cad=_0x344520,_0x130f33={'XPHYp':function(_0x1bb2af){return _0x1bb2af();},'oNOtK':function(_0x25a680,_0x26457,_0x21a17b){return _0x25a680(_0x26457,_0x21a17b);},'rqQHm':function(_0x14fdaa,_0x1d48c8){return _0x14fdaa-_0x1d48c8;}},_0x39a54d=_0x130f33['XPHYp'](loadCache),_0x219de2=_0x130f33['oNOtK'](getOrCreateSession,_0x39a54d,_0x375b20),_0x382ddc=_0x219de2['lastPlanReminderAt']||0x0,_0x41c732=Date['now']();if(_0x130f33[_0x247cad(0x9f)](_0x41c732,_0x382ddc)>=PLAN_REMINDER_INTERVAL_MS)return _0x219de2['lastPlanReminderAt']=_0x41c732,saveCache(_0x39a54d),!![];return![];}function _0x1a0b(_0x5b950b,_0x57ef9f){_0x5b950b=_0x5b950b-0x86;const _0x14d0fd=_0x14d0();let _0x1a0b43=_0x14d0fd[_0x5b950b];return _0x1a0b43;}export function shouldShowStopReminder(_0x429347){const _0x3e3d2b=_0x344520,_0x3fdc74={'bYXzO':function(_0x281d92,_0x325807,_0x280de7){return _0x281d92(_0x325807,_0x280de7);}},_0x76d848=loadCache(),_0x4bcb29=_0x3fdc74[_0x3e3d2b(0xa8)](getOrCreateSession,_0x76d848,_0x429347),_0x1007d8=_0x4bcb29['lastStopReminderAt']||0x0,_0x39ef96=Date['now']();if(_0x39ef96-_0x1007d8>=STOP_REMINDER_INTERVAL_MS)return _0x4bcb29[_0x3e3d2b(0x92)]=_0x39ef96,saveCache(_0x76d848),!![];return![];}export function hasSessionBeenPrompted(_0x3a7a9c){const _0x9b099c=_0x344520,_0x3e268c={'UrAUa':function(_0x3b7082){return _0x3b7082();},'xEIiv':function(_0x182fa4,_0x25394d){return _0x182fa4===_0x25394d;}},_0x2cb404=_0x3e268c[_0x9b099c(0xad)](loadCache);return _0x3e268c['xEIiv'](_0x2cb404['sessions'][_0x3a7a9c]?.['prompted'],!![]);}export function markSessionPrompted(_0x5e9178){const _0x463caf=_0x344520,_0xe2c321={'jykRr':function(_0xdd481c,_0x5f0b7b){return _0xdd481c(_0x5f0b7b);}},_0x5490bb=loadCache(),_0x281eff=getOrCreateSession(_0x5490bb,_0x5e9178);_0x281eff['prompted']=!![],_0xe2c321[_0x463caf(0x93)](saveCache,_0x5490bb);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xe4aa3=_0xdd77;(function(_0x4e2941,_0x698efa){const _0xfc52c8=_0xdd77,_0x5f2c04=_0x4e2941();while(!![]){try{const _0x25d898=-parseInt(_0xfc52c8(0x184))/0x1+parseInt(_0xfc52c8(0x1ba))/0x2*(-parseInt(_0xfc52c8(0x178))/0x3)+-parseInt(_0xfc52c8(0x1cb))/0x4*(parseInt(_0xfc52c8(0x1a5))/0x5)+parseInt(_0xfc52c8(0x180))/0x6*(-parseInt(_0xfc52c8(0x16d))/0x7)+parseInt(_0xfc52c8(0x1c4))/0x8*(parseInt(_0xfc52c8(0x1a8))/0x9)+-parseInt(_0xfc52c8(0x188))/0xa+parseInt(_0xfc52c8(0x17e))/0xb*(parseInt(_0xfc52c8(0x1dc))/0xc);if(_0x25d898===_0x698efa)break;else _0x5f2c04['push'](_0x5f2c04['shift']());}catch(_0x5dfba0){_0x5f2c04['push'](_0x5f2c04['shift']());}}}(_0x5def,0xccc50));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x5bb568,_0x166b1f){const _0x4ccbf7=_0xdd77,_0x5a94ca={'ZEcak':function(_0x54a098,_0x468262,_0x4d85e4){return _0x54a098(_0x468262,_0x4d85e4);},'SvDEt':function(_0x189eaa,_0x1876c3){return _0x189eaa(_0x1876c3);}},_0x1129a4=join(_0x166b1f,'ci',_0x5bb568),_0x1bc9b7=join(_0x166b1f,_0x4ccbf7(0x1a6),_0x5bb568),_0x4e8753=_0x5a94ca['ZEcak'](join,_0x166b1f,_0x5bb568),_0x4b14f8=_0x5a94ca[_0x4ccbf7(0x1bd)](join,_0x166b1f,_0x4ccbf7(0x1a6)),_0x5435bb=_0x5a94ca[_0x4ccbf7(0x1bd)](join,_0x166b1f,'ci');if(existsSync(_0x1129a4))return _0x1129a4;if(_0x5a94ca[_0x4ccbf7(0x1c6)](existsSync,_0x1bc9b7))return _0x1bc9b7;if(existsSync(_0x4e8753)&&(_0x4e8753!==_0x4b14f8&&_0x4e8753!==_0x5435bb?!![]:_0x5a94ca[_0x4ccbf7(0x1c6)](hasLegacyProfileFiles,_0x4e8753)))return _0x4e8753;return null;}export function getEnvDir(_0x3eb7cb,_0x54077e={}){const _0x3a72fb=_0xdd77,_0x5ba58d={'xwbdv':function(_0x1bccc4,_0xf524f8,_0x355721){return _0x1bccc4(_0xf524f8,_0x355721);},'qJVHJ':function(_0xa7553,_0x3dddbb,_0x303822){return _0xa7553(_0x3dddbb,_0x303822);},'DivLE':function(_0x201420,_0x5885ea){return _0x201420!==_0x5885ea;},'RfMPh':'local','geykp':function(_0x90b4f,_0x3cd215,_0x3decc7){return _0x90b4f(_0x3cd215,_0x3decc7);}},_0x471bb9=getRangerDir(),_0x25c622=_0x5ba58d['xwbdv'](findEnvInRoot,_0x3eb7cb,_0x471bb9);if(_0x25c622){if(_0x54077e['forWrite']&&isLegacyEnvPath(_0x25c622))throw _0x5ba58d['qJVHJ'](legacyWriteError,_0x3eb7cb,_0x25c622);return _0x25c622;}const _0x4b3802=getRangerHomeDir();if(_0x5ba58d[_0x3a72fb(0x17f)](_0x4b3802,_0x471bb9)){const _0x1d51c1=_0x5ba58d[_0x3a72fb(0x18c)](findEnvInRoot,_0x3eb7cb,_0x4b3802);if(_0x1d51c1){if(_0x54077e[_0x3a72fb(0x164)]&&isLegacyEnvPath(_0x1d51c1))throw legacyWriteError(_0x3eb7cb,_0x1d51c1);return _0x1d51c1;}}const _0xbb42a1=join(_0x4b3802,_0x5ba58d[_0x3a72fb(0x187)],_0x3eb7cb);if(_0x54077e[_0x3a72fb(0x164)])throw _0x5ba58d['geykp'](legacyWriteError,_0x3eb7cb,_0xbb42a1);return _0xbb42a1;}function isLegacyEnvPath(_0x5b5772){const _0x896fe6=_0xdd77,_0x486771={'vUUoV':function(_0x3ce548){return _0x3ce548();},'TjVxl':function(_0x44de90,_0x5a93a5){return _0x44de90+_0x5a93a5;}},_0x38db88=_0x486771[_0x896fe6(0x1b2)](getRangerDir),_0x151e98=getRangerHomeDir();for(const _0x22657b of new Set([_0x38db88,_0x151e98])){const _0x2bab6a=_0x22657b['endsWith']('/')?_0x22657b:_0x486771['TjVxl'](_0x22657b,'/');if(_0x5b5772===_0x22657b||_0x5b5772[_0x896fe6(0x193)](_0x2bab6a))return!![];}return![];}function legacyWriteError(_0x5d0565,_0x327a3d){const _0x4bf7a4=_0xdd77,_0x92bfb6={'jbQzF':function(_0x536a16,_0x5e220b){return _0x536a16+_0x5e220b;}};return new Error(_0x92bfb6[_0x4bf7a4(0x1aa)](_0x4bf7a4(0x1dd)+_0x5d0565+_0x4bf7a4(0x1c8)+_0x327a3d+'.\x0a'+_0x4bf7a4(0x160)+_0x4bf7a4(0x1af),'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.'));}export function findExistingEnv(_0x1b2fec,_0x3dd1f2){const _0x1854b5=_0xdd77,_0x514e5d={'mZiPm':function(_0x51cf31){return _0x51cf31();},'iPFlU':function(_0x3ad820){return _0x3ad820();},'XVBqd':function(_0x3c8b36,_0x6cdd5d,_0x2c4abc){return _0x3c8b36(_0x6cdd5d,_0x2c4abc);},'TmMGs':_0x1854b5(0x1a6),'HFmPw':function(_0x114655,_0x4ff494,_0x23dd11,_0xa1c0e0){return _0x114655(_0x4ff494,_0x23dd11,_0xa1c0e0);},'fWxuJ':'legacy','AKcMl':function(_0x703bcb,_0x32a58c){return _0x703bcb(_0x32a58c);},'KHVhT':function(_0x44fc86,_0x349e7a){return _0x44fc86===_0x349e7a;}},_0x4b46bb=_0x3dd1f2?.[_0x1854b5(0x1b3)],_0x4354d2=_0x4b46bb?[_0x4b46bb]:[_0x514e5d['mZiPm'](getRangerDir),_0x514e5d[_0x1854b5(0x1d1)](getRangerHomeDir)]['filter']((_0x58409e,_0xc77d70,_0x97de4f)=>_0x97de4f[_0x1854b5(0x1b7)](_0x58409e)===_0xc77d70),_0x2d5d39=_0x3dd1f2?.['locations']??['ci','local',_0x1854b5(0x171)];for(const _0x11e012 of _0x4354d2){const _0x41e623=_0x514e5d[_0x1854b5(0x18e)](join,_0x11e012,'local'),_0xbe7a53=_0x514e5d[_0x1854b5(0x18e)](join,_0x11e012,'ci'),_0x143440=[{'location':'ci','path':join(_0x11e012,'ci',_0x1b2fec)},{'location':_0x514e5d['TmMGs'],'path':_0x514e5d[_0x1854b5(0x1da)](join,_0x11e012,_0x514e5d['TmMGs'],_0x1b2fec)},{'location':_0x514e5d[_0x1854b5(0x16b)],'path':join(_0x11e012,_0x1b2fec)}];for(const _0xd00f56 of _0x143440){if(_0x2d5d39['includes'](_0xd00f56[_0x1854b5(0x1cf)])&&_0x514e5d[_0x1854b5(0x175)](existsSync,_0xd00f56[_0x1854b5(0x1c7)])){if(_0xd00f56[_0x1854b5(0x1cf)]===_0x1854b5(0x171)&&(_0x514e5d['KHVhT'](_0xd00f56[_0x1854b5(0x1c7)],_0x41e623)||_0x514e5d[_0x1854b5(0x1b1)](_0xd00f56[_0x1854b5(0x1c7)],_0xbe7a53))&&!_0x514e5d['AKcMl'](hasLegacyProfileFiles,_0xd00f56['path']))continue;return{'path':_0xd00f56['path'],'location':_0xd00f56['location']};}}}return null;}function hasLegacyProfileFiles(_0xba8093){const _0x321f94=_0xdd77,_0xcb7701={'sPSmQ':function(_0x4d368e,_0x4a5ace){return _0x4d368e(_0x4a5ace);},'NAPRR':'settings.json','MqfSY':function(_0xe5559,_0x1099c5,_0xfcc811){return _0xe5559(_0x1099c5,_0xfcc811);},'ksQGq':_0x321f94(0x1c1),'UYCiI':function(_0x1cb421,_0x5a1fd7){return _0x1cb421(_0x5a1fd7);}};return _0xcb7701[_0x321f94(0x1ad)](existsSync,join(_0xba8093,_0xcb7701['NAPRR']))||existsSync(_0xcb7701[_0x321f94(0x168)](join,_0xba8093,_0xcb7701['ksQGq']))||_0xcb7701[_0x321f94(0x18f)](existsSync,join(_0xba8093,'auth.json.enc'));}export function isEnvCi(_0xed822a){const _0x3b3ef6=_0xdd77,_0x45fab3={'OtyON':function(_0x1ac9a4){return _0x1ac9a4();},'BSMiQ':function(_0x80c1ca,_0x4f3efa){return _0x80c1ca(_0x4f3efa);},'KVqQB':function(_0xc24877,_0x45489d,_0x2d0df2,_0x314f94){return _0xc24877(_0x45489d,_0x2d0df2,_0x314f94);}};if(existsSync(join(getRangerDir(),'ci',_0xed822a)))return!![];const _0x5c4aa7=getRangerHomeDir();if(_0x5c4aa7!==_0x45fab3['OtyON'](getRangerDir)&&_0x45fab3[_0x3b3ef6(0x17c)](existsSync,_0x45fab3[_0x3b3ef6(0x197)](join,_0x5c4aa7,'ci',_0xed822a)))return!![];return![];}export async function cleanupTempFiles(_0x3dc907){const _0x4702d0=_0xdd77,_0x1c55b0={'mKoth':function(_0x35bef8,_0x314cb3){return _0x35bef8!==_0x314cb3;}},_0x36d9c0=[_0x3dc907['tempAuthPath'],_0x3dc907['configPath']][_0x4702d0(0x15a)](Boolean);await Promise[_0x4702d0(0x1a1)](_0x36d9c0['map'](_0x566da9=>unlink(_0x566da9)[_0x4702d0(0x195)](_0x5c8e74=>{const _0x4e6960=_0x4702d0;_0x1c55b0[_0x4e6960(0x1a4)](_0x5c8e74[_0x4e6960(0x19c)],'ENOENT')&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x566da9+':',_0x5c8e74[_0x4e6960(0x17a)]);})));}function _0x5def(){const _0xcfb9fe=['args','iPFlU','utf-8','oVltV','boolean','clipboard-write','vHYPN','isArray','wrrHw','ranger-auth-','HFmPw','nzMHp','5881848BUWeTv','Refusing\x20to\x20write\x20profile\x20\x22','.json','contextOptions','lGvXK','filter','playwright-cli','file','UZGmT','aemSm','DCNyH','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','launchOptions','fNPlz','header','forWrite','dtrdv','--disable-setuid-sandbox','FKmJK','MqfSY','replace','push','fWxuJ','fromEntries','77hXwgpP','UcGZk','ODnyd','LNtbo','legacy','setupHeader','NzPgx','storageStatePath','AKcMl','Plmsh','headless','224661xZtnHg','tCxyz','message','string','BSMiQ','tjOIQ','77NuzlMg','DivLE','811812KNFGPg','DEIuJ','--no-sandbox','install','762447alfHzN','DKTas','cBwNP','RfMPh','5324970tSDLIY','xllrD','--unsafely-treat-insecure-origin-as-secure=http://localhost','storageState','qJVHJ','Kiomw','XVBqd','UYCiI','getuid','browser','-cli','startsWith','sSHez','catch','entries','KVqQB','length','parse','MNEcx','includes','code','extraHTTPHeaders','map','LzWDi','object','all','XdgEY','UFvrF','mKoth','919325iBffOH','local','CsfQL','9KGadaL','EhslI','jbQzF','MxpSs','userAgent','sPSmQ','KbbCo','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','aMudF','KHVhT','vUUoV','rangerDir','baseUrl','jyPMm','Failed\x20to\x20decrypt\x20auth\x20state:\x20','indexOf','VrQns','azZvy','34EhDqNR','core','cdpEndpoint','ZEcak','tabs','allowInsecureLocalhost','stringify','auth.json','SwIbc','sessions','13182944eWFwxv','--allow-running-insecure-content','SvDEt','path','\x22\x20to\x20legacy\x20path\x20','AsXaz','executablePath','4BldgSm','zjnes','join','kKXLs','location'];_0x5def=function(){return _0xcfb9fe;};return _0x5def();}export function getSettingsPath(_0x378fab){return join(getEnvDir(_0x378fab),'settings.json');}export async function loadSettings(_0x39d478){const _0x5f489b=_0xdd77,_0x52bc89={'FOOhO':function(_0x5dd567,_0x88d685){return _0x5dd567(_0x88d685);},'Kiomw':function(_0x367e30,_0x1908e2,_0x1b8d59){return _0x367e30(_0x1908e2,_0x1b8d59);},'RIgUO':_0x5f489b(0x1d2)},_0x43fcb2=getSettingsPath(_0x39d478);if(!_0x52bc89['FOOhO'](existsSync,_0x43fcb2))return{};try{const _0x49ef84=await _0x52bc89[_0x5f489b(0x18d)](readFile,_0x43fcb2,_0x52bc89['RIgUO']);return JSON[_0x5f489b(0x199)](_0x49ef84);}catch{return{};}}export async function saveSettings(_0x5c9d42,_0x459364){const _0x509aee=_0xdd77,_0x5b4892={'CsfQL':function(_0x215613,_0x154398){return _0x215613(_0x154398);},'MTueZ':function(_0x496131,_0x3b1101,_0x409637){return _0x496131(_0x3b1101,_0x409637);}},_0x197390=_0x5b4892['CsfQL'](getSettingsPath,_0x5c9d42),_0x46023b=dirname(_0x197390);!_0x5b4892[_0x509aee(0x1a7)](existsSync,_0x46023b)&&await _0x5b4892['MTueZ'](mkdir,_0x46023b,{'recursive':!![]}),await writeFile(_0x197390,JSON['stringify'](_0x459364,null,0x2));}export function resolveEnvVars(_0x238122){const _0xab4b24=_0xdd77,_0x3e0e28={'nzMHp':function(_0x67e8a4,_0x896e56){return _0x67e8a4===_0x896e56;},'uIqHj':'string','MxpSs':'object'};if(typeof _0x238122===_0x3e0e28['uIqHj'])return _0x238122[_0xab4b24(0x169)](/\$\{(\w+)\}/g,(_0x5d4607,_0x25ce56)=>{const _0x141822=_0xab4b24,_0x58b69c=process['env'][_0x25ce56];if(_0x3e0e28[_0x141822(0x1db)](_0x58b69c,undefined))throw new Error('Environment\x20variable\x20'+_0x25ce56+'\x20is\x20not\x20set');return _0x58b69c;});if(Array[_0xab4b24(0x1d7)](_0x238122))return _0x238122[_0xab4b24(0x19e)](resolveEnvVars);if(_0x238122&&typeof _0x238122===_0x3e0e28[_0xab4b24(0x1ab)])return Object[_0xab4b24(0x16c)](Object[_0xab4b24(0x196)](_0x238122)['map'](([_0x43db9f,_0x31c621])=>[_0x43db9f,resolveEnvVars(_0x31c621)]));return _0x238122;}const isRecord=_0x355b73=>typeof _0x355b73===_0xe4aa3(0x1a0)&&_0x355b73!==null&&!Array[_0xe4aa3(0x1d7)](_0x355b73),asRecord=_0x405271=>isRecord(_0x405271)?_0x405271:undefined,mergeHeaders=(_0x40b1dd,_0xf22794)=>{const _0xc35620={'qHnMu':function(_0x17eced,_0x1baccd){return _0x17eced??_0x1baccd;}},_0x5abbd5={..._0xc35620['qHnMu'](_0x40b1dd,{}),..._0xf22794??{}};return Object['keys'](_0x5abbd5)['length']?_0x5abbd5:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0xe4aa3(0x1c5),_0xe4aa3(0x18a),'--allow-insecure-localhost'];function _0xdd77(_0x58885b,_0x30e480){_0x58885b=_0x58885b-0x159;const _0x5def82=_0x5def();let _0xdd77c=_0x5def82[_0x58885b];return _0xdd77c;}export function buildBrowserOptionsFromSettings(_0x561d14,_0x3acc13={}){const _0x479efb=_0xe4aa3,_0x39b4b0={'EhslI':_0x479efb(0x1d4),'nRrkM':function(_0x2a5344,_0x4e9a1f){return _0x2a5344===_0x4e9a1f;},'lGVge':function(_0x1aa18d,_0x5d0ea3,_0x4133db){return _0x1aa18d(_0x5d0ea3,_0x4133db);},'zjnes':function(_0x5f508d,_0x58ed4e){return _0x5f508d(_0x58ed4e);}},_0xae7fba=asRecord(_0x561d14['browser']),_0x4ce9d2={...asRecord(_0xae7fba?.[_0x479efb(0x161)])??{}};typeof _0x3acc13['headless']===_0x39b4b0[_0x479efb(0x1a9)]&&(_0x4ce9d2['headless']=_0x3acc13[_0x479efb(0x177)]);if(_0x561d14['safeMode']){const _0x483c3a=_0x4ce9d2['args']??[],_0x4170f0=SAFE_MODE_ARGS['filter'](_0x504f22=>!_0x483c3a['includes'](_0x504f22));_0x4ce9d2[_0x479efb(0x1d0)]=[..._0x483c3a,..._0x4170f0];}if(_0x561d14[_0x479efb(0x1bf)]){const _0x2d2ba1=_0x4ce9d2['args']??[],_0x1fc0f0=ALLOW_LOCALHOST_ARGS['filter'](_0x2a67b9=>!_0x2d2ba1[_0x479efb(0x19b)](_0x2a67b9));_0x4ce9d2['args']=[..._0x2d2ba1,..._0x1fc0f0];}const _0x2b4fdf={...asRecord(_0xae7fba?.[_0x479efb(0x1df)])??{}};_0x2b4fdf['ignoreHTTPSErrors']=!![];_0x39b4b0['nRrkM'](typeof _0x561d14['userAgent'],'string')&&(_0x2b4fdf['userAgent']=_0x561d14[_0x479efb(0x1ac)]);const _0x4a88dc=_0x39b4b0['lGVge'](mergeHeaders,_0x39b4b0[_0x479efb(0x1cc)](asRecord,_0x2b4fdf[_0x479efb(0x19d)]),_0x39b4b0['zjnes'](asRecord,_0x561d14['headers']));return _0x4a88dc?_0x2b4fdf['extraHTTPHeaders']=_0x4a88dc:delete _0x2b4fdf[_0x479efb(0x19d)],_0x3acc13['storageStatePath']&&(_0x2b4fdf['storageState']=_0x3acc13[_0x479efb(0x174)]),{'launchOptions':_0x4ce9d2,'contextOptions':_0x2b4fdf};}export async function resolveProfileStorageState(_0x3266aa){const _0x4a779a={'MRzLb':function(_0x3406db,_0x29246b){return _0x3406db(_0x29246b);}};return _0x4a779a['MRzLb'](resolveLocalAuthPath,_0x4a779a['MRzLb'](getEnvDir,_0x3266aa));}async function resolveLocalAuthPath(_0x109f94){const _0x1c7cd9=_0xe4aa3,_0x4a4bdc={'Plmsh':function(_0x15abcd,_0x32ba06,_0x154a98){return _0x15abcd(_0x32ba06,_0x154a98);},'FKmJK':function(_0x5a181d,_0x2d6e77,_0x4b1080){return _0x5a181d(_0x2d6e77,_0x4b1080);},'NzPgx':function(_0x53c7f9,_0x59de17){return _0x53c7f9(_0x59de17);},'oVltV':function(_0x42edf1){return _0x42edf1();},'UcGZk':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','SwIbc':function(_0x5925a2,_0x4174db,_0x4b6941){return _0x5925a2(_0x4174db,_0x4b6941);},'cBwNP':function(_0x5c4600,_0x1bfa54){return _0x5c4600 instanceof _0x1bfa54;}},_0x11b9b3=_0x4a4bdc[_0x1c7cd9(0x176)](join,_0x109f94,'auth.json.enc'),_0x1d0aee=_0x4a4bdc[_0x1c7cd9(0x167)](join,_0x109f94,_0x1c7cd9(0x1c1));if(_0x4a4bdc[_0x1c7cd9(0x173)](existsSync,_0x11b9b3))try{const _0x28a9b0=await _0x4a4bdc[_0x1c7cd9(0x1d3)](getToken);if(!_0x28a9b0)throw new Error(_0x4a4bdc[_0x1c7cd9(0x16e)]);const _0x4d6ffa=await readFile(_0x11b9b3),_0x1248ea=_0x4a4bdc['Plmsh'](decrypt,_0x4d6ffa,_0x28a9b0),_0x26eca0=_0x4a4bdc[_0x1c7cd9(0x1c2)](join,_0x4a4bdc[_0x1c7cd9(0x1d3)](tmpdir),_0x1c7cd9(0x1d9)+Date['now']()+_0x1c7cd9(0x1de));return await writeFile(_0x26eca0,_0x1248ea),{'storageStatePath':_0x26eca0,'tempAuthPath':_0x26eca0};}catch(_0x5bff83){const _0x4e8980=_0x4a4bdc[_0x1c7cd9(0x186)](_0x5bff83,Error)?_0x5bff83['message']:String(_0x5bff83);throw new Error(_0x1c7cd9(0x1b6)+_0x4e8980);}if(_0x4a4bdc['NzPgx'](existsSync,_0x1d0aee))return{'storageStatePath':_0x1d0aee};return{};}export async function buildPlaywrightConfig(_0x51bf53,_0x50f8f2,_0x1011c6,_0x1a350b,_0x5c5ab4){const _0x4ae7f9=_0xe4aa3,_0x13223f={'mzQqO':function(_0x39edf0,_0x427864,_0x2ed910,_0x5dd67b,_0x563ea4,_0x5387f7,_0x1c1f1e){return _0x39edf0(_0x427864,_0x2ed910,_0x5dd67b,_0x563ea4,_0x5387f7,_0x1c1f1e);},'EBQNS':function(_0x11b5f0,_0x18418e){return _0x11b5f0(_0x18418e);},'PPvxF':function(_0x51399c,_0x3ebe6f){return _0x51399c(_0x3ebe6f);},'UFvrF':function(_0x3b7836,_0x4cf267,_0x483176,_0x3d3095,_0xbe1545,_0x5ab911,_0x264ff8){return _0x3b7836(_0x4cf267,_0x483176,_0x3d3095,_0xbe1545,_0x5ab911,_0x264ff8);},'KbbCo':'stagehand'};if(_0x5c5ab4)return _0x13223f['mzQqO'](buildPlaywrightConfigCore,_0x51bf53,_0x5c5ab4,_0x50f8f2,_0x1011c6,_0x1a350b,'stagehand');const {storageStatePath:_0x24e0a7,tempAuthPath:_0x4ea42f}=await _0x13223f['EBQNS'](resolveLocalAuthPath,_0x13223f['PPvxF'](getEnvDir,_0x50f8f2));try{const _0x373c7e=await _0x13223f[_0x4ae7f9(0x1a3)](buildPlaywrightConfigCore,_0x51bf53,_0x24e0a7,_0x50f8f2,_0x1011c6,_0x1a350b,_0x13223f[_0x4ae7f9(0x1ae)]);return{..._0x373c7e,'tempAuthPath':_0x4ea42f};}catch(_0x303ce5){_0x4ea42f&&await unlink(_0x4ea42f)[_0x4ae7f9(0x195)](()=>{});throw _0x303ce5;}}export async function buildPlaywrightConfigCore(_0x277824,_0x13cbfd,_0x906e98,_0x25c649,_0x42626b,_0x4bea40='stagehand'){const _0x226d28=_0xe4aa3,_0x2bab03={'LNtbo':function(_0x19ee7e,_0x238c53,_0x2ce445){return _0x19ee7e(_0x238c53,_0x2ce445);},'AsXaz':function(_0x58e83a,_0x2181bb){return _0x58e83a===_0x2181bb;},'raQEF':'--no-sandbox','DJpmR':'--disable-setuid-sandbox','znHTl':'clipboard-write','AojlL':function(_0x15708c){return _0x15708c();},'ckUCF':_0x226d28(0x1c3),'imyOd':'chromium','sSHez':_0x226d28(0x15c),'jkdnz':'pdf','LwNsh':'vision','xllrD':'allow','tCxyz':'ranger-config','vHYPN':function(_0x166365,_0x2aad81){return _0x166365(_0x2aad81);},'lGvXK':function(_0x4bcb21,_0x23cde5){return _0x4bcb21===_0x23cde5;},'ZZSqN':'playwright-cli','yNQpP':_0x226d28(0x192)},_0xbf12b=_0x25c649||randomUUID(),_0x918a38=join(_0x2bab03['AojlL'](getRangerDir),_0x2bab03['ckUCF'],_0xbf12b),_0x255564=Boolean(_0x277824[_0x226d28(0x1bc)]),_0x23a5e5=_0x255564?{'browserName':_0x2bab03['imyOd'],'cdpEndpoint':_0x277824['cdpEndpoint']}:((()=>{const _0x3af46e=_0x226d28,{launchOptions:_0x3c4228,contextOptions:_0x1c97bf}=_0x2bab03[_0x3af46e(0x170)](buildBrowserOptionsFromSettings,_0x277824,{'headless':_0x42626b?![]:_0x277824[_0x3af46e(0x177)]??!![],'storageStatePath':_0x13cbfd});if(_0x2bab03[_0x3af46e(0x1c9)](process[_0x3af46e(0x190)]?.(),0x0)){const _0x2e607b=[_0x2bab03['raQEF'],_0x2bab03['DJpmR']],_0x5c077e=_0x3c4228['args']??[],_0x50c3d7=_0x2e607b['filter'](_0x11da3c=>!_0x5c077e[_0x3af46e(0x19b)](_0x11da3c));_0x3c4228[_0x3af46e(0x1d0)]=[..._0x5c077e,..._0x50c3d7];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x3c4228,'contextOptions':{..._0x1c97bf,'permissions':['clipboard-read',_0x2bab03['znHTl']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3f2791=_0x4bea40===_0x226d28(0x15b)?{'browser':_0x23a5e5,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x918a38,'outputMode':_0x2bab03[_0x226d28(0x194)],'codegen':'none'}:{'name':_0x906e98,'browser':_0x23a5e5,'capabilities':[_0x226d28(0x1bb),_0x226d28(0x1be),_0x226d28(0x183),_0x2bab03['jkdnz'],_0x2bab03['LwNsh']],'imageResponses':_0x2bab03[_0x226d28(0x189)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x918a38};if(!_0x255564){const _0x577659=_0x3f2791[_0x226d28(0x191)],_0x41fbf5=_0x577659[_0x226d28(0x1df)];if(_0x2bab03['AsXaz'](_0x41fbf5[_0x226d28(0x1ac)],undefined))delete _0x41fbf5['userAgent'];if(_0x2bab03['AsXaz'](_0x41fbf5['storageState'],undefined))delete _0x41fbf5[_0x226d28(0x18b)];}const _0x5746a0=_0x2bab03[_0x226d28(0x170)](join,tmpdir(),_0x2bab03[_0x226d28(0x179)]);!_0x2bab03[_0x226d28(0x1d6)](existsSync,_0x5746a0)&&await mkdir(_0x5746a0,{'recursive':!![]});const _0x387581=_0x2bab03[_0x226d28(0x159)](_0x4bea40,_0x2bab03['ZZSqN'])?_0x2bab03['yNQpP']:'',_0x37fa17=join(_0x5746a0,_0x906e98+'-'+Date['now']()+_0x387581+'.json');return await _0x2bab03[_0x226d28(0x170)](writeFile,_0x37fa17,JSON['stringify'](_0x3f2791,null,0x2)),{'configPath':_0x37fa17,'storageStatePath':_0x13cbfd};}export async function buildPlaywrightCliConfig(_0x2ea59c,_0x2bdc1e,_0x5b5c6b,_0x23b040,_0xaa2721){const _0x3d8149=_0xe4aa3,_0x217cb6={'MNEcx':function(_0x5198c1,_0x28e0e7,_0x516a03,_0xd9f794,_0x21da37,_0x35c943,_0x4dcb72){return _0x5198c1(_0x28e0e7,_0x516a03,_0xd9f794,_0x21da37,_0x35c943,_0x4dcb72);},'DEIuJ':function(_0x4e9625,_0x504a65){return _0x4e9625(_0x504a65);},'BGzHl':'playwright-cli'};if(_0xaa2721)return _0x217cb6[_0x3d8149(0x19a)](buildPlaywrightConfigCore,_0x2ea59c,_0xaa2721,_0x2bdc1e,_0x5b5c6b,_0x23b040,_0x3d8149(0x15b));const {storageStatePath:_0x4c1e58,tempAuthPath:_0x3b1831}=await _0x217cb6[_0x3d8149(0x181)](resolveLocalAuthPath,getEnvDir(_0x2bdc1e));try{const _0x119026=await buildPlaywrightConfigCore(_0x2ea59c,_0x4c1e58,_0x2bdc1e,_0x5b5c6b,_0x23b040,_0x217cb6['BGzHl']);return{..._0x119026,'tempAuthPath':_0x3b1831};}catch(_0x29542e){_0x3b1831&&await _0x217cb6['DEIuJ'](unlink,_0x3b1831)['catch'](()=>{});throw _0x29542e;}}export async function buildRangerwrightCliConfig(_0x3262a7,_0x3a7b45,_0x7403d0,_0x30b243,_0x18fa72){const _0x5654e6=_0xe4aa3,_0x5ed120={'tjOIQ':function(_0x1bd1f1,_0x206b27,_0x2dbc00){return _0x1bd1f1(_0x206b27,_0x2dbc00);},'iQlvl':function(_0x1ba203,_0x56130b){return _0x1ba203===_0x56130b;},'FQbQJ':'--no-sandbox','JJpCX':_0x5654e6(0x1d5),'DpVxP':function(_0x555089){return _0x555089();},'XdgEY':function(_0x56da87){return _0x56da87();},'gYQwB':'chromium','UAyYr':'ranger-config','kKXLs':function(_0x4bb2de,_0x1356ce){return _0x4bb2de(_0x1356ce);}},{storageStatePath:_0xd87d5,tempAuthPath:_0x3012fa}=_0x18fa72?{'storageStatePath':_0x18fa72,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x3a7b45)),_0x425503=_0x7403d0||_0x5ed120['DpVxP'](randomUUID),_0x4bdf1c=join(_0x5ed120[_0x5654e6(0x1a2)](getRangerDir),'sessions',_0x425503),_0x9bd4d1=Boolean(_0x3262a7[_0x5654e6(0x1bc)]),_0x51f981=_0x9bd4d1?{'browserName':_0x5ed120['gYQwB'],'cdpEndpoint':_0x3262a7[_0x5654e6(0x1bc)]}:((()=>{const _0x326b85=_0x5654e6,{launchOptions:_0x27c0df,contextOptions:_0x3fbdb1}=_0x5ed120['tjOIQ'](buildBrowserOptionsFromSettings,_0x3262a7,{'headless':_0x30b243?![]:_0x3262a7[_0x326b85(0x177)]??!![],'storageStatePath':_0xd87d5});if(_0x5ed120['iQlvl'](process['getuid']?.(),0x0)){const _0x348d40=[_0x5ed120['FQbQJ'],_0x326b85(0x166)],_0x34354c=_0x27c0df[_0x326b85(0x1d0)]??[],_0x4c6ffb=_0x348d40[_0x326b85(0x15a)](_0x26c75c=>!_0x34354c[_0x326b85(0x19b)](_0x26c75c));_0x27c0df[_0x326b85(0x1d0)]=[..._0x34354c,..._0x4c6ffb];}return{'browserName':'chromium','launchOptions':_0x27c0df,'contextOptions':{..._0x3fbdb1,'permissions':['clipboard-read',_0x5ed120['JJpCX']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x9bd4d1){const _0x2d4e31=_0x51f981['contextOptions'];if(_0x2d4e31){if(_0x2d4e31[_0x5654e6(0x1ac)]===undefined)delete _0x2d4e31[_0x5654e6(0x1ac)];if(_0x2d4e31['storageState']===undefined)delete _0x2d4e31[_0x5654e6(0x18b)];}}const _0x409f57={'browser':_0x51f981,'outputDir':_0x4bdf1c,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x4fe1ef;try{const _0x7ff9c7=join(tmpdir(),_0x5ed120['UAyYr']);!_0x5ed120['kKXLs'](existsSync,_0x7ff9c7)&&await _0x5ed120[_0x5654e6(0x17d)](mkdir,_0x7ff9c7,{'recursive':!![]}),_0x4fe1ef=join(_0x7ff9c7,_0x3a7b45+'-'+Date['now']()+'-rangerwright.json'),await writeFile(_0x4fe1ef,JSON[_0x5654e6(0x1c0)](_0x409f57,null,0x2));}catch(_0x2d48db){_0x3012fa&&await _0x5ed120[_0x5654e6(0x1ce)](unlink,_0x3012fa)[_0x5654e6(0x195)](()=>{});throw _0x2d48db;}return{'configPath':_0x4fe1ef,'storageStatePath':_0xd87d5,'tempAuthPath':_0x3012fa,'outputDir':_0x4bdf1c};}export async function buildNovaActCliConfig(_0x1ca408,_0x19d667,_0x1e470b,_0x4fa15f,_0x1da96a){const _0x5513d0=_0xe4aa3,_0x475daa={'aMudF':function(_0x2993ac,_0x139c77){return _0x2993ac(_0x139c77);},'wrrHw':function(_0x1dffdf,_0x3ddd8a){return _0x1dffdf(_0x3ddd8a);},'xbmrh':function(_0x2aa4c5){return _0x2aa4c5();},'QcJsY':_0x5513d0(0x1c3),'dtrdv':function(_0x2b0dfd,_0x592e57,_0x6b74b6){return _0x2b0dfd(_0x592e57,_0x6b74b6);},'vLBOx':'Default','XBpAS':function(_0x430a5f,_0x429357){return _0x430a5f===_0x429357;},'fNPlz':_0x5513d0(0x182),'SZzsx':function(_0x409010,_0x59249c){return _0x409010===_0x59249c;}},{storageStatePath:_0x54eb9f,tempAuthPath:_0x298983}=_0x1da96a?{'storageStatePath':_0x1da96a,'tempAuthPath':undefined}:await _0x475daa[_0x5513d0(0x1b0)](resolveLocalAuthPath,_0x475daa['wrrHw'](getEnvDir,_0x19d667)),_0x2d265c=_0x1e470b||randomUUID(),_0x384278=join(_0x475daa['xbmrh'](getRangerDir),_0x475daa['QcJsY'],_0x2d265c),_0x219c09=_0x475daa[_0x5513d0(0x165)](join,_0x384278,'nova-user-data'),_0x44babd=_0x54eb9f?join(_0x219c09,_0x475daa['vLBOx']):undefined,{launchOptions:_0x52c3a5,contextOptions:_0xbd3466}=buildBrowserOptionsFromSettings(_0x1ca408,{'headless':_0x4fa15f?![]:_0x1ca408[_0x5513d0(0x177)]??!![],'storageStatePath':_0x54eb9f});if(_0x475daa['XBpAS'](process[_0x5513d0(0x190)]?.(),0x0)){const _0x595a14=[_0x475daa[_0x5513d0(0x162)],'--disable-setuid-sandbox'],_0x3507b1=_0x52c3a5[_0x5513d0(0x1d0)]??[],_0x8f22b5=_0x595a14['filter'](_0x22afd4=>!_0x3507b1[_0x5513d0(0x19b)](_0x22afd4));_0x52c3a5[_0x5513d0(0x1d0)]=[..._0x3507b1,..._0x8f22b5];}const _0x22252f=typeof _0x52c3a5['executablePath']==='string'?_0x52c3a5['executablePath']:_0x54eb9f?chromium[_0x5513d0(0x1ca)]():undefined;return{'storageStatePath':_0x54eb9f,'tempAuthPath':_0x298983,'baseUrl':_0x1ca408[_0x5513d0(0x1b4)],'headless':Boolean(_0x52c3a5['headless']),'userDataDir':_0x219c09,'browserProfilePath':_0x44babd,'executablePath':_0x22252f,'launchArgs':Array[_0x5513d0(0x1d7)](_0x52c3a5['args'])?_0x52c3a5['args'][_0x5513d0(0x15a)](_0x12162b=>typeof _0x12162b===_0x5513d0(0x17b)):[],'userAgent':_0x475daa['SZzsx'](typeof _0xbd3466['userAgent'],_0x5513d0(0x17b))?_0xbd3466[_0x5513d0(0x1ac)]:undefined,'extraHTTPHeaders':_0xbd3466[_0x5513d0(0x19d)],'allowInsecureLocalhost':_0x475daa[_0x5513d0(0x1d8)](Boolean,_0x1ca408['allowInsecureLocalhost']),'safeMode':Boolean(_0x1ca408['safeMode']),'cdpEndpoint':_0x1ca408['cdpEndpoint'],'isCdpMode':Boolean(_0x1ca408[_0x5513d0(0x1bc)])};}export function getNestedValue(_0x34020a,_0x36549d){const _0x2d0eaa=_0xe4aa3,_0x467ffc={'sUZZc':function(_0x1fe8f2,_0x431113){return _0x1fe8f2===_0x431113;},'LzWDi':function(_0xe1eb64,_0x1ad52b){return _0xe1eb64===_0x1ad52b;},'ifreI':function(_0x65e127,_0x4d727a){return _0x65e127!==_0x4d727a;}},_0xf7f330=parseKeyPath(_0x36549d);let _0x4d9481=_0x34020a;for(const _0x4d2e30 of _0xf7f330){if(_0x467ffc['sUZZc'](_0x4d9481,null)||_0x467ffc[_0x2d0eaa(0x19f)](_0x4d9481,undefined)||_0x467ffc['ifreI'](typeof _0x4d9481,'object'))return undefined;_0x4d9481=_0x4d9481[_0x4d2e30];}return _0x4d9481;}export function setNestedValue(_0x536e7e,_0x183858,_0x4fe1a5){const _0x15dbe7=_0xe4aa3,_0x49742d={'aemSm':function(_0x3705ec,_0xde0e07){return _0x3705ec(_0xde0e07);},'mJOcH':function(_0x186526,_0x12f2bf){return _0x186526<_0x12f2bf;},'FGwKB':function(_0x5a77dc,_0x2aad2f){return _0x5a77dc in _0x2aad2f;},'ZufIC':function(_0x197de6,_0x996d41){return _0x197de6!==_0x996d41;},'DCNyH':'object'},_0x10a369=_0x49742d[_0x15dbe7(0x15e)](parseKeyPath,_0x183858);let _0x3e4e37=_0x536e7e;for(let _0x39a93c=0x0;_0x49742d['mJOcH'](_0x39a93c,_0x10a369['length']-0x1);_0x39a93c++){const _0x47c4b5=_0x10a369[_0x39a93c];(!_0x49742d['FGwKB'](_0x47c4b5,_0x3e4e37)||_0x49742d['ZufIC'](typeof _0x3e4e37[_0x47c4b5],_0x49742d[_0x15dbe7(0x15f)]))&&(_0x3e4e37[_0x47c4b5]={}),_0x3e4e37=_0x3e4e37[_0x47c4b5];}_0x3e4e37[_0x10a369[_0x10a369[_0x15dbe7(0x198)]-0x1]]=_0x4fe1a5;}export function deleteNestedValue(_0x5ea557,_0x524eca){const _0x256d8d=_0xe4aa3,_0x13f962={'ThQPE':function(_0x4ec43d,_0x11614b){return _0x4ec43d(_0x11614b);},'EVeZO':function(_0x2ea324,_0x3c2791){return _0x2ea324-_0x3c2791;},'VrQns':function(_0xc441d4,_0x144d2d){return _0xc441d4===_0x144d2d;},'jyPMm':function(_0x11c2bc,_0x5adf49){return _0x11c2bc!==_0x5adf49;},'ODnyd':function(_0x4ec128,_0x3e1efc){return _0x4ec128===_0x3e1efc;},'azZvy':function(_0xd13926,_0x1a3364){return _0xd13926!==_0x1a3364;},'DKTas':_0x256d8d(0x1a0)},_0x3ee761=_0x13f962['ThQPE'](parseKeyPath,_0x524eca);let _0x57d7de=_0x5ea557;for(let _0x219c93=0x0;_0x219c93<_0x13f962['EVeZO'](_0x3ee761['length'],0x1);_0x219c93++){if(_0x57d7de===null||_0x13f962['VrQns'](_0x57d7de,undefined)||_0x13f962[_0x256d8d(0x1b5)](typeof _0x57d7de,_0x256d8d(0x1a0)))return![];_0x57d7de=_0x57d7de[_0x3ee761[_0x219c93]];}if(_0x13f962[_0x256d8d(0x1b8)](_0x57d7de,null)||_0x13f962[_0x256d8d(0x16f)](_0x57d7de,undefined)||_0x13f962[_0x256d8d(0x1b9)](typeof _0x57d7de,_0x13f962[_0x256d8d(0x185)]))return![];const _0x228aec=_0x3ee761[_0x3ee761[_0x256d8d(0x198)]-0x1];if(_0x228aec in _0x57d7de)return delete _0x57d7de[_0x228aec],!![];return![];}function parseKeyPath(_0x8b4b4a){const _0x6cf5cf=_0xe4aa3,_0x43123f={'UZGmT':function(_0x3a9dff,_0x403135){return _0x3a9dff===_0x403135;},'SqDvw':'setupHeaders'},_0x4cc8ce=_0x8b4b4a['split']('.');return _0x4cc8ce[0x0]===_0x6cf5cf(0x163)&&(_0x4cc8ce[0x0]='headers'),_0x43123f[_0x6cf5cf(0x15d)](_0x4cc8ce[0x0],_0x6cf5cf(0x172))&&(_0x4cc8ce[0x0]=_0x43123f['SqDvw']),_0x4cc8ce;}export function formatSettings(_0x822044,_0x50a0a8=0x0){const _0x1f8214=_0xe4aa3,_0x469c38={'Smlsv':function(_0x38654d,_0x26b7ae){return _0x38654d===_0x26b7ae;}},_0x26d271=[],_0x18f6e6='\x20\x20'['repeat'](_0x50a0a8);for(const [_0x5e68a1,_0x214037]of Object['entries'](_0x822044)){if(_0x469c38['Smlsv'](_0x214037,undefined))continue;if(_0x469c38['Smlsv'](typeof _0x214037,_0x1f8214(0x1a0))&&_0x214037!==null){_0x26d271[_0x1f8214(0x16a)](''+_0x18f6e6+_0x5e68a1+':');for(const [_0x36f5a0,_0x54e1ec]of Object['entries'](_0x214037)){_0x26d271[_0x1f8214(0x16a)](_0x18f6e6+'\x20\x20'+_0x36f5a0+':\x20'+_0x54e1ec);}}else _0x26d271['push'](''+_0x18f6e6+_0x5e68a1+':\x20'+_0x214037);}return _0x26d271[_0x1f8214(0x1cd)]('\x0a');}
|
|
1
|
+
const _0x21984b=_0x52e6;(function(_0x21b23b,_0x3aba27){const _0x58119d=_0x52e6,_0x328b24=_0x21b23b();while(!![]){try{const _0x3ac9d3=parseInt(_0x58119d(0x12e))/0x1*(parseInt(_0x58119d(0x17b))/0x2)+parseInt(_0x58119d(0x150))/0x3*(-parseInt(_0x58119d(0x14b))/0x4)+-parseInt(_0x58119d(0x13f))/0x5+-parseInt(_0x58119d(0x16b))/0x6+-parseInt(_0x58119d(0x169))/0x7*(parseInt(_0x58119d(0x16e))/0x8)+-parseInt(_0x58119d(0x17c))/0x9*(parseInt(_0x58119d(0x183))/0xa)+-parseInt(_0x58119d(0x138))/0xb*(-parseInt(_0x58119d(0x14c))/0xc);if(_0x3ac9d3===_0x3aba27)break;else _0x328b24['push'](_0x328b24['shift']());}catch(_0x34adea){_0x328b24['push'](_0x328b24['shift']());}}}(_0xf29c,0xd109a));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';function _0xf29c(){const _0x1dfc64=['ranger-config','qEiAM','executablePath','string','OquHJ','userAgent','map','clipboard-read','args','stringify','--no-sandbox','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','env','LQSWk','-cli','contextOptions','isArray','object','KIZcI','zbnNA','vZPtH','jNnpg','chromium','-rangerwright.json','oAqVq','length','gnZGP','LcoEI','sbNdW','WfRTs','1odsqTp','tkHxh','tempAuthPath','allowInsecureLocalhost','BatxV','DJBkE','--disable-setuid-sandbox','getuid','split','PURXH','869rAJdtK','tBHdV','ignoreHTTPSErrors','now','legacy','headers','file','2972655wcFtUY','rangerDir','join','DrwPR','safeMode','dCUeV','YcQFI','pSKRh','xTlCw','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','Ebfnv','code','547752LMCotG','803508xhZiVf','gAMdS','replace','forWrite','12deYnqI','WGLsr','warn','includes','clipboard-write','fZXef','launchOptions','yBXvE','Environment\x20variable\x20','playwright-cli','\x22\x20to\x20legacy\x20path\x20','hQtII','headless','MHSTq','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','filter','zpmTG','sessions','cdpEndpoint','--allow-running-insecure-content','CgEBg','Eyudt','path','mRceO','none','63yhammq','cjFJR','8396376QPPJeq','local','nMihx','1418952eojHRx','baseUrl','Ebxdo','VxvOg','OcCBw','auth.json','qsLiR','nlYgu','message','OmWNc','lnwvZ','nVIUq','uwJpI','6578zjZQUU','35388VsxnMv','ranger-auth-','sJQfy','--allow-insecure-localhost','storageState','lkKty','settings.json','760yVGUyI','locations','push','PrVwA'];_0xf29c=function(){return _0x1dfc64;};return _0xf29c();}import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x4f4964,_0x4d7ab8){const _0xb3b6d6=_0x52e6,_0x32a31c={'eyepT':function(_0x3e5617,_0x14624d,_0x3163fb,_0x546aaf){return _0x3e5617(_0x14624d,_0x3163fb,_0x546aaf);},'WZUHB':function(_0x4bf196,_0x2bc408,_0x481414,_0x39f33d){return _0x4bf196(_0x2bc408,_0x481414,_0x39f33d);},'Ebfnv':function(_0x4df4c4,_0x97d56e,_0x4962de){return _0x4df4c4(_0x97d56e,_0x4962de);},'AVqcG':function(_0x865dc7,_0x48b82a){return _0x865dc7(_0x48b82a);},'lnwvZ':function(_0x362e88,_0x4d274e){return _0x362e88(_0x4d274e);}},_0x5b87cf=_0x32a31c['eyepT'](join,_0x4d7ab8,'ci',_0x4f4964),_0x359fa6=_0x32a31c['WZUHB'](join,_0x4d7ab8,_0xb3b6d6(0x16c),_0x4f4964),_0x4ac369=_0x32a31c[_0xb3b6d6(0x149)](join,_0x4d7ab8,_0x4f4964),_0x27b5f9=join(_0x4d7ab8,'local'),_0x3e75ab=join(_0x4d7ab8,'ci');if(existsSync(_0x5b87cf))return _0x5b87cf;if(existsSync(_0x359fa6))return _0x359fa6;if(_0x32a31c['AVqcG'](existsSync,_0x4ac369)&&(_0x4ac369!==_0x27b5f9&&_0x4ac369!==_0x3e75ab?!![]:_0x32a31c[_0xb3b6d6(0x178)](hasLegacyProfileFiles,_0x4ac369)))return _0x4ac369;return null;}export function getEnvDir(_0x126374,_0x15c96e={}){const _0x3824ff=_0x52e6,_0x7e9c59={'izOQy':function(_0x20833e){return _0x20833e();},'LQSWk':function(_0x4368c6,_0x4e9ff9,_0x4a80e4){return _0x4368c6(_0x4e9ff9,_0x4a80e4);},'nlYgu':function(_0xa4068a,_0x309dfb){return _0xa4068a(_0x309dfb);},'hKcGz':function(_0x160dd0,_0xbecc1a,_0x3c7b59){return _0x160dd0(_0xbecc1a,_0x3c7b59);},'nMihx':function(_0x44c650,_0x5cf06c,_0x414abd,_0x3a0633){return _0x44c650(_0x5cf06c,_0x414abd,_0x3a0633);},'CXvru':_0x3824ff(0x16c),'CgEBg':function(_0x56e0ff,_0x4bfc92,_0x38887f){return _0x56e0ff(_0x4bfc92,_0x38887f);}},_0x209e17=_0x7e9c59['izOQy'](getRangerDir),_0x4363f1=_0x7e9c59['LQSWk'](findEnvInRoot,_0x126374,_0x209e17);if(_0x4363f1){if(_0x15c96e[_0x3824ff(0x14f)]&&_0x7e9c59['nlYgu'](isLegacyEnvPath,_0x4363f1))throw _0x7e9c59[_0x3824ff(0x194)](legacyWriteError,_0x126374,_0x4363f1);return _0x4363f1;}const _0x3a9229=getRangerHomeDir();if(_0x3a9229!==_0x209e17){const _0x4fb4ae=_0x7e9c59['hKcGz'](findEnvInRoot,_0x126374,_0x3a9229);if(_0x4fb4ae){if(_0x15c96e['forWrite']&&_0x7e9c59[_0x3824ff(0x175)](isLegacyEnvPath,_0x4fb4ae))throw legacyWriteError(_0x126374,_0x4fb4ae);return _0x4fb4ae;}}const _0x160db3=_0x7e9c59[_0x3824ff(0x16d)](join,_0x3a9229,_0x7e9c59['CXvru'],_0x126374);if(_0x15c96e['forWrite'])throw _0x7e9c59[_0x3824ff(0x164)](legacyWriteError,_0x126374,_0x160db3);return _0x160db3;}function isLegacyEnvPath(_0x1ca636){const _0x58705b={'rAxHf':function(_0x49d18a,_0x8cbcfb){return _0x49d18a===_0x8cbcfb;}},_0x3a1141=getRangerDir(),_0x24ddf5=getRangerHomeDir();for(const _0x191781 of new Set([_0x3a1141,_0x24ddf5])){const _0x57e277=_0x191781['endsWith']('/')?_0x191781:_0x191781+'/';if(_0x58705b['rAxHf'](_0x1ca636,_0x191781)||_0x1ca636['startsWith'](_0x57e277))return!![];}return![];}function legacyWriteError(_0x1ce52f,_0x31e038){const _0x5e1f20=_0x52e6,_0x23a7a4={'pSKRh':function(_0x35ddeb,_0x2cf61b){return _0x35ddeb+_0x2cf61b;}};return new Error(_0x23a7a4[_0x5e1f20(0x146)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x1ce52f+_0x5e1f20(0x15a)+_0x31e038+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x5e1f20(0x148))+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}function _0x52e6(_0x16f7da,_0x72948b){_0x16f7da=_0x16f7da-0x123;const _0xf29ca5=_0xf29c();let _0x52e6b0=_0xf29ca5[_0x16f7da];return _0x52e6b0;}export function findExistingEnv(_0x2575a3,_0x1701cb){const _0x52145e=_0x52e6,_0x565f37={'OmWNc':function(_0x5f4425){return _0x5f4425();},'cjFJR':_0x52145e(0x13c),'DrwPR':function(_0x197a81,_0x155529,_0xbf6cf2,_0x4a2c1a){return _0x197a81(_0x155529,_0xbf6cf2,_0x4a2c1a);},'ElIOo':'local','FNJyg':function(_0x5eb927,_0x4cb8ca,_0x3efafe,_0x14e9a5){return _0x5eb927(_0x4cb8ca,_0x3efafe,_0x14e9a5);},'jPgAm':function(_0x5722db,_0x414b6f,_0x49e324){return _0x5722db(_0x414b6f,_0x49e324);},'rqjKp':function(_0x5d4577,_0x485dff){return _0x5d4577===_0x485dff;},'vZPtH':function(_0x57ce84,_0x34a8ca){return _0x57ce84===_0x34a8ca;}},_0x5ea303=_0x1701cb?.[_0x52145e(0x140)],_0x2d4893=_0x5ea303?[_0x5ea303]:[_0x565f37['OmWNc'](getRangerDir),_0x565f37[_0x52145e(0x177)](getRangerHomeDir)]['filter']((_0x256187,_0x1dccad,_0x29dcf1)=>_0x29dcf1['indexOf'](_0x256187)===_0x1dccad),_0x2a237a=_0x1701cb?.[_0x52145e(0x184)]??['ci',_0x52145e(0x16c),_0x565f37[_0x52145e(0x16a)]];for(const _0x196a48 of _0x2d4893){const _0x192901=join(_0x196a48,'local'),_0xeed8f2=join(_0x196a48,'ci'),_0x4719b8=[{'location':'ci','path':_0x565f37[_0x52145e(0x142)](join,_0x196a48,'ci',_0x2575a3)},{'location':_0x565f37['ElIOo'],'path':_0x565f37['FNJyg'](join,_0x196a48,_0x565f37['ElIOo'],_0x2575a3)},{'location':_0x565f37[_0x52145e(0x16a)],'path':_0x565f37['jPgAm'](join,_0x196a48,_0x2575a3)}];for(const _0x3e731f of _0x4719b8){if(_0x2a237a[_0x52145e(0x153)](_0x3e731f['location'])&&existsSync(_0x3e731f[_0x52145e(0x166)])){if(_0x565f37['rqjKp'](_0x3e731f['location'],'legacy')&&(_0x565f37[_0x52145e(0x124)](_0x3e731f[_0x52145e(0x166)],_0x192901)||_0x3e731f[_0x52145e(0x166)]===_0xeed8f2)&&!hasLegacyProfileFiles(_0x3e731f['path']))continue;return{'path':_0x3e731f[_0x52145e(0x166)],'location':_0x3e731f['location']};}}}return null;}function hasLegacyProfileFiles(_0x4fdd5a){const _0x381f85=_0x52e6,_0xdf5230={'BatxV':function(_0x486635,_0x1e2073){return _0x486635(_0x1e2073);},'oAqVq':function(_0x580bd5,_0x5ef302,_0x15cb5d){return _0x580bd5(_0x5ef302,_0x15cb5d);},'WfRTs':_0x381f85(0x182),'uiRNx':'auth.json.enc'};return _0xdf5230['BatxV'](existsSync,_0xdf5230[_0x381f85(0x128)](join,_0x4fdd5a,_0xdf5230[_0x381f85(0x12d)]))||existsSync(join(_0x4fdd5a,_0x381f85(0x173)))||_0xdf5230[_0x381f85(0x132)](existsSync,_0xdf5230[_0x381f85(0x128)](join,_0x4fdd5a,_0xdf5230['uiRNx']));}export function isEnvCi(_0x5a5e81){const _0x4b0b3b=_0x52e6,_0x940b4f={'MMOFp':function(_0x2e58c6,_0x4bd9a1,_0x290d25,_0x1863a3){return _0x2e58c6(_0x4bd9a1,_0x290d25,_0x1863a3);},'qsLiR':function(_0x2d23a9){return _0x2d23a9();},'RJMmv':function(_0xe84d9){return _0xe84d9();},'ycpVC':function(_0x310550,_0x34eb56){return _0x310550!==_0x34eb56;}};if(existsSync(_0x940b4f['MMOFp'](join,_0x940b4f[_0x4b0b3b(0x174)](getRangerDir),'ci',_0x5a5e81)))return!![];const _0x49805f=_0x940b4f['RJMmv'](getRangerHomeDir);if(_0x940b4f['ycpVC'](_0x49805f,getRangerDir())&&existsSync(join(_0x49805f,'ci',_0x5a5e81)))return!![];return![];}export async function cleanupTempFiles(_0x395085){const _0x52b267=_0x52e6,_0x180371={'PURXH':function(_0x5c1bd3,_0x5e7e49){return _0x5c1bd3!==_0x5e7e49;}},_0x4324ab=[_0x395085[_0x52b267(0x130)],_0x395085['configPath']]['filter'](Boolean);await Promise['all'](_0x4324ab[_0x52b267(0x18d)](_0x330a0a=>unlink(_0x330a0a)['catch'](_0xcb7b4a=>{const _0x328267=_0x52b267;_0x180371[_0x328267(0x137)](_0xcb7b4a[_0x328267(0x14a)],'ENOENT')&&console[_0x328267(0x152)](_0x328267(0x192)+_0x330a0a+':',_0xcb7b4a[_0x328267(0x176)]);})));}export function getSettingsPath(_0xa632c3){const _0x5be70d=_0x52e6,_0x19aff3={'XNcrs':function(_0x110d27,_0x4b0cd8,_0xf3c470){return _0x110d27(_0x4b0cd8,_0xf3c470);},'mXZjN':_0x5be70d(0x182)};return _0x19aff3['XNcrs'](join,getEnvDir(_0xa632c3),_0x19aff3['mXZjN']);}export async function loadSettings(_0x136e28){const _0x5e900a=_0x52e6,_0x13498c={'qEiAM':function(_0x16a651,_0x347f80){return _0x16a651(_0x347f80);}},_0x235d7b=getSettingsPath(_0x136e28);if(!_0x13498c[_0x5e900a(0x188)](existsSync,_0x235d7b))return{};try{const _0x1a719a=await readFile(_0x235d7b,'utf-8');return JSON['parse'](_0x1a719a);}catch{return{};}}export async function saveSettings(_0x1c04bf,_0x3553e2){const _0x27dacc=_0x52e6,_0x20fb48={'UqQxT':function(_0x1e5bd4,_0x2fef9f){return _0x1e5bd4(_0x2fef9f);},'MHSTq':function(_0x5b5bf9,_0x57f089){return _0x5b5bf9(_0x57f089);}},_0x997b1c=_0x20fb48['UqQxT'](getSettingsPath,_0x1c04bf),_0x3c7bc1=dirname(_0x997b1c);!_0x20fb48[_0x27dacc(0x15d)](existsSync,_0x3c7bc1)&&await mkdir(_0x3c7bc1,{'recursive':!![]}),await writeFile(_0x997b1c,JSON['stringify'](_0x3553e2,null,0x2));}export function resolveEnvVars(_0x35109b){const _0x3a2159=_0x52e6,_0x2ee24e={'BYDol':function(_0x5eec02,_0xa5cc54){return _0x5eec02===_0xa5cc54;}};if(_0x2ee24e['BYDol'](typeof _0x35109b,_0x3a2159(0x18a)))return _0x35109b[_0x3a2159(0x14e)](/\$\{(\w+)\}/g,(_0x2f701f,_0x3c764f)=>{const _0x6bdc97=_0x3a2159,_0x6a8d43=process[_0x6bdc97(0x193)][_0x3c764f];if(_0x6a8d43===undefined)throw new Error(_0x6bdc97(0x158)+_0x3c764f+'\x20is\x20not\x20set');return _0x6a8d43;});if(Array[_0x3a2159(0x197)](_0x35109b))return _0x35109b['map'](resolveEnvVars);if(_0x35109b&&typeof _0x35109b==='object')return Object['fromEntries'](Object['entries'](_0x35109b)['map'](([_0xfd6db5,_0x270f72])=>[_0xfd6db5,resolveEnvVars(_0x270f72)]));return _0x35109b;}const isRecord=_0x2831bf=>typeof _0x2831bf==='object'&&_0x2831bf!==null&&!Array['isArray'](_0x2831bf),asRecord=_0x4d1285=>isRecord(_0x4d1285)?_0x4d1285:undefined,mergeHeaders=(_0x1a3cd1,_0x44a760)=>{const _0x50061e=_0x52e6,_0x54fc98={'FliUU':function(_0x137baf,_0x45f8ce){return _0x137baf??_0x45f8ce;}},_0x53d701={..._0x1a3cd1??{},..._0x54fc98['FliUU'](_0x44a760,{})};return Object['keys'](_0x53d701)[_0x50061e(0x129)]?_0x53d701:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x21984b(0x163),'--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x21984b(0x17f)];export function buildBrowserOptionsFromSettings(_0x1d6c9b,_0x3cb018={}){const _0x14670a=_0x21984b,_0x367ced={'zbnNA':function(_0x57af4e,_0x2f1dce){return _0x57af4e(_0x2f1dce);},'KIZcI':function(_0x1e854a,_0x312fa2){return _0x1e854a(_0x312fa2);},'nVIUq':function(_0x3cd4de,_0x4a600b){return _0x3cd4de===_0x4a600b;},'tBHdV':'boolean','fxgcI':function(_0x1b1832,_0xd033f2,_0x599967){return _0x1b1832(_0xd033f2,_0x599967);},'UyOAt':function(_0xf6a659,_0x39e32e){return _0xf6a659(_0x39e32e);},'PrVwA':function(_0xb3cfed,_0x3a413e){return _0xb3cfed(_0x3a413e);}},_0x586503=_0x367ced['zbnNA'](asRecord,_0x1d6c9b['browser']),_0x2d2c1f={..._0x367ced[_0x14670a(0x199)](asRecord,_0x586503?.[_0x14670a(0x156)])??{}};_0x367ced['nVIUq'](typeof _0x3cb018['headless'],_0x367ced[_0x14670a(0x139)])&&(_0x2d2c1f[_0x14670a(0x15c)]=_0x3cb018[_0x14670a(0x15c)]);if(_0x1d6c9b['safeMode']){const _0x3cb336=_0x2d2c1f[_0x14670a(0x18f)]??[],_0x4a5e2b=SAFE_MODE_ARGS['filter'](_0x3b2d10=>!_0x3cb336['includes'](_0x3b2d10));_0x2d2c1f[_0x14670a(0x18f)]=[..._0x3cb336,..._0x4a5e2b];}if(_0x1d6c9b[_0x14670a(0x131)]){const _0x4cd6f7=_0x2d2c1f['args']??[],_0x11c830=ALLOW_LOCALHOST_ARGS['filter'](_0x38818a=>!_0x4cd6f7['includes'](_0x38818a));_0x2d2c1f[_0x14670a(0x18f)]=[..._0x4cd6f7,..._0x11c830];}const _0x4a99be={..._0x367ced[_0x14670a(0x123)](asRecord,_0x586503?.[_0x14670a(0x196)])??{}};_0x4a99be[_0x14670a(0x13a)]=!![];_0x367ced[_0x14670a(0x179)](typeof _0x1d6c9b['userAgent'],_0x14670a(0x18a))&&(_0x4a99be[_0x14670a(0x18c)]=_0x1d6c9b[_0x14670a(0x18c)]);const _0x143d41=_0x367ced['fxgcI'](mergeHeaders,_0x367ced['UyOAt'](asRecord,_0x4a99be['extraHTTPHeaders']),_0x367ced[_0x14670a(0x186)](asRecord,_0x1d6c9b[_0x14670a(0x13d)]));return _0x143d41?_0x4a99be['extraHTTPHeaders']=_0x143d41:delete _0x4a99be['extraHTTPHeaders'],_0x3cb018['storageStatePath']&&(_0x4a99be[_0x14670a(0x180)]=_0x3cb018['storageStatePath']),{'launchOptions':_0x2d2c1f,'contextOptions':_0x4a99be};}export async function resolveProfileStorageState(_0x47da91){const _0x182f80={'bndSI':function(_0x1661fb,_0x2be872){return _0x1661fb(_0x2be872);}};return resolveLocalAuthPath(_0x182f80['bndSI'](getEnvDir,_0x47da91));}async function resolveLocalAuthPath(_0x5cd4f0){const _0x103fcf=_0x21984b,_0x2526c9={'eZrkd':'auth.json.enc','zwrVg':_0x103fcf(0x173),'gAMdS':function(_0x277eda,_0x16c649){return _0x277eda(_0x16c649);},'EDGpY':_0x103fcf(0x15e),'YoTLz':function(_0x474429,_0x59e528){return _0x474429 instanceof _0x59e528;},'jNnpg':function(_0x2922b9,_0x299b0a){return _0x2922b9(_0x299b0a);},'sJQfy':function(_0x51a95b,_0x57ea88){return _0x51a95b(_0x57ea88);}},_0x53afd2=join(_0x5cd4f0,_0x2526c9['eZrkd']),_0x14b483=join(_0x5cd4f0,_0x2526c9['zwrVg']);if(_0x2526c9[_0x103fcf(0x14d)](existsSync,_0x53afd2))try{const _0x2832f9=await getToken();if(!_0x2832f9)throw new Error(_0x2526c9['EDGpY']);const _0x46525d=await readFile(_0x53afd2),_0x2c41ec=decrypt(_0x46525d,_0x2832f9),_0x135cf1=join(tmpdir(),_0x103fcf(0x17d)+Date['now']()+'.json');return await writeFile(_0x135cf1,_0x2c41ec),{'storageStatePath':_0x135cf1,'tempAuthPath':_0x135cf1};}catch(_0x31e811){const _0x297c41=_0x2526c9['YoTLz'](_0x31e811,Error)?_0x31e811['message']:_0x2526c9[_0x103fcf(0x125)](String,_0x31e811);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x297c41);}if(_0x2526c9[_0x103fcf(0x17e)](existsSync,_0x14b483))return{'storageStatePath':_0x14b483};return{};}export async function buildPlaywrightConfig(_0x4288f0,_0x18bf42,_0x30e419,_0x22aa3d,_0x12cc09){const _0x1192da=_0x21984b,_0x349bbb={'LcoEI':function(_0x356919,_0x4701aa,_0x5a0d5f,_0x17c5e8,_0x4972d8,_0x351bb7,_0x253228){return _0x356919(_0x4701aa,_0x5a0d5f,_0x17c5e8,_0x4972d8,_0x351bb7,_0x253228);},'gOGgN':function(_0x33f583,_0x208784){return _0x33f583(_0x208784);},'iPSEI':'stagehand'};if(_0x12cc09)return _0x349bbb[_0x1192da(0x12b)](buildPlaywrightConfigCore,_0x4288f0,_0x12cc09,_0x18bf42,_0x30e419,_0x22aa3d,'stagehand');const {storageStatePath:_0x1e7537,tempAuthPath:_0x24d37a}=await _0x349bbb['gOGgN'](resolveLocalAuthPath,getEnvDir(_0x18bf42));try{const _0x24434b=await buildPlaywrightConfigCore(_0x4288f0,_0x1e7537,_0x18bf42,_0x30e419,_0x22aa3d,_0x349bbb['iPSEI']);return{..._0x24434b,'tempAuthPath':_0x24d37a};}catch(_0x240e92){_0x24d37a&&await _0x349bbb['gOGgN'](unlink,_0x24d37a)['catch'](()=>{});throw _0x240e92;}}export async function buildPlaywrightConfigCore(_0x4cf253,_0x37130a,_0x54e430,_0x1525af,_0x13bb88,_0xbabd2b='stagehand'){const _0x4866ae=_0x21984b,_0x59ef65={'pxFaA':function(_0x89b6cd,_0x2475b7,_0x5d145b){return _0x89b6cd(_0x2475b7,_0x5d145b);},'ovqni':_0x4866ae(0x154),'hQtII':function(_0x110074,_0x21db45,_0xe3a518,_0x2b41f7){return _0x110074(_0x21db45,_0xe3a518,_0x2b41f7);},'cigSw':_0x4866ae(0x161),'BRTwK':function(_0x2808bf,_0x16cad2){return _0x2808bf(_0x16cad2);},'eTuxV':_0x4866ae(0x126),'gojMb':_0x4866ae(0x13e),'ndXWR':'core','mRceO':'install','UjmLf':'allow','OquHJ':function(_0x80aaa2,_0x30aba3){return _0x80aaa2===_0x30aba3;},'lkKty':function(_0x2522e8,_0x1651c2){return _0x2522e8(_0x1651c2);},'gnZGP':_0x4866ae(0x195)},_0x5f146d=_0x1525af||randomUUID(),_0x1917dd=_0x59ef65[_0x4866ae(0x15b)](join,getRangerDir(),_0x59ef65['cigSw'],_0x5f146d),_0x164b44=_0x59ef65['BRTwK'](Boolean,_0x4cf253[_0x4866ae(0x162)]),_0x1d6b36=_0x164b44?{'browserName':_0x59ef65['eTuxV'],'cdpEndpoint':_0x4cf253['cdpEndpoint']}:((()=>{const _0x5bd3e1=_0x4866ae,{launchOptions:_0x43ea41,contextOptions:_0x158a25}=_0x59ef65['pxFaA'](buildBrowserOptionsFromSettings,_0x4cf253,{'headless':_0x13bb88?![]:_0x4cf253['headless']??!![],'storageStatePath':_0x37130a});if(process[_0x5bd3e1(0x135)]?.()===0x0){const _0x52b89a=['--no-sandbox','--disable-setuid-sandbox'],_0x37880d=_0x43ea41['args']??[],_0x1871ed=_0x52b89a[_0x5bd3e1(0x15f)](_0x2185fb=>!_0x37880d['includes'](_0x2185fb));_0x43ea41['args']=[..._0x37880d,..._0x1871ed];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x43ea41,'contextOptions':{..._0x158a25,'permissions':[_0x5bd3e1(0x18e),_0x59ef65['ovqni']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x2797cd=_0xbabd2b===_0x4866ae(0x159)?{'browser':_0x1d6b36,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1917dd,'outputMode':_0x59ef65['gojMb'],'codegen':_0x4866ae(0x168)}:{'name':_0x54e430,'browser':_0x1d6b36,'capabilities':[_0x59ef65['ndXWR'],'tabs',_0x59ef65[_0x4866ae(0x167)],'pdf','vision'],'imageResponses':_0x59ef65['UjmLf'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1917dd};if(!_0x164b44){const _0x4dd60b=_0x2797cd['browser'],_0x4f4a38=_0x4dd60b['contextOptions'];if(_0x59ef65[_0x4866ae(0x18b)](_0x4f4a38['userAgent'],undefined))delete _0x4f4a38['userAgent'];if(_0x4f4a38['storageState']===undefined)delete _0x4f4a38[_0x4866ae(0x180)];}const _0x3c15ed=join(tmpdir(),_0x4866ae(0x187));!_0x59ef65[_0x4866ae(0x181)](existsSync,_0x3c15ed)&&await mkdir(_0x3c15ed,{'recursive':!![]});const _0x7f5678=_0x59ef65[_0x4866ae(0x18b)](_0xbabd2b,_0x4866ae(0x159))?_0x59ef65[_0x4866ae(0x12a)]:'',_0x519245=join(_0x3c15ed,_0x54e430+'-'+Date['now']()+_0x7f5678+'.json');return await writeFile(_0x519245,JSON[_0x4866ae(0x190)](_0x2797cd,null,0x2)),{'configPath':_0x519245,'storageStatePath':_0x37130a};}export async function buildPlaywrightCliConfig(_0x1a6685,_0x349161,_0x364098,_0x51ab82,_0x5b9327){const _0x453054=_0x21984b,_0x367e47={'WGLsr':'playwright-cli','LmARX':function(_0x21c99f,_0x328949){return _0x21c99f(_0x328949);},'yBXvE':function(_0x193454,_0x441777,_0x158aa8,_0x37b5b4,_0x5e5c18,_0x744405,_0x3c2c88){return _0x193454(_0x441777,_0x158aa8,_0x37b5b4,_0x5e5c18,_0x744405,_0x3c2c88);}};if(_0x5b9327)return buildPlaywrightConfigCore(_0x1a6685,_0x5b9327,_0x349161,_0x364098,_0x51ab82,_0x367e47[_0x453054(0x151)]);const {storageStatePath:_0x3cc1f0,tempAuthPath:_0x29e51b}=await _0x367e47['LmARX'](resolveLocalAuthPath,getEnvDir(_0x349161));try{const _0x5d12c0=await _0x367e47[_0x453054(0x157)](buildPlaywrightConfigCore,_0x1a6685,_0x3cc1f0,_0x349161,_0x364098,_0x51ab82,'playwright-cli');return{..._0x5d12c0,'tempAuthPath':_0x29e51b};}catch(_0x40f352){_0x29e51b&&await unlink(_0x29e51b)['catch'](()=>{});throw _0x40f352;}}export async function buildRangerwrightCliConfig(_0x54b62c,_0x3d0a1e,_0x3bf86c,_0x33e768,_0x5c624d){const _0x29b939=_0x21984b,_0x592e9a={'DHXsl':'clipboard-read','sbNdW':function(_0x39c98e,_0x2445a9){return _0x39c98e(_0x2445a9);},'AxxHv':function(_0x28f554){return _0x28f554();},'QZJPS':'chromium','ehuDx':function(_0xb535c1,_0x2bdcda){return _0xb535c1===_0x2bdcda;},'tjMvn':function(_0x99ef41,_0x7f6833,_0x5e84aa){return _0x99ef41(_0x7f6833,_0x5e84aa);},'mepEA':_0x29b939(0x187)},{storageStatePath:_0x133952,tempAuthPath:_0x4563b6}=_0x5c624d?{'storageStatePath':_0x5c624d,'tempAuthPath':undefined}:await resolveLocalAuthPath(_0x592e9a[_0x29b939(0x12c)](getEnvDir,_0x3d0a1e)),_0x513738=_0x3bf86c||randomUUID(),_0x36b01a=join(_0x592e9a['AxxHv'](getRangerDir),'sessions',_0x513738),_0x408d06=Boolean(_0x54b62c[_0x29b939(0x162)]),_0x97c5a=_0x408d06?{'browserName':_0x592e9a['QZJPS'],'cdpEndpoint':_0x54b62c[_0x29b939(0x162)]}:((()=>{const _0x35b557=_0x29b939,{launchOptions:_0x2139dd,contextOptions:_0xb2573f}=buildBrowserOptionsFromSettings(_0x54b62c,{'headless':_0x33e768?![]:_0x54b62c['headless']??!![],'storageStatePath':_0x133952});if(process['getuid']?.()===0x0){const _0x47326c=[_0x35b557(0x191),_0x35b557(0x134)],_0x5bc921=_0x2139dd[_0x35b557(0x18f)]??[],_0x429566=_0x47326c[_0x35b557(0x15f)](_0x3e5b05=>!_0x5bc921['includes'](_0x3e5b05));_0x2139dd[_0x35b557(0x18f)]=[..._0x5bc921,..._0x429566];}return{'browserName':_0x35b557(0x126),'launchOptions':_0x2139dd,'contextOptions':{..._0xb2573f,'permissions':[_0x592e9a['DHXsl'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x408d06){const _0x57a8db=_0x97c5a['contextOptions'];if(_0x57a8db){if(_0x592e9a['ehuDx'](_0x57a8db['userAgent'],undefined))delete _0x57a8db['userAgent'];if(_0x57a8db['storageState']===undefined)delete _0x57a8db[_0x29b939(0x180)];}}const _0x252511={'browser':_0x97c5a,'outputDir':_0x36b01a,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x24fed;try{const _0x312245=_0x592e9a['tjMvn'](join,_0x592e9a['AxxHv'](tmpdir),_0x592e9a['mepEA']);!existsSync(_0x312245)&&await mkdir(_0x312245,{'recursive':!![]}),_0x24fed=join(_0x312245,_0x3d0a1e+'-'+Date[_0x29b939(0x13b)]()+_0x29b939(0x127)),await _0x592e9a['tjMvn'](writeFile,_0x24fed,JSON[_0x29b939(0x190)](_0x252511,null,0x2));}catch(_0x12379a){_0x4563b6&&await unlink(_0x4563b6)['catch'](()=>{});throw _0x12379a;}return{'configPath':_0x24fed,'storageStatePath':_0x133952,'tempAuthPath':_0x4563b6,'outputDir':_0x36b01a};}export async function buildNovaActCliConfig(_0x412133,_0x10247b,_0x3076df,_0x39fd1c,_0x42c7ab){const _0x2813c5=_0x21984b,_0x4b47d6={'fLTyS':function(_0x241053){return _0x241053();},'DJBkE':'nova-user-data','tkHxh':'Default','YcQFI':function(_0x1e2f54,_0x26a2b2){return _0x1e2f54===_0x26a2b2;},'AKIYx':_0x2813c5(0x134),'sMexB':'string','Ebxdo':function(_0xb69d90,_0x2eb388){return _0xb69d90(_0x2eb388);},'uwJpI':function(_0x5cc791,_0x5b7f8f){return _0x5cc791(_0x5b7f8f);}},{storageStatePath:_0x4a78b5,tempAuthPath:_0x4da9c5}=_0x42c7ab?{'storageStatePath':_0x42c7ab,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x10247b)),_0x48f9c2=_0x3076df||_0x4b47d6['fLTyS'](randomUUID),_0x1af0bf=join(_0x4b47d6['fLTyS'](getRangerDir),_0x2813c5(0x161),_0x48f9c2),_0x37ba29=join(_0x1af0bf,_0x4b47d6[_0x2813c5(0x133)]),_0x392a94=_0x4a78b5?join(_0x37ba29,_0x4b47d6[_0x2813c5(0x12f)]):undefined,{launchOptions:_0x290daf,contextOptions:_0x1e4d5d}=buildBrowserOptionsFromSettings(_0x412133,{'headless':_0x39fd1c?![]:_0x412133[_0x2813c5(0x15c)]??!![],'storageStatePath':_0x4a78b5});if(_0x4b47d6[_0x2813c5(0x145)](process['getuid']?.(),0x0)){const _0xadfecd=[_0x2813c5(0x191),_0x4b47d6['AKIYx']],_0x14394a=_0x290daf['args']??[],_0x3936ce=_0xadfecd[_0x2813c5(0x15f)](_0x23e037=>!_0x14394a[_0x2813c5(0x153)](_0x23e037));_0x290daf['args']=[..._0x14394a,..._0x3936ce];}const _0x1c1753=typeof _0x290daf['executablePath']===_0x2813c5(0x18a)?_0x290daf[_0x2813c5(0x189)]:_0x4a78b5?chromium[_0x2813c5(0x189)]():undefined;return{'storageStatePath':_0x4a78b5,'tempAuthPath':_0x4da9c5,'baseUrl':_0x412133[_0x2813c5(0x16f)],'headless':Boolean(_0x290daf['headless']),'userDataDir':_0x37ba29,'browserProfilePath':_0x392a94,'executablePath':_0x1c1753,'launchArgs':Array[_0x2813c5(0x197)](_0x290daf[_0x2813c5(0x18f)])?_0x290daf[_0x2813c5(0x18f)]['filter'](_0x3bc4b1=>typeof _0x3bc4b1===_0x2813c5(0x18a)):[],'userAgent':typeof _0x1e4d5d['userAgent']===_0x4b47d6['sMexB']?_0x1e4d5d[_0x2813c5(0x18c)]:undefined,'extraHTTPHeaders':_0x1e4d5d['extraHTTPHeaders'],'allowInsecureLocalhost':_0x4b47d6[_0x2813c5(0x170)](Boolean,_0x412133['allowInsecureLocalhost']),'safeMode':Boolean(_0x412133[_0x2813c5(0x143)]),'cdpEndpoint':_0x412133['cdpEndpoint'],'isCdpMode':_0x4b47d6[_0x2813c5(0x17a)](Boolean,_0x412133['cdpEndpoint'])};}export function getNestedValue(_0x390254,_0x3f4d16){const _0x3ff804=_0x21984b,_0x2f8036={'kBthB':function(_0x301655,_0x4ef3bb){return _0x301655(_0x4ef3bb);},'dCUeV':function(_0x27b772,_0x5ac387){return _0x27b772===_0x5ac387;},'xTlCw':'object'},_0x2b057d=_0x2f8036['kBthB'](parseKeyPath,_0x3f4d16);let _0x3519f7=_0x390254;for(const _0x46e487 of _0x2b057d){if(_0x2f8036[_0x3ff804(0x144)](_0x3519f7,null)||_0x2f8036['dCUeV'](_0x3519f7,undefined)||typeof _0x3519f7!==_0x2f8036[_0x3ff804(0x147)])return undefined;_0x3519f7=_0x3519f7[_0x46e487];}return _0x3519f7;}export function setNestedValue(_0x2f508f,_0x47be29,_0x18cb8d){const _0x111c17=_0x21984b,_0x5817ce={'ETJmn':function(_0x4bce34,_0x1d2861){return _0x4bce34<_0x1d2861;},'ZYvUM':function(_0x2fc9d8,_0x520fb4){return _0x2fc9d8 in _0x520fb4;},'yCkaZ':function(_0x289afe,_0x587da8){return _0x289afe!==_0x587da8;},'UUkhU':function(_0x5edd93,_0x42a984){return _0x5edd93-_0x42a984;}},_0x38ad7c=parseKeyPath(_0x47be29);let _0x299217=_0x2f508f;for(let _0x136b80=0x0;_0x5817ce['ETJmn'](_0x136b80,_0x38ad7c['length']-0x1);_0x136b80++){const _0x12c229=_0x38ad7c[_0x136b80];(!_0x5817ce['ZYvUM'](_0x12c229,_0x299217)||_0x5817ce['yCkaZ'](typeof _0x299217[_0x12c229],_0x111c17(0x198)))&&(_0x299217[_0x12c229]={}),_0x299217=_0x299217[_0x12c229];}_0x299217[_0x38ad7c[_0x5817ce['UUkhU'](_0x38ad7c[_0x111c17(0x129)],0x1)]]=_0x18cb8d;}export function deleteNestedValue(_0x45572d,_0x2aba92){const _0x2e6e25=_0x21984b,_0x48c533={'bbLvD':function(_0x1a86b2,_0x48937a){return _0x1a86b2(_0x48937a);},'mgNvq':function(_0x235cd1,_0x1fffef){return _0x235cd1<_0x1fffef;},'iKOix':function(_0x3f4322,_0x821c66){return _0x3f4322-_0x821c66;},'OcCBw':function(_0x22baa2,_0x5b0b2b){return _0x22baa2===_0x5b0b2b;},'Eyudt':_0x2e6e25(0x198),'VxvOg':function(_0x3fc83b,_0x35030c){return _0x3fc83b in _0x35030c;}},_0x19ba2c=_0x48c533['bbLvD'](parseKeyPath,_0x2aba92);let _0xb6e22e=_0x45572d;for(let _0x1fe2e6=0x0;_0x48c533['mgNvq'](_0x1fe2e6,_0x48c533['iKOix'](_0x19ba2c['length'],0x1));_0x1fe2e6++){if(_0x48c533[_0x2e6e25(0x172)](_0xb6e22e,null)||_0xb6e22e===undefined||typeof _0xb6e22e!=='object')return![];_0xb6e22e=_0xb6e22e[_0x19ba2c[_0x1fe2e6]];}if(_0xb6e22e===null||_0x48c533['OcCBw'](_0xb6e22e,undefined)||typeof _0xb6e22e!==_0x48c533[_0x2e6e25(0x165)])return![];const _0x4248b5=_0x19ba2c[_0x48c533['iKOix'](_0x19ba2c['length'],0x1)];if(_0x48c533[_0x2e6e25(0x171)](_0x4248b5,_0xb6e22e))return delete _0xb6e22e[_0x4248b5],!![];return![];}function parseKeyPath(_0x1d7ddc){const _0x48314a=_0x21984b,_0x43a4d7={'fmWkH':function(_0x2e2939,_0x470cdf){return _0x2e2939===_0x470cdf;},'fZXef':_0x48314a(0x13d),'RdDym':'setupHeader'},_0x5941db=_0x1d7ddc[_0x48314a(0x136)]('.');return _0x43a4d7['fmWkH'](_0x5941db[0x0],'header')&&(_0x5941db[0x0]=_0x43a4d7[_0x48314a(0x155)]),_0x5941db[0x0]===_0x43a4d7['RdDym']&&(_0x5941db[0x0]='setupHeaders'),_0x5941db;}export function formatSettings(_0x342a40,_0x517494=0x0){const _0x254eba=_0x21984b,_0x31f395={'zpmTG':function(_0x23afaf,_0x24c2eb){return _0x23afaf===_0x24c2eb;},'zLpCj':'object','FAFLc':function(_0x22c23f,_0x41db99){return _0x22c23f!==_0x41db99;}},_0xf26631=[],_0x3b0a3c='\x20\x20'['repeat'](_0x517494);for(const [_0x1caf21,_0x2405c5]of Object['entries'](_0x342a40)){if(_0x2405c5===undefined)continue;if(_0x31f395[_0x254eba(0x160)](typeof _0x2405c5,_0x31f395['zLpCj'])&&_0x31f395['FAFLc'](_0x2405c5,null)){_0xf26631[_0x254eba(0x185)](''+_0x3b0a3c+_0x1caf21+':');for(const [_0x37188e,_0x531dcd]of Object['entries'](_0x2405c5)){_0xf26631[_0x254eba(0x185)](_0x3b0a3c+'\x20\x20'+_0x37188e+':\x20'+_0x531dcd);}}else _0xf26631[_0x254eba(0x185)](''+_0x3b0a3c+_0x1caf21+':\x20'+_0x2405c5);}return _0xf26631[_0x254eba(0x141)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5a32(_0x2a71fa,_0xc648a3){_0x2a71fa=_0x2a71fa-0xe3;const _0x5b3a85=_0x5b3a();let _0x5a32a8=_0x5b3a85[_0x2a71fa];return _0x5a32a8;}(function(_0x3a8ad6,_0x4655ef){const _0x196322=_0x5a32,_0xb4c5c1=_0x3a8ad6();while(!![]){try{const _0xc8d511=parseInt(_0x196322(0xe3))/0x1+-parseInt(_0x196322(0xe6))/0x2*(parseInt(_0x196322(0xe9))/0x3)+-parseInt(_0x196322(0xed))/0x4+-parseInt(_0x196322(0xe4))/0x5*(-parseInt(_0x196322(0xeb))/0x6)+-parseInt(_0x196322(0xe5))/0x7*(parseInt(_0x196322(0xe8))/0x8)+parseInt(_0x196322(0xee))/0x9*(-parseInt(_0x196322(0xef))/0xa)+parseInt(_0x196322(0xf0))/0xb;if(_0xc8d511===_0x4655ef)break;else _0xb4c5c1['push'](_0xb4c5c1['shift']());}catch(_0x2d1ace){_0xb4c5c1['push'](_0xb4c5c1['shift']());}}}(_0x5b3a,0xea534));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x5b3a(){const _0x422797=['16801767pCXCoU','10FtTUHx','40909550yrZAgH','XnlqQ','1412332jQmqCD','137405ZznBca','7BvXllE','1116446jPywsw','KPMaZ','5861992xegoSZ','3mXqAyQ','skills','48kHjOPy','fViYt','4934396PxLTzd'];_0x5b3a=function(){return _0x422797;};return _0x5b3a();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x5a2c47){const _0x4a56ae=_0x5a32,_0x28d934={'XnlqQ':function(_0x2b6d80,_0x532470,_0x35548f,_0x412df2,_0x276b06){return _0x2b6d80(_0x532470,_0x35548f,_0x412df2,_0x276b06);},'fViYt':function(_0x20a9c1,_0x77f599,_0x347335){return _0x20a9c1(_0x77f599,_0x347335);},'GPIRj':'utf-8'},_0xc7644=_0x28d934[_0x4a56ae(0xf1)](join,__dirname,'..','..',_0x4a56ae(0xea)),_0x80e7b5=join(_0xc7644,_0x5a2c47);try{return _0x28d934[_0x4a56ae(0xec)](readFileSync,_0x80e7b5,_0x28d934['GPIRj']);}catch{return'';}}export function getRangerSkillContent(){const _0xcba84f=_0x5a32,_0x3cd576={'KPMaZ':function(_0x198d06,_0x30b989){return _0x198d06(_0x30b989);},'qjawe':'ranger/SKILL.md'};return _0x3cd576[_0xcba84f(0xe7)](readSkillContent,_0x3cd576['qjawe']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x21cc63=_0x3253;(function(_0x20ef3d,_0x4c0ebc){const _0x1e2f1d=_0x3253,_0x1e2321=_0x20ef3d();while(!![]){try{const _0x298455=-parseInt(_0x1e2f1d(0x173))/0x1+-parseInt(_0x1e2f1d(0x170))/0x2+-parseInt(_0x1e2f1d(0x163))/0x3+parseInt(_0x1e2f1d(0x162))/0x4+parseInt(_0x1e2f1d(0x171))/0x5+parseInt(_0x1e2f1d(0x168))/0x6+parseInt(_0x1e2f1d(0x166))/0x7*(parseInt(_0x1e2f1d(0x16f))/0x8);if(_0x298455===_0x4c0ebc)break;else _0x1e2321['push'](_0x1e2321['shift']());}catch(_0x5ac575){_0x1e2321['push'](_0x1e2321['shift']());}}}(_0x3d68,0xb1648));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x3253(_0x41557a,_0x1183fa){_0x41557a=_0x41557a-0x15a;const _0x3d6815=_0x3d68();let _0x32537d=_0x3d6815[_0x41557a];return _0x32537d;}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=[_0x21cc63(0x165)];export const DEPRECATED_SKILLS=['e2e-test-recommender','bug-bash','feature-tracker'];export async function installSkill(_0x13c734,_0x3e5443={}){const _0x32abb0=_0x21cc63,_0x2753fc={'StFAt':_0x32abb0(0x15c),'bNVGo':'claude','PVeZw':function(_0x7d11ed,_0x1ec080,_0x391dcd){return _0x7d11ed(_0x1ec080,_0x391dcd);},'FycGi':function(_0x4bebc7,_0x570872){return _0x4bebc7(_0x570872);},'rgaEo':function(_0x246c88,_0x88ef8c){return _0x246c88(_0x88ef8c);},'Vqreq':function(_0x2cba14,_0x3a6911){return _0x2cba14&&_0x3a6911;},'ciUmI':function(_0xa8bf66,_0x33a437){return _0xa8bf66===_0x33a437;},'Dzwvv':'opencode','dZcCY':function(_0x5bb870,_0x5c13df,_0x4c09cf){return _0x5bb870(_0x5c13df,_0x4c09cf);},'vHpwW':'SKILL.md','ayrof':function(_0x48cfdd,_0x523d65,_0x2b2a72,_0x45ab25){return _0x48cfdd(_0x523d65,_0x2b2a72,_0x45ab25);},'oxbIS':'utf-8','TNpii':function(_0xa92956,_0x2bc238){return _0xa92956(_0x2bc238);}},{level:level=_0x2753fc['StFAt'],cliVersion:_0x335aad,platform:platform=_0x2753fc[_0x32abb0(0x160)]}=_0x3e5443,_0x3c5e56=getSourceSkillsDir(),_0x4e8828=_0x2753fc[_0x32abb0(0x167)](join,_0x3c5e56,_0x13c734),_0x1646a3=join(_0x3c5e56,_0x13c734+'.md'),_0x395483=_0x2753fc[_0x32abb0(0x169)](existsSync,_0x4e8828)&&_0x2753fc['FycGi'](statSync,_0x4e8828)['isDirectory']()&&_0x2753fc[_0x32abb0(0x169)](existsSync,join(_0x4e8828,_0x32abb0(0x164))),_0x3e9bf8=_0x2753fc['rgaEo'](existsSync,_0x1646a3);if(_0x2753fc['Vqreq'](!_0x395483,!_0x3e9bf8))return console[_0x32abb0(0x176)]('\x20\x20Skill\x20not\x20found:\x20'+_0x13c734),![];const _0x141feb=_0x2753fc['ciUmI'](platform,_0x2753fc[_0x32abb0(0x174)])?getOpencodeSkillsDir(level):getSkillsDir(level),_0x6a80ec=_0x2753fc['PVeZw'](join,_0x141feb,_0x13c734);await _0x2753fc[_0x32abb0(0x16e)](mkdir,_0x6a80ec,{'recursive':!![]});let _0x3f64d4,_0x2df41d=[];if(_0x395483){const _0x55eaea=await _0x2753fc[_0x32abb0(0x169)](readdir,_0x4e8828),_0x13b12e=_0x55eaea['filter'](_0x31f15d=>_0x31f15d[_0x32abb0(0x172)]('.md'));for(const _0x46d75e of _0x13b12e){const _0x3f671e=join(_0x4e8828,_0x46d75e),_0x28d954=_0x2753fc[_0x32abb0(0x167)](join,_0x6a80ec,_0x46d75e);await copyFile(_0x3f671e,_0x28d954),_0x2df41d['push'](_0x46d75e);}_0x3f64d4=await _0x2753fc['PVeZw'](readFile,join(_0x4e8828,'SKILL.md'),'utf-8');}else{_0x3f64d4=await _0x2753fc['dZcCY'](readFile,_0x1646a3,_0x32abb0(0x15d));const _0x32bbd7=join(_0x6a80ec,_0x2753fc['vHpwW']);await _0x2753fc['ayrof'](writeFile,_0x32bbd7,_0x3f64d4,_0x2753fc[_0x32abb0(0x15a)]),_0x2df41d['push']('SKILL.md');}const {name:_0x1ff218}=_0x2753fc[_0x32abb0(0x16c)](parseFrontmatter,_0x3f64d4);return console[_0x32abb0(0x177)](_0x32abb0(0x16b)+_0x1ff218),console[_0x32abb0(0x177)](_0x32abb0(0x175)+_0x6a80ec),_0x2df41d[_0x32abb0(0x161)]>0x1&&console['log']('\x20\x20Files:\x20'+_0x2df41d['join'](',\x20')),logLocalAgentInstallation(_0x13c734,{'skillDisplayName':_0x1ff218,'installLevel':level},_0x335aad)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0xe80393=_0x21cc63,_0x33260d={'yAtgs':function(_0x37d6ec,_0x1690d1,_0x4d8aa0,_0x3f1b7d,_0x3410eb){return _0x37d6ec(_0x1690d1,_0x4d8aa0,_0x3f1b7d,_0x3410eb);},'CGtWf':_0xe80393(0x15b)},_0x5998d7=[_0x33260d[_0xe80393(0x178)](join,__dirname,'..','..',_0x33260d['CGtWf']),join(__dirname,'..','..','..','skills')];for(const _0x48c53d of _0x5998d7){if(existsSync(_0x48c53d))return _0x48c53d;}return _0x5998d7[0x0];}function _0x3d68(){const _0x474a05=['bNVGo','length','4075348MfCJXy','3767571IPVMLy','SKILL.md','ranger','35413BiIqkI','PVeZw','4797894KdVfdm','FycGi','\x20\x20Removed\x20deprecated\x20skill:\x20','\x20\x20Installed\x20skill:\x20','TNpii','trim','dZcCY','2808PaWFqZ','953598ETVwue','167140uWmJSt','endsWith','1168367AxbwDY','Dzwvv','\x20\x20Location:\x20','warn','log','yAtgs','oxbIS','skills','project','utf-8','qjHyX','Invalid\x20skill\x20frontmatter'];_0x3d68=function(){return _0x474a05;};return _0x3d68();}function parseFrontmatter(_0x499633){const _0x428b4f=_0x21cc63,_0x3379f4={'qjHyX':_0x428b4f(0x15f)},_0x27041b=_0x499633['match'](/^---\n([\s\S]+?)\n---/);if(!_0x27041b)throw new Error(_0x3379f4[_0x428b4f(0x15e)]);const _0x553b0c=_0x27041b[0x1],_0x34a44e=_0x553b0c['match'](/name:\s*(.+)/),_0x351edc=_0x553b0c['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x34a44e?.[0x1][_0x428b4f(0x16d)]()||'','description':_0x351edc?.[0x1][_0x428b4f(0x16d)]()||''};}export async function removeSkill(_0x92852,_0x445179){const _0x4c83f3=_0x21cc63,_0x501258={'PZNRE':function(_0x5a1d30,_0x4e1aa7,_0x4ee427){return _0x5a1d30(_0x4e1aa7,_0x4ee427);}},_0x25f03c=getSkillsDir(_0x445179),_0x254d6b=_0x501258['PZNRE'](join,_0x25f03c,_0x92852);if(!existsSync(_0x254d6b))return![];try{return await rm(_0x254d6b,{'recursive':!![]}),console[_0x4c83f3(0x177)](_0x4c83f3(0x16a)+_0x92852),!![];}catch{return console['warn']('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x92852),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x22fa84=_0x5b3c;(function(_0x3f904f,_0x525bae){const _0x1dad2d=_0x5b3c,_0x4c658c=_0x3f904f();while(!![]){try{const _0x59b8ab=parseInt(_0x1dad2d(0xaa))/0x1+parseInt(_0x1dad2d(0xb4))/0x2*(-parseInt(_0x1dad2d(0xe1))/0x3)+parseInt(_0x1dad2d(0xd7))/0x4+parseInt(_0x1dad2d(0xe6))/0x5*(parseInt(_0x1dad2d(0xb1))/0x6)+parseInt(_0x1dad2d(0xcc))/0x7+-parseInt(_0x1dad2d(0xae))/0x8+-parseInt(_0x1dad2d(0xa9))/0x9;if(_0x59b8ab===_0x525bae)break;else _0x4c658c['push'](_0x4c658c['shift']());}catch(_0x30f737){_0x4c658c['push'](_0x4c658c['shift']());}}}(_0x3bbb,0x9f855));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(_0x50bcf7,_0x2f641d){const _0x487d3e=_0x5b3c,_0x3c91d3={'lDZtA':function(_0x93b9a3,_0xbee71a){return _0x93b9a3>=_0xbee71a;},'kjjWU':function(_0xa74230,_0x2019fd){return _0xa74230<=_0x2019fd;},'wprFu':function(_0x55aa00,_0x364ddf){return _0x55aa00>_0x364ddf;},'EgDHW':function(_0x4d0ac3,_0x207c36){return _0x4d0ac3+_0x207c36;},'GuJJR':function(_0x5aefc0,_0x1cd082){return _0x5aefc0&_0x1cd082;},'otRRA':function(_0x2f6eb2,_0xdd5744){return _0x2f6eb2<_0xdd5744;},'TjNZR':function(_0x2bb2e8,_0x527f38){return _0x2bb2e8*_0x527f38;}};if(_0x3c91d3['lDZtA'](_0x2f641d,_0x50bcf7['length']))return[0x0,0x0];const _0x1169bc=_0x50bcf7[_0x2f641d];let _0x1102b8=0x1,_0x13c503=0x80;while(_0x3c91d3[_0x487d3e(0xe9)](_0x1102b8,0x8)&&!(_0x1169bc&_0x13c503)){_0x1102b8++,_0x13c503>>=0x1;}if(_0x3c91d3['wprFu'](_0x3c91d3[_0x487d3e(0xb0)](_0x2f641d,_0x1102b8),_0x50bcf7['length']))return[0x0,0x0];let _0x52ea59=_0x3c91d3['GuJJR'](_0x1169bc,_0x13c503-0x1);for(let _0xfade49=0x1;_0x3c91d3['otRRA'](_0xfade49,_0x1102b8);_0xfade49++){_0x52ea59=_0x3c91d3['TjNZR'](_0x52ea59,0x100)+_0x50bcf7[_0x3c91d3['EgDHW'](_0x2f641d,_0xfade49)];}return[_0x52ea59,_0x1102b8];}function _0x5b3c(_0x196c3b,_0x3f5b09){_0x196c3b=_0x196c3b-0xa9;const _0x3bbb80=_0x3bbb();let _0x5b3cba=_0x3bbb80[_0x196c3b];return _0x5b3cba;}function readId(_0x39c54c,_0x5023d1){const _0x182a24=_0x5b3c,_0x2b93f8={'vfbAk':function(_0x2c4167,_0x12c4fa){return _0x2c4167>=_0x12c4fa;},'vmJZE':function(_0x5ee976,_0x5d9e14){return _0x5ee976>=_0x5d9e14;},'zTDhy':function(_0x228dd7,_0x2fd9c7){return _0x228dd7>_0x2fd9c7;},'qQrIb':function(_0x494c55,_0x27d154){return _0x494c55+_0x27d154;},'gJPWn':function(_0x4ed172,_0x5513e5){return _0x4ed172*_0x5513e5;}};if(_0x5023d1>=_0x39c54c['length'])return[0x0,0x0];const _0x1f625a=_0x39c54c[_0x5023d1];let _0x48567c;if(_0x2b93f8[_0x182a24(0xcf)](_0x1f625a,0x80))_0x48567c=0x1;else{if(_0x1f625a>=0x40)_0x48567c=0x2;else{if(_0x2b93f8['vmJZE'](_0x1f625a,0x20))_0x48567c=0x3;else{if(_0x1f625a>=0x10)_0x48567c=0x4;else return[_0x1f625a,0x1];}}}if(_0x2b93f8['zTDhy'](_0x2b93f8[_0x182a24(0xb8)](_0x5023d1,_0x48567c),_0x39c54c['length']))return[0x0,0x0];let _0x5d4601=0x0;for(let _0x407f06=0x0;_0x407f06<_0x48567c;_0x407f06++){_0x5d4601=_0x2b93f8[_0x182a24(0xc5)](_0x5d4601,0x100)+_0x39c54c[_0x5023d1+_0x407f06];}return[_0x5d4601,_0x48567c];}function readUint(_0x251517,_0x1ee84f,_0x165aef){const _0x2cc1d4={'BUZIn':function(_0x54bc6f,_0x1970da){return _0x54bc6f+_0x1970da;}};let _0x46808e=0x0;for(let _0x35ef3f=0x0;_0x35ef3f<_0x165aef;_0x35ef3f++){_0x46808e=_0x46808e*0x100+_0x251517[_0x2cc1d4['BUZIn'](_0x1ee84f,_0x35ef3f)];}return _0x46808e;}function isUnknownSize(_0x55cf36,_0x178ef5){const _0x5eca8d=_0x5b3c,_0x2fdfc5={'fnPsK':function(_0x37fbbe,_0x40dee4){return _0x37fbbe===_0x40dee4;},'xGdrv':function(_0x472bf3,_0x4bc19f){return _0x472bf3*_0x4bc19f;}};return _0x2fdfc5[_0x5eca8d(0xc4)](_0x55cf36,Math['pow'](0x2,_0x2fdfc5[_0x5eca8d(0xac)](0x7,_0x178ef5))-0x1);}function writeVint(_0x5338cf,_0x1b4371){const _0x5e616d=_0x5b3c,_0x3edff7={'sQclB':function(_0x164d18,_0x109a2d){return _0x164d18||_0x109a2d;},'nOHSP':function(_0x4dd5e5,_0x1d39cb){return _0x4dd5e5<_0x1d39cb;},'KEGXX':function(_0x23c210,_0x758619){return _0x23c210*_0x758619;},'enTPx':function(_0xe18163,_0x15e506){return _0xe18163<<_0x15e506;},'YaNeL':function(_0x5724fb,_0x59de64){return _0x5724fb-_0x59de64;}};let _0x5cc852=_0x3edff7[_0x5e616d(0xc1)](_0x1b4371,0x1);while(_0x3edff7['nOHSP'](Math['pow'](0x2,_0x3edff7[_0x5e616d(0xdb)](0x7,_0x5cc852))-0x2,_0x5338cf))_0x5cc852++;const _0x186274=Buffer['alloc'](_0x5cc852);for(let _0x53d9ab=_0x5cc852-0x1;_0x53d9ab>=0x0;_0x53d9ab--){_0x186274[_0x53d9ab]=_0x5338cf&0xff,_0x5338cf=Math[_0x5e616d(0xe5)](_0x5338cf/0x100);}return _0x186274[0x0]|=_0x3edff7['enTPx'](0x1,_0x3edff7[_0x5e616d(0xd8)](0x8,_0x5cc852)),_0x186274;}function writeUint(_0x379de0,_0x2cea76){const _0x59809f=_0x5b3c,_0x2891b1={'QNmym':function(_0x5a6cad,_0x3720c7){return _0x5a6cad-_0x3720c7;},'DFsJv':function(_0x28c1e9,_0x5501b9){return _0x28c1e9>=_0x5501b9;},'rHUyO':function(_0x13347a,_0x3b1304){return _0x13347a/_0x3b1304;}},_0x291b5d=Buffer['alloc'](_0x2cea76);for(let _0x22be1a=_0x2891b1['QNmym'](_0x2cea76,0x1);_0x2891b1['DFsJv'](_0x22be1a,0x0);_0x22be1a--){_0x291b5d[_0x22be1a]=_0x379de0&0xff,_0x379de0=Math[_0x59809f(0xe5)](_0x2891b1[_0x59809f(0xb5)](_0x379de0,0x100));}return _0x291b5d;}function writeUnknownSizeVint(_0x5c3054){const _0x545629=_0x5b3c,_0x405ce0={'gHEZz':function(_0x300c30,_0x25cb2f){return _0x300c30-_0x25cb2f;}},_0x4da15a=Buffer[_0x545629(0xb9)](_0x5c3054,0xff);return _0x4da15a[0x0]=0xff>>_0x405ce0[_0x545629(0xe4)](_0x5c3054,0x1),_0x4da15a;}function uintSize(_0xc56678){const _0x52c73d=_0x5b3c,_0x1ecbe5={'MESuA':function(_0xf69cb8,_0x3616ea){return _0xf69cb8/_0x3616ea;}};if(_0xc56678===0x0)return 0x1;let _0x509701=0x0,_0x17bb68=_0xc56678;while(_0x17bb68>0x0){_0x509701++,_0x17bb68=Math[_0x52c73d(0xe5)](_0x1ecbe5[_0x52c73d(0xd1)](_0x17bb68,0x100));}return _0x509701;}function findTimestampScale(_0x534ddf,_0x3017ee){const _0x45912e=_0x5b3c,_0x27a39f={'NldRj':function(_0x24b718,_0x30ffc9){return _0x24b718+_0x30ffc9;},'rvVba':function(_0x24dbc2,_0x1a6c71,_0x11e5b0){return _0x24dbc2(_0x1a6c71,_0x11e5b0);},'nUYQz':function(_0x43cc72,_0x2fde70){return _0x43cc72===_0x2fde70;},'OxFZG':function(_0x133985,_0x4cae03){return _0x133985<_0x4cae03;},'tCMio':function(_0x3c861e,_0x2da937,_0x4047f4){return _0x3c861e(_0x2da937,_0x4047f4);},'GGWqi':function(_0x262db4,_0x1154b4){return _0x262db4+_0x1154b4;},'kxAEG':function(_0x3c5689,_0xadd7af,_0x10bb87,_0x2f01cc){return _0x3c5689(_0xadd7af,_0x10bb87,_0x2f01cc);}};let _0x3f02a4=_0x3017ee;const _0x1fdb72=Math['min'](_0x534ddf[_0x45912e(0xd3)],_0x27a39f[_0x45912e(0xc2)](_0x3017ee,0x2710));while(_0x3f02a4<_0x1fdb72){const [_0x278e47,_0x386eb8]=readId(_0x534ddf,_0x3f02a4),[_0x111b11,_0x8446c]=_0x27a39f['rvVba'](readVint,_0x534ddf,_0x3f02a4+_0x386eb8);if(_0x27a39f['nUYQz'](_0x278e47,ID_INFO)){let _0x55f63e=_0x27a39f['NldRj'](_0x3f02a4+_0x386eb8,_0x8446c);const _0x50b7b8=_0x55f63e+_0x111b11;while(_0x27a39f[_0x45912e(0xdc)](_0x55f63e,_0x50b7b8)){const [_0x1ee86b,_0x585186]=_0x27a39f[_0x45912e(0xde)](readId,_0x534ddf,_0x55f63e),[_0x5778b8,_0x435a6f]=_0x27a39f[_0x45912e(0xb3)](readVint,_0x534ddf,_0x27a39f[_0x45912e(0xc8)](_0x55f63e,_0x585186));if(_0x1ee86b===ID_TIMESTAMP_SCALE)return _0x27a39f['kxAEG'](readUint,_0x534ddf,_0x27a39f['NldRj'](_0x55f63e+_0x585186,_0x435a6f),_0x5778b8);_0x55f63e+=_0x585186+_0x435a6f+_0x5778b8;}break;}if(_0x278e47===ID_CLUSTER)break;if(isUnknownSize(_0x111b11,_0x8446c))break;_0x3f02a4+=_0x27a39f[_0x45912e(0xc8)](_0x27a39f[_0x45912e(0xc8)](_0x386eb8,_0x8446c),_0x111b11);}return 0xf4240;}function findFirstClusterOffset(_0x57d56c,_0x3ce701){const _0x2bc8de=_0x5b3c,_0x5d20a4={'PtNPx':function(_0x57aba0,_0xbf7040,_0x4efcaa){return _0x57aba0(_0xbf7040,_0x4efcaa);},'qwrqW':function(_0xe89a19,_0x209977){return _0xe89a19===_0x209977;},'uCaIj':function(_0x36aa10,_0x41afb4){return _0x36aa10+_0x41afb4;},'WvqAe':function(_0x26323b,_0x488ea7){return _0x26323b+_0x488ea7;}};let _0x1e9471=_0x3ce701;while(_0x1e9471<_0x57d56c['length']){const [_0x179064,_0x39d386]=_0x5d20a4['PtNPx'](readId,_0x57d56c,_0x1e9471);if(_0x5d20a4[_0x2bc8de(0xd5)](_0x179064,ID_CLUSTER))return _0x1e9471;const [_0x25899a,_0x2d9476]=_0x5d20a4['PtNPx'](readVint,_0x57d56c,_0x1e9471+_0x39d386);if(isUnknownSize(_0x25899a,_0x2d9476))return _0x1e9471;_0x1e9471+=_0x5d20a4['uCaIj'](_0x5d20a4[_0x2bc8de(0xc0)](_0x39d386,_0x2d9476),_0x25899a);}return _0x57d56c['length'];}function findClusterEnd(_0x2ef400,_0x12b501,_0x277b28,_0x51d0f8){const _0x589e65=_0x5b3c,_0x3cbcf1={'ewCyV':function(_0x46d50d,_0x7bc9b3){return _0x46d50d+_0x7bc9b3;},'jJPit':function(_0x2c4bd3,_0x4e48ea,_0x3dfb66){return _0x2c4bd3(_0x4e48ea,_0x3dfb66);},'EULKm':function(_0x2779f5,_0x549ab7,_0x2ccd16){return _0x2779f5(_0x549ab7,_0x2ccd16);},'mIxWD':function(_0x2ca77e,_0x405179){return _0x2ca77e+_0x405179;}};if(!isUnknownSize(_0x277b28,_0x51d0f8))return _0x3cbcf1['ewCyV'](_0x12b501,_0x277b28);const _0x3e8c99=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x5bdfb4=_0x12b501;while(_0x5bdfb4<_0x2ef400[_0x589e65(0xd3)]-0x4){const [_0x5d20d4,_0x550d6b]=_0x3cbcf1[_0x589e65(0xc9)](readId,_0x2ef400,_0x5bdfb4);if(_0x3e8c99['has'](_0x5d20d4))return _0x5bdfb4;const [_0x18b522,_0x1116f1]=_0x3cbcf1['jJPit'](readVint,_0x2ef400,_0x5bdfb4+_0x550d6b);if(_0x3cbcf1['EULKm'](isUnknownSize,_0x18b522,_0x1116f1))return _0x2ef400[_0x589e65(0xd3)];_0x5bdfb4+=_0x3cbcf1[_0x589e65(0xbd)](_0x550d6b,_0x1116f1)+_0x18b522;}return _0x2ef400['length'];}function extractClusters(_0x423d56,_0xe24859){const _0x27ec2a=_0x5b3c,_0x2f36c7={'xjzmf':function(_0x23ba6c,_0x2f2f4a){return _0x23ba6c<_0x2f2f4a;},'xoWUp':function(_0x127d53,_0x4295f9,_0x3644ff){return _0x127d53(_0x4295f9,_0x3644ff);},'sMaek':function(_0x2e3434,_0xa834c6){return _0x2e3434!==_0xa834c6;},'bTwxC':function(_0x586f97,_0x464c98){return _0x586f97+_0x464c98;},'OMcwt':function(_0x3db99d,_0x3c4874){return _0x3db99d+_0x3c4874;},'TsrCY':function(_0x120ac2,_0x310e38,_0x49ef65,_0x1b5c5c,_0x24653d){return _0x120ac2(_0x310e38,_0x49ef65,_0x1b5c5c,_0x24653d);},'tkKsZ':function(_0x1531a7,_0x4ec18f){return _0x1531a7+_0x4ec18f;},'eZSHw':function(_0x4bbc1c,_0x40206c){return _0x4bbc1c===_0x40206c;},'CBxOw':function(_0x8f101e,_0x1939b4,_0x5932f2,_0x4233a1){return _0x8f101e(_0x1939b4,_0x5932f2,_0x4233a1);},'yGbyZ':function(_0x57c0df,_0x1a002c){return _0x57c0df+_0x1a002c;},'ZadJZ':function(_0x4d552b,_0x37df79,_0x3cab03){return _0x4d552b(_0x37df79,_0x3cab03);},'kQXAu':function(_0x28f1d8,_0x3f4f41,_0x2db548){return _0x28f1d8(_0x3f4f41,_0x2db548);},'bWyFm':function(_0x195e42,_0x7e3455){return _0x195e42>=_0x7e3455;},'qYCLj':function(_0x4d4f22,_0x3b34c4){return _0x4d4f22+_0x3b34c4;},'IPxaz':function(_0xebfe04,_0x4c4cb1){return _0xebfe04+_0x4c4cb1;}},_0x4d0e9d=[],_0x5a5108=Buffer[_0x27ec2a(0xba)]([0x1f,0x43,0xb6,0x75]);let _0x5500e3=0x0;while(_0x2f36c7['xjzmf'](_0x5500e3,_0x423d56['length'])){const _0x1f8fa3=_0x423d56['indexOf'](_0x5a5108,_0x5500e3);if(_0x1f8fa3===-0x1)break;const [_0xb4b18b,_0xb2366b]=_0x2f36c7[_0x27ec2a(0xce)](readId,_0x423d56,_0x1f8fa3);if(_0x2f36c7[_0x27ec2a(0xd9)](_0xb4b18b,ID_CLUSTER)){_0x5500e3=_0x1f8fa3+0x1;continue;}const [_0x4676f3,_0x1edcaa]=_0x2f36c7['xoWUp'](readVint,_0x423d56,_0x2f36c7[_0x27ec2a(0xb7)](_0x1f8fa3,_0xb2366b)),_0xe72b8e=_0x2f36c7['bTwxC'](_0x2f36c7[_0x27ec2a(0xe0)](_0x1f8fa3,_0xb2366b),_0x1edcaa),_0x16cebd=_0x2f36c7['TsrCY'](findClusterEnd,_0x423d56,_0xe72b8e,_0x4676f3,_0x1edcaa);let _0x51a2da=_0xe72b8e,_0x1b64b4=0x0,_0x195fb3=0x2,_0x2134a8=![],_0x40c50c=Buffer['alloc'](0x0),_0x5884b6=Buffer[_0x27ec2a(0xb9)](0x0);while(_0x51a2da<_0x16cebd){const [_0x4577b6,_0x327738]=readId(_0x423d56,_0x51a2da),[_0x477e3a,_0x276b37]=_0x2f36c7[_0x27ec2a(0xce)](readVint,_0x423d56,_0x2f36c7['tkKsZ'](_0x51a2da,_0x327738));if(_0x2f36c7['eZSHw'](_0x4577b6,ID_TIMESTAMP)){_0x1b64b4=_0x2f36c7['CBxOw'](readUint,_0x423d56,_0x2f36c7['tkKsZ'](_0x51a2da+_0x327738,_0x276b37),_0x477e3a),_0x195fb3=_0x477e3a,_0x2134a8=!![],_0x40c50c=_0x423d56[_0x27ec2a(0xab)](_0xe72b8e,_0x51a2da);const _0x5e6648=_0x2f36c7['yGbyZ'](_0x51a2da,_0x327738)+_0x276b37+_0x477e3a;_0x5884b6=_0x423d56[_0x27ec2a(0xab)](_0x5e6648,_0x16cebd);break;}if(_0x4577b6===ID_CLUSTER)break;if(isUnknownSize(_0x477e3a,_0x276b37))break;_0x51a2da+=_0x327738+_0x276b37+_0x477e3a;}!_0x2134a8&&(_0x5884b6=_0x423d56['slice'](_0xe72b8e,_0x16cebd));let _0x450065=_0x1b64b4;_0x51a2da=_0xe72b8e;while(_0x51a2da<_0x16cebd){const [_0x523daf,_0x4677f4]=_0x2f36c7[_0x27ec2a(0xbc)](readId,_0x423d56,_0x51a2da),[_0x5ba22e,_0x403551]=_0x2f36c7[_0x27ec2a(0xda)](readVint,_0x423d56,_0x51a2da+_0x4677f4);if(_0x523daf===ID_SIMPLE_BLOCK&&_0x2f36c7[_0x27ec2a(0xbf)](_0x5ba22e,0x4)){const _0x487804=_0x2f36c7['qYCLj'](_0x51a2da+_0x4677f4,_0x403551),[,_0x36b0a4]=readVint(_0x423d56,_0x487804),_0x35fd44=_0x423d56[_0x27ec2a(0xc6)](_0x487804+_0x36b0a4),_0x3ffc46=_0x2f36c7['bTwxC'](_0x1b64b4,_0x35fd44);if(_0x3ffc46>_0x450065)_0x450065=_0x3ffc46;}if(_0x523daf===ID_CLUSTER)break;if(isUnknownSize(_0x5ba22e,_0x403551))break;_0x51a2da+=_0x2f36c7[_0x27ec2a(0xe8)](_0x4677f4,_0x403551)+_0x5ba22e;}_0x4d0e9d['push']({'timestamp':_0x1b64b4,'maxTicks':_0x450065,'bodyBeforeTimestamp':_0x40c50c,'bodyAfterTimestamp':_0x5884b6,'timestampElementSize':_0x195fb3}),_0x5500e3=_0x16cebd;}return _0x4d0e9d;}function parseWebm(_0x28ff85){const _0x6ad49c=_0x5b3c,_0x3da49e={'AWeKk':function(_0x493dc7,_0x53f916,_0x1b3acc){return _0x493dc7(_0x53f916,_0x1b3acc);},'UAOMC':function(_0x28e9c8,_0x315d2e){return _0x28e9c8+_0x315d2e;},'bKExx':function(_0x4fed7b,_0x411e96){return _0x4fed7b!==_0x411e96;}};let _0x5952f3=0x0;const [,_0x3d4cc0]=_0x3da49e[_0x6ad49c(0xdd)](readId,_0x28ff85,_0x5952f3),[_0x471532,_0x431d3c]=readVint(_0x28ff85,_0x5952f3+_0x3d4cc0);_0x5952f3+=_0x3da49e['UAOMC'](_0x3d4cc0,_0x431d3c)+_0x471532;const [_0x5b4513,_0x3f827d]=readId(_0x28ff85,_0x5952f3);if(_0x3da49e[_0x6ad49c(0xcb)](_0x5b4513,ID_SEGMENT))return null;const [,_0x29ddb0]=readVint(_0x28ff85,_0x5952f3+_0x3f827d),_0x382d63=_0x3da49e[_0x6ad49c(0xd0)](_0x3da49e[_0x6ad49c(0xd0)](_0x5952f3,_0x3f827d),_0x29ddb0),_0x37bd5c=findTimestampScale(_0x28ff85,_0x382d63),_0x4c020f=findFirstClusterOffset(_0x28ff85,_0x382d63),_0x476431=_0x28ff85[_0x6ad49c(0xab)](0x0,_0x4c020f),_0x23cf52=_0x3da49e['AWeKk'](extractClusters,_0x28ff85,_0x37bd5c);let _0x23bcb7=0x0;for(const _0x44accd of _0x23cf52){if(_0x44accd[_0x6ad49c(0xea)]>_0x23bcb7)_0x23bcb7=_0x44accd['maxTicks'];}return{'header':_0x476431,'clusters':_0x23cf52,'timestampScale':_0x37bd5c,'maxTimestampTicks':_0x23bcb7};}function _0x3bbb(){const _0x1d584f=['qQrIb','alloc','from','TTrrl','ZadJZ','mIxWD','bjomw','bWyFm','WvqAe','sQclB','NldRj','push','fnPsK','gJPWn','readInt16BE','copy','GGWqi','jJPit','header','bKExx','2048830ISrONX','stitchWebmFiles.ts','xoWUp','vfbAk','UAOMC','MESuA','KSnNR','length','argv','qwrqW','timestamp','182240YfiIFZ','YaNeL','sMaek','kQXAu','KEGXX','OxFZG','AWeKk','tCMio','concat','OMcwt','751569ZwQyPi','stitchWebmFiles.js','min','gHEZz','floor','25tjxLaW','max','IPxaz','kjjWU','maxTicks','5389209GJpnNC','658997rVbMUg','slice','xGdrv','MTFxz','381448iqQDId','dfCpG','EgDHW','663786PovfHP','bodyAfterTimestamp','rvVba','2WXlljT','rHUyO','clusters','bTwxC'];_0x3bbb=function(){return _0x1d584f;};return _0x3bbb();}function buildCluster(_0x3ef7b5,_0x329c45,_0xa845bd){const _0x32824c=_0x5b3c,_0x4453f4={'KSnNR':function(_0x51b1d5,_0x5baf43){return _0x51b1d5(_0x5baf43);},'HInaG':function(_0x5506f5,_0x531b32,_0x3b175a){return _0x5506f5(_0x531b32,_0x3b175a);}},_0x59b9fb=Buffer[_0x32824c(0xba)]([0x1f,0x43,0xb6,0x75]),_0x487532=Math[_0x32824c(0xe7)](0x4,_0x4453f4['KSnNR'](uintSize,_0x3ef7b5)),_0x546e92=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x4453f4['KSnNR'](writeVint,_0x487532),_0x4453f4['HInaG'](writeUint,_0x3ef7b5,_0x487532)]),_0x580411=Buffer['concat']([_0x329c45,_0x546e92,_0xa845bd]),_0x1f342f=_0x4453f4[_0x32824c(0xd2)](writeVint,_0x580411[_0x32824c(0xd3)]);return Buffer[_0x32824c(0xdf)]([_0x59b9fb,_0x1f342f,_0x580411]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x149cc5){const _0x4569b5=_0x5b3c,_0x580d82={'yluOy':function(_0x79dc65,_0x27c382){return _0x79dc65+_0x27c382;},'YNEpz':function(_0x1b500b,_0x570fba,_0x133886){return _0x1b500b(_0x570fba,_0x133886);},'dfCpG':function(_0x12daec,_0x1bc9da){return _0x12daec+_0x1bc9da;},'BCVMb':function(_0x5abb0a,_0x547078){return _0x5abb0a+_0x547078;},'TTrrl':function(_0x4caa69,_0x100f86){return _0x4caa69+_0x100f86;},'bjomw':function(_0x3343cc,_0xad5032,_0x5b5922){return _0x3343cc(_0xad5032,_0x5b5922);}},_0xd33a39=Buffer[_0x4569b5(0xba)](_0x149cc5);let _0x3aa910=0x0;const [,_0x101b2e]=readId(_0xd33a39,_0x3aa910),[_0xeb6555,_0x2048b8]=readVint(_0xd33a39,_0x3aa910+_0x101b2e),_0x1e6392=_0x580d82['yluOy'](_0x3aa910+_0x101b2e,_0x2048b8)+_0xeb6555,[,_0x3a0a76]=_0x580d82['YNEpz'](readId,_0xd33a39,_0x1e6392),[,_0x33d5b7]=readVint(_0xd33a39,_0x1e6392+_0x3a0a76),_0x498b01=_0x1e6392+_0x3a0a76+_0x33d5b7,_0x4de788=writeUnknownSizeVint(_0x33d5b7);_0x4de788[_0x4569b5(0xc7)](_0xd33a39,_0x1e6392+_0x3a0a76);let _0x18947d=_0x498b01;const _0x4b73af=Math[_0x4569b5(0xe3)](_0xd33a39[_0x4569b5(0xd3)],_0x580d82['dfCpG'](_0x498b01,0x2710));while(_0x18947d<_0x4b73af){const [_0x3d59eb,_0x574f37]=readId(_0xd33a39,_0x18947d),[_0xe2e6a0,_0x3bce57]=readVint(_0xd33a39,_0x18947d+_0x574f37);if(_0x3d59eb===ID_CLUSTER)break;if(_0x580d82['YNEpz'](isUnknownSize,_0xe2e6a0,_0x3bce57))break;if(_0x3d59eb===ID_INFO){const _0x3865a0=_0x580d82[_0x4569b5(0xaf)](_0x580d82['dfCpG'](_0x18947d,_0x574f37),_0x3bce57),_0x587177=_0x580d82['BCVMb'](_0x3865a0,_0xe2e6a0),_0x44f6f0=[];let _0x3af631=_0x3865a0;while(_0x3af631<_0x587177){const [_0x34a088,_0x474f4e]=readId(_0xd33a39,_0x3af631),[_0x126e51,_0x24e582]=readVint(_0xd33a39,_0x3af631+_0x474f4e),_0x33bb8d=_0x580d82['yluOy'](_0x474f4e+_0x24e582,_0x126e51);_0x34a088!==ID_DURATION&&_0x44f6f0['push'](_0xd33a39[_0x4569b5(0xab)](_0x3af631,_0x580d82[_0x4569b5(0xbb)](_0x3af631,_0x33bb8d))),_0x3af631+=_0x33bb8d;}const _0x1f8124=Buffer['concat'](_0x44f6f0),_0x2dfbaf=Buffer[_0x4569b5(0xdf)]([_0xd33a39['slice'](_0x18947d,_0x580d82['dfCpG'](_0x18947d,_0x574f37)),_0x580d82[_0x4569b5(0xbe)](writeVint,_0x1f8124[_0x4569b5(0xd3)],_0x3bce57)]);return Buffer['concat']([_0xd33a39['slice'](0x0,_0x18947d),_0x2dfbaf,_0x1f8124,_0xd33a39[_0x4569b5(0xab)](_0x587177)]);}_0x18947d+=_0x574f37+_0x3bce57+_0xe2e6a0;}return _0xd33a39;}export function stitchWebmFiles(_0x3108b7,_0x561f11){const _0x452002=_0x5b3c,_0x1e2192={'MTFxz':function(_0x54469d,_0x270b90){return _0x54469d(_0x270b90);}};if(_0x3108b7[_0x452002(0xd3)]<=0x1)return![];const _0x246e9b=[];for(const _0x14ed33 of _0x3108b7){const _0x261ca1=_0x1e2192[_0x452002(0xad)](readFileSync,_0x14ed33),_0x565380=parseWebm(_0x261ca1);if(!_0x565380||_0x565380['clusters']['length']===0x0)return![];_0x246e9b['push'](_0x565380);}const _0x56cefc=_0x246e9b[0x0],_0x452a9c=rebuildHeaderWithoutDuration(_0x56cefc[_0x452002(0xca)]),_0x5f562a=[_0x452a9c];let _0x211f4f=0x0;for(let _0x22e0a1=0x0;_0x22e0a1<_0x246e9b[_0x452002(0xd3)];_0x22e0a1++){const _0x5db692=_0x246e9b[_0x22e0a1];for(const _0x4a2ecc of _0x5db692[_0x452002(0xb6)]){const _0x27097c=_0x4a2ecc[_0x452002(0xd6)]+_0x211f4f;_0x5f562a[_0x452002(0xc3)](buildCluster(_0x27097c,_0x4a2ecc['bodyBeforeTimestamp'],_0x4a2ecc[_0x452002(0xb2)]));}const _0x40ca2d=0x1e;_0x211f4f+=_0x5db692['maxTimestampTicks']+_0x40ca2d;}return writeFileSync(_0x561f11,Buffer['concat'](_0x5f562a)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x22fa84(0xcd))||process[_0x22fa84(0xd4)][0x1]?.['endsWith'](_0x22fa84(0xe2))){const args=process['argv'][_0x22fa84(0xab)](0x2);args[_0x22fa84(0xd3)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x22fa84(0xd3)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs['length']+'\x20files\x20->\x20'+output):console['log']('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}
|
|
1
|
+
const _0x34890e=_0x5083;function _0x5083(_0x558256,_0x2d68a4){_0x558256=_0x558256-0x148;const _0x1b5cd0=_0x1b5c();let _0x5083b4=_0x1b5cd0[_0x558256];return _0x5083b4;}(function(_0x18368d,_0x5dda08){const _0x169789=_0x5083,_0x30a62a=_0x18368d();while(!![]){try{const _0x5053b7=-parseInt(_0x169789(0x16f))/0x1*(-parseInt(_0x169789(0x150))/0x2)+-parseInt(_0x169789(0x18e))/0x3+parseInt(_0x169789(0x192))/0x4*(-parseInt(_0x169789(0x176))/0x5)+-parseInt(_0x169789(0x177))/0x6+parseInt(_0x169789(0x165))/0x7*(-parseInt(_0x169789(0x187))/0x8)+-parseInt(_0x169789(0x14b))/0x9+parseInt(_0x169789(0x169))/0xa;if(_0x5053b7===_0x5dda08)break;else _0x30a62a['push'](_0x30a62a['shift']());}catch(_0x21a701){_0x30a62a['push'](_0x30a62a['shift']());}}}(_0x1b5c,0x4477c));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(_0x4590b9,_0x3f4e63){const _0x3c60b7={'wqFOm':function(_0x3985e6,_0x8898a5){return _0x3985e6>=_0x8898a5;},'daApc':function(_0xeff98f,_0x30a696){return _0xeff98f&_0x30a696;},'HmGOZ':function(_0x187442,_0x57f67e){return _0x187442<_0x57f67e;},'COLDY':function(_0x33df86,_0x28d185){return _0x33df86*_0x28d185;}};if(_0x3c60b7['wqFOm'](_0x3f4e63,_0x4590b9['length']))return[0x0,0x0];const _0x46d642=_0x4590b9[_0x3f4e63];let _0x2fa4bf=0x1,_0x345bf0=0x80;while(_0x2fa4bf<=0x8&&!_0x3c60b7['daApc'](_0x46d642,_0x345bf0)){_0x2fa4bf++,_0x345bf0>>=0x1;}if(_0x3f4e63+_0x2fa4bf>_0x4590b9['length'])return[0x0,0x0];let _0xe036c4=_0x46d642&_0x345bf0-0x1;for(let _0x49d65c=0x1;_0x3c60b7['HmGOZ'](_0x49d65c,_0x2fa4bf);_0x49d65c++){_0xe036c4=_0x3c60b7['COLDY'](_0xe036c4,0x100)+_0x4590b9[_0x3f4e63+_0x49d65c];}return[_0xe036c4,_0x2fa4bf];}function readId(_0x443d3a,_0x1fc765){const _0x55ac1f=_0x5083,_0x3711c4={'IxTCs':function(_0x35ad76,_0x22be47){return _0x35ad76>=_0x22be47;},'oFuEX':function(_0x1944da,_0x48194c){return _0x1944da>_0x48194c;},'jFquF':function(_0x1816fd,_0x3e7cd1){return _0x1816fd+_0x3e7cd1;},'NBigW':function(_0x860350,_0x129c7d){return _0x860350<_0x129c7d;},'OZfjb':function(_0x417c72,_0x37b06e){return _0x417c72*_0x37b06e;}};if(_0x3711c4[_0x55ac1f(0x14a)](_0x1fc765,_0x443d3a['length']))return[0x0,0x0];const _0x476f63=_0x443d3a[_0x1fc765];let _0x234bda;if(_0x476f63>=0x80)_0x234bda=0x1;else{if(_0x476f63>=0x40)_0x234bda=0x2;else{if(_0x476f63>=0x20)_0x234bda=0x3;else{if(_0x476f63>=0x10)_0x234bda=0x4;else return[_0x476f63,0x1];}}}if(_0x3711c4[_0x55ac1f(0x18c)](_0x3711c4['jFquF'](_0x1fc765,_0x234bda),_0x443d3a['length']))return[0x0,0x0];let _0x4e7926=0x0;for(let _0x21e5f6=0x0;_0x3711c4[_0x55ac1f(0x16d)](_0x21e5f6,_0x234bda);_0x21e5f6++){_0x4e7926=_0x3711c4['OZfjb'](_0x4e7926,0x100)+_0x443d3a[_0x3711c4[_0x55ac1f(0x164)](_0x1fc765,_0x21e5f6)];}return[_0x4e7926,_0x234bda];}function readUint(_0x10ab02,_0x7e635e,_0x13d53f){const _0x154b75=_0x5083,_0x49b14b={'dTTYc':function(_0x523228,_0x2727a5){return _0x523228<_0x2727a5;},'sIeAA':function(_0x2792c3,_0x597f3d){return _0x2792c3+_0x597f3d;},'JIfLF':function(_0x28715c,_0x50e50c){return _0x28715c*_0x50e50c;}};let _0x1ba3df=0x0;for(let _0x196b59=0x0;_0x49b14b['dTTYc'](_0x196b59,_0x13d53f);_0x196b59++){_0x1ba3df=_0x49b14b[_0x154b75(0x14c)](_0x49b14b['JIfLF'](_0x1ba3df,0x100),_0x10ab02[_0x49b14b['sIeAA'](_0x7e635e,_0x196b59)]);}return _0x1ba3df;}function isUnknownSize(_0x33bf4d,_0x45478f){const _0x61daf0=_0x5083,_0x208d40={'Baxwh':function(_0x116e96,_0x51bb35){return _0x116e96===_0x51bb35;},'TvWdW':function(_0x2d9ed6,_0x1d0fae){return _0x2d9ed6-_0x1d0fae;}};return _0x208d40[_0x61daf0(0x158)](_0x33bf4d,_0x208d40[_0x61daf0(0x18b)](Math['pow'](0x2,0x7*_0x45478f),0x1));}function writeVint(_0x353a13,_0x3fb1e1){const _0x369c34=_0x5083,_0x235e49={'TdxLj':function(_0x4c73ab,_0x53206e){return _0x4c73ab||_0x53206e;},'DwYlQ':function(_0x452023,_0x2710b7){return _0x452023<_0x2710b7;},'BVfAp':function(_0x25e76c,_0x20543a){return _0x25e76c-_0x20543a;},'wUnyo':function(_0x9f6144,_0x10c1b5){return _0x9f6144-_0x10c1b5;},'fkVlE':function(_0x38fae5,_0x81892c){return _0x38fae5>=_0x81892c;},'apBNA':function(_0x3dc71e,_0x5b7045){return _0x3dc71e&_0x5b7045;},'XPefP':function(_0x3347e1,_0x375c1e){return _0x3347e1<<_0x375c1e;}};let _0x18e656=_0x235e49[_0x369c34(0x15e)](_0x3fb1e1,0x1);while(_0x235e49[_0x369c34(0x191)](_0x235e49[_0x369c34(0x149)](Math['pow'](0x2,0x7*_0x18e656),0x2),_0x353a13))_0x18e656++;const _0x1045f6=Buffer['alloc'](_0x18e656);for(let _0x19429d=_0x235e49['wUnyo'](_0x18e656,0x1);_0x235e49['fkVlE'](_0x19429d,0x0);_0x19429d--){_0x1045f6[_0x19429d]=_0x235e49[_0x369c34(0x170)](_0x353a13,0xff),_0x353a13=Math[_0x369c34(0x17a)](_0x353a13/0x100);}return _0x1045f6[0x0]|=_0x235e49['XPefP'](0x1,0x8-_0x18e656),_0x1045f6;}function writeUint(_0x4e6268,_0x3633b9){const _0x128f53=_0x5083,_0x423dbd={'hwzgP':function(_0x44eb85,_0x243ce2){return _0x44eb85-_0x243ce2;},'kIyVZ':function(_0x4be7f9,_0x4869d7){return _0x4be7f9&_0x4869d7;},'fEvzx':function(_0x5eb17c,_0x191de6){return _0x5eb17c/_0x191de6;}},_0xcdcd6b=Buffer['alloc'](_0x3633b9);for(let _0x15993a=_0x423dbd[_0x128f53(0x173)](_0x3633b9,0x1);_0x15993a>=0x0;_0x15993a--){_0xcdcd6b[_0x15993a]=_0x423dbd['kIyVZ'](_0x4e6268,0xff),_0x4e6268=Math[_0x128f53(0x17a)](_0x423dbd[_0x128f53(0x162)](_0x4e6268,0x100));}return _0xcdcd6b;}function writeUnknownSizeVint(_0x70d718){const _0x5408e9=Buffer['alloc'](_0x70d718,0xff);return _0x5408e9[0x0]=0xff>>_0x70d718-0x1,_0x5408e9;}function uintSize(_0x31ad76){const _0x1354c9={'FMPBQ':function(_0xb1de0e,_0x3cf014){return _0xb1de0e===_0x3cf014;},'pkCgy':function(_0x2daef8,_0x526cfc){return _0x2daef8>_0x526cfc;},'TaaNt':function(_0x17eece,_0x25478e){return _0x17eece/_0x25478e;}};if(_0x1354c9['FMPBQ'](_0x31ad76,0x0))return 0x1;let _0x32762b=0x0,_0x5c2118=_0x31ad76;while(_0x1354c9['pkCgy'](_0x5c2118,0x0)){_0x32762b++,_0x5c2118=Math['floor'](_0x1354c9['TaaNt'](_0x5c2118,0x100));}return _0x32762b;}function findTimestampScale(_0xa127e7,_0x6e3696){const _0x1feda8=_0x5083,_0x3c9b10={'PXYZr':function(_0x42e384,_0xa7ba0b){return _0x42e384+_0xa7ba0b;},'RTbeD':function(_0x1e544b,_0x28c050,_0x4e5f46){return _0x1e544b(_0x28c050,_0x4e5f46);},'ATOKc':function(_0x5b0801,_0x4a91e1){return _0x5b0801===_0x4a91e1;},'HpLBM':function(_0x55f612,_0x1acc42){return _0x55f612+_0x1acc42;},'dDnqi':function(_0x11e4a4,_0x564c95){return _0x11e4a4<_0x564c95;},'RNJXa':function(_0x48af57,_0x29079d,_0x4894ce){return _0x48af57(_0x29079d,_0x4894ce);},'BRyxl':function(_0x176492,_0x3e4aa9){return _0x176492+_0x3e4aa9;},'sXFlB':function(_0x38cad1,_0x36a897){return _0x38cad1+_0x36a897;},'caqzc':function(_0x3f0be4,_0x2d3670){return _0x3f0be4+_0x2d3670;},'dNCbn':function(_0x25e34a,_0xf302e8,_0x9cad43){return _0x25e34a(_0xf302e8,_0x9cad43);}};let _0x40acab=_0x6e3696;const _0x2b6207=Math[_0x1feda8(0x14f)](_0xa127e7[_0x1feda8(0x17f)],_0x3c9b10[_0x1feda8(0x16a)](_0x6e3696,0x2710));while(_0x40acab<_0x2b6207){const [_0x328f3f,_0x3bbb11]=_0x3c9b10[_0x1feda8(0x17e)](readId,_0xa127e7,_0x40acab),[_0x545a53,_0x50ef0b]=_0x3c9b10[_0x1feda8(0x17e)](readVint,_0xa127e7,_0x40acab+_0x3bbb11);if(_0x3c9b10[_0x1feda8(0x174)](_0x328f3f,ID_INFO)){let _0x4809b0=_0x3c9b10['HpLBM'](_0x40acab,_0x3bbb11)+_0x50ef0b;const _0x156ab4=_0x3c9b10[_0x1feda8(0x17c)](_0x4809b0,_0x545a53);while(_0x3c9b10['dDnqi'](_0x4809b0,_0x156ab4)){const [_0x3cd445,_0x31905b]=_0x3c9b10[_0x1feda8(0x161)](readId,_0xa127e7,_0x4809b0),[_0x4d509d,_0x4ab9a9]=_0x3c9b10[_0x1feda8(0x161)](readVint,_0xa127e7,_0x3c9b10['BRyxl'](_0x4809b0,_0x31905b));if(_0x3cd445===ID_TIMESTAMP_SCALE)return readUint(_0xa127e7,_0x3c9b10['sXFlB'](_0x3c9b10[_0x1feda8(0x14e)](_0x4809b0,_0x31905b),_0x4ab9a9),_0x4d509d);_0x4809b0+=_0x3c9b10['caqzc'](_0x31905b+_0x4ab9a9,_0x4d509d);}break;}if(_0x3c9b10['ATOKc'](_0x328f3f,ID_CLUSTER))break;if(_0x3c9b10[_0x1feda8(0x16b)](isUnknownSize,_0x545a53,_0x50ef0b))break;_0x40acab+=_0x3bbb11+_0x50ef0b+_0x545a53;}return 0xf4240;}function _0x1b5c(){const _0x4f3863=['endsWith','pIkqQ','GDQPn','Stitched\x20','argv','3940624DkOsEx','bodyAfterTimestamp','QSoew','push','TvWdW','oFuEX','DQrCC','1064496AEWTJk','cvXlB','jRgUk','DwYlQ','4rYZVZR','neduF','AUMxU','slice','PJMdi','clusters','BVfAp','IxTCs','4124880cSCTAa','sIeAA','wcGhF','BRyxl','min','65904ubAcHO','qkMIz','bkjHP','IlGGI','JMkuo','MzMlc','concat','TWmjx','Baxwh','gvUcQ','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','maxTimestampTicks','stitchWebmFiles.js','zfiEH','TdxLj','gONbi','owTUZ','RNJXa','fEvzx','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','jFquF','7ztsMhc','dhCpo','NzpDb','biAge','20996970NOhTnb','PXYZr','dNCbn','moxyC','NBigW','UhXIV','5BOIbCk','apBNA','log','MnWgM','hwzgP','ATOKc','RIqll','2508685OcZshS','1059276DfZGrE','hjQKZ','fLkmp','floor','from','HpLBM','alloc','RTbeD','length','rsAhz','maxTicks'];_0x1b5c=function(){return _0x4f3863;};return _0x1b5c();}function findFirstClusterOffset(_0x44b43e,_0x5ae5e4){const _0x4e56e5=_0x5083,_0x60d34c={'GDQPn':function(_0x35107c,_0x47cf6c,_0x317abb){return _0x35107c(_0x47cf6c,_0x317abb);},'MnWgM':function(_0x580fb9,_0x4e782d,_0x14ce8f){return _0x580fb9(_0x4e782d,_0x14ce8f);},'MzMlc':function(_0x395e09,_0x4c6dae){return _0x395e09+_0x4c6dae;}};let _0x562c84=_0x5ae5e4;while(_0x562c84<_0x44b43e[_0x4e56e5(0x17f)]){const [_0x1d467f,_0x1fa778]=_0x60d34c[_0x4e56e5(0x184)](readId,_0x44b43e,_0x562c84);if(_0x1d467f===ID_CLUSTER)return _0x562c84;const [_0x5904c4,_0x26e28e]=readVint(_0x44b43e,_0x562c84+_0x1fa778);if(_0x60d34c[_0x4e56e5(0x172)](isUnknownSize,_0x5904c4,_0x26e28e))return _0x562c84;_0x562c84+=_0x60d34c[_0x4e56e5(0x155)](_0x1fa778+_0x26e28e,_0x5904c4);}return _0x44b43e[_0x4e56e5(0x17f)];}function findClusterEnd(_0x3d8466,_0xcbdb75,_0x4404ac,_0x5a760d){const _0x4883fd=_0x5083,_0x1f2abe={'IlGGI':function(_0x124ca9,_0x42e497){return _0x124ca9+_0x42e497;},'rsAhz':function(_0x584c84,_0x3bf57c,_0x5aaacc){return _0x584c84(_0x3bf57c,_0x5aaacc);},'apemr':function(_0x1d9363,_0x502364,_0x18232c){return _0x1d9363(_0x502364,_0x18232c);},'moxyC':function(_0x25ac16,_0x273b8b,_0x489ac0){return _0x25ac16(_0x273b8b,_0x489ac0);}};if(!isUnknownSize(_0x4404ac,_0x5a760d))return _0x1f2abe['IlGGI'](_0xcbdb75,_0x4404ac);const _0x5964de=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x14590c=_0xcbdb75;while(_0x14590c<_0x3d8466['length']-0x4){const [_0x5780d3,_0x3b42e5]=_0x1f2abe[_0x4883fd(0x180)](readId,_0x3d8466,_0x14590c);if(_0x5964de['has'](_0x5780d3))return _0x14590c;const [_0x7840ae,_0x2e69b1]=_0x1f2abe['apemr'](readVint,_0x3d8466,_0x14590c+_0x3b42e5);if(_0x1f2abe[_0x4883fd(0x16c)](isUnknownSize,_0x7840ae,_0x2e69b1))return _0x3d8466['length'];_0x14590c+=_0x1f2abe[_0x4883fd(0x153)](_0x3b42e5+_0x2e69b1,_0x7840ae);}return _0x3d8466['length'];}function extractClusters(_0x4d536c,_0x2661b1){const _0x2e04ac=_0x5083,_0x422ee4={'BmPyP':function(_0x3b1b16,_0x564f79){return _0x3b1b16===_0x564f79;},'neduF':function(_0x5a24bc,_0x487420,_0x55ca76){return _0x5a24bc(_0x487420,_0x55ca76);},'cvXlB':function(_0x313875,_0x24834b){return _0x313875!==_0x24834b;},'TWmjx':function(_0x2fe1cc,_0x23bb73){return _0x2fe1cc+_0x23bb73;},'qkMIz':function(_0x264849,_0x10c1a2,_0x3110d0,_0x4c8e53,_0x563ccc){return _0x264849(_0x10c1a2,_0x3110d0,_0x4c8e53,_0x563ccc);},'RIqll':function(_0x1e99a4,_0x4a057f){return _0x1e99a4<_0x4a057f;},'biAge':function(_0x40cda6,_0x3baaee){return _0x40cda6===_0x3baaee;},'UhXIV':function(_0x2ea1ab,_0xc3f14e){return _0x2ea1ab+_0xc3f14e;},'pJisc':function(_0x55e7a7,_0x2615bf){return _0x55e7a7>=_0x2615bf;},'YhEDH':function(_0x19f8eb,_0x3a6f32){return _0x19f8eb+_0x3a6f32;},'xcmyB':function(_0x4e62dc,_0x3a5d4f,_0x3468b4){return _0x4e62dc(_0x3a5d4f,_0x3468b4);}},_0x5e6370=[],_0x2e3800=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x40874e=0x0;while(_0x40874e<_0x4d536c['length']){const _0xb671dd=_0x4d536c['indexOf'](_0x2e3800,_0x40874e);if(_0x422ee4['BmPyP'](_0xb671dd,-0x1))break;const [_0x22a713,_0x199ab0]=_0x422ee4['neduF'](readId,_0x4d536c,_0xb671dd);if(_0x422ee4[_0x2e04ac(0x18f)](_0x22a713,ID_CLUSTER)){_0x40874e=_0x422ee4[_0x2e04ac(0x157)](_0xb671dd,0x1);continue;}const [_0x237ad3,_0x384170]=readVint(_0x4d536c,_0xb671dd+_0x199ab0),_0xe6bebb=_0xb671dd+_0x199ab0+_0x384170,_0xdd38cf=_0x422ee4[_0x2e04ac(0x151)](findClusterEnd,_0x4d536c,_0xe6bebb,_0x237ad3,_0x384170);let _0x3f16c9=_0xe6bebb,_0x50f4f0=0x0,_0x414df0=0x2,_0x5e6067=![],_0x357e15=Buffer[_0x2e04ac(0x17d)](0x0),_0x462805=Buffer['alloc'](0x0);while(_0x422ee4[_0x2e04ac(0x175)](_0x3f16c9,_0xdd38cf)){const [_0x451b9c,_0x2a09be]=readId(_0x4d536c,_0x3f16c9),[_0x3ab378,_0x382e3a]=_0x422ee4[_0x2e04ac(0x193)](readVint,_0x4d536c,_0x3f16c9+_0x2a09be);if(_0x422ee4[_0x2e04ac(0x168)](_0x451b9c,ID_TIMESTAMP)){_0x50f4f0=readUint(_0x4d536c,_0x422ee4[_0x2e04ac(0x16e)](_0x3f16c9,_0x2a09be)+_0x382e3a,_0x3ab378),_0x414df0=_0x3ab378,_0x5e6067=!![],_0x357e15=_0x4d536c['slice'](_0xe6bebb,_0x3f16c9);const _0x370e95=_0x422ee4['UhXIV'](_0x3f16c9,_0x2a09be)+_0x382e3a+_0x3ab378;_0x462805=_0x4d536c[_0x2e04ac(0x195)](_0x370e95,_0xdd38cf);break;}if(_0x422ee4['BmPyP'](_0x451b9c,ID_CLUSTER))break;if(_0x422ee4['neduF'](isUnknownSize,_0x3ab378,_0x382e3a))break;_0x3f16c9+=_0x2a09be+_0x382e3a+_0x3ab378;}!_0x5e6067&&(_0x462805=_0x4d536c['slice'](_0xe6bebb,_0xdd38cf));let _0x16d6b5=_0x50f4f0;_0x3f16c9=_0xe6bebb;while(_0x3f16c9<_0xdd38cf){const [_0x596751,_0x522a0f]=readId(_0x4d536c,_0x3f16c9),[_0x5ec3b7,_0x56e451]=_0x422ee4[_0x2e04ac(0x193)](readVint,_0x4d536c,_0x3f16c9+_0x522a0f);if(_0x596751===ID_SIMPLE_BLOCK&&_0x422ee4['pJisc'](_0x5ec3b7,0x4)){const _0x2c9fd9=_0x422ee4['YhEDH'](_0x3f16c9+_0x522a0f,_0x56e451),[,_0x96f323]=_0x422ee4['xcmyB'](readVint,_0x4d536c,_0x2c9fd9),_0x526ed4=_0x4d536c['readInt16BE'](_0x422ee4['TWmjx'](_0x2c9fd9,_0x96f323)),_0x1cdc27=_0x50f4f0+_0x526ed4;if(_0x1cdc27>_0x16d6b5)_0x16d6b5=_0x1cdc27;}if(_0x596751===ID_CLUSTER)break;if(isUnknownSize(_0x5ec3b7,_0x56e451))break;_0x3f16c9+=_0x422ee4['YhEDH'](_0x522a0f,_0x56e451)+_0x5ec3b7;}_0x5e6370[_0x2e04ac(0x18a)]({'timestamp':_0x50f4f0,'maxTicks':_0x16d6b5,'bodyBeforeTimestamp':_0x357e15,'bodyAfterTimestamp':_0x462805,'timestampElementSize':_0x414df0}),_0x40874e=_0xdd38cf;}return _0x5e6370;}function parseWebm(_0x5cc8cb){const _0x106158=_0x5083,_0x13c7a6={'PJMdi':function(_0x233377,_0x3da5e9,_0x40ef89){return _0x233377(_0x3da5e9,_0x40ef89);},'zfiEH':function(_0x49257d,_0x1fea86){return _0x49257d+_0x1fea86;},'DQrCC':function(_0x22a136,_0x329082){return _0x22a136!==_0x329082;},'bkjHP':function(_0x4a4fc3,_0x368d26){return _0x4a4fc3+_0x368d26;}};let _0x4e027f=0x0;const [,_0x4807c4]=_0x13c7a6[_0x106158(0x196)](readId,_0x5cc8cb,_0x4e027f),[_0x5a5946,_0x36fddf]=readVint(_0x5cc8cb,_0x4e027f+_0x4807c4);_0x4e027f+=_0x13c7a6['zfiEH'](_0x4807c4+_0x36fddf,_0x5a5946);const [_0x443609,_0x2caad0]=readId(_0x5cc8cb,_0x4e027f);if(_0x13c7a6[_0x106158(0x18d)](_0x443609,ID_SEGMENT))return null;const [,_0x1efe59]=readVint(_0x5cc8cb,_0x13c7a6[_0x106158(0x15d)](_0x4e027f,_0x2caad0)),_0x1dff1a=_0x13c7a6[_0x106158(0x152)](_0x4e027f+_0x2caad0,_0x1efe59),_0x57936f=_0x13c7a6['PJMdi'](findTimestampScale,_0x5cc8cb,_0x1dff1a),_0x98f926=findFirstClusterOffset(_0x5cc8cb,_0x1dff1a),_0x33b32e=_0x5cc8cb['slice'](0x0,_0x98f926),_0x4b7b06=_0x13c7a6[_0x106158(0x196)](extractClusters,_0x5cc8cb,_0x57936f);let _0x4b01c6=0x0;for(const _0x101f32 of _0x4b7b06){if(_0x101f32[_0x106158(0x181)]>_0x4b01c6)_0x4b01c6=_0x101f32[_0x106158(0x181)];}return{'header':_0x33b32e,'clusters':_0x4b7b06,'timestampScale':_0x57936f,'maxTimestampTicks':_0x4b01c6};}function buildCluster(_0x2a8b9a,_0xe426fe,_0xa12ab6){const _0x4ed4c6=_0x5083,_0x344920={'wcGhF':function(_0x2f0cb1,_0x1ea0cf){return _0x2f0cb1(_0x1ea0cf);},'gONbi':function(_0x46249d,_0x2b994f,_0x2c83f8){return _0x46249d(_0x2b994f,_0x2c83f8);}},_0x1a2089=Buffer[_0x4ed4c6(0x17b)]([0x1f,0x43,0xb6,0x75]),_0x64346=Math['max'](0x4,uintSize(_0x2a8b9a)),_0x4a6f61=Buffer[_0x4ed4c6(0x156)]([Buffer[_0x4ed4c6(0x17b)]([ID_TIMESTAMP]),_0x344920[_0x4ed4c6(0x14d)](writeVint,_0x64346),_0x344920[_0x4ed4c6(0x15f)](writeUint,_0x2a8b9a,_0x64346)]),_0x536a5e=Buffer['concat']([_0xe426fe,_0x4a6f61,_0xa12ab6]),_0x333ce3=writeVint(_0x536a5e['length']);return Buffer['concat']([_0x1a2089,_0x333ce3,_0x536a5e]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x1f6efb){const _0x45affa=_0x5083,_0x2aef14={'QSoew':function(_0x59ebc7,_0x248464,_0xbb8293){return _0x59ebc7(_0x248464,_0xbb8293);},'NzpDb':function(_0x2054e5,_0x27cdd4){return _0x2054e5+_0x27cdd4;},'dhCpo':function(_0x51315d,_0x5f5480){return _0x51315d+_0x5f5480;},'fLkmp':function(_0x596d6e,_0xe1143f){return _0x596d6e+_0xe1143f;},'iXzxE':function(_0x5ac603,_0x1aa0ff){return _0x5ac603(_0x1aa0ff);},'jRgUk':function(_0x4d180b,_0x4a2882){return _0x4d180b<_0x4a2882;},'JMkuo':function(_0x23622a,_0x3e30c1){return _0x23622a+_0x3e30c1;},'pIkqQ':function(_0x4b666e,_0x1e2b2a){return _0x4b666e===_0x1e2b2a;},'gvUcQ':function(_0x2cc919,_0x3e934f,_0x3804de){return _0x2cc919(_0x3e934f,_0x3804de);},'hjQKZ':function(_0x220ad1,_0x3c37f6){return _0x220ad1+_0x3c37f6;}},_0x4b5d8f=Buffer['from'](_0x1f6efb);let _0x393436=0x0;const [,_0xb1bf70]=readId(_0x4b5d8f,_0x393436),[_0x1e22d3,_0xf4baef]=_0x2aef14['QSoew'](readVint,_0x4b5d8f,_0x393436+_0xb1bf70),_0x52c2f3=_0x2aef14[_0x45affa(0x167)](_0x393436+_0xb1bf70+_0xf4baef,_0x1e22d3),[,_0x359133]=_0x2aef14[_0x45affa(0x189)](readId,_0x4b5d8f,_0x52c2f3),[,_0x2cbed6]=readVint(_0x4b5d8f,_0x2aef14[_0x45affa(0x166)](_0x52c2f3,_0x359133)),_0x1717dd=_0x2aef14[_0x45affa(0x179)](_0x2aef14['dhCpo'](_0x52c2f3,_0x359133),_0x2cbed6),_0x8dfb1f=_0x2aef14['iXzxE'](writeUnknownSizeVint,_0x2cbed6);_0x8dfb1f['copy'](_0x4b5d8f,_0x52c2f3+_0x359133);let _0x380c46=_0x1717dd;const _0x275317=Math[_0x45affa(0x14f)](_0x4b5d8f['length'],_0x2aef14[_0x45affa(0x166)](_0x1717dd,0x2710));while(_0x2aef14[_0x45affa(0x190)](_0x380c46,_0x275317)){const [_0x14a998,_0x1ef543]=_0x2aef14['QSoew'](readId,_0x4b5d8f,_0x380c46),[_0x56f6b1,_0x1c58b8]=readVint(_0x4b5d8f,_0x2aef14[_0x45affa(0x154)](_0x380c46,_0x1ef543));if(_0x14a998===ID_CLUSTER)break;if(isUnknownSize(_0x56f6b1,_0x1c58b8))break;if(_0x2aef14[_0x45affa(0x183)](_0x14a998,ID_INFO)){const _0x571454=_0x2aef14['JMkuo'](_0x2aef14[_0x45affa(0x179)](_0x380c46,_0x1ef543),_0x1c58b8),_0xefba3c=_0x571454+_0x56f6b1,_0x401e5b=[];let _0x431be1=_0x571454;while(_0x431be1<_0xefba3c){const [_0x515bac,_0x19e3c8]=_0x2aef14[_0x45affa(0x159)](readId,_0x4b5d8f,_0x431be1),[_0x15fe3d,_0x202549]=readVint(_0x4b5d8f,_0x2aef14[_0x45affa(0x178)](_0x431be1,_0x19e3c8)),_0x42efab=_0x2aef14[_0x45affa(0x166)](_0x19e3c8+_0x202549,_0x15fe3d);_0x515bac!==ID_DURATION&&_0x401e5b[_0x45affa(0x18a)](_0x4b5d8f[_0x45affa(0x195)](_0x431be1,_0x2aef14[_0x45affa(0x178)](_0x431be1,_0x42efab))),_0x431be1+=_0x42efab;}const _0x328d98=Buffer['concat'](_0x401e5b),_0x1af605=Buffer['concat']([_0x4b5d8f[_0x45affa(0x195)](_0x380c46,_0x380c46+_0x1ef543),writeVint(_0x328d98[_0x45affa(0x17f)],_0x1c58b8)]);return Buffer[_0x45affa(0x156)]([_0x4b5d8f[_0x45affa(0x195)](0x0,_0x380c46),_0x1af605,_0x328d98,_0x4b5d8f['slice'](_0xefba3c)]);}_0x380c46+=_0x2aef14['fLkmp'](_0x2aef14['hjQKZ'](_0x1ef543,_0x1c58b8),_0x56f6b1);}return _0x4b5d8f;}export function stitchWebmFiles(_0x30410f,_0x57321d){const _0x220954=_0x5083,_0x851363={'Gosaw':function(_0x110da4,_0x5d9ffd){return _0x110da4<=_0x5d9ffd;},'uMdnV':function(_0x10eb06,_0x19485b){return _0x10eb06(_0x19485b);},'quxet':function(_0x5aafb2,_0x4d7695){return _0x5aafb2(_0x4d7695);},'SorPZ':function(_0x5b5fbb,_0x4f92db){return _0x5b5fbb===_0x4f92db;},'owTUZ':function(_0x476478,_0x5104fc){return _0x476478<_0x5104fc;},'AUMxU':function(_0x56eb08,_0x1cfa02,_0x2d5343,_0x441381){return _0x56eb08(_0x1cfa02,_0x2d5343,_0x441381);}};if(_0x851363['Gosaw'](_0x30410f['length'],0x1))return![];const _0x1bfa15=[];for(const _0x984216 of _0x30410f){const _0x1e53ba=_0x851363['uMdnV'](readFileSync,_0x984216),_0x469da8=_0x851363['quxet'](parseWebm,_0x1e53ba);if(!_0x469da8||_0x851363['SorPZ'](_0x469da8['clusters'][_0x220954(0x17f)],0x0))return![];_0x1bfa15['push'](_0x469da8);}const _0x1e3909=_0x1bfa15[0x0],_0x81bc7c=rebuildHeaderWithoutDuration(_0x1e3909['header']),_0x292453=[_0x81bc7c];let _0x5265b9=0x0;for(let _0x10075a=0x0;_0x851363[_0x220954(0x160)](_0x10075a,_0x1bfa15['length']);_0x10075a++){const _0x2e707b=_0x1bfa15[_0x10075a];for(const _0x104e56 of _0x2e707b[_0x220954(0x148)]){const _0x2929a1=_0x104e56['timestamp']+_0x5265b9;_0x292453['push'](_0x851363[_0x220954(0x194)](buildCluster,_0x2929a1,_0x104e56['bodyBeforeTimestamp'],_0x104e56[_0x220954(0x188)]));}const _0x2f0b46=0x1e;_0x5265b9+=_0x2e707b[_0x220954(0x15b)]+_0x2f0b46;}return writeFileSync(_0x57321d,Buffer['concat'](_0x292453)),!![];}if(process[_0x34890e(0x186)][0x1]?.['endsWith']('stitchWebmFiles.ts')||process['argv'][0x1]?.[_0x34890e(0x182)](_0x34890e(0x15c))){const args=process[_0x34890e(0x186)][_0x34890e(0x195)](0x2);args['length']<0x3&&(console['error'](_0x34890e(0x15a)),process['exit'](0x1));const output=args[args[_0x34890e(0x17f)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x34890e(0x185)+inputs['length']+'\x20files\x20->\x20'+output):console[_0x34890e(0x171)](_0x34890e(0x163));}
|