@univerjs-pro/collaboration-client 0.25.0 → 1.0.0-alpha.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 (97) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/config/config.d.ts +70 -0
  65. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +15 -1
  66. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +6 -14
  67. package/lib/types/facade/f-collaboration.d.ts +38 -25
  68. package/lib/types/index.d.ts +11 -7
  69. package/lib/types/locale/types.d.ts +3 -0
  70. package/lib/types/plugin.d.ts +1 -1
  71. package/lib/types/services/attachment-remote/attachment-io.service.d.ts +22 -0
  72. package/lib/types/services/attachment-remote/types.d.ts +23 -0
  73. package/lib/types/services/data-loader/data-loader.service.d.ts +3 -0
  74. package/lib/types/services/local-cache/local-cache.service.d.ts +1 -0
  75. package/lib/umd/facade.js +1 -1
  76. package/lib/umd/index.js +1 -1
  77. package/lib/umd/locale/ar-SA.js +1 -1
  78. package/lib/umd/locale/ca-ES.js +1 -1
  79. package/lib/umd/locale/de-DE.js +1 -1
  80. package/lib/umd/locale/en-US.js +1 -1
  81. package/lib/umd/locale/es-ES.js +1 -1
  82. package/lib/umd/locale/fa-IR.js +1 -1
  83. package/lib/umd/locale/fr-FR.js +1 -1
  84. package/lib/umd/locale/id-ID.js +1 -1
  85. package/lib/umd/locale/it-IT.js +1 -1
  86. package/lib/umd/locale/ja-JP.js +1 -1
  87. package/lib/umd/locale/ko-KR.js +1 -1
  88. package/lib/umd/locale/pl-PL.js +1 -1
  89. package/lib/umd/locale/pt-BR.js +1 -1
  90. package/lib/umd/locale/ru-RU.js +1 -1
  91. package/lib/umd/locale/sk-SK.js +1 -1
  92. package/lib/umd/locale/vi-VN.js +1 -1
  93. package/lib/umd/locale/zh-CN.js +1 -1
  94. package/lib/umd/locale/zh-HK.js +1 -1
  95. package/lib/umd/locale/zh-TW.js +1 -1
  96. package/package.json +16 -14
  97. package/lib/types/controllers/config.schema.d.ts +0 -64
