@ranger-testing/ranger-cli 2.5.4-alpha.0e8b82c-9 → 2.5.4-alpha.152f635-21
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/README.md +36 -14
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +24 -8
- package/build/skills/ranger/create.md +16 -3
- package/build/skills/ranger/verify.md +35 -10
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c05c3,_0x33d6ff){const _0x59d6e9=_0x1a8d,_0x114a57=_0x1c05c3();while(!![]){try{const _0x374f6d=-parseInt(_0x59d6e9(0x96))/0x1+-parseInt(_0x59d6e9(0xa4))/0x2+-parseInt(_0x59d6e9(0x9d))/0x3*(parseInt(_0x59d6e9(0xa2))/0x4)+-parseInt(_0x59d6e9(0xa7))/0x5+-parseInt(_0x59d6e9(0x99))/0x6+parseInt(_0x59d6e9(0x9a))/0x7*(-parseInt(_0x59d6e9(0x98))/0x8)+parseInt(_0x59d6e9(0xa3))/0x9;if(_0x374f6d===_0x33d6ff)break;else _0x114a57['push'](_0x114a57['shift']());}catch(_0x43c8fa){_0x114a57['push'](_0x114a57['shift']());}}}(_0x2af6,0x59dfb));function firstDefined(..._0x267ea8){for(const _0x321fb9 of _0x267ea8){if(_0x321fb9!==undefined&&_0x321fb9!==null&&_0x321fb9!=='')return _0x321fb9;}return undefined;}function normalizeAuthEnvironmentDomain(_0x247332){if(!_0x247332)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x247332))return _0x247332;return'https://'+_0x247332;}export function resolveBaseUrl(_0x842f75){const _0x30e40e=_0x1a8d,_0x507390={'drAYl':_0x30e40e(0x9c),'rrASf':'string','dWmtz':function(_0x3bf9a,_0x1e6f17){return _0x3bf9a(_0x1e6f17);}},_0x37f847=_0x842f75['projectOverrides'],_0x3979c2=!!_0x37f847&&_0x507390[_0x30e40e(0x9e)]in _0x37f847,_0x4b3443=_0x37f847?.['baseUrl'],_0x26838b=!(_0x3979c2&&_0x4b3443===null);return firstDefined(_0x842f75['flagBaseUrl'],_0x842f75['envBaseUrl'],_0x842f75[_0x30e40e(0x9f)],typeof _0x4b3443===_0x507390['rrASf']?_0x4b3443:undefined,_0x26838b?_0x842f75['cloudSettings']?.['baseUrl']:undefined,_0x26838b?_0x507390['dWmtz'](normalizeAuthEnvironmentDomain,_0x842f75['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x1d96a3){const _0x518731=_0x1a8d,_0x4c2ebe={'jZAOV':function(_0x11ff56,_0x5d9119){return _0x11ff56 in _0x5d9119;},'zyuFg':'startPath','nbyDI':function(_0x38eeb4,_0x1cbb8a,_0x4ff692,_0x5a2ff2,_0x1de05c){return _0x38eeb4(_0x1cbb8a,_0x4ff692,_0x5a2ff2,_0x1de05c);}},_0x478d1e=_0x1d96a3['projectOverrides'],_0x2229c9=!!_0x478d1e&&_0x4c2ebe[_0x518731(0x9b)](_0x4c2ebe['zyuFg'],_0x478d1e),_0x34d9bd=_0x478d1e?.['startPath'],_0x39935e=!(_0x2229c9&&_0x34d9bd===null);return _0x4c2ebe['nbyDI'](firstDefined,_0x1d96a3['flagStartPath'],_0x1d96a3[_0x518731(0xa5)],typeof _0x34d9bd===_0x518731(0xa1)?_0x34d9bd:undefined,_0x39935e?_0x1d96a3[_0x518731(0x97)]?.[_0x518731(0xa6)]:undefined);}function _0x1a8d(_0x5c01fe,_0x587a28){_0x5c01fe=_0x5c01fe-0x96;const _0x2af67c=_0x2af6();let _0x1a8d2f=_0x2af67c[_0x5c01fe];return _0x1a8d2f;}export function joinBaseAndPath(_0x44c421,_0x5badb4){const _0x4db35b=_0x1a8d;if(!_0x44c421)return undefined;if(!_0x5badb4)return _0x44c421;const _0x2c0189=_0x44c421['endsWith']('/')?_0x44c421['slice'](0x0,-0x1):_0x44c421,_0x5e26ed=_0x5badb4[_0x4db35b(0xa0)]('/')?_0x5badb4:'/'+_0x5badb4;return _0x2c0189+_0x5e26ed;}function _0x2af6(){const _0x16867b=['jZAOV','baseUrl','14631kKyhwG','drAYl','localSettingsBaseUrl','startsWith','string','244fQYLRU','19415835rdnheS','788548XctuMc','envStartPath','startPath','3398450OPKygA','150587oQEXbq','cloudSettings','22072bCCfUh','626178IxaYQq','413ALcNTw'];_0x2af6=function(){return _0x16867b;};return _0x2af6();}export function resolveProfileUrl(_0x2b1e23){const _0x4213b0={'xXDOq':function(_0x3900fe,_0x317eab){return _0x3900fe(_0x317eab);},'kTyqV':function(_0x11eed3,_0x305d46,_0x227fcc){return _0x11eed3(_0x305d46,_0x227fcc);}},_0x4c1632=resolveBaseUrl(_0x2b1e23),_0x34b049=_0x4213b0['xXDOq'](resolveStartPath,_0x2b1e23);return{'baseUrl':_0x4c1632,'startPath':_0x34b049,'url':_0x4213b0['kTyqV'](joinBaseAndPath,_0x4c1632,_0x34b049)};}export function readUrlEnvVars(_0x1c37ad=process['env']){return{'envBaseUrl':_0x1c37ad['RANGER_BASE_URL'],'envStartPath':_0x1c37ad['RANGER_START_PATH']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x374c(){const _0x4919f5=['label','),\x20retrying\x20in\x20','291944tTAcIO','5341080yIExiI','pow','baseDelayMs','maxRetries','2wATkRc','11051300CVXHGD','225dymVUx','TNgtG','4627878vVFHDh','error','1563425zbwcTP','3vykQXQ','1989028UnksMz','11412653XELoWN'];_0x374c=function(){return _0x4919f5;};return _0x374c();}function _0x24db(_0x1ef926,_0x92d4db){_0x1ef926=_0x1ef926-0x6c;const _0x374cda=_0x374c();let _0x24db63=_0x374cda[_0x1ef926];return _0x24db63;}(function(_0x9af029,_0x2c525e){const _0x54b760=_0x24db,_0x246d2a=_0x9af029();while(!![]){try{const _0x491ad9=-parseInt(_0x54b760(0x72))/0x1*(-parseInt(_0x54b760(0x6c))/0x2)+parseInt(_0x54b760(0x73))/0x3*(-parseInt(_0x54b760(0x74))/0x4)+parseInt(_0x54b760(0x79))/0x5+-parseInt(_0x54b760(0x70))/0x6+parseInt(_0x54b760(0x75))/0x7+-parseInt(_0x54b760(0x78))/0x8*(parseInt(_0x54b760(0x6e))/0x9)+-parseInt(_0x54b760(0x6d))/0xa;if(_0x491ad9===_0x2c525e)break;else _0x246d2a['push'](_0x246d2a['shift']());}catch(_0x330fd1){_0x246d2a['push'](_0x246d2a['shift']());}}}(_0x374c,0xee47b));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x21ee6b,_0x1a31fa){const _0x3446db=_0x24db,_0x49be51={'TNgtG':function(_0x4fb905,_0x2034cc){return _0x4fb905<=_0x2034cc;},'rksha':function(_0x1e3d58,_0x3327f6){return _0x1e3d58 instanceof _0x3327f6;},'uACxQ':function(_0x1b94ce,_0x589bc2){return _0x1b94ce+_0x589bc2;}},_0xa40592=_0x1a31fa?.[_0x3446db(0x7c)]??DEFAULT_MAX_RETRIES,_0x1a0f63=_0x1a31fa?.[_0x3446db(0x7b)]??DEFAULT_BASE_DELAY_MS;let _0x5684f0;for(let _0x26a434=0x0;_0x49be51[_0x3446db(0x6f)](_0x26a434,_0xa40592);_0x26a434++){try{return await _0x21ee6b();}catch(_0x49b284){_0x5684f0=_0x49be51['rksha'](_0x49b284,Error)?_0x49b284:new Error(String(_0x49b284));if(_0x26a434<_0xa40592){const _0x20d345=_0x1a0f63*Math[_0x3446db(0x7a)](0x2,_0x26a434);_0x1a31fa?.[_0x3446db(0x76)]&&console[_0x3446db(0x71)](_0x1a31fa['label']+'\x20failed\x20(attempt\x20'+(_0x26a434+0x1)+'/'+_0x49be51['uACxQ'](_0xa40592,0x1)+_0x3446db(0x77)+_0x20d345+'ms...'),await new Promise(_0x1e348a=>setTimeout(_0x1e348a,_0x20d345));}}}throw _0x5684f0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x40c551=_0x19da;(function(_0x48b214,_0x24eb0f){const _0xada056=_0x19da,_0x1c69b6=_0x48b214();while(!![]){try{const _0x30b7a9=parseInt(_0xada056(0x164))/0x1*(parseInt(_0xada056(0x183))/0x2)+-parseInt(_0xada056(0x17c))/0x3+-parseInt(_0xada056(0x18a))/0x4*(parseInt(_0xada056(0x196))/0x5)+-parseInt(_0xada056(0x17d))/0x6*(-parseInt(_0xada056(0x186))/0x7)+parseInt(_0xada056(0x189))/0x8+-parseInt(_0xada056(0x162))/0x9+-parseInt(_0xada056(0x184))/0xa*(-parseInt(_0xada056(0x188))/0xb);if(_0x30b7a9===_0x24eb0f)break;else _0x1c69b6['push'](_0x1c69b6['shift']());}catch(_0x3f5cd9){_0x1c69b6['push'](_0x1c69b6['shift']());}}}(_0x30cc,0x8bb9f));import*as _0x2a537d from'fs';import*as _0x129d11 from'path';function _0x19da(_0x4c9933,_0x1a69c0){_0x4c9933=_0x4c9933-0x162;const _0x30cc02=_0x30cc();let _0x19da3d=_0x30cc02[_0x4c9933];return _0x19da3d;}import*as _0x5ac8e3 from'os';import{execSync}from'child_process';function _0x30cc(){const _0x62eaa1=['pipe','bltLI','stringify','Brfxa','currentBranch','lastPlanReminderAt','sessions','writeFileSync','featureId','pxKHn','RXFfl','817029KcJxvz','2998524JPAbbO','parse','ASWAg','enabled','existsSync','ukDYZ','2157422SLSGYf','22730fsdxHT','main','7NXyJuF','clear','4499YdzCJT','1539352CCVCdb','12148ghVFoi','bNHvP','AEHHA','HEAD','.ranger_cache.json','master','tRLFU','GCSbK','doEjc','utf-8','VMsif','CKPfu','1385PBHiXH','NnlbA','hozRo','BGFNA','now','9131670uCXvcU','kUTHH','1GcMZhN','readFileSync','toISOString','EbTdh','mkdirSync','lastEnabledSessionClearedAt','registeredAt','homedir','prompted','bvONr','branches','uDwjw','.claude'];_0x30cc=function(){return _0x62eaa1;};return _0x30cc();}const CACHE_FILE=_0x129d11['join'](_0x5ac8e3[_0x40c551(0x16b)](),_0x40c551(0x170),_0x40c551(0x18e));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x523db6=_0x40c551;try{if(_0x2a537d['existsSync'](CACHE_FILE)){const _0x28da11=JSON[_0x523db6(0x17e)](_0x2a537d[_0x523db6(0x165)](CACHE_FILE,_0x523db6(0x193)));return{'version':0x3,'sessions':_0x28da11['sessions']||{},'branches':_0x28da11[_0x523db6(0x16e)]||{},'lastEnabledSessionClearedAt':_0x28da11['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x45e4c8){const _0x371346=_0x40c551;try{const _0x1f3f42=_0x129d11['dirname'](CACHE_FILE);!_0x2a537d[_0x371346(0x181)](_0x1f3f42)&&_0x2a537d[_0x371346(0x168)](_0x1f3f42,{'recursive':!![]}),_0x2a537d[_0x371346(0x178)](CACHE_FILE,JSON[_0x371346(0x173)](_0x45e4c8,null,0x2));}catch{}}export function getCurrentBranch(){const _0x736b50=_0x40c551,_0x51d881={'JmYvH':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','CrquX':_0x736b50(0x193),'tRLFU':function(_0xc442cd,_0x1be534){return _0xc442cd===_0x1be534;},'RqXNe':_0x736b50(0x18d)};try{const _0x593e2e=execSync(_0x51d881['JmYvH'],{'encoding':_0x51d881['CrquX'],'stdio':['pipe',_0x736b50(0x171),_0x736b50(0x171)]})['trim']();if(!_0x593e2e||_0x51d881[_0x736b50(0x190)](_0x593e2e,_0x51d881['RqXNe']))return null;return _0x593e2e;}catch{return null;}}export function enableBranch(_0x6bd583){const _0x9ab05={'LSlnW':function(_0x2d674e,_0x4e4bab){return _0x2d674e(_0x4e4bab);}},_0x4d7620=loadCache();_0x4d7620['branches'][_0x6bd583]=!![],_0x9ab05['LSlnW'](saveCache,_0x4d7620);}export function disableBranch(_0x2b6f6a){const _0xa8b6e9=loadCache();delete _0xa8b6e9['branches'][_0x2b6f6a],saveCache(_0xa8b6e9);}export function isBranchEnabled(_0x3ba874){const _0x350267=_0x40c551,_0x194c00={'QPABx':function(_0x4ba1f1){return _0x4ba1f1();},'NnlbA':function(_0x4d020e,_0x4f1d25){return _0x4d020e===_0x4f1d25;}},_0x4e379a=_0x194c00['QPABx'](loadCache);return _0x194c00[_0x350267(0x197)](_0x4e379a['branches'][_0x3ba874],!![]);}function getOrCreateSession(_0x27d565,_0x2c10fb){const _0x5925f7=_0x40c551;return!_0x27d565[_0x5925f7(0x177)][_0x2c10fb]&&(_0x27d565['sessions'][_0x2c10fb]={}),_0x27d565[_0x5925f7(0x177)][_0x2c10fb];}export function enableSession(_0x19ef2c){const _0x34f539=_0x40c551,_0x4d4a80={'bNHvP':function(_0x29a864){return _0x29a864();},'aaUQH':_0x34f539(0x185)},_0xe1f1ba=loadCache(),_0x293876=getOrCreateSession(_0xe1f1ba,_0x19ef2c);_0x293876[_0x34f539(0x180)]=!![];const _0x3b1f30=_0x4d4a80[_0x34f539(0x18b)](getCurrentBranch);_0x3b1f30&&_0x3b1f30!==_0x4d4a80['aaUQH']&&_0x3b1f30!=='master'&&(_0xe1f1ba[_0x34f539(0x16e)][_0x3b1f30]=!![],_0x293876[_0x34f539(0x175)]=_0x3b1f30),saveCache(_0xe1f1ba);}export function isSessionEnabled(_0x263a67){const _0x2e616a=_0x40c551,_0x1976a9={'doEjc':function(_0x302956,_0x28d236){return _0x302956===_0x28d236;},'aRdoT':'main','DyFMY':'master'},_0x55380b=loadCache(),_0x3939f5=getCurrentBranch();if(!_0x3939f5||_0x1976a9[_0x2e616a(0x192)](_0x3939f5,_0x1976a9['aRdoT'])||_0x3939f5===_0x1976a9['DyFMY'])return _0x1976a9['doEjc'](_0x55380b['sessions'][_0x263a67]?.['enabled'],!![]);const _0xfe707b=_0x55380b['branches'][_0x3939f5]===!![],_0x5a929d=_0x1976a9['doEjc'](_0x55380b[_0x2e616a(0x177)][_0x263a67]?.['enabled'],!![]);return _0xfe707b||_0x5a929d;}export function disableSession(_0x578e64){const _0x4cb430=_0x40c551,_0xeeb634={'bvONr':function(_0x504443){return _0x504443();}},_0x56117e=_0xeeb634[_0x4cb430(0x16d)](loadCache),_0x54abf2=getOrCreateSession(_0x56117e,_0x578e64);_0x54abf2[_0x4cb430(0x180)]=![],saveCache(_0x56117e);}export function updateBranchTracking(_0x494b4d){const _0x26f775=_0x40c551,_0x57a53a={'HUzNL':function(_0x419c3b,_0x51aaba){return _0x419c3b===_0x51aaba;},'BGFNA':_0x26f775(0x185),'hozRo':function(_0x4310c3,_0x4a9fe2){return _0x4310c3!==_0x4a9fe2;}},_0x267df8=loadCache(),_0x10f9ae=_0x267df8['sessions'][_0x494b4d];if(!_0x10f9ae?.['enabled'])return;const _0x20cc5e=getCurrentBranch();if(!_0x20cc5e||_0x57a53a['HUzNL'](_0x20cc5e,_0x57a53a[_0x26f775(0x199)])||_0x20cc5e==='master')return;_0x57a53a[_0x26f775(0x198)](_0x10f9ae[_0x26f775(0x175)],_0x20cc5e)&&(_0x267df8['branches'][_0x20cc5e]=!![],_0x10f9ae['currentBranch']=_0x20cc5e,saveCache(_0x267df8));}export function initBranchTracking(_0xbd946a){const _0x1b219e=_0x40c551,_0x104570={'xrXAS':function(_0x4d83cb){return _0x4d83cb();},'RXFfl':function(_0x404566,_0x43c9e5){return _0x404566===_0x43c9e5;},'ZyRxQ':_0x1b219e(0x185),'AEHHA':_0x1b219e(0x18f),'Ffytw':function(_0x515af0,_0x15337c){return _0x515af0===_0x15337c;},'YLiwG':function(_0x28f3b3,_0x2c41bb,_0x3ed9cf){return _0x28f3b3(_0x2c41bb,_0x3ed9cf);}},_0x5320c7=_0x104570['xrXAS'](loadCache),_0x196e77=getCurrentBranch();if(!_0x196e77||_0x104570[_0x1b219e(0x17b)](_0x196e77,_0x104570['ZyRxQ'])||_0x196e77===_0x104570[_0x1b219e(0x18c)])return;if(_0x104570['Ffytw'](_0x5320c7[_0x1b219e(0x16e)][_0x196e77],!![])){const _0x39b1bd=_0x104570['YLiwG'](getOrCreateSession,_0x5320c7,_0xbd946a);_0x39b1bd['enabled']=!![],_0x39b1bd[_0x1b219e(0x175)]=_0x196e77,saveCache(_0x5320c7);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0xb8b9fb){const _0x42264b=_0x40c551,_0x292684=loadCache(),_0x2345c5=_0x292684[_0x42264b(0x177)][_0xb8b9fb];_0x2345c5?.['enabled']&&(_0x292684['lastEnabledSessionClearedAt']=Date[_0x42264b(0x19a)](),saveCache(_0x292684));}export function shouldAutoEnableAfterClear(_0x3fb6d5){const _0x417e18=_0x40c551,_0x3c3e2a={'hKUuG':function(_0x10cd9f,_0x1e8007){return _0x10cd9f!==_0x1e8007;},'EbTdh':_0x417e18(0x187),'LDVTI':function(_0x2a96a7){return _0x2a96a7();},'Opzcv':function(_0x57ed1c,_0x128e6f){return _0x57ed1c-_0x128e6f;}};if(_0x3c3e2a['hKUuG'](_0x3fb6d5,_0x3c3e2a[_0x417e18(0x167)]))return![];const _0x35c087=_0x3c3e2a['LDVTI'](loadCache),_0x5aea61=_0x35c087[_0x417e18(0x169)];if(!_0x5aea61)return![];const _0x1852ee=_0x3c3e2a['Opzcv'](Date[_0x417e18(0x19a)](),_0x5aea61);return _0x1852ee<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x51c1ce){const _0x1f28dc=_0x40c551,_0x440e1e={'Brfxa':function(_0x41c95e){return _0x41c95e();},'CKPfu':function(_0x1c207c,_0x2a57f0,_0x1109c2){return _0x1c207c(_0x2a57f0,_0x1109c2);},'VMsif':function(_0x24845d){return _0x24845d();},'wHgcE':function(_0x1f08c0,_0x1c4a86){return _0x1f08c0!==_0x1c4a86;},'tYUYy':function(_0x3140d6,_0x159e95){return _0x3140d6(_0x159e95);}},_0x449f3e=_0x440e1e[_0x1f28dc(0x174)](loadCache),_0x26c217=_0x440e1e[_0x1f28dc(0x195)](getOrCreateSession,_0x449f3e,_0x51c1ce);_0x26c217[_0x1f28dc(0x180)]=!![];const _0x144c23=_0x440e1e[_0x1f28dc(0x194)](getCurrentBranch);_0x144c23&&_0x440e1e['wHgcE'](_0x144c23,_0x1f28dc(0x185))&&_0x440e1e['wHgcE'](_0x144c23,_0x1f28dc(0x18f))&&(_0x26c217[_0x1f28dc(0x175)]=_0x144c23),delete _0x449f3e['lastEnabledSessionClearedAt'],_0x440e1e['tYUYy'](saveCache,_0x449f3e);}export function registerSession(_0x3f1c56,_0xef8fd){const _0x2606ce=_0x40c551,_0x63d525={'ukDYZ':function(_0x4a820d){return _0x4a820d();},'PNVaX':function(_0xd64987,_0x4d1a73){return _0xd64987(_0x4d1a73);}},_0x371bc1=_0x63d525[_0x2606ce(0x182)](loadCache),_0x1b9861=getOrCreateSession(_0x371bc1,_0x3f1c56);_0x1b9861['featureId']=_0xef8fd,_0x1b9861['registeredAt']=new Date()[_0x2606ce(0x166)](),_0x63d525['PNVaX'](saveCache,_0x371bc1);}export function getSessionEntry(_0x1d6a74){const _0x5e513b=_0x40c551,_0x233971=loadCache(),_0x1cca04=_0x233971['sessions'][_0x1d6a74];if(_0x1cca04?.[_0x5e513b(0x179)]&&_0x1cca04?.[_0x5e513b(0x16a)])return{'featureId':_0x1cca04['featureId'],'registeredAt':_0x1cca04[_0x5e513b(0x16a)]};return null;}export function unregisterSession(_0x1237b7){const _0x86b182=_0x40c551,_0xac4954={'ASWAg':function(_0x2d4a8d){return _0x2d4a8d();}},_0x237871=_0xac4954[_0x86b182(0x17f)](loadCache),_0x483397=_0x237871['sessions'][_0x1237b7];_0x483397&&(delete _0x483397['featureId'],delete _0x483397[_0x86b182(0x16a)],saveCache(_0x237871));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xb3497b){const _0x577c4e=_0x40c551,_0x200aa1={'sQXje':function(_0x1b1646){return _0x1b1646();},'pxKHn':function(_0x23d825,_0x2e6f06,_0x56f3cb){return _0x23d825(_0x2e6f06,_0x56f3cb);},'IPQrv':function(_0x5cb4aa,_0xfe609e){return _0x5cb4aa>=_0xfe609e;},'APREy':function(_0x251c7f,_0x55f358){return _0x251c7f(_0x55f358);}},_0xb1feda=_0x200aa1['sQXje'](loadCache),_0x54d0ce=_0x200aa1[_0x577c4e(0x17a)](getOrCreateSession,_0xb1feda,_0xb3497b),_0x57e926=_0x54d0ce[_0x577c4e(0x176)]||0x0,_0x1426f8=Date[_0x577c4e(0x19a)]();if(_0x200aa1['IPQrv'](_0x1426f8-_0x57e926,PLAN_REMINDER_INTERVAL_MS))return _0x54d0ce['lastPlanReminderAt']=_0x1426f8,_0x200aa1['APREy'](saveCache,_0xb1feda),!![];return![];}export function shouldShowStopReminder(_0x165477){const _0x187bd8=_0x40c551,_0x5063eb={'YWNDu':function(_0xe61a75,_0x195357,_0x11d3d3){return _0xe61a75(_0x195357,_0x11d3d3);},'bltLI':function(_0x258e8e,_0xe3e4c8){return _0x258e8e-_0xe3e4c8;},'uDwjw':function(_0x32265b,_0x3177fd){return _0x32265b(_0x3177fd);}},_0x434be2=loadCache(),_0x59fa2b=_0x5063eb['YWNDu'](getOrCreateSession,_0x434be2,_0x165477),_0x4f573c=_0x59fa2b['lastStopReminderAt']||0x0,_0x327e44=Date[_0x187bd8(0x19a)]();if(_0x5063eb[_0x187bd8(0x172)](_0x327e44,_0x4f573c)>=STOP_REMINDER_INTERVAL_MS)return _0x59fa2b['lastStopReminderAt']=_0x327e44,_0x5063eb[_0x187bd8(0x16f)](saveCache,_0x434be2),!![];return![];}export function hasSessionBeenPrompted(_0x586911){const _0x770d38=_0x40c551,_0x4f5e50=loadCache();return _0x4f5e50['sessions'][_0x586911]?.[_0x770d38(0x16c)]===!![];}export function markSessionPrompted(_0x1106b9){const _0x3fafdb=_0x40c551,_0x430e9f={'kUTHH':function(_0xc4638,_0xa8b6b1,_0x1775c2){return _0xc4638(_0xa8b6b1,_0x1775c2);},'GCSbK':function(_0x366c3f,_0x411d58){return _0x366c3f(_0x411d58);}},_0x52e1cd=loadCache(),_0x51f601=_0x430e9f[_0x3fafdb(0x163)](getOrCreateSession,_0x52e1cd,_0x1106b9);_0x51f601[_0x3fafdb(0x16c)]=!![],_0x430e9f[_0x3fafdb(0x191)](saveCache,_0x52e1cd);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x3fcc02=_0x1b5e;(function(_0x28288f,_0x13a3a2){const _0xd43522=_0x1b5e,_0x58a646=_0x28288f();while(!![]){try{const _0x69d069=parseInt(_0xd43522(0x185))/0x1+parseInt(_0xd43522(0x180))/0x2*(-parseInt(_0xd43522(0x17d))/0x3)+-parseInt(_0xd43522(0x160))/0x4*(-parseInt(_0xd43522(0x179))/0x5)+parseInt(_0xd43522(0x18e))/0x6*(parseInt(_0xd43522(0x18c))/0x7)+-parseInt(_0xd43522(0x16e))/0x8*(-parseInt(_0xd43522(0x166))/0x9)+-parseInt(_0xd43522(0x17a))/0xa*(-parseInt(_0xd43522(0x171))/0xb)+-parseInt(_0xd43522(0x169))/0xc;if(_0x69d069===_0x13a3a2)break;else _0x58a646['push'](_0x58a646['shift']());}catch(_0x2539b2){_0x58a646['push'](_0x58a646['shift']());}}}(_0x3271,0xc947b));import*as _0x3eb20f from'fs';import*as _0x4c1cba from'path';import*as _0x25a73d from'os';import{execSync}from'child_process';const CACHE_FILE=_0x4c1cba[_0x3fcc02(0x188)](_0x25a73d['homedir'](),_0x3fcc02(0x16b),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x8369df=_0x3fcc02,_0x1eca1e={'CJmQD':function(_0x2de35b){return _0x2de35b();}};try{if(_0x3eb20f['existsSync'](CACHE_FILE)){const _0x5bbf90=JSON[_0x8369df(0x18a)](_0x3eb20f['readFileSync'](CACHE_FILE,'utf-8'));return{'version':0x3,'sessions':_0x5bbf90[_0x8369df(0x176)]||{},'branches':_0x5bbf90[_0x8369df(0x170)]||{},'lastEnabledSessionClearedAt':_0x5bbf90['lastEnabledSessionClearedAt']};}}catch{}return _0x1eca1e['CJmQD'](createEmptyCache);}function saveCache(_0x53a661){const _0x477e9a=_0x3fcc02;try{const _0x584610=_0x4c1cba['dirname'](CACHE_FILE);!_0x3eb20f[_0x477e9a(0x162)](_0x584610)&&_0x3eb20f[_0x477e9a(0x15c)](_0x584610,{'recursive':!![]}),_0x3eb20f['writeFileSync'](CACHE_FILE,JSON[_0x477e9a(0x182)](_0x53a661,null,0x2));}catch{}}export function getCurrentBranch(){const _0x5d0d67=_0x3fcc02,_0x2b0709={'iSujq':function(_0xe9906f,_0x5c641c,_0x250d80){return _0xe9906f(_0x5c641c,_0x250d80);},'BsPBr':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','cJrjZ':_0x5d0d67(0x186),'ZEBIZ':'pipe','FdOlY':function(_0x45b6a0,_0x34a334){return _0x45b6a0===_0x34a334;}};try{const _0x3826d0=_0x2b0709['iSujq'](execSync,_0x2b0709[_0x5d0d67(0x15b)],{'encoding':_0x2b0709['cJrjZ'],'stdio':[_0x5d0d67(0x17f),_0x2b0709['ZEBIZ'],'pipe']})['trim']();if(!_0x3826d0||_0x2b0709['FdOlY'](_0x3826d0,_0x5d0d67(0x159)))return null;return _0x3826d0;}catch{return null;}}export function enableBranch(_0x2550ef){const _0x2ed124={'eDvld':function(_0x4b8587,_0x4a1141){return _0x4b8587(_0x4a1141);}},_0x1aa81b=loadCache();_0x1aa81b['branches'][_0x2550ef]=!![],_0x2ed124['eDvld'](saveCache,_0x1aa81b);}function _0x1b5e(_0x38f96b,_0x41b043){_0x38f96b=_0x38f96b-0x155;const _0x3271df=_0x3271();let _0x1b5ec6=_0x3271df[_0x38f96b];return _0x1b5ec6;}export function disableBranch(_0x40d3af){const _0x559b6d={'KfRWX':function(_0x50d068){return _0x50d068();},'FblOx':function(_0x2c0d48,_0x2d6c1d){return _0x2c0d48(_0x2d6c1d);}},_0x3d795d=_0x559b6d['KfRWX'](loadCache);delete _0x3d795d['branches'][_0x40d3af],_0x559b6d['FblOx'](saveCache,_0x3d795d);}export function isBranchEnabled(_0x5b05d0){const _0x4eb1da=_0x3fcc02,_0x434d5b=loadCache();return _0x434d5b[_0x4eb1da(0x170)][_0x5b05d0]===!![];}function getOrCreateSession(_0x23c648,_0x5e124c){const _0x592aea=_0x3fcc02;return!_0x23c648[_0x592aea(0x176)][_0x5e124c]&&(_0x23c648['sessions'][_0x5e124c]={}),_0x23c648[_0x592aea(0x176)][_0x5e124c];}export function enableSession(_0xa906be){const _0x147db3=_0x3fcc02,_0x5a1584={'IRDQL':function(_0x28b4a1,_0x4e5dc6,_0x322aab){return _0x28b4a1(_0x4e5dc6,_0x322aab);},'ERLOb':_0x147db3(0x187),'OgyWC':function(_0x356732,_0x4bd70f){return _0x356732(_0x4bd70f);}},_0x19ed36=loadCache(),_0x192208=_0x5a1584[_0x147db3(0x15f)](getOrCreateSession,_0x19ed36,_0xa906be);_0x192208[_0x147db3(0x15a)]=!![];const _0xf79825=getCurrentBranch();_0xf79825&&_0xf79825!==_0x147db3(0x161)&&_0xf79825!==_0x5a1584[_0x147db3(0x16f)]&&(_0x19ed36['branches'][_0xf79825]=!![],_0x192208[_0x147db3(0x181)]=_0xf79825),_0x5a1584[_0x147db3(0x175)](saveCache,_0x19ed36);}export function isSessionEnabled(_0x3a7682){const _0x50f93c=_0x3fcc02,_0x3054bb={'zOzdd':function(_0x14458a){return _0x14458a();},'RMooV':function(_0x2e44e0,_0x2d9675){return _0x2e44e0===_0x2d9675;},'qiZIF':'main','BTYFs':_0x50f93c(0x187),'TojNg':function(_0x3c5c9c,_0x52d28d){return _0x3c5c9c===_0x52d28d;}},_0x8af8df=_0x3054bb['zOzdd'](loadCache),_0x13dd4e=getCurrentBranch();if(!_0x13dd4e||_0x3054bb['RMooV'](_0x13dd4e,_0x3054bb[_0x50f93c(0x164)])||_0x13dd4e===_0x3054bb[_0x50f93c(0x16d)])return _0x8af8df['sessions'][_0x3a7682]?.[_0x50f93c(0x15a)]===!![];const _0x26b85f=_0x8af8df['branches'][_0x13dd4e]===!![],_0x135345=_0x3054bb[_0x50f93c(0x156)](_0x8af8df['sessions'][_0x3a7682]?.['enabled'],!![]);return _0x26b85f||_0x135345;}export function disableSession(_0x4f2bc0){const _0x4fa9a6=_0x3fcc02,_0x1fe5f9={'GzKyw':function(_0x1f6a1d){return _0x1f6a1d();},'fwADF':function(_0x36793a,_0x25b68c,_0x1c5c76){return _0x36793a(_0x25b68c,_0x1c5c76);}},_0x31682e=_0x1fe5f9[_0x4fa9a6(0x168)](loadCache),_0x1f2cb8=_0x1fe5f9['fwADF'](getOrCreateSession,_0x31682e,_0x4f2bc0);_0x1f2cb8['enabled']=![],saveCache(_0x31682e);}export function updateBranchTracking(_0x1cbdbe){const _0x1e4f09=_0x3fcc02,_0x40a2c4={'DzaLI':function(_0x13b426){return _0x13b426();},'YBtGm':function(_0x3a0f02,_0x44b3a2){return _0x3a0f02!==_0x44b3a2;},'uMEVz':function(_0x4624c4,_0x25ebb4){return _0x4624c4(_0x25ebb4);}},_0x42b09e=loadCache(),_0x3040f5=_0x42b09e['sessions'][_0x1cbdbe];if(!_0x3040f5?.['enabled'])return;const _0x40cdbb=_0x40a2c4['DzaLI'](getCurrentBranch);if(!_0x40cdbb||_0x40cdbb===_0x1e4f09(0x161)||_0x40cdbb===_0x1e4f09(0x187))return;_0x40a2c4[_0x1e4f09(0x177)](_0x3040f5['currentBranch'],_0x40cdbb)&&(_0x42b09e['branches'][_0x40cdbb]=!![],_0x3040f5['currentBranch']=_0x40cdbb,_0x40a2c4[_0x1e4f09(0x16a)](saveCache,_0x42b09e));}export function initBranchTracking(_0x285f5f){const _0x32f903=_0x3fcc02,_0x315de2={'VQvrr':function(_0x5926f1){return _0x5926f1();},'JELYI':function(_0x594241,_0x46da80){return _0x594241===_0x46da80;},'dnTAK':_0x32f903(0x187),'rmutF':function(_0xbc06e8,_0x350379){return _0xbc06e8===_0x350379;},'bNjXc':function(_0x398891,_0x52a618,_0x1f4505){return _0x398891(_0x52a618,_0x1f4505);},'ZCsyS':function(_0x262df4,_0x9b59f){return _0x262df4(_0x9b59f);}},_0x37f97a=loadCache(),_0xffc516=_0x315de2[_0x32f903(0x18b)](getCurrentBranch);if(!_0xffc516||_0x315de2['JELYI'](_0xffc516,'main')||_0xffc516===_0x315de2['dnTAK'])return;if(_0x315de2[_0x32f903(0x163)](_0x37f97a['branches'][_0xffc516],!![])){const _0x136dcf=_0x315de2[_0x32f903(0x17e)](getOrCreateSession,_0x37f97a,_0x285f5f);_0x136dcf[_0x32f903(0x15a)]=!![],_0x136dcf['currentBranch']=_0xffc516,_0x315de2[_0x32f903(0x167)](saveCache,_0x37f97a);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x59cddf){const _0xa1c607=_0x3fcc02,_0x34fcf3={'rBvJs':function(_0x536b58,_0x888d72){return _0x536b58(_0x888d72);}},_0x11813f=loadCache(),_0x2a7d39=_0x11813f[_0xa1c607(0x176)][_0x59cddf];_0x2a7d39?.['enabled']&&(_0x11813f[_0xa1c607(0x183)]=Date['now'](),_0x34fcf3[_0xa1c607(0x18f)](saveCache,_0x11813f));}export function shouldAutoEnableAfterClear(_0x14c899){const _0x4ef4b5=_0x3fcc02,_0xc2f91a={'vQPsS':function(_0x264be7){return _0x264be7();},'RDSSH':function(_0x32a1d7,_0x121ecf){return _0x32a1d7-_0x121ecf;},'VpMSV':function(_0x8eb14c,_0x2eb02d){return _0x8eb14c<=_0x2eb02d;}};if(_0x14c899!=='clear')return![];const _0x167fd1=_0xc2f91a['vQPsS'](loadCache),_0x26b714=_0x167fd1[_0x4ef4b5(0x183)];if(!_0x26b714)return![];const _0xc0b899=_0xc2f91a[_0x4ef4b5(0x15d)](Date['now'](),_0x26b714);return _0xc2f91a[_0x4ef4b5(0x15e)](_0xc0b899,CLEAR_AUTO_ENABLE_WINDOW_MS);}function _0x3271(){const _0x31d293=['10KYdXEo','OdmAD','Accdj','2013ZWxXfu','bNjXc','pipe','2870yXcQBk','currentBranch','stringify','lastEnabledSessionClearedAt','PglVu','1207357QBGLYY','utf-8','master','join','bUBDD','parse','VQvrr','83349cxKtNq','YSEwU','366wDlddW','rBvJs','RmLsP','TojNg','now','zpCFX','HEAD','enabled','BsPBr','mkdirSync','RDSSH','VpMSV','IRDQL','4paPSCg','main','existsSync','rmutF','qiZIF','mjRac','27PxEcHH','ZCsyS','GzKyw','32849868xzjNRo','uMEVz','.claude','featureId','BTYFs','3987368CnsCqh','ERLOb','branches','820457VIcPIv','registeredAt','prompted','CsfYs','OgyWC','sessions','YBtGm','lastStopReminderAt','5106415hYqCgy'];_0x3271=function(){return _0x31d293;};return _0x3271();}export function autoEnableAfterClear(_0x8dd15d){const _0x186d26=_0x3fcc02,_0x4c8594={'zpCFX':function(_0x1cf285){return _0x1cf285();},'YSEwU':'main'},_0x1ae9ed=_0x4c8594[_0x186d26(0x158)](loadCache),_0x342c12=getOrCreateSession(_0x1ae9ed,_0x8dd15d);_0x342c12['enabled']=!![];const _0x2de4b3=getCurrentBranch();_0x2de4b3&&_0x2de4b3!==_0x4c8594[_0x186d26(0x18d)]&&_0x2de4b3!=='master'&&(_0x342c12[_0x186d26(0x181)]=_0x2de4b3),delete _0x1ae9ed[_0x186d26(0x183)],saveCache(_0x1ae9ed);}export function registerSession(_0xb3f719,_0x1f2d54){const _0x1d6ad5=_0x3fcc02,_0x4232cf={'OdmAD':function(_0x4e432f,_0x27cc77){return _0x4e432f(_0x27cc77);}},_0x8b7fa5=loadCache(),_0x50f74e=getOrCreateSession(_0x8b7fa5,_0xb3f719);_0x50f74e['featureId']=_0x1f2d54,_0x50f74e[_0x1d6ad5(0x172)]=new Date()['toISOString'](),_0x4232cf[_0x1d6ad5(0x17b)](saveCache,_0x8b7fa5);}export function getSessionEntry(_0x52ca52){const _0x281fec=_0x3fcc02,_0x37f5c6={'IYcKZ':function(_0x4fac61){return _0x4fac61();}},_0xe8f552=_0x37f5c6['IYcKZ'](loadCache),_0x13b414=_0xe8f552['sessions'][_0x52ca52];if(_0x13b414?.[_0x281fec(0x16c)]&&_0x13b414?.['registeredAt'])return{'featureId':_0x13b414[_0x281fec(0x16c)],'registeredAt':_0x13b414['registeredAt']};return null;}export function unregisterSession(_0xd27df1){const _0x3a9cbe=_0x3fcc02,_0x3f0760=loadCache(),_0x1ba444=_0x3f0760['sessions'][_0xd27df1];_0x1ba444&&(delete _0x1ba444[_0x3a9cbe(0x16c)],delete _0x1ba444[_0x3a9cbe(0x172)],saveCache(_0x3f0760));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x414ed5){const _0x4a0b3c=_0x3fcc02,_0x22276e={'mjRac':function(_0x508e8d){return _0x508e8d();},'CsfYs':function(_0x448bee,_0x38d6ed,_0x595f6c){return _0x448bee(_0x38d6ed,_0x595f6c);},'RmLsP':function(_0x5a7753,_0x855178){return _0x5a7753-_0x855178;},'SWmQp':function(_0x10e249,_0x417ccd){return _0x10e249(_0x417ccd);}},_0x3263cb=_0x22276e[_0x4a0b3c(0x165)](loadCache),_0x44a858=_0x22276e[_0x4a0b3c(0x174)](getOrCreateSession,_0x3263cb,_0x414ed5),_0xb438dc=_0x44a858['lastPlanReminderAt']||0x0,_0x414a4d=Date['now']();if(_0x22276e[_0x4a0b3c(0x155)](_0x414a4d,_0xb438dc)>=PLAN_REMINDER_INTERVAL_MS)return _0x44a858['lastPlanReminderAt']=_0x414a4d,_0x22276e['SWmQp'](saveCache,_0x3263cb),!![];return![];}export function shouldShowStopReminder(_0x5520df){const _0x1768f2=_0x3fcc02,_0x4ef015={'yezhE':function(_0xb51698){return _0xb51698();},'PglVu':function(_0x2b1ae0,_0x871bbe){return _0x2b1ae0>=_0x871bbe;},'Accdj':function(_0x8c9a4a,_0x38e849){return _0x8c9a4a-_0x38e849;},'bUBDD':function(_0x4902ff,_0x544658){return _0x4902ff(_0x544658);}},_0x23186d=_0x4ef015['yezhE'](loadCache),_0x3b9cf9=getOrCreateSession(_0x23186d,_0x5520df),_0x10fefa=_0x3b9cf9[_0x1768f2(0x178)]||0x0,_0x37e22b=Date[_0x1768f2(0x157)]();if(_0x4ef015[_0x1768f2(0x184)](_0x4ef015[_0x1768f2(0x17c)](_0x37e22b,_0x10fefa),STOP_REMINDER_INTERVAL_MS))return _0x3b9cf9['lastStopReminderAt']=_0x37e22b,_0x4ef015[_0x1768f2(0x189)](saveCache,_0x23186d),!![];return![];}export function hasSessionBeenPrompted(_0x1f5791){const _0x55d43d=_0x3fcc02,_0x2c59d3=loadCache();return _0x2c59d3['sessions'][_0x1f5791]?.[_0x55d43d(0x173)]===!![];}export function markSessionPrompted(_0x33e7dd){const _0x4dfdbe={'NnlqM':function(_0x5c075a){return _0x5c075a();}},_0x362396=_0x4dfdbe['NnlqM'](loadCache),_0x269205=getOrCreateSession(_0x362396,_0x33e7dd);_0x269205['prompted']=!![],saveCache(_0x362396);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8c91a=_0x2d38;(function(_0x37b754,_0x33a05e){const _0x27683a=_0x2d38,_0x2ab3f3=_0x37b754();while(!![]){try{const _0x28fa17=parseInt(_0x27683a(0x1c1))/0x1+parseInt(_0x27683a(0x1a9))/0x2*(parseInt(_0x27683a(0x1ce))/0x3)+-parseInt(_0x27683a(0x1e5))/0x4+-parseInt(_0x27683a(0x1f7))/0x5*(parseInt(_0x27683a(0x1be))/0x6)+-parseInt(_0x27683a(0x1c7))/0x7*(parseInt(_0x27683a(0x1aa))/0x8)+parseInt(_0x27683a(0x1c5))/0x9*(parseInt(_0x27683a(0x1e9))/0xa)+-parseInt(_0x27683a(0x1dd))/0xb;if(_0x28fa17===_0x33a05e)break;else _0x2ab3f3['push'](_0x2ab3f3['shift']());}catch(_0x3efa24){_0x2ab3f3['push'](_0x2ab3f3['shift']());}}}(_0xba7c,0xd8bb8));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';function _0x2d38(_0x10a43c,_0x4a9ff8){_0x10a43c=_0x10a43c-0x1a9;const _0xba7c1b=_0xba7c();let _0x2d3854=_0xba7c1b[_0x10a43c];return _0x2d3854;}import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x29db7b,_0x1fe772){const _0x539c7a=_0x2d38,_0x21fc9c={'bLrDA':function(_0x4d1eb7,_0x43f8f2,_0x5bd2ab,_0x2090c4){return _0x4d1eb7(_0x43f8f2,_0x5bd2ab,_0x2090c4);},'EXLgZ':function(_0x3a4aa1,_0x1aace2){return _0x3a4aa1(_0x1aace2);},'gutax':function(_0x5993e2,_0x3988f8){return _0x5993e2!==_0x3988f8;},'sCHXm':function(_0x32a7ad,_0x449258){return _0x32a7ad(_0x449258);}},_0x22a8fb=_0x21fc9c['bLrDA'](join,_0x1fe772,'ci',_0x29db7b),_0x57ff39=join(_0x1fe772,'local',_0x29db7b),_0x5b8fed=join(_0x1fe772,_0x29db7b),_0x25149b=join(_0x1fe772,'local'),_0x524997=join(_0x1fe772,'ci');if(existsSync(_0x22a8fb))return _0x22a8fb;if(existsSync(_0x57ff39))return _0x57ff39;if(_0x21fc9c[_0x539c7a(0x209)](existsSync,_0x5b8fed)&&(_0x5b8fed!==_0x25149b&&_0x21fc9c[_0x539c7a(0x1da)](_0x5b8fed,_0x524997)?!![]:_0x21fc9c['sCHXm'](hasLegacyProfileFiles,_0x5b8fed)))return _0x5b8fed;return null;}export function getEnvDir(_0x497633){const _0x3de6bd=_0x2d38,_0x1e74aa={'LXIlX':function(_0x564f1e){return _0x564f1e();},'uHGuE':function(_0x395be5,_0x4a584b,_0x3bbc9e){return _0x395be5(_0x4a584b,_0x3bbc9e);},'SPtVi':function(_0x170552,_0x4ba647){return _0x170552!==_0x4ba647;},'zHwoB':function(_0x5a369e,_0x18fe0f,_0x48a3d0,_0x5554bc){return _0x5a369e(_0x18fe0f,_0x48a3d0,_0x5554bc);},'heWMQ':'local'},_0x436147=_0x1e74aa[_0x3de6bd(0x1b8)](getRangerDir),_0x4c6310=_0x1e74aa[_0x3de6bd(0x1b0)](findEnvInRoot,_0x497633,_0x436147);if(_0x4c6310)return _0x4c6310;const _0x5f4112=getRangerHomeDir();if(_0x1e74aa['SPtVi'](_0x5f4112,_0x436147)){const _0x171a82=findEnvInRoot(_0x497633,_0x5f4112);if(_0x171a82)return _0x171a82;}return _0x1e74aa[_0x3de6bd(0x1e1)](join,_0x436147,_0x1e74aa['heWMQ'],_0x497633);}export function findExistingEnv(_0x2677d4,_0x14929e){const _0x5602f6=_0x2d38,_0x39d2d4={'rYumT':'legacy','HRxDH':function(_0x4ab501,_0x5360d5,_0x2565bd,_0x2d325a){return _0x4ab501(_0x5360d5,_0x2565bd,_0x2d325a);},'gegah':'local','lhLuJ':function(_0x35fdf7,_0x37ab09){return _0x35fdf7===_0x37ab09;}},_0x168985=_0x14929e?.['rangerDir'],_0x4e3ee2=_0x168985?[_0x168985]:[getRangerDir(),getRangerHomeDir()][_0x5602f6(0x1f6)]((_0xe33437,_0x54e140,_0x37327c)=>_0x37327c['indexOf'](_0xe33437)===_0x54e140),_0x37e09d=_0x14929e?.['locations']??['ci','local',_0x39d2d4['rYumT']];for(const _0x3feb87 of _0x4e3ee2){const _0x1be8a0=join(_0x3feb87,'local'),_0x492be5=join(_0x3feb87,'ci'),_0x7645b2=[{'location':'ci','path':_0x39d2d4['HRxDH'](join,_0x3feb87,'ci',_0x2677d4)},{'location':'local','path':join(_0x3feb87,_0x39d2d4[_0x5602f6(0x1bc)],_0x2677d4)},{'location':'legacy','path':join(_0x3feb87,_0x2677d4)}];for(const _0x459b56 of _0x7645b2){if(_0x37e09d['includes'](_0x459b56['location'])&&existsSync(_0x459b56['path'])){if(_0x39d2d4['lhLuJ'](_0x459b56[_0x5602f6(0x1cc)],'legacy')&&(_0x39d2d4['lhLuJ'](_0x459b56[_0x5602f6(0x1ed)],_0x1be8a0)||_0x459b56[_0x5602f6(0x1ed)]===_0x492be5)&&!hasLegacyProfileFiles(_0x459b56['path']))continue;return{'path':_0x459b56[_0x5602f6(0x1ed)],'location':_0x459b56[_0x5602f6(0x1cc)]};}}}return null;}function hasLegacyProfileFiles(_0x38c456){const _0x15e17b=_0x2d38,_0x3fbb74={'xtgQq':function(_0x388ec7,_0x5b9071,_0x539159){return _0x388ec7(_0x5b9071,_0x539159);},'mLkUA':function(_0x1f1b36,_0x19e03f,_0x309241){return _0x1f1b36(_0x19e03f,_0x309241);}};return existsSync(_0x3fbb74[_0x15e17b(0x202)](join,_0x38c456,'settings.json'))||existsSync(_0x3fbb74[_0x15e17b(0x1e3)](join,_0x38c456,_0x15e17b(0x20e)))||existsSync(join(_0x38c456,_0x15e17b(0x21a)));}export function isEnvCi(_0x33419b){const _0x14725d=_0x2d38,_0x1345c4={'GRTfR':function(_0x79fed,_0x14a60c){return _0x79fed(_0x14a60c);},'NcsYi':function(_0x20ace9,_0x327959,_0x2f29e7,_0x9eff1){return _0x20ace9(_0x327959,_0x2f29e7,_0x9eff1);},'Ydhvg':function(_0x2a6661){return _0x2a6661();},'akilP':function(_0x11bf51,_0x19604c){return _0x11bf51!==_0x19604c;},'KkhDR':function(_0x4db2c4){return _0x4db2c4();}};if(_0x1345c4[_0x14725d(0x1d1)](existsSync,_0x1345c4[_0x14725d(0x1c9)](join,_0x1345c4['Ydhvg'](getRangerDir),'ci',_0x33419b)))return!![];const _0x3abd2e=getRangerHomeDir();if(_0x1345c4['akilP'](_0x3abd2e,_0x1345c4[_0x14725d(0x1ac)](getRangerDir))&&_0x1345c4[_0x14725d(0x1d1)](existsSync,_0x1345c4[_0x14725d(0x1c9)](join,_0x3abd2e,'ci',_0x33419b)))return!![];return![];}export async function cleanupTempFiles(_0x36efcd){const _0x52dbc9=_0x2d38,_0xf80741={'UjRaB':function(_0x22b5d1,_0x54697b){return _0x22b5d1!==_0x54697b;},'dBulr':'ENOENT'},_0x2e50dc=[_0x36efcd[_0x52dbc9(0x1ae)],_0x36efcd[_0x52dbc9(0x210)]]['filter'](Boolean);await Promise[_0x52dbc9(0x1b6)](_0x2e50dc['map'](_0x48f78b=>unlink(_0x48f78b)['catch'](_0x18a650=>{const _0x3d33ef=_0x52dbc9;_0xf80741[_0x3d33ef(0x1bb)](_0x18a650['code'],_0xf80741[_0x3d33ef(0x1d5)])&&console['warn'](_0x3d33ef(0x1f5)+_0x48f78b+':',_0x18a650['message']);})));}export function getSettingsPath(_0x267d2a){const _0xad53d=_0x2d38,_0x3b9bda={'MaDtA':function(_0x331b2d,_0x361818,_0xfb057){return _0x331b2d(_0x361818,_0xfb057);},'HCKHA':function(_0x5aa471,_0x54b770){return _0x5aa471(_0x54b770);},'adnuJ':'settings.json'};return _0x3b9bda['MaDtA'](join,_0x3b9bda[_0xad53d(0x1e4)](getEnvDir,_0x267d2a),_0x3b9bda[_0xad53d(0x219)]);}export async function loadSettings(_0x4e4542){const _0xa189bf=_0x2d38,_0x4bc1f7={'YGvdp':function(_0x200f30,_0x26e885,_0xf15ddd){return _0x200f30(_0x26e885,_0xf15ddd);},'CVWAO':_0xa189bf(0x1d9)},_0xf47251=getSettingsPath(_0x4e4542);if(!existsSync(_0xf47251))return{};try{const _0x8eb7bb=await _0x4bc1f7[_0xa189bf(0x212)](readFile,_0xf47251,_0x4bc1f7[_0xa189bf(0x1c6)]);return JSON['parse'](_0x8eb7bb);}catch{return{};}}export async function saveSettings(_0x2562ae,_0x987f33){const _0x4b8780=_0x2d38,_0xd929e0={'DxmBU':function(_0x42b148,_0x34d0d2){return _0x42b148(_0x34d0d2);},'BmJVs':function(_0x20c175,_0x533f60){return _0x20c175(_0x533f60);},'SrkyR':function(_0x2986a8,_0x199068,_0x267fd9){return _0x2986a8(_0x199068,_0x267fd9);}},_0x23c8e3=_0xd929e0[_0x4b8780(0x213)](getSettingsPath,_0x2562ae),_0xb23643=_0xd929e0[_0x4b8780(0x215)](dirname,_0x23c8e3);!_0xd929e0['DxmBU'](existsSync,_0xb23643)&&await _0xd929e0['SrkyR'](mkdir,_0xb23643,{'recursive':!![]}),await _0xd929e0[_0x4b8780(0x1db)](writeFile,_0x23c8e3,JSON['stringify'](_0x987f33,null,0x2));}export function resolveEnvVars(_0x52aee1){const _0x1988f3=_0x2d38,_0x50ba82={'XORrd':function(_0x228b33,_0xfe9c86){return _0x228b33===_0xfe9c86;},'pHOmf':_0x1988f3(0x1b5),'NLBZC':_0x1988f3(0x1df)};if(_0x50ba82[_0x1988f3(0x211)](typeof _0x52aee1,_0x50ba82[_0x1988f3(0x1d4)]))return _0x52aee1['replace'](/\$\{(\w+)\}/g,(_0x11a786,_0x297679)=>{const _0x758ea6=_0x1988f3,_0x559fc3=process['env'][_0x297679];if(_0x50ba82[_0x758ea6(0x211)](_0x559fc3,undefined))throw new Error(_0x758ea6(0x214)+_0x297679+'\x20is\x20not\x20set');return _0x559fc3;});if(Array[_0x1988f3(0x1b2)](_0x52aee1))return _0x52aee1['map'](resolveEnvVars);if(_0x52aee1&&typeof _0x52aee1===_0x50ba82[_0x1988f3(0x207)])return Object[_0x1988f3(0x216)](Object['entries'](_0x52aee1)['map'](([_0x442557,_0x57c4e2])=>[_0x442557,resolveEnvVars(_0x57c4e2)]));return _0x52aee1;}const isRecord=_0x2ff47d=>typeof _0x2ff47d===_0x8c91a(0x1df)&&_0x2ff47d!==null&&!Array['isArray'](_0x2ff47d),asRecord=_0x1b4109=>isRecord(_0x1b4109)?_0x1b4109:undefined,mergeHeaders=(_0x1667e0,_0x52efec)=>{const _0x1d5a76=_0x8c91a,_0x335de9={'xrQdm':function(_0x23099c,_0x39165c){return _0x23099c??_0x39165c;}},_0x4da84a={..._0x335de9['xrQdm'](_0x1667e0,{}),..._0x52efec??{}};return Object[_0x1d5a76(0x1ec)](_0x4da84a)[_0x1d5a76(0x1e2)]?_0x4da84a:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x8c91a(0x1bd),_0x8c91a(0x1e0),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x612f03,_0x5e8b38={}){const _0x5413ff=_0x8c91a,_0x16fb4e={'XeBHX':function(_0x21ae90,_0x5632f5){return _0x21ae90(_0x5632f5);},'aLRaE':_0x5413ff(0x1b5),'sdAdP':function(_0x4fb10d,_0x2217e4,_0x705c57){return _0x4fb10d(_0x2217e4,_0x705c57);}},_0x22a12b=_0x16fb4e['XeBHX'](asRecord,_0x612f03['browser']),_0x7afef9={...asRecord(_0x22a12b?.['launchOptions'])??{}};typeof _0x5e8b38['headless']===_0x5413ff(0x1fb)&&(_0x7afef9[_0x5413ff(0x1d8)]=_0x5e8b38['headless']);if(_0x612f03[_0x5413ff(0x204)]){const _0x31626c=_0x7afef9['args']??[],_0x2ed3da=SAFE_MODE_ARGS['filter'](_0x17f17a=>!_0x31626c[_0x5413ff(0x1de)](_0x17f17a));_0x7afef9[_0x5413ff(0x1d7)]=[..._0x31626c,..._0x2ed3da];}if(_0x612f03['allowInsecureLocalhost']){const _0x189edd=_0x7afef9[_0x5413ff(0x1d7)]??[],_0x3a9e12=ALLOW_LOCALHOST_ARGS['filter'](_0x10200d=>!_0x189edd['includes'](_0x10200d));_0x7afef9[_0x5413ff(0x1d7)]=[..._0x189edd,..._0x3a9e12];}const _0x5619b2={...asRecord(_0x22a12b?.['contextOptions'])??{}};_0x5619b2['ignoreHTTPSErrors']=!![];typeof _0x612f03['userAgent']===_0x16fb4e['aLRaE']&&(_0x5619b2[_0x5413ff(0x1cf)]=_0x612f03['userAgent']);const _0x42ed10=_0x16fb4e['sdAdP'](mergeHeaders,asRecord(_0x5619b2[_0x5413ff(0x1fc)]),asRecord(_0x612f03[_0x5413ff(0x1fa)]));return _0x42ed10?_0x5619b2['extraHTTPHeaders']=_0x42ed10:delete _0x5619b2['extraHTTPHeaders'],_0x5e8b38[_0x5413ff(0x20a)]&&(_0x5619b2[_0x5413ff(0x201)]=_0x5e8b38[_0x5413ff(0x20a)]),{'launchOptions':_0x7afef9,'contextOptions':_0x5619b2};}async function resolveLocalAuthPath(_0x292043){const _0x2c84dc=_0x8c91a,_0xce7eb6={'yJGmi':function(_0x5d70c6,_0x3935de,_0x5b365d){return _0x5d70c6(_0x3935de,_0x5b365d);},'lXSHw':'auth.json','kVfRs':function(_0x4e0439){return _0x4e0439();},'ghpJF':function(_0x3a5223,_0x15bd9c){return _0x3a5223 instanceof _0x15bd9c;},'uMvcA':function(_0x3041b5,_0x242446){return _0x3041b5(_0x242446);},'YAPog':function(_0x49b002,_0x1be10f){return _0x49b002(_0x1be10f);}},_0x4108fe=_0xce7eb6[_0x2c84dc(0x1c2)](join,_0x292043,'auth.json.enc'),_0x520aa5=join(_0x292043,_0xce7eb6['lXSHw']);if(existsSync(_0x4108fe))try{const _0x47efef=await getToken();if(!_0x47efef)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3efca2=await readFile(_0x4108fe),_0x225f2b=decrypt(_0x3efca2,_0x47efef),_0x2c21dc=join(_0xce7eb6[_0x2c84dc(0x1cb)](tmpdir),'ranger-auth-'+Date['now']()+'.json');return await writeFile(_0x2c21dc,_0x225f2b),{'storageStatePath':_0x2c21dc,'tempAuthPath':_0x2c21dc};}catch(_0x22ac26){const _0x28b7e3=_0xce7eb6[_0x2c84dc(0x1fe)](_0x22ac26,Error)?_0x22ac26['message']:_0xce7eb6[_0x2c84dc(0x1f3)](String,_0x22ac26);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x28b7e3);}if(_0xce7eb6[_0x2c84dc(0x1b1)](existsSync,_0x520aa5))return{'storageStatePath':_0x520aa5};return{};}export async function buildPlaywrightConfig(_0x557b2a,_0x1505e7,_0x32f31a,_0x4ca00d,_0x25def5){const _0x689960=_0x8c91a,_0x5caa89={'EJPsE':function(_0x4b2c85,_0x532216,_0x5f2a51,_0x331346,_0x5921e2,_0x221b27,_0x539740){return _0x4b2c85(_0x532216,_0x5f2a51,_0x331346,_0x5921e2,_0x221b27,_0x539740);},'uCDJk':'stagehand','WxmIB':function(_0x1b2685,_0x1f3dab){return _0x1b2685(_0x1f3dab);}};if(_0x25def5)return _0x5caa89['EJPsE'](buildPlaywrightConfigCore,_0x557b2a,_0x25def5,_0x1505e7,_0x32f31a,_0x4ca00d,_0x5caa89['uCDJk']);const {storageStatePath:_0x4accc5,tempAuthPath:_0x39cfa7}=await resolveLocalAuthPath(getEnvDir(_0x1505e7));try{const _0x567bb0=await buildPlaywrightConfigCore(_0x557b2a,_0x4accc5,_0x1505e7,_0x32f31a,_0x4ca00d,_0x5caa89[_0x689960(0x1e8)]);return{..._0x567bb0,'tempAuthPath':_0x39cfa7};}catch(_0x5ac894){_0x39cfa7&&await _0x5caa89['WxmIB'](unlink,_0x39cfa7)['catch'](()=>{});throw _0x5ac894;}}export async function buildPlaywrightConfigCore(_0x3359d3,_0x47b320,_0x171cab,_0x4e046b,_0x185b80,_0xb7d947=_0x8c91a(0x1fd)){const _0x209df0=_0x8c91a,_0x36f5ce={'ZFtMm':function(_0x4d6b19,_0x21369c,_0x46b1e5){return _0x4d6b19(_0x21369c,_0x46b1e5);},'IaNDv':function(_0x37a623,_0x10915a){return _0x37a623===_0x10915a;},'IXPNW':'--no-sandbox','FfAsY':'--disable-setuid-sandbox','cswpy':function(_0x1550c3){return _0x1550c3();},'GavmU':function(_0x146c39,_0x495856,_0x3be911,_0x13752f){return _0x146c39(_0x495856,_0x3be911,_0x13752f);},'CCVKH':function(_0x4bccdf){return _0x4bccdf();},'pooSU':'sessions','wIKpg':function(_0x41ec24,_0x40a756){return _0x41ec24(_0x40a756);},'cQTqV':'chromium','gZeSn':_0x209df0(0x200),'aJcFS':_0x209df0(0x1ef),'ltNUx':'tabs','HlUIG':'pdf','jvtgW':function(_0x5a661e,_0x362af7){return _0x5a661e===_0x362af7;},'StUvf':_0x209df0(0x1b7)},_0x5975f3=_0x4e046b||_0x36f5ce[_0x209df0(0x1af)](randomUUID),_0x56fd6d=_0x36f5ce[_0x209df0(0x1ea)](join,_0x36f5ce['CCVKH'](getRangerDir),_0x36f5ce[_0x209df0(0x1ad)],_0x5975f3),_0xad26db=_0x36f5ce['wIKpg'](Boolean,_0x3359d3[_0x209df0(0x1b9)]),_0x3f8ada=_0xad26db?{'browserName':_0x36f5ce['cQTqV'],'cdpEndpoint':_0x3359d3[_0x209df0(0x1b9)]}:((()=>{const _0x416e3c=_0x209df0,{launchOptions:_0x2505bc,contextOptions:_0x4c7675}=_0x36f5ce['ZFtMm'](buildBrowserOptionsFromSettings,_0x3359d3,{'headless':_0x185b80?![]:_0x3359d3['headless']??!![],'storageStatePath':_0x47b320});if(_0x36f5ce[_0x416e3c(0x1ab)](process[_0x416e3c(0x1dc)]?.(),0x0)){const _0x556701=[_0x36f5ce['IXPNW'],_0x36f5ce[_0x416e3c(0x1bf)]],_0x2c454e=_0x2505bc['args']??[],_0x4308ea=_0x556701[_0x416e3c(0x1f6)](_0x4d7885=>!_0x2c454e['includes'](_0x4d7885));_0x2505bc['args']=[..._0x2c454e,..._0x4308ea];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x2505bc,'contextOptions':{..._0x4c7675,'permissions':[_0x416e3c(0x203),'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x3d8a6c=_0x36f5ce['IaNDv'](_0xb7d947,'playwright-cli')?{'browser':_0x3f8ada,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x56fd6d,'outputMode':_0x209df0(0x1ba),'codegen':_0x36f5ce[_0x209df0(0x1eb)]}:{'name':_0x171cab,'browser':_0x3f8ada,'capabilities':[_0x36f5ce['aJcFS'],_0x36f5ce['ltNUx'],_0x209df0(0x1cd),_0x36f5ce[_0x209df0(0x1d2)],'vision'],'imageResponses':_0x209df0(0x208),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x56fd6d};if(!_0xad26db){const _0x32be9a=_0x3d8a6c[_0x209df0(0x1c8)],_0x336125=_0x32be9a[_0x209df0(0x1b4)];if(_0x36f5ce['jvtgW'](_0x336125['userAgent'],undefined))delete _0x336125['userAgent'];if(_0x336125[_0x209df0(0x201)]===undefined)delete _0x336125['storageState'];}const _0x3e701a=join(_0x36f5ce[_0x209df0(0x1af)](tmpdir),'ranger-config');!existsSync(_0x3e701a)&&await mkdir(_0x3e701a,{'recursive':!![]});const _0x3a9360=_0xb7d947==='playwright-cli'?_0x36f5ce['StUvf']:'',_0x3bf805=_0x36f5ce[_0x209df0(0x1ff)](join,_0x3e701a,_0x171cab+'-'+Date['now']()+_0x3a9360+_0x209df0(0x20c));return await _0x36f5ce[_0x209df0(0x1ff)](writeFile,_0x3bf805,JSON[_0x209df0(0x1f0)](_0x3d8a6c,null,0x2)),{'configPath':_0x3bf805};}export async function buildPlaywrightCliConfig(_0x1fd4c3,_0x57e0bc,_0x350e60,_0x28ce9f,_0x16c70c){const _0x459d2d=_0x8c91a,_0x59b338={'HZbNl':function(_0x13b326,_0x368915){return _0x13b326(_0x368915);},'unpey':function(_0x411759,_0x4d0a84,_0x8e3e,_0x1a4063,_0x4faec1,_0x2750f1,_0x3c00cf){return _0x411759(_0x4d0a84,_0x8e3e,_0x1a4063,_0x4faec1,_0x2750f1,_0x3c00cf);},'bvTML':_0x459d2d(0x1c4)};if(_0x16c70c)return buildPlaywrightConfigCore(_0x1fd4c3,_0x16c70c,_0x57e0bc,_0x350e60,_0x28ce9f,'playwright-cli');const {storageStatePath:_0x299a1a,tempAuthPath:_0x5b8837}=await _0x59b338[_0x459d2d(0x1ee)](resolveLocalAuthPath,getEnvDir(_0x57e0bc));try{const _0x244acf=await _0x59b338[_0x459d2d(0x21b)](buildPlaywrightConfigCore,_0x1fd4c3,_0x299a1a,_0x57e0bc,_0x350e60,_0x28ce9f,_0x59b338['bvTML']);return{..._0x244acf,'tempAuthPath':_0x5b8837};}catch(_0x35045b){_0x5b8837&&await unlink(_0x5b8837)['catch'](()=>{});throw _0x35045b;}}export function getNestedValue(_0x1c6480,_0x46b02e){const _0x8ca29=_0x8c91a,_0x26eef7={'kZetn':function(_0xeeff9,_0x4fc772){return _0xeeff9!==_0x4fc772;},'mVMNj':_0x8ca29(0x1df)},_0x176d21=parseKeyPath(_0x46b02e);let _0x4823f6=_0x1c6480;for(const _0x492c1e of _0x176d21){if(_0x4823f6===null||_0x4823f6===undefined||_0x26eef7['kZetn'](typeof _0x4823f6,_0x26eef7[_0x8ca29(0x1f2)]))return undefined;_0x4823f6=_0x4823f6[_0x492c1e];}return _0x4823f6;}export function setNestedValue(_0x145a01,_0x840b6f,_0x4674dd){const _0x1f12a7=_0x8c91a,_0x581906={'Jwiqg':function(_0x369e6a,_0x38d369){return _0x369e6a(_0x38d369);},'EVaMj':function(_0x251762,_0x3c5919){return _0x251762-_0x3c5919;},'oTLYX':function(_0x5cd430,_0x8da013){return _0x5cd430!==_0x8da013;}},_0x151f16=_0x581906['Jwiqg'](parseKeyPath,_0x840b6f);let _0x43ef5a=_0x145a01;for(let _0x17fb4c=0x0;_0x17fb4c<_0x581906[_0x1f12a7(0x205)](_0x151f16[_0x1f12a7(0x1e2)],0x1);_0x17fb4c++){const _0x243f46=_0x151f16[_0x17fb4c];(!(_0x243f46 in _0x43ef5a)||_0x581906[_0x1f12a7(0x1f4)](typeof _0x43ef5a[_0x243f46],'object'))&&(_0x43ef5a[_0x243f46]={}),_0x43ef5a=_0x43ef5a[_0x243f46];}_0x43ef5a[_0x151f16[_0x151f16[_0x1f12a7(0x1e2)]-0x1]]=_0x4674dd;}export function deleteNestedValue(_0x431deb,_0x9e50c9){const _0x172dce=_0x8c91a,_0x2298ad={'fvSVF':function(_0x31e511,_0x298930){return _0x31e511(_0x298930);},'tslmQ':function(_0x62913e,_0x56c087){return _0x62913e<_0x56c087;},'doiOZ':function(_0x18ed0e,_0x30f68e){return _0x18ed0e-_0x30f68e;},'ZNOfU':function(_0x5ef35c,_0x2cc907){return _0x5ef35c===_0x2cc907;},'wUVra':function(_0x42dd09,_0xee821a){return _0x42dd09!==_0xee821a;},'HHnhj':'object','WVmQb':function(_0x36ecc5,_0x5a8b4b){return _0x36ecc5===_0x5a8b4b;},'gQoWu':function(_0x3e6328,_0x4797a1){return _0x3e6328!==_0x4797a1;},'BKycJ':function(_0x2928f4,_0x23f408){return _0x2928f4 in _0x23f408;}},_0xcfbeee=_0x2298ad['fvSVF'](parseKeyPath,_0x9e50c9);let _0x1f90e1=_0x431deb;for(let _0x27cda9=0x0;_0x2298ad[_0x172dce(0x1d3)](_0x27cda9,_0x2298ad[_0x172dce(0x1f9)](_0xcfbeee[_0x172dce(0x1e2)],0x1));_0x27cda9++){if(_0x1f90e1===null||_0x2298ad['ZNOfU'](_0x1f90e1,undefined)||_0x2298ad[_0x172dce(0x20b)](typeof _0x1f90e1,_0x2298ad[_0x172dce(0x218)]))return![];_0x1f90e1=_0x1f90e1[_0xcfbeee[_0x27cda9]];}if(_0x2298ad[_0x172dce(0x1d6)](_0x1f90e1,null)||_0x2298ad[_0x172dce(0x1e6)](_0x1f90e1,undefined)||_0x2298ad[_0x172dce(0x20d)](typeof _0x1f90e1,_0x2298ad['HHnhj']))return![];const _0x569289=_0xcfbeee[_0x2298ad[_0x172dce(0x1f9)](_0xcfbeee[_0x172dce(0x1e2)],0x1)];if(_0x2298ad[_0x172dce(0x1e7)](_0x569289,_0x1f90e1))return delete _0x1f90e1[_0x569289],!![];return![];}function parseKeyPath(_0xcae4da){const _0x37a4ac=_0x8c91a,_0xab8f09={'gKcJN':'headers','TJdxW':function(_0x4d5d1d,_0x791a1e){return _0x4d5d1d===_0x791a1e;},'axRmg':_0x37a4ac(0x1c3)},_0x2db596=_0xcae4da[_0x37a4ac(0x1c0)]('.');return _0x2db596[0x0]===_0x37a4ac(0x1d0)&&(_0x2db596[0x0]=_0xab8f09[_0x37a4ac(0x217)]),_0xab8f09[_0x37a4ac(0x20f)](_0x2db596[0x0],_0xab8f09['axRmg'])&&(_0x2db596[0x0]=_0x37a4ac(0x1b3)),_0x2db596;}function _0xba7c(){const _0x2e7169=['configPath','XORrd','YGvdp','DxmBU','Environment\x20variable\x20','BmJVs','fromEntries','gKcJN','HHnhj','adnuJ','auth.json.enc','unpey','24664CFXojj','3184NsMjuM','IaNDv','KkhDR','pooSU','tempAuthPath','cswpy','uHGuE','YAPog','isArray','setupHeaders','contextOptions','string','all','-cli','LXIlX','cdpEndpoint','file','UjRaB','gegah','--allow-running-insecure-content','174XmoXOB','FfAsY','split','1205575uoBWNP','yJGmi','setupHeader','playwright-cli','756UVTekB','CVWAO','11683lFUGsm','browser','NcsYi','join','kVfRs','location','install','327PlsQUg','userAgent','header','GRTfR','HlUIG','tslmQ','pHOmf','dBulr','ZNOfU','args','headless','utf-8','gutax','SrkyR','getuid','2613721wcDojA','includes','object','--unsafely-treat-insecure-origin-as-secure=http://localhost','zHwoB','length','mLkUA','HCKHA','3883992CJvECc','WVmQb','BKycJ','uCDJk','63270TcaYxT','GavmU','gZeSn','keys','path','HZbNl','core','stringify','entries','mVMNj','uMvcA','oTLYX','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','filter','55280oQmncL','repeat','doiOZ','headers','boolean','extraHTTPHeaders','stagehand','ghpJF','ZFtMm','none','storageState','xtgQq','clipboard-read','safeMode','EVaMj','push','NLBZC','allow','EXLgZ','storageStatePath','wUVra','.json','gQoWu','auth.json','TJdxW'];_0xba7c=function(){return _0x2e7169;};return _0xba7c();}export function formatSettings(_0x2176c7,_0x578fe8=0x0){const _0x514918=_0x8c91a,_0x6a61f8={'grAlL':'object','zHqtb':function(_0x274478,_0x29d796){return _0x274478!==_0x29d796;}},_0x220c96=[],_0x28172f='\x20\x20'[_0x514918(0x1f8)](_0x578fe8);for(const [_0x4a6e49,_0x460fac]of Object[_0x514918(0x1f1)](_0x2176c7)){if(_0x460fac===undefined)continue;if(typeof _0x460fac===_0x6a61f8['grAlL']&&_0x6a61f8['zHqtb'](_0x460fac,null)){_0x220c96[_0x514918(0x206)](''+_0x28172f+_0x4a6e49+':');for(const [_0x384786,_0x5a31f2]of Object['entries'](_0x460fac)){_0x220c96[_0x514918(0x206)](_0x28172f+'\x20\x20'+_0x384786+':\x20'+_0x5a31f2);}}else _0x220c96[_0x514918(0x206)](''+_0x28172f+_0x4a6e49+':\x20'+_0x460fac);}return _0x220c96[_0x514918(0x1ca)]('\x0a');}
|
|
1
|
+
const _0x48b743=_0x300f;(function(_0x26546d,_0x19d85f){const _0x4f09d9=_0x300f,_0x4553b3=_0x26546d();while(!![]){try{const _0xe73307=-parseInt(_0x4f09d9(0x252))/0x1+-parseInt(_0x4f09d9(0x1ff))/0x2*(-parseInt(_0x4f09d9(0x202))/0x3)+parseInt(_0x4f09d9(0x240))/0x4*(parseInt(_0x4f09d9(0x20c))/0x5)+-parseInt(_0x4f09d9(0x23a))/0x6+-parseInt(_0x4f09d9(0x24f))/0x7+parseInt(_0x4f09d9(0x24e))/0x8+parseInt(_0x4f09d9(0x24b))/0x9*(parseInt(_0x4f09d9(0x21e))/0xa);if(_0xe73307===_0x19d85f)break;else _0x4553b3['push'](_0x4553b3['shift']());}catch(_0xf727a6){_0x4553b3['push'](_0x4553b3['shift']());}}}(_0xc887,0x924f8));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x4caf4d,_0x1b649b){const _0x19913b=_0x300f,_0x4dcf55={'fbhRo':function(_0x48742c,_0xaa0ae9,_0x3c8c7d,_0x2a4cb1){return _0x48742c(_0xaa0ae9,_0x3c8c7d,_0x2a4cb1);},'MARzB':function(_0x773116,_0x21f9b0,_0x84f0e4){return _0x773116(_0x21f9b0,_0x84f0e4);},'AXGdi':'local','FAgLS':function(_0x3b0dce,_0x111e19){return _0x3b0dce(_0x111e19);},'FtxGn':function(_0x1a2ca8,_0x31c542){return _0x1a2ca8!==_0x31c542;},'MdwSP':function(_0x175b62,_0x153bee){return _0x175b62!==_0x153bee;}},_0x2f7923=_0x4dcf55['fbhRo'](join,_0x1b649b,'ci',_0x4caf4d),_0x3f8954=join(_0x1b649b,'local',_0x4caf4d),_0x637d8=_0x4dcf55['MARzB'](join,_0x1b649b,_0x4caf4d),_0x2908ec=join(_0x1b649b,_0x4dcf55['AXGdi']),_0x2f9306=join(_0x1b649b,'ci');if(existsSync(_0x2f7923))return _0x2f7923;if(_0x4dcf55[_0x19913b(0x228)](existsSync,_0x3f8954))return _0x3f8954;if(existsSync(_0x637d8)&&(_0x4dcf55[_0x19913b(0x242)](_0x637d8,_0x2908ec)&&_0x4dcf55[_0x19913b(0x244)](_0x637d8,_0x2f9306)?!![]:hasLegacyProfileFiles(_0x637d8)))return _0x637d8;return null;}export function getEnvDir(_0x1803cb,_0xab3b21={}){const _0x30d476=_0x300f,_0x137606={'vyMBu':function(_0x91c4ff,_0x1f4933,_0x2b1558){return _0x91c4ff(_0x1f4933,_0x2b1558);},'jqkZJ':function(_0x50d5cc,_0x1d6fb5){return _0x50d5cc(_0x1d6fb5);},'ytKtU':function(_0x2cb061){return _0x2cb061();},'efEfB':function(_0x3d1280,_0x468492){return _0x3d1280!==_0x468492;},'djVom':function(_0x4593f4,_0x42daa8,_0x210be3){return _0x4593f4(_0x42daa8,_0x210be3);},'nxhWt':'local'},_0x38b3c3=getRangerDir(),_0x56ebff=_0x137606['vyMBu'](findEnvInRoot,_0x1803cb,_0x38b3c3);if(_0x56ebff){if(_0xab3b21['forWrite']&&_0x137606[_0x30d476(0x20f)](isLegacyEnvPath,_0x56ebff))throw legacyWriteError(_0x1803cb,_0x56ebff);return _0x56ebff;}const _0x3258ea=_0x137606[_0x30d476(0x254)](getRangerHomeDir);if(_0x137606['efEfB'](_0x3258ea,_0x38b3c3)){const _0x47baa5=_0x137606['vyMBu'](findEnvInRoot,_0x1803cb,_0x3258ea);if(_0x47baa5){if(_0xab3b21['forWrite']&&isLegacyEnvPath(_0x47baa5))throw _0x137606['djVom'](legacyWriteError,_0x1803cb,_0x47baa5);return _0x47baa5;}}const _0x1484d9=join(_0x3258ea,_0x137606['nxhWt'],_0x1803cb);if(_0xab3b21[_0x30d476(0x211)])throw legacyWriteError(_0x1803cb,_0x1484d9);return _0x1484d9;}function isLegacyEnvPath(_0x204a8d){const _0x451ab1=_0x300f,_0x79c78c={'Yqiao':function(_0x4370f9){return _0x4370f9();},'PHWyT':function(_0x23092c,_0x11d6ab){return _0x23092c+_0x11d6ab;},'NLjUr':function(_0x400aa9,_0x18e1af){return _0x400aa9===_0x18e1af;}},_0x177211=getRangerDir(),_0x41cbee=_0x79c78c['Yqiao'](getRangerHomeDir);for(const _0x5c35e3 of new Set([_0x177211,_0x41cbee])){const _0x3b9ccc=_0x5c35e3['endsWith']('/')?_0x5c35e3:_0x79c78c['PHWyT'](_0x5c35e3,'/');if(_0x79c78c[_0x451ab1(0x259)](_0x204a8d,_0x5c35e3)||_0x204a8d[_0x451ab1(0x1f4)](_0x3b9ccc))return!![];}return![];}function legacyWriteError(_0x4ef91b,_0x53e0fa){const _0x3d0221=_0x300f,_0x5b84f4={'iCwGl':function(_0x1f6a7d,_0x2bcd9a){return _0x1f6a7d+_0x2bcd9a;}};return new Error(_0x5b84f4[_0x3d0221(0x1fa)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x4ef91b+_0x3d0221(0x204)+_0x53e0fa+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0xe38ba,_0x4059e4){const _0x11b998=_0x300f,_0x30b933={'DwIhS':function(_0x803bd6){return _0x803bd6();},'xyQBg':_0x11b998(0x1ee),'pXOFa':function(_0x3b1ad0,_0x3939ee,_0x2292a4){return _0x3b1ad0(_0x3939ee,_0x2292a4);},'vaJCG':'local','Epfgl':function(_0x202019,_0x13332d,_0x36cd80,_0x3d9bc4){return _0x202019(_0x13332d,_0x36cd80,_0x3d9bc4);},'lADWU':function(_0x5a60b6,_0x3ac841,_0x4ae637){return _0x5a60b6(_0x3ac841,_0x4ae637);},'QiRZJ':function(_0x2fc25b,_0x4f0c7d){return _0x2fc25b(_0x4f0c7d);},'gXLfS':function(_0x18d41f,_0x160af7){return _0x18d41f===_0x160af7;},'XqMKL':function(_0x188df3,_0x3413ff){return _0x188df3===_0x3413ff;}},_0x55b3da=_0x4059e4?.[_0x11b998(0x218)],_0x15bf78=_0x55b3da?[_0x55b3da]:[getRangerDir(),_0x30b933[_0x11b998(0x235)](getRangerHomeDir)][_0x11b998(0x1f1)]((_0x455445,_0x4edb02,_0x354f20)=>_0x354f20['indexOf'](_0x455445)===_0x4edb02),_0x31d965=_0x4059e4?.['locations']??['ci',_0x11b998(0x222),_0x30b933['xyQBg']];for(const _0x5822a1 of _0x15bf78){const _0x4f642c=_0x30b933[_0x11b998(0x1f9)](join,_0x5822a1,_0x30b933[_0x11b998(0x236)]),_0x5445e8=join(_0x5822a1,'ci'),_0x9d1414=[{'location':'ci','path':_0x30b933[_0x11b998(0x251)](join,_0x5822a1,'ci',_0xe38ba)},{'location':_0x30b933['vaJCG'],'path':join(_0x5822a1,_0x11b998(0x222),_0xe38ba)},{'location':_0x11b998(0x1ee),'path':_0x30b933[_0x11b998(0x25d)](join,_0x5822a1,_0xe38ba)}];for(const _0x428be1 of _0x9d1414){if(_0x31d965[_0x11b998(0x221)](_0x428be1['location'])&&_0x30b933[_0x11b998(0x21f)](existsSync,_0x428be1[_0x11b998(0x239)])){if(_0x30b933['gXLfS'](_0x428be1['location'],_0x30b933[_0x11b998(0x1ef)])&&(_0x30b933['gXLfS'](_0x428be1['path'],_0x4f642c)||_0x30b933['XqMKL'](_0x428be1['path'],_0x5445e8))&&!_0x30b933['QiRZJ'](hasLegacyProfileFiles,_0x428be1['path']))continue;return{'path':_0x428be1[_0x11b998(0x239)],'location':_0x428be1[_0x11b998(0x1fc)]};}}}return null;}function hasLegacyProfileFiles(_0x277350){const _0x302cce=_0x300f,_0x327a77={'GagVD':function(_0x4f9597,_0x277e12,_0x3763b5){return _0x4f9597(_0x277e12,_0x3763b5);},'TAApH':_0x302cce(0x25b),'aBikB':'auth.json'};return existsSync(_0x327a77['GagVD'](join,_0x277350,_0x327a77['TAApH']))||existsSync(_0x327a77[_0x302cce(0x230)](join,_0x277350,_0x327a77['aBikB']))||existsSync(join(_0x277350,_0x302cce(0x229)));}export function isEnvCi(_0x4c606d){const _0x57e264=_0x300f,_0x547ee3={'RBTwF':function(_0x4ff514,_0x3dc8bb){return _0x4ff514(_0x3dc8bb);},'EVSNL':function(_0x1ddf7d,_0x4120fe,_0x4102fd,_0x457d4f){return _0x1ddf7d(_0x4120fe,_0x4102fd,_0x457d4f);},'WgrhF':function(_0x151046){return _0x151046();},'VfkbT':function(_0x41cfb7,_0x508bb2){return _0x41cfb7!==_0x508bb2;},'wuPlp':function(_0x59ed90){return _0x59ed90();}};if(_0x547ee3[_0x57e264(0x224)](existsSync,_0x547ee3[_0x57e264(0x23c)](join,getRangerDir(),'ci',_0x4c606d)))return!![];const _0x540deb=_0x547ee3['WgrhF'](getRangerHomeDir);if(_0x547ee3['VfkbT'](_0x540deb,_0x547ee3[_0x57e264(0x1fe)](getRangerDir))&&existsSync(join(_0x540deb,'ci',_0x4c606d)))return!![];return![];}function _0x300f(_0x341800,_0x13ba72){_0x341800=_0x341800-0x1ec;const _0xc88732=_0xc887();let _0x300f67=_0xc88732[_0x341800];return _0x300f67;}export async function cleanupTempFiles(_0x48b42d){const _0x133bc4=_0x300f,_0x1a026a={'nCWIb':'ENOENT'},_0x357ca3=[_0x48b42d['tempAuthPath'],_0x48b42d['configPath']]['filter'](Boolean);await Promise[_0x133bc4(0x234)](_0x357ca3['map'](_0xe0a3c7=>unlink(_0xe0a3c7)['catch'](_0x1b284e=>{const _0x57943b=_0x133bc4;_0x1b284e[_0x57943b(0x22a)]!==_0x1a026a['nCWIb']&&console['warn'](_0x57943b(0x1f5)+_0xe0a3c7+':',_0x1b284e[_0x57943b(0x237)]);})));}export function getSettingsPath(_0x2cdc64){const _0x32d5af={'XHkJF':function(_0x5b6220,_0x3c1a33){return _0x5b6220(_0x3c1a33);}};return join(_0x32d5af['XHkJF'](getEnvDir,_0x2cdc64),'settings.json');}export async function loadSettings(_0xa5dd2){const _0x27f3bb=_0x300f,_0x584ee5={'EuTQP':function(_0x41d00b,_0x5f3331){return _0x41d00b(_0x5f3331);},'EuijX':function(_0x52c56c,_0x5ad98d){return _0x52c56c(_0x5ad98d);},'SpfDp':function(_0x557f4c,_0x4ab814,_0x1bc64c){return _0x557f4c(_0x4ab814,_0x1bc64c);}},_0x1d199d=_0x584ee5[_0x27f3bb(0x201)](getSettingsPath,_0xa5dd2);if(!_0x584ee5[_0x27f3bb(0x25a)](existsSync,_0x1d199d))return{};try{const _0x53590c=await _0x584ee5[_0x27f3bb(0x24d)](readFile,_0x1d199d,'utf-8');return JSON['parse'](_0x53590c);}catch{return{};}}export async function saveSettings(_0x57125b,_0x4e7025){const _0x32f3b0=_0x300f,_0x4f59b5={'WQpKI':function(_0x4b2211,_0x37ed73){return _0x4b2211(_0x37ed73);},'ipMLH':function(_0x513ec5,_0x196cdb){return _0x513ec5(_0x196cdb);},'glWaR':function(_0x2ae005,_0x3ac6d8,_0x44be58){return _0x2ae005(_0x3ac6d8,_0x44be58);}},_0x36e96f=_0x4f59b5[_0x32f3b0(0x206)](getSettingsPath,_0x57125b),_0x3d15ab=dirname(_0x36e96f);!_0x4f59b5['ipMLH'](existsSync,_0x3d15ab)&&await _0x4f59b5[_0x32f3b0(0x208)](mkdir,_0x3d15ab,{'recursive':!![]}),await writeFile(_0x36e96f,JSON[_0x32f3b0(0x213)](_0x4e7025,null,0x2));}export function resolveEnvVars(_0x2333e7){const _0x148f2d=_0x300f,_0x57a9c8={'dCWVI':'object'};if(typeof _0x2333e7==='string')return _0x2333e7['replace'](/\$\{(\w+)\}/g,(_0x42fcf4,_0xb09350)=>{const _0x5d555d=_0x300f,_0x52cf51=process[_0x5d555d(0x22b)][_0xb09350];if(_0x52cf51===undefined)throw new Error('Environment\x20variable\x20'+_0xb09350+_0x5d555d(0x1f8));return _0x52cf51;});if(Array['isArray'](_0x2333e7))return _0x2333e7[_0x148f2d(0x253)](resolveEnvVars);if(_0x2333e7&&typeof _0x2333e7===_0x57a9c8['dCWVI'])return Object[_0x148f2d(0x210)](Object['entries'](_0x2333e7)['map'](([_0x4b7691,_0x3a5419])=>[_0x4b7691,resolveEnvVars(_0x3a5419)]));return _0x2333e7;}function _0xc887(){const _0x4126d4=['Failed\x20to\x20clean\x20up\x20temp\x20file\x20','cdpEndpoint','ubLuE','\x20is\x20not\x20set','pXOFa','iCwGl','koVSl','location','push','wuPlp','5506kfIRfe','XSLqU','EuTQP','933QldwxA','object','\x22\x20to\x20legacy\x20path\x20','stagehand','WQpKI','LjmSW','glWaR','headers','TEdZx','chromium','5vHDSgz','userAgent','VxhYd','jqkZJ','fromEntries','forWrite','safeMode','stringify','launchOptions','allowInsecureLocalhost','GGaOp','split','rangerDir','entries','vision','EkXIZ','repeat','ignoreHTTPSErrors','10760HiiTFM','QiRZJ','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','includes','local','tHHJp','RBTwF','args','core','clipboard-read','FAgLS','auth.json.enc','code','env','wfKrN','storageStatePath','JZWab','gYxUs','GagVD','storageState','eRVSe','headless','all','DwIhS','vaJCG','message','ranger-auth-','path','6627474DcYqEm','clipboard-write','EVSNL','--disable-setuid-sandbox','Failed\x20to\x20decrypt\x20auth\x20state:\x20','isArray','4524536KmKtKx','SyQwV','FtxGn','RDkxw','MdwSP','extraHTTPHeaders','.json','RkQyl','exRXP','mdRDY','playwright-cli','7893nAUxgO','qMqVz','SpfDp','652800lcYiYR','7932302ztSwNp','GNqPc','Epfgl','175516SNtzdg','map','ytKtU','catch','join','zoAkl','setupHeaders','NLjUr','EuijX','settings.json','length','lADWU','zJIGR','keys','legacy','xyQBg','--disable-features=WebBluetooth','filter','--allow-insecure-localhost','boolean','startsWith'];_0xc887=function(){return _0x4126d4;};return _0xc887();}const isRecord=_0x281ea7=>typeof _0x281ea7==='object'&&_0x281ea7!==null&&!Array[_0x48b743(0x23f)](_0x281ea7),asRecord=_0x2d0649=>isRecord(_0x2d0649)?_0x2d0649:undefined,mergeHeaders=(_0x47af9b,_0x4093f9)=>{const _0x26ccc5=_0x48b743,_0x3b80b1={..._0x47af9b??{},..._0x4093f9??{}};return Object[_0x26ccc5(0x1ed)](_0x3b80b1)['length']?_0x3b80b1:undefined;},SAFE_MODE_ARGS=[_0x48b743(0x1f0)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x48b743(0x1f2)];export function buildBrowserOptionsFromSettings(_0x192fa3,_0x3d2134={}){const _0x54f51c=_0x48b743,_0xf5135={'dRluC':function(_0xb697e1,_0x3afd62){return _0xb697e1(_0x3afd62);},'vcFAL':function(_0x33e040,_0x642fde){return _0x33e040(_0x642fde);},'RkQyl':function(_0x479464,_0x4841e6){return _0x479464===_0x4841e6;},'RDkxw':'string'},_0x1bd5c7=asRecord(_0x192fa3['browser']),_0x2b9141={..._0xf5135['dRluC'](asRecord,_0x1bd5c7?.[_0x54f51c(0x214)])??{}};typeof _0x3d2134[_0x54f51c(0x233)]===_0x54f51c(0x1f3)&&(_0x2b9141['headless']=_0x3d2134[_0x54f51c(0x233)]);if(_0x192fa3[_0x54f51c(0x212)]){const _0x53a391=_0x2b9141['args']??[],_0x2348e2=SAFE_MODE_ARGS['filter'](_0x28f988=>!_0x53a391['includes'](_0x28f988));_0x2b9141[_0x54f51c(0x225)]=[..._0x53a391,..._0x2348e2];}if(_0x192fa3[_0x54f51c(0x215)]){const _0x504dbb=_0x2b9141['args']??[],_0x52f1cf=ALLOW_LOCALHOST_ARGS[_0x54f51c(0x1f1)](_0x1f2b38=>!_0x504dbb[_0x54f51c(0x221)](_0x1f2b38));_0x2b9141['args']=[..._0x504dbb,..._0x52f1cf];}const _0x1501a6={..._0xf5135['vcFAL'](asRecord,_0x1bd5c7?.['contextOptions'])??{}};_0x1501a6[_0x54f51c(0x21d)]=!![];_0xf5135[_0x54f51c(0x247)](typeof _0x192fa3['userAgent'],_0xf5135[_0x54f51c(0x243)])&&(_0x1501a6[_0x54f51c(0x20d)]=_0x192fa3['userAgent']);const _0x32b9d5=mergeHeaders(asRecord(_0x1501a6['extraHTTPHeaders']),asRecord(_0x192fa3[_0x54f51c(0x209)]));return _0x32b9d5?_0x1501a6[_0x54f51c(0x245)]=_0x32b9d5:delete _0x1501a6['extraHTTPHeaders'],_0x3d2134[_0x54f51c(0x22d)]&&(_0x1501a6[_0x54f51c(0x231)]=_0x3d2134[_0x54f51c(0x22d)]),{'launchOptions':_0x2b9141,'contextOptions':_0x1501a6};}async function resolveLocalAuthPath(_0x4dea84){const _0x133c06=_0x48b743,_0x75c7f={'exRXP':function(_0x244a22,_0x1dfbb5,_0x2a959d){return _0x244a22(_0x1dfbb5,_0x2a959d);},'BoKpd':'auth.json','GGaOp':function(_0x35a76f){return _0x35a76f();},'qMqVz':function(_0x267c06,_0xa4a35f,_0x1c3ef3){return _0x267c06(_0xa4a35f,_0x1c3ef3);},'FlqUR':function(_0x40ad62,_0x340646){return _0x40ad62 instanceof _0x340646;},'RMIvq':function(_0x548312,_0x3797fe){return _0x548312(_0x3797fe);},'ihPAH':function(_0xdf19d1,_0x3624e6){return _0xdf19d1(_0x3624e6);}},_0xf11578=join(_0x4dea84,_0x133c06(0x229)),_0x2175c0=_0x75c7f[_0x133c06(0x248)](join,_0x4dea84,_0x75c7f['BoKpd']);if(existsSync(_0xf11578))try{const _0x48414e=await _0x75c7f[_0x133c06(0x216)](getToken);if(!_0x48414e)throw new Error(_0x133c06(0x220));const _0x56405a=await readFile(_0xf11578),_0x45d589=decrypt(_0x56405a,_0x48414e),_0x1e87f6=_0x75c7f['qMqVz'](join,_0x75c7f[_0x133c06(0x216)](tmpdir),_0x133c06(0x238)+Date['now']()+'.json');return await _0x75c7f[_0x133c06(0x24c)](writeFile,_0x1e87f6,_0x45d589),{'storageStatePath':_0x1e87f6,'tempAuthPath':_0x1e87f6};}catch(_0x3ac3fd){const _0x278d6c=_0x75c7f['FlqUR'](_0x3ac3fd,Error)?_0x3ac3fd['message']:_0x75c7f['RMIvq'](String,_0x3ac3fd);throw new Error(_0x133c06(0x23e)+_0x278d6c);}if(_0x75c7f['ihPAH'](existsSync,_0x2175c0))return{'storageStatePath':_0x2175c0};return{};}export async function buildPlaywrightConfig(_0x3cd45a,_0x510166,_0x24309f,_0x405561,_0x1f8216){const _0x127d2f=_0x48b743;if(_0x1f8216)return buildPlaywrightConfigCore(_0x3cd45a,_0x1f8216,_0x510166,_0x24309f,_0x405561,'stagehand');const {storageStatePath:_0x48b0ae,tempAuthPath:_0x5215b9}=await resolveLocalAuthPath(getEnvDir(_0x510166));try{const _0x4bd448=await buildPlaywrightConfigCore(_0x3cd45a,_0x48b0ae,_0x510166,_0x24309f,_0x405561,'stagehand');return{..._0x4bd448,'tempAuthPath':_0x5215b9};}catch(_0x572cfb){_0x5215b9&&await unlink(_0x5215b9)[_0x127d2f(0x255)](()=>{});throw _0x572cfb;}}export async function buildPlaywrightConfigCore(_0x390862,_0x3bb008,_0x196e7f,_0x55f7c1,_0x20777d,_0x4424f8=_0x48b743(0x205)){const _0x32f5c6=_0x48b743,_0xe82547={'rlqlD':function(_0x1fe465,_0x57a946,_0x56e8f5){return _0x1fe465(_0x57a946,_0x56e8f5);},'ZlWHZ':function(_0x1e9ba7,_0x34c169){return _0x1e9ba7===_0x34c169;},'GNqPc':_0x32f5c6(0x23d),'gYxUs':_0x32f5c6(0x20b),'eRVSe':_0x32f5c6(0x23b),'koVSl':function(_0x8f5fe3,_0x2da71c,_0x5c2a3f,_0x537076){return _0x8f5fe3(_0x2da71c,_0x5c2a3f,_0x537076);},'nmipy':'install','aKQuq':function(_0x52df2a,_0x48de46,_0x21da3e){return _0x52df2a(_0x48de46,_0x21da3e);},'EkXIZ':function(_0x4ba9a5){return _0x4ba9a5();},'xgXdT':function(_0x542819,_0x1b1d6d){return _0x542819(_0x1b1d6d);},'elcYA':'playwright-cli','ubLuE':'-cli'},_0x456706=_0x55f7c1||randomUUID(),_0x17068c=_0xe82547[_0x32f5c6(0x1fb)](join,getRangerDir(),'sessions',_0x456706),_0x3a2148=Boolean(_0x390862[_0x32f5c6(0x1f6)]),_0x505101=_0x3a2148?{'browserName':_0xe82547[_0x32f5c6(0x22f)],'cdpEndpoint':_0x390862['cdpEndpoint']}:((()=>{const _0x13a5ac=_0x32f5c6,{launchOptions:_0x5bb72e,contextOptions:_0x179f28}=_0xe82547['rlqlD'](buildBrowserOptionsFromSettings,_0x390862,{'headless':_0x20777d?![]:_0x390862[_0x13a5ac(0x233)]??!![],'storageStatePath':_0x3bb008});if(_0xe82547['ZlWHZ'](process['getuid']?.(),0x0)){const _0x1bc0fb=['--no-sandbox',_0xe82547[_0x13a5ac(0x250)]],_0x102ef3=_0x5bb72e['args']??[],_0x520fb7=_0x1bc0fb['filter'](_0x193dca=>!_0x102ef3['includes'](_0x193dca));_0x5bb72e['args']=[..._0x102ef3,..._0x520fb7];}return{'isolated':!![],'browserName':_0xe82547[_0x13a5ac(0x22f)],'launchOptions':_0x5bb72e,'contextOptions':{..._0x179f28,'permissions':[_0x13a5ac(0x227),_0xe82547[_0x13a5ac(0x232)]],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x4baab4=_0x4424f8==='playwright-cli'?{'browser':_0x505101,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x17068c,'outputMode':'file','codegen':'none'}:{'name':_0x196e7f,'browser':_0x505101,'capabilities':[_0x32f5c6(0x226),'tabs',_0xe82547['nmipy'],'pdf',_0x32f5c6(0x21a)],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x17068c};if(!_0x3a2148){const _0x4b7971=_0x4baab4['browser'],_0x492b63=_0x4b7971['contextOptions'];if(_0x492b63['userAgent']===undefined)delete _0x492b63['userAgent'];if(_0x492b63[_0x32f5c6(0x231)]===undefined)delete _0x492b63['storageState'];}const _0x38d094=_0xe82547['aKQuq'](join,_0xe82547[_0x32f5c6(0x21b)](tmpdir),'ranger-config');!_0xe82547['xgXdT'](existsSync,_0x38d094)&&await mkdir(_0x38d094,{'recursive':!![]});const _0x45bbe1=_0xe82547['ZlWHZ'](_0x4424f8,_0xe82547['elcYA'])?_0xe82547[_0x32f5c6(0x1f7)]:'',_0x64c3bc=join(_0x38d094,_0x196e7f+'-'+Date['now']()+_0x45bbe1+_0x32f5c6(0x246));return await writeFile(_0x64c3bc,JSON['stringify'](_0x4baab4,null,0x2)),{'configPath':_0x64c3bc};}export async function buildPlaywrightCliConfig(_0x360b6c,_0x53800a,_0x224277,_0x5da658,_0x25e62b){const _0x11a407=_0x48b743,_0x5b6a56={'VxhYd':function(_0x26502f,_0x3c5a82){return _0x26502f(_0x3c5a82);}};if(_0x25e62b)return buildPlaywrightConfigCore(_0x360b6c,_0x25e62b,_0x53800a,_0x224277,_0x5da658,_0x11a407(0x24a));const {storageStatePath:_0x2fce2d,tempAuthPath:_0x3cdd49}=await resolveLocalAuthPath(_0x5b6a56[_0x11a407(0x20e)](getEnvDir,_0x53800a));try{const _0x45f251=await buildPlaywrightConfigCore(_0x360b6c,_0x2fce2d,_0x53800a,_0x224277,_0x5da658,_0x11a407(0x24a));return{..._0x45f251,'tempAuthPath':_0x3cdd49};}catch(_0x87bbb0){_0x3cdd49&&await _0x5b6a56['VxhYd'](unlink,_0x3cdd49)[_0x11a407(0x255)](()=>{});throw _0x87bbb0;}}export function getNestedValue(_0x5edae4,_0x521fa6){const _0x3b5afb=_0x48b743,_0x341bed={'MBPyD':function(_0x18f76f,_0x34370c){return _0x18f76f(_0x34370c);},'TEdZx':function(_0x1e3fe9,_0x623c2e){return _0x1e3fe9===_0x623c2e;},'zJIGR':function(_0x5db6a,_0x13c46a){return _0x5db6a===_0x13c46a;},'mdRDY':function(_0x2ab72b,_0x5f41a0){return _0x2ab72b!==_0x5f41a0;}},_0x286327=_0x341bed['MBPyD'](parseKeyPath,_0x521fa6);let _0xe2f9d5=_0x5edae4;for(const _0x39e22e of _0x286327){if(_0x341bed[_0x3b5afb(0x20a)](_0xe2f9d5,null)||_0x341bed[_0x3b5afb(0x1ec)](_0xe2f9d5,undefined)||_0x341bed[_0x3b5afb(0x249)](typeof _0xe2f9d5,'object'))return undefined;_0xe2f9d5=_0xe2f9d5[_0x39e22e];}return _0xe2f9d5;}export function setNestedValue(_0x12862d,_0x254a7f,_0x504d86){const _0x14557b=_0x48b743,_0x267307={'JZWab':function(_0x5784e8,_0xac2135){return _0x5784e8(_0xac2135);},'mVkzw':function(_0x5bc8aa,_0x22e199){return _0x5bc8aa in _0x22e199;},'zoAkl':function(_0x304590,_0x3f3ba4){return _0x304590!==_0x3f3ba4;}},_0xb6586e=_0x267307[_0x14557b(0x22e)](parseKeyPath,_0x254a7f);let _0x2a84bc=_0x12862d;for(let _0x5a6d83=0x0;_0x5a6d83<_0xb6586e[_0x14557b(0x25c)]-0x1;_0x5a6d83++){const _0x450074=_0xb6586e[_0x5a6d83];(!_0x267307['mVkzw'](_0x450074,_0x2a84bc)||_0x267307[_0x14557b(0x257)](typeof _0x2a84bc[_0x450074],_0x14557b(0x203)))&&(_0x2a84bc[_0x450074]={}),_0x2a84bc=_0x2a84bc[_0x450074];}_0x2a84bc[_0xb6586e[_0xb6586e['length']-0x1]]=_0x504d86;}export function deleteNestedValue(_0x2bd6f1,_0x88e6c1){const _0x53d923=_0x48b743,_0x185ad8={'kdqar':function(_0x775722,_0x5ea2ab){return _0x775722!==_0x5ea2ab;},'XSLqU':function(_0x1393fe,_0x8130b8){return _0x1393fe===_0x8130b8;},'cxSea':function(_0x4b1b49,_0x388793){return _0x4b1b49!==_0x388793;},'wfKrN':function(_0x10db4f,_0x1439fa){return _0x10db4f-_0x1439fa;}},_0xb4f40d=parseKeyPath(_0x88e6c1);let _0x3bc83f=_0x2bd6f1;for(let _0x4d8337=0x0;_0x4d8337<_0xb4f40d[_0x53d923(0x25c)]-0x1;_0x4d8337++){if(_0x3bc83f===null||_0x3bc83f===undefined||_0x185ad8['kdqar'](typeof _0x3bc83f,_0x53d923(0x203)))return![];_0x3bc83f=_0x3bc83f[_0xb4f40d[_0x4d8337]];}if(_0x185ad8[_0x53d923(0x200)](_0x3bc83f,null)||_0x3bc83f===undefined||_0x185ad8['cxSea'](typeof _0x3bc83f,'object'))return![];const _0x349e32=_0xb4f40d[_0x185ad8[_0x53d923(0x22c)](_0xb4f40d[_0x53d923(0x25c)],0x1)];if(_0x349e32 in _0x3bc83f)return delete _0x3bc83f[_0x349e32],!![];return![];}function parseKeyPath(_0x53ad15){const _0xccf886=_0x48b743,_0x655e0e={'tHHJp':'header','LjmSW':'setupHeader'},_0x16b4ac=_0x53ad15[_0xccf886(0x217)]('.');return _0x16b4ac[0x0]===_0x655e0e[_0xccf886(0x223)]&&(_0x16b4ac[0x0]=_0xccf886(0x209)),_0x16b4ac[0x0]===_0x655e0e[_0xccf886(0x207)]&&(_0x16b4ac[0x0]=_0xccf886(0x258)),_0x16b4ac;}export function formatSettings(_0x575789,_0x5ec6a9=0x0){const _0x242f2a=_0x48b743,_0x5591f2={'SyQwV':function(_0x3fc89e,_0x151085){return _0x3fc89e===_0x151085;},'tlNKK':function(_0x104ebf,_0x5effcc){return _0x104ebf!==_0x5effcc;}},_0x27a04d=[],_0x31a329='\x20\x20'[_0x242f2a(0x21c)](_0x5ec6a9);for(const [_0x2393b6,_0x510cb9]of Object[_0x242f2a(0x219)](_0x575789)){if(_0x5591f2[_0x242f2a(0x241)](_0x510cb9,undefined))continue;if(typeof _0x510cb9==='object'&&_0x5591f2['tlNKK'](_0x510cb9,null)){_0x27a04d['push'](''+_0x31a329+_0x2393b6+':');for(const [_0x22e55b,_0x422812]of Object['entries'](_0x510cb9)){_0x27a04d['push'](_0x31a329+'\x20\x20'+_0x22e55b+':\x20'+_0x422812);}}else _0x27a04d[_0x242f2a(0x1fd)](''+_0x31a329+_0x2393b6+':\x20'+_0x510cb9);}return _0x27a04d[_0x242f2a(0x256)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2923(_0x82cc16,_0x265bb3){_0x82cc16=_0x82cc16-0xa4;const _0x51eb61=_0x51eb();let _0x29237d=_0x51eb61[_0x82cc16];return _0x29237d;}function _0x51eb(){const _0x4b34eb=['FvhVm','7fXpWuY','12IORrKc','3152076lgPWgX','634epzBvT','2056255xJTazC','556029xiJONt','skills','cccQR','10310679pgfSkL','10110648yfwhae','13908wrUoLH','4260HJLcAu','63877hEcWMD'];_0x51eb=function(){return _0x4b34eb;};return _0x51eb();}(function(_0x340b81,_0x46fe41){const _0x3b85ca=_0x2923,_0x361ffe=_0x340b81();while(!![]){try{const _0x1f52c1=parseInt(_0x3b85ca(0xaf))/0x1+-parseInt(_0x3b85ca(0xad))/0x2*(parseInt(_0x3b85ca(0xa6))/0x3)+-parseInt(_0x3b85ca(0xab))/0x4*(-parseInt(_0x3b85ca(0xae))/0x5)+parseInt(_0x3b85ca(0xac))/0x6*(parseInt(_0x3b85ca(0xaa))/0x7)+parseInt(_0x3b85ca(0xa5))/0x8+parseInt(_0x3b85ca(0xa4))/0x9+parseInt(_0x3b85ca(0xa7))/0xa*(-parseInt(_0x3b85ca(0xa8))/0xb);if(_0x1f52c1===_0x46fe41)break;else _0x361ffe['push'](_0x361ffe['shift']());}catch(_0x4a900c){_0x361ffe['push'](_0x361ffe['shift']());}}}(_0x51eb,0xbeb8c));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x446a88){const _0x3aefa0=_0x2923,_0x36ba79={'AnykU':function(_0x3b2f0a,_0x235c2b,_0x5c221b){return _0x3b2f0a(_0x235c2b,_0x5c221b);},'FvhVm':function(_0xc8c970,_0x28bbe9,_0x6f66d4){return _0xc8c970(_0x28bbe9,_0x6f66d4);},'cccQR':'utf-8'},_0x425381=join(__dirname,'..','..',_0x3aefa0(0xb0)),_0x3093eb=_0x36ba79['AnykU'](join,_0x425381,_0x446a88);try{return _0x36ba79[_0x3aefa0(0xa9)](readFileSync,_0x3093eb,_0x36ba79[_0x3aefa0(0xb1)]);}catch{return'';}}export function getRangerSkillContent(){return readSkillContent('ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0xffe34=_0x3b77;function _0x3b77(_0x444642,_0x3b193c){_0x444642=_0x444642-0xac;const _0x552eaa=_0x552e();let _0x3b771d=_0x552eaa[_0x444642];return _0x3b771d;}(function(_0x135aa1,_0x20e31c){const _0x4bdd49=_0x3b77,_0x3c7427=_0x135aa1();while(!![]){try{const _0x480fd6=parseInt(_0x4bdd49(0xb3))/0x1*(-parseInt(_0x4bdd49(0xb8))/0x2)+-parseInt(_0x4bdd49(0xbf))/0x3+parseInt(_0x4bdd49(0xc5))/0x4+parseInt(_0x4bdd49(0xba))/0x5+parseInt(_0x4bdd49(0xcf))/0x6+parseInt(_0x4bdd49(0xb4))/0x7+parseInt(_0x4bdd49(0xb7))/0x8*(parseInt(_0x4bdd49(0xac))/0x9);if(_0x480fd6===_0x20e31c)break;else _0x3c7427['push'](_0x3c7427['shift']());}catch(_0x18de29){_0x3c7427['push'](_0x3c7427['shift']());}}}(_0x552e,0x69ed6));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x552e(){const _0x504a83=['claude','catch','feature-tracker','SKILL.md','1502271CkCrAA','length','opencode','JExQV','pYFoI','\x20\x20Skill\x20not\x20found:\x20','718204zPsOHh','e2e-test-recommender','xrBFI','join','Invalid\x20skill\x20frontmatter','log','trim','bug-bash','\x20\x20Files:\x20','skills','2223786LfUEHA','1755utLMeR','match','\x20\x20Removed\x20deprecated\x20skill:\x20','warn','endsWith','.md','utf-8','348ATttfY','70854tkyOPI','\x20\x20Installed\x20skill:\x20','WRTrz','37384Jjzbjs','3276YMDYbO','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','165600pTWCml'];_0x552e=function(){return _0x504a83;};return _0x552e();}import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0xffe34(0xc6),_0xffe34(0xcc),_0xffe34(0xbd)];export async function installSkill(_0x2e5560,_0x3e6858={}){const _0x557301=_0xffe34,_0x3c1927={'WRTrz':_0x557301(0xbb),'aBMxY':function(_0xa76e35){return _0xa76e35();},'JExQV':function(_0xad0c02,_0x2deb63,_0x40d8c6){return _0xad0c02(_0x2deb63,_0x40d8c6);},'WfdOc':function(_0x282a2d,_0x4d1d16){return _0x282a2d(_0x4d1d16);},'stVzi':_0x557301(0xbe),'aqtxx':function(_0x424cca,_0x3a3414){return _0x424cca(_0x3a3414);},'xrBFI':'utf-8','PDoOR':function(_0x356913,_0x22d202,_0x4f326f,_0x4dd718){return _0x356913(_0x22d202,_0x4f326f,_0x4dd718);}},{level:level='project',cliVersion:_0x2b3bb0,platform:platform=_0x3c1927[_0x557301(0xb6)]}=_0x3e6858,_0x5e9dd3=_0x3c1927['aBMxY'](getSourceSkillsDir),_0x1fc4b5=join(_0x5e9dd3,_0x2e5560),_0x3d1ae6=_0x3c1927[_0x557301(0xc2)](join,_0x5e9dd3,_0x2e5560+_0x557301(0xb1)),_0x1926ac=existsSync(_0x1fc4b5)&&_0x3c1927['WfdOc'](statSync,_0x1fc4b5)['isDirectory']()&&existsSync(join(_0x1fc4b5,_0x3c1927['stVzi'])),_0x2ce90a=_0x3c1927['aqtxx'](existsSync,_0x3d1ae6);if(!_0x1926ac&&!_0x2ce90a)return console[_0x557301(0xaf)](_0x557301(0xc4)+_0x2e5560),![];const _0x576e2a=platform===_0x557301(0xc1)?getOpencodeSkillsDir(level):getSkillsDir(level),_0xc3eedd=join(_0x576e2a,_0x2e5560);await _0x3c1927[_0x557301(0xc2)](mkdir,_0xc3eedd,{'recursive':!![]});let _0x4502e9,_0x449be0=[];if(_0x1926ac){const _0x547754=await readdir(_0x1fc4b5),_0x575eae=_0x547754['filter'](_0x8e1ba1=>_0x8e1ba1[_0x557301(0xb0)](_0x557301(0xb1)));for(const _0x27b442 of _0x575eae){const _0x33af42=join(_0x1fc4b5,_0x27b442),_0x4554df=join(_0xc3eedd,_0x27b442);await _0x3c1927['JExQV'](copyFile,_0x33af42,_0x4554df),_0x449be0['push'](_0x27b442);}_0x4502e9=await readFile(join(_0x1fc4b5,'SKILL.md'),_0x557301(0xb2));}else{_0x4502e9=await _0x3c1927['JExQV'](readFile,_0x3d1ae6,_0x3c1927[_0x557301(0xc7)]);const _0x57bd54=join(_0xc3eedd,'SKILL.md');await _0x3c1927['PDoOR'](writeFile,_0x57bd54,_0x4502e9,_0x557301(0xb2)),_0x449be0['push']('SKILL.md');}const {name:_0x3165b3}=_0x3c1927['WfdOc'](parseFrontmatter,_0x4502e9);return console[_0x557301(0xca)](_0x557301(0xb5)+_0x3165b3),console['log']('\x20\x20Location:\x20'+_0xc3eedd),_0x449be0[_0x557301(0xc0)]>0x1&&console['log'](_0x557301(0xcd)+_0x449be0[_0x557301(0xc8)](',\x20')),logLocalAgentInstallation(_0x2e5560,{'skillDisplayName':_0x3165b3,'installLevel':level},_0x2b3bb0)[_0x557301(0xbc)](()=>{}),!![];}function getSourceSkillsDir(){const _0x2aeb85=_0xffe34,_0x12f72b=[join(__dirname,'..','..',_0x2aeb85(0xce)),join(__dirname,'..','..','..',_0x2aeb85(0xce))];for(const _0x3d6c59 of _0x12f72b){if(existsSync(_0x3d6c59))return _0x3d6c59;}return _0x12f72b[0x0];}function parseFrontmatter(_0x1d7348){const _0x199d21=_0xffe34,_0x2444bd=_0x1d7348['match'](/^---\n([\s\S]+?)\n---/);if(!_0x2444bd)throw new Error(_0x199d21(0xc9));const _0x53f7d9=_0x2444bd[0x1],_0x5260fa=_0x53f7d9[_0x199d21(0xad)](/name:\s*(.+)/),_0x59ff0e=_0x53f7d9[_0x199d21(0xad)](/description:\s*"?(.+?)"?\n/);return{'name':_0x5260fa?.[0x1][_0x199d21(0xcb)]()||'','description':_0x59ff0e?.[0x1][_0x199d21(0xcb)]()||''};}export async function removeSkill(_0x51a135,_0x350233){const _0x376b7d=_0xffe34,_0x535019={'pYFoI':function(_0x467576,_0x4d9bf9,_0x29dbbf){return _0x467576(_0x4d9bf9,_0x29dbbf);}},_0x2067fc=getSkillsDir(_0x350233),_0x731de1=_0x535019[_0x376b7d(0xc3)](join,_0x2067fc,_0x51a135);if(!existsSync(_0x731de1))return![];try{return await rm(_0x731de1,{'recursive':!![]}),console[_0x376b7d(0xca)](_0x376b7d(0xae)+_0x51a135),!![];}catch{return console['warn'](_0x376b7d(0xb9)+_0x51a135),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3d9620=_0x3359;(function(_0x380f7b,_0x212b8f){const _0x218b6c=_0x3359,_0x1d4865=_0x380f7b();while(!![]){try{const _0x107659=-parseInt(_0x218b6c(0x19b))/0x1+-parseInt(_0x218b6c(0x194))/0x2*(-parseInt(_0x218b6c(0x190))/0x3)+parseInt(_0x218b6c(0x18d))/0x4+parseInt(_0x218b6c(0x161))/0x5+-parseInt(_0x218b6c(0x18f))/0x6*(parseInt(_0x218b6c(0x191))/0x7)+parseInt(_0x218b6c(0x18b))/0x8+parseInt(_0x218b6c(0x16d))/0x9;if(_0x107659===_0x212b8f)break;else _0x1d4865['push'](_0x1d4865['shift']());}catch(_0x640cdb){_0x1d4865['push'](_0x1d4865['shift']());}}}(_0x24f2,0xdf45c));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x32ccfc,_0x2f964){const _0x3f0959=_0x3359,_0x19aaf1={'RKCJV':function(_0x342baa,_0x4680bd){return _0x342baa<=_0x4680bd;},'hDvBt':function(_0x22b3d3,_0x226fca){return _0x22b3d3&_0x226fca;},'BssOH':function(_0x7f656,_0x5b381f){return _0x7f656>_0x5b381f;},'GLojL':function(_0x311854,_0x381025){return _0x311854<_0x381025;}};if(_0x2f964>=_0x32ccfc['length'])return[0x0,0x0];const _0x113faa=_0x32ccfc[_0x2f964];let _0x56dbdb=0x1,_0x24d3bf=0x80;while(_0x19aaf1['RKCJV'](_0x56dbdb,0x8)&&!_0x19aaf1[_0x3f0959(0x173)](_0x113faa,_0x24d3bf)){_0x56dbdb++,_0x24d3bf>>=0x1;}if(_0x19aaf1[_0x3f0959(0x17e)](_0x2f964+_0x56dbdb,_0x32ccfc['length']))return[0x0,0x0];let _0x11734c=_0x113faa&_0x24d3bf-0x1;for(let _0x7dcb70=0x1;_0x19aaf1[_0x3f0959(0x180)](_0x7dcb70,_0x56dbdb);_0x7dcb70++){_0x11734c=_0x11734c*0x100+_0x32ccfc[_0x2f964+_0x7dcb70];}return[_0x11734c,_0x56dbdb];}function readId(_0x5e65a8,_0x4fee58){const _0xd9891a=_0x3359,_0x565dfb={'OIrXt':function(_0x115419,_0x592f79){return _0x115419>=_0x592f79;},'XtdbR':function(_0x4f636a,_0x542b06){return _0x4f636a>=_0x542b06;},'oFIRj':function(_0x2beea4,_0x24847){return _0x2beea4>_0x24847;},'rKxYA':function(_0x7f6e18,_0x30e40f){return _0x7f6e18+_0x30e40f;},'LdQGC':function(_0x3cecab,_0xe28a72){return _0x3cecab<_0xe28a72;},'GkPXl':function(_0x50ad08,_0x103803){return _0x50ad08+_0x103803;},'rrRuU':function(_0x44f87f,_0x2aaf43){return _0x44f87f*_0x2aaf43;},'sIJVw':function(_0x1849b2,_0x4ba796){return _0x1849b2+_0x4ba796;}};if(_0x565dfb[_0xd9891a(0x16c)](_0x4fee58,_0x5e65a8['length']))return[0x0,0x0];const _0x503dda=_0x5e65a8[_0x4fee58];let _0x2e3aee;if(_0x565dfb['XtdbR'](_0x503dda,0x80))_0x2e3aee=0x1;else{if(_0x503dda>=0x40)_0x2e3aee=0x2;else{if(_0x503dda>=0x20)_0x2e3aee=0x3;else{if(_0x503dda>=0x10)_0x2e3aee=0x4;else return[_0x503dda,0x1];}}}if(_0x565dfb['oFIRj'](_0x565dfb['rKxYA'](_0x4fee58,_0x2e3aee),_0x5e65a8[_0xd9891a(0x18c)]))return[0x0,0x0];let _0x5dce4d=0x0;for(let _0x2fec37=0x0;_0x565dfb['LdQGC'](_0x2fec37,_0x2e3aee);_0x2fec37++){_0x5dce4d=_0x565dfb['GkPXl'](_0x565dfb['rrRuU'](_0x5dce4d,0x100),_0x5e65a8[_0x565dfb[_0xd9891a(0x17d)](_0x4fee58,_0x2fec37)]);}return[_0x5dce4d,_0x2e3aee];}function _0x3359(_0x4bfb34,_0x450d36){_0x4bfb34=_0x4bfb34-0x15b;const _0x24f2cd=_0x24f2();let _0x3359dc=_0x24f2cd[_0x4bfb34];return _0x3359dc;}function readUint(_0x881ba9,_0x102d89,_0x53772e){const _0x440aa8=_0x3359,_0x52bc9c={'aIRcA':function(_0x59db1c,_0x197669){return _0x59db1c<_0x197669;},'qzeUa':function(_0x3461ba,_0x49b132){return _0x3461ba*_0x49b132;}};let _0x4c61b9=0x0;for(let _0x172946=0x0;_0x52bc9c[_0x440aa8(0x195)](_0x172946,_0x53772e);_0x172946++){_0x4c61b9=_0x52bc9c[_0x440aa8(0x17a)](_0x4c61b9,0x100)+_0x881ba9[_0x102d89+_0x172946];}return _0x4c61b9;}function isUnknownSize(_0x3ec849,_0x3abc87){const _0x5e6d47=_0x3359,_0x162473={'fDPcy':function(_0x4e8ae6,_0x1bea67){return _0x4e8ae6*_0x1bea67;}};return _0x3ec849===Math[_0x5e6d47(0x15b)](0x2,_0x162473['fDPcy'](0x7,_0x3abc87))-0x1;}function writeVint(_0x50e4a4,_0x2e5e87){const _0x36b762=_0x3359,_0x57d5cc={'rybDk':function(_0x42f3e6,_0x83745b){return _0x42f3e6<_0x83745b;},'zqiXv':function(_0x3b95f9,_0x4c347d){return _0x3b95f9&_0x4c347d;},'LknCX':function(_0x22a956,_0x2b9878){return _0x22a956<<_0x2b9878;},'gJYCP':function(_0x3f0708,_0x390a77){return _0x3f0708-_0x390a77;}};let _0x28e568=_0x2e5e87||0x1;while(_0x57d5cc['rybDk'](Math[_0x36b762(0x15b)](0x2,0x7*_0x28e568)-0x2,_0x50e4a4))_0x28e568++;const _0x2704a7=Buffer[_0x36b762(0x188)](_0x28e568);for(let _0x5bbf05=_0x28e568-0x1;_0x5bbf05>=0x0;_0x5bbf05--){_0x2704a7[_0x5bbf05]=_0x57d5cc[_0x36b762(0x15c)](_0x50e4a4,0xff),_0x50e4a4=Math[_0x36b762(0x1a0)](_0x50e4a4/0x100);}return _0x2704a7[0x0]|=_0x57d5cc['LknCX'](0x1,_0x57d5cc['gJYCP'](0x8,_0x28e568)),_0x2704a7;}function writeUint(_0x30e05e,_0x50baf3){const _0x3995a7=_0x3359,_0x2ec157={'IYHSH':function(_0x4c6a15,_0x120803){return _0x4c6a15&_0x120803;},'NTHnR':function(_0x790c54,_0x50d794){return _0x790c54/_0x50d794;}},_0x2528fd=Buffer[_0x3995a7(0x188)](_0x50baf3);for(let _0x374e2d=_0x50baf3-0x1;_0x374e2d>=0x0;_0x374e2d--){_0x2528fd[_0x374e2d]=_0x2ec157[_0x3995a7(0x19f)](_0x30e05e,0xff),_0x30e05e=Math['floor'](_0x2ec157['NTHnR'](_0x30e05e,0x100));}return _0x2528fd;}function writeUnknownSizeVint(_0x50fa11){const _0x3243af=_0x3359,_0x18055c={'YQLPV':function(_0x1f7117,_0x4633e8){return _0x1f7117-_0x4633e8;}},_0x5f5736=Buffer['alloc'](_0x50fa11,0xff);return _0x5f5736[0x0]=0xff>>_0x18055c[_0x3243af(0x1a1)](_0x50fa11,0x1),_0x5f5736;}function uintSize(_0x24c2f0){const _0x1872de=_0x3359,_0x508ebb={'nWEEy':function(_0x5c3866,_0x320731){return _0x5c3866/_0x320731;}};if(_0x24c2f0===0x0)return 0x1;let _0x460dec=0x0,_0x10f9f2=_0x24c2f0;while(_0x10f9f2>0x0){_0x460dec++,_0x10f9f2=Math['floor'](_0x508ebb[_0x1872de(0x198)](_0x10f9f2,0x100));}return _0x460dec;}function findTimestampScale(_0x4bb20e,_0xa983aa){const _0x5bff61=_0x3359,_0x2b3ddd={'FoRCi':function(_0x34968b,_0xd0bcbf){return _0x34968b+_0xd0bcbf;},'SNUfH':function(_0xf39b9b,_0x5d915c){return _0xf39b9b<_0x5d915c;},'OtKRr':function(_0x2cc902,_0x48d6f8,_0x1e8222){return _0x2cc902(_0x48d6f8,_0x1e8222);},'zJPsR':function(_0x2c0c01,_0xa457fb){return _0x2c0c01===_0xa457fb;},'KpBBE':function(_0xd1206b,_0x500088){return _0xd1206b+_0x500088;},'xmTiS':function(_0x7e4963,_0x139d3a,_0x1583bb,_0x13126b){return _0x7e4963(_0x139d3a,_0x1583bb,_0x13126b);},'LIyWC':function(_0x29edfb,_0x18d103){return _0x29edfb+_0x18d103;},'MDaxF':function(_0x541b2b,_0x16ef45){return _0x541b2b+_0x16ef45;}};let _0x5d56c9=_0xa983aa;const _0xa7ccf7=Math[_0x5bff61(0x169)](_0x4bb20e['length'],_0x2b3ddd['FoRCi'](_0xa983aa,0x2710));while(_0x2b3ddd[_0x5bff61(0x15f)](_0x5d56c9,_0xa7ccf7)){const [_0x5da076,_0x4504cb]=readId(_0x4bb20e,_0x5d56c9),[_0x805fae,_0x6246a7]=_0x2b3ddd[_0x5bff61(0x19c)](readVint,_0x4bb20e,_0x2b3ddd['FoRCi'](_0x5d56c9,_0x4504cb));if(_0x2b3ddd['zJPsR'](_0x5da076,ID_INFO)){let _0x5ad405=_0x2b3ddd['FoRCi'](_0x2b3ddd['KpBBE'](_0x5d56c9,_0x4504cb),_0x6246a7);const _0x25b9a7=_0x5ad405+_0x805fae;while(_0x5ad405<_0x25b9a7){const [_0x35af89,_0x139837]=readId(_0x4bb20e,_0x5ad405),[_0x502ab6,_0x1248c3]=readVint(_0x4bb20e,_0x2b3ddd[_0x5bff61(0x16f)](_0x5ad405,_0x139837));if(_0x35af89===ID_TIMESTAMP_SCALE)return _0x2b3ddd['xmTiS'](readUint,_0x4bb20e,_0x2b3ddd[_0x5bff61(0x186)](_0x5ad405,_0x139837)+_0x1248c3,_0x502ab6);_0x5ad405+=_0x2b3ddd[_0x5bff61(0x17b)](_0x139837,_0x1248c3)+_0x502ab6;}break;}if(_0x5da076===ID_CLUSTER)break;if(isUnknownSize(_0x805fae,_0x6246a7))break;_0x5d56c9+=_0x2b3ddd['LIyWC'](_0x2b3ddd['MDaxF'](_0x4504cb,_0x6246a7),_0x805fae);}return 0xf4240;}function findFirstClusterOffset(_0x5be775,_0x3dc296){const _0x247881=_0x3359,_0x319d70={'lrJmN':function(_0x4ff176,_0x535d89,_0xa8cfd){return _0x4ff176(_0x535d89,_0xa8cfd);},'bkomA':function(_0x2c2a3d,_0x52a3bc){return _0x2c2a3d+_0x52a3bc;},'gZaWF':function(_0x2eb57b,_0x133950){return _0x2eb57b+_0x133950;}};let _0x25a3ba=_0x3dc296;while(_0x25a3ba<_0x5be775[_0x247881(0x18c)]){const [_0x396240,_0x49ba62]=_0x319d70['lrJmN'](readId,_0x5be775,_0x25a3ba);if(_0x396240===ID_CLUSTER)return _0x25a3ba;const [_0x324cb6,_0x5a50ff]=readVint(_0x5be775,_0x25a3ba+_0x49ba62);if(_0x319d70['lrJmN'](isUnknownSize,_0x324cb6,_0x5a50ff))return _0x25a3ba;_0x25a3ba+=_0x319d70['bkomA'](_0x319d70[_0x247881(0x18e)](_0x49ba62,_0x5a50ff),_0x324cb6);}return _0x5be775['length'];}function findClusterEnd(_0xc175c7,_0x329923,_0x33aaef,_0x54b816){const _0x5b2e93=_0x3359,_0x49b077={'KbhlX':function(_0x51f748,_0x50ca80,_0x2d51a4){return _0x51f748(_0x50ca80,_0x2d51a4);},'mvvXP':function(_0x4de6c7,_0xaeec26){return _0x4de6c7+_0xaeec26;},'cwDpO':function(_0x3b5485,_0xe30e90){return _0x3b5485<_0xe30e90;},'LrcIC':function(_0x8c9107,_0x29420f,_0x289863){return _0x8c9107(_0x29420f,_0x289863);},'BFuxB':function(_0x887408,_0x29273d,_0x32ed71){return _0x887408(_0x29273d,_0x32ed71);},'mUQUf':function(_0x150576,_0x5343d1){return _0x150576+_0x5343d1;}};if(!_0x49b077[_0x5b2e93(0x17c)](isUnknownSize,_0x33aaef,_0x54b816))return _0x49b077[_0x5b2e93(0x160)](_0x329923,_0x33aaef);const _0x58bd4e=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x2c2b9b=_0x329923;while(_0x49b077[_0x5b2e93(0x174)](_0x2c2b9b,_0xc175c7[_0x5b2e93(0x18c)]-0x4)){const [_0x2b2330,_0x36b8b9]=_0x49b077['LrcIC'](readId,_0xc175c7,_0x2c2b9b);if(_0x58bd4e[_0x5b2e93(0x179)](_0x2b2330))return _0x2c2b9b;const [_0xeaa6d8,_0x311b55]=_0x49b077[_0x5b2e93(0x17f)](readVint,_0xc175c7,_0x49b077['mUQUf'](_0x2c2b9b,_0x36b8b9));if(isUnknownSize(_0xeaa6d8,_0x311b55))return _0xc175c7['length'];_0x2c2b9b+=_0x49b077[_0x5b2e93(0x168)](_0x36b8b9,_0x311b55)+_0xeaa6d8;}return _0xc175c7[_0x5b2e93(0x18c)];}function extractClusters(_0x952387,_0x405059){const _0x2074a0=_0x3359,_0x4ed268={'NzxRS':function(_0x1f9f92,_0x7523c8){return _0x1f9f92===_0x7523c8;},'bEBTa':function(_0x5250ea,_0x4652df,_0x14269a){return _0x5250ea(_0x4652df,_0x14269a);},'doQYr':function(_0x52f268,_0x358fbc){return _0x52f268+_0x358fbc;},'rKKPy':function(_0x28ddab,_0x47eee9){return _0x28ddab<_0x47eee9;},'PqcsF':function(_0x1d7968,_0x1c8480){return _0x1d7968===_0x1c8480;},'ckHks':function(_0x3ee25d,_0x10c96b,_0x4ab819,_0x4adbd0){return _0x3ee25d(_0x10c96b,_0x4ab819,_0x4adbd0);},'YRTEH':function(_0x5876be,_0x53711f){return _0x5876be+_0x53711f;},'monjg':function(_0x33007e,_0x147e44){return _0x33007e+_0x147e44;},'UwEAx':function(_0x2b45b6,_0x57ad42,_0x12b918){return _0x2b45b6(_0x57ad42,_0x12b918);},'GdTQs':function(_0x1d8e79,_0x2f1e4a){return _0x1d8e79+_0x2f1e4a;},'GITcD':function(_0x11c7a8,_0x38116c){return _0x11c7a8>=_0x38116c;},'lewTW':function(_0x284a67,_0x3f9b53){return _0x284a67>_0x3f9b53;},'XDHfq':function(_0x592604,_0x1dedf8,_0x56052f){return _0x592604(_0x1dedf8,_0x56052f);},'cDXJO':function(_0x3ffec5,_0x31d42b){return _0x3ffec5+_0x31d42b;}},_0x42f794=[],_0x5738b8=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x2ad3bc=0x0;while(_0x2ad3bc<_0x952387[_0x2074a0(0x18c)]){const _0x25c8d6=_0x952387['indexOf'](_0x5738b8,_0x2ad3bc);if(_0x4ed268[_0x2074a0(0x185)](_0x25c8d6,-0x1))break;const [_0x5f7639,_0x55ac68]=_0x4ed268['bEBTa'](readId,_0x952387,_0x25c8d6);if(_0x5f7639!==ID_CLUSTER){_0x2ad3bc=_0x25c8d6+0x1;continue;}const [_0x40e817,_0x4c63dd]=readVint(_0x952387,_0x4ed268['doQYr'](_0x25c8d6,_0x55ac68)),_0x428b46=_0x4ed268['doQYr'](_0x4ed268['doQYr'](_0x25c8d6,_0x55ac68),_0x4c63dd),_0x4b6dea=findClusterEnd(_0x952387,_0x428b46,_0x40e817,_0x4c63dd);let _0x1553ae=_0x428b46,_0x541b90=0x0,_0x4c699f=0x2,_0x501b28=![],_0x574295=Buffer[_0x2074a0(0x188)](0x0),_0x202b4b=Buffer['alloc'](0x0);while(_0x4ed268[_0x2074a0(0x165)](_0x1553ae,_0x4b6dea)){const [_0x5833d3,_0x83171d]=readId(_0x952387,_0x1553ae),[_0x5c8636,_0x778130]=_0x4ed268['bEBTa'](readVint,_0x952387,_0x1553ae+_0x83171d);if(_0x4ed268[_0x2074a0(0x18a)](_0x5833d3,ID_TIMESTAMP)){_0x541b90=_0x4ed268[_0x2074a0(0x193)](readUint,_0x952387,_0x4ed268[_0x2074a0(0x171)](_0x4ed268['monjg'](_0x1553ae,_0x83171d),_0x778130),_0x5c8636),_0x4c699f=_0x5c8636,_0x501b28=!![],_0x574295=_0x952387['slice'](_0x428b46,_0x1553ae);const _0x537498=_0x1553ae+_0x83171d+_0x778130+_0x5c8636;_0x202b4b=_0x952387[_0x2074a0(0x183)](_0x537498,_0x4b6dea);break;}if(_0x5833d3===ID_CLUSTER)break;if(_0x4ed268['bEBTa'](isUnknownSize,_0x5c8636,_0x778130))break;_0x1553ae+=_0x83171d+_0x778130+_0x5c8636;}!_0x501b28&&(_0x202b4b=_0x952387[_0x2074a0(0x183)](_0x428b46,_0x4b6dea));let _0x24a8af=_0x541b90;_0x1553ae=_0x428b46;while(_0x1553ae<_0x4b6dea){const [_0x3d1505,_0x342a26]=_0x4ed268['UwEAx'](readId,_0x952387,_0x1553ae),[_0xf1ace2,_0x36fc41]=_0x4ed268['UwEAx'](readVint,_0x952387,_0x4ed268['GdTQs'](_0x1553ae,_0x342a26));if(_0x3d1505===ID_SIMPLE_BLOCK&&_0x4ed268['GITcD'](_0xf1ace2,0x4)){const _0x25f0e1=_0x1553ae+_0x342a26+_0x36fc41,[,_0x18bc8e]=readVint(_0x952387,_0x25f0e1),_0x1a29b2=_0x952387['readInt16BE'](_0x25f0e1+_0x18bc8e),_0x1fff63=_0x4ed268[_0x2074a0(0x15e)](_0x541b90,_0x1a29b2);if(_0x4ed268[_0x2074a0(0x163)](_0x1fff63,_0x24a8af))_0x24a8af=_0x1fff63;}if(_0x3d1505===ID_CLUSTER)break;if(_0x4ed268['XDHfq'](isUnknownSize,_0xf1ace2,_0x36fc41))break;_0x1553ae+=_0x4ed268[_0x2074a0(0x171)](_0x4ed268[_0x2074a0(0x182)](_0x342a26,_0x36fc41),_0xf1ace2);}_0x42f794['push']({'timestamp':_0x541b90,'maxTicks':_0x24a8af,'bodyBeforeTimestamp':_0x574295,'bodyAfterTimestamp':_0x202b4b,'timestampElementSize':_0x4c699f}),_0x2ad3bc=_0x4b6dea;}return _0x42f794;}function parseWebm(_0x37c927){const _0x51a8f3=_0x3359,_0x227dd9={'hBUTO':function(_0x3d6e2a,_0x3ced17,_0x455cb8){return _0x3d6e2a(_0x3ced17,_0x455cb8);},'XoTef':function(_0x236dad,_0x201465){return _0x236dad+_0x201465;},'QqvqA':function(_0x45e8ed,_0x664bd4){return _0x45e8ed!==_0x664bd4;},'ZpLrj':function(_0xb764b9,_0x5b429c,_0x453d8b){return _0xb764b9(_0x5b429c,_0x453d8b);},'lymEa':function(_0x4b9b92,_0x43d1dd){return _0x4b9b92>_0x43d1dd;}};let _0x1840e6=0x0;const [,_0x117fc5]=_0x227dd9['hBUTO'](readId,_0x37c927,_0x1840e6),[_0x15719f,_0x40c5de]=_0x227dd9[_0x51a8f3(0x181)](readVint,_0x37c927,_0x227dd9[_0x51a8f3(0x189)](_0x1840e6,_0x117fc5));_0x1840e6+=_0x117fc5+_0x40c5de+_0x15719f;const [_0x10c87b,_0xa14221]=readId(_0x37c927,_0x1840e6);if(_0x227dd9['QqvqA'](_0x10c87b,ID_SEGMENT))return null;const [,_0x12aa10]=readVint(_0x37c927,_0x1840e6+_0xa14221),_0x327e5f=_0x1840e6+_0xa14221+_0x12aa10,_0x2f7446=_0x227dd9['ZpLrj'](findTimestampScale,_0x37c927,_0x327e5f),_0x62eb59=_0x227dd9[_0x51a8f3(0x19a)](findFirstClusterOffset,_0x37c927,_0x327e5f),_0x34c15e=_0x37c927[_0x51a8f3(0x183)](0x0,_0x62eb59),_0x11c005=extractClusters(_0x37c927,_0x2f7446);let _0x45ffba=0x0;for(const _0x208813 of _0x11c005){if(_0x227dd9['lymEa'](_0x208813[_0x51a8f3(0x172)],_0x45ffba))_0x45ffba=_0x208813[_0x51a8f3(0x172)];}return{'header':_0x34c15e,'clusters':_0x11c005,'timestampScale':_0x2f7446,'maxTimestampTicks':_0x45ffba};}function buildCluster(_0x5abf20,_0x1272ef,_0x1bc73d){const _0x47e57b=_0x3359,_0x59bae4={'jXyaj':function(_0x284c5e,_0x94fca4,_0x511e90){return _0x284c5e(_0x94fca4,_0x511e90);},'yJTuu':function(_0x12f811,_0x47279b){return _0x12f811(_0x47279b);}},_0x197fc6=Buffer[_0x47e57b(0x196)]([0x1f,0x43,0xb6,0x75]),_0x3655fc=Math[_0x47e57b(0x164)](0x4,uintSize(_0x5abf20)),_0x4aa878=Buffer[_0x47e57b(0x16b)]([Buffer['from']([ID_TIMESTAMP]),writeVint(_0x3655fc),_0x59bae4[_0x47e57b(0x162)](writeUint,_0x5abf20,_0x3655fc)]),_0x5eb4b0=Buffer['concat']([_0x1272ef,_0x4aa878,_0x1bc73d]),_0x26fdfd=_0x59bae4[_0x47e57b(0x16a)](writeVint,_0x5eb4b0['length']);return Buffer['concat']([_0x197fc6,_0x26fdfd,_0x5eb4b0]);}const ID_DURATION=0x4489;function _0x24f2(){const _0x3c23ae=['ckHks','4VxyciW','aIRcA','from','KGSZJ','nWEEy','QSukb','ZpLrj','1760575JMmiAD','OtKRr','endsWith','push','IYHSH','floor','YQLPV','pow','zqiXv','pirLY','doQYr','SNUfH','mvvXP','7252400MncqtV','jXyaj','lewTW','max','rKKPy','sbdBL','\x20files\x20->\x20','mUQUf','min','yJTuu','concat','OIrXt','2533158jsvYhv','timestamp','FoRCi','log','YRTEH','maxTicks','hDvBt','cwDpO','argv','WKQwo','clusters','stitchWebmFiles.js','has','qzeUa','LIyWC','KbhlX','sIJVw','BssOH','BFuxB','GLojL','hBUTO','cDXJO','slice','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','NzxRS','KpBBE','stitchWebmFiles.ts','alloc','XoTef','PqcsF','6259816sLyLdb','length','3209320oYIMPU','gZaWF','9602784LYRRDF','1438221iEfytD','7CglWlS','error'];_0x24f2=function(){return _0x3c23ae;};return _0x24f2();}function rebuildHeaderWithoutDuration(_0x56bea5){const _0x3a8c2e=_0x3359,_0x36eb21={'sbdBL':function(_0x34a226,_0x11eeb7,_0x980c5c){return _0x34a226(_0x11eeb7,_0x980c5c);},'jfFcw':function(_0x4ee270,_0x3cfd60){return _0x4ee270+_0x3cfd60;},'QSukb':function(_0x42362c,_0x590c14){return _0x42362c+_0x590c14;},'ouVmv':function(_0x3294aa,_0x289693){return _0x3294aa(_0x289693);},'pirLY':function(_0x15fe7c,_0x42eb3d){return _0x15fe7c+_0x42eb3d;},'KGSZJ':function(_0x276e51,_0x442821){return _0x276e51<_0x442821;},'xrkFg':function(_0x214128,_0x5bcbb3,_0x52449e){return _0x214128(_0x5bcbb3,_0x52449e);}},_0xe0f1cb=Buffer[_0x3a8c2e(0x196)](_0x56bea5);let _0x2b99e4=0x0;const [,_0x52d28b]=_0x36eb21['sbdBL'](readId,_0xe0f1cb,_0x2b99e4),[_0x235378,_0x29b71a]=readVint(_0xe0f1cb,_0x36eb21['jfFcw'](_0x2b99e4,_0x52d28b)),_0x166d11=_0x36eb21['jfFcw'](_0x36eb21[_0x3a8c2e(0x199)](_0x2b99e4,_0x52d28b)+_0x29b71a,_0x235378),[,_0x14d96d]=readId(_0xe0f1cb,_0x166d11),[,_0x157a45]=readVint(_0xe0f1cb,_0x166d11+_0x14d96d),_0x56431b=_0x166d11+_0x14d96d+_0x157a45,_0x1a0eb9=_0x36eb21['ouVmv'](writeUnknownSizeVint,_0x157a45);_0x1a0eb9['copy'](_0xe0f1cb,_0x36eb21[_0x3a8c2e(0x15d)](_0x166d11,_0x14d96d));let _0x1f9646=_0x56431b;const _0x2b79ec=Math['min'](_0xe0f1cb[_0x3a8c2e(0x18c)],_0x56431b+0x2710);while(_0x1f9646<_0x2b79ec){const [_0x219c11,_0x172c41]=_0x36eb21[_0x3a8c2e(0x166)](readId,_0xe0f1cb,_0x1f9646),[_0x288119,_0x4fd81d]=readVint(_0xe0f1cb,_0x1f9646+_0x172c41);if(_0x219c11===ID_CLUSTER)break;if(isUnknownSize(_0x288119,_0x4fd81d))break;if(_0x219c11===ID_INFO){const _0x3bceb2=_0x1f9646+_0x172c41+_0x4fd81d,_0x2f9a9a=_0x3bceb2+_0x288119,_0xc8339e=[];let _0x508c1b=_0x3bceb2;while(_0x36eb21[_0x3a8c2e(0x197)](_0x508c1b,_0x2f9a9a)){const [_0x407848,_0xea7521]=_0x36eb21['xrkFg'](readId,_0xe0f1cb,_0x508c1b),[_0x35b9f8,_0x2ae824]=readVint(_0xe0f1cb,_0x508c1b+_0xea7521),_0x10d6d9=_0xea7521+_0x2ae824+_0x35b9f8;_0x407848!==ID_DURATION&&_0xc8339e[_0x3a8c2e(0x19e)](_0xe0f1cb[_0x3a8c2e(0x183)](_0x508c1b,_0x508c1b+_0x10d6d9)),_0x508c1b+=_0x10d6d9;}const _0x11a280=Buffer[_0x3a8c2e(0x16b)](_0xc8339e),_0x2e095d=Buffer[_0x3a8c2e(0x16b)]([_0xe0f1cb[_0x3a8c2e(0x183)](_0x1f9646,_0x36eb21['pirLY'](_0x1f9646,_0x172c41)),writeVint(_0x11a280[_0x3a8c2e(0x18c)],_0x4fd81d)]);return Buffer[_0x3a8c2e(0x16b)]([_0xe0f1cb['slice'](0x0,_0x1f9646),_0x2e095d,_0x11a280,_0xe0f1cb[_0x3a8c2e(0x183)](_0x2f9a9a)]);}_0x1f9646+=_0x172c41+_0x4fd81d+_0x288119;}return _0xe0f1cb;}export function stitchWebmFiles(_0xe09877,_0x7365e7){const _0x38f5aa=_0x3359,_0xf5184f={'WKQwo':function(_0x2826bb,_0x4d5e06,_0x14200f){return _0x2826bb(_0x4d5e06,_0x14200f);}};if(_0xe09877['length']<=0x1)return![];const _0x30dfac=[];for(const _0x4c7552 of _0xe09877){const _0x5b9d9e=readFileSync(_0x4c7552),_0x4ed3b2=parseWebm(_0x5b9d9e);if(!_0x4ed3b2||_0x4ed3b2[_0x38f5aa(0x177)]['length']===0x0)return![];_0x30dfac[_0x38f5aa(0x19e)](_0x4ed3b2);}const _0x17cfcb=_0x30dfac[0x0],_0x44a7c6=rebuildHeaderWithoutDuration(_0x17cfcb['header']),_0x1ddd16=[_0x44a7c6];let _0x4ad6b9=0x0;for(let _0x2fc192=0x0;_0x2fc192<_0x30dfac[_0x38f5aa(0x18c)];_0x2fc192++){const _0x1d114e=_0x30dfac[_0x2fc192];for(const _0x54bb93 of _0x1d114e['clusters']){const _0x2661dd=_0x54bb93[_0x38f5aa(0x16e)]+_0x4ad6b9;_0x1ddd16[_0x38f5aa(0x19e)](buildCluster(_0x2661dd,_0x54bb93['bodyBeforeTimestamp'],_0x54bb93['bodyAfterTimestamp']));}const _0x50b41f=0x1e;_0x4ad6b9+=_0x1d114e['maxTimestampTicks']+_0x50b41f;}return _0xf5184f[_0x38f5aa(0x176)](writeFileSync,_0x7365e7,Buffer['concat'](_0x1ddd16)),!![];}if(process[_0x3d9620(0x175)][0x1]?.['endsWith'](_0x3d9620(0x187))||process[_0x3d9620(0x175)][0x1]?.[_0x3d9620(0x19d)](_0x3d9620(0x178))){const args=process[_0x3d9620(0x175)]['slice'](0x2);args['length']<0x3&&(console[_0x3d9620(0x192)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x3d9620(0x18c)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x3d9620(0x170)]('Stitched\x20'+inputs['length']+_0x3d9620(0x167)+output):console['log'](_0x3d9620(0x184));}
|
|
1
|
+
const _0x2b7c78=_0x7c44;function _0x7c44(_0x83b60a,_0x38f01e){_0x83b60a=_0x83b60a-0x180;const _0x28f1af=_0x28f1();let _0x7c4420=_0x28f1af[_0x83b60a];return _0x7c4420;}(function(_0x1ff96b,_0x353339){const _0x22aa38=_0x7c44,_0x3ffdba=_0x1ff96b();while(!![]){try{const _0x5c8354=parseInt(_0x22aa38(0x18b))/0x1*(parseInt(_0x22aa38(0x1b1))/0x2)+parseInt(_0x22aa38(0x1b9))/0x3*(-parseInt(_0x22aa38(0x1bd))/0x4)+parseInt(_0x22aa38(0x1a2))/0x5+parseInt(_0x22aa38(0x1bb))/0x6+-parseInt(_0x22aa38(0x1b0))/0x7*(-parseInt(_0x22aa38(0x181))/0x8)+parseInt(_0x22aa38(0x1ae))/0x9*(parseInt(_0x22aa38(0x1ba))/0xa)+parseInt(_0x22aa38(0x18d))/0xb*(-parseInt(_0x22aa38(0x195))/0xc);if(_0x5c8354===_0x353339)break;else _0x3ffdba['push'](_0x3ffdba['shift']());}catch(_0x5bb9f6){_0x3ffdba['push'](_0x3ffdba['shift']());}}}(_0x28f1,0x808b5));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(_0x121084,_0x553f19){const _0x4ab8e5=_0x7c44,_0x3c3f57={'QhElV':function(_0x107d06,_0xd881ba){return _0x107d06&_0xd881ba;},'lqZbl':function(_0x17508c,_0x25b8e9){return _0x17508c+_0x25b8e9;},'NSAMl':function(_0xad7d9d,_0x1f41b6){return _0xad7d9d&_0x1f41b6;},'qJihl':function(_0x8c1c1,_0x366ea3){return _0x8c1c1*_0x366ea3;}};if(_0x553f19>=_0x121084[_0x4ab8e5(0x1a6)])return[0x0,0x0];const _0xd379fb=_0x121084[_0x553f19];let _0x5a8b0f=0x1,_0x23baa=0x80;while(_0x5a8b0f<=0x8&&!_0x3c3f57['QhElV'](_0xd379fb,_0x23baa)){_0x5a8b0f++,_0x23baa>>=0x1;}if(_0x3c3f57[_0x4ab8e5(0x19d)](_0x553f19,_0x5a8b0f)>_0x121084['length'])return[0x0,0x0];let _0x2b26c6=_0x3c3f57['NSAMl'](_0xd379fb,_0x23baa-0x1);for(let _0x478137=0x1;_0x478137<_0x5a8b0f;_0x478137++){_0x2b26c6=_0x3c3f57['qJihl'](_0x2b26c6,0x100)+_0x121084[_0x553f19+_0x478137];}return[_0x2b26c6,_0x5a8b0f];}function readId(_0x4c433a,_0x4cd976){const _0xb62ca1={'lHvJC':function(_0x503a9c,_0x13503a){return _0x503a9c>=_0x13503a;},'EoGdt':function(_0x27b359,_0x4c4556){return _0x27b359>_0x4c4556;},'vUFIh':function(_0x4b3947,_0x521810){return _0x4b3947+_0x521810;},'TZYgE':function(_0x41ea6b,_0x1c902d){return _0x41ea6b*_0x1c902d;},'xHoYq':function(_0x4e944f,_0x56bc2b){return _0x4e944f+_0x56bc2b;}};if(_0x4cd976>=_0x4c433a['length'])return[0x0,0x0];const _0x4e6698=_0x4c433a[_0x4cd976];let _0x4e6b08;if(_0x4e6698>=0x80)_0x4e6b08=0x1;else{if(_0x4e6698>=0x40)_0x4e6b08=0x2;else{if(_0xb62ca1['lHvJC'](_0x4e6698,0x20))_0x4e6b08=0x3;else{if(_0x4e6698>=0x10)_0x4e6b08=0x4;else return[_0x4e6698,0x1];}}}if(_0xb62ca1['EoGdt'](_0xb62ca1['vUFIh'](_0x4cd976,_0x4e6b08),_0x4c433a['length']))return[0x0,0x0];let _0x58c3f5=0x0;for(let _0x26fcb3=0x0;_0x26fcb3<_0x4e6b08;_0x26fcb3++){_0x58c3f5=_0xb62ca1['TZYgE'](_0x58c3f5,0x100)+_0x4c433a[_0xb62ca1['xHoYq'](_0x4cd976,_0x26fcb3)];}return[_0x58c3f5,_0x4e6b08];}function _0x28f1(){const _0x5865b9=['Heatq','push','1140IEcEPK','dLzkX','AtHXR','QhEEC','JIUCm','hzraJ','error','TvySN','lqZbl','from','QPmrQ','Stitched\x20','maxTicks','4051470UYUzPp','WBoOk','uIlmP','xktZp','length','Vguwv','MIRyg','rBNJv','DoBJm','indexOf','LHueu','timestamp','22455JIBrWZ','bodyAfterTimestamp','357nxwSUF','10tKuzIN','XPOYO','CMVEX','vUcSe','myjye','MClPI','log','NqORe','1383zrmQyX','1370hkEsjN','567696QQGihD','clusters','7084aPDRvU','has','\x20files\x20->\x20','ltEht','NXRID','edaIg','pkoHK','51784JVmrGY','cvTWB','kCEzp','TngaA','alloc','ZXDNI','iyBFP','concat','min','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','184241zIiztJ','dKIPY','133749llyKYz','joWGb','dkNdo','floor','slice','copy'];_0x28f1=function(){return _0x5865b9;};return _0x28f1();}function readUint(_0x498ead,_0x2cee22,_0x4e0924){const _0x4ff5f0={'itZTc':function(_0x40dae5,_0xa89562){return _0x40dae5+_0xa89562;},'CtFEN':function(_0x315f52,_0x348e65){return _0x315f52*_0x348e65;}};let _0x34f20b=0x0;for(let _0x31f9fd=0x0;_0x31f9fd<_0x4e0924;_0x31f9fd++){_0x34f20b=_0x4ff5f0['itZTc'](_0x4ff5f0['CtFEN'](_0x34f20b,0x100),_0x498ead[_0x2cee22+_0x31f9fd]);}return _0x34f20b;}function isUnknownSize(_0x14026c,_0x1519ab){const _0x46cf0d=_0x7c44,_0x36b9ee={'lTxBn':function(_0x554899,_0x4b1fa0){return _0x554899===_0x4b1fa0;},'Heatq':function(_0x1ec506,_0x2e0d7e){return _0x1ec506-_0x2e0d7e;},'OFFQm':function(_0xc91ed1,_0xab97a6){return _0xc91ed1*_0xab97a6;}};return _0x36b9ee['lTxBn'](_0x14026c,_0x36b9ee[_0x46cf0d(0x193)](Math['pow'](0x2,_0x36b9ee['OFFQm'](0x7,_0x1519ab)),0x1));}function writeVint(_0x298e03,_0x14b6fa){const _0x477ab6=_0x7c44,_0x242c2c={'myjye':function(_0x3ef728,_0x351904){return _0x3ef728>=_0x351904;},'XeYvD':function(_0x497f3d,_0x2d617e){return _0x497f3d/_0x2d617e;},'kCEzp':function(_0x5461ba,_0x1f447a){return _0x5461ba-_0x1f447a;}};let _0x2b2c30=_0x14b6fa||0x1;while(Math['pow'](0x2,0x7*_0x2b2c30)-0x2<_0x298e03)_0x2b2c30++;const _0x5d5671=Buffer['alloc'](_0x2b2c30);for(let _0xb638e3=_0x2b2c30-0x1;_0x242c2c[_0x477ab6(0x1b5)](_0xb638e3,0x0);_0xb638e3--){_0x5d5671[_0xb638e3]=_0x298e03&0xff,_0x298e03=Math['floor'](_0x242c2c['XeYvD'](_0x298e03,0x100));}return _0x5d5671[0x0]|=0x1<<_0x242c2c[_0x477ab6(0x183)](0x8,_0x2b2c30),_0x5d5671;}function writeUint(_0x4712e6,_0x31bc84){const _0xf4f283=_0x7c44,_0x435b0b={'XPOYO':function(_0x23773e,_0x269ef7){return _0x23773e-_0x269ef7;},'oRlnA':function(_0x1c2f14,_0x1b5e7f){return _0x1c2f14>=_0x1b5e7f;},'Tcnub':function(_0x52be76,_0x215e7c){return _0x52be76/_0x215e7c;}},_0x1b9f86=Buffer['alloc'](_0x31bc84);for(let _0x169fb6=_0x435b0b[_0xf4f283(0x1b2)](_0x31bc84,0x1);_0x435b0b['oRlnA'](_0x169fb6,0x0);_0x169fb6--){_0x1b9f86[_0x169fb6]=_0x4712e6&0xff,_0x4712e6=Math[_0xf4f283(0x190)](_0x435b0b['Tcnub'](_0x4712e6,0x100));}return _0x1b9f86;}function writeUnknownSizeVint(_0x166744){const _0x59bb6b=Buffer['alloc'](_0x166744,0xff);return _0x59bb6b[0x0]=0xff>>_0x166744-0x1,_0x59bb6b;}function uintSize(_0x1e0023){const _0x3b7b2e=_0x7c44,_0x3cb0e9={'RXRcj':function(_0x35d0c2,_0x458961){return _0x35d0c2===_0x458961;},'iyBFP':function(_0x4e1f4f,_0x1a724c){return _0x4e1f4f>_0x1a724c;}};if(_0x3cb0e9['RXRcj'](_0x1e0023,0x0))return 0x1;let _0x444678=0x0,_0x5a6683=_0x1e0023;while(_0x3cb0e9[_0x3b7b2e(0x187)](_0x5a6683,0x0)){_0x444678++,_0x5a6683=Math['floor'](_0x5a6683/0x100);}return _0x444678;}function findTimestampScale(_0x1baedd,_0x56c6ad){const _0x1fdfed=_0x7c44,_0x1d1ded={'joWGb':function(_0x54b5fd,_0x45407b){return _0x54b5fd+_0x45407b;},'qzUkq':function(_0x48cc76,_0xb50dab){return _0x48cc76+_0xb50dab;},'OqFVF':function(_0x4771b0,_0x35f4f7){return _0x4771b0===_0x35f4f7;},'rBNJv':function(_0x2ec384,_0xf0d823){return _0x2ec384+_0xf0d823;},'OFDLj':function(_0x550f7e,_0xb13661){return _0x550f7e+_0xb13661;},'dGegi':function(_0x5594ef,_0x2dd14d,_0xa560de,_0x3b4d88){return _0x5594ef(_0x2dd14d,_0xa560de,_0x3b4d88);},'pLenp':function(_0x117826,_0x23cf28){return _0x117826+_0x23cf28;},'ZqYGw':function(_0x293bac,_0x3ee1f5){return _0x293bac+_0x3ee1f5;}};let _0x2e0c8e=_0x56c6ad;const _0x2b42fe=Math[_0x1fdfed(0x189)](_0x1baedd[_0x1fdfed(0x1a6)],_0x1d1ded[_0x1fdfed(0x18e)](_0x56c6ad,0x2710));while(_0x2e0c8e<_0x2b42fe){const [_0xfbd4e4,_0xe5ebb0]=readId(_0x1baedd,_0x2e0c8e),[_0x562ac2,_0x3b816c]=readVint(_0x1baedd,_0x1d1ded['qzUkq'](_0x2e0c8e,_0xe5ebb0));if(_0x1d1ded['OqFVF'](_0xfbd4e4,ID_INFO)){let _0x5ddc6f=_0x1d1ded['rBNJv'](_0x1d1ded['OFDLj'](_0x2e0c8e,_0xe5ebb0),_0x3b816c);const _0x2b3af5=_0x1d1ded[_0x1fdfed(0x1a9)](_0x5ddc6f,_0x562ac2);while(_0x5ddc6f<_0x2b3af5){const [_0x354ad6,_0x22a2ee]=readId(_0x1baedd,_0x5ddc6f),[_0x137917,_0x4b8a11]=readVint(_0x1baedd,_0x5ddc6f+_0x22a2ee);if(_0x354ad6===ID_TIMESTAMP_SCALE)return _0x1d1ded['dGegi'](readUint,_0x1baedd,_0x1d1ded['pLenp'](_0x5ddc6f,_0x22a2ee)+_0x4b8a11,_0x137917);_0x5ddc6f+=_0x1d1ded['qzUkq'](_0x22a2ee,_0x4b8a11)+_0x137917;}break;}if(_0xfbd4e4===ID_CLUSTER)break;if(isUnknownSize(_0x562ac2,_0x3b816c))break;_0x2e0c8e+=_0x1d1ded['ZqYGw'](_0xe5ebb0+_0x3b816c,_0x562ac2);}return 0xf4240;}function findFirstClusterOffset(_0x35ede6,_0x59f14e){const _0x38b878=_0x7c44,_0x196663={'edaIg':function(_0x5507e6,_0x5e8531){return _0x5507e6+_0x5e8531;},'MClPI':function(_0x57831b,_0x5358b7){return _0x57831b+_0x5358b7;}};let _0x1716d5=_0x59f14e;while(_0x1716d5<_0x35ede6[_0x38b878(0x1a6)]){const [_0x528e66,_0x19fa5b]=readId(_0x35ede6,_0x1716d5);if(_0x528e66===ID_CLUSTER)return _0x1716d5;const [_0xdc728d,_0x34bc08]=readVint(_0x35ede6,_0x196663[_0x38b878(0x1c2)](_0x1716d5,_0x19fa5b));if(isUnknownSize(_0xdc728d,_0x34bc08))return _0x1716d5;_0x1716d5+=_0x196663['edaIg'](_0x196663[_0x38b878(0x1b6)](_0x19fa5b,_0x34bc08),_0xdc728d);}return _0x35ede6[_0x38b878(0x1a6)];}function findClusterEnd(_0xf2ea3b,_0x33df9f,_0x65bf84,_0x1f9f5b){const _0x4c2496=_0x7c44,_0x3348cb={'QhEEC':function(_0x123808,_0x28036c,_0x2a7653){return _0x123808(_0x28036c,_0x2a7653);},'dLzkX':function(_0x58d59a,_0x543347){return _0x58d59a+_0x543347;},'YWwlN':function(_0x5d91fe,_0x201487){return _0x5d91fe<_0x201487;},'TngaA':function(_0x13e200,_0x24eb92,_0x3a5db4){return _0x13e200(_0x24eb92,_0x3a5db4);},'WBoOk':function(_0x42460d,_0x17a5e3){return _0x42460d+_0x17a5e3;}};if(!_0x3348cb[_0x4c2496(0x198)](isUnknownSize,_0x65bf84,_0x1f9f5b))return _0x3348cb[_0x4c2496(0x196)](_0x33df9f,_0x65bf84);const _0x41d893=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x443864=_0x33df9f;while(_0x3348cb['YWwlN'](_0x443864,_0xf2ea3b[_0x4c2496(0x1a6)]-0x4)){const [_0x3cb973,_0xebd0aa]=_0x3348cb[_0x4c2496(0x184)](readId,_0xf2ea3b,_0x443864);if(_0x41d893[_0x4c2496(0x1be)](_0x3cb973))return _0x443864;const [_0x14ab0c,_0x3a00fa]=readVint(_0xf2ea3b,_0x3348cb['WBoOk'](_0x443864,_0xebd0aa));if(isUnknownSize(_0x14ab0c,_0x3a00fa))return _0xf2ea3b[_0x4c2496(0x1a6)];_0x443864+=_0x3348cb[_0x4c2496(0x1a3)](_0xebd0aa+_0x3a00fa,_0x14ab0c);}return _0xf2ea3b[_0x4c2496(0x1a6)];}function extractClusters(_0x24776b,_0x363bc8){const _0xb4367e=_0x7c44,_0x46b544={'hzraJ':function(_0x2bdc94,_0x123dc9,_0x2b6515){return _0x2bdc94(_0x123dc9,_0x2b6515);},'pkoHK':function(_0x423c28,_0x334c27){return _0x423c28!==_0x334c27;},'BygLT':function(_0x56d0e2,_0x3747df){return _0x56d0e2+_0x3747df;},'ZXDNI':function(_0x1cb203,_0x53fa7a,_0x430c4e,_0x1e0896,_0x41b707){return _0x1cb203(_0x53fa7a,_0x430c4e,_0x1e0896,_0x41b707);},'Rrntb':function(_0xa8c4dc,_0x590d81){return _0xa8c4dc<_0x590d81;},'TvySN':function(_0x496dfd,_0x2057af,_0x5d7ef3){return _0x496dfd(_0x2057af,_0x5d7ef3);},'upKzR':function(_0x460b3b,_0x1f2858){return _0x460b3b===_0x1f2858;},'tOiyK':function(_0x1b8712,_0x35c0e6){return _0x1b8712+_0x35c0e6;},'kJCKA':function(_0x1a774a,_0x4f0c9d){return _0x1a774a===_0x4f0c9d;},'gaMNZ':function(_0x1242ec,_0x361fef){return _0x1242ec+_0x361fef;},'PYdfn':function(_0x33bbea,_0x483b5f,_0x27b92e){return _0x33bbea(_0x483b5f,_0x27b92e);},'LONnL':function(_0x25610f,_0x4db1bc){return _0x25610f===_0x4db1bc;},'NqORe':function(_0x400cab,_0x16e32d,_0x21cd37){return _0x400cab(_0x16e32d,_0x21cd37);},'lERDG':function(_0x2259ea,_0x18f82c){return _0x2259ea>_0x18f82c;},'gyICy':function(_0x418ee9,_0x438ca0){return _0x418ee9===_0x438ca0;}},_0x145b4e=[],_0xe70a60=Buffer[_0xb4367e(0x19e)]([0x1f,0x43,0xb6,0x75]);let _0x1b4b07=0x0;while(_0x1b4b07<_0x24776b[_0xb4367e(0x1a6)]){const _0x7afed2=_0x24776b[_0xb4367e(0x1ab)](_0xe70a60,_0x1b4b07);if(_0x7afed2===-0x1)break;const [_0x1828a7,_0xf03ed3]=_0x46b544[_0xb4367e(0x19a)](readId,_0x24776b,_0x7afed2);if(_0x46b544[_0xb4367e(0x180)](_0x1828a7,ID_CLUSTER)){_0x1b4b07=_0x46b544['BygLT'](_0x7afed2,0x1);continue;}const [_0xdab309,_0x52ee32]=readVint(_0x24776b,_0x7afed2+_0xf03ed3),_0x4d020a=_0x46b544['BygLT'](_0x7afed2+_0xf03ed3,_0x52ee32),_0x530640=_0x46b544[_0xb4367e(0x186)](findClusterEnd,_0x24776b,_0x4d020a,_0xdab309,_0x52ee32);let _0x5d4f7f=_0x4d020a,_0x1175ce=0x0,_0x10eb0d=0x2,_0x38492f=![],_0x7ff084=Buffer[_0xb4367e(0x185)](0x0),_0x58789a=Buffer[_0xb4367e(0x185)](0x0);while(_0x46b544['Rrntb'](_0x5d4f7f,_0x530640)){const [_0x197fa0,_0x3fcdac]=_0x46b544[_0xb4367e(0x19c)](readId,_0x24776b,_0x5d4f7f),[_0x3b33dd,_0x46450d]=readVint(_0x24776b,_0x5d4f7f+_0x3fcdac);if(_0x46b544['upKzR'](_0x197fa0,ID_TIMESTAMP)){_0x1175ce=readUint(_0x24776b,_0x46b544['BygLT'](_0x5d4f7f+_0x3fcdac,_0x46450d),_0x3b33dd),_0x10eb0d=_0x3b33dd,_0x38492f=!![],_0x7ff084=_0x24776b['slice'](_0x4d020a,_0x5d4f7f);const _0x1b7bb2=_0x46b544['BygLT'](_0x46b544['tOiyK'](_0x5d4f7f+_0x3fcdac,_0x46450d),_0x3b33dd);_0x58789a=_0x24776b[_0xb4367e(0x191)](_0x1b7bb2,_0x530640);break;}if(_0x46b544['kJCKA'](_0x197fa0,ID_CLUSTER))break;if(_0x46b544[_0xb4367e(0x19a)](isUnknownSize,_0x3b33dd,_0x46450d))break;_0x5d4f7f+=_0x46b544['gaMNZ'](_0x46b544['tOiyK'](_0x3fcdac,_0x46450d),_0x3b33dd);}!_0x38492f&&(_0x58789a=_0x24776b[_0xb4367e(0x191)](_0x4d020a,_0x530640));let _0x54769b=_0x1175ce;_0x5d4f7f=_0x4d020a;while(_0x46b544['Rrntb'](_0x5d4f7f,_0x530640)){const [_0x51abeb,_0xbaa926]=_0x46b544[_0xb4367e(0x19a)](readId,_0x24776b,_0x5d4f7f),[_0x42a441,_0x18d2e3]=_0x46b544['PYdfn'](readVint,_0x24776b,_0x5d4f7f+_0xbaa926);if(_0x46b544['LONnL'](_0x51abeb,ID_SIMPLE_BLOCK)&&_0x42a441>=0x4){const _0x58363e=_0x5d4f7f+_0xbaa926+_0x18d2e3,[,_0x2127bf]=_0x46b544[_0xb4367e(0x1b8)](readVint,_0x24776b,_0x58363e),_0x157208=_0x24776b['readInt16BE'](_0x58363e+_0x2127bf),_0x5e05b8=_0x1175ce+_0x157208;if(_0x46b544['lERDG'](_0x5e05b8,_0x54769b))_0x54769b=_0x5e05b8;}if(_0x46b544['gyICy'](_0x51abeb,ID_CLUSTER))break;if(_0x46b544[_0xb4367e(0x19a)](isUnknownSize,_0x42a441,_0x18d2e3))break;_0x5d4f7f+=_0x46b544['BygLT'](_0xbaa926+_0x18d2e3,_0x42a441);}_0x145b4e[_0xb4367e(0x194)]({'timestamp':_0x1175ce,'maxTicks':_0x54769b,'bodyBeforeTimestamp':_0x7ff084,'bodyAfterTimestamp':_0x58789a,'timestampElementSize':_0x10eb0d}),_0x1b4b07=_0x530640;}return _0x145b4e;}function parseWebm(_0x504a7d){const _0x273bda=_0x7c44,_0x47b013={'jOpej':function(_0x15ebd2,_0x3950f5){return _0x15ebd2+_0x3950f5;},'QPmrQ':function(_0x4f6607,_0x32a8a0,_0x447fd6){return _0x4f6607(_0x32a8a0,_0x447fd6);},'Zvwej':function(_0x4edfec,_0x430b19){return _0x4edfec!==_0x430b19;},'DoBJm':function(_0x1a2c98,_0x48c0a7){return _0x1a2c98>_0x48c0a7;}};let _0x26582b=0x0;const [,_0x135d5c]=readId(_0x504a7d,_0x26582b),[_0xd37a30,_0x136c90]=readVint(_0x504a7d,_0x47b013['jOpej'](_0x26582b,_0x135d5c));_0x26582b+=_0x47b013['jOpej'](_0x47b013['jOpej'](_0x135d5c,_0x136c90),_0xd37a30);const [_0x33cdbb,_0x4d3997]=_0x47b013[_0x273bda(0x19f)](readId,_0x504a7d,_0x26582b);if(_0x47b013['Zvwej'](_0x33cdbb,ID_SEGMENT))return null;const [,_0x4c60f8]=_0x47b013[_0x273bda(0x19f)](readVint,_0x504a7d,_0x26582b+_0x4d3997),_0x45da07=_0x47b013['jOpej'](_0x26582b+_0x4d3997,_0x4c60f8),_0x48aaec=findTimestampScale(_0x504a7d,_0x45da07),_0x35f3d8=findFirstClusterOffset(_0x504a7d,_0x45da07),_0x31c34b=_0x504a7d[_0x273bda(0x191)](0x0,_0x35f3d8),_0x5741e3=_0x47b013['QPmrQ'](extractClusters,_0x504a7d,_0x48aaec);let _0x2e556f=0x0;for(const _0x36f080 of _0x5741e3){if(_0x47b013[_0x273bda(0x1aa)](_0x36f080[_0x273bda(0x1a1)],_0x2e556f))_0x2e556f=_0x36f080[_0x273bda(0x1a1)];}return{'header':_0x31c34b,'clusters':_0x5741e3,'timestampScale':_0x48aaec,'maxTimestampTicks':_0x2e556f};}function buildCluster(_0x48e9c5,_0x347f1f,_0x10d634){const _0x1fd21c=_0x7c44,_0x5c7b7e={'dKIPY':function(_0x50e509,_0x20072f){return _0x50e509(_0x20072f);},'WTBMq':function(_0x14ddcf,_0x31a0fa,_0x6c4a1c){return _0x14ddcf(_0x31a0fa,_0x6c4a1c);}},_0x53a855=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x3c5f68=Math['max'](0x4,_0x5c7b7e[_0x1fd21c(0x18c)](uintSize,_0x48e9c5)),_0x278491=Buffer['concat']([Buffer['from']([ID_TIMESTAMP]),_0x5c7b7e['dKIPY'](writeVint,_0x3c5f68),_0x5c7b7e['WTBMq'](writeUint,_0x48e9c5,_0x3c5f68)]),_0x4ccc71=Buffer['concat']([_0x347f1f,_0x278491,_0x10d634]),_0x33ac40=writeVint(_0x4ccc71[_0x1fd21c(0x1a6)]);return Buffer[_0x1fd21c(0x188)]([_0x53a855,_0x33ac40,_0x4ccc71]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x12a488){const _0x357687=_0x7c44,_0x12799c={'eCNKo':function(_0x1d8f4a,_0x3b809c,_0x171dee){return _0x1d8f4a(_0x3b809c,_0x171dee);},'ltEht':function(_0x354070,_0x58417f){return _0x354070+_0x58417f;},'JIUCm':function(_0xab4df2,_0x1b8b20){return _0xab4df2+_0x1b8b20;},'AtHXR':function(_0x35be3e,_0x37d74b){return _0x35be3e+_0x37d74b;},'vUcSe':function(_0x2186d7,_0xdf3263){return _0x2186d7(_0xdf3263);},'NXRID':function(_0x1c7493,_0x21ed50){return _0x1c7493+_0x21ed50;},'xktZp':function(_0x145846,_0x4fd551,_0x5323bb){return _0x145846(_0x4fd551,_0x5323bb);},'MIRyg':function(_0x3f37cc,_0x733888){return _0x3f37cc===_0x733888;},'LHueu':function(_0x1ae784,_0x55a98c){return _0x1ae784===_0x55a98c;},'AhNqp':function(_0x114f54,_0x22e8fe){return _0x114f54+_0x22e8fe;},'uIlmP':function(_0x592ab3,_0x23a8ea){return _0x592ab3<_0x23a8ea;},'Vguwv':function(_0x4ce459,_0x33682b,_0x4898bf){return _0x4ce459(_0x33682b,_0x4898bf);}},_0x300f16=Buffer['from'](_0x12a488);let _0x493672=0x0;const [,_0x320330]=readId(_0x300f16,_0x493672),[_0xb89b39,_0x558c94]=_0x12799c['eCNKo'](readVint,_0x300f16,_0x493672+_0x320330),_0x3145c9=_0x12799c['ltEht'](_0x12799c[_0x357687(0x1c0)](_0x493672+_0x320330,_0x558c94),_0xb89b39),[,_0x55a946]=readId(_0x300f16,_0x3145c9),[,_0x380876]=readVint(_0x300f16,_0x12799c[_0x357687(0x199)](_0x3145c9,_0x55a946)),_0x1acb89=_0x12799c[_0x357687(0x197)](_0x3145c9+_0x55a946,_0x380876),_0x5aadf4=_0x12799c[_0x357687(0x1b4)](writeUnknownSizeVint,_0x380876);_0x5aadf4[_0x357687(0x192)](_0x300f16,_0x12799c[_0x357687(0x1c1)](_0x3145c9,_0x55a946));let _0x4f2a06=_0x1acb89;const _0x2f0cce=Math[_0x357687(0x189)](_0x300f16[_0x357687(0x1a6)],_0x12799c[_0x357687(0x197)](_0x1acb89,0x2710));while(_0x4f2a06<_0x2f0cce){const [_0x30a74,_0x52d5a8]=_0x12799c['xktZp'](readId,_0x300f16,_0x4f2a06),[_0x4836fd,_0x4cba28]=readVint(_0x300f16,_0x4f2a06+_0x52d5a8);if(_0x12799c[_0x357687(0x1a8)](_0x30a74,ID_CLUSTER))break;if(isUnknownSize(_0x4836fd,_0x4cba28))break;if(_0x12799c[_0x357687(0x1ac)](_0x30a74,ID_INFO)){const _0x3706a5=_0x12799c[_0x357687(0x1c0)](_0x12799c['AhNqp'](_0x4f2a06,_0x52d5a8),_0x4cba28),_0xa13095=_0x12799c[_0x357687(0x1c0)](_0x3706a5,_0x4836fd),_0x3c1dc3=[];let _0x54c3b9=_0x3706a5;while(_0x12799c[_0x357687(0x1a4)](_0x54c3b9,_0xa13095)){const [_0x499756,_0x5d3329]=_0x12799c[_0x357687(0x1a5)](readId,_0x300f16,_0x54c3b9),[_0x2a3e3c,_0xdd9301]=_0x12799c[_0x357687(0x1a7)](readVint,_0x300f16,_0x12799c[_0x357687(0x1c1)](_0x54c3b9,_0x5d3329)),_0x381100=_0x5d3329+_0xdd9301+_0x2a3e3c;_0x499756!==ID_DURATION&&_0x3c1dc3['push'](_0x300f16[_0x357687(0x191)](_0x54c3b9,_0x54c3b9+_0x381100)),_0x54c3b9+=_0x381100;}const _0x2e9548=Buffer[_0x357687(0x188)](_0x3c1dc3),_0x4000d5=Buffer[_0x357687(0x188)]([_0x300f16[_0x357687(0x191)](_0x4f2a06,_0x12799c['ltEht'](_0x4f2a06,_0x52d5a8)),writeVint(_0x2e9548['length'],_0x4cba28)]);return Buffer[_0x357687(0x188)]([_0x300f16[_0x357687(0x191)](0x0,_0x4f2a06),_0x4000d5,_0x2e9548,_0x300f16[_0x357687(0x191)](_0xa13095)]);}_0x4f2a06+=_0x52d5a8+_0x4cba28+_0x4836fd;}return _0x300f16;}export function stitchWebmFiles(_0x53f5ee,_0x3c2576){const _0x2c4308=_0x7c44,_0xa16e6b={'cvTWB':function(_0x3b9eb9,_0x13165f){return _0x3b9eb9(_0x13165f);},'dkNdo':function(_0x1a73ac,_0x5b327d){return _0x1a73ac<_0x5b327d;},'aZZlo':function(_0x5b1730,_0xaf4cdd){return _0x5b1730+_0xaf4cdd;},'CMVEX':function(_0x293332,_0x406cdd,_0x5b28bb,_0x3e2869){return _0x293332(_0x406cdd,_0x5b28bb,_0x3e2869);}};if(_0x53f5ee[_0x2c4308(0x1a6)]<=0x1)return![];const _0x245ff1=[];for(const _0x43750b of _0x53f5ee){const _0x17d4f0=readFileSync(_0x43750b),_0x27fbdb=_0xa16e6b['cvTWB'](parseWebm,_0x17d4f0);if(!_0x27fbdb||_0x27fbdb[_0x2c4308(0x1bc)]['length']===0x0)return![];_0x245ff1['push'](_0x27fbdb);}const _0x27d150=_0x245ff1[0x0],_0x1f11e7=_0xa16e6b[_0x2c4308(0x182)](rebuildHeaderWithoutDuration,_0x27d150['header']),_0x14ea45=[_0x1f11e7];let _0x35af74=0x0;for(let _0x1a3fd4=0x0;_0xa16e6b[_0x2c4308(0x18f)](_0x1a3fd4,_0x245ff1[_0x2c4308(0x1a6)]);_0x1a3fd4++){const _0x37f05b=_0x245ff1[_0x1a3fd4];for(const _0x6f643 of _0x37f05b['clusters']){const _0x116b08=_0xa16e6b['aZZlo'](_0x6f643[_0x2c4308(0x1ad)],_0x35af74);_0x14ea45[_0x2c4308(0x194)](_0xa16e6b[_0x2c4308(0x1b3)](buildCluster,_0x116b08,_0x6f643['bodyBeforeTimestamp'],_0x6f643[_0x2c4308(0x1af)]));}const _0x23651e=0x1e;_0x35af74+=_0x37f05b['maxTimestampTicks']+_0x23651e;}return writeFileSync(_0x3c2576,Buffer[_0x2c4308(0x188)](_0x14ea45)),!![];}if(process['argv'][0x1]?.['endsWith']('stitchWebmFiles.ts')||process['argv'][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv']['slice'](0x2);args[_0x2b7c78(0x1a6)]<0x3&&(console[_0x2b7c78(0x19b)]('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args[_0x2b7c78(0x1a6)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log'](_0x2b7c78(0x1a0)+inputs[_0x2b7c78(0x1a6)]+_0x2b7c78(0x1bf)+output):console[_0x2b7c78(0x1b7)](_0x2b7c78(0x18a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2e31a1=_0x482b;(function(_0x290a18,_0x12fa12){const _0x5a75d1=_0x482b,_0x1e5233=_0x290a18();while(!![]){try{const _0xcf289=-parseInt(_0x5a75d1(0xfd))/0x1*(parseInt(_0x5a75d1(0x103))/0x2)+parseInt(_0x5a75d1(0xed))/0x3+parseInt(_0x5a75d1(0x11f))/0x4+parseInt(_0x5a75d1(0x109))/0x5+-parseInt(_0x5a75d1(0x116))/0x6*(parseInt(_0x5a75d1(0x129))/0x7)+parseInt(_0x5a75d1(0xea))/0x8+-parseInt(_0x5a75d1(0xe6))/0x9;if(_0xcf289===_0x12fa12)break;else _0x1e5233['push'](_0x1e5233['shift']());}catch(_0x52b549){_0x1e5233['push'](_0x1e5233['shift']());}}}(_0x4c90,0x4e369));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function _0x482b(_0x9e835f,_0x2868bf){_0x9e835f=_0x9e835f-0xe0;const _0x4c9021=_0x4c90();let _0x482b49=_0x4c9021[_0x9e835f];return _0x482b49;}function getDeviceId(){const _0x42169a=_0x482b,_0x157839={'wnHGL':function(_0x3972c7,_0x480ed0,_0x64d79c){return _0x3972c7(_0x480ed0,_0x64d79c);},'PBCBw':function(_0x297104){return _0x297104();},'LbPYM':function(_0x3e74f5,_0x5ef62f,_0x3b47ef){return _0x3e74f5(_0x5ef62f,_0x3b47ef);},'TKPln':'.session','yxRlV':'utf-8'};if(cachedDeviceId)return cachedDeviceId;try{const _0x1b7e0b=_0x157839['wnHGL'](join,_0x157839['PBCBw'](homedir),'.ranger'),_0x3b332c=_0x157839['LbPYM'](join,_0x1b7e0b,_0x157839['TKPln']);if(existsSync(_0x3b332c)){cachedDeviceId=_0x157839[_0x42169a(0xf6)](readFileSync,_0x3b332c,_0x157839[_0x42169a(0x12a)])[_0x42169a(0x100)]();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x157839[_0x42169a(0x10d)](randomUUID),mkdirSync(_0x1b7e0b,{'recursive':!![]}),_0x157839['LbPYM'](writeFileSync,_0x3b332c,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x157839[_0x42169a(0x10d)](randomUUID),cachedDeviceId;}}export class TelemetryCollector{[_0x2e31a1(0xe7)]=[];[_0x2e31a1(0xe3)];[_0x2e31a1(0x124)];['commandStartTime'];['phaseCounter']=0x0;['phaseStartTimes']=new Map();['flushing']=null;[_0x2e31a1(0xfb)];['cliVersion'];['nodeVersion'];[_0x2e31a1(0x10e)];[_0x2e31a1(0xf9)];[_0x2e31a1(0x115)];['featureId'];[_0x2e31a1(0x120)];[_0x2e31a1(0x111)];[_0x2e31a1(0x101)];constructor(_0x37ccb5){const _0x27b221=_0x2e31a1,_0x4630e0={'ammrh':function(_0xb72d11){return _0xb72d11();}},_0x5ebff3='7|4|5|8|1|2|3|0|6'['split']('|');let _0x1b5f28=0x0;while(!![]){switch(_0x5ebff3[_0x1b5f28++]){case'0':this['isTty']=process['stdout'][_0x27b221(0x104)]??![];continue;case'1':this['cliVersion']=_0x4630e0['ammrh'](getCurrentVersion);continue;case'2':this[_0x27b221(0x107)]=process[_0x27b221(0x12b)];continue;case'3':this[_0x27b221(0x10e)]=process['platform'];continue;case'4':this['command']=_0x37ccb5;continue;case'5':this['commandStartTime']=Date['now']();continue;case'6':this[_0x27b221(0x115)]=!!(process[_0x27b221(0xf2)]['CI']||process['env']['GITHUB_ACTIONS']);continue;case'7':this['commandId']=randomUUID();continue;case'8':this['deviceId']=_0x4630e0[_0x27b221(0xfe)](getDeviceId);continue;}break;}}[_0x2e31a1(0xe4)](_0x33f5d2){const _0x5c7f47=_0x2e31a1;if(_0x33f5d2['featureId'])this['featureId']=_0x33f5d2['featureId'];if(_0x33f5d2[_0x5c7f47(0x120)])this[_0x5c7f47(0x120)]=_0x33f5d2[_0x5c7f47(0x120)];if(_0x33f5d2[_0x5c7f47(0x111)])this[_0x5c7f47(0x111)]=_0x33f5d2['browserSessionId'];if(_0x33f5d2[_0x5c7f47(0x101)])this['transport']=_0x33f5d2['transport'];}async[_0x2e31a1(0x11b)](_0x4dd9c3){const _0x495bb3=_0x2e31a1,_0x48ea64={'MFUsB':_0x495bb3(0x126)},_0x5ea5d0=this['buildEvent']({'eventType':_0x48ea64['MFUsB'],'metadata':_0x4dd9c3});await this[_0x495bb3(0xec)](_0x5ea5d0);}async[_0x2e31a1(0x102)](_0x5be0f0,_0x3dc352){const _0x4359c5=_0x2e31a1,_0x3f4159={'npPhC':_0x4359c5(0xfc)},_0x2b4c6a=this['buildEvent']({'eventType':_0x3f4159[_0x4359c5(0xe0)],'outcome':_0x5be0f0,'durationMs':Date[_0x4359c5(0x10a)]()-this[_0x4359c5(0xe9)],'metadata':_0x3dc352});await this['sendImmediate'](_0x2b4c6a),await this['flush']();}async[_0x2e31a1(0x113)](_0x25bba3,_0x1e2503){const _0x25c504=_0x2e31a1,_0x50b560={'CLLXK':_0x25c504(0x125),'vtQbW':function(_0x4d6bc6,_0x15776f,_0x433c4c){return _0x4d6bc6(_0x15776f,_0x433c4c);},'CnwdN':function(_0x369bc5,_0x51e84c){return _0x369bc5 instanceof _0x51e84c;},'jlWYr':function(_0x10d8f2,_0x1e6d88){return _0x10d8f2-_0x1e6d88;}},_0x4e4ee2=this[_0x25c504(0x105)]({'eventType':_0x50b560['CLLXK'],'errorMessage':_0x50b560[_0x25c504(0x106)](truncate,_0x50b560['CnwdN'](_0x25bba3,Error)?_0x25bba3['message']:String(_0x25bba3),0x1f4),'errorType':_0x50b560['CnwdN'](_0x25bba3,Error)?_0x25bba3['constructor']['name']:_0x25c504(0x128),'durationMs':_0x50b560[_0x25c504(0xf3)](Date['now'](),this[_0x25c504(0xe9)]),'metadata':_0x1e2503});await this[_0x25c504(0xec)](_0x4e4ee2),await this[_0x25c504(0x112)]();}[_0x2e31a1(0x10c)](_0x17dfc8,_0x400b99){const _0x2d1aff=_0x2e31a1,_0x5e620d={'izNIk':'phase_start'};this[_0x2d1aff(0xf7)]++,this[_0x2d1aff(0xe1)]['set'](_0x17dfc8,Date[_0x2d1aff(0x10a)]());const _0x33b9fa=this[_0x2d1aff(0x105)]({'eventType':_0x5e620d['izNIk'],'phase':_0x17dfc8,'phaseIndex':this['phaseCounter'],'metadata':_0x400b99});this['buffer'][_0x2d1aff(0x127)](_0x33b9fa);}[_0x2e31a1(0x10f)](_0x132554,_0x3e0ce8){const _0x2c7ccf=_0x2e31a1,_0x276b94={'Vdqyk':'phase_end','TGaCy':function(_0x17281f,_0x474148){return _0x17281f>=_0x474148;}},_0x5c471e=this[_0x2c7ccf(0xe1)]['get'](_0x132554),_0x2ae262=_0x5c471e?Date['now']()-_0x5c471e:undefined;this['phaseStartTimes'][_0x2c7ccf(0x118)](_0x132554);const _0x4e00ac=this['buildEvent']({'eventType':_0x276b94['Vdqyk'],'phase':_0x132554,'durationMs':_0x2ae262,'metadata':_0x3e0ce8});this[_0x2c7ccf(0xe7)][_0x2c7ccf(0x127)](_0x4e00ac),_0x276b94['TGaCy'](this[_0x2c7ccf(0xe7)]['length'],0xa)&&this['flushAsync']();}async['trackPhaseError'](_0x8a6617,_0x56221f,_0x1aac5b){const _0x33b4a9=_0x2e31a1,_0x1a9d70={'HcjEB':function(_0xfceb08,_0x33c560){return _0xfceb08 instanceof _0x33c560;},'NmHHv':function(_0xfdf1d5,_0x353e03){return _0xfdf1d5(_0x353e03);}},_0x475d5a=this[_0x33b4a9(0xe1)][_0x33b4a9(0x108)](_0x8a6617),_0x7144e3=_0x475d5a?Date['now']()-_0x475d5a:undefined;this['phaseStartTimes'][_0x33b4a9(0x118)](_0x8a6617);const _0xeeb79b=this[_0x33b4a9(0x105)]({'eventType':'phase_error','phase':_0x8a6617,'durationMs':_0x7144e3,'errorMessage':truncate(_0x1a9d70[_0x33b4a9(0xee)](_0x56221f,Error)?_0x56221f['message']:_0x1a9d70[_0x33b4a9(0x114)](String,_0x56221f),0x1f4),'errorType':_0x1a9d70['HcjEB'](_0x56221f,Error)?_0x56221f[_0x33b4a9(0xf4)][_0x33b4a9(0xf1)]:'Unknown','metadata':_0x1aac5b});await this[_0x33b4a9(0xec)](_0xeeb79b);}async[_0x2e31a1(0x112)](){const _0x41f7ea=_0x2e31a1,_0x1f00ad={'Mmklk':function(_0x541c94,_0x5cf0bd){return _0x541c94===_0x5cf0bd;}};if(_0x1f00ad[_0x41f7ea(0x119)](this['buffer']['length'],0x0))return;const _0x25cb55=this['buffer']['splice'](0x0);try{await this[_0x41f7ea(0xe2)](_0x25cb55);}catch{}}[_0x2e31a1(0x105)](_0x1a2881){const _0x3b4e46=_0x2e31a1;return{'eventType':_0x1a2881['eventType'],'command':this['command'],'commandId':this['commandId'],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x1a2881[_0x3b4e46(0x11e)],'phase':_0x1a2881['phase'],'phaseIndex':_0x1a2881['phaseIndex'],'outcome':_0x1a2881['outcome'],'errorMessage':_0x1a2881[_0x3b4e46(0x110)],'errorType':_0x1a2881['errorType'],'featureId':this['featureId'],'checklistItemId':this[_0x3b4e46(0x120)],'browserSessionId':this['browserSessionId'],'transport':this[_0x3b4e46(0x101)],'evaluation':_0x1a2881[_0x3b4e46(0x123)],'cliVersion':this[_0x3b4e46(0xeb)],'nodeVersion':this[_0x3b4e46(0x107)],'platform':this[_0x3b4e46(0x10e)],'cwd':process[_0x3b4e46(0xf8)](),'isTty':this[_0x3b4e46(0xf9)],'isCI':this[_0x3b4e46(0x115)],'metadata':_0x1a2881[_0x3b4e46(0xe8)]};}async['sendImmediate'](_0x353f3e){try{await this['sendBatch']([_0x353f3e]);}catch{}}['flushAsync'](){const _0x9e218e=_0x2e31a1;if(this['flushing'])return;this[_0x9e218e(0x117)]=this['flush']()[_0x9e218e(0xf5)](()=>{this['flushing']=null;});}async[_0x2e31a1(0xe2)](_0x393c8f){const _0x599498=_0x2e31a1,_0x429188={'kWKJP':function(_0x19b9c9){return _0x19b9c9();},'MKdCU':function(_0x28bd02){return _0x28bd02();},'QjUcm':'application/json','vQSAO':'Authorization','ZCUiL':function(_0x399bcf,_0x5801ac,_0x505942){return _0x399bcf(_0x5801ac,_0x505942);},'nAIal':'POST'},_0x48fefa=await _0x429188['kWKJP'](getToken)['catch'](()=>null),_0x57c112=_0x429188[_0x599498(0x122)](getApiBaseUrl),_0x258aca={'Content-Type':_0x429188[_0x599498(0x10b)]};_0x48fefa&&(_0x258aca[_0x429188['vQSAO']]='Bearer\x20'+_0x48fefa);const _0x2166dc={'events':_0x393c8f};process[_0x599498(0xf2)][_0x599498(0xff)]&&console[_0x599498(0x121)](_0x599498(0x11a)+_0x393c8f['length']+'\x20event(s)\x20to\x20'+_0x57c112+_0x599498(0xef));const _0x5e873e=new AbortController(),_0x18e2f3=_0x429188[_0x599498(0xe5)](setTimeout,()=>_0x5e873e['abort'](),0x1388);try{await _0x429188['ZCUiL'](fetch,_0x57c112+'/api/v1/mcp/cli-telemetry',{'method':_0x429188['nAIal'],'headers':_0x258aca,'body':JSON[_0x599498(0xf0)](_0x2166dc),'signal':_0x5e873e['signal']});}finally{clearTimeout(_0x18e2f3);}}}let currentCollector=null;export function createTelemetryCollector(_0x5017f4){return currentCollector=new TelemetryCollector(_0x5017f4),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x4fb4a5,_0x4632b4,_0x41e2ca){const _0x2db758=_0x2e31a1,_0xbc85ed={'qfPPS':function(_0x506910,_0x34dd0d){return _0x506910(_0x34dd0d);}},_0x964639=_0xbc85ed[_0x2db758(0xfa)](createTelemetryCollector,_0x4fb4a5);await _0x964639['trackCommandStart'](_0x41e2ca);try{const _0x4d777b=await _0x4632b4(_0x964639);return await _0x964639['trackCommandEnd']('success'),_0x4d777b;}catch(_0x2335f8){await _0x964639['trackCommandError'](_0x2335f8);throw _0x2335f8;}finally{await _0x964639[_0x2db758(0x112)]();}}function _0x4c90(){const _0x3ae480=['buildEvent','vtQbW','nodeVersion','get','2084395VZQkQt','now','QjUcm','trackPhaseStart','PBCBw','platform','trackPhaseEnd','errorMessage','browserSessionId','flush','trackCommandError','NmHHv','isCI','12qhCZpc','flushing','delete','Mmklk','[telemetry]\x20Sending\x20','trackCommandStart','IyaWN','rkOSL','durationMs','1316316ijNvqk','checklistItemId','error','MKdCU','evaluation','command','command_error','command_start','push','Unknown','1018346WRzNOa','yxRlV','version','npPhC','phaseStartTimes','sendBatch','commandId','setContext','ZCUiL','4554495oOGIKe','buffer','metadata','commandStartTime','1135512xViWpX','cliVersion','sendImmediate','1336155piubLB','HcjEB','/api/v1/mcp/cli-telemetry','stringify','name','env','jlWYr','constructor','finally','wnHGL','phaseCounter','cwd','isTty','qfPPS','deviceId','command_end','30SoHkzC','ammrh','DEBUG','trim','transport','trackCommandEnd','14394AMNFpi','isTTY'];_0x4c90=function(){return _0x3ae480;};return _0x4c90();}function truncate(_0x104efe,_0x1e1b2d){const _0x565572=_0x2e31a1,_0x2fea7a={'IyaWN':function(_0x468d46,_0xf227f9){return _0x468d46>_0xf227f9;},'rkOSL':'...'};return _0x2fea7a[_0x565572(0x11c)](_0x104efe['length'],_0x1e1b2d)?_0x104efe['slice'](0x0,_0x1e1b2d)+_0x2fea7a[_0x565572(0x11d)]:_0x104efe;}
|
|
1
|
+
const _0x56051f=_0x4575;(function(_0x2d3bec,_0x3b2926){const _0x2ac60a=_0x4575,_0x2829a2=_0x2d3bec();while(!![]){try{const _0xdf476=-parseInt(_0x2ac60a(0x7a))/0x1*(-parseInt(_0x2ac60a(0xa0))/0x2)+-parseInt(_0x2ac60a(0x8c))/0x3+parseInt(_0x2ac60a(0xad))/0x4*(-parseInt(_0x2ac60a(0x8e))/0x5)+-parseInt(_0x2ac60a(0xbb))/0x6+-parseInt(_0x2ac60a(0x6b))/0x7*(parseInt(_0x2ac60a(0x77))/0x8)+-parseInt(_0x2ac60a(0x73))/0x9+parseInt(_0x2ac60a(0x76))/0xa;if(_0xdf476===_0x3b2926)break;else _0x2829a2['push'](_0x2829a2['shift']());}catch(_0x40b8d6){_0x2829a2['push'](_0x2829a2['shift']());}}}(_0x2823,0xcaf6a));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';function _0x4575(_0x19c4e2,_0x496850){_0x19c4e2=_0x19c4e2-0x69;const _0x282306=_0x2823();let _0x4575cb=_0x282306[_0x19c4e2];return _0x4575cb;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function getDeviceId(){const _0xdce315=_0x4575,_0x421d2f={'TszBf':function(_0x4c7ba2,_0x1a0703,_0x4aa558){return _0x4c7ba2(_0x1a0703,_0x4aa558);},'sndrV':'utf-8'};if(cachedDeviceId)return cachedDeviceId;try{const _0x19030c=_0x421d2f[_0xdce315(0xba)](join,homedir(),'.ranger'),_0x27f0a5=join(_0x19030c,_0xdce315(0xa5));if(existsSync(_0x27f0a5)){cachedDeviceId=_0x421d2f[_0xdce315(0xba)](readFileSync,_0x27f0a5,_0x421d2f[_0xdce315(0x7d)])['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=randomUUID(),mkdirSync(_0x19030c,{'recursive':!![]}),_0x421d2f[_0xdce315(0xba)](writeFileSync,_0x27f0a5,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=randomUUID(),cachedDeviceId;}}export class TelemetryCollector{[_0x56051f(0x7f)]=[];[_0x56051f(0x6a)];['command'];[_0x56051f(0x97)];['phaseCounter']=0x0;['phaseStartTimes']=new Map();[_0x56051f(0x79)]=null;[_0x56051f(0xae)];['cliVersion'];[_0x56051f(0x8b)];['platform'];[_0x56051f(0x7c)];['isCI'];[_0x56051f(0x6c)];['checklistItemId'];['browserSessionId'];[_0x56051f(0xaa)];constructor(_0x3f44ab){const _0x435d67=_0x56051f,_0x2ce13a={'QaYpZ':function(_0x4b5932){return _0x4b5932();}},_0x360a08='1|6|3|0|8|5|4|2|7'[_0x435d67(0x93)]('|');let _0x1bc9cb=0x0;while(!![]){switch(_0x360a08[_0x1bc9cb++]){case'0':this['deviceId']=getDeviceId();continue;case'1':this[_0x435d67(0x6a)]=randomUUID();continue;case'2':this[_0x435d67(0x7c)]=process[_0x435d67(0x94)]['isTTY']??![];continue;case'3':this['commandStartTime']=Date['now']();continue;case'4':this[_0x435d67(0x96)]=process[_0x435d67(0x96)];continue;case'5':this[_0x435d67(0x8b)]=process['version'];continue;case'6':this['command']=_0x3f44ab;continue;case'7':this[_0x435d67(0xb8)]=!!(process['env']['CI']||process['env'][_0x435d67(0x9a)]);continue;case'8':this[_0x435d67(0x9b)]=_0x2ce13a['QaYpZ'](getCurrentVersion);continue;}break;}}[_0x56051f(0xa4)](_0x77d0f2){const _0x292069=_0x56051f;if(_0x77d0f2['featureId'])this[_0x292069(0x6c)]=_0x77d0f2['featureId'];if(_0x77d0f2[_0x292069(0x78)])this[_0x292069(0x78)]=_0x77d0f2[_0x292069(0x78)];if(_0x77d0f2[_0x292069(0xa3)])this['browserSessionId']=_0x77d0f2['browserSessionId'];if(_0x77d0f2['transport'])this['transport']=_0x77d0f2[_0x292069(0xaa)];}async[_0x56051f(0xa6)](_0x1d8ee3){const _0x491643=_0x56051f,_0x11d651={'dPZTP':_0x491643(0x8d)},_0x273c99=this[_0x491643(0x75)]({'eventType':_0x11d651[_0x491643(0x98)],'metadata':_0x1d8ee3});await this[_0x491643(0xb0)](_0x273c99);}async[_0x56051f(0xa7)](_0x4ad47d,_0x7634fd){const _0x3640ee=_0x56051f,_0x1bf975={'ktVBO':_0x3640ee(0x71)},_0x4a71a5=this['buildEvent']({'eventType':_0x1bf975['ktVBO'],'outcome':_0x4ad47d,'durationMs':Date[_0x3640ee(0x85)]()-this[_0x3640ee(0x97)],'metadata':_0x7634fd});await this[_0x3640ee(0xb0)](_0x4a71a5),await this['flush']();}async[_0x56051f(0x6f)](_0x3689a9,_0x5723a4){const _0x2cd3a1=_0x56051f,_0x22b403=this['buildEvent']({'eventType':_0x2cd3a1(0xb3),'errorMessage':truncate(_0x3689a9 instanceof Error?_0x3689a9['message']:String(_0x3689a9),0x1f4),'errorType':_0x3689a9 instanceof Error?_0x3689a9['constructor'][_0x2cd3a1(0xb7)]:_0x2cd3a1(0x9d),'durationMs':Date[_0x2cd3a1(0x85)]()-this['commandStartTime'],'metadata':_0x5723a4});await this[_0x2cd3a1(0xb0)](_0x22b403),await this['flush']();}[_0x56051f(0x89)](_0x116173,_0x49b73f){const _0x3160e3=_0x56051f;this['phaseCounter']++,this[_0x3160e3(0x9c)]['set'](_0x116173,Date['now']());const _0x365186=this['buildEvent']({'eventType':_0x3160e3(0x88),'phase':_0x116173,'phaseIndex':this['phaseCounter'],'metadata':_0x49b73f});this['buffer']['push'](_0x365186);}[_0x56051f(0x99)](_0x39e4aa,_0x7b5dbe){const _0x3ea681=_0x56051f,_0x5cf49a={'zRqJY':function(_0x2d9aca,_0x8b38e1){return _0x2d9aca-_0x8b38e1;},'kcKyW':_0x3ea681(0xb5),'wkBkF':function(_0x1f937e,_0x5476d9){return _0x1f937e>=_0x5476d9;}},_0x268da4=this[_0x3ea681(0x9c)]['get'](_0x39e4aa),_0x415fee=_0x268da4?_0x5cf49a['zRqJY'](Date[_0x3ea681(0x85)](),_0x268da4):undefined;this['phaseStartTimes']['delete'](_0x39e4aa);const _0xd1d5d3=this['buildEvent']({'eventType':_0x5cf49a['kcKyW'],'phase':_0x39e4aa,'durationMs':_0x415fee,'metadata':_0x7b5dbe});this[_0x3ea681(0x7f)]['push'](_0xd1d5d3),_0x5cf49a[_0x3ea681(0x8a)](this[_0x3ea681(0x7f)]['length'],0xa)&&this[_0x3ea681(0xb9)]();}async[_0x56051f(0xab)](_0x3f41a7,_0x3210ab,_0x3fbb87){const _0x26b21a=_0x56051f,_0x326c8f={'CQPEZ':function(_0x1681ce,_0x5c8b5c){return _0x1681ce-_0x5c8b5c;},'iOFEc':function(_0x41d648,_0x2043a9,_0x4d890e){return _0x41d648(_0x2043a9,_0x4d890e);},'jzePU':function(_0x65cb0b,_0x31b9d8){return _0x65cb0b(_0x31b9d8);},'hNQhZ':function(_0x3d9710,_0x59619e){return _0x3d9710 instanceof _0x59619e;},'lvIUq':_0x26b21a(0x9d)},_0x10f1fa=this[_0x26b21a(0x9c)]['get'](_0x3f41a7),_0x34bd7d=_0x10f1fa?_0x326c8f['CQPEZ'](Date[_0x26b21a(0x85)](),_0x10f1fa):undefined;this[_0x26b21a(0x9c)][_0x26b21a(0x69)](_0x3f41a7);const _0x422724=this['buildEvent']({'eventType':'phase_error','phase':_0x3f41a7,'durationMs':_0x34bd7d,'errorMessage':_0x326c8f[_0x26b21a(0x72)](truncate,_0x3210ab instanceof Error?_0x3210ab['message']:_0x326c8f['jzePU'](String,_0x3210ab),0x1f4),'errorType':_0x326c8f[_0x26b21a(0xb6)](_0x3210ab,Error)?_0x3210ab['constructor'][_0x26b21a(0xb7)]:_0x326c8f[_0x26b21a(0x90)],'metadata':_0x3fbb87});await this['sendImmediate'](_0x422724);}async[_0x56051f(0x84)](){const _0x1e53ce=_0x56051f,_0xd84cee={'wxwxs':function(_0x53e697,_0x435b42){return _0x53e697===_0x435b42;}};if(_0xd84cee['wxwxs'](this[_0x1e53ce(0x7f)][_0x1e53ce(0xb1)],0x0))return;const _0x12f403=this['buffer'][_0x1e53ce(0xaf)](0x0);try{await this['sendBatch'](_0x12f403);}catch{}}['buildEvent'](_0x3f74a6){const _0x5760ff=_0x56051f;return{'eventType':_0x3f74a6['eventType'],'command':this[_0x5760ff(0xa9)],'commandId':this['commandId'],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x3f74a6[_0x5760ff(0x9e)],'phase':_0x3f74a6['phase'],'phaseIndex':_0x3f74a6['phaseIndex'],'outcome':_0x3f74a6[_0x5760ff(0x83)],'errorMessage':_0x3f74a6['errorMessage'],'errorType':_0x3f74a6[_0x5760ff(0x70)],'featureId':this[_0x5760ff(0x6c)],'checklistItemId':this[_0x5760ff(0x78)],'browserSessionId':this['browserSessionId'],'transport':this['transport'],'evaluation':_0x3f74a6[_0x5760ff(0x81)],'cliVersion':this['cliVersion'],'nodeVersion':this['nodeVersion'],'platform':this['platform'],'cwd':process[_0x5760ff(0x91)](),'isTty':this['isTty'],'isCI':this['isCI'],'metadata':_0x3f74a6[_0x5760ff(0x86)]};}async['sendImmediate'](_0x222034){const _0x5e4890=_0x56051f;try{await this[_0x5e4890(0xa1)]([_0x222034]);}catch{}}[_0x56051f(0xb9)](){const _0x4aac28=_0x56051f;if(this[_0x4aac28(0x79)])return;this['flushing']=this[_0x4aac28(0x84)]()[_0x4aac28(0xac)](()=>{const _0x34aa75=_0x4aac28;this[_0x34aa75(0x79)]=null;});}async[_0x56051f(0xa1)](_0x2885ee){const _0x6f59ab=_0x56051f,_0x2d8ee4={'jCXHB':function(_0x258743){return _0x258743();},'wVKYE':function(_0x122617){return _0x122617();},'ghrGE':'Authorization','YkzoX':function(_0x1a3981,_0xbdaa6c,_0x971400){return _0x1a3981(_0xbdaa6c,_0x971400);},'nuNgi':_0x6f59ab(0x7b),'hPGii':function(_0x427d45,_0x749ca){return _0x427d45(_0x749ca);}},_0x52a506=await _0x2d8ee4['jCXHB'](getToken)[_0x6f59ab(0x6e)](()=>null),_0x364129=_0x2d8ee4[_0x6f59ab(0x87)](getApiBaseUrl),_0x18ba8d={'Content-Type':'application/json'};_0x52a506&&(_0x18ba8d[_0x2d8ee4[_0x6f59ab(0xb2)]]=_0x6f59ab(0x95)+_0x52a506);const _0x1f87e2={'events':_0x2885ee};process[_0x6f59ab(0x80)][_0x6f59ab(0xa8)]&&console['error'](_0x6f59ab(0xb4)+_0x2885ee[_0x6f59ab(0xb1)]+_0x6f59ab(0x92)+_0x364129+_0x6f59ab(0x82));const _0x4fec1d=new AbortController(),_0x518322=_0x2d8ee4['YkzoX'](setTimeout,()=>_0x4fec1d[_0x6f59ab(0x6d)](),0x1388);try{await fetch(_0x364129+_0x6f59ab(0x82),{'method':_0x2d8ee4[_0x6f59ab(0xa2)],'headers':_0x18ba8d,'body':JSON[_0x6f59ab(0x7e)](_0x1f87e2),'signal':_0x4fec1d['signal']});}finally{_0x2d8ee4['hPGii'](clearTimeout,_0x518322);}}}let currentCollector=null;function _0x2823(){const _0x160aca=['commandId','26691qMXHns','featureId','abort','catch','trackCommandError','errorType','command_end','iOFEc','4862754FUTXKo','TvawX','buildEvent','24672040wCDKYk','2216wbkueO','checklistItemId','flushing','1FFCTxf','POST','isTty','sndrV','stringify','buffer','env','evaluation','/api/v1/mcp/cli-telemetry','outcome','flush','now','metadata','wVKYE','phase_start','trackPhaseStart','wkBkF','nodeVersion','330192mITCEI','command_start','20RaotBR','wfRZv','lvIUq','cwd','\x20event(s)\x20to\x20','split','stdout','Bearer\x20','platform','commandStartTime','dPZTP','trackPhaseEnd','GITHUB_ACTIONS','cliVersion','phaseStartTimes','Unknown','durationMs','success','1244018UyisjL','sendBatch','nuNgi','browserSessionId','setContext','.session','trackCommandStart','trackCommandEnd','DEBUG','command','transport','trackPhaseError','finally','25540vMWZLM','deviceId','splice','sendImmediate','length','ghrGE','command_error','[telemetry]\x20Sending\x20','phase_end','hNQhZ','name','isCI','flushAsync','TszBf','3154584nySVDC','delete'];_0x2823=function(){return _0x160aca;};return _0x2823();}export function createTelemetryCollector(_0x25ad18){return currentCollector=new TelemetryCollector(_0x25ad18),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x3f33d3,_0x5a5f51,_0x2fe364){const _0x593c7d=_0x56051f,_0x5f492f={'wfRZv':function(_0x487c09,_0x1168d8){return _0x487c09(_0x1168d8);},'AGPem':function(_0x2e7c78,_0x166b55){return _0x2e7c78(_0x166b55);}},_0x42e41b=_0x5f492f[_0x593c7d(0x8f)](createTelemetryCollector,_0x3f33d3);await _0x42e41b[_0x593c7d(0xa6)](_0x2fe364);try{const _0xb47cec=await _0x5f492f['AGPem'](_0x5a5f51,_0x42e41b);return await _0x42e41b[_0x593c7d(0xa7)](_0x593c7d(0x9f)),_0xb47cec;}catch(_0x5658b7){await _0x42e41b[_0x593c7d(0x6f)](_0x5658b7);throw _0x5658b7;}finally{await _0x42e41b[_0x593c7d(0x84)]();}}function truncate(_0x582fbb,_0x1d2343){const _0x4a089a=_0x56051f,_0x5a1835={'TvawX':function(_0x5a5074,_0x11c967){return _0x5a5074+_0x11c967;}};return _0x582fbb['length']>_0x1d2343?_0x5a1835[_0x4a089a(0x74)](_0x582fbb['slice'](0x0,_0x1d2343),'...'):_0x582fbb;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1bd29e,_0x584641){const _0x51f32a=_0xbbdf,_0x331020=_0x1bd29e();while(!![]){try{const _0x34dad1=-parseInt(_0x51f32a(0x182))/0x1+-parseInt(_0x51f32a(0x186))/0x2*(-parseInt(_0x51f32a(0x183))/0x3)+-parseInt(_0x51f32a(0x179))/0x4*(-parseInt(_0x51f32a(0x185))/0x5)+-parseInt(_0x51f32a(0x17b))/0x6+parseInt(_0x51f32a(0x17d))/0x7*(parseInt(_0x51f32a(0x173))/0x8)+parseInt(_0x51f32a(0x175))/0x9+-parseInt(_0x51f32a(0x17f))/0xa;if(_0x34dad1===_0x584641)break;else _0x331020['push'](_0x331020['shift']());}catch(_0x10d874){_0x331020['push'](_0x331020['shift']());}}}(_0x3381,0x5e7b3));function _0x3381(){const _0x55f1d3=['json','1779600uvQcAn','stringify','7TLxxJP','refreshToken','6377820DWnMop','timeout','wFwzf','183822rAQyYn','3CgtnLx','POST','85BZmBJh','1389828PmWziZ','1678848XGYPkc','/cli-auth/refresh','4964445hakSAn','token','application/json','/cli-auth/partner-refresh','11488Bahczm'];_0x3381=function(){return _0x55f1d3;};return _0x3381();}function _0xbbdf(_0x329b0a,_0x1aa44b){_0x329b0a=_0x329b0a-0x173;const _0x33816a=_0x3381();let _0xbbdf1f=_0x33816a[_0x329b0a];return _0xbbdf1f;}import{getApiBaseUrl}from'./environment.js';import{getRefreshToken,storeToken,storeRefreshToken}from'./keychain.js';export async function refreshCliToken(){const _0x4465fa={'SacXL':function(_0x307ede,_0x44b690){return _0x307ede(_0x44b690);}},_0x1ff7d6=await getRefreshToken();if(!_0x1ff7d6)return null;const _0x2c9d38=await tryPartnerRefresh(_0x1ff7d6);if(_0x2c9d38)return _0x2c9d38;return _0x4465fa['SacXL'](tryWorkosRefresh,_0x1ff7d6);}export async function refreshPartnerCliToken(_0x16a2a7,_0x247a0a={}){const _0x3b303e={'mgepG':function(_0x250d93,_0x4e11cf){return _0x250d93(_0x4e11cf);}},_0x2b49d5=await _0x3b303e['mgepG'](tryPartnerRefresh,_0x16a2a7);return _0x2b49d5&&_0x247a0a['persistRefreshToken']&&await storeRefreshToken(_0x16a2a7),_0x2b49d5;}async function tryPartnerRefresh(_0x16c0de){const _0x6c2072=_0xbbdf,_0x535c47={'RnMFb':_0x6c2072(0x184)},_0x36bcf1=getApiBaseUrl();try{const _0x2f42c=await fetch(_0x36bcf1+_0x6c2072(0x178),{'method':_0x535c47['RnMFb'],'headers':{'Content-Type':_0x6c2072(0x177)},'body':JSON[_0x6c2072(0x17c)]({'refreshToken':_0x16c0de}),'signal':AbortSignal[_0x6c2072(0x180)](0x2710)});if(!_0x2f42c['ok'])return null;const _0x8ecd03=await _0x2f42c[_0x6c2072(0x17a)]();return await storeToken(_0x8ecd03['token']),_0x8ecd03['token'];}catch{return null;}}async function tryWorkosRefresh(_0x25c936){const _0x28eaa5=_0xbbdf,_0x411f1a={'wFwzf':'application/json'},_0x33dde5=getApiBaseUrl();try{const _0x506205=await fetch(_0x33dde5+_0x28eaa5(0x174),{'method':_0x28eaa5(0x184),'headers':{'Content-Type':_0x411f1a[_0x28eaa5(0x181)]},'body':JSON['stringify']({'refreshToken':_0x25c936}),'signal':AbortSignal['timeout'](0x2710)});if(!_0x506205['ok'])return null;const _0x30925f=await _0x506205['json']();return await storeToken(_0x30925f[_0x28eaa5(0x176)]),await storeRefreshToken(_0x30925f[_0x28eaa5(0x17e)]),_0x30925f[_0x28eaa5(0x176)];}catch{return null;}}
|