@univerjs-pro/collaboration-client 0.25.1 → 1.0.0-alpha.1

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
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x393dbe=_0x4ff9;(function(_0x3e8a11,_0x21a08b){const _0xf542bd=_0x4ff9,_0x4caf1c=_0x3e8a11();while(!![]){try{const _0x3f16e4=-parseInt(_0xf542bd(0x2f2))/0x1+-parseInt(_0xf542bd(0x218))/0x2*(parseInt(_0xf542bd(0x3bc))/0x3)+parseInt(_0xf542bd(0xeb))/0x4*(-parseInt(_0xf542bd(0x2a5))/0x5)+parseInt(_0xf542bd(0x122))/0x6+parseInt(_0xf542bd(0x2ac))/0x7+-parseInt(_0xf542bd(0x1af))/0x8*(parseInt(_0xf542bd(0x2cd))/0x9)+parseInt(_0xf542bd(0x32f))/0xa;if(_0x3f16e4===_0x21a08b)break;else _0x4caf1c['push'](_0x4caf1c['shift']());}catch(_0x132b9f){_0x4caf1c['push'](_0x4caf1c['shift']());}}}(_0x4764,0xd88a1),Object[_0x393dbe(0x255)](exports,Symbol['toStringTag'],{'value':_0x393dbe(0x2bd)}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/sheets'),i=require('rxjs'),a=require('@univerjs/protocol'),o=require('@univerjs/telemetry'),s=require('rxjs/operators'),c=require('@univerjs/network'),l=require('@univerjs-pro/license'),u=require('@univerjs/drawing'),d=require('@noble/ciphers/aes.js'),f=require('@noble/ciphers/utils.js');const p='ws://127.0.0.1:8000/universer-api/comb/connect',m=0x4e20;function ee(_0x2af7e6){return JSON['stringify'](_0x2af7e6)['length'];}function h(_0x3117e2){'@babel/helpers - typeof';const _0x1d9872=_0x393dbe;return h=typeof Symbol==_0x1d9872(0x185)&&typeof Symbol[_0x1d9872(0x201)]==_0x1d9872(0x209)?function(_0x5840d0){return typeof _0x5840d0;}:function(_0x2010c9){return _0x2010c9&&typeof Symbol=='function'&&_0x2010c9['constructor']===Symbol&&_0x2010c9!==Symbol['prototype']?'symbol':typeof _0x2010c9;},h(_0x3117e2);}function _0x4764(){const _0x3cb2ef=['b64DecodeUnicode','CollaborationStatus','saveChangeset','LIVESHARE_REQUEST_HOST','EmptyMutationInfo','retryConnectingInterval','128sORWoY','Optional','RevisionService','members$','ERROR_IMAGE','enableSingleActiveInstanceLock','_createSocket','UniverCollaborationPlugin','DisposableCollection','hostname','size','changesets','touchDependencies','_onUserLeave','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','session.room-permission-denied','_snapshotServerService','string','_transformRemoteChangesetByStateCache','CHANGESET_ACK','catch','now','status','toggleOffline','RECV','unknown','_onConnectionFailed','SnapshotService','SetSelectionsOperation','ISnapshotServerService','BASE64','collabWebSocketUrl','randomBytes','OTHER_CLIENTS_EDITING','&assign=','_startTelemetryCollaborationNewChangeset','onTransformRemoteChangesetByStateCache','_memberService','startTime','error','data','[CollaborationEntity]','loginUrlKey','fromCollab','updateSnapshot','JOIN_ROOM_PERMISSION_DENIED','subscribe','range','subject','NEW_CHANGESETS','from','close','objectID','awaiting','debug','authzUrl','_candidateSocket','getTime','People','_logService','appendMutation','defineProperty','_showConflictNotification','unitId','OfflineState','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','_onRemoteRejected','_roomMembers','replace','JOIN_ROOM_FAILED','_onJoinRoomEvent','params','sessionStatus$','online$','MSG_FOR_ERROR','awaitingChangeset','onCommentUpdate','stringify','requireSession','allowed','ITransformService','then','forEach','readAsDataURL','enableCollaboration','_changesetReqId','_replayCachedMutations','_onLocalMutation','onTransformIME','_transitionLocked','_shouldReportTelemetry','transformSelections','subUnitId','?url=','SheetPermissionInitController','getImageSourceCache','_getSendChangesetTimeout','session.room-full','pauseCollaboration','MentionType','_entities','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','event$','SessionStatus','\x20-\x20','take','avatar','_getRedoStack','liveShareOperation','getUnit','onStateChange','collaborators','waitForRoom$','/universer-api/file/{fileID}/sign-url','post','_awaitingChangeset','onTransformState','getTypeOfUnitAdded$','_collaborationTimeoutTimer','/-/object/-/batch_allowed','_changesetSessionId','IContextService','_revisionService','[CollaborationState]:\x20apply\x20error!','LEAVE','object','_updateLocalCache','pipe','/role','_entityInit$','getSnapshotAPIPath','getUnitType','pluginName','ILocalCacheService','FETCH_MISSING','_doCreateSocket','registerHTTPInterceptor','unitId\x20is\x20not\x20found','isTransformMutationsWithChangesetFailure','slice','SheetCollaborationEntity','5liXdoD','target','CHANGESET_SHOULD_RETRY','ConflictState','OFFLINE','COMPRESS_MUTATION_APPLY','_networkConditionService','4956490CpiiFG','_substituteRedoStack','PERMISSION_DENIED','onSendChangeset','pending','univer-pro.collaboration-client.network-condition.service','interceptor','RETRY_CONNECTING_MAX_COUNT','DEFAULT_FILE_NAME','closeSession','_collaborationUIEventService','CollaborationImageIoService','createCollaborator','[PendingState]:\x20received\x20acknowledgement.','includes','localeService','firstValueFrom','Module','sid','getCurrentRevOfUnit','_sheetTransformSelectionsService','HEARTBEAT_INTERVAL_KEY','toPrimitive','failed\x20to\x20apply\x20missed\x20changesets!','ERROR_EXCEED_SIZE','session','CollaborationUIEventId','_removeRoom','_resendTimer','responseType','loadDoc','_updateState','_disableEditing','2601gXmSvN','mapDocumentTypeToUniverInstanceType','copyFileMeta','_roomCreated$','_transformIMECache','getUnitOnRev','unit-cache-','refreshPermission','SUBMIT_CHANGESET_TIMEOUT','onTransformRemoteChangesetByIMECache','cmd','snapshot','_toggleOnline','updatePermissionObjEvent','UniverInstanceType','connection\x20error','_acknowledgeAwaiting','CompressMutationService','rev','IAuthzIoService','resourceIDs','UNIVER_SHEET','_waitForHeartbeatResponse','cbc','[PendingState]:\x20unhandled\x20univer\x20type:\x20','onload','cfgEnableObjInherit','/collaborator','put','_timeoutTimer','asObservable','conflict','unitInfo$','setConfig','onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.','entityInit$','updateMember','1415184tqDZHd','USERS_ENTER','uploadFileServerUrl','_getCtorByUniverInstanceType','HELLO','[SyncedState]:\x20received\x20rejection.','body','create','UNIVER_DOC','deepClone','readyForCollab','Disposable','AuthzIoHttpService','parse','[CollaborationUndoRedoService]','serializeCombRequest','UniverLicensePlugin','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','SHOULD_CLOSE_CONN','executeCommand','_telemetryService','_status$','_type','collaboration-client.local-cache-service','ErrorCode','_cfgEnableObjInherit','RETRY_CONNECTING_MAX_COUNT_KEY','error$','HTTPRequest','_applyRemoteChangeset','close$','/universer-api/authz','result','objectActions','_replaceFileID','textEncoder','_userManagerService','_undoRedoService','_permissionService','_listenToNetworkCondition','_getDownloadEndpointURL','_transformUndoredo','_onConnectionOpen','_onRemoteChangeset','default','[OfflineState]:\x20received\x20rejection.','_submitChangeset','_clearTimeoutTimer','_change$','_tryEnsureSocket','permissionRejEvent','onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.','sendChangesetTimeout','SnapshotServerOverHTTPService','_sessions','loadUnit','LIVESHARE_NEW_HOST','onTransformSelections','LIVESHARE_TERMINATE','_event$','loadOfflineData','34055630GWMHse','HEARTBEAT_INTERVAL','_sessionStatus$','baseRev','stopTime','/object/','IMentionIOService','\x0aCurrent:\x20','_clearCollaborationTimeoutTimer','HEARTBEAT_TIMEOUT','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','_transformStateCache','call','max','dispose$','CmdRspCode','MergeInterceptorFactory','toString','_getAPIPrefix','CONFLICT','_compressMutationService','COMPRESS_MUTATION_SEND','resend','session.room-cnt-exceeds','capture','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','c2Prime','collabSubmitChangesetUrl','_getCurrentRevision','/universer-api/snapshot','SOCKET_FAILED_RETRY','LocaleService','ITelemetryService','DEFAULT_COLLAB_WEB_SOCKET_URL','ILogService','objectType','type','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','MentionIoHttpService','[SyncedState]:\x20received\x20acknowledgement.','onStarting','LOCAL_CACHE_INTERVAL','_schedule','reject','_isEchoedAwaitingChangeset','transformUndoRedo','_handlerCallback','UnitEmbedded','JOIN','onRemoteChangeset','session.join-failed','every','fromCharCode','duration','takeUntil','getUnitId','fetching\x20missing\x20changesets\x20from\x20','min','liveShareNewHost','src','SyncedState','_retryConnectingTimer','m2Prime','_createInitialStateImpl','/object','_unitID','SOCKET_FAILED','/universer-api/oidc/authpage','name','getMemberID','_config','override','FileId','filter','CLOSE_ROOM','getFocusedUnit','not_collab','newCsEvent','add','UniverCollaborationClientPlugin','LocalUndoRedoService','JOIN_ROOM_FULL','toDisposable','_collaborationSessionService','HEARTBEAT_TIMEOUT_KEY','[UniverCollaborationClientPlugin]','eventID','_onOffline','removeMember','localCacheService','send','getRoom','Tools','_eventService','downloadEndpointUrl','_throwTelemetryCollaborationNewChangeset','getActiveSheet','IDLE','has','collaboration-client.auth.needGotoLoginAlert','set','_imageSourceCache','AWAITING','IUniverInstanceService','/block/','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','ISingleActiveUnitService','_clearScheduledTask','CommandType','CollaborationSocketService','DocCollaborationEntity','csShouldRetryEvent','updateOfflineData','UniverNetworkPlugin','sheets','&source=','update','emitEvent','SNAPSHOT_URL_KEY','_queuedRemoteChangesets','_acknowledgedAwaitingRevision','PENDING','location','dispose','complete','roles','onRemoteRetry','find','_commentUpdate$','MUTATION','Inject','RichTextEditingMutation','SheetTransformSelectionsService','SYNCED','_tryReconnect','action','setWaitCount','_onMessage','_collabSessionService','getCurrentUser','__Key__','27408CXcjzy','floor','headers','packageName','_retryCount','_sendHeartbeat','_acknowledgeAwaitingIfReady','onMissingChangesets','getCollabEntity$','x-univer-host','getMember','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','socket\x20open.','textRanges','getCurrentSelections','_clearRedo','_waitCount','_lockTransition','\x20to\x20','getLocalCacheKey','4448100uQhbTR','DRAWING_IMAGE_ALLOW_IMAGE_LIST','_members$','_emitMembers','DataLoaderService','_clearHeartbeatTimer','POST','setShowComponents','_getLoginPath','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','_scheduleCompleteTimestamp','CollaborationSession','encodeURIComponent','setCfgEnableObjInherit','unsubscribe','csRejEvent','reqId','isPermissionRej','_socketMessageSubscription','disableLocalCache','_executeRemoteChangeset','isTransformChangesetsSuccess','some','list','isInternalEditorID','_getUploadFileURL','NOT_COLLAB','enableAuthServer','_telemetryInfo','createIdentifier','isTransformMutationsWithChangesetSuccess','_getSignURL','[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.','routeKey','registerDependencies','_initRequestHeader','DEFAULT_WS_SESSION_TICKET_URL','telemetry\x20info\x20is\x20not\x20initialized','sequenceExecute','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','_socket$','CollaborationEvent','_handler','_startCollaboration','_onRemoteRetry','UserManagerService','_init','submit\x20changeset\x20error!','encode','ONLINE','_instanceService','patch','UNIVER_COLLABORATION_CLIENT_PLUGIN','listRoles','getAllMembers','7830492kUHiNm','utf8ToBytes','fetch_missing','SheetsSelectionsService','_injector','ThresholdInterceptorFactory','unit','HTTPService','saveSnapshot','socketService','collaboration-client.config','state','values','_maxTotalRetryTimeout','selections','onMutationExecutedForCollab','createSocket','url','transformChangesets','ImageUploadStatusType','enableOfflineEditing','c1Prime','UPDATE_PERMISSION_OBJ','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','getInterceptPoints','_incrementRevisionNumber','_configService','SUBMIT_CHANGESET','loadUnitOfRevision','requestParams','updatePermissionPoint','INetworkConditionService','awaiting_with_pending','_socketService','resolveWithBasePath','putCollaborators','incrementRevOfUnit','UnitStatus','CHANGESET_REJ','_redoStacks','transformMutationsWithChangeset','mutations','_socket','onRemoteAck','open$','IConfigService','socket\x20close','_univerInstanceService','IPermissionService','_HTTPService','_substituteUndoStack','missingChangesets','_initDependencies','ISocketService','equals','code','transformStack\x20failed!','_transformStack','_remoteChangesetQueue','_singleActiveUnitService','_unlockTransition','_createInitialState','commentUpdateEvent','ReplaySubject','_scheduleCollaborationTimeoutTimer','_onUserJoin','_socketReady','unitID','DependentOn','_collaborationPaused','version','delay','revision','_transformAndApplyRemoteChangeset','indexOf','CombCmd','_clearUndo','_unitInfo$','addImageSourceCache','_joinRoom','INGEST','initWorkbookPermissionChange','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','_resendWithTimeout','length','batchAllowed','AwaitingWithPendingState','_clearLocalCache','encrypt','userID','_localeService','_handleRemoteChangesets','Plugin','_clearRetryConnectingTimer','[CollaborationSessionService]','LIVESHARE_FETCH_OPERATIONS','onSyncEditingCollabCursor','deleteCollaborator','FileSource','function','map','_transformSelections','/unit/','_initMergeInterceptor','sessionStatus','getResourcesRequest','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','IUndoRedoService','WorkbookEditablePermission','LIVESHARE_OPERATION','getValue','_resendTimeout','_pendingMutations','CollaborationUIEventService','0.25.1','[CollaborationSession]','getGlobalObject','_state$','/universer-api/comb','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','MemberService','toggleOnline','uniscriptRunEvent','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','_toggleOffline','BehaviorSubject','createInstance','socket$','save\x20fail\x20reason\x20is\x20','merge','Rectangle','sort','/universer-api/uniscript','editing\x20status\x20changed\x20to','Subject','_snapshotService','[OfflineState]:\x20received\x20changeset.','GLOBAL_ROOMS_CNT_EXCEEDS','_onConflict','39304fSRNFG','_checkMissing','getSheetId','isArray','_stopTelemetryCollaborationNewChangeset','getCollabEntity','PERMISSION_REJ','onRemoteRej','status$','synced','_isPermissionRej','[DataLoaderService]','originalMeta','disposeWithMe','_commentService','InsertSheetMutation','_rescheduleHeartbeat','saveSheetBlock','parseProtocolChangeset','@univerjs-pro/collaboration-client','memberID','parseChangesetToProtocol','reconnect','UNISCRIPT_RUN','_fetchMissChangesets','RxDisposable','/allowed','AWAITING_WITH_PENDING','_localCacheService','PSEUDO_FETCH_MISSING_RESULT','_initUnitPermissionChange','href','_undoStacks','_updateStatus','_decreaseWaiting','USERS_LEAVE','onMissedChangesetFetched','ERROR_IMAGE_TYPE','getCfgEnableObjInherit','getDeserializedSheetBlock','_exhaustRemoteChangesetQueue','UPDATE_CURSOR','Error\x20on\x20receiving\x20event','init','_sendingTimer','getWorkbookSelections','reverse','entries','Injector','_members','getOwnPropertyDescriptor','message$','_registerDependencies','_createHandler','CollaborationEntity','snapshotServerUrl','workbook','OTHER_CLIENT_EDITING','roomInfos','actions','ImageSourceType','deserializeToCombResponse','getTypeOfUnitDisposed$','ICommandService','clear','reduce','_state','_onRecvEvent','decorate','_getAPIPrefixPath','confirm','_sender','_getUndoStack','push','__splitChunk__','getConfig','COMMENT_UPDATE','_commandService','NO_OTHER_CLIENTS_EDITING','joinEvent','delete','CollaborativeUndoRedoService','iterator','get','_sendHeartbeatTimer','text-x','fetchThroughInterceptors','Quantity','_onCombEvent','AwaitingState','symbol','next','JOINING','_httpService','_transformService','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','getSheetBlock','HEARTBEAT','state$'];_0x4764=function(){return _0x3cb2ef;};return _0x4764();}function te(_0x3c5637,_0x136ecd){const _0x5f54c3=_0x393dbe;if(h(_0x3c5637)!=_0x5f54c3(0x295)||!_0x3c5637)return _0x3c5637;var _0x2e5ad2=_0x3c5637[Symbol[_0x5f54c3(0x2c2)]];if(_0x2e5ad2!==void 0x0){var _0x1dda82=_0x2e5ad2[_0x5f54c3(0x33b)](_0x3c5637,_0x136ecd||_0x5f54c3(0x31e));if(h(_0x1dda82)!=_0x5f54c3(0x295))return _0x1dda82;throw TypeError(_0x5f54c3(0x18d));}return(_0x136ecd===_0x5f54c3(0x229)?String:Number)(_0x3c5637);}function ne(_0xc846d0){const _0x553754=_0x393dbe;var _0x24cbbf=te(_0xc846d0,_0x553754(0x229));return h(_0x24cbbf)==_0x553754(0x209)?_0x24cbbf:_0x24cbbf+'';}function g(_0x23e465,_0x5a30d3,_0x2fdbef){const _0x3c0976=_0x393dbe;return(_0x5a30d3=ne(_0x5a30d3))in _0x23e465?Object[_0x3c0976(0x255)](_0x23e465,_0x5a30d3,{'value':_0x2fdbef,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x23e465[_0x5a30d3]=_0x2fdbef,_0x23e465;}let re=function(_0x35cc14){const _0x120c68=_0x393dbe;return _0x35cc14[_0x120c68(0x1e8)]=_0x120c68(0x1e8),_0x35cc14['PERMISSION_DENIED']=_0x120c68(0x2ae),_0x35cc14[_0x120c68(0x342)]='CONFLICT',_0x35cc14['CLOSE_ROOM']=_0x120c68(0x379),_0x35cc14[_0x120c68(0x25d)]=_0x120c68(0x25d),_0x35cc14[_0x120c68(0x34d)]='SOCKET_FAILED_RETRY',_0x35cc14[_0x120c68(0x371)]=_0x120c68(0x371),_0x35cc14['SUBMIT_CHANGESET_TIMEOUT']=_0x120c68(0x2d5),_0x35cc14;}({});var _=class{constructor(){const _0x9d115e=_0x393dbe;g(this,_0x9d115e(0x32d),new i[(_0x9d115e(0x1aa))]()),g(this,_0x9d115e(0x27e),this[_0x9d115e(0x32d)]['asObservable']());}['emitEvent'](_0x6ef3b6){const _0x2ccf73=_0x393dbe;this[_0x2ccf73(0x32d)][_0x2ccf73(0x20a)](_0x6ef3b6);}},ie=class{constructor(){const _0x475a92=_0x393dbe;g(this,_0x475a92(0x3af),new i[(_0x475a92(0x1aa))]()),g(this,'commentUpdate$',this['_commentUpdate$'][_0x475a92(0x2eb)]());}['onCommentUpdate'](_0x2c4078){this['_commentUpdate$']['next'](_0x2c4078);}};function v(_0x203f3c,_0x4e0f26){return function(_0x3a3aec,_0x48ba20){_0x4e0f26(_0x3a3aec,_0x48ba20,_0x203f3c);};}function y(_0x5d047f,_0x1a94e9,_0x155548,_0x3fcb8d){const _0x2b01d7=_0x393dbe;var _0x273fe3=arguments[_0x2b01d7(0x176)],_0x2de8dd=_0x273fe3<0x3?_0x1a94e9:_0x3fcb8d===null?_0x3fcb8d=Object[_0x2b01d7(0x1e1)](_0x1a94e9,_0x155548):_0x3fcb8d,_0x185ba7;if(typeof Reflect==_0x2b01d7(0x295)&&typeof Reflect[_0x2b01d7(0x1f3)]==_0x2b01d7(0x185))_0x2de8dd=Reflect[_0x2b01d7(0x1f3)](_0x5d047f,_0x1a94e9,_0x155548,_0x3fcb8d);else{for(var _0x2a8c49=_0x5d047f[_0x2b01d7(0x176)]-0x1;_0x2a8c49>=0x0;_0x2a8c49--)(_0x185ba7=_0x5d047f[_0x2a8c49])&&(_0x2de8dd=(_0x273fe3<0x3?_0x185ba7(_0x2de8dd):_0x273fe3>0x3?_0x185ba7(_0x1a94e9,_0x155548,_0x2de8dd):_0x185ba7(_0x1a94e9,_0x155548))||_0x2de8dd);}return _0x273fe3>0x3&&_0x2de8dd&&Object[_0x2b01d7(0x255)](_0x1a94e9,_0x155548,_0x2de8dd),_0x2de8dd;}let b=class extends t[_0x393dbe(0x2fd)]{constructor(_0x12dfb5,_0x232767){const _0x58ee86=_0x393dbe;super(),this[_0x58ee86(0x151)]=_0x12dfb5,this[_0x58ee86(0x316)]=_0x232767,g(this,_0x58ee86(0x25b),new Map()),g(this,'_roomCreated$',new i['Subject']()),this[_0x58ee86(0x1bc)]((0x0,i[_0x58ee86(0x1a5)])(this[_0x58ee86(0x151)][_0x58ee86(0x1ed)](t['UniverInstanceType']['UNIVER_SHEET'])[_0x58ee86(0x297)]((0x0,s[_0x58ee86(0x186)])(_0x3a8afd=>_0x3a8afd[_0x58ee86(0x366)]())),this[_0x58ee86(0x151)][_0x58ee86(0x1ed)](t[_0x58ee86(0x2db)][_0x58ee86(0x2fa)])[_0x58ee86(0x297)]((0x0,s[_0x58ee86(0x186)])(_0x1c2843=>_0x1c2843[_0x58ee86(0x366)]())))[_0x58ee86(0x246)](_0x5db193=>this[_0x58ee86(0x2c7)](_0x5db193)));}[_0x393dbe(0x288)](_0x2b71f0){const _0x148e6f=_0x393dbe;return this[_0x148e6f(0x25b)]['has'](_0x2b71f0)?(0x0,i['of'])(this[_0x148e6f(0x25b)][_0x148e6f(0x202)](_0x2b71f0)):this[_0x148e6f(0x2d0)][_0x148e6f(0x297)]((0x0,s[_0x148e6f(0x186)])(_0x2bc314=>{if(_0x2bc314===_0x2b71f0)return this['_roomMembers']['get'](_0x2bc314);}));}['setCurrentUser'](_0x476cce){const _0x106b90=_0x393dbe;this[_0x106b90(0x316)]['setCurrentUser'](_0x476cce);}[_0x393dbe(0x3ba)](){return this['_userManagerService']['getCurrentUser']();}[_0x393dbe(0x2f1)](_0x1b170d,_0x41a9ce){const _0x1eec70=_0x393dbe;let _0x42cb8d=this['_roomMembers'][_0x1eec70(0x202)](_0x1b170d);_0x42cb8d||(_0x42cb8d=new ae(),this[_0x1eec70(0x25b)][_0x1eec70(0x393)](_0x1b170d,_0x42cb8d),this[_0x1eec70(0x2d0)]['next'](_0x1b170d)),_0x42cb8d['updateMember'](_0x41a9ce);}[_0x393dbe(0x387)](_0x54a998,_0x3da47b){const _0x59c12e=_0x393dbe;let _0x1a90d0=this['_roomMembers'][_0x59c12e(0x202)](_0x54a998);_0x1a90d0&&_0x1a90d0[_0x59c12e(0x387)](_0x3da47b);}[_0x393dbe(0x38a)](_0xa1dacb){const _0x425dcc=_0x393dbe;return this[_0x425dcc(0x25b)][_0x425dcc(0x202)](_0xa1dacb);}[_0x393dbe(0xe1)](_0x286636,_0x30919a){const _0x1b46f8=_0x393dbe;let _0x2cdeca=this[_0x1b46f8(0x25b)][_0x1b46f8(0x202)](_0x286636);if(_0x2cdeca)return _0x2cdeca[_0x1b46f8(0xe1)](_0x30919a);}[_0x393dbe(0x2c7)](_0x598684){const _0x2c42bb=_0x393dbe;let _0x36bf23=this['_roomMembers'][_0x2c42bb(0x202)](_0x598684);_0x36bf23&&(_0x36bf23[_0x2c42bb(0x3aa)](),this[_0x2c42bb(0x25b)]['delete'](_0x598684));}['dispose'](){const _0x35f51e=_0x393dbe;this[_0x35f51e(0x25b)][_0x35f51e(0x26a)](_0x543aae=>_0x543aae['dispose']()),this[_0x35f51e(0x25b)][_0x35f51e(0x1ef)](),this[_0x35f51e(0x2d0)][_0x35f51e(0x3ab)]();}};b=y([v(0x0,t[_0x393dbe(0x396)]),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x118)]))],b);var ae=class extends t[_0x393dbe(0x2fd)]{constructor(..._0x2e1a86){const _0x3e8289=_0x393dbe;super(..._0x2e1a86),g(this,_0x3e8289(0x1e0),new Map()),g(this,_0x3e8289(0xed),new i['BehaviorSubject'](this[_0x3e8289(0x1e0)])),g(this,_0x3e8289(0x21b),this[_0x3e8289(0xed)][_0x3e8289(0x2eb)]());}[_0x393dbe(0x3aa)](){const _0x258d22=_0x393dbe;this[_0x258d22(0x1e0)]['clear'](),this[_0x258d22(0xed)][_0x258d22(0x3ab)]();}[_0x393dbe(0x2f1)](_0xda8600){const _0xbcbe4d=_0x393dbe;this[_0xbcbe4d(0x1e0)][_0xbcbe4d(0x393)](_0xda8600[_0xbcbe4d(0x1c3)],_0xda8600),this[_0xbcbe4d(0xee)]();}[_0x393dbe(0x387)](_0x4d0cb5){const _0x381364=_0x393dbe;this[_0x381364(0x1e0)][_0x381364(0x1ff)](_0x4d0cb5),this[_0x381364(0xee)]();}['getMember'](_0x249e22){const _0x54f2f5=_0x393dbe;return this[_0x54f2f5(0x1e0)][_0x54f2f5(0x202)](_0x249e22);}[_0x393dbe(0x121)](){const _0x22eea1=_0x393dbe;return Array[_0x22eea1(0x24a)](this[_0x22eea1(0x1e0)][_0x22eea1(0x12e)]());}[_0x393dbe(0xee)](){const _0x21a103=_0x393dbe;this['_members$']['next'](this[_0x21a103(0x1e0)]);}};let oe=function(_0x2db60f){const _0xbd1d16=_0x393dbe;return _0x2db60f[_0x2db60f[_0xbd1d16(0x390)]=0x0]=_0xbd1d16(0x390),_0x2db60f[_0x2db60f[_0xbd1d16(0x20b)]=0x1]=_0xbd1d16(0x20b),_0x2db60f[_0x2db60f['OFFLINE']=0x2]=_0xbd1d16(0x2a9),_0x2db60f[_0x2db60f['ONLINE']=0x3]=_0xbd1d16(0x11c),_0x2db60f;}({});const se={[a[_0x393dbe(0x33e)]['FAIL']]:_0x393dbe(0x361),[a[_0x393dbe(0x33e)][_0x393dbe(0x380)]]:_0x393dbe(0x279),[a[_0x393dbe(0x33e)]['JOIN_ROOM_NOT_EXISTS']]:'session.room-not-exists',[a[_0x393dbe(0x33e)][_0x393dbe(0x245)]]:_0x393dbe(0x227),[a[_0x393dbe(0x33e)][_0x393dbe(0x1ad)]]:_0x393dbe(0x346)};let x=class extends t[_0x393dbe(0x1c8)]{get[_0x393dbe(0x18a)](){const _0x2ca1ee=_0x393dbe;return this[_0x2ca1ee(0x331)][_0x2ca1ee(0x192)]();}constructor(_0xfbd76,_0xb3da02,_0x4f82de,_0x56b56b,_0xf2c75f,_0x1418e6,_0x239484,_0x2510a1){const _0x19711d=_0x393dbe;super(),this[_0x19711d(0x370)]=_0xfbd76,this['_logService']=_0x4f82de,this[_0x19711d(0x13c)]=_0x56b56b,this['_memberService']=_0xf2c75f,this[_0x19711d(0x1bd)]=_0x1418e6,this[_0x19711d(0x2b6)]=_0x239484,this[_0x19711d(0x306)]=_0x2510a1,g(this,_0x19711d(0x331),new i[(_0x19711d(0x1a1))](0x0)),g(this,_0x19711d(0x260),this['_sessionStatus$'][_0x19711d(0x2eb)]()),g(this,_0x19711d(0x32d),new i['Subject']()),g(this,_0x19711d(0x27e),this[_0x19711d(0x32d)][_0x19711d(0x2eb)]()),g(this,_0x19711d(0x14c),void 0x0),g(this,_0x19711d(0xfd),void 0x0),g(this,_0x19711d(0x28e),void 0x0),g(this,'_shouldReportTelemetry',!0x1),g(this,_0x19711d(0x107),null),this[_0x19711d(0x272)]=!!this[_0x19711d(0x306)],_0xb3da02[_0x19711d(0x297)]((0x0,i[_0x19711d(0x365)])(this[_0x19711d(0x33d)]))[_0x19711d(0x246)](_0x555c49=>{const _0x32cdc0=_0x19711d;if(_0x555c49!==void 0x0){if(this[_0x32cdc0(0x14c)]=_0x555c49,_0x555c49)this[_0x32cdc0(0x171)](_0x555c49),this[_0x32cdc0(0xfd)]=_0x555c49['message$'][_0x32cdc0(0x246)](_0x1f6243=>{const _0xefd9c0=_0x32cdc0;_0x1f6243[_0xefd9c0(0x10c)]===this[_0xefd9c0(0x370)]&&this[_0xefd9c0(0x207)](_0x1f6243);});else{var _0x28ad77;this[_0x32cdc0(0x38e)](),this[_0x32cdc0(0x331)][_0x32cdc0(0x20a)](0x2),(_0x28ad77=this['_socketMessageSubscription'])==null||_0x28ad77[_0x32cdc0(0xf9)](),this['_socketMessageSubscription']=null;}}});}[_0x393dbe(0x374)](){const _0x1cace7=_0x393dbe;var _0x51ac70,_0x580265;return(_0x51ac70=(_0x580265=this[_0x1cace7(0x14c)])==null?void 0x0:_0x580265[_0x1cace7(0x1c3)])==null?null:_0x51ac70;}[_0x393dbe(0x3aa)](){const _0x5495e1=_0x393dbe;super[_0x5495e1(0x3aa)](),this[_0x5495e1(0x24b)](),this[_0x5495e1(0x33d)][_0x5495e1(0x20a)](),this[_0x5495e1(0x33d)][_0x5495e1(0x3ab)]();}[_0x393dbe(0x24b)](){const _0x2b9070=_0x393dbe;var _0x590bc7,_0x30f017;this['_throwTelemetryCollaborationNewChangeset'](),(_0x590bc7=this[_0x2b9070(0x14c)])==null||_0x590bc7[_0x2b9070(0x389)]({'cmd':a[_0x2b9070(0x16d)][_0x2b9070(0x294)],'data':{'roomID':this[_0x2b9070(0x370)]}}),(_0x30f017=this[_0x2b9070(0x14c)])==null||_0x30f017[_0x2b9070(0x24b)](),this[_0x2b9070(0x32d)][_0x2b9070(0x3ab)](),this[_0x2b9070(0x331)][_0x2b9070(0x3ab)]();}[_0x393dbe(0x207)](_0x4d0ba9){const _0x553c11=_0x393dbe;_0x4d0ba9[_0x553c11(0x2d7)]===a['CombCmd'][_0x553c11(0x35f)]?this[_0x553c11(0x25e)](_0x4d0ba9):_0x4d0ba9[_0x553c11(0x2d7)]===a['CombCmd'][_0x553c11(0x230)]&&this[_0x553c11(0x1f2)](_0x4d0ba9);}[_0x393dbe(0x171)](_0x37d49b){const _0xcf5601=_0x393dbe;this[_0xcf5601(0x331)][_0xcf5601(0x20a)](0x1),_0x37d49b[_0xcf5601(0x389)]({'cmd':a[_0xcf5601(0x16d)][_0xcf5601(0x35f)],'routeKey':this[_0xcf5601(0x370)],'routeType':'','data':{'rooms':[{'roomID':this[_0xcf5601(0x370)]}]}});}[_0x393dbe(0x25e)](_0x1946b4){const _0x1fbf92=_0x393dbe;var _0x165d59;if(_0x1946b4['code']in se){this[_0x1fbf92(0x2b6)][_0x1fbf92(0x3a4)]({'id':_0x1fbf92(0x25d),'data':se[_0x1946b4[_0x1fbf92(0x159)]]}),this['_sessionStatus$']['next'](0x2);return;}this[_0x1fbf92(0x331)][_0x1fbf92(0x20a)](0x3);let _0x5e7770=(_0x165d59=_0x1946b4[_0x1fbf92(0x240)][_0x1fbf92(0x1e9)][this['_unitID']])==null?void 0x0:_0x165d59['members'];_0x5e7770&&_0x5e7770[_0x1fbf92(0x26a)](_0x371b8c=>this[_0x1fbf92(0x23d)][_0x1fbf92(0x2f1)](this[_0x1fbf92(0x370)],_0x371b8c));}[_0x393dbe(0x1f2)](_0x1984a7){const _0x57fbee=_0x393dbe;try{let _0xc2ed8b=_0x1984a7[_0x57fbee(0x240)];switch(_0xc2ed8b[_0x57fbee(0x385)]){case e[_0x57fbee(0x114)][_0x57fbee(0x2f3)]:this[_0x57fbee(0x163)](_0xc2ed8b),this[_0x57fbee(0x32d)][_0x57fbee(0x20a)](_0xc2ed8b);break;case e['CollaborationEvent']['USERS_LEAVE']:this[_0x57fbee(0x225)](_0xc2ed8b),this[_0x57fbee(0x32d)][_0x57fbee(0x20a)](_0xc2ed8b);break;case e[_0x57fbee(0x114)]['CHANGESET_ACK']:case e[_0x57fbee(0x114)][_0x57fbee(0x2a7)]:this[_0x57fbee(0x1b3)](),this[_0x57fbee(0x337)](),this[_0x57fbee(0x32d)]['next'](_0xc2ed8b);break;case e[_0x57fbee(0x114)]['MSG_FOR_ERROR']:this[_0x57fbee(0x253)][_0x57fbee(0x23f)](_0x57fbee(0x1a4)+JSON['stringify'](_0xc2ed8b)),this['_event$'][_0x57fbee(0x20a)](_0xc2ed8b);break;case e[_0x57fbee(0x114)][_0x57fbee(0x1fb)]:this['_commentService'][_0x57fbee(0x264)](_0xc2ed8b[_0x57fbee(0x240)]),this['_event$'][_0x57fbee(0x20a)](_0xc2ed8b);break;default:this[_0x57fbee(0x32d)][_0x57fbee(0x20a)](_0xc2ed8b);}}catch(_0x11453b){this[_0x57fbee(0x253)]['error'](_0x11453b,_0x1984a7);}}[_0x393dbe(0x163)](_0x57b63b){const _0x5590d1=_0x393dbe;this['_memberService'][_0x5590d1(0x2f1)](this['_unitID'],_0x57b63b[_0x5590d1(0x240)]);}[_0x393dbe(0x225)](_0x433c14){const _0x2bb3e7=_0x393dbe;this[_0x2bb3e7(0x23d)][_0x2bb3e7(0x387)](this[_0x2bb3e7(0x370)],_0x433c14[_0x2bb3e7(0x240)][_0x2bb3e7(0x1c3)]);}async['send'](_0x14bdaf,_0x2ac845){const _0x568a88=_0x393dbe;if(this['sessionStatus']!==0x3||!this[_0x568a88(0x14c)])throw Error('[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!');try{_0x14bdaf[_0x568a88(0x385)]===e[_0x568a88(0x114)][_0x568a88(0x13d)]&&(this['_scheduleCollaborationTimeoutTimer'](),this[_0x568a88(0x23b)](_0x14bdaf)),this[_0x568a88(0x14c)][_0x568a88(0x389)]({'cmd':a['CombCmd'][_0x568a88(0x172)],'routeKey':_0x2ac845,'routeType':'','data':_0x14bdaf});}catch(_0x24a72f){this[_0x568a88(0x253)]['error'](_0x24a72f);}}[_0x393dbe(0x162)](){const _0x4966fa=_0x393dbe;var _0x2bf70b;this[_0x4966fa(0x28e)]=setTimeout(()=>{const _0x1fe1ca=_0x4966fa;this['_collaborationTimeoutTimer']=null,this[_0x1fe1ca(0x2b6)][_0x1fe1ca(0x3a4)]({'id':_0x1fe1ca(0x2d5)});},(_0x2bf70b=this[_0x4966fa(0x13c)][_0x4966fa(0x1fa)](_0x4966fa(0x338)))==null?m:_0x2bf70b);}[_0x393dbe(0x337)](){const _0x3c8515=_0x393dbe;this[_0x3c8515(0x28e)]&&(clearTimeout(this[_0x3c8515(0x28e)]),this[_0x3c8515(0x28e)]=null);}[_0x393dbe(0x23b)](_0xddb9dc){const _0x2d49b7=_0x393dbe;if(!this[_0x2d49b7(0x272)])return;let {data:_0x35313c}=_0xddb9dc,{unitID:_0x4209c3,changeset:_0x3b754c}=_0x35313c,{mutations:_0x402a20,type:_0x26368c}=_0x3b754c;this[_0x2d49b7(0x107)]={'unitId':_0x4209c3,'type':_0x26368c,'startTime':performance['now'](),'stopTime':0x0,'duration':0x0,'size':ee(_0x402a20)};}[_0x393dbe(0x1b3)](){const _0x462af2=_0x393dbe;if(this[_0x462af2(0x272)]){if(!this['_telemetryInfo']){this[_0x462af2(0x253)]['error'](_0x462af2(0x197),_0x462af2(0x110));return;}this[_0x462af2(0x107)][_0x462af2(0x333)]=performance[_0x462af2(0x22d)](),this['_telemetryInfo'][_0x462af2(0x364)]=this[_0x462af2(0x107)][_0x462af2(0x333)]-this[_0x462af2(0x107)][_0x462af2(0x23e)],this[_0x462af2(0x306)][_0x462af2(0x347)]('collaboration_new_changeset',this[_0x462af2(0x107)]),this[_0x462af2(0x107)]=null;}}['_throwTelemetryCollaborationNewChangeset'](){const _0x5c9c59=_0x393dbe;this[_0x5c9c59(0x107)]=null;}};x=y([v(0x2,t[_0x393dbe(0x351)]),v(0x3,t[_0x393dbe(0x14f)]),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(b)),v(0x5,(0x0,t[_0x393dbe(0x3b1)])(ie)),v(0x6,(0x0,t[_0x393dbe(0x3b1)])(_)),v(0x7,(0x0,t['Optional'])(o[_0x393dbe(0x34f)]))],x);const S=(0x0,t[_0x393dbe(0x108)])(_0x393dbe(0x309));function ce(_0x68b054){const _0x53c91e=_0x393dbe;return _0x53c91e(0x2d3)+_0x68b054;}function le(_0x275fdf){const _0x456e12=_0x393dbe;let {unitID:_0x4209cf,mutations:_0x11726a}=_0x275fdf;return{'unitId':_0x4209cf,'subUnitId':_0x11726a[_0x456e12(0x176)]>0x0?_0x11726a[0x0][_0x456e12(0x25f)][_0x456e12(0x274)]:null};}let C=class{constructor(_0x4ead04,_0x39dceb,_0x4f7f00){const _0x34906d=_0x393dbe;this['_injector']=_0x4ead04,this[_0x34906d(0x20d)]=_0x39dceb,this[_0x34906d(0x11d)]=_0x4f7f00;}[_0x393dbe(0x273)](_0x245176){const _0x2a99f6=_0x393dbe;var _0x21cc4a,_0x23aff3;let _0x509e13=this['_injector']['get'](r[_0x2a99f6(0x125)]),{unitId:_0x582146,subUnitId:_0x20f8ce}=le(_0x245176),_0x1448d9=_0x509e13==null?void 0x0:_0x509e13[_0x2a99f6(0x1dc)](_0x582146)[_0x2a99f6(0xe5)](),_0x16e00e=(_0x21cc4a=this[_0x2a99f6(0x11d)][_0x2a99f6(0x285)](_0x582146))==null||(_0x21cc4a=_0x21cc4a[_0x2a99f6(0x38f)]())==null?void 0x0:_0x21cc4a[_0x2a99f6(0x1b1)]();if(_0x1448d9['length']===0x0||!_0x582146||!_0x20f8ce)return;let _0x1533fa=[{'id':r['SetSelectionsOperation']['id'],'params':{'unitId':_0x582146,'subUnitId':_0x16e00e,'selections':t[_0x2a99f6(0x38b)][_0x2a99f6(0x2fb)](_0x1448d9)}}],_0x238743=this[_0x2a99f6(0x20d)][_0x2a99f6(0x14a)](_0x245176,_0x1533fa);if(!(0x0,e[_0x2a99f6(0x109)])(_0x238743))throw _0x238743[_0x2a99f6(0x23f)];let _0x2c9898=(_0x23aff3=_0x238743[_0x2a99f6(0x36d)][0x0])==null||(_0x23aff3=_0x23aff3[_0x2a99f6(0x25f)])==null?void 0x0:_0x23aff3[_0x2a99f6(0x130)];if(Array[_0x2a99f6(0x1b2)](_0x2c9898)&&_0x2c9898[_0x2a99f6(0x176)]){if(_0x2c9898[_0x2a99f6(0x176)]===_0x1533fa[0x0][_0x2a99f6(0x25f)][_0x2a99f6(0x130)][_0x2a99f6(0x176)]&&_0x2c9898[_0x2a99f6(0x362)]((_0x22db63,_0x29bce3)=>t[_0x2a99f6(0x1a6)][_0x2a99f6(0x158)](_0x22db63[_0x2a99f6(0x247)],_0x1533fa[0x0]['params'][_0x2a99f6(0x130)][_0x29bce3]['range'])))return;this[_0x2a99f6(0x126)][_0x2a99f6(0x202)](t['ICommandService'])['executeCommand'](r[_0x2a99f6(0x234)]['id'],{'unitId':_0x582146,'subUnitId':_0x16e00e,'selections':_0x2c9898});}}};C=y([v(0x0,(0x0,t['Inject'])(t[_0x393dbe(0x1df)])),v(0x1,e[_0x393dbe(0x268)]),v(0x2,t[_0x393dbe(0x396)])],C);const w=(0x0,t['createIdentifier'])('univer-pro.collaboration-client.single-active-unit-service');let ue=function(_0x242a58){const _0x6fe927=_0x393dbe;return _0x242a58[_0x242a58[_0x6fe927(0x1fd)]=0x0]='NO_OTHER_CLIENTS_EDITING',_0x242a58[_0x242a58[_0x6fe927(0x239)]=0x1]=_0x6fe927(0x239),_0x242a58;}({});const T=_0x393dbe(0x12c),de={};function fe(_0x573890){const _0x12cfab=_0x393dbe;var _0x56e9fb;return!!((_0x56e9fb=_0x573890[_0x12cfab(0x25f)])!=null&&_0x56e9fb[_0x12cfab(0x1f9)]);}const pe=new Set([r[_0x393dbe(0x1be)]['id']]);function me(_0x9329a5,_0x3d5f22,_0x1c67af,_0x4bc54a,_0x48306c){const _0x20f936=_0x393dbe;var _0x203f4e,_0x591ff3,_0x182ac9,_0x3ba4c6;let _0xb613e4=[];for(let _0xae8823 of _0x9329a5){if(pe[_0x20f936(0x391)](_0xae8823['id'])){if(_0xb613e4['length']>0x0)break;_0xb613e4[_0x20f936(0x1f8)](_0xae8823);break;}if(fe(_0xae8823)){if(_0xb613e4['length']>0x0)break;_0xb613e4[_0x20f936(0x1f8)](_0xae8823);break;}_0xb613e4[_0x20f936(0x1f8)](_0xae8823);}let _0x24616b=(_0x203f4e=(_0x591ff3=_0x48306c[_0x20f936(0x3ba)]())==null?void 0x0:_0x591ff3['userID'])==null?_0x20f936(0x231):_0x203f4e,_0x14c94b=(_0x182ac9=(_0x3ba4c6=_0x48306c[_0x20f936(0x3ba)]())==null?void 0x0:_0x3ba4c6[_0x20f936(0x1c3)])==null?'unknown':_0x182ac9;return{'changeset':{'unitID':_0x3d5f22,'type':(0x0,e[_0x20f936(0x2ce)])(_0x1c67af[_0x20f936(0x29b)](_0x3d5f22)),'baseRev':_0x4bc54a[_0x20f936(0x2bf)](_0x3d5f22),'revision':0x0,'userID':_0x24616b,'memberID':_0x14c94b,'mutations':_0xb613e4},'pendingMutations':_0x9329a5['slice'](_0xb613e4[_0x20f936(0x176)])};}function he(_0x846103,_0x40f03b,_0x503f34,_0x2535a2,_0x21de87){const _0x432cc0=_0x393dbe;var _0x528907,_0x359f52,_0x417e7a,_0x20d86a;let _0x24ffad=_0x846103[_0x432cc0(0x1f0)]((_0x5cd520,_0x19fe60)=>{const _0x43e2d0=_0x432cc0;let _0x3bf28e=_0x5cd520[_0x5cd520[_0x43e2d0(0x176)]-0x1],{id:_0x2823d9}=_0x3bf28e==null?{}:_0x3bf28e,{id:_0x196cff,type:_0x4e8196}=_0x19fe60,_0x32d3c9=_0x19fe60['params'];if(_0x2823d9&&_0x2823d9!==_0x196cff)throw Error('Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20'+_0x2823d9+_0x43e2d0(0x280)+_0x196cff+'.');if(!_0x3bf28e)return[{'id':_0x196cff,'type':_0x4e8196,'params':{'unitId':_0x32d3c9[_0x43e2d0(0x257)],'textRanges':_0x32d3c9['textRanges'],'actions':_0x32d3c9['actions']}}];let _0x52c6cd=_0x3bf28e['params'];return ge(_0x52c6cd['actions'],_0x32d3c9[_0x43e2d0(0x1ea)])?[..._0x5cd520[_0x43e2d0(0x2a3)](0x0,-0x1),{..._0x3bf28e,'id':_0x196cff,'type':_0x4e8196,'params':{'unitId':_0x32d3c9['unitId'],'textRanges':_0x32d3c9[_0x43e2d0(0xe4)],'actions':t['JSONX']['compose'](_0x52c6cd[_0x43e2d0(0x1ea)],_0x32d3c9['actions'])}}]:[..._0x5cd520,{'id':_0x196cff,'type':_0x4e8196,'params':{'unitId':_0x32d3c9['unitId'],'textRanges':_0x32d3c9[_0x43e2d0(0xe4)],'actions':_0x32d3c9[_0x43e2d0(0x1ea)]}}];},[]),_0x54ff30=(_0x528907=(_0x359f52=_0x21de87[_0x432cc0(0x3ba)]())==null?void 0x0:_0x359f52[_0x432cc0(0x17b)])==null?'unknown':_0x528907,_0x148a3f=(_0x417e7a=(_0x20d86a=_0x21de87[_0x432cc0(0x3ba)]())==null?void 0x0:_0x20d86a[_0x432cc0(0x1c3)])==null?'unknown':_0x417e7a;return{'changeset':{'unitID':_0x40f03b,'type':(0x0,e[_0x432cc0(0x2ce)])(_0x503f34[_0x432cc0(0x29b)](_0x40f03b)),'baseRev':_0x2535a2[_0x432cc0(0x2bf)](_0x40f03b),'revision':0x0,'userID':_0x54ff30,'memberID':_0x148a3f,'mutations':_0x24ffad},'pendingMutations':_0x846103['slice'](_0x846103['length'])};}function ge(_0x11094d,_0x509a20){return!(_e(_0x11094d)&&ve(_0x509a20)||ve(_0x11094d)&&_e(_0x509a20));}function _e(_0x561097){const _0x42290f=_0x393dbe;return ye(_0x561097)[_0x42290f(0x101)](_0x282925=>be(_0x282925)&&_0x282925['et']===_0x42290f(0x204));}function ve(_0x11e1ca){const _0x26e46e=_0x393dbe;return ye(_0x11e1ca)[_0x26e46e(0x101)](_0x587aa1=>Array[_0x26e46e(0x1b2)](_0x587aa1)||typeof _0x587aa1=='string'||typeof _0x587aa1=='number');}function ye(_0x5ade50){const _0x227d92=_0x393dbe;if(!Array[_0x227d92(0x1b2)](_0x5ade50))return[];let _0x22c9c8=_0x5ade50[_0x227d92(0x2ba)](_0x227d92(0x2f8))?_0x5ade50:_0x5ade50[_0x227d92(0x3ae)](_0x2eb9eb=>Array[_0x227d92(0x1b2)](_0x2eb9eb)&&_0x2eb9eb[_0x227d92(0x2ba)](_0x227d92(0x2f8)));if(!Array[_0x227d92(0x1b2)](_0x22c9c8))return[];let _0x41e109=_0x22c9c8[_0x227d92(0x16c)](_0x227d92(0x2f8));return _0x41e109===-0x1?[]:_0x22c9c8[_0x227d92(0x2a3)](_0x41e109+0x1);}function _0x4ff9(_0x4664af,_0x17ac46){_0x4664af=_0x4664af-0xdb;const _0x4764bc=_0x4764();let _0x4ff9f5=_0x4764bc[_0x4664af];return _0x4ff9f5;}function be(_0x4234f7){const _0x34aeac=_0x393dbe;return typeof _0x4234f7==_0x34aeac(0x295)&&!!_0x4234f7&&!Array[_0x34aeac(0x1b2)](_0x4234f7);}function xe(_0x3bffd2,_0x2732b9){const _0x14e986=_0x393dbe;let _0xaacb18=new i[(_0x14e986(0x161))](0x1);return setTimeout(()=>_0xaacb18[_0x14e986(0x20a)](_0x2732b9),_0x3bffd2),_0xaacb18[_0x14e986(0x2eb)]()[_0x14e986(0x297)]((0x0,i[_0x14e986(0x281)])(0x1));}var E,D,O;let Se=function(_0x2f4173){const _0x2cb060=_0x393dbe;return _0x2f4173[_0x2cb060(0x105)]=_0x2cb060(0x37b),_0x2f4173[_0x2cb060(0x3b4)]=_0x2cb060(0x1b8),_0x2f4173[_0x2cb060(0x3a8)]=_0x2cb060(0x2b0),_0x2f4173[_0x2cb060(0x395)]='awaiting',_0x2f4173[_0x2cb060(0x1ca)]=_0x2cb060(0x142),_0x2f4173['FETCH_MISS']=_0x2cb060(0x124),_0x2f4173[_0x2cb060(0x342)]='conflict',_0x2f4173['OFFLINE']='offline',_0x2f4173;}({});const Ce=0x4e20,we=0x2bf20;var k=class{constructor(_0x58e67d,_0x6bf3ec,_0x557d02,_0x4a7d23,_0x113b60,_0x51dd3e,_0x206a93,_0x20a967,_0x3a670d){const _0x4505f0=_0x393dbe;this[_0x4505f0(0x165)]=_0x58e67d,this[_0x4505f0(0x353)]=_0x6bf3ec,this[_0x4505f0(0x115)]=_0x113b60,this[_0x4505f0(0x1fc)]=_0x51dd3e,this[_0x4505f0(0x317)]=_0x206a93,this[_0x4505f0(0x292)]=_0x20a967,this[_0x4505f0(0x1cb)]=_0x3a670d,g(this,'_awaitingChangeset',null),g(this,_0x4505f0(0x194),[]),this[_0x4505f0(0x28b)]=_0x557d02,this['_pendingMutations']=_0x4a7d23;}[_0x393dbe(0x1b0)](_0x18b3f7){const _0x18105b=_0x393dbe;let _0x40b25a=this['_revisionService'][_0x18105b(0x2bf)](this[_0x18105b(0x165)]);return _0x18b3f7[_0x18105b(0x16a)]>_0x40b25a+0x1?(this['_handler'][_0x18105b(0xde)]({'from':_0x40b25a,'to':_0x18b3f7[_0x18105b(0x16a)]-0x1}),!0x0):!0x1;}[_0x393dbe(0x31b)](_0x54ca39){const _0x1c6d15=_0x393dbe;this[_0x1c6d15(0x317)][_0x1c6d15(0x35c)](this['unitID'],_0x54ca39);}[_0x393dbe(0x187)](_0x7a5748){const _0x32163a=_0x393dbe;var _0x1f08a4,_0x318d0e;(_0x1f08a4=(_0x318d0e=this[_0x32163a(0x115)])[_0x32163a(0x32b)])==null||_0x1f08a4['call'](_0x318d0e,_0x7a5748);}['_transformIMECache'](_0x9b016){const _0x29e229=_0x393dbe;var _0x5f38dd,_0xcf026e;return(_0x5f38dd=(_0xcf026e=this[_0x29e229(0x115)])[_0x29e229(0x270)])==null?void 0x0:_0x5f38dd['call'](_0xcf026e,_0x9b016);}[_0x393dbe(0x33a)](_0x49b480){const _0x3865b1=_0x393dbe;var _0x12d1f6,_0x20dbe8;return(_0x12d1f6=(_0x20dbe8=this[_0x3865b1(0x115)])[_0x3865b1(0x28c)])==null?void 0x0:_0x12d1f6['call'](_0x20dbe8,_0x49b480);}['_transformRemoteChangesetByIMECache'](_0x30bd56){const _0x19dcee=_0x393dbe;var _0x560218,_0x56a505,_0xc4f6f2;return(_0x560218=(_0x56a505=(_0xc4f6f2=this['_handler'])[_0x19dcee(0x2d6)])==null?void 0x0:_0x56a505[_0x19dcee(0x33b)](_0xc4f6f2,_0x30bd56))==null?_0x30bd56:_0x560218;}[_0x393dbe(0x22a)](_0x43fd17){const _0x4a2eff=_0x393dbe;var _0x22cfb3,_0x1f78b3,_0xeb6f67;return(_0x22cfb3=(_0x1f78b3=(_0xeb6f67=this[_0x4a2eff(0x115)])[_0x4a2eff(0x23c)])==null?void 0x0:_0x1f78b3['call'](_0xeb6f67,_0x43fd17))==null?_0x43fd17:_0x22cfb3;}['_syncEditingCollabCursor'](_0x53b143){const _0xdb5f82=_0x393dbe;if(this[_0xdb5f82(0x353)]===t['UniverInstanceType'][_0xdb5f82(0x2fa)]){let {unitID:_0x3d7563,mutations:_0x3fcf2d,memberID:_0x207492}=_0x53b143,_0x28f21e=_0x3fcf2d['length']>0x0?_0x3fcf2d[0x0][_0xdb5f82(0x25f)][_0xdb5f82(0xe4)]:[];if(Array[_0xdb5f82(0x1b2)](_0x28f21e)&&_0x28f21e['length']>0x0){var _0x3372c1,_0x5d4529;(_0x3372c1=(_0x5d4529=this[_0xdb5f82(0x115)])[_0xdb5f82(0x182)])==null||_0x3372c1[_0xdb5f82(0x33b)](_0x5d4529,{'unitID':_0x3d7563,'memberID':_0x207492,'textRanges':_0x28f21e});}}}['_updateLocalCache'](){const _0x2b85d5=_0x393dbe;var _0x233085;(_0x233085=this[_0x2b85d5(0x1cb)])==null||_0x233085[_0x2b85d5(0x39f)](this[_0x2b85d5(0x165)],this[_0x2b85d5(0x353)],this['_awaitingChangeset'],this[_0x2b85d5(0x194)]);}[_0x393dbe(0x34b)](){const _0x218588=_0x393dbe;return this[_0x218588(0x292)][_0x218588(0x2bf)](this[_0x218588(0x165)]);}['_incrementRevisionNumber'](){const _0x4d907e=_0x393dbe;this['_revisionService'][_0x4d907e(0x146)](this['unitID']);}[_0x393dbe(0xff)](_0x16b431){const _0x450539=_0x393dbe;let _0x42b303=this['_transformRemoteChangesetByIMECache'](_0x16b431);_0x42b303=this[_0x450539(0x22a)](_0x42b303);let _0x560941=(0x0,t[_0x450539(0x111)])(_0x42b303[_0x450539(0x14b)],this[_0x450539(0x1fc)],{'fromCollab':!0x0});if(!_0x560941[_0x450539(0x312)]){var _0x29f911;throw _0x560941[_0x450539(0x23f)]instanceof Error?_0x560941[_0x450539(0x23f)]:Error((_0x29f911=_0x560941[_0x450539(0x23f)])==null?_0x450539(0x293):_0x29f911);}this[_0x450539(0x2d1)](_0x42b303),this['_transformStateCache'](_0x42b303),this['_transformUndoredo'](_0x16b431),this[_0x450539(0x187)](_0x42b303),this['_syncEditingCollabCursor'](_0x42b303),this['_incrementRevisionNumber']();}};let A=class extends k{constructor(_0x125c26,_0x4524cb,_0x5406d,_0x30a740,_0x2b5d82,_0x5ccaa5,_0x3e382d,_0x345e27,_0x58f19e,_0x3acdcd){const _0xa50e05=_0x393dbe;super(_0x125c26,_0x4524cb,null,[],_0x5406d,_0x3e382d,_0x5ccaa5,_0x30a740,_0x3acdcd),this[_0xa50e05(0x126)]=_0x2b5d82,this['_logService']=_0x345e27,this[_0xa50e05(0x20d)]=_0x58f19e,this[_0xa50e05(0x388)]=_0x3acdcd,g(this,_0xa50e05(0x22e),_0xa50e05(0x1b8));}[_0x393dbe(0x254)](_0xf30698){const _0x1740f4=_0x393dbe;let _0xd73228=this[_0x1740f4(0x126)][_0x1740f4(0x1a2)](j,this[_0x1740f4(0x165)],this[_0x1740f4(0x353)],[_0xf30698],this['_handler']);return _0xd73228[_0x1740f4(0x359)](),_0xd73228[_0x1740f4(0x296)](),_0xd73228;}[_0x393dbe(0x360)](_0x522edd){const _0x5c3ce1=_0x393dbe;if(this[_0x5c3ce1(0x1b0)](_0x522edd))return this['_injector'][_0x5c3ce1(0x1a2)](I,this[_0x5c3ce1(0x165)],this[_0x5c3ce1(0x353)],null,[],null,[_0x522edd],this[_0x5c3ce1(0x115)]);try{let _0x3c351e=this['_transformService'][_0x5c3ce1(0x14a)](_0x522edd,[e[_0x5c3ce1(0x216)]]);if((0x0,e[_0x5c3ce1(0x109)])(_0x3c351e)){let {c1Prime:_0x357adc}=_0x3c351e;return this[_0x5c3ce1(0xff)](_0x357adc),this;}throw _0x3c351e['error'];}catch(_0x1bcd44){return this[_0x5c3ce1(0x253)][_0x5c3ce1(0x23f)](_0x1bcd44),this[_0x5c3ce1(0x1ae)](!0x1);}}[_0x393dbe(0x1ae)](_0x57c10f){const _0x161da8=_0x393dbe;return this[_0x161da8(0x126)][_0x161da8(0x1a2)](P,this[_0x161da8(0x165)],this[_0x161da8(0x353)],null,[],this[_0x161da8(0x115)],_0x57c10f);}['onRemoteAck'](_0x9195fb){const _0x2aa51a=_0x393dbe;if(_0x9195fb[_0x2aa51a(0x16a)]<=this[_0x2aa51a(0x34b)]())return this;throw Error(_0x2aa51a(0x356));}[_0x393dbe(0x1b6)](){const _0xd5ab64=_0x393dbe;throw Error(_0xd5ab64(0x2f7));}[_0x393dbe(0x3ad)](){return this;}[_0x393dbe(0x22f)](){const _0x52876e=_0x393dbe;return this['_injector']['createInstance'](F,this[_0x52876e(0x165)],this[_0x52876e(0x353)],null,[],this[_0x52876e(0x115)]);}['toggleOnline'](){return this;}['resend'](){const _0x2d71eb=_0x393dbe;throw Error(_0x2d71eb(0x398));}['fetchMiss'](){const _0xb77c20=_0x393dbe;let _0x2c3db7=this[_0xb77c20(0x292)][_0xb77c20(0x2bf)](this[_0xb77c20(0x165)]);return this[_0xb77c20(0x115)][_0xb77c20(0xde)]({'from':_0x2c3db7,'to':0x0}),this[_0xb77c20(0x126)][_0xb77c20(0x1a2)](I,this['unitID'],this[_0xb77c20(0x353)],null,[],null,[],this[_0xb77c20(0x115)]);}};A=y([v(0x3,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0x4,(0x0,t['Inject'])(t[_0x393dbe(0x1df)])),v(0x5,t[_0x393dbe(0x18f)]),v(0x6,t[_0x393dbe(0x1ee)]),v(0x7,t[_0x393dbe(0x351)]),v(0x8,e['ITransformService']),v(0x9,(0x0,t[_0x393dbe(0x219)])(S))],A);let j=E=class extends k{constructor(_0x44c110,_0x189aeb,_0xfc0ff4,_0x59d7e1,_0x1c35ae,_0x432f65,_0x823620,_0x5b451f,_0x8ae657,_0x19bf04,_0x1e1eee,_0x13a043,_0xae97ef,_0x44a13f){const _0x41537c=_0x393dbe;super(_0x44c110,_0x189aeb,null,_0xfc0ff4,_0x59d7e1,_0x8ae657,_0xae97ef,_0x432f65,_0x44a13f),this[_0x41537c(0x126)]=_0x1c35ae,this[_0x41537c(0x23d)]=_0x823620,this[_0x41537c(0x253)]=_0x5b451f,this[_0x41537c(0x13c)]=_0x19bf04,this[_0x41537c(0x20d)]=_0x1e1eee,this[_0x41537c(0x151)]=_0x13a043,g(this,_0x41537c(0x22e),'pending'),g(this,_0x41537c(0xf5),null),g(this,_0x41537c(0x1db),null);}[_0x393dbe(0x254)](_0xc58ff2){const _0x1b4e6a=_0x393dbe;return this[_0x1b4e6a(0x194)]['push'](_0xc58ff2),this[_0x1b4e6a(0x296)](),this;}[_0x393dbe(0x360)](_0x23f711){const _0x53ad82=_0x393dbe;if(this[_0x53ad82(0x1b0)](_0x23f711))return this[_0x53ad82(0x39a)](),this[_0x53ad82(0x126)][_0x53ad82(0x1a2)](I,this[_0x53ad82(0x165)],this['type'],null,this[_0x53ad82(0x194)],null,[_0x23f711],this['_handler']);try{let _0x3e1be0=this[_0x53ad82(0x20d)][_0x53ad82(0x14a)](_0x23f711,this['_pendingMutations']);if((0x0,e[_0x53ad82(0x109)])(_0x3e1be0)){let {c1Prime:_0x140d84,m2Prime:_0x53814b}=_0x3e1be0;this[_0x53ad82(0xff)](_0x140d84);let _0x2348ea=this[_0x53ad82(0x126)][_0x53ad82(0x1a2)](E,this[_0x53ad82(0x165)],this[_0x53ad82(0x353)],_0x53814b,this[_0x53ad82(0x115)]);this[_0x53ad82(0x39a)]();let _0x468086=new Date()[_0x53ad82(0x251)](),_0x2e9630=this[_0x53ad82(0xf5)]?Math[_0x53ad82(0x33c)](this[_0x53ad82(0xf5)]-_0x468086,0x0):this['_getSendChangesetTimeout']();return _0x2348ea[_0x53ad82(0x359)](_0x2e9630),_0x2348ea;}throw _0x3e1be0[_0x53ad82(0x23f)];}catch(_0x587cb3){return this[_0x53ad82(0x253)][_0x53ad82(0x23f)](_0x587cb3),this[_0x53ad82(0x1ae)](!0x1);}}['onRemoteAck'](_0x3151d2){const _0x35287b=_0x393dbe;if(_0x3151d2[_0x35287b(0x16a)]<=this[_0x35287b(0x34b)]())return this;throw Error(_0x35287b(0x2b9));}['onRemoteRej'](){throw Error('[PendingState]:\x20received\x20rejection.');}['onRemoteRetry'](){return this;}[_0x393dbe(0x22f)](){const _0x1830a0=_0x393dbe;return this['_clearScheduledTask'](),this[_0x1830a0(0x126)][_0x1830a0(0x1a2)](F,this[_0x1830a0(0x165)],this[_0x1830a0(0x353)],null,this[_0x1830a0(0x194)],this[_0x1830a0(0x115)]);}[_0x393dbe(0x19d)](){return this;}[_0x393dbe(0x359)](_0x2b1ccf){const _0x24a62d=_0x393dbe;let _0x247c49=_0x2b1ccf==null?this[_0x24a62d(0x278)]():_0x2b1ccf;this[_0x24a62d(0xf5)]=new Date()[_0x24a62d(0x251)]()+_0x247c49,this[_0x24a62d(0x1db)]=setTimeout(()=>{const _0x2ac398=_0x24a62d;this[_0x2ac398(0x39a)]();let _0x3105c0=null;switch(this['type']){case t[_0x2ac398(0x2db)][_0x2ac398(0x2e2)]:_0x3105c0=me(this['_pendingMutations'],this[_0x2ac398(0x165)],this[_0x2ac398(0x151)],this[_0x2ac398(0x292)],this[_0x2ac398(0x23d)]);break;case t['UniverInstanceType']['UNIVER_DOC']:_0x3105c0=this[_0x2ac398(0x194)][_0x2ac398(0x362)](_0x185052=>_0x185052['id']===n[_0x2ac398(0x3b2)]['id'])?he(this[_0x2ac398(0x194)],this[_0x2ac398(0x165)],this['_univerInstanceService'],this[_0x2ac398(0x292)],this[_0x2ac398(0x23d)]):me(this[_0x2ac398(0x194)],this[_0x2ac398(0x165)],this[_0x2ac398(0x151)],this[_0x2ac398(0x292)],this[_0x2ac398(0x23d)]);break;default:throw Error(_0x2ac398(0x2e5)+this[_0x2ac398(0x353)]+'\x20in\x20_schedule.');}let {changeset:_0xd14627,pendingMutations:_0x4df8ab}=_0x3105c0;this[_0x2ac398(0x115)][_0x2ac398(0x2af)](_0xd14627);let _0x4a1ba0=_0x4df8ab[_0x2ac398(0x176)]?this[_0x2ac398(0x126)][_0x2ac398(0x1a2)](N,this[_0x2ac398(0x165)],this[_0x2ac398(0x353)],_0xd14627,_0x4df8ab,this[_0x2ac398(0x115)],void 0x0):this[_0x2ac398(0x126)][_0x2ac398(0x1a2)](M,this['unitID'],this['type'],_0xd14627,this[_0x2ac398(0x115)]);_0x4a1ba0[_0x2ac398(0x296)](),this['_handler'][_0x2ac398(0x286)](this,_0x4a1ba0);},_0x247c49);}[_0x393dbe(0x278)](){const _0x316189=_0x393dbe;var _0x4dfb29;let _0x51ca84=this['_configService'][_0x316189(0x1fa)](T);return(_0x4dfb29=_0x51ca84==null?void 0x0:_0x51ca84[_0x316189(0x326)])==null?0x7d0:_0x4dfb29;}['resend'](){const _0x38958f=_0x393dbe;throw Error(_0x38958f(0x303));}[_0x393dbe(0x39a)](){const _0x523f4a=_0x393dbe;this[_0x523f4a(0x1db)]!=null&&(clearTimeout(this['_sendingTimer']),this[_0x523f4a(0x1db)]=null);}['_onConflict'](_0x3907df){const _0x1a43f6=_0x393dbe;return this[_0x1a43f6(0x39a)](),this[_0x1a43f6(0x126)]['createInstance'](P,this[_0x1a43f6(0x165)],this['type'],null,this[_0x1a43f6(0x194)],this[_0x1a43f6(0x115)],_0x3907df);}};j=E=y([v(0x4,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x5,(0x0,t['Inject'])(e[_0x393dbe(0x21a)])),v(0x6,(0x0,t[_0x393dbe(0x3b1)])(b)),v(0x7,t[_0x393dbe(0x351)]),v(0x8,t[_0x393dbe(0x1ee)]),v(0x9,t['IConfigService']),v(0xa,e[_0x393dbe(0x268)]),v(0xb,t[_0x393dbe(0x396)]),v(0xc,t[_0x393dbe(0x18f)]),v(0xd,(0x0,t[_0x393dbe(0x219)])(S))],j);let M=D=class extends k{constructor(_0x1f6cfb,_0xe1f1a6,_0x553563,_0x6c5ce,_0x558233,_0x28a538,_0x16e7f5,_0x3117aa,_0x30a3ce,_0x5dc6ef,_0x5670f5){const _0x25933c=_0x393dbe;super(_0x1f6cfb,_0xe1f1a6,_0x553563,[],_0x6c5ce,_0x16e7f5,_0x5dc6ef,_0x28a538,_0x5670f5),this[_0x25933c(0x126)]=_0x558233,this['_logService']=_0x3117aa,this[_0x25933c(0x20d)]=_0x30a3ce,g(this,_0x25933c(0x22e),_0x25933c(0x24d)),g(this,'_resendTimeout',0x0),g(this,_0x25933c(0x12f),0x0),g(this,'_resendTimer',void 0x0),g(this,'_sender',void 0x0);}[_0x393dbe(0x254)](_0x57ba44){const _0x5c7690=_0x393dbe;this[_0x5c7690(0x39a)]();let _0x33d69e=this[_0x5c7690(0x126)][_0x5c7690(0x1a2)](N,this[_0x5c7690(0x165)],this[_0x5c7690(0x353)],this[_0x5c7690(0x28b)],[_0x57ba44],this[_0x5c7690(0x115)],this['_resendTimer']);return _0x33d69e['_updateLocalCache'](),_0x33d69e;}[_0x393dbe(0x360)](_0x23052d){const _0x404f1e=_0x393dbe;if(this['_checkMissing'](_0x23052d))return this[_0x404f1e(0x39a)](),this[_0x404f1e(0x126)]['createInstance'](I,this[_0x404f1e(0x165)],this['type'],this[_0x404f1e(0x28b)],[],null,[_0x23052d],this['_handler']);try{let _0x1f6edc=this[_0x404f1e(0x20d)]['transformChangesets']([_0x23052d],[this[_0x404f1e(0x28b)]],!0x1);if((0x0,e['isTransformChangesetsSuccess'])(_0x1f6edc)){let {c1Prime:_0x4da465,c2Prime:_0x31c0a7}=_0x1f6edc;this[_0x404f1e(0xff)](_0x4da465[0x0]),_0x31c0a7[0x0]['baseRev']=this[_0x404f1e(0x34b)](),this['_clearScheduledTask']();let _0x227df2=this['_injector'][_0x404f1e(0x1a2)](D,this['unitID'],this['type'],_0x31c0a7[0x0],this[_0x404f1e(0x115)]);return _0x227df2[_0x404f1e(0x296)](),_0x227df2;}throw _0x1f6edc['error'];}catch(_0x2620d6){return this[_0x404f1e(0x253)][_0x404f1e(0x23f)](_0x2620d6),this[_0x404f1e(0x1ae)](!0x1);}}[_0x393dbe(0x14d)](_0x2fbcf5){const _0x2adb28=_0x393dbe;this[_0x2adb28(0x39a)]();let _0x173ad2=this[_0x2adb28(0x292)]['getCurrentRevOfUnit'](this[_0x2adb28(0x165)]);if(_0x2fbcf5[_0x2adb28(0x16a)]<=_0x173ad2)return this;if(this[_0x2adb28(0x1b0)](_0x2fbcf5))return this[_0x2adb28(0x126)][_0x2adb28(0x1a2)](I,this['unitID'],this[_0x2adb28(0x353)],this[_0x2adb28(0x28b)],[],_0x2fbcf5[_0x2adb28(0x16a)],[],this[_0x2adb28(0x115)]);this[_0x2adb28(0x13b)]();let _0xb3a3c2=this['_injector'][_0x2adb28(0x1a2)](A,this[_0x2adb28(0x165)],this[_0x2adb28(0x353)],this['_handler']);return _0xb3a3c2[_0x2adb28(0x296)](),_0xb3a3c2;}[_0x393dbe(0x1b6)](_0x3a42a5){const _0x4af6d7=_0x393dbe;return this['_onConflict'](!!(_0x3a42a5!=null&&_0x3a42a5[_0x4af6d7(0xfc)]));}[_0x393dbe(0x3ad)](_0x45ed9b){const _0x59aba8=_0x393dbe;return this['_maxTotalRetryTimeout']>we?this[_0x59aba8(0x22f)]():(this[_0x59aba8(0x2c8)]=xe(this['_resendTimeout'],{'timeout':this[_0x59aba8(0x193)],'reqId':_0x45ed9b[_0x59aba8(0xfb)]}),this[_0x59aba8(0x1f6)]=this[_0x59aba8(0x2c8)][_0x59aba8(0x246)](({reqId:_0x5336d2,timeout:_0x525ff9})=>{const _0x2c8f56=_0x59aba8;this[_0x2c8f56(0x175)](_0x5336d2,_0x525ff9);}),this);}['toggleOffline'](){const _0x44526e=_0x393dbe;return this[_0x44526e(0x39a)](),this[_0x44526e(0x126)][_0x44526e(0x1a2)](F,this[_0x44526e(0x165)],this[_0x44526e(0x353)],this[_0x44526e(0x28b)],[],this[_0x44526e(0x115)]);}[_0x393dbe(0x19d)](){return this;}[_0x393dbe(0x345)](){const _0x3da1d4=_0x393dbe;this[_0x3da1d4(0x115)][_0x3da1d4(0x2af)](this[_0x3da1d4(0x28b)]);}[_0x393dbe(0x1ae)](_0x476525){const _0x5abcf4=_0x393dbe;return this[_0x5abcf4(0x39a)](),this[_0x5abcf4(0x126)][_0x5abcf4(0x1a2)](P,this['unitID'],this[_0x5abcf4(0x353)],this[_0x5abcf4(0x28b)],[],this[_0x5abcf4(0x115)],_0x476525);}['_resendWithTimeout'](_0x4e4d84,_0x2f81e4){const _0x66fd22=_0x393dbe;var _0x12ea69;_0x4e4d84===((_0x12ea69=this[_0x66fd22(0x28b)])==null?void 0x0:_0x12ea69[_0x66fd22(0xfb)])&&(this[_0x66fd22(0x345)](),this['_resendTimeout']=_0x2f81e4===0x0?0x3e8:Math['min'](_0x2f81e4*0x2,Ce),this['_maxTotalRetryTimeout']+=this[_0x66fd22(0x193)]);}[_0x393dbe(0x39a)](){const _0x55e537=_0x393dbe;var _0x230f99;(_0x230f99=this[_0x55e537(0x1f6)])==null||_0x230f99[_0x55e537(0xf9)](),this['_resendTimeout']=0x0,this[_0x55e537(0x12f)]=0x0;}};M=D=y([v(0x4,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x5,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0x6,t[_0x393dbe(0x1ee)]),v(0x7,t[_0x393dbe(0x351)]),v(0x8,e[_0x393dbe(0x268)]),v(0x9,t['IUndoRedoService']),v(0xa,(0x0,t[_0x393dbe(0x219)])(S))],M);let N=O=class extends k{constructor(_0x2e989,_0x5e8ae0,_0x2f26eb,_0x45eae1,_0x201b27,_0x365099,_0x137ff8,_0x8f828f,_0x5e664d,_0x1ef4b3,_0x1bd05f,_0xe050d9,_0x50ac8e){const _0x4b6e19=_0x393dbe;super(_0x2e989,_0x5e8ae0,_0x2f26eb,_0x45eae1,_0x201b27,_0x5e664d,_0xe050d9,_0x8f828f,_0x50ac8e),this['_injector']=_0x137ff8,this[_0x4b6e19(0x253)]=_0x1ef4b3,this[_0x4b6e19(0x20d)]=_0x1bd05f,this[_0x4b6e19(0x388)]=_0x50ac8e,g(this,_0x4b6e19(0x22e),_0x4b6e19(0x142)),g(this,_0x4b6e19(0x193),0x0),g(this,_0x4b6e19(0x12f),0x0),g(this,_0x4b6e19(0x2c8),void 0x0),g(this,_0x4b6e19(0x1f6),void 0x0),_0x365099&&(this[_0x4b6e19(0x2c8)]=_0x365099,this[_0x4b6e19(0x1f6)]=this[_0x4b6e19(0x2c8)]['subscribe'](({reqId:_0xcc4434,timeout:_0x125a20})=>{const _0x4e4b32=_0x4b6e19;this[_0x4e4b32(0x175)](_0xcc4434,_0x125a20);}));}['appendMutation'](_0x5bb2d7){const _0x367da1=_0x393dbe;return this[_0x367da1(0x194)][_0x367da1(0x1f8)](_0x5bb2d7),this;}[_0x393dbe(0x360)](_0x5c299b){const _0xe0b29e=_0x393dbe;if(this[_0xe0b29e(0x1b0)](_0x5c299b))return this[_0xe0b29e(0x39a)](),this[_0xe0b29e(0x126)][_0xe0b29e(0x1a2)](I,this['unitID'],this[_0xe0b29e(0x353)],this[_0xe0b29e(0x28b)],this[_0xe0b29e(0x194)],null,[_0x5c299b],this[_0xe0b29e(0x115)]);try{let _0x3243b3=this[_0xe0b29e(0x20d)][_0xe0b29e(0x134)]([_0x5c299b],[this[_0xe0b29e(0x28b)]],!0x1);if((0x0,e[_0xe0b29e(0x100)])(_0x3243b3)){let {c1Prime:_0x1decc5,c2Prime:_0xad3b48}=_0x3243b3,_0x54e6ac=this[_0xe0b29e(0x20d)]['transformMutationsWithChangeset'](_0x1decc5[0x0],this[_0xe0b29e(0x194)]);if((0x0,e[_0xe0b29e(0x109)])(_0x54e6ac)){let {c1Prime:_0x24b46e,m2Prime:_0x533836}=_0x54e6ac;return this['_executeRemoteChangeset'](_0x24b46e),_0xad3b48[0x0][_0xe0b29e(0x332)]=this[_0xe0b29e(0x34b)](),this[_0xe0b29e(0x39a)](),this[_0xe0b29e(0x126)][_0xe0b29e(0x1a2)](O,this['unitID'],this['type'],_0xad3b48[0x0],_0x533836,this[_0xe0b29e(0x115)],void 0x0);}throw _0x54e6ac[_0xe0b29e(0x23f)];}throw _0x3243b3[_0xe0b29e(0x23f)];}catch(_0x5b04f1){return this[_0xe0b29e(0x253)]['error'](_0x5b04f1),this[_0xe0b29e(0x1ae)](!0x1);}}['onRemoteAck'](_0x186097){const _0xaa90bd=_0x393dbe;this[_0xaa90bd(0x39a)]();let _0x22bfc7=this[_0xaa90bd(0x34b)]();if(_0x186097[_0xaa90bd(0x16a)]<=_0x22bfc7)return this;if(this['_checkMissing'](_0x186097))return this['_injector'][_0xaa90bd(0x1a2)](I,this[_0xaa90bd(0x165)],this[_0xaa90bd(0x353)],this['_awaitingChangeset'],this[_0xaa90bd(0x194)],_0x186097[_0xaa90bd(0x16a)],[],this[_0xaa90bd(0x115)]);this[_0xaa90bd(0x13b)]();let _0x1e8d96=this['_injector'][_0xaa90bd(0x1a2)](j,this[_0xaa90bd(0x165)],this[_0xaa90bd(0x353)],this[_0xaa90bd(0x194)],this[_0xaa90bd(0x115)]);return _0x1e8d96[_0xaa90bd(0x359)](),_0x1e8d96[_0xaa90bd(0x296)](),_0x1e8d96;}['onRemoteRej'](_0x5ef119){const _0x4e4a07=_0x393dbe;return this[_0x4e4a07(0x1ae)](!!(_0x5ef119!=null&&_0x5ef119[_0x4e4a07(0xfc)]));}[_0x393dbe(0x3ad)](_0x5afe63){const _0x1b87cc=_0x393dbe;return this[_0x1b87cc(0x12f)]>we?this[_0x1b87cc(0x22f)]():(this[_0x1b87cc(0x2c8)]=xe(this[_0x1b87cc(0x193)],{'timeout':this[_0x1b87cc(0x193)],'reqId':_0x5afe63['reqId']}),this[_0x1b87cc(0x1f6)]=this[_0x1b87cc(0x2c8)][_0x1b87cc(0x246)](({reqId:_0x5c2164,timeout:_0x1d889c})=>{const _0x455364=_0x1b87cc;this[_0x455364(0x175)](_0x5c2164,_0x1d889c);}),this);}['toggleOffline'](){const _0x504304=_0x393dbe;return this[_0x504304(0x39a)](),this[_0x504304(0x126)][_0x504304(0x1a2)](F,this[_0x504304(0x165)],this[_0x504304(0x353)],this[_0x504304(0x28b)],this[_0x504304(0x194)],this[_0x504304(0x115)]);}[_0x393dbe(0x19d)](){return this;}[_0x393dbe(0x345)](){const _0x26376f=_0x393dbe;this[_0x26376f(0x115)]['onSendChangeset'](this[_0x26376f(0x28b)]);}[_0x393dbe(0x1ae)](_0x225fe9){const _0x111da2=_0x393dbe;return this[_0x111da2(0x39a)](),this[_0x111da2(0x126)][_0x111da2(0x1a2)](P,this[_0x111da2(0x165)],this['type'],null,this[_0x111da2(0x194)],this[_0x111da2(0x115)],_0x225fe9);}['_resendWithTimeout'](_0x94dd5f,_0x4da4c9){const _0xbd1a46=_0x393dbe;var _0x14f69c;_0x94dd5f===((_0x14f69c=this[_0xbd1a46(0x28b)])==null?void 0x0:_0x14f69c[_0xbd1a46(0xfb)])&&(this[_0xbd1a46(0x345)](),this[_0xbd1a46(0x193)]=_0x4da4c9===0x0?0x3e8:Math[_0xbd1a46(0x368)](_0x4da4c9*0x2,Ce),this[_0xbd1a46(0x12f)]+=this[_0xbd1a46(0x193)]);}[_0x393dbe(0x39a)](){const _0x24c5ab=_0x393dbe;var _0x21bb47;(_0x21bb47=this['_sender'])==null||_0x21bb47['unsubscribe'](),this[_0x24c5ab(0x193)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};N=O=y([v(0x6,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x7,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0x8,t[_0x393dbe(0x1ee)]),v(0x9,t[_0x393dbe(0x351)]),v(0xa,e[_0x393dbe(0x268)]),v(0xb,t[_0x393dbe(0x18f)]),v(0xc,(0x0,t[_0x393dbe(0x219)])(S))],N);let P=class extends k{constructor(_0x205530,_0x2901d5,_0x486ea5,_0x5aa712,_0x1319d6,_0x1e4820=!0x1,_0x2c5448,_0x4ca710,_0x300af2,_0x14eef4,_0x4d0f32,_0x3b47b7,_0x40e27c){const _0x49b811=_0x393dbe;super(_0x205530,_0x2901d5,_0x486ea5,_0x5aa712,_0x1319d6,_0x4ca710,_0x300af2,_0x14eef4,_0x40e27c),this['_isPermissionRej']=_0x1e4820,this['_permissionService']=_0x2c5448,this[_0x49b811(0x17c)]=_0x4d0f32,this['_collaborationUIEventService']=_0x3b47b7,this[_0x49b811(0x388)]=_0x40e27c,g(this,_0x49b811(0x22e),_0x49b811(0x2ec)),this[_0x49b811(0x256)](),this[_0x49b811(0x179)](),this[_0x49b811(0x2cc)]();}['appendMutation'](){return this;}['onRemoteChangeset'](){return this;}['onRemoteAck'](){return this;}[_0x393dbe(0x1b6)](){return this;}[_0x393dbe(0x3ad)](){return this;}['toggleOffline'](){return this;}[_0x393dbe(0x19d)](){return this;}['resend'](){const _0x3ee6cd=_0x393dbe;throw Error(_0x3ee6cd(0xf4));}[_0x393dbe(0x179)](){const _0x504cd3=_0x393dbe;var _0x2ae986;(_0x2ae986=this['_localCacheService'])==null||_0x2ae986['updateOfflineData'](this[_0x504cd3(0x165)],this[_0x504cd3(0x353)],null,[]);}[_0x393dbe(0x256)](){const _0x2c05a6=_0x393dbe;this[_0x2c05a6(0x1b9)]?this[_0x2c05a6(0x2b6)]['emitEvent']({'id':_0x2c05a6(0x2ae)}):this['_collaborationUIEventService'][_0x2c05a6(0x3a4)]({'id':_0x2c05a6(0x342)});}[_0x393dbe(0x2cc)](){const _0x60e2cf=_0x393dbe;this[_0x60e2cf(0x318)][_0x60e2cf(0x140)](new r[(_0x60e2cf(0x190))](this[_0x60e2cf(0x165)])['id'],!0x1);}};P=y([v(0x6,(0x0,t[_0x393dbe(0x3b1)])(t['IPermissionService'])),v(0x7,t[_0x393dbe(0x1ee)]),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0xa,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x34e)])),v(0xb,(0x0,t['Inject'])(_)),v(0xc,(0x0,t[_0x393dbe(0x219)])(S))],P);let F=class extends k{constructor(_0x5e8d4d,_0x2d08d2,_0xf2aab9,_0x82c726,_0x4eadeb,_0x1c52c2,_0x4ad6f5,_0x584e94,_0x2206db,_0x27865d){const _0x636026=_0x393dbe;super(_0x5e8d4d,_0x2d08d2,_0xf2aab9,_0x82c726,_0x4eadeb,_0x584e94,_0x2206db,_0x4ad6f5,_0x27865d),this[_0x636026(0x126)]=_0x1c52c2,g(this,_0x636026(0x22e),'offline');}['appendMutation'](_0x5faa1a){const _0x11de3c=_0x393dbe;return this[_0x11de3c(0x194)]['push'](_0x5faa1a),this['_updateLocalCache'](),this;}[_0x393dbe(0x360)](_0xcfb6f8){const _0x4d349d=_0x393dbe;throw Error(_0x4d349d(0x1ac));}[_0x393dbe(0x14d)](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x393dbe(0x1b6)](){const _0xe0c086=_0x393dbe;throw Error(_0xe0c086(0x31f));}[_0x393dbe(0x3ad)](){return this;}['toggleOffline'](){return this;}['toggleOnline'](){const _0x1cc17b=_0x393dbe;let {_injector:_0x2b3bfe,_pendingMutations:_0x2a2b2d,_awaitingChangeset:_0x34cfbc,unitID:_0x3896da,_handler:_0x42cd05,type:_0xc021a1}=this,_0x4ae657=Te(_0x2b3bfe,_0x3896da,_0xc021a1,_0x34cfbc,_0x2a2b2d,_0x42cd05);return _0x4ae657 instanceof j?_0x4ae657[_0x1cc17b(0x359)]():(_0x4ae657 instanceof N||_0x4ae657 instanceof M)&&_0x4ae657['resend'](),_0x4ae657;}[_0x393dbe(0x345)](){const _0x2aa402=_0x393dbe;throw Error(_0x2aa402(0x27d));}};F=y([v(0x5,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x6,(0x0,t['Inject'])(e[_0x393dbe(0x21a)])),v(0x7,t['ICommandService']),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x393dbe(0x219)])(S))],F);let I=class extends k{constructor(_0x48ddfa,_0x369ccb,_0x6b3165,_0x35f825,_0x2fc13c,_0x4409bf,_0x500204,_0x1dd702,_0x49a2b9,_0x3f9f05,_0x42c5ae,_0xb7b36c,_0x28e8fe,_0x43d947){const _0x581961=_0x393dbe;super(_0x48ddfa,_0x369ccb,_0x6b3165,_0x35f825,_0x500204,_0x42c5ae,_0xb7b36c,_0x49a2b9,_0x43d947),this[_0x581961(0x3a7)]=_0x2fc13c,this[_0x581961(0x3a6)]=_0x4409bf,this[_0x581961(0x126)]=_0x1dd702,this['_logService']=_0x3f9f05,this[_0x581961(0x20d)]=_0x28e8fe,this['localCacheService']=_0x43d947,g(this,_0x581961(0x22e),'fetch_missing');}[_0x393dbe(0x1d3)](_0xa30515){const _0x131093=_0x393dbe;try{if(this[_0x131093(0x17d)](_0xa30515)[_0x131093(0x155)])throw Error(_0x131093(0x19b));if(this[_0x131093(0x17d)]([...this['_queuedRemoteChangesets']][_0x131093(0x1a7)]((_0x25e5cb,_0x14bff5)=>_0x25e5cb[_0x131093(0x16a)]-_0x14bff5[_0x131093(0x16a)]))[_0x131093(0x155)])return this['_queuedRemoteChangesets']=[],this['_updateLocalCache'](),this[_0x131093(0x115)][_0x131093(0xde)]({'from':this[_0x131093(0x34b)](),'to':0x0}),this;let _0x3c7f9a=this[_0x131093(0x28b)],_0x427b43=this['_pendingMutations'],_0xbcedbe;if(_0x3c7f9a&&_0x427b43[_0x131093(0x176)]!==0x0)_0xbcedbe=this[_0x131093(0x126)][_0x131093(0x1a2)](N,this['unitID'],this[_0x131093(0x353)],_0x3c7f9a,_0x427b43,this[_0x131093(0x115)],void 0x0);else{if(_0x3c7f9a&&_0x427b43['length']===0x0)_0x3c7f9a[_0x131093(0x332)]=this['_getCurrentRevision'](),_0xbcedbe=this[_0x131093(0x126)]['createInstance'](M,this['unitID'],this['type'],_0x3c7f9a,this[_0x131093(0x115)]);else{if(_0x427b43[_0x131093(0x176)]!==0x0){let _0x31fd1f=this[_0x131093(0x126)]['createInstance'](j,this['unitID'],this[_0x131093(0x353)],_0x427b43,this[_0x131093(0x115)]);_0x31fd1f[_0x131093(0x359)](),_0xbcedbe=_0x31fd1f;}else _0xbcedbe=this[_0x131093(0x126)][_0x131093(0x1a2)](A,this[_0x131093(0x165)],this['type'],this['_handler']);}}return _0xbcedbe['_updateLocalCache'](),_0xbcedbe;}catch(_0x371a44){return this[_0x131093(0x253)][_0x131093(0x23f)]('[FetchMissState]',_0x131093(0x2c3),_0x371a44),this['_injector'][_0x131093(0x1a2)](P,this[_0x131093(0x165)],this['type'],this[_0x131093(0x28b)],this[_0x131093(0x194)],this[_0x131093(0x115)],!0x1);}}[_0x393dbe(0x17d)](_0x416d27){const _0x100487=_0x393dbe;this[_0x100487(0xdd)]();for(let _0x115f1b=0x0;_0x115f1b<_0x416d27[_0x100487(0x176)];_0x115f1b++){let _0x3ac4c4=_0x416d27[_0x115f1b],_0xc4f0d9=this[_0x100487(0x34b)]();if(!(_0x3ac4c4[_0x100487(0x16a)]<=_0xc4f0d9)){if(_0x3ac4c4[_0x100487(0x16a)]>_0xc4f0d9+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x3ac4c4)){this[_0x100487(0x2dd)]();continue;}this[_0x100487(0x16b)](_0x3ac4c4),this[_0x100487(0xdd)]();}}return{'missingChangesets':!0x1};}[_0x393dbe(0x16b)](_0x2805da){const _0x249ab4=_0x393dbe;let _0x1f5d6d=_0x2805da,_0x3d5577=this[_0x249ab4(0x28b)];if(_0x3d5577){let _0x2ce0f4=this[_0x249ab4(0x20d)]['transformChangesets']([_0x2805da],[_0x3d5577],!0x1);if(!(0x0,e['isTransformChangesetsSuccess'])(_0x2ce0f4))throw _0x2ce0f4['error'];_0x1f5d6d=_0x2ce0f4[_0x249ab4(0x137)][0x0],_0x3d5577=_0x2ce0f4[_0x249ab4(0x349)][0x0];}let _0xe1aa88=this[_0x249ab4(0x194)];if(_0xe1aa88[_0x249ab4(0x176)]){let _0x422fc9=this[_0x249ab4(0x20d)][_0x249ab4(0x14a)](_0x1f5d6d,_0xe1aa88);if(!(0x0,e[_0x249ab4(0x109)])(_0x422fc9))throw _0x422fc9[_0x249ab4(0x23f)];_0x1f5d6d=_0x422fc9[_0x249ab4(0x137)],_0xe1aa88=_0x422fc9[_0x249ab4(0x36d)];}this['_executeRemoteChangeset'](_0x1f5d6d),_0x3d5577&&(_0x3d5577[_0x249ab4(0x332)]=this[_0x249ab4(0x34b)]()),this[_0x249ab4(0x28b)]=_0x3d5577,this['_pendingMutations']=_0xe1aa88;}[_0x393dbe(0xdd)](){const _0x1deb60=_0x393dbe;if(!this[_0x1deb60(0x28b)]||this[_0x1deb60(0x3a7)]==null)return;let _0x4fbeda=this[_0x1deb60(0x34b)]();if(this['_acknowledgedAwaitingRevision']<=_0x4fbeda)throw Error(_0x1deb60(0x226)+this[_0x1deb60(0x3a7)]+'.');this['_acknowledgedAwaitingRevision']===_0x4fbeda+0x1&&this[_0x1deb60(0x2dd)]();}[_0x393dbe(0x2dd)](){const _0x3f1347=_0x393dbe;this[_0x3f1347(0x13b)](),this[_0x3f1347(0x28b)]=null,this['_acknowledgedAwaitingRevision']=null;}[_0x393dbe(0x35b)](_0x33c3eb){const _0x2a5013=_0x393dbe;let _0x3cd172=this[_0x2a5013(0x28b)];return!_0x3cd172||!_0x3cd172[_0x2a5013(0x2be)]||_0x3cd172[_0x2a5013(0xfb)]===null||_0x3cd172[_0x2a5013(0xfb)]===void 0x0?!0x1:_0x33c3eb[_0x2a5013(0x165)]===_0x3cd172['unitID']&&_0x33c3eb[_0x2a5013(0x2be)]===_0x3cd172[_0x2a5013(0x2be)]&&_0x33c3eb[_0x2a5013(0xfb)]===_0x3cd172['reqId'];}[_0x393dbe(0x345)](){throw Error('[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x393dbe(0x254)](_0x462575){const _0x1de110=_0x393dbe;return this[_0x1de110(0x194)]['push'](_0x462575),this;}[_0x393dbe(0x360)](_0x5aa4cc){const _0x4e9e7f=_0x393dbe;return this['_queuedRemoteChangesets'][_0x4e9e7f(0x1f8)](_0x5aa4cc),this;}['onRemoteAck'](_0x100102){const _0x5d94fc=_0x393dbe;if(this[_0x5d94fc(0x28b)]){let _0x33154e=this['_getCurrentRevision']();return _0x100102['revision']<=_0x33154e||(_0x33154e+0x1===_0x100102['revision']?(this[_0x5d94fc(0x13b)](),this[_0x5d94fc(0x28b)]=null,this[_0x5d94fc(0x3a7)]=null):this[_0x5d94fc(0x3a7)]=_0x100102[_0x5d94fc(0x16a)]),this;}if(_0x100102[_0x5d94fc(0x16a)]<=this[_0x5d94fc(0x34b)]())return this;throw Error(_0x5d94fc(0x112));}['onRemoteRej'](_0x24f1c4){const _0xc16c1a=_0x393dbe;return this['_onConflict'](!!(_0x24f1c4!=null&&_0x24f1c4[_0xc16c1a(0xfc)]));}[_0x393dbe(0x3ad)](){return this;}[_0x393dbe(0x22f)](){const _0x61f44e=_0x393dbe;return this[_0x61f44e(0x126)]['createInstance'](F,this['unitID'],this[_0x61f44e(0x353)],this[_0x61f44e(0x28b)],this['_pendingMutations'],this[_0x61f44e(0x115)]);}[_0x393dbe(0x19d)](){return this;}[_0x393dbe(0x1ae)](_0x289766){const _0x3b3be4=_0x393dbe;return this[_0x3b3be4(0x126)][_0x3b3be4(0x1a2)](P,this['unitID'],this[_0x3b3be4(0x353)],this['_awaitingChangeset'],this['_pendingMutations'],this[_0x3b3be4(0x115)],_0x289766);}};I=y([v(0x7,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x8,(0x0,t[_0x393dbe(0x3b1)])(e['RevisionService'])),v(0x9,t[_0x393dbe(0x351)]),v(0xa,t[_0x393dbe(0x1ee)]),v(0xb,t['IUndoRedoService']),v(0xc,e[_0x393dbe(0x268)]),v(0xd,(0x0,t[_0x393dbe(0x219)])(S))],I);function Te(_0xe632,_0x1af5b5,_0x3dbfb9,_0x884d1e,_0x536027,_0xa4a5f4){const _0x17401c=_0x393dbe;return _0x884d1e&&_0x536027['length']?_0xe632[_0x17401c(0x1a2)](N,_0x1af5b5,_0x3dbfb9,_0x884d1e,_0x536027,_0xa4a5f4,void 0x0):_0x884d1e?_0xe632['createInstance'](M,_0x1af5b5,_0x3dbfb9,_0x884d1e,_0xa4a5f4):_0x536027[_0x17401c(0x176)]?_0xe632['createInstance'](j,_0x1af5b5,_0x3dbfb9,_0x536027,_0xa4a5f4):_0xe632[_0x17401c(0x1a2)](A,_0x1af5b5,_0x3dbfb9,_0xa4a5f4);}let L=class extends t['RxDisposable']{get[_0x393dbe(0x12d)](){const _0x27cb06=_0x393dbe;return this[_0x27cb06(0x1f1)];}constructor(_0x5795ab,_0x2f249b,_0x1c3ab9,_0x7bd26e,_0x5a3006,_0x1fdd26,_0x5ebeb4,_0x558a2a,_0x296065,_0x5f046d,_0x2db970,_0xc5c003,_0x30f59f,_0x5c4a8b){const _0x401915=_0x393dbe;super(),this[_0x401915(0x165)]=_0x5795ab,this[_0x401915(0x2c5)]=_0x2f249b,this[_0x401915(0x308)]=_0x1c3ab9,this[_0x401915(0x126)]=_0x7bd26e,this['_compressMutationService']=_0x5a3006,this[_0x401915(0x17c)]=_0x1fdd26,this['_revisionService']=_0x5ebeb4,this['_eventService']=_0x558a2a,this['_univerInstanceService']=_0x296065,this[_0x401915(0x253)]=_0x5f046d,this[_0x401915(0x1fc)]=_0x2db970,this[_0x401915(0x318)]=_0xc5c003,this[_0x401915(0x15d)]=_0x30f59f,this[_0x401915(0x1cb)]=_0x5c4a8b,g(this,'_state$',new i[(_0x401915(0x1a1))](null)),g(this,_0x401915(0x211),this[_0x401915(0x199)]['asObservable']()),g(this,_0x401915(0x1f1),void 0x0),g(this,_0x401915(0x167),!0x1),g(this,_0x401915(0x290),''),g(this,_0x401915(0x26d),0x0),g(this,_0x401915(0x1b7),this[_0x401915(0x211)][_0x401915(0x297)]((0x0,i[_0x401915(0x186)])(_0x5ab101=>_0x5ab101?_0x5ab101[_0x401915(0x22e)]:'offline'),(0x0,i['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),g(this,'_transitionLocked',!0x1),g(this,_0x401915(0x15c),[]);}async[_0x393dbe(0x1da)](){const _0x2ef4d4=_0x393dbe;if(this['state'])throw Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this[_0x2ef4d4(0x119)]();}[_0x393dbe(0x27a)](){const _0x216a76=_0x393dbe;return this[_0x216a76(0x167)]=!0x0,(0x0,t[_0x216a76(0x381)])(()=>{const _0x1013d1=_0x216a76;this[_0x1013d1(0x167)]=!0x1,this['_exhaustRemoteChangesetQueue']();});}['onLocalMutation'](_0x2d5a19){const _0x94e359=_0x393dbe;this[_0x94e359(0x26f)](_0x2d5a19);}[_0x393dbe(0x2cb)](_0x186d51){const _0x50dc71=_0x393dbe;this[_0x50dc71(0x1f1)]=_0x186d51,this[_0x50dc71(0x199)][_0x50dc71(0x20a)](_0x186d51);}async[_0x393dbe(0x119)](){const _0x5c5d86=_0x393dbe;if(this[_0x5c5d86(0x2cb)](await this['_createInitialState']()),this['_singleActiveUnitService']){var _0x4f3b35;(_0x4f3b35=this[_0x5c5d86(0x15d)])==null||_0x4f3b35['editingUnit'](this[_0x5c5d86(0x165)]),this[_0x5c5d86(0x1bc)](this[_0x5c5d86(0x15d)]['getUnitStatus$'](this['unitID'])[_0x5c5d86(0x246)](_0x31834b=>{const _0x4d7bd5=_0x5c5d86;this[_0x4d7bd5(0x253)][_0x4d7bd5(0x24e)]('[CollaborationEntity]',_0x4d7bd5(0x1a9),_0x31834b),_0x31834b===0x1?(this[_0x4d7bd5(0x38c)]['emitEvent']({'id':_0x4d7bd5(0x1e8)}),this['_permissionService'][_0x4d7bd5(0x140)](new r[(_0x4d7bd5(0x190))](this[_0x4d7bd5(0x165)])['id'],!0x1),this[_0x4d7bd5(0x318)][_0x4d7bd5(0xf2)](!0x1)):(this[_0x4d7bd5(0x318)]['updatePermissionPoint'](new r[(_0x4d7bd5(0x190))](this[_0x4d7bd5(0x165)])['id'],!0x0),this[_0x4d7bd5(0x318)][_0x4d7bd5(0xf2)](!0x0));}));}let _0x3e20b0=!0x1;return this[_0x5c5d86(0x1bc)](this[_0x5c5d86(0x2c5)][_0x5c5d86(0x260)][_0x5c5d86(0x246)](_0x381440=>{const _0x1106d4=_0x5c5d86;_0x381440===0x3?this[_0x1106d4(0x2d9)](_0x3e20b0):_0x381440===0x2&&(_0x3e20b0=!0x0,this[_0x1106d4(0x1a0)]());})),this['disposeWithMe'](this[_0x5c5d86(0x2c5)]['event$'][_0x5c5d86(0x246)](_0x550e4f=>{const _0x357f55=_0x5c5d86;try{switch(_0x550e4f[_0x357f55(0x385)]){case e[_0x357f55(0x114)][_0x357f55(0x249)]:this['_onRemoteChangeset']((0x0,e[_0x357f55(0x1c1)])(_0x550e4f['data']));break;case e['CollaborationEvent']['CHANGESET_ACK']:this['_onRemoteACK'](_0x550e4f[_0x357f55(0x240)]);break;case e['CollaborationEvent'][_0x357f55(0x148)]:this[_0x357f55(0x25a)]();break;case e[_0x357f55(0x114)]['CHANGESET_SHOULD_RETRY']:this[_0x357f55(0x117)](_0x550e4f['data']);break;case e[_0x357f55(0x114)][_0x357f55(0x1cc)]:this['_onFetchMissResult'](_0x550e4f[_0x357f55(0x240)][_0x357f55(0x223)][_0x357f55(0x186)](_0x4f4413=>(0x0,e[_0x357f55(0x1c1)])(_0x4f4413)));break;case e[_0x357f55(0x114)][_0x357f55(0x1b5)]:this[_0x357f55(0x25a)]({'isPermissionRej':!0x0});break;case e[_0x357f55(0x114)]['UNISCRIPT_RUN']:break;}}catch(_0x2e0e33){throw console[_0x357f55(0x23f)](_0x357f55(0x1d9),_0x2e0e33),_0x2e0e33;}})),this[_0x5c5d86(0x1f1)];}['_unlockTransition'](){const _0x5ba347=_0x393dbe;this[_0x5ba347(0x271)]=!0x1;}['_lockTransition'](){const _0x49ca6b=_0x393dbe;if(this[_0x49ca6b(0x271)])throw Error(_0x49ca6b(0x10b));this['_transitionLocked']=!0x0;}[_0x393dbe(0x26f)](_0x379f38){const _0x191145=_0x393dbe;this[_0x191145(0xe8)](),this[_0x191145(0x2cb)](this[_0x191145(0x1f1)][_0x191145(0x254)](_0x379f38)),this['_unlockTransition']();}[_0x393dbe(0x31d)](_0x1f9576){const _0x28cc74=_0x393dbe;if(!(_0x1f9576[_0x28cc74(0x16a)]<=this[_0x28cc74(0x292)][_0x28cc74(0x2bf)](this['unitID']))){if(this[_0x28cc74(0x167)]){this['_remoteChangesetQueue'][_0x28cc74(0x1f8)](_0x1f9576);return;}this[_0x28cc74(0x30f)](_0x1f9576);}}[_0x393dbe(0x1d7)](){const _0x44aefe=_0x393dbe;this[_0x44aefe(0x15c)][_0x44aefe(0x26a)](_0x23bdb9=>this[_0x44aefe(0x30f)](_0x23bdb9)),this[_0x44aefe(0x15c)]=[];}[_0x393dbe(0x30f)](_0x9df4e6){const _0x3dbc60=_0x393dbe;let _0x3c9bc7=this[_0x3dbc60(0x343)][_0x3dbc60(0x2b2)][_0x3dbc60(0x205)](this['_compressMutationService'][_0x3dbc60(0x2b2)][_0x3dbc60(0x13a)]()[_0x3dbc60(0x2aa)])(_0x9df4e6[_0x3dbc60(0x14b)],null)||_0x9df4e6[_0x3dbc60(0x14b)],_0x11784a={..._0x9df4e6,'mutations':_0x3c9bc7};this[_0x3dbc60(0xe8)](),this[_0x3dbc60(0x2cb)](this[_0x3dbc60(0x1f1)]['onRemoteChangeset'](_0x11784a)),this['_unlockTransition']();}['_onRemoteACK'](_0x2881be){const _0x2c9e57=_0x393dbe;this[_0x2c9e57(0xe8)](),this[_0x2c9e57(0x2cb)](this['_state'][_0x2c9e57(0x14d)](_0x2881be)),this['_unlockTransition']();}[_0x393dbe(0x25a)](_0x56f792){const _0x3c1620=_0x393dbe;this[_0x3c1620(0xe8)](),this['_updateState'](this[_0x3c1620(0x1f1)]['onRemoteRej'](_0x56f792)),this['_unlockTransition']();}[_0x393dbe(0x117)](_0x20ebd9){const _0x294198=_0x393dbe;this[_0x294198(0xe8)](),this[_0x294198(0x2cb)](this[_0x294198(0x1f1)][_0x294198(0x3ad)](_0x20ebd9)),this[_0x294198(0x15e)]();}['_onFetchMissResult'](_0x5aa3e0){const _0x3b4a7e=_0x393dbe;if(!(this[_0x3b4a7e(0x1f1)]instanceof I))throw TypeError(_0x3b4a7e(0x139));let _0x1d62a6=_0x5aa3e0[_0x3b4a7e(0x186)](_0x2b48d0=>{const _0x75916d=_0x3b4a7e;let _0x39de7a=this[_0x75916d(0x343)][_0x75916d(0x2b2)][_0x75916d(0x205)](this[_0x75916d(0x343)][_0x75916d(0x2b2)]['getInterceptPoints']()[_0x75916d(0x2aa)])(_0x2b48d0[_0x75916d(0x14b)],null)||_0x2b48d0[_0x75916d(0x14b)];return{..._0x2b48d0,'mutations':_0x39de7a};});this[_0x3b4a7e(0xe8)](),this[_0x3b4a7e(0x2cb)](this[_0x3b4a7e(0x1f1)][_0x3b4a7e(0x1d3)](_0x1d62a6)),this[_0x3b4a7e(0x15e)]();}['_toggleOffline'](){const _0x34e7cf=_0x393dbe;this[_0x34e7cf(0xe8)](),this[_0x34e7cf(0x2cb)](this[_0x34e7cf(0x1f1)][_0x34e7cf(0x22f)]()),this['_unlockTransition']();}[_0x393dbe(0x2d9)](_0x40c973=!0x1){const _0x27e50e=_0x393dbe;this[_0x27e50e(0xe8)](),this[_0x27e50e(0x2cb)](this[_0x27e50e(0x1f1)][_0x27e50e(0x19d)]()),this[_0x27e50e(0x15e)]();let _0x31add8=this['_state'];_0x40c973&&_0x31add8 instanceof A&&(this['_lockTransition'](),this[_0x27e50e(0x2cb)](_0x31add8['fetchMiss']()),this[_0x27e50e(0x15e)]());}async[_0x393dbe(0x15f)](){return new Promise(_0xd9903d=>{const _0x5729fc=_0x4ff9;this['session'][_0x5729fc(0x260)][_0x5729fc(0x297)]((0x0,i['take'])(0x1))[_0x5729fc(0x246)](async _0x50147b=>{_0xd9903d(await this['_createInitialStateImpl'](_0x50147b===0x3));});});}[_0x393dbe(0x1e4)](){const _0x587235=_0x393dbe;let _0x4119e4=this[_0x587235(0x165)];return{'onStateChange':(_0x2f6fdf,_0x40f2f1)=>{const _0x3bfc1b=_0x587235;if(_0x2f6fdf!==this[_0x3bfc1b(0x1f1)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x2f6fdf['status']+'\x0aAfter:\x20'+_0x40f2f1['status']+_0x3bfc1b(0x336)+this[_0x3bfc1b(0x1f1)][_0x3bfc1b(0x22e)]);this['_updateState'](_0x40f2f1);},'onSendChangeset':_0x309853=>{const _0x2d72f6=_0x587235;_0x309853[_0x2d72f6(0x2be)]||(_0x309853['sid']=this[_0x2d72f6(0x290)],_0x309853[_0x2d72f6(0xfb)]=++this[_0x2d72f6(0x26d)]);let _0x4688e2={'eventID':e['CollaborationEvent'][_0x2d72f6(0x13d)],'data':{'unitID':_0x309853[_0x2d72f6(0x165)],'unitType':this[_0x2d72f6(0x308)],'changeset':_0x309853,'memberID':this[_0x2d72f6(0x2c5)][_0x2d72f6(0x374)]()}};this['session'][_0x2d72f6(0x389)](_0x4688e2,this[_0x2d72f6(0x165)]);},'onMissingChangesets':({from:_0x527937,to:_0x50f2df})=>{const _0x3ccff3=_0x587235;this['_logService'][_0x3ccff3(0x24e)](_0x3ccff3(0x241),_0x3ccff3(0x367)+_0x527937+_0x3ccff3(0xe9)+_0x50f2df);let _0xa34273={'eventID':e[_0x3ccff3(0x114)][_0x3ccff3(0x29e)],'data':{'unitID':_0x4119e4,'unitType':this[_0x3ccff3(0x308)],'from':_0x527937,'to':_0x50f2df}};this['session'][_0x3ccff3(0x389)](_0xa34273,this[_0x3ccff3(0x165)]);}};}async[_0x393dbe(0x36e)](_0x3e535c){const _0x13d607=_0x393dbe;var _0x36b9c7,_0x26db6b,_0x39aacc;let _0x4589ee=await((_0x36b9c7=this[_0x13d607(0x1cb)])==null?void 0x0:_0x36b9c7[_0x13d607(0x32e)](this[_0x13d607(0x165)])),_0x2de163=(_0x26db6b=_0x4589ee==null?void 0x0:_0x4589ee[_0x13d607(0x14b)])==null?[]:_0x26db6b,_0x5c7604=(_0x39aacc=_0x4589ee==null?void 0x0:_0x4589ee[_0x13d607(0x263)])==null?null:_0x39aacc,_0x25452e=!!(_0x5c7604!=null&&_0x5c7604[_0x13d607(0x2be)])&&!!(_0x5c7604!=null&&_0x5c7604['reqId']);this[_0x13d607(0x290)]=_0x25452e?_0x5c7604[_0x13d607(0x2be)]:(0x0,e['uuidv4'])(),this[_0x13d607(0x26d)]=_0x25452e?_0x5c7604[_0x13d607(0xfb)]:0x0;let _0x5f16c9=this['unitID'];try{this[_0x13d607(0x26e)](_0x5c7604,_0x2de163);}catch(_0x3fd10f){this[_0x13d607(0x253)]['error'](_0x3fd10f);}let _0x19ee97=this[_0x13d607(0x1e4)]();if(_0x3e535c){let _0x7daec=Te(this['_injector'],_0x5f16c9,this[_0x13d607(0x308)],_0x5c7604,_0x2de163,_0x19ee97);return _0x7daec instanceof j?_0x7daec[_0x13d607(0x359)]():(_0x7daec instanceof N||_0x7daec instanceof M)&&_0x7daec[_0x13d607(0x345)](),_0x7daec;}return this[_0x13d607(0x126)][_0x13d607(0x1a2)](F,_0x5f16c9,this[_0x13d607(0x308)],_0x5c7604,_0x2de163,_0x19ee97);}[_0x393dbe(0x26e)](_0x2edabe,_0x269637){const _0xd884f7=_0x393dbe;var _0x5b0fdb,_0x5c3d2c;let _0x81d9d4=this[_0xd884f7(0x343)]['interceptor'][_0xd884f7(0x205)](this[_0xd884f7(0x343)]['interceptor'][_0xd884f7(0x13a)]()['COMPRESS_MUTATION_APPLY']);(_0x5b0fdb=_0x81d9d4((_0x2edabe==null?void 0x0:_0x2edabe['mutations'])||[],null))==null||_0x5b0fdb[_0xd884f7(0x26a)](_0x1b0cf5=>this['_commandService'][_0xd884f7(0x305)](_0x1b0cf5['id'],_0x1b0cf5['params'])),(_0x5c3d2c=_0x81d9d4(_0x269637||[],null))==null||_0x5c3d2c[_0xd884f7(0x26a)](_0x193e7f=>this[_0xd884f7(0x1fc)][_0xd884f7(0x305)](_0x193e7f['id'],_0x193e7f[_0xd884f7(0x25f)]));}};L=y([v(0x3,(0x0,t[_0x393dbe(0x3b1)])(t['Injector'])),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x2de)])),v(0x5,(0x0,t['Inject'])(t['LocaleService'])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t[_0x393dbe(0x3b1)])(_)),v(0x8,t[_0x393dbe(0x396)]),v(0x9,t[_0x393dbe(0x351)]),v(0xa,t[_0x393dbe(0x1ee)]),v(0xb,t[_0x393dbe(0x152)]),v(0xc,(0x0,t[_0x393dbe(0x219)])(w)),v(0xd,(0x0,t[_0x393dbe(0x219)])(S))],L);let R=class extends L{constructor(_0x3657e5,_0x383b11,_0xb472f3,_0x4bd8ad,_0x325e53,_0x18ddd0,_0x494602,_0x29e3b6,_0x520a67,_0x340052,_0x170c41,_0x4455ff,_0x54c002,_0x3f8225){const _0x5d17c5=_0x393dbe;super(_0x3657e5,_0xb472f3,_0x383b11,_0x4bd8ad,_0x325e53,_0x18ddd0,_0x494602,_0x29e3b6,_0x520a67,_0x340052,_0x170c41,_0x4455ff,_0x54c002,_0x3f8225),this[_0x5d17c5(0x165)]=_0x3657e5,this[_0x5d17c5(0x353)]=_0x383b11,g(this,'_handlerCallback',null);}['addHandlerCallback'](_0x29f29e){const _0x84b502=_0x393dbe;this[_0x84b502(0x35d)]=_0x29f29e;}['dispose'](){const _0x2d3f84=_0x393dbe;this[_0x2d3f84(0x35d)]=null,super[_0x2d3f84(0x3aa)]();}[_0x393dbe(0x1e4)](){const _0x3ef49c=_0x393dbe;let _0x4d180a=super[_0x3ef49c(0x1e4)]();return _0x4d180a['onTransformIME']=_0x1737b1=>{const _0x271867=_0x3ef49c;var _0x14cf7f,_0xb79476;return(_0x14cf7f=this[_0x271867(0x35d)])==null||(_0xb79476=_0x14cf7f[_0x271867(0x270)])==null?void 0x0:_0xb79476['call'](_0x14cf7f,_0x1737b1);},_0x4d180a[_0x3ef49c(0x28c)]=_0x5adfbe=>{const _0x3f3bb2=_0x3ef49c;var _0x458ffa,_0x5bffcb;return(_0x458ffa=this['_handlerCallback'])==null||(_0x5bffcb=_0x458ffa[_0x3f3bb2(0x28c)])==null?void 0x0:_0x5bffcb[_0x3f3bb2(0x33b)](_0x458ffa,_0x5adfbe);},_0x4d180a[_0x3ef49c(0x32b)]=_0xb360f3=>{const _0x32c0d6=_0x3ef49c;var _0x3ac391,_0x519d30;return(_0x3ac391=this[_0x32c0d6(0x35d)])==null||(_0x519d30=_0x3ac391[_0x32c0d6(0x32b)])==null?void 0x0:_0x519d30[_0x32c0d6(0x33b)](_0x3ac391,_0xb360f3);},_0x4d180a[_0x3ef49c(0x182)]=_0x3b149c=>{const _0x594b03=_0x3ef49c;var _0x566491,_0x124ee1;return(_0x566491=this['_handlerCallback'])==null||(_0x124ee1=_0x566491['onSyncEditingCollabCursor'])==null?void 0x0:_0x124ee1[_0x594b03(0x33b)](_0x566491,_0x3b149c);},_0x4d180a[_0x3ef49c(0x2d6)]=_0x336980=>{const _0x418515=_0x3ef49c;var _0x22d0b7,_0x193a41,_0x2b1dac;if(!((_0x22d0b7=this[_0x418515(0x35d)])!=null&&_0x22d0b7[_0x418515(0x2d6)]))throw Error(_0x418515(0x2ef));return(_0x193a41=this['_handlerCallback'])==null||(_0x2b1dac=_0x193a41[_0x418515(0x2d6)])==null?void 0x0:_0x2b1dac[_0x418515(0x33b)](_0x193a41,_0x336980);},_0x4d180a['onTransformRemoteChangesetByStateCache']=_0x384b6d=>{const _0x1f9796=_0x3ef49c;var _0x4262a0,_0x1f7160,_0x1d1ad9;if(!((_0x4262a0=this[_0x1f9796(0x35d)])!=null&&_0x4262a0[_0x1f9796(0x23c)]))throw Error(_0x1f9796(0x325));return(_0x1f7160=this[_0x1f9796(0x35d)])==null||(_0x1d1ad9=_0x1f7160['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x1d1ad9[_0x1f9796(0x33b)](_0x1f7160,_0x384b6d);},_0x4d180a;}async[_0x393dbe(0x119)](){const _0x271e11=_0x393dbe;let _0x57c2c3=await super[_0x271e11(0x119)]();return this[_0x271e11(0x1bc)](this['_commandService'][_0x271e11(0x131)]((_0x2d40a8,_0x57641c)=>{const _0x181576=_0x271e11;if(_0x2d40a8[_0x181576(0x353)]!==t[_0x181576(0x39b)][_0x181576(0x3b0)]||_0x57641c!=null&&_0x57641c['fromCollab']||_0x57641c!=null&&_0x57641c['onlyLocal']||_0x2d40a8['id']===n[_0x181576(0x3b2)]['id'])return;let _0x38ae60=_0x2d40a8[_0x181576(0x25f)];if((_0x38ae60==null?void 0x0:_0x38ae60['unitId'])!==this[_0x181576(0x165)])return;let _0x5f57d3=_0x2d40a8,_0x5892fd=this[_0x181576(0x343)]['interceptor']['fetchThroughInterceptors'](this[_0x181576(0x343)][_0x181576(0x2b2)][_0x181576(0x13a)]()[_0x181576(0x344)])([_0x5f57d3],this[_0x181576(0x151)])||[_0x5f57d3];this[_0x181576(0x26f)](_0x5892fd[0x0]);})),_0x57c2c3;}};R=y([v(0x3,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x2de)])),v(0x5,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x34e)])),v(0x6,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0x7,(0x0,t[_0x393dbe(0x3b1)])(_)),v(0x8,t[_0x393dbe(0x396)]),v(0x9,t['ILogService']),v(0xa,t[_0x393dbe(0x1ee)]),v(0xb,t[_0x393dbe(0x152)]),v(0xc,(0x0,t['Optional'])(w)),v(0xd,(0x0,t[_0x393dbe(0x219)])(S))],R);let z=class extends L{constructor(_0x29556c,_0x55987b,_0x2b5b1e,_0x51d6f3,_0x4b8379,_0x5731bb,_0x9575ac,_0x40515c,_0x3c1d75,_0x4fd2eb,_0x20541a,_0x581054,_0x11c89e,_0x5eac97,_0x388215){const _0x3f21a1=_0x393dbe;super(_0x29556c,_0x2b5b1e,_0x55987b,_0x51d6f3,_0x4b8379,_0x5731bb,_0x9575ac,_0x3c1d75,_0x4fd2eb,_0x20541a,_0x581054,_0x11c89e,_0x5eac97,_0x388215),this['unitID']=_0x29556c,this[_0x3f21a1(0x353)]=_0x55987b,this[_0x3f21a1(0x2c0)]=_0x40515c;}[_0x393dbe(0x1e4)](){const _0x107ad8=_0x393dbe;let _0x1a6b31=super[_0x107ad8(0x1e4)]();return _0x1a6b31[_0x107ad8(0x32b)]=_0x15562b=>this[_0x107ad8(0x2c0)][_0x107ad8(0x273)](_0x15562b),_0x1a6b31;}async[_0x393dbe(0x119)](){const _0x4d2008=_0x393dbe;let _0x170fa2=await super[_0x4d2008(0x119)]();return this[_0x4d2008(0x1bc)](this[_0x4d2008(0x1fc)][_0x4d2008(0x131)]((_0x4bc383,_0x4f4844)=>{const _0x134fd3=_0x4d2008;if(_0x4bc383[_0x134fd3(0x353)]!==t[_0x134fd3(0x39b)][_0x134fd3(0x3b0)]||_0x4f4844!=null&&_0x4f4844[_0x134fd3(0x243)]||_0x4f4844!=null&&_0x4f4844['onlyLocal'])return;let _0x4e83e7=_0x4bc383['params'];if((_0x4e83e7==null?void 0x0:_0x4e83e7[_0x134fd3(0x257)])!==this['unitID'])return;let _0x39e85a=_0x4bc383,_0x200d14=this[_0x134fd3(0x343)]['interceptor'][_0x134fd3(0x205)](this[_0x134fd3(0x343)][_0x134fd3(0x2b2)][_0x134fd3(0x13a)]()[_0x134fd3(0x344)])([_0x39e85a],this['_univerInstanceService'])||[_0x39e85a];this[_0x134fd3(0x26f)](_0x200d14[0x0]);})),_0x170fa2;}};z=y([v(0x3,(0x0,t['Inject'])(t[_0x393dbe(0x1df)])),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(e['CompressMutationService'])),v(0x5,(0x0,t[_0x393dbe(0x3b1)])(t['LocaleService'])),v(0x6,(0x0,t['Inject'])(e[_0x393dbe(0x21a)])),v(0x7,(0x0,t['Inject'])(C)),v(0x8,(0x0,t['Inject'])(_)),v(0x9,t[_0x393dbe(0x396)]),v(0xa,t[_0x393dbe(0x351)]),v(0xb,t[_0x393dbe(0x1ee)]),v(0xc,t[_0x393dbe(0x152)]),v(0xd,(0x0,t[_0x393dbe(0x219)])(w)),v(0xe,(0x0,t[_0x393dbe(0x219)])(S))],z);const Ee=(0x0,t[_0x393dbe(0x108)])(_0x393dbe(0x2b1));function De(_0x1bd75c){const _0x14dbbd=_0x393dbe;let _0x441d5b=_0x1bd75c[_0x14dbbd(0x240)],_0x25072a=JSON[_0x14dbbd(0x2ff)](_0x441d5b);switch(_0x25072a[_0x14dbbd(0x2d7)]){case a[_0x14dbbd(0x16d)][_0x14dbbd(0x210)]:case a[_0x14dbbd(0x16d)][_0x14dbbd(0x2f6)]:{let _0x326395=_0x25072a['infoRsp'];return{..._0x25072a,'data':_0x326395,'cmd':_0x25072a['cmd']};}case a['CombCmd'][_0x14dbbd(0x35f)]:{let _0x59c55a=_0x25072a['joinRsp'];return{..._0x25072a,'data':_0x59c55a,'cmd':_0x25072a[_0x14dbbd(0x2d7)]};}case a[_0x14dbbd(0x16d)][_0x14dbbd(0x230)]:{let _0x2ccc5b=_0x25072a['collaMsg'];switch(_0x2ccc5b[_0x14dbbd(0x385)]){case e['CollaborationEvent'][_0x14dbbd(0x1b5)]:var _0x38f40e;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x38f40e=_0x2ccc5b[_0x14dbbd(0x324)])==null?void 0x0:_0x38f40e['cs']},'cmd':_0x25072a['cmd']};case e[_0x14dbbd(0x114)][_0x14dbbd(0x22b)]:var _0x1271ad;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x1271ad=_0x2ccc5b['csAckEvent'])==null?void 0x0:_0x1271ad['cs']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x249)]:var _0x141d33;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x141d33=_0x2ccc5b[_0x14dbbd(0x37c)])==null?void 0x0:_0x141d33['cs']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent'][_0x14dbbd(0x148)]:var _0x2b948a;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x2b948a=_0x2ccc5b[_0x14dbbd(0xfa)])==null?void 0x0:_0x2b948a['cs']},'cmd':_0x25072a['cmd']};case e[_0x14dbbd(0x114)][_0x14dbbd(0x2a7)]:var _0x275493;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x275493=_0x2ccc5b[_0x14dbbd(0x39e)])==null?void 0x0:_0x275493['cs']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent']['UPDATE_CURSOR']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b['updateCursorEvent']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x2f3)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x1fe)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)]['USERS_LEAVE']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b['leaveEvent']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent']['LIVESHARE_NEW_HOST']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x369)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x181)]:case e[_0x14dbbd(0x114)][_0x14dbbd(0x191)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x284)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent'][_0x14dbbd(0x32c)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x369)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent'][_0x14dbbd(0x262)]:return{..._0x25072a,'data':_0x2ccc5b,'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x1fb)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x160)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)]['UPDATE_PERMISSION_OBJ']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x2da)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)]['SHOULD_CLOSE_CONN']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b['shouldCloseConn']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x1c6)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x19e)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};default:return _0x25072a;}}default:return _0x25072a;}}function Oe(_0x4e9df0){const _0x50c5cd=_0x393dbe;switch(_0x4e9df0[_0x50c5cd(0x2d7)]){case a[_0x50c5cd(0x16d)]['HEARTBEAT']:case a['CombCmd'][_0x50c5cd(0x2f6)]:return JSON[_0x50c5cd(0x265)]({'cmd':_0x4e9df0[_0x50c5cd(0x2d7)],'routeKey':_0x4e9df0['routeKey']});case a['CombCmd'][_0x50c5cd(0x172)]:{let _0xb78b54;switch(_0x4e9df0[_0x50c5cd(0x240)][_0x50c5cd(0x385)]){case e[_0x50c5cd(0x114)][_0x50c5cd(0x1d8)]:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x1d8)],'updateCursorEvent':_0x4e9df0[_0x50c5cd(0x240)]['data']};break;case e[_0x50c5cd(0x114)][_0x50c5cd(0x1d2)]:_0xb78b54={'eventID':e[_0x50c5cd(0x114)]['USERS_LEAVE'],'leaveEvent':_0x4e9df0[_0x50c5cd(0x240)][_0x50c5cd(0x240)]};break;case e[_0x50c5cd(0x114)]['USERS_ENTER']:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x2f3)],'joinEvent':_0x4e9df0[_0x50c5cd(0x240)]['data']};break;case e[_0x50c5cd(0x114)]['LIVESHARE_NEW_HOST']:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x32a)],'liveShareNewHost':_0x4e9df0[_0x50c5cd(0x240)][_0x50c5cd(0x240)]};break;case e[_0x50c5cd(0x114)]['LIVESHARE_OPERATION']:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x191)],'liveShareOperation':_0x4e9df0[_0x50c5cd(0x240)]['data']};break;case e[_0x50c5cd(0x114)][_0x50c5cd(0x32c)]:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x32c)],'liveShareTerminate':_0x4e9df0['data']['data']};break;case e[_0x50c5cd(0x114)][_0x50c5cd(0x215)]:_0xb78b54={'eventID':e['CollaborationEvent'][_0x50c5cd(0x215)],'liveShareRequestHost':_0x4e9df0['data'][_0x50c5cd(0x240)]};break;case e[_0x50c5cd(0x114)][_0x50c5cd(0x181)]:_0xb78b54={'eventID':e['CollaborationEvent'][_0x50c5cd(0x181)]};break;default:_0xb78b54={'eventID':_0x4e9df0[_0x50c5cd(0x240)][_0x50c5cd(0x385)]};}return JSON['stringify']({'cmd':_0x4e9df0['cmd'],'routeKey':_0x4e9df0[_0x50c5cd(0x10c)],'collaMsg':_0xb78b54});}case a['CombCmd']['JOIN']:return JSON[_0x50c5cd(0x265)]({'cmd':_0x4e9df0[_0x50c5cd(0x2d7)],'routeKey':_0x4e9df0[_0x50c5cd(0x10c)],'joinReq':_0x4e9df0[_0x50c5cd(0x240)]});case a[_0x50c5cd(0x16d)]['LEAVE']:return JSON[_0x50c5cd(0x265)]({'cmd':_0x4e9df0[_0x50c5cd(0x2d7)],'routeKey':_0x4e9df0[_0x50c5cd(0x10c)],'leaveReq':_0x4e9df0[_0x50c5cd(0x240)]});default:throw Error(_0x50c5cd(0x20e));}}const B=(0x0,t['createIdentifier'])('univer-pro.collaboration-client-socket-service');function ke(_0x41e5ca,_0x119c8,_0x4865de){return _0x41e5ca+'/'+_0x119c8+'/unit/'+_0x4865de+'/new_changes';}let V=class extends t[_0x393dbe(0x2fd)]{constructor(_0x48bdd3,_0x1f99dd,_0x53b864,_0x27d519,_0x12aced){const _0x219459=_0x393dbe;super(),this['_injector']=_0x48bdd3,this['_httpService']=_0x1f99dd,this[_0x219459(0x13c)]=_0x53b864,this['_logService']=_0x27d519,this[_0x219459(0x228)]=_0x12aced;}[_0x393dbe(0x29f)](_0x4ea0e4){const _0x3d0e6c=_0x393dbe;let _0x5cf2d2=this[_0x3d0e6c(0x126)][_0x3d0e6c(0x202)](c[_0x3d0e6c(0x157)]);if(!_0x5cf2d2)throw Error(_0x3d0e6c(0x348));let _0x108288=_0x5cf2d2[_0x3d0e6c(0x132)](_0x4ea0e4);if(!_0x108288)throw Error(_0x3d0e6c(0x18c));let _0x13a8e0=new t[(_0x3d0e6c(0x220))](),_0x57eda6=new i['Subject']();_0x13a8e0[_0x3d0e6c(0x37d)](_0x108288[_0x3d0e6c(0x310)][_0x3d0e6c(0x246)](_0x4c25f7=>_0x57eda6[_0x3d0e6c(0x20a)](_0x4c25f7))),_0x13a8e0[_0x3d0e6c(0x37d)]((0x0,t['toDisposable'])(()=>_0x57eda6[_0x3d0e6c(0x3ab)]()));let _0x22df6f=new i[(_0x3d0e6c(0x1aa))]();_0x13a8e0[_0x3d0e6c(0x37d)](_0x108288[_0x3d0e6c(0x30d)][_0x3d0e6c(0x246)](_0x425b91=>_0x22df6f[_0x3d0e6c(0x20a)](_0x425b91))),_0x13a8e0[_0x3d0e6c(0x37d)]((0x0,t['toDisposable'])(()=>_0x22df6f['complete']()));let _0x4ad1c3=new i[(_0x3d0e6c(0x1aa))]();_0x13a8e0[_0x3d0e6c(0x37d)](_0x108288[_0x3d0e6c(0x1e2)][_0x3d0e6c(0x246)](_0x1ab828=>{let _0x3e06bd=De(_0x1ab828);_0x4ad1c3['next'](_0x3e06bd);})),_0x13a8e0['add']((0x0,t['toDisposable'])(()=>_0x4ad1c3[_0x3d0e6c(0x3ab)]()));let _0x1f6664,_0x1add43=()=>{const _0x37274c=_0x3d0e6c;_0x22df6f[_0x37274c(0x20a)](new Event(_0x37274c(0x2dc))),_0x57eda6[_0x37274c(0x20a)](new Event(_0x37274c(0x2dc))),_0x1f6664['close']();};return _0x1f6664={'memberID':'','close$':_0x57eda6[_0x3d0e6c(0x2eb)](),'error$':_0x22df6f[_0x3d0e6c(0x2eb)](),'open$':_0x108288[_0x3d0e6c(0x14e)],'message$':_0x4ad1c3[_0x3d0e6c(0x2eb)](),'send':_0x33ce31=>{const _0x5a4df3=_0x3d0e6c;if(_0x33ce31[_0x5a4df3(0x2d7)]===a[_0x5a4df3(0x16d)][_0x5a4df3(0x172)]){if(_0x33ce31[_0x5a4df3(0x240)][_0x5a4df3(0x385)]===e['CollaborationEvent']['SUBMIT_CHANGESET']){this[_0x5a4df3(0x320)](_0x1f6664,_0x33ce31[_0x5a4df3(0x240)])['catch'](_0x4e400c=>{const _0x4a5647=_0x5a4df3;this[_0x4a5647(0x253)][_0x4a5647(0x23f)](_0x4e400c),_0x1add43();});return;}if(_0x33ce31[_0x5a4df3(0x240)]['eventID']===e[_0x5a4df3(0x114)][_0x5a4df3(0x29e)]){let _0x18e9d8=_0x33ce31[_0x5a4df3(0x240)];this[_0x5a4df3(0x1c7)](_0x18e9d8)[_0x5a4df3(0x269)](_0x432d00=>{const _0x5da009=_0x5a4df3;_0x4ad1c3[_0x5da009(0x20a)]({'cmd':a[_0x5da009(0x16d)][_0x5da009(0x230)],'code':a[_0x5da009(0x33e)]['OK'],'routeKey':_0x18e9d8[_0x5da009(0x240)][_0x5da009(0x165)],'routeType':'','data':{'eventID':e['CollaborationEvent']['PSEUDO_FETCH_MISSING_RESULT'],'data':{'changesets':_0x432d00}}});})[_0x5a4df3(0x22c)](_0x264b18=>{const _0x347e97=_0x5a4df3;this[_0x347e97(0x253)][_0x347e97(0x23f)](_0x264b18),_0x1add43();});return;}}_0x108288[_0x5a4df3(0x389)](Oe(_0x33ce31));},'close':()=>{const _0x8af61a=_0x3d0e6c;_0x108288[_0x8af61a(0x24b)](),_0x13a8e0[_0x8af61a(0x3aa)]();}},_0x1f6664;}async[_0x393dbe(0x320)](_0x17964c,_0xba88){const _0x5d834f=_0x393dbe;var _0x125522;let {unitType:_0x48cacc,unitID:_0x1f751e,changeset:_0xdd5da1}=_0xba88[_0x5d834f(0x240)],_0x4907f6={'unitID':_0x1f751e,'memberID':_0x17964c['memberID'],'type':_0x48cacc,'changeset':(0x0,e[_0x5d834f(0x1c4)])(_0xdd5da1)},_0x10e65c=this[_0x5d834f(0x13c)][_0x5d834f(0x1fa)](T),_0x3bce86=ke((_0x125522=_0x10e65c==null?void 0x0:_0x10e65c[_0x5d834f(0x34a)])==null?_0x5d834f(0x19a):_0x125522,_0x48cacc,_0x1f751e);try{await this[_0x5d834f(0x20c)][_0x5d834f(0x28a)](_0x3bce86,{'body':_0x4907f6});}catch(_0x23bfe8){throw this[_0x5d834f(0x253)][_0x5d834f(0x23f)](_0x5d834f(0x197),_0x5d834f(0x11a)),_0x23bfe8;}}async[_0x393dbe(0x1c7)](_0x432d2b){const _0x559ce1=_0x393dbe;let {unitID:_0x1b2cca,from:_0x48a366,to:_0xca2aeb,unitType:_0x3ed110}=_0x432d2b['data'];return(await this[_0x559ce1(0x228)]['fetchMissingChangesets']({'metadata':void 0x0},{'unitID':_0x1b2cca,'type':_0x3ed110,'from':_0x48a366,'to':_0xca2aeb}))[_0x559ce1(0x223)][_0x559ce1(0x186)](_0xd86e5b=>((_0xd86e5b[_0x559ce1(0x14b)]===null||_0xd86e5b[_0x559ce1(0x14b)]===void 0x0)&&(_0xd86e5b[_0x559ce1(0x14b)]=[]),_0xd86e5b));}};V=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(c[_0x393dbe(0x129)])),v(0x2,t['IConfigService']),v(0x3,t['ILogService']),v(0x4,e[_0x393dbe(0x235)])],V);let H=class extends t[_0x393dbe(0x2fd)]{get[_0x393dbe(0x14c)](){const _0xc60b02=_0x393dbe;return this['_socket$'][_0xc60b02(0x192)]();}constructor(_0x4ae206,_0x15a591,_0x183ab5,_0x31130e,_0x42d135,_0x451aaf){const _0x4fa30d=_0x393dbe;super(),this[_0x4fa30d(0x126)]=_0x4ae206,this[_0x4fa30d(0x253)]=_0x15a591,this[_0x4fa30d(0x13c)]=_0x183ab5,this[_0x4fa30d(0x143)]=_0x31130e,this[_0x4fa30d(0x2b6)]=_0x42d135,this[_0x4fa30d(0x2ab)]=_0x451aaf,g(this,'_socket$',new i[(_0x4fa30d(0x1a1))](void 0x0)),g(this,_0x4fa30d(0x1a3),this['_socket$'][_0x4fa30d(0x2eb)]()),g(this,_0x4fa30d(0x250),null),g(this,_0x4fa30d(0x328),new Map()),g(this,'_status$',new i[(_0x4fa30d(0x1a1))](0x0)),g(this,_0x4fa30d(0x1b7),this['_status$'][_0x4fa30d(0x2eb)]()),g(this,_0x4fa30d(0x164),!0x1),g(this,_0x4fa30d(0x36c),void 0x0),g(this,'_retryCount',0x0),g(this,_0x4fa30d(0xfd),null),g(this,_0x4fa30d(0x203),void 0x0),g(this,_0x4fa30d(0x2ea),void 0x0),this[_0x4fa30d(0x319)]();}[_0x393dbe(0x319)](){const _0x22249c=_0x393dbe;this[_0x22249c(0x2ab)]&&this[_0x22249c(0x1bc)](this['_networkConditionService'][_0x22249c(0x261)]['subscribe'](_0x523093=>{const _0x402e7a=_0x22249c;_0x523093&&!this[_0x402e7a(0x14c)]&&this[_0x402e7a(0x1c5)](),_0x523093||this[_0x402e7a(0x386)]();}));}[_0x393dbe(0x3aa)](){const _0x58fb4e=_0x393dbe;var _0x453a3d;super[_0x58fb4e(0x3aa)](),(_0x453a3d=this[_0x58fb4e(0xfd)])==null||_0x453a3d[_0x58fb4e(0xf9)](),this[_0x58fb4e(0xfd)]=null,this[_0x58fb4e(0x17f)](),this[_0x58fb4e(0x321)](),this[_0x58fb4e(0xf0)](),this[_0x58fb4e(0x328)][_0x58fb4e(0x26a)](_0x34016d=>_0x34016d[_0x58fb4e(0x3aa)]()),this[_0x58fb4e(0x328)][_0x58fb4e(0x1ef)](),this[_0x58fb4e(0x307)][_0x58fb4e(0x3ab)]();}async[_0x393dbe(0x266)](_0x39b13e){const _0x54ff4f=_0x393dbe;if(this[_0x54ff4f(0x328)][_0x54ff4f(0x391)](_0x39b13e))return this[_0x54ff4f(0x328)][_0x54ff4f(0x202)](_0x39b13e);this[_0x54ff4f(0x323)]();let _0x48d7e4=this['_injector'][_0x54ff4f(0x1a2)](x,_0x39b13e,this[_0x54ff4f(0x113)][_0x54ff4f(0x2eb)]());return this[_0x54ff4f(0x328)][_0x54ff4f(0x393)](_0x39b13e,_0x48d7e4),_0x48d7e4;}[_0x393dbe(0x2b5)](_0x28b14a){const _0x1b729f=_0x393dbe;let _0x5178a7=this[_0x1b729f(0x328)][_0x1b729f(0x202)](_0x28b14a);if(_0x5178a7&&(this[_0x1b729f(0x328)][_0x1b729f(0x1ff)](_0x28b14a),_0x5178a7['close']()),!this[_0x1b729f(0x328)][_0x1b729f(0x222)]){var _0x1d2e7e;(_0x1d2e7e=this[_0x1b729f(0x14c)])==null||_0x1d2e7e[_0x1b729f(0x24b)]();}}[_0x393dbe(0x1c5)](){const _0x2ea812=_0x393dbe;this[_0x2ea812(0xdb)]=0x0,this[_0x2ea812(0x17f)](),this[_0x2ea812(0x3b5)]();}['_clearRetryConnectingTimer'](){const _0x1c425b=_0x393dbe;this['_retryConnectingTimer']!=null&&(clearTimeout(this[_0x1c425b(0x36c)]),this['_retryConnectingTimer']=null);}async[_0x393dbe(0x21e)](){const _0x48c4c1=_0x393dbe;var _0x486f3a;let _0x466ba0=this['_configService'][_0x48c4c1(0x1fa)](T),_0x2ce92d=(_0x486f3a=_0x466ba0==null?void 0x0:_0x466ba0[_0x48c4c1(0x237)])==null?p:_0x486f3a,_0x5022be=await this['_socketService']['createSocket'](_0x2ce92d);return this[_0x48c4c1(0x250)]=_0x5022be,_0x5022be;}async[_0x393dbe(0x323)](){const _0x3dd27e=_0x393dbe;try{var _0x22bff1,_0x1b5943;let _0x518b0a=(_0x22bff1=(_0x1b5943=this['_socket'])==null?this[_0x3dd27e(0x250)]:_0x1b5943)==null?await this[_0x3dd27e(0x21e)]():_0x22bff1;if(_0x518b0a){var _0xf04984;let _0x1d0c56=_0x518b0a['send'];_0x518b0a[_0x3dd27e(0x389)]=_0x336585=>(_0x336585[_0x3dd27e(0x2d7)]!==a[_0x3dd27e(0x16d)][_0x3dd27e(0x294)]&&this[_0x3dd27e(0x1bf)](),_0x1d0c56['apply'](_0x518b0a,[_0x336585])),(_0xf04984=this[_0x3dd27e(0xfd)])==null||_0xf04984[_0x3dd27e(0xf9)](),this[_0x3dd27e(0xfd)]=null,this[_0x3dd27e(0xfd)]=_0x518b0a[_0x3dd27e(0x1e2)]['subscribe'](_0x5831a5=>this[_0x3dd27e(0x3b8)](_0x518b0a,_0x5831a5)),_0x518b0a[_0x3dd27e(0x30d)][_0x3dd27e(0x297)]((0x0,s['take'])(0x1))[_0x3dd27e(0x246)](_0x3310a4=>this[_0x3dd27e(0x253)]['error']('[CollaborationSessionService]:\x20socket\x20error',_0x3310a4)),_0x518b0a[_0x3dd27e(0x14e)][_0x3dd27e(0x297)]((0x0,s[_0x3dd27e(0x281)])(0x1))['subscribe'](()=>{const _0x2081ee=_0x3dd27e;this[_0x2081ee(0x31c)](_0x518b0a);}),_0x518b0a['close$'][_0x3dd27e(0x297)]((0x0,s[_0x3dd27e(0x281)])(0x1))[_0x3dd27e(0x246)](_0x2811e0=>{const _0x3783d2=_0x3dd27e;this[_0x3783d2(0x253)][_0x3783d2(0x24e)](_0x3783d2(0x180),_0x3783d2(0x150),_0x2811e0),this['_onConnectionFailed']();});}}catch(_0x36f8c2){this[_0x3dd27e(0x253)][_0x3dd27e(0x23f)](_0x36f8c2),this[_0x3dd27e(0x232)]();}}[_0x393dbe(0x31c)](_0x324bcd){const _0x19397b=_0x393dbe;this[_0x19397b(0x253)][_0x19397b(0x24e)](_0x19397b(0x180),_0x19397b(0xe3)),_0x324bcd[_0x19397b(0x389)]({'cmd':a[_0x19397b(0x16d)][_0x19397b(0x2f6)]}),this[_0x19397b(0x1bf)]();}['_onOffline'](){const _0x215c95=_0x393dbe;this[_0x215c95(0x164)]=!0x1,this[_0x215c95(0x250)]=null,this['_status$'][_0x215c95(0x20a)](0x2),this[_0x215c95(0x113)]['next'](null),this['_clearTimeoutTimer'](),this[_0x215c95(0xf0)]();}[_0x393dbe(0x232)](){const _0x44aa36=_0x393dbe;var _0x18198b;this[_0x44aa36(0x386)](),this[_0x44aa36(0xdb)]<((_0x18198b=this[_0x44aa36(0x13c)][_0x44aa36(0x1fa)](_0x44aa36(0x2b3)))==null?0x3:_0x18198b)?(this['_collaborationUIEventService'][_0x44aa36(0x3a4)]({'id':_0x44aa36(0x34d)}),this['_tryReconnect']()):this['_collaborationUIEventService'][_0x44aa36(0x3a4)]({'id':'SOCKET_FAILED'});}[_0x393dbe(0x3b5)](){const _0x2cdd4b=_0x393dbe;var _0x275d49;let _0x4052dd=this[_0x2cdd4b(0xdb)],_0x47657e=this['_configService'][_0x2cdd4b(0x1fa)](T),_0x3ee07b=_0x4052dd===0x0?0x0:((_0x275d49=_0x47657e==null?void 0x0:_0x47657e[_0x2cdd4b(0x217)])==null?0x4e20:_0x275d49)*0x2**_0x4052dd;this[_0x2cdd4b(0x36c)]=setTimeout(()=>{const _0x16459a=_0x2cdd4b;clearTimeout(this['_retryConnectingTimer']),this[_0x16459a(0x36c)]=null,this[_0x16459a(0x323)]();},_0x3ee07b),this['_retryCount']+=0x1;}[_0x393dbe(0x3b8)](_0x45f3d2,_0x389717){const _0x56d87f=_0x393dbe;let {cmd:_0x1644d9}=_0x389717;_0x1644d9===a[_0x56d87f(0x16d)][_0x56d87f(0x2f6)]&&!this['_socketReady']&&(_0x45f3d2['memberID']=_0x389717[_0x56d87f(0x240)][_0x56d87f(0x1c3)],this['_socket$'][_0x56d87f(0x20a)](_0x45f3d2),this[_0x56d87f(0x307)][_0x56d87f(0x20a)](0x3),this[_0x56d87f(0x164)]=!0x0,this['_candidateSocket']=null),_0x1644d9===a[_0x56d87f(0x16d)][_0x56d87f(0x210)]&&this[_0x56d87f(0x321)](),this['_rescheduleHeartbeat']();}['_rescheduleHeartbeat'](){const _0x611130=_0x393dbe;var _0x7d3bc4;this[_0x611130(0xf0)](),this[_0x611130(0x203)]=setTimeout(()=>this['_sendHeartbeat'](),(_0x7d3bc4=this[_0x611130(0x13c)][_0x611130(0x1fa)](_0x611130(0x330)))==null?0x7530:_0x7d3bc4);}[_0x393dbe(0xdc)](){const _0x558f5c=_0x393dbe;this['_socket'][_0x558f5c(0x389)]({'cmd':a[_0x558f5c(0x16d)]['HEARTBEAT']}),this[_0x558f5c(0x2e3)]();}[_0x393dbe(0x2e3)](){const _0x3d80e3=_0x393dbe;var _0x5013e1;this[_0x3d80e3(0x2ea)]=setTimeout(()=>this[_0x3d80e3(0x232)](),(_0x5013e1=this['_configService'][_0x3d80e3(0x1fa)]('HEARTBEAT_TIMEOUT'))==null?m:_0x5013e1);}[_0x393dbe(0xf0)](){const _0xa16483=_0x393dbe;this['_sendHeartbeatTimer']!=null&&(clearTimeout(this[_0xa16483(0x203)]),this[_0xa16483(0x203)]=null);}[_0x393dbe(0x321)](){const _0x571dd0=_0x393dbe;this[_0x571dd0(0x2ea)]!=null&&(clearTimeout(this[_0x571dd0(0x2ea)]),this[_0x571dd0(0x2ea)]=null);}};H=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x1,t[_0x393dbe(0x351)]),v(0x2,t[_0x393dbe(0x14f)]),v(0x3,B),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(_)),v(0x5,(0x0,t[_0x393dbe(0x219)])(Ee))],H);let U=class extends t[_0x393dbe(0x1c8)]{constructor(_0xc7b340,_0x412ad8,_0x2a9182,_0x4e572f){const _0x4e0e1b=_0x393dbe;var _0x3e38c3;super(),this[_0x4e0e1b(0x126)]=_0xc7b340,this[_0x4e0e1b(0x3b9)]=_0x412ad8,this['_configService']=_0x2a9182,this[_0x4e0e1b(0x151)]=_0x4e572f,g(this,_0x4e0e1b(0x27c),new Map()),g(this,_0x4e0e1b(0x299),new i[(_0x4e0e1b(0x1aa))]()),g(this,_0x4e0e1b(0x2f0),this['_entityInit$']['asObservable']()),((_0x3e38c3=this['_configService'][_0x4e0e1b(0x1fa)](_0x4e0e1b(0x12c)))==null?void 0x0:_0x3e38c3[_0x4e0e1b(0x26c)])!==!0x1&&this['_init']();}['dispose'](){const _0x45fe29=_0x393dbe;super['dispose'](),this[_0x45fe29(0x27c)][_0x45fe29(0x26a)](_0x182e28=>_0x182e28[_0x45fe29(0x3aa)]()),this[_0x45fe29(0x27c)][_0x45fe29(0x1ef)]();}[_0x393dbe(0x1b4)](_0x259739){const _0x7f2e92=_0x393dbe;var _0x34d628;return(_0x34d628=this[_0x7f2e92(0x27c)]['get'](_0x259739))==null?null:_0x34d628;}[_0x393dbe(0xdf)](_0x219d43){const _0xe45386=_0x393dbe;let _0x95e4ad=this[_0xe45386(0x1b4)](_0x219d43);return _0x95e4ad?(0x0,i['of'])(_0x95e4ad):this['_entityInit$'][_0xe45386(0x297)]((0x0,s[_0xe45386(0x378)])(_0x1daa53=>_0x1daa53[_0xe45386(0x165)]===_0x219d43));}[_0x393dbe(0x2fc)](_0xebb93){const _0x4919e5=_0x393dbe;return(0x0,i[_0x4919e5(0x2bc)])(this[_0x4919e5(0xdf)](_0xebb93)['pipe']((0x0,s[_0x4919e5(0x186)])(()=>void 0x0)));}[_0x393dbe(0x119)](){const _0x2c01fa=_0x393dbe;this[_0x2c01fa(0x151)][_0x2c01fa(0x28d)](t[_0x2c01fa(0x2db)]['UNIVER_SHEET'])[_0x2c01fa(0x297)]((0x0,i[_0x2c01fa(0x365)])(this['dispose$']),(0x0,s[_0x2c01fa(0x169)])(0x10))[_0x2c01fa(0x246)](async _0x598e39=>{const _0x581abb=_0x2c01fa;let _0x3b2d8d=_0x598e39[_0x581abb(0x128)][_0x581abb(0x366)](),_0x315b15=await this['_startCollaboration'](_0x3b2d8d,t[_0x581abb(0x2db)][_0x581abb(0x2e2)]);this[_0x581abb(0x27c)]['set'](_0x3b2d8d,_0x315b15);}),this[_0x2c01fa(0x151)][_0x2c01fa(0x28d)](t[_0x2c01fa(0x2db)][_0x2c01fa(0x2fa)])['pipe']((0x0,i['takeUntil'])(this[_0x2c01fa(0x33d)]),(0x0,s[_0x2c01fa(0x169)])(0x10))[_0x2c01fa(0x297)]((0x0,s[_0x2c01fa(0x378)])(_0xf33bd4=>!_0xf33bd4[_0x2c01fa(0x128)]['getUnitId']()['startsWith']('__')))[_0x2c01fa(0x246)](async _0x30889a=>{const _0x324c50=_0x2c01fa;let _0x243d01=_0x30889a[_0x324c50(0x128)]['getUnitId'](),_0x28d597=await this[_0x324c50(0x116)](_0x243d01,t[_0x324c50(0x2db)]['UNIVER_DOC']);this['_entities'][_0x324c50(0x393)](_0x243d01,_0x28d597);}),(0x0,i[_0x2c01fa(0x1a5)])(this[_0x2c01fa(0x151)][_0x2c01fa(0x1ed)](t[_0x2c01fa(0x2db)][_0x2c01fa(0x2e2)]),this[_0x2c01fa(0x151)][_0x2c01fa(0x1ed)](t[_0x2c01fa(0x2db)][_0x2c01fa(0x2fa)]))['pipe']((0x0,i[_0x2c01fa(0x365)])(this['dispose$']))[_0x2c01fa(0x246)](_0xb4fabb=>{const _0x556454=_0x2c01fa;let _0x2eeb83=_0xb4fabb[_0x556454(0x366)](),_0x39766a=this[_0x556454(0x27c)][_0x556454(0x202)](_0x2eeb83);_0x39766a&&(_0x39766a['dispose'](),this['_entities'][_0x556454(0x1ff)](_0x2eeb83));});}async[_0x393dbe(0x116)](_0x1ca1df,_0x31c72f){const _0x1754f6=_0x393dbe;let _0x364b69=await this[_0x1754f6(0x3b9)]['requireSession'](_0x1ca1df),_0x9b6897=this[_0x1754f6(0x126)][_0x1754f6(0x1a2)](this[_0x1754f6(0x2f5)](_0x31c72f),_0x1ca1df,_0x31c72f,_0x364b69);return await _0x9b6897['init'](),this[_0x1754f6(0x299)][_0x1754f6(0x20a)](_0x9b6897),_0x9b6897;}[_0x393dbe(0x2f5)](_0x6202b){const _0x23201b=_0x393dbe;switch(_0x6202b){case t[_0x23201b(0x2db)][_0x23201b(0x2fa)]:return R;case t[_0x23201b(0x2db)][_0x23201b(0x2e2)]:return z;default:throw Error(_0x23201b(0x259)+_0x6202b);}}};U=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(H)),v(0x2,t[_0x393dbe(0x14f)]),v(0x3,t[_0x393dbe(0x396)])],U);var Ae=_0x393dbe(0x1c2),je=_0x393dbe(0x196);let Me=class extends t[_0x393dbe(0x2fd)]{constructor(_0x5f1e00,_0x2c192a){const _0xa432e7=_0x393dbe;super(),this['_univerInstanceService']=_0x5f1e00,this[_0xa432e7(0x13c)]=_0x2c192a,this[_0xa432e7(0x119)]();}[_0x393dbe(0x119)](){const _0x2e542e=_0x393dbe;this[_0x2e542e(0x1bc)](this[_0x2e542e(0x151)]['focused$'][_0x2e542e(0x246)](()=>{const _0x7feb8d=_0x2e542e;var _0x521c02;let _0x5b954a=this['_univerInstanceService'][_0x7feb8d(0x37a)](),_0x2f6bc4=(_0x521c02=this['_configService'][_0x7feb8d(0x1fa)](_0x7feb8d(0x2b4)))==null?'Univer':_0x521c02;_0x5b954a instanceof t['Workbook']&&(_0x2f6bc4=_0x5b954a[_0x7feb8d(0x373)]),document['title']=_0x2f6bc4;}));}};Me=y([v(0x0,t[_0x393dbe(0x396)]),v(0x1,t[_0x393dbe(0x14f)])],Me);let W=class{constructor(_0x49b1d1,_0x41caff,_0x2da75f){const _0x3c13fc=_0x393dbe;this['_configService']=_0x49b1d1,this[_0x3c13fc(0x20c)]=_0x41caff,this[_0x3c13fc(0x2bb)]=_0x2da75f,this['init']();}[_0x393dbe(0x1da)](){const _0x113a9b=_0x393dbe;this['_httpService'][_0x113a9b(0x2a0)]({'priority':0x1,'interceptor':(_0x542e08,_0x5319f0)=>_0x5319f0(_0x542e08)[_0x113a9b(0x297)]((0x0,i['concatMap'])(async _0x450930=>{const _0x4fb06e=_0x113a9b;let _0xbededf=_0x450930;if(_0xbededf[_0x4fb06e(0x22e)]===0x191){if(typeof window>'u')throw Error(_0x4fb06e(0xe2));if(window[_0x4fb06e(0x1f5)](this[_0x4fb06e(0x2bb)]['t'](_0x4fb06e(0x392)))){let _0x17921e=window[_0x4fb06e(0xf7)](window[_0x4fb06e(0x3a9)][_0x4fb06e(0x1ce)]);window['location'][_0x4fb06e(0x1ce)]=this['_getLoginPath']()+_0x4fb06e(0x275)+_0x17921e;}}return _0xbededf;}))});}[_0x393dbe(0xf3)](){const _0x21f425=_0x393dbe;var _0x2c221c;let _0x34f932=this[_0x21f425(0x13c)][_0x21f425(0x1fa)](T);return(_0x2c221c=_0x34f932==null?void 0x0:_0x34f932[_0x21f425(0x242)])==null?_0x21f425(0x372):_0x2c221c;}};W=y([v(0x0,t[_0x393dbe(0x14f)]),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(c['HTTPService'])),v(0x2,(0x0,t[_0x393dbe(0x3b1)])(t['LocaleService']))],W);let G=class extends t[_0x393dbe(0x2fd)]{constructor(_0x549930,_0xc3e0a8){const _0x551ed8=_0x393dbe;super(),this['_HTTPService']=_0x549930,this[_0x551ed8(0x13c)]=_0xc3e0a8,g(this,_0x551ed8(0x30b),!0x1),this[_0x551ed8(0x189)]();}['_initMergeInterceptor'](){const _0xb55c04=_0x393dbe;let _0x1261ea=this;this[_0xb55c04(0x1bc)](this['_HTTPService']['registerHTTPInterceptor']({'priority':0x3e7,'interceptor':(0x0,c[_0xb55c04(0x33f)])({'isMatch'(_0x923dca){const _0x33fbdc=_0xb55c04;var _0x33d09b;if(_0x923dca['method']===_0x33fbdc(0xf1)&&(_0x33d09b=_0x923dca[_0x33fbdc(0x13f)])!=null&&_0x33d09b['body']){let {objectID:_0x20191c,objectType:_0x2114e7}=_0x923dca[_0x33fbdc(0x13f)]['body']||{};if(!_0x20191c||_0x2114e7===void 0x0)return!0x1;let _0x3f2e7e=_0x1261ea[_0x33fbdc(0x1f4)]()+'/'+_0x2114e7+_0x33fbdc(0x334)+_0x20191c+_0x33fbdc(0x1c9);if(_0x923dca[_0x33fbdc(0x133)]===_0x3f2e7e)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x396bd3){const _0x739292=_0xb55c04;var _0x2dcbfd;return(_0x2dcbfd=_0x396bd3['requestParams'])==null?void 0x0:_0x2dcbfd[_0x739292(0x2f8)];},'mergeParamsToRequest'(_0xe3ffae,_0x271d09){const _0x8926e5=_0xb55c04;let _0x4d0c04=_0x1261ea[_0x8926e5(0x1f4)]()+_0x8926e5(0x28f),_0x4a99c4=_0xe3ffae[_0x8926e5(0x1f0)]((_0xcabe14,_0x40bc05)=>{const _0x4245a3=_0x8926e5;let {unitID:_0x2f62be,objectID:_0x164971,objectType:_0x179106,actions:_0x13957f}=_0x40bc05;return _0xcabe14[_0x2f62be]||(_0xcabe14[_0x2f62be]={}),_0xcabe14[_0x2f62be][_0x164971]||(_0xcabe14[_0x2f62be][_0x164971]={'objectID':_0x164971,'objectType':_0x179106,'actions':[]}),_0xcabe14[_0x2f62be][_0x164971][_0x4245a3(0x1ea)][_0x4245a3(0x1f8)](..._0x13957f),_0xcabe14;},{}),_0x172df4=[];for(let _0x21ac26 in _0x4a99c4)for(let _0x176e25 in _0x4a99c4[_0x21ac26]){let {actions:_0x1810b0,objectType:_0x2c0f3e}=_0x4a99c4[_0x21ac26][_0x176e25],_0xca5f0f=[...new Set(_0x1810b0)];_0x172df4['push']({'unitID':_0x21ac26,'objectID':_0x176e25,'objectType':_0x2c0f3e,'actions':_0xca5f0f});}return new c[(_0x8926e5(0x30e))](_0x8926e5(0xf1),_0x4d0c04,{'headers':_0x271d09[_0x8926e5(0x3be)],'withCredentials':_0x271d09['withCredentials'],'responseType':_0x271d09[_0x8926e5(0x2c9)],'body':{'requests':_0x172df4}});}},{'distributeResult'(_0x5744d0,_0x4f9d8a){const _0x21359e=_0xb55c04;let {objectActions:_0x41dcbb}=_0x5744d0;return _0x4f9d8a[_0x21359e(0x186)](_0x196c9a=>{const _0x211e0c=_0x21359e;let {unitID:_0x4c70a2,objectID:_0x10c1b7,actions:_0x4b0d41}=_0x196c9a,_0x559ee5=_0x41dcbb[_0x211e0c(0x3ae)](_0x4a849b=>_0x4a849b[_0x211e0c(0x165)]===_0x4c70a2&&_0x4a849b[_0x211e0c(0x24c)]===_0x10c1b7);return{'config':_0x196c9a,'result':{'actions':_0x4b0d41[_0x211e0c(0x186)](_0x37cdb5=>_0x559ee5==null?void 0x0:_0x559ee5[_0x211e0c(0x1ea)]['find'](_0x5afe42=>_0x5afe42[_0x211e0c(0x3b6)]===_0x37cdb5))['filter'](_0x62e43f=>!!_0x62e43f),'error':_0x5744d0[_0x211e0c(0x23f)]}};});}})}));}[_0x393dbe(0x1f4)](){const _0x299150=_0x393dbe;var _0x35050c;let _0x904740=this[_0x299150(0x13c)][_0x299150(0x1fa)](T);return(_0x35050c=_0x904740==null?void 0x0:_0x904740['authzUrl'])==null?_0x299150(0x311):_0x35050c;}async[_0x393dbe(0x2f9)](_0x8abfa8){const _0x1d31af=_0x393dbe;let _0x318450=this[_0x1d31af(0x1f4)]()+'/'+_0x8abfa8[_0x1d31af(0x352)]+_0x1d31af(0x36f);return(await this['_HTTPService'][_0x1d31af(0x28a)](_0x318450,{'body':_0x8abfa8}))[_0x1d31af(0x2f8)][_0x1d31af(0x24c)]||'';}async[_0x393dbe(0x102)](_0x52af63){const _0xbefc10=_0x393dbe;let _0x50d11c=this[_0xbefc10(0x1f4)]()+'/-/object/list';return(await this[_0xbefc10(0x153)][_0xbefc10(0x28a)](_0x50d11c,{'body':_0x52af63}))[_0xbefc10(0x2f8)]['objects'];}async[_0x393dbe(0x3a3)](_0x5de8a9){const _0xd3f2b0=_0x393dbe;var _0xa410df;let _0x5a27fb=this['_getAPIPrefixPath']()+'/'+_0x5de8a9['objectType']+'/object/'+_0x5de8a9['objectID'],_0x1b6ccf=await this[_0xd3f2b0(0x153)][_0xd3f2b0(0x2e9)](_0x5a27fb,{'body':_0x5de8a9});if((_0x1b6ccf==null||(_0xa410df=_0x1b6ccf[_0xd3f2b0(0x2f8)])==null||(_0xa410df=_0xa410df['error'])==null?void 0x0:_0xa410df[_0xd3f2b0(0x159)])!==0x1)throw Error('Failed\x20to\x20update\x20permission\x20point');}async[_0x393dbe(0x267)](_0x213c30){const _0x3c97c5=_0x393dbe;let _0x1e5359=this['_getAPIPrefixPath']()+'/'+_0x213c30[_0x3c97c5(0x352)]+_0x3c97c5(0x334)+_0x213c30[_0x3c97c5(0x24c)]+_0x3c97c5(0x1c9);return(await this['_HTTPService'][_0x3c97c5(0x28a)](_0x1e5359,{'body':_0x213c30}))[_0x3c97c5(0x2f8)][_0x3c97c5(0x1ea)];}async[_0x393dbe(0x177)](_0x306f1b){const _0x537a8b=_0x393dbe;let _0x1f1046=this[_0x537a8b(0x1f4)]()+_0x537a8b(0x28f);return(await this['_HTTPService']['post'](_0x1f1046,{'body':{'requests':_0x306f1b}}))[_0x537a8b(0x2f8)][_0x537a8b(0x313)];}async[_0x393dbe(0x120)](_0x19863d){const _0x59c2a2=_0x393dbe;let _0x2f84d6=this['_getAPIPrefixPath']()+'/'+_0x19863d['objectType']+_0x59c2a2(0x298),_0x42009d=await this[_0x59c2a2(0x153)][_0x59c2a2(0x28a)](_0x2f84d6,{'body':_0x19863d});return{'roles':_0x42009d[_0x59c2a2(0x2f8)][_0x59c2a2(0x3ac)],'actions':_0x42009d[_0x59c2a2(0x2f8)][_0x59c2a2(0x1ea)]};}async[_0x393dbe(0x183)](_0x4aa7b4){const _0x53a331=_0x393dbe;let _0x513f3b=this['_getAPIPrefixPath']()+'/collaborator';await this['_HTTPService'][_0x53a331(0x1ff)](_0x513f3b,{'params':{'collaboratorID':_0x4aa7b4['collaboratorID'],'objectID':_0x4aa7b4[_0x53a331(0x24c)],'unitID':_0x4aa7b4['unitID']}});}async['updateCollaborator'](_0x280e0a){const _0x5c3198=_0x393dbe;let _0x11fd48=this[_0x5c3198(0x1f4)]()+'/collaborator';await this[_0x5c3198(0x153)][_0x5c3198(0x11e)](_0x11fd48,{'body':_0x280e0a});}async[_0x393dbe(0x2b8)](_0x24dcfe){const _0x372c66=_0x393dbe;let _0x248c6c=this[_0x372c66(0x1f4)]()+_0x372c66(0x2e8);await this[_0x372c66(0x153)][_0x372c66(0x28a)](_0x248c6c,{'body':_0x24dcfe});}async['listCollaborators'](_0x48d4e1){const _0x31c920=_0x393dbe;var _0x37ad07;let _0x2fc120=this[_0x31c920(0x1f4)]()+'/collaborator',_0xf330f4=await this[_0x31c920(0x153)][_0x31c920(0x202)](_0x2fc120,{'params':{'objectID':_0x48d4e1[_0x31c920(0x24c)],'unitID':_0x48d4e1['unitID']}});return this[_0x31c920(0xf8)]((_0x37ad07=_0xf330f4[_0x31c920(0x2f8)][_0x31c920(0x2e7)])==null?!0x1:_0x37ad07),_0xf330f4['body'][_0x31c920(0x287)];}async[_0x393dbe(0x145)](_0x41cf8){const _0x89a984=_0x393dbe;let _0x264be6=this['_getAPIPrefixPath']()+_0x89a984(0x2e8);await this['_HTTPService']['put'](_0x264be6,{'body':_0x41cf8});}[_0x393dbe(0xf8)](_0x584d8d){const _0x42f9c3=_0x393dbe;this[_0x42f9c3(0x30b)]=_0x584d8d;}[_0x393dbe(0x1d5)](){const _0x32336c=_0x393dbe;return this[_0x32336c(0x30b)];}};G=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(c['HTTPService'])),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x14f)]))],G);function Ne(_0x428810){const _0x589a10=_0x393dbe;let _0x2667b0=atob(_0x428810),_0x1bd157=new Uint8Array(_0x2667b0[_0x589a10(0x176)]);for(let _0x4b2884=0x0;_0x4b2884<_0x2667b0[_0x589a10(0x176)];_0x4b2884++)_0x1bd157[_0x4b2884]=_0x2667b0['charCodeAt'](_0x4b2884);return _0x1bd157;}function Pe(_0xdb49c){const _0x5e41=_0x393dbe;let _0x397560='';for(let _0x488132=0x0;_0x488132<_0xdb49c[_0x5e41(0x176)];_0x488132++)_0x397560+=String[_0x5e41(0x363)](_0xdb49c[_0x488132]);return btoa(_0x397560);}function Fe(_0x206571,_0x2fbd89){const _0x147865=_0x393dbe;let _0xd0409e=Ne(_0x2fbd89),_0x112463=(0x0,f[_0x147865(0x238)])(0x10);return Pe((0x0,f['concatBytes'])(_0x112463,(0x0,d[_0x147865(0x2e4)])(_0xd0409e,_0x112463)[_0x147865(0x17a)]((0x0,f[_0x147865(0x123)])(_0x206571))));}function Ie(){const _0x186fce=_0x393dbe;let _0x41f6ee=(0x0,l[_0x186fce(0x198)])()[_0x186fce(0x3bb)];if(typeof window<'u'&&window[_0x186fce(0x3a9)]!==void 0x0&&_0x41f6ee){let _0x2cd448={'time':Math[_0x186fce(0x3bd)](Date['now']()/0x3e8),'domain':location[_0x186fce(0x221)]};return Fe(JSON[_0x186fce(0x265)](_0x2cd448),_0x41f6ee);}}let K=class{constructor(_0x12c06d){const _0x3124f1=_0x393dbe;this[_0x3124f1(0x20c)]=_0x12c06d,this[_0x3124f1(0x10e)]();}[_0x393dbe(0x10e)](){const _0xd14b8=_0x393dbe;this[_0xd14b8(0x20c)][_0xd14b8(0x2a0)]({'interceptor':(_0xb23ee,_0x4a2fc1)=>{const _0x49cefb=_0xd14b8;let _0x1cfd31=Ie();return _0x1cfd31&&_0xb23ee['headers'][_0x49cefb(0x393)](_0x49cefb(0xe0),_0x1cfd31),_0x4a2fc1(_0xb23ee);}});}};K=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(c[_0x393dbe(0x129)]))],K);let q=class extends t[_0x393dbe(0x1c8)]{constructor(_0x1d0243,_0x4c2a1a,_0x515307){const _0x3b8264=_0x393dbe;super(),this[_0x3b8264(0x253)]=_0x1d0243,this[_0x3b8264(0x1ab)]=_0x4c2a1a,this[_0x3b8264(0x1cb)]=_0x515307,g(this,_0x3b8264(0x16f),new i[(_0x3b8264(0x1a1))](null)),g(this,_0x3b8264(0x2ed),this[_0x3b8264(0x16f)][_0x3b8264(0x2eb)]());}async[_0x393dbe(0x13e)](_0x1c98d6,_0x29040b,_0x2b76e9){const _0x1e8790=_0x393dbe;this[_0x1e8790(0x16f)][_0x1e8790(0x20a)]({'unitId':_0x1c98d6,'type':_0x29040b});let _0x366cec=null;switch(_0x29040b){case t[_0x1e8790(0x2db)][_0x1e8790(0x2e2)]:_0x366cec=await this[_0x1e8790(0x1ab)]['loadSheet'](_0x1c98d6,_0x2b76e9);break;case t[_0x1e8790(0x2db)]['UNIVER_DOC']:_0x366cec=await this[_0x1e8790(0x1ab)][_0x1e8790(0x2ca)](_0x1c98d6,_0x2b76e9);break;default:this[_0x1e8790(0x253)][_0x1e8790(0x23f)](_0x1e8790(0x1ba),'Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.');break;}return _0x366cec;}async[_0x393dbe(0x329)](_0x78452d,_0x41ebfb,_0x401679){const _0x3f881d=_0x393dbe;var _0x2a60a5;this['_unitInfo$'][_0x3f881d(0x20a)]({'unitId':_0x78452d,'type':_0x41ebfb,'subUnitId':_0x401679});let _0x1a88af=0x0,_0x14d1d2=await((_0x2a60a5=this[_0x3f881d(0x1cb)])==null?void 0x0:_0x2a60a5[_0x3f881d(0x32e)](_0x78452d));return _0x14d1d2&&(_0x14d1d2['awaitingChangeset']||_0x14d1d2['mutations'][_0x3f881d(0x176)]!==0x0)&&(_0x1a88af=_0x14d1d2[_0x3f881d(0x2df)]),_0x1a88af===0x0&&this[_0x3f881d(0x253)][_0x3f881d(0x24e)]('[DataLoaderService]',_0x3f881d(0x354)),this[_0x3f881d(0x13e)](_0x78452d,_0x41ebfb,_0x1a88af);}};q=y([v(0x0,t[_0x393dbe(0x351)]),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x233)])),v(0x2,(0x0,t[_0x393dbe(0x219)])(S))],q);let J=class{constructor(_0x3f0d7a,_0x421a6b,_0x373f7c){const _0x19fd85=_0x393dbe;this['_httpService']=_0x3f0d7a,this[_0x19fd85(0x13c)]=_0x421a6b,this[_0x19fd85(0x151)]=_0x373f7c,g(this,_0x19fd85(0xe7),0x0),g(this,'_change$',new i[(_0x19fd85(0x1aa))]()),g(this,'change$',this[_0x19fd85(0x322)]),g(this,_0x19fd85(0x394),new Map());}[_0x393dbe(0x3b7)](_0x4dee01){const _0x47a932=_0x393dbe;this[_0x47a932(0xe7)]=_0x4dee01,this[_0x47a932(0x322)][_0x47a932(0x20a)](_0x4dee01);}[_0x393dbe(0x277)](_0xe6f13a,_0x3c9cc4){const _0x5f211c=_0x393dbe;if(_0x3c9cc4===u['ImageSourceType'][_0x5f211c(0x236)]){let _0x11e7b0=new Image();return _0x11e7b0[_0x5f211c(0x36a)]=_0xe6f13a,_0x11e7b0;}return this[_0x5f211c(0x394)][_0x5f211c(0x202)](_0xe6f13a);}[_0x393dbe(0x170)](_0x7d8454,_0x2ebefc,_0x400ed8){const _0x3f82db=_0x393dbe;_0x2ebefc===u[_0x3f82db(0x1eb)]['BASE64']||_0x400ed8==null||this[_0x3f82db(0x394)][_0x3f82db(0x393)](_0x7d8454,_0x400ed8);}async['getImage'](_0x545f7f){const _0xab3d92=_0x393dbe;try{let _0x17e50e=this[_0xab3d92(0x314)](this['_getSignURL'](),''+_0x545f7f),_0x578aef=(await this[_0xab3d92(0x20c)][_0xab3d92(0x202)](_0x17e50e))[_0xab3d92(0x2f8)];if(_0x578aef[_0xab3d92(0x23f)]&&_0x578aef['error']['code']===a[_0xab3d92(0x30a)]['OK']){let _0x2e7cfd=(0x0,t[_0xab3d92(0x144)])(_0x578aef[_0xab3d92(0x133)],this[_0xab3d92(0x31a)]());return Promise['resolve'](_0x2e7cfd);}return Promise[_0xab3d92(0x35a)](_0x578aef[_0xab3d92(0x23f)]);}catch(_0x16f12e){return Promise[_0xab3d92(0x35a)](_0x16f12e);}}async['saveImage'](_0x2d2e93){const _0x199441=_0x393dbe;let _0x5f4d54='';if(!u[_0x199441(0xec)]['includes'](_0x2d2e93['type']))return this['_decreaseWaiting'](),Promise[_0x199441(0x35a)](Error(u[_0x199441(0x135)][_0x199441(0x1d4)]));if(_0x2d2e93['size']>(0x0,u['getDrawingImageAllowSize'])())return this[_0x199441(0x1d1)](),Promise['reject'](Error(u[_0x199441(0x135)][_0x199441(0x2c4)]));try{let _0x437e33=new FormData();_0x437e33['append']('file',_0x2d2e93);let _0x2f1daa=this['_univerInstanceService'][_0x199441(0x37a)](),_0x23a276=_0x2f1daa==null?void 0x0:_0x2f1daa[_0x199441(0x366)]();if(!_0x23a276)throw Error(_0x199441(0x2a1));let _0x226335=this[_0x199441(0x104)]()+'?size='+_0x2d2e93[_0x199441(0x222)][_0x199441(0x340)]()+_0x199441(0x3a2)+a[_0x199441(0x184)][_0x199441(0x35e)]+_0x199441(0x23a)+encodeURIComponent(_0x23a276),_0x3f9181={'body':_0x437e33},_0x55ab68=(await this['_httpService'][_0x199441(0x28a)](_0x226335,_0x3f9181))[_0x199441(0x2f8)];if(typeof _0x55ab68[_0x199441(0x377)]!=_0x199441(0x229))return this[_0x199441(0x1d1)](),Promise['reject'](Error(u[_0x199441(0x135)][_0x199441(0x21c)]));_0x5f4d54=_0x55ab68['FileId'];}catch{return this[_0x199441(0x1d1)](),Promise[_0x199441(0x35a)](Error(u[_0x199441(0x135)][_0x199441(0x21c)]));}return new Promise((_0x12e0c4,_0x5a4efc)=>{const _0x512aa3=_0x199441;let _0x32985b=new FileReader();_0x32985b[_0x512aa3(0x26b)](_0x2d2e93),_0x32985b[_0x512aa3(0x2e6)]=_0x1e879e=>{const _0x4f7e52=_0x512aa3;var _0x4b4f07;let _0x2b6b5e=(_0x4b4f07=_0x1e879e[_0x4f7e52(0x2a6)])==null?void 0x0:_0x4b4f07[_0x4f7e52(0x312)];if(_0x2b6b5e==null){this['_decreaseWaiting'](),_0x5a4efc(Error(u['ImageUploadStatusType'][_0x4f7e52(0x21c)]));return;}_0x12e0c4({'imageId':(0x0,t['generateRandomId'])(0x6),'imageSourceType':u['ImageSourceType']['UUID'],'source':_0x5f4d54,'base64Cache':_0x2b6b5e,'status':u[_0x4f7e52(0x135)]['SUCCUSS']}),this[_0x4f7e52(0x1d1)]();};});}[_0x393dbe(0x104)](){const _0x4724b7=_0x393dbe;var _0x4ff421;let _0x42d139=this[_0x4724b7(0x13c)][_0x4724b7(0x1fa)](T);return(_0x4ff421=_0x42d139==null?void 0x0:_0x42d139[_0x4724b7(0x2f4)])==null?'/universer-api/stream/file/upload':_0x4ff421;}[_0x393dbe(0x10a)](){const _0x1893c2=_0x393dbe;var _0x28c4b5;let _0x5c3302=this[_0x1893c2(0x13c)][_0x1893c2(0x1fa)](T);return(_0x28c4b5=_0x5c3302==null?void 0x0:_0x5c3302['signUrlServerUrl'])==null?_0x1893c2(0x289):_0x28c4b5;}[_0x393dbe(0x31a)](){const _0x5f3251=_0x393dbe;var _0x35d0fd;let _0x722bcb=this[_0x5f3251(0x13c)][_0x5f3251(0x1fa)](T);return(_0x35d0fd=_0x722bcb==null?void 0x0:_0x722bcb[_0x5f3251(0x38d)])==null?location['origin']:_0x35d0fd;}[_0x393dbe(0x314)](_0x54c1f4,_0x4afbae){const _0x2efbfd=_0x393dbe;return _0x54c1f4[_0x2efbfd(0x25c)]('{fileID}',_0x4afbae);}[_0x393dbe(0x1d1)](){const _0x138190=_0x393dbe;--this[_0x138190(0xe7)],this['_change$'][_0x138190(0x20a)](this[_0x138190(0xe7)]);}};J=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(c[_0x393dbe(0x129)])),v(0x1,t[_0x393dbe(0x14f)]),v(0x2,(0x0,t[_0x393dbe(0x3b1)])(t['IUniverInstanceService']))],J);let Y=class{constructor(_0x206ad5,_0x19e49d){const _0x694a74=_0x393dbe;this['_configService']=_0x206ad5,this[_0x694a74(0x153)]=_0x19e49d;}['_getAPIPrefixPath'](){const _0x21ddeb=_0x393dbe;var _0x4ee846;let _0x2619c7=this[_0x21ddeb(0x13c)]['getConfig'](T);return(_0x4ee846=_0x2619c7==null?void 0x0:_0x2619c7[_0x21ddeb(0x24f)])==null?_0x21ddeb(0x311):_0x4ee846;}async['list'](_0x331cfa){const _0x31c147=_0x393dbe;let _0x2a5f4a=this[_0x31c147(0x1f4)]()+_0x31c147(0x2e8);return{'list':[{'title':_0x31c147(0x252),'mentions':(await this[_0x31c147(0x153)]['get'](_0x2a5f4a,{'params':{'objectID':_0x331cfa[_0x31c147(0x257)],'unitID':_0x331cfa[_0x31c147(0x257)]}}))[_0x31c147(0x2f8)][_0x31c147(0x287)][_0x31c147(0x186)](_0x258351=>({'objectId':_0x258351['id'],'name':_0x258351['subject'][_0x31c147(0x373)],'metadata':{'icon':_0x258351['subject'][_0x31c147(0x282)]},'label':_0x258351[_0x31c147(0x248)][_0x31c147(0x373)],'objectType':t[_0x31c147(0x27b)]['PERSON']})),'metadata':{},'type':t['MentionType']['PERSON']}]};}};Y=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t['IConfigService'])),v(0x1,(0x0,t['Inject'])(c[_0x393dbe(0x129)]))],Y);let X=class extends t['RxDisposable']{constructor(_0x39bb00,_0x2cd90c,_0x5b7f1e,_0x36a3d8,_0x360c73){const _0x41662c=_0x393dbe;super(),this[_0x41662c(0x126)]=_0x39bb00,this['_univerInstanceService']=_0x2cd90c,this[_0x41662c(0x318)]=_0x5b7f1e,this[_0x41662c(0x382)]=_0x36a3d8,this[_0x41662c(0x2b6)]=_0x360c73,this[_0x41662c(0x1cd)](),this['_initCloseConn']();}['_initCloseConn'](){const _0x344ea4=_0x393dbe;let _0x481962=async _0x80eac5=>{const _0x476c09=_0x4ff9;(await this[_0x476c09(0x382)]['requireSession'](_0x80eac5))['event$']['pipe']((0x0,s[_0x476c09(0x378)])(_0x5b93e0=>_0x5b93e0[_0x476c09(0x385)]===e[_0x476c09(0x114)][_0x476c09(0x304)]),(0x0,s[_0x476c09(0x365)])(this[_0x476c09(0x33d)]))['subscribe'](_0x2d8362=>{const _0xb9bedf=_0x476c09;let {reason:_0x2a0f08}=_0x2d8362[_0xb9bedf(0x240)];this[_0xb9bedf(0x2b6)]['emitEvent']({'id':_0xb9bedf(0x379),'data':_0x2a0f08}),this[_0xb9bedf(0x318)][_0xb9bedf(0x140)](new r['WorkbookEditablePermission'](_0x80eac5)['id'],!0x1),this['_collaborationSessionService'][_0xb9bedf(0x2b5)](_0x80eac5);});};(0x0,i[_0x344ea4(0x1a5)])(this[_0x344ea4(0x151)][_0x344ea4(0x28d)](t[_0x344ea4(0x2db)][_0x344ea4(0x2e2)]),this[_0x344ea4(0x151)][_0x344ea4(0x28d)](t['UniverInstanceType']['UNIVER_DOC']))[_0x344ea4(0x297)]((0x0,s['map'])(_0x395966=>_0x395966[_0x344ea4(0x128)][_0x344ea4(0x366)]()),(0x0,s[_0x344ea4(0x378)])(_0x160cad=>!(0x0,t[_0x344ea4(0x103)])(_0x160cad)),(0x0,s[_0x344ea4(0x365)])(this[_0x344ea4(0x33d)]))[_0x344ea4(0x246)](_0x63b9ce=>{_0x481962(_0x63b9ce);});}['_initUnitPermissionChange'](){const _0x335899=_0x393dbe;let _0x432eb7=async _0x1a3678=>{const _0x5636bc=_0x4ff9;let _0x3f96a0=await this[_0x5636bc(0x382)]['requireSession'](_0x1a3678),_0x478c09=this[_0x5636bc(0x126)]['get'](r[_0x5636bc(0x276)]);_0x3f96a0[_0x5636bc(0x27e)][_0x5636bc(0x297)]((0x0,s[_0x5636bc(0x378)])(_0x34cd85=>_0x34cd85[_0x5636bc(0x385)]===e['CollaborationEvent'][_0x5636bc(0x138)]),(0x0,s['takeUntil'])(this[_0x5636bc(0x33d)]))[_0x5636bc(0x246)](_0xaebeb3=>{const _0xb10dff=_0x5636bc;let {objectId:_0x2a196e}=_0xaebeb3[_0xb10dff(0x240)];_0x2a196e===_0x1a3678?_0x478c09[_0xb10dff(0x173)](_0x1a3678):_0x478c09[_0xb10dff(0x2d4)](_0x1a3678,_0x2a196e);});};(0x0,i[_0x335899(0x1a5)])(this['_univerInstanceService'][_0x335899(0x28d)](t[_0x335899(0x2db)][_0x335899(0x2e2)]))['pipe']((0x0,s[_0x335899(0x186)])(_0x1009fd=>_0x1009fd[_0x335899(0x128)][_0x335899(0x366)]()),(0x0,s['filter'])(_0x739ca3=>!(0x0,t['isInternalEditorID'])(_0x739ca3)),(0x0,s[_0x335899(0x365)])(this[_0x335899(0x33d)]))[_0x335899(0x246)](_0x13ddd3=>{_0x432eb7(_0x13ddd3);});}};X=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x1,t[_0x393dbe(0x396)]),v(0x2,t['IPermissionService']),v(0x3,(0x0,t[_0x393dbe(0x3b1)])(H)),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(_))],X);let Z=class{constructor(_0x18f793,_0x5d8575){const _0x70a2fa=_0x393dbe;this[_0x70a2fa(0x13c)]=_0x18f793,this[_0x70a2fa(0x20c)]=_0x5d8575;}async[_0x393dbe(0x2d2)](_0x36fc42,_0x295f04){const _0x329442=_0x393dbe;var _0x389809;let {unitID:_0x51057b,type:_0x4c2a06,revision:_0x162b7c=0x0}=_0x295f04,_0x9eb71=this[_0x329442(0x29a)]()+'/'+_0x4c2a06+_0x329442(0x188)+_0x51057b+'/rev/'+_0x162b7c,_0x14d23e=(await this[_0x329442(0x20c)][_0x329442(0x202)](_0x9eb71))['body'],_0x56c46a=(_0x389809=_0x14d23e[_0x329442(0x2d8)])==null?void 0x0:_0x389809[_0x329442(0x1e7)];if(_0x56c46a){let _0x2b6465=_0x56c46a==null?void 0x0:_0x56c46a[_0x329442(0x1bb)];_0x56c46a[_0x329442(0x1bb)]=e['textEncoder'][_0x329442(0x11b)]((0x0,e[_0x329442(0x212)])(_0x2b6465)),Object[_0x329442(0x1de)](_0x56c46a[_0x329442(0x3a1)])[_0x329442(0x26a)](([,_0x6bc534])=>{const _0x4c109e=_0x329442;let _0x158a76=_0x6bc534[_0x4c109e(0x1bb)];_0x6bc534['originalMeta']=e[_0x4c109e(0x315)]['encode']((0x0,e[_0x4c109e(0x212)])(_0x158a76));});}return _0x14d23e;}async[_0x393dbe(0x20f)](_0x2d5dc3,_0x4f109f){const _0x34ef0e=_0x393dbe;let {unitID:_0x5e8a94,type:_0x4b5f32,blockID:_0x2f34f8}=_0x4f109f,_0x34fa28=this[_0x34ef0e(0x341)]()+'/'+_0x4b5f32+_0x34ef0e(0x188)+_0x5e8a94+'/block/'+_0x2f34f8;return(await this['_httpService'][_0x34ef0e(0x202)](_0x34fa28))[_0x34ef0e(0x2f8)];}async[_0x393dbe(0x1d6)](_0x1273d4,_0x139c2d){const _0x5dff4d=_0x393dbe;let {unitID:_0x3906c6,type:_0x8163c7,blockID:_0x2d333f}=_0x139c2d,_0x2e941b=this[_0x5dff4d(0x341)]()+_0x5dff4d(0x397)+_0x8163c7+_0x5dff4d(0x188)+_0x3906c6+_0x5dff4d(0x397)+_0x2d333f;return(await this[_0x5dff4d(0x20c)]['get'](_0x2e941b))[_0x5dff4d(0x2f8)];}async['fetchMissingChangesets'](_0x36b9a9,_0x30dc0e){const _0x56ea5c=_0x393dbe;let {unitID:_0x339810,type:_0x5223b0,from:_0x52ad6a,to:_0x18cfae}=_0x30dc0e,_0x5c5f02=this[_0x56ea5c(0x341)]()+'/'+_0x5223b0+_0x56ea5c(0x188)+_0x339810+'/fetchmissing?from='+_0x52ad6a+'&to='+_0x18cfae;return(await this[_0x56ea5c(0x20c)][_0x56ea5c(0x202)](_0x5c5f02))['body'];}['getSnapshotAPIPath'](){const _0x49bc11=_0x393dbe;var _0x49d910;return(_0x49d910=this['_configService'][_0x49bc11(0x1fa)](_0x49bc11(0x3a5)))==null?this[_0x49bc11(0x341)]():_0x49d910;}[_0x393dbe(0x341)](){const _0x243052=_0x393dbe;var _0x45629d;let _0x3e1987=this[_0x243052(0x13c)][_0x243052(0x1fa)](T);return(_0x45629d=_0x3e1987==null?void 0x0:_0x3e1987[_0x243052(0x1e6)])==null?_0x243052(0x34c):_0x45629d;}async[_0x393dbe(0x18b)](_0x5a13a1,_0x3c9caf){const _0x5d02ac=_0x393dbe;let _0x4c8011='/universer-api/snapshot/'+_0x3c9caf[_0x5d02ac(0x353)]+'/unit/'+_0x3c9caf[_0x5d02ac(0x165)]+'/resources';return(await this[_0x5d02ac(0x20c)][_0x5d02ac(0x202)](_0x4c8011,{'params':{'resourceId':JSON['stringify'](_0x3c9caf[_0x5d02ac(0x2e1)])}}))[_0x5d02ac(0x2f8)];}[_0x393dbe(0x12a)](){const _0x17545a=_0x393dbe;throw Error(_0x17545a(0x174));}[_0x393dbe(0x244)](){const _0x165c26=_0x393dbe;throw Error(_0x165c26(0x174));}[_0x393dbe(0x1c0)](){const _0x36e98a=_0x393dbe;throw Error(_0x36e98a(0x174));}[_0x393dbe(0x214)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x393dbe(0x2cf)](){const _0xe03064=_0x393dbe;throw Error(_0xe03064(0x174));}['getLatestCsReqIdBySid'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}};Z=y([v(0x0,t['IConfigService']),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(c[_0x393dbe(0x129)]))],Z);let Q=class extends t[_0x393dbe(0x37f)]{constructor(_0x190759,_0x115833,_0xea72f9,_0x3c9a3c,_0x141983){const _0x3b4a1e=_0x393dbe;super(_0x190759,_0x115833,_0xea72f9),this['_transformService']=_0x3c9a3c,this[_0x3b4a1e(0x253)]=_0x141983;}[_0x393dbe(0x35c)](_0x5c06d7,_0x176fc6){const _0x228254=_0x393dbe;let _0x18003d=this['_getUndoStack'](_0x5c06d7);if(_0x18003d)try{let _0x5a71d9=this[_0x228254(0x15b)](_0x18003d,_0x176fc6);this[_0x228254(0x154)](_0x5c06d7,_0x5a71d9);}catch(_0x21c69d){this[_0x228254(0x253)][_0x228254(0x23f)](_0x228254(0x300),_0x21c69d),this[_0x228254(0x16e)](_0x5c06d7);}let _0x4351f7=this['_getRedoStack'](_0x5c06d7);if(_0x4351f7)try{let _0x20a606=this['_transformStack'](_0x4351f7,_0x176fc6);this[_0x228254(0x2ad)](_0x5c06d7,_0x20a606);}catch(_0x39923c){this[_0x228254(0x253)]['error'](_0x39923c),this[_0x228254(0xe6)](_0x5c06d7);}}[_0x393dbe(0x16e)](_0x369dab){const _0x2ee746=_0x393dbe;let _0x191e9d=this[_0x2ee746(0x1f7)](_0x369dab);_0x191e9d&&(_0x191e9d['length']=0x0,this[_0x2ee746(0x1d0)]());}[_0x393dbe(0xe6)](_0x577473){const _0x392215=_0x393dbe;let _0x33c426=this[_0x392215(0x283)](_0x577473);_0x33c426&&(_0x33c426['length']=0x0,this[_0x392215(0x1d0)]());}['_substituteUndoStack'](_0x2df666,_0x26b7e0){const _0x450932=_0x393dbe;this[_0x450932(0x1cf)]['set'](_0x2df666,_0x26b7e0),this[_0x450932(0x1d0)]();}['_substituteRedoStack'](_0x490c58,_0x267020){const _0x35de8d=_0x393dbe;this[_0x35de8d(0x149)]['set'](_0x490c58,_0x267020),this[_0x35de8d(0x1d0)]();}[_0x393dbe(0x15b)](_0x842a09,_0x332bdf){const _0x1ff737=_0x393dbe;let _0x1f5810=[],_0x137021=_0x332bdf,_0x38cb82=_0x332bdf;for(let _0x395873=_0x842a09[_0x1ff737(0x176)]-0x1;_0x395873>=0x0;_0x395873--){let {unitID:_0x15341a,undoMutations:_0x59227c,redoMutations:_0x7532d7}=_0x842a09[_0x395873],_0x13234d=this[_0x1ff737(0x20d)]['transformMutationsWithChangeset'](_0x137021,_0x59227c),_0x110284=this[_0x1ff737(0x20d)][_0x1ff737(0x14a)](_0x38cb82,_0x7532d7);if((0x0,e[_0x1ff737(0x2a2)])(_0x13234d)||(0x0,e[_0x1ff737(0x2a2)])(_0x110284)){this[_0x1ff737(0x253)]['error'](_0x1ff737(0x300),_0x1ff737(0x15a),_0x13234d,_0x110284);break;}_0x137021=_0x13234d[_0x1ff737(0x137)],_0x38cb82=_0x110284[_0x1ff737(0x137)],_0x1f5810[_0x1ff737(0x1f8)]({'unitID':_0x15341a,'undoMutations':_0x13234d[_0x1ff737(0x36d)],'redoMutations':_0x110284[_0x1ff737(0x36d)]});}return _0x1f5810[_0x1ff737(0x1dd)]();}};Q=y([v(0x0,t[_0x393dbe(0x396)]),v(0x1,t[_0x393dbe(0x1ee)]),v(0x2,t[_0x393dbe(0x291)]),v(0x3,e[_0x393dbe(0x268)]),v(0x4,t[_0x393dbe(0x351)])],Q);let $=class extends t[_0x393dbe(0x17e)]{constructor(_0x5de15c={},_0x5490d7,_0x15d17a,_0x2a8a60){const _0x32d0bc=_0x393dbe;super(),this['_config']=_0x5de15c,this['_logService']=_0x5490d7,this[_0x32d0bc(0x126)]=_0x15d17a,this[_0x32d0bc(0x13c)]=_0x2a8a60;let {..._0x540c6b}=(0x0,t['merge'])({},de,_0x5de15c);if(!_0x540c6b[_0x32d0bc(0x12b)])throw Error('[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!');this[_0x32d0bc(0x375)]=_0x540c6b,this[_0x32d0bc(0x13c)][_0x32d0bc(0x2ee)](T,_0x540c6b);}[_0x393dbe(0x357)](){const _0xed2abf=_0x393dbe;this[_0xed2abf(0x1e3)](),this[_0xed2abf(0x156)]();}[_0x393dbe(0x1e3)](){const _0x545ddc=_0x393dbe;var _0x3edd82,_0x2fdad5;this['_injector'][_0x545ddc(0x391)](t[_0x545ddc(0x18f)])&&this['_logService'][_0x545ddc(0x23f)](_0x545ddc(0x384),_0x545ddc(0x19f));let _0x5b8415=(0x0,t['mergeOverrideWithDependencies'])([[t[_0x545ddc(0x18f)],{'useClass':Q}],[H],[b],[C],[W],[K],[ie],[X],[_],[q],[B,{'useClass':this['_config'][_0x545ddc(0x12b)]}],[e[_0x545ddc(0x235)],{'useClass':Z}],[t[_0x545ddc(0x2e0)],{'useClass':G}],[u['IImageIoService'],{'useClass':J}],[t[_0x545ddc(0x335)],{'useClass':Y}],[U],[Me]],(_0x3edd82=this[_0x545ddc(0x375)])==null?void 0x0:_0x3edd82[_0x545ddc(0x376)]);if(!((_0x2fdad5=this[_0x545ddc(0x375)])!=null&&_0x2fdad5[_0x545ddc(0x21d)])){let _0x21d33b=_0x5b8415['findIndex'](([_0x1746ac])=>_0x1746ac===w);_0x21d33b!==-0x1&&_0x5b8415['splice'](_0x21d33b,0x1);}(0x0,t[_0x545ddc(0x10d)])(this[_0x545ddc(0x126)],_0x5b8415);}[_0x393dbe(0x156)](){const _0xf44221=_0x393dbe;var _0x5b62e3,_0x73ec9b;if(this[_0xf44221(0x126)][_0xf44221(0x202)](c[_0xf44221(0x129)])[_0xf44221(0x2a0)]({'priority':0x14,'interceptor':(0x0,c[_0xf44221(0x127)])({'maxParallel':0x6})}),!((_0x5b62e3=this[_0xf44221(0x375)])!=null&&_0x5b62e3[_0xf44221(0x136)])){var _0x5252a4;(_0x5252a4=this[_0xf44221(0x126)]['get'](S,t[_0xf44221(0x206)]['OPTIONAL']))==null||_0x5252a4[_0xf44221(0xfe)]();}(_0x73ec9b=this[_0xf44221(0x375)])!=null&&_0x73ec9b[_0xf44221(0x106)]&&(0x0,t[_0xf44221(0x224)])(this[_0xf44221(0x126)],[[W]]),(0x0,t[_0xf44221(0x224)])(this['_injector'],[[K],[U],[X]]);}};g($,_0x393dbe(0x29c),_0x393dbe(0x11f)),g($,_0x393dbe(0x3bf),Ae),g($,_0x393dbe(0x168),je),$=y([(0x0,t[_0x393dbe(0x166)])(l[_0x393dbe(0x302)],e[_0x393dbe(0x21f)],c[_0x393dbe(0x3a0)]),v(0x1,t[_0x393dbe(0x351)]),v(0x2,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x3,t[_0x393dbe(0x14f)])],$),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x2fe),{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x208),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x178),{'enumerable':!0x0,'get':function(){return N;}}),exports['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']=T,Object['defineProperty'](exports,'CollaborationController',{'enumerable':!0x0,'get':function(){return U;}}),Object['defineProperty'](exports,_0x393dbe(0x1e5),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x2b7),{'enumerable':!0x0,'get':function(){return J;}}),Object['defineProperty'](exports,_0x393dbe(0xf6),{'enumerable':!0x0,'get':function(){return x;}}),Object[_0x393dbe(0x255)](exports,'CollaborationSessionService',{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x39c),{'enumerable':!0x0,'get':function(){return V;}}),exports[_0x393dbe(0x213)]=Se,exports[_0x393dbe(0x2c6)]=re,exports[_0x393dbe(0x195)]=_,Object[_0x393dbe(0x255)](exports,_0x393dbe(0x200),{'enumerable':!0x0,'get':function(){return Q;}}),exports['CommentService']=ie,Object['defineProperty'](exports,_0x393dbe(0x2a8),{'enumerable':!0x0,'get':function(){return P;}}),exports[_0x393dbe(0x350)]=p,exports[_0x393dbe(0x18e)]=_0x393dbe(0x1a8),exports[_0x393dbe(0x10f)]='/universer-api/user/session-ticket',Object[_0x393dbe(0x255)](exports,_0x393dbe(0xef),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x39d),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x393dbe(0x255)](exports,'FetchingMissState',{'enumerable':!0x0,'get':function(){return I;}}),exports[_0x393dbe(0x2c1)]=_0x393dbe(0x330),exports[_0x393dbe(0x383)]=_0x393dbe(0x338),exports['ICollaborationSocketService']=B,exports[_0x393dbe(0x29d)]=S,exports[_0x393dbe(0x141)]=Ee,exports[_0x393dbe(0x399)]=w,exports['LOCAL_CACHE_INTERVAL']=0x3e8,exports['LOCAL_CACHE_INTERVAL_KEY']=_0x393dbe(0x358),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x19c),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x355),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x258),{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x393dbe(0x255)](exports,'PendingState',{'enumerable':!0x0,'get':function(){return j;}}),exports['REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY']=_0x393dbe(0x339),exports[_0x393dbe(0x30c)]=_0x393dbe(0x2b3),exports[_0x393dbe(0x27f)]=oe,Object[_0x393dbe(0x255)](exports,_0x393dbe(0x2a4),{'enumerable':!0x0,'get':function(){return z;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x3b3),{'enumerable':!0x0,'get':function(){return C;}}),Object['defineProperty'](exports,_0x393dbe(0x327),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x36b),{'enumerable':!0x0,'get':function(){return A;}}),exports[_0x393dbe(0x147)]=ue,Object[_0x393dbe(0x255)](exports,_0x393dbe(0x37e),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x393dbe(0x1ec)]=De,exports[_0x393dbe(0xea)]=ce,exports[_0x393dbe(0x301)]=Oe;
1
+ const _0x2b4704=_0x2cb1;(function(_0x479c32,_0x1ae562){const _0x30dbf9=_0x2cb1,_0x221c79=_0x479c32();while(!![]){try{const _0x517909=parseInt(_0x30dbf9(0x1cf))/0x1+parseInt(_0x30dbf9(0x355))/0x2+-parseInt(_0x30dbf9(0x254))/0x3+parseInt(_0x30dbf9(0xfe))/0x4*(parseInt(_0x30dbf9(0x272))/0x5)+parseInt(_0x30dbf9(0x353))/0x6*(-parseInt(_0x30dbf9(0x218))/0x7)+-parseInt(_0x30dbf9(0x1c0))/0x8+-parseInt(_0x30dbf9(0x1c4))/0x9*(-parseInt(_0x30dbf9(0x29d))/0xa);if(_0x517909===_0x1ae562)break;else _0x221c79['push'](_0x221c79['shift']());}catch(_0x56c7fa){_0x221c79['push'](_0x221c79['shift']());}}}(_0x637e,0x27694),Object['defineProperty'](exports,Symbol[_0x2b4704(0x34b)],{'value':_0x2b4704(0x379)}));let e=require('@univerjs-pro/bases'),t=require('@univerjs-pro/collaboration'),n=require('@univerjs/core'),r=require('@univerjs/docs'),i=require('@univerjs/sheets'),a=require('rxjs'),o=require('@univerjs/protocol'),s=require('@univerjs/telemetry'),c=require('rxjs/operators'),l=require('@univerjs-pro/slides'),u=require('@univerjs/network'),d=require('@univerjs-pro/license'),f=require('@univerjs/drawing'),p=require('@noble/ciphers/aes.js'),m=require('@noble/ciphers/utils.js');const h=_0x2b4704(0x3a2),ee={},te=_0x2b4704(0x368),ne=0x4e20;function re(_0x1c1cc8){const _0x5468bf=_0x2b4704;return JSON['stringify'](_0x1c1cc8)[_0x5468bf(0x2f8)];}function g(_0x263d20){'@babel/helpers - typeof';const _0x517c0d=_0x2b4704;return g=typeof Symbol==_0x517c0d(0x331)&&typeof Symbol[_0x517c0d(0x29c)]==_0x517c0d(0x201)?function(_0x1d43de){return typeof _0x1d43de;}:function(_0x482fc1){const _0x7c93d1=_0x517c0d;return _0x482fc1&&typeof Symbol=='function'&&_0x482fc1[_0x7c93d1(0x3ca)]===Symbol&&_0x482fc1!==Symbol[_0x7c93d1(0x398)]?_0x7c93d1(0x201):typeof _0x482fc1;},g(_0x263d20);}function ie(_0x2a869d,_0x24e809){const _0x311bc0=_0x2b4704;if(g(_0x2a869d)!=_0x311bc0(0x1ed)||!_0x2a869d)return _0x2a869d;var _0x2ae8ca=_0x2a869d[Symbol['toPrimitive']];if(_0x2ae8ca!==void 0x0){var _0x49292f=_0x2ae8ca[_0x311bc0(0x2ec)](_0x2a869d,_0x24e809||_0x311bc0(0x2b7));if(g(_0x49292f)!=_0x311bc0(0x1ed))return _0x49292f;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x24e809===_0x311bc0(0x2e4)?String:Number)(_0x2a869d);}function ae(_0x55b71a){const _0x404ef8=_0x2b4704;var _0x5bb40b=ie(_0x55b71a,_0x404ef8(0x2e4));return g(_0x5bb40b)==_0x404ef8(0x201)?_0x5bb40b:_0x5bb40b+'';}function _(_0x525046,_0x210102,_0x154cdf){const _0x462203=_0x2b4704;return(_0x210102=ae(_0x210102))in _0x525046?Object[_0x462203(0x1dd)](_0x525046,_0x210102,{'value':_0x154cdf,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x525046[_0x210102]=_0x154cdf,_0x525046;}let oe=function(_0xea991){const _0x3e3371=_0x2b4704;return _0xea991[_0x3e3371(0x1ad)]=_0x3e3371(0x1ad),_0xea991[_0x3e3371(0x38b)]=_0x3e3371(0x38b),_0xea991[_0x3e3371(0x139)]=_0x3e3371(0x139),_0xea991[_0x3e3371(0x176)]=_0x3e3371(0x176),_0xea991[_0x3e3371(0x20d)]=_0x3e3371(0x20d),_0xea991[_0x3e3371(0x1e9)]=_0x3e3371(0x1e9),_0xea991[_0x3e3371(0x16b)]='SOCKET_FAILED',_0xea991[_0x3e3371(0x1fd)]=_0x3e3371(0x1fd),_0xea991;}({});var v=class{constructor(){const _0x4f588a=_0x2b4704;_(this,'_event$',new a[(_0x4f588a(0x119))]()),_(this,'event$',this['_event$']['asObservable']());}[_0x2b4704(0x2b4)](_0x1fce5d){const _0x5b5cf2=_0x2b4704;this[_0x5b5cf2(0x34e)][_0x5b5cf2(0x383)](_0x1fce5d);}},se=class{constructor(){const _0xb6b530=_0x2b4704;_(this,_0xb6b530(0x25f),new a['Subject']()),_(this,_0xb6b530(0x2ca),this[_0xb6b530(0x25f)][_0xb6b530(0x171)]());}[_0x2b4704(0xf6)](_0x5ca40f){const _0x2fbfdc=_0x2b4704;this[_0x2fbfdc(0x25f)][_0x2fbfdc(0x383)](_0x5ca40f);}};function y(_0x365fa1,_0x3286ba){return function(_0x4ab5fc,_0x1bc8ab){_0x3286ba(_0x4ab5fc,_0x1bc8ab,_0x365fa1);};}function b(_0x4270dd,_0x416128,_0xd25ae,_0x49c0e2){const _0x5bc42d=_0x2b4704;var _0x14308e=arguments[_0x5bc42d(0x2f8)],_0x33d712=_0x14308e<0x3?_0x416128:_0x49c0e2===null?_0x49c0e2=Object['getOwnPropertyDescriptor'](_0x416128,_0xd25ae):_0x49c0e2,_0x5972fb;if(typeof Reflect==_0x5bc42d(0x1ed)&&typeof Reflect[_0x5bc42d(0x25c)]==_0x5bc42d(0x331))_0x33d712=Reflect[_0x5bc42d(0x25c)](_0x4270dd,_0x416128,_0xd25ae,_0x49c0e2);else{for(var _0x4c7140=_0x4270dd[_0x5bc42d(0x2f8)]-0x1;_0x4c7140>=0x0;_0x4c7140--)(_0x5972fb=_0x4270dd[_0x4c7140])&&(_0x33d712=(_0x14308e<0x3?_0x5972fb(_0x33d712):_0x14308e>0x3?_0x5972fb(_0x416128,_0xd25ae,_0x33d712):_0x5972fb(_0x416128,_0xd25ae))||_0x33d712);}return _0x14308e>0x3&&_0x33d712&&Object[_0x5bc42d(0x1dd)](_0x416128,_0xd25ae,_0x33d712),_0x33d712;}let x=class extends n[_0x2b4704(0x274)]{constructor(_0x1664c6,_0x34e4cc){const _0x4556fd=_0x2b4704;super(),this[_0x4556fd(0x2fb)]=_0x1664c6,this[_0x4556fd(0x3ad)]=_0x34e4cc,_(this,_0x4556fd(0x16e),new Map()),_(this,_0x4556fd(0x285),new a[(_0x4556fd(0x119))]()),this[_0x4556fd(0x115)]((0x0,a['merge'])(this['_univerInstanceService'][_0x4556fd(0x1a6)](n[_0x4556fd(0x372)][_0x4556fd(0x375)])[_0x4556fd(0x200)]((0x0,c[_0x4556fd(0x2c1)])(_0x5b4376=>_0x5b4376['getUnitId']())),this[_0x4556fd(0x2fb)]['getTypeOfUnitDisposed$'](n[_0x4556fd(0x372)][_0x4556fd(0x299)])[_0x4556fd(0x200)]((0x0,c[_0x4556fd(0x2c1)])(_0x4fc479=>_0x4fc479[_0x4556fd(0x17c)]())),this[_0x4556fd(0x2fb)]['getTypeOfUnitDisposed$'](n[_0x4556fd(0x372)][_0x4556fd(0x288)])['pipe']((0x0,c[_0x4556fd(0x2c1)])(_0x307b8f=>_0x307b8f[_0x4556fd(0x17c)]())))[_0x4556fd(0x169)](_0x24eed4=>this['_removeRoom'](_0x24eed4)));}[_0x2b4704(0x1ee)](_0x5f257c){const _0x1cf0e2=_0x2b4704;return this[_0x1cf0e2(0x16e)][_0x1cf0e2(0x1ae)](_0x5f257c)?(0x0,a['of'])(this[_0x1cf0e2(0x16e)][_0x1cf0e2(0x287)](_0x5f257c)):this[_0x1cf0e2(0x285)][_0x1cf0e2(0x200)]((0x0,c[_0x1cf0e2(0x2c1)])(_0x43663a=>{const _0x4efcec=_0x1cf0e2;if(_0x43663a===_0x5f257c)return this[_0x4efcec(0x16e)][_0x4efcec(0x287)](_0x43663a);}));}['setCurrentUser'](_0x31a05c){const _0x466bdb=_0x2b4704;this[_0x466bdb(0x3ad)]['setCurrentUser'](_0x31a05c);}[_0x2b4704(0x39b)](){const _0x3ae217=_0x2b4704;return this[_0x3ae217(0x3ad)]['getCurrentUser']();}[_0x2b4704(0x295)](_0x1f34ec,_0x2c9e48){const _0x4b4cf4=_0x2b4704;let _0x2d760f=this['_roomMembers']['get'](_0x1f34ec);_0x2d760f||(_0x2d760f=new ce(),this[_0x4b4cf4(0x16e)][_0x4b4cf4(0x399)](_0x1f34ec,_0x2d760f),this['_roomCreated$']['next'](_0x1f34ec)),_0x2d760f['updateMember'](_0x2c9e48);}[_0x2b4704(0x396)](_0x2c7b72,_0x3edd58){const _0x564270=_0x2b4704;let _0x46efd5=this[_0x564270(0x16e)]['get'](_0x2c7b72);_0x46efd5&&_0x46efd5[_0x564270(0x396)](_0x3edd58);}[_0x2b4704(0x188)](_0x5e3df2){const _0xca133a=_0x2b4704;return this[_0xca133a(0x16e)]['get'](_0x5e3df2);}[_0x2b4704(0x2da)](_0x3f1729,_0x20b784){const _0x1a00d3=_0x2b4704;let _0x12a9db=this[_0x1a00d3(0x16e)][_0x1a00d3(0x287)](_0x3f1729);if(_0x12a9db)return _0x12a9db['getMember'](_0x20b784);}['_removeRoom'](_0x5b57b7){const _0xba99a=_0x2b4704;let _0x4c6169=this[_0xba99a(0x16e)][_0xba99a(0x287)](_0x5b57b7);_0x4c6169&&(_0x4c6169[_0xba99a(0x2cf)](),this[_0xba99a(0x16e)][_0xba99a(0x31e)](_0x5b57b7));}['dispose'](){const _0x478d8d=_0x2b4704;this[_0x478d8d(0x16e)][_0x478d8d(0x24e)](_0x477941=>_0x477941['dispose']()),this[_0x478d8d(0x16e)][_0x478d8d(0x2de)](),this[_0x478d8d(0x285)]['complete']();}};x=b([y(0x0,n['IUniverInstanceService']),y(0x1,(0x0,n[_0x2b4704(0x1ce)])(n['UserManagerService']))],x);var ce=class extends n[_0x2b4704(0x274)]{constructor(..._0x2cd810){const _0x4ffd81=_0x2b4704;super(..._0x2cd810),_(this,_0x4ffd81(0x3a3),new Map()),_(this,'_members$',new a[(_0x4ffd81(0x367))](this[_0x4ffd81(0x3a3)])),_(this,'members$',this['_members$'][_0x4ffd81(0x171)]());}[_0x2b4704(0x2cf)](){const _0x40b64c=_0x2b4704;this[_0x40b64c(0x3a3)][_0x40b64c(0x2de)](),this[_0x40b64c(0x2c4)][_0x40b64c(0x391)]();}[_0x2b4704(0x295)](_0x3ad6e2){const _0x50107a=_0x2b4704;this['_members'][_0x50107a(0x399)](_0x3ad6e2['memberID'],_0x3ad6e2),this[_0x50107a(0x102)]();}[_0x2b4704(0x396)](_0xbb2626){const _0x1817d9=_0x2b4704;this[_0x1817d9(0x3a3)][_0x1817d9(0x31e)](_0xbb2626),this[_0x1817d9(0x102)]();}['getMember'](_0x35c75d){const _0x51e3a4=_0x2b4704;return this[_0x51e3a4(0x3a3)][_0x51e3a4(0x287)](_0x35c75d);}[_0x2b4704(0x27d)](){const _0x3bdc8d=_0x2b4704;return Array[_0x3bdc8d(0x268)](this['_members'][_0x3bdc8d(0x1a1)]());}[_0x2b4704(0x102)](){const _0x5ed039=_0x2b4704;this['_members$'][_0x5ed039(0x383)](this[_0x5ed039(0x3a3)]);}};let le=function(_0x25c5b8){const _0x443a46=_0x2b4704;return _0x25c5b8[_0x25c5b8[_0x443a46(0x316)]=0x0]=_0x443a46(0x316),_0x25c5b8[_0x25c5b8[_0x443a46(0x302)]=0x1]=_0x443a46(0x302),_0x25c5b8[_0x25c5b8['OFFLINE']=0x2]=_0x443a46(0x19b),_0x25c5b8[_0x25c5b8['ONLINE']=0x3]=_0x443a46(0x26c),_0x25c5b8;}({});const ue={[o[_0x2b4704(0x371)][_0x2b4704(0x32d)]]:_0x2b4704(0xf9),[o[_0x2b4704(0x371)][_0x2b4704(0x128)]]:_0x2b4704(0x322),[o[_0x2b4704(0x371)][_0x2b4704(0x114)]]:'session.room-not-exists',[o[_0x2b4704(0x371)][_0x2b4704(0x3d1)]]:_0x2b4704(0x160),[o[_0x2b4704(0x371)][_0x2b4704(0x125)]]:'session.room-cnt-exceeds'};let S=class extends n[_0x2b4704(0x2a0)]{get[_0x2b4704(0x2db)](){const _0x316bb0=_0x2b4704;return this['_sessionStatus$'][_0x316bb0(0x19f)]();}constructor(_0x3bbedb,_0xa43219,_0x2f16fc,_0x49b2a6,_0x330095,_0x5163d4,_0x3d5811,_0x31648c){const _0x4efc7a=_0x2b4704;super(),this['_unitID']=_0x3bbedb,this[_0x4efc7a(0x35b)]=_0x2f16fc,this[_0x4efc7a(0x1d8)]=_0x49b2a6,this[_0x4efc7a(0xf5)]=_0x330095,this[_0x4efc7a(0x2a9)]=_0x5163d4,this['_collaborationUIEventService']=_0x3d5811,this[_0x4efc7a(0x2be)]=_0x31648c,_(this,_0x4efc7a(0x12f),new a['BehaviorSubject'](0x0)),_(this,_0x4efc7a(0x3d5),this[_0x4efc7a(0x12f)][_0x4efc7a(0x171)]()),_(this,_0x4efc7a(0x34e),new a[(_0x4efc7a(0x119))]()),_(this,'event$',this[_0x4efc7a(0x34e)][_0x4efc7a(0x171)]()),_(this,'_socket',void 0x0),_(this,_0x4efc7a(0x167),void 0x0),_(this,'_collaborationTimeoutTimer',void 0x0),_(this,_0x4efc7a(0x1e5),!0x1),_(this,_0x4efc7a(0x283),null),this[_0x4efc7a(0x1e5)]=!!this['_telemetryService'],_0xa43219[_0x4efc7a(0x200)]((0x0,a[_0x4efc7a(0x395)])(this[_0x4efc7a(0x37e)]))['subscribe'](_0x24a83c=>{const _0x2f978b=_0x4efc7a;if(_0x24a83c!==void 0x0){if(this['_socket']=_0x24a83c,_0x24a83c)this[_0x2f978b(0x16c)](_0x24a83c),this[_0x2f978b(0x167)]=_0x24a83c[_0x2f978b(0x35a)]['subscribe'](_0x58150e=>{const _0xafa371=_0x2f978b;_0x58150e[_0xafa371(0x224)]===this[_0xafa371(0x1b4)]&&this[_0xafa371(0x38a)](_0x58150e);});else{var _0x106a9b;this[_0x2f978b(0x214)](),this[_0x2f978b(0x12f)][_0x2f978b(0x383)](0x2),(_0x106a9b=this[_0x2f978b(0x167)])==null||_0x106a9b['unsubscribe'](),this[_0x2f978b(0x167)]=null;}}});}[_0x2b4704(0x145)](){const _0x17858a=_0x2b4704;var _0x3502df,_0x5a5d17;return(_0x3502df=(_0x5a5d17=this['_socket'])==null?void 0x0:_0x5a5d17[_0x17858a(0x303)])==null?null:_0x3502df;}[_0x2b4704(0x2cf)](){const _0x19fe5b=_0x2b4704;super[_0x19fe5b(0x2cf)](),this[_0x19fe5b(0x26d)](),this[_0x19fe5b(0x37e)][_0x19fe5b(0x383)](),this[_0x19fe5b(0x37e)]['complete']();}['close'](){const _0x53b15f=_0x2b4704;var _0x32d2f7,_0x931b7e;this[_0x53b15f(0x214)](),(_0x32d2f7=this[_0x53b15f(0x280)])==null||_0x32d2f7[_0x53b15f(0x3d4)]({'cmd':o[_0x53b15f(0x329)][_0x53b15f(0x2af)],'data':{'roomID':this[_0x53b15f(0x1b4)]}}),(_0x931b7e=this[_0x53b15f(0x280)])==null||_0x931b7e[_0x53b15f(0x26d)](),this['_event$'][_0x53b15f(0x391)](),this[_0x53b15f(0x12f)]['complete']();}['_onCombEvent'](_0xfed117){const _0x45cdae=_0x2b4704;_0xfed117['cmd']===o[_0x45cdae(0x329)][_0x45cdae(0x318)]?this[_0x45cdae(0x28c)](_0xfed117):_0xfed117[_0x45cdae(0x28f)]===o['CombCmd'][_0x45cdae(0x30d)]&&this['_onRecvEvent'](_0xfed117);}[_0x2b4704(0x16c)](_0xc8ad6b){const _0x3eae2e=_0x2b4704;this[_0x3eae2e(0x12f)][_0x3eae2e(0x383)](0x1),_0xc8ad6b['send']({'cmd':o[_0x3eae2e(0x329)][_0x3eae2e(0x318)],'routeKey':this[_0x3eae2e(0x1b4)],'routeType':'','data':{'rooms':[{'roomID':this[_0x3eae2e(0x1b4)]}]}});}[_0x2b4704(0x28c)](_0x2952ad){const _0x35ce00=_0x2b4704;var _0x12c7ec;if(_0x2952ad[_0x35ce00(0x1a4)]in ue){this[_0x35ce00(0x38e)][_0x35ce00(0x2b4)]({'id':'JOIN_ROOM_FAILED','data':ue[_0x2952ad[_0x35ce00(0x1a4)]]}),this['_sessionStatus$'][_0x35ce00(0x383)](0x2);return;}this[_0x35ce00(0x12f)][_0x35ce00(0x383)](0x3);let _0x21f9e6=(_0x12c7ec=_0x2952ad['data'][_0x35ce00(0x1f9)][this[_0x35ce00(0x1b4)]])==null?void 0x0:_0x12c7ec[_0x35ce00(0x3b4)];_0x21f9e6&&_0x21f9e6['forEach'](_0x51392e=>this['_memberService'][_0x35ce00(0x295)](this[_0x35ce00(0x1b4)],_0x51392e));}[_0x2b4704(0x2a2)](_0x434ca3){const _0x50c8c5=_0x2b4704;try{let _0x16db62=_0x434ca3[_0x50c8c5(0x27c)];switch(_0x16db62[_0x50c8c5(0x1da)]){case t[_0x50c8c5(0x30b)][_0x50c8c5(0x1a8)]:this[_0x50c8c5(0x32a)](_0x16db62),this[_0x50c8c5(0x34e)]['next'](_0x16db62);break;case t[_0x50c8c5(0x30b)][_0x50c8c5(0x35c)]:this['_onUserLeave'](_0x16db62),this[_0x50c8c5(0x34e)]['next'](_0x16db62);break;case t[_0x50c8c5(0x30b)][_0x50c8c5(0x221)]:case t[_0x50c8c5(0x30b)][_0x50c8c5(0x35d)]:this[_0x50c8c5(0x3c2)](),this[_0x50c8c5(0x14a)](),this[_0x50c8c5(0x34e)][_0x50c8c5(0x383)](_0x16db62);break;case t['CollaborationEvent'][_0x50c8c5(0x131)]:this['_logService'][_0x50c8c5(0x2b8)]('save\x20fail\x20reason\x20is\x20'+JSON['stringify'](_0x16db62)),this[_0x50c8c5(0x34e)]['next'](_0x16db62);break;case t['CollaborationEvent'][_0x50c8c5(0x257)]:this[_0x50c8c5(0x2a9)][_0x50c8c5(0xf6)](_0x16db62[_0x50c8c5(0x27c)]),this[_0x50c8c5(0x34e)][_0x50c8c5(0x383)](_0x16db62);break;default:this['_event$'][_0x50c8c5(0x383)](_0x16db62);}}catch(_0x426fee){this[_0x50c8c5(0x35b)]['error'](_0x426fee,_0x434ca3);}}[_0x2b4704(0x32a)](_0x6311b8){const _0xf6e164=_0x2b4704;this[_0xf6e164(0xf5)][_0xf6e164(0x295)](this[_0xf6e164(0x1b4)],_0x6311b8[_0xf6e164(0x27c)]);}[_0x2b4704(0x255)](_0x267255){const _0x2693d2=_0x2b4704;this[_0x2693d2(0xf5)]['removeMember'](this[_0x2693d2(0x1b4)],_0x267255[_0x2693d2(0x27c)]['memberID']);}async['send'](_0x4de12f,_0x2ae393){const _0x48b848=_0x2b4704;if(this[_0x48b848(0x2db)]!==0x3||!this[_0x48b848(0x280)])throw Error(_0x48b848(0x18b));try{_0x4de12f[_0x48b848(0x1da)]===t[_0x48b848(0x30b)][_0x48b848(0x30c)]&&(this[_0x48b848(0x26f)](),this[_0x48b848(0x2e5)](_0x4de12f)),this[_0x48b848(0x280)]['send']({'cmd':o[_0x48b848(0x329)][_0x48b848(0x2f6)],'routeKey':_0x2ae393,'routeType':'','data':_0x4de12f});}catch(_0x1b2c23){this[_0x48b848(0x35b)]['error'](_0x1b2c23);}}[_0x2b4704(0x26f)](){const _0x2c7e72=_0x2b4704;var _0x5bea09;this['_collaborationTimeoutTimer']=setTimeout(()=>{const _0x3f9ccd=_0x2cb1;this['_collaborationTimeoutTimer']=null,this[_0x3f9ccd(0x38e)][_0x3f9ccd(0x2b4)]({'id':_0x3f9ccd(0x1fd)});},(_0x5bea09=this[_0x2c7e72(0x1d8)][_0x2c7e72(0x18e)](_0x2c7e72(0x204)))==null?ne:_0x5bea09);}[_0x2b4704(0x14a)](){const _0x2e3955=_0x2b4704;this[_0x2e3955(0x2e8)]&&(clearTimeout(this[_0x2e3955(0x2e8)]),this['_collaborationTimeoutTimer']=null);}[_0x2b4704(0x2e5)](_0x4e6b2b){const _0xef854b=_0x2b4704;if(!this[_0xef854b(0x1e5)])return;let {data:_0x21a613}=_0x4e6b2b,{unitID:_0x40e7a7,changeset:_0x5c25d4}=_0x21a613,{mutations:_0x5c1c36,type:_0x2df20a}=_0x5c25d4;this[_0xef854b(0x283)]={'unitId':_0x40e7a7,'type':_0x2df20a,'startTime':performance[_0xef854b(0x3b8)](),'stopTime':0x0,'duration':0x0,'size':re(_0x5c1c36)};}['_stopTelemetryCollaborationNewChangeset'](){const _0x10723a=_0x2b4704;if(this['_shouldReportTelemetry']){if(!this[_0x10723a(0x283)]){this[_0x10723a(0x35b)][_0x10723a(0x2b8)](_0x10723a(0x3ab),'telemetry\x20info\x20is\x20not\x20initialized');return;}this[_0x10723a(0x283)][_0x10723a(0x16d)]=performance['now'](),this['_telemetryInfo'][_0x10723a(0x1b7)]=this[_0x10723a(0x283)][_0x10723a(0x16d)]-this[_0x10723a(0x283)][_0x10723a(0x350)],this[_0x10723a(0x2be)][_0x10723a(0x108)]('collaboration_new_changeset',this[_0x10723a(0x283)]),this[_0x10723a(0x283)]=null;}}[_0x2b4704(0x214)](){const _0x440c90=_0x2b4704;this[_0x440c90(0x283)]=null;}};S=b([y(0x2,n['ILogService']),y(0x3,n['IConfigService']),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(x)),y(0x5,(0x0,n[_0x2b4704(0x1ce)])(se)),y(0x6,(0x0,n[_0x2b4704(0x1ce)])(v)),y(0x7,(0x0,n[_0x2b4704(0x1d7)])(s[_0x2b4704(0x235)]))],S);const C=(0x0,n[_0x2b4704(0x1d9)])(_0x2b4704(0x24b));function de(_0x1f2e5b){const _0x401df4=_0x2b4704;return _0x401df4(0x135)+_0x1f2e5b;}function fe(_0x4ccd77){const _0x4923a6=_0x2b4704;let {unitID:_0x5de160,mutations:_0x5e3109}=_0x4ccd77;return{'unitId':_0x5de160,'subUnitId':_0x5e3109[_0x4923a6(0x2f8)]>0x0?_0x5e3109[0x0][_0x4923a6(0x3bf)]['subUnitId']:null};}let w=class{constructor(_0x2ea76a,_0x136913,_0x3f1831){const _0xa78678=_0x2b4704;this['_injector']=_0x2ea76a,this[_0xa78678(0x191)]=_0x136913,this[_0xa78678(0x2f4)]=_0x3f1831;}[_0x2b4704(0x33d)](_0x34cc4e){const _0x14185d=_0x2b4704;var _0x41e1ec,_0x32281c;let _0x4da88b=this['_injector']['get'](i[_0x14185d(0x2a6)]),{unitId:_0x56b6c8,subUnitId:_0x431643}=fe(_0x34cc4e),_0x3aca61=_0x4da88b==null?void 0x0:_0x4da88b[_0x14185d(0x2ce)](_0x56b6c8)[_0x14185d(0x3b3)](),_0x5a986a=(_0x41e1ec=this[_0x14185d(0x2f4)]['getUnit'](_0x56b6c8))==null||(_0x41e1ec=_0x41e1ec[_0x14185d(0x170)]())==null?void 0x0:_0x41e1ec[_0x14185d(0x217)]();if(_0x3aca61[_0x14185d(0x2f8)]===0x0||!_0x56b6c8||!_0x431643)return;let _0x46e6db=[{'id':i[_0x14185d(0x258)]['id'],'params':{'unitId':_0x56b6c8,'subUnitId':_0x5a986a,'selections':n[_0x14185d(0xf4)]['deepClone'](_0x3aca61)}}],_0x1dc792=this['_transformService'][_0x14185d(0x2c5)](_0x34cc4e,_0x46e6db);if(!(0x0,t[_0x14185d(0x3e0)])(_0x1dc792))throw _0x1dc792[_0x14185d(0x2b8)];let _0x53585e=(_0x32281c=_0x1dc792[_0x14185d(0x293)][0x0])==null||(_0x32281c=_0x32281c['params'])==null?void 0x0:_0x32281c['selections'];if(Array['isArray'](_0x53585e)&&_0x53585e['length']){if(_0x53585e['length']===_0x46e6db[0x0]['params'][_0x14185d(0x39d)][_0x14185d(0x2f8)]&&_0x53585e[_0x14185d(0x369)]((_0x80c64b,_0x3a5efd)=>n['Rectangle'][_0x14185d(0x3be)](_0x80c64b[_0x14185d(0x34c)],_0x46e6db[0x0][_0x14185d(0x3bf)][_0x14185d(0x39d)][_0x3a5efd]['range'])))return;this[_0x14185d(0x3de)]['get'](n[_0x14185d(0x378)])[_0x14185d(0x1f7)](i[_0x14185d(0x258)]['id'],{'unitId':_0x56b6c8,'subUnitId':_0x5a986a,'selections':_0x53585e});}}};w=b([y(0x0,(0x0,n['Inject'])(n[_0x2b4704(0x39f)])),y(0x1,t[_0x2b4704(0x109)]),y(0x2,n[_0x2b4704(0x3a9)])],w);const T=(0x0,n[_0x2b4704(0x1d9)])(_0x2b4704(0x364));let pe=function(_0xc59a3){const _0x2a4811=_0x2b4704;return _0xc59a3[_0xc59a3['NO_OTHER_CLIENTS_EDITING']=0x0]=_0x2a4811(0x374),_0xc59a3[_0xc59a3['OTHER_CLIENTS_EDITING']=0x1]=_0x2a4811(0x276),_0xc59a3;}({});function me(_0x2c89b2){const _0x218f6a=_0x2b4704;var _0x17b875;return!!((_0x17b875=_0x2c89b2[_0x218f6a(0x3bf)])!=null&&_0x17b875[_0x218f6a(0x236)]);}const he=new Set([i[_0x2b4704(0x154)]['id']]),ge=new Set([l[_0x2b4704(0x2ef)]['id'],l[_0x2b4704(0x2e6)]['id'],l[_0x2b4704(0x172)]['id'],l['RemoveSlidePageMutation']['id']]);function _e(_0x1554c9,_0x532489=he){const _0x48a187=_0x2b4704;let _0xd80c94=[];for(let _0x3065e5 of _0x1554c9){if(_0x532489[_0x48a187(0x1ae)](_0x3065e5['id'])){if(_0xd80c94[_0x48a187(0x2f8)]>0x0)break;_0xd80c94['push'](_0x3065e5);break;}if(me(_0x3065e5)){if(_0xd80c94[_0x48a187(0x2f8)]>0x0)break;_0xd80c94['push'](_0x3065e5);break;}_0xd80c94['push'](_0x3065e5);}return _0xd80c94;}function ve(_0x325c25,_0x452d38,_0x5d54d1,_0x4c1c37,_0x236c87){const _0x183d6f=_0x2b4704;var _0x250afd,_0x142e46,_0x46c213,_0x5b71f2;let _0x4431ab=_e(_0x325c25),_0x4967c0=(_0x250afd=(_0x142e46=_0x236c87['getCurrentUser']())==null?void 0x0:_0x142e46[_0x183d6f(0x17d)])==null?_0x183d6f(0x1a7):_0x250afd,_0x336b8b=(_0x46c213=(_0x5b71f2=_0x236c87[_0x183d6f(0x39b)]())==null?void 0x0:_0x5b71f2['memberID'])==null?_0x183d6f(0x1a7):_0x46c213;return{'changeset':{'unitID':_0x452d38,'type':(0x0,t['mapDocumentTypeToUniverInstanceType'])(_0x5d54d1['getUnitType'](_0x452d38)),'baseRev':_0x4c1c37[_0x183d6f(0x392)](_0x452d38),'revision':0x0,'userID':_0x4967c0,'memberID':_0x336b8b,'mutations':_0x4431ab},'pendingMutations':_0x325c25[_0x183d6f(0x17b)](_0x4431ab['length'])};}const ye=ve;function be(_0x284904,_0x5a67bd,_0x23093a,_0x3d6dcb,_0x1906a5){return ve(_0x284904,_0x5a67bd,_0x23093a,_0x3d6dcb,_0x1906a5);}function xe(_0xa73691,_0xc1a786,_0x5d0343,_0x22ba22,_0x5c66c9){const _0x2b3cbe=_0x2b4704;var _0x15d2dc,_0x36346e,_0xfa8852,_0x4ac93a;let _0x509859=_e(_0xa73691,ge),_0x2a1d83=(_0x15d2dc=(_0x36346e=_0x5c66c9[_0x2b3cbe(0x39b)]())==null?void 0x0:_0x36346e['userID'])==null?_0x2b3cbe(0x1a7):_0x15d2dc,_0xa44b0f=(_0xfa8852=(_0x4ac93a=_0x5c66c9[_0x2b3cbe(0x39b)]())==null?void 0x0:_0x4ac93a[_0x2b3cbe(0x303)])==null?_0x2b3cbe(0x1a7):_0xfa8852;return{'changeset':{'unitID':_0xc1a786,'type':(0x0,t[_0x2b3cbe(0x301)])(_0x5d0343[_0x2b3cbe(0x2f3)](_0xc1a786)),'baseRev':_0x22ba22[_0x2b3cbe(0x392)](_0xc1a786),'revision':0x0,'userID':_0x2a1d83,'memberID':_0xa44b0f,'mutations':_0x509859},'pendingMutations':_0xa73691[_0x2b3cbe(0x17b)](_0x509859[_0x2b3cbe(0x2f8)])};}function Se(_0x195131,_0x46de8b,_0x1d1e62,_0x578423,_0x4b117b){const _0x58074b=_0x2b4704;var _0x17f75d,_0x2cf81d,_0x3642a6,_0x517f08;let _0x4db231=_0x195131[_0x58074b(0x3af)]((_0x2c2fbf,_0xca82d8)=>{const _0x433528=_0x58074b;let _0x3cb466=_0x2c2fbf[_0x2c2fbf[_0x433528(0x2f8)]-0x1],{id:_0x35728d}=_0x3cb466==null?{}:_0x3cb466,{id:_0x53a58c,type:_0x3d0e07}=_0xca82d8,_0x21bd97=_0xca82d8[_0x433528(0x3bf)];if(_0x35728d&&_0x35728d!==_0x53a58c)throw Error(_0x433528(0x2f7)+_0x35728d+_0x433528(0x3cd)+_0x53a58c+'.');if(!_0x3cb466)return[{'id':_0x53a58c,'type':_0x3d0e07,'params':{'unitId':_0x21bd97['unitId'],'textRanges':_0x21bd97[_0x433528(0x386)],'actions':_0x21bd97[_0x433528(0x133)]}}];let _0x4c495b=_0x3cb466[_0x433528(0x3bf)];return Ce(_0x4c495b[_0x433528(0x133)],_0x21bd97[_0x433528(0x133)])?[..._0x2c2fbf[_0x433528(0x17b)](0x0,-0x1),{..._0x3cb466,'id':_0x53a58c,'type':_0x3d0e07,'params':{'unitId':_0x21bd97['unitId'],'textRanges':_0x21bd97[_0x433528(0x386)],'actions':n[_0x433528(0x239)][_0x433528(0x223)](_0x4c495b[_0x433528(0x133)],_0x21bd97['actions'])}}]:[..._0x2c2fbf,{'id':_0x53a58c,'type':_0x3d0e07,'params':{'unitId':_0x21bd97['unitId'],'textRanges':_0x21bd97[_0x433528(0x386)],'actions':_0x21bd97[_0x433528(0x133)]}}];},[]),_0x46966f=(_0x17f75d=(_0x2cf81d=_0x4b117b[_0x58074b(0x39b)]())==null?void 0x0:_0x2cf81d[_0x58074b(0x17d)])==null?_0x58074b(0x1a7):_0x17f75d,_0x3a4877=(_0x3642a6=(_0x517f08=_0x4b117b[_0x58074b(0x39b)]())==null?void 0x0:_0x517f08['memberID'])==null?_0x58074b(0x1a7):_0x3642a6;return{'changeset':{'unitID':_0x46de8b,'type':(0x0,t[_0x58074b(0x301)])(_0x1d1e62[_0x58074b(0x2f3)](_0x46de8b)),'baseRev':_0x578423[_0x58074b(0x392)](_0x46de8b),'revision':0x0,'userID':_0x46966f,'memberID':_0x3a4877,'mutations':_0x4db231},'pendingMutations':_0x195131[_0x58074b(0x17b)](_0x195131[_0x58074b(0x2f8)])};}function Ce(_0x76b0bd,_0x45c4cd){return we(_0x76b0bd)&&we(_0x45c4cd)&&!Te(_0x76b0bd)&&!Te(_0x45c4cd);}function we(_0x1e38ef){const _0x52d012=_0x2b4704;return Ee(_0x1e38ef)[_0x52d012(0x25a)](_0x1f1962=>De(_0x1f1962)&&_0x1f1962['et']===_0x52d012(0x1aa));}function Te(_0x5c5d2f){const _0x539ab0=_0x2b4704;return Ee(_0x5c5d2f)[_0x539ab0(0x25a)](_0x173307=>Array[_0x539ab0(0x344)](_0x173307)||typeof _0x173307==_0x539ab0(0x2e4)||typeof _0x173307==_0x539ab0(0x1b1));}function Ee(_0x1fdc6a){const _0x1f9a05=_0x2b4704;if(!Array[_0x1f9a05(0x344)](_0x1fdc6a))return[];let _0x314e89=_0x1fdc6a['includes'](_0x1f9a05(0x1df))?_0x1fdc6a:_0x1fdc6a['find'](_0x540c6b=>Array[_0x1f9a05(0x344)](_0x540c6b)&&_0x540c6b['includes'](_0x1f9a05(0x1df)));if(!Array[_0x1f9a05(0x344)](_0x314e89))return[];let _0x239166=_0x314e89[_0x1f9a05(0x190)]('body');return _0x239166===-0x1?[]:_0x314e89[_0x1f9a05(0x17b)](_0x239166+0x1);}function De(_0x2308ad){const _0x26fa6d=_0x2b4704;return typeof _0x2308ad==_0x26fa6d(0x1ed)&&!!_0x2308ad&&!Array[_0x26fa6d(0x344)](_0x2308ad);}function Oe(_0x5a0591,_0x42565e){const _0x36dfa2=_0x2b4704;let _0x32da4d=new a[(_0x36dfa2(0x1ec))](0x1);return setTimeout(()=>_0x32da4d[_0x36dfa2(0x383)](_0x42565e),_0x5a0591),_0x32da4d[_0x36dfa2(0x171)]()[_0x36dfa2(0x200)]((0x0,a[_0x36dfa2(0x346)])(0x1));}var E,D,O;let ke=function(_0x2f6315){const _0x45e8be=_0x2b4704;return _0x2f6315[_0x45e8be(0x124)]=_0x45e8be(0x118),_0x2f6315[_0x45e8be(0x261)]=_0x45e8be(0x35f),_0x2f6315[_0x45e8be(0x29e)]='pending',_0x2f6315['AWAITING']=_0x45e8be(0x3e1),_0x2f6315['AWAITING_WITH_PENDING']=_0x45e8be(0x263),_0x2f6315['FETCH_MISS']=_0x45e8be(0x192),_0x2f6315[_0x45e8be(0x139)]='conflict',_0x2f6315['OFFLINE']=_0x45e8be(0x11e),_0x2f6315;}({});const Ae=0x4e20,je=0x2bf20;var k=class{constructor(_0x4d1f5a,_0x56ca2c,_0x3b593b,_0x17c597,_0x5b3d22,_0x5519e9,_0x4ecfe3,_0x59389f,_0x973e0f){const _0x3efb66=_0x2b4704;this['unitID']=_0x4d1f5a,this[_0x3efb66(0x15c)]=_0x56ca2c,this['_handler']=_0x5b3d22,this[_0x3efb66(0x340)]=_0x5519e9,this[_0x3efb66(0x13f)]=_0x4ecfe3,this[_0x3efb66(0x36f)]=_0x59389f,this[_0x3efb66(0x10b)]=_0x973e0f,_(this,_0x3efb66(0x3a8),null),_(this,_0x3efb66(0x377),[]),this['_awaitingChangeset']=_0x3b593b,this['_pendingMutations']=_0x17c597;}[_0x2b4704(0x27b)](_0x283619){const _0x4a5ff6=_0x2b4704;let _0x3b7203=this[_0x4a5ff6(0x36f)][_0x4a5ff6(0x392)](this[_0x4a5ff6(0x37b)]);return _0x283619[_0x4a5ff6(0x197)]>_0x3b7203+0x1?(this['_handler'][_0x4a5ff6(0x1af)]({'from':_0x3b7203,'to':_0x283619[_0x4a5ff6(0x197)]-0x1}),!0x0):!0x1;}[_0x2b4704(0x36a)](_0x5895e2){const _0x1518e8=_0x2b4704;this[_0x1518e8(0x13f)]['transformUndoRedo'](this[_0x1518e8(0x37b)],_0x5895e2);}[_0x2b4704(0x103)](_0x297265){const _0x563369=_0x2b4704;var _0x3d959c,_0x55fdf8;(_0x3d959c=(_0x55fdf8=this['_handler'])[_0x563369(0x2eb)])==null||_0x3d959c['call'](_0x55fdf8,_0x297265);}['_transformIMECache'](_0x426146){const _0x56fd6d=_0x2b4704;var _0x1743dd,_0x34c90e;return(_0x1743dd=(_0x34c90e=this[_0x56fd6d(0x123)])[_0x56fd6d(0x31b)])==null?void 0x0:_0x1743dd['call'](_0x34c90e,_0x426146);}[_0x2b4704(0x2c0)](_0x1a8932){const _0x58293b=_0x2b4704;var _0x1f883c,_0x24da1e;return(_0x1f883c=(_0x24da1e=this[_0x58293b(0x123)])[_0x58293b(0x120)])==null?void 0x0:_0x1f883c[_0x58293b(0x2ec)](_0x24da1e,_0x1a8932);}['_transformRemoteChangesetByIMECache'](_0x4eaff2){const _0x251b58=_0x2b4704;var _0x438ee5,_0x4c7faf,_0x208c91;return(_0x438ee5=(_0x4c7faf=(_0x208c91=this[_0x251b58(0x123)])[_0x251b58(0x319)])==null?void 0x0:_0x4c7faf[_0x251b58(0x2ec)](_0x208c91,_0x4eaff2))==null?_0x4eaff2:_0x438ee5;}[_0x2b4704(0xf2)](_0x217da4){const _0x3decbd=_0x2b4704;var _0x2918c1,_0x25e52e,_0x4f5656;return(_0x2918c1=(_0x25e52e=(_0x4f5656=this[_0x3decbd(0x123)])[_0x3decbd(0x365)])==null?void 0x0:_0x25e52e[_0x3decbd(0x2ec)](_0x4f5656,_0x217da4))==null?_0x217da4:_0x2918c1;}['_syncEditingCollabCursor'](_0x3602ea){const _0x2a179a=_0x2b4704;if(this[_0x2a179a(0x15c)]===n[_0x2a179a(0x372)][_0x2a179a(0x299)]){let {unitID:_0x3bb5e7,mutations:_0x2756eb,memberID:_0x2e7ea4}=_0x3602ea,_0x30d09f=_0x2756eb['length']>0x0?_0x2756eb[0x0][_0x2a179a(0x3bf)][_0x2a179a(0x386)]:[];if(Array[_0x2a179a(0x344)](_0x30d09f)&&_0x30d09f['length']>0x0){var _0x2c3376,_0x134b2d;(_0x2c3376=(_0x134b2d=this[_0x2a179a(0x123)])[_0x2a179a(0x2c8)])==null||_0x2c3376[_0x2a179a(0x2ec)](_0x134b2d,{'unitID':_0x3bb5e7,'memberID':_0x2e7ea4,'textRanges':_0x30d09f});}}}[_0x2b4704(0x2a8)](){const _0x187ce8=_0x2b4704;var _0x50b34d;(_0x50b34d=this[_0x187ce8(0x10b)])==null||_0x50b34d[_0x187ce8(0x33a)](this[_0x187ce8(0x37b)],this[_0x187ce8(0x15c)],this[_0x187ce8(0x3a8)],this[_0x187ce8(0x377)]);}[_0x2b4704(0x1f1)](){const _0x5d4e47=_0x2b4704;return this[_0x5d4e47(0x36f)][_0x5d4e47(0x392)](this[_0x5d4e47(0x37b)]);}[_0x2b4704(0xfd)](){const _0x5c67f0=_0x2b4704;this[_0x5c67f0(0x36f)][_0x5c67f0(0x1c8)](this['unitID']);}[_0x2b4704(0x2d0)](_0x3cd79f){const _0x25e5e9=_0x2b4704;let _0x4b6378=this[_0x25e5e9(0x2b9)](_0x3cd79f);_0x4b6378=this[_0x25e5e9(0xf2)](_0x4b6378);let _0x79593e=(0x0,n['sequenceExecute'])(_0x4b6378['mutations'],this['_commandService'],{'fromCollab':!0x0});if(!_0x79593e['result']){var _0x389845;throw _0x79593e[_0x25e5e9(0x2b8)]instanceof Error?_0x79593e[_0x25e5e9(0x2b8)]:Error((_0x389845=_0x79593e[_0x25e5e9(0x2b8)])==null?_0x25e5e9(0x382):_0x389845);}this[_0x25e5e9(0x2f1)](_0x4b6378),this[_0x25e5e9(0x2c0)](_0x4b6378),this[_0x25e5e9(0x36a)](_0x3cd79f),this[_0x25e5e9(0x103)](_0x4b6378),this[_0x25e5e9(0x326)](_0x4b6378),this[_0x25e5e9(0xfd)]();}};let A=class extends k{constructor(_0x463156,_0xbf87b6,_0x479d13,_0x3430db,_0x42162d,_0x378413,_0x347f16,_0x81a28c,_0x42e66d,_0x2cb88f){const _0x3353fe=_0x2b4704;super(_0x463156,_0xbf87b6,null,[],_0x479d13,_0x347f16,_0x378413,_0x3430db,_0x2cb88f),this['_injector']=_0x42162d,this[_0x3353fe(0x35b)]=_0x81a28c,this[_0x3353fe(0x191)]=_0x42e66d,this[_0x3353fe(0x3c0)]=_0x2cb88f,_(this,_0x3353fe(0x1a5),_0x3353fe(0x35f));}[_0x2b4704(0x2cd)](_0x51c9ea){const _0x337f19=_0x2b4704;let _0x2bd58a=this[_0x337f19(0x3de)][_0x337f19(0x2b6)](j,this[_0x337f19(0x37b)],this[_0x337f19(0x15c)],[_0x51c9ea],this[_0x337f19(0x123)]);return _0x2bd58a[_0x337f19(0x16f)](),_0x2bd58a[_0x337f19(0x2a8)](),_0x2bd58a;}[_0x2b4704(0x3b7)](_0x44e1e0){const _0x448e7d=_0x2b4704;if(this[_0x448e7d(0x27b)](_0x44e1e0))return this['_injector'][_0x448e7d(0x2b6)](I,this[_0x448e7d(0x37b)],this['type'],null,[],null,[_0x44e1e0],this[_0x448e7d(0x123)]);try{let _0x4ced4d=this[_0x448e7d(0x191)][_0x448e7d(0x2c5)](_0x44e1e0,[t[_0x448e7d(0x184)]]);if((0x0,t[_0x448e7d(0x3e0)])(_0x4ced4d)){let {c1Prime:_0x5f0b6b}=_0x4ced4d;return this[_0x448e7d(0x2d0)](_0x5f0b6b),this;}throw _0x4ced4d[_0x448e7d(0x2b8)];}catch(_0x1fabb5){return this[_0x448e7d(0x35b)][_0x448e7d(0x2b8)](_0x1fabb5),this[_0x448e7d(0x34f)](!0x1);}}[_0x2b4704(0x34f)](_0x273aa6){const _0x5451cc=_0x2b4704;return this[_0x5451cc(0x3de)][_0x5451cc(0x2b6)](P,this[_0x5451cc(0x37b)],this[_0x5451cc(0x15c)],null,[],this[_0x5451cc(0x123)],_0x273aa6);}[_0x2b4704(0x26e)](_0x7feda2){const _0x5a1ea5=_0x2b4704;if(_0x7feda2[_0x5a1ea5(0x197)]<=this[_0x5a1ea5(0x1f1)]())return this;throw Error(_0x5a1ea5(0x2b3));}[_0x2b4704(0x311)](){const _0x39d9ef=_0x2b4704;throw Error(_0x39d9ef(0x232));}[_0x2b4704(0x165)](){return this;}[_0x2b4704(0x282)](){const _0x3fdf7f=_0x2b4704;return this[_0x3fdf7f(0x3de)]['createInstance'](F,this[_0x3fdf7f(0x37b)],this[_0x3fdf7f(0x15c)],null,[],this[_0x3fdf7f(0x123)]);}[_0x2b4704(0x36e)](){return this;}[_0x2b4704(0x21a)](){throw Error('[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.');}['fetchMiss'](){const _0x448468=_0x2b4704;let _0x490def=this[_0x448468(0x36f)]['getCurrentRevOfUnit'](this['unitID']);return this[_0x448468(0x123)][_0x448468(0x1af)]({'from':_0x490def,'to':0x0}),this[_0x448468(0x3de)][_0x448468(0x2b6)](I,this[_0x448468(0x37b)],this[_0x448468(0x15c)],null,[],null,[],this[_0x448468(0x123)]);}};A=b([y(0x3,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x136)])),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(n['Injector'])),y(0x5,n['IUndoRedoService']),y(0x6,n[_0x2b4704(0x378)]),y(0x7,n[_0x2b4704(0x2ac)]),y(0x8,t[_0x2b4704(0x109)]),y(0x9,(0x0,n[_0x2b4704(0x1d7)])(C))],A);function _0x2cb1(_0x31d4bd,_0x23bf87){_0x31d4bd=_0x31d4bd-0xf2;const _0x637e5f=_0x637e();let _0x2cb1f9=_0x637e5f[_0x31d4bd];return _0x2cb1f9;}let j=E=class extends k{constructor(_0x125ae1,_0x4ba1ab,_0x1cddbf,_0x2d1f79,_0xdcee09,_0x429d3f,_0x276f5d,_0x51f338,_0x176c9b,_0x340c1c,_0x5bed31,_0x391e3f,_0x1f71bf,_0x306f83){const _0x1a2701=_0x2b4704;super(_0x125ae1,_0x4ba1ab,null,_0x1cddbf,_0x2d1f79,_0x176c9b,_0x1f71bf,_0x429d3f,_0x306f83),this['_injector']=_0xdcee09,this[_0x1a2701(0xf5)]=_0x276f5d,this['_logService']=_0x51f338,this[_0x1a2701(0x1d8)]=_0x340c1c,this['_transformService']=_0x5bed31,this[_0x1a2701(0x2fb)]=_0x391e3f,_(this,_0x1a2701(0x1a5),_0x1a2701(0x19a)),_(this,_0x1a2701(0x23b),null),_(this,'_sendingTimer',null);}[_0x2b4704(0x2cd)](_0x53e8b5){const _0x5ee3b0=_0x2b4704;return this[_0x5ee3b0(0x377)][_0x5ee3b0(0x384)](_0x53e8b5),this[_0x5ee3b0(0x2a8)](),this;}[_0x2b4704(0x3b7)](_0x4771bc){const _0xb72624=_0x2b4704;if(this[_0xb72624(0x27b)](_0x4771bc))return this[_0xb72624(0x2c6)](),this[_0xb72624(0x3de)][_0xb72624(0x2b6)](I,this['unitID'],this[_0xb72624(0x15c)],null,this[_0xb72624(0x377)],null,[_0x4771bc],this[_0xb72624(0x123)]);try{let _0x2d6160=this['_transformService'][_0xb72624(0x2c5)](_0x4771bc,this[_0xb72624(0x377)]);if((0x0,t[_0xb72624(0x3e0)])(_0x2d6160)){let {c1Prime:_0x5cadd0,m2Prime:_0x3f5569}=_0x2d6160;this['_executeRemoteChangeset'](_0x5cadd0);let _0x483a41=this[_0xb72624(0x3de)][_0xb72624(0x2b6)](E,this[_0xb72624(0x37b)],this[_0xb72624(0x15c)],_0x3f5569,this[_0xb72624(0x123)]);this[_0xb72624(0x2c6)]();let _0x352987=new Date()[_0xb72624(0x1c3)](),_0x25b5f4=this[_0xb72624(0x23b)]?Math[_0xb72624(0x24a)](this[_0xb72624(0x23b)]-_0x352987,0x0):this[_0xb72624(0x332)]();return _0x483a41[_0xb72624(0x16f)](_0x25b5f4),_0x483a41;}throw _0x2d6160['error'];}catch(_0x51f171){return this['_logService'][_0xb72624(0x2b8)](_0x51f171),this[_0xb72624(0x34f)](!0x1);}}[_0x2b4704(0x26e)](_0xb131bd){const _0x11f0c1=_0x2b4704;if(_0xb131bd[_0x11f0c1(0x197)]<=this[_0x11f0c1(0x1f1)]())return this;throw Error(_0x11f0c1(0x2d3));}[_0x2b4704(0x311)](){const _0x395b16=_0x2b4704;throw Error(_0x395b16(0x323));}[_0x2b4704(0x165)](){return this;}[_0x2b4704(0x282)](){const _0x532c8c=_0x2b4704;return this[_0x532c8c(0x2c6)](),this[_0x532c8c(0x3de)]['createInstance'](F,this[_0x532c8c(0x37b)],this[_0x532c8c(0x15c)],null,this[_0x532c8c(0x377)],this[_0x532c8c(0x123)]);}[_0x2b4704(0x36e)](){return this;}[_0x2b4704(0x16f)](_0x5c0081){const _0x1d0129=_0x2b4704;let _0x3b84a8=_0x5c0081==null?this[_0x1d0129(0x332)]():_0x5c0081;this[_0x1d0129(0x23b)]=new Date()[_0x1d0129(0x1c3)]()+_0x3b84a8,this['_sendingTimer']=setTimeout(()=>{const _0x5e535e=_0x1d0129;this[_0x5e535e(0x2c6)]();let _0x61c208=null;switch(this['type']){case n[_0x5e535e(0x372)][_0x5e535e(0x375)]:_0x61c208=ye(this['_pendingMutations'],this[_0x5e535e(0x37b)],this[_0x5e535e(0x2fb)],this[_0x5e535e(0x36f)],this[_0x5e535e(0xf5)]);break;case n['UniverInstanceType'][_0x5e535e(0x299)]:_0x61c208=this[_0x5e535e(0x377)][_0x5e535e(0x369)](_0x1a9691=>_0x1a9691['id']===r['RichTextEditingMutation']['id'])?Se(this[_0x5e535e(0x377)],this[_0x5e535e(0x37b)],this[_0x5e535e(0x2fb)],this[_0x5e535e(0x36f)],this[_0x5e535e(0xf5)]):ye(this[_0x5e535e(0x377)],this[_0x5e535e(0x37b)],this[_0x5e535e(0x2fb)],this[_0x5e535e(0x36f)],this[_0x5e535e(0xf5)]);break;case n['UniverInstanceType'][_0x5e535e(0x397)]:_0x61c208=xe(this['_pendingMutations'],this['unitID'],this[_0x5e535e(0x2fb)],this[_0x5e535e(0x36f)],this['_memberService']);break;case n[_0x5e535e(0x372)][_0x5e535e(0x288)]:_0x61c208=be(this[_0x5e535e(0x377)],this[_0x5e535e(0x37b)],this[_0x5e535e(0x2fb)],this['_revisionService'],this[_0x5e535e(0xf5)]);break;default:throw Error(_0x5e535e(0x3bd)+this['type']+'\x20in\x20_schedule.');}let {changeset:_0x20ecf0,pendingMutations:_0x2878ba}=_0x61c208;this[_0x5e535e(0x123)][_0x5e535e(0xf3)](_0x20ecf0);let _0x1af471=_0x2878ba['length']?this[_0x5e535e(0x3de)]['createInstance'](N,this['unitID'],this[_0x5e535e(0x15c)],_0x20ecf0,_0x2878ba,this[_0x5e535e(0x123)],void 0x0):this[_0x5e535e(0x3de)]['createInstance'](M,this[_0x5e535e(0x37b)],this[_0x5e535e(0x15c)],_0x20ecf0,this[_0x5e535e(0x123)]);_0x1af471['_updateLocalCache'](),this['_handler'][_0x5e535e(0x39e)](this,_0x1af471);},_0x3b84a8);}['_getSendChangesetTimeout'](){const _0xedb19d=_0x2b4704;var _0x411db8;let _0xe8d207=this['_configService'][_0xedb19d(0x18e)](h);return(_0x411db8=_0xe8d207==null?void 0x0:_0xe8d207[_0xedb19d(0x116)])==null?0x7d0:_0x411db8;}[_0x2b4704(0x21a)](){throw Error('[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.');}['_clearScheduledTask'](){const _0x4ee713=_0x2b4704;this[_0x4ee713(0x2ee)]!=null&&(clearTimeout(this[_0x4ee713(0x2ee)]),this['_sendingTimer']=null);}[_0x2b4704(0x34f)](_0x280c24){const _0x5ac98f=_0x2b4704;return this[_0x5ac98f(0x2c6)](),this['_injector']['createInstance'](P,this['unitID'],this[_0x5ac98f(0x15c)],null,this[_0x5ac98f(0x377)],this[_0x5ac98f(0x123)],_0x280c24);}};j=E=b([y(0x4,(0x0,n[_0x2b4704(0x1ce)])(n['Injector'])),y(0x5,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x136)])),y(0x6,(0x0,n[_0x2b4704(0x1ce)])(x)),y(0x7,n[_0x2b4704(0x2ac)]),y(0x8,n[_0x2b4704(0x378)]),y(0x9,n[_0x2b4704(0x309)]),y(0xa,t[_0x2b4704(0x109)]),y(0xb,n[_0x2b4704(0x3a9)]),y(0xc,n[_0x2b4704(0x100)]),y(0xd,(0x0,n['Optional'])(C))],j);let M=D=class extends k{constructor(_0x1a4052,_0x1d1636,_0x203477,_0x1cd595,_0x3c89f7,_0x2b33c5,_0x92cf36,_0xe1003d,_0x31088f,_0x508a5e,_0x129222){const _0x405b4f=_0x2b4704;super(_0x1a4052,_0x1d1636,_0x203477,[],_0x1cd595,_0x92cf36,_0x508a5e,_0x2b33c5,_0x129222),this['_injector']=_0x3c89f7,this[_0x405b4f(0x35b)]=_0xe1003d,this[_0x405b4f(0x191)]=_0x31088f,_(this,_0x405b4f(0x1a5),_0x405b4f(0x3e1)),_(this,_0x405b4f(0x253),0x0),_(this,_0x405b4f(0x330),0x0),_(this,_0x405b4f(0x327),void 0x0),_(this,_0x405b4f(0x290),void 0x0);}[_0x2b4704(0x2cd)](_0x5aa07b){const _0x23a53f=_0x2b4704;this[_0x23a53f(0x2c6)]();let _0xa58c52=this[_0x23a53f(0x3de)][_0x23a53f(0x2b6)](N,this['unitID'],this['type'],this[_0x23a53f(0x3a8)],[_0x5aa07b],this[_0x23a53f(0x123)],this['_resendTimer']);return _0xa58c52['_updateLocalCache'](),_0xa58c52;}[_0x2b4704(0x3b7)](_0x48b15e){const _0x2224d5=_0x2b4704;if(this['_checkMissing'](_0x48b15e))return this['_clearScheduledTask'](),this[_0x2224d5(0x3de)][_0x2224d5(0x2b6)](I,this['unitID'],this[_0x2224d5(0x15c)],this[_0x2224d5(0x3a8)],[],null,[_0x48b15e],this[_0x2224d5(0x123)]);try{let _0x41c237=this[_0x2224d5(0x191)][_0x2224d5(0x256)]([_0x48b15e],[this['_awaitingChangeset']],!0x1);if((0x0,t[_0x2224d5(0x17f)])(_0x41c237)){let {c1Prime:_0x5943c9,c2Prime:_0x4b342e}=_0x41c237;this[_0x2224d5(0x2d0)](_0x5943c9[0x0]),_0x4b342e[0x0][_0x2224d5(0x1f0)]=this['_getCurrentRevision'](),this[_0x2224d5(0x2c6)]();let _0x50cccf=this['_injector'][_0x2224d5(0x2b6)](D,this['unitID'],this[_0x2224d5(0x15c)],_0x4b342e[0x0],this[_0x2224d5(0x123)]);return _0x50cccf[_0x2224d5(0x2a8)](),_0x50cccf;}throw _0x41c237['error'];}catch(_0x40e859){return this[_0x2224d5(0x35b)][_0x2224d5(0x2b8)](_0x40e859),this[_0x2224d5(0x34f)](!0x1);}}['onRemoteAck'](_0x5d9911){const _0x17c69e=_0x2b4704;this[_0x17c69e(0x2c6)]();let _0x2fec99=this['_revisionService'][_0x17c69e(0x392)](this[_0x17c69e(0x37b)]);if(_0x5d9911['revision']<=_0x2fec99)return this;if(this['_checkMissing'](_0x5d9911))return this['_injector']['createInstance'](I,this['unitID'],this[_0x17c69e(0x15c)],this[_0x17c69e(0x3a8)],[],_0x5d9911[_0x17c69e(0x197)],[],this[_0x17c69e(0x123)]);this['_incrementRevisionNumber']();let _0x4feff8=this[_0x17c69e(0x3de)][_0x17c69e(0x2b6)](A,this[_0x17c69e(0x37b)],this[_0x17c69e(0x15c)],this[_0x17c69e(0x123)]);return _0x4feff8[_0x17c69e(0x2a8)](),_0x4feff8;}[_0x2b4704(0x311)](_0x5ef835){const _0x44bcf3=_0x2b4704;return this[_0x44bcf3(0x34f)](!!(_0x5ef835!=null&&_0x5ef835[_0x44bcf3(0x208)]));}['onRemoteRetry'](_0x288d9f){const _0x455c7e=_0x2b4704;return this['_maxTotalRetryTimeout']>je?this['toggleOffline']():(this[_0x455c7e(0x327)]=Oe(this[_0x455c7e(0x253)],{'timeout':this[_0x455c7e(0x253)],'reqId':_0x288d9f[_0x455c7e(0x105)]}),this[_0x455c7e(0x290)]=this['_resendTimer'][_0x455c7e(0x169)](({reqId:_0x33b97a,timeout:_0x1029c3})=>{const _0x51c389=_0x455c7e;this[_0x51c389(0x389)](_0x33b97a,_0x1029c3);}),this);}[_0x2b4704(0x282)](){const _0x1e93e5=_0x2b4704;return this[_0x1e93e5(0x2c6)](),this['_injector'][_0x1e93e5(0x2b6)](F,this[_0x1e93e5(0x37b)],this['type'],this['_awaitingChangeset'],[],this['_handler']);}[_0x2b4704(0x36e)](){return this;}[_0x2b4704(0x21a)](){this['_handler']['onSendChangeset'](this['_awaitingChangeset']);}['_onConflict'](_0x14a77c){const _0x1d4d08=_0x2b4704;return this[_0x1d4d08(0x2c6)](),this[_0x1d4d08(0x3de)][_0x1d4d08(0x2b6)](P,this[_0x1d4d08(0x37b)],this[_0x1d4d08(0x15c)],this['_awaitingChangeset'],[],this[_0x1d4d08(0x123)],_0x14a77c);}[_0x2b4704(0x389)](_0x1ac4cf,_0x23e6c4){const _0x31ce72=_0x2b4704;var _0x4ad7ee;_0x1ac4cf===((_0x4ad7ee=this['_awaitingChangeset'])==null?void 0x0:_0x4ad7ee[_0x31ce72(0x105)])&&(this['resend'](),this[_0x31ce72(0x253)]=_0x23e6c4===0x0?0x3e8:Math['min'](_0x23e6c4*0x2,Ae),this[_0x31ce72(0x330)]+=this[_0x31ce72(0x253)]);}[_0x2b4704(0x2c6)](){const _0x2c9254=_0x2b4704;var _0x29f06c;(_0x29f06c=this[_0x2c9254(0x290)])==null||_0x29f06c[_0x2c9254(0x269)](),this[_0x2c9254(0x253)]=0x0,this[_0x2c9254(0x330)]=0x0;}};M=D=b([y(0x4,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x5,(0x0,n['Inject'])(t[_0x2b4704(0x136)])),y(0x6,n[_0x2b4704(0x378)]),y(0x7,n[_0x2b4704(0x2ac)]),y(0x8,t[_0x2b4704(0x109)]),y(0x9,n[_0x2b4704(0x100)]),y(0xa,(0x0,n['Optional'])(C))],M);let N=O=class extends k{constructor(_0x41f8ea,_0x1f409d,_0x49d3d3,_0x137e13,_0x593e08,_0x303743,_0x1db77e,_0x512a,_0x303b94,_0x4bf665,_0x317173,_0x5cac6,_0x37d0b4){const _0x37848a=_0x2b4704;super(_0x41f8ea,_0x1f409d,_0x49d3d3,_0x137e13,_0x593e08,_0x303b94,_0x5cac6,_0x512a,_0x37d0b4),this[_0x37848a(0x3de)]=_0x1db77e,this[_0x37848a(0x35b)]=_0x4bf665,this[_0x37848a(0x191)]=_0x317173,this[_0x37848a(0x3c0)]=_0x37d0b4,_(this,_0x37848a(0x1a5),_0x37848a(0x263)),_(this,'_resendTimeout',0x0),_(this,_0x37848a(0x330),0x0),_(this,_0x37848a(0x327),void 0x0),_(this,_0x37848a(0x290),void 0x0),_0x303743&&(this[_0x37848a(0x327)]=_0x303743,this[_0x37848a(0x290)]=this['_resendTimer'][_0x37848a(0x169)](({reqId:_0x51b6a6,timeout:_0x3a5fa6})=>{const _0x225dce=_0x37848a;this[_0x225dce(0x389)](_0x51b6a6,_0x3a5fa6);}));}['appendMutation'](_0x4cccca){const _0xcc584a=_0x2b4704;return this[_0xcc584a(0x377)]['push'](_0x4cccca),this;}[_0x2b4704(0x3b7)](_0x1b29e0){const _0x1204cd=_0x2b4704;if(this[_0x1204cd(0x27b)](_0x1b29e0))return this['_clearScheduledTask'](),this[_0x1204cd(0x3de)][_0x1204cd(0x2b6)](I,this[_0x1204cd(0x37b)],this[_0x1204cd(0x15c)],this[_0x1204cd(0x3a8)],this['_pendingMutations'],null,[_0x1b29e0],this['_handler']);try{let _0x1a4c06=this['_transformService'][_0x1204cd(0x256)]([_0x1b29e0],[this[_0x1204cd(0x3a8)]],!0x1);if((0x0,t[_0x1204cd(0x17f)])(_0x1a4c06)){let {c1Prime:_0x229e92,c2Prime:_0x137b32}=_0x1a4c06,_0x122e90=this[_0x1204cd(0x191)][_0x1204cd(0x2c5)](_0x229e92[0x0],this[_0x1204cd(0x377)]);if((0x0,t[_0x1204cd(0x3e0)])(_0x122e90)){let {c1Prime:_0x1287bf,m2Prime:_0x16cfcd}=_0x122e90;return this['_executeRemoteChangeset'](_0x1287bf),_0x137b32[0x0][_0x1204cd(0x1f0)]=this[_0x1204cd(0x1f1)](),this['_clearScheduledTask'](),this[_0x1204cd(0x3de)][_0x1204cd(0x2b6)](O,this[_0x1204cd(0x37b)],this[_0x1204cd(0x15c)],_0x137b32[0x0],_0x16cfcd,this['_handler'],void 0x0);}throw _0x122e90[_0x1204cd(0x2b8)];}throw _0x1a4c06[_0x1204cd(0x2b8)];}catch(_0x172597){return this[_0x1204cd(0x35b)][_0x1204cd(0x2b8)](_0x172597),this[_0x1204cd(0x34f)](!0x1);}}[_0x2b4704(0x26e)](_0x2b4216){const _0x2d894d=_0x2b4704;this['_clearScheduledTask']();let _0x4d3e83=this[_0x2d894d(0x1f1)]();if(_0x2b4216[_0x2d894d(0x197)]<=_0x4d3e83)return this;if(this[_0x2d894d(0x27b)](_0x2b4216))return this[_0x2d894d(0x3de)][_0x2d894d(0x2b6)](I,this['unitID'],this[_0x2d894d(0x15c)],this['_awaitingChangeset'],this['_pendingMutations'],_0x2b4216[_0x2d894d(0x197)],[],this[_0x2d894d(0x123)]);this['_incrementRevisionNumber']();let _0x4b9094=this[_0x2d894d(0x3de)][_0x2d894d(0x2b6)](j,this[_0x2d894d(0x37b)],this[_0x2d894d(0x15c)],this['_pendingMutations'],this['_handler']);return _0x4b9094[_0x2d894d(0x16f)](),_0x4b9094[_0x2d894d(0x2a8)](),_0x4b9094;}[_0x2b4704(0x311)](_0x5d8816){const _0x186928=_0x2b4704;return this['_onConflict'](!!(_0x5d8816!=null&&_0x5d8816[_0x186928(0x208)]));}[_0x2b4704(0x165)](_0x38135d){const _0x3b1a5d=_0x2b4704;return this[_0x3b1a5d(0x330)]>je?this[_0x3b1a5d(0x282)]():(this[_0x3b1a5d(0x327)]=Oe(this[_0x3b1a5d(0x253)],{'timeout':this[_0x3b1a5d(0x253)],'reqId':_0x38135d[_0x3b1a5d(0x105)]}),this[_0x3b1a5d(0x290)]=this[_0x3b1a5d(0x327)][_0x3b1a5d(0x169)](({reqId:_0x2ff8cc,timeout:_0x106d1f})=>{this['_resendWithTimeout'](_0x2ff8cc,_0x106d1f);}),this);}['toggleOffline'](){const _0x158bd8=_0x2b4704;return this[_0x158bd8(0x2c6)](),this['_injector'][_0x158bd8(0x2b6)](F,this[_0x158bd8(0x37b)],this[_0x158bd8(0x15c)],this['_awaitingChangeset'],this[_0x158bd8(0x377)],this[_0x158bd8(0x123)]);}['toggleOnline'](){return this;}[_0x2b4704(0x21a)](){const _0x48aaaf=_0x2b4704;this['_handler'][_0x48aaaf(0xf3)](this[_0x48aaaf(0x3a8)]);}[_0x2b4704(0x34f)](_0x3ce97){const _0x1f6cc8=_0x2b4704;return this['_clearScheduledTask'](),this[_0x1f6cc8(0x3de)]['createInstance'](P,this[_0x1f6cc8(0x37b)],this['type'],null,this[_0x1f6cc8(0x377)],this['_handler'],_0x3ce97);}[_0x2b4704(0x389)](_0x257696,_0x552c3e){const _0x53cc44=_0x2b4704;var _0x1f8b4b;_0x257696===((_0x1f8b4b=this[_0x53cc44(0x3a8)])==null?void 0x0:_0x1f8b4b[_0x53cc44(0x105)])&&(this[_0x53cc44(0x21a)](),this[_0x53cc44(0x253)]=_0x552c3e===0x0?0x3e8:Math[_0x53cc44(0x1fa)](_0x552c3e*0x2,Ae),this['_maxTotalRetryTimeout']+=this[_0x53cc44(0x253)]);}[_0x2b4704(0x2c6)](){const _0x33390c=_0x2b4704;var _0x4a64cf;(_0x4a64cf=this[_0x33390c(0x290)])==null||_0x4a64cf[_0x33390c(0x269)](),this['_resendTimeout']=0x0,this[_0x33390c(0x330)]=0x0;}};N=O=b([y(0x6,(0x0,n['Inject'])(n[_0x2b4704(0x39f)])),y(0x7,(0x0,n[_0x2b4704(0x1ce)])(t['RevisionService'])),y(0x8,n[_0x2b4704(0x378)]),y(0x9,n['ILogService']),y(0xa,t[_0x2b4704(0x109)]),y(0xb,n['IUndoRedoService']),y(0xc,(0x0,n['Optional'])(C))],N);let P=class extends k{constructor(_0xdec121,_0x4041cf,_0x5b2b1c,_0x334705,_0x4abd2a,_0x356856=!0x1,_0x4f3585,_0x15d475,_0x17d35e,_0x1627ab,_0x21d5bc,_0x2dec9b,_0x501a54){const _0x425cf6=_0x2b4704;super(_0xdec121,_0x4041cf,_0x5b2b1c,_0x334705,_0x4abd2a,_0x15d475,_0x17d35e,_0x1627ab,_0x501a54),this[_0x425cf6(0x210)]=_0x356856,this[_0x425cf6(0x2d9)]=_0x4f3585,this['_localeService']=_0x21d5bc,this['_collaborationUIEventService']=_0x2dec9b,this[_0x425cf6(0x3c0)]=_0x501a54,_(this,_0x425cf6(0x1a5),_0x425cf6(0x1b2)),this[_0x425cf6(0x220)](),this[_0x425cf6(0x248)](),this[_0x425cf6(0x3c6)]();}[_0x2b4704(0x2cd)](){return this;}[_0x2b4704(0x3b7)](){return this;}[_0x2b4704(0x26e)](){return this;}['onRemoteRej'](){return this;}[_0x2b4704(0x165)](){return this;}[_0x2b4704(0x282)](){return this;}[_0x2b4704(0x36e)](){return this;}['resend'](){const _0x241a8d=_0x2b4704;throw Error(_0x241a8d(0x2e9));}[_0x2b4704(0x248)](){const _0xcd69c8=_0x2b4704;var _0x9c03b0,_0x430b9f,_0x366d18;(_0x9c03b0=this[_0xcd69c8(0x10b)])==null||(_0x430b9f=_0x9c03b0[_0xcd69c8(0x21b)])==null||(_0x430b9f=_0x430b9f['call'](_0x9c03b0,this['unitID'],_0xcd69c8(0x1b2)))==null||_0x430b9f[_0xcd69c8(0x313)](()=>void 0x0),(_0x366d18=this[_0xcd69c8(0x10b)])==null||_0x366d18['updateOfflineData'](this[_0xcd69c8(0x37b)],this[_0xcd69c8(0x15c)],null,[]);}[_0x2b4704(0x220)](){const _0x710dc7=_0x2b4704;this[_0x710dc7(0x210)]?this[_0x710dc7(0x38e)][_0x710dc7(0x2b4)]({'id':_0x710dc7(0x38b)}):this[_0x710dc7(0x38e)][_0x710dc7(0x2b4)]({'id':_0x710dc7(0x139)});}[_0x2b4704(0x3c6)](){const _0xaabb3f=_0x2b4704;this['_permissionService']['updatePermissionPoint'](new i[(_0xaabb3f(0x117))](this[_0xaabb3f(0x37b)])['id'],!0x1);}};P=b([y(0x6,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x376)])),y(0x7,n['ICommandService']),y(0x8,n[_0x2b4704(0x100)]),y(0x9,(0x0,n['Inject'])(t[_0x2b4704(0x136)])),y(0xa,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x1a3)])),y(0xb,(0x0,n[_0x2b4704(0x1ce)])(v)),y(0xc,(0x0,n['Optional'])(C))],P);let F=class extends k{constructor(_0x25ad66,_0x59281d,_0x4e9b33,_0x457fb5,_0x5ad776,_0x2e289c,_0xb0d4c1,_0x5dae20,_0x18d133,_0xcda069){const _0x5b4426=_0x2b4704;super(_0x25ad66,_0x59281d,_0x4e9b33,_0x457fb5,_0x5ad776,_0x5dae20,_0x18d133,_0xb0d4c1,_0xcda069),this[_0x5b4426(0x3de)]=_0x2e289c,_(this,_0x5b4426(0x1a5),_0x5b4426(0x11e));}['appendMutation'](_0x4976d7){const _0x862b79=_0x2b4704;return this[_0x862b79(0x377)][_0x862b79(0x384)](_0x4976d7),this[_0x862b79(0x2a8)](),this;}[_0x2b4704(0x3b7)](_0x4e5a3c){const _0xbf71d5=_0x2b4704;throw Error(_0xbf71d5(0x225));}[_0x2b4704(0x26e)](){const _0x4cd502=_0x2b4704;throw Error(_0x4cd502(0x34d));}['onRemoteRej'](){const _0x5d0dd3=_0x2b4704;throw Error(_0x5d0dd3(0x1fc));}['onRemoteRetry'](){return this;}[_0x2b4704(0x282)](){return this;}[_0x2b4704(0x36e)](){const _0x4bfa3f=_0x2b4704;let {_injector:_0x275e01,_pendingMutations:_0x51f078,_awaitingChangeset:_0x279605,unitID:_0x5169fe,_handler:_0x4fb017,type:_0x43352f}=this,_0x329b6a=Me(_0x275e01,_0x5169fe,_0x43352f,_0x279605,_0x51f078,_0x4fb017);return _0x329b6a instanceof j?_0x329b6a[_0x4bfa3f(0x16f)]():(_0x329b6a instanceof N||_0x329b6a instanceof M)&&_0x329b6a[_0x4bfa3f(0x21a)](),_0x329b6a;}['resend'](){throw Error('[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.');}};F=b([y(0x5,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x6,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x136)])),y(0x7,n['ICommandService']),y(0x8,n['IUndoRedoService']),y(0x9,(0x0,n[_0x2b4704(0x1d7)])(C))],F);let I=class extends k{constructor(_0x5be1fc,_0x5cb477,_0x45e0d6,_0x11554e,_0x815771,_0x1ab126,_0x105220,_0x1bfe09,_0x44f552,_0x3944d5,_0x42a32f,_0x427ab8,_0xba729e,_0xab54cd){const _0x316031=_0x2b4704;super(_0x5be1fc,_0x5cb477,_0x45e0d6,_0x11554e,_0x105220,_0x42a32f,_0x427ab8,_0x44f552,_0xab54cd),this[_0x316031(0x3ba)]=_0x815771,this[_0x316031(0x3d8)]=_0x1ab126,this[_0x316031(0x3de)]=_0x1bfe09,this[_0x316031(0x35b)]=_0x3944d5,this[_0x316031(0x191)]=_0xba729e,this[_0x316031(0x3c0)]=_0xab54cd,_(this,_0x316031(0x1a5),_0x316031(0x192));}['onMissedChangesetFetched'](_0x40ec65){const _0x1aef11=_0x2b4704;try{if(this[_0x1aef11(0x15a)](_0x40ec65)['missingChangesets'])throw Error(_0x1aef11(0x284));if(this[_0x1aef11(0x15a)]([...this[_0x1aef11(0x3d8)]]['sort']((_0x50b149,_0xfc6b20)=>_0x50b149[_0x1aef11(0x197)]-_0xfc6b20[_0x1aef11(0x197)]))['missingChangesets'])return this[_0x1aef11(0x3d8)]=[],this['_updateLocalCache'](),this[_0x1aef11(0x123)]['onMissingChangesets']({'from':this[_0x1aef11(0x1f1)](),'to':0x0}),this;let _0x2a7c7e=this[_0x1aef11(0x3a8)],_0x275784=this[_0x1aef11(0x377)],_0x3bca95;if(_0x2a7c7e&&_0x275784[_0x1aef11(0x2f8)]!==0x0)_0x3bca95=this['_injector'][_0x1aef11(0x2b6)](N,this[_0x1aef11(0x37b)],this[_0x1aef11(0x15c)],_0x2a7c7e,_0x275784,this['_handler'],void 0x0);else{if(_0x2a7c7e&&_0x275784[_0x1aef11(0x2f8)]===0x0)_0x2a7c7e[_0x1aef11(0x1f0)]=this['_getCurrentRevision'](),_0x3bca95=this[_0x1aef11(0x3de)]['createInstance'](M,this[_0x1aef11(0x37b)],this['type'],_0x2a7c7e,this['_handler']);else{if(_0x275784[_0x1aef11(0x2f8)]!==0x0){let _0x299286=this[_0x1aef11(0x3de)][_0x1aef11(0x2b6)](j,this[_0x1aef11(0x37b)],this[_0x1aef11(0x15c)],_0x275784,this[_0x1aef11(0x123)]);_0x299286[_0x1aef11(0x16f)](),_0x3bca95=_0x299286;}else _0x3bca95=this['_injector'][_0x1aef11(0x2b6)](A,this[_0x1aef11(0x37b)],this[_0x1aef11(0x15c)],this[_0x1aef11(0x123)]);}}return _0x3bca95[_0x1aef11(0x2a8)](),_0x3bca95;}catch(_0x6dabe3){return this['_logService'][_0x1aef11(0x2b8)]('[FetchMissState]','failed\x20to\x20apply\x20missed\x20changesets!',_0x6dabe3),this[_0x1aef11(0x3de)][_0x1aef11(0x2b6)](P,this[_0x1aef11(0x37b)],this['type'],this[_0x1aef11(0x3a8)],this['_pendingMutations'],this[_0x1aef11(0x123)],!0x1);}}[_0x2b4704(0x15a)](_0x245ebf){const _0x253896=_0x2b4704;this['_acknowledgeAwaitingIfReady']();for(let _0x3fd888=0x0;_0x3fd888<_0x245ebf[_0x253896(0x2f8)];_0x3fd888++){let _0x257a44=_0x245ebf[_0x3fd888],_0x4820d7=this[_0x253896(0x1f1)]();if(!(_0x257a44['revision']<=_0x4820d7)){if(_0x257a44[_0x253896(0x197)]>_0x4820d7+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x257a44)){this[_0x253896(0x29b)]();continue;}this[_0x253896(0x148)](_0x257a44),this['_acknowledgeAwaitingIfReady']();}}return{'missingChangesets':!0x1};}[_0x2b4704(0x148)](_0x12c0c3){const _0x2c5700=_0x2b4704;let _0x22a0c3=_0x12c0c3,_0x2bf1d0=this[_0x2c5700(0x3a8)];if(_0x2bf1d0){let _0x368970=this[_0x2c5700(0x191)][_0x2c5700(0x256)]([_0x12c0c3],[_0x2bf1d0],!0x1);if(!(0x0,t[_0x2c5700(0x17f)])(_0x368970))throw _0x368970[_0x2c5700(0x2b8)];_0x22a0c3=_0x368970[_0x2c5700(0x2c3)][0x0],_0x2bf1d0=_0x368970[_0x2c5700(0x286)][0x0];}let _0x1c7a95=this[_0x2c5700(0x377)];if(_0x1c7a95[_0x2c5700(0x2f8)]){let _0x1c871c=this['_transformService']['transformMutationsWithChangeset'](_0x22a0c3,_0x1c7a95);if(!(0x0,t['isTransformMutationsWithChangesetSuccess'])(_0x1c871c))throw _0x1c871c['error'];_0x22a0c3=_0x1c871c[_0x2c5700(0x2c3)],_0x1c7a95=_0x1c871c[_0x2c5700(0x293)];}this[_0x2c5700(0x2d0)](_0x22a0c3),_0x2bf1d0&&(_0x2bf1d0[_0x2c5700(0x1f0)]=this[_0x2c5700(0x1f1)]()),this['_awaitingChangeset']=_0x2bf1d0,this[_0x2c5700(0x377)]=_0x1c7a95;}[_0x2b4704(0x1b5)](){const _0x2d0f0a=_0x2b4704;if(!this[_0x2d0f0a(0x3a8)]||this[_0x2d0f0a(0x3ba)]==null)return;let _0x34e6f3=this[_0x2d0f0a(0x1f1)]();if(this[_0x2d0f0a(0x3ba)]<=_0x34e6f3)throw Error(_0x2d0f0a(0x308)+this[_0x2d0f0a(0x3ba)]+'.');this['_acknowledgedAwaitingRevision']===_0x34e6f3+0x1&&this[_0x2d0f0a(0x29b)]();}[_0x2b4704(0x29b)](){const _0x52cbe8=_0x2b4704;this[_0x52cbe8(0xfd)](),this[_0x52cbe8(0x3a8)]=null,this[_0x52cbe8(0x3ba)]=null;}[_0x2b4704(0x1e2)](_0x13e180){const _0x339d40=_0x2b4704;let _0x3f6dce=this[_0x339d40(0x3a8)];return!_0x3f6dce||!_0x3f6dce[_0x339d40(0x1a2)]||_0x3f6dce['reqId']===null||_0x3f6dce[_0x339d40(0x105)]===void 0x0?!0x1:_0x13e180[_0x339d40(0x37b)]===_0x3f6dce[_0x339d40(0x37b)]&&_0x13e180[_0x339d40(0x1a2)]===_0x3f6dce['sid']&&_0x13e180[_0x339d40(0x105)]===_0x3f6dce[_0x339d40(0x105)];}[_0x2b4704(0x21a)](){const _0x152240=_0x2b4704;throw Error(_0x152240(0x196));}[_0x2b4704(0x2cd)](_0x148648){const _0x4b915c=_0x2b4704;return this[_0x4b915c(0x377)][_0x4b915c(0x384)](_0x148648),this;}[_0x2b4704(0x3b7)](_0x53ee28){const _0xb6bd99=_0x2b4704;return this[_0xb6bd99(0x3d8)][_0xb6bd99(0x384)](_0x53ee28),this;}[_0x2b4704(0x26e)](_0x269747){const _0x44aa29=_0x2b4704;if(this[_0x44aa29(0x3a8)]){let _0x5c20ee=this['_getCurrentRevision']();return _0x269747[_0x44aa29(0x197)]<=_0x5c20ee||(_0x5c20ee+0x1===_0x269747['revision']?(this[_0x44aa29(0xfd)](),this[_0x44aa29(0x3a8)]=null,this[_0x44aa29(0x3ba)]=null):this[_0x44aa29(0x3ba)]=_0x269747[_0x44aa29(0x197)]),this;}if(_0x269747[_0x44aa29(0x197)]<=this[_0x44aa29(0x1f1)]())return this;throw Error(_0x44aa29(0x278));}['onRemoteRej'](_0x500a34){const _0x4a74ad=_0x2b4704;return this['_onConflict'](!!(_0x500a34!=null&&_0x500a34[_0x4a74ad(0x208)]));}[_0x2b4704(0x165)](){return this;}[_0x2b4704(0x282)](){const _0x3ba079=_0x2b4704;return this[_0x3ba079(0x3de)][_0x3ba079(0x2b6)](F,this['unitID'],this['type'],this[_0x3ba079(0x3a8)],this[_0x3ba079(0x377)],this[_0x3ba079(0x123)]);}[_0x2b4704(0x36e)](){return this;}['_onConflict'](_0x50a722){const _0x4165df=_0x2b4704;return this['_injector']['createInstance'](P,this[_0x4165df(0x37b)],this[_0x4165df(0x15c)],this[_0x4165df(0x3a8)],this['_pendingMutations'],this[_0x4165df(0x123)],_0x50a722);}};I=b([y(0x7,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x8,(0x0,n[_0x2b4704(0x1ce)])(t['RevisionService'])),y(0x9,n[_0x2b4704(0x2ac)]),y(0xa,n[_0x2b4704(0x378)]),y(0xb,n[_0x2b4704(0x100)]),y(0xc,t[_0x2b4704(0x109)]),y(0xd,(0x0,n[_0x2b4704(0x1d7)])(C))],I);function Me(_0x10b769,_0x146041,_0x1f4f90,_0x8017fa,_0x397c82,_0x465506){const _0x184a99=_0x2b4704;return _0x8017fa&&_0x397c82[_0x184a99(0x2f8)]?_0x10b769[_0x184a99(0x2b6)](N,_0x146041,_0x1f4f90,_0x8017fa,_0x397c82,_0x465506,void 0x0):_0x8017fa?_0x10b769[_0x184a99(0x2b6)](M,_0x146041,_0x1f4f90,_0x8017fa,_0x465506):_0x397c82['length']?_0x10b769[_0x184a99(0x2b6)](j,_0x146041,_0x1f4f90,_0x397c82,_0x465506):_0x10b769[_0x184a99(0x2b6)](A,_0x146041,_0x1f4f90,_0x465506);}let L=class extends n['RxDisposable']{get[_0x2b4704(0x11d)](){const _0x1284c9=_0x2b4704;return this[_0x1284c9(0x273)];}constructor(_0x57c2fb,_0x13e470,_0x229cde,_0x249d0e,_0x1b7f58,_0x53a052,_0x23be17,_0x2bf871,_0x91f067,_0x6057ea,_0x47cec3,_0x45d1dc,_0x5908e3,_0x651a09){const _0xfdb06e=_0x2b4704;super(),this[_0xfdb06e(0x37b)]=_0x57c2fb,this[_0xfdb06e(0x3aa)]=_0x13e470,this[_0xfdb06e(0x343)]=_0x229cde,this[_0xfdb06e(0x3de)]=_0x249d0e,this[_0xfdb06e(0x25e)]=_0x1b7f58,this[_0xfdb06e(0x294)]=_0x53a052,this['_revisionService']=_0x23be17,this['_eventService']=_0x2bf871,this[_0xfdb06e(0x2fb)]=_0x91f067,this[_0xfdb06e(0x35b)]=_0x6057ea,this[_0xfdb06e(0x340)]=_0x47cec3,this[_0xfdb06e(0x2d9)]=_0x45d1dc,this[_0xfdb06e(0x2cc)]=_0x5908e3,this[_0xfdb06e(0x10b)]=_0x651a09,_(this,_0xfdb06e(0x238),new a[(_0xfdb06e(0x367))](null)),_(this,'state$',this[_0xfdb06e(0x238)]['asObservable']()),_(this,'_state',void 0x0),_(this,_0xfdb06e(0x1c1),!0x1),_(this,_0xfdb06e(0x265),''),_(this,_0xfdb06e(0x36c),0x0),_(this,_0xfdb06e(0x199),this[_0xfdb06e(0x194)]['pipe']((0x0,a[_0xfdb06e(0x2c1)])(_0x2956dd=>_0x2956dd?_0x2956dd[_0xfdb06e(0x1a5)]:_0xfdb06e(0x11e)),(0x0,a[_0xfdb06e(0x23a)])({'bufferSize':0x1,'refCount':!0x0}))),_(this,_0xfdb06e(0x2b0),!0x1),_(this,'_remoteChangesetQueue',[]);}async['init'](){const _0x1bec92=_0x2b4704;if(this[_0x1bec92(0x11d)])throw Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this[_0x1bec92(0x28a)]();}[_0x2b4704(0x13b)](){const _0x3aee61=_0x2b4704;return this[_0x3aee61(0x1c1)]=!0x0,(0x0,n[_0x3aee61(0x2bb)])(()=>{const _0x593326=_0x3aee61;this[_0x593326(0x1c1)]=!0x1,this[_0x593326(0x336)]();});}[_0x2b4704(0x12a)](_0x38646a){const _0x4e8eba=_0x2b4704;this[_0x4e8eba(0x237)](_0x38646a);}['_updateState'](_0x28e147){const _0xde0ff4=_0x2b4704;this[_0xde0ff4(0x273)]=_0x28e147,this['_state$'][_0xde0ff4(0x383)](_0x28e147);}async[_0x2b4704(0x28a)](){const _0x49c315=_0x2b4704;if(this[_0x49c315(0x16a)](await this[_0x49c315(0x251)]()),this[_0x49c315(0x2cc)]){var _0x51c859;(_0x51c859=this[_0x49c315(0x2cc)])==null||_0x51c859[_0x49c315(0x385)](this['unitID']),this[_0x49c315(0x115)](this['_singleActiveUnitService']['getUnitStatus$'](this[_0x49c315(0x37b)])[_0x49c315(0x169)](_0x556946=>{const _0x5a2420=_0x49c315;this[_0x5a2420(0x35b)][_0x5a2420(0x216)](_0x5a2420(0x2b1),_0x5a2420(0x23e),_0x556946),_0x556946===0x1?(this[_0x5a2420(0x3c9)][_0x5a2420(0x2b4)]({'id':_0x5a2420(0x1ad)}),this[_0x5a2420(0x2d9)][_0x5a2420(0x1be)](new i[(_0x5a2420(0x117))](this[_0x5a2420(0x37b)])['id'],!0x1),this[_0x5a2420(0x2d9)][_0x5a2420(0x10d)](!0x1)):(this[_0x5a2420(0x2d9)][_0x5a2420(0x1be)](new i[(_0x5a2420(0x117))](this[_0x5a2420(0x37b)])['id'],!0x0),this[_0x5a2420(0x2d9)][_0x5a2420(0x10d)](!0x0));}));}let _0x2930e8=!0x1;return this[_0x49c315(0x115)](this['session']['sessionStatus$'][_0x49c315(0x169)](_0xd8abad=>{const _0x5e0b35=_0x49c315;_0xd8abad===0x3?this[_0x5e0b35(0x325)](_0x2930e8):_0xd8abad===0x2&&(_0x2930e8=!0x0,this[_0x5e0b35(0x23f)]());})),this[_0x49c315(0x115)](this[_0x49c315(0x3aa)]['event$'][_0x49c315(0x169)](_0x172417=>{const _0x3e3606=_0x49c315;try{switch(_0x172417[_0x3e3606(0x1da)]){case t[_0x3e3606(0x30b)][_0x3e3606(0x2a5)]:this['_onRemoteChangeset']((0x0,t[_0x3e3606(0x3d2)])(_0x172417[_0x3e3606(0x27c)]));break;case t[_0x3e3606(0x30b)][_0x3e3606(0x221)]:this[_0x3e3606(0x1ef)](_0x172417['data']);break;case t[_0x3e3606(0x30b)][_0x3e3606(0x3a1)]:this[_0x3e3606(0x3d3)]();break;case t[_0x3e3606(0x30b)][_0x3e3606(0x35d)]:this[_0x3e3606(0x2fe)](_0x172417[_0x3e3606(0x27c)]);break;case t[_0x3e3606(0x30b)]['PSEUDO_FETCH_MISSING_RESULT']:this[_0x3e3606(0x297)](_0x172417[_0x3e3606(0x27c)][_0x3e3606(0x337)][_0x3e3606(0x2c1)](_0x425c1a=>(0x0,t[_0x3e3606(0x3d2)])(_0x425c1a)));break;case t[_0x3e3606(0x30b)][_0x3e3606(0x317)]:this[_0x3e3606(0x3d3)]({'isPermissionRej':!0x0});break;case t['CollaborationEvent']['UNISCRIPT_RUN']:break;}}catch(_0x48d137){throw console[_0x3e3606(0x2b8)](_0x3e3606(0x3db),_0x48d137),_0x48d137;}})),this[_0x49c315(0x273)];}[_0x2b4704(0x106)](){const _0x5e7eec=_0x2b4704;this[_0x5e7eec(0x2b0)]=!0x1;}[_0x2b4704(0x3b9)](){const _0x1642d4=_0x2b4704;if(this['_transitionLocked'])throw Error('[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.');this[_0x1642d4(0x2b0)]=!0x0;}['_onLocalMutation'](_0x4ffbb2){const _0x13c0d1=_0x2b4704;this[_0x13c0d1(0x3b9)](),this[_0x13c0d1(0x16a)](this[_0x13c0d1(0x273)][_0x13c0d1(0x2cd)](_0x4ffbb2)),this[_0x13c0d1(0x106)]();}[_0x2b4704(0x2c7)](_0x224122){const _0x4da2d0=_0x2b4704;if(!(_0x224122[_0x4da2d0(0x197)]<=this[_0x4da2d0(0x36f)][_0x4da2d0(0x392)](this[_0x4da2d0(0x37b)]))){if(this['_collaborationPaused']){this[_0x4da2d0(0x2ad)][_0x4da2d0(0x384)](_0x224122);return;}this[_0x4da2d0(0x193)](_0x224122);}}[_0x2b4704(0x336)](){const _0x4881ed=_0x2b4704;this[_0x4881ed(0x2ad)][_0x4881ed(0x24e)](_0x219c98=>this[_0x4881ed(0x193)](_0x219c98)),this[_0x4881ed(0x2ad)]=[];}[_0x2b4704(0x193)](_0x20e979){const _0x56b12b=_0x2b4704;let _0x4abedb=this[_0x56b12b(0x25e)]['interceptor'][_0x56b12b(0x2dc)](this[_0x56b12b(0x25e)]['interceptor']['getInterceptPoints']()[_0x56b12b(0x206)])(_0x20e979['mutations'],null)||_0x20e979[_0x56b12b(0x296)],_0x3f51b0={..._0x20e979,'mutations':_0x4abedb};this['_lockTransition'](),this[_0x56b12b(0x16a)](this[_0x56b12b(0x273)][_0x56b12b(0x3b7)](_0x3f51b0)),this['_unlockTransition']();}['_onRemoteACK'](_0x5bb25f){const _0x545bd6=_0x2b4704;this[_0x545bd6(0x3b9)](),this[_0x545bd6(0x16a)](this[_0x545bd6(0x273)][_0x545bd6(0x26e)](_0x5bb25f)),this['_unlockTransition']();}[_0x2b4704(0x3d3)](_0x4caeb5){const _0x52f4f2=_0x2b4704;this['_lockTransition'](),this[_0x52f4f2(0x16a)](this[_0x52f4f2(0x273)][_0x52f4f2(0x311)](_0x4caeb5)),this[_0x52f4f2(0x106)]();}[_0x2b4704(0x2fe)](_0x5e92da){const _0x5dee40=_0x2b4704;this[_0x5dee40(0x3b9)](),this[_0x5dee40(0x16a)](this[_0x5dee40(0x273)][_0x5dee40(0x165)](_0x5e92da)),this[_0x5dee40(0x106)]();}['_onFetchMissResult'](_0x198fc3){const _0x2f8165=_0x2b4704;if(!(this[_0x2f8165(0x273)]instanceof I))throw TypeError(_0x2f8165(0x127));let _0x55b4e3=_0x198fc3['map'](_0xff50d=>{const _0xbbfed1=_0x2f8165;let _0x24f392=this[_0xbbfed1(0x25e)]['interceptor'][_0xbbfed1(0x2dc)](this[_0xbbfed1(0x25e)][_0xbbfed1(0x185)][_0xbbfed1(0xff)]()[_0xbbfed1(0x206)])(_0xff50d[_0xbbfed1(0x296)],null)||_0xff50d[_0xbbfed1(0x296)];return{..._0xff50d,'mutations':_0x24f392};});this[_0x2f8165(0x3b9)](),this['_updateState'](this['_state'][_0x2f8165(0x27a)](_0x55b4e3)),this[_0x2f8165(0x106)]();}[_0x2b4704(0x23f)](){const _0x40c716=_0x2b4704;this[_0x40c716(0x3b9)](),this[_0x40c716(0x16a)](this[_0x40c716(0x273)][_0x40c716(0x282)]()),this['_unlockTransition']();}['_toggleOnline'](_0x51bd0c=!0x1){const _0x254469=_0x2b4704;this[_0x254469(0x3b9)](),this['_updateState'](this['_state'][_0x254469(0x36e)]()),this[_0x254469(0x106)]();let _0x4ccb0f=this[_0x254469(0x273)];_0x51bd0c&&_0x4ccb0f instanceof A&&(this[_0x254469(0x3b9)](),this[_0x254469(0x16a)](_0x4ccb0f[_0x254469(0x18c)]()),this['_unlockTransition']());}async[_0x2b4704(0x251)](){return new Promise(_0x4ae719=>{const _0x158e07=_0x2cb1;this[_0x158e07(0x3aa)][_0x158e07(0x3d5)][_0x158e07(0x200)]((0x0,a[_0x158e07(0x346)])(0x1))[_0x158e07(0x169)](async _0x6aafbc=>{const _0x431f5c=_0x158e07;_0x4ae719(await this[_0x431f5c(0x1bd)](_0x6aafbc===0x3));});});}[_0x2b4704(0x2a7)](){const _0x451938=_0x2b4704;let _0x4e368f=this[_0x451938(0x37b)];return{'onStateChange':(_0x59e595,_0x386f52)=>{const _0x1e2d57=_0x451938;if(_0x59e595!==this[_0x1e2d57(0x273)])throw Error(_0x1e2d57(0x37c)+_0x59e595[_0x1e2d57(0x1a5)]+_0x1e2d57(0x1b8)+_0x386f52[_0x1e2d57(0x1a5)]+_0x1e2d57(0x19c)+this['_state'][_0x1e2d57(0x1a5)]);this['_updateState'](_0x386f52);},'onSendChangeset':_0x1be67f=>{const _0x5d498c=_0x451938;_0x1be67f[_0x5d498c(0x1a2)]||(_0x1be67f[_0x5d498c(0x1a2)]=this[_0x5d498c(0x265)],_0x1be67f['reqId']=++this[_0x5d498c(0x36c)]);let _0xefdfc2={'eventID':t[_0x5d498c(0x30b)][_0x5d498c(0x30c)],'data':{'unitID':_0x1be67f['unitID'],'unitType':this['_type'],'changeset':_0x1be67f,'memberID':this[_0x5d498c(0x3aa)][_0x5d498c(0x145)]()}};this[_0x5d498c(0x3aa)][_0x5d498c(0x3d4)](_0xefdfc2,this[_0x5d498c(0x37b)]);},'onMissingChangesets':({from:_0x10c4bc,to:_0x50d3d5})=>{const _0x2734fc=_0x451938;this[_0x2734fc(0x35b)][_0x2734fc(0x216)]('[CollaborationEntity]',_0x2734fc(0x22f)+_0x10c4bc+_0x2734fc(0x146)+_0x50d3d5);let _0x1821c2={'eventID':t[_0x2734fc(0x30b)][_0x2734fc(0x270)],'data':{'unitID':_0x4e368f,'unitType':this[_0x2734fc(0x343)],'from':_0x10c4bc,'to':_0x50d3d5}};this[_0x2734fc(0x3aa)][_0x2734fc(0x3d4)](_0x1821c2,this['unitID']);}};}async[_0x2b4704(0x1bd)](_0x8ca5c){const _0x45b71a=_0x2b4704;var _0x31f602,_0x193aaf,_0x21e7b0;let _0x1520ab=await((_0x31f602=this[_0x45b71a(0x10b)])==null?void 0x0:_0x31f602['loadOfflineData'](this['unitID'])),_0x4a7635=(_0x193aaf=_0x1520ab==null?void 0x0:_0x1520ab[_0x45b71a(0x296)])==null?[]:_0x193aaf,_0x402472=(_0x21e7b0=_0x1520ab==null?void 0x0:_0x1520ab[_0x45b71a(0x3b1)])==null?null:_0x21e7b0,_0x2acbd1=!!(_0x402472!=null&&_0x402472[_0x45b71a(0x1a2)])&&!!(_0x402472!=null&&_0x402472[_0x45b71a(0x105)]);this[_0x45b71a(0x265)]=_0x2acbd1?_0x402472[_0x45b71a(0x1a2)]:(0x0,t['uuidv4'])(),this[_0x45b71a(0x36c)]=_0x2acbd1?_0x402472[_0x45b71a(0x105)]:0x0;let _0x1c5168=this[_0x45b71a(0x37b)];try{this[_0x45b71a(0x229)](_0x402472,_0x4a7635);}catch(_0x2d6dc5){this[_0x45b71a(0x35b)][_0x45b71a(0x2b8)](_0x2d6dc5);}let _0x43f52b=this['_createHandler']();if(_0x8ca5c){let _0x3dde90=Me(this['_injector'],_0x1c5168,this[_0x45b71a(0x343)],_0x402472,_0x4a7635,_0x43f52b);return _0x3dde90 instanceof j?_0x3dde90['_schedule']():(_0x3dde90 instanceof N||_0x3dde90 instanceof M)&&_0x3dde90[_0x45b71a(0x21a)](),_0x3dde90;}return this['_injector'][_0x45b71a(0x2b6)](F,_0x1c5168,this['_type'],_0x402472,_0x4a7635,_0x43f52b);}['_replayCachedMutations'](_0x599763,_0x12a6d4){const _0x587c40=_0x2b4704;var _0x1cc434,_0x625850;let _0xb95ace=this['_compressMutationService'][_0x587c40(0x185)][_0x587c40(0x2dc)](this['_compressMutationService'][_0x587c40(0x185)][_0x587c40(0xff)]()[_0x587c40(0x206)]);(_0x1cc434=_0xb95ace((_0x599763==null?void 0x0:_0x599763[_0x587c40(0x296)])||[],null))==null||_0x1cc434[_0x587c40(0x24e)](_0x44ad70=>this[_0x587c40(0x340)][_0x587c40(0x1f7)](_0x44ad70['id'],_0x44ad70[_0x587c40(0x3bf)])),(_0x625850=_0xb95ace(_0x12a6d4||[],null))==null||_0x625850[_0x587c40(0x24e)](_0x30ab3d=>this['_commandService'][_0x587c40(0x1f7)](_0x30ab3d['id'],_0x30ab3d['params']));}};L=b([y(0x3,(0x0,n[_0x2b4704(0x1ce)])(n['Injector'])),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x132)])),y(0x5,(0x0,n['Inject'])(n[_0x2b4704(0x1a3)])),y(0x6,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x136)])),y(0x7,(0x0,n['Inject'])(v)),y(0x8,n[_0x2b4704(0x3a9)]),y(0x9,n['ILogService']),y(0xa,n['ICommandService']),y(0xb,n[_0x2b4704(0x376)]),y(0xc,(0x0,n[_0x2b4704(0x1d7)])(T)),y(0xd,(0x0,n[_0x2b4704(0x1d7)])(C))],L);let R=class extends L{constructor(_0x4269ac,_0x10c420,_0x181133,_0x5ef837,_0x533351,_0x12052f,_0x5e7d3b,_0x3f38ae,_0x962f2,_0x59bcdc,_0x2ed187,_0x161dda,_0x355685,_0x27b556,_0x1ac13){const _0x13b41d=_0x2b4704;super(_0x4269ac,_0x181133,_0x10c420,_0x5ef837,_0x533351,_0x12052f,_0x5e7d3b,_0x3f38ae,_0x962f2,_0x59bcdc,_0x2ed187,_0x161dda,_0x27b556,_0x1ac13),this[_0x13b41d(0x37b)]=_0x4269ac,this[_0x13b41d(0x15c)]=_0x10c420,this['_docStateChangeManagerService']=_0x355685,_(this,_0x13b41d(0x334),null);}['addHandlerCallback'](_0x20c308){const _0x25ec9d=_0x2b4704;this[_0x25ec9d(0x334)]=_0x20c308;}[_0x2b4704(0x2cf)](){const _0x50379f=_0x2b4704;this[_0x50379f(0x334)]=null,super[_0x50379f(0x2cf)]();}['_createHandler'](){const _0x443ee6=_0x2b4704;let _0x5096e3=super['_createHandler']();return _0x5096e3['onTransformIME']=_0x512e41=>{const _0x11491d=_0x2cb1;var _0x2381d6,_0x6be215;return(_0x2381d6=this['_handlerCallback'])==null||(_0x6be215=_0x2381d6['onTransformIME'])==null?void 0x0:_0x6be215[_0x11491d(0x2ec)](_0x2381d6,_0x512e41);},_0x5096e3[_0x443ee6(0x120)]=_0xc58a87=>{const _0x1cf34f=_0x443ee6;var _0x470578,_0x53d222;return(_0x470578=this[_0x1cf34f(0x334)])==null||(_0x53d222=_0x470578[_0x1cf34f(0x120)])==null?void 0x0:_0x53d222[_0x1cf34f(0x2ec)](_0x470578,_0xc58a87);},_0x5096e3['onTransformSelections']=_0x59aeda=>{const _0x155215=_0x443ee6;var _0x3654cf,_0x43a58d;return(_0x3654cf=this['_handlerCallback'])==null||(_0x43a58d=_0x3654cf[_0x155215(0x2eb)])==null?void 0x0:_0x43a58d[_0x155215(0x2ec)](_0x3654cf,_0x59aeda);},_0x5096e3[_0x443ee6(0x2c8)]=_0x281898=>{const _0x42332e=_0x443ee6;var _0x197afd,_0x48526e;return(_0x197afd=this[_0x42332e(0x334)])==null||(_0x48526e=_0x197afd[_0x42332e(0x2c8)])==null?void 0x0:_0x48526e[_0x42332e(0x2ec)](_0x197afd,_0x281898);},_0x5096e3[_0x443ee6(0x319)]=_0x54e2d3=>{const _0x23862d=_0x443ee6;var _0xa55fe0,_0x151e11,_0xd1b663;return(_0xa55fe0=(_0x151e11=this[_0x23862d(0x334)])==null||(_0xd1b663=_0x151e11[_0x23862d(0x319)])==null?void 0x0:_0xd1b663[_0x23862d(0x2ec)](_0x151e11,_0x54e2d3))==null?_0x54e2d3:_0xa55fe0;},_0x5096e3[_0x443ee6(0x365)]=_0x4f4b5e=>{const _0x22db23=_0x443ee6;var _0x5e5c75,_0x50bc1f,_0x39b273;return(_0x5e5c75=(_0x50bc1f=this[_0x22db23(0x334)])==null||(_0x39b273=_0x50bc1f[_0x22db23(0x365)])==null?void 0x0:_0x39b273[_0x22db23(0x2ec)](_0x50bc1f,_0x4f4b5e))==null?_0x4f4b5e:_0x5e5c75;},_0x5096e3;}async[_0x2b4704(0x28a)](){const _0x550613=_0x2b4704;if(this[_0x550613(0x277)]==null)throw Error('[DocCollaborationEntity]:\x20DocStateChangeManagerService\x20is\x20required.\x20Register\x20UniverDocsPlugin\x20before\x20collaboration.');let _0xf1d51f=await super[_0x550613(0x28a)]();return this[_0x550613(0x115)](this[_0x550613(0x277)]['docStateChange$']['subscribe'](_0x4337a3=>{const _0x55a6c2=_0x550613;if(_0x4337a3==null||_0x4337a3['unitId']!==this[_0x55a6c2(0x37b)])return;let {commandId:_0x274547,redoState:_0x550ced,unitId:_0xd55a7b}=_0x4337a3,_0x232828={'id':_0x274547,'type':n[_0x55a6c2(0x2e2)][_0x55a6c2(0x3d9)],'params':{'unitId':_0xd55a7b,'actions':_0x550ced['actions'],'textRanges':null}};this[_0x55a6c2(0x237)](_0x232828);})),this[_0x550613(0x115)](this[_0x550613(0x340)][_0x550613(0x10a)]((_0x5a9c7a,_0x147c09)=>{const _0x87d46f=_0x550613;if(_0x5a9c7a[_0x87d46f(0x15c)]!==n[_0x87d46f(0x2e2)]['MUTATION']||_0x147c09!=null&&_0x147c09['fromCollab']||_0x147c09!=null&&_0x147c09[_0x87d46f(0xfa)]||_0x5a9c7a['id']===r[_0x87d46f(0x292)]['id'])return;let _0x3b6768=_0x5a9c7a['params'];if((_0x3b6768==null?void 0x0:_0x3b6768[_0x87d46f(0x19e)])!==this[_0x87d46f(0x37b)])return;let _0x556346=_0x5a9c7a,_0x2254fa=this[_0x87d46f(0x25e)]['interceptor'][_0x87d46f(0x2dc)](this[_0x87d46f(0x25e)]['interceptor'][_0x87d46f(0xff)]()['COMPRESS_MUTATION_SEND'])([_0x556346],this['_univerInstanceService'])||[_0x556346];this[_0x87d46f(0x237)](_0x2254fa[0x0]);})),_0xf1d51f;}};R=b([y(0x3,(0x0,n[_0x2b4704(0x1ce)])(n['Injector'])),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(t['CompressMutationService'])),y(0x5,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x1a3)])),y(0x6,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x136)])),y(0x7,(0x0,n[_0x2b4704(0x1ce)])(v)),y(0x8,n[_0x2b4704(0x3a9)]),y(0x9,n[_0x2b4704(0x2ac)]),y(0xa,n[_0x2b4704(0x378)]),y(0xb,n[_0x2b4704(0x376)]),y(0xc,(0x0,n[_0x2b4704(0x1d7)])(r[_0x2b4704(0x3dc)])),y(0xd,(0x0,n[_0x2b4704(0x1d7)])(T)),y(0xe,(0x0,n['Optional'])(C))],R);let Ne=class extends L{constructor(_0x5d5175,_0x542aac,_0x5360c9,_0x31826b,_0x28c62d,_0x544a31,_0x2f49b2,_0x14f36f,_0x46735b,_0x242734,_0x584bb5,_0x246e60,_0x48243a,_0x27fc51){const _0x416b8f=_0x2b4704;super(_0x5d5175,_0x5360c9,_0x542aac,_0x31826b,_0x28c62d,_0x544a31,_0x2f49b2,_0x14f36f,_0x46735b,_0x242734,_0x584bb5,_0x246e60,_0x48243a,_0x27fc51),this['unitID']=_0x5d5175,this[_0x416b8f(0x15c)]=_0x542aac;}async[_0x2b4704(0x28a)](){const _0x2730c1=_0x2b4704;let _0x551c8c=await super['_init']();return this['disposeWithMe'](this['_commandService'][_0x2730c1(0x10a)]((_0x329f03,_0x387633)=>{const _0x2709f8=_0x2730c1;if(_0x329f03[_0x2709f8(0x15c)]!==n['CommandType'][_0x2709f8(0x3d9)]||_0x387633!=null&&_0x387633[_0x2709f8(0x39c)]||_0x387633!=null&&_0x387633[_0x2709f8(0xfa)]||_0x329f03['id']!==e[_0x2709f8(0x1d4)]['id'])return;let _0xc72d6a=_0x329f03[_0x2709f8(0x3bf)];if((_0xc72d6a==null?void 0x0:_0xc72d6a[_0x2709f8(0x19e)])!==this[_0x2709f8(0x37b)])return;let _0x3d1a71=_0x329f03,_0x59f471=this['_compressMutationService']['interceptor'][_0x2709f8(0x2dc)](this['_compressMutationService'][_0x2709f8(0x185)][_0x2709f8(0xff)]()['COMPRESS_MUTATION_SEND'])([_0x3d1a71],this[_0x2709f8(0x2fb)])||[_0x3d1a71];this[_0x2709f8(0x237)](_0x59f471[0x0]);})),_0x551c8c;}};Ne=b([y(0x3,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x132)])),y(0x5,(0x0,n[_0x2b4704(0x1ce)])(n['LocaleService'])),y(0x6,(0x0,n['Inject'])(t[_0x2b4704(0x136)])),y(0x7,(0x0,n[_0x2b4704(0x1ce)])(v)),y(0x8,n[_0x2b4704(0x3a9)]),y(0x9,n[_0x2b4704(0x2ac)]),y(0xa,n[_0x2b4704(0x378)]),y(0xb,n[_0x2b4704(0x376)]),y(0xc,(0x0,n['Optional'])(T)),y(0xd,(0x0,n[_0x2b4704(0x1d7)])(C))],Ne);let z=class extends L{constructor(_0x453762,_0x4b24b6,_0x1b5d8e,_0x575d7a,_0x10afb9,_0x5114f2,_0x1fbc7c,_0xe3c3c3,_0x3b986,_0x19da98,_0x4f7165,_0x387090,_0x12c311,_0x235a6c,_0x57423e){super(_0x453762,_0x1b5d8e,_0x4b24b6,_0x575d7a,_0x10afb9,_0x5114f2,_0x1fbc7c,_0x3b986,_0x19da98,_0x4f7165,_0x387090,_0x12c311,_0x235a6c,_0x57423e),this['unitID']=_0x453762,this['type']=_0x4b24b6,this['_sheetTransformSelectionsService']=_0xe3c3c3;}[_0x2b4704(0x2a7)](){const _0x20af2f=_0x2b4704;let _0x5b3b6f=super[_0x20af2f(0x2a7)]();return _0x5b3b6f[_0x20af2f(0x2eb)]=_0x5c1c0c=>this[_0x20af2f(0x14f)]['transformSelections'](_0x5c1c0c),_0x5b3b6f;}async[_0x2b4704(0x28a)](){const _0x1763bb=_0x2b4704;let _0x418426=await super[_0x1763bb(0x28a)]();return this[_0x1763bb(0x115)](this[_0x1763bb(0x340)][_0x1763bb(0x10a)]((_0x2227bd,_0x21da4c)=>{const _0x3eb3ee=_0x1763bb;if(_0x2227bd[_0x3eb3ee(0x15c)]!==n[_0x3eb3ee(0x2e2)]['MUTATION']||_0x21da4c!=null&&_0x21da4c[_0x3eb3ee(0x39c)]||_0x21da4c!=null&&_0x21da4c[_0x3eb3ee(0xfa)])return;let _0x369fd3=_0x2227bd[_0x3eb3ee(0x3bf)];if((_0x369fd3==null?void 0x0:_0x369fd3[_0x3eb3ee(0x19e)])!==this[_0x3eb3ee(0x37b)])return;let _0x1cad73=_0x2227bd,_0x5726fd=this[_0x3eb3ee(0x25e)][_0x3eb3ee(0x185)][_0x3eb3ee(0x2dc)](this[_0x3eb3ee(0x25e)][_0x3eb3ee(0x185)][_0x3eb3ee(0xff)]()[_0x3eb3ee(0x33c)])([_0x1cad73],this['_univerInstanceService'])||[_0x1cad73];this['_onLocalMutation'](_0x5726fd[0x0]);})),_0x418426;}};z=b([y(0x3,(0x0,n[_0x2b4704(0x1ce)])(n['Injector'])),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x132)])),y(0x5,(0x0,n['Inject'])(n[_0x2b4704(0x1a3)])),y(0x6,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x136)])),y(0x7,(0x0,n['Inject'])(w)),y(0x8,(0x0,n[_0x2b4704(0x1ce)])(v)),y(0x9,n[_0x2b4704(0x3a9)]),y(0xa,n['ILogService']),y(0xb,n[_0x2b4704(0x378)]),y(0xc,n[_0x2b4704(0x376)]),y(0xd,(0x0,n['Optional'])(T)),y(0xe,(0x0,n['Optional'])(C))],z);let B=class extends L{constructor(_0x4e7eba,_0x138e76,_0x594803,_0x537b19,_0x98b713,_0x5708a3,_0x161454,_0x344cce,_0x5507ee,_0x58e284,_0x51e406,_0x2e516b,_0x5191cc,_0x25d305){const _0x1cf3da=_0x2b4704;super(_0x4e7eba,_0x594803,_0x138e76,_0x537b19,_0x98b713,_0x5708a3,_0x161454,_0x344cce,_0x5507ee,_0x58e284,_0x51e406,_0x2e516b,_0x5191cc,_0x25d305),this[_0x1cf3da(0x37b)]=_0x4e7eba,this[_0x1cf3da(0x15c)]=_0x138e76;}async[_0x2b4704(0x28a)](){const _0x2da085=_0x2b4704;let _0x3f8a94=await super[_0x2da085(0x28a)]();return this[_0x2da085(0x115)](this[_0x2da085(0x340)][_0x2da085(0x10a)]((_0x340a02,_0x2bd93f)=>{const _0x19a40a=_0x2da085;if(_0x340a02[_0x19a40a(0x15c)]!==n[_0x19a40a(0x2e2)][_0x19a40a(0x3d9)]||_0x2bd93f!=null&&_0x2bd93f[_0x19a40a(0x39c)]||_0x2bd93f!=null&&_0x2bd93f[_0x19a40a(0xfa)])return;let _0x28ca25=_0x340a02[_0x19a40a(0x3bf)];if((_0x28ca25==null?void 0x0:_0x28ca25[_0x19a40a(0x19e)])!==this[_0x19a40a(0x37b)])return;let _0x51ea42=_0x340a02,_0x1ff9ab=this[_0x19a40a(0x25e)][_0x19a40a(0x185)][_0x19a40a(0x2dc)](this[_0x19a40a(0x25e)][_0x19a40a(0x185)][_0x19a40a(0xff)]()[_0x19a40a(0x33c)])([_0x51ea42],this['_univerInstanceService'])||[_0x51ea42];this[_0x19a40a(0x237)](_0x1ff9ab[0x0]);})),_0x3f8a94;}};B=b([y(0x3,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(t[_0x2b4704(0x132)])),y(0x5,(0x0,n['Inject'])(n[_0x2b4704(0x1a3)])),y(0x6,(0x0,n[_0x2b4704(0x1ce)])(t['RevisionService'])),y(0x7,(0x0,n['Inject'])(v)),y(0x8,n[_0x2b4704(0x3a9)]),y(0x9,n[_0x2b4704(0x2ac)]),y(0xa,n[_0x2b4704(0x378)]),y(0xb,n[_0x2b4704(0x376)]),y(0xc,(0x0,n[_0x2b4704(0x1d7)])(T)),y(0xd,(0x0,n['Optional'])(C))],B);const Pe=(0x0,n[_0x2b4704(0x1d9)])(_0x2b4704(0x187));function Fe(_0x5f3116){const _0x47d116=_0x2b4704;let _0x25334f=_0x5f3116[_0x47d116(0x27c)],_0x95bb61=JSON['parse'](_0x25334f);switch(_0x95bb61[_0x47d116(0x28f)]){case o['CombCmd'][_0x47d116(0x2e3)]:case o[_0x47d116(0x329)][_0x47d116(0x3dd)]:{let _0x5d6723=_0x95bb61['infoRsp'];return{..._0x95bb61,'data':_0x5d6723,'cmd':_0x95bb61[_0x47d116(0x28f)]};}case o[_0x47d116(0x329)][_0x47d116(0x318)]:{let _0x1de6ef=_0x95bb61[_0x47d116(0x12e)];return{..._0x95bb61,'data':_0x1de6ef,'cmd':_0x95bb61['cmd']};}case o[_0x47d116(0x329)][_0x47d116(0x30d)]:{let _0x4bfe13=_0x95bb61[_0x47d116(0x186)];switch(_0x4bfe13[_0x47d116(0x1da)]){case t[_0x47d116(0x30b)]['PERMISSION_REJ']:var _0x587fe6;return{..._0x95bb61,'data':{..._0x4bfe13,'data':(_0x587fe6=_0x4bfe13['permissionRejEvent'])==null?void 0x0:_0x587fe6['cs']},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t['CollaborationEvent'][_0x47d116(0x221)]:var _0x20faf6;return{..._0x95bb61,'data':{..._0x4bfe13,'data':(_0x20faf6=_0x4bfe13['csAckEvent'])==null?void 0x0:_0x20faf6['cs']},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t[_0x47d116(0x30b)][_0x47d116(0x2a5)]:var _0x526252;return{..._0x95bb61,'data':{..._0x4bfe13,'data':(_0x526252=_0x4bfe13[_0x47d116(0x2c2)])==null?void 0x0:_0x526252['cs']},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t[_0x47d116(0x30b)][_0x47d116(0x3a1)]:var _0x47308f;return{..._0x95bb61,'data':{..._0x4bfe13,'data':(_0x47308f=_0x4bfe13[_0x47d116(0x2aa)])==null?void 0x0:_0x47308f['cs']},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t[_0x47d116(0x30b)][_0x47d116(0x35d)]:var _0x1a27c8;return{..._0x95bb61,'data':{..._0x4bfe13,'data':(_0x1a27c8=_0x4bfe13[_0x47d116(0x1e3)])==null?void 0x0:_0x1a27c8['cs']},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t[_0x47d116(0x30b)][_0x47d116(0x205)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13['updateCursorEvent']},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t['CollaborationEvent'][_0x47d116(0x1a8)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13['joinEvent']},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t[_0x47d116(0x30b)]['USERS_LEAVE']:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13[_0x47d116(0x348)]},'cmd':_0x95bb61['cmd']};case t['CollaborationEvent'][_0x47d116(0x249)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13[_0x47d116(0x207)]},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t[_0x47d116(0x30b)][_0x47d116(0x15b)]:case t[_0x47d116(0x30b)][_0x47d116(0x17a)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13[_0x47d116(0x3da)]},'cmd':_0x95bb61['cmd']};case t['CollaborationEvent'][_0x47d116(0x2e0)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13[_0x47d116(0x207)]},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t['CollaborationEvent']['MSG_FOR_ERROR']:return{..._0x95bb61,'data':_0x4bfe13,'cmd':_0x95bb61['cmd']};case t[_0x47d116(0x30b)][_0x47d116(0x257)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13[_0x47d116(0x164)]},'cmd':_0x95bb61['cmd']};case t[_0x47d116(0x30b)][_0x47d116(0x2c9)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13[_0x47d116(0x20b)]},'cmd':_0x95bb61['cmd']};case t[_0x47d116(0x30b)][_0x47d116(0x28b)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13[_0x47d116(0x21c)]},'cmd':_0x95bb61[_0x47d116(0x28f)]};case t[_0x47d116(0x30b)][_0x47d116(0x3ae)]:return{..._0x95bb61,'data':{..._0x4bfe13,'data':_0x4bfe13['uniscriptRunEvent']},'cmd':_0x95bb61[_0x47d116(0x28f)]};default:return _0x95bb61;}}default:return _0x95bb61;}}function Ie(_0x16552e){const _0x25fe67=_0x2b4704;switch(_0x16552e[_0x25fe67(0x28f)]){case o[_0x25fe67(0x329)][_0x25fe67(0x2e3)]:case o[_0x25fe67(0x329)][_0x25fe67(0x3dd)]:return JSON[_0x25fe67(0x22b)]({'cmd':_0x16552e[_0x25fe67(0x28f)],'routeKey':_0x16552e[_0x25fe67(0x224)]});case o['CombCmd'][_0x25fe67(0x2f6)]:{let _0x2995a5;switch(_0x16552e[_0x25fe67(0x27c)][_0x25fe67(0x1da)]){case t['CollaborationEvent'][_0x25fe67(0x205)]:_0x2995a5={'eventID':t['CollaborationEvent'][_0x25fe67(0x205)],'updateCursorEvent':_0x16552e[_0x25fe67(0x27c)][_0x25fe67(0x27c)]};break;case t[_0x25fe67(0x30b)][_0x25fe67(0x35c)]:_0x2995a5={'eventID':t['CollaborationEvent'][_0x25fe67(0x35c)],'leaveEvent':_0x16552e[_0x25fe67(0x27c)][_0x25fe67(0x27c)]};break;case t[_0x25fe67(0x30b)][_0x25fe67(0x1a8)]:_0x2995a5={'eventID':t[_0x25fe67(0x30b)][_0x25fe67(0x1a8)],'joinEvent':_0x16552e[_0x25fe67(0x27c)][_0x25fe67(0x27c)]};break;case t[_0x25fe67(0x30b)]['LIVESHARE_NEW_HOST']:_0x2995a5={'eventID':t[_0x25fe67(0x30b)][_0x25fe67(0x249)],'liveShareNewHost':_0x16552e['data'][_0x25fe67(0x27c)]};break;case t['CollaborationEvent'][_0x25fe67(0x17a)]:_0x2995a5={'eventID':t[_0x25fe67(0x30b)][_0x25fe67(0x17a)],'liveShareOperation':_0x16552e[_0x25fe67(0x27c)]['data']};break;case t[_0x25fe67(0x30b)][_0x25fe67(0x2e0)]:_0x2995a5={'eventID':t[_0x25fe67(0x30b)][_0x25fe67(0x2e0)],'liveShareTerminate':_0x16552e['data']['data']};break;case t[_0x25fe67(0x30b)]['LIVESHARE_REQUEST_HOST']:_0x2995a5={'eventID':t['CollaborationEvent'][_0x25fe67(0x298)],'liveShareRequestHost':_0x16552e[_0x25fe67(0x27c)]['data']};break;case t['CollaborationEvent'][_0x25fe67(0x15b)]:_0x2995a5={'eventID':t[_0x25fe67(0x30b)][_0x25fe67(0x15b)]};break;default:_0x2995a5={'eventID':_0x16552e['data']['eventID']};}return JSON[_0x25fe67(0x22b)]({'cmd':_0x16552e['cmd'],'routeKey':_0x16552e[_0x25fe67(0x224)],'collaMsg':_0x2995a5});}case o[_0x25fe67(0x329)][_0x25fe67(0x318)]:return JSON[_0x25fe67(0x22b)]({'cmd':_0x16552e[_0x25fe67(0x28f)],'routeKey':_0x16552e[_0x25fe67(0x224)],'joinReq':_0x16552e[_0x25fe67(0x27c)]});case o[_0x25fe67(0x329)][_0x25fe67(0x2af)]:return JSON[_0x25fe67(0x22b)]({'cmd':_0x16552e[_0x25fe67(0x28f)],'routeKey':_0x16552e[_0x25fe67(0x224)],'leaveReq':_0x16552e[_0x25fe67(0x27c)]});default:throw Error('[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!');}}const Le=(0x0,n[_0x2b4704(0x1d9)])(_0x2b4704(0x1f8));function Re(_0x16f56b,_0x2aa183,_0x3e8fb7){const _0x46cbb8=_0x2b4704;return _0x16f56b+'/'+_0x2aa183+_0x46cbb8(0x231)+_0x3e8fb7+_0x46cbb8(0x10f);}let ze=class extends n[_0x2b4704(0x274)]{constructor(_0x10d07c,_0x3c8872,_0x1b1a16,_0x54d145,_0x7dc0b){const _0x55d06d=_0x2b4704;super(),this[_0x55d06d(0x3de)]=_0x10d07c,this[_0x55d06d(0x3c7)]=_0x3c8872,this['_configService']=_0x1b1a16,this[_0x55d06d(0x35b)]=_0x54d145,this[_0x55d06d(0xfb)]=_0x7dc0b;}['_doCreateSocket'](_0x2a9b70){const _0x50dc96=_0x2b4704;let _0x49435a=this[_0x50dc96(0x3de)][_0x50dc96(0x287)](u[_0x50dc96(0x304)]);if(!_0x49435a)throw Error('[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!');let _0x12cac0=_0x49435a[_0x50dc96(0x1b3)](_0x2a9b70);if(!_0x12cac0)throw Error(_0x50dc96(0x1d5));let _0xc7bf7e=new n[(_0x50dc96(0x1cc))](),_0x10da7c=new a[(_0x50dc96(0x119))]();_0xc7bf7e['add'](_0x12cac0[_0x50dc96(0x360)]['subscribe'](_0x5604d2=>_0x10da7c[_0x50dc96(0x383)](_0x5604d2))),_0xc7bf7e[_0x50dc96(0x20c)]((0x0,n[_0x50dc96(0x2bb)])(()=>_0x10da7c[_0x50dc96(0x391)]()));let _0x2b827e=new a[(_0x50dc96(0x119))]();_0xc7bf7e[_0x50dc96(0x20c)](_0x12cac0[_0x50dc96(0x363)][_0x50dc96(0x169)](_0x264191=>_0x2b827e[_0x50dc96(0x383)](_0x264191))),_0xc7bf7e[_0x50dc96(0x20c)]((0x0,n['toDisposable'])(()=>_0x2b827e['complete']()));let _0xae0447=new a['Subject']();_0xc7bf7e[_0x50dc96(0x20c)](_0x12cac0['message$'][_0x50dc96(0x169)](_0x30f87c=>{const _0x17dead=_0x50dc96;let _0x2d86d5=Fe(_0x30f87c);_0xae0447[_0x17dead(0x383)](_0x2d86d5);})),_0xc7bf7e[_0x50dc96(0x20c)]((0x0,n[_0x50dc96(0x2bb)])(()=>_0xae0447[_0x50dc96(0x391)]()));let _0x2be463,_0x121468=()=>{const _0x1a85fa=_0x50dc96;_0x2b827e[_0x1a85fa(0x383)](new Event(_0x1a85fa(0x2dd))),_0x10da7c[_0x1a85fa(0x383)](new Event(_0x1a85fa(0x2dd))),_0x2be463['close']();};return _0x2be463={'memberID':'','close$':_0x10da7c['asObservable'](),'error$':_0x2b827e[_0x50dc96(0x171)](),'open$':_0x12cac0[_0x50dc96(0x211)],'message$':_0xae0447[_0x50dc96(0x171)](),'send':_0x221cf2=>{const _0x48ff89=_0x50dc96;if(_0x221cf2[_0x48ff89(0x28f)]===o[_0x48ff89(0x329)]['INGEST']){if(_0x221cf2['data'][_0x48ff89(0x1da)]===t[_0x48ff89(0x30b)]['SUBMIT_CHANGESET']){this[_0x48ff89(0x1e8)](_0x2be463,_0x221cf2['data'])['catch'](_0x32fb42=>{const _0x319b7c=_0x48ff89;this[_0x319b7c(0x35b)][_0x319b7c(0x2b8)](_0x32fb42),_0x121468();});return;}if(_0x221cf2[_0x48ff89(0x27c)][_0x48ff89(0x1da)]===t[_0x48ff89(0x30b)][_0x48ff89(0x270)]){let _0x380ae9=_0x221cf2[_0x48ff89(0x27c)];this[_0x48ff89(0x180)](_0x380ae9)['then'](_0x4cff86=>{const _0x201a11=_0x48ff89;_0xae0447[_0x201a11(0x383)]({'cmd':o[_0x201a11(0x329)][_0x201a11(0x30d)],'code':o[_0x201a11(0x371)]['OK'],'routeKey':_0x380ae9['data'][_0x201a11(0x37b)],'routeType':'','data':{'eventID':t[_0x201a11(0x30b)][_0x201a11(0x156)],'data':{'changesets':_0x4cff86}}});})[_0x48ff89(0x313)](_0x1c95cb=>{const _0x1fdd69=_0x48ff89;this[_0x1fdd69(0x35b)][_0x1fdd69(0x2b8)](_0x1c95cb),_0x121468();});return;}}_0x12cac0[_0x48ff89(0x3d4)](Ie(_0x221cf2));},'close':()=>{const _0x380f6e=_0x50dc96;_0x12cac0['close'](),_0xc7bf7e[_0x380f6e(0x2cf)]();}},_0x2be463;}async[_0x2b4704(0x1e8)](_0x579a56,_0x55eb5a){const _0x1544df=_0x2b4704;var _0x58e1a0;let {unitType:_0x2d7e10,unitID:_0x523e8c,changeset:_0x2b7799}=_0x55eb5a[_0x1544df(0x27c)],_0x55a7dc={'unitID':_0x523e8c,'memberID':_0x579a56[_0x1544df(0x303)],'type':_0x2d7e10,'changeset':(0x0,t[_0x1544df(0x1c2)])(_0x2b7799)},_0x4486db=this['_configService'][_0x1544df(0x18e)](h),_0x3e1aac=Re((_0x58e1a0=_0x4486db==null?void 0x0:_0x4486db['collabSubmitChangesetUrl'])==null?_0x1544df(0x163):_0x58e1a0,_0x2d7e10,_0x523e8c);try{await this[_0x1544df(0x3c7)][_0x1544df(0x2e7)](_0x3e1aac,{'body':_0x55a7dc});}catch(_0xe98d61){throw this[_0x1544df(0x35b)][_0x1544df(0x2b8)](_0x1544df(0x3ab),_0x1544df(0x315)),_0xe98d61;}}async[_0x2b4704(0x180)](_0x5a6731){const _0x130a38=_0x2b4704;let {unitID:_0x15beb1,from:_0x1235e9,to:_0x450c32,unitType:_0x65f03c}=_0x5a6731['data'];return(await this[_0x130a38(0xfb)][_0x130a38(0x1c7)]({'metadata':void 0x0},{'unitID':_0x15beb1,'type':_0x65f03c,'from':_0x1235e9,'to':_0x450c32}))['changesets'][_0x130a38(0x2c1)](_0x4b5aad=>((_0x4b5aad[_0x130a38(0x296)]===null||_0x4b5aad[_0x130a38(0x296)]===void 0x0)&&(_0x4b5aad[_0x130a38(0x296)]=[]),_0x4b5aad));}};ze=b([y(0x0,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x1,(0x0,n[_0x2b4704(0x1ce)])(u[_0x2b4704(0x28e)])),y(0x2,n[_0x2b4704(0x309)]),y(0x3,n[_0x2b4704(0x2ac)]),y(0x4,t[_0x2b4704(0x38c)])],ze);let V=class extends n[_0x2b4704(0x274)]{get['_socket'](){const _0x34be94=_0x2b4704;return this['_socket$'][_0x34be94(0x19f)]();}constructor(_0x5beab8,_0x4f45f0,_0x1a374e,_0x2d68c5,_0x245514,_0x1373f5){const _0x1edc18=_0x2b4704;super(),this[_0x1edc18(0x3de)]=_0x5beab8,this['_logService']=_0x4f45f0,this[_0x1edc18(0x1d8)]=_0x1a374e,this[_0x1edc18(0x18a)]=_0x2d68c5,this[_0x1edc18(0x38e)]=_0x245514,this[_0x1edc18(0x2a3)]=_0x1373f5,_(this,_0x1edc18(0x338),new a['BehaviorSubject'](void 0x0)),_(this,'socket$',this[_0x1edc18(0x338)][_0x1edc18(0x171)]()),_(this,_0x1edc18(0x32e),null),_(this,_0x1edc18(0x2b2),new Map()),_(this,'_status$',new a['BehaviorSubject'](0x0)),_(this,_0x1edc18(0x199),this[_0x1edc18(0x24d)][_0x1edc18(0x171)]()),_(this,_0x1edc18(0x1f2),!0x1),_(this,_0x1edc18(0x203),void 0x0),_(this,_0x1edc18(0x198),0x0),_(this,_0x1edc18(0x167),null),_(this,_0x1edc18(0x143),void 0x0),_(this,_0x1edc18(0x3a5),void 0x0),this[_0x1edc18(0xf7)]();}[_0x2b4704(0xf7)](){const _0x550296=_0x2b4704;this[_0x550296(0x2a3)]&&this[_0x550296(0x115)](this[_0x550296(0x2a3)][_0x550296(0x2bc)][_0x550296(0x169)](_0x2aafd0=>{const _0x5c1039=_0x550296;_0x2aafd0&&!this[_0x5c1039(0x280)]&&this[_0x5c1039(0x1ab)](),_0x2aafd0||this[_0x5c1039(0x104)]();}));}[_0x2b4704(0x2cf)](){const _0x4cbf4a=_0x2b4704;var _0x2f2eed;super[_0x4cbf4a(0x2cf)](),(_0x2f2eed=this['_socketMessageSubscription'])==null||_0x2f2eed[_0x4cbf4a(0x269)](),this['_socketMessageSubscription']=null,this['_clearRetryConnectingTimer'](),this[_0x4cbf4a(0x3a6)](),this[_0x4cbf4a(0x1d2)](),this[_0x4cbf4a(0x2b2)]['forEach'](_0x57fb1d=>_0x57fb1d['dispose']()),this[_0x4cbf4a(0x2b2)]['clear'](),this[_0x4cbf4a(0x24d)][_0x4cbf4a(0x391)]();}async['requireSession'](_0x20e9ef){const _0x57c228=_0x2b4704;if(this[_0x57c228(0x2b2)][_0x57c228(0x1ae)](_0x20e9ef))return this[_0x57c228(0x2b2)][_0x57c228(0x287)](_0x20e9ef);this[_0x57c228(0x157)]();let _0x2cfb0a=this[_0x57c228(0x3de)][_0x57c228(0x2b6)](S,_0x20e9ef,this[_0x57c228(0x338)]['asObservable']());return this[_0x57c228(0x2b2)][_0x57c228(0x399)](_0x20e9ef,_0x2cfb0a),_0x2cfb0a;}[_0x2b4704(0x361)](_0x19dfa0){const _0x548b7f=_0x2b4704;let _0x19f1f5=this[_0x548b7f(0x2b2)][_0x548b7f(0x287)](_0x19dfa0);if(_0x19f1f5&&(this[_0x548b7f(0x2b2)]['delete'](_0x19dfa0),_0x19f1f5['close']()),!this[_0x548b7f(0x2b2)][_0x548b7f(0x155)]){var _0x41c697;(_0x41c697=this[_0x548b7f(0x280)])==null||_0x41c697[_0x548b7f(0x26d)]();}}[_0x2b4704(0x1ab)](){const _0x5063db=_0x2b4704;this[_0x5063db(0x198)]=0x0,this[_0x5063db(0x266)](),this['_tryReconnect']();}[_0x2b4704(0x266)](){const _0x1bfedc=_0x2b4704;this[_0x1bfedc(0x203)]!=null&&(clearTimeout(this[_0x1bfedc(0x203)]),this[_0x1bfedc(0x203)]=null);}async[_0x2b4704(0x151)](){const _0x3a164b=_0x2b4704;var _0x118c5d;let _0x288d47=this['_configService'][_0x3a164b(0x18e)](h),_0x12694b=(_0x118c5d=_0x288d47==null?void 0x0:_0x288d47[_0x3a164b(0x359)])==null?te:_0x118c5d,_0x160a42=await this[_0x3a164b(0x18a)][_0x3a164b(0x1b3)](_0x12694b);return this[_0x3a164b(0x32e)]=_0x160a42,_0x160a42;}async[_0x2b4704(0x157)](){const _0x425602=_0x2b4704;try{var _0x1f57cd,_0x4e4377;let _0x3877=(_0x1f57cd=(_0x4e4377=this[_0x425602(0x280)])==null?this[_0x425602(0x32e)]:_0x4e4377)==null?await this[_0x425602(0x151)]():_0x1f57cd;if(_0x3877){var _0x413ccc;let _0x25f7f6=_0x3877['send'];_0x3877[_0x425602(0x3d4)]=_0x55c504=>(_0x55c504[_0x425602(0x28f)]!==o[_0x425602(0x329)]['LEAVE']&&this[_0x425602(0x351)](),_0x25f7f6[_0x425602(0x2d2)](_0x3877,[_0x55c504])),(_0x413ccc=this[_0x425602(0x167)])==null||_0x413ccc[_0x425602(0x269)](),this[_0x425602(0x167)]=null,this['_socketMessageSubscription']=_0x3877['message$'][_0x425602(0x169)](_0x491c3c=>this['_onMessage'](_0x3877,_0x491c3c)),_0x3877['error$'][_0x425602(0x200)]((0x0,c[_0x425602(0x346)])(0x1))[_0x425602(0x169)](_0x284be3=>this[_0x425602(0x35b)][_0x425602(0x2b8)](_0x425602(0x1d3),_0x284be3)),_0x3877[_0x425602(0x211)][_0x425602(0x200)]((0x0,c[_0x425602(0x346)])(0x1))[_0x425602(0x169)](()=>{const _0x29ab98=_0x425602;this[_0x29ab98(0x259)](_0x3877);}),_0x3877[_0x425602(0x360)][_0x425602(0x200)]((0x0,c['take'])(0x1))[_0x425602(0x169)](_0x5a2633=>{const _0x18f051=_0x425602;this[_0x18f051(0x35b)]['debug'](_0x18f051(0x312),_0x18f051(0x354),_0x5a2633),this[_0x18f051(0x175)]();});}}catch(_0x403812){this[_0x425602(0x35b)][_0x425602(0x2b8)](_0x403812),this['_onConnectionFailed']();}}['_onConnectionOpen'](_0x1f6409){const _0x4a98f1=_0x2b4704;this['_logService'][_0x4a98f1(0x216)]('[CollaborationSessionService]',_0x4a98f1(0x12b)),_0x1f6409[_0x4a98f1(0x3d4)]({'cmd':o[_0x4a98f1(0x329)][_0x4a98f1(0x3dd)]}),this[_0x4a98f1(0x351)]();}['_onOffline'](){const _0x50af58=_0x2b4704;this['_socketReady']=!0x1,this[_0x50af58(0x32e)]=null,this[_0x50af58(0x24d)]['next'](0x2),this['_socket$']['next'](null),this[_0x50af58(0x3a6)](),this['_clearHeartbeatTimer']();}[_0x2b4704(0x175)](){const _0x547a5d=_0x2b4704;var _0x20d780;this['_onOffline'](),this[_0x547a5d(0x198)]<((_0x20d780=this['_configService'][_0x547a5d(0x18e)](_0x547a5d(0x101)))==null?0x3:_0x20d780)?(this['_collaborationUIEventService'][_0x547a5d(0x2b4)]({'id':'SOCKET_FAILED_RETRY'}),this[_0x547a5d(0x352)]()):this[_0x547a5d(0x38e)][_0x547a5d(0x2b4)]({'id':'SOCKET_FAILED'});}[_0x2b4704(0x352)](){const _0x5ac28d=_0x2b4704;var _0x1c80b9;let _0x2e002b=this[_0x5ac28d(0x198)],_0x3d426b=this['_configService'][_0x5ac28d(0x18e)](h),_0x28bc7b=_0x2e002b===0x0?0x0:((_0x1c80b9=_0x3d426b==null?void 0x0:_0x3d426b[_0x5ac28d(0x306)])==null?0x4e20:_0x1c80b9)*0x2**_0x2e002b;this['_retryConnectingTimer']=setTimeout(()=>{const _0x14100b=_0x5ac28d;clearTimeout(this[_0x14100b(0x203)]),this[_0x14100b(0x203)]=null,this['_tryEnsureSocket']();},_0x28bc7b),this[_0x5ac28d(0x198)]+=0x1;}[_0x2b4704(0x341)](_0x1d1e27,_0x379e48){const _0x598469=_0x2b4704;let {cmd:_0xf91e9a}=_0x379e48;_0xf91e9a===o[_0x598469(0x329)][_0x598469(0x3dd)]&&!this[_0x598469(0x1f2)]&&(_0x1d1e27[_0x598469(0x303)]=_0x379e48[_0x598469(0x27c)][_0x598469(0x303)],this[_0x598469(0x338)][_0x598469(0x383)](_0x1d1e27),this[_0x598469(0x24d)][_0x598469(0x383)](0x3),this[_0x598469(0x1f2)]=!0x0,this[_0x598469(0x32e)]=null),_0xf91e9a===o[_0x598469(0x329)][_0x598469(0x2e3)]&&this[_0x598469(0x3a6)](),this[_0x598469(0x351)]();}[_0x2b4704(0x351)](){const _0x4f078d=_0x2b4704;var _0x5013a0;this[_0x4f078d(0x1d2)](),this[_0x4f078d(0x143)]=setTimeout(()=>this[_0x4f078d(0x35e)](),(_0x5013a0=this[_0x4f078d(0x1d8)]['getConfig'](_0x4f078d(0x183)))==null?0x7530:_0x5013a0);}[_0x2b4704(0x35e)](){const _0x471fd7=_0x2b4704;this[_0x471fd7(0x280)]['send']({'cmd':o[_0x471fd7(0x329)][_0x471fd7(0x2e3)]}),this[_0x471fd7(0x19d)]();}[_0x2b4704(0x19d)](){const _0x169f1c=_0x2b4704;var _0xeeb5d5;this[_0x169f1c(0x3a5)]=setTimeout(()=>this[_0x169f1c(0x175)](),(_0xeeb5d5=this[_0x169f1c(0x1d8)][_0x169f1c(0x18e)](_0x169f1c(0x204)))==null?ne:_0xeeb5d5);}[_0x2b4704(0x1d2)](){const _0x309131=_0x2b4704;this[_0x309131(0x143)]!=null&&(clearTimeout(this[_0x309131(0x143)]),this[_0x309131(0x143)]=null);}[_0x2b4704(0x3a6)](){const _0x558a9a=_0x2b4704;this[_0x558a9a(0x3a5)]!=null&&(clearTimeout(this[_0x558a9a(0x3a5)]),this['_timeoutTimer']=null);}};V=b([y(0x0,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x1,n[_0x2b4704(0x2ac)]),y(0x2,n[_0x2b4704(0x309)]),y(0x3,Le),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(v)),y(0x5,(0x0,n[_0x2b4704(0x1d7)])(Pe))],V);let H=class extends n[_0x2b4704(0x2a0)]{constructor(_0x44571b,_0x3aa842,_0xb9f3dd,_0xfcc535){const _0x43b3f9=_0x2b4704;var _0x423ed0;super(),this['_injector']=_0x44571b,this['_collabSessionService']=_0x3aa842,this['_configService']=_0xb9f3dd,this[_0x43b3f9(0x2fb)]=_0xfcc535,_(this,_0x43b3f9(0x3c8),new Map()),_(this,_0x43b3f9(0x1f6),new a[(_0x43b3f9(0x119))]()),_(this,'entityInit$',this[_0x43b3f9(0x1f6)][_0x43b3f9(0x171)]()),((_0x423ed0=this[_0x43b3f9(0x1d8)]['getConfig'](_0x43b3f9(0x3a2)))==null?void 0x0:_0x423ed0[_0x43b3f9(0x20e)])!==!0x1&&this[_0x43b3f9(0x28a)]();}[_0x2b4704(0x2cf)](){const _0x44fe9c=_0x2b4704;super[_0x44fe9c(0x2cf)](),this[_0x44fe9c(0x3c8)][_0x44fe9c(0x24e)](_0x51ee36=>_0x51ee36[_0x44fe9c(0x2cf)]()),this[_0x44fe9c(0x3c8)][_0x44fe9c(0x2de)]();}['getCollabEntity'](_0x6bc090){const _0x241178=_0x2b4704;var _0x79d75b;return(_0x79d75b=this[_0x241178(0x3c8)]['get'](_0x6bc090))==null?null:_0x79d75b;}[_0x2b4704(0x2d8)](_0xa9f999){const _0x35f40e=_0x2b4704;let _0x51cb9e=this[_0x35f40e(0x27f)](_0xa9f999);return _0x51cb9e?(0x0,a['of'])(_0x51cb9e):this[_0x35f40e(0x1f6)][_0x35f40e(0x200)]((0x0,c[_0x35f40e(0x245)])(_0x1bfc12=>_0x1bfc12[_0x35f40e(0x37b)]===_0xa9f999));}[_0x2b4704(0x138)](_0xe59fc9){const _0x534f85=_0x2b4704;return(0x0,a['firstValueFrom'])(this['getCollabEntity$'](_0xe59fc9)[_0x534f85(0x200)]((0x0,c['map'])(()=>void 0x0)));}['_init'](){const _0x28372d=_0x2b4704;this[_0x28372d(0x2fb)][_0x28372d(0x3c5)](n[_0x28372d(0x372)][_0x28372d(0x375)])[_0x28372d(0x200)]((0x0,a[_0x28372d(0x395)])(this[_0x28372d(0x37e)]),(0x0,c['delay'])(0x10))[_0x28372d(0x169)](async _0x6b7449=>{const _0xaffd79=_0x28372d;let _0x419627=_0x6b7449[_0xaffd79(0x202)][_0xaffd79(0x17c)](),_0x230d94=await this[_0xaffd79(0x122)](_0x419627,n[_0xaffd79(0x372)][_0xaffd79(0x375)]);this[_0xaffd79(0x3c8)][_0xaffd79(0x399)](_0x419627,_0x230d94);}),this[_0x28372d(0x2fb)][_0x28372d(0x3c5)](n[_0x28372d(0x372)][_0x28372d(0x299)])['pipe']((0x0,a['takeUntil'])(this[_0x28372d(0x37e)]),(0x0,c['delay'])(0x10))[_0x28372d(0x200)]((0x0,c[_0x28372d(0x245)])(_0x10321a=>!_0x10321a[_0x28372d(0x202)][_0x28372d(0x17c)]()[_0x28372d(0x1b6)]('__')))['subscribe'](async _0x315d3a=>{const _0x199bc3=_0x28372d;let _0x323790=_0x315d3a[_0x199bc3(0x202)][_0x199bc3(0x17c)](),_0x2a2760=await this[_0x199bc3(0x122)](_0x323790,n[_0x199bc3(0x372)]['UNIVER_DOC']);this['_entities'][_0x199bc3(0x399)](_0x323790,_0x2a2760);}),this[_0x28372d(0x2fb)]['getTypeOfUnitAdded$'](n[_0x28372d(0x372)]['UNIVER_SLIDE'])['pipe']((0x0,a[_0x28372d(0x395)])(this[_0x28372d(0x37e)]),(0x0,c['delay'])(0x10))[_0x28372d(0x169)](async _0x3a415e=>{const _0x129fb1=_0x28372d;let _0x2cbbef=_0x3a415e['unit'][_0x129fb1(0x17c)](),_0x1a1a2a=await this[_0x129fb1(0x122)](_0x2cbbef,n[_0x129fb1(0x372)]['UNIVER_SLIDE']);this[_0x129fb1(0x3c8)][_0x129fb1(0x399)](_0x2cbbef,_0x1a1a2a);}),this[_0x28372d(0x2fb)]['getTypeOfUnitAdded$'](n[_0x28372d(0x372)][_0x28372d(0x288)])[_0x28372d(0x200)]((0x0,a[_0x28372d(0x395)])(this[_0x28372d(0x37e)]),(0x0,c[_0x28372d(0x3bb)])(0x10))[_0x28372d(0x169)](async _0x37f167=>{const _0x1f01d2=_0x28372d;let _0xe6e3b9=_0x37f167['unit'][_0x1f01d2(0x17c)](),_0x54f5a5=await this[_0x1f01d2(0x122)](_0xe6e3b9,n[_0x1f01d2(0x372)][_0x1f01d2(0x288)]);this[_0x1f01d2(0x3c8)][_0x1f01d2(0x399)](_0xe6e3b9,_0x54f5a5);}),(0x0,a[_0x28372d(0x112)])(this[_0x28372d(0x2fb)][_0x28372d(0x1a6)](n['UniverInstanceType'][_0x28372d(0x375)]),this[_0x28372d(0x2fb)][_0x28372d(0x1a6)](n['UniverInstanceType'][_0x28372d(0x299)]),this['_univerInstanceService'][_0x28372d(0x1a6)](n[_0x28372d(0x372)][_0x28372d(0x397)]),this[_0x28372d(0x2fb)]['getTypeOfUnitDisposed$'](n['UniverInstanceType'][_0x28372d(0x288)]))[_0x28372d(0x200)]((0x0,a[_0x28372d(0x395)])(this[_0x28372d(0x37e)]))[_0x28372d(0x169)](_0x3b509c=>{const _0xfc9acb=_0x28372d;let _0x16dca5=_0x3b509c[_0xfc9acb(0x17c)](),_0x180c93=this['_entities'][_0xfc9acb(0x287)](_0x16dca5);_0x180c93&&(_0x180c93[_0xfc9acb(0x2cf)](),this[_0xfc9acb(0x3c8)]['delete'](_0x16dca5));});}async[_0x2b4704(0x122)](_0x3ce537,_0x43bc87){const _0x3d12db=_0x2b4704;let _0x447bfa=await this[_0x3d12db(0x3e3)][_0x3d12db(0x358)](_0x3ce537),_0x23d1b9=this[_0x3d12db(0x3de)]['createInstance'](this[_0x3d12db(0x357)](_0x43bc87),_0x3ce537,_0x43bc87,_0x447bfa);return await _0x23d1b9[_0x3d12db(0x233)](),this['_entityInit$'][_0x3d12db(0x383)](_0x23d1b9),_0x23d1b9;}[_0x2b4704(0x357)](_0x44efcf){const _0x36602b=_0x2b4704;switch(_0x44efcf){case n[_0x36602b(0x372)]['UNIVER_DOC']:return R;case n[_0x36602b(0x372)][_0x36602b(0x375)]:return z;case n['UniverInstanceType'][_0x36602b(0x397)]:return B;case n[_0x36602b(0x372)][_0x36602b(0x288)]:return Ne;default:throw Error(_0x36602b(0x15e)+_0x44efcf);}}};H=b([y(0x0,(0x0,n[_0x2b4704(0x1ce)])(n['Injector'])),y(0x1,(0x0,n[_0x2b4704(0x1ce)])(V)),y(0x2,n[_0x2b4704(0x309)]),y(0x3,n[_0x2b4704(0x3a9)])],H);var Be=_0x2b4704(0x1ff),Ve=_0x2b4704(0x1f5);let He=class extends n[_0x2b4704(0x274)]{constructor(_0xebc0bb,_0x27a165){const _0x525559=_0x2b4704;super(),this[_0x525559(0x2fb)]=_0xebc0bb,this[_0x525559(0x1d8)]=_0x27a165,this[_0x525559(0x28a)]();}[_0x2b4704(0x28a)](){const _0x2c62fa=_0x2b4704;this['disposeWithMe'](this[_0x2c62fa(0x2fb)][_0x2c62fa(0x173)][_0x2c62fa(0x169)](()=>{const _0x3193e2=_0x2c62fa;var _0x45c110;let _0x27cbc7=this[_0x3193e2(0x2fb)][_0x3193e2(0x227)](),_0x35727e=(_0x45c110=this['_configService']['getConfig'](_0x3193e2(0x279)))==null?_0x3193e2(0x39a):_0x45c110;_0x27cbc7 instanceof n['Workbook']&&(_0x35727e=_0x27cbc7[_0x3193e2(0x111)]),document[_0x3193e2(0x1f3)]=_0x35727e;}));}};He=b([y(0x0,n['IUniverInstanceService']),y(0x1,n['IConfigService'])],He);let Ue=function(_0x4bda7d){const _0x3c37cf=_0x2b4704;return _0x4bda7d[_0x3c37cf(0x28d)]=_0x3c37cf(0x28d),_0x4bda7d['UUID']=_0x3c37cf(0x22e),_0x4bda7d['BASE64']=_0x3c37cf(0x31a),_0x4bda7d;}({});const We=(0x0,n[_0x2b4704(0x1d9)])(_0x2b4704(0x3bc));let U=class{constructor(_0xe1952,_0x289d97,_0x2635ed){const _0x5095e0=_0x2b4704;this[_0x5095e0(0x3c7)]=_0xe1952,this[_0x5095e0(0x1d8)]=_0x289d97,this[_0x5095e0(0x2fb)]=_0x2635ed;}['getUploadOptions'](){const _0x26c5f8=_0x2b4704;var _0x2cbbe4;return(_0x2cbbe4=this[_0x26c5f8(0x121)]()[_0x26c5f8(0x32c)])==null?{}:_0x2cbbe4;}async[_0x2b4704(0xf8)](_0x58537d){const _0x14ae93=_0x2b4704;let _0x689e42=this['getUploadOptions']();if(Ge(_0x58537d,_0x689e42),_0x689e42[_0x14ae93(0x2fa)])return _0x689e42[_0x14ae93(0x2fa)](_0x58537d);let _0x1de905=await this[_0x14ae93(0x13c)](_0x58537d);return{'id':_0x1de905,'name':_0x58537d[_0x14ae93(0x111)],'mimeType':_0x58537d[_0x14ae93(0x15c)],'size':_0x58537d[_0x14ae93(0x155)],'sourceType':_0x14ae93(0x22e),'source':_0x1de905};}async[_0x2b4704(0x13c)](_0x1492fe){const _0x124617=_0x2b4704;let _0x35cced=this['_univerInstanceService'][_0x124617(0x227)](),_0x4be091=_0x35cced==null?void 0x0:_0x35cced[_0x124617(0x17c)]();if(!_0x4be091)throw Error('[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.');let _0x57dc0b=new FormData();_0x57dc0b['append']('file',_0x1492fe);let _0x2ebd3e=this[_0x124617(0x22a)]()+'?size='+_0x1492fe[_0x124617(0x155)][_0x124617(0x21f)]()+_0x124617(0x342)+o[_0x124617(0x260)][_0x124617(0x2d4)]+_0x124617(0x1ba)+encodeURIComponent(_0x4be091),_0x5cd9fb=(await this[_0x124617(0x3c7)][_0x124617(0x2e7)](_0x2ebd3e,{'body':_0x57dc0b}))[_0x124617(0x1df)][_0x124617(0x113)];if(typeof _0x5cd9fb!=_0x124617(0x2e4)||!_0x5cd9fb)throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.');return _0x5cd9fb;}[_0x2b4704(0x22a)](){const _0x972169=_0x2b4704;var _0x48e615;return(_0x48e615=this[_0x972169(0x121)]()[_0x972169(0x345)])==null?_0x972169(0x137):_0x48e615;}[_0x2b4704(0x121)](){const _0x45685f=_0x2b4704;var _0x3517e8;return(_0x3517e8=this[_0x45685f(0x1d8)][_0x45685f(0x18e)](_0x45685f(0x3a2)))==null?{}:_0x3517e8;}};U=b([y(0x0,(0x0,n[_0x2b4704(0x1ce)])(u[_0x2b4704(0x28e)])),y(0x1,(0x0,n[_0x2b4704(0x1ce)])(n['IConfigService'])),y(0x2,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x3a9)]))],U);function Ge(_0x18581e,_0x5b6651){const _0x51ac56=_0x2b4704;var _0x470d18;if(_0x5b6651['maxSize']!=null&&_0x18581e[_0x51ac56(0x155)]>_0x5b6651[_0x51ac56(0x1c6)])throw Error(_0x51ac56(0x168));if((_0x470d18=_0x5b6651[_0x51ac56(0x1b9)])!=null&&_0x470d18[_0x51ac56(0x2f8)]&&!_0x5b6651[_0x51ac56(0x1b9)][_0x51ac56(0x25a)](_0x12739f=>_0x18581e[_0x51ac56(0x15c)]===_0x12739f||_0x18581e[_0x51ac56(0x111)][_0x51ac56(0x32b)](_0x12739f)||_0x12739f[_0x51ac56(0x32b)]('/*')&&_0x18581e['type']['startsWith'](_0x12739f['slice'](0x0,-0x1))))throw Error(_0x51ac56(0x1eb));}let W=class{constructor(_0xc88757,_0x328f1a,_0x315705){const _0x14dd71=_0x2b4704;this['_configService']=_0xc88757,this[_0x14dd71(0x3c7)]=_0x328f1a,this['localeService']=_0x315705,this['init']();}[_0x2b4704(0x233)](){const _0x15d3d3=_0x2b4704;this[_0x15d3d3(0x3c7)][_0x15d3d3(0x3e2)]({'priority':0x1,'interceptor':(_0x278274,_0x1795d2)=>_0x1795d2(_0x278274)[_0x15d3d3(0x200)]((0x0,a[_0x15d3d3(0x2ed)])(async _0x134cf2=>{const _0x3f8f6a=_0x15d3d3;let _0x15292e=_0x134cf2;if(_0x15292e['status']===0x191){if(typeof window>'u')throw Error('[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.');if(window[_0x3f8f6a(0x177)](this[_0x3f8f6a(0x1e1)]['t'](_0x3f8f6a(0x15d)))){let _0x52cf35=window['encodeURIComponent'](window[_0x3f8f6a(0x3d7)][_0x3f8f6a(0x182)]);window[_0x3f8f6a(0x3d7)][_0x3f8f6a(0x182)]=this[_0x3f8f6a(0x2bd)]()+_0x3f8f6a(0x166)+_0x52cf35;}}return _0x15292e;}))});}[_0x2b4704(0x2bd)](){const _0x6fd0c=_0x2b4704;var _0x4e09c7;let _0x48c08f=this[_0x6fd0c(0x1d8)][_0x6fd0c(0x18e)](h);return(_0x4e09c7=_0x48c08f==null?void 0x0:_0x48c08f[_0x6fd0c(0x307)])==null?_0x6fd0c(0x305):_0x4e09c7;}};W=b([y(0x0,n[_0x2b4704(0x309)]),y(0x1,(0x0,n[_0x2b4704(0x1ce)])(u[_0x2b4704(0x28e)])),y(0x2,(0x0,n[_0x2b4704(0x1ce)])(n['LocaleService']))],W);let G=class extends n[_0x2b4704(0x274)]{constructor(_0x38fe20,_0x1e9f89){const _0x38bbcb=_0x2b4704;super(),this['_HTTPService']=_0x38fe20,this[_0x38bbcb(0x1d8)]=_0x1e9f89,_(this,_0x38bbcb(0x320),!0x1),this['_initMergeInterceptor']();}[_0x2b4704(0x12d)](){const _0x643248=_0x2b4704;let _0x421227=this;this[_0x643248(0x115)](this[_0x643248(0x161)]['registerHTTPInterceptor']({'priority':0x3e7,'interceptor':(0x0,u['MergeInterceptorFactory'])({'isMatch'(_0x210723){const _0x5834cf=_0x643248;var _0x21e2e7;if(_0x210723[_0x5834cf(0x335)]==='POST'&&(_0x21e2e7=_0x210723[_0x5834cf(0x25b)])!=null&&_0x21e2e7[_0x5834cf(0x1df)]){let {objectID:_0x67a76e,objectType:_0x1ffd8e}=_0x210723[_0x5834cf(0x25b)]['body']||{};if(!_0x67a76e||_0x1ffd8e===void 0x0)return!0x1;let _0x286115=_0x421227[_0x5834cf(0x394)]()+'/'+_0x1ffd8e+_0x5834cf(0x387)+_0x67a76e+_0x5834cf(0x362);if(_0x210723['url']===_0x286115)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x44014f){var _0x230b05;return(_0x230b05=_0x44014f['requestParams'])==null?void 0x0:_0x230b05['body'];},'mergeParamsToRequest'(_0x5a8397,_0x41fdc0){const _0x519db6=_0x643248;let _0x3ce0a5=_0x421227[_0x519db6(0x394)]()+_0x519db6(0x2ff),_0x171ba0=_0x5a8397[_0x519db6(0x3af)]((_0xb498e4,_0x174845)=>{const _0x193757=_0x519db6;let {unitID:_0x43697c,objectID:_0x346f74,objectType:_0x395007,actions:_0x32467f}=_0x174845;return _0xb498e4[_0x43697c]||(_0xb498e4[_0x43697c]={}),_0xb498e4[_0x43697c][_0x346f74]||(_0xb498e4[_0x43697c][_0x346f74]={'objectID':_0x346f74,'objectType':_0x395007,'actions':[]}),_0xb498e4[_0x43697c][_0x346f74][_0x193757(0x133)][_0x193757(0x384)](..._0x32467f),_0xb498e4;},{}),_0x13cd81=[];for(let _0x5ea6d4 in _0x171ba0)for(let _0x1ef046 in _0x171ba0[_0x5ea6d4]){let {actions:_0x48a6fb,objectType:_0x51c7b5}=_0x171ba0[_0x5ea6d4][_0x1ef046],_0x20d801=[...new Set(_0x48a6fb)];_0x13cd81[_0x519db6(0x384)]({'unitID':_0x5ea6d4,'objectID':_0x1ef046,'objectType':_0x51c7b5,'actions':_0x20d801});}return new u[(_0x519db6(0x1c5))]('POST',_0x3ce0a5,{'headers':_0x41fdc0[_0x519db6(0x381)],'withCredentials':_0x41fdc0[_0x519db6(0x3a4)],'responseType':_0x41fdc0[_0x519db6(0x11f)],'body':{'requests':_0x13cd81}});}},{'distributeResult'(_0x4920a8,_0x77fe1c){const _0x1a1757=_0x643248;let {objectActions:_0x228c18}=_0x4920a8;return _0x77fe1c[_0x1a1757(0x2c1)](_0x34550c=>{const _0x126844=_0x1a1757;let {unitID:_0x9e0205,objectID:_0xa90695,actions:_0x4df1c3}=_0x34550c,_0x1621a6=_0x228c18[_0x126844(0x12c)](_0x4336dd=>_0x4336dd['unitID']===_0x9e0205&&_0x4336dd[_0x126844(0x349)]===_0xa90695);return{'config':_0x34550c,'result':{'actions':_0x4df1c3['map'](_0x3fe048=>_0x1621a6==null?void 0x0:_0x1621a6[_0x126844(0x133)][_0x126844(0x12c)](_0x2492f4=>_0x2492f4['action']===_0x3fe048))['filter'](_0x32bd5c=>!!_0x32bd5c),'error':_0x4920a8[_0x126844(0x2b8)]}};});}})}));}[_0x2b4704(0x394)](){const _0x3181c2=_0x2b4704;var _0x2873cd;let _0x5af826=this['_configService']['getConfig'](h);return(_0x2873cd=_0x5af826==null?void 0x0:_0x5af826[_0x3181c2(0x22d)])==null?'/universer-api/authz':_0x2873cd;}async[_0x2b4704(0x159)](_0x4da63d){const _0x27e27d=_0x2b4704;let _0x1d789c=this['_getAPIPrefixPath']()+'/'+_0x4da63d[_0x27e27d(0x388)]+'/object';return(await this[_0x27e27d(0x161)][_0x27e27d(0x2e7)](_0x1d789c,{'body':_0x4da63d}))['body'][_0x27e27d(0x349)]||'';}async[_0x2b4704(0x24f)](_0x558422){const _0x687d91=_0x2b4704;let _0x4dfdf2=this[_0x687d91(0x394)]()+_0x687d91(0x10c);return(await this[_0x687d91(0x161)][_0x687d91(0x2e7)](_0x4dfdf2,{'body':_0x558422}))[_0x687d91(0x1df)][_0x687d91(0x149)];}async['update'](_0x3d237b){const _0x2f3416=_0x2b4704;var _0x53bb9e;let _0x2cb3e3=this[_0x2f3416(0x394)]()+'/'+_0x3d237b[_0x2f3416(0x388)]+_0x2f3416(0x387)+_0x3d237b[_0x2f3416(0x349)],_0xf5b776=await this[_0x2f3416(0x161)][_0x2f3416(0x1fe)](_0x2cb3e3,{'body':_0x3d237b});if((_0xf5b776==null||(_0x53bb9e=_0xf5b776[_0x2f3416(0x1df)])==null||(_0x53bb9e=_0x53bb9e[_0x2f3416(0x2b8)])==null?void 0x0:_0x53bb9e[_0x2f3416(0x1a4)])!==0x1)throw Error('Failed\x20to\x20update\x20permission\x20point');}async[_0x2b4704(0x2a4)](_0xe3104d){const _0x5433eb=_0x2b4704;let _0xc641e2=this[_0x5433eb(0x394)]()+'/'+_0xe3104d[_0x5433eb(0x388)]+_0x5433eb(0x387)+_0xe3104d[_0x5433eb(0x349)]+_0x5433eb(0x362);return(await this[_0x5433eb(0x161)]['post'](_0xc641e2,{'body':_0xe3104d}))[_0x5433eb(0x1df)][_0x5433eb(0x133)];}async['batchAllowed'](_0x3a7459){const _0x33ec93=_0x2b4704;let _0x4c66ed=this['_getAPIPrefixPath']()+'/-/object/-/batch_allowed';return(await this[_0x33ec93(0x161)][_0x33ec93(0x2e7)](_0x4c66ed,{'body':{'requests':_0x3a7459}}))[_0x33ec93(0x1df)]['objectActions'];}async[_0x2b4704(0x23d)](_0x191910){const _0x17c26e=_0x2b4704;let _0xc92044=this[_0x17c26e(0x394)]()+'/'+_0x191910['objectType']+_0x17c26e(0x30a),_0x26cd6f=await this[_0x17c26e(0x161)][_0x17c26e(0x2e7)](_0xc92044,{'body':_0x191910});return{'roles':_0x26cd6f['body'][_0x17c26e(0x3b0)],'actions':_0x26cd6f[_0x17c26e(0x1df)][_0x17c26e(0x133)]};}async[_0x2b4704(0x110)](_0x21de61){const _0x3a3ec7=_0x2b4704;let _0x75aa68=this[_0x3a3ec7(0x394)]()+'/collaborator';await this[_0x3a3ec7(0x161)]['delete'](_0x75aa68,{'params':{'collaboratorID':_0x21de61[_0x3a3ec7(0x189)],'objectID':_0x21de61[_0x3a3ec7(0x349)],'unitID':_0x21de61[_0x3a3ec7(0x37b)]}});}async[_0x2b4704(0x31d)](_0x530641){const _0x4737a5=_0x2b4704;let _0x2c8e9d=this['_getAPIPrefixPath']()+_0x4737a5(0x2cb);await this[_0x4737a5(0x161)][_0x4737a5(0x356)](_0x2c8e9d,{'body':_0x530641});}async['createCollaborator'](_0xb14e9c){const _0x1eb2df=_0x2b4704;let _0x2c321f=this[_0x1eb2df(0x394)]()+_0x1eb2df(0x2cb);await this[_0x1eb2df(0x161)][_0x1eb2df(0x2e7)](_0x2c321f,{'body':_0xb14e9c});}async[_0x2b4704(0x2f9)](_0x5f1a0a){const _0x7295b6=_0x2b4704;var _0x444fb8;let _0x5af1ea=this['_getAPIPrefixPath']()+_0x7295b6(0x2cb),_0x26e4a7=await this[_0x7295b6(0x161)][_0x7295b6(0x287)](_0x5af1ea,{'params':{'objectID':_0x5f1a0a[_0x7295b6(0x349)],'unitID':_0x5f1a0a[_0x7295b6(0x37b)]}});return this['setCfgEnableObjInherit']((_0x444fb8=_0x26e4a7[_0x7295b6(0x1df)][_0x7295b6(0x13a)])==null?!0x1:_0x444fb8),_0x26e4a7[_0x7295b6(0x1df)][_0x7295b6(0x150)];}async['putCollaborators'](_0x1eb60b){const _0x12800a=_0x2b4704;let _0x5cab57=this[_0x12800a(0x394)]()+_0x12800a(0x2cb);await this[_0x12800a(0x161)]['put'](_0x5cab57,{'body':_0x1eb60b});}['setCfgEnableObjInherit'](_0x5c94fe){this['_cfgEnableObjInherit']=_0x5c94fe;}[_0x2b4704(0x264)](){const _0x49bddc=_0x2b4704;return this[_0x49bddc(0x320)];}};G=b([y(0x0,(0x0,n[_0x2b4704(0x1ce)])(u[_0x2b4704(0x28e)])),y(0x1,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x309)]))],G);function Ke(_0x58e8f6){const _0x15ea2b=_0x2b4704;let _0x23e18e=atob(_0x58e8f6),_0x55e4bd=new Uint8Array(_0x23e18e['length']);for(let _0x4ac1b5=0x0;_0x4ac1b5<_0x23e18e[_0x15ea2b(0x2f8)];_0x4ac1b5++)_0x55e4bd[_0x4ac1b5]=_0x23e18e['charCodeAt'](_0x4ac1b5);return _0x55e4bd;}function qe(_0x4daf2a){const _0x58a2f8=_0x2b4704;let _0x1564b3='';for(let _0x3969d2=0x0;_0x3969d2<_0x4daf2a[_0x58a2f8(0x2f8)];_0x3969d2++)_0x1564b3+=String['fromCharCode'](_0x4daf2a[_0x3969d2]);return btoa(_0x1564b3);}function Je(_0x1534f2,_0x229ad5){const _0x735bc=_0x2b4704;let _0x5d97e5=Ke(_0x229ad5),_0x5546c2=(0x0,m['randomBytes'])(0x10);return qe((0x0,m[_0x735bc(0x2d5)])(_0x5546c2,(0x0,p['cbc'])(_0x5d97e5,_0x5546c2)[_0x735bc(0x129)]((0x0,m[_0x735bc(0x30f)])(_0x1534f2))));}function Ye(){const _0x378d4b=_0x2b4704;let _0x4eb602=(0x0,d['getGlobalObject'])()[_0x378d4b(0x281)];if(typeof window<'u'&&window['location']!==void 0x0&&_0x4eb602){let _0x2c01bd={'time':Math[_0x378d4b(0x1cb)](Date[_0x378d4b(0x3b8)]()/0x3e8),'domain':location['hostname']};return Je(JSON[_0x378d4b(0x22b)](_0x2c01bd),_0x4eb602);}}let K=class{constructor(_0x1ca844){const _0x9029e1=_0x2b4704;this[_0x9029e1(0x3c7)]=_0x1ca844,this['_initRequestHeader']();}[_0x2b4704(0x380)](){const _0x504f18=_0x2b4704;this[_0x504f18(0x3c7)][_0x504f18(0x3e2)]({'interceptor':(_0x3a22fd,_0xc6d970)=>{const _0x5a69cc=_0x504f18;let _0x4d9ede=Ye();return _0x4d9ede&&_0x3a22fd[_0x5a69cc(0x381)]['set'](_0x5a69cc(0x2ae),_0x4d9ede),_0xc6d970(_0x3a22fd);}});}};K=b([y(0x0,(0x0,n['Inject'])(u[_0x2b4704(0x28e)]))],K);let q=class extends n[_0x2b4704(0x2a0)]{constructor(_0x10736c,_0x4e6ba9,_0x29ddd3){const _0x35234e=_0x2b4704;super(),this[_0x35234e(0x35b)]=_0x10736c,this['_snapshotService']=_0x4e6ba9,this['_localCacheService']=_0x29ddd3,_(this,'_unitInfo$',new a['BehaviorSubject'](null)),_(this,_0x35234e(0x27e),new a['Subject']()),_(this,'unitInfo$',this[_0x35234e(0x321)][_0x35234e(0x171)]()),_(this,'unitLoaded$',this['_unitLoaded$'][_0x35234e(0x171)]());}[_0x2b4704(0x2cf)](){const _0x1ed874=_0x2b4704;super[_0x1ed874(0x2cf)](),this[_0x1ed874(0x27e)][_0x1ed874(0x391)](),this['_unitInfo$'][_0x1ed874(0x391)]();}async['loadUnitOfRevision'](_0x4126b1,_0x2f30d9,_0x1c679d){const _0x30b55e=_0x2b4704;this[_0x30b55e(0x321)][_0x30b55e(0x383)]({'unitId':_0x4126b1,'type':_0x2f30d9});let _0x2b955c=null;switch(_0x2f30d9){case n[_0x30b55e(0x372)][_0x30b55e(0x375)]:_0x2b955c=await this[_0x30b55e(0x244)][_0x30b55e(0x30e)](_0x4126b1,_0x1c679d);break;case n[_0x30b55e(0x372)][_0x30b55e(0x299)]:_0x2b955c=await this[_0x30b55e(0x244)]['loadDoc'](_0x4126b1,_0x1c679d);break;case n[_0x30b55e(0x372)]['UNIVER_SLIDE']:_0x2b955c=await this[_0x30b55e(0x244)][_0x30b55e(0x36d)](_0x4126b1,_0x1c679d);break;case n[_0x30b55e(0x372)][_0x30b55e(0x288)]:_0x2b955c=await this[_0x30b55e(0x244)][_0x30b55e(0x3cb)](_0x4126b1,_0x1c679d);break;default:this[_0x30b55e(0x35b)][_0x30b55e(0x2b8)](_0x30b55e(0x21e),'Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.');break;}return _0x2b955c&&this[_0x30b55e(0x27e)][_0x30b55e(0x383)](_0x2b955c),_0x2b955c;}async[_0x2b4704(0x38d)](_0x2d6dd5,_0x255efc,_0x5f543d){const _0x36922a=_0x2b4704;var _0x201a6c;this[_0x36922a(0x321)][_0x36922a(0x383)]({'unitId':_0x2d6dd5,'type':_0x255efc,'subUnitId':_0x5f543d});let _0x710645=0x0,_0x5be9e0=await((_0x201a6c=this[_0x36922a(0x10b)])==null?void 0x0:_0x201a6c[_0x36922a(0x1de)](_0x2d6dd5));return _0x5be9e0&&(_0x5be9e0['awaitingChangeset']||_0x5be9e0[_0x36922a(0x296)][_0x36922a(0x2f8)]!==0x0)&&(_0x710645=_0x5be9e0[_0x36922a(0x2fd)]),_0x710645===0x0&&this[_0x36922a(0x35b)][_0x36922a(0x216)](_0x36922a(0x21e),'fetching\x20the\x20latest\x20document\x20from\x20the\x20server.'),this[_0x36922a(0x1ac)](_0x2d6dd5,_0x255efc,_0x710645);}};q=b([y(0x0,n[_0x2b4704(0x2ac)]),y(0x1,(0x0,n['Inject'])(t[_0x2b4704(0x18f)])),y(0x2,(0x0,n[_0x2b4704(0x1d7)])(C))],q);let J=class{constructor(_0x1266fc,_0x2d8a3c,_0x2665f6){const _0x650a1e=_0x2b4704;this[_0x650a1e(0x3c7)]=_0x1266fc,this['_configService']=_0x2d8a3c,this['_univerInstanceService']=_0x2665f6,_(this,_0x650a1e(0x178),0x0),_(this,_0x650a1e(0x3c1),new a[(_0x650a1e(0x119))]()),_(this,_0x650a1e(0x181),this['_change$']),_(this,_0x650a1e(0x1e6),new Map());}[_0x2b4704(0x230)](_0x268517){const _0x5a3fa9=_0x2b4704;this[_0x5a3fa9(0x178)]=_0x268517,this['_change$'][_0x5a3fa9(0x383)](_0x268517);}['getImageSourceCache'](_0x570f63,_0x246742){const _0x14d955=_0x2b4704;if(_0x246742===f[_0x14d955(0x2f5)][_0x14d955(0x31a)]){let _0x5c7305=new Image();return _0x5c7305['src']=_0x570f63,_0x5c7305;}return this[_0x14d955(0x1e6)][_0x14d955(0x287)](_0x570f63);}['addImageSourceCache'](_0xe2aaeb,_0x1b4c57,_0x3a1529){const _0x574d68=_0x2b4704;_0x1b4c57===f[_0x574d68(0x2f5)][_0x574d68(0x31a)]||_0x3a1529==null||this['_imageSourceCache'][_0x574d68(0x399)](_0xe2aaeb,_0x3a1529);}async[_0x2b4704(0x142)](_0x207af3){const _0x20f49d=_0x2b4704;try{let _0x3c2c14=this[_0x20f49d(0x250)](this[_0x20f49d(0x14e)](),''+_0x207af3),_0x52db8a=(await this[_0x20f49d(0x3c7)][_0x20f49d(0x287)](_0x3c2c14))[_0x20f49d(0x1df)];if(_0x52db8a['error']&&_0x52db8a['error'][_0x20f49d(0x1a4)]===o['ErrorCode']['OK']){let _0x566924=(0x0,n[_0x20f49d(0x1bf)])(_0x52db8a[_0x20f49d(0x213)],this[_0x20f49d(0x25d)]());return Promise[_0x20f49d(0x271)](_0x566924);}return Promise[_0x20f49d(0x26a)](_0x52db8a[_0x20f49d(0x2b8)]);}catch(_0x523690){return Promise['reject'](_0x523690);}}async[_0x2b4704(0x2d6)](_0x38a0c8){const _0x24a8c9=_0x2b4704;let _0x4aef7b='';if(!f[_0x24a8c9(0x153)]['includes'](_0x38a0c8[_0x24a8c9(0x15c)]))return this[_0x24a8c9(0x1ca)](),Promise[_0x24a8c9(0x26a)](Error(f[_0x24a8c9(0x1d6)]['ERROR_IMAGE_TYPE']));if(_0x38a0c8[_0x24a8c9(0x155)]>(0x0,f[_0x24a8c9(0x144)])())return this[_0x24a8c9(0x1ca)](),Promise[_0x24a8c9(0x26a)](Error(f[_0x24a8c9(0x1d6)][_0x24a8c9(0x3b2)]));try{let _0x1ed795=new FormData();_0x1ed795[_0x24a8c9(0x20a)]('file',_0x38a0c8);let _0x14cfda=this[_0x24a8c9(0x2fb)]['getFocusedUnit'](),_0x14fc22=_0x14cfda==null?void 0x0:_0x14cfda[_0x24a8c9(0x17c)]();if(!_0x14fc22)throw Error(_0x24a8c9(0x14b));let _0x5df5da=this[_0x24a8c9(0x22a)]()+_0x24a8c9(0x195)+_0x38a0c8['size'][_0x24a8c9(0x21f)]()+_0x24a8c9(0x342)+o['FileSource']['UnitEmbedded']+'&assign='+encodeURIComponent(_0x14fc22),_0x14ebfa={'body':_0x1ed795},_0xff176b=(await this[_0x24a8c9(0x3c7)][_0x24a8c9(0x2e7)](_0x5df5da,_0x14ebfa))[_0x24a8c9(0x1df)];if(typeof _0xff176b[_0x24a8c9(0x113)]!=_0x24a8c9(0x2e4))return this[_0x24a8c9(0x1ca)](),Promise['reject'](Error(f[_0x24a8c9(0x1d6)]['ERROR_IMAGE']));_0x4aef7b=_0xff176b[_0x24a8c9(0x113)];}catch{return this[_0x24a8c9(0x1ca)](),Promise[_0x24a8c9(0x26a)](Error(f[_0x24a8c9(0x1d6)][_0x24a8c9(0x1e7)]));}return new Promise((_0x55a244,_0x4c7944)=>{const _0x54596a=_0x24a8c9;let _0x501017=new FileReader();_0x501017['readAsDataURL'](_0x38a0c8),_0x501017[_0x54596a(0x126)]=_0x1bb7b2=>{const _0x54026d=_0x54596a;var _0x3b3e2d;let _0x29e05e=(_0x3b3e2d=_0x1bb7b2['target'])==null?void 0x0:_0x3b3e2d[_0x54026d(0x14c)];if(_0x29e05e==null){this[_0x54026d(0x1ca)](),_0x4c7944(Error(f[_0x54026d(0x1d6)][_0x54026d(0x1e7)]));return;}_0x55a244({'imageId':(0x0,n[_0x54026d(0x310)])(0x6),'imageSourceType':f[_0x54026d(0x2f5)][_0x54026d(0x22e)],'source':_0x4aef7b,'base64Cache':_0x29e05e,'status':f[_0x54026d(0x1d6)]['SUCCUSS']}),this['_decreaseWaiting']();};});}[_0x2b4704(0x22a)](){const _0x41e5cf=_0x2b4704;var _0x48e784;let _0x228882=this[_0x41e5cf(0x1d8)][_0x41e5cf(0x18e)](h);return(_0x48e784=_0x228882==null?void 0x0:_0x228882[_0x41e5cf(0x345)])==null?_0x41e5cf(0x137):_0x48e784;}['_getSignURL'](){const _0x2175a5=_0x2b4704;var _0x26c087;let _0x58853e=this[_0x2175a5(0x1d8)]['getConfig'](h);return(_0x26c087=_0x58853e==null?void 0x0:_0x58853e[_0x2175a5(0x2d7)])==null?_0x2175a5(0x29a):_0x26c087;}['_getDownloadEndpointURL'](){const _0x3e79ff=_0x2b4704;var _0x111ff0;let _0x2abc54=this[_0x3e79ff(0x1d8)][_0x3e79ff(0x18e)](h);return(_0x111ff0=_0x2abc54==null?void 0x0:_0x2abc54[_0x3e79ff(0x3a7)])==null?location['origin']:_0x111ff0;}[_0x2b4704(0x250)](_0x19deb3,_0x51bf76){const _0x4d28e3=_0x2b4704;return _0x19deb3[_0x4d28e3(0x34a)](_0x4d28e3(0x242),_0x51bf76);}[_0x2b4704(0x1ca)](){const _0x27585b=_0x2b4704;--this['_waitCount'],this[_0x27585b(0x3c1)][_0x27585b(0x383)](this[_0x27585b(0x178)]);}};J=b([y(0x0,(0x0,n[_0x2b4704(0x1ce)])(u[_0x2b4704(0x28e)])),y(0x1,n['IConfigService']),y(0x2,(0x0,n[_0x2b4704(0x1ce)])(n['IUniverInstanceService']))],J);let Y=class{constructor(_0x20488f,_0x449928){const _0x570e5d=_0x2b4704;this[_0x570e5d(0x1d8)]=_0x20488f,this[_0x570e5d(0x161)]=_0x449928;}[_0x2b4704(0x394)](){const _0x42ebaf=_0x2b4704;var _0x232973;let _0x3047fb=this['_configService'][_0x42ebaf(0x18e)](h);return(_0x232973=_0x3047fb==null?void 0x0:_0x3047fb[_0x42ebaf(0x22d)])==null?'/universer-api/authz':_0x232973;}async[_0x2b4704(0x24f)](_0x462c86){const _0x239a5c=_0x2b4704;let _0x5dc5f1=this[_0x239a5c(0x394)]()+_0x239a5c(0x2cb);return{'list':[{'title':_0x239a5c(0x179),'mentions':(await this[_0x239a5c(0x161)][_0x239a5c(0x287)](_0x5dc5f1,{'params':{'objectID':_0x462c86['unitId'],'unitID':_0x462c86[_0x239a5c(0x19e)]}}))[_0x239a5c(0x1df)]['collaborators'][_0x239a5c(0x2c1)](_0x5ab443=>({'objectId':_0x5ab443['id'],'name':_0x5ab443[_0x239a5c(0x3c4)][_0x239a5c(0x111)],'metadata':{'icon':_0x5ab443[_0x239a5c(0x3c4)]['avatar']},'label':_0x5ab443[_0x239a5c(0x3c4)][_0x239a5c(0x111)],'objectType':n[_0x239a5c(0x3e4)][_0x239a5c(0x328)]})),'metadata':{},'type':n[_0x239a5c(0x3e4)]['PERSON']}]};}};function _0x637e(){const _0x4a54d1=['_showConflictNotification','CHANGESET_ACK','version','compose','routeKey','[OfflineState]:\x20received\x20changeset.','/block/','getFocusedUnit','UnitStatus','_replayCachedMutations','_getUploadFileURL','stringify','AwaitingWithPendingState','authzUrl','UUID','fetching\x20missing\x20changesets\x20from\x20','setWaitCount','/unit/','[SyncedState]:\x20received\x20rejection.','init','OfflineState','ITelemetryService','__splitChunk__','_onLocalMutation','_state$','JSONX','shareReplay','_scheduleCompleteTimestamp','_config','listRoles','editing\x20status\x20changed\x20to','_toggleOffline','transformUndoRedo','DocCollaborationEntity','{fileID}','getResourcesRequest','_snapshotService','filter','originalMeta','deserializeToCombResponse','_clearLocalCache','LIVESHARE_NEW_HOST','max','collaboration-client.local-cache-service','&to=','_status$','forEach','list','_replaceFileID','_createInitialState','enableOfflineEditing','_resendTimeout','639663ObHVFe','_onUserLeave','transformChangesets','COMMENT_UPDATE','SetSelectionsOperation','_onConnectionOpen','some','requestParams','decorate','_getDownloadEndpointURL','_compressMutationService','_commentUpdate$','FileSource','SYNCED','UniverCollaborationClientPlugin','awaiting_with_pending','getCfgEnableObjInherit','_changesetSessionId','_clearRetryConnectingTimer','splice','from','unsubscribe','reject','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','ONLINE','close','onRemoteAck','_scheduleCollaborationTimeoutTimer','FETCH_MISSING','resolve','88810RrhSDk','_state','Disposable','RETRY_CONNECTING_MAX_COUNT_KEY','OTHER_CLIENTS_EDITING','_docStateChangeManagerService','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','DEFAULT_FILE_NAME','onMissedChangesetFetched','_checkMissing','data','getAllMembers','_unitLoaded$','getCollabEntity','_socket','__Key__','toggleOffline','_telemetryInfo','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','_roomCreated$','c2Prime','get','UNIVER_BASE','DEFAULT_WS_SESSION_TICKET_URL','_init','SHOULD_CLOSE_CONN','_onJoinRoomEvent','URL','HTTPService','cmd','_sender','ISingleActiveUnitService','RichTextEditingMutation','m2Prime','_localeService','updateMember','mutations','_onFetchMissResult','LIVESHARE_REQUEST_HOST','UNIVER_DOC','/universer-api/file/{fileID}/sign-url','_acknowledgeAwaiting','iterator','4268950PELLDH','PENDING','/resources','RxDisposable','[UniverCollaborationClientPlugin]','_onRecvEvent','_networkConditionService','allowed','NEW_CHANGESETS','SheetsSelectionsService','_createHandler','_updateLocalCache','_commentService','csRejEvent','CollaborationSessionService','ILogService','_remoteChangesetQueue','x-univer-host','LEAVE','_transitionLocked','[CollaborationEntity]','_sessions','[SyncedState]:\x20received\x20acknowledgement.','emitEvent','setConfig','createInstance','default','error','_transformRemoteChangesetByIMECache','workbook','toDisposable','online$','_getLoginPath','_telemetryService','SNAPSHOT_URL_KEY','_transformStateCache','map','newCsEvent','c1Prime','_members$','transformMutationsWithChangeset','_clearScheduledTask','_onRemoteChangeset','onSyncEditingCollabCursor','UPDATE_PERMISSION_OBJ','commentUpdate$','/collaborator','_singleActiveUnitService','appendMutation','getWorkbookSelections','dispose','_executeRemoteChangeset','CollaborationAttachmentIoService','apply','[PendingState]:\x20received\x20acknowledgement.','UnitEmbedded','concatBytes','saveImage','signUrlServerUrl','getCollabEntity$','_permissionService','getMember','sessionStatus','fetchThroughInterceptors','connection\x20error','clear','_collaborationSessionService','LIVESHARE_TERMINATE','enableAuthServer','CommandType','HEARTBEAT','string','_startTelemetryCollaborationNewChangeset','EnsureSlideMasterPageMutation','post','_collaborationTimeoutTimer','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','encode','onTransformSelections','call','concatMap','_sendingTimer','AddSlidePageMutation','IContextService','_transformIMECache','CollaborationUIEventService','getUnitType','_instanceService','ImageSourceType','INGEST','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','length','listCollaborators','upload','_univerInstanceService','getLocalCacheKey','rev','_onRemoteRetry','/-/object/-/batch_allowed','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','mapDocumentTypeToUniverInstanceType','JOINING','memberID','ISocketService','/universer-api/oidc/authpage','retryConnectingInterval','loginUrlKey','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','IConfigService','/role','CollaborationEvent','SUBMIT_CHANGESET','RECV','loadSheet','utf8ToBytes','generateRandomId','onRemoteRej','[CollaborationSessionService]','catch','/universer-api/uniscript','submit\x20changeset\x20error!','IDLE','PERMISSION_REJ','JOIN','onTransformRemoteChangesetByIMECache','BASE64','onTransformIME','enableSingleActiveInstanceLock','updateCollaborator','delete','pluginName','_cfgEnableObjInherit','_unitInfo$','session.room-full','[PendingState]:\x20received\x20rejection.','IMentionIOService','_toggleOnline','_syncEditingCollabCursor','_resendTimer','PERSON','CombCmd','_onUserJoin','endsWith','attachment','FAIL','_candidateSocket','saveSnapshot','_maxTotalRetryTimeout','function','_getSendChangesetTimeout','Quantity','_handlerCallback','method','_exhaustRemoteChangesetQueue','changesets','_socket$','HEARTBEAT_TIMEOUT_KEY','updateOfflineData','LocalUndoRedoService','COMPRESS_MUTATION_SEND','transformSelections','_initCloseConn','ILocalCacheService','_commandService','_onMessage','&source=','_type','isArray','uploadFileServerUrl','take','ICollaborationSocketService','leaveEvent','objectID','replace','toStringTag','range','[OfflineState]:\x20received\x20acknowledgement.','_event$','_onConflict','startTime','_rescheduleHeartbeat','_tryReconnect','270366CVTtWd','socket\x20close','356582jPZpOV','patch','_getCtorByUniverInstanceType','requireSession','collabWebSocketUrl','message$','_logService','USERS_LEAVE','CHANGESET_SHOULD_RETRY','_sendHeartbeat','synced','close$','closeSession','/allowed','error$','univer-pro.collaboration-client.single-active-unit-service','onTransformRemoteChangesetByStateCache','/fetchmissing?from=','BehaviorSubject','ws://127.0.0.1:8000/universer-api/comb/connect','every','_transformUndoredo','/rev/','_changesetReqId','loadSlide','toggleOnline','_revisionService','_getUndoStack','CmdRspCode','UniverInstanceType','_substituteRedoStack','NO_OTHER_CLIENTS_EDITING','UNIVER_SHEET','IPermissionService','_pendingMutations','ICommandService','Module','textEncoder','unitID','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','AuthzIoHttpService','dispose$','transformStack\x20failed!','_initRequestHeader','headers','[CollaborationState]:\x20apply\x20error!','next','push','editingUnit','textRanges','/object/','objectType','_resendWithTimeout','_onCombEvent','PERMISSION_DENIED','ISnapshotServerService','loadUnit','_collaborationUIEventService','CommentService','initWorkbookPermissionChange','complete','getCurrentRevOfUnit','_getRedoStack','_getAPIPrefixPath','takeUntil','removeMember','UNIVER_SLIDE','prototype','set','Univer','getCurrentUser','fromCollab','selections','onStateChange','Injector','registerDependencies','CHANGESET_REJ','collaboration-client.config','_members','withCredentials','_timeoutTimer','_clearTimeoutTimer','downloadEndpointUrl','_awaitingChangeset','IUniverInstanceService','session','[CollaborationSession]','event$','_userManagerService','UNISCRIPT_RUN','reduce','roles','awaitingChangeset','ERROR_EXCEED_SIZE','getCurrentSelections','members','_registerDependencies','UNIVER_COLLABORATION_CLIENT_PLUGIN','onRemoteChangeset','now','_lockTransition','_acknowledgedAwaitingRevision','delay','base-ui.attachment-io.service','[PendingState]:\x20unhandled\x20univer\x20type:\x20','equals','params','localCacheService','_change$','_stopTelemetryCollaborationNewChangeset','snapshot','subject','getTypeOfUnitAdded$','_disableEditing','_httpService','_entities','_eventService','constructor','loadBase','_transformStack','\x20-\x20','CollaborationSocketService','updateSnapshot','touchDependencies','JOIN_ROOM_PERMISSION_DENIED','parseProtocolChangeset','_onRemoteRejected','send','sessionStatus$','CollaborationController','location','_queuedRemoteChangesets','MUTATION','liveShareOperation','Error\x20on\x20receiving\x20event','DocStateChangeManagerService','HELLO','_injector','HEARTBEAT_INTERVAL_KEY','isTransformMutationsWithChangesetSuccess','awaiting','registerHTTPInterceptor','_collabSessionService','MentionType','_transformRemoteChangesetByStateCache','onSendChangeset','Tools','_memberService','onCommentUpdate','_listenToNetworkCondition','saveAttachment','session.join-failed','onlyLocal','_snapshotServerService','copyFileMeta','_incrementRevisionNumber','4dLVvNX','getInterceptPoints','IUndoRedoService','RETRY_CONNECTING_MAX_COUNT','_emitMembers','_transformSelections','_onOffline','reqId','_unlockTransition','_getAPIPrefix','capture','ITransformService','onMutationExecutedForCollab','_localCacheService','/-/object/list','setShowComponents','_updateStatus','/new_changes','deleteCollaborator','name','merge','FileId','JOIN_ROOM_NOT_EXISTS','disposeWithMe','sendChangesetTimeout','WorkbookEditablePermission','not_collab','Subject','ThresholdInterceptorFactory','SessionStatus','MentionIoHttpService','state','offline','responseType','onTransformState','_getConfig','_startCollaboration','_handler','NOT_COLLAB','GLOBAL_ROOMS_CNT_EXCEEDS','onload','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','JOIN_ROOM_FULL','encrypt','onLocalMutation','socket\x20open.','find','_initMergeInterceptor','joinRsp','_sessionStatus$','socketService','MSG_FOR_ERROR','CompressMutationService','actions','SyncedState','unit-cache-','RevisionService','/universer-api/stream/file/upload','readyForCollab','CONFLICT','cfgEnableObjInherit','pauseCollaboration','_upload','IImageIoService','/universer-api/user/session-ticket','_undoRedoService','CollaborationUIEventId','UniverNetworkPlugin','getImage','_sendHeartbeatTimer','getDrawingImageAllowSize','getMemberID','\x20to\x20','PendingState','_transformAndApplyRemoteChangeset','objects','_clearCollaborationTimeoutTimer','unitId\x20is\x20not\x20found','result','CollaborationEntity','_getSignURL','_sheetTransformSelectionsService','collaborators','_createSocket','findIndex','DRAWING_IMAGE_ALLOW_IMAGE_LIST','InsertSheetMutation','size','PSEUDO_FETCH_MISSING_RESULT','_tryEnsureSocket','INetworkConditionService','create','_handleRemoteChangesets','LIVESHARE_FETCH_OPERATIONS','type','collaboration-client.auth.needGotoLoginAlert','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','mergeOverrideWithDependencies','session.room-permission-denied','_HTTPService','AttachmentSourceType','/universer-api/comb','commentUpdateEvent','onRemoteRetry','?url=','_socketMessageSubscription','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','subscribe','_updateState','SOCKET_FAILED','_joinRoom','stopTime','_roomMembers','_schedule','getActiveSheet','asObservable','MoveSlidePageMutation','focused$','getSnapshotAPIPath','_onConnectionFailed','CLOSE_ROOM','confirm','_waitCount','People','LIVESHARE_OPERATION','slice','getUnitId','userID','saveSheetBlock','isTransformChangesetsSuccess','_fetchMissChangesets','change$','href','HEARTBEAT_INTERVAL','EmptyMutationInfo','interceptor','collaMsg','univer-pro.collaboration-client.network-condition.service','getRoom','collaboratorID','_socketService','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','fetchMiss','CollaborationSession','getConfig','SnapshotService','indexOf','_transformService','fetch_missing','_applyRemoteChangeset','state$','?size=','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','revision','_retryCount','status$','pending','OFFLINE','\x0aCurrent:\x20','_waitForHeartbeatResponse','unitId','getValue','_substituteUndoStack','values','sid','LocaleService','code','status','getTypeOfUnitDisposed$','unknown','USERS_ENTER','override','text-x','reconnect','loadUnitOfRevision','OTHER_CLIENT_EDITING','has','onMissingChangesets','isInternalEditorID','number','conflict','createSocket','_unitID','_acknowledgeAwaitingIfReady','startsWith','duration','\x0aAfter:\x20','accept','&assign=','DependentOn','CollaborationImageIoService','_createInitialStateImpl','updatePermissionPoint','resolveWithBasePath','2378656swAOBi','_collaborationPaused','parseChangesetToProtocol','getTime','9CKArqC','HTTPRequest','maxSize','fetchMissingChangesets','incrementRevOfUnit','isTransformMutationsWithChangesetFailure','_decreaseWaiting','floor','DisposableCollection','onStarting','Inject','94094gZRmHP','_undoStacks','b64DecodeUnicode','_clearHeartbeatTimer','[CollaborationSessionService]:\x20socket\x20error','ApplyBaseJson1Mutation','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','ImageUploadStatusType','Optional','_configService','createIdentifier','eventID','_initUnitPermissionChange','[CollaborationUndoRedoService]','defineProperty','loadOfflineData','body','sheets','localeService','_isEchoedAwaitingChangeset','csShouldRetryEvent','getLatestCsReqIdBySid','_shouldReportTelemetry','_imageSourceCache','ERROR_IMAGE','_submitChangeset','SOCKET_FAILED_RETRY','_clearRedo','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','ReplaySubject','object','waitForRoom$','_onRemoteACK','baseRev','_getCurrentRevision','_socketReady','title','OPTIONAL','1.0.0-alpha.1','_entityInit$','executeCommand','univer-pro.collaboration-client-socket-service','roomInfos','min','LOCAL_CACHE_INTERVAL','[OfflineState]:\x20received\x20rejection.','SUBMIT_CHANGESET_TIMEOUT','put','@univerjs-pro/collaboration-client','pipe','symbol','unit','_retryConnectingTimer','HEARTBEAT_TIMEOUT','UPDATE_CURSOR','COMPRESS_MUTATION_APPLY','liveShareNewHost','isPermissionRej','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','append','updatePermissionObjEvent','add','JOIN_ROOM_FAILED','enableCollaboration','MemberService','_isPermissionRej','open$','UniverCollaborationPlugin','url','_throwTelemetryCollaborationNewChangeset','IAuthzIoService','debug','getSheetId','7iZtHbQ','_clearUndo','resend','backupOfflineData','shouldCloseConn','CollaborativeUndoRedoService','[DataLoaderService]','toString'];_0x637e=function(){return _0x4a54d1;};return _0x637e();}Y=b([y(0x0,(0x0,n['Inject'])(n['IConfigService'])),y(0x1,(0x0,n[_0x2b4704(0x1ce)])(u['HTTPService']))],Y);let X=class extends n['RxDisposable']{constructor(_0x564fcb,_0x58ec1e,_0x5aa675,_0x26e4ed,_0x12e1b5){const _0x8cdf20=_0x2b4704;super(),this['_injector']=_0x564fcb,this[_0x8cdf20(0x2fb)]=_0x58ec1e,this[_0x8cdf20(0x2d9)]=_0x5aa675,this[_0x8cdf20(0x2df)]=_0x26e4ed,this[_0x8cdf20(0x38e)]=_0x12e1b5,this[_0x8cdf20(0x1db)](),this[_0x8cdf20(0x33e)]();}['_initCloseConn'](){const _0xeb245f=_0x2b4704;let _0x30f94a=async _0x2dc2b1=>{const _0x3477d9=_0x2cb1;(await this['_collaborationSessionService'][_0x3477d9(0x358)](_0x2dc2b1))[_0x3477d9(0x3ac)]['pipe']((0x0,c[_0x3477d9(0x245)])(_0x50d68f=>_0x50d68f[_0x3477d9(0x1da)]===t[_0x3477d9(0x30b)][_0x3477d9(0x28b)]),(0x0,c[_0x3477d9(0x395)])(this[_0x3477d9(0x37e)]))[_0x3477d9(0x169)](_0x2b6fe8=>{const _0x40bf39=_0x3477d9;let {reason:_0x29a0e1}=_0x2b6fe8[_0x40bf39(0x27c)];this[_0x40bf39(0x38e)][_0x40bf39(0x2b4)]({'id':_0x40bf39(0x176),'data':_0x29a0e1}),this[_0x40bf39(0x2d9)][_0x40bf39(0x1be)](new i[(_0x40bf39(0x117))](_0x2dc2b1)['id'],!0x1),this['_collaborationSessionService'][_0x40bf39(0x361)](_0x2dc2b1);});};(0x0,a[_0xeb245f(0x112)])(this[_0xeb245f(0x2fb)][_0xeb245f(0x3c5)](n[_0xeb245f(0x372)]['UNIVER_SHEET']),this['_univerInstanceService']['getTypeOfUnitAdded$'](n[_0xeb245f(0x372)][_0xeb245f(0x299)]),this[_0xeb245f(0x2fb)][_0xeb245f(0x3c5)](n['UniverInstanceType']['UNIVER_BASE']))['pipe']((0x0,c[_0xeb245f(0x2c1)])(_0x556f8f=>_0x556f8f[_0xeb245f(0x202)][_0xeb245f(0x17c)]()),(0x0,c[_0xeb245f(0x245)])(_0x4684cb=>!(0x0,n['isInternalEditorID'])(_0x4684cb)),(0x0,c[_0xeb245f(0x395)])(this[_0xeb245f(0x37e)]))[_0xeb245f(0x169)](_0xed4db3=>{_0x30f94a(_0xed4db3);});}['_initUnitPermissionChange'](){const _0x202c6f=_0x2b4704;let _0x31c862=async _0xbf7821=>{const _0x142c63=_0x2cb1;let _0x1ae8da=await this[_0x142c63(0x2df)]['requireSession'](_0xbf7821),_0x5ee916=this[_0x142c63(0x3de)]['get'](i['SheetPermissionInitController']);_0x1ae8da[_0x142c63(0x3ac)]['pipe']((0x0,c[_0x142c63(0x245)])(_0x5a20cf=>_0x5a20cf[_0x142c63(0x1da)]===t[_0x142c63(0x30b)][_0x142c63(0x2c9)]),(0x0,c[_0x142c63(0x395)])(this[_0x142c63(0x37e)]))[_0x142c63(0x169)](_0x2cafb4=>{const _0x1da312=_0x142c63;let {objectId:_0x143785}=_0x2cafb4[_0x1da312(0x27c)];_0x143785===_0xbf7821?_0x5ee916[_0x1da312(0x390)](_0xbf7821):_0x5ee916['refreshPermission'](_0xbf7821,_0x143785);});};(0x0,a[_0x202c6f(0x112)])(this[_0x202c6f(0x2fb)][_0x202c6f(0x3c5)](n[_0x202c6f(0x372)][_0x202c6f(0x375)]))[_0x202c6f(0x200)]((0x0,c[_0x202c6f(0x2c1)])(_0x2f5230=>_0x2f5230[_0x202c6f(0x202)][_0x202c6f(0x17c)]()),(0x0,c[_0x202c6f(0x245)])(_0x57456b=>!(0x0,n[_0x202c6f(0x1b0)])(_0x57456b)),(0x0,c[_0x202c6f(0x395)])(this[_0x202c6f(0x37e)]))[_0x202c6f(0x169)](_0x416423=>{_0x31c862(_0x416423);});}};X=b([y(0x0,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x1,n[_0x2b4704(0x3a9)]),y(0x2,n[_0x2b4704(0x376)]),y(0x3,(0x0,n['Inject'])(V)),y(0x4,(0x0,n[_0x2b4704(0x1ce)])(v))],X);let Z=class{constructor(_0x597a03,_0x1aaee5){const _0x82fd1c=_0x2b4704;this[_0x82fd1c(0x1d8)]=_0x597a03,this['_httpService']=_0x1aaee5;}async['getUnitOnRev'](_0x5639c4,_0x4bf5c7){const _0x3b4829=_0x2b4704;var _0x2507c7;let {unitID:_0x38fb77,type:_0x529e8b,revision:_0x37ce3d=0x0}=_0x4bf5c7,_0x401c7d=this[_0x3b4829(0x174)]()+'/'+_0x529e8b+_0x3b4829(0x231)+_0x38fb77+_0x3b4829(0x36b)+_0x37ce3d,_0x1a2682=(await this[_0x3b4829(0x3c7)][_0x3b4829(0x287)](_0x401c7d))['body'],_0x453387=(_0x2507c7=_0x1a2682[_0x3b4829(0x3c3)])==null?void 0x0:_0x2507c7[_0x3b4829(0x2ba)];if(_0x453387){let _0x433545=_0x453387==null?void 0x0:_0x453387[_0x3b4829(0x246)];_0x453387[_0x3b4829(0x246)]=t[_0x3b4829(0x37a)][_0x3b4829(0x2ea)]((0x0,t[_0x3b4829(0x1d1)])(_0x433545)),Object['entries'](_0x453387[_0x3b4829(0x1e0)])[_0x3b4829(0x24e)](([,_0x15a59d])=>{const _0x478d6d=_0x3b4829;let _0x41e524=_0x15a59d[_0x478d6d(0x246)];_0x15a59d[_0x478d6d(0x246)]=t[_0x478d6d(0x37a)][_0x478d6d(0x2ea)]((0x0,t[_0x478d6d(0x1d1)])(_0x41e524));});}return _0x1a2682;}async['getSheetBlock'](_0x5c5e75,_0x2173a2){const _0x5bce18=_0x2b4704;let {unitID:_0x140de9,type:_0x3cf6c2,blockID:_0x1a1b98}=_0x2173a2,_0x513634=this['_getAPIPrefix']()+'/'+_0x3cf6c2+'/unit/'+_0x140de9+'/block/'+_0x1a1b98;return(await this[_0x5bce18(0x3c7)][_0x5bce18(0x287)](_0x513634))['body'];}async['getDeserializedSheetBlock'](_0x229274,_0x28670c){const _0x15f871=_0x2b4704;let {unitID:_0x41f1f4,type:_0x2ce8e4,blockID:_0x55f37b}=_0x28670c,_0x81c4ab=this[_0x15f871(0x107)]()+_0x15f871(0x226)+_0x2ce8e4+_0x15f871(0x231)+_0x41f1f4+_0x15f871(0x226)+_0x55f37b;return(await this['_httpService'][_0x15f871(0x287)](_0x81c4ab))[_0x15f871(0x1df)];}async[_0x2b4704(0x1c7)](_0x16d9fe,_0x252b1d){const _0x5c074a=_0x2b4704;let {unitID:_0x4fc28e,type:_0xfe1c5f,from:_0x3c3031,to:_0x224082}=_0x252b1d,_0x3317df=this['_getAPIPrefix']()+'/'+_0xfe1c5f+_0x5c074a(0x231)+_0x4fc28e+_0x5c074a(0x366)+_0x3c3031+_0x5c074a(0x24c)+_0x224082;return(await this[_0x5c074a(0x3c7)]['get'](_0x3317df))[_0x5c074a(0x1df)];}['getSnapshotAPIPath'](){const _0x5e21f7=_0x2b4704;var _0x5315ef;return(_0x5315ef=this[_0x5e21f7(0x1d8)][_0x5e21f7(0x18e)](_0x5e21f7(0x2bf)))==null?this['_getAPIPrefix']():_0x5315ef;}[_0x2b4704(0x107)](){const _0x54537b=_0x2b4704;var _0x522ee1;let _0x3b9d16=this[_0x54537b(0x1d8)][_0x54537b(0x18e)](h);return(_0x522ee1=_0x3b9d16==null?void 0x0:_0x3b9d16['snapshotServerUrl'])==null?'/universer-api/snapshot':_0x522ee1;}async[_0x2b4704(0x243)](_0x52343f,_0x503e98){const _0x3e24c0=_0x2b4704;let _0x515255='/universer-api/snapshot/'+_0x503e98['type']+_0x3e24c0(0x231)+_0x503e98[_0x3e24c0(0x37b)]+_0x3e24c0(0x29f);return(await this[_0x3e24c0(0x3c7)][_0x3e24c0(0x287)](_0x515255,{'params':{'resourceId':JSON['stringify'](_0x503e98['resourceIDs'])}}))[_0x3e24c0(0x1df)];}[_0x2b4704(0x32f)](){const _0x34b71=_0x2b4704;throw Error(_0x34b71(0x209));}[_0x2b4704(0x3cf)](){const _0x33a63d=_0x2b4704;throw Error(_0x33a63d(0x209));}[_0x2b4704(0x17e)](){const _0x44abf3=_0x2b4704;throw Error(_0x44abf3(0x209));}['saveChangeset'](){const _0x4e1454=_0x2b4704;throw Error(_0x4e1454(0x209));}[_0x2b4704(0xfc)](){const _0x2781c2=_0x2b4704;throw Error(_0x2781c2(0x209));}[_0x2b4704(0x1e4)](){const _0x22447e=_0x2b4704;throw Error(_0x22447e(0x209));}};Z=b([y(0x0,n[_0x2b4704(0x309)]),y(0x1,(0x0,n[_0x2b4704(0x1ce)])(u[_0x2b4704(0x28e)]))],Z);let Q=class extends n[_0x2b4704(0x33b)]{constructor(_0x36ea1e,_0x45d89b,_0x2d1150,_0x8e1eaa,_0x9c8ea5){const _0x3fd510=_0x2b4704;super(_0x36ea1e,_0x45d89b,_0x2d1150),this[_0x3fd510(0x191)]=_0x8e1eaa,this[_0x3fd510(0x35b)]=_0x9c8ea5;}[_0x2b4704(0x240)](_0x3019ab,_0x485cf8){const _0x563aeb=_0x2b4704;let _0x4e6322=this[_0x563aeb(0x370)](_0x3019ab);if(_0x4e6322)try{let _0x5c225c=this[_0x563aeb(0x3cc)](_0x4e6322,_0x485cf8);this[_0x563aeb(0x1a0)](_0x3019ab,_0x5c225c);}catch(_0x536858){this['_logService'][_0x563aeb(0x2b8)](_0x563aeb(0x1dc),_0x536858),this[_0x563aeb(0x219)](_0x3019ab);}let _0x4deba0=this[_0x563aeb(0x393)](_0x3019ab);if(_0x4deba0)try{let _0x5eba99=this[_0x563aeb(0x3cc)](_0x4deba0,_0x485cf8);this[_0x563aeb(0x373)](_0x3019ab,_0x5eba99);}catch(_0x49c99a){this[_0x563aeb(0x35b)][_0x563aeb(0x2b8)](_0x49c99a),this[_0x563aeb(0x1ea)](_0x3019ab);}}[_0x2b4704(0x219)](_0xacce86){const _0x1e57cf=_0x2b4704;let _0x1f18b2=this[_0x1e57cf(0x370)](_0xacce86);_0x1f18b2&&(_0x1f18b2[_0x1e57cf(0x2f8)]=0x0,this['_updateStatus']());}[_0x2b4704(0x1ea)](_0xa9348d){const _0x4bde7c=_0x2b4704;let _0x251c5c=this[_0x4bde7c(0x393)](_0xa9348d);_0x251c5c&&(_0x251c5c[_0x4bde7c(0x2f8)]=0x0,this[_0x4bde7c(0x10e)]());}['_substituteUndoStack'](_0x37acab,_0x14be1d){const _0x3eef24=_0x2b4704;this[_0x3eef24(0x1d0)][_0x3eef24(0x399)](_0x37acab,_0x14be1d),this[_0x3eef24(0x10e)]();}[_0x2b4704(0x373)](_0x59a324,_0x46967c){const _0x48837b=_0x2b4704;this['_redoStacks']['set'](_0x59a324,_0x46967c),this[_0x48837b(0x10e)]();}['_transformStack'](_0x4e3bd1,_0x9edb3a){const _0x2e0088=_0x2b4704;let _0xeb8d5a=[],_0x15db8e=_0x9edb3a,_0x15686e=_0x9edb3a;for(let _0x506178=_0x4e3bd1[_0x2e0088(0x2f8)]-0x1;_0x506178>=0x0;_0x506178--){let {unitID:_0x202739,undoMutations:_0x563954,redoMutations:_0x25fe40}=_0x4e3bd1[_0x506178],_0x24c599=this[_0x2e0088(0x191)][_0x2e0088(0x2c5)](_0x15db8e,_0x563954),_0x1e9654=this[_0x2e0088(0x191)][_0x2e0088(0x2c5)](_0x15686e,_0x25fe40);if((0x0,t['isTransformMutationsWithChangesetFailure'])(_0x24c599)||(0x0,t[_0x2e0088(0x1c9)])(_0x1e9654)){this[_0x2e0088(0x35b)][_0x2e0088(0x2b8)](_0x2e0088(0x1dc),_0x2e0088(0x37f),_0x24c599,_0x1e9654);break;}_0x15db8e=_0x24c599[_0x2e0088(0x2c3)],_0x15686e=_0x1e9654['c1Prime'],_0xeb8d5a[_0x2e0088(0x384)]({'unitID':_0x202739,'undoMutations':_0x24c599[_0x2e0088(0x293)],'redoMutations':_0x1e9654['m2Prime']});}return _0xeb8d5a['reverse']();}};Q=b([y(0x0,n[_0x2b4704(0x3a9)]),y(0x1,n[_0x2b4704(0x378)]),y(0x2,n[_0x2b4704(0x2f0)]),y(0x3,t[_0x2b4704(0x109)]),y(0x4,n['ILogService'])],Q);let $=class extends n['Plugin']{constructor(_0x3d0761={},_0x1769b7,_0x52a96f,_0x138a8a){const _0x896b09=_0x2b4704;super(),this[_0x896b09(0x23c)]=_0x3d0761,this[_0x896b09(0x35b)]=_0x1769b7,this[_0x896b09(0x3de)]=_0x52a96f,this[_0x896b09(0x1d8)]=_0x138a8a;let {..._0x5d3107}=(0x0,n['merge'])({},ee,_0x3d0761);if(!_0x5d3107[_0x896b09(0x130)])throw Error('[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!');this['_config']=_0x5d3107,this['_configService'][_0x896b09(0x2b5)](h,_0x5d3107);}[_0x2b4704(0x1cd)](){const _0x1a375c=_0x2b4704;this[_0x1a375c(0x3b5)](),this['_initDependencies']();}['_registerDependencies'](){const _0x4e4205=_0x2b4704;var _0x5d861e,_0x5e1b59;this[_0x4e4205(0x3de)][_0x4e4205(0x1ae)](n[_0x4e4205(0x100)])&&this[_0x4e4205(0x35b)][_0x4e4205(0x2b8)](_0x4e4205(0x2a1),_0x4e4205(0x26b));let _0x1061db=(0x0,n[_0x4e4205(0x15f)])([[n[_0x4e4205(0x100)],{'useClass':Q}],[V],[x],[w],[W],[K],[se],[X],[v],[q],[Le,{'useClass':this[_0x4e4205(0x23c)][_0x4e4205(0x130)]}],[t[_0x4e4205(0x38c)],{'useClass':Z}],[n[_0x4e4205(0x215)],{'useClass':G}],[f[_0x4e4205(0x13d)],{'useClass':J}],[We,{'useClass':U}],[n[_0x4e4205(0x324)],{'useClass':Y}],[H],[He]],(_0x5d861e=this[_0x4e4205(0x23c)])==null?void 0x0:_0x5d861e[_0x4e4205(0x1a9)]);if(!((_0x5e1b59=this[_0x4e4205(0x23c)])!=null&&_0x5e1b59[_0x4e4205(0x31c)])){let _0x4ebc8b=_0x1061db[_0x4e4205(0x152)](([_0x36d7d3])=>_0x36d7d3===T);_0x4ebc8b!==-0x1&&_0x1061db[_0x4e4205(0x267)](_0x4ebc8b,0x1);}(0x0,n[_0x4e4205(0x3a0)])(this[_0x4e4205(0x3de)],_0x1061db);}['_initDependencies'](){const _0x13671f=_0x2b4704;var _0x1e0b57,_0x38be31;if(this[_0x13671f(0x3de)][_0x13671f(0x287)](u[_0x13671f(0x28e)])['registerHTTPInterceptor']({'priority':0x14,'interceptor':(0x0,u[_0x13671f(0x11a)])({'maxParallel':0x6})}),!((_0x1e0b57=this['_config'])!=null&&_0x1e0b57[_0x13671f(0x252)])){var _0x5bbd2f;(_0x5bbd2f=this[_0x13671f(0x3de)][_0x13671f(0x287)](C,n[_0x13671f(0x333)][_0x13671f(0x1f4)]))==null||_0x5bbd2f['disableLocalCache']();}(_0x38be31=this[_0x13671f(0x23c)])!=null&&_0x38be31[_0x13671f(0x2e1)]&&(0x0,n[_0x13671f(0x3d0)])(this[_0x13671f(0x3de)],[[W]]),(0x0,n['touchDependencies'])(this['_injector'],[[K],[H],[X]]);}};_($,_0x2b4704(0x31f),_0x2b4704(0x3b6)),_($,'packageName',Be),_($,_0x2b4704(0x222),Ve),$=b([(0x0,n[_0x2b4704(0x1bb)])(d['UniverLicensePlugin'],t[_0x2b4704(0x212)],u[_0x2b4704(0x141)]),y(0x1,n['ILogService']),y(0x2,(0x0,n[_0x2b4704(0x1ce)])(n[_0x2b4704(0x39f)])),y(0x3,n[_0x2b4704(0x309)])],$),exports[_0x2b4704(0x162)]=Ue,Object['defineProperty'](exports,_0x2b4704(0x37d),{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x2b4704(0x1dd)](exports,'AwaitingState',{'enumerable':!0x0,'get':function(){return M;}}),Object['defineProperty'](exports,_0x2b4704(0x22c),{'enumerable':!0x0,'get':function(){return N;}}),exports['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']=h,Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x2d1),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x3d6),{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x14d),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x1bc),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x18d),{'enumerable':!0x0,'get':function(){return S;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x2ab),{'enumerable':!0x0,'get':function(){return V;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x3ce),{'enumerable':!0x0,'get':function(){return ze;}}),exports['CollaborationStatus']=ke,exports[_0x2b4704(0x140)]=oe,exports[_0x2b4704(0x2f2)]=v,Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x21d),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x2b4704(0x38f)]=se,Object[_0x2b4704(0x1dd)](exports,'ConflictState',{'enumerable':!0x0,'get':function(){return P;}}),exports['DEFAULT_COLLAB_WEB_SOCKET_URL']=te,exports['DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT']=_0x2b4704(0x314),exports[_0x2b4704(0x289)]=_0x2b4704(0x13e),Object[_0x2b4704(0x1dd)](exports,'DataLoaderService',{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x241),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x2b4704(0x1dd)](exports,'FetchingMissState',{'enumerable':!0x0,'get':function(){return I;}}),exports[_0x2b4704(0x3df)]='HEARTBEAT_INTERVAL',exports[_0x2b4704(0x339)]=_0x2b4704(0x204),exports['IAttachmentIoService']=We,exports[_0x2b4704(0x347)]=Le,exports[_0x2b4704(0x33f)]=C,exports[_0x2b4704(0x158)]=Pe,exports[_0x2b4704(0x291)]=T,exports[_0x2b4704(0x1fb)]=0x3e8,exports['LOCAL_CACHE_INTERVAL_KEY']='LOCAL_CACHE_INTERVAL',Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x20f),{'enumerable':!0x0,'get':function(){return x;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x11c),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x234),{'enumerable':!0x0,'get':function(){return F;}}),Object['defineProperty'](exports,_0x2b4704(0x147),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x2b4704(0x300)]='REMOTE_UNISCRIPT_EXECUTION_ENDPOINT',exports[_0x2b4704(0x275)]=_0x2b4704(0x101),exports[_0x2b4704(0x11b)]=le,Object['defineProperty'](exports,'SheetCollaborationEntity',{'enumerable':!0x0,'get':function(){return z;}}),Object[_0x2b4704(0x1dd)](exports,'SheetTransformSelectionsService',{'enumerable':!0x0,'get':function(){return w;}}),Object[_0x2b4704(0x1dd)](exports,'SnapshotServerOverHTTPService',{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x134),{'enumerable':!0x0,'get':function(){return A;}}),exports[_0x2b4704(0x228)]=pe,Object[_0x2b4704(0x1dd)](exports,_0x2b4704(0x262),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x2b4704(0x247)]=Fe,exports[_0x2b4704(0x2fc)]=de,exports['serializeCombRequest']=Ie;