@univerjs-pro/collaboration-client 1.0.0-alpha.6 → 1.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) 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/controllers/collaboration/collaboration-entity.d.ts +6 -0
  65. package/lib/types/controllers/collaboration/collaboration-state.d.ts +3 -4
  66. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +8 -5
  67. package/lib/types/index.d.ts +2 -3
  68. package/lib/types/services/attachment-remote/attachment-io.service.d.ts +9 -4
  69. package/lib/types/services/attachment-remote/types.d.ts +2 -19
  70. package/lib/types/services/member/member.service.d.ts +2 -15
  71. package/lib/umd/facade.js +1 -1
  72. package/lib/umd/index.js +1 -1
  73. package/lib/umd/locale/ar-SA.js +1 -1
  74. package/lib/umd/locale/ca-ES.js +1 -1
  75. package/lib/umd/locale/de-DE.js +1 -1
  76. package/lib/umd/locale/en-US.js +1 -1
  77. package/lib/umd/locale/es-ES.js +1 -1
  78. package/lib/umd/locale/fa-IR.js +1 -1
  79. package/lib/umd/locale/fr-FR.js +1 -1
  80. package/lib/umd/locale/id-ID.js +1 -1
  81. package/lib/umd/locale/it-IT.js +1 -1
  82. package/lib/umd/locale/ja-JP.js +1 -1
  83. package/lib/umd/locale/ko-KR.js +1 -1
  84. package/lib/umd/locale/pl-PL.js +1 -1
  85. package/lib/umd/locale/pt-BR.js +1 -1
  86. package/lib/umd/locale/ru-RU.js +1 -1
  87. package/lib/umd/locale/sk-SK.js +1 -1
  88. package/lib/umd/locale/vi-VN.js +1 -1
  89. package/lib/umd/locale/zh-CN.js +1 -1
  90. package/lib/umd/locale/zh-HK.js +1 -1
  91. package/lib/umd/locale/zh-TW.js +1 -1
  92. package/package.json +15 -14
@@ -1 +1 @@
1
- const _0x5236c6=_0x384f;function _0x384f(_0x30e188,_0xf03d48){_0x30e188=_0x30e188-0x9d;const _0x10dd93=_0x10dd();let _0x384f37=_0x10dd93[_0x30e188];return _0x384f37;}(function(_0x34e3fb,_0x3cf953){const _0x2ba0aa=_0x384f,_0x2a314c=_0x34e3fb();while(!![]){try{const _0x32e75f=-parseInt(_0x2ba0aa(0xb2))/0x1+parseInt(_0x2ba0aa(0xa7))/0x2+parseInt(_0x2ba0aa(0xb7))/0x3+-parseInt(_0x2ba0aa(0xab))/0x4+-parseInt(_0x2ba0aa(0xad))/0x5+parseInt(_0x2ba0aa(0x9d))/0x6*(parseInt(_0x2ba0aa(0x9e))/0x7)+parseInt(_0x2ba0aa(0xaa))/0x8*(parseInt(_0x2ba0aa(0xb1))/0x9);if(_0x32e75f===_0x3cf953)break;else _0x2a314c['push'](_0x2a314c['shift']());}catch(_0x4ae41a){_0x2a314c['push'](_0x2a314c['shift']());}}}(_0x10dd,0xddc8e));const e={'collaboration-client':{'collabClient':{'tooltip':{'reconnect':_0x5236c6(0xa4)}},'collabStatus':{'fetchMiss':_0x5236c6(0xa6),'conflict':_0x5236c6(0xb5),'notCollab':_0x5236c6(0xb0),'synced':_0x5236c6(0xae),'syncing':'同步中...','offline':_0x5236c6(0xb6)},'session':{'connection-failed':_0x5236c6(0xa2),'will-retry':_0x5236c6(0xb3),'room-full':'此文件協作人數已達上限,您的編輯將暫存於本機。','join-failed':_0x5236c6(0xa8),'room-not-exists':_0x5236c6(0xa3),'room-permission-denied':_0x5236c6(0xa5),'room-cnt-exceeds':'協作文件數量超過限制,您的編輯將暫存於本機。','collaboration-timeout':_0x5236c6(0xaf)},'conflict':{'title':_0x5236c6(0x9f),'content':_0x5236c6(0xb4)},'permission':{'title':_0x5236c6(0xac),'content':_0x5236c6(0xa9)},'collaboration':{'single-unit':{'warning':_0x5236c6(0xa1)},'closeRoom':_0x5236c6(0xa0)},'auth':{'needGotoLoginAlert':'您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。'}}};export{e as default};function _0x10dd(){const _0x583d46=['1878550lkJLbG','加入協作失敗,請稍後重試,您的編輯將暫存於本機。','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','32CupYpv','1936160bQynLE','認證錯誤','6402945IMttPz','已同步','伺服器未回應協作請求,您的編輯將儲存在本機。','本機檔案','993915wYgbtR','588769jZmlsk','連線失敗,將在稍後重試連線。','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','編輯衝突','已離線,編輯將儲存在本機','4237707ZFpAHJ','401352kZRzxu','49Szkiht','協作衝突','由於協作房間已關閉,編輯權限已被收回。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','連線失敗,請檢查您的網路。','加入協作失敗,您的編輯將暫存於本機。','點擊重新連線','沒有協作權限,您的編輯將暫存於本機。','正在擷取伺服器資料...'];_0x10dd=function(){return _0x583d46;};return _0x10dd();}
1
+ const _0x411811=_0x197a;function _0x197a(_0x1ca8f6,_0x2fe3bf){_0x1ca8f6=_0x1ca8f6-0x76;const _0x1fdd63=_0x1fdd();let _0x197a24=_0x1fdd63[_0x1ca8f6];return _0x197a24;}function _0x1fdd(){const _0x12cfff=['編輯衝突','35yMeSBW','180PzOzgn','正在擷取伺服器資料...','2otVhlP','30OHHXzl','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','認證錯誤','449828LoRtUt','此文件協作人數已達上限,您的編輯將暫存於本機。','164742caBHZS','191170AtYODQ','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','點擊重新連線','已離線,編輯將儲存在本機','協作衝突','24421msFUam','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','141262pmEKvL','522056TwXmZn','已同步','7XlakJw','14427THBhtz','由於協作房間已關閉,編輯權限已被收回。','加入協作失敗,請稍後重試,您的編輯將暫存於本機。','3OLKlTk','伺服器未回應協作請求,您的編輯將儲存在本機。','325YUNrBG'];_0x1fdd=function(){return _0x12cfff;};return _0x1fdd();}(function(_0xc3ae6f,_0x1d79c6){const _0x2b13b6=_0x197a,_0x4b2f1b=_0xc3ae6f();while(!![]){try{const _0x40d234=parseInt(_0x2b13b6(0x78))/0x1*(-parseInt(_0x2b13b6(0x88))/0x2)+parseInt(_0x2b13b6(0x81))/0x3*(parseInt(_0x2b13b6(0x8c))/0x4)+-parseInt(_0x2b13b6(0x85))/0x5*(parseInt(_0x2b13b6(0x8e))/0x6)+parseInt(_0x2b13b6(0x7d))/0x7*(parseInt(_0x2b13b6(0x7b))/0x8)+parseInt(_0x2b13b6(0x7e))/0x9*(-parseInt(_0x2b13b6(0x89))/0xa)+-parseInt(_0x2b13b6(0x7a))/0xb*(parseInt(_0x2b13b6(0x86))/0xc)+-parseInt(_0x2b13b6(0x83))/0xd*(-parseInt(_0x2b13b6(0x8f))/0xe);if(_0x40d234===_0x1d79c6)break;else _0x4b2f1b['push'](_0x4b2f1b['shift']());}catch(_0x1a86dd){_0x4b2f1b['push'](_0x4b2f1b['shift']());}}}(_0x1fdd,0x19a46));const e={'collaboration-client':{'collabClient':{'tooltip':{'reconnect':_0x411811(0x91)}},'collabStatus':{'fetchMiss':_0x411811(0x87),'conflict':_0x411811(0x84),'notCollab':'本機檔案','synced':_0x411811(0x7c),'syncing':'同步中...','offline':_0x411811(0x76)},'session':{'connection-failed':'連線失敗,請檢查您的網路。','will-retry':'連線失敗,將在稍後重試連線。','room-full':_0x411811(0x8d),'join-failed':_0x411811(0x80),'room-not-exists':'加入協作失敗,您的編輯將暫存於本機。','room-permission-denied':'沒有協作權限,您的編輯將暫存於本機。','room-cnt-exceeds':'協作文件數量超過限制,您的編輯將暫存於本機。','collaboration-timeout':_0x411811(0x82)},'conflict':{'title':_0x411811(0x77),'content':_0x411811(0x79)},'permission':{'title':_0x411811(0x8b),'content':'您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。'},'collaboration':{'single-unit':{'warning':_0x411811(0x8a)},'closeRoom':_0x411811(0x7f)},'auth':{'needGotoLoginAlert':_0x411811(0x90)}}};export{e as default};
@@ -114,3 +114,9 @@ export declare class BoardCollaborationEntity extends CollaborationEntity {
114
114
  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);
