icoa-cli 2.19.141 → 2.19.142
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/dist/commands/ai4ctf.js +1 -1
- package/dist/commands/demo2.js +1 -1
- package/dist/commands/exam.js +1 -1
- package/dist/lib/main-rl.d.ts +20 -0
- package/dist/lib/main-rl.js +1 -0
- package/dist/repl.js +1 -1
- package/package.json +1 -1
package/dist/commands/ai4ctf.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(b,j){const a4=a0j,k=b();while(!![]){try{const p=parseInt(a4(0x180))/(-0x58*-0x11+-0x507+-0xd0)*(parseInt(a4(0x1a5))/(-0x233a+0x10*-0xa+0x23dc))+parseInt(a4(0x24f))/(-0x3cd*-0x3+-0x6*0x55b+-0xa5f*-0x2)+parseInt(a4(0x228))/(-0x15*0x1d5+0x1ef7+0x3c3*0x2)+-parseInt(a4(0x1ec))/(0x1c9b+-0x1dee+0x158*0x1)+-parseInt(a4(0x18d))/(0x1*-0x2011+0x9c6*0x1+-0xc5*-0x1d)+parseInt(a4(0x23f))/(0xf22+-0xa59+0x4c2*-0x1)+parseInt(a4(0x216))/(-0x2092+0x265e+0x3*-0x1ec)*(-parseInt(a4(0x211))/(0x764*-0x1+0x1eb7+-0x2*0xba5));if(p===j)break;else k['push'](k['shift']());}catch(q){k['push'](k['shift']());}}}(a0b,0x1f5*-0xbc9+-0x424bd+0x6*0x69d63));import a0p from'chalk';import{createChatSession as a0q}from'../lib/gemini.js';import{addTokenUsage as a0v}from'../lib/budget.js';import{getConfig as a0w}from'../lib/config.js';import{logCommand as a0x}from'../lib/logger.js';import{printMarkdown as a0z,printError as a0A}from'../lib/ui.js';import{t as a0B}from'../lib/i18n.js';const i=b=>new Promise(j=>setTimeout(j,b));let s=!(-0x7*-0x2f6+-0x5f2*0x1+-0xec7),g=null,r=0x1bdc+0xe5d+0x4b1*-0x9,y=!(0x25c2+-0x13dc+0x3*-0x5f7);const h=0x9*0x112a+0x4*0xba2+-0x675a;let u=null;export function isChatActive(){return s;}function d(){const a5=a0j,b=u?h:0x2244+-0x12db+0x41f,j=r,k=Math[a5(0x177)](Math['round'](j/b*(0x1*0x1591+0x1*0x1a31+0x1*-0x2f5e)),-0x1888+0x6c5+-0x1*-0x1227),p=Math[a5(0x16d)](k/(0x2580+0x227b+-0x4797*0x1)*(-0x24a3+-0x1*0x15e3+0x3a9a)),q=0x1423*-0x1+0xc2*-0x1d+0x2a31-p,v=k>-0x9ca+0x2045*-0x1+0x2a5f?a0p['red']:k>-0x1*-0x765+0x1*0x4d5+-0xc08?a0p[a5(0x1bc)]:a0p[a5(0x248)],w=u?'AI4CTF\x20section':'Tokens';console[a5(0x1a2)](a0p['gray']('\x20\x20'+w+':\x20')+v('█'[a5(0x242)](p))+a0p[a5(0x1e9)]('░'[a5(0x242)](q))+a0p[a5(0x1e9)]('\x20'+j+'/'+b+'\x20('+k+'%)'));}export async function handleChatMessage(p){const a6=a0j;if(!g)return a6(0x18f);if(a0x(a6(0x1e3)+p),u)return m(p);const q=p[a6(0x234)]()[a6(0x1fa)]()[a6(0x24c)](/^hint\s+([abc])$/);if(q)return function(z){const a7=a6,A=a0B('a'===z?a7(0x189):'b'===z?a7(0x1c2):a7(0x1c3)),B=a0B('a'===z?a7(0x238):'b'===z?a7(0x264):a7(0x24a)),C=a7(0x247)+z['toUpperCase'](),D='a'===z?a0p[a7(0x248)]:'b'===z?a0p[a7(0x1bc)]:a0p[a7(0x201)];console['log'](),console[a7(0x1a2)](D[a7(0x207)](a7(0x267)+C+'\x20\x20')+a0p[a7(0x1e9)](A)),console[a7(0x1a2)]();for(const E of B[a7(0x21c)]('\x0a'))''===E?console['log']():console['log'](a0p[a7(0x252)](a7(0x1ca)+E));console[a7(0x1a2)](),'a'===z?(console['log'](a0p[a7(0x1e9)](a7(0x1ca)+a0B('ai4ctfHintNextA')+'\x20')+a0p[a7(0x245)](a7(0x1a4))),console[a7(0x1a2)]()):'b'===z&&(console[a7(0x1a2)](a0p['gray']('\x20\x20\x20\x20'+a0B('ai4ctfHintNextB')+'\x20')+a0p[a7(0x245)](a7(0x1c9))),console[a7(0x1a2)]());}(q[-0xb99+0x3*-0x356+-0x1*-0x159c]),a6(0x232);const v=p[a6(0x24c)](/^submit\s+(.+)/i);if(v){let z=v[0x180b+0x2509*0x1+-0x35*0x127]['trim']();if(/^submit\s+/i['test'](z)&&(z=z[a6(0x19d)](/^submit\s+/i,'')['trim']()),z=z['replace'](/^["'`]+|["'`]+$/g,'')[a6(0x234)](),'icoa{w3lc0me_2_ai4ctf}'===z){console[a6(0x1a2)](),console[a6(0x1a2)](a0p[a6(0x248)][a6(0x207)](a6(0x1c6))),console[a6(0x1a2)](a0p[a6(0x248)][a6(0x207)]('\x20\x20'+a0B('ai4ctfCorrectFlag'))),console[a6(0x1a2)](a0p['green']['bold'](a6(0x1c6))),console[a6(0x1a2)](),console[a6(0x1a2)](a0p[a6(0x252)]('\x20\x20'+a0B(a6(0x215)))),console[a6(0x1a2)](a0p[a6(0x1e9)]('\x20\x20'+a0B(a6(0x23d)))),console[a6(0x1a2)](),d(),s=!(0x1*-0x179b+0x141c+-0x1c0*-0x2),g=null,fetch(a6(0x20f),{'method':'POST','headers':{'Content-Type':a6(0x1ed)},'body':JSON['stringify']({'type':'ai4ctf','solved':!(0x699+0x1*-0x23b0+-0x2a5*-0xb),'tokensUsed':r,'timestamp':new Date()[a6(0x1db)]()}),'signal':AbortSignal[a6(0x188)](-0x1ba8+-0xf7*0x21+0x1*0x4f07)})[a6(0x1ac)](()=>{}),await i(0x258+0x146*0x11+-0x1222),console[a6(0x1a2)](),console[a6(0x1a2)](a0p[a6(0x245)](a6(0x221))),console['log'](a0p[a6(0x207)]['white']('\x20\x20'+a0B(a6(0x246)))),console[a6(0x1a2)](a0p[a6(0x245)](a6(0x221))),console['log']();const A=a0B(a6(0x219)),B=a0B('ai4ctfWrapLine1Body');console[a6(0x1a2)](a0p['white']('\x20\x20\x20\x201.\x20'+A+'\x20')+a0p[a6(0x1e9)](B[a6(0x21c)]('\x0a')[0x6*-0x59f+-0x8d9*0x1+0x2a93]||''));for(const F of B[a6(0x21c)]('\x0a')['slice'](0x1f2e+-0x241+0xe76*-0x2))F['trim']()&&console[a6(0x1a2)](a0p[a6(0x1e9)](a6(0x225)+F[a6(0x19d)](/\{thinking\}/g,a6(0x178))));console[a6(0x1a2)](),console[a6(0x1a2)](a0p[a6(0x252)](a6(0x265)+a0B(a6(0x259))+'\x20')+a0p[a6(0x1e9)](a0B('ai4ctfWrapLine2Body'))),console[a6(0x1a2)](),console[a6(0x1a2)](a0p[a6(0x245)](a6(0x23b))),console[a6(0x1a2)](),await i(0x1852+0x4*-0x62e+0x836*0x1),console[a6(0x1a2)](a0p[a6(0x245)]('\x20\x20─────────────────────────────────────────────')),console['log'](a0p['bold'][a6(0x252)]('\x20\x20'+a0B(a6(0x25e)))),console[a6(0x1a2)](a0p[a6(0x245)]('\x20\x20─────────────────────────────────────────────')),console[a6(0x1a2)](),console[a6(0x1a2)](a0p['yellow'](a6(0x192))+a0p[a6(0x252)](a0B(a6(0x18b))[a6(0x23a)](0x1*-0x20d7+0x178b+0x966))+a0p['gray'](a0B(a6(0x25f)))),console[a6(0x1a2)](a0p[a6(0x1bc)](a6(0x257))+a0p[a6(0x252)](a0B(a6(0x237))[a6(0x23a)](-0x25f*0x9+-0x1b32+-0x30a3*-0x1))+a0p[a6(0x1e9)](a0B('ai4ctfWrapQuotaBHint'))),console[a6(0x1a2)](a0p[a6(0x1bc)](a6(0x1e8))+a0p[a6(0x252)](a0B(a6(0x263))['padEnd'](0x24ac+-0xb*-0x15b+0x337b*-0x1))+a0p[a6(0x1e9)](a0B('ai4ctfWrapQuotaCHint'))),console[a6(0x1a2)]();for(const G of a0B(a6(0x1c8))[a6(0x21c)]('\x0a'))console[a6(0x1a2)](a0p['gray']('\x20\x20\x20\x20'+G));console[a6(0x1a2)](),await i(-0x28a+-0xdd*-0x27+-0x1751),console[a6(0x1a2)](a0p[a6(0x245)]('\x20\x20─────────────────────────────────────────────')),console['log'](a0p[a6(0x207)][a6(0x252)]('\x20\x20'+a0B(a6(0x1f5))+'\x20')+a0p[a6(0x201)][a6(0x207)]('ctf4ai')+a0p['white'](a6(0x194)+a0B(a6(0x1f6)))),console[a6(0x1a2)](a0p[a6(0x245)](a6(0x221))),console[a6(0x1a2)]();const C=a0B('ai4ctfWrapNextBody'),D=a0B(a6(0x20d)),E=C[a6(0x21c)]('\x0a');if(E[-0xef2+-0x12c9+0x21bb]){const [H,I]=E[-0x319*-0x1+0x1a85+-0x2*0xecf][a6(0x21c)](a6(0x230));console[a6(0x1a2)](a0p[a6(0x252)]('\x20\x20\x20\x20'+(H||''))+a0p[a6(0x207)]['white'](D)+a0p[a6(0x252)](I||''));}for(const J of E[a6(0x250)](0x1f*0x7f+-0x188f*-0x1+-0x27ef))J[a6(0x234)]()&&console[a6(0x1a2)](a0p['white'](a6(0x1ca)+J));return console[a6(0x1a2)](),console['log'](a0p['gray'](a6(0x1ca)+a0B(a6(0x22e))+'\x20')+a0p[a6(0x207)]['red']('ctf4ai')),console[a6(0x1a2)](),a6(0x18f);}return console[a6(0x1a2)](),console[a6(0x1a2)](a0p[a6(0x201)]('\x20\x20'+a0B('ai4ctfWrongFlag'))),console['log'](a0p[a6(0x1e9)]('\x20\x20'+a0B(a6(0x20b)))),console[a6(0x1a2)](),a6(0x232);}if(p['startsWith']('!')){const K=p[a6(0x250)](-0x2*-0xaae+0x319*-0x3+-0xc10)['trim']();if(!K)return a6(0x232);try{const L={};L['encoding']='utf-8',L[a6(0x188)]=0x2710;const {execSync:M}=await import('node:child_process'),N=M(K,L)[a6(0x234)]();console[a6(0x1a2)](),console[a6(0x1a2)](a0p[a6(0x1e9)](a6(0x16e))+a0p['white'](K)),console[a6(0x1a2)](a0p[a6(0x252)]('\x20\x20'+N[a6(0x21c)]('\x0a')['join'](a6(0x223)))),console[a6(0x1a2)](),console[a6(0x1a2)](a0p[a6(0x1e9)]('\x20\x20'+a0B(a6(0x1ce)))),console[a6(0x1a2)]();}catch(O){console['log'](),console[a6(0x1a2)](a0p[a6(0x201)]('\x20\x20Error:\x20'+(O[a6(0x255)]?.[a6(0x21c)]('\x0a')[0xaae+-0x252b*-0x1+-0x9*0x551]||a6(0x1fd)))),console[a6(0x1a2)]();}return a6(0x232);}const w={};w[a6(0x1a3)]='application/json';if('exit'===p||'back'===p||a6(0x1aa)===p||a6(0x182)===p)return s=!(-0xd86+-0x1101+0x1e88),g=null,fetch(a6(0x20f),{'method':a6(0x1dc),'headers':w,'body':JSON[a6(0x25a)]({'type':'ai4ctf','tokensUsed':r,'timestamp':new Date()[a6(0x1db)]()}),'signal':AbortSignal[a6(0x188)](0xae6+-0x1b58+0x23fa)})[a6(0x1ac)](()=>{}),console[a6(0x1a2)](),console['log'](a0p[a6(0x1e9)](a6(0x1b6))),console[a6(0x1a2)](a0p[a6(0x252)]('\x20\x20'+a0B(a6(0x1f4)))),console['log'](a0p[a6(0x1e9)]('\x20\x20'+a0B(a6(0x25d))+':\x20'+r+'/5000')),console[a6(0x1a2)](a0p['gray']('\x20\x20'+a0B(a6(0x24e))+a6(0x183))),console[a6(0x1a2)](a0p[a6(0x1e9)](a6(0x1b6))),console['log'](),console[a6(0x1a2)](a0p[a6(0x245)]('\x20\x20─────────────────────────────────────────────')),console[a6(0x1a2)](a0p[a6(0x252)]('\x20\x20'+a0B(a6(0x1f8))+'\x20')+a0p[a6(0x207)]['red'](a6(0x1d7))+a0p[a6(0x252)]('\x20—\x20'+a0B(a6(0x1ae)))),console[a6(0x1a2)](a0p['gray']('\x20\x20'+a0B(a6(0x22a)))),console[a6(0x1a2)](a0p[a6(0x245)]('\x20\x20─────────────────────────────────────────────')),console[a6(0x1a2)](),console[a6(0x1a2)](a0p['bold']['red'](a6(0x1ee))+a0p['gray'](a6(0x21b)+a0B('ai4ctfExitCmdNext'))),console[a6(0x1a2)](a0p[a6(0x252)]('\x20\x20\x20\x20\x20back')+a0p[a6(0x1e9)](a6(0x1f7)+a0B(a6(0x1a7)))),console['log'](),a6(0x18f);const x={};x[a6(0x1a3)]='application/json';if(!y&&r>=0x1d1f+0x4f2*0x7+-0x2c35)return y=!(-0x2646+0xb*0x2+0x2630),fetch(a6(0x20f),{'method':a6(0x1dc),'headers':x,'body':JSON[a6(0x25a)]({'type':a6(0x199),'solved':!(-0x1aa7+0x1181+0x927),'tokensUsed':r,'timestamp':new Date()[a6(0x1db)]()}),'signal':AbortSignal['timeout'](-0x3cc+-0xfb8+-0x4*-0x9c3)})[a6(0x1ac)](()=>{}),console['log'](),console['log'](a0p['yellow']('\x20\x20'+a0B('tokenLimit'))),d(),(function(){const a8=a6;console[a8(0x1a2)](),console[a8(0x1a2)](a0p[a8(0x1bc)](a8(0x221))),console[a8(0x1a2)](a0p[a8(0x207)][a8(0x1bc)]('\x20\x20'+a0B(a8(0x16f)))),console[a8(0x1a2)](a0p[a8(0x1bc)]('\x20\x20─────────────────────────────────────────────')),console['log']();for(const P of a0B(a8(0x1af))[a8(0x21c)]('\x0a'))''===P?console['log']():console[a8(0x1a2)](a0p[a8(0x252)](a8(0x1ca)+P));console[a8(0x1a2)](),console['log'](a0p[a8(0x245)](a8(0x210))),console[a8(0x1a2)](),console[a8(0x1a2)](a0p[a8(0x252)](a8(0x1ca)+a0B(a8(0x268)))),console['log'](),console[a8(0x1a2)](a0p['green'](a8(0x19f))),console[a8(0x1a2)](),console[a8(0x1a2)](a0p[a8(0x252)]('\x20\x20\x20\x20'+a0B(a8(0x16b)))),console['log'](),console['log'](a0p[a8(0x245)](a8(0x179))),console[a8(0x1a2)](),console['log'](a0p[a8(0x1e9)](a8(0x1ca)+a0B(a8(0x1ef)))),console[a8(0x1a2)]();}()),a6(0x232);if(y)return console[a6(0x1a2)](),console['log'](a0p[a6(0x1bc)]('\x20\x20'+a0B(a6(0x1ea)))),console['log'](a0p[a6(0x1e9)]('\x20\x20'+a0B(a6(0x195))+'\x20')+a0p['cyan'](a6(0x1d1))),console[a6(0x1a2)](a0p['gray']('\x20\x20'+a0B(a6(0x1eb))+'\x20')+a0p[a6(0x245)](a6(0x1a1))),console[a6(0x1a2)](),a6(0x232);console[a6(0x1a2)](a0p[a6(0x1e9)]('\x20\x20'+a0B(a6(0x236))));try{const P=await g[a6(0x25c)](p);process[a6(0x229)]['write'](a6(0x1dd)),r+=P[a6(0x227)],a0v(P[a6(0x227)]),console[a6(0x1a2)](),a0z(P['text']),d(),console[a6(0x1a2)]();}catch(Q){process[a6(0x229)][a6(0x1cb)]('\x1b[1A\x1b[2K'),a0A(a6(0x254)+Q[a6(0x255)]),console[a6(0x1a2)]();}return a6(0x232);}function a0j(a,b){a=a-(-0x1564+-0x1b9*-0x1+0x1*0x150b);const c=a0b();let d=c[a];if(a0j['RROiFH']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=-0x19bb+-0x7*-0x2f6+-0x501*-0x1,o,p,q=-0x33b*0x4+0x1bdc+0x1de*-0x8;p=i['charAt'](q++);~p&&(o=n%(0x25c2+-0x13dc+0x7*-0x28e)?o*(0x7*0x46a+0x1*0x94f+-0x27f5)+p:p,n++%(0x2244+-0x12db+-0xf65))?l+=String['fromCharCode'](0x1*0x1591+0x1*0x1a31+0x1*-0x2ec3&o>>(-(-0x1888+0x6c5+-0x1*-0x11c5)*n&0x2580+0x227b+-0x47f5*0x1)):-0x24a3+-0x1*0x15e3+0x3a86){p=j['indexOf'](p);}for(let r=0x1423*-0x1+0xc2*-0x1d+0x2a1d,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](-0x9ca+0x2045*-0x1+0x2a1f))['slice'](-(-0x1*-0x765+0x1*0x4d5+-0xc38));}return decodeURIComponent(m);};a0j['vcCIXq']=e,a0j['dgeXhn']={},a0j['RROiFH']=!![];}const f=c[-0xb99+0x3*-0x356+-0x1*-0x159b],g=a+f,h=a0j['dgeXhn'][g];return!h?(d=a0j['vcCIXq'](d),a0j['dgeXhn'][g]=d):d=h,d;}function a0b(){const ag=['quKGzxjYB3i6ia','BwvZC2fNzq','icbr','icaGicaGigHPBNqGyIaGia','lNr4DcbPBNnPzguGDgHLignVBNrLC3rHBNqNCYbZyw5KyM94iokaLcbWyxrOigLZihjLBgf0AxzLihrVihrOzsbZyw5KyM94j3mGl2HVBwuVy29TCgv0AxrVCIb3B3jRAw5NigrPCMvJDg9YEsWGCMvHy2HHyMXLigzYB20Gyw55icfZAgvSBcaVicfWExrOB24ZigLUDM9JyxrPB24PoGO','ywK0y3rMv3jHCeXPBMuYsgvHza','C3rYAw5NAwz5','ihrVA2vUCYbSzwz0lG','C2vUze1LC3nHz2u','ywK0y3rMvg9Rzw5Z','ywK0y3rMv3jHCff1B3rHC1rPDgXL','ywK0y3rMv3jHCff1B3rHquHPBNq','icaGicaGicaGicaGieXLyxzLignOyxqSihjLDhvYBIb0BYbLEgfT','ywK0y3rMtgv2zwXZ','icdILRGGsgLUDca','ywK0y3rMv3jHCff1B3rHqW','ywK0y3rMsgLUDejcB2r5','icaGidiUia','icdIMQaGquK0q1rgihrVA2vUigj1zgDLDcbLEgHHDxn0zwqGkdi1ldaWmcb1C2vKks4','icdILRGG','ywK0y3rMuMv2zwfSu2vLrMXHzW','C3vIBwL0ieLdt0f7Ew91CL9MBgfNFq','C3vIBwL0ieLdt0f7lI4UFq','ywK0y3rMrw5Ku2vZC2LVBG','ywK0y3rMsgLUDfrLy2HUAxf1zq','icaGigHPBNqGysaVigiGlYbJica','zw5JB2rPBMC','icaGifjLywXSEsbZDhvJAZ8Gvhj5oIa','iIbSB29RCYbSAwTLigfUie1dusbSzxr0zxiSig5VDcbHigzSywCU','icbnB2rLBdOGr29Vz2XLieDLBw1HidqGka','y2f0zwDVCNK','icaGigHPBNqGyq','iMHVDYbKBYbjigrLy3j5ChqGquvtluncqYbPBIbqExrOB24/iG','ywK0y3rMuMv2zwfSvgHLBLn1yM1PDa','AgLUDhm','CM91BMq','icaKia','ywK0y3rMuMv2zwfSvgL0Bgu','Dgv4Da','icaGicbsDw4GuhL0Ag9UigLUihnOzwXS','ywK0y3rMv2vSy29Tzu5VuMv2zwfS','yw5ZD2vYx2nOyw5Nzwq','icbbstrdveyGC2vJDgLVBIbJB21WBgv0zsdIGjqG','icdILzdILzdILzaGquK0q1rgiokaLcbr','icaGicaGicaGicaGifjLDhvYBIb0BYbTywLUig1LBNuGkhDVCMTZigfUExDOzxjLkq','BwLU','DgHPBMTPBMC','icaGicaGicbZDwjTAxqGAwnVyxT3m2XJmg1LxZjFywK0y3rMFq','C3rHCNrZv2L0Aa','C3vIBwL0idXMBgfNpG','icaGicaGicaGicaGica','ywK0y3rMu3vIBwL0q21K','yw5ZD2vYx3n1yM1PDhrLza','icaGicHhCMfKAw5NigHHChbLBNmGyxqGzxHHBsbZDwjTAxqG4OcuihLVDsbJyw5UB3qGChjLDMLLDYbJB3jYzwn0BMvZCYbKDxjPBMCGDgHLigv4yw0Ukq','mMzutgvABG','icbgBgfNigzVCM1HDdOG','BwvUDq','oIbhB29NBguGr2vTBweGncaOz2vTBweTnc0ZmwiTAxqP','icdINjmGqw5ZD2vYigzVCIbr','ywK0y3rMt3jdAgf0rxHHBxbSzq','icaGifbYzxzPB3vZoIa','q2HHDcb3AxrOihLVDxiGquKGDgvHBw1HDgu','DgLTzw91Da','ywK0y3rMsgLUDee','icaGicaGicaGicbuzwnOBMLXDwuGAgLUDcaOChjLlxDYAxr0zw4P','ywK0y3rMv3jHCff1B3rHqq','AgLUDcbH','mJC5mZq4AuP1Eu56','icaGihn1yM1PDcbjq09bEY4UlN0','zxHPDa','ywn0Aw9U','icbB','icaGicaGigHPBNqGysaGia','lI4U','iokaLca','ywK0y3rMtg9JA2vKvxnL','icdILiZILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILia','igzVCIbrmZK','icbzB3uGy2fUihn0AwXSihn1yM1PDcbHigzSywCGzgLYzwn0BhK6ia','ywK0y3rM','ww91igfYzsbHBIbbssb0zwfTBwf0zsbOzwXWAw5NigeGy29UDgvZDgfUDcbZB2X2zsbHBIbjq09bidiWmJyGy3LIzxjZzwn1CML0EsbLEgfTihf1zxn0Aw9UlGOkq1vsuKvovcbrvuvtveLptIaOuq','ihrVig1VDMuGB24','rMXHzYbMB3jTyxq6igLJB2f7lI4UFq','CMvWBgfJzq','ixnOzwXS','icaGicaGicbPy29HE3CZBgmWBwvFmL9HAtrJDgz9','icboB3rLoIa1mcuGB2yGC2vJDgLVBIbbssbIDwrNzxqGDxnLzc4','C3vIBwL0igLJB2f7DZnSyZbTzv8Yx2fPngn0zN0','Bg9N','q29UDgvUDc1uExbL','AgLUDcbI','nJK0nZuYuxbutvzd','icaGifn0DwnRpYbuCNK6ia','ywK0y3rMrxHPDenTzejHy2S','ywK0y3rMsw50zxjJzxb0zwq','ywK0y3rMq21KsgLUDeXPBMu','CxvPDa','CxvLC3rPB25Z','y2f0y2G','zxHHBsbXidmX','ywK0y3rMrxHPDe5LEhrtDwi','ywK0y3rMuMv2zwfSqM9KEq','Cg9PBNrZ','ywK0y3rMrxHPDa','x2XHC3rr','ywK0y3rMsgLUDenvC2vZ','iwvJAg8GyvDoDI4UlIb8igjHC2u2ncaTza','icaG4OAsia','icdILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILia','zxHHBsbHBNn3zxiG','icdINjmGuq','CxvLC3rPB24','icdILzdILzdILzaG','ywLvC2fNzq','EwvSBg93','lIbuCNKGywDHAw4GAw5ZAwrLihrOAxmGy2HHDc4','icaGiokgKIa','ywK0y3rMq21Ku2HLBgXmAw5L','icdIMQaGww91CIbbstrdveyGDg9Rzw4GyNvKz2v0igLZigv4Agf1C3rLzc4','icaGicaGicaGicblzxKGyNjLywT0AhjVDwDOicHWCMuTD3jPDhrLBIK','ywK0y3rMsgLUDei','ywK0y3rMsgLUDem','icbfCNjVCJOG','icdcTYaGuMuTzw50zxi6ia','icdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILza','AgfZ','ywK0y3rMv3jHCff1B3rHrM9VDgvY','AgLUDcbJ','icaGia','D3jPDgu','q3j5ChrVz3jHCgH5','ywK0y3rMsgLUDe51zgDL','ywK0y3rMrM91BMrgBgfN','z2vTBweTnc0ZmwiTAxq','imk3ia','iwvJAg8GyvDoDLLyDdnnmNHQtuCXBfH6sMzzv2SWwtnsBwzrpt0GFcbIyxnLnJqGlwq','rNvSBcbXDwvZDgLVBJOGia','zMLUza','ihjLy29YzgvKoIa','BMfTzq','ywK0y3rMsgLUDefvC2vZ','y3rMngfP','icbzB3uGyxjLig9Uife','ywK0y3rMq2HHBgXLBMDL','icaGicaGicaGicbbigDLBNrSzsbUDwrNzsaOChjLlxDYAxr0zw4P','Dg9ju09tDhjPBMC','ue9tva','g1SXqrTBmKS','igfNywLUihrVignOyw5NzsWGB3iG','C29Tzq','y2XLyxi','BNvTyMvY','iokvKokvKokvKa','ywK0y3rMoIa','zgvZy3jPChrPB24','icbiB3CGDg8GD29YAYb0AgLZihf1zxn0Aw9U','ywK0y3rMsgLUDe5LEhrd','ywK0y3rMu2fTCgXL','icaGicaGigHPBNqGyYaGia','z3jHEq','ywK0y3rMtg9JA2vKvgL0Bgu','ywK0y3rMtg9JA2vKvgHLBG','mte4odK4mejyDwnXsa','yxbWBgLJyxrPB24VANnVBG','icaGicbJDgy0ywK','ywK0y3rMuMv2zwfStg9JA05VDgu','icbbzNrLCIbLEgL0oIa','ig5VDcbMB3vUzcbPBIbZDgf0zs4Gvhj5oIbLEgfTiheG','oIbhB29NBguGr2vTBweGncaO','sgLKzgvUie1LC3nHz2u','ywK0y3rMuMvWB3j0','ywK0y3rMv3jHCe5LEhruAxrSzq','ywK0y3rMv3jHCe5LEhrtDwi','icaGicaGicaGicaG','ywK0y3rMrxHPDe5LEhruAxrSzq','C3vIBwL0ia','Dg9mB3DLCKnHC2u','icdIMQaG','yMfJAW','q29TBwfUzcbMywLSzwq','yw5ZD2vYCW','icbdDxjYzw50igfUC3DLCJOG','icaGigHPBNqGyW','CMvK','icdILii','Aw50zxjHy3rPB25Z','lI4VBgLIl2v4yw0TC3rHDguUANm','BM9KztPJAgLSzf9WCM9JzxnZ','iNDOyxqGzw5JB2rPBMCGAxmGDgHPCZ8I','yM9Sza','DMLHigfPngn0zIbJAgf0','ywK0y3rMq29TBwfUzhm','icdIMQaGodaLig9MihnLy3rPB24GquKGyNvKz2v0ihvZzwqU','ywK0y3rMrMXHz0HPBNq','icdILjtILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILia','ywK0y3rMv3jHCe5VuhjVzW','ig9UifeZoq','Ahr0Chm6lY9WCMfJDgLJzs5Py29HmJaYnI5HDs9HCgKVAwnVys9Kzw1Vlxn0yxrZ','icaGicaGicaHzwnOBYbHv052wvH0m00YEgPnrZfSwhPkzLLxAZbzm1jTzLe9psb8igjHC2u2ncaTza','mtC1odi5ntHZAePovvG','DgvZDa','yxr0ywnOzwreyxrH','C3vIBwL0qxr0zw1WDgvK','ywK0y3rMrgvJB2rLza','oeDxu2Pira','z2vTAw5Ptw9KzwW','AgLUDhnvC2vK','ywK0y3rMv3jHCeXPBMuXsgvHza','cGPbvfrbq0HfrcbeqvrbicHHBhnVihnHDMvKihrVignOywXSzw5NzxmVCq','icaGicaGicaGia','C3bSAxq','icbszxn1Bwu6ia','icdILiiG','ywrK','DxrMltG','icdILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILia','icaGigv4Axq','cIaG','ihDPBgWGB3bLBIbr','icaGicaGia','icbHAtrJDgyGAxmGyxzHAwXHyMXLig9UifeZmEkaKZm4icHbstrdveyGC2vJDgLVBIKU','Dg9Rzw5ZvxnLza','mti3mdC5mKPMuNnwEa','C3rKB3v0','ywK0y3rMrxHPDe5LEhrcB2r5','jsbVzIbZzwn0Aw9Uiefjigj1zgDLDcb1C2vKiokaLcbVBMX5ih4','icaGicaGicaGicaGicaGicaGicbLlMCUia','ihbVAw50CYK6cG','ywK0y3rMv3jHCfr5CgvdDgy0ywK','icaGie5VihbYzs13CML0DgvUigHPBNqGyxqGDgHPCYb0AwvYigzVCIb0AgLZihf1zxn0Aw9UlG','E25VuhjVz30','icaGig1LBNu','y29UDgLUDwu','icbbzNrLCIbLEgL0oIbbstrdveyGC2vJDgLVBIbJB21WBgv0zs4GtMv4DdOG','DhjPBq','ieLdt0f7lI4UFq','ywK0y3rMvgHPBMTPBMC','ywK0y3rMv3jHCff1B3rHqG','ywK0y3rMsgLUDefcB2r5','icbozxH0oIa','CgfKrw5K','icaGicaGicaGicfLy2HVigfxtNzzwhqZttj4AK1hmwXyEKPMwvDRmfKZuM1Mut09ihWGyMfZzty0ic1K','icaOC3vIBwL0igfNywLUihrVignOyw5NzsK','ywK0y3rMv291BgrfyxjU','Cu51Bq','ndm1mJa2mw5yzMTrza','zw50zxjLzef0','icbezxrLy3rLzcbMBgfNiokaLcb0CMvHDgLUzYbHCZOG','CMvWzwf0','icbzB3uGy2fUihn0AwXSoIa','icbuAgLUA2LUzY4UlG','y3LHBG','ywK0y3rMv3jHCfrPDgXL','sgLUDca','z3jLzw4','ihrVignVBNrPBNvL','ywK0y3rMsgLUDencB2r5','iokaLcb0ExbLia','Bwf0y2G','BNvKz2vtAg93BG','ywK0y3rMtw9KzwW','ndi2ntq1n2XVDhjezq','C2XPy2u','cGPzt1vsifjvtevtoGOTifLVDsbnqvKGzxHWBgfPBIbJB25Jzxb0CYWGzgvZy3jPyMuGyxbWCM9Hy2HLCYWGyw5KigHLBhaGDgHLignVBNrLC3rHBNqGCMvHC29UihrOCM91z2GGDgHLihbYB2jSzw0UcI0Gww91ie1bwsbKAxnJDxnZihrOzsb0zwnOBM9SB2D5igLUDM9SDMvKicHbrvmSihb3BNrVB2XZlcbqExrOB24GC3rYDwn0lcbivfrqlcbLDgmUks4klsbzB3uGtufzigHLBhaGzgvIDwCGuhL0Ag9UignVzguGDgHLignVBNrLC3rHBNqGD3jPDgvZlGOTifLVDsbnvvnuie5pvcbYzxzLywWGDgHLigzSywCGzgLYzwn0BhKUcI0Gww91ie1vu1qGtK9uig91Dhb1DcbHBNKGC3rYAw5Nig1HDgnOAw5NieLdt0f7lI4UFsbVCIbPy29HEY4UlN0UcI0Gww91ie1vu1qGtK9uihrLBgWGDgHLignVBNrLC3rHBNqGDgHLigv4ywn0igfUC3DLCIb0BYb0AgLZihf1zxn0Aw9UlGOTifLVDsbnqvKGC3vNz2vZDcb3AgLJAcb0B29Sic8GBgLICMfYEsaVihrLy2HUAxf1zsb0BYb1C2uUcI0Gv2HLBIbZDwDNzxn0Aw5NihnOzwXSic8GChL0Ag9UihnUAxbWzxrZihrOyxqGBMvLzcb0AguGyxr0ywnOzwqGzgf0ysWGCMvMzxiGDg8GDgHLigzPBguGCgf0AcbJAgfSBgvUz2vZl3e','D2HPDgu','icbtDgLSBcbHDMfPBgfIBgu6ia'];a0b=function(){return ag;};return a0b();}const f=new Set();async function m(k){const a9=a0j;if(!u||!g)return a9(0x18f);const p=k[a9(0x234)](),q=p[a9(0x1fa)](),v=(Date['now']()-u[a9(0x240)])/(0x1*0x11480+-0x1ad88+0x18368);if(!u[a9(0x24d)]&&!u[a9(0x214)]&&u[a9(0x218)]['size']>=0xa1d*-0x3+0x1*-0xaf3+-0x6e2*-0x6&&v>=0x2522+0x112e*0x1+-0x364b&&(u[a9(0x24d)]=!(-0x26c5+-0xfa*-0x1d+0xa73),console['log'](),console[a9(0x1a2)](a0p[a9(0x1bc)]('\x20\x20💡\x20Once\x20you\x20have\x20ICOA{...},\x20submit\x20it\x20with:\x20')+a0p['bold'][a9(0x1bc)](a9(0x269))),console['log'](a0p[a9(0x1e9)]('\x20\x20\x20\x20\x20(type\x20it\x20right\x20here\x20in\x20this\x20chat\x20—\x20not\x20as\x20a\x20shell\x20command)')),console[a9(0x1a2)]()),/^ICOA\{[^}]+\}$/i[a9(0x212)](p))return console[a9(0x1a2)](),console['log'](a0p[a9(0x1e9)](a9(0x241))+a0p[a9(0x252)]('submit\x20'+p)),m(a9(0x1f9)+p);const x=q[a9(0x24c)](/^hint\s+([abc])$/);if(x){const A=x[0x1*0x1412+0x114*-0xc+0x19*-0x49]['toUpperCase'](),B=u[a9(0x1b9)][a9(0x16c)],C=B?.[A],D='A'===A?a0p[a9(0x248)]:'B'===A?a0p[a9(0x1bc)]:a0p['red'];if(console['log'](),console[a9(0x1a2)](D[a9(0x207)](a9(0x262)+A)),console[a9(0x1a2)](),C){for(const E of String(C)['split']('\x0a'))console[a9(0x1a2)](a0p[a9(0x252)](a9(0x1ca)+E));}else console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x22f)));return console[a9(0x1a2)](),'A'===A?console['log'](a0p[a9(0x1e9)](a9(0x1a6))+a0p['cyan'](a9(0x1a4))):'B'===A?console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x165))+a0p[a9(0x245)](a9(0x1c9))):'C'===A&&console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x1ca)+a0B(a9(0x1e6))+'\x20')+a0p[a9(0x207)][a9(0x248)](a9(0x269))),console[a9(0x1a2)](),a9(0x232);}const z=p[a9(0x24c)](/^submit\s+(.+)/i);if(z){let F=z[0x4fd+-0xa7a+0x2bf*0x2][a9(0x234)]();if(/^submit\s+/i[a9(0x212)](F)&&(F=F[a9(0x19d)](/^submit\s+/i,'')[a9(0x234)]()),F=F[a9(0x19d)](/^["'`]+|["'`]+$/g,'')['trim'](),/^[A-Da-d]$/[a9(0x212)](F))return console[a9(0x1a2)](),console[a9(0x1a2)](a0p['yellow']('\x20\x20\x22'+F+a9(0x166))),console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x181))+a0p[a9(0x248)]('ICOA{your_flag}')+a0p[a9(0x1e9)](a9(0x1bd))),console[a9(0x1a2)](),a9(0x232);const {getExamState:G,saveExamState:H}=await import(a9(0x204)),I=G();if(!I)return a9(0x18f);if(!I['questions'][a9(0x1d3)](L=>L[a9(0x1e1)]===u[a9(0x23e)]))return console['log'](a0p[a9(0x201)](a9(0x256)+u[a9(0x23e)]+'\x20not\x20found\x20in\x20state.')),'continue';const J=I[a9(0x1fe)][u['qNum']];I['interactions']||(I[a9(0x203)]=[]),I['interactions']['push']({'ts':new Date()[a9(0x1db)](),'q':u['qNum'],'type':J?a9(0x173):a9(0x17e),'input':F,'result':a9(0x208)}),I[a9(0x1fe)][u['qNum']]=F;const K=u['qNum']+(-0x7d*0x22+-0xd05+0x8*0x3b4);return I[a9(0x1b2)]=K<=-0x1b*-0xe6+-0x1ad2+0x2b6?K:u[a9(0x23e)],H(I),console[a9(0x1a2)](),J?(console['log'](a0p[a9(0x248)](a9(0x1b8)+u['qNum']+'\x20answer\x20updated:\x20')+a0p[a9(0x1bc)](F)),console['log'](a0p['gray'](a9(0x186)+J))):console[a9(0x1a2)](a0p[a9(0x248)][a9(0x207)](a9(0x184)+u[a9(0x23e)]+a9(0x1d4)+F)),console[a9(0x1a2)](a0p['gray'](a9(0x17f))),console['log'](),console['log'](a0p['gray']('\x20\x20')+a0p[a9(0x252)](a9(0x160))+a0p[a9(0x1e9)](a9(0x1de))+a0p[a9(0x252)](a9(0x18f))+a0p[a9(0x1e9)](a9(0x19b))),K<=-0x2*-0xbb6+0x6*-0xa4+-0x33d*0x6?console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x1f0))+a0p[a9(0x245)]('ai4ctf')+a0p[a9(0x1e9)](a9(0x224)+K)):console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x233))+a0p[a9(0x201)](a9(0x1d7))+a0p['gray'](a9(0x20e))),console[a9(0x1a2)](),a9(0x232);}if(k[a9(0x17a)]('!')){const L=k[a9(0x250)](-0x12c+-0x29*-0xb3+-0x1b7e)[a9(0x234)]();if(!L)return a9(0x232);try{const M={};M[a9(0x164)]=a9(0x220),M[a9(0x188)]=0x2710;const {execSync:N}=await import(a9(0x205)),O=N(L,M)['trim']();console[a9(0x1a2)](),console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x16e))+a0p[a9(0x252)](L)),console[a9(0x1a2)](a0p[a9(0x252)]('\x20\x20'+O[a9(0x21c)]('\x0a')['join'](a9(0x223)))),console['log']();}catch(P){console[a9(0x1a2)](),console['log'](a0p[a9(0x201)](a9(0x1c4)+(P[a9(0x255)]?.['split']('\x0a')[0x1*-0x2fe+0x1480+-0x1182]||a9(0x1fd)))),console[a9(0x1a2)]();}return'continue';}if('exit'===q||a9(0x1fc)===q||a9(0x1aa)===q){const Q=u['qNum'],{getExamState:R}=await import(a9(0x204)),S=R(),T=S&&null!=S[a9(0x1fe)][Q],U=S?.[a9(0x1b2)]||Q;return s=!(0x7da*-0x2+0x5*0x2f+0xeca),g=null,u=null,f[a9(0x1e0)](),console['log'](),console[a9(0x1a2)](a0p[a9(0x1e9)]('\x20\x20AI4CTF\x20chat\x20ended\x20for\x20Q'+Q+'.')),T&&U>Q&&U<=0x3*-0xce3+0x1049+-0x3*-0x782?console[a9(0x1a2)](a0p[a9(0x252)](a9(0x239))+a0p[a9(0x207)][a9(0x248)]('Q'+U)+a0p['gray'](a9(0x24b))+a0p[a9(0x245)](a9(0x199))+a0p['gray'](a9(0x249))):T&&Q>=-0x4ea+-0x1a99+0x1fa9?console[a9(0x1a2)](a0p['white'](a9(0x174))+a0p[a9(0x207)][a9(0x201)]('ctf4ai')+a0p[a9(0x1e9)](a9(0x197))):console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x21d))+a0p[a9(0x252)]('exam\x20q\x20'+Q)+a0p[a9(0x1e9)](a9(0x1c5))+a0p[a9(0x252)](a9(0x199))),console['log'](),a9(0x18f);}if(y)return console['log'](),console['log'](a0p[a9(0x1bc)]('\x20\x20AI\x20budget\x20exhausted\x20for\x20AI4CTF\x20section.')),console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x253))+a0p[a9(0x252)](a9(0x17b))+a0p[a9(0x1e9)](a9(0x1d0))+a0p[a9(0x252)](a9(0x19e))+a0p['gray']('\x20·\x20')+a0p[a9(0x252)](a9(0x18f))),console[a9(0x1a2)](),'continue';if(r>=h)return y=!(0x1*0x1b8b+0xc92*0x1+0x15*-0x1e9),console[a9(0x1a2)](),console[a9(0x1a2)](a0p['red'][a9(0x207)](a9(0x266))),console[a9(0x1a2)](a0p['gray'](a9(0x243))+a0p[a9(0x252)](a9(0x17b))+a0p['gray'](a9(0x1d0))+a0p[a9(0x252)]('!shell')+a0p[a9(0x1e9)](a9(0x1d0))+a0p[a9(0x252)](a9(0x18f))),console[a9(0x1a2)](),a9(0x232);console[a9(0x1a2)](a0p[a9(0x1e9)](a9(0x244)));try{const V=await g[a9(0x25c)](k);process[a9(0x229)]['write'](a9(0x1dd)),r+=V[a9(0x227)];const {getRealExamState:W,saveExamState:X}=await import(a9(0x204)),Y=W(),Z={};Z[a9(0x199)]=0x0,Z[a9(0x1d7)]=0x0,(Y&&(Y['aiUsage']||(Y[a9(0x1bb)]=Z),Y[a9(0x1bb)]['ai4ctf']=r,X(Y)),console[a9(0x1a2)](),a0z(V[a9(0x170)]),d(),function(a0,a1,a2){const aa=a9,a3=a0/a1*(-0xdc1+0xb23+-0x1*-0x302);a3>=0x1042*-0x1+0x1ef7*-0x1+0x2f98&&!a2['has']('95')?(console['log'](a0p[aa(0x201)][aa(0x207)](aa(0x1fb)+Math[aa(0x16d)](a3)+aa(0x22b)+(a1-a0)+aa(0x25b))),a2['add']('95')):a3>=-0x3fa+0x1617+-0x7*0x28b&&!a2[aa(0x1c7)]('80')?(console[aa(0x1a2)](a0p[aa(0x1bc)](aa(0x20a))),a2[aa(0x21f)]('80')):a3>=0x231b+-0x138c+-0xf5d&&!a2[aa(0x1c7)]('50')&&(console[aa(0x1a2)](a0p['gray'](aa(0x1a0))),a2[aa(0x21f)]('50'));}(r,h,f),console[a9(0x1a2)]());}catch(a0){process[a9(0x229)][a9(0x1cb)](a9(0x1dd)),a0A(a9(0x254)+a0[a9(0x255)]),console[a9(0x1a2)]();}return a9(0x232);}export function registerAi4ctfCommand(b){const ab=a0j;b['command'](ab(0x199))['description'](ab(0x187))[ab(0x190)](async()=>{const ac=ab;a0x(ac(0x199));const {getRealExamState:j}=await import(ac(0x204)),k=j(),p=k?.[ac(0x1ab)][ac(0x1df)](x=>x[ac(0x1e1)]>=-0x24a+-0x1*-0x2377+-0x210e&&x[ac(0x1e1)]<=-0x12f7+-0x33*0x58+0x24a5);if(k&&p){const x=k[ac(0x1b2)]||0xfe6+-0x11f5+0x21*0x10;if(x<0x152c+0x1cd5+-0x31e2||x>0x1c0e+0x37*0x28+-0x4*0x920)return console[ac(0x1a2)](),console[ac(0x1a2)](a0p[ac(0x1bc)](ac(0x226))),console[ac(0x1a2)](a0p[ac(0x1e9)](ac(0x1d8)+x+'.\x20Jump\x20there\x20first:')),console[ac(0x1a2)](a0p[ac(0x1e9)](ac(0x1be))+a0p[ac(0x207)][ac(0x245)](ac(0x1ad))),void console[ac(0x1a2)]();const z=k['questions'][ac(0x1d3)](A=>A[ac(0x1e1)]===x);return z?void await async function(A,B){const ad=ac,{getRealExamState:C,refetchQuestionDataIfStale:D,materializeAttachedData:E}=await import(ad(0x204));await D();const F=C();if(!F)return!(0x1a05+-0x1c6a*0x1+0x2*0x133);const G=F[ad(0x1ab)][ad(0x1d3)](J=>J[ad(0x1e1)]===A);G&&(B=G),E(A,B?.[ad(0x213)]);const H=F[ad(0x1bb)]?.[ad(0x199)]??-0x1f02+0x3a7*0x4+-0x2*-0x833;if(H>=h)return console['log'](),console[ad(0x1a2)](a0p['yellow'](ad(0x1c0))),console[ad(0x1a2)](a0p[ad(0x1e9)](ad(0x198))+a0p[ad(0x252)](ad(0x1b7)+A+ad(0x235))),console[ad(0x1a2)](),!(-0x1b8*-0x1+0x26d6*-0x1+0x251f);try{g=await a0q(void(0x12f7+0xa4d*0x2+-0x2791),function(J,K){const ae=ad,L=J[ae(0x1e4)]||J[ae(0x170)]||'',M=J[ae(0x213)]?ae(0x21a)+K+ae(0x258)+J[ae(0x213)]:'';return ae(0x19a)+K+',\x20'+J[ae(0x168)]+',\x20'+(J['points']||-0x1cb2*0x1+0xd4+0x594*0x5)+ae(0x22d)+L+M+ae(0x251)+K+'.txt\x20(inside\x20the\x20sandbox)\x20rather\x20than\x20asking\x20the\x20contestant\x20to\x20paste\x20the\x20whole\x20blob\x20back.\x0a-\x20Keep\x20responses\x20concise\x20and\x20practical.\x20This\x20contestant\x20has\x20limited\x20time.';}(B,A));}catch(J){return a0A(J['message']),!(0x1335+0x2dd*-0x1+0x1*-0x1057);}s=!(-0x144e+0x7c*0x47+-0xe16),r=H,y=!(0x13*0x4f+-0xf0a+0x92e),u={'qNum':A,'question':B,'usageField':'ai4ctf','enteredAt':Date['now'](),'hintsUsed':new Set(),'submitAttempted':!(0x3a5*-0x1+0x1c34+0x188e*-0x1),'nudgeShown':!(0xa50+-0x1bbb+-0xdf*-0x14)};const I=F[ad(0x1fe)]?.[A];return function(K,L,M){const af=ad,N=a0w()[af(0x217)]||af(0x1cf),O=r>0x1b25+0x18de+-0x1*0x3403;console['log'](),console[af(0x1a2)](a0p[af(0x248)][af(0x207)](af(0x175)+L+':\x20'+K[af(0x168)]+af(0x1e2))),O&&console[af(0x1a2)](a0p[af(0x1e9)]('\x20\x20(resuming\x20—\x20prior\x20chat\x20is\x20not\x20remembered,\x20but\x20tokens\x20already\x20used\x20stay\x20deducted)')),M&&console['log'](a0p[af(0x1e9)](af(0x1ff))+a0p['yellow'](M)+a0p[af(0x1e9)](af(0x23c))),console[af(0x1a2)](),console['log'](a0p[af(0x245)](af(0x196))),console[af(0x1a2)](a0p[af(0x245)]('\x20\x20│\x20')+a0p[af(0x207)][af(0x252)]('Q'+L+af(0x191)+K[af(0x168)]+']\x20\x20·\x20'+(K[af(0x1b0)]||-0x8f*-0x7+0x7d*-0x23+0xd34)+'\x20pts')),console['log'](a0p[af(0x245)](af(0x202)));for(const P of String(K[af(0x170)])['split']('\x0a')){const Q=P['length']>0x1722+0x222+-0x1908?P['slice'](-0x6d*0x4b+0x15*0x9d+0x12*0x10f,-0xf97+-0x11b4+0x2184*0x1)+af(0x193):P;console[af(0x1a2)](a0p[af(0x245)](af(0x21e))+a0p[af(0x252)](Q));}console[af(0x1a2)](a0p[af(0x245)](af(0x202))),console[af(0x1a2)](a0p[af(0x245)]('\x20\x20│\x20')+a0p['gray'](af(0x1d2))+a0p[af(0x252)]('exam\x20q\x20'+L)),console[af(0x1a2)](a0p[af(0x245)]('\x20\x20│\x20')+a0p[af(0x1e9)]('Flag\x20format:\x20\x20\x20\x20ICOA{...}')),console[af(0x1a2)](a0p[af(0x245)](af(0x20c))),console[af(0x1a2)](),console[af(0x1a2)](a0p[af(0x207)]['white'](af(0x1e5))),console[af(0x1a2)](),console['log'](a0p['yellow'](af(0x169))+a0p[af(0x1e9)](af(0x1da))),console[af(0x1a2)](a0p['yellow']('\x20\x20\x20\x20hint\x20b')+a0p[af(0x1e9)](af(0x18a))),console['log'](a0p['yellow'](af(0x200))+a0p[af(0x1e9)](af(0x1c1))),console['log'](a0p['bold'][af(0x248)](af(0x18e))+a0p['gray']('\x20Submit\x20your\x20flag\x20for\x20this\x20question')),console['log'](a0p['white']('\x20\x20\x20\x20!python3\x20...')+a0p[af(0x1e9)](af(0x171))),console[af(0x1a2)](a0p['gray']('\x20\x20\x20\x20Just\x20type\x20freely\x20to\x20chat\x20with\x20the\x20AI\x20teammate.')),console[af(0x1a2)](a0p['gray'](af(0x22c))+a0p['white'](af(0x16a))),console['log'](),console['log'](a0p[af(0x1e9)](af(0x222))+a0p[af(0x1e9)](af(0x260))),console[af(0x1a2)](a0p[af(0x1e9)](af(0x231))+a0p[af(0x1e9)](af(0x176))),console['log'](),d(),console[af(0x1a2)](a0p['gray'](af(0x167)+N+')')),console['log']();}(B,A,I),!(-0x1137+-0x2*-0x1039+-0x7*0x22d);}(x,z):void a0A('Q'+x+ac(0x1f1)+x);}const q={};q[ac(0x1d5)]=ac(0x1f3),q[ac(0x168)]=ac(0x1cc);const v=a0w()[ac(0x217)]||'gemma-4-31b-it',w=q;try{g=await a0q(w);}catch(A){return void a0A(A['message']);}s=!(-0xe2c+0xd*0x151+0x3*-0xfb),r=0x1*0x92b+-0x1*-0x1fea+-0xd*0x329,y=!(-0x1b92*0x1+-0x1*0x14ae+0x463*0xb),console[ac(0x1a2)](),console[ac(0x1a2)](a0p[ac(0x248)]['bold'](ac(0x1ba)+a0B('ai4ctfTitle')+'\x20═══')),console['log'](),console['log'](a0p['white']('\x20\x20'+a0B(ac(0x1e7)))),console[ac(0x1a2)](),console[ac(0x1a2)](a0p['cyan'](ac(0x196))),console['log'](a0p[ac(0x245)]('\x20\x20│\x20')+a0p[ac(0x207)][ac(0x252)](a0B(ac(0x1d9)))),console[ac(0x1a2)](a0p[ac(0x245)](ac(0x202))),console['log'](a0p['cyan'](ac(0x21e))+a0p[ac(0x252)](a0B(ac(0x1a8)))),console[ac(0x1a2)](a0p[ac(0x245)]('\x20\x20│\x20')+a0p[ac(0x248)]('aWNvYXt3M2xjMG1lXzJfYWk0Y3RmfQ==')),console[ac(0x1a2)](a0p[ac(0x245)](ac(0x202))),console[ac(0x1a2)](a0p[ac(0x245)](ac(0x21e))+a0p[ac(0x252)](a0B('ai4ctfDecode'))),console[ac(0x1a2)](a0p[ac(0x245)]('\x20\x20│\x20')+a0p[ac(0x1e9)](ac(0x19c))),console['log'](a0p[ac(0x245)](ac(0x20c))),console[ac(0x1a2)](),console[ac(0x1a2)](a0p[ac(0x252)]('\x20\x20'+a0B(ac(0x261)))),console['log'](),console['log'](a0p[ac(0x1bc)](ac(0x169))+a0p['gray'](ac(0x1ca)+a0B('ai4ctfHintA'))),console[ac(0x1a2)](a0p[ac(0x1e9)](ac(0x17c)+a0B(ac(0x1d6)))),console[ac(0x1a2)](a0p[ac(0x1bc)]('\x20\x20\x20\x20hint\x20b')+a0p['gray'](ac(0x1ca)+a0B('ai4ctfHintB'))),console[ac(0x1a2)](a0p[ac(0x1e9)](ac(0x17c)+a0B('ai4ctfHintBUses'))),console[ac(0x1a2)](a0p[ac(0x1bc)](ac(0x200))+a0p[ac(0x1e9)]('\x20\x20\x20\x20'+a0B(ac(0x1c3)))),console[ac(0x1a2)](a0p[ac(0x1e9)](ac(0x17c)+a0B(ac(0x1b3)))),console['log'](),console['log'](a0p[ac(0x1e9)](ac(0x1b6))),console[ac(0x1a2)](a0p['bold'][ac(0x252)]('\x20\x20'+a0B('ai4ctfWelcomeCta'))),console[ac(0x1a2)](ac(0x1ca)+a0p[ac(0x245)](ac(0x18c))+a0p[ac(0x1e9)](ac(0x1b5)+a0B(ac(0x1cd)))),console[ac(0x1a2)](ac(0x1ca)+a0p['cyan'](ac(0x1a4))+a0p[ac(0x1e9)](ac(0x1b5)+a0B(ac(0x162)))),console[ac(0x1a2)]('\x20\x20\x20\x20'+a0p[ac(0x245)](ac(0x1c9))+a0p[ac(0x1e9)]('\x20\x20\x20→\x20'+a0B('ai4ctfHintPrinciple'))),console[ac(0x1a2)](a0p[ac(0x1e9)](ac(0x1ca)+a0B(ac(0x172)))),console['log'](),console[ac(0x1a2)](a0p[ac(0x252)]('\x20\x20'+a0B('ai4ctfOrChat'))),console[ac(0x1a2)](a0p[ac(0x1e9)]('\x20\x20'+a0B(ac(0x185))+'\x20')+a0p[ac(0x252)](ac(0x206))),console[ac(0x1a2)](),console[ac(0x1a2)](a0p['yellow']('\x20\x20'+a0B(ac(0x209)))),console[ac(0x1a2)](a0p[ac(0x252)](ac(0x163))+a0p[ac(0x1e9)](a0B(ac(0x1a9)))),console['log'](a0p[ac(0x252)]('\x20\x20\x20\x20submit\x20<flag>\x20\x20\x20')+a0p[ac(0x1e9)](a0B(ac(0x17d)))),console[ac(0x1a2)](a0p[ac(0x252)]('\x20\x20\x20\x20!<shell\x20cmd>\x20\x20\x20\x20')+a0p[ac(0x1e9)](a0B(ac(0x1bf)))),console['log'](a0p[ac(0x1e9)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.g.\x20')+a0p[ac(0x252)](ac(0x1b4))),console[ac(0x1a2)](a0p[ac(0x1e9)]('\x20\x20\x20\x20exit\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a0B(ac(0x161)))),console[ac(0x1a2)](),d(),console[ac(0x1a2)](a0p[ac(0x1e9)]('\x20\x20'+a0B(ac(0x24e))+ac(0x1f2)+v+')')),console[ac(0x1a2)](a0p[ac(0x1e9)]('\x20\x20'+a0B(ac(0x1b1)))),console['log']();});}
|
|
1
|
+
(function(b,j){const a4=a0j,k=b();while(!![]){try{const p=-parseInt(a4(0x13f))/(0x1*-0x2093+-0x87d+-0x2911*-0x1)*(parseInt(a4(0x147))/(-0x685+-0x22*-0x5f+-0x617))+-parseInt(a4(0x171))/(0x3*-0xbd3+0x1cef+0x68d)*(parseInt(a4(0x200))/(0x1fc*0x2+0x1b88+-0x1f7c))+parseInt(a4(0x139))/(-0xf*0x141+-0x15a+0x142e)+-parseInt(a4(0x13b))/(-0x1594+-0x1db6+0x3350)*(-parseInt(a4(0x15d))/(0x1*0x1cba+-0x1*-0x1c15+0xe32*-0x4))+-parseInt(a4(0x184))/(0x1adb+0x242c+-0x3eff)+-parseInt(a4(0x18c))/(0x1*0x3f1+0x6cd+-0xab5)+-parseInt(a4(0x151))/(-0x7f7*-0x1+-0x5*0x787+0x1db6)*(-parseInt(a4(0x195))/(-0x43*0x76+0x1afb*0x1+0x3f2));if(p===j)break;else k['push'](k['shift']());}catch(q){k['push'](k['shift']());}}}(a0b,-0x44a1*-0x23+-0x2*0x55483+0x2b1e*0x32));import a0p from'chalk';import{createChatSession as a0q}from'../lib/gemini.js';import{addTokenUsage as a0v}from'../lib/budget.js';import{getConfig as a0w}from'../lib/config.js';import{logCommand as a0x}from'../lib/logger.js';import{printMarkdown as a0z,printError as a0A}from'../lib/ui.js';import{t as a0B}from'../lib/i18n.js';const i=b=>new Promise(j=>setTimeout(j,b));let s=!(-0xb41+0xf7d+0x169*-0x3),g=null,r=0x1*0x83d+0x37*0x16+0xcf7*-0x1,y=!(-0x1d5a+0x1f94+-0x239);const h=-0x399b+0x17*-0x4f+0xa25c;let u=null;export function isChatActive(){return s;}function d(){const a5=a0j,b=u?h:0x42e+0x249c+-0x1542,j=r,k=Math['min'](Math[a5(0x157)](j/b*(-0x2*-0x1bd+-0x1*0x1303+0xfed)),-0xb*0x1c1+0x233+0x117c),p=Math[a5(0x157)](k/(0x872+-0x1*0x5d1+0x23d*-0x1)*(0x1*-0x24ef+-0x260f+-0xc83*-0x6)),q=-0xca*-0x21+0x1cbe+-0x3*0x123c-p,v=k>0x194+-0x1edc+0x1d98?a0p[a5(0x1d2)]:k>0x23a3+-0x6*0x43a+-0xa15?a0p[a5(0x23a)]:a0p[a5(0x1a1)],w=u?a5(0x224):'Tokens';console[a5(0x18e)](a0p['gray']('\x20\x20'+w+':\x20')+v('█'[a5(0x240)](p))+a0p[a5(0x22a)]('░'['repeat'](q))+a0p[a5(0x22a)]('\x20'+j+'/'+b+'\x20('+k+'%)'));}export async function handleChatMessage(p){const a6=a0j;if(!g)return'exit';if(a0x(a6(0x23d)+p),u)return m(p);const q=p['trim']()[a6(0x1ad)]()[a6(0x1ea)](/^hint\s+([abc])$/);if(q)return function(z){const a7=a6,A=a0B('a'===z?'ai4ctfHintA':'b'===z?'ai4ctfHintB':'ai4ctfHintC'),B=a0B('a'===z?a7(0x213):'b'===z?'ai4ctfHintBBody':a7(0x17c)),C=a7(0x1fa)+z[a7(0x239)](),D='a'===z?a0p[a7(0x1a1)]:'b'===z?a0p[a7(0x23a)]:a0p[a7(0x1d2)];console[a7(0x18e)](),console[a7(0x18e)](D[a7(0x14e)](a7(0x1ac)+C+'\x20\x20')+a0p[a7(0x22a)](A)),console[a7(0x18e)]();for(const E of B['split']('\x0a'))''===E?console[a7(0x18e)]():console[a7(0x18e)](a0p['white'](a7(0x23f)+E));console['log'](),'a'===z?(console[a7(0x18e)](a0p['gray'](a7(0x23f)+a0B(a7(0x173))+'\x20')+a0p[a7(0x1d7)](a7(0x176))),console[a7(0x18e)]()):'b'===z&&(console[a7(0x18e)](a0p[a7(0x22a)]('\x20\x20\x20\x20'+a0B(a7(0x1f2))+'\x20')+a0p[a7(0x1d7)](a7(0x1bb))),console[a7(0x18e)]());}(q[-0x1*-0x23c0+-0x12*0x11c+-0x241*0x7]),'continue';const v=p['match'](/^submit\s+(.+)/i);if(v){let z=v[-0xfa2+0x1*-0x18eb+0x288e][a6(0x22b)]();if(/^submit\s+/i[a6(0x189)](z)&&(z=z[a6(0x1e0)](/^submit\s+/i,'')['trim']()),z=z['replace'](/^["'`]+|["'`]+$/g,'')['trim'](),a6(0x1cd)===z){console[a6(0x18e)](),console[a6(0x18e)](a0p[a6(0x1a1)][a6(0x14e)](a6(0x220))),console[a6(0x18e)](a0p['green'][a6(0x14e)]('\x20\x20'+a0B(a6(0x163)))),console[a6(0x18e)](a0p['green'][a6(0x14e)]('\x20\x20════════════════════════════════════')),console[a6(0x18e)](),console[a6(0x18e)](a0p[a6(0x1b1)]('\x20\x20'+a0B(a6(0x228)))),console[a6(0x18e)](a0p['gray']('\x20\x20'+a0B(a6(0x1ab)))),console[a6(0x18e)](),d(),s=!(-0x4fb*-0x1+0x1*-0x6a9+-0x1*-0x1af),g=null,fetch(a6(0x1ca),{'method':a6(0x1b6),'headers':{'Content-Type':a6(0x187)},'body':JSON[a6(0x179)]({'type':'ai4ctf','solved':!(0x10d*-0x1e+0x1*0x1841+-0x745*-0x1),'tokensUsed':r,'timestamp':new Date()[a6(0x159)]()}),'signal':AbortSignal[a6(0x18b)](0x1eac+0x22d*-0x1+-0x8f7)})[a6(0x21d)](()=>{}),await i(-0x14d+-0x1b12+0x223b),console['log'](),console['log'](a0p[a6(0x1d7)](a6(0x180))),console[a6(0x18e)](a0p[a6(0x14e)][a6(0x1b1)]('\x20\x20'+a0B(a6(0x1a2)))),console[a6(0x18e)](a0p[a6(0x1d7)]('\x20\x20─────────────────────────────────────────────')),console[a6(0x18e)]();const A=a0B('ai4ctfWrapLine1Head'),B=a0B('ai4ctfWrapLine1Body');console[a6(0x18e)](a0p['white'](a6(0x155)+A+'\x20')+a0p[a6(0x22a)](B[a6(0x1a6)]('\x0a')[0x2373*0x1+-0xeed+-0x1486]||''));for(const F of B[a6(0x1a6)]('\x0a')[a6(0x1fc)](-0x1*-0x1d7d+-0x2389*-0x1+0xd01*-0x5))F['trim']()&&console['log'](a0p[a6(0x22a)](a6(0x182)+F[a6(0x1e0)](/\{thinking\}/g,a6(0x1ae))));console['log'](),console['log'](a0p[a6(0x1b1)](a6(0x1f4)+a0B('ai4ctfWrapLine2Head')+'\x20')+a0p[a6(0x22a)](a0B(a6(0x1b4)))),console[a6(0x18e)](),console['log'](a0p[a6(0x1d7)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20!echo\x20aWNvYXt3M2xjMG1lXzJfYWk0Y3RmfQ==\x20|\x20base64\x20-d')),console[a6(0x18e)](),await i(0x6c5+-0x1*0xb2d+-0x61c*-0x2),console[a6(0x18e)](a0p[a6(0x1d7)]('\x20\x20─────────────────────────────────────────────')),console[a6(0x18e)](a0p[a6(0x14e)][a6(0x1b1)]('\x20\x20'+a0B(a6(0x1d6)))),console[a6(0x18e)](a0p[a6(0x1d7)](a6(0x180))),console[a6(0x18e)](),console[a6(0x18e)](a0p[a6(0x23a)]('\x20\x20\x20\x20\x20\x20\x20hint\x20a\x20\x20\x20')+a0p[a6(0x1b1)](a0B(a6(0x1f3))['padEnd'](0x1*0x18dc+0xe*0x161+-0x8*0x582))+a0p['gray'](a0B('ai4ctfWrapQuotaAHint'))),console['log'](a0p[a6(0x23a)](a6(0x1de))+a0p[a6(0x1b1)](a0B(a6(0x191))['padEnd'](-0xff3+-0x1aa2+-0x2aaf*-0x1))+a0p[a6(0x22a)](a0B('ai4ctfWrapQuotaBHint'))),console[a6(0x18e)](a0p[a6(0x23a)](a6(0x216))+a0p['white'](a0B(a6(0x13e))[a6(0x1e2)](-0x5ff*-0x4+-0x162a*-0x1+-0x34a*0xe))+a0p[a6(0x22a)](a0B(a6(0x152)))),console[a6(0x18e)]();for(const G of a0B(a6(0x1c6))['split']('\x0a'))console['log'](a0p[a6(0x22a)](a6(0x23f)+G));console[a6(0x18e)](),await i(0x1f02+-0x21ad+-0x1*-0xa7b),console['log'](a0p['cyan']('\x20\x20─────────────────────────────────────────────')),console['log'](a0p[a6(0x14e)][a6(0x1b1)]('\x20\x20'+a0B(a6(0x22f))+'\x20')+a0p['red']['bold'](a6(0x1c4))+a0p[a6(0x1b1)]('\x20—\x20'+a0B(a6(0x1a8)))),console[a6(0x18e)](a0p[a6(0x1d7)](a6(0x180))),console[a6(0x18e)]();const C=a0B(a6(0x153)),D=a0B(a6(0x231)),E=C[a6(0x1a6)]('\x0a');if(E[0x2507+0x1ece*-0x1+-0x639*0x1]){const [H,I]=E[0x1e0e+0x773*-0x1+-0x169b]['split'](a6(0x16b));console[a6(0x18e)](a0p[a6(0x1b1)]('\x20\x20\x20\x20'+(H||''))+a0p['bold'][a6(0x1b1)](D)+a0p[a6(0x1b1)](I||''));}for(const J of E['slice'](-0x10cc+-0x22c2+0x338f))J[a6(0x22b)]()&&console[a6(0x18e)](a0p[a6(0x1b1)]('\x20\x20\x20\x20'+J));return console['log'](),console[a6(0x18e)](a0p[a6(0x22a)](a6(0x23f)+a0B(a6(0x21f))+'\x20')+a0p[a6(0x14e)][a6(0x1d2)](a6(0x1c4))),console[a6(0x18e)](),'exit';}return console['log'](),console[a6(0x18e)](a0p['red']('\x20\x20'+a0B(a6(0x167)))),console['log'](a0p[a6(0x22a)]('\x20\x20'+a0B(a6(0x211)))),console['log'](),a6(0x1b7);}if(p[a6(0x1b3)]('!')){const K=p[a6(0x1fc)](-0x1*-0x455+0x1*-0x376+-0xde)[a6(0x22b)]();if(!K)return a6(0x1b7);try{const L={};L[a6(0x1bd)]=a6(0x1ba),L[a6(0x18b)]=0x2710;const {execSync:M}=await import('node:child_process'),N=M(K,L)['trim']();console[a6(0x18e)](),console[a6(0x18e)](a0p[a6(0x22a)](a6(0x23e))+a0p[a6(0x1b1)](K)),console[a6(0x18e)](a0p[a6(0x1b1)]('\x20\x20'+N[a6(0x1a6)]('\x0a')[a6(0x162)](a6(0x1dd)))),console[a6(0x18e)](),console['log'](a0p['gray']('\x20\x20'+a0B('ai4ctfFoundFlag'))),console[a6(0x18e)]();}catch(O){console[a6(0x18e)](),console[a6(0x18e)](a0p[a6(0x1d2)](a6(0x1c5)+(O[a6(0x140)]?.['split']('\x0a')[0x20d5+-0x14d9+-0xbfc]||'Command\x20failed'))),console[a6(0x18e)]();}return a6(0x1b7);}const w={};w[a6(0x13c)]='application/json';if('exit'===p||a6(0x1fb)===p||a6(0x1cc)===p||a6(0x154)===p)return s=!(0x57*-0x12+-0xb7+0x19*0x46),g=null,fetch('https://practice.icoa2026.au/api/icoa/demo-stats',{'method':a6(0x1b6),'headers':w,'body':JSON[a6(0x179)]({'type':a6(0x156),'tokensUsed':r,'timestamp':new Date()[a6(0x159)]()}),'signal':AbortSignal[a6(0x18b)](0xe4b+-0x100a+0x1547*0x1)})[a6(0x21d)](()=>{}),console['log'](),console[a6(0x18e)](a0p['gray']('\x20\x20─────────────────────────────────────────')),console[a6(0x18e)](a0p[a6(0x1b1)]('\x20\x20'+a0B(a6(0x20b)))),console[a6(0x18e)](a0p[a6(0x22a)]('\x20\x20'+a0B(a6(0x16e))+':\x20'+r+'/5000')),console[a6(0x18e)](a0p[a6(0x22a)]('\x20\x20'+a0B(a6(0x17e))+':\x20Google\x20Gemma\x204\x20(gemma-4-31b-it)')),console[a6(0x18e)](a0p[a6(0x22a)](a6(0x1a5))),console['log'](),console[a6(0x18e)](a0p[a6(0x1d7)](a6(0x180))),console[a6(0x18e)](a0p[a6(0x1b1)]('\x20\x20'+a0B(a6(0x1ce))+'\x20')+a0p[a6(0x14e)][a6(0x1d2)]('ctf4ai')+a0p[a6(0x1b1)](a6(0x1db)+a0B('ai4ctfExitNextSub'))),console['log'](a0p['gray']('\x20\x20'+a0B(a6(0x1d0)))),console[a6(0x18e)](a0p[a6(0x1d7)]('\x20\x20─────────────────────────────────────────────')),console['log'](),console[a6(0x18e)](a0p[a6(0x14e)][a6(0x1d2)](a6(0x238))+a0p[a6(0x22a)](a6(0x1ec)+a0B(a6(0x212)))),console[a6(0x18e)](a0p['white']('\x20\x20\x20\x20\x20back')+a0p['gray'](a6(0x207)+a0B('ai4ctfExitCmdBack'))),console[a6(0x18e)](),'exit';const x={};x['Content-Type']=a6(0x187);if(!y&&r>=0x1972+-0x3*-0x4f3+-0x14c3)return y=!(-0x11*-0x1af+0x110c*0x2+-0x13*0x34d),fetch(a6(0x1ca),{'method':a6(0x1b6),'headers':x,'body':JSON[a6(0x179)]({'type':'ai4ctf','solved':!(0x1bb6*0x1+0x2406+-0x3fbb),'tokensUsed':r,'timestamp':new Date()[a6(0x159)]()}),'signal':AbortSignal['timeout'](0xf7f*0x1+-0x1a*0x95+0x132b)})[a6(0x21d)](()=>{}),console['log'](),console['log'](a0p[a6(0x23a)]('\x20\x20'+a0B(a6(0x197)))),d(),(function(){const a8=a6;console[a8(0x18e)](),console[a8(0x18e)](a0p[a8(0x23a)](a8(0x180))),console[a8(0x18e)](a0p[a8(0x14e)][a8(0x23a)]('\x20\x20'+a0B('ai4ctfRevealTitle'))),console[a8(0x18e)](a0p[a8(0x23a)](a8(0x180))),console[a8(0x18e)]();for(const P of a0B(a8(0x20e))['split']('\x0a'))''===P?console['log']():console['log'](a0p[a8(0x1b1)]('\x20\x20\x20\x20'+P));console[a8(0x18e)](),console[a8(0x18e)](a0p['cyan'](a8(0x16f))),console[a8(0x18e)](),console[a8(0x18e)](a0p[a8(0x1b1)]('\x20\x20\x20\x20'+a0B('ai4ctfRevealSeeFlag'))),console[a8(0x18e)](),console[a8(0x18e)](a0p[a8(0x1a1)](a8(0x145))),console['log'](),console[a8(0x18e)](a0p[a8(0x1b1)](a8(0x23f)+a0B(a8(0x1e4)))),console['log'](),console[a8(0x18e)](a0p[a8(0x1d7)](a8(0x206))),console[a8(0x18e)](),console[a8(0x18e)](a0p[a8(0x22a)](a8(0x23f)+a0B(a8(0x150)))),console[a8(0x18e)]();}()),a6(0x1b7);if(y)return console[a6(0x18e)](),console['log'](a0p['yellow']('\x20\x20'+a0B(a6(0x1aa)))),console['log'](a0p[a6(0x22a)]('\x20\x20'+a0B(a6(0x1fe))+'\x20')+a0p['cyan'](a6(0x17f))),console[a6(0x18e)](a0p[a6(0x22a)]('\x20\x20'+a0B(a6(0x221))+'\x20')+a0p[a6(0x1d7)]('submit\x20icoa{w3lc0me_2_ai4ctf}')),console['log'](),a6(0x1b7);console[a6(0x18e)](a0p[a6(0x22a)]('\x20\x20'+a0B(a6(0x196))));try{const P=await g['sendMessage'](p);process['stdout']['write'](a6(0x13d)),r+=P[a6(0x1a7)],a0v(P['tokensUsed']),console['log'](),a0z(P[a6(0x19b)]),d(),console[a6(0x18e)]();}catch(Q){process[a6(0x14d)][a6(0x1e3)](a6(0x13d)),a0A('AI\x20error:\x20'+Q[a6(0x140)]),console[a6(0x18e)]();}return a6(0x1b7);}const f=new Set();function a0j(a,b){a=a-(0x5*-0x445+-0x15a0+0x2c32);const c=a0b();let d=c[a];if(a0j['qgwnFV']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=0x371+-0x3*0x426+0x901,o,p,q=0x1*0xd75+0x1*0x1fd6+0x305*-0xf;p=i['charAt'](q++);~p&&(o=n%(0x1f48+-0x41b*-0x7+-0x3c01)?o*(-0xecc+-0xb86+0x26*0xb3)+p:p,n++%(-0x9d*0xd+0x42e+0x3cf))?l+=String['fromCharCode'](-0x2*-0x1bd+-0x1*0x1303+0x1088&o>>(-(-0xb*0x1c1+0x233+0x111a)*n&0x872+-0x1*0x5d1+0x29b*-0x1)):0x1*-0x24ef+-0x260f+-0x14b*-0x3a){p=j['indexOf'](p);}for(let r=-0xca*-0x21+0x1cbe+-0x2*0x1b64,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](0x194+-0x1edc+0x1d58))['slice'](-(0x23a3+-0x6*0x43a+-0xa45));}return decodeURIComponent(m);};a0j['ZIWrgD']=e,a0j['joidcC']={},a0j['qgwnFV']=!![];}const f=c[-0x1*-0x23c0+-0x12*0x11c+-0x65*0x28],g=a+f,h=a0j['joidcC'][g];return!h?(d=a0j['ZIWrgD'](d),a0j['joidcC'][g]=d):d=h,d;}async function m(k){const a9=a0j;if(!u||!g)return a9(0x1b5);const p=k[a9(0x22b)](),q=p[a9(0x1ad)](),v=(Date[a9(0x148)]()-u[a9(0x241)])/(0x15c*0x35+-0x1*0x4f15+0xf169);if(!u[a9(0x15c)]&&!u[a9(0x21e)]&&u[a9(0x170)][a9(0x1a4)]>=-0x1*0xe75+0x1b79+-0xd02&&v>=0xb35+-0x1*0x2401+0x18d1&&(u[a9(0x15c)]=!(0x1a7e+0x8e7*0x3+-0x3533),console[a9(0x18e)](),console[a9(0x18e)](a0p[a9(0x23a)](a9(0x16c))+a0p[a9(0x14e)][a9(0x23a)](a9(0x1ed))),console[a9(0x18e)](a0p['gray']('\x20\x20\x20\x20\x20(type\x20it\x20right\x20here\x20in\x20this\x20chat\x20—\x20not\x20as\x20a\x20shell\x20command)')),console[a9(0x18e)]()),/^ICOA\{[^}]+\}$/i[a9(0x189)](p))return console[a9(0x18e)](),console[a9(0x18e)](a0p[a9(0x22a)](a9(0x1d1))+a0p['white'](a9(0x242)+p)),m('submit\x20'+p);const x=q[a9(0x1ea)](/^hint\s+([abc])$/);if(x){const A=x[-0x3*0x851+0x143f+0x4b5]['toUpperCase'](),B=u['question'][a9(0x21a)],C=B?.[A],D='A'===A?a0p[a9(0x1a1)]:'B'===A?a0p[a9(0x23a)]:a0p[a9(0x1d2)];if(console[a9(0x18e)](),console[a9(0x18e)](D[a9(0x14e)](a9(0x169)+A)),console['log'](),C){for(const E of String(C)[a9(0x1a6)]('\x0a'))console[a9(0x18e)](a0p[a9(0x1b1)](a9(0x23f)+E));}else console[a9(0x18e)](a0p[a9(0x22a)](a9(0x1c1)));return console[a9(0x18e)](),'A'===A?console[a9(0x18e)](a0p[a9(0x22a)](a9(0x1c0))+a0p[a9(0x1d7)]('hint\x20b')):'B'===A?console[a9(0x18e)](a0p[a9(0x22a)]('\x20\x20\x20\x20Really\x20stuck?\x20Try:\x20')+a0p['cyan'](a9(0x1bb))):'C'===A&&console[a9(0x18e)](a0p[a9(0x22a)]('\x20\x20\x20\x20'+a0B(a9(0x215))+'\x20')+a0p[a9(0x14e)][a9(0x1a1)](a9(0x1ed))),console[a9(0x18e)](),a9(0x1b7);}const z=p[a9(0x1ea)](/^submit\s+(.+)/i);if(z){let F=z[-0x105e+-0x3a8+0x1407][a9(0x22b)]();if(/^submit\s+/i[a9(0x189)](F)&&(F=F['replace'](/^submit\s+/i,'')[a9(0x22b)]()),F=F[a9(0x1e0)](/^["'`]+|["'`]+$/g,'')[a9(0x22b)](),/^[A-Da-d]$/[a9(0x189)](F))return console[a9(0x18e)](),console[a9(0x18e)](a0p[a9(0x23a)]('\x20\x20\x22'+F+'\x22\x20looks\x20like\x20an\x20MCQ\x20letter,\x20not\x20a\x20flag.')),console[a9(0x18e)](a0p[a9(0x22a)](a9(0x158))+a0p[a9(0x1a1)](a9(0x20d))+a0p['gray']('.\x20Try\x20again\x20inside\x20this\x20chat.')),console['log'](),'continue';const {getExamState:G,saveExamState:H}=await import(a9(0x225)),I=G();if(!I)return a9(0x1b5);if(!I[a9(0x232)][a9(0x18d)](L=>L[a9(0x1dc)]===u[a9(0x1f6)]))return console[a9(0x18e)](a0p[a9(0x1d2)](a9(0x22c)+u[a9(0x1f6)]+'\x20not\x20found\x20in\x20state.')),a9(0x1b7);const J=I[a9(0x14f)][u[a9(0x1f6)]];I[a9(0x237)]||(I[a9(0x237)]=[]),I[a9(0x237)][a9(0x1a0)]({'ts':new Date()['toISOString'](),'q':u[a9(0x1f6)],'type':J?a9(0x1b0):a9(0x198),'input':F,'result':a9(0x229)}),I[a9(0x14f)][u[a9(0x1f6)]]=F;const K=u[a9(0x1f6)]+(-0x11ba+0x23*0x109+0x80*-0x25);return I[a9(0x160)]=K<=0xe0d+-0xae1+-0x3*0x102?K:u[a9(0x1f6)],H(I),console[a9(0x18e)](),J?(console[a9(0x18e)](a0p[a9(0x1a1)](a9(0x1c2)+u['qNum']+a9(0x1a9))+a0p[a9(0x23a)](F)),console[a9(0x18e)](a0p[a9(0x22a)]('\x20\x20\x20\x20Previous:\x20'+J))):console[a9(0x18e)](a0p[a9(0x1a1)][a9(0x14e)](a9(0x166)+u[a9(0x1f6)]+a9(0x1f1)+F)),console[a9(0x18e)](a0p[a9(0x22a)](a9(0x194))),console['log'](),console['log'](a0p[a9(0x22a)]('\x20\x20')+a0p[a9(0x1b1)]('submit\x20ICOA{...}')+a0p[a9(0x22a)](a9(0x1df))+a0p[a9(0x1b1)](a9(0x1b5))+a0p['gray']('\x20to\x20move\x20on')),K<=0x2434+0x22f1+-0x46ff?console['log'](a0p['gray'](a9(0x243))+a0p[a9(0x1d7)]('ai4ctf')+a0p[a9(0x22a)](a9(0x1d4)+K)):console['log'](a0p[a9(0x22a)](a9(0x1cf))+a0p[a9(0x1d2)](a9(0x1c4))+a0p[a9(0x22a)](a9(0x236))),console['log'](),a9(0x1b7);}if(k['startsWith']('!')){const L=k['slice'](0x1a0+0x2*0x101e+0x9*-0x3c3)[a9(0x22b)]();if(!L)return a9(0x1b7);try{const M={};M[a9(0x1bd)]='utf-8',M[a9(0x18b)]=0x2710;const {execSync:N}=await import(a9(0x143)),O=N(L,M)['trim']();console[a9(0x18e)](),console['log'](a0p[a9(0x22a)](a9(0x23e))+a0p[a9(0x1b1)](L)),console[a9(0x18e)](a0p[a9(0x1b1)]('\x20\x20'+O[a9(0x1a6)]('\x0a')[a9(0x162)](a9(0x1dd)))),console[a9(0x18e)]();}catch(P){console[a9(0x18e)](),console[a9(0x18e)](a0p[a9(0x1d2)](a9(0x1c5)+(P[a9(0x140)]?.[a9(0x1a6)]('\x0a')[-0x25fa*-0x1+0x19e*0xf+-0x3e3c]||'Command\x20failed'))),console['log']();}return a9(0x1b7);}if(a9(0x1b5)===q||a9(0x1fb)===q||a9(0x1cc)===q){const Q=u[a9(0x1f6)],{getExamState:R}=await import(a9(0x225)),S=R(),T=S&&null!=S[a9(0x14f)][Q],U=S?.[a9(0x160)]||Q;return s=!(0x1785*-0x1+-0xeef+-0x37f*-0xb),g=null,u=null,f[a9(0x208)](),console['log'](),console[a9(0x18e)](a0p[a9(0x22a)](a9(0x13a)+Q+'.')),T&&U>Q&&U<=-0xc15+0xd*0xad+0x3*0x126?console['log'](a0p[a9(0x1b1)]('\x20\x20Next:\x20')+a0p[a9(0x14e)][a9(0x1a1)]('Q'+U)+a0p[a9(0x22a)](a9(0x1f9))+a0p[a9(0x1d7)](a9(0x156))+a0p[a9(0x22a)](a9(0x175))):T&&Q>=0x20b*-0xd+0x1a9f+-0x1*-0x16?console[a9(0x18e)](a0p['white'](a9(0x146))+a0p[a9(0x14e)][a9(0x1d2)](a9(0x1c4))+a0p[a9(0x22a)](a9(0x181))):console['log'](a0p[a9(0x22a)](a9(0x1c3))+a0p[a9(0x1b1)](a9(0x17b)+Q)+a0p[a9(0x22a)](a9(0x1eb))+a0p[a9(0x1b1)](a9(0x156))),console[a9(0x18e)](),a9(0x1b5);}if(y)return console[a9(0x18e)](),console[a9(0x18e)](a0p[a9(0x23a)]('\x20\x20AI\x20budget\x20exhausted\x20for\x20AI4CTF\x20section.')),console[a9(0x18e)](a0p[a9(0x22a)](a9(0x1c8))+a0p[a9(0x1b1)](a9(0x1e1))+a0p['gray'](a9(0x183))+a0p[a9(0x1b1)]('!shell')+a0p[a9(0x22a)]('\x20·\x20')+a0p['white']('exit')),console[a9(0x18e)](),a9(0x1b7);if(r>=h)return y=!(0x14af+-0xe63+-0x7c*0xd),console['log'](),console[a9(0x18e)](a0p[a9(0x1d2)][a9(0x14e)]('\x20\x20⚠\x20AI4CTF\x20token\x20budget\x20exhausted\x20(25,000\x20used).')),console[a9(0x18e)](a0p[a9(0x22a)](a9(0x22e))+a0p[a9(0x1b1)](a9(0x1e1))+a0p['gray']('\x20·\x20')+a0p[a9(0x1b1)](a9(0x204))+a0p[a9(0x22a)](a9(0x183))+a0p[a9(0x1b1)](a9(0x1b5))),console[a9(0x18e)](),a9(0x1b7);console[a9(0x18e)](a0p[a9(0x22a)](a9(0x210)));try{const V=await g[a9(0x202)](k);process[a9(0x14d)][a9(0x1e3)](a9(0x13d)),r+=V[a9(0x1a7)];const {getRealExamState:W,saveExamState:X}=await import(a9(0x225)),Y=W(),Z={};Z[a9(0x156)]=0x0,Z['ctf4ai']=0x0,(Y&&(Y[a9(0x14c)]||(Y[a9(0x14c)]=Z),Y[a9(0x14c)]['ai4ctf']=r,X(Y)),console['log'](),a0z(V[a9(0x19b)]),d(),function(a0,a1,a2){const aa=a9,a3=a0/a1*(-0x26*-0x49+0x1*-0x1a7b+-0x335*-0x5);a3>=0x936+-0x6e4+-0x1f3&&!a2[aa(0x203)]('95')?(console[aa(0x18e)](a0p['red'][aa(0x14e)]('\x20\x20⚠\x20'+Math[aa(0x157)](a3)+aa(0x234)+(a1-a0)+aa(0x1e9))),a2[aa(0x178)]('95')):a3>=-0x1c60+-0x17f*0x3+0x212d&&!a2[aa(0x203)]('80')?(console['log'](a0p['yellow']('\x20\x20⚠\x2080%\x20of\x20section\x20AI\x20budget\x20used.')),a2[aa(0x178)]('80')):a3>=0x19b+0x481+0x2*-0x2f5&&!a2[aa(0x203)]('50')&&(console['log'](a0p[aa(0x22a)]('\x20\x20Note:\x2050%\x20of\x20section\x20AI\x20budget\x20used.')),a2[aa(0x178)]('50'));}(r,h,f),console[a9(0x18e)]());}catch(a0){process[a9(0x14d)][a9(0x1e3)]('\x1b[1A\x1b[2K'),a0A(a9(0x1f0)+a0[a9(0x140)]),console['log']();}return a9(0x1b7);}function a0b(){const ag=['xsaGWRCG','BNvKz2vtAg93BG','n0D1Egvlrq','icdILjtILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILia','ywK0y3rMsgLUDei','x2XHC3rr','ywK0y3rMsgLUDenvC2vZ','AM9PBG','ywK0y3rMq29YCMvJDezSywC','zxHHBsbHBNn3zxiG','icbzB3uGy2fUihn0AwXSihn1yM1PDcbHigzSywCGzgLYzwn0BhK6ia','icdINjmGqw5ZD2vYigzVCIbr','ywK0y3rMv3jVBMDgBgfN','icdILzdILzdILzaGquK0q1rgiokaLcbr','icdILRGGsgLUDca','sgLKzgvUie1LC3nHz2u','E25VuhjVz30','icdWN5kHie9Uy2uGEw91igHHDMuGsunpqxSUlI59lcbZDwjTAxqGAxqGD2L0AdOG','lI4U','ywK0y3rMvg9Rzw5Z','icaGicaGicaHzwnOBYbHv052wvH0m00YEgPnrZfSwhPkzLLxAZbzm1jTzLe9psb8igjHC2u2ncaTza','AgLUDhnvC2vK','ndvbtuL3CxG','AgLUDcbH','ywK0y3rMsgLUDe5LEhrb','lNr4DcaOAw5ZAwrLihrOzsbZyw5KyM94ksbYyxrOzxiGDgHHBIbHC2TPBMCGDgHLignVBNrLC3rHBNqGDg8GCgfZDguGDgHLihDOB2XLigjSB2iGyMfJAY4klsblzwvWihjLC3bVBNnLCYbJB25JAxnLigfUzcbWCMfJDgLJywWUifrOAxmGy29UDgvZDgfUDcbOyxmGBgLTAxrLzcb0Aw1LlG','ihrVignVBNrPBNvL','AgLUDcbI','icaGieP1C3qGDhLWzsbMCMvLBhKGDg8Gy2HHDcb3AxrOihrOzsbbssb0zwfTBwf0zs4','ywrK','C3rYAw5NAwz5','z2vTAw5Ptw9KzwW','zxHHBsbXia','ywK0y3rMsgLUDencB2r5','q3j5ChrVz3jHCgH5','ywK0y3rMtw9KzwW','iwvJAg8GyvDoDLLyDdnnmNHQtuCXBfH6sMzzv2SWwtnsBwzrpt0GFcbIyxnLnJqGlwq','icdILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILia','igzVCIbrmZK','icaGicaGia','imk3ia','mZeWmdyWohzVBMzMvq','cGPbvfrbq0HfrcbeqvrbicHHBhnVihnHDMvKihrVignOywXSzw5NzxmVCq','ihbVAw50CYK6cG','yxbWBgLJyxrPB24VANnVBG','q2HHDcb3AxrOihLVDxiGquKGDgvHBw1HDgu','DgvZDa','Cg9PBNrZ','DgLTzw91Da','ndC2ndqYoxLYzxnWCW','zMLUza','Bg9N','cGPzt1vsifjvtevtoGOTifLVDsbnqvKGzxHWBgfPBIbJB25Jzxb0CYWGzgvZy3jPyMuGyxbWCM9Hy2HLCYWGyw5KigHLBhaGDgHLignVBNrLC3rHBNqGCMvHC29UihrOCM91z2GGDgHLihbYB2jSzw0UcI0Gww91ie1bwsbKAxnJDxnZihrOzsb0zwnOBM9SB2D5igLUDM9SDMvKicHbrvmSihb3BNrVB2XZlcbqExrOB24GC3rYDwn0lcbivfrqlcbLDgmUks4klsbzB3uGtufzigHLBhaGzgvIDwCGuhL0Ag9UignVzguGDgHLignVBNrLC3rHBNqGD3jPDgvZlGOTifLVDsbnvvnuie5pvcbYzxzLywWGDgHLigzSywCGzgLYzwn0BhKUcI0Gww91ie1vu1qGtK9uig91Dhb1DcbHBNKGC3rYAw5Nig1HDgnOAw5NieLdt0f7lI4UFsbVCIbPy29HEY4UlN0UcI0Gww91ie1vu1qGtK9uihrLBgWGDgHLignVBNrLC3rHBNqGDgHLigv4ywn0igfUC3DLCIb0BYb0AgLZihf1zxn0Aw9UlGOTifLVDsbnqvKGC3vNz2vZDcb3AgLJAcb0B29Sic8GBgLICMfYEsaVihrLy2HUAxf1zsb0BYb1C2uUcI0Gv2HLBIbZDwDNzxn0Aw5NihnOzwXSic8GChL0Ag9UihnUAxbWzxrZihrOyxqGBMvLzcb0AguGyxr0ywnOzwqGzgf0ysWGCMvMzxiGDg8GDgHLigzPBguGCgf0AcbJAgfSBgvUz2vZl3e','ywK0y3rMsgLUDee','ywK0y3rMv3jHCff1B3rHqG','icaGicaGicaGicblzxKGyNjLywT0AhjVDwDOicHWCMuTD3jPDhrLBIK','z2vTBweTnc0ZmwiTAxq','icaGicHhCMfKAw5NigHHChbLBNmGyxqGzxHHBsbZDwjTAxqG4OcuihLVDsbJyw5UB3qGChjLDMLLDYbJB3jYzwn0BMvZCYbKDxjPBMCGDgHLigv4yw0Ukq','ndrrtgHLr3a','ywK0y3rMvgHPBMTPBMC','Dg9Rzw5mAw1PDa','yw5ZD2vYx3n1yM1PDhrLza','BMfTzq','icaGicaGicaGicbuzwnOBMLXDwuGAgLUDcaOChjLlxDYAxr0zw4P','Dgv4Da','ifn1yM1PDcb5B3vYigzSywCGzM9YihrOAxmGCxvLC3rPB24','oIbhB29NBguGr2vTBweGncaO','icaGigHPBNqGyG','ywK0y3rMsgLUDefvC2vZ','ChvZAa','z3jLzw4','ywK0y3rMv3jHCfrPDgXL','ywK0y3rMq21KsgLUDeXPBMu','C2L6zq','icdILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILia','C3bSAxq','Dg9Rzw5ZvxnLza','ywK0y3rMv3jHCe5LEhrtDwi','igfUC3DLCIb1CgrHDgvKoIa','ywK0y3rMtg9JA2vKvgL0Bgu','ywK0y3rMv291BgrfyxjU','icdILRGG','Dg9mB3DLCKnHC2u','DgHPBMTPBMC','ywK0y3rMsgLUDejvC2vZ','yw5ZD2vYx2nOyw5Nzwq','D2HPDgu','icdILii','C3rHCNrZv2L0Aa','ywK0y3rMv3jHCeXPBMuYqM9KEq','zxHPDa','ue9tva','y29UDgLUDwu','icbB','icaGiokgKIa','DxrMltG','AgLUDcbJ','icdILiZILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILidILia','zw5JB2rPBMC','ywK0y3rMu2fTCgXL','y29TBwfUza','icaGifn0DwnRpYbuCNK6ia','icaGie5VihbYzs13CML0DgvUigHPBNqGyxqGDgHPCYb0AwvYigzVCIb0AgLZihf1zxn0Aw9UlG','icdINjmGuq','icbszxn1Bwu6ia','y3rMngfP','icbfCNjVCJOG','ywK0y3rMv3jHCff1B3rHrM9VDgvY','zgvZy3jPChrPB24','icbtDgLSBcbHDMfPBgfIBgu6ia','ywK0y3rMsw50zxjJzxb0zwq','Ahr0Chm6lY9WCMfJDgLJzs5Py29HmJaYnI5HDs9HCgKVAwnVys9Kzw1Vlxn0yxrZ','icaGicaGicaGicaGica','CxvPDa','AwnVyxT3m2XJmg1LxZjFywK0y3rMFq','ywK0y3rMrxHPDe5LEhruAxrSzq','icbbzNrLCIbLEgL0oIbbstrdveyGC2vJDgLVBIbJB21WBgv0zs4GtMv4DdOG','ywK0y3rMrxHPDe5LEhrcB2r5','icbezxrLy3rLzcbMBgfNiokaLcb0CMvHDgLUzYbHCZOG','CMvK','yvDoDLLyDdnnmNHQtuCXBfH6sMzzv2SWwtnsBwzrpt0','ihDPBgWGB3bLBIbr','icbzB3uGyxjLig9Uife','ywK0y3rMv3jHCff1B3rHC1rPDgXL','y3LHBG','icaGihn1yM1PDca8zMXHzZ4Gica','icbiB3CGDg8GD29YAYb0AgLZihf1zxn0Aw9U','ywK0y3rMt3jdAgf0rxHHBxbSzq','iokaLca','BNvTyMvY','cIaG','icaGicaGigHPBNqGyIaGia','igfNywLUihrVignOyw5NzsWGB3iG','CMvWBgfJzq','C3vIBwL0idXMBgfNpG','CgfKrw5K','D3jPDgu','ywK0y3rMuMv2zwfSvgHLBLn1yM1PDa','icaGice8C2HLBgWGy21KpIaGica','ywK0y3rMsgLUDe51zgDL','lNr4DcbPBNnPzguGDgHLignVBNrLC3rHBNqNCYbZyw5KyM94iokaLcbWyxrOigLZihjLBgf0AxzLihrVihrOzsbZyw5KyM94j3mGl2HVBwuVy29TCgv0AxrVCIb3B3jRAw5NigrPCMvJDg9YEsWGCMvHy2HHyMXLigzYB20Gyw55icfZAgvSBcaVicfWExrOB24ZigLUDM9JyxrPB24PoGO','icaGicaGicaGicaGieXLyxzLignOyxqSihjLDhvYBIb0BYbLEgfT','ihrVA2vUCYbSzwz0lG','Bwf0y2G','icdcTYaGuMuTzw50zxi6ia','icaGicaGicaGia','C3vIBwL0ieLdt0f7Ew91CL9MBgfNFq','ywK0y3rMq29TBwfUzhm','icaGicbsDw4GuhL0Ag9UigLUihnOzwXS','quKGzxjYB3i6ia','ihjLy29YzgvKoIa','ywK0y3rMsgLUDe5LEhrc','ywK0y3rMv3jHCff1B3rHqq','icaGidiUia','icaGicaGicaGicaGicaGicaGicbLlMCUia','Cu51Bq','ywK0y3rMsgLUDfbYAw5JAxbSzq','icaGigHPBNqGyW','iokaLcb0ExbLia','sgLUDca','yMfJAW','C2XPy2u','icaOCMvZDw1PBMCG4OcuihbYAw9YignOyxqGAxmGBM90ihjLBwvTyMvYzwqSigj1Dcb0B2TLBNmGywXYzwfKEsb1C2vKihn0yxKGzgvKDwn0zwqP','ywK0y3rMtg9JA2vKvxnL','ywK0y3rMrxHPDa','nti3otzjEKjeAMq','ywK0y3rMrgvJB2rL','C2vUze1LC3nHz2u','AgfZ','ixnOzwXS','icaGicaGicaGicbbigDLBNrSzsbUDwrNzsaOChjLlxDYAxr0zw4P','icaGicaGicbZDwjTAxqGAwnVyxT3m2XJmg1LxZjFywK0y3rMFq','icaGicaGicaGicaG','y2XLyxi','ihb0CW','icaGicfWExrOB24Zic4UlG','ywK0y3rMuMvWB3j0','yxr0ywnOzwreyxrH','sunpqxT5B3vYx2zSywD9','ywK0y3rMuMv2zwfSqM9KEq','zxHHBsbXidmX','icbuAgLUA2LUzY4UlG','ywK0y3rMrMXHz0HPBNq','ywK0y3rMrxHPDenTze5LEhq','ywK0y3rMsgLUDefcB2r5','icaGicaGicaGicaGifjLDhvYBIb0BYbTywLUig1LBNuGkhDVCMTZigfUExDOzxjLkq','ywK0y3rMsgLUDe5LEhrd','icaGicaGigHPBNqGyYaGia','icaOC3vIBwL0igfNywLUihrVignOyw5NzsK','ig5VDcbMB3vUzcbPBIbZDgf0zs4Gvhj5oIbLEgfTiheG','ywK0y3rMsgLUDfrLy2HUAxf1zq','AgLUDhm','iMHVDYbKBYbjigrLy3j5ChqGquvtluncqYbPBIbqExrOB24/iG','ywK0y3rMtgv2zwXZ','y2f0y2G','C3vIBwL0qxr0zw1WDgvK','ywK0y3rMv3jHCfr5CgvdDgy0ywK','icdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILzdILza','ywK0y3rMtg9JA2vKvgHLBG','icaG4OAsia','icdILiiG','quK0q1rgihnLy3rPB24','lI4VBgLIl2v4yw0TC3rHDguUANm','icaGigv4AxqGicaGicaGicaGica','icbdDxjYzw50igfUC3DLCJOG','ywK0y3rMrgvJB2rLza','DMLHigfPngn0zIbJAgf0','z3jHEq','DhjPBq','icbr','icaGig1LBNu','icbzB3uGy2fUihn0AwXSoIa','ywK0y3rMv3jHCe5LEhruAxrSzq','iokvKokvKokvKa','ywK0y3rMv3jHCe5VuhjVzW','CxvLC3rPB25Z','ywK0y3rMv2vSy29Tzun0yq','jsbVzIbZzwn0Aw9Uiefjigj1zgDLDcb1C2vKiokaLcbVBMX5ih4','rMXHzYbMB3jTyxq6igLJB2f7lI4UFq','ig9UifeZoq','Aw50zxjHy3rPB25Z','icaGicbJDgy0ywK','Dg9vChbLCKnHC2u','EwvSBg93','ywK0y3rMvgL0Bgu','ywK0y3rMq2HHBgXLBMDL','ywK0y3rMoIa','icaKia','icaGia','CMvWzwf0','zw50zxjLzef0','C3vIBwL0ia','icbbzNrLCIbLEgL0oIa','mZa2otmYmhrVs3zTzW','icbbstrdveyGy2HHDcbLBMrLzcbMB3iGuq','ndyWmtu3nhHNDKTzqG','q29UDgvUDc1uExbL','g1SXqrTBmKS','ywK0y3rMv3jHCff1B3rHqW','mtGYmJyYs2DRC3j6','BwvZC2fNzq','y2f0zwDVCNK','icdIMQaGww91CIbbstrdveyGDg9Rzw4GyNvKz2v0igLZigv4Agf1C3rLzc4','BM9KztPJAgLSzf9WCM9JzxnZ','ywK0y3rMq21Ku2HLBgXmAw5L','icaGicaGicbPy29HE3CZBgmWBwvFmL9HAtrJDgz9','icbbstrdveyGC2vJDgLVBIbJB21WBgv0zsdIGjqG','mMzQwfPovW','BM93','ywK0y3rMt3jdAgf0','lIbkDw1WihrOzxjLigzPCNn0oG','iNDOyxqGzw5JB2rPBMCGAxmGDgHPCZ8I','ywLvC2fNzq','C3rKB3v0','yM9Sza','yw5ZD2vYCW','ywK0y3rMuMv2zwfStg9JA05VDgu','otyXndKWBvH0yLzK','ywK0y3rMv3jHCff1B3rHq0HPBNq','ywK0y3rMv3jHCe5LEhrcB2r5','BwvUDq','icaGideUia','ywK0y3rM','CM91BMq','icbgBgfNigzVCM1HDdOG','Dg9ju09tDhjPBMC','icaGigHPBNqGyq'];a0b=function(){return ag;};return a0b();}export function registerAi4ctfCommand(b){const ab=a0j;b[ab(0x1bf)](ab(0x156))[ab(0x1c7)](ab(0x188))['action'](async()=>{const ac=ab;a0x(ac(0x156));const {getRealExamState:j}=await import(ac(0x225)),k=j(),p=k?.[ac(0x232)]['some'](x=>x['number']>=-0x1611+-0x35*-0x1c+-0x4*-0x419&&x[ac(0x1dc)]<=0x4b2+-0x1152*-0x1+-0x15de);if(k&&p){const x=k[ac(0x160)]||-0x8d1+-0x17e8+0x20ba;if(x<0x665*-0x2+0x4*-0x19+0x5*0x2a9||x>0x383*0x1+-0x1f52+0x1a5*0x11)return console['log'](),console['log'](a0p[ac(0x23a)]('\x20\x20ai4ctf\x20is\x20available\x20on\x20Q31–38\x20(AI4CTF\x20section).')),console[ac(0x18e)](a0p[ac(0x22a)](ac(0x1d5)+x+ac(0x14a))),console[ac(0x18e)](a0p['gray'](ac(0x1b9))+a0p[ac(0x14e)][ac(0x1d7)](ac(0x20f))),void console[ac(0x18e)]();const z=k[ac(0x232)][ac(0x18d)](A=>A[ac(0x1dc)]===x);return z?void await async function(A,B){const ad=ac,{getRealExamState:C,refetchQuestionDataIfStale:D,materializeAttachedData:E}=await import(ad(0x225));await D();const F=C();if(!F)return!(0x5f7+0x1*0x2f9+-0x8ef);const G=F[ad(0x232)][ad(0x18d)](J=>J[ad(0x1dc)]===A);G&&(B=G),E(A,B?.[ad(0x20c)]);const H=F[ad(0x14c)]?.[ad(0x156)]??0x15f+-0x82*0x27+-0x3*-0x625;if(H>=h)return console[ad(0x18e)](),console[ad(0x18e)](a0p[ad(0x23a)](ad(0x142))),console[ad(0x18e)](a0p[ad(0x22a)](ad(0x165))+a0p[ad(0x1b1)](ad(0x164)+A+'\x20ICOA{...}')),console['log'](),!(0x17b3+-0x2a2*0xb+0x544);try{g=await a0q(void(0x735*0x4+0xab5+-0x2789),function(J,K){const ae=ad,L=J[ae(0x1c7)]||J[ae(0x19b)]||'',M=J['attachedData']?ae(0x185)+K+ae(0x1e7)+J[ae(0x20c)]:'';return'You\x20are\x20an\x20AI\x20teammate\x20helping\x20a\x20contestant\x20solve\x20an\x20ICOA\x202026\x20cybersecurity\x20exam\x20question.\x0a\x0aCURRENT\x20QUESTION\x20(Q'+K+',\x20'+J[ae(0x141)]+',\x20'+(J[ae(0x18a)]||0x1*-0x1a39+-0x1311+-0x28*-0x122)+ae(0x186)+L+M+ae(0x18f)+K+ae(0x174);}(B,A));}catch(J){return a0A(J[ad(0x140)]),!(0x1a5*-0x1+-0x1560+0x1706);}s=!(-0xea5+0x1b18+0xc73*-0x1),r=H,y=!(0x8dc+0x7b7+-0x1092),u={'qNum':A,'question':B,'usageField':ad(0x156),'enteredAt':Date['now'](),'hintsUsed':new Set(),'submitAttempted':!(-0x1ba6+-0xc6a+0x315*0xd),'nudgeShown':!(0xed8+-0x6cd*0x1+-0x80a)};const I=F[ad(0x14f)]?.[A];return function(K,L,M){const af=ad,N=a0w()[af(0x17a)]||af(0x193),O=r>-0x10*0xde+0x8de+0x502;console[af(0x18e)](),console[af(0x18e)](a0p['green']['bold'](af(0x168)+L+':\x20'+K['category']+af(0x230))),O&&console['log'](a0p[af(0x22a)](af(0x1fd))),M&&console['log'](a0p[af(0x22a)](af(0x227))+a0p[af(0x23a)](M)+a0p[af(0x22a)](af(0x217))),console[af(0x18e)](),console[af(0x18e)](a0p['cyan'](af(0x1bc))),console['log'](a0p['cyan'](af(0x223))+a0p[af(0x14e)][af(0x1b1)]('Q'+L+af(0x1b8)+K[af(0x141)]+af(0x15b)+(K[af(0x18a)]||0x1505+-0x1b1a+0x3*0x209)+af(0x209))),console['log'](a0p[af(0x1d7)](af(0x1b2)));for(const P of String(K[af(0x19b)])[af(0x1a6)]('\x0a')){const Q=P['length']>-0xd7a+-0xeba+0x1c70?P[af(0x1fc)](-0x1aa0+0x1b41+-0xa1*0x1,-0x8e7+0x1edd*0x1+-0x35*0x69)+af(0x16d):P;console[af(0x18e)](a0p[af(0x1d7)](af(0x223))+a0p['white'](Q));}console[af(0x18e)](a0p[af(0x1d7)](af(0x1b2))),console[af(0x18e)](a0p['cyan'](af(0x223))+a0p[af(0x22a)]('Full\x20question:\x20\x20')+a0p[af(0x1b1)](af(0x17b)+L)),console[af(0x18e)](a0p[af(0x1d7)](af(0x223))+a0p[af(0x22a)]('Flag\x20format:\x20\x20\x20\x20ICOA{...}')),console['log'](a0p[af(0x1d7)](af(0x15e))),console['log'](),console[af(0x18e)](a0p[af(0x14e)][af(0x1b1)](af(0x1d9))),console[af(0x18e)](),console[af(0x18e)](a0p[af(0x23a)](af(0x15a))+a0p[af(0x22a)](af(0x205))),console[af(0x18e)](a0p[af(0x23a)](af(0x19e))+a0p[af(0x22a)](af(0x19a))),console['log'](a0p[af(0x23a)](af(0x1f8))+a0p[af(0x22a)](af(0x192))),console[af(0x18e)](a0p['bold'][af(0x1a1)]('\x20\x20\x20\x20submit\x20ICOA{...}')+a0p[af(0x22a)](af(0x19c))),console[af(0x18e)](a0p[af(0x1b1)](af(0x20a))+a0p[af(0x22a)](af(0x1ef))),console[af(0x18e)](a0p['gray'](af(0x177))),console['log'](a0p['gray'](af(0x1f5))+a0p['white'](af(0x21b))),console[af(0x18e)](),console[af(0x18e)](a0p['gray']('\x20\x20\x20\x20exit')+a0p[af(0x22a)](af(0x1e8))),console[af(0x18e)](a0p['gray'](af(0x22d))+a0p['gray'](af(0x214))),console[af(0x18e)](),d(),console[af(0x18e)](a0p[af(0x22a)]('\x20\x20Model:\x20Google\x20Gemma\x204\x20('+N+')')),console['log']();}(B,A,I),!(0x1*-0x269e+-0x173e+-0x94*-0x6b);}(x,z):void a0A('Q'+x+ac(0x218)+x);}const q={};q[ac(0x199)]=ac(0x16a),q['category']=ac(0x17d);const v=a0w()[ac(0x17a)]||ac(0x193),w=q;try{g=await a0q(w);}catch(A){return void a0A(A['message']);}s=!(0x229b*0x1+-0x1*0x52a+-0x1d71),r=0x2623+0xc34+-0x3257,y=!(-0x232*-0x4+-0x5*-0x755+-0x2d70),console[ac(0x18e)](),console[ac(0x18e)](a0p[ac(0x1a1)][ac(0x14e)]('\x20\x20═══\x20'+a0B(ac(0x23b))+ac(0x230))),console[ac(0x18e)](),console[ac(0x18e)](a0p[ac(0x1b1)]('\x20\x20'+a0B(ac(0x1be)))),console['log'](),console['log'](a0p['cyan'](ac(0x1bc))),console[ac(0x18e)](a0p[ac(0x1d7)](ac(0x223))+a0p[ac(0x14e)][ac(0x1b1)](a0B(ac(0x23c)))),console[ac(0x18e)](a0p[ac(0x1d7)](ac(0x1b2))),console['log'](a0p[ac(0x1d7)](ac(0x223))+a0p['white'](a0B(ac(0x1c9)))),console[ac(0x18e)](a0p[ac(0x1d7)](ac(0x223))+a0p[ac(0x1a1)](ac(0x1d3))),console[ac(0x18e)](a0p[ac(0x1d7)]('\x20\x20│')),console['log'](a0p[ac(0x1d7)]('\x20\x20│\x20')+a0p[ac(0x1b1)](a0B(ac(0x201)))),console[ac(0x18e)](a0p[ac(0x1d7)](ac(0x223))+a0p['gray'](ac(0x235))),console[ac(0x18e)](a0p[ac(0x1d7)]('\x20\x20└─────────────────────────────────────────────')),console[ac(0x18e)](),console[ac(0x18e)](a0p[ac(0x1b1)]('\x20\x20'+a0B(ac(0x21c)))),console['log'](),console[ac(0x18e)](a0p[ac(0x23a)](ac(0x15a))+a0p['gray']('\x20\x20\x20\x20'+a0B(ac(0x190)))),console[ac(0x18e)](a0p[ac(0x22a)](ac(0x1cb)+a0B(ac(0x19f)))),console['log'](a0p[ac(0x23a)]('\x20\x20\x20\x20hint\x20b')+a0p['gray'](ac(0x23f)+a0B(ac(0x15f)))),console[ac(0x18e)](a0p['gray']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a0B(ac(0x1af)))),console['log'](a0p[ac(0x23a)](ac(0x1f8))+a0p[ac(0x22a)](ac(0x23f)+a0B('ai4ctfHintC'))),console[ac(0x18e)](a0p[ac(0x22a)](ac(0x1cb)+a0B(ac(0x161)))),console[ac(0x18e)](),console[ac(0x18e)](a0p[ac(0x22a)](ac(0x1a5))),console[ac(0x18e)](a0p[ac(0x14e)][ac(0x1b1)]('\x20\x20'+a0B(ac(0x233)))),console[ac(0x18e)](ac(0x23f)+a0p[ac(0x1d7)](ac(0x172))+a0p[ac(0x22a)]('\x20\x20\x20→\x20'+a0B(ac(0x1e6)))),console[ac(0x18e)](ac(0x23f)+a0p['cyan'](ac(0x176))+a0p[ac(0x22a)](ac(0x222)+a0B(ac(0x219)))),console[ac(0x18e)](ac(0x23f)+a0p[ac(0x1d7)](ac(0x1bb))+a0p[ac(0x22a)](ac(0x222)+a0B(ac(0x1f7)))),console[ac(0x18e)](a0p[ac(0x22a)](ac(0x23f)+a0B('ai4ctfWelcomeNoReveal'))),console[ac(0x18e)](),console[ac(0x18e)](a0p[ac(0x1b1)]('\x20\x20'+a0B(ac(0x149)))),console[ac(0x18e)](a0p['gray']('\x20\x20'+a0B(ac(0x1da))+'\x20')+a0p[ac(0x1b1)](ac(0x14b))),console['log'](),console[ac(0x18e)](a0p[ac(0x23a)]('\x20\x20'+a0B(ac(0x1ee)))),console[ac(0x18e)](a0p[ac(0x1b1)]('\x20\x20\x20\x20hint\x20a\x20/\x20b\x20/\x20c\x20\x20')+a0p[ac(0x22a)](a0B(ac(0x1a3)))),console[ac(0x18e)](a0p['white'](ac(0x1d8))+a0p['gray'](a0B('ai4ctfSubmitCmd'))),console[ac(0x18e)](a0p[ac(0x1b1)](ac(0x1e5))+a0p[ac(0x22a)](a0B(ac(0x144)))),console[ac(0x18e)](a0p[ac(0x22a)](ac(0x1f5))+a0p[ac(0x1b1)]('!echo\x20aWNv...\x20|\x20base64\x20-d')),console[ac(0x18e)](a0p[ac(0x22a)](ac(0x226)+a0B('ai4ctfEndSession'))),console[ac(0x18e)](),d(),console[ac(0x18e)](a0p[ac(0x22a)]('\x20\x20'+a0B('ai4ctfModel')+ac(0x19d)+v+')')),console['log'](a0p[ac(0x22a)]('\x20\x20'+a0B(ac(0x1ff)))),console['log']();});}
|
package/dist/commands/demo2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import chalk from"chalk";import{spawn as e}from"node:child_process";import{writeFileSync as o}from"node:fs";import{join as n}from"node:path";import{createInterface as a}from"node:readline";const t=[{kind:"mcq",title:'1 / 7 · What is "embodied AI"?',question:"Which best describes embodied AI?",options:{A:"AI that runs on physical hardware (servers, GPUs)",B:"AI that perceives the world and TAKES ACTION in it — robots, drones, self-driving cars",C:"AI that talks like a human (chatbots, voice assistants)",D:"AI written in C++ for speed"},answer:"B",reveal:["Embodied AI = AI with a BODY. It sees (camera/sensors), understands instructions, and ACTS in the physical world.","","Chatbots talk. Embodied AI moves things.","The gap between the two is where the next decade of AI happens."]},{kind:"mcq",title:"2 / 7 · What is MuJoCo?",question:"MuJoCo (the thing that just rendered the robot arm video) is:",options:{A:"A robot brand competing with Boston Dynamics",B:"A type of Japanese AI startup",C:"DeepMind's open-source physics simulator — robots train in software FIRST",D:"A snack popular in Australian university cafeterias"},answer:"C",reveal:["MuJoCo = Multi-Joint dynamics with Contact. DeepMind's open-source physics engine.","","Real robots are expensive ($30k+) and breakable. Researchers train policies in MuJoCo first, then transfer to hardware.",'ICOA uses it as the "robot you can break for free" in this olympiad.']},{kind:"mcq",title:"3 / 7 · What is Franka Panda?",question:"The 7-axis arm you saw moving in the sim video is:",options:{A:"A panda-shaped toy robot from a kids' show",B:"Franka Emika Panda — a research-grade 7-DoF arm built in Munich",C:"An anime character",D:"A specific kind of VLA model"},answer:"B",reveal:["Franka Emika Panda — 7-axis robot arm, torque-controlled joints, ~$30k.","",'It is the most-filmed robot in research lab demo videos. Most "robot learning" papers run on a Panda.',"You just controlled one remotely — through ICOA infrastructure — without owning one."]},{kind:"mcq",title:"4 / 7 · Generalization — the real state of the industry",question:"In 2026, where does robotic GENERALIZATION actually stand?",options:{A:"Robots have already replaced most factory workers",B:"Boston Dynamics' Atlas does the dishes at home reliably",C:"No robot autonomously picks fruit in a real farm. Demos work; production-scale generalization is unsolved.",D:"It was a solved problem in the 2010s"},answer:"C",reveal:["Reality check: the canonical UNSOLVED problem is fruit-picking on real farms.","","Every farm: different lighting, soil, plant shape, season. A robot trained on tomatoes can't pick strawberries. Performance robots ≠ production robots.","The gap between viral demos and chaotic real-world reliability is what embodied AI research is actually working on."]},{kind:"mcq",title:"5 / 7 · What controls today's embodied AI?",question:'The "brain" inside a state-of-the-art research robot is most likely:',options:{A:"A Large Language Model (LLM) like GPT-4",B:"A Vision-Language-Action (VLA) model — vision + language + motor action",C:"Rule-based scripts written by engineers",D:"Reinforcement learning trained for years"},answer:"B",reveal:["LLMs are great at text — but can't see, can't act.","","The frontier of embodied AI is VLA = Vision + Language + Action."," · VISION: encodes camera images"," · LANGUAGE: reads your instruction"," · ACTION: outputs motor commands (xyz, rotation, gripper)","","Today, you talked to ICOA-VLA — a research-grade VLA running on ICOA infrastructure."]},{kind:"story",title:"6 / 7 · ICOA's bet — embodied AI's ImageNet moment",body:["Where computer vision was in 2010, embodied AI is right now.","","Before ImageNet + AlexNet (2012), there was no agreed standard for evaluating","computer vision. Then a single benchmark + a deep network unlocked the entire","modern era of AI.","",chalk.bold.yellow("ICOA 2026 is making the same bet for embodied AI security."),""," · VLA and competing architectures are FAR from mature",' · No agreed standards for "what does VLA safety mean"'," · No public benchmarks for adversarial robustness in robot policies"," · The industry is still figuring out what to even measure","","This olympiad's VLA4CTF Pioneer Round is where the first generation of contestants","will probe + adversarially attack current frontier VLA approaches.","","You won't just compete. You'll generate the first public data points","about how vulnerable today's embodied AI actually is."]},{kind:"story",title:"7 / 7 · More than a competition — the curriculum behind it",body:[chalk.bold.white("ASRA's recent history (the team behind this olympiad):")," · IOAI 2024 Bulgaria — 12-yr-old boy, practical-round GOLD (youngest ever)"," · IOAI 2025 China — Australia's 2 youngest contestants completed first"," scoring round in under 1 hour (of 3 allowed)"," · IAIO 2026 winter — 13-yr-old girl, Honorable Mention alongside global"," top high-schoolers","","Australia is exploring a curriculum from 6th-grade hardcore AI to","middle-schoolers participating in PhD-level projects.","",chalk.bold.cyan("Three open tiers for embodied AI security:")," "+chalk.green("· Free ")+chalk.gray("(this demo) — 10 core entry exercises")," "+chalk.yellow("· Registered ")+chalk.gray("(EA learn token) — 100 research-rapid track")," "+chalk.bold.magenta("· Officials ")+chalk.gray("(ICOA national team) — 480 PhD-ready track"),"","Goal: 1–3 months from zero-foundation middle-schooler to PhD-ready core","capabilities in embodied AI security. We are seeking university +","laboratory partners to validate this learning path.","",chalk.bold.yellow("Now — ready to see the robot move for real?")]}];async function r(e,o){if("menu"===e.trim().toLowerCase()){const{returnToMainMenu:e}=await import("../lib/menu-nav.js");return e(o),!0}return!1}function s(e=' Press Enter to continue (or type "menu" to leave)...'){return new Promise(o=>{const n=a({input:process.stdin,output:process.stdout});n.question(chalk.gray(e),async e=>{await r(e,n)||(n.close(),o())})})}function i(e){console.log(),console.log(chalk.cyan(" ╭─ ")+chalk.bold.white(e)),console.log(chalk.cyan(" │"))}function l(){console.log(chalk.cyan(" │")),console.log(chalk.cyan(" ╰─")),console.log()}function c(e){for(const o of e)console.log(chalk.cyan(" │ ")+chalk.white(o))}async function d(e){i(e.title),c([e.question]),console.log(chalk.cyan(" │"));for(const o of["A","B","C","D"])console.log(chalk.cyan(" │ ")+chalk.bold.cyan(o+".")+" "+chalk.white(e.options[o]));l();const o=await(n=chalk.gray(" Your guess (A/B/C/D): "),t=["A","B","C","D"],new Promise(e=>{const o=a({input:process.stdin,output:process.stdout}),s=()=>{o.question(n,async n=>{if(await r(n,o))return;const a=n.trim().toUpperCase();t.includes(a)?(o.close(),e(a)):(console.log(chalk.gray(` (type one of: ${t.join(" / ")}, or ${chalk.cyan("menu")} to leave)`)),s())})};s()}));var n,t;const d=o===e.answer;console.log(),d?console.log(" "+chalk.bold.green("✓ ")+chalk.gray("Correct.")):console.log(" "+chalk.bold.yellow("✗ ")+chalk.gray("You chose ")+chalk.white(o)+chalk.gray("; the answer is ")+chalk.bold.white(e.answer)+chalk.gray(". Read on:")),console.log();for(const o of e.reveal)console.log(chalk.gray(" "+o));console.log(),await s()}async function u(e){i(e.title),c(e.body),l(),await s()}export async function runDemo2(){console.clear(),console.log(),console.log(chalk.cyan(" ═══════════════════════════════════════════════════")),console.log(chalk.bold.yellow(" ICOA 2026 · Embodied AI Security Demo")),console.log(chalk.gray(" 5 minutes — 7 cards + a live robot render")),console.log(chalk.cyan(" ═══════════════════════════════════════════════════")),console.log(),console.log(chalk.white(" ICOA 2026 introduces the ")+chalk.bold.cyan("Pioneer Round: VLA4CTF")),console.log(chalk.gray(" exploring embodied AI security before the main events: ")+chalk.green("AI4CTF")+chalk.gray(" (Day 1) and ")+chalk.red("CTF4AI")+chalk.gray(" (Day 2).")),console.log(),console.log(chalk.gray(" This demo is your map to the new track.")),console.log(),console.log(chalk.gray(" 💡 Type ")+chalk.bold.cyan("menu")+chalk.gray(" at any prompt to leave the demo and return to main menu.")),console.log(),await s(chalk.gray(' Press Enter to begin (or "menu" to leave)...'));for(const e of t)"mcq"===e.kind?await d(e):await u(e);await async function(){console.log(),console.log(chalk.cyan(" ╭─ ")+chalk.bold.white("Final act — watch carefully")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.white("In a few seconds you'll see a Franka Panda arm")),console.log(chalk.cyan(" │ ")+chalk.white("controlled by ")+chalk.bold.cyan("ICOA-VLA")+chalk.white(", a research-grade vision-language-action model.")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.gray("Instruction: ")+chalk.white('"Pick up the red cup"')),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" ╰─")),console.log(),await s(chalk.gray(" Press Enter when you're ready..."));const a=`${process.env.ICOA_SERVER_URL?.replace(/\/+$/,"")||"https://practice.icoa2026.au"}/api/ai/vla/41/sim`,{fetchWithCountdown:t}=await import("../lib/countdown.js");try{const r=fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({}),signal:AbortSignal.timeout(6e4)}),s=await t(r);if(!s.ok)return void console.log(chalk.yellow(` Sim service unavailable (HTTP ${s.status}).`));const i=await s.json();if(!i.success||!i.data?.mp4_b64)return void console.log(chalk.yellow(" Renderer returned no video."));const l=process.env.TMPDIR||"/tmp",c=n(l,`icoa-demo2-${Date.now()}.mp4`);o(c,Buffer.from(i.data.mp4_b64,"base64")),console.log(),console.log(" "+chalk.bold.green("✓ ")+chalk.gray("Rendered.")),i.data.description&&console.log(" "+chalk.gray("Action: ")+chalk.white(i.data.description));const d="darwin"===process.platform?"open":"win32"===process.platform?"start":"xdg-open";d?(e(d,[c],{stdio:"ignore",detached:!0}).unref(),console.log(" "+chalk.gray("Opening in your default video player..."))):console.log(" "+chalk.gray("Open the file above in your video player."))}catch(e){const o=e instanceof Error?e.message:String(e);console.log(chalk.yellow(` Sim error: ${o}`))}}(),console.log(),console.log(chalk.cyan(" ╭─ ")+chalk.bold.white("What you just did")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.gray("· Interacted with ICOA-VLA, a research VLA")),console.log(chalk.cyan(" │ ")+chalk.gray("· Watched MuJoCo physics render a real robot arm")),console.log(chalk.cyan(" │ ")+chalk.gray("· All running on the ICOA stack")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.bold.yellow("Where to next")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.bold.green(" learn ")+chalk.gray(" free 11-card curriculum (LEARNDEMO01) — no token needed")),console.log(chalk.cyan(" │ ")+chalk.bold.green(" learn ")+chalk.gray(" 100/480-card track — ask your country's team for an ")+chalk.bold.yellow("EA")+chalk.gray(" token")),console.log(chalk.cyan(" │ ")+chalk.bold.green(" exam ")+chalk.gray(" Paper D (VLA4CTF) for the Pioneer Round — requires ")+chalk.bold.yellow("PD")+chalk.gray(" token")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.gray("Country team contact: ")+chalk.cyan("australia@icoa2026.au")),console.log(chalk.cyan(" │ ")+chalk.gray("Website: ")+chalk.cyan.underline("https://icoa2026.au")),console.log(chalk.cyan(" ╰─")),console.log()}export function registerDemo2Command(e){e.command("demo2").description("Embodied AI Security — 7-card intro + live MuJoCo sim (free, ~5 min)").action(async()=>{try{await runDemo2()}catch(e){const o=e instanceof Error?e.message:String(e);console.log(chalk.yellow("\n demo2 ended: "+o))}})}
|
|
1
|
+
import chalk from"chalk";import{spawn as e}from"node:child_process";import{writeFileSync as o}from"node:fs";import{join as n}from"node:path";import{createInterface as a}from"node:readline";import{getConfig as t,saveConfig as r}from"../lib/config.js";import{getMainRl as s}from"../lib/main-rl.js";const i=[{kind:"mcq",title:'1 / 7 · What is "embodied AI"?',question:"Which best describes embodied AI?",options:{A:"AI that runs on physical hardware (servers, GPUs)",B:"AI that perceives the world and TAKES ACTION in it — robots, drones, self-driving cars",C:"AI that talks like a human (chatbots, voice assistants)",D:"AI written in C++ for speed"},answer:"B",reveal:["Embodied AI = AI with a BODY. It sees (camera/sensors), understands instructions, and ACTS in the physical world.","","Chatbots talk. Embodied AI moves things.","The gap between the two is where the next decade of AI happens."]},{kind:"mcq",title:"2 / 7 · What is MuJoCo?",question:"MuJoCo (the thing that just rendered the robot arm video) is:",options:{A:"A robot brand competing with Boston Dynamics",B:"A type of Japanese AI startup",C:"DeepMind's open-source physics simulator — robots train in software FIRST",D:"A snack popular in Australian university cafeterias"},answer:"C",reveal:["MuJoCo = Multi-Joint dynamics with Contact. DeepMind's open-source physics engine.","","Real robots are expensive ($30k+) and breakable. Researchers train policies in MuJoCo first, then transfer to hardware.",'ICOA uses it as the "robot you can break for free" in this olympiad.']},{kind:"mcq",title:"3 / 7 · What is Franka Panda?",question:"The 7-axis arm you saw moving in the sim video is:",options:{A:"A panda-shaped toy robot from a kids' show",B:"Franka Emika Panda — a research-grade 7-DoF arm built in Munich",C:"An anime character",D:"A specific kind of VLA model"},answer:"B",reveal:["Franka Emika Panda — 7-axis robot arm, torque-controlled joints, ~$30k.","",'It is the most-filmed robot in research lab demo videos. Most "robot learning" papers run on a Panda.',"You just controlled one remotely — through ICOA infrastructure — without owning one."]},{kind:"mcq",title:"4 / 7 · Generalization — the real state of the industry",question:"In 2026, where does robotic GENERALIZATION actually stand?",options:{A:"Robots have already replaced most factory workers",B:"Boston Dynamics' Atlas does the dishes at home reliably",C:"No robot autonomously picks fruit in a real farm. Demos work; production-scale generalization is unsolved.",D:"It was a solved problem in the 2010s"},answer:"C",reveal:["Reality check: the canonical UNSOLVED problem is fruit-picking on real farms.","","Every farm: different lighting, soil, plant shape, season. A robot trained on tomatoes can't pick strawberries. Performance robots ≠ production robots.","The gap between viral demos and chaotic real-world reliability is what embodied AI research is actually working on."]},{kind:"mcq",title:"5 / 7 · What controls today's embodied AI?",question:'The "brain" inside a state-of-the-art research robot is most likely:',options:{A:"A Large Language Model (LLM) like GPT-4",B:"A Vision-Language-Action (VLA) model — vision + language + motor action",C:"Rule-based scripts written by engineers",D:"Reinforcement learning trained for years"},answer:"B",reveal:["LLMs are great at text — but can't see, can't act.","","The frontier of embodied AI is VLA = Vision + Language + Action."," · VISION: encodes camera images"," · LANGUAGE: reads your instruction"," · ACTION: outputs motor commands (xyz, rotation, gripper)","","Today, you talked to ICOA-VLA — a research-grade VLA running on ICOA infrastructure."]},{kind:"story",title:"6 / 7 · ICOA's bet — embodied AI's ImageNet moment",body:["Where computer vision was in 2010, embodied AI is right now.","","Before ImageNet + AlexNet (2012), there was no agreed standard for evaluating","computer vision. Then a single benchmark + a deep network unlocked the entire","modern era of AI.","",chalk.bold.yellow("ICOA 2026 is making the same bet for embodied AI security."),""," · VLA and competing architectures are FAR from mature",' · No agreed standards for "what does VLA safety mean"'," · No public benchmarks for adversarial robustness in robot policies"," · The industry is still figuring out what to even measure","","This olympiad's VLA4CTF Pioneer Round is where the first generation of contestants","will probe + adversarially attack current frontier VLA approaches.","","You won't just compete. You'll generate the first public data points","about how vulnerable today's embodied AI actually is."]},{kind:"story",title:"7 / 7 · More than a competition — the curriculum behind it",body:[chalk.bold.white("ASRA's recent history (the team behind this olympiad):")," · IOAI 2024 Bulgaria — 12-yr-old boy, practical-round GOLD (youngest ever)"," · IOAI 2025 China — Australia's 2 youngest contestants completed first"," scoring round in under 1 hour (of 3 allowed)"," · IAIO 2026 winter — 13-yr-old girl, Honorable Mention alongside global"," top high-schoolers","","Australia is exploring a curriculum from 6th-grade hardcore AI to","middle-schoolers participating in PhD-level projects.","",chalk.bold.cyan("Three open tiers for embodied AI security:")," "+chalk.green("· Free ")+chalk.gray("(this demo) — 10 core entry exercises")," "+chalk.yellow("· Registered ")+chalk.gray("(EA learn token) — 100 research-rapid track")," "+chalk.bold.magenta("· Officials ")+chalk.gray("(ICOA national team) — 480 PhD-ready track"),"","Goal: 1–3 months from zero-foundation middle-schooler to PhD-ready core","capabilities in embodied AI security. We are seeking university +","laboratory partners to validate this learning path.","",chalk.bold.yellow("Now — ready to see the robot move for real?")]}],l=[{kind:"mcq",title:'1 / 7 · 什么是"具身智能"?',question:"下面哪个说法最准确?",options:{A:"运行在物理硬件上的 AI(服务器、GPU)",B:"能感知世界并在现实中采取动作的 AI —— 机器人、无人机、自动驾驶车",C:"会像人类一样说话的 AI(聊天机器人、语音助手)",D:"用 C++ 写的、为速度优化的 AI"},answer:"B",reveal:['具身智能 = 有"身体"的 AI。它能看(摄像头、传感器)、能理解指令、能在物理世界里做动作。',"","聊天机器人会说话。具身智能会动东西。","这两者之间的鸿沟,就是未来十年 AI 的主战场。"]},{kind:"mcq",title:"2 / 7 · 什么是 MuJoCo?",question:"MuJoCo(刚才生成机械臂视频的那个工具)是:",options:{A:"一家与波士顿动力竞争的机器人公司",B:"一个日本 AI 初创公司",C:"DeepMind 开源的物理仿真器 —— 机器人先在软件里训练",D:"澳大利亚大学食堂流行的零食"},answer:"C",reveal:["MuJoCo = Multi-Joint dynamics with Contact。DeepMind 开源的物理引擎。","","真机器人贵(~30 万人民币起)又容易坏。研究者先在 MuJoCo 里训练策略,再迁移到硬件。",'ICOA 用它做"可以随便破坏的虚拟机器人"。']},{kind:"mcq",title:"3 / 7 · 什么是 Franka Panda?",question:"你在仿真视频里看到的 7 轴机械臂是:",options:{A:"小朋友节目里熊猫形状的玩具机器人",B:"Franka Emika Panda —— 慕尼黑产的研究级 7 自由度机械臂",C:"一个动漫角色",D:"某种特定的 VLA 模型"},answer:"B",reveal:["Franka Emika Panda —— 7 轴机械臂,扭矩控制关节,~30 万人民币。","",'是研究室 demo 视频里出镜最多的机器人。大多数"机器人学习"论文都是基于 Panda 跑的。',"你刚刚通过 ICOA 远程控制了一台 —— 不需要拥有它。"]},{kind:"mcq",title:"4 / 7 · 泛化能力 —— 行业的真实状态",question:'2026 年,机器人的"泛化能力"到底处于什么水平?',options:{A:"机器人已经替换掉大多数工厂工人",B:"波士顿动力的 Atlas 已经能在家洗碗",C:"没有任何机器人能在真实农场里自动采摘水果。Demo 能跑,但量产级泛化未解。",D:"2010 年代就已经被解决了"},answer:"C",reveal:["现实拷问:行业经典未解之题,就是真实农场里的水果采摘。","","每个农场:光照、土壤、植物形状、季节都不一样。训练抓番茄的机器人不会抓草莓。表演级机器人 ≠ 量产级机器人。","从爆红 demo 到混乱真实世界的可靠性,这中间的鸿沟才是具身智能研究真正在做的事。"]},{kind:"mcq",title:"5 / 7 · 控制当今具身智能的是什么?",question:'最前沿的研究机器人,"大脑"最可能是:',options:{A:"大语言模型 LLM(如 GPT-4)",B:"视觉-语言-动作 VLA 模型 —— 视觉 + 语言 + 电机动作",C:"工程师手写的规则脚本",D:"训练多年的强化学习"},answer:"B",reveal:["LLM 善于文本 —— 但它看不见、动不了。","","具身智能的前沿是 VLA = Vision + Language + Action:"," · 视觉:编码摄像头图像"," · 语言:读你的指令"," · 动作:输出电机命令(xyz、旋转、夹爪)","","今天你对话的是 ICOA-VLA —— 一个跑在 ICOA 服务器上的研究级 VLA。"]},{kind:"story",title:"6 / 7 · ICOA 的押注 —— 具身智能的 ImageNet 时刻",body:["2010 年计算机视觉的位置,就是 2026 年具身智能的位置。","","在 ImageNet + AlexNet(2012)之前,CV 没有公认的评估标准。","然后单一基准 + 一个深度网络,开启了整个现代 AI 时代。","",chalk.bold.yellow("ICOA 2026 在具身智能安全上做同样的押注。"),""," · VLA 和竞争架构远未成熟",' · 没有"VLA 安全意味着什么"的公认标准'," · 没有机器人策略对抗鲁棒性的公开基准"," · 整个行业还在思考要测什么","","本届奥赛的 VLA4CTF Pioneer Round(先锋轮),就是第一代选手","探查 + 对抗攻击当前前沿 VLA 方法的舞台。","",'你不只是来比赛。你在生成关于"当今具身智能到底有多脆弱"',"的全球首批公开数据点。"]},{kind:"story",title:"7 / 7 · 不只是一场比赛 —— 背后的课程体系",body:[chalk.bold.white("ASRA 近期战绩(本届奥赛组织方):")," · IOAI 2024 保加利亚 —— 12 岁男生,实操轮金牌(史上最小年龄)"," · IOAI 2025 中国 —— 澳洲两名最小年龄选手,在 3 小时实操轮中"," 不到 1 小时就完成首次通关得分"," · IAIO 2026 冬季 —— 13 岁女生,与全球顶尖高中生并列获 Honorable Mention","","澳大利亚正在探索:从 6 年级硬核 AI 启蒙,到初中生参与","博士级项目的学习曲线。","",chalk.bold.cyan("具身智能安全 —— 三级开放课程:")," "+chalk.green("· 免费 ")+chalk.gray("(本 demo) —— 10 张核心入门卡")," "+chalk.yellow("· 报名选手 ")+chalk.gray("(EA learn token) —— 100 张快速研究通道")," "+chalk.bold.magenta("· 国家队选手 ")+chalk.gray("(ICOA 正式参赛) —— 480 张博士级 PhD-Ready"),"","目标:1–3 个月,从零基础初中生到具身智能安全 PhD-ready 核心能力。","我们正在寻找大学与实验室伙伴共同验证这条学习路径。","",chalk.bold.yellow("现在 —— 准备好看真机器人动起来了吗?")]}];async function c(e,o){if("menu"===e.trim().toLowerCase()){const{returnToMainMenu:e}=await import("../lib/menu-nav.js");return e(o),!0}return!1}const d="__lang_switch__";function g(e){const o=e.trim().match(/^lang(?:\s+(\S+))?$/i);if(!o)return!1;const n=(o[1]||"").toLowerCase();return n?"en"!==n&&"zh"!==n?(console.log(chalk.yellow(` demo2 supports en / zh — "${n}" is not available here.`)),!0):(r({language:n}),console.log(),console.log(chalk.bold.green(" ✓ ")+chalk.gray("Language set to ")+chalk.bold.cyan("zh"===n?"中文":"English")+chalk.gray(". Restarting demo2 in the new language...")),console.log(),!0):(console.log(),console.log(chalk.gray(" Available: ")+chalk.cyan("en")+chalk.gray(" (English), ")+chalk.cyan("zh")+chalk.gray(" (中文)")),console.log(chalk.gray(" Usage: ")+chalk.cyan("lang zh")+chalk.gray(" or ")+chalk.cyan("lang en")),!0)}function y(e=' Press Enter to continue (or type "lang zh" / "menu")...'){return new Promise(o=>{const n=a({input:process.stdin,output:process.stdout});n.question(chalk.gray(e),async e=>{if(!await c(e,n)){if(g(e))return n.close(),void o(d);n.close(),o("")}})})}function u(e){console.log(),console.log(chalk.cyan(" ╭─ ")+chalk.bold.white(e)),console.log(chalk.cyan(" │"))}function h(){console.log(chalk.cyan(" │")),console.log(chalk.cyan(" ╰─")),console.log()}function m(e){for(const o of e)console.log(chalk.cyan(" │ ")+chalk.white(o))}async function p(e,o){u(e.title),m([e.question]),console.log(chalk.cyan(" │"));for(const o of["A","B","C","D"])console.log(chalk.cyan(" │ ")+chalk.bold.cyan(o+".")+" "+chalk.white(e.options[o]));h();const n=o.startsWith("zh")?" 你的选择 (A/B/C/D):":" Your guess (A/B/C/D): ",t=await(r=chalk.gray(n),s=["A","B","C","D"],new Promise(e=>{const o=a({input:process.stdin,output:process.stdout}),n=()=>{o.question(r,async a=>{if(await c(a,o))return;if(g(a))return o.close(),void e(d);const t=a.trim().toUpperCase();s.includes(t)?(o.close(),e(t)):(console.log(chalk.gray(` (type one of: ${s.join(" / ")}, or ${chalk.cyan("lang")} / ${chalk.cyan("menu")})`)),n())})};n()}));var r,s;if(t===d)return"lang_switch";const i=t===e.answer;if(console.log(),i)console.log(" "+chalk.bold.green(o.startsWith("zh")?"✓ 正确。":"✓ Correct."));else{const n=o.startsWith("zh")?"你选了 ":"You chose ",a=o.startsWith("zh")?";正确答案是 ":"; the answer is ",r=o.startsWith("zh")?"。请看:":". Read on:";console.log(" "+chalk.bold.yellow("✗ ")+chalk.gray(n)+chalk.white(t)+chalk.gray(a)+chalk.bold.white(e.answer)+chalk.gray(r))}console.log();for(const o of e.reveal)console.log(chalk.gray(" "+o));return console.log(),await y(o.startsWith("zh")?' 按回车继续(或输入 "lang en" / "menu")...':' Press Enter to continue (or type "lang zh" / "menu")...')===d?"lang_switch":"next"}async function A(e,o){return u(e.title),m(e.body),h(),await y(o.startsWith("zh")?' 按回车继续(或输入 "lang en" / "menu")...':' Press Enter to continue (or type "lang zh" / "menu")...')===d?"lang_switch":"next"}export async function runDemo2(){const e=s();e&&e.pause();try{for(;"lang_switch"===await b(););}finally{e&&e.resume()}}async function b(){const a=(t().language||"en").toLowerCase(),r=a.startsWith("zh");if(console.clear(),console.log(),console.log(chalk.cyan(" ═══════════════════════════════════════════════════")),console.log(chalk.bold.yellow(r?" ICOA 2026 · 具身智能安全 Demo":" ICOA 2026 · Embodied AI Security Demo")),console.log(chalk.gray(r?" 5 分钟 — 7 张卡片 + 一段真机器人渲染":" 5 minutes — 7 cards + a live robot render")),console.log(chalk.cyan(" ═══════════════════════════════════════════════════")),console.log(),r){if(console.log(chalk.white(" ICOA 2026 推出 ")+chalk.bold.cyan("Pioneer Round(先锋轮):VLA4CTF")),console.log(chalk.gray(" 在主赛事 ")+chalk.green("AI4CTF")+chalk.gray("(Day 1)和 ")+chalk.red("CTF4AI")+chalk.gray("(Day 2)之前,探索具身智能安全。")),console.log(),console.log(chalk.gray(" 本 demo 是你进入这条新赛道的入门地图。")),console.log(),console.log(chalk.gray(" 💡 任何时候输入 ")+chalk.bold.cyan("menu")+chalk.gray(" 返回主菜单;输入 ")+chalk.bold.cyan("lang en")+chalk.gray(" 切换英文。")),console.log(),await y(chalk.gray(' 按回车开始(或输入 "menu" 离开)...'))===d)return"lang_switch"}else if(console.log(chalk.white(" ICOA 2026 introduces the ")+chalk.bold.cyan("Pioneer Round: VLA4CTF")),console.log(chalk.gray(" exploring embodied AI security before the main events: ")+chalk.green("AI4CTF")+chalk.gray(" (Day 1) and ")+chalk.red("CTF4AI")+chalk.gray(" (Day 2).")),console.log(),console.log(chalk.gray(" This demo is your map to the new track.")),console.log(),console.log(chalk.gray(" 💡 Type ")+chalk.bold.cyan("menu")+chalk.gray(" to leave; type ")+chalk.bold.cyan("lang zh")+chalk.gray(" for Chinese.")),console.log(),await y(chalk.gray(' Press Enter to begin (or "menu" to leave)...'))===d)return"lang_switch";for(const e of function(e){return e.startsWith("zh")?l:i}(a))if("lang_switch"===("mcq"===e.kind?await p(e,a):await A(e,a)))return"lang_switch";return await async function(){console.log(),console.log(chalk.cyan(" ╭─ ")+chalk.bold.white("Final act — watch carefully")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.white("In a few seconds you'll see a Franka Panda arm")),console.log(chalk.cyan(" │ ")+chalk.white("controlled by ")+chalk.bold.cyan("ICOA-VLA")+chalk.white(", a research-grade vision-language-action model.")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.gray("Instruction: ")+chalk.white('"Pick up the red cup"')),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" ╰─")),console.log(),await y(chalk.gray(" Press Enter when you're ready..."));const a=`${process.env.ICOA_SERVER_URL?.replace(/\/+$/,"")||"https://practice.icoa2026.au"}/api/ai/vla/41/sim`,{fetchWithCountdown:t}=await import("../lib/countdown.js");try{const r=fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({}),signal:AbortSignal.timeout(6e4)}),s=await t(r);if(!s.ok)return void console.log(chalk.yellow(` Sim service unavailable (HTTP ${s.status}).`));const i=await s.json();if(!i.success||!i.data?.mp4_b64)return void console.log(chalk.yellow(" Renderer returned no video."));const l=process.env.TMPDIR||"/tmp",c=n(l,`icoa-demo2-${Date.now()}.mp4`);o(c,Buffer.from(i.data.mp4_b64,"base64")),console.log(),console.log(" "+chalk.bold.green("✓ ")+chalk.gray("Rendered.")),i.data.description&&console.log(" "+chalk.gray("Action: ")+chalk.white(i.data.description));const d="darwin"===process.platform?"open":"win32"===process.platform?"start":"xdg-open";d?(e(d,[c],{stdio:"ignore",detached:!0}).unref(),console.log(" "+chalk.gray("Opening in your default video player..."))):console.log(" "+chalk.gray("Open the file above in your video player."))}catch(e){const o=e instanceof Error?e.message:String(e);console.log(chalk.yellow(` Sim error: ${o}`))}}(),console.log(),console.log(chalk.cyan(" ╭─ ")+chalk.bold.white("What you just did")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.gray("· Interacted with ICOA-VLA, a research VLA")),console.log(chalk.cyan(" │ ")+chalk.gray("· Watched MuJoCo physics render a real robot arm")),console.log(chalk.cyan(" │ ")+chalk.gray("· All running on the ICOA stack")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.bold.yellow("Where to next")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.bold.green(" learn ")+chalk.gray(" free 11-card curriculum (LEARNDEMO01) — no token needed")),console.log(chalk.cyan(" │ ")+chalk.bold.green(" learn ")+chalk.gray(" 100/480-card track — ask your country's team for an ")+chalk.bold.yellow("EA")+chalk.gray(" token")),console.log(chalk.cyan(" │ ")+chalk.bold.green(" exam ")+chalk.gray(" Paper D (VLA4CTF) for the Pioneer Round — requires ")+chalk.bold.yellow("PD")+chalk.gray(" token")),console.log(chalk.cyan(" │")),console.log(chalk.cyan(" │ ")+chalk.gray("Country team contact: ")+chalk.cyan("australia@icoa2026.au")),console.log(chalk.cyan(" │ ")+chalk.gray("Website: ")+chalk.cyan.underline("https://icoa2026.au")),console.log(chalk.cyan(" ╰─")),console.log(),"done"}export function registerDemo2Command(e){e.command("demo2").description("Embodied AI Security — 7-card intro + live MuJoCo sim (free, ~5 min)").action(async()=>{try{await runDemo2()}catch(e){const o=e instanceof Error?e.message:String(e);console.log(chalk.yellow("\n demo2 ended: "+o))}})}
|