univer-cli 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/build-id-Coc3wh1M.js +1 -1
- package/chunks/headless-univer-BWfA31gd.js +1 -1
- package/chunks/runtime-eval-kernels-CnEan2Vi.js +1 -0
- package/chunks/runtime-manifest-Bt390kp8.js +1 -1
- package/chunks/trace-DPfd8LdJ.js +1 -1
- package/internal/cli.js +1 -1
- package/internal/daemon.js +1 -1
- package/internal/univer-runner.js +1 -1
- package/package.json +1 -1
- package/view/browser/assets/formula-dependency-graph-panel.js +1 -1
- package/view/browser/assets/viewer.js +2 -1
- package/chunks/runtime-eval-kernels-dRCWgwtH.js +0 -1
package/internal/daemon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x4be2cc=_0x35db;(function(_0x5c7b47,_0xf897d8){const _0x52a839=_0x35db,_0x42f0b0=_0x5c7b47();while(!![]){try{const _0x1b3fae=parseInt(_0x52a839(0xd3))/0x1+-parseInt(_0x52a839(0x85))/0x2+-parseInt(_0x52a839(0x9e))/0x3*(-parseInt(_0x52a839(0x95))/0x4)+parseInt(_0x52a839(0x9b))/0x5*(-parseInt(_0x52a839(0x80))/0x6)+-parseInt(_0x52a839(0x94))/0x7+parseInt(_0x52a839(0x9d))/0x8+parseInt(_0x52a839(0x9a))/0x9*(parseInt(_0x52a839(0xb4))/0xa);if(_0x1b3fae===_0xf897d8)break;else _0x42f0b0['push'](_0x42f0b0['shift']());}catch(_0x142e48){_0x42f0b0['push'](_0x42f0b0['shift']());}}}(_0x29f3,0xbfe45));import'../chunks/vendor-DjomC5bd.js';function _0x35db(_0x16d5eb,_0x8f0337){_0x16d5eb=_0x16d5eb-0x80;const _0x29f3b4=_0x29f3();let _0x35db09=_0x29f3b4[_0x16d5eb];return _0x35db09;}import{a as _0x51a5c7,i as _0x1298c6,n,o as _0x7871ff,r as _0xb42a54,t as _0x44c359}from'../chunks/trace-DPfd8LdJ.js';import{a as _0x2a0281,d as _0x4448ba,l as _0x989a34,m as _0x355b94,n as _0x310715,r as _0x48bc00,u as _0x6cbaaa}from'../chunks/runtime-manifest-Bt390kp8.js';import{t as _0x1f6565}from'../chunks/build-id-Coc3wh1M.js';import{existsSync as _0x1a868c}from'node:fs';import{chmod as _0x23b7ab,mkdir as _0x1ccde6,readFile as _0x4bb7ff,rm as _0x5800c4,writeFile as _0x42e069}from'node:fs/promises';import _0x47384c from'node:net';import _0x40a3c7 from'node:process';var S=new _0x48bc00();async function C(_0x5c1465={}){const _0x2959be=_0x35db;let _0x8ebd40=_0x5c1465[_0x2959be(0xba)]??_0x40a3c7[_0x2959be(0xba)],_0x455a5d=_0x6cbaaa(_0x8ebd40),_0x248c4f=_0x310715(_0x8ebd40),_0x1fe5fd=_0x5c1465[_0x2959be(0xe0)]??E(new _0x2a0281({'env':_0x8ebd40,'logger':_0x4448ba({'env':_0x8ebd40,'role':_0x51a5c7[_0x2959be(0xa7)]}),'resolveExecutionPlaneOptions':()=>({'execArgv':[..._0x248c4f[_0x2959be(0x8d)][_0x2959be(0x99)]],'modulePath':_0x248c4f[_0x2959be(0x8d)]['modulePath']})})),_0x190eee=_0x1f6565(_0x8ebd40),_0xc0a10f=new Date()[_0x2959be(0xae)]();if(await _0x1ccde6(_0x455a5d[_0x2959be(0xb1)],{'recursive':!0x0,'mode':0x1c0}),await _0x1ccde6(_0x455a5d[_0x2959be(0xcc)],{'recursive':!0x0,'mode':0x1c0}),!await M(_0x455a5d['lockPath'],_0x455a5d[_0x2959be(0xda)])){if(await N(_0x455a5d[_0x2959be(0xb9)]))return;throw Error(_0x2959be(0xca)+_0x455a5d[_0x2959be(0xb2)]);}await j(_0x455a5d);let _0x306d2f=_0x4448ba({'env':_0x8ebd40,'role':_0x51a5c7[_0x2959be(0xf4)]}),_0x3ec81e=k({'buildId':_0x190eee,'env':_0x8ebd40,'pid':_0x40a3c7[_0x2959be(0xc4)]}),_0x178db0=!0x1,_0x47e3dc={},_0x44e69c=async _0x21990d=>z(null,-0x7f5b,Error('Daemon\x20handler\x20not\x20ready:\x20'+_0x21990d)),_0xb65d3a=_0x47384c['createServer'](_0x20bb4f=>{const _0x1e4ecf=_0x2959be;let _0x161f53='';_0x20bb4f['on']('data',_0xf49c41=>{const _0x2a04f2=_0x35db;_0x161f53+=_0xf49c41[_0x2a04f2(0xa1)](_0x2a04f2(0xb7)),_0xea1841();}),_0x20bb4f['on'](_0x1e4ecf(0x86),()=>void 0x0);let _0xea1841=async()=>{const _0x3739aa=_0x1e4ecf;for(;;){let _0x2f2b63=_0x161f53[_0x3739aa(0xa6)]('\x0a');if(_0x2f2b63<0x0)return;let _0x51e335=_0x161f53['slice'](0x0,_0x2f2b63)['trim']();if(_0x161f53=_0x161f53['slice'](_0x2f2b63+0x1),!_0x51e335)continue;let _0xea2211=await _0x44e69c(_0x51e335);_0x20bb4f['write'](JSON[_0x3739aa(0xcb)](_0xea2211)+'\x0a');}};});_0x44e69c=w({'buildId':_0x190eee,'logRequestEvent':async _0x4dba5a=>{const _0x1101c2=_0x2959be;_0x306d2f[_0x1101c2(0xa0)]({'level':_0x4dba5a[_0x1101c2(0x82)]===_0x1298c6[_0x1101c2(0xf2)]?'error':'info','event_name':_0x4dba5a[_0x1101c2(0x82)],'component':_0xb42a54[_0x1101c2(0xf4)],'process_role':_0x51a5c7[_0x1101c2(0xf4)],..._0x4dba5a[_0x1101c2(0x86)]===void 0x0?{}:{'error':_0x4dba5a[_0x1101c2(0x86)]},'fields':{..._0x3ec81e,..._0x4dba5a[_0x1101c2(0xb5)]===void 0x0?{}:{'duration_ms':_0x4dba5a[_0x1101c2(0xb5)]},'method':_0x4dba5a[_0x1101c2(0xdc)],'timestamp':_0x4dba5a[_0x1101c2(0xd2)]}});},'logRequestError':async _0x1153f2=>{const _0x138363=_0x2959be;_0x306d2f['error']({'event_name':_0x1298c6[_0x138363(0xf2)],'component':_0xb42a54[_0x138363(0xf4)],'process_role':_0x51a5c7[_0x138363(0xf4)],'error':_0x1153f2[_0x138363(0x86)],'fields':{..._0x3ec81e,'method':_0x1153f2['method'],'timestamp':_0x1153f2[_0x138363(0xd2)]}});},'onShutdownRequest':()=>{const _0x469c05=_0x2959be;_0x314f57(_0x469c05(0xe8))[_0x469c05(0xbb)](()=>{const _0x274803=_0x469c05;_0x40a3c7[_0x274803(0xbf)](0x0);});},'pid':_0x40a3c7[_0x2959be(0xc4)],'runtimeRoot':_0x455a5d[_0x2959be(0xdd)],'sessionHost':_0x1fe5fd,'socketPath':_0x455a5d[_0x2959be(0xb9)],'startedAt':_0xc0a10f}),await new Promise((_0x12944d,_0x3bc674)=>{const _0x11d2f2=_0x2959be;_0xb65d3a[_0x11d2f2(0xad)]('error',_0x3bc674),_0xb65d3a[_0x11d2f2(0xef)](_0x455a5d[_0x11d2f2(0xb9)],_0x12944d);}),_0x989a34(_0x455a5d[_0x2959be(0xb9)])||await _0x23b7ab(_0x455a5d['socketPath'],0x180);let _0x5778d5={'pid':_0x40a3c7[_0x2959be(0xc4)],'startedAt':_0xc0a10f,'socketPath':_0x455a5d['socketPath'],'runtimeRoot':_0x455a5d[_0x2959be(0xdd)],'buildId':_0x190eee};await _0x42e069(_0x455a5d[_0x2959be(0xda)],String(_0x40a3c7[_0x2959be(0xc4)]),_0x2959be(0xb7)),await _0x42e069(_0x455a5d[_0x2959be(0xa2)],JSON[_0x2959be(0xcb)](_0x5778d5,null,0x2),_0x2959be(0xb7)),_0x306d2f[_0x2959be(0xb8)]({'event_name':_0x1298c6[_0x2959be(0xe2)],'component':_0xb42a54[_0x2959be(0xf4)],'process_role':_0x51a5c7['Daemon'],'fields':{..._0x3ec81e,'pid':_0x40a3c7['pid'],'runtime_root':_0x455a5d[_0x2959be(0xdd)],'socket_path':_0x455a5d['socketPath'],'started_at':_0xc0a10f}}),await _0x306d2f['flush']();let _0x58759b=setInterval(()=>{_0x1fe5fd['unloadIdleSessions']();},Math[_0x2959be(0xeb)](0x3e8,Math[_0x2959be(0xdf)](_0x1fe5fd['getSessionIdleTtlMs'](),0xea60)));_0x58759b[_0x2959be(0x88)](),_0x47e3dc[_0x2959be(0x97)]=_0x58759b;async function _0x314f57(_0x18c85f){const _0x4a1e0e=_0x2959be;_0x178db0||(_0x178db0=!0x0,_0x47e3dc[_0x4a1e0e(0x97)]!==void 0x0&&clearInterval(_0x47e3dc['current']),_0x306d2f[_0x4a1e0e(0xb8)]({'event_name':_0x1298c6[_0x4a1e0e(0x9f)],'component':_0xb42a54[_0x4a1e0e(0xf4)],'process_role':_0x51a5c7[_0x4a1e0e(0xf4)],'fields':{..._0x3ec81e,'pid':_0x40a3c7[_0x4a1e0e(0xc4)],'reason':_0x18c85f,'timestamp':new Date()['toISOString']()}}),await _0x306d2f['flush'](),await _0x1fe5fd[_0x4a1e0e(0xaf)](_0x18c85f),await new Promise(_0xd89caf=>{const _0x4b3200=_0x4a1e0e;_0xb65d3a[_0x4b3200(0xe4)](()=>_0xd89caf());}),await F(_0x455a5d['socketPath']),await _0x5800c4(_0x455a5d[_0x4a1e0e(0xda)],{'force':!0x0})['catch'](()=>void 0x0),await _0x5800c4(_0x455a5d[_0x4a1e0e(0xa2)],{'force':!0x0})[_0x4a1e0e(0xc2)](()=>void 0x0),await _0x5800c4(_0x455a5d[_0x4a1e0e(0xb2)],{'recursive':!0x0,'force':!0x0})[_0x4a1e0e(0xc2)](()=>void 0x0));}_0x40a3c7['on']('SIGINT',()=>{const _0x58aa0d=_0x2959be;_0x314f57(_0x58aa0d(0xd8))[_0x58aa0d(0xbb)](()=>{_0x40a3c7['exit'](0x0);});}),_0x40a3c7['on'](_0x2959be(0xe9),()=>{const _0x16c64a=_0x2959be;_0x314f57(_0x16c64a(0xf5))[_0x16c64a(0xbb)](()=>{const _0x3a3ca2=_0x16c64a;_0x40a3c7[_0x3a3ca2(0xbf)](0x0);});});}function w(_0x6dcbd4){return async _0x3d43eb=>{const _0x5dba2e=_0x35db;let _0x2fd591;try{_0x2fd591=JSON[_0x5dba2e(0x89)](_0x3d43eb);}catch(_0x881c11){return z(null,-0x7fbc,_0x881c11);}let _0x58c72d=_0x44c359(_0x2fd591[_0x5dba2e(0xd1)]?.['traceparent']),_0x38b78f=async()=>await n[_0x5dba2e(0x83)]({'name':_0x7871ff[_0x5dba2e(0xf1)],'kind':_0x5dba2e(0x84)},async()=>{const _0x4c9f1c=_0x5dba2e;let _0x21ded0=Date[_0x4c9f1c(0xc6)]();await _0x6dcbd4['logRequestEvent']?.({'eventName':_0x1298c6[_0x4c9f1c(0x98)],'method':_0x2fd591[_0x4c9f1c(0xdc)],'timestamp':new Date()[_0x4c9f1c(0xae)]()});try{let _0x59aae5=await T(_0x2fd591,_0x6dcbd4);return await _0x6dcbd4[_0x4c9f1c(0xec)]?.({'durationMs':Date['now']()-_0x21ded0,'eventName':_0x1298c6['DaemonRpcFinish'],'method':_0x2fd591[_0x4c9f1c(0xdc)],'timestamp':new Date()[_0x4c9f1c(0xae)]()}),_0x59aae5;}catch(_0x36885d){return await _0x6dcbd4[_0x4c9f1c(0xec)]?.({'durationMs':Date[_0x4c9f1c(0xc6)]()-_0x21ded0,'eventName':_0x1298c6[_0x4c9f1c(0xf2)],'method':_0x2fd591['method'],'error':_0x36885d,'timestamp':new Date()['toISOString']()}),_0x6dcbd4[_0x4c9f1c(0xec)]===void 0x0&&await _0x6dcbd4[_0x4c9f1c(0xb3)]?.({'method':_0x2fd591['method'],'error':_0x36885d instanceof Error?_0x36885d[_0x4c9f1c(0xe6)]:String(_0x36885d),'timestamp':new Date()[_0x4c9f1c(0xae)]()}),z(_0x2fd591['id'],-0x7f5b,_0x36885d);}});return _0x58c72d===void 0x0?await _0x38b78f():await n[_0x5dba2e(0xc9)](_0x58c72d,_0x38b78f);};}async function T(_0x2a875b,_0x4ff70a){const _0x5f5aae=_0x35db;switch(_0x2a875b[_0x5f5aae(0xdc)]){case _0x355b94[_0x5f5aae(0xa4)]:return{'jsonrpc':_0x5f5aae(0xbd),'id':_0x2a875b['id'],'result':{'ok':!0x0,'pid':_0x4ff70a['pid'],'startedAt':_0x4ff70a[_0x5f5aae(0x81)],'socketPath':_0x4ff70a[_0x5f5aae(0xb9)],'runtimeRoot':_0x4ff70a[_0x5f5aae(0x8c)],'buildId':_0x4ff70a[_0x5f5aae(0xcf)],'sessionCount':_0x4ff70a[_0x5f5aae(0xe0)][_0x5f5aae(0xf6)]()}};case _0x355b94[_0x5f5aae(0xe3)]:return _0x4ff70a[_0x5f5aae(0xd6)]?.(),{'jsonrpc':_0x5f5aae(0xbd),'id':_0x2a875b['id'],'result':{'stopping':!0x0}};case _0x355b94[_0x5f5aae(0xc5)]:{let _0x2f1ff9=await _0x4ff70a['sessionHost'][_0x5f5aae(0xa5)](_0x2a875b[_0x5f5aae(0xf0)]);return R(_0x2a875b['id'],_0x2f1ff9);}case _0x355b94['SessionLoadWorkbookDataReplayPack']:{let _0x22739c=await _0x4ff70a['sessionHost']['loadWorkbookDataReplayPack'](_0x2a875b[_0x5f5aae(0xf0)]);return R(_0x2a875b['id'],_0x22739c);}case _0x355b94['SessionCreateWorkbook']:{let _0x112e06=await _0x4ff70a['sessionHost']['createWorkbook'](_0x2a875b[_0x5f5aae(0xf0)]);return R(_0x2a875b['id'],_0x112e06);}case _0x355b94[_0x5f5aae(0xed)]:{let _0x1cf042=await _0x4ff70a['sessionHost']['evalJs'](_0x2a875b[_0x5f5aae(0xf0)]);return R(_0x2a875b['id'],_0x1cf042);}case _0x355b94['SessionExportWorkbookFile']:{let _0x15ed0b=await _0x4ff70a[_0x5f5aae(0xe0)]['exportWorkbookFile'](_0x2a875b[_0x5f5aae(0xf0)]);return R(_0x2a875b['id'],_0x15ed0b);}case _0x355b94[_0x5f5aae(0xcd)]:{let _0x50b2ea=_0x2a875b[_0x5f5aae(0xf0)],_0x16584e=await _0x4ff70a[_0x5f5aae(0xe0)][_0x5f5aae(0xbc)](_0x50b2ea);return R(_0x2a875b['id'],_0x16584e);}case _0x355b94[_0x5f5aae(0xa9)]:{let _0x1fdc8f=await _0x4ff70a[_0x5f5aae(0xe0)][_0x5f5aae(0x8f)](_0x2a875b[_0x5f5aae(0xf0)]);return R(_0x2a875b['id'],_0x1fdc8f);}case _0x355b94[_0x5f5aae(0x96)]:{let _0x323108=await _0x4ff70a[_0x5f5aae(0xe0)][_0x5f5aae(0xc8)](_0x2a875b['params']);return R(_0x2a875b['id'],_0x323108);}default:return z(_0x2a875b['id'],-0x7f59,Error(_0x5f5aae(0xd4)+_0x2a875b[_0x5f5aae(0xdc)]));}}function E(_0x4a8c2b){return{async 'createWorkbook'(_0x1f3651){const _0x44a7f2=_0x35db;let _0x2e897d=await D(_0x1f3651),_0x4fa121=await _0x4a8c2b['createWorkbook']({..._0x1f3651['cwd']===void 0x0?{}:{'cwd':_0x1f3651['cwd']},'identity':_0x2e897d,..._0x1f3651['id']===void 0x0?{}:{'workbookId':_0x1f3651['id']},..._0x1f3651[_0x44a7f2(0xdb)]===void 0x0?{}:{'workbookName':_0x1f3651[_0x44a7f2(0xdb)]}});return{'success':!0x0,'workbookData':_0x4fa121[_0x44a7f2(0xaa)],'session':O(_0x4fa121[_0x44a7f2(0x8a)])};},async 'dispose'(_0x530422){const _0x44824e=_0x35db;let _0x2aec22=await D(_0x530422);return await _0x4a8c2b[_0x44824e(0x8f)]({..._0x530422['cwd']===void 0x0?{}:{'cwd':_0x530422[_0x44824e(0xbe)]},'identity':_0x2aec22}),{'disposed':!0x0,'workbookIdentity':_0x2aec22[_0x44824e(0xac)]};},async 'destroyAll'(_0xdde025){await _0x4a8c2b['destroyAll']?.(_0xdde025);},async 'evalJs'(_0x337b37){const _0x116ebd=_0x35db;let _0x41459a=await D(_0x337b37),_0x1b59e0=await _0x4a8c2b[_0x116ebd(0x90)]({'code':_0x337b37['code'],..._0x337b37['cwd']===void 0x0?{}:{'cwd':_0x337b37[_0x116ebd(0xbe)]},'identity':_0x41459a,..._0x337b37[_0x116ebd(0xf3)]===void 0x0?{}:{'mutates':_0x337b37[_0x116ebd(0xf3)]}});return{..._0x1b59e0[_0x116ebd(0xe7)]===void 0x0?{}:{'mutations':_0x1b59e0['mutations']},'success':!0x0,'value':_0x1b59e0[_0x116ebd(0x9c)],'session':O(_0x1b59e0[_0x116ebd(0x8a)])};},async 'exportWorkbookData'(_0x269514){const _0xf9ca2=_0x35db;let _0x4cb5a7=await D(_0x269514),_0x35dfae=await _0x4a8c2b[_0xf9ca2(0xbc)]({..._0x269514[_0xf9ca2(0xbe)]===void 0x0?{}:{'cwd':_0x269514[_0xf9ca2(0xbe)]},'identity':_0x4cb5a7});return{'success':!0x0,'workbookData':_0x35dfae['workbookData'],'session':O(_0x35dfae[_0xf9ca2(0x8a)])};},async 'exportWorkbookFile'(_0x3d0185){const _0x2d85bd=_0x35db;let _0x1ee201=await D(_0x3d0185),_0xa9516=await _0x4a8c2b['exportWorkbookFile']({..._0x3d0185[_0x2d85bd(0xbe)]===void 0x0?{}:{'cwd':_0x3d0185[_0x2d85bd(0xbe)]},'format':_0x3d0185[_0x2d85bd(0xe1)],'identity':_0x1ee201,'outputPath':_0x3d0185['outputPath']});return{'success':!0x0,'format':_0xa9516[_0x2d85bd(0xe1)],'outputPath':_0xa9516[_0x2d85bd(0xde)],'sizeBytes':_0xa9516['sizeBytes'],'session':O(_0xa9516[_0x2d85bd(0x8a)])};},async 'getWorkbookSession'(_0x36abdb){const _0x4af6de=_0x35db;let _0x474c29=await D(_0x36abdb),_0x5a7054=await _0x4a8c2b[_0x4af6de(0x92)]({..._0x36abdb[_0x4af6de(0xbe)]===void 0x0?{}:{'cwd':_0x36abdb[_0x4af6de(0xbe)]},'identity':_0x474c29});return{'exists':_0x5a7054!==null,'session':_0x5a7054===null?null:O(_0x5a7054)};},'getSessionCount'(){return _0x4a8c2b['getSessionCount']?.()??0x0;},'getSessionIdleTtlMs'(){const _0x2e933e=_0x35db;return _0x4a8c2b[_0x2e933e(0xa3)]?.()??0xea60;},async 'loadWorkbook'(_0x5a6c8d){const _0x24bea0=_0x35db;let _0x1c8a2a=await D(_0x5a6c8d),_0x657b63=await _0x4a8c2b[_0x24bea0(0xb6)]({..._0x5a6c8d[_0x24bea0(0xbe)]===void 0x0?{}:{'cwd':_0x5a6c8d['cwd']},'identity':_0x1c8a2a,'workbookData':_0x5a6c8d[_0x24bea0(0xaa)]});return{'success':!0x0,'workbookData':_0x657b63[_0x24bea0(0xaa)],'session':O(_0x657b63[_0x24bea0(0x8a)])};},async 'loadWorkbookDataReplayPack'(_0x3ed692){const _0x1cd9a3=_0x35db;let _0x2bd1b4=await D(_0x3ed692),_0x322820=await _0x4a8c2b[_0x1cd9a3(0xd9)]({..._0x3ed692['cwd']===void 0x0?{}:{'cwd':_0x3ed692[_0x1cd9a3(0xbe)]},'identity':_0x2bd1b4,'replayPack':{'baseWorkbookData':_0x3ed692[_0x1cd9a3(0xe5)],'mutations':_0x3ed692[_0x1cd9a3(0xe7)]}});return{'success':!0x0,'workbookData':_0x322820[_0x1cd9a3(0xaa)],'session':O(_0x322820[_0x1cd9a3(0x8a)])};},async 'unloadIdleSessions'(){const _0xf97ae4=_0x35db;await _0x4a8c2b[_0xf97ae4(0x87)]?.();}};}async function D(_0x3f04b4){const _0x12c518=_0x35db;return await S[_0x12c518(0xd5)](_0x3f04b4);}function O(_0x53d210){const _0x54ecfb=_0x35db;return{'createdAt':_0x53d210[_0x54ecfb(0xc1)]??'','lastAccessedAt':_0x53d210[_0x54ecfb(0x8b)]??'','sessionId':_0x53d210['sessionId'],'workbookIdentity':_0x53d210['packageIdentity'][_0x54ecfb(0xac)]};}function k(_0x3064e4){const _0x188813=_0x35db;return{'build.id':A(_0x3064e4['env'],_0x188813(0xc0))??_0x3064e4[_0x188813(0xcf)],'deployment.environment.name':_0x188813(0xee),'distribution.channel':A(_0x3064e4[_0x188813(0xba)],'UNIVER_DISTRIBUTION_CHANNEL')??_0x188813(0xab),'service.instance.id':String(_0x3064e4[_0x188813(0xc4)]),'service.name':_0x188813(0xc7),...A(_0x3064e4['env'],_0x188813(0xea))===void 0x0?{}:{'service.version':A(_0x3064e4[_0x188813(0xba)],_0x188813(0xea))}};}function A(_0x52adaf,_0x1e917a){const _0x123121=_0x35db;let _0xc888ef=_0x52adaf[_0x1e917a]?.[_0x123121(0x91)]();return _0xc888ef===void 0x0||_0xc888ef[_0x123121(0xce)]===0x0?void 0x0:_0xc888ef;}async function j(_0x23f27a){const _0xccb667=_0x35db;P(_0x23f27a[_0xccb667(0xb9)])&&!await N(_0x23f27a[_0xccb667(0xb9)])&&await F(_0x23f27a['socketPath']);let _0x313a0c=await I(_0x23f27a[_0xccb667(0xda)]);_0x313a0c!==null&&!L(_0x313a0c)&&(await _0x5800c4(_0x23f27a[_0xccb667(0xda)],{'force':!0x0})[_0xccb667(0xc2)](()=>void 0x0),await _0x5800c4(_0x23f27a['metaPath'],{'force':!0x0})[_0xccb667(0xc2)](()=>void 0x0),await _0x5800c4(_0x23f27a[_0xccb667(0xb2)],{'recursive':!0x0,'force':!0x0})[_0xccb667(0xc2)](()=>void 0x0));}async function M(_0x4f46d0,_0x164210){try{return await _0x1ccde6(_0x4f46d0,{'recursive':!0x1,'mode':0x1c0}),!0x0;}catch(_0x5b15aa){if(_0x5b15aa['code']!=='EEXIST')throw _0x5b15aa;let _0x524700=await I(_0x164210);return _0x524700!==null&&L(_0x524700)?!0x1:(await _0x5800c4(_0x4f46d0,{'recursive':!0x0,'force':!0x0}),await _0x1ccde6(_0x4f46d0,{'recursive':!0x1,'mode':0x1c0}),!0x0);}}async function N(_0x3e36ef){return await new Promise(_0x7bdded=>{const _0x459200=_0x35db;let _0x3e9fc2=_0x47384c[_0x459200(0xc3)](_0x3e36ef);_0x3e9fc2[_0x459200(0xad)](_0x459200(0xa8),()=>{const _0x832703=_0x459200;_0x3e9fc2[_0x832703(0xd7)](),_0x7bdded(!0x0);}),_0x3e9fc2[_0x459200(0xad)](_0x459200(0x86),()=>{_0x7bdded(!0x1);});});}function P(_0x252fce){return _0x989a34(_0x252fce)?!0x1:_0x1a868c(_0x252fce);}async function F(_0x36a74f){const _0x1d1e61=_0x35db;_0x989a34(_0x36a74f)||await _0x5800c4(_0x36a74f,{'force':!0x0})[_0x1d1e61(0xc2)](()=>void 0x0);}async function I(_0x5f43aa){const _0x5d34ee=_0x35db;try{let _0x2f648a=await _0x4bb7ff(_0x5f43aa,_0x5d34ee(0xb7)),_0x60a71d=Number(_0x2f648a[_0x5d34ee(0x91)]());return Number['isFinite'](_0x60a71d)?_0x60a71d:null;}catch{return null;}}function L(_0x3f9a4b){const _0x353da0=_0x35db;try{return _0x40a3c7[_0x353da0(0xd0)](_0x3f9a4b,0x0),!0x0;}catch{return!0x1;}}function R(_0xb52cc8,_0x15892d){return{'jsonrpc':'2.0','id':_0xb52cc8,'result':_0x15892d};}function z(_0x196d9f,_0x4465f4,_0x184714){const _0x38f83e=_0x35db;return{'jsonrpc':'2.0','id':_0x196d9f,'error':{'code':_0x4465f4,'message':_0x184714 instanceof Error?_0x184714[_0x38f83e(0xe6)]:String(_0x184714)}};}var B=process[_0x4be2cc(0xb0)][0x2]??_0x4be2cc(0x93);B!==_0x4be2cc(0x93)&&(console[_0x4be2cc(0x86)](_0x4be2cc(0x8e)+B),process[_0x4be2cc(0xbf)](0x1)),C()[_0x4be2cc(0xc2)](_0x4f557a=>{const _0x219dd9=_0x4be2cc;console['error'](_0x4f557a instanceof Error?_0x4f557a[_0x219dd9(0xe6)]:String(_0x4f557a)),process['exit'](0x1);});function _0x29f3(){const _0x3f82bc=['UNIVER_CLI_VERSION','max','logRequestEvent','SessionEvalJs','local','listen','params','DaemonRpcServer','DaemonRpcError','mutates','Daemon','sigterm','getSessionCount','19338RqxzqA','startedAt','eventName','withSpan','server','1417692nNmkAn','error','unloadIdleSessions','unref','parse','session','lastAccessedAt','runtimeRoot','runtimeExecutionPlaneEntry','Unknown\x20daemon\x20subcommand:\x20','dispose','evalJs','trim','getSession','serve','8229144BKhvxM','52PFPmnn','SessionGetWorkbook','current','DaemonRpcStart','execArgv','711gSyWwn','2135VPODJv','value','1723208EjlOEj','126192MZUoJR','DaemonStop','event','toString','metaPath','getSessionIdleTtlMs','Health','loadWorkbook','indexOf','Runtime','connect','SessionDispose','workbookData','unknown','absolutePath','once','toISOString','destroyAll','argv','daemonDir','lockPath','logRequestError','343760dAPvze','durationMs','loadWorkbookData','utf8','info','socketPath','env','finally','exportWorkbookData','2.0','cwd','exit','UNIVER_CLI_BUILD_ID','createdAt','catch','createConnection','pid','SessionLoadWorkbook','now','univer-daemon','getWorkbookSession','withContext','Another\x20daemon\x20startup\x20owns\x20','stringify','sessionRoot','SessionExportWorkbookData','length','buildId','kill','meta','timestamp','568711RPZEGA','Method\x20not\x20found:\x20','resolveIdentity','onShutdownRequest','end','sigint','loadWorkbookDataReplayPack','pidPath','name','method','homeDir','outputPath','min','sessionHost','format','DaemonStart','Shutdown','close','baseWorkbookData','message','mutations','rpc-shutdown','SIGTERM'];_0x29f3=function(){return _0x3f82bc;};return _0x29f3();}
|
|
2
|
+
function _0x5380(){const _0x87daf4=['packageIdentity','catch','unref','SIGTERM','6dLUdOM','unknown','exportWorkbookData','now','sessionRoot','loadWorkbook','logRequestEvent','env','connect','SIGINT','name','SessionEvalJs','serve','getSessionCount','max','flush','workbookData','Another\x20daemon\x20startup\x20owns\x20','lockPath','DaemonRpcFinish','Daemon\x20handler\x20not\x20ready:\x20','trim','close','kill','95024GNmlFw','socketPath','server','isFinite','SessionExportWorkbookData','listen','rpc-shutdown','utf8','616210wjDLto','SessionLoadWorkbookDataReplayPack','60083wGvDHI','UNIVER_DISTRIBUTION_CHANNEL','length','parse','current','eventName','toString','resolveIdentity','Unknown\x20daemon\x20subcommand:\x20','UNIVER_CLI_BUILD_ID','execArgv','data','createConnection','DaemonRpcError','code','sessionHost','SessionCreateWorkbook','toISOString','indexOf','slice','unloadIdleSessions','min','evalJs','withSpan','info','UNIVER_CLI_VERSION','EEXIST','metaPath','format','method','createWorkbook','pidPath','meta','error','loadWorkbookDataReplayPack','params','Daemon','session','2132151xZNBke','exportWorkbookFile','2.0','baseWorkbookData','timestamp','SessionExportWorkbookFile','outputPath','message','event','homeDir','finally','end','cwd','loadWorkbookData','once','destroyAll','local','createdAt','exit','174884hjwbSb','logRequestError','runtimeRoot','withContext','stringify','traceparent','Shutdown','mutations','DaemonRpcStart','pid','durationMs','argv','getWorkbookSession','132825ESzTPi','daemonDir','mutates','univer-daemon','Health','dispose','2517408MsChtT'];_0x5380=function(){return _0x87daf4;};return _0x5380();}const _0xdb5c01=_0x1604;(function(_0x4294ac,_0x1826b1){const _0x498817=_0x1604,_0xe14580=_0x4294ac();while(!![]){try{const _0x584a14=parseInt(_0x498817(0x1bf))/0x1+parseInt(_0x498817(0x228))/0x2+-parseInt(_0x498817(0x205))/0x3+-parseInt(_0x498817(0x1f8))/0x4+parseInt(_0x498817(0x1bd))/0x5*(parseInt(_0x498817(0x210))/0x6)+-parseInt(_0x498817(0x1e5))/0x7+parseInt(_0x498817(0x20b))/0x8;if(_0x584a14===_0x1826b1)break;else _0xe14580['push'](_0xe14580['shift']());}catch(_0x2a5be6){_0xe14580['push'](_0xe14580['shift']());}}}(_0x5380,0x2555c));import'../chunks/vendor-DjomC5bd.js';import{a as _0x5377e0,i as _0x52add4,n,o as _0x2962f1,r as _0x6199a8,t as _0x5bd92d}from'../chunks/trace-DPfd8LdJ.js';import{a as _0x3eb818,d as _0xd13baa,l as _0x2ed4a3,m as _0x1fb113,n as _0x24ed25,r as _0x3cc944,u as _0x142577}from'../chunks/runtime-manifest-Bt390kp8.js';import{t as _0x12994b}from'../chunks/build-id-Coc3wh1M.js';import{existsSync as _0x5db8da}from'node:fs';import{chmod as _0x1cd322,mkdir as _0xdfb21c,readFile as _0x1246b0,rm as _0xd487de,writeFile as _0x48c3ee}from'node:fs/promises';import _0x281c8e from'node:net';import _0xcb6ba1 from'node:process';var S=new _0x3cc944();async function C(_0x3f1439={}){const _0x3f5782=_0x1604;let _0x17c64e=_0x3f1439[_0x3f5782(0x217)]??_0xcb6ba1['env'],_0x2f30d1=_0x142577(_0x17c64e),_0x144986=_0x24ed25(_0x17c64e),_0x2fa265=_0x3f1439['sessionHost']??E(new _0x3eb818({'env':_0x17c64e,'logger':_0xd13baa({'env':_0x17c64e,'role':_0x5377e0['Runtime']}),'resolveExecutionPlaneOptions':()=>({'execArgv':[..._0x144986['runtimeExecutionPlaneEntry'][_0x3f5782(0x1c9)]],'modulePath':_0x144986['runtimeExecutionPlaneEntry']['modulePath']})})),_0x4137df=_0x12994b(_0x17c64e),_0x38cc6d=new Date()['toISOString']();if(await _0xdfb21c(_0x2f30d1[_0x3f5782(0x206)],{'recursive':!0x0,'mode':0x1c0}),await _0xdfb21c(_0x2f30d1[_0x3f5782(0x214)],{'recursive':!0x0,'mode':0x1c0}),!await M(_0x2f30d1[_0x3f5782(0x222)],_0x2f30d1['pidPath'])){if(await N(_0x2f30d1[_0x3f5782(0x229)]))return;throw Error(_0x3f5782(0x221)+_0x2f30d1[_0x3f5782(0x222)]);}await j(_0x2f30d1);let _0x129453=_0xd13baa({'env':_0x17c64e,'role':_0x5377e0[_0x3f5782(0x1e3)]}),_0x538251=k({'buildId':_0x4137df,'env':_0x17c64e,'pid':_0xcb6ba1[_0x3f5782(0x201)]}),_0x171856=!0x1,_0x14b758={},_0x4102bf=async _0x48461b=>z(null,-0x7f5b,Error(_0x3f5782(0x224)+_0x48461b)),_0x27abd5=_0x281c8e['createServer'](_0xea7918=>{const _0x338f2d=_0x3f5782;let _0x64e2e7='';_0xea7918['on'](_0x338f2d(0x1ca),_0xf7ebf=>{const _0x56b3d7=_0x338f2d;_0x64e2e7+=_0xf7ebf[_0x56b3d7(0x1c5)](_0x56b3d7(0x22f)),_0x2c37d9();}),_0xea7918['on'](_0x338f2d(0x1e0),()=>void 0x0);let _0x2c37d9=async()=>{const _0x33b3c9=_0x338f2d;for(;;){let _0x4dcb01=_0x64e2e7[_0x33b3c9(0x1d1)]('\x0a');if(_0x4dcb01<0x0)return;let _0x217f4b=_0x64e2e7[_0x33b3c9(0x1d2)](0x0,_0x4dcb01)[_0x33b3c9(0x225)]();if(_0x64e2e7=_0x64e2e7[_0x33b3c9(0x1d2)](_0x4dcb01+0x1),!_0x217f4b)continue;let _0x2d4d62=await _0x4102bf(_0x217f4b);_0xea7918['write'](JSON[_0x33b3c9(0x1fc)](_0x2d4d62)+'\x0a');}};});_0x4102bf=w({'buildId':_0x4137df,'logRequestEvent':async _0x14ec5d=>{const _0x51bcb1=_0x3f5782;_0x129453[_0x51bcb1(0x1ed)]({'level':_0x14ec5d[_0x51bcb1(0x1c4)]===_0x52add4[_0x51bcb1(0x1cc)]?'error':_0x51bcb1(0x1d7),'event_name':_0x14ec5d[_0x51bcb1(0x1c4)],'component':_0x6199a8[_0x51bcb1(0x1e3)],'process_role':_0x5377e0[_0x51bcb1(0x1e3)],..._0x14ec5d['error']===void 0x0?{}:{'error':_0x14ec5d['error']},'fields':{..._0x538251,..._0x14ec5d['durationMs']===void 0x0?{}:{'duration_ms':_0x14ec5d[_0x51bcb1(0x202)]},'method':_0x14ec5d[_0x51bcb1(0x1dc)],'timestamp':_0x14ec5d[_0x51bcb1(0x1e9)]}});},'logRequestError':async _0x496154=>{const _0x408c05=_0x3f5782;_0x129453['error']({'event_name':_0x52add4[_0x408c05(0x1cc)],'component':_0x6199a8[_0x408c05(0x1e3)],'process_role':_0x5377e0[_0x408c05(0x1e3)],'error':_0x496154['error'],'fields':{..._0x538251,'method':_0x496154['method'],'timestamp':_0x496154['timestamp']}});},'onShutdownRequest':()=>{const _0x47bd4e=_0x3f5782;_0x24d5c4(_0x47bd4e(0x22e))[_0x47bd4e(0x1ef)](()=>{const _0x240f86=_0x47bd4e;_0xcb6ba1[_0x240f86(0x1f7)](0x0);});},'pid':_0xcb6ba1[_0x3f5782(0x201)],'runtimeRoot':_0x2f30d1[_0x3f5782(0x1ee)],'sessionHost':_0x2fa265,'socketPath':_0x2f30d1[_0x3f5782(0x229)],'startedAt':_0x38cc6d}),await new Promise((_0x1e034f,_0x3ec2bd)=>{const _0x39ef2b=_0x3f5782;_0x27abd5['once'](_0x39ef2b(0x1e0),_0x3ec2bd),_0x27abd5[_0x39ef2b(0x22d)](_0x2f30d1[_0x39ef2b(0x229)],_0x1e034f);}),_0x2ed4a3(_0x2f30d1[_0x3f5782(0x229)])||await _0x1cd322(_0x2f30d1[_0x3f5782(0x229)],0x180);let _0x529db2={'pid':_0xcb6ba1[_0x3f5782(0x201)],'startedAt':_0x38cc6d,'socketPath':_0x2f30d1['socketPath'],'runtimeRoot':_0x2f30d1['homeDir'],'buildId':_0x4137df};await _0x48c3ee(_0x2f30d1['pidPath'],String(_0xcb6ba1['pid']),_0x3f5782(0x22f)),await _0x48c3ee(_0x2f30d1[_0x3f5782(0x1da)],JSON[_0x3f5782(0x1fc)](_0x529db2,null,0x2),_0x3f5782(0x22f)),_0x129453[_0x3f5782(0x1d7)]({'event_name':_0x52add4['DaemonStart'],'component':_0x6199a8['Daemon'],'process_role':_0x5377e0['Daemon'],'fields':{..._0x538251,'pid':_0xcb6ba1[_0x3f5782(0x201)],'runtime_root':_0x2f30d1['homeDir'],'socket_path':_0x2f30d1[_0x3f5782(0x229)],'started_at':_0x38cc6d}}),await _0x129453['flush']();let _0x567d11=setInterval(()=>{const _0x4eeb2a=_0x3f5782;_0x2fa265[_0x4eeb2a(0x1d3)]();},Math[_0x3f5782(0x21e)](0x3e8,Math[_0x3f5782(0x1d4)](_0x2fa265['getSessionIdleTtlMs'](),0xea60)));_0x567d11[_0x3f5782(0x20e)](),_0x14b758[_0x3f5782(0x1c3)]=_0x567d11;async function _0x24d5c4(_0xab33ec){const _0x4dc54f=_0x3f5782;_0x171856||(_0x171856=!0x0,_0x14b758[_0x4dc54f(0x1c3)]!==void 0x0&&clearInterval(_0x14b758[_0x4dc54f(0x1c3)]),_0x129453[_0x4dc54f(0x1d7)]({'event_name':_0x52add4['DaemonStop'],'component':_0x6199a8[_0x4dc54f(0x1e3)],'process_role':_0x5377e0[_0x4dc54f(0x1e3)],'fields':{..._0x538251,'pid':_0xcb6ba1[_0x4dc54f(0x201)],'reason':_0xab33ec,'timestamp':new Date()[_0x4dc54f(0x1d0)]()}}),await _0x129453[_0x4dc54f(0x21f)](),await _0x2fa265['destroyAll'](_0xab33ec),await new Promise(_0x4b07b6=>{const _0x3ca76d=_0x4dc54f;_0x27abd5[_0x3ca76d(0x226)](()=>_0x4b07b6());}),await F(_0x2f30d1[_0x4dc54f(0x229)]),await _0xd487de(_0x2f30d1[_0x4dc54f(0x1de)],{'force':!0x0})['catch'](()=>void 0x0),await _0xd487de(_0x2f30d1[_0x4dc54f(0x1da)],{'force':!0x0})[_0x4dc54f(0x20d)](()=>void 0x0),await _0xd487de(_0x2f30d1['lockPath'],{'recursive':!0x0,'force':!0x0})[_0x4dc54f(0x20d)](()=>void 0x0));}_0xcb6ba1['on'](_0x3f5782(0x219),()=>{_0x24d5c4('sigint')['finally'](()=>{const _0x39889f=_0x1604;_0xcb6ba1[_0x39889f(0x1f7)](0x0);});}),_0xcb6ba1['on'](_0x3f5782(0x20f),()=>{const _0x209d0c=_0x3f5782;_0x24d5c4('sigterm')[_0x209d0c(0x1ef)](()=>{const _0x5ec737=_0x209d0c;_0xcb6ba1[_0x5ec737(0x1f7)](0x0);});});}function w(_0x15a045){return async _0x3d2b3b=>{const _0x11c45a=_0x1604;let _0x2f45cc;try{_0x2f45cc=JSON[_0x11c45a(0x1c2)](_0x3d2b3b);}catch(_0x8948e4){return z(null,-0x7fbc,_0x8948e4);}let _0x472f89=_0x5bd92d(_0x2f45cc[_0x11c45a(0x1df)]?.[_0x11c45a(0x1fd)]),_0x36b656=async()=>await n[_0x11c45a(0x1d6)]({'name':_0x2962f1['DaemonRpcServer'],'kind':_0x11c45a(0x22a)},async()=>{const _0x5caa4c=_0x11c45a;let _0x3e5a9f=Date['now']();await _0x15a045[_0x5caa4c(0x216)]?.({'eventName':_0x52add4[_0x5caa4c(0x200)],'method':_0x2f45cc[_0x5caa4c(0x1dc)],'timestamp':new Date()['toISOString']()});try{let _0x59f32d=await T(_0x2f45cc,_0x15a045);return await _0x15a045[_0x5caa4c(0x216)]?.({'durationMs':Date[_0x5caa4c(0x213)]()-_0x3e5a9f,'eventName':_0x52add4[_0x5caa4c(0x223)],'method':_0x2f45cc[_0x5caa4c(0x1dc)],'timestamp':new Date()[_0x5caa4c(0x1d0)]()}),_0x59f32d;}catch(_0x2cfd68){return await _0x15a045[_0x5caa4c(0x216)]?.({'durationMs':Date[_0x5caa4c(0x213)]()-_0x3e5a9f,'eventName':_0x52add4[_0x5caa4c(0x1cc)],'method':_0x2f45cc[_0x5caa4c(0x1dc)],'error':_0x2cfd68,'timestamp':new Date()['toISOString']()}),_0x15a045[_0x5caa4c(0x216)]===void 0x0&&await _0x15a045[_0x5caa4c(0x1f9)]?.({'method':_0x2f45cc[_0x5caa4c(0x1dc)],'error':_0x2cfd68 instanceof Error?_0x2cfd68[_0x5caa4c(0x1ec)]:String(_0x2cfd68),'timestamp':new Date()['toISOString']()}),z(_0x2f45cc['id'],-0x7f5b,_0x2cfd68);}});return _0x472f89===void 0x0?await _0x36b656():await n[_0x11c45a(0x1fb)](_0x472f89,_0x36b656);};}async function T(_0x5ca269,_0xab1cf2){const _0x139199=_0x1604;switch(_0x5ca269['method']){case _0x1fb113[_0x139199(0x209)]:return{'jsonrpc':'2.0','id':_0x5ca269['id'],'result':{'ok':!0x0,'pid':_0xab1cf2[_0x139199(0x201)],'startedAt':_0xab1cf2['startedAt'],'socketPath':_0xab1cf2[_0x139199(0x229)],'runtimeRoot':_0xab1cf2[_0x139199(0x1fa)],'buildId':_0xab1cf2['buildId'],'sessionCount':_0xab1cf2[_0x139199(0x1ce)]['getSessionCount']()}};case _0x1fb113[_0x139199(0x1fe)]:return _0xab1cf2['onShutdownRequest']?.(),{'jsonrpc':'2.0','id':_0x5ca269['id'],'result':{'stopping':!0x0}};case _0x1fb113['SessionLoadWorkbook']:{let _0x46ce3b=await _0xab1cf2['sessionHost'][_0x139199(0x215)](_0x5ca269[_0x139199(0x1e2)]);return R(_0x5ca269['id'],_0x46ce3b);}case _0x1fb113[_0x139199(0x1be)]:{let _0x3e9498=await _0xab1cf2[_0x139199(0x1ce)][_0x139199(0x1e1)](_0x5ca269[_0x139199(0x1e2)]);return R(_0x5ca269['id'],_0x3e9498);}case _0x1fb113[_0x139199(0x1cf)]:{let _0x5c06e6=await _0xab1cf2['sessionHost'][_0x139199(0x1dd)](_0x5ca269[_0x139199(0x1e2)]);return R(_0x5ca269['id'],_0x5c06e6);}case _0x1fb113[_0x139199(0x21b)]:{let _0x3367c1=await _0xab1cf2[_0x139199(0x1ce)][_0x139199(0x1d5)](_0x5ca269[_0x139199(0x1e2)]);return R(_0x5ca269['id'],_0x3367c1);}case _0x1fb113[_0x139199(0x1ea)]:{let _0x345fb7=await _0xab1cf2[_0x139199(0x1ce)][_0x139199(0x1e6)](_0x5ca269[_0x139199(0x1e2)]);return R(_0x5ca269['id'],_0x345fb7);}case _0x1fb113[_0x139199(0x22c)]:{let _0x25017c=_0x5ca269[_0x139199(0x1e2)],_0x263078=await _0xab1cf2[_0x139199(0x1ce)][_0x139199(0x212)](_0x25017c);return R(_0x5ca269['id'],_0x263078);}case _0x1fb113['SessionDispose']:{let _0x586ef9=await _0xab1cf2[_0x139199(0x1ce)][_0x139199(0x20a)](_0x5ca269[_0x139199(0x1e2)]);return R(_0x5ca269['id'],_0x586ef9);}case _0x1fb113['SessionGetWorkbook']:{let _0x533fde=await _0xab1cf2[_0x139199(0x1ce)][_0x139199(0x204)](_0x5ca269['params']);return R(_0x5ca269['id'],_0x533fde);}default:return z(_0x5ca269['id'],-0x7f59,Error('Method\x20not\x20found:\x20'+_0x5ca269[_0x139199(0x1dc)]));}}function E(_0xd16e1){return{async 'createWorkbook'(_0x1b10c1){const _0xd18983=_0x1604;let _0x45b125=await D(_0x1b10c1),_0x2681da=await _0xd16e1[_0xd18983(0x1dd)]({..._0x1b10c1[_0xd18983(0x1f1)]===void 0x0?{}:{'cwd':_0x1b10c1[_0xd18983(0x1f1)]},'identity':_0x45b125,..._0x1b10c1['id']===void 0x0?{}:{'workbookId':_0x1b10c1['id']},..._0x1b10c1[_0xd18983(0x21a)]===void 0x0?{}:{'workbookName':_0x1b10c1[_0xd18983(0x21a)]}});return{'success':!0x0,'workbookData':_0x2681da[_0xd18983(0x220)],'session':O(_0x2681da['session'])};},async 'dispose'(_0x4d8652){const _0x443301=_0x1604;let _0x18fbc1=await D(_0x4d8652);return await _0xd16e1['dispose']({..._0x4d8652['cwd']===void 0x0?{}:{'cwd':_0x4d8652[_0x443301(0x1f1)]},'identity':_0x18fbc1}),{'disposed':!0x0,'workbookIdentity':_0x18fbc1['absolutePath']};},async 'destroyAll'(_0x3050c1){const _0xdac26a=_0x1604;await _0xd16e1[_0xdac26a(0x1f4)]?.(_0x3050c1);},async 'evalJs'(_0x1a3dcb){const _0x55a9f7=_0x1604;let _0x2749bf=await D(_0x1a3dcb),_0x40461d=await _0xd16e1[_0x55a9f7(0x1d5)]({'code':_0x1a3dcb[_0x55a9f7(0x1cd)],..._0x1a3dcb[_0x55a9f7(0x1f1)]===void 0x0?{}:{'cwd':_0x1a3dcb['cwd']},'identity':_0x2749bf,..._0x1a3dcb[_0x55a9f7(0x207)]===void 0x0?{}:{'mutates':_0x1a3dcb[_0x55a9f7(0x207)]}});return{..._0x40461d[_0x55a9f7(0x1ff)]===void 0x0?{}:{'mutations':_0x40461d['mutations']},'success':!0x0,'value':_0x40461d['value'],'session':O(_0x40461d[_0x55a9f7(0x1e4)])};},async 'exportWorkbookData'(_0x55ae18){const _0xb4d53f=_0x1604;let _0x5544c1=await D(_0x55ae18),_0x4d7cff=await _0xd16e1[_0xb4d53f(0x212)]({..._0x55ae18[_0xb4d53f(0x1f1)]===void 0x0?{}:{'cwd':_0x55ae18[_0xb4d53f(0x1f1)]},'identity':_0x5544c1});return{'success':!0x0,'workbookData':_0x4d7cff[_0xb4d53f(0x220)],'session':O(_0x4d7cff[_0xb4d53f(0x1e4)])};},async 'exportWorkbookFile'(_0x1c1daa){const _0x5adb99=_0x1604;let _0x545616=await D(_0x1c1daa),_0x4fd2cb=await _0xd16e1['exportWorkbookFile']({..._0x1c1daa[_0x5adb99(0x1f1)]===void 0x0?{}:{'cwd':_0x1c1daa[_0x5adb99(0x1f1)]},'format':_0x1c1daa[_0x5adb99(0x1db)],'identity':_0x545616,'outputPath':_0x1c1daa['outputPath']});return{'success':!0x0,'format':_0x4fd2cb[_0x5adb99(0x1db)],'outputPath':_0x4fd2cb[_0x5adb99(0x1eb)],'sizeBytes':_0x4fd2cb['sizeBytes'],'session':O(_0x4fd2cb[_0x5adb99(0x1e4)])};},async 'getWorkbookSession'(_0x7cce7){const _0x1eb26b=_0x1604;let _0x4230f6=await D(_0x7cce7),_0x2af12f=await _0xd16e1['getSession']({..._0x7cce7['cwd']===void 0x0?{}:{'cwd':_0x7cce7[_0x1eb26b(0x1f1)]},'identity':_0x4230f6});return{'exists':_0x2af12f!==null,'session':_0x2af12f===null?null:O(_0x2af12f)};},'getSessionCount'(){const _0xb2aa8c=_0x1604;return _0xd16e1[_0xb2aa8c(0x21d)]?.()??0x0;},'getSessionIdleTtlMs'(){return _0xd16e1['getSessionIdleTtlMs']?.()??0xea60;},async 'loadWorkbook'(_0x495e26){const _0x252708=_0x1604;let _0x553637=await D(_0x495e26),_0x13e8b5=await _0xd16e1[_0x252708(0x1f2)]({..._0x495e26[_0x252708(0x1f1)]===void 0x0?{}:{'cwd':_0x495e26[_0x252708(0x1f1)]},'identity':_0x553637,'workbookData':_0x495e26[_0x252708(0x220)]});return{'success':!0x0,'workbookData':_0x13e8b5[_0x252708(0x220)],'session':O(_0x13e8b5[_0x252708(0x1e4)])};},async 'loadWorkbookDataReplayPack'(_0x46d32a){const _0x1bc7e2=_0x1604;let _0x16b47d=await D(_0x46d32a),_0x3ac76d=await _0xd16e1[_0x1bc7e2(0x1e1)]({..._0x46d32a[_0x1bc7e2(0x1f1)]===void 0x0?{}:{'cwd':_0x46d32a[_0x1bc7e2(0x1f1)]},'identity':_0x16b47d,'replayPack':{'baseWorkbookData':_0x46d32a[_0x1bc7e2(0x1e8)],'mutations':_0x46d32a[_0x1bc7e2(0x1ff)]}});return{'success':!0x0,'workbookData':_0x3ac76d[_0x1bc7e2(0x220)],'session':O(_0x3ac76d[_0x1bc7e2(0x1e4)])};},async 'unloadIdleSessions'(){const _0x310ec3=_0x1604;await _0xd16e1[_0x310ec3(0x1d3)]?.();}};}async function D(_0x4408b8){const _0x4ad74a=_0x1604;return await S[_0x4ad74a(0x1c6)](_0x4408b8);}function O(_0x39b302){const _0x31938e=_0x1604;return{'createdAt':_0x39b302[_0x31938e(0x1f6)]??'','lastAccessedAt':_0x39b302['lastAccessedAt']??'','sessionId':_0x39b302['sessionId'],'workbookIdentity':_0x39b302[_0x31938e(0x20c)]['absolutePath']};}function k(_0x447450){const _0xe813=_0x1604;return{'build.id':A(_0x447450[_0xe813(0x217)],_0xe813(0x1c8))??_0x447450['buildId'],'deployment.environment.name':_0xe813(0x1f5),'distribution.channel':A(_0x447450[_0xe813(0x217)],_0xe813(0x1c0))??_0xe813(0x211),'service.instance.id':String(_0x447450[_0xe813(0x201)]),'service.name':_0xe813(0x208),...A(_0x447450['env'],_0xe813(0x1d8))===void 0x0?{}:{'service.version':A(_0x447450[_0xe813(0x217)],_0xe813(0x1d8))}};}function A(_0xe16351,_0x1c7684){const _0x786d2c=_0x1604;let _0x44d625=_0xe16351[_0x1c7684]?.[_0x786d2c(0x225)]();return _0x44d625===void 0x0||_0x44d625[_0x786d2c(0x1c1)]===0x0?void 0x0:_0x44d625;}async function j(_0x1a00cf){const _0x52577e=_0x1604;P(_0x1a00cf[_0x52577e(0x229)])&&!await N(_0x1a00cf[_0x52577e(0x229)])&&await F(_0x1a00cf[_0x52577e(0x229)]);let _0x56e939=await I(_0x1a00cf['pidPath']);_0x56e939!==null&&!L(_0x56e939)&&(await _0xd487de(_0x1a00cf[_0x52577e(0x1de)],{'force':!0x0})[_0x52577e(0x20d)](()=>void 0x0),await _0xd487de(_0x1a00cf[_0x52577e(0x1da)],{'force':!0x0})['catch'](()=>void 0x0),await _0xd487de(_0x1a00cf['lockPath'],{'recursive':!0x0,'force':!0x0})[_0x52577e(0x20d)](()=>void 0x0));}async function M(_0x2d87c7,_0x119700){const _0x47d530=_0x1604;try{return await _0xdfb21c(_0x2d87c7,{'recursive':!0x1,'mode':0x1c0}),!0x0;}catch(_0x1a9047){if(_0x1a9047[_0x47d530(0x1cd)]!==_0x47d530(0x1d9))throw _0x1a9047;let _0x1619b4=await I(_0x119700);return _0x1619b4!==null&&L(_0x1619b4)?!0x1:(await _0xd487de(_0x2d87c7,{'recursive':!0x0,'force':!0x0}),await _0xdfb21c(_0x2d87c7,{'recursive':!0x1,'mode':0x1c0}),!0x0);}}function _0x1604(_0x52b769,_0x3ea15){_0x52b769=_0x52b769-0x1bd;const _0x538030=_0x5380();let _0x16040a=_0x538030[_0x52b769];return _0x16040a;}async function N(_0x384407){return await new Promise(_0x13234e=>{const _0x5e6e2c=_0x1604;let _0x1092a3=_0x281c8e[_0x5e6e2c(0x1cb)](_0x384407);_0x1092a3[_0x5e6e2c(0x1f3)](_0x5e6e2c(0x218),()=>{const _0x4326a9=_0x5e6e2c;_0x1092a3[_0x4326a9(0x1f0)](),_0x13234e(!0x0);}),_0x1092a3[_0x5e6e2c(0x1f3)](_0x5e6e2c(0x1e0),()=>{_0x13234e(!0x1);});});}function P(_0x13f7fc){return _0x2ed4a3(_0x13f7fc)?!0x1:_0x5db8da(_0x13f7fc);}async function F(_0x3314bb){const _0x12d3bf=_0x1604;_0x2ed4a3(_0x3314bb)||await _0xd487de(_0x3314bb,{'force':!0x0})[_0x12d3bf(0x20d)](()=>void 0x0);}async function I(_0x29faa9){const _0x31499f=_0x1604;try{let _0x48ea7b=await _0x1246b0(_0x29faa9,'utf8'),_0x1d02bb=Number(_0x48ea7b['trim']());return Number[_0x31499f(0x22b)](_0x1d02bb)?_0x1d02bb:null;}catch{return null;}}function L(_0x3151f2){const _0x14eee7=_0x1604;try{return _0xcb6ba1[_0x14eee7(0x227)](_0x3151f2,0x0),!0x0;}catch{return!0x1;}}function R(_0x12474e,_0x436501){const _0x26a43d=_0x1604;return{'jsonrpc':_0x26a43d(0x1e7),'id':_0x12474e,'result':_0x436501};}function z(_0x573e58,_0x5f4a98,_0x56505b){const _0x22a5c8=_0x1604;return{'jsonrpc':_0x22a5c8(0x1e7),'id':_0x573e58,'error':{'code':_0x5f4a98,'message':_0x56505b instanceof Error?_0x56505b['message']:String(_0x56505b)}};}var B=process[_0xdb5c01(0x203)][0x2]??'serve';B!==_0xdb5c01(0x21c)&&(console[_0xdb5c01(0x1e0)](_0xdb5c01(0x1c7)+B),process[_0xdb5c01(0x1f7)](0x1)),C()[_0xdb5c01(0x20d)](_0xb0c359=>{console['error'](_0xb0c359 instanceof Error?_0xb0c359['message']:String(_0xb0c359)),process['exit'](0x1);});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x479362=_0x19cd;(function(_0x223fc8,_0x629f3f){const _0x5af35a=_0x19cd,_0x36c1c6=_0x223fc8();while(!![]){try{const _0x3a79ba=parseInt(_0x5af35a(0x1c8))/0x1+-parseInt(_0x5af35a(0x1e3))/0x2*(-parseInt(_0x5af35a(0x1dd))/0x3)+-parseInt(_0x5af35a(0x1f1))/0x4+-parseInt(_0x5af35a(0x1d9))/0x5*(-parseInt(_0x5af35a(0x1d7))/0x6)+parseInt(_0x5af35a(0x1c9))/0x7*(parseInt(_0x5af35a(0x1cd))/0x8)+parseInt(_0x5af35a(0x1eb))/0x9*(parseInt(_0x5af35a(0x1cb))/0xa)+-parseInt(_0x5af35a(0x1da))/0xb;if(_0x3a79ba===_0x629f3f)break;else _0x36c1c6['push'](_0x36c1c6['shift']());}catch(_0x34a4d8){_0x36c1c6['push'](_0x36c1c6['shift']());}}}(_0xd811,0x3d5c0));function _0xd811(){const _0x55a0dc=['mutates','30489AdGtrq','exportWorkbookData','EvalJs','withContext','exportWorkbookFile','params','78vRdrqA','createWorkbook','dispose','enqueue','value','SIGTERM','tail','code','209529dzCGhN','withSpan','outputPath','traceparent','type','loadWorkbookDataReplayPack','1933800oMlJri','CreateWorkbook','server','186132PEvCxW','14fuiBKa','method','170GmVLIy','ExportWorkbookFile','1744032dxISAG','2.0','Method\x20not\x20implemented:\x20','exit','workbookData','meta','LoadWorkbookDataReplayPack','ExportWorkbookData','message','loadWorkbookData','6pzESPt','send','1277995rDoUfS','10286045ZgXheq','mutations'];_0xd811=function(){return _0x55a0dc;};return _0xd811();}function _0x19cd(_0x25e526,_0x2b7ddc){_0x25e526=_0x25e526-0x1c8;const _0xd81163=_0xd811();let _0x19cdaa=_0xd81163[_0x25e526];return _0x19cdaa;}import'../chunks/vendor-DjomC5bd.js';import{t as _0x2922d1}from'../chunks/headless-univer-BWfA31gd.js';import{n as _0x1e8bf0,o as _0x2abc23,t as _0x250713}from'../chunks/trace-DPfd8LdJ.js';let i=function(_0x5ec630){const _0xd7854b=_0x19cd;return _0x5ec630[_0xd7854b(0x1f2)]=_0xd7854b(0x1e4),_0x5ec630[_0xd7854b(0x1df)]='evaljs',_0x5ec630[_0xd7854b(0x1cc)]=_0xd7854b(0x1e1),_0x5ec630[_0xd7854b(0x1d4)]=_0xd7854b(0x1de),_0x5ec630['LoadWorkbook']='loadWorkbook',_0x5ec630[_0xd7854b(0x1d3)]=_0xd7854b(0x1f0),_0x5ec630;}({});var a=class{[_0x479362(0x1e9)]=Promise['resolve']();async[_0x479362(0x1e6)](_0x41675e){const _0xfe185e=_0x479362;let _0x438e5d=this[_0xfe185e(0x1e9)],_0x46d676;this[_0xfe185e(0x1e9)]=new Promise(_0xaec243=>{_0x46d676=_0xaec243;}),await _0x438e5d;try{return await _0x41675e();}finally{_0x46d676?.();}}},o=_0x2922d1(),s=new a();process['send']?.({'type':'ready'}),process['on'](_0x479362(0x1d5),async _0xd5ebf0=>{const _0x552eea=_0x479362;if(_0xd5ebf0?.[_0x552eea(0x1ef)]!=='rpc-request')return;let _0x38e531=await c(_0xd5ebf0['data']);process[_0x552eea(0x1d8)]?.({'type':'rpc-response','id':_0xd5ebf0['id'],'data':_0x38e531});}),process['on']('disconnect',()=>{const _0x148f9d=_0x479362;o[_0x148f9d(0x1e5)](),process[_0x148f9d(0x1d0)](0x0);}),process['on'](_0x479362(0x1e8),()=>{const _0x5f4d2b=_0x479362;o[_0x5f4d2b(0x1e5)](),process[_0x5f4d2b(0x1d0)](0x0);});async function c(_0x3eaa07){const _0x296244=_0x479362;let _0xde4634=_0x250713(_0x3eaa07[_0x296244(0x1d2)]?.[_0x296244(0x1ee)]),_0x22965d=async()=>await _0x1e8bf0[_0x296244(0x1ec)]({'name':_0x2abc23['RuntimeRpcClient'],'kind':_0x296244(0x1f3)},async()=>await l(_0x3eaa07));return _0xde4634===void 0x0?await _0x22965d():await _0x1e8bf0[_0x296244(0x1e0)](_0xde4634,_0x22965d);}async function l(_0x1c26d0){const _0x2c34e0=_0x479362;try{switch(_0x1c26d0[_0x2c34e0(0x1ca)]){case i[_0x2c34e0(0x1f2)]:{let _0x3402f2=o[_0x2c34e0(0x1e4)](_0x1c26d0[_0x2c34e0(0x1e2)]??{});return{'jsonrpc':'2.0','id':_0x1c26d0['id'],'result':{'success':!0x0,'workbookData':_0x3402f2}};}case i['LoadWorkbook']:{let _0x366ba1=o[_0x2c34e0(0x1d6)](_0x1c26d0[_0x2c34e0(0x1e2)][_0x2c34e0(0x1d1)]);return{'jsonrpc':_0x2c34e0(0x1ce),'id':_0x1c26d0['id'],'result':{'success':!0x0,'workbookData':_0x366ba1}};}case i[_0x2c34e0(0x1d3)]:{let _0x11a1b4=await o[_0x2c34e0(0x1f0)](_0x1c26d0[_0x2c34e0(0x1e2)]);return{'jsonrpc':_0x2c34e0(0x1ce),'id':_0x1c26d0['id'],'result':{'success':!0x0,'workbookData':_0x11a1b4}};}case i['ExportWorkbookData']:return{'jsonrpc':'2.0','id':_0x1c26d0['id'],'result':{'success':!0x0,'workbookData':o[_0x2c34e0(0x1de)]()}};case i[_0x2c34e0(0x1cc)]:{let _0x141dea=_0x1c26d0[_0x2c34e0(0x1e2)],_0x159d45=await o[_0x2c34e0(0x1e1)](_0x141dea[_0x2c34e0(0x1ed)],_0x141dea['format']);return{'jsonrpc':_0x2c34e0(0x1ce),'id':_0x1c26d0['id'],'result':{'success':!0x0,..._0x159d45}};}case i[_0x2c34e0(0x1df)]:{let _0x2ce717=_0x1c26d0[_0x2c34e0(0x1e2)]??{},_0x12b282=async()=>{const _0x4aa7a6=_0x2c34e0;let _0x46f570=_0x2ce717[_0x4aa7a6(0x1dc)]?await o['evalJsWithMutationCapture'](_0x2ce717[_0x4aa7a6(0x1ea)]):{'value':await o['evalJs'](_0x2ce717[_0x4aa7a6(0x1ea)]),'mutations':void 0x0};return{'success':!0x0,..._0x46f570[_0x4aa7a6(0x1db)]===void 0x0?{}:{'mutations':_0x46f570[_0x4aa7a6(0x1db)]},'value':_0x46f570[_0x4aa7a6(0x1e7)]};},_0x3ff115=_0x2ce717[_0x2c34e0(0x1dc)]?await s[_0x2c34e0(0x1e6)](_0x12b282):await _0x12b282();return{'jsonrpc':'2.0','id':_0x1c26d0['id'],'result':_0x3ff115};}default:throw Error(_0x2c34e0(0x1cf)+String(_0x1c26d0[_0x2c34e0(0x1ca)]));}}catch(_0x1682dd){return{'jsonrpc':_0x2c34e0(0x1ce),'id':_0x1c26d0['id'],'error':{'code':-0x7f5b,'message':_0x1682dd instanceof Error?_0x1682dd['message']:String(_0x1682dd)}};}}
|