@univerjs-pro/collaboration-client-node 1.0.0-rc.0 → 1.0.0

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/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14e038=_0x23e0;function _0x51f8(){const _0x40d307=['108412VZhuWf','packageName','Injector','toStringTag','registerDependencies','NodeCollaborationSocketService','UniverNetworkPlugin','DependentOn','message','open','Disposable','1.0.0-rc.0','Plugin','6DMPoCD','prototype','1647pIjERs','error','230586yTFkfA','share','set','CollaborationSocketService','40024XRiOaB','string','UniverCollaborationPlugin','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','object','registerHTTPInterceptor','ILogService','customHeaders','33740YmEFty','IConfigService','decorate','default','DisposableCollection','_doCreateSocket','Inject','toPrimitive','dispose','UniverCollaborationClientPlugin','pipe','length','version','@univerjs-pro/collaboration-client-node','_configService','pluginName','getConfig','constructor','UniverCollaborationClientNodePlugin','symbol','close','115gqHsIw','defineProperty','headers','_config','setConfig','2382420idTjdk','next','1013142bRSPUI','_injector','UniverLicensePlugin','getOwnPropertyDescriptor','iterator','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','addEventListener','call','toDisposable','collaboration-client-node.config','add','7248lKEiXY','function','removeEventListener','Observable','createSocket'];_0x51f8=function(){return _0x40d307;};return _0x51f8();}(function(_0x1dedf2,_0x44651e){const _0x2ad5a8=_0x23e0,_0x23e195=_0x1dedf2();while(!![]){try{const _0x109128=-parseInt(_0x2ad5a8(0x1fa))/0x1+-parseInt(_0x2ad5a8(0x207))/0x2*(-parseInt(_0x2ad5a8(0x20b))/0x3)+parseInt(_0x2ad5a8(0x20f))/0x4*(-parseInt(_0x2ad5a8(0x1e3))/0x5)+parseInt(_0x2ad5a8(0x1ea))/0x6+parseInt(_0x2ad5a8(0x217))/0x7+parseInt(_0x2ad5a8(0x1f5))/0x8*(-parseInt(_0x2ad5a8(0x209))/0x9)+parseInt(_0x2ad5a8(0x1e8))/0xa;if(_0x109128===_0x44651e)break;else _0x23e195['push'](_0x23e195['shift']());}catch(_0x5660d2){_0x23e195['push'](_0x23e195['shift']());}}}(_0x51f8,0x21bad),Object[_0x14e038(0x1e4)](exports,Symbol[_0x14e038(0x1fd)],{'value':'Module'}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs-pro/collaboration-client'),n=require('@univerjs-pro/license'),r=require('@univerjs/core'),i=require('@univerjs/network'),a=require('rxjs'),o=require('ws');var s=_0x14e038(0x224),c=_0x14e038(0x205);const l={};function _0x23e0(_0x2f099e,_0x83113a){_0x2f099e=_0x2f099e-0x1e0;const _0x51f8e4=_0x51f8();let _0x23e077=_0x51f8e4[_0x2f099e];return _0x23e077;}function u(_0x50e8c5,_0x535e0f){return function(_0x45ec31,_0x61ff18){_0x535e0f(_0x45ec31,_0x61ff18,_0x50e8c5);};}function d(_0x278187,_0x39253c,_0x135acd,_0x1f2804){const _0x5edbc6=_0x14e038;var _0x1d0372=arguments['length'],_0x441e1f=_0x1d0372<0x3?_0x39253c:_0x1f2804===null?_0x1f2804=Object[_0x5edbc6(0x1ed)](_0x39253c,_0x135acd):_0x1f2804,_0x4c51fd;if(typeof Reflect==_0x5edbc6(0x213)&&typeof Reflect['decorate']=='function')_0x441e1f=Reflect[_0x5edbc6(0x219)](_0x278187,_0x39253c,_0x135acd,_0x1f2804);else{for(var _0x471a2c=_0x278187[_0x5edbc6(0x222)]-0x1;_0x471a2c>=0x0;_0x471a2c--)(_0x4c51fd=_0x278187[_0x471a2c])&&(_0x441e1f=(_0x1d0372<0x3?_0x4c51fd(_0x441e1f):_0x1d0372>0x3?_0x4c51fd(_0x39253c,_0x135acd,_0x441e1f):_0x4c51fd(_0x39253c,_0x135acd))||_0x441e1f);}return _0x1d0372>0x3&&_0x441e1f&&Object['defineProperty'](_0x39253c,_0x135acd,_0x441e1f),_0x441e1f;}let f=class extends r[_0x14e038(0x204)]{constructor(_0x4ce461){super(),this['_configService']=_0x4ce461;}['createSocket'](_0x36de3c){const _0xb02e9b=_0x14e038;var _0x9d4d34;let _0x52b6ea=((_0x9d4d34=this[_0xb02e9b(0x225)]['getConfig'](t[_0xb02e9b(0x1ef)]))==null?void 0x0:_0x9d4d34['customHeaders'])||{};try{let _0x317ed9=new o['WebSocket'](_0x36de3c,{'headers':{..._0x52b6ea}}),_0xe4536=new r[(_0xb02e9b(0x21b))]();return{'URL':_0x36de3c,'close':(_0x18aeab,_0x372791)=>{const _0x42344e=_0xb02e9b;_0x317ed9[_0x42344e(0x1e2)](_0x18aeab,_0x372791),_0xe4536[_0x42344e(0x21f)]();},'send':_0x514ceb=>{_0x317ed9['send'](_0x514ceb);},'open$':new a[(_0xb02e9b(0x1f8))](_0x969516=>{const _0x4be9b8=_0xb02e9b;let _0x2bc6ae=_0x20bcfe=>_0x969516['next'](_0x20bcfe);_0x317ed9[_0x4be9b8(0x1f0)](_0x4be9b8(0x203),_0x2bc6ae),_0xe4536[_0x4be9b8(0x1f4)]((0x0,r['toDisposable'])(()=>_0x317ed9[_0x4be9b8(0x1f7)]('open',_0x2bc6ae)));})['pipe']((0x0,a[_0xb02e9b(0x20c)])()),'close$':new a[(_0xb02e9b(0x1f8))](_0x5c183e=>{const _0x2b3c26=_0xb02e9b;let _0x2e2aba=_0x3625ec=>_0x5c183e[_0x2b3c26(0x1e9)](_0x3625ec);_0x317ed9[_0x2b3c26(0x1f0)](_0x2b3c26(0x1e2),_0x2e2aba),_0xe4536['add']((0x0,r[_0x2b3c26(0x1f2)])(()=>_0x317ed9[_0x2b3c26(0x1f7)](_0x2b3c26(0x1e2),_0x2e2aba)));})[_0xb02e9b(0x221)]((0x0,a[_0xb02e9b(0x20c)])()),'error$':new a[(_0xb02e9b(0x1f8))](_0x31f403=>{const _0x2aa91b=_0xb02e9b;let _0xa4b044=_0x3425f1=>_0x31f403['next'](_0x3425f1);_0x317ed9['addEventListener'](_0x2aa91b(0x20a),_0xa4b044),_0xe4536['add']((0x0,r[_0x2aa91b(0x1f2)])(()=>_0x317ed9[_0x2aa91b(0x1f7)](_0x2aa91b(0x20a),_0xa4b044)));})[_0xb02e9b(0x221)]((0x0,a[_0xb02e9b(0x20c)])()),'message$':new a[(_0xb02e9b(0x1f8))](_0x3873d4=>{const _0x5e9457=_0xb02e9b;let _0x40e3a5=_0x2b5b41=>_0x3873d4['next'](_0x2b5b41);_0x317ed9['addEventListener'](_0x5e9457(0x202),_0x40e3a5),_0xe4536[_0x5e9457(0x1f4)]((0x0,r[_0x5e9457(0x1f2)])(()=>_0x317ed9['removeEventListener'](_0x5e9457(0x202),_0x40e3a5)));})[_0xb02e9b(0x221)]((0x0,a[_0xb02e9b(0x20c)])())};}catch(_0x4f2978){return console[_0xb02e9b(0x20a)](_0x4f2978),null;}}};f=d([u(0x0,r[_0x14e038(0x218)])],f);function p(_0x4534f7){'@babel/helpers - typeof';const _0x2fc004=_0x14e038;return p=typeof Symbol==_0x2fc004(0x1f6)&&typeof Symbol[_0x2fc004(0x1ee)]==_0x2fc004(0x1e1)?function(_0x4ae559){return typeof _0x4ae559;}:function(_0x55b57b){const _0x304445=_0x2fc004;return _0x55b57b&&typeof Symbol=='function'&&_0x55b57b[_0x304445(0x228)]===Symbol&&_0x55b57b!==Symbol[_0x304445(0x208)]?_0x304445(0x1e1):typeof _0x55b57b;},p(_0x4534f7);}function m(_0x3953e1,_0x17f6d2){const _0x2f10c1=_0x14e038;if(p(_0x3953e1)!='object'||!_0x3953e1)return _0x3953e1;var _0x36fb6f=_0x3953e1[Symbol[_0x2f10c1(0x21e)]];if(_0x36fb6f!==void 0x0){var _0x3d6daf=_0x36fb6f[_0x2f10c1(0x1f1)](_0x3953e1,_0x17f6d2||_0x2f10c1(0x21a));if(p(_0x3d6daf)!=_0x2f10c1(0x213))return _0x3d6daf;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x17f6d2==='string'?String:Number)(_0x3953e1);}function h(_0x4c2637){const _0x3347b8=_0x14e038;var _0x54a557=m(_0x4c2637,_0x3347b8(0x210));return p(_0x54a557)==_0x3347b8(0x1e1)?_0x54a557:_0x54a557+'';}function g(_0x543521,_0x4af5d5,_0x33fb6d){const _0x3e1f76=_0x14e038;return(_0x4af5d5=h(_0x4af5d5))in _0x543521?Object[_0x3e1f76(0x1e4)](_0x543521,_0x4af5d5,{'value':_0x33fb6d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x543521[_0x4af5d5]=_0x33fb6d,_0x543521;}let _=class extends r[_0x14e038(0x206)]{constructor(_0x3a678f=l,_0x322c64,_0x359c0b){const _0x3b92bb=_0x14e038;super(),this[_0x3b92bb(0x1e6)]=_0x3a678f,this[_0x3b92bb(0x225)]=_0x322c64,this[_0x3b92bb(0x1eb)]=_0x359c0b;let {..._0x1e0286}=(0x0,r['merge'])({},l,this[_0x3b92bb(0x1e6)]);this[_0x3b92bb(0x225)][_0x3b92bb(0x1e7)](_0x3b92bb(0x1f3),_0x1e0286);}['onStarting'](){this['_registerDependencies']();}['_registerDependencies'](){const _0xe99972=_0x14e038;(0x0,r[_0xe99972(0x1fe)])(this['_injector'],[[i['ISocketService'],{'useClass':f}]]);}};g(_,_0x14e038(0x226),_0x14e038(0x212)),g(_,_0x14e038(0x1fb),s),g(_,_0x14e038(0x223),c),_=d([(0x0,r[_0x14e038(0x201)])(n[_0x14e038(0x1ec)],i[_0x14e038(0x200)],e[_0x14e038(0x211)],t[_0x14e038(0x220)]),u(0x1,r['IConfigService']),u(0x2,(0x0,r[_0x14e038(0x21d)])(r[_0x14e038(0x1fc)]))],_);let v=class extends t[_0x14e038(0x20e)]{constructor(_0xaa6344,_0x3694a3,_0x115079,_0xd2f075,_0x12f000){const _0x319bc4=_0x14e038;super(_0xaa6344,_0x3694a3,_0x115079,_0xd2f075,_0x12f000);let _0x10d928=this[_0x319bc4(0x225)][_0x319bc4(0x227)](t['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']);this['_httpService'][_0x319bc4(0x214)]({'interceptor':(_0x202919,_0x235eb8)=>{const _0x30d772=_0x319bc4;let _0xdb73d5=_0x202919[_0x30d772(0x1e5)];if(_0x10d928!=null&&_0x10d928[_0x30d772(0x216)]){for(let _0x3f3191 in _0x10d928[_0x30d772(0x216)])_0xdb73d5[_0x30d772(0x20d)](_0x3f3191,_0x10d928[_0x30d772(0x216)][_0x3f3191]);}return _0x235eb8(_0x202919);}});}async[_0x14e038(0x1f9)](_0x2ca9f2){const _0x1b1196=_0x14e038;return this[_0x1b1196(0x21c)](_0x2ca9f2);}};v=d([u(0x0,(0x0,r[_0x14e038(0x21d)])(r['Injector'])),u(0x1,(0x0,r[_0x14e038(0x21d)])(i['HTTPService'])),u(0x2,r[_0x14e038(0x218)]),u(0x3,r[_0x14e038(0x215)]),u(0x4,e['ISnapshotServerService'])],v),Object[_0x14e038(0x1e4)](exports,_0x14e038(0x1ff),{'enumerable':!0x0,'get':function(){return v;}}),Object[_0x14e038(0x1e4)](exports,_0x14e038(0x1e0),{'enumerable':!0x0,'get':function(){return _;}});
1
+ const _0x3b8054=_0x2d22;(function(_0x17693b,_0x1ec0a0){const _0x277cea=_0x2d22,_0xf869aa=_0x17693b();while(!![]){try{const _0x3d6ed3=-parseInt(_0x277cea(0x1c2))/0x1*(-parseInt(_0x277cea(0x1be))/0x2)+-parseInt(_0x277cea(0x1c7))/0x3+-parseInt(_0x277cea(0x1d2))/0x4*(-parseInt(_0x277cea(0x1c4))/0x5)+parseInt(_0x277cea(0x1c0))/0x6*(parseInt(_0x277cea(0x1e1))/0x7)+parseInt(_0x277cea(0x1ef))/0x8*(-parseInt(_0x277cea(0x1f6))/0x9)+parseInt(_0x277cea(0x1fc))/0xa+-parseInt(_0x277cea(0x1cf))/0xb*(parseInt(_0x277cea(0x1f9))/0xc);if(_0x3d6ed3===_0x1ec0a0)break;else _0xf869aa['push'](_0xf869aa['shift']());}catch(_0x4b2ab0){_0xf869aa['push'](_0xf869aa['shift']());}}}(_0x3e3c,0x3b208),Object[_0x3b8054(0x1e7)](exports,Symbol[_0x3b8054(0x207)],{'value':_0x3b8054(0x1fe)}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs-pro/collaboration-client'),n=require('@univerjs-pro/license'),r=require('@univerjs/core'),i=require('@univerjs/network'),a=require('rxjs'),o=require('ws');var s=_0x3b8054(0x1bf),c=_0x3b8054(0x1fa);const l={};function u(_0x2a9b89,_0x31ce44){return function(_0x5de45a,_0x3bdf23){_0x31ce44(_0x5de45a,_0x3bdf23,_0x2a9b89);};}function _0x2d22(_0x31b31d,_0xf4361){_0x31b31d=_0x31b31d-0x1be;const _0x3e3c79=_0x3e3c();let _0x2d2240=_0x3e3c79[_0x31b31d];return _0x2d2240;}function d(_0x22a4e4,_0x1875ab,_0x2727aa,_0x2309c5){const _0x58da79=_0x3b8054;var _0x32bf5d=arguments['length'],_0x69df89=_0x32bf5d<0x3?_0x1875ab:_0x2309c5===null?_0x2309c5=Object[_0x58da79(0x1ec)](_0x1875ab,_0x2727aa):_0x2309c5,_0x31b1f6;if(typeof Reflect==_0x58da79(0x1d6)&&typeof Reflect[_0x58da79(0x1f5)]==_0x58da79(0x1f1))_0x69df89=Reflect[_0x58da79(0x1f5)](_0x22a4e4,_0x1875ab,_0x2727aa,_0x2309c5);else{for(var _0x24140f=_0x22a4e4[_0x58da79(0x1c3)]-0x1;_0x24140f>=0x0;_0x24140f--)(_0x31b1f6=_0x22a4e4[_0x24140f])&&(_0x69df89=(_0x32bf5d<0x3?_0x31b1f6(_0x69df89):_0x32bf5d>0x3?_0x31b1f6(_0x1875ab,_0x2727aa,_0x69df89):_0x31b1f6(_0x1875ab,_0x2727aa))||_0x69df89);}return _0x32bf5d>0x3&&_0x69df89&&Object[_0x58da79(0x1e7)](_0x1875ab,_0x2727aa,_0x69df89),_0x69df89;}let f=class extends r[_0x3b8054(0x206)]{constructor(_0x3384bc){const _0x23d26a=_0x3b8054;super(),this[_0x23d26a(0x1ce)]=_0x3384bc;}[_0x3b8054(0x203)](_0x2f58e4){const _0x8021d=_0x3b8054;var _0x3e6d95;let _0x327b11=((_0x3e6d95=this[_0x8021d(0x1ce)][_0x8021d(0x1cc)](t['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']))==null?void 0x0:_0x3e6d95[_0x8021d(0x1d7)])||{};try{let _0x4f2d4d=new o[(_0x8021d(0x1f7))](_0x2f58e4,{'headers':{..._0x327b11}}),_0x3c5de8=new r[(_0x8021d(0x1e8))]();return{'URL':_0x2f58e4,'close':(_0x36500f,_0x2329e0)=>{const _0x1c7f4a=_0x8021d;_0x4f2d4d[_0x1c7f4a(0x1c9)](_0x36500f,_0x2329e0),_0x3c5de8[_0x1c7f4a(0x202)]();},'send':_0x56aa9f=>{const _0x3f9a8b=_0x8021d;_0x4f2d4d[_0x3f9a8b(0x201)](_0x56aa9f);},'open$':new a['Observable'](_0x4b00d6=>{const _0x2c2909=_0x8021d;let _0x3c0658=_0x39da54=>_0x4b00d6[_0x2c2909(0x1d8)](_0x39da54);_0x4f2d4d['addEventListener']('open',_0x3c0658),_0x3c5de8[_0x2c2909(0x204)]((0x0,r[_0x2c2909(0x1e3)])(()=>_0x4f2d4d[_0x2c2909(0x1f4)]('open',_0x3c0658)));})[_0x8021d(0x1d1)]((0x0,a['share'])()),'close$':new a[(_0x8021d(0x1ee))](_0x11cfd8=>{const _0x20c2a6=_0x8021d;let _0x38489c=_0xa90a36=>_0x11cfd8[_0x20c2a6(0x1d8)](_0xa90a36);_0x4f2d4d[_0x20c2a6(0x1d9)]('close',_0x38489c),_0x3c5de8[_0x20c2a6(0x204)]((0x0,r['toDisposable'])(()=>_0x4f2d4d['removeEventListener'](_0x20c2a6(0x1c9),_0x38489c)));})[_0x8021d(0x1d1)]((0x0,a['share'])()),'error$':new a['Observable'](_0x3ea297=>{const _0x30f7af=_0x8021d;let _0x2cdb23=_0x53bc24=>_0x3ea297['next'](_0x53bc24);_0x4f2d4d[_0x30f7af(0x1d9)](_0x30f7af(0x1e5),_0x2cdb23),_0x3c5de8[_0x30f7af(0x204)]((0x0,r[_0x30f7af(0x1e3)])(()=>_0x4f2d4d[_0x30f7af(0x1f4)]('error',_0x2cdb23)));})['pipe']((0x0,a[_0x8021d(0x1de)])()),'message$':new a['Observable'](_0x3d966f=>{const _0x4fb425=_0x8021d;let _0x2c4551=_0x330a38=>_0x3d966f[_0x4fb425(0x1d8)](_0x330a38);_0x4f2d4d[_0x4fb425(0x1d9)](_0x4fb425(0x1e9),_0x2c4551),_0x3c5de8[_0x4fb425(0x204)]((0x0,r['toDisposable'])(()=>_0x4f2d4d[_0x4fb425(0x1f4)](_0x4fb425(0x1e9),_0x2c4551)));})[_0x8021d(0x1d1)]((0x0,a[_0x8021d(0x1de)])())};}catch(_0x4f37d7){return console[_0x8021d(0x1e5)](_0x4f37d7),null;}}};f=d([u(0x0,r[_0x3b8054(0x1d0)])],f);function p(_0x425013){'@babel/helpers - typeof';const _0x3b9d6a=_0x3b8054;return p=typeof Symbol==_0x3b9d6a(0x1f1)&&typeof Symbol[_0x3b9d6a(0x1c8)]==_0x3b9d6a(0x1fd)?function(_0x3cbd35){return typeof _0x3cbd35;}:function(_0x5655ca){const _0x4dc320=_0x3b9d6a;return _0x5655ca&&typeof Symbol=='function'&&_0x5655ca['constructor']===Symbol&&_0x5655ca!==Symbol[_0x4dc320(0x1ea)]?_0x4dc320(0x1fd):typeof _0x5655ca;},p(_0x425013);}function m(_0x3bcfa7,_0x458670){const _0x36da10=_0x3b8054;if(p(_0x3bcfa7)!=_0x36da10(0x1d6)||!_0x3bcfa7)return _0x3bcfa7;var _0x2e6264=_0x3bcfa7[Symbol['toPrimitive']];if(_0x2e6264!==void 0x0){var _0x30338e=_0x2e6264[_0x36da10(0x1ed)](_0x3bcfa7,_0x458670||'default');if(p(_0x30338e)!=_0x36da10(0x1d6))return _0x30338e;throw TypeError(_0x36da10(0x1d4));}return(_0x458670===_0x36da10(0x200)?String:Number)(_0x3bcfa7);}function h(_0x53408a){const _0x5d92b3=_0x3b8054;var _0x1904f7=m(_0x53408a,_0x5d92b3(0x200));return p(_0x1904f7)==_0x5d92b3(0x1fd)?_0x1904f7:_0x1904f7+'';}function g(_0x1399e4,_0x5bbcb0,_0x1c7fd7){const _0x580fcf=_0x3b8054;return(_0x5bbcb0=h(_0x5bbcb0))in _0x1399e4?Object[_0x580fcf(0x1e7)](_0x1399e4,_0x5bbcb0,{'value':_0x1c7fd7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1399e4[_0x5bbcb0]=_0x1c7fd7,_0x1399e4;}let _=class extends r[_0x3b8054(0x1d3)]{constructor(_0x55639f=l,_0x4b5e44,_0x126c1b){const _0x5f0cf1=_0x3b8054;super(),this[_0x5f0cf1(0x1c5)]=_0x55639f,this[_0x5f0cf1(0x1ce)]=_0x4b5e44,this[_0x5f0cf1(0x1c6)]=_0x126c1b;let {..._0x483a3c}=(0x0,r[_0x5f0cf1(0x1f0)])({},l,this['_config']);this[_0x5f0cf1(0x1ce)][_0x5f0cf1(0x1cd)]('collaboration-client-node.config',_0x483a3c);}[_0x3b8054(0x1ca)](){const _0x1c2fa0=_0x3b8054;this[_0x1c2fa0(0x1e6)]();}[_0x3b8054(0x1e6)](){const _0x37ec33=_0x3b8054;(0x0,r[_0x37ec33(0x1ff)])(this[_0x37ec33(0x1c6)],[[i[_0x37ec33(0x1cb)],{'useClass':f}]]);}};g(_,'pluginName',_0x3b8054(0x1fb)),g(_,_0x3b8054(0x1e2),s),g(_,_0x3b8054(0x1da),c),_=d([(0x0,r['DependentOn'])(n[_0x3b8054(0x1c1)],i['UniverNetworkPlugin'],e[_0x3b8054(0x1dc)],t['UniverCollaborationClientPlugin']),u(0x1,r[_0x3b8054(0x1d0)]),u(0x2,(0x0,r['Inject'])(r[_0x3b8054(0x1d5)]))],_);let v=class extends t[_0x3b8054(0x1e4)]{constructor(_0x4b1e3c,_0x5c8ab6,_0x46b0b1,_0x364267,_0x50459a){const _0x36fa43=_0x3b8054;super(_0x4b1e3c,_0x5c8ab6,_0x46b0b1,_0x364267,_0x50459a);let _0x46891a=this[_0x36fa43(0x1ce)][_0x36fa43(0x1cc)](t[_0x36fa43(0x1eb)]);this[_0x36fa43(0x1df)][_0x36fa43(0x1f2)]({'interceptor':(_0x5b1d84,_0x1ad3d9)=>{const _0x48ab6f=_0x36fa43;let _0x464de5=_0x5b1d84[_0x48ab6f(0x1f8)];if(_0x46891a!=null&&_0x46891a[_0x48ab6f(0x1d7)]){for(let _0x26db24 in _0x46891a[_0x48ab6f(0x1d7)])_0x464de5[_0x48ab6f(0x1e0)](_0x26db24,_0x46891a[_0x48ab6f(0x1d7)][_0x26db24]);}return _0x1ad3d9(_0x5b1d84);}});}async[_0x3b8054(0x203)](_0x2689c1){const _0x437f4c=_0x3b8054;return this[_0x437f4c(0x1dd)](_0x2689c1);}};function _0x3e3c(){const _0x5e5be5=['16119imVqeF','WebSocket','headers','120qJlsHK','1.0.0','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','4372760PBYLLh','symbol','Module','registerDependencies','string','send','dispose','createSocket','add','ILogService','Disposable','toStringTag','447130KoPKJO','@univerjs-pro/collaboration-client-node','64020lAfCBX','UniverLicensePlugin','1PywvKY','length','5975ozTaTL','_config','_injector','1074972gWDusZ','iterator','close','onStarting','ISocketService','getConfig','setConfig','_configService','524403aaQbEA','IConfigService','pipe','156hvgUKI','Plugin','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Injector','object','customHeaders','next','addEventListener','version','Inject','UniverCollaborationPlugin','_doCreateSocket','share','_httpService','set','252jnocUA','packageName','toDisposable','CollaborationSocketService','error','_registerDependencies','defineProperty','DisposableCollection','message','prototype','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','getOwnPropertyDescriptor','call','Observable','64BgPTUn','merge','function','registerHTTPInterceptor','NodeCollaborationSocketService','removeEventListener','decorate'];_0x3e3c=function(){return _0x5e5be5;};return _0x3e3c();}v=d([u(0x0,(0x0,r[_0x3b8054(0x1db)])(r[_0x3b8054(0x1d5)])),u(0x1,(0x0,r[_0x3b8054(0x1db)])(i['HTTPService'])),u(0x2,r['IConfigService']),u(0x3,r[_0x3b8054(0x205)]),u(0x4,e['ISnapshotServerService'])],v),Object[_0x3b8054(0x1e7)](exports,_0x3b8054(0x1f3),{'enumerable':!0x0,'get':function(){return v;}}),Object[_0x3b8054(0x1e7)](exports,'UniverCollaborationClientNodePlugin',{'enumerable':!0x0,'get':function(){return _;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x41e300=_0x3172;(function(_0x5ae645,_0x176beb){const _0x2f81e1=_0x3172,_0x1df91b=_0x5ae645();while(!![]){try{const _0x290d63=-parseInt(_0x2f81e1(0x90))/0x1*(-parseInt(_0x2f81e1(0x96))/0x2)+-parseInt(_0x2f81e1(0x85))/0x3*(parseInt(_0x2f81e1(0x9d))/0x4)+-parseInt(_0x2f81e1(0x93))/0x5+parseInt(_0x2f81e1(0x8c))/0x6+-parseInt(_0x2f81e1(0xa7))/0x7*(parseInt(_0x2f81e1(0x9e))/0x8)+-parseInt(_0x2f81e1(0x99))/0x9*(parseInt(_0x2f81e1(0x86))/0xa)+parseInt(_0x2f81e1(0xa8))/0xb*(parseInt(_0x2f81e1(0xac))/0xc);if(_0x290d63===_0x176beb)break;else _0x1df91b['push'](_0x1df91b['shift']());}catch(_0xd872ff){_0x1df91b['push'](_0x1df91b['shift']());}}}(_0x5ae8,0xdf205));import{ISnapshotServerService as _0x2a8abe,UniverCollaborationPlugin as _0x1ba687}from'@univerjs-pro/collaboration';import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x570415,CollaborationSocketService as _0x21dcb9,UniverCollaborationClientPlugin as _0xdf2d6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1292ea}from'@univerjs-pro/license';import{DependentOn as _0xf8bf16,Disposable as _0x290b84,DisposableCollection as _0xade28b,IConfigService as _0x11f0b3,ILogService as _0x3556ce,Inject as _0x3dd0dc,Injector as _0x5bb429,Plugin as _0x5ba7ba,merge as _0x5b05fc,registerDependencies as _0x9683c3,toDisposable as _0x2dd926}from'@univerjs/core';import{HTTPService as _0x3df89a,ISocketService as _0x21c2bf,UniverNetworkPlugin as _0xda6645}from'@univerjs/network';import{Observable as _0x4aad1d,share as _0x13d9c2}from'rxjs';import{WebSocket as _0x60ed4d}from'ws';var C='@univerjs-pro/collaboration-client-node',w='1.0.0-rc.0';const T={};function E(_0x2456b0,_0x414a12){return function(_0x5d6889,_0x3fc56d){_0x414a12(_0x5d6889,_0x3fc56d,_0x2456b0);};}function _0x5ae8(){const _0x5f5810=['onStarting','removeEventListener','open','203KHRvtA','11aGyhMU','string','_httpService','close','23388072wSjuCg','_configService','customHeaders','39PaRCwG','228400fPcjyb','headers','send','pipe','version','getConfig','7303218OivGZM','decorate','length','add','14WYmMsv','_doCreateSocket','error','4578975vUmGil','message','pluginName','104710ROTvaD','next','function','117KnEUUC','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_registerDependencies','symbol','501040tHYQtk','39768eHBrcx','addEventListener','dispose','constructor','packageName','object'];_0x5ae8=function(){return _0x5f5810;};return _0x5ae8();}function D(_0x412985,_0x2398f7,_0x3ae36d,_0x59c97a){const _0x1fcfda=_0x3172;var _0x193b75=arguments['length'],_0x268179=_0x193b75<0x3?_0x2398f7:_0x59c97a===null?_0x59c97a=Object['getOwnPropertyDescriptor'](_0x2398f7,_0x3ae36d):_0x59c97a,_0xea00dd;if(typeof Reflect=='object'&&typeof Reflect[_0x1fcfda(0x8d)]==_0x1fcfda(0x98))_0x268179=Reflect[_0x1fcfda(0x8d)](_0x412985,_0x2398f7,_0x3ae36d,_0x59c97a);else{for(var _0x6f4fa7=_0x412985[_0x1fcfda(0x8e)]-0x1;_0x6f4fa7>=0x0;_0x6f4fa7--)(_0xea00dd=_0x412985[_0x6f4fa7])&&(_0x268179=(_0x193b75<0x3?_0xea00dd(_0x268179):_0x193b75>0x3?_0xea00dd(_0x2398f7,_0x3ae36d,_0x268179):_0xea00dd(_0x2398f7,_0x3ae36d))||_0x268179);}return _0x193b75>0x3&&_0x268179&&Object['defineProperty'](_0x2398f7,_0x3ae36d,_0x268179),_0x268179;}let O=class extends _0x290b84{constructor(_0x68b8f0){const _0x25f06e=_0x3172;super(),this[_0x25f06e(0xad)]=_0x68b8f0;}['createSocket'](_0x2ec9ce){const _0x844586=_0x3172;var _0x19bb3b;let _0x2324b3=((_0x19bb3b=this['_configService'][_0x844586(0x8b)](_0x570415))==null?void 0x0:_0x19bb3b['customHeaders'])||{};try{let _0x5dbf79=new _0x60ed4d(_0x2ec9ce,{'headers':{..._0x2324b3}}),_0x4d60ce=new _0xade28b();return{'URL':_0x2ec9ce,'close':(_0x39d43b,_0x276af6)=>{const _0x3a3dc8=_0x844586;_0x5dbf79[_0x3a3dc8(0xab)](_0x39d43b,_0x276af6),_0x4d60ce[_0x3a3dc8(0xa0)]();},'send':_0x455fea=>{const _0x57f8b0=_0x844586;_0x5dbf79[_0x57f8b0(0x88)](_0x455fea);},'open$':new _0x4aad1d(_0x230a99=>{const _0x1b676d=_0x844586;let _0xe0afe3=_0x3e97c8=>_0x230a99['next'](_0x3e97c8);_0x5dbf79['addEventListener'](_0x1b676d(0xa6),_0xe0afe3),_0x4d60ce[_0x1b676d(0x8f)](_0x2dd926(()=>_0x5dbf79[_0x1b676d(0xa5)](_0x1b676d(0xa6),_0xe0afe3)));})[_0x844586(0x89)](_0x13d9c2()),'close$':new _0x4aad1d(_0x1b4db9=>{const _0x3301ce=_0x844586;let _0x21b289=_0x1940f9=>_0x1b4db9[_0x3301ce(0x97)](_0x1940f9);_0x5dbf79['addEventListener']('close',_0x21b289),_0x4d60ce[_0x3301ce(0x8f)](_0x2dd926(()=>_0x5dbf79[_0x3301ce(0xa5)]('close',_0x21b289)));})['pipe'](_0x13d9c2()),'error$':new _0x4aad1d(_0x4bfe44=>{const _0x93c0a0=_0x844586;let _0x1c1d1f=_0xd61569=>_0x4bfe44[_0x93c0a0(0x97)](_0xd61569);_0x5dbf79[_0x93c0a0(0x9f)](_0x93c0a0(0x92),_0x1c1d1f),_0x4d60ce['add'](_0x2dd926(()=>_0x5dbf79[_0x93c0a0(0xa5)](_0x93c0a0(0x92),_0x1c1d1f)));})[_0x844586(0x89)](_0x13d9c2()),'message$':new _0x4aad1d(_0xfb7f53=>{const _0xf78f2c=_0x844586;let _0x220dee=_0x34e9f7=>_0xfb7f53[_0xf78f2c(0x97)](_0x34e9f7);_0x5dbf79['addEventListener'](_0xf78f2c(0x94),_0x220dee),_0x4d60ce[_0xf78f2c(0x8f)](_0x2dd926(()=>_0x5dbf79[_0xf78f2c(0xa5)](_0xf78f2c(0x94),_0x220dee)));})['pipe'](_0x13d9c2())};}catch(_0x21f0e4){return console['error'](_0x21f0e4),null;}}};O=D([E(0x0,_0x11f0b3)],O);function k(_0x3dfa98){'@babel/helpers - typeof';const _0x5e8ef4=_0x3172;return k=typeof Symbol==_0x5e8ef4(0x98)&&typeof Symbol['iterator']=='symbol'?function(_0x40acb1){return typeof _0x40acb1;}:function(_0xead256){const _0x2c2521=_0x5e8ef4;return _0xead256&&typeof Symbol==_0x2c2521(0x98)&&_0xead256[_0x2c2521(0xa1)]===Symbol&&_0xead256!==Symbol['prototype']?'symbol':typeof _0xead256;},k(_0x3dfa98);}function A(_0x5ae429,_0x129d8a){const _0x548781=_0x3172;if(k(_0x5ae429)!=_0x548781(0xa3)||!_0x5ae429)return _0x5ae429;var _0x279197=_0x5ae429[Symbol['toPrimitive']];if(_0x279197!==void 0x0){var _0x4a6b94=_0x279197['call'](_0x5ae429,_0x129d8a||'default');if(k(_0x4a6b94)!=_0x548781(0xa3))return _0x4a6b94;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x129d8a===_0x548781(0xa9)?String:Number)(_0x5ae429);}function _0x3172(_0x2da58c,_0x39d3c3){_0x2da58c=_0x2da58c-0x85;const _0x5ae81e=_0x5ae8();let _0x317281=_0x5ae81e[_0x2da58c];return _0x317281;}function j(_0x3afa2e){const _0x3fdb54=_0x3172;var _0x57e28c=A(_0x3afa2e,'string');return k(_0x57e28c)==_0x3fdb54(0x9c)?_0x57e28c:_0x57e28c+'';}function M(_0x322dc3,_0x19f448,_0x1d46ed){return(_0x19f448=j(_0x19f448))in _0x322dc3?Object['defineProperty'](_0x322dc3,_0x19f448,{'value':_0x1d46ed,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x322dc3[_0x19f448]=_0x1d46ed,_0x322dc3;}let N=class extends _0x5ba7ba{constructor(_0x4d3d26=T,_0x86267a,_0x59ce46){const _0xf7c7f8=_0x3172;super(),this['_config']=_0x4d3d26,this[_0xf7c7f8(0xad)]=_0x86267a,this['_injector']=_0x59ce46;let {..._0xc14034}=_0x5b05fc({},T,this['_config']);this[_0xf7c7f8(0xad)]['setConfig']('collaboration-client-node.config',_0xc14034);}[_0x41e300(0xa4)](){const _0x21b8a4=_0x41e300;this[_0x21b8a4(0x9b)]();}['_registerDependencies'](){_0x9683c3(this['_injector'],[[_0x21c2bf,{'useClass':O}]]);}};M(N,_0x41e300(0x95),_0x41e300(0x9a)),M(N,_0x41e300(0xa2),C),M(N,_0x41e300(0x8a),w),N=D([_0xf8bf16(_0x1292ea,_0xda6645,_0x1ba687,_0xdf2d6),E(0x1,_0x11f0b3),E(0x2,_0x3dd0dc(_0x5bb429))],N);let P=class extends _0x21dcb9{constructor(_0x411041,_0x3fa0ff,_0x52775f,_0x5f1dd5,_0x533595){const _0x535ef6=_0x41e300;super(_0x411041,_0x3fa0ff,_0x52775f,_0x5f1dd5,_0x533595);let _0x593fb=this[_0x535ef6(0xad)][_0x535ef6(0x8b)](_0x570415);this[_0x535ef6(0xaa)]['registerHTTPInterceptor']({'interceptor':(_0x310b56,_0x554580)=>{const _0x329e08=_0x535ef6;let _0x10823d=_0x310b56[_0x329e08(0x87)];if(_0x593fb!=null&&_0x593fb[_0x329e08(0xae)]){for(let _0x45e8e2 in _0x593fb[_0x329e08(0xae)])_0x10823d['set'](_0x45e8e2,_0x593fb[_0x329e08(0xae)][_0x45e8e2]);}return _0x554580(_0x310b56);}});}async['createSocket'](_0x44b8b7){const _0x4104dc=_0x41e300;return this[_0x4104dc(0x91)](_0x44b8b7);}};P=D([E(0x0,_0x3dd0dc(_0x5bb429)),E(0x1,_0x3dd0dc(_0x3df89a)),E(0x2,_0x11f0b3),E(0x3,_0x3556ce),E(0x4,_0x2a8abe)],P);export{P as NodeCollaborationSocketService,N as UniverCollaborationClientNodePlugin};
1
+ const _0x2a4366=_0x4fe8;(function(_0x5581cc,_0x54bc11){const _0x5237d3=_0x4fe8,_0x5e46d3=_0x5581cc();while(!![]){try{const _0x23a977=parseInt(_0x5237d3(0x147))/0x1*(parseInt(_0x5237d3(0x13c))/0x2)+parseInt(_0x5237d3(0x15f))/0x3+parseInt(_0x5237d3(0x160))/0x4+-parseInt(_0x5237d3(0x15a))/0x5*(parseInt(_0x5237d3(0x134))/0x6)+parseInt(_0x5237d3(0x13b))/0x7+parseInt(_0x5237d3(0x12f))/0x8*(parseInt(_0x5237d3(0x136))/0x9)+-parseInt(_0x5237d3(0x14f))/0xa*(parseInt(_0x5237d3(0x15b))/0xb);if(_0x23a977===_0x54bc11)break;else _0x5e46d3['push'](_0x5e46d3['shift']());}catch(_0x5e4107){_0x5e46d3['push'](_0x5e46d3['shift']());}}}(_0xd02c,0x6ff46));import{ISnapshotServerService as _0x3180c2,UniverCollaborationPlugin as _0x2fb57c}from'@univerjs-pro/collaboration';import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0xbf4e2,CollaborationSocketService as _0x2c515f,UniverCollaborationClientPlugin as _0xfe9b8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4174ff}from'@univerjs-pro/license';import{DependentOn as _0x2b7dc9,Disposable as _0x78400,DisposableCollection as _0x5d9907,IConfigService as _0x4df45e,ILogService as _0x382d11,Inject as _0x276453,Injector as _0x491da6,Plugin as _0x409ff4,merge as _0x31982b,registerDependencies as _0x5dfa3c,toDisposable as _0x5d0986}from'@univerjs/core';import{HTTPService as _0x2bae5b,ISocketService as _0x16afa6,UniverNetworkPlugin as _0xd6a96c}from'@univerjs/network';import{Observable as _0x2019af,share as _0x66cac3}from'rxjs';import{WebSocket as _0x35b80e}from'ws';var C=_0x2a4366(0x140),w=_0x2a4366(0x157);const T={};function E(_0x2b9300,_0x2854fb){return function(_0x43226c,_0x413b23){_0x2854fb(_0x43226c,_0x413b23,_0x2b9300);};}function D(_0x365488,_0x4102da,_0x27b4ed,_0x5abe71){const _0x338b89=_0x2a4366;var _0x198116=arguments[_0x338b89(0x13e)],_0x1a2eff=_0x198116<0x3?_0x4102da:_0x5abe71===null?_0x5abe71=Object[_0x338b89(0x159)](_0x4102da,_0x27b4ed):_0x5abe71,_0x136151;if(typeof Reflect==_0x338b89(0x12e)&&typeof Reflect[_0x338b89(0x13f)]==_0x338b89(0x150))_0x1a2eff=Reflect[_0x338b89(0x13f)](_0x365488,_0x4102da,_0x27b4ed,_0x5abe71);else{for(var _0x309aa2=_0x365488[_0x338b89(0x13e)]-0x1;_0x309aa2>=0x0;_0x309aa2--)(_0x136151=_0x365488[_0x309aa2])&&(_0x1a2eff=(_0x198116<0x3?_0x136151(_0x1a2eff):_0x198116>0x3?_0x136151(_0x4102da,_0x27b4ed,_0x1a2eff):_0x136151(_0x4102da,_0x27b4ed))||_0x1a2eff);}return _0x198116>0x3&&_0x1a2eff&&Object[_0x338b89(0x153)](_0x4102da,_0x27b4ed,_0x1a2eff),_0x1a2eff;}let O=class extends _0x78400{constructor(_0x4a6045){const _0x516078=_0x2a4366;super(),this[_0x516078(0x14e)]=_0x4a6045;}[_0x2a4366(0x151)](_0xfc5184){const _0x5079ed=_0x2a4366;var _0x294a0a;let _0x2669a1=((_0x294a0a=this[_0x5079ed(0x14e)]['getConfig'](_0xbf4e2))==null?void 0x0:_0x294a0a['customHeaders'])||{};try{let _0x3ad00e=new _0x35b80e(_0xfc5184,{'headers':{..._0x2669a1}}),_0x362cb=new _0x5d9907();return{'URL':_0xfc5184,'close':(_0x53bd0f,_0x2409b2)=>{const _0x1a126b=_0x5079ed;_0x3ad00e[_0x1a126b(0x133)](_0x53bd0f,_0x2409b2),_0x362cb[_0x1a126b(0x130)]();},'send':_0x47977e=>{const _0x25adb1=_0x5079ed;_0x3ad00e[_0x25adb1(0x14d)](_0x47977e);},'open$':new _0x2019af(_0x16670f=>{const _0x389594=_0x5079ed;let _0x3f7578=_0x2aab32=>_0x16670f[_0x389594(0x15d)](_0x2aab32);_0x3ad00e['addEventListener'](_0x389594(0x141),_0x3f7578),_0x362cb[_0x389594(0x12d)](_0x5d0986(()=>_0x3ad00e[_0x389594(0x144)]('open',_0x3f7578)));})[_0x5079ed(0x158)](_0x66cac3()),'close$':new _0x2019af(_0x6612b2=>{const _0x1a53f8=_0x5079ed;let _0x2b9bbd=_0x939fdf=>_0x6612b2[_0x1a53f8(0x15d)](_0x939fdf);_0x3ad00e[_0x1a53f8(0x156)]('close',_0x2b9bbd),_0x362cb['add'](_0x5d0986(()=>_0x3ad00e[_0x1a53f8(0x144)](_0x1a53f8(0x133),_0x2b9bbd)));})['pipe'](_0x66cac3()),'error$':new _0x2019af(_0x2c01e9=>{const _0x29a75b=_0x5079ed;let _0x4c98b4=_0x16ce8f=>_0x2c01e9['next'](_0x16ce8f);_0x3ad00e['addEventListener']('error',_0x4c98b4),_0x362cb[_0x29a75b(0x12d)](_0x5d0986(()=>_0x3ad00e['removeEventListener'](_0x29a75b(0x137),_0x4c98b4)));})[_0x5079ed(0x158)](_0x66cac3()),'message$':new _0x2019af(_0x22c530=>{const _0x576e9c=_0x5079ed;let _0x51f70b=_0x18f0d5=>_0x22c530['next'](_0x18f0d5);_0x3ad00e[_0x576e9c(0x156)](_0x576e9c(0x161),_0x51f70b),_0x362cb[_0x576e9c(0x12d)](_0x5d0986(()=>_0x3ad00e[_0x576e9c(0x144)](_0x576e9c(0x161),_0x51f70b)));})[_0x5079ed(0x158)](_0x66cac3())};}catch(_0x27ee26){return console[_0x5079ed(0x137)](_0x27ee26),null;}}};O=D([E(0x0,_0x4df45e)],O);function _0x4fe8(_0x2f441e,_0x13610d){_0x2f441e=_0x2f441e-0x12d;const _0xd02c62=_0xd02c();let _0x4fe890=_0xd02c62[_0x2f441e];return _0x4fe890;}function k(_0x376486){'@babel/helpers - typeof';const _0x56a6aa=_0x2a4366;return k=typeof Symbol==_0x56a6aa(0x150)&&typeof Symbol[_0x56a6aa(0x132)]==_0x56a6aa(0x15e)?function(_0x5025f2){return typeof _0x5025f2;}:function(_0x4ebe13){const _0x4b8042=_0x56a6aa;return _0x4ebe13&&typeof Symbol==_0x4b8042(0x150)&&_0x4ebe13[_0x4b8042(0x142)]===Symbol&&_0x4ebe13!==Symbol[_0x4b8042(0x152)]?_0x4b8042(0x15e):typeof _0x4ebe13;},k(_0x376486);}function A(_0x5531d8,_0x224677){const _0x5183e4=_0x2a4366;if(k(_0x5531d8)!=_0x5183e4(0x12e)||!_0x5531d8)return _0x5531d8;var _0x4182b1=_0x5531d8[Symbol[_0x5183e4(0x14c)]];if(_0x4182b1!==void 0x0){var _0x459c85=_0x4182b1[_0x5183e4(0x138)](_0x5531d8,_0x224677||_0x5183e4(0x131));if(k(_0x459c85)!='object')return _0x459c85;throw TypeError(_0x5183e4(0x13a));}return(_0x224677===_0x5183e4(0x149)?String:Number)(_0x5531d8);}function j(_0x3ab50c){const _0x8a5dd3=_0x2a4366;var _0x825211=A(_0x3ab50c,_0x8a5dd3(0x149));return k(_0x825211)==_0x8a5dd3(0x15e)?_0x825211:_0x825211+'';}function M(_0x1edd42,_0x3869ac,_0x180d8d){const _0x50973a=_0x2a4366;return(_0x3869ac=j(_0x3869ac))in _0x1edd42?Object[_0x50973a(0x153)](_0x1edd42,_0x3869ac,{'value':_0x180d8d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1edd42[_0x3869ac]=_0x180d8d,_0x1edd42;}let N=class extends _0x409ff4{constructor(_0x511583=T,_0x21af77,_0x702ace){const _0x23d2c6=_0x2a4366;super(),this[_0x23d2c6(0x143)]=_0x511583,this[_0x23d2c6(0x14e)]=_0x21af77,this[_0x23d2c6(0x145)]=_0x702ace;let {..._0x25ca7a}=_0x31982b({},T,this[_0x23d2c6(0x143)]);this[_0x23d2c6(0x14e)][_0x23d2c6(0x13d)](_0x23d2c6(0x154),_0x25ca7a);}[_0x2a4366(0x155)](){const _0x77c0c8=_0x2a4366;this[_0x77c0c8(0x148)]();}[_0x2a4366(0x148)](){_0x5dfa3c(this['_injector'],[[_0x16afa6,{'useClass':O}]]);}};M(N,_0x2a4366(0x15c),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),M(N,_0x2a4366(0x139),C),M(N,_0x2a4366(0x14b),w),N=D([_0x2b7dc9(_0x4174ff,_0xd6a96c,_0x2fb57c,_0xfe9b8),E(0x1,_0x4df45e),E(0x2,_0x276453(_0x491da6))],N);let P=class extends _0x2c515f{constructor(_0x594c75,_0x10dc8a,_0x311acf,_0x38e86b,_0x3110c0){const _0x5dadbc=_0x2a4366;super(_0x594c75,_0x10dc8a,_0x311acf,_0x38e86b,_0x3110c0);let _0x1cb493=this[_0x5dadbc(0x14e)][_0x5dadbc(0x135)](_0xbf4e2);this[_0x5dadbc(0x14a)]['registerHTTPInterceptor']({'interceptor':(_0x449acd,_0x10fcb9)=>{const _0x45b8a2=_0x5dadbc;let _0x38217e=_0x449acd['headers'];if(_0x1cb493!=null&&_0x1cb493[_0x45b8a2(0x146)]){for(let _0x57240a in _0x1cb493[_0x45b8a2(0x146)])_0x38217e['set'](_0x57240a,_0x1cb493[_0x45b8a2(0x146)][_0x57240a]);}return _0x10fcb9(_0x449acd);}});}async[_0x2a4366(0x151)](_0x28b8c1){return this['_doCreateSocket'](_0x28b8c1);}};function _0xd02c(){const _0x5f56db=['55byYUpD','pluginName','next','symbol','208026wuiNsF','2323384zEXhVv','message','add','object','40lSZXey','dispose','default','iterator','close','34590fgWvMX','getConfig','1290888AFfdND','error','call','packageName','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','3775709KHPlLK','1687192UlsNgJ','setConfig','length','decorate','@univerjs-pro/collaboration-client-node','open','constructor','_config','removeEventListener','_injector','customHeaders','1KcbCBt','_registerDependencies','string','_httpService','version','toPrimitive','send','_configService','2957800ZFZeYV','function','createSocket','prototype','defineProperty','collaboration-client-node.config','onStarting','addEventListener','1.0.0','pipe','getOwnPropertyDescriptor','705HRDSGa'];_0xd02c=function(){return _0x5f56db;};return _0xd02c();}P=D([E(0x0,_0x276453(_0x491da6)),E(0x1,_0x276453(_0x2bae5b)),E(0x2,_0x4df45e),E(0x3,_0x382d11),E(0x4,_0x3180c2)],P);export{P as NodeCollaborationSocketService,N as UniverCollaborationClientNodePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x41e300=_0x3172;(function(_0x5ae645,_0x176beb){const _0x2f81e1=_0x3172,_0x1df91b=_0x5ae645();while(!![]){try{const _0x290d63=-parseInt(_0x2f81e1(0x90))/0x1*(-parseInt(_0x2f81e1(0x96))/0x2)+-parseInt(_0x2f81e1(0x85))/0x3*(parseInt(_0x2f81e1(0x9d))/0x4)+-parseInt(_0x2f81e1(0x93))/0x5+parseInt(_0x2f81e1(0x8c))/0x6+-parseInt(_0x2f81e1(0xa7))/0x7*(parseInt(_0x2f81e1(0x9e))/0x8)+-parseInt(_0x2f81e1(0x99))/0x9*(parseInt(_0x2f81e1(0x86))/0xa)+parseInt(_0x2f81e1(0xa8))/0xb*(parseInt(_0x2f81e1(0xac))/0xc);if(_0x290d63===_0x176beb)break;else _0x1df91b['push'](_0x1df91b['shift']());}catch(_0xd872ff){_0x1df91b['push'](_0x1df91b['shift']());}}}(_0x5ae8,0xdf205));import{ISnapshotServerService as _0x2a8abe,UniverCollaborationPlugin as _0x1ba687}from'@univerjs-pro/collaboration';import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0x570415,CollaborationSocketService as _0x21dcb9,UniverCollaborationClientPlugin as _0xdf2d6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1292ea}from'@univerjs-pro/license';import{DependentOn as _0xf8bf16,Disposable as _0x290b84,DisposableCollection as _0xade28b,IConfigService as _0x11f0b3,ILogService as _0x3556ce,Inject as _0x3dd0dc,Injector as _0x5bb429,Plugin as _0x5ba7ba,merge as _0x5b05fc,registerDependencies as _0x9683c3,toDisposable as _0x2dd926}from'@univerjs/core';import{HTTPService as _0x3df89a,ISocketService as _0x21c2bf,UniverNetworkPlugin as _0xda6645}from'@univerjs/network';import{Observable as _0x4aad1d,share as _0x13d9c2}from'rxjs';import{WebSocket as _0x60ed4d}from'ws';var C='@univerjs-pro/collaboration-client-node',w='1.0.0-rc.0';const T={};function E(_0x2456b0,_0x414a12){return function(_0x5d6889,_0x3fc56d){_0x414a12(_0x5d6889,_0x3fc56d,_0x2456b0);};}function _0x5ae8(){const _0x5f5810=['onStarting','removeEventListener','open','203KHRvtA','11aGyhMU','string','_httpService','close','23388072wSjuCg','_configService','customHeaders','39PaRCwG','228400fPcjyb','headers','send','pipe','version','getConfig','7303218OivGZM','decorate','length','add','14WYmMsv','_doCreateSocket','error','4578975vUmGil','message','pluginName','104710ROTvaD','next','function','117KnEUUC','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_registerDependencies','symbol','501040tHYQtk','39768eHBrcx','addEventListener','dispose','constructor','packageName','object'];_0x5ae8=function(){return _0x5f5810;};return _0x5ae8();}function D(_0x412985,_0x2398f7,_0x3ae36d,_0x59c97a){const _0x1fcfda=_0x3172;var _0x193b75=arguments['length'],_0x268179=_0x193b75<0x3?_0x2398f7:_0x59c97a===null?_0x59c97a=Object['getOwnPropertyDescriptor'](_0x2398f7,_0x3ae36d):_0x59c97a,_0xea00dd;if(typeof Reflect=='object'&&typeof Reflect[_0x1fcfda(0x8d)]==_0x1fcfda(0x98))_0x268179=Reflect[_0x1fcfda(0x8d)](_0x412985,_0x2398f7,_0x3ae36d,_0x59c97a);else{for(var _0x6f4fa7=_0x412985[_0x1fcfda(0x8e)]-0x1;_0x6f4fa7>=0x0;_0x6f4fa7--)(_0xea00dd=_0x412985[_0x6f4fa7])&&(_0x268179=(_0x193b75<0x3?_0xea00dd(_0x268179):_0x193b75>0x3?_0xea00dd(_0x2398f7,_0x3ae36d,_0x268179):_0xea00dd(_0x2398f7,_0x3ae36d))||_0x268179);}return _0x193b75>0x3&&_0x268179&&Object['defineProperty'](_0x2398f7,_0x3ae36d,_0x268179),_0x268179;}let O=class extends _0x290b84{constructor(_0x68b8f0){const _0x25f06e=_0x3172;super(),this[_0x25f06e(0xad)]=_0x68b8f0;}['createSocket'](_0x2ec9ce){const _0x844586=_0x3172;var _0x19bb3b;let _0x2324b3=((_0x19bb3b=this['_configService'][_0x844586(0x8b)](_0x570415))==null?void 0x0:_0x19bb3b['customHeaders'])||{};try{let _0x5dbf79=new _0x60ed4d(_0x2ec9ce,{'headers':{..._0x2324b3}}),_0x4d60ce=new _0xade28b();return{'URL':_0x2ec9ce,'close':(_0x39d43b,_0x276af6)=>{const _0x3a3dc8=_0x844586;_0x5dbf79[_0x3a3dc8(0xab)](_0x39d43b,_0x276af6),_0x4d60ce[_0x3a3dc8(0xa0)]();},'send':_0x455fea=>{const _0x57f8b0=_0x844586;_0x5dbf79[_0x57f8b0(0x88)](_0x455fea);},'open$':new _0x4aad1d(_0x230a99=>{const _0x1b676d=_0x844586;let _0xe0afe3=_0x3e97c8=>_0x230a99['next'](_0x3e97c8);_0x5dbf79['addEventListener'](_0x1b676d(0xa6),_0xe0afe3),_0x4d60ce[_0x1b676d(0x8f)](_0x2dd926(()=>_0x5dbf79[_0x1b676d(0xa5)](_0x1b676d(0xa6),_0xe0afe3)));})[_0x844586(0x89)](_0x13d9c2()),'close$':new _0x4aad1d(_0x1b4db9=>{const _0x3301ce=_0x844586;let _0x21b289=_0x1940f9=>_0x1b4db9[_0x3301ce(0x97)](_0x1940f9);_0x5dbf79['addEventListener']('close',_0x21b289),_0x4d60ce[_0x3301ce(0x8f)](_0x2dd926(()=>_0x5dbf79[_0x3301ce(0xa5)]('close',_0x21b289)));})['pipe'](_0x13d9c2()),'error$':new _0x4aad1d(_0x4bfe44=>{const _0x93c0a0=_0x844586;let _0x1c1d1f=_0xd61569=>_0x4bfe44[_0x93c0a0(0x97)](_0xd61569);_0x5dbf79[_0x93c0a0(0x9f)](_0x93c0a0(0x92),_0x1c1d1f),_0x4d60ce['add'](_0x2dd926(()=>_0x5dbf79[_0x93c0a0(0xa5)](_0x93c0a0(0x92),_0x1c1d1f)));})[_0x844586(0x89)](_0x13d9c2()),'message$':new _0x4aad1d(_0xfb7f53=>{const _0xf78f2c=_0x844586;let _0x220dee=_0x34e9f7=>_0xfb7f53[_0xf78f2c(0x97)](_0x34e9f7);_0x5dbf79['addEventListener'](_0xf78f2c(0x94),_0x220dee),_0x4d60ce[_0xf78f2c(0x8f)](_0x2dd926(()=>_0x5dbf79[_0xf78f2c(0xa5)](_0xf78f2c(0x94),_0x220dee)));})['pipe'](_0x13d9c2())};}catch(_0x21f0e4){return console['error'](_0x21f0e4),null;}}};O=D([E(0x0,_0x11f0b3)],O);function k(_0x3dfa98){'@babel/helpers - typeof';const _0x5e8ef4=_0x3172;return k=typeof Symbol==_0x5e8ef4(0x98)&&typeof Symbol['iterator']=='symbol'?function(_0x40acb1){return typeof _0x40acb1;}:function(_0xead256){const _0x2c2521=_0x5e8ef4;return _0xead256&&typeof Symbol==_0x2c2521(0x98)&&_0xead256[_0x2c2521(0xa1)]===Symbol&&_0xead256!==Symbol['prototype']?'symbol':typeof _0xead256;},k(_0x3dfa98);}function A(_0x5ae429,_0x129d8a){const _0x548781=_0x3172;if(k(_0x5ae429)!=_0x548781(0xa3)||!_0x5ae429)return _0x5ae429;var _0x279197=_0x5ae429[Symbol['toPrimitive']];if(_0x279197!==void 0x0){var _0x4a6b94=_0x279197['call'](_0x5ae429,_0x129d8a||'default');if(k(_0x4a6b94)!=_0x548781(0xa3))return _0x4a6b94;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x129d8a===_0x548781(0xa9)?String:Number)(_0x5ae429);}function _0x3172(_0x2da58c,_0x39d3c3){_0x2da58c=_0x2da58c-0x85;const _0x5ae81e=_0x5ae8();let _0x317281=_0x5ae81e[_0x2da58c];return _0x317281;}function j(_0x3afa2e){const _0x3fdb54=_0x3172;var _0x57e28c=A(_0x3afa2e,'string');return k(_0x57e28c)==_0x3fdb54(0x9c)?_0x57e28c:_0x57e28c+'';}function M(_0x322dc3,_0x19f448,_0x1d46ed){return(_0x19f448=j(_0x19f448))in _0x322dc3?Object['defineProperty'](_0x322dc3,_0x19f448,{'value':_0x1d46ed,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x322dc3[_0x19f448]=_0x1d46ed,_0x322dc3;}let N=class extends _0x5ba7ba{constructor(_0x4d3d26=T,_0x86267a,_0x59ce46){const _0xf7c7f8=_0x3172;super(),this['_config']=_0x4d3d26,this[_0xf7c7f8(0xad)]=_0x86267a,this['_injector']=_0x59ce46;let {..._0xc14034}=_0x5b05fc({},T,this['_config']);this[_0xf7c7f8(0xad)]['setConfig']('collaboration-client-node.config',_0xc14034);}[_0x41e300(0xa4)](){const _0x21b8a4=_0x41e300;this[_0x21b8a4(0x9b)]();}['_registerDependencies'](){_0x9683c3(this['_injector'],[[_0x21c2bf,{'useClass':O}]]);}};M(N,_0x41e300(0x95),_0x41e300(0x9a)),M(N,_0x41e300(0xa2),C),M(N,_0x41e300(0x8a),w),N=D([_0xf8bf16(_0x1292ea,_0xda6645,_0x1ba687,_0xdf2d6),E(0x1,_0x11f0b3),E(0x2,_0x3dd0dc(_0x5bb429))],N);let P=class extends _0x21dcb9{constructor(_0x411041,_0x3fa0ff,_0x52775f,_0x5f1dd5,_0x533595){const _0x535ef6=_0x41e300;super(_0x411041,_0x3fa0ff,_0x52775f,_0x5f1dd5,_0x533595);let _0x593fb=this[_0x535ef6(0xad)][_0x535ef6(0x8b)](_0x570415);this[_0x535ef6(0xaa)]['registerHTTPInterceptor']({'interceptor':(_0x310b56,_0x554580)=>{const _0x329e08=_0x535ef6;let _0x10823d=_0x310b56[_0x329e08(0x87)];if(_0x593fb!=null&&_0x593fb[_0x329e08(0xae)]){for(let _0x45e8e2 in _0x593fb[_0x329e08(0xae)])_0x10823d['set'](_0x45e8e2,_0x593fb[_0x329e08(0xae)][_0x45e8e2]);}return _0x554580(_0x310b56);}});}async['createSocket'](_0x44b8b7){const _0x4104dc=_0x41e300;return this[_0x4104dc(0x91)](_0x44b8b7);}};P=D([E(0x0,_0x3dd0dc(_0x5bb429)),E(0x1,_0x3dd0dc(_0x3df89a)),E(0x2,_0x11f0b3),E(0x3,_0x3556ce),E(0x4,_0x2a8abe)],P);export{P as NodeCollaborationSocketService,N as UniverCollaborationClientNodePlugin};
1
+ const _0x2a4366=_0x4fe8;(function(_0x5581cc,_0x54bc11){const _0x5237d3=_0x4fe8,_0x5e46d3=_0x5581cc();while(!![]){try{const _0x23a977=parseInt(_0x5237d3(0x147))/0x1*(parseInt(_0x5237d3(0x13c))/0x2)+parseInt(_0x5237d3(0x15f))/0x3+parseInt(_0x5237d3(0x160))/0x4+-parseInt(_0x5237d3(0x15a))/0x5*(parseInt(_0x5237d3(0x134))/0x6)+parseInt(_0x5237d3(0x13b))/0x7+parseInt(_0x5237d3(0x12f))/0x8*(parseInt(_0x5237d3(0x136))/0x9)+-parseInt(_0x5237d3(0x14f))/0xa*(parseInt(_0x5237d3(0x15b))/0xb);if(_0x23a977===_0x54bc11)break;else _0x5e46d3['push'](_0x5e46d3['shift']());}catch(_0x5e4107){_0x5e46d3['push'](_0x5e46d3['shift']());}}}(_0xd02c,0x6ff46));import{ISnapshotServerService as _0x3180c2,UniverCollaborationPlugin as _0x2fb57c}from'@univerjs-pro/collaboration';import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY as _0xbf4e2,CollaborationSocketService as _0x2c515f,UniverCollaborationClientPlugin as _0xfe9b8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4174ff}from'@univerjs-pro/license';import{DependentOn as _0x2b7dc9,Disposable as _0x78400,DisposableCollection as _0x5d9907,IConfigService as _0x4df45e,ILogService as _0x382d11,Inject as _0x276453,Injector as _0x491da6,Plugin as _0x409ff4,merge as _0x31982b,registerDependencies as _0x5dfa3c,toDisposable as _0x5d0986}from'@univerjs/core';import{HTTPService as _0x2bae5b,ISocketService as _0x16afa6,UniverNetworkPlugin as _0xd6a96c}from'@univerjs/network';import{Observable as _0x2019af,share as _0x66cac3}from'rxjs';import{WebSocket as _0x35b80e}from'ws';var C=_0x2a4366(0x140),w=_0x2a4366(0x157);const T={};function E(_0x2b9300,_0x2854fb){return function(_0x43226c,_0x413b23){_0x2854fb(_0x43226c,_0x413b23,_0x2b9300);};}function D(_0x365488,_0x4102da,_0x27b4ed,_0x5abe71){const _0x338b89=_0x2a4366;var _0x198116=arguments[_0x338b89(0x13e)],_0x1a2eff=_0x198116<0x3?_0x4102da:_0x5abe71===null?_0x5abe71=Object[_0x338b89(0x159)](_0x4102da,_0x27b4ed):_0x5abe71,_0x136151;if(typeof Reflect==_0x338b89(0x12e)&&typeof Reflect[_0x338b89(0x13f)]==_0x338b89(0x150))_0x1a2eff=Reflect[_0x338b89(0x13f)](_0x365488,_0x4102da,_0x27b4ed,_0x5abe71);else{for(var _0x309aa2=_0x365488[_0x338b89(0x13e)]-0x1;_0x309aa2>=0x0;_0x309aa2--)(_0x136151=_0x365488[_0x309aa2])&&(_0x1a2eff=(_0x198116<0x3?_0x136151(_0x1a2eff):_0x198116>0x3?_0x136151(_0x4102da,_0x27b4ed,_0x1a2eff):_0x136151(_0x4102da,_0x27b4ed))||_0x1a2eff);}return _0x198116>0x3&&_0x1a2eff&&Object[_0x338b89(0x153)](_0x4102da,_0x27b4ed,_0x1a2eff),_0x1a2eff;}let O=class extends _0x78400{constructor(_0x4a6045){const _0x516078=_0x2a4366;super(),this[_0x516078(0x14e)]=_0x4a6045;}[_0x2a4366(0x151)](_0xfc5184){const _0x5079ed=_0x2a4366;var _0x294a0a;let _0x2669a1=((_0x294a0a=this[_0x5079ed(0x14e)]['getConfig'](_0xbf4e2))==null?void 0x0:_0x294a0a['customHeaders'])||{};try{let _0x3ad00e=new _0x35b80e(_0xfc5184,{'headers':{..._0x2669a1}}),_0x362cb=new _0x5d9907();return{'URL':_0xfc5184,'close':(_0x53bd0f,_0x2409b2)=>{const _0x1a126b=_0x5079ed;_0x3ad00e[_0x1a126b(0x133)](_0x53bd0f,_0x2409b2),_0x362cb[_0x1a126b(0x130)]();},'send':_0x47977e=>{const _0x25adb1=_0x5079ed;_0x3ad00e[_0x25adb1(0x14d)](_0x47977e);},'open$':new _0x2019af(_0x16670f=>{const _0x389594=_0x5079ed;let _0x3f7578=_0x2aab32=>_0x16670f[_0x389594(0x15d)](_0x2aab32);_0x3ad00e['addEventListener'](_0x389594(0x141),_0x3f7578),_0x362cb[_0x389594(0x12d)](_0x5d0986(()=>_0x3ad00e[_0x389594(0x144)]('open',_0x3f7578)));})[_0x5079ed(0x158)](_0x66cac3()),'close$':new _0x2019af(_0x6612b2=>{const _0x1a53f8=_0x5079ed;let _0x2b9bbd=_0x939fdf=>_0x6612b2[_0x1a53f8(0x15d)](_0x939fdf);_0x3ad00e[_0x1a53f8(0x156)]('close',_0x2b9bbd),_0x362cb['add'](_0x5d0986(()=>_0x3ad00e[_0x1a53f8(0x144)](_0x1a53f8(0x133),_0x2b9bbd)));})['pipe'](_0x66cac3()),'error$':new _0x2019af(_0x2c01e9=>{const _0x29a75b=_0x5079ed;let _0x4c98b4=_0x16ce8f=>_0x2c01e9['next'](_0x16ce8f);_0x3ad00e['addEventListener']('error',_0x4c98b4),_0x362cb[_0x29a75b(0x12d)](_0x5d0986(()=>_0x3ad00e['removeEventListener'](_0x29a75b(0x137),_0x4c98b4)));})[_0x5079ed(0x158)](_0x66cac3()),'message$':new _0x2019af(_0x22c530=>{const _0x576e9c=_0x5079ed;let _0x51f70b=_0x18f0d5=>_0x22c530['next'](_0x18f0d5);_0x3ad00e[_0x576e9c(0x156)](_0x576e9c(0x161),_0x51f70b),_0x362cb[_0x576e9c(0x12d)](_0x5d0986(()=>_0x3ad00e[_0x576e9c(0x144)](_0x576e9c(0x161),_0x51f70b)));})[_0x5079ed(0x158)](_0x66cac3())};}catch(_0x27ee26){return console[_0x5079ed(0x137)](_0x27ee26),null;}}};O=D([E(0x0,_0x4df45e)],O);function _0x4fe8(_0x2f441e,_0x13610d){_0x2f441e=_0x2f441e-0x12d;const _0xd02c62=_0xd02c();let _0x4fe890=_0xd02c62[_0x2f441e];return _0x4fe890;}function k(_0x376486){'@babel/helpers - typeof';const _0x56a6aa=_0x2a4366;return k=typeof Symbol==_0x56a6aa(0x150)&&typeof Symbol[_0x56a6aa(0x132)]==_0x56a6aa(0x15e)?function(_0x5025f2){return typeof _0x5025f2;}:function(_0x4ebe13){const _0x4b8042=_0x56a6aa;return _0x4ebe13&&typeof Symbol==_0x4b8042(0x150)&&_0x4ebe13[_0x4b8042(0x142)]===Symbol&&_0x4ebe13!==Symbol[_0x4b8042(0x152)]?_0x4b8042(0x15e):typeof _0x4ebe13;},k(_0x376486);}function A(_0x5531d8,_0x224677){const _0x5183e4=_0x2a4366;if(k(_0x5531d8)!=_0x5183e4(0x12e)||!_0x5531d8)return _0x5531d8;var _0x4182b1=_0x5531d8[Symbol[_0x5183e4(0x14c)]];if(_0x4182b1!==void 0x0){var _0x459c85=_0x4182b1[_0x5183e4(0x138)](_0x5531d8,_0x224677||_0x5183e4(0x131));if(k(_0x459c85)!='object')return _0x459c85;throw TypeError(_0x5183e4(0x13a));}return(_0x224677===_0x5183e4(0x149)?String:Number)(_0x5531d8);}function j(_0x3ab50c){const _0x8a5dd3=_0x2a4366;var _0x825211=A(_0x3ab50c,_0x8a5dd3(0x149));return k(_0x825211)==_0x8a5dd3(0x15e)?_0x825211:_0x825211+'';}function M(_0x1edd42,_0x3869ac,_0x180d8d){const _0x50973a=_0x2a4366;return(_0x3869ac=j(_0x3869ac))in _0x1edd42?Object[_0x50973a(0x153)](_0x1edd42,_0x3869ac,{'value':_0x180d8d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1edd42[_0x3869ac]=_0x180d8d,_0x1edd42;}let N=class extends _0x409ff4{constructor(_0x511583=T,_0x21af77,_0x702ace){const _0x23d2c6=_0x2a4366;super(),this[_0x23d2c6(0x143)]=_0x511583,this[_0x23d2c6(0x14e)]=_0x21af77,this[_0x23d2c6(0x145)]=_0x702ace;let {..._0x25ca7a}=_0x31982b({},T,this[_0x23d2c6(0x143)]);this[_0x23d2c6(0x14e)][_0x23d2c6(0x13d)](_0x23d2c6(0x154),_0x25ca7a);}[_0x2a4366(0x155)](){const _0x77c0c8=_0x2a4366;this[_0x77c0c8(0x148)]();}[_0x2a4366(0x148)](){_0x5dfa3c(this['_injector'],[[_0x16afa6,{'useClass':O}]]);}};M(N,_0x2a4366(0x15c),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),M(N,_0x2a4366(0x139),C),M(N,_0x2a4366(0x14b),w),N=D([_0x2b7dc9(_0x4174ff,_0xd6a96c,_0x2fb57c,_0xfe9b8),E(0x1,_0x4df45e),E(0x2,_0x276453(_0x491da6))],N);let P=class extends _0x2c515f{constructor(_0x594c75,_0x10dc8a,_0x311acf,_0x38e86b,_0x3110c0){const _0x5dadbc=_0x2a4366;super(_0x594c75,_0x10dc8a,_0x311acf,_0x38e86b,_0x3110c0);let _0x1cb493=this[_0x5dadbc(0x14e)][_0x5dadbc(0x135)](_0xbf4e2);this[_0x5dadbc(0x14a)]['registerHTTPInterceptor']({'interceptor':(_0x449acd,_0x10fcb9)=>{const _0x45b8a2=_0x5dadbc;let _0x38217e=_0x449acd['headers'];if(_0x1cb493!=null&&_0x1cb493[_0x45b8a2(0x146)]){for(let _0x57240a in _0x1cb493[_0x45b8a2(0x146)])_0x38217e['set'](_0x57240a,_0x1cb493[_0x45b8a2(0x146)][_0x57240a]);}return _0x10fcb9(_0x449acd);}});}async[_0x2a4366(0x151)](_0x28b8c1){return this['_doCreateSocket'](_0x28b8c1);}};function _0xd02c(){const _0x5f56db=['55byYUpD','pluginName','next','symbol','208026wuiNsF','2323384zEXhVv','message','add','object','40lSZXey','dispose','default','iterator','close','34590fgWvMX','getConfig','1290888AFfdND','error','call','packageName','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','3775709KHPlLK','1687192UlsNgJ','setConfig','length','decorate','@univerjs-pro/collaboration-client-node','open','constructor','_config','removeEventListener','_injector','customHeaders','1KcbCBt','_registerDependencies','string','_httpService','version','toPrimitive','send','_configService','2957800ZFZeYV','function','createSocket','prototype','defineProperty','collaboration-client-node.config','onStarting','addEventListener','1.0.0','pipe','getOwnPropertyDescriptor','705HRDSGa'];_0xd02c=function(){return _0x5f56db;};return _0xd02c();}P=D([E(0x0,_0x276453(_0x491da6)),E(0x1,_0x276453(_0x2bae5b)),E(0x2,_0x4df45e),E(0x3,_0x382d11),E(0x4,_0x3180c2)],P);export{P as NodeCollaborationSocketService,N as UniverCollaborationClientNodePlugin};
@@ -0,0 +1,5 @@
1
+ export declare const COLLABORATION_CLIENT_NODE_CONFIG_KEY = "collaboration-client-node.config";
2
+ export declare const configSymbol: unique symbol;
3
+ export interface IUniverCollaborationClientNodeConfig {
4
+ }
5
+ export declare const defaultPluginConfig: IUniverCollaborationClientNodeConfig;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5e80(_0x221563,_0x3a7647){_0x221563=_0x221563-0x1ca;const _0x280aab=_0x280a();let _0x5e8042=_0x280aab[_0x221563];return _0x5e8042;}function _0x280a(){const _0x282294=['Injector','removeEventListener','customHeaders','Plugin','set','1582mbGgHT','getConfig','@univerjs-pro/collaboration-client','UniverProCollaborationClient','Inject','add','string','setConfig','Disposable','UniverCore','@univerjs-pro/collaboration-client-node','_registerDependencies','DisposableCollection','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','prototype','collaboration-client-node.config','_doCreateSocket','WebSocket','call','merge','pluginName','version','4308ffzlIs','1220urKHHL','share','UniverNetwork','_configService','iterator','IConfigService','constructor','onStarting','@univerjs/core','NodeCollaborationSocketService','registerDependencies','3163932Jakfeh','rxjs','toDisposable','function','1450YlBjgK','ISocketService','HTTPService','createSocket','18CfJTZT','4494120JJTZOE','decorate','@univerjs-pro/license','_config','1153mOTeBz','ISnapshotServerService','_injector','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','open','4025vqfiYR','ILogService','send','object','517GIySTQ','UniverCollaborationPlugin','dispose','registerHTTPInterceptor','defineProperty','Module','exports','message','error','22734VnSnqk','_httpService','addEventListener','next','toStringTag','close','Observable','UniverLicensePlugin','2056663uHwPZL','CollaborationSocketService','pipe','symbol','getOwnPropertyDescriptor','DependentOn','UniverProCollaboration'];_0x280a=function(){return _0x282294;};return _0x280a();}(function(_0x5180ea,_0x49ae76){const _0x1324e6=_0x5e80,_0x338729=_0x5180ea();while(!![]){try{const _0x2174aa=-parseInt(_0x1324e6(0x20d))/0x1*(parseInt(_0x1324e6(0x1dd))/0x2)+parseInt(_0x1324e6(0x200))/0x3+-parseInt(_0x1324e6(0x1f5))/0x4*(parseInt(_0x1324e6(0x212))/0x5)+-parseInt(_0x1324e6(0x208))/0x6*(-parseInt(_0x1324e6(0x1d1))/0x7)+-parseInt(_0x1324e6(0x209))/0x8+parseInt(_0x1324e6(0x21f))/0x9*(parseInt(_0x1324e6(0x204))/0xa)+parseInt(_0x1324e6(0x216))/0xb*(-parseInt(_0x1324e6(0x1f4))/0xc);if(_0x2174aa===_0x49ae76)break;else _0x338729['push'](_0x338729['shift']());}catch(_0x3ace7e){_0x338729['push'](_0x338729['shift']());}}}(_0x280a,0x8a38b),function(_0x56aad6,_0x2e1377){const _0x1da652=_0x5e80;typeof exports==_0x1da652(0x215)&&typeof module<'u'?_0x2e1377(exports,require('@univerjs-pro/collaboration'),require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/network'),require('rxjs')):typeof define==_0x1da652(0x203)&&define['amd']?define([_0x1da652(0x21c),'@univerjs-pro/collaboration',_0x1da652(0x1df),_0x1da652(0x20b),_0x1da652(0x1fd),'@univerjs/network','rxjs'],_0x2e1377):(_0x56aad6=typeof globalThis<'u'?globalThis:_0x56aad6||self,_0x2e1377(_0x56aad6['UniverProCollaborationClientNode']={},_0x56aad6[_0x1da652(0x1d7)],_0x56aad6[_0x1da652(0x1e0)],_0x56aad6['UniverProLicense'],_0x56aad6[_0x1da652(0x1e6)],_0x56aad6[_0x1da652(0x1f7)],_0x56aad6[_0x1da652(0x201)]));}(this,function(_0x3ead59,_0x11fc18,_0x4cc070,_0x23eaf2,_0x39e6ee,_0x1dd146,_0xf8ea22){const _0x4d0bf9=_0x5e80;Object[_0x4d0bf9(0x21a)](_0x3ead59,Symbol[_0x4d0bf9(0x1cd)],{'value':_0x4d0bf9(0x21b)});var _0x1d2e15=(_0x28e11b,_0x5a157b)=>()=>(_0x5a157b||(_0x28e11b((_0x5a157b={'exports':{}})['exports'],_0x5a157b),_0x28e11b=null),_0x5a157b[_0x4d0bf9(0x21c)]),_0x3d6290=_0x4d0bf9(0x1e7),_0x18dc8b='1.0.0-rc.0';let _0x1dbf9e={};var _0x537e80=_0x1d2e15((_0x146392,_0x481f15)=>{const _0x4d8af9=_0x4d0bf9;_0x481f15[_0x4d8af9(0x21c)]=function(){throw Error('ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object');};})();function _0x5143e4(_0x700628,_0xe9149f){return function(_0x4d6f8b,_0x439c16){_0xe9149f(_0x4d6f8b,_0x439c16,_0x700628);};}function _0x1bc2a9(_0x2ce9bf,_0x5c58aa,_0x6d5db7,_0x574a98){const _0x337456=_0x4d0bf9;var _0x6105a2=arguments['length'],_0x5bbdeb=_0x6105a2<0x3?_0x5c58aa:_0x574a98===null?_0x574a98=Object[_0x337456(0x1d5)](_0x5c58aa,_0x6d5db7):_0x574a98,_0xc3ce24;if(typeof Reflect==_0x337456(0x215)&&typeof Reflect['decorate']==_0x337456(0x203))_0x5bbdeb=Reflect[_0x337456(0x20a)](_0x2ce9bf,_0x5c58aa,_0x6d5db7,_0x574a98);else{for(var _0x1cb953=_0x2ce9bf[_0x337456(0x1ea)]-0x1;_0x1cb953>=0x0;_0x1cb953--)(_0xc3ce24=_0x2ce9bf[_0x1cb953])&&(_0x5bbdeb=(_0x6105a2<0x3?_0xc3ce24(_0x5bbdeb):_0x6105a2>0x3?_0xc3ce24(_0x5c58aa,_0x6d5db7,_0x5bbdeb):_0xc3ce24(_0x5c58aa,_0x6d5db7))||_0x5bbdeb);}return _0x6105a2>0x3&&_0x5bbdeb&&Object['defineProperty'](_0x5c58aa,_0x6d5db7,_0x5bbdeb),_0x5bbdeb;}let _0x5beed1=class extends _0x39e6ee[_0x4d0bf9(0x1e5)]{constructor(_0x27246a){const _0x10e95a=_0x4d0bf9;super(),this[_0x10e95a(0x1f8)]=_0x27246a;}[_0x4d0bf9(0x207)](_0x49a749){const _0x39b58a=_0x4d0bf9;var _0x3fe7df;let _0x6b5f98=((_0x3fe7df=this['_configService'][_0x39b58a(0x1de)](_0x4cc070['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']))==null?void 0x0:_0x3fe7df[_0x39b58a(0x1da)])||{};try{let _0x468bb6=new _0x537e80[(_0x39b58a(0x1ef))](_0x49a749,{'headers':{..._0x6b5f98}}),_0x3ab9e7=new _0x39e6ee[(_0x39b58a(0x1e9))]();return{'URL':_0x49a749,'close':(_0x4fe338,_0x2aec5d)=>{const _0x470bb7=_0x39b58a;_0x468bb6[_0x470bb7(0x1ce)](_0x4fe338,_0x2aec5d),_0x3ab9e7[_0x470bb7(0x218)]();},'send':_0x49b2dd=>{const _0x51f02c=_0x39b58a;_0x468bb6[_0x51f02c(0x214)](_0x49b2dd);},'open$':new _0xf8ea22[(_0x39b58a(0x1cf))](_0x2e5995=>{const _0x45b36d=_0x39b58a;let _0x328d31=_0x47470c=>_0x2e5995['next'](_0x47470c);_0x468bb6[_0x45b36d(0x1cb)](_0x45b36d(0x211),_0x328d31),_0x3ab9e7[_0x45b36d(0x1e2)]((0x0,_0x39e6ee[_0x45b36d(0x202)])(()=>_0x468bb6[_0x45b36d(0x1d9)](_0x45b36d(0x211),_0x328d31)));})['pipe']((0x0,_0xf8ea22[_0x39b58a(0x1f6)])()),'close$':new _0xf8ea22[(_0x39b58a(0x1cf))](_0xdfbd01=>{const _0x3aa647=_0x39b58a;let _0x53f3e6=_0x36e5f9=>_0xdfbd01[_0x3aa647(0x1cc)](_0x36e5f9);_0x468bb6['addEventListener'](_0x3aa647(0x1ce),_0x53f3e6),_0x3ab9e7[_0x3aa647(0x1e2)]((0x0,_0x39e6ee[_0x3aa647(0x202)])(()=>_0x468bb6[_0x3aa647(0x1d9)](_0x3aa647(0x1ce),_0x53f3e6)));})[_0x39b58a(0x1d3)]((0x0,_0xf8ea22[_0x39b58a(0x1f6)])()),'error$':new _0xf8ea22[(_0x39b58a(0x1cf))](_0x5088cb=>{const _0x26e8bb=_0x39b58a;let _0x59e1be=_0x5ed537=>_0x5088cb[_0x26e8bb(0x1cc)](_0x5ed537);_0x468bb6[_0x26e8bb(0x1cb)](_0x26e8bb(0x21e),_0x59e1be),_0x3ab9e7['add']((0x0,_0x39e6ee[_0x26e8bb(0x202)])(()=>_0x468bb6[_0x26e8bb(0x1d9)](_0x26e8bb(0x21e),_0x59e1be)));})[_0x39b58a(0x1d3)]((0x0,_0xf8ea22['share'])()),'message$':new _0xf8ea22[(_0x39b58a(0x1cf))](_0x291ad2=>{const _0x5165b5=_0x39b58a;let _0x4f8e18=_0x35be35=>_0x291ad2[_0x5165b5(0x1cc)](_0x35be35);_0x468bb6[_0x5165b5(0x1cb)]('message',_0x4f8e18),_0x3ab9e7[_0x5165b5(0x1e2)]((0x0,_0x39e6ee[_0x5165b5(0x202)])(()=>_0x468bb6[_0x5165b5(0x1d9)](_0x5165b5(0x21d),_0x4f8e18)));})[_0x39b58a(0x1d3)]((0x0,_0xf8ea22[_0x39b58a(0x1f6)])())};}catch(_0x23db9c){return console['error'](_0x23db9c),null;}}};_0x5beed1=_0x1bc2a9([_0x5143e4(0x0,_0x39e6ee[_0x4d0bf9(0x1fa)])],_0x5beed1);function _0x4e94c7(_0x212bc6){'@babel/helpers - typeof';const _0x443def=_0x4d0bf9;return _0x4e94c7=typeof Symbol==_0x443def(0x203)&&typeof Symbol[_0x443def(0x1f9)]==_0x443def(0x1d4)?function(_0x480495){return typeof _0x480495;}:function(_0x3ebeda){const _0x272068=_0x443def;return _0x3ebeda&&typeof Symbol=='function'&&_0x3ebeda[_0x272068(0x1fb)]===Symbol&&_0x3ebeda!==Symbol[_0x272068(0x1ec)]?_0x272068(0x1d4):typeof _0x3ebeda;},_0x4e94c7(_0x212bc6);}function _0x57ba02(_0x28ba09,_0x271603){const _0x22e596=_0x4d0bf9;if(_0x4e94c7(_0x28ba09)!=_0x22e596(0x215)||!_0x28ba09)return _0x28ba09;var _0x56f8af=_0x28ba09[Symbol['toPrimitive']];if(_0x56f8af!==void 0x0){var _0x36f38f=_0x56f8af[_0x22e596(0x1f0)](_0x28ba09,_0x271603||'default');if(_0x4e94c7(_0x36f38f)!=_0x22e596(0x215))return _0x36f38f;throw TypeError(_0x22e596(0x1eb));}return(_0x271603===_0x22e596(0x1e3)?String:Number)(_0x28ba09);}function _0x5e6b5e(_0x1f32ba){const _0x288b88=_0x4d0bf9;var _0x56a213=_0x57ba02(_0x1f32ba,'string');return _0x4e94c7(_0x56a213)==_0x288b88(0x1d4)?_0x56a213:_0x56a213+'';}function _0xc8f5(_0x8dae0e,_0x326c14,_0x1282c8){const _0xedfbe5=_0x4d0bf9;return(_0x326c14=_0x5e6b5e(_0x326c14))in _0x8dae0e?Object[_0xedfbe5(0x21a)](_0x8dae0e,_0x326c14,{'value':_0x1282c8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x8dae0e[_0x326c14]=_0x1282c8,_0x8dae0e;}let _0x444e65=class extends _0x39e6ee[_0x4d0bf9(0x1db)]{constructor(_0x58e6e7=_0x1dbf9e,_0x226636,_0x2c84b){const _0x1d8bb1=_0x4d0bf9;super(),this[_0x1d8bb1(0x20c)]=_0x58e6e7,this[_0x1d8bb1(0x1f8)]=_0x226636,this['_injector']=_0x2c84b;let {..._0x58ab55}=(0x0,_0x39e6ee[_0x1d8bb1(0x1f1)])({},_0x1dbf9e,this[_0x1d8bb1(0x20c)]);this[_0x1d8bb1(0x1f8)][_0x1d8bb1(0x1e4)](_0x1d8bb1(0x1ed),_0x58ab55);}[_0x4d0bf9(0x1fc)](){this['_registerDependencies']();}[_0x4d0bf9(0x1e8)](){const _0x555c4f=_0x4d0bf9;(0x0,_0x39e6ee[_0x555c4f(0x1ff)])(this[_0x555c4f(0x20f)],[[_0x1dd146[_0x555c4f(0x205)],{'useClass':_0x5beed1}]]);}};_0xc8f5(_0x444e65,_0x4d0bf9(0x1f2),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_0xc8f5(_0x444e65,'packageName',_0x3d6290),_0xc8f5(_0x444e65,_0x4d0bf9(0x1f3),_0x18dc8b),_0x444e65=_0x1bc2a9([(0x0,_0x39e6ee[_0x4d0bf9(0x1d6)])(_0x23eaf2[_0x4d0bf9(0x1d0)],_0x1dd146['UniverNetworkPlugin'],_0x11fc18[_0x4d0bf9(0x217)],_0x4cc070['UniverCollaborationClientPlugin']),_0x5143e4(0x1,_0x39e6ee[_0x4d0bf9(0x1fa)]),_0x5143e4(0x2,(0x0,_0x39e6ee[_0x4d0bf9(0x1e1)])(_0x39e6ee[_0x4d0bf9(0x1d8)]))],_0x444e65);let _0x36bad3=class extends _0x4cc070[_0x4d0bf9(0x1d2)]{constructor(_0x407813,_0x25e89b,_0x1aef89,_0x32af58,_0x5b4283){const _0x1ec08a=_0x4d0bf9;super(_0x407813,_0x25e89b,_0x1aef89,_0x32af58,_0x5b4283);let _0x303aa4=this['_configService'][_0x1ec08a(0x1de)](_0x4cc070[_0x1ec08a(0x210)]);this[_0x1ec08a(0x1ca)][_0x1ec08a(0x219)]({'interceptor':(_0x3ed040,_0x322e31)=>{const _0xe63662=_0x1ec08a;let _0x170ecf=_0x3ed040['headers'];if(_0x303aa4!=null&&_0x303aa4[_0xe63662(0x1da)]){for(let _0x34e74a in _0x303aa4[_0xe63662(0x1da)])_0x170ecf[_0xe63662(0x1dc)](_0x34e74a,_0x303aa4[_0xe63662(0x1da)][_0x34e74a]);}return _0x322e31(_0x3ed040);}});}async[_0x4d0bf9(0x207)](_0x37e509){const _0x2cb8d9=_0x4d0bf9;return this[_0x2cb8d9(0x1ee)](_0x37e509);}};_0x36bad3=_0x1bc2a9([_0x5143e4(0x0,(0x0,_0x39e6ee[_0x4d0bf9(0x1e1)])(_0x39e6ee['Injector'])),_0x5143e4(0x1,(0x0,_0x39e6ee[_0x4d0bf9(0x1e1)])(_0x1dd146[_0x4d0bf9(0x206)])),_0x5143e4(0x2,_0x39e6ee['IConfigService']),_0x5143e4(0x3,_0x39e6ee[_0x4d0bf9(0x213)]),_0x5143e4(0x4,_0x11fc18[_0x4d0bf9(0x20e)])],_0x36bad3),Object[_0x4d0bf9(0x21a)](_0x3ead59,_0x4d0bf9(0x1fe),{'enumerable':!0x0,'get':function(){return _0x36bad3;}}),Object[_0x4d0bf9(0x21a)](_0x3ead59,'UniverCollaborationClientNodePlugin',{'enumerable':!0x0,'get':function(){return _0x444e65;}});}));
1
+ function _0x4516(){const _0x1e5965=['prototype','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Disposable','registerDependencies','error','constructor','open','createSocket','customHeaders','Observable','@univerjs-pro/collaboration-client','toStringTag','_config','4VubTbF','rxjs','2332CKIoat','default','24669359UDMKlu','headers','UniverNetwork','add','version','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','function','388075gLHynG','getConfig','_injector','removeEventListener','ISnapshotServerService','HTTPService','ISocketService','CollaborationSocketService','registerHTTPInterceptor','ILogService','iterator','Plugin','UniverProCollaborationClientNode','length','toDisposable','addEventListener','7968264GonhQs','_registerDependencies','NodeCollaborationSocketService','share','close','message','UniverCore','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','object','UniverCollaborationClientNodePlugin','735BSPqim','IConfigService','symbol','UniverProCollaboration','955161TBCQXs','Inject','merge','_doCreateSocket','DisposableCollection','UniverProCollaborationClient','onStarting','defineProperty','UniverProLicense','@univerjs/core','_configService','@univerjs-pro/collaboration-client-node','dispose','UniverCollaborationPlugin','6279375ZwSJmO','getOwnPropertyDescriptor','pluginName','exports','Module','string','100Hfabnm','Injector','toPrimitive','next','setConfig','call','set','6672OlQrmq','pipe','16818XQXNrE'];_0x4516=function(){return _0x1e5965;};return _0x4516();}function _0x5391(_0x29be90,_0x15b2a3){_0x29be90=_0x29be90-0x1bb;const _0x4516e5=_0x4516();let _0x5391dd=_0x4516e5[_0x29be90];return _0x5391dd;}(function(_0x41087c,_0x56338b){const _0x376aac=_0x5391,_0xd39d4d=_0x41087c();while(!![]){try{const _0xdd7667=-parseInt(_0x376aac(0x20e))/0x1*(parseInt(_0x376aac(0x203))/0x2)+parseInt(_0x376aac(0x1f3))/0x3*(-parseInt(_0x376aac(0x205))/0x4)+-parseInt(_0x376aac(0x1e6))/0x5+-parseInt(_0x376aac(0x1f5))/0x6*(parseInt(_0x376aac(0x1d4))/0x7)+parseInt(_0x376aac(0x1ca))/0x8+parseInt(_0x376aac(0x1d8))/0x9*(parseInt(_0x376aac(0x1ec))/0xa)+parseInt(_0x376aac(0x207))/0xb;if(_0xdd7667===_0x56338b)break;else _0xd39d4d['push'](_0xd39d4d['shift']());}catch(_0x5ecd42){_0xd39d4d['push'](_0xd39d4d['shift']());}}}(_0x4516,0xa54c4),function(_0x44f7f2,_0x3e1156){const _0x14694a=_0x5391;typeof exports==_0x14694a(0x1d2)&&typeof module<'u'?_0x3e1156(exports,require('@univerjs-pro/collaboration'),require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/network'),require('rxjs')):typeof define==_0x14694a(0x20d)&&define['amd']?define(['exports','@univerjs-pro/collaboration',_0x14694a(0x200),'@univerjs-pro/license',_0x14694a(0x1e1),'@univerjs/network',_0x14694a(0x204)],_0x3e1156):(_0x44f7f2=typeof globalThis<'u'?globalThis:_0x44f7f2||self,_0x3e1156(_0x44f7f2[_0x14694a(0x1c6)]={},_0x44f7f2[_0x14694a(0x1d7)],_0x44f7f2[_0x14694a(0x1dd)],_0x44f7f2[_0x14694a(0x1e0)],_0x44f7f2[_0x14694a(0x1d0)],_0x44f7f2[_0x14694a(0x209)],_0x44f7f2[_0x14694a(0x204)]));}(this,function(_0x526775,_0x4087ac,_0x23e206,_0x580e8d,_0x37fd06,_0x27900d,_0x1684cc){const _0x49832e=_0x5391;Object[_0x49832e(0x1df)](_0x526775,Symbol[_0x49832e(0x201)],{'value':_0x49832e(0x1ea)});var _0x1fea84=(_0x2bdf96,_0x55218f)=>()=>(_0x55218f||(_0x2bdf96((_0x55218f={'exports':{}})[_0x49832e(0x1e9)],_0x55218f),_0x2bdf96=null),_0x55218f[_0x49832e(0x1e9)]),_0x23779b=_0x49832e(0x1e3),_0x228cae='1.0.0';let _0x21cbb7={};var _0x126216=_0x1fea84((_0xa5af69,_0x551fc3)=>{const _0x270abe=_0x49832e;_0x551fc3[_0x270abe(0x1e9)]=function(){const _0x3ee746=_0x270abe;throw Error(_0x3ee746(0x1d1));};})();function _0x70b58d(_0x3a15f6,_0x5642ce){return function(_0x55025a,_0x27ec68){_0x5642ce(_0x55025a,_0x27ec68,_0x3a15f6);};}function _0x18e18c(_0x4e4f49,_0x1c751d,_0x1d8025,_0x406de8){const _0x356880=_0x49832e;var _0x53b693=arguments[_0x356880(0x1c7)],_0x429759=_0x53b693<0x3?_0x1c751d:_0x406de8===null?_0x406de8=Object[_0x356880(0x1e7)](_0x1c751d,_0x1d8025):_0x406de8,_0x58f797;if(typeof Reflect==_0x356880(0x1d2)&&typeof Reflect['decorate']==_0x356880(0x20d))_0x429759=Reflect['decorate'](_0x4e4f49,_0x1c751d,_0x1d8025,_0x406de8);else{for(var _0x5408da=_0x4e4f49['length']-0x1;_0x5408da>=0x0;_0x5408da--)(_0x58f797=_0x4e4f49[_0x5408da])&&(_0x429759=(_0x53b693<0x3?_0x58f797(_0x429759):_0x53b693>0x3?_0x58f797(_0x1c751d,_0x1d8025,_0x429759):_0x58f797(_0x1c751d,_0x1d8025))||_0x429759);}return _0x53b693>0x3&&_0x429759&&Object[_0x356880(0x1df)](_0x1c751d,_0x1d8025,_0x429759),_0x429759;}let _0x5ceebf=class extends _0x37fd06[_0x49832e(0x1f8)]{constructor(_0x50f208){const _0xe7da6c=_0x49832e;super(),this[_0xe7da6c(0x1e2)]=_0x50f208;}['createSocket'](_0x1ff068){const _0x40be8a=_0x49832e;var _0x3d310d;let _0x34418e=((_0x3d310d=this[_0x40be8a(0x1e2)][_0x40be8a(0x1bb)](_0x23e206[_0x40be8a(0x20c)]))==null?void 0x0:_0x3d310d[_0x40be8a(0x1fe)])||{};try{let _0x4d8107=new _0x126216['WebSocket'](_0x1ff068,{'headers':{..._0x34418e}}),_0x4b88bf=new _0x37fd06[(_0x40be8a(0x1dc))]();return{'URL':_0x1ff068,'close':(_0x4e616a,_0x229cc3)=>{const _0x5391fc=_0x40be8a;_0x4d8107['close'](_0x4e616a,_0x229cc3),_0x4b88bf[_0x5391fc(0x1e4)]();},'send':_0x1d9da2=>{_0x4d8107['send'](_0x1d9da2);},'open$':new _0x1684cc['Observable'](_0x28fcf9=>{const _0x45f9f5=_0x40be8a;let _0x16fce6=_0x312cc0=>_0x28fcf9['next'](_0x312cc0);_0x4d8107[_0x45f9f5(0x1c9)](_0x45f9f5(0x1fc),_0x16fce6),_0x4b88bf[_0x45f9f5(0x20a)]((0x0,_0x37fd06[_0x45f9f5(0x1c8)])(()=>_0x4d8107[_0x45f9f5(0x1bd)]('open',_0x16fce6)));})['pipe']((0x0,_0x1684cc[_0x40be8a(0x1cd)])()),'close$':new _0x1684cc[(_0x40be8a(0x1ff))](_0x53b1f5=>{const _0x19b575=_0x40be8a;let _0x3ebf88=_0x2ceeca=>_0x53b1f5[_0x19b575(0x1ef)](_0x2ceeca);_0x4d8107[_0x19b575(0x1c9)](_0x19b575(0x1ce),_0x3ebf88),_0x4b88bf['add']((0x0,_0x37fd06['toDisposable'])(()=>_0x4d8107[_0x19b575(0x1bd)](_0x19b575(0x1ce),_0x3ebf88)));})[_0x40be8a(0x1f4)]((0x0,_0x1684cc[_0x40be8a(0x1cd)])()),'error$':new _0x1684cc[(_0x40be8a(0x1ff))](_0x5dfe1e=>{const _0xfd02a3=_0x40be8a;let _0x18bf79=_0x7c511=>_0x5dfe1e[_0xfd02a3(0x1ef)](_0x7c511);_0x4d8107[_0xfd02a3(0x1c9)](_0xfd02a3(0x1fa),_0x18bf79),_0x4b88bf['add']((0x0,_0x37fd06[_0xfd02a3(0x1c8)])(()=>_0x4d8107['removeEventListener'](_0xfd02a3(0x1fa),_0x18bf79)));})['pipe']((0x0,_0x1684cc[_0x40be8a(0x1cd)])()),'message$':new _0x1684cc[(_0x40be8a(0x1ff))](_0x42e8f1=>{const _0x388e22=_0x40be8a;let _0x3cda25=_0x4c1ff4=>_0x42e8f1[_0x388e22(0x1ef)](_0x4c1ff4);_0x4d8107[_0x388e22(0x1c9)](_0x388e22(0x1cf),_0x3cda25),_0x4b88bf[_0x388e22(0x20a)]((0x0,_0x37fd06[_0x388e22(0x1c8)])(()=>_0x4d8107['removeEventListener'](_0x388e22(0x1cf),_0x3cda25)));})[_0x40be8a(0x1f4)]((0x0,_0x1684cc[_0x40be8a(0x1cd)])())};}catch(_0x6dd46d){return console['error'](_0x6dd46d),null;}}};_0x5ceebf=_0x18e18c([_0x70b58d(0x0,_0x37fd06['IConfigService'])],_0x5ceebf);function _0x5e6621(_0x25d77b){'@babel/helpers - typeof';const _0x461a2f=_0x49832e;return _0x5e6621=typeof Symbol==_0x461a2f(0x20d)&&typeof Symbol[_0x461a2f(0x1c4)]==_0x461a2f(0x1d6)?function(_0x1e55d9){return typeof _0x1e55d9;}:function(_0x462cd5){const _0x3c70d9=_0x461a2f;return _0x462cd5&&typeof Symbol==_0x3c70d9(0x20d)&&_0x462cd5[_0x3c70d9(0x1fb)]===Symbol&&_0x462cd5!==Symbol[_0x3c70d9(0x1f6)]?_0x3c70d9(0x1d6):typeof _0x462cd5;},_0x5e6621(_0x25d77b);}function _0x36dd42(_0xf540c0,_0x33303d){const _0x2d0882=_0x49832e;if(_0x5e6621(_0xf540c0)!=_0x2d0882(0x1d2)||!_0xf540c0)return _0xf540c0;var _0x26786e=_0xf540c0[Symbol[_0x2d0882(0x1ee)]];if(_0x26786e!==void 0x0){var _0x5dc63a=_0x26786e[_0x2d0882(0x1f1)](_0xf540c0,_0x33303d||_0x2d0882(0x206));if(_0x5e6621(_0x5dc63a)!=_0x2d0882(0x1d2))return _0x5dc63a;throw TypeError(_0x2d0882(0x1f7));}return(_0x33303d==='string'?String:Number)(_0xf540c0);}function _0x454c85(_0x380b61){const _0x141a97=_0x49832e;var _0x2b3ff9=_0x36dd42(_0x380b61,_0x141a97(0x1eb));return _0x5e6621(_0x2b3ff9)==_0x141a97(0x1d6)?_0x2b3ff9:_0x2b3ff9+'';}function _0x28514e(_0xe6694f,_0x773564,_0x1ffeba){const _0x4cf469=_0x49832e;return(_0x773564=_0x454c85(_0x773564))in _0xe6694f?Object[_0x4cf469(0x1df)](_0xe6694f,_0x773564,{'value':_0x1ffeba,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xe6694f[_0x773564]=_0x1ffeba,_0xe6694f;}let _0x83ed47=class extends _0x37fd06[_0x49832e(0x1c5)]{constructor(_0x190be5=_0x21cbb7,_0x12ac16,_0x410150){const _0x270b36=_0x49832e;super(),this['_config']=_0x190be5,this[_0x270b36(0x1e2)]=_0x12ac16,this[_0x270b36(0x1bc)]=_0x410150;let {..._0x51f5b0}=(0x0,_0x37fd06[_0x270b36(0x1da)])({},_0x21cbb7,this[_0x270b36(0x202)]);this[_0x270b36(0x1e2)][_0x270b36(0x1f0)]('collaboration-client-node.config',_0x51f5b0);}[_0x49832e(0x1de)](){const _0x30999b=_0x49832e;this[_0x30999b(0x1cb)]();}['_registerDependencies'](){const _0x3fa39c=_0x49832e;(0x0,_0x37fd06[_0x3fa39c(0x1f9)])(this[_0x3fa39c(0x1bc)],[[_0x27900d[_0x3fa39c(0x1c0)],{'useClass':_0x5ceebf}]]);}};_0x28514e(_0x83ed47,_0x49832e(0x1e8),'UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_0x28514e(_0x83ed47,'packageName',_0x23779b),_0x28514e(_0x83ed47,_0x49832e(0x20b),_0x228cae),_0x83ed47=_0x18e18c([(0x0,_0x37fd06['DependentOn'])(_0x580e8d['UniverLicensePlugin'],_0x27900d['UniverNetworkPlugin'],_0x4087ac[_0x49832e(0x1e5)],_0x23e206['UniverCollaborationClientPlugin']),_0x70b58d(0x1,_0x37fd06[_0x49832e(0x1d5)]),_0x70b58d(0x2,(0x0,_0x37fd06['Inject'])(_0x37fd06[_0x49832e(0x1ed)]))],_0x83ed47);let _0x54c09d=class extends _0x23e206[_0x49832e(0x1c1)]{constructor(_0x5ed2c1,_0x496481,_0x384a7e,_0x2d2992,_0x182285){const _0x3df4db=_0x49832e;super(_0x5ed2c1,_0x496481,_0x384a7e,_0x2d2992,_0x182285);let _0x39e48b=this[_0x3df4db(0x1e2)][_0x3df4db(0x1bb)](_0x23e206['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']);this['_httpService'][_0x3df4db(0x1c2)]({'interceptor':(_0x5abc19,_0x23bf77)=>{const _0x1453d8=_0x3df4db;let _0x2a66a3=_0x5abc19[_0x1453d8(0x208)];if(_0x39e48b!=null&&_0x39e48b[_0x1453d8(0x1fe)]){for(let _0x38b70b in _0x39e48b[_0x1453d8(0x1fe)])_0x2a66a3[_0x1453d8(0x1f2)](_0x38b70b,_0x39e48b['customHeaders'][_0x38b70b]);}return _0x23bf77(_0x5abc19);}});}async[_0x49832e(0x1fd)](_0x4a9849){const _0x4c4c25=_0x49832e;return this[_0x4c4c25(0x1db)](_0x4a9849);}};_0x54c09d=_0x18e18c([_0x70b58d(0x0,(0x0,_0x37fd06[_0x49832e(0x1d9)])(_0x37fd06[_0x49832e(0x1ed)])),_0x70b58d(0x1,(0x0,_0x37fd06[_0x49832e(0x1d9)])(_0x27900d[_0x49832e(0x1bf)])),_0x70b58d(0x2,_0x37fd06[_0x49832e(0x1d5)]),_0x70b58d(0x3,_0x37fd06[_0x49832e(0x1c3)]),_0x70b58d(0x4,_0x4087ac[_0x49832e(0x1be)])],_0x54c09d),Object[_0x49832e(0x1df)](_0x526775,_0x49832e(0x1cc),{'enumerable':!0x0,'get':function(){return _0x54c09d;}}),Object[_0x49832e(0x1df)](_0x526775,_0x49832e(0x1d3),{'enumerable':!0x0,'get':function(){return _0x83ed47;}});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/collaboration-client-node",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0",
4
4
  "private": false,
5
5
  "description": "Node.js collaboration client plugin for Univer Pro.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -51,19 +51,19 @@
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@univerjs-pro/collaboration": "1.0.0-rc.0",
55
- "@univerjs-pro/collaboration-client": "1.0.0-rc.0",
56
- "@univerjs-pro/license": "1.0.0-rc.0",
57
- "@univerjs/core": "1.0.0-rc.0",
58
- "@univerjs/network": "1.0.0-rc.0",
54
+ "@univerjs-pro/collaboration": "1.0.0",
55
+ "@univerjs-pro/collaboration-client": "1.0.0",
56
+ "@univerjs-pro/license": "1.0.0",
57
+ "@univerjs/core": "1.0.0",
58
+ "@univerjs/network": "1.0.0",
59
59
  "ws": "8.21.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/ws": "8.18.1",
63
- "@univerjs-infra/shared": "1.0.0-rc.0",
63
+ "@univerjs-infra/shared": "1.0.0",
64
64
  "rxjs": "7.8.2",
65
65
  "typescript": "^6.0.3",
66
- "vitest": "^4.1.11"
66
+ "vitest": "^5.0.0"
67
67
  },
68
68
  "scripts": {
69
69
  "test": "vitest run",