univer-cli 0.1.5 → 0.1.6

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 _0x49ba2f=_0x3740;(function(_0x3f3197,_0x21bbcc){const _0x3bd72a=_0x3740,_0x1ccc71=_0x3f3197();while(!![]){try{const _0x227497=parseInt(_0x3bd72a(0x1bf))/0x1*(-parseInt(_0x3bd72a(0x192))/0x2)+-parseInt(_0x3bd72a(0x312))/0x3+-parseInt(_0x3bd72a(0x1a6))/0x4*(-parseInt(_0x3bd72a(0x310))/0x5)+-parseInt(_0x3bd72a(0x198))/0x6+-parseInt(_0x3bd72a(0x2ec))/0x7+-parseInt(_0x3bd72a(0x1eb))/0x8+parseInt(_0x3bd72a(0x2e9))/0x9*(parseInt(_0x3bd72a(0x220))/0xa);if(_0x227497===_0x21bbcc)break;else _0x1ccc71['push'](_0x1ccc71['shift']());}catch(_0x1afd9a){_0x1ccc71['push'](_0x1ccc71['shift']());}}}(_0x1f74,0xeac1b));import{o as _0x36afa7}from'./rolldown-runtime-D8j-JhcR.js';import{gn as _0x33d036}from'./vendor-DjomC5bd.js';import{a as _0x1b86c2,i as _0x67b335,n as _0x558b65,o as _0x40871f,r as _0x3d8a60}from'./trace-y3C6-Sz8.js';import{fork as _0x481162,spawn as _0x5849f1}from'node:child_process';import{constants as _0x318215,existsSync as _0x2cca8f,mkdirSync as _0xf1fc58,readFileSync as _0xc451d}from'node:fs';import{access as _0x59f796,appendFile as _0x52ff6c,mkdir as _0x378b2c,readFile as _0x1a16fc,readdir as _0x312d68,realpath as _0xa08057,rename as _0x3f5eef,rm as _0x19d029,stat as _0x3aee46,writeFile as _0x4348c4}from'node:fs/promises';import{basename as _0x1f93a9,dirname as _0x38c17a,extname as _0x52d0a3,join as _0x55ff6d,resolve as _0x3e117a}from'node:path';import{fileURLToPath as _0x137dee,pathToFileURL as _0x26da3e}from'node:url';import{createRequire as _0x3c4b00}from'node:module';import{hostname as _0x23b4ac}from'node:os';import{createHash as _0x44975b,randomUUID as _0x2d40be}from'node:crypto';import _0x140e39 from'node:net';import _0x33ed65 from'node:process';import{EventEmitter as _0x5e0898}from'node:events';const x={'Health':_0x49ba2f(0x23a),'Shutdown':'daemon.shutdown','SessionCreateWorkbook':_0x49ba2f(0x2c4),'SessionEvalJs':_0x49ba2f(0x1a4),'SessionExportWorkbookFile':_0x49ba2f(0x183),'SessionExportWorkbookData':_0x49ba2f(0x1f9),'SessionDispose':'session.dispose','SessionGetWorkbook':'session.getWorkbook','SessionLoadWorkbook':_0x49ba2f(0x1c7),'SessionLoadWorkbookDataReplayPack':_0x49ba2f(0x270)};var ge=class{[_0x49ba2f(0x202)](_0x48e5){}['info'](_0x2ab17e){}['warn'](_0x5d9642){}['error'](_0x520db2){}['event'](_0x160613){}async[_0x49ba2f(0x1c2)](){}};function _e(_0x18462b,_0x16213a=new Date()){const _0x566ce3=_0x49ba2f;let _0x3162cf=_0x558b65[_0x566ce3(0x1d2)]();return{'time':_0x16213a[_0x566ce3(0x25a)](),'level':_0x18462b['level']??_0x566ce3(0x321),'event_name':_0x18462b['event_name'],'component':_0x18462b[_0x566ce3(0x18c)],'process_role':_0x18462b[_0x566ce3(0x215)],'pid':process[_0x566ce3(0x22c)],..._0x18462b[_0x566ce3(0x229)]===void 0x0?{}:{'message':_0x18462b[_0x566ce3(0x229)]},..._0x3162cf===void 0x0?{}:{'trace_id':_0x3162cf[_0x566ce3(0x275)],'span_id':_0x3162cf[_0x566ce3(0x1e9)],'trace_flags':_0x3162cf['traceFlags'],..._0x3162cf[_0x566ce3(0x296)]===void 0x0?{}:{'parent_span_id':_0x3162cf[_0x566ce3(0x296)]}},..._0x18462b['error']===void 0x0?{}:{'error':ve(_0x18462b[_0x566ce3(0x188)])},..._0x18462b[_0x566ce3(0x2e7)]??{}};}function ve(_0x2e383e){const _0x3dd7e5=_0x49ba2f;return _0x2e383e instanceof Error?{'message':_0x2e383e['message'],'name':_0x2e383e[_0x3dd7e5(0x314)],...be(_0x2e383e),..._0x2e383e[_0x3dd7e5(0x246)]===void 0x0?{}:{'stack':_0x2e383e[_0x3dd7e5(0x246)]},...ye(_0x2e383e)}:{'message':typeof _0x2e383e=='string'?_0x2e383e:JSON['stringify'](_0x2e383e)};}function ye(_0x5f43c0){const _0x17a065=_0x49ba2f;let _0x1580a6=_0x5f43c0;return typeof _0x1580a6[_0x17a065(0x294)]==_0x17a065(0x21a)?{'code':_0x1580a6[_0x17a065(0x294)]}:{};}function be(_0x3eb4eb){const _0x59b632=_0x49ba2f;let _0x367754=_0x3eb4eb;return _0x367754['logFields']===null||typeof _0x367754[_0x59b632(0x1f0)]!=_0x59b632(0x236)||Array['isArray'](_0x367754[_0x59b632(0x1f0)])?{}:{'details':_0x367754[_0x59b632(0x1f0)]};}var xe=_0x36afa7(_0x33d036(),0x1)[_0x49ba2f(0x287)],Se=0xa*0x400*0x400,Ce=0x5,we=0x3e8,Te=class{[_0x49ba2f(0x306)];[_0x49ba2f(0x2a9)];[_0x49ba2f(0x2aa)];['logPath'];[_0x49ba2f(0x199)];[_0x49ba2f(0x226)];[_0x49ba2f(0x1c6)];[_0x49ba2f(0x313)]=!0x1;[_0x49ba2f(0x1b2)]=0x0;[_0x49ba2f(0x2a8)];[_0x49ba2f(0x26b)]=!0x1;constructor(_0x14010e){const _0x43f0dc=_0x49ba2f;this[_0x43f0dc(0x2aa)]=_0x14010e[_0x43f0dc(0x2aa)]===!0x0,this[_0x43f0dc(0x315)]=_0x14010e[_0x43f0dc(0x315)],this[_0x43f0dc(0x199)]=_0x14010e[_0x43f0dc(0x199)]??Ce,this[_0x43f0dc(0x226)]=_0x14010e[_0x43f0dc(0x226)]??Se,this[_0x43f0dc(0x1c6)]=_0x14010e[_0x43f0dc(0x1c6)]??we,this[_0x43f0dc(0x306)]=new xe({'dest':_0x14010e[_0x43f0dc(0x315)],'mkdir':!0x0,'sync':!0x1}),this[_0x43f0dc(0x2a9)]=new Promise(_0x3349cc=>{const _0x2caa0a=_0x43f0dc;this[_0x2caa0a(0x306)]['once'](_0x2caa0a(0x2a9),()=>{_0x3349cc();}),this[_0x2caa0a(0x306)][_0x2caa0a(0x267)](_0x2caa0a(0x188),()=>{_0x3349cc();});});}[_0x49ba2f(0x202)](_0x5b1425){const _0x273028=_0x49ba2f;this['event']({..._0x5b1425,'level':_0x273028(0x202)});}[_0x49ba2f(0x321)](_0x16b494){const _0x22da88=_0x49ba2f;this[_0x22da88(0x24c)]({..._0x16b494,'level':_0x22da88(0x321)});}[_0x49ba2f(0x1ea)](_0x59049d){const _0x3d0ddf=_0x49ba2f;this[_0x3d0ddf(0x24c)]({..._0x59049d,'level':_0x3d0ddf(0x1ea)});}['error'](_0x245205){const _0x214150=_0x49ba2f;this['event']({..._0x245205,'level':_0x214150(0x188)});}['event'](_0x3ea559){const _0xa2abe=_0x49ba2f;if(!(this[_0xa2abe(0x313)]||this['saturated']))try{this[_0xa2abe(0x26b)]=!this[_0xa2abe(0x306)][_0xa2abe(0x27a)](JSON['stringify'](_e(_0x3ea559))+'\x0a'),this['saturated']&&this['destination']['once'](_0xa2abe(0x248),()=>{const _0x467a2e=_0xa2abe;this[_0x467a2e(0x26b)]=!0x1;}),this[_0xa2abe(0x1c4)]();}catch{}}async[_0x49ba2f(0x1c2)](){const _0x5772af=_0x49ba2f;this['closed']||(await this['ready'],await new Promise(_0x51ca74=>{const _0x3e8479=_0x3740;this['destination'][_0x3e8479(0x1c2)](()=>{_0x51ca74();});}),await this[_0x5772af(0x2a8)],this['closeAfterFlush']&&(this[_0x5772af(0x313)]=!0x0,this[_0x5772af(0x306)][_0x5772af(0x1e1)]()));}[_0x49ba2f(0x1c4)](){const _0x49ad4e=_0x49ba2f;let _0x10121e=Date['now']();this[_0x49ad4e(0x2a8)]!==void 0x0||_0x10121e<this[_0x49ad4e(0x1b2)]||(this['nextRotationCheckAt']=_0x10121e+this[_0x49ad4e(0x1c6)],this[_0x49ad4e(0x2a8)]=this['rotateIfNeeded']()['catch'](()=>{})[_0x49ad4e(0x1d0)](()=>{const _0xd3a994=_0x49ad4e;this[_0xd3a994(0x2a8)]=void 0x0;}));}async[_0x49ba2f(0x1ad)](){const _0x108b49=_0x49ba2f;await this[_0x108b49(0x2a9)],await je({'logPath':this[_0x108b49(0x315)],'maxArchiveFiles':this[_0x108b49(0x199)],'maxBytes':this['maxBytes'],'flush':async()=>{await new Promise(_0x140aa3=>{const _0x25f8d6=_0x3740;this[_0x25f8d6(0x306)]['flush'](()=>{_0x140aa3();});});}})&&!this[_0x108b49(0x313)]&&this[_0x108b49(0x306)]['reopen'](this[_0x108b49(0x315)]);}};function Ee(_0x5ad0f9){return new Te(_0x5ad0f9);}function De(_0x200955){let {env:_0x2e7881,role:_0x1eb9b7,..._0x17d1cd}=_0x200955,_0x4a0140=S(_0x2e7881);return Ee({..._0x17d1cd,'logPath':ke(_0x4a0140,_0x1eb9b7)});}function Oe(_0x3844d2=process.env){const _0x5a844e=_0x49ba2f;let _0x4aa1e8=_0x3844d2['UNIVER_HOME']?.[_0x5a844e(0x274)]();if(_0x4aa1e8)return _0x3e117a(_0x4aa1e8);let _0x569b13=_0x3844d2[_0x5a844e(0x27f)]?.['trim']()||_0x3844d2[_0x5a844e(0x2ee)]?.['trim']();if(!_0x569b13)throw Error('Cannot\x20resolve\x20home\x20directory\x20for\x20UNIVER_HOME\x20fallback');return _0x3e117a(_0x569b13,_0x5a844e(0x1ed));}function S(_0x2b0d2e=process.env){const _0x148233=_0x49ba2f;let _0x2d1105=Oe(_0x2b0d2e),_0x40348f=_0x55ff6d(_0x2d1105,_0x148233(0x255));return{'homeDir':_0x2d1105,'logsDir':_0x40348f,'cliLogPath':_0x55ff6d(_0x40348f,_0x148233(0x2c9)),'daemonLogPath':_0x55ff6d(_0x40348f,_0x148233(0x282)),'runtimeLogPath':_0x55ff6d(_0x40348f,_0x148233(0x1b6)),'viewHostLogPath':_0x55ff6d(_0x40348f,'view-host.jsonl')};}function ke(_0x37b31c,_0x31b320){const _0x415532=_0x49ba2f;switch(_0x31b320){case _0x415532(0x1cd):return _0x37b31c[_0x415532(0x2a2)];case _0x415532(0x2b9):return _0x37b31c[_0x415532(0x2cd)];case _0x415532(0x2dd):return _0x37b31c[_0x415532(0x2fe)];case _0x415532(0x305):return _0x37b31c[_0x415532(0x2af)];}}async function Ae(_0xac8543,_0x2283b9){const _0x54adaa=_0x49ba2f;await _0x378b2c(_0x38c17a(_0xac8543),{'recursive':!0x0,'mode':0x1c0}),await _0x52ff6c(_0xac8543,_0x2283b9+'\x0a',_0x54adaa(0x1a5));try{await je({'logPath':_0xac8543,'maxArchiveFiles':Ce,'maxBytes':Se});}catch{}}async function je(_0xeef9d7){const _0x1104b8=_0x49ba2f;if(_0xeef9d7[_0x1104b8(0x226)]<=0x0)return!0x1;await _0xeef9d7[_0x1104b8(0x1c2)]?.();let _0x5e6734;try{_0x5e6734=await _0x3aee46(_0xeef9d7[_0x1104b8(0x315)]);}catch{return!0x1;}if(!_0x5e6734[_0x1104b8(0x304)]()||_0x5e6734[_0x1104b8(0x2ed)]<_0xeef9d7[_0x1104b8(0x226)])return!0x1;let _0x5e4e72=_0x55ff6d(_0x38c17a(_0xeef9d7[_0x1104b8(0x315)]),_0x1104b8(0x265));await _0x378b2c(_0x5e4e72,{'recursive':!0x0,'mode':0x1c0});let _0x2ac126=_0x55ff6d(_0x5e4e72,_0x1f93a9(_0xeef9d7[_0x1104b8(0x315)])+'.'+Ne(new Date())+'.'+process[_0x1104b8(0x22c)]);try{await _0x3f5eef(_0xeef9d7[_0x1104b8(0x315)],_0x2ac126);}catch{return!0x1;}return await Me({'archiveDir':_0x5e4e72,'maxArchiveFiles':_0xeef9d7[_0x1104b8(0x199)],'prefix':_0x1f93a9(_0xeef9d7[_0x1104b8(0x315)])+'.'}),!0x0;}async function Me(_0x260f06){const _0x2bf6a8=_0x49ba2f;if(_0x260f06['maxArchiveFiles']<0x0)return;let _0x185311;try{_0x185311=await _0x312d68(_0x260f06['archiveDir']);}catch{return;}let _0x3f2309=_0x185311[_0x2bf6a8(0x320)](_0x54694f=>_0x54694f[_0x2bf6a8(0x1ee)](_0x260f06[_0x2bf6a8(0x302)]))[_0x2bf6a8(0x299)]()[_0x2bf6a8(0x2b6)]();await Promise[_0x2bf6a8(0x2fb)](_0x3f2309[_0x2bf6a8(0x2c3)](_0x260f06['maxArchiveFiles'])[_0x2bf6a8(0x1f5)](async _0x440a6=>await _0x19d029(_0x55ff6d(_0x260f06[_0x2bf6a8(0x194)],_0x440a6),{'force':!0x0})));}function Ne(_0x2873ce){const _0x98f763=_0x49ba2f;return _0x2873ce[_0x98f763(0x25a)]()[_0x98f763(0x234)](/[^0-9A-Za-z]/gu,'');}var Pe=0x46,Fe=_0x49ba2f(0x2c6);function Ie(_0x35e3e5=process.env){const _0x4b6992=_0x49ba2f;let _0x367768=_0x35e3e5[_0x4b6992(0x27c)]?.[_0x4b6992(0x274)]();if(_0x367768)return _0x3e117a(_0x367768);let _0x97ddee=_0x35e3e5[_0x4b6992(0x27f)]?.[_0x4b6992(0x274)]()||_0x35e3e5[_0x4b6992(0x2ee)]?.[_0x4b6992(0x274)]();if(!_0x97ddee)throw Error(_0x4b6992(0x316));return _0x3e117a(_0x97ddee,'.univer');}function C(_0x1f985f=process.env){const _0x4b9a3b=_0x49ba2f;let _0x1d8eb1=Ie(_0x1f985f),_0x505e4a=_0x55ff6d(_0x1d8eb1,_0x4b9a3b(0x2b9)),_0xf7b655=_0x55ff6d(_0x1d8eb1,_0x4b9a3b(0x279)),_0x15bd54=S(_0x1f985f),_0x2e64ae=Le(_0x1d8eb1);return{'homeDir':_0x1d8eb1,'daemonDir':_0x505e4a,'logsDir':_0x15bd54['logsDir'],'daemonLogPath':_0x15bd54['daemonLogPath'],'sessionRoot':_0xf7b655,'socketPath':_0x2e64ae,'pidPath':_0x55ff6d(_0x505e4a,'daemon.pid'),'metaPath':_0x55ff6d(_0x505e4a,_0x4b9a3b(0x1fc)),'lockPath':_0x55ff6d(_0x505e4a,_0x4b9a3b(0x2e2))};}function Le(_0x87fd36,_0x4d559c=process[_0x49ba2f(0x186)]){const _0x30501f=_0x49ba2f;let _0x3d6015=_0x55ff6d(_0x87fd36,_0x30501f(0x2b9),_0x30501f(0x2c7));return _0x4d559c===_0x30501f(0x2fd)?Fe+_0x30501f(0x288)+ze(_0x3d6015):_0x3d6015[_0x30501f(0x290)]<=Pe?_0x3d6015:_0x55ff6d('/tmp',_0x30501f(0x2bd)+ze(_0x3d6015)+_0x30501f(0x205));}function w(_0x111aff){const _0x17dcd1=_0x49ba2f;return _0x111aff[_0x17dcd1(0x1ee)](Fe);}function Re(_0x3e7ed6,_0x14c5a3=process.env){const _0x5ca913=_0x49ba2f;let _0x5a6772=_0x55ff6d(C(_0x14c5a3)[_0x5ca913(0x21d)],_0x3e7ed6);return{'sessionDir':_0x5a6772,'tracePath':S(_0x14c5a3)['runtimeLogPath'],'stderrPath':_0x55ff6d(_0x5a6772,_0x5ca913(0x1d3))};}function ze(_0x1e8065){const _0x3e6d06=_0x49ba2f;return _0x44975b(_0x3e6d06(0x2f3))['update'](_0x1e8065)['digest']('hex')[_0x3e6d06(0x2c3)](0x0,0x10);}var Be=0x3a98,Ve=0x7530;async function T(_0x459a14={}){const _0x1ba445=_0x49ba2f;return await D({'jsonrpc':_0x1ba445(0x187),'id':k(),'method':x[_0x1ba445(0x1a0)]},{..._0x459a14,'autoStart':!0x1});}async function E(_0x855ac4={}){const _0x1fefd4=_0x49ba2f;let _0x5579ed=_0x855ac4['env']??_0x33ed65[_0x1fefd4(0x20b)],{readDaemonBuildId:_0x3dc60b}=await import(_0x1fefd4(0x1bc)),_0x54b794=_0x3dc60b(_0x5579ed);try{let _0x4a9537=await T({..._0x855ac4,'autoStart':!0x1});return lt(_0x54b794,_0x4a9537[_0x1fefd4(0x1e7)]),_0x4a9537;}catch(_0x5d928d){if(_0x855ac4[_0x1fefd4(0x1bd)]===!0x1)throw _0x5d928d;}let _0x17ceee=await it(_0x5579ed,_0x54b794,_0x855ac4[_0x1fefd4(0x19b)]),_0x5ec52e=_0x855ac4[_0x1fefd4(0x2cb)]??Be,_0x4f6e56=Date[_0x1fefd4(0x319)]()+_0x5ec52e,_0x3f7789;for(;Date[_0x1fefd4(0x319)]()<_0x4f6e56;)try{let _0x28284c=await T({..._0x855ac4,'autoStart':!0x1});return lt(_0x54b794,_0x28284c[_0x1fefd4(0x1e7)]),_0x28284c;}catch(_0x29e3cc){_0x3f7789=_0x29e3cc,await ft(0x64);}throw Error(['Timed\x20out\x20waiting\x20for\x20daemon\x20startup\x20after\x20'+_0x5ec52e+'ms',_0x1fefd4(0x206)+_0x17ceee[_0x1fefd4(0x1ff)]+'\x20'+_0x17ceee['args'][_0x1fefd4(0x2d0)]('\x20'),_0x1fefd4(0x1ac)+dt(_0x3f7789)][_0x1fefd4(0x2d0)](';\x20'));}async function He(_0x187a63={}){const _0x258533=_0x49ba2f;let _0x2413b2=C(_0x187a63[_0x258533(0x20b)]??_0x33ed65['env']);try{return $e(await T({..._0x187a63,'autoStart':!0x1}),_0x2413b2);}catch(_0x2dfebc){return rt(_0x2413b2)?tt(_0x2413b2,_0x2dfebc):et(_0x2413b2);}}async function Ue(_0x392a54={}){return await E(_0x392a54);}async function We(_0x213d19={}){const _0x580b6a=_0x49ba2f;let _0x1c8450=C(_0x213d19[_0x580b6a(0x20b)]??_0x33ed65['env']);try{await D({'jsonrpc':_0x580b6a(0x187),'id':k(),'method':x['Shutdown']},{..._0x213d19,'autoStart':!0x1});}catch{await ot(_0x1c8450[_0x580b6a(0x1cf)]),await _0x19d029(_0x1c8450[_0x580b6a(0x2db)],{'force':!0x0})[_0x580b6a(0x301)](()=>void 0x0),await _0x19d029(_0x1c8450[_0x580b6a(0x2a4)],{'force':!0x0})[_0x580b6a(0x301)](()=>void 0x0),await _0x19d029(_0x1c8450['lockPath'],{'recursive':!0x0,'force':!0x0})[_0x580b6a(0x301)](()=>void 0x0);return;}let _0x42a4fc=Date[_0x580b6a(0x319)]()+(_0x213d19['startTimeoutMs']??Be);for(;Date[_0x580b6a(0x319)]()<_0x42a4fc;){if(!at(_0x1c8450[_0x580b6a(0x1cf)])&&!_0x2cca8f(_0x1c8450[_0x580b6a(0x2db)])&&!_0x2cca8f(_0x1c8450[_0x580b6a(0x2a4)]))return;await ft(0x64);}throw Error(_0x580b6a(0x31b));}async function Ge(_0x17a778,_0x238801,_0x833b72={}){const _0xac0173=_0x49ba2f;return await E(_0x833b72),await D({'jsonrpc':_0xac0173(0x187),'id':k(),'method':x['SessionLoadWorkbook'],'params':{'workbookPath':_0x17a778,'workbookData':_0x238801,'cwd':_0x833b72['cwd']}},_0x833b72);}async function Ke(_0x16f179,_0x57dbeb,_0x2f543f={}){const _0x267bd6=_0x49ba2f;return await E(_0x2f543f),await D({'jsonrpc':_0x267bd6(0x187),'id':k(),'method':x[_0x267bd6(0x25b)],'params':{'workbookPath':_0x16f179,'cwd':_0x2f543f[_0x267bd6(0x1bb)],'baseWorkbookData':_0x57dbeb['baseWorkbookData'],'mutations':_0x57dbeb[_0x267bd6(0x29c)]}},_0x2f543f);}async function qe(_0x20ce5c,_0x37314e={}){const _0x387b26=_0x49ba2f;return await E(_0x37314e),await D({'jsonrpc':_0x387b26(0x187),'id':k(),'method':x['SessionGetWorkbook'],'params':{'workbookPath':_0x20ce5c,'cwd':_0x37314e[_0x387b26(0x1bb)]}},_0x37314e);}async function Je(_0x8b483a,_0x56b0d1={}){const _0x159bfd=_0x49ba2f;return await E(_0x56b0d1),await D({'jsonrpc':_0x159bfd(0x187),'id':k(),'method':x['SessionCreateWorkbook'],'params':{'workbookPath':_0x8b483a,'cwd':_0x56b0d1[_0x159bfd(0x1bb)],'id':_0x56b0d1['id'],'name':_0x56b0d1[_0x159bfd(0x314)]}},_0x56b0d1);}async function Ye(_0x5b2aae,_0x3368cf,_0x287f47={}){const _0x57e1be=_0x49ba2f;return await E(_0x287f47),await D({'jsonrpc':'2.0','id':k(),'method':x[_0x57e1be(0x24a)],'params':{'workbookPath':_0x5b2aae,'code':_0x3368cf,'cwd':_0x287f47['cwd'],'mutates':_0x287f47[_0x57e1be(0x1fe)]}},_0x287f47);}async function Xe(_0x45e907,_0x17a595={}){const _0x450123=_0x49ba2f;return await E(_0x17a595),await D({'jsonrpc':_0x450123(0x187),'id':k(),'method':x['SessionExportWorkbookData'],'params':{'workbookPath':_0x45e907,'cwd':_0x17a595[_0x450123(0x1bb)]}},_0x17a595);}async function Ze(_0x4b7632,_0x334c65,_0x2781da={}){const _0x50dcce=_0x49ba2f;return await E(_0x2781da),await D({'jsonrpc':_0x50dcce(0x187),'id':k(),'method':x[_0x50dcce(0x2cf)],'params':{'workbookPath':_0x4b7632,'cwd':_0x2781da[_0x50dcce(0x1bb)],'format':_0x334c65[_0x50dcce(0x1f8)],'outputPath':_0x334c65[_0x50dcce(0x1da)]}},_0x2781da);}async function Qe(_0x2c6b88,_0x1f2f73={}){const _0x5c9c17=_0x49ba2f;return await E(_0x1f2f73),await D({'jsonrpc':_0x5c9c17(0x187),'id':k(),'method':x['SessionDispose'],'params':{'workbookPath':_0x2c6b88,'cwd':_0x1f2f73[_0x5c9c17(0x1bb)]}},_0x1f2f73);}async function D(_0x328785,_0x96234){const _0x5db691=_0x49ba2f;return await _0x558b65[_0x5db691(0x23e)]({'name':_0x40871f['DaemonRpcClient'],'kind':_0x5db691(0x278)},async()=>{const _0x24f5a5=_0x5db691;let _0x4fafd4=C(_0x96234['env']??_0x33ed65[_0x24f5a5(0x20b)]);w(_0x4fafd4[_0x24f5a5(0x1cf)])||await _0x59f796(_0x4fafd4['socketPath'],_0x318215['F_OK']);let _0x12027f=await ct(_0x4fafd4[_0x24f5a5(0x1cf)],{..._0x328785,'meta':_0x558b65['injectMeta'](_0x328785[_0x24f5a5(0x2a6)])},_0x96234[_0x24f5a5(0x2de)]??Ve);if(_0x12027f[_0x24f5a5(0x188)])throw Error(_0x12027f[_0x24f5a5(0x188)][_0x24f5a5(0x229)]);return _0x12027f[_0x24f5a5(0x1c8)];});}function $e(_0x3c539c,_0x14cddc){const _0x136a49=_0x49ba2f;return{'ok':!0x0,'daemon':{'state':_0x136a49(0x19d),'pid':_0x3c539c[_0x136a49(0x22c)],'runtimeRoot':_0x3c539c[_0x136a49(0x1e0)],'socketPath':_0x3c539c['socketPath'],'startedAt':_0x3c539c['startedAt'],'sessionCount':_0x3c539c['sessionCount'],'buildId':_0x3c539c[_0x136a49(0x1e7)]},'paths':O(_0x14cddc),'next':[{'command':_0x136a49(0x22a),'reason':_0x136a49(0x1a1)}],'diagnostics':[]};}function et(_0x493f42){return{'ok':!0x0,'daemon':nt('stopped',_0x493f42),'paths':O(_0x493f42),'next':[{'command':'univer\x20daemon\x20start','reason':'daemon\x20is\x20stopped'}],'diagnostics':[]};}function tt(_0x4232a0,_0xa62a06){const _0x18c898=_0x49ba2f;return{'ok':!0x0,'daemon':nt(_0x18c898(0x201),_0x4232a0),'paths':O(_0x4232a0),'next':[{'command':_0x18c898(0x22a),'reason':_0x18c898(0x1b3)},{'command':_0x18c898(0x241),'reason':_0x18c898(0x190)}],'diagnostics':[{'message':_0xa62a06 instanceof Error?_0xa62a06['message']:String(_0xa62a06)}]};}function nt(_0x328744,_0x3355ca){const _0x30bcf2=_0x49ba2f;return{'state':_0x328744,'pid':null,'runtimeRoot':_0x3355ca['homeDir'],'socketPath':_0x3355ca[_0x30bcf2(0x1cf)],'startedAt':null,'sessionCount':0x0,'buildId':null};}function O(_0x2b56c6){const _0x46fb3d=_0x49ba2f;return{'metaPath':_0x2b56c6[_0x46fb3d(0x2a4)],'lockPath':_0x2b56c6['lockPath']};}function rt(_0x1cdeb5){const _0x22995d=_0x49ba2f;return at(_0x1cdeb5[_0x22995d(0x1cf)])||_0x2cca8f(_0x1cdeb5[_0x22995d(0x2db)])||_0x2cca8f(_0x1cdeb5[_0x22995d(0x2a4)]);}async function it(_0xee932c,_0x5d4ec7,_0x1eb6eb){const _0xe432b4=_0x49ba2f;let _0x37dae8=st(_0x1eb6eb);return _0xf1fc58(C(_0xee932c)[_0xe432b4(0x1dc)],{'recursive':!0x0,'mode':0x1c0}),_0x5849f1(_0x37dae8[_0xe432b4(0x1ff)],_0x37dae8[_0xe432b4(0x1ab)],{..._0x37dae8[_0xe432b4(0x1bb)]===void 0x0?{}:{'cwd':_0x37dae8[_0xe432b4(0x1bb)]},'detached':!0x0,'stdio':[_0xe432b4(0x30f),'ignore',_0xe432b4(0x30f)],'env':ut(_0xee932c,_0x5d4ec7)})['unref'](),_0x37dae8;}function at(_0x5ef8b7){return w(_0x5ef8b7)?!0x1:_0x2cca8f(_0x5ef8b7);}async function ot(_0x4d017a){w(_0x4d017a)||await _0x19d029(_0x4d017a,{'force':!0x0})['catch'](()=>void 0x0);}function st(_0x3fbed9){const _0x1e508d=_0x49ba2f;if(_0x3fbed9===void 0x0)throw Error(_0x1e508d(0x20a));return{'command':_0x3fbed9[_0x1e508d(0x1ff)]??_0x33ed65[_0x1e508d(0x210)],..._0x3fbed9[_0x1e508d(0x1bb)]===void 0x0?{}:{'cwd':_0x3fbed9[_0x1e508d(0x1bb)]},'args':[..._0x3fbed9[_0x1e508d(0x18a)]??[],_0x3fbed9[_0x1e508d(0x2ea)],..._0x3fbed9[_0x1e508d(0x1ab)]??[_0x1e508d(0x24e)]][_0x1e508d(0x1f5)](String)};}async function ct(_0x2bb3ec,_0x8ecb20,_0x452e9a){return await new Promise((_0xefa6ad,_0x55536a)=>{let _0x334436=_0x140e39['createConnection'](_0x2bb3ec),_0x27cbc1='',_0x2b2660=setTimeout(()=>{const _0x739921=_0x3740;_0x334436['destroy'](),_0x55536a(Error(_0x739921(0x2bb)+_0x8ecb20['method']));},_0x452e9a);_0x334436['on']('connect',()=>{const _0x5d203b=_0x3740;_0x334436[_0x5d203b(0x27a)](JSON[_0x5d203b(0x260)](_0x8ecb20)+'\x0a');}),_0x334436['on']('data',_0x173d74=>{const _0x5bbd65=_0x3740;_0x27cbc1+=_0x173d74[_0x5bbd65(0x303)](_0x5bbd65(0x1a5));let _0x486db1=_0x27cbc1['indexOf']('\x0a');_0x486db1<0x0||(clearTimeout(_0x2b2660),_0x334436[_0x5bbd65(0x1e1)](),_0xefa6ad(JSON[_0x5bbd65(0x261)](_0x27cbc1[_0x5bbd65(0x2c3)](0x0,_0x486db1)[_0x5bbd65(0x274)]())));}),_0x334436['on']('error',_0x4ea53c=>{clearTimeout(_0x2b2660),_0x55536a(_0x4ea53c);});});}function lt(_0x2e9f6f,_0x2758db){const _0x2f191a=_0x49ba2f;if(_0x2e9f6f!==_0x2758db)throw Error(_0x2f191a(0x31a)+_0x2e9f6f+_0x2f191a(0x1b8)+_0x2758db+'.\x20Run\x20`univer\x20daemon\x20stop`\x20and\x20retry.');}function ut(_0x4a8971,_0x4ca8fb){const _0x46eac7=_0x49ba2f;let _0x236838={..._0x4a8971,'UNIVER_DAEMON_BUILD_ID_OVERRIDE':_0x4ca8fb};return delete _0x236838['NODE_OPTIONS'],delete _0x236838['VITEST'],delete _0x236838[_0x46eac7(0x2f6)],delete _0x236838[_0x46eac7(0x184)],_0x236838;}function _0x1f74(){const _0x5527eb=['export-workbook-file',',\x20got\x20','isAlive','onStderrChunk','cwd','./build-id-BAjJE5TZ.js','autoStart','unknown','312929EnzVjj','UNIVER_CLI_BUILD_ID','WorkbookPackageLockTimeoutError','flush','UNIVER_CLI_RUNTIME_MODE','scheduleRotationIfNeeded','getManifest','rotationCheckIntervalMs','session.loadWorkbook','result','getSession','mutation\x20must\x20be\x20an\x20object','writeOptions','destroyAll','cli','resolveIdentity','socketPath','finally','LoadWorkbook','active','stderr.log','ensureSession','touchedFiles','WorkbookPackageFileInvalidError','WorkbookPackageAlreadyExistsError','packaged','.lock','outputPath','resolve','daemonDir','bin','stderr','exportWorkbookData','runtimeRoot','end','package.json','data','formatStderr','create-workbook','../..','buildId','set-manifest','spanId','warn','1424040HhRWZi','send','.univer','startsWith','sessionId','logFields','loadReplayPack','EvalJs','appendLocalMutations','execution-plane','map','append-local-mutations','appendSyncedChangesets','format','session.exportWorkbookData','appendLocalChangeset','idle-unload','daemon.meta.json','sessionExportWorkbookFile','mutates','command','Workbook\x20package\x20already\x20exists:\x20','unreachable','debug','replaceLocalMutations','endsWith','.sock','entry:\x20','dist','RuntimeSessionDisposed','RPC\x20timeout','Daemon\x20process\x20entry\x20is\x20not\x20configured.\x20Pass\x20DaemonClientOptions.daemonEntry\x20from\x20the\x20CLI\x20runtime\x20manifest.','env','emit','touchSession','replaceLocalChangesets','WorkbookPackageFileMissingError','execPath','ERR_WORKBOOK_PACKAGE_FILE_MISSING','RuntimeRunner','.tx-','initRev','process_role','clear','rejectPendingRequests','replace-synced-changesets','initialize','string','replaceSyncedChangesets','replace-local-mutations','sessionRoot','workbook\x20data\x20must\x20be\x20an\x20object','destroying','119270rxsHaG','from','daemon.js','lockRetryIntervalMs','loadReplayPackIntoSession','exit','maxBytes','getSessionIdleTtlMs','toRuntimeSessionInfo','message','univer\x20daemon\x20stop','sessionIdleTtlMs','pid','Missing\x20workbook\x20package\x20file:\x20','revision','off','resolveWorkbookIdentity','apps','manifest','get','replace','unitID\x20must\x20be\x20a\x20string\x20or\x20null','object','unref','transaction','CreateWorkbook','daemon.health','type','delete','Invalid\x20workbook\x20package\x20path:\x20','withSpan','pendingRequests','status','univer\x20daemon\x20start','synced-changesets.jsonl','manifest\x20must\x20be\x20an\x20object','exitCode','min','stack','relativePath','drain','split','SessionEvalJs','replace-local-changesets','event','extension','serve','replayPack','initRev\x20must\x20be\x20a\x20non-negative\x20integer\x20or\x20null','synced\x20changeset.baseRev\x20must\x20be\x20a\x20non-negative\x20integer','eval-js','RuntimeRunnerExit','run-help','logs','load-workbook-replay-pack','ERR_INVALID_WORKBOOK_PACKAGE_PATH','--import','dispose','toISOString','SessionLoadWorkbookDataReplayPack','starting','destroyGraceMs','invalid\x20JSONL\x20at\x20line\x20','Missing\x20transaction\x20value\x20for\x20','stringify','parse','ERR_WORKBOOK_PACKAGE_LOCK_TIMEOUT','local\x20changeset','browser','archive','kill','once','isFinite','workbookData','max','saturated','univer-runner.js','isProcessAlive','createWorkbook','topics','session.loadWorkbookDataReplayPack','univer','src','UNIVER_CLI_VERSION','trim','traceId','loadWorkbookData','localMutations','client','sessions','write','exited','UNIVER_HOME','all','.tmp-','HOME','options','Runner\x20not\x20ready','daemon.jsonl','setInitWorkbookData','tsx','baseRev','workbookId','default','univer-daemon-','Runtime','isArray','sessionExportWorkbookData','main.ts','Runner\x20startup\x20error:\x20','view','executionPlanePath','length','ENOENT','synced\x20changeset.mutations\x20must\x20be\x20an\x20array','created','code','unloadIdleSessions','parentSpanId','getInitWorkbookData','WorkbookPackageTransactionError','sort','local\x20changeset.mutations\x20must\x20be\x20an\x20array','random','mutations','createdAt','local\x20changeset.message\x20must\x20be\x20a\x20string','ExportWorkbookFile','.ts','workbookName','cliLogPath','holder','metaPath','waitForReady','meta','getSessionCount','rotationInFlight','ready','closeAfterFlush','mutation.id\x20must\x20be\x20a\x20non-empty\x20string','identity','evalJs','takeWrites','viewHostLogPath','absolutePath','SIGTERM','add','getLocalMutations','manifest.json','sid','reverse','synced\x20changeset','signalCode','daemon','Workbook\x20package\x20is\x20busy:\x20','Daemon\x20RPC\x20timeout\x20for\x20','Runner\x20exited\x20before\x20ready','univer-','ensureSessionState','RuntimeSessionCreated','localChangesets','EEXIST','set','slice','session.createWorkbook','\x20(pid\x20','\x5c\x5c.\x5cpipe\x5c','daemon.sock','append-local-changeset','cli.jsonl','exists','startTimeoutMs','getSyncedChangesets','daemonLogPath','local','SessionExportWorkbookFile','join','sessionDir','originalContent','isInteger','cli.js','workspace-dist','runner','index.ts','syncedChangesets','session',',\x20signal=','pidPath','resolveExecutionPlaneOptions','runtime','rpcTimeoutMs','InvalidWorkbookPackagePathError','null','init-workbook-data.json','daemon.lock',';\x20rollback\x20failed:\x20','committing','ExportWorkbookData','append-synced-changesets','fields','loadWorkbook','1926fmYQKJ','modulePath','params','8133398MZUavs','size','USERPROFILE','source','Runner\x20process\x20exited\x20(code=','logger','getLocalChangesets','sha1','lastAccessedAt','daemon-','VITEST_POOL_ID','beforeCommitFile','ERR_WORKBOOK_PACKAGE_FILE_INVALID','ipc','LoadWorkbookDataReplayPack','allSettled','workbookIdentity','win32','runtimeLogPath','sendRpc','packages','catch','prefix','toString','isFile','view-host','destination','sessionLoadWorkbook','SIGKILL','child','workbookPath','destroy','serializeTouchedFile','destroySession','syncedRev','ignore','10wlVNYW','reqId','4292565UyQNSq','closed','name','logPath','Cannot\x20resolve\x20home\x20directory\x20for\x20UNIVER_HOME\x20fallback','load-workbook','synced\x20changeset.message\x20must\x20be\x20a\x20string\x20when\x20present','now','Daemon\x20build\x20mismatch.\x20Expected\x20','Daemon\x20did\x20not\x20stop\x20before\x20timeout','RuntimeSession','value','internal','committed','filter','info','initWorkbookData','fromAbsolutePath','daemonOptions','Workbook\x20package\x20transaction\x20failed\x20for\x20','baseWorkbookData','session.exportWorkbookFile','VITEST_WORKER_ID','values','platform','2.0','error','UNIVER_DAEMON_SESSION_IDLE_TTL_MS','execArgv','hostname','component','ERR_WORKBOOK_PACKAGE_ALREADY_EXISTS','isDirectory','local-changesets.jsonl','start\x20a\x20fresh\x20daemon','Runner\x20startup\x20timeout','2wnJOTs','UNIVER_DISTRIBUTION_CHANNEL','archiveDir','lockWrites','lockTimeoutMs','ensureWorkbookDataReplayPackLoaded','1093308OGLVWz','maxArchiveFiles','loadWorkbookDataReplayPack','daemonEntry','exportWorkbookFile','running','setManifest','open','Health','daemon\x20is\x20running','basePackage','number','session.evalJs','utf8','3350212HUflVO','Invalid\x20workbook\x20package\x20file\x20','mutation.params\x20must\x20be\x20an\x20object','sessionEvalJs','.mutations[','args','last\x20health\x20error:\x20','rotateIfNeeded','sessionCreateWorkbook','rpc-request','Unable\x20to\x20resolve\x20univer-cli\x20package\x20root\x20from\x20','syncedRev\x20must\x20be\x20a\x20non-negative\x20integer\x20or\x20null','nextRotationCheckAt','clear\x20stale\x20daemon\x20runtime\x20files','sizeBytes','timeout','runtime.jsonl'];_0x1f74=function(){return _0x5527eb;};return _0x1f74();}function dt(_0x208869){const _0x588e52=_0x49ba2f;return _0x208869 instanceof Error?_0x208869[_0x588e52(0x229)]:String(_0x208869);}function k(){const _0x21e9f1=_0x49ba2f;return _0x21e9f1(0x2f5)+Date[_0x21e9f1(0x319)]()['toString'](0x24)+'-'+Math[_0x21e9f1(0x29b)]()[_0x21e9f1(0x303)](0x10)[_0x21e9f1(0x2c3)](0x2,0x8);}async function ft(_0x13f1e2){await new Promise(_0x4ebe00=>{setTimeout(_0x4ebe00,_0x13f1e2);});}var pt=0x1388,mt=0xea60,ht=class extends _0x5e0898{['child'];['destroyGraceMs'];[_0x49ba2f(0x23f)]=new Map();[_0x49ba2f(0x2de)];[_0x49ba2f(0x1de)]='';[_0x49ba2f(0x240)]=_0x49ba2f(0x25c);constructor(_0x27636f,_0x19ce4c){const _0x313c9c=_0x49ba2f;super(),this[_0x313c9c(0x1ef)]=_0x27636f,this[_0x313c9c(0x25d)]=_0x19ce4c['destroyGraceMs']??pt,this[_0x313c9c(0x2de)]=_0x19ce4c[_0x313c9c(0x2de)]??mt,this[_0x313c9c(0x309)]=_0x481162(_0x19ce4c[_0x313c9c(0x28f)],[],{'cwd':_0x19ce4c[_0x313c9c(0x1bb)],'env':{...process.env,..._0x19ce4c[_0x313c9c(0x20b)],'UNIVER_SESSION_ID':_0x27636f},'execArgv':_0x19ce4c[_0x313c9c(0x18a)],'stdio':[_0x313c9c(0x30f),_0x313c9c(0x30f),'pipe',_0x313c9c(0x2f9)]}),this[_0x313c9c(0x309)][_0x313c9c(0x1de)]?.['on'](_0x313c9c(0x1e3),_0x483c3b=>{const _0x1401d3=_0x313c9c;this[_0x1401d3(0x1de)]+=_0x483c3b[_0x1401d3(0x303)](),_0x19ce4c[_0x1401d3(0x1ba)]?.(_0x483c3b);}),this[_0x313c9c(0x309)]['on'](_0x313c9c(0x229),_0x13c154=>{const _0x2345ca=_0x313c9c;if(_0x13c154[_0x2345ca(0x23b)]===_0x2345ca(0x2a9)&&(this[_0x2345ca(0x240)]='ready',this[_0x2345ca(0x20c)](_0x2345ca(0x2a9))),_0x13c154[_0x2345ca(0x23b)]==='rpc-response'&&_0x13c154['id']!==void 0x0&&_0x13c154[_0x2345ca(0x1e3)]){let _0x3bf07a=this[_0x2345ca(0x23f)]['get'](_0x13c154['id']);if(!_0x3bf07a)return;clearTimeout(_0x3bf07a[_0x2345ca(0x1b5)]),this[_0x2345ca(0x23f)][_0x2345ca(0x23c)](_0x13c154['id']),_0x3bf07a[_0x2345ca(0x1db)](_0x13c154[_0x2345ca(0x1e3)]);}}),this[_0x313c9c(0x309)]['on'](_0x313c9c(0x225),(_0x5012c6,_0x567589)=>{const _0x4a987d=_0x313c9c;this[_0x4a987d(0x240)]='exited',this[_0x4a987d(0x217)](Error(_0x4a987d(0x2f0)+(_0x5012c6??'null')+_0x4a987d(0x2da)+(_0x567589??_0x4a987d(0x2e0))+')'+this[_0x4a987d(0x1e4)]())),this[_0x4a987d(0x20c)](_0x4a987d(0x225),_0x5012c6,_0x567589);}),this[_0x313c9c(0x309)]['on'](_0x313c9c(0x188),_0x503471=>{const _0xa075bc=_0x313c9c;this[_0xa075bc(0x20c)](_0xa075bc(0x188),_0x503471);});}['destroy'](){const _0x1fb8ad=_0x49ba2f;this[_0x1fb8ad(0x240)]===_0x1fb8ad(0x21f)||this['status']===_0x1fb8ad(0x27b)||(this[_0x1fb8ad(0x240)]=_0x1fb8ad(0x21f),this[_0x1fb8ad(0x309)][_0x1fb8ad(0x266)](_0x1fb8ad(0x2b1)),setTimeout(()=>{const _0x495bb2=_0x1fb8ad;this[_0x495bb2(0x309)]['exitCode']===null&&this[_0x495bb2(0x309)]['kill'](_0x495bb2(0x308));},this[_0x1fb8ad(0x25d)])[_0x1fb8ad(0x237)]());}[_0x49ba2f(0x1b9)](){const _0x31d833=_0x49ba2f;return this[_0x31d833(0x309)][_0x31d833(0x244)]===null&&this['child'][_0x31d833(0x2b8)]===null;}async[_0x49ba2f(0x2ff)](_0x3965b6,_0x58d09d){const _0x41fe54=_0x49ba2f;if(this['status']!==_0x41fe54(0x2a9))throw Error(_0x41fe54(0x281));let _0x377453=_0x58d09d?.['timeoutMs']??this[_0x41fe54(0x2de)];return new Promise((_0x25e0b7,_0x5ea4ba)=>{const _0x21b590=_0x41fe54;let _0x2460c6=setTimeout(()=>{const _0x381dc6=_0x3740;this[_0x381dc6(0x23f)][_0x381dc6(0x23c)](_0x3965b6['id']),_0x5ea4ba(Error(_0x381dc6(0x209)));},_0x377453);this[_0x21b590(0x23f)]['set'](_0x3965b6['id'],{'resolve':_0x25e0b7,'reject':_0x5ea4ba,'timeout':_0x2460c6}),this[_0x21b590(0x309)][_0x21b590(0x1ec)]({'type':_0x21b590(0x1af),'id':_0x3965b6['id'],'data':{..._0x3965b6,'meta':_0x558b65['injectMeta'](_0x3965b6[_0x21b590(0x2a6)])}});});}async[_0x49ba2f(0x2a5)](_0x2a7a24=0x7530){const _0x1b9265=_0x49ba2f;if(this['status']!=='ready'){if(!this[_0x1b9265(0x1b9)]())throw Error(_0x1b9265(0x2bc)+this['formatStderr']());return await new Promise((_0x1ee0ca,_0x385e0c)=>{const _0x5e5d1a=_0x1b9265;let _0x4c43c5=()=>{const _0x2e7781=_0x3740;clearTimeout(_0x1d8ad9),this[_0x2e7781(0x22f)](_0x2e7781(0x2a9),_0x357b64),this['off']('exit',_0x498193),this[_0x2e7781(0x22f)]('error',_0x444bce);},_0x357b64=()=>{_0x4c43c5(),_0x1ee0ca();},_0x498193=()=>{const _0xb8aa4a=_0x3740;_0x4c43c5(),_0x385e0c(Error(_0xb8aa4a(0x2bc)+this[_0xb8aa4a(0x1e4)]()));},_0x444bce=_0x56046a=>{const _0x14f0b0=_0x3740;_0x4c43c5(),_0x385e0c(Error(_0x14f0b0(0x28d)+_0x56046a['message']));},_0x1d8ad9=setTimeout(()=>{const _0x5560c6=_0x3740;_0x4c43c5(),_0x385e0c(Error(_0x5560c6(0x191)));},_0x2a7a24);this['once'](_0x5e5d1a(0x2a9),_0x357b64),this['once']('exit',_0x498193),this[_0x5e5d1a(0x267)](_0x5e5d1a(0x188),_0x444bce);});}}['formatStderr'](){const _0x2a5455=_0x49ba2f;let _0x3b94e4=this[_0x2a5455(0x1de)]['trim']();return _0x3b94e4['length']===0x0?'':'\x0a'+_0x3b94e4;}[_0x49ba2f(0x217)](_0x18d119){const _0x28400b=_0x49ba2f;for(let _0x42a0d6 of this[_0x28400b(0x23f)]['values']())clearTimeout(_0x42a0d6[_0x28400b(0x1b5)]),_0x42a0d6['reject'](_0x18d119);this[_0x28400b(0x23f)][_0x28400b(0x216)]();}};let A=function(_0x1c53b4){const _0x233956=_0x49ba2f;return _0x1c53b4[_0x233956(0x239)]='createWorkbook',_0x1c53b4[_0x233956(0x1f2)]='evaljs',_0x1c53b4[_0x233956(0x29f)]=_0x233956(0x19c),_0x1c53b4[_0x233956(0x2e5)]=_0x233956(0x1df),_0x1c53b4[_0x233956(0x1d1)]=_0x233956(0x2e8),_0x1c53b4[_0x233956(0x2fa)]=_0x233956(0x19a),_0x1c53b4;}({});var gt=0x384*0x3e8,_t=class{[_0x49ba2f(0x20b)];['logger'];[_0x49ba2f(0x2dc)];[_0x49ba2f(0x279)]=new Map();[_0x49ba2f(0x22b)];constructor(_0x293c69){const _0x1ed5e5=_0x49ba2f;this[_0x1ed5e5(0x20b)]=_0x293c69['env']??process.env,this[_0x1ed5e5(0x2f1)]=_0x293c69[_0x1ed5e5(0x2f1)]??new ge(),this[_0x1ed5e5(0x2dc)]=_0x293c69[_0x1ed5e5(0x2dc)],this[_0x1ed5e5(0x22b)]=_0x293c69[_0x1ed5e5(0x22b)]??vt(this['env'],gt);}[_0x49ba2f(0x2a7)](){const _0x3732b6=_0x49ba2f;return this[_0x3732b6(0x279)][_0x3732b6(0x2ed)];}[_0x49ba2f(0x227)](){return this['sessionIdleTtlMs'];}async[_0x49ba2f(0x1c9)](_0xd918d3){const _0x3cabcd=_0x49ba2f;let _0x326c6c=await this[_0x3cabcd(0x230)](_0xd918d3[_0x3cabcd(0x2ac)]['absolutePath']),_0x46df5d=this[_0x3cabcd(0x279)][_0x3cabcd(0x233)](_0x326c6c);return _0x46df5d?this[_0x3cabcd(0x228)](_0x46df5d,_0xd918d3[_0x3cabcd(0x2ac)]):null;}async[_0x49ba2f(0x26e)](_0x28d3a3){const _0x279323=_0x49ba2f;let _0x3423b6=await this[_0x279323(0x1d4)](_0x28d3a3[_0x279323(0x2ac)][_0x279323(0x2b0)]),_0x2f9a5f=await _0x3423b6[_0x279323(0x2d6)][_0x279323(0x2ff)]({'jsonrpc':_0x279323(0x187),'id':N(_0x3423b6['sessionId']),'method':A[_0x279323(0x239)],'params':{'id':_0x28d3a3['workbookId'],'name':_0x28d3a3[_0x279323(0x2a1)]}});if(_0x2f9a5f[_0x279323(0x188)])throw Error(_0x2f9a5f[_0x279323(0x188)][_0x279323(0x229)]);return await this['touchSession'](_0x3423b6,_0x279323(0x1e5)),{'session':this[_0x279323(0x228)](_0x3423b6,_0x28d3a3['identity']),'workbookData':_0x2f9a5f[_0x279323(0x1c8)][_0x279323(0x269)]};}async[_0x49ba2f(0x276)](_0x474775){const _0x51a99d=_0x49ba2f;let _0x141305=await this[_0x51a99d(0x1d4)](_0x474775[_0x51a99d(0x2ac)][_0x51a99d(0x2b0)]),_0x2a5f3f=await _0x141305[_0x51a99d(0x2d6)]['sendRpc']({'jsonrpc':_0x51a99d(0x187),'id':N(_0x141305[_0x51a99d(0x1ef)]),'method':A['LoadWorkbook'],'params':{'workbookData':_0x474775[_0x51a99d(0x269)]}});if(_0x2a5f3f[_0x51a99d(0x188)])throw Error(_0x2a5f3f['error'][_0x51a99d(0x229)]);return await this['touchSession'](_0x141305,_0x51a99d(0x317)),{'session':this[_0x51a99d(0x228)](_0x141305,_0x474775[_0x51a99d(0x2ac)]),'workbookData':_0x2a5f3f[_0x51a99d(0x1c8)][_0x51a99d(0x269)]};}async[_0x49ba2f(0x19a)](_0x407937){const _0x350a1e=_0x49ba2f;let _0x13906b=await this[_0x350a1e(0x1d4)](_0x407937['identity']['absolutePath']),_0x214287={'baseWorkbookData':_0x407937[_0x350a1e(0x24f)][_0x350a1e(0x182)],'mutations':_0x407937[_0x350a1e(0x24f)][_0x350a1e(0x29c)]},_0xf6ca37=await _0x13906b[_0x350a1e(0x2d6)][_0x350a1e(0x2ff)]({'jsonrpc':_0x350a1e(0x187),'id':N(_0x13906b[_0x350a1e(0x1ef)]),'method':A['LoadWorkbookDataReplayPack'],'params':_0x214287});if(_0xf6ca37['error'])throw Error(_0xf6ca37['error']['message']);return await this[_0x350a1e(0x20d)](_0x13906b,_0x350a1e(0x256)),{'session':this[_0x350a1e(0x228)](_0x13906b,_0x407937[_0x350a1e(0x2ac)]),'workbookData':_0xf6ca37[_0x350a1e(0x1c8)]['workbookData']};}async[_0x49ba2f(0x197)](_0x2b398a){const _0x3820b4=_0x49ba2f;let _0x83059b=await this[_0x3820b4(0x2be)](_0x2b398a['identity']['absolutePath']);if(!_0x83059b[_0x3820b4(0x293)])return await this[_0x3820b4(0x20d)](_0x83059b['session'],'ensure-workbook-replay-pack-loaded'),{'loaded':!0x1,'session':this[_0x3820b4(0x228)](_0x83059b[_0x3820b4(0x2d9)],_0x2b398a['identity'])};let _0x5d3c2c=await _0x2b398a[_0x3820b4(0x1f1)]();return await this[_0x3820b4(0x224)](_0x83059b['session'],_0x5d3c2c),await this[_0x3820b4(0x20d)](_0x83059b[_0x3820b4(0x2d9)],_0x3820b4(0x256)),{'loaded':!0x0,'session':this[_0x3820b4(0x228)](_0x83059b['session'],_0x2b398a['identity'])};}async[_0x49ba2f(0x2ad)](_0x2f8078){const _0x2f7450=_0x49ba2f;let _0xabe5f1=await this[_0x2f7450(0x1d4)](_0x2f8078[_0x2f7450(0x2ac)][_0x2f7450(0x2b0)]),_0x32bf35=await _0xabe5f1[_0x2f7450(0x2d6)][_0x2f7450(0x2ff)]({'jsonrpc':'2.0','id':N(_0xabe5f1[_0x2f7450(0x1ef)]),'method':A[_0x2f7450(0x1f2)],'params':{'code':_0x2f8078[_0x2f7450(0x294)],'mutates':_0x2f8078[_0x2f7450(0x1fe)]}});if(_0x32bf35[_0x2f7450(0x188)])throw Error(_0x32bf35[_0x2f7450(0x188)][_0x2f7450(0x229)]);await this['touchSession'](_0xabe5f1,_0x2f7450(0x252));let _0x114804=_0x32bf35[_0x2f7450(0x1c8)][_0x2f7450(0x29c)];return{..._0x114804===void 0x0?{}:{'mutations':_0x114804},'session':this[_0x2f7450(0x228)](_0xabe5f1,_0x2f8078['identity']),'value':_0x32bf35[_0x2f7450(0x1c8)][_0x2f7450(0x31d)]};}async[_0x49ba2f(0x1df)](_0x14cfc5){const _0x42115b=_0x49ba2f;let _0xa3834b=await this[_0x42115b(0x1d4)](_0x14cfc5[_0x42115b(0x2ac)][_0x42115b(0x2b0)]),_0x581e82=await _0xa3834b[_0x42115b(0x2d6)][_0x42115b(0x2ff)]({'jsonrpc':_0x42115b(0x187),'id':N(_0xa3834b[_0x42115b(0x1ef)]),'method':A[_0x42115b(0x2e5)]});if(_0x581e82[_0x42115b(0x188)])throw Error(_0x581e82[_0x42115b(0x188)]['message']);return await this['touchSession'](_0xa3834b,'export-workbook'),{'session':this[_0x42115b(0x228)](_0xa3834b,_0x14cfc5[_0x42115b(0x2ac)]),'workbookData':_0x581e82[_0x42115b(0x1c8)][_0x42115b(0x269)]};}async[_0x49ba2f(0x19c)](_0x22ec2c){const _0x2234eb=_0x49ba2f;let _0xf12f6b=await this[_0x2234eb(0x1d4)](_0x22ec2c[_0x2234eb(0x2ac)][_0x2234eb(0x2b0)]),_0x245f9f=await _0xf12f6b[_0x2234eb(0x2d6)][_0x2234eb(0x2ff)]({'jsonrpc':_0x2234eb(0x187),'id':N(_0xf12f6b[_0x2234eb(0x1ef)]),'method':A['ExportWorkbookFile'],'params':{'format':_0x22ec2c['format'],'outputPath':_0x22ec2c[_0x2234eb(0x1da)]}});if(_0x245f9f[_0x2234eb(0x188)])throw Error(_0x245f9f[_0x2234eb(0x188)][_0x2234eb(0x229)]);await this['touchSession'](_0xf12f6b,_0x2234eb(0x1b7));let _0x3e44b6=_0x245f9f[_0x2234eb(0x1c8)];return{'format':_0x3e44b6[_0x2234eb(0x1f8)],'outputPath':_0x3e44b6['outputPath'],'session':this[_0x2234eb(0x228)](_0xf12f6b,_0x22ec2c[_0x2234eb(0x2ac)]),'sizeBytes':_0x3e44b6['sizeBytes']};}async[_0x49ba2f(0x259)](_0x32ed48){const _0x355b87=_0x49ba2f;let _0xf1d766=await this['resolveWorkbookIdentity'](_0x32ed48[_0x355b87(0x2ac)][_0x355b87(0x2b0)]),_0x5df241=this['sessions'][_0x355b87(0x233)](_0xf1d766);_0x5df241&&await this[_0x355b87(0x30d)](_0x5df241,'explicit-dispose');}async[_0x49ba2f(0x295)](_0x2e9124=Date[_0x49ba2f(0x319)]()){const _0x4a28bb=_0x49ba2f;let _0xbf9f2d=Array[_0x4a28bb(0x221)](this['sessions'][_0x4a28bb(0x185)]());for(let _0x214802 of _0xbf9f2d)_0x2e9124-Date[_0x4a28bb(0x261)](_0x214802[_0x4a28bb(0x2f4)])<this[_0x4a28bb(0x22b)]||await this[_0x4a28bb(0x30d)](_0x214802,_0x4a28bb(0x1fb));}async[_0x49ba2f(0x1cc)](_0x52967d='shutdown'){const _0x44524f=_0x49ba2f;let _0x54025f=Array[_0x44524f(0x221)](this['sessions'][_0x44524f(0x185)]());for(let _0x472d11 of _0x54025f)await this[_0x44524f(0x30d)](_0x472d11,_0x52967d);}async[_0x49ba2f(0x230)](_0x21b554){try{return await _0xa08057(_0x21b554);}catch{return _0x21b554;}}async[_0x49ba2f(0x1d4)](_0x3932d6){const _0x231254=_0x49ba2f;return(await this[_0x231254(0x2be)](_0x3932d6))[_0x231254(0x2d9)];}async[_0x49ba2f(0x2be)](_0x5a0d96){const _0xbbe8a0=_0x49ba2f;let _0x460ca7=await this['resolveWorkbookIdentity'](_0x5a0d96),_0x58b982=this[_0xbbe8a0(0x279)][_0xbbe8a0(0x233)](_0x460ca7);if(_0x58b982)return{'created':!0x1,'session':_0x58b982};let _0x4886e6=yt(),_0x2c8dd8=Re(_0x4886e6,this['env']);await _0x378b2c(_0x2c8dd8[_0xbbe8a0(0x2d1)],{'recursive':!0x0,'mode':0x1c0});let _0x4cae06=this[_0xbbe8a0(0x2dc)](bt(this[_0xbbe8a0(0x2dc)])),_0x2e12c4=new ht(_0x4886e6,{'cwd':xt(_0x4cae06['modulePath']),'env':Object['fromEntries'](Object['entries'](this[_0xbbe8a0(0x20b)])[_0xbbe8a0(0x320)](_0x519b23=>_0x519b23[0x1]!==void 0x0)),'execArgv':_0x4cae06['execArgv'],'executionPlanePath':_0x4cae06[_0xbbe8a0(0x2ea)],'onStderrChunk':_0x41fe21=>{const _0x106af1=_0xbbe8a0;Ae(_0x2c8dd8['stderrPath'],_0x41fe21[_0x106af1(0x303)]()['trimEnd']());}});await _0x2e12c4[_0xbbe8a0(0x2a5)]();let _0x35dc1e={'sessionId':_0x4886e6,'workbookIdentity':_0x460ca7,'createdAt':new Date()[_0xbbe8a0(0x25a)](),'lastAccessedAt':new Date()[_0xbbe8a0(0x25a)](),'runner':_0x2e12c4,'paths':_0x2c8dd8};return _0x2e12c4['on'](_0xbbe8a0(0x225),()=>{const _0x27c3a0=_0xbbe8a0;this[_0x27c3a0(0x2f1)][_0x27c3a0(0x1ea)]({'event_name':_0x67b335[_0x27c3a0(0x253)],'component':_0x3d8a60[_0x27c3a0(0x212)],'process_role':_0x1b86c2[_0x27c3a0(0x289)],'fields':{...j(this[_0x27c3a0(0x20b)],_0x4886e6),'session_id':_0x4886e6,'workbook_identity':_0x460ca7}}),this[_0x27c3a0(0x2f1)][_0x27c3a0(0x1c2)](),this['destroySession'](_0x35dc1e,'runner-exit');}),this['sessions'][_0xbbe8a0(0x2c2)](_0x460ca7,_0x35dc1e),this['logger']['info']({'event_name':_0x67b335[_0xbbe8a0(0x2bf)],'component':_0x3d8a60[_0xbbe8a0(0x31c)],'process_role':_0x1b86c2[_0xbbe8a0(0x289)],'fields':{...j(this[_0xbbe8a0(0x20b)],_0x4886e6),'created_at':_0x35dc1e[_0xbbe8a0(0x29d)],'session_id':_0x4886e6,'workbook_identity':_0x460ca7}}),await this['logger'][_0xbbe8a0(0x1c2)](),{'created':!0x0,'session':_0x35dc1e};}async[_0x49ba2f(0x224)](_0x48f015,_0x2923f0){const _0x271c4b=_0x49ba2f;let _0x33e5e4={'baseWorkbookData':_0x2923f0[_0x271c4b(0x182)],'mutations':_0x2923f0[_0x271c4b(0x29c)]},_0x102d8a=await _0x48f015[_0x271c4b(0x2d6)][_0x271c4b(0x2ff)]({'jsonrpc':_0x271c4b(0x187),'id':N(_0x48f015[_0x271c4b(0x1ef)]),'method':A['LoadWorkbookDataReplayPack'],'params':_0x33e5e4});if(_0x102d8a['error'])throw Error(_0x102d8a[_0x271c4b(0x188)]['message']);return _0x102d8a['result'][_0x271c4b(0x269)];}async['touchSession'](_0x10a24f,_0x307393){const _0x3c6a39=_0x49ba2f;_0x10a24f[_0x3c6a39(0x2f4)]=new Date()['toISOString'](),this[_0x3c6a39(0x2f1)]['info']({'event_name':_0x67b335['RuntimeSessionCreated'],'component':_0x3d8a60[_0x3c6a39(0x31c)],'process_role':_0x1b86c2[_0x3c6a39(0x289)],'fields':{...j(this[_0x3c6a39(0x20b)],_0x10a24f['sessionId']),'event':_0x307393,'session_id':_0x10a24f[_0x3c6a39(0x1ef)],'timestamp':_0x10a24f['lastAccessedAt'],'workbook_identity':_0x10a24f[_0x3c6a39(0x2fc)]}}),await this[_0x3c6a39(0x2f1)][_0x3c6a39(0x1c2)]();}async[_0x49ba2f(0x30d)](_0x394bfa,_0x8846f2){const _0x507ee4=_0x49ba2f;this[_0x507ee4(0x279)][_0x507ee4(0x233)](_0x394bfa['workbookIdentity'])===_0x394bfa&&(this[_0x507ee4(0x279)][_0x507ee4(0x23c)](_0x394bfa[_0x507ee4(0x2fc)]),_0x394bfa[_0x507ee4(0x2d6)][_0x507ee4(0x30b)](),this[_0x507ee4(0x2f1)][_0x507ee4(0x321)]({'event_name':_0x67b335[_0x507ee4(0x208)],'component':_0x3d8a60[_0x507ee4(0x31c)],'process_role':_0x1b86c2[_0x507ee4(0x289)],'fields':{...j(this[_0x507ee4(0x20b)],_0x394bfa['sessionId']),'reason':_0x8846f2,'session_id':_0x394bfa[_0x507ee4(0x1ef)],'timestamp':new Date()['toISOString'](),'workbook_identity':_0x394bfa[_0x507ee4(0x2fc)]}}),await this[_0x507ee4(0x2f1)][_0x507ee4(0x1c2)]());}[_0x49ba2f(0x228)](_0x2ccb64,_0x19d93a){const _0x42215a=_0x49ba2f;return{'sessionId':_0x2ccb64[_0x42215a(0x1ef)],'packageIdentity':_0x19d93a,'createdAt':_0x2ccb64['createdAt'],'lastAccessedAt':_0x2ccb64[_0x42215a(0x2f4)]};}};function vt(_0x2c8666,_0x14a15f){const _0x28e7e1=_0x49ba2f;let _0x354d25=_0x2c8666[_0x28e7e1(0x189)]?.[_0x28e7e1(0x274)]();if(!_0x354d25)return _0x14a15f;let _0x42b722=Number(_0x354d25);return!Number[_0x28e7e1(0x268)](_0x42b722)||_0x42b722<0x0?_0x14a15f:_0x42b722;}function j(_0x232bee,_0x4579bc){const _0x7c679d=_0x49ba2f;return{'deployment.environment.name':_0x7c679d(0x2ce),'distribution.channel':M(_0x232bee,_0x7c679d(0x193))??_0x7c679d(0x1be),'service.instance.id':_0x4579bc,'service.name':'univer-runtime',...M(_0x232bee,_0x7c679d(0x1c0))===void 0x0?{}:{'build.id':M(_0x232bee,_0x7c679d(0x1c0))},...M(_0x232bee,_0x7c679d(0x273))===void 0x0?{}:{'service.version':M(_0x232bee,_0x7c679d(0x273))}};}function M(_0x2932d5,_0x493c77){const _0x541882=_0x49ba2f;let _0x55a1a8=_0x2932d5[_0x493c77]?.[_0x541882(0x274)]();return _0x55a1a8===void 0x0||_0x55a1a8['length']===0x0?void 0x0:_0x55a1a8;}function N(_0x3adb12){const _0xfb2054=_0x49ba2f;return _0x3adb12+'-'+Date['now']()[_0xfb2054(0x303)](0x24)+'-'+Math['random']()[_0xfb2054(0x303)](0x10)[_0xfb2054(0x2c3)](0x2,0x8);}function yt(){const _0xb87f0e=_0x49ba2f;return'session-'+Date[_0xb87f0e(0x319)]()[_0xb87f0e(0x303)](0x24)+'-'+Math['random']()[_0xb87f0e(0x303)](0x10)['slice'](0x2,0x8);}function bt(_0x250682){const _0x5535ca=_0x49ba2f;return _0x137dee(import.meta.url)[_0x5535ca(0x204)]('.js')?_0x5535ca(0x207):_0x5535ca(0x2ef);}function xt(_0x57948d){return _0x38c17a(_0x38c17a(_0x57948d));}var St=class{[_0x49ba2f(0x278)];[_0x49ba2f(0x280)];constructor(_0x412702={}){const _0x16580c=_0x49ba2f;this[_0x16580c(0x278)]=_0x412702[_0x16580c(0x278)]??{'sessionCreateWorkbook':Je,'sessionDisposeWorkbook':Qe,'sessionEvalJs':Ye,'sessionExportWorkbookData':Xe,'sessionExportWorkbookFile':Ze,'sessionGetWorkbook':qe,'sessionLoadWorkbookDataReplayPack':Ke,'sessionLoadWorkbook':Ge},this[_0x16580c(0x280)]=_0x412702[_0x16580c(0x180)]??{};}async['createWorkbook'](_0x5ea60a){const _0x3ea0bc=_0x49ba2f;let _0xe8b877=await this['client'][_0x3ea0bc(0x1ae)](_0x5ea60a[_0x3ea0bc(0x2ac)]['absolutePath'],{...this[_0x3ea0bc(0x280)],..._0x5ea60a[_0x3ea0bc(0x1bb)]===void 0x0?{}:{'cwd':_0x5ea60a[_0x3ea0bc(0x1bb)]},..._0x5ea60a[_0x3ea0bc(0x286)]===void 0x0?{}:{'id':_0x5ea60a[_0x3ea0bc(0x286)]},..._0x5ea60a[_0x3ea0bc(0x2a1)]===void 0x0?{}:{'name':_0x5ea60a[_0x3ea0bc(0x2a1)]}});return{'session':P(_0xe8b877[_0x3ea0bc(0x2d9)],_0x5ea60a[_0x3ea0bc(0x2ac)]),'workbookData':_0xe8b877[_0x3ea0bc(0x269)]};}async[_0x49ba2f(0x1c9)](_0x323235){const _0x4cce31=_0x49ba2f;let _0xc155d=await this[_0x4cce31(0x278)]['sessionGetWorkbook'](_0x323235['identity']['absolutePath'],{...this['options'],..._0x323235['cwd']===void 0x0?{}:{'cwd':_0x323235[_0x4cce31(0x1bb)]}});return!_0xc155d[_0x4cce31(0x2ca)]||_0xc155d['session']===null?null:P(_0xc155d['session'],_0x323235['identity']);}async[_0x49ba2f(0x276)](_0x146336){const _0x106d0c=_0x49ba2f;let _0x1343ee=await this[_0x106d0c(0x278)][_0x106d0c(0x307)](_0x146336['identity'][_0x106d0c(0x2b0)],_0x146336[_0x106d0c(0x269)],{...this[_0x106d0c(0x280)],..._0x146336[_0x106d0c(0x1bb)]===void 0x0?{}:{'cwd':_0x146336['cwd']}});return{'session':P(_0x1343ee[_0x106d0c(0x2d9)],_0x146336[_0x106d0c(0x2ac)]),'workbookData':_0x1343ee[_0x106d0c(0x269)]};}async[_0x49ba2f(0x19a)](_0x516f34){const _0x5a3dd4=_0x49ba2f;let _0x398f51=await this[_0x5a3dd4(0x278)]['sessionLoadWorkbookDataReplayPack'](_0x516f34['identity']['absolutePath'],{'baseWorkbookData':_0x516f34['replayPack'][_0x5a3dd4(0x182)],'mutations':_0x516f34[_0x5a3dd4(0x24f)][_0x5a3dd4(0x29c)]},{...this['options'],..._0x516f34['cwd']===void 0x0?{}:{'cwd':_0x516f34['cwd']}});return{'session':P(_0x398f51[_0x5a3dd4(0x2d9)],_0x516f34[_0x5a3dd4(0x2ac)]),'workbookData':_0x398f51['workbookData']};}async[_0x49ba2f(0x197)](_0x3a38d6){const _0x7b74bf=_0x49ba2f;let _0x1586aa=await this[_0x7b74bf(0x1c9)](_0x3a38d6);if(_0x1586aa!==null)return{'loaded':!0x1,'session':_0x1586aa};let _0x179e4d=await _0x3a38d6[_0x7b74bf(0x1f1)]();return{'loaded':!0x0,'session':(await this[_0x7b74bf(0x19a)]({..._0x3a38d6['cwd']===void 0x0?{}:{'cwd':_0x3a38d6['cwd']},'identity':_0x3a38d6['identity'],'replayPack':_0x179e4d}))[_0x7b74bf(0x2d9)]};}async[_0x49ba2f(0x2ad)](_0xcc673f){const _0x440597=_0x49ba2f;let _0x3a9b7a=await this[_0x440597(0x278)][_0x440597(0x1a9)](_0xcc673f[_0x440597(0x2ac)]['absolutePath'],_0xcc673f['code'],{...this[_0x440597(0x280)],..._0xcc673f['cwd']===void 0x0?{}:{'cwd':_0xcc673f[_0x440597(0x1bb)]},..._0xcc673f['mutates']===void 0x0?{}:{'mutates':_0xcc673f['mutates']}});return{..._0x3a9b7a[_0x440597(0x29c)]===void 0x0?{}:{'mutations':_0x3a9b7a[_0x440597(0x29c)]},'session':P(_0x3a9b7a[_0x440597(0x2d9)],_0xcc673f[_0x440597(0x2ac)]),'value':_0x3a9b7a[_0x440597(0x31d)]};}async['exportWorkbookData'](_0x3d0c9e){const _0x2b3262=_0x49ba2f;let _0x13307f=await this[_0x2b3262(0x278)][_0x2b3262(0x28b)](_0x3d0c9e[_0x2b3262(0x2ac)][_0x2b3262(0x2b0)],{...this[_0x2b3262(0x280)],..._0x3d0c9e['cwd']===void 0x0?{}:{'cwd':_0x3d0c9e[_0x2b3262(0x1bb)]}});return{'session':P(_0x13307f[_0x2b3262(0x2d9)],_0x3d0c9e[_0x2b3262(0x2ac)]),'workbookData':_0x13307f['workbookData']};}async[_0x49ba2f(0x19c)](_0x54f97a){const _0x2fb1f3=_0x49ba2f;let _0x7fc39d=await this['client'][_0x2fb1f3(0x1fd)](_0x54f97a['identity'][_0x2fb1f3(0x2b0)],{'format':_0x54f97a[_0x2fb1f3(0x1f8)],'outputPath':_0x54f97a[_0x2fb1f3(0x1da)]},{...this['options'],..._0x54f97a[_0x2fb1f3(0x1bb)]===void 0x0?{}:{'cwd':_0x54f97a['cwd']}});return{'format':_0x7fc39d[_0x2fb1f3(0x1f8)],'outputPath':_0x7fc39d[_0x2fb1f3(0x1da)],'session':P(_0x7fc39d[_0x2fb1f3(0x2d9)],_0x54f97a['identity']),'sizeBytes':_0x7fc39d[_0x2fb1f3(0x1b4)]};}async['dispose'](_0x2a16ac){const _0x5deb7e=_0x49ba2f;await this['client']['sessionDisposeWorkbook'](_0x2a16ac[_0x5deb7e(0x2ac)][_0x5deb7e(0x2b0)],{...this[_0x5deb7e(0x280)],..._0x2a16ac['cwd']===void 0x0?{}:{'cwd':_0x2a16ac['cwd']}});}};function P(_0x4f7997,_0x37c53b){const _0x2c3cb4=_0x49ba2f;return{'createdAt':_0x4f7997[_0x2c3cb4(0x29d)],'lastAccessedAt':_0x4f7997['lastAccessedAt'],'packageIdentity':_0x37c53b,'sessionId':_0x4f7997['sessionId']};}var F=class extends Error{['code'];constructor(_0xd12b47,_0x4d2b79,_0x2647c5){const _0x2bbe50=_0x49ba2f;super(_0x4d2b79,_0x2647c5),this[_0x2bbe50(0x314)]='WorkbookPackageError',this['code']=_0xd12b47;}},Ct=class extends F{constructor(_0x123702){const _0x2c5bde=_0x49ba2f;super(_0x2c5bde(0x257),_0x2c5bde(0x23d)+_0x123702),this['name']=_0x2c5bde(0x2df);}},wt=class extends F{constructor(_0x29f1e3){const _0x391c7a=_0x49ba2f;super(_0x391c7a(0x211),_0x391c7a(0x22d)+_0x29f1e3),this[_0x391c7a(0x314)]=_0x391c7a(0x20f);}},I=class extends F{constructor(_0x13cf50,_0x45fe57,_0x3e352b){const _0x564e28=_0x49ba2f;super(_0x564e28(0x2f8),_0x564e28(0x1a7)+_0x13cf50+':\x20'+_0x45fe57,_0x3e352b),this['name']=_0x564e28(0x1d6);}},Tt=class extends F{constructor(_0x161aa2,_0x2224fa,_0x1efb7c){const _0x956a6e=_0x49ba2f;super('ERR_WORKBOOK_PACKAGE_TRANSACTION_FAILED',_0x956a6e(0x181)+_0x161aa2+':\x20'+_0x2224fa,_0x1efb7c),this[_0x956a6e(0x314)]=_0x956a6e(0x298);}},Et=class extends F{constructor(_0x603d74){const _0x253e71=_0x49ba2f;super(_0x253e71(0x18d),_0x253e71(0x200)+_0x603d74),this[_0x253e71(0x314)]=_0x253e71(0x1d7);}},Dt=class extends F{constructor(_0x4f265c,_0x2df759){const _0x39d8ff=_0x49ba2f;super(_0x39d8ff(0x262),_0x2df759===null?'Workbook\x20package\x20is\x20busy:\x20'+_0x4f265c:_0x39d8ff(0x2ba)+_0x4f265c+'\x20is\x20being\x20modified\x20by\x20operation\x20'+_0x2df759['operation']+_0x39d8ff(0x2c5)+_0x2df759[_0x39d8ff(0x22c)]+'\x20on\x20'+_0x2df759[_0x39d8ff(0x18b)]+')'),this[_0x39d8ff(0x2a3)]=_0x2df759,this[_0x39d8ff(0x314)]=_0x39d8ff(0x1c1);}};function Ot(_0x259e38={}){const _0x1af6af=_0x49ba2f;return{'unitID':_0x259e38['unitID']??null,'initRev':_0x259e38[_0x1af6af(0x214)]??null,'syncedRev':_0x259e38[_0x1af6af(0x30e)]??null};}function kt(_0x5045d5,_0x9d63f5){const _0x5d3630=_0x49ba2f;if(!At(_0x5045d5))throw new I(_0x9d63f5,_0x5d3630(0x243));let _0x189dc2=_0x5045d5['unitID'],_0xc4c877=_0x5045d5['initRev'],_0x5c506f=_0x5045d5[_0x5d3630(0x30e)];if(_0x189dc2!==null&&typeof _0x189dc2!=_0x5d3630(0x21a))throw new I(_0x9d63f5,_0x5d3630(0x235));if(_0xc4c877!==null&&!jt(_0xc4c877))throw new I(_0x9d63f5,_0x5d3630(0x250));if(_0x5c506f!==null&&!jt(_0x5c506f))throw new I(_0x9d63f5,_0x5d3630(0x1b1));return{'unitID':_0x189dc2,'initRev':_0xc4c877,'syncedRev':_0x5c506f};}function At(_0x22ad94){const _0x529186=_0x49ba2f;return typeof _0x22ad94==_0x529186(0x236)&&!!_0x22ad94&&!Array[_0x529186(0x28a)](_0x22ad94);}function jt(_0xfa0ff){return typeof _0xfa0ff=='number'&&Number['isInteger'](_0xfa0ff)&&_0xfa0ff>=0x0;}function L(_0x3b3f,_0x3b004d){const _0x3185b9=_0x49ba2f;if(!Mt(_0x3b3f))throw new I(_0x3b004d,_0x3185b9(0x1ca));if(typeof _0x3b3f['id']!=_0x3185b9(0x21a)||_0x3b3f['id'][_0x3185b9(0x290)]===0x0)throw new I(_0x3b004d,_0x3185b9(0x2ab));if(!Mt(_0x3b3f[_0x3185b9(0x2eb)]))throw new I(_0x3b004d,_0x3185b9(0x1a8));return _0x3b3f;}function Mt(_0x2fe42a){const _0x23e70f=_0x49ba2f;return typeof _0x2fe42a=='object'&&!!_0x2fe42a&&!Array[_0x23e70f(0x28a)](_0x2fe42a);}function Nt(_0x2e9d8e,_0x1a5087){const _0x12ea72=_0x49ba2f;let _0x5dfbc0=Ft(_0x2e9d8e,_0x1a5087,_0x12ea72(0x263)),_0x24176b=Lt(_0x5dfbc0[_0x12ea72(0x2b5)],_0x1a5087,_0x12ea72(0x263)),_0x2c3040=Rt(_0x5dfbc0[_0x12ea72(0x311)],_0x1a5087,_0x12ea72(0x263)),_0x24cc79=_0x5dfbc0[_0x12ea72(0x229)],_0x36cae2=_0x5dfbc0[_0x12ea72(0x29c)];if(typeof _0x24cc79!='string')throw new I(_0x1a5087,_0x12ea72(0x29e));if(!Array[_0x12ea72(0x28a)](_0x36cae2))throw new I(_0x1a5087,_0x12ea72(0x29a));return{'sid':_0x24176b,'reqId':_0x2c3040,'message':_0x24cc79,'mutations':_0x36cae2[_0x12ea72(0x1f5)]((_0x24840d,_0x51ba18)=>L(_0x24840d,_0x1a5087+_0x12ea72(0x1aa)+_0x51ba18+']'))};}function Pt(_0x2946e5,_0x2a6271){const _0x38ac32=_0x49ba2f;let _0x5e2d18=Ft(_0x2946e5,_0x2a6271,_0x38ac32(0x2b7)),_0x4b7847=Lt(_0x5e2d18[_0x38ac32(0x2b5)],_0x2a6271,_0x38ac32(0x2b7)),_0x45dbdc=Rt(_0x5e2d18[_0x38ac32(0x311)],_0x2a6271,_0x38ac32(0x2b7)),_0x584c8b=_0x5e2d18[_0x38ac32(0x285)],_0x10d091=_0x5e2d18[_0x38ac32(0x22e)],_0x599ae1=_0x5e2d18[_0x38ac32(0x29c)],_0x23ac1d=_0x5e2d18['message'];if(!It(_0x584c8b))throw new I(_0x2a6271,_0x38ac32(0x251));if(!It(_0x10d091))throw new I(_0x2a6271,'synced\x20changeset.revision\x20must\x20be\x20a\x20non-negative\x20integer');if(!Array[_0x38ac32(0x28a)](_0x599ae1))throw new I(_0x2a6271,_0x38ac32(0x292));if(_0x23ac1d!==void 0x0&&typeof _0x23ac1d!=_0x38ac32(0x21a))throw new I(_0x2a6271,_0x38ac32(0x318));return{'sid':_0x4b7847,'reqId':_0x45dbdc,'baseRev':_0x584c8b,'revision':_0x10d091,'mutations':_0x599ae1[_0x38ac32(0x1f5)]((_0x10c1e4,_0x3b8c53)=>L(_0x10c1e4,_0x2a6271+_0x38ac32(0x1aa)+_0x3b8c53+']')),..._0x23ac1d===void 0x0?{}:{'message':_0x23ac1d}};}function Ft(_0x51e9b3,_0x34cf0d,_0x3d32ca){const _0x52e702=_0x49ba2f;if(typeof _0x51e9b3!=_0x52e702(0x236)||!_0x51e9b3||Array[_0x52e702(0x28a)](_0x51e9b3))throw new I(_0x34cf0d,_0x3d32ca+'\x20must\x20be\x20an\x20object');return _0x51e9b3;}function It(_0x2fcb08){const _0x148207=_0x49ba2f;return typeof _0x2fcb08==_0x148207(0x1a3)&&Number['isInteger'](_0x2fcb08)&&_0x2fcb08>=0x0;}function Lt(_0xf8c631,_0x5af037,_0x5c1e30){const _0x206bf5=_0x49ba2f;if(typeof _0xf8c631!='string'||_0xf8c631[_0x206bf5(0x290)]===0x0)throw new I(_0x5af037,_0x5c1e30+'.sid\x20must\x20be\x20a\x20non-empty\x20string');return _0xf8c631;}function Rt(_0x1c34e0,_0x8396ed,_0xb273d1){const _0xdce7c2=_0x49ba2f;if(typeof _0x1c34e0!=_0xdce7c2(0x1a3)||!Number['isInteger'](_0x1c34e0)||_0x1c34e0<0x1)throw new I(_0x8396ed,_0xb273d1+'.reqId\x20must\x20be\x20a\x20positive\x20integer');return _0x1c34e0;}const zt=['.univer','.unv'];var Bt=class e{constructor(_0x143664){const _0x4679e6=_0x49ba2f;this[_0x4679e6(0x31d)]=_0x143664;}static[_0x49ba2f(0x261)](_0x3f1bb6){const _0x58997e=_0x49ba2f;let _0x5c4b41=_0x3f1bb6[_0x58997e(0x274)]();if(_0x5c4b41[_0x58997e(0x290)]===0x0||!Vt(_0x52d0a3(_0x5c4b41)))throw new Ct(_0x3f1bb6);return new e(_0x5c4b41);}get['extension'](){return _0x52d0a3(this['value']);}};function Vt(_0x3a758b){return zt['includes'](_0x3a758b);}var Ht=class e{[_0x49ba2f(0x2b0)];constructor(_0x28869c){const _0x15a75a=_0x49ba2f;this[_0x15a75a(0x2b0)]=_0x28869c['absolutePath'];}static[_0x49ba2f(0x17f)](_0x3d8589){const _0x14767d=_0x49ba2f;let _0x9a1d52=_0x3e117a(_0x3d8589),_0x5466c1=Bt['parse'](_0x9a1d52);if(_0x9a1d52!==_0x3d8589||!Vt(_0x5466c1[_0x14767d(0x24d)]))throw new Ct(_0x3d8589);return new e({'absolutePath':_0x9a1d52});}},R=_0x49ba2f(0x2b4),z=_0x49ba2f(0x2e1),B='local-mutations.jsonl',V=_0x49ba2f(0x18f),H=_0x49ba2f(0x242),Ut=class{constructor(_0x4cbfea={}){this['options']=_0x4cbfea;}async[_0x49ba2f(0x1ce)](_0x20805f){const _0x492534=_0x49ba2f;let _0x3af4f6=Bt[_0x492534(0x261)](_0x20805f[_0x492534(0x30a)]);return Ht['fromAbsolutePath'](_0x3e117a(_0x20805f[_0x492534(0x1bb)]??process[_0x492534(0x1bb)](),_0x3af4f6[_0x492534(0x31d)]));}async['initialize'](_0x4262bd){const _0x124c53=_0x49ba2f;return await U(_0x4262bd['identity'],_0x124c53(0x219),this[_0x124c53(0x280)],async()=>{const _0x44239a=_0x124c53;let _0x2561a5=Ot(_0x4262bd['manifest']),_0x29e9d9=new G(_0x4262bd['identity'],this[_0x44239a(0x280)],{'lockWrites':!0x1});return await Wt(_0x4262bd[_0x44239a(0x2ac)]),await _0x378b2c(_0x4262bd[_0x44239a(0x2ac)][_0x44239a(0x2b0)],{'recursive':!0x0}),await Promise[_0x44239a(0x27d)]([_0x29e9d9[_0x44239a(0x19e)](_0x2561a5),_0x29e9d9[_0x44239a(0x283)](_0x4262bd['initWorkbookData']),_0x29e9d9[_0x44239a(0x203)]([]),_0x29e9d9[_0x44239a(0x20e)]([]),_0x29e9d9[_0x44239a(0x21b)](_0x4262bd['syncedChangesets']??[])]),new G(_0x4262bd['identity'],this[_0x44239a(0x280)]);});}async[_0x49ba2f(0x19f)](_0x2f3e11){return new G(_0x2f3e11,this['options']);}async[_0x49ba2f(0x238)](_0x3dddf6,_0x231dc9){const _0x49549e=_0x49ba2f;return await U(_0x3dddf6,_0x49549e(0x238),this[_0x49549e(0x280)],async()=>{const _0x19aa6d=_0x49549e;let _0x1a01b1=new Zt(new G(_0x3dddf6,this['options'],{'lockWrites':!0x1}));try{let _0x4057e2=await _0x231dc9(_0x1a01b1);return await tn(_0x3dddf6,_0x1a01b1[_0x19aa6d(0x2ae)](),this['options']),_0x4057e2;}catch(_0x2f1696){throw new Tt(_0x3dddf6[_0x19aa6d(0x2b0)],_0x2f1696 instanceof Error?_0x2f1696[_0x19aa6d(0x229)]:String(_0x2f1696),_0x2f1696 instanceof Error?{'cause':_0x2f1696}:void 0x0);}});}};async function Wt(_0x20d7ca){const _0x53e0a9=_0x49ba2f;try{if(!(await _0x3aee46(_0x20d7ca[_0x53e0a9(0x2b0)]))[_0x53e0a9(0x18e)]()||(await _0x312d68(_0x20d7ca['absolutePath']))[_0x53e0a9(0x290)]>0x0)throw new Et(_0x20d7ca[_0x53e0a9(0x2b0)]);}catch(_0xd3a4e){if(Q(_0xd3a4e)&&_0xd3a4e[_0x53e0a9(0x294)]===_0x53e0a9(0x291))return;throw _0xd3a4e;}}async function U(_0x1f0c6d,_0x4cca34,_0x525f81,_0x2fa963){await Gt(_0x1f0c6d,_0x4cca34,_0x525f81);try{return await _0x2fa963();}finally{await Yt(_0x1f0c6d);}}async function Gt(_0xfc65ec,_0x2a7f72,_0x34cb0f){const _0x22a47e=_0x49ba2f;let _0x30e27f=_0x34cb0f[_0x22a47e(0x196)]??0x1388,_0xc883da=_0x34cb0f[_0x22a47e(0x223)]??0x32,_0x105783=Date[_0x22a47e(0x319)](),_0x473225=null;for(await _0x378b2c(_0x38c17a(W(_0xfc65ec)),{'recursive':!0x0});;){try{await _0x4348c4(W(_0xfc65ec),Y({'pid':process[_0x22a47e(0x22c)],'hostname':_0x23b4ac(),'createdAt':new Date()[_0x22a47e(0x25a)](),'operation':_0x2a7f72}),{'encoding':_0x22a47e(0x1a5),'flag':'wx'});return;}catch(_0x3de44b){if(!Q(_0x3de44b)||_0x3de44b[_0x22a47e(0x294)]!==_0x22a47e(0x2c1))throw _0x3de44b;}let _0x195602=await Kt(_0xfc65ec,_0x34cb0f);if(_0x473225=_0x195602[_0x22a47e(0x2a3)],!_0x195602['removed']){if(Date['now']()-_0x105783>=_0x30e27f)throw new Dt(_0xfc65ec[_0x22a47e(0x2b0)],_0x473225);await Xt(Math[_0x22a47e(0x245)](_0xc883da,Math[_0x22a47e(0x26a)](_0x30e27f-(Date[_0x22a47e(0x319)]()-_0x105783),0x0)));}}}async function Kt(_0xd54e51,_0x564bc3){const _0x58e4a4=_0x49ba2f;let _0x7c553a=await qt(_0xd54e51);return _0x7c553a===null||_0x7c553a['hostname']!==_0x23b4ac()||Jt(_0x7c553a[_0x58e4a4(0x22c)],_0x564bc3)?{'holder':_0x7c553a,'removed':!0x1}:(await Yt(_0xd54e51),{'holder':_0x7c553a,'removed':!0x0});}async function qt(_0x44d552){const _0x5a9b75=_0x49ba2f;try{let _0x16438e=JSON[_0x5a9b75(0x261)](await _0x1a16fc(W(_0x44d552),_0x5a9b75(0x1a5)));if(!on(_0x16438e))return null;let _0x2e7848=_0x16438e['pid'],_0x36b365=_0x16438e['hostname'],_0x92eba=_0x16438e[_0x5a9b75(0x29d)],_0x6dadf1=_0x16438e['operation'];return typeof _0x2e7848!=_0x5a9b75(0x1a3)||!Number[_0x5a9b75(0x2d3)](_0x2e7848)||typeof _0x36b365!=_0x5a9b75(0x21a)||typeof _0x92eba!=_0x5a9b75(0x21a)||typeof _0x6dadf1!=_0x5a9b75(0x21a)?null:{'pid':_0x2e7848,'hostname':_0x36b365,'createdAt':_0x92eba,'operation':_0x6dadf1};}catch{return null;}}function Jt(_0x5da1e9,_0x23bbf9){const _0x2922cf=_0x49ba2f;if(_0x23bbf9[_0x2922cf(0x26d)]!==void 0x0)return _0x23bbf9['isProcessAlive'](_0x5da1e9);try{return process[_0x2922cf(0x266)](_0x5da1e9,0x0),!0x0;}catch{return!0x1;}}async function Yt(_0x46eac1){await _0x19d029(W(_0x46eac1),{'force':!0x0})['catch'](()=>void 0x0);}function W(_0x1b24b7){const _0x4f9816=_0x49ba2f;return _0x1b24b7[_0x4f9816(0x2b0)]+_0x4f9816(0x1d9);}async function Xt(_0x4cf5c3){_0x4cf5c3<=0x0||await new Promise(_0x2c6a4a=>{setTimeout(_0x2c6a4a,_0x4cf5c3);});}var G=class{constructor(_0x5558f3,_0x365b6a,_0x225a12={'lockWrites':!0x0}){const _0x5a4084=_0x49ba2f;this['identity']=_0x5558f3,this[_0x5a4084(0x280)]=_0x365b6a,this['writeOptions']=_0x225a12;}async['getManifest'](){const _0x156372=_0x49ba2f;return await Qt(this[_0x156372(0x2ac)],R,(_0x1bde73,_0x2b484d)=>kt(_0x1bde73,_0x2b484d));}async['setManifest'](_0x24fb40){const _0x5b8a9d=_0x49ba2f;await this['write'](_0x5b8a9d(0x1e8),()=>J(this[_0x5b8a9d(0x2ac)],R,Y(_0x24fb40)));}async['getInitWorkbookData'](){const _0x1c75dc=_0x49ba2f;return await Qt(this[_0x1c75dc(0x2ac)],z,en);}async['setInitWorkbookData'](_0x190aca){const _0x1306ca=_0x49ba2f;await this[_0x1306ca(0x27a)]('set-init-workbook-data',()=>J(this['identity'],z,Y(_0x190aca)));}async[_0x49ba2f(0x2b3)](){const _0x4a060e=_0x49ba2f;return await K(this[_0x4a060e(0x2ac)],B,L);}async[_0x49ba2f(0x1f3)](_0x3497d2){const _0x41f0f1=_0x49ba2f;_0x3497d2[_0x41f0f1(0x290)]!==0x0&&await this[_0x41f0f1(0x27a)](_0x41f0f1(0x1f6),()=>rn(this[_0x41f0f1(0x2ac)],B,X(_0x3497d2)));}async[_0x49ba2f(0x203)](_0x5f2b2f){const _0x3c06a3=_0x49ba2f;await this['write'](_0x3c06a3(0x21c),()=>J(this[_0x3c06a3(0x2ac)],B,X(_0x5f2b2f)));}async['getLocalChangesets'](){const _0x723866=_0x49ba2f;return await K(this[_0x723866(0x2ac)],V,Nt);}async[_0x49ba2f(0x1fa)](_0x16f793){const _0x17ba4f=_0x49ba2f;await this[_0x17ba4f(0x27a)](_0x17ba4f(0x2c8),()=>rn(this[_0x17ba4f(0x2ac)],V,X([_0x16f793])));}async[_0x49ba2f(0x20e)](_0x753cbb){const _0x15cccc=_0x49ba2f;await this[_0x15cccc(0x27a)](_0x15cccc(0x24b),()=>J(this[_0x15cccc(0x2ac)],V,X(_0x753cbb)));}async[_0x49ba2f(0x2cc)](){const _0x3eb333=_0x49ba2f;return await K(this[_0x3eb333(0x2ac)],H,Pt);}async[_0x49ba2f(0x1f7)](_0x5f55f9){const _0x161204=_0x49ba2f;_0x5f55f9[_0x161204(0x290)]!==0x0&&await this[_0x161204(0x27a)](_0x161204(0x2e6),()=>rn(this['identity'],H,X(_0x5f55f9)));}async[_0x49ba2f(0x21b)](_0x1de5ff){const _0x49d9d5=_0x49ba2f;await this['write'](_0x49d9d5(0x218),()=>J(this['identity'],H,X(_0x1de5ff)));}async['write'](_0x51d93c,_0x1044d5){const _0x225b74=_0x49ba2f;if(!this[_0x225b74(0x1cb)][_0x225b74(0x195)]){await _0x1044d5();return;}await U(this[_0x225b74(0x2ac)],_0x51d93c,this[_0x225b74(0x280)],_0x1044d5);}},Zt=class{[_0x49ba2f(0x2ac)];[_0x49ba2f(0x1d5)]=new Set();[_0x49ba2f(0x17e)];[_0x49ba2f(0x2c0)];['localMutations'];[_0x49ba2f(0x232)];['syncedChangesets'];constructor(_0x55484f){const _0x1b127b=_0x49ba2f;this[_0x1b127b(0x1a2)]=_0x55484f,this[_0x1b127b(0x2ac)]=_0x55484f[_0x1b127b(0x2ac)];}async[_0x49ba2f(0x1c5)](){const _0x493df8=_0x49ba2f;return this[_0x493df8(0x232)]??=await this[_0x493df8(0x1a2)][_0x493df8(0x1c5)](),this['manifest'];}async[_0x49ba2f(0x19e)](_0x43807d){const _0x2252c0=_0x49ba2f;this[_0x2252c0(0x232)]=_0x43807d,this[_0x2252c0(0x1d5)]['add'](_0x2252c0(0x232));}async[_0x49ba2f(0x297)](){const _0x3e9248=_0x49ba2f;return this['initWorkbookData']??=await this[_0x3e9248(0x1a2)]['getInitWorkbookData'](),this['initWorkbookData'];}async[_0x49ba2f(0x283)](_0x4a6a24){const _0x518a9f=_0x49ba2f;this['initWorkbookData']=_0x4a6a24,this[_0x518a9f(0x1d5)][_0x518a9f(0x2b2)]('initWorkbookData');}async[_0x49ba2f(0x2b3)](){const _0x2fcfb6=_0x49ba2f;return this[_0x2fcfb6(0x277)]??=await this['basePackage'][_0x2fcfb6(0x2b3)](),this[_0x2fcfb6(0x277)];}async[_0x49ba2f(0x1f3)](_0x334d8e){const _0x3a1eda=_0x49ba2f;_0x334d8e[_0x3a1eda(0x290)]!==0x0&&(this[_0x3a1eda(0x277)]=[...await this['getLocalMutations'](),..._0x334d8e],this[_0x3a1eda(0x1d5)][_0x3a1eda(0x2b2)](_0x3a1eda(0x277)));}async[_0x49ba2f(0x203)](_0x38c509){const _0x161aed=_0x49ba2f;this['localMutations']=[..._0x38c509],this[_0x161aed(0x1d5)][_0x161aed(0x2b2)](_0x161aed(0x277));}async[_0x49ba2f(0x2f2)](){const _0x1c19d1=_0x49ba2f;return this[_0x1c19d1(0x2c0)]??=await this['basePackage'][_0x1c19d1(0x2f2)](),this['localChangesets'];}async['appendLocalChangeset'](_0x3af889){const _0x1d6b09=_0x49ba2f;this[_0x1d6b09(0x2c0)]=[...await this['getLocalChangesets'](),_0x3af889],this[_0x1d6b09(0x1d5)][_0x1d6b09(0x2b2)]('localChangesets');}async[_0x49ba2f(0x20e)](_0xad0b6d){const _0x385e51=_0x49ba2f;this['localChangesets']=[..._0xad0b6d],this[_0x385e51(0x1d5)][_0x385e51(0x2b2)](_0x385e51(0x2c0));}async['getSyncedChangesets'](){const _0x12f01b=_0x49ba2f;return this['syncedChangesets']??=await this['basePackage'][_0x12f01b(0x2cc)](),this[_0x12f01b(0x2d8)];}async[_0x49ba2f(0x1f7)](_0x1e8208){const _0x43b12d=_0x49ba2f;_0x1e8208['length']!==0x0&&(this[_0x43b12d(0x2d8)]=[...await this['getSyncedChangesets'](),..._0x1e8208],this['touchedFiles'][_0x43b12d(0x2b2)](_0x43b12d(0x2d8)));}async[_0x49ba2f(0x21b)](_0x3c34e6){const _0x3f9928=_0x49ba2f;this['syncedChangesets']=[..._0x3c34e6],this[_0x3f9928(0x1d5)][_0x3f9928(0x2b2)]('syncedChangesets');}['takeWrites'](){const _0x2fcb30=_0x49ba2f;let _0x351256=new Map();for(let _0x4b4dfc of this['touchedFiles'])_0x351256[_0x2fcb30(0x2c2)](an(_0x4b4dfc),this['serializeTouchedFile'](_0x4b4dfc));return _0x351256;}[_0x49ba2f(0x30c)](_0x47d7a1){const _0x1d8772=_0x49ba2f;switch(_0x47d7a1){case _0x1d8772(0x232):return Y(Z(this[_0x1d8772(0x232)],_0x47d7a1));case _0x1d8772(0x17e):return Y(Z(this[_0x1d8772(0x17e)],_0x47d7a1));case'localMutations':return X(Z(this[_0x1d8772(0x277)],_0x47d7a1));case _0x1d8772(0x2c0):return X(Z(this['localChangesets'],_0x47d7a1));case _0x1d8772(0x2d8):return X(Z(this[_0x1d8772(0x2d8)],_0x47d7a1));}}};async function Qt(_0x5d5df7,_0x41b7c7,_0x4edf0f){const _0x279ad4=_0x49ba2f;let _0x422776=_0x55ff6d(_0x5d5df7[_0x279ad4(0x2b0)],_0x41b7c7),_0x13abd3=await q(_0x422776),_0x46e706;try{_0x46e706=JSON[_0x279ad4(0x261)](_0x13abd3);}catch(_0x5861d0){throw new I(_0x422776,_0x5861d0 instanceof Error?_0x5861d0[_0x279ad4(0x229)]:String(_0x5861d0),_0x5861d0 instanceof Error?{'cause':_0x5861d0}:void 0x0);}return _0x4edf0f(_0x46e706,_0x422776);}async function K(_0x5031d5,_0x37f428,_0x551084){const _0x446877=_0x49ba2f;return(await $t(_0x5031d5,_0x37f428))[_0x446877(0x1f5)](({value:_0x29b2db,label:_0x13f48f})=>_0x551084(_0x29b2db,_0x13f48f));}async function $t(_0x129ce4,_0x410698){const _0x41fd46=_0x49ba2f;let _0x5769a6=_0x55ff6d(_0x129ce4[_0x41fd46(0x2b0)],_0x410698),_0x16106b=(await q(_0x5769a6))[_0x41fd46(0x274)]();return _0x16106b[_0x41fd46(0x290)]===0x0?[]:_0x16106b[_0x41fd46(0x249)](/\r?\n/u)[_0x41fd46(0x1f5)]((_0x5694c4,_0x435107)=>{const _0x5c6ae3=_0x41fd46;let _0x5edf05;try{_0x5edf05=JSON[_0x5c6ae3(0x261)](_0x5694c4);}catch(_0x4121c6){throw new I(_0x5769a6,_0x5c6ae3(0x25e)+(_0x435107+0x1)+':\x20'+(_0x4121c6 instanceof Error?_0x4121c6['message']:String(_0x4121c6)),_0x4121c6 instanceof Error?{'cause':_0x4121c6}:void 0x0);}return{'value':_0x5edf05,'label':_0x5769a6+':'+(_0x435107+0x1)};});}async function q(_0x24a1a0){const _0x2b900b=_0x49ba2f;try{if(!(await _0x3aee46(_0x24a1a0))['isFile']())throw new wt(_0x24a1a0);return await _0x1a16fc(_0x24a1a0,_0x2b900b(0x1a5));}catch(_0x2ccee5){throw Q(_0x2ccee5)&&_0x2ccee5[_0x2b900b(0x294)]===_0x2b900b(0x291)?new wt(_0x24a1a0):_0x2ccee5;}}function en(_0x48f03e,_0xe6c07d){const _0x569ee0=_0x49ba2f;if(typeof _0x48f03e!=_0x569ee0(0x236)||!_0x48f03e||Array[_0x569ee0(0x28a)](_0x48f03e))throw new I(_0xe6c07d,_0x569ee0(0x21e));return _0x48f03e;}async function tn(_0x1d82a9,_0x3ee36f,_0x4f0455){const _0x3b9da8=_0x49ba2f;if(_0x3ee36f['size']===0x0)return;let _0x1eb0c6=_0x1d82a9[_0x3b9da8(0x2b0)]+_0x3b9da8(0x213)+process[_0x3b9da8(0x22c)]+'-'+_0x2d40be(),_0x1ff2be=await Promise[_0x3b9da8(0x27d)]([..._0x3ee36f['keys']()][_0x3b9da8(0x1f5)](async _0x5b35c0=>({'relativePath':_0x5b35c0,'originalContent':await q(_0x55ff6d(_0x1d82a9['absolutePath'],_0x5b35c0))})));await _0x378b2c(_0x1eb0c6,{'recursive':!0x0}),await nn(_0x1eb0c6,{'state':_0x3b9da8(0x2e4),'files':_0x1ff2be});try{for(let [_0x4d9655,_0xd94f51]of _0x3ee36f)await _0x4f0455[_0x3b9da8(0x2f7)]?.(_0x4d9655),await J(_0x1d82a9,_0x4d9655,_0xd94f51);await nn(_0x1eb0c6,{'state':_0x3b9da8(0x31f),'files':_0x1ff2be});}catch(_0x1c7109){try{for(let _0x496bd4 of _0x1ff2be)await J(_0x1d82a9,_0x496bd4[_0x3b9da8(0x247)],_0x496bd4[_0x3b9da8(0x2d2)]);await nn(_0x1eb0c6,{'state':'rolled_back','files':_0x1ff2be});}catch(_0x25dce8){throw Error((_0x1c7109 instanceof Error?_0x1c7109['message']:String(_0x1c7109))+_0x3b9da8(0x2e3)+(_0x25dce8 instanceof Error?_0x25dce8['message']:String(_0x25dce8)),_0x1c7109 instanceof Error?{'cause':_0x1c7109}:void 0x0);}throw _0x1c7109;}finally{await _0x19d029(_0x1eb0c6,{'recursive':!0x0,'force':!0x0})[_0x3b9da8(0x301)](()=>void 0x0);}}async function nn(_0x24e671,_0x1509a1){const _0x115367=_0x49ba2f;await _0x4348c4(_0x55ff6d(_0x24e671,'journal.json'),Y(_0x1509a1),_0x115367(0x1a5));}function _0x3740(_0x23b7e2,_0x814fcd){_0x23b7e2=_0x23b7e2-0x17e;const _0x1f74b9=_0x1f74();let _0x374003=_0x1f74b9[_0x23b7e2];return _0x374003;}async function rn(_0x3a37ee,_0x358980,_0x47c2c1){const _0x6e447d=_0x49ba2f;await _0x378b2c(_0x3a37ee[_0x6e447d(0x2b0)],{'recursive':!0x0}),await _0x52ff6c(_0x55ff6d(_0x3a37ee[_0x6e447d(0x2b0)],_0x358980),_0x47c2c1,'utf8');}async function J(_0x20a93e,_0x3f54e3,_0x147613){const _0x1d19fa=_0x49ba2f;let _0x4af2e0=_0x55ff6d(_0x20a93e[_0x1d19fa(0x2b0)],_0x3f54e3),_0x3e75e7=_0x4af2e0+_0x1d19fa(0x27e)+process[_0x1d19fa(0x22c)]+'-'+_0x2d40be();try{await _0x378b2c(_0x38c17a(_0x4af2e0),{'recursive':!0x0}),await _0x4348c4(_0x3e75e7,_0x147613,_0x1d19fa(0x1a5)),await _0x3f5eef(_0x3e75e7,_0x4af2e0);}finally{await _0x19d029(_0x3e75e7,{'force':!0x0})['catch'](()=>void 0x0);}}function an(_0x278216){const _0x109dbb=_0x49ba2f;switch(_0x278216){case _0x109dbb(0x232):return R;case _0x109dbb(0x17e):return z;case _0x109dbb(0x277):return B;case'localChangesets':return V;case'syncedChangesets':return H;}}function Y(_0x5eaa86){const _0x2156a6=_0x49ba2f;return JSON[_0x2156a6(0x260)](_0x5eaa86)+'\x0a';}function X(_0x5282fd){const _0x5590d1=_0x49ba2f;return _0x5282fd[_0x5590d1(0x290)]===0x0?'':_0x5282fd['map'](_0x189529=>JSON[_0x5590d1(0x260)](_0x189529))[_0x5590d1(0x2d0)]('\x0a')+'\x0a';}function Z(_0x28c994,_0x41f897){const _0x475166=_0x49ba2f;if(_0x28c994===void 0x0)throw Error(_0x475166(0x25f)+_0x41f897);return _0x28c994;}function Q(_0x39f6c1){return _0x39f6c1 instanceof Error&&'code'in _0x39f6c1;}function on(_0x219d1a){const _0x3f8f74=_0x49ba2f;return typeof _0x219d1a==_0x3f8f74(0x236)&&!!_0x219d1a&&!Array[_0x3f8f74(0x28a)](_0x219d1a);}var sn=_0x3c4b00(import.meta.url),$=_n(_0x38c17a(_0x137dee(import.meta.url)));function cn(_0xc82587=process.env){const _0x1bfd9c=_0x49ba2f;let _0x1c6d6f=un(_0xc82587);return _0x1c6d6f===_0x1bfd9c(0x2ef)?dn():_0x1c6d6f===_0x1bfd9c(0x2d5)?fn():mn();}function ln(_0x58ef0b=process.env){const _0x3f1e14=_0x49ba2f;return{'daemonEntry':cn(_0x58ef0b)[_0x3f1e14(0x19b)]};}function un(_0x23a2a6=process.env){const _0x185a8d=_0x49ba2f;let _0x5a794d=_0x23a2a6[_0x185a8d(0x1c3)]?.[_0x185a8d(0x274)]();return _0x5a794d===_0x185a8d(0x2ef)||_0x5a794d===_0x185a8d(0x2d5)||_0x5a794d==='packaged'?_0x5a794d:_0x137dee(import.meta.url)['endsWith'](_0x185a8d(0x2a0))?_0x185a8d(0x2ef):gn($)?_0x185a8d(0x2d5):_0x185a8d(0x1d8);}function dn(){const _0x581cb2=_0x49ba2f;let _0x45cf18=_0x3e117a($,_0x581cb2(0x1e6)),_0x148fec=sn[_0x581cb2(0x1db)](_0x581cb2(0x284));return{'mode':'source','packageRoot':$,'cliEntry':{'execArgv':[_0x581cb2(0x258),_0x148fec],'modulePath':_0x55ff6d($,_0x581cb2(0x272),_0x581cb2(0x2d7))},'daemonEntry':{'execArgv':[_0x581cb2(0x258),_0x148fec],'modulePath':_0x55ff6d($,_0x581cb2(0x272),_0x581cb2(0x2b9),_0x581cb2(0x28c))},'runtimeExecutionPlaneEntry':{'execArgv':['--import',_0x148fec],'modulePath':_0x55ff6d(_0x45cf18,_0x581cb2(0x300),'univer-runtime',_0x581cb2(0x272),_0x581cb2(0x1f4),_0x581cb2(0x28c))},'runHelpTopicsRoot':_0x55ff6d($,_0x581cb2(0x272),'run-help',_0x581cb2(0x26f)),'viewAssetsRoot':hn(_0x45cf18)};}function fn(){const _0x16c5bd=_0x49ba2f;let _0x264eee=pn($),_0x315d97=_0x55ff6d(_0x264eee,_0x16c5bd(0x31e),_0x16c5bd(0x26c));return{'mode':_0x16c5bd(0x2d5),'packageRoot':$,'cliEntry':{'execArgv':[],'modulePath':_0x55ff6d(_0x264eee,_0x16c5bd(0x31e),_0x16c5bd(0x2d4))},'daemonEntry':{'execArgv':[],'modulePath':_0x55ff6d(_0x264eee,'internal',_0x16c5bd(0x222))},'runtimeExecutionPlaneEntry':{'execArgv':[],'modulePath':_0x315d97},'runHelpTopicsRoot':_0x55ff6d(_0x264eee,_0x16c5bd(0x254),'topics'),'viewAssetsRoot':_0x55ff6d(_0x264eee,_0x16c5bd(0x28e),_0x16c5bd(0x264))};}function pn(_0x2060bf){const _0x24959b=_0x49ba2f;return gn(_0x2060bf)?_0x55ff6d(_0x2060bf,_0x24959b(0x207)):_0x2060bf;}function mn(){const _0x4f2c79=_0x49ba2f;return{'mode':_0x4f2c79(0x1d8),'packageRoot':$,'cliEntry':{'execArgv':[],'modulePath':_0x55ff6d($,_0x4f2c79(0x31e),_0x4f2c79(0x2d4))},'daemonEntry':{'execArgv':[],'modulePath':_0x55ff6d($,'internal',_0x4f2c79(0x222))},'runtimeExecutionPlaneEntry':{'execArgv':[],'modulePath':_0x55ff6d($,'internal','univer-runner.js')},'runHelpTopicsRoot':_0x55ff6d($,'run-help',_0x4f2c79(0x26f)),'viewAssetsRoot':_0x55ff6d($,_0x4f2c79(0x28e),'browser')};}function hn(_0x277123){const _0x5137c6=_0x49ba2f;let _0x27b4e2=_0x55ff6d(_0x277123,_0x5137c6(0x300),_0x5137c6(0x305),'dist','browser');return _0x2cca8f(_0x27b4e2)?_0x27b4e2:_0x55ff6d(_0x277123,_0x5137c6(0x300),'view-host',_0x5137c6(0x272),_0x5137c6(0x264));}function gn(_0x4f3462){const _0x316e04=_0x49ba2f;return _0x1f93a9(_0x4f3462)==='cli'&&_0x1f93a9(_0x38c17a(_0x4f3462))===_0x316e04(0x231);}function _n(_0x846dc5){const _0x2d4b96=_0x49ba2f;let _0xc7a958=_0x846dc5;for(;;){let _0x5333fa=_0x55ff6d(_0xc7a958,_0x2d4b96(0x1e2));if(_0x2cca8f(_0x5333fa)&&JSON['parse'](_0xc451d(_0x5333fa,_0x2d4b96(0x1a5)))[_0x2d4b96(0x1dd)]?.[_0x2d4b96(0x271)]!==void 0x0)return _0xc7a958;let _0x28954d=_0x38c17a(_0xc7a958);if(_0x28954d===_0xc7a958)throw Error(_0x2d4b96(0x1b0)+_0x846dc5);_0xc7a958=_0x28954d;}}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};
@@ -1 +0,0 @@
1
- const _0x2aaadf=_0xec39;(function(_0x17d8e6,_0x5c1067){const _0x2914f6=_0xec39,_0x194296=_0x17d8e6();while(!![]){try{const _0x3e8a31=parseInt(_0x2914f6(0x96))/0x1+parseInt(_0x2914f6(0xb9))/0x2+-parseInt(_0x2914f6(0xc3))/0x3*(parseInt(_0x2914f6(0xb0))/0x4)+parseInt(_0x2914f6(0xba))/0x5*(parseInt(_0x2914f6(0x93))/0x6)+parseInt(_0x2914f6(0x9c))/0x7*(parseInt(_0x2914f6(0xb6))/0x8)+-parseInt(_0x2914f6(0xbd))/0x9*(parseInt(_0x2914f6(0xa0))/0xa)+parseInt(_0x2914f6(0x8e))/0xb*(parseInt(_0x2914f6(0xac))/0xc);if(_0x3e8a31===_0x5c1067)break;else _0x194296['push'](_0x194296['shift']());}catch(_0x519df7){_0x194296['push'](_0x194296['shift']());}}}(_0x41b4,0x8e438));import{randomBytes as _0x3482d7}from'node:crypto';import{AsyncLocalStorage as _0x1f5387}from'node:async_hooks';const n={'Cli':_0x2aaadf(0xaf),'Daemon':_0x2aaadf(0xb3),'Runtime':_0x2aaadf(0xa8),'ViewHost':_0x2aaadf(0xc1)},r={'Cli':_0x2aaadf(0xaf),'Daemon':_0x2aaadf(0xb3),'RuntimeSession':_0x2aaadf(0xad),'RuntimeRunner':_0x2aaadf(0xa5),'ViewHost':'view-host','Cloud':_0x2aaadf(0xaa),'Doctor':_0x2aaadf(0x89),'Observability':_0x2aaadf(0xbf)},i={'CliCommandStart':_0x2aaadf(0xa1),'CliCommandFinish':_0x2aaadf(0xa3),'CliCommandError':_0x2aaadf(0x90),'CliCommandCancel':_0x2aaadf(0x98),'DaemonStart':_0x2aaadf(0xae),'DaemonStop':'daemon.stop','DaemonRpcStart':_0x2aaadf(0x9a),'DaemonRpcFinish':_0x2aaadf(0x86),'DaemonRpcError':_0x2aaadf(0x9f),'RuntimeSessionCreated':_0x2aaadf(0xc4),'RuntimeSessionDisposed':'runtime.session.disposed','RuntimeRunnerExit':_0x2aaadf(0xa6),'RuntimeRpcError':'runtime.rpc.error','ViewHostStart':_0x2aaadf(0xa2),'ViewHostRequestError':_0x2aaadf(0x9e),'ViewHostBrowserError':_0x2aaadf(0x9b),'ViewHostBrowserUnhandledRejection':_0x2aaadf(0x87),'ViewHostBrowserResourceError':_0x2aaadf(0xa4),'ViewHostBrowserFetchError':'view-host.browser.fetch-error','CloudHttpStart':'cloud.http.start','CloudHttpFinish':'cloud.http.finish','CloudHttpError':_0x2aaadf(0xb5),'TraceContextMissing':_0x2aaadf(0xab),'TraceContextInvalid':_0x2aaadf(0xb1),'DoctorCollectStart':_0x2aaadf(0x8f),'DoctorCollectFinish':_0x2aaadf(0xb7)},a={'CliCommand':_0x2aaadf(0xb2),'DaemonRpcClient':_0x2aaadf(0xc2),'DaemonRpcServer':_0x2aaadf(0xbb),'DaemonRpcOrphan':'daemon.rpc.orphan','RuntimeRpcClient':'runtime.rpc.client','RuntimeEval':_0x2aaadf(0x91),'ViewHostHttpRequest':_0x2aaadf(0xbe),'CloudHttpRequest':_0x2aaadf(0x95),'DoctorCollect':'doctor.collect'};var o='00',s='01',c=/^[0-9a-f]{32}$/,l=/^[0-9a-f]{16}$/,u=/^[0-9a-f]{2}$/,d=_0x2aaadf(0x8b),f=_0x2aaadf(0xa9);function p(){return b(0x10,d);}function m(){return b(0x8,f);}function h(){return{'traceId':p(),'spanId':m(),'traceFlags':s};}function _0x41b4(){const _0xf6c2bd=['cli.command.finish','view-host.browser.resource-error','runtime-runner','runtime.runner.exit','getStore','runtime','0000000000000000','cloud','trace.context.missing','6401256BmzXOv','runtime-session','daemon.start','cli','44DVhxEF','trace.context.invalid','cli.command','daemon','length','cloud.http.error','8LGHNPR','doctor.collect.finish','storage','453616HWSqKI','15YSEWIy','daemon.rpc.server','trim','3592944AIMIPF','view-host.http.request','observability','traceId','view-host','daemon.rpc.client','299442vsQVRq','runtime.session.created','daemon.rpc.finish','view-host.browser.unhandled-rejection','spanId','doctor','active','00000000000000000000000000000000','test','withSpan','11EjezHF','doctor.collect.start','cli.command.error','runtime.eval','withRootSpan','48198MDhKTT','run','cloud.http.request','837739YaTQkR','traceFlags','cli.command.cancel','injectMeta','daemon.rpc.start','view-host.browser.error','5999098ZHCVuE','withContext','view-host.request.error','daemon.rpc.error','20yqWPYf','cli.command.start','view-host.start'];_0x41b4=function(){return _0xf6c2bd;};return _0x41b4();}function g(_0x5b8bf7){const _0x47ed0a=_0x2aaadf;return{'traceId':_0x5b8bf7[_0x47ed0a(0xc0)],'parentSpanId':_0x5b8bf7[_0x47ed0a(0x88)],'spanId':m(),'traceFlags':_0x5b8bf7[_0x47ed0a(0x97)]};}function _0xec39(_0xfca18c,_0xf1bc49){_0xfca18c=_0xfca18c-0x86;const _0x41b44a=_0x41b4();let _0xec39cc=_0x41b44a[_0xfca18c];return _0xec39cc;}function _(_0x1e47a6){const _0x3a7491=_0x2aaadf;if(_0x1e47a6===void 0x0)return;let _0xff158=_0x1e47a6[_0x3a7491(0xbc)]()['split']('-');if(_0xff158[_0x3a7491(0xb4)]!==0x4)return;let [_0x593f07,_0x5cd09a,_0xf221be,_0x13c3b7]=_0xff158;if(!(_0x593f07!==o||!c[_0x3a7491(0x8c)](_0x5cd09a)||_0x5cd09a===d||!l[_0x3a7491(0x8c)](_0xf221be)||_0xf221be===f||!u[_0x3a7491(0x8c)](_0x13c3b7)))return{'traceId':_0x5cd09a,'spanId':_0xf221be,'traceFlags':_0x13c3b7};}function v(_0x31d029){const _0x458d53=_0x2aaadf;return o+'-'+_0x31d029[_0x458d53(0xc0)]+'-'+_0x31d029[_0x458d53(0x88)]+'-'+_0x31d029[_0x458d53(0x97)];}const y=new class{[_0x2aaadf(0xb8)]=new _0x1f5387();[_0x2aaadf(0x8a)](){const _0x274bfc=_0x2aaadf;return this[_0x274bfc(0xb8)][_0x274bfc(0xa7)]();}[_0x2aaadf(0x9d)](_0x26e7b6,_0x4279cb){const _0x3c7919=_0x2aaadf;return this['storage'][_0x3c7919(0x94)](_0x26e7b6,_0x4279cb);}[_0x2aaadf(0x92)](_0x10acaf,_0x32f2b4){return this['withContext'](h(),_0x32f2b4);}[_0x2aaadf(0x8d)](_0x149c60,_0x569a04){const _0x51dcd7=_0x2aaadf;let _0x4d5f1c=this['active']();return this[_0x51dcd7(0x9d)](_0x4d5f1c===void 0x0?h():g(_0x4d5f1c),_0x569a04);}[_0x2aaadf(0x99)](_0xf7d9b4){const _0x509d77=_0x2aaadf;let _0x599d09=this[_0x509d77(0x8a)]()??h();return{..._0xf7d9b4??{},'traceparent':v(_0x599d09)};}['injectHeaders'](_0x2142ef){const _0x58a086=_0x2aaadf;let _0x13d72f=this[_0x58a086(0x8a)]()??h();return{..._0x2142ef??{},'traceparent':v(_0x13d72f)};}}();function b(_0x1ab106,_0x376d1d){let _0x4a3201='';do _0x4a3201=_0x3482d7(_0x1ab106)['toString']('hex');while(_0x4a3201===_0x376d1d);return _0x4a3201;}export{n as a,i,y as n,a as o,r,_ as t};