@univerjs-pro/collaboration-client 1.1.0 → 1.3.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.
Files changed (100) hide show
  1. package/README.md +2 -0
  2. package/lib/cjs/facade.js +1 -1
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/locale/ar-SA.js +1 -1
  5. package/lib/cjs/locale/ca-ES.js +1 -1
  6. package/lib/cjs/locale/de-DE.js +1 -1
  7. package/lib/cjs/locale/en-US.js +1 -1
  8. package/lib/cjs/locale/es-ES.js +1 -1
  9. package/lib/cjs/locale/fa-IR.js +1 -1
  10. package/lib/cjs/locale/fr-FR.js +1 -1
  11. package/lib/cjs/locale/id-ID.js +1 -1
  12. package/lib/cjs/locale/it-IT.js +1 -1
  13. package/lib/cjs/locale/ja-JP.js +1 -1
  14. package/lib/cjs/locale/ko-KR.js +1 -1
  15. package/lib/cjs/locale/pl-PL.js +1 -1
  16. package/lib/cjs/locale/pt-BR.js +1 -1
  17. package/lib/cjs/locale/ru-RU.js +1 -1
  18. package/lib/cjs/locale/sk-SK.js +1 -1
  19. package/lib/cjs/locale/vi-VN.js +1 -1
  20. package/lib/cjs/locale/zh-CN.js +1 -1
  21. package/lib/cjs/locale/zh-HK.js +1 -1
  22. package/lib/cjs/locale/zh-TW.js +1 -1
  23. package/lib/es/facade.js +1 -1
  24. package/lib/es/index.js +1 -1
  25. package/lib/es/locale/ar-SA.js +1 -1
  26. package/lib/es/locale/ca-ES.js +1 -1
  27. package/lib/es/locale/de-DE.js +1 -1
  28. package/lib/es/locale/en-US.js +1 -1
  29. package/lib/es/locale/es-ES.js +1 -1
  30. package/lib/es/locale/fa-IR.js +1 -1
  31. package/lib/es/locale/fr-FR.js +1 -1
  32. package/lib/es/locale/id-ID.js +1 -1
  33. package/lib/es/locale/it-IT.js +1 -1
  34. package/lib/es/locale/ja-JP.js +1 -1
  35. package/lib/es/locale/ko-KR.js +1 -1
  36. package/lib/es/locale/pl-PL.js +1 -1
  37. package/lib/es/locale/pt-BR.js +1 -1
  38. package/lib/es/locale/ru-RU.js +1 -1
  39. package/lib/es/locale/sk-SK.js +1 -1
  40. package/lib/es/locale/vi-VN.js +1 -1
  41. package/lib/es/locale/zh-CN.js +1 -1
  42. package/lib/es/locale/zh-HK.js +1 -1
  43. package/lib/es/locale/zh-TW.js +1 -1
  44. package/lib/facade.js +1 -1
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -1
  47. package/lib/locale/ca-ES.js +1 -1
  48. package/lib/locale/de-DE.js +1 -1
  49. package/lib/locale/en-US.js +1 -1
  50. package/lib/locale/es-ES.js +1 -1
  51. package/lib/locale/fa-IR.js +1 -1
  52. package/lib/locale/fr-FR.js +1 -1
  53. package/lib/locale/id-ID.js +1 -1
  54. package/lib/locale/it-IT.js +1 -1
  55. package/lib/locale/ja-JP.js +1 -1
  56. package/lib/locale/ko-KR.js +1 -1
  57. package/lib/locale/pl-PL.js +1 -1
  58. package/lib/locale/pt-BR.js +1 -1
  59. package/lib/locale/ru-RU.js +1 -1
  60. package/lib/locale/sk-SK.js +1 -1
  61. package/lib/locale/vi-VN.js +1 -1
  62. package/lib/locale/zh-CN.js +1 -1
  63. package/lib/locale/zh-HK.js +1 -1
  64. package/lib/locale/zh-TW.js +1 -1
  65. package/lib/types/config/config.d.ts +19 -0
  66. package/lib/types/controllers/collaboration/changeset-submitter.d.ts +132 -0
  67. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +29 -2
  68. package/lib/types/controllers/collaboration/collaboration-state.d.ts +181 -87
  69. package/lib/types/controllers/collaboration/collaboration.controller.d.ts +7 -0
  70. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +7 -3
  71. package/lib/types/facade/f-collaboration.d.ts +17 -0
  72. package/lib/types/facade/f-event.d.ts +89 -2
  73. package/lib/types/index.d.ts +5 -3
  74. package/lib/types/services/collaboration-session/collaboration-session.d.ts +4 -8
  75. package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +2 -1
  76. package/lib/types/services/collaboration-ui-event/collaboration-ui-event.d.ts +10 -0
  77. package/lib/types/services/socket/collaboration-socket.service.d.ts +10 -2
  78. package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +5 -0
  79. package/lib/umd/facade.js +1 -1
  80. package/lib/umd/index.js +1 -1
  81. package/lib/umd/locale/ar-SA.js +1 -1
  82. package/lib/umd/locale/ca-ES.js +1 -1
  83. package/lib/umd/locale/de-DE.js +1 -1
  84. package/lib/umd/locale/en-US.js +1 -1
  85. package/lib/umd/locale/es-ES.js +1 -1
  86. package/lib/umd/locale/fa-IR.js +1 -1
  87. package/lib/umd/locale/fr-FR.js +1 -1
  88. package/lib/umd/locale/id-ID.js +1 -1
  89. package/lib/umd/locale/it-IT.js +1 -1
  90. package/lib/umd/locale/ja-JP.js +1 -1
  91. package/lib/umd/locale/ko-KR.js +1 -1
  92. package/lib/umd/locale/pl-PL.js +1 -1
  93. package/lib/umd/locale/pt-BR.js +1 -1
  94. package/lib/umd/locale/ru-RU.js +1 -1
  95. package/lib/umd/locale/sk-SK.js +1 -1
  96. package/lib/umd/locale/vi-VN.js +1 -1
  97. package/lib/umd/locale/zh-CN.js +1 -1
  98. package/lib/umd/locale/zh-HK.js +1 -1
  99. package/lib/umd/locale/zh-TW.js +1 -1
  100. package/package.json +15 -15