115
115
  protected _init(): Promise<CollaborationState>;
116
116
  }
117
+ export declare class PdfCollaborationEntity extends CollaborationEntity {
118
+ readonly unitID: string;
119
+ readonly type: UniverInstanceType;
120
+ 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);
121
+ protected _init(): Promise<CollaborationState>;
122
+ }
@@ -3,10 +3,9 @@ import type { IMutationInfo, Nullable } from '@univerjs/core';
3
3
  import type { Observable } from 'rxjs';
4
4
  import type { ICollaborativeUndoRedoService } from '../../services/undoredo/collaborative-undoredo.service';
5
5
  import { ITransformService, RevisionService } from '@univerjs-pro/collaboration';
6
- import { ICommandService, IConfigService, ILogService, Injector, IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';
6
+ import { ICommandService, IConfigService, ILogService, Injector, IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType, UserManagerService } from '@univerjs/core';
7
7
  import { CollaborationUIEventService } from '../../services/collaboration-ui-event/collaboration-ui-event';
8
8
  import { ILocalCacheService } from '../../services/local-cache/local-cache.service';
9
- import { MemberService } from '../../services/member/member.service';
10
9
  /** Provide both states when and after changing, so the parent could examine if state transition is correct. */
11
10
  export type StateChangeHandler = (before: CollaborationState, after: CollaborationState) => void;
12
11
  /** A network interface to send changeset and */
@@ -140,7 +139,7 @@ export declare class SyncedState extends CollaborationState {
140
139
  */
141
140
  export declare class PendingState extends CollaborationState {
142
141
  private readonly _injector;
143
- private readonly _memberService;
142
+ private readonly _userManagerService;
144
143
  private readonly _logService;
145
144
  private readonly _configService;
146
145
  private readonly _transformService;
@@ -148,7 +147,7 @@ export declare class PendingState extends CollaborationState {
148
147
  readonly status = CollaborationStatus.PENDING;
149
148
  private _scheduleCompleteTimestamp;
150
149
  private _sendingTimer;
151
- constructor(unitID: string, type: UniverInstanceType, pendingMutations: IMutationInfo[], handler: ICollaborationStateHandler, _injector: Injector, _revisionService: RevisionService, _memberService: MemberService, _logService: ILogService, commandService: ICommandService, _configService: IConfigService, _transformService: ITransformService, _univerInstanceService: IUniverInstanceService, _undoRedoService: ICollaborativeUndoRedoService, _localCacheService?: ILocalCacheService);
150
+ constructor(unitID: string, type: UniverInstanceType, pendingMutations: IMutationInfo[], handler: ICollaborationStateHandler, _injector: Injector, _revisionService: RevisionService, _userManagerService: UserManagerService, _logService: ILogService, commandService: ICommandService, _configService: IConfigService, _transformService: ITransformService, _univerInstanceService: IUniverInstanceService, _undoRedoService: ICollaborativeUndoRedoService, _localCacheService?: ILocalCacheService);
152
151
  appendMutation(mutation: IMutationInfo): CollaborationState;
153
152
  onRemoteChangeset(changeset: IChangeset): CollaborationState;
154
153
  onRemoteAck(changeset: IAcknowledgedChangeset): CollaborationState;
@@ -1,7 +1,6 @@
1
1
  import type { IChangeset, RevisionService } from '@univerjs-pro/collaboration';
2
- import type { IMutationInfo, IUniverInstanceService } from '@univerjs/core';
2
+ import type { IMutationInfo, IUniverInstanceService, UserManagerService } from '@univerjs/core';
3
3
  import type { Observable } from 'rxjs';
4
- import type { MemberService } from '../../../services/member/member.service';
5
4
  export interface IAssembledChangeset {
6
5
  changeset: IChangeset;
7
6
  pendingMutations: IMutationInfo[];
@@ -17,7 +16,11 @@ export declare function isSplitChunkMutation(mutation: IMutationInfo): boolean;
17
16
  export declare const SINGLE_CHANGESET_MUTATIONS: Set<string>;
18
17
  export declare const SLIDE_SINGLE_CHANGESET_MUTATIONS: Set<string>;
19
18
  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 function assembleSlideChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
22
- export declare function assembleDocChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
19
+ export declare function assembleMutationChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, userManagerService: UserManagerService): IAssembledChangeset;
20
+ export declare const assembleSheetChangeset: typeof assembleMutationChangeset;
21
+ export declare const assembleBoardChangeset: typeof assembleMutationChangeset;
22
+ export declare const assemblePdfChangeset: typeof assembleMutationChangeset;
23
+ export declare function assembleBaseChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, userManagerService: UserManagerService): IAssembledChangeset;
24
+ export declare function assembleSlideChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, userManagerService: UserManagerService): IAssembledChangeset;
25
+ export declare function assembleDocChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, userManagerService: UserManagerService): IAssembledChangeset;
23
26
  export declare function createTimerObservable$<T>(ms: number, options: T): Observable<T>;
@@ -2,14 +2,13 @@ export { DEFAULT_WS_SESSION_TICKET_URL, HEARTBEAT_INTERVAL_KEY, HEARTBEAT_TIMEOU
2
2
  export { DEFAULT_COLLAB_WEB_SOCKET_URL, DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT, REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY, } from './config/config';
3
3
  export type { IUniverCollaborationClientConfig } from './config/config';
4
4
  export { COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY } from './config/config';
5
- export { BaseCollaborationEntity, BoardCollaborationEntity, CollaborationEntity, DocCollaborationEntity, SheetCollaborationEntity, SlideCollaborationEntity, } from './controllers/collaboration/collaboration-entity';
5
+ export { BaseCollaborationEntity, BoardCollaborationEntity, CollaborationEntity, DocCollaborationEntity, PdfCollaborationEntity, SheetCollaborationEntity, SlideCollaborationEntity, } from './controllers/collaboration/collaboration-entity';
6
6
  export type { IDocCollaborationEntityCallback } from './controllers/collaboration/collaboration-entity';
7
7
  export { AwaitingState, AwaitingWithPendingState, CollaborationStatus, ConflictState, FetchingMissState, OfflineState, PendingState, SyncedState, } from './controllers/collaboration/collaboration-state';
8
8
  export { CollaborationController } from './controllers/collaboration/collaboration.controller';
9
9
  export { UniverCollaborationClientPlugin } from './plugin';
10
10
  export { CollaborationAttachmentIoService, IAttachmentIoService, } from './services/attachment-remote/attachment-io.service';
11
- export { AttachmentSourceType } from './services/attachment-remote/types';
12
- export type { AttachmentValue, IAttachmentUploadOptions, IAttachmentValue, } from './services/attachment-remote/types';
11
+ export type { IAttachmentUploadOptions, } from './services/attachment-remote/types';
13
12
  export { AuthzIoHttpService } from './services/auth-server/authz-io-http.service';
14
13
  export { createUniverCollaborationAdapter, ICollaborationClientAdapterService, } from './services/collaboration-session/collaboration-client-adapter';
15
14
  export type { ICollaborationAdapterResolveContext, ICollaborationAdapterTransformContext, ICollaborationChangesetAdapter, ICollaborationClientAdapter, ICollaborationSessionIdentity, ICollaborationTarget, ICollaborationUnitResolution, ICreateUniverCollaborationAdapterOptions, } from './services/collaboration-session/collaboration-client-adapter';
@@ -1,9 +1,11 @@
1
- import type { IAttachmentUploadOptions, IAttachmentValue } from './types';
2
- import { IConfigService, IUniverInstanceService } from '@univerjs/core';
1
+ import type { IBaseAttachment } from '@univerjs/core';
2
+ import type { IAttachmentUploadOptions } from './types';
3
+ import { IConfigService, ImageSourceType, IUniverInstanceService } from '@univerjs/core';
3
4
  import { HTTPService } from '@univerjs/network';
4
5
  export interface IAttachmentIoService {
5
6
  getUploadOptions(): IAttachmentUploadOptions;
6
- saveAttachment(file: File): Promise<IAttachmentValue>;
7
+ saveAttachment(file: File): Promise<IBaseAttachment>;
8
+ getAttachmentUrl(source: string, sourceType: ImageSourceType): Promise<string>;
7
9
  }
8
10
  export declare const IAttachmentIoService: import("@wendellhu/redi").IdentifierDecorator<IAttachmentIoService>;
9
11
  export declare class CollaborationAttachmentIoService implements IAttachmentIoService {
@@ -12,8 +14,11 @@ export declare class CollaborationAttachmentIoService implements IAttachmentIoSe
12
14
  private readonly _univerInstanceService;
13
15
  constructor(_httpService: HTTPService, _configService: IConfigService, _univerInstanceService: IUniverInstanceService);
14
16
  getUploadOptions(): IAttachmentUploadOptions;
15
- saveAttachment(file: File): Promise<IAttachmentValue>;
17
+ saveAttachment(file: File): Promise<IBaseAttachment>;
18
+ getAttachmentUrl(source: string, sourceType: ImageSourceType): Promise<string>;
16
19
  private _upload;
17
20
  private _getUploadFileURL;
21
+ private _getSignURL;
22
+ private _getDownloadEndpointURL;
18
23
  private _getConfig;
19
24
  }
@@ -1,23 +1,6 @@
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;
1
+ import type { IBaseAttachment } from '@univerjs/core';
19
2
  export interface IAttachmentUploadOptions {
20
3
  accept?: string[];
21
4
  maxSize?: number;
22
- upload?: (file: File) => Promise<IAttachmentValue>;
5
+ upload?: (file: File) => Promise<IBaseAttachment>;
23
6
  }
@@ -1,28 +1,15 @@
1
- import type { Nullable } from '@univerjs/core';
2
1
  import type { IMember } from '@univerjs/protocol';
3
2
  import type { Observable } from 'rxjs';
4
- import { Disposable, IUniverInstanceService, UserManagerService } from '@univerjs/core';
5
- export interface IUser extends IMember {
6
- userID: string;
7
- }
3
+ import { Disposable, IUniverInstanceService } from '@univerjs/core';
8
4
  /**
9
5
  * This services manages members is each rooms.
10
6
  */
11
7
  export declare class MemberService extends Disposable {
12
8
  private readonly _univerInstanceService;
13
- private _userManagerService;
14
9
  private _roomMembers;
15
10
  private readonly _roomCreated$;
16
- constructor(_univerInstanceService: IUniverInstanceService, _userManagerService: UserManagerService);
11
+ constructor(_univerInstanceService: IUniverInstanceService);
17
12
  waitForRoom$(unitId: string): Observable<RoomMember>;
18
- /**
19
- * @deprecated please use userManagerService
20
- */
21
- setCurrentUser(user: IUser): void;
22
- /**
23
- * @deprecated please use userManagerService
24
- */
25
- getCurrentUser(): Nullable<IUser>;
26
13
  /**
27
14
  * Update a member in a room(unit).
28
15
  * @param roomID i.e. unitID.
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x350e(_0x463cfa,_0x4ee3a6){_0x463cfa=_0x463cfa-0x1b7;const _0x3f1247=_0x3f12();let _0x350e5d=_0x3f1247[_0x463cfa];return _0x350e5d;}function _0x3f12(){const _0x22b44d=['\x22\x20after\x20','length','reject','exports','@univerjs-pro/collaboration','loadDoc','IUniverInstanceService','extend','loadServerUnitOfRevision','loadSlideAsync','entityInit$','132908cRcHoY','Inject','UniverCoreFacade','values','Module','from','[FCollaboration]:\x20Unit\x20\x22','decorate','24wOuQKA','subscribe','unsubscribe','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','FEventName','2404335FdYGxW','12856151NofHtV','_univerInstanceService','object','loadSlide','_handler','CollaborationStatusChanged','SYNCED','get','subscribeCollaborators','FEnum','getDocument','getFocusedUnit','state','getCollabEntity','loadDocAsync','loadUnitOfRevision','loadBoardAsync','FCollaboration','6ORikPS','105282mTLler','CollaborationController','loadSheet','getBase','loadBoard','rxjs','getBoard','toDisposable','_injector','flush','Injector','679JegCwH','loadSheetAsync','MemberService','status$','495124mzCBsd','_snapshotService','readyForCollab','UniverProCollaborationClientFacade','disposeWithMe','NOT_COLLAB','104eakSXE','members$','getUnitId','UniverProCollaboration','loadServerUnit','CollaborationStatus','timeout','loadBase','FUniver','getCollaborationStatus','@univerjs/core','2152OyKfmq','add','@univerjs/core/facade','DataLoaderService','SnapshotService','_resolveUnitId','status','createInstance','getPresentation','unitID','5942260HNciIW','defineProperty','Event','toStringTag','_collaborationController','\x22\x20while\x20collaboration\x20status\x20is\x20','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22'];_0x3f12=function(){return _0x22b44d;};return _0x3f12();}(function(_0xfbe1ee,_0xd8f8ae){const _0x4ed459=_0x350e,_0x3f3ca3=_0xfbe1ee();while(!![]){try{const _0x57a7bf=parseInt(_0x4ed459(0x1f2))/0x1*(-parseInt(_0x4ed459(0x207))/0x2)+parseInt(_0x4ed459(0x1ce))/0x3*(-parseInt(_0x4ed459(0x1c6))/0x4)+parseInt(_0x4ed459(0x1d3))/0x5*(-parseInt(_0x4ed459(0x1e6))/0x6)+-parseInt(_0x4ed459(0x1f6))/0x7+-parseInt(_0x4ed459(0x1fc))/0x8*(-parseInt(_0x4ed459(0x1e7))/0x9)+parseInt(_0x4ed459(0x211))/0xa+parseInt(_0x4ed459(0x1d4))/0xb;if(_0x57a7bf===_0xd8f8ae)break;else _0x3f3ca3['push'](_0x3f3ca3['shift']());}catch(_0x3bd16d){_0x3f3ca3['push'](_0x3f3ca3['shift']());}}}(_0x3f12,0x599ae),function(_0x4d56ea,_0x253143){const _0x485e68=_0x350e;typeof exports==_0x485e68(0x1d6)&&typeof module<'u'?_0x253143(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('@univerjs-pro/collaboration'),require('rxjs')):typeof define=='function'&&define['amd']?define([_0x485e68(0x1be),'@univerjs-pro/collaboration-client',_0x485e68(0x209),_0x485e68(0x206),_0x485e68(0x1bf),_0x485e68(0x1ec)],_0x253143):(_0x4d56ea=typeof globalThis<'u'?globalThis:_0x4d56ea||self,_0x253143(_0x4d56ea[_0x485e68(0x1f9)]={},_0x4d56ea['UniverProCollaborationClient'],_0x4d56ea[_0x485e68(0x1c8)],_0x4d56ea['UniverCore'],_0x4d56ea[_0x485e68(0x1ff)],_0x4d56ea[_0x485e68(0x1ec)]));}(this,function(_0x862acb,_0xa0823e,_0x57d6e3,_0x484e38,_0x217e93,_0x3f6322){const _0x5b5894=_0x350e;Object[_0x5b5894(0x212)](_0x862acb,Symbol[_0x5b5894(0x1b7)],{'value':_0x5b5894(0x1ca)});var _0x44f0cf=class extends _0x57d6e3[_0x5b5894(0x1dd)]{get[_0x5b5894(0x201)](){return _0xa0823e['CollaborationStatus'];}};_0x57d6e3[_0x5b5894(0x1dd)][_0x5b5894(0x1c2)](_0x44f0cf);var _0x5834ea=class extends _0x57d6e3[_0x5b5894(0x1d2)]{get[_0x5b5894(0x1d9)](){const _0x2ad635=_0x5b5894;return _0x2ad635(0x1d9);}};_0x57d6e3[_0x5b5894(0x1d2)][_0x5b5894(0x1c2)](_0x5834ea);function _0xd29c33(_0x1b4706,_0x825115){return function(_0x57703a,_0x5142f6){_0x825115(_0x57703a,_0x5142f6,_0x1b4706);};}function _0x54c5f4(_0x2e7c8c,_0x4ef18f,_0x4517e6,_0x18eb5a){const _0x46243a=_0x5b5894;var _0x5dd2de=arguments['length'],_0x3e34d6=_0x5dd2de<0x3?_0x4ef18f:_0x18eb5a===null?_0x18eb5a=Object['getOwnPropertyDescriptor'](_0x4ef18f,_0x4517e6):_0x18eb5a,_0x1ca925;if(typeof Reflect==_0x46243a(0x1d6)&&typeof Reflect[_0x46243a(0x1cd)]=='function')_0x3e34d6=Reflect[_0x46243a(0x1cd)](_0x2e7c8c,_0x4ef18f,_0x4517e6,_0x18eb5a);else{for(var _0x4c38d=_0x2e7c8c[_0x46243a(0x1bc)]-0x1;_0x4c38d>=0x0;_0x4c38d--)(_0x1ca925=_0x2e7c8c[_0x4c38d])&&(_0x3e34d6=(_0x5dd2de<0x3?_0x1ca925(_0x3e34d6):_0x5dd2de>0x3?_0x1ca925(_0x4ef18f,_0x4517e6,_0x3e34d6):_0x1ca925(_0x4ef18f,_0x4517e6))||_0x3e34d6);}return _0x5dd2de>0x3&&_0x3e34d6&&Object[_0x46243a(0x212)](_0x4ef18f,_0x4517e6,_0x3e34d6),_0x3e34d6;}let _0x4e1150=class extends _0x57d6e3['FBase']{constructor(_0x4ff85b,_0x618d08,_0x1f83a4,_0x586792,_0xff5313){const _0x12f2d6=_0x5b5894;super(),this['_handler']=_0x4ff85b,this[_0x12f2d6(0x1ef)]=_0x618d08,this['_univerInstanceService']=_0x1f83a4,this[_0x12f2d6(0x1f7)]=_0x586792,this[_0x12f2d6(0x1b8)]=_0xff5313;}async[_0x5b5894(0x1f3)](_0x21e3c7,_0x3b7240){const _0x1a25fc=_0x5b5894;return await this[_0x1a25fc(0x1f7)][_0x1a25fc(0x1e9)](_0x21e3c7,0x0,_0x3b7240)?(await this['_collaborationController'][_0x1a25fc(0x1f8)](_0x21e3c7),this[_0x1a25fc(0x1d8)]['getWorkbook'](_0x21e3c7)):null;}async[_0x5b5894(0x1e2)](_0x1de9c2,_0x158df2){const _0x2786b9=_0x5b5894;return await this[_0x2786b9(0x1f7)][_0x2786b9(0x1c0)](_0x1de9c2,0x0,_0x158df2)?(await this['_collaborationController'][_0x2786b9(0x1f8)](_0x1de9c2),this[_0x2786b9(0x1d8)][_0x2786b9(0x1de)](_0x1de9c2)):null;}async['loadBaseAsync'](_0x3589bd,_0x1c6488){const _0x42ccb1=_0x5b5894;return await this[_0x42ccb1(0x1f7)][_0x42ccb1(0x203)](_0x3589bd,0x0,_0x1c6488)?(await this[_0x42ccb1(0x1b8)]['readyForCollab'](_0x3589bd),this['_handler']['getBase'](_0x3589bd)):null;}async[_0x5b5894(0x1c4)](_0x37174e,_0x80d0b3){const _0x4925a3=_0x5b5894;return await this[_0x4925a3(0x1f7)][_0x4925a3(0x1d7)](_0x37174e,0x0,_0x80d0b3)?(await this['_collaborationController'][_0x4925a3(0x1f8)](_0x37174e),this['_handler'][_0x4925a3(0x20f)](_0x37174e)):null;}async[_0x5b5894(0x1e4)](_0x533f75,_0xed9528){const _0x3e2c51=_0x5b5894;return await this[_0x3e2c51(0x1f7)][_0x3e2c51(0x1eb)](_0x533f75,0x0,_0xed9528)?(await this[_0x3e2c51(0x1b8)][_0x3e2c51(0x1f8)](_0x533f75),this[_0x3e2c51(0x1d8)]['getBoard'](_0x533f75)):null;}[_0x5b5894(0x1dc)](_0x5ca2b2,_0xb87f3b){const _0x52e155=_0x5b5894;return(0x0,_0x484e38[_0x52e155(0x1ee)])(this[_0x52e155(0x1ef)][_0x52e155(0x1db)](_0xa0823e[_0x52e155(0x1f4)])['waitForRoom$'](_0x5ca2b2)['pipe']((0x0,_0x3f6322['switchMap'])(_0x5ebfc1=>_0x5ebfc1[_0x52e155(0x1fd)]))['subscribe'](_0x21f215=>_0xb87f3b(Array[_0x52e155(0x1cb)](_0x21f215[_0x52e155(0x1c9)]()))));}[_0x5b5894(0x205)](_0x1e541d){const _0x29e0b6=_0x5b5894;var _0x4fc763;let _0x3c16fc=this[_0x29e0b6(0x20c)](_0x1e541d);if(!_0x3c16fc)return _0xa0823e['CollaborationStatus'][_0x29e0b6(0x1fb)];let _0x592bac=this[_0x29e0b6(0x1b8)][_0x29e0b6(0x1e1)](_0x3c16fc);return(_0x4fc763=_0x592bac==null?void 0x0:_0x592bac[_0x29e0b6(0x1e0)][_0x29e0b6(0x20d)])==null?_0xa0823e[_0x29e0b6(0x201)][_0x29e0b6(0x1fb)]:_0x4fc763;}[_0x5b5894(0x1f0)](_0x1a7bfa,_0x4319ae={}){const _0x1ef9fd=_0x5b5894;var _0x1828a3;let _0x16440a=this[_0x1ef9fd(0x20c)](_0x1a7bfa);if(!_0x16440a)return Promise[_0x1ef9fd(0x1bd)](Error('[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.'));let _0x5f1890=this['_collaborationController'][_0x1ef9fd(0x1e1)](_0x16440a);if(!_0x5f1890)return Promise[_0x1ef9fd(0x1bd)](Error(_0x1ef9fd(0x1cc)+_0x16440a+'\x22\x20is\x20not\x20in\x20collaboration\x20mode.'));let _0x1041b8=_0x5f1890['state']['status'];if(_0x1041b8===_0xa0823e['CollaborationStatus'][_0x1ef9fd(0x1da)])return Promise['resolve']();let _0xfdfe78=_0x4eca6e(_0x16440a,_0x1041b8);if(_0xfdfe78)return Promise[_0x1ef9fd(0x1bd)](_0xfdfe78);let _0x2d9dbc=(_0x1828a3=_0x4319ae[_0x1ef9fd(0x202)])==null?0x7530:_0x1828a3;return new Promise((_0x514bd6,_0x5c31e7)=>{const _0x2fc5c1=_0x1ef9fd;let _0x125a7c=!0x1,_0x2c2184=null,_0x56716f=setTimeout(()=>{const _0x7595f7=_0x350e;_0x125a7c=!0x0,_0x2c2184==null||_0x2c2184[_0x7595f7(0x1d0)](),_0x5c31e7(Error(_0x7595f7(0x1d1)+_0x16440a+_0x7595f7(0x1bb)+_0x2d9dbc+'ms.'));},_0x2d9dbc),_0xa96aee=()=>{const _0x478771=_0x350e;_0x125a7c=!0x0,clearTimeout(_0x56716f),_0x2c2184==null||_0x2c2184[_0x478771(0x1d0)]();};_0x2c2184=_0x5f1890[_0x2fc5c1(0x1f5)][_0x2fc5c1(0x1cf)](_0x1a1068=>{const _0x43cfec=_0x2fc5c1;if(_0x125a7c)return;if(_0x1a1068===_0xa0823e['CollaborationStatus'][_0x43cfec(0x1da)]){_0xa96aee(),_0x514bd6();return;}let _0x3e379c=_0x4eca6e(_0x16440a,_0x1a1068);_0x3e379c&&(_0xa96aee(),_0x5c31e7(_0x3e379c));});});}[_0x5b5894(0x20c)](_0x26f6ff){const _0x312864=_0x5b5894;var _0x33e11c;return _0x26f6ff||((_0x33e11c=this[_0x312864(0x1d5)][_0x312864(0x1df)]())==null?void 0x0:_0x33e11c[_0x312864(0x1fe)]());}};_0x4e1150=_0x54c5f4([_0xd29c33(0x1,(0x0,_0x484e38[_0x5b5894(0x1c7)])(_0x484e38[_0x5b5894(0x1f1)])),_0xd29c33(0x2,_0x484e38[_0x5b5894(0x1c1)]),_0xd29c33(0x3,(0x0,_0x484e38['Inject'])(_0x217e93[_0x5b5894(0x20b)])),_0xd29c33(0x4,(0x0,_0x484e38[_0x5b5894(0x1c7)])(_0xa0823e['CollaborationController']))],_0x4e1150);function _0x4eca6e(_0x19bcc6,_0x196844){const _0x5d6dcf=_0x5b5894;return _0x196844===_0xa0823e[_0x5d6dcf(0x201)]['CONFLICT']||_0x196844===_0xa0823e[_0x5d6dcf(0x201)][_0x5d6dcf(0x1fb)]?Error(_0x5d6dcf(0x1ba)+_0x19bcc6+_0x5d6dcf(0x1b9)+_0x196844+'.'):null;}var _0x22e07e=class extends _0x57d6e3['FUniver']{['_initialize'](_0x14dd50){const _0x1c27c5=_0x5b5894;let _0x416cf1=_0x14dd50['get'](_0xa0823e[_0x1c27c5(0x1e8)]);this[_0x1c27c5(0x1fa)](this['registerEventHandler'](this[_0x1c27c5(0x213)][_0x1c27c5(0x1d9)],()=>{const _0x2594fe=_0x1c27c5;let _0x4f44f4=new _0x484e38['DisposableCollection'](),_0xdfa203=_0x416cf1[_0x2594fe(0x1c5)]['subscribe'](_0xc0ebb7=>{const _0x5581eb=_0x2594fe;let _0x32b6ac=_0xc0ebb7[_0x5581eb(0x1f5)][_0x5581eb(0x1cf)](_0x2626d2=>{const _0x4aedd6=_0x5581eb;let _0x26db13={'unitId':_0xc0ebb7[_0x4aedd6(0x210)],'status':_0x2626d2};this['fireEvent'](this[_0x4aedd6(0x213)][_0x4aedd6(0x1d9)],_0x26db13);});_0x4f44f4[_0x5581eb(0x208)]((0x0,_0x484e38['toDisposable'])(_0x32b6ac));});return _0x4f44f4['add']((0x0,_0x484e38[_0x2594fe(0x1ee)])(_0xdfa203)),_0x4f44f4;}));}['getCollaboration'](){const _0x175c76=_0x5b5894;return this[_0x175c76(0x1ef)][_0x175c76(0x20e)](_0x4e1150,{'getWorkbook':_0x2b6212=>this['getWorkbook'](_0x2b6212),'getDocument':_0x42d95a=>this[_0x175c76(0x1de)](_0x42d95a),'getPresentation':_0x1957c0=>this[_0x175c76(0x20f)](_0x1957c0),'getBase':_0x5bbf7b=>this[_0x175c76(0x1ea)](_0x5bbf7b),'getBoard':_0x376bc5=>this[_0x175c76(0x1ed)](_0x376bc5)});}[_0x5b5894(0x200)](_0x482271,_0x300e6e,_0x46bd3b){const _0x42274e=_0x5b5894;return this[_0x42274e(0x1ef)]['get'](_0xa0823e['DataLoaderService'])['loadUnit'](_0x482271,_0x300e6e,_0x46bd3b);}[_0x5b5894(0x1c3)](_0x1e80f8,_0x3acf55,_0x9a2bac){const _0x2050e7=_0x5b5894;return this[_0x2050e7(0x1ef)][_0x2050e7(0x1db)](_0xa0823e[_0x2050e7(0x20a)])[_0x2050e7(0x1e3)](_0x1e80f8,_0x3acf55,_0x9a2bac);}};_0x57d6e3[_0x5b5894(0x204)][_0x5b5894(0x1c2)](_0x22e07e),Object[_0x5b5894(0x212)](_0x862acb,_0x5b5894(0x1e5),{'enumerable':!0x0,'get':function(){return _0x4e1150;}});}));
1
+ (function(_0x4a67c9,_0x4d66c1){const _0x3c8a37=_0x2d74,_0x35dadd=_0x4a67c9();while(!![]){try{const _0x424ff4=-parseInt(_0x3c8a37(0x1fa))/0x1*(-parseInt(_0x3c8a37(0x1ff))/0x2)+parseInt(_0x3c8a37(0x1f5))/0x3*(parseInt(_0x3c8a37(0x1ee))/0x4)+-parseInt(_0x3c8a37(0x209))/0x5+-parseInt(_0x3c8a37(0x213))/0x6*(parseInt(_0x3c8a37(0x1e3))/0x7)+parseInt(_0x3c8a37(0x21e))/0x8+-parseInt(_0x3c8a37(0x223))/0x9+parseInt(_0x3c8a37(0x1fe))/0xa*(parseInt(_0x3c8a37(0x1fb))/0xb);if(_0x424ff4===_0x4d66c1)break;else _0x35dadd['push'](_0x35dadd['shift']());}catch(_0x4a4612){_0x35dadd['push'](_0x35dadd['shift']());}}}(_0x97b2,0x5deeb),function(_0x312aa0,_0x237aa9){const _0x11c5b5=_0x2d74;typeof exports==_0x11c5b5(0x207)&&typeof module<'u'?_0x237aa9(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('@univerjs-pro/collaboration'),require('rxjs')):typeof define==_0x11c5b5(0x216)&&define[_0x11c5b5(0x22c)]?define([_0x11c5b5(0x1de),_0x11c5b5(0x222),_0x11c5b5(0x1e8),_0x11c5b5(0x1dc),_0x11c5b5(0x211),_0x11c5b5(0x1ef)],_0x237aa9):(_0x312aa0=typeof globalThis<'u'?globalThis:_0x312aa0||self,_0x237aa9(_0x312aa0[_0x11c5b5(0x1d9)]={},_0x312aa0['UniverProCollaborationClient'],_0x312aa0['UniverCoreFacade'],_0x312aa0[_0x11c5b5(0x232)],_0x312aa0[_0x11c5b5(0x235)],_0x312aa0[_0x11c5b5(0x1ef)]));}(this,function(_0x12d443,_0x5effa1,_0x50ecdd,_0x5de8f1,_0x23f772,_0x365d9b){const _0x4f8bb1=_0x2d74;Object[_0x4f8bb1(0x1f2)](_0x12d443,Symbol['toStringTag'],{'value':_0x4f8bb1(0x1f3)});var _0x458248=class extends _0x50ecdd['FEnum']{get[_0x4f8bb1(0x1f4)](){const _0x37147d=_0x4f8bb1;return _0x5effa1[_0x37147d(0x1f4)];}};_0x50ecdd[_0x4f8bb1(0x205)]['extend'](_0x458248);var _0x58ff42=class extends _0x50ecdd[_0x4f8bb1(0x219)]{get['CollaborationStatusChanged'](){return'CollaborationStatusChanged';}};_0x50ecdd['FEventName'][_0x4f8bb1(0x20f)](_0x58ff42);function _0x5caef7(_0x2df2b2,_0x48ab52){return function(_0x4a7393,_0x5cbdd0){_0x48ab52(_0x4a7393,_0x5cbdd0,_0x2df2b2);};}function _0x96ee27(_0x17b579,_0x391e31,_0x2a2554,_0x4b6405){const _0x4c3f86=_0x4f8bb1;var _0x43d9ff=arguments['length'],_0x5bd51c=_0x43d9ff<0x3?_0x391e31:_0x4b6405===null?_0x4b6405=Object[_0x4c3f86(0x227)](_0x391e31,_0x2a2554):_0x4b6405,_0x278af7;if(typeof Reflect=='object'&&typeof Reflect[_0x4c3f86(0x225)]==_0x4c3f86(0x216))_0x5bd51c=Reflect['decorate'](_0x17b579,_0x391e31,_0x2a2554,_0x4b6405);else{for(var _0x34f70d=_0x17b579[_0x4c3f86(0x21a)]-0x1;_0x34f70d>=0x0;_0x34f70d--)(_0x278af7=_0x17b579[_0x34f70d])&&(_0x5bd51c=(_0x43d9ff<0x3?_0x278af7(_0x5bd51c):_0x43d9ff>0x3?_0x278af7(_0x391e31,_0x2a2554,_0x5bd51c):_0x278af7(_0x391e31,_0x2a2554))||_0x5bd51c);}return _0x43d9ff>0x3&&_0x5bd51c&&Object['defineProperty'](_0x391e31,_0x2a2554,_0x5bd51c),_0x5bd51c;}let _0x4bee78=class extends _0x50ecdd['FBase']{constructor(_0x551840,_0xe094f5,_0x212818,_0x5ac3b5,_0x5cb128){const _0x3c6810=_0x4f8bb1;super(),this[_0x3c6810(0x20d)]=_0x551840,this[_0x3c6810(0x214)]=_0xe094f5,this[_0x3c6810(0x203)]=_0x212818,this[_0x3c6810(0x236)]=_0x5ac3b5,this['_collaborationController']=_0x5cb128;}async['loadSheetAsync'](_0x16c3ed,_0x92dae9){const _0x5dc703=_0x4f8bb1;return await this[_0x5dc703(0x236)]['loadSheet'](_0x16c3ed,0x0,_0x92dae9)?(await this['_collaborationController'][_0x5dc703(0x23b)](_0x16c3ed),this[_0x5dc703(0x20d)][_0x5dc703(0x221)](_0x16c3ed)):null;}async[_0x4f8bb1(0x1e1)](_0x27bf08,_0x584498){const _0x5caea5=_0x4f8bb1;return await this['_snapshotService'][_0x5caea5(0x200)](_0x27bf08,0x0,_0x584498)?(await this[_0x5caea5(0x1ea)][_0x5caea5(0x23b)](_0x27bf08),this[_0x5caea5(0x20d)][_0x5caea5(0x22f)](_0x27bf08)):null;}async['loadBaseAsync'](_0x1a86b2,_0x23f672){const _0x466d36=_0x4f8bb1;return await this[_0x466d36(0x236)]['loadBase'](_0x1a86b2,0x0,_0x23f672)?(await this['_collaborationController']['readyForCollab'](_0x1a86b2),this['_handler'][_0x466d36(0x20a)](_0x1a86b2)):null;}async[_0x4f8bb1(0x229)](_0x37cc65,_0x202a8c){const _0x2090bb=_0x4f8bb1;return await this[_0x2090bb(0x236)][_0x2090bb(0x22e)](_0x37cc65,0x0,_0x202a8c)?(await this[_0x2090bb(0x1ea)]['readyForCollab'](_0x37cc65),this[_0x2090bb(0x20d)][_0x2090bb(0x1f8)](_0x37cc65)):null;}async[_0x4f8bb1(0x212)](_0x1313a8,_0x292a7c){const _0x610906=_0x4f8bb1;return await this['_snapshotService'][_0x610906(0x239)](_0x1313a8,0x0,_0x292a7c)?(await this[_0x610906(0x1ea)]['readyForCollab'](_0x1313a8),this[_0x610906(0x20d)][_0x610906(0x20b)](_0x1313a8)):null;}[_0x4f8bb1(0x238)](_0xc0e020,_0x211cc5){const _0x12707b=_0x4f8bb1;return(0x0,_0x5de8f1[_0x12707b(0x21d)])(this[_0x12707b(0x214)][_0x12707b(0x1df)](_0x5effa1[_0x12707b(0x23a)])[_0x12707b(0x20c)](_0xc0e020)['pipe']((0x0,_0x365d9b['switchMap'])(_0x543e07=>_0x543e07['members$']))[_0x12707b(0x1f9)](_0x20ad2c=>_0x211cc5(Array[_0x12707b(0x237)](_0x20ad2c[_0x12707b(0x220)]()))));}[_0x4f8bb1(0x1e6)](_0x289722){const _0x368d61=_0x4f8bb1;var _0x1f0c24;let _0x488bd2=this['_resolveUnitId'](_0x289722);if(!_0x488bd2)return _0x5effa1[_0x368d61(0x1f4)][_0x368d61(0x224)];let _0x168cba=this['_collaborationController'][_0x368d61(0x1f0)](_0x488bd2);return(_0x1f0c24=_0x168cba==null?void 0x0:_0x168cba['state'][_0x368d61(0x1ec)])==null?_0x5effa1[_0x368d61(0x1f4)]['NOT_COLLAB']:_0x1f0c24;}[_0x4f8bb1(0x1e2)](_0x5919ef,_0x33d897={}){const _0x37d8ab=_0x4f8bb1;var _0x26bb09;let _0x439fb0=this['_resolveUnitId'](_0x5919ef);if(!_0x439fb0)return Promise['reject'](Error(_0x37d8ab(0x21c)));let _0x33c340=this[_0x37d8ab(0x1ea)][_0x37d8ab(0x1f0)](_0x439fb0);if(!_0x33c340)return Promise[_0x37d8ab(0x226)](Error(_0x37d8ab(0x233)+_0x439fb0+'\x22\x20is\x20not\x20in\x20collaboration\x20mode.'));let _0xd9fbca=_0x33c340[_0x37d8ab(0x217)]['status'];if(_0xd9fbca===_0x5effa1['CollaborationStatus'][_0x37d8ab(0x1dd)])return Promise[_0x37d8ab(0x206)]();let _0x49b692=_0x389084(_0x439fb0,_0xd9fbca);if(_0x49b692)return Promise[_0x37d8ab(0x226)](_0x49b692);let _0x5cd077=(_0x26bb09=_0x33d897[_0x37d8ab(0x218)])==null?0x7530:_0x26bb09;return new Promise((_0x1d9cea,_0x507430)=>{const _0xfd92a2=_0x37d8ab;let _0xcebfe8=!0x1,_0x234692=null,_0x118923=setTimeout(()=>{const _0x31dde9=_0x2d74;_0xcebfe8=!0x0,_0x234692==null||_0x234692['unsubscribe'](),_0x507430(Error(_0x31dde9(0x21f)+_0x439fb0+_0x31dde9(0x22d)+_0x5cd077+'ms.'));},_0x5cd077),_0x2c6a87=()=>{const _0x1075fc=_0x2d74;_0xcebfe8=!0x0,clearTimeout(_0x118923),_0x234692==null||_0x234692[_0x1075fc(0x210)]();};_0x234692=_0x33c340[_0xfd92a2(0x230)][_0xfd92a2(0x1f9)](_0x591a50=>{const _0x46de0d=_0xfd92a2;if(_0xcebfe8)return;if(_0x591a50===_0x5effa1[_0x46de0d(0x1f4)]['SYNCED']){_0x2c6a87(),_0x1d9cea();return;}let _0x25be00=_0x389084(_0x439fb0,_0x591a50);_0x25be00&&(_0x2c6a87(),_0x507430(_0x25be00));});});}[_0x4f8bb1(0x1f1)](_0x34ec2a){const _0x49c4c5=_0x4f8bb1;var _0x301e42;return _0x34ec2a||((_0x301e42=this['_univerInstanceService'][_0x49c4c5(0x1db)]())==null?void 0x0:_0x301e42[_0x49c4c5(0x1eb)]());}};_0x4bee78=_0x96ee27([_0x5caef7(0x1,(0x0,_0x5de8f1[_0x4f8bb1(0x21b)])(_0x5de8f1[_0x4f8bb1(0x1ed)])),_0x5caef7(0x2,_0x5de8f1[_0x4f8bb1(0x215)]),_0x5caef7(0x3,(0x0,_0x5de8f1[_0x4f8bb1(0x21b)])(_0x23f772[_0x4f8bb1(0x234)])),_0x5caef7(0x4,(0x0,_0x5de8f1[_0x4f8bb1(0x21b)])(_0x5effa1[_0x4f8bb1(0x22a)]))],_0x4bee78);function _0x389084(_0x564289,_0x100cac){const _0x5e4af3=_0x4f8bb1;return _0x100cac===_0x5effa1['CollaborationStatus'][_0x5e4af3(0x202)]||_0x100cac===_0x5effa1[_0x5e4af3(0x1f4)]['NOT_COLLAB']?Error(_0x5e4af3(0x1e7)+_0x564289+'\x22\x20while\x20collaboration\x20status\x20is\x20'+_0x100cac+'.'):null;}var _0x5965d2=class extends _0x50ecdd['FUniver']{[_0x4f8bb1(0x1da)](_0x51a006){const _0x10e7cd=_0x4f8bb1;let _0x445bbd=_0x51a006[_0x10e7cd(0x1df)](_0x5effa1[_0x10e7cd(0x22a)]);this[_0x10e7cd(0x1fd)](this[_0x10e7cd(0x22b)](this['Event'][_0x10e7cd(0x208)],()=>{const _0x2f063e=_0x10e7cd;let _0x255ce8=new _0x5de8f1[(_0x2f063e(0x204))](),_0x1dd548=_0x445bbd[_0x2f063e(0x228)][_0x2f063e(0x1f9)](_0x4ddd1d=>{const _0x3db627=_0x2f063e;let _0x415469=_0x4ddd1d['status$'][_0x3db627(0x1f9)](_0x2c24da=>{const _0x2c2671=_0x3db627;let _0x594b98={'unitId':_0x4ddd1d[_0x2c2671(0x1e4)],'status':_0x2c24da};this[_0x2c2671(0x20e)](this[_0x2c2671(0x201)][_0x2c2671(0x208)],_0x594b98);});_0x255ce8['add']((0x0,_0x5de8f1[_0x3db627(0x21d)])(_0x415469));});return _0x255ce8[_0x2f063e(0x1e9)]((0x0,_0x5de8f1[_0x2f063e(0x21d)])(_0x1dd548)),_0x255ce8;}));}[_0x4f8bb1(0x231)](){const _0x188e52=_0x4f8bb1;return this['_injector'][_0x188e52(0x1f7)](_0x4bee78,{'getWorkbook':_0x2cd604=>this[_0x188e52(0x221)](_0x2cd604),'getDocument':_0x21b94a=>this[_0x188e52(0x22f)](_0x21b94a),'getPresentation':_0x928776=>this[_0x188e52(0x1f8)](_0x928776),'getBase':_0x1d33bb=>this[_0x188e52(0x20a)](_0x1d33bb),'getBoard':_0x1dff06=>this[_0x188e52(0x20b)](_0x1dff06)});}[_0x4f8bb1(0x1e0)](_0x5e9617,_0x358978,_0x4f2c36){return this['_injector']['get'](_0x5effa1['DataLoaderService'])['loadUnit'](_0x5e9617,_0x358978,_0x4f2c36);}['loadServerUnitOfRevision'](_0x2c0d95,_0x7be50d,_0x406601){const _0x9a2478=_0x4f8bb1;return this[_0x9a2478(0x214)]['get'](_0x5effa1['DataLoaderService'])[_0x9a2478(0x1fc)](_0x2c0d95,_0x7be50d,_0x406601);}};_0x50ecdd[_0x4f8bb1(0x1e5)][_0x4f8bb1(0x20f)](_0x5965d2),Object[_0x4f8bb1(0x1f2)](_0x12d443,_0x4f8bb1(0x1f6),{'enumerable':!0x0,'get':function(){return _0x4bee78;}});}));function _0x2d74(_0x206c90,_0x36c97d){_0x206c90=_0x206c90-0x1d9;const _0x97b201=_0x97b2();let _0x2d7413=_0x97b201[_0x206c90];return _0x2d7413;}function _0x97b2(){const _0x1ee84e=['flush','22414sXDhko','unitID','FUniver','getCollaborationStatus','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','@univerjs/core/facade','add','_collaborationController','getUnitId','status','Injector','1618048jfjSHP','rxjs','getCollabEntity','_resolveUnitId','defineProperty','Module','CollaborationStatus','3EYmFaz','FCollaboration','createInstance','getPresentation','subscribe','1YoByua','9330277oClFMH','loadUnitOfRevision','disposeWithMe','10NfsEsb','116214bggdsV','loadDoc','Event','CONFLICT','_univerInstanceService','DisposableCollection','FEnum','resolve','object','CollaborationStatusChanged','2049405RxLJHH','getBase','getBoard','waitForRoom$','_handler','fireEvent','extend','unsubscribe','@univerjs-pro/collaboration','loadBoardAsync','906AcxEJN','_injector','IUniverInstanceService','function','state','timeout','FEventName','length','Inject','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','toDisposable','3640744CkcHin','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','values','getWorkbook','@univerjs-pro/collaboration-client','4390101NzlPXG','NOT_COLLAB','decorate','reject','getOwnPropertyDescriptor','entityInit$','loadSlideAsync','CollaborationController','registerEventHandler','amd','\x22\x20after\x20','loadSlide','getDocument','status$','getCollaboration','UniverCore','[FCollaboration]:\x20Unit\x20\x22','SnapshotService','UniverProCollaboration','_snapshotService','from','subscribeCollaborators','loadBoard','MemberService','readyForCollab','UniverProCollaborationClientFacade','_initialize','getFocusedUnit','@univerjs/core','SYNCED','exports','get','loadServerUnit','loadDocAsync'];_0x97b2=function(){return _0x1ee84e;};return _0x97b2();}