@univerjs-pro/live-share 0.21.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -7
- 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 +19 -13
package/README.md
CHANGED
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
# @univerjs-pro/live-share
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://npmjs.com/package/@univerjs-pro/live-share)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/live-share)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
`@univerjs-pro/live-share` provides live share collaboration plugin for Univer Pro.
|
|
7
|
+
|
|
8
|
+
## Package Overview
|
|
9
|
+
|
|
10
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
11
|
+
| --- | --- | :---: | :---: | :---: |
|
|
12
|
+
| `@univerjs-pro/live-share` | `UniverProLiveShare` | Yes | No | Yes |
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @univerjs-pro/live-share
|
|
18
|
+
# or
|
|
19
|
+
npm install @univerjs-pro/live-share
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
6
23
|
|
|
7
24
|
## Usage
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import '@univerjs-pro/live-share/lib/index.css';
|
|
28
|
+
import { UniverLiveSharePlugin } from '@univerjs-pro/live-share';
|
|
29
|
+
|
|
30
|
+
univer.registerPlugin(UniverLiveSharePlugin);
|
|
11
31
|
```
|
|
12
32
|
|
|
13
|
-
|
|
14
|
-
|
|
33
|
+
## Resources
|
|
34
|
+
|
|
35
|
+
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
36
|
+
- [NPM package](https://npmjs.com/package/@univerjs-pro/live-share)
|
|
37
|
+
|
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x8cc018=_0x4845;(function(_0x6da486,_0x44fbce){const _0x43388a=_0x4845,_0x2734a7=_0x6da486();while(!![]){try{const _0x43b1b5=parseInt(_0x43388a(0x1c2))/0x1*(parseInt(_0x43388a(0x1b7))/0x2)+parseInt(_0x43388a(0x1b9))/0x3*(-parseInt(_0x43388a(0x1ca))/0x4)+parseInt(_0x43388a(0x1c8))/0x5+-parseInt(_0x43388a(0x1d6))/0x6*(parseInt(_0x43388a(0x1d5))/0x7)+-parseInt(_0x43388a(0x1d2))/0x8*(parseInt(_0x43388a(0x1be))/0x9)+-parseInt(_0x43388a(0x1d9))/0xa+parseInt(_0x43388a(0x1ce))/0xb;if(_0x43b1b5===_0x44fbce)break;else _0x2734a7['push'](_0x2734a7['shift']());}catch(_0x407221){_0x2734a7['push'](_0x2734a7['shift']());}}}(_0x4fc6,0xefc33));let _univerjs_pro_live_share=require('@univerjs-pro/live-share'),_univerjs_core=require('@univerjs/core'),_univerjs_core_facade=require('@univerjs/core/facade');function _typeof(_0x188bd3){'@babel/helpers - typeof';const _0x2b8a43=_0x4845;return _typeof=_0x2b8a43(0x1d4)==typeof Symbol&&_0x2b8a43(0x1c9)==typeof Symbol[_0x2b8a43(0x1c1)]?function(_0x464961){return typeof _0x464961;}:function(_0x128d5a){const _0x4579da=_0x2b8a43;return _0x128d5a&&_0x4579da(0x1d4)==typeof Symbol&&_0x128d5a[_0x4579da(0x1cc)]===Symbol&&_0x128d5a!==Symbol['prototype']?_0x4579da(0x1c9):typeof _0x128d5a;},_typeof(_0x188bd3);}function toPrimitive(_0x557d42,_0x254aae){const _0xb817a8=_0x4845;if(_0xb817a8(0x1bb)!=_typeof(_0x557d42)||!_0x557d42)return _0x557d42;var _0x5c4ba1=_0x557d42[Symbol[_0xb817a8(0x1d8)]];if(void 0x0!==_0x5c4ba1){var _0x1883d2=_0x5c4ba1[_0xb817a8(0x1b4)](_0x557d42,_0x254aae||_0xb817a8(0x1b6));if('object'!=_typeof(_0x1883d2))return _0x1883d2;throw new TypeError(_0xb817a8(0x1d0));}return('string'===_0x254aae?String:Number)(_0x557d42);}function _0x4fc6(){const _0x2b2218=['defineProperty','function','2607941hNSzfG','30BOKYtO','extend','toPrimitive','13102390nelYDY','stopFollowing','UNIVER_SHEET','getLiveShareCoordinatorSync','getUnitId','getStatus','string','FEnum','LiveShareController','call','LiveShareStatusEnum','default','26cDDrBE','tryStartPresenting','45522gPgCiM','No\x20active\x20workbook\x20found.','object','get','LiveShareStatus','2172438bzOizB','FUniver','IUniverInstanceService','iterator','72322RsiKUh','_injector','_liveShareController','IDLE','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','getCurrentUnitOfType','4445640wPbdBt','symbol','264JWcgrL','stopPresenting','constructor','startFollowing','57841817gyiUjD','UniverInstanceType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getLiveShareStatus','64lKpukg'];_0x4fc6=function(){return _0x2b2218;};return _0x4fc6();}function _0x4845(_0x4669aa,_0x9f95d2){_0x4669aa=_0x4669aa-0x1ae;const _0x4fc61f=_0x4fc6();let _0x4845c1=_0x4fc61f[_0x4669aa];return _0x4845c1;}function toPropertyKey(_0x5b873f){const _0x4db03c=_0x4845;var _0x2fc93d=toPrimitive(_0x5b873f,_0x4db03c(0x1b1));return _0x4db03c(0x1c9)==_typeof(_0x2fc93d)?_0x2fc93d:_0x2fc93d+'';}function _defineProperty(_0x3b533a,_0x1c1af9,_0x271fba){const _0x162143=_0x4845;return(_0x1c1af9=toPropertyKey(_0x1c1af9))in _0x3b533a?Object[_0x162143(0x1d3)](_0x3b533a,_0x1c1af9,{'value':_0x271fba,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3b533a[_0x1c1af9]=_0x271fba,_0x3b533a;}var FUniverLiveShareMixin=class extends _univerjs_core_facade[_0x8cc018(0x1bf)]{constructor(..._0x514cdb){const _0x53786c=_0x8cc018;super(..._0x514cdb),_defineProperty(this,_0x53786c(0x1c4),void 0x0);}['_initialize'](_0x2e483a){const _0x23a34f=_0x8cc018;this[_0x23a34f(0x1c4)]=_0x2e483a[_0x23a34f(0x1bc)](_univerjs_pro_live_share[_0x23a34f(0x1b3)]);}[_0x8cc018(0x1d1)](){const _0x4340d4=_0x8cc018;var _0x1e468e;const _0x26f83d=this[_0x4340d4(0x1c3)][_0x4340d4(0x1bc)](_univerjs_core['IUniverInstanceService'])[_0x4340d4(0x1c7)](_univerjs_core[_0x4340d4(0x1cf)]['UNIVER_SHEET']);if(!_0x26f83d)throw new Error('No\x20active\x20workbook\x20found.');const _0x2b595e=_0x26f83d[_0x4340d4(0x1af)](),_0x49bb91=this['_liveShareController'][_0x4340d4(0x1ae)](_0x2b595e);return(_0x1e468e=_0x49bb91===null||_0x49bb91===void 0x0?void 0x0:_0x49bb91[_0x4340d4(0x1b0)]())!==null&&_0x1e468e!==void 0x0?_0x1e468e:_univerjs_pro_live_share[_0x4340d4(0x1bd)][_0x4340d4(0x1c5)];}['startFollowing'](){const _0x36bbfe=_0x8cc018,_0xeee168=this[_0x36bbfe(0x1c3)][_0x36bbfe(0x1bc)](_univerjs_core['IUniverInstanceService'])[_0x36bbfe(0x1c7)](_univerjs_core[_0x36bbfe(0x1cf)]['UNIVER_SHEET']);if(!_0xeee168)throw new Error(_0x36bbfe(0x1ba));const _0x3beef9=_0xeee168[_0x36bbfe(0x1af)](),_0xf984e4=this[_0x36bbfe(0x1c4)][_0x36bbfe(0x1ae)](_0x3beef9);if(!_0xf984e4)throw new Error(_0x36bbfe(0x1c6));_0xf984e4[_0x36bbfe(0x1cd)]();}[_0x8cc018(0x1da)](){const _0x3614f8=_0x8cc018,_0x35b522=this[_0x3614f8(0x1c3)][_0x3614f8(0x1bc)](_univerjs_core[_0x3614f8(0x1c0)])[_0x3614f8(0x1c7)](_univerjs_core[_0x3614f8(0x1cf)][_0x3614f8(0x1db)]);if(!_0x35b522)throw new Error(_0x3614f8(0x1ba));const _0x324ba5=_0x35b522[_0x3614f8(0x1af)](),_0x250c27=this['_liveShareController'][_0x3614f8(0x1ae)](_0x324ba5);if(!_0x250c27)throw new Error(_0x3614f8(0x1c6));_0x250c27['stopFollowing']();}['startPresenting'](){const _0x3a0b2e=_0x8cc018,_0xb5e351=this[_0x3a0b2e(0x1c3)]['get'](_univerjs_core[_0x3a0b2e(0x1c0)])[_0x3a0b2e(0x1c7)](_univerjs_core[_0x3a0b2e(0x1cf)]['UNIVER_SHEET']);if(!_0xb5e351)throw new Error(_0x3a0b2e(0x1ba));const _0x5d378a=_0xb5e351[_0x3a0b2e(0x1af)](),_0x19313b=this[_0x3a0b2e(0x1c4)][_0x3a0b2e(0x1ae)](_0x5d378a);if(!_0x19313b)throw new Error(_0x3a0b2e(0x1c6));_0x19313b[_0x3a0b2e(0x1b8)]();}[_0x8cc018(0x1cb)](){const _0x143118=_0x8cc018,_0x43637f=this[_0x143118(0x1c3)][_0x143118(0x1bc)](_univerjs_core[_0x143118(0x1c0)])[_0x143118(0x1c7)](_univerjs_core['UniverInstanceType']['UNIVER_SHEET']);if(!_0x43637f)throw new Error(_0x143118(0x1ba));const _0x305bc3=_0x43637f[_0x143118(0x1af)](),_0x567165=this[_0x143118(0x1c4)][_0x143118(0x1ae)](_0x305bc3);if(!_0x567165)throw new Error(_0x143118(0x1c6));_0x567165['stopPresenting']();}};_univerjs_core_facade[_0x8cc018(0x1bf)][_0x8cc018(0x1d7)](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends _univerjs_core_facade[_0x8cc018(0x1b2)]{get[_0x8cc018(0x1b5)](){return _univerjs_pro_live_share['LiveShareStatus'];}};_univerjs_core_facade[_0x8cc018(0x1b2)][_0x8cc018(0x1d7)](FLiveShareEnumMixin);
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4e5b04=_0x214e;(function(_0x378fe4,_0x4eb3ff){const _0x6f5c45=_0x214e,_0x1c6236=_0x378fe4();while(!![]){try{const _0x341788=parseInt(_0x6f5c45(0x19e))/0x1*(-parseInt(_0x6f5c45(0x20c))/0x2)+-parseInt(_0x6f5c45(0x1ca))/0x3*(-parseInt(_0x6f5c45(0x1c9))/0x4)+parseInt(_0x6f5c45(0x1d3))/0x5*(-parseInt(_0x6f5c45(0x20a))/0x6)+parseInt(_0x6f5c45(0x1df))/0x7*(-parseInt(_0x6f5c45(0x223))/0x8)+-parseInt(_0x6f5c45(0x16c))/0x9*(-parseInt(_0x6f5c45(0x22b))/0xa)+-parseInt(_0x6f5c45(0x1b7))/0xb*(parseInt(_0x6f5c45(0x1a6))/0xc)+parseInt(_0x6f5c45(0x190))/0xd;if(_0x341788===_0x4eb3ff)break;else _0x1c6236['push'](_0x1c6236['shift']());}catch(_0x1a6803){_0x1c6236['push'](_0x1c6236['shift']());}}}(_0x4275,0xe68a7),Object['defineProperty'](exports,Symbol[_0x4e5b04(0x22d)],{'value':_0x4e5b04(0x17e)}));let _univerjs_core=require('@univerjs/core'),_univerjs_ui=require('@univerjs/ui'),_univerjs_design=require('@univerjs/design'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_sheets=require('@univerjs/sheets'),rxjs=require('rxjs'),rxjs_operators=require('rxjs/operators'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_sheets_ui=require('@univerjs/sheets-ui');function _typeof(_0x2bad41){'@babel/helpers - typeof';const _0x20c933=_0x4e5b04;return _typeof=_0x20c933(0x186)==typeof Symbol&&_0x20c933(0x1c1)==typeof Symbol['iterator']?function(_0x4b88ac){return typeof _0x4b88ac;}:function(_0x45d51a){const _0x1c59cd=_0x20c933;return _0x45d51a&&_0x1c59cd(0x186)==typeof Symbol&&_0x45d51a[_0x1c59cd(0x1cc)]===Symbol&&_0x45d51a!==Symbol[_0x1c59cd(0x187)]?_0x1c59cd(0x1c1):typeof _0x45d51a;},_typeof(_0x2bad41);}function toPrimitive(_0x195f02,_0x114770){const _0x650a82=_0x4e5b04;if(_0x650a82(0x1c8)!=_typeof(_0x195f02)||!_0x195f02)return _0x195f02;var _0x57e6e7=_0x195f02[Symbol[_0x650a82(0x1d9)]];if(void 0x0!==_0x57e6e7){var _0x50119d=_0x57e6e7[_0x650a82(0x176)](_0x195f02,_0x114770||_0x650a82(0x1da));if(_0x650a82(0x1c8)!=_typeof(_0x50119d))return _0x50119d;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x650a82(0x1bc)===_0x114770?String:Number)(_0x195f02);}function toPropertyKey(_0x12b730){const _0x19f3da=_0x4e5b04;var _0xb26162=toPrimitive(_0x12b730,_0x19f3da(0x1bc));return _0x19f3da(0x1c1)==_typeof(_0xb26162)?_0xb26162:_0xb26162+'';}function _defineProperty(_0x30e33d,_0x492383,_0x5153bf){return(_0x492383=toPropertyKey(_0x492383))in _0x30e33d?Object['defineProperty'](_0x30e33d,_0x492383,{'value':_0x5153bf,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x30e33d[_0x492383]=_0x5153bf,_0x30e33d;}var LiveShareService=class extends _univerjs_core['Disposable']{constructor(..._0x11dc30){const _0x3f796c=_0x4e5b04;super(..._0x11dc30),_defineProperty(this,_0x3f796c(0x194),new Set()),_defineProperty(this,'_reporters',new Set());}[_0x4e5b04(0x1fa)](_0x360147){const _0x68c4ed=_0x4e5b04;return this['_sharedOperations'][_0x68c4ed(0x1b9)](_0x360147),(0x0,_univerjs_core[_0x68c4ed(0x1ad)])(()=>this[_0x68c4ed(0x194)][_0x68c4ed(0x1e9)](_0x360147));}[_0x4e5b04(0x18d)](_0x5eba78){const _0x2788a2=_0x4e5b04;return this['_reporters'][_0x2788a2(0x1b9)](_0x5eba78),(0x0,_univerjs_core[_0x2788a2(0x1ad)])(()=>this[_0x2788a2(0x20b)][_0x2788a2(0x1e9)](_0x5eba78));}[_0x4e5b04(0x171)](_0x36f3a1){const _0x2470f7=_0x4e5b04;return this[_0x2470f7(0x194)][_0x2470f7(0x1f9)](_0x36f3a1);}[_0x4e5b04(0x22e)](_0x5ca456){const _0x54fd2b=_0x4e5b04;return Array['from'](this['_reporters'])[_0x54fd2b(0x179)](_0x33a383=>_0x33a383(_0x5ca456));}};function __decorateParam(_0x20549e,_0x5b447c){return function(_0x3cb157,_0x954297){_0x5b447c(_0x3cb157,_0x954297,_0x20549e);};}function __decorate(_0x2a6c0d,_0x329d50,_0x202219,_0x196eec){const _0x10b031=_0x4e5b04;var _0x34bf4c=arguments[_0x10b031(0x1be)],_0x3931f0=_0x34bf4c<0x3?_0x329d50:_0x196eec===null?_0x196eec=Object['getOwnPropertyDescriptor'](_0x329d50,_0x202219):_0x196eec,_0x9b5e0a;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x10b031(0x186))_0x3931f0=Reflect[_0x10b031(0x222)](_0x2a6c0d,_0x329d50,_0x202219,_0x196eec);else{for(var _0x5e07a1=_0x2a6c0d[_0x10b031(0x1be)]-0x1;_0x5e07a1>=0x0;_0x5e07a1--)if(_0x9b5e0a=_0x2a6c0d[_0x5e07a1])_0x3931f0=(_0x34bf4c<0x3?_0x9b5e0a(_0x3931f0):_0x34bf4c>0x3?_0x9b5e0a(_0x329d50,_0x202219,_0x3931f0):_0x9b5e0a(_0x329d50,_0x202219))||_0x3931f0;}return _0x34bf4c>0x3&&_0x3931f0&&Object['defineProperty'](_0x329d50,_0x202219,_0x3931f0),_0x3931f0;}let LiveShareController=class LiveShareController extends _univerjs_core[_0x4e5b04(0x1aa)]{constructor(_0x1b4e7a,_0x11514f,_0x5e36f3){const _0x475eaa=_0x4e5b04;super(),this[_0x475eaa(0x1a9)]=_0x1b4e7a,this['_injector']=_0x11514f,this[_0x475eaa(0x1b6)]=_0x5e36f3,_defineProperty(this,_0x475eaa(0x216),new Map()),this[_0x475eaa(0x188)]();}async[_0x4e5b04(0x207)](_0x580219){const _0x3a5a64=_0x4e5b04;if(!this[_0x3a5a64(0x216)][_0x3a5a64(0x1f9)](_0x580219))await this[_0x3a5a64(0x1fc)](_0x580219);return this['_entities'][_0x3a5a64(0x229)](_0x580219);}[_0x4e5b04(0x170)](_0xd6e202){const _0x1930bf=_0x4e5b04;var _0x3dbdd5;return(_0x3dbdd5=this[_0x1930bf(0x216)][_0x1930bf(0x229)](_0xd6e202))!==null&&_0x3dbdd5!==void 0x0?_0x3dbdd5:null;}[_0x4e5b04(0x188)](){const _0x51dd56=_0x4e5b04;this[_0x51dd56(0x1a9)][_0x51dd56(0x1de)](_univerjs_core[_0x51dd56(0x16b)][_0x51dd56(0x211)])[_0x51dd56(0x172)]((0x0,rxjs_operators[_0x51dd56(0x1f6)])(this[_0x51dd56(0x1ee)]))['subscribe'](async _0x1fee7a=>{const _0x213cba=_0x51dd56,_0x1fa62b=_0x1fee7a[_0x213cba(0x1e7)][_0x213cba(0x1ef)]();if(this[_0x213cba(0x216)][_0x213cba(0x1f9)](_0x1fa62b))return;this[_0x213cba(0x1fc)](_0x1fa62b);}),this[_0x51dd56(0x1a9)][_0x51dd56(0x204)](_univerjs_core[_0x51dd56(0x16b)][_0x51dd56(0x211)])[_0x51dd56(0x172)]((0x0,rxjs_operators[_0x51dd56(0x1f6)])(this[_0x51dd56(0x1ee)]))['subscribe'](_0x54b92f=>{const _0x2063f1=_0x51dd56,_0x135395=_0x54b92f[_0x2063f1(0x1ef)](),_0x43a16d=this[_0x2063f1(0x216)][_0x2063f1(0x229)](_0x135395);_0x43a16d===null||_0x43a16d===void 0x0||_0x43a16d[_0x2063f1(0x219)]();});}async[_0x4e5b04(0x1fc)](_0xa91e3d){const _0x381c91=_0x4e5b04,_0x67f31b=await this[_0x381c91(0x1b6)][_0x381c91(0x182)](_0xa91e3d),_0x3a1449=this[_0x381c91(0x1d6)][_0x381c91(0x1a2)](LiveShareCoordinator,_0xa91e3d,_0x67f31b);return _0x3a1449[_0x381c91(0x1c2)](),this[_0x381c91(0x216)][_0x381c91(0x214)](_0xa91e3d,_0x3a1449),_0x3a1449;}};LiveShareController=__decorate([__decorateParam(0x0,_univerjs_core[_0x4e5b04(0x218)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core['Injector'])),__decorateParam(0x2,(0x0,_univerjs_core[_0x4e5b04(0x1a3)])(_univerjs_pro_collaboration_client[_0x4e5b04(0x1b3)]))],LiveShareController);let LiveShareStatus=function(_0x4d7076){const _0x394507=_0x4e5b04;return _0x4d7076[_0x394507(0x183)]='offline',_0x4d7076[_0x394507(0x230)]='idle',_0x4d7076[_0x394507(0x18e)]=_0x394507(0x1e3),_0x4d7076[_0x394507(0x1ec)]=_0x394507(0x17a),_0x4d7076['PRESENTING']=_0x394507(0x231),_0x4d7076;}({});function _0x214e(_0x5b215d,_0x5992ce){_0x5b215d=_0x5b215d-0x169;const _0x427539=_0x4275();let _0x214ee2=_0x427539[_0x5b215d];return _0x214ee2;}const SAME_OPERATION_SHARE_INTERVAL_KEY='SAME_OPERATION_SHARE_INTERVAL',DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends _univerjs_core[_0x4e5b04(0x1aa)]{get[_0x4e5b04(0x1fe)](){const _0x591844=_0x4e5b04;return this[_0x591844(0x19f)][_0x591844(0x1dd)]();}constructor(_0x52a2df,_0x3b7df3,_0x1c151d,_0x4b330a,_0x209e6d){const _0x9ad89=_0x4e5b04;super(),this[_0x9ad89(0x185)]=_0x52a2df,this[_0x9ad89(0x1d2)]=_0x3b7df3,this[_0x9ad89(0x208)]=_0x1c151d,this[_0x9ad89(0x1fd)]=_0x4b330a,this['_commandService']=_0x209e6d,_defineProperty(this,_0x9ad89(0x19f),new rxjs[(_0x9ad89(0x19b))](LiveShareStatus['IDLE'])),_defineProperty(this,'status$',this[_0x9ad89(0x19f)]['asObservable']()),_defineProperty(this,_0x9ad89(0x188),![]),_defineProperty(this,_0x9ad89(0x1db),null),_defineProperty(this,_0x9ad89(0x1d4),null);}[_0x4e5b04(0x219)](){const _0x1587db=_0x4e5b04;var _0x2e3ef0;(_0x2e3ef0=this['_commandDisposable'])===null||_0x2e3ef0===void 0x0||_0x2e3ef0[_0x1587db(0x219)](),this[_0x1587db(0x19f)][_0x1587db(0x196)](LiveShareStatus[_0x1587db(0x230)]),this[_0x1587db(0x19f)][_0x1587db(0x178)]();}[_0x4e5b04(0x1ff)](){const _0x4f2d0a=_0x4e5b04;return this[_0x4f2d0a(0x1fe)];}[_0x4e5b04(0x1c2)](){const _0x4dcb20=_0x4e5b04;if(this[_0x4dcb20(0x188)])return;this[_0x4dcb20(0x188)]=!![],this['_collabSession'][_0x4dcb20(0x17f)][_0x4dcb20(0x172)]((0x0,rxjs_operators[_0x4dcb20(0x1f6)])(this[_0x4dcb20(0x1ee)]))['subscribe'](_0xbf8e73=>{const _0x4678be=_0x4dcb20;switch(_0xbf8e73){case _univerjs_pro_collaboration_client[_0x4678be(0x189)][_0x4678be(0x183)]:this[_0x4678be(0x1ac)]();break;case _univerjs_pro_collaboration_client['SessionStatus'][_0x4678be(0x1b8)]:this[_0x4678be(0x1bb)]();break;default:}}),this[_0x4dcb20(0x1d2)][_0x4dcb20(0x20f)][_0x4dcb20(0x172)]((0x0,rxjs_operators[_0x4dcb20(0x1f6)])(this[_0x4dcb20(0x1ee)]))['subscribe'](_0x40ce3c=>{const _0x210944=_0x4dcb20,{eventID:_0x12cbd8}=_0x40ce3c;switch(_0x12cbd8){case _univerjs_pro_collaboration[_0x210944(0x181)]['LIVESHARE_NEW_HOST']:this[_0x210944(0x1cb)](_0x40ce3c);break;case _univerjs_pro_collaboration[_0x210944(0x181)][_0x210944(0x193)]:this[_0x210944(0x200)](_0x40ce3c);break;case _univerjs_pro_collaboration[_0x210944(0x181)][_0x210944(0x1a5)]:this[_0x210944(0x1b0)]();break;case _univerjs_pro_collaboration[_0x210944(0x181)][_0x210944(0x16e)]:this[_0x210944(0x202)](_0x40ce3c);break;default:}});}['tryStartPresenting'](){const _0x813de4=_0x4e5b04;this[_0x813de4(0x1d2)][_0x813de4(0x1e6)]({'eventID':_univerjs_pro_collaboration[_0x813de4(0x181)]['LIVESHARE_REQUEST_HOST'],'data':{'unitID':this[_0x813de4(0x185)],'userID':this[_0x813de4(0x1d2)][_0x813de4(0x1e1)]()}},this['_unitID']);}[_0x4e5b04(0x1f4)](){const _0x23dfd3=_0x4e5b04;this[_0x23dfd3(0x1fe)]===LiveShareStatus[_0x23dfd3(0x22c)]&&(this[_0x23dfd3(0x19f)][_0x23dfd3(0x196)](LiveShareStatus['IDLE']),this[_0x23dfd3(0x1d2)]['send']({'eventID':_univerjs_pro_collaboration[_0x23dfd3(0x181)][_0x23dfd3(0x1a5)],'data':{'unitID':this[_0x23dfd3(0x185)]}},this[_0x23dfd3(0x185)]));}[_0x4e5b04(0x169)](){const _0x3e1c72=_0x4e5b04;if(this[_0x3e1c72(0x1fe)]!==LiveShareStatus[_0x3e1c72(0x1ec)])return;this[_0x3e1c72(0x19f)]['next'](LiveShareStatus[_0x3e1c72(0x18e)]),this[_0x3e1c72(0x1ba)]();}[_0x4e5b04(0x22f)](){if(this['_status']!==LiveShareStatus['FOLLOWING'])return;this['_stopFollowing']();}['_handleNewHost'](_0x3e4b36){const _0x219c75=_0x4e5b04,{presenter:_0x2e11ac}=_0x3e4b36['data'],_0x16ea59=this['_collabSession'][_0x219c75(0x1e1)]();this[_0x219c75(0x1d4)]=_0x2e11ac;if(_0x2e11ac===_0x16ea59)this[_0x219c75(0x21a)](),this[_0x219c75(0x21f)]();else this['_status']!==LiveShareStatus['NOT_FOLLOWING']&&(this[_0x219c75(0x180)](),this[_0x219c75(0x1ba)]());}[_0x4e5b04(0x1d7)](){const _0x33d337=_0x4e5b04,_0x13eabd={'eventID':_univerjs_pro_collaboration[_0x33d337(0x181)][_0x33d337(0x206)]};this[_0x33d337(0x1d2)]['send'](_0x13eabd,this[_0x33d337(0x185)]);}['_handleTerminate'](){const _0x2c82db=_0x4e5b04;this[_0x2c82db(0x1d4)]=null;if(this['_status']!==LiveShareStatus[_0x2c82db(0x22c)])this[_0x2c82db(0x213)]();}['_handleNewChangeSets'](_0x419766){const _0xafc6e=_0x4e5b04;if(this[_0xafc6e(0x1fe)]===LiveShareStatus[_0xafc6e(0x18e)]&&this[_0xafc6e(0x1d4)]===_0x419766[_0xafc6e(0x20d)][_0xafc6e(0x1eb)]){const _0x4e4e1b=(0x0,_univerjs_pro_collaboration[_0xafc6e(0x1e0)])(_0x419766[_0xafc6e(0x20d)])['mutations'][_0xafc6e(0x21c)]()[_0xafc6e(0x1d0)](_0x443382=>_0x443382['id']===_univerjs_sheets[_0xafc6e(0x1a1)]['id']);if(_0x4e4e1b){const _0x34f996=_0x4e4e1b[_0xafc6e(0x1fb)]['unitId'],_0x1b5696=_0x4e4e1b[_0xafc6e(0x1fb)][_0xafc6e(0x16d)]['id'];setTimeout(()=>{const _0x1d6cb5=_0xafc6e;this['_commandService'][_0x1d6cb5(0x1d8)](_univerjs_sheets['SetWorksheetActiveOperation']['id'],{'unitId':_0x34f996,'subUnitId':_0x1b5696},{'fromCollab':!![]});});}}}['_startPresenting'](){const _0xfa784e=_0x4e5b04;this['_status$']['next'](LiveShareStatus['PRESENTING']);const _0x47b472=new Map(),_0x10588f=this[_0xfa784e(0x1db)]=new _univerjs_core[(_0xfa784e(0x18a))]();_0x10588f[_0xfa784e(0x1b9)]((0x0,_univerjs_core[_0xfa784e(0x1ad)])(()=>{const _0x122c9f=_0xfa784e;_0x47b472[_0x122c9f(0x228)](_0x5656aa=>_0x5656aa[_0x122c9f(0x178)]()),_0x47b472[_0x122c9f(0x17b)]();})),_0x10588f[_0xfa784e(0x1b9)](this[_0xfa784e(0x1f2)][_0xfa784e(0x17c)](_0x1430e8=>{const _0xcfaca2=_0xfa784e;if(_0x1430e8[_0xcfaca2(0x1e4)]!==_univerjs_core[_0xcfaca2(0x1f3)]['OPERATION']||!this[_0xcfaca2(0x1fd)][_0xcfaca2(0x171)](_0x1430e8['id']))return;const {id:_0x408002}=_0x1430e8;let _0x1dfc4a;if(!_0x47b472[_0xcfaca2(0x1f9)](_0x408002)){var _0x103a27;_0x1dfc4a=new rxjs[(_0xcfaca2(0x1bd))](),_0x47b472[_0xcfaca2(0x214)](_0x408002,_0x1dfc4a),_0x1dfc4a['pipe']((0x0,rxjs_operators[_0xcfaca2(0x195)])((_0x103a27=this[_0xcfaca2(0x208)]['getConfig'](_0xcfaca2(0x221)))!==null&&_0x103a27!==void 0x0?_0x103a27:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))['subscribe'](_0xf147a9=>{const _0x3a1cd6=_0xcfaca2;this['_collabSession'][_0x3a1cd6(0x1e6)]({'eventID':_univerjs_pro_collaboration[_0x3a1cd6(0x181)]['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x3a1cd6(0x185)],'operations':{[_0xf147a9['id']]:{'id':_0xf147a9['id'],'params':JSON[_0x3a1cd6(0x197)](_0xf147a9[_0x3a1cd6(0x1fb)])}}}},this[_0x3a1cd6(0x185)]);});}else _0x1dfc4a=_0x47b472[_0xcfaca2(0x229)](_0x408002);_0x1dfc4a['next'](_0x1430e8);})),this[_0xfa784e(0x1fd)][_0xfa784e(0x22e)](this['_unitID'])[_0xfa784e(0x228)](_0x5ab82a=>this['_collabSession'][_0xfa784e(0x1e6)]({'eventID':_univerjs_pro_collaboration[_0xfa784e(0x181)]['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0x5ab82a['id']]:{'id':_0x5ab82a['id'],'params':JSON['stringify'](_0x5ab82a[_0xfa784e(0x1fb)])}}}},this[_0xfa784e(0x185)]));}[_0x4e5b04(0x180)](){const _0x101f2b=_0x4e5b04;var _0x242224;this[_0x101f2b(0x19f)][_0x101f2b(0x196)](LiveShareStatus[_0x101f2b(0x230)]),(_0x242224=this[_0x101f2b(0x1db)])===null||_0x242224===void 0x0||_0x242224[_0x101f2b(0x219)](),this[_0x101f2b(0x1db)]=null;}[_0x4e5b04(0x1ba)](){const _0x105820=_0x4e5b04;var _0x37538e;(_0x37538e=this[_0x105820(0x1db)])===null||_0x37538e===void 0x0||_0x37538e['dispose'](),this[_0x105820(0x19f)][_0x105820(0x196)](LiveShareStatus[_0x105820(0x18e)]);}['_beIdle'](){const _0x26c8e4=_0x4e5b04;var _0x28b482;this[_0x26c8e4(0x19f)][_0x26c8e4(0x196)](LiveShareStatus[_0x26c8e4(0x230)]),(_0x28b482=this[_0x26c8e4(0x1db)])===null||_0x28b482===void 0x0||_0x28b482[_0x26c8e4(0x219)](),this[_0x26c8e4(0x1db)]=null;}['_stopFollowing'](){const _0x45db30=_0x4e5b04;var _0xb0ad41;this['_status$'][_0x45db30(0x196)](LiveShareStatus[_0x45db30(0x1ec)]),(_0xb0ad41=this[_0x45db30(0x1db)])===null||_0xb0ad41===void 0x0||_0xb0ad41['dispose']();}[_0x4e5b04(0x200)](_0x50f468){const _0x2dfb2f=_0x4e5b04;if([LiveShareStatus[_0x2dfb2f(0x22c)],LiveShareStatus['NOT_FOLLOWING'],LiveShareStatus[_0x2dfb2f(0x183)]][_0x2dfb2f(0x19c)](this[_0x2dfb2f(0x1fe)]))return;if(!_0x50f468[_0x2dfb2f(0x20d)]['presenter']||_0x50f468[_0x2dfb2f(0x20d)][_0x2dfb2f(0x225)]===this[_0x2dfb2f(0x1d2)][_0x2dfb2f(0x1e1)]())return;if(this[_0x2dfb2f(0x1fe)]===LiveShareStatus[_0x2dfb2f(0x230)])this[_0x2dfb2f(0x1ba)]();const _0x32eeae=_0x50f468['data'][_0x2dfb2f(0x198)];Object[_0x2dfb2f(0x1e5)](_0x32eeae)['forEach'](_0x3baf21=>{const _0x17189f=_0x2dfb2f;this[_0x17189f(0x1f2)][_0x17189f(0x1d8)](_0x3baf21['id'],_0x3baf21['params']?JSON[_0x17189f(0x227)](_0x3baf21[_0x17189f(0x1fb)]):null,{'fromCollab':!![]});});}[_0x4e5b04(0x1ac)](){const _0xcc3fbd=_0x4e5b04;var _0x4f76a3;this[_0xcc3fbd(0x19f)]['next'](LiveShareStatus[_0xcc3fbd(0x183)]),(_0x4f76a3=this[_0xcc3fbd(0x1db)])===null||_0x4f76a3===void 0x0||_0x4f76a3[_0xcc3fbd(0x219)]();}[_0x4e5b04(0x1bb)](){const _0x3a8b6f=_0x4e5b04;this[_0x3a8b6f(0x19f)]['next'](LiveShareStatus[_0x3a8b6f(0x230)]),this[_0x3a8b6f(0x1d7)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,_univerjs_core[_0x4e5b04(0x1af)]),__decorateParam(0x3,(0x0,_univerjs_core[_0x4e5b04(0x1a3)])(LiveShareService)),__decorateParam(0x4,_univerjs_core['ICommandService'])],LiveShareCoordinator);function LiveShare(){const _0x3b1dd5=_0x4e5b04,_0x4ebb5d=(0x0,_univerjs_ui[_0x3b1dd5(0x17d)])(LiveShareController),_0x452da5=(0x0,_univerjs_ui[_0x3b1dd5(0x17d)])(_univerjs_core['IUniverInstanceService']),_0x49b172=(0x0,_univerjs_ui[_0x3b1dd5(0x1a0)])(()=>_0x452da5['getCurrentTypeOfUnit$'](_univerjs_core['UniverInstanceType'][_0x3b1dd5(0x211)]),void 0x0,![],[]),[_0x1fa89e,_0x4e005d]=(0x0,react[_0x3b1dd5(0x21d)])(null),[_0x443a1c,_0x3f5ba9]=(0x0,react['useState'])(LiveShareStatus['IDLE']),_0x1f9642=(0x0,react[_0x3b1dd5(0x184)])(null);(0x0,react[_0x3b1dd5(0x18f)])(()=>{const _0x3aacb5=_0x3b1dd5;if(_0x49b172)_0x4ebb5d[_0x3aacb5(0x207)](_0x49b172[_0x3aacb5(0x1ef)]())[_0x3aacb5(0x1f0)](_0x28aa87=>{const _0x5a5fe9=_0x3aacb5;_0x4e005d(_0x28aa87),_0x1f9642[_0x5a5fe9(0x1b1)]=_0x28aa87['status$'][_0x5a5fe9(0x232)](_0x5fd43a=>{_0x3f5ba9(_0x5fd43a);});});return()=>{const _0x39429a=_0x3aacb5;var _0x33a88d;(_0x33a88d=_0x1f9642[_0x39429a(0x1b1)])===null||_0x33a88d===void 0x0||_0x33a88d[_0x39429a(0x1c0)](),_0x1f9642[_0x39429a(0x1b1)]=null;};},[_0x49b172,_0x4ebb5d]);if(!_0x1fa89e)return null;return(0x0,react_jsx_runtime[_0x3b1dd5(0x1ce)])(_univerjs_design[_0x3b1dd5(0x174)],{'align':_0x3b1dd5(0x1b4),'disabled':_0x443a1c===LiveShareStatus['OFFLINE'],'className':_0x3b1dd5(0x21e),'overlay':(0x0,react_jsx_runtime[_0x3b1dd5(0x1ce)])(LiveShareDropdown,{'status':_0x443a1c,'coordinator':_0x1fa89e}),'children':(0x0,react_jsx_runtime[_0x3b1dd5(0x1ce)])(_0x3b1dd5(0x226),{'className':(0x0,_univerjs_design[_0x3b1dd5(0x1c4)])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x443a1c===LiveShareStatus[_0x3b1dd5(0x183)],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x443a1c!==LiveShareStatus['OFFLINE']}),'type':'button','children':(0x0,react_jsx_runtime['jsx'])(_univerjs_icons[_0x3b1dd5(0x224)],{'className':_0x3b1dd5(0x210)})})});}function LiveShareDropdown(_0x1b8a28){const _0x9e6ba1=_0x4e5b04,{status:_0x396242,coordinator:_0x58eb9f}=_0x1b8a28;switch(_0x396242){case LiveShareStatus[_0x9e6ba1(0x230)]:return(0x0,react_jsx_runtime['jsx'])(Idle,{'coordinator':_0x58eb9f});case LiveShareStatus[_0x9e6ba1(0x18e)]:return(0x0,react_jsx_runtime[_0x9e6ba1(0x1ce)])(Following,{'coordinator':_0x58eb9f});case LiveShareStatus[_0x9e6ba1(0x1ec)]:return(0x0,react_jsx_runtime['jsx'])(NotFollowing,{'coordinator':_0x58eb9f});case LiveShareStatus[_0x9e6ba1(0x183)]:return(0x0,react_jsx_runtime['jsx'])(Offline,{});case LiveShareStatus['PRESENTING']:return(0x0,react_jsx_runtime[_0x9e6ba1(0x1ce)])(Presenting,{'coordinator':_0x58eb9f});default:return null;}}function Idle(_0x18b5f3){const _0x266b6c=_0x4e5b04,{coordinator:_0x137dfa}=_0x18b5f3;return(0x0,react_jsx_runtime[_0x266b6c(0x20e)])(react_jsx_runtime[_0x266b6c(0x1ea)],{'children':[(0x0,react_jsx_runtime[_0x266b6c(0x1ce)])(_0x266b6c(0x22a),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x266b6c(0x1f5)}),(0x0,react_jsx_runtime[_0x266b6c(0x1ce)])(_univerjs_design['Button'],{'onClick':()=>_0x137dfa[_0x266b6c(0x1b2)](),'children':'Start'})]});}function _0x4275(){const _0x3103a8=['Present\x20this\x20document','takeUntil','UniverCollaborationClientPlugin','You\x27are\x20offline.','has','registerSharedOperation','params','_startLiveShareCoordinator','_liveShareService','_status','getStatus','_handleOperation','override','_handleNewChangeSets','LiveShareCoordinator','getTypeOfUnitDisposed$','Plugin','LIVESHARE_FETCH_OPERATIONS','getLiveShareCoordinator','_configService','UNIVER_LIVE_SHARE_PLUGIN','7188UCjUds','_reporters','1938hArlFZ','data','jsxs','event$','univer-size-4','UNIVER_SHEET','onStarting','_beIdle','set','SetWorksheetActiveOperation','_entities','text','IUniverInstanceService','dispose','_stopFollowing','DesktopLiveShareController','reverse','useState','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','_startPresenting','SetScrollOperation','SAME_OPERATION_SHARE_INTERVAL','decorate','8pfQsGa','LiveShareIcon','presenter','button','parse','forEach','get','div','15905060raAqSI','PRESENTING','toStringTag','getInitialStates','stopFollowing','IDLE','presenting','subscribe','Stop\x20presenting','startFollowing','pluginName','UniverInstanceType','9UTflRJ','sheet','NEW_CHANGESETS','IUIPartsService','getLiveShareCoordinatorSync','shouldShareOperation','pipe','_uiPartsService','Dropdown','_mountLiveShare','call','connectInjector','complete','map','not-following','clear','onCommandExecuted','useDependency','Module','sessionStatus$','_stopPresenting','CollaborationEvent','requireSession','OFFLINE','useRef','_unitID','function','prototype','_init','SessionStatus','DisposableCollection','merge','disposeWithMe','registerInitialStateReporter','FOLLOWING','useEffect','13733083PiIsSd','LiveShare','Injector','LIVESHARE_OPERATION','_sharedOperations','throttleTime','next','stringify','operations','mergeOverrideWithDependencies','registerComponent','BehaviorSubject','includes','You\x27re\x20not\x20following\x20the\x20presenter','31MNCxKD','_status$','useObservable','InsertSheetMutation','createInstance','Inject','UNIVER_UNKNOWN','LIVESHARE_TERMINATE','1830012xQGErd','LiveShareStatus','touchDependencies','_univerInstanceService','RxDisposable','Start\x20following','_handleOffline','toDisposable','Button','IConfigService','_handleTerminate','current','tryStartPresenting','CollaborationSessionService','end','UniverLiveSharePlugin','_collabSessionService','66SKOaty','ONLINE','add','_startFollowing','_handleOnline','string','Subject','length','onRendered','unsubscribe','symbol','init','defineProperty','clsx','packageName','BuiltInUIPart','HEADER_MENU','object','4730320awXBQD','3NWSozr','_handleNewHost','constructor','setConfig','jsx','live-share.config','find','You\x27re\x20following\x20the\x20presenter','_collabSession','1585iMqnWv','_presenter','registerDependencies','_injector','_fetchOperations','executeCommand','toPrimitive','default','_commandDisposable','Stop\x20following','getValue','getTypeOfUnitAdded$','10922597dKBVkn','parseProtocolChangeset','getMemberID','univer-mb-3\x20univer-w-full\x20univer-text-sm','following','type','values','send','unit','You\x27re\x20presenting\x20the\x20document','delete','Fragment','memberID','NOT_FOLLOWING','DependentOn','dispose$','getUnitId','then','_config','_commandService','CommandType','stopPresenting'];_0x4275=function(){return _0x3103a8;};return _0x4275();}function Following(_0x3180b3){const _0x1f01f7=_0x4e5b04,{coordinator:_0x2a97a6}=_0x3180b3;return(0x0,react_jsx_runtime[_0x1f01f7(0x20e)])(react_jsx_runtime[_0x1f01f7(0x1ea)],{'children':[(0x0,react_jsx_runtime[_0x1f01f7(0x1ce)])('div',{'className':_0x1f01f7(0x1e2),'children':_0x1f01f7(0x1d1)}),(0x0,react_jsx_runtime[_0x1f01f7(0x1ce)])(_univerjs_design['Button'],{'onClick':()=>_0x2a97a6['stopFollowing'](),'children':_0x1f01f7(0x1dc)})]});}function NotFollowing(_0x3870ec){const _0xa49f10=_0x4e5b04,{coordinator:_0x4a328a}=_0x3870ec;return(0x0,react_jsx_runtime['jsxs'])(react_jsx_runtime[_0xa49f10(0x1ea)],{'children':[(0x0,react_jsx_runtime['jsx'])(_0xa49f10(0x22a),{'className':_0xa49f10(0x1e2),'children':_0xa49f10(0x19d)}),(0x0,react_jsx_runtime[_0xa49f10(0x1ce)])(_univerjs_design[_0xa49f10(0x1ae)],{'variant':_0xa49f10(0x217),'onClick':()=>_0x4a328a[_0xa49f10(0x169)](),'children':_0xa49f10(0x1ab)})]});}function Presenting(_0x11324e){const _0x5cfe0b=_0x4e5b04,{coordinator:_0x51abc6}=_0x11324e;return(0x0,react_jsx_runtime[_0x5cfe0b(0x20e)])(react_jsx_runtime[_0x5cfe0b(0x1ea)],{'children':[(0x0,react_jsx_runtime[_0x5cfe0b(0x1ce)])(_0x5cfe0b(0x22a),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x5cfe0b(0x1e8)}),(0x0,react_jsx_runtime[_0x5cfe0b(0x1ce)])(_univerjs_design['Button'],{'variant':_0x5cfe0b(0x1da),'onClick':()=>_0x51abc6[_0x5cfe0b(0x1f4)](),'children':_0x5cfe0b(0x233)})]});}function Offline(){const _0x1e944b=_0x4e5b04;return(0x0,react_jsx_runtime[_0x1e944b(0x1ce)])(react_jsx_runtime[_0x1e944b(0x1ea)],{'children':_0x1e944b(0x1f8)});}let DesktopLiveShareController=class DesktopLiveShareController extends _univerjs_core['Disposable']{constructor(_0x1fe641,_0x26131c){const _0x1a26e2=_0x4e5b04;super(),this[_0x1a26e2(0x1d6)]=_0x1fe641,this[_0x1a26e2(0x173)]=_0x26131c,this[_0x1a26e2(0x175)]();}[_0x4e5b04(0x175)](){const _0x55b081=_0x4e5b04;this['disposeWithMe'](this[_0x55b081(0x173)][_0x55b081(0x19a)](_univerjs_ui[_0x55b081(0x1c6)][_0x55b081(0x1c7)],()=>(0x0,_univerjs_ui[_0x55b081(0x177)])(LiveShare,this[_0x55b081(0x1d6)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core['Injector'])),__decorateParam(0x1,_univerjs_ui[_0x4e5b04(0x16f)])],DesktopLiveShareController);var name='@univerjs-pro/live-share',version='0.21.1';const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x4e5b04(0x1cf),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends _univerjs_core['Disposable']{constructor(_0x2bac70){const _0xd99ef1=_0x4e5b04;super(),this[_0xd99ef1(0x1fd)]=_0x2bac70,this[_0xd99ef1(0x188)]();}[_0x4e5b04(0x188)](){const _0x39d37f=_0x4e5b04;[_univerjs_sheets_ui['SetZoomRatioOperation']['id'],_univerjs_sheets_ui[_0x39d37f(0x220)]['id'],_univerjs_sheets[_0x39d37f(0x215)]['id']][_0x39d37f(0x228)](_0x3a482b=>{const _0x23aefa=_0x39d37f;this[_0x23aefa(0x18c)](this[_0x23aefa(0x1fd)]['registerSharedOperation'](_0x3a482b));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x4e5b04(0x1a3)])(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends _univerjs_core[_0x4e5b04(0x205)]{constructor(_0x42788a=defaultPluginConfig,_0x55f573,_0x107726){const _0x3ac543=_0x4e5b04;super(),this[_0x3ac543(0x1f1)]=_0x42788a,this['_injector']=_0x55f573,this[_0x3ac543(0x208)]=_0x107726;const {..._0x1f691f}=(0x0,_univerjs_core[_0x3ac543(0x18b)])({},defaultPluginConfig,this[_0x3ac543(0x1f1)]);this[_0x3ac543(0x208)][_0x3ac543(0x1cd)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x1f691f);}[_0x4e5b04(0x212)](){const _0x5b2bb3=_0x4e5b04;(0x0,_univerjs_core[_0x5b2bb3(0x1d5)])(this['_injector'],(0x0,_univerjs_core[_0x5b2bb3(0x199)])([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x5b2bb3(0x1f1)][_0x5b2bb3(0x201)])),(0x0,_univerjs_core[_0x5b2bb3(0x1a8)])(this[_0x5b2bb3(0x1d6)],[[LiveShareCoreExtensionsController]]);}[_0x4e5b04(0x1bf)](){const _0x5e4902=_0x4e5b04;(0x0,_univerjs_core['touchDependencies'])(this[_0x5e4902(0x1d6)],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x4e5b04(0x1e4),_univerjs_core[_0x4e5b04(0x16b)][_0x4e5b04(0x1a4)]),_defineProperty(UniverLiveSharePlugin,_0x4e5b04(0x16a),_0x4e5b04(0x209)),_defineProperty(UniverLiveSharePlugin,_0x4e5b04(0x1c5),name),_defineProperty(UniverLiveSharePlugin,'version',version),UniverLiveSharePlugin=__decorate([(0x0,_univerjs_core[_0x4e5b04(0x1ed)])(_univerjs_pro_collaboration_client[_0x4e5b04(0x1f7)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x4e5b04(0x1a3)])(_univerjs_core[_0x4e5b04(0x192)])),__decorateParam(0x2,_univerjs_core[_0x4e5b04(0x1af)])],UniverLiveSharePlugin),Object[_0x4e5b04(0x1c3)](exports,_0x4e5b04(0x21b),{'enumerable':!![],'get':function(){return DesktopLiveShareController;}}),exports[_0x4e5b04(0x191)]=LiveShare,Object['defineProperty'](exports,'LiveShareController',{'enumerable':!![],'get':function(){return LiveShareController;}}),Object['defineProperty'](exports,_0x4e5b04(0x203),{'enumerable':!![],'get':function(){return LiveShareCoordinator;}}),exports['LiveShareService']=LiveShareService,exports[_0x4e5b04(0x1a7)]=LiveShareStatus,Object[_0x4e5b04(0x1c3)](exports,_0x4e5b04(0x1b5),{'enumerable':!![],'get':function(){return UniverLiveSharePlugin;}});
|
|
1
|
+
const _0xd7441f=_0x2cb6;(function(_0x5a9006,_0x5d59f1){const _0x2035d7=_0x2cb6,_0x8e148d=_0x5a9006();while(!![]){try{const _0x54c597=parseInt(_0x2035d7(0x20c))/0x1*(parseInt(_0x2035d7(0x249))/0x2)+-parseInt(_0x2035d7(0x238))/0x3+-parseInt(_0x2035d7(0x231))/0x4+-parseInt(_0x2035d7(0x21c))/0x5*(parseInt(_0x2035d7(0x22d))/0x6)+-parseInt(_0x2035d7(0x228))/0x7+-parseInt(_0x2035d7(0x1d3))/0x8*(parseInt(_0x2035d7(0x206))/0x9)+-parseInt(_0x2035d7(0x1ea))/0xa*(-parseInt(_0x2035d7(0x1fe))/0xb);if(_0x54c597===_0x5d59f1)break;else _0x8e148d['push'](_0x8e148d['shift']());}catch(_0x2a5f23){_0x8e148d['push'](_0x8e148d['shift']());}}}(_0x4bcd,0xbb915),Object[_0xd7441f(0x1c4)](exports,Symbol[_0xd7441f(0x224)],{'value':_0xd7441f(0x1b6)}));let _univerjs_core=require('@univerjs/core'),_univerjs_ui=require('@univerjs/ui'),_univerjs_design=require('@univerjs/design'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_sheets=require('@univerjs/sheets'),rxjs=require('rxjs'),rxjs_operators=require('rxjs/operators'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_sheets_ui=require('@univerjs/sheets-ui');function _typeof(_0x3b56c7){'@babel/helpers - typeof';const _0x1556cc=_0xd7441f;return _typeof=_0x1556cc(0x216)==typeof Symbol&&_0x1556cc(0x24c)==typeof Symbol[_0x1556cc(0x1c5)]?function(_0x3ca755){return typeof _0x3ca755;}:function(_0x23eee2){const _0x15b256=_0x1556cc;return _0x23eee2&&_0x15b256(0x216)==typeof Symbol&&_0x23eee2[_0x15b256(0x274)]===Symbol&&_0x23eee2!==Symbol[_0x15b256(0x262)]?_0x15b256(0x24c):typeof _0x23eee2;},_typeof(_0x3b56c7);}function toPrimitive(_0x3dd46f,_0x759b4e){const _0x40021a=_0xd7441f;if(_0x40021a(0x26f)!=_typeof(_0x3dd46f)||!_0x3dd46f)return _0x3dd46f;var _0x1cd169=_0x3dd46f[Symbol['toPrimitive']];if(void 0x0!==_0x1cd169){var _0x83bb07=_0x1cd169[_0x40021a(0x1be)](_0x3dd46f,_0x759b4e||_0x40021a(0x252));if(_0x40021a(0x26f)!=_typeof(_0x83bb07))return _0x83bb07;throw new TypeError(_0x40021a(0x1b2));}return('string'===_0x759b4e?String:Number)(_0x3dd46f);}function toPropertyKey(_0x2ff4a2){const _0x2bf297=_0xd7441f;var _0xef1847=toPrimitive(_0x2ff4a2,_0x2bf297(0x23f));return _0x2bf297(0x24c)==_typeof(_0xef1847)?_0xef1847:_0xef1847+'';}function _defineProperty(_0x16e56c,_0x211888,_0x1eccf8){const _0x23f685=_0xd7441f;return(_0x211888=toPropertyKey(_0x211888))in _0x16e56c?Object[_0x23f685(0x1c4)](_0x16e56c,_0x211888,{'value':_0x1eccf8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x16e56c[_0x211888]=_0x1eccf8,_0x16e56c;}var LiveShareService=class extends _univerjs_core[_0xd7441f(0x23a)]{constructor(..._0x448106){const _0x471be1=_0xd7441f;super(..._0x448106),_defineProperty(this,'_sharedOperations',new Set()),_defineProperty(this,_0x471be1(0x261),new Set());}[_0xd7441f(0x1ce)](_0x1ad5b6){const _0x2e371c=_0xd7441f;return this[_0x2e371c(0x1e9)]['add'](_0x1ad5b6),(0x0,_univerjs_core[_0x2e371c(0x1c8)])(()=>this[_0x2e371c(0x1e9)][_0x2e371c(0x1d5)](_0x1ad5b6));}[_0xd7441f(0x1ed)](_0x4175a1){const _0x44037f=_0xd7441f;return this[_0x44037f(0x261)][_0x44037f(0x204)](_0x4175a1),(0x0,_univerjs_core[_0x44037f(0x1c8)])(()=>this['_reporters'][_0x44037f(0x1d5)](_0x4175a1));}[_0xd7441f(0x213)](_0x352820){const _0x3bf1f7=_0xd7441f;return this[_0x3bf1f7(0x1e9)][_0x3bf1f7(0x22c)](_0x352820);}[_0xd7441f(0x219)](_0x339036){const _0x546dc9=_0xd7441f;return Array[_0x546dc9(0x264)](this[_0x546dc9(0x261)])[_0x546dc9(0x226)](_0x5e6157=>_0x5e6157(_0x339036));}};function __decorateParam(_0x51286f,_0x12f374){return function(_0x2944e9,_0x24403e){_0x12f374(_0x2944e9,_0x24403e,_0x51286f);};}function __decorate(_0x2c9c4f,_0x1c3229,_0x438856,_0x4cf7d9){const _0xc76f46=_0xd7441f;var _0x2f153e=arguments[_0xc76f46(0x20b)],_0xf87ecc=_0x2f153e<0x3?_0x1c3229:_0x4cf7d9===null?_0x4cf7d9=Object[_0xc76f46(0x26b)](_0x1c3229,_0x438856):_0x4cf7d9,_0x198ab4;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0xc76f46(0x216))_0xf87ecc=Reflect[_0xc76f46(0x200)](_0x2c9c4f,_0x1c3229,_0x438856,_0x4cf7d9);else{for(var _0x20fa47=_0x2c9c4f[_0xc76f46(0x20b)]-0x1;_0x20fa47>=0x0;_0x20fa47--)if(_0x198ab4=_0x2c9c4f[_0x20fa47])_0xf87ecc=(_0x2f153e<0x3?_0x198ab4(_0xf87ecc):_0x2f153e>0x3?_0x198ab4(_0x1c3229,_0x438856,_0xf87ecc):_0x198ab4(_0x1c3229,_0x438856))||_0xf87ecc;}return _0x2f153e>0x3&&_0xf87ecc&&Object[_0xc76f46(0x1c4)](_0x1c3229,_0x438856,_0xf87ecc),_0xf87ecc;}let LiveShareController=class LiveShareController extends _univerjs_core[_0xd7441f(0x232)]{constructor(_0x54ad84,_0x27e36d,_0x494122){const _0x50b4ed=_0xd7441f;super(),this[_0x50b4ed(0x1e0)]=_0x54ad84,this[_0x50b4ed(0x253)]=_0x27e36d,this['_collabSessionService']=_0x494122,_defineProperty(this,_0x50b4ed(0x207),new Map()),this[_0x50b4ed(0x1f9)]();}async[_0xd7441f(0x1cc)](_0xe148e5){const _0x4e799c=_0xd7441f;if(!this['_entities'][_0x4e799c(0x22c)](_0xe148e5))await this[_0x4e799c(0x235)](_0xe148e5);return this[_0x4e799c(0x207)]['get'](_0xe148e5);}[_0xd7441f(0x210)](_0x283e7a){const _0x555314=_0xd7441f;var _0xf6ed37;return(_0xf6ed37=this['_entities'][_0x555314(0x1fa)](_0x283e7a))!==null&&_0xf6ed37!==void 0x0?_0xf6ed37:null;}[_0xd7441f(0x1f9)](){const _0xe81908=_0xd7441f;this[_0xe81908(0x1e0)][_0xe81908(0x1b9)](_univerjs_core[_0xe81908(0x1b7)][_0xe81908(0x1fd)])[_0xe81908(0x259)]((0x0,rxjs_operators[_0xe81908(0x246)])(this[_0xe81908(0x1b5)]))['subscribe'](async _0x5589c0=>{const _0x18425e=_0xe81908,_0x6daaef=_0x5589c0[_0x18425e(0x266)][_0x18425e(0x1cb)]();if(this[_0x18425e(0x207)][_0x18425e(0x22c)](_0x6daaef))return;this[_0x18425e(0x235)](_0x6daaef);}),this[_0xe81908(0x1e0)][_0xe81908(0x1e8)](_univerjs_core['UniverInstanceType'][_0xe81908(0x1fd)])[_0xe81908(0x259)]((0x0,rxjs_operators[_0xe81908(0x246)])(this[_0xe81908(0x1b5)]))[_0xe81908(0x1bf)](_0x1fd50b=>{const _0x2b8a1a=_0xe81908,_0x5a0b6f=_0x1fd50b[_0x2b8a1a(0x1cb)](),_0x5d8d87=this[_0x2b8a1a(0x207)][_0x2b8a1a(0x1fa)](_0x5a0b6f);_0x5d8d87===null||_0x5d8d87===void 0x0||_0x5d8d87['dispose']();});}async[_0xd7441f(0x235)](_0x47620b){const _0x544b51=_0xd7441f,_0x284af0=await this['_collabSessionService'][_0x544b51(0x1ff)](_0x47620b),_0x477b3d=this[_0x544b51(0x253)][_0x544b51(0x240)](LiveShareCoordinator,_0x47620b,_0x284af0);return _0x477b3d[_0x544b51(0x24b)](),this['_entities']['set'](_0x47620b,_0x477b3d),_0x477b3d;}};LiveShareController=__decorate([__decorateParam(0x0,_univerjs_core[_0xd7441f(0x1c6)]),__decorateParam(0x1,(0x0,_univerjs_core[_0xd7441f(0x220)])(_univerjs_core[_0xd7441f(0x1d8)])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration_client[_0xd7441f(0x23d)]))],LiveShareController);let LiveShareStatus=function(_0x702988){const _0x32ff06=_0xd7441f;return _0x702988[_0x32ff06(0x241)]=_0x32ff06(0x230),_0x702988[_0x32ff06(0x20a)]=_0x32ff06(0x21b),_0x702988[_0x32ff06(0x222)]=_0x32ff06(0x1b1),_0x702988['NOT_FOLLOWING']=_0x32ff06(0x25b),_0x702988['PRESENTING']=_0x32ff06(0x1d0),_0x702988;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0xd7441f(0x26c),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;function _0x4bcd(){const _0x4f626d=['2PWaXkU','SetWorksheetActiveOperation','init','symbol','UNIVER_UNKNOWN','_commandDisposable','_handleNewChangeSets','_startFollowing','_handleTerminate','default','_injector','next','ICommandService','touchDependencies','operations','set','pipe','LiveShareService','not-following','_fetchOperations','DependentOn','useDependency','setConfig','You\x27are\x20offline.','_reporters','prototype','forEach','from','You\x27re\x20presenting\x20the\x20document','unit','LIVESHARE_NEW_HOST','unsubscribe','getConfig','IConfigService','getOwnPropertyDescriptor','SAME_OPERATION_SHARE_INTERVAL','stopPresenting','tryStartPresenting','object','unitId','_liveShareService','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','_configService','constructor','You\x27re\x20following\x20the\x20presenter','executeCommand','onRendered','stringify','LIVESHARE_REQUEST_HOST','following','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','SetZoomRatioOperation','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','dispose$','Module','UniverInstanceType','data','getTypeOfUnitAdded$','_uiPartsService','LIVESHARE_FETCH_OPERATIONS','mutations','_handleOnline','call','subscribe','clsx','Start\x20following','_presenter','asObservable','defineProperty','iterator','IUniverInstanceService','stopFollowing','toDisposable','_status','dispose','getUnitId','getLiveShareCoordinator','_unitID','registerSharedOperation','reverse','presenting','find','SessionStatus','272QXZguS','live-share.config','delete','LiveShareCoordinator','disposeWithMe','Injector','Dropdown','button','Subject','InsertSheetMutation','BehaviorSubject','then','getCurrentTypeOfUnit$','_univerInstanceService','ONLINE','merge','clear','_beIdle','IUIPartsService','useState','_stopPresenting','getTypeOfUnitDisposed$','_sharedOperations','21363110EkBNNF','UNIVER_LIVE_SHARE_PLUGIN','parse','registerInitialStateReporter','Plugin','univer-mb-3\x20univer-w-full\x20univer-text-sm','onStarting','You\x27re\x20not\x20following\x20the\x20presenter','CommandType','_handleNewHost','_commandService','parseProtocolChangeset','values','DesktopLiveShareController','_mountLiveShare','_init','get','connectInjector','LIVESHARE_OPERATION','UNIVER_SHEET','22NHzYel','requireSession','decorate','text','_handleOperation','packageName','add','LiveShareStatus','328257sqbLbK','_entities','_status$','getMemberID','IDLE','length','630233dRoZgm','send','jsxs','Present\x20this\x20document','getLiveShareCoordinatorSync','getStatus','sessionStatus$','shouldShareOperation','CollaborationEvent','_config','function','current','status$','getInitialStates','_collabSession','idle','216005KzuEIY','jsx','sheet','Fragment','Inject','DisposableCollection','FOLLOWING','NEW_CHANGESETS','toStringTag','useEffect','map','pluginName','1348109mbMWbt','HEADER_MENU','version','startFollowing','has','12FgJJWN','Start','LiveShareIcon','offline','5273184rQernk','RxDisposable','_stopFollowing','type','_startLiveShareCoordinator','getValue','Button','3891633pmxJUn','params','Disposable','LiveShareController','presenter','CollaborationSessionService','complete','string','createInstance','OFFLINE','override','_handleOffline','univer-size-4','UniverLiveSharePlugin','takeUntil','_startPresenting','div'];_0x4bcd=function(){return _0x4f626d;};return _0x4bcd();}function _0x2cb6(_0x38ca3a,_0x219238){_0x38ca3a=_0x38ca3a-0x1ad;const _0x4bcd07=_0x4bcd();let _0x2cb676=_0x4bcd07[_0x38ca3a];return _0x2cb676;}let LiveShareCoordinator=class LiveShareCoordinator extends _univerjs_core[_0xd7441f(0x232)]{get[_0xd7441f(0x1c9)](){const _0x10f926=_0xd7441f;return this[_0x10f926(0x208)][_0x10f926(0x236)]();}constructor(_0x13e635,_0x4907bd,_0x274a3e,_0xa479bd,_0x749889){const _0x4edc77=_0xd7441f;super(),this['_unitID']=_0x13e635,this[_0x4edc77(0x21a)]=_0x4907bd,this[_0x4edc77(0x273)]=_0x274a3e,this[_0x4edc77(0x271)]=_0xa479bd,this['_commandService']=_0x749889,_defineProperty(this,'_status$',new rxjs[(_0x4edc77(0x1dd))](_0x4edc77(0x21b))),_defineProperty(this,'status$',this[_0x4edc77(0x208)][_0x4edc77(0x1c3)]()),_defineProperty(this,_0x4edc77(0x1f9),![]),_defineProperty(this,_0x4edc77(0x24e),null),_defineProperty(this,_0x4edc77(0x1c2),null);}[_0xd7441f(0x1ca)](){const _0x20a2bf=_0xd7441f;var _0x41f02d;(_0x41f02d=this['_commandDisposable'])===null||_0x41f02d===void 0x0||_0x41f02d[_0x20a2bf(0x1ca)](),this['_status$'][_0x20a2bf(0x254)](_0x20a2bf(0x21b)),this[_0x20a2bf(0x208)]['complete']();}[_0xd7441f(0x211)](){const _0x42e473=_0xd7441f;return this[_0x42e473(0x1c9)];}['init'](){const _0x549916=_0xd7441f;if(this['_init'])return;this[_0x549916(0x1f9)]=!![],this[_0x549916(0x21a)][_0x549916(0x212)][_0x549916(0x259)]((0x0,rxjs_operators[_0x549916(0x246)])(this['dispose$']))[_0x549916(0x1bf)](_0xbfb8c9=>{const _0x2a7294=_0x549916;switch(_0xbfb8c9){case _univerjs_pro_collaboration_client['SessionStatus'][_0x2a7294(0x241)]:this[_0x2a7294(0x243)]();break;case _univerjs_pro_collaboration_client[_0x2a7294(0x1d2)][_0x2a7294(0x1e1)]:this[_0x2a7294(0x1bd)]();break;default:}}),this['_collabSession']['event$'][_0x549916(0x259)]((0x0,rxjs_operators['takeUntil'])(this[_0x549916(0x1b5)]))[_0x549916(0x1bf)](_0x2b67c2=>{const _0x206c5c=_0x549916,{eventID:_0xd75ab}=_0x2b67c2;switch(_0xd75ab){case _univerjs_pro_collaboration[_0x206c5c(0x214)][_0x206c5c(0x267)]:this[_0x206c5c(0x1f3)](_0x2b67c2);break;case _univerjs_pro_collaboration[_0x206c5c(0x214)]['LIVESHARE_OPERATION']:this[_0x206c5c(0x202)](_0x2b67c2);break;case _univerjs_pro_collaboration[_0x206c5c(0x214)]['LIVESHARE_TERMINATE']:this[_0x206c5c(0x251)]();break;case _univerjs_pro_collaboration[_0x206c5c(0x214)][_0x206c5c(0x223)]:this[_0x206c5c(0x24f)](_0x2b67c2);break;default:}});}['tryStartPresenting'](){const _0x54d65b=_0xd7441f;this[_0x54d65b(0x21a)][_0x54d65b(0x20d)]({'eventID':_univerjs_pro_collaboration[_0x54d65b(0x214)][_0x54d65b(0x1b0)],'data':{'unitID':this[_0x54d65b(0x1cd)],'userID':this[_0x54d65b(0x21a)][_0x54d65b(0x209)]()}},this[_0x54d65b(0x1cd)]);}['stopPresenting'](){const _0x2b3614=_0xd7441f;this[_0x2b3614(0x1c9)]===_0x2b3614(0x1d0)&&(this['_status$']['next'](_0x2b3614(0x21b)),this[_0x2b3614(0x21a)][_0x2b3614(0x20d)]({'eventID':_univerjs_pro_collaboration[_0x2b3614(0x214)]['LIVESHARE_TERMINATE'],'data':{'unitID':this[_0x2b3614(0x1cd)]}},this[_0x2b3614(0x1cd)]));}[_0xd7441f(0x22b)](){const _0xc23b96=_0xd7441f;if(this[_0xc23b96(0x1c9)]!=='not-following')return;this['_status$'][_0xc23b96(0x254)]('following'),this['_startFollowing']();}['stopFollowing'](){const _0x22dc07=_0xd7441f;if(this[_0x22dc07(0x1c9)]!==_0x22dc07(0x1b1))return;this[_0x22dc07(0x233)]();}[_0xd7441f(0x1f3)](_0x4605dc){const _0x176a9c=_0xd7441f,{presenter:_0x35e328}=_0x4605dc['data'],_0x5b8d6b=this[_0x176a9c(0x21a)][_0x176a9c(0x209)]();this[_0x176a9c(0x1c2)]=_0x35e328;if(_0x35e328===_0x5b8d6b)this[_0x176a9c(0x233)](),this[_0x176a9c(0x247)]();else this[_0x176a9c(0x1c9)]!=='not-following'&&(this['_stopPresenting'](),this[_0x176a9c(0x250)]());}[_0xd7441f(0x25c)](){const _0x54d1fa=_0xd7441f,_0x246f9b={'eventID':_univerjs_pro_collaboration[_0x54d1fa(0x214)][_0x54d1fa(0x1bb)]};this['_collabSession'][_0x54d1fa(0x20d)](_0x246f9b,this['_unitID']);}[_0xd7441f(0x251)](){const _0x19b0b5=_0xd7441f;this[_0x19b0b5(0x1c2)]=null;if(this[_0x19b0b5(0x1c9)]!==_0x19b0b5(0x1d0))this['_beIdle']();}[_0xd7441f(0x24f)](_0xb340ee){const _0x3d25f9=_0xd7441f;if(this[_0x3d25f9(0x1c9)]==='following'&&this[_0x3d25f9(0x1c2)]===_0xb340ee[_0x3d25f9(0x1b8)]['memberID']){const _0x3013b9=(0x0,_univerjs_pro_collaboration[_0x3d25f9(0x1f5)])(_0xb340ee[_0x3d25f9(0x1b8)])[_0x3d25f9(0x1bc)][_0x3d25f9(0x1cf)]()[_0x3d25f9(0x1d1)](_0x3e7589=>_0x3e7589['id']===_univerjs_sheets[_0x3d25f9(0x1dc)]['id']);if(_0x3013b9){const _0x4aee45=_0x3013b9['params'][_0x3d25f9(0x270)],_0x240454=_0x3013b9['params'][_0x3d25f9(0x21e)]['id'];setTimeout(()=>{const _0x1c04b0=_0x3d25f9;this[_0x1c04b0(0x1f4)]['executeCommand'](_univerjs_sheets[_0x1c04b0(0x24a)]['id'],{'unitId':_0x4aee45,'subUnitId':_0x240454},{'fromCollab':!![]});});}}}[_0xd7441f(0x247)](){const _0xe8c458=_0xd7441f;this[_0xe8c458(0x208)][_0xe8c458(0x254)](_0xe8c458(0x1d0));const _0x197380=new Map(),_0x28f074=this[_0xe8c458(0x24e)]=new _univerjs_core[(_0xe8c458(0x221))]();_0x28f074['add']((0x0,_univerjs_core['toDisposable'])(()=>{const _0x156fe4=_0xe8c458;_0x197380['forEach'](_0x2cb8d1=>_0x2cb8d1[_0x156fe4(0x23e)]()),_0x197380[_0x156fe4(0x1e3)]();})),_0x28f074[_0xe8c458(0x204)](this[_0xe8c458(0x1f4)]['onCommandExecuted'](_0x3a66f5=>{const _0x49370b=_0xe8c458;if(_0x3a66f5[_0x49370b(0x234)]!==_univerjs_core[_0x49370b(0x1f2)]['OPERATION']||!this[_0x49370b(0x271)][_0x49370b(0x213)](_0x3a66f5['id']))return;const {id:_0x1809f0}=_0x3a66f5;let _0x7b8c4f;if(!_0x197380[_0x49370b(0x22c)](_0x1809f0)){var _0x2f86e3;_0x7b8c4f=new rxjs[(_0x49370b(0x1db))](),_0x197380[_0x49370b(0x258)](_0x1809f0,_0x7b8c4f),_0x7b8c4f['pipe']((0x0,rxjs_operators['throttleTime'])((_0x2f86e3=this[_0x49370b(0x273)][_0x49370b(0x269)]('SAME_OPERATION_SHARE_INTERVAL'))!==null&&_0x2f86e3!==void 0x0?_0x2f86e3:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x49370b(0x1bf)](_0x2319d0=>{const _0x215bbf=_0x49370b;this[_0x215bbf(0x21a)][_0x215bbf(0x20d)]({'eventID':_univerjs_pro_collaboration[_0x215bbf(0x214)][_0x215bbf(0x1fc)],'data':{'unitID':this[_0x215bbf(0x1cd)],'operations':{[_0x2319d0['id']]:{'id':_0x2319d0['id'],'params':JSON[_0x215bbf(0x1af)](_0x2319d0[_0x215bbf(0x239)])}}}},this['_unitID']);});}else _0x7b8c4f=_0x197380['get'](_0x1809f0);_0x7b8c4f[_0x49370b(0x254)](_0x3a66f5);})),this[_0xe8c458(0x271)]['getInitialStates'](this[_0xe8c458(0x1cd)])[_0xe8c458(0x263)](_0x46fabb=>this[_0xe8c458(0x21a)][_0xe8c458(0x20d)]({'eventID':_univerjs_pro_collaboration[_0xe8c458(0x214)][_0xe8c458(0x1fc)],'data':{'unitID':this[_0xe8c458(0x1cd)],'operations':{[_0x46fabb['id']]:{'id':_0x46fabb['id'],'params':JSON[_0xe8c458(0x1af)](_0x46fabb[_0xe8c458(0x239)])}}}},this[_0xe8c458(0x1cd)]));}[_0xd7441f(0x1e7)](){const _0x5733e4=_0xd7441f;var _0x36bcc3;this[_0x5733e4(0x208)][_0x5733e4(0x254)](_0x5733e4(0x21b)),(_0x36bcc3=this['_commandDisposable'])===null||_0x36bcc3===void 0x0||_0x36bcc3['dispose'](),this[_0x5733e4(0x24e)]=null;}[_0xd7441f(0x250)](){const _0x25ba98=_0xd7441f;var _0x37128f;(_0x37128f=this[_0x25ba98(0x24e)])===null||_0x37128f===void 0x0||_0x37128f[_0x25ba98(0x1ca)](),this[_0x25ba98(0x208)][_0x25ba98(0x254)](_0x25ba98(0x1b1));}[_0xd7441f(0x1e4)](){const _0x2b9b22=_0xd7441f;var _0x5df956;this[_0x2b9b22(0x208)][_0x2b9b22(0x254)]('idle'),(_0x5df956=this[_0x2b9b22(0x24e)])===null||_0x5df956===void 0x0||_0x5df956[_0x2b9b22(0x1ca)](),this[_0x2b9b22(0x24e)]=null;}[_0xd7441f(0x233)](){const _0x40c782=_0xd7441f;var _0x2cdc35;this['_status$']['next'](_0x40c782(0x25b)),(_0x2cdc35=this['_commandDisposable'])===null||_0x2cdc35===void 0x0||_0x2cdc35['dispose']();}['_handleOperation'](_0x183be4){const _0x11192b=_0xd7441f;if([_0x11192b(0x1d0),'not-following',_0x11192b(0x230)]['includes'](this[_0x11192b(0x1c9)]))return;if(!_0x183be4['data'][_0x11192b(0x23c)]||_0x183be4[_0x11192b(0x1b8)][_0x11192b(0x23c)]===this[_0x11192b(0x21a)][_0x11192b(0x209)]())return;if(this[_0x11192b(0x1c9)]===_0x11192b(0x21b))this['_startFollowing']();const _0x1eb994=_0x183be4[_0x11192b(0x1b8)][_0x11192b(0x257)];Object[_0x11192b(0x1f6)](_0x1eb994)[_0x11192b(0x263)](_0x3a64a1=>{const _0x30227d=_0x11192b;this[_0x30227d(0x1f4)][_0x30227d(0x1ad)](_0x3a64a1['id'],_0x3a64a1[_0x30227d(0x239)]?JSON[_0x30227d(0x1ec)](_0x3a64a1[_0x30227d(0x239)]):null,{'fromCollab':!![]});});}[_0xd7441f(0x243)](){const _0x50f64e=_0xd7441f;var _0x2bc916;this['_status$']['next']('offline'),(_0x2bc916=this[_0x50f64e(0x24e)])===null||_0x2bc916===void 0x0||_0x2bc916['dispose']();}[_0xd7441f(0x1bd)](){const _0x5f1581=_0xd7441f;this[_0x5f1581(0x208)][_0x5f1581(0x254)](_0x5f1581(0x21b)),this[_0x5f1581(0x25c)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,_univerjs_core[_0xd7441f(0x26a)]),__decorateParam(0x3,(0x0,_univerjs_core['Inject'])(LiveShareService)),__decorateParam(0x4,_univerjs_core[_0xd7441f(0x255)])],LiveShareCoordinator);function LiveShare(){const _0x2e0eaf=_0xd7441f,_0x565c64=(0x0,_univerjs_ui['useDependency'])(LiveShareController),_0x29082f=(0x0,_univerjs_ui[_0x2e0eaf(0x25e)])(_univerjs_core['IUniverInstanceService']),_0x11d64c=(0x0,_univerjs_ui['useObservable'])(()=>_0x29082f[_0x2e0eaf(0x1df)](_univerjs_core[_0x2e0eaf(0x1b7)][_0x2e0eaf(0x1fd)]),void 0x0,![],[]),[_0x489e65,_0xbd0910]=(0x0,react[_0x2e0eaf(0x1e6)])(null),[_0x6ce115,_0x1e00ba]=(0x0,react[_0x2e0eaf(0x1e6)])(_0x2e0eaf(0x21b)),_0x3726b4=(0x0,react['useRef'])(null);(0x0,react[_0x2e0eaf(0x225)])(()=>{const _0x2c585=_0x2e0eaf;if(_0x11d64c)_0x565c64[_0x2c585(0x1cc)](_0x11d64c[_0x2c585(0x1cb)]())[_0x2c585(0x1de)](_0x130f2f=>{const _0x385627=_0x2c585;_0xbd0910(_0x130f2f),_0x3726b4['current']=_0x130f2f[_0x385627(0x218)][_0x385627(0x1bf)](_0x2cc9a9=>{_0x1e00ba(_0x2cc9a9);});});return()=>{const _0x13ba27=_0x2c585;var _0x25a09e;(_0x25a09e=_0x3726b4[_0x13ba27(0x217)])===null||_0x25a09e===void 0x0||_0x25a09e[_0x13ba27(0x268)](),_0x3726b4['current']=null;};},[_0x11d64c,_0x565c64]);if(!_0x489e65)return null;return(0x0,react_jsx_runtime[_0x2e0eaf(0x21d)])(_univerjs_design[_0x2e0eaf(0x1d9)],{'align':'end','disabled':_0x6ce115==='offline','className':_0x2e0eaf(0x272),'overlay':(0x0,react_jsx_runtime[_0x2e0eaf(0x21d)])(LiveShareDropdown,{'status':_0x6ce115,'coordinator':_0x489e65}),'children':(0x0,react_jsx_runtime[_0x2e0eaf(0x21d)])(_0x2e0eaf(0x1da),{'className':(0x0,_univerjs_design[_0x2e0eaf(0x1c0)])(_0x2e0eaf(0x1b4),{'univer-cursor-not-allowed':_0x6ce115===_0x2e0eaf(0x230),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x6ce115!==_0x2e0eaf(0x230)}),'type':_0x2e0eaf(0x1da),'children':(0x0,react_jsx_runtime[_0x2e0eaf(0x21d)])(_univerjs_icons[_0x2e0eaf(0x22f)],{'className':_0x2e0eaf(0x244)})})});}function LiveShareDropdown(_0x9d6d47){const _0x350fe6=_0xd7441f,{status:_0x4c1082,coordinator:_0x14455a}=_0x9d6d47;switch(_0x4c1082){case _0x350fe6(0x21b):return(0x0,react_jsx_runtime[_0x350fe6(0x21d)])(Idle,{'coordinator':_0x14455a});case _0x350fe6(0x1b1):return(0x0,react_jsx_runtime[_0x350fe6(0x21d)])(Following,{'coordinator':_0x14455a});case _0x350fe6(0x25b):return(0x0,react_jsx_runtime['jsx'])(NotFollowing,{'coordinator':_0x14455a});case _0x350fe6(0x230):return(0x0,react_jsx_runtime[_0x350fe6(0x21d)])(Offline,{});case _0x350fe6(0x1d0):return(0x0,react_jsx_runtime[_0x350fe6(0x21d)])(Presenting,{'coordinator':_0x14455a});default:return null;}}function Idle(_0xc90d56){const _0x5ef980=_0xd7441f,{coordinator:_0x542fd6}=_0xc90d56;return(0x0,react_jsx_runtime[_0x5ef980(0x20e)])(react_jsx_runtime[_0x5ef980(0x21f)],{'children':[(0x0,react_jsx_runtime[_0x5ef980(0x21d)])(_0x5ef980(0x248),{'className':_0x5ef980(0x1ef),'children':_0x5ef980(0x20f)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'onClick':()=>_0x542fd6[_0x5ef980(0x26e)](),'children':_0x5ef980(0x22e)})]});}function Following(_0x186b53){const _0x315f6a=_0xd7441f,{coordinator:_0x26e975}=_0x186b53;return(0x0,react_jsx_runtime[_0x315f6a(0x20e)])(react_jsx_runtime[_0x315f6a(0x21f)],{'children':[(0x0,react_jsx_runtime[_0x315f6a(0x21d)])(_0x315f6a(0x248),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x315f6a(0x275)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x315f6a(0x237)],{'onClick':()=>_0x26e975[_0x315f6a(0x1c7)](),'children':'Stop\x20following'})]});}function NotFollowing(_0x153083){const _0x5b565c=_0xd7441f,{coordinator:_0x33252f}=_0x153083;return(0x0,react_jsx_runtime[_0x5b565c(0x20e)])(react_jsx_runtime[_0x5b565c(0x21f)],{'children':[(0x0,react_jsx_runtime[_0x5b565c(0x21d)])(_0x5b565c(0x248),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x5b565c(0x1f1)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x5b565c(0x237)],{'variant':_0x5b565c(0x201),'onClick':()=>_0x33252f[_0x5b565c(0x22b)](),'children':_0x5b565c(0x1c1)})]});}function Presenting(_0x3fa25b){const _0x294c07=_0xd7441f,{coordinator:_0x1543fe}=_0x3fa25b;return(0x0,react_jsx_runtime['jsxs'])(react_jsx_runtime[_0x294c07(0x21f)],{'children':[(0x0,react_jsx_runtime[_0x294c07(0x21d)])(_0x294c07(0x248),{'className':_0x294c07(0x1ef),'children':_0x294c07(0x265)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'variant':'default','onClick':()=>_0x1543fe[_0x294c07(0x26d)](),'children':'Stop\x20presenting'})]});}function Offline(){const _0x433564=_0xd7441f;return(0x0,react_jsx_runtime[_0x433564(0x21d)])(react_jsx_runtime[_0x433564(0x21f)],{'children':_0x433564(0x260)});}let DesktopLiveShareController=class DesktopLiveShareController extends _univerjs_core[_0xd7441f(0x23a)]{constructor(_0x4d6fb6,_0x1e1253){const _0x123161=_0xd7441f;super(),this['_injector']=_0x4d6fb6,this[_0x123161(0x1ba)]=_0x1e1253,this[_0x123161(0x1f8)]();}[_0xd7441f(0x1f8)](){const _0x1b3700=_0xd7441f;this[_0x1b3700(0x1d7)](this[_0x1b3700(0x1ba)]['registerComponent'](_univerjs_ui['BuiltInUIPart'][_0x1b3700(0x229)],()=>(0x0,_univerjs_ui[_0x1b3700(0x1fb)])(LiveShare,this['_injector'])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0xd7441f(0x220)])(_univerjs_core[_0xd7441f(0x1d8)])),__decorateParam(0x1,_univerjs_ui[_0xd7441f(0x1e5)])],DesktopLiveShareController);var name='@univerjs-pro/live-share',version='0.22.0';const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0xd7441f(0x1d4),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends _univerjs_core[_0xd7441f(0x23a)]{constructor(_0x2d6b44){const _0x35c9af=_0xd7441f;super(),this[_0x35c9af(0x271)]=_0x2d6b44,this[_0x35c9af(0x1f9)]();}[_0xd7441f(0x1f9)](){const _0x2e3750=_0xd7441f;[_univerjs_sheets_ui[_0x2e3750(0x1b3)]['id'],_univerjs_sheets_ui['SetScrollOperation']['id'],_univerjs_sheets['SetWorksheetActiveOperation']['id']]['forEach'](_0x2a88f1=>{const _0x334ac6=_0x2e3750;this[_0x334ac6(0x1d7)](this['_liveShareService']['registerSharedOperation'](_0x2a88f1));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends _univerjs_core[_0xd7441f(0x1ee)]{constructor(_0x1ce938=defaultPluginConfig,_0x22d878,_0x5d7df6){const _0x22c8dc=_0xd7441f;super(),this[_0x22c8dc(0x215)]=_0x1ce938,this[_0x22c8dc(0x253)]=_0x22d878,this['_configService']=_0x5d7df6;const {..._0x33465f}=(0x0,_univerjs_core[_0x22c8dc(0x1e2)])({},defaultPluginConfig,this[_0x22c8dc(0x215)]);this[_0x22c8dc(0x273)][_0x22c8dc(0x25f)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x33465f);}[_0xd7441f(0x1f0)](){const _0x532e4f=_0xd7441f;(0x0,_univerjs_core['registerDependencies'])(this[_0x532e4f(0x253)],(0x0,_univerjs_core['mergeOverrideWithDependencies'])([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this['_config'][_0x532e4f(0x242)])),(0x0,_univerjs_core['touchDependencies'])(this[_0x532e4f(0x253)],[[LiveShareCoreExtensionsController]]);}[_0xd7441f(0x1ae)](){const _0x3d967a=_0xd7441f;(0x0,_univerjs_core[_0x3d967a(0x256)])(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0xd7441f(0x234),_univerjs_core['UniverInstanceType'][_0xd7441f(0x24d)]),_defineProperty(UniverLiveSharePlugin,_0xd7441f(0x227),_0xd7441f(0x1eb)),_defineProperty(UniverLiveSharePlugin,_0xd7441f(0x203),name),_defineProperty(UniverLiveSharePlugin,_0xd7441f(0x22a),version),UniverLiveSharePlugin=__decorate([(0x0,_univerjs_core[_0xd7441f(0x25d)])(_univerjs_pro_collaboration_client['UniverCollaborationClientPlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0xd7441f(0x220)])(_univerjs_core['Injector'])),__decorateParam(0x2,_univerjs_core['IConfigService'])],UniverLiveSharePlugin),Object[_0xd7441f(0x1c4)](exports,_0xd7441f(0x1f7),{'enumerable':!![],'get':function(){return DesktopLiveShareController;}}),exports['LiveShare']=LiveShare,Object['defineProperty'](exports,_0xd7441f(0x23b),{'enumerable':!![],'get':function(){return LiveShareController;}}),Object[_0xd7441f(0x1c4)](exports,_0xd7441f(0x1d6),{'enumerable':!![],'get':function(){return LiveShareCoordinator;}}),exports[_0xd7441f(0x25a)]=LiveShareService,exports[_0xd7441f(0x205)]=LiveShareStatus,Object[_0xd7441f(0x1c4)](exports,_0xd7441f(0x245),{'enumerable':!![],'get':function(){return UniverLiveSharePlugin;}});
|
package/lib/es/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x16bca1=_0x2d90;(function(_0x12b1ef,_0x243f46){const _0x1422c2=_0x2d90,_0x29111d=_0x12b1ef();while(!![]){try{const _0x100003=-parseInt(_0x1422c2(0x1df))/0x1*(-parseInt(_0x1422c2(0x1e5))/0x2)+parseInt(_0x1422c2(0x1ed))/0x3+-parseInt(_0x1422c2(0x1e8))/0x4*(-parseInt(_0x1422c2(0x1f3))/0x5)+parseInt(_0x1422c2(0x1e3))/0x6*(parseInt(_0x1422c2(0x1fc))/0x7)+-parseInt(_0x1422c2(0x1ec))/0x8*(-parseInt(_0x1422c2(0x1fa))/0x9)+-parseInt(_0x1422c2(0x1ea))/0xa+parseInt(_0x1422c2(0x1f9))/0xb*(-parseInt(_0x1422c2(0x1f2))/0xc);if(_0x100003===_0x243f46)break;else _0x29111d['push'](_0x29111d['shift']());}catch(_0x111b63){_0x29111d['push'](_0x29111d['shift']());}}}(_0x442f,0x19064));import{LiveShareController,LiveShareStatus}from'@univerjs-pro/live-share';import{IUniverInstanceService,UniverInstanceType}from'@univerjs/core';import{FEnum,FUniver}from'@univerjs/core/facade';function _0x442f(){const _0x3a07ea=['getLiveShareStatus','iterator','4JDaAwc','call','1295170nmvejY','startFollowing','6088PvrQyQ','273675KjVYRs','extend','stopFollowing','symbol','toPrimitive','540RlcsCr','347855aVyHhT','string','tryStartPresenting','stopPresenting','object','_injector','71379LBWnNr','1476uuFPPd','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','112AHfLdZ','getLiveShareCoordinatorSync','constructor','No\x20active\x20workbook\x20found.','UNIVER_SHEET','LiveShareStatusEnum','get','IDLE','function','getCurrentUnitOfType','startPresenting','prototype','24862QKaMfR','defineProperty','getUnitId','_liveShareController','42792ONUVyq','getStatus','10rqRFfb'];_0x442f=function(){return _0x3a07ea;};return _0x442f();}function _typeof(_0x5737ee){'@babel/helpers - typeof';const _0x608263=_0x2d90;return _typeof=_0x608263(0x204)==typeof Symbol&&_0x608263(0x1f0)==typeof Symbol[_0x608263(0x1e7)]?function(_0x1b8331){return typeof _0x1b8331;}:function(_0x19665b){const _0x1cbd98=_0x608263;return _0x19665b&&'function'==typeof Symbol&&_0x19665b[_0x1cbd98(0x1fe)]===Symbol&&_0x19665b!==Symbol[_0x1cbd98(0x207)]?_0x1cbd98(0x1f0):typeof _0x19665b;},_typeof(_0x5737ee);}function toPrimitive(_0x5b7ad4,_0x18c827){const _0x5a3642=_0x2d90;if('object'!=_typeof(_0x5b7ad4)||!_0x5b7ad4)return _0x5b7ad4;var _0x6a5848=_0x5b7ad4[Symbol[_0x5a3642(0x1f1)]];if(void 0x0!==_0x6a5848){var _0x2981c8=_0x6a5848[_0x5a3642(0x1e9)](_0x5b7ad4,_0x18c827||'default');if(_0x5a3642(0x1f7)!=_typeof(_0x2981c8))return _0x2981c8;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5a3642(0x1f4)===_0x18c827?String:Number)(_0x5b7ad4);}function toPropertyKey(_0x382b9c){const _0x45af05=_0x2d90;var _0x8acb82=toPrimitive(_0x382b9c,_0x45af05(0x1f4));return _0x45af05(0x1f0)==_typeof(_0x8acb82)?_0x8acb82:_0x8acb82+'';}function _0x2d90(_0x1893c7,_0x119f13){_0x1893c7=_0x1893c7-0x1df;const _0x442fa3=_0x442f();let _0x2d90f4=_0x442fa3[_0x1893c7];return _0x2d90f4;}function _defineProperty(_0xbe67c4,_0x4e6e47,_0x34bdf1){const _0x1240a4=_0x2d90;return(_0x4e6e47=toPropertyKey(_0x4e6e47))in _0xbe67c4?Object[_0x1240a4(0x1e0)](_0xbe67c4,_0x4e6e47,{'value':_0x34bdf1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xbe67c4[_0x4e6e47]=_0x34bdf1,_0xbe67c4;}var FUniverLiveShareMixin=class extends FUniver{constructor(..._0x370819){const _0x41fde7=_0x2d90;super(..._0x370819),_defineProperty(this,_0x41fde7(0x1e2),void 0x0);}['_initialize'](_0x51ef14){this['_liveShareController']=_0x51ef14['get'](LiveShareController);}[_0x16bca1(0x1e6)](){const _0x379959=_0x16bca1;var _0x10c9b1;const _0x4ddabd=this[_0x379959(0x1f8)]['get'](IUniverInstanceService)[_0x379959(0x205)](UniverInstanceType[_0x379959(0x200)]);if(!_0x4ddabd)throw new Error('No\x20active\x20workbook\x20found.');const _0x228ad4=_0x4ddabd[_0x379959(0x1e1)](),_0x2c816d=this[_0x379959(0x1e2)][_0x379959(0x1fd)](_0x228ad4);return(_0x10c9b1=_0x2c816d===null||_0x2c816d===void 0x0?void 0x0:_0x2c816d[_0x379959(0x1e4)]())!==null&&_0x10c9b1!==void 0x0?_0x10c9b1:LiveShareStatus[_0x379959(0x203)];}['startFollowing'](){const _0x3e9da4=_0x16bca1,_0x1d9a19=this['_injector']['get'](IUniverInstanceService)[_0x3e9da4(0x205)](UniverInstanceType[_0x3e9da4(0x200)]);if(!_0x1d9a19)throw new Error(_0x3e9da4(0x1ff));const _0x57f359=_0x1d9a19[_0x3e9da4(0x1e1)](),_0x2fb187=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x57f359);if(!_0x2fb187)throw new Error(_0x3e9da4(0x1fb));_0x2fb187[_0x3e9da4(0x1eb)]();}[_0x16bca1(0x1ef)](){const _0x4908ab=_0x16bca1,_0x5559c3=this[_0x4908ab(0x1f8)][_0x4908ab(0x202)](IUniverInstanceService)[_0x4908ab(0x205)](UniverInstanceType[_0x4908ab(0x200)]);if(!_0x5559c3)throw new Error(_0x4908ab(0x1ff));const _0x131d15=_0x5559c3[_0x4908ab(0x1e1)](),_0x5b02f2=this['_liveShareController'][_0x4908ab(0x1fd)](_0x131d15);if(!_0x5b02f2)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x5b02f2[_0x4908ab(0x1ef)]();}[_0x16bca1(0x206)](){const _0x5df0c7=_0x16bca1,_0x220bfa=this[_0x5df0c7(0x1f8)][_0x5df0c7(0x202)](IUniverInstanceService)[_0x5df0c7(0x205)](UniverInstanceType[_0x5df0c7(0x200)]);if(!_0x220bfa)throw new Error(_0x5df0c7(0x1ff));const _0x9c4590=_0x220bfa[_0x5df0c7(0x1e1)](),_0x5ac036=this[_0x5df0c7(0x1e2)][_0x5df0c7(0x1fd)](_0x9c4590);if(!_0x5ac036)throw new Error(_0x5df0c7(0x1fb));_0x5ac036[_0x5df0c7(0x1f5)]();}[_0x16bca1(0x1f6)](){const _0x57e635=_0x16bca1,_0x251527=this[_0x57e635(0x1f8)][_0x57e635(0x202)](IUniverInstanceService)['getCurrentUnitOfType'](UniverInstanceType[_0x57e635(0x200)]);if(!_0x251527)throw new Error(_0x57e635(0x1ff));const _0x5d05c7=_0x251527[_0x57e635(0x1e1)](),_0x4ab8f7=this['_liveShareController'][_0x57e635(0x1fd)](_0x5d05c7);if(!_0x4ab8f7)throw new Error(_0x57e635(0x1fb));_0x4ab8f7[_0x57e635(0x1f6)]();}};FUniver['extend'](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends FEnum{get[_0x16bca1(0x201)](){return LiveShareStatus;}};FEnum[_0x16bca1(0x1ee)](FLiveShareEnumMixin);export{};
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5cb1(){const _0x2d1a40=['text','ONLINE','_injector','shouldShareOperation','stringify','requireSession','_commandDisposable','following','complete','getMemberID','parse','_configService','Start\x20following','_handleOffline','_config','_stopFollowing','current','_collabSessionService','stopPresenting','onCommandExecuted','UNIVER_SHEET','_commandService','univer-mb-3\x20univer-w-full\x20univer-text-sm','params','LIVESHARE_OPERATION','forEach','getStatus','registerComponent','defineProperty','getTypeOfUnitDisposed$','418IkRyKK','unitId','data','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getLiveShareCoordinator','map','operations','clear','div','FOLLOWING','_startLiveShareCoordinator','registerSharedOperation','getCurrentTypeOfUnit$','dispose$','registerInitialStateReporter','_entities','button','next','startFollowing','640qhoJkr','1557KqMGyG','add','string','values','disposeWithMe','getValue','_presenter','OPERATION','find','_handleOnline','type','68630efiYlv','_startFollowing','You\x27re\x20not\x20following\x20the\x20presenter','setConfig','28035WbchJW','_status','4BMMomR','univer-size-4','live-share.config','LIVESHARE_FETCH_OPERATIONS','packageName','_fetchOperations','includes','getOwnPropertyDescriptor','UNIVER_UNKNOWN','_unitID','delete','Stop\x20following','decorate','PRESENTING','_collabSession','object','1552BKpOmS','onRendered','tryStartPresenting','_init','_liveShareService','default','constructor','asObservable','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','idle','_mountLiveShare','subscribe','pipe','12452817OQvfDo','sheet','_uiPartsService','802812cdkmHA','override','presenting','NOT_FOLLOWING','1KUkuVF','_beIdle','HEADER_MENU','4434hBCYQL','You\x27re\x20following\x20the\x20presenter','_handleNewChangeSets','_sharedOperations','getTypeOfUnitAdded$','set','LIVESHARE_REQUEST_HOST','_startPresenting','offline','has','send','status$','symbol','IDLE','Start','prototype','Stop\x20presenting','length','mutations','_handleTerminate','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','unit','init','0.21.1','_status$','LIVESHARE_TERMINATE','function','pluginName','executeCommand','OFFLINE','end','then','getInitialStates','2402974SZayCS','_reporters','event$','_univerInstanceService','140772TfvTvk','SAME_OPERATION_SHARE_INTERVAL','dispose','get','getUnitId','version'];_0x5cb1=function(){return _0x2d1a40;};return _0x5cb1();}const _0x200f20=_0x566b;(function(_0x11bd50,_0x1c54d5){const _0x16c1ea=_0x566b,_0x579cb3=_0x11bd50();while(!![]){try{const _0x3eb57c=-parseInt(_0x16c1ea(0xe4))/0x1*(-parseInt(_0x16c1ea(0x109))/0x2)+-parseInt(_0x16c1ea(0xe0))/0x3*(-parseInt(_0x16c1ea(0xc0))/0x4)+-parseInt(_0x16c1ea(0xae))/0x5*(-parseInt(_0x16c1ea(0xe7))/0x6)+-parseInt(_0x16c1ea(0xbe))/0x7*(-parseInt(_0x16c1ea(0xd0))/0x8)+-parseInt(_0x16c1ea(0xaf))/0x9*(parseInt(_0x16c1ea(0xba))/0xa)+-parseInt(_0x16c1ea(0x9b))/0xb*(-parseInt(_0x16c1ea(0x10d))/0xc)+-parseInt(_0x16c1ea(0xdd))/0xd;if(_0x3eb57c===_0x1c54d5)break;else _0x579cb3['push'](_0x579cb3['shift']());}catch(_0x248c2f){_0x579cb3['push'](_0x579cb3['shift']());}}}(_0x5cb1,0x9c8c7));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x17acd1){'@babel/helpers - typeof';const _0x135050=_0x566b;return _typeof=_0x135050(0x102)==typeof Symbol&&_0x135050(0xf3)==typeof Symbol['iterator']?function(_0x4568b0){return typeof _0x4568b0;}:function(_0x53de18){const _0x5197ae=_0x135050;return _0x53de18&&_0x5197ae(0x102)==typeof Symbol&&_0x53de18[_0x5197ae(0xd6)]===Symbol&&_0x53de18!==Symbol[_0x5197ae(0xf6)]?_0x5197ae(0xf3):typeof _0x53de18;},_typeof(_0x17acd1);}function toPrimitive(_0x1f1a05,_0x3386ad){const _0x354250=_0x566b;if('object'!=_typeof(_0x1f1a05)||!_0x1f1a05)return _0x1f1a05;var _0x4b88e1=_0x1f1a05[Symbol['toPrimitive']];if(void 0x0!==_0x4b88e1){var _0x5686c6=_0x4b88e1['call'](_0x1f1a05,_0x3386ad||'default');if(_0x354250(0xcf)!=_typeof(_0x5686c6))return _0x5686c6;throw new TypeError(_0x354250(0x9e));}return(_0x354250(0xb1)===_0x3386ad?String:Number)(_0x1f1a05);}function toPropertyKey(_0x2c143c){const _0x22e76f=_0x566b;var _0x3a7c81=toPrimitive(_0x2c143c,'string');return _0x22e76f(0xf3)==_typeof(_0x3a7c81)?_0x3a7c81:_0x3a7c81+'';}function _defineProperty(_0x176bd5,_0x504226,_0x40caba){return(_0x504226=toPropertyKey(_0x504226))in _0x176bd5?Object['defineProperty'](_0x176bd5,_0x504226,{'value':_0x40caba,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x176bd5[_0x504226]=_0x40caba,_0x176bd5;}var LiveShareService=class extends Disposable{constructor(..._0x542958){const _0x540890=_0x566b;super(..._0x542958),_defineProperty(this,_0x540890(0xea),new Set()),_defineProperty(this,_0x540890(0x10a),new Set());}[_0x200f20(0xa6)](_0x182dc4){const _0x25161b=_0x200f20;return this[_0x25161b(0xea)][_0x25161b(0xb0)](_0x182dc4),toDisposable(()=>this[_0x25161b(0xea)][_0x25161b(0xca)](_0x182dc4));}[_0x200f20(0xa9)](_0x2ecc4a){const _0x355d80=_0x200f20;return this[_0x355d80(0x10a)][_0x355d80(0xb0)](_0x2ecc4a),toDisposable(()=>this[_0x355d80(0x10a)][_0x355d80(0xca)](_0x2ecc4a));}['shouldShareOperation'](_0x49d8d6){const _0x2b9a15=_0x200f20;return this[_0x2b9a15(0xea)][_0x2b9a15(0xf0)](_0x49d8d6);}[_0x200f20(0x108)](_0x362375){const _0x59ebf6=_0x200f20;return Array['from'](this['_reporters'])[_0x59ebf6(0xa0)](_0x74021b=>_0x74021b(_0x362375));}};function __decorateParam(_0x2e212f,_0x15ae25){return function(_0x1388c0,_0x3b2063){_0x15ae25(_0x1388c0,_0x3b2063,_0x2e212f);};}function __decorate(_0x22b1e8,_0x9f92d,_0x4ea3f0,_0x3705b9){const _0x415773=_0x200f20;var _0x2aefe6=arguments[_0x415773(0xf8)],_0x2d34ff=_0x2aefe6<0x3?_0x9f92d:_0x3705b9===null?_0x3705b9=Object[_0x415773(0xc7)](_0x9f92d,_0x4ea3f0):_0x3705b9,_0x3b3d0e;if(typeof Reflect===_0x415773(0xcf)&&typeof Reflect[_0x415773(0xcc)]===_0x415773(0x102))_0x2d34ff=Reflect[_0x415773(0xcc)](_0x22b1e8,_0x9f92d,_0x4ea3f0,_0x3705b9);else{for(var _0x3c5b58=_0x22b1e8[_0x415773(0xf8)]-0x1;_0x3c5b58>=0x0;_0x3c5b58--)if(_0x3b3d0e=_0x22b1e8[_0x3c5b58])_0x2d34ff=(_0x2aefe6<0x3?_0x3b3d0e(_0x2d34ff):_0x2aefe6>0x3?_0x3b3d0e(_0x9f92d,_0x4ea3f0,_0x2d34ff):_0x3b3d0e(_0x9f92d,_0x4ea3f0))||_0x2d34ff;}return _0x2aefe6>0x3&&_0x2d34ff&&Object[_0x415773(0x99)](_0x9f92d,_0x4ea3f0,_0x2d34ff),_0x2d34ff;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x36fc88,_0x216847,_0x477cd9){const _0x4d941f=_0x200f20;super(),this[_0x4d941f(0x10c)]=_0x36fc88,this[_0x4d941f(0x7f)]=_0x216847,this[_0x4d941f(0x8e)]=_0x477cd9,_defineProperty(this,_0x4d941f(0xaa),new Map()),this['_init']();}async[_0x200f20(0x9f)](_0x4dddf7){const _0x621173=_0x200f20;if(!this[_0x621173(0xaa)][_0x621173(0xf0)](_0x4dddf7))await this[_0x621173(0xa5)](_0x4dddf7);return this[_0x621173(0xaa)][_0x621173(0x7a)](_0x4dddf7);}['getLiveShareCoordinatorSync'](_0x44930d){const _0x4bc05f=_0x200f20;var _0xb66ff2;return(_0xb66ff2=this[_0x4bc05f(0xaa)][_0x4bc05f(0x7a)](_0x44930d))!==null&&_0xb66ff2!==void 0x0?_0xb66ff2:null;}[_0x200f20(0xd3)](){const _0x1d0eb2=_0x200f20;this[_0x1d0eb2(0x10c)][_0x1d0eb2(0xeb)](UniverInstanceType[_0x1d0eb2(0x91)])[_0x1d0eb2(0xdc)](takeUntil(this[_0x1d0eb2(0xa8)]))[_0x1d0eb2(0xdb)](async _0x543846=>{const _0x1ab6b8=_0x1d0eb2,_0x393127=_0x543846[_0x1ab6b8(0xfd)][_0x1ab6b8(0x7b)]();if(this['_entities'][_0x1ab6b8(0xf0)](_0x393127))return;this[_0x1ab6b8(0xa5)](_0x393127);}),this[_0x1d0eb2(0x10c)][_0x1d0eb2(0x9a)](UniverInstanceType[_0x1d0eb2(0x91)])[_0x1d0eb2(0xdc)](takeUntil(this[_0x1d0eb2(0xa8)]))[_0x1d0eb2(0xdb)](_0x16c875=>{const _0x3f069d=_0x16c875['getUnitId'](),_0x3b904d=this['_entities']['get'](_0x3f069d);_0x3b904d===null||_0x3b904d===void 0x0||_0x3b904d['dispose']();});}async['_startLiveShareCoordinator'](_0x428d37){const _0x391854=_0x200f20,_0x13303d=await this['_collabSessionService'][_0x391854(0x82)](_0x428d37),_0x4236c3=this[_0x391854(0x7f)]['createInstance'](LiveShareCoordinator,_0x428d37,_0x13303d);return _0x4236c3[_0x391854(0xfe)](),this[_0x391854(0xaa)]['set'](_0x428d37,_0x4236c3),_0x4236c3;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0x12884d){const _0x46dc0a=_0x200f20;return _0x12884d[_0x46dc0a(0x105)]=_0x46dc0a(0xef),_0x12884d[_0x46dc0a(0xf4)]=_0x46dc0a(0xd9),_0x12884d['FOLLOWING']=_0x46dc0a(0x84),_0x12884d['NOT_FOLLOWING']='not-following',_0x12884d[_0x46dc0a(0xcd)]=_0x46dc0a(0xe2),_0x12884d;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x200f20(0x10e),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get['_status'](){const _0x4491b3=_0x200f20;return this[_0x4491b3(0x100)][_0x4491b3(0xb4)]();}constructor(_0x1a27d3,_0x31d798,_0x3fa977,_0x202e7c,_0x42a347){const _0x20121d=_0x200f20;super(),this[_0x20121d(0xc9)]=_0x1a27d3,this[_0x20121d(0xce)]=_0x31d798,this[_0x20121d(0x88)]=_0x3fa977,this[_0x20121d(0xd4)]=_0x202e7c,this['_commandService']=_0x42a347,_defineProperty(this,_0x20121d(0x100),new BehaviorSubject(LiveShareStatus[_0x20121d(0xf4)])),_defineProperty(this,_0x20121d(0xf2),this[_0x20121d(0x100)][_0x20121d(0xd7)]()),_defineProperty(this,'_init',![]),_defineProperty(this,_0x20121d(0x83),null),_defineProperty(this,_0x20121d(0xb5),null);}[_0x200f20(0x10f)](){const _0x87fa8d=_0x200f20;var _0x4ab4bf;(_0x4ab4bf=this[_0x87fa8d(0x83)])===null||_0x4ab4bf===void 0x0||_0x4ab4bf[_0x87fa8d(0x10f)](),this[_0x87fa8d(0x100)][_0x87fa8d(0xac)](LiveShareStatus[_0x87fa8d(0xf4)]),this[_0x87fa8d(0x100)][_0x87fa8d(0x85)]();}[_0x200f20(0x97)](){return this['_status'];}['init'](){const _0x198982=_0x200f20;if(this['_init'])return;this[_0x198982(0xd3)]=!![],this['_collabSession']['sessionStatus$'][_0x198982(0xdc)](takeUntil(this[_0x198982(0xa8)]))[_0x198982(0xdb)](_0x4ebfd4=>{const _0x165f2c=_0x198982;switch(_0x4ebfd4){case SessionStatus['OFFLINE']:this[_0x165f2c(0x8a)]();break;case SessionStatus[_0x165f2c(0x7e)]:this[_0x165f2c(0xb8)]();break;default:}}),this['_collabSession'][_0x198982(0x10b)][_0x198982(0xdc)](takeUntil(this[_0x198982(0xa8)]))[_0x198982(0xdb)](_0x444caa=>{const _0x20b76c=_0x198982,{eventID:_0x1d8ff5}=_0x444caa;switch(_0x1d8ff5){case CollaborationEvent['LIVESHARE_NEW_HOST']:this['_handleNewHost'](_0x444caa);break;case CollaborationEvent[_0x20b76c(0x95)]:this['_handleOperation'](_0x444caa);break;case CollaborationEvent[_0x20b76c(0x101)]:this[_0x20b76c(0xfa)]();break;case CollaborationEvent['NEW_CHANGESETS']:this[_0x20b76c(0xe9)](_0x444caa);break;default:}});}[_0x200f20(0xd2)](){const _0x12d908=_0x200f20;this['_collabSession'][_0x12d908(0xf1)]({'eventID':CollaborationEvent[_0x12d908(0xed)],'data':{'unitID':this['_unitID'],'userID':this[_0x12d908(0xce)][_0x12d908(0x86)]()}},this['_unitID']);}[_0x200f20(0x8f)](){const _0x1c8f7d=_0x200f20;this[_0x1c8f7d(0xbf)]===LiveShareStatus[_0x1c8f7d(0xcd)]&&(this[_0x1c8f7d(0x100)][_0x1c8f7d(0xac)](LiveShareStatus['IDLE']),this['_collabSession'][_0x1c8f7d(0xf1)]({'eventID':CollaborationEvent['LIVESHARE_TERMINATE'],'data':{'unitID':this[_0x1c8f7d(0xc9)]}},this[_0x1c8f7d(0xc9)]));}[_0x200f20(0xad)](){const _0x5128e8=_0x200f20;if(this[_0x5128e8(0xbf)]!==LiveShareStatus[_0x5128e8(0xe3)])return;this[_0x5128e8(0x100)]['next'](LiveShareStatus['FOLLOWING']),this[_0x5128e8(0xbb)]();}['stopFollowing'](){const _0x2afda5=_0x200f20;if(this[_0x2afda5(0xbf)]!==LiveShareStatus[_0x2afda5(0xa4)])return;this['_stopFollowing']();}['_handleNewHost'](_0x13a8d9){const _0x20f064=_0x200f20,{presenter:_0x3ad71f}=_0x13a8d9['data'],_0x1209c1=this['_collabSession'][_0x20f064(0x86)]();this['_presenter']=_0x3ad71f;if(_0x3ad71f===_0x1209c1)this[_0x20f064(0x8c)](),this[_0x20f064(0xee)]();else this[_0x20f064(0xbf)]!==LiveShareStatus[_0x20f064(0xe3)]&&(this['_stopPresenting'](),this[_0x20f064(0xbb)]());}[_0x200f20(0xc5)](){const _0x3b021e=_0x200f20,_0x182016={'eventID':CollaborationEvent[_0x3b021e(0xc3)]};this[_0x3b021e(0xce)][_0x3b021e(0xf1)](_0x182016,this['_unitID']);}[_0x200f20(0xfa)](){const _0x3d6ad3=_0x200f20;this[_0x3d6ad3(0xb5)]=null;if(this[_0x3d6ad3(0xbf)]!==LiveShareStatus[_0x3d6ad3(0xcd)])this['_beIdle']();}[_0x200f20(0xe9)](_0x13c401){const _0x29cb30=_0x200f20;if(this[_0x29cb30(0xbf)]===LiveShareStatus['FOLLOWING']&&this[_0x29cb30(0xb5)]===_0x13c401[_0x29cb30(0x9d)][_0x29cb30(0xfc)]){const _0x3927f3=parseProtocolChangeset(_0x13c401['data'])[_0x29cb30(0xf9)]['reverse']()[_0x29cb30(0xb7)](_0x12454c=>_0x12454c['id']===InsertSheetMutation['id']);if(_0x3927f3){const _0x17d585=_0x3927f3[_0x29cb30(0x94)][_0x29cb30(0x9c)],_0x63333c=_0x3927f3[_0x29cb30(0x94)][_0x29cb30(0xde)]['id'];setTimeout(()=>{const _0x56cf02=_0x29cb30;this[_0x56cf02(0x92)]['executeCommand'](SetWorksheetActiveOperation['id'],{'unitId':_0x17d585,'subUnitId':_0x63333c},{'fromCollab':!![]});});}}}[_0x200f20(0xee)](){const _0x13653b=_0x200f20;this[_0x13653b(0x100)][_0x13653b(0xac)](LiveShareStatus[_0x13653b(0xcd)]);const _0x5a156a=new Map(),_0xecb2e9=this[_0x13653b(0x83)]=new DisposableCollection();_0xecb2e9[_0x13653b(0xb0)](toDisposable(()=>{const _0x4a86be=_0x13653b;_0x5a156a['forEach'](_0x36f47c=>_0x36f47c[_0x4a86be(0x85)]()),_0x5a156a[_0x4a86be(0xa2)]();})),_0xecb2e9[_0x13653b(0xb0)](this[_0x13653b(0x92)][_0x13653b(0x90)](_0x748369=>{const _0x5706d2=_0x13653b;if(_0x748369[_0x5706d2(0xb9)]!==CommandType[_0x5706d2(0xb6)]||!this[_0x5706d2(0xd4)][_0x5706d2(0x80)](_0x748369['id']))return;const {id:_0x174343}=_0x748369;let _0x1a7ef1;if(!_0x5a156a[_0x5706d2(0xf0)](_0x174343)){var _0x29a24a;_0x1a7ef1=new Subject(),_0x5a156a[_0x5706d2(0xec)](_0x174343,_0x1a7ef1),_0x1a7ef1[_0x5706d2(0xdc)](throttleTime((_0x29a24a=this[_0x5706d2(0x88)]['getConfig'](_0x5706d2(0x10e)))!==null&&_0x29a24a!==void 0x0?_0x29a24a:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x5706d2(0xdb)](_0x55cc2c=>{const _0x51b757=_0x5706d2;this[_0x51b757(0xce)]['send']({'eventID':CollaborationEvent[_0x51b757(0x95)],'data':{'unitID':this[_0x51b757(0xc9)],'operations':{[_0x55cc2c['id']]:{'id':_0x55cc2c['id'],'params':JSON[_0x51b757(0x81)](_0x55cc2c[_0x51b757(0x94)])}}}},this['_unitID']);});}else _0x1a7ef1=_0x5a156a[_0x5706d2(0x7a)](_0x174343);_0x1a7ef1[_0x5706d2(0xac)](_0x748369);})),this[_0x13653b(0xd4)][_0x13653b(0x108)](this[_0x13653b(0xc9)])[_0x13653b(0x96)](_0x1f2fa5=>this[_0x13653b(0xce)][_0x13653b(0xf1)]({'eventID':CollaborationEvent[_0x13653b(0x95)],'data':{'unitID':this['_unitID'],'operations':{[_0x1f2fa5['id']]:{'id':_0x1f2fa5['id'],'params':JSON[_0x13653b(0x81)](_0x1f2fa5[_0x13653b(0x94)])}}}},this['_unitID']));}['_stopPresenting'](){const _0x6fed33=_0x200f20;var _0x1818de;this[_0x6fed33(0x100)]['next'](LiveShareStatus['IDLE']),(_0x1818de=this['_commandDisposable'])===null||_0x1818de===void 0x0||_0x1818de['dispose'](),this[_0x6fed33(0x83)]=null;}[_0x200f20(0xbb)](){const _0x3f8d77=_0x200f20;var _0x48652c;(_0x48652c=this[_0x3f8d77(0x83)])===null||_0x48652c===void 0x0||_0x48652c[_0x3f8d77(0x10f)](),this['_status$']['next'](LiveShareStatus[_0x3f8d77(0xa4)]);}[_0x200f20(0xe5)](){const _0x377489=_0x200f20;var _0x5e27ff;this[_0x377489(0x100)][_0x377489(0xac)](LiveShareStatus[_0x377489(0xf4)]),(_0x5e27ff=this['_commandDisposable'])===null||_0x5e27ff===void 0x0||_0x5e27ff[_0x377489(0x10f)](),this[_0x377489(0x83)]=null;}[_0x200f20(0x8c)](){const _0x18a40a=_0x200f20;var _0x40be2d;this[_0x18a40a(0x100)]['next'](LiveShareStatus['NOT_FOLLOWING']),(_0x40be2d=this[_0x18a40a(0x83)])===null||_0x40be2d===void 0x0||_0x40be2d['dispose']();}['_handleOperation'](_0x294e1b){const _0x4d5ae6=_0x200f20;if([LiveShareStatus['PRESENTING'],LiveShareStatus[_0x4d5ae6(0xe3)],LiveShareStatus[_0x4d5ae6(0x105)]][_0x4d5ae6(0xc6)](this['_status']))return;if(!_0x294e1b[_0x4d5ae6(0x9d)]['presenter']||_0x294e1b[_0x4d5ae6(0x9d)]['presenter']===this[_0x4d5ae6(0xce)][_0x4d5ae6(0x86)]())return;if(this[_0x4d5ae6(0xbf)]===LiveShareStatus['IDLE'])this[_0x4d5ae6(0xbb)]();const _0x453da3=_0x294e1b['data'][_0x4d5ae6(0xa1)];Object[_0x4d5ae6(0xb2)](_0x453da3)[_0x4d5ae6(0x96)](_0x3248ff=>{const _0x1206dc=_0x4d5ae6;this[_0x1206dc(0x92)][_0x1206dc(0x104)](_0x3248ff['id'],_0x3248ff[_0x1206dc(0x94)]?JSON[_0x1206dc(0x87)](_0x3248ff['params']):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x546af3=_0x200f20;var _0x45834f;this[_0x546af3(0x100)][_0x546af3(0xac)](LiveShareStatus['OFFLINE']),(_0x45834f=this[_0x546af3(0x83)])===null||_0x45834f===void 0x0||_0x45834f['dispose']();}[_0x200f20(0xb8)](){const _0x2325ba=_0x200f20;this[_0x2325ba(0x100)][_0x2325ba(0xac)](LiveShareStatus[_0x2325ba(0xf4)]),this['_fetchOperations']();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0xa88fdd=_0x200f20,_0x2f0dde=useDependency(LiveShareController),_0x2dc4ec=useDependency(IUniverInstanceService),_0x391ecd=useObservable(()=>_0x2dc4ec[_0xa88fdd(0xa7)](UniverInstanceType[_0xa88fdd(0x91)]),void 0x0,![],[]),[_0xc4f80d,_0x2dd077]=useState(null),[_0x5223e5,_0x24771f]=useState(LiveShareStatus[_0xa88fdd(0xf4)]),_0x4d8826=useRef(null);useEffect(()=>{const _0x5b4259=_0xa88fdd;if(_0x391ecd)_0x2f0dde[_0x5b4259(0x9f)](_0x391ecd['getUnitId']())[_0x5b4259(0x107)](_0x3c2c39=>{const _0x4b42aa=_0x5b4259;_0x2dd077(_0x3c2c39),_0x4d8826[_0x4b42aa(0x8d)]=_0x3c2c39[_0x4b42aa(0xf2)][_0x4b42aa(0xdb)](_0x5b60b6=>{_0x24771f(_0x5b60b6);});});return()=>{const _0x2dbaae=_0x5b4259;var _0x682b9a;(_0x682b9a=_0x4d8826[_0x2dbaae(0x8d)])===null||_0x682b9a===void 0x0||_0x682b9a['unsubscribe'](),_0x4d8826[_0x2dbaae(0x8d)]=null;};},[_0x391ecd,_0x2f0dde]);if(!_0xc4f80d)return null;return jsx(Dropdown,{'align':_0xa88fdd(0x106),'disabled':_0x5223e5===LiveShareStatus[_0xa88fdd(0x105)],'className':_0xa88fdd(0xfb),'overlay':jsx(LiveShareDropdown,{'status':_0x5223e5,'coordinator':_0xc4f80d}),'children':jsx(_0xa88fdd(0xab),{'className':clsx(_0xa88fdd(0xd8),{'univer-cursor-not-allowed':_0x5223e5===LiveShareStatus['OFFLINE'],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x5223e5!==LiveShareStatus['OFFLINE']}),'type':_0xa88fdd(0xab),'children':jsx(LiveShareIcon,{'className':_0xa88fdd(0xc1)})})});}function LiveShareDropdown(_0x50328d){const _0x1722f8=_0x200f20,{status:_0x3aed74,coordinator:_0x5b4fb5}=_0x50328d;switch(_0x3aed74){case LiveShareStatus[_0x1722f8(0xf4)]:return jsx(Idle,{'coordinator':_0x5b4fb5});case LiveShareStatus[_0x1722f8(0xa4)]:return jsx(Following,{'coordinator':_0x5b4fb5});case LiveShareStatus['NOT_FOLLOWING']:return jsx(NotFollowing,{'coordinator':_0x5b4fb5});case LiveShareStatus[_0x1722f8(0x105)]:return jsx(Offline,{});case LiveShareStatus[_0x1722f8(0xcd)]:return jsx(Presenting,{'coordinator':_0x5b4fb5});default:return null;}}function Idle(_0x3ea6bf){const _0x424eaf=_0x200f20,{coordinator:_0x1e7aa6}=_0x3ea6bf;return jsxs(Fragment,{'children':[jsx(_0x424eaf(0xa3),{'className':_0x424eaf(0x93),'children':'Present\x20this\x20document'}),jsx(Button,{'onClick':()=>_0x1e7aa6[_0x424eaf(0xd2)](),'children':_0x424eaf(0xf5)})]});}function Following(_0x564fa9){const _0x2e20f4=_0x200f20,{coordinator:_0x58ca41}=_0x564fa9;return jsxs(Fragment,{'children':[jsx(_0x2e20f4(0xa3),{'className':_0x2e20f4(0x93),'children':_0x2e20f4(0xe8)}),jsx(Button,{'onClick':()=>_0x58ca41['stopFollowing'](),'children':_0x2e20f4(0xcb)})]});}function NotFollowing(_0x4dfcfd){const _0x198366=_0x200f20,{coordinator:_0x45db5c}=_0x4dfcfd;return jsxs(Fragment,{'children':[jsx(_0x198366(0xa3),{'className':_0x198366(0x93),'children':_0x198366(0xbc)}),jsx(Button,{'variant':_0x198366(0x7d),'onClick':()=>_0x45db5c[_0x198366(0xad)](),'children':_0x198366(0x89)})]});}function Presenting(_0x109b6c){const _0xdf0bc1=_0x200f20,{coordinator:_0x3e2c37}=_0x109b6c;return jsxs(Fragment,{'children':[jsx(_0xdf0bc1(0xa3),{'className':_0xdf0bc1(0x93),'children':'You\x27re\x20presenting\x20the\x20document'}),jsx(Button,{'variant':_0xdf0bc1(0xd5),'onClick':()=>_0x3e2c37[_0xdf0bc1(0x8f)](),'children':_0xdf0bc1(0xf7)})]});}function Offline(){return jsx(Fragment,{'children':'You\x27are\x20offline.'});}function _0x566b(_0x1148e7,_0x2e0182){_0x1148e7=_0x1148e7-0x7a;const _0x5cb122=_0x5cb1();let _0x566b0a=_0x5cb122[_0x1148e7];return _0x566b0a;}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0x3dee1b,_0x447d2e){const _0x1e5277=_0x200f20;super(),this[_0x1e5277(0x7f)]=_0x3dee1b,this[_0x1e5277(0xdf)]=_0x447d2e,this[_0x1e5277(0xda)]();}[_0x200f20(0xda)](){const _0x4ef887=_0x200f20;this[_0x4ef887(0xb3)](this[_0x4ef887(0xdf)][_0x4ef887(0x98)](BuiltInUIPart[_0x4ef887(0xe6)],()=>connectInjector(LiveShare,this[_0x4ef887(0x7f)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name='@univerjs-pro/live-share',version=_0x200f20(0xff);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x200f20(0xc2),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x4c3380){const _0x364b30=_0x200f20;super(),this[_0x364b30(0xd4)]=_0x4c3380,this['_init']();}[_0x200f20(0xd3)](){[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']]['forEach'](_0x485004=>{const _0x531d5e=_0x566b;this[_0x531d5e(0xb3)](this[_0x531d5e(0xd4)][_0x531d5e(0xa6)](_0x485004));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0xf27369=defaultPluginConfig,_0x3ef5e8,_0x420abf){const _0x180894=_0x200f20;super(),this['_config']=_0xf27369,this[_0x180894(0x7f)]=_0x3ef5e8,this[_0x180894(0x88)]=_0x420abf;const {..._0x13020c}=merge({},defaultPluginConfig,this[_0x180894(0x8b)]);this[_0x180894(0x88)][_0x180894(0xbd)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x13020c);}['onStarting'](){const _0x214635=_0x200f20;registerDependencies(this[_0x214635(0x7f)],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x214635(0x8b)][_0x214635(0xe1)])),touchDependencies(this[_0x214635(0x7f)],[[LiveShareCoreExtensionsController]]);}[_0x200f20(0xd1)](){const _0x27bbfa=_0x200f20;touchDependencies(this[_0x27bbfa(0x7f)],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x200f20(0xb9),UniverInstanceType[_0x200f20(0xc8)]),_defineProperty(UniverLiveSharePlugin,_0x200f20(0x103),'UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,_0x200f20(0xc4),name),_defineProperty(UniverLiveSharePlugin,_0x200f20(0x7c),version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
|
1
|
+
const _0x5be165=_0x4fca;(function(_0x4a7376,_0x11a968){const _0x59ce72=_0x4fca,_0x27e75f=_0x4a7376();while(!![]){try{const _0x1d80b8=parseInt(_0x59ce72(0x1ec))/0x1+-parseInt(_0x59ce72(0x214))/0x2+-parseInt(_0x59ce72(0x20b))/0x3+-parseInt(_0x59ce72(0x203))/0x4+parseInt(_0x59ce72(0x1c8))/0x5+parseInt(_0x59ce72(0x1f9))/0x6+parseInt(_0x59ce72(0x1e7))/0x7;if(_0x1d80b8===_0x11a968)break;else _0x27e75f['push'](_0x27e75f['shift']());}catch(_0x1b0f87){_0x27e75f['push'](_0x27e75f['shift']());}}}(_0x59c0,0xa5efb));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';function _0x59c0(){const _0x24f3da=['_init','status$','_status$','then','div','_status','presenting','operations','stopFollowing','0.22.0','_univerInstanceService','UNIVER_UNKNOWN','constructor','PRESENTING','LIVESHARE_FETCH_OPERATIONS','dispose','getStatus','getConfig','_beIdle','@univerjs-pro/live-share','getLiveShareCoordinatorSync','LIVESHARE_TERMINATE','getValue','stopPresenting','IDLE','override','onStarting','1985945xWNIsI','_collabSession','get','Stop\x20presenting','delete','end','OPERATION','init','following','tryStartPresenting','symbol','packageName','_startLiveShareCoordinator','getMemberID','length','not-following','event$','clear','values','decorate','map','params','getOwnPropertyDescriptor','onRendered','mutations','_handleTerminate','offline','unit','_liveShareService','presenter','registerInitialStateReporter','2792454pqEcjw','pipe','FOLLOWING','object','_handleNewChangeSets','1159722cHCnst','_collabSessionService','NOT_FOLLOWING','from','_config','You\x27re\x20following\x20the\x20presenter','_handleOnline','_commandDisposable','data','executeCommand','has','_handleOperation','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','5970798DiXtyo','_presenter','live-share.config','registerComponent','NEW_CHANGESETS','_entities','reverse','UNIVER_SHEET','setConfig','Present\x20this\x20document','3102720zCJjmE','_stopFollowing','LIVESHARE_REQUEST_HOST','disposeWithMe','_uiPartsService','createInstance','shouldShareOperation','current','2748324AabLPn','Start','includes','_startPresenting','next','default','send','forEach','dispose$','1159006lVNGJb','sheet','_handleOffline','stringify','univer-mb-3\x20univer-w-full\x20univer-text-sm','getTypeOfUnitDisposed$','getUnitId','_injector','UNIVER_LIVE_SHARE_PLUGIN','memberID','getInitialStates','Stop\x20following','_startFollowing','complete','requireSession','Start\x20following','startFollowing','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','function','_handleNewHost','registerSharedOperation','You\x27are\x20offline.','add','find','_sharedOperations','SAME_OPERATION_SHARE_INTERVAL','_mountLiveShare','text','toPrimitive','_unitID','getLiveShareCoordinator','idle','OFFLINE','_reporters','unitId','pluginName','type','defineProperty','subscribe','version','unsubscribe','univer-size-4','button','getTypeOfUnitAdded$','HEADER_MENU','_commandService','_configService','getCurrentTypeOfUnit$','string','onCommandExecuted','You\x27re\x20presenting\x20the\x20document'];_0x59c0=function(){return _0x24f3da;};return _0x59c0();}import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x287f77){'@babel/helpers - typeof';const _0x31c33d=_0x4fca;return _typeof=_0x31c33d(0x226)==typeof Symbol&&_0x31c33d(0x1d2)==typeof Symbol['iterator']?function(_0x4f48ec){return typeof _0x4f48ec;}:function(_0x15e04f){const _0x125810=_0x31c33d;return _0x15e04f&&_0x125810(0x226)==typeof Symbol&&_0x15e04f[_0x125810(0x253)]===Symbol&&_0x15e04f!==Symbol['prototype']?_0x125810(0x1d2):typeof _0x15e04f;},_typeof(_0x287f77);}function toPrimitive(_0x281270,_0x5ab4b5){const _0x3e020f=_0x4fca;if('object'!=_typeof(_0x281270)||!_0x281270)return _0x281270;var _0x4de7cd=_0x281270[Symbol[_0x3e020f(0x230)]];if(void 0x0!==_0x4de7cd){var _0x995c2=_0x4de7cd['call'](_0x281270,_0x5ab4b5||_0x3e020f(0x210));if(_0x3e020f(0x1ea)!=_typeof(_0x995c2))return _0x995c2;throw new TypeError(_0x3e020f(0x225));}return(_0x3e020f(0x244)===_0x5ab4b5?String:Number)(_0x281270);}function toPropertyKey(_0x263b0e){const _0x3b6256=_0x4fca;var _0x1fd35b=toPrimitive(_0x263b0e,_0x3b6256(0x244));return'symbol'==_typeof(_0x1fd35b)?_0x1fd35b:_0x1fd35b+'';}function _defineProperty(_0x8dd6d8,_0x1736e8,_0x4bf663){const _0x506b26=_0x4fca;return(_0x1736e8=toPropertyKey(_0x1736e8))in _0x8dd6d8?Object[_0x506b26(0x239)](_0x8dd6d8,_0x1736e8,{'value':_0x4bf663,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x8dd6d8[_0x1736e8]=_0x4bf663,_0x8dd6d8;}var LiveShareService=class extends Disposable{constructor(..._0x369656){const _0x5cc742=_0x4fca;super(..._0x369656),_defineProperty(this,_0x5cc742(0x22c),new Set()),_defineProperty(this,_0x5cc742(0x235),new Set());}[_0x5be165(0x228)](_0x11ad02){const _0xf471ac=_0x5be165;return this[_0xf471ac(0x22c)][_0xf471ac(0x22a)](_0x11ad02),toDisposable(()=>this[_0xf471ac(0x22c)][_0xf471ac(0x1cc)](_0x11ad02));}[_0x5be165(0x1e6)](_0x39eca0){const _0x3ab20b=_0x5be165;return this[_0x3ab20b(0x235)][_0x3ab20b(0x22a)](_0x39eca0),toDisposable(()=>this[_0x3ab20b(0x235)][_0x3ab20b(0x1cc)](_0x39eca0));}[_0x5be165(0x209)](_0x38ccf6){const _0x5a1352=_0x5be165;return this['_sharedOperations'][_0x5a1352(0x1f6)](_0x38ccf6);}[_0x5be165(0x21e)](_0x3e376a){const _0x22340c=_0x5be165;return Array[_0x22340c(0x1ef)](this['_reporters'])[_0x22340c(0x1dc)](_0x287b0b=>_0x287b0b(_0x3e376a));}};function __decorateParam(_0x4070a8,_0x22e655){return function(_0x19361b,_0x22e499){_0x22e655(_0x19361b,_0x22e499,_0x4070a8);};}function __decorate(_0x5d0e82,_0x36becb,_0x1c56fc,_0x21a6cb){const _0x207949=_0x5be165;var _0x17c06d=arguments[_0x207949(0x1d6)],_0x45b5cf=_0x17c06d<0x3?_0x36becb:_0x21a6cb===null?_0x21a6cb=Object[_0x207949(0x1de)](_0x36becb,_0x1c56fc):_0x21a6cb,_0x2b6837;if(typeof Reflect===_0x207949(0x1ea)&&typeof Reflect[_0x207949(0x1db)]==='function')_0x45b5cf=Reflect['decorate'](_0x5d0e82,_0x36becb,_0x1c56fc,_0x21a6cb);else{for(var _0x331844=_0x5d0e82[_0x207949(0x1d6)]-0x1;_0x331844>=0x0;_0x331844--)if(_0x2b6837=_0x5d0e82[_0x331844])_0x45b5cf=(_0x17c06d<0x3?_0x2b6837(_0x45b5cf):_0x17c06d>0x3?_0x2b6837(_0x36becb,_0x1c56fc,_0x45b5cf):_0x2b6837(_0x36becb,_0x1c56fc))||_0x45b5cf;}return _0x17c06d>0x3&&_0x45b5cf&&Object[_0x207949(0x239)](_0x36becb,_0x1c56fc,_0x45b5cf),_0x45b5cf;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x3748fe,_0x252440,_0x1d5cd4){const _0x1dbd1a=_0x5be165;super(),this['_univerInstanceService']=_0x3748fe,this[_0x1dbd1a(0x21b)]=_0x252440,this[_0x1dbd1a(0x1ed)]=_0x1d5cd4,_defineProperty(this,_0x1dbd1a(0x1fe),new Map()),this[_0x1dbd1a(0x247)]();}async['getLiveShareCoordinator'](_0x471f7a){const _0x1d1c09=_0x5be165;if(!this['_entities'][_0x1d1c09(0x1f6)](_0x471f7a))await this[_0x1d1c09(0x1d4)](_0x471f7a);return this[_0x1d1c09(0x1fe)][_0x1d1c09(0x1ca)](_0x471f7a);}[_0x5be165(0x1c1)](_0x38ec36){const _0x523381=_0x5be165;var _0x26d35f;return(_0x26d35f=this['_entities'][_0x523381(0x1ca)](_0x38ec36))!==null&&_0x26d35f!==void 0x0?_0x26d35f:null;}[_0x5be165(0x247)](){const _0x8e82bb=_0x5be165;this['_univerInstanceService'][_0x8e82bb(0x23f)](UniverInstanceType[_0x8e82bb(0x200)])[_0x8e82bb(0x1e8)](takeUntil(this['dispose$']))[_0x8e82bb(0x23a)](async _0x1096b1=>{const _0x3bb56a=_0x8e82bb,_0x56eca7=_0x1096b1[_0x3bb56a(0x1e3)][_0x3bb56a(0x21a)]();if(this[_0x3bb56a(0x1fe)]['has'](_0x56eca7))return;this[_0x3bb56a(0x1d4)](_0x56eca7);}),this[_0x8e82bb(0x251)][_0x8e82bb(0x219)](UniverInstanceType['UNIVER_SHEET'])[_0x8e82bb(0x1e8)](takeUntil(this['dispose$']))[_0x8e82bb(0x23a)](_0x1e2faf=>{const _0xea3819=_0x8e82bb,_0x27229a=_0x1e2faf['getUnitId'](),_0x180433=this[_0xea3819(0x1fe)][_0xea3819(0x1ca)](_0x27229a);_0x180433===null||_0x180433===void 0x0||_0x180433['dispose']();});}async['_startLiveShareCoordinator'](_0x2129dd){const _0x444357=_0x5be165,_0x1d4e35=await this['_collabSessionService'][_0x444357(0x222)](_0x2129dd),_0xb30aa=this['_injector'][_0x444357(0x208)](LiveShareCoordinator,_0x2129dd,_0x1d4e35);return _0xb30aa[_0x444357(0x1cf)](),this['_entities']['set'](_0x2129dd,_0xb30aa),_0xb30aa;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0x11daed){const _0x55288b=_0x5be165;return _0x11daed[_0x55288b(0x234)]=_0x55288b(0x1e2),_0x11daed[_0x55288b(0x1c5)]=_0x55288b(0x233),_0x11daed[_0x55288b(0x1e9)]='following',_0x11daed[_0x55288b(0x1ee)]='not-following',_0x11daed[_0x55288b(0x254)]=_0x55288b(0x24d),_0x11daed;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x5be165(0x22d),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get[_0x5be165(0x24c)](){const _0x11187a=_0x5be165;return this[_0x11187a(0x249)][_0x11187a(0x1c3)]();}constructor(_0x578a20,_0x128d95,_0x1d6215,_0x4648b3,_0x4ef5d2){const _0x1ffea0=_0x5be165;super(),this[_0x1ffea0(0x231)]=_0x578a20,this[_0x1ffea0(0x1c9)]=_0x128d95,this[_0x1ffea0(0x242)]=_0x1d6215,this['_liveShareService']=_0x4648b3,this['_commandService']=_0x4ef5d2,_defineProperty(this,'_status$',new BehaviorSubject('idle')),_defineProperty(this,_0x1ffea0(0x248),this[_0x1ffea0(0x249)]['asObservable']()),_defineProperty(this,_0x1ffea0(0x247),![]),_defineProperty(this,'_commandDisposable',null),_defineProperty(this,'_presenter',null);}[_0x5be165(0x256)](){const _0x3c7480=_0x5be165;var _0xa4e82c;(_0xa4e82c=this[_0x3c7480(0x1f3)])===null||_0xa4e82c===void 0x0||_0xa4e82c[_0x3c7480(0x256)](),this[_0x3c7480(0x249)][_0x3c7480(0x20f)](_0x3c7480(0x233)),this[_0x3c7480(0x249)][_0x3c7480(0x221)]();}[_0x5be165(0x257)](){const _0x1bb4c5=_0x5be165;return this[_0x1bb4c5(0x24c)];}[_0x5be165(0x1cf)](){const _0x29bd97=_0x5be165;if(this['_init'])return;this['_init']=!![],this[_0x29bd97(0x1c9)]['sessionStatus$'][_0x29bd97(0x1e8)](takeUntil(this['dispose$']))[_0x29bd97(0x23a)](_0x2d08c1=>{const _0x38fdf3=_0x29bd97;switch(_0x2d08c1){case SessionStatus[_0x38fdf3(0x234)]:this[_0x38fdf3(0x216)]();break;case SessionStatus['ONLINE']:this[_0x38fdf3(0x1f2)]();break;default:}}),this['_collabSession'][_0x29bd97(0x1d8)][_0x29bd97(0x1e8)](takeUntil(this[_0x29bd97(0x213)]))['subscribe'](_0x25bf34=>{const _0x3ff15a=_0x29bd97,{eventID:_0x4e0894}=_0x25bf34;switch(_0x4e0894){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x3ff15a(0x227)](_0x25bf34);break;case CollaborationEvent['LIVESHARE_OPERATION']:this[_0x3ff15a(0x1f7)](_0x25bf34);break;case CollaborationEvent[_0x3ff15a(0x1c2)]:this[_0x3ff15a(0x1e1)]();break;case CollaborationEvent[_0x3ff15a(0x1fd)]:this[_0x3ff15a(0x1eb)](_0x25bf34);break;default:}});}['tryStartPresenting'](){const _0x1cd8da=_0x5be165;this['_collabSession'][_0x1cd8da(0x211)]({'eventID':CollaborationEvent[_0x1cd8da(0x205)],'data':{'unitID':this[_0x1cd8da(0x231)],'userID':this[_0x1cd8da(0x1c9)][_0x1cd8da(0x1d5)]()}},this['_unitID']);}[_0x5be165(0x1c4)](){const _0x50a298=_0x5be165;this[_0x50a298(0x24c)]==='presenting'&&(this[_0x50a298(0x249)]['next']('idle'),this[_0x50a298(0x1c9)][_0x50a298(0x211)]({'eventID':CollaborationEvent[_0x50a298(0x1c2)],'data':{'unitID':this[_0x50a298(0x231)]}},this['_unitID']));}[_0x5be165(0x224)](){const _0x50d594=_0x5be165;if(this[_0x50d594(0x24c)]!==_0x50d594(0x1d7))return;this[_0x50d594(0x249)]['next']('following'),this[_0x50d594(0x220)]();}[_0x5be165(0x24f)](){const _0x19677c=_0x5be165;if(this[_0x19677c(0x24c)]!==_0x19677c(0x1d0))return;this[_0x19677c(0x204)]();}[_0x5be165(0x227)](_0x531f3e){const _0x4de19e=_0x5be165,{presenter:_0x3e8d38}=_0x531f3e[_0x4de19e(0x1f4)],_0x32469d=this['_collabSession'][_0x4de19e(0x1d5)]();this[_0x4de19e(0x1fa)]=_0x3e8d38;if(_0x3e8d38===_0x32469d)this[_0x4de19e(0x204)](),this[_0x4de19e(0x20e)]();else this[_0x4de19e(0x24c)]!==_0x4de19e(0x1d7)&&(this['_stopPresenting'](),this['_startFollowing']());}['_fetchOperations'](){const _0x37f31a=_0x5be165,_0x577b7c={'eventID':CollaborationEvent[_0x37f31a(0x255)]};this[_0x37f31a(0x1c9)]['send'](_0x577b7c,this[_0x37f31a(0x231)]);}[_0x5be165(0x1e1)](){const _0x464fc1=_0x5be165;this[_0x464fc1(0x1fa)]=null;if(this[_0x464fc1(0x24c)]!=='presenting')this[_0x464fc1(0x1bf)]();}['_handleNewChangeSets'](_0x10fbbc){const _0x21d838=_0x5be165;if(this[_0x21d838(0x24c)]==='following'&&this['_presenter']===_0x10fbbc[_0x21d838(0x1f4)][_0x21d838(0x21d)]){const _0x53ef00=parseProtocolChangeset(_0x10fbbc[_0x21d838(0x1f4)])[_0x21d838(0x1e0)][_0x21d838(0x1ff)]()[_0x21d838(0x22b)](_0x257818=>_0x257818['id']===InsertSheetMutation['id']);if(_0x53ef00){const _0x1aa63=_0x53ef00[_0x21d838(0x1dd)][_0x21d838(0x236)],_0x158abd=_0x53ef00['params'][_0x21d838(0x215)]['id'];setTimeout(()=>{const _0x4ac1f0=_0x21d838;this[_0x4ac1f0(0x241)][_0x4ac1f0(0x1f5)](SetWorksheetActiveOperation['id'],{'unitId':_0x1aa63,'subUnitId':_0x158abd},{'fromCollab':!![]});});}}}[_0x5be165(0x20e)](){const _0x3a82f1=_0x5be165;this['_status$'][_0x3a82f1(0x20f)](_0x3a82f1(0x24d));const _0x3b7e37=new Map(),_0x5a8d91=this[_0x3a82f1(0x1f3)]=new DisposableCollection();_0x5a8d91[_0x3a82f1(0x22a)](toDisposable(()=>{const _0x518d1a=_0x3a82f1;_0x3b7e37[_0x518d1a(0x212)](_0x4e6b97=>_0x4e6b97[_0x518d1a(0x221)]()),_0x3b7e37[_0x518d1a(0x1d9)]();})),_0x5a8d91[_0x3a82f1(0x22a)](this['_commandService'][_0x3a82f1(0x245)](_0x329ecb=>{const _0x4315c6=_0x3a82f1;if(_0x329ecb[_0x4315c6(0x238)]!==CommandType[_0x4315c6(0x1ce)]||!this['_liveShareService']['shouldShareOperation'](_0x329ecb['id']))return;const {id:_0x585d7d}=_0x329ecb;let _0x5d64c6;if(!_0x3b7e37[_0x4315c6(0x1f6)](_0x585d7d)){var _0x4be7a7;_0x5d64c6=new Subject(),_0x3b7e37['set'](_0x585d7d,_0x5d64c6),_0x5d64c6[_0x4315c6(0x1e8)](throttleTime((_0x4be7a7=this[_0x4315c6(0x242)][_0x4315c6(0x1be)](_0x4315c6(0x22d)))!==null&&_0x4be7a7!==void 0x0?_0x4be7a7:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x4315c6(0x23a)](_0x29a891=>{const _0x31ea28=_0x4315c6;this[_0x31ea28(0x1c9)][_0x31ea28(0x211)]({'eventID':CollaborationEvent['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x31ea28(0x231)],'operations':{[_0x29a891['id']]:{'id':_0x29a891['id'],'params':JSON['stringify'](_0x29a891['params'])}}}},this['_unitID']);});}else _0x5d64c6=_0x3b7e37[_0x4315c6(0x1ca)](_0x585d7d);_0x5d64c6[_0x4315c6(0x20f)](_0x329ecb);})),this[_0x3a82f1(0x1e4)]['getInitialStates'](this[_0x3a82f1(0x231)])[_0x3a82f1(0x212)](_0x3aea65=>this[_0x3a82f1(0x1c9)][_0x3a82f1(0x211)]({'eventID':CollaborationEvent['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0x3aea65['id']]:{'id':_0x3aea65['id'],'params':JSON[_0x3a82f1(0x217)](_0x3aea65[_0x3a82f1(0x1dd)])}}}},this[_0x3a82f1(0x231)]));}['_stopPresenting'](){const _0x2e26c7=_0x5be165;var _0x3ff1d7;this['_status$'][_0x2e26c7(0x20f)](_0x2e26c7(0x233)),(_0x3ff1d7=this[_0x2e26c7(0x1f3)])===null||_0x3ff1d7===void 0x0||_0x3ff1d7['dispose'](),this[_0x2e26c7(0x1f3)]=null;}['_startFollowing'](){const _0x4e0b29=_0x5be165;var _0x1b4d30;(_0x1b4d30=this[_0x4e0b29(0x1f3)])===null||_0x1b4d30===void 0x0||_0x1b4d30[_0x4e0b29(0x256)](),this[_0x4e0b29(0x249)][_0x4e0b29(0x20f)](_0x4e0b29(0x1d0));}[_0x5be165(0x1bf)](){const _0x4d3699=_0x5be165;var _0x9f4aac;this['_status$'][_0x4d3699(0x20f)](_0x4d3699(0x233)),(_0x9f4aac=this[_0x4d3699(0x1f3)])===null||_0x9f4aac===void 0x0||_0x9f4aac['dispose'](),this[_0x4d3699(0x1f3)]=null;}[_0x5be165(0x204)](){const _0x321f3c=_0x5be165;var _0x769bb7;this[_0x321f3c(0x249)][_0x321f3c(0x20f)](_0x321f3c(0x1d7)),(_0x769bb7=this['_commandDisposable'])===null||_0x769bb7===void 0x0||_0x769bb7[_0x321f3c(0x256)]();}['_handleOperation'](_0x58666b){const _0x13f377=_0x5be165;if([_0x13f377(0x24d),_0x13f377(0x1d7),_0x13f377(0x1e2)][_0x13f377(0x20d)](this[_0x13f377(0x24c)]))return;if(!_0x58666b[_0x13f377(0x1f4)][_0x13f377(0x1e5)]||_0x58666b[_0x13f377(0x1f4)]['presenter']===this[_0x13f377(0x1c9)]['getMemberID']())return;if(this[_0x13f377(0x24c)]===_0x13f377(0x233))this[_0x13f377(0x220)]();const _0x3017ee=_0x58666b[_0x13f377(0x1f4)][_0x13f377(0x24e)];Object[_0x13f377(0x1da)](_0x3017ee)[_0x13f377(0x212)](_0x344fff=>{const _0x7e2e81=_0x13f377;this[_0x7e2e81(0x241)]['executeCommand'](_0x344fff['id'],_0x344fff[_0x7e2e81(0x1dd)]?JSON['parse'](_0x344fff[_0x7e2e81(0x1dd)]):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x3f6dc8=_0x5be165;var _0x261b6e;this[_0x3f6dc8(0x249)][_0x3f6dc8(0x20f)](_0x3f6dc8(0x1e2)),(_0x261b6e=this[_0x3f6dc8(0x1f3)])===null||_0x261b6e===void 0x0||_0x261b6e[_0x3f6dc8(0x256)]();}[_0x5be165(0x1f2)](){const _0x2fbf0b=_0x5be165;this[_0x2fbf0b(0x249)]['next'](_0x2fbf0b(0x233)),this['_fetchOperations']();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x5cf6d9=_0x5be165,_0x31ff37=useDependency(LiveShareController),_0xdd83c5=useDependency(IUniverInstanceService),_0xe64d2=useObservable(()=>_0xdd83c5[_0x5cf6d9(0x243)](UniverInstanceType[_0x5cf6d9(0x200)]),void 0x0,![],[]),[_0x393262,_0x67173d]=useState(null),[_0x48a93d,_0x1b8bf6]=useState(_0x5cf6d9(0x233)),_0x20121d=useRef(null);useEffect(()=>{const _0x138429=_0x5cf6d9;if(_0xe64d2)_0x31ff37[_0x138429(0x232)](_0xe64d2[_0x138429(0x21a)]())[_0x138429(0x24a)](_0x1d6069=>{const _0x51b1fc=_0x138429;_0x67173d(_0x1d6069),_0x20121d[_0x51b1fc(0x20a)]=_0x1d6069[_0x51b1fc(0x248)][_0x51b1fc(0x23a)](_0x58b0c2=>{_0x1b8bf6(_0x58b0c2);});});return()=>{const _0x14b56a=_0x138429;var _0x3b7826;(_0x3b7826=_0x20121d[_0x14b56a(0x20a)])===null||_0x3b7826===void 0x0||_0x3b7826[_0x14b56a(0x23c)](),_0x20121d[_0x14b56a(0x20a)]=null;};},[_0xe64d2,_0x31ff37]);if(!_0x393262)return null;return jsx(Dropdown,{'align':_0x5cf6d9(0x1cd),'disabled':_0x48a93d==='offline','className':_0x5cf6d9(0x1f8),'overlay':jsx(LiveShareDropdown,{'status':_0x48a93d,'coordinator':_0x393262}),'children':jsx(_0x5cf6d9(0x23e),{'className':clsx('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x48a93d===_0x5cf6d9(0x1e2),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x48a93d!==_0x5cf6d9(0x1e2)}),'type':'button','children':jsx(LiveShareIcon,{'className':_0x5cf6d9(0x23d)})})});}function LiveShareDropdown(_0x4bf670){const _0x2e39bc=_0x5be165,{status:_0x4b19a7,coordinator:_0x389698}=_0x4bf670;switch(_0x4b19a7){case'idle':return jsx(Idle,{'coordinator':_0x389698});case _0x2e39bc(0x1d0):return jsx(Following,{'coordinator':_0x389698});case _0x2e39bc(0x1d7):return jsx(NotFollowing,{'coordinator':_0x389698});case _0x2e39bc(0x1e2):return jsx(Offline,{});case'presenting':return jsx(Presenting,{'coordinator':_0x389698});default:return null;}}function _0x4fca(_0x53ca86,_0x28f239){_0x53ca86=_0x53ca86-0x1be;const _0x59c08f=_0x59c0();let _0x4fcafb=_0x59c08f[_0x53ca86];return _0x4fcafb;}function Idle(_0x5615f2){const _0x214859=_0x5be165,{coordinator:_0x3f59cb}=_0x5615f2;return jsxs(Fragment,{'children':[jsx('div',{'className':_0x214859(0x218),'children':_0x214859(0x202)}),jsx(Button,{'onClick':()=>_0x3f59cb[_0x214859(0x1d1)](),'children':_0x214859(0x20c)})]});}function Following(_0x535c47){const _0x417415=_0x5be165,{coordinator:_0x5a04d4}=_0x535c47;return jsxs(Fragment,{'children':[jsx(_0x417415(0x24b),{'className':_0x417415(0x218),'children':_0x417415(0x1f1)}),jsx(Button,{'onClick':()=>_0x5a04d4['stopFollowing'](),'children':_0x417415(0x21f)})]});}function NotFollowing(_0x531b8f){const _0xc5e6a0=_0x5be165,{coordinator:_0x5405ae}=_0x531b8f;return jsxs(Fragment,{'children':[jsx(_0xc5e6a0(0x24b),{'className':_0xc5e6a0(0x218),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),jsx(Button,{'variant':_0xc5e6a0(0x22f),'onClick':()=>_0x5405ae[_0xc5e6a0(0x224)](),'children':_0xc5e6a0(0x223)})]});}function Presenting(_0x2f1771){const _0x27bf36=_0x5be165,{coordinator:_0x5de55d}=_0x2f1771;return jsxs(Fragment,{'children':[jsx(_0x27bf36(0x24b),{'className':_0x27bf36(0x218),'children':_0x27bf36(0x246)}),jsx(Button,{'variant':_0x27bf36(0x210),'onClick':()=>_0x5de55d[_0x27bf36(0x1c4)](),'children':_0x27bf36(0x1cb)})]});}function Offline(){const _0x2122ee=_0x5be165;return jsx(Fragment,{'children':_0x2122ee(0x229)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0x4a6fa8,_0x113278){const _0x56e126=_0x5be165;super(),this[_0x56e126(0x21b)]=_0x4a6fa8,this[_0x56e126(0x207)]=_0x113278,this['_mountLiveShare']();}[_0x5be165(0x22e)](){const _0x23b495=_0x5be165;this['disposeWithMe'](this['_uiPartsService'][_0x23b495(0x1fc)](BuiltInUIPart[_0x23b495(0x240)],()=>connectInjector(LiveShare,this[_0x23b495(0x21b)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x5be165(0x1c0),version=_0x5be165(0x250);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x5be165(0x1fb),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x57fc86){const _0x2992b9=_0x5be165;super(),this[_0x2992b9(0x1e4)]=_0x57fc86,this[_0x2992b9(0x247)]();}[_0x5be165(0x247)](){const _0x2ba892=_0x5be165;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x2ba892(0x212)](_0x483e55=>{const _0x24a2b6=_0x2ba892;this[_0x24a2b6(0x206)](this['_liveShareService']['registerSharedOperation'](_0x483e55));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x78ca72=defaultPluginConfig,_0x317b09,_0xd14575){const _0x116bbf=_0x5be165;super(),this[_0x116bbf(0x1f0)]=_0x78ca72,this[_0x116bbf(0x21b)]=_0x317b09,this[_0x116bbf(0x242)]=_0xd14575;const {..._0x2e998a}=merge({},defaultPluginConfig,this[_0x116bbf(0x1f0)]);this[_0x116bbf(0x242)][_0x116bbf(0x201)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x2e998a);}[_0x5be165(0x1c7)](){const _0x4984fb=_0x5be165;registerDependencies(this[_0x4984fb(0x21b)],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x4984fb(0x1f0)][_0x4984fb(0x1c6)])),touchDependencies(this[_0x4984fb(0x21b)],[[LiveShareCoreExtensionsController]]);}[_0x5be165(0x1df)](){touchDependencies(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x5be165(0x238),UniverInstanceType[_0x5be165(0x252)]),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x237),_0x5be165(0x21c)),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x1d3),name),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x23b),version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
package/lib/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x16bca1=_0x2d90;(function(_0x12b1ef,_0x243f46){const _0x1422c2=_0x2d90,_0x29111d=_0x12b1ef();while(!![]){try{const _0x100003=-parseInt(_0x1422c2(0x1df))/0x1*(-parseInt(_0x1422c2(0x1e5))/0x2)+parseInt(_0x1422c2(0x1ed))/0x3+-parseInt(_0x1422c2(0x1e8))/0x4*(-parseInt(_0x1422c2(0x1f3))/0x5)+parseInt(_0x1422c2(0x1e3))/0x6*(parseInt(_0x1422c2(0x1fc))/0x7)+-parseInt(_0x1422c2(0x1ec))/0x8*(-parseInt(_0x1422c2(0x1fa))/0x9)+-parseInt(_0x1422c2(0x1ea))/0xa+parseInt(_0x1422c2(0x1f9))/0xb*(-parseInt(_0x1422c2(0x1f2))/0xc);if(_0x100003===_0x243f46)break;else _0x29111d['push'](_0x29111d['shift']());}catch(_0x111b63){_0x29111d['push'](_0x29111d['shift']());}}}(_0x442f,0x19064));import{LiveShareController,LiveShareStatus}from'@univerjs-pro/live-share';import{IUniverInstanceService,UniverInstanceType}from'@univerjs/core';import{FEnum,FUniver}from'@univerjs/core/facade';function _0x442f(){const _0x3a07ea=['getLiveShareStatus','iterator','4JDaAwc','call','1295170nmvejY','startFollowing','6088PvrQyQ','273675KjVYRs','extend','stopFollowing','symbol','toPrimitive','540RlcsCr','347855aVyHhT','string','tryStartPresenting','stopPresenting','object','_injector','71379LBWnNr','1476uuFPPd','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','112AHfLdZ','getLiveShareCoordinatorSync','constructor','No\x20active\x20workbook\x20found.','UNIVER_SHEET','LiveShareStatusEnum','get','IDLE','function','getCurrentUnitOfType','startPresenting','prototype','24862QKaMfR','defineProperty','getUnitId','_liveShareController','42792ONUVyq','getStatus','10rqRFfb'];_0x442f=function(){return _0x3a07ea;};return _0x442f();}function _typeof(_0x5737ee){'@babel/helpers - typeof';const _0x608263=_0x2d90;return _typeof=_0x608263(0x204)==typeof Symbol&&_0x608263(0x1f0)==typeof Symbol[_0x608263(0x1e7)]?function(_0x1b8331){return typeof _0x1b8331;}:function(_0x19665b){const _0x1cbd98=_0x608263;return _0x19665b&&'function'==typeof Symbol&&_0x19665b[_0x1cbd98(0x1fe)]===Symbol&&_0x19665b!==Symbol[_0x1cbd98(0x207)]?_0x1cbd98(0x1f0):typeof _0x19665b;},_typeof(_0x5737ee);}function toPrimitive(_0x5b7ad4,_0x18c827){const _0x5a3642=_0x2d90;if('object'!=_typeof(_0x5b7ad4)||!_0x5b7ad4)return _0x5b7ad4;var _0x6a5848=_0x5b7ad4[Symbol[_0x5a3642(0x1f1)]];if(void 0x0!==_0x6a5848){var _0x2981c8=_0x6a5848[_0x5a3642(0x1e9)](_0x5b7ad4,_0x18c827||'default');if(_0x5a3642(0x1f7)!=_typeof(_0x2981c8))return _0x2981c8;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5a3642(0x1f4)===_0x18c827?String:Number)(_0x5b7ad4);}function toPropertyKey(_0x382b9c){const _0x45af05=_0x2d90;var _0x8acb82=toPrimitive(_0x382b9c,_0x45af05(0x1f4));return _0x45af05(0x1f0)==_typeof(_0x8acb82)?_0x8acb82:_0x8acb82+'';}function _0x2d90(_0x1893c7,_0x119f13){_0x1893c7=_0x1893c7-0x1df;const _0x442fa3=_0x442f();let _0x2d90f4=_0x442fa3[_0x1893c7];return _0x2d90f4;}function _defineProperty(_0xbe67c4,_0x4e6e47,_0x34bdf1){const _0x1240a4=_0x2d90;return(_0x4e6e47=toPropertyKey(_0x4e6e47))in _0xbe67c4?Object[_0x1240a4(0x1e0)](_0xbe67c4,_0x4e6e47,{'value':_0x34bdf1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xbe67c4[_0x4e6e47]=_0x34bdf1,_0xbe67c4;}var FUniverLiveShareMixin=class extends FUniver{constructor(..._0x370819){const _0x41fde7=_0x2d90;super(..._0x370819),_defineProperty(this,_0x41fde7(0x1e2),void 0x0);}['_initialize'](_0x51ef14){this['_liveShareController']=_0x51ef14['get'](LiveShareController);}[_0x16bca1(0x1e6)](){const _0x379959=_0x16bca1;var _0x10c9b1;const _0x4ddabd=this[_0x379959(0x1f8)]['get'](IUniverInstanceService)[_0x379959(0x205)](UniverInstanceType[_0x379959(0x200)]);if(!_0x4ddabd)throw new Error('No\x20active\x20workbook\x20found.');const _0x228ad4=_0x4ddabd[_0x379959(0x1e1)](),_0x2c816d=this[_0x379959(0x1e2)][_0x379959(0x1fd)](_0x228ad4);return(_0x10c9b1=_0x2c816d===null||_0x2c816d===void 0x0?void 0x0:_0x2c816d[_0x379959(0x1e4)]())!==null&&_0x10c9b1!==void 0x0?_0x10c9b1:LiveShareStatus[_0x379959(0x203)];}['startFollowing'](){const _0x3e9da4=_0x16bca1,_0x1d9a19=this['_injector']['get'](IUniverInstanceService)[_0x3e9da4(0x205)](UniverInstanceType[_0x3e9da4(0x200)]);if(!_0x1d9a19)throw new Error(_0x3e9da4(0x1ff));const _0x57f359=_0x1d9a19[_0x3e9da4(0x1e1)](),_0x2fb187=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x57f359);if(!_0x2fb187)throw new Error(_0x3e9da4(0x1fb));_0x2fb187[_0x3e9da4(0x1eb)]();}[_0x16bca1(0x1ef)](){const _0x4908ab=_0x16bca1,_0x5559c3=this[_0x4908ab(0x1f8)][_0x4908ab(0x202)](IUniverInstanceService)[_0x4908ab(0x205)](UniverInstanceType[_0x4908ab(0x200)]);if(!_0x5559c3)throw new Error(_0x4908ab(0x1ff));const _0x131d15=_0x5559c3[_0x4908ab(0x1e1)](),_0x5b02f2=this['_liveShareController'][_0x4908ab(0x1fd)](_0x131d15);if(!_0x5b02f2)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x5b02f2[_0x4908ab(0x1ef)]();}[_0x16bca1(0x206)](){const _0x5df0c7=_0x16bca1,_0x220bfa=this[_0x5df0c7(0x1f8)][_0x5df0c7(0x202)](IUniverInstanceService)[_0x5df0c7(0x205)](UniverInstanceType[_0x5df0c7(0x200)]);if(!_0x220bfa)throw new Error(_0x5df0c7(0x1ff));const _0x9c4590=_0x220bfa[_0x5df0c7(0x1e1)](),_0x5ac036=this[_0x5df0c7(0x1e2)][_0x5df0c7(0x1fd)](_0x9c4590);if(!_0x5ac036)throw new Error(_0x5df0c7(0x1fb));_0x5ac036[_0x5df0c7(0x1f5)]();}[_0x16bca1(0x1f6)](){const _0x57e635=_0x16bca1,_0x251527=this[_0x57e635(0x1f8)][_0x57e635(0x202)](IUniverInstanceService)['getCurrentUnitOfType'](UniverInstanceType[_0x57e635(0x200)]);if(!_0x251527)throw new Error(_0x57e635(0x1ff));const _0x5d05c7=_0x251527[_0x57e635(0x1e1)](),_0x4ab8f7=this['_liveShareController'][_0x57e635(0x1fd)](_0x5d05c7);if(!_0x4ab8f7)throw new Error(_0x57e635(0x1fb));_0x4ab8f7[_0x57e635(0x1f6)]();}};FUniver['extend'](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends FEnum{get[_0x16bca1(0x201)](){return LiveShareStatus;}};FEnum[_0x16bca1(0x1ee)](FLiveShareEnumMixin);export{};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5cb1(){const _0x2d1a40=['text','ONLINE','_injector','shouldShareOperation','stringify','requireSession','_commandDisposable','following','complete','getMemberID','parse','_configService','Start\x20following','_handleOffline','_config','_stopFollowing','current','_collabSessionService','stopPresenting','onCommandExecuted','UNIVER_SHEET','_commandService','univer-mb-3\x20univer-w-full\x20univer-text-sm','params','LIVESHARE_OPERATION','forEach','getStatus','registerComponent','defineProperty','getTypeOfUnitDisposed$','418IkRyKK','unitId','data','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getLiveShareCoordinator','map','operations','clear','div','FOLLOWING','_startLiveShareCoordinator','registerSharedOperation','getCurrentTypeOfUnit$','dispose$','registerInitialStateReporter','_entities','button','next','startFollowing','640qhoJkr','1557KqMGyG','add','string','values','disposeWithMe','getValue','_presenter','OPERATION','find','_handleOnline','type','68630efiYlv','_startFollowing','You\x27re\x20not\x20following\x20the\x20presenter','setConfig','28035WbchJW','_status','4BMMomR','univer-size-4','live-share.config','LIVESHARE_FETCH_OPERATIONS','packageName','_fetchOperations','includes','getOwnPropertyDescriptor','UNIVER_UNKNOWN','_unitID','delete','Stop\x20following','decorate','PRESENTING','_collabSession','object','1552BKpOmS','onRendered','tryStartPresenting','_init','_liveShareService','default','constructor','asObservable','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','idle','_mountLiveShare','subscribe','pipe','12452817OQvfDo','sheet','_uiPartsService','802812cdkmHA','override','presenting','NOT_FOLLOWING','1KUkuVF','_beIdle','HEADER_MENU','4434hBCYQL','You\x27re\x20following\x20the\x20presenter','_handleNewChangeSets','_sharedOperations','getTypeOfUnitAdded$','set','LIVESHARE_REQUEST_HOST','_startPresenting','offline','has','send','status$','symbol','IDLE','Start','prototype','Stop\x20presenting','length','mutations','_handleTerminate','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','unit','init','0.21.1','_status$','LIVESHARE_TERMINATE','function','pluginName','executeCommand','OFFLINE','end','then','getInitialStates','2402974SZayCS','_reporters','event$','_univerInstanceService','140772TfvTvk','SAME_OPERATION_SHARE_INTERVAL','dispose','get','getUnitId','version'];_0x5cb1=function(){return _0x2d1a40;};return _0x5cb1();}const _0x200f20=_0x566b;(function(_0x11bd50,_0x1c54d5){const _0x16c1ea=_0x566b,_0x579cb3=_0x11bd50();while(!![]){try{const _0x3eb57c=-parseInt(_0x16c1ea(0xe4))/0x1*(-parseInt(_0x16c1ea(0x109))/0x2)+-parseInt(_0x16c1ea(0xe0))/0x3*(-parseInt(_0x16c1ea(0xc0))/0x4)+-parseInt(_0x16c1ea(0xae))/0x5*(-parseInt(_0x16c1ea(0xe7))/0x6)+-parseInt(_0x16c1ea(0xbe))/0x7*(-parseInt(_0x16c1ea(0xd0))/0x8)+-parseInt(_0x16c1ea(0xaf))/0x9*(parseInt(_0x16c1ea(0xba))/0xa)+-parseInt(_0x16c1ea(0x9b))/0xb*(-parseInt(_0x16c1ea(0x10d))/0xc)+-parseInt(_0x16c1ea(0xdd))/0xd;if(_0x3eb57c===_0x1c54d5)break;else _0x579cb3['push'](_0x579cb3['shift']());}catch(_0x248c2f){_0x579cb3['push'](_0x579cb3['shift']());}}}(_0x5cb1,0x9c8c7));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x17acd1){'@babel/helpers - typeof';const _0x135050=_0x566b;return _typeof=_0x135050(0x102)==typeof Symbol&&_0x135050(0xf3)==typeof Symbol['iterator']?function(_0x4568b0){return typeof _0x4568b0;}:function(_0x53de18){const _0x5197ae=_0x135050;return _0x53de18&&_0x5197ae(0x102)==typeof Symbol&&_0x53de18[_0x5197ae(0xd6)]===Symbol&&_0x53de18!==Symbol[_0x5197ae(0xf6)]?_0x5197ae(0xf3):typeof _0x53de18;},_typeof(_0x17acd1);}function toPrimitive(_0x1f1a05,_0x3386ad){const _0x354250=_0x566b;if('object'!=_typeof(_0x1f1a05)||!_0x1f1a05)return _0x1f1a05;var _0x4b88e1=_0x1f1a05[Symbol['toPrimitive']];if(void 0x0!==_0x4b88e1){var _0x5686c6=_0x4b88e1['call'](_0x1f1a05,_0x3386ad||'default');if(_0x354250(0xcf)!=_typeof(_0x5686c6))return _0x5686c6;throw new TypeError(_0x354250(0x9e));}return(_0x354250(0xb1)===_0x3386ad?String:Number)(_0x1f1a05);}function toPropertyKey(_0x2c143c){const _0x22e76f=_0x566b;var _0x3a7c81=toPrimitive(_0x2c143c,'string');return _0x22e76f(0xf3)==_typeof(_0x3a7c81)?_0x3a7c81:_0x3a7c81+'';}function _defineProperty(_0x176bd5,_0x504226,_0x40caba){return(_0x504226=toPropertyKey(_0x504226))in _0x176bd5?Object['defineProperty'](_0x176bd5,_0x504226,{'value':_0x40caba,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x176bd5[_0x504226]=_0x40caba,_0x176bd5;}var LiveShareService=class extends Disposable{constructor(..._0x542958){const _0x540890=_0x566b;super(..._0x542958),_defineProperty(this,_0x540890(0xea),new Set()),_defineProperty(this,_0x540890(0x10a),new Set());}[_0x200f20(0xa6)](_0x182dc4){const _0x25161b=_0x200f20;return this[_0x25161b(0xea)][_0x25161b(0xb0)](_0x182dc4),toDisposable(()=>this[_0x25161b(0xea)][_0x25161b(0xca)](_0x182dc4));}[_0x200f20(0xa9)](_0x2ecc4a){const _0x355d80=_0x200f20;return this[_0x355d80(0x10a)][_0x355d80(0xb0)](_0x2ecc4a),toDisposable(()=>this[_0x355d80(0x10a)][_0x355d80(0xca)](_0x2ecc4a));}['shouldShareOperation'](_0x49d8d6){const _0x2b9a15=_0x200f20;return this[_0x2b9a15(0xea)][_0x2b9a15(0xf0)](_0x49d8d6);}[_0x200f20(0x108)](_0x362375){const _0x59ebf6=_0x200f20;return Array['from'](this['_reporters'])[_0x59ebf6(0xa0)](_0x74021b=>_0x74021b(_0x362375));}};function __decorateParam(_0x2e212f,_0x15ae25){return function(_0x1388c0,_0x3b2063){_0x15ae25(_0x1388c0,_0x3b2063,_0x2e212f);};}function __decorate(_0x22b1e8,_0x9f92d,_0x4ea3f0,_0x3705b9){const _0x415773=_0x200f20;var _0x2aefe6=arguments[_0x415773(0xf8)],_0x2d34ff=_0x2aefe6<0x3?_0x9f92d:_0x3705b9===null?_0x3705b9=Object[_0x415773(0xc7)](_0x9f92d,_0x4ea3f0):_0x3705b9,_0x3b3d0e;if(typeof Reflect===_0x415773(0xcf)&&typeof Reflect[_0x415773(0xcc)]===_0x415773(0x102))_0x2d34ff=Reflect[_0x415773(0xcc)](_0x22b1e8,_0x9f92d,_0x4ea3f0,_0x3705b9);else{for(var _0x3c5b58=_0x22b1e8[_0x415773(0xf8)]-0x1;_0x3c5b58>=0x0;_0x3c5b58--)if(_0x3b3d0e=_0x22b1e8[_0x3c5b58])_0x2d34ff=(_0x2aefe6<0x3?_0x3b3d0e(_0x2d34ff):_0x2aefe6>0x3?_0x3b3d0e(_0x9f92d,_0x4ea3f0,_0x2d34ff):_0x3b3d0e(_0x9f92d,_0x4ea3f0))||_0x2d34ff;}return _0x2aefe6>0x3&&_0x2d34ff&&Object[_0x415773(0x99)](_0x9f92d,_0x4ea3f0,_0x2d34ff),_0x2d34ff;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x36fc88,_0x216847,_0x477cd9){const _0x4d941f=_0x200f20;super(),this[_0x4d941f(0x10c)]=_0x36fc88,this[_0x4d941f(0x7f)]=_0x216847,this[_0x4d941f(0x8e)]=_0x477cd9,_defineProperty(this,_0x4d941f(0xaa),new Map()),this['_init']();}async[_0x200f20(0x9f)](_0x4dddf7){const _0x621173=_0x200f20;if(!this[_0x621173(0xaa)][_0x621173(0xf0)](_0x4dddf7))await this[_0x621173(0xa5)](_0x4dddf7);return this[_0x621173(0xaa)][_0x621173(0x7a)](_0x4dddf7);}['getLiveShareCoordinatorSync'](_0x44930d){const _0x4bc05f=_0x200f20;var _0xb66ff2;return(_0xb66ff2=this[_0x4bc05f(0xaa)][_0x4bc05f(0x7a)](_0x44930d))!==null&&_0xb66ff2!==void 0x0?_0xb66ff2:null;}[_0x200f20(0xd3)](){const _0x1d0eb2=_0x200f20;this[_0x1d0eb2(0x10c)][_0x1d0eb2(0xeb)](UniverInstanceType[_0x1d0eb2(0x91)])[_0x1d0eb2(0xdc)](takeUntil(this[_0x1d0eb2(0xa8)]))[_0x1d0eb2(0xdb)](async _0x543846=>{const _0x1ab6b8=_0x1d0eb2,_0x393127=_0x543846[_0x1ab6b8(0xfd)][_0x1ab6b8(0x7b)]();if(this['_entities'][_0x1ab6b8(0xf0)](_0x393127))return;this[_0x1ab6b8(0xa5)](_0x393127);}),this[_0x1d0eb2(0x10c)][_0x1d0eb2(0x9a)](UniverInstanceType[_0x1d0eb2(0x91)])[_0x1d0eb2(0xdc)](takeUntil(this[_0x1d0eb2(0xa8)]))[_0x1d0eb2(0xdb)](_0x16c875=>{const _0x3f069d=_0x16c875['getUnitId'](),_0x3b904d=this['_entities']['get'](_0x3f069d);_0x3b904d===null||_0x3b904d===void 0x0||_0x3b904d['dispose']();});}async['_startLiveShareCoordinator'](_0x428d37){const _0x391854=_0x200f20,_0x13303d=await this['_collabSessionService'][_0x391854(0x82)](_0x428d37),_0x4236c3=this[_0x391854(0x7f)]['createInstance'](LiveShareCoordinator,_0x428d37,_0x13303d);return _0x4236c3[_0x391854(0xfe)](),this[_0x391854(0xaa)]['set'](_0x428d37,_0x4236c3),_0x4236c3;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0x12884d){const _0x46dc0a=_0x200f20;return _0x12884d[_0x46dc0a(0x105)]=_0x46dc0a(0xef),_0x12884d[_0x46dc0a(0xf4)]=_0x46dc0a(0xd9),_0x12884d['FOLLOWING']=_0x46dc0a(0x84),_0x12884d['NOT_FOLLOWING']='not-following',_0x12884d[_0x46dc0a(0xcd)]=_0x46dc0a(0xe2),_0x12884d;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x200f20(0x10e),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get['_status'](){const _0x4491b3=_0x200f20;return this[_0x4491b3(0x100)][_0x4491b3(0xb4)]();}constructor(_0x1a27d3,_0x31d798,_0x3fa977,_0x202e7c,_0x42a347){const _0x20121d=_0x200f20;super(),this[_0x20121d(0xc9)]=_0x1a27d3,this[_0x20121d(0xce)]=_0x31d798,this[_0x20121d(0x88)]=_0x3fa977,this[_0x20121d(0xd4)]=_0x202e7c,this['_commandService']=_0x42a347,_defineProperty(this,_0x20121d(0x100),new BehaviorSubject(LiveShareStatus[_0x20121d(0xf4)])),_defineProperty(this,_0x20121d(0xf2),this[_0x20121d(0x100)][_0x20121d(0xd7)]()),_defineProperty(this,'_init',![]),_defineProperty(this,_0x20121d(0x83),null),_defineProperty(this,_0x20121d(0xb5),null);}[_0x200f20(0x10f)](){const _0x87fa8d=_0x200f20;var _0x4ab4bf;(_0x4ab4bf=this[_0x87fa8d(0x83)])===null||_0x4ab4bf===void 0x0||_0x4ab4bf[_0x87fa8d(0x10f)](),this[_0x87fa8d(0x100)][_0x87fa8d(0xac)](LiveShareStatus[_0x87fa8d(0xf4)]),this[_0x87fa8d(0x100)][_0x87fa8d(0x85)]();}[_0x200f20(0x97)](){return this['_status'];}['init'](){const _0x198982=_0x200f20;if(this['_init'])return;this[_0x198982(0xd3)]=!![],this['_collabSession']['sessionStatus$'][_0x198982(0xdc)](takeUntil(this[_0x198982(0xa8)]))[_0x198982(0xdb)](_0x4ebfd4=>{const _0x165f2c=_0x198982;switch(_0x4ebfd4){case SessionStatus['OFFLINE']:this[_0x165f2c(0x8a)]();break;case SessionStatus[_0x165f2c(0x7e)]:this[_0x165f2c(0xb8)]();break;default:}}),this['_collabSession'][_0x198982(0x10b)][_0x198982(0xdc)](takeUntil(this[_0x198982(0xa8)]))[_0x198982(0xdb)](_0x444caa=>{const _0x20b76c=_0x198982,{eventID:_0x1d8ff5}=_0x444caa;switch(_0x1d8ff5){case CollaborationEvent['LIVESHARE_NEW_HOST']:this['_handleNewHost'](_0x444caa);break;case CollaborationEvent[_0x20b76c(0x95)]:this['_handleOperation'](_0x444caa);break;case CollaborationEvent[_0x20b76c(0x101)]:this[_0x20b76c(0xfa)]();break;case CollaborationEvent['NEW_CHANGESETS']:this[_0x20b76c(0xe9)](_0x444caa);break;default:}});}[_0x200f20(0xd2)](){const _0x12d908=_0x200f20;this['_collabSession'][_0x12d908(0xf1)]({'eventID':CollaborationEvent[_0x12d908(0xed)],'data':{'unitID':this['_unitID'],'userID':this[_0x12d908(0xce)][_0x12d908(0x86)]()}},this['_unitID']);}[_0x200f20(0x8f)](){const _0x1c8f7d=_0x200f20;this[_0x1c8f7d(0xbf)]===LiveShareStatus[_0x1c8f7d(0xcd)]&&(this[_0x1c8f7d(0x100)][_0x1c8f7d(0xac)](LiveShareStatus['IDLE']),this['_collabSession'][_0x1c8f7d(0xf1)]({'eventID':CollaborationEvent['LIVESHARE_TERMINATE'],'data':{'unitID':this[_0x1c8f7d(0xc9)]}},this[_0x1c8f7d(0xc9)]));}[_0x200f20(0xad)](){const _0x5128e8=_0x200f20;if(this[_0x5128e8(0xbf)]!==LiveShareStatus[_0x5128e8(0xe3)])return;this[_0x5128e8(0x100)]['next'](LiveShareStatus['FOLLOWING']),this[_0x5128e8(0xbb)]();}['stopFollowing'](){const _0x2afda5=_0x200f20;if(this[_0x2afda5(0xbf)]!==LiveShareStatus[_0x2afda5(0xa4)])return;this['_stopFollowing']();}['_handleNewHost'](_0x13a8d9){const _0x20f064=_0x200f20,{presenter:_0x3ad71f}=_0x13a8d9['data'],_0x1209c1=this['_collabSession'][_0x20f064(0x86)]();this['_presenter']=_0x3ad71f;if(_0x3ad71f===_0x1209c1)this[_0x20f064(0x8c)](),this[_0x20f064(0xee)]();else this[_0x20f064(0xbf)]!==LiveShareStatus[_0x20f064(0xe3)]&&(this['_stopPresenting'](),this[_0x20f064(0xbb)]());}[_0x200f20(0xc5)](){const _0x3b021e=_0x200f20,_0x182016={'eventID':CollaborationEvent[_0x3b021e(0xc3)]};this[_0x3b021e(0xce)][_0x3b021e(0xf1)](_0x182016,this['_unitID']);}[_0x200f20(0xfa)](){const _0x3d6ad3=_0x200f20;this[_0x3d6ad3(0xb5)]=null;if(this[_0x3d6ad3(0xbf)]!==LiveShareStatus[_0x3d6ad3(0xcd)])this['_beIdle']();}[_0x200f20(0xe9)](_0x13c401){const _0x29cb30=_0x200f20;if(this[_0x29cb30(0xbf)]===LiveShareStatus['FOLLOWING']&&this[_0x29cb30(0xb5)]===_0x13c401[_0x29cb30(0x9d)][_0x29cb30(0xfc)]){const _0x3927f3=parseProtocolChangeset(_0x13c401['data'])[_0x29cb30(0xf9)]['reverse']()[_0x29cb30(0xb7)](_0x12454c=>_0x12454c['id']===InsertSheetMutation['id']);if(_0x3927f3){const _0x17d585=_0x3927f3[_0x29cb30(0x94)][_0x29cb30(0x9c)],_0x63333c=_0x3927f3[_0x29cb30(0x94)][_0x29cb30(0xde)]['id'];setTimeout(()=>{const _0x56cf02=_0x29cb30;this[_0x56cf02(0x92)]['executeCommand'](SetWorksheetActiveOperation['id'],{'unitId':_0x17d585,'subUnitId':_0x63333c},{'fromCollab':!![]});});}}}[_0x200f20(0xee)](){const _0x13653b=_0x200f20;this[_0x13653b(0x100)][_0x13653b(0xac)](LiveShareStatus[_0x13653b(0xcd)]);const _0x5a156a=new Map(),_0xecb2e9=this[_0x13653b(0x83)]=new DisposableCollection();_0xecb2e9[_0x13653b(0xb0)](toDisposable(()=>{const _0x4a86be=_0x13653b;_0x5a156a['forEach'](_0x36f47c=>_0x36f47c[_0x4a86be(0x85)]()),_0x5a156a[_0x4a86be(0xa2)]();})),_0xecb2e9[_0x13653b(0xb0)](this[_0x13653b(0x92)][_0x13653b(0x90)](_0x748369=>{const _0x5706d2=_0x13653b;if(_0x748369[_0x5706d2(0xb9)]!==CommandType[_0x5706d2(0xb6)]||!this[_0x5706d2(0xd4)][_0x5706d2(0x80)](_0x748369['id']))return;const {id:_0x174343}=_0x748369;let _0x1a7ef1;if(!_0x5a156a[_0x5706d2(0xf0)](_0x174343)){var _0x29a24a;_0x1a7ef1=new Subject(),_0x5a156a[_0x5706d2(0xec)](_0x174343,_0x1a7ef1),_0x1a7ef1[_0x5706d2(0xdc)](throttleTime((_0x29a24a=this[_0x5706d2(0x88)]['getConfig'](_0x5706d2(0x10e)))!==null&&_0x29a24a!==void 0x0?_0x29a24a:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x5706d2(0xdb)](_0x55cc2c=>{const _0x51b757=_0x5706d2;this[_0x51b757(0xce)]['send']({'eventID':CollaborationEvent[_0x51b757(0x95)],'data':{'unitID':this[_0x51b757(0xc9)],'operations':{[_0x55cc2c['id']]:{'id':_0x55cc2c['id'],'params':JSON[_0x51b757(0x81)](_0x55cc2c[_0x51b757(0x94)])}}}},this['_unitID']);});}else _0x1a7ef1=_0x5a156a[_0x5706d2(0x7a)](_0x174343);_0x1a7ef1[_0x5706d2(0xac)](_0x748369);})),this[_0x13653b(0xd4)][_0x13653b(0x108)](this[_0x13653b(0xc9)])[_0x13653b(0x96)](_0x1f2fa5=>this[_0x13653b(0xce)][_0x13653b(0xf1)]({'eventID':CollaborationEvent[_0x13653b(0x95)],'data':{'unitID':this['_unitID'],'operations':{[_0x1f2fa5['id']]:{'id':_0x1f2fa5['id'],'params':JSON[_0x13653b(0x81)](_0x1f2fa5[_0x13653b(0x94)])}}}},this['_unitID']));}['_stopPresenting'](){const _0x6fed33=_0x200f20;var _0x1818de;this[_0x6fed33(0x100)]['next'](LiveShareStatus['IDLE']),(_0x1818de=this['_commandDisposable'])===null||_0x1818de===void 0x0||_0x1818de['dispose'](),this[_0x6fed33(0x83)]=null;}[_0x200f20(0xbb)](){const _0x3f8d77=_0x200f20;var _0x48652c;(_0x48652c=this[_0x3f8d77(0x83)])===null||_0x48652c===void 0x0||_0x48652c[_0x3f8d77(0x10f)](),this['_status$']['next'](LiveShareStatus[_0x3f8d77(0xa4)]);}[_0x200f20(0xe5)](){const _0x377489=_0x200f20;var _0x5e27ff;this[_0x377489(0x100)][_0x377489(0xac)](LiveShareStatus[_0x377489(0xf4)]),(_0x5e27ff=this['_commandDisposable'])===null||_0x5e27ff===void 0x0||_0x5e27ff[_0x377489(0x10f)](),this[_0x377489(0x83)]=null;}[_0x200f20(0x8c)](){const _0x18a40a=_0x200f20;var _0x40be2d;this[_0x18a40a(0x100)]['next'](LiveShareStatus['NOT_FOLLOWING']),(_0x40be2d=this[_0x18a40a(0x83)])===null||_0x40be2d===void 0x0||_0x40be2d['dispose']();}['_handleOperation'](_0x294e1b){const _0x4d5ae6=_0x200f20;if([LiveShareStatus['PRESENTING'],LiveShareStatus[_0x4d5ae6(0xe3)],LiveShareStatus[_0x4d5ae6(0x105)]][_0x4d5ae6(0xc6)](this['_status']))return;if(!_0x294e1b[_0x4d5ae6(0x9d)]['presenter']||_0x294e1b[_0x4d5ae6(0x9d)]['presenter']===this[_0x4d5ae6(0xce)][_0x4d5ae6(0x86)]())return;if(this[_0x4d5ae6(0xbf)]===LiveShareStatus['IDLE'])this[_0x4d5ae6(0xbb)]();const _0x453da3=_0x294e1b['data'][_0x4d5ae6(0xa1)];Object[_0x4d5ae6(0xb2)](_0x453da3)[_0x4d5ae6(0x96)](_0x3248ff=>{const _0x1206dc=_0x4d5ae6;this[_0x1206dc(0x92)][_0x1206dc(0x104)](_0x3248ff['id'],_0x3248ff[_0x1206dc(0x94)]?JSON[_0x1206dc(0x87)](_0x3248ff['params']):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x546af3=_0x200f20;var _0x45834f;this[_0x546af3(0x100)][_0x546af3(0xac)](LiveShareStatus['OFFLINE']),(_0x45834f=this[_0x546af3(0x83)])===null||_0x45834f===void 0x0||_0x45834f['dispose']();}[_0x200f20(0xb8)](){const _0x2325ba=_0x200f20;this[_0x2325ba(0x100)][_0x2325ba(0xac)](LiveShareStatus[_0x2325ba(0xf4)]),this['_fetchOperations']();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0xa88fdd=_0x200f20,_0x2f0dde=useDependency(LiveShareController),_0x2dc4ec=useDependency(IUniverInstanceService),_0x391ecd=useObservable(()=>_0x2dc4ec[_0xa88fdd(0xa7)](UniverInstanceType[_0xa88fdd(0x91)]),void 0x0,![],[]),[_0xc4f80d,_0x2dd077]=useState(null),[_0x5223e5,_0x24771f]=useState(LiveShareStatus[_0xa88fdd(0xf4)]),_0x4d8826=useRef(null);useEffect(()=>{const _0x5b4259=_0xa88fdd;if(_0x391ecd)_0x2f0dde[_0x5b4259(0x9f)](_0x391ecd['getUnitId']())[_0x5b4259(0x107)](_0x3c2c39=>{const _0x4b42aa=_0x5b4259;_0x2dd077(_0x3c2c39),_0x4d8826[_0x4b42aa(0x8d)]=_0x3c2c39[_0x4b42aa(0xf2)][_0x4b42aa(0xdb)](_0x5b60b6=>{_0x24771f(_0x5b60b6);});});return()=>{const _0x2dbaae=_0x5b4259;var _0x682b9a;(_0x682b9a=_0x4d8826[_0x2dbaae(0x8d)])===null||_0x682b9a===void 0x0||_0x682b9a['unsubscribe'](),_0x4d8826[_0x2dbaae(0x8d)]=null;};},[_0x391ecd,_0x2f0dde]);if(!_0xc4f80d)return null;return jsx(Dropdown,{'align':_0xa88fdd(0x106),'disabled':_0x5223e5===LiveShareStatus[_0xa88fdd(0x105)],'className':_0xa88fdd(0xfb),'overlay':jsx(LiveShareDropdown,{'status':_0x5223e5,'coordinator':_0xc4f80d}),'children':jsx(_0xa88fdd(0xab),{'className':clsx(_0xa88fdd(0xd8),{'univer-cursor-not-allowed':_0x5223e5===LiveShareStatus['OFFLINE'],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x5223e5!==LiveShareStatus['OFFLINE']}),'type':_0xa88fdd(0xab),'children':jsx(LiveShareIcon,{'className':_0xa88fdd(0xc1)})})});}function LiveShareDropdown(_0x50328d){const _0x1722f8=_0x200f20,{status:_0x3aed74,coordinator:_0x5b4fb5}=_0x50328d;switch(_0x3aed74){case LiveShareStatus[_0x1722f8(0xf4)]:return jsx(Idle,{'coordinator':_0x5b4fb5});case LiveShareStatus[_0x1722f8(0xa4)]:return jsx(Following,{'coordinator':_0x5b4fb5});case LiveShareStatus['NOT_FOLLOWING']:return jsx(NotFollowing,{'coordinator':_0x5b4fb5});case LiveShareStatus[_0x1722f8(0x105)]:return jsx(Offline,{});case LiveShareStatus[_0x1722f8(0xcd)]:return jsx(Presenting,{'coordinator':_0x5b4fb5});default:return null;}}function Idle(_0x3ea6bf){const _0x424eaf=_0x200f20,{coordinator:_0x1e7aa6}=_0x3ea6bf;return jsxs(Fragment,{'children':[jsx(_0x424eaf(0xa3),{'className':_0x424eaf(0x93),'children':'Present\x20this\x20document'}),jsx(Button,{'onClick':()=>_0x1e7aa6[_0x424eaf(0xd2)](),'children':_0x424eaf(0xf5)})]});}function Following(_0x564fa9){const _0x2e20f4=_0x200f20,{coordinator:_0x58ca41}=_0x564fa9;return jsxs(Fragment,{'children':[jsx(_0x2e20f4(0xa3),{'className':_0x2e20f4(0x93),'children':_0x2e20f4(0xe8)}),jsx(Button,{'onClick':()=>_0x58ca41['stopFollowing'](),'children':_0x2e20f4(0xcb)})]});}function NotFollowing(_0x4dfcfd){const _0x198366=_0x200f20,{coordinator:_0x45db5c}=_0x4dfcfd;return jsxs(Fragment,{'children':[jsx(_0x198366(0xa3),{'className':_0x198366(0x93),'children':_0x198366(0xbc)}),jsx(Button,{'variant':_0x198366(0x7d),'onClick':()=>_0x45db5c[_0x198366(0xad)](),'children':_0x198366(0x89)})]});}function Presenting(_0x109b6c){const _0xdf0bc1=_0x200f20,{coordinator:_0x3e2c37}=_0x109b6c;return jsxs(Fragment,{'children':[jsx(_0xdf0bc1(0xa3),{'className':_0xdf0bc1(0x93),'children':'You\x27re\x20presenting\x20the\x20document'}),jsx(Button,{'variant':_0xdf0bc1(0xd5),'onClick':()=>_0x3e2c37[_0xdf0bc1(0x8f)](),'children':_0xdf0bc1(0xf7)})]});}function Offline(){return jsx(Fragment,{'children':'You\x27are\x20offline.'});}function _0x566b(_0x1148e7,_0x2e0182){_0x1148e7=_0x1148e7-0x7a;const _0x5cb122=_0x5cb1();let _0x566b0a=_0x5cb122[_0x1148e7];return _0x566b0a;}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0x3dee1b,_0x447d2e){const _0x1e5277=_0x200f20;super(),this[_0x1e5277(0x7f)]=_0x3dee1b,this[_0x1e5277(0xdf)]=_0x447d2e,this[_0x1e5277(0xda)]();}[_0x200f20(0xda)](){const _0x4ef887=_0x200f20;this[_0x4ef887(0xb3)](this[_0x4ef887(0xdf)][_0x4ef887(0x98)](BuiltInUIPart[_0x4ef887(0xe6)],()=>connectInjector(LiveShare,this[_0x4ef887(0x7f)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name='@univerjs-pro/live-share',version=_0x200f20(0xff);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x200f20(0xc2),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x4c3380){const _0x364b30=_0x200f20;super(),this[_0x364b30(0xd4)]=_0x4c3380,this['_init']();}[_0x200f20(0xd3)](){[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']]['forEach'](_0x485004=>{const _0x531d5e=_0x566b;this[_0x531d5e(0xb3)](this[_0x531d5e(0xd4)][_0x531d5e(0xa6)](_0x485004));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0xf27369=defaultPluginConfig,_0x3ef5e8,_0x420abf){const _0x180894=_0x200f20;super(),this['_config']=_0xf27369,this[_0x180894(0x7f)]=_0x3ef5e8,this[_0x180894(0x88)]=_0x420abf;const {..._0x13020c}=merge({},defaultPluginConfig,this[_0x180894(0x8b)]);this[_0x180894(0x88)][_0x180894(0xbd)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x13020c);}['onStarting'](){const _0x214635=_0x200f20;registerDependencies(this[_0x214635(0x7f)],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x214635(0x8b)][_0x214635(0xe1)])),touchDependencies(this[_0x214635(0x7f)],[[LiveShareCoreExtensionsController]]);}[_0x200f20(0xd1)](){const _0x27bbfa=_0x200f20;touchDependencies(this[_0x27bbfa(0x7f)],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x200f20(0xb9),UniverInstanceType[_0x200f20(0xc8)]),_defineProperty(UniverLiveSharePlugin,_0x200f20(0x103),'UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,_0x200f20(0xc4),name),_defineProperty(UniverLiveSharePlugin,_0x200f20(0x7c),version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
|
1
|
+
const _0x5be165=_0x4fca;(function(_0x4a7376,_0x11a968){const _0x59ce72=_0x4fca,_0x27e75f=_0x4a7376();while(!![]){try{const _0x1d80b8=parseInt(_0x59ce72(0x1ec))/0x1+-parseInt(_0x59ce72(0x214))/0x2+-parseInt(_0x59ce72(0x20b))/0x3+-parseInt(_0x59ce72(0x203))/0x4+parseInt(_0x59ce72(0x1c8))/0x5+parseInt(_0x59ce72(0x1f9))/0x6+parseInt(_0x59ce72(0x1e7))/0x7;if(_0x1d80b8===_0x11a968)break;else _0x27e75f['push'](_0x27e75f['shift']());}catch(_0x1b0f87){_0x27e75f['push'](_0x27e75f['shift']());}}}(_0x59c0,0xa5efb));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';function _0x59c0(){const _0x24f3da=['_init','status$','_status$','then','div','_status','presenting','operations','stopFollowing','0.22.0','_univerInstanceService','UNIVER_UNKNOWN','constructor','PRESENTING','LIVESHARE_FETCH_OPERATIONS','dispose','getStatus','getConfig','_beIdle','@univerjs-pro/live-share','getLiveShareCoordinatorSync','LIVESHARE_TERMINATE','getValue','stopPresenting','IDLE','override','onStarting','1985945xWNIsI','_collabSession','get','Stop\x20presenting','delete','end','OPERATION','init','following','tryStartPresenting','symbol','packageName','_startLiveShareCoordinator','getMemberID','length','not-following','event$','clear','values','decorate','map','params','getOwnPropertyDescriptor','onRendered','mutations','_handleTerminate','offline','unit','_liveShareService','presenter','registerInitialStateReporter','2792454pqEcjw','pipe','FOLLOWING','object','_handleNewChangeSets','1159722cHCnst','_collabSessionService','NOT_FOLLOWING','from','_config','You\x27re\x20following\x20the\x20presenter','_handleOnline','_commandDisposable','data','executeCommand','has','_handleOperation','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','5970798DiXtyo','_presenter','live-share.config','registerComponent','NEW_CHANGESETS','_entities','reverse','UNIVER_SHEET','setConfig','Present\x20this\x20document','3102720zCJjmE','_stopFollowing','LIVESHARE_REQUEST_HOST','disposeWithMe','_uiPartsService','createInstance','shouldShareOperation','current','2748324AabLPn','Start','includes','_startPresenting','next','default','send','forEach','dispose$','1159006lVNGJb','sheet','_handleOffline','stringify','univer-mb-3\x20univer-w-full\x20univer-text-sm','getTypeOfUnitDisposed$','getUnitId','_injector','UNIVER_LIVE_SHARE_PLUGIN','memberID','getInitialStates','Stop\x20following','_startFollowing','complete','requireSession','Start\x20following','startFollowing','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','function','_handleNewHost','registerSharedOperation','You\x27are\x20offline.','add','find','_sharedOperations','SAME_OPERATION_SHARE_INTERVAL','_mountLiveShare','text','toPrimitive','_unitID','getLiveShareCoordinator','idle','OFFLINE','_reporters','unitId','pluginName','type','defineProperty','subscribe','version','unsubscribe','univer-size-4','button','getTypeOfUnitAdded$','HEADER_MENU','_commandService','_configService','getCurrentTypeOfUnit$','string','onCommandExecuted','You\x27re\x20presenting\x20the\x20document'];_0x59c0=function(){return _0x24f3da;};return _0x59c0();}import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x287f77){'@babel/helpers - typeof';const _0x31c33d=_0x4fca;return _typeof=_0x31c33d(0x226)==typeof Symbol&&_0x31c33d(0x1d2)==typeof Symbol['iterator']?function(_0x4f48ec){return typeof _0x4f48ec;}:function(_0x15e04f){const _0x125810=_0x31c33d;return _0x15e04f&&_0x125810(0x226)==typeof Symbol&&_0x15e04f[_0x125810(0x253)]===Symbol&&_0x15e04f!==Symbol['prototype']?_0x125810(0x1d2):typeof _0x15e04f;},_typeof(_0x287f77);}function toPrimitive(_0x281270,_0x5ab4b5){const _0x3e020f=_0x4fca;if('object'!=_typeof(_0x281270)||!_0x281270)return _0x281270;var _0x4de7cd=_0x281270[Symbol[_0x3e020f(0x230)]];if(void 0x0!==_0x4de7cd){var _0x995c2=_0x4de7cd['call'](_0x281270,_0x5ab4b5||_0x3e020f(0x210));if(_0x3e020f(0x1ea)!=_typeof(_0x995c2))return _0x995c2;throw new TypeError(_0x3e020f(0x225));}return(_0x3e020f(0x244)===_0x5ab4b5?String:Number)(_0x281270);}function toPropertyKey(_0x263b0e){const _0x3b6256=_0x4fca;var _0x1fd35b=toPrimitive(_0x263b0e,_0x3b6256(0x244));return'symbol'==_typeof(_0x1fd35b)?_0x1fd35b:_0x1fd35b+'';}function _defineProperty(_0x8dd6d8,_0x1736e8,_0x4bf663){const _0x506b26=_0x4fca;return(_0x1736e8=toPropertyKey(_0x1736e8))in _0x8dd6d8?Object[_0x506b26(0x239)](_0x8dd6d8,_0x1736e8,{'value':_0x4bf663,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x8dd6d8[_0x1736e8]=_0x4bf663,_0x8dd6d8;}var LiveShareService=class extends Disposable{constructor(..._0x369656){const _0x5cc742=_0x4fca;super(..._0x369656),_defineProperty(this,_0x5cc742(0x22c),new Set()),_defineProperty(this,_0x5cc742(0x235),new Set());}[_0x5be165(0x228)](_0x11ad02){const _0xf471ac=_0x5be165;return this[_0xf471ac(0x22c)][_0xf471ac(0x22a)](_0x11ad02),toDisposable(()=>this[_0xf471ac(0x22c)][_0xf471ac(0x1cc)](_0x11ad02));}[_0x5be165(0x1e6)](_0x39eca0){const _0x3ab20b=_0x5be165;return this[_0x3ab20b(0x235)][_0x3ab20b(0x22a)](_0x39eca0),toDisposable(()=>this[_0x3ab20b(0x235)][_0x3ab20b(0x1cc)](_0x39eca0));}[_0x5be165(0x209)](_0x38ccf6){const _0x5a1352=_0x5be165;return this['_sharedOperations'][_0x5a1352(0x1f6)](_0x38ccf6);}[_0x5be165(0x21e)](_0x3e376a){const _0x22340c=_0x5be165;return Array[_0x22340c(0x1ef)](this['_reporters'])[_0x22340c(0x1dc)](_0x287b0b=>_0x287b0b(_0x3e376a));}};function __decorateParam(_0x4070a8,_0x22e655){return function(_0x19361b,_0x22e499){_0x22e655(_0x19361b,_0x22e499,_0x4070a8);};}function __decorate(_0x5d0e82,_0x36becb,_0x1c56fc,_0x21a6cb){const _0x207949=_0x5be165;var _0x17c06d=arguments[_0x207949(0x1d6)],_0x45b5cf=_0x17c06d<0x3?_0x36becb:_0x21a6cb===null?_0x21a6cb=Object[_0x207949(0x1de)](_0x36becb,_0x1c56fc):_0x21a6cb,_0x2b6837;if(typeof Reflect===_0x207949(0x1ea)&&typeof Reflect[_0x207949(0x1db)]==='function')_0x45b5cf=Reflect['decorate'](_0x5d0e82,_0x36becb,_0x1c56fc,_0x21a6cb);else{for(var _0x331844=_0x5d0e82[_0x207949(0x1d6)]-0x1;_0x331844>=0x0;_0x331844--)if(_0x2b6837=_0x5d0e82[_0x331844])_0x45b5cf=(_0x17c06d<0x3?_0x2b6837(_0x45b5cf):_0x17c06d>0x3?_0x2b6837(_0x36becb,_0x1c56fc,_0x45b5cf):_0x2b6837(_0x36becb,_0x1c56fc))||_0x45b5cf;}return _0x17c06d>0x3&&_0x45b5cf&&Object[_0x207949(0x239)](_0x36becb,_0x1c56fc,_0x45b5cf),_0x45b5cf;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x3748fe,_0x252440,_0x1d5cd4){const _0x1dbd1a=_0x5be165;super(),this['_univerInstanceService']=_0x3748fe,this[_0x1dbd1a(0x21b)]=_0x252440,this[_0x1dbd1a(0x1ed)]=_0x1d5cd4,_defineProperty(this,_0x1dbd1a(0x1fe),new Map()),this[_0x1dbd1a(0x247)]();}async['getLiveShareCoordinator'](_0x471f7a){const _0x1d1c09=_0x5be165;if(!this['_entities'][_0x1d1c09(0x1f6)](_0x471f7a))await this[_0x1d1c09(0x1d4)](_0x471f7a);return this[_0x1d1c09(0x1fe)][_0x1d1c09(0x1ca)](_0x471f7a);}[_0x5be165(0x1c1)](_0x38ec36){const _0x523381=_0x5be165;var _0x26d35f;return(_0x26d35f=this['_entities'][_0x523381(0x1ca)](_0x38ec36))!==null&&_0x26d35f!==void 0x0?_0x26d35f:null;}[_0x5be165(0x247)](){const _0x8e82bb=_0x5be165;this['_univerInstanceService'][_0x8e82bb(0x23f)](UniverInstanceType[_0x8e82bb(0x200)])[_0x8e82bb(0x1e8)](takeUntil(this['dispose$']))[_0x8e82bb(0x23a)](async _0x1096b1=>{const _0x3bb56a=_0x8e82bb,_0x56eca7=_0x1096b1[_0x3bb56a(0x1e3)][_0x3bb56a(0x21a)]();if(this[_0x3bb56a(0x1fe)]['has'](_0x56eca7))return;this[_0x3bb56a(0x1d4)](_0x56eca7);}),this[_0x8e82bb(0x251)][_0x8e82bb(0x219)](UniverInstanceType['UNIVER_SHEET'])[_0x8e82bb(0x1e8)](takeUntil(this['dispose$']))[_0x8e82bb(0x23a)](_0x1e2faf=>{const _0xea3819=_0x8e82bb,_0x27229a=_0x1e2faf['getUnitId'](),_0x180433=this[_0xea3819(0x1fe)][_0xea3819(0x1ca)](_0x27229a);_0x180433===null||_0x180433===void 0x0||_0x180433['dispose']();});}async['_startLiveShareCoordinator'](_0x2129dd){const _0x444357=_0x5be165,_0x1d4e35=await this['_collabSessionService'][_0x444357(0x222)](_0x2129dd),_0xb30aa=this['_injector'][_0x444357(0x208)](LiveShareCoordinator,_0x2129dd,_0x1d4e35);return _0xb30aa[_0x444357(0x1cf)](),this['_entities']['set'](_0x2129dd,_0xb30aa),_0xb30aa;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0x11daed){const _0x55288b=_0x5be165;return _0x11daed[_0x55288b(0x234)]=_0x55288b(0x1e2),_0x11daed[_0x55288b(0x1c5)]=_0x55288b(0x233),_0x11daed[_0x55288b(0x1e9)]='following',_0x11daed[_0x55288b(0x1ee)]='not-following',_0x11daed[_0x55288b(0x254)]=_0x55288b(0x24d),_0x11daed;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x5be165(0x22d),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get[_0x5be165(0x24c)](){const _0x11187a=_0x5be165;return this[_0x11187a(0x249)][_0x11187a(0x1c3)]();}constructor(_0x578a20,_0x128d95,_0x1d6215,_0x4648b3,_0x4ef5d2){const _0x1ffea0=_0x5be165;super(),this[_0x1ffea0(0x231)]=_0x578a20,this[_0x1ffea0(0x1c9)]=_0x128d95,this[_0x1ffea0(0x242)]=_0x1d6215,this['_liveShareService']=_0x4648b3,this['_commandService']=_0x4ef5d2,_defineProperty(this,'_status$',new BehaviorSubject('idle')),_defineProperty(this,_0x1ffea0(0x248),this[_0x1ffea0(0x249)]['asObservable']()),_defineProperty(this,_0x1ffea0(0x247),![]),_defineProperty(this,'_commandDisposable',null),_defineProperty(this,'_presenter',null);}[_0x5be165(0x256)](){const _0x3c7480=_0x5be165;var _0xa4e82c;(_0xa4e82c=this[_0x3c7480(0x1f3)])===null||_0xa4e82c===void 0x0||_0xa4e82c[_0x3c7480(0x256)](),this[_0x3c7480(0x249)][_0x3c7480(0x20f)](_0x3c7480(0x233)),this[_0x3c7480(0x249)][_0x3c7480(0x221)]();}[_0x5be165(0x257)](){const _0x1bb4c5=_0x5be165;return this[_0x1bb4c5(0x24c)];}[_0x5be165(0x1cf)](){const _0x29bd97=_0x5be165;if(this['_init'])return;this['_init']=!![],this[_0x29bd97(0x1c9)]['sessionStatus$'][_0x29bd97(0x1e8)](takeUntil(this['dispose$']))[_0x29bd97(0x23a)](_0x2d08c1=>{const _0x38fdf3=_0x29bd97;switch(_0x2d08c1){case SessionStatus[_0x38fdf3(0x234)]:this[_0x38fdf3(0x216)]();break;case SessionStatus['ONLINE']:this[_0x38fdf3(0x1f2)]();break;default:}}),this['_collabSession'][_0x29bd97(0x1d8)][_0x29bd97(0x1e8)](takeUntil(this[_0x29bd97(0x213)]))['subscribe'](_0x25bf34=>{const _0x3ff15a=_0x29bd97,{eventID:_0x4e0894}=_0x25bf34;switch(_0x4e0894){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x3ff15a(0x227)](_0x25bf34);break;case CollaborationEvent['LIVESHARE_OPERATION']:this[_0x3ff15a(0x1f7)](_0x25bf34);break;case CollaborationEvent[_0x3ff15a(0x1c2)]:this[_0x3ff15a(0x1e1)]();break;case CollaborationEvent[_0x3ff15a(0x1fd)]:this[_0x3ff15a(0x1eb)](_0x25bf34);break;default:}});}['tryStartPresenting'](){const _0x1cd8da=_0x5be165;this['_collabSession'][_0x1cd8da(0x211)]({'eventID':CollaborationEvent[_0x1cd8da(0x205)],'data':{'unitID':this[_0x1cd8da(0x231)],'userID':this[_0x1cd8da(0x1c9)][_0x1cd8da(0x1d5)]()}},this['_unitID']);}[_0x5be165(0x1c4)](){const _0x50a298=_0x5be165;this[_0x50a298(0x24c)]==='presenting'&&(this[_0x50a298(0x249)]['next']('idle'),this[_0x50a298(0x1c9)][_0x50a298(0x211)]({'eventID':CollaborationEvent[_0x50a298(0x1c2)],'data':{'unitID':this[_0x50a298(0x231)]}},this['_unitID']));}[_0x5be165(0x224)](){const _0x50d594=_0x5be165;if(this[_0x50d594(0x24c)]!==_0x50d594(0x1d7))return;this[_0x50d594(0x249)]['next']('following'),this[_0x50d594(0x220)]();}[_0x5be165(0x24f)](){const _0x19677c=_0x5be165;if(this[_0x19677c(0x24c)]!==_0x19677c(0x1d0))return;this[_0x19677c(0x204)]();}[_0x5be165(0x227)](_0x531f3e){const _0x4de19e=_0x5be165,{presenter:_0x3e8d38}=_0x531f3e[_0x4de19e(0x1f4)],_0x32469d=this['_collabSession'][_0x4de19e(0x1d5)]();this[_0x4de19e(0x1fa)]=_0x3e8d38;if(_0x3e8d38===_0x32469d)this[_0x4de19e(0x204)](),this[_0x4de19e(0x20e)]();else this[_0x4de19e(0x24c)]!==_0x4de19e(0x1d7)&&(this['_stopPresenting'](),this['_startFollowing']());}['_fetchOperations'](){const _0x37f31a=_0x5be165,_0x577b7c={'eventID':CollaborationEvent[_0x37f31a(0x255)]};this[_0x37f31a(0x1c9)]['send'](_0x577b7c,this[_0x37f31a(0x231)]);}[_0x5be165(0x1e1)](){const _0x464fc1=_0x5be165;this[_0x464fc1(0x1fa)]=null;if(this[_0x464fc1(0x24c)]!=='presenting')this[_0x464fc1(0x1bf)]();}['_handleNewChangeSets'](_0x10fbbc){const _0x21d838=_0x5be165;if(this[_0x21d838(0x24c)]==='following'&&this['_presenter']===_0x10fbbc[_0x21d838(0x1f4)][_0x21d838(0x21d)]){const _0x53ef00=parseProtocolChangeset(_0x10fbbc[_0x21d838(0x1f4)])[_0x21d838(0x1e0)][_0x21d838(0x1ff)]()[_0x21d838(0x22b)](_0x257818=>_0x257818['id']===InsertSheetMutation['id']);if(_0x53ef00){const _0x1aa63=_0x53ef00[_0x21d838(0x1dd)][_0x21d838(0x236)],_0x158abd=_0x53ef00['params'][_0x21d838(0x215)]['id'];setTimeout(()=>{const _0x4ac1f0=_0x21d838;this[_0x4ac1f0(0x241)][_0x4ac1f0(0x1f5)](SetWorksheetActiveOperation['id'],{'unitId':_0x1aa63,'subUnitId':_0x158abd},{'fromCollab':!![]});});}}}[_0x5be165(0x20e)](){const _0x3a82f1=_0x5be165;this['_status$'][_0x3a82f1(0x20f)](_0x3a82f1(0x24d));const _0x3b7e37=new Map(),_0x5a8d91=this[_0x3a82f1(0x1f3)]=new DisposableCollection();_0x5a8d91[_0x3a82f1(0x22a)](toDisposable(()=>{const _0x518d1a=_0x3a82f1;_0x3b7e37[_0x518d1a(0x212)](_0x4e6b97=>_0x4e6b97[_0x518d1a(0x221)]()),_0x3b7e37[_0x518d1a(0x1d9)]();})),_0x5a8d91[_0x3a82f1(0x22a)](this['_commandService'][_0x3a82f1(0x245)](_0x329ecb=>{const _0x4315c6=_0x3a82f1;if(_0x329ecb[_0x4315c6(0x238)]!==CommandType[_0x4315c6(0x1ce)]||!this['_liveShareService']['shouldShareOperation'](_0x329ecb['id']))return;const {id:_0x585d7d}=_0x329ecb;let _0x5d64c6;if(!_0x3b7e37[_0x4315c6(0x1f6)](_0x585d7d)){var _0x4be7a7;_0x5d64c6=new Subject(),_0x3b7e37['set'](_0x585d7d,_0x5d64c6),_0x5d64c6[_0x4315c6(0x1e8)](throttleTime((_0x4be7a7=this[_0x4315c6(0x242)][_0x4315c6(0x1be)](_0x4315c6(0x22d)))!==null&&_0x4be7a7!==void 0x0?_0x4be7a7:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x4315c6(0x23a)](_0x29a891=>{const _0x31ea28=_0x4315c6;this[_0x31ea28(0x1c9)][_0x31ea28(0x211)]({'eventID':CollaborationEvent['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x31ea28(0x231)],'operations':{[_0x29a891['id']]:{'id':_0x29a891['id'],'params':JSON['stringify'](_0x29a891['params'])}}}},this['_unitID']);});}else _0x5d64c6=_0x3b7e37[_0x4315c6(0x1ca)](_0x585d7d);_0x5d64c6[_0x4315c6(0x20f)](_0x329ecb);})),this[_0x3a82f1(0x1e4)]['getInitialStates'](this[_0x3a82f1(0x231)])[_0x3a82f1(0x212)](_0x3aea65=>this[_0x3a82f1(0x1c9)][_0x3a82f1(0x211)]({'eventID':CollaborationEvent['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0x3aea65['id']]:{'id':_0x3aea65['id'],'params':JSON[_0x3a82f1(0x217)](_0x3aea65[_0x3a82f1(0x1dd)])}}}},this[_0x3a82f1(0x231)]));}['_stopPresenting'](){const _0x2e26c7=_0x5be165;var _0x3ff1d7;this['_status$'][_0x2e26c7(0x20f)](_0x2e26c7(0x233)),(_0x3ff1d7=this[_0x2e26c7(0x1f3)])===null||_0x3ff1d7===void 0x0||_0x3ff1d7['dispose'](),this[_0x2e26c7(0x1f3)]=null;}['_startFollowing'](){const _0x4e0b29=_0x5be165;var _0x1b4d30;(_0x1b4d30=this[_0x4e0b29(0x1f3)])===null||_0x1b4d30===void 0x0||_0x1b4d30[_0x4e0b29(0x256)](),this[_0x4e0b29(0x249)][_0x4e0b29(0x20f)](_0x4e0b29(0x1d0));}[_0x5be165(0x1bf)](){const _0x4d3699=_0x5be165;var _0x9f4aac;this['_status$'][_0x4d3699(0x20f)](_0x4d3699(0x233)),(_0x9f4aac=this[_0x4d3699(0x1f3)])===null||_0x9f4aac===void 0x0||_0x9f4aac['dispose'](),this[_0x4d3699(0x1f3)]=null;}[_0x5be165(0x204)](){const _0x321f3c=_0x5be165;var _0x769bb7;this[_0x321f3c(0x249)][_0x321f3c(0x20f)](_0x321f3c(0x1d7)),(_0x769bb7=this['_commandDisposable'])===null||_0x769bb7===void 0x0||_0x769bb7[_0x321f3c(0x256)]();}['_handleOperation'](_0x58666b){const _0x13f377=_0x5be165;if([_0x13f377(0x24d),_0x13f377(0x1d7),_0x13f377(0x1e2)][_0x13f377(0x20d)](this[_0x13f377(0x24c)]))return;if(!_0x58666b[_0x13f377(0x1f4)][_0x13f377(0x1e5)]||_0x58666b[_0x13f377(0x1f4)]['presenter']===this[_0x13f377(0x1c9)]['getMemberID']())return;if(this[_0x13f377(0x24c)]===_0x13f377(0x233))this[_0x13f377(0x220)]();const _0x3017ee=_0x58666b[_0x13f377(0x1f4)][_0x13f377(0x24e)];Object[_0x13f377(0x1da)](_0x3017ee)[_0x13f377(0x212)](_0x344fff=>{const _0x7e2e81=_0x13f377;this[_0x7e2e81(0x241)]['executeCommand'](_0x344fff['id'],_0x344fff[_0x7e2e81(0x1dd)]?JSON['parse'](_0x344fff[_0x7e2e81(0x1dd)]):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x3f6dc8=_0x5be165;var _0x261b6e;this[_0x3f6dc8(0x249)][_0x3f6dc8(0x20f)](_0x3f6dc8(0x1e2)),(_0x261b6e=this[_0x3f6dc8(0x1f3)])===null||_0x261b6e===void 0x0||_0x261b6e[_0x3f6dc8(0x256)]();}[_0x5be165(0x1f2)](){const _0x2fbf0b=_0x5be165;this[_0x2fbf0b(0x249)]['next'](_0x2fbf0b(0x233)),this['_fetchOperations']();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x5cf6d9=_0x5be165,_0x31ff37=useDependency(LiveShareController),_0xdd83c5=useDependency(IUniverInstanceService),_0xe64d2=useObservable(()=>_0xdd83c5[_0x5cf6d9(0x243)](UniverInstanceType[_0x5cf6d9(0x200)]),void 0x0,![],[]),[_0x393262,_0x67173d]=useState(null),[_0x48a93d,_0x1b8bf6]=useState(_0x5cf6d9(0x233)),_0x20121d=useRef(null);useEffect(()=>{const _0x138429=_0x5cf6d9;if(_0xe64d2)_0x31ff37[_0x138429(0x232)](_0xe64d2[_0x138429(0x21a)]())[_0x138429(0x24a)](_0x1d6069=>{const _0x51b1fc=_0x138429;_0x67173d(_0x1d6069),_0x20121d[_0x51b1fc(0x20a)]=_0x1d6069[_0x51b1fc(0x248)][_0x51b1fc(0x23a)](_0x58b0c2=>{_0x1b8bf6(_0x58b0c2);});});return()=>{const _0x14b56a=_0x138429;var _0x3b7826;(_0x3b7826=_0x20121d[_0x14b56a(0x20a)])===null||_0x3b7826===void 0x0||_0x3b7826[_0x14b56a(0x23c)](),_0x20121d[_0x14b56a(0x20a)]=null;};},[_0xe64d2,_0x31ff37]);if(!_0x393262)return null;return jsx(Dropdown,{'align':_0x5cf6d9(0x1cd),'disabled':_0x48a93d==='offline','className':_0x5cf6d9(0x1f8),'overlay':jsx(LiveShareDropdown,{'status':_0x48a93d,'coordinator':_0x393262}),'children':jsx(_0x5cf6d9(0x23e),{'className':clsx('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x48a93d===_0x5cf6d9(0x1e2),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x48a93d!==_0x5cf6d9(0x1e2)}),'type':'button','children':jsx(LiveShareIcon,{'className':_0x5cf6d9(0x23d)})})});}function LiveShareDropdown(_0x4bf670){const _0x2e39bc=_0x5be165,{status:_0x4b19a7,coordinator:_0x389698}=_0x4bf670;switch(_0x4b19a7){case'idle':return jsx(Idle,{'coordinator':_0x389698});case _0x2e39bc(0x1d0):return jsx(Following,{'coordinator':_0x389698});case _0x2e39bc(0x1d7):return jsx(NotFollowing,{'coordinator':_0x389698});case _0x2e39bc(0x1e2):return jsx(Offline,{});case'presenting':return jsx(Presenting,{'coordinator':_0x389698});default:return null;}}function _0x4fca(_0x53ca86,_0x28f239){_0x53ca86=_0x53ca86-0x1be;const _0x59c08f=_0x59c0();let _0x4fcafb=_0x59c08f[_0x53ca86];return _0x4fcafb;}function Idle(_0x5615f2){const _0x214859=_0x5be165,{coordinator:_0x3f59cb}=_0x5615f2;return jsxs(Fragment,{'children':[jsx('div',{'className':_0x214859(0x218),'children':_0x214859(0x202)}),jsx(Button,{'onClick':()=>_0x3f59cb[_0x214859(0x1d1)](),'children':_0x214859(0x20c)})]});}function Following(_0x535c47){const _0x417415=_0x5be165,{coordinator:_0x5a04d4}=_0x535c47;return jsxs(Fragment,{'children':[jsx(_0x417415(0x24b),{'className':_0x417415(0x218),'children':_0x417415(0x1f1)}),jsx(Button,{'onClick':()=>_0x5a04d4['stopFollowing'](),'children':_0x417415(0x21f)})]});}function NotFollowing(_0x531b8f){const _0xc5e6a0=_0x5be165,{coordinator:_0x5405ae}=_0x531b8f;return jsxs(Fragment,{'children':[jsx(_0xc5e6a0(0x24b),{'className':_0xc5e6a0(0x218),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),jsx(Button,{'variant':_0xc5e6a0(0x22f),'onClick':()=>_0x5405ae[_0xc5e6a0(0x224)](),'children':_0xc5e6a0(0x223)})]});}function Presenting(_0x2f1771){const _0x27bf36=_0x5be165,{coordinator:_0x5de55d}=_0x2f1771;return jsxs(Fragment,{'children':[jsx(_0x27bf36(0x24b),{'className':_0x27bf36(0x218),'children':_0x27bf36(0x246)}),jsx(Button,{'variant':_0x27bf36(0x210),'onClick':()=>_0x5de55d[_0x27bf36(0x1c4)](),'children':_0x27bf36(0x1cb)})]});}function Offline(){const _0x2122ee=_0x5be165;return jsx(Fragment,{'children':_0x2122ee(0x229)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0x4a6fa8,_0x113278){const _0x56e126=_0x5be165;super(),this[_0x56e126(0x21b)]=_0x4a6fa8,this[_0x56e126(0x207)]=_0x113278,this['_mountLiveShare']();}[_0x5be165(0x22e)](){const _0x23b495=_0x5be165;this['disposeWithMe'](this['_uiPartsService'][_0x23b495(0x1fc)](BuiltInUIPart[_0x23b495(0x240)],()=>connectInjector(LiveShare,this[_0x23b495(0x21b)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x5be165(0x1c0),version=_0x5be165(0x250);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x5be165(0x1fb),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x57fc86){const _0x2992b9=_0x5be165;super(),this[_0x2992b9(0x1e4)]=_0x57fc86,this[_0x2992b9(0x247)]();}[_0x5be165(0x247)](){const _0x2ba892=_0x5be165;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x2ba892(0x212)](_0x483e55=>{const _0x24a2b6=_0x2ba892;this[_0x24a2b6(0x206)](this['_liveShareService']['registerSharedOperation'](_0x483e55));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x78ca72=defaultPluginConfig,_0x317b09,_0xd14575){const _0x116bbf=_0x5be165;super(),this[_0x116bbf(0x1f0)]=_0x78ca72,this[_0x116bbf(0x21b)]=_0x317b09,this[_0x116bbf(0x242)]=_0xd14575;const {..._0x2e998a}=merge({},defaultPluginConfig,this[_0x116bbf(0x1f0)]);this[_0x116bbf(0x242)][_0x116bbf(0x201)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x2e998a);}[_0x5be165(0x1c7)](){const _0x4984fb=_0x5be165;registerDependencies(this[_0x4984fb(0x21b)],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x4984fb(0x1f0)][_0x4984fb(0x1c6)])),touchDependencies(this[_0x4984fb(0x21b)],[[LiveShareCoreExtensionsController]]);}[_0x5be165(0x1df)](){touchDependencies(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x5be165(0x238),UniverInstanceType[_0x5be165(0x252)]),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x237),_0x5be165(0x21c)),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x1d3),name),_defineProperty(UniverLiveSharePlugin,_0x5be165(0x23b),version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4bac(_0x421443,_0x26b8f6){_0x421443=_0x421443-0x10f;const _0x13e086=_0x13e0();let _0x4bac32=_0x13e086[_0x421443];return _0x4bac32;}(function(_0x42f799,_0x25dcf3){const _0x4d3c39=_0x4bac,_0x5f2740=_0x42f799();while(!![]){try{const _0x577c5d=-parseInt(_0x4d3c39(0x115))/0x1+parseInt(_0x4d3c39(0x124))/0x2*(parseInt(_0x4d3c39(0x139))/0x3)+parseInt(_0x4d3c39(0x11a))/0x4*(parseInt(_0x4d3c39(0x13f))/0x5)+parseInt(_0x4d3c39(0x12d))/0x6*(parseInt(_0x4d3c39(0x126))/0x7)+-parseInt(_0x4d3c39(0x11e))/0x8+-parseInt(_0x4d3c39(0x113))/0x9*(parseInt(_0x4d3c39(0x112))/0xa)+parseInt(_0x4d3c39(0x11b))/0xb*(parseInt(_0x4d3c39(0x12a))/0xc);if(_0x577c5d===_0x25dcf3)break;else _0x5f2740['push'](_0x5f2740['shift']());}catch(_0x3f6019){_0x5f2740['push'](_0x5f2740['shift']());}}}(_0x13e0,0x5f259),function(_0x1c8df0,_0x19974a){const _0x2363d1=_0x4bac;typeof exports==_0x2363d1(0x128)&&typeof module<'u'?_0x19974a(require(`@univerjs-pro/live-share`),require(`@univerjs/core`),require(`@univerjs/core/facade`)):typeof define==_0x2363d1(0x10f)&&define[_0x2363d1(0x123)]?define([_0x2363d1(0x119),'@univerjs/core',_0x2363d1(0x132)],_0x19974a):(_0x1c8df0=typeof globalThis<'u'?globalThis:_0x1c8df0||self,_0x19974a(_0x1c8df0[_0x2363d1(0x127)],_0x1c8df0[_0x2363d1(0x111)],_0x1c8df0['UniverCoreFacade']));}(this,function(_0x291a2f,_0x18d80f,_0x434086){const _0xa1fd73=_0x4bac;function _0x4ac2d2(_0xaf5073){'@babel/helpers - typeof';const _0x488eb9=_0x4bac;return _0x4ac2d2=typeof Symbol==_0x488eb9(0x10f)&&typeof Symbol['iterator']=='symbol'?function(_0x215c84){return typeof _0x215c84;}:function(_0x839d89){const _0x5a499b=_0x488eb9;return _0x839d89&&typeof Symbol==_0x5a499b(0x10f)&&_0x839d89[_0x5a499b(0x11d)]===Symbol&&_0x839d89!==Symbol[_0x5a499b(0x133)]?_0x5a499b(0x11c):typeof _0x839d89;},_0x4ac2d2(_0xaf5073);}function _0x3bae2a(_0x2d123a,_0xebfa65){const _0x2c4e69=_0x4bac;if(_0x4ac2d2(_0x2d123a)!=_0x2c4e69(0x128)||!_0x2d123a)return _0x2d123a;var _0xc4d5ce=_0x2d123a[Symbol[_0x2c4e69(0x116)]];if(_0xc4d5ce!==void 0x0){var _0x335532=_0xc4d5ce[_0x2c4e69(0x13b)](_0x2d123a,_0xebfa65||_0x2c4e69(0x12e));if(_0x4ac2d2(_0x335532)!=_0x2c4e69(0x128))return _0x335532;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0xebfa65===_0x2c4e69(0x136)?String:Number)(_0x2d123a);}function _0x406992(_0x24b192){const _0x8a0b63=_0x4bac;var _0x11299f=_0x3bae2a(_0x24b192,_0x8a0b63(0x136));return _0x4ac2d2(_0x11299f)==_0x8a0b63(0x11c)?_0x11299f:_0x11299f+'';}function _0x1e593a(_0x22b01b,_0x104b73,_0x1d7d02){return(_0x104b73=_0x406992(_0x104b73))in _0x22b01b?Object['defineProperty'](_0x22b01b,_0x104b73,{'value':_0x1d7d02,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x22b01b[_0x104b73]=_0x1d7d02,_0x22b01b;}var _0x3bd0c2=class extends _0x434086[_0xa1fd73(0x130)]{constructor(..._0x81f2f0){const _0x348315=_0xa1fd73;super(..._0x81f2f0),_0x1e593a(this,_0x348315(0x13c),void 0x0);}[_0xa1fd73(0x12f)](_0x159e52){const _0x3dcce8=_0xa1fd73;this[_0x3dcce8(0x13c)]=_0x159e52['get'](_0x291a2f[_0x3dcce8(0x11f)]);}[_0xa1fd73(0x121)](){const _0x4225f4=_0xa1fd73;var _0x35f0c7;let _0x42943a=this['_injector'][_0x4225f4(0x137)](_0x18d80f[_0x4225f4(0x110)])['getCurrentUnitOfType'](_0x18d80f[_0x4225f4(0x125)]['UNIVER_SHEET']);if(!_0x42943a)throw Error(_0x4225f4(0x135));let _0xb27793=_0x42943a[_0x4225f4(0x13a)](),_0x150bef=this['_liveShareController'][_0x4225f4(0x138)](_0xb27793);return(_0x35f0c7=_0x150bef==null?void 0x0:_0x150bef[_0x4225f4(0x140)]())==null?_0x291a2f[_0x4225f4(0x122)][_0x4225f4(0x118)]:_0x35f0c7;}[_0xa1fd73(0x120)](){const _0x1c2d71=_0xa1fd73;let _0x4610bd=this[_0x1c2d71(0x114)][_0x1c2d71(0x137)](_0x18d80f[_0x1c2d71(0x110)])[_0x1c2d71(0x134)](_0x18d80f['UniverInstanceType'][_0x1c2d71(0x12b)]);if(!_0x4610bd)throw Error(_0x1c2d71(0x135));let _0x35a148=_0x4610bd[_0x1c2d71(0x13a)](),_0x28e9bb=this[_0x1c2d71(0x13c)]['getLiveShareCoordinatorSync'](_0x35a148);if(!_0x28e9bb)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x28e9bb[_0x1c2d71(0x120)]();}[_0xa1fd73(0x13e)](){const _0x14f598=_0xa1fd73;let _0x47a457=this[_0x14f598(0x114)][_0x14f598(0x137)](_0x18d80f[_0x14f598(0x110)])[_0x14f598(0x134)](_0x18d80f['UniverInstanceType'][_0x14f598(0x12b)]);if(!_0x47a457)throw Error('No\x20active\x20workbook\x20found.');let _0x28d298=_0x47a457[_0x14f598(0x13a)](),_0x14bb21=this[_0x14f598(0x13c)]['getLiveShareCoordinatorSync'](_0x28d298);if(!_0x14bb21)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x14bb21['stopFollowing']();}['startPresenting'](){const _0x5e9609=_0xa1fd73;let _0x537f9b=this[_0x5e9609(0x114)]['get'](_0x18d80f[_0x5e9609(0x110)])[_0x5e9609(0x134)](_0x18d80f[_0x5e9609(0x125)]['UNIVER_SHEET']);if(!_0x537f9b)throw Error(_0x5e9609(0x135));let _0x41e8a7=_0x537f9b[_0x5e9609(0x13a)](),_0x2c3213=this['_liveShareController'][_0x5e9609(0x138)](_0x41e8a7);if(!_0x2c3213)throw Error(_0x5e9609(0x13d));_0x2c3213[_0x5e9609(0x117)]();}['stopPresenting'](){const _0x4cf75c=_0xa1fd73;let _0x3fda5a=this[_0x4cf75c(0x114)][_0x4cf75c(0x137)](_0x18d80f[_0x4cf75c(0x110)])[_0x4cf75c(0x134)](_0x18d80f[_0x4cf75c(0x125)][_0x4cf75c(0x12b)]);if(!_0x3fda5a)throw Error(_0x4cf75c(0x135));let _0x1277c8=_0x3fda5a[_0x4cf75c(0x13a)](),_0x84e55=this[_0x4cf75c(0x13c)][_0x4cf75c(0x138)](_0x1277c8);if(!_0x84e55)throw Error(_0x4cf75c(0x13d));_0x84e55[_0x4cf75c(0x131)]();}};_0x434086[_0xa1fd73(0x130)]['extend'](_0x3bd0c2);var _0x4424d3=class extends _0x434086[_0xa1fd73(0x129)]{get['LiveShareStatusEnum'](){const _0x44043e=_0xa1fd73;return _0x291a2f[_0x44043e(0x122)];}};_0x434086[_0xa1fd73(0x129)][_0xa1fd73(0x12c)](_0x4424d3);}));function _0x13e0(){const _0x29f6de=['symbol','constructor','3222872vTUHRc','LiveShareController','startFollowing','getLiveShareStatus','LiveShareStatus','amd','878VHUIdC','UniverInstanceType','1183jdXxzO','UniverProLiveShare','object','FEnum','2136iDuxDd','UNIVER_SHEET','extend','8112UgoimC','default','_initialize','FUniver','stopPresenting','@univerjs/core/facade','prototype','getCurrentUnitOfType','No\x20active\x20workbook\x20found.','string','get','getLiveShareCoordinatorSync','3651LaGSyy','getUnitId','call','_liveShareController','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','stopFollowing','1707145nlRVOQ','getStatus','function','IUniverInstanceService','UniverCore','106070rPFjeI','216IbmEEa','_injector','328304NfyWTv','toPrimitive','tryStartPresenting','IDLE','@univerjs-pro/live-share','4YvcrBn','16764DwkQnV'];_0x13e0=function(){return _0x29f6de;};return _0x13e0();}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x47f5(_0x3c2b74,_0x2ff3b6){_0x3c2b74=_0x3c2b74-0x123;const _0x390f5e=_0x390f();let _0x47f5ac=_0x390f5e[_0x3c2b74];return _0x47f5ac;}function _0x390f(){const _0x22a1c3=['executeCommand','override','string','data','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','text','SetZoomRatioOperation','none','You\x27re\x20following\x20the\x20presenter','set','_commandService','substring','jsx','evenodd','constructor','connectInjector','decorate','presenter','status$','length','from','SessionStatus','registerComponent','version','4698480drmcca','shouldShareOperation','_handleOffline','Subject','sheet','_commandDisposable','getMemberID','createInstance','getTypeOfUnitAdded$','not-following','live-share-icon','startFollowing','React','replace','SetWorksheetActiveOperation','fill','following','colorChannel1','Inject','2752608PWqvsE','rxjs/operators','_uiPartsService','url(#$1','You\x27are\x20offline.','displayName','PRESENTING','get','_collabSession','tryStartPresenting','6SlrOVT','tag','useEffect','UniverInstanceType','_config','operations','_beIdle','mergeOverrideWithDependencies','toString','requireSession','UniverDesign','_handleOnline','throttleTime','object','idle','_handleOperation','createElement','unsubscribe','forEach','getInitialStates','41068untsEc','_entities','getLiveShareCoordinator','div','SetScrollOperation','Plugin','UniverProCollaboration','LiveShareService','symbol','FOLLOWING','LIVESHARE_OPERATION','jsxs','sessionStatus$','children','IUniverInstanceService','UniverCollaborationClientPlugin','end','reverse','UniverSheetsUi','defs','registerDependencies','toPrimitive','live-share.config','useDependency','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','defineProperty','call','merge','prototype','map','_univerInstanceService','_status','BehaviorSubject','_startFollowing','UniverProLiveShare','getConfig','xlink:href','DesktopLiveShareController','touchDependencies','univer-size-4','takeUntil','unit','clear','LIVESHARE_TERMINATE','amd','stopPresenting','idSuffix','button','dispose','mask','UniverSheets','getStatus','memberID','_handleNewHost','LiveShareStatus','9ieUolN','entries','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','pipe','path','function','UNIVER_UNKNOWN','Stop\x20following','includes','Start\x20following','has','event$','16dZbjSl','LiveShareController','_presenter','@univerjs/ui','Injector','toStringTag','Button','pluginName','4493398XDezRM','operators','useObservable','random','UniverLiveSharePlugin','NOT_FOLLOWING','UniverUi','packageName','stringify','subscribe','_reporters','params','IConfigService','CollaborationEvent','BuiltInUIPart','getValue','@univerjs-pro/collaboration','default','setConfig','0.21.1','Module','_handleNewChangeSets','_injector','react/jsx-runtime','Fragment','_fetchOperations','rxjs','iterator','type','forwardRef','@univerjs/core','init','values','Present\x20this\x20document','complete','univer-mb-3\x20univer-w-full\x20univer-text-sm','unitId','Stop\x20presenting','2030670vUpheX','useRef','mutations','getUnitId','_handleTerminate','DisposableCollection','getOwnPropertyDescriptor','UniverIcon','getLiveShareCoordinatorSync','send','_sharedOperations','registerInitialStateReporter','registerSharedOperation','_liveShareService','3333576xZWUsz','_status$','LiveShareCoordinator','Disposable','find','current','then','LiveShare','onCommandExecuted','currentColor','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','_configService','exports','_startPresenting','add','You\x27re\x20presenting\x20the\x20document','offline','_init','UNIVER_SHEET','1em','ICommandService','LIVESHARE_REQUEST_HOST','useState','_startLiveShareCoordinator','attrs','dispose$','_collabSessionService','univerjs-icon\x20univerjs-icon-','next','onRendered','IDLE','IUIPartsService','_mountLiveShare','_stopFollowing','stopFollowing','toDisposable','You\x27re\x20not\x20following\x20the\x20presenter','7982248bIReaH','NEW_CHANGESETS','OFFLINE','@univerjs-pro/live-share','_unitID','ONLINE','asObservable','Start'];_0x390f=function(){return _0x22a1c3;};return _0x390f();}(function(_0x1e3cdb,_0x3b8866){const _0x28f4d8=_0x47f5,_0x5dcc3a=_0x1e3cdb();while(!![]){try{const _0x4242a4=-parseInt(_0x28f4d8(0x155))/0x1*(-parseInt(_0x28f4d8(0x207))/0x2)+-parseInt(_0x28f4d8(0x1f3))/0x3*(parseInt(_0x28f4d8(0x191))/0x4)+parseInt(_0x28f4d8(0x1d6))/0x5+-parseInt(_0x28f4d8(0x1e9))/0x6+parseInt(_0x28f4d8(0x15d))/0x7+parseInt(_0x28f4d8(0x1b6))/0x8*(parseInt(_0x28f4d8(0x149))/0x9)+parseInt(_0x28f4d8(0x183))/0xa;if(_0x4242a4===_0x3b8866)break;else _0x5dcc3a['push'](_0x5dcc3a['shift']());}catch(_0x42f6e5){_0x5dcc3a['push'](_0x5dcc3a['shift']());}}}(_0x390f,0xf0966),function(_0x13713a,_0x2f6cb1){const _0x17dbdf=_0x47f5;typeof exports==_0x17dbdf(0x200)&&typeof module<'u'?_0x2f6cb1(exports,require(`@univerjs/core`),require(`@univerjs/ui`),require(`@univerjs/design`),require(`react`),require(`@univerjs-pro/collaboration`),require(`@univerjs-pro/collaboration-client`),require(`@univerjs/sheets`),require(`rxjs`),require(`rxjs/operators`),require(`react/jsx-runtime`),require(`@univerjs/sheets-ui`)):typeof define=='function'&&define[_0x17dbdf(0x13e)]?define([_0x17dbdf(0x19d),_0x17dbdf(0x17b),_0x17dbdf(0x158),'@univerjs/design','react',_0x17dbdf(0x16d),'@univerjs-pro/collaboration-client','@univerjs/sheets',_0x17dbdf(0x177),_0x17dbdf(0x1ea),_0x17dbdf(0x174),'@univerjs/sheets-ui'],_0x2f6cb1):(_0x13713a=typeof globalThis<'u'?globalThis:_0x13713a||self,_0x2f6cb1(_0x13713a[_0x17dbdf(0x134)]={},_0x13713a['UniverCore'],_0x13713a[_0x17dbdf(0x163)],_0x13713a[_0x17dbdf(0x1fd)],_0x13713a[_0x17dbdf(0x1e2)],_0x13713a[_0x17dbdf(0x20d)],_0x13713a['UniverProCollaborationClient'],_0x13713a[_0x17dbdf(0x144)],_0x13713a[_0x17dbdf(0x177)],_0x13713a[_0x17dbdf(0x177)][_0x17dbdf(0x15e)],_0x13713a[_0x17dbdf(0x1e2)],_0x13713a[_0x17dbdf(0x124)]));}(this,function(_0x55319d,_0x559ffa,_0x4ff132,_0x7f4c56,_0x1649cc,_0x79c46e,_0x102873,_0x2fead8,_0x4b05d6,_0xfbe07f,_0x1015a6,_0x4cdb8a){const _0x15201c=_0x47f5;Object[_0x15201c(0x12b)](_0x55319d,Symbol[_0x15201c(0x15a)],{'value':_0x15201c(0x171)});function _0x2a2dd1({ref:_0x4b6461,..._0x3e27aa}){const _0xdbeb55=_0x15201c;let {icon:_0x30b197,id:_0x9b5b12,className:_0x29c457,extend:_0x3a97f1,..._0x42f32d}=_0x3e27aa,_0x2b6ec8=(_0xdbeb55(0x1ac)+_0x9b5b12+'\x20'+(_0x29c457||''))['trim'](),_0x38fc3a=(0x0,_0x1649cc[_0xdbeb55(0x184)])('_'+_0xfa3e98());return _0x43da24(_0x30b197,''+_0x9b5b12,{'defIds':_0x30b197['defIds'],'idSuffix':_0x38fc3a['current']},{'ref':_0x4b6461,'className':_0x2b6ec8,..._0x42f32d},_0x3a97f1);}function _0x43da24(_0x153084,_0xe59601,_0x15c594,_0x74cb7b,_0x17929b){const _0x325cd0=_0x15201c;return(0x0,_0x1649cc[_0x325cd0(0x203)])(_0x153084[_0x325cd0(0x1f4)],{'key':_0xe59601,..._0xdbcb22(_0x153084,_0x15c594,_0x17929b),..._0x74cb7b},(_0x5435dc(_0x153084,_0x15c594)[_0x325cd0(0x214)]||[])[_0x325cd0(0x12f)]((_0x2f67b4,_0x3bc74a)=>_0x43da24(_0x2f67b4,_0xe59601+'-'+_0x153084[_0x325cd0(0x1f4)]+'-'+_0x3bc74a,_0x15c594,void 0x0,_0x17929b)));}function _0xdbcb22(_0x430b65,_0x2891b3,_0x1085b7){const _0x3ce088=_0x15201c;let _0x89c09a={..._0x430b65[_0x3ce088(0x1a9)]};_0x1085b7!=null&&_0x1085b7[_0x3ce088(0x1e7)]&&_0x89c09a[_0x3ce088(0x1e5)]===_0x3ce088(0x1e7)&&(_0x89c09a['fill']=_0x1085b7[_0x3ce088(0x1e7)]),_0x430b65[_0x3ce088(0x1f4)]===_0x3ce088(0x143)&&_0x89c09a['id']&&(_0x89c09a['id']+=_0x2891b3[_0x3ce088(0x140)]),Object[_0x3ce088(0x14a)](_0x89c09a)[_0x3ce088(0x205)](([_0x1b37ff,_0x12129c])=>{const _0x53f7b4=_0x3ce088;_0x1b37ff===_0x53f7b4(0x143)&&typeof _0x12129c==_0x53f7b4(0x1c0)&&(_0x89c09a[_0x1b37ff]=_0x12129c[_0x53f7b4(0x1e3)](/url\(#(.*)\)/,_0x53f7b4(0x1ec)+_0x2891b3['idSuffix']+')'));});let {defIds:_0x132242}=_0x2891b3;return!_0x132242||_0x132242[_0x3ce088(0x1d1)]===0x0?_0x89c09a:(_0x430b65[_0x3ce088(0x1f4)]==='use'&&_0x89c09a[_0x3ce088(0x136)]&&(_0x89c09a[_0x3ce088(0x136)]+=_0x2891b3[_0x3ce088(0x140)]),Object['entries'](_0x89c09a)['forEach'](([_0x104193,_0x22527e])=>{const _0x4984d1=_0x3ce088;typeof _0x22527e==_0x4984d1(0x1c0)&&(_0x89c09a[_0x104193]=_0x22527e[_0x4984d1(0x1e3)](/url\(#(.*)\)/,'url(#$1'+_0x2891b3['idSuffix']+')'));}),_0x89c09a);}function _0x5435dc(_0x2035b9,_0x222866){const _0x281d1c=_0x15201c;var _0x5b697b;let {defIds:_0x55f331}=_0x222866;return!_0x55f331||_0x55f331[_0x281d1c(0x1d1)]===0x0?_0x2035b9:_0x2035b9['tag']===_0x281d1c(0x125)&&(_0x5b697b=_0x2035b9['children'])!=null&&_0x5b697b[_0x281d1c(0x1d1)]?{..._0x2035b9,'children':_0x2035b9[_0x281d1c(0x214)]['map'](_0x5d15f3=>typeof _0x5d15f3['attrs']['id']==_0x281d1c(0x1c0)&&_0x55f331&&_0x55f331['includes'](_0x5d15f3[_0x281d1c(0x1a9)]['id'])?{..._0x5d15f3,'attrs':{..._0x5d15f3[_0x281d1c(0x1a9)],'id':_0x5d15f3['attrs']['id']+_0x222866[_0x281d1c(0x140)]}}:_0x5d15f3)}:_0x2035b9;}function _0xfa3e98(){const _0x176ac3=_0x15201c;return Math[_0x176ac3(0x160)]()[_0x176ac3(0x1fb)](0x24)[_0x176ac3(0x1c9)](0x2,0x8);}_0x2a2dd1[_0x15201c(0x1ee)]=_0x15201c(0x18a);let _0x47848f={'tag':'svg','attrs':{'xmlns':'http://www.w3.org/2000/svg','fill':_0x15201c(0x1c5),'viewBox':'0\x200\x2017\x2017','width':_0x15201c(0x1a4),'height':_0x15201c(0x1a4)},'children':[{'tag':_0x15201c(0x14d),'attrs':{'fill':'currentColor','d':'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'}},{'tag':'path','attrs':{'fill':_0x15201c(0x19a),'d':_0x15201c(0x14b),'fillRule':_0x15201c(0x1cb),'clipRule':_0x15201c(0x1cb)}}]},_0x2c11bd=(0x0,_0x1649cc[_0x15201c(0x17a)])(function(_0x512126,_0x3b457b){const _0x594bf9=_0x15201c;return(0x0,_0x1649cc[_0x594bf9(0x203)])(_0x2a2dd1,Object['assign']({},_0x512126,{'id':_0x594bf9(0x1e0),'ref':_0x3b457b,'icon':_0x47848f}));});_0x2c11bd['displayName']='LiveShareIcon';function _0x4f514f(_0x27690f){'@babel/helpers - typeof';const _0x3c14e3=_0x15201c;return _0x4f514f=typeof Symbol==_0x3c14e3(0x14e)&&typeof Symbol[_0x3c14e3(0x178)]==_0x3c14e3(0x20f)?function(_0x4468ad){return typeof _0x4468ad;}:function(_0x512569){const _0x2d6c58=_0x3c14e3;return _0x512569&&typeof Symbol==_0x2d6c58(0x14e)&&_0x512569[_0x2d6c58(0x1cc)]===Symbol&&_0x512569!==Symbol[_0x2d6c58(0x12e)]?'symbol':typeof _0x512569;},_0x4f514f(_0x27690f);}function _0x102860(_0xf4f32e,_0x153dc5){const _0x4263f9=_0x15201c;if(_0x4f514f(_0xf4f32e)!=_0x4263f9(0x200)||!_0xf4f32e)return _0xf4f32e;var _0x25c992=_0xf4f32e[Symbol[_0x4263f9(0x127)]];if(_0x25c992!==void 0x0){var _0x4e5e22=_0x25c992[_0x4263f9(0x12c)](_0xf4f32e,_0x153dc5||_0x4263f9(0x16e));if(_0x4f514f(_0x4e5e22)!=_0x4263f9(0x200))return _0x4e5e22;throw TypeError(_0x4263f9(0x1c2));}return(_0x153dc5===_0x4263f9(0x1c0)?String:Number)(_0xf4f32e);}function _0x39bcf8(_0x3c8252){const _0x32c07e=_0x15201c;var _0x441609=_0x102860(_0x3c8252,_0x32c07e(0x1c0));return _0x4f514f(_0x441609)==_0x32c07e(0x20f)?_0x441609:_0x441609+'';}function _0x3c9bc7(_0x4e7021,_0x18f79b,_0x564d46){const _0x3de875=_0x15201c;return(_0x18f79b=_0x39bcf8(_0x18f79b))in _0x4e7021?Object[_0x3de875(0x12b)](_0x4e7021,_0x18f79b,{'value':_0x564d46,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4e7021[_0x18f79b]=_0x564d46,_0x4e7021;}var _0x1fccc0=class extends _0x559ffa[_0x15201c(0x194)]{constructor(..._0x1a2db8){const _0x229625=_0x15201c;super(..._0x1a2db8),_0x3c9bc7(this,_0x229625(0x18d),new Set()),_0x3c9bc7(this,_0x229625(0x167),new Set());}[_0x15201c(0x18f)](_0x12d552){const _0x314356=_0x15201c;return this['_sharedOperations']['add'](_0x12d552),(0x0,_0x559ffa[_0x314356(0x1b4)])(()=>this[_0x314356(0x18d)]['delete'](_0x12d552));}[_0x15201c(0x18e)](_0x5be8fd){const _0x532e83=_0x15201c;return this['_reporters'][_0x532e83(0x19f)](_0x5be8fd),(0x0,_0x559ffa[_0x532e83(0x1b4)])(()=>this[_0x532e83(0x167)]['delete'](_0x5be8fd));}['shouldShareOperation'](_0x4ce0b5){const _0x52b60e=_0x15201c;return this[_0x52b60e(0x18d)][_0x52b60e(0x153)](_0x4ce0b5);}['getInitialStates'](_0xc43527){const _0x4bc4e4=_0x15201c;return Array[_0x4bc4e4(0x1d2)](this['_reporters'])[_0x4bc4e4(0x12f)](_0x380bf7=>_0x380bf7(_0xc43527));}};function _0x48da0f(_0x3508c9,_0x3aab26){return function(_0x3a469e,_0x5e05d2){_0x3aab26(_0x3a469e,_0x5e05d2,_0x3508c9);};}function _0x2b9a66(_0x1907fb,_0x2a58b6,_0x217a2e,_0x670a21){const _0x40686a=_0x15201c;var _0x2d9afb=arguments['length'],_0x2c7864=_0x2d9afb<0x3?_0x2a58b6:_0x670a21===null?_0x670a21=Object[_0x40686a(0x189)](_0x2a58b6,_0x217a2e):_0x670a21,_0x3fcc0c;if(typeof Reflect==_0x40686a(0x200)&&typeof Reflect['decorate']==_0x40686a(0x14e))_0x2c7864=Reflect[_0x40686a(0x1ce)](_0x1907fb,_0x2a58b6,_0x217a2e,_0x670a21);else{for(var _0x3ed29b=_0x1907fb[_0x40686a(0x1d1)]-0x1;_0x3ed29b>=0x0;_0x3ed29b--)(_0x3fcc0c=_0x1907fb[_0x3ed29b])&&(_0x2c7864=(_0x2d9afb<0x3?_0x3fcc0c(_0x2c7864):_0x2d9afb>0x3?_0x3fcc0c(_0x2a58b6,_0x217a2e,_0x2c7864):_0x3fcc0c(_0x2a58b6,_0x217a2e))||_0x2c7864);}return _0x2d9afb>0x3&&_0x2c7864&&Object[_0x40686a(0x12b)](_0x2a58b6,_0x217a2e,_0x2c7864),_0x2c7864;}let _0x2cbfb0=class extends _0x559ffa['RxDisposable']{constructor(_0x38dc7a,_0x3a4564,_0x1487cb){const _0x3a6f61=_0x15201c;super(),this[_0x3a6f61(0x130)]=_0x38dc7a,this[_0x3a6f61(0x173)]=_0x3a4564,this['_collabSessionService']=_0x1487cb,_0x3c9bc7(this,_0x3a6f61(0x208),new Map()),this[_0x3a6f61(0x1a2)]();}async[_0x15201c(0x209)](_0x3cfd9d){const _0x17efc2=_0x15201c;return this[_0x17efc2(0x208)][_0x17efc2(0x153)](_0x3cfd9d)||await this[_0x17efc2(0x1a8)](_0x3cfd9d),this[_0x17efc2(0x208)][_0x17efc2(0x1f0)](_0x3cfd9d);}[_0x15201c(0x18b)](_0x59f69b){const _0x2f35ea=_0x15201c;var _0x3a4632;return(_0x3a4632=this['_entities'][_0x2f35ea(0x1f0)](_0x59f69b))==null?null:_0x3a4632;}[_0x15201c(0x1a2)](){const _0x354439=_0x15201c;this[_0x354439(0x130)][_0x354439(0x1de)](_0x559ffa[_0x354439(0x1f6)]['UNIVER_SHEET'])[_0x354439(0x14c)]((0x0,_0xfbe07f[_0x354439(0x13a)])(this[_0x354439(0x1aa)]))[_0x354439(0x166)](async _0x1bcf6c=>{const _0x25a22f=_0x354439;let _0x46906c=_0x1bcf6c[_0x25a22f(0x13b)][_0x25a22f(0x186)]();this[_0x25a22f(0x208)][_0x25a22f(0x153)](_0x46906c)||this['_startLiveShareCoordinator'](_0x46906c);}),this[_0x354439(0x130)]['getTypeOfUnitDisposed$'](_0x559ffa[_0x354439(0x1f6)][_0x354439(0x1a3)])['pipe']((0x0,_0xfbe07f[_0x354439(0x13a)])(this['dispose$']))[_0x354439(0x166)](_0xea7ee7=>{const _0x569ce7=_0x354439;let _0x120e5e=_0xea7ee7[_0x569ce7(0x186)](),_0x19b322=this[_0x569ce7(0x208)][_0x569ce7(0x1f0)](_0x120e5e);_0x19b322==null||_0x19b322[_0x569ce7(0x142)]();});}async[_0x15201c(0x1a8)](_0x575710){const _0x3f950c=_0x15201c;let _0x56a596=await this[_0x3f950c(0x1ab)][_0x3f950c(0x1fc)](_0x575710),_0x3cce64=this[_0x3f950c(0x173)][_0x3f950c(0x1dd)](_0x197ff9,_0x575710,_0x56a596);return _0x3cce64['init'](),this[_0x3f950c(0x208)][_0x3f950c(0x1c7)](_0x575710,_0x3cce64),_0x3cce64;}};_0x2cbfb0=_0x2b9a66([_0x48da0f(0x0,_0x559ffa[_0x15201c(0x215)]),_0x48da0f(0x1,(0x0,_0x559ffa[_0x15201c(0x1e8)])(_0x559ffa[_0x15201c(0x159)])),_0x48da0f(0x2,(0x0,_0x559ffa['Inject'])(_0x102873['CollaborationSessionService']))],_0x2cbfb0);let _0x4fa1c1=function(_0x56389b){const _0x57783e=_0x15201c;return _0x56389b[_0x57783e(0x1b8)]=_0x57783e(0x1a1),_0x56389b[_0x57783e(0x1af)]=_0x57783e(0x201),_0x56389b['FOLLOWING']=_0x57783e(0x1e6),_0x56389b[_0x57783e(0x162)]=_0x57783e(0x1df),_0x56389b[_0x57783e(0x1ef)]='presenting',_0x56389b;}({}),_0x197ff9=class extends _0x559ffa['RxDisposable']{get['_status'](){const _0x2c6dd6=_0x15201c;return this[_0x2c6dd6(0x192)][_0x2c6dd6(0x16c)]();}constructor(_0x14cf5b,_0x15a458,_0x28526d,_0xcbc126,_0x2a125b){const _0x54ad63=_0x15201c;super(),this['_unitID']=_0x14cf5b,this[_0x54ad63(0x1f1)]=_0x15a458,this[_0x54ad63(0x19c)]=_0x28526d,this[_0x54ad63(0x190)]=_0xcbc126,this[_0x54ad63(0x1c8)]=_0x2a125b,_0x3c9bc7(this,_0x54ad63(0x192),new _0x4b05d6[(_0x54ad63(0x132))](_0x4fa1c1[_0x54ad63(0x1af)])),_0x3c9bc7(this,_0x54ad63(0x1d0),this[_0x54ad63(0x192)][_0x54ad63(0x1bc)]()),_0x3c9bc7(this,'_init',!0x1),_0x3c9bc7(this,_0x54ad63(0x1db),null),_0x3c9bc7(this,_0x54ad63(0x157),null);}[_0x15201c(0x142)](){const _0x2f9920=_0x15201c;var _0x1bbc15;(_0x1bbc15=this[_0x2f9920(0x1db)])==null||_0x1bbc15[_0x2f9920(0x142)](),this[_0x2f9920(0x192)][_0x2f9920(0x1ad)](_0x4fa1c1[_0x2f9920(0x1af)]),this[_0x2f9920(0x192)][_0x2f9920(0x17f)]();}[_0x15201c(0x145)](){const _0x3f8401=_0x15201c;return this[_0x3f8401(0x131)];}[_0x15201c(0x17c)](){const _0x4d590f=_0x15201c;this[_0x4d590f(0x1a2)]||(this[_0x4d590f(0x1a2)]=!0x0,this[_0x4d590f(0x1f1)][_0x4d590f(0x213)][_0x4d590f(0x14c)]((0x0,_0xfbe07f[_0x4d590f(0x13a)])(this[_0x4d590f(0x1aa)]))[_0x4d590f(0x166)](_0xcfcb58=>{const _0x1d1651=_0x4d590f;switch(_0xcfcb58){case _0x102873[_0x1d1651(0x1d3)][_0x1d1651(0x1b8)]:this[_0x1d1651(0x1d8)]();break;case _0x102873[_0x1d1651(0x1d3)][_0x1d1651(0x1bb)]:this['_handleOnline']();break;default:}}),this['_collabSession'][_0x4d590f(0x154)][_0x4d590f(0x14c)]((0x0,_0xfbe07f[_0x4d590f(0x13a)])(this['dispose$']))[_0x4d590f(0x166)](_0x5e0583=>{const _0x45a59f=_0x4d590f;let {eventID:_0x200dc6}=_0x5e0583;switch(_0x200dc6){case _0x79c46e[_0x45a59f(0x16a)]['LIVESHARE_NEW_HOST']:this[_0x45a59f(0x147)](_0x5e0583);break;case _0x79c46e[_0x45a59f(0x16a)][_0x45a59f(0x211)]:this[_0x45a59f(0x202)](_0x5e0583);break;case _0x79c46e[_0x45a59f(0x16a)][_0x45a59f(0x13d)]:this[_0x45a59f(0x187)]();break;case _0x79c46e[_0x45a59f(0x16a)][_0x45a59f(0x1b7)]:this['_handleNewChangeSets'](_0x5e0583);break;default:}}));}['tryStartPresenting'](){const _0x5bcc2c=_0x15201c;this['_collabSession'][_0x5bcc2c(0x18c)]({'eventID':_0x79c46e['CollaborationEvent'][_0x5bcc2c(0x1a6)],'data':{'unitID':this['_unitID'],'userID':this['_collabSession'][_0x5bcc2c(0x1dc)]()}},this[_0x5bcc2c(0x1ba)]);}[_0x15201c(0x13f)](){const _0x4fad73=_0x15201c;this['_status']===_0x4fa1c1[_0x4fad73(0x1ef)]&&(this[_0x4fad73(0x192)][_0x4fad73(0x1ad)](_0x4fa1c1[_0x4fad73(0x1af)]),this[_0x4fad73(0x1f1)][_0x4fad73(0x18c)]({'eventID':_0x79c46e[_0x4fad73(0x16a)][_0x4fad73(0x13d)],'data':{'unitID':this[_0x4fad73(0x1ba)]}},this[_0x4fad73(0x1ba)]));}[_0x15201c(0x1e1)](){const _0x567b38=_0x15201c;this['_status']===_0x4fa1c1[_0x567b38(0x162)]&&(this[_0x567b38(0x192)][_0x567b38(0x1ad)](_0x4fa1c1[_0x567b38(0x210)]),this[_0x567b38(0x133)]());}[_0x15201c(0x1b3)](){const _0x1efddd=_0x15201c;this[_0x1efddd(0x131)]===_0x4fa1c1[_0x1efddd(0x210)]&&this[_0x1efddd(0x1b2)]();}['_handleNewHost'](_0x53570f){const _0x30cb32=_0x15201c;let {presenter:_0x70f901}=_0x53570f[_0x30cb32(0x1c1)],_0x1f61be=this[_0x30cb32(0x1f1)][_0x30cb32(0x1dc)]();this[_0x30cb32(0x157)]=_0x70f901,_0x70f901===_0x1f61be?(this[_0x30cb32(0x1b2)](),this[_0x30cb32(0x19e)]()):this[_0x30cb32(0x131)]!==_0x4fa1c1[_0x30cb32(0x162)]&&(this['_stopPresenting'](),this[_0x30cb32(0x133)]());}[_0x15201c(0x176)](){const _0xbd309a=_0x15201c;let _0x144ddc={'eventID':_0x79c46e[_0xbd309a(0x16a)]['LIVESHARE_FETCH_OPERATIONS']};this[_0xbd309a(0x1f1)][_0xbd309a(0x18c)](_0x144ddc,this[_0xbd309a(0x1ba)]);}[_0x15201c(0x187)](){const _0xa47c41=_0x15201c;this[_0xa47c41(0x157)]=null,this[_0xa47c41(0x131)]!==_0x4fa1c1[_0xa47c41(0x1ef)]&&this[_0xa47c41(0x1f9)]();}[_0x15201c(0x172)](_0x4d53a1){const _0x293e70=_0x15201c;if(this[_0x293e70(0x131)]===_0x4fa1c1[_0x293e70(0x210)]&&this[_0x293e70(0x157)]===_0x4d53a1[_0x293e70(0x1c1)][_0x293e70(0x146)]){let _0x505440=(0x0,_0x79c46e['parseProtocolChangeset'])(_0x4d53a1[_0x293e70(0x1c1)])[_0x293e70(0x185)][_0x293e70(0x123)]()[_0x293e70(0x195)](_0x1af344=>_0x1af344['id']===_0x2fead8['InsertSheetMutation']['id']);if(_0x505440){let _0x259238=_0x505440[_0x293e70(0x168)][_0x293e70(0x181)],_0x473d5a=_0x505440[_0x293e70(0x168)][_0x293e70(0x1da)]['id'];setTimeout(()=>{const _0x1a44c3=_0x293e70;this[_0x1a44c3(0x1c8)][_0x1a44c3(0x1be)](_0x2fead8['SetWorksheetActiveOperation']['id'],{'unitId':_0x259238,'subUnitId':_0x473d5a},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x26a777=_0x15201c;this[_0x26a777(0x192)][_0x26a777(0x1ad)](_0x4fa1c1[_0x26a777(0x1ef)]);let _0x581457=new Map(),_0x52e776=this[_0x26a777(0x1db)]=new _0x559ffa[(_0x26a777(0x188))]();_0x52e776[_0x26a777(0x19f)]((0x0,_0x559ffa[_0x26a777(0x1b4)])(()=>{const _0x180314=_0x26a777;_0x581457[_0x180314(0x205)](_0x5a85f1=>_0x5a85f1[_0x180314(0x17f)]()),_0x581457[_0x180314(0x13c)]();})),_0x52e776[_0x26a777(0x19f)](this[_0x26a777(0x1c8)][_0x26a777(0x199)](_0x2c2855=>{const _0x2a889c=_0x26a777;if(_0x2c2855[_0x2a889c(0x179)]!==_0x559ffa['CommandType']['OPERATION']||!this[_0x2a889c(0x190)][_0x2a889c(0x1d7)](_0x2c2855['id']))return;let {id:_0x54e994}=_0x2c2855,_0x5f4ff9;if(_0x581457[_0x2a889c(0x153)](_0x54e994))_0x5f4ff9=_0x581457['get'](_0x54e994);else{var _0x36a865;_0x5f4ff9=new _0x4b05d6[(_0x2a889c(0x1d9))](),_0x581457[_0x2a889c(0x1c7)](_0x54e994,_0x5f4ff9),_0x5f4ff9[_0x2a889c(0x14c)]((0x0,_0xfbe07f[_0x2a889c(0x1ff)])((_0x36a865=this[_0x2a889c(0x19c)][_0x2a889c(0x135)]('SAME_OPERATION_SHARE_INTERVAL'))==null?0xc8:_0x36a865,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x2a889c(0x166)](_0x1d419a=>{const _0x3f1a88=_0x2a889c;this[_0x3f1a88(0x1f1)][_0x3f1a88(0x18c)]({'eventID':_0x79c46e[_0x3f1a88(0x16a)][_0x3f1a88(0x211)],'data':{'unitID':this[_0x3f1a88(0x1ba)],'operations':{[_0x1d419a['id']]:{'id':_0x1d419a['id'],'params':JSON[_0x3f1a88(0x165)](_0x1d419a[_0x3f1a88(0x168)])}}}},this[_0x3f1a88(0x1ba)]);});}_0x5f4ff9[_0x2a889c(0x1ad)](_0x2c2855);})),this[_0x26a777(0x190)][_0x26a777(0x206)](this[_0x26a777(0x1ba)])[_0x26a777(0x205)](_0x1c750e=>this[_0x26a777(0x1f1)][_0x26a777(0x18c)]({'eventID':_0x79c46e[_0x26a777(0x16a)][_0x26a777(0x211)],'data':{'unitID':this[_0x26a777(0x1ba)],'operations':{[_0x1c750e['id']]:{'id':_0x1c750e['id'],'params':JSON[_0x26a777(0x165)](_0x1c750e['params'])}}}},this['_unitID']));}['_stopPresenting'](){const _0x53eb19=_0x15201c;var _0x2355da;this['_status$'][_0x53eb19(0x1ad)](_0x4fa1c1[_0x53eb19(0x1af)]),(_0x2355da=this[_0x53eb19(0x1db)])==null||_0x2355da['dispose'](),this[_0x53eb19(0x1db)]=null;}[_0x15201c(0x133)](){const _0x2bb45d=_0x15201c;var _0x5f41b3;(_0x5f41b3=this[_0x2bb45d(0x1db)])==null||_0x5f41b3[_0x2bb45d(0x142)](),this[_0x2bb45d(0x192)]['next'](_0x4fa1c1['FOLLOWING']);}[_0x15201c(0x1f9)](){const _0x5cdbcb=_0x15201c;var _0x53c763;this['_status$'][_0x5cdbcb(0x1ad)](_0x4fa1c1[_0x5cdbcb(0x1af)]),(_0x53c763=this[_0x5cdbcb(0x1db)])==null||_0x53c763[_0x5cdbcb(0x142)](),this[_0x5cdbcb(0x1db)]=null;}[_0x15201c(0x1b2)](){const _0x53dfca=_0x15201c;var _0x3e6351;this[_0x53dfca(0x192)][_0x53dfca(0x1ad)](_0x4fa1c1[_0x53dfca(0x162)]),(_0x3e6351=this[_0x53dfca(0x1db)])==null||_0x3e6351[_0x53dfca(0x142)]();}[_0x15201c(0x202)](_0x12d2d3){const _0x497bd1=_0x15201c;if([_0x4fa1c1['PRESENTING'],_0x4fa1c1[_0x497bd1(0x162)],_0x4fa1c1[_0x497bd1(0x1b8)]][_0x497bd1(0x151)](this[_0x497bd1(0x131)])||!_0x12d2d3[_0x497bd1(0x1c1)]['presenter']||_0x12d2d3[_0x497bd1(0x1c1)][_0x497bd1(0x1cf)]===this[_0x497bd1(0x1f1)][_0x497bd1(0x1dc)]())return;this[_0x497bd1(0x131)]===_0x4fa1c1[_0x497bd1(0x1af)]&&this[_0x497bd1(0x133)]();let _0x5779aa=_0x12d2d3[_0x497bd1(0x1c1)][_0x497bd1(0x1f8)];Object[_0x497bd1(0x17d)](_0x5779aa)[_0x497bd1(0x205)](_0x499150=>{const _0x407148=_0x497bd1;this['_commandService'][_0x407148(0x1be)](_0x499150['id'],_0x499150[_0x407148(0x168)]?JSON['parse'](_0x499150[_0x407148(0x168)]):null,{'fromCollab':!0x0});});}[_0x15201c(0x1d8)](){const _0x1589fe=_0x15201c;var _0x123f74;this[_0x1589fe(0x192)]['next'](_0x4fa1c1['OFFLINE']),(_0x123f74=this[_0x1589fe(0x1db)])==null||_0x123f74[_0x1589fe(0x142)]();}[_0x15201c(0x1fe)](){const _0x10d0ef=_0x15201c;this[_0x10d0ef(0x192)][_0x10d0ef(0x1ad)](_0x4fa1c1[_0x10d0ef(0x1af)]),this[_0x10d0ef(0x176)]();}};_0x197ff9=_0x2b9a66([_0x48da0f(0x2,_0x559ffa['IConfigService']),_0x48da0f(0x3,(0x0,_0x559ffa[_0x15201c(0x1e8)])(_0x1fccc0)),_0x48da0f(0x4,_0x559ffa[_0x15201c(0x1a5)])],_0x197ff9);function _0x5f3f56(){const _0x492d0b=_0x15201c;let _0x1ffb6d=(0x0,_0x4ff132[_0x492d0b(0x129)])(_0x2cbfb0),_0x3f6f45=(0x0,_0x4ff132['useDependency'])(_0x559ffa[_0x492d0b(0x215)]),_0x36d53f=(0x0,_0x4ff132[_0x492d0b(0x15f)])(()=>_0x3f6f45['getCurrentTypeOfUnit$'](_0x559ffa[_0x492d0b(0x1f6)][_0x492d0b(0x1a3)]),void 0x0,!0x1,[]),[_0x438e4f,_0x4a9087]=(0x0,_0x1649cc[_0x492d0b(0x1a7)])(null),[_0x5d9313,_0x44b12d]=(0x0,_0x1649cc[_0x492d0b(0x1a7)])(_0x4fa1c1[_0x492d0b(0x1af)]),_0x433498=(0x0,_0x1649cc[_0x492d0b(0x184)])(null);return(0x0,_0x1649cc[_0x492d0b(0x1f5)])(()=>(_0x36d53f&&_0x1ffb6d[_0x492d0b(0x209)](_0x36d53f[_0x492d0b(0x186)]())[_0x492d0b(0x197)](_0x14bbaf=>{const _0x3f3cbb=_0x492d0b;_0x4a9087(_0x14bbaf),_0x433498[_0x3f3cbb(0x196)]=_0x14bbaf['status$'][_0x3f3cbb(0x166)](_0x378660=>{_0x44b12d(_0x378660);});}),()=>{const _0x7633aa=_0x492d0b;var _0x4d84ac;(_0x4d84ac=_0x433498[_0x7633aa(0x196)])==null||_0x4d84ac[_0x7633aa(0x204)](),_0x433498[_0x7633aa(0x196)]=null;}),[_0x36d53f,_0x1ffb6d]),_0x438e4f?(0x0,_0x1015a6[_0x492d0b(0x1ca)])(_0x7f4c56['Dropdown'],{'align':_0x492d0b(0x217),'disabled':_0x5d9313===_0x4fa1c1[_0x492d0b(0x1b8)],'className':_0x492d0b(0x19b),'overlay':(0x0,_0x1015a6[_0x492d0b(0x1ca)])(_0xf52452,{'status':_0x5d9313,'coordinator':_0x438e4f}),'children':(0x0,_0x1015a6[_0x492d0b(0x1ca)])(_0x492d0b(0x141),{'className':(0x0,_0x7f4c56['clsx'])(_0x492d0b(0x12a),{'univer-cursor-not-allowed':_0x5d9313===_0x4fa1c1['OFFLINE'],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x5d9313!==_0x4fa1c1[_0x492d0b(0x1b8)]}),'type':'button','children':(0x0,_0x1015a6[_0x492d0b(0x1ca)])(_0x2c11bd,{'className':_0x492d0b(0x139)})})}):null;}function _0xf52452(_0x39a364){const _0xd1047b=_0x15201c;let {status:_0x1f58b3,coordinator:_0x1e790b}=_0x39a364;switch(_0x1f58b3){case _0x4fa1c1[_0xd1047b(0x1af)]:return(0x0,_0x1015a6[_0xd1047b(0x1ca)])(_0x453f46,{'coordinator':_0x1e790b});case _0x4fa1c1['FOLLOWING']:return(0x0,_0x1015a6[_0xd1047b(0x1ca)])(_0x56a602,{'coordinator':_0x1e790b});case _0x4fa1c1[_0xd1047b(0x162)]:return(0x0,_0x1015a6[_0xd1047b(0x1ca)])(_0x127879,{'coordinator':_0x1e790b});case _0x4fa1c1[_0xd1047b(0x1b8)]:return(0x0,_0x1015a6[_0xd1047b(0x1ca)])(_0x148a8d,{});case _0x4fa1c1[_0xd1047b(0x1ef)]:return(0x0,_0x1015a6[_0xd1047b(0x1ca)])(_0xca6508,{'coordinator':_0x1e790b});default:return null;}}function _0x453f46(_0x385811){const _0x28d091=_0x15201c;let {coordinator:_0x1dd6e}=_0x385811;return(0x0,_0x1015a6[_0x28d091(0x212)])(_0x1015a6[_0x28d091(0x175)],{'children':[(0x0,_0x1015a6[_0x28d091(0x1ca)])(_0x28d091(0x20a),{'className':_0x28d091(0x180),'children':_0x28d091(0x17e)}),(0x0,_0x1015a6['jsx'])(_0x7f4c56[_0x28d091(0x15b)],{'onClick':()=>_0x1dd6e[_0x28d091(0x1f2)](),'children':_0x28d091(0x1bd)})]});}function _0x56a602(_0x5d90fd){const _0x42dd69=_0x15201c;let {coordinator:_0x5a8b33}=_0x5d90fd;return(0x0,_0x1015a6[_0x42dd69(0x212)])(_0x1015a6['Fragment'],{'children':[(0x0,_0x1015a6[_0x42dd69(0x1ca)])(_0x42dd69(0x20a),{'className':_0x42dd69(0x180),'children':_0x42dd69(0x1c6)}),(0x0,_0x1015a6[_0x42dd69(0x1ca)])(_0x7f4c56[_0x42dd69(0x15b)],{'onClick':()=>_0x5a8b33['stopFollowing'](),'children':_0x42dd69(0x150)})]});}function _0x127879(_0x5a661d){const _0x5f48f5=_0x15201c;let {coordinator:_0x35be21}=_0x5a661d;return(0x0,_0x1015a6[_0x5f48f5(0x212)])(_0x1015a6[_0x5f48f5(0x175)],{'children':[(0x0,_0x1015a6[_0x5f48f5(0x1ca)])(_0x5f48f5(0x20a),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x5f48f5(0x1b5)}),(0x0,_0x1015a6[_0x5f48f5(0x1ca)])(_0x7f4c56['Button'],{'variant':_0x5f48f5(0x1c3),'onClick':()=>_0x35be21[_0x5f48f5(0x1e1)](),'children':_0x5f48f5(0x152)})]});}function _0xca6508(_0x210f5b){const _0x51e6c1=_0x15201c;let {coordinator:_0x563084}=_0x210f5b;return(0x0,_0x1015a6[_0x51e6c1(0x212)])(_0x1015a6[_0x51e6c1(0x175)],{'children':[(0x0,_0x1015a6['jsx'])(_0x51e6c1(0x20a),{'className':_0x51e6c1(0x180),'children':_0x51e6c1(0x1a0)}),(0x0,_0x1015a6[_0x51e6c1(0x1ca)])(_0x7f4c56[_0x51e6c1(0x15b)],{'variant':'default','onClick':()=>_0x563084[_0x51e6c1(0x13f)](),'children':_0x51e6c1(0x182)})]});}function _0x148a8d(){const _0x31b722=_0x15201c;return(0x0,_0x1015a6['jsx'])(_0x1015a6[_0x31b722(0x175)],{'children':_0x31b722(0x1ed)});}let _0x18e041=class extends _0x559ffa[_0x15201c(0x194)]{constructor(_0x237e98,_0x411a6d){const _0xd7adc0=_0x15201c;super(),this[_0xd7adc0(0x173)]=_0x237e98,this[_0xd7adc0(0x1eb)]=_0x411a6d,this[_0xd7adc0(0x1b1)]();}[_0x15201c(0x1b1)](){const _0x565634=_0x15201c;this['disposeWithMe'](this['_uiPartsService'][_0x565634(0x1d4)](_0x4ff132[_0x565634(0x16b)]['HEADER_MENU'],()=>(0x0,_0x4ff132[_0x565634(0x1cd)])(_0x5f3f56,this[_0x565634(0x173)])));}};_0x18e041=_0x2b9a66([_0x48da0f(0x0,(0x0,_0x559ffa[_0x15201c(0x1e8)])(_0x559ffa[_0x15201c(0x159)])),_0x48da0f(0x1,_0x4ff132[_0x15201c(0x1b0)])],_0x18e041);var _0x3db719=_0x15201c(0x1b9),_0x12fc3a=_0x15201c(0x170);let _0x680903=_0x15201c(0x128);Symbol(_0x680903);let _0x3df61c={},_0x5f3405=class extends _0x559ffa['Disposable']{constructor(_0x488851){const _0x232ea9=_0x15201c;super(),this[_0x232ea9(0x190)]=_0x488851,this[_0x232ea9(0x1a2)]();}[_0x15201c(0x1a2)](){const _0x26741a=_0x15201c;[_0x4cdb8a[_0x26741a(0x1c4)]['id'],_0x4cdb8a[_0x26741a(0x20b)]['id'],_0x2fead8[_0x26741a(0x1e4)]['id']][_0x26741a(0x205)](_0x3b14df=>{const _0x366315=_0x26741a;this['disposeWithMe'](this[_0x366315(0x190)][_0x366315(0x18f)](_0x3b14df));});}};_0x5f3405=_0x2b9a66([_0x48da0f(0x0,(0x0,_0x559ffa[_0x15201c(0x1e8)])(_0x1fccc0))],_0x5f3405);let _0x188afa=class extends _0x559ffa[_0x15201c(0x20c)]{constructor(_0x42cd1e=_0x3df61c,_0x26507c,_0x26f2dc){const _0x109e6e=_0x15201c;super(),this[_0x109e6e(0x1f7)]=_0x42cd1e,this[_0x109e6e(0x173)]=_0x26507c,this[_0x109e6e(0x19c)]=_0x26f2dc;let {..._0x2704b6}=(0x0,_0x559ffa[_0x109e6e(0x12d)])({},_0x3df61c,this['_config']);this['_configService'][_0x109e6e(0x16f)](_0x680903,_0x2704b6);}['onStarting'](){const _0x50fad9=_0x15201c;(0x0,_0x559ffa[_0x50fad9(0x126)])(this[_0x50fad9(0x173)],(0x0,_0x559ffa[_0x50fad9(0x1fa)])([[_0x1fccc0],[_0x2cbfb0],[_0x5f3405],[_0x18e041]],this[_0x50fad9(0x1f7)][_0x50fad9(0x1bf)])),(0x0,_0x559ffa[_0x50fad9(0x138)])(this[_0x50fad9(0x173)],[[_0x5f3405]]);}[_0x15201c(0x1ae)](){const _0xcfd7cb=_0x15201c;(0x0,_0x559ffa[_0xcfd7cb(0x138)])(this[_0xcfd7cb(0x173)],[[_0x18e041]]);}};_0x3c9bc7(_0x188afa,_0x15201c(0x179),_0x559ffa['UniverInstanceType'][_0x15201c(0x14f)]),_0x3c9bc7(_0x188afa,_0x15201c(0x15c),'UNIVER_LIVE_SHARE_PLUGIN'),_0x3c9bc7(_0x188afa,_0x15201c(0x164),_0x3db719),_0x3c9bc7(_0x188afa,_0x15201c(0x1d5),_0x12fc3a),_0x188afa=_0x2b9a66([(0x0,_0x559ffa['DependentOn'])(_0x102873[_0x15201c(0x216)]),_0x48da0f(0x1,(0x0,_0x559ffa[_0x15201c(0x1e8)])(_0x559ffa['Injector'])),_0x48da0f(0x2,_0x559ffa[_0x15201c(0x169)])],_0x188afa),Object['defineProperty'](_0x55319d,_0x15201c(0x137),{'enumerable':!0x0,'get':function(){return _0x18e041;}}),_0x55319d[_0x15201c(0x198)]=_0x5f3f56,Object[_0x15201c(0x12b)](_0x55319d,_0x15201c(0x156),{'enumerable':!0x0,'get':function(){return _0x2cbfb0;}}),Object[_0x15201c(0x12b)](_0x55319d,_0x15201c(0x193),{'enumerable':!0x0,'get':function(){return _0x197ff9;}}),_0x55319d[_0x15201c(0x20e)]=_0x1fccc0,_0x55319d[_0x15201c(0x148)]=_0x4fa1c1,Object['defineProperty'](_0x55319d,_0x15201c(0x161),{'enumerable':!0x0,'get':function(){return _0x188afa;}});}));
|
|
1
|
+
function _0x1512(){const _0x3a0b43=['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','You\x27re\x20following\x20the\x20presenter','following','asObservable','univerjs-icon\x20univerjs-icon-','_init','shouldShareOperation','OFFLINE','_reporters','memberID','_handleTerminate','merge','registerComponent','getCurrentTypeOfUnit$','live-share.config','_commandService','default','unit','_injector','replace','_entities','_stopPresenting','registerSharedOperation','mutations','jsx','from','jsxs','9710883LdmCIG','IConfigService','LiveShareService','throttleTime','useRef','none','subscribe','getUnitId','string','LiveShareController','OPERATION','call','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','SetWorksheetActiveOperation','not-following','attrs','UniverLiveSharePlugin','getTypeOfUnitDisposed$','executeCommand','clsx','getConfig','UniverInstanceType','getTypeOfUnitAdded$','init','idle','303740qxZogW','_mountLiveShare','data','getLiveShareCoordinator','140HgLWQf','unsubscribe','displayName','substring','has','connectInjector','takeUntil','offline','operations','length','includes','univer-size-4','div','rxjs','sheet','parse','event$','presenter','children','rxjs/operators','Stop\x20presenting','_beIdle','_stopFollowing','setConfig','univer-mb-3\x20univer-w-full\x20univer-text-sm','react','object','_handleOffline','_configService','unitId','SAME_OPERATION_SHARE_INTERVAL','Present\x20this\x20document','RxDisposable','362360IDYpYE','_startLiveShareCoordinator','_unitID','SetZoomRatioOperation','SessionStatus','get','send','params','Subject','_handleOnline','LIVESHARE_REQUEST_HOST','UniverProCollaborationClient','3bZtJte','requireSession','toString','InsertSheetMutation','PRESENTING','registerInitialStateReporter','327502Utbvnb','_status$','IUIPartsService','DesktopLiveShareController','end','find','toDisposable','getMemberID','NEW_CHANGESETS','LIVESHARE_FETCH_OPERATIONS','getInitialStates','xlink:href','defineProperty','_handleNewHost','UNIVER_UNKNOWN','You\x27re\x20not\x20following\x20the\x20presenter','3505NeJzin','Start\x20following','Button','decorate','iterator','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','complete','Injector','colorChannel1','_handleOperation','tryStartPresenting','UniverSheetsUi','_presenter','548qJXkPB','UniverProLiveShare','_fetchOperations','onCommandExecuted','_sharedOperations','presenting','LiveShareIcon','HEADER_MENU','assign','parseProtocolChangeset','@univerjs-pro/collaboration-client','useState','mask','getValue','_status','stopPresenting','button','_startFollowing','add','fill','path','prototype','0.22.0','IUniverInstanceService','NOT_FOLLOWING','status$','createElement','stopFollowing','useObservable','delete','evenodd','2269188TRUIog','DisposableCollection','@univerjs/sheets-ui','_startPresenting','_handleNewChangeSets','next','Stop\x20following','UniverCore','BehaviorSubject','symbol','@univerjs-pro/collaboration','touchDependencies','UNIVER_SHEET','version','1em','UNIVER_LIVE_SHARE_PLUGIN','Disposable','React','UniverDesign','onRendered','forEach','random','_liveShareService','ONLINE','stringify','entries','_univerInstanceService','704BTbAay','DependentOn','_collabSession','type','UniverUi','createInstance','startFollowing','dispose','current','currentColor','CollaborationSessionService','CollaborationEvent','_config','@univerjs/sheets','http://www.w3.org/2000/svg','pipe','_commandDisposable','useDependency','Module','map','url(#$1','toStringTag','1088647Wnsvse','LIVESHARE_TERMINATE','Inject','function','dispose$','idSuffix','exports','disposeWithMe','@univerjs/design','UniverCollaborationClientPlugin','mergeOverrideWithDependencies','Fragment','LIVESHARE_OPERATION','tag','pluginName','_collabSessionService','operators'];_0x1512=function(){return _0x3a0b43;};return _0x1512();}function _0x48e8(_0x4747f9,_0x22eaab){_0x4747f9=_0x4747f9-0x104;const _0x1512b1=_0x1512();let _0x48e8d4=_0x1512b1[_0x4747f9];return _0x48e8d4;}(function(_0x3e0a55,_0x2db7dc){const _0x346e1d=_0x48e8,_0x4d943b=_0x3e0a55();while(!![]){try{const _0x117b54=-parseInt(_0x346e1d(0x159))/0x1+-parseInt(_0x346e1d(0x1d5))/0x2*(parseInt(_0x346e1d(0x1cf))/0x3)+-parseInt(_0x346e1d(0x109))/0x4*(-parseInt(_0x346e1d(0x1e5))/0x5)+-parseInt(_0x346e1d(0x128))/0x6+parseInt(_0x346e1d(0x1a2))/0x7*(-parseInt(_0x346e1d(0x1c3))/0x8)+parseInt(_0x346e1d(0x185))/0x9+parseInt(_0x346e1d(0x19e))/0xa*(parseInt(_0x346e1d(0x143))/0xb);if(_0x117b54===_0x2db7dc)break;else _0x4d943b['push'](_0x4d943b['shift']());}catch(_0x226996){_0x4d943b['push'](_0x4d943b['shift']());}}}(_0x1512,0x8e340),function(_0x2fc07d,_0x108d90){const _0x2490bb=_0x48e8;typeof exports==_0x2490bb(0x1bc)&&typeof module<'u'?_0x108d90(exports,require(`@univerjs/core`),require(`@univerjs/ui`),require(`@univerjs/design`),require(`react`),require(`@univerjs-pro/collaboration`),require(`@univerjs-pro/collaboration-client`),require(`@univerjs/sheets`),require(`rxjs`),require(`rxjs/operators`),require(`react/jsx-runtime`),require(`@univerjs/sheets-ui`)):typeof define==_0x2490bb(0x15c)&&define['amd']?define([_0x2490bb(0x15f),'@univerjs/core','@univerjs/ui',_0x2490bb(0x161),_0x2490bb(0x1bb),_0x2490bb(0x132),_0x2490bb(0x113),_0x2490bb(0x150),_0x2490bb(0x1af),_0x2490bb(0x1b5),'react/jsx-runtime',_0x2490bb(0x12a)],_0x108d90):(_0x2fc07d=typeof globalThis<'u'?globalThis:_0x2fc07d||self,_0x108d90(_0x2fc07d[_0x2490bb(0x10a)]={},_0x2fc07d[_0x2490bb(0x12f)],_0x2fc07d[_0x2490bb(0x147)],_0x2fc07d[_0x2490bb(0x13a)],_0x2fc07d[_0x2490bb(0x139)],_0x2fc07d['UniverProCollaboration'],_0x2fc07d[_0x2490bb(0x1ce)],_0x2fc07d['UniverSheets'],_0x2fc07d['rxjs'],_0x2fc07d[_0x2490bb(0x1af)][_0x2490bb(0x169)],_0x2fc07d[_0x2490bb(0x139)],_0x2fc07d[_0x2490bb(0x107)]));}(this,function(_0xc15b9e,_0x4e18f2,_0x335fa2,_0x1800f3,_0x24b107,_0x6e132a,_0x3c1f2e,_0x31b923,_0x199065,_0x5a9512,_0x456158,_0x51ce4c){const _0x148399=_0x48e8;Object[_0x148399(0x1e1)](_0xc15b9e,Symbol[_0x148399(0x158)],{'value':_0x148399(0x155)});function _0x3ecbff({ref:_0x2d9aa0,..._0x3dbcfe}){const _0x18fd45=_0x148399;let {icon:_0x398289,id:_0x365985,className:_0x4b048e,extend:_0x4775da,..._0x253dd2}=_0x3dbcfe,_0x41ff61=(_0x18fd45(0x16e)+_0x365985+'\x20'+(_0x4b048e||''))['trim'](),_0x1d5052=(0x0,_0x24b107[_0x18fd45(0x189)])('_'+_0x211d64());return _0x2af984(_0x398289,''+_0x365985,{'defIds':_0x398289['defIds'],'idSuffix':_0x1d5052[_0x18fd45(0x14b)]},{'ref':_0x2d9aa0,'className':_0x41ff61,..._0x253dd2},_0x4775da);}function _0x2af984(_0x3bd26e,_0x414a54,_0x1ea40,_0x359ad4,_0x49dc2f){const _0x4373ff=_0x148399;return(0x0,_0x24b107[_0x4373ff(0x123)])(_0x3bd26e[_0x4373ff(0x166)],{'key':_0x414a54,..._0x312091(_0x3bd26e,_0x1ea40,_0x49dc2f),..._0x359ad4},(_0x291e5d(_0x3bd26e,_0x1ea40)[_0x4373ff(0x1b4)]||[])[_0x4373ff(0x156)]((_0x1495ed,_0x35ab2c)=>_0x2af984(_0x1495ed,_0x414a54+'-'+_0x3bd26e[_0x4373ff(0x166)]+'-'+_0x35ab2c,_0x1ea40,void 0x0,_0x49dc2f)));}function _0x312091(_0x5686e8,_0x12ae56,_0x45ce2f){const _0x1f9374=_0x148399;let _0x1aed90={..._0x5686e8[_0x1f9374(0x194)]};_0x45ce2f!=null&&_0x45ce2f[_0x1f9374(0x104)]&&_0x1aed90[_0x1f9374(0x11c)]==='colorChannel1'&&(_0x1aed90[_0x1f9374(0x11c)]=_0x45ce2f[_0x1f9374(0x104)]),_0x5686e8[_0x1f9374(0x166)]===_0x1f9374(0x115)&&_0x1aed90['id']&&(_0x1aed90['id']+=_0x12ae56[_0x1f9374(0x15e)]),Object['entries'](_0x1aed90)[_0x1f9374(0x13c)](([_0x2c06bf,_0x5279a2])=>{const _0x37315b=_0x1f9374;_0x2c06bf===_0x37315b(0x115)&&typeof _0x5279a2=='string'&&(_0x1aed90[_0x2c06bf]=_0x5279a2[_0x37315b(0x17d)](/url\(#(.*)\)/,_0x37315b(0x157)+_0x12ae56['idSuffix']+')'));});let {defIds:_0x1d9ad4}=_0x12ae56;return!_0x1d9ad4||_0x1d9ad4[_0x1f9374(0x1ab)]===0x0?_0x1aed90:(_0x5686e8[_0x1f9374(0x166)]==='use'&&_0x1aed90[_0x1f9374(0x1e0)]&&(_0x1aed90[_0x1f9374(0x1e0)]+=_0x12ae56[_0x1f9374(0x15e)]),Object[_0x1f9374(0x141)](_0x1aed90)[_0x1f9374(0x13c)](([_0x3f0ba6,_0x5293b5])=>{const _0x4fc74f=_0x1f9374;typeof _0x5293b5=='string'&&(_0x1aed90[_0x3f0ba6]=_0x5293b5[_0x4fc74f(0x17d)](/url\(#(.*)\)/,_0x4fc74f(0x157)+_0x12ae56[_0x4fc74f(0x15e)]+')'));}),_0x1aed90);}function _0x291e5d(_0x5068ac,_0x1fd9db){const _0x20dd7d=_0x148399;var _0x3658ca;let {defIds:_0x5ef924}=_0x1fd9db;return!_0x5ef924||_0x5ef924['length']===0x0?_0x5068ac:_0x5068ac[_0x20dd7d(0x166)]==='defs'&&(_0x3658ca=_0x5068ac[_0x20dd7d(0x1b4)])!=null&&_0x3658ca[_0x20dd7d(0x1ab)]?{..._0x5068ac,'children':_0x5068ac['children']['map'](_0x3d8c13=>typeof _0x3d8c13[_0x20dd7d(0x194)]['id']==_0x20dd7d(0x18d)&&_0x5ef924&&_0x5ef924[_0x20dd7d(0x1ac)](_0x3d8c13[_0x20dd7d(0x194)]['id'])?{..._0x3d8c13,'attrs':{..._0x3d8c13[_0x20dd7d(0x194)],'id':_0x3d8c13[_0x20dd7d(0x194)]['id']+_0x1fd9db[_0x20dd7d(0x15e)]}}:_0x3d8c13)}:_0x5068ac;}function _0x211d64(){const _0x3622ce=_0x148399;return Math[_0x3622ce(0x13d)]()[_0x3622ce(0x1d1)](0x24)[_0x3622ce(0x1a5)](0x2,0x8);}_0x3ecbff[_0x148399(0x1a4)]='UniverIcon';let _0x25c234={'tag':'svg','attrs':{'xmlns':_0x148399(0x151),'fill':_0x148399(0x18a),'viewBox':'0\x200\x2017\x2017','width':_0x148399(0x136),'height':'1em'},'children':[{'tag':_0x148399(0x11d),'attrs':{'fill':'currentColor','d':_0x148399(0x16a)}},{'tag':'path','attrs':{'fill':_0x148399(0x14c),'d':_0x148399(0x1ea),'fillRule':_0x148399(0x127),'clipRule':_0x148399(0x127)}}]},_0x45c7ad=(0x0,_0x24b107['forwardRef'])(function(_0x1b943a,_0x29ea65){const _0x40863f=_0x148399;return(0x0,_0x24b107[_0x40863f(0x123)])(_0x3ecbff,Object[_0x40863f(0x111)]({},_0x1b943a,{'id':'live-share-icon','ref':_0x29ea65,'icon':_0x25c234}));});_0x45c7ad[_0x148399(0x1a4)]=_0x148399(0x10f);function _0x47c655(_0x2ccfb7){'@babel/helpers - typeof';const _0x7553c3=_0x148399;return _0x47c655=typeof Symbol==_0x7553c3(0x15c)&&typeof Symbol[_0x7553c3(0x1e9)]==_0x7553c3(0x131)?function(_0x1881c9){return typeof _0x1881c9;}:function(_0x482cc1){const _0x4569d1=_0x7553c3;return _0x482cc1&&typeof Symbol==_0x4569d1(0x15c)&&_0x482cc1['constructor']===Symbol&&_0x482cc1!==Symbol[_0x4569d1(0x11e)]?'symbol':typeof _0x482cc1;},_0x47c655(_0x2ccfb7);}function _0x2ac6d6(_0x18f232,_0x4661e9){const _0x546d84=_0x148399;if(_0x47c655(_0x18f232)!=_0x546d84(0x1bc)||!_0x18f232)return _0x18f232;var _0x13693a=_0x18f232[Symbol['toPrimitive']];if(_0x13693a!==void 0x0){var _0x54fcdc=_0x13693a[_0x546d84(0x190)](_0x18f232,_0x4661e9||_0x546d84(0x17a));if(_0x47c655(_0x54fcdc)!=_0x546d84(0x1bc))return _0x54fcdc;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x4661e9===_0x546d84(0x18d)?String:Number)(_0x18f232);}function _0x45e005(_0x18f625){const _0x965d3=_0x148399;var _0x3741eb=_0x2ac6d6(_0x18f625,_0x965d3(0x18d));return _0x47c655(_0x3741eb)=='symbol'?_0x3741eb:_0x3741eb+'';}function _0x4a8b38(_0x369612,_0x272864,_0x4e5fe1){return(_0x272864=_0x45e005(_0x272864))in _0x369612?Object['defineProperty'](_0x369612,_0x272864,{'value':_0x4e5fe1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x369612[_0x272864]=_0x4e5fe1,_0x369612;}var _0x570c9e=class extends _0x4e18f2[_0x148399(0x138)]{constructor(..._0x450788){const _0x3a621c=_0x148399;super(..._0x450788),_0x4a8b38(this,_0x3a621c(0x10d),new Set()),_0x4a8b38(this,_0x3a621c(0x172),new Set());}[_0x148399(0x180)](_0x16b268){const _0x43878e=_0x148399;return this[_0x43878e(0x10d)]['add'](_0x16b268),(0x0,_0x4e18f2[_0x43878e(0x1db)])(()=>this[_0x43878e(0x10d)]['delete'](_0x16b268));}[_0x148399(0x1d4)](_0x96698e){const _0x3e038d=_0x148399;return this[_0x3e038d(0x172)][_0x3e038d(0x11b)](_0x96698e),(0x0,_0x4e18f2[_0x3e038d(0x1db)])(()=>this[_0x3e038d(0x172)][_0x3e038d(0x126)](_0x96698e));}[_0x148399(0x170)](_0xfd1929){const _0x519124=_0x148399;return this[_0x519124(0x10d)][_0x519124(0x1a6)](_0xfd1929);}[_0x148399(0x1df)](_0xbbcb7){const _0x54abcc=_0x148399;return Array[_0x54abcc(0x183)](this[_0x54abcc(0x172)])[_0x54abcc(0x156)](_0x44e49f=>_0x44e49f(_0xbbcb7));}};function _0x1cd8ab(_0x4e023a,_0x2b951a){return function(_0x246c0b,_0x31ff23){_0x2b951a(_0x246c0b,_0x31ff23,_0x4e023a);};}function _0xd70ace(_0x428fdb,_0x5778a3,_0x86fa64,_0x30b9d1){const _0x471c95=_0x148399;var _0xd88ec3=arguments[_0x471c95(0x1ab)],_0xfeb70=_0xd88ec3<0x3?_0x5778a3:_0x30b9d1===null?_0x30b9d1=Object['getOwnPropertyDescriptor'](_0x5778a3,_0x86fa64):_0x30b9d1,_0x10ca8f;if(typeof Reflect=='object'&&typeof Reflect[_0x471c95(0x1e8)]==_0x471c95(0x15c))_0xfeb70=Reflect[_0x471c95(0x1e8)](_0x428fdb,_0x5778a3,_0x86fa64,_0x30b9d1);else{for(var _0x202948=_0x428fdb[_0x471c95(0x1ab)]-0x1;_0x202948>=0x0;_0x202948--)(_0x10ca8f=_0x428fdb[_0x202948])&&(_0xfeb70=(_0xd88ec3<0x3?_0x10ca8f(_0xfeb70):_0xd88ec3>0x3?_0x10ca8f(_0x5778a3,_0x86fa64,_0xfeb70):_0x10ca8f(_0x5778a3,_0x86fa64))||_0xfeb70);}return _0xd88ec3>0x3&&_0xfeb70&&Object[_0x471c95(0x1e1)](_0x5778a3,_0x86fa64,_0xfeb70),_0xfeb70;}let _0x30797e=class extends _0x4e18f2[_0x148399(0x1c2)]{constructor(_0x77e54c,_0x3d4992,_0x560f39){const _0x1ff9e7=_0x148399;super(),this[_0x1ff9e7(0x142)]=_0x77e54c,this[_0x1ff9e7(0x17c)]=_0x3d4992,this[_0x1ff9e7(0x168)]=_0x560f39,_0x4a8b38(this,'_entities',new Map()),this['_init']();}async[_0x148399(0x1a1)](_0x2176ab){const _0x570bb8=_0x148399;return this[_0x570bb8(0x17e)][_0x570bb8(0x1a6)](_0x2176ab)||await this[_0x570bb8(0x1c4)](_0x2176ab),this[_0x570bb8(0x17e)]['get'](_0x2176ab);}['getLiveShareCoordinatorSync'](_0x4f8634){const _0x558dc7=_0x148399;var _0x4e8302;return(_0x4e8302=this[_0x558dc7(0x17e)][_0x558dc7(0x1c8)](_0x4f8634))==null?null:_0x4e8302;}[_0x148399(0x16f)](){const _0x2f16b8=_0x148399;this[_0x2f16b8(0x142)][_0x2f16b8(0x19b)](_0x4e18f2[_0x2f16b8(0x19a)][_0x2f16b8(0x134)])[_0x2f16b8(0x152)]((0x0,_0x5a9512[_0x2f16b8(0x1a8)])(this[_0x2f16b8(0x15d)]))['subscribe'](async _0x3de898=>{const _0x3c6ba4=_0x2f16b8;let _0x137aaa=_0x3de898[_0x3c6ba4(0x17b)][_0x3c6ba4(0x18c)]();this[_0x3c6ba4(0x17e)][_0x3c6ba4(0x1a6)](_0x137aaa)||this['_startLiveShareCoordinator'](_0x137aaa);}),this['_univerInstanceService'][_0x2f16b8(0x196)](_0x4e18f2[_0x2f16b8(0x19a)]['UNIVER_SHEET'])[_0x2f16b8(0x152)]((0x0,_0x5a9512[_0x2f16b8(0x1a8)])(this[_0x2f16b8(0x15d)]))['subscribe'](_0x3e2c5c=>{const _0xb3d9ae=_0x2f16b8;let _0x1acc78=_0x3e2c5c['getUnitId'](),_0x1e7415=this[_0xb3d9ae(0x17e)][_0xb3d9ae(0x1c8)](_0x1acc78);_0x1e7415==null||_0x1e7415[_0xb3d9ae(0x14a)]();});}async['_startLiveShareCoordinator'](_0x25369f){const _0x2e89c6=_0x148399;let _0xa82433=await this[_0x2e89c6(0x168)][_0x2e89c6(0x1d0)](_0x25369f),_0x4f5301=this[_0x2e89c6(0x17c)][_0x2e89c6(0x148)](_0x316b3f,_0x25369f,_0xa82433);return _0x4f5301[_0x2e89c6(0x19c)](),this[_0x2e89c6(0x17e)]['set'](_0x25369f,_0x4f5301),_0x4f5301;}};_0x30797e=_0xd70ace([_0x1cd8ab(0x0,_0x4e18f2[_0x148399(0x120)]),_0x1cd8ab(0x1,(0x0,_0x4e18f2[_0x148399(0x15b)])(_0x4e18f2[_0x148399(0x1ec)])),_0x1cd8ab(0x2,(0x0,_0x4e18f2[_0x148399(0x15b)])(_0x3c1f2e[_0x148399(0x14d)]))],_0x30797e);let _0x4be03d=function(_0x5034ed){const _0x26fa34=_0x148399;return _0x5034ed[_0x26fa34(0x171)]=_0x26fa34(0x1a9),_0x5034ed['IDLE']='idle',_0x5034ed['FOLLOWING']='following',_0x5034ed[_0x26fa34(0x121)]='not-following',_0x5034ed[_0x26fa34(0x1d3)]=_0x26fa34(0x10e),_0x5034ed;}({}),_0x316b3f=class extends _0x4e18f2[_0x148399(0x1c2)]{get['_status'](){const _0x503de5=_0x148399;return this['_status$'][_0x503de5(0x116)]();}constructor(_0x1fd9bf,_0x1090ad,_0x231d38,_0x42ff79,_0x2a5267){const _0x25637c=_0x148399;super(),this[_0x25637c(0x1c5)]=_0x1fd9bf,this['_collabSession']=_0x1090ad,this[_0x25637c(0x1be)]=_0x231d38,this[_0x25637c(0x13e)]=_0x42ff79,this[_0x25637c(0x179)]=_0x2a5267,_0x4a8b38(this,'_status$',new _0x199065[(_0x25637c(0x130))](_0x25637c(0x19d))),_0x4a8b38(this,_0x25637c(0x122),this[_0x25637c(0x1d6)][_0x25637c(0x16d)]()),_0x4a8b38(this,_0x25637c(0x16f),!0x1),_0x4a8b38(this,'_commandDisposable',null),_0x4a8b38(this,_0x25637c(0x108),null);}[_0x148399(0x14a)](){const _0xaf121b=_0x148399;var _0x402fa6;(_0x402fa6=this[_0xaf121b(0x153)])==null||_0x402fa6[_0xaf121b(0x14a)](),this[_0xaf121b(0x1d6)][_0xaf121b(0x12d)](_0xaf121b(0x19d)),this[_0xaf121b(0x1d6)]['complete']();}['getStatus'](){return this['_status'];}[_0x148399(0x19c)](){const _0x1974e5=_0x148399;this['_init']||(this[_0x1974e5(0x16f)]=!0x0,this[_0x1974e5(0x145)]['sessionStatus$'][_0x1974e5(0x152)]((0x0,_0x5a9512['takeUntil'])(this[_0x1974e5(0x15d)]))[_0x1974e5(0x18b)](_0x2f7b6e=>{const _0x5d1350=_0x1974e5;switch(_0x2f7b6e){case _0x3c1f2e[_0x5d1350(0x1c7)]['OFFLINE']:this['_handleOffline']();break;case _0x3c1f2e[_0x5d1350(0x1c7)][_0x5d1350(0x13f)]:this[_0x5d1350(0x1cc)]();break;default:}}),this[_0x1974e5(0x145)][_0x1974e5(0x1b2)][_0x1974e5(0x152)]((0x0,_0x5a9512[_0x1974e5(0x1a8)])(this[_0x1974e5(0x15d)]))[_0x1974e5(0x18b)](_0x22cfb0=>{const _0x143099=_0x1974e5;let {eventID:_0x55c634}=_0x22cfb0;switch(_0x55c634){case _0x6e132a[_0x143099(0x14e)]['LIVESHARE_NEW_HOST']:this[_0x143099(0x1e2)](_0x22cfb0);break;case _0x6e132a[_0x143099(0x14e)]['LIVESHARE_OPERATION']:this[_0x143099(0x105)](_0x22cfb0);break;case _0x6e132a['CollaborationEvent'][_0x143099(0x15a)]:this[_0x143099(0x174)]();break;case _0x6e132a['CollaborationEvent'][_0x143099(0x1dd)]:this['_handleNewChangeSets'](_0x22cfb0);break;default:}}));}['tryStartPresenting'](){const _0x5e6fc0=_0x148399;this[_0x5e6fc0(0x145)][_0x5e6fc0(0x1c9)]({'eventID':_0x6e132a[_0x5e6fc0(0x14e)][_0x5e6fc0(0x1cd)],'data':{'unitID':this[_0x5e6fc0(0x1c5)],'userID':this[_0x5e6fc0(0x145)][_0x5e6fc0(0x1dc)]()}},this[_0x5e6fc0(0x1c5)]);}[_0x148399(0x118)](){const _0x392486=_0x148399;this[_0x392486(0x117)]===_0x392486(0x10e)&&(this[_0x392486(0x1d6)][_0x392486(0x12d)](_0x392486(0x19d)),this[_0x392486(0x145)]['send']({'eventID':_0x6e132a['CollaborationEvent'][_0x392486(0x15a)],'data':{'unitID':this[_0x392486(0x1c5)]}},this[_0x392486(0x1c5)]));}[_0x148399(0x149)](){const _0x599047=_0x148399;this['_status']===_0x599047(0x193)&&(this[_0x599047(0x1d6)][_0x599047(0x12d)]('following'),this['_startFollowing']());}[_0x148399(0x124)](){const _0xfa7102=_0x148399;this[_0xfa7102(0x117)]===_0xfa7102(0x16c)&&this[_0xfa7102(0x1b8)]();}[_0x148399(0x1e2)](_0x54e042){const _0x3dfe2e=_0x148399;let {presenter:_0x5d92ab}=_0x54e042['data'],_0x493005=this['_collabSession'][_0x3dfe2e(0x1dc)]();this[_0x3dfe2e(0x108)]=_0x5d92ab,_0x5d92ab===_0x493005?(this[_0x3dfe2e(0x1b8)](),this[_0x3dfe2e(0x12b)]()):this['_status']!==_0x3dfe2e(0x193)&&(this['_stopPresenting'](),this[_0x3dfe2e(0x11a)]());}[_0x148399(0x10b)](){const _0x433c72=_0x148399;let _0x12da21={'eventID':_0x6e132a[_0x433c72(0x14e)][_0x433c72(0x1de)]};this['_collabSession'][_0x433c72(0x1c9)](_0x12da21,this[_0x433c72(0x1c5)]);}[_0x148399(0x174)](){const _0xb42c8c=_0x148399;this[_0xb42c8c(0x108)]=null,this['_status']!=='presenting'&&this[_0xb42c8c(0x1b7)]();}[_0x148399(0x12c)](_0x11778f){const _0x25fb70=_0x148399;if(this['_status']===_0x25fb70(0x16c)&&this[_0x25fb70(0x108)]===_0x11778f[_0x25fb70(0x1a0)][_0x25fb70(0x173)]){let _0x25b816=(0x0,_0x6e132a[_0x25fb70(0x112)])(_0x11778f['data'])[_0x25fb70(0x181)]['reverse']()[_0x25fb70(0x1da)](_0x17694a=>_0x17694a['id']===_0x31b923[_0x25fb70(0x1d2)]['id']);if(_0x25b816){let _0x77890d=_0x25b816['params'][_0x25fb70(0x1bf)],_0x274c38=_0x25b816[_0x25fb70(0x1ca)][_0x25fb70(0x1b0)]['id'];setTimeout(()=>{const _0x274c7f=_0x25fb70;this[_0x274c7f(0x179)]['executeCommand'](_0x31b923[_0x274c7f(0x192)]['id'],{'unitId':_0x77890d,'subUnitId':_0x274c38},{'fromCollab':!0x0});});}}}[_0x148399(0x12b)](){const _0x5e0a57=_0x148399;this['_status$']['next'](_0x5e0a57(0x10e));let _0x305f91=new Map(),_0x2ab762=this[_0x5e0a57(0x153)]=new _0x4e18f2[(_0x5e0a57(0x129))]();_0x2ab762[_0x5e0a57(0x11b)]((0x0,_0x4e18f2[_0x5e0a57(0x1db)])(()=>{const _0x151462=_0x5e0a57;_0x305f91[_0x151462(0x13c)](_0x290a26=>_0x290a26[_0x151462(0x1eb)]()),_0x305f91['clear']();})),_0x2ab762[_0x5e0a57(0x11b)](this[_0x5e0a57(0x179)][_0x5e0a57(0x10c)](_0x4b29b7=>{const _0x479603=_0x5e0a57;if(_0x4b29b7[_0x479603(0x146)]!==_0x4e18f2['CommandType'][_0x479603(0x18f)]||!this[_0x479603(0x13e)]['shouldShareOperation'](_0x4b29b7['id']))return;let {id:_0x310da5}=_0x4b29b7,_0x269ad5;if(_0x305f91['has'](_0x310da5))_0x269ad5=_0x305f91[_0x479603(0x1c8)](_0x310da5);else{var _0x115369;_0x269ad5=new _0x199065[(_0x479603(0x1cb))](),_0x305f91['set'](_0x310da5,_0x269ad5),_0x269ad5[_0x479603(0x152)]((0x0,_0x5a9512[_0x479603(0x188)])((_0x115369=this[_0x479603(0x1be)][_0x479603(0x199)](_0x479603(0x1c0)))==null?0xc8:_0x115369,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x479603(0x18b)](_0x1408cb=>{const _0x5616bc=_0x479603;this[_0x5616bc(0x145)][_0x5616bc(0x1c9)]({'eventID':_0x6e132a[_0x5616bc(0x14e)]['LIVESHARE_OPERATION'],'data':{'unitID':this['_unitID'],'operations':{[_0x1408cb['id']]:{'id':_0x1408cb['id'],'params':JSON['stringify'](_0x1408cb[_0x5616bc(0x1ca)])}}}},this[_0x5616bc(0x1c5)]);});}_0x269ad5[_0x479603(0x12d)](_0x4b29b7);})),this[_0x5e0a57(0x13e)][_0x5e0a57(0x1df)](this['_unitID'])[_0x5e0a57(0x13c)](_0x5685a2=>this[_0x5e0a57(0x145)][_0x5e0a57(0x1c9)]({'eventID':_0x6e132a[_0x5e0a57(0x14e)][_0x5e0a57(0x165)],'data':{'unitID':this[_0x5e0a57(0x1c5)],'operations':{[_0x5685a2['id']]:{'id':_0x5685a2['id'],'params':JSON[_0x5e0a57(0x140)](_0x5685a2[_0x5e0a57(0x1ca)])}}}},this[_0x5e0a57(0x1c5)]));}[_0x148399(0x17f)](){const _0xcc429c=_0x148399;var _0x28b07d;this['_status$'][_0xcc429c(0x12d)](_0xcc429c(0x19d)),(_0x28b07d=this[_0xcc429c(0x153)])==null||_0x28b07d[_0xcc429c(0x14a)](),this[_0xcc429c(0x153)]=null;}[_0x148399(0x11a)](){const _0xee3cb3=_0x148399;var _0x55689b;(_0x55689b=this[_0xee3cb3(0x153)])==null||_0x55689b[_0xee3cb3(0x14a)](),this[_0xee3cb3(0x1d6)][_0xee3cb3(0x12d)](_0xee3cb3(0x16c));}[_0x148399(0x1b7)](){const _0x40596f=_0x148399;var _0x36bfbf;this[_0x40596f(0x1d6)][_0x40596f(0x12d)](_0x40596f(0x19d)),(_0x36bfbf=this[_0x40596f(0x153)])==null||_0x36bfbf['dispose'](),this[_0x40596f(0x153)]=null;}[_0x148399(0x1b8)](){const _0x23b8d6=_0x148399;var _0x3ab02c;this['_status$'][_0x23b8d6(0x12d)](_0x23b8d6(0x193)),(_0x3ab02c=this[_0x23b8d6(0x153)])==null||_0x3ab02c[_0x23b8d6(0x14a)]();}[_0x148399(0x105)](_0x498788){const _0x2faaeb=_0x148399;if(['presenting',_0x2faaeb(0x193),_0x2faaeb(0x1a9)][_0x2faaeb(0x1ac)](this[_0x2faaeb(0x117)])||!_0x498788['data'][_0x2faaeb(0x1b3)]||_0x498788[_0x2faaeb(0x1a0)]['presenter']===this[_0x2faaeb(0x145)][_0x2faaeb(0x1dc)]())return;this[_0x2faaeb(0x117)]===_0x2faaeb(0x19d)&&this[_0x2faaeb(0x11a)]();let _0x6e0cca=_0x498788['data'][_0x2faaeb(0x1aa)];Object['values'](_0x6e0cca)['forEach'](_0x27b1ad=>{const _0xd4c1a4=_0x2faaeb;this[_0xd4c1a4(0x179)][_0xd4c1a4(0x197)](_0x27b1ad['id'],_0x27b1ad[_0xd4c1a4(0x1ca)]?JSON[_0xd4c1a4(0x1b1)](_0x27b1ad[_0xd4c1a4(0x1ca)]):null,{'fromCollab':!0x0});});}[_0x148399(0x1bd)](){const _0x2b61fc=_0x148399;var _0xfa4499;this[_0x2b61fc(0x1d6)]['next'](_0x2b61fc(0x1a9)),(_0xfa4499=this[_0x2b61fc(0x153)])==null||_0xfa4499[_0x2b61fc(0x14a)]();}[_0x148399(0x1cc)](){const _0x22f6a6=_0x148399;this['_status$'][_0x22f6a6(0x12d)](_0x22f6a6(0x19d)),this[_0x22f6a6(0x10b)]();}};_0x316b3f=_0xd70ace([_0x1cd8ab(0x2,_0x4e18f2[_0x148399(0x186)]),_0x1cd8ab(0x3,(0x0,_0x4e18f2[_0x148399(0x15b)])(_0x570c9e)),_0x1cd8ab(0x4,_0x4e18f2['ICommandService'])],_0x316b3f);function _0x5822fc(){const _0x3f52b3=_0x148399;let _0x565aaa=(0x0,_0x335fa2['useDependency'])(_0x30797e),_0x4f7c78=(0x0,_0x335fa2[_0x3f52b3(0x154)])(_0x4e18f2[_0x3f52b3(0x120)]),_0x4287b4=(0x0,_0x335fa2[_0x3f52b3(0x125)])(()=>_0x4f7c78[_0x3f52b3(0x177)](_0x4e18f2['UniverInstanceType']['UNIVER_SHEET']),void 0x0,!0x1,[]),[_0x23c34e,_0x15933c]=(0x0,_0x24b107['useState'])(null),[_0x752978,_0x59b42a]=(0x0,_0x24b107[_0x3f52b3(0x114)])('idle'),_0x52dd89=(0x0,_0x24b107['useRef'])(null);return(0x0,_0x24b107['useEffect'])(()=>(_0x4287b4&&_0x565aaa[_0x3f52b3(0x1a1)](_0x4287b4[_0x3f52b3(0x18c)]())['then'](_0x42851e=>{const _0x4d2cb6=_0x3f52b3;_0x15933c(_0x42851e),_0x52dd89[_0x4d2cb6(0x14b)]=_0x42851e[_0x4d2cb6(0x122)][_0x4d2cb6(0x18b)](_0x4bec62=>{_0x59b42a(_0x4bec62);});}),()=>{const _0x53434d=_0x3f52b3;var _0x354ef0;(_0x354ef0=_0x52dd89[_0x53434d(0x14b)])==null||_0x354ef0[_0x53434d(0x1a3)](),_0x52dd89['current']=null;}),[_0x4287b4,_0x565aaa]),_0x23c34e?(0x0,_0x456158['jsx'])(_0x1800f3['Dropdown'],{'align':_0x3f52b3(0x1d9),'disabled':_0x752978==='offline','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,_0x456158['jsx'])(_0x236146,{'status':_0x752978,'coordinator':_0x23c34e}),'children':(0x0,_0x456158[_0x3f52b3(0x182)])(_0x3f52b3(0x119),{'className':(0x0,_0x1800f3[_0x3f52b3(0x198)])(_0x3f52b3(0x191),{'univer-cursor-not-allowed':_0x752978==='offline','univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x752978!==_0x3f52b3(0x1a9)}),'type':_0x3f52b3(0x119),'children':(0x0,_0x456158[_0x3f52b3(0x182)])(_0x45c7ad,{'className':_0x3f52b3(0x1ad)})})}):null;}function _0x236146(_0x3340c1){const _0x4ad164=_0x148399;let {status:_0x26d02d,coordinator:_0x312aaa}=_0x3340c1;switch(_0x26d02d){case'idle':return(0x0,_0x456158[_0x4ad164(0x182)])(_0x339e4e,{'coordinator':_0x312aaa});case _0x4ad164(0x16c):return(0x0,_0x456158[_0x4ad164(0x182)])(_0x16a35e,{'coordinator':_0x312aaa});case _0x4ad164(0x193):return(0x0,_0x456158[_0x4ad164(0x182)])(_0x4f433a,{'coordinator':_0x312aaa});case'offline':return(0x0,_0x456158[_0x4ad164(0x182)])(_0x5e7788,{});case _0x4ad164(0x10e):return(0x0,_0x456158[_0x4ad164(0x182)])(_0x394f5e,{'coordinator':_0x312aaa});default:return null;}}function _0x339e4e(_0x2a5217){const _0xd57334=_0x148399;let {coordinator:_0x597b45}=_0x2a5217;return(0x0,_0x456158[_0xd57334(0x184)])(_0x456158[_0xd57334(0x164)],{'children':[(0x0,_0x456158[_0xd57334(0x182)])(_0xd57334(0x1ae),{'className':_0xd57334(0x1ba),'children':_0xd57334(0x1c1)}),(0x0,_0x456158[_0xd57334(0x182)])(_0x1800f3[_0xd57334(0x1e7)],{'onClick':()=>_0x597b45[_0xd57334(0x106)](),'children':'Start'})]});}function _0x16a35e(_0x319381){const _0x46ebcb=_0x148399;let {coordinator:_0x40e198}=_0x319381;return(0x0,_0x456158[_0x46ebcb(0x184)])(_0x456158[_0x46ebcb(0x164)],{'children':[(0x0,_0x456158[_0x46ebcb(0x182)])(_0x46ebcb(0x1ae),{'className':_0x46ebcb(0x1ba),'children':_0x46ebcb(0x16b)}),(0x0,_0x456158[_0x46ebcb(0x182)])(_0x1800f3['Button'],{'onClick':()=>_0x40e198[_0x46ebcb(0x124)](),'children':_0x46ebcb(0x12e)})]});}function _0x4f433a(_0x4987e5){const _0x49c41b=_0x148399;let {coordinator:_0x21eaf6}=_0x4987e5;return(0x0,_0x456158['jsxs'])(_0x456158[_0x49c41b(0x164)],{'children':[(0x0,_0x456158[_0x49c41b(0x182)])('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x49c41b(0x1e4)}),(0x0,_0x456158['jsx'])(_0x1800f3[_0x49c41b(0x1e7)],{'variant':'text','onClick':()=>_0x21eaf6[_0x49c41b(0x149)](),'children':_0x49c41b(0x1e6)})]});}function _0x394f5e(_0x453865){const _0x128cb1=_0x148399;let {coordinator:_0x238f35}=_0x453865;return(0x0,_0x456158['jsxs'])(_0x456158['Fragment'],{'children':[(0x0,_0x456158[_0x128cb1(0x182)])(_0x128cb1(0x1ae),{'className':_0x128cb1(0x1ba),'children':'You\x27re\x20presenting\x20the\x20document'}),(0x0,_0x456158['jsx'])(_0x1800f3[_0x128cb1(0x1e7)],{'variant':_0x128cb1(0x17a),'onClick':()=>_0x238f35[_0x128cb1(0x118)](),'children':_0x128cb1(0x1b6)})]});}function _0x5e7788(){const _0x5be2d2=_0x148399;return(0x0,_0x456158[_0x5be2d2(0x182)])(_0x456158[_0x5be2d2(0x164)],{'children':'You\x27are\x20offline.'});}let _0x26f28a=class extends _0x4e18f2[_0x148399(0x138)]{constructor(_0x9deb25,_0x263de4){const _0x3f19c1=_0x148399;super(),this[_0x3f19c1(0x17c)]=_0x9deb25,this['_uiPartsService']=_0x263de4,this[_0x3f19c1(0x19f)]();}[_0x148399(0x19f)](){const _0x2c4e38=_0x148399;this[_0x2c4e38(0x160)](this['_uiPartsService'][_0x2c4e38(0x176)](_0x335fa2['BuiltInUIPart'][_0x2c4e38(0x110)],()=>(0x0,_0x335fa2[_0x2c4e38(0x1a7)])(_0x5822fc,this[_0x2c4e38(0x17c)])));}};_0x26f28a=_0xd70ace([_0x1cd8ab(0x0,(0x0,_0x4e18f2['Inject'])(_0x4e18f2[_0x148399(0x1ec)])),_0x1cd8ab(0x1,_0x335fa2[_0x148399(0x1d7)])],_0x26f28a);var _0x15de9b='@univerjs-pro/live-share',_0xec43d7=_0x148399(0x11f);let _0x1ec066=_0x148399(0x178);Symbol(_0x1ec066);let _0x3a5d16={},_0x37d9a5=class extends _0x4e18f2[_0x148399(0x138)]{constructor(_0x19aa47){const _0x1411ab=_0x148399;super(),this[_0x1411ab(0x13e)]=_0x19aa47,this[_0x1411ab(0x16f)]();}[_0x148399(0x16f)](){const _0x4677e9=_0x148399;[_0x51ce4c[_0x4677e9(0x1c6)]['id'],_0x51ce4c['SetScrollOperation']['id'],_0x31b923[_0x4677e9(0x192)]['id']][_0x4677e9(0x13c)](_0xde950c=>{const _0x1d3776=_0x4677e9;this[_0x1d3776(0x160)](this[_0x1d3776(0x13e)][_0x1d3776(0x180)](_0xde950c));});}};_0x37d9a5=_0xd70ace([_0x1cd8ab(0x0,(0x0,_0x4e18f2['Inject'])(_0x570c9e))],_0x37d9a5);let _0x4b7028=class extends _0x4e18f2['Plugin']{constructor(_0xb1f7f4=_0x3a5d16,_0x31e181,_0x2a38da){const _0x4620ff=_0x148399;super(),this[_0x4620ff(0x14f)]=_0xb1f7f4,this[_0x4620ff(0x17c)]=_0x31e181,this[_0x4620ff(0x1be)]=_0x2a38da;let {..._0x204385}=(0x0,_0x4e18f2[_0x4620ff(0x175)])({},_0x3a5d16,this[_0x4620ff(0x14f)]);this['_configService'][_0x4620ff(0x1b9)](_0x1ec066,_0x204385);}['onStarting'](){const _0x47c596=_0x148399;(0x0,_0x4e18f2['registerDependencies'])(this['_injector'],(0x0,_0x4e18f2[_0x47c596(0x163)])([[_0x570c9e],[_0x30797e],[_0x37d9a5],[_0x26f28a]],this['_config']['override'])),(0x0,_0x4e18f2[_0x47c596(0x133)])(this['_injector'],[[_0x37d9a5]]);}[_0x148399(0x13b)](){const _0x32a963=_0x148399;(0x0,_0x4e18f2['touchDependencies'])(this[_0x32a963(0x17c)],[[_0x26f28a]]);}};_0x4a8b38(_0x4b7028,_0x148399(0x146),_0x4e18f2[_0x148399(0x19a)][_0x148399(0x1e3)]),_0x4a8b38(_0x4b7028,_0x148399(0x167),_0x148399(0x137)),_0x4a8b38(_0x4b7028,'packageName',_0x15de9b),_0x4a8b38(_0x4b7028,_0x148399(0x135),_0xec43d7),_0x4b7028=_0xd70ace([(0x0,_0x4e18f2[_0x148399(0x144)])(_0x3c1f2e[_0x148399(0x162)]),_0x1cd8ab(0x1,(0x0,_0x4e18f2[_0x148399(0x15b)])(_0x4e18f2['Injector'])),_0x1cd8ab(0x2,_0x4e18f2[_0x148399(0x186)])],_0x4b7028),Object[_0x148399(0x1e1)](_0xc15b9e,_0x148399(0x1d8),{'enumerable':!0x0,'get':function(){return _0x26f28a;}}),_0xc15b9e['LiveShare']=_0x5822fc,Object[_0x148399(0x1e1)](_0xc15b9e,_0x148399(0x18e),{'enumerable':!0x0,'get':function(){return _0x30797e;}}),Object[_0x148399(0x1e1)](_0xc15b9e,'LiveShareCoordinator',{'enumerable':!0x0,'get':function(){return _0x316b3f;}}),_0xc15b9e[_0x148399(0x187)]=_0x570c9e,_0xc15b9e['LiveShareStatus']=_0x4be03d,Object[_0x148399(0x1e1)](_0xc15b9e,_0x148399(0x195),{'enumerable':!0x0,'get':function(){return _0x4b7028;}});}));
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/live-share",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "
|
|
6
|
-
"author": "DreamNum <developer@univer.ai>",
|
|
5
|
+
"description": "Live share collaboration plugin for Univer Pro.",
|
|
6
|
+
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
7
7
|
"funding": {
|
|
8
8
|
"type": "opencollective",
|
|
9
9
|
"url": "https://opencollective.com/univer"
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/dream-num/univer/issues"
|
|
18
18
|
},
|
|
19
|
-
"keywords": [
|
|
19
|
+
"keywords": [
|
|
20
|
+
"univer",
|
|
21
|
+
"univer-pro",
|
|
22
|
+
"live-share",
|
|
23
|
+
"collaboration",
|
|
24
|
+
"plugin"
|
|
25
|
+
],
|
|
20
26
|
"exports": {
|
|
21
27
|
".": {
|
|
22
28
|
"import": "./lib/es/index.js",
|
|
@@ -57,13 +63,13 @@
|
|
|
57
63
|
},
|
|
58
64
|
"dependencies": {
|
|
59
65
|
"@univerjs/icons": "^1.1.1",
|
|
60
|
-
"@univerjs-pro/collaboration": "0.
|
|
61
|
-
"@univerjs/core": "0.
|
|
62
|
-
"@univerjs-pro/collaboration-client": "0.
|
|
63
|
-
"@univerjs/
|
|
64
|
-
"@univerjs/
|
|
65
|
-
"@univerjs/ui": "0.
|
|
66
|
-
"@univerjs/sheets": "0.
|
|
66
|
+
"@univerjs-pro/collaboration": "0.22.0",
|
|
67
|
+
"@univerjs/core": "0.22.0",
|
|
68
|
+
"@univerjs-pro/collaboration-client": "0.22.0",
|
|
69
|
+
"@univerjs/sheets-ui": "0.22.0",
|
|
70
|
+
"@univerjs/design": "0.22.0",
|
|
71
|
+
"@univerjs/ui": "0.22.0",
|
|
72
|
+
"@univerjs/sheets": "0.22.0"
|
|
67
73
|
},
|
|
68
74
|
"devDependencies": {
|
|
69
75
|
"postcss": "^8.5.10",
|
|
@@ -72,8 +78,8 @@
|
|
|
72
78
|
"tailwindcss": "^3.4.17",
|
|
73
79
|
"typescript": "^6.0.3",
|
|
74
80
|
"vitest": "^4.1.4",
|
|
75
|
-
"@univerjs-infra/shared": "0.
|
|
76
|
-
"@univerjs/protocol": "0.
|
|
81
|
+
"@univerjs-infra/shared": "0.22.0",
|
|
82
|
+
"@univerjs/protocol": "0.22.0"
|
|
77
83
|
},
|
|
78
84
|
"scripts": {
|
|
79
85
|
"test": "vitest run",
|