univer-cli 0.1.7 → 0.1.9

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.
@@ -1 +0,0 @@
1
- const _0x1539f1=_0x2f58;(function(_0x3006be,_0x1ff85f){const _0x4a0b9c=_0x2f58,_0x2c57b8=_0x3006be();while(!![]){try{const _0x515aa9=parseInt(_0x4a0b9c(0x204))/0x1*(parseInt(_0x4a0b9c(0x330))/0x2)+-parseInt(_0x4a0b9c(0x202))/0x3*(-parseInt(_0x4a0b9c(0x308))/0x4)+-parseInt(_0x4a0b9c(0x26d))/0x5+parseInt(_0x4a0b9c(0x333))/0x6+parseInt(_0x4a0b9c(0x1eb))/0x7+parseInt(_0x4a0b9c(0x1e1))/0x8*(parseInt(_0x4a0b9c(0x206))/0x9)+-parseInt(_0x4a0b9c(0x2e1))/0xa;if(_0x515aa9===_0x1ff85f)break;else _0x2c57b8['push'](_0x2c57b8['shift']());}catch(_0x12d555){_0x2c57b8['push'](_0x2c57b8['shift']());}}}(_0x431d,0x19821));import{o as _0x4c7333}from'./rolldown-runtime-D8j-JhcR.js';import{gn as _0x2a36d4}from'./vendor-DjomC5bd.js';import{a as _0x4721b0,i as _0x378abb,n as _0x55add6,o as _0x443850,r as _0x188ced}from'./trace-DPfd8LdJ.js';import{fork as _0x50e56d,spawn as _0x463fd1}from'node:child_process';import{constants as _0xe4a7ec,existsSync as _0x390ebd,mkdirSync as _0x460694,readFileSync as _0xeead2d}from'node:fs';import{access as _0x50b703,appendFile as _0x459368,mkdir as _0xf0d57,readFile as _0x5b8678,readdir as _0x2ff29b,realpath as _0x26650d,rename as _0x4a0359,rm as _0x2dcc20,stat as _0x1e846a,writeFile as _0x6c3ba4}from'node:fs/promises';import{basename as _0x40b1df,dirname as _0x73c0a7,extname as _0x204563,join as _0x5a76fb,resolve as _0x48276b}from'node:path';import{fileURLToPath as _0x2b74e2,pathToFileURL as _0x52835a}from'node:url';import{createRequire as _0x4710ea}from'node:module';import{hostname as _0x258e12}from'node:os';import{createHash as _0xdf0e83,randomUUID as _0x3bdc2d}from'node:crypto';import _0x41aef4 from'node:net';import _0xb4250b from'node:process';import{EventEmitter as _0x2495c1}from'node:events';const x={'Health':_0x1539f1(0x305),'Shutdown':_0x1539f1(0x28e),'SessionCreateWorkbook':'session.createWorkbook','SessionEvalJs':_0x1539f1(0x1b1),'SessionExportWorkbookFile':_0x1539f1(0x2bf),'SessionExportWorkbookData':_0x1539f1(0x2ab),'SessionDispose':_0x1539f1(0x24f),'SessionGetWorkbook':_0x1539f1(0x222),'SessionLoadWorkbook':_0x1539f1(0x217),'SessionLoadWorkbookDataReplayPack':_0x1539f1(0x1be)};var ge=class{['debug'](_0x161bb2){}[_0x1539f1(0x272)](_0x532a45){}[_0x1539f1(0x20c)](_0x887aa7){}[_0x1539f1(0x2cf)](_0x80a086){}[_0x1539f1(0x2e0)](_0x53542d){}async['flush'](){}};function _e(_0x4ef391,_0x884bb9=new Date()){const _0x1599da=_0x1539f1;let _0x36b922=_0x55add6[_0x1599da(0x1d3)]();return{'time':_0x884bb9[_0x1599da(0x1b4)](),'level':_0x4ef391['level']??_0x1599da(0x272),'event_name':_0x4ef391[_0x1599da(0x24c)],'component':_0x4ef391[_0x1599da(0x311)],'process_role':_0x4ef391[_0x1599da(0x242)],'pid':process['pid'],..._0x4ef391[_0x1599da(0x327)]===void 0x0?{}:{'message':_0x4ef391[_0x1599da(0x327)]},..._0x36b922===void 0x0?{}:{'trace_id':_0x36b922[_0x1599da(0x2d9)],'span_id':_0x36b922[_0x1599da(0x1ab)],'trace_flags':_0x36b922[_0x1599da(0x33d)],..._0x36b922[_0x1599da(0x2f7)]===void 0x0?{}:{'parent_span_id':_0x36b922[_0x1599da(0x2f7)]}},..._0x4ef391[_0x1599da(0x2cf)]===void 0x0?{}:{'error':ve(_0x4ef391[_0x1599da(0x2cf)])},..._0x4ef391[_0x1599da(0x337)]??{}};}function ve(_0x170920){const _0x12fef8=_0x1539f1;return _0x170920 instanceof Error?{'message':_0x170920[_0x12fef8(0x327)],'name':_0x170920[_0x12fef8(0x285)],...be(_0x170920),..._0x170920[_0x12fef8(0x294)]===void 0x0?{}:{'stack':_0x170920[_0x12fef8(0x294)]},...ye(_0x170920)}:{'message':typeof _0x170920=='string'?_0x170920:JSON[_0x12fef8(0x2c2)](_0x170920)};}function ye(_0x15cc39){const _0xdf95fd=_0x1539f1;let _0x58b7ed=_0x15cc39;return typeof _0x58b7ed[_0xdf95fd(0x21f)]=='string'?{'code':_0x58b7ed['code']}:{};}function be(_0x6b2343){const _0x360fac=_0x1539f1;let _0x394328=_0x6b2343;return _0x394328[_0x360fac(0x30a)]===null||typeof _0x394328['logFields']!=_0x360fac(0x33e)||Array['isArray'](_0x394328[_0x360fac(0x30a)])?{}:{'details':_0x394328[_0x360fac(0x30a)]};}var xe=_0x4c7333(_0x2a36d4(),0x1)[_0x1539f1(0x2fa)],Se=0xa*0x400*0x400,Ce=0x5,we=0x3e8,Te=class{[_0x1539f1(0x1f4)];[_0x1539f1(0x1e4)];[_0x1539f1(0x1cd)];[_0x1539f1(0x30c)];[_0x1539f1(0x1ae)];[_0x1539f1(0x208)];['rotationCheckIntervalMs'];[_0x1539f1(0x2b7)]=!0x1;['nextRotationCheckAt']=0x0;['rotationInFlight'];[_0x1539f1(0x29b)]=!0x1;constructor(_0x4ac5bc){const _0x2fff35=_0x1539f1;this['closeAfterFlush']=_0x4ac5bc[_0x2fff35(0x1cd)]===!0x0,this[_0x2fff35(0x30c)]=_0x4ac5bc['logPath'],this[_0x2fff35(0x1ae)]=_0x4ac5bc[_0x2fff35(0x1ae)]??Ce,this['maxBytes']=_0x4ac5bc[_0x2fff35(0x208)]??Se,this[_0x2fff35(0x27e)]=_0x4ac5bc[_0x2fff35(0x27e)]??we,this[_0x2fff35(0x1f4)]=new xe({'dest':_0x4ac5bc['logPath'],'mkdir':!0x0,'sync':!0x1}),this[_0x2fff35(0x1e4)]=new Promise(_0x4761b9=>{const _0x1b4c22=_0x2fff35;this[_0x1b4c22(0x1f4)][_0x1b4c22(0x260)](_0x1b4c22(0x1e4),()=>{_0x4761b9();}),this['destination'][_0x1b4c22(0x260)]('error',()=>{_0x4761b9();});});}['debug'](_0xe438cf){const _0x96c44a=_0x1539f1;this[_0x96c44a(0x2e0)]({..._0xe438cf,'level':'debug'});}[_0x1539f1(0x272)](_0x1c9839){const _0x52a0be=_0x1539f1;this[_0x52a0be(0x2e0)]({..._0x1c9839,'level':'info'});}[_0x1539f1(0x20c)](_0x3ece65){const _0x4fb768=_0x1539f1;this['event']({..._0x3ece65,'level':_0x4fb768(0x20c)});}[_0x1539f1(0x2cf)](_0x130493){const _0x526241=_0x1539f1;this[_0x526241(0x2e0)]({..._0x130493,'level':_0x526241(0x2cf)});}[_0x1539f1(0x2e0)](_0x4d1370){const _0x3f2a4b=_0x1539f1;if(!(this[_0x3f2a4b(0x2b7)]||this[_0x3f2a4b(0x29b)]))try{this[_0x3f2a4b(0x29b)]=!this['destination'][_0x3f2a4b(0x1d0)](JSON['stringify'](_e(_0x4d1370))+'\x0a'),this['saturated']&&this[_0x3f2a4b(0x1f4)][_0x3f2a4b(0x260)](_0x3f2a4b(0x27b),()=>{const _0x354374=_0x3f2a4b;this[_0x354374(0x29b)]=!0x1;}),this[_0x3f2a4b(0x2d6)]();}catch{}}async[_0x1539f1(0x211)](){const _0xaff928=_0x1539f1;this[_0xaff928(0x2b7)]||(await this[_0xaff928(0x1e4)],await new Promise(_0x5c7d60=>{const _0x4546c3=_0xaff928;this[_0x4546c3(0x1f4)][_0x4546c3(0x211)](()=>{_0x5c7d60();});}),await this[_0xaff928(0x310)],this['closeAfterFlush']&&(this['closed']=!0x0,this['destination'][_0xaff928(0x267)]()));}[_0x1539f1(0x2d6)](){const _0x1509a9=_0x1539f1;let _0x5ed229=Date[_0x1509a9(0x1e5)]();this['rotationInFlight']!==void 0x0||_0x5ed229<this[_0x1509a9(0x35b)]||(this['nextRotationCheckAt']=_0x5ed229+this[_0x1509a9(0x27e)],this[_0x1509a9(0x310)]=this['rotateIfNeeded']()[_0x1509a9(0x26b)](()=>{})['finally'](()=>{const _0x1dad1d=_0x1509a9;this[_0x1dad1d(0x310)]=void 0x0;}));}async['rotateIfNeeded'](){const _0x418754=_0x1539f1;await this['ready'],await je({'logPath':this[_0x418754(0x30c)],'maxArchiveFiles':this[_0x418754(0x1ae)],'maxBytes':this[_0x418754(0x208)],'flush':async()=>{await new Promise(_0x41ccce=>{const _0x100930=_0x2f58;this[_0x100930(0x1f4)][_0x100930(0x211)](()=>{_0x41ccce();});});}})&&!this[_0x418754(0x2b7)]&&this[_0x418754(0x1f4)][_0x418754(0x340)](this['logPath']);}};function Ee(_0xef91ac){return new Te(_0xef91ac);}function De(_0x2da1c7){let {env:_0x4fe5d8,role:_0x1c5054,..._0x4d7a0a}=_0x2da1c7,_0x2c1bba=S(_0x4fe5d8);return Ee({..._0x4d7a0a,'logPath':ke(_0x2c1bba,_0x1c5054)});}function Oe(_0x9f48ec=process.env){const _0x3c9b48=_0x1539f1;let _0x1dba96=_0x9f48ec[_0x3c9b48(0x322)]?.[_0x3c9b48(0x1d2)]();if(_0x1dba96)return _0x48276b(_0x1dba96);let _0x53201d=_0x9f48ec[_0x3c9b48(0x1c7)]?.[_0x3c9b48(0x1d2)]()||_0x9f48ec[_0x3c9b48(0x1d6)]?.[_0x3c9b48(0x1d2)]();if(!_0x53201d)throw Error(_0x3c9b48(0x31b));return _0x48276b(_0x53201d,_0x3c9b48(0x1f7));}function S(_0x5a5c1f=process.env){const _0x5e3b5f=_0x1539f1;let _0x5a43a2=Oe(_0x5a5c1f),_0x252b8a=_0x5a76fb(_0x5a43a2,_0x5e3b5f(0x256));return{'homeDir':_0x5a43a2,'logsDir':_0x252b8a,'cliLogPath':_0x5a76fb(_0x252b8a,_0x5e3b5f(0x324)),'daemonLogPath':_0x5a76fb(_0x252b8a,'daemon.jsonl'),'runtimeLogPath':_0x5a76fb(_0x252b8a,_0x5e3b5f(0x2a9)),'viewHostLogPath':_0x5a76fb(_0x252b8a,_0x5e3b5f(0x282))};}function ke(_0x22d0c4,_0x2bc163){const _0x3f0d96=_0x1539f1;switch(_0x2bc163){case _0x3f0d96(0x314):return _0x22d0c4[_0x3f0d96(0x1e3)];case _0x3f0d96(0x1fe):return _0x22d0c4[_0x3f0d96(0x2e4)];case _0x3f0d96(0x2aa):return _0x22d0c4[_0x3f0d96(0x20b)];case _0x3f0d96(0x26c):return _0x22d0c4['viewHostLogPath'];}}async function Ae(_0x330aa4,_0x469a75){const _0x2912b5=_0x1539f1;await _0xf0d57(_0x73c0a7(_0x330aa4),{'recursive':!0x0,'mode':0x1c0}),await _0x459368(_0x330aa4,_0x469a75+'\x0a',_0x2912b5(0x328));try{await je({'logPath':_0x330aa4,'maxArchiveFiles':Ce,'maxBytes':Se});}catch{}}async function je(_0x4b0971){const _0x5698c7=_0x1539f1;if(_0x4b0971['maxBytes']<=0x0)return!0x1;await _0x4b0971[_0x5698c7(0x211)]?.();let _0x19ed30;try{_0x19ed30=await _0x1e846a(_0x4b0971[_0x5698c7(0x30c)]);}catch{return!0x1;}if(!_0x19ed30['isFile']()||_0x19ed30[_0x5698c7(0x1cc)]<_0x4b0971[_0x5698c7(0x208)])return!0x1;let _0x477deb=_0x5a76fb(_0x73c0a7(_0x4b0971[_0x5698c7(0x30c)]),_0x5698c7(0x224));await _0xf0d57(_0x477deb,{'recursive':!0x0,'mode':0x1c0});let _0x67a6c4=_0x5a76fb(_0x477deb,_0x40b1df(_0x4b0971[_0x5698c7(0x30c)])+'.'+Ne(new Date())+'.'+process[_0x5698c7(0x268)]);try{await _0x4a0359(_0x4b0971[_0x5698c7(0x30c)],_0x67a6c4);}catch{return!0x1;}return await Me({'archiveDir':_0x477deb,'maxArchiveFiles':_0x4b0971[_0x5698c7(0x1ae)],'prefix':_0x40b1df(_0x4b0971[_0x5698c7(0x30c)])+'.'}),!0x0;}async function Me(_0x334ad6){const _0x511878=_0x1539f1;if(_0x334ad6[_0x511878(0x1ae)]<0x0)return;let _0x11a187;try{_0x11a187=await _0x2ff29b(_0x334ad6[_0x511878(0x33b)]);}catch{return;}let _0x3ccb02=_0x11a187[_0x511878(0x200)](_0x370121=>_0x370121[_0x511878(0x252)](_0x334ad6[_0x511878(0x20f)]))[_0x511878(0x355)]()['reverse']();await Promise[_0x511878(0x309)](_0x3ccb02[_0x511878(0x1e6)](_0x334ad6['maxArchiveFiles'])['map'](async _0x1127fd=>await _0x2dcc20(_0x5a76fb(_0x334ad6['archiveDir'],_0x1127fd),{'force':!0x0})));}function Ne(_0x2ac766){const _0x444e7e=_0x1539f1;return _0x2ac766[_0x444e7e(0x1b4)]()['replace'](/[^0-9A-Za-z]/gu,'');}var Pe=0x46,Fe='\x5c\x5c.\x5cpipe\x5c';function Ie(_0x54726f=process.env){const _0x59695b=_0x1539f1;let _0xba401d=_0x54726f[_0x59695b(0x322)]?.[_0x59695b(0x1d2)]();if(_0xba401d)return _0x48276b(_0xba401d);let _0x36e246=_0x54726f[_0x59695b(0x1c7)]?.[_0x59695b(0x1d2)]()||_0x54726f['USERPROFILE']?.[_0x59695b(0x1d2)]();if(!_0x36e246)throw Error(_0x59695b(0x31b));return _0x48276b(_0x36e246,_0x59695b(0x1f7));}function C(_0x29c8da=process.env){const _0x25b80d=_0x1539f1;let _0x50c41e=Ie(_0x29c8da),_0x5afc51=_0x5a76fb(_0x50c41e,'daemon'),_0x166d59=_0x5a76fb(_0x50c41e,_0x25b80d(0x221)),_0x24c9ff=S(_0x29c8da),_0x57b2b3=Le(_0x50c41e);return{'homeDir':_0x50c41e,'daemonDir':_0x5afc51,'logsDir':_0x24c9ff[_0x25b80d(0x307)],'daemonLogPath':_0x24c9ff['daemonLogPath'],'sessionRoot':_0x166d59,'socketPath':_0x57b2b3,'pidPath':_0x5a76fb(_0x5afc51,_0x25b80d(0x1fd)),'metaPath':_0x5a76fb(_0x5afc51,_0x25b80d(0x325)),'lockPath':_0x5a76fb(_0x5afc51,_0x25b80d(0x316))};}function Le(_0x1d2c2a,_0x5c1d5e=process[_0x1539f1(0x306)]){const _0x30da33=_0x1539f1;let _0x42ee9c=_0x5a76fb(_0x1d2c2a,_0x30da33(0x1fe),_0x30da33(0x354));return _0x5c1d5e===_0x30da33(0x20d)?Fe+_0x30da33(0x1df)+ze(_0x42ee9c):_0x42ee9c[_0x30da33(0x1ee)]<=Pe?_0x42ee9c:_0x5a76fb(_0x30da33(0x1e7),_0x30da33(0x28b)+ze(_0x42ee9c)+_0x30da33(0x296));}function w(_0xe1c0ce){const _0x4d331a=_0x1539f1;return _0xe1c0ce[_0x4d331a(0x252)](Fe);}function Re(_0x53c2df,_0x31aef0=process.env){const _0x452972=_0x1539f1;let _0x3acdbd=_0x5a76fb(C(_0x31aef0)[_0x452972(0x229)],_0x53c2df);return{'sessionDir':_0x3acdbd,'tracePath':S(_0x31aef0)[_0x452972(0x20b)],'stderrPath':_0x5a76fb(_0x3acdbd,_0x452972(0x31f))};}function ze(_0x153793){const _0x2aedb9=_0x1539f1;return _0xdf0e83(_0x2aedb9(0x2f3))[_0x2aedb9(0x21d)](_0x153793)[_0x2aedb9(0x1c4)]('hex')['slice'](0x0,0x10);}var Be=0x3a98,Ve=0x7530;async function T(_0xcefb2c={}){const _0x26538c=_0x1539f1;return await D({'jsonrpc':_0x26538c(0x343),'id':k(),'method':x[_0x26538c(0x34d)]},{..._0xcefb2c,'autoStart':!0x1});}async function E(_0x1208e5={}){const _0x416c32=_0x1539f1;let _0x2b449b=_0x1208e5[_0x416c32(0x2a0)]??_0xb4250b[_0x416c32(0x2a0)],{readDaemonBuildId:_0x8f6191}=await import(_0x416c32(0x2f6)),_0x4e725d=_0x8f6191(_0x2b449b);try{let _0x5aceca=await T({..._0x1208e5,'autoStart':!0x1});return lt(_0x4e725d,_0x5aceca[_0x416c32(0x26a)]),_0x5aceca;}catch(_0x543643){if(_0x1208e5[_0x416c32(0x346)]===!0x1)throw _0x543643;}let _0x1159bf=await it(_0x2b449b,_0x4e725d,_0x1208e5[_0x416c32(0x303)]),_0x131f42=_0x1208e5[_0x416c32(0x2ca)]??Be,_0x4318c6=Date['now']()+_0x131f42,_0x47f138;for(;Date[_0x416c32(0x1e5)]()<_0x4318c6;)try{let _0x5e8218=await T({..._0x1208e5,'autoStart':!0x1});return lt(_0x4e725d,_0x5e8218[_0x416c32(0x26a)]),_0x5e8218;}catch(_0x2cd10d){_0x47f138=_0x2cd10d,await ft(0x64);}throw Error(['Timed\x20out\x20waiting\x20for\x20daemon\x20startup\x20after\x20'+_0x131f42+'ms',_0x416c32(0x23b)+_0x1159bf[_0x416c32(0x2c3)]+'\x20'+_0x1159bf['args'][_0x416c32(0x1c5)]('\x20'),'last\x20health\x20error:\x20'+dt(_0x47f138)]['join'](';\x20'));}async function He(_0x41fb84={}){const _0x379977=_0x1539f1;let _0x45f9cc=C(_0x41fb84[_0x379977(0x2a0)]??_0xb4250b[_0x379977(0x2a0)]);try{return $e(await T({..._0x41fb84,'autoStart':!0x1}),_0x45f9cc);}catch(_0x44179a){return rt(_0x45f9cc)?tt(_0x45f9cc,_0x44179a):et(_0x45f9cc);}}async function Ue(_0x41498b={}){return await E(_0x41498b);}async function We(_0x4cfc8f={}){const _0x43d01a=_0x1539f1;let _0x206687=C(_0x4cfc8f['env']??_0xb4250b[_0x43d01a(0x2a0)]);try{await D({'jsonrpc':'2.0','id':k(),'method':x[_0x43d01a(0x22a)]},{..._0x4cfc8f,'autoStart':!0x1});}catch{await ot(_0x206687[_0x43d01a(0x351)]),await _0x2dcc20(_0x206687['pidPath'],{'force':!0x0})[_0x43d01a(0x26b)](()=>void 0x0),await _0x2dcc20(_0x206687[_0x43d01a(0x231)],{'force':!0x0})[_0x43d01a(0x26b)](()=>void 0x0),await _0x2dcc20(_0x206687[_0x43d01a(0x32a)],{'recursive':!0x0,'force':!0x0})[_0x43d01a(0x26b)](()=>void 0x0);return;}let _0x9d6165=Date['now']()+(_0x4cfc8f[_0x43d01a(0x2ca)]??Be);for(;Date[_0x43d01a(0x1e5)]()<_0x9d6165;){if(!at(_0x206687[_0x43d01a(0x351)])&&!_0x390ebd(_0x206687[_0x43d01a(0x1d9)])&&!_0x390ebd(_0x206687[_0x43d01a(0x231)]))return;await ft(0x64);}throw Error('Daemon\x20did\x20not\x20stop\x20before\x20timeout');}async function Ge(_0x1444fa,_0x579e89,_0x59b60a={}){const _0x37a30a=_0x1539f1;return await E(_0x59b60a),await D({'jsonrpc':_0x37a30a(0x343),'id':k(),'method':x[_0x37a30a(0x291)],'params':{'workbookPath':_0x1444fa,'workbookData':_0x579e89,'cwd':_0x59b60a[_0x37a30a(0x1d4)]}},_0x59b60a);}async function Ke(_0x260cd5,_0xc827bf,_0x21d0f8={}){const _0xf152fe=_0x1539f1;return await E(_0x21d0f8),await D({'jsonrpc':_0xf152fe(0x343),'id':k(),'method':x[_0xf152fe(0x2bc)],'params':{'workbookPath':_0x260cd5,'cwd':_0x21d0f8['cwd'],'baseWorkbookData':_0xc827bf['baseWorkbookData'],'mutations':_0xc827bf[_0xf152fe(0x1c8)]}},_0x21d0f8);}async function qe(_0x414072,_0x204e70={}){const _0x989dc5=_0x1539f1;return await E(_0x204e70),await D({'jsonrpc':_0x989dc5(0x343),'id':k(),'method':x['SessionGetWorkbook'],'params':{'workbookPath':_0x414072,'cwd':_0x204e70[_0x989dc5(0x1d4)]}},_0x204e70);}async function Je(_0x4f83de,_0x425ede={}){const _0x2cc4dc=_0x1539f1;return await E(_0x425ede),await D({'jsonrpc':_0x2cc4dc(0x343),'id':k(),'method':x[_0x2cc4dc(0x24e)],'params':{'workbookPath':_0x4f83de,'cwd':_0x425ede[_0x2cc4dc(0x1d4)],'id':_0x425ede['id'],'name':_0x425ede[_0x2cc4dc(0x285)]}},_0x425ede);}async function Ye(_0x25b666,_0x19780a,_0x420f73={}){const _0x23bd08=_0x1539f1;return await E(_0x420f73),await D({'jsonrpc':_0x23bd08(0x343),'id':k(),'method':x[_0x23bd08(0x251)],'params':{'workbookPath':_0x25b666,'code':_0x19780a,'cwd':_0x420f73[_0x23bd08(0x1d4)],'mutates':_0x420f73[_0x23bd08(0x25f)]}},_0x420f73);}async function Xe(_0xf8e987,_0xa40439={}){const _0x181f83=_0x1539f1;return await E(_0xa40439),await D({'jsonrpc':_0x181f83(0x343),'id':k(),'method':x[_0x181f83(0x210)],'params':{'workbookPath':_0xf8e987,'cwd':_0xa40439['cwd']}},_0xa40439);}async function Ze(_0x230123,_0x447c59,_0x9db88e={}){const _0x3bd97f=_0x1539f1;return await E(_0x9db88e),await D({'jsonrpc':_0x3bd97f(0x343),'id':k(),'method':x[_0x3bd97f(0x1d5)],'params':{'workbookPath':_0x230123,'cwd':_0x9db88e['cwd'],'format':_0x447c59[_0x3bd97f(0x21a)],'outputPath':_0x447c59[_0x3bd97f(0x2b4)]}},_0x9db88e);}async function Qe(_0x5a61db,_0x2adddb={}){const _0x1405bc=_0x1539f1;return await E(_0x2adddb),await D({'jsonrpc':_0x1405bc(0x343),'id':k(),'method':x[_0x1405bc(0x2d4)],'params':{'workbookPath':_0x5a61db,'cwd':_0x2adddb['cwd']}},_0x2adddb);}async function D(_0x384dd8,_0x30b854){const _0x54ccc0=_0x1539f1;return await _0x55add6[_0x54ccc0(0x2e2)]({'name':_0x443850[_0x54ccc0(0x23c)],'kind':_0x54ccc0(0x326)},async()=>{const _0x18d089=_0x54ccc0;let _0x3348f1=C(_0x30b854[_0x18d089(0x2a0)]??_0xb4250b[_0x18d089(0x2a0)]);w(_0x3348f1[_0x18d089(0x351)])||await _0x50b703(_0x3348f1[_0x18d089(0x351)],_0xe4a7ec[_0x18d089(0x25c)]);let _0x33d715=await ct(_0x3348f1['socketPath'],{..._0x384dd8,'meta':_0x55add6[_0x18d089(0x2e6)](_0x384dd8[_0x18d089(0x27a)])},_0x30b854[_0x18d089(0x30f)]??Ve);if(_0x33d715[_0x18d089(0x2cf)])throw Error(_0x33d715[_0x18d089(0x2cf)][_0x18d089(0x327)]);return _0x33d715[_0x18d089(0x2eb)];});}function $e(_0x493b8f,_0x14115e){const _0x5a6849=_0x1539f1;return{'ok':!0x0,'daemon':{'state':_0x5a6849(0x1f5),'pid':_0x493b8f[_0x5a6849(0x268)],'runtimeRoot':_0x493b8f[_0x5a6849(0x26f)],'socketPath':_0x493b8f[_0x5a6849(0x351)],'startedAt':_0x493b8f[_0x5a6849(0x342)],'sessionCount':_0x493b8f[_0x5a6849(0x2da)],'buildId':_0x493b8f['buildId']},'paths':O(_0x14115e),'next':[{'command':_0x5a6849(0x258),'reason':_0x5a6849(0x234)}],'diagnostics':[]};}function et(_0x430288){const _0xbc3d34=_0x1539f1;return{'ok':!0x0,'daemon':nt('stopped',_0x430288),'paths':O(_0x430288),'next':[{'command':_0xbc3d34(0x28f),'reason':_0xbc3d34(0x1e2)}],'diagnostics':[]};}function tt(_0x3b4bea,_0x1d7b6b){const _0x10c427=_0x1539f1;return{'ok':!0x0,'daemon':nt('unreachable',_0x3b4bea),'paths':O(_0x3b4bea),'next':[{'command':'univer\x20daemon\x20stop','reason':_0x10c427(0x28c)},{'command':_0x10c427(0x28f),'reason':_0x10c427(0x332)}],'diagnostics':[{'message':_0x1d7b6b instanceof Error?_0x1d7b6b[_0x10c427(0x327)]:String(_0x1d7b6b)}]};}function nt(_0x4507e3,_0x166f88){const _0x5eb0d3=_0x1539f1;return{'state':_0x4507e3,'pid':null,'runtimeRoot':_0x166f88[_0x5eb0d3(0x30b)],'socketPath':_0x166f88['socketPath'],'startedAt':null,'sessionCount':0x0,'buildId':null};}function O(_0x575d91){const _0x141c7f=_0x1539f1;return{'metaPath':_0x575d91['metaPath'],'lockPath':_0x575d91[_0x141c7f(0x32a)]};}function rt(_0x2d5328){const _0x1083ef=_0x1539f1;return at(_0x2d5328[_0x1083ef(0x351)])||_0x390ebd(_0x2d5328[_0x1083ef(0x1d9)])||_0x390ebd(_0x2d5328[_0x1083ef(0x231)]);}async function it(_0x4e27e3,_0x425242,_0x5c879c){const _0x5e0863=_0x1539f1;let _0x145b7d=st(_0x5c879c);return _0x460694(C(_0x4e27e3)[_0x5e0863(0x259)],{'recursive':!0x0,'mode':0x1c0}),_0x463fd1(_0x145b7d['command'],_0x145b7d[_0x5e0863(0x32b)],{..._0x145b7d[_0x5e0863(0x1d4)]===void 0x0?{}:{'cwd':_0x145b7d[_0x5e0863(0x1d4)]},'detached':!0x0,'stdio':[_0x5e0863(0x31e),_0x5e0863(0x31e),_0x5e0863(0x31e)],'env':ut(_0x4e27e3,_0x425242)})[_0x5e0863(0x1f3)](),_0x145b7d;}function at(_0x2e964f){return w(_0x2e964f)?!0x1:_0x390ebd(_0x2e964f);}async function ot(_0x1b24c6){w(_0x1b24c6)||await _0x2dcc20(_0x1b24c6,{'force':!0x0})['catch'](()=>void 0x0);}function st(_0x271a69){const _0x2a82cd=_0x1539f1;if(_0x271a69===void 0x0)throw Error(_0x2a82cd(0x21e));return{'command':_0x271a69[_0x2a82cd(0x2c3)]??_0xb4250b[_0x2a82cd(0x220)],..._0x271a69[_0x2a82cd(0x1d4)]===void 0x0?{}:{'cwd':_0x271a69['cwd']},'args':[..._0x271a69[_0x2a82cd(0x287)]??[],_0x271a69[_0x2a82cd(0x2dd)],..._0x271a69['args']??['serve']][_0x2a82cd(0x2db)](String)};}async function ct(_0x124e14,_0x2ea512,_0x1ba923){return await new Promise((_0x263402,_0x50284c)=>{const _0x124cf8=_0x2f58;let _0x350dab=_0x41aef4[_0x124cf8(0x302)](_0x124e14),_0x31b3fb='',_0x21939a=setTimeout(()=>{const _0x4a1ff3=_0x124cf8;_0x350dab['destroy'](),_0x50284c(Error(_0x4a1ff3(0x2a4)+_0x2ea512[_0x4a1ff3(0x331)]));},_0x1ba923);_0x350dab['on'](_0x124cf8(0x2d7),()=>{const _0x566e6b=_0x124cf8;_0x350dab[_0x566e6b(0x1d0)](JSON[_0x566e6b(0x2c2)](_0x2ea512)+'\x0a');}),_0x350dab['on']('data',_0x1685d1=>{const _0x58b2c6=_0x124cf8;_0x31b3fb+=_0x1685d1[_0x58b2c6(0x313)](_0x58b2c6(0x328));let _0x4e0e26=_0x31b3fb[_0x58b2c6(0x289)]('\x0a');_0x4e0e26<0x0||(clearTimeout(_0x21939a),_0x350dab['end'](),_0x263402(JSON[_0x58b2c6(0x299)](_0x31b3fb[_0x58b2c6(0x1e6)](0x0,_0x4e0e26)[_0x58b2c6(0x1d2)]())));}),_0x350dab['on'](_0x124cf8(0x2cf),_0x184d08=>{clearTimeout(_0x21939a),_0x50284c(_0x184d08);});});}function lt(_0x27056d,_0x2feb8f){const _0x42ec4a=_0x1539f1;if(_0x27056d!==_0x2feb8f)throw Error(_0x42ec4a(0x2bb)+_0x27056d+_0x42ec4a(0x2b9)+_0x2feb8f+_0x42ec4a(0x28a));}function ut(_0x4e736b,_0x20fb46){const _0x4f3977=_0x1539f1;let _0x57da21={..._0x4e736b,'UNIVER_DAEMON_BUILD_ID_OVERRIDE':_0x20fb46};return delete _0x57da21[_0x4f3977(0x335)],delete _0x57da21[_0x4f3977(0x1bc)],delete _0x57da21[_0x4f3977(0x341)],delete _0x57da21[_0x4f3977(0x24d)],_0x57da21;}function dt(_0x317469){const _0xb0292d=_0x1539f1;return _0x317469 instanceof Error?_0x317469[_0xb0292d(0x327)]:String(_0x317469);}function k(){const _0x245208=_0x1539f1;return'daemon-'+Date[_0x245208(0x1e5)]()['toString'](0x24)+'-'+Math['random']()[_0x245208(0x313)](0x10)['slice'](0x2,0x8);}async function ft(_0x333b03){await new Promise(_0x4079b9=>{setTimeout(_0x4079b9,_0x333b03);});}var pt=0x1388,mt=0xea60,ht=class extends _0x2495c1{[_0x1539f1(0x277)];[_0x1539f1(0x25e)];[_0x1539f1(0x298)]=new Map();[_0x1539f1(0x30f)];[_0x1539f1(0x1bf)]='';[_0x1539f1(0x2ac)]=_0x1539f1(0x2d3);constructor(_0x269691,_0x5d244e){const _0x16be1e=_0x1539f1;super(),this[_0x16be1e(0x207)]=_0x269691,this[_0x16be1e(0x25e)]=_0x5d244e['destroyGraceMs']??pt,this[_0x16be1e(0x30f)]=_0x5d244e[_0x16be1e(0x30f)]??mt,this['child']=_0x50e56d(_0x5d244e['executionPlanePath'],[],{'cwd':_0x5d244e[_0x16be1e(0x1d4)],'env':{...process.env,..._0x5d244e['env'],'UNIVER_SESSION_ID':_0x269691},'execArgv':_0x5d244e['execArgv'],'stdio':[_0x16be1e(0x31e),_0x16be1e(0x31e),_0x16be1e(0x2b6),_0x16be1e(0x22d)]}),this['child'][_0x16be1e(0x1bf)]?.['on']('data',_0x3e3737=>{const _0x319165=_0x16be1e;this['stderr']+=_0x3e3737[_0x319165(0x313)](),_0x5d244e[_0x319165(0x250)]?.(_0x3e3737);}),this[_0x16be1e(0x277)]['on'](_0x16be1e(0x327),_0x262c87=>{const _0x612ebd=_0x16be1e;if(_0x262c87['type']===_0x612ebd(0x1e4)&&(this['status']='ready',this['emit'](_0x612ebd(0x1e4))),_0x262c87[_0x612ebd(0x334)]===_0x612ebd(0x1c3)&&_0x262c87['id']!==void 0x0&&_0x262c87[_0x612ebd(0x22f)]){let _0x4e14cf=this[_0x612ebd(0x298)][_0x612ebd(0x240)](_0x262c87['id']);if(!_0x4e14cf)return;clearTimeout(_0x4e14cf[_0x612ebd(0x1e0)]),this[_0x612ebd(0x298)][_0x612ebd(0x22e)](_0x262c87['id']),_0x4e14cf[_0x612ebd(0x357)](_0x262c87['data']);}}),this[_0x16be1e(0x277)]['on'](_0x16be1e(0x23f),(_0x1c5e2c,_0x3b6b79)=>{const _0x3a3c3f=_0x16be1e;this['status']=_0x3a3c3f(0x35d),this[_0x3a3c3f(0x1de)](Error(_0x3a3c3f(0x1f0)+(_0x1c5e2c??_0x3a3c3f(0x1ac))+',\x20signal='+(_0x3b6b79??_0x3a3c3f(0x1ac))+')'+this['formatStderr']())),this[_0x3a3c3f(0x2a2)]('exit',_0x1c5e2c,_0x3b6b79);}),this['child']['on'](_0x16be1e(0x2cf),_0x406e8b=>{const _0x7a292a=_0x16be1e;this[_0x7a292a(0x2a2)]('error',_0x406e8b);});}['destroy'](){const _0x427eff=_0x1539f1;this[_0x427eff(0x2ac)]===_0x427eff(0x1db)||this['status']===_0x427eff(0x35d)||(this[_0x427eff(0x2ac)]='destroying',this[_0x427eff(0x277)][_0x427eff(0x241)](_0x427eff(0x2b8)),setTimeout(()=>{const _0x1361c9=_0x427eff;this[_0x1361c9(0x277)][_0x1361c9(0x21b)]===null&&this[_0x1361c9(0x277)]['kill'](_0x1361c9(0x1dc));},this[_0x427eff(0x25e)])[_0x427eff(0x1f3)]());}[_0x1539f1(0x1b6)](){const _0x535d51=_0x1539f1;return this['child']['exitCode']===null&&this[_0x535d51(0x277)][_0x535d51(0x2d5)]===null;}async[_0x1539f1(0x228)](_0xcd1f4,_0x4f9a5e){const _0x2d86da=_0x1539f1;if(this[_0x2d86da(0x2ac)]!==_0x2d86da(0x1e4))throw Error(_0x2d86da(0x226));let _0x1b09ab=_0x4f9a5e?.[_0x2d86da(0x263)]??this[_0x2d86da(0x30f)];return new Promise((_0xa84cd,_0x4480fb)=>{const _0x53091e=_0x2d86da;let _0x3b42ff=setTimeout(()=>{const _0x41952d=_0x2f58;this[_0x41952d(0x298)][_0x41952d(0x22e)](_0xcd1f4['id']),_0x4480fb(Error(_0x41952d(0x1f9)));},_0x1b09ab);this['pendingRequests']['set'](_0xcd1f4['id'],{'resolve':_0xa84cd,'reject':_0x4480fb,'timeout':_0x3b42ff}),this[_0x53091e(0x277)][_0x53091e(0x356)]({'type':'rpc-request','id':_0xcd1f4['id'],'data':{..._0xcd1f4,'meta':_0x55add6['injectMeta'](_0xcd1f4[_0x53091e(0x27a)])}});});}async['waitForReady'](_0x4aee10=0x7530){const _0x34f7a4=_0x1539f1;if(this[_0x34f7a4(0x2ac)]!==_0x34f7a4(0x1e4)){if(!this[_0x34f7a4(0x1b6)]())throw Error(_0x34f7a4(0x1b0)+this[_0x34f7a4(0x24a)]());return await new Promise((_0xc29e9f,_0x5e294d)=>{const _0x46e74c=_0x34f7a4;let _0x1479fe=()=>{const _0x2d3c41=_0x2f58;clearTimeout(_0xf1e617),this[_0x2d3c41(0x1f1)]('ready',_0x25ea7f),this[_0x2d3c41(0x1f1)](_0x2d3c41(0x23f),_0x31ab79),this[_0x2d3c41(0x1f1)](_0x2d3c41(0x2cf),_0x3fd0e6);},_0x25ea7f=()=>{_0x1479fe(),_0xc29e9f();},_0x31ab79=()=>{const _0x476038=_0x2f58;_0x1479fe(),_0x5e294d(Error(_0x476038(0x1b0)+this[_0x476038(0x24a)]()));},_0x3fd0e6=_0x5b9b7e=>{const _0x10f495=_0x2f58;_0x1479fe(),_0x5e294d(Error(_0x10f495(0x245)+_0x5b9b7e['message']));},_0xf1e617=setTimeout(()=>{const _0x227181=_0x2f58;_0x1479fe(),_0x5e294d(Error(_0x227181(0x2ad)));},_0x4aee10);this[_0x46e74c(0x260)]('ready',_0x25ea7f),this[_0x46e74c(0x260)](_0x46e74c(0x23f),_0x31ab79),this[_0x46e74c(0x260)](_0x46e74c(0x2cf),_0x3fd0e6);});}}['formatStderr'](){const _0x6ecb4f=_0x1539f1;let _0x3217bd=this[_0x6ecb4f(0x1bf)][_0x6ecb4f(0x1d2)]();return _0x3217bd[_0x6ecb4f(0x1ee)]===0x0?'':'\x0a'+_0x3217bd;}[_0x1539f1(0x1de)](_0x55db63){const _0x4c21cb=_0x1539f1;for(let _0x187217 of this[_0x4c21cb(0x298)]['values']())clearTimeout(_0x187217[_0x4c21cb(0x1e0)]),_0x187217['reject'](_0x55db63);this[_0x4c21cb(0x298)][_0x4c21cb(0x30e)]();}};let A=function(_0x4369ce){const _0x2e4e1b=_0x1539f1;return _0x4369ce['CreateWorkbook']=_0x2e4e1b(0x273),_0x4369ce[_0x2e4e1b(0x1c0)]=_0x2e4e1b(0x253),_0x4369ce['ExportWorkbookFile']=_0x2e4e1b(0x31d),_0x4369ce[_0x2e4e1b(0x300)]=_0x2e4e1b(0x203),_0x4369ce[_0x2e4e1b(0x1d7)]=_0x2e4e1b(0x32c),_0x4369ce[_0x2e4e1b(0x2ce)]=_0x2e4e1b(0x2ee),_0x4369ce;}({});var gt=0x384*0x3e8,_t=class{[_0x1539f1(0x2a0)];[_0x1539f1(0x218)];[_0x1539f1(0x279)];[_0x1539f1(0x221)]=new Map();[_0x1539f1(0x248)];constructor(_0x4fb6b2){const _0x125149=_0x1539f1;this[_0x125149(0x2a0)]=_0x4fb6b2[_0x125149(0x2a0)]??process.env,this[_0x125149(0x218)]=_0x4fb6b2[_0x125149(0x218)]??new ge(),this[_0x125149(0x279)]=_0x4fb6b2[_0x125149(0x279)],this[_0x125149(0x248)]=_0x4fb6b2[_0x125149(0x248)]??vt(this[_0x125149(0x2a0)],gt);}[_0x1539f1(0x1ed)](){const _0xaf13e0=_0x1539f1;return this[_0xaf13e0(0x221)]['size'];}[_0x1539f1(0x2af)](){const _0x411169=_0x1539f1;return this[_0x411169(0x248)];}async[_0x1539f1(0x2a1)](_0x50f78b){const _0x4525e1=_0x1539f1;let _0x47c4f1=await this['resolveWorkbookIdentity'](_0x50f78b[_0x4525e1(0x274)][_0x4525e1(0x2fe)]),_0x5334e9=this['sessions'][_0x4525e1(0x240)](_0x47c4f1);return _0x5334e9?this['toRuntimeSessionInfo'](_0x5334e9,_0x50f78b[_0x4525e1(0x274)]):null;}async[_0x1539f1(0x273)](_0x24cc82){const _0xe4aa39=_0x1539f1;let _0x4bf87e=await this[_0xe4aa39(0x2bd)](_0x24cc82['identity'][_0xe4aa39(0x2fe)]),_0x3be559=await _0x4bf87e[_0xe4aa39(0x345)][_0xe4aa39(0x228)]({'jsonrpc':_0xe4aa39(0x343),'id':N(_0x4bf87e[_0xe4aa39(0x207)]),'method':A['CreateWorkbook'],'params':{'id':_0x24cc82[_0xe4aa39(0x1bb)],'name':_0x24cc82[_0xe4aa39(0x317)]}});if(_0x3be559[_0xe4aa39(0x2cf)])throw Error(_0x3be559['error'][_0xe4aa39(0x327)]);return await this[_0xe4aa39(0x2dc)](_0x4bf87e,_0xe4aa39(0x1fa)),{'session':this[_0xe4aa39(0x31a)](_0x4bf87e,_0x24cc82[_0xe4aa39(0x274)]),'workbookData':_0x3be559[_0xe4aa39(0x2eb)]['workbookData']};}async['loadWorkbookData'](_0x518793){const _0x7f3751=_0x1539f1;let _0x28b19a=await this[_0x7f3751(0x2bd)](_0x518793[_0x7f3751(0x274)][_0x7f3751(0x2fe)]),_0x105d56=await _0x28b19a[_0x7f3751(0x345)]['sendRpc']({'jsonrpc':_0x7f3751(0x343),'id':N(_0x28b19a[_0x7f3751(0x207)]),'method':A['LoadWorkbook'],'params':{'workbookData':_0x518793['workbookData']}});if(_0x105d56['error'])throw Error(_0x105d56[_0x7f3751(0x2cf)]['message']);return await this[_0x7f3751(0x2dc)](_0x28b19a,_0x7f3751(0x264)),{'session':this[_0x7f3751(0x31a)](_0x28b19a,_0x518793[_0x7f3751(0x274)]),'workbookData':_0x105d56[_0x7f3751(0x2eb)][_0x7f3751(0x35c)]};}async[_0x1539f1(0x2ee)](_0x2f67e0){const _0x13d5bd=_0x1539f1;let _0x36668a=await this['ensureSession'](_0x2f67e0['identity'][_0x13d5bd(0x2fe)]),_0x1c3bd5={'baseWorkbookData':_0x2f67e0['replayPack']['baseWorkbookData'],'mutations':_0x2f67e0[_0x13d5bd(0x1b9)][_0x13d5bd(0x1c8)]},_0x22996d=await _0x36668a[_0x13d5bd(0x345)][_0x13d5bd(0x228)]({'jsonrpc':'2.0','id':N(_0x36668a['sessionId']),'method':A[_0x13d5bd(0x2ce)],'params':_0x1c3bd5});if(_0x22996d[_0x13d5bd(0x2cf)])throw Error(_0x22996d[_0x13d5bd(0x2cf)][_0x13d5bd(0x327)]);return await this['touchSession'](_0x36668a,_0x13d5bd(0x2f5)),{'session':this['toRuntimeSessionInfo'](_0x36668a,_0x2f67e0[_0x13d5bd(0x274)]),'workbookData':_0x22996d[_0x13d5bd(0x2eb)][_0x13d5bd(0x35c)]};}async['ensureWorkbookDataReplayPackLoaded'](_0x402e08){const _0x1af89f=_0x1539f1;let _0x353435=await this[_0x1af89f(0x1dd)](_0x402e08[_0x1af89f(0x274)]['absolutePath']);if(!_0x353435[_0x1af89f(0x23a)])return await this[_0x1af89f(0x2dc)](_0x353435[_0x1af89f(0x1ce)],_0x1af89f(0x29f)),{'loaded':!0x1,'session':this[_0x1af89f(0x31a)](_0x353435[_0x1af89f(0x1ce)],_0x402e08[_0x1af89f(0x274)])};let _0x451088=await _0x402e08[_0x1af89f(0x2f1)]();return await this['loadReplayPackIntoSession'](_0x353435[_0x1af89f(0x1ce)],_0x451088),await this[_0x1af89f(0x2dc)](_0x353435[_0x1af89f(0x1ce)],_0x1af89f(0x2f5)),{'loaded':!0x0,'session':this[_0x1af89f(0x31a)](_0x353435[_0x1af89f(0x1ce)],_0x402e08['identity'])};}async[_0x1539f1(0x2b2)](_0x1b0250){const _0x2e3d57=_0x1539f1;let _0x3bf89d=await this['ensureSession'](_0x1b0250[_0x2e3d57(0x274)][_0x2e3d57(0x2fe)]),_0x29c3f8=await _0x3bf89d[_0x2e3d57(0x345)]['sendRpc']({'jsonrpc':_0x2e3d57(0x343),'id':N(_0x3bf89d[_0x2e3d57(0x207)]),'method':A['EvalJs'],'params':{'code':_0x1b0250['code'],'mutates':_0x1b0250[_0x2e3d57(0x25f)]}});if(_0x29c3f8[_0x2e3d57(0x2cf)])throw Error(_0x29c3f8[_0x2e3d57(0x2cf)]['message']);await this[_0x2e3d57(0x2dc)](_0x3bf89d,_0x2e3d57(0x25d));let _0x1ecda9=_0x29c3f8[_0x2e3d57(0x2eb)][_0x2e3d57(0x1c8)];return{..._0x1ecda9===void 0x0?{}:{'mutations':_0x1ecda9},'session':this[_0x2e3d57(0x31a)](_0x3bf89d,_0x1b0250[_0x2e3d57(0x274)]),'value':_0x29c3f8[_0x2e3d57(0x2eb)][_0x2e3d57(0x2f2)]};}async[_0x1539f1(0x203)](_0xe31c3b){const _0x50122e=_0x1539f1;let _0x1ffc9b=await this['ensureSession'](_0xe31c3b[_0x50122e(0x274)][_0x50122e(0x2fe)]),_0x1e760a=await _0x1ffc9b[_0x50122e(0x345)][_0x50122e(0x228)]({'jsonrpc':_0x50122e(0x343),'id':N(_0x1ffc9b[_0x50122e(0x207)]),'method':A[_0x50122e(0x300)]});if(_0x1e760a['error'])throw Error(_0x1e760a[_0x50122e(0x2cf)][_0x50122e(0x327)]);return await this[_0x50122e(0x2dc)](_0x1ffc9b,_0x50122e(0x312)),{'session':this[_0x50122e(0x31a)](_0x1ffc9b,_0xe31c3b[_0x50122e(0x274)]),'workbookData':_0x1e760a[_0x50122e(0x2eb)]['workbookData']};}async[_0x1539f1(0x31d)](_0x171af3){const _0x4e1f4c=_0x1539f1;let _0x1f9e11=await this[_0x4e1f4c(0x2bd)](_0x171af3['identity'][_0x4e1f4c(0x2fe)]),_0x34d8d8=await _0x1f9e11[_0x4e1f4c(0x345)]['sendRpc']({'jsonrpc':_0x4e1f4c(0x343),'id':N(_0x1f9e11[_0x4e1f4c(0x207)]),'method':A[_0x4e1f4c(0x255)],'params':{'format':_0x171af3[_0x4e1f4c(0x21a)],'outputPath':_0x171af3[_0x4e1f4c(0x2b4)]}});if(_0x34d8d8[_0x4e1f4c(0x2cf)])throw Error(_0x34d8d8[_0x4e1f4c(0x2cf)][_0x4e1f4c(0x327)]);await this['touchSession'](_0x1f9e11,_0x4e1f4c(0x339));let _0x14a23b=_0x34d8d8[_0x4e1f4c(0x2eb)];return{'format':_0x14a23b[_0x4e1f4c(0x21a)],'outputPath':_0x14a23b[_0x4e1f4c(0x2b4)],'session':this[_0x4e1f4c(0x31a)](_0x1f9e11,_0x171af3[_0x4e1f4c(0x274)]),'sizeBytes':_0x14a23b[_0x4e1f4c(0x283)]};}async[_0x1539f1(0x347)](_0x4246e3){const _0x4455c3=_0x1539f1;let _0x117407=await this['resolveWorkbookIdentity'](_0x4246e3[_0x4455c3(0x274)][_0x4455c3(0x2fe)]),_0x4e48c6=this[_0x4455c3(0x221)][_0x4455c3(0x240)](_0x117407);_0x4e48c6&&await this['destroySession'](_0x4e48c6,_0x4455c3(0x2c1));}async[_0x1539f1(0x2ff)](_0x25a405=Date[_0x1539f1(0x1e5)]()){const _0x19cc5f=_0x1539f1;let _0x538490=Array[_0x19cc5f(0x1cf)](this[_0x19cc5f(0x221)]['values']());for(let _0x3db7a9 of _0x538490)_0x25a405-Date[_0x19cc5f(0x299)](_0x3db7a9[_0x19cc5f(0x1b8)])<this[_0x19cc5f(0x248)]||await this[_0x19cc5f(0x22c)](_0x3db7a9,_0x19cc5f(0x28d));}async[_0x1539f1(0x350)](_0xc0614d='shutdown'){const _0x3b4c55=_0x1539f1;let _0x16bbb3=Array[_0x3b4c55(0x1cf)](this[_0x3b4c55(0x221)][_0x3b4c55(0x262)]());for(let _0x3fdd0c of _0x16bbb3)await this['destroySession'](_0x3fdd0c,_0xc0614d);}async[_0x1539f1(0x26e)](_0x3c3d75){try{return await _0x26650d(_0x3c3d75);}catch{return _0x3c3d75;}}async['ensureSession'](_0x39f9af){const _0x16d453=_0x1539f1;return(await this[_0x16d453(0x1dd)](_0x39f9af))[_0x16d453(0x1ce)];}async['ensureSessionState'](_0x441970){const _0xa7e472=_0x1539f1;let _0x586005=await this[_0xa7e472(0x26e)](_0x441970),_0x1da799=this['sessions']['get'](_0x586005);if(_0x1da799)return{'created':!0x1,'session':_0x1da799};let _0x3af714=yt(),_0x2f4a98=Re(_0x3af714,this[_0xa7e472(0x2a0)]);await _0xf0d57(_0x2f4a98['sessionDir'],{'recursive':!0x0,'mode':0x1c0});let _0x1312ac=this[_0xa7e472(0x279)](bt(this[_0xa7e472(0x279)])),_0x458c1a=new ht(_0x3af714,{'cwd':xt(_0x1312ac['modulePath']),'env':Object[_0xa7e472(0x280)](Object['entries'](this['env'])[_0xa7e472(0x200)](_0x5af072=>_0x5af072[0x1]!==void 0x0)),'execArgv':_0x1312ac['execArgv'],'executionPlanePath':_0x1312ac[_0xa7e472(0x2dd)],'onStderrChunk':_0xc191ed=>{const _0x1bf2e0=_0xa7e472;Ae(_0x2f4a98[_0x1bf2e0(0x2cc)],_0xc191ed[_0x1bf2e0(0x313)]()[_0x1bf2e0(0x1ea)]());}});await _0x458c1a[_0xa7e472(0x236)]();let _0x550911={'sessionId':_0x3af714,'workbookIdentity':_0x586005,'createdAt':new Date()[_0xa7e472(0x1b4)](),'lastAccessedAt':new Date()[_0xa7e472(0x1b4)](),'runner':_0x458c1a,'paths':_0x2f4a98};return _0x458c1a['on'](_0xa7e472(0x23f),()=>{const _0x41e53d=_0xa7e472;this['logger'][_0x41e53d(0x20c)]({'event_name':_0x378abb[_0x41e53d(0x1c2)],'component':_0x188ced[_0x41e53d(0x290)],'process_role':_0x4721b0[_0x41e53d(0x348)],'fields':{...j(this[_0x41e53d(0x2a0)],_0x3af714),'session_id':_0x3af714,'workbook_identity':_0x586005}}),this['logger'][_0x41e53d(0x211)](),this[_0x41e53d(0x22c)](_0x550911,_0x41e53d(0x2f8));}),this[_0xa7e472(0x221)]['set'](_0x586005,_0x550911),this[_0xa7e472(0x218)][_0xa7e472(0x272)]({'event_name':_0x378abb[_0xa7e472(0x278)],'component':_0x188ced[_0xa7e472(0x320)],'process_role':_0x4721b0['Runtime'],'fields':{...j(this['env'],_0x3af714),'created_at':_0x550911[_0xa7e472(0x284)],'session_id':_0x3af714,'workbook_identity':_0x586005}}),await this[_0xa7e472(0x218)]['flush'](),{'created':!0x0,'session':_0x550911};}async['loadReplayPackIntoSession'](_0x4f5d29,_0x3dee0b){const _0x5c4d28=_0x1539f1;let _0x471170={'baseWorkbookData':_0x3dee0b[_0x5c4d28(0x2a7)],'mutations':_0x3dee0b[_0x5c4d28(0x1c8)]},_0x3ac8af=await _0x4f5d29[_0x5c4d28(0x345)][_0x5c4d28(0x228)]({'jsonrpc':_0x5c4d28(0x343),'id':N(_0x4f5d29[_0x5c4d28(0x207)]),'method':A['LoadWorkbookDataReplayPack'],'params':_0x471170});if(_0x3ac8af[_0x5c4d28(0x2cf)])throw Error(_0x3ac8af[_0x5c4d28(0x2cf)]['message']);return _0x3ac8af[_0x5c4d28(0x2eb)]['workbookData'];}async[_0x1539f1(0x2dc)](_0x19f84b,_0x4a72bb){const _0x570a66=_0x1539f1;_0x19f84b[_0x570a66(0x1b8)]=new Date()[_0x570a66(0x1b4)](),this['logger']['info']({'event_name':_0x378abb[_0x570a66(0x278)],'component':_0x188ced[_0x570a66(0x320)],'process_role':_0x4721b0[_0x570a66(0x348)],'fields':{...j(this['env'],_0x19f84b[_0x570a66(0x207)]),'event':_0x4a72bb,'session_id':_0x19f84b[_0x570a66(0x207)],'timestamp':_0x19f84b[_0x570a66(0x1b8)],'workbook_identity':_0x19f84b[_0x570a66(0x266)]}}),await this['logger'][_0x570a66(0x211)]();}async[_0x1539f1(0x22c)](_0x4018ba,_0x33fc94){const _0x246566=_0x1539f1;this['sessions'][_0x246566(0x240)](_0x4018ba[_0x246566(0x266)])===_0x4018ba&&(this[_0x246566(0x221)]['delete'](_0x4018ba['workbookIdentity']),_0x4018ba[_0x246566(0x345)][_0x246566(0x238)](),this['logger'][_0x246566(0x272)]({'event_name':_0x378abb[_0x246566(0x301)],'component':_0x188ced[_0x246566(0x320)],'process_role':_0x4721b0[_0x246566(0x348)],'fields':{...j(this[_0x246566(0x2a0)],_0x4018ba['sessionId']),'reason':_0x33fc94,'session_id':_0x4018ba[_0x246566(0x207)],'timestamp':new Date()[_0x246566(0x1b4)](),'workbook_identity':_0x4018ba['workbookIdentity']}}),await this[_0x246566(0x218)]['flush']());}[_0x1539f1(0x31a)](_0x19cae4,_0xd8deb6){const _0x1b6d1e=_0x1539f1;return{'sessionId':_0x19cae4[_0x1b6d1e(0x207)],'packageIdentity':_0xd8deb6,'createdAt':_0x19cae4['createdAt'],'lastAccessedAt':_0x19cae4['lastAccessedAt']};}};function vt(_0x636282,_0xb6e676){const _0x2252da=_0x1539f1;let _0x23b0db=_0x636282[_0x2252da(0x227)]?.[_0x2252da(0x1d2)]();if(!_0x23b0db)return _0xb6e676;let _0x557b2f=Number(_0x23b0db);return!Number[_0x2252da(0x2cd)](_0x557b2f)||_0x557b2f<0x0?_0xb6e676:_0x557b2f;}function j(_0x2789b9,_0x5cc6a3){const _0x4b9948=_0x1539f1;return{'deployment.environment.name':_0x4b9948(0x2e8),'distribution.channel':M(_0x2789b9,'UNIVER_DISTRIBUTION_CHANNEL')??_0x4b9948(0x1bd),'service.instance.id':_0x5cc6a3,'service.name':_0x4b9948(0x34e),...M(_0x2789b9,_0x4b9948(0x1f2))===void 0x0?{}:{'build.id':M(_0x2789b9,'UNIVER_CLI_BUILD_ID')},...M(_0x2789b9,_0x4b9948(0x32d))===void 0x0?{}:{'service.version':M(_0x2789b9,_0x4b9948(0x32d))}};}function M(_0x21cb6a,_0x12fbbc){const _0x314ccd=_0x1539f1;let _0x5be8c6=_0x21cb6a[_0x12fbbc]?.['trim']();return _0x5be8c6===void 0x0||_0x5be8c6[_0x314ccd(0x1ee)]===0x0?void 0x0:_0x5be8c6;}function N(_0x5948d3){const _0xd95b34=_0x1539f1;return _0x5948d3+'-'+Date['now']()['toString'](0x24)+'-'+Math[_0xd95b34(0x20e)]()[_0xd95b34(0x313)](0x10)['slice'](0x2,0x8);}function yt(){const _0x553990=_0x1539f1;return _0x553990(0x2a3)+Date[_0x553990(0x1e5)]()['toString'](0x24)+'-'+Math[_0x553990(0x20e)]()[_0x553990(0x313)](0x10)[_0x553990(0x1e6)](0x2,0x8);}function bt(_0x3928c8){const _0x35c94f=_0x1539f1;return _0x2b74e2(import.meta.url)[_0x35c94f(0x25b)](_0x35c94f(0x1d1))?_0x35c94f(0x216):_0x35c94f(0x30d);}function xt(_0x26f52e){return _0x73c0a7(_0x73c0a7(_0x26f52e));}function _0x2f58(_0x591d12,_0x10a569){_0x591d12=_0x591d12-0x1ab;const _0x431d2e=_0x431d();let _0x2f58af=_0x431d2e[_0x591d12];return _0x2f58af;}var St=class{[_0x1539f1(0x326)];['options'];constructor(_0x1e82fd={}){const _0x5716ef=_0x1539f1;this[_0x5716ef(0x326)]=_0x1e82fd[_0x5716ef(0x326)]??{'sessionCreateWorkbook':Je,'sessionDisposeWorkbook':Qe,'sessionEvalJs':Ye,'sessionExportWorkbookData':Xe,'sessionExportWorkbookFile':Ze,'sessionGetWorkbook':qe,'sessionLoadWorkbookDataReplayPack':Ke,'sessionLoadWorkbook':Ge},this[_0x5716ef(0x22b)]=_0x1e82fd[_0x5716ef(0x358)]??{};}async[_0x1539f1(0x273)](_0x591f1e){const _0x5648f0=_0x1539f1;let _0x3d9918=await this[_0x5648f0(0x326)]['sessionCreateWorkbook'](_0x591f1e[_0x5648f0(0x274)]['absolutePath'],{...this[_0x5648f0(0x22b)],..._0x591f1e[_0x5648f0(0x1d4)]===void 0x0?{}:{'cwd':_0x591f1e['cwd']},..._0x591f1e[_0x5648f0(0x1bb)]===void 0x0?{}:{'id':_0x591f1e[_0x5648f0(0x1bb)]},..._0x591f1e['workbookName']===void 0x0?{}:{'name':_0x591f1e[_0x5648f0(0x317)]}});return{'session':P(_0x3d9918[_0x5648f0(0x1ce)],_0x591f1e[_0x5648f0(0x274)]),'workbookData':_0x3d9918[_0x5648f0(0x35c)]};}async[_0x1539f1(0x2a1)](_0x4cb9dd){const _0x22eeaa=_0x1539f1;let _0x2dc207=await this[_0x22eeaa(0x326)]['sessionGetWorkbook'](_0x4cb9dd[_0x22eeaa(0x274)][_0x22eeaa(0x2fe)],{...this[_0x22eeaa(0x22b)],..._0x4cb9dd[_0x22eeaa(0x1d4)]===void 0x0?{}:{'cwd':_0x4cb9dd['cwd']}});return!_0x2dc207[_0x22eeaa(0x329)]||_0x2dc207['session']===null?null:P(_0x2dc207['session'],_0x4cb9dd[_0x22eeaa(0x274)]);}async[_0x1539f1(0x2c0)](_0x4f55b2){const _0x3bd899=_0x1539f1;let _0x2f5db8=await this[_0x3bd899(0x326)][_0x3bd899(0x338)](_0x4f55b2[_0x3bd899(0x274)][_0x3bd899(0x2fe)],_0x4f55b2[_0x3bd899(0x35c)],{...this['options'],..._0x4f55b2['cwd']===void 0x0?{}:{'cwd':_0x4f55b2[_0x3bd899(0x1d4)]}});return{'session':P(_0x2f5db8[_0x3bd899(0x1ce)],_0x4f55b2[_0x3bd899(0x274)]),'workbookData':_0x2f5db8['workbookData']};}async[_0x1539f1(0x2ee)](_0x1a783d){const _0x6f411d=_0x1539f1;let _0x1fc4ab=await this[_0x6f411d(0x326)][_0x6f411d(0x212)](_0x1a783d[_0x6f411d(0x274)][_0x6f411d(0x2fe)],{'baseWorkbookData':_0x1a783d[_0x6f411d(0x1b9)][_0x6f411d(0x2a7)],'mutations':_0x1a783d[_0x6f411d(0x1b9)]['mutations']},{...this[_0x6f411d(0x22b)],..._0x1a783d[_0x6f411d(0x1d4)]===void 0x0?{}:{'cwd':_0x1a783d[_0x6f411d(0x1d4)]}});return{'session':P(_0x1fc4ab['session'],_0x1a783d['identity']),'workbookData':_0x1fc4ab[_0x6f411d(0x35c)]};}async[_0x1539f1(0x1c1)](_0x20b258){const _0x407710=_0x1539f1;let _0x113f6a=await this['getSession'](_0x20b258);if(_0x113f6a!==null)return{'loaded':!0x1,'session':_0x113f6a};let _0x5d8371=await _0x20b258[_0x407710(0x2f1)]();return{'loaded':!0x0,'session':(await this[_0x407710(0x2ee)]({..._0x20b258[_0x407710(0x1d4)]===void 0x0?{}:{'cwd':_0x20b258[_0x407710(0x1d4)]},'identity':_0x20b258[_0x407710(0x274)],'replayPack':_0x5d8371}))[_0x407710(0x1ce)]};}async['evalJs'](_0x3e9b00){const _0x4575e3=_0x1539f1;let _0x59aed3=await this['client'][_0x4575e3(0x29e)](_0x3e9b00['identity'][_0x4575e3(0x2fe)],_0x3e9b00[_0x4575e3(0x21f)],{...this[_0x4575e3(0x22b)],..._0x3e9b00['cwd']===void 0x0?{}:{'cwd':_0x3e9b00[_0x4575e3(0x1d4)]},..._0x3e9b00['mutates']===void 0x0?{}:{'mutates':_0x3e9b00['mutates']}});return{..._0x59aed3[_0x4575e3(0x1c8)]===void 0x0?{}:{'mutations':_0x59aed3[_0x4575e3(0x1c8)]},'session':P(_0x59aed3[_0x4575e3(0x1ce)],_0x3e9b00[_0x4575e3(0x274)]),'value':_0x59aed3[_0x4575e3(0x2f2)]};}async['exportWorkbookData'](_0x28f9c5){const _0x118f0c=_0x1539f1;let _0x3e54de=await this[_0x118f0c(0x326)][_0x118f0c(0x1ba)](_0x28f9c5[_0x118f0c(0x274)]['absolutePath'],{...this[_0x118f0c(0x22b)],..._0x28f9c5[_0x118f0c(0x1d4)]===void 0x0?{}:{'cwd':_0x28f9c5['cwd']}});return{'session':P(_0x3e54de[_0x118f0c(0x1ce)],_0x28f9c5[_0x118f0c(0x274)]),'workbookData':_0x3e54de[_0x118f0c(0x35c)]};}async[_0x1539f1(0x31d)](_0x1a8397){const _0x26670d=_0x1539f1;let _0x3175ac=await this[_0x26670d(0x326)][_0x26670d(0x249)](_0x1a8397[_0x26670d(0x274)]['absolutePath'],{'format':_0x1a8397[_0x26670d(0x21a)],'outputPath':_0x1a8397[_0x26670d(0x2b4)]},{...this['options'],..._0x1a8397[_0x26670d(0x1d4)]===void 0x0?{}:{'cwd':_0x1a8397[_0x26670d(0x1d4)]}});return{'format':_0x3175ac[_0x26670d(0x21a)],'outputPath':_0x3175ac[_0x26670d(0x2b4)],'session':P(_0x3175ac['session'],_0x1a8397[_0x26670d(0x274)]),'sizeBytes':_0x3175ac['sizeBytes']};}async[_0x1539f1(0x347)](_0x490ec8){const _0x35bc52=_0x1539f1;await this[_0x35bc52(0x326)][_0x35bc52(0x295)](_0x490ec8['identity'][_0x35bc52(0x2fe)],{...this[_0x35bc52(0x22b)],..._0x490ec8[_0x35bc52(0x1d4)]===void 0x0?{}:{'cwd':_0x490ec8[_0x35bc52(0x1d4)]}});}};function P(_0x3bebcb,_0x1eb0b7){const _0x4cc327=_0x1539f1;return{'createdAt':_0x3bebcb[_0x4cc327(0x284)],'lastAccessedAt':_0x3bebcb[_0x4cc327(0x1b8)],'packageIdentity':_0x1eb0b7,'sessionId':_0x3bebcb[_0x4cc327(0x207)]};}var F=class extends Error{[_0x1539f1(0x21f)];constructor(_0x49f7fd,_0x46d49a,_0x4d3114){const _0x4f25a3=_0x1539f1;super(_0x46d49a,_0x4d3114),this[_0x4f25a3(0x285)]=_0x4f25a3(0x2a6),this[_0x4f25a3(0x21f)]=_0x49f7fd;}},Ct=class extends F{constructor(_0x367474){const _0x323e3d=_0x1539f1;super('ERR_INVALID_WORKBOOK_PACKAGE_PATH',_0x323e3d(0x34f)+_0x367474),this[_0x323e3d(0x285)]=_0x323e3d(0x205);}},wt=class extends F{constructor(_0x467a70){const _0x2fc515=_0x1539f1;super(_0x2fc515(0x1b5),_0x2fc515(0x271)+_0x467a70),this['name']='WorkbookPackageFileMissingError';}},I=class extends F{constructor(_0x5ebdee,_0x2cd308,_0x266f53){const _0x4319b4=_0x1539f1;super(_0x4319b4(0x27f),'Invalid\x20workbook\x20package\x20file\x20'+_0x5ebdee+':\x20'+_0x2cd308,_0x266f53),this[_0x4319b4(0x285)]='WorkbookPackageFileInvalidError';}},Tt=class extends F{constructor(_0x83d36c,_0xd2a8e6,_0x25142e){const _0x122f95=_0x1539f1;super(_0x122f95(0x261),_0x122f95(0x1f6)+_0x83d36c+':\x20'+_0xd2a8e6,_0x25142e),this[_0x122f95(0x285)]=_0x122f95(0x201);}},Et=class extends F{constructor(_0x11eb68){const _0x2cbf8c=_0x1539f1;super(_0x2cbf8c(0x1af),_0x2cbf8c(0x33c)+_0x11eb68),this[_0x2cbf8c(0x285)]='WorkbookPackageAlreadyExistsError';}},Dt=class extends F{constructor(_0x2b9c74,_0x3f8eb7){const _0x33bec8=_0x1539f1;super(_0x33bec8(0x34a),_0x3f8eb7===null?_0x33bec8(0x20a)+_0x2b9c74:'Workbook\x20package\x20is\x20busy:\x20'+_0x2b9c74+'\x20is\x20being\x20modified\x20by\x20operation\x20'+_0x3f8eb7[_0x33bec8(0x235)]+'\x20(pid\x20'+_0x3f8eb7[_0x33bec8(0x268)]+_0x33bec8(0x2a5)+_0x3f8eb7['hostname']+')'),this[_0x33bec8(0x230)]=_0x3f8eb7,this[_0x33bec8(0x285)]=_0x33bec8(0x1ef);}};function Ot(_0x5371e1={}){const _0xa2b5c1=_0x1539f1;return{'unitID':_0x5371e1['unitID']??null,'initRev':_0x5371e1[_0xa2b5c1(0x286)]??null,'syncedRev':_0x5371e1[_0xa2b5c1(0x2e5)]??null};}function kt(_0x4811ae,_0x3e419c){const _0x53e2f9=_0x1539f1;if(!At(_0x4811ae))throw new I(_0x3e419c,_0x53e2f9(0x1ad));let _0x4c4e95=_0x4811ae[_0x53e2f9(0x2df)],_0x1a0b12=_0x4811ae[_0x53e2f9(0x286)],_0x1684e2=_0x4811ae[_0x53e2f9(0x2e5)];if(_0x4c4e95!==null&&typeof _0x4c4e95!=_0x53e2f9(0x1ff))throw new I(_0x3e419c,_0x53e2f9(0x209));if(_0x1a0b12!==null&&!jt(_0x1a0b12))throw new I(_0x3e419c,_0x53e2f9(0x1d8));if(_0x1684e2!==null&&!jt(_0x1684e2))throw new I(_0x3e419c,_0x53e2f9(0x319));return{'unitID':_0x4c4e95,'initRev':_0x1a0b12,'syncedRev':_0x1684e2};}function At(_0x3c0ba0){const _0x1dccaf=_0x1539f1;return typeof _0x3c0ba0==_0x1dccaf(0x33e)&&!!_0x3c0ba0&&!Array[_0x1dccaf(0x237)](_0x3c0ba0);}function jt(_0x1f6449){const _0x6a287d=_0x1539f1;return typeof _0x1f6449==_0x6a287d(0x2c5)&&Number[_0x6a287d(0x29a)](_0x1f6449)&&_0x1f6449>=0x0;}function L(_0x1d9a88,_0x40bb74){const _0x32020f=_0x1539f1;if(!Mt(_0x1d9a88))throw new I(_0x40bb74,_0x32020f(0x1b7));if(typeof _0x1d9a88['id']!=_0x32020f(0x1ff)||_0x1d9a88['id'][_0x32020f(0x1ee)]===0x0)throw new I(_0x40bb74,_0x32020f(0x21c));if(!Mt(_0x1d9a88[_0x32020f(0x2ed)]))throw new I(_0x40bb74,_0x32020f(0x214));return _0x1d9a88;}function Mt(_0x27fd7e){const _0x162b36=_0x1539f1;return typeof _0x27fd7e==_0x162b36(0x33e)&&!!_0x27fd7e&&!Array[_0x162b36(0x237)](_0x27fd7e);}function Nt(_0x4422e4,_0x1870e4){const _0x5c9c19=_0x1539f1;let _0x52ac89=Ft(_0x4422e4,_0x1870e4,_0x5c9c19(0x2c8)),_0x254929=Lt(_0x52ac89['sid'],_0x1870e4,_0x5c9c19(0x2c8)),_0x574e6f=Rt(_0x52ac89[_0x5c9c19(0x2d2)],_0x1870e4,_0x5c9c19(0x2c8)),_0x1b523d=_0x52ac89['message'],_0x3d740c=_0x52ac89[_0x5c9c19(0x1c8)];if(typeof _0x1b523d!=_0x5c9c19(0x1ff))throw new I(_0x1870e4,_0x5c9c19(0x293));if(!Array[_0x5c9c19(0x237)](_0x3d740c))throw new I(_0x1870e4,_0x5c9c19(0x246));return{'sid':_0x254929,'reqId':_0x574e6f,'message':_0x1b523d,'mutations':_0x3d740c[_0x5c9c19(0x2db)]((_0x34a0b0,_0x5d12e7)=>L(_0x34a0b0,_0x1870e4+'.mutations['+_0x5d12e7+']'))};}function Pt(_0x2d6173,_0xc68739){const _0xda889f=_0x1539f1;let _0xc8b28=Ft(_0x2d6173,_0xc68739,'synced\x20changeset'),_0x57b60f=Lt(_0xc8b28[_0xda889f(0x2b5)],_0xc68739,_0xda889f(0x219)),_0x3feed2=Rt(_0xc8b28['reqId'],_0xc68739,'synced\x20changeset'),_0x39631e=_0xc8b28[_0xda889f(0x1cb)],_0x3eea93=_0xc8b28['revision'],_0x4470aa=_0xc8b28[_0xda889f(0x1c8)],_0x1ebdb4=_0xc8b28[_0xda889f(0x327)];if(!It(_0x39631e))throw new I(_0xc68739,'synced\x20changeset.baseRev\x20must\x20be\x20a\x20non-negative\x20integer');if(!It(_0x3eea93))throw new I(_0xc68739,'synced\x20changeset.revision\x20must\x20be\x20a\x20non-negative\x20integer');if(!Array[_0xda889f(0x237)](_0x4470aa))throw new I(_0xc68739,_0xda889f(0x1da));if(_0x1ebdb4!==void 0x0&&typeof _0x1ebdb4!=_0xda889f(0x1ff))throw new I(_0xc68739,_0xda889f(0x1c9));return{'sid':_0x57b60f,'reqId':_0x3feed2,'baseRev':_0x39631e,'revision':_0x3eea93,'mutations':_0x4470aa[_0xda889f(0x2db)]((_0x2ab888,_0x3375d8)=>L(_0x2ab888,_0xc68739+_0xda889f(0x353)+_0x3375d8+']')),..._0x1ebdb4===void 0x0?{}:{'message':_0x1ebdb4}};}function Ft(_0x2dad73,_0x32a1c7,_0x38d647){const _0x323862=_0x1539f1;if(typeof _0x2dad73!=_0x323862(0x33e)||!_0x2dad73||Array[_0x323862(0x237)](_0x2dad73))throw new I(_0x32a1c7,_0x38d647+_0x323862(0x2d0));return _0x2dad73;}function It(_0x2cfe36){const _0x1c4ec6=_0x1539f1;return typeof _0x2cfe36==_0x1c4ec6(0x2c5)&&Number[_0x1c4ec6(0x29a)](_0x2cfe36)&&_0x2cfe36>=0x0;}function Lt(_0x161788,_0x1bd3c0,_0x18603b){const _0x5e2bcc=_0x1539f1;if(typeof _0x161788!=_0x5e2bcc(0x1ff)||_0x161788[_0x5e2bcc(0x1ee)]===0x0)throw new I(_0x1bd3c0,_0x18603b+_0x5e2bcc(0x29c));return _0x161788;}function Rt(_0x5586dd,_0x52e68b,_0x3ee36b){const _0xe8f38c=_0x1539f1;if(typeof _0x5586dd!=_0xe8f38c(0x2c5)||!Number['isInteger'](_0x5586dd)||_0x5586dd<0x1)throw new I(_0x52e68b,_0x3ee36b+'.reqId\x20must\x20be\x20a\x20positive\x20integer');return _0x5586dd;}const zt=[_0x1539f1(0x1f7),_0x1539f1(0x2be)];var Bt=class e{constructor(_0x387a79){const _0x36bdb5=_0x1539f1;this[_0x36bdb5(0x2f2)]=_0x387a79;}static[_0x1539f1(0x299)](_0x41d5b2){const _0x300ed9=_0x1539f1;let _0xdce164=_0x41d5b2[_0x300ed9(0x1d2)]();if(_0xdce164[_0x300ed9(0x1ee)]===0x0||!Vt(_0x204563(_0xdce164)))throw new Ct(_0x41d5b2);return new e(_0xdce164);}get[_0x1539f1(0x2c6)](){const _0x4879de=_0x1539f1;return _0x204563(this[_0x4879de(0x2f2)]);}};function Vt(_0x3f8a72){const _0x56b0a3=_0x1539f1;return zt[_0x56b0a3(0x23d)](_0x3f8a72);}var Ht=class e{['absolutePath'];constructor(_0xf9287){const _0x41e16e=_0x1539f1;this[_0x41e16e(0x2fe)]=_0xf9287[_0x41e16e(0x2fe)];}static[_0x1539f1(0x232)](_0x560c0d){const _0x407d89=_0x1539f1;let _0x525eb1=_0x48276b(_0x560c0d),_0x227ac8=Bt[_0x407d89(0x299)](_0x525eb1);if(_0x525eb1!==_0x560c0d||!Vt(_0x227ac8[_0x407d89(0x2c6)]))throw new Ct(_0x560c0d);return new e({'absolutePath':_0x525eb1});}},R=_0x1539f1(0x2cb),z=_0x1539f1(0x29d),B='local-mutations.jsonl',V=_0x1539f1(0x2ef),H=_0x1539f1(0x1ec),Ut=class{constructor(_0x4141c5={}){this['options']=_0x4141c5;}async[_0x1539f1(0x247)](_0x10773e){const _0x2a604e=_0x1539f1;let _0x237f58=Bt[_0x2a604e(0x299)](_0x10773e['workbookPath']);return Ht[_0x2a604e(0x232)](_0x48276b(_0x10773e[_0x2a604e(0x1d4)]??process[_0x2a604e(0x1d4)](),_0x237f58[_0x2a604e(0x2f2)]));}async['initialize'](_0x1211f8){const _0x45fd4b=_0x1539f1;return await U(_0x1211f8[_0x45fd4b(0x274)],_0x45fd4b(0x35a),this[_0x45fd4b(0x22b)],async()=>{const _0x4ff280=_0x45fd4b;let _0x3b983b=Ot(_0x1211f8['manifest']),_0xe57a9c=new G(_0x1211f8['identity'],this[_0x4ff280(0x22b)],{'lockWrites':!0x1});return await Wt(_0x1211f8[_0x4ff280(0x274)]),await _0xf0d57(_0x1211f8['identity'][_0x4ff280(0x2fe)],{'recursive':!0x0}),await Promise[_0x4ff280(0x2d1)]([_0xe57a9c[_0x4ff280(0x344)](_0x3b983b),_0xe57a9c[_0x4ff280(0x2b1)](_0x1211f8[_0x4ff280(0x270)]),_0xe57a9c[_0x4ff280(0x1fb)]([]),_0xe57a9c['replaceLocalChangesets']([]),_0xe57a9c[_0x4ff280(0x2a8)](_0x1211f8[_0x4ff280(0x359)]??[])]),new G(_0x1211f8['identity'],this[_0x4ff280(0x22b)]);});}async[_0x1539f1(0x321)](_0x1b8423){const _0x221789=_0x1539f1;return new G(_0x1b8423,this[_0x221789(0x22b)]);}async[_0x1539f1(0x276)](_0x4e5d97,_0x61e44){const _0x420a14=_0x1539f1;return await U(_0x4e5d97,_0x420a14(0x276),this[_0x420a14(0x22b)],async()=>{const _0x5113b2=_0x420a14;let _0x367712=new Zt(new G(_0x4e5d97,this[_0x5113b2(0x22b)],{'lockWrites':!0x1}));try{let _0x2f740c=await _0x61e44(_0x367712);return await tn(_0x4e5d97,_0x367712[_0x5113b2(0x1b2)](),this['options']),_0x2f740c;}catch(_0x169e08){throw new Tt(_0x4e5d97['absolutePath'],_0x169e08 instanceof Error?_0x169e08[_0x5113b2(0x327)]:String(_0x169e08),_0x169e08 instanceof Error?{'cause':_0x169e08}:void 0x0);}});}};async function Wt(_0x430d30){const _0x57f031=_0x1539f1;try{if(!(await _0x1e846a(_0x430d30[_0x57f031(0x2fe)]))[_0x57f031(0x2fd)]()||(await _0x2ff29b(_0x430d30['absolutePath']))[_0x57f031(0x1ee)]>0x0)throw new Et(_0x430d30[_0x57f031(0x2fe)]);}catch(_0x3c022c){if(Q(_0x3c022c)&&_0x3c022c['code']==='ENOENT')return;throw _0x3c022c;}}async function U(_0x3d7294,_0x785395,_0x18362a,_0x4b4842){await Gt(_0x3d7294,_0x785395,_0x18362a);try{return await _0x4b4842();}finally{await Yt(_0x3d7294);}}async function Gt(_0x5441eb,_0x7655af,_0x1ad840){const _0x3e186b=_0x1539f1;let _0x59f962=_0x1ad840[_0x3e186b(0x24b)]??0x1388,_0x3f0c58=_0x1ad840[_0x3e186b(0x2e9)]??0x32,_0x49424f=Date[_0x3e186b(0x1e5)](),_0x14c0d8=null;for(await _0xf0d57(_0x73c0a7(W(_0x5441eb)),{'recursive':!0x0});;){try{await _0x6c3ba4(W(_0x5441eb),Y({'pid':process[_0x3e186b(0x268)],'hostname':_0x258e12(),'createdAt':new Date()[_0x3e186b(0x1b4)](),'operation':_0x7655af}),{'encoding':_0x3e186b(0x328),'flag':'wx'});return;}catch(_0x46f81b){if(!Q(_0x46f81b)||_0x46f81b[_0x3e186b(0x21f)]!=='EEXIST')throw _0x46f81b;}let _0x1a4b5f=await Kt(_0x5441eb,_0x1ad840);if(_0x14c0d8=_0x1a4b5f[_0x3e186b(0x230)],!_0x1a4b5f[_0x3e186b(0x1c6)]){if(Date[_0x3e186b(0x1e5)]()-_0x49424f>=_0x59f962)throw new Dt(_0x5441eb[_0x3e186b(0x2fe)],_0x14c0d8);await Xt(Math['min'](_0x3f0c58,Math['max'](_0x59f962-(Date[_0x3e186b(0x1e5)]()-_0x49424f),0x0)));}}}async function Kt(_0x451dcd,_0x547d15){const _0x27d26f=_0x1539f1;let _0x4f365b=await qt(_0x451dcd);return _0x4f365b===null||_0x4f365b['hostname']!==_0x258e12()||Jt(_0x4f365b[_0x27d26f(0x268)],_0x547d15)?{'holder':_0x4f365b,'removed':!0x1}:(await Yt(_0x451dcd),{'holder':_0x4f365b,'removed':!0x0});}async function qt(_0x2361f9){const _0x39512e=_0x1539f1;try{let _0x50bf3c=JSON['parse'](await _0x5b8678(W(_0x2361f9),_0x39512e(0x328)));if(!on(_0x50bf3c))return null;let _0x2264db=_0x50bf3c[_0x39512e(0x268)],_0x3847f0=_0x50bf3c[_0x39512e(0x27d)],_0x1abc87=_0x50bf3c['createdAt'],_0x46cdbd=_0x50bf3c['operation'];return typeof _0x2264db!='number'||!Number['isInteger'](_0x2264db)||typeof _0x3847f0!='string'||typeof _0x1abc87!=_0x39512e(0x1ff)||typeof _0x46cdbd!=_0x39512e(0x1ff)?null:{'pid':_0x2264db,'hostname':_0x3847f0,'createdAt':_0x1abc87,'operation':_0x46cdbd};}catch{return null;}}function Jt(_0x47d3bf,_0x2c1b21){const _0x5c81fe=_0x1539f1;if(_0x2c1b21[_0x5c81fe(0x2c4)]!==void 0x0)return _0x2c1b21['isProcessAlive'](_0x47d3bf);try{return process[_0x5c81fe(0x241)](_0x47d3bf,0x0),!0x0;}catch{return!0x1;}}async function Yt(_0x164335){const _0x120500=_0x1539f1;await _0x2dcc20(W(_0x164335),{'force':!0x0})[_0x120500(0x26b)](()=>void 0x0);}function W(_0x3950e7){const _0x3338b2=_0x1539f1;return _0x3950e7[_0x3338b2(0x2fe)]+_0x3338b2(0x213);}async function Xt(_0xacd683){_0xacd683<=0x0||await new Promise(_0xafc3fe=>{setTimeout(_0xafc3fe,_0xacd683);});}var G=class{constructor(_0x5f2f87,_0x47b884,_0x1b8fb5={'lockWrites':!0x0}){const _0x1b9a40=_0x1539f1;this['identity']=_0x5f2f87,this[_0x1b9a40(0x22b)]=_0x47b884,this[_0x1b9a40(0x2ea)]=_0x1b8fb5;}async[_0x1539f1(0x233)](){const _0x5058e7=_0x1539f1;return await Qt(this[_0x5058e7(0x274)],R,(_0x590ceb,_0x33131c)=>kt(_0x590ceb,_0x33131c));}async[_0x1539f1(0x344)](_0x2308d5){const _0x53c785=_0x1539f1;await this['write']('set-manifest',()=>J(this[_0x53c785(0x274)],R,Y(_0x2308d5)));}async[_0x1539f1(0x292)](){const _0x2e5d18=_0x1539f1;return await Qt(this[_0x2e5d18(0x274)],z,en);}async['setInitWorkbookData'](_0x74e9c7){const _0x2bd0d2=_0x1539f1;await this[_0x2bd0d2(0x1d0)]('set-init-workbook-data',()=>J(this[_0x2bd0d2(0x274)],z,Y(_0x74e9c7)));}async[_0x1539f1(0x27c)](){const _0x7c4e0b=_0x1539f1;return await K(this[_0x7c4e0b(0x274)],B,L);}async[_0x1539f1(0x2e7)](_0x5168eb){const _0x522a2b=_0x1539f1;_0x5168eb[_0x522a2b(0x1ee)]!==0x0&&await this['write']('append-local-mutations',()=>rn(this['identity'],B,X(_0x5168eb)));}async[_0x1539f1(0x1fb)](_0x3a54c2){const _0x5dc70c=_0x1539f1;await this[_0x5dc70c(0x1d0)]('replace-local-mutations',()=>J(this['identity'],B,X(_0x3a54c2)));}async[_0x1539f1(0x2b3)](){const _0x4b767b=_0x1539f1;return await K(this[_0x4b767b(0x274)],V,Nt);}async[_0x1539f1(0x288)](_0x2c6879){const _0x383131=_0x1539f1;await this[_0x383131(0x1d0)](_0x383131(0x32e),()=>rn(this[_0x383131(0x274)],V,X([_0x2c6879])));}async['replaceLocalChangesets'](_0x55d994){const _0x3be3e4=_0x1539f1;await this[_0x3be3e4(0x1d0)](_0x3be3e4(0x23e),()=>J(this[_0x3be3e4(0x274)],V,X(_0x55d994)));}async[_0x1539f1(0x2ec)](){const _0x242e7d=_0x1539f1;return await K(this[_0x242e7d(0x274)],H,Pt);}async[_0x1539f1(0x2fb)](_0x3519c8){const _0x1c9863=_0x1539f1;_0x3519c8[_0x1c9863(0x1ee)]!==0x0&&await this[_0x1c9863(0x1d0)]('append-synced-changesets',()=>rn(this[_0x1c9863(0x274)],H,X(_0x3519c8)));}async['replaceSyncedChangesets'](_0x3e1d26){const _0x2dcd43=_0x1539f1;await this[_0x2dcd43(0x1d0)](_0x2dcd43(0x25a),()=>J(this[_0x2dcd43(0x274)],H,X(_0x3e1d26)));}async[_0x1539f1(0x1d0)](_0x2ec47c,_0x420f95){const _0x305eef=_0x1539f1;if(!this[_0x305eef(0x2ea)]['lockWrites']){await _0x420f95();return;}await U(this['identity'],_0x2ec47c,this[_0x305eef(0x22b)],_0x420f95);}},Zt=class{[_0x1539f1(0x274)];[_0x1539f1(0x33a)]=new Set();[_0x1539f1(0x270)];[_0x1539f1(0x275)];['localMutations'];[_0x1539f1(0x1e9)];[_0x1539f1(0x359)];constructor(_0x144c10){const _0x36abe7=_0x1539f1;this['basePackage']=_0x144c10,this[_0x36abe7(0x274)]=_0x144c10['identity'];}async['getManifest'](){const _0x4ce8f6=_0x1539f1;return this[_0x4ce8f6(0x1e9)]??=await this[_0x4ce8f6(0x254)][_0x4ce8f6(0x233)](),this[_0x4ce8f6(0x1e9)];}async[_0x1539f1(0x344)](_0x48f92){const _0x2b405c=_0x1539f1;this[_0x2b405c(0x1e9)]=_0x48f92,this[_0x2b405c(0x33a)][_0x2b405c(0x352)](_0x2b405c(0x1e9));}async[_0x1539f1(0x292)](){const _0x5bed40=_0x1539f1;return this[_0x5bed40(0x270)]??=await this[_0x5bed40(0x254)]['getInitWorkbookData'](),this[_0x5bed40(0x270)];}async['setInitWorkbookData'](_0x3af12e){const _0x3faaa6=_0x1539f1;this[_0x3faaa6(0x270)]=_0x3af12e,this[_0x3faaa6(0x33a)][_0x3faaa6(0x352)](_0x3faaa6(0x270));}async['getLocalMutations'](){const _0xe2b2b0=_0x1539f1;return this[_0xe2b2b0(0x323)]??=await this[_0xe2b2b0(0x254)][_0xe2b2b0(0x27c)](),this[_0xe2b2b0(0x323)];}async[_0x1539f1(0x2e7)](_0x568228){const _0x5432f0=_0x1539f1;_0x568228[_0x5432f0(0x1ee)]!==0x0&&(this[_0x5432f0(0x323)]=[...await this[_0x5432f0(0x27c)](),..._0x568228],this[_0x5432f0(0x33a)]['add']('localMutations'));}async[_0x1539f1(0x1fb)](_0x38da18){const _0x2bba06=_0x1539f1;this[_0x2bba06(0x323)]=[..._0x38da18],this[_0x2bba06(0x33a)][_0x2bba06(0x352)](_0x2bba06(0x323));}async['getLocalChangesets'](){const _0x1d131e=_0x1539f1;return this['localChangesets']??=await this[_0x1d131e(0x254)][_0x1d131e(0x2b3)](),this[_0x1d131e(0x275)];}async[_0x1539f1(0x288)](_0x396061){const _0x3db2cf=_0x1539f1;this[_0x3db2cf(0x275)]=[...await this[_0x3db2cf(0x2b3)](),_0x396061],this[_0x3db2cf(0x33a)][_0x3db2cf(0x352)](_0x3db2cf(0x275));}async[_0x1539f1(0x2b0)](_0x2b0d58){const _0x19bd77=_0x1539f1;this[_0x19bd77(0x275)]=[..._0x2b0d58],this['touchedFiles'][_0x19bd77(0x352)](_0x19bd77(0x275));}async[_0x1539f1(0x2ec)](){const _0x4a387e=_0x1539f1;return this['syncedChangesets']??=await this[_0x4a387e(0x254)][_0x4a387e(0x2ec)](),this[_0x4a387e(0x359)];}async['appendSyncedChangesets'](_0x4af787){const _0x398cb5=_0x1539f1;_0x4af787[_0x398cb5(0x1ee)]!==0x0&&(this[_0x398cb5(0x359)]=[...await this['getSyncedChangesets'](),..._0x4af787],this[_0x398cb5(0x33a)][_0x398cb5(0x352)](_0x398cb5(0x359)));}async['replaceSyncedChangesets'](_0x32db93){const _0x2607c9=_0x1539f1;this['syncedChangesets']=[..._0x32db93],this[_0x2607c9(0x33a)][_0x2607c9(0x352)](_0x2607c9(0x359));}[_0x1539f1(0x1b2)](){const _0xee92f0=_0x1539f1;let _0x24cce0=new Map();for(let _0x1934e8 of this[_0xee92f0(0x33a)])_0x24cce0[_0xee92f0(0x336)](an(_0x1934e8),this[_0xee92f0(0x269)](_0x1934e8));return _0x24cce0;}['serializeTouchedFile'](_0x3a86e6){const _0x2a3f8d=_0x1539f1;switch(_0x3a86e6){case'manifest':return Y(Z(this[_0x2a3f8d(0x1e9)],_0x3a86e6));case _0x2a3f8d(0x270):return Y(Z(this[_0x2a3f8d(0x270)],_0x3a86e6));case _0x2a3f8d(0x323):return X(Z(this[_0x2a3f8d(0x323)],_0x3a86e6));case'localChangesets':return X(Z(this[_0x2a3f8d(0x275)],_0x3a86e6));case _0x2a3f8d(0x359):return X(Z(this[_0x2a3f8d(0x359)],_0x3a86e6));}}};async function Qt(_0x11f54a,_0x393ec0,_0x5acc6f){const _0x1bf1c1=_0x1539f1;let _0x12023f=_0x5a76fb(_0x11f54a[_0x1bf1c1(0x2fe)],_0x393ec0),_0x354247=await q(_0x12023f),_0x38dcb6;try{_0x38dcb6=JSON[_0x1bf1c1(0x299)](_0x354247);}catch(_0x5ca063){throw new I(_0x12023f,_0x5ca063 instanceof Error?_0x5ca063[_0x1bf1c1(0x327)]:String(_0x5ca063),_0x5ca063 instanceof Error?{'cause':_0x5ca063}:void 0x0);}return _0x5acc6f(_0x38dcb6,_0x12023f);}async function K(_0x445324,_0x4436b9,_0x36d854){const _0x3f4167=_0x1539f1;return(await $t(_0x445324,_0x4436b9))[_0x3f4167(0x2db)](({value:_0x44d406,label:_0x39f839})=>_0x36d854(_0x44d406,_0x39f839));}async function $t(_0x3b54f0,_0x558aaa){const _0x690f99=_0x1539f1;let _0x4fb76f=_0x5a76fb(_0x3b54f0[_0x690f99(0x2fe)],_0x558aaa),_0x4c1b63=(await q(_0x4fb76f))[_0x690f99(0x1d2)]();return _0x4c1b63['length']===0x0?[]:_0x4c1b63[_0x690f99(0x215)](/\r?\n/u)[_0x690f99(0x2db)]((_0x595f9a,_0x3af8e0)=>{const _0x532e5e=_0x690f99;let _0x406b95;try{_0x406b95=JSON[_0x532e5e(0x299)](_0x595f9a);}catch(_0x5727d8){throw new I(_0x4fb76f,'invalid\x20JSONL\x20at\x20line\x20'+(_0x3af8e0+0x1)+':\x20'+(_0x5727d8 instanceof Error?_0x5727d8[_0x532e5e(0x327)]:String(_0x5727d8)),_0x5727d8 instanceof Error?{'cause':_0x5727d8}:void 0x0);}return{'value':_0x406b95,'label':_0x4fb76f+':'+(_0x3af8e0+0x1)};});}async function q(_0x285365){const _0x111d85=_0x1539f1;try{if(!(await _0x1e846a(_0x285365))[_0x111d85(0x2c7)]())throw new wt(_0x285365);return await _0x5b8678(_0x285365,_0x111d85(0x328));}catch(_0x40065c){throw Q(_0x40065c)&&_0x40065c[_0x111d85(0x21f)]===_0x111d85(0x304)?new wt(_0x285365):_0x40065c;}}function en(_0x1db0eb,_0x16d6f3){const _0x404d27=_0x1539f1;if(typeof _0x1db0eb!=_0x404d27(0x33e)||!_0x1db0eb||Array[_0x404d27(0x237)](_0x1db0eb))throw new I(_0x16d6f3,_0x404d27(0x2f4));return _0x1db0eb;}async function tn(_0x36518b,_0x370304,_0x1fad89){const _0x29fb08=_0x1539f1;if(_0x370304[_0x29fb08(0x1cc)]===0x0)return;let _0x509009=_0x36518b[_0x29fb08(0x2fe)]+_0x29fb08(0x257)+process[_0x29fb08(0x268)]+'-'+_0x3bdc2d(),_0x2a2272=await Promise[_0x29fb08(0x2d1)]([..._0x370304[_0x29fb08(0x33f)]()][_0x29fb08(0x2db)](async _0x3ea857=>({'relativePath':_0x3ea857,'originalContent':await q(_0x5a76fb(_0x36518b[_0x29fb08(0x2fe)],_0x3ea857))})));await _0xf0d57(_0x509009,{'recursive':!0x0}),await nn(_0x509009,{'state':_0x29fb08(0x349),'files':_0x2a2272});try{for(let [_0x2e0fe4,_0x259f77]of _0x370304)await _0x1fad89[_0x29fb08(0x243)]?.(_0x2e0fe4),await J(_0x36518b,_0x2e0fe4,_0x259f77);await nn(_0x509009,{'state':_0x29fb08(0x2f0),'files':_0x2a2272});}catch(_0x25fc1a){try{for(let _0x8685fc of _0x2a2272)await J(_0x36518b,_0x8685fc[_0x29fb08(0x2d8)],_0x8685fc[_0x29fb08(0x2e3)]);await nn(_0x509009,{'state':_0x29fb08(0x315),'files':_0x2a2272});}catch(_0x5f1bbb){throw Error((_0x25fc1a instanceof Error?_0x25fc1a[_0x29fb08(0x327)]:String(_0x25fc1a))+_0x29fb08(0x2ba)+(_0x5f1bbb instanceof Error?_0x5f1bbb['message']:String(_0x5f1bbb)),_0x25fc1a instanceof Error?{'cause':_0x25fc1a}:void 0x0);}throw _0x25fc1a;}finally{await _0x2dcc20(_0x509009,{'recursive':!0x0,'force':!0x0})[_0x29fb08(0x26b)](()=>void 0x0);}}async function nn(_0x5408d9,_0x53269a){const _0x31a450=_0x1539f1;await _0x6c3ba4(_0x5a76fb(_0x5408d9,_0x31a450(0x2c9)),Y(_0x53269a),_0x31a450(0x328));}async function rn(_0x3e266b,_0x58769b,_0x5297d3){const _0x5d6018=_0x1539f1;await _0xf0d57(_0x3e266b[_0x5d6018(0x2fe)],{'recursive':!0x0}),await _0x459368(_0x5a76fb(_0x3e266b[_0x5d6018(0x2fe)],_0x58769b),_0x5297d3,_0x5d6018(0x328));}async function J(_0x293580,_0x377a3e,_0x3c1ef5){const _0x402759=_0x1539f1;let _0x1ab40d=_0x5a76fb(_0x293580[_0x402759(0x2fe)],_0x377a3e),_0x218a09=_0x1ab40d+'.tmp-'+process['pid']+'-'+_0x3bdc2d();try{await _0xf0d57(_0x73c0a7(_0x1ab40d),{'recursive':!0x0}),await _0x6c3ba4(_0x218a09,_0x3c1ef5,_0x402759(0x328)),await _0x4a0359(_0x218a09,_0x1ab40d);}finally{await _0x2dcc20(_0x218a09,{'force':!0x0})[_0x402759(0x26b)](()=>void 0x0);}}function an(_0x1e70a6){const _0x166e2a=_0x1539f1;switch(_0x1e70a6){case _0x166e2a(0x1e9):return R;case _0x166e2a(0x270):return z;case _0x166e2a(0x323):return B;case _0x166e2a(0x275):return V;case _0x166e2a(0x359):return H;}}function Y(_0x1137b4){const _0x1a3b1f=_0x1539f1;return JSON[_0x1a3b1f(0x2c2)](_0x1137b4)+'\x0a';}function _0x431d(){const _0x5c1998=['onStderrChunk','SessionEvalJs','startsWith','evaljs','basePackage','ExportWorkbookFile','logs','.tx-','univer\x20daemon\x20stop','daemonDir','replace-synced-changesets','endsWith','F_OK','eval-js','destroyGraceMs','mutates','once','ERR_WORKBOOK_PACKAGE_TRANSACTION_FAILED','values','timeoutMs','load-workbook','cli.js','workbookIdentity','end','pid','serializeTouchedFile','buildId','catch','view-host','16945pblnYh','resolveWorkbookIdentity','runtimeRoot','initWorkbookData','Missing\x20workbook\x20package\x20file:\x20','info','createWorkbook','identity','localChangesets','transaction','child','RuntimeSessionCreated','resolveExecutionPlaneOptions','meta','drain','getLocalMutations','hostname','rotationCheckIntervalMs','ERR_WORKBOOK_PACKAGE_FILE_INVALID','fromEntries','univer','view-host.jsonl','sizeBytes','createdAt','name','initRev','execArgv','appendLocalChangeset','indexOf','.\x20Run\x20`univer\x20daemon\x20stop`\x20and\x20retry.','univer-','clear\x20stale\x20daemon\x20runtime\x20files','idle-unload','daemon.shutdown','univer\x20daemon\x20start','RuntimeRunner','SessionLoadWorkbook','getInitWorkbookData','local\x20changeset.message\x20must\x20be\x20a\x20string','stack','sessionDisposeWorkbook','.sock','main.ts','pendingRequests','parse','isInteger','saturated','.sid\x20must\x20be\x20a\x20non-empty\x20string','init-workbook-data.json','sessionEvalJs','ensure-workbook-replay-pack-loaded','env','getSession','emit','session-','Daemon\x20RPC\x20timeout\x20for\x20','\x20on\x20','WorkbookPackageError','baseWorkbookData','replaceSyncedChangesets','runtime.jsonl','runtime','session.exportWorkbookData','status','Runner\x20startup\x20timeout','.ts','getSessionIdleTtlMs','replaceLocalChangesets','setInitWorkbookData','evalJs','getLocalChangesets','outputPath','sid','pipe','closed','SIGTERM',',\x20got\x20',';\x20rollback\x20failed:\x20','Daemon\x20build\x20mismatch.\x20Expected\x20','SessionLoadWorkbookDataReplayPack','ensureSession','.unv','session.exportWorkbookFile','loadWorkbookData','explicit-dispose','stringify','command','isProcessAlive','number','extension','isFile','local\x20changeset','journal.json','startTimeoutMs','manifest.json','stderrPath','isFinite','LoadWorkbookDataReplayPack','error','\x20must\x20be\x20an\x20object','all','reqId','starting','SessionDispose','signalCode','scheduleRotationIfNeeded','connect','relativePath','traceId','sessionCount','map','touchSession','modulePath','internal','unitID','event','6215510YCtRPW','withSpan','originalContent','daemonLogPath','syncedRev','injectMeta','appendLocalMutations','local','lockRetryIntervalMs','writeOptions','result','getSyncedChangesets','params','loadWorkbookDataReplayPack','local-changesets.jsonl','committed','loadReplayPack','value','sha1','workbook\x20data\x20must\x20be\x20an\x20object','load-workbook-replay-pack','./build-id-BAjJE5TZ.js','parentSpanId','runner-exit','src','default','appendSyncedChangesets','univer-runner.js','isDirectory','absolutePath','unloadIdleSessions','ExportWorkbookData','RuntimeSessionDisposed','createConnection','daemonEntry','ENOENT','daemon.health','platform','logsDir','4TpuDpg','allSettled','logFields','homeDir','logPath','source','clear','rpcTimeoutMs','rotationInFlight','component','export-workbook','toString','cli','rolled_back','daemon.lock','workbookName','run-help','syncedRev\x20must\x20be\x20a\x20non-negative\x20integer\x20or\x20null','toRuntimeSessionInfo','Cannot\x20resolve\x20home\x20directory\x20for\x20UNIVER_HOME\x20fallback','index.ts','exportWorkbookFile','ignore','stderr.log','RuntimeSession','open','UNIVER_HOME','localMutations','cli.jsonl','daemon.meta.json','client','message','utf8','exists','lockPath','args','loadWorkbook','UNIVER_CLI_VERSION','append-local-changeset','Unable\x20to\x20resolve\x20univer-cli\x20package\x20root\x20from\x20','9026IOnkEP','method','start\x20a\x20fresh\x20daemon','747546lyEfzO','type','NODE_OPTIONS','set','fields','sessionLoadWorkbook','export-workbook-file','touchedFiles','archiveDir','Workbook\x20package\x20already\x20exists:\x20','traceFlags','object','keys','reopen','VITEST_POOL_ID','startedAt','2.0','setManifest','runner','autoStart','dispose','Runtime','committing','ERR_WORKBOOK_PACKAGE_LOCK_TIMEOUT','view','browser','Health','univer-runtime','Invalid\x20workbook\x20package\x20path:\x20','destroyAll','socketPath','add','.mutations[','daemon.sock','sort','send','resolve','daemonOptions','syncedChangesets','initialize','nextRotationCheckAt','workbookData','exited','spanId','null','manifest\x20must\x20be\x20an\x20object','maxArchiveFiles','ERR_WORKBOOK_PACKAGE_ALREADY_EXISTS','Runner\x20exited\x20before\x20ready','session.evalJs','takeWrites','packages','toISOString','ERR_WORKBOOK_PACKAGE_FILE_MISSING','isAlive','mutation\x20must\x20be\x20an\x20object','lastAccessedAt','replayPack','sessionExportWorkbookData','workbookId','VITEST','unknown','session.loadWorkbookDataReplayPack','stderr','EvalJs','ensureWorkbookDataReplayPackLoaded','RuntimeRunnerExit','rpc-response','digest','join','removed','HOME','mutations','synced\x20changeset.message\x20must\x20be\x20a\x20string\x20when\x20present','daemon.js','baseRev','size','closeAfterFlush','session','from','write','.js','trim','active','cwd','SessionExportWorkbookFile','USERPROFILE','LoadWorkbook','initRev\x20must\x20be\x20a\x20non-negative\x20integer\x20or\x20null','pidPath','synced\x20changeset.mutations\x20must\x20be\x20an\x20array','destroying','SIGKILL','ensureSessionState','rejectPendingRequests','univer-daemon-','timeout','8ropImJ','daemon\x20is\x20stopped','cliLogPath','ready','now','slice','/tmp','../..','manifest','trimEnd','645757fsIFMy','synced-changesets.jsonl','getSessionCount','length','WorkbookPackageLockTimeoutError','Runner\x20process\x20exited\x20(code=','off','UNIVER_CLI_BUILD_ID','unref','destination','running','Workbook\x20package\x20transaction\x20failed\x20for\x20','.univer','apps','RPC\x20timeout','create-workbook','replaceLocalMutations','bin','daemon.pid','daemon','string','filter','WorkbookPackageTransactionError','455691UHbhzC','exportWorkbookData','43aEWPPZ','InvalidWorkbookPackagePathError','1499607OfAsqT','sessionId','maxBytes','unitID\x20must\x20be\x20a\x20string\x20or\x20null','Workbook\x20package\x20is\x20busy:\x20','runtimeLogPath','warn','win32','random','prefix','SessionExportWorkbookData','flush','sessionLoadWorkbookDataReplayPack','.lock','mutation.params\x20must\x20be\x20an\x20object','split','dist','session.loadWorkbook','logger','synced\x20changeset','format','exitCode','mutation.id\x20must\x20be\x20a\x20non-empty\x20string','update','Daemon\x20process\x20entry\x20is\x20not\x20configured.\x20Pass\x20DaemonClientOptions.daemonEntry\x20from\x20the\x20CLI\x20runtime\x20manifest.','code','execPath','sessions','session.getWorkbook','packaged','archive','workspace-dist','Runner\x20not\x20ready','UNIVER_DAEMON_SESSION_IDLE_TTL_MS','sendRpc','sessionRoot','Shutdown','options','destroySession','ipc','delete','data','holder','metaPath','fromAbsolutePath','getManifest','daemon\x20is\x20running','operation','waitForReady','isArray','destroy','--import','created','entry:\x20','DaemonRpcClient','includes','replace-local-changesets','exit','get','kill','process_role','beforeCommitFile','topics','Runner\x20startup\x20error:\x20','local\x20changeset.mutations\x20must\x20be\x20an\x20array','resolveIdentity','sessionIdleTtlMs','sessionExportWorkbookFile','formatStderr','lockTimeoutMs','event_name','VITEST_WORKER_ID','SessionCreateWorkbook','session.dispose'];_0x431d=function(){return _0x5c1998;};return _0x431d();}function X(_0x386c17){const _0x40187b=_0x1539f1;return _0x386c17[_0x40187b(0x1ee)]===0x0?'':_0x386c17[_0x40187b(0x2db)](_0x8a4820=>JSON[_0x40187b(0x2c2)](_0x8a4820))[_0x40187b(0x1c5)]('\x0a')+'\x0a';}function Z(_0x5818ec,_0x37147d){if(_0x5818ec===void 0x0)throw Error('Missing\x20transaction\x20value\x20for\x20'+_0x37147d);return _0x5818ec;}function Q(_0x5768ed){const _0x417c3d=_0x1539f1;return _0x5768ed instanceof Error&&_0x417c3d(0x21f)in _0x5768ed;}function on(_0x15163d){const _0x15dfd0=_0x1539f1;return typeof _0x15163d==_0x15dfd0(0x33e)&&!!_0x15163d&&!Array['isArray'](_0x15163d);}var sn=_0x4710ea(import.meta.url),$=_n(_0x73c0a7(_0x2b74e2(import.meta.url)));function cn(_0x45d377=process.env){let _0xc8cd98=un(_0x45d377);return _0xc8cd98==='source'?dn():_0xc8cd98==='workspace-dist'?fn():mn();}function ln(_0x503a15=process.env){const _0x6a91eb=_0x1539f1;return{'daemonEntry':cn(_0x503a15)[_0x6a91eb(0x303)]};}function un(_0x459287=process.env){const _0x3582d4=_0x1539f1;let _0x18eab5=_0x459287['UNIVER_CLI_RUNTIME_MODE']?.['trim']();return _0x18eab5===_0x3582d4(0x30d)||_0x18eab5===_0x3582d4(0x225)||_0x18eab5===_0x3582d4(0x223)?_0x18eab5:_0x2b74e2(import.meta.url)['endsWith'](_0x3582d4(0x2ae))?_0x3582d4(0x30d):gn($)?_0x3582d4(0x225):_0x3582d4(0x223);}function dn(){const _0x35541c=_0x1539f1;let _0x4c1203=_0x48276b($,_0x35541c(0x1e8)),_0x30fea4=sn['resolve']('tsx');return{'mode':_0x35541c(0x30d),'packageRoot':$,'cliEntry':{'execArgv':[_0x35541c(0x239),_0x30fea4],'modulePath':_0x5a76fb($,_0x35541c(0x2f9),_0x35541c(0x31c))},'daemonEntry':{'execArgv':[_0x35541c(0x239),_0x30fea4],'modulePath':_0x5a76fb($,_0x35541c(0x2f9),_0x35541c(0x1fe),_0x35541c(0x297))},'runtimeExecutionPlaneEntry':{'execArgv':[_0x35541c(0x239),_0x30fea4],'modulePath':_0x5a76fb(_0x4c1203,_0x35541c(0x1b3),_0x35541c(0x34e),_0x35541c(0x2f9),'execution-plane',_0x35541c(0x297))},'runHelpTopicsRoot':_0x5a76fb($,_0x35541c(0x2f9),'run-help','topics'),'viewAssetsRoot':hn(_0x4c1203)};}function fn(){const _0x1ec46d=_0x1539f1;let _0xefddfe=pn($),_0x313652=_0x5a76fb(_0xefddfe,_0x1ec46d(0x2de),'univer-runner.js');return{'mode':_0x1ec46d(0x225),'packageRoot':$,'cliEntry':{'execArgv':[],'modulePath':_0x5a76fb(_0xefddfe,_0x1ec46d(0x2de),'cli.js')},'daemonEntry':{'execArgv':[],'modulePath':_0x5a76fb(_0xefddfe,_0x1ec46d(0x2de),_0x1ec46d(0x1ca))},'runtimeExecutionPlaneEntry':{'execArgv':[],'modulePath':_0x313652},'runHelpTopicsRoot':_0x5a76fb(_0xefddfe,_0x1ec46d(0x318),_0x1ec46d(0x244)),'viewAssetsRoot':_0x5a76fb(_0xefddfe,_0x1ec46d(0x34b),_0x1ec46d(0x34c))};}function pn(_0x9c8088){const _0x44fd4e=_0x1539f1;return gn(_0x9c8088)?_0x5a76fb(_0x9c8088,_0x44fd4e(0x216)):_0x9c8088;}function mn(){const _0x573624=_0x1539f1;return{'mode':'packaged','packageRoot':$,'cliEntry':{'execArgv':[],'modulePath':_0x5a76fb($,_0x573624(0x2de),_0x573624(0x265))},'daemonEntry':{'execArgv':[],'modulePath':_0x5a76fb($,_0x573624(0x2de),_0x573624(0x1ca))},'runtimeExecutionPlaneEntry':{'execArgv':[],'modulePath':_0x5a76fb($,_0x573624(0x2de),_0x573624(0x2fc))},'runHelpTopicsRoot':_0x5a76fb($,_0x573624(0x318),_0x573624(0x244)),'viewAssetsRoot':_0x5a76fb($,_0x573624(0x34b),_0x573624(0x34c))};}function hn(_0x287b31){const _0x3f1086=_0x1539f1;let _0x5833b3=_0x5a76fb(_0x287b31,_0x3f1086(0x1b3),_0x3f1086(0x26c),_0x3f1086(0x216),_0x3f1086(0x34c));return _0x390ebd(_0x5833b3)?_0x5833b3:_0x5a76fb(_0x287b31,'packages',_0x3f1086(0x26c),_0x3f1086(0x2f9),_0x3f1086(0x34c));}function gn(_0x1a409c){const _0x5d57c6=_0x1539f1;return _0x40b1df(_0x1a409c)==='cli'&&_0x40b1df(_0x73c0a7(_0x1a409c))===_0x5d57c6(0x1f8);}function _n(_0x3e9b27){const _0x1a952b=_0x1539f1;let _0x8280be=_0x3e9b27;for(;;){let _0x278700=_0x5a76fb(_0x8280be,'package.json');if(_0x390ebd(_0x278700)&&JSON[_0x1a952b(0x299)](_0xeead2d(_0x278700,'utf8'))[_0x1a952b(0x1fc)]?.[_0x1a952b(0x281)]!==void 0x0)return _0x8280be;let _0x2c36a2=_0x73c0a7(_0x8280be);if(_0x2c36a2===_0x8280be)throw Error(_0x1a952b(0x32f)+_0x3e9b27);_0x8280be=_0x2c36a2;}}export{_t as a,We as c,De as d,S as f,St as i,w as l,x as m,cn as n,Ue as o,ge as p,Ut as r,He as s,ln as t,C as u};