@univerjs-pro/live-share 1.0.0-alpha.7 → 1.0.0-alpha.8
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/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +12 -11
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x11c1e9=_0x4fa1;(function(_0xbc8a4c,_0x26255e){const _0x382c50=_0x4fa1,_0x5a6963=_0xbc8a4c();while(!![]){try{const _0x5189d2=parseInt(_0x382c50(0x191))/0x1+parseInt(_0x382c50(0x18f))/0x2+parseInt(_0x382c50(0x18e))/0x3*(parseInt(_0x382c50(0x178))/0x4)+-parseInt(_0x382c50(0x183))/0x5+-parseInt(_0x382c50(0x18c))/0x6+parseInt(_0x382c50(0x179))/0x7+-parseInt(_0x382c50(0x174))/0x8;if(_0x5189d2===_0x26255e)break;else _0x5a6963['push'](_0x5a6963['shift']());}catch(_0x4d48b0){_0x5a6963['push'](_0x5a6963['shift']());}}}(_0x517f,0x2cfd2));let e=require('@univerjs-pro/live-share'),t=require('@univerjs/core'),n=require('@univerjs/core/facade');function r(_0x4bff8d){'@babel/helpers - typeof';const _0x2572fb=_0x4fa1;return r=typeof Symbol==_0x2572fb(0x185)&&typeof Symbol[_0x2572fb(0x176)]==_0x2572fb(0x17f)?function(_0x5f3954){return typeof _0x5f3954;}:function(_0x2db9e7){const _0x243948=_0x2572fb;return _0x2db9e7&&typeof Symbol==_0x243948(0x185)&&_0x2db9e7[_0x243948(0x172)]===Symbol&&_0x2db9e7!==Symbol[_0x243948(0x184)]?_0x243948(0x17f):typeof _0x2db9e7;},r(_0x4bff8d);}function i(_0x34de7e,_0x15649f){const _0x11b7e0=_0x4fa1;if(r(_0x34de7e)!=_0x11b7e0(0x189)||!_0x34de7e)return _0x34de7e;var _0x500d0e=_0x34de7e[Symbol['toPrimitive']];if(_0x500d0e!==void 0x0){var _0x5ae60a=_0x500d0e[_0x11b7e0(0x194)](_0x34de7e,_0x15649f||_0x11b7e0(0x195));if(r(_0x5ae60a)!=_0x11b7e0(0x189))return _0x5ae60a;throw TypeError(_0x11b7e0(0x18d));}return(_0x15649f===_0x11b7e0(0x18a)?String:Number)(_0x34de7e);}function _0x517f(){const _0x5c9655=['No\x20active\x20workbook\x20found.','UNIVER_SHEET','IUniverInstanceService','object','string','FEnum','1338522OhOoST','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','97476fdHfSp','24030WFjnko','tryStartPresenting','239834hYHFNQ','UniverInstanceType','defineProperty','call','default','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','stopPresenting','getLiveShareCoordinatorSync','FUniver','LiveShareController','getUnitId','startPresenting','constructor','_injector','1771224qQzmXR','LiveShareStatusEnum','iterator','_liveShareController','40xXyCaf','694274LQCLJk','IDLE','LiveShareStatus','getCurrentUnitOfType','startFollowing','get','symbol','stopFollowing','_initialize','extend','235935bRJhTh','prototype','function'];_0x517f=function(){return _0x5c9655;};return _0x517f();}function a(_0x2501b1){const _0x7a024=_0x4fa1;var _0x574341=i(_0x2501b1,_0x7a024(0x18a));return r(_0x574341)=='symbol'?_0x574341:_0x574341+'';}function o(_0x4914bf,_0x28845e,_0x444b87){const _0x309244=_0x4fa1;return(_0x28845e=a(_0x28845e))in _0x4914bf?Object[_0x309244(0x193)](_0x4914bf,_0x28845e,{'value':_0x444b87,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4914bf[_0x28845e]=_0x444b87,_0x4914bf;}function _0x4fa1(_0x22ee87,_0x4387e1){_0x22ee87=_0x22ee87-0x172;const _0x517fea=_0x517f();let _0x4fa125=_0x517fea[_0x22ee87];return _0x4fa125;}var s=class extends n[_0x11c1e9(0x199)]{constructor(..._0x17fca0){const _0x11f126=_0x11c1e9;super(..._0x17fca0),o(this,_0x11f126(0x177),void 0x0);}[_0x11c1e9(0x181)](_0x5f0e67){const _0x2cdab1=_0x11c1e9;this[_0x2cdab1(0x177)]=_0x5f0e67['get'](e[_0x2cdab1(0x19a)]);}['getLiveShareStatus'](){const _0x327261=_0x11c1e9;var _0x8d84;let _0x5b6a3c=this[_0x327261(0x173)][_0x327261(0x17e)](t[_0x327261(0x188)])[_0x327261(0x17c)](t['UniverInstanceType'][_0x327261(0x187)]);if(!_0x5b6a3c)throw Error('No\x20active\x20workbook\x20found.');let _0x15fdbe=_0x5b6a3c['getUnitId'](),_0x7916e=this[_0x327261(0x177)]['getLiveShareCoordinatorSync'](_0x15fdbe);return(_0x8d84=_0x7916e==null?void 0x0:_0x7916e['getStatus']())==null?e[_0x327261(0x17b)][_0x327261(0x17a)]:_0x8d84;}[_0x11c1e9(0x17d)](){const _0x110cba=_0x11c1e9;let _0x58f397=this['_injector'][_0x110cba(0x17e)](t['IUniverInstanceService'])[_0x110cba(0x17c)](t[_0x110cba(0x192)][_0x110cba(0x187)]);if(!_0x58f397)throw Error(_0x110cba(0x186));let _0x97a96f=_0x58f397[_0x110cba(0x19b)](),_0x38d4f5=this[_0x110cba(0x177)][_0x110cba(0x198)](_0x97a96f);if(!_0x38d4f5)throw Error(_0x110cba(0x196));_0x38d4f5[_0x110cba(0x17d)]();}[_0x11c1e9(0x180)](){const _0x30b896=_0x11c1e9;let _0xd740ec=this[_0x30b896(0x173)][_0x30b896(0x17e)](t[_0x30b896(0x188)])['getCurrentUnitOfType'](t[_0x30b896(0x192)][_0x30b896(0x187)]);if(!_0xd740ec)throw Error(_0x30b896(0x186));let _0x3eb691=_0xd740ec['getUnitId'](),_0x28cd81=this[_0x30b896(0x177)][_0x30b896(0x198)](_0x3eb691);if(!_0x28cd81)throw Error(_0x30b896(0x196));_0x28cd81[_0x30b896(0x180)]();}[_0x11c1e9(0x19c)](){const _0x16ef92=_0x11c1e9;let _0x2a2a8e=this[_0x16ef92(0x173)][_0x16ef92(0x17e)](t[_0x16ef92(0x188)])[_0x16ef92(0x17c)](t['UniverInstanceType']['UNIVER_SHEET']);if(!_0x2a2a8e)throw Error(_0x16ef92(0x186));let _0x2803b2=_0x2a2a8e[_0x16ef92(0x19b)](),_0x542f9e=this[_0x16ef92(0x177)][_0x16ef92(0x198)](_0x2803b2);if(!_0x542f9e)throw Error(_0x16ef92(0x196));_0x542f9e[_0x16ef92(0x190)]();}[_0x11c1e9(0x197)](){const _0x5f257f=_0x11c1e9;let _0x278afe=this['_injector'][_0x5f257f(0x17e)](t[_0x5f257f(0x188)])[_0x5f257f(0x17c)](t['UniverInstanceType'][_0x5f257f(0x187)]);if(!_0x278afe)throw Error(_0x5f257f(0x186));let _0xc41985=_0x278afe[_0x5f257f(0x19b)](),_0x4af2af=this[_0x5f257f(0x177)][_0x5f257f(0x198)](_0xc41985);if(!_0x4af2af)throw Error(_0x5f257f(0x196));_0x4af2af[_0x5f257f(0x197)]();}};n[_0x11c1e9(0x199)][_0x11c1e9(0x182)](s);var c=class extends n[_0x11c1e9(0x18b)]{get[_0x11c1e9(0x175)](){const _0x1d3de8=_0x11c1e9;return e[_0x1d3de8(0x17b)];}};n[_0x11c1e9(0x18b)][_0x11c1e9(0x182)](c);
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4ea661=_0x5ee3;(function(_0x2bae1d,_0x1c4d72){const _0x56ea74=_0x5ee3,_0x3098a1=_0x2bae1d();while(!![]){try{const _0x1a1a99=parseInt(_0x56ea74(0x133))/0x1*(parseInt(_0x56ea74(0x132))/0x2)+parseInt(_0x56ea74(0x13f))/0x3+parseInt(_0x56ea74(0x1c0))/0x4*(-parseInt(_0x56ea74(0x16c))/0x5)+parseInt(_0x56ea74(0x176))/0x6*(-parseInt(_0x56ea74(0x1cf))/0x7)+-parseInt(_0x56ea74(0x1ac))/0x8*(parseInt(_0x56ea74(0x1b7))/0x9)+-parseInt(_0x56ea74(0x1c8))/0xa*(-parseInt(_0x56ea74(0x13b))/0xb)+parseInt(_0x56ea74(0x19e))/0xc;if(_0x1a1a99===_0x1c4d72)break;else _0x3098a1['push'](_0x3098a1['shift']());}catch(_0x1d7c7b){_0x3098a1['push'](_0x3098a1['shift']());}}}(_0x1ac1,0x7bb3c),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4ea661(0x166)}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs-pro/collaboration-client'),n=require('@univerjs/core'),r=require('@univerjs/sheets'),i=require('rxjs'),a=require('rxjs/operators'),o=require('@univerjs/sheets-ui'),s=require('@univerjs/ui'),c=require('@univerjs/design'),l=require('@univerjs/icons'),u=require('react'),d=require('react/jsx-runtime');function f(_0x1911c1){'@babel/helpers - typeof';const _0x1ca053=_0x4ea661;return f=typeof Symbol==_0x1ca053(0x138)&&typeof Symbol['iterator']==_0x1ca053(0x151)?function(_0x2955ba){return typeof _0x2955ba;}:function(_0x2c68e0){const _0x21d7d3=_0x1ca053;return _0x2c68e0&&typeof Symbol==_0x21d7d3(0x138)&&_0x2c68e0[_0x21d7d3(0x15a)]===Symbol&&_0x2c68e0!==Symbol[_0x21d7d3(0x1cd)]?_0x21d7d3(0x151):typeof _0x2c68e0;},f(_0x1911c1);}function p(_0x4d8b41,_0x31b94f){const _0x501cf9=_0x4ea661;if(f(_0x4d8b41)!=_0x501cf9(0x149)||!_0x4d8b41)return _0x4d8b41;var _0x1f8e56=_0x4d8b41[Symbol[_0x501cf9(0x182)]];if(_0x1f8e56!==void 0x0){var _0x2f154d=_0x1f8e56[_0x501cf9(0x16b)](_0x4d8b41,_0x31b94f||'default');if(f(_0x2f154d)!=_0x501cf9(0x149))return _0x2f154d;throw TypeError(_0x501cf9(0x195));}return(_0x31b94f===_0x501cf9(0x173)?String:Number)(_0x4d8b41);}function m(_0x3aaea3){const _0x3b577c=_0x4ea661;var _0xdaaacb=p(_0x3aaea3,'string');return f(_0xdaaacb)==_0x3b577c(0x151)?_0xdaaacb:_0xdaaacb+'';}function h(_0x15b9df,_0x170fc1,_0x41de35){return(_0x170fc1=m(_0x170fc1))in _0x15b9df?Object['defineProperty'](_0x15b9df,_0x170fc1,{'value':_0x41de35,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x15b9df[_0x170fc1]=_0x41de35,_0x15b9df;}var g=class extends n[_0x4ea661(0x19b)]{constructor(..._0x984de4){const _0xae6abf=_0x4ea661;super(..._0x984de4),h(this,'_sharedOperations',new Set()),h(this,_0xae6abf(0x14c),new Set());}[_0x4ea661(0x1b4)](_0x1f5c57){const _0x4bc91f=_0x4ea661;return this[_0x4bc91f(0x164)][_0x4bc91f(0x193)](_0x1f5c57),(0x0,n[_0x4bc91f(0x158)])(()=>this[_0x4bc91f(0x164)][_0x4bc91f(0x1a9)](_0x1f5c57));}[_0x4ea661(0x178)](_0xa651a6){const _0xf0460=_0x4ea661;return this[_0xf0460(0x14c)]['add'](_0xa651a6),(0x0,n[_0xf0460(0x158)])(()=>this['_reporters']['delete'](_0xa651a6));}[_0x4ea661(0x163)](_0x30c810){const _0x15d06b=_0x4ea661;return this['_sharedOperations'][_0x15d06b(0x15d)](_0x30c810);}[_0x4ea661(0x17d)](_0x5d6f4c){const _0x6afcd4=_0x4ea661;return Array[_0x6afcd4(0x1a3)](this['_reporters'])[_0x6afcd4(0x1c1)](_0x409c49=>_0x409c49(_0x5d6f4c));}};function _(_0x28b117,_0x1ac45c){return function(_0x2429a2,_0x5b4f21){_0x1ac45c(_0x2429a2,_0x5b4f21,_0x28b117);};}function v(_0x5ded80,_0x3c70cf,_0x1f6e73,_0x185b54){const _0x4955d0=_0x4ea661;var _0x419d46=arguments[_0x4955d0(0x197)],_0x490893=_0x419d46<0x3?_0x3c70cf:_0x185b54===null?_0x185b54=Object[_0x4955d0(0x12d)](_0x3c70cf,_0x1f6e73):_0x185b54,_0x534252;if(typeof Reflect==_0x4955d0(0x149)&&typeof Reflect[_0x4955d0(0x13c)]==_0x4955d0(0x138))_0x490893=Reflect[_0x4955d0(0x13c)](_0x5ded80,_0x3c70cf,_0x1f6e73,_0x185b54);else{for(var _0x117070=_0x5ded80['length']-0x1;_0x117070>=0x0;_0x117070--)(_0x534252=_0x5ded80[_0x117070])&&(_0x490893=(_0x419d46<0x3?_0x534252(_0x490893):_0x419d46>0x3?_0x534252(_0x3c70cf,_0x1f6e73,_0x490893):_0x534252(_0x3c70cf,_0x1f6e73))||_0x490893);}return _0x419d46>0x3&&_0x490893&&Object[_0x4955d0(0x1b2)](_0x3c70cf,_0x1f6e73,_0x490893),_0x490893;}let y=class extends n[_0x4ea661(0x1a2)]{constructor(_0xb81cf4,_0x51a75a,_0x20e6b4){const _0x32e6d9=_0x4ea661;super(),this[_0x32e6d9(0x16e)]=_0xb81cf4,this['_injector']=_0x51a75a,this['_collabSessionService']=_0x20e6b4,h(this,'_entities',new Map()),this[_0x32e6d9(0x16a)]();}async['getLiveShareCoordinator'](_0x1fac3e){const _0x4e788a=_0x4ea661;return this[_0x4e788a(0x196)][_0x4e788a(0x15d)](_0x1fac3e)||await this[_0x4e788a(0x1bd)](_0x1fac3e),this[_0x4e788a(0x196)]['get'](_0x1fac3e);}['getLiveShareCoordinatorSync'](_0x1de17f){const _0x292e96=_0x4ea661;var _0x5ed542;return(_0x5ed542=this[_0x292e96(0x196)][_0x292e96(0x13e)](_0x1de17f))==null?null:_0x5ed542;}[_0x4ea661(0x16a)](){const _0x5a850a=_0x4ea661;this[_0x5a850a(0x16e)][_0x5a850a(0x1a8)](n['UniverInstanceType'][_0x5a850a(0x161)])['pipe']((0x0,a['takeUntil'])(this['dispose$']))[_0x5a850a(0x1b1)](async _0x238767=>{const _0x1fa7f4=_0x5a850a;let _0x581449=_0x238767[_0x1fa7f4(0x165)][_0x1fa7f4(0x18f)]();this[_0x1fa7f4(0x196)][_0x1fa7f4(0x15d)](_0x581449)||this['_startLiveShareCoordinator'](_0x581449);}),this[_0x5a850a(0x16e)][_0x5a850a(0x157)](n[_0x5a850a(0x199)][_0x5a850a(0x161)])[_0x5a850a(0x152)]((0x0,a['takeUntil'])(this[_0x5a850a(0x150)]))[_0x5a850a(0x1b1)](_0xd9368a=>{const _0x3bbd5f=_0x5a850a;let _0xcb81e0=_0xd9368a[_0x3bbd5f(0x18f)](),_0x2b9f5c=this[_0x3bbd5f(0x196)][_0x3bbd5f(0x13e)](_0xcb81e0);_0x2b9f5c==null||_0x2b9f5c[_0x3bbd5f(0x17a)]();});}async['_startLiveShareCoordinator'](_0x237d33){const _0x339fb9=_0x4ea661;let _0x212af5=await this[_0x339fb9(0x18b)][_0x339fb9(0x140)](_0x237d33),_0x2d4eeb=this['_injector']['createInstance'](x,_0x237d33,_0x212af5);return _0x2d4eeb[_0x339fb9(0x177)](),this[_0x339fb9(0x196)][_0x339fb9(0x15b)](_0x237d33,_0x2d4eeb),_0x2d4eeb;}};y=v([_(0x0,n['IUniverInstanceService']),_(0x1,(0x0,n[_0x4ea661(0x1bf)])(n[_0x4ea661(0x18d)])),_(0x2,(0x0,n['Inject'])(t[_0x4ea661(0x1cc)]))],y);let b=function(_0x86fbf8){const _0x28193e=_0x4ea661;return _0x86fbf8[_0x28193e(0x167)]=_0x28193e(0x15c),_0x86fbf8['IDLE']=_0x28193e(0x162),_0x86fbf8[_0x28193e(0x1a1)]=_0x28193e(0x1b3),_0x86fbf8['NOT_FOLLOWING']=_0x28193e(0x14e),_0x86fbf8['PRESENTING']=_0x28193e(0x19f),_0x86fbf8;}({}),x=class extends n[_0x4ea661(0x1a2)]{get[_0x4ea661(0x1af)](){return this['_status$']['getValue']();}constructor(_0x33c709,_0x523a20,_0x3c371b,_0x4eec60,_0x9015d7){const _0x13228c=_0x4ea661;super(),this[_0x13228c(0x1b8)]=_0x33c709,this[_0x13228c(0x147)]=_0x523a20,this['_configService']=_0x3c371b,this[_0x13228c(0x17c)]=_0x4eec60,this[_0x13228c(0x190)]=_0x9015d7,h(this,_0x13228c(0x170),new i['BehaviorSubject'](_0x13228c(0x162))),h(this,_0x13228c(0x1be),this[_0x13228c(0x170)]['asObservable']()),h(this,_0x13228c(0x16a),!0x1),h(this,'_commandDisposable',null),h(this,_0x13228c(0x130),null);}['dispose'](){const _0x4b1957=_0x4ea661;var _0x5c6b6c;(_0x5c6b6c=this[_0x4b1957(0x1ca)])==null||_0x5c6b6c['dispose'](),this['_status$'][_0x4b1957(0x1d7)](_0x4b1957(0x162)),this[_0x4b1957(0x170)][_0x4b1957(0x175)]();}['getStatus'](){const _0x47928d=_0x4ea661;return this[_0x47928d(0x1af)];}[_0x4ea661(0x177)](){const _0x4fa484=_0x4ea661;this['_init']||(this['_init']=!0x0,this[_0x4fa484(0x147)][_0x4fa484(0x1b6)]['pipe']((0x0,a[_0x4fa484(0x1b0)])(this[_0x4fa484(0x150)]))[_0x4fa484(0x1b1)](_0x1d4134=>{const _0x4f1f31=_0x4fa484;switch(_0x1d4134){case t[_0x4f1f31(0x17e)]['OFFLINE']:this[_0x4f1f31(0x171)]();break;case t[_0x4f1f31(0x17e)]['ONLINE']:this[_0x4f1f31(0x1a7)]();break;default:}}),this[_0x4fa484(0x147)][_0x4fa484(0x1ab)][_0x4fa484(0x152)]((0x0,a[_0x4fa484(0x1b0)])(this[_0x4fa484(0x150)]))[_0x4fa484(0x1b1)](_0x455ccf=>{const _0x45ee18=_0x4fa484;let {eventID:_0x3f8be6}=_0x455ccf;switch(_0x3f8be6){case e[_0x45ee18(0x18c)][_0x45ee18(0x187)]:this[_0x45ee18(0x188)](_0x455ccf);break;case e[_0x45ee18(0x18c)]['LIVESHARE_OPERATION']:this[_0x45ee18(0x1d2)](_0x455ccf);break;case e[_0x45ee18(0x18c)][_0x45ee18(0x129)]:this[_0x45ee18(0x192)]();break;case e[_0x45ee18(0x18c)][_0x45ee18(0x1ae)]:this['_handleNewChangeSets'](_0x455ccf);break;default:}}));}[_0x4ea661(0x1c7)](){const _0x2f6dbf=_0x4ea661;this[_0x2f6dbf(0x147)][_0x2f6dbf(0x17f)]({'eventID':e[_0x2f6dbf(0x18c)][_0x2f6dbf(0x14b)],'data':{'unitID':this['_unitID'],'userID':this[_0x2f6dbf(0x147)][_0x2f6dbf(0x134)]()}},this[_0x2f6dbf(0x1b8)]);}['stopPresenting'](){const _0x25579e=_0x4ea661;this[_0x25579e(0x1af)]===_0x25579e(0x19f)&&(this['_status$'][_0x25579e(0x1d7)]('idle'),this[_0x25579e(0x147)][_0x25579e(0x17f)]({'eventID':e[_0x25579e(0x18c)][_0x25579e(0x129)],'data':{'unitID':this[_0x25579e(0x1b8)]}},this['_unitID']));}[_0x4ea661(0x1a6)](){const _0x54adb1=_0x4ea661;this[_0x54adb1(0x1af)]===_0x54adb1(0x14e)&&(this[_0x54adb1(0x170)][_0x54adb1(0x1d7)](_0x54adb1(0x1b3)),this['_startFollowing']());}[_0x4ea661(0x1d3)](){const _0xab1402=_0x4ea661;this[_0xab1402(0x1af)]===_0xab1402(0x1b3)&&this[_0xab1402(0x169)]();}['_handleNewHost'](_0x419449){const _0x288b0f=_0x4ea661;let {presenter:_0x2a4178}=_0x419449[_0x288b0f(0x12f)],_0x967884=this[_0x288b0f(0x147)][_0x288b0f(0x134)]();this[_0x288b0f(0x130)]=_0x2a4178,_0x2a4178===_0x967884?(this['_stopFollowing'](),this[_0x288b0f(0x16d)]()):this[_0x288b0f(0x1af)]!==_0x288b0f(0x14e)&&(this[_0x288b0f(0x1a5)](),this[_0x288b0f(0x15e)]());}[_0x4ea661(0x17b)](){const _0x47c658=_0x4ea661;let _0x3c37d4={'eventID':e[_0x47c658(0x18c)]['LIVESHARE_FETCH_OPERATIONS']};this[_0x47c658(0x147)][_0x47c658(0x17f)](_0x3c37d4,this[_0x47c658(0x1b8)]);}[_0x4ea661(0x192)](){this['_presenter']=null,this['_status']!=='presenting'&&this['_beIdle']();}[_0x4ea661(0x168)](_0x2460d1){const _0x1f74f9=_0x4ea661;if(this['_status']===_0x1f74f9(0x1b3)&&this[_0x1f74f9(0x130)]===_0x2460d1[_0x1f74f9(0x12f)][_0x1f74f9(0x1b5)]){let _0x2cd08e=(0x0,e[_0x1f74f9(0x1ba)])(_0x2460d1['data'])['mutations'][_0x1f74f9(0x19a)]()[_0x1f74f9(0x137)](_0x15f393=>_0x15f393['id']===r[_0x1f74f9(0x183)]['id']);if(_0x2cd08e){let _0x10394d=_0x2cd08e['params']['unitId'],_0x2c860a=_0x2cd08e[_0x1f74f9(0x141)][_0x1f74f9(0x180)]['id'];setTimeout(()=>{const _0x45bdf6=_0x1f74f9;this[_0x45bdf6(0x190)][_0x45bdf6(0x181)](r[_0x45bdf6(0x186)]['id'],{'unitId':_0x10394d,'subUnitId':_0x2c860a},{'fromCollab':!0x0});});}}}[_0x4ea661(0x16d)](){const _0x440658=_0x4ea661;var _0x274b71;(_0x274b71=this[_0x440658(0x1ca)])==null||_0x274b71[_0x440658(0x17a)](),this[_0x440658(0x170)][_0x440658(0x1d7)](_0x440658(0x19f));let _0x77a628=new Map(),_0x1b7d19=this[_0x440658(0x1ca)]=new n[(_0x440658(0x1ce))]();_0x1b7d19[_0x440658(0x193)]((0x0,n[_0x440658(0x158)])(()=>{const _0xe3471=_0x440658;_0x77a628[_0xe3471(0x15f)](({subject:_0x40be46,subscription:_0x156862})=>{const _0x381402=_0xe3471;_0x156862[_0x381402(0x16f)](),_0x40be46[_0x381402(0x175)]();}),_0x77a628[_0xe3471(0x1a4)]();})),_0x1b7d19[_0x440658(0x193)](this[_0x440658(0x190)][_0x440658(0x131)](_0x1e6813=>{const _0x1caecc=_0x440658;if(_0x1e6813['type']!==n[_0x1caecc(0x139)]['OPERATION']||!this[_0x1caecc(0x17c)][_0x1caecc(0x163)](_0x1e6813['id']))return;let {id:_0x16792f}=_0x1e6813,_0x3a9f86;if(_0x77a628['has'](_0x16792f))_0x3a9f86=_0x77a628[_0x1caecc(0x13e)](_0x16792f)[_0x1caecc(0x1d1)];else{var _0x66ca8d;_0x3a9f86=new i[(_0x1caecc(0x1c3))]();let _0x1edbf4=_0x3a9f86[_0x1caecc(0x152)]((0x0,a[_0x1caecc(0x153)])((_0x66ca8d=this[_0x1caecc(0x143)]['getConfig'](_0x1caecc(0x1c6)))==null?0xc8:_0x66ca8d,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x1caecc(0x1b1)](_0x9dfc34=>{const _0x2a657a=_0x1caecc;this['_collabSession'][_0x2a657a(0x17f)]({'eventID':e[_0x2a657a(0x18c)][_0x2a657a(0x159)],'data':{'unitID':this[_0x2a657a(0x1b8)],'operations':{[_0x9dfc34['id']]:{'id':_0x9dfc34['id'],'params':JSON[_0x2a657a(0x135)](_0x9dfc34[_0x2a657a(0x141)])}}}},this[_0x2a657a(0x1b8)]);});_0x77a628[_0x1caecc(0x15b)](_0x16792f,{'subject':_0x3a9f86,'subscription':_0x1edbf4});}_0x3a9f86[_0x1caecc(0x1d7)](_0x1e6813);})),this['_liveShareService']['getInitialStates'](this[_0x440658(0x1b8)])[_0x440658(0x15f)](_0x2aab8b=>this[_0x440658(0x147)][_0x440658(0x17f)]({'eventID':e[_0x440658(0x18c)]['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x440658(0x1b8)],'operations':{[_0x2aab8b['id']]:{'id':_0x2aab8b['id'],'params':JSON['stringify'](_0x2aab8b['params'])}}}},this['_unitID']));}['_stopPresenting'](){const _0x48f64b=_0x4ea661;var _0x391606;this['_status$'][_0x48f64b(0x1d7)](_0x48f64b(0x162)),(_0x391606=this[_0x48f64b(0x1ca)])==null||_0x391606['dispose'](),this[_0x48f64b(0x1ca)]=null;}[_0x4ea661(0x15e)](){const _0x582150=_0x4ea661;var _0x1bb7e8;(_0x1bb7e8=this['_commandDisposable'])==null||_0x1bb7e8[_0x582150(0x17a)](),this[_0x582150(0x170)][_0x582150(0x1d7)]('following');}[_0x4ea661(0x148)](){const _0x40d562=_0x4ea661;var _0x5ce077;this[_0x40d562(0x170)][_0x40d562(0x1d7)](_0x40d562(0x162)),(_0x5ce077=this['_commandDisposable'])==null||_0x5ce077[_0x40d562(0x17a)](),this[_0x40d562(0x1ca)]=null;}[_0x4ea661(0x169)](){const _0x1fbc98=_0x4ea661;var _0x420bff;this[_0x1fbc98(0x170)][_0x1fbc98(0x1d7)](_0x1fbc98(0x14e)),(_0x420bff=this[_0x1fbc98(0x1ca)])==null||_0x420bff[_0x1fbc98(0x17a)]();}[_0x4ea661(0x1d2)](_0x1547b4){const _0x5b78c5=_0x4ea661;if([_0x5b78c5(0x19f),_0x5b78c5(0x14e),_0x5b78c5(0x15c)][_0x5b78c5(0x13a)](this[_0x5b78c5(0x1af)])||!_0x1547b4[_0x5b78c5(0x12f)][_0x5b78c5(0x1bc)]||_0x1547b4[_0x5b78c5(0x12f)][_0x5b78c5(0x1bc)]===this[_0x5b78c5(0x147)][_0x5b78c5(0x134)]())return;this[_0x5b78c5(0x1af)]==='idle'&&this['_startFollowing']();let _0x45ea56=_0x1547b4[_0x5b78c5(0x12f)]['operations'];Object[_0x5b78c5(0x12e)](_0x45ea56)['forEach'](_0x26348d=>{const _0x250ae0=_0x5b78c5;this[_0x250ae0(0x190)][_0x250ae0(0x181)](_0x26348d['id'],_0x26348d[_0x250ae0(0x141)]?JSON[_0x250ae0(0x179)](_0x26348d[_0x250ae0(0x141)]):null,{'fromCollab':!0x0});});}[_0x4ea661(0x171)](){const _0x569694=_0x4ea661;var _0x2c94d9;this[_0x569694(0x170)]['next']('offline'),(_0x2c94d9=this[_0x569694(0x1ca)])==null||_0x2c94d9[_0x569694(0x17a)]();}[_0x4ea661(0x1a7)](){const _0x3c8d0e=_0x4ea661;this['_status$'][_0x3c8d0e(0x1d7)](_0x3c8d0e(0x162)),this[_0x3c8d0e(0x17b)]();}};x=v([_(0x2,n[_0x4ea661(0x185)]),_(0x3,(0x0,n[_0x4ea661(0x1bf)])(g)),_(0x4,n['ICommandService'])],x);var S='@univerjs-pro/live-share',C=_0x4ea661(0x19d);const w={};let T=class extends n[_0x4ea661(0x19b)]{constructor(_0x14202e){const _0x4fb892=_0x4ea661;super(),this[_0x4fb892(0x17c)]=_0x14202e,this[_0x4fb892(0x16a)]();}[_0x4ea661(0x16a)](){const _0x39d154=_0x4ea661;[o['SetZoomRatioOperation']['id'],o[_0x39d154(0x194)]['id'],r['SetWorksheetActiveOperation']['id']][_0x39d154(0x15f)](_0x45fcb4=>{const _0x19d35f=_0x39d154;this[_0x19d35f(0x13d)](this[_0x19d35f(0x17c)]['registerSharedOperation'](_0x45fcb4));});}};T=v([_(0x0,(0x0,n[_0x4ea661(0x1bf)])(g))],T);function E(){const _0x9d0a88=_0x4ea661;let _0xcfc048=(0x0,s[_0x9d0a88(0x172)])(y),_0x147d2a=(0x0,s[_0x9d0a88(0x172)])(n['IUniverInstanceService']),_0x34b46b=(0x0,s[_0x9d0a88(0x1d8)])(()=>_0x147d2a['getCurrentTypeOfUnit$'](n[_0x9d0a88(0x199)][_0x9d0a88(0x161)]),void 0x0,!0x1,[]),_0x46e147=(0x0,s[_0x9d0a88(0x1d8)])((0x0,u['useMemo'])(()=>_0x34b46b?(0x0,i['defer'])(()=>(0x0,i[_0x9d0a88(0x1a3)])(_0xcfc048[_0x9d0a88(0x144)](_0x34b46b['getUnitId']()))):(0x0,i['of'])(null),[_0x34b46b,_0xcfc048]),null),_0x5e286b=(0x0,s[_0x9d0a88(0x1d8)])(_0x46e147?()=>_0x46e147['status$']:null,'idle',!0x1,[_0x46e147]);return _0x46e147?(0x0,d[_0x9d0a88(0x136)])(c['Dropdown'],{'align':_0x9d0a88(0x145),'disabled':_0x5e286b===_0x9d0a88(0x15c),'className':_0x9d0a88(0x1d0),'overlay':(0x0,d[_0x9d0a88(0x136)])(D,{'status':_0x5e286b,'coordinator':_0x46e147}),'children':(0x0,d[_0x9d0a88(0x136)])(_0x9d0a88(0x146),{'className':(0x0,c['clsx'])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x5e286b===_0x9d0a88(0x15c),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x5e286b!=='offline'}),'type':'button','children':(0x0,d[_0x9d0a88(0x136)])(l[_0x9d0a88(0x14f)],{})})}):null;}function D(_0x311ece){const _0x4353a8=_0x4ea661;let {status:_0x4eedc6,coordinator:_0x42bb00}=_0x311ece;switch(_0x4eedc6){case'idle':return(0x0,d[_0x4353a8(0x136)])(O,{'coordinator':_0x42bb00});case _0x4353a8(0x1b3):return(0x0,d[_0x4353a8(0x136)])(k,{'coordinator':_0x42bb00});case _0x4353a8(0x14e):return(0x0,d[_0x4353a8(0x136)])(A,{'coordinator':_0x42bb00});case _0x4353a8(0x15c):return(0x0,d[_0x4353a8(0x136)])(M,{});case _0x4353a8(0x19f):return(0x0,d[_0x4353a8(0x136)])(j,{'coordinator':_0x42bb00});default:return null;}}function _0x5ee3(_0x41e8d6,_0x337f73){_0x41e8d6=_0x41e8d6-0x129;const _0x1ac14c=_0x1ac1();let _0x5ee3b7=_0x1ac14c[_0x41e8d6];return _0x5ee3b7;}function O(_0x500619){const _0x4f33d8=_0x4ea661;let {coordinator:_0x4e8a4a}=_0x500619;return(0x0,d['jsxs'])(d['Fragment'],{'children':[(0x0,d[_0x4f33d8(0x136)])(_0x4f33d8(0x154),{'className':_0x4f33d8(0x142),'children':_0x4f33d8(0x19c)}),(0x0,d[_0x4f33d8(0x136)])(c[_0x4f33d8(0x1c4)],{'onClick':()=>_0x4e8a4a[_0x4f33d8(0x1c7)](),'children':_0x4f33d8(0x1c2)})]});}function _0x1ac1(){const _0x1e6c50=['takeUntil','subscribe','defineProperty','following','registerSharedOperation','memberID','sessionStatus$','34227wzbVsm','_unitID','_injector','parseProtocolChangeset','_mountLiveShare','presenter','_startLiveShareCoordinator','status$','Inject','1812628UISVBq','map','Start','Subject','Button','Start\x20following','SAME_OPERATION_SHARE_INTERVAL','tryStartPresenting','131360JnwViy','onStarting','_commandDisposable','_config','CollaborationSessionService','prototype','DisposableCollection','7xpsppg','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','subject','_handleOperation','stopFollowing','_uiPartsService','UNIVER_LIVE_SHARE_PLUGIN','DependentOn','next','useObservable','LIVESHARE_TERMINATE','merge','default','touchDependencies','getOwnPropertyDescriptor','values','data','_presenter','onCommandExecuted','74882phOAqB','19hcbJPi','getMemberID','stringify','jsx','find','function','CommandType','includes','473HybVhm','decorate','disposeWithMe','get','475608fKiIHR','requireSession','params','univer-mb-3\x20univer-w-full\x20univer-text-sm','_configService','getLiveShareCoordinator','end','button','_collabSession','_beIdle','object','You\x27re\x20presenting\x20the\x20document','LIVESHARE_REQUEST_HOST','_reporters','packageName','not-following','LiveShareIcon','dispose$','symbol','pipe','throttleTime','div','You\x27re\x20not\x20following\x20the\x20presenter','You\x27are\x20offline.','getTypeOfUnitDisposed$','toDisposable','LIVESHARE_OPERATION','constructor','set','offline','has','_startFollowing','forEach','IUIPartsService','UNIVER_SHEET','idle','shouldShareOperation','_sharedOperations','unit','Module','OFFLINE','_handleNewChangeSets','_stopFollowing','_init','call','5PfgLYa','_startPresenting','_univerInstanceService','unsubscribe','_status$','_handleOffline','useDependency','string','text','complete','3116274xpMHUX','init','registerInitialStateReporter','parse','dispose','_fetchOperations','_liveShareService','getInitialStates','SessionStatus','send','sheet','executeCommand','toPrimitive','InsertSheetMutation','HEADER_MENU','IConfigService','SetWorksheetActiveOperation','LIVESHARE_NEW_HOST','_handleNewHost','registerComponent','UNIVER_UNKNOWN','_collabSessionService','CollaborationEvent','Injector','pluginName','getUnitId','_commandService','UniverLiveSharePlugin','_handleTerminate','add','SetScrollOperation','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_entities','length','jsxs','UniverInstanceType','reverse','Disposable','Present\x20this\x20document','1.0.0-alpha.7','10527768viCJgz','presenting','Plugin','FOLLOWING','RxDisposable','from','clear','_stopPresenting','startFollowing','_handleOnline','getTypeOfUnitAdded$','delete','onRendered','event$','1752oojSDc','Fragment','NEW_CHANGESETS','_status'];_0x1ac1=function(){return _0x1e6c50;};return _0x1ac1();}function k(_0x1e19ba){const _0x148728=_0x4ea661;let {coordinator:_0x214c47}=_0x1e19ba;return(0x0,d[_0x148728(0x198)])(d['Fragment'],{'children':[(0x0,d[_0x148728(0x136)])(_0x148728(0x154),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'You\x27re\x20following\x20the\x20presenter'}),(0x0,d[_0x148728(0x136)])(c[_0x148728(0x1c4)],{'onClick':()=>_0x214c47[_0x148728(0x1d3)](),'children':'Stop\x20following'})]});}function A(_0x4d4207){const _0x5c8041=_0x4ea661;let {coordinator:_0x3c615d}=_0x4d4207;return(0x0,d['jsxs'])(d['Fragment'],{'children':[(0x0,d[_0x5c8041(0x136)])(_0x5c8041(0x154),{'className':_0x5c8041(0x142),'children':_0x5c8041(0x155)}),(0x0,d[_0x5c8041(0x136)])(c[_0x5c8041(0x1c4)],{'variant':_0x5c8041(0x174),'onClick':()=>_0x3c615d[_0x5c8041(0x1a6)](),'children':_0x5c8041(0x1c5)})]});}function j(_0x234671){const _0x345591=_0x4ea661;let {coordinator:_0x4ea9b4}=_0x234671;return(0x0,d[_0x345591(0x198)])(d[_0x345591(0x1ad)],{'children':[(0x0,d['jsx'])(_0x345591(0x154),{'className':_0x345591(0x142),'children':_0x345591(0x14a)}),(0x0,d[_0x345591(0x136)])(c[_0x345591(0x1c4)],{'variant':_0x345591(0x12b),'onClick':()=>_0x4ea9b4['stopPresenting'](),'children':'Stop\x20presenting'})]});}function M(){const _0x1ac897=_0x4ea661;return(0x0,d[_0x1ac897(0x136)])(d[_0x1ac897(0x1ad)],{'children':_0x1ac897(0x156)});}let N=class extends n['Disposable']{constructor(_0x39bad6,_0x1a08b4){const _0x545f88=_0x4ea661;super(),this[_0x545f88(0x1b9)]=_0x39bad6,this[_0x545f88(0x1d4)]=_0x1a08b4,this[_0x545f88(0x1bb)]();}[_0x4ea661(0x1bb)](){const _0x409774=_0x4ea661;this['disposeWithMe'](this['_uiPartsService'][_0x409774(0x189)](s['BuiltInUIPart'][_0x409774(0x184)],()=>(0x0,s['connectInjector'])(E,this[_0x409774(0x1b9)])));}};N=v([_(0x0,(0x0,n['Inject'])(n[_0x4ea661(0x18d)])),_(0x1,s[_0x4ea661(0x160)])],N);let P=class extends n[_0x4ea661(0x1a0)]{constructor(_0x558130=w,_0x2e0fa3,_0x43a637){const _0x1de31c=_0x4ea661;super(),this['_config']=_0x558130,this['_injector']=_0x2e0fa3,this[_0x1de31c(0x143)]=_0x43a637;let {..._0x3df14f}=(0x0,n[_0x1de31c(0x12a)])({},w,this[_0x1de31c(0x1cb)]);this['_configService']['setConfig']('live-share.config',_0x3df14f);}[_0x4ea661(0x1c9)](){const _0x54f08c=_0x4ea661;(0x0,n['registerDependencies'])(this['_injector'],(0x0,n['mergeOverrideWithDependencies'])([[g],[y],[T],[N]],this[_0x54f08c(0x1cb)]['override'])),(0x0,n[_0x54f08c(0x12c)])(this[_0x54f08c(0x1b9)],[[T]]);}[_0x4ea661(0x1aa)](){(0x0,n['touchDependencies'])(this['_injector'],[[N]]);}};h(P,'type',n['UniverInstanceType'][_0x4ea661(0x18a)]),h(P,_0x4ea661(0x18e),_0x4ea661(0x1d5)),h(P,_0x4ea661(0x14d),S),h(P,'version',C),P=v([(0x0,n[_0x4ea661(0x1d6)])(t['UniverCollaborationClientPlugin']),_(0x1,(0x0,n[_0x4ea661(0x1bf)])(n[_0x4ea661(0x18d)])),_(0x2,n[_0x4ea661(0x185)])],P),Object[_0x4ea661(0x1b2)](exports,'LiveShareController',{'enumerable':!0x0,'get':function(){return y;}}),exports['LiveShareStatus']=b,Object['defineProperty'](exports,_0x4ea661(0x191),{'enumerable':!0x0,'get':function(){return P;}});
|
|
1
|
+
const _0x57d492=_0x153d;(function(_0x74e7ef,_0x16b13f){const _0x292e0c=_0x153d,_0x2dff69=_0x74e7ef();while(!![]){try{const _0x49dedb=parseInt(_0x292e0c(0x180))/0x1+parseInt(_0x292e0c(0x15f))/0x2*(parseInt(_0x292e0c(0x141))/0x3)+parseInt(_0x292e0c(0x181))/0x4+parseInt(_0x292e0c(0x154))/0x5*(-parseInt(_0x292e0c(0x186))/0x6)+-parseInt(_0x292e0c(0x183))/0x7*(parseInt(_0x292e0c(0x156))/0x8)+parseInt(_0x292e0c(0x115))/0x9*(-parseInt(_0x292e0c(0x143))/0xa)+-parseInt(_0x292e0c(0x1ac))/0xb*(-parseInt(_0x292e0c(0x11e))/0xc);if(_0x49dedb===_0x16b13f)break;else _0x2dff69['push'](_0x2dff69['shift']());}catch(_0x446a2c){_0x2dff69['push'](_0x2dff69['shift']());}}}(_0x3762,0xd0164),Object[_0x57d492(0x188)](exports,Symbol[_0x57d492(0x192)],{'value':_0x57d492(0x12c)}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs-pro/collaboration-client'),n=require('@univerjs/core'),r=require('@univerjs/sheets'),i=require('rxjs'),a=require('rxjs/operators'),o=require('@univerjs-pro/license'),s=require('@univerjs/ui'),c=require('@univerjs/sheets-ui'),l=require('@univerjs/design'),u=require('@univerjs/icons'),d=require('react'),f=require('react/jsx-runtime');function p(_0x34c0e1){'@babel/helpers - typeof';const _0x1637c1=_0x57d492;return p=typeof Symbol==_0x1637c1(0x1b8)&&typeof Symbol[_0x1637c1(0x14e)]==_0x1637c1(0x18a)?function(_0x14e99f){return typeof _0x14e99f;}:function(_0x5556e7){const _0x4997a0=_0x1637c1;return _0x5556e7&&typeof Symbol==_0x4997a0(0x1b8)&&_0x5556e7[_0x4997a0(0x118)]===Symbol&&_0x5556e7!==Symbol[_0x4997a0(0x195)]?_0x4997a0(0x18a):typeof _0x5556e7;},p(_0x34c0e1);}function m(_0x5e084d,_0x55ab92){const _0x219a39=_0x57d492;if(p(_0x5e084d)!=_0x219a39(0x1bc)||!_0x5e084d)return _0x5e084d;var _0x17047b=_0x5e084d[Symbol[_0x219a39(0x168)]];if(_0x17047b!==void 0x0){var _0x53ed96=_0x17047b[_0x219a39(0x167)](_0x5e084d,_0x55ab92||_0x219a39(0x11c));if(p(_0x53ed96)!='object')return _0x53ed96;throw TypeError(_0x219a39(0x13c));}return(_0x55ab92===_0x219a39(0x19a)?String:Number)(_0x5e084d);}function h(_0x338d1d){var _0x2d575c=m(_0x338d1d,'string');return p(_0x2d575c)=='symbol'?_0x2d575c:_0x2d575c+'';}function g(_0x380a1c,_0x21fcf4,_0x1601c2){const _0x3110cc=_0x57d492;return(_0x21fcf4=h(_0x21fcf4))in _0x380a1c?Object[_0x3110cc(0x188)](_0x380a1c,_0x21fcf4,{'value':_0x1601c2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x380a1c[_0x21fcf4]=_0x1601c2,_0x380a1c;}var _=class extends n[_0x57d492(0x138)]{constructor(..._0x9f6ed9){const _0xf1c0e7=_0x57d492;super(..._0x9f6ed9),g(this,_0xf1c0e7(0x12b),new Set()),g(this,_0xf1c0e7(0x161),new Set());}[_0x57d492(0x13f)](_0x4df168){const _0x5a8469=_0x57d492;return this[_0x5a8469(0x12b)]['add'](_0x4df168),(0x0,n[_0x5a8469(0x1a2)])(()=>this[_0x5a8469(0x12b)][_0x5a8469(0x175)](_0x4df168));}[_0x57d492(0x13a)](_0x2a97a0){const _0x5c4852=_0x57d492;return this[_0x5c4852(0x161)]['add'](_0x2a97a0),(0x0,n['toDisposable'])(()=>this[_0x5c4852(0x161)][_0x5c4852(0x175)](_0x2a97a0));}[_0x57d492(0x1c1)](_0x3aa524){const _0x4fe299=_0x57d492;return this[_0x4fe299(0x12b)][_0x4fe299(0x106)](_0x3aa524);}['getInitialStates'](_0x5bfa7e){const _0x66153=_0x57d492;return Array[_0x66153(0x153)](this[_0x66153(0x161)])['map'](_0x35ea4b=>_0x35ea4b(_0x5bfa7e));}};function v(_0x3680bd,_0x2855fe){return function(_0x5d261f,_0xf546c2){_0x2855fe(_0x5d261f,_0xf546c2,_0x3680bd);};}function y(_0x3d6765,_0x298144,_0x116dd2,_0x183015){const _0x42359d=_0x57d492;var _0x9ee96a=arguments[_0x42359d(0x146)],_0x113eed=_0x9ee96a<0x3?_0x298144:_0x183015===null?_0x183015=Object[_0x42359d(0x15d)](_0x298144,_0x116dd2):_0x183015,_0x16df44;if(typeof Reflect=='object'&&typeof Reflect[_0x42359d(0x17f)]==_0x42359d(0x1b8))_0x113eed=Reflect[_0x42359d(0x17f)](_0x3d6765,_0x298144,_0x116dd2,_0x183015);else{for(var _0x39d675=_0x3d6765['length']-0x1;_0x39d675>=0x0;_0x39d675--)(_0x16df44=_0x3d6765[_0x39d675])&&(_0x113eed=(_0x9ee96a<0x3?_0x16df44(_0x113eed):_0x9ee96a>0x3?_0x16df44(_0x298144,_0x116dd2,_0x113eed):_0x16df44(_0x298144,_0x116dd2))||_0x113eed);}return _0x9ee96a>0x3&&_0x113eed&&Object['defineProperty'](_0x298144,_0x116dd2,_0x113eed),_0x113eed;}let b=class extends n['RxDisposable']{constructor(_0x1436d4,_0x5924c2,_0x3570ec){const _0x1a0c21=_0x57d492;super(),this['_univerInstanceService']=_0x1436d4,this[_0x1a0c21(0x12e)]=_0x5924c2,this[_0x1a0c21(0x105)]=_0x3570ec,g(this,_0x1a0c21(0x140),new Map()),this[_0x1a0c21(0x159)]();}async[_0x57d492(0x12d)](_0x3facd4){const _0x27355c=_0x57d492;return this[_0x27355c(0x140)][_0x27355c(0x106)](_0x3facd4)||await this[_0x27355c(0x17a)](_0x3facd4),this[_0x27355c(0x140)][_0x27355c(0x119)](_0x3facd4);}['getLiveShareCoordinatorSync'](_0x316a4e){const _0xee972b=_0x57d492;var _0x3e4a25;return(_0x3e4a25=this[_0xee972b(0x140)][_0xee972b(0x119)](_0x316a4e))==null?null:_0x3e4a25;}['_init'](){const _0x5968c0=_0x57d492;this[_0x5968c0(0x134)][_0x5968c0(0x1a6)](n[_0x5968c0(0x144)][_0x5968c0(0x1be)])[_0x5968c0(0x111)]((0x0,a[_0x5968c0(0x10e)])(this['dispose$']))[_0x5968c0(0x147)](async _0x4c702d=>{const _0x47b114=_0x5968c0;let _0x3ddb93=_0x4c702d['unit']['getUnitId']();this[_0x47b114(0x140)][_0x47b114(0x106)](_0x3ddb93)||this[_0x47b114(0x17a)](_0x3ddb93);}),this[_0x5968c0(0x134)][_0x5968c0(0x166)](n[_0x5968c0(0x144)][_0x5968c0(0x1be)])['pipe']((0x0,a['takeUntil'])(this['dispose$']))[_0x5968c0(0x147)](_0x5147e8=>{const _0x5ee0e3=_0x5968c0;let _0x133b6f=_0x5147e8[_0x5ee0e3(0x1b0)](),_0x1c8c01=this['_entities']['get'](_0x133b6f);_0x1c8c01==null||_0x1c8c01[_0x5ee0e3(0x17c)]();});}async[_0x57d492(0x17a)](_0x494c3f){const _0x4c2651=_0x57d492;let _0x5ebe43=await this['_collabSessionService']['requireSession'](_0x494c3f),_0x598d2d=this[_0x4c2651(0x12e)]['createInstance'](S,_0x494c3f,_0x5ebe43);return _0x598d2d[_0x4c2651(0x18c)](),this[_0x4c2651(0x140)][_0x4c2651(0x10a)](_0x494c3f,_0x598d2d),_0x598d2d;}};b=y([v(0x0,n[_0x57d492(0x114)]),v(0x1,(0x0,n[_0x57d492(0x116)])(n[_0x57d492(0x1a9)])),v(0x2,(0x0,n[_0x57d492(0x116)])(t[_0x57d492(0x137)]))],b);let x=function(_0x43f2d1){const _0x3d02d5=_0x57d492;return _0x43f2d1[_0x3d02d5(0x11b)]=_0x3d02d5(0x122),_0x43f2d1[_0x3d02d5(0x136)]=_0x3d02d5(0x157),_0x43f2d1[_0x3d02d5(0x1aa)]=_0x3d02d5(0x19e),_0x43f2d1['NOT_FOLLOWING']='not-following',_0x43f2d1[_0x3d02d5(0x113)]=_0x3d02d5(0x128),_0x43f2d1;}({}),S=class extends n[_0x57d492(0x17d)]{get[_0x57d492(0x198)](){const _0xe6012b=_0x57d492;return this[_0xe6012b(0x19c)][_0xe6012b(0x187)]();}constructor(_0x1273d9,_0x2935b3,_0x355f8f,_0x2181e9,_0xbeb15b){const _0xdfcd9=_0x57d492;super(),this[_0xdfcd9(0x129)]=_0x1273d9,this[_0xdfcd9(0x1af)]=_0x2935b3,this[_0xdfcd9(0x18f)]=_0x355f8f,this[_0xdfcd9(0x17b)]=_0x2181e9,this['_commandService']=_0xbeb15b,g(this,'_status$',new i['BehaviorSubject'](_0xdfcd9(0x157))),g(this,'status$',this[_0xdfcd9(0x19c)][_0xdfcd9(0x148)]()),g(this,_0xdfcd9(0x159),!0x1),g(this,_0xdfcd9(0x170),null),g(this,_0xdfcd9(0x14d),null);}[_0x57d492(0x17c)](){const _0x2d11d3=_0x57d492;var _0x13a245;(_0x13a245=this[_0x2d11d3(0x170)])==null||_0x13a245[_0x2d11d3(0x17c)](),this[_0x2d11d3(0x19c)][_0x2d11d3(0x142)](_0x2d11d3(0x157)),this[_0x2d11d3(0x19c)][_0x2d11d3(0x19b)]();}['getStatus'](){return this['_status'];}[_0x57d492(0x18c)](){const _0x2ed456=_0x57d492;this['_init']||(this[_0x2ed456(0x159)]=!0x0,this[_0x2ed456(0x1af)][_0x2ed456(0x162)][_0x2ed456(0x111)]((0x0,a['takeUntil'])(this[_0x2ed456(0x13d)]))['subscribe'](_0x3ae638=>{const _0x53979b=_0x2ed456;switch(_0x3ae638){case t['SessionStatus'][_0x53979b(0x11b)]:this[_0x53979b(0x1a3)]();break;case t[_0x53979b(0x14a)]['ONLINE']:this['_handleOnline']();break;default:}}),this[_0x2ed456(0x1af)][_0x2ed456(0x15c)][_0x2ed456(0x111)]((0x0,a[_0x2ed456(0x10e)])(this['dispose$']))[_0x2ed456(0x147)](_0x22aa1b=>{const _0x49ad10=_0x2ed456;let {eventID:_0x512934}=_0x22aa1b;switch(_0x512934){case e[_0x49ad10(0x163)][_0x49ad10(0x1b9)]:this[_0x49ad10(0x191)](_0x22aa1b);break;case e[_0x49ad10(0x163)][_0x49ad10(0x15b)]:this['_handleOperation'](_0x22aa1b);break;case e[_0x49ad10(0x163)][_0x49ad10(0x109)]:this[_0x49ad10(0x1ad)]();break;case e[_0x49ad10(0x163)][_0x49ad10(0x16c)]:this[_0x49ad10(0x199)](_0x22aa1b);break;default:}}));}[_0x57d492(0x19d)](){const _0x57894a=_0x57d492;this[_0x57894a(0x1af)]['send']({'eventID':e[_0x57894a(0x163)][_0x57894a(0x158)],'data':{'unitID':this['_unitID'],'userID':this[_0x57894a(0x1af)]['getMemberID']()}},this[_0x57894a(0x129)]);}[_0x57d492(0x15e)](){const _0x34e6d2=_0x57d492;this[_0x34e6d2(0x198)]===_0x34e6d2(0x128)&&(this[_0x34e6d2(0x19c)][_0x34e6d2(0x142)]('idle'),this[_0x34e6d2(0x1af)][_0x34e6d2(0x15a)]({'eventID':e['CollaborationEvent'][_0x34e6d2(0x109)],'data':{'unitID':this[_0x34e6d2(0x129)]}},this[_0x34e6d2(0x129)]));}['startFollowing'](){const _0x2ecf76=_0x57d492;this[_0x2ecf76(0x198)]==='not-following'&&(this['_status$'][_0x2ecf76(0x142)](_0x2ecf76(0x19e)),this[_0x2ecf76(0x13b)]());}[_0x57d492(0x171)](){const _0x39d07f=_0x57d492;this[_0x39d07f(0x198)]===_0x39d07f(0x19e)&&this[_0x39d07f(0x110)]();}[_0x57d492(0x191)](_0x3e8c7a){const _0x587b95=_0x57d492;let {presenter:_0x301f8b}=_0x3e8c7a['data'],_0x1793ec=this[_0x587b95(0x1af)][_0x587b95(0x1c0)]();this[_0x587b95(0x14d)]=_0x301f8b,_0x301f8b===_0x1793ec?(this[_0x587b95(0x110)](),this[_0x587b95(0x164)]()):this[_0x587b95(0x198)]!==_0x587b95(0x132)&&(this[_0x587b95(0x1b4)](),this[_0x587b95(0x13b)]());}[_0x57d492(0x145)](){const _0x3c2d5e=_0x57d492;let _0x2116e5={'eventID':e[_0x3c2d5e(0x163)][_0x3c2d5e(0x10c)]};this[_0x3c2d5e(0x1af)]['send'](_0x2116e5,this[_0x3c2d5e(0x129)]);}[_0x57d492(0x1ad)](){const _0x14d109=_0x57d492;this['_presenter']=null,this[_0x14d109(0x198)]!=='presenting'&&this[_0x14d109(0x1b3)]();}[_0x57d492(0x199)](_0x1396ac){const _0x4d212b=_0x57d492;if(this[_0x4d212b(0x198)]===_0x4d212b(0x19e)&&this[_0x4d212b(0x14d)]===_0x1396ac['data'][_0x4d212b(0x124)]){let _0x4f35ee=(0x0,e[_0x4d212b(0x131)])(_0x1396ac['data'])[_0x4d212b(0x182)]['reverse']()['find'](_0x1daf41=>_0x1daf41['id']===r[_0x4d212b(0x13e)]['id']);if(_0x4f35ee){let _0x237ae3=_0x4f35ee[_0x4d212b(0x1a8)]['unitId'],_0x1f4f0e=_0x4f35ee[_0x4d212b(0x1a8)]['sheet']['id'];setTimeout(()=>{const _0x4d8325=_0x4d212b;this[_0x4d8325(0x18b)]['executeCommand'](r['SetWorksheetActiveOperation']['id'],{'unitId':_0x237ae3,'subUnitId':_0x1f4f0e},{'fromCollab':!0x0});});}}}[_0x57d492(0x164)](){const _0x538c27=_0x57d492;var _0x163541;(_0x163541=this[_0x538c27(0x170)])==null||_0x163541[_0x538c27(0x17c)](),this[_0x538c27(0x19c)]['next'](_0x538c27(0x128));let _0x1f5a25=new Map(),_0x2c9aa1=this[_0x538c27(0x170)]=new n['DisposableCollection']();_0x2c9aa1[_0x538c27(0x1b1)]((0x0,n[_0x538c27(0x1a2)])(()=>{const _0x157888=_0x538c27;_0x1f5a25[_0x157888(0x189)](({subject:_0xe72b5d,subscription:_0x37cefe})=>{const _0x4b01e2=_0x157888;_0x37cefe[_0x4b01e2(0x1bd)](),_0xe72b5d[_0x4b01e2(0x19b)]();}),_0x1f5a25['clear']();})),_0x2c9aa1['add'](this[_0x538c27(0x18b)][_0x538c27(0x11d)](_0x4d4351=>{const _0x3e5ff3=_0x538c27;if(_0x4d4351[_0x3e5ff3(0x190)]!==n[_0x3e5ff3(0x125)]['OPERATION']||!this['_liveShareService'][_0x3e5ff3(0x1c1)](_0x4d4351['id']))return;let {id:_0x4b93dd}=_0x4d4351,_0x4890c0;if(_0x1f5a25[_0x3e5ff3(0x106)](_0x4b93dd))_0x4890c0=_0x1f5a25[_0x3e5ff3(0x119)](_0x4b93dd)['subject'];else{var _0x5c1f4f;_0x4890c0=new i['Subject']();let _0x3416da=_0x4890c0['pipe']((0x0,a['throttleTime'])((_0x5c1f4f=this[_0x3e5ff3(0x18f)][_0x3e5ff3(0x127)](_0x3e5ff3(0x112)))==null?0xc8:_0x5c1f4f,void 0x0,{'trailing':!0x0,'leading':!0x0}))['subscribe'](_0x1ff315=>{const _0x21655c=_0x3e5ff3;this['_collabSession'][_0x21655c(0x15a)]({'eventID':e['CollaborationEvent'][_0x21655c(0x15b)],'data':{'unitID':this[_0x21655c(0x129)],'operations':{[_0x1ff315['id']]:{'id':_0x1ff315['id'],'params':JSON[_0x21655c(0x165)](_0x1ff315[_0x21655c(0x1a8)])}}}},this[_0x21655c(0x129)]);});_0x1f5a25['set'](_0x4b93dd,{'subject':_0x4890c0,'subscription':_0x3416da});}_0x4890c0[_0x3e5ff3(0x142)](_0x4d4351);})),this['_liveShareService'][_0x538c27(0x155)](this[_0x538c27(0x129)])['forEach'](_0x2f660a=>this[_0x538c27(0x1af)]['send']({'eventID':e['CollaborationEvent']['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x538c27(0x129)],'operations':{[_0x2f660a['id']]:{'id':_0x2f660a['id'],'params':JSON[_0x538c27(0x165)](_0x2f660a[_0x538c27(0x1a8)])}}}},this[_0x538c27(0x129)]));}[_0x57d492(0x1b4)](){const _0x4937dd=_0x57d492;var _0x1e6e1f;this['_status$'][_0x4937dd(0x142)](_0x4937dd(0x157)),(_0x1e6e1f=this[_0x4937dd(0x170)])==null||_0x1e6e1f[_0x4937dd(0x17c)](),this[_0x4937dd(0x170)]=null;}[_0x57d492(0x13b)](){const _0x38f508=_0x57d492;var _0x591e30;(_0x591e30=this[_0x38f508(0x170)])==null||_0x591e30[_0x38f508(0x17c)](),this[_0x38f508(0x19c)][_0x38f508(0x142)]('following');}[_0x57d492(0x1b3)](){const _0x3a58c2=_0x57d492;var _0x24b3d0;this[_0x3a58c2(0x19c)][_0x3a58c2(0x142)](_0x3a58c2(0x157)),(_0x24b3d0=this['_commandDisposable'])==null||_0x24b3d0[_0x3a58c2(0x17c)](),this[_0x3a58c2(0x170)]=null;}[_0x57d492(0x110)](){const _0x2dd450=_0x57d492;var _0x184e42;this[_0x2dd450(0x19c)]['next']('not-following'),(_0x184e42=this[_0x2dd450(0x170)])==null||_0x184e42[_0x2dd450(0x17c)]();}[_0x57d492(0x16f)](_0x58b780){const _0x14efa3=_0x57d492;if(['presenting',_0x14efa3(0x132),'offline'][_0x14efa3(0x18d)](this['_status'])||!_0x58b780[_0x14efa3(0x11f)][_0x14efa3(0x1b7)]||_0x58b780['data'][_0x14efa3(0x1b7)]===this['_collabSession'][_0x14efa3(0x1c0)]())return;this[_0x14efa3(0x198)]===_0x14efa3(0x157)&&this[_0x14efa3(0x13b)]();let _0x3002ca=_0x58b780[_0x14efa3(0x11f)][_0x14efa3(0x117)];Object[_0x14efa3(0x14f)](_0x3002ca)[_0x14efa3(0x189)](_0x1125c5=>{const _0x1ea6dd=_0x14efa3;this['_commandService']['executeCommand'](_0x1125c5['id'],_0x1125c5[_0x1ea6dd(0x1a8)]?JSON[_0x1ea6dd(0x193)](_0x1125c5[_0x1ea6dd(0x1a8)]):null,{'fromCollab':!0x0});});}['_handleOffline'](){const _0x5ef2a3=_0x57d492;var _0x38c795;this[_0x5ef2a3(0x19c)][_0x5ef2a3(0x142)](_0x5ef2a3(0x122)),(_0x38c795=this[_0x5ef2a3(0x170)])==null||_0x38c795['dispose']();}[_0x57d492(0x16b)](){const _0x35c13d=_0x57d492;this[_0x35c13d(0x19c)][_0x35c13d(0x142)](_0x35c13d(0x157)),this[_0x35c13d(0x145)]();}};S=y([v(0x2,n[_0x57d492(0x10b)]),v(0x3,(0x0,n[_0x57d492(0x116)])(_)),v(0x4,n[_0x57d492(0x135)])],S);function _0x3762(){const _0x506e92=['_startPresenting','stringify','getTypeOfUnitDisposed$','call','toPrimitive','_config','You\x27re\x20presenting\x20the\x20document','_handleOnline','NEW_CHANGESETS','disposeWithMe','packageName','_handleOperation','_commandDisposable','stopFollowing','div','HEADER_MENU','UniverUIPlugin','delete','IUIPartsService','_mountLiveShare','DependentOn','Stop\x20presenting','_startLiveShareCoordinator','_liveShareService','dispose','RxDisposable','UniverLicensePlugin','decorate','96048KdYglX','104836ilHGKd','mutations','2093zSxXVs','startFollowing','jsx','5226EmjcDb','getValue','defineProperty','forEach','symbol','_commandService','init','includes','Start\x20following','_configService','type','_handleNewHost','toStringTag','parse','UNIVER_LIVE_SHARE_PLUGIN','prototype','univer-mb-3\x20univer-w-full\x20univer-text-sm','BuiltInUIPart','_status','_handleNewChangeSets','string','complete','_status$','tryStartPresenting','following','clsx','live-share.config','SetWorksheetActiveOperation','toDisposable','_handleOffline','Stop\x20following','override','getTypeOfUnitAdded$','LiveShareStatus','params','Injector','FOLLOWING','LiveShareIcon','28182bXbnWP','_handleTerminate','useDependency','_collabSession','getUnitId','add','You\x27re\x20following\x20the\x20presenter','_beIdle','_stopPresenting','touchDependencies','status$','presenter','function','LIVESHARE_NEW_HOST','setConfig','You\x27re\x20not\x20following\x20the\x20presenter','object','unsubscribe','UNIVER_SHEET','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','getMemberID','shouldShareOperation','getCurrentTypeOfUnit$','onRendered','_collabSessionService','has','SetZoomRatioOperation','Button','LIVESHARE_TERMINATE','set','IConfigService','LIVESHARE_FETCH_OPERATIONS','connectInjector','takeUntil','Fragment','_stopFollowing','pipe','SAME_OPERATION_SHARE_INTERVAL','PRESENTING','IUniverInstanceService','9CRNevo','Inject','operations','constructor','get','useMemo','OFFLINE','default','onCommandExecuted','12840YxqYnV','data','You\x27are\x20offline.','UniverCollaborationClientPlugin','offline','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','memberID','CommandType','_uiPartsService','getConfig','presenting','_unitID','Plugin','_sharedOperations','Module','getLiveShareCoordinator','_injector','useObservable','registerDependencies','parseProtocolChangeset','not-following','Present\x20this\x20document','_univerInstanceService','ICommandService','IDLE','CollaborationSessionService','Disposable','Start','registerInitialStateReporter','_startFollowing','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','dispose$','InsertSheetMutation','registerSharedOperation','_entities','311703wSnaTw','next','470030SfOpvv','UniverInstanceType','_fetchOperations','length','subscribe','asObservable','end','SessionStatus','jsxs','button','_presenter','iterator','values','LiveShareController','1.0.0-alpha.8','UNIVER_UNKNOWN','from','7450XBjFYK','getInitialStates','34512IfpQZm','idle','LIVESHARE_REQUEST_HOST','_init','send','LIVESHARE_OPERATION','event$','getOwnPropertyDescriptor','stopPresenting','12tpcdnQ','onStarting','_reporters','sessionStatus$','CollaborationEvent'];_0x3762=function(){return _0x506e92;};return _0x3762();}var C='@univerjs-pro/live-share',w=_0x57d492(0x151);const T={};let E=class extends n['Disposable']{constructor(_0x3a58a0){super(),this['_liveShareService']=_0x3a58a0,this['_init']();}['_init'](){const _0x11cc0a=_0x57d492;[c[_0x11cc0a(0x107)]['id'],c['SetScrollOperation']['id'],r[_0x11cc0a(0x1a1)]['id']]['forEach'](_0x596dce=>{const _0x4d704b=_0x11cc0a;this[_0x4d704b(0x16d)](this['_liveShareService'][_0x4d704b(0x13f)](_0x596dce));});}};E=y([v(0x0,(0x0,n[_0x57d492(0x116)])(_))],E);function D(){const _0x4ca9f5=_0x57d492;let _0x339b9a=(0x0,s[_0x4ca9f5(0x1ae)])(b),_0x27db28=(0x0,s[_0x4ca9f5(0x1ae)])(n[_0x4ca9f5(0x114)]),_0x3d8035=(0x0,s[_0x4ca9f5(0x12f)])(()=>_0x27db28[_0x4ca9f5(0x1c2)](n[_0x4ca9f5(0x144)][_0x4ca9f5(0x1be)]),void 0x0,!0x1,[]),_0x5490b7=(0x0,s[_0x4ca9f5(0x12f)])((0x0,d[_0x4ca9f5(0x11a)])(()=>_0x3d8035?(0x0,i['defer'])(()=>(0x0,i[_0x4ca9f5(0x153)])(_0x339b9a['getLiveShareCoordinator'](_0x3d8035[_0x4ca9f5(0x1b0)]()))):(0x0,i['of'])(null),[_0x3d8035,_0x339b9a]),null),_0x9cadc1=(0x0,s[_0x4ca9f5(0x12f)])(_0x5490b7?()=>_0x5490b7[_0x4ca9f5(0x1b6)]:null,_0x4ca9f5(0x157),!0x1,[_0x5490b7]);return _0x5490b7?(0x0,f[_0x4ca9f5(0x185)])(l['Dropdown'],{'align':_0x4ca9f5(0x149),'disabled':_0x9cadc1===_0x4ca9f5(0x122),'className':_0x4ca9f5(0x123),'overlay':(0x0,f[_0x4ca9f5(0x185)])(O,{'status':_0x9cadc1,'coordinator':_0x5490b7}),'children':(0x0,f[_0x4ca9f5(0x185)])(_0x4ca9f5(0x14c),{'className':(0x0,l[_0x4ca9f5(0x19f)])(_0x4ca9f5(0x1bf),{'univer-cursor-not-allowed':_0x9cadc1===_0x4ca9f5(0x122),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x9cadc1!==_0x4ca9f5(0x122)}),'type':_0x4ca9f5(0x14c),'children':(0x0,f[_0x4ca9f5(0x185)])(u[_0x4ca9f5(0x1ab)],{})})}):null;}function O(_0x1f3abb){const _0x43b3ab=_0x57d492;let {status:_0x397830,coordinator:_0x4104a0}=_0x1f3abb;switch(_0x397830){case'idle':return(0x0,f[_0x43b3ab(0x185)])(k,{'coordinator':_0x4104a0});case _0x43b3ab(0x19e):return(0x0,f[_0x43b3ab(0x185)])(A,{'coordinator':_0x4104a0});case _0x43b3ab(0x132):return(0x0,f[_0x43b3ab(0x185)])(j,{'coordinator':_0x4104a0});case'offline':return(0x0,f[_0x43b3ab(0x185)])(N,{});case _0x43b3ab(0x128):return(0x0,f[_0x43b3ab(0x185)])(M,{'coordinator':_0x4104a0});default:return null;}}function k(_0x31b090){const _0x370c91=_0x57d492;let {coordinator:_0x1d8ccb}=_0x31b090;return(0x0,f['jsxs'])(f[_0x370c91(0x10f)],{'children':[(0x0,f['jsx'])('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x370c91(0x133)}),(0x0,f[_0x370c91(0x185)])(l[_0x370c91(0x108)],{'onClick':()=>_0x1d8ccb[_0x370c91(0x19d)](),'children':_0x370c91(0x139)})]});}function A(_0x1f4597){const _0x5169ba=_0x57d492;let {coordinator:_0x40f350}=_0x1f4597;return(0x0,f[_0x5169ba(0x14b)])(f[_0x5169ba(0x10f)],{'children':[(0x0,f[_0x5169ba(0x185)])(_0x5169ba(0x172),{'className':_0x5169ba(0x196),'children':_0x5169ba(0x1b2)}),(0x0,f[_0x5169ba(0x185)])(l[_0x5169ba(0x108)],{'onClick':()=>_0x40f350[_0x5169ba(0x171)](),'children':_0x5169ba(0x1a4)})]});}function _0x153d(_0x3471bc,_0x1894b8){_0x3471bc=_0x3471bc-0x105;const _0x376279=_0x3762();let _0x153dfb=_0x376279[_0x3471bc];return _0x153dfb;}function j(_0x1db940){const _0x3915d8=_0x57d492;let {coordinator:_0x461d14}=_0x1db940;return(0x0,f[_0x3915d8(0x14b)])(f[_0x3915d8(0x10f)],{'children':[(0x0,f['jsx'])(_0x3915d8(0x172),{'className':_0x3915d8(0x196),'children':_0x3915d8(0x1bb)}),(0x0,f['jsx'])(l[_0x3915d8(0x108)],{'variant':'text','onClick':()=>_0x461d14[_0x3915d8(0x184)](),'children':_0x3915d8(0x18e)})]});}function M(_0x194050){const _0x175e23=_0x57d492;let {coordinator:_0x531f0f}=_0x194050;return(0x0,f['jsxs'])(f[_0x175e23(0x10f)],{'children':[(0x0,f['jsx'])(_0x175e23(0x172),{'className':_0x175e23(0x196),'children':_0x175e23(0x16a)}),(0x0,f[_0x175e23(0x185)])(l[_0x175e23(0x108)],{'variant':_0x175e23(0x11c),'onClick':()=>_0x531f0f[_0x175e23(0x15e)](),'children':_0x175e23(0x179)})]});}function N(){const _0x3a4db4=_0x57d492;return(0x0,f['jsx'])(f[_0x3a4db4(0x10f)],{'children':_0x3a4db4(0x120)});}let P=class extends n[_0x57d492(0x138)]{constructor(_0x39b5b1,_0x15658c){const _0x51082b=_0x57d492;super(),this[_0x51082b(0x12e)]=_0x39b5b1,this[_0x51082b(0x126)]=_0x15658c,this[_0x51082b(0x177)]();}['_mountLiveShare'](){const _0x38083c=_0x57d492;this[_0x38083c(0x16d)](this[_0x38083c(0x126)]['registerComponent'](s[_0x38083c(0x197)][_0x38083c(0x173)],()=>(0x0,s[_0x38083c(0x10d)])(D,this['_injector'])));}};P=y([v(0x0,(0x0,n[_0x57d492(0x116)])(n[_0x57d492(0x1a9)])),v(0x1,s[_0x57d492(0x176)])],P);let F=class extends n[_0x57d492(0x12a)]{constructor(_0x3ded5d=T,_0x6fe086,_0x3ccef3){const _0x3969ce=_0x57d492;super(),this['_config']=_0x3ded5d,this['_injector']=_0x6fe086,this[_0x3969ce(0x18f)]=_0x3ccef3;let {..._0x2ffe54}=(0x0,n['merge'])({},T,this[_0x3969ce(0x169)]);this[_0x3969ce(0x18f)][_0x3969ce(0x1ba)](_0x3969ce(0x1a0),_0x2ffe54);}[_0x57d492(0x160)](){const _0x40a5b5=_0x57d492;(0x0,n[_0x40a5b5(0x130)])(this['_injector'],(0x0,n['mergeOverrideWithDependencies'])([[_],[b],[E],[P]],this[_0x40a5b5(0x169)][_0x40a5b5(0x1a5)])),(0x0,n[_0x40a5b5(0x1b5)])(this[_0x40a5b5(0x12e)],[[E]]);}[_0x57d492(0x1c3)](){const _0x1e4bc7=_0x57d492;(0x0,n['touchDependencies'])(this[_0x1e4bc7(0x12e)],[[P]]);}};g(F,_0x57d492(0x190),n[_0x57d492(0x144)][_0x57d492(0x152)]),g(F,'pluginName',_0x57d492(0x194)),g(F,_0x57d492(0x16e),C),g(F,'version',w),F=y([(0x0,n[_0x57d492(0x178)])(o[_0x57d492(0x17e)],s[_0x57d492(0x174)],t[_0x57d492(0x121)]),v(0x1,(0x0,n['Inject'])(n[_0x57d492(0x1a9)])),v(0x2,n[_0x57d492(0x10b)])],F),Object[_0x57d492(0x188)](exports,_0x57d492(0x150),{'enumerable':!0x0,'get':function(){return b;}}),exports[_0x57d492(0x1a7)]=x,Object['defineProperty'](exports,'UniverLiveSharePlugin',{'enumerable':!0x0,'get':function(){return F;}});
|
package/lib/es/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x564ce2=_0x3735;(function(_0x5b62cd,_0x5cd0af){const _0x4065ad=_0x3735,_0x5aa3a7=_0x5b62cd();while(!![]){try{const _0x35acf9=-parseInt(_0x4065ad(0x10b))/0x1+-parseInt(_0x4065ad(0x116))/0x2*(-parseInt(_0x4065ad(0x12b))/0x3)+parseInt(_0x4065ad(0x10e))/0x4+-parseInt(_0x4065ad(0x113))/0x5*(-parseInt(_0x4065ad(0x11c))/0x6)+-parseInt(_0x4065ad(0x122))/0x7*(-parseInt(_0x4065ad(0x121))/0x8)+parseInt(_0x4065ad(0x11e))/0x9+-parseInt(_0x4065ad(0x120))/0xa;if(_0x35acf9===_0x5cd0af)break;else _0x5aa3a7['push'](_0x5aa3a7['shift']());}catch(_0x16910c){_0x5aa3a7['push'](_0x5aa3a7['shift']());}}}(_0x547e,0x9ce8d));import{LiveShareController as _0xd847b0,LiveShareStatus as _0x243f3d}from'@univerjs-pro/live-share';import{IUniverInstanceService as _0x58d182,UniverInstanceType as _0x299ea0}from'@univerjs/core';import{FEnum as _0x14652b,FUniver as _0x17ac48}from'@univerjs/core/facade';function o(_0x723ffb){'@babel/helpers - typeof';const _0x400afe=_0x3735;return o=typeof Symbol==_0x400afe(0x12a)&&typeof Symbol['iterator']==_0x400afe(0x11b)?function(_0x5ee07f){return typeof _0x5ee07f;}:function(_0x312fda){const _0x32f96a=_0x400afe;return _0x312fda&&typeof Symbol==_0x32f96a(0x12a)&&_0x312fda['constructor']===Symbol&&_0x312fda!==Symbol['prototype']?_0x32f96a(0x11b):typeof _0x312fda;},o(_0x723ffb);}function s(_0x4cc0cf,_0x4fdf29){const _0x5e43ed=_0x3735;if(o(_0x4cc0cf)!=_0x5e43ed(0x110)||!_0x4cc0cf)return _0x4cc0cf;var _0x416b5b=_0x4cc0cf[Symbol[_0x5e43ed(0x10d)]];if(_0x416b5b!==void 0x0){var _0x1baeaf=_0x416b5b['call'](_0x4cc0cf,_0x4fdf29||'default');if(o(_0x1baeaf)!=_0x5e43ed(0x110))return _0x1baeaf;throw TypeError(_0x5e43ed(0x10c));}return(_0x4fdf29==='string'?String:Number)(_0x4cc0cf);}function c(_0x50f6e7){const _0x2c4049=_0x3735;var _0x632f9b=s(_0x50f6e7,_0x2c4049(0x124));return o(_0x632f9b)==_0x2c4049(0x11b)?_0x632f9b:_0x632f9b+'';}function _0x3735(_0x4c8e6c,_0x1e0140){_0x4c8e6c=_0x4c8e6c-0x10a;const _0x547e39=_0x547e();let _0x3735ad=_0x547e39[_0x4c8e6c];return _0x3735ad;}function l(_0x3de8fa,_0x1909c1,_0x593a56){const _0x5bc032=_0x3735;return(_0x1909c1=c(_0x1909c1))in _0x3de8fa?Object[_0x5bc032(0x10f)](_0x3de8fa,_0x1909c1,{'value':_0x593a56,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3de8fa[_0x1909c1]=_0x593a56,_0x3de8fa;}var u=class extends _0x17ac48{constructor(..._0x59dc36){const _0x2c5927=_0x3735;super(..._0x59dc36),l(this,_0x2c5927(0x112),void 0x0);}[_0x564ce2(0x114)](_0x18d254){const _0xdefcf1=_0x564ce2;this[_0xdefcf1(0x112)]=_0x18d254[_0xdefcf1(0x118)](_0xd847b0);}[_0x564ce2(0x111)](){const _0x2529d9=_0x564ce2;var _0x21b99d;let _0x279599=this[_0x2529d9(0x123)]['get'](_0x58d182)['getCurrentUnitOfType'](_0x299ea0['UNIVER_SHEET']);if(!_0x279599)throw Error(_0x2529d9(0x119));let _0x197c29=_0x279599['getUnitId'](),_0x5e30ad=this[_0x2529d9(0x112)][_0x2529d9(0x129)](_0x197c29);return(_0x21b99d=_0x5e30ad==null?void 0x0:_0x5e30ad[_0x2529d9(0x126)]())==null?_0x243f3d['IDLE']:_0x21b99d;}['startFollowing'](){const _0x1dcb35=_0x564ce2;let _0x5271fb=this[_0x1dcb35(0x123)][_0x1dcb35(0x118)](_0x58d182)['getCurrentUnitOfType'](_0x299ea0['UNIVER_SHEET']);if(!_0x5271fb)throw Error(_0x1dcb35(0x119));let _0xa5a9cd=_0x5271fb[_0x1dcb35(0x128)](),_0x4b8033=this[_0x1dcb35(0x112)][_0x1dcb35(0x129)](_0xa5a9cd);if(!_0x4b8033)throw Error(_0x1dcb35(0x125));_0x4b8033['startFollowing']();}[_0x564ce2(0x11d)](){const _0x2bccd0=_0x564ce2;let _0x29f9a4=this[_0x2bccd0(0x123)]['get'](_0x58d182)[_0x2bccd0(0x11a)](_0x299ea0['UNIVER_SHEET']);if(!_0x29f9a4)throw Error(_0x2bccd0(0x119));let _0x12757d=_0x29f9a4[_0x2bccd0(0x128)](),_0x166aa7=this[_0x2bccd0(0x112)][_0x2bccd0(0x129)](_0x12757d);if(!_0x166aa7)throw Error(_0x2bccd0(0x125));_0x166aa7[_0x2bccd0(0x11d)]();}[_0x564ce2(0x127)](){const _0x6997fb=_0x564ce2;let _0x7eaf82=this['_injector'][_0x6997fb(0x118)](_0x58d182)[_0x6997fb(0x11a)](_0x299ea0[_0x6997fb(0x115)]);if(!_0x7eaf82)throw Error(_0x6997fb(0x119));let _0x2d19d3=_0x7eaf82[_0x6997fb(0x128)](),_0x5a848a=this[_0x6997fb(0x112)]['getLiveShareCoordinatorSync'](_0x2d19d3);if(!_0x5a848a)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x5a848a[_0x6997fb(0x117)]();}['stopPresenting'](){const _0x4db5d1=_0x564ce2;let _0x1c4f1f=this['_injector'][_0x4db5d1(0x118)](_0x58d182)[_0x4db5d1(0x11a)](_0x299ea0[_0x4db5d1(0x115)]);if(!_0x1c4f1f)throw Error('No\x20active\x20workbook\x20found.');let _0x1d7470=_0x1c4f1f[_0x4db5d1(0x128)](),_0x3b8c59=this[_0x4db5d1(0x112)][_0x4db5d1(0x129)](_0x1d7470);if(!_0x3b8c59)throw Error(_0x4db5d1(0x125));_0x3b8c59['stopPresenting']();}};_0x17ac48[_0x564ce2(0x11f)](u);var d=class extends _0x14652b{get[_0x564ce2(0x10a)](){return _0x243f3d;}};_0x14652b[_0x564ce2(0x11f)](d);function _0x547e(){const _0x1b561b=['1127812VqtuLv','defineProperty','object','getLiveShareStatus','_liveShareController','5JYivbH','_initialize','UNIVER_SHEET','128eJGNUm','tryStartPresenting','get','No\x20active\x20workbook\x20found.','getCurrentUnitOfType','symbol','5249526YGTfua','stopFollowing','7276572TTRZfE','extend','22170280PdGvxV','64dQrQPB','471268mEfubE','_injector','string','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','getStatus','startPresenting','getUnitId','getLiveShareCoordinatorSync','function','30204xGnAqJ','LiveShareStatusEnum','288597vdoPwQ','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','toPrimitive'];_0x547e=function(){return _0x1b561b;};return _0x547e();}export{};
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xcd3c43=_0x29fa;(function(_0x40ac36,_0x1da1a9){const _0x5b52eb=_0x29fa,_0x1bba4d=_0x40ac36();while(!![]){try{const _0x19c2cc=parseInt(_0x5b52eb(0x145))/0x1+-parseInt(_0x5b52eb(0x150))/0x2+-parseInt(_0x5b52eb(0x132))/0x3*(parseInt(_0x5b52eb(0x17c))/0x4)+parseInt(_0x5b52eb(0x102))/0x5+parseInt(_0x5b52eb(0x11b))/0x6+parseInt(_0x5b52eb(0x138))/0x7+-parseInt(_0x5b52eb(0x175))/0x8;if(_0x19c2cc===_0x1da1a9)break;else _0x1bba4d['push'](_0x1bba4d['shift']());}catch(_0x151428){_0x1bba4d['push'](_0x1bba4d['shift']());}}}(_0x4350,0x4c64f));import{CollaborationEvent as _0x3756a6,parseProtocolChangeset as _0x540c5a}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x598ce3,SessionStatus as _0x4d69f8,UniverCollaborationClientPlugin as _0x337bb8}from'@univerjs-pro/collaboration-client';import{CommandType as _0x370a98,DependentOn as _0x3f835d,Disposable as _0x3d4065,DisposableCollection as _0x1d1071,ICommandService as _0x2aa954,IConfigService as _0x13ab7e,IUniverInstanceService as _0x5ab737,Inject as _0x130c38,Injector as _0x189051,Plugin as _0x5f36ae,RxDisposable as _0x1a82c3,UniverInstanceType as _0x3f510f,merge as _0x3df356,mergeOverrideWithDependencies as _0x1f0e7f,registerDependencies as _0x24986b,toDisposable as _0xf8e6d4,touchDependencies as _0x1c595d}from'@univerjs/core';import{InsertSheetMutation as _0x39f5b2,SetWorksheetActiveOperation as _0x2b0483}from'@univerjs/sheets';import{BehaviorSubject as _0x23f9ae,Subject as _0x20c350,defer as _0x4386d9,from as _0xa7f912,of as _0x363ac9}from'rxjs';import{takeUntil as _0x223cee,throttleTime as _0x364328}from'rxjs/operators';import{SetScrollOperation as _0x5ae29f,SetZoomRatioOperation as _0x4bc340}from'@univerjs/sheets-ui';import{BuiltInUIPart as _0x72c6df,IUIPartsService as _0x3d33a9,connectInjector as _0x33a9bb,useDependency as _0x361196,useObservable as _0x313630}from'@univerjs/ui';import{Button as _0x5b7c15,Dropdown as _0x5f2dd7,clsx as _0x1b4e86}from'@univerjs/design';import{LiveShareIcon as _0xbe8107}from'@univerjs/icons';function _0x29fa(_0x1d5906,_0xf05a33){_0x1d5906=_0x1d5906-0xed;const _0x435077=_0x4350();let _0x29fa14=_0x435077[_0x1d5906];return _0x29fa14;}import{useMemo as _0x1c5235}from'react';import{Fragment as _0x114c30,jsx as _0x76736e,jsxs as _0x46d651}from'react/jsx-runtime';function z(_0x18187e){'@babel/helpers - typeof';const _0x53ca80=_0x29fa;return z=typeof Symbol=='function'&&typeof Symbol[_0x53ca80(0xf4)]==_0x53ca80(0x169)?function(_0x5dd149){return typeof _0x5dd149;}:function(_0x1fa963){const _0x1875b7=_0x53ca80;return _0x1fa963&&typeof Symbol=='function'&&_0x1fa963[_0x1875b7(0xf0)]===Symbol&&_0x1fa963!==Symbol['prototype']?'symbol':typeof _0x1fa963;},z(_0x18187e);}function B(_0x1ad699,_0x3079ff){const _0x30cb2b=_0x29fa;if(z(_0x1ad699)!='object'||!_0x1ad699)return _0x1ad699;var _0x1b3e85=_0x1ad699[Symbol[_0x30cb2b(0x127)]];if(_0x1b3e85!==void 0x0){var _0x17039d=_0x1b3e85[_0x30cb2b(0x119)](_0x1ad699,_0x3079ff||_0x30cb2b(0x105));if(z(_0x17039d)!=_0x30cb2b(0x12c))return _0x17039d;throw TypeError(_0x30cb2b(0x135));}return(_0x3079ff===_0x30cb2b(0x134)?String:Number)(_0x1ad699);}function V(_0x44e39d){const _0x3b0218=_0x29fa;var _0x400d5b=B(_0x44e39d,_0x3b0218(0x134));return z(_0x400d5b)==_0x3b0218(0x169)?_0x400d5b:_0x400d5b+'';}function H(_0x3a9b8b,_0x117851,_0x334320){const _0xed25aa=_0x29fa;return(_0x117851=V(_0x117851))in _0x3a9b8b?Object[_0xed25aa(0xfa)](_0x3a9b8b,_0x117851,{'value':_0x334320,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3a9b8b[_0x117851]=_0x334320,_0x3a9b8b;}var U=class extends _0x3d4065{constructor(..._0x50b86d){const _0x26b38b=_0x29fa;super(..._0x50b86d),H(this,_0x26b38b(0x164),new Set()),H(this,_0x26b38b(0x10e),new Set());}[_0xcd3c43(0x159)](_0x4b2f96){const _0x29d865=_0xcd3c43;return this['_sharedOperations']['add'](_0x4b2f96),_0xf8e6d4(()=>this[_0x29d865(0x164)][_0x29d865(0xf3)](_0x4b2f96));}['registerInitialStateReporter'](_0x23ddda){const _0x4fced5=_0xcd3c43;return this[_0x4fced5(0x10e)][_0x4fced5(0x16d)](_0x23ddda),_0xf8e6d4(()=>this[_0x4fced5(0x10e)][_0x4fced5(0xf3)](_0x23ddda));}[_0xcd3c43(0x13b)](_0x152480){const _0x2a710b=_0xcd3c43;return this[_0x2a710b(0x164)][_0x2a710b(0x10a)](_0x152480);}[_0xcd3c43(0x170)](_0x286563){const _0x1af0ab=_0xcd3c43;return Array[_0x1af0ab(0xff)](this[_0x1af0ab(0x10e)])[_0x1af0ab(0xfc)](_0x162266=>_0x162266(_0x286563));}};function W(_0x40771d,_0x104f5f){return function(_0x1532f5,_0x40affd){_0x104f5f(_0x1532f5,_0x40affd,_0x40771d);};}function _0x4350(){const _0x46ecb9=['3215368BdljUd','LIVESHARE_REQUEST_HOST','LIVESHARE_TERMINATE','_handleOffline','UNIVER_UNKNOWN','Present\x20this\x20document','_injector','4640RwMrgG','get','_fetchOperations','_status','text','NEW_CHANGESETS','includes','_stopFollowing','constructor','univer-mb-3\x20univer-w-full\x20univer-text-sm','registerComponent','delete','iterator','presenting','presenter','FOLLOWING','length','getLiveShareCoordinatorSync','defineProperty','dispose$','map','SAME_OPERATION_SHARE_INTERVAL','status$','from','_presenter','sheet','721190pMwIgv','params','getUnitId','default','Start','startFollowing','getOwnPropertyDescriptor','init','has','requireSession','find','set','_reporters','live-share.config','idle','_entities','forEach','_univerInstanceService','clear','LIVESHARE_FETCH_OPERATIONS','values','Start\x20following','following','call','override','2410068ZLBEGh','not-following','div','pluginName','unit','_status$','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','button','_handleTerminate','end','executeCommand','_unitID','toPrimitive','tryStartPresenting','_mountLiveShare','_handleNewHost','_handleNewChangeSets','object','send','_startPresenting','event$','_startLiveShareCoordinator','IDLE','1137FWdZQH','mutations','string','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_uiPartsService','unitId','1893220EbDJIF','OPERATION','version','shouldShareOperation','next','OFFLINE','Stop\x20presenting','LIVESHARE_OPERATION','_handleOnline','getLiveShareCoordinator','getCurrentTypeOfUnit$','dispose','onCommandExecuted','537041rnxhUB','_configService','@univerjs-pro/live-share','stopPresenting','_collabSessionService','You\x27re\x20presenting\x20the\x20document','disposeWithMe','getTypeOfUnitDisposed$','subject','getMemberID','UNIVER_LIVE_SHARE_PLUGIN','397890TLXqoa','reverse','_liveShareService','_stopPresenting','getStatus','asObservable','data','offline','1.0.0-alpha.7','registerSharedOperation','getTypeOfUnitAdded$','decorate','subscribe','pipe','_commandDisposable','_commandService','onRendered','_init','_handleOperation','LIVESHARE_NEW_HOST','_sharedOperations','sessionStatus$','HEADER_MENU','stringify','You\x27are\x20offline.','symbol','_startFollowing','packageName','You\x27re\x20not\x20following\x20the\x20presenter','add','_config','ONLINE','getInitialStates','Stop\x20following','_collabSession','UNIVER_SHEET','stopFollowing'];_0x4350=function(){return _0x46ecb9;};return _0x4350();}function G(_0x44d994,_0x4e4905,_0x260325,_0x1e3fd6){const _0x340b73=_0xcd3c43;var _0x5a0c03=arguments['length'],_0xcb171e=_0x5a0c03<0x3?_0x4e4905:_0x1e3fd6===null?_0x1e3fd6=Object[_0x340b73(0x108)](_0x4e4905,_0x260325):_0x1e3fd6,_0x230b64;if(typeof Reflect==_0x340b73(0x12c)&&typeof Reflect[_0x340b73(0x15b)]=='function')_0xcb171e=Reflect[_0x340b73(0x15b)](_0x44d994,_0x4e4905,_0x260325,_0x1e3fd6);else{for(var _0xd913b=_0x44d994[_0x340b73(0xf8)]-0x1;_0xd913b>=0x0;_0xd913b--)(_0x230b64=_0x44d994[_0xd913b])&&(_0xcb171e=(_0x5a0c03<0x3?_0x230b64(_0xcb171e):_0x5a0c03>0x3?_0x230b64(_0x4e4905,_0x260325,_0xcb171e):_0x230b64(_0x4e4905,_0x260325))||_0xcb171e);}return _0x5a0c03>0x3&&_0xcb171e&&Object['defineProperty'](_0x4e4905,_0x260325,_0xcb171e),_0xcb171e;}let K=class extends _0x1a82c3{constructor(_0x66f1cd,_0x6a38c6,_0x4507c5){const _0x11f408=_0xcd3c43;super(),this[_0x11f408(0x113)]=_0x66f1cd,this[_0x11f408(0x17b)]=_0x6a38c6,this[_0x11f408(0x149)]=_0x4507c5,H(this,_0x11f408(0x111),new Map()),this[_0x11f408(0x161)]();}async['getLiveShareCoordinator'](_0x9ec3df){const _0x40bba8=_0xcd3c43;return this[_0x40bba8(0x111)][_0x40bba8(0x10a)](_0x9ec3df)||await this[_0x40bba8(0x130)](_0x9ec3df),this[_0x40bba8(0x111)]['get'](_0x9ec3df);}[_0xcd3c43(0xf9)](_0x1b69ca){const _0x2a7f29=_0xcd3c43;var _0x35d8d8;return(_0x35d8d8=this[_0x2a7f29(0x111)][_0x2a7f29(0x17d)](_0x1b69ca))==null?null:_0x35d8d8;}[_0xcd3c43(0x161)](){const _0x394fc1=_0xcd3c43;this[_0x394fc1(0x113)][_0x394fc1(0x15a)](_0x3f510f[_0x394fc1(0x173)])[_0x394fc1(0x15d)](_0x223cee(this[_0x394fc1(0xfb)]))[_0x394fc1(0x15c)](async _0x1b0875=>{const _0x40f879=_0x394fc1;let _0x2ee398=_0x1b0875[_0x40f879(0x11f)]['getUnitId']();this[_0x40f879(0x111)][_0x40f879(0x10a)](_0x2ee398)||this[_0x40f879(0x130)](_0x2ee398);}),this[_0x394fc1(0x113)][_0x394fc1(0x14c)](_0x3f510f[_0x394fc1(0x173)])['pipe'](_0x223cee(this[_0x394fc1(0xfb)]))[_0x394fc1(0x15c)](_0x18ffae=>{const _0x4c87d1=_0x394fc1;let _0x38847e=_0x18ffae[_0x4c87d1(0x104)](),_0x113e2f=this[_0x4c87d1(0x111)][_0x4c87d1(0x17d)](_0x38847e);_0x113e2f==null||_0x113e2f[_0x4c87d1(0x143)]();});}async['_startLiveShareCoordinator'](_0x535cf4){const _0x4ddb46=_0xcd3c43;let _0x322371=await this[_0x4ddb46(0x149)][_0x4ddb46(0x10b)](_0x535cf4),_0x5bef85=this[_0x4ddb46(0x17b)]['createInstance'](J,_0x535cf4,_0x322371);return _0x5bef85[_0x4ddb46(0x109)](),this[_0x4ddb46(0x111)][_0x4ddb46(0x10d)](_0x535cf4,_0x5bef85),_0x5bef85;}};K=G([W(0x0,_0x5ab737),W(0x1,_0x130c38(_0x189051)),W(0x2,_0x130c38(_0x598ce3))],K);let q=function(_0x10d8b1){const _0x347c62=_0xcd3c43;return _0x10d8b1[_0x347c62(0x13d)]=_0x347c62(0x157),_0x10d8b1[_0x347c62(0x131)]=_0x347c62(0x110),_0x10d8b1[_0x347c62(0xf7)]=_0x347c62(0x118),_0x10d8b1['NOT_FOLLOWING']=_0x347c62(0x11c),_0x10d8b1['PRESENTING']=_0x347c62(0xf5),_0x10d8b1;}({}),J=class extends _0x1a82c3{get[_0xcd3c43(0x17f)](){const _0x256e13=_0xcd3c43;return this[_0x256e13(0x120)]['getValue']();}constructor(_0x280c2a,_0x2a261b,_0x486466,_0x4b72c5,_0x56b6d7){const _0x57336e=_0xcd3c43;super(),this['_unitID']=_0x280c2a,this[_0x57336e(0x172)]=_0x2a261b,this[_0x57336e(0x146)]=_0x486466,this[_0x57336e(0x152)]=_0x4b72c5,this[_0x57336e(0x15f)]=_0x56b6d7,H(this,_0x57336e(0x120),new _0x23f9ae('idle')),H(this,_0x57336e(0xfe),this['_status$'][_0x57336e(0x155)]()),H(this,_0x57336e(0x161),!0x1),H(this,_0x57336e(0x15e),null),H(this,_0x57336e(0x100),null);}[_0xcd3c43(0x143)](){const _0x9fbe8e=_0xcd3c43;var _0x4bcc83;(_0x4bcc83=this[_0x9fbe8e(0x15e)])==null||_0x4bcc83['dispose'](),this[_0x9fbe8e(0x120)][_0x9fbe8e(0x13c)](_0x9fbe8e(0x110)),this[_0x9fbe8e(0x120)]['complete']();}[_0xcd3c43(0x154)](){const _0x2a541f=_0xcd3c43;return this[_0x2a541f(0x17f)];}['init'](){const _0x55f9e8=_0xcd3c43;this['_init']||(this[_0x55f9e8(0x161)]=!0x0,this[_0x55f9e8(0x172)][_0x55f9e8(0x165)]['pipe'](_0x223cee(this['dispose$']))[_0x55f9e8(0x15c)](_0x344196=>{const _0x598087=_0x55f9e8;switch(_0x344196){case _0x4d69f8[_0x598087(0x13d)]:this[_0x598087(0x178)]();break;case _0x4d69f8[_0x598087(0x16f)]:this[_0x598087(0x140)]();break;default:}}),this[_0x55f9e8(0x172)][_0x55f9e8(0x12f)][_0x55f9e8(0x15d)](_0x223cee(this[_0x55f9e8(0xfb)]))['subscribe'](_0x2a721a=>{const _0x316b55=_0x55f9e8;let {eventID:_0x57ce27}=_0x2a721a;switch(_0x57ce27){case _0x3756a6[_0x316b55(0x163)]:this[_0x316b55(0x12a)](_0x2a721a);break;case _0x3756a6['LIVESHARE_OPERATION']:this[_0x316b55(0x162)](_0x2a721a);break;case _0x3756a6[_0x316b55(0x177)]:this[_0x316b55(0x123)]();break;case _0x3756a6[_0x316b55(0xed)]:this[_0x316b55(0x12b)](_0x2a721a);break;default:}}));}[_0xcd3c43(0x128)](){const _0x8f65c9=_0xcd3c43;this[_0x8f65c9(0x172)][_0x8f65c9(0x12d)]({'eventID':_0x3756a6[_0x8f65c9(0x176)],'data':{'unitID':this['_unitID'],'userID':this[_0x8f65c9(0x172)]['getMemberID']()}},this['_unitID']);}['stopPresenting'](){const _0x8e4143=_0xcd3c43;this[_0x8e4143(0x17f)]==='presenting'&&(this[_0x8e4143(0x120)]['next']('idle'),this[_0x8e4143(0x172)][_0x8e4143(0x12d)]({'eventID':_0x3756a6[_0x8e4143(0x177)],'data':{'unitID':this[_0x8e4143(0x126)]}},this[_0x8e4143(0x126)]));}['startFollowing'](){const _0xe93ada=_0xcd3c43;this[_0xe93ada(0x17f)]===_0xe93ada(0x11c)&&(this[_0xe93ada(0x120)][_0xe93ada(0x13c)](_0xe93ada(0x118)),this[_0xe93ada(0x16a)]());}[_0xcd3c43(0x174)](){const _0x221bbd=_0xcd3c43;this[_0x221bbd(0x17f)]===_0x221bbd(0x118)&&this[_0x221bbd(0xef)]();}[_0xcd3c43(0x12a)](_0x1fecb4){const _0x1caadb=_0xcd3c43;let {presenter:_0x283db7}=_0x1fecb4[_0x1caadb(0x156)],_0x47fa87=this[_0x1caadb(0x172)][_0x1caadb(0x14e)]();this[_0x1caadb(0x100)]=_0x283db7,_0x283db7===_0x47fa87?(this[_0x1caadb(0xef)](),this['_startPresenting']()):this['_status']!==_0x1caadb(0x11c)&&(this[_0x1caadb(0x153)](),this[_0x1caadb(0x16a)]());}[_0xcd3c43(0x17e)](){const _0x1d0532=_0xcd3c43;let _0x11c7a4={'eventID':_0x3756a6[_0x1d0532(0x115)]};this[_0x1d0532(0x172)][_0x1d0532(0x12d)](_0x11c7a4,this[_0x1d0532(0x126)]);}[_0xcd3c43(0x123)](){const _0x5cee8f=_0xcd3c43;this[_0x5cee8f(0x100)]=null,this[_0x5cee8f(0x17f)]!=='presenting'&&this['_beIdle']();}[_0xcd3c43(0x12b)](_0x2a1f61){const _0x221cc7=_0xcd3c43;if(this['_status']===_0x221cc7(0x118)&&this[_0x221cc7(0x100)]===_0x2a1f61[_0x221cc7(0x156)]['memberID']){let _0x92cfcb=_0x540c5a(_0x2a1f61[_0x221cc7(0x156)])[_0x221cc7(0x133)][_0x221cc7(0x151)]()[_0x221cc7(0x10c)](_0xb0e452=>_0xb0e452['id']===_0x39f5b2['id']);if(_0x92cfcb){let _0x436335=_0x92cfcb[_0x221cc7(0x103)][_0x221cc7(0x137)],_0xaea137=_0x92cfcb[_0x221cc7(0x103)][_0x221cc7(0x101)]['id'];setTimeout(()=>{const _0x2cc575=_0x221cc7;this['_commandService'][_0x2cc575(0x125)](_0x2b0483['id'],{'unitId':_0x436335,'subUnitId':_0xaea137},{'fromCollab':!0x0});});}}}[_0xcd3c43(0x12e)](){const _0x3be677=_0xcd3c43;var _0x417769;(_0x417769=this[_0x3be677(0x15e)])==null||_0x417769[_0x3be677(0x143)](),this['_status$'][_0x3be677(0x13c)](_0x3be677(0xf5));let _0x523766=new Map(),_0x23660d=this[_0x3be677(0x15e)]=new _0x1d1071();_0x23660d[_0x3be677(0x16d)](_0xf8e6d4(()=>{const _0x49b5f5=_0x3be677;_0x523766['forEach'](({subject:_0x1362f0,subscription:_0x2d6066})=>{_0x2d6066['unsubscribe'](),_0x1362f0['complete']();}),_0x523766[_0x49b5f5(0x114)]();})),_0x23660d[_0x3be677(0x16d)](this[_0x3be677(0x15f)][_0x3be677(0x144)](_0x1aca2d=>{const _0x11d1a2=_0x3be677;if(_0x1aca2d['type']!==_0x370a98[_0x11d1a2(0x139)]||!this[_0x11d1a2(0x152)][_0x11d1a2(0x13b)](_0x1aca2d['id']))return;let {id:_0x3e96b3}=_0x1aca2d,_0x326ef8;if(_0x523766[_0x11d1a2(0x10a)](_0x3e96b3))_0x326ef8=_0x523766['get'](_0x3e96b3)[_0x11d1a2(0x14d)];else{var _0x52630d;_0x326ef8=new _0x20c350();let _0x3e948d=_0x326ef8['pipe'](_0x364328((_0x52630d=this[_0x11d1a2(0x146)]['getConfig'](_0x11d1a2(0xfd)))==null?0xc8:_0x52630d,void 0x0,{'trailing':!0x0,'leading':!0x0}))['subscribe'](_0x50a8ed=>{const _0x54a2ce=_0x11d1a2;this[_0x54a2ce(0x172)][_0x54a2ce(0x12d)]({'eventID':_0x3756a6[_0x54a2ce(0x13f)],'data':{'unitID':this['_unitID'],'operations':{[_0x50a8ed['id']]:{'id':_0x50a8ed['id'],'params':JSON[_0x54a2ce(0x167)](_0x50a8ed[_0x54a2ce(0x103)])}}}},this[_0x54a2ce(0x126)]);});_0x523766[_0x11d1a2(0x10d)](_0x3e96b3,{'subject':_0x326ef8,'subscription':_0x3e948d});}_0x326ef8[_0x11d1a2(0x13c)](_0x1aca2d);})),this[_0x3be677(0x152)][_0x3be677(0x170)](this['_unitID'])[_0x3be677(0x112)](_0x4af641=>this[_0x3be677(0x172)][_0x3be677(0x12d)]({'eventID':_0x3756a6[_0x3be677(0x13f)],'data':{'unitID':this[_0x3be677(0x126)],'operations':{[_0x4af641['id']]:{'id':_0x4af641['id'],'params':JSON['stringify'](_0x4af641['params'])}}}},this['_unitID']));}[_0xcd3c43(0x153)](){const _0x4d0e91=_0xcd3c43;var _0x4dba2d;this[_0x4d0e91(0x120)]['next'](_0x4d0e91(0x110)),(_0x4dba2d=this[_0x4d0e91(0x15e)])==null||_0x4dba2d[_0x4d0e91(0x143)](),this[_0x4d0e91(0x15e)]=null;}[_0xcd3c43(0x16a)](){const _0x518d3f=_0xcd3c43;var _0x352e0d;(_0x352e0d=this[_0x518d3f(0x15e)])==null||_0x352e0d['dispose'](),this[_0x518d3f(0x120)]['next']('following');}['_beIdle'](){const _0x5775b2=_0xcd3c43;var _0xf43165;this[_0x5775b2(0x120)][_0x5775b2(0x13c)](_0x5775b2(0x110)),(_0xf43165=this['_commandDisposable'])==null||_0xf43165[_0x5775b2(0x143)](),this['_commandDisposable']=null;}[_0xcd3c43(0xef)](){const _0x462fff=_0xcd3c43;var _0x151384;this[_0x462fff(0x120)]['next']('not-following'),(_0x151384=this[_0x462fff(0x15e)])==null||_0x151384[_0x462fff(0x143)]();}[_0xcd3c43(0x162)](_0x2f255a){const _0x395078=_0xcd3c43;if(['presenting',_0x395078(0x11c),'offline'][_0x395078(0xee)](this['_status'])||!_0x2f255a[_0x395078(0x156)]['presenter']||_0x2f255a[_0x395078(0x156)][_0x395078(0xf6)]===this[_0x395078(0x172)][_0x395078(0x14e)]())return;this['_status']===_0x395078(0x110)&&this[_0x395078(0x16a)]();let _0xaecd78=_0x2f255a['data']['operations'];Object[_0x395078(0x116)](_0xaecd78)['forEach'](_0x39ce5f=>{const _0xbd19df=_0x395078;this['_commandService'][_0xbd19df(0x125)](_0x39ce5f['id'],_0x39ce5f[_0xbd19df(0x103)]?JSON['parse'](_0x39ce5f['params']):null,{'fromCollab':!0x0});});}[_0xcd3c43(0x178)](){const _0x1d09c2=_0xcd3c43;var _0x23918f;this[_0x1d09c2(0x120)]['next']('offline'),(_0x23918f=this['_commandDisposable'])==null||_0x23918f['dispose']();}['_handleOnline'](){const _0x4d9e2c=_0xcd3c43;this[_0x4d9e2c(0x120)][_0x4d9e2c(0x13c)](_0x4d9e2c(0x110)),this['_fetchOperations']();}};J=G([W(0x2,_0x13ab7e),W(0x3,_0x130c38(U)),W(0x4,_0x2aa954)],J);var se=_0xcd3c43(0x147),ce=_0xcd3c43(0x158);const Y={};let X=class extends _0x3d4065{constructor(_0x18262a){super(),this['_liveShareService']=_0x18262a,this['_init']();}[_0xcd3c43(0x161)](){const _0x3f6ab9=_0xcd3c43;[_0x4bc340['id'],_0x5ae29f['id'],_0x2b0483['id']][_0x3f6ab9(0x112)](_0x12ec93=>{const _0x406c78=_0x3f6ab9;this['disposeWithMe'](this[_0x406c78(0x152)][_0x406c78(0x159)](_0x12ec93));});}};X=G([W(0x0,_0x130c38(U))],X);function Z(){const _0x2168b4=_0xcd3c43;let _0x2a469e=_0x361196(K),_0x367e57=_0x361196(_0x5ab737),_0x233cf3=_0x313630(()=>_0x367e57[_0x2168b4(0x142)](_0x3f510f[_0x2168b4(0x173)]),void 0x0,!0x1,[]),_0x5a285b=_0x313630(_0x1c5235(()=>_0x233cf3?_0x4386d9(()=>_0xa7f912(_0x2a469e[_0x2168b4(0x141)](_0x233cf3[_0x2168b4(0x104)]()))):_0x363ac9(null),[_0x233cf3,_0x2a469e]),null),_0x25f125=_0x313630(_0x5a285b?()=>_0x5a285b[_0x2168b4(0xfe)]:null,_0x2168b4(0x110),!0x1,[_0x5a285b]);return _0x5a285b?_0x76736e(_0x5f2dd7,{'align':_0x2168b4(0x124),'disabled':_0x25f125===_0x2168b4(0x157),'className':_0x2168b4(0x121),'overlay':_0x76736e(le,{'status':_0x25f125,'coordinator':_0x5a285b}),'children':_0x76736e(_0x2168b4(0x122),{'className':_0x1b4e86('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x25f125==='offline','univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x25f125!=='offline'}),'type':_0x2168b4(0x122),'children':_0x76736e(_0xbe8107,{})})}):null;}function le(_0x36d926){const _0x3fad99=_0xcd3c43;let {status:_0x3aaa5c,coordinator:_0xd13d33}=_0x36d926;switch(_0x3aaa5c){case _0x3fad99(0x110):return _0x76736e(ue,{'coordinator':_0xd13d33});case _0x3fad99(0x118):return _0x76736e(de,{'coordinator':_0xd13d33});case _0x3fad99(0x11c):return _0x76736e(fe,{'coordinator':_0xd13d33});case'offline':return _0x76736e(me,{});case _0x3fad99(0xf5):return _0x76736e(pe,{'coordinator':_0xd13d33});default:return null;}}function ue(_0x4fda22){const _0x55e02e=_0xcd3c43;let {coordinator:_0x153247}=_0x4fda22;return _0x46d651(_0x114c30,{'children':[_0x76736e(_0x55e02e(0x11d),{'className':_0x55e02e(0xf1),'children':_0x55e02e(0x17a)}),_0x76736e(_0x5b7c15,{'onClick':()=>_0x153247[_0x55e02e(0x128)](),'children':_0x55e02e(0x106)})]});}function de(_0x53ca40){const _0x93e357=_0xcd3c43;let {coordinator:_0x314952}=_0x53ca40;return _0x46d651(_0x114c30,{'children':[_0x76736e(_0x93e357(0x11d),{'className':_0x93e357(0xf1),'children':'You\x27re\x20following\x20the\x20presenter'}),_0x76736e(_0x5b7c15,{'onClick':()=>_0x314952[_0x93e357(0x174)](),'children':_0x93e357(0x171)})]});}function fe(_0xaacac){const _0x5c4abf=_0xcd3c43;let {coordinator:_0x20c65f}=_0xaacac;return _0x46d651(_0x114c30,{'children':[_0x76736e('div',{'className':_0x5c4abf(0xf1),'children':_0x5c4abf(0x16c)}),_0x76736e(_0x5b7c15,{'variant':_0x5c4abf(0x180),'onClick':()=>_0x20c65f[_0x5c4abf(0x107)](),'children':_0x5c4abf(0x117)})]});}function pe(_0x1a4fb9){const _0x40d5f2=_0xcd3c43;let {coordinator:_0x50eac3}=_0x1a4fb9;return _0x46d651(_0x114c30,{'children':[_0x76736e(_0x40d5f2(0x11d),{'className':_0x40d5f2(0xf1),'children':_0x40d5f2(0x14a)}),_0x76736e(_0x5b7c15,{'variant':_0x40d5f2(0x105),'onClick':()=>_0x50eac3[_0x40d5f2(0x148)](),'children':_0x40d5f2(0x13e)})]});}function me(){const _0x237681=_0xcd3c43;return _0x76736e(_0x114c30,{'children':_0x237681(0x168)});}let Q=class extends _0x3d4065{constructor(_0x433b6c,_0xfbdfa8){const _0x875ae1=_0xcd3c43;super(),this['_injector']=_0x433b6c,this[_0x875ae1(0x136)]=_0xfbdfa8,this[_0x875ae1(0x129)]();}[_0xcd3c43(0x129)](){const _0x7dca9a=_0xcd3c43;this[_0x7dca9a(0x14b)](this[_0x7dca9a(0x136)][_0x7dca9a(0xf2)](_0x72c6df[_0x7dca9a(0x166)],()=>_0x33a9bb(Z,this[_0x7dca9a(0x17b)])));}};Q=G([W(0x0,_0x130c38(_0x189051)),W(0x1,_0x3d33a9)],Q);let $=class extends _0x5f36ae{constructor(_0x2e3f2f=Y,_0x28d45f,_0xd601ed){const _0x3760f0=_0xcd3c43;super(),this['_config']=_0x2e3f2f,this[_0x3760f0(0x17b)]=_0x28d45f,this[_0x3760f0(0x146)]=_0xd601ed;let {..._0xa29e9b}=_0x3df356({},Y,this[_0x3760f0(0x16e)]);this[_0x3760f0(0x146)]['setConfig'](_0x3760f0(0x10f),_0xa29e9b);}['onStarting'](){const _0x20903a=_0xcd3c43;_0x24986b(this['_injector'],_0x1f0e7f([[U],[K],[X],[Q]],this[_0x20903a(0x16e)][_0x20903a(0x11a)])),_0x1c595d(this[_0x20903a(0x17b)],[[X]]);}[_0xcd3c43(0x160)](){_0x1c595d(this['_injector'],[[Q]]);}};H($,'type',_0x3f510f[_0xcd3c43(0x179)]),H($,_0xcd3c43(0x11e),_0xcd3c43(0x14f)),H($,_0xcd3c43(0x16b),se),H($,_0xcd3c43(0x13a),ce),$=G([_0x3f835d(_0x337bb8),W(0x1,_0x130c38(_0x189051)),W(0x2,_0x13ab7e)],$);export{K as LiveShareController,q as LiveShareStatus,$ as UniverLiveSharePlugin};
|
|
1
|
+
const _0xcca918=_0x47e8;(function(_0x495eff,_0x4ce051){const _0x5d1e94=_0x47e8,_0x302c11=_0x495eff();while(!![]){try{const _0x1b073e=-parseInt(_0x5d1e94(0x208))/0x1*(-parseInt(_0x5d1e94(0x21a))/0x2)+-parseInt(_0x5d1e94(0x25f))/0x3+-parseInt(_0x5d1e94(0x228))/0x4+-parseInt(_0x5d1e94(0x1fb))/0x5+parseInt(_0x5d1e94(0x202))/0x6*(-parseInt(_0x5d1e94(0x1ea))/0x7)+-parseInt(_0x5d1e94(0x26f))/0x8+parseInt(_0x5d1e94(0x266))/0x9;if(_0x1b073e===_0x4ce051)break;else _0x302c11['push'](_0x302c11['shift']());}catch(_0x2172fd){_0x302c11['push'](_0x302c11['shift']());}}}(_0x1ae4,0xea17e));import{CollaborationEvent as _0x243177,parseProtocolChangeset as _0x317e07}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x19a9a0,SessionStatus as _0x1e4627,UniverCollaborationClientPlugin as _0xf25c4}from'@univerjs-pro/collaboration-client';import{CommandType as _0x1a009d,DependentOn as _0x35fd8d,Disposable as _0x5dda2c,DisposableCollection as _0x14d1cb,ICommandService as _0x2d1332,IConfigService as _0xe57a24,IUniverInstanceService as _0x5837d7,Inject as _0x3d3509,Injector as _0x3e0c27,Plugin as _0x1d3090,RxDisposable as _0x250ec8,UniverInstanceType as _0x146ed0,merge as _0x3bddf0,mergeOverrideWithDependencies as _0x1e951f,registerDependencies as _0xc05a66,toDisposable as _0x4dbbbb,touchDependencies as _0x41f06e}from'@univerjs/core';import{InsertSheetMutation as _0x28a0f6,SetWorksheetActiveOperation as _0x442d78}from'@univerjs/sheets';function _0x47e8(_0x16fa23,_0x2047f8){_0x16fa23=_0x16fa23-0x1df;const _0x1ae4ba=_0x1ae4();let _0x47e838=_0x1ae4ba[_0x16fa23];return _0x47e838;}import{BehaviorSubject as _0x191e68,Subject as _0x3d99f6,defer as _0x4c642,from as _0x4e42e5,of as _0x4333}from'rxjs';import{takeUntil as _0x5980d1,throttleTime as _0x1efc60}from'rxjs/operators';import{UniverLicensePlugin as _0x20c31b}from'@univerjs-pro/license';import{BuiltInUIPart as _0x3fad02,IUIPartsService as _0xce0b1f,UniverUIPlugin as _0x2b3cfa,connectInjector as _0x3c9d65,useDependency as _0x241be1,useObservable as _0x3fdd10}from'@univerjs/ui';import{SetScrollOperation as _0x454eaf,SetZoomRatioOperation as _0x937e41}from'@univerjs/sheets-ui';import{Button as _0x9cbbcc,Dropdown as _0x490e00,clsx as _0x4649fc}from'@univerjs/design';import{LiveShareIcon as _0x236657}from'@univerjs/icons';import{useMemo as _0x50e667}from'react';import{Fragment as _0x59eb51,jsx as _0x3021bb,jsxs as _0x15b75d}from'react/jsx-runtime';function B(_0x4f94c8){'@babel/helpers - typeof';const _0x57da11=_0x47e8;return B=typeof Symbol==_0x57da11(0x242)&&typeof Symbol['iterator']==_0x57da11(0x1e0)?function(_0x4b9156){return typeof _0x4b9156;}:function(_0x1f8856){const _0x30a7e8=_0x57da11;return _0x1f8856&&typeof Symbol==_0x30a7e8(0x242)&&_0x1f8856[_0x30a7e8(0x245)]===Symbol&&_0x1f8856!==Symbol[_0x30a7e8(0x207)]?_0x30a7e8(0x1e0):typeof _0x1f8856;},B(_0x4f94c8);}function V(_0x5e039a,_0x15f2d4){const _0x43a82e=_0x47e8;if(B(_0x5e039a)!=_0x43a82e(0x255)||!_0x5e039a)return _0x5e039a;var _0x5ce890=_0x5e039a[Symbol['toPrimitive']];if(_0x5ce890!==void 0x0){var _0x38cf97=_0x5ce890[_0x43a82e(0x21e)](_0x5e039a,_0x15f2d4||_0x43a82e(0x1f4));if(B(_0x38cf97)!=_0x43a82e(0x255))return _0x38cf97;throw TypeError(_0x43a82e(0x1ff));}return(_0x15f2d4===_0x43a82e(0x258)?String:Number)(_0x5e039a);}function H(_0x1f1a4d){const _0x23a257=_0x47e8;var _0x174445=V(_0x1f1a4d,_0x23a257(0x258));return B(_0x174445)==_0x23a257(0x1e0)?_0x174445:_0x174445+'';}function U(_0x310f6f,_0x5965ae,_0x268f70){return(_0x5965ae=H(_0x5965ae))in _0x310f6f?Object['defineProperty'](_0x310f6f,_0x5965ae,{'value':_0x268f70,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x310f6f[_0x5965ae]=_0x268f70,_0x310f6f;}var W=class extends _0x5dda2c{constructor(..._0x275603){const _0x19fb08=_0x47e8;super(..._0x275603),U(this,_0x19fb08(0x1e1),new Set()),U(this,_0x19fb08(0x201),new Set());}['registerSharedOperation'](_0x1e355b){const _0x446698=_0x47e8;return this[_0x446698(0x1e1)]['add'](_0x1e355b),_0x4dbbbb(()=>this[_0x446698(0x1e1)][_0x446698(0x1ef)](_0x1e355b));}['registerInitialStateReporter'](_0x250b8a){const _0xcd88c3=_0x47e8;return this[_0xcd88c3(0x201)][_0xcd88c3(0x251)](_0x250b8a),_0x4dbbbb(()=>this[_0xcd88c3(0x201)][_0xcd88c3(0x1ef)](_0x250b8a));}[_0xcca918(0x244)](_0x2feb8f){const _0x5988d0=_0xcca918;return this[_0x5988d0(0x1e1)][_0x5988d0(0x26d)](_0x2feb8f);}[_0xcca918(0x1f0)](_0x13315f){const _0x53f9c1=_0xcca918;return Array[_0x53f9c1(0x268)](this[_0x53f9c1(0x201)])[_0x53f9c1(0x1f8)](_0x527422=>_0x527422(_0x13315f));}};function G(_0x5f4af5,_0x5d1427){return function(_0x1c2ed7,_0x40b502){_0x5d1427(_0x1c2ed7,_0x40b502,_0x5f4af5);};}function K(_0x477c10,_0x1da7e1,_0x24e77d,_0x3b88db){const _0x382b64=_0xcca918;var _0xb52002=arguments[_0x382b64(0x206)],_0x4236b7=_0xb52002<0x3?_0x1da7e1:_0x3b88db===null?_0x3b88db=Object[_0x382b64(0x248)](_0x1da7e1,_0x24e77d):_0x3b88db,_0x52e5f8;if(typeof Reflect==_0x382b64(0x255)&&typeof Reflect[_0x382b64(0x1e7)]==_0x382b64(0x242))_0x4236b7=Reflect['decorate'](_0x477c10,_0x1da7e1,_0x24e77d,_0x3b88db);else{for(var _0x385162=_0x477c10['length']-0x1;_0x385162>=0x0;_0x385162--)(_0x52e5f8=_0x477c10[_0x385162])&&(_0x4236b7=(_0xb52002<0x3?_0x52e5f8(_0x4236b7):_0xb52002>0x3?_0x52e5f8(_0x1da7e1,_0x24e77d,_0x4236b7):_0x52e5f8(_0x1da7e1,_0x24e77d))||_0x4236b7);}return _0xb52002>0x3&&_0x4236b7&&Object[_0x382b64(0x267)](_0x1da7e1,_0x24e77d,_0x4236b7),_0x4236b7;}let q=class extends _0x250ec8{constructor(_0x464c35,_0x422bcb,_0x3371e7){const _0x3d4bc9=_0xcca918;super(),this[_0x3d4bc9(0x1fa)]=_0x464c35,this['_injector']=_0x422bcb,this['_collabSessionService']=_0x3371e7,U(this,'_entities',new Map()),this[_0x3d4bc9(0x241)]();}async[_0xcca918(0x227)](_0x223bf3){const _0x1dd2df=_0xcca918;return this[_0x1dd2df(0x261)]['has'](_0x223bf3)||await this[_0x1dd2df(0x22b)](_0x223bf3),this['_entities'][_0x1dd2df(0x1eb)](_0x223bf3);}[_0xcca918(0x257)](_0x5e6438){const _0x5613bb=_0xcca918;var _0xa712ce;return(_0xa712ce=this[_0x5613bb(0x261)][_0x5613bb(0x1eb)](_0x5e6438))==null?null:_0xa712ce;}[_0xcca918(0x241)](){const _0x573457=_0xcca918;this[_0x573457(0x1fa)][_0x573457(0x249)](_0x146ed0['UNIVER_SHEET'])[_0x573457(0x23a)](_0x5980d1(this[_0x573457(0x20c)]))[_0x573457(0x239)](async _0x290b67=>{const _0x555306=_0x573457;let _0x51f651=_0x290b67[_0x555306(0x24b)][_0x555306(0x1df)]();this[_0x555306(0x261)]['has'](_0x51f651)||this[_0x555306(0x22b)](_0x51f651);}),this['_univerInstanceService'][_0x573457(0x1f2)](_0x146ed0[_0x573457(0x219)])[_0x573457(0x23a)](_0x5980d1(this[_0x573457(0x20c)]))[_0x573457(0x239)](_0x3115b2=>{const _0x1a46d6=_0x573457;let _0x2da8ea=_0x3115b2[_0x1a46d6(0x1df)](),_0x4c4cd5=this[_0x1a46d6(0x261)]['get'](_0x2da8ea);_0x4c4cd5==null||_0x4c4cd5[_0x1a46d6(0x1e2)]();});}async[_0xcca918(0x22b)](_0x5049c5){const _0x30a80f=_0xcca918;let _0x39f8cb=await this[_0x30a80f(0x252)][_0x30a80f(0x23e)](_0x5049c5),_0x3d788d=this[_0x30a80f(0x263)]['createInstance'](J,_0x5049c5,_0x39f8cb);return _0x3d788d[_0x30a80f(0x209)](),this[_0x30a80f(0x261)]['set'](_0x5049c5,_0x3d788d),_0x3d788d;}};q=K([G(0x0,_0x5837d7),G(0x1,_0x3d3509(_0x3e0c27)),G(0x2,_0x3d3509(_0x19a9a0))],q);let ce=function(_0x54aff2){const _0x476a40=_0xcca918;return _0x54aff2[_0x476a40(0x20f)]=_0x476a40(0x1e4),_0x54aff2[_0x476a40(0x210)]=_0x476a40(0x1e3),_0x54aff2[_0x476a40(0x200)]=_0x476a40(0x1e6),_0x54aff2[_0x476a40(0x20e)]='not-following',_0x54aff2[_0x476a40(0x22c)]=_0x476a40(0x1ee),_0x54aff2;}({}),J=class extends _0x250ec8{get[_0xcca918(0x222)](){const _0x3ec18e=_0xcca918;return this[_0x3ec18e(0x25e)]['getValue']();}constructor(_0x3825dd,_0x498c7e,_0x23aae0,_0x50d196,_0x12a41d){const _0x23300a=_0xcca918;super(),this[_0x23300a(0x246)]=_0x3825dd,this[_0x23300a(0x232)]=_0x498c7e,this[_0x23300a(0x217)]=_0x23aae0,this[_0x23300a(0x24d)]=_0x50d196,this[_0x23300a(0x26b)]=_0x12a41d,U(this,_0x23300a(0x25e),new _0x191e68(_0x23300a(0x1e3))),U(this,_0x23300a(0x1ed),this[_0x23300a(0x25e)][_0x23300a(0x1e9)]()),U(this,_0x23300a(0x241),!0x1),U(this,'_commandDisposable',null),U(this,_0x23300a(0x1f7),null);}[_0xcca918(0x1e2)](){const _0x22817f=_0xcca918;var _0x545fec;(_0x545fec=this['_commandDisposable'])==null||_0x545fec['dispose'](),this[_0x22817f(0x25e)][_0x22817f(0x259)](_0x22817f(0x1e3)),this[_0x22817f(0x25e)][_0x22817f(0x25c)]();}['getStatus'](){const _0x34ab8d=_0xcca918;return this[_0x34ab8d(0x222)];}[_0xcca918(0x209)](){const _0x1ad7fc=_0xcca918;this[_0x1ad7fc(0x241)]||(this[_0x1ad7fc(0x241)]=!0x0,this['_collabSession'][_0x1ad7fc(0x215)]['pipe'](_0x5980d1(this[_0x1ad7fc(0x20c)]))[_0x1ad7fc(0x239)](_0x33e35c=>{const _0x968b3=_0x1ad7fc;switch(_0x33e35c){case _0x1e4627[_0x968b3(0x20f)]:this['_handleOffline']();break;case _0x1e4627[_0x968b3(0x226)]:this[_0x968b3(0x20d)]();break;default:}}),this[_0x1ad7fc(0x232)][_0x1ad7fc(0x218)][_0x1ad7fc(0x23a)](_0x5980d1(this['dispose$']))[_0x1ad7fc(0x239)](_0x1b7111=>{const _0x505c6a=_0x1ad7fc;let {eventID:_0x580155}=_0x1b7111;switch(_0x580155){case _0x243177[_0x505c6a(0x20b)]:this[_0x505c6a(0x220)](_0x1b7111);break;case _0x243177[_0x505c6a(0x1fc)]:this[_0x505c6a(0x205)](_0x1b7111);break;case _0x243177[_0x505c6a(0x23d)]:this[_0x505c6a(0x22f)]();break;case _0x243177[_0x505c6a(0x1f6)]:this[_0x505c6a(0x1fe)](_0x1b7111);break;default:}}));}[_0xcca918(0x22e)](){const _0x6bd7af=_0xcca918;this[_0x6bd7af(0x232)]['send']({'eventID':_0x243177[_0x6bd7af(0x1e5)],'data':{'unitID':this[_0x6bd7af(0x246)],'userID':this[_0x6bd7af(0x232)][_0x6bd7af(0x23f)]()}},this[_0x6bd7af(0x246)]);}['stopPresenting'](){const _0x3873c0=_0xcca918;this['_status']===_0x3873c0(0x1ee)&&(this[_0x3873c0(0x25e)][_0x3873c0(0x259)]('idle'),this[_0x3873c0(0x232)][_0x3873c0(0x243)]({'eventID':_0x243177[_0x3873c0(0x23d)],'data':{'unitID':this['_unitID']}},this[_0x3873c0(0x246)]));}['startFollowing'](){const _0x116680=_0xcca918;this[_0x116680(0x222)]===_0x116680(0x253)&&(this[_0x116680(0x25e)][_0x116680(0x259)]('following'),this[_0x116680(0x212)]());}[_0xcca918(0x21b)](){const _0x25f900=_0xcca918;this[_0x25f900(0x222)]===_0x25f900(0x1e6)&&this[_0x25f900(0x256)]();}[_0xcca918(0x220)](_0x4b063e){const _0x164c9d=_0xcca918;let {presenter:_0x3ac8f8}=_0x4b063e[_0x164c9d(0x24e)],_0xa1d6b8=this[_0x164c9d(0x232)][_0x164c9d(0x23f)]();this[_0x164c9d(0x1f7)]=_0x3ac8f8,_0x3ac8f8===_0xa1d6b8?(this[_0x164c9d(0x256)](),this[_0x164c9d(0x203)]()):this['_status']!==_0x164c9d(0x253)&&(this[_0x164c9d(0x23c)](),this[_0x164c9d(0x212)]());}[_0xcca918(0x230)](){const _0x3d941e=_0xcca918;let _0x50ea0a={'eventID':_0x243177[_0x3d941e(0x1fd)]};this['_collabSession'][_0x3d941e(0x243)](_0x50ea0a,this['_unitID']);}[_0xcca918(0x22f)](){const _0x37437e=_0xcca918;this[_0x37437e(0x1f7)]=null,this[_0x37437e(0x222)]!==_0x37437e(0x1ee)&&this[_0x37437e(0x216)]();}['_handleNewChangeSets'](_0x4cd96f){const _0x2b9c4a=_0xcca918;if(this[_0x2b9c4a(0x222)]==='following'&&this['_presenter']===_0x4cd96f[_0x2b9c4a(0x24e)][_0x2b9c4a(0x213)]){let _0x588c7c=_0x317e07(_0x4cd96f[_0x2b9c4a(0x24e)])[_0x2b9c4a(0x25b)][_0x2b9c4a(0x260)]()['find'](_0x19f54f=>_0x19f54f['id']===_0x28a0f6['id']);if(_0x588c7c){let _0x5327dd=_0x588c7c[_0x2b9c4a(0x231)]['unitId'],_0x2dd3e0=_0x588c7c[_0x2b9c4a(0x231)]['sheet']['id'];setTimeout(()=>{const _0x3b112e=_0x2b9c4a;this[_0x3b112e(0x26b)][_0x3b112e(0x211)](_0x442d78['id'],{'unitId':_0x5327dd,'subUnitId':_0x2dd3e0},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x525b83=_0xcca918;var _0x418798;(_0x418798=this[_0x525b83(0x223)])==null||_0x418798[_0x525b83(0x1e2)](),this[_0x525b83(0x25e)][_0x525b83(0x259)](_0x525b83(0x1ee));let _0x6b9e1=new Map(),_0x3b8485=this[_0x525b83(0x223)]=new _0x14d1cb();_0x3b8485['add'](_0x4dbbbb(()=>{const _0x228114=_0x525b83;_0x6b9e1[_0x228114(0x247)](({subject:_0x590e85,subscription:_0x20da8c})=>{const _0x30c093=_0x228114;_0x20da8c[_0x30c093(0x1f3)](),_0x590e85[_0x30c093(0x25c)]();}),_0x6b9e1[_0x228114(0x21d)]();})),_0x3b8485['add'](this['_commandService'][_0x525b83(0x237)](_0x5695c6=>{const _0x2ef0d3=_0x525b83;if(_0x5695c6['type']!==_0x1a009d[_0x2ef0d3(0x224)]||!this[_0x2ef0d3(0x24d)][_0x2ef0d3(0x244)](_0x5695c6['id']))return;let {id:_0x25c49e}=_0x5695c6,_0x5c6489;if(_0x6b9e1[_0x2ef0d3(0x26d)](_0x25c49e))_0x5c6489=_0x6b9e1[_0x2ef0d3(0x1eb)](_0x25c49e)[_0x2ef0d3(0x1f1)];else{var _0x2a8472;_0x5c6489=new _0x3d99f6();let _0x21882a=_0x5c6489[_0x2ef0d3(0x23a)](_0x1efc60((_0x2a8472=this['_configService'][_0x2ef0d3(0x254)]('SAME_OPERATION_SHARE_INTERVAL'))==null?0xc8:_0x2a8472,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x2ef0d3(0x239)](_0x3c8840=>{const _0x49bd1c=_0x2ef0d3;this['_collabSession'][_0x49bd1c(0x243)]({'eventID':_0x243177[_0x49bd1c(0x1fc)],'data':{'unitID':this[_0x49bd1c(0x246)],'operations':{[_0x3c8840['id']]:{'id':_0x3c8840['id'],'params':JSON[_0x49bd1c(0x250)](_0x3c8840[_0x49bd1c(0x231)])}}}},this[_0x49bd1c(0x246)]);});_0x6b9e1['set'](_0x25c49e,{'subject':_0x5c6489,'subscription':_0x21882a});}_0x5c6489[_0x2ef0d3(0x259)](_0x5695c6);})),this[_0x525b83(0x24d)][_0x525b83(0x1f0)](this[_0x525b83(0x246)])[_0x525b83(0x247)](_0x18b5ac=>this[_0x525b83(0x232)][_0x525b83(0x243)]({'eventID':_0x243177[_0x525b83(0x1fc)],'data':{'unitID':this['_unitID'],'operations':{[_0x18b5ac['id']]:{'id':_0x18b5ac['id'],'params':JSON['stringify'](_0x18b5ac['params'])}}}},this[_0x525b83(0x246)]));}[_0xcca918(0x23c)](){const _0x3f5ad4=_0xcca918;var _0x4a1709;this[_0x3f5ad4(0x25e)][_0x3f5ad4(0x259)](_0x3f5ad4(0x1e3)),(_0x4a1709=this['_commandDisposable'])==null||_0x4a1709[_0x3f5ad4(0x1e2)](),this[_0x3f5ad4(0x223)]=null;}[_0xcca918(0x212)](){const _0xe46bfa=_0xcca918;var _0x229fed;(_0x229fed=this[_0xe46bfa(0x223)])==null||_0x229fed['dispose'](),this['_status$'][_0xe46bfa(0x259)]('following');}[_0xcca918(0x216)](){const _0x3be3f4=_0xcca918;var _0x58f4bf;this[_0x3be3f4(0x25e)][_0x3be3f4(0x259)](_0x3be3f4(0x1e3)),(_0x58f4bf=this[_0x3be3f4(0x223)])==null||_0x58f4bf[_0x3be3f4(0x1e2)](),this['_commandDisposable']=null;}[_0xcca918(0x256)](){const _0x3319ac=_0xcca918;var _0x37761d;this[_0x3319ac(0x25e)][_0x3319ac(0x259)]('not-following'),(_0x37761d=this[_0x3319ac(0x223)])==null||_0x37761d[_0x3319ac(0x1e2)]();}[_0xcca918(0x205)](_0x3106a7){const _0x1a0706=_0xcca918;if([_0x1a0706(0x1ee),_0x1a0706(0x253),_0x1a0706(0x1e4)]['includes'](this['_status'])||!_0x3106a7[_0x1a0706(0x24e)]['presenter']||_0x3106a7[_0x1a0706(0x24e)]['presenter']===this[_0x1a0706(0x232)][_0x1a0706(0x23f)]())return;this[_0x1a0706(0x222)]===_0x1a0706(0x1e3)&&this[_0x1a0706(0x212)]();let _0x6de62=_0x3106a7[_0x1a0706(0x24e)][_0x1a0706(0x25a)];Object[_0x1a0706(0x235)](_0x6de62)['forEach'](_0x4f0068=>{const _0x557fa9=_0x1a0706;this[_0x557fa9(0x26b)][_0x557fa9(0x211)](_0x4f0068['id'],_0x4f0068[_0x557fa9(0x231)]?JSON[_0x557fa9(0x229)](_0x4f0068[_0x557fa9(0x231)]):null,{'fromCollab':!0x0});});}[_0xcca918(0x20a)](){const _0x4ae8b4=_0xcca918;var _0x28426c;this[_0x4ae8b4(0x25e)][_0x4ae8b4(0x259)](_0x4ae8b4(0x1e4)),(_0x28426c=this['_commandDisposable'])==null||_0x28426c[_0x4ae8b4(0x1e2)]();}['_handleOnline'](){const _0x124e85=_0xcca918;this[_0x124e85(0x25e)][_0x124e85(0x259)]('idle'),this[_0x124e85(0x230)]();}};J=K([G(0x2,_0xe57a24),G(0x3,_0x3d3509(W)),G(0x4,_0x2d1332)],J);var le=_0xcca918(0x22d),ue=_0xcca918(0x24c);const Y={};let X=class extends _0x5dda2c{constructor(_0xf376ec){const _0x68fea7=_0xcca918;super(),this[_0x68fea7(0x24d)]=_0xf376ec,this['_init']();}[_0xcca918(0x241)](){const _0x3e9353=_0xcca918;[_0x937e41['id'],_0x454eaf['id'],_0x442d78['id']][_0x3e9353(0x247)](_0x9da380=>{const _0x5063e4=_0x3e9353;this[_0x5063e4(0x234)](this[_0x5063e4(0x24d)][_0x5063e4(0x1f9)](_0x9da380));});}};X=K([G(0x0,_0x3d3509(W))],X);function de(){const _0x5851c9=_0xcca918;let _0x31a606=_0x241be1(q),_0x407490=_0x241be1(_0x5837d7),_0x38ae59=_0x3fdd10(()=>_0x407490[_0x5851c9(0x1e8)](_0x146ed0[_0x5851c9(0x219)]),void 0x0,!0x1,[]),_0xd8245d=_0x3fdd10(_0x50e667(()=>_0x38ae59?_0x4c642(()=>_0x4e42e5(_0x31a606[_0x5851c9(0x227)](_0x38ae59[_0x5851c9(0x1df)]()))):_0x4333(null),[_0x38ae59,_0x31a606]),null),_0x45c0d4=_0x3fdd10(_0xd8245d?()=>_0xd8245d['status$']:null,_0x5851c9(0x1e3),!0x1,[_0xd8245d]);return _0xd8245d?_0x3021bb(_0x490e00,{'align':_0x5851c9(0x26e),'disabled':_0x45c0d4===_0x5851c9(0x1e4),'className':_0x5851c9(0x204),'overlay':_0x3021bb(Z,{'status':_0x45c0d4,'coordinator':_0xd8245d}),'children':_0x3021bb('button',{'className':_0x4649fc(_0x5851c9(0x233),{'univer-cursor-not-allowed':_0x45c0d4===_0x5851c9(0x1e4),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x45c0d4!==_0x5851c9(0x1e4)}),'type':'button','children':_0x3021bb(_0x236657,{})})}):null;}function Z(_0x19bc6e){const _0x4c04af=_0xcca918;let {status:_0x21f32e,coordinator:_0x5856d9}=_0x19bc6e;switch(_0x21f32e){case _0x4c04af(0x1e3):return _0x3021bb(fe,{'coordinator':_0x5856d9});case'following':return _0x3021bb(pe,{'coordinator':_0x5856d9});case _0x4c04af(0x253):return _0x3021bb(me,{'coordinator':_0x5856d9});case _0x4c04af(0x1e4):return _0x3021bb(ge,{});case _0x4c04af(0x1ee):return _0x3021bb(he,{'coordinator':_0x5856d9});default:return null;}}function fe(_0x250d91){const _0x55a445=_0xcca918;let {coordinator:_0x25dadc}=_0x250d91;return _0x15b75d(_0x59eb51,{'children':[_0x3021bb('div',{'className':_0x55a445(0x225),'children':_0x55a445(0x24a)}),_0x3021bb(_0x9cbbcc,{'onClick':()=>_0x25dadc[_0x55a445(0x22e)](),'children':_0x55a445(0x1ec)})]});}function pe(_0x32a093){const _0xd16731=_0xcca918;let {coordinator:_0x21c8b2}=_0x32a093;return _0x15b75d(_0x59eb51,{'children':[_0x3021bb(_0xd16731(0x22a),{'className':_0xd16731(0x225),'children':_0xd16731(0x236)}),_0x3021bb(_0x9cbbcc,{'onClick':()=>_0x21c8b2[_0xd16731(0x21b)](),'children':'Stop\x20following'})]});}function me(_0x39a0d5){const _0x7571c0=_0xcca918;let {coordinator:_0x464236}=_0x39a0d5;return _0x15b75d(_0x59eb51,{'children':[_0x3021bb(_0x7571c0(0x22a),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'You\x27re\x20not\x20following\x20the\x20presenter'}),_0x3021bb(_0x9cbbcc,{'variant':_0x7571c0(0x24f),'onClick':()=>_0x464236['startFollowing'](),'children':'Start\x20following'})]});}function he(_0x44c937){const _0x12a708=_0xcca918;let {coordinator:_0x31ed6d}=_0x44c937;return _0x15b75d(_0x59eb51,{'children':[_0x3021bb('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x12a708(0x23b)}),_0x3021bb(_0x9cbbcc,{'variant':_0x12a708(0x1f4),'onClick':()=>_0x31ed6d[_0x12a708(0x21c)](),'children':_0x12a708(0x214)})]});}function ge(){const _0x1a64ea=_0xcca918;return _0x3021bb(_0x59eb51,{'children':_0x1a64ea(0x269)});}let Q=class extends _0x5dda2c{constructor(_0x1d0fc6,_0x495bd0){const _0x425b35=_0xcca918;super(),this['_injector']=_0x1d0fc6,this[_0x425b35(0x265)]=_0x495bd0,this['_mountLiveShare']();}[_0xcca918(0x271)](){const _0x5056ee=_0xcca918;this[_0x5056ee(0x234)](this['_uiPartsService']['registerComponent'](_0x3fad02[_0x5056ee(0x262)],()=>_0x3c9d65(de,this[_0x5056ee(0x263)])));}};Q=K([G(0x0,_0x3d3509(_0x3e0c27)),G(0x1,_0xce0b1f)],Q);let $=class extends _0x1d3090{constructor(_0x45c7ac=Y,_0x118060,_0x54446c){const _0x514492=_0xcca918;super(),this[_0x514492(0x25d)]=_0x45c7ac,this[_0x514492(0x263)]=_0x118060,this[_0x514492(0x217)]=_0x54446c;let {..._0x11e9ee}=_0x3bddf0({},Y,this[_0x514492(0x25d)]);this[_0x514492(0x217)][_0x514492(0x21f)]('live-share.config',_0x11e9ee);}['onStarting'](){const _0x153e46=_0xcca918;_0xc05a66(this['_injector'],_0x1e951f([[W],[q],[X],[Q]],this[_0x153e46(0x25d)][_0x153e46(0x26a)])),_0x41f06e(this[_0x153e46(0x263)],[[X]]);}[_0xcca918(0x240)](){const _0xc0813b=_0xcca918;_0x41f06e(this[_0xc0813b(0x263)],[[Q]]);}};function _0x1ae4(){const _0x5a0314=['_collabSessionService','not-following','getConfig','object','_stopFollowing','getLiveShareCoordinatorSync','string','next','operations','mutations','complete','_config','_status$','4299981nmhOlx','reverse','_entities','HEADER_MENU','_injector','version','_uiPartsService','26417727AOEnnj','defineProperty','from','You\x27are\x20offline.','override','_commandService','UNIVER_UNKNOWN','has','end','2351136PkBTnw','packageName','_mountLiveShare','getUnitId','symbol','_sharedOperations','dispose','idle','offline','LIVESHARE_REQUEST_HOST','following','decorate','getCurrentTypeOfUnit$','asObservable','5278tvatfx','get','Start','status$','presenting','delete','getInitialStates','subject','getTypeOfUnitDisposed$','unsubscribe','default','UNIVER_LIVE_SHARE_PLUGIN','NEW_CHANGESETS','_presenter','map','registerSharedOperation','_univerInstanceService','158985vyfKcL','LIVESHARE_OPERATION','LIVESHARE_FETCH_OPERATIONS','_handleNewChangeSets','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','FOLLOWING','_reporters','9774dCKpoJ','_startPresenting','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','_handleOperation','length','prototype','574420wDoFMx','init','_handleOffline','LIVESHARE_NEW_HOST','dispose$','_handleOnline','NOT_FOLLOWING','OFFLINE','IDLE','executeCommand','_startFollowing','memberID','Stop\x20presenting','sessionStatus$','_beIdle','_configService','event$','UNIVER_SHEET','6XZSyZu','stopFollowing','stopPresenting','clear','call','setConfig','_handleNewHost','type','_status','_commandDisposable','OPERATION','univer-mb-3\x20univer-w-full\x20univer-text-sm','ONLINE','getLiveShareCoordinator','2849740kXsyTH','parse','div','_startLiveShareCoordinator','PRESENTING','@univerjs-pro/live-share','tryStartPresenting','_handleTerminate','_fetchOperations','params','_collabSession','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','disposeWithMe','values','You\x27re\x20following\x20the\x20presenter','onCommandExecuted','pluginName','subscribe','pipe','You\x27re\x20presenting\x20the\x20document','_stopPresenting','LIVESHARE_TERMINATE','requireSession','getMemberID','onRendered','_init','function','send','shouldShareOperation','constructor','_unitID','forEach','getOwnPropertyDescriptor','getTypeOfUnitAdded$','Present\x20this\x20document','unit','1.0.0-alpha.8','_liveShareService','data','text','stringify','add'];_0x1ae4=function(){return _0x5a0314;};return _0x1ae4();}U($,_0xcca918(0x221),_0x146ed0[_0xcca918(0x26c)]),U($,_0xcca918(0x238),_0xcca918(0x1f5)),U($,_0xcca918(0x270),le),U($,_0xcca918(0x264),ue),$=K([_0x35fd8d(_0x20c31b,_0x2b3cfa,_0xf25c4),G(0x1,_0x3d3509(_0x3e0c27)),G(0x2,_0xe57a24)],$);export{q as LiveShareController,ce as LiveShareStatus,$ as UniverLiveSharePlugin};
|
package/lib/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x564ce2=_0x3735;(function(_0x5b62cd,_0x5cd0af){const _0x4065ad=_0x3735,_0x5aa3a7=_0x5b62cd();while(!![]){try{const _0x35acf9=-parseInt(_0x4065ad(0x10b))/0x1+-parseInt(_0x4065ad(0x116))/0x2*(-parseInt(_0x4065ad(0x12b))/0x3)+parseInt(_0x4065ad(0x10e))/0x4+-parseInt(_0x4065ad(0x113))/0x5*(-parseInt(_0x4065ad(0x11c))/0x6)+-parseInt(_0x4065ad(0x122))/0x7*(-parseInt(_0x4065ad(0x121))/0x8)+parseInt(_0x4065ad(0x11e))/0x9+-parseInt(_0x4065ad(0x120))/0xa;if(_0x35acf9===_0x5cd0af)break;else _0x5aa3a7['push'](_0x5aa3a7['shift']());}catch(_0x16910c){_0x5aa3a7['push'](_0x5aa3a7['shift']());}}}(_0x547e,0x9ce8d));import{LiveShareController as _0xd847b0,LiveShareStatus as _0x243f3d}from'@univerjs-pro/live-share';import{IUniverInstanceService as _0x58d182,UniverInstanceType as _0x299ea0}from'@univerjs/core';import{FEnum as _0x14652b,FUniver as _0x17ac48}from'@univerjs/core/facade';function o(_0x723ffb){'@babel/helpers - typeof';const _0x400afe=_0x3735;return o=typeof Symbol==_0x400afe(0x12a)&&typeof Symbol['iterator']==_0x400afe(0x11b)?function(_0x5ee07f){return typeof _0x5ee07f;}:function(_0x312fda){const _0x32f96a=_0x400afe;return _0x312fda&&typeof Symbol==_0x32f96a(0x12a)&&_0x312fda['constructor']===Symbol&&_0x312fda!==Symbol['prototype']?_0x32f96a(0x11b):typeof _0x312fda;},o(_0x723ffb);}function s(_0x4cc0cf,_0x4fdf29){const _0x5e43ed=_0x3735;if(o(_0x4cc0cf)!=_0x5e43ed(0x110)||!_0x4cc0cf)return _0x4cc0cf;var _0x416b5b=_0x4cc0cf[Symbol[_0x5e43ed(0x10d)]];if(_0x416b5b!==void 0x0){var _0x1baeaf=_0x416b5b['call'](_0x4cc0cf,_0x4fdf29||'default');if(o(_0x1baeaf)!=_0x5e43ed(0x110))return _0x1baeaf;throw TypeError(_0x5e43ed(0x10c));}return(_0x4fdf29==='string'?String:Number)(_0x4cc0cf);}function c(_0x50f6e7){const _0x2c4049=_0x3735;var _0x632f9b=s(_0x50f6e7,_0x2c4049(0x124));return o(_0x632f9b)==_0x2c4049(0x11b)?_0x632f9b:_0x632f9b+'';}function _0x3735(_0x4c8e6c,_0x1e0140){_0x4c8e6c=_0x4c8e6c-0x10a;const _0x547e39=_0x547e();let _0x3735ad=_0x547e39[_0x4c8e6c];return _0x3735ad;}function l(_0x3de8fa,_0x1909c1,_0x593a56){const _0x5bc032=_0x3735;return(_0x1909c1=c(_0x1909c1))in _0x3de8fa?Object[_0x5bc032(0x10f)](_0x3de8fa,_0x1909c1,{'value':_0x593a56,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3de8fa[_0x1909c1]=_0x593a56,_0x3de8fa;}var u=class extends _0x17ac48{constructor(..._0x59dc36){const _0x2c5927=_0x3735;super(..._0x59dc36),l(this,_0x2c5927(0x112),void 0x0);}[_0x564ce2(0x114)](_0x18d254){const _0xdefcf1=_0x564ce2;this[_0xdefcf1(0x112)]=_0x18d254[_0xdefcf1(0x118)](_0xd847b0);}[_0x564ce2(0x111)](){const _0x2529d9=_0x564ce2;var _0x21b99d;let _0x279599=this[_0x2529d9(0x123)]['get'](_0x58d182)['getCurrentUnitOfType'](_0x299ea0['UNIVER_SHEET']);if(!_0x279599)throw Error(_0x2529d9(0x119));let _0x197c29=_0x279599['getUnitId'](),_0x5e30ad=this[_0x2529d9(0x112)][_0x2529d9(0x129)](_0x197c29);return(_0x21b99d=_0x5e30ad==null?void 0x0:_0x5e30ad[_0x2529d9(0x126)]())==null?_0x243f3d['IDLE']:_0x21b99d;}['startFollowing'](){const _0x1dcb35=_0x564ce2;let _0x5271fb=this[_0x1dcb35(0x123)][_0x1dcb35(0x118)](_0x58d182)['getCurrentUnitOfType'](_0x299ea0['UNIVER_SHEET']);if(!_0x5271fb)throw Error(_0x1dcb35(0x119));let _0xa5a9cd=_0x5271fb[_0x1dcb35(0x128)](),_0x4b8033=this[_0x1dcb35(0x112)][_0x1dcb35(0x129)](_0xa5a9cd);if(!_0x4b8033)throw Error(_0x1dcb35(0x125));_0x4b8033['startFollowing']();}[_0x564ce2(0x11d)](){const _0x2bccd0=_0x564ce2;let _0x29f9a4=this[_0x2bccd0(0x123)]['get'](_0x58d182)[_0x2bccd0(0x11a)](_0x299ea0['UNIVER_SHEET']);if(!_0x29f9a4)throw Error(_0x2bccd0(0x119));let _0x12757d=_0x29f9a4[_0x2bccd0(0x128)](),_0x166aa7=this[_0x2bccd0(0x112)][_0x2bccd0(0x129)](_0x12757d);if(!_0x166aa7)throw Error(_0x2bccd0(0x125));_0x166aa7[_0x2bccd0(0x11d)]();}[_0x564ce2(0x127)](){const _0x6997fb=_0x564ce2;let _0x7eaf82=this['_injector'][_0x6997fb(0x118)](_0x58d182)[_0x6997fb(0x11a)](_0x299ea0[_0x6997fb(0x115)]);if(!_0x7eaf82)throw Error(_0x6997fb(0x119));let _0x2d19d3=_0x7eaf82[_0x6997fb(0x128)](),_0x5a848a=this[_0x6997fb(0x112)]['getLiveShareCoordinatorSync'](_0x2d19d3);if(!_0x5a848a)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x5a848a[_0x6997fb(0x117)]();}['stopPresenting'](){const _0x4db5d1=_0x564ce2;let _0x1c4f1f=this['_injector'][_0x4db5d1(0x118)](_0x58d182)[_0x4db5d1(0x11a)](_0x299ea0[_0x4db5d1(0x115)]);if(!_0x1c4f1f)throw Error('No\x20active\x20workbook\x20found.');let _0x1d7470=_0x1c4f1f[_0x4db5d1(0x128)](),_0x3b8c59=this[_0x4db5d1(0x112)][_0x4db5d1(0x129)](_0x1d7470);if(!_0x3b8c59)throw Error(_0x4db5d1(0x125));_0x3b8c59['stopPresenting']();}};_0x17ac48[_0x564ce2(0x11f)](u);var d=class extends _0x14652b{get[_0x564ce2(0x10a)](){return _0x243f3d;}};_0x14652b[_0x564ce2(0x11f)](d);function _0x547e(){const _0x1b561b=['1127812VqtuLv','defineProperty','object','getLiveShareStatus','_liveShareController','5JYivbH','_initialize','UNIVER_SHEET','128eJGNUm','tryStartPresenting','get','No\x20active\x20workbook\x20found.','getCurrentUnitOfType','symbol','5249526YGTfua','stopFollowing','7276572TTRZfE','extend','22170280PdGvxV','64dQrQPB','471268mEfubE','_injector','string','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','getStatus','startPresenting','getUnitId','getLiveShareCoordinatorSync','function','30204xGnAqJ','LiveShareStatusEnum','288597vdoPwQ','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','toPrimitive'];_0x547e=function(){return _0x1b561b;};return _0x547e();}export{};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xcd3c43=_0x29fa;(function(_0x40ac36,_0x1da1a9){const _0x5b52eb=_0x29fa,_0x1bba4d=_0x40ac36();while(!![]){try{const _0x19c2cc=parseInt(_0x5b52eb(0x145))/0x1+-parseInt(_0x5b52eb(0x150))/0x2+-parseInt(_0x5b52eb(0x132))/0x3*(parseInt(_0x5b52eb(0x17c))/0x4)+parseInt(_0x5b52eb(0x102))/0x5+parseInt(_0x5b52eb(0x11b))/0x6+parseInt(_0x5b52eb(0x138))/0x7+-parseInt(_0x5b52eb(0x175))/0x8;if(_0x19c2cc===_0x1da1a9)break;else _0x1bba4d['push'](_0x1bba4d['shift']());}catch(_0x151428){_0x1bba4d['push'](_0x1bba4d['shift']());}}}(_0x4350,0x4c64f));import{CollaborationEvent as _0x3756a6,parseProtocolChangeset as _0x540c5a}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x598ce3,SessionStatus as _0x4d69f8,UniverCollaborationClientPlugin as _0x337bb8}from'@univerjs-pro/collaboration-client';import{CommandType as _0x370a98,DependentOn as _0x3f835d,Disposable as _0x3d4065,DisposableCollection as _0x1d1071,ICommandService as _0x2aa954,IConfigService as _0x13ab7e,IUniverInstanceService as _0x5ab737,Inject as _0x130c38,Injector as _0x189051,Plugin as _0x5f36ae,RxDisposable as _0x1a82c3,UniverInstanceType as _0x3f510f,merge as _0x3df356,mergeOverrideWithDependencies as _0x1f0e7f,registerDependencies as _0x24986b,toDisposable as _0xf8e6d4,touchDependencies as _0x1c595d}from'@univerjs/core';import{InsertSheetMutation as _0x39f5b2,SetWorksheetActiveOperation as _0x2b0483}from'@univerjs/sheets';import{BehaviorSubject as _0x23f9ae,Subject as _0x20c350,defer as _0x4386d9,from as _0xa7f912,of as _0x363ac9}from'rxjs';import{takeUntil as _0x223cee,throttleTime as _0x364328}from'rxjs/operators';import{SetScrollOperation as _0x5ae29f,SetZoomRatioOperation as _0x4bc340}from'@univerjs/sheets-ui';import{BuiltInUIPart as _0x72c6df,IUIPartsService as _0x3d33a9,connectInjector as _0x33a9bb,useDependency as _0x361196,useObservable as _0x313630}from'@univerjs/ui';import{Button as _0x5b7c15,Dropdown as _0x5f2dd7,clsx as _0x1b4e86}from'@univerjs/design';import{LiveShareIcon as _0xbe8107}from'@univerjs/icons';function _0x29fa(_0x1d5906,_0xf05a33){_0x1d5906=_0x1d5906-0xed;const _0x435077=_0x4350();let _0x29fa14=_0x435077[_0x1d5906];return _0x29fa14;}import{useMemo as _0x1c5235}from'react';import{Fragment as _0x114c30,jsx as _0x76736e,jsxs as _0x46d651}from'react/jsx-runtime';function z(_0x18187e){'@babel/helpers - typeof';const _0x53ca80=_0x29fa;return z=typeof Symbol=='function'&&typeof Symbol[_0x53ca80(0xf4)]==_0x53ca80(0x169)?function(_0x5dd149){return typeof _0x5dd149;}:function(_0x1fa963){const _0x1875b7=_0x53ca80;return _0x1fa963&&typeof Symbol=='function'&&_0x1fa963[_0x1875b7(0xf0)]===Symbol&&_0x1fa963!==Symbol['prototype']?'symbol':typeof _0x1fa963;},z(_0x18187e);}function B(_0x1ad699,_0x3079ff){const _0x30cb2b=_0x29fa;if(z(_0x1ad699)!='object'||!_0x1ad699)return _0x1ad699;var _0x1b3e85=_0x1ad699[Symbol[_0x30cb2b(0x127)]];if(_0x1b3e85!==void 0x0){var _0x17039d=_0x1b3e85[_0x30cb2b(0x119)](_0x1ad699,_0x3079ff||_0x30cb2b(0x105));if(z(_0x17039d)!=_0x30cb2b(0x12c))return _0x17039d;throw TypeError(_0x30cb2b(0x135));}return(_0x3079ff===_0x30cb2b(0x134)?String:Number)(_0x1ad699);}function V(_0x44e39d){const _0x3b0218=_0x29fa;var _0x400d5b=B(_0x44e39d,_0x3b0218(0x134));return z(_0x400d5b)==_0x3b0218(0x169)?_0x400d5b:_0x400d5b+'';}function H(_0x3a9b8b,_0x117851,_0x334320){const _0xed25aa=_0x29fa;return(_0x117851=V(_0x117851))in _0x3a9b8b?Object[_0xed25aa(0xfa)](_0x3a9b8b,_0x117851,{'value':_0x334320,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3a9b8b[_0x117851]=_0x334320,_0x3a9b8b;}var U=class extends _0x3d4065{constructor(..._0x50b86d){const _0x26b38b=_0x29fa;super(..._0x50b86d),H(this,_0x26b38b(0x164),new Set()),H(this,_0x26b38b(0x10e),new Set());}[_0xcd3c43(0x159)](_0x4b2f96){const _0x29d865=_0xcd3c43;return this['_sharedOperations']['add'](_0x4b2f96),_0xf8e6d4(()=>this[_0x29d865(0x164)][_0x29d865(0xf3)](_0x4b2f96));}['registerInitialStateReporter'](_0x23ddda){const _0x4fced5=_0xcd3c43;return this[_0x4fced5(0x10e)][_0x4fced5(0x16d)](_0x23ddda),_0xf8e6d4(()=>this[_0x4fced5(0x10e)][_0x4fced5(0xf3)](_0x23ddda));}[_0xcd3c43(0x13b)](_0x152480){const _0x2a710b=_0xcd3c43;return this[_0x2a710b(0x164)][_0x2a710b(0x10a)](_0x152480);}[_0xcd3c43(0x170)](_0x286563){const _0x1af0ab=_0xcd3c43;return Array[_0x1af0ab(0xff)](this[_0x1af0ab(0x10e)])[_0x1af0ab(0xfc)](_0x162266=>_0x162266(_0x286563));}};function W(_0x40771d,_0x104f5f){return function(_0x1532f5,_0x40affd){_0x104f5f(_0x1532f5,_0x40affd,_0x40771d);};}function _0x4350(){const _0x46ecb9=['3215368BdljUd','LIVESHARE_REQUEST_HOST','LIVESHARE_TERMINATE','_handleOffline','UNIVER_UNKNOWN','Present\x20this\x20document','_injector','4640RwMrgG','get','_fetchOperations','_status','text','NEW_CHANGESETS','includes','_stopFollowing','constructor','univer-mb-3\x20univer-w-full\x20univer-text-sm','registerComponent','delete','iterator','presenting','presenter','FOLLOWING','length','getLiveShareCoordinatorSync','defineProperty','dispose$','map','SAME_OPERATION_SHARE_INTERVAL','status$','from','_presenter','sheet','721190pMwIgv','params','getUnitId','default','Start','startFollowing','getOwnPropertyDescriptor','init','has','requireSession','find','set','_reporters','live-share.config','idle','_entities','forEach','_univerInstanceService','clear','LIVESHARE_FETCH_OPERATIONS','values','Start\x20following','following','call','override','2410068ZLBEGh','not-following','div','pluginName','unit','_status$','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','button','_handleTerminate','end','executeCommand','_unitID','toPrimitive','tryStartPresenting','_mountLiveShare','_handleNewHost','_handleNewChangeSets','object','send','_startPresenting','event$','_startLiveShareCoordinator','IDLE','1137FWdZQH','mutations','string','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_uiPartsService','unitId','1893220EbDJIF','OPERATION','version','shouldShareOperation','next','OFFLINE','Stop\x20presenting','LIVESHARE_OPERATION','_handleOnline','getLiveShareCoordinator','getCurrentTypeOfUnit$','dispose','onCommandExecuted','537041rnxhUB','_configService','@univerjs-pro/live-share','stopPresenting','_collabSessionService','You\x27re\x20presenting\x20the\x20document','disposeWithMe','getTypeOfUnitDisposed$','subject','getMemberID','UNIVER_LIVE_SHARE_PLUGIN','397890TLXqoa','reverse','_liveShareService','_stopPresenting','getStatus','asObservable','data','offline','1.0.0-alpha.7','registerSharedOperation','getTypeOfUnitAdded$','decorate','subscribe','pipe','_commandDisposable','_commandService','onRendered','_init','_handleOperation','LIVESHARE_NEW_HOST','_sharedOperations','sessionStatus$','HEADER_MENU','stringify','You\x27are\x20offline.','symbol','_startFollowing','packageName','You\x27re\x20not\x20following\x20the\x20presenter','add','_config','ONLINE','getInitialStates','Stop\x20following','_collabSession','UNIVER_SHEET','stopFollowing'];_0x4350=function(){return _0x46ecb9;};return _0x4350();}function G(_0x44d994,_0x4e4905,_0x260325,_0x1e3fd6){const _0x340b73=_0xcd3c43;var _0x5a0c03=arguments['length'],_0xcb171e=_0x5a0c03<0x3?_0x4e4905:_0x1e3fd6===null?_0x1e3fd6=Object[_0x340b73(0x108)](_0x4e4905,_0x260325):_0x1e3fd6,_0x230b64;if(typeof Reflect==_0x340b73(0x12c)&&typeof Reflect[_0x340b73(0x15b)]=='function')_0xcb171e=Reflect[_0x340b73(0x15b)](_0x44d994,_0x4e4905,_0x260325,_0x1e3fd6);else{for(var _0xd913b=_0x44d994[_0x340b73(0xf8)]-0x1;_0xd913b>=0x0;_0xd913b--)(_0x230b64=_0x44d994[_0xd913b])&&(_0xcb171e=(_0x5a0c03<0x3?_0x230b64(_0xcb171e):_0x5a0c03>0x3?_0x230b64(_0x4e4905,_0x260325,_0xcb171e):_0x230b64(_0x4e4905,_0x260325))||_0xcb171e);}return _0x5a0c03>0x3&&_0xcb171e&&Object['defineProperty'](_0x4e4905,_0x260325,_0xcb171e),_0xcb171e;}let K=class extends _0x1a82c3{constructor(_0x66f1cd,_0x6a38c6,_0x4507c5){const _0x11f408=_0xcd3c43;super(),this[_0x11f408(0x113)]=_0x66f1cd,this[_0x11f408(0x17b)]=_0x6a38c6,this[_0x11f408(0x149)]=_0x4507c5,H(this,_0x11f408(0x111),new Map()),this[_0x11f408(0x161)]();}async['getLiveShareCoordinator'](_0x9ec3df){const _0x40bba8=_0xcd3c43;return this[_0x40bba8(0x111)][_0x40bba8(0x10a)](_0x9ec3df)||await this[_0x40bba8(0x130)](_0x9ec3df),this[_0x40bba8(0x111)]['get'](_0x9ec3df);}[_0xcd3c43(0xf9)](_0x1b69ca){const _0x2a7f29=_0xcd3c43;var _0x35d8d8;return(_0x35d8d8=this[_0x2a7f29(0x111)][_0x2a7f29(0x17d)](_0x1b69ca))==null?null:_0x35d8d8;}[_0xcd3c43(0x161)](){const _0x394fc1=_0xcd3c43;this[_0x394fc1(0x113)][_0x394fc1(0x15a)](_0x3f510f[_0x394fc1(0x173)])[_0x394fc1(0x15d)](_0x223cee(this[_0x394fc1(0xfb)]))[_0x394fc1(0x15c)](async _0x1b0875=>{const _0x40f879=_0x394fc1;let _0x2ee398=_0x1b0875[_0x40f879(0x11f)]['getUnitId']();this[_0x40f879(0x111)][_0x40f879(0x10a)](_0x2ee398)||this[_0x40f879(0x130)](_0x2ee398);}),this[_0x394fc1(0x113)][_0x394fc1(0x14c)](_0x3f510f[_0x394fc1(0x173)])['pipe'](_0x223cee(this[_0x394fc1(0xfb)]))[_0x394fc1(0x15c)](_0x18ffae=>{const _0x4c87d1=_0x394fc1;let _0x38847e=_0x18ffae[_0x4c87d1(0x104)](),_0x113e2f=this[_0x4c87d1(0x111)][_0x4c87d1(0x17d)](_0x38847e);_0x113e2f==null||_0x113e2f[_0x4c87d1(0x143)]();});}async['_startLiveShareCoordinator'](_0x535cf4){const _0x4ddb46=_0xcd3c43;let _0x322371=await this[_0x4ddb46(0x149)][_0x4ddb46(0x10b)](_0x535cf4),_0x5bef85=this[_0x4ddb46(0x17b)]['createInstance'](J,_0x535cf4,_0x322371);return _0x5bef85[_0x4ddb46(0x109)](),this[_0x4ddb46(0x111)][_0x4ddb46(0x10d)](_0x535cf4,_0x5bef85),_0x5bef85;}};K=G([W(0x0,_0x5ab737),W(0x1,_0x130c38(_0x189051)),W(0x2,_0x130c38(_0x598ce3))],K);let q=function(_0x10d8b1){const _0x347c62=_0xcd3c43;return _0x10d8b1[_0x347c62(0x13d)]=_0x347c62(0x157),_0x10d8b1[_0x347c62(0x131)]=_0x347c62(0x110),_0x10d8b1[_0x347c62(0xf7)]=_0x347c62(0x118),_0x10d8b1['NOT_FOLLOWING']=_0x347c62(0x11c),_0x10d8b1['PRESENTING']=_0x347c62(0xf5),_0x10d8b1;}({}),J=class extends _0x1a82c3{get[_0xcd3c43(0x17f)](){const _0x256e13=_0xcd3c43;return this[_0x256e13(0x120)]['getValue']();}constructor(_0x280c2a,_0x2a261b,_0x486466,_0x4b72c5,_0x56b6d7){const _0x57336e=_0xcd3c43;super(),this['_unitID']=_0x280c2a,this[_0x57336e(0x172)]=_0x2a261b,this[_0x57336e(0x146)]=_0x486466,this[_0x57336e(0x152)]=_0x4b72c5,this[_0x57336e(0x15f)]=_0x56b6d7,H(this,_0x57336e(0x120),new _0x23f9ae('idle')),H(this,_0x57336e(0xfe),this['_status$'][_0x57336e(0x155)]()),H(this,_0x57336e(0x161),!0x1),H(this,_0x57336e(0x15e),null),H(this,_0x57336e(0x100),null);}[_0xcd3c43(0x143)](){const _0x9fbe8e=_0xcd3c43;var _0x4bcc83;(_0x4bcc83=this[_0x9fbe8e(0x15e)])==null||_0x4bcc83['dispose'](),this[_0x9fbe8e(0x120)][_0x9fbe8e(0x13c)](_0x9fbe8e(0x110)),this[_0x9fbe8e(0x120)]['complete']();}[_0xcd3c43(0x154)](){const _0x2a541f=_0xcd3c43;return this[_0x2a541f(0x17f)];}['init'](){const _0x55f9e8=_0xcd3c43;this['_init']||(this[_0x55f9e8(0x161)]=!0x0,this[_0x55f9e8(0x172)][_0x55f9e8(0x165)]['pipe'](_0x223cee(this['dispose$']))[_0x55f9e8(0x15c)](_0x344196=>{const _0x598087=_0x55f9e8;switch(_0x344196){case _0x4d69f8[_0x598087(0x13d)]:this[_0x598087(0x178)]();break;case _0x4d69f8[_0x598087(0x16f)]:this[_0x598087(0x140)]();break;default:}}),this[_0x55f9e8(0x172)][_0x55f9e8(0x12f)][_0x55f9e8(0x15d)](_0x223cee(this[_0x55f9e8(0xfb)]))['subscribe'](_0x2a721a=>{const _0x316b55=_0x55f9e8;let {eventID:_0x57ce27}=_0x2a721a;switch(_0x57ce27){case _0x3756a6[_0x316b55(0x163)]:this[_0x316b55(0x12a)](_0x2a721a);break;case _0x3756a6['LIVESHARE_OPERATION']:this[_0x316b55(0x162)](_0x2a721a);break;case _0x3756a6[_0x316b55(0x177)]:this[_0x316b55(0x123)]();break;case _0x3756a6[_0x316b55(0xed)]:this[_0x316b55(0x12b)](_0x2a721a);break;default:}}));}[_0xcd3c43(0x128)](){const _0x8f65c9=_0xcd3c43;this[_0x8f65c9(0x172)][_0x8f65c9(0x12d)]({'eventID':_0x3756a6[_0x8f65c9(0x176)],'data':{'unitID':this['_unitID'],'userID':this[_0x8f65c9(0x172)]['getMemberID']()}},this['_unitID']);}['stopPresenting'](){const _0x8e4143=_0xcd3c43;this[_0x8e4143(0x17f)]==='presenting'&&(this[_0x8e4143(0x120)]['next']('idle'),this[_0x8e4143(0x172)][_0x8e4143(0x12d)]({'eventID':_0x3756a6[_0x8e4143(0x177)],'data':{'unitID':this[_0x8e4143(0x126)]}},this[_0x8e4143(0x126)]));}['startFollowing'](){const _0xe93ada=_0xcd3c43;this[_0xe93ada(0x17f)]===_0xe93ada(0x11c)&&(this[_0xe93ada(0x120)][_0xe93ada(0x13c)](_0xe93ada(0x118)),this[_0xe93ada(0x16a)]());}[_0xcd3c43(0x174)](){const _0x221bbd=_0xcd3c43;this[_0x221bbd(0x17f)]===_0x221bbd(0x118)&&this[_0x221bbd(0xef)]();}[_0xcd3c43(0x12a)](_0x1fecb4){const _0x1caadb=_0xcd3c43;let {presenter:_0x283db7}=_0x1fecb4[_0x1caadb(0x156)],_0x47fa87=this[_0x1caadb(0x172)][_0x1caadb(0x14e)]();this[_0x1caadb(0x100)]=_0x283db7,_0x283db7===_0x47fa87?(this[_0x1caadb(0xef)](),this['_startPresenting']()):this['_status']!==_0x1caadb(0x11c)&&(this[_0x1caadb(0x153)](),this[_0x1caadb(0x16a)]());}[_0xcd3c43(0x17e)](){const _0x1d0532=_0xcd3c43;let _0x11c7a4={'eventID':_0x3756a6[_0x1d0532(0x115)]};this[_0x1d0532(0x172)][_0x1d0532(0x12d)](_0x11c7a4,this[_0x1d0532(0x126)]);}[_0xcd3c43(0x123)](){const _0x5cee8f=_0xcd3c43;this[_0x5cee8f(0x100)]=null,this[_0x5cee8f(0x17f)]!=='presenting'&&this['_beIdle']();}[_0xcd3c43(0x12b)](_0x2a1f61){const _0x221cc7=_0xcd3c43;if(this['_status']===_0x221cc7(0x118)&&this[_0x221cc7(0x100)]===_0x2a1f61[_0x221cc7(0x156)]['memberID']){let _0x92cfcb=_0x540c5a(_0x2a1f61[_0x221cc7(0x156)])[_0x221cc7(0x133)][_0x221cc7(0x151)]()[_0x221cc7(0x10c)](_0xb0e452=>_0xb0e452['id']===_0x39f5b2['id']);if(_0x92cfcb){let _0x436335=_0x92cfcb[_0x221cc7(0x103)][_0x221cc7(0x137)],_0xaea137=_0x92cfcb[_0x221cc7(0x103)][_0x221cc7(0x101)]['id'];setTimeout(()=>{const _0x2cc575=_0x221cc7;this['_commandService'][_0x2cc575(0x125)](_0x2b0483['id'],{'unitId':_0x436335,'subUnitId':_0xaea137},{'fromCollab':!0x0});});}}}[_0xcd3c43(0x12e)](){const _0x3be677=_0xcd3c43;var _0x417769;(_0x417769=this[_0x3be677(0x15e)])==null||_0x417769[_0x3be677(0x143)](),this['_status$'][_0x3be677(0x13c)](_0x3be677(0xf5));let _0x523766=new Map(),_0x23660d=this[_0x3be677(0x15e)]=new _0x1d1071();_0x23660d[_0x3be677(0x16d)](_0xf8e6d4(()=>{const _0x49b5f5=_0x3be677;_0x523766['forEach'](({subject:_0x1362f0,subscription:_0x2d6066})=>{_0x2d6066['unsubscribe'](),_0x1362f0['complete']();}),_0x523766[_0x49b5f5(0x114)]();})),_0x23660d[_0x3be677(0x16d)](this[_0x3be677(0x15f)][_0x3be677(0x144)](_0x1aca2d=>{const _0x11d1a2=_0x3be677;if(_0x1aca2d['type']!==_0x370a98[_0x11d1a2(0x139)]||!this[_0x11d1a2(0x152)][_0x11d1a2(0x13b)](_0x1aca2d['id']))return;let {id:_0x3e96b3}=_0x1aca2d,_0x326ef8;if(_0x523766[_0x11d1a2(0x10a)](_0x3e96b3))_0x326ef8=_0x523766['get'](_0x3e96b3)[_0x11d1a2(0x14d)];else{var _0x52630d;_0x326ef8=new _0x20c350();let _0x3e948d=_0x326ef8['pipe'](_0x364328((_0x52630d=this[_0x11d1a2(0x146)]['getConfig'](_0x11d1a2(0xfd)))==null?0xc8:_0x52630d,void 0x0,{'trailing':!0x0,'leading':!0x0}))['subscribe'](_0x50a8ed=>{const _0x54a2ce=_0x11d1a2;this[_0x54a2ce(0x172)][_0x54a2ce(0x12d)]({'eventID':_0x3756a6[_0x54a2ce(0x13f)],'data':{'unitID':this['_unitID'],'operations':{[_0x50a8ed['id']]:{'id':_0x50a8ed['id'],'params':JSON[_0x54a2ce(0x167)](_0x50a8ed[_0x54a2ce(0x103)])}}}},this[_0x54a2ce(0x126)]);});_0x523766[_0x11d1a2(0x10d)](_0x3e96b3,{'subject':_0x326ef8,'subscription':_0x3e948d});}_0x326ef8[_0x11d1a2(0x13c)](_0x1aca2d);})),this[_0x3be677(0x152)][_0x3be677(0x170)](this['_unitID'])[_0x3be677(0x112)](_0x4af641=>this[_0x3be677(0x172)][_0x3be677(0x12d)]({'eventID':_0x3756a6[_0x3be677(0x13f)],'data':{'unitID':this[_0x3be677(0x126)],'operations':{[_0x4af641['id']]:{'id':_0x4af641['id'],'params':JSON['stringify'](_0x4af641['params'])}}}},this['_unitID']));}[_0xcd3c43(0x153)](){const _0x4d0e91=_0xcd3c43;var _0x4dba2d;this[_0x4d0e91(0x120)]['next'](_0x4d0e91(0x110)),(_0x4dba2d=this[_0x4d0e91(0x15e)])==null||_0x4dba2d[_0x4d0e91(0x143)](),this[_0x4d0e91(0x15e)]=null;}[_0xcd3c43(0x16a)](){const _0x518d3f=_0xcd3c43;var _0x352e0d;(_0x352e0d=this[_0x518d3f(0x15e)])==null||_0x352e0d['dispose'](),this[_0x518d3f(0x120)]['next']('following');}['_beIdle'](){const _0x5775b2=_0xcd3c43;var _0xf43165;this[_0x5775b2(0x120)][_0x5775b2(0x13c)](_0x5775b2(0x110)),(_0xf43165=this['_commandDisposable'])==null||_0xf43165[_0x5775b2(0x143)](),this['_commandDisposable']=null;}[_0xcd3c43(0xef)](){const _0x462fff=_0xcd3c43;var _0x151384;this[_0x462fff(0x120)]['next']('not-following'),(_0x151384=this[_0x462fff(0x15e)])==null||_0x151384[_0x462fff(0x143)]();}[_0xcd3c43(0x162)](_0x2f255a){const _0x395078=_0xcd3c43;if(['presenting',_0x395078(0x11c),'offline'][_0x395078(0xee)](this['_status'])||!_0x2f255a[_0x395078(0x156)]['presenter']||_0x2f255a[_0x395078(0x156)][_0x395078(0xf6)]===this[_0x395078(0x172)][_0x395078(0x14e)]())return;this['_status']===_0x395078(0x110)&&this[_0x395078(0x16a)]();let _0xaecd78=_0x2f255a['data']['operations'];Object[_0x395078(0x116)](_0xaecd78)['forEach'](_0x39ce5f=>{const _0xbd19df=_0x395078;this['_commandService'][_0xbd19df(0x125)](_0x39ce5f['id'],_0x39ce5f[_0xbd19df(0x103)]?JSON['parse'](_0x39ce5f['params']):null,{'fromCollab':!0x0});});}[_0xcd3c43(0x178)](){const _0x1d09c2=_0xcd3c43;var _0x23918f;this[_0x1d09c2(0x120)]['next']('offline'),(_0x23918f=this['_commandDisposable'])==null||_0x23918f['dispose']();}['_handleOnline'](){const _0x4d9e2c=_0xcd3c43;this[_0x4d9e2c(0x120)][_0x4d9e2c(0x13c)](_0x4d9e2c(0x110)),this['_fetchOperations']();}};J=G([W(0x2,_0x13ab7e),W(0x3,_0x130c38(U)),W(0x4,_0x2aa954)],J);var se=_0xcd3c43(0x147),ce=_0xcd3c43(0x158);const Y={};let X=class extends _0x3d4065{constructor(_0x18262a){super(),this['_liveShareService']=_0x18262a,this['_init']();}[_0xcd3c43(0x161)](){const _0x3f6ab9=_0xcd3c43;[_0x4bc340['id'],_0x5ae29f['id'],_0x2b0483['id']][_0x3f6ab9(0x112)](_0x12ec93=>{const _0x406c78=_0x3f6ab9;this['disposeWithMe'](this[_0x406c78(0x152)][_0x406c78(0x159)](_0x12ec93));});}};X=G([W(0x0,_0x130c38(U))],X);function Z(){const _0x2168b4=_0xcd3c43;let _0x2a469e=_0x361196(K),_0x367e57=_0x361196(_0x5ab737),_0x233cf3=_0x313630(()=>_0x367e57[_0x2168b4(0x142)](_0x3f510f[_0x2168b4(0x173)]),void 0x0,!0x1,[]),_0x5a285b=_0x313630(_0x1c5235(()=>_0x233cf3?_0x4386d9(()=>_0xa7f912(_0x2a469e[_0x2168b4(0x141)](_0x233cf3[_0x2168b4(0x104)]()))):_0x363ac9(null),[_0x233cf3,_0x2a469e]),null),_0x25f125=_0x313630(_0x5a285b?()=>_0x5a285b[_0x2168b4(0xfe)]:null,_0x2168b4(0x110),!0x1,[_0x5a285b]);return _0x5a285b?_0x76736e(_0x5f2dd7,{'align':_0x2168b4(0x124),'disabled':_0x25f125===_0x2168b4(0x157),'className':_0x2168b4(0x121),'overlay':_0x76736e(le,{'status':_0x25f125,'coordinator':_0x5a285b}),'children':_0x76736e(_0x2168b4(0x122),{'className':_0x1b4e86('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x25f125==='offline','univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x25f125!=='offline'}),'type':_0x2168b4(0x122),'children':_0x76736e(_0xbe8107,{})})}):null;}function le(_0x36d926){const _0x3fad99=_0xcd3c43;let {status:_0x3aaa5c,coordinator:_0xd13d33}=_0x36d926;switch(_0x3aaa5c){case _0x3fad99(0x110):return _0x76736e(ue,{'coordinator':_0xd13d33});case _0x3fad99(0x118):return _0x76736e(de,{'coordinator':_0xd13d33});case _0x3fad99(0x11c):return _0x76736e(fe,{'coordinator':_0xd13d33});case'offline':return _0x76736e(me,{});case _0x3fad99(0xf5):return _0x76736e(pe,{'coordinator':_0xd13d33});default:return null;}}function ue(_0x4fda22){const _0x55e02e=_0xcd3c43;let {coordinator:_0x153247}=_0x4fda22;return _0x46d651(_0x114c30,{'children':[_0x76736e(_0x55e02e(0x11d),{'className':_0x55e02e(0xf1),'children':_0x55e02e(0x17a)}),_0x76736e(_0x5b7c15,{'onClick':()=>_0x153247[_0x55e02e(0x128)](),'children':_0x55e02e(0x106)})]});}function de(_0x53ca40){const _0x93e357=_0xcd3c43;let {coordinator:_0x314952}=_0x53ca40;return _0x46d651(_0x114c30,{'children':[_0x76736e(_0x93e357(0x11d),{'className':_0x93e357(0xf1),'children':'You\x27re\x20following\x20the\x20presenter'}),_0x76736e(_0x5b7c15,{'onClick':()=>_0x314952[_0x93e357(0x174)](),'children':_0x93e357(0x171)})]});}function fe(_0xaacac){const _0x5c4abf=_0xcd3c43;let {coordinator:_0x20c65f}=_0xaacac;return _0x46d651(_0x114c30,{'children':[_0x76736e('div',{'className':_0x5c4abf(0xf1),'children':_0x5c4abf(0x16c)}),_0x76736e(_0x5b7c15,{'variant':_0x5c4abf(0x180),'onClick':()=>_0x20c65f[_0x5c4abf(0x107)](),'children':_0x5c4abf(0x117)})]});}function pe(_0x1a4fb9){const _0x40d5f2=_0xcd3c43;let {coordinator:_0x50eac3}=_0x1a4fb9;return _0x46d651(_0x114c30,{'children':[_0x76736e(_0x40d5f2(0x11d),{'className':_0x40d5f2(0xf1),'children':_0x40d5f2(0x14a)}),_0x76736e(_0x5b7c15,{'variant':_0x40d5f2(0x105),'onClick':()=>_0x50eac3[_0x40d5f2(0x148)](),'children':_0x40d5f2(0x13e)})]});}function me(){const _0x237681=_0xcd3c43;return _0x76736e(_0x114c30,{'children':_0x237681(0x168)});}let Q=class extends _0x3d4065{constructor(_0x433b6c,_0xfbdfa8){const _0x875ae1=_0xcd3c43;super(),this['_injector']=_0x433b6c,this[_0x875ae1(0x136)]=_0xfbdfa8,this[_0x875ae1(0x129)]();}[_0xcd3c43(0x129)](){const _0x7dca9a=_0xcd3c43;this[_0x7dca9a(0x14b)](this[_0x7dca9a(0x136)][_0x7dca9a(0xf2)](_0x72c6df[_0x7dca9a(0x166)],()=>_0x33a9bb(Z,this[_0x7dca9a(0x17b)])));}};Q=G([W(0x0,_0x130c38(_0x189051)),W(0x1,_0x3d33a9)],Q);let $=class extends _0x5f36ae{constructor(_0x2e3f2f=Y,_0x28d45f,_0xd601ed){const _0x3760f0=_0xcd3c43;super(),this['_config']=_0x2e3f2f,this[_0x3760f0(0x17b)]=_0x28d45f,this[_0x3760f0(0x146)]=_0xd601ed;let {..._0xa29e9b}=_0x3df356({},Y,this[_0x3760f0(0x16e)]);this[_0x3760f0(0x146)]['setConfig'](_0x3760f0(0x10f),_0xa29e9b);}['onStarting'](){const _0x20903a=_0xcd3c43;_0x24986b(this['_injector'],_0x1f0e7f([[U],[K],[X],[Q]],this[_0x20903a(0x16e)][_0x20903a(0x11a)])),_0x1c595d(this[_0x20903a(0x17b)],[[X]]);}[_0xcd3c43(0x160)](){_0x1c595d(this['_injector'],[[Q]]);}};H($,'type',_0x3f510f[_0xcd3c43(0x179)]),H($,_0xcd3c43(0x11e),_0xcd3c43(0x14f)),H($,_0xcd3c43(0x16b),se),H($,_0xcd3c43(0x13a),ce),$=G([_0x3f835d(_0x337bb8),W(0x1,_0x130c38(_0x189051)),W(0x2,_0x13ab7e)],$);export{K as LiveShareController,q as LiveShareStatus,$ as UniverLiveSharePlugin};
|
|
1
|
+
const _0xcca918=_0x47e8;(function(_0x495eff,_0x4ce051){const _0x5d1e94=_0x47e8,_0x302c11=_0x495eff();while(!![]){try{const _0x1b073e=-parseInt(_0x5d1e94(0x208))/0x1*(-parseInt(_0x5d1e94(0x21a))/0x2)+-parseInt(_0x5d1e94(0x25f))/0x3+-parseInt(_0x5d1e94(0x228))/0x4+-parseInt(_0x5d1e94(0x1fb))/0x5+parseInt(_0x5d1e94(0x202))/0x6*(-parseInt(_0x5d1e94(0x1ea))/0x7)+-parseInt(_0x5d1e94(0x26f))/0x8+parseInt(_0x5d1e94(0x266))/0x9;if(_0x1b073e===_0x4ce051)break;else _0x302c11['push'](_0x302c11['shift']());}catch(_0x2172fd){_0x302c11['push'](_0x302c11['shift']());}}}(_0x1ae4,0xea17e));import{CollaborationEvent as _0x243177,parseProtocolChangeset as _0x317e07}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x19a9a0,SessionStatus as _0x1e4627,UniverCollaborationClientPlugin as _0xf25c4}from'@univerjs-pro/collaboration-client';import{CommandType as _0x1a009d,DependentOn as _0x35fd8d,Disposable as _0x5dda2c,DisposableCollection as _0x14d1cb,ICommandService as _0x2d1332,IConfigService as _0xe57a24,IUniverInstanceService as _0x5837d7,Inject as _0x3d3509,Injector as _0x3e0c27,Plugin as _0x1d3090,RxDisposable as _0x250ec8,UniverInstanceType as _0x146ed0,merge as _0x3bddf0,mergeOverrideWithDependencies as _0x1e951f,registerDependencies as _0xc05a66,toDisposable as _0x4dbbbb,touchDependencies as _0x41f06e}from'@univerjs/core';import{InsertSheetMutation as _0x28a0f6,SetWorksheetActiveOperation as _0x442d78}from'@univerjs/sheets';function _0x47e8(_0x16fa23,_0x2047f8){_0x16fa23=_0x16fa23-0x1df;const _0x1ae4ba=_0x1ae4();let _0x47e838=_0x1ae4ba[_0x16fa23];return _0x47e838;}import{BehaviorSubject as _0x191e68,Subject as _0x3d99f6,defer as _0x4c642,from as _0x4e42e5,of as _0x4333}from'rxjs';import{takeUntil as _0x5980d1,throttleTime as _0x1efc60}from'rxjs/operators';import{UniverLicensePlugin as _0x20c31b}from'@univerjs-pro/license';import{BuiltInUIPart as _0x3fad02,IUIPartsService as _0xce0b1f,UniverUIPlugin as _0x2b3cfa,connectInjector as _0x3c9d65,useDependency as _0x241be1,useObservable as _0x3fdd10}from'@univerjs/ui';import{SetScrollOperation as _0x454eaf,SetZoomRatioOperation as _0x937e41}from'@univerjs/sheets-ui';import{Button as _0x9cbbcc,Dropdown as _0x490e00,clsx as _0x4649fc}from'@univerjs/design';import{LiveShareIcon as _0x236657}from'@univerjs/icons';import{useMemo as _0x50e667}from'react';import{Fragment as _0x59eb51,jsx as _0x3021bb,jsxs as _0x15b75d}from'react/jsx-runtime';function B(_0x4f94c8){'@babel/helpers - typeof';const _0x57da11=_0x47e8;return B=typeof Symbol==_0x57da11(0x242)&&typeof Symbol['iterator']==_0x57da11(0x1e0)?function(_0x4b9156){return typeof _0x4b9156;}:function(_0x1f8856){const _0x30a7e8=_0x57da11;return _0x1f8856&&typeof Symbol==_0x30a7e8(0x242)&&_0x1f8856[_0x30a7e8(0x245)]===Symbol&&_0x1f8856!==Symbol[_0x30a7e8(0x207)]?_0x30a7e8(0x1e0):typeof _0x1f8856;},B(_0x4f94c8);}function V(_0x5e039a,_0x15f2d4){const _0x43a82e=_0x47e8;if(B(_0x5e039a)!=_0x43a82e(0x255)||!_0x5e039a)return _0x5e039a;var _0x5ce890=_0x5e039a[Symbol['toPrimitive']];if(_0x5ce890!==void 0x0){var _0x38cf97=_0x5ce890[_0x43a82e(0x21e)](_0x5e039a,_0x15f2d4||_0x43a82e(0x1f4));if(B(_0x38cf97)!=_0x43a82e(0x255))return _0x38cf97;throw TypeError(_0x43a82e(0x1ff));}return(_0x15f2d4===_0x43a82e(0x258)?String:Number)(_0x5e039a);}function H(_0x1f1a4d){const _0x23a257=_0x47e8;var _0x174445=V(_0x1f1a4d,_0x23a257(0x258));return B(_0x174445)==_0x23a257(0x1e0)?_0x174445:_0x174445+'';}function U(_0x310f6f,_0x5965ae,_0x268f70){return(_0x5965ae=H(_0x5965ae))in _0x310f6f?Object['defineProperty'](_0x310f6f,_0x5965ae,{'value':_0x268f70,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x310f6f[_0x5965ae]=_0x268f70,_0x310f6f;}var W=class extends _0x5dda2c{constructor(..._0x275603){const _0x19fb08=_0x47e8;super(..._0x275603),U(this,_0x19fb08(0x1e1),new Set()),U(this,_0x19fb08(0x201),new Set());}['registerSharedOperation'](_0x1e355b){const _0x446698=_0x47e8;return this[_0x446698(0x1e1)]['add'](_0x1e355b),_0x4dbbbb(()=>this[_0x446698(0x1e1)][_0x446698(0x1ef)](_0x1e355b));}['registerInitialStateReporter'](_0x250b8a){const _0xcd88c3=_0x47e8;return this[_0xcd88c3(0x201)][_0xcd88c3(0x251)](_0x250b8a),_0x4dbbbb(()=>this[_0xcd88c3(0x201)][_0xcd88c3(0x1ef)](_0x250b8a));}[_0xcca918(0x244)](_0x2feb8f){const _0x5988d0=_0xcca918;return this[_0x5988d0(0x1e1)][_0x5988d0(0x26d)](_0x2feb8f);}[_0xcca918(0x1f0)](_0x13315f){const _0x53f9c1=_0xcca918;return Array[_0x53f9c1(0x268)](this[_0x53f9c1(0x201)])[_0x53f9c1(0x1f8)](_0x527422=>_0x527422(_0x13315f));}};function G(_0x5f4af5,_0x5d1427){return function(_0x1c2ed7,_0x40b502){_0x5d1427(_0x1c2ed7,_0x40b502,_0x5f4af5);};}function K(_0x477c10,_0x1da7e1,_0x24e77d,_0x3b88db){const _0x382b64=_0xcca918;var _0xb52002=arguments[_0x382b64(0x206)],_0x4236b7=_0xb52002<0x3?_0x1da7e1:_0x3b88db===null?_0x3b88db=Object[_0x382b64(0x248)](_0x1da7e1,_0x24e77d):_0x3b88db,_0x52e5f8;if(typeof Reflect==_0x382b64(0x255)&&typeof Reflect[_0x382b64(0x1e7)]==_0x382b64(0x242))_0x4236b7=Reflect['decorate'](_0x477c10,_0x1da7e1,_0x24e77d,_0x3b88db);else{for(var _0x385162=_0x477c10['length']-0x1;_0x385162>=0x0;_0x385162--)(_0x52e5f8=_0x477c10[_0x385162])&&(_0x4236b7=(_0xb52002<0x3?_0x52e5f8(_0x4236b7):_0xb52002>0x3?_0x52e5f8(_0x1da7e1,_0x24e77d,_0x4236b7):_0x52e5f8(_0x1da7e1,_0x24e77d))||_0x4236b7);}return _0xb52002>0x3&&_0x4236b7&&Object[_0x382b64(0x267)](_0x1da7e1,_0x24e77d,_0x4236b7),_0x4236b7;}let q=class extends _0x250ec8{constructor(_0x464c35,_0x422bcb,_0x3371e7){const _0x3d4bc9=_0xcca918;super(),this[_0x3d4bc9(0x1fa)]=_0x464c35,this['_injector']=_0x422bcb,this['_collabSessionService']=_0x3371e7,U(this,'_entities',new Map()),this[_0x3d4bc9(0x241)]();}async[_0xcca918(0x227)](_0x223bf3){const _0x1dd2df=_0xcca918;return this[_0x1dd2df(0x261)]['has'](_0x223bf3)||await this[_0x1dd2df(0x22b)](_0x223bf3),this['_entities'][_0x1dd2df(0x1eb)](_0x223bf3);}[_0xcca918(0x257)](_0x5e6438){const _0x5613bb=_0xcca918;var _0xa712ce;return(_0xa712ce=this[_0x5613bb(0x261)][_0x5613bb(0x1eb)](_0x5e6438))==null?null:_0xa712ce;}[_0xcca918(0x241)](){const _0x573457=_0xcca918;this[_0x573457(0x1fa)][_0x573457(0x249)](_0x146ed0['UNIVER_SHEET'])[_0x573457(0x23a)](_0x5980d1(this[_0x573457(0x20c)]))[_0x573457(0x239)](async _0x290b67=>{const _0x555306=_0x573457;let _0x51f651=_0x290b67[_0x555306(0x24b)][_0x555306(0x1df)]();this[_0x555306(0x261)]['has'](_0x51f651)||this[_0x555306(0x22b)](_0x51f651);}),this['_univerInstanceService'][_0x573457(0x1f2)](_0x146ed0[_0x573457(0x219)])[_0x573457(0x23a)](_0x5980d1(this[_0x573457(0x20c)]))[_0x573457(0x239)](_0x3115b2=>{const _0x1a46d6=_0x573457;let _0x2da8ea=_0x3115b2[_0x1a46d6(0x1df)](),_0x4c4cd5=this[_0x1a46d6(0x261)]['get'](_0x2da8ea);_0x4c4cd5==null||_0x4c4cd5[_0x1a46d6(0x1e2)]();});}async[_0xcca918(0x22b)](_0x5049c5){const _0x30a80f=_0xcca918;let _0x39f8cb=await this[_0x30a80f(0x252)][_0x30a80f(0x23e)](_0x5049c5),_0x3d788d=this[_0x30a80f(0x263)]['createInstance'](J,_0x5049c5,_0x39f8cb);return _0x3d788d[_0x30a80f(0x209)](),this[_0x30a80f(0x261)]['set'](_0x5049c5,_0x3d788d),_0x3d788d;}};q=K([G(0x0,_0x5837d7),G(0x1,_0x3d3509(_0x3e0c27)),G(0x2,_0x3d3509(_0x19a9a0))],q);let ce=function(_0x54aff2){const _0x476a40=_0xcca918;return _0x54aff2[_0x476a40(0x20f)]=_0x476a40(0x1e4),_0x54aff2[_0x476a40(0x210)]=_0x476a40(0x1e3),_0x54aff2[_0x476a40(0x200)]=_0x476a40(0x1e6),_0x54aff2[_0x476a40(0x20e)]='not-following',_0x54aff2[_0x476a40(0x22c)]=_0x476a40(0x1ee),_0x54aff2;}({}),J=class extends _0x250ec8{get[_0xcca918(0x222)](){const _0x3ec18e=_0xcca918;return this[_0x3ec18e(0x25e)]['getValue']();}constructor(_0x3825dd,_0x498c7e,_0x23aae0,_0x50d196,_0x12a41d){const _0x23300a=_0xcca918;super(),this[_0x23300a(0x246)]=_0x3825dd,this[_0x23300a(0x232)]=_0x498c7e,this[_0x23300a(0x217)]=_0x23aae0,this[_0x23300a(0x24d)]=_0x50d196,this[_0x23300a(0x26b)]=_0x12a41d,U(this,_0x23300a(0x25e),new _0x191e68(_0x23300a(0x1e3))),U(this,_0x23300a(0x1ed),this[_0x23300a(0x25e)][_0x23300a(0x1e9)]()),U(this,_0x23300a(0x241),!0x1),U(this,'_commandDisposable',null),U(this,_0x23300a(0x1f7),null);}[_0xcca918(0x1e2)](){const _0x22817f=_0xcca918;var _0x545fec;(_0x545fec=this['_commandDisposable'])==null||_0x545fec['dispose'](),this[_0x22817f(0x25e)][_0x22817f(0x259)](_0x22817f(0x1e3)),this[_0x22817f(0x25e)][_0x22817f(0x25c)]();}['getStatus'](){const _0x34ab8d=_0xcca918;return this[_0x34ab8d(0x222)];}[_0xcca918(0x209)](){const _0x1ad7fc=_0xcca918;this[_0x1ad7fc(0x241)]||(this[_0x1ad7fc(0x241)]=!0x0,this['_collabSession'][_0x1ad7fc(0x215)]['pipe'](_0x5980d1(this[_0x1ad7fc(0x20c)]))[_0x1ad7fc(0x239)](_0x33e35c=>{const _0x968b3=_0x1ad7fc;switch(_0x33e35c){case _0x1e4627[_0x968b3(0x20f)]:this['_handleOffline']();break;case _0x1e4627[_0x968b3(0x226)]:this[_0x968b3(0x20d)]();break;default:}}),this[_0x1ad7fc(0x232)][_0x1ad7fc(0x218)][_0x1ad7fc(0x23a)](_0x5980d1(this['dispose$']))[_0x1ad7fc(0x239)](_0x1b7111=>{const _0x505c6a=_0x1ad7fc;let {eventID:_0x580155}=_0x1b7111;switch(_0x580155){case _0x243177[_0x505c6a(0x20b)]:this[_0x505c6a(0x220)](_0x1b7111);break;case _0x243177[_0x505c6a(0x1fc)]:this[_0x505c6a(0x205)](_0x1b7111);break;case _0x243177[_0x505c6a(0x23d)]:this[_0x505c6a(0x22f)]();break;case _0x243177[_0x505c6a(0x1f6)]:this[_0x505c6a(0x1fe)](_0x1b7111);break;default:}}));}[_0xcca918(0x22e)](){const _0x6bd7af=_0xcca918;this[_0x6bd7af(0x232)]['send']({'eventID':_0x243177[_0x6bd7af(0x1e5)],'data':{'unitID':this[_0x6bd7af(0x246)],'userID':this[_0x6bd7af(0x232)][_0x6bd7af(0x23f)]()}},this[_0x6bd7af(0x246)]);}['stopPresenting'](){const _0x3873c0=_0xcca918;this['_status']===_0x3873c0(0x1ee)&&(this[_0x3873c0(0x25e)][_0x3873c0(0x259)]('idle'),this[_0x3873c0(0x232)][_0x3873c0(0x243)]({'eventID':_0x243177[_0x3873c0(0x23d)],'data':{'unitID':this['_unitID']}},this[_0x3873c0(0x246)]));}['startFollowing'](){const _0x116680=_0xcca918;this[_0x116680(0x222)]===_0x116680(0x253)&&(this[_0x116680(0x25e)][_0x116680(0x259)]('following'),this[_0x116680(0x212)]());}[_0xcca918(0x21b)](){const _0x25f900=_0xcca918;this[_0x25f900(0x222)]===_0x25f900(0x1e6)&&this[_0x25f900(0x256)]();}[_0xcca918(0x220)](_0x4b063e){const _0x164c9d=_0xcca918;let {presenter:_0x3ac8f8}=_0x4b063e[_0x164c9d(0x24e)],_0xa1d6b8=this[_0x164c9d(0x232)][_0x164c9d(0x23f)]();this[_0x164c9d(0x1f7)]=_0x3ac8f8,_0x3ac8f8===_0xa1d6b8?(this[_0x164c9d(0x256)](),this[_0x164c9d(0x203)]()):this['_status']!==_0x164c9d(0x253)&&(this[_0x164c9d(0x23c)](),this[_0x164c9d(0x212)]());}[_0xcca918(0x230)](){const _0x3d941e=_0xcca918;let _0x50ea0a={'eventID':_0x243177[_0x3d941e(0x1fd)]};this['_collabSession'][_0x3d941e(0x243)](_0x50ea0a,this['_unitID']);}[_0xcca918(0x22f)](){const _0x37437e=_0xcca918;this[_0x37437e(0x1f7)]=null,this[_0x37437e(0x222)]!==_0x37437e(0x1ee)&&this[_0x37437e(0x216)]();}['_handleNewChangeSets'](_0x4cd96f){const _0x2b9c4a=_0xcca918;if(this[_0x2b9c4a(0x222)]==='following'&&this['_presenter']===_0x4cd96f[_0x2b9c4a(0x24e)][_0x2b9c4a(0x213)]){let _0x588c7c=_0x317e07(_0x4cd96f[_0x2b9c4a(0x24e)])[_0x2b9c4a(0x25b)][_0x2b9c4a(0x260)]()['find'](_0x19f54f=>_0x19f54f['id']===_0x28a0f6['id']);if(_0x588c7c){let _0x5327dd=_0x588c7c[_0x2b9c4a(0x231)]['unitId'],_0x2dd3e0=_0x588c7c[_0x2b9c4a(0x231)]['sheet']['id'];setTimeout(()=>{const _0x3b112e=_0x2b9c4a;this[_0x3b112e(0x26b)][_0x3b112e(0x211)](_0x442d78['id'],{'unitId':_0x5327dd,'subUnitId':_0x2dd3e0},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x525b83=_0xcca918;var _0x418798;(_0x418798=this[_0x525b83(0x223)])==null||_0x418798[_0x525b83(0x1e2)](),this[_0x525b83(0x25e)][_0x525b83(0x259)](_0x525b83(0x1ee));let _0x6b9e1=new Map(),_0x3b8485=this[_0x525b83(0x223)]=new _0x14d1cb();_0x3b8485['add'](_0x4dbbbb(()=>{const _0x228114=_0x525b83;_0x6b9e1[_0x228114(0x247)](({subject:_0x590e85,subscription:_0x20da8c})=>{const _0x30c093=_0x228114;_0x20da8c[_0x30c093(0x1f3)](),_0x590e85[_0x30c093(0x25c)]();}),_0x6b9e1[_0x228114(0x21d)]();})),_0x3b8485['add'](this['_commandService'][_0x525b83(0x237)](_0x5695c6=>{const _0x2ef0d3=_0x525b83;if(_0x5695c6['type']!==_0x1a009d[_0x2ef0d3(0x224)]||!this[_0x2ef0d3(0x24d)][_0x2ef0d3(0x244)](_0x5695c6['id']))return;let {id:_0x25c49e}=_0x5695c6,_0x5c6489;if(_0x6b9e1[_0x2ef0d3(0x26d)](_0x25c49e))_0x5c6489=_0x6b9e1[_0x2ef0d3(0x1eb)](_0x25c49e)[_0x2ef0d3(0x1f1)];else{var _0x2a8472;_0x5c6489=new _0x3d99f6();let _0x21882a=_0x5c6489[_0x2ef0d3(0x23a)](_0x1efc60((_0x2a8472=this['_configService'][_0x2ef0d3(0x254)]('SAME_OPERATION_SHARE_INTERVAL'))==null?0xc8:_0x2a8472,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x2ef0d3(0x239)](_0x3c8840=>{const _0x49bd1c=_0x2ef0d3;this['_collabSession'][_0x49bd1c(0x243)]({'eventID':_0x243177[_0x49bd1c(0x1fc)],'data':{'unitID':this[_0x49bd1c(0x246)],'operations':{[_0x3c8840['id']]:{'id':_0x3c8840['id'],'params':JSON[_0x49bd1c(0x250)](_0x3c8840[_0x49bd1c(0x231)])}}}},this[_0x49bd1c(0x246)]);});_0x6b9e1['set'](_0x25c49e,{'subject':_0x5c6489,'subscription':_0x21882a});}_0x5c6489[_0x2ef0d3(0x259)](_0x5695c6);})),this[_0x525b83(0x24d)][_0x525b83(0x1f0)](this[_0x525b83(0x246)])[_0x525b83(0x247)](_0x18b5ac=>this[_0x525b83(0x232)][_0x525b83(0x243)]({'eventID':_0x243177[_0x525b83(0x1fc)],'data':{'unitID':this['_unitID'],'operations':{[_0x18b5ac['id']]:{'id':_0x18b5ac['id'],'params':JSON['stringify'](_0x18b5ac['params'])}}}},this[_0x525b83(0x246)]));}[_0xcca918(0x23c)](){const _0x3f5ad4=_0xcca918;var _0x4a1709;this[_0x3f5ad4(0x25e)][_0x3f5ad4(0x259)](_0x3f5ad4(0x1e3)),(_0x4a1709=this['_commandDisposable'])==null||_0x4a1709[_0x3f5ad4(0x1e2)](),this[_0x3f5ad4(0x223)]=null;}[_0xcca918(0x212)](){const _0xe46bfa=_0xcca918;var _0x229fed;(_0x229fed=this[_0xe46bfa(0x223)])==null||_0x229fed['dispose'](),this['_status$'][_0xe46bfa(0x259)]('following');}[_0xcca918(0x216)](){const _0x3be3f4=_0xcca918;var _0x58f4bf;this[_0x3be3f4(0x25e)][_0x3be3f4(0x259)](_0x3be3f4(0x1e3)),(_0x58f4bf=this[_0x3be3f4(0x223)])==null||_0x58f4bf[_0x3be3f4(0x1e2)](),this['_commandDisposable']=null;}[_0xcca918(0x256)](){const _0x3319ac=_0xcca918;var _0x37761d;this[_0x3319ac(0x25e)][_0x3319ac(0x259)]('not-following'),(_0x37761d=this[_0x3319ac(0x223)])==null||_0x37761d[_0x3319ac(0x1e2)]();}[_0xcca918(0x205)](_0x3106a7){const _0x1a0706=_0xcca918;if([_0x1a0706(0x1ee),_0x1a0706(0x253),_0x1a0706(0x1e4)]['includes'](this['_status'])||!_0x3106a7[_0x1a0706(0x24e)]['presenter']||_0x3106a7[_0x1a0706(0x24e)]['presenter']===this[_0x1a0706(0x232)][_0x1a0706(0x23f)]())return;this[_0x1a0706(0x222)]===_0x1a0706(0x1e3)&&this[_0x1a0706(0x212)]();let _0x6de62=_0x3106a7[_0x1a0706(0x24e)][_0x1a0706(0x25a)];Object[_0x1a0706(0x235)](_0x6de62)['forEach'](_0x4f0068=>{const _0x557fa9=_0x1a0706;this[_0x557fa9(0x26b)][_0x557fa9(0x211)](_0x4f0068['id'],_0x4f0068[_0x557fa9(0x231)]?JSON[_0x557fa9(0x229)](_0x4f0068[_0x557fa9(0x231)]):null,{'fromCollab':!0x0});});}[_0xcca918(0x20a)](){const _0x4ae8b4=_0xcca918;var _0x28426c;this[_0x4ae8b4(0x25e)][_0x4ae8b4(0x259)](_0x4ae8b4(0x1e4)),(_0x28426c=this['_commandDisposable'])==null||_0x28426c[_0x4ae8b4(0x1e2)]();}['_handleOnline'](){const _0x124e85=_0xcca918;this[_0x124e85(0x25e)][_0x124e85(0x259)]('idle'),this[_0x124e85(0x230)]();}};J=K([G(0x2,_0xe57a24),G(0x3,_0x3d3509(W)),G(0x4,_0x2d1332)],J);var le=_0xcca918(0x22d),ue=_0xcca918(0x24c);const Y={};let X=class extends _0x5dda2c{constructor(_0xf376ec){const _0x68fea7=_0xcca918;super(),this[_0x68fea7(0x24d)]=_0xf376ec,this['_init']();}[_0xcca918(0x241)](){const _0x3e9353=_0xcca918;[_0x937e41['id'],_0x454eaf['id'],_0x442d78['id']][_0x3e9353(0x247)](_0x9da380=>{const _0x5063e4=_0x3e9353;this[_0x5063e4(0x234)](this[_0x5063e4(0x24d)][_0x5063e4(0x1f9)](_0x9da380));});}};X=K([G(0x0,_0x3d3509(W))],X);function de(){const _0x5851c9=_0xcca918;let _0x31a606=_0x241be1(q),_0x407490=_0x241be1(_0x5837d7),_0x38ae59=_0x3fdd10(()=>_0x407490[_0x5851c9(0x1e8)](_0x146ed0[_0x5851c9(0x219)]),void 0x0,!0x1,[]),_0xd8245d=_0x3fdd10(_0x50e667(()=>_0x38ae59?_0x4c642(()=>_0x4e42e5(_0x31a606[_0x5851c9(0x227)](_0x38ae59[_0x5851c9(0x1df)]()))):_0x4333(null),[_0x38ae59,_0x31a606]),null),_0x45c0d4=_0x3fdd10(_0xd8245d?()=>_0xd8245d['status$']:null,_0x5851c9(0x1e3),!0x1,[_0xd8245d]);return _0xd8245d?_0x3021bb(_0x490e00,{'align':_0x5851c9(0x26e),'disabled':_0x45c0d4===_0x5851c9(0x1e4),'className':_0x5851c9(0x204),'overlay':_0x3021bb(Z,{'status':_0x45c0d4,'coordinator':_0xd8245d}),'children':_0x3021bb('button',{'className':_0x4649fc(_0x5851c9(0x233),{'univer-cursor-not-allowed':_0x45c0d4===_0x5851c9(0x1e4),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x45c0d4!==_0x5851c9(0x1e4)}),'type':'button','children':_0x3021bb(_0x236657,{})})}):null;}function Z(_0x19bc6e){const _0x4c04af=_0xcca918;let {status:_0x21f32e,coordinator:_0x5856d9}=_0x19bc6e;switch(_0x21f32e){case _0x4c04af(0x1e3):return _0x3021bb(fe,{'coordinator':_0x5856d9});case'following':return _0x3021bb(pe,{'coordinator':_0x5856d9});case _0x4c04af(0x253):return _0x3021bb(me,{'coordinator':_0x5856d9});case _0x4c04af(0x1e4):return _0x3021bb(ge,{});case _0x4c04af(0x1ee):return _0x3021bb(he,{'coordinator':_0x5856d9});default:return null;}}function fe(_0x250d91){const _0x55a445=_0xcca918;let {coordinator:_0x25dadc}=_0x250d91;return _0x15b75d(_0x59eb51,{'children':[_0x3021bb('div',{'className':_0x55a445(0x225),'children':_0x55a445(0x24a)}),_0x3021bb(_0x9cbbcc,{'onClick':()=>_0x25dadc[_0x55a445(0x22e)](),'children':_0x55a445(0x1ec)})]});}function pe(_0x32a093){const _0xd16731=_0xcca918;let {coordinator:_0x21c8b2}=_0x32a093;return _0x15b75d(_0x59eb51,{'children':[_0x3021bb(_0xd16731(0x22a),{'className':_0xd16731(0x225),'children':_0xd16731(0x236)}),_0x3021bb(_0x9cbbcc,{'onClick':()=>_0x21c8b2[_0xd16731(0x21b)](),'children':'Stop\x20following'})]});}function me(_0x39a0d5){const _0x7571c0=_0xcca918;let {coordinator:_0x464236}=_0x39a0d5;return _0x15b75d(_0x59eb51,{'children':[_0x3021bb(_0x7571c0(0x22a),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'You\x27re\x20not\x20following\x20the\x20presenter'}),_0x3021bb(_0x9cbbcc,{'variant':_0x7571c0(0x24f),'onClick':()=>_0x464236['startFollowing'](),'children':'Start\x20following'})]});}function he(_0x44c937){const _0x12a708=_0xcca918;let {coordinator:_0x31ed6d}=_0x44c937;return _0x15b75d(_0x59eb51,{'children':[_0x3021bb('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x12a708(0x23b)}),_0x3021bb(_0x9cbbcc,{'variant':_0x12a708(0x1f4),'onClick':()=>_0x31ed6d[_0x12a708(0x21c)](),'children':_0x12a708(0x214)})]});}function ge(){const _0x1a64ea=_0xcca918;return _0x3021bb(_0x59eb51,{'children':_0x1a64ea(0x269)});}let Q=class extends _0x5dda2c{constructor(_0x1d0fc6,_0x495bd0){const _0x425b35=_0xcca918;super(),this['_injector']=_0x1d0fc6,this[_0x425b35(0x265)]=_0x495bd0,this['_mountLiveShare']();}[_0xcca918(0x271)](){const _0x5056ee=_0xcca918;this[_0x5056ee(0x234)](this['_uiPartsService']['registerComponent'](_0x3fad02[_0x5056ee(0x262)],()=>_0x3c9d65(de,this[_0x5056ee(0x263)])));}};Q=K([G(0x0,_0x3d3509(_0x3e0c27)),G(0x1,_0xce0b1f)],Q);let $=class extends _0x1d3090{constructor(_0x45c7ac=Y,_0x118060,_0x54446c){const _0x514492=_0xcca918;super(),this[_0x514492(0x25d)]=_0x45c7ac,this[_0x514492(0x263)]=_0x118060,this[_0x514492(0x217)]=_0x54446c;let {..._0x11e9ee}=_0x3bddf0({},Y,this[_0x514492(0x25d)]);this[_0x514492(0x217)][_0x514492(0x21f)]('live-share.config',_0x11e9ee);}['onStarting'](){const _0x153e46=_0xcca918;_0xc05a66(this['_injector'],_0x1e951f([[W],[q],[X],[Q]],this[_0x153e46(0x25d)][_0x153e46(0x26a)])),_0x41f06e(this[_0x153e46(0x263)],[[X]]);}[_0xcca918(0x240)](){const _0xc0813b=_0xcca918;_0x41f06e(this[_0xc0813b(0x263)],[[Q]]);}};function _0x1ae4(){const _0x5a0314=['_collabSessionService','not-following','getConfig','object','_stopFollowing','getLiveShareCoordinatorSync','string','next','operations','mutations','complete','_config','_status$','4299981nmhOlx','reverse','_entities','HEADER_MENU','_injector','version','_uiPartsService','26417727AOEnnj','defineProperty','from','You\x27are\x20offline.','override','_commandService','UNIVER_UNKNOWN','has','end','2351136PkBTnw','packageName','_mountLiveShare','getUnitId','symbol','_sharedOperations','dispose','idle','offline','LIVESHARE_REQUEST_HOST','following','decorate','getCurrentTypeOfUnit$','asObservable','5278tvatfx','get','Start','status$','presenting','delete','getInitialStates','subject','getTypeOfUnitDisposed$','unsubscribe','default','UNIVER_LIVE_SHARE_PLUGIN','NEW_CHANGESETS','_presenter','map','registerSharedOperation','_univerInstanceService','158985vyfKcL','LIVESHARE_OPERATION','LIVESHARE_FETCH_OPERATIONS','_handleNewChangeSets','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','FOLLOWING','_reporters','9774dCKpoJ','_startPresenting','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','_handleOperation','length','prototype','574420wDoFMx','init','_handleOffline','LIVESHARE_NEW_HOST','dispose$','_handleOnline','NOT_FOLLOWING','OFFLINE','IDLE','executeCommand','_startFollowing','memberID','Stop\x20presenting','sessionStatus$','_beIdle','_configService','event$','UNIVER_SHEET','6XZSyZu','stopFollowing','stopPresenting','clear','call','setConfig','_handleNewHost','type','_status','_commandDisposable','OPERATION','univer-mb-3\x20univer-w-full\x20univer-text-sm','ONLINE','getLiveShareCoordinator','2849740kXsyTH','parse','div','_startLiveShareCoordinator','PRESENTING','@univerjs-pro/live-share','tryStartPresenting','_handleTerminate','_fetchOperations','params','_collabSession','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','disposeWithMe','values','You\x27re\x20following\x20the\x20presenter','onCommandExecuted','pluginName','subscribe','pipe','You\x27re\x20presenting\x20the\x20document','_stopPresenting','LIVESHARE_TERMINATE','requireSession','getMemberID','onRendered','_init','function','send','shouldShareOperation','constructor','_unitID','forEach','getOwnPropertyDescriptor','getTypeOfUnitAdded$','Present\x20this\x20document','unit','1.0.0-alpha.8','_liveShareService','data','text','stringify','add'];_0x1ae4=function(){return _0x5a0314;};return _0x1ae4();}U($,_0xcca918(0x221),_0x146ed0[_0xcca918(0x26c)]),U($,_0xcca918(0x238),_0xcca918(0x1f5)),U($,_0xcca918(0x270),le),U($,_0xcca918(0x264),ue),$=K([_0x35fd8d(_0x20c31b,_0x2b3cfa,_0xf25c4),G(0x1,_0x3d3509(_0x3e0c27)),G(0x2,_0xe57a24)],$);export{q as LiveShareController,ce as LiveShareStatus,$ as UniverLiveSharePlugin};
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x567e(_0x1c329a,_0xed3e8c){_0x1c329a=_0x1c329a-0x12c;const _0x162a4f=_0x162a();let _0x567e2d=_0x162a4f[_0x1c329a];return _0x567e2d;}function _0x162a(){const _0x283132=['LiveShareController','@univerjs/core','getCurrentUnitOfType','@univerjs/core/facade','6541722AmWmIa','FEnum','UniverCore','getUnitId','No\x20active\x20workbook\x20found.','LiveShareStatusEnum','defineProperty','56rvjqZf','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','startFollowing','tryStartPresenting','UniverProLiveShare','72894TOcQDX','get','startPresenting','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','UniverInstanceType','getLiveShareCoordinatorSync','201129HyUsoI','20457PQSrqE','getLiveShareStatus','380VDvTRf','UNIVER_SHEET','IUniverInstanceService','constructor','extend','object','LiveShareStatus','_liveShareController','5AVOsQI','function','2768507hdvzHK','string','70370PdrSVC','symbol','stopFollowing','default','@univerjs-pro/live-share','3064paAXuT','stopPresenting','_injector','getStatus','toPrimitive','13281750GTEqsm'];_0x162a=function(){return _0x283132;};return _0x162a();}(function(_0x15db55,_0xdbd937){const _0x421276=_0x567e,_0x2de499=_0x15db55();while(!![]){try{const _0x336e94=-parseInt(_0x421276(0x131))/0x1*(-parseInt(_0x421276(0x135))/0x2)+parseInt(_0x421276(0x156))/0x3*(-parseInt(_0x421276(0x14b))/0x4)+parseInt(_0x421276(0x159))/0x5*(parseInt(_0x421276(0x150))/0x6)+parseInt(_0x421276(0x133))/0x7+-parseInt(_0x421276(0x13a))/0x8*(-parseInt(_0x421276(0x157))/0x9)+-parseInt(_0x421276(0x13f))/0xa+parseInt(_0x421276(0x144))/0xb;if(_0x336e94===_0xdbd937)break;else _0x2de499['push'](_0x2de499['shift']());}catch(_0x4b7a49){_0x2de499['push'](_0x2de499['shift']());}}}(_0x162a,0xa93f2),function(_0x220387,_0x4096d5){const _0x1d2ad9=_0x567e;typeof exports==_0x1d2ad9(0x12e)&&typeof module<'u'?_0x4096d5(require('@univerjs-pro/live-share'),require('@univerjs/core'),require('@univerjs/core/facade')):typeof define==_0x1d2ad9(0x132)&&define['amd']?define([_0x1d2ad9(0x139),_0x1d2ad9(0x141),_0x1d2ad9(0x143)],_0x4096d5):(_0x220387=typeof globalThis<'u'?globalThis:_0x220387||self,_0x4096d5(_0x220387[_0x1d2ad9(0x14f)],_0x220387[_0x1d2ad9(0x146)],_0x220387['UniverCoreFacade']));}(this,function(_0x16106a,_0x761028,_0x188c01){const _0x4efb93=_0x567e;function _0x5cd73f(_0x5b53b5){'@babel/helpers - typeof';const _0x256263=_0x567e;return _0x5cd73f=typeof Symbol==_0x256263(0x132)&&typeof Symbol['iterator']==_0x256263(0x136)?function(_0x79b0a0){return typeof _0x79b0a0;}:function(_0x3e33d5){const _0x483db1=_0x256263;return _0x3e33d5&&typeof Symbol==_0x483db1(0x132)&&_0x3e33d5[_0x483db1(0x12c)]===Symbol&&_0x3e33d5!==Symbol['prototype']?'symbol':typeof _0x3e33d5;},_0x5cd73f(_0x5b53b5);}function _0x1042aa(_0x26b6da,_0x1badc8){const _0x3c5349=_0x567e;if(_0x5cd73f(_0x26b6da)!=_0x3c5349(0x12e)||!_0x26b6da)return _0x26b6da;var _0x2ece90=_0x26b6da[Symbol[_0x3c5349(0x13e)]];if(_0x2ece90!==void 0x0){var _0x52f4e0=_0x2ece90['call'](_0x26b6da,_0x1badc8||_0x3c5349(0x138));if(_0x5cd73f(_0x52f4e0)!='object')return _0x52f4e0;throw TypeError(_0x3c5349(0x14c));}return(_0x1badc8===_0x3c5349(0x134)?String:Number)(_0x26b6da);}function _0x5463b5(_0x32e268){const _0x6be711=_0x567e;var _0x14ba3b=_0x1042aa(_0x32e268,_0x6be711(0x134));return _0x5cd73f(_0x14ba3b)=='symbol'?_0x14ba3b:_0x14ba3b+'';}function _0x2971cc(_0xc17144,_0x1d3862,_0x5575c9){const _0x46d55e=_0x567e;return(_0x1d3862=_0x5463b5(_0x1d3862))in _0xc17144?Object[_0x46d55e(0x14a)](_0xc17144,_0x1d3862,{'value':_0x5575c9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xc17144[_0x1d3862]=_0x5575c9,_0xc17144;}var _0x5ccc81=class extends _0x188c01['FUniver']{constructor(..._0x182c43){const _0x3b52c6=_0x567e;super(..._0x182c43),_0x2971cc(this,_0x3b52c6(0x130),void 0x0);}['_initialize'](_0x58528b){const _0x2f342a=_0x567e;this[_0x2f342a(0x130)]=_0x58528b[_0x2f342a(0x151)](_0x16106a[_0x2f342a(0x140)]);}[_0x4efb93(0x158)](){const _0x162f12=_0x4efb93;var _0x410eb3;let _0x3034f=this['_injector'][_0x162f12(0x151)](_0x761028['IUniverInstanceService'])[_0x162f12(0x142)](_0x761028[_0x162f12(0x154)]['UNIVER_SHEET']);if(!_0x3034f)throw Error('No\x20active\x20workbook\x20found.');let _0x282527=_0x3034f[_0x162f12(0x147)](),_0x5e1991=this[_0x162f12(0x130)]['getLiveShareCoordinatorSync'](_0x282527);return(_0x410eb3=_0x5e1991==null?void 0x0:_0x5e1991[_0x162f12(0x13d)]())==null?_0x16106a[_0x162f12(0x12f)]['IDLE']:_0x410eb3;}[_0x4efb93(0x14d)](){const _0x51837d=_0x4efb93;let _0x18921e=this[_0x51837d(0x13c)][_0x51837d(0x151)](_0x761028['IUniverInstanceService'])[_0x51837d(0x142)](_0x761028[_0x51837d(0x154)][_0x51837d(0x15a)]);if(!_0x18921e)throw Error(_0x51837d(0x148));let _0x249fac=_0x18921e[_0x51837d(0x147)](),_0x113e84=this[_0x51837d(0x130)]['getLiveShareCoordinatorSync'](_0x249fac);if(!_0x113e84)throw Error(_0x51837d(0x153));_0x113e84['startFollowing']();}[_0x4efb93(0x137)](){const _0x4af4ed=_0x4efb93;let _0x83dd84=this[_0x4af4ed(0x13c)][_0x4af4ed(0x151)](_0x761028[_0x4af4ed(0x15b)])['getCurrentUnitOfType'](_0x761028[_0x4af4ed(0x154)]['UNIVER_SHEET']);if(!_0x83dd84)throw Error(_0x4af4ed(0x148));let _0x47d2f1=_0x83dd84['getUnitId'](),_0x1ca783=this['_liveShareController'][_0x4af4ed(0x155)](_0x47d2f1);if(!_0x1ca783)throw Error(_0x4af4ed(0x153));_0x1ca783[_0x4af4ed(0x137)]();}[_0x4efb93(0x152)](){const _0x240628=_0x4efb93;let _0x44e5b2=this[_0x240628(0x13c)]['get'](_0x761028['IUniverInstanceService'])[_0x240628(0x142)](_0x761028[_0x240628(0x154)][_0x240628(0x15a)]);if(!_0x44e5b2)throw Error(_0x240628(0x148));let _0x289f9f=_0x44e5b2[_0x240628(0x147)](),_0x4cca24=this[_0x240628(0x130)][_0x240628(0x155)](_0x289f9f);if(!_0x4cca24)throw Error(_0x240628(0x153));_0x4cca24[_0x240628(0x14e)]();}[_0x4efb93(0x13b)](){const _0x45a498=_0x4efb93;let _0x2f8c10=this['_injector']['get'](_0x761028[_0x45a498(0x15b)])[_0x45a498(0x142)](_0x761028[_0x45a498(0x154)][_0x45a498(0x15a)]);if(!_0x2f8c10)throw Error(_0x45a498(0x148));let _0x1133b0=_0x2f8c10[_0x45a498(0x147)](),_0x548151=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x1133b0);if(!_0x548151)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x548151[_0x45a498(0x13b)]();}};_0x188c01['FUniver'][_0x4efb93(0x12d)](_0x5ccc81);var _0x5b1192=class extends _0x188c01[_0x4efb93(0x145)]{get[_0x4efb93(0x149)](){const _0x2994e5=_0x4efb93;return _0x16106a[_0x2994e5(0x12f)];}};_0x188c01[_0x4efb93(0x145)]['extend'](_0x5b1192);}));
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x46a3(){const _0x2a17c4=['defIds','CollaborationEvent','456669KOqNmZ','unsubscribe','UNIVER_LIVE_SHARE_PLUGIN','HEADER_MENU','_handleOffline','dispose$','LIVESHARE_FETCH_OPERATIONS','url(#$1','_stopPresenting','complete','includes','_fetchOperations','SessionStatus','values','UniverSheetsUi','IUIPartsService','toDisposable','tag','asObservable','map','54210xxvvRG','_startLiveShareCoordinator','PRESENTING','getConfig','SetWorksheetActiveOperation','Start','univer-mb-3\x20univer-w-full\x20univer-text-sm','_injector','useMemo','subscribe','init','ONLINE','add','entries','_init','_handleOnline','getLiveShareCoordinator','_reporters','5OALvSJ','defer','_handleOperation','sheet','LiveShareIcon','FOLLOWING','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','CommandType','merge','live-share.config','sessionStatus$','operations','exports','presenting','LiveShareController','override','jsx','UniverCore','_handleTerminate','button','@univerjs/sheets-ui','Start\x20following','LiveShareStatus','has','SetZoomRatioOperation','getMemberID','NEW_CHANGESETS','UniverProCollaborationClient','forwardRef','object','You\x27re\x20following\x20the\x20presenter','UNIVER_UNKNOWN','_status$','You\x27re\x20not\x20following\x20the\x20presenter','_entities','shouldShareOperation','RxDisposable','1728376sKnhNj','react/jsx-runtime','startFollowing','string','UNIVER_SHEET','symbol','jsxs','params','takeUntil','LIVESHARE_TERMINATE','_handleNewHost','_status','UniverSheets','connectInjector','_sharedOperations','Stop\x20presenting','_uiPartsService','length','tryStartPresenting','attrs','LIVESHARE_REQUEST_HOST','_startFollowing','currentColor','use','disposeWithMe','6meDyND','onRendered','getTypeOfUnitDisposed$','_beIdle','UniverLiveSharePlugin','@univerjs/core','rxjs/operators','pluginName','find','stringify','iterator','OFFLINE','_commandService','rxjs','unit','registerInitialStateReporter','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','_presenter','decorate','UniverInstanceType','xlink:href','react','IDLE','Present\x20this\x20document','_configService','div','useObservable','live-share-icon','packageName','getInitialStates','Stop\x20following','random','React','clear','trim','getCurrentTypeOfUnit$','getUnitId','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getLiveShareCoordinatorSync','from','1701024XfyjUE','constructor','getTypeOfUnitAdded$','UniverUi','@univerjs-pro/live-share','_mountLiveShare','colorChannel1','UniverProLiveShare','useDependency','offline','BuiltInUIPart','_liveShareService','end','mergeOverrideWithDependencies','M9.20459\x204.90474C9.20459\x204.64763\x209.35535\x204.54174\x209.54053\x204.68737L11.2643\x206.04046C11.4495\x206.18609\x2011.4495\x206.42299\x2011.2643\x206.56789L9.55334\x207.90706C9.36755\x208.05269\x209.20386\x207.90499\x209.20386\x207.68969V6.96785H8.94446C8.19543\x206.96785\x206.72595\x207.28347\x206.37646\x207.89174C6.30786\x208.00322\x206.23572\x207.97884\x206.23572\x207.89174C6.25073\x206.80828\x208.0918\x205.58895\x209.17383\x205.58895H9.20459V4.90474Z','path','throttleTime','parse','unitId','createInstance','stroke','subject','3518963vakGGJ','LIVESHARE_OPERATION','requireSession','send','OPERATION','evenodd','UniverDesign','dispose','Fragment','stopPresenting','forEach','replace','_config','createElement','fill','function','data','reverse','text','assign','UniverCollaborationClientPlugin','Subject','event$','idSuffix','memberID','touchDependencies','_commandDisposable','next','stopFollowing','613301tkYaPR','toString','Plugin','_unitID','_collabSession','_collabSessionService','idle','pipe','IUniverInstanceService','@univerjs/ui','_stopFollowing','1em','substring','Inject','Injector','You\x27re\x20presenting\x20the\x20document','BehaviorSubject','DisposableCollection','defineProperty','not-following','CollaborationSessionService','getOwnPropertyDescriptor','_univerInstanceService','get','toStringTag','onCommandExecuted','following','IConfigService','children','Button','@univerjs-pro/collaboration','InsertSheetMutation','_handleNewChangeSets','type','M1.98682\x202.73096C1.98682\x202.17867\x202.43457\x201.73096\x202.98682\x201.73096H14.9868C15.5391\x201.73096\x2015.9868\x202.17867\x2015.9868\x202.73096V9.90105C15.9868\x2010.4533\x2015.5391\x2010.901\x2014.9868\x2010.901H9.62183V13.5577H12.9868C13.3375\x2013.5577\x2013.6218\x2013.842\x2013.6218\x2014.1927C13.6218\x2014.5434\x2013.3375\x2014.8277\x2012.9868\x2014.8277H4.98682C4.63611\x2014.8277\x204.35181\x2014.5434\x204.35181\x2014.1927C4.35181\x2013.842\x204.63611\x2013.5577\x204.98682\x2013.5577H8.35181V10.901H2.98682C2.43457\x2010.901\x201.98682\x2010.4533\x201.98682\x209.90105V2.73096ZM3.25684\x209.63106V3.00095H14.7168V9.63106H3.25684Z','executeCommand','status$','Disposable','695274kUOOAc','You\x27are\x20offline.','mutations','operators','delete','ICommandService'];_0x46a3=function(){return _0x2a17c4;};return _0x46a3();}function _0x34ce(_0x4c10d1,_0x2e5b02){_0x4c10d1=_0x4c10d1-0x13b;const _0x46a3eb=_0x46a3();let _0x34ce7c=_0x46a3eb[_0x4c10d1];return _0x34ce7c;}(function(_0x8cc250,_0x6a9246){const _0x3e58d7=_0x34ce,_0x1bfc84=_0x8cc250();while(!![]){try{const _0x47d3b0=parseInt(_0x3e58d7(0x1a5))/0x1+parseInt(_0x3e58d7(0x14a))/0x2*(-parseInt(_0x3e58d7(0x1e7))/0x3)+-parseInt(_0x3e58d7(0x21e))/0x4+-parseInt(_0x3e58d7(0x1f9))/0x5*(parseInt(_0x3e58d7(0x1cb))/0x6)+parseInt(_0x3e58d7(0x188))/0x7+-parseInt(_0x3e58d7(0x172))/0x8+parseInt(_0x3e58d7(0x1d3))/0x9;if(_0x47d3b0===_0x6a9246)break;else _0x1bfc84['push'](_0x1bfc84['shift']());}catch(_0xb72913){_0x1bfc84['push'](_0x1bfc84['shift']());}}}(_0x46a3,0x55ec4),function(_0x574203,_0x46607a){const _0xcdc4e6=_0x34ce;typeof exports==_0xcdc4e6(0x216)&&typeof module<'u'?_0x46607a(exports,require('@univerjs-pro/collaboration'),require('@univerjs-pro/collaboration-client'),require('@univerjs/core'),require('@univerjs/sheets'),require('rxjs'),require('rxjs/operators'),require('@univerjs/sheets-ui'),require('@univerjs/ui'),require('@univerjs/design'),require('react'),require('react/jsx-runtime')):typeof define==_0xcdc4e6(0x197)&&define['amd']?define([_0xcdc4e6(0x205),_0xcdc4e6(0x1c3),'@univerjs-pro/collaboration-client',_0xcdc4e6(0x14f),'@univerjs/sheets',_0xcdc4e6(0x157),_0xcdc4e6(0x150),_0xcdc4e6(0x20d),_0xcdc4e6(0x1ae),'@univerjs/design',_0xcdc4e6(0x15f),_0xcdc4e6(0x21f)],_0x46607a):(_0x574203=typeof globalThis<'u'?globalThis:_0x574203||self,_0x46607a(_0x574203[_0xcdc4e6(0x179)]={},_0x574203['UniverProCollaboration'],_0x574203[_0xcdc4e6(0x214)],_0x574203[_0xcdc4e6(0x20a)],_0x574203[_0xcdc4e6(0x13d)],_0x574203[_0xcdc4e6(0x157)],_0x574203['rxjs'][_0xcdc4e6(0x1ce)],_0x574203[_0xcdc4e6(0x1e1)],_0x574203[_0xcdc4e6(0x175)],_0x574203[_0xcdc4e6(0x18e)],_0x574203['React'],_0x574203[_0xcdc4e6(0x16a)]));}(this,function(_0x131977,_0x25303d,_0x5a9e64,_0xb25766,_0x41b70d,_0x1eb6fd,_0x2409b5,_0x221dfd,_0x50de09,_0x4172f9,_0x1a58aa,_0x31f262){const _0x1d4d30=_0x34ce;Object[_0x1d4d30(0x1b7)](_0x131977,Symbol[_0x1d4d30(0x1bd)],{'value':'Module'});function _0x11310f(_0x1876bd){'@babel/helpers - typeof';const _0x103fcd=_0x1d4d30;return _0x11310f=typeof Symbol==_0x103fcd(0x197)&&typeof Symbol[_0x103fcd(0x154)]=='symbol'?function(_0x2a66a4){return typeof _0x2a66a4;}:function(_0x4bd990){const _0x55e43=_0x103fcd;return _0x4bd990&&typeof Symbol=='function'&&_0x4bd990[_0x55e43(0x173)]===Symbol&&_0x4bd990!==Symbol['prototype']?'symbol':typeof _0x4bd990;},_0x11310f(_0x1876bd);}function _0x16bfa2(_0x24ae56,_0x5a1a24){const _0xfcea1c=_0x1d4d30;if(_0x11310f(_0x24ae56)!=_0xfcea1c(0x216)||!_0x24ae56)return _0x24ae56;var _0x246ee5=_0x24ae56[Symbol['toPrimitive']];if(_0x246ee5!==void 0x0){var _0x82bfd9=_0x246ee5['call'](_0x24ae56,_0x5a1a24||'default');if(_0x11310f(_0x82bfd9)!='object')return _0x82bfd9;throw TypeError(_0xfcea1c(0x16f));}return(_0x5a1a24==='string'?String:Number)(_0x24ae56);}function _0x3aecc9(_0x130830){const _0x17f93=_0x1d4d30;var _0x2f678b=_0x16bfa2(_0x130830,_0x17f93(0x221));return _0x11310f(_0x2f678b)==_0x17f93(0x223)?_0x2f678b:_0x2f678b+'';}function _0x198a30(_0x58dd6e,_0x1052ca,_0x6a504b){const _0x4966f2=_0x1d4d30;return(_0x1052ca=_0x3aecc9(_0x1052ca))in _0x58dd6e?Object[_0x4966f2(0x1b7)](_0x58dd6e,_0x1052ca,{'value':_0x6a504b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x58dd6e[_0x1052ca]=_0x6a504b,_0x58dd6e;}var _0x52b9e9=class extends _0xb25766[_0x1d4d30(0x1ca)]{constructor(..._0x2897e6){const _0x5c87a0=_0x1d4d30;super(..._0x2897e6),_0x198a30(this,_0x5c87a0(0x13f),new Set()),_0x198a30(this,'_reporters',new Set());}['registerSharedOperation'](_0x395715){const _0x366d74=_0x1d4d30;return this[_0x366d74(0x13f)][_0x366d74(0x1f3)](_0x395715),(0x0,_0xb25766[_0x366d74(0x1e3)])(()=>this[_0x366d74(0x13f)][_0x366d74(0x1cf)](_0x395715));}[_0x1d4d30(0x159)](_0x1590fe){const _0x3aa75b=_0x1d4d30;return this[_0x3aa75b(0x1f8)][_0x3aa75b(0x1f3)](_0x1590fe),(0x0,_0xb25766[_0x3aa75b(0x1e3)])(()=>this['_reporters']['delete'](_0x1590fe));}[_0x1d4d30(0x21c)](_0x2aac96){const _0x3d0d42=_0x1d4d30;return this[_0x3d0d42(0x13f)][_0x3d0d42(0x210)](_0x2aac96);}[_0x1d4d30(0x167)](_0x17f748){const _0x11d1c3=_0x1d4d30;return Array[_0x11d1c3(0x171)](this['_reporters'])['map'](_0x37a253=>_0x37a253(_0x17f748));}};function _0x36dd09(_0x1c3454,_0x4e2156){return function(_0x2a29b0,_0x52047a){_0x4e2156(_0x2a29b0,_0x52047a,_0x1c3454);};}function _0x2b4402(_0x270452,_0xabe118,_0xda14af,_0x44e96f){const _0x3340a9=_0x1d4d30;var _0x7ba905=arguments[_0x3340a9(0x142)],_0x2ebf17=_0x7ba905<0x3?_0xabe118:_0x44e96f===null?_0x44e96f=Object[_0x3340a9(0x1ba)](_0xabe118,_0xda14af):_0x44e96f,_0x2ea05e;if(typeof Reflect==_0x3340a9(0x216)&&typeof Reflect[_0x3340a9(0x15c)]==_0x3340a9(0x197))_0x2ebf17=Reflect[_0x3340a9(0x15c)](_0x270452,_0xabe118,_0xda14af,_0x44e96f);else{for(var _0x43818f=_0x270452[_0x3340a9(0x142)]-0x1;_0x43818f>=0x0;_0x43818f--)(_0x2ea05e=_0x270452[_0x43818f])&&(_0x2ebf17=(_0x7ba905<0x3?_0x2ea05e(_0x2ebf17):_0x7ba905>0x3?_0x2ea05e(_0xabe118,_0xda14af,_0x2ebf17):_0x2ea05e(_0xabe118,_0xda14af))||_0x2ebf17);}return _0x7ba905>0x3&&_0x2ebf17&&Object['defineProperty'](_0xabe118,_0xda14af,_0x2ebf17),_0x2ebf17;}let _0x47372d=class extends _0xb25766[_0x1d4d30(0x21d)]{constructor(_0x24b8ea,_0x5d9801,_0x16597a){const _0x5c6f91=_0x1d4d30;super(),this['_univerInstanceService']=_0x24b8ea,this[_0x5c6f91(0x1ee)]=_0x5d9801,this[_0x5c6f91(0x1aa)]=_0x16597a,_0x198a30(this,_0x5c6f91(0x21b),new Map()),this[_0x5c6f91(0x1f5)]();}async[_0x1d4d30(0x1f7)](_0x963e53){const _0x1f207d=_0x1d4d30;return this['_entities']['has'](_0x963e53)||await this[_0x1f207d(0x1e8)](_0x963e53),this[_0x1f207d(0x21b)][_0x1f207d(0x1bc)](_0x963e53);}[_0x1d4d30(0x170)](_0x189e42){const _0x3122fd=_0x1d4d30;var _0x5709b5;return(_0x5709b5=this[_0x3122fd(0x21b)]['get'](_0x189e42))==null?null:_0x5709b5;}['_init'](){const _0x443cc1=_0x1d4d30;this[_0x443cc1(0x1bb)][_0x443cc1(0x174)](_0xb25766[_0x443cc1(0x15d)][_0x443cc1(0x222)])[_0x443cc1(0x1ac)]((0x0,_0x2409b5[_0x443cc1(0x226)])(this[_0x443cc1(0x1d8)]))[_0x443cc1(0x1f0)](async _0x4fa743=>{const _0x47cc66=_0x443cc1;let _0x466fb3=_0x4fa743[_0x47cc66(0x158)]['getUnitId']();this[_0x47cc66(0x21b)][_0x47cc66(0x210)](_0x466fb3)||this[_0x47cc66(0x1e8)](_0x466fb3);}),this[_0x443cc1(0x1bb)][_0x443cc1(0x14c)](_0xb25766['UniverInstanceType']['UNIVER_SHEET'])[_0x443cc1(0x1ac)]((0x0,_0x2409b5[_0x443cc1(0x226)])(this[_0x443cc1(0x1d8)]))[_0x443cc1(0x1f0)](_0x39716b=>{const _0x2a37cf=_0x443cc1;let _0x13bd3b=_0x39716b[_0x2a37cf(0x16e)](),_0x30cbae=this[_0x2a37cf(0x21b)][_0x2a37cf(0x1bc)](_0x13bd3b);_0x30cbae==null||_0x30cbae[_0x2a37cf(0x18f)]();});}async['_startLiveShareCoordinator'](_0x4ed574){const _0x34df0d=_0x1d4d30;let _0xd6dfeb=await this[_0x34df0d(0x1aa)][_0x34df0d(0x18a)](_0x4ed574),_0x2dfca2=this[_0x34df0d(0x1ee)][_0x34df0d(0x185)](_0x461a3b,_0x4ed574,_0xd6dfeb);return _0x2dfca2[_0x34df0d(0x1f1)](),this[_0x34df0d(0x21b)]['set'](_0x4ed574,_0x2dfca2),_0x2dfca2;}};_0x47372d=_0x2b4402([_0x36dd09(0x0,_0xb25766[_0x1d4d30(0x1ad)]),_0x36dd09(0x1,(0x0,_0xb25766[_0x1d4d30(0x1b2)])(_0xb25766['Injector'])),_0x36dd09(0x2,(0x0,_0xb25766['Inject'])(_0x5a9e64[_0x1d4d30(0x1b9)]))],_0x47372d);let _0x267d9f=function(_0x3a200a){const _0x37871a=_0x1d4d30;return _0x3a200a[_0x37871a(0x155)]=_0x37871a(0x17b),_0x3a200a[_0x37871a(0x160)]=_0x37871a(0x1ab),_0x3a200a[_0x37871a(0x1fe)]=_0x37871a(0x1bf),_0x3a200a['NOT_FOLLOWING']=_0x37871a(0x1b8),_0x3a200a[_0x37871a(0x1e9)]=_0x37871a(0x206),_0x3a200a;}({}),_0x461a3b=class extends _0xb25766[_0x1d4d30(0x21d)]{get[_0x1d4d30(0x13c)](){const _0x4db36e=_0x1d4d30;return this[_0x4db36e(0x219)]['getValue']();}constructor(_0x24131f,_0x51cfe4,_0x438d07,_0x1cd029,_0x525c48){const _0x4b5965=_0x1d4d30;super(),this[_0x4b5965(0x1a8)]=_0x24131f,this[_0x4b5965(0x1a9)]=_0x51cfe4,this[_0x4b5965(0x162)]=_0x438d07,this['_liveShareService']=_0x1cd029,this['_commandService']=_0x525c48,_0x198a30(this,_0x4b5965(0x219),new _0x1eb6fd[(_0x4b5965(0x1b5))](_0x4b5965(0x1ab))),_0x198a30(this,_0x4b5965(0x1c9),this[_0x4b5965(0x219)][_0x4b5965(0x1e5)]()),_0x198a30(this,_0x4b5965(0x1f5),!0x1),_0x198a30(this,'_commandDisposable',null),_0x198a30(this,_0x4b5965(0x15b),null);}[_0x1d4d30(0x18f)](){const _0x41e696=_0x1d4d30;var _0x405a29;(_0x405a29=this[_0x41e696(0x1a2)])==null||_0x405a29[_0x41e696(0x18f)](),this[_0x41e696(0x219)][_0x41e696(0x1a3)](_0x41e696(0x1ab)),this[_0x41e696(0x219)][_0x41e696(0x1dc)]();}['getStatus'](){return this['_status'];}[_0x1d4d30(0x1f1)](){const _0x37888d=_0x1d4d30;this[_0x37888d(0x1f5)]||(this['_init']=!0x0,this['_collabSession'][_0x37888d(0x203)][_0x37888d(0x1ac)]((0x0,_0x2409b5[_0x37888d(0x226)])(this['dispose$']))[_0x37888d(0x1f0)](_0x26969a=>{const _0x513e18=_0x37888d;switch(_0x26969a){case _0x5a9e64['SessionStatus'][_0x513e18(0x155)]:this[_0x513e18(0x1d7)]();break;case _0x5a9e64[_0x513e18(0x1df)][_0x513e18(0x1f2)]:this[_0x513e18(0x1f6)]();break;default:}}),this[_0x37888d(0x1a9)][_0x37888d(0x19e)][_0x37888d(0x1ac)]((0x0,_0x2409b5[_0x37888d(0x226)])(this[_0x37888d(0x1d8)]))[_0x37888d(0x1f0)](_0x3564e2=>{const _0x16cdb=_0x37888d;let {eventID:_0x5039ad}=_0x3564e2;switch(_0x5039ad){case _0x25303d[_0x16cdb(0x1d2)]['LIVESHARE_NEW_HOST']:this['_handleNewHost'](_0x3564e2);break;case _0x25303d['CollaborationEvent'][_0x16cdb(0x189)]:this[_0x16cdb(0x1fb)](_0x3564e2);break;case _0x25303d[_0x16cdb(0x1d2)]['LIVESHARE_TERMINATE']:this[_0x16cdb(0x20b)]();break;case _0x25303d[_0x16cdb(0x1d2)][_0x16cdb(0x213)]:this[_0x16cdb(0x1c5)](_0x3564e2);break;default:}}));}[_0x1d4d30(0x143)](){const _0x259182=_0x1d4d30;this['_collabSession']['send']({'eventID':_0x25303d[_0x259182(0x1d2)][_0x259182(0x145)],'data':{'unitID':this['_unitID'],'userID':this[_0x259182(0x1a9)]['getMemberID']()}},this['_unitID']);}['stopPresenting'](){const _0x55e6ec=_0x1d4d30;this[_0x55e6ec(0x13c)]===_0x55e6ec(0x206)&&(this['_status$'][_0x55e6ec(0x1a3)](_0x55e6ec(0x1ab)),this[_0x55e6ec(0x1a9)][_0x55e6ec(0x18b)]({'eventID':_0x25303d[_0x55e6ec(0x1d2)][_0x55e6ec(0x227)],'data':{'unitID':this[_0x55e6ec(0x1a8)]}},this[_0x55e6ec(0x1a8)]));}[_0x1d4d30(0x220)](){const _0x1c96c4=_0x1d4d30;this[_0x1c96c4(0x13c)]===_0x1c96c4(0x1b8)&&(this[_0x1c96c4(0x219)][_0x1c96c4(0x1a3)](_0x1c96c4(0x1bf)),this[_0x1c96c4(0x146)]());}[_0x1d4d30(0x1a4)](){const _0x32f245=_0x1d4d30;this['_status']===_0x32f245(0x1bf)&&this[_0x32f245(0x1af)]();}[_0x1d4d30(0x13b)](_0x47e882){const _0xcb7b91=_0x1d4d30;let {presenter:_0x1a709b}=_0x47e882[_0xcb7b91(0x198)],_0x2a7225=this[_0xcb7b91(0x1a9)]['getMemberID']();this['_presenter']=_0x1a709b,_0x1a709b===_0x2a7225?(this['_stopFollowing'](),this['_startPresenting']()):this['_status']!=='not-following'&&(this[_0xcb7b91(0x1db)](),this[_0xcb7b91(0x146)]());}[_0x1d4d30(0x1de)](){const _0x4dbea0=_0x1d4d30;let _0x3f96eb={'eventID':_0x25303d[_0x4dbea0(0x1d2)][_0x4dbea0(0x1d9)]};this[_0x4dbea0(0x1a9)]['send'](_0x3f96eb,this[_0x4dbea0(0x1a8)]);}[_0x1d4d30(0x20b)](){const _0x20d9ab=_0x1d4d30;this['_presenter']=null,this[_0x20d9ab(0x13c)]!==_0x20d9ab(0x206)&&this['_beIdle']();}['_handleNewChangeSets'](_0x4e361e){const _0xc22c50=_0x1d4d30;if(this[_0xc22c50(0x13c)]===_0xc22c50(0x1bf)&&this[_0xc22c50(0x15b)]===_0x4e361e[_0xc22c50(0x198)][_0xc22c50(0x1a0)]){let _0x525f24=(0x0,_0x25303d['parseProtocolChangeset'])(_0x4e361e[_0xc22c50(0x198)])[_0xc22c50(0x1cd)][_0xc22c50(0x199)]()[_0xc22c50(0x152)](_0x13090e=>_0x13090e['id']===_0x41b70d[_0xc22c50(0x1c4)]['id']);if(_0x525f24){let _0xe77d4a=_0x525f24['params'][_0xc22c50(0x184)],_0x32e3bc=_0x525f24[_0xc22c50(0x225)][_0xc22c50(0x1fc)]['id'];setTimeout(()=>{const _0x36557e=_0xc22c50;this[_0x36557e(0x156)]['executeCommand'](_0x41b70d[_0x36557e(0x1eb)]['id'],{'unitId':_0xe77d4a,'subUnitId':_0x32e3bc},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x2af27a=_0x1d4d30;var _0x3f6b00;(_0x3f6b00=this['_commandDisposable'])==null||_0x3f6b00[_0x2af27a(0x18f)](),this[_0x2af27a(0x219)][_0x2af27a(0x1a3)](_0x2af27a(0x206));let _0x58ea44=new Map(),_0x6c0179=this['_commandDisposable']=new _0xb25766[(_0x2af27a(0x1b6))]();_0x6c0179[_0x2af27a(0x1f3)]((0x0,_0xb25766[_0x2af27a(0x1e3)])(()=>{const _0x5811f9=_0x2af27a;_0x58ea44[_0x5811f9(0x192)](({subject:_0x36bd18,subscription:_0x28ab81})=>{const _0xe5c50d=_0x5811f9;_0x28ab81[_0xe5c50d(0x1d4)](),_0x36bd18['complete']();}),_0x58ea44[_0x5811f9(0x16b)]();})),_0x6c0179[_0x2af27a(0x1f3)](this['_commandService'][_0x2af27a(0x1be)](_0xdcad0e=>{const _0x2c00ae=_0x2af27a;if(_0xdcad0e[_0x2c00ae(0x1c6)]!==_0xb25766[_0x2c00ae(0x200)][_0x2c00ae(0x18c)]||!this[_0x2c00ae(0x17d)][_0x2c00ae(0x21c)](_0xdcad0e['id']))return;let {id:_0x9b27e5}=_0xdcad0e,_0x49983b;if(_0x58ea44[_0x2c00ae(0x210)](_0x9b27e5))_0x49983b=_0x58ea44['get'](_0x9b27e5)[_0x2c00ae(0x187)];else{var _0x3f9728;_0x49983b=new _0x1eb6fd[(_0x2c00ae(0x19d))]();let _0x5f2392=_0x49983b['pipe']((0x0,_0x2409b5[_0x2c00ae(0x182)])((_0x3f9728=this[_0x2c00ae(0x162)][_0x2c00ae(0x1ea)]('SAME_OPERATION_SHARE_INTERVAL'))==null?0xc8:_0x3f9728,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x2c00ae(0x1f0)](_0x46cd9c=>{const _0x49903c=_0x2c00ae;this[_0x49903c(0x1a9)][_0x49903c(0x18b)]({'eventID':_0x25303d['CollaborationEvent']['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0x46cd9c['id']]:{'id':_0x46cd9c['id'],'params':JSON[_0x49903c(0x153)](_0x46cd9c[_0x49903c(0x225)])}}}},this[_0x49903c(0x1a8)]);});_0x58ea44['set'](_0x9b27e5,{'subject':_0x49983b,'subscription':_0x5f2392});}_0x49983b[_0x2c00ae(0x1a3)](_0xdcad0e);})),this[_0x2af27a(0x17d)][_0x2af27a(0x167)](this[_0x2af27a(0x1a8)])[_0x2af27a(0x192)](_0x4cab30=>this[_0x2af27a(0x1a9)][_0x2af27a(0x18b)]({'eventID':_0x25303d['CollaborationEvent']['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x2af27a(0x1a8)],'operations':{[_0x4cab30['id']]:{'id':_0x4cab30['id'],'params':JSON['stringify'](_0x4cab30[_0x2af27a(0x225)])}}}},this[_0x2af27a(0x1a8)]));}[_0x1d4d30(0x1db)](){const _0x5c6640=_0x1d4d30;var _0xb4214c;this[_0x5c6640(0x219)]['next'](_0x5c6640(0x1ab)),(_0xb4214c=this['_commandDisposable'])==null||_0xb4214c[_0x5c6640(0x18f)](),this[_0x5c6640(0x1a2)]=null;}[_0x1d4d30(0x146)](){const _0xe7c243=_0x1d4d30;var _0x354e06;(_0x354e06=this[_0xe7c243(0x1a2)])==null||_0x354e06['dispose'](),this[_0xe7c243(0x219)][_0xe7c243(0x1a3)](_0xe7c243(0x1bf));}[_0x1d4d30(0x14d)](){const _0x4da816=_0x1d4d30;var _0x5c7f32;this[_0x4da816(0x219)][_0x4da816(0x1a3)](_0x4da816(0x1ab)),(_0x5c7f32=this[_0x4da816(0x1a2)])==null||_0x5c7f32[_0x4da816(0x18f)](),this[_0x4da816(0x1a2)]=null;}['_stopFollowing'](){const _0x55a09e=_0x1d4d30;var _0x4a038c;this[_0x55a09e(0x219)][_0x55a09e(0x1a3)](_0x55a09e(0x1b8)),(_0x4a038c=this['_commandDisposable'])==null||_0x4a038c[_0x55a09e(0x18f)]();}[_0x1d4d30(0x1fb)](_0x199c73){const _0x15cac6=_0x1d4d30;if([_0x15cac6(0x206),_0x15cac6(0x1b8),_0x15cac6(0x17b)][_0x15cac6(0x1dd)](this[_0x15cac6(0x13c)])||!_0x199c73[_0x15cac6(0x198)]['presenter']||_0x199c73[_0x15cac6(0x198)]['presenter']===this[_0x15cac6(0x1a9)][_0x15cac6(0x212)]())return;this[_0x15cac6(0x13c)]==='idle'&&this[_0x15cac6(0x146)]();let _0x10a56b=_0x199c73['data'][_0x15cac6(0x204)];Object[_0x15cac6(0x1e0)](_0x10a56b)[_0x15cac6(0x192)](_0x159f79=>{const _0x297296=_0x15cac6;this['_commandService'][_0x297296(0x1c8)](_0x159f79['id'],_0x159f79[_0x297296(0x225)]?JSON[_0x297296(0x183)](_0x159f79[_0x297296(0x225)]):null,{'fromCollab':!0x0});});}['_handleOffline'](){const _0x4c76b0=_0x1d4d30;var _0x12f38e;this[_0x4c76b0(0x219)][_0x4c76b0(0x1a3)](_0x4c76b0(0x17b)),(_0x12f38e=this[_0x4c76b0(0x1a2)])==null||_0x12f38e['dispose']();}['_handleOnline'](){const _0x2ac620=_0x1d4d30;this['_status$'][_0x2ac620(0x1a3)](_0x2ac620(0x1ab)),this[_0x2ac620(0x1de)]();}};_0x461a3b=_0x2b4402([_0x36dd09(0x2,_0xb25766[_0x1d4d30(0x1c0)]),_0x36dd09(0x3,(0x0,_0xb25766[_0x1d4d30(0x1b2)])(_0x52b9e9)),_0x36dd09(0x4,_0xb25766[_0x1d4d30(0x1d0)])],_0x461a3b);var _0xfbf7df=_0x1d4d30(0x176),_0x38dea6='1.0.0-alpha.7';let _0xdc8c56={},_0x5bf64f=class extends _0xb25766[_0x1d4d30(0x1ca)]{constructor(_0x7e9f9e){const _0x1c1722=_0x1d4d30;super(),this[_0x1c1722(0x17d)]=_0x7e9f9e,this[_0x1c1722(0x1f5)]();}[_0x1d4d30(0x1f5)](){const _0x373627=_0x1d4d30;[_0x221dfd[_0x373627(0x211)]['id'],_0x221dfd['SetScrollOperation']['id'],_0x41b70d[_0x373627(0x1eb)]['id']]['forEach'](_0x3eb2e2=>{const _0x1ff203=_0x373627;this[_0x1ff203(0x149)](this[_0x1ff203(0x17d)]['registerSharedOperation'](_0x3eb2e2));});}};_0x5bf64f=_0x2b4402([_0x36dd09(0x0,(0x0,_0xb25766[_0x1d4d30(0x1b2)])(_0x52b9e9))],_0x5bf64f);function _0x2762a4({ref:_0x5c7ebc,..._0x3f400c}){const _0x2b3d64=_0x1d4d30;let {icon:_0x3cc0ab,id:_0x5e1a8f,className:_0x15b0cf,extend:_0x3a1054,..._0x2da82f}=_0x3f400c,_0x22116e=('univerjs-icon\x20univerjs-icon-'+_0x5e1a8f+'\x20'+(_0x15b0cf||''))[_0x2b3d64(0x16c)](),_0x58dc04=(0x0,_0x1a58aa['useRef'])('_'+_0x267ae0());return _0x3e371(_0x3cc0ab,''+_0x5e1a8f,{'defIds':_0x3cc0ab[_0x2b3d64(0x1d1)],'idSuffix':_0x58dc04['current']},{'ref':_0x5c7ebc,'className':_0x22116e,..._0x2da82f},_0x3a1054);}function _0x3e371(_0x108696,_0x201d83,_0x111ed5,_0xa41be0,_0x191f7c){const _0x55face=_0x1d4d30;return(0x0,_0x1a58aa[_0x55face(0x195)])(_0x108696[_0x55face(0x1e4)],{'key':_0x201d83,..._0x14e0bc(_0x108696,_0x111ed5,_0x191f7c),..._0xa41be0},(_0x5e6bf4(_0x108696,_0x111ed5)[_0x55face(0x1c1)]||[])[_0x55face(0x1e6)]((_0x144c5b,_0x501676)=>_0x3e371(_0x144c5b,_0x201d83+'-'+_0x108696[_0x55face(0x1e4)]+'-'+_0x501676,_0x111ed5,void 0x0,_0x191f7c)));}function _0x14e0bc(_0x33f298,_0x56fc24,_0x5af9af){const _0x4a1727=_0x1d4d30;let _0xbf9847={..._0x33f298[_0x4a1727(0x144)]};_0x5af9af!=null&&_0x5af9af[_0x4a1727(0x178)]&&_0xbf9847[_0x4a1727(0x196)]===_0x4a1727(0x178)&&(_0xbf9847['fill']=_0x5af9af['colorChannel1']),_0x5af9af!=null&&_0x5af9af['colorChannel1']&&_0xbf9847[_0x4a1727(0x186)]==='colorChannel1'&&(_0xbf9847[_0x4a1727(0x186)]=_0x5af9af['colorChannel1']),_0x33f298[_0x4a1727(0x1e4)]==='mask'&&_0xbf9847['id']&&(_0xbf9847['id']+=_0x56fc24[_0x4a1727(0x19f)]),Object[_0x4a1727(0x1f4)](_0xbf9847)[_0x4a1727(0x192)](([_0x3af96e,_0x244133])=>{const _0x447c7e=_0x4a1727;_0x3af96e==='mask'&&typeof _0x244133=='string'&&(_0xbf9847[_0x3af96e]=_0x244133[_0x447c7e(0x193)](/url\(#(.*)\)/,'url(#$1'+_0x56fc24[_0x447c7e(0x19f)]+')'));});let {defIds:_0x9e59de}=_0x56fc24;return!_0x9e59de||_0x9e59de[_0x4a1727(0x142)]===0x0?_0xbf9847:(_0x33f298[_0x4a1727(0x1e4)]===_0x4a1727(0x148)&&_0xbf9847[_0x4a1727(0x15e)]&&(_0xbf9847[_0x4a1727(0x15e)]+=_0x56fc24['idSuffix']),Object[_0x4a1727(0x1f4)](_0xbf9847)[_0x4a1727(0x192)](([_0x5d072b,_0x42f7ca])=>{const _0x9e18=_0x4a1727;typeof _0x42f7ca==_0x9e18(0x221)&&(_0xbf9847[_0x5d072b]=_0x42f7ca['replace'](/url\(#(.*)\)/,_0x9e18(0x1da)+_0x56fc24['idSuffix']+')'));}),_0xbf9847);}function _0x5e6bf4(_0x25b00c,_0x5ebf23){const _0x28a851=_0x1d4d30;var _0x39e36d;let {defIds:_0x1a27f3}=_0x5ebf23;return!_0x1a27f3||_0x1a27f3['length']===0x0?_0x25b00c:_0x25b00c[_0x28a851(0x1e4)]==='defs'&&(_0x39e36d=_0x25b00c[_0x28a851(0x1c1)])!=null&&_0x39e36d['length']?{..._0x25b00c,'children':_0x25b00c[_0x28a851(0x1c1)][_0x28a851(0x1e6)](_0x1ec57c=>typeof _0x1ec57c[_0x28a851(0x144)]['id']=='string'&&_0x1a27f3&&_0x1a27f3['includes'](_0x1ec57c[_0x28a851(0x144)]['id'])?{..._0x1ec57c,'attrs':{..._0x1ec57c[_0x28a851(0x144)],'id':_0x1ec57c['attrs']['id']+_0x5ebf23[_0x28a851(0x19f)]}}:_0x1ec57c)}:_0x25b00c;}function _0x267ae0(){const _0x510bfc=_0x1d4d30;return Math[_0x510bfc(0x169)]()[_0x510bfc(0x1a6)](0x24)[_0x510bfc(0x1b1)](0x2,0x8);}_0x2762a4['displayName']='UniverIcon';let _0x58d5f2={'tag':'svg','attrs':{'xmlns':'http://www.w3.org/2000/svg','fill':'none','viewBox':'0\x200\x2017\x2017','width':'1em','height':_0x1d4d30(0x1b0)},'children':[{'tag':_0x1d4d30(0x181),'attrs':{'fill':_0x1d4d30(0x147),'d':_0x1d4d30(0x180)}},{'tag':_0x1d4d30(0x181),'attrs':{'fill':_0x1d4d30(0x147),'d':_0x1d4d30(0x1c7),'fillRule':_0x1d4d30(0x18d),'clipRule':'evenodd'}}]},_0x1ac2a8=(0x0,_0x1a58aa[_0x1d4d30(0x215)])(function(_0x27de8b,_0x2ad4da){const _0x31ec26=_0x1d4d30;return(0x0,_0x1a58aa[_0x31ec26(0x195)])(_0x2762a4,Object[_0x31ec26(0x19b)]({},_0x27de8b,{'id':_0x31ec26(0x165),'ref':_0x2ad4da,'icon':_0x58d5f2}));});_0x1ac2a8['displayName']=_0x1d4d30(0x1fd);function _0x2d25ed(){const _0x11ee0e=_0x1d4d30;let _0x4dd216=(0x0,_0x50de09[_0x11ee0e(0x17a)])(_0x47372d),_0x3631a7=(0x0,_0x50de09[_0x11ee0e(0x17a)])(_0xb25766[_0x11ee0e(0x1ad)]),_0x377ebb=(0x0,_0x50de09[_0x11ee0e(0x164)])(()=>_0x3631a7[_0x11ee0e(0x16d)](_0xb25766[_0x11ee0e(0x15d)][_0x11ee0e(0x222)]),void 0x0,!0x1,[]),_0x15fa97=(0x0,_0x50de09['useObservable'])((0x0,_0x1a58aa[_0x11ee0e(0x1ef)])(()=>_0x377ebb?(0x0,_0x1eb6fd[_0x11ee0e(0x1fa)])(()=>(0x0,_0x1eb6fd[_0x11ee0e(0x171)])(_0x4dd216[_0x11ee0e(0x1f7)](_0x377ebb[_0x11ee0e(0x16e)]()))):(0x0,_0x1eb6fd['of'])(null),[_0x377ebb,_0x4dd216]),null),_0x2ace74=(0x0,_0x50de09[_0x11ee0e(0x164)])(_0x15fa97?()=>_0x15fa97['status$']:null,_0x11ee0e(0x1ab),!0x1,[_0x15fa97]);return _0x15fa97?(0x0,_0x31f262[_0x11ee0e(0x209)])(_0x4172f9['Dropdown'],{'align':_0x11ee0e(0x17e),'disabled':_0x2ace74===_0x11ee0e(0x17b),'className':_0x11ee0e(0x1ff),'overlay':(0x0,_0x31f262['jsx'])(_0x50f58d,{'status':_0x2ace74,'coordinator':_0x15fa97}),'children':(0x0,_0x31f262['jsx'])(_0x11ee0e(0x20c),{'className':(0x0,_0x4172f9['clsx'])(_0x11ee0e(0x15a),{'univer-cursor-not-allowed':_0x2ace74===_0x11ee0e(0x17b),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x2ace74!=='offline'}),'type':_0x11ee0e(0x20c),'children':(0x0,_0x31f262[_0x11ee0e(0x209)])(_0x1ac2a8,{})})}):null;}function _0x50f58d(_0x6244db){const _0x4c7cdc=_0x1d4d30;let {status:_0x2c54c3,coordinator:_0x4046e1}=_0x6244db;switch(_0x2c54c3){case _0x4c7cdc(0x1ab):return(0x0,_0x31f262[_0x4c7cdc(0x209)])(_0x4f6ead,{'coordinator':_0x4046e1});case _0x4c7cdc(0x1bf):return(0x0,_0x31f262[_0x4c7cdc(0x209)])(_0x53b8f6,{'coordinator':_0x4046e1});case _0x4c7cdc(0x1b8):return(0x0,_0x31f262['jsx'])(_0xd69d04,{'coordinator':_0x4046e1});case _0x4c7cdc(0x17b):return(0x0,_0x31f262[_0x4c7cdc(0x209)])(_0x2715ff,{});case _0x4c7cdc(0x206):return(0x0,_0x31f262[_0x4c7cdc(0x209)])(_0x446875,{'coordinator':_0x4046e1});default:return null;}}function _0x4f6ead(_0x8bb08c){const _0x2e5dbd=_0x1d4d30;let {coordinator:_0x2ba4fe}=_0x8bb08c;return(0x0,_0x31f262[_0x2e5dbd(0x224)])(_0x31f262['Fragment'],{'children':[(0x0,_0x31f262['jsx'])(_0x2e5dbd(0x163),{'className':_0x2e5dbd(0x1ed),'children':_0x2e5dbd(0x161)}),(0x0,_0x31f262[_0x2e5dbd(0x209)])(_0x4172f9['Button'],{'onClick':()=>_0x2ba4fe[_0x2e5dbd(0x143)](),'children':_0x2e5dbd(0x1ec)})]});}function _0x53b8f6(_0x43ab66){const _0x191c1a=_0x1d4d30;let {coordinator:_0xa75adc}=_0x43ab66;return(0x0,_0x31f262[_0x191c1a(0x224)])(_0x31f262[_0x191c1a(0x190)],{'children':[(0x0,_0x31f262[_0x191c1a(0x209)])(_0x191c1a(0x163),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x191c1a(0x217)}),(0x0,_0x31f262[_0x191c1a(0x209)])(_0x4172f9['Button'],{'onClick':()=>_0xa75adc[_0x191c1a(0x1a4)](),'children':_0x191c1a(0x168)})]});}function _0xd69d04(_0x172102){const _0x5d09dd=_0x1d4d30;let {coordinator:_0x227940}=_0x172102;return(0x0,_0x31f262['jsxs'])(_0x31f262[_0x5d09dd(0x190)],{'children':[(0x0,_0x31f262[_0x5d09dd(0x209)])(_0x5d09dd(0x163),{'className':_0x5d09dd(0x1ed),'children':_0x5d09dd(0x21a)}),(0x0,_0x31f262['jsx'])(_0x4172f9[_0x5d09dd(0x1c2)],{'variant':_0x5d09dd(0x19a),'onClick':()=>_0x227940[_0x5d09dd(0x220)](),'children':_0x5d09dd(0x20e)})]});}function _0x446875(_0x39daaa){const _0xa47eda=_0x1d4d30;let {coordinator:_0x12b013}=_0x39daaa;return(0x0,_0x31f262['jsxs'])(_0x31f262[_0xa47eda(0x190)],{'children':[(0x0,_0x31f262[_0xa47eda(0x209)])('div',{'className':_0xa47eda(0x1ed),'children':_0xa47eda(0x1b4)}),(0x0,_0x31f262[_0xa47eda(0x209)])(_0x4172f9[_0xa47eda(0x1c2)],{'variant':'default','onClick':()=>_0x12b013[_0xa47eda(0x191)](),'children':_0xa47eda(0x140)})]});}function _0x2715ff(){const _0x4a7499=_0x1d4d30;return(0x0,_0x31f262[_0x4a7499(0x209)])(_0x31f262[_0x4a7499(0x190)],{'children':_0x4a7499(0x1cc)});}let _0x1f3097=class extends _0xb25766['Disposable']{constructor(_0x564d5b,_0x1681b4){const _0x1b9ee9=_0x1d4d30;super(),this['_injector']=_0x564d5b,this[_0x1b9ee9(0x141)]=_0x1681b4,this[_0x1b9ee9(0x177)]();}[_0x1d4d30(0x177)](){const _0x5be65d=_0x1d4d30;this[_0x5be65d(0x149)](this[_0x5be65d(0x141)]['registerComponent'](_0x50de09[_0x5be65d(0x17c)][_0x5be65d(0x1d6)],()=>(0x0,_0x50de09[_0x5be65d(0x13e)])(_0x2d25ed,this['_injector'])));}};_0x1f3097=_0x2b4402([_0x36dd09(0x0,(0x0,_0xb25766[_0x1d4d30(0x1b2)])(_0xb25766[_0x1d4d30(0x1b3)])),_0x36dd09(0x1,_0x50de09[_0x1d4d30(0x1e2)])],_0x1f3097);let _0x46f498=class extends _0xb25766[_0x1d4d30(0x1a7)]{constructor(_0x503efa=_0xdc8c56,_0x5887f5,_0x21e804){const _0x52a0ea=_0x1d4d30;super(),this[_0x52a0ea(0x194)]=_0x503efa,this[_0x52a0ea(0x1ee)]=_0x5887f5,this['_configService']=_0x21e804;let {..._0x375fb1}=(0x0,_0xb25766[_0x52a0ea(0x201)])({},_0xdc8c56,this[_0x52a0ea(0x194)]);this[_0x52a0ea(0x162)]['setConfig'](_0x52a0ea(0x202),_0x375fb1);}['onStarting'](){const _0x3dbec8=_0x1d4d30;(0x0,_0xb25766['registerDependencies'])(this['_injector'],(0x0,_0xb25766[_0x3dbec8(0x17f)])([[_0x52b9e9],[_0x47372d],[_0x5bf64f],[_0x1f3097]],this[_0x3dbec8(0x194)][_0x3dbec8(0x208)])),(0x0,_0xb25766[_0x3dbec8(0x1a1)])(this[_0x3dbec8(0x1ee)],[[_0x5bf64f]]);}[_0x1d4d30(0x14b)](){const _0x39e777=_0x1d4d30;(0x0,_0xb25766[_0x39e777(0x1a1)])(this[_0x39e777(0x1ee)],[[_0x1f3097]]);}};_0x198a30(_0x46f498,_0x1d4d30(0x1c6),_0xb25766[_0x1d4d30(0x15d)][_0x1d4d30(0x218)]),_0x198a30(_0x46f498,_0x1d4d30(0x151),_0x1d4d30(0x1d5)),_0x198a30(_0x46f498,_0x1d4d30(0x166),_0xfbf7df),_0x198a30(_0x46f498,'version',_0x38dea6),_0x46f498=_0x2b4402([(0x0,_0xb25766['DependentOn'])(_0x5a9e64[_0x1d4d30(0x19c)]),_0x36dd09(0x1,(0x0,_0xb25766['Inject'])(_0xb25766[_0x1d4d30(0x1b3)])),_0x36dd09(0x2,_0xb25766[_0x1d4d30(0x1c0)])],_0x46f498),Object[_0x1d4d30(0x1b7)](_0x131977,_0x1d4d30(0x207),{'enumerable':!0x0,'get':function(){return _0x47372d;}}),_0x131977[_0x1d4d30(0x20f)]=_0x267d9f,Object['defineProperty'](_0x131977,_0x1d4d30(0x14e),{'enumerable':!0x0,'get':function(){return _0x46f498;}});}));
|
|
1
|
+
(function(_0x1f3e6b,_0x1a09b8){const _0x39f99d=_0xaf52,_0x267d8d=_0x1f3e6b();while(!![]){try{const _0x58ea9c=parseInt(_0x39f99d(0x1e4))/0x1*(-parseInt(_0x39f99d(0x212))/0x2)+parseInt(_0x39f99d(0x217))/0x3*(parseInt(_0x39f99d(0x211))/0x4)+parseInt(_0x39f99d(0x228))/0x5+parseInt(_0x39f99d(0x240))/0x6*(-parseInt(_0x39f99d(0x1f3))/0x7)+-parseInt(_0x39f99d(0x1c4))/0x8*(-parseInt(_0x39f99d(0x1bc))/0x9)+parseInt(_0x39f99d(0x223))/0xa*(-parseInt(_0x39f99d(0x242))/0xb)+-parseInt(_0x39f99d(0x1c1))/0xc*(-parseInt(_0x39f99d(0x1b2))/0xd);if(_0x58ea9c===_0x1a09b8)break;else _0x267d8d['push'](_0x267d8d['shift']());}catch(_0x384f75){_0x267d8d['push'](_0x267d8d['shift']());}}}(_0x248f,0x1f2af),function(_0x146d29,_0x2d2d5f){const _0x9ada76=_0xaf52;typeof exports==_0x9ada76(0x1d5)&&typeof module<'u'?_0x2d2d5f(exports,require('@univerjs-pro/collaboration'),require('@univerjs-pro/collaboration-client'),require('@univerjs/core'),require('@univerjs/sheets'),require('rxjs'),require('rxjs/operators'),require('@univerjs-pro/license'),require('@univerjs/ui'),require('@univerjs/sheets-ui'),require('@univerjs/design'),require('react'),require('react/jsx-runtime')):typeof define=='function'&&define[_0x9ada76(0x1a1)]?define([_0x9ada76(0x23b),'@univerjs-pro/collaboration',_0x9ada76(0x1ce),_0x9ada76(0x1e0),'@univerjs/sheets',_0x9ada76(0x1da),'rxjs/operators',_0x9ada76(0x1b4),'@univerjs/ui',_0x9ada76(0x177),'@univerjs/design',_0x9ada76(0x241),_0x9ada76(0x161)],_0x2d2d5f):(_0x146d29=typeof globalThis<'u'?globalThis:_0x146d29||self,_0x2d2d5f(_0x146d29[_0x9ada76(0x171)]={},_0x146d29['UniverProCollaboration'],_0x146d29[_0x9ada76(0x1e7)],_0x146d29[_0x9ada76(0x172)],_0x146d29[_0x9ada76(0x1a3)],_0x146d29['rxjs'],_0x146d29[_0x9ada76(0x1da)][_0x9ada76(0x1b8)],_0x146d29[_0x9ada76(0x245)],_0x146d29[_0x9ada76(0x23e)],_0x146d29['UniverSheetsUi'],_0x146d29[_0x9ada76(0x1a0)],_0x146d29['React'],_0x146d29['React']));}(this,function(_0x30429c,_0x15aea7,_0x21b6e0,_0x4d2c8e,_0xbe9c79,_0x41f802,_0x5c83f7,_0x1cac21,_0x4675f4,_0x6b162b,_0x7a06bf,_0x4ab200,_0x1e4412){const _0x43c41f=_0xaf52;Object[_0x43c41f(0x1f7)](_0x30429c,Symbol[_0x43c41f(0x181)],{'value':_0x43c41f(0x196)});function _0x71fae1(_0x220d8a){'@babel/helpers - typeof';return _0x71fae1=typeof Symbol=='function'&&typeof Symbol['iterator']=='symbol'?function(_0x191a47){return typeof _0x191a47;}:function(_0x1e7c14){const _0x90f25a=_0xaf52;return _0x1e7c14&&typeof Symbol=='function'&&_0x1e7c14[_0x90f25a(0x219)]===Symbol&&_0x1e7c14!==Symbol[_0x90f25a(0x238)]?_0x90f25a(0x1af):typeof _0x1e7c14;},_0x71fae1(_0x220d8a);}function _0x353460(_0xdbb997,_0x2d5de0){const _0x26ea84=_0x43c41f;if(_0x71fae1(_0xdbb997)!=_0x26ea84(0x1d5)||!_0xdbb997)return _0xdbb997;var _0x3d1252=_0xdbb997[Symbol[_0x26ea84(0x235)]];if(_0x3d1252!==void 0x0){var _0x49c018=_0x3d1252[_0x26ea84(0x194)](_0xdbb997,_0x2d5de0||_0x26ea84(0x1b9));if(_0x71fae1(_0x49c018)!=_0x26ea84(0x1d5))return _0x49c018;throw TypeError(_0x26ea84(0x1c5));}return(_0x2d5de0===_0x26ea84(0x23a)?String:Number)(_0xdbb997);}function _0x23cd5c(_0x248c87){const _0x53af09=_0x43c41f;var _0x11f3df=_0x353460(_0x248c87,_0x53af09(0x23a));return _0x71fae1(_0x11f3df)==_0x53af09(0x1af)?_0x11f3df:_0x11f3df+'';}function _0x3a32dd(_0x254a48,_0x808325,_0xd8cd23){const _0x519dcd=_0x43c41f;return(_0x808325=_0x23cd5c(_0x808325))in _0x254a48?Object[_0x519dcd(0x1f7)](_0x254a48,_0x808325,{'value':_0xd8cd23,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x254a48[_0x808325]=_0xd8cd23,_0x254a48;}var _0x3bc393=class extends _0x4d2c8e['Disposable']{constructor(..._0x4ea85b){super(..._0x4ea85b),_0x3a32dd(this,'_sharedOperations',new Set()),_0x3a32dd(this,'_reporters',new Set());}[_0x43c41f(0x187)](_0x2a305f){const _0x485b13=_0x43c41f;return this[_0x485b13(0x1a4)][_0x485b13(0x247)](_0x2a305f),(0x0,_0x4d2c8e['toDisposable'])(()=>this['_sharedOperations'][_0x485b13(0x1bb)](_0x2a305f));}[_0x43c41f(0x1aa)](_0x2d0339){const _0x325f59=_0x43c41f;return this['_reporters']['add'](_0x2d0339),(0x0,_0x4d2c8e[_0x325f59(0x1ae)])(()=>this[_0x325f59(0x197)][_0x325f59(0x1bb)](_0x2d0339));}[_0x43c41f(0x214)](_0x1f1570){const _0x296b22=_0x43c41f;return this[_0x296b22(0x1a4)][_0x296b22(0x16d)](_0x1f1570);}[_0x43c41f(0x1e3)](_0x221b30){const _0x286b8b=_0x43c41f;return Array[_0x286b8b(0x1cf)](this['_reporters'])[_0x286b8b(0x1ea)](_0x1281cf=>_0x1281cf(_0x221b30));}};function _0x4944be(_0x365e23,_0x1d6d7d){return function(_0x3a9f80,_0x7a7a15){_0x1d6d7d(_0x3a9f80,_0x7a7a15,_0x365e23);};}function _0x4ff6e1(_0x4186d9,_0x27367a,_0x2e772f,_0x11d586){const _0x33580a=_0x43c41f;var _0x216f35=arguments[_0x33580a(0x24a)],_0x20dc9b=_0x216f35<0x3?_0x27367a:_0x11d586===null?_0x11d586=Object['getOwnPropertyDescriptor'](_0x27367a,_0x2e772f):_0x11d586,_0x38b77d;if(typeof Reflect=='object'&&typeof Reflect[_0x33580a(0x17e)]==_0x33580a(0x1d2))_0x20dc9b=Reflect[_0x33580a(0x17e)](_0x4186d9,_0x27367a,_0x2e772f,_0x11d586);else{for(var _0x4985cb=_0x4186d9[_0x33580a(0x24a)]-0x1;_0x4985cb>=0x0;_0x4985cb--)(_0x38b77d=_0x4186d9[_0x4985cb])&&(_0x20dc9b=(_0x216f35<0x3?_0x38b77d(_0x20dc9b):_0x216f35>0x3?_0x38b77d(_0x27367a,_0x2e772f,_0x20dc9b):_0x38b77d(_0x27367a,_0x2e772f))||_0x20dc9b);}return _0x216f35>0x3&&_0x20dc9b&&Object[_0x33580a(0x1f7)](_0x27367a,_0x2e772f,_0x20dc9b),_0x20dc9b;}let _0x5a755d=class extends _0x4d2c8e[_0x43c41f(0x1e6)]{constructor(_0x2f86d1,_0x206331,_0x3781df){const _0x4ddd39=_0x43c41f;super(),this[_0x4ddd39(0x174)]=_0x2f86d1,this[_0x4ddd39(0x184)]=_0x206331,this[_0x4ddd39(0x19b)]=_0x3781df,_0x3a32dd(this,_0x4ddd39(0x191),new Map()),this[_0x4ddd39(0x1fc)]();}async[_0x43c41f(0x17c)](_0x54decf){const _0x3949df=_0x43c41f;return this[_0x3949df(0x191)][_0x3949df(0x16d)](_0x54decf)||await this[_0x3949df(0x21e)](_0x54decf),this['_entities'][_0x3949df(0x1d4)](_0x54decf);}[_0x43c41f(0x192)](_0x40d09d){const _0xa48d09=_0x43c41f;var _0x4c4c42;return(_0x4c4c42=this['_entities'][_0xa48d09(0x1d4)](_0x40d09d))==null?null:_0x4c4c42;}[_0x43c41f(0x1fc)](){const _0x2b26c0=_0x43c41f;this[_0x2b26c0(0x174)]['getTypeOfUnitAdded$'](_0x4d2c8e[_0x2b26c0(0x201)][_0x2b26c0(0x246)])['pipe']((0x0,_0x5c83f7[_0x2b26c0(0x1a9)])(this['dispose$']))[_0x2b26c0(0x16b)](async _0x29c325=>{const _0x3bb763=_0x2b26c0;let _0x247cc8=_0x29c325[_0x3bb763(0x19d)][_0x3bb763(0x20c)]();this[_0x3bb763(0x191)]['has'](_0x247cc8)||this['_startLiveShareCoordinator'](_0x247cc8);}),this[_0x2b26c0(0x174)][_0x2b26c0(0x236)](_0x4d2c8e['UniverInstanceType'][_0x2b26c0(0x246)])['pipe']((0x0,_0x5c83f7[_0x2b26c0(0x1a9)])(this[_0x2b26c0(0x1eb)]))[_0x2b26c0(0x16b)](_0x264d51=>{const _0x1130b8=_0x2b26c0;let _0x3c17e2=_0x264d51[_0x1130b8(0x20c)](),_0x530db1=this[_0x1130b8(0x191)][_0x1130b8(0x1d4)](_0x3c17e2);_0x530db1==null||_0x530db1[_0x1130b8(0x1c2)]();});}async[_0x43c41f(0x21e)](_0xa9477a){const _0x2ee3ea=_0x43c41f;let _0x1f3d36=await this[_0x2ee3ea(0x19b)]['requireSession'](_0xa9477a),_0x51ef73=this['_injector']['createInstance'](_0x4f1dcb,_0xa9477a,_0x1f3d36);return _0x51ef73['init'](),this[_0x2ee3ea(0x191)][_0x2ee3ea(0x1de)](_0xa9477a,_0x51ef73),_0x51ef73;}};_0x5a755d=_0x4ff6e1([_0x4944be(0x0,_0x4d2c8e['IUniverInstanceService']),_0x4944be(0x1,(0x0,_0x4d2c8e[_0x43c41f(0x1cd)])(_0x4d2c8e[_0x43c41f(0x20b)])),_0x4944be(0x2,(0x0,_0x4d2c8e[_0x43c41f(0x1cd)])(_0x21b6e0[_0x43c41f(0x1fe)]))],_0x5a755d);let _0x408685=function(_0x5c17ad){const _0x32b6f6=_0x43c41f;return _0x5c17ad['OFFLINE']='offline',_0x5c17ad[_0x32b6f6(0x22c)]=_0x32b6f6(0x232),_0x5c17ad[_0x32b6f6(0x1fb)]=_0x32b6f6(0x1c6),_0x5c17ad[_0x32b6f6(0x166)]=_0x32b6f6(0x1e5),_0x5c17ad[_0x32b6f6(0x1ad)]='presenting',_0x5c17ad;}({}),_0x4f1dcb=class extends _0x4d2c8e[_0x43c41f(0x1e6)]{get['_status'](){const _0x5c1589=_0x43c41f;return this[_0x5c1589(0x204)][_0x5c1589(0x16e)]();}constructor(_0xe057d4,_0x1438e8,_0x1d99c5,_0x3a857d,_0x3035e8){const _0x51d7cf=_0x43c41f;super(),this['_unitID']=_0xe057d4,this[_0x51d7cf(0x176)]=_0x1438e8,this['_configService']=_0x1d99c5,this[_0x51d7cf(0x22a)]=_0x3a857d,this[_0x51d7cf(0x1e8)]=_0x3035e8,_0x3a32dd(this,_0x51d7cf(0x204),new _0x41f802[(_0x51d7cf(0x200))](_0x51d7cf(0x232))),_0x3a32dd(this,_0x51d7cf(0x18f),this[_0x51d7cf(0x204)][_0x51d7cf(0x234)]()),_0x3a32dd(this,_0x51d7cf(0x1fc),!0x1),_0x3a32dd(this,_0x51d7cf(0x243),null),_0x3a32dd(this,'_presenter',null);}[_0x43c41f(0x1c2)](){const _0x4af72e=_0x43c41f;var _0x475a1c;(_0x475a1c=this['_commandDisposable'])==null||_0x475a1c[_0x4af72e(0x1c2)](),this[_0x4af72e(0x204)][_0x4af72e(0x18c)](_0x4af72e(0x232)),this[_0x4af72e(0x204)]['complete']();}['getStatus'](){return this['_status'];}[_0x43c41f(0x1c9)](){const _0x5a79d9=_0x43c41f;this[_0x5a79d9(0x1fc)]||(this[_0x5a79d9(0x1fc)]=!0x0,this[_0x5a79d9(0x176)][_0x5a79d9(0x18e)][_0x5a79d9(0x1a6)]((0x0,_0x5c83f7[_0x5a79d9(0x1a9)])(this[_0x5a79d9(0x1eb)]))[_0x5a79d9(0x16b)](_0x3178c8=>{const _0x773cec=_0x5a79d9;switch(_0x3178c8){case _0x21b6e0['SessionStatus'][_0x773cec(0x1d9)]:this['_handleOffline']();break;case _0x21b6e0[_0x773cec(0x20f)]['ONLINE']:this[_0x773cec(0x1b3)]();break;default:}}),this[_0x5a79d9(0x176)][_0x5a79d9(0x16f)]['pipe']((0x0,_0x5c83f7[_0x5a79d9(0x1a9)])(this[_0x5a79d9(0x1eb)]))['subscribe'](_0x9e2a93=>{const _0x1408ff=_0x5a79d9;let {eventID:_0x1d9ac0}=_0x9e2a93;switch(_0x1d9ac0){case _0x15aea7[_0x1408ff(0x15f)][_0x1408ff(0x24c)]:this[_0x1408ff(0x229)](_0x9e2a93);break;case _0x15aea7[_0x1408ff(0x15f)][_0x1408ff(0x1a8)]:this[_0x1408ff(0x207)](_0x9e2a93);break;case _0x15aea7['CollaborationEvent'][_0x1408ff(0x221)]:this['_handleTerminate']();break;case _0x15aea7[_0x1408ff(0x15f)][_0x1408ff(0x17d)]:this[_0x1408ff(0x202)](_0x9e2a93);break;default:}}));}['tryStartPresenting'](){const _0x534455=_0x43c41f;this['_collabSession'][_0x534455(0x1f2)]({'eventID':_0x15aea7[_0x534455(0x15f)][_0x534455(0x1a7)],'data':{'unitID':this['_unitID'],'userID':this[_0x534455(0x176)][_0x534455(0x165)]()}},this[_0x534455(0x23d)]);}[_0x43c41f(0x216)](){const _0x196209=_0x43c41f;this[_0x196209(0x1df)]==='presenting'&&(this[_0x196209(0x204)]['next']('idle'),this[_0x196209(0x176)]['send']({'eventID':_0x15aea7['CollaborationEvent'][_0x196209(0x221)],'data':{'unitID':this[_0x196209(0x23d)]}},this[_0x196209(0x23d)]));}[_0x43c41f(0x20d)](){const _0x2fafd2=_0x43c41f;this[_0x2fafd2(0x1df)]==='not-following'&&(this['_status$'][_0x2fafd2(0x18c)]('following'),this[_0x2fafd2(0x220)]());}['stopFollowing'](){const _0x41d59a=_0x43c41f;this[_0x41d59a(0x1df)]===_0x41d59a(0x1c6)&&this[_0x41d59a(0x225)]();}[_0x43c41f(0x229)](_0x2d3bd){const _0x400623=_0x43c41f;let {presenter:_0xdd4716}=_0x2d3bd[_0x400623(0x16c)],_0x1ed11f=this[_0x400623(0x176)][_0x400623(0x165)]();this[_0x400623(0x168)]=_0xdd4716,_0xdd4716===_0x1ed11f?(this['_stopFollowing'](),this[_0x400623(0x1b7)]()):this[_0x400623(0x1df)]!=='not-following'&&(this[_0x400623(0x18d)](),this[_0x400623(0x220)]());}[_0x43c41f(0x1cb)](){const _0x420224=_0x43c41f;let _0x1bb0a9={'eventID':_0x15aea7['CollaborationEvent']['LIVESHARE_FETCH_OPERATIONS']};this[_0x420224(0x176)][_0x420224(0x1f2)](_0x1bb0a9,this[_0x420224(0x23d)]);}[_0x43c41f(0x1d8)](){const _0x45f439=_0x43c41f;this[_0x45f439(0x168)]=null,this[_0x45f439(0x1df)]!=='presenting'&&this[_0x45f439(0x222)]();}[_0x43c41f(0x202)](_0x440bae){const _0x2e7a3e=_0x43c41f;if(this[_0x2e7a3e(0x1df)]===_0x2e7a3e(0x1c6)&&this['_presenter']===_0x440bae[_0x2e7a3e(0x16c)][_0x2e7a3e(0x1e1)]){let _0x4047ff=(0x0,_0x15aea7[_0x2e7a3e(0x186)])(_0x440bae[_0x2e7a3e(0x16c)])[_0x2e7a3e(0x18a)]['reverse']()[_0x2e7a3e(0x180)](_0x3af581=>_0x3af581['id']===_0xbe9c79[_0x2e7a3e(0x1fa)]['id']);if(_0x4047ff){let _0x3589fc=_0x4047ff['params']['unitId'],_0x1b3f7e=_0x4047ff['params'][_0x2e7a3e(0x1f1)]['id'];setTimeout(()=>{const _0x1b57e1=_0x2e7a3e;this[_0x1b57e1(0x1e8)][_0x1b57e1(0x1ab)](_0xbe9c79[_0x1b57e1(0x1ef)]['id'],{'unitId':_0x3589fc,'subUnitId':_0x1b3f7e},{'fromCollab':!0x0});});}}}[_0x43c41f(0x1b7)](){const _0x415bf6=_0x43c41f;var _0x36ef7f;(_0x36ef7f=this[_0x415bf6(0x243)])==null||_0x36ef7f['dispose'](),this[_0x415bf6(0x204)][_0x415bf6(0x18c)](_0x415bf6(0x188));let _0x44b53e=new Map(),_0xd38661=this[_0x415bf6(0x243)]=new _0x4d2c8e[(_0x415bf6(0x1d1))]();_0xd38661[_0x415bf6(0x247)]((0x0,_0x4d2c8e[_0x415bf6(0x1ae)])(()=>{const _0x385653=_0x415bf6;_0x44b53e[_0x385653(0x209)](({subject:_0x455507,subscription:_0x3e7569})=>{const _0x2522ae=_0x385653;_0x3e7569[_0x2522ae(0x195)](),_0x455507[_0x2522ae(0x239)]();}),_0x44b53e[_0x385653(0x1be)]();})),_0xd38661[_0x415bf6(0x247)](this[_0x415bf6(0x1e8)][_0x415bf6(0x21b)](_0x2a2a12=>{const _0x5123bf=_0x415bf6;if(_0x2a2a12[_0x5123bf(0x203)]!==_0x4d2c8e[_0x5123bf(0x1e2)][_0x5123bf(0x233)]||!this[_0x5123bf(0x22a)][_0x5123bf(0x214)](_0x2a2a12['id']))return;let {id:_0x582ee7}=_0x2a2a12,_0x1db577;if(_0x44b53e[_0x5123bf(0x16d)](_0x582ee7))_0x1db577=_0x44b53e['get'](_0x582ee7)['subject'];else{var _0x53c7d9;_0x1db577=new _0x41f802[(_0x5123bf(0x1bd))]();let _0x5622f0=_0x1db577[_0x5123bf(0x1a6)]((0x0,_0x5c83f7[_0x5123bf(0x17b)])((_0x53c7d9=this[_0x5123bf(0x1db)][_0x5123bf(0x1b5)](_0x5123bf(0x252)))==null?0xc8:_0x53c7d9,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x5123bf(0x16b)](_0x399e0c=>{const _0x2999ea=_0x5123bf;this[_0x2999ea(0x176)][_0x2999ea(0x1f2)]({'eventID':_0x15aea7[_0x2999ea(0x15f)][_0x2999ea(0x1a8)],'data':{'unitID':this['_unitID'],'operations':{[_0x399e0c['id']]:{'id':_0x399e0c['id'],'params':JSON[_0x2999ea(0x19e)](_0x399e0c[_0x2999ea(0x210)])}}}},this[_0x2999ea(0x23d)]);});_0x44b53e[_0x5123bf(0x1de)](_0x582ee7,{'subject':_0x1db577,'subscription':_0x5622f0});}_0x1db577['next'](_0x2a2a12);})),this[_0x415bf6(0x22a)][_0x415bf6(0x1e3)](this['_unitID'])[_0x415bf6(0x209)](_0x4e5b54=>this['_collabSession'][_0x415bf6(0x1f2)]({'eventID':_0x15aea7[_0x415bf6(0x15f)][_0x415bf6(0x1a8)],'data':{'unitID':this[_0x415bf6(0x23d)],'operations':{[_0x4e5b54['id']]:{'id':_0x4e5b54['id'],'params':JSON[_0x415bf6(0x19e)](_0x4e5b54[_0x415bf6(0x210)])}}}},this[_0x415bf6(0x23d)]));}['_stopPresenting'](){const _0x5612b8=_0x43c41f;var _0x10ee9e;this[_0x5612b8(0x204)]['next']('idle'),(_0x10ee9e=this[_0x5612b8(0x243)])==null||_0x10ee9e['dispose'](),this[_0x5612b8(0x243)]=null;}[_0x43c41f(0x220)](){const _0x14913d=_0x43c41f;var _0x511a97;(_0x511a97=this[_0x14913d(0x243)])==null||_0x511a97['dispose'](),this[_0x14913d(0x204)][_0x14913d(0x18c)](_0x14913d(0x1c6));}['_beIdle'](){const _0x5a6b8c=_0x43c41f;var _0x1e5fec;this[_0x5a6b8c(0x204)]['next'](_0x5a6b8c(0x232)),(_0x1e5fec=this['_commandDisposable'])==null||_0x1e5fec[_0x5a6b8c(0x1c2)](),this[_0x5a6b8c(0x243)]=null;}[_0x43c41f(0x225)](){const _0x4fd174=_0x43c41f;var _0x360e7e;this['_status$'][_0x4fd174(0x18c)](_0x4fd174(0x1e5)),(_0x360e7e=this[_0x4fd174(0x243)])==null||_0x360e7e[_0x4fd174(0x1c2)]();}['_handleOperation'](_0x22ac2a){const _0x483734=_0x43c41f;if([_0x483734(0x188),_0x483734(0x1e5),'offline'][_0x483734(0x21a)](this[_0x483734(0x1df)])||!_0x22ac2a[_0x483734(0x16c)][_0x483734(0x251)]||_0x22ac2a['data']['presenter']===this[_0x483734(0x176)]['getMemberID']())return;this[_0x483734(0x1df)]==='idle'&&this[_0x483734(0x220)]();let _0x4467d8=_0x22ac2a[_0x483734(0x16c)][_0x483734(0x163)];Object[_0x483734(0x254)](_0x4467d8)[_0x483734(0x209)](_0x5b9180=>{const _0x1e2004=_0x483734;this['_commandService'][_0x1e2004(0x1ab)](_0x5b9180['id'],_0x5b9180[_0x1e2004(0x210)]?JSON['parse'](_0x5b9180['params']):null,{'fromCollab':!0x0});});}['_handleOffline'](){const _0x172f54=_0x43c41f;var _0x5cc7a6;this[_0x172f54(0x204)][_0x172f54(0x18c)](_0x172f54(0x21d)),(_0x5cc7a6=this[_0x172f54(0x243)])==null||_0x5cc7a6[_0x172f54(0x1c2)]();}['_handleOnline'](){const _0x22cd27=_0x43c41f;this[_0x22cd27(0x204)]['next']('idle'),this[_0x22cd27(0x1cb)]();}};_0x4f1dcb=_0x4ff6e1([_0x4944be(0x2,_0x4d2c8e[_0x43c41f(0x1ed)]),_0x4944be(0x3,(0x0,_0x4d2c8e[_0x43c41f(0x1cd)])(_0x3bc393)),_0x4944be(0x4,_0x4d2c8e[_0x43c41f(0x16a)])],_0x4f1dcb);var _0x1af3ac=_0x43c41f(0x18b),_0x6f6ae=_0x43c41f(0x230);let _0x23ab06={},_0x4d1009=class extends _0x4d2c8e['Disposable']{constructor(_0x2585fe){const _0xbde2bb=_0x43c41f;super(),this[_0xbde2bb(0x22a)]=_0x2585fe,this[_0xbde2bb(0x1fc)]();}[_0x43c41f(0x1fc)](){const _0x59416b=_0x43c41f;[_0x6b162b[_0x59416b(0x1a5)]['id'],_0x6b162b[_0x59416b(0x1ec)]['id'],_0xbe9c79[_0x59416b(0x1ef)]['id']][_0x59416b(0x209)](_0x115500=>{const _0x236714=_0x59416b;this[_0x236714(0x1c3)](this[_0x236714(0x22a)][_0x236714(0x187)](_0x115500));});}};_0x4d1009=_0x4ff6e1([_0x4944be(0x0,(0x0,_0x4d2c8e[_0x43c41f(0x1cd)])(_0x3bc393))],_0x4d1009);function _0x1e923a({ref:_0x1b0a57,..._0x57d1fe}){const _0x381207=_0x43c41f;let {icon:_0x5d62dc,id:_0x1944b6,className:_0x277b94,extend:_0x47c0b8,..._0x40cd1e}=_0x57d1fe,_0x29ecdc=(_0x381207(0x190)+_0x1944b6+'\x20'+(_0x277b94||''))['trim'](),_0x1e5224=(0x0,_0x4ab200[_0x381207(0x170)])('_'+_0x36a86b());return _0x368d0b(_0x5d62dc,''+_0x1944b6,{'defIds':_0x5d62dc[_0x381207(0x19c)],'idSuffix':_0x1e5224[_0x381207(0x253)]},{'ref':_0x1b0a57,'className':_0x29ecdc,..._0x40cd1e},_0x47c0b8);}function _0x368d0b(_0x415843,_0x27b128,_0x3d7255,_0x465089,_0x1a9a6b){const _0x54bd72=_0x43c41f;return(0x0,_0x4ab200[_0x54bd72(0x226)])(_0x415843[_0x54bd72(0x1bf)],{'key':_0x27b128,..._0x52fdcd(_0x415843,_0x3d7255,_0x1a9a6b),..._0x465089},(_0x3ca9d5(_0x415843,_0x3d7255)[_0x54bd72(0x160)]||[])[_0x54bd72(0x1ea)]((_0x1fb592,_0x3c5e24)=>_0x368d0b(_0x1fb592,_0x27b128+'-'+_0x415843[_0x54bd72(0x1bf)]+'-'+_0x3c5e24,_0x3d7255,void 0x0,_0x1a9a6b)));}function _0x52fdcd(_0xffd753,_0x1f3d1a,_0x22eae6){const _0xd45a19=_0x43c41f;let _0x11964e={..._0xffd753[_0xd45a19(0x1f6)]};_0x22eae6!=null&&_0x22eae6[_0xd45a19(0x237)]&&_0x11964e['fill']==='colorChannel1'&&(_0x11964e[_0xd45a19(0x24b)]=_0x22eae6[_0xd45a19(0x237)]),_0x22eae6!=null&&_0x22eae6['colorChannel1']&&_0x11964e[_0xd45a19(0x215)]===_0xd45a19(0x237)&&(_0x11964e['stroke']=_0x22eae6[_0xd45a19(0x237)]),_0xffd753[_0xd45a19(0x1bf)]===_0xd45a19(0x1dc)&&_0x11964e['id']&&(_0x11964e['id']+=_0x1f3d1a['idSuffix']),Object['entries'](_0x11964e)['forEach'](([_0x3d6cde,_0x538e99])=>{const _0x19974d=_0xd45a19;_0x3d6cde===_0x19974d(0x1dc)&&typeof _0x538e99==_0x19974d(0x23a)&&(_0x11964e[_0x3d6cde]=_0x538e99[_0x19974d(0x185)](/url\(#(.*)\)/,'url(#$1'+_0x1f3d1a[_0x19974d(0x175)]+')'));});let {defIds:_0xb72e61}=_0x1f3d1a;return!_0xb72e61||_0xb72e61[_0xd45a19(0x24a)]===0x0?_0x11964e:(_0xffd753[_0xd45a19(0x1bf)]==='use'&&_0x11964e[_0xd45a19(0x17f)]&&(_0x11964e[_0xd45a19(0x17f)]+=_0x1f3d1a[_0xd45a19(0x175)]),Object[_0xd45a19(0x248)](_0x11964e)['forEach'](([_0x244da6,_0x3159d6])=>{const _0x4d196a=_0xd45a19;typeof _0x3159d6==_0x4d196a(0x23a)&&(_0x11964e[_0x244da6]=_0x3159d6[_0x4d196a(0x185)](/url\(#(.*)\)/,_0x4d196a(0x1d7)+_0x1f3d1a[_0x4d196a(0x175)]+')'));}),_0x11964e);}function _0x3ca9d5(_0xc1cebd,_0x3e8531){const _0x39c81b=_0x43c41f;var _0x69dee9;let {defIds:_0x42827d}=_0x3e8531;return!_0x42827d||_0x42827d[_0x39c81b(0x24a)]===0x0?_0xc1cebd:_0xc1cebd['tag']===_0x39c81b(0x24e)&&(_0x69dee9=_0xc1cebd[_0x39c81b(0x160)])!=null&&_0x69dee9['length']?{..._0xc1cebd,'children':_0xc1cebd['children']['map'](_0x59e579=>typeof _0x59e579['attrs']['id']=='string'&&_0x42827d&&_0x42827d['includes'](_0x59e579[_0x39c81b(0x1f6)]['id'])?{..._0x59e579,'attrs':{..._0x59e579['attrs'],'id':_0x59e579[_0x39c81b(0x1f6)]['id']+_0x3e8531[_0x39c81b(0x175)]}}:_0x59e579)}:_0xc1cebd;}function _0x36a86b(){const _0x411cce=_0x43c41f;return Math[_0x411cce(0x19a)]()[_0x411cce(0x255)](0x24)[_0x411cce(0x169)](0x2,0x8);}_0x1e923a[_0x43c41f(0x1d6)]=_0x43c41f(0x22b);let _0x4252b8={'tag':_0x43c41f(0x198),'attrs':{'xmlns':_0x43c41f(0x22e),'fill':_0x43c41f(0x20a),'viewBox':_0x43c41f(0x1d3),'width':_0x43c41f(0x1b1),'height':_0x43c41f(0x1b1)},'children':[{'tag':_0x43c41f(0x182),'attrs':{'fill':_0x43c41f(0x1ac),'d':_0x43c41f(0x208)}},{'tag':_0x43c41f(0x182),'attrs':{'fill':_0x43c41f(0x1ac),'d':_0x43c41f(0x193),'fillRule':'evenodd','clipRule':_0x43c41f(0x15d)}}]},_0x5c4ffe=(0x0,_0x4ab200[_0x43c41f(0x1dd)])(function(_0x5525da,_0x224b9e){const _0x531170=_0x43c41f;return(0x0,_0x4ab200[_0x531170(0x226)])(_0x1e923a,Object[_0x531170(0x213)]({},_0x5525da,{'id':_0x531170(0x1d0),'ref':_0x224b9e,'icon':_0x4252b8}));});_0x5c4ffe[_0x43c41f(0x1d6)]=_0x43c41f(0x199);function _0x41819d(){const _0x5d4bc1=_0x43c41f;let _0x5e9596=(0x0,_0x4675f4['useDependency'])(_0x5a755d),_0x59930c=(0x0,_0x4675f4['useDependency'])(_0x4d2c8e[_0x5d4bc1(0x1f0)]),_0x2c4784=(0x0,_0x4675f4[_0x5d4bc1(0x227)])(()=>_0x59930c[_0x5d4bc1(0x1f9)](_0x4d2c8e['UniverInstanceType']['UNIVER_SHEET']),void 0x0,!0x1,[]),_0x29cc53=(0x0,_0x4675f4[_0x5d4bc1(0x227)])((0x0,_0x4ab200['useMemo'])(()=>_0x2c4784?(0x0,_0x41f802[_0x5d4bc1(0x17a)])(()=>(0x0,_0x41f802[_0x5d4bc1(0x1cf)])(_0x5e9596[_0x5d4bc1(0x17c)](_0x2c4784[_0x5d4bc1(0x20c)]()))):(0x0,_0x41f802['of'])(null),[_0x2c4784,_0x5e9596]),null),_0x596675=(0x0,_0x4675f4[_0x5d4bc1(0x227)])(_0x29cc53?()=>_0x29cc53[_0x5d4bc1(0x18f)]:null,_0x5d4bc1(0x232),!0x1,[_0x29cc53]);return _0x29cc53?(0x0,_0x1e4412[_0x5d4bc1(0x1cc)])(_0x7a06bf[_0x5d4bc1(0x231)],{'align':'end','disabled':_0x596675===_0x5d4bc1(0x21d),'className':'univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','overlay':(0x0,_0x1e4412[_0x5d4bc1(0x1cc)])(_0x1b0361,{'status':_0x596675,'coordinator':_0x29cc53}),'children':(0x0,_0x1e4412[_0x5d4bc1(0x1cc)])('button',{'className':(0x0,_0x7a06bf[_0x5d4bc1(0x250)])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x596675===_0x5d4bc1(0x21d),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x596675!==_0x5d4bc1(0x21d)}),'type':'button','children':(0x0,_0x1e4412[_0x5d4bc1(0x1cc)])(_0x5c4ffe,{})})}):null;}function _0x1b0361(_0x480d22){const _0x33f511=_0x43c41f;let {status:_0x2f33af,coordinator:_0x54007d}=_0x480d22;switch(_0x2f33af){case'idle':return(0x0,_0x1e4412[_0x33f511(0x1cc)])(_0x386608,{'coordinator':_0x54007d});case _0x33f511(0x1c6):return(0x0,_0x1e4412[_0x33f511(0x1cc)])(_0x4101dc,{'coordinator':_0x54007d});case'not-following':return(0x0,_0x1e4412['jsx'])(_0x1e479f,{'coordinator':_0x54007d});case'offline':return(0x0,_0x1e4412[_0x33f511(0x1cc)])(_0xa1f248,{});case'presenting':return(0x0,_0x1e4412[_0x33f511(0x1cc)])(_0x442fa9,{'coordinator':_0x54007d});default:return null;}}function _0x386608(_0x5bd3fc){const _0x5bd6e3=_0x43c41f;let {coordinator:_0x44a2f1}=_0x5bd3fc;return(0x0,_0x1e4412[_0x5bd6e3(0x1b6)])(_0x1e4412['Fragment'],{'children':[(0x0,_0x1e4412[_0x5bd6e3(0x1cc)])(_0x5bd6e3(0x19f),{'className':_0x5bd6e3(0x22d),'children':_0x5bd6e3(0x164)}),(0x0,_0x1e4412[_0x5bd6e3(0x1cc)])(_0x7a06bf[_0x5bd6e3(0x1ee)],{'onClick':()=>_0x44a2f1[_0x5bd6e3(0x21f)](),'children':_0x5bd6e3(0x24d)})]});}function _0x4101dc(_0x1188ff){const _0x269b2c=_0x43c41f;let {coordinator:_0x16ff79}=_0x1188ff;return(0x0,_0x1e4412[_0x269b2c(0x1b6)])(_0x1e4412[_0x269b2c(0x218)],{'children':[(0x0,_0x1e4412['jsx'])('div',{'className':_0x269b2c(0x22d),'children':_0x269b2c(0x23f)}),(0x0,_0x1e4412[_0x269b2c(0x1cc)])(_0x7a06bf['Button'],{'onClick':()=>_0x16ff79[_0x269b2c(0x1a2)](),'children':'Stop\x20following'})]});}function _0x1e479f(_0x5847ad){const _0x574b37=_0x43c41f;let {coordinator:_0x4b3c19}=_0x5847ad;return(0x0,_0x1e4412[_0x574b37(0x1b6)])(_0x1e4412[_0x574b37(0x218)],{'children':[(0x0,_0x1e4412[_0x574b37(0x1cc)])(_0x574b37(0x19f),{'className':_0x574b37(0x22d),'children':_0x574b37(0x1c0)}),(0x0,_0x1e4412['jsx'])(_0x7a06bf[_0x574b37(0x1ee)],{'variant':_0x574b37(0x1fd),'onClick':()=>_0x4b3c19['startFollowing'](),'children':_0x574b37(0x249)})]});}function _0x442fa9(_0x3e3e00){const _0x78d42e=_0x43c41f;let {coordinator:_0x13cced}=_0x3e3e00;return(0x0,_0x1e4412[_0x78d42e(0x1b6)])(_0x1e4412[_0x78d42e(0x218)],{'children':[(0x0,_0x1e4412[_0x78d42e(0x1cc)])(_0x78d42e(0x19f),{'className':_0x78d42e(0x22d),'children':_0x78d42e(0x244)}),(0x0,_0x1e4412[_0x78d42e(0x1cc)])(_0x7a06bf['Button'],{'variant':_0x78d42e(0x1b9),'onClick':()=>_0x13cced['stopPresenting'](),'children':_0x78d42e(0x1f4)})]});}function _0xa1f248(){const _0x32e0b4=_0x43c41f;return(0x0,_0x1e4412['jsx'])(_0x1e4412[_0x32e0b4(0x218)],{'children':'You\x27are\x20offline.'});}let _0xf04774=class extends _0x4d2c8e[_0x43c41f(0x23c)]{constructor(_0x13a84c,_0x36ef69){const _0x136d08=_0x43c41f;super(),this[_0x136d08(0x184)]=_0x13a84c,this[_0x136d08(0x20e)]=_0x36ef69,this['_mountLiveShare']();}['_mountLiveShare'](){const _0x2f01b5=_0x43c41f;this[_0x2f01b5(0x1c3)](this['_uiPartsService']['registerComponent'](_0x4675f4[_0x2f01b5(0x1f8)][_0x2f01b5(0x173)],()=>(0x0,_0x4675f4['connectInjector'])(_0x41819d,this['_injector'])));}};_0xf04774=_0x4ff6e1([_0x4944be(0x0,(0x0,_0x4d2c8e[_0x43c41f(0x1cd)])(_0x4d2c8e['Injector'])),_0x4944be(0x1,_0x4675f4[_0x43c41f(0x256)])],_0xf04774);let _0x59e15c=class extends _0x4d2c8e[_0x43c41f(0x1ba)]{constructor(_0x5c62c8=_0x23ab06,_0x286a8f,_0x303f3a){const _0x1be436=_0x43c41f;super(),this[_0x1be436(0x224)]=_0x5c62c8,this['_injector']=_0x286a8f,this[_0x1be436(0x1db)]=_0x303f3a;let {..._0x1944e0}=(0x0,_0x4d2c8e[_0x1be436(0x178)])({},_0x23ab06,this['_config']);this[_0x1be436(0x1db)][_0x1be436(0x1b0)](_0x1be436(0x22f),_0x1944e0);}[_0x43c41f(0x179)](){const _0xa2883f=_0x43c41f;(0x0,_0x4d2c8e[_0xa2883f(0x205)])(this['_injector'],(0x0,_0x4d2c8e[_0xa2883f(0x1ca)])([[_0x3bc393],[_0x5a755d],[_0x4d1009],[_0xf04774]],this[_0xa2883f(0x224)][_0xa2883f(0x15e)])),(0x0,_0x4d2c8e[_0xa2883f(0x21c)])(this[_0xa2883f(0x184)],[[_0x4d1009]]);}['onRendered'](){const _0x3105ed=_0x43c41f;(0x0,_0x4d2c8e[_0x3105ed(0x21c)])(this[_0x3105ed(0x184)],[[_0xf04774]]);}};_0x3a32dd(_0x59e15c,_0x43c41f(0x203),_0x4d2c8e[_0x43c41f(0x201)][_0x43c41f(0x1c8)]),_0x3a32dd(_0x59e15c,'pluginName',_0x43c41f(0x167)),_0x3a32dd(_0x59e15c,_0x43c41f(0x162),_0x1af3ac),_0x3a32dd(_0x59e15c,_0x43c41f(0x1c7),_0x6f6ae),_0x59e15c=_0x4ff6e1([(0x0,_0x4d2c8e[_0x43c41f(0x1ff)])(_0x1cac21[_0x43c41f(0x206)],_0x4675f4[_0x43c41f(0x183)],_0x21b6e0[_0x43c41f(0x1e9)]),_0x4944be(0x1,(0x0,_0x4d2c8e[_0x43c41f(0x1cd)])(_0x4d2c8e[_0x43c41f(0x20b)])),_0x4944be(0x2,_0x4d2c8e[_0x43c41f(0x1ed)])],_0x59e15c),Object[_0x43c41f(0x1f7)](_0x30429c,_0x43c41f(0x24f),{'enumerable':!0x0,'get':function(){return _0x5a755d;}}),_0x30429c[_0x43c41f(0x1f5)]=_0x408685,Object[_0x43c41f(0x1f7)](_0x30429c,_0x43c41f(0x189),{'enumerable':!0x0,'get':function(){return _0x59e15c;}});}));function _0xaf52(_0x1d79dd,_0x2b07e4){_0x1d79dd=_0x1d79dd-0x15d;const _0x248f32=_0x248f();let _0xaf521=_0x248f32[_0x1d79dd];return _0xaf521;}function _0x248f(){const _0x1be244=['_status','@univerjs/core','memberID','CommandType','getInitialStates','91arrsDh','not-following','RxDisposable','UniverProCollaborationClient','_commandService','UniverCollaborationClientPlugin','map','dispose$','SetScrollOperation','IConfigService','Button','SetWorksheetActiveOperation','IUniverInstanceService','sheet','send','805fyJgWU','Stop\x20presenting','LiveShareStatus','attrs','defineProperty','BuiltInUIPart','getCurrentTypeOfUnit$','InsertSheetMutation','FOLLOWING','_init','text','CollaborationSessionService','DependentOn','BehaviorSubject','UniverInstanceType','_handleNewChangeSets','type','_status$','registerDependencies','UniverLicensePlugin','_handleOperation','M9.20459\x204.90474C9.20459\x204.64763\x209.35535\x204.54174\x209.54053\x204.68737L11.2643\x206.04046C11.4495\x206.18609\x2011.4495\x206.42299\x2011.2643\x206.56789L9.55334\x207.90706C9.36755\x208.05269\x209.20386\x207.90499\x209.20386\x207.68969V6.96785H8.94446C8.19543\x206.96785\x206.72595\x207.28347\x206.37646\x207.89174C6.30786\x208.00322\x206.23572\x207.97884\x206.23572\x207.89174C6.25073\x206.80828\x208.0918\x205.58895\x209.17383\x205.58895H9.20459V4.90474Z','forEach','none','Injector','getUnitId','startFollowing','_uiPartsService','SessionStatus','params','1084SvCghM','1686tROTBA','assign','shouldShareOperation','stroke','stopPresenting','129WMJZDI','Fragment','constructor','includes','onCommandExecuted','touchDependencies','offline','_startLiveShareCoordinator','tryStartPresenting','_startFollowing','LIVESHARE_TERMINATE','_beIdle','2279950GdCJyb','_config','_stopFollowing','createElement','useObservable','841220IAKFpL','_handleNewHost','_liveShareService','UniverIcon','IDLE','univer-mb-3\x20univer-w-full\x20univer-text-sm','http://www.w3.org/2000/svg','live-share.config','1.0.0-alpha.8','Dropdown','idle','OPERATION','asObservable','toPrimitive','getTypeOfUnitDisposed$','colorChannel1','prototype','complete','string','exports','Disposable','_unitID','UniverUi','You\x27re\x20following\x20the\x20presenter','1698SItqAe','react','11GzGSzp','_commandDisposable','You\x27re\x20presenting\x20the\x20document','UniverProLicense','UNIVER_SHEET','add','entries','Start\x20following','length','fill','LIVESHARE_NEW_HOST','Start','defs','LiveShareController','clsx','presenter','SAME_OPERATION_SHARE_INTERVAL','current','values','toString','IUIPartsService','evenodd','override','CollaborationEvent','children','react/jsx-runtime','packageName','operations','Present\x20this\x20document','getMemberID','NOT_FOLLOWING','UNIVER_LIVE_SHARE_PLUGIN','_presenter','substring','ICommandService','subscribe','data','has','getValue','event$','useRef','UniverProLiveShare','UniverCore','HEADER_MENU','_univerInstanceService','idSuffix','_collabSession','@univerjs/sheets-ui','merge','onStarting','defer','throttleTime','getLiveShareCoordinator','NEW_CHANGESETS','decorate','xlink:href','find','toStringTag','path','UniverUIPlugin','_injector','replace','parseProtocolChangeset','registerSharedOperation','presenting','UniverLiveSharePlugin','mutations','@univerjs-pro/live-share','next','_stopPresenting','sessionStatus$','status$','univerjs-icon\x20univerjs-icon-','_entities','getLiveShareCoordinatorSync','M1.98682\x202.73096C1.98682\x202.17867\x202.43457\x201.73096\x202.98682\x201.73096H14.9868C15.5391\x201.73096\x2015.9868\x202.17867\x2015.9868\x202.73096V9.90105C15.9868\x2010.4533\x2015.5391\x2010.901\x2014.9868\x2010.901H9.62183V13.5577H12.9868C13.3375\x2013.5577\x2013.6218\x2013.842\x2013.6218\x2014.1927C13.6218\x2014.5434\x2013.3375\x2014.8277\x2012.9868\x2014.8277H4.98682C4.63611\x2014.8277\x204.35181\x2014.5434\x204.35181\x2014.1927C4.35181\x2013.842\x204.63611\x2013.5577\x204.98682\x2013.5577H8.35181V10.901H2.98682C2.43457\x2010.901\x201.98682\x2010.4533\x201.98682\x209.90105V2.73096ZM3.25684\x209.63106V3.00095H14.7168V9.63106H3.25684Z','call','unsubscribe','Module','_reporters','svg','LiveShareIcon','random','_collabSessionService','defIds','unit','stringify','div','UniverDesign','amd','stopFollowing','UniverSheets','_sharedOperations','SetZoomRatioOperation','pipe','LIVESHARE_REQUEST_HOST','LIVESHARE_OPERATION','takeUntil','registerInitialStateReporter','executeCommand','currentColor','PRESENTING','toDisposable','symbol','setConfig','1em','143wbOxLu','_handleOnline','@univerjs-pro/license','getConfig','jsxs','_startPresenting','operators','default','Plugin','delete','90ZTqKjL','Subject','clear','tag','You\x27re\x20not\x20following\x20the\x20presenter','216708OGrTuI','dispose','disposeWithMe','69096MOXzro','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','following','version','UNIVER_UNKNOWN','init','mergeOverrideWithDependencies','_fetchOperations','jsx','Inject','@univerjs-pro/collaboration-client','from','live-share-icon','DisposableCollection','function','0\x200\x2017\x2017','get','object','displayName','url(#$1','_handleTerminate','OFFLINE','rxjs','_configService','mask','forwardRef','set'];_0x248f=function(){return _0x1be244;};return _0x248f();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/live-share",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Live share collaboration plugin for Univer Pro.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -63,23 +63,24 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@univerjs/icons": "1.34.0",
|
|
66
|
-
"@univerjs-pro/collaboration": "1.0.0-alpha.
|
|
67
|
-
"@univerjs-pro/
|
|
68
|
-
"@univerjs/core": "1.0.0-alpha.
|
|
69
|
-
"@univerjs/design": "1.0.0-alpha.
|
|
70
|
-
"@univerjs/sheets": "1.0.0-alpha.
|
|
71
|
-
"@univerjs/ui": "1.0.0-alpha.
|
|
72
|
-
"@univerjs/
|
|
66
|
+
"@univerjs-pro/collaboration-client": "1.0.0-alpha.8",
|
|
67
|
+
"@univerjs-pro/license": "1.0.0-alpha.8",
|
|
68
|
+
"@univerjs/core": "1.0.0-alpha.8",
|
|
69
|
+
"@univerjs/design": "1.0.0-alpha.8",
|
|
70
|
+
"@univerjs/sheets": "1.0.0-alpha.8",
|
|
71
|
+
"@univerjs/sheets-ui": "1.0.0-alpha.8",
|
|
72
|
+
"@univerjs/ui": "1.0.0-alpha.8",
|
|
73
|
+
"@univerjs-pro/collaboration": "1.0.0-alpha.8"
|
|
73
74
|
},
|
|
74
75
|
"devDependencies": {
|
|
75
|
-
"postcss": "^8.5.
|
|
76
|
+
"postcss": "^8.5.23",
|
|
76
77
|
"react": "18.3.1",
|
|
77
78
|
"rxjs": "7.8.2",
|
|
78
79
|
"tailwindcss": "3.4.17",
|
|
79
80
|
"typescript": "^6.0.3",
|
|
80
81
|
"vitest": "^4.1.10",
|
|
81
|
-
"@univerjs-infra/shared": "1.0.0-alpha.
|
|
82
|
-
"@univerjs/protocol": "1.0.0-alpha.
|
|
82
|
+
"@univerjs-infra/shared": "1.0.0-alpha.8",
|
|
83
|
+
"@univerjs/protocol": "1.0.0-alpha.8"
|
|
83
84
|
},
|
|
84
85
|
"scripts": {
|
|
85
86
|
"test": "vitest run",
|