@@ -1 +1 @@
1
- function _0x1ab9(_0x96d70a,_0x306507){_0x96d70a=_0x96d70a-0x14b;const _0x6aaff7=_0x6aaf();let _0x1ab988=_0x6aaff7[_0x96d70a];return _0x1ab988;}const _0x2dece4=_0x1ab9;(function(_0x199cfa,_0x4e17bd){const _0x3b3a5b=_0x1ab9,_0x9f9973=_0x199cfa();while(!![]){try{const _0x35cc5a=parseInt(_0x3b3a5b(0x152))/0x1+-parseInt(_0x3b3a5b(0x165))/0x2+-parseInt(_0x3b3a5b(0x154))/0x3*(-parseInt(_0x3b3a5b(0x14d))/0x4)+parseInt(_0x3b3a5b(0x150))/0x5*(parseInt(_0x3b3a5b(0x15a))/0x6)+parseInt(_0x3b3a5b(0x14e))/0x7+parseInt(_0x3b3a5b(0x164))/0x8*(-parseInt(_0x3b3a5b(0x162))/0x9)+-parseInt(_0x3b3a5b(0x15c))/0xa*(parseInt(_0x3b3a5b(0x159))/0xb);if(_0x35cc5a===_0x4e17bd)break;else _0x9f9973['push'](_0x9f9973['shift']());}catch(_0x2502c3){_0x9f9973['push'](_0x9f9973['shift']());}}}(_0x6aaf,0x3e169));const e={'collaboration-client':{'collabClient':{'tooltip':{'reconnect':_0x2dece4(0x160)}},'collabStatus':{'fetchMiss':_0x2dece4(0x14f),'conflict':'編輯衝突','notCollab':_0x2dece4(0x161),'synced':_0x2dece4(0x166),'syncing':'同步中...','offline':_0x2dece4(0x158)},'session':{'connection-failed':_0x2dece4(0x156),'will-retry':_0x2dece4(0x15e),'room-full':_0x2dece4(0x163),'join-failed':_0x2dece4(0x155),'room-not-exists':_0x2dece4(0x169),'room-permission-denied':_0x2dece4(0x14b),'room-cnt-exceeds':_0x2dece4(0x15b),'collaboration-timeout':_0x2dece4(0x157)},'conflict':{'title':_0x2dece4(0x15d),'content':_0x2dece4(0x15f)},'permission':{'title':_0x2dece4(0x168),'content':_0x2dece4(0x167)},'collaboration':{'single-unit':{'warning':_0x2dece4(0x153)},'closeRoom':_0x2dece4(0x14c)},'auth':{'needGotoLoginAlert':_0x2dece4(0x151)}}};export{e as default};function _0x6aaf(){const _0x4bc856=['您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','3QZDvXR','加入協作失敗,請稍後重試,您的編輯將暫存於本機。','連線失敗,請檢查您的網路。','伺服器未回應協作請求,您的編輯將儲存在本機。','已離線,編輯將儲存在本機','3930047tAwylq','1070178AgQOkc','協作文件數量超過限制,您的編輯將暫存於本機。','10PpEUac','協作衝突','連線失敗,將在稍後重試連線。','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','點擊重新連線','本機檔案','889407ICGaYD','此文件協作人數已達上限,您的編輯將暫存於本機。','8jwsqWn','358908UWHhTM','已同步','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','認證錯誤','加入協作失敗,您的編輯將暫存於本機。','沒有協作權限,您的編輯將暫存於本機。','由於協作房間已關閉,編輯權限已被收回。','190108FUBpDe','2160886BrlCND','正在擷取伺服器資料...','10DgqhUm','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','176916cTOsEZ'];_0x6aaf=function(){return _0x4bc856;};return _0x6aaf();}
1
+ const _0x125272=_0x443e;(function(_0x5bd169,_0x3a81d5){const _0xb5c566=_0x443e,_0x58255b=_0x5bd169();while(!![]){try{const _0x3b79d8=-parseInt(_0xb5c566(0x1b4))/0x1+parseInt(_0xb5c566(0x1b2))/0x2*(parseInt(_0xb5c566(0x1b7))/0x3)+parseInt(_0xb5c566(0x1c5))/0x4+-parseInt(_0xb5c566(0x1c6))/0x5*(parseInt(_0xb5c566(0x1c0))/0x6)+-parseInt(_0xb5c566(0x1cb))/0x7*(-parseInt(_0xb5c566(0x1bc))/0x8)+parseInt(_0xb5c566(0x1ca))/0x9*(parseInt(_0xb5c566(0x1c1))/0xa)+parseInt(_0xb5c566(0x1b6))/0xb;if(_0x3b79d8===_0x3a81d5)break;else _0x58255b['push'](_0x58255b['shift']());}catch(_0x186e6c){_0x58255b['push'](_0x58255b['shift']());}}}(_0x41be,0x723dd));function _0x443e(_0xef0ab0,_0x54ce90){_0xef0ab0=_0xef0ab0-0x1b2;const _0x41be01=_0x41be();let _0x443eb0=_0x41be01[_0xef0ab0];return _0x443eb0;}const e={'collaboration-client':{'collabClient':{'tooltip':{'reconnect':_0x125272(0x1b5)}},'collabStatus':{'fetchMiss':_0x125272(0x1be),'conflict':_0x125272(0x1b8),'notCollab':_0x125272(0x1c4),'synced':_0x125272(0x1bd),'syncing':_0x125272(0x1cd),'offline':'已離線,編輯將儲存在本機'},'session':{'connection-failed':'連線失敗,請檢查您的網路。','will-retry':_0x125272(0x1bf),'room-full':_0x125272(0x1b9),'join-failed':_0x125272(0x1c9),'room-not-exists':_0x125272(0x1cc),'room-permission-denied':'沒有協作權限,您的編輯將暫存於本機。','room-cnt-exceeds':'協作文件數量超過限制,您的編輯將暫存於本機。','collaboration-timeout':_0x125272(0x1c8)},'conflict':{'title':_0x125272(0x1c3),'content':_0x125272(0x1b3)},'permission':{'title':_0x125272(0x1bb),'content':_0x125272(0x1ba)},'collaboration':{'single-unit':{'warning':_0x125272(0x1c7)},'closeRoom':'由於協作房間已關閉,編輯權限已被收回。'},'auth':{'needGotoLoginAlert':_0x125272(0x1c2)}}};export{e as default};function _0x41be(){const _0x5e99ea=['您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','協作衝突','本機檔案','299620QVfRQY','10865zMWEvx','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','伺服器未回應協作請求,您的編輯將儲存在本機。','加入協作失敗,請稍後重試,您的編輯將暫存於本機。','7344BEurYl','17843kaYLZp','加入協作失敗,您的編輯將暫存於本機。','同步中...','14fwhcCZ','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','689660VfjLLC','點擊重新連線','9701483yymKYq','64902pXosLK','編輯衝突','此文件協作人數已達上限,您的編輯將暫存於本機。','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','認證錯誤','1592iaImJG','已同步','正在擷取伺服器資料...','連線失敗,將在稍後重試連線。','2364SxbWbJ','4880Odblqj'];_0x41be=function(){return _0x5e99ea;};return _0x41be();}
@@ -1,3 +1,73 @@
1
+ import type { Ctor, DependencyOverride } from '@univerjs/core';
2
+ import type { IAttachmentUploadOptions } from '../services/attachment-remote/types';
3
+ import type { ICollaborationSocketService } from '../services/socket/collaboration-socket.service';
4
+ export declare const COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY = "collaboration-client.config";
5
+ export declare const configSymbol: unique symbol;
6
+ export interface IUniverCollaborationClientConfig {
7
+ /**
8
+ * Which socket should the plugin use to build connections to the collaborative engine.
9
+ * For normal cases, you should use `BrowserCollaborationSocketService` from the `collaboration-client-ui` plugin.
10
+ */
11
+ socketService: Ctor<ICollaborationSocketService>;
12
+ /**
13
+ * If the plugin should enable collaborative editing. Which means the client will exchange edits with
14
+ * the collaboration server. It this is set to false, the client will simply load data from the server.
15
+ *
16
+ * @default true
17
+ */
18
+ enableCollaboration?: boolean;
19
+ /**
20
+ * If offline editing is enabled.
21
+ * @default false
22
+ */
23
+ enableOfflineEditing?: boolean;
24
+ enableSingleActiveInstanceLock?: boolean;
25
+ enableAuthServer?: boolean;
26
+ /**
27
+ * Override internal modules with custom implementations.
28
+ */
29
+ override?: DependencyOverride;
30
+ sendChangesetTimeout?: number;
31
+ snapshotServerUrl?: string;
32
+ collabSubmitChangesetUrl?: string;
33
+ collabWebSocketUrl?: string;
34
+ /**
35
+ * The URL of the endpoint for getting the websocket session ticket.
36
+ */
37
+ wsSessionTicketUrl?: string;
38
+ loginUrlKey?: string;
39
+ retryConnectingInterval?: number;
40
+ authzUrl?: string;
41
+ /**
42
+ * The URL of the endpoint for downloading files.
43
+ * @default 'location.origin'
44
+ */
45
+ downloadEndpointUrl?: string;
46
+ uploadFileServerUrl?: string;
47
+ signUrlServerUrl?: string;
48
+ /**
49
+ * Shared attachment upload restrictions and optional custom uploader used by
50
+ * the collaboration attachment IO service.
51
+ */
52
+ attachment?: IAttachmentUploadOptions;
53
+ /**
54
+ * The URL of the endpoint for starting formula limit.
55
+ */
56
+ startFormulaLimitUrl?: string;
57
+ /**
58
+ * The URL of the endpoint for getting formula limit status.
59
+ */
60
+ getFormulaLimitStatusUrl?: string;
61
+ /**
62
+ * The URL of the endpoint for releasing formula limit.
63
+ */
64
+ releaseFormulaLimitUrl?: string;
65
+ /**
66
+ * The socket connection custom headers.
67
+ */
68
+ customHeaders?: Record<string, string>;
69
+ }
70
+ export declare const defaultPluginConfig: Omit<IUniverCollaborationClientConfig, 'socketService'>;
1
71
  /**
2
72
  * Default value for `SNAPSHOT_SERVER_URL_KEY`.
3
73
  *
@@ -4,6 +4,7 @@ import type { CollaborationSession } from '../../services/collaboration-session/
4
4
  import type { CollaborationState, ICollaborationStateHandler, SyncEditingCollabCursorHandler, TransformIMEHandler, TransformRemoteChangesetByIMECache, TransformRemoteChangesetByStateCache, TransformSelectionsHandler, TransformStateHandler } from './collaboration-state';
5
5
  import { CompressMutationService, RevisionService } from '@univerjs-pro/collaboration';
6
6
  import { ICommandService, ILogService, Injector, IPermissionService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
7
+ import { DocStateChangeManagerService } from '@univerjs/docs';
7
8
  import { BehaviorSubject } from 'rxjs';
8
9
  import { CollaborationUIEventService } from '../../services/collaboration-ui-event/collaboration-ui-event';
9
10
  import { ILocalCacheService } from '../../services/local-cache/local-cache.service';
@@ -79,13 +80,20 @@ export interface IDocCollaborationEntityCallback {
79
80
  export declare class DocCollaborationEntity extends CollaborationEntity {
80
81
  readonly unitID: string;
81
82
  readonly type: UniverInstanceType;
83
+ private readonly _docStateChangeManagerService?;
82
84
  private _handlerCallback;
83
- constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
85
+ constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, _docStateChangeManagerService?: DocStateChangeManagerService | undefined, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
84
86
  addHandlerCallback(cb: IDocCollaborationEntityCallback): void;
85
87
  dispose(): void;
86
88
  protected _createHandler(): ICollaborationStateHandler;
87
89
  protected _init(): Promise<CollaborationState>;
88
90
  }
91
+ export declare class BaseCollaborationEntity extends CollaborationEntity {
92
+ readonly unitID: string;
93
+ readonly type: UniverInstanceType;
94
+ constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
95
+ protected _init(): Promise<CollaborationState>;
96
+ }
89
97
  export declare class SheetCollaborationEntity extends CollaborationEntity {
90
98
  readonly unitID: string;
91
99
  readonly type: UniverInstanceType;
@@ -94,3 +102,9 @@ export declare class SheetCollaborationEntity extends CollaborationEntity {
94
102
  protected _createHandler(): ICollaborationStateHandler;
95
103
  protected _init(): Promise<CollaborationState>;
96
104
  }
105
+ export declare class SlideCollaborationEntity extends CollaborationEntity {
106
+ readonly unitID: string;
107
+ readonly type: UniverInstanceType;
108
+ constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
109
+ protected _init(): Promise<CollaborationState>;
110
+ }
@@ -15,19 +15,11 @@ export declare function isSplitChunkMutation(mutation: IMutationInfo): boolean;
15
15
  * Mutations those should be assembled into a single changeset.
16
16
  */