package/README.md CHANGED
@@ -38,6 +38,8 @@ univer.registerPlugin(UniverCollaborationClientPlugin);
38
38
  - Keep this package on the same version as the other `@univerjs/*` and `@univerjs-pro/*` packages in your application.
39
39
  - Import locale files only for the languages your application enables.
40
40
  - Use the facade entry when integrating through Univer Facade APIs.
41
+ - In Docs collaboration, undoing or redoing local paragraph formatting preserves collaborators' changes to other fields. This includes heading folds, alignment, indentation, spacing, tab stops, named styles, and numbering. Partial-format updates retain their authored fields, while full-paragraph replacements do not treat unchanged attributes as new edits; later collaborator changes to the same field remain in effect.
42
+ - Incoming mutation batches and grouped local history entries are transformed in order so preceding text edits keep paragraph history aligned. These history transformations do not change the document model, snapshot format, or collaboration protocol.
41
43
 
42
44
  ## Resources
43
45
 
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x111d(){const _0x7bb063=['_handler','FUniver','from','[FCollaboration]:\x20Unit\x20\x22','fireEvent','CollaborationStatus','DataLoaderService','UNIVER_SLIDE','getUnitId','FBase','UNIVER_PDF','UniverInstanceType','unitID','_dataLoaderService','loadBaseAsync','getOwnPropertyDescriptor','toStringTag','disposeWithMe','subscribe','getPdf','_resolveUnitId','add','_univerInstanceService','2250720dYahpv','\x22\x20while\x20collaboration\x20status\x20is\x20','waitForRoom$','state','112824lvNBhl','5916858HXEVTH','getBase','_injector','function','defineProperty','2mpkmcK','862183DFSvaN','extend','DisposableCollection','timeout','loadBoardAsync','loadServerUnit','object','Injector','createInstance','_collaborationController','decorate','NOT_COLLAB','getWorkbook','getCollabEntity','values','_initialize','2783901vyqGKN','loadUnit','CollaborationStatusChanged','892810cSlnVl','members$','loadServerUnitOfRevision','length','unsubscribe','get','185073NOoRux','getDocument','status','status$','Event','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','getCollaborationStatus','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','loadPdfAsync','getPresentation','MemberService','UNIVER_DOC','loadUnitOfRevision','pipe','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','registerEventHandler','CollaborationController','SYNCED','FCollaboration','subscribeCollaborators','toDisposable','reject','Inject','readyForCollab','FEventName','getCollaboration','45gqwqOH'];_0x111d=function(){return _0x7bb063;};return _0x111d();}const _0x2648a6=_0x53bf;(function(_0x7e9410,_0x1335be){const _0x5a587b=_0x53bf,_0x22113d=_0x7e9410();while(!![]){try{const _0x5e62ee=parseInt(_0x5a587b(0x22f))/0x1+parseInt(_0x5a587b(0x215))/0x2*(-parseInt(_0x5a587b(0x226))/0x3)+parseInt(_0x5a587b(0x20b))/0x4+parseInt(_0x5a587b(0x229))/0x5+parseInt(_0x5a587b(0x210))/0x6+-parseInt(_0x5a587b(0x216))/0x7+-parseInt(_0x5a587b(0x20f))/0x8*(-parseInt(_0x5a587b(0x1f3))/0x9);if(_0x5e62ee===_0x1335be)break;else _0x22113d['push'](_0x22113d['shift']());}catch(_0xb8f2d7){_0x22113d['push'](_0x22113d['shift']());}}}(_0x111d,0xe37fd),Object[_0x2648a6(0x214)](exports,Symbol[_0x2648a6(0x204)],{'value':'Module'}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core/facade'),n=require('@univerjs/core'),r=require('rxjs');var i=class extends t['FEnum']{get[_0x2648a6(0x1f9)](){const _0x21b9a2=_0x2648a6;return e[_0x21b9a2(0x1f9)];}};t['FEnum'][_0x2648a6(0x217)](i);var a=class extends t[_0x2648a6(0x1f1)]{get[_0x2648a6(0x228)](){const _0x5148a3=_0x2648a6;return _0x5148a3(0x228);}};function _0x53bf(_0x509f69,_0x31cc04){_0x509f69=_0x509f69-0x1de;const _0x111d1a=_0x111d();let _0x53bf5b=_0x111d1a[_0x509f69];return _0x53bf5b;}t[_0x2648a6(0x1f1)][_0x2648a6(0x217)](a);function o(_0xa0aeb9,_0x5f1ade){return function(_0x57ef44,_0x2e1ebd){_0x5f1ade(_0x57ef44,_0x2e1ebd,_0xa0aeb9);};}function s(_0x439f08,_0x52a899,_0x3decbb,_0x49b0ff){const _0xf76159=_0x2648a6;var _0x3880f7=arguments[_0xf76159(0x22c)],_0x5ec903=_0x3880f7<0x3?_0x52a899:_0x49b0ff===null?_0x49b0ff=Object[_0xf76159(0x203)](_0x52a899,_0x3decbb):_0x49b0ff,_0x9e8770;if(typeof Reflect==_0xf76159(0x21c)&&typeof Reflect['decorate']==_0xf76159(0x213))_0x5ec903=Reflect[_0xf76159(0x220)](_0x439f08,_0x52a899,_0x3decbb,_0x49b0ff);else{for(var _0x37084d=_0x439f08[_0xf76159(0x22c)]-0x1;_0x37084d>=0x0;_0x37084d--)(_0x9e8770=_0x439f08[_0x37084d])&&(_0x5ec903=(_0x3880f7<0x3?_0x9e8770(_0x5ec903):_0x3880f7>0x3?_0x9e8770(_0x52a899,_0x3decbb,_0x5ec903):_0x9e8770(_0x52a899,_0x3decbb))||_0x5ec903);}return _0x3880f7>0x3&&_0x5ec903&&Object[_0xf76159(0x214)](_0x52a899,_0x3decbb,_0x5ec903),_0x5ec903;}let c=class extends t[_0x2648a6(0x1fd)]{constructor(_0x19302c,_0x863243,_0x571c92,_0x45c681,_0x5816f8){const _0x4e7a3b=_0x2648a6;super(),this[_0x4e7a3b(0x1f4)]=_0x19302c,this['_injector']=_0x863243,this['_univerInstanceService']=_0x571c92,this[_0x4e7a3b(0x201)]=_0x45c681,this[_0x4e7a3b(0x21f)]=_0x5816f8;}async['loadSheetAsync'](_0x2b4948,_0x527353){const _0x5ec66a=_0x2648a6;return await this[_0x5ec66a(0x201)][_0x5ec66a(0x227)](_0x2b4948,n[_0x5ec66a(0x1ff)]['UNIVER_SHEET'],void 0x0,_0x527353)?(await this[_0x5ec66a(0x21f)][_0x5ec66a(0x1f0)](_0x2b4948),this['_handler'][_0x5ec66a(0x222)](_0x2b4948)):null;}async['loadDocAsync'](_0xb50a52,_0x5ee4b1){const _0x4d9d07=_0x2648a6;return await this['_dataLoaderService']['loadUnit'](_0xb50a52,n['UniverInstanceType'][_0x4d9d07(0x1e4)],void 0x0,_0x5ee4b1)?(await this[_0x4d9d07(0x21f)][_0x4d9d07(0x1f0)](_0xb50a52),this[_0x4d9d07(0x1f4)][_0x4d9d07(0x230)](_0xb50a52)):null;}async[_0x2648a6(0x202)](_0x4c971b,_0x385f41){const _0x448364=_0x2648a6;return await this[_0x448364(0x201)][_0x448364(0x227)](_0x4c971b,n[_0x448364(0x1ff)]['UNIVER_BASE'],void 0x0,_0x385f41)?(await this['_collaborationController'][_0x448364(0x1f0)](_0x4c971b),this[_0x448364(0x1f4)][_0x448364(0x211)](_0x4c971b)):null;}async['loadSlideAsync'](_0x45c853,_0x13907c){const _0xc85dd0=_0x2648a6;return await this[_0xc85dd0(0x201)]['loadUnit'](_0x45c853,n[_0xc85dd0(0x1ff)][_0xc85dd0(0x1fb)],void 0x0,_0x13907c)?(await this[_0xc85dd0(0x21f)][_0xc85dd0(0x1f0)](_0x45c853),this[_0xc85dd0(0x1f4)][_0xc85dd0(0x1e2)](_0x45c853)):null;}async[_0x2648a6(0x21a)](_0x421344,_0x1f9554){const _0x23e083=_0x2648a6;return await this[_0x23e083(0x201)][_0x23e083(0x227)](_0x421344,n[_0x23e083(0x1ff)]['UNIVER_BOARD'],void 0x0,_0x1f9554)?(await this[_0x23e083(0x21f)][_0x23e083(0x1f0)](_0x421344),this[_0x23e083(0x1f4)]['getBoard'](_0x421344)):null;}async[_0x2648a6(0x1e1)](_0x5f4ab8,_0x3c86a3){const _0x4de5fd=_0x2648a6;return await this['_dataLoaderService'][_0x4de5fd(0x227)](_0x5f4ab8,n[_0x4de5fd(0x1ff)][_0x4de5fd(0x1fe)],void 0x0,_0x3c86a3)?(await this[_0x4de5fd(0x21f)]['readyForCollab'](_0x5f4ab8),this[_0x4de5fd(0x1f4)][_0x4de5fd(0x207)](_0x5f4ab8)):null;}[_0x2648a6(0x1ec)](_0x2cda38,_0x934ebe){const _0xe7a8c6=_0x2648a6;let _0x2eee30=this['_injector'][_0xe7a8c6(0x22e)](e[_0xe7a8c6(0x1e3)])[_0xe7a8c6(0x20d)](_0x2cda38)[_0xe7a8c6(0x1e6)]((0x0,r['switchMap'])(_0x33dae8=>_0x33dae8[_0xe7a8c6(0x22a)]))[_0xe7a8c6(0x206)](_0x1c734c=>_0x934ebe(Array[_0xe7a8c6(0x1f6)](_0x1c734c[_0xe7a8c6(0x224)]())));return(0x0,n[_0xe7a8c6(0x1ed)])(_0x2eee30);}[_0x2648a6(0x1df)](_0x2cf037){const _0x4b2d72=_0x2648a6;let _0x3b947b=this[_0x4b2d72(0x208)](_0x2cf037);if(!_0x3b947b)return e[_0x4b2d72(0x1f9)][_0x4b2d72(0x221)];let _0xb0122e=this['_collaborationController'][_0x4b2d72(0x223)](_0x3b947b);return(_0xb0122e==null?void 0x0:_0xb0122e['state'][_0x4b2d72(0x231)])??e[_0x4b2d72(0x1f9)][_0x4b2d72(0x221)];}['flush'](_0x49121c,_0x11d048={}){const _0xc08f0c=_0x2648a6;let _0x5b909d=this[_0xc08f0c(0x208)](_0x49121c);if(!_0x5b909d)return Promise[_0xc08f0c(0x1ee)](Error(_0xc08f0c(0x1e7)));let _0x27f022=this[_0xc08f0c(0x21f)][_0xc08f0c(0x223)](_0x5b909d);if(!_0x27f022)return Promise[_0xc08f0c(0x1ee)](Error(_0xc08f0c(0x1f7)+_0x5b909d+'\x22\x20is\x20not\x20in\x20collaboration\x20mode.'));let _0x3186e1=_0x27f022[_0xc08f0c(0x20e)][_0xc08f0c(0x231)];if(_0x3186e1===e[_0xc08f0c(0x1f9)][_0xc08f0c(0x1ea)])return Promise['resolve']();let _0x3133e8=l(_0x5b909d,_0x3186e1);if(_0x3133e8)return Promise[_0xc08f0c(0x1ee)](_0x3133e8);let _0x22ef8d=_0x11d048[_0xc08f0c(0x219)]??0x7530;return new Promise((_0xdfe27c,_0xedc54b)=>{const _0x269326=_0xc08f0c;let _0x4609b9=!0x1,_0x2412fe=null,_0x18d53d=setTimeout(()=>{const _0x2b54c0=_0x53bf;_0x4609b9=!0x0,_0x2412fe==null||_0x2412fe[_0x2b54c0(0x22d)](),_0xedc54b(Error(_0x2b54c0(0x1e0)+_0x5b909d+'\x22\x20after\x20'+_0x22ef8d+'ms.'));},_0x22ef8d),_0x4c666e=()=>{const _0x52cedf=_0x53bf;_0x4609b9=!0x0,clearTimeout(_0x18d53d),_0x2412fe==null||_0x2412fe[_0x52cedf(0x22d)]();};_0x2412fe=_0x27f022[_0x269326(0x232)][_0x269326(0x206)](_0x5774b3=>{const _0x12eb4c=_0x269326;if(_0x4609b9)return;if(_0x5774b3===e[_0x12eb4c(0x1f9)][_0x12eb4c(0x1ea)]){_0x4c666e(),_0xdfe27c();return;}let _0x22d722=l(_0x5b909d,_0x5774b3);_0x22d722&&(_0x4c666e(),_0xedc54b(_0x22d722));});});}['_resolveUnitId'](_0x568283){const _0x76cd86=_0x2648a6;var _0x24fd3d;return _0x568283||((_0x24fd3d=this[_0x76cd86(0x20a)]['getFocusedUnit']())==null?void 0x0:_0x24fd3d[_0x76cd86(0x1fc)]());}};c=s([o(0x1,(0x0,n['Inject'])(n[_0x2648a6(0x21d)])),o(0x2,n['IUniverInstanceService']),o(0x3,(0x0,n[_0x2648a6(0x1ef)])(e['DataLoaderService'])),o(0x4,(0x0,n['Inject'])(e[_0x2648a6(0x1e9)]))],c);function l(_0x58178a,_0x66be1a){const _0x1c2328=_0x2648a6;return _0x66be1a===e[_0x1c2328(0x1f9)]['CONFLICT']||_0x66be1a===e['CollaborationStatus'][_0x1c2328(0x221)]?Error(_0x1c2328(0x1de)+_0x58178a+_0x1c2328(0x20c)+_0x66be1a+'.'):null;}var u=class extends t[_0x2648a6(0x1f5)]{[_0x2648a6(0x225)](_0x39b535){const _0x4b4ee7=_0x2648a6;let _0x2b2cf0=_0x39b535['get'](e[_0x4b4ee7(0x1e9)]);this[_0x4b4ee7(0x205)](this[_0x4b4ee7(0x1e8)](this[_0x4b4ee7(0x233)][_0x4b4ee7(0x228)],()=>{const _0x34fd9a=_0x4b4ee7;let _0x4c63c8=new n[(_0x34fd9a(0x218))](),_0x39afb9=_0x2b2cf0['entityInit$']['subscribe'](_0x50f851=>{const _0x4a8167=_0x34fd9a;let _0x473e0c=_0x50f851[_0x4a8167(0x232)][_0x4a8167(0x206)](_0x4d22b5=>{const _0x1d1f2f=_0x4a8167;let _0x38ef49={'unitId':_0x50f851[_0x1d1f2f(0x200)],'status':_0x4d22b5};this[_0x1d1f2f(0x1f8)](this[_0x1d1f2f(0x233)][_0x1d1f2f(0x228)],_0x38ef49);});_0x4c63c8[_0x4a8167(0x209)]((0x0,n[_0x4a8167(0x1ed)])(_0x473e0c));});return _0x4c63c8[_0x34fd9a(0x209)]((0x0,n[_0x34fd9a(0x1ed)])(_0x39afb9)),_0x4c63c8;}));}[_0x2648a6(0x1f2)](){const _0x407f08=_0x2648a6;return this[_0x407f08(0x212)][_0x407f08(0x21e)](c,{'getWorkbook':_0x3d98aa=>this[_0x407f08(0x222)](_0x3d98aa),'getDocument':_0x2b65cc=>this[_0x407f08(0x230)](_0x2b65cc),'getPresentation':_0x3fdc52=>this[_0x407f08(0x1e2)](_0x3fdc52),'getBase':_0x345044=>this[_0x407f08(0x211)](_0x345044),'getBoard':_0x1f536b=>this['getBoard'](_0x1f536b),'getPdf':_0x49f21f=>this['getPdf'](_0x49f21f)});}[_0x2648a6(0x21b)](_0x5be1f6,_0x3449cd,_0x4d6e94){const _0xe105f5=_0x2648a6;return this[_0xe105f5(0x212)][_0xe105f5(0x22e)](e[_0xe105f5(0x1fa)])[_0xe105f5(0x227)](_0x5be1f6,_0x3449cd,_0x4d6e94);}[_0x2648a6(0x22b)](_0x25ad51,_0x5d9fcd,_0x36b271){const _0x178a7e=_0x2648a6;return this['_injector']['get'](e['DataLoaderService'])[_0x178a7e(0x1e5)](_0x25ad51,_0x5d9fcd,_0x36b271);}};t[_0x2648a6(0x1f5)][_0x2648a6(0x217)](u),Object[_0x2648a6(0x214)](exports,_0x2648a6(0x1eb),{'enumerable':!0x0,'get':function(){return c;}});
1
+ const _0xfdbd9c=_0x1023;(function(_0x20eb5c,_0x26bf92){const _0x413f4f=_0x1023,_0x2a0806=_0x20eb5c();while(!![]){try{const _0x3c0565=-parseInt(_0x413f4f(0x223))/0x1+-parseInt(_0x413f4f(0x20d))/0x2*(parseInt(_0x413f4f(0x22c))/0x3)+parseInt(_0x413f4f(0x1e6))/0x4*(-parseInt(_0x413f4f(0x210))/0x5)+-parseInt(_0x413f4f(0x21f))/0x6*(parseInt(_0x413f4f(0x207))/0x7)+parseInt(_0x413f4f(0x1ee))/0x8*(parseInt(_0x413f4f(0x20e))/0x9)+-parseInt(_0x413f4f(0x1eb))/0xa+parseInt(_0x413f4f(0x1f9))/0xb;if(_0x3c0565===_0x26bf92)break;else _0x2a0806['push'](_0x2a0806['shift']());}catch(_0xc3ac72){_0x2a0806['push'](_0x2a0806['shift']());}}}(_0x5320,0x9a663),Object[_0xfdbd9c(0x229)](exports,Symbol[_0xfdbd9c(0x1f3)],{'value':_0xfdbd9c(0x1f8)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core/facade'),n=require('@univerjs/core'),r=require('rxjs');var i=class extends t[_0xfdbd9c(0x237)]{get['CollaborationStatus'](){const _0x1d8d74=_0xfdbd9c;return e[_0x1d8d74(0x1e8)];}};t[_0xfdbd9c(0x237)][_0xfdbd9c(0x224)](i);var a=class extends t[_0xfdbd9c(0x1f7)]{get[_0xfdbd9c(0x1e3)](){const _0x3fb237=_0xfdbd9c;return _0x3fb237(0x1e3);}get['CollaborationConflict'](){const _0x2bd972=_0xfdbd9c;return _0x2bd972(0x1f5);}get['CollaborationChangesetResend'](){const _0x150c3b=_0xfdbd9c;return _0x150c3b(0x245);}};t['FEventName'][_0xfdbd9c(0x224)](a);function o(_0x9445b2,_0xe3c139){return function(_0x50a0d8,_0xabc33){_0xe3c139(_0x50a0d8,_0xabc33,_0x9445b2);};}function _0x1023(_0x4714b9,_0x1d8915){_0x4714b9=_0x4714b9-0x1dd;const _0x53206d=_0x5320();let _0x10230c=_0x53206d[_0x4714b9];return _0x10230c;}function s(_0x1b1439,_0x44e3cb,_0x176d65,_0x238053){const _0xccd8b4=_0xfdbd9c;var _0x5748bd=arguments[_0xccd8b4(0x1e0)],_0x58934b=_0x5748bd<0x3?_0x44e3cb:_0x238053===null?_0x238053=Object[_0xccd8b4(0x1f2)](_0x44e3cb,_0x176d65):_0x238053,_0x588fe1;if(typeof Reflect==_0xccd8b4(0x22a)&&typeof Reflect[_0xccd8b4(0x21e)]==_0xccd8b4(0x1df))_0x58934b=Reflect['decorate'](_0x1b1439,_0x44e3cb,_0x176d65,_0x238053);else{for(var _0x23cf56=_0x1b1439['length']-0x1;_0x23cf56>=0x0;_0x23cf56--)(_0x588fe1=_0x1b1439[_0x23cf56])&&(_0x58934b=(_0x5748bd<0x3?_0x588fe1(_0x58934b):_0x5748bd>0x3?_0x588fe1(_0x44e3cb,_0x176d65,_0x58934b):_0x588fe1(_0x44e3cb,_0x176d65))||_0x58934b);}return _0x5748bd>0x3&&_0x58934b&&Object[_0xccd8b4(0x229)](_0x44e3cb,_0x176d65,_0x58934b),_0x58934b;}let c=class extends t[_0xfdbd9c(0x1e4)]{constructor(_0x5cbfb8,_0x543f92,_0x38df7a,_0x2afa13,_0x1aed96){const _0xe27ae7=_0xfdbd9c;super(),this['_handler']=_0x5cbfb8,this[_0xe27ae7(0x206)]=_0x543f92,this[_0xe27ae7(0x228)]=_0x38df7a,this[_0xe27ae7(0x22d)]=_0x2afa13,this[_0xe27ae7(0x202)]=_0x1aed96;}async[_0xfdbd9c(0x222)](_0x435fa6,_0x42db8d){const _0x3d0a03=_0xfdbd9c;return await this[_0x3d0a03(0x22d)][_0x3d0a03(0x20b)](_0x435fa6,n[_0x3d0a03(0x247)][_0x3d0a03(0x1dd)],void 0x0,_0x42db8d)?(await this[_0x3d0a03(0x202)]['readyForCollab'](_0x435fa6),this[_0x3d0a03(0x238)][_0x3d0a03(0x205)](_0x435fa6)):null;}async[_0xfdbd9c(0x23b)](_0x4c5572,_0x19f4e8){const _0x59f010=_0xfdbd9c;return await this['_dataLoaderService'][_0x59f010(0x20b)](_0x4c5572,n[_0x59f010(0x247)]['UNIVER_DOC'],void 0x0,_0x19f4e8)?(await this['_collaborationController'][_0x59f010(0x23a)](_0x4c5572),this[_0x59f010(0x238)][_0x59f010(0x21d)](_0x4c5572)):null;}async['loadBaseAsync'](_0x334d89,_0x27e5ea){const _0x17c1da=_0xfdbd9c;return await this[_0x17c1da(0x22d)][_0x17c1da(0x20b)](_0x334d89,n[_0x17c1da(0x247)][_0x17c1da(0x23e)],void 0x0,_0x27e5ea)?(await this[_0x17c1da(0x202)][_0x17c1da(0x23a)](_0x334d89),this[_0x17c1da(0x238)]['getBase'](_0x334d89)):null;}async[_0xfdbd9c(0x1ed)](_0x2c50c3,_0x37e050){const _0x3a7a0b=_0xfdbd9c;return await this['_dataLoaderService'][_0x3a7a0b(0x20b)](_0x2c50c3,n[_0x3a7a0b(0x247)][_0x3a7a0b(0x216)],void 0x0,_0x37e050)?(await this[_0x3a7a0b(0x202)][_0x3a7a0b(0x23a)](_0x2c50c3),this[_0x3a7a0b(0x238)][_0x3a7a0b(0x231)](_0x2c50c3)):null;}async[_0xfdbd9c(0x22b)](_0x48dbc7,_0x358071){const _0x249d58=_0xfdbd9c;return await this[_0x249d58(0x22d)][_0x249d58(0x20b)](_0x48dbc7,n['UniverInstanceType']['UNIVER_BOARD'],void 0x0,_0x358071)?(await this['_collaborationController'][_0x249d58(0x23a)](_0x48dbc7),this[_0x249d58(0x238)]['getBoard'](_0x48dbc7)):null;}async[_0xfdbd9c(0x240)](_0xb15352,_0x385a7f){const _0x5391d6=_0xfdbd9c;return await this[_0x5391d6(0x22d)][_0x5391d6(0x20b)](_0xb15352,n[_0x5391d6(0x247)][_0x5391d6(0x1e5)],void 0x0,_0x385a7f)?(await this[_0x5391d6(0x202)][_0x5391d6(0x23a)](_0xb15352),this['_handler'][_0x5391d6(0x213)](_0xb15352)):null;}[_0xfdbd9c(0x241)](_0x128228,_0x47fe6b){const _0x5b755a=_0xfdbd9c;let _0x8c0839=this[_0x5b755a(0x206)]['get'](e[_0x5b755a(0x200)])[_0x5b755a(0x219)](_0x128228)[_0x5b755a(0x208)]((0x0,r['switchMap'])(_0x27301b=>_0x27301b[_0x5b755a(0x232)]))['subscribe'](_0x21953a=>_0x47fe6b(Array['from'](_0x21953a[_0x5b755a(0x23f)]())));return(0x0,n[_0x5b755a(0x248)])(_0x8c0839);}[_0xfdbd9c(0x21b)](_0x11dbd0){const _0x381ea2=_0xfdbd9c;let _0x2fc363=this[_0x381ea2(0x1de)](_0x11dbd0);if(!_0x2fc363)return e[_0x381ea2(0x1e8)][_0x381ea2(0x233)];let _0x4d3352=this[_0x381ea2(0x202)][_0x381ea2(0x215)](_0x2fc363);return(_0x4d3352==null?void 0x0:_0x4d3352[_0x381ea2(0x1fe)]['status'])??e[_0x381ea2(0x1e8)][_0x381ea2(0x233)];}[_0xfdbd9c(0x212)](_0x55b79b){const _0x24e985=_0xfdbd9c;let _0x2c47d3=this['_resolveUnitId'](_0x55b79b);return _0x2c47d3?this[_0x24e985(0x202)][_0x24e985(0x212)](_0x2c47d3):!0x1;}[_0xfdbd9c(0x209)](_0x1e7c77,_0x1bfc39={}){const _0x111dbb=_0xfdbd9c;let _0x15509f=this[_0x111dbb(0x1de)](_0x1e7c77);if(!_0x15509f)return Promise[_0x111dbb(0x1fc)](Error(_0x111dbb(0x230)));let _0x3f841a=this[_0x111dbb(0x202)][_0x111dbb(0x215)](_0x15509f);if(!_0x3f841a)return Promise[_0x111dbb(0x1fc)](Error(_0x111dbb(0x214)+_0x15509f+_0x111dbb(0x23c)));let _0x38e241=_0x3f841a[_0x111dbb(0x1fe)]['status'];if(_0x38e241===e['CollaborationStatus'][_0x111dbb(0x227)])return Promise['resolve']();let _0x476021=l(_0x15509f,_0x38e241);if(_0x476021)return Promise[_0x111dbb(0x1fc)](_0x476021);let _0x1d884f=_0x1bfc39[_0x111dbb(0x221)]??0x7530;return new Promise((_0x962d9f,_0x20c6b4)=>{const _0x3c5d90=_0x111dbb;let _0x1c6b7a=!0x1,_0xb67658=null,_0x2ec3e8=setTimeout(()=>{const _0x19d55f=_0x1023;_0x1c6b7a=!0x0,_0xb67658==null||_0xb67658[_0x19d55f(0x1fa)](),_0x20c6b4(Error(_0x19d55f(0x234)+_0x15509f+_0x19d55f(0x1e2)+_0x1d884f+_0x19d55f(0x1ec)));},_0x1d884f),_0x248f29=()=>{const _0x33c36b=_0x1023;_0x1c6b7a=!0x0,clearTimeout(_0x2ec3e8),_0xb67658==null||_0xb67658[_0x33c36b(0x1fa)]();};_0xb67658=_0x3f841a[_0x3c5d90(0x1f0)][_0x3c5d90(0x204)](_0x4e0cc9=>{const _0x28c341=_0x3c5d90;if(_0x1c6b7a)return;if(_0x4e0cc9===e[_0x28c341(0x1e8)]['SYNCED']){_0x248f29(),_0x962d9f();return;}let _0x5d833c=l(_0x15509f,_0x4e0cc9);_0x5d833c&&(_0x248f29(),_0x20c6b4(_0x5d833c));});});}[_0xfdbd9c(0x1de)](_0x58dc7f){const _0x150da4=_0xfdbd9c;var _0x271dad;return _0x58dc7f||((_0x271dad=this[_0x150da4(0x228)][_0x150da4(0x20f)]())==null?void 0x0:_0x271dad[_0x150da4(0x225)]());}};c=s([o(0x1,(0x0,n[_0xfdbd9c(0x1e9)])(n[_0xfdbd9c(0x22e)])),o(0x2,n[_0xfdbd9c(0x239)]),o(0x3,(0x0,n[_0xfdbd9c(0x1e9)])(e[_0xfdbd9c(0x21a)])),o(0x4,(0x0,n[_0xfdbd9c(0x1e9)])(e[_0xfdbd9c(0x1ff)]))],c);function _0x5320(){const _0x555d7e=['status$','distinctUntilChanged','getOwnPropertyDescriptor','toStringTag','loadServerUnitOfRevision','CollaborationConflict','get','FEventName','Module','43096713GWuFEU','unsubscribe','forEach','reject','getBase','state','CollaborationController','MemberService','elapsedMs','_collaborationController','fireEvent','subscribe','getWorkbook','_injector','5805541lmOBSI','pipe','flush','entityInit$','loadUnit','unsyncedMutationCount','9622xiflSC','9BhazBc','getFocusedUnit','20GJLcGG','conflict$','hasWritePending','getPdf','[FCollaboration]:\x20Unit\x20\x22','getCollabEntity','UNIVER_SLIDE','FUniver','getCollabEntities','waitForRoom$','DataLoaderService','getCollaborationStatus','cacheCleared','getDocument','decorate','6WsVpyb','message','timeout','loadSheetAsync','1232636AVnGZy','extend','getUnitId','disposeWithMe','SYNCED','_univerInstanceService','defineProperty','object','loadBoardAsync','123uumCro','_dataLoaderService','Injector','unitID','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','getPresentation','members$','NOT_COLLAB','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','add','DisposableCollection','FEnum','_handler','IUniverInstanceService','readyForCollab','loadDocAsync','\x22\x20is\x20not\x20in\x20collaboration\x20mode.','CONFLICT','UNIVER_BASE','values','loadPdfAsync','subscribeCollaborators','FCollaboration','revert','getBoard','CollaborationChangesetResend','loadServerUnit','UniverInstanceType','toDisposable','\x22\x20while\x20collaboration\x20status\x20is\x20','UNIVER_SHEET','_resolveUnitId','function','length','loadUnitOfRevision','\x22\x20after\x20','CollaborationStatusChanged','FBase','UNIVER_PDF','646084eUwTQT','registerEventHandler','CollaborationStatus','Inject','reason','5896760UPxzug','ms.','loadSlideAsync','1676368jVRvCh','Event'];_0x5320=function(){return _0x555d7e;};return _0x5320();}function l(_0x37107e,_0x44fdab){const _0x2004bd=_0xfdbd9c;return _0x44fdab===e[_0x2004bd(0x1e8)][_0x2004bd(0x23d)]||_0x44fdab===e['CollaborationStatus']['NOT_COLLAB']?Error('[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22'+_0x37107e+_0x2004bd(0x249)+_0x44fdab+'.'):null;}var u=class extends t[_0xfdbd9c(0x217)]{['_initialize'](_0x254fdc){const _0x141a0d=_0xfdbd9c;let _0x28c4f2=_0x254fdc[_0x141a0d(0x1f6)](e[_0x141a0d(0x1ff)]);this[_0x141a0d(0x226)](this[_0x141a0d(0x1e7)](this[_0x141a0d(0x1ef)]['CollaborationStatusChanged'],()=>{const _0x840950=_0x141a0d;let _0x5922ec=new n[(_0x840950(0x236))](),_0x3dd7bd=_0x2c3e85=>{const _0x3ad3fc=_0x840950;let _0x2c2f6f=_0x2c3e85[_0x3ad3fc(0x1f0)][_0x3ad3fc(0x208)]((0x0,r[_0x3ad3fc(0x1f1)])())['subscribe'](_0x2ad131=>{const _0x2d9e88=_0x3ad3fc;let _0x4e7728={'unitId':_0x2c3e85[_0x2d9e88(0x22f)],'status':_0x2ad131};this[_0x2d9e88(0x203)](this['Event'][_0x2d9e88(0x1e3)],_0x4e7728);});_0x5922ec[_0x3ad3fc(0x235)]((0x0,n['toDisposable'])(_0x2c2f6f));};return _0x28c4f2[_0x840950(0x218)]()['forEach'](_0x3dd7bd),_0x5922ec['add']((0x0,n[_0x840950(0x248)])(_0x28c4f2[_0x840950(0x20a)][_0x840950(0x204)](_0x3dd7bd))),_0x5922ec;})),this[_0x141a0d(0x226)](this['registerEventHandler'](this[_0x141a0d(0x1ef)][_0x141a0d(0x1f5)],()=>{const _0x482664=_0x141a0d;let _0x3def8f=new n['DisposableCollection'](),_0x8657c5=_0x598baa=>{const _0x37648c=_0x1023;let _0xe8b30f=_0x598baa[_0x37648c(0x211)][_0x37648c(0x204)](_0x3f595b=>{const _0x4b9486=_0x37648c;let _0x979a36={'unitId':_0x3f595b[_0x4b9486(0x22f)],'reason':_0x3f595b[_0x4b9486(0x1ea)],'message':_0x3f595b[_0x4b9486(0x220)],'revert':_0x3f595b[_0x4b9486(0x243)],'localChanges':_0x3f595b['localChanges'],'cacheCleared':_0x3f595b[_0x4b9486(0x21c)]};this[_0x4b9486(0x203)](this[_0x4b9486(0x1ef)]['CollaborationConflict'],_0x979a36);});_0x3def8f['add']((0x0,n[_0x37648c(0x248)])(_0xe8b30f));};return _0x28c4f2[_0x482664(0x218)]()[_0x482664(0x1fb)](_0x8657c5),_0x3def8f[_0x482664(0x235)]((0x0,n[_0x482664(0x248)])(_0x28c4f2[_0x482664(0x20a)][_0x482664(0x204)](_0x8657c5))),_0x3def8f;})),this[_0x141a0d(0x226)](this[_0x141a0d(0x1e7)](this['Event']['CollaborationChangesetResend'],()=>{const _0x4b3cce=_0x141a0d;let _0xe4c976=new n['DisposableCollection'](),_0x4b4370=_0x2e028c=>{const _0x56f213=_0x1023;let _0x16a4b1=_0x2e028c['changesetResend$'][_0x56f213(0x204)](_0x2ff3b1=>{const _0x52d5c5=_0x56f213;let _0x4ded12={'unitId':_0x2ff3b1[_0x52d5c5(0x22f)],'reqId':_0x2ff3b1['reqId'],'reason':_0x2ff3b1[_0x52d5c5(0x1ea)],'attempt':_0x2ff3b1['attempt'],'elapsedMs':_0x2ff3b1[_0x52d5c5(0x201)],'unsyncedMutationCount':_0x2ff3b1[_0x52d5c5(0x20c)],'nextDelayMs':_0x2ff3b1['nextDelayMs']};this[_0x52d5c5(0x203)](this['Event'][_0x52d5c5(0x245)],_0x4ded12);});_0xe4c976[_0x56f213(0x235)]((0x0,n[_0x56f213(0x248)])(_0x16a4b1));};return _0x28c4f2[_0x4b3cce(0x218)]()[_0x4b3cce(0x1fb)](_0x4b4370),_0xe4c976[_0x4b3cce(0x235)]((0x0,n[_0x4b3cce(0x248)])(_0x28c4f2[_0x4b3cce(0x20a)][_0x4b3cce(0x204)](_0x4b4370))),_0xe4c976;}));}['getCollaboration'](){const _0x2e70af=_0xfdbd9c;return this['_injector']['createInstance'](c,{'getWorkbook':_0x53a7af=>this[_0x2e70af(0x205)](_0x53a7af),'getDocument':_0x5e55c8=>this['getDocument'](_0x5e55c8),'getPresentation':_0x487519=>this[_0x2e70af(0x231)](_0x487519),'getBase':_0x3f0f79=>this[_0x2e70af(0x1fd)](_0x3f0f79),'getBoard':_0x3e63ca=>this[_0x2e70af(0x244)](_0x3e63ca),'getPdf':_0x4dd87e=>this[_0x2e70af(0x213)](_0x4dd87e)});}[_0xfdbd9c(0x246)](_0x7684f,_0x376e62,_0x4d23b5){const _0xc16f8b=_0xfdbd9c;return this[_0xc16f8b(0x206)][_0xc16f8b(0x1f6)](e[_0xc16f8b(0x21a)])[_0xc16f8b(0x20b)](_0x7684f,_0x376e62,_0x4d23b5);}[_0xfdbd9c(0x1f4)](_0x395aec,_0x301b98,_0x9e6da2){const _0x534e6c=_0xfdbd9c;return this[_0x534e6c(0x206)][_0x534e6c(0x1f6)](e[_0x534e6c(0x21a)])[_0x534e6c(0x1e1)](_0x395aec,_0x301b98,_0x9e6da2);}};t[_0xfdbd9c(0x217)][_0xfdbd9c(0x224)](u),Object[_0xfdbd9c(0x229)](exports,_0xfdbd9c(0x242),{'enumerable':!0x0,'get':function(){return c;}});