17
17
  export declare const SINGLE_CHANGESET_MUTATIONS: Set<string>;
18
- /**
19
- * Assemble a changeset from a list of mutations.
20
- *
21
- * Split chunk mutations (marked with __splitChunk__) and single-changeset mutations
22
- * will be sent in a separate changeset.
23
- *
24
- * @param pendingMutations - The list of pending mutations to assemble
25
- * @param unitID - The unit ID
26
- * @param univerInstanceService - The universe instance service
27
- * @param revisionService - The revision service
28
- * @param memberService - The member service
29
- * @returns The assembled changeset and remaining pending mutations
30
- */
31
- export declare function assembleSheetChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
18
+ export declare const SLIDE_SINGLE_CHANGESET_MUTATIONS: Set<string>;
19
+ export declare function takeMutationsForChangeset(pendingMutations: IMutationInfo[], singleChangesetMutations?: Set<string>): IMutationInfo[];
20
+ export declare function assembleMutationChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
21
+ export declare const assembleSheetChangeset: typeof assembleMutationChangeset;
22
+ export declare function assembleBaseChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
23
+ export declare function assembleSlideChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
32
24
  export declare function assembleDocChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
33
25
  export declare function createTimerObservable$<T>(ms: number, options: T): Observable<T>;
@@ -1,5 +1,8 @@
1
+ import type { FBase as FBaseFacade } from '@univerjs-pro/bases/facade';
1
2
  import type { ILogContext } from '@univerjs-pro/collaboration';
3
+ import type { FPresentation } from '@univerjs-pro/slides/facade';
2
4
  import type { IDisposable } from '@univerjs/core';
5
+ import type { FDocument } from '@univerjs/docs/facade';
3
6
  import type { IMember } from '@univerjs/protocol';
4
7
  import type { FWorkbook } from '@univerjs/sheets/facade';
5
8
  import { SnapshotService } from '@univerjs-pro/collaboration';
@@ -18,49 +21,59 @@ export declare class FCollaboration extends FBase {
18
21
  protected readonly _snapshotService: SnapshotService;
19
22
  protected readonly _collaborationController: CollaborationController;
20
23
  constructor(_handler: {
21
- getUniverSheet: (id: string) => FWorkbook | null;
24
+ getWorkbook: (id: string) => FWorkbook | null;
25
+ getDocument: (id: string) => FDocument | null;
26
+ getPresentation: (id: string) => FPresentation | null;
27
+ getBase: (id: string) => FBaseFacade | null;
22
28
  }, _injector: Injector, _univerInstanceService: IUniverInstanceService, _snapshotService: SnapshotService, _collaborationController: CollaborationController);
23
29
  /**
24
- * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if the active Univer Sheet cannot be loaded.
25
- *
26
- * @deprecated Use `loadActiveSheetAsync` instead.
30
+ * Load a Univer Sheet from the server with a unit ID.
31
+ * @param {string} unitId ID of the Univer Sheet that you would like to load.
32
+ * @param {ILogContext} [context] Optional context.
33
+ * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if ID cannot be associated with a Univer Sheet.
34
+ * @example
35
+ * ```typescript
36
+ * const collaboration = univerAPI.getCollaboration();
37
+ * const workbook = await collaboration.loadSheetAsync('your-unit-id');
38
+ * ```
27
39
  */
28
- loadActiveSheet(): Promise<FWorkbook | null>;
40
+ loadSheetAsync(unitId: string, context?: ILogContext): Promise<FWorkbook | null>;
29
41
  /**
30
- * Load the active Univer Sheet. It should be associated with the Uniscript Node.js Runtime.
31
- *
32
- * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if the active Univer Sheet cannot be loaded.
33
- * @throws {Error} If the method is not overridden.
34
- *
42
+ * Load a Univer Document from the server with a unit ID.
43
+ * @param {string} unitId ID of the Univer Document that you would like to load.
44
+ * @param {ILogContext} [context] Optional context.
45
+ * @returns {Promise<FDocument | null>} The {@link FDocument} or null if ID cannot be associated with a Univer Document.
35
46
  * @example
36
47
  * ```typescript
37
48
  * const collaboration = univerAPI.getCollaboration();
38
- * const workbook = await collaboration.loadActiveSheetAsync();
49
+ * const document = await collaboration.loadDocAsync('your-unit-id');
39
50
  * ```
40
51
  */
41
- loadActiveSheetAsync(): Promise<FWorkbook | null>;
52
+ loadDocAsync(unitId: string, context?: ILogContext): Promise<FDocument | null>;
42
53
  /**
43
- * @param {string} unitId The Id of the Univer Sheet that you would like to load.
44
- * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if the Univer Sheet cannot be loaded.
45
- *
46
- * @deprecated Use `loadSheetAsync` instead.
54
+ * Load a Univer Base from the server with a unit ID.
55
+ * @param {string} unitId ID of the Univer Base that you would like to load.
56
+ * @param {ILogContext} [context] Optional context.
57
+ * @returns {Promise<FBaseFacade | null>} The Base facade or null if ID cannot be associated with a Univer Base.
58
+ * @example
59
+ * ```typescript
60
+ * const collaboration = univerAPI.getCollaboration();
61
+ * const base = await collaboration.loadBaseAsync('your-unit-id');
62
+ * ```
47
63
  */
48
- loadSheet(unitId: string): Promise<FWorkbook | null>;
64
+ loadBaseAsync(unitId: string, context?: ILogContext): Promise<FBaseFacade | null>;
49
65
  /**
50
- * Load a Univer Sheet from the server with a unit ID.
51
- *
52
- * @param {string} unitId ID of the Univer Sheet that you would like to load.
66
+ * Load a Univer Slide from the server with a unit ID.
67
+ * @param {string} unitId ID of the Univer Slide that you would like to load.
53
68
  * @param {ILogContext} [context] Optional context.
54
- *
55
- * @returns {Promise<FWorkbook | null>} The {@link FWorkbook} or null if ID cannot be associated with a Univer Sheet.
56
- *
69
+ * @returns {Promise<FPresentation | null>} The {@link FPresentation} or null if ID cannot be associated with a Univer Slide.
57
70
  * @example
58
71
  * ```typescript
59
72
  * const collaboration = univerAPI.getCollaboration();
60
- * const workbook = await collaboration.loadSheetAsync('your-unit-id');
73
+ * const presentation = await collaboration.loadSlideAsync('your-unit-id');
61
74
  * ```
62
75
  */
63
- loadSheetAsync(unitId: string, context?: ILogContext): Promise<FWorkbook | null>;
76
+ loadSlideAsync(unitId: string, context?: ILogContext): Promise<FPresentation | null>;
64
77
  /**
65
78
  * Subscribe collaborators of a Univer file.
66
79
  *
@@ -1,19 +1,23 @@
1
1
  export { DEFAULT_WS_SESSION_TICKET_URL, HEARTBEAT_INTERVAL_KEY, HEARTBEAT_TIMEOUT_KEY, LOCAL_CACHE_INTERVAL, LOCAL_CACHE_INTERVAL_KEY, RETRY_CONNECTING_MAX_COUNT_KEY, } from './config/config';
2
- export { DEFAULT_COLLAB_WEB_SOCKET_URL, DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT, REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY } from './config/config';
3
- export { CollaborationEntity, DocCollaborationEntity, type IDocCollaborationEntityCallback, SheetCollaborationEntity } from './controllers/collaboration/collaboration-entity';
4
- export { AwaitingState, AwaitingWithPendingState, CollaborationStatus, ConflictState, FetchingMissState, OfflineState, PendingState, SyncedState } from './controllers/collaboration/collaboration-state';
2
+ export { DEFAULT_COLLAB_WEB_SOCKET_URL, DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT, REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY, } from './config/config';
3
+ export type { IUniverCollaborationClientConfig } from './config/config';
4
+ export { COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY } from './config/config';
5
+ export { CollaborationEntity, DocCollaborationEntity, SheetCollaborationEntity, } from './controllers/collaboration/collaboration-entity';
6
+ export type { IDocCollaborationEntityCallback } from './controllers/collaboration/collaboration-entity';
7
+ export { AwaitingState, AwaitingWithPendingState, CollaborationStatus, ConflictState, FetchingMissState, OfflineState, PendingState, SyncedState, } from './controllers/collaboration/collaboration-state';
5
8
  export { CollaborationController } from './controllers/collaboration/collaboration.controller';
6
- export type { IUniverCollaborationClientConfig } from './controllers/config.schema';
7
- export { COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY } from './controllers/config.schema';
8
9
  export { UniverCollaborationClientPlugin } from './plugin';
10
+ export { AttachmentSourceType, CollaborationAttachmentIoService, IAttachmentIoService, } from './services/attachment-remote/attachment-io.service';
11
+ export type { AttachmentValue, IAttachmentIoService as IAttachmentIoServiceType, IAttachmentUploadOptions, IAttachmentValue, } from './services/attachment-remote/attachment-io.service';
9
12
  export { AuthzIoHttpService } from './services/auth-server/authz-io-http.service';
10
13
  export { CollaborationSession, SessionStatus } from './services/collaboration-session/collaboration-session';
11
14
  export { CollaborationSessionService } from './services/collaboration-session/collaboration-session.service';
12
- export { CollaborationUIEventId, CollaborationUIEventService } from './services/collaboration-ui-event/collaboration-ui-event';
15
+ export { CollaborationUIEventId, CollaborationUIEventService, } from './services/collaboration-ui-event/collaboration-ui-event';
13
16
  export { CommentService } from './services/comment/comment.service';
14
17
  export { DataLoaderService } from './services/data-loader/data-loader.service';
15
18
  export { CollaborationImageIoService } from './services/image-remote/image-io.service';
16
- export { getLocalCacheKey, ILocalCacheService, type IUnitCacheData } from './services/local-cache/local-cache.service';
19
+ export { getLocalCacheKey, ILocalCacheService } from './services/local-cache/local-cache.service';
20
+ export type { IUnitCacheData } from './services/local-cache/local-cache.service';
17
21
  export { MemberService } from './services/member/member.service';
18
22
  export { MentionIoHttpService } from './services/mention-server/mention-io-http.service';
19
23
  export { INetworkConditionService } from './services/network-condition/network-condition.service';
@@ -0,0 +1,3 @@
1
+ import type { LocaleLeafKeys } from '@univerjs/core';
2
+ import type enUS from './en-US';
3
+ export type LocaleKey = LocaleLeafKeys<typeof enUS>;
@@ -1,4 +1,4 @@
1
- import type { IUniverCollaborationClientConfig } from './controllers/config.schema';
1
+ import type { IUniverCollaborationClientConfig } from './config/config';
2
2
  import { IConfigService, ILogService, Injector, Plugin } from '@univerjs/core';
3
3
  export declare class UniverCollaborationClientPlugin extends Plugin {
4
4
  private readonly _config;
@@ -0,0 +1,22 @@
1
+ import type { AttachmentValue, IAttachmentUploadOptions, IAttachmentValue } from './types';
2
+ import { IConfigService, IUniverInstanceService } from '@univerjs/core';
3
+ import { HTTPService } from '@univerjs/network';
4
+ import { AttachmentSourceType } from './types';
5
+ export { AttachmentSourceType };
6
+ export type { AttachmentValue, IAttachmentUploadOptions, IAttachmentValue };
7
+ export interface IAttachmentIoService {
8
+ getUploadOptions(): IAttachmentUploadOptions;
9
+ saveAttachment(file: File): Promise<IAttachmentValue>;
10
+ }
11
+ export declare const IAttachmentIoService: import("@wendellhu/redi").IdentifierDecorator<IAttachmentIoService>;
12
+ export declare class CollaborationAttachmentIoService implements IAttachmentIoService {
13
+ private readonly _httpService;
14
+ private readonly _configService;
15
+ private readonly _univerInstanceService;
16
+ constructor(_httpService: HTTPService, _configService: IConfigService, _univerInstanceService: IUniverInstanceService);
17
+ getUploadOptions(): IAttachmentUploadOptions;
18
+ saveAttachment(file: File): Promise<IAttachmentValue>;
19
+ private _upload;
20
+ private _getUploadFileURL;
21
+ private _getConfig;
22
+ }
@@ -0,0 +1,23 @@
1
+ export declare enum AttachmentSourceType {
2
+ URL = "URL",
3
+ UUID = "UUID",
4
+ BASE64 = "BASE64"
5
+ }
6
+ export interface IAttachmentValue {
7
+ id: string;
8
+ name: string;
9
+ mimeType?: string;
10
+ size?: number;
11
+ width?: number;
12
+ height?: number;
13
+ sourceType?: AttachmentSourceType;
14
+ source?: string;
15
+ base64?: string;
16
+ thumbnail?: string;
17
+ }
18
+ export type AttachmentValue = IAttachmentValue;
19
+ export interface IAttachmentUploadOptions {
20
+ accept?: string[];
21
+ maxSize?: number;
22
+ upload?: (file: File) => Promise<IAttachmentValue>;
23
+ }
@@ -15,8 +15,11 @@ export declare class DataLoaderService extends RxDisposable {
15
15
  private readonly _snapshotService;
16
16
  private readonly _localCacheService?;
17
17
  private readonly _unitInfo$;
18
+ private readonly _unitLoaded$;
18
19
  readonly unitInfo$: import("rxjs").Observable<IUnitInfo | null>;
20
+ readonly unitLoaded$: import("rxjs").Observable<UnitModel<object, UniverInstanceType>>;
19
21
  constructor(_logService: ILogService, _snapshotService: SnapshotService, _localCacheService?: ILocalCacheService | undefined);
22
+ dispose(): void;
20
23
  loadUnitOfRevision(unitId: string, type: UniverInstanceType, rev: number): Promise<UnitModel | null>;
21
24
  loadUnit(unitId: string, type: UniverInstanceType, subUnitId?: string): Promise<UnitModel | null>;
22
25
  }
@@ -10,6 +10,7 @@ export interface IUnitCacheData {
10
10
  export interface ILocalCacheService {
11
11
  loadOfflineData(unitID: string): Promise<Nullable<IUnitCacheData>>;
12
12
  saveOfflineData(unitID: string, data: IUnitCacheData): Promise<boolean>;
13
+ backupOfflineData?(unitID: string, reason: string): Promise<void>;
13
14
  updateOfflineData(unitID: string, type: UniverInstanceType, awaitingChangeset: Nullable<IChangeset>, pendingMutations: IMutationInfo[]): void;
14
15
  disableLocalCache(): void;
15
16
  enableLocalCache(): void;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x4925(_0x5acd61,_0x1e2b3a){_0x5acd61=_0x5acd61-0x9d;const _0x443bd3=_0x443b();let _0x4925d6=_0x443bd3[_0x5acd61];return _0x4925d6;}(function(_0x80c52b,_0x389e86){const _0x82adf2=_0x4925,_0x53be11=_0x80c52b();while(!![]){try{const _0x76d20e=-parseInt(_0x82adf2(0xbd))/0x1+-parseInt(_0x82adf2(0xb6))/0x2*(parseInt(_0x82adf2(0xe0))/0x3)+parseInt(_0x82adf2(0xb1))/0x4+-parseInt(_0x82adf2(0xb7))/0x5+parseInt(_0x82adf2(0xae))/0x6+parseInt(_0x82adf2(0xdf))/0x7+parseInt(_0x82adf2(0xe1))/0x8;if(_0x76d20e===_0x389e86)break;else _0x53be11['push'](_0x53be11['shift']());}catch(_0xddf65a){_0x53be11['push'](_0x53be11['shift']());}}}(_0x443b,0x790bb),function(_0x57a82e,_0x576a42){const _0x2cd0d4=_0x4925;typeof exports==_0x2cd0d4(0xe3)&&typeof module<'u'?_0x576a42(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('@univerjs-pro/collaboration'),require('rxjs')):typeof define==_0x2cd0d4(0xbc)&&define[_0x2cd0d4(0xdb)]?define(['exports',_0x2cd0d4(0xdd),_0x2cd0d4(0xa0),'@univerjs/core',_0x2cd0d4(0xa8),_0x2cd0d4(0xd1)],_0x576a42):(_0x57a82e=typeof globalThis<'u'?globalThis:_0x57a82e||self,_0x576a42(_0x57a82e['UniverProCollaborationClientFacade']={},_0x57a82e[_0x2cd0d4(0xc9)],_0x57a82e['UniverCoreFacade'],_0x57a82e[_0x2cd0d4(0xd3)],_0x57a82e[_0x2cd0d4(0xa6)],_0x57a82e[_0x2cd0d4(0xd1)]));}(this,function(_0x202d24,_0x34805c,_0x2c3d4f,_0x1358af,_0x56a7bf,_0x247898){const _0x49b58d=_0x4925;Object[_0x49b58d(0xa9)](_0x202d24,Symbol[_0x49b58d(0xc6)],{'value':_0x49b58d(0x9f)});var _0x1a76ae=class extends _0x2c3d4f[_0x49b58d(0xd9)]{get[_0x49b58d(0xbb)](){return _0x34805c['CollaborationStatus'];}};_0x2c3d4f[_0x49b58d(0xd9)]['extend'](_0x1a76ae);var _0x259589=class extends _0x2c3d4f[_0x49b58d(0xc4)]{get[_0x49b58d(0xe6)](){return'CollaborationStatusChanged';}};_0x2c3d4f['FEventName'][_0x49b58d(0xda)](_0x259589);function _0x555c22(_0x2964a2,_0x450ec0){return function(_0x29d45c,_0x12e0b8){_0x450ec0(_0x29d45c,_0x12e0b8,_0x2964a2);};}function _0x39a80c(_0x57b346,_0x73f338,_0x30254e,_0x21f463){const _0x50b42b=_0x49b58d;var _0x4a1b69=arguments['length'],_0x24ca06=_0x4a1b69<0x3?_0x73f338:_0x21f463===null?_0x21f463=Object[_0x50b42b(0xa2)](_0x73f338,_0x30254e):_0x21f463,_0x38e8c3;if(typeof Reflect==_0x50b42b(0xe3)&&typeof Reflect[_0x50b42b(0xba)]==_0x50b42b(0xbc))_0x24ca06=Reflect['decorate'](_0x57b346,_0x73f338,_0x30254e,_0x21f463);else{for(var _0x5e85c0=_0x57b346[_0x50b42b(0xd7)]-0x1;_0x5e85c0>=0x0;_0x5e85c0--)(_0x38e8c3=_0x57b346[_0x5e85c0])&&(_0x24ca06=(_0x4a1b69<0x3?_0x38e8c3(_0x24ca06):_0x4a1b69>0x3?_0x38e8c3(_0x73f338,_0x30254e,_0x24ca06):_0x38e8c3(_0x73f338,_0x30254e))||_0x24ca06);}return _0x4a1b69>0x3&&_0x24ca06&&Object[_0x50b42b(0xa9)](_0x73f338,_0x30254e,_0x24ca06),_0x24ca06;}let _0x5e83a5=class extends _0x2c3d4f['FBase']{constructor(_0x91aad2,_0x161336,_0x105283,_0x2b5c56,_0x516e5e){const _0x469922=_0x49b58d;super(),this[_0x469922(0xca)]=_0x91aad2,this[_0x469922(0x9e)]=_0x161336,this[_0x469922(0xa1)]=_0x105283,this[_0x469922(0xd8)]=_0x2b5c56,this['_collaborationController']=_0x516e5e;}async[_0x49b58d(0xb5)](){return this['loadActiveSheetAsync']();}async[_0x49b58d(0xb2)](){throw Error('[FCollaboration]:\x20this\x20method\x20should\x20be\x20override.');}async['loadSheet'](_0x4d0402){const _0x46b1d1=_0x49b58d;return this[_0x46b1d1(0xa5)](_0x4d0402);}async[_0x49b58d(0xa5)](_0x3dc10f,_0x5cd411){const _0x320ebd=_0x49b58d;return await this[_0x320ebd(0xd8)]['loadSheet'](_0x3dc10f,0x0,_0x5cd411)?(await this[_0x320ebd(0xa7)]['readyForCollab'](_0x3dc10f),this[_0x320ebd(0xca)][_0x320ebd(0xab)](_0x3dc10f)):null;}[_0x49b58d(0xc2)](_0x54dca0,_0x308a9b){const _0x3fa0d7=_0x49b58d;return(0x0,_0x1358af[_0x3fa0d7(0xb3)])(this[_0x3fa0d7(0x9e)]['get'](_0x34805c[_0x3fa0d7(0xbf)])[_0x3fa0d7(0xd6)](_0x54dca0)[_0x3fa0d7(0xa3)]((0x0,_0x247898[_0x3fa0d7(0xa4)])(_0x44da36=>_0x44da36[_0x3fa0d7(0xb4)]))[_0x3fa0d7(0xc1)](_0xd6d70f=>_0x308a9b(Array[_0x3fa0d7(0xaf)](_0xd6d70f['values']()))));}[_0x49b58d(0xe5)](_0x9bf2c5){const _0x215470=_0x49b58d;var _0x16d234;let _0x28c252;if(_0x9bf2c5)_0x28c252=_0x9bf2c5;else{let _0x730a5b=this[_0x215470(0xa1)]['getFocusedUnit']();_0x28c252=_0x730a5b==null?void 0x0:_0x730a5b['getUnitId']();}if(!_0x28c252)return _0x34805c['CollaborationStatus'][_0x215470(0xc0)];let _0x35a83e=this[_0x215470(0xa7)][_0x215470(0xc5)](_0x28c252);return(_0x16d234=_0x35a83e==null?void 0x0:_0x35a83e[_0x215470(0xcc)][_0x215470(0xcd)])==null?_0x34805c['CollaborationStatus'][_0x215470(0xc0)]:_0x16d234;}};_0x5e83a5=_0x39a80c([_0x555c22(0x1,(0x0,_0x1358af[_0x49b58d(0xaa)])(_0x1358af[_0x49b58d(0xd5)])),_0x555c22(0x2,_0x1358af[_0x49b58d(0xd0)]),_0x555c22(0x3,(0x0,_0x1358af[_0x49b58d(0xaa)])(_0x56a7bf[_0x49b58d(0xb9)])),_0x555c22(0x4,(0x0,_0x1358af[_0x49b58d(0xaa)])(_0x34805c[_0x49b58d(0xdc)]))],_0x5e83a5);var _0x3b2b18=class extends _0x2c3d4f[_0x49b58d(0x9d)]{['_initialize'](_0x5ac019){const _0x1b733d=_0x49b58d;let _0x8f7e9e=_0x5ac019['get'](_0x34805c[_0x1b733d(0xdc)]);this[_0x1b733d(0xc8)](this[_0x1b733d(0xad)](this[_0x1b733d(0xbe)][_0x1b733d(0xe6)],()=>{const _0x4d1583=_0x1b733d;let _0x4d3e1c=new _0x1358af[(_0x4d1583(0xcf))](),_0x568d06=_0x8f7e9e[_0x4d1583(0xc7)][_0x4d1583(0xc1)](_0x1934d0=>{const _0x44e0eb=_0x4d1583;let _0x4ec2f1=_0x1934d0[_0x44e0eb(0xc3)][_0x44e0eb(0xc1)](_0x18aefd=>{const _0x3a34cd=_0x44e0eb;let _0x401838={'unitId':_0x1934d0['unitID'],'status':_0x18aefd};this[_0x3a34cd(0xb8)](this['Event'][_0x3a34cd(0xe6)],_0x401838);});_0x4d3e1c[_0x44e0eb(0xcb)]((0x0,_0x1358af[_0x44e0eb(0xb3)])(_0x4ec2f1));});return _0x4d3e1c[_0x4d1583(0xcb)]((0x0,_0x1358af[_0x4d1583(0xb3)])(_0x568d06)),_0x4d3e1c;}));}[_0x49b58d(0xd4)](){const _0x4a54cc=_0x49b58d;return this[_0x4a54cc(0x9e)][_0x4a54cc(0xe2)](_0x5e83a5,{'getUniverSheet':_0x26337d=>this[_0x4a54cc(0xab)](_0x26337d)});}[_0x49b58d(0xac)](_0x3875e7,_0x1e1ad0,_0x50650b){const _0xa866c8=_0x49b58d;return this[_0xa866c8(0x9e)][_0xa866c8(0xe4)](_0x34805c[_0xa866c8(0xb0)])[_0xa866c8(0xde)](_0x3875e7,_0x1e1ad0,_0x50650b);}['loadServerUnitOfRevision'](_0x569cf7,_0x329058,_0x1ced38){const _0x102d0d=_0x49b58d;return this['_injector']['get'](_0x34805c[_0x102d0d(0xb0)])[_0x102d0d(0xce)](_0x569cf7,_0x329058,_0x1ced38);}};_0x2c3d4f[_0x49b58d(0x9d)][_0x49b58d(0xda)](_0x3b2b18),Object[_0x49b58d(0xa9)](_0x202d24,_0x49b58d(0xd2),{'enumerable':!0x0,'get':function(){return _0x5e83a5;}});}));function _0x443b(){const _0x292008=['@univerjs-pro/collaboration','defineProperty','Inject','getUniverSheet','loadServerUnit','registerEventHandler','5870082PTZusV','from','DataLoaderService','426776rwWHRd','loadActiveSheetAsync','toDisposable','members$','loadActiveSheet','6CAJNMK','1478870ixqBgY','fireEvent','SnapshotService','decorate','CollaborationStatus','function','382823scwCSy','Event','MemberService','NOT_COLLAB','subscribe','subscribeCollaborators','status$','FEventName','getCollabEntity','toStringTag','entityInit$','disposeWithMe','UniverProCollaborationClient','_handler','add','state','status','loadUnitOfRevision','DisposableCollection','IUniverInstanceService','rxjs','FCollaboration','UniverCore','getCollaboration','Injector','waitForRoom$','length','_snapshotService','FEnum','extend','amd','CollaborationController','@univerjs-pro/collaboration-client','loadUnit','6175491WOQbhM','913929AGfrEf','968600UQRioK','createInstance','object','get','getCollaborationStatus','CollaborationStatusChanged','FUniver','_injector','Module','@univerjs/core/facade','_univerInstanceService','getOwnPropertyDescriptor','pipe','switchMap','loadSheetAsync','UniverProCollaboration','_collaborationController'];_0x443b=function(){return _0x292008;};return _0x443b();}
1
+ function _0xaad3(_0xc3524c,_0x2318c5){_0xc3524c=_0xc3524c-0x15b;const _0x13cde5=_0x13cd();let _0xaad38b=_0x13cde5[_0xc3524c];return _0xaad38b;}(function(_0x34c77f,_0x2c88b3){const _0x207113=_0xaad3,_0x5b13c1=_0x34c77f();while(!![]){try{const _0x4802be=parseInt(_0x207113(0x171))/0x1+parseInt(_0x207113(0x195))/0x2*(parseInt(_0x207113(0x17e))/0x3)+-parseInt(_0x207113(0x16f))/0x4*(-parseInt(_0x207113(0x174))/0x5)+parseInt(_0x207113(0x15c))/0x6*(parseInt(_0x207113(0x185))/0x7)+parseInt(_0x207113(0x194))/0x8*(parseInt(_0x207113(0x1a6))/0x9)+parseInt(_0x207113(0x1a7))/0xa*(parseInt(_0x207113(0x196))/0xb)+-parseInt(_0x207113(0x1aa))/0xc;if(_0x4802be===_0x2c88b3)break;else _0x5b13c1['push'](_0x5b13c1['shift']());}catch(_0x2b38b8){_0x5b13c1['push'](_0x5b13c1['shift']());}}}(_0x13cd,0x3d3d5),function(_0x37bc8f,_0x35485a){const _0x2d0bf7=_0xaad3;typeof exports==_0x2d0bf7(0x17a)&&typeof module<'u'?_0x35485a(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('@univerjs-pro/collaboration'),require('rxjs')):typeof define==_0x2d0bf7(0x1b0)&&define[_0x2d0bf7(0x17b)]?define(['exports',_0x2d0bf7(0x18f),_0x2d0bf7(0x175),_0x2d0bf7(0x198),_0x2d0bf7(0x1af),_0x2d0bf7(0x168)],_0x35485a):(_0x37bc8f=typeof globalThis<'u'?globalThis:_0x37bc8f||self,_0x35485a(_0x37bc8f[_0x2d0bf7(0x188)]={},_0x37bc8f[_0x2d0bf7(0x16a)],_0x37bc8f[_0x2d0bf7(0x16d)],_0x37bc8f[_0x2d0bf7(0x1a1)],_0x37bc8f[_0x2d0bf7(0x177)],_0x37bc8f[_0x2d0bf7(0x168)]));}(this,function(_0x51c819,_0x2a3c5c,_0x4b64d9,_0x1277d6,_0x15f785,_0x1d8dd2){const _0x45ffd1=_0xaad3;Object[_0x45ffd1(0x15d)](_0x51c819,Symbol[_0x45ffd1(0x184)],{'value':_0x45ffd1(0x186)});var _0x3ef343=class extends _0x4b64d9[_0x45ffd1(0x18d)]{get[_0x45ffd1(0x182)](){const _0xdc5c4d=_0x45ffd1;return _0x2a3c5c[_0xdc5c4d(0x182)];}};_0x4b64d9[_0x45ffd1(0x18d)]['extend'](_0x3ef343);var _0x4f8597=class extends _0x4b64d9[_0x45ffd1(0x199)]{get[_0x45ffd1(0x172)](){const _0x5b3052=_0x45ffd1;return _0x5b3052(0x172);}};_0x4b64d9['FEventName'][_0x45ffd1(0x165)](_0x4f8597);function _0x43bfe2(_0x3b5c03,_0x25c8d0){return function(_0x2cae72,_0xea7fd8){_0x25c8d0(_0x2cae72,_0xea7fd8,_0x3b5c03);};}function _0x56b9b4(_0x184bb7,_0x3a2d07,_0x393380,_0x372188){const _0x165c16=_0x45ffd1;var _0x54c5fc=arguments['length'],_0x375ed8=_0x54c5fc<0x3?_0x3a2d07:_0x372188===null?_0x372188=Object[_0x165c16(0x190)](_0x3a2d07,_0x393380):_0x372188,_0x222ad6;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x165c16(0x1b0))_0x375ed8=Reflect['decorate'](_0x184bb7,_0x3a2d07,_0x393380,_0x372188);else{for(var _0x1caf70=_0x184bb7['length']-0x1;_0x1caf70>=0x0;_0x1caf70--)(_0x222ad6=_0x184bb7[_0x1caf70])&&(_0x375ed8=(_0x54c5fc<0x3?_0x222ad6(_0x375ed8):_0x54c5fc>0x3?_0x222ad6(_0x3a2d07,_0x393380,_0x375ed8):_0x222ad6(_0x3a2d07,_0x393380))||_0x375ed8);}return _0x54c5fc>0x3&&_0x375ed8&&Object[_0x165c16(0x15d)](_0x3a2d07,_0x393380,_0x375ed8),_0x375ed8;}let _0x2fb12c=class extends _0x4b64d9['FBase']{constructor(_0x3d0c0c,_0x2df2ec,_0xbf276c,_0xe9c5a4,_0x2af393){const _0x5db6b8=_0x45ffd1;super(),this[_0x5db6b8(0x189)]=_0x3d0c0c,this['_injector']=_0x2df2ec,this[_0x5db6b8(0x1ab)]=_0xbf276c,this[_0x5db6b8(0x19b)]=_0xe9c5a4,this[_0x5db6b8(0x19e)]=_0x2af393;}async[_0x45ffd1(0x169)](_0x356e44,_0x2d2f93){const _0x2fa6cc=_0x45ffd1;return await this['_snapshotService'][_0x2fa6cc(0x164)](_0x356e44,0x0,_0x2d2f93)?(await this[_0x2fa6cc(0x19e)][_0x2fa6cc(0x173)](_0x356e44),this[_0x2fa6cc(0x189)][_0x2fa6cc(0x1a2)](_0x356e44)):null;}async[_0x45ffd1(0x18e)](_0x24f7c6,_0x55d9ae){const _0x1ec120=_0x45ffd1;return await this[_0x1ec120(0x19b)][_0x1ec120(0x19c)](_0x24f7c6,0x0,_0x55d9ae)?(await this[_0x1ec120(0x19e)][_0x1ec120(0x173)](_0x24f7c6),this[_0x1ec120(0x189)][_0x1ec120(0x18b)](_0x24f7c6)):null;}async['loadBaseAsync'](_0x1d3c6a,_0x4e0c79){const _0x154fc9=_0x45ffd1;return await this[_0x154fc9(0x19b)][_0x154fc9(0x183)](_0x1d3c6a,0x0,_0x4e0c79)?(await this[_0x154fc9(0x19e)][_0x154fc9(0x173)](_0x1d3c6a),this[_0x154fc9(0x189)][_0x154fc9(0x19f)](_0x1d3c6a)):null;}async[_0x45ffd1(0x1a3)](_0x1b3872,_0x1256ce){const _0x42f4cb=_0x45ffd1;return await this[_0x42f4cb(0x19b)][_0x42f4cb(0x163)](_0x1b3872,0x0,_0x1256ce)?(await this[_0x42f4cb(0x19e)][_0x42f4cb(0x173)](_0x1b3872),this['_handler']['getPresentation'](_0x1b3872)):null;}[_0x45ffd1(0x187)](_0x38fe87,_0x169838){const _0x5991e5=_0x45ffd1;return(0x0,_0x1277d6[_0x5991e5(0x15e)])(this[_0x5991e5(0x1a5)][_0x5991e5(0x179)](_0x2a3c5c[_0x5991e5(0x18a)])[_0x5991e5(0x1a9)](_0x38fe87)[_0x5991e5(0x176)]((0x0,_0x1d8dd2[_0x5991e5(0x16e)])(_0x514069=>_0x514069['members$']))['subscribe'](_0x114a5d=>_0x169838(Array['from'](_0x114a5d['values']()))));}[_0x45ffd1(0x180)](_0x44e110){const _0x43cf2d=_0x45ffd1;var _0x2454eb;let _0x177a88;if(_0x44e110)_0x177a88=_0x44e110;else{let _0xab19f8=this[_0x43cf2d(0x1ab)][_0x43cf2d(0x16b)]();_0x177a88=_0xab19f8==null?void 0x0:_0xab19f8[_0x43cf2d(0x1ae)]();}if(!_0x177a88)return _0x2a3c5c[_0x43cf2d(0x182)][_0x43cf2d(0x1ac)];let _0xf1e668=this[_0x43cf2d(0x19e)]['getCollabEntity'](_0x177a88);return(_0x2454eb=_0xf1e668==null?void 0x0:_0xf1e668[_0x43cf2d(0x193)]['status'])==null?_0x2a3c5c[_0x43cf2d(0x182)]['NOT_COLLAB']:_0x2454eb;}};_0x2fb12c=_0x56b9b4([_0x43bfe2(0x1,(0x0,_0x1277d6[_0x45ffd1(0x160)])(_0x1277d6[_0x45ffd1(0x17f)])),_0x43bfe2(0x2,_0x1277d6[_0x45ffd1(0x178)]),_0x43bfe2(0x3,(0x0,_0x1277d6[_0x45ffd1(0x160)])(_0x15f785[_0x45ffd1(0x18c)])),_0x43bfe2(0x4,(0x0,_0x1277d6[_0x45ffd1(0x160)])(_0x2a3c5c[_0x45ffd1(0x166)]))],_0x2fb12c);var _0x9fcf7c=class extends _0x4b64d9[_0x45ffd1(0x17d)]{['_initialize'](_0x205321){const _0x14c5c5=_0x45ffd1;let _0x469a24=_0x205321['get'](_0x2a3c5c[_0x14c5c5(0x166)]);this[_0x14c5c5(0x170)](this[_0x14c5c5(0x1a4)](this['Event'][_0x14c5c5(0x172)],()=>{const _0x177cf9=_0x14c5c5;let _0x5b0f2b=new _0x1277d6[(_0x177cf9(0x19d))](),_0x564bfa=_0x469a24[_0x177cf9(0x1ad)]['subscribe'](_0x2b8867=>{const _0x5b5529=_0x177cf9;let _0xb66fca=_0x2b8867[_0x5b5529(0x162)][_0x5b5529(0x17c)](_0x2f50fb=>{const _0x1823ca=_0x5b5529;let _0x42b343={'unitId':_0x2b8867[_0x1823ca(0x1a8)],'status':_0x2f50fb};this[_0x1823ca(0x15f)](this[_0x1823ca(0x191)][_0x1823ca(0x172)],_0x42b343);});_0x5b0f2b[_0x5b5529(0x197)]((0x0,_0x1277d6['toDisposable'])(_0xb66fca));});return _0x5b0f2b[_0x177cf9(0x197)]((0x0,_0x1277d6[_0x177cf9(0x15e)])(_0x564bfa)),_0x5b0f2b;}));}[_0x45ffd1(0x161)](){const _0x20e10e=_0x45ffd1;return this[_0x20e10e(0x1a5)]['createInstance'](_0x2fb12c,{'getWorkbook':_0x2e33e2=>this[_0x20e10e(0x1a2)](_0x2e33e2),'getDocument':_0xe1ac94=>this['getDocument'](_0xe1ac94),'getPresentation':_0x3443c0=>this[_0x20e10e(0x19a)](_0x3443c0),'getBase':_0xd7b20f=>this[_0x20e10e(0x19f)](_0xd7b20f)});}[_0x45ffd1(0x192)](_0x164529,_0x12ee01,_0x406632){const _0x480534=_0x45ffd1;return this[_0x480534(0x1a5)]['get'](_0x2a3c5c[_0x480534(0x16c)])[_0x480534(0x1a0)](_0x164529,_0x12ee01,_0x406632);}[_0x45ffd1(0x167)](_0x4f83b3,_0x2ca766,_0x18ac1c){const _0xa63fc4=_0x45ffd1;return this['_injector'][_0xa63fc4(0x179)](_0x2a3c5c[_0xa63fc4(0x16c)])[_0xa63fc4(0x15b)](_0x4f83b3,_0x2ca766,_0x18ac1c);}};_0x4b64d9[_0x45ffd1(0x17d)][_0x45ffd1(0x165)](_0x9fcf7c),Object['defineProperty'](_0x51c819,_0x45ffd1(0x181),{'enumerable':!0x0,'get':function(){return _0x2fb12c;}});}));function _0x13cd(){const _0x25b0cd=['getPresentation','_snapshotService','loadDoc','DisposableCollection','_collaborationController','getBase','loadUnit','UniverCore','getWorkbook','loadSlideAsync','registerEventHandler','_injector','192663Uwqdrv','4950370Rlmwxe','unitID','waitForRoom$','12532176uGFOKU','_univerInstanceService','NOT_COLLAB','entityInit$','getUnitId','@univerjs-pro/collaboration','function','loadUnitOfRevision','6EtwxlG','defineProperty','toDisposable','fireEvent','Inject','getCollaboration','status$','loadSlide','loadSheet','extend','CollaborationController','loadServerUnitOfRevision','rxjs','loadSheetAsync','UniverProCollaborationClient','getFocusedUnit','DataLoaderService','UniverCoreFacade','switchMap','4qsbZUm','disposeWithMe','121401NbxsTB','CollaborationStatusChanged','readyForCollab','219955MxTQlC','@univerjs/core/facade','pipe','UniverProCollaboration','IUniverInstanceService','get','object','amd','subscribe','FUniver','451686cbkWPd','Injector','getCollaborationStatus','FCollaboration','CollaborationStatus','loadBase','toStringTag','1885877yUkllE','Module','subscribeCollaborators','UniverProCollaborationClientFacade','_handler','MemberService','getDocument','SnapshotService','FEnum','loadDocAsync','@univerjs-pro/collaboration-client','getOwnPropertyDescriptor','Event','loadServerUnit','state','24QNLlNY','4jjQVon','11UgtNEW','add','@univerjs/core','FEventName'];_0x13cd=function(){return _0x25b0cd;};return _0x13cd();}